ice-entity-designer-dsl 0.0.7 → 0.0.8

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.
Files changed (2) hide show
  1. package/README.md +2 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -122,6 +122,7 @@ const result = ICEDSL.renderDsl('canvas', bpmn);
122
122
  // result.kind === 'bpmn'; result.designer is a BpmnDesigner
123
123
  result.designer.validateBpmn(); // 语义检查:每个池一个开始事件、顺序流不跨池…
124
124
  const xml = IED.toBpmnXml(result.designer); // BPMN 2.0 + BPMNDI(互操作格式,不是执行模型)
125
+ const svg = result.designer.toSvg(); // 矢量 SVG(与画布同一口径,放大不糊)
125
126
  ```
126
127
 
127
128
  Node kinds: `pool` / `lane` (containers), `task` (default), `event`, `gateway`,
@@ -140,6 +141,7 @@ intermediate / end) + `trigger`, gateways carry `gatewayType` (exclusive / paral
140
141
  - `compileBpmnDsl(dsl)` —— BPMN document → `FlowNode` / `FlowEdge` props (container auto-geometry + container-scoped auto-layout)
141
142
  - `layeredLayout(items, edges, options)` —— the shared layered layout (`direction: "vertical" | "horizontal"`)
142
143
  - `renderDsl(canvasOrId, dsl)` —— renders any kind, returns `{ kind, ice, designer }`
144
+ - Export: `result.designer.toSvg(options)` (flowchart / BPMN) or `IED.exportSvg(result.ice, options)`; `options` = `{ area: 'content' | 'viewport', padding, scale, background, includeTools }`. The SVG is regenerated from the component tree + path commands, so it matches the canvas (geometry, styles, opacity, shadows, link labels) and can be rasterised to PNG/PDF by any external tool.
143
145
  - `DSL_SCHEMA_VERSION`
144
146
 
145
147
  ## Example
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ice-entity-designer-dsl",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "A JSON-first DSL layer for AI agents to drive ice-entity-designer.",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -19,7 +19,7 @@
19
19
  "types:check": "tsc --noEmit"
20
20
  },
21
21
  "dependencies": {
22
- "ice-entity-designer": "^0.0.22"
22
+ "ice-entity-designer": "^0.0.23"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@babel/core": "7.17.8",