@n-uf/placement 26.11.49 → 26.11.51
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 +87 -0
- package/dist/{chunk-FJ5R6PMB.js → chunk-UPZXNTIR.js} +358 -88
- package/dist/chunk-UPZXNTIR.js.map +1 -0
- package/dist/{lanes-D8K4UI3s.d.ts → lanes-Dl39s0r7.d.ts} +69 -9
- package/dist/scene-cases.d.ts +18 -2
- package/dist/scene-cases.js +65 -5
- package/dist/scene-cases.js.map +1 -1
- package/dist/scene.d.ts +2 -2
- package/dist/scene.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-FJ5R6PMB.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,93 @@
|
|
|
3
3
|
Versions are calendar versions, `YY.M.R` (year, month of the release, counter within the month), shared with
|
|
4
4
|
`@n-uf/motion`: both packages carry the same version, and a release bumps both.
|
|
5
5
|
|
|
6
|
+
## 26.11.51
|
|
7
|
+
|
|
8
|
+
A stretch is the room the drop makes. Host notes: additive; a host that draws hatches may read their new `givesWay`.
|
|
9
|
+
|
|
10
|
+
- `./scene`, **a neighbor that steps down to make room gives way** (fix). One rule for marks and stretches: when the
|
|
11
|
+
item lands beside a room, a neighbor gives way if it moves away from the room, leaves the lane (the menu, a float)
|
|
12
|
+
or takes a shorter form than it has now. For the marks, "now" is the layout they are drawn in (as seen) when no
|
|
13
|
+
spot is held; with `spot` held it is the layout as seen with the held item lifted (what the window showed before
|
|
14
|
+
this drop), since in the spot's own layout the neighbor is already drawn stepped down: its striped end and
|
|
15
|
+
`givesWay` stay. Stretches compare with the layout as seen with the held item lifted.
|
|
16
|
+
- A free stretch of a bar or a toolbar rail runs from flush after the neighbor before it to flush before the one
|
|
17
|
+
after it **in the forms the drop leaves them in**, not only as seen. Where the room as seen is shorter than the
|
|
18
|
+
item but a drop there steps a neighbor down, the stretch now has its sliding spot (and its pitched spots under
|
|
19
|
+
`"pitched"`, not only its two ends), so the landing stays at the hand across that room; before, it stayed at a
|
|
20
|
+
dock at one end while the pointer crossed the open room. A dock's push of a neighbor that keeps no room for it
|
|
21
|
+
is no room made: that end stays where it is seen. The forms don't depend on the space a dock keeps, so every start
|
|
22
|
+
in the stretch finds them alike, and every start that lands as aimed (within 1 px) is in the range.
|
|
23
|
+
- **No sliding spot is a point; every landing a room offers has a spot.** A stretch with room for the item at a
|
|
24
|
+
single start (its range under a pixel), or shorter than the item, has no sliding spot: that start (flush after the
|
|
25
|
+
neighbor before it) is a plain dock, as a pitched stretch's end gives it, with the plain dock's id and no `slide`
|
|
26
|
+
(`…@<pitches kept>` where a dock between the same neighbors already has that id), `home` where it is the item's own
|
|
27
|
+
place. A spot already landing within 1 px of it (the item's own place, say) stays instead. So under `"free"` every
|
|
28
|
+
landing `"pitched"` offers is reached, by a spot within 1 px or a slide's range, and its box and striped ends come
|
|
29
|
+
from its landing. (Before this, such a stretch could show as a `…@slide` spot with `from` equal to `to`; or, where
|
|
30
|
+
no plain dock landed there, as nothing: no spot, box or hatch.)
|
|
31
|
+
- **The item's own place wins its landing** (fix, both modes): a dock landing a fraction of a pixel before it (on an
|
|
32
|
+
over-subscribed edge) no longer takes its place, so its home spot is listed.
|
|
33
|
+
- **Marks:** a box gets its striped end (`HATCH_END`) at the side of each neighbor that gives way, whether or not the
|
|
34
|
+
room as seen is shorter than the item; where none moves, leaves or steps down, the box is plain. The hatch mark
|
|
35
|
+
carries **`LaneMark.givesWay`**, the neighbor's id (data for hosts and tests; nothing to show). The old fallback for
|
|
36
|
+
short room where neither neighbor moved (a striped end at the neighbor after) is gone: there the item fits by
|
|
37
|
+
taking another form itself, and its box is plain.
|
|
38
|
+
- `./scene/cases`, **`STEP_SINCE`** (`"26.11.51"`) and the landing row `landing-step-down-room`: a toolbar slid at
|
|
39
|
+
0.3 px/ms over room a neighbor steps down to make stays within 48 px of the pointer (56 on the frame before a hop).
|
|
40
|
+
A host on an older version skips it.
|
|
41
|
+
|
|
42
|
+
## 26.11.50
|
|
43
|
+
|
|
44
|
+
Stretch positions. With `@n-uf/motion`'s sliding spots. Host notes: **a contract change**: `stretchPositions` now
|
|
45
|
+
defaults to `"free"`; pass `"pitched"` for the old pitched spots. Under `"free"`, commit a sliding spot through its
|
|
46
|
+
target's `after(point, grab)` (a release by id alone must pass the pointer), give the landing model the press's grab,
|
|
47
|
+
and read a release's `home` and `at` (not the target's place kind) to tell the item's own place from a move along its
|
|
48
|
+
stretch.
|
|
49
|
+
|
|
50
|
+
- `./scene`, **`LaneOptions.stretchPositions`** (`"free" | "pitched"`, default `"free"`) and
|
|
51
|
+
**`LaneOptions.snapDistance`** (default 8). **Contract change:** `stretchPositions` now defaults to `"free"`; pass
|
|
52
|
+
`"pitched"` for the old pitched spots. A free stretch on a bar or a toolbar rail is a range of landings from flush
|
|
53
|
+
against one neighbor to flush against the other: `"pitched"` samples it every `pitch` px, its ends included (its
|
|
54
|
+
ids and its ends changed in this release: see the room model below); `"free"` gives one sliding spot, `LaneSpot.slide` (`LaneSlide`: `{ from, to, snaps, snapDistance, step }`),
|
|
55
|
+
id `<lane>/<zone>/<before>|<after>@slide`. Its `target.after(point, grab)` lands the item's start at the pointer less
|
|
56
|
+
the grab, clamped and snapped (to the stretch's ends, the item's own place and any dock inside), else on a whole
|
|
57
|
+
pixel (`step` 1), as a dock keeping the `space` that puts it there. A release within the snap distance of the
|
|
58
|
+
item's own place is home. The stretch stays one guide box. `pitch` of 0 or less turns pitched spots off; under
|
|
59
|
+
`"free"` it only sets the sampling step that checks a stretch's range (40 px when 0 or less).
|
|
60
|
+
- `./scene`, **the room model: contract changes.** Room is the free length an item keeps on its zone's open side
|
|
61
|
+
(`SceneItem.space`) and belongs to the stretch, not to the item that sits beside it:
|
|
62
|
+
- `lift` gives the item's room to the next placed item in its zone (the first that keeps room, past the flush items
|
|
63
|
+
between), which stays where it is; before, the room went with the item.
|
|
64
|
+
- `moveTo` and `moveAmong` consume a placed neighbor's room: an item docked into room lies flush against its zone's end of
|
|
65
|
+
it (or where its own `space` puts it) and the neighbor keeps what is left. The old rule, "the item takes the space
|
|
66
|
+
its new neighbor kept", is gone, and a named `space` in a `DockPlace` now changes the neighbor.
|
|
67
|
+
- `floatAt` lifts first, so the room the item held goes to the next placed item as for `lift`.
|
|
68
|
+
- `ROOM_SINCE` (`"26.11.50"`, `./scene/cases`) and two new `LANDING_CASES` rows: the rows that pass a neighbor keeping
|
|
69
|
+
room need a library with this model; a host on an older version skips them.
|
|
70
|
+
- Takeover spots `…@in:<neighbor>` in both modes: over a neighbor itself the item takes its place and the neighbor gives
|
|
71
|
+
way by the item's length, so passing a neighbor longer than the room beside it leaves no gap between the landings
|
|
72
|
+
either side.
|
|
73
|
+
- Pitched ids at a stretch's end: the end that keeps some space is `…@to:<neighbor>` (the neighbor it lies against),
|
|
74
|
+
where it was `…@<n>` (pitches kept); the open-end "dock keeping none" spots are removed. A host that keys on a
|
|
75
|
+
pitched spot's id re-keys; a landing model maps a lost id to its lane's nearest spot as before.
|
|
76
|
+
- `./scene`, **a free start is whole pixels in the frame, the release and the commit** (`LaneSlide.step`): the spot
|
|
77
|
+
carries the grain, and `@n-uf/motion`'s landing model rounds its frame by it, so the rect a frame draws is the rect
|
|
78
|
+
the drop commits (before, the frame used the raw start and only the commit rounded: up to half a pixel apart). Known
|
|
79
|
+
caveat: on an over-subscribed edge the solver gives fractional positions, so frame and commit can differ by about a
|
|
80
|
+
pixel there.
|
|
81
|
+
- `./scene`, **a snap point is keyed by what it commits** (fix): a dock that lands inside a stretch (a center dock, say)
|
|
82
|
+
keeps its own snap point even within half a pixel of the stretch's start, and commits as that dock. Two points merge
|
|
83
|
+
only where they lie on the same start, the taken-over dock then winning. A center dock's snap moves its center
|
|
84
|
+
neighbor by design.
|
|
85
|
+
- `./scene`, **a spot's `place` is the dock at the spot's listed landing** (fix): `place` is the dock at the spot's listed
|
|
86
|
+
landing (on the item's own sliding spot its own zone, index and `space`, where it said the stretch's first zone); a
|
|
87
|
+
sliding spot commits through `after(point, grab)`, and the release's `home` and `at` say where, never the place kind
|
|
88
|
+
(which says "home" only for a spot whose drop changes nothing: a pitched or plain home spot).
|
|
89
|
+
- `./scene/cases`, **`createLandingHost`** takes `stretchPositions` (default: the library's), passes the press's `grab`
|
|
90
|
+
to the landing model, and commits a release by the model's `home`; `LandingRule`'s options carry `grab` (additive).
|
|
91
|
+
The landing rows hold under both values.
|
|
92
|
+
|
|
6
93
|
## 26.11.49
|
|
7
94
|
|
|
8
95
|
The gutter between a column and the pages is open space. With `@n-uf/motion` 26.11.49. Host notes: none; a host
|