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

@kmf5302/flow-editor

v0.0.2

Published

This project is a re-usable flow chart and process diagram editor for web applications.

Readme

flow-editor

This project is a re-usable flow chart and process diagram editor for web applications.

To use:

The nodes on the screen are a representation of two properties supplied to the component, nodes and node-types.

nodes are an array of flowchart nodes, they have the following structure:

export interface Node {
	nodeId: number; // This property must be unique to the node for FlowEditor to work properly
	name: string; // Display name of the node in the diagram
	type: string; // Reference to the type of node this is, should match an entry in node-types
	x: number; // The x position in the diagram
	y: number; // The y position in the diagram
	outputs: Output[]; // A list of output nodes. These can be connected to other nodes in the diagram
	meta?: Record<string, unknown> | null; // Key value pair for any extra data that can be attached to the node.
};

export interface Output {
	name: string; // The display name of this output
	value: string|number|boolean; // Unused by default in the editor, this can be used to store some external value tied to this output. Can be string|number|boolean
	meta?: Record<string, unknown> | null; // Key value pair for any extra data that can be attached to the output.
}

Node types follow this structure, and define what kinds of nodes are available, how they look in the diagram, and any restrictions on their use. Note that there is one reserved node type named 'start' which denotes the beginning of the process diagram. This node cannot be edited or moved and has one single output.

export interface NodeType {
	// Display name of type. If not supplied, uses type
	name?: string;
	// The identifying value of the type
	type: string;
	// SVG Path data to use as an icon on the node
	svgIcon?: string;
	// The width of the node in the editor. Default of 200. You may need to increase this if the titles or outputs are long
	width?: number;
	// List of outputs that are added to the node when it is created.
	outputs: {
		name: string;
		value: string | number | boolean;
		// Extra data to add onto an output
		meta?: Record<string, unknown>;
	}[];
	// Change the fill color of this block
	fill?: string;
	// If true, outputs are not editable
	lockedOutputs?: boolean;
	// Custom editor for an output. For editing metadata or values
	outputEditComponent?: Component;
	// Custom creator for an output. Replaces the "Add Output" button
	outputCreateComponent?: Component;
	meta?: Record<string, unknown>;
	// Custom editor for the component. Use this to create editors for metadata
	nodeEditComponent?: Component;
};

All edits to nodes are done via three events on the FlowEditor component:

  • create:node
  • update:node
  • delete:node

You will need to implement these and update your node array yourself, as FlowEditor does not do any actual data editing, just gives these events when things are changed. The create:node event creates nodes with a nodeId of -1, you are expected to assign a unique id yourself before adding the node back to your list. All three events have one parameter of the Node type, being the node created, updated, or deleted.

There is an example usage in the /src directory. This shows how you can have custom editors for outputs.

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Compile and Minify for Production

npm run build

Lint with ESLint

npm run lint