@next-bricks/diagram 0.68.8 → 0.68.9

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 (35) hide show
  1. package/dist/bricks.json +3 -3
  2. package/dist/chunks/1265.177053f1.js +3 -0
  3. package/dist/chunks/1265.177053f1.js.map +1 -0
  4. package/dist/chunks/577.c9c65352.js.map +1 -1
  5. package/dist/chunks/editable-label.667b04d5.js.map +1 -1
  6. package/dist/chunks/eo-diagram.78450578.js.map +1 -1
  7. package/dist/chunks/eo-display-canvas.2a43ce91.js.map +1 -1
  8. package/dist/chunks/eo-draw-canvas.e01342d6.js.map +1 -1
  9. package/dist/chunks/experimental-node.2f4d802a.js.map +1 -1
  10. package/dist/chunks/{main.4630d30e.js → main.9ba966bb.js} +2 -2
  11. package/dist/chunks/{main.4630d30e.js.map → main.9ba966bb.js.map} +1 -1
  12. package/dist/examples.json +10 -7
  13. package/dist/{index.c366c6da.js → index.31ee50ee.js} +2 -2
  14. package/dist/{index.c366c6da.js.map → index.31ee50ee.js.map} +1 -1
  15. package/dist/manifest.json +359 -220
  16. package/dist/types.json +5654 -5654
  17. package/dist-types/diagram/index.d.ts +48 -1
  18. package/dist-types/display-canvas/index.d.ts +37 -3
  19. package/dist-types/draw-canvas/index.d.ts +73 -5
  20. package/dist-types/editable-label/index.d.ts +14 -1
  21. package/dist-types/experimental-node/index.d.ts +11 -1
  22. package/docs/editable-label.md +71 -1
  23. package/docs/editable-label.react.md +100 -0
  24. package/docs/eo-diagram.md +54 -87
  25. package/docs/eo-diagram.react.md +399 -0
  26. package/docs/eo-display-canvas.md +60 -21
  27. package/docs/eo-display-canvas.react.md +376 -0
  28. package/docs/eo-draw-canvas.md +95 -40
  29. package/docs/eo-draw-canvas.react.md +989 -0
  30. package/docs/experimental-node.md +156 -0
  31. package/docs/experimental-node.react.md +157 -0
  32. package/package.json +2 -2
  33. package/dist/chunks/1265.55a02b5a.js +0 -3
  34. package/dist/chunks/1265.55a02b5a.js.map +0 -1
  35. /package/dist/chunks/{1265.55a02b5a.js.LICENSE.txt → 1265.177053f1.js.LICENSE.txt} +0 -0
@@ -3,46 +3,6 @@
3
3
  "package": "@next-bricks/diagram",
4
4
  "name": "diagram",
