@jsenv/navi 0.29.420 → 0.29.421

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.
@@ -894,14 +894,24 @@ off it (the default of a picker told no value), fields a surrounding form
894
894
  submits, a size measured from outside. `"idle"` is `"always"` minus the cost on
895
895
  the render that draws the page.
896
896
 
897
- Whatever the value but `"while-opened"`, intent on the anchor — a pointer
898
- entering it, focus landing in it — builds the content ahead of the click,
899
- `onOpen` or not. A `"while-opened"` popup is warmed only by a press on what
900
- opens it (a `--navi-open` button, a picker's trigger when a press opens it, an
901
- expandable's UI part), throws that content away when the press ends without
902
- opening it — one content at a time — and is never warmed on a
903
- `Dialog`/`Popover` with an `onOpen`: the one value where the content is always
904
- built after `onOpen`.
897
+ Whatever the value but `"while-opened"`, intent on what opens the popup builds
898
+ the content ahead of the click, `onOpen` or not: a pointer over its anchor, or
899
+ focus landing in it. The anchor only says where the popup is placed, so what
900
+ counts is the control that intent is aimed at: the anchor itself when it is a
901
+ control, or the one the popup is written in (a picker's trigger). Any other
902
+ control inside the anchor keeps the intent for itself. A player's own picker,
903
+ inside a card that another picker opens from, warms the player's callout and
904
+ never the card's sheet; tiles anchored on the whole bar they sit in warm only
905
+ the menu of the tile under the pointer. A pointer on a trigger that a press does
906
+ not open — a picker with `openOn={[]}`, or one opened by a hold — warms nothing:
907
+ the card it draws is pressed all day for what it holds. Focus on it still warms,
908
+ since the keyboard opens it.
909
+
910
+ A `"while-opened"` popup is warmed only by a press on what opens it (a
911
+ `--navi-open` button, a picker's trigger when a press opens it, an expandable's
912
+ UI part), throws that content away when the press ends without opening it — one
913
+ content at a time — and is never warmed on a `Dialog`/`Popover` with an
914
+ `onOpen`: the one value where the content is always built after `onOpen`.
905
915
 
906
916
  `"while-opened"` is for content whose fresh state is its initial state. An
907
917
  untouched field does not need it to show a new `defaultValue`: it follows one
package/docs/scroll.md CHANGED
@@ -136,7 +136,7 @@ makes that possible is `searchText` on the `List` — without it the list sees n
136
136
  children and nothing else.
137
137
 
138
138
  - **While the search is on**, the list scrolls back to its first row every time
139
- the best matches change (the top `renderBudget` rows, by id and
139
+ the best matches change (as many top rows as the window draws, by id and
140
140
  `matchInfo.matchScore`), so a letter that promotes nobody new leaves the list
141
141
  where the user put it.
142
142
  - **When the search is emptied**, the list returns to the offset it was at when
@@ -286,13 +286,24 @@ sheet, a handful of tabs. A collection whose size the caller does not decide
286
286
  </List>
287
287
  ```
288
288
 
289
- The run draws only the rows inside the **render window** — `renderBudget` of
290
- them, 100 by default — and holds the room of the others with fillers, so the
291
- scrollbar says how long the collection is and the DOM says how many rows fit a
292
- screen and some. The window slides as the user scrolls, ahead of the direction
293
- the user goes, so the budget has to exceed what the scroller shows at once,
294
- with room for that lookahead: the list warns below 30, and when a budget leaves
295
- fewer than two rows beyond the screen.
289
+ The run draws only the items inside the **render window** — `renderBudget`,
290
+ `"100item"` by default — and holds the room of the others with fillers, so the
291
+ scrollbar says how long the collection is and the DOM says how many items fit a
292
+ screen and some. The window slides as the user scrolls, three quarters of what
293
+ the screen leaves of it ahead of the direction the user goes, so the budget has
294
+ to exceed what the scroller shows at once, with room for that lookahead: the
295
+ list warns when it leaves less than two items beyond the screen.
296
+
297
+ The budget is a count of items or a size: `"300px"`, or `"150%"` of the
298
+ viewport of the box that scrolls the list. A size is for items that do not
299
+ weigh the same: a list mixing one-line items and full cards (a thread of past
300
+ games and games to come) holds ten times more of the first on a screen than of
301
+ the second. `"100item"` covers four screens of the one-line items and thirty of
302
+ the cards, and nobody scrolls to the thirtieth; a count right for the cards
303
+ leaves blank screens when a fling crosses the one-line items. With a size, the
304
+ window weighs the items it draws where they stand, and an item it has not drawn
305
+ yet like the drawn items next to it — items of one kind come together — then
306
+ weighs it again once it is drawn.
296
307
 
297
308
  A run whose rows all fit the window is just rows: nothing is virtualized, and
298
309
  it costs what the same rows would as children. There is no reason to hold back
@@ -304,12 +315,15 @@ A popup's content is built in the click that opens it (see
304
315
  [popup_open.md](./popup_open.md)), and a page coming back in a route transition
305
316
  is built in the transition's update callback: rows below the fold cost the same
306
317
  there as rows on screen, and delay the movement. `renderBudget` takes
307
- `{ initial, after }` for exactly this: `initial` rows in the commit the browser
308
- paints first — what a phone screen shows, plus a few — counted from the row the
309
- list opens on, and `after` from the paint on. A position handed back with its
310
- `visibleCount` sizes that first window itself, whatever `initial` guessed. The
311
- runs ask their source for `after` rows from the start, so the smaller first
312
- window costs no second request.
318
+ `{ initial, after }` for exactly this: `initial` for the picture the browser
319
+ paints first, counted from the item the list opens on, and `after` from the
320
+ paint on. `initial: "100%"` is the screen and nothing more, whatever the items
321
+ weigh: a few are drawn to be measured, and the window is sized on them before
322
+ the browser paints — a count (`initial: 6`) is a guess that holds for one kind
323
+ of item only. A position handed back with its `visibleCount` sizes that first
324
+ window itself, whatever `initial` says. The runs ask their source for a page of
325
+ items (`<List.Items pageSize>`, 100 by default) whatever either says, so the
326
+ smaller first window costs no second request.
313
327
 
314
328
  The switch waits for the paint itself. Do not rebuild it with a `useEffect`
315
329
  that widens a slice: preact runs a component's pending effects early when that
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/navi",
3
- "version": "0.29.420",
3
+ "version": "0.29.421",
4
4
  "type": "module",
5
5
  "description": "Library of components including navigation to create frontend applications",
6
6
  "repository": {