@jsenv/navi 0.30.9 → 0.30.10
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 +151 -16
- package/dist/dev/jsenv_navi.js.map +4 -4
- package/dist/jsenv_navi.js +151 -16
- package/dist/jsenv_navi.js.map +4 -4
- package/docs/drag_to_travel.md +3 -1
- package/docs/dynamic_import.md +1 -0
- package/docs/navigation.md +20 -0
- package/package.json +1 -1
package/docs/drag_to_travel.md
CHANGED
|
@@ -250,7 +250,9 @@ A `RouteTravel` page not visited yet can only be built by the address moving, si
|
|
|
250
250
|
a route's actions ask only while it matches. So the address moves once the hand has
|
|
251
251
|
really pulled, 16px, and the page fills in under the finger. Before that its pane
|
|
252
252
|
is empty and the box's background shows, unless `renderNeighbour` says what stands
|
|
253
|
-
there.
|
|
253
|
+
there. What the page reads can be asked for before the hand arrives
|
|
254
|
+
(`<RouteTravel prefetch>`, or `route.preload(params)`): it is still built under the
|
|
255
|
+
finger, but from answers already there, so it shows no wait. See
|
|
254
256
|
[navigation.md](./navigation.md#tabs-that-travel-routetravel).
|
|
255
257
|
|
|
256
258
|
Both tell what follows them how far the row has come. `SlideContainer` writes
|
package/docs/dynamic_import.md
CHANGED
|
@@ -172,6 +172,7 @@ stays on the action, and a failed action is run again by whatever asks next —
|
|
|
172
172
|
arrival, which shows its own failure, and every later hover alike.
|
|
173
173
|
|
|
174
174
|
From code: `route.preload()` for a route about to be navigated to,
|
|
175
|
+
`route.preload(params)` to also ask the reads its params decide,
|
|
175
176
|
`preloadUrl(url)` for an address. A press that computes its destination has
|
|
176
177
|
nothing to preload — the navigation itself asks.
|
|
177
178
|
|
package/docs/navigation.md
CHANGED
|
@@ -592,6 +592,26 @@ since the browser moves the row whatever the main thread is doing. So it renders
|
|
|
592
592
|
with the page, and is worth keeping light. It is not the page: its route does not
|
|
593
593
|
match yet, so it asks for nothing.
|
|
594
594
|
|
|
595
|
+
**What a neighbour reads can be asked for ahead**, with `prefetch`. At rest, once
|
|
596
|
+
the page on screen has its answers and has painted them, the box asks what the
|
|
597
|
+
route actions of the next page will ask, then those of the previous one. The page
|
|
598
|
+
is still built under the finger, but from answers already there: no wait shows.
|
|
599
|
+
Off by default, since every page one stops on then costs the reads of two more.
|
|
600
|
+
|
|
601
|
+
```jsx
|
|
602
|
+
<RouteTravel routes={pages} renderNeighbour={renderNeighbour} prefetch>
|
|
603
|
+
<PlayerPage />
|
|
604
|
+
</RouteTravel>
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
It is `route.preload(params)` for each of them: every route action of the route
|
|
608
|
+
reads its params as if the address were `route.buildUrl(params)` (a weak state not
|
|
609
|
+
given reads its default, any other one not given keeps what it holds), and the
|
|
610
|
+
instance prerun is the one the arrival runs. A row driven by hand calls it the same
|
|
611
|
+
way. Don't prerun the actions yourself: their params getters would then be written
|
|
612
|
+
twice, and once one of them changes, the prefetch asks for an instance the arrival
|
|
613
|
+
does not run.
|
|
614
|
+
|
|
595
615
|
**The box has a height, or the document scrolls.** Pages may scroll themselves in a
|
|
596
616
|
box the page gives a height to. If the document is what scrolls, it goes on doing
|
|
597
617
|
so, and a page brought in stands where the reader is looking; what is lost is
|