5
5
  "bricks": [
6
- {
7
- "name": "diagram.editable-label",
8
- "properties": [
9
- {
10
- "name": "label",
11
- "type": "string"
12
- },
13
- {
14
- "name": "type",
15
- "type": "LabelType"
16
- },
17
- {
18
- "name": "readOnly",
19
- "type": "boolean"
20
- }
21
- ],
22
- "events": [
23
- {
24
- "name": "label.editing.change",
25
- "detail": {
26
- "type": "boolean"
27
- }
28
- },
29
- {
30
- "name": "label.change",
31
- "detail": {
32
- "type": "string"
33
- }
34
- }
35
- ],
36
- "slots": [],
37
- "methods": [
38
- {
39
- "name": "enableEditing",
40
- "params": []
41
- }
42
- ],
43
- "parts": [],
44
- "description": "构件 `diagram.editable-label`"
45
- },
46
6
  {
47
7
  "name": "eo-diagram",
48
8
  "properties": [
@@ -54,65 +14,78 @@
54
14
  },
55
15
  {
56
16
  "name": "nodes",
17
+ "description": "",
57
18
  "attribute": false,
58
19
  "type": "DiagramNode[]"
59
20
  },
60
21
  {
61
22
  "name": "edges",
23
+ "description": "",
62
24
  "attribute": false,
63
25
  "type": "DiagramEdge[]"
64
26
  },
65
27
  {
66
28
  "name": "nodeBricks",
29
+ "description": "",
67
30
  "attribute": false,
68
31
  "type": "NodeBrickConf[]"
69
32
  },
70
33
  {
71
34
  "name": "lines",
35
+ "description": "",
72
36
  "attribute": false,
73
37
  "type": "LineConf[]"
74
38
  },
75
39
  {
76
40
  "name": "layoutOptions",
41
+ "description": "",
77
42
  "attribute": false,
78
43
  "type": "LayoutOptions"
79
44
  },
80
45
  {
81
46
  "name": "activeTarget",
47
+ "description": "",
82
48
  "attribute": false,
83
49
  "type": "ActiveTarget | null"
84
50
  },
85
51
  {
86
52
  "name": "disableKeyboardAction",
53
+ "description": "",
87
54
  "type": "boolean"
88
55
  },
89
56
  {
90
57
  "name": "connectNodes",
58
+ "description": "",
91
59
  "attribute": false,
92
60
  "type": "ConnectNodesOptions"
93
61
  },
94
62
  {
95
63
  "name": "dragNodes",
64
+ "description": "",
96
65
  "attribute": false,
97
66
  "type": "DragNodesOptions"
98
67
  },
99
68
  {
100
69
  "name": "zoomable",
101
- "type": "boolean",
102
- "default": "true"
70
+ "description": "",
71
+ "default": "true",
72
+ "type": "boolean"
103
73
  },
104
74
  {
105
75
  "name": "scrollable",
106
- "type": "boolean",
107
- "default": "true"
76
+ "description": "",
77
+ "default": "true",
78
+ "type": "boolean"
108
79
  },
109
80
  {
110
81
  "name": "pannable",
111
- "type": "boolean",
112
- "default": "true"
82
+ "description": "",
83
+ "default": "true",
84
+ "type": "boolean"
113
85
  },
114
86
  {
115
87
  "name": "scaleRange",
88
+ "description": "",
116
89
  "attribute": false,
117
90
  "type": "RangeTuple"
118
91
  }
@@ -120,37 +93,49 @@
120
93
  "events": [
121
94
  {
122
95
  "name": "activeTarget.change",
96
+ "description": "",
123
97
  "detail": {
98
+ "description": "`ActiveTarget | null` — 当前激活目标,`{ type: \"node\", nodeId }` 或 `{ type: \"edge\", edge }` 或 null",
124
99
  "type": "ActiveTarget | null"
125
100
  }
126
101
  },
127
102
  {
128
103
  "name": "node.delete",
104
+ "description": "",
129
105
  "detail": {
106
+ "description": "`DiagramNode` — 被删除的节点对象,包含节点 id 及其他自定义字段",
130
107
  "type": "DiagramNode"
131
108
  }
132
109
  },
133
110
  {
134
111
  "name": "edge.delete",
112
+ "description": "",
135
113
  "detail": {
114
+ "description": "`DiagramEdge` — 被删除的边对象,包含 source、target 及其他自定义字段",
136
115
  "type": "DiagramEdge"
137
116
  }
138
117
  },
139
118
  {
140
119
  "name": "line.click",
120
+ "description": "",
141
121
  "detail": {
122
+ "description": "`LineTarget` — 被点击的连线信息,包含 `{ id: 连线唯一标识, edge: 对应的边数据 }`",
142
123
  "type": "LineTarget"
143
124
  }
144
125
  },
145
126
  {
146
127
  "name": "line.dblclick",
128
+ "description": "",
147
129
  "detail": {
130
+ "description": "`LineTarget` — 被双击的连线信息,包含 `{ id: 连线唯一标识, edge: 对应的边数据 }`",
148
131
  "type": "LineTarget"
149
132
  }
150
133
  },
151
134
  {
152
135
  "name": "nodes.connect",
136
+ "description": "",
153
137
  "detail": {
138
+ "description": "`ConnectLineDetail` — 连线详情,包含 `{ source: 起始节点, target: 目标节点 }`",
154
139
  "type": "ConnectLineDetail"
155
140
  }
156
141
  }
@@ -162,217 +147,95 @@
162
147
  "params": [
163
148
  {
164
149
  "name": "id",
150
+ "description": "连线标签的 id(格式通常为 `${lineId}-${placement}`)",
165
151
  "type": "string"
166
152
  },
167
153
  {
168
154
  "name": "method",
155
+ "description": "要调用的方法名",
169
156
  "type": "string"
170
157
  },
171
158
  {
172
- "name": "param_3",
159
+ "name": "args",
160
+ "description": "传递给方法的参数列表",
173
161
  "type": "unknown[]"
174
162
  }
175
- ]
176
- }
177
- ],
178
- "parts": [],
179
- "description": "构件 `eo-diagram`"
180
- },
181
- {
182
- "name": "diagram.experimental-node",
183
- "properties": [
184
- {
185
- "name": "usage",
186
- "type": "ExperimentalUsage"
187
- },
188
- {
189
- "name": "status",
190
- "type": "NodeStatus"
191
- },
192
- {
193
- "name": "decorator",
194
- "type": "DecoratorType"
195
- }
196
- ],
197
- "events": [
198
- {
199
- "name": "drag.start",
200
- "detail": {
201
- "type": "PositionTuple"
202
- }
203
- },
204
- {
205
- "name": "drag.move",
206
- "detail": {
207
- "type": "PositionTuple"
208
- }
209
- },
210
- {
211
- "name": "drag.end",
212
- "detail": {
213
- "type": "PositionTuple"
214
- }
163
+ ],
164
+ "description": "",
165
+ "returns": {}
215
166
  }
216
167
  ],
