@kitbag/router 0.27.0 → 0.29.0

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.
Files changed (72) hide show
  1. package/dist/components/routerLink.d.ts +1 -0
  2. package/dist/components/viewTransition.d.ts +16 -0
  3. package/dist/components/viewTransition.spec-d.d.ts +1 -0
  4. package/dist/compositions/useViewTransition.d.ts +5 -0
  5. package/dist/kitbag-router.js +2073 -1708
  6. package/dist/kitbag-router.umd.cjs +2 -2
  7. package/dist/main.d.ts +27 -1
  8. package/dist/models/hooks.d.ts +9 -7
  9. package/dist/services/addLoader.d.ts +6 -3
  10. package/dist/services/addRedirect.d.ts +3 -0
  11. package/dist/services/addRedirect.spec.d.ts +1 -0
  12. package/dist/services/addView.d.ts +9 -6
  13. package/dist/services/combineContext.d.ts +2 -0
  14. package/dist/services/createHook.d.ts +7 -0
  15. package/dist/services/createHook.spec-d.d.ts +1 -0
  16. package/dist/services/createHook.spec.d.ts +1 -0
  17. package/dist/services/createLoader.d.ts +7 -0
  18. package/dist/services/createLoader.spec-d.d.ts +1 -0
  19. package/dist/services/createLoader.spec.d.ts +1 -0
  20. package/dist/services/createRoute.d.ts +2 -4
  21. package/dist/services/createRouter.d.ts +2 -2
  22. package/dist/services/createRouterAssets.d.ts +26 -0
  23. package/dist/services/createRouterAssets.spec-d.d.ts +1 -0
  24. package/dist/services/createRouterHistory.d.ts +10 -2
  25. package/dist/services/createRouterHooks.d.ts +4 -2
  26. package/dist/services/createView.d.ts +10 -0
  27. package/dist/services/createView.spec-d.d.ts +1 -0
  28. package/dist/services/createView.spec.d.ts +1 -0
  29. package/dist/services/createViewTransitions.browser.spec.d.ts +1 -0
  30. package/dist/services/createViewTransitions.d.ts +38 -0
  31. package/dist/services/getRouteContext.d.ts +6 -0
  32. package/dist/services/getRoutesForRouter.d.ts +6 -1
  33. package/dist/services/history.d.ts +1 -0
  34. package/dist/services/registerHookContext.spec.d.ts +1 -0
  35. package/dist/services/routeViews.d.ts +7 -0
  36. package/dist/services/toHook.d.ts +3 -0
  37. package/dist/services/urlParser.d.ts +1 -1
  38. package/dist/services/withRouteMethods.d.ts +2 -3
  39. package/dist/tests/navigationBehavior.browser.spec.d.ts +1 -0
  40. package/dist/tests/viewTransitions.browser.spec.d.ts +1 -0
  41. package/dist/types/addLoader.d.ts +7 -4
  42. package/dist/types/addView.d.ts +11 -7
  43. package/dist/types/createRouteOptions.d.ts +17 -65
  44. package/dist/types/hook.d.ts +43 -0
  45. package/dist/types/hooks.d.ts +17 -11
  46. package/dist/types/loader.d.ts +59 -0
  47. package/dist/types/navigation.d.ts +2 -0
  48. package/dist/types/props.d.ts +0 -18
  49. package/dist/types/register.d.ts +2 -2
  50. package/dist/types/resolved.d.ts +4 -0
  51. package/dist/types/route.d.ts +2 -3
  52. package/dist/types/routeContext.d.ts +8 -0
  53. package/dist/types/routeViews.d.ts +5 -7
  54. package/dist/types/routeWithParams.d.ts +1 -1
  55. package/dist/types/router.d.ts +18 -4
  56. package/dist/types/routerPlugin.d.ts +7 -5
  57. package/dist/types/routerPush.d.ts +8 -0
  58. package/dist/types/routerReplace.d.ts +3 -0
  59. package/dist/types/url.d.ts +1 -0
  60. package/dist/types/useLink.d.ts +5 -0
  61. package/dist/types/view.d.ts +58 -0
  62. package/dist/types/viewTransition.d.ts +49 -0
  63. package/dist/utilities/navigation.d.ts +15 -0
  64. package/dist/utilities/promises.d.ts +4 -0
  65. package/dist/utilities/promises.spec.d.ts +1 -0
  66. package/dist/utilities/testHelpers.d.ts +32 -100
  67. package/dist/utilities/viewTransition.d.ts +11 -0
  68. package/dist/utilities/viewTransition.spec.d.ts +1 -0
  69. package/package.json +7 -6
  70. package/dist/services/createRouteRedirects.d.ts +0 -10
  71. package/dist/services/createRouteViews.d.ts +0 -16
  72. /package/dist/{services/createRouteRedirects.spec.d.ts → components/viewTransition.browser.spec.d.ts} +0 -0
