@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.
@@ -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. */