217
- "slots": [],
218
- "methods": [],
219
168
  "parts": [],
220
- "description": "构件 `diagram.experimental-node`"
169
+ "description": "",
170
+ "category": "diagram"
221
171
  },
222
172
  {
223
- "name": "eo-display-canvas",
173
+ "name": "diagram.editable-label",
224
174
  "properties": [
225
175
  {
226
- "name": "cells",
227
- "description": "用于查看的画布可以更新 `cells` 属性。",
228
- "attribute": false,
229
- "type": "InitialCell[]"
230
- },
231
- {
232
- "name": "layout",
233
- "type": "LayoutType"
234
- },
235
- {
236
- "name": "layoutOptions",
237
- "attribute": false,
238
- "type": "LayoutOptions"
239
- },
240
- {
241
- "name": "autoSize",
242
- "attribute": false,
243
- "type": "AutoSize"
244
- },
245
- {
246
- "name": "defaultNodeSize",
247
- "attribute": false,
248
- "type": "SizeTuple",
249
- "default": "[DEFAULT_NODE_SIZE, DEFAULT_NODE_SIZE]"
250
- },
251
- {
252
- "name": "defaultNodeBricks",
253
- "attribute": false,
254
- "type": "NodeBrickConf[]"
255
- },
256
- {
257
- "name": "degradedThreshold",
258
- "description": "当节点数量达到或超过 `degradedThreshold` 时,节点将被降级展示。",
259
- "default": "500",
260
- "type": "number"
261
- },
262
- {
263
- "name": "degradedNodeLabel",
264
- "description": "设置节点将降级展示时显示的名称。",
265
- "default": "\"<% DATA.node.id %>\"",
266
- "attribute": false,
176
+ "name": "label",
177
+ "description": "",
267
178
  "type": "string"
268
179
  },
269
180
  {
270
- "name": "defaultEdgeLines",
271
- "description": "使用条件判断设置默认的边对应的连线。在 `if` 表达式中 `DATA` 为 `{ edge }`,例如:\n\n```yaml\ndefaultEdgeLines:\n - if: <% DATA.edge.data?.virtual %>\n dashed: true\n```",
272
- "attribute": false,
273
- "type": "EdgeLineConf[]"
274
- },
275
- {
276
- "name": "activeTarget",
277
- "attribute": false,
278
- "type": "ActiveTarget | null"
279
- },
280
- {
281
- "name": "fadeUnrelatedCells",
282
- "description": "当鼠标悬浮到某节点上时,隐藏其他跟该节点无关的元素。",
283
- "type": "boolean"
284
- },
285
- {
286
- "name": "zoomable",
287
- "type": "boolean",
288
- "default": "true"
289
- },
290
- {
291
- "name": "scrollable",
292
- "type": "boolean",
293
- "default": "true"
294
- },
295
- {
296
- "name": "pannable",
297
- "type": "boolean",
298
- "default": "true"
299
- },
300
- {
301
- "name": "scaleRange",
302
- "attribute": false,
303
- "type": "RangeTuple"
304
- },
305
- {
306
- "name": "hideZoomBar",
307
- "description": "隐藏右下角放大缩小的控制栏",
308
- "type": "boolean"
309
- },
310
- {
311
- "name": "autoCenterWhenCellsChange",
312
- "description": "每当 cells 改变时,重新自动居中",
313
- "type": "boolean"
314
- },
315
- {
316
- "name": "doNotResetActiveTargetForSelector",
317
- "description": "选择器,点击该选择器对应的元素时不重置 `activeTarget`。",
318
- "type": "string"
181
+ "name": "type",
182
+ "description": "",
183
+ "type": "LabelType"
319
184
  },
320
185
  {
321
- "name": "doNotResetActiveTargetOutsideCanvas",
322
- "description": "在画布外点击时不重置 `activeTarget`。",
186
+ "name": "readOnly",
187
+ "description": "",
323
188
  "type": "boolean"
324
- },
325
- {
326
- "name": "extraStyleTexts",
327
- "attribute": false,
328
- "type": "string[]"
329
189
  }
330
190
  ],
331
191
  "events": [
332
192
  {
333
- "name": "activeTarget.change",
334
- "detail": {
335
- "type": "ActiveTarget | null"
336
- }
337
- },
338
- {
339
- "name": "cell.contextmenu",
193
+ "name": "label.editing.change",
194
+ "description": "",
340
195
  "detail": {
341
- "type": "CellContextMenuDetail"
196
+ "description": "`boolean` — 当前是否处于编辑状态,true 表示正在编辑,false 表示结束编辑",
197
+ "type": "boolean"
342
198
  }
343
199
  },
344
200
  {
345
- "name": "cell.click",
201
+ "name": "label.change",
202
+ "description": "",
346
203
  "detail": {
347
- "type": "CellContextMenuDetail"
204
+ "description": "`string` — 编辑完成后的新标签文本",
205
+ "type": "string"
348
206
  }
349
207
  }
350
208
  ],
351
209
  "slots": [],
352
210
  "methods": [
353
211
  {
354
- "name": "center",
355
- "params": []
212
+ "name": "enableEditing",
213
+ "params": [],
214
+ "description": "",
215
+ "returns": {}
356
216
  }
357
217
  ],
358
218
  "parts": [],
359
- "description": "用于展示查看的画布。"
219
+ "description": "",
220
+ "category": "diagram"
360
221
  },
