@n-uf/docking 26.11.57 → 26.11.58
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 +39 -0
- package/dist/{chunk-JBKUC72Z.js → chunk-7QOY2URO.js} +134 -46
- package/dist/chunk-7QOY2URO.js.map +1 -0
- package/dist/{drag-CyrphFye.d.ts → drag-BGcY5DGm.d.ts} +18 -5
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-JBKUC72Z.js.map +0 -1
|
@@ -84,6 +84,15 @@ interface DockItem {
|
|
|
84
84
|
* `DockEdge.zoneAccepts`: `readDockState` takes it from `base`, `storeDockState` never writes it.
|
|
85
85
|
*/
|
|
86
86
|
readonly pushable?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Whether it counts as a docked panel for `DockState.insetWhen: "docked"` (the inset applies only while one is docked
|
|
89
|
+
* beside the content). Left out, the rule is the old one: not closed, not fixed, its first column form is `open`,
|
|
90
|
+
* `header` or `rail`. It overrides that either way: `false` on a side strip (a narrow column that only moves the
|
|
91
|
+
* content aside and is no panel card) leaves the inset off while it is open alone; `true` on an item whose first form
|
|
92
|
+
* is none of those kinds counts it. A closed or fixed item never counts. A declaration of the state like `pushable`:
|
|
93
|
+
* `readDockState` takes it from `base`, `storeDockState` never writes it.
|
|
94
|
+
*/
|
|
95
|
+
readonly countsAsDocked?: boolean;
|
|
87
96
|
/** Closed: it keeps its place in its edge (or its float rect) but takes no room and has no targets. */
|
|
88
97
|
readonly closed?: boolean;
|
|
89
98
|
/**
|
|
@@ -124,7 +133,8 @@ interface DockItem {
|
|
|
124
133
|
* Its size as a float, per orient: `floatAt` with no rect uses the one for the orient it floats in, and a float drop or
|
|
125
134
|
* a hand resize sets it for the orient the float is in, so a float turned to the other orient (`orientFloat`) takes that
|
|
126
135
|
* orient's size and, turned back, its own again. Without one for an orient, a float takes its first form's natural size
|
|
127
|
-
* along that orient (`floatSizeOf`), or `DEFAULT_FLOAT_SIZE` when that form
|
|
136
|
+
* along that orient (`floatSizeOf`), or `DEFAULT_FLOAT_SIZE` when that form is sized by hand (a form that grows and
|
|
137
|
+
* shows a body, a panel's card).
|
|
128
138
|
*/
|
|
129
139
|
readonly floatSizes?: {
|
|
130
140
|
readonly row?: Size;
|
|
@@ -544,8 +554,10 @@ interface DockState {
|
|
|
544
554
|
/**
|
|
545
555
|
* When `inset` applies (default `"always"`): `"docked"` keeps it only while a panel is docked beside the content (an
|
|
546
556
|
* open panel column or a rail showing panels: a left or right edge that takes something, with an item that isn't
|
|
547
|
-
* closed or fixed and whose first column form is `open`, `header` or `rail
|
|
548
|
-
*
|
|
557
|
+
* closed or fixed and whose first column form is `open`, `header` or `rail`; the item's `countsAsDocked` overrides
|
|
558
|
+
* that either way: `false` for a side strip that only moves the content aside, `true` to count an item of another
|
|
559
|
+
* form). Bars, toolbar groups and an anchor never count, wherever they sit; with no panel there, the content is the
|
|
560
|
+
* whole stage.
|
|
549
561
|
*/
|
|
550
562
|
readonly insetWhen?: "always" | "docked";
|
|
551
563
|
/** Space after each left or right edge and each rail that takes room, toward the content, px (default 0). */
|
|
@@ -831,8 +843,9 @@ interface FloatResize {
|
|
|
831
843
|
* `"docked"` says so. Such a float never grows over what it covers: a dragged edge that lies inside an obstacle stays
|
|
832
844
|
* where it is drawn (`"docked"`), so a resize never covers more than the float did. `limits` says which of these bound it.
|
|
833
845
|
*
|
|
834
|
-
* Null for anything but a float drawn at its first form when that form
|
|
835
|
-
* comes from its forms, and so does a folded float's bar.
|
|
846
|
+
* Null for anything but a float drawn at its first form when that form is sized by hand (`sizedByHand`: a panel's
|
|
847
|
+
* card): a toolbar group's size comes from its forms (one that grows on a bar too), and so does a folded float's bar.
|
|
848
|
+
* Pure: it solves the state once, for what is drawn now.
|
|
836
849
|
*/
|
|
837
850
|
declare function fitResize(state: DockState, id: string, rect: Rect, moving: ResizeEdges): FloatResize | null;
|
|
838
851
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FloatAnchorAt, a as FloatAnchor, D as DockItem, K as Kind, Z as ZoneAccepts, b as Zone, O as Orient, c as DockState, d as KeepClear, A as AnchoredKeepClear, e as DockEdge, R as RailMode, S as SolveOptions, f as DockLayout, g as DockRefusal, h as DockDropOptions, i as DockDrop } from './drag-
|
|
2
|
-
export { C as ColumnPlace, j as ColumnTemplate, k as DEFAULT_FLOAT_SIZE, l as DEFAULT_HIT_BAND, m as DEFAULT_RAIL_MAGNET, n as DEFAULT_STRIP, o as DockAfter, p as DockDrag, q as DockEdgeLayout, r as DockFloat, s as DockGuideFrame, t as DockGuideRef, u as DockHeld, v as DockItemLayout, w as DockKeepClearLayout, x as DockLane, y as DockLaneMark, z as DockLaneOptions, B as DockMark, E as DockNote, G as DockNoteCode, H as DockPlace, I as DockRailLayout, J as DockRegions, L as DockSpot, M as DockStateRead, N as DropPlace, P as DropResult, Q as EDGE_ROOM_HOLD, T as EmptyLanes, U as FLOAT_ANCHORS, V as FloatAnchorOffset, W as FloatPlace, X as FloatResize, Y as HATCH_EDGE, _ as HATCH_END, $ as KeepClearRegion, a0 as LaneRefusal, a1 as LaneSlide, a2 as Place, a3 as RAIL_MODES, a4 as RAIL_STRIP_MIN, a5 as RAIL_VISIBILITIES, a6 as RailDropPolicy, a7 as RailPlace, a8 as RailSpec, a9 as RailVisibility, aa as ResizeEdges, ab as ResizeLimit, ac as SIDES, ad as SPOT_PITCH, ae as StoredDockState, af as StoredDockStateEdge, ag as StoredDockStateFloat, ah as StoredDockStateItem, ai as ZONES, aj as canFold, ak as closeItem, al as dockDrag, am as dockHome, an as fitResize, ao as floatAt, ap as foldItem, aq as homeFor, ar as keepItem, as as lanes, at as liftItem, au as markUsed, av as mergeSideColumns, aw as moveTo, ax as openItem, ay as orientFloat, az as raiseFloat, aA as readDockState, aB as resizeEdge, aC as resizeFloat, aD as setRailMode, aE as setSide, aF as storeDockState } from './drag-
|
|
1
|
+
import { F as FloatAnchorAt, a as FloatAnchor, D as DockItem, K as Kind, Z as ZoneAccepts, b as Zone, O as Orient, c as DockState, d as KeepClear, A as AnchoredKeepClear, e as DockEdge, R as RailMode, S as SolveOptions, f as DockLayout, g as DockRefusal, h as DockDropOptions, i as DockDrop } from './drag-BGcY5DGm.js';
|
|
2
|
+
export { C as ColumnPlace, j as ColumnTemplate, k as DEFAULT_FLOAT_SIZE, l as DEFAULT_HIT_BAND, m as DEFAULT_RAIL_MAGNET, n as DEFAULT_STRIP, o as DockAfter, p as DockDrag, q as DockEdgeLayout, r as DockFloat, s as DockGuideFrame, t as DockGuideRef, u as DockHeld, v as DockItemLayout, w as DockKeepClearLayout, x as DockLane, y as DockLaneMark, z as DockLaneOptions, B as DockMark, E as DockNote, G as DockNoteCode, H as DockPlace, I as DockRailLayout, J as DockRegions, L as DockSpot, M as DockStateRead, N as DropPlace, P as DropResult, Q as EDGE_ROOM_HOLD, T as EmptyLanes, U as FLOAT_ANCHORS, V as FloatAnchorOffset, W as FloatPlace, X as FloatResize, Y as HATCH_EDGE, _ as HATCH_END, $ as KeepClearRegion, a0 as LaneRefusal, a1 as LaneSlide, a2 as Place, a3 as RAIL_MODES, a4 as RAIL_STRIP_MIN, a5 as RAIL_VISIBILITIES, a6 as RailDropPolicy, a7 as RailPlace, a8 as RailSpec, a9 as RailVisibility, aa as ResizeEdges, ab as ResizeLimit, ac as SIDES, ad as SPOT_PITCH, ae as StoredDockState, af as StoredDockStateEdge, ag as StoredDockStateFloat, ah as StoredDockStateItem, ai as ZONES, aj as canFold, ak as closeItem, al as dockDrag, am as dockHome, an as fitResize, ao as floatAt, ap as foldItem, aq as homeFor, ar as keepItem, as as lanes, at as liftItem, au as markUsed, av as mergeSideColumns, aw as moveTo, ax as openItem, ay as orientFloat, az as raiseFloat, aA as readDockState, aB as resizeEdge, aC as resizeFloat, aD as setRailMode, aE as setSide, aF as storeDockState } from './drag-BGcY5DGm.js';
|
|
3
3
|
import { Size, Point, Rect, Side, Target } from '@n-uf/placement';
|
|
4
4
|
export { Axis, Side } from '@n-uf/placement';
|
|
5
5
|
import '@n-uf/placement/stack';
|
|
@@ -79,8 +79,8 @@ declare const floatOrientOf: (item: DockItem) => Orient;
|
|
|
79
79
|
declare const declaresFloatSizes: (item: DockItem) => boolean;
|
|
80
80
|
/**
|
|
81
81
|
* A float's size along `orient` (default `floatOrientOf`) when nothing else gives one: the item's `floatSizes` for that
|
|
82
|
-
* orient, else its first form's natural size along `orient`, or `DEFAULT_FLOAT_SIZE` when that form
|
|
83
|
-
* card has no natural float length) or the item has no form there.
|
|
82
|
+
* orient, else its first form's natural size along `orient`, or `DEFAULT_FLOAT_SIZE` when that form is sized by hand (a
|
|
83
|
+
* form that grows and shows a body, a panel's card, has no natural float length) or the item has no form there.
|
|
84
84
|
*/
|
|
85
85
|
declare function floatSizeOf(item: DockItem, orient?: Orient): Size;
|
|
86
86
|
|
package/dist/index.js
CHANGED
package/dist/testing.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Point, Rect, Side } from '@n-uf/placement';
|
|
2
2
|
import { StackFormKind } from '@n-uf/placement/stack';
|
|
3
|
-
import { c as DockState, N as DropPlace, f as DockLayout, ae as StoredDockState, b as Zone, G as DockNoteCode, i as DockDrop, g as DockRefusal, z as DockLaneOptions, u as DockHeld, t as DockGuideRef, J as DockRegions, L as DockSpot } from './drag-
|
|
3
|
+
import { c as DockState, N as DropPlace, f as DockLayout, ae as StoredDockState, b as Zone, G as DockNoteCode, i as DockDrop, g as DockRefusal, z as DockLaneOptions, u as DockHeld, t as DockGuideRef, J as DockRegions, L as DockSpot } from './drag-BGcY5DGm.js';
|
|
4
4
|
import { LandingGeometry, LandingRegions } from '@n-uf/motion/drag';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/testing.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@n-uf/docking",
|
|
3
|
-
"version": "26.11.
|
|
3
|
+
"version": "26.11.58",
|
|
4
4
|
"description": "Where panels and toolbars dock: a window's bars, rails, columns, items and floats solved into a layout, with the drop places, refusals and lanes of every drag. Pure state in, rects out. No DOM, no framework, no motion.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docking",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"LICENSE"
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@n-uf/placement": "26.11.
|
|
50
|
+
"@n-uf/placement": "26.11.58"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@n-uf/motion": "^26.11.
|
|
53
|
+
"@n-uf/motion": "^26.11.58"
|
|
54
54
|
},
|
|
55
55
|
"peerDependenciesMeta": {
|
|
56
56
|
"@n-uf/motion": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"tsup": "^8.5.1",
|
|
63
63
|
"typescript": "^6.0.3",
|
|
64
64
|
"vitest": "^4.1.12",
|
|
65
|
-
"@n-uf/motion": "26.11.
|
|
65
|
+
"@n-uf/motion": "26.11.58"
|
|
66
66
|
},
|
|
67
67
|
"scripts": {
|
|
68
68
|
"build": "tsup && node ./scripts/check-dist.mjs",
|