@ixfx/components 0.8.3 → 0.8.4

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/docs-user/dock.md CHANGED
@@ -67,7 +67,10 @@ serialize with `saveLayout()` / `loadLayout()`, and render as
67
67
  `data-dock-name` on the leaf. Explicit leaf close still removes the stack.
68
68
  When a `tabs` drop empties a named stack into an *unnamed* one, the name
69
69
  (and its content rules) follows the panels to the merged leaf instead of
70
- leaving an empty placeholder behind.
70
+ leaving an empty placeholder behind. Edge splits go the other way: a
71
+ permitted split beside a named leaf yields a fresh *unnamed* sibling with no
72
+ policy — set `allowEdgeSplit: false` (see Restrictions) to forbid the split
73
+ entirely for strict named-area layouts.
71
74
 
72
75
  Spatial moves: `getNeighbours()` reports what sits above / below / left /
73
76
  right of a leaf (flat `{ name, path }` lists, most-overlapping first).
@@ -116,13 +119,24 @@ split resizes, and host resizes; handles are hidden during dock drags.
116
119
  `clearLeafContentRestrictions(name)` lifts both; `[]` seals (exclusive) or
117
120
  lifts (deny). Rules are host policy — kept across `loadLayout()`, never
118
121
  serialized; already-docked panels are grandfathered.
122
+ - Leaf placement policy — `setLeafPlacementPolicy(name, policy)` is a superset
123
+ of the two calls above (`allowKinds` / `denyKinds`) plus `allowEdgeSplit`
124
+ (default `true`). `allowEdgeSplit: false` enforces **strict named-area
125
+ containment**: the edge drop zones *beside* that named leaf go inert, so a
126
+ panel cannot escape the area by splitting next to it. Fields merge into the
127
+ stored policy; `clearLeafPlacementPolicy(name)` resets. `getLeafPlacementPolicy(name)`
128
+ returns the resolved `{ allowKinds, denyKinds, allowEdgeSplit }`.
119
129
 
120
130
  A zone lights up only if every applicable rule allows it; disallowed zones
121
131
  are inert. Content rules govern tabbing *into* a leaf (`tabs` drops,
122
- `addPanel`, re-homing); edge splits beside the leaf stay allowed because they
123
- create a new sibling leaf. Programmatic fallbacks (`addPanel` without a
124
- target, external panels, leaf-close re-homing) use the first stack admitting
125
- the panel's kind.
132
+ `addPanel`, re-homing). Edge splits beside a leaf stay allowed **unless** that
133
+ named leaf's policy sets `allowEdgeSplit: false` the gate is enforced on
134
+ every placement route (pointer preview and drop, `queryDropTarget` /
135
+ `previewExternalDrop`, `addPanel` with a split `op`). A *permitted* edge split
136
+ still creates an **unnamed, unconstrained** leaf — the area policy is not
137
+ propagated to it. Programmatic fallbacks (`addPanel` without a target,
138
+ external panels, leaf-close re-homing) use the first stack admitting the
139
+ panel's kind.
126
140
 
127
141
  ## Events
128
142
 
@@ -164,8 +178,16 @@ activatePanel(panelId: string): boolean
164
178
  getPanelIds(): string[]
165
179
  setLeafExclusiveContents(name: string, kinds: string[]): void
166
180
  setLeafDenyContents(name: string, kinds: string[]): void
181
+ setLeafPlacementPolicy(name: string, policy: DockLeafPlacementPolicy): void
182
+ type DockLeafPlacementPolicy = {
183
+ allowKinds?: string[]; // = setLeafExclusiveContents
184
+ denyKinds?: string[]; // = setLeafDenyContents
185
+ allowEdgeSplit?: boolean; // default true; false = strict named-area containment
186
+ } // omitted fields merge into the stored policy
167
187
  clearLeafContentRestrictions(name: string): void
188
+ clearLeafPlacementPolicy(name: string): void // alias of the above
168
189
  getLeafContentRestrictions(name: string): DockLeafContentRules | null
190
+ getLeafPlacementPolicy(name: string): DockLeafPlacementPolicyResolved | null
169
191
  getContainerNames(): string[]
170
192
  getContainer(name: string): { name: string; panels: string[]; active: string } | null
171
193
  getContainerPanels(name: string): string[] // ids in tab order
@@ -149,9 +149,10 @@ grid.selectAll();
149
149
  grid.selectedItems; // ReadonlySet<Element>
150
150
  ```
151
151
 
152
- Press-and-drag draws a marquee rectangle selecting every covered cell
153
- (automatic with `selection-mode="multiple"` or a multi `interaction-mode`;
154
- `disable-drag-select` opts out). See `docs-user/grid-list.md`.
152
+ Press-and-drag on empty space between items draws a marquee rectangle selecting
153
+ every covered cell a press that starts on an item never starts a marquee, so
154
+ it never fights an item drag or click (automatic with `selection-mode="multiple"`
155
+ or a multi `interaction-mode`; `disable-drag-select` opts out).
155
156
 
156
157
  ### Key-based selection
157
158
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ixfx/components",
3
3
  "type": "module",
4
- "version": "0.8.3",
4
+ "version": "0.8.4",
5
5
  "packageManager": "pnpm@10.0.0",
6
6
  "description": "Web components for ixfx — Lit-based UI toolkit",
7
7
  "author": "Clint Heyer",