@n-uf/placement 26.11.27 → 26.11.29
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 +63 -0
- package/README.md +56 -6
- package/dist/{chunk-IHU6IOZH.js → chunk-3RRCKN74.js} +17 -6
- package/dist/chunk-3RRCKN74.js.map +1 -0
- package/dist/{chunk-3GIUOVQH.js → chunk-PC5UHBW4.js} +285 -45
- package/dist/chunk-PC5UHBW4.js.map +1 -0
- package/dist/desk.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/{model-Bd0oELzF.d.ts → model-CPM1Lv65.d.ts} +14 -0
- package/dist/{model-Cxg_ySz6.d.ts → model-lYlnfQnl.d.ts} +82 -6
- package/dist/panels.d.ts +3 -3
- package/dist/scene-cases.d.ts +3 -3
- package/dist/scene-cases.js +2 -2
- package/dist/scene.d.ts +7 -5
- package/dist/scene.js +14 -2
- package/dist/stack.d.ts +3 -3
- package/dist/stack.js +1 -1
- package/dist/{target-CEVCfJd-.d.ts → target-D9PMr9pF.d.ts} +6 -0
- package/dist/{targets-BPG7Kf02.d.ts → targets-BYRTTwCP.d.ts} +1 -1
- package/dist/targets.d.ts +2 -2
- package/package.json +2 -2
- package/dist/chunk-3GIUOVQH.js.map +0 -1
- package/dist/chunk-IHU6IOZH.js.map +0 -1
package/dist/desk.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as PanelsOptions, a as PanelDef, b as PanelsState, c as PanelTargetInput, d as PanelTarget, p as panelDrop, e as PanelDrop, l as layoutPanels, f as PanelsLayout } from './targets-
|
|
1
|
+
import { P as PanelsOptions, a as PanelDef, b as PanelsState, c as PanelTargetInput, d as PanelTarget, p as panelDrop, e as PanelDrop, l as layoutPanels, f as PanelsLayout } from './targets-BYRTTwCP.js';
|
|
2
2
|
import './geometry-CkZ6Fcfb.js';
|
|
3
|
-
import './target-
|
|
3
|
+
import './target-D9PMr9pF.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @n-uf/placement/desk: desk presets as data on `@n-uf/placement/panels`. A preset is options for the panels engine
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { P as Point, R as Rect, S as Size } from './geometry-CkZ6Fcfb.js';
|
|
2
2
|
export { C as COLUMN_REACH, E as EPS, a as PLANE, b as RAIL_EDGE, c as area, d as centre, e as clamp, f as clampInto, g as contains, o as overlap, h as overlaps, r as rect, s as subtract } from './geometry-CkZ6Fcfb.js';
|
|
3
|
-
export { T as Target } from './target-
|
|
3
|
+
export { T as Target } from './target-D9PMr9pF.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Placing a popup (a drop label, a menu, a tooltip) the way Wayland's xdg-positioner does: an anchor point on the
|
|
@@ -88,6 +88,15 @@ interface StackForm {
|
|
|
88
88
|
* `hidden`.
|
|
89
89
|
*/
|
|
90
90
|
readonly hides?: readonly string[];
|
|
91
|
+
/**
|
|
92
|
+
* A `rail` form that draws the item's title along the rail (its name and count, turned to run along it) instead of
|
|
93
|
+
* its tile. Put it just before the item's tile `rail` form: in a rail the two are steps on the ladder, the title giving
|
|
94
|
+
* way to the tile by the usual rules and coming back in exact reverse. Its `main` is the title's length along the rail,
|
|
95
|
+
* measured by the host. A stack offers it only with `StackInput.titles`; otherwise it is passed over like a form that
|
|
96
|
+
* isn't there (never started in, stepped into or grown back to). `./scene` offers it in a rail whose side shows titles
|
|
97
|
+
* (`Scene.railModes`, default `"titles"`) and reports the side it reads from (`SceneItemLayout.railTitle`).
|
|
98
|
+
*/
|
|
99
|
+
readonly title?: boolean;
|
|
91
100
|
}
|
|
92
101
|
/**
|
|
93
102
|
* The least a form can be drawn across the stack: its `cross.min` (default its `natural`), or for a `wrap` form the
|
|
@@ -207,6 +216,11 @@ interface StackInput {
|
|
|
207
216
|
* `stackTargets`' hits and markers still span the stack.
|
|
208
217
|
*/
|
|
209
218
|
readonly ownCross?: boolean;
|
|
219
|
+
/**
|
|
220
|
+
* Offer the forms marked `title` (default false: they are passed over, so a stack without it lays out as if they
|
|
221
|
+
* weren't declared). A rail showing titles sets it.
|
|
222
|
+
*/
|
|
223
|
+
readonly titles?: boolean;
|
|
210
224
|
}
|
|
211
225
|
/** The width of a stack nothing open holds, px. */
|
|
212
226
|
declare const DEFAULT_RAIL = 30;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { R as Rect, S as Size, P as Point } from './geometry-CkZ6Fcfb.js';
|
|
2
|
-
import { T as Target } from './target-
|
|
3
|
-
import { C as CrossLimits, a as StackForm, S as StackFormKind, b as StackFit, c as StackNote } from './model-
|
|
2
|
+
import { T as Target } from './target-D9PMr9pF.js';
|
|
3
|
+
import { C as CrossLimits, a as StackForm, S as StackFormKind, b as StackFit, c as StackNote } from './model-CPM1Lv65.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The scene's shapes: one model of a whole window. A scene is a stage (the window's inner rect), the edges along its
|
|
@@ -205,6 +205,9 @@ interface ColumnTemplate {
|
|
|
205
205
|
}
|
|
206
206
|
/** Per zone, the kinds it takes. */
|
|
207
207
|
type ZoneAccepts = Readonly<Partial<Record<Zone, readonly Kind[]>>>;
|
|
208
|
+
/** How a side's rails show their items: their titles while they fit (the default), or their tiles only. */
|
|
209
|
+
type RailMode = "titles" | "icons";
|
|
210
|
+
declare const RAIL_MODES: readonly RailMode[];
|
|
208
211
|
/** A side's one rail strip: folded columns show in it as segments, in ring order. */
|
|
209
212
|
interface RailSpec {
|
|
210
213
|
/** Its width, px. */
|
|
@@ -212,6 +215,42 @@ interface RailSpec {
|
|
|
212
215
|
/** The kinds a drop on the rail may bring (it docks folded). */
|
|
213
216
|
readonly accepts: readonly Kind[];
|
|
214
217
|
}
|
|
218
|
+
/** When a host draws a side's rail drop strip: while an item of the kind is held (the default), always, or never. */
|
|
219
|
+
type RailVisibility = "whileDragging" | "always" | "never";
|
|
220
|
+
declare const RAIL_VISIBILITIES: readonly RailVisibility[];
|
|
221
|
+
/** The least width of a rail drop strip, px: a target at the window's edge stays easy to hit (Fitts's law). */
|
|
222
|
+
declare const RAIL_STRIP_MIN = 24;
|
|
223
|
+
/** How far an armed rail drop strip grows inward by default, px, so a hand that wobbles once armed keeps it. */
|
|
224
|
+
declare const DEFAULT_RAIL_MAGNET = 6;
|
|
225
|
+
/**
|
|
226
|
+
* How an item of one kind drops into a side's rail (`Scene.railDrop[kind]`): the geometry of its drop strip. Each kind
|
|
227
|
+
* has its own; a kind with none keeps the rail targets as they were (immediate, no strip).
|
|
228
|
+
*
|
|
229
|
+
* With a policy, each side whose rail can take the kind shows one drop strip at the window's side, at the rail's real
|
|
230
|
+
* width, even while the rail is empty: its targets are `rail:<side>:<ring>` with `arm: "dwell"` (spring-loading: the
|
|
231
|
+
* drag intent arms them on a dwell), `armedHit` (the strip grown by `magnet`) and `strip` (the rect to draw). The strip
|
|
232
|
+
* owns its rect: a drop there is the rail's once armed, the float's before. The side's rail is `Scene.rails[side]`
|
|
233
|
+
* where the scene declares one, else the side's outermost column that takes the kind in its start zone ("the column
|
|
234
|
+
* drawn as a rail"): a drop there docks the item in it as a collapsed header, a rail tile once nothing in it sets its
|
|
235
|
+
* width. The strip means "collapse it at this side": the drop is `moveTo` that side's rail, and lands wherever the
|
|
236
|
+
* scene shows a collapsed panel there (a rail tile, a rider bar under `handFold: "ride"`, a header); the slot is that.
|
|
237
|
+
*/
|
|
238
|
+
interface RailDropPolicy {
|
|
239
|
+
/**
|
|
240
|
+
* The strip's width, px, from the window's side inward (default: the rail's drawn width). At least
|
|
241
|
+
* {@link RAIL_STRIP_MIN}; 0 turns the kind's rail docking off.
|
|
242
|
+
*/
|
|
243
|
+
readonly railStripWidth?: number;
|
|
244
|
+
/** When the host draws the strip (default `"whileDragging"`); `"never"` turns the kind's rail docking off. */
|
|
245
|
+
readonly railVisibility?: RailVisibility;
|
|
246
|
+
/**
|
|
247
|
+
* How far the strip grows inward once armed, px (default {@link DEFAULT_RAIL_MAGNET}): the armed target's band
|
|
248
|
+
* (`armedHit`). Moving out past its outer edge disarms it, and re-entering the strip needs a new full dwell.
|
|
249
|
+
*/
|
|
250
|
+
readonly magnet?: number;
|
|
251
|
+
/** Whether a float may sit inside the strip's area (default true); false keeps a float's rect clear of every strip. */
|
|
252
|
+
readonly floatNearEdge?: boolean;
|
|
253
|
+
}
|
|
215
254
|
interface SceneFloat {
|
|
216
255
|
readonly id: string;
|
|
217
256
|
/** Its rect in stage px (it never scrolls with the content). With `anchor`, only its size counts. */
|
|
@@ -238,6 +277,19 @@ interface Scene {
|
|
|
238
277
|
readonly columns?: Partial<Record<"left" | "right", ColumnTemplate>>;
|
|
239
278
|
/** Per side (left, right): its rail. A side without one keeps folded columns as columns. */
|
|
240
279
|
readonly rails?: Partial<Record<"left" | "right", RailSpec>>;
|
|
280
|
+
/**
|
|
281
|
+
* Per side (left, right): how its rails show their items (default `"titles"`). It covers every rail on the side: a
|
|
282
|
+
* column drawn as a rail (nothing in it sets its width) and the side's rail strip (`rails`). `"titles"` offers the
|
|
283
|
+
* items' title rail forms (`StackForm.title`), each stepping down to its tile by the ladder when the rail runs short;
|
|
284
|
+
* `"icons"` passes them over, so every item shows its tile. An item with no title form shows its tile either way. A
|
|
285
|
+
* side needs no `rails` entry to have a mode: a column drawn as a rail reads it too. `storeScene` keeps it.
|
|
286
|
+
*/
|
|
287
|
+
readonly railModes?: Partial<Record<"left" | "right", RailMode>>;
|
|
288
|
+
/**
|
|
289
|
+
* Per item kind: how it drops into a side's rail ({@link RailDropPolicy}), keyed by the scene's own kind strings.
|
|
290
|
+
* Tuning one kind never changes another; a kind left out keeps the rail targets it had.
|
|
291
|
+
*/
|
|
292
|
+
readonly railDrop?: Readonly<Partial<Record<Kind, RailDropPolicy>>>;
|
|
241
293
|
/**
|
|
242
294
|
* The least the content may be. While the content is narrower than `width`, dynamic columns shrink toward their
|
|
243
295
|
* minimum, then fold whole into their side's rail: unkept before kept, the one whose newest use is oldest first, the
|
|
@@ -293,6 +345,12 @@ interface SceneItemLayout {
|
|
|
293
345
|
readonly fixed?: boolean;
|
|
294
346
|
/** Drawn as a segment of this side's rail (its column is folded). */
|
|
295
347
|
readonly rail?: "left" | "right";
|
|
348
|
+
/**
|
|
349
|
+
* Drawn in its title rail form (`StackForm.title`) on a rail of this side: a column drawn as a rail or the side's rail
|
|
350
|
+
* strip. The host turns the title to run along the rail and reads it toward the content: on the left from bottom to
|
|
351
|
+
* top (turned −90°), on the right from top to bottom (+90°), the count at the title's end.
|
|
352
|
+
*/
|
|
353
|
+
readonly railTitle?: "left" | "right";
|
|
296
354
|
/** Drawn as a title bar riding on this column (`handFold: "ride"`). */
|
|
297
355
|
readonly rides?: string;
|
|
298
356
|
/** Its column folded: by hand (every member folded) or by give-way. */
|
|
@@ -344,6 +402,11 @@ interface SceneRailLayout {
|
|
|
344
402
|
readonly edge: string;
|
|
345
403
|
readonly rect: Rect;
|
|
346
404
|
}[];
|
|
405
|
+
/**
|
|
406
|
+
* The segments' fit along the rail, in rail-local px, while any of them offers a title form (titles step down to
|
|
407
|
+
* tiles by the ladder and come back in exact reverse): `solve`'s `previous` reads it; a host needs it not.
|
|
408
|
+
*/
|
|
409
|
+
readonly stack?: StackFit;
|
|
347
410
|
}
|
|
348
411
|
/**
|
|
349
412
|
* Why the layout looks as it does:
|
|
@@ -484,8 +547,9 @@ interface FloatResize {
|
|
|
484
547
|
* it) and at most its `floatMax`; the float stays in the region floats lie in; every growing edge (a moving one, or the
|
|
485
548
|
* end of an axis not moving) stops at what floats are kept clear of, as drawn now (across first, over its height now;
|
|
486
549
|
* then along, over its new width), and such a stop beats the minimum. The rect is then laid by the one clamp `solve`
|
|
487
|
-
* lays floats with, so `solve(resize(...))` draws exactly this rect
|
|
488
|
-
* clear place
|
|
550
|
+
* lays floats with, so `solve(resize(...))` draws exactly this rect. A float that already covers something (no clear
|
|
551
|
+
* place at its size) may move to a clear place once a resize opens one; the preview is still the commit, and
|
|
552
|
+
* `"docked"` says so. `limits` says which of these bound it.
|
|
489
553
|
*
|
|
490
554
|
* Null for anything but a float drawn at its first form when that form grows (a panel's card): a toolbar group's size
|
|
491
555
|
* comes from its forms, and so does a folded float's bar. Pure: it solves the scene once, for what is drawn now.
|
|
@@ -501,7 +565,9 @@ declare function fitResize(scene: Scene, id: string, rect: Rect, moving: ResizeE
|
|
|
501
565
|
* the zone's items without it, closed ones included), or at the zone's end. The zone becomes the item's `align`.
|
|
502
566
|
* `{ kind: "column", side, ring }` makes a new column from `scene.columns[side]` at that ring (`Infinity`: the side's
|
|
503
567
|
* inner end, "Move to › Dock left"); `{ kind: "rail", side, ring }` does the same with the item folded by hand, so it
|
|
504
|
-
* shows in the rail
|
|
568
|
+
* shows in the rail (on a side with no declared rail, `Scene.rails`, its rail is its outermost column that takes the
|
|
569
|
+
* kind, "the column drawn as a rail": the item docks at the end of its start zone as a collapsed header, folded by
|
|
570
|
+
* hand, a rail tile once nothing there sets the width); `{ kind: "float", rect?, anchor? }` floats it. A dynamic column an item leaves empty is deleted
|
|
505
571
|
* and its side's rings are closed up.
|
|
506
572
|
* - `homeFor(scene, id, start)`: the place a start scene gives the item, for `moveTo`.
|
|
507
573
|
* - `floatAt(scene, id, rect?, orient?)`: floats it on top at `rect` (its size becomes `floatSize`); with no rect, at
|
|
@@ -563,6 +629,11 @@ declare function orient(scene: Scene, id: string, to: Orient): Scene;
|
|
|
563
629
|
*/
|
|
564
630
|
declare function resize(scene: Scene, edgeId: string, size: number): Scene;
|
|
565
631
|
declare function resize(scene: Scene, floatId: string, rect: Rect, moving?: ResizeEdges): Scene;
|
|
632
|
+
/**
|
|
633
|
+
* The side's rails show their items as `mode` (`Scene.railModes`): their titles while they fit, or their tiles only.
|
|
634
|
+
* Unchanged for a side other than left or right, an unknown mode, or the mode the side has already.
|
|
635
|
+
*/
|
|
636
|
+
declare function setRailMode(scene: Scene, side: "left" | "right", mode: RailMode): Scene;
|
|
566
637
|
/**
|
|
567
638
|
* The edge moved to the other side of its axis (left ⇄ right, top ⇄ bottom), as its side's outermost edge: ring 0, before
|
|
568
639
|
* that side's other edges (whose rings close up behind it; the side it left closes up too). Its items, size and options
|
|
@@ -595,6 +666,7 @@ declare function dockHome(scene: Scene, id: string, start: Scene): Scene;
|
|
|
595
666
|
* edges: { id: string; side: Side; ring: number; items: string[]; size?: number; column?: true }[];
|
|
596
667
|
* floats: { id: string; x: number; y: number; width: number; height: number; orient?: "row" | "column"; anchor?: FloatAnchor }[];
|
|
597
668
|
* items: Record<string, { used: number; kept?: true; from?: number; closed?: true; align?: "center" | "end"; floatSize?: { width: number; height: number } }>;
|
|
669
|
+
* railModes?: { left?: "titles" | "icons"; right?: "titles" | "icons" };
|
|
598
670
|
* }
|
|
599
671
|
* ```
|
|
600
672
|
*
|
|
@@ -646,6 +718,8 @@ interface StoredScene {
|
|
|
646
718
|
readonly edges: readonly StoredSceneEdge[];
|
|
647
719
|
readonly floats: readonly StoredSceneFloat[];
|
|
648
720
|
readonly items: Readonly<Record<string, StoredSceneItem>>;
|
|
721
|
+
/** Per side, how its rails show their items (`Scene.railModes`), when the scene sets one. */
|
|
722
|
+
readonly railModes?: Readonly<Partial<Record<"left" | "right", RailMode>>>;
|
|
649
723
|
}
|
|
650
724
|
interface SceneRead {
|
|
651
725
|
readonly scene: Scene;
|
|
@@ -688,6 +762,8 @@ interface SceneTarget extends Target {
|
|
|
688
762
|
readonly place: ScenePlace;
|
|
689
763
|
/** Gaps and strips: the line where the item's leading edge lands, zero thick, across the edge after the drop. */
|
|
690
764
|
readonly marker?: Rect;
|
|
765
|
+
/** A rail target under a kind's `Scene.railDrop` policy: the side's whole drop strip, for the host to draw. */
|
|
766
|
+
readonly strip?: Rect;
|
|
691
767
|
/** The scene a release here commits and its layout. Only a float's depends on the pointer. */
|
|
692
768
|
after(point: Point, grab?: Point): SceneAfter;
|
|
693
769
|
}
|
|
@@ -722,4 +798,4 @@ interface SceneRefusal {
|
|
|
722
798
|
readonly reason: "no-room" | "own-place" | "not-accepted";
|
|
723
799
|
}
|
|
724
800
|
|
|
725
|
-
export {
|
|
801
|
+
export { fold as $, type ResizeLimit as A, SIDES as B, type ColumnPlace as C, DEFAULT_FLOAT_SIZE as D, type Edge as E, type FloatAnchor as F, type SceneAfter as G, type SceneEdgeLayout as H, type SceneFloat as I, type SceneItemLayout as J, type Kind as K, type SceneNote as L, type SceneRailLayout as M, type SceneRead as N, type Orient as O, type Place as P, type StoredSceneEdge as Q, type RailMode as R, type Scene as S, type StoredSceneFloat as T, type StoredSceneItem as U, ZONES as V, close as W, dockHome as X, fitResize as Y, type Zone as Z, floatAt as _, type ScenePlace as a, homeFor as a0, keep as a1, lift as a2, moveTo as a3, open as a4, orient as a5, raise as a6, readScene as a7, resize as a8, setRailMode as a9, setSide as aa, storeScene as ab, use as ac, type SceneLayout as b, type StoredScene as c, type SceneTarget as d, type Side as e, type SceneNoteCode as f, type SceneItem as g, type ZoneAccepts as h, type SolveOptions as i, type SceneTargetOptions as j, type SceneRefusal as k, type ColumnTemplate as l, DEFAULT_HIT_BAND as m, DEFAULT_RAIL_MAGNET as n, DEFAULT_STRIP as o, type DockPlace as p, type FloatPlace as q, type FloatResize as r, RAIL_MODES as s, RAIL_STRIP_MIN as t, RAIL_VISIBILITIES as u, type RailDropPolicy as v, type RailPlace as w, type RailSpec as x, type RailVisibility as y, type ResizeEdges as z };
|
package/dist/panels.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { b as PanelsState, S as Side, E as Edge, C as Clock, a as PanelDef } from './targets-
|
|
2
|
-
export { B as BAND_SIZE, g as Band, h as BandOption, i as Column, D as DEFAULT_PANELS_OPTIONS, j as DockOptions, k as EDGES, F as FLOAT_HEIGHT, m as FLOAT_MIN, n as FloatAt, G as GiveWay, I as IDENTITY_VIEW, e as PanelDrop, o as PanelKind, q as PanelPlace, r as PanelStop, s as PanelStopsOptions, d as PanelTarget, c as PanelTargetInput, f as PanelsLayout, t as PanelsNote, u as PanelsNoteCode, P as PanelsOptions, v as PanelsStart, w as Place, x as PlacedBand, y as PlacedColumn, z as PlacedPanel, A as PlacedRail, R as Reserve, H as ReserveEdge, J as SIDES, V as View, W as Where, K as activate, L as bandHeight, M as bandSize, N as close, O as columnWidth, Q as createPanels, T as defOf, U as dock, X as dockBand, Y as float, Z as floatSize, _ as focus, $ as giveWayOrder, a0 as homePlace, a1 as keep, l as layoutPanels, a2 as liftPanel, a3 as open, a4 as ownWidth, p as panelDrop, a5 as panelStops, a6 as panelTargets, a7 as pin, a8 as placeRank, a9 as resizeBand, aa as resizeColumn, ab as resizeFloat, ac as samePlaces, ad as showTabs, ae as tick, af as toPage, ag as toView, ah as toggleFold, ai as whereIs } from './targets-
|
|
1
|
+
import { b as PanelsState, S as Side, E as Edge, C as Clock, a as PanelDef } from './targets-BYRTTwCP.js';
|
|
2
|
+
export { B as BAND_SIZE, g as Band, h as BandOption, i as Column, D as DEFAULT_PANELS_OPTIONS, j as DockOptions, k as EDGES, F as FLOAT_HEIGHT, m as FLOAT_MIN, n as FloatAt, G as GiveWay, I as IDENTITY_VIEW, e as PanelDrop, o as PanelKind, q as PanelPlace, r as PanelStop, s as PanelStopsOptions, d as PanelTarget, c as PanelTargetInput, f as PanelsLayout, t as PanelsNote, u as PanelsNoteCode, P as PanelsOptions, v as PanelsStart, w as Place, x as PlacedBand, y as PlacedColumn, z as PlacedPanel, A as PlacedRail, R as Reserve, H as ReserveEdge, J as SIDES, V as View, W as Where, K as activate, L as bandHeight, M as bandSize, N as close, O as columnWidth, Q as createPanels, T as defOf, U as dock, X as dockBand, Y as float, Z as floatSize, _ as focus, $ as giveWayOrder, a0 as homePlace, a1 as keep, l as layoutPanels, a2 as liftPanel, a3 as open, a4 as ownWidth, p as panelDrop, a5 as panelStops, a6 as panelTargets, a7 as pin, a8 as placeRank, a9 as resizeBand, aa as resizeColumn, ab as resizeFloat, ac as samePlaces, ad as showTabs, ae as tick, af as toPage, ag as toView, ah as toggleFold, ai as whereIs } from './targets-BYRTTwCP.js';
|
|
3
3
|
import { R as Rect } from './geometry-CkZ6Fcfb.js';
|
|
4
4
|
export { C as COLUMN_REACH, b as RAIL_EDGE } from './geometry-CkZ6Fcfb.js';
|
|
5
|
-
import './target-
|
|
5
|
+
import './target-D9PMr9pF.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* The panels' stored form: `storePanels(state)` gives plain JSON-safe data (`{ v: 1, … }`); `readPanels(data, defs?)`
|
package/dist/scene-cases.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { P as Point, R as Rect } from './geometry-CkZ6Fcfb.js';
|
|
2
|
-
import { S as StackFormKind } from './model-
|
|
3
|
-
import { S as Scene, a as ScenePlace, b as SceneLayout, c as StoredScene, d as SceneTarget, Z as Zone, e as Side, f as SceneNoteCode } from './model-
|
|
4
|
-
import './target-
|
|
2
|
+
import { S as StackFormKind } from './model-CPM1Lv65.js';
|
|
3
|
+
import { S as Scene, a as ScenePlace, b as SceneLayout, c as StoredScene, d as SceneTarget, Z as Zone, e as Side, f as SceneNoteCode } from './model-lYlnfQnl.js';
|
|
4
|
+
import './target-D9PMr9pF.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* The conformance rows' shapes. A row is plain data: a scene, the settings it runs at, the gestures a user makes, and
|
package/dist/scene-cases.js
CHANGED
package/dist/scene.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { g as SceneItem, O as Orient, S as Scene, E as Edge, K as Kind, h as ZoneAccepts, Z as Zone, i as SolveOptions, b as SceneLayout,
|
|
2
|
-
export { C as ColumnPlace, l as ColumnTemplate, D as DEFAULT_FLOAT_SIZE, m as DEFAULT_HIT_BAND, n as
|
|
1
|
+
import { g as SceneItem, O as Orient, S as Scene, E as Edge, e as Side, R as RailMode, K as Kind, h as ZoneAccepts, Z as Zone, i as SolveOptions, b as SceneLayout, j as SceneTargetOptions, k as SceneRefusal, d as SceneTarget } from './model-lYlnfQnl.js';
|
|
2
|
+
export { C as ColumnPlace, l as ColumnTemplate, D as DEFAULT_FLOAT_SIZE, m as DEFAULT_HIT_BAND, n as DEFAULT_RAIL_MAGNET, o as DEFAULT_STRIP, p as DockPlace, F as FloatAnchor, q as FloatPlace, r as FloatResize, P as Place, s as RAIL_MODES, t as RAIL_STRIP_MIN, u as RAIL_VISIBILITIES, v as RailDropPolicy, w as RailPlace, x as RailSpec, y as RailVisibility, z as ResizeEdges, A as ResizeLimit, B as SIDES, G as SceneAfter, H as SceneEdgeLayout, I as SceneFloat, J as SceneItemLayout, L as SceneNote, f as SceneNoteCode, a as ScenePlace, M as SceneRailLayout, N as SceneRead, c as StoredScene, Q as StoredSceneEdge, T as StoredSceneFloat, U as StoredSceneItem, V as ZONES, W as close, X as dockHome, Y as fitResize, _ as floatAt, $ as fold, a0 as homeFor, a1 as keep, a2 as lift, a3 as moveTo, a4 as open, a5 as orient, a6 as raise, a7 as readScene, a8 as resize, a9 as setRailMode, aa as setSide, ab as storeScene, ac as use } from './model-lYlnfQnl.js';
|
|
3
3
|
import { S as Size, R as Rect } from './geometry-CkZ6Fcfb.js';
|
|
4
4
|
export { F as FloatFit, f as fitFloat } from './float-fit-DRSOU_2y.js';
|
|
5
|
-
import './target-
|
|
6
|
-
import './model-
|
|
5
|
+
import './target-D9PMr9pF.js';
|
|
6
|
+
import './model-CPM1Lv65.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* What the scene's shapes (`./model`) tell on their own: which zones of an edge take a kind, an edge's axis, an item's
|
|
@@ -20,6 +20,8 @@ declare const zonesTaking: (edge: {
|
|
|
20
20
|
readonly accepts: readonly Kind[];
|
|
21
21
|
readonly zoneAccepts?: ZoneAccepts;
|
|
22
22
|
}, kind: Kind) => Zone[];
|
|
23
|
+
/** How the rails of `side` show their items (`Scene.railModes`, default `"titles"`); top and bottom have no rails. */
|
|
24
|
+
declare const railModeOf: (scene: Scene, side: Side) => RailMode;
|
|
23
25
|
/**
|
|
24
26
|
* A left or right toolbar bar outside the inset (`isSideBar` with `outsideInset`). It lies outermost on its side,
|
|
25
27
|
* before the side's rail.
|
|
@@ -150,4 +152,4 @@ declare function refusals(scene: Scene, dragged: string, options?: SceneTargetOp
|
|
|
150
152
|
*/
|
|
151
153
|
declare function stops(scene: Scene, dragged: string, options?: SceneTargetOptions): SceneTarget[];
|
|
152
154
|
|
|
153
|
-
export { Edge, Kind, Orient, Scene, SceneItem, SceneLayout, SceneRefusal, SceneTarget, SceneTargetOptions, Side, SolveOptions, type TargetIdParts, Zone, ZoneAccepts, floatOrientOf, floatSizeOf, isOutsideSideBar, isSideBar, parseTargetId, placeTargetId, refusals, reservedRect, solve, stops, targetId, targets, virtualEdgeId, zoneTakes, zonesTaking };
|
|
155
|
+
export { Edge, Kind, Orient, RailMode, Scene, SceneItem, SceneLayout, SceneRefusal, SceneTarget, SceneTargetOptions, Side, SolveOptions, type TargetIdParts, Zone, ZoneAccepts, floatOrientOf, floatSizeOf, isOutsideSideBar, isSideBar, parseTargetId, placeTargetId, railModeOf, refusals, reservedRect, solve, stops, targetId, targets, virtualEdgeId, zoneTakes, zonesTaking };
|
package/dist/scene.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_FLOAT_SIZE,
|
|
3
3
|
DEFAULT_HIT_BAND,
|
|
4
|
+
DEFAULT_RAIL_MAGNET,
|
|
4
5
|
DEFAULT_STRIP,
|
|
6
|
+
RAIL_MODES,
|
|
7
|
+
RAIL_STRIP_MIN,
|
|
8
|
+
RAIL_VISIBILITIES,
|
|
5
9
|
SIDES,
|
|
6
10
|
ZONES,
|
|
7
11
|
close,
|
|
@@ -21,11 +25,13 @@ import {
|
|
|
21
25
|
orient,
|
|
22
26
|
parseTargetId,
|
|
23
27
|
placeTargetId,
|
|
28
|
+
railModeOf,
|
|
24
29
|
raise,
|
|
25
30
|
readScene,
|
|
26
31
|
refusals,
|
|
27
32
|
reservedRect,
|
|
28
33
|
resize,
|
|
34
|
+
setRailMode,
|
|
29
35
|
setSide,
|
|
30
36
|
solve,
|
|
31
37
|
stops,
|
|
@@ -36,15 +42,19 @@ import {
|
|
|
36
42
|
virtualEdgeId,
|
|
37
43
|
zoneTakes,
|
|
38
44
|
zonesTaking
|
|
39
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-PC5UHBW4.js";
|
|
40
46
|
import {
|
|
41
47
|
fitFloat
|
|
42
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-3RRCKN74.js";
|
|
43
49
|
import "./chunk-WM5FJ3IS.js";
|
|
44
50
|
export {
|
|
45
51
|
DEFAULT_FLOAT_SIZE,
|
|
46
52
|
DEFAULT_HIT_BAND,
|
|
53
|
+
DEFAULT_RAIL_MAGNET,
|
|
47
54
|
DEFAULT_STRIP,
|
|
55
|
+
RAIL_MODES,
|
|
56
|
+
RAIL_STRIP_MIN,
|
|
57
|
+
RAIL_VISIBILITIES,
|
|
48
58
|
SIDES,
|
|
49
59
|
ZONES,
|
|
50
60
|
close,
|
|
@@ -65,11 +75,13 @@ export {
|
|
|
65
75
|
orient,
|
|
66
76
|
parseTargetId,
|
|
67
77
|
placeTargetId,
|
|
78
|
+
railModeOf,
|
|
68
79
|
raise,
|
|
69
80
|
readScene,
|
|
70
81
|
refusals,
|
|
71
82
|
reservedRect,
|
|
72
83
|
resize,
|
|
84
|
+
setRailMode,
|
|
73
85
|
setSide,
|
|
74
86
|
solve,
|
|
75
87
|
stops,
|
package/dist/stack.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as StackInput, F as FitOptions, b as StackFit, e as StackItem } from './model-
|
|
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-
|
|
1
|
+
import { d as StackInput, F as FitOptions, b as StackFit, e as StackItem } from './model-CPM1Lv65.js';
|
|
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-CPM1Lv65.js';
|
|
3
3
|
import { R as Rect, P as Point, S as Size } from './geometry-CkZ6Fcfb.js';
|
|
4
|
-
import { T as Target } from './target-
|
|
4
|
+
import { T as Target } from './target-D9PMr9pF.js';
|
|
5
5
|
import { F as FloatFit$1 } from './float-fit-DRSOU_2y.js';
|
|
6
6
|
|
|
7
7
|
/**
|
package/dist/stack.js
CHANGED
|
@@ -5,12 +5,18 @@ import { R as Rect } from './geometry-CkZ6Fcfb.js';
|
|
|
5
5
|
* 2 a slot; 3 a broad area such as floating anywhere), the zone the pointer hits, and optionally where the item
|
|
6
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
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.
|
|
8
10
|
*/
|
|
9
11
|
interface Target {
|
|
10
12
|
readonly id: string;
|
|
11
13
|
readonly priority: 1 | 2 | 3;
|
|
12
14
|
readonly hit: Rect;
|
|
13
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;
|
|
14
20
|
readonly slot?: Rect;
|
|
15
21
|
readonly label?: string;
|
|
16
22
|
readonly free?: boolean;
|
package/dist/targets.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { T as Target } from './target-
|
|
1
|
+
import { T as Target } from './target-D9PMr9pF.js';
|
|
2
2
|
import { R as Rect, P as Point, S as Size } from './geometry-CkZ6Fcfb.js';
|
|
3
3
|
import { D as DeskState, g as Layout, a as Construction, O as Options } from './constructions-DSEjvWMP.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-BYRTTwCP.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Each desk construction's drop targets, as pure functions: from the state with the dragged item lifted out, a list
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@n-uf/placement",
|
|
3
|
-
"version": "26.11.
|
|
3
|
+
"version": "26.11.29",
|
|
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",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"tsup": "^8.5.1",
|
|
81
81
|
"typescript": "^6.0.3",
|
|
82
82
|
"vitest": "^4.1.12",
|
|
83
|
-
"@n-uf/motion": "26.11.
|
|
83
|
+
"@n-uf/motion": "26.11.29"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|
|
86
86
|
"build": "tsup && node ./scripts/check-dist.mjs",
|