361
222
  {
362
223
  "name": "eo-draw-canvas",
363
224
  "properties": [
364
225
  {
365
226
  "name": "cells",
366
- "description": "仅当初始化时使用,渲染后重新设置 `cells` 将无效。",
227
+ "description": "",
367
228
  "attribute": false,
368
229
  "type": "InitialCell[]"
369
230
  },
370
231
  {
371
232
  "name": "layout",
233
+ "description": "",
372
234
  "type": "LayoutType"
373
235
  },
374
236
  {
375
237
  "name": "layoutOptions",
238
+ "description": "",
376
239
  "attribute": false,
377
240
  "type": "LayoutOptions"
378
241
  },
@@ -385,6 +248,7 @@
385
248
  },
386
249
  {
387
250
  "name": "defaultNodeBricks",
251
+ "description": "",
388
252
  "attribute": false,
389
253
  "type": "NodeBrickConf[]"
390
254
  },
@@ -409,33 +273,38 @@
409
273
  },
410
274
  {
411
275
  "name": "activeTarget",
276
+ "description": "",
412
277
  "attribute": false,
413
278
  "type": "ActiveTarget | null"
414
279
  },
415
280
  {
416
281
  "name": "fadeUnrelatedCells",
417
- "description": "当 `activeTarget` 不为 `null` 时,隐藏其他跟该 `activeTarget` 无关的元素。",
282
+ "description": "",
418
283
  "type": "boolean"
419
284
  },
420
285
  {
421
286
  "name": "zoomable",
422
- "type": "boolean",
423
- "default": "true"
287
+ "description": "",
288
+ "default": "true",
289
+ "type": "boolean"
424
290
  },
425
291
  {
426
292
  "name": "scrollable",
427
- "type": "boolean",
428
- "default": "true"
293
+ "description": "",
294
+ "default": "true",
295
+ "type": "boolean"
429
296
  },
430
297
  {
431
298
  "name": "pannable",
432
- "type": "boolean",
433
- "default": "true"
299
+ "description": "",
300
+ "default": "true",
301
+ "type": "boolean"
434
302
  },
435
303
  {
436
304
  "name": "allowEdgeToArea",
437
- "type": "boolean",
438
- "default": "false"
305
+ "description": "",
306
+ "default": "false",
307
+ "type": "boolean"
439
308
  },
440
309
  {
441
310
  "name": "dragBehavior",
@@ -451,16 +320,19 @@
451
320
  },
452
321
  {
453
322
  "name": "scaleRange",
323
+ "description": "",
454
324
  "attribute": false,
455
325
  "type": "RangeTuple"
456
326
  },
457
327
  {
458
328
  "name": "lineSettings",
329
+ "description": "",
459
330
  "attribute": false,
460
331
  "type": "LineSettings"
461
332
  },
