@jsenv/navi 0.29.329 → 0.29.331
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/dist/dev/jsenv_navi.js +184 -15
- package/dist/dev/jsenv_navi.js.map +6 -6
- package/dist/jsenv_navi.js +184 -15
- package/dist/jsenv_navi.js.map +6 -6
- package/docs/control_value.md +21 -15
- package/docs/drag_to_travel.md +11 -1
- package/package.json +2 -2
package/docs/control_value.md
CHANGED
|
@@ -177,21 +177,27 @@ That is what the `:smooth` argument asks for:
|
|
|
177
177
|
</Button>
|
|
178
178
|
```
|
|
179
179
|
|
|
180
|
-
- **The
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
180
|
+
- **The control decides how it moves, and when the value lands.** The
|
|
181
|
+
argument says nothing about pixels or duration, and the two controls that
|
|
182
|
+
know it answer it differently because their movement is a different thing. A
|
|
183
|
+
wheel is a value one lands ON: it takes the value at once — whoever reads the
|
|
184
|
+
control right after the press (a form, `--navi-send`, a signal) gets it — and
|
|
185
|
+
scrolls to the row the way it glides after an arrow key, the short way round
|
|
186
|
+
when it loops. A spin is a value one GOES TO: it plays the travel a chevron
|
|
187
|
+
would play, one travel whatever the distance, and the value lands with the
|
|
188
|
+
slides, 250 ms later (`duration`). A slider would slide its thumb; a control
|
|
189
|
+
with nothing to move sets its value and that is all. A control that does not
|
|
190
|
+
know the argument is not broken — it answers like a plain `--navi-update`.
|
|
191
|
+
- **A spin says no the way its chevron does.** A value past `min`/`max` — or
|
|
192
|
+
one whose first step would be — is not travelled to at all: the same message
|
|
193
|
+
the chevron that way gives, said on the spin, and the value is left alone.
|
|
190
194
|
- **A gesture on the control itself is never fought.** A wheel being dragged
|
|
191
195
|
or flung keeps reporting its own rows; the requested value is where it goes
|
|
192
|
-
once the finger's movement is over.
|
|
193
|
-
|
|
194
|
-
to the user's own inputs.
|
|
196
|
+
once the finger's movement is over. A value a wheel merely caught up with is
|
|
197
|
+
not a choice either: arriving on it fires no settle, no `action` — those
|
|
198
|
+
belong to the user's own inputs. A spin is the other way round, and for the
|
|
199
|
+
same reason: the travel IS the answer being given, so landing tells
|
|
200
|
+
`uiAction` about it, with the press that asked for it.
|
|
195
201
|
- **`prefers-reduced-motion` keeps the instant swap.** The option describes
|
|
196
202
|
how the change is shown, and whoever asked to see less motion is answered
|
|
197
203
|
first.
|
|
@@ -200,8 +206,8 @@ The same request is available from JS, for what is not a button —
|
|
|
200
206
|
`dispatchRequestSetUIState(el, value, { behavior: "smooth" })` — and it
|
|
201
207
|
survives a group: sent to a `TimeRangeWheel`, it reaches each of its wheels.
|
|
202
208
|
|
|
203
|
-
_Reference: the wheel (`wheel.jsx`, `pendingBehaviorRef`)
|
|
204
|
-
honouring it
|
|
209
|
+
_Reference: the wheel (`wheel.jsx`, `pendingBehaviorRef`) and the spin
|
|
210
|
+
(`picker_spin.jsx`, `travelsPending`) are the controls honouring it._
|
|
205
211
|
|
|
206
212
|
## `signal` + `defaultValue`: the answer and where it starts
|
|
207
213
|
|
package/docs/drag_to_travel.md
CHANGED
|
@@ -470,7 +470,17 @@ Two things a travel in hand must never lose:
|
|
|
470
470
|
cancelled; a `lostpointercapture` before either means someone else asked for
|
|
471
471
|
the pointer (or the element it was held on left the document). What was being
|
|
472
472
|
carried goes back rather than landing wherever the hand happened to be, and a
|
|
473
|
-
travel comes home rather than committing
|
|
473
|
+
travel comes home rather than committing. Home is where the travel was going
|
|
474
|
+
BEFORE the press: one this gesture began goes back, one it caught in flight
|
|
475
|
+
carries on to the end that was decided before the finger landed — the
|
|
476
|
+
gesture said nothing, and nothing is what it changes. On a touchscreen this
|
|
477
|
+
is the common case, not a corner: a finger reaching for a travel lands on the
|
|
478
|
+
document root (the box is captured, unpointable), where neither the box's
|
|
479
|
+
`touch-action` nor its touchmove listener is on the touch's path — so while
|
|
480
|
+
a travel plays, `RouteTravel` keeps the touch refusable from the root, and
|
|
481
|
+
the gesture that catches it (started from the grab) refuses every touchmove
|
|
482
|
+
of that press. A scroll begun over a page still sliding is that page's, not
|
|
483
|
+
the document's;
|
|
474
484
|
- **a gesture must hear its own end wherever it is delivered.** A pointer can be
|
|
475
485
|
cancelled somewhere the box is not on the path (the document root, during a
|
|
476
486
|
transition): missed, the gesture never ends, and whatever it was holding stays
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/navi",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.331",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Library of components including navigation to create frontend applications",
|
|
6
6
|
"repository": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"preact": "^11.0.0-rc.2"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@jsenv/dom": "0.17.
|
|
37
|
+
"@jsenv/dom": "0.17.69",
|
|
38
38
|
"@jsenv/humanize": "1.8.3",
|
|
39
39
|
"@jsenv/validity": "0.4.4"
|
|
40
40
|
},
|