@n-uf/placement 26.11.43 → 26.11.45

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/scene.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { F as FloatAnchorAt, h as FloatAnchor, K as Kind, i as ZoneAccepts, Z as Zone, j as SceneItem, O as Orient, S as Scene, E as Edge, d as Side, R as RailMode, k as SolveOptions, b as SceneLayout, g as SceneRefusal, l as SceneTargetOptions, f as SceneTarget } from './model-CSO5fk_L.js';
2
- export { C as ColumnPlace, m as ColumnTemplate, D as DEFAULT_FLOAT_SIZE, n as DEFAULT_HIT_BAND, o as DEFAULT_RAIL_MAGNET, p as DEFAULT_STRIP, q as DockPlace, r as EDGE_ROOM_HOLD, s as FLOAT_ANCHORS, t as FloatAnchorOffset, u as FloatPlace, v as FloatResize, P as Place, w as RAIL_MODES, x as RAIL_STRIP_MIN, y as RAIL_VISIBILITIES, z as RailDropPolicy, A as RailPlace, B as RailSpec, G as RailVisibility, H as ResizeEdges, I as ResizeLimit, J as SIDES, L as SceneAfter, M as SceneChrome, N as SceneEdgeLayout, Q as SceneFloat, T as SceneItemLayout, U as SceneNote, e as SceneNoteCode, a as ScenePlace, V as SceneRailLayout, W as SceneRead, c as StoredScene, X as StoredSceneEdge, Y as StoredSceneFloat, _ as StoredSceneItem, $ as ZONES, a0 as canFold, a1 as close, a2 as dockHome, a3 as fitResize, a4 as floatAt, a5 as fold, a6 as homeFor, a7 as keep, a8 as lift, a9 as moveTo, aa as open, ab as orient, ac as raise, ad as readScene, ae as resize, af as setRailMode, ag as setSide, ah as storeScene, ai as use } from './model-CSO5fk_L.js';
3
- import { S as Size, R as Rect } from './geometry-Bf37LbCT.js';
1
+ import { F as FloatAnchorAt, h as FloatAnchor, K as Kind, i as ZoneAccepts, Z as Zone, j as SceneItem, O as Orient, S as Scene, E as Edge, d as Side, k as RailMode, l as SolveOptions, b as SceneLayout, g as SceneRefusal, m as SceneTargetOptions, f as SceneTarget } from './lanes-CRAFabRE.js';
2
+ export { C as ColumnPlace, n as ColumnTemplate, D as DEFAULT_FLOAT_SIZE, o as DEFAULT_HIT_BAND, p as DEFAULT_RAIL_MAGNET, q as DEFAULT_STRIP, r as DockPlace, s as EDGE_ROOM_HOLD, t as FLOAT_ANCHORS, u as FloatAnchorOffset, v as FloatPlace, w as FloatResize, L as Lane, x as LaneMark, y as LaneOptions, z as LaneRefusal, A as LaneSpot, P as Place, B as RAIL_MODES, G as RAIL_STRIP_MIN, H as RAIL_VISIBILITIES, I as RailDropPolicy, J as RailPlace, M as RailSpec, N as RailVisibility, R as Regions, Q as ResizeEdges, T as ResizeLimit, U as SIDES, V as SPOT_PITCH, W as SceneAfter, X as SceneChrome, Y as SceneEdgeLayout, _ as SceneFloat, $ as SceneItemLayout, a0 as SceneNote, e as SceneNoteCode, a as ScenePlace, a1 as SceneRailLayout, a2 as SceneRead, c as StoredScene, a3 as StoredSceneEdge, a4 as StoredSceneFloat, a5 as StoredSceneItem, a6 as ZONES, a7 as canFold, a8 as close, a9 as dockHome, aa as fitResize, ab as floatAt, ac as fold, ad as homeFor, ae as keep, af as lanes, ag as lift, ah as mergeSideColumns, ai as moveTo, aj as open, ak as orient, al as raise, am as readScene, an as resize, ao as setRailMode, ap as setSide, aq as storeScene, ar as use } from './lanes-CRAFabRE.js';
3
+ import { S as Size, P as Point, R as Rect } from './geometry-Bf37LbCT.js';
4
4
  export { F as FloatFit, f as fitFloat } from './float-fit-DCYxRMru.js';
5
5
  import { T as Target } from './target-BBOCeez2.js';
6
6
  import './model-X7eUaKlA.js';
@@ -10,6 +10,13 @@ import './model-X7eUaKlA.js';
10
10
  * zone and forms, whether a side edge is a toolbar bar, and how an item floats (its orient, size and form). Pure.
11
11
  */
12
12
 
13
+ /**
14
+ * Where item `id`, of `size`, held at `grab` (the pointer's offset from its top-left corner) lies with the pointer at
15
+ * `pointer`: the grip under the pointer where it fits, else moved just enough to lie wholly inside the float region (the
16
+ * stage less the inset at its left and right). With `floatFromHeld` the float target starts from this rect, so an item
17
+ * held clear of everything lands where it is drawn.
18
+ */
19
+ declare const heldRect: (scene: Scene, id: string, size: Size, pointer: Point, grab: Point) => Rect;
13
20
  /** The name of a float's anchor, with or without an offset: `"content-top-right"` for `{ at: "content-top-right", dy: 12 }`. */