@@ -37,6 +37,11 @@ export type UseLink = {
37
37
  *
38
38
  */
39
39
  isExternal: ComputedRef<boolean>;
40
+ /**
41
+ * True while a view transition to this link's location is in flight, so the elements it animates from
42
+ * can be named before the page is captured.
43
+ */
44
+ isTransitioning: ComputedRef<boolean>;
40
45
  /**
41
46
  * Convenience method for executing `router.push` with route context passed in.
42
47
  */
@@ -0,0 +1,58 @@
1
+ import { Component } from 'vue';
2
+ import { ComponentProps } from '../services/component';
3
+ import { TransformerOptions } from '../services/payload';
4
+ import { PrefetchConfig } from './prefetch';
5
+ import { RouteContext, RouteContextToRejection, RouteContextToRoute } from './routeContext';
6
+ import { ResolvedRouteWithDataUnion } from './resolved';
7
+ import { Routes } from './route';
8
+ import { RouterPush } from './routerPush';
9
+ import { RouterReplace } from './routerReplace';
10
+ import { RouterReject } from './routerReject';
11
+ import { AnyFunction, MaybePromise } from './utilities';
12
+ export declare const IS_VIEW_SYMBOL: unique symbol;
13
+ export type ViewInternal = {
14
+ [IS_VIEW_SYMBOL]: true;
15
+ };
16
+ /**
17
+ * Navigation helpers available to a reusable view from its declared context.
18
+ */
19
+ export type ViewCallbackContext<TContext extends readonly RouteContext[] = []> = {
20
+ push: RouterPush<RouteContextToRoute<[...TContext]>>;
21
+ replace: RouterReplace<RouteContextToRoute<[...TContext]>>;
22
+ reject: RouterReject<RouteContextToRejection<[...TContext]>>;
23
+ signal: AbortSignal;
24
+ };
25
+ export type ViewPropsGetter<TContext extends readonly RouteContext[], TProps, TRoutes extends Routes = Routes> = (route: ResolvedRouteWithDataUnion<TRoutes[number]>, context: ViewCallbackContext<TContext>) => TProps;
26
+ /**
27
+ * Options for a reusable component and its props getter.
28
+ */
29
+ export type CreateViewOptions<TComponent extends Component = Component, TContext extends readonly RouteContext[] = [], TProps extends MaybePromise<ComponentProps<TComponent>> | undefined = undefined, TRoutes extends Routes = Routes> = TransformerOptions<NoInfer<Awaited<TProps>>> & {
30
+ component: TComponent;
31
+ /**
32
+ * See [Context](https://kitbag-router.netlify.app/advanced-concepts/context).
33
+ */
34
+ context?: TContext;
35
+ prefetch?: PrefetchConfig;
36
+ } & (Partial<ComponentProps<TComponent>> extends ComponentProps<TComponent> ? {
37
+ props?: ViewPropsGetter<TContext, TProps extends undefined ? MaybePromise<ComponentProps<TComponent>> : TProps, TRoutes>;
38
+ } : {
39
+ props: ViewPropsGetter<TContext, TProps extends undefined ? MaybePromise<ComponentProps<TComponent>> : TProps, TRoutes>;
40
+ });
41
+ /**
42
+ * Creates views with props callbacks typed to the router's resolved routes and loader data.
43
+ */
44
+ export type CreateView<TRoutes extends Routes = Routes> = <TComponent extends Component, const TContext extends readonly RouteContext[] = [], TProps extends MaybePromise<ComponentProps<TComponent>> | undefined = undefined>(options: CreateViewOptions<TComponent, TContext, TProps, TRoutes>) => View<TProps, TContext>;
45
+ /**
46
+ * A reusable view definition with its props getter's result and declared context.
47
+ */
48
+ export type View<TProps = unknown, TContext extends readonly RouteContext[] = []> = TransformerOptions<Awaited<TProps>> & {
49
+ component: Component;
50
+ props?: AnyFunction<TProps>;
51
+ context: TContext;
52
+ prefetch?: PrefetchConfig;
53
+ };
54
+ export type AnyView = View<any, readonly RouteContext[]>;
55
+ /**
56
+ * Determines whether a value is a reusable view.
57
+ */
58
+ export declare function isView(value: unknown): value is AnyView & ViewInternal;
@@ -0,0 +1,49 @@
1
+ import { ResolvedRoute, RouterResolvedRouteUnion } from './resolved';
2
+ import { CreatedRouteOptions, Routes } from './route';
3
+ /**
4
+ * Types set on a view transition, which css targets with `:active-view-transition-type()`.
5
+ */
6
+ export type ViewTransitionTypes = string[];
7
+ /**
8
+ * The navigation a view transition animates. There is always a route to animate from, since the first
9
+ * navigation never transitions.
10
+ */
11
+ export type ViewTransitionContext = {
12
+ to: ResolvedRoute;
13
+ from: ResolvedRoute;
14
+ };
15
+ /**
16
+ * Decides the types for a navigation. Returning `false` skips the transition for that navigation.
17
+ */
18
+ export type ViewTransitionTypesCallback = (context: ViewTransitionContext) => ViewTransitionTypes | false;
19
+ export type ViewTransitionConfigOptions = {
20
+ /**
21
+ * Types set on the transition, combined with the types of every other level that applies.
22
+ */
23
+ types?: ViewTransitionTypes | ViewTransitionTypesCallback;
24
+ };
25
+ /**
26
+ * Whether a navigation animates with the View Transitions API. A boolean enables or disables the
27
+ * transition, an array of types or an options object enables it.
28
+ */
29
+ export type ViewTransitionConfig = boolean | ViewTransitionTypes | ViewTransitionConfigOptions;
30
+ export type ViewTransitionConfigs = {
31
+ routerViewTransition?: ViewTransitionConfig;
32
+ routeViewTransition?: ViewTransitionConfig;
33
+ navigationViewTransition?: ViewTransitionConfig;
34
+ };
35
+ /**
36
+ * The view transition in flight, from the moment a navigation is decided to transition until its
37
+ * animation finishes. `to` and `from` are known throughout, so the page being left can prepare its elements
38
+ * before it is captured. `transition` is set once the browser has been asked to transition.
39
+ */
40
+ export type RouterViewTransition<TRoutes extends Routes = Routes> = {
41
+ readonly isTransitioning: boolean;
42
+ readonly to: RouterResolvedRouteUnion<TRoutes> | undefined;
43
+ readonly from: RouterResolvedRouteUnion<TRoutes> | undefined;
44
+ readonly types: ViewTransitionTypes;
45
+ readonly transition: ViewTransition | undefined;
46
+ };
47
+ export declare function hasViewTransition(match: CreatedRouteOptions): match is CreatedRouteOptions & {
48
+ viewTransition: ViewTransitionConfig;
49
+ };
@@ -0,0 +1,15 @@
1
+ import { NavigationBehavior } from '../types/navigation';
2
+ import { ResolvedRoute } from '../types/resolved';
3
+ type NavigationOptions = {
4
+ routerNavigation?: NavigationBehavior;
5
+ routeNavigation?: NavigationBehavior;
6
+ navigation?: NavigationBehavior;
7
+ };
8
+ type NavigationOption = {
9
+ navigation: NavigationBehavior;
10
+ isBlockingNavigation: boolean;
11
+ isProgressiveNavigation: boolean;
12
+ };
13
+ export declare function getRouteNavigationOption(to: ResolvedRoute | null): NavigationBehavior | undefined;
14
+ export declare function getNavigationOption(options: NavigationOptions): NavigationOption;
15
+ export {};
@@ -1 +1,5 @@
1
1
  export declare function isPromise(value: unknown): value is Promise<unknown>;
2
+ /**
3
+ * Resolves when the signal aborts, including an already aborted signal.
4
+ */
5
+ export declare function createAbortPromise(signal: AbortSignal): Promise<void>;
@@ -0,0 +1 @@
1
+ export {};
@@ -14,7 +14,7 @@ export declare const routes: readonly [import('../types/routeWithMethods').Route
14
14
  }>, [Omit<{
15
15
  readonly name: "parentA";
16
16
  readonly path: "/parentA/[paramA]";
17
- }, "meta" | "component" | "components" | "name" | "parent"> & {
17
+ }, "meta" | "name" | "parent"> & {
18
18
  id: string;
19
19
  name: "parentA";
20
20
  meta: Readonly<{}>;
@@ -34,7 +34,7 @@ export declare const routes: readonly [import('../types/routeWithMethods').Route
34
34
  }>, [Omit<{
35
35
  readonly name: "parentA";
36
36
  readonly path: "/parentA/[paramA]";
37
- }, "meta" | "component" | "components" | "name" | "parent"> & {
37
+ }, "meta" | "name" | "parent"> & {
38
38
  id: string;
39
39
  name: "parentA";
40
40
  meta: Readonly<{}>;
@@ -47,7 +47,7 @@ export declare const routes: readonly [import('../types/routeWithMethods').Route
47
47
  }>, [Omit<{
48
48
  readonly name: "parentA";
49
49
  readonly path: "/parentA/[paramA]";
50
- }, "meta" | "component" | "components" | "name" | "parent"> & {
50
+ }, "meta" | "name" | "parent"> & {
51
51
  id: string;
52
52
  name: "parentA";
53
53
  meta: Readonly<{}>;
@@ -56,7 +56,7 @@ export declare const routes: readonly [import('../types/routeWithMethods').Route
56
56
  }]>;
57
57
  readonly name: "parentA.childA";
58
58
  readonly path: "/childA/[?paramB]";
59
- }, "meta" | "component" | "components" | "name" | "parent"> & {
59
+ }, "meta" | "name" | "parent"> & {
60
60
  id: string;
61
61
  name: "parentA.childA";
62
62
  meta: Readonly<{}>;
@@ -76,37 +76,21 @@ export declare const routes: readonly [import('../types/routeWithMethods').Route
76
76
  }>, [Omit<{
77
77
  readonly name: "parentA";
78
78
  readonly path: "/parentA/[paramA]";
79
- }, "meta" | "component" | "components" | "name" | "parent"> & {
79
+ }, "meta" | "name" | "parent"> & {
80
80
  id: string;
81
81
  name: "parentA";
82
82
  meta: Readonly<{}>;
83
83
  views: {};
84
84
  loaders: {};
85
- }, Omit<{
86
- readonly parent: import('../types/routeWithMethods').RouteWithMethods<import('../types/url').ToUrl<{
87
- readonly name: "parentA";
88
- readonly path: "/parentA/[paramA]";
89
- }>, [Omit<{
90
- readonly name: "parentA";
91
- readonly path: "/parentA/[paramA]";
92
- }, "meta" | "component" | "components" | "name" | "parent"> & {
93
- id: string;
94
- name: "parentA";
95
- meta: Readonly<{}>;
96
- views: {};
97
- loaders: {};
98
- }]>;
99
- readonly name: "parentA.childB";
100
- readonly path: "/childB/[paramD]";
101
- readonly component: {
102
- template: string;
103
- };
104
- }, "meta" | "component" | "components" | "name" | "parent"> & {
85
+ }, {
86
+ meta: Readonly<{}>;
105
87
  id: string;
106
88
  name: "parentA.childB";
107
- meta: Readonly<{}>;
108
- views: {};
89
+ readonly path: "/childB/[paramD]";
109
90
  loaders: {};
91
+ views: {
92
+ default: import('../types/routeViews').RouteView;
93
+ };
110
94
  }]>, import('../types/routeWithMethods').RouteWithMethods<import('../main').Url<{
111
95
  paramA: {
112
96
  param: StringConstructor;
@@ -126,7 +110,7 @@ export declare const routes: readonly [import('../types/routeWithMethods').Route
126
110
  }>, [Omit<{
127
111
  readonly name: "parentA";
128
112
  readonly path: "/parentA/[paramA]";
129
- }, "meta" | "component" | "components" | "name" | "parent"> & {
113
+ }, "meta" | "name" | "parent"> & {
130
114
  id: string;
131
115
  name: "parentA";
132
116
  meta: Readonly<{}>;
@@ -139,7 +123,7 @@ export declare const routes: readonly [import('../types/routeWithMethods').Route
139
123
  }>, [Omit<{
140
124
  readonly name: "parentA";
141
125
  readonly path: "/parentA/[paramA]";
142
- }, "meta" | "component" | "components" | "name" | "parent"> & {
126
+ }, "meta" | "name" | "parent"> & {
143
127
  id: string;
144
128
  name: "parentA";
145
129
  meta: Readonly<{}>;
@@ -148,95 +132,43 @@ export declare const routes: readonly [import('../types/routeWithMethods').Route
148
132
  }]>;
149
133
  readonly name: "parentA.childA";
150
134
  readonly path: "/childA/[?paramB]";
151
- }, "meta" | "component" | "components" | "name" | "parent"> & {
135
+ }, "meta" | "name" | "parent"> & {
152
136
  id: string;
153
137
  name: "parentA.childA";
154
138
  meta: Readonly<{}>;
155
139
  views: {};
156
140
  loaders: {};
157
- }, Omit<{
158
- readonly parent: import('../types/routeWithMethods').RouteWithMethods<import('../main').Url<{
159
- paramA: {
160
- param: StringConstructor;
161
- isOptional: false;
162
- isGreedy: false;
163
- };
164
- paramB: {
165
- param: StringConstructor;
166
- isOptional: true;
167
- isGreedy: false;
168
- };
169
- }>, [Omit<{
170
- readonly name: "parentA";
171
- readonly path: "/parentA/[paramA]";
172
- }, "meta" | "component" | "components" | "name" | "parent"> & {
173
- id: string;
174
- name: "parentA";
175
- meta: Readonly<{}>;
176
- views: {};
177
- loaders: {};
178
- }, Omit<{
179
- readonly parent: import('../types/routeWithMethods').RouteWithMethods<import('../types/url').ToUrl<{
180
- readonly name: "parentA";
181
- readonly path: "/parentA/[paramA]";
182
- }>, [Omit<{
183
- readonly name: "parentA";
184
- readonly path: "/parentA/[paramA]";
185
- }, "meta" | "component" | "components" | "name" | "parent"> & {
186
- id: string;
187
- name: "parentA";
188
- meta: Readonly<{}>;
189
- views: {};
190
- loaders: {};
191
- }]>;
192
- readonly name: "parentA.childA";
193
- readonly path: "/childA/[?paramB]";
194
- }, "meta" | "component" | "components" | "name" | "parent"> & {
195
- id: string;
196
- name: "parentA.childA";
197
- meta: Readonly<{}>;
198
- views: {};
199
- loaders: {};
200
- }]>;
201
- readonly name: "parentA.childA.grandChildA";
202
- readonly path: "/[paramC]";
203
- readonly component: {
204
- template: string;
205
- };
206
- }, "meta" | "component" | "components" | "name" | "parent"> & {
141
+ }, {
142
+ meta: Readonly<{}>;
207
143
  id: string;
208
144
  name: "parentA.childA.grandChildA";
209
- meta: Readonly<{}>;
210
- views: {};
145
+ readonly path: "/[paramC]";
211
146
  loaders: {};
147
+ views: {
148
+ default: import('../types/routeViews').RouteView;
149
+ };
212
150
  }]>, import('../types/routeWithMethods').RouteWithMethods<import('../types/url').ToUrl<{
213
151
  readonly name: "parentB";
214
152
  readonly path: "/parentB";
215
- }>, [Omit<{
216
- readonly name: "parentB";
217
- readonly path: "/parentB";
218
- readonly component: {
219
- template: string;
220
- };
221
- }, "meta" | "component" | "components" | "name" | "parent"> & {
153
+ }>, [{
154
+ meta: Readonly<{}>;
222
155
  id: string;
223
156
  name: "parentB";
224
- meta: Readonly<{}>;
225
- views: {};
157
+ readonly path: "/parentB";
226
158
  loaders: {};
159
+ views: {
160
+ default: import('../types/routeViews').RouteView;
161
+ };
227
162
  }]>, import('../types/routeWithMethods').RouteWithMethods<import('../types/url').ToUrl<{
228
163
  readonly name: "parentC";
229
164
  readonly path: "/";
230
- }>, [Omit<{
231
- readonly name: "parentC";
232
- readonly path: "/";
233
- readonly component: {
234
- template: string;
235
- };
236
- }, "meta" | "component" | "components" | "name" | "parent"> & {
165
+ }>, [{
166
+ meta: Readonly<{}>;
237
167
  id: string;
238
168
  name: "parentC";
239
- meta: Readonly<{}>;
240
- views: {};
169
+ readonly path: "/";
241
170
  loaders: {};
171
+ views: {
172
+ default: import('../types/routeViews').RouteView;
173
+ };
242
174
  }]>];
@@ -0,0 +1,11 @@
1
+ import { ViewTransitionConfigs, ViewTransitionContext, ViewTransitionTypes } from '../types/viewTransition';
2
+ /**
3
+ * The types to transition with, or `false` when the navigation should not transition. The nearest level
4
+ * that sets the option decides whether it is on, and the types of every level that is on are combined.
5
+ */
6
+ export declare function getViewTransitionTypes({ routerViewTransition, routeViewTransition, navigationViewTransition, ...context }: ViewTransitionConfigs & ViewTransitionContext): ViewTransitionTypes | false;
7
+ export declare function supportsViewTransitions(): boolean;
8
+ /**
9
+ * Passing types to a browser that predates them throws, so they are only passed where a transition has them.
10
+ */
11
+ export declare function supportsViewTransitionTypes(): boolean;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kitbag/router",
3
3
  "private": false,
4
- "version": "0.27.0",
4
+ "version": "0.29.0",
5
5
  "license": "MIT",
6
6
  "bugs": {
7
7
  "url": "https://github.com/kitbagjs/router/issues"
@@ -45,21 +45,22 @@
45
45
  "devDependencies": {
46
46
  "@kitbag/eslint-config": "1.0.6",
47
47
  "@vitejs/plugin-vue": "^6.0.8",
48
- "@vue/language-core": "^3.3.11",
48
+ "@vue/language-core": "^3.3.12",
49
49
  "@vue/test-utils": "^2.5.1",
50
- "arktype": "^2.2.5",
50
+ "arktype": "^2.2.8",
51
51
  "eslint": "^9.39.5",
52
- "globals": "^17.12.0",
53
- "happy-dom": "^20.14.5",
52
+ "globals": "^17.13.0",
53
+ "happy-dom": "^20.14.6",
54
54
  "typedoc": "^0.28.20",
55
55
  "typedoc-plugin-markdown": "^4.13.1",
56
56
  "typedoc-vitepress-theme": "^1.1.4",
57
57
  "typescript": "^6.0.3",
58
58
  "valibot": "^1.0.0",
59
+ "view-transitions-mock": "^1.1.0",
59
60
  "vite": "^8.2.0",
60
61
  "vite-plugin-dts": "^5.0.3",
61
62
  "vitepress": "^1.6.4",
62
- "vitest": "^5.0.1",
63
+ "vitest": "^5.0.3",
63
64
  "vue-tsc": "^3.3.8",
64
65
  "zod": "4.0.0"
65
66
  },
@@ -1,10 +0,0 @@
1
- import { RouteRedirects } from '../types/redirects';
2
- import { Route } from '../types/route';
3
- type CreateRouteRedirectsContext = {
4
- /**
5
- * The to route for the redirectFrom callback and the from route for the redirectTo callback.
6
- */
7
- getRoute: () => Route;
8
- };
9
- export declare function createRouteRedirects({ getRoute }: CreateRouteRedirectsContext): RouteRedirects;
10
- export {};
@@ -1,16 +0,0 @@
1
- import { CreateRouteOptions, CreateRouteProps } from '../types/createRouteOptions';
2
- import { RouteViews } from '../types/routeViews';
3
- export declare const DEFAULT_VIEW_NAME = "default";
4
- /**
5
- * Builds the initial views for a route, seeding components from the (deprecated) `component`/`components`
6
- * options and prop getters from the props argument. Subsequent views are added via the route's `addView`.
7
- *
8
- * This is where the props argument's two shapes — a single getter for the unnamed view, or a record keyed
9
- * by view name — are normalized, so the rest of the router only deals with views keyed by name.
10
- */
11
- export declare function createRouteViews(options: CreateRouteOptions, props?: CreateRouteProps): RouteViews;
12
- /**
13
- * The names of the views that have a props getter. A view without one is never computed, so waiting on it
14
- * would never settle.
15
- */
16
- export declare function viewNamesWithProps(views: RouteViews): string[];