@uniflowed/router 0.0.0-alpha.33 → 0.0.0-alpha.35
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/client.js +65 -0
- package/index.js +7 -0
- package/internal/boundaries.js +48 -25
- package/internal/compose.js +478 -0
- package/internal/error-view.js +189 -0
- package/internal/flight-browser.js +230 -0
- package/internal/flight-chunks.js +181 -0
- package/internal/flight-ssr.js +72 -0
- package/internal/flight.js +132 -0
- package/internal/head.js +219 -0
- package/internal/resolve.js +1615 -0
- package/internal/routing.js +20 -0
- package/internal/runtime.js +664 -2218
- package/internal/server-route.js +52 -0
- package/internal/stream.js +156 -3
- package/native.js +17 -0
- package/package.json +18 -6
- package/rsc.js +323 -0
- package/server-components.js +155 -0
- package/server.js +435 -8
package/internal/routing.js
CHANGED
|
@@ -52,6 +52,26 @@ export type SlotRecord<
|
|
|
52
52
|
readonly defaultMdx?: boolean,
|
|
53
53
|
readonly defaultErrorBoundary?: ?SlotErrorBoundaryRecord<TError>,
|
|
54
54
|
readonly routes: $ReadOnlyArray<SlotRouteRecord<TPage, TLayout, TTemplate, TLoading, TError>>,
|
|
55
|
+
/**
|
|
56
|
+
* The routes this slot renders when a client navigation *intercepts* the URL
|
|
57
|
+
* each one names — `app/feed/@modal/(.)photo/[id]/$page.js` is the one for
|
|
58
|
+
* `/feed/photo/:id` — keyed by that URL.
|
|
59
|
+
*
|
|
60
|
+
* A second list rather than a flag on `routes`, because the two are read by
|
|
61
|
+
* different callers at different times and neither may see the other's.
|
|
62
|
+
* `routes` is matched against every URL the segment renders, by the server and
|
|
63
|
+
* by the browser alike. These are matched only by a navigation that starts on
|
|
64
|
+
* a page this slot is already rendered on, and nothing on a server reads them
|
|
65
|
+
* — which is the whole of why a document request for an intercepted URL
|
|
66
|
+
* renders the ordinary page. `resolveInterception`, beside the rest of the
|
|
67
|
+
* rendering, is the one reader.
|
|
68
|
+
*
|
|
69
|
+
* Absent on a slot that intercepts nothing, which is every slot a table
|
|
70
|
+
* written before interception existed.
|
|
71
|
+
*/
|
|
72
|
+
readonly intercepts?: $ReadOnlyArray<
|
|
73
|
+
SlotRouteRecord<TPage, TLayout, TTemplate, TLoading, TError>,
|
|
74
|
+
>,
|
|
55
75
|
|};
|
|
56
76
|
|
|
57
77
|
/** One page inside a slot. */
|