@n-uf/placement 26.11.30 → 26.11.31

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.
@@ -355,6 +355,16 @@ interface SceneItemLayout {
355
355
  readonly rides?: string;
356
356
  /** Its column folded: by hand (every member folded) or by give-way. */
357
357
  readonly folded?: "hand" | "auto";
358
+ /**
359
+ * Why this item is drawn smaller than its first form, read from the scene's own state, never inferred from the rects:
360
+ * `"hand"` when it is folded by hand (`SceneItem.from` over 0, which `fold` sets), `"auto"` when it gave way (a form
361
+ * below the one it started in, by length or width, a » menu entry included: the same word `folded` uses for a column
362
+ * folded by give-way). Absent when the item shows its first form, is closed, or lies in an icons-only edge in the form
363
+ * that edge gives it. By hand wins: a hand-folded item that gave way further is `"hand"`, since expanding it
364
+ * (`fold(scene, id, false)`) is the user's to do, so a host shows "Expand" for `"hand"` only. A float is only ever
365
+ * folded by hand. `folded` is about the item's column; this one is about the item.
366
+ */
367
+ readonly foldedBy?: "hand" | "auto";
358
368
  /** A `wrap` form: the word indexes per row (the words wrap beside the grip, a hanging indent). */
359
369
  readonly rows?: readonly (readonly number[])[];
360
370
  /** Its grip: a `wrap` form's lead cell at the start of row one, or a form's `grip` strip (an icons strip's, on top). */
@@ -378,6 +388,14 @@ interface SceneEdgeLayout {
378
388
  readonly rect: Rect;
379
389
  readonly items: readonly string[];
380
390
  } | null;
391
+ /**
392
+ * Its items in the edge's order: the zones in order (start, center, end), then the order within each zone, the order
393
+ * `solve` lays them in. Exactly the ids `SceneLayout.items` draws for this edge (`SceneItemLayout.edge`): an item in the
394
+ * » menu keeps its place (`menu.items` names those, so a host wanting the docked ones filters them out), a rail tab is
395
+ * listed, and a closed item is left out (unless it shows as a rail tab). A column folded into its rail or riding lists
396
+ * its members in zone order. Never sort rects to learn it.
397
+ */
398
+ readonly items: readonly string[];
381
399
  /** The ids drawn as rail tabs, in order (empty unless the column is a rail). */
382
400
  readonly tabs: readonly string[];
383
401
  /**
@@ -549,7 +567,8 @@ interface FloatResize {
549
567
  * then along, over its new width), and such a stop beats the minimum. The rect is then laid by the one clamp `solve`
550
568
  * lays floats with, so `solve(resize(...))` draws exactly this rect. A float that already covers something (no clear
551
569
  * place at its size) may move to a clear place once a resize opens one; the preview is still the commit, and
552
- * `"docked"` says so. `limits` says which of these bound it.
570
+ * `"docked"` says so. Such a float never grows over what it covers: a dragged edge that lies inside an obstacle stays
571
+ * where it is drawn (`"docked"`), so a resize never covers more than the float did. `limits` says which of these bound it.
553
572
  *
554
573
  * Null for anything but a float drawn at its first form when that form grows (a panel's card): a toolbar group's size
555
574
  * comes from its forms, and so does a folded float's bar. Pure: it solves the scene once, for what is drawn now.
@@ -1,6 +1,6 @@
1
1
  import { P as Point, R as Rect } from './geometry-Bf37LbCT.js';
2
2
  import { S as StackFormKind } from './model-X7eUaKlA.js';
3
- import { S as Scene, a as ScenePlace, b as SceneLayout, c as StoredScene, d as SceneTarget, Z as Zone, e as Side, f as SceneNoteCode } from './model-BxFXr9UY.js';
3
+ import { S as Scene, a as ScenePlace, b as SceneLayout, c as StoredScene, d as SceneTarget, Z as Zone, e as Side, f as SceneNoteCode } from './model-DMB2ZFJ2.js';
4
4
  import './target-2RYYKkd1.js';
5
5
 
6
6
  /**
@@ -14,7 +14,7 @@ import {
14
14
  storeScene,
15
15
  targets,
16
16
  use
17
- } from "./chunk-5CSWQSH7.js";
17
+ } from "./chunk-COK4YNMF.js";
18
18
  import "./chunk-AE3BWTAE.js";
19
19
  import {
20
20
  centre,
@@ -1769,6 +1769,7 @@ function mapLayout(l, f2) {
1769
1769
  stack: mapFit(e.stack, f2),
1770
1770
  free: mapFit(e.free, f2),
1771
1771
  menu: e.menu ? { ...e.menu, items: e.menu.items.map(f2) } : null,
1772
+ items: (e.items ?? []).map(f2),
1772
1773
  tabs: e.tabs.map(f2),
1773
1774
  ...e.rides !== void 0 ? { rides: f2(e.rides) } : {}
1774
1775
  });