@tanstack/solid-router 2.0.0-alpha.9 → 2.0.0-beta.10

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 (110) hide show
  1. package/dist/cjs/HeadContent.cjs +2 -2
  2. package/dist/cjs/HeadContent.cjs.map +1 -1
  3. package/dist/cjs/HeadContent.d.cts +5 -1
  4. package/dist/cjs/HeadContent.dev.cjs +2 -2
  5. package/dist/cjs/HeadContent.dev.cjs.map +1 -1
  6. package/dist/cjs/HeadContent.dev.d.cts +2 -1
  7. package/dist/cjs/Match.cjs +19 -11
  8. package/dist/cjs/Match.cjs.map +1 -1
  9. package/dist/cjs/Matches.cjs +2 -4
  10. package/dist/cjs/Matches.cjs.map +1 -1
  11. package/dist/cjs/ScrollRestoration.cjs +1 -11
  12. package/dist/cjs/ScrollRestoration.cjs.map +1 -1
  13. package/dist/cjs/fileRoute.cjs +4 -5
  14. package/dist/cjs/fileRoute.cjs.map +1 -1
  15. package/dist/cjs/headContentUtils.cjs +5 -2
  16. package/dist/cjs/headContentUtils.cjs.map +1 -1
  17. package/dist/cjs/headContentUtils.d.cts +2 -2
  18. package/dist/cjs/not-found.cjs +9 -2
  19. package/dist/cjs/not-found.cjs.map +1 -1
  20. package/dist/cjs/not-found.d.cts +4 -1
  21. package/dist/cjs/renderRouteNotFound.cjs +4 -4
  22. package/dist/cjs/renderRouteNotFound.cjs.map +1 -1
  23. package/dist/cjs/router.cjs +0 -8
  24. package/dist/cjs/router.cjs.map +1 -1
  25. package/dist/cjs/scroll-restoration.cjs +4 -17
  26. package/dist/cjs/scroll-restoration.cjs.map +1 -1
  27. package/dist/cjs/useBlocker.cjs.map +1 -1
  28. package/dist/cjs/useBlocker.d.cts +2 -2
  29. package/dist/cjs/useMatch.cjs +4 -3
  30. package/dist/cjs/useMatch.cjs.map +1 -1
  31. package/dist/cjs/useRouter.cjs +3 -3
  32. package/dist/cjs/useRouter.cjs.map +1 -1
  33. package/dist/esm/HeadContent.d.ts +5 -1
  34. package/dist/esm/HeadContent.dev.d.ts +2 -1
  35. package/dist/esm/HeadContent.dev.js +2 -2
  36. package/dist/esm/HeadContent.dev.js.map +1 -1
  37. package/dist/esm/HeadContent.js +2 -2
  38. package/dist/esm/HeadContent.js.map +1 -1
  39. package/dist/esm/Match.js +21 -11
  40. package/dist/esm/Match.js.map +1 -1
  41. package/dist/esm/Matches.js +2 -3
  42. package/dist/esm/Matches.js.map +1 -1
  43. package/dist/esm/ScrollRestoration.js +2 -12
  44. package/dist/esm/ScrollRestoration.js.map +1 -1
  45. package/dist/esm/fileRoute.js +4 -3
  46. package/dist/esm/fileRoute.js.map +1 -1
  47. package/dist/esm/headContentUtils.d.ts +2 -2
  48. package/dist/esm/headContentUtils.js +6 -3
  49. package/dist/esm/headContentUtils.js.map +1 -1
  50. package/dist/esm/not-found.d.ts +4 -1
  51. package/dist/esm/not-found.js +9 -3
  52. package/dist/esm/not-found.js.map +1 -1
  53. package/dist/esm/renderRouteNotFound.js +3 -2
  54. package/dist/esm/renderRouteNotFound.js.map +1 -1
  55. package/dist/esm/router.js +0 -8
  56. package/dist/esm/router.js.map +1 -1
  57. package/dist/esm/scroll-restoration.js +4 -17
  58. package/dist/esm/scroll-restoration.js.map +1 -1
  59. package/dist/esm/useBlocker.d.ts +2 -2
  60. package/dist/esm/useBlocker.js.map +1 -1
  61. package/dist/esm/useMatch.js +5 -3
  62. package/dist/esm/useMatch.js.map +1 -1
  63. package/dist/esm/useRouter.js +3 -2
  64. package/dist/esm/useRouter.js.map +1 -1
  65. package/dist/source/HeadContent.d.ts +5 -1
  66. package/dist/source/HeadContent.dev.d.ts +2 -1
  67. package/dist/source/HeadContent.dev.jsx +2 -2
  68. package/dist/source/HeadContent.dev.jsx.map +1 -1
  69. package/dist/source/HeadContent.jsx +2 -2
  70. package/dist/source/HeadContent.jsx.map +1 -1
  71. package/dist/source/Match.jsx +34 -15
  72. package/dist/source/Match.jsx.map +1 -1
  73. package/dist/source/Matches.jsx +2 -3
  74. package/dist/source/Matches.jsx.map +1 -1
  75. package/dist/source/ScrollRestoration.jsx +2 -18
  76. package/dist/source/ScrollRestoration.jsx.map +1 -1
  77. package/dist/source/fileRoute.js +4 -3
  78. package/dist/source/fileRoute.js.map +1 -1
  79. package/dist/source/headContentUtils.d.ts +2 -2
  80. package/dist/source/headContentUtils.jsx +12 -4
  81. package/dist/source/headContentUtils.jsx.map +1 -1
  82. package/dist/source/not-found.d.ts +4 -1
  83. package/dist/source/not-found.jsx +17 -4
  84. package/dist/source/not-found.jsx.map +1 -1
  85. package/dist/source/renderRouteNotFound.jsx +4 -3
  86. package/dist/source/renderRouteNotFound.jsx.map +1 -1
  87. package/dist/source/router.js +0 -11
  88. package/dist/source/router.js.map +1 -1
  89. package/dist/source/scroll-restoration.jsx +4 -24
  90. package/dist/source/scroll-restoration.jsx.map +1 -1
  91. package/dist/source/useBlocker.d.ts +2 -2
  92. package/dist/source/useMatch.jsx +7 -3
  93. package/dist/source/useMatch.jsx.map +1 -1
  94. package/dist/source/useRouter.jsx +5 -2
  95. package/dist/source/useRouter.jsx.map +1 -1
  96. package/package.json +6 -7
  97. package/src/HeadContent.dev.tsx +3 -2
  98. package/src/HeadContent.tsx +7 -2
  99. package/src/Match.tsx +44 -16
  100. package/src/Matches.tsx +3 -5
  101. package/src/ScrollRestoration.tsx +2 -22
  102. package/src/fileRoute.ts +7 -8
  103. package/src/headContentUtils.tsx +22 -5
  104. package/src/not-found.tsx +25 -5
  105. package/src/renderRouteNotFound.tsx +6 -6
  106. package/src/router.ts +0 -9
  107. package/src/scroll-restoration.tsx +5 -36
  108. package/src/useBlocker.tsx +2 -2
  109. package/src/useMatch.tsx +9 -6
  110. package/src/useRouter.tsx +7 -5
@@ -5,6 +5,10 @@ import { createComponent, template } from "@solidjs/web";
5
5
  import * as Solid from "solid-js";
6
6
  //#region src/not-found.tsx
7
7
  var _tmpl$ = /* @__PURE__ */ template(`<p>Not Found`);
