orcasvn-react-diagrams 0.2.8 → 0.2.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## [0.2.9] - 2026-05-27
6
+
7
+ ### Added
8
+ - Element-level visibility and selectability policy through `ElementData.visible` and `ElementData.selectable`.
9
+
10
+ ### Changed
11
+ - Built-in element-body hit testing, click selection, marquee selection, and persisted selection normalization now honor element visibility/selectability state.
12
+ - Hidden-scene propagation now suppresses owned ports, owned texts, and links whose endpoint ports belong to hidden elements.
13
+ - `zoomToFitElements` and `exportImage({ fitToContent: ... })` now ignore hidden scene members when deriving bounds.
14
+
15
+ ### Docs
16
+ - Updated release highlights, API/invariant docs, integration guidance, and machine-readable contract artifacts for `v0.2.9`.
17
+
5
18
  ## [0.2.8] - 2026-05-24
6
19
 
7
20
  ### Fixed
package/README.md CHANGED
@@ -30,12 +30,13 @@ editor.addElement({
30
30
  });
31
31
  ```
32
32
 
33
- ## Release Highlights (v0.2.8)
33
+ ## Release Highlights (v0.2.9)
34
34
 
35
- - Includes all completed `v0.2.1` through `v0.2.7` work, plus `v0.2.8` updates.
36
- - `v0.2.8` grid auto-layout fix:
37
- - direct grid children that are themselves non-manual layout parents now keep the owner-assigned slot size for the active layout cycle, even when they are empty
38
- - enabled `layout.gridChildWidthResizeEnabled` resize flows now preserve that assigned size instead of collapsing the nested layout parent back to padding-only bounds
35
+ - Includes all completed `v0.2.1` through `v0.2.8` work, plus `v0.2.9` updates.
36
+ - `v0.2.9` element visibility/selectability policy:
37
+ - `ElementData.visible = false` keeps the element in state while removing it from built-in render, hit testing, selection, and fit/export bounds
38
+ - `ElementData.selectable = false` keeps the element visible while preventing built-in element-body click/marquee/programmatic selection from retaining that element id
39
+ - owned ports/texts and endpoint-dependent links now follow the same hidden-scene visibility rules
39
40
 
40
41
  ## API Docs
41
42
 
@@ -81,6 +81,8 @@
81
81
  "style",
82
82
  "portIds",
83
83
  "textIds",
84
+ "visible",
85
+ "selectable",
84
86
  "parentId",
85
87
  "moveMode",
86
88
  "anchorCenter",
@@ -216,6 +218,20 @@
216
218
  "movable": true
217
219
  }
218
220
  },
221
+ "elementVisibilitySelectionPolicy": {
222
+ "visible": "boolean",
223
+ "selectable": "boolean",
224
+ "defaults": {
225
+ "visible": true,
226
+ "selectable": true
227
+ },
228
+ "semantics": [
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
+ "hidden-scene propagation also hides owned ports, owned texts, and links whose endpoint ports belong to hidden elements",
231
+ "selectable=false blocks built-in element-body click selection, marquee selection, and programmatic setSelection/toggleSelection from retaining that element id",
232
+ "selectable=false does not hide the element"
233
+ ]
234
+ },
219
235
  "shapeHoverControls": {
220
236
  "targetKinds": [
221
237
  "vertex",
@@ -6,6 +6,8 @@
6
6
  "texts[]"
7
7
  ],
8
8
  "defaults": {
9
+ "element.visible": true,
10
+ "element.selectable": true,
9
11
  "port.anchorCenter": true,
10
12
  "port.orientToHostBorder": true,
11
13
  "link.routing": "auto"
@@ -13,25 +15,31 @@
13
15
  "entityRules": {
14
16
  "element": [
15
17
  "child element positions are parent-relative when parentId is set",
18
+ "element visible-state is enabled by default and hidden ancestors suppress descendant element visibility",
19
+ "element selectable-state is enabled by default and selectable=false prevents the element id from persisting in selection state",
16
20
  "deleting an element removes its ports, links via ports, and owned texts"
17
21
  ],
18
22
  "port": [
19
23
  "port positions are relative to element",
24
+ "port visible-state follows owning element visibility",
20
25
  "moving a port can be constrained by moveMode/moveAxis/moveBounds",
21
26
  "element portMovement policy can enforce anchor-constrained movement with discrete shape anchors"
22
27
  ],
23
28
  "link": [
29
+ "link visible-state requires both endpoint ports to remain visible",
24
30
  "manual routing preserves interior bend points on endpoint updates",
25
31
  "auto routing normalizes first/last points to source/target port world positions"
26
32
  ],
27
33
  "text": [
28
34
  "owner-bound text stores owner-relative position",
35
+ "owned text visible-state follows its resolved owner visibility",
29
36
  "orphan owner references are tolerated as standalone world text",
30
37
  "displayContent/displayOffset/displayClipSize may be derived from text layout rules"
31
38
  ]
32
39
  },
33
40
  "eventRules": [
34
41
  "mutations emit change with patches and full state snapshot",
42
+ "setSelection/toggleSelection normalize away hidden scene members and selectable=false element ids before emitting selection",
35
43
  "setSelection emits selection plus derived selected entity events",
36
44
  "setViewport emits viewport patch without immediate render"
37
45
  ],
package/ai/manifest.json CHANGED
@@ -30,5 +30,5 @@
30
30
  "analysis/White paper/Overview.md",
31
31
  "analysis/White paper/Requirements-Functional.md"
32
32
  ],
33
- "updatedAt": "2026-05-24"
33
+ "updatedAt": "2026-05-27"
34
34
  }