@n-uf/motion 26.11.54 → 26.11.55
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 +46 -0
- package/README.md +1 -1
- package/dist/{chunk-IT2FMZOM.js → chunk-W7YP7VB2.js} +208 -315
- package/dist/chunk-W7YP7VB2.js.map +1 -0
- package/dist/drag.d.ts +93 -116
- package/dist/drag.js +1 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -3
- package/package.json +1 -1
- package/dist/chunk-IT2FMZOM.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,52 @@
|
|
|
3
3
|
Versions are calendar versions, `YY.M.R` (year, month of the release, counter
|
|
4
4
|
within the month), the same scheme as `@n-uf/hypr-tiling`.
|
|
5
5
|
|
|
6
|
+
Unreleased entries live in `changes/` until a release joins them.
|
|
7
|
+
|
|
8
|
+
## 26.11.55
|
|
9
|
+
|
|
10
|
+
- Fixed: **a float pressed inside an empty lane's band no longer takes that lane when the drag starts.** A lift is a
|
|
11
|
+
float's when it has no `home` option and no lane has a spot marked home (new optional `LandingSpot.home`; docking marks a
|
|
12
|
+
docked item's, so a docked item lifted without `home` stays docked). A float lift now has the lift zone a docked item has, `margins.lift` (16 px)
|
|
13
|
+
around the press: within it no lane takes the pointer, and the frame is judged as if the regions had no lanes, so a nudge
|
|
14
|
+
moves the float, a float over a blocked or refused place is refused as on any frame, and no lane's path counts. The zone is
|
|
15
|
+
left once, past `lift` from the press, and never re-entered, so sliding back through the press point while a lane is held
|
|
16
|
+
changes nothing. After the zone the lanes act by their gates as before.
|
|
17
|
+
|
|
18
|
+
### One layout: the landing model takes a held place (breaking; with `@n-uf/docking`'s `dockDrag`)
|
|
19
|
+
|
|
20
|
+
The landing model picks a held place and does no layout: every rect of a held place is the host's geometry's, so a held frame draws
|
|
21
|
+
exactly what its release commits. `@n-uf/docking`'s `dockDrag(...)` is that geometry as it is.
|
|
22
|
+
|
|
23
|
+
- **Options.** `createLandingModel({ regions, landingOf, spotsOf?, home?, lift?, margins?, gates?, approach?, placeGuides? })`
|
|
24
|
+
(`LandingOptions` extends the new `LandingGeometry`: `regions` for hit-testing, `landingOf(held)`, the one rect the
|
|
25
|
+
model reads of a held place, and `spotsOf(spot)`, a held lane's stretches in that spot's layout). Removed: `regionsFor`
|
|
26
|
+
(use `spotsOf`), `floatLanding` (`landingOf({ kind: "float", point })`), `grab` (the geometry's: `dockDrag`'s option).
|
|
27
|
+
`setRegions(regions, regionsFor?)` → `setGeometry(geometry)`, whole.
|
|
28
|
+
- **Held places.** New `LandingHeld`: `{ kind: "spot", lane, spot, point }` or `{ kind: "float", point }`. `LandingFrame`
|
|
29
|
+
gains `held` (the held place a release lands now, or null); its `landing` is `landingOf(held)`; its `guides` are now
|
|
30
|
+
`{ lane, held }[]`, each lane shown with the held place its guide stands for (the geometry draws them: docking's
|
|
31
|
+
`guides(frame)`). `LandingRelease` is `{ kind: "spot", lane, spot, point, home }`, `{ kind: "float", point }` or null:
|
|
32
|
+
`at` and `rect` are gone; commit `after(release).state`.
|
|
33
|
+
- **Removed types and fields.** `LandingGuide`, `LandingMark`, `LandingSlide`, `SNAP_DISTANCE`; `LandingLane.marks`,
|
|
34
|
+
`entry` and `corners`; `LandingSpot.slide`. `LandingLane.owns` stays (a hit-testing rule). The model's own sliding
|
|
35
|
+
arithmetic (`landingAt`), its guide geometry and corner owner, and its `guideRects` call are gone: the geometry draws.
|
|
36
|
+
- **Behavior.** Under `"all"` with no Near lane, the lane nearest the pointer within `reach` names its would-land held place,
|
|
37
|
+
for the corner only, switching exactly at `reach`. The trail gate reads `landingOf` the spot held (a sliding spot's
|
|
38
|
+
landing where the hand holds it, not its listed one). `release().home` holds where the geometry lands the item
|
|
39
|
+
home. Hit-testing reads the stage, the lanes' rects, refused, blocked and content as seen (`regions`) on every frame;
|
|
40
|
+
only the held lane's spot stretches come from `spotsOf` (before, all of it came from the held spot's regions,
|
|
41
|
+
`regionsFor`). `LandingRegions.item` is optional: the model doesn't read it. New type: `LandingGuideRef`.
|
|
42
|
+
|
|
43
|
+
### Docs only
|
|
44
|
+
|
|
45
|
+
- **The design page and the reference catch up with the code.** No behavior, type or export change. Docking's marks (a
|
|
46
|
+
panel drag's lines, boxes and empty columns) are written up on docking's design page, not here; the draw rule for a
|
|
47
|
+
held frame (the state's layout while its room is open, else the window at rest) is stated once there. The unit rule
|
|
48
|
+
names its three exceptions (`DOUBLE_CLICK` and `multiClick`, `longPress.ms`, `WheelPanOptions.speed`). The
|
|
49
|
+
reference covers behavior, with the exported types as the contract, and adds entries for `DragFrame`, `DragTuning`,
|
|
50
|
+
`LandingFrame`, `LandingRelease`, `LandingGates` and the other landing option types.
|
|
51
|
+
|
|
6
52
|
## 26.11.54
|
|
7
53
|
|
|
8
54
|
**The breaking release of the SDK: structure and names, and the few behavior changes they bring.** The drag intent goes
|
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ console.log(intent.release({ x: 100, y: 50 }, 300, [slot])?.id); // "slot"
|
|
|
68
68
|
## Documentation
|
|
69
69
|
|
|
70
70
|
- [Design page](https://github.com/n-uf/motion/blob/main/docs/motion.md): the concept, the parts, the rules a consumer relies on.
|
|
71
|
-
- [Reference](https://github.com/n-uf/motion/blob/main/docs/motion-reference.md): every entry point's
|
|
71
|
+
- [Reference](https://github.com/n-uf/motion/blob/main/docs/motion-reference.md): every entry point's behavior, rules and longer examples; the exported types are the contract.
|
|
72
72
|
- [CHANGELOG](https://github.com/n-uf/motion/blob/main/packages/motion/CHANGELOG.md)
|
|
73
73
|
- Site and live demos: [motion.n-uf.com](https://motion.n-uf.com)
|
|
74
74
|
|