462
333
  {
463
334
  "name": "lineConnector",
335
+ "description": "",
464
336
  "attribute": false,
465
337
  "type": "LineConnecterConf | boolean"
466
338
  },
@@ -478,7 +350,9 @@
478
350
  "events": [
479
351
  {
480
352
  "name": "activeTarget.change",
353
+ "description": "",
481
354
  "detail": {
355
+ "description": "`ActiveTarget | null` — 当前激活目标,节点/边/装饰器对象或 null",
482
356
  "type": "ActiveTarget | null"
483
357
  }
484
358
  },
@@ -487,24 +361,31 @@
487
361
  "description": "",
488
362
  "deprecated": "Use `cell.move` instead.",
489
363
  "detail": {
364
+ "description": "`MoveCellPayload` — 移动的节点信息,包含节点 id 和新位置",
490
365
  "type": "MoveCellPayload"
491
366
  }
492
367
  },
493
368
  {
494
369
  "name": "cell.move",
370
+ "description": "",
495
371
  "detail": {
372
+ "description": "`MoveCellPayload` — 移动的单元格信息,包含单元格 id、类型和新位置",
496
373
  "type": "MoveCellPayload"
497
374
  }
498
375
  },
499
376
  {
500
377
  "name": "cells.move",
378
+ "description": "",
501
379
  "detail": {
380
+ "description": "`MoveCellPayload[]` — 移动的多个单元格信息列表",
502
381
  "type": "MoveCellPayload[]"
503
382
  }
504
383
  },
505
384
  {
506
385
  "name": "cell.resize",
386
+ "description": "",
507
387
  "detail": {
388
+ "description": "`ResizeCellPayload` — 调整大小的单元格信息,包含单元格 id 和新尺寸",
508
389
  "type": "ResizeCellPayload"
509
390
  }
510
391
  },
@@ -513,100 +394,127 @@
513
394
  "description": "",
514
395
  "deprecated": "Use `cell.delete` instead.",
515
396
  "detail": {
397
+ "description": "`Cell` — 被删除的节点 cell 对象",
516
398
  "type": "Cell"
517
399
  }
518
400
  },
519
401
  {
520
402
  "name": "cell.delete",
403
+ "description": "",
521
404
  "detail": {
405
+ "description": "`Cell` — 被删除的单元格对象,包含节点、边或装饰器",
522
406
  "type": "Cell"
523
407
  }
524
408
  },
525
409
  {
526
410
  "name": "cells.delete",
411
+ "description": "",
527
412
  "detail": {
413
+ "description": "`Cell[]` — 被批量删除的单元格对象列表",
528
414
  "type": "Cell[]"
529
415
  }
530
416
  },
531
417
  {
532
418
  "name": "cell.contextmenu",
419
+ "description": "",
533
420
  "detail": {
421
+ "description": "`CellContextMenuDetail` — 右键菜单详情,包含 `{ cell: 对应的单元格, clientX: 鼠标X坐标, clientY: 鼠标Y坐标 }`",
534
422
  "type": "CellContextMenuDetail"
535
423
  }
536
424
  },
537
425
  {
538
426
  "name": "edge.add",
539
- "description": "通过画布绘图的方式添加边(手动调用 `addEdge` 方法不会触发该事件)。",
427
+ "description": "",
540
428
  "detail": {
429
+ "description": "`ConnectNodesDetail` — 新边详情,包含 `{ source: 起始节点 id, target: 目标节点 id }`",
541
430
  "type": "ConnectNodesDetail"
542
431
  }
543
432
  },
544
433
  {
545
434
  "name": "edge.view.change",
435
+ "description": "",
546
436
  "detail": {
437
+ "description": "`EdgeViewChangePayload` — 边视图变更详情,包含边 id 和新的视图属性",
547
438
  "type": "EdgeViewChangePayload"
548
439
  }
549
440
  },
550
441
  {
551
442
  "name": "decorator.view.change",
443
+ "description": "",
552
444
  "detail": {
445
+ "description": "`DecoratorViewChangePayload` — 装饰器视图变更详情,包含装饰器 id 和新的位置/尺寸",
553
446
  "type": "DecoratorViewChangePayload"
554
447
  }
555
448
  },
556
449
  {
557
450
  "name": "decorator.text.change",
451
+ "description": "",
558
452
  "detail": {
453
+ "description": "`DecoratorTextChangeDetail` — 文本变更详情,包含装饰器 id 和新的文本内容",
559
454
  "type": "DecoratorTextChangeDetail"
560
455
  }
561
456
  },
