@jsenv/navi 0.29.328 → 0.29.330
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 +200 -32
- package/dist/dev/jsenv_navi.js.map +6 -6
- package/dist/jsenv_navi.js +200 -32
- package/dist/jsenv_navi.js.map +6 -6
- package/docs/control_value.md +21 -15
- 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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/navi",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.330",
|
|
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.68",
|
|
38
38
|
"@jsenv/humanize": "1.8.3",
|
|
39
39
|
"@jsenv/validity": "0.4.4"
|
|
40
40
|
},
|