@jsenv/navi 0.29.479 → 0.29.480
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 +6 -4
- package/dist/dev/jsenv_navi.js.map +2 -2
- package/dist/jsenv_navi.js +6 -4
- package/dist/jsenv_navi.js.map +2 -2
- package/docs/AI_INSTRUCTIONS.md +2 -1
- package/docs/navigation.md +45 -11
- package/package.json +1 -1
package/dist/dev/jsenv_navi.js
CHANGED
|
@@ -10293,16 +10293,18 @@ let isUpdatingRoutesFromUrl = false;
|
|
|
10293
10293
|
* Declares a route from an url pattern.
|
|
10294
10294
|
*
|
|
10295
10295
|
* @param {string} pattern - The url pattern, where `:name` is a path param and
|
|
10296
|
-
* `:name=${signal}` binds that param to a signal.
|
|
10296
|
+
* `:name=${signal}` binds that param to a signal. A pattern ending in `/` is a
|
|
10297
|
+
* frame: it matches every address below it too, and its search params hold
|
|
10298
|
+
* there (see docs/navigation.md, "A page or a frame: the trailing slash").
|
|
10297
10299
|
* @param {object} [options]
|
|
10298
10300
|
* @param {Object<string, import("@preact/signals").Signal | {signal: import("@preact/signals").Signal, default?: any}>} [options.searchParams]
|
|
10299
10301
|
* Search params this route two-way syncs with, by name. The signal and the url
|
|
10300
10302
|
* are the same state: writing the signal rewrites the address, an address
|
|
10301
10303
|
* arriving from outside writes the signal, and the param disappears from the
|
|
10302
10304
|
* url while the signal holds its default.
|
|
10303
|
-
* They exist on this route's address only, unless the pattern
|
|
10304
|
-
*
|
|
10305
|
-
*
|
|
10305
|
+
* They exist on this route's address only, unless the pattern is a frame
|
|
10306
|
+
* (`/map/`, `/map/*`, the root): then on every address below it too.
|
|
10307
|
+
* `/places` does not lend its `?q=` to `/places/clubs`.
|
|
10306
10308
|
* `{ signal, default }` says what that state is worth ON THIS ROUTE: the same
|
|
10307
10309
|
* step opens a creation wizard on its first question and an edition one on
|
|
10308
10310
|
* its summary, each address staying clean on the step its page opens on. One
|