@n-uf/docking 26.11.54 → 26.11.55

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.
@@ -97,6 +97,20 @@ interface DockItem {
97
97
  * menu the highest priority.
98
98
  */
99
99
  readonly priority?: number;
100
+ /**
101
+ * The length a person asked it to have along its edge, px, per axis: `column` for an item in a side column, `row` for
102
+ * one in a bar (default none; `StackLengths` in `@n-uf/placement/stack`). While it is in a form that grows, `solve`
103
+ * hands it to the edge's stack, which reads it in place of the form's natural: spare length goes in proportion to the
104
+ * asked lengths, a short edge interpolates toward the least. It is per axis, so an item moved to an edge of the other
105
+ * axis never reads it, and it travels with the item when it moves, closes and reopens. It is in ask units, not drawn
106
+ * px: with room to spare a drawn size is the ask times the shared scale, or its least when that is more (a 0 is no length). `resizeBetween` and `resetBetween` set it for
107
+ * the pair only; `resetLengths` clears it; `storeDockState` keeps it. A state that declares none lays
108
+ * out exactly as before.
109
+ */
110
+ readonly lengths?: {
111
+ readonly column?: number;
112
+ readonly row?: number;
113
+ };
100
114
  /**
101
115
  * Its size as a float, per orient: `floatAt` with no rect uses the one for the orient it floats in, and a float drop or
102
116
  * a hand resize sets it for the orient the float is in, so a float turned to the other orient (`orientFloat`) takes that
@@ -905,7 +919,7 @@ declare function dockHome(state: DockState, id: string, start: DockState): DockS
905
919
  * v: 1;
906
920
  * edges: { id: string; side: Side; ring: number; items: string[]; size?: number; column?: true }[];
907
921
  * floats: { id: string; x: number; y: number; width: number; height: number; orient?: "row" | "column"; anchor?: FloatAnchor | { at: FloatAnchor; dx?: number; dy?: number }; since?: number }[];
908
- * items: Record<string, { used: number; kept?: true; from?: number; closed?: true; align?: "center" | "end"; space?: number; floatSizes?: { row?: { width: number; height: number }; column?: { width: number; height: number } } }>;
922
+ * items: Record<string, { used: number; kept?: true; from?: number; closed?: true; align?: "center" | "end"; space?: number; lengths?: { column?: number; row?: number }; floatSizes?: { row?: { width: number; height: number }; column?: { width: number; height: number } } }>;
909
923
  * railModes?: { left?: "titles" | "icons"; right?: "titles" | "icons" };
910
924
  * }
911
925
  * ```
@@ -932,6 +946,10 @@ declare function dockHome(state: DockState, id: string, start: DockState): DockS
932
946
  * lies by its anchor, so the clamp never turns it into a pixel position). An unusable anchor is dropped
933
947
  * (`float:<id>:anchor`), and so is a bad offset field (`float:<id>:anchor:dx`, `float:<id>:anchor:<field>`). A float's
934
948
  * `since` is kept as stored; one that isn't a number from 0 to `Number.MAX_SAFE_INTEGER` is dropped (`float:<id>:since`).
949
+ * An item's asked lengths (`DockItem.lengths`) are stored per axis; one entry that isn't a number over 0 (a 0 is no length, so it is not stored), or an axis that
950
+ * isn't `row` or `column`, is dropped (`item:<id>:lengths:<axis>`), a `lengths` that isn't an object too
951
+ * (`item:<id>:lengths`). A store from before has none, and an item then reads with none whatever `base` had: the store
952
+ * is the state's own.
935
953
  * A float's size is stored per orient (`floatSizes`); one entry that isn't a size, or an orient that isn't `row` or
936
954
  * `column`, is dropped (`item:<id>:floatSizes:<orient>`). A store from before that, with one `floatSize` on an item,
937
955
  * reads as `floatSizes` for the orient its float is in (the item's own orient where it floats nowhere), so the size
@@ -969,6 +987,11 @@ interface StoredDockStateItem {
969
987
  readonly align?: "center" | "end";
970
988
  /** `DockItem.space`, px. */
971
989
  readonly space?: number;
990
+ /** `DockItem.lengths`: the length asked for, per axis. */
991
+ readonly lengths?: {
992
+ readonly column?: number;
993
+ readonly row?: number;
994
+ };
972
995
  /** `DockItem.floatSizes`: its float size per orient. */
973
996
  readonly floatSizes?: {
974
997
  readonly row?: Size;
@@ -1027,6 +1050,11 @@ interface DropResult {
1027
1050
  interface DockDrop extends Target {
1028
1051
  /** The item dragged. */
1029
1052
  readonly item: string;
1053
+ /**
1054
+ * Where a release here puts the item. A host tells a home (nothing committed) by `place.kind === "home"`, never by the
1055
+ * id: a home keeps the id of the first of its edge's places that puts the item back (`gap:<edge>:<zone>:<at>` on a
1056
+ * real edge, `rail:<side>:<ring>` on its rail), and `home:<id>` alone covers the item's own rect.
1057
+ */
1030
1058
  readonly place: DropPlace;
1031
1059
  /** Gaps and strips: the line where the item's leading edge lands, zero thick, across the edge after the drop. */
1032
1060
  readonly marker?: Rect;
@@ -1099,8 +1127,8 @@ interface DockRefusal {
1099
1127
  * fixed pitch over those stretches instead (`SPOT_PITCH`), so a toolbar lands close to the hand. Each spot keys where its drop draws the other items (a change between two spots
1100
1128
  * with the same key moves only the held item), and each lane carries its place guides' marks in the layout as drawn.
1101
1129
  * Each spot has a stretch of the lane that picks it. In a panel column, between two spots that share a neighbor (the
1102
- * item `Y` in `X|Y` and `Y|Z`), the boundary is that item's middle as drawn (in the held spot's own layout with
1103
- * `options.spot`, so a column takes a panel by halves of what is seen). On a bar or a toolbar rail, and between any two
1130
+ * item `Y` in `X|Y` and `Y|Z`), the boundary is that item's middle as drawn (with a spot held, in that spot's own layout:
1131
+ * `dockDrag`'s `spotsOf`, so a column takes a panel by halves of what is seen). On a bar or a toolbar rail, and between any two
1104
1132
  * other spots, it is halfway across the gap between their landings, each in its own layout, so the pointer is at the
1105
1133
  * landing it picks and a toolbar moved along an occupied lane stays at the hand. On a bar or a toolbar rail, two landings
1106
1134
  * that overlap (spots a pitch apart, the pointer inside both) are cut where the item is held (`options.grab`): halfway
@@ -1109,7 +1137,8 @@ interface DockRefusal {
1109
1137
  * kept inside the lane and in order. The spots come from the same generation and filter as `targets()`, so a spot's
1110
1138
  * landing is exactly what its drop commits. Spot ids are keyed by the lane, zone and neighboring items, so they survive
1111
1139
  * the window resizing and most items opening or moving; virtual lanes are keyed by the column they lie beside, not
1112
- * their ring. Remembered per state and options; a call with `spot` reworks only the held lane's stretches.
1140
+ * their ring. Remembered per state and options. The one layout of each held place of the drag (a held frame and its commit)
1141
+ * is `dockDrag`'s (./drag), built on these.
1113
1142
  */
1114
1143
 
1115
1144
  /** The pitch of the spots over a bar's free stretches, px: a quarter of a typical toolbar's length (158 px in the lab). */
@@ -1188,8 +1217,8 @@ interface LaneRefusal {
1188
1217
  * aside when the lane opens. Never a box or a line over an item drawn there, nor anything over the held one; nothing in
1189
1218
  * a refused stretch; no two edge lanes' marks overlap (at a corner a lane not drawn gives way to a drawn one, and
1190
1219
  * between two not drawn the bar owns it; a virtual lane, a new column's line or a declared rail, is drawn over what it
1191
- * would push). As seen (no `spot`) the lifted item is drawn nowhere, so its own place is free room
1192
- * in its lane; with `spot`, every lane's marks lie in that spot's layout (the held item there, its room open).
1220
+ * would push). Marks lie in one layout: as seen the lifted item is drawn nowhere, so its own place is free room in its
1221
+ * lane; in a held place's layout (`after(held)`) every lane's marks lie in that layout, the held item where it draws it.
1193
1222
  */
1194
1223
  interface DockMark {
1195
1224
  /**
@@ -1216,21 +1245,10 @@ interface DockLane {
1216
1245
  readonly spots: readonly DockSpot[];
1217
1246
  readonly refused: readonly LaneRefusal[];
1218
1247
  /**
1219
- * Its place guides' marks, in the layout as drawn (the held spot's, with `options.spot`). An edge lane empty as seen
1220
- * with one spot (or one sliding spot) is the exception (`emptyLanes: "real"`, no `spot`): its marks are predicted, in
1221
- * the after-entry layout of that spot, the same marks `lanes(…, { spot })` gives it once held. Where that prediction
1222
- * overlaps another lane's marks (a corner two empty lanes share, a drawn rail's end) it gives the overlap up here: to
1223
- * every lane not predicted, and between two predicted lanes the bar owns the corner. `entry` keeps it whole.
1248
+ * Its place guides' marks as seen: in the window as seen, the held item drawn nowhere (its own place is free room).
1249
+ * A held frame's marks, and the guides of a frame, are `dockDrag(...).after(held)` and `guides(frame)`'s (./drag).
1224
1250
  */
1225
1251
  readonly marks: readonly DockMark[];
1226
- /**
1227
- * The predicted marks whole, each corner they share owned (`marks` less nothing), where `marks` gave some of them up:
1228
- * what a landing model shows for this lane while it is the lane the pointer picks (held, pending or approached), the
1229
- * other lanes' marks cut where they overlap it. Absent where `marks` is the whole prediction, or nothing is predicted.
1230
- */
1231
- readonly entry?: readonly DockMark[];
1232
- /** The lanes whose marks `entry` overlaps (the ones it gave the overlap up to in `marks`), with `entry`. */
1233
- readonly corners?: readonly string[];
1234
1252
  /**
1235
1253
  * Its rect is its own: a rail drop strip at the window's side (`DockState.railDrop`), which every other target of the drag
1236
1254
  * gives up. A landing model gives it the pointer inside it over any lane it overlaps (a flush column's edge).
@@ -1276,12 +1294,9 @@ interface DockLaneOptions extends DockDropOptions {
1276
1294
  readonly stretchPositions?: "free" | "pitched";
1277
1295
  /** Under `"free"`, how near a snap point a landing snaps to it, px (default 8). */
1278
1296
  readonly snapDistance?: number;
1279
- /** The spot held now: its lane's stretches are drawn in its own layout (the room open). Default: the layout as seen. */
1280
- readonly spot?: string;
1281
1297
  /**
1282
1298
  * Where the pointer holds the item, from its top left corner as it is now, px (what a target's `after(point, grab)`
1283
- * takes): the press's, constant for the drag (each grab is remembered as its own options), and the same in the call
1284
- * with `spot`. It counts along the item's own length only (its longer side as it is now): on a bar or a toolbar rail
1299
+ * takes): the press's, constant for the drag (each grab is remembered as its own options). It counts along the item's own length only (its longer side as it is now): on a bar or a toolbar rail
1285
1300
  * along that axis the cut between two overlapping landings lies halfway between the points the pointer would hold in
1286
1301
  * each (with landings of one length; at the same share of each), kept within half a pitch of their overlap, so a
1287
1302
  * pointer back at its press point picks the item's own place; landings with a gap between them (either side of a long
@@ -1309,8 +1324,8 @@ type EmptyLanes = "real" | "edge";
1309
1324
  /**
1310
1325
  * The lanes and regions of a drag of `dragged`: every lane that takes it with its spots and stretches, the refused
1311
1326
  * places outside lanes, the content and what blocks it, the stage, the float region, the item's size and the float
1312
- * target. Remembered per state and options (`previous` by identity); with `spot`, only the held lane's stretches are
1313
- * worked out again, in that spot's own layout.
1327
+ * target, each lane's marks as seen (at rest, the held item drawn nowhere). Remembered per state and options (`previous`
1328
+ * by identity). A held frame's lanes are `dockDrag(...).after(held)`'s (./drag).
1314
1329
  */
1315
1330
  declare function lanes(state: DockState, dragged: string, options?: DockLaneOptions): DockRegions;
1316
1331
  /**
@@ -1324,4 +1339,101 @@ declare const HATCH_END = 8;
1324
1339
  */
1325
1340
  declare const HATCH_EDGE = 8;
1326
1341
 
1327
- export { type RailPlace as $, type DockStateRead as A, type DropPlace as B, type ColumnPlace as C, type DockItem as D, type DropResult as E, type FloatAnchorAt as F, EDGE_ROOM_HOLD as G, type EmptyLanes as H, FLOAT_ANCHORS as I, type FloatAnchorOffset as J, type Kind as K, type FloatPlace as L, type FloatResize as M, HATCH_EDGE as N, type Orient as O, HATCH_END as P, type KeepClear as Q, type RailMode as R, type Side as S, type LaneRefusal as T, type LaneSlide as U, type Place as V, RAIL_MODES as W, RAIL_STRIP_MIN as X, RAIL_VISIBILITIES as Y, type ZoneAccepts as Z, type RailDropPolicy as _, type FloatAnchor as a, type RailSpec as a0, type RailVisibility as a1, type ResizeEdges as a2, type ResizeLimit as a3, SIDES as a4, SPOT_PITCH as a5, type StoredDockState as a6, type StoredDockStateEdge as a7, type StoredDockStateFloat as a8, type StoredDockStateItem as a9, ZONES as aa, canFold as ab, closeItem as ac, dockHome as ad, fitResize as ae, floatAt as af, foldItem as ag, homeFor as ah, keepItem as ai, lanes as aj, liftItem as ak, markUsed as al, mergeSideColumns as am, moveTo as an, openItem as ao, orientFloat as ap, raiseFloat as aq, readDockState as ar, resizeEdge as as, resizeFloat as at, setRailMode as au, setSide as av, storeDockState as aw, type Zone as b, type DockState as c, type DockEdge as d, type SolveOptions as e, type DockLayout as f, type DockRefusal as g, type DockDropOptions as h, type DockDrop as i, type ColumnTemplate as j, DEFAULT_FLOAT_SIZE as k, DEFAULT_HIT_BAND as l, DEFAULT_RAIL_MAGNET as m, DEFAULT_STRIP as n, type DockEdgeLayout as o, type DockFloat as p, type DockItemLayout as q, type DockLane as r, type DockLaneOptions as s, type DockMark as t, type DockNote as u, type DockNoteCode as v, type DockPlace as w, type DockRailLayout as x, type DockRegions as y, type DockSpot as z };
1342
+ /**
1343
+ * One layout for a drag's held frame and its commit: `dockDrag(state, dragged, options)` gives the drag's hit-testing
1344
+ * data (`regions`, as seen) and `after(held)`, THE layout of a held place of the drag. While its room is open, a held frame
1345
+ * draws every item, the landing and every guide from `after(held)` (docs/docking.md, "What a held frame draws"), and a
1346
+ * release commits exactly `after(held).state`.
1347
+ *
1348
+ * - **A held place** (`DockHeld`) is where a release now lands: a lane's spot with the pointer (`point`; a sliding spot
1349
+ * lands where the hand holds it, the one sliding rule `LaneSlide` states), or the float at the pointer. No held place
1350
+ * (`null`) is rest: the drag lands nowhere (home, refused, nowhere), and the layout is the window as seen, the held item
1351
+ * drawn nowhere.
1352
+ * - **`after(held)`**: the dock state a release commits and its layout (`solve` with the drag's `previous`, as the commit
1353
+ * solves it), the held item's rect there (`landing`, null at rest), every lane's marks in that one layout (`marks`),
1354
+ * and for a spot the held lane's spots with their stretches in that layout (`spots`: a panel column by halves of what
1355
+ * it draws, the hit data along a held lane). Remembered per held place.
1356
+ * - **`shown(frame)`**: the layout a landing frame draws: `after(frame.held).layout` while `frame.room` is open, else
1357
+ * the window at rest.
1358
+ * - **`guides(frame)`**: the place guides of a landing frame, each lane's from the held place it names (rule B): a lane's
1359
+ * guide is drawn in the layout on screen (`shown(frame)`), less the landing the pointer would take there; only a lane
1360
+ * that isn't drawn on screen takes the layout that creates it (its would-land held place's for the Near lane, its one
1361
+ * spot's for any other), and gives up where it meets a lane drawn on screen (between two such, the bar keeps the
1362
+ * corner). Under "all", the Near lane's marks win where they meet another lane's: the others are cut there.
1363
+ *
1364
+ * The shapes fit `@n-uf/motion/drag`'s landing model as they are (`regions`, `landingOf`, `spotsOf`; the frame's
1365
+ * `held` and `guides`), though neither package imports the other.
1366
+ */
1367
+
1368
+ /** A held place of a drag: where a release now lands (`@n-uf/motion/drag`'s `LandingHeld` fits it). `null` is rest (it lands nowhere). */
1369
+ type DockHeld = {
1370
+ readonly kind: "spot";
1371
+ /** The spot's id (`DockSpot.id`). */
1372
+ readonly spot: string;
1373
+ /** The pointer, in the regions' space: where a sliding spot's landing starts (`LaneSlide`); a fixed spot ignores it. */
1374
+ readonly point: Point;
1375
+ } | {
1376
+ readonly kind: "float";
1377
+ /** The pointer: the float lands where it holds the item (`DockDrop.after(point, grab)`). */
1378
+ readonly point: Point;
1379
+ };
1380
+ /** A lane's mark in one layout, with its lane. */
1381
+ interface DockLaneMark extends DockMark {
1382
+ readonly lane: string;
1383
+ }
1384
+ /** THE layout of a held place of a drag: what a release commits, and what its held frame draws while its room is open. */
1385
+ interface DockAfter extends DropResult {
1386
+ /** The held item's rect in `layout`, or null at rest (and where a float can't land). */
1387
+ readonly landing: Rect | null;
1388
+ /** Every lane's marks in `layout`: no two lanes' overlap, none covers an item drawn there or the landing. */
1389
+ readonly marks: readonly DockLaneMark[];
1390
+ /** A spot's: its lane's spots with their stretches cut in `layout` (along a held lane, the spot ranges as drawn). */
1391
+ readonly spots?: readonly DockSpot[];
1392
+ }
1393
+ /** A place guide as a frame draws it: a lane's mark in the layout its guide stands for. */
1394
+ type DockGuide = DockLaneMark;
1395
+ /** One lane a frame shows guides for, with the held place its guide stands for (`@n-uf/motion/drag`'s `LandingGuideRef`). */
1396
+ interface DockGuideRef {
1397
+ readonly lane: string;
1398
+ readonly held: DockHeld | null;
1399
+ }
1400
+ /** What `guides` reads of a landing frame: the held place on screen, whether its room is open, and each lane shown with the held place its guide stands for. */
1401
+ interface DockGuideFrame {
1402
+ readonly held: DockHeld | null;
1403
+ /**
1404
+ * The room is open (`@n-uf/motion/drag`'s `LandingFrame.room`, a boolean): the host draws the window as `held` lays it
1405
+ * out. A host that draws the window at rest while a spot is held (a mode that never makes room) passes false.
1406
+ */
1407
+ readonly room: boolean;
1408
+ readonly guides: readonly DockGuideRef[];
1409
+ }
1410
+ /** A drag of one item: its hit-testing data as seen, and the one layout of each of its held places. */
1411
+ interface DockDrag {
1412
+ /** Hit-testing only: lanes (hit rect, spots' stretches, refused stretches), refused places, blocked, content, as seen. */
1413
+ readonly regions: DockRegions;
1414
+ /** THE layout of `held` (rest for null): the dock state it commits, its layout, landing, marks and, for a spot, its lane's spots. */
1415
+ after(held: DockHeld | null): DockAfter;
1416
+ /** `after(held).landing`: the one rect a landing model reads (its trail gate, its frame's landing). */
1417
+ landingOf(held: DockHeld): Rect | null;
1418
+ /** `after({ spot }).spots` of a spot: its lane's spots with their stretches in the spot's layout, or null. */
1419
+ spotsOf(spot: string): readonly DockSpot[] | null;
1420
+ /**
1421
+ * The layout a frame draws, the one every guide of the frame is cut in: `after(frame.held).layout` while
1422
+ * `frame.room` is open, else the window at rest (what the host draws at rest). Only a spot held in a lane has a room
1423
+ * (`LandingFrame.room`: a docked item's gap opens as the item lands there); a float has none: its gap closes on
1424
+ * release (decision 0003's float exception), so the window stays at rest and `after(float)` is only what a release
1425
+ * commits. A null held place is rest. A host that draws no room for a spot (a mode that never makes one) passes room false.
1426
+ */
1427
+ shown(frame: Pick<DockGuideFrame, "held" | "room">): DockLayout;
1428
+ /** The guides of a frame, cut in `shown(frame)`: each lane's marks from the held place it names, the Near lane's winning where they meet. */
1429
+ guides(frame: DockGuideFrame): DockGuide[];
1430
+ }
1431
+ /**
1432
+ * The drag of `dragged` in `state`: `lanes()`'s regions as seen, and `after(held)`, THE layout of each held place. The
1433
+ * options are `lanes()`'s (`previous` is the committed layout at the lift, the one every solve and the commit read;
1434
+ * `grab` the press's). The work at the lift is remembered per dock state and options, as `lanes()`'s is; each held place's layout
1435
+ * is remembered by the drag.
1436
+ */
1437
+ declare function dockDrag(state: DockState, dragged: string, options?: DockLaneOptions): DockDrag;
1438
+
1439
+ export { type LaneRefusal as $, type DockMark as A, type DockNote as B, type ColumnPlace as C, type DockItem as D, type DockNoteCode as E, type FloatAnchorAt as F, type DockPlace as G, type DockRailLayout as H, type DockRegions as I, type DockSpot as J, type Kind as K, type DockStateRead as L, type DropPlace as M, type DropResult as N, type Orient as O, EDGE_ROOM_HOLD as P, type EmptyLanes as Q, type RailMode as R, type Side as S, FLOAT_ANCHORS as T, type FloatAnchorOffset as U, type FloatPlace as V, type FloatResize as W, HATCH_EDGE as X, HATCH_END as Y, type ZoneAccepts as Z, type KeepClear as _, type FloatAnchor as a, type LaneSlide as a0, type Place as a1, RAIL_MODES as a2, RAIL_STRIP_MIN as a3, RAIL_VISIBILITIES as a4, type RailDropPolicy as a5, type RailPlace as a6, type RailSpec as a7, type RailVisibility as a8, type ResizeEdges as a9, resizeEdge as aA, resizeFloat as aB, setRailMode as aC, setSide as aD, storeDockState as aE, type ResizeLimit as aa, SIDES as ab, SPOT_PITCH as ac, type StoredDockState as ad, type StoredDockStateEdge as ae, type StoredDockStateFloat as af, type StoredDockStateItem as ag, ZONES as ah, canFold as ai, closeItem as aj, dockDrag as ak, dockHome as al, fitResize as am, floatAt as an, foldItem as ao, homeFor as ap, keepItem as aq, lanes as ar, liftItem as as, markUsed as at, mergeSideColumns as au, moveTo as av, openItem as aw, orientFloat as ax, raiseFloat as ay, readDockState as az, type Zone as b, type DockState as c, type DockEdge as d, type SolveOptions as e, type DockLayout as f, type DockRefusal as g, type DockDropOptions as h, type DockDrop as i, type ColumnTemplate as j, DEFAULT_FLOAT_SIZE as k, DEFAULT_HIT_BAND as l, DEFAULT_RAIL_MAGNET as m, DEFAULT_STRIP as n, type DockAfter as o, type DockDrag as p, type DockEdgeLayout as q, type DockFloat as r, type DockGuide as s, type DockGuideFrame as t, type DockGuideRef as u, type DockHeld as v, type DockItemLayout as w, type DockLane as x, type DockLaneMark as y, type DockLaneOptions as z };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as FloatAnchorAt, a as FloatAnchor, D as DockItem, K as Kind, Z as ZoneAccepts, b as Zone, O as Orient, c as DockState, d as DockEdge, S as Side, R as RailMode, e as SolveOptions, f as DockLayout, g as DockRefusal, h as DockDropOptions, i as DockDrop } from './lanes-CGg4iMPw.js';
2
- export { C as ColumnPlace, j as ColumnTemplate, k as DEFAULT_FLOAT_SIZE, l as DEFAULT_HIT_BAND, m as DEFAULT_RAIL_MAGNET, n as DEFAULT_STRIP, o as DockEdgeLayout, p as DockFloat, q as DockItemLayout, r as DockLane, s as DockLaneOptions, t as DockMark, u as DockNote, v as DockNoteCode, w as DockPlace, x as DockRailLayout, y as DockRegions, z as DockSpot, A as DockStateRead, B as DropPlace, E as DropResult, G as EDGE_ROOM_HOLD, H as EmptyLanes, I as FLOAT_ANCHORS, J as FloatAnchorOffset, L as FloatPlace, M as FloatResize, N as HATCH_EDGE, P as HATCH_END, Q as KeepClear, T as LaneRefusal, U as LaneSlide, V as Place, W as RAIL_MODES, X as RAIL_STRIP_MIN, Y as RAIL_VISIBILITIES, _ as RailDropPolicy, $ as RailPlace, a0 as RailSpec, a1 as RailVisibility, a2 as ResizeEdges, a3 as ResizeLimit, a4 as SIDES, a5 as SPOT_PITCH, a6 as StoredDockState, a7 as StoredDockStateEdge, a8 as StoredDockStateFloat, a9 as StoredDockStateItem, aa as ZONES, ab as canFold, ac as closeItem, ad as dockHome, ae as fitResize, af as floatAt, ag as foldItem, ah as homeFor, ai as keepItem, aj as lanes, ak as liftItem, al as markUsed, am as mergeSideColumns, an as moveTo, ao as openItem, ap as orientFloat, aq as raiseFloat, ar as readDockState, as as resizeEdge, at as resizeFloat, au as setRailMode, av as setSide, aw as storeDockState } from './lanes-CGg4iMPw.js';
1
+ import { F as FloatAnchorAt, a as FloatAnchor, D as DockItem, K as Kind, Z as ZoneAccepts, b as Zone, O as Orient, c as DockState, d as DockEdge, S as Side, R as RailMode, e as SolveOptions, f as DockLayout, g as DockRefusal, h as DockDropOptions, i as DockDrop } from './drag-yfr_Ng9Q.js';
2
+ export { C as ColumnPlace, j as ColumnTemplate, k as DEFAULT_FLOAT_SIZE, l as DEFAULT_HIT_BAND, m as DEFAULT_RAIL_MAGNET, n as DEFAULT_STRIP, o as DockAfter, p as DockDrag, q as DockEdgeLayout, r as DockFloat, s as DockGuide, t as DockGuideFrame, u as DockGuideRef, v as DockHeld, w as DockItemLayout, x as DockLane, y as DockLaneMark, z as DockLaneOptions, A as DockMark, B as DockNote, E as DockNoteCode, G as DockPlace, H as DockRailLayout, I as DockRegions, J as DockSpot, L as DockStateRead, M as DropPlace, N as DropResult, P as EDGE_ROOM_HOLD, Q as EmptyLanes, T as FLOAT_ANCHORS, U as FloatAnchorOffset, V as FloatPlace, W as FloatResize, X as HATCH_EDGE, Y as HATCH_END, _ as KeepClear, $ as LaneRefusal, a0 as LaneSlide, a1 as Place, a2 as RAIL_MODES, a3 as RAIL_STRIP_MIN, a4 as RAIL_VISIBILITIES, a5 as RailDropPolicy, a6 as RailPlace, a7 as RailSpec, a8 as RailVisibility, a9 as ResizeEdges, aa as ResizeLimit, ab as SIDES, ac as SPOT_PITCH, ad as StoredDockState, ae as StoredDockStateEdge, af as StoredDockStateFloat, ag as StoredDockStateItem, ah as ZONES, ai as canFold, aj as closeItem, ak as dockDrag, al as dockHome, am as fitResize, an as floatAt, ao as foldItem, ap as homeFor, aq as keepItem, ar as lanes, as as liftItem, at as markUsed, au as mergeSideColumns, av as moveTo, aw as openItem, ax as orientFloat, ay as raiseFloat, az as readDockState, aA as resizeEdge, aB as resizeFloat, aC as setRailMode, aD as setSide, aE as storeDockState } from './drag-yfr_Ng9Q.js';
3
3
  import { Size, Point, Rect, Target } from '@n-uf/placement';
4
4
  import '@n-uf/placement/stack';
5
5
 
@@ -83,6 +83,59 @@ declare function floatSizeOf(item: DockItem, orient?: Orient): Size;
83
83
 
84
84
  declare function solve(given: DockState, options?: SolveOptions): DockLayout;
85
85
 
86
+ /**
87
+ * The dock's verbs over an edge's dividers: `dividers`, `resizeBetween`, `resetBetween` and `resetLengths`. Each is the
88
+ * `@n-uf/placement/stack` verb of the same name run on the edge's stack, with the result written back to the items'
89
+ * `DockItem.lengths`. A divider trades length between the two neighboring open growing items of one edge (a panel, a
90
+ * collapsed item between two open ones giving one divider across it); nothing else in the state moves.
91
+ *
92
+ * The layout is the one `solve` returned for this very `state` object; a verb given none, one that was made for another
93
+ * state (another stage size, an item moved) or one that was stored and read back, solves the state itself. Pure: a state in, a state out (the same object when nothing changed).
94
+ */
95
+
96
+ /** One divider of an edge, in stage px: between the open growing items `before` and `after` (ids). */
97
+ interface DockDivider {
98
+ /** The edge it lies in. */
99
+ readonly edge: string;
100
+ readonly before: string;
101
+ readonly after: string;
102
+ /**
103
+ * The strip the divider sits on, stage px: it starts where the last item drawn before `after` ends (the far edge of
104
+ * the last collapsed item between the two, or of `before`) and is as thick as the gap to `after` (0 with no gap).
105
+ * A host draws its grab zone around it.
106
+ */
107
+ readonly rect: Rect;
108
+ /** How far it may move each way along the edge, px (`min` ≤ 0 ≤ `max`): where either end reaches its least. */
109
+ readonly range: {
110
+ readonly min: number;
111
+ readonly max: number;
112
+ };
113
+ }
114
+ /** One divider per pair of neighboring open growing items in each edge, edge by edge. A collapsed item has none of its own. */
115
+ declare function dividers(state: DockState, layout?: DockLayout): DockDivider[];
116
+ /**
117
+ * Move the divider between the open growing items `before` and `after` of one edge by `delta` px along it: `before` gets
118
+ * longer by `delta` and `after` shorter (a negative `delta` the other way), the edge's total unchanged and nothing else
119
+ * moving. Neither goes under its least (`DockDivider.range`). The same state when nothing changes (not neighbors, an
120
+ * unknown or floating item, a `delta` that isn't a number, or one clamped to 0). The first move writes the length every
121
+ * open growing item of the edge is drawn at, so nothing else shifts.
122
+ */
123
+ declare function resizeBetween(state: DockState, before: string, after: string, delta: number, options?: {
124
+ readonly layout?: DockLayout;
125
+ }): DockState;
126
+ /**
127
+ * Give the two items of a divider back the split they would be drawn at if both asked for their natural, their combined
128
+ * length kept and nothing else moving: the double-click action. The same state when they are at that split already.
129
+ */
130
+ declare function resetBetween(state: DockState, before: string, after: string, options?: {
131
+ readonly layout?: DockLayout;
132
+ }): DockState;
133
+ /**
134
+ * `state` with every asked length of edge `edgeId`'s axis deleted, back to the split an edge with none has. An item's
135
+ * length for the other axis stays. The same state when no item of the edge had one, or the edge is unknown.
136
+ */
137
+ declare function resetLengths(state: DockState, edgeId: string): DockState;
138
+
86
139
  /**
87
140
  * Generation, the real edges: each edge's zones and their extents, its slots (insertion lines, each with the drop it
88
141
  * makes, settled), its reserved stretches and its band across, as the tiler reads them (`EdgeSpec`).
@@ -225,7 +278,10 @@ declare function placeTargetId(place: PlaceLike, item: string): string | null;
225
278
  * - `rail:<side>:<ring>`: docking folded into a side's rail (its rail and its template take the kind), before each
226
279
  * folded column's segments and after the last, or, with no rail shown, the outer `RAIL_EDGE` px from the side's
227
280
  * outer edge (the window's, an inset's strip included; flush after the side's outside bars), landing where the rail
228
- * lands (`DockLayout.railPlaces`). The outermost column line's zone starts where it ends. For a kind with a rail
281
+ * lands (`DockLayout.railPlaces`). A tile of a column folded into the rail, held, also has that column's gaps (`gap:`),
282
+ * to move among its own tiles (over its column's own run of tiles only), and its rail stops are home's, with the rest
283
+ * of the rail. The outermost column line's zone
284
+ * starts where it ends. For a kind with a rail
229
285
  * drop policy (`DockState.railDrop`), the side's rail is a drop strip instead, spring-loaded, owning its rect
230
286
  * (`./targets/rail-strip`); on a side with no declared rail, its rail is its outermost column that takes the kind,
231
287
  * drawn as a rail once the item docks in it folded.
@@ -280,4 +336,4 @@ declare function refusalTargets(list: readonly DockRefusal[]): DockRefusalTarget
280
336
  */
281
337
  declare function stops(state: DockState, dragged: string, options?: DockDropOptions): DockDrop[];
282
338
 
283
- export { DockDrop, DockDropOptions, DockEdge, DockItem, DockLayout, DockRefusal, type DockRefusalTarget, DockState, FloatAnchor, FloatAnchorAt, Kind, Orient, RailMode, Side, SolveOptions, type TargetIdParts, Zone, ZoneAccepts, anchorName, declaresFloatSizes, edgeTakes, floatOrientOf, floatSizeOf, heldRect, isOutsideSideBar, isSideBar, isSideColumn, namesZone, parseTargetId, placeTargetId, railModeOf, refusalTargets, refusals, reservedRect, solve, stops, targetId, targets, virtualEdgeId, zoneIn, zoneTakes, zonesTaking };
339
+ export { type DockDivider, DockDrop, DockDropOptions, DockEdge, DockItem, DockLayout, DockRefusal, type DockRefusalTarget, DockState, FloatAnchor, FloatAnchorAt, Kind, Orient, RailMode, Side, SolveOptions, type TargetIdParts, Zone, ZoneAccepts, anchorName, declaresFloatSizes, dividers, edgeTakes, floatOrientOf, floatSizeOf, heldRect, isOutsideSideBar, isSideBar, isSideColumn, namesZone, parseTargetId, placeTargetId, railModeOf, refusalTargets, refusals, reservedRect, resetBetween, resetLengths, resizeBetween, solve, stops, targetId, targets, virtualEdgeId, zoneIn, zoneTakes, zonesTaking };
package/dist/index.js CHANGED
@@ -17,6 +17,8 @@ import {
17
17
  canFold,
18
18
  closeItem,
19
19
  declaresFloatSizes,
20
+ dividers,
21
+ dockDrag,
20
22
  dockHome,
21
23
  edgeTakes,
22
24
  fitResize,
@@ -46,6 +48,9 @@ import {
46
48
  refusalTargets,
47
49
  refusals,
48
50
  reservedRect,
51
+ resetBetween,
52
+ resetLengths,
53
+ resizeBetween,
49
54
  resizeEdge,
50
55
  resizeFloat,
51
56
  setRailMode,
@@ -59,7 +64,7 @@ import {
59
64
  zoneIn,
60
65
  zoneTakes,
61
66
  zonesTaking
62
- } from "./chunk-KGNFLHSC.js";
67
+ } from "./chunk-4V35LE5X.js";
63
68
  export {
64
69
  DEFAULT_FLOAT_SIZE,
65
70
  DEFAULT_HIT_BAND,
@@ -79,6 +84,8 @@ export {
79
84
  canFold,
80
85
  closeItem,
81
86
  declaresFloatSizes,
87
+ dividers,
88
+ dockDrag,
82
89
  dockHome,
83
90
  edgeTakes,
84
91
  fitResize,
@@ -108,6 +115,9 @@ export {
108
115
  refusalTargets,
109
116
  refusals,
110
117
  reservedRect,
118
+ resetBetween,
119
+ resetLengths,
120
+ resizeBetween,
111
121
  resizeEdge,
112
122
  resizeFloat,
113
123
  setRailMode,
package/dist/testing.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Point, Rect } from '@n-uf/placement';
2
2
  import { StackFormKind } from '@n-uf/placement/stack';
3
- import { c as DockState, B as DropPlace, f as DockLayout, a6 as StoredDockState, b as Zone, S as Side, v as DockNoteCode, i as DockDrop, g as DockRefusal, s as DockLaneOptions, y as DockRegions } from './lanes-CGg4iMPw.js';
4
- import { LandingRegions } from '@n-uf/motion/drag';
3
+ import { c as DockState, M as DropPlace, f as DockLayout, ad as StoredDockState, b as Zone, S as Side, E as DockNoteCode, i as DockDrop, g as DockRefusal, z as DockLaneOptions, v as DockHeld, u as DockGuideRef, I as DockRegions, J as DockSpot } from './drag-yfr_Ng9Q.js';
4
+ import { LandingGeometry, LandingRegions } from '@n-uf/motion/drag';
5
5
 
6
6
  /**
7
7
  * The conformance rows' shapes. A row is plain data: a state, the settings it runs at, the gestures a user makes, and
@@ -558,7 +558,7 @@ declare function winState(spec: WinSpec, o?: WinOptions): DockState;
558
558
 
559
559
  /**
560
560
  * The landing rows: the landing model's properties as conformance rows, played on any host that drags with a landing
561
- * model (`@n-uf/motion/drag`'s `createLandingModel` over `lanes()`). Docking never imports motion: the model comes in
561
+ * model (`@n-uf/motion/drag`'s `createLandingModel` over `dockDrag()`). Docking never imports motion: the model comes in
562
562
  * as an input, the way the pick rule does (`createLandingHost({ landing: createLandingModel })`).
563
563
  *
564
564
  * A row is plain data: a state, the item dragged, a pointer path at a speed (its first point the press, on the item),
@@ -605,36 +605,28 @@ interface LandingModelLike {
605
605
  readonly region: LandingRegionName;
606
606
  readonly lane: string | null;
607
607
  readonly spot: string | null;
608
+ /** The held place a release lands now (`DockHeld`), or null. */
609
+ readonly held: DockHeld | null;
608
610
  readonly landing: Rect | null;
609
611
  readonly room: boolean;
610
- readonly guides?: readonly LandingCaseGuide[];
612
+ /** The lanes whose guides show, each with the held place its guide stands for (`DockDrag.guides` draws them). */
613
+ readonly guides: readonly DockGuideRef[];
611
614
  readonly pending?: string;
612
615
  };
613
- /** What a release at `point` and `time` lands (the last update's point: what its frame showed). */
614
- release(point: Point, time: number): {
615
- readonly kind: "spot";
616
- readonly lane: string;
617
- readonly spot: string;
618
- readonly home: boolean;
619
- } | {
620
- readonly kind: "float";
621
- readonly rect: Rect;
622
- } | null;
616
+ /** What a release at `point` and `time` lands (the last update's point: what its frame showed): a held place, or null. */
617
+ release(point: Point, time: number): (DockHeld & {
618
+ readonly home?: boolean;
619
+ }) | null;
623
620
  }
624
621
  /** What makes a landing model: `createLandingModel`, as an input. */
625
622
  type LandingRule = (options: {
626
623
  readonly regions: DockRegions;
627
- readonly regionsFor: (spot: string) => DockRegions;
628
- readonly floatLanding: (point: Point) => Rect | null;
624
+ readonly landingOf: (held: DockHeld) => Rect | null;
625
+ readonly spotsOf: (spot: string) => readonly DockSpot[] | null;
629
626
  readonly home?: {
630
627
  readonly lane: string;
631
628
  readonly spot: string;
632
629
  };
633
- /** Where the press holds the item (a landing model's `grab`): a sliding spot's landing follows the pointer less it. */
634
- readonly grab?: {
635
- readonly x: number;
636
- readonly y: number;
637
- };
638
630
  readonly placeGuides?: "off" | "near" | "all";
639
631
  }) => LandingModelLike;
640
632
  /** A place guide a frame shows: its lane, line, box or hatch, and where. */
@@ -803,6 +795,11 @@ declare const LANDING_CASES: readonly LandingCase[];
803
795
 
804
796
  /** `R`, when it is assignable to motion's `LandingRegions`; a type error otherwise. */
805
797
  type AssertLanding<R extends LandingRegions> = R;
798
+ /**
799
+ * `G`, when it is assignable to motion's `LandingGeometry` (the regions, `landingOf`, `spotsOf`); a type error
800
+ * otherwise. `AssertGeometry<DockDrag>` pins that a drag is handed to `createLandingModel` as it is.
801
+ */
802
+ type AssertGeometry<G extends LandingGeometry> = G;
806
803
 
807
804
  /**
808
805
  * Every row, in order: the docking cases, the bar cases, the built-in rules, the panel gestures, the two windows. The
@@ -817,4 +814,4 @@ declare const CASE_GROUPS: readonly {
817
814
  /** The row with this id, or undefined. */
818
815
  declare const caseById: (id: string) => CaseRow | undefined;
819
816
 
820
- export { type AimArea, type AssertLanding, type AsyncCaseHost, CASES, CASE_GROUPS, type CaseGroup, type CaseHost, type CaseRequires, type CaseResult, type CaseRow, type CaseSettings, type Checkpoint, type DomCheck, type DomRoot, END_REACH, type EdgeExpect, type Gesture, type GestureType, HAND_FAST, HAND_MARGIN, HAND_TRAIL, HAND_TRAIL_BEFORE_HOP, type IdMap, type ItemExpect, LANDING_CASES, LIFT_THRESHOLD, type LandingCase, type LandingCaseFrame, type LandingCaseGuide, type LandingCaseHost, type LandingCaseResult, type LandingModelLike, type LandingPlay, type LandingRegionName, type LandingRule, type LayoutExpect, NEAR_REACH, type PickCandidate, type PickRule, type ReferenceHost, type ReferenceHostOptions, type Rename, type StoredExpect, WINDOW_A, WINDOW_B, WINDOW_BARE, type WinOptions, type WinSpec, caseById, createLandingHost, createReferenceHost, defaultItemSelector, g, handBound, idRenames, landingIssues, layoutIssues, mapGesture, mapLayout, mapPlace, mapState, mapStored, nearGuideIssues, resizeStep, resolvePlace, runCase, runCaseAsync, runCases, runCasesAsync, runLandingCases, winState, withRefusals };
817
+ export { type AimArea, type AssertGeometry, type AssertLanding, type AsyncCaseHost, CASES, CASE_GROUPS, type CaseGroup, type CaseHost, type CaseRequires, type CaseResult, type CaseRow, type CaseSettings, type Checkpoint, type DomCheck, type DomRoot, END_REACH, type EdgeExpect, type Gesture, type GestureType, HAND_FAST, HAND_MARGIN, HAND_TRAIL, HAND_TRAIL_BEFORE_HOP, type IdMap, type ItemExpect, LANDING_CASES, LIFT_THRESHOLD, type LandingCase, type LandingCaseFrame, type LandingCaseGuide, type LandingCaseHost, type LandingCaseResult, type LandingModelLike, type LandingPlay, type LandingRegionName, type LandingRule, type LayoutExpect, NEAR_REACH, type PickCandidate, type PickRule, type ReferenceHost, type ReferenceHostOptions, type Rename, type StoredExpect, WINDOW_A, WINDOW_B, WINDOW_BARE, type WinOptions, type WinSpec, caseById, createLandingHost, createReferenceHost, defaultItemSelector, g, handBound, idRenames, landingIssues, layoutIssues, mapGesture, mapLayout, mapPlace, mapState, mapStored, nearGuideIssues, resizeStep, resolvePlace, runCase, runCaseAsync, runCases, runCasesAsync, runLandingCases, winState, withRefusals };
package/dist/testing.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  closeItem,
3
+ dockDrag,
3
4
  dockHome,
4
5
  floatAt,
5
6
  foldItem,
@@ -17,7 +18,7 @@ import {
17
18
  stops,
18
19
  storeDockState,
19
20
  targets
20
- } from "./chunk-KGNFLHSC.js";
21
+ } from "./chunk-4V35LE5X.js";
21
22
 
22
23
  // src/testing/rows-docking.ts
23
24
  import { rect as r } from "@n-uf/placement";
@@ -1379,7 +1380,7 @@ var GESTURE_ROWS = [
1379
1380
  {
1380
1381
  id: "P9-rail-segment-on-its-own-rail",
1381
1382
  title: "A rail segment dropped on its own rail changes nothing",
1382
- expect: "In a narrow window, a rail segment dropped on its own side's rail (even below the last segment) never splits or reorders it.",
1383
+ expect: "In a narrow window, a rail segment dropped on a rail stop (`rail:<side>:<ring>`) of its own side, even below the last segment, is home: it never splits the rail, reorders it or opens a column. It moves among its own column's tiles only through that column's gaps (`gap:<edge>:<zone>:<at>`).",
1383
1384
  group: "gestures",
1384
1385
  state: win({ width: 700 }),
1385
1386
  gestures: g.drag("annotations", g.rail("left")),
@@ -2408,12 +2409,7 @@ function handRule(row2, before, stretchPositions) {
2408
2409
  const own = previous.items[row2.item];
2409
2410
  const press = row2.path[0];
2410
2411
  const options = { previous, ...own ? { grab: { x: press.x - own.rect.x, y: press.y - own.rect.y } } : {}, ...stretchPositions ? { stretchPositions } : {} };
2411
- const bySpot = /* @__PURE__ */ new Map();
2412
- const regionsOf = (spot) => {
2413
- let r5 = bySpot.get(spot);
2414
- if (!r5) bySpot.set(spot, r5 = lanes(row2.state, row2.item, spot ? { ...options, spot } : options));
2415
- return r5;
2416
- };
2412
+ const drag = dockDrag(row2.state, row2.item, options);
2417
2413
  return {
2418
2414
  /**
2419
2415
  * The grab's share along the lane, as the landing model takes it: of the item's longer side along the lane when it
@@ -2426,10 +2422,11 @@ function handRule(row2, before, stretchPositions) {
2426
2422
  const g2 = long === "x" ? press.x - own.rect.x : press.y - own.rect.y;
2427
2423
  return axis === long && size > 0 && Number.isFinite(g2) ? Math.min(1, Math.max(0, g2 / size)) : 0.5;
2428
2424
  },
2429
- /** The lane `lane` as drawn with `spot` held; as seen when the lane has no such spot (another host's ids). */
2425
+ /** The lane `lane` with `spot` held (its stretches in that spot's layout, `spotsOf`); as seen when the lane has no such spot (another host's ids). */
2430
2426
  laneOf(lane, spot) {
2431
- const held = regionsOf(spot).lanes.find((l) => l.id === lane);
2432
- return held?.spots.some((s) => s.id === spot) ? held : regionsOf("").lanes.find((l) => l.id === lane);
2427
+ const seen = drag.regions.lanes.find((l) => l.id === lane);
2428
+ const spots = seen?.spots.some((s) => s.id === spot) ? drag.spotsOf(spot) : null;
2429
+ return seen && spots ? { ...seen, spots } : seen;
2433
2430
  },
2434
2431
  /**
2435
2432
  * `g`, px: the gap along the lane between the facing edges of the two adjacent landings the pointer `p` lies between
@@ -2605,14 +2602,15 @@ function createLandingHost(o) {
2605
2602
  const press = row2.path[0];
2606
2603
  const grab = { x: press.x - own.rect.x, y: press.y - own.rect.y };
2607
2604
  const laneOptions = { previous, grab, ...o.stretchPositions ? { stretchPositions: o.stretchPositions } : {} };
2608
- const regions = lanes(s, row2.item, laneOptions);
2609
- const regionsFor = (spot2) => lanes(s, row2.item, { ...laneOptions, spot: spot2 });
2605
+ const drag = dockDrag(s, row2.item, laneOptions);
2606
+ const regions = drag.regions;
2610
2607
  const home = regions.lanes.flatMap((l) => l.spots.filter((x) => x.home).map((x) => ({ lane: l.id, spot: x.id })))[0];
2611
- const model = o.landing({ regions, regionsFor, grab, floatLanding: (p) => regions.float?.after(p, grab).layout.items[row2.item]?.rect ?? null, ...home ? { home } : {}, placeGuides: "near" });
2608
+ const model = o.landing({ regions, landingOf: drag.landingOf, spotsOf: drag.spotsOf, ...home ? { home } : {}, placeGuides: "near" });
2612
2609
  const frames = [];
2613
2610
  const play = (p, t2, moving) => {
2614
2611
  const f2 = model.update(p, t2);
2615
- frames.push({ t: t2, point: p, moving, region: f2.region, lane: f2.lane, spot: f2.spot, landing: f2.landing, room: f2.room, ...f2.guides ? { guides: f2.guides } : {}, ...f2.pending ? { pending: f2.pending } : {} });
2612
+ const guides = drag.guides(f2).map((g2) => ({ id: g2.id, lane: g2.lane, kind: g2.kind, rect: g2.rect }));
2613
+ frames.push({ t: t2, point: p, moving, region: f2.region, lane: f2.lane, spot: f2.spot, landing: f2.landing, room: f2.room, guides, ...f2.pending ? { pending: f2.pending } : {} });
2616
2614
  };
2617
2615
  let t = 0;
2618
2616
  let at2 = press;
@@ -2624,9 +2622,7 @@ function createLandingHost(o) {
2624
2622
  }
2625
2623
  for (let r5 = SAMPLE; r5 <= (row2.rest ?? 0); r5 += SAMPLE) play(at2, t += SAMPLE, false);
2626
2624
  const out = model.release(at2, t);
2627
- const spot = out?.kind === "spot" ? [...regions.lanes, ...regionsFor(out.spot).lanes].flatMap((l) => l.spots).find((x) => x.id === out.spot) : void 0;
2628
- const target = out?.kind === "float" ? regions.float : spot && out?.kind === "spot" && !out.home ? spot.target : null;
2629
- const next = target ? target.after(at2, grab).state : s;
2625
+ const next = out && !(out.kind === "spot" && out.home) ? drag.after(out).state : s;
2630
2626
  return { frames, layout: solve(next, { previous }), before: previous, ...o.stretchPositions ? { stretchPositions: o.stretchPositions } : {} };
2631
2627
  }
2632
2628
  };