@n-uf/placement 26.11.56 → 26.11.58

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/dist/tiling.d.ts CHANGED
@@ -1,6 +1,52 @@
1
- import { S as Size, R as Rect, P as Point } from './geometry-L5gCoiZV.js';
1
+ import { R as Rect, S as Size, P as Point } from './geometry-L5gCoiZV.js';
2
+ import { S as Side, A as Axis } from './side-zvoEwBLn.js';
2
3
  import { Target } from './index.js';
3
4
 
5
+ /**
6
+ * The order layouts: panes in order and an area in, a rect per pane out. Pure rect functions; a drop on one reorders
7
+ * (the dragged pane inserted at an index, see `orderTargets`).
8
+ */
9
+
10
+ /**
11
+ * How a layout spaces its panes: `gap` px between neighbors (default 0), `ratio` the master's share (default 0.5),
12
+ * `handle` px a split's divider takes beside the gap (default 0; only a split tree reads it).
13
+ */
14
+ interface TileOptions {
15
+ readonly gap?: number;
16
+ readonly ratio?: number;
17
+ readonly handle?: number;
18
+ }
19
+ /**
20
+ * The master area: `count` panes (rounded, kept within 1..n; default 1) on `side` (default `"left"`). Left and right
21
+ * make it a column of panes stacked vertically; top and bottom a row of panes side by side. The one home of the
22
+ * concept: `masterStack` takes it in its options (`OrderOptions`), a split that lays out as master and stack in its
23
+ * `master` field.
24
+ */
25
+ interface MasterOptions {
26
+ readonly count?: number;
27
+ readonly side?: Side;
28
+ }
29
+ /** What the order layouts take: `TileOptions` and the master area's `count` and `side` (`columns` and `grid` ignore them). */
30
+ type OrderOptions = TileOptions & MasterOptions;
31
+ /** An order layout: `masterStack`, `columns`, `grid`, or the app's own of the same shape. */
32
+ type OrderLayout = <K>(panes: readonly K[], area: Rect, options?: OrderOptions) => Map<K, Rect>;
33
+ /** The master's share in effect: clamped to 0.05..0.95; one that is not finite is 0.5. */
34
+ declare const masterRatio: (v: number | undefined) => number;
35
+ /** How many of `n` panes are masters for a requested `count`: rounded, within 1..n; NaN is 1. */
36
+ declare function masterCount(count: number | undefined, n: number): number;
37
+ /**
38
+ * Master and stack: the first `count` panes are the masters, in an area on `side` that takes `ratio` of the room the
39
+ * gap leaves (clamped to 0.05..0.95; default 0.5); the rest are the stack, in the other area. Left and right make
40
+ * each area a column of panes stacked vertically; top and bottom a row of panes side by side. Right and bottom put
41
+ * the stack first in space. With no stack (n at most `count`) all the panes fill the area, stacked along the side's
42
+ * cross axis. Each area divides its length equally between its panes, the gap between them.
43
+ */
44
+ declare function masterStack<K>(panes: readonly K[], area: Rect, options?: OrderOptions): Map<K, Rect>;
45
+ /** Equal columns, full height. */
46
+ declare function columns<K>(panes: readonly K[], area: Rect, options?: TileOptions): Map<K, Rect>;
47
+ /** A grid as square as the count allows; the last row's cells widen to fill it. */
48
+ declare function grid<K>(panes: readonly K[], area: Rect, options?: TileOptions): Map<K, Rect>;
49
+
4
50
  /**
5
51
  * A pane's drop regions: a center rectangle (a drop there swaps with the pane) and four side trapezoids (a drop there
6
52
  * splits the pane on that side), formed by the diagonals from each pane corner to the nearest corner of the center.
@@ -11,10 +57,9 @@ import { Target } from './index.js';
11
57
  * a boundary doesn't flicker. A region that takes no drop is the consumer's to answer with a null place.
12
58
  */
13
59
 
