@jsenv/navi 0.29.390 → 0.29.392
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 +279 -74
- package/dist/dev/jsenv_navi.js.map +6 -6
- package/dist/jsenv_navi.js +279 -74
- package/dist/jsenv_navi.js.map +6 -6
- package/docs/route_transitions.md +37 -13
- package/package.json +1 -1
|
@@ -303,19 +303,24 @@ about the bar:
|
|
|
303
303
|
- a bar **both states have** is one element, so its two pictures pair into one
|
|
304
304
|
group and it holds where it stands. The pages move behind it, and a bar whose
|
|
305
305
|
content changes with the route cross-fades without being named by hand.
|
|
306
|
-
- a bar **one state has** meets no counterpart. It
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
header) is this case, on the way
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
bar, a shadow on the page — is seen for the length of the
|
|
316
|
-
being cut at the bar's edge. The
|
|
317
|
-
|
|
318
|
-
|
|
306
|
+
- a bar **one state has** meets no counterpart. It belongs to the page that
|
|
307
|
+
has it and travels with that page — leaving by the keyframes the page being
|
|
308
|
+
left leaves by, arriving by the ones the page arriving arrives by — instead
|
|
309
|
+
of appearing or vanishing in a frame. A page that takes the whole screen (a
|
|
310
|
+
full-screen wizard whose banner is its own header) is this case, on the way
|
|
311
|
+
in and on the way back.
|
|
312
|
+
|
|
313
|
+
Every bar stands over the pages, as it does at rest: the page runs under its
|
|
314
|
+
bar by design, and what a bar paints outside its box — a button standing up
|
|
315
|
+
out of a tab bar, a shadow on the page — is seen for the length of the
|
|
316
|
+
movement instead of being cut at the bar's edge. The one exception is a page
|
|
317
|
+
**covered** by the other one (a `cover-*` movement): the sheet must come over
|
|
318
|
+
that page's furniture too, so the bars of the covered page go under the pages
|
|
319
|
+
and the covered page is cut at its own band instead. What such a bar paints
|
|
320
|
+
outside its box is cut by its own page for those few hundred milliseconds — a
|
|
321
|
+
bar cannot be both over its own page and under the other one. The price of
|
|
322
|
+
being photographed is that a bar cannot answer the pointer for the length of
|
|
323
|
+
the movement, which is what a route transition wants anyway: both pages are
|
|
319
324
|
pictures too, and a press landing on either would be an accident. `RouteTravel`
|
|
320
325
|
is the opposite case — a finger is on the box — and leaves the bars live.
|
|
321
326
|
|
|
@@ -393,6 +398,25 @@ That is what a fixed bar belonging to one of the two states is given to travel
|
|
|
393
398
|
with the page it belongs to (see the transition area above). Nothing else reads
|
|
394
399
|
them, and a type that publishes nothing leaves such a bar to the browser's fade.
|
|
395
400
|
|
|
401
|
+
A type that plays one page **over** the other says which one is covered, the
|
|
402
|
+
same way:
|
|
403
|
+
|
|
404
|
+
```css
|
|
405
|
+
:root[data-navi-route-transition-type="sheet"][data-navi-route-transition="forward"] {
|
|
406
|
+
--navi-route-transition-covered: old;
|
|
407
|
+
}
|
|
408
|
+
:root[data-navi-route-transition-type="sheet"][data-navi-route-transition="back"] {
|
|
409
|
+
--navi-route-transition-covered: new;
|
|
410
|
+
}
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
`old` says the page arriving comes over the page being left, `new` that the
|
|
414
|
+
page being left slides off the page arriving. Navi then draws the covered page
|
|
415
|
+
under the other one, cuts it at its own band, and puts its furniture under the
|
|
416
|
+
pages so the sheet comes over it (see the transition area above). The shipped
|
|
417
|
+
`cover-*` types say exactly this; a movement where neither page covers the
|
|
418
|
+
other publishes nothing.
|
|
419
|
+
|
|
396
420
|
## Two routes matching one url
|
|
397
421
|
|
|
398
422
|
A relation is written between two pages, and it is resolved through **which page
|