@jsenv/navi 0.29.365 → 0.29.366
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 +50 -6
- package/dist/dev/jsenv_navi.js.map +4 -4
- package/dist/jsenv_navi.js +8 -6
- package/dist/jsenv_navi.js.map +4 -4
- package/docs/popup_lift.md +9 -0
- package/docs/popup_open.md +15 -2
- package/package.json +1 -1
package/docs/popup_lift.md
CHANGED
|
@@ -245,6 +245,15 @@ bound to is the shortest way to say it, the row's tiles carrying the matching
|
|
|
245
245
|
ids. Left out, the box comes back where it came from, which is right exactly
|
|
246
246
|
as long as nothing walked.
|
|
247
247
|
|
|
248
|
+
When the walk signal is the address's — the popup's `signal`, so the sheet
|
|
249
|
+
comes back open on the same card after leaving the page (see
|
|
250
|
+
[popup_open.md](./popup_open.md#signal--the-app-holds-it-both-ways)) — a close
|
|
251
|
+
that comes through the address, the back button, empties it before the popup
|
|
252
|
+
knows it is closing, and a name built from it at that render says nothing:
|
|
253
|
+
the box flies home into the first tile. Name the tile from the last key the
|
|
254
|
+
walk held — a ref written while the signal holds one — not from the signal
|
|
255
|
+
itself.
|
|
256
|
+
|
|
248
257
|
**A press on the surface that dismisses is `data-navi-popup-outside`.** Marking
|
|
249
258
|
the see-through box as backdrop (see
|
|
250
259
|
[popup_backdrop.md](./popup_backdrop.md)) is read on the press itself. A close
|
package/docs/popup_open.md
CHANGED
|
@@ -875,6 +875,14 @@ the id from the signal, a card's press writes it, and the popup never writes
|
|
|
875
875
|
over it: opening writes `true` only into a signal that reads closed, closing
|
|
876
876
|
writes `undefined` (or `false`, where the signal held `true`).
|
|
877
877
|
|
|
878
|
+
When the popup is opened ON a card (`<Button command="--navi-open" value={id}>`),
|
|
879
|
+
`onOpen` is where the id is written: it runs before the popup writes its own
|
|
880
|
+
open, and a signal that already reads open is left as it is — the address holds
|
|
881
|
+
the card, never `true`. With the route's search-param `stateSignal` as the walk
|
|
882
|
+
signal, that is how [a row of
|
|
883
|
+
cards](./popup_lift.md#a-row-of-cards-one-popup-that-walks) survives leaving
|
|
884
|
+
the page: the address names the card, and the sheet reopens on it.
|
|
885
|
+
|
|
878
886
|
```jsx
|
|
879
887
|
<SidePanel signal={errorOpenSignal} side="right">
|
|
880
888
|
<ErrorPanel /> {/* reads errorOpenSignal.value to know which card */}
|
|
@@ -892,8 +900,13 @@ finds the popup as it was, and so does a reload. `true` stores it under the
|
|
|
892
900
|
popup's own `id`; a string names the key instead. `{ type: "push" }` makes the
|
|
893
901
|
opening an entry of its own — the back button then closes the popup rather than
|
|
894
902
|
leaving the screen, and the cancel takes back with it whatever was written to
|
|
895
|
-
the url while it was open. A `Picker` needs none of this: its
|
|
896
|
-
is nav state by construction
|
|
903
|
+
the url while it was open. A `Picker` given an `id` needs none of this: its
|
|
904
|
+
popup's open state is nav state by construction, under that id, and in dialog
|
|
905
|
+
mode the opening is an entry of its own. Without an `id` the key is a generated
|
|
906
|
+
one, which names one mount: the page left with the picker open and come back to
|
|
907
|
+
is a new mount with a new id, and the state stays in the entry with nothing to
|
|
908
|
+
read it — navi warns when a mount finds such a key. A picker whose popup leads
|
|
909
|
+
somewhere, a link inside it, has an `id`.
|
|
897
910
|
|
|
898
911
|
The two meet when the signal IS a route's: a search-param `stateSignal` given to
|
|
899
912
|
`signal` puts the open state in the address itself, where a link can point at
|