@bpmn-nova/react 0.3.2-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 +70 -3
- package/dist/index.d.ts +39 -2
- package/dist/index.js +47 -5
- package/dist/styles.css +4 -3
- package/llms-full.txt +367 -59
- package/llms.txt +33 -8
- package/package.json +2 -2
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
|
|
@@ -51,6 +65,8 @@ Choose the smallest Interface that owns the required experience:
|
|
|
51
65
|
|
|
52
66
|
Use `engine="flowable"` or `engine="activiti"` explicitly from the host workflow engine. Do not infer the engine from BPMN XML namespace declarations alone.
|
|
53
67
|
|
|
68
|
+
Studio modes are presentation state: `design` means editable process design, `viewer` means read-only process viewing, and `instance` means approval trace. Observe the actual Shell state through `subscribeMode()` or framework mode events; never store it in the BPMN model.
|
|
69
|
+
|
|
54
70
|
## 4. Mount a minimal integration
|
|
55
71
|
|
|
56
72
|
Every branch must import its own public `styles.css` exactly once and provide a height through the complete parent layout chain.
|
|
@@ -80,7 +96,7 @@ function handleChange(model, reason, xml) {
|
|
|
80
96
|
engine="flowable"
|
|
81
97
|
mode="design"
|
|
82
98
|
:allowed-edge-types="['sequenceFlow']"
|
|
83
|
-
:allowed-modes="['design']"
|
|
99
|
+
:allowed-modes="['design', 'viewer']"
|
|
84
100
|
theme="auto"
|
|
85
101
|
@change="handleChange"
|
|
86
102
|
/>
|
|
@@ -105,7 +121,7 @@ export function WorkflowEditor({ initialXml, saveDraft }) {
|
|
|
105
121
|
engine="flowable"
|
|
106
122
|
mode="design"
|
|
107
123
|
allowedEdgeTypes={['sequenceFlow']}
|
|
108
|
-
allowedModes={['design']}
|
|
124
|
+
allowedModes={['design', 'viewer']}
|
|
109
125
|
theme="auto"
|
|
110
126
|
onChange={(model, reason, xml) => saveDraft(xml)}
|
|
111
127
|
/>
|
|
@@ -132,7 +148,7 @@ const shell = createStudioShell({
|
|
|
132
148
|
container: document.querySelector('#workflow-studio'),
|
|
133
149
|
studio,
|
|
134
150
|
mode: 'design',
|
|
135
|
-
allowedModes: ['design'],
|
|
151
|
+
allowedModes: ['design', 'viewer'],
|
|
136
152
|
theme: 'auto',
|
|
137
153
|
})
|
|
138
154
|
|
|
@@ -172,17 +188,25 @@ This step is complete when the workbench is visible, the initial XML is rendered
|
|
|
172
188
|
<template #header-start="{ state, actions }">
|
|
173
189
|
<!-- Host back action, business icon, process name, and type -->
|
|
174
190
|
</template>
|
|
191
|
+
<template #header-actions="{ actions, mode }">
|
|
192
|
+
<!-- Host Validate / Save / Publish actions. Validation calls actions.validate(). -->
|
|
193
|
+
</template>
|
|
175
194
|
</BpmnStudio>
|
|
176
195
|
```
|
|
177
196
|
|
|
178
|
-
- Vue uses native `#header-start` / `#header` slots. React uses `headerStart` / `header` render props. Core uses
|
|
179
|
-
-
|
|
197
|
+
- Vue uses native `#header-start` / `#header-actions` / `#header` slots. React uses `headerStart` / `headerActions` / `header` render props. Core uses matching DOM Slots.
|
|
198
|
+
- Vue supports `v-model:mode` and `mode-change`; React supports `mode` and `onModeChange`. Framework Header contexts expose the actual reactive `mode`. Core Slots use `getMode()` / `subscribeMode()`.
|
|
199
|
+
- Header Start replaces only the Nova Brand. Header Actions replaces only the default Validate / Import / Export group, so a host can compose Validate / Save / Publish without rebuilding the editing tools. A complete Header replacement calls the public Actions Interface.
|
|
200
|
+
- `actions.validate()` updates Nova's default status summary before emitting a read-only validation result with `source: 'toolbar'`; `shell.validate()` and framework Handle/Expose methods use `source: 'api'`. Vue receives `validation`, React receives `onValidation`, and Core uses `subscribeValidation()`. `valid` means there are no errors; warnings do not block publishing by default.
|
|
201
|
+
- The default Header does not duplicate Fit; use the footer control or `fitView()`.
|
|
180
202
|
- `regions` can hide `header`, `left`, `right`, or `footer` without leaving an empty layout track. Prop changes update the existing Shell; do not rebuild the Canvas.
|
|
181
203
|
- Put a host-owned properties panel beside the Nova root. Use `selection-change` / `onSelectionChange` as its source of truth because it covers nodes, edges, multi-selection, clearing, and keyboard selection. Do not substitute `element-click` / `onElementClick`.
|
|
182
204
|
- Join host business configuration by stable BPMN element ID. Saving, publishing, authorization, upload, and server transactions remain host responsibilities.
|
|
183
205
|
- `theme="auto"` explicitly follows the system theme. The compatibility default remains `light`.
|
|
184
206
|
- Vue and React both export standalone `BpmnPalettePanel` for a fully custom layout. Pass the same external Studio Controller to Canvas, Palette, and Properties.
|
|
185
207
|
|
|
208
|
+
For a host-owned definition-time subtitle, pass `nodeSubtitleResolver` to Studio, Canvas, or Viewer. Return `undefined` for Nova's default subtitle, `null` to remove the row, or a string (including an empty string) as the override. After data inside a stable closure or Map changes, call `refreshPresentation()` on the component handle or Shell. This refresh must not be implemented by mutating a node, re-importing XML, or remounting the component. The resolver applies only to standard Design/Viewer task and container cards and standard SVG fallback; a complete custom renderer wins, and Instance runtime summaries are never overridden.
|
|
209
|
+
|
|
186
210
|
## 5. Keep model ownership deterministic
|
|
187
211
|
|
|
188
212
|
- Treat `xml` and `model` as external replacement inputs. Use the emitted/exported XML as the draft output.
|
|
@@ -195,9 +219,9 @@ This step is complete when edit, undo, redo, save, reload, and intentional exter
|
|
|
195
219
|
|
|
196
220
|
## 6. Add host constraints before business use
|
|
197
221
|
|
|
198
|
-
Production workflow applications usually support a subset of BPMN. Configure `allowedNodeTypes` and `allowedEdgeTypes` on the Studio Controller or framework `BpmnStudio`; these reject unsupported imported models and block node/edge creation outside the host contract. Configure matching Palette and Properties registries when the host needs custom labels or business fields.
|
|
222
|
+
Production workflow applications usually support a subset of BPMN. Configure `allowedNodeTypes` and `allowedEdgeTypes` on the Studio Controller or framework `BpmnStudio`; these reject unsupported imported models and block node/edge creation outside the host contract. The node allowlist filters Palette entries, but one allowed node type may still have multiple Palette presets. Configure matching Palette and Properties registries when the host needs custom labels or business fields.
|
|
199
223
|
|
|
200
|
-
Use `allowedModes` to expose only host-authorized workbench modes. Pass real Runtime data for instance mode; absence of Runtime data means no approval trace rather than demo business data.
|
|
224
|
+
Use `allowedModes` to expose only host-authorized workbench modes. Runtime changes use `setAllowedModes()` rather than rebuilding the Studio; invalid, empty, or duplicate lists are errors. Pass real Runtime data for instance mode; absence of Runtime data means no approval trace rather than demo business data.
|
|
201
225
|
|
|
202
226
|
Runtime snapshots store asset references only. The host supplies `runtimeAssetResolver`. BPMN Nova does not execute workflow engines, submit approvals, upload/store attachments, issue permissions, or export PNG/PDF.
|
|
203
227
|
|
|
@@ -212,10 +236,11 @@ Run the target application's existing non-destructive quality commands, includin
|
|
|
212
236
|
3. Create, connect, edit, delete, Undo, and Redo work in design mode.
|
|
213
237
|
4. Change output is persisted and reloads to the same process.
|
|
214
238
|
5. Intentional external XML replacement loads once and resets history once.
|
|
215
|
-
6. Disallowed node types are unavailable and rejected by import/creation commands; disallowed modes are not rendered and `setMode()`
|
|
239
|
+
6. Disallowed node types are unavailable and rejected by import/creation commands; disallowed modes are not rendered and `setMode()` returns `false` without changing state.
|
|
216
240
|
7. Theme changes update the existing instance.
|
|
217
241
|
8. Unmount/remount leaves no duplicate listeners, overlays, or framework instances.
|
|
218
242
|
9. Browser Console has no errors.
|
|
243
|
+
10. If a subtitle resolver is used, verify override, `undefined`, `null`, SVG parity, and that `refreshPresentation()` preserves XML, history, selection, scope, zoom, pan, theme, and mode. Verify Instance summaries are unchanged.
|
|
219
244
|
|
|
220
245
|
The installation is complete only when the package is present, the production build succeeds, and the relevant browser checks pass. Report any unverified branch explicitly.
|
|
221
246
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpmn-nova/react",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4-preview",
|
|
4
4
|
"description": "React components and hooks for BPMN Nova Designer, Viewer, Studio and Properties.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bpmn",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"react-dom": ">=18"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@bpmn-nova/studio": "0.3.
|
|
45
|
+
"@bpmn-nova/studio": "0.3.4-preview"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
48
|
"node": ">=18"
|