@jsenv/navi 0.29.360 → 0.29.362
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 +316 -113
- package/dist/dev/jsenv_navi.js.map +6 -6
- package/dist/jsenv_navi.js +315 -112
- package/dist/jsenv_navi.js.map +6 -6
- package/docs/interactions.md +8 -2
- package/docs/scroll.md +6 -0
- package/package.json +1 -1
package/docs/interactions.md
CHANGED
|
@@ -154,12 +154,18 @@ of — which is how a menu is opened at the point the press happened.
|
|
|
154
154
|
## Reaching the control
|
|
155
155
|
|
|
156
156
|
Everything goes through the interaction gate of the **nearest control** — itself,
|
|
157
|
-
an ancestor, or
|
|
158
|
-
control answers a swipe the way it answers a click: it says why, where the
|
|
157
|
+
an ancestor, or the one control it wraps, in that order. So a disabled, read-only
|
|
158
|
+
or busy control answers a swipe the way it answers a click: it says why, where the
|
|
159
159
|
interaction happened, and nothing runs. A `Box` with no control anywhere near it
|
|
160
160
|
still answers a callback; only `"request_action"` has nothing to ask, and says so
|
|
161
161
|
in dev.
|
|
162
162
|
|
|
163
|
+
A `Box` that lays out **several** controls — a row of badges, a toolbar — belongs
|
|
164
|
+
to none of them: its interactions are its own, answered with no gate, exactly as
|
|
165
|
+
a `Box` with no control near it. A click on its empty part is the box's, and a
|
|
166
|
+
click on one of the controls reaches the box too, the way any click bubbles;
|
|
167
|
+
the callback reads `event.target` when it has to tell them apart.
|
|
168
|
+
|
|
163
169
|
The one thing the gate weighs besides the control's state is what the
|
|
164
170
|
interaction would do to it. Everything writes unless it says otherwise; an
|
|
165
171
|
interaction that only shows what is already there declares `intent: "read"`, and
|
package/docs/scroll.md
CHANGED
|
@@ -157,6 +157,12 @@ picked up then. When it is still not the box you mean, say so explicitly with
|
|
|
157
157
|
`open`/`defaultOpen` elsewhere in navi. The list goes back there every time it
|
|
158
158
|
changes, even after the user scrolled.
|
|
159
159
|
- **`onScrolledChange`** gives `{id, index, offset}` as the user scrolls.
|
|
160
|
+
- A list with an `id` **comes back where it was** when its screen is left and
|
|
161
|
+
come back to, the way the page does: the position is kept under the list's
|
|
162
|
+
`id` and the page's url, for the session, and put back by name the way
|
|
163
|
+
`defaultScrolled={{id, offset}}` is. A fresh arrival at the page still opens
|
|
164
|
+
at `defaultScrolled`. **`scrollResetOnNavigation`** opts out: the list then
|
|
165
|
+
opens the same way every time.
|
|
160
166
|
|
|
161
167
|
### A search moves the list, and gives it back
|
|
162
168
|
|