@solidjs/router 0.11.0 → 0.11.1

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/index.js CHANGED
@@ -284,14 +284,14 @@ function createRoutes(routeDef, base = "") {
284
284
  component,
285
285
  load,
286
286
  children,
287
- metadata
287
+ info
288
288
  } = routeDef;
289
289
  const isLeaf = !children || Array.isArray(children) && !children.length;
290
290
  const shared = {
291
291
  key: routeDef,
292
292
  component,
293
293
  load,
294
- metadata
294
+ info
295
295
  };
296
296
  return asArray(routeDef.path).reduce((acc, path) => {
297
297
  for (const originalPath of expandOptionals(path)) {
@@ -672,7 +672,7 @@ function Routes(props) {
672
672
  pattern: route.pattern,
673
673
  match: path,
674
674
  params,
675
- metadata: route.metadata
675
+ info: route.info
676
676
  }))));
677
677
  }
678
678
  const params = createMemoObject(() => {
@@ -15,6 +15,6 @@ export type RouteProps<S extends string, T = unknown> = {
15
15
  load?: RouteLoadFunc<T>;
16
16
  matchFilters?: MatchFilters<S>;
17
17
  component?: Component<RouteSectionProps<T>>;
18
- metadata?: Record<string, any>;
18
+ info?: Record<string, any>;
19
19
  };
20
20
  export declare const Route: <S extends string, T = unknown>(props: RouteProps<S, T>) => JSX.Element;
@@ -24,7 +24,7 @@ function Routes(props) {
24
24
  pattern: route.pattern,
25
25
  match: path,
26
26
  params,
27
- metadata: route.metadata
27
+ info: route.info
28
28
  }))));
29
29
  }
30
30
  const params = createMemoObject(() => {
package/dist/routing.js CHANGED
@@ -56,13 +56,13 @@ export const useBeforeLeave = (listener) => {
56
56
  onCleanup(s);
57
57
  };
58
58
  export function createRoutes(routeDef, base = "") {
59
- const { component, load, children, metadata } = routeDef;
59
+ const { component, load, children, info } = routeDef;
60
60
  const isLeaf = !children || (Array.isArray(children) && !children.length);
61
61
  const shared = {
62
62
  key: routeDef,
63
63
  component,
64
64
  load,
65
- metadata
65
+ info
66
66
  };
67
67
  return asArray(routeDef.path).reduce((acc, path) => {
68
68
  for (const originalPath of expandOptionals(path)) {
package/dist/types.d.ts CHANGED
@@ -67,7 +67,7 @@ export type RouteDefinition<S extends string | string[] = any, T = unknown> = {
67
67
  load?: RouteLoadFunc<T>;
68
68
  children?: RouteDefinition | RouteDefinition[];
69
69
  component?: Component<RouteSectionProps<T>>;
70
- metadata?: Record<string, any>;
70
+ info?: Record<string, any>;
71
71
  };
72
72
  export type MatchFilter = readonly string[] | RegExp | ((s: string) => boolean);
73
73
  export type PathParams<P extends string | readonly string[]> = P extends `${infer Head}/${infer Tail}` ? [...PathParams<Head>, ...PathParams<Tail>] : P extends `:${infer S}?` ? [S] : P extends `:${infer S}` ? [S] : P extends `*${infer S}` ? [S] : [];
@@ -86,7 +86,7 @@ export interface OutputMatch {
86
86
  pattern: string;
87
87
  match: string;
88
88
  params: Params;
89
- metadata?: Record<string, any>;
89
+ info?: Record<string, any>;
90
90
  }
91
91
  export interface Route {
92
92
  key: unknown;
@@ -96,7 +96,7 @@ export interface Route {
96
96
  load?: RouteLoadFunc;
97
97
  matcher: (location: string) => PathMatch | null;
98
98
  matchFilters?: MatchFilters;
99
- metadata?: Record<string, any>;
99
+ info?: Record<string, any>;
100
100
  }
101
101
  export interface Branch {
102
102
  routes: Route[];
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "Ryan Turnquist"
7
7
  ],
8
8
  "license": "MIT",
9
- "version": "0.11.0",
9
+ "version": "0.11.1",
10
10
  "homepage": "https://github.com/solidjs/solid-router#readme",
11
11
  "repository": {
12
12
  "type": "git",