562
457
  {
563
458
  "name": "node.container.change",
564
- "description": "node节点跟容器组关系改变事件,有containerCell是新增关系,否则删除关系",
459
+ "description": "",
565
460
  "detail": {
461
+ "description": "`MoveCellPayload[]` — 节点与容器关系变更详情列表,有 containerCell 则为新增关系,否则为删除关系",
566
462
  "type": "MoveCellPayload[]"
567
463
  }
568
464
  },
569
465
  {
570
466
  "name": "decorator.group.plus.click",
571
- "description": "分组容器点击加号事件,传入的参数为分组容器cell",
467
+ "description": "",
572
468
  "detail": {
469
+ "description": "`DecoratorCell` — 被点击加号按钮的分组容器 cell 对象",
573
470
  "type": "DecoratorCell"
574
471
  }
575
472
  },
576
473
  {
577
474
  "name": "scale.change",
578
- "description": "缩放变化后,从素材库拖拽元素进画布时,拖拽图像应设置对应的缩放比例。",
475
+ "description": "",
579
476
  "detail": {
477
+ "description": "`number` — 当前缩放比例值(如 1.0 表示 100%)",
580
478
  "type": "number"
581
479
  }
582
480
  },
583
481
  {
584
482
  "name": "canvas.contextmenu",
483
+ "description": "",
585
484
  "detail": {
485
+ "description": "`CanvasContextMenuDetail` — 右键菜单详情,包含 `{ clientX: 鼠标X坐标, clientY: 鼠标Y坐标, view: 画布坐标 { x, y } }`",
586
486
  "type": "CanvasContextMenuDetail"
587
487
  }
588
488
  },
589
489
  {
590
490
  "name": "canvas.copy",
491
+ "description": "",
591
492
  "detail": {
493
+ "description": "`void`",
592
494
  "type": "void"
593
495
  }
594
496
  },
595
497
  {
596
498
  "name": "canvas.paste",
499
+ "description": "",
597
500
  "detail": {
501
+ "description": "`void`",
598
502
  "type": "void"
599
503
  }
600
504
  },
601
505
  {
602
506
  "name": "canvas.group",
507
+ "description": "",
603
508
  "detail": {
509
+ "description": "`void`",
604
510
  "type": "void"
605
511
  }
606
512
  },
607
513
  {
608
514
  "name": "canvas.ungroup",
515
+ "description": "",
609
516
  "detail": {
517
+ "description": "`void`",
610
518
  "type": "void"
611
519
  }
612
520
  }
@@ -617,11 +525,14 @@
617
525
  "name": "dropNode",
618
526
  "params": [
619
527
  {
620
- "name": "param_1",
528
+ "name": "info",
529
+ "description": "拖放节点信息,包含节点 id、拖放位置(clientX/clientY)、尺寸和数据",
621
530
  "type": "DropNodeInfo"
622
531
  }
623
532
  ],
533
+ "description": "",
624
534
  "returns": {
535
+ "description": "成功时返回创建的 NodeCell,否则返回 null",
625
536
  "type": "Promise<NodeCell | null>"
626
537
  }
627
538
  },
@@ -629,11 +540,14 @@
629
540
  "name": "dropDecorator",
630
541
  "params": [
631
542
  {
632
- "name": "param_1",
543
+ "name": "info",
544
+ "description": "拖放装饰器信息,包含装饰器类型、拖放位置、文本和方向等",
633
545
  "type": "DropDecoratorInfo"
634
546
  }
635
547
  ],
548
+ "description": "",
636
549
  "returns": {
550
+ "description": "成功时返回创建的 DecoratorCell,否则返回 null",
637
551
  "type": "Promise<DecoratorCell | null>"
638
552
  }
639
553
  },
@@ -642,10 +556,13 @@
642
556
  "params": [
643
557
  {
644
558
  "name": "nodes",
559
+ "description": "要添加的节点信息列表,每项包含 id、数据、尺寸等",
645
560
  "type": "AddNodeInfo[]"
646
561
  }
647
562
  ],
563
+ "description": "",
648
564
  "returns": {
565
+ "description": "创建的 NodeCell 列表",
649
566
  "type": "Promise<NodeCell[]>"
650
567
  }
651
568
  },
@@ -653,11 +570,14 @@
653
570
  "name": "addEdge",
654
571
  "params": [
655
572
  {
656
- "name": "param_1",
573
+ "name": "info",
574
+ "description": "边信息,包含 source(起始节点 id)、target(目标节点 id)和可选的 data",
657
575
  "type": "AddEdgeInfo"
658
576
  }
659
577
  ],
