@jsenv/navi 0.30.15 → 0.30.17
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 +227 -133
- package/dist/dev/jsenv_navi.js.map +12 -12
- package/dist/jsenv_navi.js +227 -133
- package/dist/jsenv_navi.js.map +12 -12
- package/docs/popup_open.md +39 -29
- package/docs/route_transitions.md +6 -4
- package/package.json +1 -1
package/docs/popup_open.md
CHANGED
|
@@ -266,8 +266,8 @@ So a dialog whose content is seeded once — an uncontrolled field on a
|
|
|
266
266
|
very first render, instead of mounting on the previous subject and being
|
|
267
267
|
corrected (a flicker at best, stale fields at worst). Only
|
|
268
268
|
`mount="while-opened"` makes it true every time: content kept from an earlier
|
|
269
|
-
opening, or warmed by a hover, is already built when `onOpen` runs
|
|
270
|
-
[what the popup holds while it is closed](#what-the-popup-holds-while-it-is-closed)).
|
|
269
|
+
opening, or warmed by a press or a hover, is already built when `onOpen` runs
|
|
270
|
+
(see [what the popup holds while it is closed](#what-the-popup-holds-while-it-is-closed)).
|
|
271
271
|
A `Picker`'s `onOpen` is not this moment: it runs once its popup is built and
|
|
272
272
|
shown.
|
|
273
273
|
|
|
@@ -1069,14 +1069,15 @@ the gesture that opens the popup; `useAsyncData` reads it (see
|
|
|
1069
1069
|
and aborts of a screen left ([network_policy.md](./network_policy.md)) apply; a
|
|
1070
1070
|
reload keeps the open state, so it keeps the request too.
|
|
1071
1071
|
|
|
1072
|
-
**The request leaves at the press, the content is built
|
|
1072
|
+
**The request leaves at the press, the content is built during it.** A press
|
|
1073
1073
|
on what opens the popup — a `--navi-open` or `--navi-toggle` button — preruns
|
|
1074
1074
|
the route actions its opening changes, read as if the popup were already open:
|
|
1075
1075
|
the request leaves at the pointerdown, not when the open state is written. The
|
|
1076
|
-
content
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
a
|
|
1076
|
+
content is built later in that press, its reads finding their request in
|
|
1077
|
+
flight, or earlier: a `Picker`, or a popup given an `anchor`, builds it when the
|
|
1078
|
+
pointer rests there (see `mount`, below). On a computer the rows therefore
|
|
1079
|
+
arrive a press later than the content they fill. That is the price of a read
|
|
1080
|
+
keyed by the popup — one sheet per card, one request per card: a pointer
|
|
1080
1081
|
crossing a list of cards has chosen none of them, and a hover that asked would
|
|
1081
1082
|
ask for each card it crossed.
|
|
1082
1083
|
|
|
@@ -1100,10 +1101,11 @@ A `Dialog` or a `Popover` nobody has asked for yet is not even built — nor a
|
|
|
1100
1101
|
`Popup` or a `SidePanel`, which render one of the two. It stands in as one bare
|
|
1101
1102
|
element (a `<dialog>`, a `<div>`) — the id a command finds, the element a press
|
|
1102
1103
|
announces itself on — and the popup proper is built at the first request: an
|
|
1103
|
-
open, a press on what opens it, its `signal` or `open`
|
|
1104
|
-
it stays built. So a list whose rows each hold a few
|
|
1105
|
-
share sheet per card) pays one element per closed
|
|
1106
|
-
popup: a row may carry the popups of its own
|
|
1104
|
+
open, a press on what opens it (its content with it), its `signal` or `open`
|
|
1105
|
+
saying open. From then on it stays built. So a list whose rows each hold a few
|
|
1106
|
+
popups (a sheet per seat, a share sheet per card) pays one element per closed
|
|
1107
|
+
popup at every mount, not a popup: a row may carry the popups of its own
|
|
1108
|
+
actions. It is built at once when
|
|
1107
1109
|
something needs it from the start — open at mount, a `navState`, an `anchor` (a
|
|
1108
1110
|
hover builds the content ahead of the click), or a `mount` other than the
|
|
1109
1111
|
default. A `Picker`'s popup is the picker's own, built with it: it is anchored
|
|
@@ -1128,24 +1130,32 @@ yet, and hands them once they are
|
|
|
1128
1130
|
([control_object.md](./control_object.md#a-control-that-is-not-there)).
|
|
1129
1131
|
`"idle"` is `"always"` minus the cost on the render that draws the page.
|
|
1130
1132
|
|
|
1131
|
-
Whatever the value
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1133
|
+
Whatever the value, a press on what opens the popup (a `--navi-open` or
|
|
1134
|
+
`--navi-toggle` button, a picker's trigger when a press opens it, an
|
|
1135
|
+
expandable's UI part) builds the content ahead of the click: two frames after
|
|
1136
|
+
the pointerdown, or under a finger once the touch has been held 40ms without
|
|
1137
|
+
the browser taking it for a scroll. A tap released sooner builds at the open.
|
|
1138
|
+
A press that ends without opening keeps what it built, and the next one finds
|
|
1139
|
+
it there (`"while-opened"` is the exception, below). A popup with no anchor — a
|
|
1140
|
+
sheet, a side panel opened by a button — is warmed by nothing else.
|
|
1141
|
+
|
|
1142
|
+
Whatever the value but `"while-opened"`, intent on the anchor warms the content
|
|
1143
|
+
too: a pointer over it, or focus landing in it. The press, the pointer and the
|
|
1144
|
+
focus all warm it `onOpen` or not. The anchor only says where the popup is
|
|
1145
|
+
placed, so what counts is the control that intent is aimed at: the anchor
|
|
1146
|
+
itself when it is a control, or the one the popup is written in (a picker's
|
|
1147
|
+
trigger). Any other control inside the anchor keeps the intent for itself. A
|
|
1148
|
+
player's own picker, inside a card that another picker opens from, warms the
|
|
1149
|
+
player's callout and never the card's sheet; tiles anchored on the whole bar
|
|
1150
|
+
they sit in warm only the menu of the tile under the pointer. A pointer on a
|
|
1151
|
+
trigger that a press does not open — a picker with `openOn={[]}`, or one opened
|
|
1152
|
+
by a hold — warms nothing: the card it draws is pressed all day for what it
|
|
1153
|
+
holds. Focus on it still warms, since the keyboard opens it.
|
|
1154
|
+
|
|
1155
|
+
A `"while-opened"` popup is warmed only by that press, throws that content away
|
|
1156
|
+
when the press ends without opening it — one content at a time — and is never
|
|
1157
|
+
warmed on a `Dialog`/`Popover` with an `onOpen`: the one value where the content
|
|
1158
|
+
is always built after `onOpen`.
|
|
1149
1159
|
|
|
1150
1160
|
`"while-opened"` is for content whose fresh state is its initial state. An
|
|
1151
1161
|
untouched field does not need it to show a new `defaultValue`: it follows one
|
|
@@ -217,9 +217,10 @@ wears its request as an attribute, so a plain `<a>` says it too:
|
|
|
217
217
|
|
|
218
218
|
The back button, `navBack()`, `history.back()`, the browser's "next": a traversal
|
|
219
219
|
is not a walk on the map, it undoes one (or redoes one). The entry a push creates
|
|
220
|
-
remembers the crossing that created it — what played, which way, from which
|
|
221
|
-
— so a back onto the
|
|
222
|
-
forward plays it again as it was.
|
|
220
|
+
remembers the crossing that created it — what played, which way, from which
|
|
221
|
+
entry — so a back onto the entry that crossing came from plays it reversed, and a
|
|
222
|
+
forward plays it again as it was. An entry keeps its crossing when a replace
|
|
223
|
+
rewrites its address (a param settling, a list writing where it stands).
|
|
223
224
|
|
|
224
225
|
That replay outranks everything the relations **deduce**, and nothing the author
|
|
225
226
|
**wrote** for that exact way:
|
|
@@ -246,7 +247,8 @@ place.
|
|
|
246
247
|
The relations alone answer a traversal that retraces no remembered crossing:
|
|
247
248
|
several entries at once, or an entry another document wrote. A link to the page
|
|
248
249
|
one just came from is a traversal too, where the browser exposes its stack (see
|
|
249
|
-
[navigation.md](./navigation.md#where-a-navigation-lands-the-scroll))
|
|
250
|
+
[navigation.md](./navigation.md#where-a-navigation-lands-the-scroll)), and what
|
|
251
|
+
that link asks for still holds, field by field, over the crossing it retraces.
|
|
250
252
|
|
|
251
253
|
## Pages between fixed bars: the transition area
|
|
252
254
|
|