orcasvn-react-diagrams 0.2.9 → 0.2.11
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 +20 -0
- package/README.md +6 -6
- package/ai/api-contract.json +4 -1
- package/ai/invariants.json +2 -2
- package/ai/manifest.json +1 -1
- package/dist/cjs/examples.js +307 -122
- package/dist/cjs/index.js +165 -52
- package/dist/cjs/types/api/types.d.ts +1 -0
- package/dist/cjs/types/displaybox/demos/linkColorPoolDemo.d.ts +2 -0
- package/dist/cjs/types/engine/DiagramEngine.d.ts +3 -0
- package/dist/esm/examples.js +307 -122
- package/dist/esm/examples.js.map +1 -1
- package/dist/esm/index.js +165 -52
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/api/types.d.ts +1 -0
- package/dist/esm/types/displaybox/demos/linkColorPoolDemo.d.ts +2 -0
- package/dist/esm/types/engine/DiagramEngine.d.ts +3 -0
- package/dist/examples.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/docs/API_CONTRACT.md +11 -5
- package/docs/CAPABILITIES.md +2 -2
- package/docs/COMMANDS_EVENTS.md +1 -1
- package/docs/DOCUMENTATION_WORKFLOW.md +4 -1
- package/docs/INTEGRATION_PLAYBOOK.md +2 -1
- package/docs/STATE_INVARIANTS.md +2 -2
- package/package.json +1 -1
- package/src/displaybox/demos/LinkColorPoolDemoTab.tsx +10 -5
- package/src/displaybox/demos/elementVisibilitySelectionDemo.ts +51 -16
- package/src/displaybox/demos/linkColorPoolDemo.ts +84 -49
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.2.11] - 2026-06-20
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- `LinkColorPoolPolicy.assignOnLoadWhenMissingStroke` for opt-in load-time random `style.stroke` assignment on links that load without a usable stroke value.
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- Load-time link color fill now preserves explicit loaded `style.stroke` values, treats missing/`null`/blank strokes as fill candidates, and uses the active custom-or-default color pool only when the policy is enabled.
|
|
12
|
+
|
|
13
|
+
### Docs
|
|
14
|
+
- Updated release highlights, public API/docs contract text, integration guidance, and machine-readable contract metadata for `v0.2.11`.
|
|
15
|
+
|
|
16
|
+
## [0.2.10] - 2026-05-27
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- `ElementData.visible = false` now hides only the element body from built-in render, hit testing, selection persistence, and fit/export helpers instead of suppressing descendant elements through hidden ancestors.
|
|
20
|
+
- Visible descendants under hidden parents now remain rendered, selectable, draggable, and included in fit/export bounds, while direct-owned parent ports/texts still follow the hidden parent and links remain visible when their endpoint ports are visible.
|
|
21
|
+
|
|
22
|
+
### Docs
|
|
23
|
+
- Updated release highlights, API/invariant docs, integration guidance, commands/events notes, and machine-readable contract artifacts for `v0.2.10`.
|
|
24
|
+
|
|
5
25
|
## [0.2.9] - 2026-05-27
|
|
6
26
|
|
|
7
27
|
### Added
|
package/README.md
CHANGED
|
@@ -30,13 +30,13 @@ editor.addElement({
|
|
|
30
30
|
});
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
## Release Highlights (v0.2.
|
|
33
|
+
## Release Highlights (v0.2.11)
|
|
34
34
|
|
|
35
|
-
- Includes all completed `v0.2.1` through `v0.2.
|
|
36
|
-
- `v0.2.
|
|
37
|
-
- `
|
|
38
|
-
-
|
|
39
|
-
-
|
|
35
|
+
- Includes all completed `v0.2.1` through `v0.2.10` work, plus `v0.2.11` updates.
|
|
36
|
+
- `v0.2.11` link color pool load-time fill:
|
|
37
|
+
- `linkColorPoolPolicy.assignOnLoadWhenMissingStroke = true` backfills loaded links whose `style.stroke` is missing, `null`, or blank after trimming
|
|
38
|
+
- explicit non-empty loaded `style.stroke` values are preserved exactly as loaded
|
|
39
|
+
- the fill uses normalized custom `colors` when provided, otherwise the built-in 20-color pool
|
|
40
40
|
|
|
41
41
|
## API Docs
|
|
42
42
|
|
package/ai/api-contract.json
CHANGED
|
@@ -227,7 +227,9 @@
|
|
|
227
227
|
},
|
|
228
228
|
"semantics": [
|
|
229
229
|
"visible=false hides the element body from built-in render, hit testing, marquee selection, persisted selection, zoomToFitElements, and exportImage fit-to-content bounds",
|
|
230
|
-
"
|
|
230
|
+
"descendant elements keep resolving visibility from their own visible flag even when an ancestor element is hidden",
|
|
231
|
+
"direct-owned ports and direct-owned texts still hide with their hidden parent element",
|
|
232
|
+
"links remain visible whenever both endpoint ports remain visible, including links attached to visible descendants under hidden parents",
|
|
231
233
|
"selectable=false blocks built-in element-body click selection, marquee selection, and programmatic setSelection/toggleSelection from retaining that element id",
|
|
232
234
|
"selectable=false does not hide the element"
|
|
233
235
|
]
|
|
@@ -257,6 +259,7 @@
|
|
|
257
259
|
"linkColorPoolPolicy": {
|
|
258
260
|
"enabled": "boolean",
|
|
259
261
|
"colors": "string[]",
|
|
262
|
+
"assignOnLoadWhenMissingStroke": "boolean",
|
|
260
263
|
"defaultPoolSize": 20
|
|
261
264
|
},
|
|
262
265
|
"viewportFitOptions": {
|
package/ai/invariants.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"entityRules": {
|
|
16
16
|
"element": [
|
|
17
17
|
"child element positions are parent-relative when parentId is set",
|
|
18
|
-
"element visible-state is enabled by default and
|
|
18
|
+
"element visible-state is enabled by default and visible=false hides only that element body while descendants resolve visibility from their own visible flag",
|
|
19
19
|
"element selectable-state is enabled by default and selectable=false prevents the element id from persisting in selection state",
|
|
20
20
|
"deleting an element removes its ports, links via ports, and owned texts"
|
|
21
21
|
],
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"eventRules": [
|
|
41
41
|
"mutations emit change with patches and full state snapshot",
|
|
42
|
-
"setSelection/toggleSelection normalize away hidden
|
|
42
|
+
"setSelection/toggleSelection normalize away hidden element bodies, direct-owned hidden artifacts, and selectable=false element ids before emitting selection",
|
|
43
43
|
"setSelection emits selection plus derived selected entity events",
|
|
44
44
|
"setViewport emits viewport patch without immediate render"
|
|
45
45
|
],
|
package/ai/manifest.json
CHANGED