@n-uf/placement 26.11.44 → 26.11.46
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/CHANGELOG.md +75 -0
- package/README.md +115 -0
- package/dist/{chunk-32BGJAJA.js → chunk-A4DQQX7W.js} +446 -103
- package/dist/chunk-A4DQQX7W.js.map +1 -0
- package/dist/{model-BONZVBjm.d.ts → lanes-BFqBNGvs.d.ts} +175 -4
- package/dist/scene-cases.d.ts +191 -2
- package/dist/scene-cases.js +347 -7
- package/dist/scene-cases.js.map +1 -1
- package/dist/scene.d.ts +13 -4
- package/dist/scene.js +11 -1
- package/package.json +2 -2
- package/dist/chunk-32BGJAJA.js.map +0 -1
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,
|
|
2
|
-
export { C as ColumnPlace,
|
|
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-BFqBNGvs.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-BFqBNGvs.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-
|
|
58
|
+
} from "./chunk-A4DQQX7W.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.
|
|
3
|
+
"version": "26.11.46",
|
|
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.
|
|
87
|
+
"@n-uf/motion": "26.11.46"
|
|
88
88
|
},
|
|
89
89
|
"scripts": {
|
|
90
90
|
"build": "tsup && node ./scripts/check-dist.mjs",
|