8
+ function getNotFound(error) {
9
+ if (isNotFound(error)) return error;
10
+ if (isNotFound(error?.cause)) return error.cause;
11
+ }
8
12
  function CatchNotFound(props) {
9
13
  const router = useRouter();
10
14
  const pathname = Solid.createMemo(() => router.stores.location.state.pathname);
@@ -12,11 +16,13 @@ function CatchNotFound(props) {
12
16
  return createComponent(CatchBoundary, {
13
17
  getResetKey: () => `not-found-${pathname()}-${status()}`,
14
18
  onCatch: (error) => {
15
- if (isNotFound(error)) props.onCatch?.(error);
19
+ const notFoundError = getNotFound(error);
20
+ if (notFoundError) props.onCatch?.(notFoundError);
16
21
  else throw error;
17
22
  },
18
23
  errorComponent: ({ error }) => {
19
- if (isNotFound(error)) return props.fallback?.(error);
24
+ const notFoundError = getNotFound(error);
25
+ if (notFoundError) return props.fallback?.(notFoundError);
20
26
  else throw error;
21
27
  },
22
28
  get children() {
@@ -28,6 +34,6 @@ function DefaultGlobalNotFound() {
28
34
  return _tmpl$();
29
35
  }
30
36
  //#endregion
31
- export { CatchNotFound, DefaultGlobalNotFound };
37
+ export { CatchNotFound, DefaultGlobalNotFound, getNotFound };
32
38
 
33
39
  //# sourceMappingURL=not-found.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"not-found.js","names":["isNotFound","Solid","CatchBoundary","useRouter","NotFoundError","CatchNotFound","props","fallback","error","JSX","Element","onCatch","Error","children","router","pathname","createMemo","stores","location","state","status","_$createComponent","getResetKey","errorComponent","DefaultGlobalNotFound","_tmpl$"],"sources":["../../src/not-found.tsx"],"sourcesContent":["import { isNotFound } from '@tanstack/router-core'\nimport * as Solid from 'solid-js'\nimport { CatchBoundary } from './CatchBoundary'\nimport { useRouter } from './useRouter'\nimport type { NotFoundError } from '@tanstack/router-core'\n\nexport function CatchNotFound(props: {\n fallback?: (error: NotFoundError) => Solid.JSX.Element\n onCatch?: (error: Error) => void\n children: Solid.JSX.Element\n}) {\n const router = useRouter()\n // TODO: Some way for the user to programmatically reset the not-found boundary?\n const pathname = Solid.createMemo(() => router.stores.location.state.pathname)\n const status = Solid.createMemo(() => router.stores.status.state)\n\n return (\n <CatchBoundary\n getResetKey={() => `not-found-${pathname()}-${status()}`}\n onCatch={(error) => {\n if (isNotFound(error)) {\n props.onCatch?.(error)\n } else {\n throw error\n }\n }}\n errorComponent={({ error }) => {\n if (isNotFound(error)) {\n return props.fallback?.(error)\n } else {\n throw error\n }\n }}\n >\n {props.children}\n </CatchBoundary>\n )\n}\n\nexport function DefaultGlobalNotFound() {\n return <p>Not Found</p>\n}\n"],"mappings":";;;;;;;AAMA,SAAgBK,cAAcC,OAI3B;CACD,MAAMQ,SAASX,WAAW;CAE1B,MAAMY,WAAWd,MAAMe,iBAAiBF,OAAOG,OAAOC,SAASC,MAAMJ,SAAS;CAC9E,MAAMK,SAASnB,MAAMe,iBAAiBF,OAAOG,OAAOG,OAAOD,MAAM;AAEjE,QAAAE,gBACGnB,eAAa;EACZoB,mBAAmB,aAAaP,UAAU,CAAA,GAAIK,QAAQ;EACtDT,UAAUH,UAAU;AAClB,OAAIR,WAAWQ,MAAM,CACnBF,OAAMK,UAAUH,MAAM;OAEtB,OAAMA;;EAGVe,iBAAiB,EAAEf,YAAY;AAC7B,OAAIR,WAAWQ,MAAM,CACnB,QAAOF,MAAMC,WAAWC,MAAM;OAE9B,OAAMA;;EAET,IAAAK,WAAA;AAAA,UAEAP,MAAMO;;EAAQ,CAAA;;AAKrB,SAAgBW,wBAAwB;AACtC,QAAAC,QAAA"}
1
+ {"version":3,"file":"not-found.js","names":["isNotFound","Solid","CatchBoundary","useRouter","NotFoundError","getNotFound","error","cause","undefined","CatchNotFound","props","fallback","JSX","Element","onCatch","children","router","pathname","createMemo","stores","location","state","status","_$createComponent","getResetKey","notFoundError","errorComponent","DefaultGlobalNotFound","_tmpl$"],"sources":["../../src/not-found.tsx"],"sourcesContent":["import { isNotFound } from '@tanstack/router-core'\nimport * as Solid from 'solid-js'\nimport { CatchBoundary } from './CatchBoundary'\nimport { useRouter } from './useRouter'\nimport type { NotFoundError } from '@tanstack/router-core'\n\n// Solid wraps non-Error throws in an Error and stores the original thrown value\n// on `cause`, so component-thrown `notFound()` needs one extra unwrapping step.\nexport function getNotFound(\n error: unknown,\n): (NotFoundError & { isNotFound: true }) | undefined {\n if (isNotFound(error)) {\n return error as NotFoundError & { isNotFound: true }\n }\n\n if (isNotFound((error as any)?.cause)) {\n return (error as any).cause as NotFoundError & { isNotFound: true }\n }\n\n return undefined\n}\n\nexport function CatchNotFound(props: {\n fallback?: (error: NotFoundError) => Solid.JSX.Element\n onCatch?: (error: NotFoundError) => void\n children: Solid.JSX.Element\n}) {\n const router = useRouter()\n // TODO: Some way for the user to programmatically reset the not-found boundary?\n const pathname = Solid.createMemo(() => router.stores.location.state.pathname)\n const status = Solid.createMemo(() => router.stores.status.state)\n\n return (\n <CatchBoundary\n getResetKey={() => `not-found-${pathname()}-${status()}`}\n onCatch={(error) => {\n const notFoundError = getNotFound(error)\n\n if (notFoundError) {\n props.onCatch?.(notFoundError)\n } else {\n throw error\n }\n }}\n errorComponent={({ error }) => {\n const notFoundError = getNotFound(error)\n\n if (notFoundError) {\n return props.fallback?.(notFoundError)\n } else {\n throw error\n }\n }}\n >\n {props.children}\n </CatchBoundary>\n )\n}\n\nexport function DefaultGlobalNotFound() {\n return <p>Not Found</p>\n}\n"],"mappings":";;;;;;;AAQA,SAAgBK,YACdC,OACoD;AACpD,KAAIN,WAAWM,MAAM,CACnB,QAAOA;AAGT,KAAIN,WAAYM,OAAeC,MAAM,CACnC,QAAQD,MAAcC;;AAM1B,SAAgBE,cAAcC,OAI3B;CACD,MAAMM,SAASb,WAAW;CAE1B,MAAMc,WAAWhB,MAAMiB,iBAAiBF,OAAOG,OAAOC,SAASC,MAAMJ,SAAS;CAC9E,MAAMK,SAASrB,MAAMiB,iBAAiBF,OAAOG,OAAOG,OAAOD,MAAM;AAEjE,QAAAE,gBACGrB,eAAa;EACZsB,mBAAmB,aAAaP,UAAU,CAAA,GAAIK,QAAQ;EACtDR,UAAUR,UAAU;GAClB,MAAMmB,gBAAgBpB,YAAYC,MAAM;AAExC,OAAImB,cACFf,OAAMI,UAAUW,cAAc;OAE9B,OAAMnB;;EAGVoB,iBAAiB,EAAEpB,YAAY;GAC7B,MAAMmB,gBAAgBpB,YAAYC,MAAM;AAExC,OAAImB,cACF,QAAOf,MAAMC,WAAWc,cAAc;OAEtC,OAAMnB;;EAET,IAAAS,WAAA;AAAA,UAEAL,MAAMK;;EAAQ,CAAA;;AAKrB,SAAgBY,wBAAwB;AACtC,QAAAC,QAAA"}
@@ -1,6 +1,5 @@
1
1
  import { DefaultGlobalNotFound } from "./not-found.js";
2
2
  import { createComponent } from "@solidjs/web";
3
- import warning from "tiny-warning";
4
3
  //#region src/renderRouteNotFound.tsx
5
4
  /**
6
5
  * Renders a not found component for a route when no matching route is found.
@@ -13,7 +12,9 @@ import warning from "tiny-warning";
13
12
  function renderRouteNotFound(router, route, data) {
14
13
  if (!route.options.notFoundComponent) {
15
14
  if (router.options.defaultNotFoundComponent) return createComponent(router.options.defaultNotFoundComponent, data);
16
- if (process.env.NODE_ENV === "development") warning(route.options.notFoundComponent, `A notFoundError was encountered on the route with ID "${route.id}", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<p>Not Found</p>)`);
15
+ if (process.env.NODE_ENV !== "production") {
16
+ if (!route.options.notFoundComponent) console.warn(`Warning: A notFoundError was encountered on the route with ID "${route.id}", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<p>Not Found</p>)`);
17
+ }
17
18
  return createComponent(DefaultGlobalNotFound, {});
18
19
  }
19
20
  return createComponent(route.options.notFoundComponent, data);
@@ -1 +1 @@
1
- {"version":3,"file":"renderRouteNotFound.js","names":["warning","DefaultGlobalNotFound","AnyRoute","AnyRouter","renderRouteNotFound","router","route","data","options","notFoundComponent","defaultNotFoundComponent","_$createComponent","process","env","NODE_ENV","id"],"sources":["../../src/renderRouteNotFound.tsx"],"sourcesContent":["import warning from 'tiny-warning'\nimport { DefaultGlobalNotFound } from './not-found'\nimport type { AnyRoute, AnyRouter } from '@tanstack/router-core'\n\n/**\n * Renders a not found component for a route when no matching route is found.\n *\n * @param router - The router instance containing the route configuration\n * @param route - The route that triggered the not found state\n * @param data - Additional data to pass to the not found component\n * @returns The rendered not found component or a default fallback component\n */\nexport function renderRouteNotFound(\n router: AnyRouter,\n route: AnyRoute,\n data: any,\n) {\n if (!route.options.notFoundComponent) {\n if (router.options.defaultNotFoundComponent) {\n return <router.options.defaultNotFoundComponent {...data} />\n }\n\n if (process.env.NODE_ENV === 'development') {\n warning(\n route.options.notFoundComponent,\n `A notFoundError was encountered on the route with ID \"${route.id}\", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<p>Not Found</p>)`,\n )\n }\n\n return <DefaultGlobalNotFound />\n }\n\n return <route.options.notFoundComponent {...data} />\n}\n"],"mappings":";;;;;;;;;;;;AAYA,SAAgBI,oBACdC,QACAC,OACAC,MACA;AACA,KAAI,CAACD,MAAME,QAAQC,mBAAmB;AACpC,MAAIJ,OAAOG,QAAQE,yBACjB,QAAAC,gBAAQN,OAAOG,QAAQE,0BAA6BH,KAAI;AAG1D,MAAA,QAAA,IAAA,aAA6B,cAC3BP,SACEM,MAAME,QAAQC,mBACd,yDAAyDH,MAAMS,GAAE,oPAClE;AAGH,SAAAJ,gBAAQV,uBAAqB,EAAA,CAAA;;AAG/B,QAAAU,gBAAQL,MAAME,QAAQC,mBAAsBF,KAAI"}
1
+ {"version":3,"file":"renderRouteNotFound.js","names":["DefaultGlobalNotFound","AnyRoute","AnyRouter","renderRouteNotFound","router","route","data","options","notFoundComponent","defaultNotFoundComponent","_$createComponent","process","env","NODE_ENV","console","warn","id"],"sources":["../../src/renderRouteNotFound.tsx"],"sourcesContent":["import { DefaultGlobalNotFound } from './not-found'\nimport type { AnyRoute, AnyRouter } from '@tanstack/router-core'\n\n/**\n * Renders a not found component for a route when no matching route is found.\n *\n * @param router - The router instance containing the route configuration\n * @param route - The route that triggered the not found state\n * @param data - Additional data to pass to the not found component\n * @returns The rendered not found component or a default fallback component\n */\nexport function renderRouteNotFound(\n router: AnyRouter,\n route: AnyRoute,\n data: any,\n) {\n if (!route.options.notFoundComponent) {\n if (router.options.defaultNotFoundComponent) {\n return <router.options.defaultNotFoundComponent {...data} />\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!route.options.notFoundComponent) {\n console.warn(\n `Warning: A notFoundError was encountered on the route with ID \"${route.id}\", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<p>Not Found</p>)`,\n )\n }\n }\n\n return <DefaultGlobalNotFound />\n }\n\n return <route.options.notFoundComponent {...data} />\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAgBG,oBACdC,QACAC,OACAC,MACA;AACA,KAAI,CAACD,MAAME,QAAQC,mBAAmB;AACpC,MAAIJ,OAAOG,QAAQE,yBACjB,QAAAC,gBAAQN,OAAOG,QAAQE,0BAA6BH,KAAI;AAG1D,MAAA,QAAA,IAAA,aAA6B;OACvB,CAACD,MAAME,QAAQC,kBACjBM,SAAQC,KACN,kEAAkEV,MAAMW,GAAE,oPAC3E;;AAIL,SAAAN,gBAAQV,uBAAqB,EAAA,CAAA;;AAG/B,QAAAU,gBAAQL,MAAME,QAAQC,mBAAsBF,KAAI"}
@@ -1,4 +1,3 @@
1
- import { createFileRoute, createLazyFileRoute } from "./fileRoute.js";
2
1
  import { getStoreFactory } from "./routerStores.js";
3
2
  import { RouterCore } from "@tanstack/router-core";
4
3
  //#region src/router.ts
@@ -10,13 +9,6 @@ var Router = class extends RouterCore {
10
9
  super(options, getStoreFactory);
11
10
  }
12
11
  };
13
- if (typeof globalThis !== "undefined") {
14
- globalThis.createFileRoute = createFileRoute;
15
- globalThis.createLazyFileRoute = createLazyFileRoute;
16
- } else if (typeof window !== "undefined") {
17
- window.createFileRoute = createFileRoute;
18
- window.createLazyFileRoute = createLazyFileRoute;
19
- }
20
12
  //#endregion
21
13
  export { Router, createRouter };
22
14
 
@@ -1 +1 @@
1
- {"version":3,"file":"router.js","names":[],"sources":["../../src/router.ts"],"sourcesContent":["import { RouterCore } from '@tanstack/router-core'\nimport { createFileRoute, createLazyFileRoute } from './fileRoute'\nimport { getStoreFactory } from './routerStores'\nimport type { RouterHistory } from '@tanstack/history'\nimport type {\n AnyRoute,\n CreateRouterFn,\n RouterConstructorOptions,\n TrailingSlashOption,\n} from '@tanstack/router-core'\nimport type {\n ErrorRouteComponent,\n NotFoundRouteComponent,\n RouteComponent,\n} from './route'\nimport type { JSX } from 'solid-js'\n\ndeclare module '@tanstack/router-core' {\n export interface RouterOptionsExtensions {\n /**\n * The default `component` a route should use if no component is provided.\n *\n * @default Outlet\n * @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#defaultcomponent-property)\n */\n defaultComponent?: RouteComponent\n /**\n * The default `errorComponent` a route should use if no error component is provided.\n *\n * @default ErrorComponent\n * @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#defaulterrorcomponent-property)\n * @link [Guide](https://tanstack.com/router/latest/docs/framework/solid/guide/data-loading#handling-errors-with-routeoptionserrorcomponent)\n */\n defaultErrorComponent?: ErrorRouteComponent\n /**\n * The default `pendingComponent` a route should use if no pending component is provided.\n *\n * @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#defaultpendingcomponent-property)\n * @link [Guide](https://tanstack.com/router/latest/docs/framework/solid/guide/data-loading#showing-a-pending-component)\n */\n defaultPendingComponent?: RouteComponent\n /**\n * The default `notFoundComponent` a route should use if no notFound component is provided.\n *\n * @default NotFound\n * @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#defaultnotfoundcomponent-property)\n * @link [Guide](https://tanstack.com/router/latest/docs/framework/solid/guide/not-found-errors#default-router-wide-not-found-handling)\n */\n defaultNotFoundComponent?: NotFoundRouteComponent\n /**\n * A component that will be used to wrap the entire router.\n *\n * This is useful for providing a context to the entire router.\n *\n * @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#wrap-property)\n */\n Wrap?: (props: { children: any }) => JSX.Element\n /**\n * A component that will be used to wrap the inner contents of the router.\n *\n * This is useful for providing a context to the inner contents of the router where you also need access to the router context and hooks.\n *\n * @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#innerwrap-property)\n */\n InnerWrap?: (props: { children: any }) => JSX.Element\n\n /**\n * The default `onCatch` handler for errors caught by the Router ErrorBoundary\n *\n * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#defaultoncatch-property)\n * @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/data-loading#handling-errors-with-routeoptionsoncatch)\n */\n defaultOnCatch?: (error: Error) => void\n }\n}\n\nexport const createRouter: CreateRouterFn = (options) => {\n return new Router(options)\n}\n\nexport class Router<\n in out TRouteTree extends AnyRoute,\n in out TTrailingSlashOption extends TrailingSlashOption = 'never',\n in out TDefaultStructuralSharingOption extends boolean = false,\n in out TRouterHistory extends RouterHistory = RouterHistory,\n in out TDehydrated extends Record<string, any> = Record<string, any>,\n> extends RouterCore<\n TRouteTree,\n TTrailingSlashOption,\n TDefaultStructuralSharingOption,\n TRouterHistory,\n TDehydrated\n> {\n constructor(\n options: RouterConstructorOptions<\n TRouteTree,\n TTrailingSlashOption,\n TDefaultStructuralSharingOption,\n TRouterHistory,\n TDehydrated\n >,\n ) {\n super(options, getStoreFactory)\n }\n}\n\nif (typeof globalThis !== 'undefined') {\n ;(globalThis as any).createFileRoute = createFileRoute\n ;(globalThis as any).createLazyFileRoute = createLazyFileRoute\n} else if (typeof window !== 'undefined') {\n ;(window as any).createFileRoute = createFileRoute\n ;(window as any).createLazyFileRoute = createLazyFileRoute\n}\n"],"mappings":";;;;AA4EA,IAAa,gBAAgC,YAAY;AACvD,QAAO,IAAI,OAAO,QAAQ;;AAG5B,IAAa,SAAb,cAMU,WAMR;CACA,YACE,SAOA;AACA,QAAM,SAAS,gBAAgB;;;AAInC,IAAI,OAAO,eAAe,aAAa;AACnC,YAAmB,kBAAkB;AACrC,YAAmB,sBAAsB;WAClC,OAAO,WAAW,aAAa;AACtC,QAAe,kBAAkB;AACjC,QAAe,sBAAsB"}
1
+ {"version":3,"file":"router.js","names":[],"sources":["../../src/router.ts"],"sourcesContent":["import { RouterCore } from '@tanstack/router-core'\nimport { getStoreFactory } from './routerStores'\nimport type { RouterHistory } from '@tanstack/history'\nimport type {\n AnyRoute,\n CreateRouterFn,\n RouterConstructorOptions,\n TrailingSlashOption,\n} from '@tanstack/router-core'\nimport type {\n ErrorRouteComponent,\n NotFoundRouteComponent,\n RouteComponent,\n} from './route'\nimport type { JSX } from 'solid-js'\n\ndeclare module '@tanstack/router-core' {\n export interface RouterOptionsExtensions {\n /**\n * The default `component` a route should use if no component is provided.\n *\n * @default Outlet\n * @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#defaultcomponent-property)\n */\n defaultComponent?: RouteComponent\n /**\n * The default `errorComponent` a route should use if no error component is provided.\n *\n * @default ErrorComponent\n * @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#defaulterrorcomponent-property)\n * @link [Guide](https://tanstack.com/router/latest/docs/framework/solid/guide/data-loading#handling-errors-with-routeoptionserrorcomponent)\n */\n defaultErrorComponent?: ErrorRouteComponent\n /**\n * The default `pendingComponent` a route should use if no pending component is provided.\n *\n * @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#defaultpendingcomponent-property)\n * @link [Guide](https://tanstack.com/router/latest/docs/framework/solid/guide/data-loading#showing-a-pending-component)\n */\n defaultPendingComponent?: RouteComponent\n /**\n * The default `notFoundComponent` a route should use if no notFound component is provided.\n *\n * @default NotFound\n * @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#defaultnotfoundcomponent-property)\n * @link [Guide](https://tanstack.com/router/latest/docs/framework/solid/guide/not-found-errors#default-router-wide-not-found-handling)\n */\n defaultNotFoundComponent?: NotFoundRouteComponent\n /**\n * A component that will be used to wrap the entire router.\n *\n * This is useful for providing a context to the entire router.\n *\n * @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#wrap-property)\n */\n Wrap?: (props: { children: any }) => JSX.Element\n /**\n * A component that will be used to wrap the inner contents of the router.\n *\n * This is useful for providing a context to the inner contents of the router where you also need access to the router context and hooks.\n *\n * @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#innerwrap-property)\n */\n InnerWrap?: (props: { children: any }) => JSX.Element\n\n /**\n * The default `onCatch` handler for errors caught by the Router ErrorBoundary\n *\n * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#defaultoncatch-property)\n * @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/data-loading#handling-errors-with-routeoptionsoncatch)\n */\n defaultOnCatch?: (error: Error) => void\n }\n}\n\nexport const createRouter: CreateRouterFn = (options) => {\n return new Router(options)\n}\n\nexport class Router<\n in out TRouteTree extends AnyRoute,\n in out TTrailingSlashOption extends TrailingSlashOption = 'never',\n in out TDefaultStructuralSharingOption extends boolean = false,\n in out TRouterHistory extends RouterHistory = RouterHistory,\n in out TDehydrated extends Record<string, any> = Record<string, any>,\n> extends RouterCore<\n TRouteTree,\n TTrailingSlashOption,\n TDefaultStructuralSharingOption,\n TRouterHistory,\n TDehydrated\n> {\n constructor(\n options: RouterConstructorOptions<\n TRouteTree,\n TTrailingSlashOption,\n TDefaultStructuralSharingOption,\n TRouterHistory,\n TDehydrated\n >,\n ) {\n super(options, getStoreFactory)\n }\n}\n"],"mappings":";;;AA2EA,IAAa,gBAAgC,YAAY;AACvD,QAAO,IAAI,OAAO,QAAQ;;AAG5B,IAAa,SAAb,cAMU,WAMR;CACA,YACE,SAOA;AACA,QAAM,SAAS,gBAAgB"}
@@ -1,25 +1,12 @@
1
1
  import { useRouter } from "./useRouter.js";
2
2
  import { ScriptOnce } from "./ScriptOnce.js";
3
- import { defaultGetScrollRestorationKey, escapeHtml, restoreScroll, storageKey } from "@tanstack/router-core";
4
3
  import { createComponent } from "@solidjs/web";
5
- import { isServer as isServer$1 } from "@tanstack/router-core/isServer";
4
+ import { getScrollRestorationScriptForRouter } from "@tanstack/router-core/scroll-restoration-script";
6
5
  //#region src/scroll-restoration.tsx
7
6
  function ScrollRestoration() {
8
- const router = useRouter();
9
- if (!router.isScrollRestoring || !(isServer$1 ?? router.isServer)) return null;
10
- if (typeof router.options.scrollRestoration === "function") {
11
- if (!router.options.scrollRestoration({ location: router.latestLocation })) return null;
12
- }
13
- const userKey = (router.options.getScrollRestorationKey || defaultGetScrollRestorationKey)(router.latestLocation);
14
- const resolvedKey = userKey !== defaultGetScrollRestorationKey(router.latestLocation) ? userKey : void 0;
15
- const restoreScrollOptions = {
16
- storageKey,
17
- shouldScrollRestoration: true
18
- };
19
- if (resolvedKey) restoreScrollOptions.key = resolvedKey;
20
- return createComponent(ScriptOnce, { get children() {
21
- return `(${restoreScroll.toString()})(${escapeHtml(JSON.stringify(restoreScrollOptions))})`;
22
- } });
7
+ const script = getScrollRestorationScriptForRouter(useRouter());
8
+ if (!script) return null;
9
+ return createComponent(ScriptOnce, { children: script });
23
10
  }
24
11
  //#endregion
25
12
  export { ScrollRestoration };
@@ -1 +1 @@
1
- {"version":3,"file":"scroll-restoration.js","names":["defaultGetScrollRestorationKey","escapeHtml","restoreScroll","storageKey","isServer","useRouter","ScriptOnce","ScrollRestoration","router","isScrollRestoring","options","scrollRestoration","shouldRestore","location","latestLocation","getKey","getScrollRestorationKey","userKey","resolvedKey","undefined","restoreScrollOptions","Parameters","shouldScrollRestoration","key","_$createComponent","children","toString","JSON","stringify"],"sources":["../../src/scroll-restoration.tsx"],"sourcesContent":["import {\n defaultGetScrollRestorationKey,\n escapeHtml,\n restoreScroll,\n storageKey,\n} from '@tanstack/router-core'\nimport { isServer } from '@tanstack/router-core/isServer'\nimport { useRouter } from './useRouter'\nimport { ScriptOnce } from './ScriptOnce'\n\nexport function ScrollRestoration() {\n const router = useRouter()\n if (!router.isScrollRestoring || !(isServer ?? router.isServer)) {\n return null\n }\n if (typeof router.options.scrollRestoration === 'function') {\n const shouldRestore = router.options.scrollRestoration({\n location: router.latestLocation,\n })\n if (!shouldRestore) {\n return null\n }\n }\n const getKey =\n router.options.getScrollRestorationKey || defaultGetScrollRestorationKey\n const userKey = getKey(router.latestLocation)\n const resolvedKey =\n userKey !== defaultGetScrollRestorationKey(router.latestLocation)\n ? userKey\n : undefined\n\n const restoreScrollOptions: Parameters<typeof restoreScroll>[0] = {\n storageKey,\n shouldScrollRestoration: true,\n }\n if (resolvedKey) {\n restoreScrollOptions.key = resolvedKey\n }\n\n return (\n <ScriptOnce\n children={`(${restoreScroll.toString()})(${escapeHtml(JSON.stringify(restoreScrollOptions))})`}\n />\n )\n}\n"],"mappings":";;;;;;AAUA,SAAgBO,oBAAoB;CAClC,MAAMC,SAASH,WAAW;AAC1B,KAAI,CAACG,OAAOC,qBAAqB,EAAEL,cAAYI,OAAOJ,UACpD,QAAO;AAET,KAAI,OAAOI,OAAOE,QAAQC,sBAAsB;MAI1C,CAHkBH,OAAOE,QAAQC,kBAAkB,EACrDE,UAAUL,OAAOM,gBAClB,CAAC,CAEA,QAAO;;CAKX,MAAMG,WADJT,OAAOE,QAAQM,2BAA2BhB,gCACrBQ,OAAOM,eAAe;CAC7C,MAAMI,cACJD,YAAYjB,+BAA+BQ,OAAOM,eAAe,GAC7DG,UACAE,KAAAA;CAEN,MAAMC,uBAA4D;EAChEjB;EACAmB,yBAAyB;EAC1B;AACD,KAAIJ,YACFE,sBAAqBG,MAAML;AAG7B,QAAAM,gBACGlB,YAAU,EAAA,IACTmB,WAAQ;AAAA,SAAE,IAAIvB,cAAcwB,UAAU,CAAA,IAAKzB,WAAW0B,KAAKC,UAAUR,qBAAqB,CAAC,CAAA;IAAG,CAAA"}
1
+ {"version":3,"file":"scroll-restoration.js","names":["getScrollRestorationScriptForRouter","useRouter","ScriptOnce","ScrollRestoration","router","script","_$createComponent","children"],"sources":["../../src/scroll-restoration.tsx"],"sourcesContent":["import { getScrollRestorationScriptForRouter } from '@tanstack/router-core/scroll-restoration-script'\nimport { useRouter } from './useRouter'\nimport { ScriptOnce } from './ScriptOnce'\n\nexport function ScrollRestoration() {\n const router = useRouter()\n const script = getScrollRestorationScriptForRouter(router)\n\n if (!script) {\n return null\n }\n\n return <ScriptOnce children={script} />\n}\n"],"mappings":";;;;;AAIA,SAAgBG,oBAAoB;CAElC,MAAME,SAASL,oCADAC,WAAW,CACgC;AAE1D,KAAI,CAACI,OACH,QAAO;AAGT,QAAAC,gBAAQJ,YAAU,EAACK,UAAUF,QAAM,CAAA"}
@@ -2,13 +2,13 @@ import { HistoryAction } from '@tanstack/history';
2
2
  import { SolidNode } from './route.js';
3
3
  import { AnyRoute, AnyRouter, ParseRoute, RegisteredRouter } from '@tanstack/router-core';
4
4
  import * as Solid from 'solid-js';
5
- interface ShouldBlockFnLocation<out TRouteId, out TFullPath, out TAllParams, out TFullSearchSchema> {
5
+ type ShouldBlockFnLocation<out TRouteId, out TFullPath, out TAllParams, out TFullSearchSchema> = {
6
6
  routeId: TRouteId;
7
7
  fullPath: TFullPath;
8
8
  pathname: string;
9
9
  params: TAllParams;
10
10
  search: TFullSearchSchema;
11
- }
11
+ };
12
12
  type MakeShouldBlockFnLocationUnion<TRouter extends AnyRouter = RegisteredRouter, TRoute extends AnyRoute = ParseRoute<TRouter['routeTree']>> = TRoute extends any ? ShouldBlockFnLocation<TRoute['id'], TRoute['fullPath'], TRoute['types']['allParams'], TRoute['types']['fullSearchSchema']> : never;
13
13
  type BlockerResolver<TRouter extends AnyRouter = RegisteredRouter> = {
14
14
  status: 'blocked';
@@ -1 +1 @@
1
- {"version":3,"file":"useBlocker.js","names":["Solid","useRouter","BlockerFnArgs","HistoryAction","HistoryLocation","SolidNode","AnyRoute","AnyRouter","ParseRoute","RegisteredRouter","ShouldBlockFnLocation","routeId","TRouteId","fullPath","TFullPath","pathname","params","TAllParams","search","TFullSearchSchema","AnyShouldBlockFnLocation","MakeShouldBlockFnLocationUnion","TRouter","TRoute","BlockerResolver","status","current","next","action","proceed","reset","ShouldBlockFnArgs","ShouldBlockFn","args","Promise","UseBlockerOpts","shouldBlockFn","enableBeforeUnload","disabled","withResolver","TWithResolver","LegacyBlockerFn","LegacyBlockerOpts","blockerFn","condition","_resolveBlockerOpts","opts","undefined","shouldBlock","Boolean","_customBlockerFn","createMemo","useBlocker","Accessor","blockerFnOrOpts","props","merge","router","resolver","setResolver","createSignal","disposeBlock","createEffect","blockerFnComposed","blockerFnArgs","getLocation","location","parsedLocation","parseLocation","matchedRoutes","getMatchedRoutes","foundRoute","routeParams","id","currentLocation","nextLocation","promise","resolve","canNavigateAsync","history","block","onSettled","_resolvePromptBlockerArgs","PromptProps","LegacyPromptProps","BlockComponent","Block","propsWithChildren","children","child","_$memo","TParams"],"sources":["../../src/useBlocker.tsx"],"sourcesContent":["import * as Solid from 'solid-js'\nimport { useRouter } from './useRouter'\nimport type {\n BlockerFnArgs,\n HistoryAction,\n HistoryLocation,\n} from '@tanstack/history'\nimport type { SolidNode } from './route'\nimport type {\n AnyRoute,\n AnyRouter,\n ParseRoute,\n RegisteredRouter,\n} from '@tanstack/router-core'\n\ninterface ShouldBlockFnLocation<\n out TRouteId,\n out TFullPath,\n out TAllParams,\n out TFullSearchSchema,\n> {\n routeId: TRouteId\n fullPath: TFullPath\n pathname: string\n params: TAllParams\n search: TFullSearchSchema\n}\n\ntype AnyShouldBlockFnLocation = ShouldBlockFnLocation<any, any, any, any>\ntype MakeShouldBlockFnLocationUnion<\n TRouter extends AnyRouter = RegisteredRouter,\n TRoute extends AnyRoute = ParseRoute<TRouter['routeTree']>,\n> = TRoute extends any\n ? ShouldBlockFnLocation<\n TRoute['id'],\n TRoute['fullPath'],\n TRoute['types']['allParams'],\n TRoute['types']['fullSearchSchema']\n >\n : never\n\ntype BlockerResolver<TRouter extends AnyRouter = RegisteredRouter> =\n | {\n status: 'blocked'\n current: MakeShouldBlockFnLocationUnion<TRouter>\n next: MakeShouldBlockFnLocationUnion<TRouter>\n action: HistoryAction\n proceed: () => void\n reset: () => void\n }\n | {\n status: 'idle'\n current: undefined\n next: undefined\n action: undefined\n proceed: undefined\n reset: undefined\n }\n\ntype ShouldBlockFnArgs<TRouter extends AnyRouter = RegisteredRouter> = {\n current: MakeShouldBlockFnLocationUnion<TRouter>\n next: MakeShouldBlockFnLocationUnion<TRouter>\n action: HistoryAction\n}\n\nexport type ShouldBlockFn<TRouter extends AnyRouter = RegisteredRouter> = (\n args: ShouldBlockFnArgs<TRouter>,\n) => boolean | Promise<boolean>\nexport type UseBlockerOpts<\n TRouter extends AnyRouter = RegisteredRouter,\n TWithResolver extends boolean = boolean,\n> = {\n shouldBlockFn: ShouldBlockFn<TRouter>\n enableBeforeUnload?: boolean | (() => boolean)\n disabled?: boolean\n withResolver?: TWithResolver\n}\n\ntype LegacyBlockerFn = () => Promise<any> | any\ntype LegacyBlockerOpts = {\n blockerFn?: LegacyBlockerFn\n condition?: boolean | any\n}\n\nfunction _resolveBlockerOpts(\n opts?: UseBlockerOpts | LegacyBlockerOpts | LegacyBlockerFn,\n condition?: boolean | any,\n): UseBlockerOpts {\n if (opts === undefined) {\n return {\n shouldBlockFn: () => true,\n withResolver: false,\n }\n }\n\n if ('shouldBlockFn' in opts) {\n return opts\n }\n\n if (typeof opts === 'function') {\n const shouldBlock = Boolean(condition ?? true)\n\n const _customBlockerFn = async () => {\n if (shouldBlock) return await opts()\n return false\n }\n\n return {\n shouldBlockFn: _customBlockerFn,\n enableBeforeUnload: shouldBlock,\n withResolver: false,\n }\n }\n\n const shouldBlock = Solid.createMemo(() => Boolean(opts.condition ?? true))\n\n const _customBlockerFn = async () => {\n if (shouldBlock() && opts.blockerFn !== undefined) {\n return await opts.blockerFn()\n }\n return shouldBlock()\n }\n\n return {\n get shouldBlockFn() {\n return _customBlockerFn\n },\n get enableBeforeUnload() {\n return shouldBlock()\n },\n get withResolver() {\n return opts.blockerFn === undefined\n },\n }\n}\n\nexport function useBlocker<\n TRouter extends AnyRouter = RegisteredRouter,\n TWithResolver extends boolean = false,\n>(\n opts: UseBlockerOpts<TRouter, TWithResolver>,\n): TWithResolver extends true ? Solid.Accessor<BlockerResolver<TRouter>> : void\n\n/**\n * @deprecated Use the shouldBlockFn property instead\n */\nexport function useBlocker(\n blockerFnOrOpts?: LegacyBlockerOpts,\n): Solid.Accessor<BlockerResolver>\n\n/**\n * @deprecated Use the UseBlockerOpts object syntax instead\n */\nexport function useBlocker(\n blockerFn?: LegacyBlockerFn,\n condition?: boolean | any,\n): Solid.Accessor<BlockerResolver>\n\nexport function useBlocker(\n opts?: UseBlockerOpts | LegacyBlockerOpts | LegacyBlockerFn,\n condition?: boolean | any,\n): Solid.Accessor<BlockerResolver> | void {\n const props = Solid.merge(\n {\n enableBeforeUnload: true,\n disabled: false,\n withResolver: false,\n },\n _resolveBlockerOpts(opts, condition),\n )\n\n const router = useRouter()\n\n const [resolver, setResolver] = Solid.createSignal<BlockerResolver>({\n status: 'idle',\n current: undefined,\n next: undefined,\n action: undefined,\n proceed: undefined,\n reset: undefined,\n })\n\n let disposeBlock: (() => void) | undefined\n\n Solid.createEffect(\n () => props.disabled,\n (disabled) => {\n // Dispose previous blocker registration when re-running\n disposeBlock?.()\n disposeBlock = undefined\n\n if (disabled) {\n return\n }\n\n const blockerFnComposed = async (blockerFnArgs: BlockerFnArgs) => {\n function getLocation(\n location: HistoryLocation,\n ): AnyShouldBlockFnLocation {\n const parsedLocation = router.parseLocation(location)\n const matchedRoutes = router.getMatchedRoutes(parsedLocation.pathname)\n if (matchedRoutes.foundRoute === undefined) {\n return {\n routeId: '__notFound__',\n fullPath: parsedLocation.pathname,\n pathname: parsedLocation.pathname,\n params: matchedRoutes.routeParams,\n search: parsedLocation.search,\n }\n }\n return {\n routeId: matchedRoutes.foundRoute.id,\n fullPath: matchedRoutes.foundRoute.fullPath,\n pathname: parsedLocation.pathname,\n params: matchedRoutes.routeParams,\n search: parsedLocation.search,\n }\n }\n\n const current = getLocation(blockerFnArgs.currentLocation)\n const next = getLocation(blockerFnArgs.nextLocation)\n\n if (\n current.routeId === '__notFound__' &&\n next.routeId !== '__notFound__'\n ) {\n return false\n }\n\n const shouldBlock = await props.shouldBlockFn({\n action: blockerFnArgs.action,\n current,\n next,\n })\n if (!props.withResolver) {\n return shouldBlock\n }\n\n if (!shouldBlock) {\n return false\n }\n\n const promise = new Promise<boolean>((resolve) => {\n setResolver({\n status: 'blocked',\n current,\n next,\n action: blockerFnArgs.action,\n proceed: () => resolve(false),\n reset: () => resolve(true),\n })\n })\n\n const canNavigateAsync = await promise\n setResolver({\n status: 'idle',\n current: undefined,\n next: undefined,\n action: undefined,\n proceed: undefined,\n reset: undefined,\n })\n\n return canNavigateAsync\n }\n\n disposeBlock = router.history.block({\n blockerFn: blockerFnComposed,\n enableBeforeUnload: props.enableBeforeUnload,\n })\n },\n )\n\n // Clean up on unmount\n Solid.onSettled(() => {\n return () => {\n disposeBlock?.()\n disposeBlock = undefined\n }\n })\n\n return resolver\n}\n\nconst _resolvePromptBlockerArgs = (\n props: PromptProps | LegacyPromptProps,\n): UseBlockerOpts => {\n if ('shouldBlockFn' in props) {\n return props\n }\n\n const shouldBlock = Solid.createMemo(() => Boolean(props.condition ?? true))\n\n const _customBlockerFn = async () => {\n if (shouldBlock() && props.blockerFn !== undefined) {\n return await props.blockerFn()\n }\n return shouldBlock\n }\n\n return {\n shouldBlockFn: _customBlockerFn,\n get enableBeforeUnload() {\n return shouldBlock()\n },\n get withResolver() {\n return props.blockerFn === undefined\n },\n }\n}\n\ninterface BlockComponent {\n <\n TRouter extends AnyRouter = RegisteredRouter,\n TWithResolver extends boolean = boolean,\n >(\n opts: PromptProps<TRouter, TWithResolver>,\n ): SolidNode\n /**\n * @deprecated Use the UseBlockerOpts property instead\n */\n (opts: LegacyPromptProps): SolidNode\n}\n\nexport const Block: BlockComponent = function Block(\n opts: PromptProps | LegacyPromptProps,\n): SolidNode {\n const propsWithChildren = {\n get children() {\n return opts.children\n },\n }\n const args = _resolvePromptBlockerArgs(opts)\n\n const resolver = useBlocker(args)\n const children = Solid.createMemo(() => {\n const child = propsWithChildren.children\n if (resolver && typeof child === 'function') return child(resolver())\n return child\n })\n\n return <>{children()}</>\n}\n\ntype LegacyPromptProps = {\n blockerFn?: LegacyBlockerFn\n condition?: boolean | any\n children?: SolidNode | ((params: BlockerResolver) => SolidNode)\n}\n\ntype PromptProps<\n TRouter extends AnyRouter = RegisteredRouter,\n TWithResolver extends boolean = boolean,\n TParams = TWithResolver extends true ? BlockerResolver<TRouter> : void,\n> = UseBlockerOpts<TRouter, TWithResolver> & {\n children?: SolidNode | ((params: TParams) => SolidNode)\n}\n"],"mappings":";;;;AAoFA,SAAS6C,oBACPC,MACAF,WACgB;AAChB,KAAIE,SAASC,KAAAA,EACX,QAAO;EACLX,qBAAqB;EACrBG,cAAc;EACf;AAGH,KAAI,mBAAmBO,KACrB,QAAOA;AAGT,KAAI,OAAOA,SAAS,YAAY;EAC9B,MAAME,cAAcC,QAAQL,aAAa,KAAK;EAE9C,MAAMM,mBAAmB,YAAY;AACnC,OAAIF,YAAa,QAAO,MAAMF,MAAM;AACpC,UAAO;;AAGT,SAAO;GACLV,eAAec;GACfb,oBAAoBW;GACpBT,cAAc;GACf;;CAGH,MAAMS,cAAchD,MAAMmD,iBAAiBF,QAAQH,KAAKF,aAAa,KAAK,CAAC;CAE3E,MAAMM,mBAAmB,YAAY;AACnC,MAAIF,aAAa,IAAIF,KAAKH,cAAcI,KAAAA,EACtC,QAAO,M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W;CACX,MAAMyC,oBAAoB,EACxB,IAAIC,WAAW;AACb,SAAO1C,KAAK0C;IAEf;CAGD,MAAM9B,WAAWN,WAFJ8B,0BAA0BpC,KAAK,CAEX;AAOjC,QAAA4C,KANiB1F,MAAMmD,iBAAiB;EACtC,MAAMsC,QAAQF,kBAAkBC;AAChC,MAAI9B,YAAY,OAAO+B,UAAU,WAAY,QAAOA,MAAM/B,UAAU,CAAC;AACrE,SAAO+B;GACP,CAEgB"}
1
+ {"version":3,"file":"useBlocker.js","names":["Solid","useRouter","BlockerFnArgs","HistoryAction","HistoryLocation","SolidNode","AnyRoute","AnyRouter","ParseRoute","RegisteredRouter","ShouldBlockFnLocation","routeId","TRouteId","fullPath","TFullPath","pathname","params","TAllParams","search","TFullSearchSchema","AnyShouldBlockFnLocation","MakeShouldBlockFnLocationUnion","TRouter","TRoute","BlockerResolver","status","current","next","action","proceed","reset","ShouldBlockFnArgs","ShouldBlockFn","args","Promise","UseBlockerOpts","shouldBlockFn","enableBeforeUnload","disabled","withResolver","TWithResolver","LegacyBlockerFn","LegacyBlockerOpts","blockerFn","condition","_resolveBlockerOpts","opts","undefined","shouldBlock","Boolean","_customBlockerFn","createMemo","useBlocker","Accessor","blockerFnOrOpts","props","merge","router","resolver","setResolver","createSignal","disposeBlock","createEffect","blockerFnComposed","blockerFnArgs","getLocation","location","parsedLocation","parseLocation","matchedRoutes","getMatchedRoutes","foundRoute","routeParams","id","currentLocation","nextLocation","promise","resolve","canNavigateAsync","history","block","onSettled","_resolvePromptBlockerArgs","PromptProps","LegacyPromptProps","BlockComponent","Block","propsWithChildren","children","child","_$memo","TParams"],"sources":["../../src/useBlocker.tsx"],"sourcesContent":["import * as Solid from 'solid-js'\nimport { useRouter } from './useRouter'\nimport type {\n BlockerFnArgs,\n HistoryAction,\n HistoryLocation,\n} from '@tanstack/history'\nimport type { SolidNode } from './route'\nimport type {\n AnyRoute,\n AnyRouter,\n ParseRoute,\n RegisteredRouter,\n} from '@tanstack/router-core'\n\ntype ShouldBlockFnLocation<\n out TRouteId,\n out TFullPath,\n out TAllParams,\n out TFullSearchSchema,\n> = {\n routeId: TRouteId\n fullPath: TFullPath\n pathname: string\n params: TAllParams\n search: TFullSearchSchema\n}\n\ntype AnyShouldBlockFnLocation = ShouldBlockFnLocation<any, any, any, any>\ntype MakeShouldBlockFnLocationUnion<\n TRouter extends AnyRouter = RegisteredRouter,\n TRoute extends AnyRoute = ParseRoute<TRouter['routeTree']>,\n> = TRoute extends any\n ? ShouldBlockFnLocation<\n TRoute['id'],\n TRoute['fullPath'],\n TRoute['types']['allParams'],\n TRoute['types']['fullSearchSchema']\n >\n : never\n\ntype BlockerResolver<TRouter extends AnyRouter = RegisteredRouter> =\n | {\n status: 'blocked'\n current: MakeShouldBlockFnLocationUnion<TRouter>\n next: MakeShouldBlockFnLocationUnion<TRouter>\n action: HistoryAction\n proceed: () => void\n reset: () => void\n }\n | {\n status: 'idle'\n current: undefined\n next: undefined\n action: undefined\n proceed: undefined\n reset: undefined\n }\n\ntype ShouldBlockFnArgs<TRouter extends AnyRouter = RegisteredRouter> = {\n current: MakeShouldBlockFnLocationUnion<TRouter>\n next: MakeShouldBlockFnLocationUnion<TRouter>\n action: HistoryAction\n}\n\nexport type ShouldBlockFn<TRouter extends AnyRouter = RegisteredRouter> = (\n args: ShouldBlockFnArgs<TRouter>,\n) => boolean | Promise<boolean>\nexport type UseBlockerOpts<\n TRouter extends AnyRouter = RegisteredRouter,\n TWithResolver extends boolean = boolean,\n> = {\n shouldBlockFn: ShouldBlockFn<TRouter>\n enableBeforeUnload?: boolean | (() => boolean)\n disabled?: boolean\n withResolver?: TWithResolver\n}\n\ntype LegacyBlockerFn = () => Promise<any> | any\ntype LegacyBlockerOpts = {\n blockerFn?: LegacyBlockerFn\n condition?: boolean | any\n}\n\nfunction _resolveBlockerOpts(\n opts?: UseBlockerOpts | LegacyBlockerOpts | LegacyBlockerFn,\n condition?: boolean | any,\n): UseBlockerOpts {\n if (opts === undefined) {\n return {\n shouldBlockFn: () => true,\n withResolver: false,\n }\n }\n\n if ('shouldBlockFn' in opts) {\n return opts\n }\n\n if (typeof opts === 'function') {\n const shouldBlock = Boolean(condition ?? true)\n\n const _customBlockerFn = async () => {\n if (shouldBlock) return await opts()\n return false\n }\n\n return {\n shouldBlockFn: _customBlockerFn,\n enableBeforeUnload: shouldBlock,\n withResolver: false,\n }\n }\n\n const shouldBlock = Solid.createMemo(() => Boolean(opts.condition ?? true))\n\n const _customBlockerFn = async () => {\n if (shouldBlock() && opts.blockerFn !== undefined) {\n return await opts.blockerFn()\n }\n return shouldBlock()\n }\n\n return {\n get shouldBlockFn() {\n return _customBlockerFn\n },\n get enableBeforeUnload() {\n return shouldBlock()\n },\n get withResolver() {\n return opts.blockerFn === undefined\n },\n }\n}\n\nexport function useBlocker<\n TRouter extends AnyRouter = RegisteredRouter,\n TWithResolver extends boolean = false,\n>(\n opts: UseBlockerOpts<TRouter, TWithResolver>,\n): TWithResolver extends true ? Solid.Accessor<BlockerResolver<TRouter>> : void\n\n/**\n * @deprecated Use the shouldBlockFn property instead\n */\nexport function useBlocker(\n blockerFnOrOpts?: LegacyBlockerOpts,\n): Solid.Accessor<BlockerResolver>\n\n/**\n * @deprecated Use the UseBlockerOpts object syntax instead\n */\nexport function useBlocker(\n blockerFn?: LegacyBlockerFn,\n condition?: boolean | any,\n): Solid.Accessor<BlockerResolver>\n\nexport function useBlocker(\n opts?: UseBlockerOpts | LegacyBlockerOpts | LegacyBlockerFn,\n condition?: boolean | any,\n): Solid.Accessor<BlockerResolver> | void {\n const props = Solid.merge(\n {\n enableBeforeUnload: true,\n disabled: false,\n withResolver: false,\n },\n _resolveBlockerOpts(opts, condition),\n )\n\n const router = useRouter()\n\n const [resolver, setResolver] = Solid.createSignal<BlockerResolver>({\n status: 'idle',\n current: undefined,\n next: undefined,\n action: undefined,\n proceed: undefined,\n reset: undefined,\n })\n\n let disposeBlock: (() => void) | undefined\n\n Solid.createEffect(\n () => props.disabled,\n (disabled) => {\n // Dispose previous blocker registration when re-running\n disposeBlock?.()\n disposeBlock = undefined\n\n if (disabled) {\n return\n }\n\n const blockerFnComposed = async (blockerFnArgs: BlockerFnArgs) => {\n function getLocation(\n location: HistoryLocation,\n ): AnyShouldBlockFnLocation {\n const parsedLocation = router.parseLocation(location)\n const matchedRoutes = router.getMatchedRoutes(parsedLocation.pathname)\n if (matchedRoutes.foundRoute === undefined) {\n return {\n routeId: '__notFound__',\n fullPath: parsedLocation.pathname,\n pathname: parsedLocation.pathname,\n params: matchedRoutes.routeParams,\n search: parsedLocation.search,\n }\n }\n return {\n routeId: matchedRoutes.foundRoute.id,\n fullPath: matchedRoutes.foundRoute.fullPath,\n pathname: parsedLocation.pathname,\n params: matchedRoutes.routeParams,\n search: parsedLocation.search,\n }\n }\n\n const current = getLocation(blockerFnArgs.currentLocation)\n const next = getLocation(blockerFnArgs.nextLocation)\n\n if (\n current.routeId === '__notFound__' &&\n next.routeId !== '__notFound__'\n ) {\n return false\n }\n\n const shouldBlock = await props.shouldBlockFn({\n action: blockerFnArgs.action,\n current,\n next,\n })\n if (!props.withResolver) {\n return shouldBlock\n }\n\n if (!shouldBlock) {\n return false\n }\n\n const promise = new Promise<boolean>((resolve) => {\n setResolver({\n status: 'blocked',\n current,\n next,\n action: blockerFnArgs.action,\n proceed: () => resolve(false),\n reset: () => resolve(true),\n })\n })\n\n const canNavigateAsync = await promise\n setResolver({\n status: 'idle',\n current: undefined,\n next: undefined,\n action: undefined,\n proceed: undefined,\n reset: undefined,\n })\n\n return canNavigateAsync\n }\n\n disposeBlock = router.history.block({\n blockerFn: blockerFnComposed,\n enableBeforeUnload: props.enableBeforeUnload,\n })\n },\n )\n\n // Clean up on unmount\n Solid.onSettled(() => {\n return () => {\n disposeBlock?.()\n disposeBlock = undefined\n }\n })\n\n return resolver\n}\n\nconst _resolvePromptBlockerArgs = (\n props: PromptProps | LegacyPromptProps,\n): UseBlockerOpts => {\n if ('shouldBlockFn' in props) {\n return props\n }\n\n const shouldBlock = Solid.createMemo(() => Boolean(props.condition ?? true))\n\n const _customBlockerFn = async () => {\n if (shouldBlock() && props.blockerFn !== undefined) {\n return await props.blockerFn()\n }\n return shouldBlock\n }\n\n return {\n shouldBlockFn: _customBlockerFn,\n get enableBeforeUnload() {\n return shouldBlock()\n },\n get withResolver() {\n return props.blockerFn === undefined\n },\n }\n}\n\ninterface BlockComponent {\n <\n TRouter extends AnyRouter = RegisteredRouter,\n TWithResolver extends boolean = boolean,\n >(\n opts: PromptProps<TRouter, TWithResolver>,\n ): SolidNode\n /**\n * @deprecated Use the UseBlockerOpts property instead\n */\n (opts: LegacyPromptProps): SolidNode\n}\n\nexport const Block: BlockComponent = function Block(\n opts: PromptProps | LegacyPromptProps,\n): SolidNode {\n const propsWithChildren = {\n get children() {\n return opts.children\n },\n }\n const args = _resolvePromptBlockerArgs(opts)\n\n const resolver = useBlocker(args)\n const children = Solid.createMemo(() => {\n const child = propsWithChildren.children\n if (resolver && typeof child === 'function') return child(resolver())\n return child\n })\n\n return <>{children()}</>\n}\n\ntype LegacyPromptProps = {\n blockerFn?: LegacyBlockerFn\n condition?: boolean | any\n children?: SolidNode | ((params: BlockerResolver) => SolidNode)\n}\n\ntype PromptProps<\n TRouter extends AnyRouter = RegisteredRouter,\n TWithResolver extends boolean = boolean,\n TParams = TWithResolver extends true ? BlockerResolver<TRouter> : void,\n> = UseBlockerOpts<TRouter, TWithResolver> & {\n children?: SolidNode | ((params: TParams) => SolidNode)\n}\n"],"mappings":";;;;AAoFA,SAAS6C,oBACPC,MACAF,WACgB;AAChB,KAAIE,SAASC,KAAAA,EACX,QAAO;EACLX,qBAAqB;EACrBG,cAAc;EACf;AAGH,KAAI,mBAAmBO,KACrB,QAAOA;AAGT,KAAI,OAAOA,SAAS,YAAY;EAC9B,MAAME,cAAcC,QAAQL,aAAa,KAAK;EAE9C,MAAMM,mBAAmB,YAAY;AACnC,OAAIF,YAAa,QAAO,MAAMF,MAAM;AACpC,UAAO;;AAG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AAO,MAAMQ,MAAMZ,WAAW;AAEhC,SAAOK;;AAGT,QAAO;EACLZ,eAAec;EACf,IAAIb,qBAAqB;AACvB,UAAOW,aAAa;;EAEtB,IAAIT,eAAe;AACjB,UAAOgB,MAAMZ,cAAcI,KAAAA;;EAE9B;;AAgBH,IAAauC,QAAwB,SAASA,MAC5CxC,MACW;CACX,MAAMyC,oBAAoB,EACxB,IAAIC,WAAW;AACb,SAAO1C,KAAK0C;IAEf;CAGD,MAAM9B,WAAWN,WAFJ8B,0BAA0BpC,KAAK,CAEX;AAOjC,QAAA4C,KANiB1F,MAAMmD,iBAAiB;EACtC,MAAMsC,QAAQF,kBAAkBC;AAChC,MAAI9B,YAAY,OAAO+B,UAAU,WAAY,QAAOA,MAAM/B,UAAU,CAAC;AACrE,SAAO+B;GACP,CAEgB"}
@@ -1,8 +1,7 @@
1
1
  import { useRouter } from "./useRouter.js";
2
2
  import { nearestMatchContext } from "./matchContext.js";
3
- import { replaceEqualDeep } from "@tanstack/router-core";
3
+ import { invariant, replaceEqualDeep } from "@tanstack/router-core";
4
4
  import * as Solid from "solid-js";
5
- import invariant from "tiny-invariant";
6
5
  //#region src/useMatch.tsx
7
6
  function useMatch(opts) {
8
7
  const router = useRouter();
@@ -23,7 +22,10 @@ function useMatch(opts) {
23
22
  if (selectedMatch === void 0) {
24
23
  const hasPendingMatch = opts.from ? Boolean(router.stores.pendingRouteIds.state[opts.from]) : nearestMatch?.hasPending() ?? false;
25
24
  const isTransitioning = router.stores.isTransitioning.state;
26
- invariant(!(!hasPendingMatch && !isTransitioning && (opts.shouldThrow ?? true)), `Could not find ${opts.from ? `an active match from "${opts.from}"` : "a nearest match!"}`);
25
+ if (!hasPendingMatch && !isTransitioning && (opts.shouldThrow ?? true)) {
26
+ if (process.env.NODE_ENV !== "production") throw new Error(`Invariant failed: Could not find ${opts.from ? `an active match from "${opts.from}"` : "a nearest match!"}`);
27
+ invariant();
28
+ }
27
29
  return;
28
30
  }
29
31
  const res = opts.select ? opts.select(selectedMatch) : selectedMatch;
@@ -1 +1 @@
1
- {"version":3,"file":"useMatch.js","names":["Solid","invariant","replaceEqualDeep","nearestMatchContext","useRouter","AnyRouter","MakeRouteMatch","MakeRouteMatchUnion","RegisteredRouter","StrictOrFrom","ThrowConstraint","ThrowOrOptional","UseMatchBaseOptions","select","match","TRouter","TFrom","TStrict","TSelected","shouldThrow","TThrow","UseMatchRoute","opts","Accessor","UseMatchResult","UseMatchOptions","useMatch","router","nearestMatch","from","undefined","useContext","ids","stores","matchesId","state","id","matchStore","activeMatchStoresById","get","routeId","createMemo","prev","selectedMatch","hasPendingMatch","Boolean","pendingRouteIds","hasPending","isTransitioning","res"],"sources":["../../src/useMatch.tsx"],"sourcesContent":["import * as Solid from 'solid-js'\nimport invariant from 'tiny-invariant'\nimport { replaceEqualDeep } from '@tanstack/router-core'\nimport { nearestMatchContext } from './matchContext'\nimport { useRouter } from './useRouter'\nimport type {\n AnyRouter,\n MakeRouteMatch,\n MakeRouteMatchUnion,\n RegisteredRouter,\n StrictOrFrom,\n ThrowConstraint,\n ThrowOrOptional,\n} from '@tanstack/router-core'\n\nexport interface UseMatchBaseOptions<\n TRouter extends AnyRouter,\n TFrom,\n TStrict extends boolean,\n TThrow extends boolean,\n TSelected,\n> {\n select?: (\n match: MakeRouteMatch<TRouter['routeTree'], TFrom, TStrict>,\n ) => TSelected\n shouldThrow?: TThrow\n}\n\nexport type UseMatchRoute<out TFrom> = <\n TRouter extends AnyRouter = RegisteredRouter,\n TSelected = unknown,\n>(\n opts?: UseMatchBaseOptions<TRouter, TFrom, true, true, TSelected>,\n) => Solid.Accessor<UseMatchResult<TRouter, TFrom, true, TSelected>>\n\nexport type UseMatchOptions<\n TRouter extends AnyRouter,\n TFrom extends string | undefined,\n TStrict extends boolean,\n TThrow extends boolean,\n TSelected,\n> = StrictOrFrom<TRouter, TFrom, TStrict> &\n UseMatchBaseOptions<TRouter, TFrom, TStrict, TThrow, TSelected>\n\nexport type UseMatchResult<\n TRouter extends AnyRouter,\n TFrom,\n TStrict extends boolean,\n TSelected,\n> = unknown extends TSelected\n ? TStrict extends true\n ? MakeRouteMatch<TRouter['routeTree'], TFrom, TStrict>\n : MakeRouteMatchUnion<TRouter>\n : TSelected\n\nexport function useMatch<\n TRouter extends AnyRouter = RegisteredRouter,\n const TFrom extends string | undefined = undefined,\n TStrict extends boolean = true,\n TThrow extends boolean = true,\n TSelected = unknown,\n>(\n opts: UseMatchOptions<\n TRouter,\n TFrom,\n TStrict,\n ThrowConstraint<TStrict, TThrow>,\n TSelected\n >,\n): Solid.Accessor<\n ThrowOrOptional<UseMatchResult<TRouter, TFrom, TStrict, TSelected>, TThrow>\n> {\n const router = useRouter<TRouter>()\n const nearestMatch = opts.from\n ? undefined\n : Solid.useContext(nearestMatchContext)\n\n const match = () => {\n if (opts.from) {\n const ids = router.stores.matchesId.state\n for (const id of ids) {\n const matchStore = router.stores.activeMatchStoresById.get(id)\n if (matchStore?.routeId === opts.from) {\n return matchStore.state\n }\n }\n\n return undefined\n }\n\n return nearestMatch?.match()\n }\n\n return Solid.createMemo((prev: TSelected | undefined) => {\n const selectedMatch = match()\n\n if (selectedMatch === undefined) {\n const hasPendingMatch = opts.from\n ? Boolean(router.stores.pendingRouteIds.state[opts.from!])\n : (nearestMatch?.hasPending() ?? false)\n const isTransitioning = router.stores.isTransitioning.state\n\n invariant(\n !(!hasPendingMatch && !isTransitioning && (opts.shouldThrow ?? true)),\n `Could not find ${opts.from ? `an active match from \"${opts.from}\"` : 'a nearest match!'}`,\n )\n return undefined\n }\n\n const res = opts.select ? opts.select(selectedMatch as any) : selectedMatch\n if (prev === undefined) return res as TSelected\n return replaceEqualDeep(prev, res) as TSelected\n }) as any\n}\n"],"mappings":";;;;;;AAuDA,SAAgB0B,SAOdJ,MASA;CACA,MAAMK,SAASvB,WAAoB;CACnC,MAAMwB,eAAeN,KAAKO,OACtBC,KAAAA,IACA9B,MAAM+B,WAAW5B,oBAAoB;CAEzC,MAAMW,cAAc;AAClB,MAAIQ,KAAKO,MAAM;GACb,MAAMG,MAAML,OAAOM,OAAOC,UAAUC;AACpC,QAAK,MAAMC,MAAMJ,KAAK;IACpB,MAAMK,aAAaV,OAAOM,OAAOK,sBAAsBC,IAAIH,GAAG;AAC9D,QAAIC,YAAYG,YAAYlB,KAAKO,KAC/B,QAAOQ,WAAWF;;AAItB;;AAGF,SAAOP,cAAcd,OAAO;;AAG9B,QAAOd,MAAMyC,YAAYC,SAAgC;EACvD,MAAMC,gBAAgB7B,OAAO;AAE7B,MAAI6B,kBAAkBb,KAAAA,GAAW;GAC/B,MAAMc,kBAAkBtB,KAAKO,OACzBgB,QAAQlB,OAAOM,OAAOa,gBAAgBX,MAAMb,KAAKO,MAAO,GACvDD,cAAcmB,YAAY,IAAI;GACnC,MAAMC,kBAAkBrB,OAAOM,OAAOe,gBAAgBb;AAEtDlC,aACE,EAAE,CAAC2C,mBAAmB,CAACI,oBAAoB1B,KAAKH,eAAe,QAC/D,kBAAkBG,KAAKO,OAAO,yBAAyBP,KAAKO,KAAI,KAAM,qBACvE;AACD;;EAGF,MAAMoB,MAAM3B,KAAKT,SAASS,KAAKT,OAAO8B,cAAqB,GAAGA;AAC9D,MAAID,SAASZ,KAAAA,EAAW,QAAOmB;AAC/B,SAAO/C,iBAAiBwC,MAAMO,IAAI;GAClC"}
1
+ {"version":3,"file":"useMatch.js","names":["Solid","invariant","replaceEqualDeep","nearestMatchContext","useRouter","AnyRouter","MakeRouteMatch","MakeRouteMatchUnion","RegisteredRouter","StrictOrFrom","ThrowConstraint","ThrowOrOptional","UseMatchBaseOptions","select","match","TRouter","TFrom","TStrict","TSelected","shouldThrow","TThrow","UseMatchRoute","opts","Accessor","UseMatchResult","UseMatchOptions","useMatch","router","nearestMatch","from","undefined","useContext","ids","stores","matchesId","state","id","matchStore","activeMatchStoresById","get","routeId","createMemo","prev","selectedMatch","hasPendingMatch","Boolean","pendingRouteIds","hasPending","isTransitioning","process","env","NODE_ENV","Error","res"],"sources":["../../src/useMatch.tsx"],"sourcesContent":["import * as Solid from 'solid-js'\nimport { invariant, replaceEqualDeep } from '@tanstack/router-core'\nimport { nearestMatchContext } from './matchContext'\nimport { useRouter } from './useRouter'\nimport type {\n AnyRouter,\n MakeRouteMatch,\n MakeRouteMatchUnion,\n RegisteredRouter,\n StrictOrFrom,\n ThrowConstraint,\n ThrowOrOptional,\n} from '@tanstack/router-core'\n\nexport interface UseMatchBaseOptions<\n TRouter extends AnyRouter,\n TFrom,\n TStrict extends boolean,\n TThrow extends boolean,\n TSelected,\n> {\n select?: (\n match: MakeRouteMatch<TRouter['routeTree'], TFrom, TStrict>,\n ) => TSelected\n shouldThrow?: TThrow\n}\n\nexport type UseMatchRoute<out TFrom> = <\n TRouter extends AnyRouter = RegisteredRouter,\n TSelected = unknown,\n>(\n opts?: UseMatchBaseOptions<TRouter, TFrom, true, true, TSelected>,\n) => Solid.Accessor<UseMatchResult<TRouter, TFrom, true, TSelected>>\n\nexport type UseMatchOptions<\n TRouter extends AnyRouter,\n TFrom extends string | undefined,\n TStrict extends boolean,\n TThrow extends boolean,\n TSelected,\n> = StrictOrFrom<TRouter, TFrom, TStrict> &\n UseMatchBaseOptions<TRouter, TFrom, TStrict, TThrow, TSelected>\n\nexport type UseMatchResult<\n TRouter extends AnyRouter,\n TFrom,\n TStrict extends boolean,\n TSelected,\n> = unknown extends TSelected\n ? TStrict extends true\n ? MakeRouteMatch<TRouter['routeTree'], TFrom, TStrict>\n : MakeRouteMatchUnion<TRouter>\n : TSelected\n\nexport function useMatch<\n TRouter extends AnyRouter = RegisteredRouter,\n const TFrom extends string | undefined = undefined,\n TStrict extends boolean = true,\n TThrow extends boolean = true,\n TSelected = unknown,\n>(\n opts: UseMatchOptions<\n TRouter,\n TFrom,\n TStrict,\n ThrowConstraint<TStrict, TThrow>,\n TSelected\n >,\n): Solid.Accessor<\n ThrowOrOptional<UseMatchResult<TRouter, TFrom, TStrict, TSelected>, TThrow>\n> {\n const router = useRouter<TRouter>()\n const nearestMatch = opts.from\n ? undefined\n : Solid.useContext(nearestMatchContext)\n\n const match = () => {\n if (opts.from) {\n const ids = router.stores.matchesId.state\n for (const id of ids) {\n const matchStore = router.stores.activeMatchStoresById.get(id)\n if (matchStore?.routeId === opts.from) {\n return matchStore.state\n }\n }\n\n return undefined\n }\n\n return nearestMatch?.match()\n }\n\n return Solid.createMemo((prev: TSelected | undefined) => {\n const selectedMatch = match()\n\n if (selectedMatch === undefined) {\n const hasPendingMatch = opts.from\n ? Boolean(router.stores.pendingRouteIds.state[opts.from!])\n : (nearestMatch?.hasPending() ?? false)\n const isTransitioning = router.stores.isTransitioning.state\n\n if (!hasPendingMatch && !isTransitioning && (opts.shouldThrow ?? true)) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n `Invariant failed: Could not find ${opts.from ? `an active match from \"${opts.from}\"` : 'a nearest match!'}`,\n )\n }\n invariant()\n }\n return undefined\n }\n\n const res = opts.select ? opts.select(selectedMatch as any) : selectedMatch\n if (prev === undefined) return res as TSelected\n return replaceEqualDeep(prev, res) as TSelected\n }) as any\n}\n"],"mappings":";;;;;AAsDA,SAAgB0B,SAOdJ,MASA;CACA,MAAMK,SAASvB,WAAoB;CACnC,MAAMwB,eAAeN,KAAKO,OACtBC,KAAAA,IACA9B,MAAM+B,WAAW5B,oBAAoB;CAEzC,MAAMW,cAAc;AAClB,MAAIQ,KAAKO,MAAM;GACb,MAAMG,MAAML,OAAOM,OAAOC,UAAUC;AACpC,QAAK,MAAMC,MAAMJ,KAAK;IACpB,MAAMK,aAAaV,OAAOM,OAAOK,sBAAsBC,IAAIH,GAAG;AAC9D,QAAIC,YAAYG,YAAYlB,KAAKO,KAC/B,QAAOQ,WAAWF;;AAItB;;AAGF,SAAOP,cAAcd,OAAO;;AAG9B,QAAOd,MAAMyC,YAAYC,SAAgC;EACvD,MAAMC,gBAAgB7B,OAAO;AAE7B,MAAI6B,kBAAkBb,KAAAA,GAAW;GAC/B,MAAMc,kBAAkBtB,KAAKO,OACzBgB,QAAQlB,OAAOM,OAAOa,gBAAgBX,MAAMb,KAAKO,MAAO,GACvDD,cAAcmB,YAAY,IAAI;GACnC,MAAMC,kBAAkBrB,OAAOM,OAAOe,gBAAgBb;AAEtD,OAAI,CAACS,mBAAmB,CAACI,oBAAoB1B,KAAKH,eAAe,OAAO;AACtE,QAAA,QAAA,IAAA,aAA6B,aAC3B,OAAM,IAAIiC,MACR,oCAAoC9B,KAAKO,OAAO,yBAAyBP,KAAKO,KAAI,KAAM,qBACzF;AAEH5B,eAAW;;AAEb;;EAGF,MAAMoD,MAAM/B,KAAKT,SAASS,KAAKT,OAAO8B,cAAqB,GAAGA;AAC9D,MAAID,SAASZ,KAAAA,EAAW,QAAOuB;AAC/B,SAAOnD,iBAAiBwC,MAAMW,IAAI;GAClC"}
@@ -1,10 +1,11 @@
1
1
  import { routerContext } from "./routerContext.js";
2
2
  import * as Solid from "solid-js";
3
- import warning from "tiny-warning";
4
3
  //#region src/useRouter.tsx
5
4
  function useRouter(opts) {
6
5
  const value = Solid.useContext(routerContext);
7
- warning(!((opts?.warn ?? true) && !value), "useRouter must be used inside a <RouterProvider> component!");
6
+ if (process.env.NODE_ENV !== "production") {
7
+ if ((opts?.warn ?? true) && !value) console.warn("Warning: useRouter must be used inside a <RouterProvider> component!");
8
+ }
8
9
  return value;
9
10
  }
10
11
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"useRouter.js","names":["Solid","warning","routerContext","AnyRouter","RegisteredRouter","useRouter","opts","warn","TRouter","value","useContext"],"sources":["../../src/useRouter.tsx"],"sourcesContent":["import * as Solid from 'solid-js'\nimport warning from 'tiny-warning'\nimport { routerContext } from './routerContext'\nimport type { AnyRouter, RegisteredRouter } from '@tanstack/router-core'\n\nexport function useRouter<TRouter extends AnyRouter = RegisteredRouter>(opts?: {\n warn?: boolean\n}): TRouter {\n const value = Solid.useContext(routerContext as any)\n warning(\n !((opts?.warn ?? true) && !value),\n 'useRouter must be used inside a <RouterProvider> component!',\n )\n return value as any\n}\n"],"mappings":";;;;AAKA,SAAgBK,UAAwDC,MAE5D;CACV,MAAMG,QAAQT,MAAMU,WAAWR,cAAqB;AACpDD,SACE,GAAGK,MAAMC,QAAQ,SAAS,CAACE,QAC3B,8DACD;AACD,QAAOA"}
1
+ {"version":3,"file":"useRouter.js","names":["Solid","routerContext","AnyRouter","RegisteredRouter","useRouter","opts","warn","TRouter","value","useContext","process","env","NODE_ENV","console"],"sources":["../../src/useRouter.tsx"],"sourcesContent":["import * as Solid from 'solid-js'\nimport { routerContext } from './routerContext'\nimport type { AnyRouter, RegisteredRouter } from '@tanstack/router-core'\n\nexport function useRouter<TRouter extends AnyRouter = RegisteredRouter>(opts?: {\n warn?: boolean\n}): TRouter {\n const value = Solid.useContext(routerContext as any)\n if (process.env.NODE_ENV !== 'production') {\n if ((opts?.warn ?? true) && !value) {\n console.warn(\n 'Warning: useRouter must be used inside a <RouterProvider> component!',\n )\n }\n }\n return value as any\n}\n"],"mappings":";;;AAIA,SAAgBI,UAAwDC,MAE5D;CACV,MAAMG,QAAQR,MAAMS,WAAWR,cAAqB;AACpD,KAAA,QAAA,IAAA,aAA6B;OACtBI,MAAMC,QAAQ,SAAS,CAACE,MAC3BK,SAAQP,KACN,uEACD;;AAGL,QAAOE"}
@@ -1,7 +1,11 @@
1
+ import type { AssetCrossOriginConfig } from '@tanstack/router-core';
2
+ export interface HeadContentProps {
3
+ assetCrossOrigin?: AssetCrossOriginConfig;
4
+ }
1
5
  /**
2
6
  * @description The `HeadContent` component is used to render meta tags, links, and scripts for the current route.
3
7
  * When using full document hydration (hydrating from `<html>`), this component should be rendered in the `<body>`
4
8
  * to ensure it's part of the reactive tree and updates correctly during client-side navigation.
5
9
  * The component uses portals internally to render content into the `<head>` element.
6
10
  */
7
- export declare function HeadContent(): import("solid-js").JSX.Element;
11
+ export declare function HeadContent(props: HeadContentProps): import("solid-js").JSX.Element;
@@ -1,3 +1,4 @@
1
+ import type { HeadContentProps } from './HeadContent';
1
2
  /**
2
3
  * @description The `HeadContent` component is used to render meta tags, links, and scripts for the current route.
3
4
  * When using full document hydration (hydrating from `<html>`), this component should be rendered in the `<body>`
@@ -7,4 +8,4 @@
7
8
  * Development version: filters out dev styles link after hydration and
8
9
  * includes a fallback cleanup effect for hydration mismatch cases.
9
10
  */
10
- export declare function HeadContent(): import("solid-js").JSX.Element;
11
+ export declare function HeadContent(props: HeadContentProps): import("solid-js").JSX.Element;
@@ -14,8 +14,8 @@ const DEV_STYLES_ATTR = 'data-tanstack-router-dev-styles';
14
14
  * Development version: filters out dev styles link after hydration and
15
15
  * includes a fallback cleanup effect for hydration mismatch cases.
16
16
  */
17
- export function HeadContent() {
18
- const tags = useTags();
17
+ export function HeadContent(props) {
18
+ const tags = useTags(props.assetCrossOrigin);
19
19
  const hydrated = useHydrated();
20
20
  const router = useRouter();
21
21
  // Fallback cleanup for hydration mismatch cases
@@ -1 +1 @@
1
- {"version":3,"file":"HeadContent.dev.jsx","sourceRoot":"","sources":["../../src/HeadContent.dev.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACxD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAE5C,MAAM,eAAe,GAAG,iCAAiC,CAAA;AAEzD;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW;IACzB,MAAM,IAAI,GAAG,OAAO,EAAE,CAAA;IACtB,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAC9B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE1B,gDAAgD;IAChD,iFAA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C,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,eAAe,CAAC,CAAC,CAAA;QAC9D,CAAC;QACD,OAAO,IAAI,EAAE,CAAA;IACf,CAAC,CAAC,CAAA;IAEF,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,CACpB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,CAAC,CACxB;MAAA,CAAC,CAAC,GAAG,EAAE,EAAE;YACP,MAAM,CAAC,GAAG,GAAG,EAAS,CAAA;YACtB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAG,CAAA;QACpE,CAAC,CACH;IAAA,EAAE,GAAG,CAAC,CACP,CAAA;IAED,OAAO,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CACrC,OAAO,EAAE,CACV,CAAC,CAAC,CAAC,CACF,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,CACnD,CAAA;AACH,CAAC"}
@@ -9,8 +9,8 @@ import { useTags } from './headContentUtils';
9
9
  * to ensure it's part of the reactive tree and updates correctly during client-side navigation.
10
10
  * The component uses portals internally to render content into the `<head>` element.
11
11
  */
12
- export function HeadContent() {
13
- const tags = useTags();
12
+ export function HeadContent(props) {
13
+ const tags = useTags(props.assetCrossOrigin);
14
14
  const router = useRouter();
15
15
  const content = () => (<For each={tags()}>
16
16
  {(tag) => {
@@ -1 +1 @@
1
- {"version":3,"file":"HeadContent.jsx","sourceRoot":"","sources":["../../src/HeadContent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,QAA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SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAO5C;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAA;IAC5C,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE1B,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,CACpB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAChB;MAAA,CAAC,CAAC,GAAG,EAAE,EAAE;YACP,MAAM,CAAC,GAAG,GAAG,EAAS,CAAA;YACtB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAG,CAAA;QACpE,CAAC,CACH;IAAA,EAAE,GAAG,CAAC,CACP,CAAA;IAED,OAAO,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CACrC,OAAO,EAAE,CACV,CAAC,CAAC,CAAC,CACF,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,CACnD,CAAA;AACH,CAAC"}
@@ -1,12 +1,10 @@
1
1
  import * as Solid from 'solid-js';
2
- import invariant from 'tiny-invariant';
3
- import warning from 'tiny-warning';
4
- import { createControlledPromise, getLocationChangeInfo, isNotFound, isRedirect, rootRouteId, } from '@tanstack/router-core';
2
+ import { createControlledPromise, getLocationChangeInfo, invariant, isNotFound, isRedirect, rootRouteId, } from '@tanstack/router-core';
5
3
  import { isServer } from '@tanstack/router-core/isServer';
6
4
  import { Dynamic } from '@solidjs/web';
7
5
  import { CatchBoundary, ErrorComponent } from './CatchBoundary';
8
6
  import { useRouter } from './useRouter';
9
- import { CatchNotFound } from './not-found';
7
+ import { CatchNotFound, getNotFound } from './not-found';
10
8
  import { nearestMatchContext } from './matchContext';
11
9
  import { SafeFragment } from './SafeFragment';
12
10
  import { renderRouteNotFound } from './renderRouteNotFound';
@@ -78,20 +76,30 @@ export const Match = (props) => {
78
76
  resolvedNoSsr() ? undefined : (<Dynamic component={resolvePendingComponent()}/>)}>
79
77
  <Dynamic component={ResolvedCatchBoundary()} getResetKey={() => router.stores.loadedAt.state} errorComponent={routeErrorComponent() || ErrorComponent} onCatch={(error) => {
80
78
  // Forward not found errors (we don't want to show the error component for these)
81
- if (isNotFound(error))
82
- throw error;
83
- warning(false, `Error in route match: ${currentMatchState().routeId}`);
79
+ const notFoundError = getNotFound(error);
80
+ if (notFoundError) {
81
+ notFoundError.routeId ?? (notFoundError.routeId = currentMatchState()
82
+ .routeId);
83
+ throw notFoundError;
84
+ }
85
+ if (process.env.NODE_ENV !== 'production') {
86
+ console.warn(`Warning: Error in route match: ${currentMatchState().routeId}`);
87
+ }
84
88
  routeOnCatch()?.(error);
85
89
  }}>
86
90
  <Dynamic component={ResolvedNotFoundBoundary()} fallback={(error) => {
91
+ const notFoundError = getNotFound(error) ?? error;
92
+ notFoundError.routeId ?? (notFoundError.routeId = currentMatchState()
93
+ .routeId);
87
94
  // If the current not found handler doesn't exist or it has a
88
95
  // route ID which doesn't match the current route, rethrow the error
89
96
  if (!routeNotFoundComponent() ||
90
- (error.routeId &&
91
- error.routeId !== currentMatchState().routeId) ||
92
- (!error.routeId && !route().isRoot))
93
- throw error;
94
- return (<Dynamic component={routeNotFoundComponent()} {...error}/>);
97
+ (notFoundError.routeId &&
98
+ notFoundError.routeId !==
99
+ currentMatchState().routeId) ||
100
+ (!notFoundError.routeId && !route().isRoot))
101
+ throw notFoundError;
102
+ return (<Dynamic component={routeNotFoundComponent()} {...notFoundError}/>);
95
103
  }}>
96
104
  <Solid.Switch>
97
105
  <Solid.Match when={resolvedNoSsr()}>
@@ -110,7 +118,8 @@ export const Match = (props) => {
110
118
 
111
119
  {currentMatchState().parentRouteId === rootRouteId ? (<>
112
120
  <OnRendered />
113
- <ScrollRestoration />
121
+ {router.options.scrollRestoration &&
122
+ (isServer ?? router.isServer) ? (<ScrollRestoration />) : null}
114
123
  </>) : null}
115
124
  </Dynamic>);
116
125
  }}
@@ -244,7 +253,12 @@ export const MatchInner = () => {
244
253
  <Solid.Match when={currentMatch().status === 'notFound'}>
245
254
  {(_) => {
246
255
  const matchError = Solid.untrack(() => currentMatch().error);
247
- invariant(isNotFound(matchError), 'Expected a notFound error');
256
+ if (!isNotFound(matchError)) {
257
+ if (process.env.NODE_ENV !== 'production') {
258
+ throw new Error('Invariant failed: Expected a notFound error');
259
+ }
260
+ invariant();
261
+ }
248
262
  // Use Show with keyed to ensure re-render when routeId changes
249
263
  return (<Solid.Show when={currentMatchState().routeId} keyed>
250
264
  {(_routeId) => Solid.untrack(() => renderRouteNotFound(router, route(), matchError))}
@@ -254,7 +268,12 @@ export const MatchInner = () => {
254
268
  <Solid.Match when={currentMatch().status === 'redirected'}>
255
269
  {(_) => {
256
270
  const matchError = Solid.untrack(() => currentMatch().error);
257
- invariant(isRedirect(matchError), 'Expected a redirect error');
271
+ if (!isRedirect(matchError)) {
272
+ if (process.env.NODE_ENV !== 'production') {
273
+ throw new Error('Invariant failed: Expected a redirect error');
274
+ }
275
+ invariant();
276
+ }
258
277
  return null;
259
278
  }}
260
279
  </Solid.Match>
@@ -1 +1 @@
1
- {"version":3,"file":"Match.jsx","sourceRoot":"","sources":["../../src/Match.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,UAAU,CAAA;AACjC,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,UAAU,EACV,UAAU,EACV,WAAW,GACZ,MAAM,uBA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