578
+ "description": "",
660
579
  "returns": {
580
+ "description": "创建的 EdgeCell 对象",
661
581
  "type": "Promise<EdgeCell>"
662
582
  }
663
583
  },
@@ -666,10 +586,13 @@
666
586
  "params": [
667
587
  {
668
588
  "name": "source",
589
+ "description": "起始节点的 id",
669
590
  "type": "NodeId"
670
591
  }
671
592
  ],
593
+ "description": "",
672
594
  "returns": {
595
+ "description": "Promise,解析为 ConnectNodesDetail 包含 source 和 target 节点信息",
673
596
  "type": "Promise<ConnectNodesDetail>"
674
597
  }
675
598
  },
@@ -678,20 +601,26 @@
678
601
  "params": [
679
602
  {
680
603
  "name": "cells",
604
+ "description": "新的单元格数据列表",
681
605
  "type": "InitialCell[]"
682
606
  },
683
607
  {
684
608
  "name": "ctx",
609
+ "description": "可选的更新上下文,用于指定更新原因和位置参考节点",
685
610
  "type": "UpdateCellsContext"
686
611
  }
687
612
  ],
613
+ "description": "",
688
614
  "returns": {
615
+ "description": "返回实际被更新的单元格列表",
689
616
  "type": "Promise<{ updated: Cell[] }>"
690
617
  }
691
618
  },
692
619
  {
693
620
  "name": "reCenter",
694
- "params": []
621
+ "params": [],
622
+ "description": "",
623
+ "returns": {}
695
624
  },
696
625
  {
697
626
  "name": "toggleLock",
@@ -740,7 +669,217 @@
740
669
  }
741
670
  ],
742
671
  "parts": [],