14
- type PaneSide = "top" | "right" | "bottom" | "left";
15
- type PaneRegion = "center" | PaneSide;
60
+ type PaneRegion = "center" | Side;
16
61
  /** The sides in their tie-break order: at an exact diagonal the first wins (a corner resolves to `top`). */
17
- declare const PANE_SIDES: readonly PaneSide[];
62
+ declare const PANE_SIDES: readonly Side[];
18
63
  interface PaneRegionOptions {
19
64
  /** The center rectangle's share of each pane axis (0.05 to 0.95); `centerX` / `centerY` override one axis. */
20
65
  readonly center?: number;
@@ -53,51 +98,6 @@ declare function paneCenter(size: Size, options?: PaneRegionOptions): PaneCenter
53
98
  */
54
99
  declare function paneRegion(pane: Rect, point: Point, previous?: PaneRegion | null, options?: PaneRegionOptions): PaneRegion;
55
100
 
56
- /**
57
- * The order layouts: panes in order and an area in, a rect per pane out. Pure rect functions; a drop on one reorders
58
- * (the dragged pane inserted at an index, see `orderTargets`).
59
- */
60
-
61
- /**
62
- * How a layout spaces its panes: `gap` px between neighbors (default 0), `ratio` the master's share (default 0.5),
63
- * `handle` px a split's divider takes beside the gap (default 0; only a split tree reads it).
64
- */
65
- interface TileOptions {
66
- readonly gap?: number;
67
- readonly ratio?: number;
68
- readonly handle?: number;
69
- }
70
- /**
71
- * The master area: `count` panes (rounded, kept within 1..n; default 1) on `side` (default `"left"`). Left and right
72
- * make it a column of panes stacked vertically; top and bottom a row of panes side by side. The one home of the
73
- * concept: `masterStack` takes it in its options (`OrderOptions`), a split that lays out as master and stack in its
74
- * `master` field.
75
- */
76
- interface MasterOptions {
77
- readonly count?: number;
78
- readonly side?: PaneSide;
79
- }
80
- /** What the order layouts take: `TileOptions` and the master area's `count` and `side` (`columns` and `grid` ignore them). */
81
- type OrderOptions = TileOptions & MasterOptions;
82
- /** An order layout: `masterStack`, `columns`, `grid`, or the app's own of the same shape. */
83
- type OrderLayout = <K>(panes: readonly K[], area: Rect, options?: OrderOptions) => Map<K, Rect>;
84
- /** The master's share in effect: clamped to 0.05..0.95; one that is not finite is 0.5. */
85
- declare const masterRatio: (v: number | undefined) => number;
86
- /** How many of `n` panes are masters for a requested `count`: rounded, within 1..n; NaN is 1. */
87
- declare function masterCount(count: number | undefined, n: number): number;
88
- /**
89
- * Master and stack: the first `count` panes are the masters, in an area on `side` that takes `ratio` of the room the
90
- * gap leaves (clamped to 0.05..0.95; default 0.5); the rest are the stack, in the other area. Left and right make
91
- * each area a column of panes stacked vertically; top and bottom a row of panes side by side. Right and bottom put
92
- * the stack first in space. With no stack (n at most `count`) all the panes fill the area, stacked along the side's
93
- * cross axis. Each area divides its length equally between its panes, the gap between them.
94
- */
95
- declare function masterStack<K>(panes: readonly K[], area: Rect, options?: OrderOptions): Map<K, Rect>;
96
- /** Equal columns, full height. */
97
- declare function columns<K>(panes: readonly K[], area: Rect, options?: TileOptions): Map<K, Rect>;
98
- /** A grid as square as the count allows; the last row's cells widen to fill it. */
99
- declare function grid<K>(panes: readonly K[], area: Rect, options?: TileOptions): Map<K, Rect>;
100
-
101
101
  /**
102
102
  * The split tree: how panes divide an area. A node is a pane, or a split of its rect in two (`a` then `b`). A split
103
103
  * with an `axis` divides along it (`"x"`: `a` left of `b`; `"y"`: `a` above `b`) at `ratio`; one without divides
@@ -115,7 +115,7 @@ type Split<K> = {
115
115
  } | {
116
116
  readonly a: Split<K>;
117
117
  readonly b: Split<K>;
118
- readonly axis?: "x" | "y";
118
+ readonly axis?: Axis;
119
119
  readonly ratio?: number;
120
120
  readonly gap?: number;
121
121
  readonly id?: string;
@@ -128,7 +128,7 @@ declare const panesOf: <K>(tree: Split<K> | null) => K[];
128
128
  * means the same whatever the pane's shape; no side splits along the longer side, `pane` second (dwindle). An empty
129
129
  * tree becomes `pane` alone; an `at` that isn't in the tree (or null) splits the whole tree, so no pane is lost.
130
130
  */
131
- declare function splitPane<K>(tree: Split<K> | null, at: K | null, pane: K, side?: PaneSide): Split<K>;
131
+ declare function splitPane<K>(tree: Split<K> | null, at: K | null, pane: K, side?: Side): Split<K>;
132
132
  /** `tree` without `pane`: its sibling takes their parent's place. */
133
133
  declare function removePane<K>(tree: Split<K> | null, pane: K): Split<K> | null;
134
134
  /** `tree` with panes `x` and `y` in each other's place; unchanged unless both are in it. */
@@ -177,9 +177,9 @@ interface MinLength {
177
177
  * chooses one for a pane.
178
178
  */
179
179
  interface SplitOptions<K> extends TileOptions {
180
- readonly fixed?: (child: Split<K>, axis: "x" | "y") => FixedLength | undefined;
181
- readonly fixedAcross?: (child: Split<K>, axis: "x" | "y") => number | undefined;
182
- readonly floor?: (child: Split<K>, axis: "x" | "y", split: Split<K>) => MinLength;
180
+ readonly fixed?: (child: Split<K>, axis: Axis) => FixedLength | undefined;
181
+ readonly fixedAcross?: (child: Split<K>, axis: Axis) => number | undefined;
182
+ readonly floor?: (child: Split<K>, axis: Axis, split: Split<K>) => MinLength;
183
183
  }
184
184
  /** A laid-out split: the box it divides, its axis and ratio in effect, and the strip between its two sides. */
185
185
  interface SplitGeometry {
@@ -256,11 +256,11 @@ interface SplitRoomOptions {
256
256
  * gutter (`gap` plus `handle`), across it `min`. The rect is the pane's as the host measures it, where it will be
257
257
  * when the dragged pane is lifted out. `canDropOnPane`'s first rule, for a side.
258
258
  */
259
- declare function canSplitPane(target: Rect, side: PaneSide, options: SplitRoomOptions): DropVerdict;
259
+ declare function canSplitPane(target: Rect, side: Side, options: SplitRoomOptions): DropVerdict;
260
260
  /** What `dropFits` reads: the `min` (as in `DropOptions`) and the `side` of `at` the drop is on, for the reason. */
261
261
  interface DropFitsOptions {
262
262
  readonly min: number;
263
- readonly side: PaneSide;
263
+ readonly side: Side;
264
264
  }
265
265
  /**
266
266
  * The fit rule: in `projected`, the rect of every pane in the layout the drop makes (the host's own projection of
@@ -312,6 +312,226 @@ declare function giveWay<K>(panes: readonly K[], layout: (kept: readonly K[]) =>
312
312
  floats: K[];
313
313
  };
314
314
 
315
+ /**
316
+ * One layout for a tiling drag's held frame and its commit, the layout half: `tilingDrag(tree, subject, options)` gives
317
+ * the drag's base (the tree with the subject released, laid out), its home (the gap the release leaves) and
318
+ * `after(held)`, THE layout of each held place: what a release there commits, and what a frame holding it draws.
319
+ *
320
+ * The host keeps its own tree type and its own changes; it hands them over as a `TilingTree` adapter. The library owns
321
+ * the rules: what is released and when, which tree each change takes, home, the refusals, and the one layout per held
322
+ * place. Geometry has one source: the adapter gives the tree as a `Split` (`split`), and the library lays it out with
323
+ * `layoutSplitTree` under the drag's options (`SplitOptions` plus `min`, as `canDropOnPane` takes them).
324
+ *
325
+ * The hit half (targets, a pane's parts, `placeOf`) is not here yet. See docs/placement.md, Entry: tiling.
326
+ */
327
+
328
+ /** A stack as the adapter reports it: its id, its members in order, and the member it is drawn as. */
329
+ interface TilingStack<K> {
330
+ readonly id: string;
331
+ readonly members: readonly K[];
332
+ readonly active: K;
333
+ }
334
+ /**
335
+ * What a drag moves: one pane (a member of a stack is torn out of it), or a whole stack, every member as one. A stack
336
+ * subject carries the stack as the adapter reported it at the lift (`stackOf`), so the changes that place it after its
337
+ * release (`beside`, `join`) have its members.
338
+ */
339
+ type TilingSubject<K> = {
340
+ readonly kind: "pane";
341
+ readonly pane: K;
342
+ } | {
343
+ readonly kind: "stack";
344
+ readonly stack: TilingStack<K>;
345
+ };
346
+ /**
347
+ * How a side drop sizes the split it makes. One kind today: the two panes take half each (the split `splitPane`
348
+ * writes). A later rule may size the subject by its own length; it will be a new kind here, never an option.
349
+ */
350
+ type TilingSize = {
351
+ readonly kind: "half";
352
+ };
353
+ /**
354
+ * The host's tree, as a drag reads and changes it. Every function is pure: it never changes the tree it is given, and
355
+ * returns a new tree (or the same one when nothing changes).
356
+ *
357
+ * Which tree each change takes, and why:
358
+ * - `beside` and `join` take the **released** tree (`release`'s result): the subject leaves its old place first, so the
359
+ * place it lands in is measured, and changed, without it. A pane beside its own old sibling then lands as if it were
360
+ * new there, and a stack never holds the subject twice.
361
+ * - `swap` takes the tree **with the subject still in it**: a swap exchanges two places, and the subject's old place is
362
+ * exactly where the partner goes. With the subject released there would be no old place to give the partner.
363
+ */
364
+ interface TilingTree<T, K> {
365
+ /** The tree as panes divide the area: a `Split` of the drawn panes (a stack stands in it as its active member's key). */
366
+ split(tree: T): Split<K> | null;
367
+ /** The stack `pane` is a member of, or null; leave it out when the tree has no stacks. */
368
+ stackOf?(tree: T, pane: K): TilingStack<K> | null;
369
+ /** `tree` without the subject: a pane leaves its place (or its stack), a stack leaves with every member. */
370
+ release(tree: T, subject: TilingSubject<K>): T;
371
+ /** The released tree with the subject placed on `side` of the drawn pane `at`, sized by `size`. */
372
+ beside(released: T, subject: TilingSubject<K>, at: K, side: Side, size: TilingSize): T;
373
+ /**
374
+ * `tree` (the subject still in it) with the subject and the drawn pane `at` in each other's place.
375
+ * - A pane subject and `at` each take the other's slot, in the split or in a stack. The swap moves `at` alone, never
376
+ * the stack it stands for: when `at` is a stack's drawn member, the subject takes its place in that stack (drawn,
377
+ * as `at` was) and the stack's other members stay; `at` goes to the subject's old slot (alone, or in the subject's
378
+ * stack, at its index, when the subject is a member torn out of one).
379
+ * - A whole stack subject trades its drawn slot in the split with `at`'s; when `at` is a stack's drawn member, the
380
+ * two stacks trade places, each whole.
381
+ */
382
+ swap(tree: T, subject: TilingSubject<K>, at: K): T;
383
+ /** The released tree with the subject joined to the drawn pane `at`'s stack (made one when `at` is alone), at `index` (default: last). Leave it out when the tree has no stacks: every join is refused `"join"`. */
384
+ join?(released: T, subject: TilingSubject<K>, at: K, index?: number): T;
385
+ /** Commit-time reconciliation: part of every `after` but home's, so what a frame draws is what a release stores. Default: none. */
386
+ normalize?(tree: T): T;
387
+ }
388
+ /** What `tilingDrag` reads: the adapter, the stage, and the layout options (`SplitOptions` plus `min`, the least pane width and height a drop keeps). */
389
+ interface TilingDragOptions<T, K> extends DropOptions<K> {
390
+ readonly ops: TilingTree<T, K>;
391
+ /** The stage the tree is laid out in, px. */
392
+ readonly area: Rect;
393
+ /** Panes that take no drop (a swap, a side or a join on one is refused `"still"`). Default: none. */
394
+ readonly still?: (pane: K) => boolean;
395
+ }
396
+ /** A held place of a drag: where a release now lands. `at` is always a pane drawn in the base. */
397
+ type TilingHeld<K> = {
398
+ readonly kind: "home";
399
+ } | {
400
+ readonly kind: "swap";
401
+ readonly at: K;
402
+ } | {
403
+ readonly kind: "beside";
404
+ readonly at: K;
405
+ readonly side: Side;
406
+ } | {
407
+ readonly kind: "join";
408
+ readonly at: K;
409
+ readonly index?: number;
410
+ };
411
+ /**
412
+ * Why a held place takes no release, as a code:
413
+ * - `self`: the place is the subject's own (a swap or side of the subject itself, a swap with its own stack, a whole
414
+ * stack joined to itself);
415
+ * - `still`: `at` is a still pane;
416
+ * - `missing`: `at` is not a pane drawn in the base;
417
+ * - `join`: the adapter has no `join`;
418
+ * - `room-along`, `room-across`: `at` is too short for two panes along the split, or too narrow across it, in the base
419
+ * (`canSplitPane`): `need` and `have` px;
420
+ * - `fit`: in the layout the release makes (a side, a swap or a join), `pane` (the subject's drawn key or `at`'s) is
421
+ * below `min` wide or high, the fit rule of `dropFits`. A swap hands each pane the other's rect, so either may fall
422
+ * below it; a join is judged on the stack's rect.
423
+ */
424
+ type TilingRefusal<K> = {
425
+ readonly code: "self" | "still" | "missing" | "join";
426
+ } | {
427
+ readonly code: "room-along" | "room-across";
428
+ readonly need: number;
429
+ readonly have: number;
430
+ } | {
431
+ readonly code: "fit";
432
+ readonly pane: K;
433
+ };
434
+ /** A tree laid out: every drawn pane's rect, and the geometry of each split that has an id. */
435
+ interface TilingLaidOut<T, K> {
436
+ readonly tree: T;
437
+ readonly layout: ReadonlyMap<K, Rect>;
438
+ readonly splits: ReadonlyMap<string, SplitGeometry>;
439
+ }
440
+ /** A pane a commit moves, from where it was drawn at the lift to where the commit puts it. */
441
+ interface TilingMove<K> {
442
+ readonly pane: K;
443
+ readonly from: Rect;
444
+ readonly to: Rect;
445
+ }
446
+ /** THE layout of a held place: what a release commits, and what a frame holding it draws. */
447
+ interface TilingAfter<T, K> extends TilingLaidOut<T, K> {
448
+ readonly held: TilingHeld<K>;
449
+ /**
450
+ * Why a release here commits nothing, or null. A refused place's tree and layout are the lift's (what its release
451
+ * keeps), its landing null and nothing moved; a frame holding it draws rest (the base).
452
+ */
453
+ readonly refusal: TilingRefusal<K> | null;
454
+ /** The subject's rect in `layout`: its own when it is drawn, else its stack's. Null when refused. */
455
+ readonly landing: Rect | null;
456
+ /** Every other drawn pane whose rect differs from the lift's (the swap partner, the panes that give room), in `layout`'s order. */
457
+ readonly moved: readonly TilingMove<K>[];
458
+ }
459
+ /** A drag of one subject: its base, its home, and the one layout of each held place. */
460
+ interface TilingDrag<T, K> {
461
+ readonly subject: TilingSubject<K>;
462
+ /** The tree at the lift, laid out: what is drawn before the drag, and what a release on home commits. */
463
+ readonly lift: TilingLaidOut<T, K>;
464
+ /** The hit basis, fixed for the drag: the tree with the subject released, laid out. What a frame draws at rest (nothing held, or a refused place). */
465
+ readonly base: TilingLaidOut<T, K>;
466
+ /**
467
+ * The gap the release leaves: the subject's lift rect when releasing it takes a drawn pane away (a pane alone, a
468
+ * whole stack), null when it takes none (a member torn out of a stack that stays drawn).
469
+ */
470
+ readonly home: Rect | null;
471
+ /** THE layout of `held`. Remembered per held place: the same place gives the same object. */
472
+ after(held: TilingHeld<K>): TilingAfter<T, K>;
473
+ }
474
+ /**
475
+ * The drag of `subject` in `tree`: its lift and base layouts, its home, and `after(held)`, the one layout of each held
476
+ * place. `tree` is never changed; `after({ kind: "home" }).tree` is `tree` itself.
477
+ *
478
+ * - **`after(held).tree`** is what a release commits: `normalize(change)`, where the change is `beside` or `join` on
479
+ * the released tree, or `swap` on the lift tree (see `TilingTree` for why). Home's is the lift tree, never normalized.
480
+ * - **`layout`** is that tree laid out, so a frame that draws it draws exactly what the release stores.
481
+ * - **Refusals** are judged on the base (room) and on the change's own layout (fit), never on another tree.
482
+ *
483
+ * Throws when the subject is not in `tree` (neither drawn nor a member of a drawn stack): a drag has nothing to lift.
484
+ */
485
+ declare function tilingDrag<T, K>(tree: T, subject: TilingSubject<K>, options: TilingDragOptions<T, K>): TilingDrag<T, K>;
486
+
487
+ /**
488
+ * The reference `TilingTree` adapter: placement's own `Split`, with optional stacks beside it. Tests, labs and hosts
489
+ * whose tree is a `Split` use it as it is; a host with its own tree reads it as the worked example of each change.
490
+ * See docs/placement.md, Entry: tiling.
491
+ */
492
+
493
+ /**
494
+ * A split tree with stacks: `split` divides the area among the drawn panes, and each stack stands in it as its
495
+ * `active` member's key. A pane in no stack is drawn alone. A stack of one is kept until `normalize` makes it a pane.
496
+ */
497
+ interface StackedSplit<K> {
498
+ readonly split: Split<K> | null;
499
+ readonly stacks?: readonly TilingStack<K>[];
500
+ }
501
+ /**
502
+ * The reference adapter over `StackedSplit<K>`:
503
+ * - `release`: a whole stack leaves the split (its drawn key, `removePane`) and the stack list; a pane in a stack leaves
504
+ * its members (the next member, else the one before, is drawn when it was the active one); a pane alone leaves the split;
505
+ * - `beside`: `splitPane` on `at`'s side (a half split), a whole stack drawn as its active member and kept whole;
506
+ * - `swap`: a pane trades keys with `at` wherever each is (the split, a stack's members), so each takes the other's
507
+ * place; a whole stack trades its drawn place in the split with `at`'s;
508
+ * - `join`: the subject's members go into `at`'s stack at `index` (default last; clamped), the first of them drawn; a
509
+ * pane `at` alone becomes a stack, its id `stack:<at>` (made unique);
510
+ * - `normalize`: a stack of fewer than two members becomes its pane; the same object when there is none.
511
+ */
512
+ declare function splitTreeOps<K>(): TilingTree<StackedSplit<K>, K>;
513
+
514
+ /** The properties, by name (each is a key of `TilingConformance.counts`). */
515
+ declare const TILING_PROPERTIES: readonly ["home-is-lift", "home-is-the-gap", "home-over-changed", "one-layout", "swap-exchanges", "swap-trades-slots", "swap-keeps-stack-mates", "subject-once", "release-first", "stack-moves-whole", "normalize-idempotent", "nothing-changes"];
516
+ type TilingProperty = (typeof TILING_PROPERTIES)[number];
517
+ /** A conformance run: whether every property held, the first failures (in words), and per property how many checks ran and failed. */
518
+ interface TilingConformance {
519
+ readonly ok: boolean;
520
+ readonly failures: readonly string[];
521
+ readonly counts: Readonly<Record<TilingProperty, {
522
+ readonly checked: number;
523
+ readonly failed: number;
524
+ }>>;
525
+ }
526
+ /** Every subject a tree offers: each pane drawn alone, each stack whole, and each member of a stack torn out of it. */
527
+ declare function tilingSubjects<T, K>(tree: T, options: Pick<TilingDragOptions<T, K>, "ops">): TilingSubject<K>[];
528
+ /**
529
+ * Runs every property on every subject of every tree (`tilingSubjects`) and every held place of its drag: home, and for
530
+ * each pane drawn in the base a swap, the four sides and a join (last and first). Trees are taken as committed ones,
531
+ * so `normalize` (if any) must leave them as they are. Gives the first `limit` failures (default 20) in words.
532
+ */
533
+ declare function tilingConformance<T, K>(trees: Iterable<T>, options: TilingDragOptions<T, K>, limit?: number): TilingConformance;
534
+
315
535
  /**
316
536
  * The nearest pane in a direction: the rule a host moves focus by. See docs/placement.md, Entry: tiling.
317
537
  */
@@ -332,4 +552,4 @@ type Direction = "left" | "right" | "up" | "down";
332
552
  */
333
553
  declare function neighbor<K>(rects: ReadonlyMap<K, Rect>, from: K, direction: Direction): K | null;
334
554
 
335
- export { type Direction, type DropFitsOptions, type DropOptions, type DropVerdict, type FixedLength, type MasterOptions, type MinLength, type OrderLayout, type OrderOptions, type OrderTarget, PANE_REGION_DEFAULTS, PANE_SIDES, type PaneCenter, type PaneRegion, type PaneRegionOptions, type PaneSide, type PaneTarget, type PaneTargetsOptions, Rect, type Split, type SplitGeometry, type SplitLayout, type SplitOptions, type SplitRoomOptions, type TileOptions, canDropOnPane, canSplitPane, columns, dropFits, dropOnPane, giveWay, grid, layoutSplit, layoutSplitTree, masterCount, masterRatio, masterStack, neighbor, orderTargets, paneCenter, paneRegion, paneTargets, panesOf, removePane, splitFromOrder, splitPane, swapPanes };
555
+ export { type Direction, type DropFitsOptions, type DropOptions, type DropVerdict, type FixedLength, type MasterOptions, type MinLength, type OrderLayout, type OrderOptions, type OrderTarget, PANE_REGION_DEFAULTS, PANE_SIDES, type PaneCenter, type PaneRegion, type PaneRegionOptions, type PaneTarget, type PaneTargetsOptions, Rect, type Split, type SplitGeometry, type SplitLayout, type SplitOptions, type SplitRoomOptions, type StackedSplit, TILING_PROPERTIES, type TileOptions, type TilingAfter, type TilingConformance, type TilingDrag, type TilingDragOptions, type TilingHeld, type TilingLaidOut, type TilingMove, type TilingProperty, type TilingRefusal, type TilingSize, type TilingStack, type TilingSubject, type TilingTree, canDropOnPane, canSplitPane, columns, dropFits, dropOnPane, giveWay, grid, layoutSplit, layoutSplitTree, masterCount, masterRatio, masterStack, neighbor, orderTargets, paneCenter, paneRegion, paneTargets, panesOf, removePane, splitFromOrder, splitPane, splitTreeOps, swapPanes, tilingConformance, tilingDrag, tilingSubjects };