@bpmn-nova/vue 0.3.3-preview → 0.3.4-preview

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,7 +4,7 @@ BPMN Nova 的 Vue 3.3+ Adapter,提供 Studio、Designer、Viewer、审批轨
4
4
 
5
5
  > **English summary:** Vue 3.3+ components and exposed instance methods for BPMN Nova process design, viewing, approval traces, properties, themes, and SVG export.
6
6
 
7
- > 当前版本为 `0.3.3-preview`。Vue 由宿主工程提供,本包不会替应用选择或升级框架版本。
7
+ > 当前版本为 `0.3.4-preview`。Vue 由宿主工程提供,本包不会替应用选择或升级框架版本。
8
8
 
9
9
  ![BPMN Nova Vue 流程工作台](https://raw.githubusercontent.com/daxiangme/bpmn-nova/dev/docs/assets/bpmn-nova-designer.jpg)
10
10
 
@@ -20,6 +20,20 @@ import '@bpmn-nova/vue/styles.css'
20
20
 
21
21
  只安装本包;`@bpmn-nova/studio` 会作为内部依赖自动解析。容器必须有明确高度。
22
22
 
23
+ TypeScript 类型也从 Vue 入口导入,不要为了模型类型额外声明 Studio 直依赖:
24
+
25
+ ```ts
26
+ import type {
27
+ BpmnNode,
28
+ EdgeType,
29
+ ElementSelection,
30
+ NodeType,
31
+ ProcessModel,
32
+ } from '@bpmn-nova/vue'
33
+ ```
34
+
35
+ 公共类型门面还包含 `BpmnEdge`、`EngineId` 和 `LayoutOptions`。
36
+
23
37
  使用代码生成助手或 IDE Agent 接入时,从随包的 `llms.txt` 开始;需要完整接口和定制资料时再读取 `llms-full.txt`。两份文件都包含在 npm tarball 中,不依赖源码仓库可见性。
24
38
 
25
39
  ## 流程设计
package/dist/index.d.ts CHANGED
@@ -42,6 +42,16 @@ import type {
42
42
  ViewerProjection,
43
43
  } from '@bpmn-nova/studio/viewer'
44
44
 
45
+ export type {
46
+ BpmnEdge,
47
+ BpmnNode,
48
+ EdgeType,
49
+ ElementSelection,
50
+ EngineId,
51
+ LayoutOptions,
52
+ NodeType,
53
+ ProcessModel,
54
+ } from '@bpmn-nova/studio'
45
55
  export type {
46
56
  NodeSubtitleResolver,
47
57
  NodeSubtitleResolverContext,
package/llms-full.txt CHANGED
@@ -44,6 +44,20 @@ yarn add @bpmn-nova/vue@preview
44
44
 
45
45
  Replace `vue` with `react` or `studio` only when the selected framework branch requires it. Run one installation command, not all three.
46
46
 
47
+ In TypeScript host code, import shared BPMN model types from that same selected public package. Vue and React explicitly re-export `BpmnEdge`, `BpmnNode`, `EdgeType`, `ElementSelection`, `EngineId`, `LayoutOptions`, `NodeType`, and `ProcessModel`; do not add a direct Studio dependency only to obtain these types:
48
+
49
+ ```ts
50
+ import type {
51
+ BpmnNode,
52
+ EdgeType,
53
+ ElementSelection,
54
+ NodeType,
55
+ ProcessModel,
56
+ } from '@bpmn-nova/vue'
57
+ ```
58
+
59
+ Use `@bpmn-nova/react` instead in a React application.
60
+
47
61
  This step is complete when the application manifest contains exactly the selected direct BPMN Nova dependency and the package manager finishes without peer-dependency errors.
48
62
 
49
63
  ## 3. Select the visual Interface
@@ -255,7 +269,7 @@ The installation is complete only when the package is present, the production bu
255
269
  BPMN Nova 提供可嵌入的流程设计器、只读 Viewer、运行态审批轨迹、实例级主题、纯 SVG 导出,以及 React / Vue 适配。项目使用独立的 DOM / SVG 渲染实现,不依赖 `bpmn-js`,并为 Flowable 与 Activiti 提供 XML Profile 和属性扩展。
256
270
 
257
271
  > [!IMPORTANT]
258
- > 当前版本为 `0.3.3-preview`。它适合 SDK 评估、产品集成验证和企业审批原型;公开 Interface、BPMN XML round-trip 与引擎兼容能力仍在持续稳定中,建议使用 `@preview` 安装并在生产接入前完成目标流程验证。
272
+ > 当前版本为 `0.3.4-preview`。它适合 SDK 评估、产品集成验证和企业审批原型;公开 Interface、BPMN XML round-trip 与引擎兼容能力仍在持续稳定中,建议使用 `@preview` 安装并在生产接入前完成目标流程验证。
259
273
 
260
274
  AI 或代码生成工具接入必须从 [`llms.txt`](llms.txt) 的完整安装流程开始;需要全部接口与定制上下文时再读取 [`llms-full.txt`](llms-full.txt)。这两份文件也会随三个公开 npm 包发布。
261
275
 
@@ -347,6 +361,20 @@ JavaScript 入口不会自动注入 CSS。使用视觉组件时,请显式导
347
361
 
348
362
  设计、Viewer、Runtime、Theme、SVG Export、Flowable 和 Activiti 继续保持独立内部 Module,但统一由 Studio 根入口或受支持子路径暴露,不再单独发布。一个业务项目只直接安装上述三个包之一。
349
363
 
364
+ TypeScript 宿主也从所选框架包导入公共模型类型,无需为类型再直接安装 Studio。例如 Vue 项目可以直接导入:
365
+
366
+ ```ts
367
+ import type {
368
+ BpmnNode,
369
+ EdgeType,
370
+ ElementSelection,
371
+ NodeType,
372
+ ProcessModel,
373
+ } from '@bpmn-nova/vue'
374
+ ```
375
+
376
+ React 项目将入口替换为 `@bpmn-nova/react`。两个 Adapter 还显式重导出 `BpmnEdge`、`EngineId` 与 `LayoutOptions`。
377
+
350
378
  ## 快速开始
351
379
 
352
380
  视觉组件依赖容器尺寸,请先提供明确高度:
@@ -821,6 +849,14 @@ npm test
821
849
 
822
850
  已经安装三个公开包之一且与目标技术栈匹配时,沿用现有入口。React 和 Vue 同时存在但无法确定目标应用时先询问用户。`@bpmn-nova/core`、`designer`、`viewer`、`runtime`、`theme`、`export-svg`、`properties` 等历史入口不参与选择;这些能力已经收进 Studio,并通过根入口或受支持子路径提供。
823
851
 
852
+ TypeScript 代码必须从已经选择的公开包导入共享类型。React/Vue Adapter 均显式重导出 `BpmnEdge`、`BpmnNode`、`EdgeType`、`ElementSelection`、`EngineId`、`LayoutOptions`、`NodeType` 和 `ProcessModel`;不要仅为了这些类型安装或声明 `@bpmn-nova/studio`:
853
+
854
+ ```ts
855
+ import type { BpmnNode, ElementSelection, NodeType, EdgeType, ProcessModel } from '@bpmn-nova/vue'
856
+ ```
857
+
858
+ React 应用把入口替换为 `@bpmn-nova/react`。
859
+
824
860
  所有示例都必须满足:
825
861
 
826
862
  - 导入对应公开包的 `styles.css`。
@@ -1208,7 +1244,7 @@ BPMN Nova 负责 BPMN 建模、XML 导入导出、只读展示、运行态审批
1208
1244
 
1209
1245
  # BPMN Nova 快速开始
1210
1246
 
1211
- 本文面向通过 NPM 集成 BPMN Nova 的应用开发者。版本 `0.3.3-preview` 要求现代浏览器;Node.js 18+ 用于构建、SSR 和开发工具。
1247
+ 本文面向通过 NPM 集成 BPMN Nova 的应用开发者。版本 `0.3.4-preview` 要求现代浏览器;Node.js 18+ 用于构建、SSR 和开发工具。
1212
1248
 
1213
1249
  ## 1. 按语言与框架选择入口
1214
1250
 
@@ -1224,6 +1260,20 @@ JavaScript 与 TypeScript 使用相同的包和导入方式。所有公开包都
1224
1260
 
1225
1261
  Core、Viewer、Runtime、Theme 等目录不再是可直接安装的 NPM 包。Vanilla 项目从 Studio 根入口或受支持子路径导入;React/Vue 项目使用对应 Adapter。
1226
1262
 
1263
+ React/Vue Adapter 同时是公共 TypeScript 类型门面。模型、选区与图元类型从所选 Adapter 直接导入,不需要额外安装 Studio:
1264
+
1265
+ ```ts
1266
+ import type {
1267
+ BpmnNode,
1268
+ EdgeType,
1269
+ ElementSelection,
1270
+ NodeType,
1271
+ ProcessModel,
1272
+ } from '@bpmn-nova/vue'
1273
+ ```
1274
+
1275
+ React 项目使用 `@bpmn-nova/react`;两个入口还重导出 `BpmnEdge`、`EngineId` 和 `LayoutOptions`。
1276
+
1227
1277
  每个视觉包都有自己的完整样式入口。JavaScript 不会隐式插入 CSS:
1228
1278
 
1229
1279
  ```js
@@ -1610,7 +1660,7 @@ BPMN Nova 主题应挂在组件根容器。自定义 Renderer 不要修改 `docu
1610
1660
 
1611
1661
  # BPMN Nova 组件参数
1612
1662
 
1613
- 本手册记录 `0.3.3-preview` 的公开组件参数、回调和实例方法。所有视觉组件都需要具有实际尺寸的容器,并显式导入所属包的 `styles.css`。
1663
+ 本手册记录 `0.3.4-preview` 的公开组件参数、回调和实例方法。所有视觉组件都需要具有实际尺寸的容器,并显式导入所属包的 `styles.css`。
1614
1664
 
1615
1665
  ## 按项目环境阅读
1616
1666
 
@@ -1866,7 +1916,23 @@ Runtime Details、Timeline 和 Transition Details 组件通过对应 `createReac
1866
1916
 
1867
1917
  <!-- SOURCE: docs/API.md -->
1868
1918
 
1869
- # BPMN Nova v0.3.2 Preview API
1919
+ # BPMN Nova v0.3.4 Preview API
1920
+
1921
+ ## Framework Adapter 类型门面
1922
+
1923
+ React/Vue 项目只直接依赖对应 Adapter。两个 Adapter 的根声明入口显式重导出 `BpmnEdge`、`BpmnNode`、`EdgeType`、`ElementSelection`、`EngineId`、`LayoutOptions`、`NodeType` 和 `ProcessModel`,宿主无需仅为这些公共类型增加 Studio 直依赖:
1924
+
1925
+ ```ts
1926
+ import type {
1927
+ BpmnNode,
1928
+ EdgeType,
1929
+ ElementSelection,
1930
+ NodeType,
1931
+ ProcessModel,
1932
+ } from '@bpmn-nova/vue'
1933
+ ```
1934
+
1935
+ React 使用相同名称,并将入口替换为 `@bpmn-nova/react`。这些是 TypeScript-only export,不会增加 Adapter 的浏览器运行时代码。
1870
1936
 
1871
1937
  ## Designer
1872
1938
 
@@ -2984,7 +3050,7 @@ createStudioShell({
2984
3050
 
2985
3051
  # BPMN Nova NPM 包与发布
2986
3052
 
2987
- 版本:`0.3.3-preview`。BPMN Nova 只发布三个 `@bpmn-nova` 公共包,均使用 ESM、附带 TypeScript 声明、采用 Apache-2.0 License,并通过 `preview` dist-tag 发布。
3053
+ 版本:`0.3.4-preview`。BPMN Nova 只发布三个 `@bpmn-nova` 公共包,均使用 ESM、附带 TypeScript 声明、采用 Apache-2.0 License,并通过 `preview` dist-tag 发布。
2988
3054
 
2989
3055
  ## 公共包
2990
3056
 
@@ -2998,6 +3064,8 @@ createStudioShell({
2998
3064
 
2999
3065
  Core、Model、Renderer、Runtime、Theme、Properties、Node Presentation 和引擎 Profile 是源码内部 Module,不再是可独立安装或独立发布的产品。`NodeSubtitleResolver` 类型从 Studio 根入口公开,但 `node-presentation` 没有 npm 子路径或独立版本。React/Vue 各自只依赖完全相同版本的 `@bpmn-nova/studio`,并通过 peer dependency 使用宿主框架。
3000
3066
 
3067
+ React/Vue 的声明入口显式重导出宿主常用的 Core 类型:`BpmnEdge`、`BpmnNode`、`EdgeType`、`ElementSelection`、`EngineId`、`LayoutOptions`、`NodeType` 和 `ProcessModel`。业务项目必须从自己选择的 Adapter 导入这些类型,不应仅为类型在 manifest 中增加 Studio 直依赖。
3068
+
3001
3069
  ## Studio 子路径
3002
3070
 
3003
3071
  Studio 根入口重新导出稳定的完整能力;以下子路径用于让导入意图更清晰:
@@ -3085,14 +3153,14 @@ git diff --check
3085
3153
  发布后核对:
3086
3154
 
3087
3155
  ```bash
3088
- npm view @bpmn-nova/studio@0.3.3-preview version
3089
- npm view @bpmn-nova/react@0.3.3-preview version
3090
- npm view @bpmn-nova/vue@0.3.3-preview version
3156
+ npm view @bpmn-nova/studio@0.3.4-preview version
3157
+ npm view @bpmn-nova/react@0.3.4-preview version
3158
+ npm view @bpmn-nova/vue@0.3.4-preview version
3091
3159
  ```
3092
3160
 
3093
3161
  ## Registry 清理说明
3094
3162
 
3095
- Registry 清理是不可逆的外部操作,不由构建脚本自动执行。只有在三个 `0.3.3-preview` 新产物发布、安装和子路径验证均成功后,才能在获得单独明确授权的情况下执行:
3163
+ Registry 清理是不可逆的外部操作,不由构建脚本自动执行。只有在三个 `0.3.4-preview` 新产物发布、安装和子路径验证均成功后,才能在获得单独明确授权的情况下执行:
3096
3164
 
3097
3165
  1. 删除 Studio、React、Vue 的旧 `0.3.0-preview` 版本。
3098
3166
  2. 按反向依赖顺序删除旧的内部包:Designer/Viewer/Properties 聚合层,Renderer/Provider/Model 层,最后 Runtime/Theme/Core 等基础层。
package/llms.txt CHANGED
@@ -36,6 +36,20 @@ yarn add @bpmn-nova/vue@preview
36
36
 
37
37
  Replace `vue` with `react` or `studio` only when the selected framework branch requires it. Run one installation command, not all three.
38
38
 
39
+ In TypeScript host code, import shared BPMN model types from that same selected public package. Vue and React explicitly re-export `BpmnEdge`, `BpmnNode`, `EdgeType`, `ElementSelection`, `EngineId`, `LayoutOptions`, `NodeType`, and `ProcessModel`; do not add a direct Studio dependency only to obtain these types:
40
+
41
+ ```ts
42
+ import type {
43
+ BpmnNode,
44
+ EdgeType,
45
+ ElementSelection,
46
+ NodeType,
47
+ ProcessModel,
48
+ } from '@bpmn-nova/vue'
49
+ ```
50
+
51
+ Use `@bpmn-nova/react` instead in a React application.
52
+
39
53
  This step is complete when the application manifest contains exactly the selected direct BPMN Nova dependency and the package manager finishes without peer-dependency errors.
40
54
 
41
55
  ## 3. Select the visual Interface
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpmn-nova/vue",
3
- "version": "0.3.3-preview",
3
+ "version": "0.3.4-preview",
4
4
  "description": "Vue 3 components and composables for BPMN Nova Designer, Viewer, Studio, Palette and Properties.",
5
5
  "keywords": [
6
6
  "bpmn",
@@ -41,7 +41,7 @@
41
41
  "vue": ">=3.3"
42
42
  },
43
43
  "dependencies": {
44
- "@bpmn-nova/studio": "0.3.3-preview"
44
+ "@bpmn-nova/studio": "0.3.4-preview"
45
45
  },
46
46
  "engines": {
47
47
  "node": ">=18"