@bpmnkit/canvas 0.0.16 → 0.0.21

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
@@ -6,6 +6,8 @@
6
6
  [![npm](https://img.shields.io/npm/v/@bpmnkit/canvas?style=flat-square&color=6244d7)](https://www.npmjs.com/package/@bpmnkit/canvas)
7
7
  [![license](https://img.shields.io/npm/l/@bpmnkit/canvas?style=flat-square)](https://github.com/bpmnkit/monorepo/blob/main/LICENSE)
8
8
  [![typescript](https://img.shields.io/badge/TypeScript-strict-6244d7?style=flat-square&logo=typescript&logoColor=white)](https://github.com/bpmnkit/monorepo)
9
+ [![ai-assisted](https://img.shields.io/badge/AI--assisted-claude-8b5cf6?style=flat-square)](https://github.com/bpmnkit/monorepo)
10
+ [![experimental](https://img.shields.io/badge/status-experimental-f59e0b?style=flat-square)](https://github.com/bpmnkit/monorepo)
9
11
 
10
12
  [Website](https://bpmnkit.com) · [Documentation](https://docs.bpmnkit.com) · [GitHub](https://github.com/bpmnkit/monorepo) · [Changelog](https://github.com/bpmnkit/monorepo/blob/main/packages/canvas/CHANGELOG.md)
11
13
  </div>
@@ -126,6 +128,8 @@ const myPlugin: CanvasPlugin = {
126
128
  | [`@bpmnkit/connector-gen`](https://www.npmjs.com/package/@bpmnkit/connector-gen) | Generate connector templates from OpenAPI specs |
127
129
  | [`@bpmnkit/cli`](https://www.npmjs.com/package/@bpmnkit/cli) | Camunda 8 command-line interface (casen) |
128
130
  | [`@bpmnkit/proxy`](https://www.npmjs.com/package/@bpmnkit/proxy) | Local AI bridge and Camunda API proxy server |
131
+ | [`@bpmnkit/patterns`](https://www.npmjs.com/package/@bpmnkit/patterns) | Domain process patterns for BPMNKit AIKit |
132
+ | [`@bpmnkit/worker-client`](https://www.npmjs.com/package/@bpmnkit/worker-client) | Thin Zeebe REST client for standalone workers |
129
133
  | [`@bpmnkit/cli-sdk`](https://www.npmjs.com/package/@bpmnkit/cli-sdk) | Plugin authoring SDK for the casen CLI |
130
134
  | [`@bpmnkit/create-casen-plugin`](https://www.npmjs.com/package/@bpmnkit/create-casen-plugin) | Scaffold a new casen CLI plugin in seconds |
131
135
  | [`@bpmnkit/casen-report`](https://www.npmjs.com/package/@bpmnkit/casen-report) | HTML reports from Camunda 8 incident and SLA data |
package/dist/renderer.js CHANGED
@@ -203,14 +203,24 @@ function gatewayMarker(type) {
203
203
  }
204
204
  }
205
205
  // ── Sub-process bottom markers ────────────────────────────────────────────────
206
- function subProcessMarker(type) {
206
+ function subProcessMarker(type, multiInstance) {
207
+ let base;
207
208
  if (type === "adHocSubProcess") {
208
- // Tilde (~) for ad-hoc
209
- return `<path d="M-7 0Q-4 -4 0 0Q4 4 7 0" class="bpmnkit-icon"/>`;
209
+ base = `<path d="M-7 0Q-4 -4 0 0Q4 4 7 0" class="bpmnkit-icon"/>`;
210
210
  }
211
- // Standard expand marker: + in a small box
212
- return `<rect x="-7" y="-7" width="14" height="14" rx="1" class="bpmnkit-icon"/>
211
+ else {
212
+ base = `<rect x="-7" y="-7" width="14" height="14" rx="1" class="bpmnkit-icon"/>
213
213
  <path d="M0 -4v8M-4 0h8" class="bpmnkit-icon"/>`;
214
+ }
215
+ if (multiInstance === "sequential") {
216
+ // Three horizontal lines ≡ (sequential)
217
+ base += `<g transform="translate(16 0)"><path d="M-4 -4h8M-4 0h8M-4 4h8" class="bpmnkit-icon"/></g>`;
218
+ }
219
+ else if (multiInstance === "parallel") {
220
+ // Three vertical lines ||| (parallel)
221
+ base += `<g transform="translate(16 0)"><path d="M-4 -4v8M0 -4v8M4 -4v8" class="bpmnkit-icon"/></g>`;
222
+ }
223
+ return base;
214
224
  }
215
225
  function buildIndex(defs) {
216
226
  const elements = new Map();
@@ -393,9 +403,11 @@ function renderTask(shape, el, instanceId) {
393
403
  el?.type === "adHocSubProcess" ||
394
404
  el?.type === "eventSubProcess" ||
395
405
  el?.type === "transaction") {
406
+ const lc = "loopCharacteristics" in el ? el.loopCharacteristics : undefined;
407
+ const multiInstance = lc ? (lc.isSequential ? "sequential" : "parallel") : undefined;
396
408
  const markerG = svgEl("g");
397
409
  attr(markerG, { transform: `translate(${width / 2} ${height - 10})` });
398
- markerG.innerHTML = subProcessMarker(el.type);
410
+ markerG.innerHTML = subProcessMarker(el.type, multiInstance);
399
411
  g.appendChild(markerG);
400
412
  }
401
413
  const label = el?.name ?? el?.type ?? "task";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpmnkit/canvas",
3
- "version": "0.0.16",
3
+ "version": "0.0.21",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -17,7 +17,7 @@
17
17
  "dist/**/*.d.ts"
18
18
  ],
19
19
  "dependencies": {
20
- "@bpmnkit/core": "0.0.16"
20
+ "@bpmnkit/core": "0.0.21"
21
21
  },
22
22
  "description": "Zero-dependency SVG BPMN viewer with pan/zoom, theming, and a plugin API",
23
23
  "keywords": [