@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.
- package/dist/dev/jsenv_navi.js +1752 -1107
- package/dist/dev/jsenv_navi.js.map +6 -6
- package/dist/jsenv_navi.js +1742 -1093
- package/dist/jsenv_navi.js.map +6 -6
- package/docs/popup_open.md +18 -8
- package/docs/scroll.md +28 -14
- package/package.json +1 -1
package/docs/popup_open.md
CHANGED
|
@@ -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
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
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 (
|
|
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
|
|
290
|
-
|
|
291
|
-
scrollbar says how long the collection is and the DOM says how many
|
|
292
|
-
screen and some. The window slides as the user scrolls,
|
|
293
|
-
the
|
|
294
|
-
|
|
295
|
-
|
|
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`
|
|
308
|
-
paints first
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
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
|