@n-uf/placement 26.11.50 → 26.11.52
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 +156 -0
- package/dist/{chunk-NM4ADJC2.js → chunk-67D32MZ4.js} +333 -107
- package/dist/chunk-67D32MZ4.js.map +1 -0
- package/dist/{lanes-CkFz9E5l.d.ts → lanes-DIwUqchd.d.ts} +84 -14
- package/dist/scene-cases.d.ts +82 -5
- package/dist/scene-cases.js +337 -16
- package/dist/scene-cases.js.map +1 -1
- package/dist/scene.d.ts +19 -9
- package/dist/scene.js +3 -1
- package/package.json +2 -2
- package/dist/chunk-NM4ADJC2.js.map +0 -1
package/dist/scene.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FloatAnchorAt, h as FloatAnchor, K as Kind,
|
|
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, H as HATCH_EDGE, x as HATCH_END, y as Lane, z as LaneMark, L as LaneOptions, A as LaneRefusal, B as LaneSlide, G as LaneSpot, P as Place, I as RAIL_MODES, J as RAIL_STRIP_MIN, M as RAIL_VISIBILITIES, N as RailDropPolicy, Q as RailPlace, T as RailSpec, U as RailVisibility, R as Regions, V as ResizeEdges, W as ResizeLimit, X as SIDES, Y as SPOT_PITCH, _ as SceneAfter, $ as SceneChrome, a0 as SceneEdgeLayout, a1 as SceneFloat, a2 as SceneItemLayout, a3 as SceneNote, e as SceneNoteCode, a as ScenePlace, a4 as SceneRailLayout, a5 as SceneRead, c as StoredScene, a6 as StoredSceneEdge, a7 as StoredSceneFloat, a8 as StoredSceneItem, a9 as ZONES, aa as canFold, ab as close, ac as dockHome, ad as fitResize, ae as floatAt, af as fold, ag as homeFor, ah as keep, ai as lanes, aj as lift, ak as mergeSideColumns, al as moveTo, am as open, an as orient, ao as raise, ap as readScene, aq as resize, ar as setRailMode, as as setSide, at as storeScene, au as use } from './lanes-
|
|
1
|
+
import { F as FloatAnchorAt, h as FloatAnchor, i as SceneItem, K as Kind, j as ZoneAccepts, Z as Zone, 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-DIwUqchd.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, H as HATCH_EDGE, x as HATCH_END, y as Lane, z as LaneMark, L as LaneOptions, A as LaneRefusal, B as LaneSlide, G as LaneSpot, P as Place, I as RAIL_MODES, J as RAIL_STRIP_MIN, M as RAIL_VISIBILITIES, N as RailDropPolicy, Q as RailPlace, T as RailSpec, U as RailVisibility, R as Regions, V as ResizeEdges, W as ResizeLimit, X as SIDES, Y as SPOT_PITCH, _ as SceneAfter, $ as SceneChrome, a0 as SceneEdgeLayout, a1 as SceneFloat, a2 as SceneItemLayout, a3 as SceneNote, e as SceneNoteCode, a as ScenePlace, a4 as SceneRailLayout, a5 as SceneRead, c as StoredScene, a6 as StoredSceneEdge, a7 as StoredSceneFloat, a8 as StoredSceneItem, a9 as ZONES, aa as canFold, ab as close, ac as dockHome, ad as fitResize, ae as floatAt, af as fold, ag as homeFor, ah as keep, ai as lanes, aj as lift, ak as mergeSideColumns, al as moveTo, am as open, an as orient, ao as raise, ap as readScene, aq as resize, ar as setRailMode, as as setSide, at as storeScene, au as use } from './lanes-DIwUqchd.js';
|
|
3
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';
|
|
@@ -72,11 +72,21 @@ declare const isSideColumn: (scene: Scene, e: Edge) => boolean;
|
|
|
72
72
|
*/
|
|
73
73
|
declare const floatOrientOf: (item: SceneItem) => Orient;
|
|
74
74
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* or the item has no form there.
|
|
75
|
+
* Whether `item` declares `floatSizes` (the per-orient float sizes). Only such an item is sized per orient; one that
|
|
76
|
+
* declares none is framed as before them: a float at its first form keeps its stored rect.
|
|
78
77
|
*/
|
|
79
|
-
declare
|
|
78
|
+
declare const declaresFloatSizes: (item: SceneItem) => boolean;
|
|
79
|
+
/**
|
|
80
|
+
* A float's size along `orient` (default `floatOrientOf`) when nothing else gives one, in this order: the item's
|
|
81
|
+
* `floatSizes` for that orient; its legacy `floatSize`, only where `orient` is the orient that size was set in
|
|
82
|
+
* (`floatOrient`: the float's own, default `floatOrientOf`, so a float turned to the other orient never takes the old
|
|
83
|
+
* one's size); else its first form's natural size along `orient`, or `DEFAULT_FLOAT_SIZE` when that form grows (a
|
|
84
|
+
* panel's card has no natural float length) or the item has no form there.
|
|
85
|
+
*
|
|
86
|
+
* Per-orient sizes apply only to an item that declares `floatSizes`. One that declares none keeps the rule from before
|
|
87
|
+
* them: its legacy `floatSize` in any orient, else its first form's natural size along `orient`, else the default.
|
|
88
|
+
*/
|
|
89
|
+
declare function floatSizeOf(item: SceneItem, orient?: Orient, floatOrient?: Orient): Size;
|
|
80
90
|
|
|
81
91
|
declare function solve(given: Scene, options?: SolveOptions): SceneLayout;
|
|
82
92
|
|
|
@@ -229,7 +239,7 @@ declare function placeTargetId(place: PlaceLike, item: string): string | null;
|
|
|
229
239
|
* - `float:<id>`: when `floatKinds` lists the kind, the whole plane: the landing is the float with the pointer holding
|
|
230
240
|
* it at `grab` (default its middle), in the stage and clear of the docked items, the bars and the chrome. Its orient:
|
|
231
241
|
* `options.floatOrient`, else its float's, else the item's (`floatOrientOf`). Its size: `options.floatSize`, else its
|
|
232
|
-
* float's size, else `floatSizeOf
|
|
242
|
+
* float's size where it lands in the orient that float is in, else `floatSizeOf` for the orient it lands in.
|
|
233
243
|
*
|
|
234
244
|
* `stops(scene, id)` orders the same targets (no home, no none) for "Move to ›" and the arrow keys.
|
|
235
245
|
*
|
|
@@ -245,7 +255,7 @@ declare function targets(scene: Scene, dragged: string, options?: SceneTargetOpt
|
|
|
245
255
|
/**
|
|
246
256
|
* `refusals(scene, dragged, options?)`: the places a drop of `dragged` is refused, so a host can say so at the pointer
|
|
247
257
|
* ("Can't go here"; the place itself is never drawn) instead of showing a slot elsewhere: each slot the filter removed, over its own tile,
|
|
248
|
-
* `not-accepted` where the edge or zone doesn't take the kind, `no-room` where the drop wouldn't fit. An edge that takes
|
|
258
|
+
* `not-accepted` where the edge or zone doesn't take the kind, `no-room` where the drop wouldn't fit along the edge, `too-thick` where no form of the item fits across it (the bar is thinner than every form but the » menu's). An edge that takes
|
|
249
259
|
* the kind in no zone is one refusal over its drawn rect (fixed items included) less what targets own; every refusal
|
|
250
260
|
* lies in the stage, a zone's inside its edge's ends. A release over a refusal commits nothing: the item goes home.
|
|
251
261
|
*/
|
|
@@ -277,4 +287,4 @@ declare function refusalTargets(list: readonly SceneRefusal[]): SceneRefusalTarg
|
|
|
277
287
|
*/
|
|
278
288
|
declare function stops(scene: Scene, dragged: string, options?: SceneTargetOptions): SceneTarget[];
|
|
279
289
|
|
|
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 };
|
|
290
|
+
export { Edge, FloatAnchor, FloatAnchorAt, Kind, Orient, RailMode, Scene, SceneItem, SceneLayout, SceneRefusal, type SceneRefusalTarget, SceneTarget, SceneTargetOptions, 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 };
|
package/dist/scene.js
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
anchorName,
|
|
17
17
|
canFold,
|
|
18
18
|
close,
|
|
19
|
+
declaresFloatSizes,
|
|
19
20
|
dockHome,
|
|
20
21
|
edgeTakes,
|
|
21
22
|
fitResize,
|
|
@@ -57,7 +58,7 @@ import {
|
|
|
57
58
|
zoneIn,
|
|
58
59
|
zoneTakes,
|
|
59
60
|
zonesTaking
|
|
60
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-67D32MZ4.js";
|
|
61
62
|
import {
|
|
62
63
|
fitFloat
|
|
63
64
|
} from "./chunk-AE3BWTAE.js";
|
|
@@ -80,6 +81,7 @@ export {
|
|
|
80
81
|
anchorName,
|
|
81
82
|
canFold,
|
|
82
83
|
close,
|
|
84
|
+
declaresFloatSizes,
|
|
83
85
|
dockHome,
|
|
84
86
|
edgeTakes,
|
|
85
87
|
fitFloat,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@n-uf/placement",
|
|
3
|
-
"version": "26.11.
|
|
3
|
+
"version": "26.11.52",
|
|
4
4
|
"description": "Where things go: a window's bars, rails, columns, items and floats solved into a layout, with the drop targets, refusals and lanes of every drag. 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.52"
|
|
88
88
|
},
|
|
89
89
|
"scripts": {
|
|
90
90
|
"build": "tsup && node ./scripts/check-dist.mjs",
|