14
21
  declare const anchorName: (anchor: FloatAnchorAt) => FloatAnchor;
15
22
  /** What the zone tests read of an edge (or a column template): what it takes, per zone, and the zones it has. */
@@ -57,6 +64,8 @@ declare function isOutsideSideBar(scene: Scene, e: Edge): boolean;
57
64
  * neither a column template nor a rail has nothing to tell them apart by, so no edge there is a bar.
58
65
  */
59
66
  declare function isSideBar(scene: Scene, e: Edge): boolean;
67
+ /** A left or right column: a side edge that takes something, not a compact rail and not a toolbar bar (`isSideBar`). */
68
+ declare const isSideColumn: (scene: Scene, e: Edge) => boolean;
60
69
  /**
61
70
  * The orient a float of `item` takes when it names none: its `floatOrient`, else the axis of its first form (the first
62
71
  * of `forms.row` / `forms.column` it declares with any form), else column.
@@ -268,4 +277,4 @@ declare function refusalTargets(list: readonly SceneRefusal[]): SceneRefusalTarg
268
277
  */
269
278
  declare function stops(scene: Scene, dragged: string, options?: SceneTargetOptions): SceneTarget[];
270
279
 
271
- export { Edge, FloatAnchor, FloatAnchorAt, Kind, Orient, RailMode, Scene, SceneItem, SceneLayout, SceneRefusal, type SceneRefusalTarget, SceneTarget, SceneTargetOptions, Side, SolveOptions, type TargetIdParts, Zone, ZoneAccepts, anchorName, edgeTakes, floatOrientOf, floatSizeOf, isOutsideSideBar, isSideBar, namesZone, parseTargetId, placeTargetId, railModeOf, refusalTargets, refusals, reservedRect, solve, stops, targetId, targets, virtualEdgeId, zoneIn, zoneTakes, zonesTaking };
280
+ export { Edge, FloatAnchor, FloatAnchorAt, Kind, Orient, RailMode, Scene, SceneItem, SceneLayout, SceneRefusal, type SceneRefusalTarget, SceneTarget, SceneTargetOptions, Side, SolveOptions, type TargetIdParts, Zone, ZoneAccepts, anchorName, edgeTakes, floatOrientOf, floatSizeOf, heldRect, isOutsideSideBar, isSideBar, isSideColumn, namesZone, parseTargetId, placeTargetId, railModeOf, refusalTargets, refusals, reservedRect, solve, stops, targetId, targets, virtualEdgeId, zoneIn, zoneTakes, zonesTaking };
package/dist/scene.js CHANGED
@@ -9,6 +9,7 @@ import {
9
9
  RAIL_STRIP_MIN,
10
10
  RAIL_VISIBILITIES,
11
11
  SIDES,
12
+ SPOT_PITCH,
12
13
  ZONES,
13
14
  anchorName,
14
15
  canFold,
@@ -20,11 +21,15 @@ import {
20
21
  floatOrientOf,
21
22
  floatSizeOf,
22
23
  fold,
24
+ heldRect,
23
25
  homeFor,
24
26
  isOutsideSideBar,
25
27
  isSideBar,
28
+ isSideColumn,
26
29
  keep,
30
+ lanes,
27
31
  lift,
32
+ mergeSideColumns,
28
33
  moveTo,
29
34
  namesZone,
30
35
  open,
@@ -50,7 +55,7 @@ import {
50
55
  zoneIn,
51
56
  zoneTakes,
52
57
  zonesTaking
53
- } from "./chunk-PO3ILUMO.js";
58
+ } from "./chunk-6IHRZ3NP.js";
54
59
  import {
55
60
  fitFloat
56
61
  } from "./chunk-AE3BWTAE.js";
@@ -66,6 +71,7 @@ export {
66
71
  RAIL_STRIP_MIN,
67
72
  RAIL_VISIBILITIES,
68
73
  SIDES,
74
+ SPOT_PITCH,
69
75
  ZONES,
70
76
  anchorName,
71
77
  canFold,
@@ -78,11 +84,15 @@ export {
78
84
  floatOrientOf,
79
85
  floatSizeOf,
80
86
  fold,
87
+ heldRect,
81
88
  homeFor,
82
89
  isOutsideSideBar,
83
90
  isSideBar,
91
+ isSideColumn,
84
92
  keep,
93
+ lanes,
85
94
  lift,
95
+ mergeSideColumns,
86
96
  moveTo,
87
97
  namesZone,
88
98
  open,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@n-uf/placement",
3
- "version": "26.11.43",
3
+ "version": "26.11.45",
4
4
  "description": "Where things go: desk docks, rails and palettes, panel columns, toolbar groups, and the drop targets for each. Pure state in, rects out. No DOM, no framework, no motion.",
5
5
  "keywords": [
6
6
  "layout",
@@ -84,7 +84,7 @@
84
84
  "tsup": "^8.5.1",
85
85
  "typescript": "^6.0.3",
86
86
  "vitest": "^4.1.12",
87
- "@n-uf/motion": "26.11.43"
87
+ "@n-uf/motion": "26.11.45"
88
88
  },
89
89
  "scripts": {
90
90
  "build": "tsup && node ./scripts/check-dist.mjs",