@n-uf/placement 26.11.36 → 26.11.38
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 +41 -0
- package/README.md +38 -0
- package/dist/chunk-2IZ6JZV5.js +9 -0
- package/dist/chunk-2IZ6JZV5.js.map +1 -0
- package/dist/{chunk-SW3PZACP.js → chunk-GWZ5BPIN.js} +138 -22
- package/dist/chunk-GWZ5BPIN.js.map +1 -0
- package/dist/desk.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/{model-fnbEHD6c.d.ts → model-bUSbHw8v.d.ts} +41 -3
- package/dist/panels.d.ts +3 -3
- package/dist/scene-cases.d.ts +17 -9
- package/dist/scene-cases.js +39 -6
- package/dist/scene-cases.js.map +1 -1
- package/dist/scene.d.ts +8 -4
- package/dist/scene.js +1 -1
- package/dist/stack.d.ts +1 -1
- package/dist/target-Db9z1bWt.d.ts +50 -0
- package/dist/{targets-DnVNZVQW.d.ts → targets-CYs16P4K.d.ts} +1 -1
- package/dist/targets.d.ts +2 -2
- package/dist/tiling.d.ts +1 -1
- package/package.json +2 -2
- package/dist/chunk-SW3PZACP.js.map +0 -1
- package/dist/target-fhD5UVlt.d.ts +0 -27
package/dist/scene.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { F as FloatAnchorAt, h as FloatAnchor, K as Kind, i as ZoneAccepts, j as SceneItem, O as Orient, S as Scene, E as Edge, d as Side, R as RailMode, Z as Zone, k as SolveOptions, b as SceneLayout, g as SceneRefusal, l as SceneTargetOptions, f as SceneTarget } from './model-
|
|
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 FLOAT_ANCHORS, s as FloatAnchorOffset, t as FloatPlace, u as FloatResize, P as Place, v as RAIL_MODES, w as RAIL_STRIP_MIN, x as RAIL_VISIBILITIES, y as RailDropPolicy, z as RailPlace, A as RailSpec, B as RailVisibility, G as ResizeEdges, H as ResizeLimit, I as SIDES, J as SceneAfter, L as SceneChrome, M as SceneEdgeLayout, N as SceneFloat, Q as SceneItemLayout, T as SceneNote, e as SceneNoteCode, a as ScenePlace, U as SceneRailLayout, V as SceneRead, c as StoredScene, W as StoredSceneEdge, X as StoredSceneFloat, Y as StoredSceneItem, _ as ZONES, $ as canFold, a0 as close, a1 as dockHome, a2 as fitResize, a3 as floatAt, a4 as fold, a5 as homeFor, a6 as keep, a7 as lift, a8 as moveTo, a9 as open, aa as orient, ab as raise, ac as readScene, ad as resize, ae as setRailMode, af as setSide, ag as storeScene, ah as use } from './model-
|
|
1
|
+
import { F as FloatAnchorAt, h as FloatAnchor, K as Kind, i as ZoneAccepts, j as SceneItem, O as Orient, S as Scene, E as Edge, d as Side, R as RailMode, Z as Zone, k as SolveOptions, b as SceneLayout, g as SceneRefusal, l as SceneTargetOptions, f as SceneTarget } from './model-bUSbHw8v.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 FLOAT_ANCHORS, s as FloatAnchorOffset, t as FloatPlace, u as FloatResize, P as Place, v as RAIL_MODES, w as RAIL_STRIP_MIN, x as RAIL_VISIBILITIES, y as RailDropPolicy, z as RailPlace, A as RailSpec, B as RailVisibility, G as ResizeEdges, H as ResizeLimit, I as SIDES, J as SceneAfter, L as SceneChrome, M as SceneEdgeLayout, N as SceneFloat, Q as SceneItemLayout, T as SceneNote, e as SceneNoteCode, a as ScenePlace, U as SceneRailLayout, V as SceneRead, c as StoredScene, W as StoredSceneEdge, X as StoredSceneFloat, Y as StoredSceneItem, _ as ZONES, $ as canFold, a0 as close, a1 as dockHome, a2 as fitResize, a3 as floatAt, a4 as fold, a5 as homeFor, a6 as keep, a7 as lift, a8 as moveTo, a9 as open, aa as orient, ab as raise, ac as readScene, ad as resize, ae as setRailMode, af as setSide, ag as storeScene, ah as use } from './model-bUSbHw8v.js';
|
|
3
3
|
import { S as Size, R as Rect } from './geometry-Bf37LbCT.js';
|
|
4
4
|
export { F as FloatFit, f as fitFloat } from './float-fit-DCYxRMru.js';
|
|
5
|
-
import { T as Target } from './target-
|
|
5
|
+
import { T as Target } from './target-Db9z1bWt.js';
|
|
6
6
|
import './model-X7eUaKlA.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -228,7 +228,11 @@ declare function targets(scene: Scene, dragged: string, options?: SceneTargetOpt
|
|
|
228
228
|
* lies in the stage, a zone's inside its edge's ends. A release over a refusal commits nothing: the item goes home.
|
|
229
229
|
*/
|
|
230
230
|
declare function refusals(scene: Scene, dragged: string, options?: SceneTargetOptions): SceneRefusal[];
|
|
231
|
-
/**
|
|
231
|
+
/**
|
|
232
|
+
* A refusal in the pick's shape: `refuse: true`, which ranks it at `REFUSAL_RANK` (after every target of priority 1 and
|
|
233
|
+
* 2, so a target wins wherever the two meet or overlap, before the float). Its `priority` is 2 for a pick rule that
|
|
234
|
+
* doesn't know refusals.
|
|
235
|
+
*/
|
|
232
236
|
interface SceneRefusalTarget extends Target {
|
|
233
237
|
readonly refuse: true;
|
|
234
238
|
readonly refusal: SceneRefusal;
|
package/dist/scene.js
CHANGED
package/dist/stack.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { d as StackInput, F as FitOptions, b as StackFit, e as StackItem } from './model-X7eUaKlA.js';
|
|
2
2
|
export { C as CrossLimits, D as DEFAULT_MENU, f as DEFAULT_RAIL, G as GroupFormKind, M as MainSize, P as PanelFormKind, g as PlacedStackItem, h as StackAxis, a as StackForm, S as StackFormKind, i as StackMenu, c as StackNote, j as StackNoteCode, k as StackStep, W as WrapSpec, l as formCrossMin, m as formFitsCross, n as formMain, o as formSetsCross, w as withItem, p as wrapCross, q as wrapLines, r as wrapRows } from './model-X7eUaKlA.js';
|
|
3
3
|
import { R as Rect, P as Point, S as Size } from './geometry-Bf37LbCT.js';
|
|
4
|
-
import { T as Target } from './target-
|
|
4
|
+
import { T as Target } from './target-Db9z1bWt.js';
|
|
5
5
|
import { F as FloatFit$1 } from './float-fit-DCYxRMru.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { R as Rect } from './geometry-Bf37LbCT.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A drop target in the shape @n-uf/motion/drag takes: an id, a priority (1 most precise: a rail or a tab strip;
|
|
5
|
+
* 2 a slot; 3 a broad area such as floating anywhere), the zone the pointer hits, and optionally where the item
|
|
6
|
+
* lands, a label and whether it lands freely (no room is made for it). `hits`, when given, is the whole zone as several
|
|
7
|
+
* rects (a zone that isn't one rect), `hit` the largest of them: the pointer is in the zone when it is in any of them.
|
|
8
|
+
* `arm: "dwell"` marks a spring-loaded target (the drag intent arms it once the pointer dwells in it), `armedHit` its
|
|
9
|
+
* zone once armed.
|
|
10
|
+
*/
|
|
11
|
+
interface Target {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly priority: 1 | 2 | 3;
|
|
14
|
+
readonly hit: Rect;
|
|
15
|
+
readonly hits?: readonly Rect[];
|
|
16
|
+
/** Spring-loaded: no target until the pointer dwells in it. */
|
|
17
|
+
readonly arm?: "dwell";
|
|
18
|
+
/** Its zone once armed (the strip grown by its magnet). */
|
|
19
|
+
readonly armedHit?: Rect;
|
|
20
|
+
readonly slot?: Rect;
|
|
21
|
+
readonly label?: string;
|
|
22
|
+
readonly free?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* A refusal, not a target: it takes part in the pick under the pointer, ranked after every target of priority 1 and 2
|
|
25
|
+
* and before priority 3 (`REFUSAL_RANK`, whatever its `priority`), but nothing lands on it (`refusalTargets`).
|
|
26
|
+
*/
|
|
27
|
+
readonly refuse?: true;
|
|
28
|
+
/**
|
|
29
|
+
* The drawn space the zone belongs to (the window's stage): the zone, and a drag intent's band and gap grace about
|
|
30
|
+
* it, hold only points strictly inside it. The window's boundary belongs only to the targets drawn against it: the
|
|
31
|
+
* scene gives `bounds` to every refusal and to the float (whole-plane), never to a gap or a slot, so a pointer clamped
|
|
32
|
+
* onto the window's edge picks a gap that reaches it, else nothing. That relies on the host clamping exactly onto the
|
|
33
|
+
* stage's edge (`x + width`, `y + height`): a host that clamps to `width - 0.5` still picks inside the window.
|
|
34
|
+
*/
|
|
35
|
+
readonly bounds?: Rect;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Where a refusal ranks in the pick (the drag intent's `REFUSAL_RANK`, the same value): an ordering rank, not a
|
|
39
|
+
* priority. Priorities stay the integers 1, 2 and 3; a refusal's tier is `refuse: true`, ordered by this rank on the
|
|
40
|
+
* same scale: after every target of priority 1 and 2, so a real target wins wherever the two meet or overlap, and
|
|
41
|
+
* before priority 3 (the float).
|
|
42
|
+
*/
|
|
43
|
+
declare const REFUSAL_RANK = 2.5;
|
|
44
|
+
/** A target's rank in the pick: its `priority`, a refusal's {@link REFUSAL_RANK}. Lower wins. */
|
|
45
|
+
declare const pickRank: (t: {
|
|
46
|
+
readonly priority: number;
|
|
47
|
+
readonly refuse?: true;
|
|
48
|
+
}) => number;
|
|
49
|
+
|
|
50
|
+
export { REFUSAL_RANK as R, type Target as T, pickRank as p };
|
package/dist/targets.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { T as Target } from './target-
|
|
1
|
+
import { T as Target } from './target-Db9z1bWt.js';
|
|
2
2
|
import { R as Rect, P as Point, S as Size } from './geometry-Bf37LbCT.js';
|
|
3
3
|
import { D as DeskState, g as Layout, a as Construction, O as Options } from './constructions-Cbz7uEAZ.js';
|
|
4
4
|
import { Place, Arrangement, HostId, HostSpec, GroupSize } from './toolbar.js';
|
|
5
|
-
import { d as PanelTarget, s as PanelStopsOptions, r as PanelStop } from './targets-
|
|
5
|
+
import { d as PanelTarget, s as PanelStopsOptions, r as PanelStop } from './targets-CYs16P4K.js';
|
|
6
6
|
import { P as PaneSide, a as PaneCenter, b as PaneRegion } from './regions-Db_RyT4P.js';
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/tiling.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { R as Rect, S as Size } from './geometry-Bf37LbCT.js';
|
|
2
2
|
import { b as PaneRegion, P as PaneSide } from './regions-Db_RyT4P.js';
|
|
3
3
|
export { c as PANE_REGION_DEFAULTS, d as PANE_SIDES, a as PaneCenter, e as PaneRegionOptions, p as paneCenter, f as paneRegion } from './regions-Db_RyT4P.js';
|
|
4
|
-
import { T as Target } from './target-
|
|
4
|
+
import { T as Target } from './target-Db9z1bWt.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* The order layouts: panes in order and an area in, a rect per pane out. Pure rect functions; a drop on one reorders
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@n-uf/placement",
|
|
3
|
-
"version": "26.11.
|
|
3
|
+
"version": "26.11.38",
|
|
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.38"
|
|
88
88
|
},
|
|
89
89
|
"scripts": {
|
|
90
90
|
"build": "tsup && node ./scripts/check-dist.mjs",
|