ice-entity-designer-dsl 0.0.12 → 0.0.14
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 +8 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -31,6 +31,10 @@ The package contains:
|
|
|
31
31
|
- browser examples with a JSON editor (`examples/entity-editor-dsl.html`,
|
|
32
32
|
`examples/flowchart-dsl.html`, `examples/bpmn-dsl.html`, `examples/uml-dsl.html`,
|
|
33
33
|
`examples/statechart-dsl.html`, `examples/gantt-dsl.html`)
|
|
34
|
+
- the four new diagram examples (BPMN / UML / statechart / gantt) share
|
|
35
|
+
`examples/canvas-interactions.js`: canvas fills the preview pane, wheel zooms at the
|
|
36
|
+
cursor (`ICE.zoomAt`), dragging blank space (or any middle-button drag) pans, plus
|
|
37
|
+
「适应视图 / 复位视图」 buttons
|
|
34
38
|
|
|
35
39
|
## Install
|
|
36
40
|
|
|
@@ -159,12 +163,14 @@ const result = ICEDSL.renderDsl('canvas', plan);
|
|
|
159
163
|
// result.kind === 'gantt'; result.designer is a GanttDesigner
|
|
160
164
|
result.designer.validateGantt(); // 依赖成环 / 进度越界 / 天数非法 / 资源冲突
|
|
161
165
|
result.designer.autoSchedule(); // 自动排程:按依赖推到「前置结束之后」(只推后不提前)
|
|
162
|
-
result.designer.criticalPath(); //
|
|
166
|
+
result.designer.criticalPath(); // 关键路径(按「尽早排」归一化算浮时)
|
|
163
167
|
result.designer.toSvg(); // 矢量导出(含日期刻度与进度)
|
|
164
168
|
```
|
|
165
169
|
|
|
166
170
|
`options.autoSchedule: true` 可以让**渲染时**就按依赖把排期推到最早可行(文档里写的日期当作下界),
|
|
167
171
|
`resource` 字段用于资源冲突检查(同一负责人时间重叠会在 `validateGantt()` 里报出)。
|
|
172
|
+
关键路径用 CPM 的标准口径:有前置的任务由前置的最早完工决定,没有前置的才以自身日期为锚,
|
|
173
|
+
所以末端任务的日期被手写得很晚、或者刚跑完 `autoSchedule()`,链路判定都不会退化成单个任务。
|
|
168
174
|
|
|
169
175
|
Fields: `start` (`YYYY-MM-DD`, required), `days` (default 1), `progress` (0..1, default 0),
|
|
170
176
|
`row` (defaults to declaration order). **Do not invent coordinates** — the timeline is derived;
|
|
@@ -259,6 +265,7 @@ intermediate / end) + `trigger`, gateways carry `gatewayType` (exclusive / paral
|
|
|
259
265
|
Open `examples/entity-editor-dsl.html` (ER), `examples/flowchart-dsl.html`
|
|
260
266
|
(flowchart), `examples/bpmn-dsl.html` (BPMN), `examples/uml-dsl.html` (UML),
|
|
261
267
|
`examples/statechart-dsl.html` (statechart) or `examples/gantt-dsl.html` (gantt) after building.
|
|
268
|
+
渲染结果可以滚轮缩放、空白处拖拽平移,工具栏还有「适应视图 / 复位视图」。
|
|
262
269
|
|
|
263
270
|
## Agent discovery
|
|
264
271
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ice-entity-designer-dsl",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
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
|
+
"ice-entity-designer": "^0.0.29"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@babel/core": "7.17.8",
|