orcasvn-react-diagrams 0.2.4 → 0.2.5
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/CHANGELOG.md +19 -4
- package/README.md +17 -15
- package/ai/api-contract.json +50 -2
- package/ai/manifest.json +1 -1
- package/dist/cjs/examples.js +2059 -1102
- package/dist/cjs/index.js +703 -105
- package/dist/cjs/types/api/createDiagramEditor.d.ts +3 -1
- package/dist/cjs/types/api/types.d.ts +18 -1
- package/dist/cjs/types/displaybox/demos/LinkColorPoolDemoTab.d.ts +3 -0
- package/dist/cjs/types/displaybox/demos/SimpleDemo.d.ts +4 -1
- package/dist/cjs/types/displaybox/demos/linkColorPoolDemo.d.ts +2 -0
- package/dist/cjs/types/displaybox/types.d.ts +3 -1
- package/dist/cjs/types/displaybox/useDemoEditor.d.ts +4 -2
- package/dist/cjs/types/engine/AutoLayoutService.d.ts +15 -1
- package/dist/cjs/types/engine/DiagramEngine.d.ts +8 -1
- package/dist/cjs/types/engine/LinkRoutingService.d.ts +8 -0
- package/dist/cjs/types/renderer/konva/KonvaInteraction.d.ts +4 -0
- package/dist/cjs/types/strategies/ObstacleRouter.d.ts +2 -0
- package/dist/cjs/types/strategies/RouterStrategy.d.ts +10 -0
- package/dist/esm/examples.js +2059 -1102
- package/dist/esm/examples.js.map +1 -1
- package/dist/esm/index.js +703 -105
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/api/createDiagramEditor.d.ts +3 -1
- package/dist/esm/types/api/types.d.ts +18 -1
- package/dist/esm/types/displaybox/demos/LinkColorPoolDemoTab.d.ts +3 -0
- package/dist/esm/types/displaybox/demos/SimpleDemo.d.ts +4 -1
- package/dist/esm/types/displaybox/demos/linkColorPoolDemo.d.ts +2 -0
- package/dist/esm/types/displaybox/types.d.ts +3 -1
- package/dist/esm/types/displaybox/useDemoEditor.d.ts +4 -2
- package/dist/esm/types/engine/AutoLayoutService.d.ts +15 -1
- package/dist/esm/types/engine/DiagramEngine.d.ts +8 -1
- package/dist/esm/types/engine/LinkRoutingService.d.ts +8 -0
- package/dist/esm/types/renderer/konva/KonvaInteraction.d.ts +4 -0
- package/dist/esm/types/strategies/ObstacleRouter.d.ts +2 -0
- package/dist/esm/types/strategies/RouterStrategy.d.ts +10 -0
- package/dist/examples.d.ts +30 -1
- package/dist/index.d.ts +33 -2
- package/docs/API_CONTRACT.md +36 -1
- package/docs/CAPABILITIES.md +5 -0
- package/docs/DOCUMENTATION_WORKFLOW.md +3 -1
- package/package.json +1 -1
- package/src/displaybox/demos/AutoLayoutDemoTab.tsx +196 -83
- package/src/displaybox/demos/LinkColorPoolDemoTab.tsx +49 -0
- package/src/displaybox/demos/ObstacleRoutingDemoTab.tsx +52 -31
- package/src/displaybox/demos/SimpleDemo.tsx +18 -13
- package/src/displaybox/demos/autoLayoutDemo.ts +48 -13
- package/src/displaybox/demos/index.tsx +10 -2
- package/src/displaybox/demos/linkColorPoolDemo.ts +122 -0
- package/src/displaybox/demos/obstacleRoutingDemo.ts +77 -1
- package/src/displaybox/demos/routingDemo.ts +5 -5
- package/src/displaybox/demos/shared.ts +17 -12
- package/src/displaybox/types.ts +10 -8
package/CHANGELOG.md
CHANGED
|
@@ -2,11 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.2.5] - 2026-05-10
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- Auto-layout `grid` mode with template rows/columns (`gridTemplate`) and weighted track sizing support.
|
|
9
|
+
- Auto-layout parent resize policy (`autoResize`) with `grow` and `grow-shrink` modes.
|
|
10
|
+
- Explicit auto-layout child size aliases (`childMinWidth`, `childMaxWidth`, `childMinHeight`, `childMaxHeight`).
|
|
11
|
+
- Grid auto-layout child resize behavior that locks horizontal child resizing while preserving vertical child resizing and parent resize responsiveness.
|
|
12
|
+
- Direct resize handling for non-manual layout parents that preserves explicit resized parent bounds for the resize cycle before child reflow.
|
|
13
|
+
- Optional redraw-time link route refresh policy (`linkRouteRefreshPolicy`) for two-endpoint-change checks.
|
|
14
|
+
- Cross-parent first common-ancestor corridor preference for auto-routed links across parent branches.
|
|
15
|
+
- Optional random link color assignment policy (`linkColorPoolPolicy`) with built-in default 20-color pool.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- Stabilized `element-hover` nested hover-control ownership near child boundaries to prevent child/parent control flicker.
|
|
19
|
+
|
|
20
|
+
### Docs
|
|
21
|
+
- Updated `README.md` release highlights for `v0.2.5`.
|
|
22
|
+
- Updated public API and machine-readable contract docs for new `v0.2.5` config and layout options.
|
|
23
|
+
|
|
5
24
|
## [0.2.4] - 2026-05-06
|
|
6
25
|
|
|
7
26
|
### Added
|
|
8
27
|
- Directional parent-child attach mode support for hierarchy-aware linking flows.
|
|
9
|
-
- Port position-limit normalization coverage in DisplayBox demos for add/load/move entry points.
|
|
10
28
|
|
|
11
29
|
### Changed
|
|
12
30
|
- Unified child-port movement restrictions across all engine entry points (move, add, load, link-session creation, resize reprojection).
|
|
@@ -30,7 +48,6 @@ All notable changes to this project are documented in this file.
|
|
|
30
48
|
|
|
31
49
|
### Changed
|
|
32
50
|
- Asymmetric SVG-path multi-anchor transform/orientation behavior for deterministic border-side placement.
|
|
33
|
-
- DisplayBox demo coverage consolidated for auto-layout and vertex-control scenarios.
|
|
34
51
|
- Vertex-control session logs in demo flows improved for collapse/scroll stability.
|
|
35
52
|
|
|
36
53
|
### Fixed
|
|
@@ -50,7 +67,6 @@ All notable changes to this project are documented in this file.
|
|
|
50
67
|
- Discrete port anchor constraints with anchor-based movement support.
|
|
51
68
|
- Shape hover controls for edge and vertex targets with configurable trigger modes.
|
|
52
69
|
- Ellipse midpoint control enumeration support.
|
|
53
|
-
- DisplayBox demos for discrete anchors, hover controls, and ellipse midpoints.
|
|
54
70
|
|
|
55
71
|
### Changed
|
|
56
72
|
- Refactored built-in shape behavior to class-based implementations.
|
|
@@ -66,4 +82,3 @@ All notable changes to this project are documented in this file.
|
|
|
66
82
|
- Improved shape-aware endpoint edge detection for link routing.
|
|
67
83
|
|
|
68
84
|
### Docs
|
|
69
|
-
- Refreshed DisplayBox verification coverage for shape class and rotation behavior.
|
package/README.md
CHANGED
|
@@ -30,21 +30,23 @@ editor.addElement({
|
|
|
30
30
|
});
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
## Release Highlights (v0.2.
|
|
34
|
-
|
|
35
|
-
- Includes all completed `v0.2.1
|
|
36
|
-
- `v0.2.
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
- `v0.2.
|
|
45
|
-
-
|
|
46
|
-
|
|
47
|
-
-
|
|
33
|
+
## Release Highlights (v0.2.5)
|
|
34
|
+
|
|
35
|
+
- Includes all completed `v0.2.1` through `v0.2.4` work, plus `v0.2.5` updates.
|
|
36
|
+
- `v0.2.5` auto-layout updates:
|
|
37
|
+
- new `grid` mode with template rows/columns and weighted track layouts
|
|
38
|
+
- parent `autoResize` policy (`grow` and `grow-shrink`)
|
|
39
|
+
- explicit child size aliases (`childMinWidth`, `childMaxWidth`, `childMinHeight`, `childMaxHeight`)
|
|
40
|
+
- grid-child horizontal resize lock while preserving vertical resize and parent resize responsiveness
|
|
41
|
+
- `v0.2.5` routing updates:
|
|
42
|
+
- cross-parent links now prefer first common-ancestor corridor travel
|
|
43
|
+
- optional redraw-time reroute checks when both link endpoints changed (`linkRouteRefreshPolicy`)
|
|
44
|
+
- `v0.2.5` styling update:
|
|
45
|
+
- optional random link stroke assignment from configurable color pools (`linkColorPoolPolicy`)
|
|
46
|
+
- `v0.2.5` interaction update:
|
|
47
|
+
- stabilized nested `element-hover` controls near child boundaries to reduce child/parent flicker
|
|
48
|
+
- `v0.2.5` demo coverage updates:
|
|
49
|
+
- expanded DisplayBox scenarios for grid auto-layout behaviors, corridor routing, redraw policy, and color-pool link creation
|
|
48
50
|
- Shape system upgrade:
|
|
49
51
|
- class-based built-in shape behaviors
|
|
50
52
|
- runtime removal of `boundaryKind` branching
|
package/ai/api-contract.json
CHANGED
|
@@ -29,7 +29,9 @@
|
|
|
29
29
|
"onElementShapeHoverControlInteraction": "(event: ElementShapeHoverControlInteractionEvent) => void",
|
|
30
30
|
"onElementShapeHoverControlActivated": "(event: ElementShapeHoverControlActivationEvent) => void",
|
|
31
31
|
"onChange": "(event: EngineChangeEvent) => void",
|
|
32
|
-
"onSelection": "(event: EngineSelectionEvent) => void"
|
|
32
|
+
"onSelection": "(event: EngineSelectionEvent) => void",
|
|
33
|
+
"linkRouteRefreshPolicy": "LinkRouteRefreshPolicy",
|
|
34
|
+
"linkColorPoolPolicy": "LinkColorPoolPolicy"
|
|
33
35
|
},
|
|
34
36
|
"defaults": {
|
|
35
37
|
"width": 900,
|
|
@@ -46,7 +48,9 @@
|
|
|
46
48
|
"router": "RouterStrategy",
|
|
47
49
|
"snapper": "SnapStrategy",
|
|
48
50
|
"shapeRegistry": "ShapeRegistry",
|
|
49
|
-
"textMeasurer": "TextMeasurer"
|
|
51
|
+
"textMeasurer": "TextMeasurer",
|
|
52
|
+
"linkRouteRefreshPolicy": "LinkRouteRefreshPolicy",
|
|
53
|
+
"linkColorPoolPolicy": "LinkColorPoolPolicy"
|
|
50
54
|
},
|
|
51
55
|
"defaults": {
|
|
52
56
|
"scheduler": "RenderScheduler",
|
|
@@ -151,6 +155,25 @@
|
|
|
151
155
|
"padding": 12,
|
|
152
156
|
"gap": 12,
|
|
153
157
|
"align": "center"
|
|
158
|
+
},
|
|
159
|
+
"elementLayout": {
|
|
160
|
+
"mode": "'manual' | 'horizontal' | 'vertical' | 'grid'",
|
|
161
|
+
"optional": [
|
|
162
|
+
"padding",
|
|
163
|
+
"gap",
|
|
164
|
+
"align",
|
|
165
|
+
"autoResize",
|
|
166
|
+
"gridTemplate",
|
|
167
|
+
"childFitMainAxis",
|
|
168
|
+
"childFitCrossAxis",
|
|
169
|
+
"childMinWidth",
|
|
170
|
+
"childMaxWidth",
|
|
171
|
+
"childMinHeight",
|
|
172
|
+
"childMaxHeight",
|
|
173
|
+
"childFitMinSize",
|
|
174
|
+
"childFitMaxSize",
|
|
175
|
+
"labelReservedSpace"
|
|
176
|
+
]
|
|
154
177
|
}
|
|
155
178
|
},
|
|
156
179
|
"additionalContracts": {
|
|
@@ -187,6 +210,25 @@
|
|
|
187
210
|
"drag-move",
|
|
188
211
|
"drag-end"
|
|
189
212
|
]
|
|
213
|
+
},
|
|
214
|
+
"linkRouteRefreshPolicy": {
|
|
215
|
+
"mode": "'mutation-only' | 'redraw-two-endpoint-change'",
|
|
216
|
+
"includeManual": "boolean"
|
|
217
|
+
},
|
|
218
|
+
"linkColorPoolPolicy": {
|
|
219
|
+
"enabled": "boolean",
|
|
220
|
+
"colors": "string[]",
|
|
221
|
+
"defaultPoolSize": 20
|
|
222
|
+
},
|
|
223
|
+
"diagramImageExportOptions": {
|
|
224
|
+
"mimeType": "string",
|
|
225
|
+
"quality": "number",
|
|
226
|
+
"pixelRatio": "number",
|
|
227
|
+
"x": "number",
|
|
228
|
+
"y": "number",
|
|
229
|
+
"width": "number",
|
|
230
|
+
"height": "number",
|
|
231
|
+
"fitToContent": "boolean | { padding?: number }"
|
|
190
232
|
}
|
|
191
233
|
},
|
|
192
234
|
"handleMethods": {
|
|
@@ -223,6 +265,12 @@
|
|
|
223
265
|
"render"
|
|
224
266
|
],
|
|
225
267
|
"editorOnly": [
|
|
268
|
+
"startLinkFromPort",
|
|
269
|
+
"updateLinkPreview",
|
|
270
|
+
"completeLinkToPort",
|
|
271
|
+
"completeLinkToElement",
|
|
272
|
+
"cancelLink",
|
|
273
|
+
"exportImage",
|
|
226
274
|
"resize",
|
|
227
275
|
"setElementShapeHoverControls",
|
|
228
276
|
"destroy"
|
package/ai/manifest.json
CHANGED