@jsenv/navi 0.30.15 → 0.30.16

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.
@@ -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 (see
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 at the hover.** A press
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 may be built earlier: a `Picker`, or a popup given an `anchor`, builds
1077
- it when the pointer rests there (see `mount`, below). On a computer the rows
1078
- therefore arrive a press later than the content they fill. That is the price of
1079
- a read keyed by the popup — one sheet per card, one request per card: a pointer
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` saying open. From then on
1104
- it stays built. So a list whose rows each hold a few popups (a sheet per seat, a
1105
- share sheet per card) pays one element per closed popup at every mount, not a
1106
- popup: a row may carry the popups of its own actions. It is built at once when
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 but `"while-opened"`, intent on what opens the popup builds
1132
- the content ahead of the click, `onOpen` or not: a pointer over its anchor, or
1133
- focus landing in it. The anchor only says where the popup is placed, so what
1134
- counts is the control that intent is aimed at: the anchor itself when it is a
1135
- control, or the one the popup is written in (a picker's trigger). Any other
1136
- control inside the anchor keeps the intent for itself. A player's own picker,
1137
- inside a card that another picker opens from, warms the player's callout and
1138
- never the card's sheet; tiles anchored on the whole bar they sit in warm only
1139
- the menu of the tile under the pointer. A pointer on a trigger that a press does
1140
- not open — a picker with `openOn={[]}`, or one opened by a hold — warms nothing:
1141
- the card it draws is pressed all day for what it holds. Focus on it still warms,
1142
- since the keyboard opens it.
1143
-
1144
- A `"while-opened"` popup is warmed only by a press on what opens it (a
1145
- `--navi-open` button, a picker's trigger when a press opens it, an expandable's
1146
- UI part), throws that content away when the press ends without opening it — one
1147
- content at a time — and is never warmed on a `Dialog`/`Popover` with an
1148
- `onOpen`: the one value where the content is always built after `onOpen`.
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 url
221
- — so a back onto the page that crossing came from plays it reversed, and a
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/navi",
3
- "version": "0.30.15",
3
+ "version": "0.30.16",
4
4
  "type": "module",
5
5
  "description": "Library of components including navigation to create frontend applications",
6
6
  "repository": {