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

@deep-sight/workflow

v1.0.9

Published

类dify、coze流程图,包含变量、判断、代码块、循环等,支持自由扩展节点,适用大模型、AI Agent等场景。

Readme

starter with Vite.js, React.js, Typescript

在线演示 & 文档

预览

工作流预览

使用

npm install @deep-sight/workflow


import { DPWorkflow, Workflow } from '@deep-sight/workflow';
import '@deep-sight/workflow/dist/style.css'
import '@arco-themes/react-deep/index.less'; // 可自行去 https://arco.design/themes 更换arcoDesign主题
import '@xyflow/react/dist/style.css'; // 依赖reactFlow

例子

import React from 'react';
import { Card, Button } from '@arco-design/web-react';
import { createRoot } from 'react-dom/client';

import { DPWorkflow, Workflow } from '@deep-sight/workflow';
import '@deep-sight/workflow/dist/style.css'
import '@arco-themes/react-deep/index.less';
import '@xyflow/react/dist/style.css';

const App: React.FC = () => {
	const workflow = new DPWorkflow(JSON.parse(localStorage.getItem('wf') || '{}'));

	return (
		<Card bordered={false} bodyStyle={{ height: 'calc(100vh - 80px)', width: '100%', padding: '0 0 50px 0' }}>
			<Button onClick={() => workflow.save()}>Save</Button>
			<Button onClick={() => workflow.run()}>Run</Button>
			<Workflow dpWorkflow={workflow} onSave={(v) => localStorage.setItem('wf', JSON.stringify(v))} autoSave={false} autoSaveInterval={2000} />
		</Card>
	);
};

const root = createRoot(document.getElementById('root'));
root.render(<App />);

扩展自定义节点

  1. customNodes/end.ts定义逻辑 class,并注册对应配置组件
import { DPBaseNode } from '@deep-sight/workflow';
import { End } from './End';

export class EndNode extends DPBaseNode {
	async runSelf(): Promise<void> {} // 必要实现、运行时会被调用
}
DPBaseNode.registerType({
	type: 'customEnd',
	model: EndNode,
	icon: 'zhongdian',
	iconColor: '#f79009',
	NodeComponent: End, // 节点显示组件
	SetComponent: null, // 配置组件
	label: '结束',
	desc: '结束节点',
	group: 'custom'
});
  1. customNodes/end.tsx定义所需组件
import React from 'react';
import { observer } from 'mobx-react-lite';
import { Handle, Position } from '@xyflow/react';
import { NodeComponentProps } from '@deep-sight/workflow';
import { EndNode } from './end.ts';

export const End: React.FC<NodeComponentProps<EndNode>> = observer(({node}) => {
	return (
		<div>
			<Handle type="target" className="base-handle" position={Position.Left} />
		</div>
	);
});
export const EndSet: React.FC<NodeComponentProps<EndNode>> = observer(({node}) => {
	return (
		<div>
			<Input value={node.desc} onChange={v=> node.desc = v}>
		</div>
	);
});

国际化支持

  • 本组件库内置中英文词条,开箱即用,无需额外配置。
  • 如需自定义多语言或与宿主项目 i18next 实例集成,可用 I18nProvider 包裹:
import { I18nProvider } from '@deep-sight/workflow/i18n';

<I18nProvider i18nInstance={yourI18n}>
  <YourComponent />
</I18nProvider>

计划

  • [x] 节点变量功能
  • [x] 运行日志功能
  • [x] 运行错误时自动聚焦到错误节点
  • [x] 中途停止运行
  • [x] 节点单独测试运行、失败重试运行
  • [x] 历史记录、上一步、下一步
  • [x] 完善文档
  • [x] 国际化
  • [ ] 第三方节点插件机制、节点市场

贡献

欢迎参与

fork 代码后

pnpm i

npm run dev

请求代码合并

License

  • 本仓库遵循 Apache 2.0
  • 商业用途请保留出处和 logo