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

@chloehe/logic-engine-ui

v1.0.0

Published

规则引擎UI模块

Readme

@chloehe/logic-engine-ui

插件流程引擎 UI 组件库,提供流程可视化、动态配置表单、规则编辑器等 React 组件。

目录结构

src/
├── components/         # React 组件
│   ├── DynamicConfigForm/  # 动态配置表单
│   ├── FlowConsole/        # 流程控制台
│   ├── FlowView/           # 流程可视化编辑器
│   └── RuleEditor/         # 规则编辑器
├── utils/              # 工具类
│   ├── FormWidgetInjector/ # 表单控件注入器
│   └── PluginUIRegistry/   # 插件 UI 注册器
├── widget/             # 表单控件
├── types.ts            # 类型定义
└── index.ts            # 聚合导出

核心组件

DynamicConfigForm

基于 schema 的动态配置表单,支持自定义控件注入。

特性:

  • 支持多种内置控件(Input、Select、Switch、DatePicker 等)
  • 支持自定义控件注入
  • 表单验证支持
  • 动态字段配置

FlowView

基于 React Flow 的流程可视化编辑器。

特性:

  • 拖拽式节点编辑
  • 自定义节点样式
  • 边连接管理
  • 性能监控面板
  • 节点配置抽屉

RuleEditor

条件规则编辑器,支持复杂规则组合。

特性:

  • 规则组嵌套
  • 多种操作符支持
  • 范围输入组件
  • 可视化规则树

FlowConsole

流程执行控制台,展示执行日志和状态。

工具模块

FormWidgetInjector

表单控件注入器,负责控件的注册、映射和查找。

PluginUIRegistry

插件 UI 配置注册管理器,管理插件类型与表单配置的映射关系。

表单控件

内置多种表单控件:

  • antdWidgets - 基于 Ant Design 的控件
  • customWidgets - 自定义控件(KeyValueEditor、EventConfig 等)
  • defaultWidget - 默认控件实现

安装

pnpm add @chloehe/logic-engine-ui

使用示例

import { DynamicConfigForm, injectWidget, WidgetKeys, type Schema } from '@chloehe/logic-engine-ui';

injectWidget('json-editor', JsonEditor);

const schema: Schema = {
  type: 'MyAction',
  label: '我的动作配置',
  config: [
    { field: 'title', label: '标题', type: WidgetKeys.Input },
    { field: 'payload', label: '负载', type: 'json-editor' },
  ],
};

<DynamicConfigForm
  schema={schema}
  value={value}
  onChange={setValue}
/>