@tanstack/react-router 0.0.1-beta.74 → 0.0.1-beta.76

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.
@@ -184,7 +184,7 @@ function RouterProvider({
184
184
  ...rest
185
185
  }) {
186
186
  router$1.update(rest);
187
- const currentMatches = reactStore.useStore(router$1.store, s => s.currentMatches);
187
+ const currentMatches = reactStore.useStore(router$1.__store, s => s.currentMatches);
188
188
  React__namespace.useEffect(router$1.mount, [router$1]);
189
189
  return /*#__PURE__*/React__namespace.createElement(routerContext.Provider, {
190
190
  value: {
@@ -202,12 +202,12 @@ function RouterProvider({
202
202
  function useRouterContext() {
203
203
  const value = React__namespace.useContext(routerContext);
204
204
  router.warning(value, 'useRouter must be used inside a <Router> component!');
205
- reactStore.useStore(value.router.store);
205
+ reactStore.useStore(value.router.__store);
206
206
  return value.router;
207
207
  }
208
208
  function useRouter(track, shallow) {
209
209
  const router = useRouterContext();
210
- reactStore.useStore(router.store, track, shallow);
210
+ reactStore.useStore(router.__store, track, shallow);
211
211
  return router;
212
212
  }
213
213
  function useMatches() {
@@ -221,7 +221,7 @@ function useMatch(opts) {
221
221
  if (opts?.strict ?? true) {
222
222
  router.invariant(nearestMatch.route.id == match?.route.id, `useMatch("${match?.route.id}") is being called in a component that is meant to render the '${nearestMatch.route.id}' route. Did you mean to 'useMatch("${match?.route.id}", { strict: false })' or 'useRoute("${match?.route.id}")' instead?`);
223
223
  }
224
- reactStore.useStore(match.store, d => opts?.track?.(match) ?? match, opts?.shallow);
224
+ reactStore.useStore(match.__store, d => opts?.track?.(match) ?? match, opts?.shallow);
225
225
  return match;
226
226
  }
227
227
  function useRoute(routeId) {
@@ -231,13 +231,17 @@ function useRoute(routeId) {
231
231
  return resolvedRoute;
232
232
  }
233
233
  function useSearch(opts) {
234
- const match = useMatch(opts);
235
- reactStore.useStore(match.store, d => opts?.track?.(d.search) ?? d.search, true);
234
+ const {
235
+ track,
236
+ ...matchOpts
237
+ } = opts;
238
+ const match = useMatch(matchOpts);
239
+ reactStore.useStore(match.__store, d => opts?.track?.(d.search) ?? d.search, true);
236
240
  return match.state.search;
237
241
  }
238
242
  function useParams(opts) {
239
243
  const router$1 = useRouterContext();
240
- reactStore.useStore(router$1.store, d => {
244
+ reactStore.useStore(router$1.__store, d => {
241
245
  const params = router.last(d.currentMatches)?.params;
242
246
  return opts?.track?.(params) ?? params;
243
247
  }, true);
@@ -293,7 +297,7 @@ function SubOutlet({
293
297
  match
294
298
  }) {
295
299
  const router$1 = useRouterContext();
296
- reactStore.useStore(match.store, store => [store.status, store.error], true);
300
+ reactStore.useStore(match.__store, store => [store.status, store.error], true);
297
301
  const defaultPending = React__namespace.useCallback(() => null, []);
298
302
  const Inner = React__namespace.useCallback(props => {
299
303
  if (props.match.state.status === 'error') {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/index.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport {\n Route,\n RegisteredRoutesInfo,\n RegisteredRouter,\n RouterStore,\n last,\n warning,\n RouterOptions,\n RouteMatch,\n MatchRouteOptions,\n AnyRoutesInfo,\n DefaultRoutesInfo,\n functionalUpdate,\n RoutesInfo,\n ValidFromPath,\n LinkOptions,\n RouteByPath,\n ResolveRelativePath,\n NoInfer,\n ToOptions,\n invariant,\n Router,\n AnyRootRoute,\n RootRoute,\n AnyRouteMatch,\n NavigateOptions,\n RouterConstructorOptions,\n} from '@tanstack/router'\nimport { useStore } from '@tanstack/react-store'\n\n//\n\nexport * from '@tanstack/router'\n\nexport { useStore }\n\n//\n\ntype ReactNode = any\n\nexport type SyncRouteComponent<TProps = {}> = (props: TProps) => ReactNode\n\nexport type RouteComponent<TProps = {}> = SyncRouteComponent<TProps> & {\n preload?: () => Promise<void>\n}\n\nexport function lazy(\n importer: () => Promise<{ default: SyncRouteComponent }>,\n): RouteComponent {\n const lazyComp = React.lazy(importer as any)\n let preloaded: Promise<SyncRouteComponent>\n\n const finalComp = lazyComp as unknown as RouteComponent\n\n finalComp.preload = async () => {\n if (!preloaded) {\n await importer()\n }\n }\n\n return finalComp\n}\n\nexport type LinkPropsOptions<\n TFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TTo extends string = '',\n> = LinkOptions<RegisteredRoutesInfo, TFrom, TTo> & {\n // A function that returns additional props for the `active` state of this link. These props override other props passed to the link (`style`'s are merged, `className`'s are concatenated)\n activeProps?:\n | React.AnchorHTMLAttributes<HTMLAnchorElement>\n | (() => React.AnchorHTMLAttributes<HTMLAnchorElement>)\n // A function that returns additional props for the `inactive` state of this link. These props override other props passed to the link (`style`'s are merged, `className`'s are concatenated)\n inactiveProps?:\n | React.AnchorHTMLAttributes<HTMLAnchorElement>\n | (() => React.AnchorHTMLAttributes<HTMLAnchorElement>)\n}\n\nexport type MakeUseMatchRouteOptions<\n TFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TTo extends string = '',\n> = ToOptions<RegisteredRoutesInfo, TFrom, TTo> & MatchRouteOptions\n\nexport type MakeMatchRouteOptions<\n TFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TTo extends string = '',\n> = ToOptions<RegisteredRoutesInfo, TFrom, TTo> &\n MatchRouteOptions & {\n // If a function is passed as a child, it will be given the `isActive` boolean to aid in further styling on the element it returns\n children?:\n | ReactNode\n | ((\n params: RouteByPath<\n RegisteredRoutesInfo,\n ResolveRelativePath<TFrom, NoInfer<TTo>>\n >['__types']['allParams'],\n ) => ReactNode)\n }\n\nexport type MakeLinkPropsOptions<\n TFrom extends ValidFromPath<RegisteredRoutesInfo> = '/',\n TTo extends string = '',\n> = LinkPropsOptions<TFrom, TTo> & React.AnchorHTMLAttributes<HTMLAnchorElement>\n\nexport type MakeLinkOptions<\n TFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TTo extends string = '',\n> = LinkPropsOptions<TFrom, TTo> &\n React.AnchorHTMLAttributes<HTMLAnchorElement> &\n Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> & {\n // If a function is passed as a child, it will be given the `isActive` boolean to aid in further styling on the element it returns\n children?: ReactNode | ((state: { isActive: boolean }) => ReactNode)\n }\n\ndeclare module '@tanstack/router' {\n interface FrameworkGenerics {\n Component: RouteComponent\n ErrorComponent: RouteComponent<{\n error: Error\n info: { componentStack: string }\n }>\n }\n\n interface RouterOptions<TRouteTree> {\n // ssrFooter?: () => JSX.Element | Node\n }\n\n interface FrameworkRouteOptions {\n wrapInSuspense?: boolean\n }\n}\n\nexport type PromptProps = {\n message: string\n when?: boolean | any\n children?: ReactNode\n}\n\n//\n\nexport function useLinkProps<\n TFrom extends ValidFromPath<RegisteredRoutesInfo> = '/',\n TTo extends string = '',\n>(\n options: MakeLinkPropsOptions<TFrom, TTo>,\n): React.AnchorHTMLAttributes<HTMLAnchorElement> {\n const router = useRouterContext()\n\n const {\n // custom props\n type,\n children,\n target,\n activeProps = () => ({ className: 'active' }),\n inactiveProps = () => ({}),\n activeOptions,\n disabled,\n // fromCurrent,\n hash,\n search,\n params,\n to = '.',\n preload,\n preloadDelay,\n replace,\n // element props\n style,\n className,\n onClick,\n onFocus,\n onMouseEnter,\n onMouseLeave,\n onTouchStart,\n ...rest\n } = options\n\n const linkInfo = router.buildLink(options as any)\n\n if (linkInfo.type === 'external') {\n const { href } = linkInfo\n return { href }\n }\n\n const {\n handleClick,\n handleFocus,\n handleEnter,\n handleLeave,\n handleTouchStart,\n isActive,\n next,\n } = linkInfo\n\n const reactHandleClick = (e: Event) => {\n if (React.startTransition) {\n // This is a hack for react < 18\n React.startTransition(() => {\n handleClick(e)\n })\n } else {\n handleClick(e)\n }\n }\n\n const composeHandlers =\n (handlers: (undefined | ((e: any) => void))[]) =>\n (e: React.SyntheticEvent) => {\n if (e.persist) e.persist()\n handlers.filter(Boolean).forEach((handler) => {\n if (e.defaultPrevented) return\n handler!(e)\n })\n }\n\n // Get the active props\n const resolvedActiveProps: React.HTMLAttributes<HTMLAnchorElement> = isActive\n ? functionalUpdate(activeProps as any, {}) ?? {}\n : {}\n\n // Get the inactive props\n const resolvedInactiveProps: React.HTMLAttributes<HTMLAnchorElement> =\n isActive ? {} : functionalUpdate(inactiveProps, {}) ?? {}\n\n return {\n ...resolvedActiveProps,\n ...resolvedInactiveProps,\n ...rest,\n href: disabled ? undefined : next.href,\n onClick: composeHandlers([onClick, reactHandleClick]),\n onFocus: composeHandlers([onFocus, handleFocus]),\n onMouseEnter: composeHandlers([onMouseEnter, handleEnter]),\n onMouseLeave: composeHandlers([onMouseLeave, handleLeave]),\n onTouchStart: composeHandlers([onTouchStart, handleTouchStart]),\n target,\n style: {\n ...style,\n ...resolvedActiveProps.style,\n ...resolvedInactiveProps.style,\n },\n className:\n [\n className,\n resolvedActiveProps.className,\n resolvedInactiveProps.className,\n ]\n .filter(Boolean)\n .join(' ') || undefined,\n ...(disabled\n ? {\n role: 'link',\n 'aria-disabled': true,\n }\n : undefined),\n ['data-status']: isActive ? 'active' : undefined,\n }\n}\n\nexport interface LinkFn<\n TDefaultFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TDefaultTo extends string = '',\n> {\n <\n TFrom extends RegisteredRoutesInfo['routePaths'] = TDefaultFrom,\n TTo extends string = TDefaultTo,\n >(\n props: MakeLinkOptions<TFrom, TTo> & React.RefAttributes<HTMLAnchorElement>,\n ): ReactNode\n}\n\nexport const Link: LinkFn = React.forwardRef((props: any, ref) => {\n const linkProps = useLinkProps(props)\n\n return (\n <a\n {...{\n ref: ref as any,\n ...linkProps,\n children:\n typeof props.children === 'function'\n ? props.children({\n isActive: (linkProps as any)['data-status'] === 'active',\n })\n : props.children,\n }}\n />\n )\n}) as any\n\nexport function Navigate<\n TFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TTo extends string = '',\n>(props: NavigateOptions<RegisteredRoutesInfo, TFrom, TTo>): null {\n const router = useRouterContext()\n\n React.useLayoutEffect(() => {\n router.navigate(props as any)\n }, [])\n\n return null\n}\n\ntype MatchesContextValue = AnyRouteMatch[]\n\nexport const matchesContext = React.createContext<MatchesContextValue>(null!)\nexport const routerContext = React.createContext<{ router: RegisteredRouter }>(\n null!,\n)\n\nexport type MatchesProviderProps = {\n value: MatchesContextValue\n children: ReactNode\n}\n\nexport class ReactRouter<\n TRouteConfig extends AnyRootRoute = RootRoute,\n TRoutesInfo extends AnyRoutesInfo = RoutesInfo<TRouteConfig>,\n> extends Router<TRouteConfig, TRoutesInfo> {\n constructor(opts: RouterConstructorOptions<TRouteConfig>) {\n super({\n ...opts,\n loadComponent: async (component) => {\n if (component.preload) {\n await component.preload()\n }\n\n return component as any\n },\n })\n }\n}\n\nexport type RouterProps<\n TRouteConfig extends AnyRootRoute = RootRoute,\n TRoutesInfo extends AnyRoutesInfo = DefaultRoutesInfo,\n> = RouterOptions<TRouteConfig> & {\n router: Router<TRouteConfig, TRoutesInfo>\n}\n\nexport function RouterProvider<\n TRouteConfig extends AnyRootRoute = RootRoute,\n TRoutesInfo extends AnyRoutesInfo = DefaultRoutesInfo,\n>({ router, ...rest }: RouterProps<TRouteConfig, TRoutesInfo>) {\n router.update(rest)\n\n const currentMatches = useStore(router.store, (s) => s.currentMatches)\n\n React.useEffect(router.mount, [router])\n\n return (\n <routerContext.Provider value={{ router: router as any }}>\n <matchesContext.Provider value={[undefined!, ...currentMatches]}>\n <CatchBoundary\n errorComponent={ErrorComponent}\n onCatch={() => {\n warning(\n false,\n `Error in router! Consider setting an 'errorComponent' in your RootRoute! 👍`,\n )\n }}\n >\n <Outlet />\n </CatchBoundary>\n </matchesContext.Provider>\n </routerContext.Provider>\n )\n}\n\nexport function useRouterContext(): RegisteredRouter {\n const value = React.useContext(routerContext)\n warning(value, 'useRouter must be used inside a <Router> component!')\n\n useStore(value.router.store)\n\n return value.router\n}\n\nexport function useRouter<T = RouterStore>(\n track?: (state: Router['store']) => T,\n shallow?: boolean,\n): RegisteredRouter {\n const router = useRouterContext()\n useStore(router.store, track as any, shallow)\n return router\n}\n\nexport function useMatches(): RouteMatch[] {\n return React.useContext(matchesContext)\n}\n\nexport function useMatch<\n TFrom extends keyof RegisteredRoutesInfo['routesById'],\n TStrict extends boolean = true,\n TRouteMatch = RouteMatch<\n RegisteredRoutesInfo,\n RegisteredRoutesInfo['routesById'][TFrom]\n >,\n>(opts?: {\n from: TFrom\n strict?: TStrict\n track?: (match: TRouteMatch) => any\n shallow?: boolean\n}): TStrict extends true ? TRouteMatch : TRouteMatch | undefined {\n const router = useRouterContext()\n const nearestMatch = useMatches()[0]!\n const match = opts?.from\n ? router.state.currentMatches.find((d) => d.route.id === opts?.from)\n : nearestMatch\n\n invariant(\n match,\n `Could not find ${\n opts?.from ? `an active match from \"${opts.from}\"` : 'a nearest match!'\n }`,\n )\n\n if (opts?.strict ?? true) {\n invariant(\n nearestMatch.route.id == match?.route.id,\n `useMatch(\"${\n match?.route.id as string\n }\") is being called in a component that is meant to render the '${\n nearestMatch.route.id\n }' route. Did you mean to 'useMatch(\"${\n match?.route.id as string\n }\", { strict: false })' or 'useRoute(\"${\n match?.route.id as string\n }\")' instead?`,\n )\n }\n\n useStore(\n match!.store as any,\n (d) => opts?.track?.(match as any) ?? match,\n opts?.shallow,\n )\n\n return match as any\n}\n\nexport function useRoute<\n TId extends keyof RegisteredRoutesInfo['routesById'] = '/',\n>(routeId: TId): RegisteredRoutesInfo['routesById'][TId] {\n const router = useRouterContext()\n const resolvedRoute = router.getRoute(routeId as any)\n\n invariant(\n resolvedRoute,\n `Could not find a route for route \"${\n routeId as string\n }\"! Did you forget to add it to your route?`,\n )\n\n return resolvedRoute as any\n}\n\nexport function useSearch<\n TFrom extends keyof RegisteredRoutesInfo['routesById'],\n TStrict extends boolean = true,\n TSearch = RegisteredRoutesInfo['routesById'][TFrom]['__types']['fullSearchSchema'],\n TSelected = TSearch,\n>(opts?: {\n from: TFrom\n strict?: TStrict\n track?: (search: TSearch) => TSelected\n}): TStrict extends true ? TSelected : TSelected | undefined {\n const match = useMatch(opts)\n useStore(\n (match as any).store,\n (d: any) => opts?.track?.(d.search) ?? d.search,\n true,\n )\n\n return (match as unknown as RouteMatch).state.search as any\n}\n\nexport function useParams<\n TFrom extends keyof RegisteredRoutesInfo['routesById'] = '/',\n TDefaultSelected = RegisteredRoutesInfo['allParams'] &\n RegisteredRoutesInfo['routesById'][TFrom]['__types']['allParams'],\n TSelected = TDefaultSelected,\n>(opts?: {\n from: TFrom\n track?: (search: TDefaultSelected) => TSelected\n}): TSelected {\n const router = useRouterContext()\n useStore(\n router.store,\n (d) => {\n const params = last(d.currentMatches)?.params as any\n return opts?.track?.(params) ?? params\n },\n true,\n )\n\n return last(router.state.currentMatches)?.params as any\n}\n\nexport function useNavigate<\n TDefaultFrom extends keyof RegisteredRoutesInfo['routesById'] = '/',\n>(defaultOpts?: { from?: TDefaultFrom }) {\n const router = useRouterContext()\n return React.useCallback(\n <\n TFrom extends keyof RegisteredRoutesInfo['routesById'] = TDefaultFrom,\n TTo extends string = '',\n >(\n opts?: MakeLinkOptions<TFrom, TTo>,\n ) => {\n return router.navigate({ ...defaultOpts, ...(opts as any) })\n },\n [],\n )\n}\n\nexport function useMatchRoute() {\n const router = useRouterContext()\n\n return React.useCallback(\n <\n TFrom extends ValidFromPath<RegisteredRoutesInfo> = '/',\n TTo extends string = '',\n >(\n opts: MakeUseMatchRouteOptions<TFrom, TTo>,\n ) => {\n const { pending, caseSensitive, ...rest } = opts\n\n return router.matchRoute(rest as any, {\n pending,\n caseSensitive,\n })\n },\n [],\n )\n}\n\nexport function MatchRoute<\n TFrom extends ValidFromPath<RegisteredRoutesInfo> = '/',\n TTo extends string = '',\n>(props: MakeMatchRouteOptions<TFrom, TTo>): any {\n const matchRoute = useMatchRoute()\n const params = matchRoute(props)\n\n if (!params) {\n return null\n }\n\n if (typeof props.children === 'function') {\n return (props.children as any)(params)\n }\n\n return params ? props.children : null\n}\n\nexport function Outlet() {\n const matches = useMatches().slice(1)\n const match = matches[0]\n\n if (!match) {\n return null\n }\n\n return <SubOutlet matches={matches} match={match} />\n}\n\nfunction SubOutlet({\n matches,\n match,\n}: {\n matches: RouteMatch[]\n match: RouteMatch\n}) {\n const router = useRouterContext()\n useStore(match!.store, (store) => [store.status, store.error], true)\n\n const defaultPending = React.useCallback(() => null, [])\n\n const Inner = React.useCallback((props: { match: RouteMatch }): any => {\n if (props.match.state.status === 'error') {\n throw props.match.state.error\n }\n\n if (props.match.state.status === 'success') {\n return React.createElement(\n (props.match.component as any) ??\n router.options.defaultComponent ??\n Outlet,\n )\n }\n\n if (props.match.state.status === 'pending') {\n throw props.match.__loadPromise\n }\n\n invariant(\n false,\n 'Idle routeMatch status encountered during rendering! You should never see this. File an issue!',\n )\n }, [])\n\n const PendingComponent = (match.pendingComponent ??\n router.options.defaultPendingComponent ??\n defaultPending) as any\n\n const errorComponent =\n match.errorComponent ?? router.options.defaultErrorComponent\n\n const ResolvedSuspenseBoundary =\n match.route.options.wrapInSuspense ?? true ? React.Suspense : SafeFragment\n const ResolvedCatchBoundary = errorComponent ? CatchBoundary : SafeFragment\n\n return (\n <matchesContext.Provider value={matches}>\n <ResolvedSuspenseBoundary fallback={<PendingComponent />}>\n <ResolvedCatchBoundary\n key={match.route.id}\n errorComponent={errorComponent}\n onCatch={() => {\n warning(false, `Error in route match: ${match.id}`)\n }}\n >\n <Inner match={match} />\n </ResolvedCatchBoundary>\n </ResolvedSuspenseBoundary>\n </matchesContext.Provider>\n )\n}\n\nfunction SafeFragment(props: any) {\n return <>{props.children}</>\n}\n\n// This is the messiest thing ever... I'm either seriously tired (likely) or\n// there has to be a better way to reset error boundaries when the\n// router's location key changes.\n\nclass CatchBoundary extends React.Component<{\n children: any\n errorComponent: any\n onCatch: (error: any, info: any) => void\n}> {\n state = {\n error: false,\n info: undefined,\n }\n componentDidCatch(error: any, info: any) {\n this.props.onCatch(error, info)\n console.error(error)\n this.setState({\n error,\n info,\n })\n }\n render() {\n return (\n <CatchBoundaryInner\n {...this.props}\n errorState={this.state}\n reset={() => this.setState({})}\n />\n )\n }\n}\n\nfunction CatchBoundaryInner(props: {\n children: any\n errorComponent: any\n errorState: { error: unknown; info: any }\n reset: () => void\n}) {\n const [activeErrorState, setActiveErrorState] = React.useState(\n props.errorState,\n )\n const router = useRouterContext()\n const errorComponent = props.errorComponent ?? ErrorComponent\n const prevKeyRef = React.useRef('' as any)\n\n React.useEffect(() => {\n if (activeErrorState) {\n if (router.state.currentLocation.key !== prevKeyRef.current) {\n setActiveErrorState({} as any)\n }\n }\n\n prevKeyRef.current = router.state.currentLocation.key\n }, [activeErrorState, router.state.currentLocation.key])\n\n React.useEffect(() => {\n if (props.errorState.error) {\n setActiveErrorState(props.errorState)\n }\n // props.reset()\n }, [props.errorState.error])\n\n if (props.errorState.error && activeErrorState.error) {\n return React.createElement(errorComponent, activeErrorState)\n }\n\n return props.children\n}\n\nexport function ErrorComponent({ error }: { error: any }) {\n return (\n <div style={{ padding: '.5rem', maxWidth: '100%' }}>\n <strong style={{ fontSize: '1.2rem' }}>Something went wrong!</strong>\n <div style={{ height: '.5rem' }} />\n <div>\n <pre\n style={{\n fontSize: '.7em',\n border: '1px solid red',\n borderRadius: '.25rem',\n padding: '.5rem',\n color: 'red',\n overflow: 'auto',\n }}\n >\n {error.message ? <code>{error.message}</code> : null}\n </pre>\n </div>\n </div>\n )\n}\n\n// TODO: While we migrate away from the history package, these need to be disabled\n// export function usePrompt(message: string, when: boolean | any): void {\n// const router = useRouter()\n\n// React.useEffect(() => {\n// if (!when) return\n\n// let unblock = router.getHistory().block((transition) => {\n// if (window.confirm(message)) {\n// unblock()\n// transition.retry()\n// } else {\n// router.setStore((s) => {\n// s.currentLocation.pathname = window.location.pathname\n// })\n// }\n// })\n\n// return unblock\n// }, [when, message])\n// }\n\n// export function Prompt({ message, when, children }: PromptProps) {\n// usePrompt(message, when ?? true)\n// return (children ?? null) as ReactNode\n// }\n"],"names":["lazy","importer","lazyComp","React","finalComp","preload","useLinkProps","options","router","useRouterContext","type","children","target","activeProps","className","inactiveProps","activeOptions","disabled","hash","search","params","to","preloadDelay","replace","style","onClick","onFocus","onMouseEnter","onMouseLeave","onTouchStart","rest","linkInfo","buildLink","href","handleClick","handleFocus","handleEnter","handleLeave","handleTouchStart","isActive","next","reactHandleClick","e","startTransition","composeHandlers","handlers","persist","filter","Boolean","forEach","handler","defaultPrevented","resolvedActiveProps","functionalUpdate","resolvedInactiveProps","undefined","join","role","Link","forwardRef","props","ref","linkProps","_extends","Navigate","useLayoutEffect","navigate","matchesContext","createContext","routerContext","ReactRouter","Router","constructor","opts","loadComponent","component","RouterProvider","update","currentMatches","useStore","store","s","useEffect","mount","ErrorComponent","warning","value","useContext","useRouter","track","shallow","useMatches","useMatch","nearestMatch","match","from","state","find","d","route","id","invariant","strict","useRoute","routeId","resolvedRoute","getRoute","useSearch","useParams","last","useNavigate","defaultOpts","useCallback","useMatchRoute","pending","caseSensitive","matchRoute","MatchRoute","Outlet","matches","slice","SubOutlet","status","error","defaultPending","Inner","createElement","defaultComponent","__loadPromise","PendingComponent","pendingComponent","defaultPendingComponent","errorComponent","defaultErrorComponent","ResolvedSuspenseBoundary","wrapInSuspense","Suspense","SafeFragment","ResolvedCatchBoundary","CatchBoundary","Component","info","componentDidCatch","onCatch","console","setState","render","CatchBoundaryInner","activeErrorState","setActiveErrorState","useState","errorState","prevKeyRef","useRef","currentLocation","key","current","padding","maxWidth","fontSize","height","border","borderRadius","color","overflow","message"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA;;AAUO,SAASA,IAAI,CAClBC,QAAwD,EACxC;AAChB,EAAA,MAAMC,QAAQ,gBAAGC,gBAAK,CAACH,IAAI,CAACC,QAAQ,CAAQ,CAAA;EAG5C,MAAMG,SAAS,GAAGF,QAAqC,CAAA;EAEvDE,SAAS,CAACC,OAAO,GAAG,YAAY;IACd;AACd,MAAA,MAAMJ,QAAQ,EAAE,CAAA;AAClB,KAAA;GACD,CAAA;AAED,EAAA,OAAOG,SAAS,CAAA;AAClB,CAAA;AA4EA;;AAEO,SAASE,YAAY,CAI1BC,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;AAEV,CAAA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/index.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport {\n Route,\n RegisteredRoutesInfo,\n RegisteredRouter,\n RouterStore,\n last,\n warning,\n RouterOptions,\n RouteMatch,\n MatchRouteOptions,\n AnyRoutesInfo,\n DefaultRoutesInfo,\n functionalUpdate,\n RoutesInfo,\n ValidFromPath,\n LinkOptions,\n RouteByPath,\n ResolveRelativePath,\n NoInfer,\n ToOptions,\n invariant,\n Router,\n AnyRootRoute,\n RootRoute,\n AnyRouteMatch,\n NavigateOptions,\n RouterConstructorOptions,\n} from '@tanstack/router'\nimport { useStore } from '@tanstack/react-store'\n\n//\n\nexport * from '@tanstack/router'\n\nexport { useStore }\n\n//\n\ntype ReactNode = any\n\nexport type SyncRouteComponent<TProps = {}> = (props: TProps) => ReactNode\n\nexport type RouteComponent<TProps = {}> = SyncRouteComponent<TProps> & {\n preload?: () => Promise<void>\n}\n\nexport function lazy(\n importer: () => Promise<{ default: SyncRouteComponent }>,\n): RouteComponent {\n const lazyComp = React.lazy(importer as any)\n let preloaded: Promise<SyncRouteComponent>\n\n const finalComp = lazyComp as unknown as RouteComponent\n\n finalComp.preload = async () => {\n if (!preloaded) {\n await importer()\n }\n }\n\n return finalComp\n}\n\nexport type LinkPropsOptions<\n TFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TTo extends string = '',\n> = LinkOptions<RegisteredRoutesInfo, TFrom, TTo> & {\n // A function that returns additional props for the `active` state of this link. These props override other props passed to the link (`style`'s are merged, `className`'s are concatenated)\n activeProps?:\n | React.AnchorHTMLAttributes<HTMLAnchorElement>\n | (() => React.AnchorHTMLAttributes<HTMLAnchorElement>)\n // A function that returns additional props for the `inactive` state of this link. These props override other props passed to the link (`style`'s are merged, `className`'s are concatenated)\n inactiveProps?:\n | React.AnchorHTMLAttributes<HTMLAnchorElement>\n | (() => React.AnchorHTMLAttributes<HTMLAnchorElement>)\n}\n\nexport type MakeUseMatchRouteOptions<\n TFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TTo extends string = '',\n> = ToOptions<RegisteredRoutesInfo, TFrom, TTo> & MatchRouteOptions\n\nexport type MakeMatchRouteOptions<\n TFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TTo extends string = '',\n> = ToOptions<RegisteredRoutesInfo, TFrom, TTo> &\n MatchRouteOptions & {\n // If a function is passed as a child, it will be given the `isActive` boolean to aid in further styling on the element it returns\n children?:\n | ReactNode\n | ((\n params: RouteByPath<\n RegisteredRoutesInfo,\n ResolveRelativePath<TFrom, NoInfer<TTo>>\n >['__types']['allParams'],\n ) => ReactNode)\n }\n\nexport type MakeLinkPropsOptions<\n TFrom extends ValidFromPath<RegisteredRoutesInfo> = '/',\n TTo extends string = '',\n> = LinkPropsOptions<TFrom, TTo> & React.AnchorHTMLAttributes<HTMLAnchorElement>\n\nexport type MakeLinkOptions<\n TFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TTo extends string = '',\n> = LinkPropsOptions<TFrom, TTo> &\n React.AnchorHTMLAttributes<HTMLAnchorElement> &\n Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> & {\n // If a function is passed as a child, it will be given the `isActive` boolean to aid in further styling on the element it returns\n children?: ReactNode | ((state: { isActive: boolean }) => ReactNode)\n }\n\ndeclare module '@tanstack/router' {\n interface FrameworkGenerics {\n Component: RouteComponent\n ErrorComponent: RouteComponent<{\n error: Error\n info: { componentStack: string }\n }>\n }\n\n interface RouterOptions<TRouteTree> {\n // ssrFooter?: () => JSX.Element | Node\n }\n\n interface FrameworkRouteOptions {\n wrapInSuspense?: boolean\n }\n}\n\nexport type PromptProps = {\n message: string\n when?: boolean | any\n children?: ReactNode\n}\n\n//\n\nexport function useLinkProps<\n TFrom extends ValidFromPath<RegisteredRoutesInfo> = '/',\n TTo extends string = '',\n>(\n options: MakeLinkPropsOptions<TFrom, TTo>,\n): React.AnchorHTMLAttributes<HTMLAnchorElement> {\n const router = useRouterContext()\n\n const {\n // custom props\n type,\n children,\n target,\n activeProps = () => ({ className: 'active' }),\n inactiveProps = () => ({}),\n activeOptions,\n disabled,\n // fromCurrent,\n hash,\n search,\n params,\n to = '.',\n preload,\n preloadDelay,\n replace,\n // element props\n style,\n className,\n onClick,\n onFocus,\n onMouseEnter,\n onMouseLeave,\n onTouchStart,\n ...rest\n } = options\n\n const linkInfo = router.buildLink(options as any)\n\n if (linkInfo.type === 'external') {\n const { href } = linkInfo\n return { href }\n }\n\n const {\n handleClick,\n handleFocus,\n handleEnter,\n handleLeave,\n handleTouchStart,\n isActive,\n next,\n } = linkInfo\n\n const reactHandleClick = (e: Event) => {\n if (React.startTransition) {\n // This is a hack for react < 18\n React.startTransition(() => {\n handleClick(e)\n })\n } else {\n handleClick(e)\n }\n }\n\n const composeHandlers =\n (handlers: (undefined | ((e: any) => void))[]) =>\n (e: React.SyntheticEvent) => {\n if (e.persist) e.persist()\n handlers.filter(Boolean).forEach((handler) => {\n if (e.defaultPrevented) return\n handler!(e)\n })\n }\n\n // Get the active props\n const resolvedActiveProps: React.HTMLAttributes<HTMLAnchorElement> = isActive\n ? functionalUpdate(activeProps as any, {}) ?? {}\n : {}\n\n // Get the inactive props\n const resolvedInactiveProps: React.HTMLAttributes<HTMLAnchorElement> =\n isActive ? {} : functionalUpdate(inactiveProps, {}) ?? {}\n\n return {\n ...resolvedActiveProps,\n ...resolvedInactiveProps,\n ...rest,\n href: disabled ? undefined : next.href,\n onClick: composeHandlers([onClick, reactHandleClick]),\n onFocus: composeHandlers([onFocus, handleFocus]),\n onMouseEnter: composeHandlers([onMouseEnter, handleEnter]),\n onMouseLeave: composeHandlers([onMouseLeave, handleLeave]),\n onTouchStart: composeHandlers([onTouchStart, handleTouchStart]),\n target,\n style: {\n ...style,\n ...resolvedActiveProps.style,\n ...resolvedInactiveProps.style,\n },\n className:\n [\n className,\n resolvedActiveProps.className,\n resolvedInactiveProps.className,\n ]\n .filter(Boolean)\n .join(' ') || undefined,\n ...(disabled\n ? {\n role: 'link',\n 'aria-disabled': true,\n }\n : undefined),\n ['data-status']: isActive ? 'active' : undefined,\n }\n}\n\nexport interface LinkFn<\n TDefaultFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TDefaultTo extends string = '',\n> {\n <\n TFrom extends RegisteredRoutesInfo['routePaths'] = TDefaultFrom,\n TTo extends string = TDefaultTo,\n >(\n props: MakeLinkOptions<TFrom, TTo> & React.RefAttributes<HTMLAnchorElement>,\n ): ReactNode\n}\n\nexport const Link: LinkFn = React.forwardRef((props: any, ref) => {\n const linkProps = useLinkProps(props)\n\n return (\n <a\n {...{\n ref: ref as any,\n ...linkProps,\n children:\n typeof props.children === 'function'\n ? props.children({\n isActive: (linkProps as any)['data-status'] === 'active',\n })\n : props.children,\n }}\n />\n )\n}) as any\n\nexport function Navigate<\n TFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TTo extends string = '',\n>(props: NavigateOptions<RegisteredRoutesInfo, TFrom, TTo>): null {\n const router = useRouterContext()\n\n React.useLayoutEffect(() => {\n router.navigate(props as any)\n }, [])\n\n return null\n}\n\ntype MatchesContextValue = AnyRouteMatch[]\n\nexport const matchesContext = React.createContext<MatchesContextValue>(null!)\nexport const routerContext = React.createContext<{ router: RegisteredRouter }>(\n null!,\n)\n\nexport type MatchesProviderProps = {\n value: MatchesContextValue\n children: ReactNode\n}\n\nexport class ReactRouter<\n TRouteConfig extends AnyRootRoute = RootRoute,\n TRoutesInfo extends AnyRoutesInfo = RoutesInfo<TRouteConfig>,\n> extends Router<TRouteConfig, TRoutesInfo> {\n constructor(opts: RouterConstructorOptions<TRouteConfig>) {\n super({\n ...opts,\n loadComponent: async (component) => {\n if (component.preload) {\n await component.preload()\n }\n\n return component as any\n },\n })\n }\n}\n\nexport type RouterProps<\n TRouteConfig extends AnyRootRoute = RootRoute,\n TRoutesInfo extends AnyRoutesInfo = DefaultRoutesInfo,\n> = RouterOptions<TRouteConfig> & {\n router: Router<TRouteConfig, TRoutesInfo>\n}\n\nexport function RouterProvider<\n TRouteConfig extends AnyRootRoute = RootRoute,\n TRoutesInfo extends AnyRoutesInfo = DefaultRoutesInfo,\n>({ router, ...rest }: RouterProps<TRouteConfig, TRoutesInfo>) {\n router.update(rest)\n\n const currentMatches = useStore(router.__store, (s) => s.currentMatches)\n\n React.useEffect(router.mount, [router])\n\n return (\n <routerContext.Provider value={{ router: router as any }}>\n <matchesContext.Provider value={[undefined!, ...currentMatches]}>\n <CatchBoundary\n errorComponent={ErrorComponent}\n onCatch={() => {\n warning(\n false,\n `Error in router! Consider setting an 'errorComponent' in your RootRoute! 👍`,\n )\n }}\n >\n <Outlet />\n </CatchBoundary>\n </matchesContext.Provider>\n </routerContext.Provider>\n )\n}\n\nexport function useRouterContext(): RegisteredRouter {\n const value = React.useContext(routerContext)\n warning(value, 'useRouter must be used inside a <Router> component!')\n\n useStore(value.router.__store)\n\n return value.router\n}\n\nexport function useRouter<T = RouterStore>(\n track?: (state: Router['__store']) => T,\n shallow?: boolean,\n): RegisteredRouter {\n const router = useRouterContext()\n useStore(router.__store, track as any, shallow)\n return router\n}\n\nexport function useMatches(): RouteMatch[] {\n return React.useContext(matchesContext)\n}\n\nexport function useMatch<\n TFrom extends keyof RegisteredRoutesInfo['routesById'],\n TStrict extends boolean = true,\n TRouteMatch = RouteMatch<\n RegisteredRoutesInfo,\n RegisteredRoutesInfo['routesById'][TFrom]\n >,\n>(opts?: {\n from: TFrom\n strict?: TStrict\n track?: (match: TRouteMatch) => any\n shallow?: boolean\n}): TStrict extends true ? TRouteMatch : TRouteMatch | undefined {\n const router = useRouterContext()\n const nearestMatch = useMatches()[0]!\n const match = opts?.from\n ? router.state.currentMatches.find((d) => d.route.id === opts?.from)\n : nearestMatch\n\n invariant(\n match,\n `Could not find ${\n opts?.from ? `an active match from \"${opts.from}\"` : 'a nearest match!'\n }`,\n )\n\n if (opts?.strict ?? true) {\n invariant(\n nearestMatch.route.id == match?.route.id,\n `useMatch(\"${\n match?.route.id as string\n }\") is being called in a component that is meant to render the '${\n nearestMatch.route.id\n }' route. Did you mean to 'useMatch(\"${\n match?.route.id as string\n }\", { strict: false })' or 'useRoute(\"${\n match?.route.id as string\n }\")' instead?`,\n )\n }\n\n useStore(\n match!.__store as any,\n (d) => opts?.track?.(match as any) ?? match,\n opts?.shallow,\n )\n\n return match as any\n}\n\nexport function useRoute<\n TId extends keyof RegisteredRoutesInfo['routesById'] = '/',\n>(routeId: TId): RegisteredRoutesInfo['routesById'][TId] {\n const router = useRouterContext()\n const resolvedRoute = router.getRoute(routeId as any)\n\n invariant(\n resolvedRoute,\n `Could not find a route for route \"${\n routeId as string\n }\"! Did you forget to add it to your route?`,\n )\n\n return resolvedRoute as any\n}\n\nexport function useSearch<\n TFrom extends keyof RegisteredRoutesInfo['routesById'],\n TStrict extends boolean = true,\n TSearch = RegisteredRoutesInfo['routesById'][TFrom]['__types']['fullSearchSchema'],\n TSelected = TSearch,\n>(opts?: {\n from: TFrom\n strict?: TStrict\n track?: (search: TSearch) => TSelected\n}): TStrict extends true ? TSelected : TSelected | undefined {\n const { track, ...matchOpts } = opts as any\n const match = useMatch(matchOpts)\n useStore(match.__store, (d: any) => opts?.track?.(d.search) ?? d.search, true)\n\n return (match as unknown as RouteMatch).state.search as any\n}\n\nexport function useParams<\n TFrom extends keyof RegisteredRoutesInfo['routesById'] = '/',\n TDefaultSelected = RegisteredRoutesInfo['allParams'] &\n RegisteredRoutesInfo['routesById'][TFrom]['__types']['allParams'],\n TSelected = TDefaultSelected,\n>(opts?: {\n from: TFrom\n track?: (search: TDefaultSelected) => TSelected\n}): TSelected {\n const router = useRouterContext()\n useStore(\n router.__store,\n (d) => {\n const params = last(d.currentMatches)?.params as any\n return opts?.track?.(params) ?? params\n },\n true,\n )\n\n return last(router.state.currentMatches)?.params as any\n}\n\nexport function useNavigate<\n TDefaultFrom extends keyof RegisteredRoutesInfo['routesById'] = '/',\n>(defaultOpts?: { from?: TDefaultFrom }) {\n const router = useRouterContext()\n return React.useCallback(\n <\n TFrom extends keyof RegisteredRoutesInfo['routesById'] = TDefaultFrom,\n TTo extends string = '',\n >(\n opts?: MakeLinkOptions<TFrom, TTo>,\n ) => {\n return router.navigate({ ...defaultOpts, ...(opts as any) })\n },\n [],\n )\n}\n\nexport function useMatchRoute() {\n const router = useRouterContext()\n\n return React.useCallback(\n <\n TFrom extends ValidFromPath<RegisteredRoutesInfo> = '/',\n TTo extends string = '',\n >(\n opts: MakeUseMatchRouteOptions<TFrom, TTo>,\n ) => {\n const { pending, caseSensitive, ...rest } = opts\n\n return router.matchRoute(rest as any, {\n pending,\n caseSensitive,\n })\n },\n [],\n )\n}\n\nexport function MatchRoute<\n TFrom extends ValidFromPath<RegisteredRoutesInfo> = '/',\n TTo extends string = '',\n>(props: MakeMatchRouteOptions<TFrom, TTo>): any {\n const matchRoute = useMatchRoute()\n const params = matchRoute(props)\n\n if (!params) {\n return null\n }\n\n if (typeof props.children === 'function') {\n return (props.children as any)(params)\n }\n\n return params ? props.children : null\n}\n\nexport function Outlet() {\n const matches = useMatches().slice(1)\n const match = matches[0]\n\n if (!match) {\n return null\n }\n\n return <SubOutlet matches={matches} match={match} />\n}\n\nfunction SubOutlet({\n matches,\n match,\n}: {\n matches: RouteMatch[]\n match: RouteMatch\n}) {\n const router = useRouterContext()\n useStore(match!.__store, (store) => [store.status, store.error], true)\n\n const defaultPending = React.useCallback(() => null, [])\n\n const Inner = React.useCallback((props: { match: RouteMatch }): any => {\n if (props.match.state.status === 'error') {\n throw props.match.state.error\n }\n\n if (props.match.state.status === 'success') {\n return React.createElement(\n (props.match.component as any) ??\n router.options.defaultComponent ??\n Outlet,\n )\n }\n\n if (props.match.state.status === 'pending') {\n throw props.match.__loadPromise\n }\n\n invariant(\n false,\n 'Idle routeMatch status encountered during rendering! You should never see this. File an issue!',\n )\n }, [])\n\n const PendingComponent = (match.pendingComponent ??\n router.options.defaultPendingComponent ??\n defaultPending) as any\n\n const errorComponent =\n match.errorComponent ?? router.options.defaultErrorComponent\n\n const ResolvedSuspenseBoundary =\n match.route.options.wrapInSuspense ?? true ? React.Suspense : SafeFragment\n const ResolvedCatchBoundary = errorComponent ? CatchBoundary : SafeFragment\n\n return (\n <matchesContext.Provider value={matches}>\n <ResolvedSuspenseBoundary fallback={<PendingComponent />}>\n <ResolvedCatchBoundary\n key={match.route.id}\n errorComponent={errorComponent}\n onCatch={() => {\n warning(false, `Error in route match: ${match.id}`)\n }}\n >\n <Inner match={match} />\n </ResolvedCatchBoundary>\n </ResolvedSuspenseBoundary>\n </matchesContext.Provider>\n )\n}\n\nfunction SafeFragment(props: any) {\n return <>{props.children}</>\n}\n\n// This is the messiest thing ever... I'm either seriously tired (likely) or\n// there has to be a better way to reset error boundaries when the\n// router's location key changes.\n\nclass CatchBoundary extends React.Component<{\n children: any\n errorComponent: any\n onCatch: (error: any, info: any) => void\n}> {\n state = {\n error: false,\n info: undefined,\n }\n componentDidCatch(error: any, info: any) {\n this.props.onCatch(error, info)\n console.error(error)\n this.setState({\n error,\n info,\n })\n }\n render() {\n return (\n <CatchBoundaryInner\n {...this.props}\n errorState={this.state}\n reset={() => this.setState({})}\n />\n )\n }\n}\n\nfunction CatchBoundaryInner(props: {\n children: any\n errorComponent: any\n errorState: { error: unknown; info: any }\n reset: () => void\n}) {\n const [activeErrorState, setActiveErrorState] = React.useState(\n props.errorState,\n )\n const router = useRouterContext()\n const errorComponent = props.errorComponent ?? ErrorComponent\n const prevKeyRef = React.useRef('' as any)\n\n React.useEffect(() => {\n if (activeErrorState) {\n if (router.state.currentLocation.key !== prevKeyRef.current) {\n setActiveErrorState({} as any)\n }\n }\n\n prevKeyRef.current = router.state.currentLocation.key\n }, [activeErrorState, router.state.currentLocation.key])\n\n React.useEffect(() => {\n if (props.errorState.error) {\n setActiveErrorState(props.errorState)\n }\n // props.reset()\n }, [props.errorState.error])\n\n if (props.errorState.error && activeErrorState.error) {\n return React.createElement(errorComponent, activeErrorState)\n }\n\n return props.children\n}\n\nexport function ErrorComponent({ error }: { error: any }) {\n return (\n <div style={{ padding: '.5rem', maxWidth: '100%' }}>\n <strong style={{ fontSize: '1.2rem' }}>Something went wrong!</strong>\n <div style={{ height: '.5rem' }} />\n <div>\n <pre\n style={{\n fontSize: '.7em',\n border: '1px solid red',\n borderRadius: '.25rem',\n padding: '.5rem',\n color: 'red',\n overflow: 'auto',\n }}\n >\n {error.message ? <code>{error.message}</code> : null}\n </pre>\n </div>\n </div>\n )\n}\n\n// TODO: While we migrate away from the history package, these need to be disabled\n// export function usePrompt(message: string, when: boolean | any): void {\n// const router = useRouter()\n\n// React.useEffect(() => {\n// if (!when) return\n\n// let unblock = router.getHistory().block((transition) => {\n// if (window.confirm(message)) {\n// unblock()\n// transition.retry()\n// } else {\n// router.setStore((s) => {\n// s.currentLocation.pathname = window.location.pathname\n// })\n// }\n// })\n\n// return unblock\n// }, [when, message])\n// }\n\n// export function Prompt({ message, when, children }: PromptProps) {\n// usePrompt(message, when ?? true)\n// return (children ?? null) as ReactNode\n// }\n"],"names":["lazy","importer","lazyComp","React","finalComp","preload","useLinkProps","options","router","useRouterContext","type","children","target","activeProps","className","inactiveProps","activeOptions","disabled","hash","search","params","to","preloadDelay","replace","style","onClick","onFocus","onMouseEnter","onMouseLeave","onTouchStart","rest","linkInfo","buildLink","href","handleClick","handleFocus","handleEnter","handleLeave","handleTouchStart","isActive","next","reactHandleClick","e","startTransition","composeHandlers","handlers","persist","filter","Boolean","forEach","handler","defaultPrevented","resolvedActiveProps","functionalUpdate","resolvedInactiveProps","undefined","join","role","Link","forwardRef","props","ref","linkProps","_extends","Navigate","useLayoutEffect","navigate","matchesContext","createContext","routerContext","ReactRouter","Router","constructor","opts","loadComponent","component","RouterProvider","update","currentMatches","useStore","__store","s","useEffect","mount","ErrorComponent","warning","value","useContext","useRouter","track","shallow","useMatches","useMatch","nearestMatch","match","from","state","find","d","route","id","invariant","strict","useRoute","routeId","resolvedRoute","getRoute","useSearch","matchOpts","useParams","last","useNavigate","defaultOpts","useCallback","useMatchRoute","pending","caseSensitive","matchRoute","MatchRoute","Outlet","matches","slice","SubOutlet","store","status","error","defaultPending","Inner","createElement","defaultComponent","__loadPromise","PendingComponent","pendingComponent","defaultPendingComponent","errorComponent","defaultErrorComponent","ResolvedSuspenseBoundary","wrapInSuspense","Suspense","SafeFragment","ResolvedCatchBoundary","CatchBoundary","Component","info","componentDidCatch","onCatch","console","setState","render","CatchBoundaryInner","activeErrorState","setActiveErrorState","useState","errorState","prevKeyRef","useRef","currentLocation","key","current","padding","maxWidth","fontSize","height","border","borderRadius","color","overflow","message"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA;;AAUO,SAASA,IAAI,CAClBC,QAAwD,EACxC;AAChB,EAAA,MAAMC,QAAQ,gBAAGC,gBAAK,CAACH,IAAI,CAACC,QAAQ,CAAQ,CAAA;EAG5C,MAAMG,SAAS,GAAGF,QAAqC,CAAA;EAEvDE,SAAS,CAACC,OAAO,GAAG,YAAY;IACd;AACd,MAAA,MAAMJ,QAAQ,EAAE,CAAA;AAClB,KAAA;GACD,CAAA;AAED,EAAA,OAAOG,SAAS,CAAA;AAClB,CAAA;AA4EA;;AAEO,SAASE,YAAY,CAI1BC,OAAyC,EACM;EAC/C,MAAMC,QAAM,GAAGC,gBAAgB,EAAE,CAAA;EAEjC,MAAM;AACJ;IACAC,IAAI;IACJC,QAAQ;IACRC,MAAM;AACNC,IAAAA,WAAW,GAAG,OAAO;AAAEC,MAAAA,SAAS,EAAE,QAAA;AAAS,KAAC,CAAC;AAC7CC,IAAAA,aAAa,GAAG,OAAO,EAAE,CAAC;IAC1BC,aAAa;IACbC,QAAQ;AACR;IACAC,IAAI;IACJC,MAAM;IACNC,MAAM;AACNC,I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router.update(rest);
179
- const currentMatches = useStore(router.store, s => s.currentMatches);
179
+ const currentMatches = useStore(router.__store, s => s.currentMatches);
180
180
  React.useEffect(router.mount, [router]);
181
181
  return /*#__PURE__*/React.createElement(routerContext.Provider, {
182
182
  value: {
@@ -194,12 +194,12 @@ function RouterProvider({
194
194
  function useRouterContext() {
195
195
  const value = React.useContext(routerContext);
196
196
  warning(value, 'useRouter must be used inside a <Router> component!');
197
- useStore(value.router.store);
197
+ useStore(value.router.__store);
198
198
  return value.router;
199
199
  }
200
200
  function useRouter(track, shallow) {
201
201
  const router = useRouterContext();
202
- useStore(router.store, track, shallow);
202
+ useStore(router.__store, track, shallow);
203
203
  return router;
204
204
  }
205
205
  function useMatches() {
@@ -213,7 +213,7 @@ function useMatch(opts) {
213
213
  if (opts?.strict ?? true) {
214
214
  invariant(nearestMatch.route.id == match?.route.id, `useMatch("${match?.route.id}") is being called in a component that is meant to render the '${nearestMatch.route.id}' route. Did you mean to 'useMatch("${match?.route.id}", { strict: false })' or 'useRoute("${match?.route.id}")' instead?`);
215
215
  }
216
- useStore(match.store, d => opts?.track?.(match) ?? match, opts?.shallow);
216
+ useStore(match.__store, d => opts?.track?.(match) ?? match, opts?.shallow);
217
217
  return match;
218
218
  }
219
219
  function useRoute(routeId) {
@@ -223,13 +223,17 @@ function useRoute(routeId) {
223
223
  return resolvedRoute;
224
224
  }
225
225
  function useSearch(opts) {
226
- const match = useMatch(opts);
227
- useStore(match.store, d => opts?.track?.(d.search) ?? d.search, true);
226
+ const {
227
+ track,
228
+ ...matchOpts
229
+ } = opts;
230
+ const match = useMatch(matchOpts);
231
+ useStore(match.__store, d => opts?.track?.(d.search) ?? d.search, true);
228
232
  return match.state.search;
229
233
  }
230
234
  function useParams(opts) {
231
235
  const router = useRouterContext();
232
- useStore(router.store, d => {
236
+ useStore(router.__store, d => {
233
237
  const params = last(d.currentMatches)?.params;
234
238
  return opts?.track?.(params) ?? params;
235
239
  }, true);
@@ -285,7 +289,7 @@ function SubOutlet({
285
289
  match
286
290
  }) {
287
291
  const router = useRouterContext();
288
- useStore(match.store, store => [store.status, store.error], true);
292
+ useStore(match.__store, store => [store.status, store.error], true);
289
293
  const defaultPending = React.useCallback(() => null, []);
290
294
  const Inner = React.useCallback(props => {
291
295
  if (props.match.state.status === 'error') {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/index.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport {\n Route,\n RegisteredRoutesInfo,\n RegisteredRouter,\n RouterStore,\n last,\n warning,\n RouterOptions,\n RouteMatch,\n MatchRouteOptions,\n AnyRoutesInfo,\n DefaultRoutesInfo,\n functionalUpdate,\n RoutesInfo,\n ValidFromPath,\n LinkOptions,\n RouteByPath,\n ResolveRelativePath,\n NoInfer,\n ToOptions,\n invariant,\n Router,\n AnyRootRoute,\n RootRoute,\n AnyRouteMatch,\n NavigateOptions,\n RouterConstructorOptions,\n} from '@tanstack/router'\nimport { useStore } from '@tanstack/react-store'\n\n//\n\nexport * from '@tanstack/router'\n\nexport { useStore }\n\n//\n\ntype ReactNode = any\n\nexport type SyncRouteComponent<TProps = {}> = (props: TProps) => ReactNode\n\nexport type RouteComponent<TProps = {}> = SyncRouteComponent<TProps> & {\n preload?: () => Promise<void>\n}\n\nexport function lazy(\n importer: () => Promise<{ default: SyncRouteComponent }>,\n): RouteComponent {\n const lazyComp = React.lazy(importer as any)\n let preloaded: Promise<SyncRouteComponent>\n\n const finalComp = lazyComp as unknown as RouteComponent\n\n finalComp.preload = async () => {\n if (!preloaded) {\n await importer()\n }\n }\n\n return finalComp\n}\n\nexport type LinkPropsOptions<\n TFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TTo extends string = '',\n> = LinkOptions<RegisteredRoutesInfo, TFrom, TTo> & {\n // A function that returns additional props for the `active` state of this link. These props override other props passed to the link (`style`'s are merged, `className`'s are concatenated)\n activeProps?:\n | React.AnchorHTMLAttributes<HTMLAnchorElement>\n | (() => React.AnchorHTMLAttributes<HTMLAnchorElement>)\n // A function that returns additional props for the `inactive` state of this link. These props override other props passed to the link (`style`'s are merged, `className`'s are concatenated)\n inactiveProps?:\n | React.AnchorHTMLAttributes<HTMLAnchorElement>\n | (() => React.AnchorHTMLAttributes<HTMLAnchorElement>)\n}\n\nexport type MakeUseMatchRouteOptions<\n TFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TTo extends string = '',\n> = ToOptions<RegisteredRoutesInfo, TFrom, TTo> & MatchRouteOptions\n\nexport type MakeMatchRouteOptions<\n TFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TTo extends string = '',\n> = ToOptions<RegisteredRoutesInfo, TFrom, TTo> &\n MatchRouteOptions & {\n // If a function is passed as a child, it will be given the `isActive` boolean to aid in further styling on the element it returns\n children?:\n | ReactNode\n | ((\n params: RouteByPath<\n RegisteredRoutesInfo,\n ResolveRelativePath<TFrom, NoInfer<TTo>>\n >['__types']['allParams'],\n ) => ReactNode)\n }\n\nexport type MakeLinkPropsOptions<\n TFrom extends ValidFromPath<RegisteredRoutesInfo> = '/',\n TTo extends string = '',\n> = LinkPropsOptions<TFrom, TTo> & React.AnchorHTMLAttributes<HTMLAnchorElement>\n\nexport type MakeLinkOptions<\n TFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TTo extends string = '',\n> = LinkPropsOptions<TFrom, TTo> &\n React.AnchorHTMLAttributes<HTMLAnchorElement> &\n Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> & {\n // If a function is passed as a child, it will be given the `isActive` boolean to aid in further styling on the element it returns\n children?: ReactNode | ((state: { isActive: boolean }) => ReactNode)\n }\n\ndeclare module '@tanstack/router' {\n interface FrameworkGenerics {\n Component: RouteComponent\n ErrorComponent: RouteComponent<{\n error: Error\n info: { componentStack: string }\n }>\n }\n\n interface RouterOptions<TRouteTree> {\n // ssrFooter?: () => JSX.Element | Node\n }\n\n interface FrameworkRouteOptions {\n wrapInSuspense?: boolean\n }\n}\n\nexport type PromptProps = {\n message: string\n when?: boolean | any\n children?: ReactNode\n}\n\n//\n\nexport function useLinkProps<\n TFrom extends ValidFromPath<RegisteredRoutesInfo> = '/',\n TTo extends string = '',\n>(\n options: MakeLinkPropsOptions<TFrom, TTo>,\n): React.AnchorHTMLAttributes<HTMLAnchorElement> {\n const router = useRouterContext()\n\n const {\n // custom props\n type,\n children,\n target,\n activeProps = () => ({ className: 'active' }),\n inactiveProps = () => ({}),\n activeOptions,\n disabled,\n // fromCurrent,\n hash,\n search,\n params,\n to = '.',\n preload,\n preloadDelay,\n replace,\n // element props\n style,\n className,\n onClick,\n onFocus,\n onMouseEnter,\n onMouseLeave,\n onTouchStart,\n ...rest\n } = options\n\n const linkInfo = router.buildLink(options as any)\n\n if (linkInfo.type === 'external') {\n const { href } = linkInfo\n return { href }\n }\n\n const {\n handleClick,\n handleFocus,\n handleEnter,\n handleLeave,\n handleTouchStart,\n isActive,\n next,\n } = linkInfo\n\n const reactHandleClick = (e: Event) => {\n if (React.startTransition) {\n // This is a hack for react < 18\n React.startTransition(() => {\n handleClick(e)\n })\n } else {\n handleClick(e)\n }\n }\n\n const composeHandlers =\n (handlers: (undefined | ((e: any) => void))[]) =>\n (e: React.SyntheticEvent) => {\n if (e.persist) e.persist()\n handlers.filter(Boolean).forEach((handler) => {\n if (e.defaultPrevented) return\n handler!(e)\n })\n }\n\n // Get the active props\n const resolvedActiveProps: React.HTMLAttributes<HTMLAnchorElement> = isActive\n ? functionalUpdate(activeProps as any, {}) ?? {}\n : {}\n\n // Get the inactive props\n const resolvedInactiveProps: React.HTMLAttributes<HTMLAnchorElement> =\n isActive ? {} : functionalUpdate(inactiveProps, {}) ?? {}\n\n return {\n ...resolvedActiveProps,\n ...resolvedInactiveProps,\n ...rest,\n href: disabled ? undefined : next.href,\n onClick: composeHandlers([onClick, reactHandleClick]),\n onFocus: composeHandlers([onFocus, handleFocus]),\n onMouseEnter: composeHandlers([onMouseEnter, handleEnter]),\n onMouseLeave: composeHandlers([onMouseLeave, handleLeave]),\n onTouchStart: composeHandlers([onTouchStart, handleTouchStart]),\n target,\n style: {\n ...style,\n ...resolvedActiveProps.style,\n ...resolvedInactiveProps.style,\n },\n className:\n [\n className,\n resolvedActiveProps.className,\n resolvedInactiveProps.className,\n ]\n .filter(Boolean)\n .join(' ') || undefined,\n ...(disabled\n ? {\n role: 'link',\n 'aria-disabled': true,\n }\n : undefined),\n ['data-status']: isActive ? 'active' : undefined,\n }\n}\n\nexport interface LinkFn<\n TDefaultFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TDefaultTo extends string = '',\n> {\n <\n TFrom extends RegisteredRoutesInfo['routePaths'] = TDefaultFrom,\n TTo extends string = TDefaultTo,\n >(\n props: MakeLinkOptions<TFrom, TTo> & React.RefAttributes<HTMLAnchorElement>,\n ): ReactNode\n}\n\nexport const Link: LinkFn = React.forwardRef((props: any, ref) => {\n const linkProps = useLinkProps(props)\n\n return (\n <a\n {...{\n ref: ref as any,\n ...linkProps,\n children:\n typeof props.children === 'function'\n ? props.children({\n isActive: (linkProps as any)['data-status'] === 'active',\n })\n : props.children,\n }}\n />\n )\n}) as any\n\nexport function Navigate<\n TFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TTo extends string = '',\n>(props: NavigateOptions<RegisteredRoutesInfo, TFrom, TTo>): null {\n const router = useRouterContext()\n\n React.useLayoutEffect(() => {\n router.navigate(props as any)\n }, [])\n\n return null\n}\n\ntype MatchesContextValue = AnyRouteMatch[]\n\nexport const matchesContext = React.createContext<MatchesContextValue>(null!)\nexport const routerContext = React.createContext<{ router: RegisteredRouter }>(\n null!,\n)\n\nexport type MatchesProviderProps = {\n value: MatchesContextValue\n children: ReactNode\n}\n\nexport class ReactRouter<\n TRouteConfig extends AnyRootRoute = RootRoute,\n TRoutesInfo extends AnyRoutesInfo = RoutesInfo<TRouteConfig>,\n> extends Router<TRouteConfig, TRoutesInfo> {\n constructor(opts: RouterConstructorOptions<TRouteConfig>) {\n super({\n ...opts,\n loadComponent: async (component) => {\n if (component.preload) {\n await component.preload()\n }\n\n return component as any\n },\n })\n }\n}\n\nexport type RouterProps<\n TRouteConfig extends AnyRootRoute = RootRoute,\n TRoutesInfo extends AnyRoutesInfo = DefaultRoutesInfo,\n> = RouterOptions<TRouteConfig> & {\n router: Router<TRouteConfig, TRoutesInfo>\n}\n\nexport function RouterProvider<\n TRouteConfig extends AnyRootRoute = RootRoute,\n TRoutesInfo extends AnyRoutesInfo = DefaultRoutesInfo,\n>({ router, ...rest }: RouterProps<TRouteConfig, TRoutesInfo>) {\n router.update(rest)\n\n const currentMatches = useStore(router.store, (s) => s.currentMatches)\n\n React.useEffect(router.mount, [router])\n\n return (\n <routerContext.Provider value={{ router: router as any }}>\n <matchesContext.Provider value={[undefined!, ...currentMatches]}>\n <CatchBoundary\n errorComponent={ErrorComponent}\n onCatch={() => {\n warning(\n false,\n `Error in router! Consider setting an 'errorComponent' in your RootRoute! 👍`,\n )\n }}\n >\n <Outlet />\n </CatchBoundary>\n </matchesContext.Provider>\n </routerContext.Provider>\n )\n}\n\nexport function useRouterContext(): RegisteredRouter {\n const value = React.useContext(routerContext)\n warning(value, 'useRouter must be used inside a <Router> component!')\n\n useStore(value.router.store)\n\n return value.router\n}\n\nexport function useRouter<T = RouterStore>(\n track?: (state: Router['store']) => T,\n shallow?: boolean,\n): RegisteredRouter {\n const router = useRouterContext()\n useStore(router.store, track as any, shallow)\n return router\n}\n\nexport function useMatches(): RouteMatch[] {\n return React.useContext(matchesContext)\n}\n\nexport function useMatch<\n TFrom extends keyof RegisteredRoutesInfo['routesById'],\n TStrict extends boolean = true,\n TRouteMatch = RouteMatch<\n RegisteredRoutesInfo,\n RegisteredRoutesInfo['routesById'][TFrom]\n >,\n>(opts?: {\n from: TFrom\n strict?: TStrict\n track?: (match: TRouteMatch) => any\n shallow?: boolean\n}): TStrict extends true ? TRouteMatch : TRouteMatch | undefined {\n const router = useRouterContext()\n const nearestMatch = useMatches()[0]!\n const match = opts?.from\n ? router.state.currentMatches.find((d) => d.route.id === opts?.from)\n : nearestMatch\n\n invariant(\n match,\n `Could not find ${\n opts?.from ? `an active match from \"${opts.from}\"` : 'a nearest match!'\n }`,\n )\n\n if (opts?.strict ?? true) {\n invariant(\n nearestMatch.route.id == match?.route.id,\n `useMatch(\"${\n match?.route.id as string\n }\") is being called in a component that is meant to render the '${\n nearestMatch.route.id\n }' route. Did you mean to 'useMatch(\"${\n match?.route.id as string\n }\", { strict: false })' or 'useRoute(\"${\n match?.route.id as string\n }\")' instead?`,\n )\n }\n\n useStore(\n match!.store as any,\n (d) => opts?.track?.(match as any) ?? match,\n opts?.shallow,\n )\n\n return match as any\n}\n\nexport function useRoute<\n TId extends keyof RegisteredRoutesInfo['routesById'] = '/',\n>(routeId: TId): RegisteredRoutesInfo['routesById'][TId] {\n const router = useRouterContext()\n const resolvedRoute = router.getRoute(routeId as any)\n\n invariant(\n resolvedRoute,\n `Could not find a route for route \"${\n routeId as string\n }\"! Did you forget to add it to your route?`,\n )\n\n return resolvedRoute as any\n}\n\nexport function useSearch<\n TFrom extends keyof RegisteredRoutesInfo['routesById'],\n TStrict extends boolean = true,\n TSearch = RegisteredRoutesInfo['routesById'][TFrom]['__types']['fullSearchSchema'],\n TSelected = TSearch,\n>(opts?: {\n from: TFrom\n strict?: TStrict\n track?: (search: TSearch) => TSelected\n}): TStrict extends true ? TSelected : TSelected | undefined {\n const match = useMatch(opts)\n useStore(\n (match as any).store,\n (d: any) => opts?.track?.(d.search) ?? d.search,\n true,\n )\n\n return (match as unknown as RouteMatch).state.search as any\n}\n\nexport function useParams<\n TFrom extends keyof RegisteredRoutesInfo['routesById'] = '/',\n TDefaultSelected = RegisteredRoutesInfo['allParams'] &\n RegisteredRoutesInfo['routesById'][TFrom]['__types']['allParams'],\n TSelected = TDefaultSelected,\n>(opts?: {\n from: TFrom\n track?: (search: TDefaultSelected) => TSelected\n}): TSelected {\n const router = useRouterContext()\n useStore(\n router.store,\n (d) => {\n const params = last(d.currentMatches)?.params as any\n return opts?.track?.(params) ?? params\n },\n true,\n )\n\n return last(router.state.currentMatches)?.params as any\n}\n\nexport function useNavigate<\n TDefaultFrom extends keyof RegisteredRoutesInfo['routesById'] = '/',\n>(defaultOpts?: { from?: TDefaultFrom }) {\n const router = useRouterContext()\n return React.useCallback(\n <\n TFrom extends keyof RegisteredRoutesInfo['routesById'] = TDefaultFrom,\n TTo extends string = '',\n >(\n opts?: MakeLinkOptions<TFrom, TTo>,\n ) => {\n return router.navigate({ ...defaultOpts, ...(opts as any) })\n },\n [],\n )\n}\n\nexport function useMatchRoute() {\n const router = useRouterContext()\n\n return React.useCallback(\n <\n TFrom extends ValidFromPath<RegisteredRoutesInfo> = '/',\n TTo extends string = '',\n >(\n opts: MakeUseMatchRouteOptions<TFrom, TTo>,\n ) => {\n const { pending, caseSensitive, ...rest } = opts\n\n return router.matchRoute(rest as any, {\n pending,\n caseSensitive,\n })\n },\n [],\n )\n}\n\nexport function MatchRoute<\n TFrom extends ValidFromPath<RegisteredRoutesInfo> = '/',\n TTo extends string = '',\n>(props: MakeMatchRouteOptions<TFrom, TTo>): any {\n const matchRoute = useMatchRoute()\n const params = matchRoute(props)\n\n if (!params) {\n return null\n }\n\n if (typeof props.children === 'function') {\n return (props.children as any)(params)\n }\n\n return params ? props.children : null\n}\n\nexport function Outlet() {\n const matches = useMatches().slice(1)\n const match = matches[0]\n\n if (!match) {\n return null\n }\n\n return <SubOutlet matches={matches} match={match} />\n}\n\nfunction SubOutlet({\n matches,\n match,\n}: {\n matches: RouteMatch[]\n match: RouteMatch\n}) {\n const router = useRouterContext()\n useStore(match!.store, (store) => [store.status, store.error], true)\n\n const defaultPending = React.useCallback(() => null, [])\n\n const Inner = React.useCallback((props: { match: RouteMatch }): any => {\n if (props.match.state.status === 'error') {\n throw props.match.state.error\n }\n\n if (props.match.state.status === 'success') {\n return React.createElement(\n (props.match.component as any) ??\n router.options.defaultComponent ??\n Outlet,\n )\n }\n\n if (props.match.state.status === 'pending') {\n throw props.match.__loadPromise\n }\n\n invariant(\n false,\n 'Idle routeMatch status encountered during rendering! You should never see this. File an issue!',\n )\n }, [])\n\n const PendingComponent = (match.pendingComponent ??\n router.options.defaultPendingComponent ??\n defaultPending) as any\n\n const errorComponent =\n match.errorComponent ?? router.options.defaultErrorComponent\n\n const ResolvedSuspenseBoundary =\n match.route.options.wrapInSuspense ?? true ? React.Suspense : SafeFragment\n const ResolvedCatchBoundary = errorComponent ? CatchBoundary : SafeFragment\n\n return (\n <matchesContext.Provider value={matches}>\n <ResolvedSuspenseBoundary fallback={<PendingComponent />}>\n <ResolvedCatchBoundary\n key={match.route.id}\n errorComponent={errorComponent}\n onCatch={() => {\n warning(false, `Error in route match: ${match.id}`)\n }}\n >\n <Inner match={match} />\n </ResolvedCatchBoundary>\n </ResolvedSuspenseBoundary>\n </matchesContext.Provider>\n )\n}\n\nfunction SafeFragment(props: any) {\n return <>{props.children}</>\n}\n\n// This is the messiest thing ever... I'm either seriously tired (likely) or\n// there has to be a better way to reset error boundaries when the\n// router's location key changes.\n\nclass CatchBoundary extends React.Component<{\n children: any\n errorComponent: any\n onCatch: (error: any, info: any) => void\n}> {\n state = {\n error: false,\n info: undefined,\n }\n componentDidCatch(error: any, info: any) {\n this.props.onCatch(error, info)\n console.error(error)\n this.setState({\n error,\n info,\n })\n }\n render() {\n return (\n <CatchBoundaryInner\n {...this.props}\n errorState={this.state}\n reset={() => this.setState({})}\n />\n )\n }\n}\n\nfunction CatchBoundaryInner(props: {\n children: any\n errorComponent: any\n errorState: { error: unknown; info: any }\n reset: () => void\n}) {\n const [activeErrorState, setActiveErrorState] = React.useState(\n props.errorState,\n )\n const router = useRouterContext()\n const errorComponent = props.errorComponent ?? ErrorComponent\n const prevKeyRef = React.useRef('' as any)\n\n React.useEffect(() => {\n if (activeErrorState) {\n if (router.state.currentLocation.key !== prevKeyRef.current) {\n setActiveErrorState({} as any)\n }\n }\n\n prevKeyRef.current = router.state.currentLocation.key\n }, [activeErrorState, router.state.currentLocation.key])\n\n React.useEffect(() => {\n if (props.errorState.error) {\n setActiveErrorState(props.errorState)\n }\n // props.reset()\n }, [props.errorState.error])\n\n if (props.errorState.error && activeErrorState.error) {\n return React.createElement(errorComponent, activeErrorState)\n }\n\n return props.children\n}\n\nexport function ErrorComponent({ error }: { error: any }) {\n return (\n <div style={{ padding: '.5rem', maxWidth: '100%' }}>\n <strong style={{ fontSize: '1.2rem' }}>Something went wrong!</strong>\n <div style={{ height: '.5rem' }} />\n <div>\n <pre\n style={{\n fontSize: '.7em',\n border: '1px solid red',\n borderRadius: '.25rem',\n padding: '.5rem',\n color: 'red',\n overflow: 'auto',\n }}\n >\n {error.message ? <code>{error.message}</code> : null}\n </pre>\n </div>\n </div>\n )\n}\n\n// TODO: While we migrate away from the history package, these need to be disabled\n// export function usePrompt(message: string, when: boolean | any): void {\n// const router = useRouter()\n\n// React.useEffect(() => {\n// if (!when) return\n\n// let unblock = router.getHistory().block((transition) => {\n// if (window.confirm(message)) {\n// unblock()\n// transition.retry()\n// } else {\n// router.setStore((s) => {\n// s.currentLocation.pathname = window.location.pathname\n// })\n// }\n// })\n\n// return unblock\n// }, [when, message])\n// }\n\n// export function Prompt({ message, when, children }: PromptProps) {\n// usePrompt(message, when ?? true)\n// return (children ?? null) as ReactNode\n// }\n"],"names":["lazy","importer","lazyComp","React","finalComp","preload","useLinkProps","options","router","useRouterContext","type","children","target","activeProps","className","inactiveProps","activeOptions","disabled","hash","search","params","to","preloadDelay","replace","style","onClick","onFocus","onMouseEnter","onMouseLeave","onTouchStart","rest","linkInfo","buildLink","href","handleClick","handleFocus","handleEnter","handleLeave","handleTouchStart","isActive","next","reactHandleClick","e","startTransition","composeHandlers","handlers","persist","filter","Boolean","forEach","handler","defaultPrevented","resolvedActiveProps","functionalUpdate","resolvedInactiveProps","undefined","join","role","Link","forwardRef","props","ref","linkProps","Navigate","useLayoutEffect","navigate","matchesContext","createContext","routerContext","ReactRouter","Router","constructor","opts","loadComponent","component","RouterProvider","update","currentMatches","useStore","store","s","useEffect","mount","ErrorComponent","warning","value","useContext","useRouter","track","shallow","useMatches","useMatch","nearestMatch","match","from","state","find","d","route","id","invariant","strict","useRoute","routeId","resolvedRoute","getRoute","useSearch","useParams","last","useNavigate","defaultOpts","useCallback","useMatchRoute","pending","caseSensitive","matchRoute","MatchRoute","Outlet","matches","slice","SubOutlet","status","error","defaultPending","Inner","createElement","defaultComponent","__loadPromise","PendingComponent","pendingComponent","defaultPendingComponent","errorComponent","defaultErrorComponent","ResolvedSuspenseBoundary","wrapInSuspense","Suspense","SafeFragment","ResolvedCatchBoundary","CatchBoundary","Component","info","componentDidCatch","onCatch","console","setState","render","CatchBoundaryInner","activeErrorState","setActiveErrorState","useState","errorState","prevKeyRef","useRef","currentLocation","key","current","padding","maxWidth","fontSize","height","border","borderRadius","color","overflow","message"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA;;AAUO,SAASA,IAAI,CAClBC,QAAwD,EACxC;AAChB,EAAA,MAAMC,QAAQ,gBAAGC,KAAK,CAACH,IAAI,CAACC,QAAQ,CAAQ,CAAA;EAG5C,MAAMG,SAAS,GAAGF,QAAqC,CAAA;EAEvDE,SAAS,CAACC,OAAO,GAAG,YAAY;IACd;AACd,MAAA,MAAMJ,QAAQ,EAAE,CAAA;AAClB,KAAA;GACD,CAAA;AAED,EAAA,OAAOG,SAAS,CAAA;AAClB,CAAA;AA4EA;;AAEO,SAASE,YAAY,CAI1BC,OAAyC,EACM;EAC/C,MAAMC,MAAM,GAAGC,gBAAgB,EAAE,CAAA;EAEjC,MAAM;AACJ;IACAC,IAAI;IACJC,QAAQ;IACRC,MAAM;AACNC,IAAAA,WAAW,GAAG,OAAO;AAAEC,MAAAA,SAAS,EAAE,QAAA;AAAS,KAAC,CAAC;AAC7CC,IAAAA,aAAa,GAAG,OAAO,EAAE,CAAC;IAC1BC,aAAa;IACbC,QAAQ;AACR;IACAC,IAAI;IACJC,MAAM;IACNC,MAAM;AACNC,IAAAA,EAAE,GAAG,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AA;AAAO,KAAA;GAC/C,eAAA,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA;AAAQ,IAAA,KAAK,EAAE;AAAEC,MAAAA,QAAQ,EAAE,QAAA;AAAS,KAAA;AAAE,GAAA,EAAA,uBAAA,CAA+B,eACrE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAK,IAAA,KAAK,EAAE;AAAEC,MAAAA,MAAM,EAAE,OAAA;AAAQ,KAAA;AAAE,GAAA,CAAG,eACnC,KACE,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA,eAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AACE,IAAA,KAAK,EAAE;AACLD,MAAAA,QAAQ,EAAE,MAAM;AAChBE,MAAAA,MAAM,EAAE,eAAe;AACvBC,MAAAA,YAAY,EAAE,QAAQ;AACtBL,MAAAA,OAAO,EAAE,OAAO;AAChBM,MAAAA,KAAK,EAAE,KAAK;AACZC,MAAAA,QAAQ,EAAE,MAAA;AACZ,KAAA;AAAE,GAAA,EAEDzC,KAAK,CAAC0C,OAAO,gBAAG,KAAO1C,CAAAA,aAAAA,CAAAA,MAAAA,EAAAA,IAAAA,EAAAA,KAAK,CAAC0C,OAAO,CAAQ,GAAG,IAAI,CAChD,CACF,CACF,CAAA;AAEV,CAAA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/index.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport {\n Route,\n RegisteredRoutesInfo,\n RegisteredRouter,\n RouterStore,\n last,\n warning,\n RouterOptions,\n RouteMatch,\n MatchRouteOptions,\n AnyRoutesInfo,\n DefaultRoutesInfo,\n functionalUpdate,\n RoutesInfo,\n ValidFromPath,\n LinkOptions,\n RouteByPath,\n ResolveRelativePath,\n NoInfer,\n ToOptions,\n invariant,\n Router,\n AnyRootRoute,\n RootRoute,\n AnyRouteMatch,\n NavigateOptions,\n RouterConstructorOptions,\n} from '@tanstack/router'\nimport { useStore } from '@tanstack/react-store'\n\n//\n\nexport * from '@tanstack/router'\n\nexport { useStore }\n\n//\n\ntype ReactNode = any\n\nexport type SyncRouteComponent<TProps = {}> = (props: TProps) => ReactNode\n\nexport type RouteComponent<TProps = {}> = SyncRouteComponent<TProps> & {\n preload?: () => Promise<void>\n}\n\nexport function lazy(\n importer: () => Promise<{ default: SyncRouteComponent }>,\n): RouteComponent {\n const lazyComp = React.lazy(importer as any)\n let preloaded: Promise<SyncRouteComponent>\n\n const finalComp = lazyComp as unknown as RouteComponent\n\n finalComp.preload = async () => {\n if (!preloaded) {\n await importer()\n }\n }\n\n return finalComp\n}\n\nexport type LinkPropsOptions<\n TFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TTo extends string = '',\n> = LinkOptions<RegisteredRoutesInfo, TFrom, TTo> & {\n // A function that returns additional props for the `active` state of this link. These props override other props passed to the link (`style`'s are merged, `className`'s are concatenated)\n activeProps?:\n | React.AnchorHTMLAttributes<HTMLAnchorElement>\n | (() => React.AnchorHTMLAttributes<HTMLAnchorElement>)\n // A function that returns additional props for the `inactive` state of this link. These props override other props passed to the link (`style`'s are merged, `className`'s are concatenated)\n inactiveProps?:\n | React.AnchorHTMLAttributes<HTMLAnchorElement>\n | (() => React.AnchorHTMLAttributes<HTMLAnchorElement>)\n}\n\nexport type MakeUseMatchRouteOptions<\n TFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TTo extends string = '',\n> = ToOptions<RegisteredRoutesInfo, TFrom, TTo> & MatchRouteOptions\n\nexport type MakeMatchRouteOptions<\n TFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TTo extends string = '',\n> = ToOptions<RegisteredRoutesInfo, TFrom, TTo> &\n MatchRouteOptions & {\n // If a function is passed as a child, it will be given the `isActive` boolean to aid in further styling on the element it returns\n children?:\n | ReactNode\n | ((\n params: RouteByPath<\n RegisteredRoutesInfo,\n ResolveRelativePath<TFrom, NoInfer<TTo>>\n >['__types']['allParams'],\n ) => ReactNode)\n }\n\nexport type MakeLinkPropsOptions<\n TFrom extends ValidFromPath<RegisteredRoutesInfo> = '/',\n TTo extends string = '',\n> = LinkPropsOptions<TFrom, TTo> & React.AnchorHTMLAttributes<HTMLAnchorElement>\n\nexport type MakeLinkOptions<\n TFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TTo extends string = '',\n> = LinkPropsOptions<TFrom, TTo> &\n React.AnchorHTMLAttributes<HTMLAnchorElement> &\n Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> & {\n // If a function is passed as a child, it will be given the `isActive` boolean to aid in further styling on the element it returns\n children?: ReactNode | ((state: { isActive: boolean }) => ReactNode)\n }\n\ndeclare module '@tanstack/router' {\n interface FrameworkGenerics {\n Component: RouteComponent\n ErrorComponent: RouteComponent<{\n error: Error\n info: { componentStack: string }\n }>\n }\n\n interface RouterOptions<TRouteTree> {\n // ssrFooter?: () => JSX.Element | Node\n }\n\n interface FrameworkRouteOptions {\n wrapInSuspense?: boolean\n }\n}\n\nexport type PromptProps = {\n message: string\n when?: boolean | any\n children?: ReactNode\n}\n\n//\n\nexport function useLinkProps<\n TFrom extends ValidFromPath<RegisteredRoutesInfo> = '/',\n TTo extends string = '',\n>(\n options: MakeLinkPropsOptions<TFrom, TTo>,\n): React.AnchorHTMLAttributes<HTMLAnchorElement> {\n const router = useRouterContext()\n\n const {\n // custom props\n type,\n children,\n target,\n activeProps = () => ({ className: 'active' }),\n inactiveProps = () => ({}),\n activeOptions,\n disabled,\n // fromCurrent,\n hash,\n search,\n params,\n to = '.',\n preload,\n preloadDelay,\n replace,\n // element props\n style,\n className,\n onClick,\n onFocus,\n onMouseEnter,\n onMouseLeave,\n onTouchStart,\n ...rest\n } = options\n\n const linkInfo = router.buildLink(options as any)\n\n if (linkInfo.type === 'external') {\n const { href } = linkInfo\n return { href }\n }\n\n const {\n handleClick,\n handleFocus,\n handleEnter,\n handleLeave,\n handleTouchStart,\n isActive,\n next,\n } = linkInfo\n\n const reactHandleClick = (e: Event) => {\n if (React.startTransition) {\n // This is a hack for react < 18\n React.startTransition(() => {\n handleClick(e)\n })\n } else {\n handleClick(e)\n }\n }\n\n const composeHandlers =\n (handlers: (undefined | ((e: any) => void))[]) =>\n (e: React.SyntheticEvent) => {\n if (e.persist) e.persist()\n handlers.filter(Boolean).forEach((handler) => {\n if (e.defaultPrevented) return\n handler!(e)\n })\n }\n\n // Get the active props\n const resolvedActiveProps: React.HTMLAttributes<HTMLAnchorElement> = isActive\n ? functionalUpdate(activeProps as any, {}) ?? {}\n : {}\n\n // Get the inactive props\n const resolvedInactiveProps: React.HTMLAttributes<HTMLAnchorElement> =\n isActive ? {} : functionalUpdate(inactiveProps, {}) ?? {}\n\n return {\n ...resolvedActiveProps,\n ...resolvedInactiveProps,\n ...rest,\n href: disabled ? undefined : next.href,\n onClick: composeHandlers([onClick, reactHandleClick]),\n onFocus: composeHandlers([onFocus, handleFocus]),\n onMouseEnter: composeHandlers([onMouseEnter, handleEnter]),\n onMouseLeave: composeHandlers([onMouseLeave, handleLeave]),\n onTouchStart: composeHandlers([onTouchStart, handleTouchStart]),\n target,\n style: {\n ...style,\n ...resolvedActiveProps.style,\n ...resolvedInactiveProps.style,\n },\n className:\n [\n className,\n resolvedActiveProps.className,\n resolvedInactiveProps.className,\n ]\n .filter(Boolean)\n .join(' ') || undefined,\n ...(disabled\n ? {\n role: 'link',\n 'aria-disabled': true,\n }\n : undefined),\n ['data-status']: isActive ? 'active' : undefined,\n }\n}\n\nexport interface LinkFn<\n TDefaultFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TDefaultTo extends string = '',\n> {\n <\n TFrom extends RegisteredRoutesInfo['routePaths'] = TDefaultFrom,\n TTo extends string = TDefaultTo,\n >(\n props: MakeLinkOptions<TFrom, TTo> & React.RefAttributes<HTMLAnchorElement>,\n ): ReactNode\n}\n\nexport const Link: LinkFn = React.forwardRef((props: any, ref) => {\n const linkProps = useLinkProps(props)\n\n return (\n <a\n {...{\n ref: ref as any,\n ...linkProps,\n children:\n typeof props.children === 'function'\n ? props.children({\n isActive: (linkProps as any)['data-status'] === 'active',\n })\n : props.children,\n }}\n />\n )\n}) as any\n\nexport function Navigate<\n TFrom extends RegisteredRoutesInfo['routePaths'] = '/',\n TTo extends string = '',\n>(props: NavigateOptions<RegisteredRoutesInfo, TFrom, TTo>): null {\n const router = useRouterContext()\n\n React.useLayoutEffect(() => {\n router.navigate(props as any)\n }, [])\n\n return null\n}\n\ntype MatchesContextValue = AnyRouteMatch[]\n\nexport const matchesContext = React.createContext<MatchesContextValue>(null!)\nexport const routerContext = React.createContext<{ router: RegisteredRouter }>(\n null!,\n)\n\nexport type MatchesProviderProps = {\n value: MatchesContextValue\n children: ReactNode\n}\n\nexport class ReactRouter<\n TRouteConfig extends AnyRootRoute = RootRoute,\n TRoutesInfo extends AnyRoutesInfo = RoutesInfo<TRouteConfig>,\n> extends Router<TRouteConfig, TRoutesInfo> {\n constructor(opts: RouterConstructorOptions<TRouteConfig>) {\n super({\n ...opts,\n loadComponent: async (component) => {\n if (component.preload) {\n await component.preload()\n }\n\n return component as any\n },\n })\n }\n}\n\nexport type RouterProps<\n TRouteConfig extends AnyRootRoute = RootRoute,\n TRoutesInfo extends AnyRoutesInfo = DefaultRoutesInfo,\n> = RouterOptions<TRouteConfig> & {\n router: Router<TRouteConfig, TRoutesInfo>\n}\n\nexport function RouterProvider<\n TRouteConfig extends AnyRootRoute = RootRoute,\n TRoutesInfo extends AnyRoutesInfo = DefaultRoutesInfo,\n>({ router, ...rest }: RouterProps<TRouteConfig, TRoutesInfo>) {\n router.update(rest)\n\n const currentMatches = useStore(router.__store, (s) => s.currentMatches)\n\n React.useEffect(router.mount, [router])\n\n return (\n <routerContext.Provider value={{ router: router as any }}>\n <matchesContext.Provider value={[undefined!, ...currentMatches]}>\n <CatchBoundary\n errorComponent={ErrorComponent}\n onCatch={() => {\n warning(\n false,\n `Error in router! Consider setting an 'errorComponent' in your RootRoute! 👍`,\n )\n }}\n >\n <Outlet />\n </CatchBoundary>\n </matchesContext.Provider>\n </routerContext.Provider>\n )\n}\n\nexport function useRouterContext(): RegisteredRouter {\n const value = React.useContext(routerContext)\n warning(value, 'useRouter must be used inside a <Router> component!')\n\n useStore(value.router.__store)\n\n return value.router\n}\n\nexport function useRouter<T = RouterStore>(\n track?: (state: Router['__store']) => T,\n shallow?: boolean,\n): RegisteredRouter {\n const router = useRouterContext()\n useStore(router.__store, track as any, shallow)\n return router\n}\n\nexport function useMatches(): RouteMatch[] {\n return React.useContext(matchesContext)\n}\n\nexport function useMatch<\n TFrom extends keyof RegisteredRoutesInfo['routesById'],\n TStrict extends boolean = true,\n TRouteMatch = RouteMatch<\n RegisteredRoutesInfo,\n RegisteredRoutesInfo['routesById'][TFrom]\n >,\n>(opts?: {\n from: TFrom\n strict?: TStrict\n track?: (match: TRouteMatch) => any\n shallow?: boolean\n}): TStrict extends true ? TRouteMatch : TRouteMatch | undefined {\n const router = useRouterContext()\n const nearestMatch = useMatches()[0]!\n const match = opts?.from\n ? router.state.currentMatches.find((d) => d.route.id === opts?.from)\n : nearestMatch\n\n invariant(\n match,\n `Could not find ${\n opts?.from ? `an active match from \"${opts.from}\"` : 'a nearest match!'\n }`,\n )\n\n if (opts?.strict ?? true) {\n invariant(\n nearestMatch.route.id == match?.route.id,\n `useMatch(\"${\n match?.route.id as string\n }\") is being called in a component that is meant to render the '${\n nearestMatch.route.id\n }' route. Did you mean to 'useMatch(\"${\n match?.route.id as string\n }\", { strict: false })' or 'useRoute(\"${\n match?.route.id as string\n }\")' instead?`,\n )\n }\n\n useStore(\n match!.__store as any,\n (d) => opts?.track?.(match as any) ?? match,\n opts?.shallow,\n )\n\n return match as any\n}\n\nexport function useRoute<\n TId extends keyof RegisteredRoutesInfo['routesById'] = '/',\n>(routeId: TId): RegisteredRoutesInfo['routesById'][TId] {\n const router = useRouterContext()\n const resolvedRoute = router.getRoute(routeId as any)\n\n invariant(\n resolvedRoute,\n `Could not find a route for route \"${\n routeId as string\n }\"! Did you forget to add it to your route?`,\n )\n\n return resolvedRoute as any\n}\n\nexport function useSearch<\n TFrom extends keyof RegisteredRoutesInfo['routesById'],\n TStrict extends boolean = true,\n TSearch = RegisteredRoutesInfo['routesById'][TFrom]['__types']['fullSearchSchema'],\n TSelected = TSearch,\n>(opts?: {\n from: TFrom\n strict?: TStrict\n track?: (search: TSearch) => TSelected\n}): TStrict extends true ? TSelected : TSelected | undefined {\n const { track, ...matchOpts } = opts as any\n const match = useMatch(matchOpts)\n useStore(match.__store, (d: any) => opts?.track?.(d.search) ?? d.search, true)\n\n return (match as unknown as RouteMatch).state.search as any\n}\n\nexport function useParams<\n TFrom extends keyof RegisteredRoutesInfo['routesById'] = '/',\n TDefaultSelected = RegisteredRoutesInfo['allParams'] &\n RegisteredRoutesInfo['routesById'][TFrom]['__types']['allParams'],\n TSelected = TDefaultSelected,\n>(opts?: {\n from: TFrom\n track?: (search: TDefaultSelected) => TSelected\n}): TSelected {\n const router = useRouterContext()\n useStore(\n router.__store,\n (d) => {\n const params = last(d.currentMatches)?.params as any\n return opts?.track?.(params) ?? params\n },\n true,\n )\n\n return last(router.state.currentMatches)?.params as any\n}\n\nexport function useNavigate<\n TDefaultFrom extends keyof RegisteredRoutesInfo['routesById'] = '/',\n>(defaultOpts?: { from?: TDefaultFrom }) {\n const router = useRouterContext()\n return React.useCallback(\n <\n TFrom extends keyof RegisteredRoutesInfo['routesById'] = TDefaultFrom,\n TTo extends string = '',\n >(\n opts?: MakeLinkOptions<TFrom, TTo>,\n ) => {\n return router.navigate({ ...defaultOpts, ...(opts as any) })\n },\n [],\n )\n}\n\nexport function useMatchRoute() {\n const router = useRouterContext()\n\n return React.useCallback(\n <\n TFrom extends ValidFromPath<RegisteredRoutesInfo> = '/',\n TTo extends string = '',\n >(\n opts: MakeUseMatchRouteOptions<TFrom, TTo>,\n ) => {\n const { pending, caseSensitive, ...rest } = opts\n\n return router.matchRoute(rest as any, {\n pending,\n caseSensitive,\n })\n },\n [],\n )\n}\n\nexport function MatchRoute<\n TFrom extends ValidFromPath<RegisteredRoutesInfo> = '/',\n TTo extends string = '',\n>(props: MakeMatchRouteOptions<TFrom, TTo>): any {\n const matchRoute = useMatchRoute()\n const params = matchRoute(props)\n\n if (!params) {\n return null\n }\n\n if (typeof props.children === 'function') {\n return (props.children as any)(params)\n }\n\n return params ? props.children : null\n}\n\nexport function Outlet() {\n const matches = useMatches().slice(1)\n const match = matches[0]\n\n if (!match) {\n return null\n }\n\n return <SubOutlet matches={matches} match={match} />\n}\n\nfunction SubOutlet({\n matches,\n match,\n}: {\n matches: RouteMatch[]\n match: RouteMatch\n}) {\n const router = useRouterContext()\n useStore(match!.__store, (store) => [store.status, store.error], true)\n\n const defaultPending = React.useCallback(() => null, [])\n\n const Inner = React.useCallback((props: { match: RouteMatch }): any => {\n if (props.match.state.status === 'error') {\n throw props.match.state.error\n }\n\n if (props.match.state.status === 'success') {\n return React.createElement(\n (props.match.component as any) ??\n router.options.defaultComponent ??\n Outlet,\n )\n }\n\n if (props.match.state.status === 'pending') {\n throw props.match.__loadPromise\n }\n\n invariant(\n false,\n 'Idle routeMatch status encountered during rendering! You should never see this. File an issue!',\n )\n }, [])\n\n const PendingComponent = (match.pendingComponent ??\n router.options.defaultPendingComponent ??\n defaultPending) as any\n\n const errorComponent =\n match.errorComponent ?? router.options.defaultErrorComponent\n\n const ResolvedSuspenseBoundary =\n match.route.options.wrapInSuspense ?? true ? React.Suspense : SafeFragment\n const ResolvedCatchBoundary = errorComponent ? CatchBoundary : SafeFragment\n\n return (\n <matchesContext.Provider value={matches}>\n <ResolvedSuspenseBoundary fallback={<PendingComponent />}>\n <ResolvedCatchBoundary\n key={match.route.id}\n errorComponent={errorComponent}\n onCatch={() => {\n warning(false, `Error in route match: ${match.id}`)\n }}\n >\n <Inner match={match} />\n </ResolvedCatchBoundary>\n </ResolvedSuspenseBoundary>\n </matchesContext.Provider>\n )\n}\n\nfunction SafeFragment(props: any) {\n return <>{props.children}</>\n}\n\n// This is the messiest thing ever... I'm either seriously tired (likely) or\n// there has to be a better way to reset error boundaries when the\n// router's location key changes.\n\nclass CatchBoundary extends React.Component<{\n children: any\n errorComponent: any\n onCatch: (error: any, info: any) => void\n}> {\n state = {\n error: false,\n info: undefined,\n }\n componentDidCatch(error: any, info: any) {\n this.props.onCatch(error, info)\n console.error(error)\n this.setState({\n error,\n info,\n })\n }\n render() {\n return (\n <CatchBoundaryInner\n {...this.props}\n errorState={this.state}\n reset={() => this.setState({})}\n />\n )\n }\n}\n\nfunction CatchBoundaryInner(props: {\n children: any\n errorComponent: any\n errorState: { error: unknown; info: any }\n reset: () => void\n}) {\n const [activeErrorState, setActiveErrorState] = React.useState(\n props.errorState,\n )\n const router = useRouterContext()\n const errorComponent = props.errorComponent ?? ErrorComponent\n const prevKeyRef = React.useRef('' as any)\n\n React.useEffect(() => {\n if (activeErrorState) {\n if (router.state.currentLocation.key !== prevKeyRef.current) {\n setActiveErrorState({} as any)\n }\n }\n\n prevKeyRef.current = router.state.currentLocation.key\n }, [activeErrorState, router.state.currentLocation.key])\n\n React.useEffect(() => {\n if (props.errorState.error) {\n setActiveErrorState(props.errorState)\n }\n // props.reset()\n }, [props.errorState.error])\n\n if (props.errorState.error && activeErrorState.error) {\n return React.createElement(errorComponent, activeErrorState)\n }\n\n return props.children\n}\n\nexport function ErrorComponent({ error }: { error: any }) {\n return (\n <div style={{ padding: '.5rem', maxWidth: '100%' }}>\n <strong style={{ fontSize: '1.2rem' }}>Something went wrong!</strong>\n <div style={{ height: '.5rem' }} />\n <div>\n <pre\n style={{\n fontSize: '.7em',\n border: '1px solid red',\n borderRadius: '.25rem',\n padding: '.5rem',\n color: 'red',\n overflow: 'auto',\n }}\n >\n {error.message ? <code>{error.message}</code> : null}\n </pre>\n </div>\n </div>\n )\n}\n\n// TODO: While we migrate away from the history package, these need to be disabled\n// export function usePrompt(message: string, when: boolean | any): void {\n// const router = useRouter()\n\n// React.useEffect(() => {\n// if (!when) return\n\n// let unblock = router.getHistory().block((transition) => {\n// if (window.confirm(message)) {\n// unblock()\n// transition.retry()\n// } else {\n// router.setStore((s) => {\n// s.currentLocation.pathname = window.location.pathname\n// })\n// }\n// })\n\n// return unblock\n// }, [when, message])\n// }\n\n// export function Prompt({ message, when, children }: PromptProps) {\n// usePrompt(message, when ?? true)\n// return (children ?? null) as ReactNode\n// }\n"],"names":["lazy","importer","lazyComp","React","finalComp","preload","useLinkProps","options","router","useRouterContext","type","children","target","activeProps","className","inactiveProps","activeOptions","disabled","hash","search","params","to","preloadDelay","replace","style","onClick","onFocus","onMouseEnter","onMouseLeave","onTouchStart","rest","linkInfo","buildLink","href","handleClick","handleFocus","handleEnter","handleLeave","handleTouchStart","isActive","next","reactHandleClick","e","startTransition","composeHandlers","handlers","persist","filter","Boolean","forEach","handler","defaultPrevented","resolvedActiveProps","functionalUpdate","resolvedInactiveProps","undefined","join","role","Link","forwardRef","props","ref","linkProps","Navigate","useLayoutEffect","navigate","matchesContext","createContext","routerContext","ReactRouter","Router","constructor","opts","loadComponent","component","RouterProvider","update","currentMatches","useStore","__store","s","useEffect","mount","ErrorComponent","warning","value","useContext","useRouter","track","shallow","useMatches","useMatch","nearestMatch","match","from","state","find","d","route","id","invariant","strict","useRoute","routeId","resolvedRoute","getRoute","useSearch","matchOpts","useParams","last","useNavigate","defaultOpts","useCallback","useMatchRoute","pending","caseSensitive","matchRoute","MatchRoute","Outlet","matches","slice","SubOutlet","store","status","error","defaultPending","Inner","createElement","defaultComponent","__loadPromise","PendingComponent","pendingComponent","defaultPendingComponent","errorComponent","defaultErrorComponent","ResolvedSuspenseBoundary","wrapInSuspense","Suspense","SafeFragment","ResolvedCatchBoundary","CatchBoundary","Component","info","componentDidCatch","onCatch","console","setState","render","CatchBoundaryInner","activeErrorState","setActiveErrorState","useState","errorState","prevKeyRef","useRef","currentLocation","key","current","padding","maxWidth","fontSize","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,IAAA,KAAK,EAAE;AACLD,MAAAA,QAAQ,EAAE,MAAM;AAChBE,MAAAA,MAAM,EAAE,eAAe;AACvBC,MAAAA,YAAY,EAAE,QAAQ;AACtBL,MAAAA,OAAO,EAAE,OAAO;AAChBM,MAAAA,KAAK,EAAE,KAAK;AACZC,MAAAA,QAAQ,EAAE,MAAA;AACZ,KAAA;AAAE,GAAA,EAEDzC,KAAK,CAAC0C,OAAO,gBAAG,KAAO1C,CAAAA,aAAAA,CAAAA,MAAAA,EAAAA,IAAAA,EAAAA,KAAK,CAAC0C,OAAO,CAAQ,GAAG,IAAI,CAChD,CACF,CACF,CAAA;AAEV,CAAA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;"}
@@ -4024,7 +4024,7 @@ var drawChart = (function (exports) {
4024
4024
  </script>
4025
4025
  <script>
4026
4026
  /*<!--*/
4027
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"uid":"ef61-93","name":"\u0000rollupPluginBabelHelpers.js"},{"name":"node_modules/.pnpm","children":[{"name":"tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js","uid":"ef61-95"},{"name":"tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js","uid":"ef61-97"}]},{"name":"packages","children":[{"name":"store/build/esm/index.js","uid":"ef61-99"},{"name":"router/build/esm/index.js","uid":"ef61-101"},{"name":"react-store/build/esm/index.js","uid":"ef61-103"},{"name":"react-router/src/index.tsx","uid":"ef61-105"}]}]}],"isRoot":true},"nodeParts":{"ef61-93":{"renderedLength":429,"gzipLength":238,"brotliLength":0,"mainUid":"ef61-92"},"ef61-95":{"renderedLength":181,"gzipLength":129,"brotliLength":0,"mainUid":"ef61-94"},"ef61-97":{"renderedLength":44,"gzipLength":62,"brotliLength":0,"mainUid":"ef61-96"},"ef61-99":{"renderedLength":1288,"gzipLength":497,"brotliLength":0,"mainUid":"ef61-98"},"ef61-101":{"renderedLength":46875,"gzipLength":11092,"brotliLength":0,"mainUid":"ef61-100"},"ef61-103":{"renderedLength":1571,"gzipLength":594,"brotliLength":0,"mainUid":"ef61-102"},"ef61-105":{"renderedLength":12514,"gzipLength":3242,"brotliLength":0,"mainUid":"ef61-104"}},"nodeMetas":{"ef61-92":{"id":"\u0000rollupPluginBabelHelpers.js","moduleParts":{"index.production.js":"ef61-93"},"imported":[],"importedBy":[{"uid":"ef61-104"}]},"ef61-94":{"id":"/node_modules/.pnpm/tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js","moduleParts":{"index.production.js":"ef61-95"},"imported":[],"importedBy":[{"uid":"ef61-100"}]},"ef61-96":{"id":"/node_modules/.pnpm/tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js","moduleParts":{"index.production.js":"ef61-97"},"imported":[],"importedBy":[{"uid":"ef61-100"}]},"ef61-98":{"id":"/packages/store/build/esm/index.js","moduleParts":{"index.production.js":"ef61-99"},"imported":[],"importedBy":[{"uid":"ef61-100"}]},"ef61-100":{"id":"/packages/router/build/esm/index.js","moduleParts":{"index.production.js":"ef61-101"},"imported":[{"uid":"ef61-94"},{"uid":"ef61-96"},{"uid":"ef61-98"}],"importedBy":[{"uid":"ef61-104"}]},"ef61-102":{"id":"/packages/react-store/build/esm/index.js","moduleParts":{"index.production.js":"ef61-103"},"imported":[{"uid":"ef61-107"}],"importedBy":[{"uid":"ef61-104"}]},"ef61-104":{"id":"/packages/react-router/src/index.tsx","moduleParts":{"index.production.js":"ef61-105"},"imported":[{"uid":"ef61-92"},{"uid":"ef61-106"},{"uid":"ef61-100"},{"uid":"ef61-102"}],"importedBy":[],"isEntry":true},"ef61-106":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"ef61-104"}],"isExternal":true},"ef61-107":{"id":"use-sync-external-store/shim/with-selector","moduleParts":{},"imported":[],"importedBy":[{"uid":"ef61-102"}],"isExternal":true}},"env":{"rollup":"2.79.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
4027
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"uid":"f796-93","name":"\u0000rollupPluginBabelHelpers.js"},{"name":"node_modules/.pnpm","children":[{"name":"tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js","uid":"f796-95"},{"name":"tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js","uid":"f796-97"}]},{"name":"packages","children":[{"name":"store/build/esm/index.js","uid":"f796-99"},{"name":"router/build/esm/index.js","uid":"f796-101"},{"name":"react-store/build/esm/index.js","uid":"f796-103"},{"name":"react-router/src/index.tsx","uid":"f796-105"}]}]}],"isRoot":true},"nodeParts":{"f796-93":{"renderedLength":429,"gzipLength":238,"brotliLength":0,"mainUid":"f796-92"},"f796-95":{"renderedLength":181,"gzipLength":129,"brotliLength":0,"mainUid":"f796-94"},"f796-97":{"renderedLength":44,"gzipLength":62,"brotliLength":0,"mainUid":"f796-96"},"f796-99":{"renderedLength":1288,"gzipLength":497,"brotliLength":0,"mainUid":"f796-98"},"f796-101":{"renderedLength":46874,"gzipLength":11076,"brotliLength":0,"mainUid":"f796-100"},"f796-103":{"renderedLength":1571,"gzipLength":594,"brotliLength":0,"mainUid":"f796-102"},"f796-105":{"renderedLength":12591,"gzipLength":3262,"brotliLength":0,"mainUid":"f796-104"}},"nodeMetas":{"f796-92":{"id":"\u0000rollupPluginBabelHelpers.js","moduleParts":{"index.production.js":"f796-93"},"imported":[],"importedBy":[{"uid":"f796-104"}]},"f796-94":{"id":"/node_modules/.pnpm/tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js","moduleParts":{"index.production.js":"f796-95"},"imported":[],"importedBy":[{"uid":"f796-100"}]},"f796-96":{"id":"/node_modules/.pnpm/tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js","moduleParts":{"index.production.js":"f796-97"},"imported":[],"importedBy":[{"uid":"f796-100"}]},"f796-98":{"id":"/packages/store/build/esm/index.js","moduleParts":{"index.production.js":"f796-99"},"imported":[],"importedBy":[{"uid":"f796-100"}]},"f796-100":{"id":"/packages/router/build/esm/index.js","moduleParts":{"index.production.js":"f796-101"},"imported":[{"uid":"f796-94"},{"uid":"f796-96"},{"uid":"f796-98"}],"importedBy":[{"uid":"f796-104"}]},"f796-102":{"id":"/packages/react-store/build/esm/index.js","moduleParts":{"index.production.js":"f796-103"},"imported":[{"uid":"f796-107"}],"importedBy":[{"uid":"f796-104"}]},"f796-104":{"id":"/packages/react-router/src/index.tsx","moduleParts":{"index.production.js":"f796-105"},"imported":[{"uid":"f796-92"},{"uid":"f796-106"},{"uid":"f796-100"},{"uid":"f796-102"}],"importedBy":[],"isEntry":true},"f796-106":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"f796-104"}],"isExternal":true},"f796-107":{"id":"use-sync-external-store/shim/with-selector","moduleParts":{},"imported":[],"importedBy":[{"uid":"f796-102"}],"isExternal":true}},"env":{"rollup":"2.79.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
4028
4028
 
4029
4029
  const run = () => {
4030
4030
  const width = window.innerWidth;