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

@xpressai/xircuits-viewer-react

v0.3.1

Published

React components for rendering `.xircuits` workflow files. Built on [`@xpressai/xircuits-viewer`](https://www.npmjs.com/package/@xpressai/xircuits-viewer).

Readme

@xpressai/xircuits-viewer-react

React components for rendering .xircuits workflow files. Built on @xpressai/xircuits-viewer.

HelloXircuits rendered

Install

npm install @xpressai/xircuits-viewer @xpressai/xircuits-viewer-react

Usage

Interactive (with pan/zoom)

import { XircuitsGraph } from '@xpressai/xircuits-viewer-react';

// Point it at a .xircuits file — that's it
<XircuitsGraph src="/workflows/MyWorkflow.xircuits" />

With options:

<XircuitsGraph
  src="/workflows/MyWorkflow.xircuits"
  theme="dark"
  height={500}
  interactive
  onNodeClick={(node) => console.log(node.name)}
/>

Static (SSR-safe)

import { XircuitsGraphStatic } from '@xpressai/xircuits-viewer-react';

<XircuitsGraphStatic src="/workflows/MyWorkflow.xircuits" theme="dark" />

Pre-loaded data

import workflow from './MyWorkflow.xircuits';

<XircuitsGraph data={workflow} />

Live component preview (Python → node)

Drop-in: a two-line demo with a textarea editor and a live-updating node preview.

import { ComponentPreview } from '@xpressai/xircuits-viewer-react';

<ComponentPreview value={code} onChange={setCode} />

Plug in a real editor (CodeMirror, Monaco, etc.) via the editor prop:

import { ComponentPreview } from '@xpressai/xircuits-viewer-react';
import CodeMirror from '@uiw/react-codemirror';
import { python } from '@codemirror/lang-python';

<ComponentPreview
  value={code}
  onChange={setCode}
  editor={({ value, onChange }) => (
    <CodeMirror value={value} onChange={onChange} extensions={[python()]} height="100%" />
  )}
  theme="dark"
/>

For full control over layout, skip <ComponentPreview> and compose it yourself — parsePythonComponent (re-exported here from @xpressai/xircuits-viewer) is a pure function, and <XircuitsGraph> accepts a pre-built graph:

import { XircuitsGraph, parsePythonComponent } from '@xpressai/xircuits-viewer-react';

const { graph } = parsePythonComponent(pythonSource);
return graph ? <XircuitsGraph graph={graph} /> : null;

The parser itself is documented in the core package README — what it recognises, what it doesn't, and how Python types map to xircuits type names.

Props

XircuitsGraph

| Prop | Type | Default | Description | |------|------|---------|-------------| | src | string | — | URL to a .xircuits file | | data | object | — | Pre-loaded JSON (takes precedence over src) | | graph | XGraph | — | Pre-parsed graph (takes precedence over both data and src) | | theme | 'dark' \| 'light' | 'dark' | Color theme | | showCanvasBackground | boolean | true | Render the Xircuits dot-grid background on the container | | interactive | boolean | true | Enable pan/zoom | | showControls | boolean | same as interactive | Show zoom +/−/fit buttons in the corner | | fitView | boolean | true | Auto-fit the graph on first render | | height | number \| string | 400 | Container height | | width | number \| string | '100%' | Container width | | padding | number | 40 | Viewport padding | | onNodeClick | (node) => void | — | Node click handler | | onEdgeClick | (edge) => void | — | Edge click handler | | onError | (error) => void | — | Error handler |

XircuitsGraphStatic

Same props as above, minus interactive, onNodeClick, onEdgeClick.

ComponentPreview

| Prop | Type | Default | Description | |------|------|---------|-------------| | value | string | required | Python source code | | onChange | (v: string) => void | required | Called on edit | | editor | React.ComponentType<{ value, onChange, language }> | plain <textarea> | Editor slot — plug in Monaco, CodeMirror, etc. | | debounceMs | number | 200 | Delay between typing and re-parsing | | onParseResult | (result) => void | — | Fires on every re-parse with { graph, error, warnings } | | layout | 'horizontal' \| 'vertical' | 'horizontal' | Editor/preview arrangement | | containerWidth | number \| string | '100%' | Container width | | containerHeight | number \| string | 400 | Container height | | editorRatio | number | 0.5 | Editor size as a fraction of the container | | …XircuitsGraph props | — | — | theme, fitView, showControls, etc. pass through to the viewer |

parsePythonComponent

parsePythonComponent(source: string, options?: ParsePythonOptions): {
  graph: XGraph | null;   // null on fatal parse error
  error: string | null;   // human-readable fatal error
  warnings: string[];     // non-fatal notes (e.g. missing decorator)
}

ParsePythonOptions: { defaultColor?, includeFlowIn?, includeFlowOut? }.

License

MIT