743
- "description": "用于手工绘图的画布。\n\n注意:将配套另外一个用于展示的画布构件。"
672
+ "description": "",
673
+ "category": "diagram"
674
+ },
675
+ {
676
+ "name": "diagram.experimental-node",
677
+ "properties": [
678
+ {
679
+ "name": "usage",
680
+ "description": "",
681
+ "type": "ExperimentalUsage"
682
+ },
683
+ {
684
+ "name": "status",
685
+ "description": "",
686
+ "type": "NodeStatus"
687
+ },
688
+ {
689
+ "name": "decorator",
690
+ "description": "",
691
+ "type": "DecoratorType"
692
+ }
693
+ ],
694
+ "events": [
695
+ {
696
+ "name": "drag.start",
697
+ "description": "",
698
+ "detail": {
699
+ "description": "`PositionTuple` — 拖拽开始时的鼠标坐标 `[clientX, clientY]`",
700
+ "type": "PositionTuple"
701
+ }
702
+ },
703
+ {
704
+ "name": "drag.move",
705
+ "description": "",
706
+ "detail": {
707
+ "description": "`PositionTuple` — 拖拽过程中的当前鼠标坐标 `[clientX, clientY]`",
708
+ "type": "PositionTuple"
709
+ }
710
+ },
711
+ {
712
+ "name": "drag.end",
713
+ "description": "",
714
+ "detail": {
715
+ "description": "`PositionTuple` — 拖拽结束时的鼠标坐标 `[clientX, clientY]`",
716
+ "type": "PositionTuple"
717
+ }
718
+ }
719
+ ],
720
+ "slots": [],
721
+ "methods": [],
722
+ "parts": [],
723
+ "description": "",
724
+ "category": "diagram"
725
+ },
726
+ {
727
+ "name": "eo-display-canvas",
728
+ "properties": [
729
+ {
730
+ "name": "cells",
731
+ "description": "",
732
+ "attribute": false,
733
+ "type": "InitialCell[]"
734
+ },
735
+ {
736
+ "name": "layout",
737
+ "description": "",
738
+ "type": "LayoutType"
739
+ },
740
+ {
741
+ "name": "layoutOptions",
742
+ "description": "",
743
+ "attribute": false,
744
+ "type": "LayoutOptions"
745
+ },
746
+ {
747
+ "name": "autoSize",
748
+ "description": "",
749
+ "attribute": false,
750
+ "type": "AutoSize"
751
+ },
752
+ {
753
+ "name": "defaultNodeSize",
754
+ "description": "",
755
+ "default": "[DEFAULT_NODE_SIZE, DEFAULT_NODE_SIZE]",
756
+ "attribute": false,
757
+ "type": "SizeTuple"
758
+ },
759
+ {
760
+ "name": "defaultNodeBricks",
761
+ "description": "",
762
+ "attribute": false,
763
+ "type": "NodeBrickConf[]"
764
+ },
765
+ {
766
+ "name": "degradedThreshold",
767
+ "description": "当节点数量达到或超过 `degradedThreshold` 时,节点将被降级展示。",
768
+ "default": "500",
769
+ "type": "number"
770
+ },
771
+ {
772
+ "name": "degradedNodeLabel",
773
+ "description": "设置节点将降级展示时显示的名称。",
774
+ "default": "\"<% DATA.node.id %>\"",
775
+ "attribute": false,
776
+ "type": "string"
777
+ },
778
+ {
779
+ "name": "defaultEdgeLines",
780
+ "description": "使用条件判断设置默认的边对应的连线。在 `if` 表达式中 `DATA` 为 `{ edge }`,例如:\n\n```yaml\ndefaultEdgeLines:\n - if: <% DATA.edge.data?.virtual %>\n dashed: true\n```",
781
+ "attribute": false,
782
+ "type": "EdgeLineConf[]"
783
+ },
784
+ {
785
+ "name": "activeTarget",
786
+ "description": "",
787
+ "attribute": false,
788
+ "type": "ActiveTarget | null"
789
+ },
790
+ {
791
+ "name": "fadeUnrelatedCells",
792
+ "description": "",
793
+ "type": "boolean"
794
+ },
795
+ {
796
+ "name": "zoomable",
797
+ "description": "",
798
+ "default": "true",
799
+ "type": "boolean"
800
+ },
801
+ {
802
+ "name": "scrollable",
803
+ "description": "",
804
+ "default": "true",
805
+ "type": "boolean"
806
+ },
807
+ {
808
+ "name": "pannable",
809
+ "description": "",
810
+ "default": "true",
811
+ "type": "boolean"
812
+ },
813
+ {
814
+ "name": "scaleRange",
815
+ "description": "",
816
+ "attribute": false,
817
+ "type": "RangeTuple"
818
+ },
819
+ {
820
+ "name": "hideZoomBar",
821
+ "description": "隐藏右下角放大缩小的控制栏",
822
+ "type": "boolean"
823
+ },
824
+ {
825
+ "name": "autoCenterWhenCellsChange",
826
+ "description": "每当 cells 改变时,重新自动居中",
827
+ "type": "boolean"
828
+ },
829
+ {
830
+ "name": "doNotResetActiveTargetForSelector",
831
+ "description": "选择器,点击该选择器对应的元素时不重置 `activeTarget`。",
832
+ "type": "string"
833
+ },
834
+ {
835
+ "name": "doNotResetActiveTargetOutsideCanvas",
836
+ "description": "在画布外点击时不重置 `activeTarget`。",
837
+ "type": "boolean"
838
+ },
839
+ {
840
+ "name": "extraStyleTexts",
841
+ "attribute": false,
842
+ "type": "string[]"
843
+ }
844
+ ],
845
+ "events": [
846
+ {
847
+ "name": "activeTarget.change",
848
+ "description": "",
849
+ "detail": {
850
+ "description": "`ActiveTarget | null` — 当前激活目标,节点/边对象或 null",
851
+ "type": "ActiveTarget | null"
852
+ }
853
+ },
854
+ {
855
+ "name": "cell.contextmenu",
856
+ "description": "",
857
+ "detail": {
858
+ "description": "`CellContextMenuDetail` — 右键菜单详情,包含 `{ cell: 对应的单元格, clientX: 鼠标X坐标, clientY: 鼠标Y坐标 }`",
859
+ "type": "CellContextMenuDetail"
860
+ }
861
+ },
862
+ {
863
+ "name": "cell.click",
864
+ "description": "",
865
+ "detail": {
866
+ "description": "`CellContextMenuDetail` — 点击详情,包含 `{ cell: 对应的单元格, clientX: 鼠标X坐标, clientY: 鼠标Y坐标 }`",
867
+ "type": "CellContextMenuDetail"
868
+ }
869
+ }
870
+ ],
871
+ "slots": [],
872
+ "methods": [
873
+ {
874
+ "name": "center",
875
+ "params": [],
876
+ "description": "",
877
+ "returns": {}
878
+ }
879
+ ],
880
+ "parts": [],
881
+ "description": "",
882
+ "category": "diagram"
744
883
  }
745
884
  ],
746
885
  "providers": []