@bpmn-io/variable-outline

中文文档
4.0.1发布于 2026/10/20MITES Module近 30 天下载 1.6万

A React component to display variables in a BPMN diagram.

原始使用文档
文档目录6 节
  1. Usage
  2. Revealing the Defining Field
  3. Design System
  4. Development
  5. Code of Conduct
  6. License

@bpmn-io/variable-outline

CI

A React component to display variables in a BPMN diagram.

Usage

Simply add the component to your existing React application and pass the bpmn-js injector to the component:

import VariableOutline from '@bpmn-io/variable-outline';
import '@camunda/design-system/styles.css';
import '@bpmn-io/variable-outline/dist/variable-outline.css';

export function MyComponent(props) {
  const {
    injector
  } = props;

  return <VariableOutline injector={injector}></VariableOutline>
}

Revealing the Defining Field

[!NOTE] Clicking the element that writes a variable also reveals the properties panel field that defines it. The field is resolved through propertiesPanel#getEntryId(element, path), so this requires bpmn-js-properties-panel@>=5.63.0; with an older panel the click only selects the element. Fields contributed by element templates additionally need bpmn-js-element-templates@>=2.29.0.

Design System

[!NOTE] The component is built on @camunda/design-system, a required peer dependency. The host application loads its stylesheet, @camunda/design-system/styles.css, once.

Development

Start a demo page with npm run start.

Run all tests with npm run test

Code of Conduct

By participating to this project, please uphold to our Code of Conduct.

License

MIT

Uses bpmn-js licensed under the bpmn.io license.

版本与发布记录

@bpmn-io/variable-outline 共发布 24 个版本,首次发布于 2024/08/14;过去 12 个月发布了 16 个版本。

版本发布日期距今
4.0.1latest2026/10/2018 天前
4.0.02026/10/0830 天前
3.3.22026/08/242 个月前
3.3.12026/08/162 个月前
3.3.02026/08/043 个月前
3.2.12026/07/103 个月前

其他发布通道:next → 3.0.0-rc.3。

关于 @bpmn-io/variable-outline 的常见问题

@bpmn-io/variable-outline 是什么?

A React component to display variables in a BPMN diagram.

如何安装 @bpmn-io/variable-outline?

在项目目录运行 npm install @bpmn-io/variable-outline,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(*)、react-dom(*)、camunda-bpmn-js(*)、@codemirror/view(^6.0.0)、@codemirror/state(^6.0.0)、@bpmn-io/lang-feel(^4.0.0)、@codemirror/language(^6.0.0)、@camunda/design-system(>=0.63.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@bpmn-io/variable-outline 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/bpmn-io__variable-outline 是否存在。

@bpmn-io/variable-outline 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@bpmn-io/variable-outline 可以商用吗?

@bpmn-io/variable-outline 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@bpmn-io/variable-outline 的下载量有多少?

根据 npm 官方下载统计,@bpmn-io/variable-outline 在 2026/10/09 – 2026/11/07 这 30 天内被下载 15,648 次,日均约 522 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bpmn-io/variable-outline 还在维护吗?

最新版本 4.0.1 发布于 2026/10/20(18 天前);至今共发布 24 个版本,其中过去 12 个月发布了 16 个;首次发布于 2024/08/14。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。