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 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-dataflow-animator

v1.0.0

Published

Composant React qui compile une spécification JSON en une animation déterministe et navigable de flux de données (client/serveur/SQL…).

Readme

react-dataflow-animator

Composant React qui compile une spécification JSON en une animation déterministe et navigable de flux de données (client/serveur, requêtes SQL, microservices…).

  • Aucune coordonnée à fournir — le moteur place les nœuds.
  • Lecteur intégré : lecture, pause, navigation par étapes, plein écran.
  • SSR-safe, utilisable directement dans Docusaurus, Next.js, Vite, etc.
  • Coloration syntaxique intégrée (Prism, remplaçable).

Installation

npm install react-dataflow-animator

react et react-dom (≥ 18) sont attendus en peerDependencies.

ESM uniquement. Ce package ne fournit pas d'entrée CommonJS. Votre bundler (Vite, Next.js, esbuild…) doit supporter les modules ES. Node.js ≥ 12 avec "type": "module" ou un flag --input-type=module est requis pour les usages hors bundler.

Utilisation

import { DataFlowPlayer } from 'react-dataflow-animator';
import 'react-dataflow-animator/styles.css';

const spec = {
  direction: 'left-to-right',
  nodes: [
    { id: 'browser', type: 'laptop', text: 'Navigateur', lane: 1 },
    { id: 'api', type: 'server', text: 'API', lane: 2 },
    { id: 'db', type: 'database', text: 'PostgreSQL', lane: 3 },
  ],
  packets: [
    {
      id: 'req',
      kind: 'http_packet',
      packet_content: { header: 'GET /users' },
    },
    {
      id: 'sql',
      kind: 'sql_request',
      request_content: 'SELECT * FROM users',
    },
  ],
  timeline: [
    { type: 'move', object: 'req', from: 'browser', to: 'api' },
    { type: 'move', object: 'sql', from: 'api', to: 'db' },
  ],
};

export default function Example() {
  return <DataFlowPlayer spec={spec} />;
}

Concepts en une page

Une spec décrit trois choses :

  1. nodes — les nœuds du diagramme (serveurs, clients, bases…). Placement automatique selon direction (linéaire ou circular) et lane.
  2. packets — les payloads qui circuleront entre nœuds (paquets HTTP, requêtes/réponses SQL).
  3. timeline — la chronologie : move, arrow, parallel, loading, set_content, comment, highlight.

Le moteur compile la spec en une chronologie déterministe : le temps t (ms) est l'unique source de vérité, ce qui rend le seek, la navigation par étapes et le SSR triviaux.

Props principales du <DataFlowPlayer>

| Prop | Type | Défaut | Description | | ----------- | ------------------------------------------ | --------------- | ----------------------------------------------------- | | spec | DataFlowSpec | — | La spécification à animer. | | height | number \| string | 420 | Hauteur de la scène. | | autoPlay | boolean | false | Démarre la lecture automatiquement. | | loop | boolean | false | Rejoue en boucle à la fin. | | controls | boolean | true | Affiche la barre de contrôles. | | theme | 'light' \| 'dark' \| 'auto' | 'auto' | Suit prefers-color-scheme et [data-theme] parent. | | density | 'compact' \| 'comfortable' \| 'spacious' | 'comfortable' | Échelle visuelle. | | speed | number | 1 | Vitesse de lecture. | | highlight | Highlighter | Prism | Remplacer la coloration syntaxique. | | debug | boolean | false | Overlay de debug de la timeline. |

Extensibilité

import { registerNodeIcon, registerSubIcon } from 'react-dataflow-animator';

registerNodeIcon('queue', <svg viewBox="0 0 24 24">{/* … */}</svg>);
registerSubIcon('kafka', <svg viewBox="0 0 24 24">{/* … */}</svg>);

Une sous-icône peut aussi être un texte libre ('v2', 'API', 'JWT'), automatiquement rendu en pastille.

Documentation

Site complet (démos, playground, référence API) : https://github.com/PierreOlivierBrillant/react-dataflow-animator.

Licence

MIT