orcasvn-react-diagrams 0.2.8 → 0.2.10

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,28 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## [0.2.10] - 2026-05-27
6
+
7
+ ### Changed
8
+ - `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.
9
+ - 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.
10
+
11
+ ### Docs
12
+ - Updated release highlights, API/invariant docs, integration guidance, commands/events notes, and machine-readable contract artifacts for `v0.2.10`.
13
+
14
+ ## [0.2.9] - 2026-05-27
15
+
16
+ ### Added
17
+ - Element-level visibility and selectability policy through `ElementData.visible` and `ElementData.selectable`.
18
+
19
+ ### Changed
20
+ - Built-in element-body hit testing, click selection, marquee selection, and persisted selection normalization now honor element visibility/selectability state.
21
+ - Hidden-scene propagation now suppresses owned ports, owned texts, and links whose endpoint ports belong to hidden elements.
22
+ - `zoomToFitElements` and `exportImage({ fitToContent: ... })` now ignore hidden scene members when deriving bounds.
23
+
24
+ ### Docs
25
+ - Updated release highlights, API/invariant docs, integration guidance, and machine-readable contract artifacts for `v0.2.9`.
26
+
5
27
  ## [0.2.8] - 2026-05-24
6
28
 
7
29
  ### Fixed
package/README.md CHANGED
@@ -30,12 +30,14 @@ editor.addElement({
30
30
  });
31
31
  ```
32
32
 
33
- ## Release Highlights (v0.2.8)
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
33
+ ## Release Highlights (v0.2.10)
34
+
35
+ - Includes all completed `v0.2.1` through `v0.2.9` work, plus `v0.2.10` updates.
36
+ - `v0.2.10` element visibility/selectability policy:
37
+ - `ElementData.visible = false` keeps the element in state while removing its own body from built-in render, hit testing, selection, and fit/export bounds
38
+ - visible descendant elements under a hidden parent remain rendered and interactive if their own `visible` flag stays enabled
39
+ - direct-owned parent ports/texts still follow the hidden parent, and links remain visible when their endpoint ports are visible
40
+ - `ElementData.selectable = false` keeps the element visible while preventing built-in element-body click/marquee/programmatic selection from retaining that element id
39
41
 
40
42
  ## API Docs
41
43
 
@@ -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,22 @@
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
+ "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",
233
+ "selectable=false blocks built-in element-body click selection, marquee selection, and programmatic setSelection/toggleSelection from retaining that element id",
234
+ "selectable=false does not hide the element"
235
+ ]
236
+ },
219
237
  "shapeHoverControls": {
220
238
  "targetKinds": [
221
239
  "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 visible=false hides only that element body while descendants resolve visibility from their own visible flag",
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 element bodies, direct-owned hidden artifacts, 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
  }