npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

dio-devtool

v1.1.42

Published

Outils de développement

Readme

Limited Dev Tools

Outils de développement pour Limited Hub.

Installation

npm install dio-devtool
# ou
yarn add dio-devtool

Utilisation

DevStoresModal

Le composant DevStoresModal permet d'inspecter et de modifier les stores Zustand de votre application.

import { useGlobalStore } from "@/src/store/global.store";
import { useDealStore } from "@/src/store/hub/deal.store";
import { DevStoresModal, StoreConfig } from "dio-devtool";
import { Globe, Receipt } from "lucide-react";
import { toast } from "sonner";

export default function MonComposant() {
  // Initialisation des stores
  const globalStore = useGlobalStore();
  const dealStore = useDealStore();

  // Configuration des stores
  const stores: StoreConfig[] = [
    {
      name: "Global",
      datas: globalStore,
      onSave: (newDatas) => {
        globalStore.setStore(newDatas);
        toast.success("Global Store data saved");
      },
      isFetchedKeys: ["userInfosLoaded"],
      icon: <Globe size={16} />,
    },
    {
      name: "Deal",
      datas: dealStore,
      onSave: (newDatas) => {
        dealStore.setStore(newDatas);
        toast.success("Deal Store data saved");
      },
      isFetchedKeys: ["dealFetched"],
      icon: <Receipt size={16} />,
    },
  ];

  return <DevStoresModal stores={stores} />;
}

DevModal

Le composant DevModal permet d'inspecter et de modifier n'importe quelle donnée JSON.

import { DevModal } from "dio-devtool";

export default function MonComposant() {
  const data = {
    id: 1,
    name: "Example",
    value: 42,
  };

  const handleSave = (newData) => {
    console.log("Données sauvegardées:", newData);
    // Mettre à jour les données dans votre application
  };

  return <DevModal datas={data} onSave={handleSave} />;
}

DevColorsModal

Le composant DevColorsModal permet d'afficher les couleurs de votre thème.

import { DevColorsModal } from "dio-devtool";

export default function MonComposant() {
  return <DevColorsModal />;
}

API

DevStoresModal (Composant)

Props

| Prop | Type | Description | Default | | ------------- | ----------------- | ----------------------------------------- | -------- | | title | string | Titre du modal | "Stores" | | icon | React.ReactNode | Icône à afficher à côté du titre | - | | collapseDepth | number | boolean | Profondeur de collapse pour ReactJsonView | false | | className | string | Classe CSS supplémentaire | - | | disabled | boolean | Désactive le bouton d'ouverture | false | | canEdit | boolean | Permet l'édition des données | true | | canDelete | boolean | Permet la suppression des données | true | | stores | StoreConfig[] | Configuration des stores à afficher | - |

DevModal (Composant)

Props (DevModal)

| Prop | Type | Description | Default | | ------------- | ----------------- | ----------------------------------------- | --------------------- | | datas | any | Données à afficher | - | | title | string | Titre du modal | "Détails de la ligne" | | onSave | function | Fonction appelée lors de la sauvegarde | console.log | | collapseDepth | number | boolean | Profondeur de collapse pour ReactJsonView | false | | className | string | Classe CSS supplémentaire | - | | disabled | boolean | Désactive le bouton d'ouverture | false | | canEdit | boolean | Permet l'édition des données | true | | canDelete | boolean | Permet la suppression des données | true |

DevColorsModal (Composant)

Props (DevColorsModal)

| Prop | Type | Description | Default | | --------- | ------ | ------------------------- | -------- | | title | string | Titre du modal | "Colors" | | className | string | Classe CSS supplémentaire | - |

StoreConfig (Type)

export type FormStoreType = {
  currentForm: any | null;
  setCurrentForm: (form: any) => void;
};

export type StoreConfigType = {
  name: string;
  datas: any;
  onSave: (newDatas: any) => void;
  isFetchedKeys: string[];
  icon?: React.ReactNode;
};

export type DevStoresModalPropsType = {
  title?: string;
  icon?: React.ReactNode;
  collapseDepth?: number | boolean;
  className?: string;
  disabled?: boolean;
  canEdit?: boolean;
  canDelete?: boolean;
  stores?: StoreConfigType[];
};

export type DevModalPropsType = {
  datas: any;
  title?: string;
  onSave?: (newDatas: any) => void;
  collapseDepth?: number | boolean;
  className?: string;
  disabled?: boolean;
  canEdit?: boolean;
  canDelete?: boolean;
};

export type DevColorsModalPropsType = {
  title?: string;
  className?: string;
};

Licence

MIT