@tanstack/solid-router
Version:
Modern and scalable routing for Solid applications
1 lines • 20 kB
Source Map (JSON)
{"version":3,"file":"Match.cjs","names":["Solid","rootRouteId","isServer","Dynamic","CatchBoundary","ErrorComponent","useRouter","CatchNotFound","getNotFound","nearestMatchContext","SafeFragment","renderRouteNotFound","ScrollRestoration","ClientOnly","nonRouteComponentContext","renderInNonRouteComponentContext","AnyRoute","AnyRouter","RootRouteOptions","renderScrollRestoration","undefined","router","route","parentRoute","id","options","scrollRestoration","_$createComponent","Match","props","routeId","currentMatch","createMemo","stores","byRoute","get","nearestMatch","const","routesById","routeOptions","resolvePendingComponent","pendingComponent","defaultPendingComponent","routeErrorComponent","errorComponent","defaultErrorComponent","routeNotFoundComponent","isRoot","notFoundComponent","notFoundRoute","component","resolvedNoSsr","ssr","shouldSkipSuspenseFallback","ShellComponent","shellComponent","MatchContent","Show","when","status","fallback","process","env","NODE_ENV","children","MatchInner","Provider","value","Suspense","getResetKey","onCatch","error","Error","notFoundError","console","warn","defaultOnCatch","_$mergeProps","Switch","_$memo","useContext","match","componentKey","current","remount","remountDeps","defaultRemountDeps","deps","loaderDeps","params","_strictParams","search","_strictSearch","JSON","stringify","out","Comp","defaultComponent","Outlet","keyedOut","keyed","_key","_","RouteErrorComponent","info","componentStack","nonRouteComponent","nearestParentMatch","parentMatch","childRouteId","_notFound","ids","indexOf","_routeKey"],"sources":["../../src/Match.tsx"],"sourcesContent":["import * as Solid from 'solid-js'\nimport { rootRouteId } from '@tanstack/router-core'\nimport { isServer } from '@tanstack/router-core/isServer'\nimport { Dynamic } from 'solid-js/web'\nimport { CatchBoundary, ErrorComponent } from './CatchBoundary'\nimport { useRouter } from './useRouter'\nimport { CatchNotFound, getNotFound } from './not-found'\nimport { nearestMatchContext } from './matchContext'\nimport { SafeFragment } from './SafeFragment'\nimport { renderRouteNotFound } from './renderRouteNotFound'\nimport { ScrollRestoration } from './scroll-restoration'\nimport { ClientOnly } from './ClientOnly'\nimport {\n nonRouteComponentContext,\n renderInNonRouteComponentContext,\n} from './nonRouteComponentContext'\nimport type {\n AnyRoute,\n AnyRouter,\n RootRouteOptions,\n} from '@tanstack/router-core'\n\n// Keep the client constant undefined so the server-only script can be dropped.\nconst renderScrollRestoration =\n isServer === false\n ? undefined\n : (router: AnyRouter, route: AnyRoute) =>\n (isServer ?? router.isServer) &&\n route.parentRoute?.id === rootRouteId &&\n router.options.scrollRestoration ? (\n <ScrollRestoration />\n ) : null\n\nexport const Match = (props: { routeId: string }) => {\n const router = useRouter()\n\n const currentMatch = Solid.createMemo(\n () => router.stores.byRoute.get(props.routeId)!.get()!,\n )\n\n const nearestMatch = [() => props.routeId, currentMatch] as const\n\n const route: AnyRoute = router.routesById[props.routeId]\n\n // Lazy route option mutations become observable with the next client match\n // publication. Server stores are non-reactive and options load before render.\n const routeOptions =\n (isServer ?? router.isServer)\n ? () => route.options\n : () => {\n currentMatch()\n return route.options\n }\n\n const resolvePendingComponent = () =>\n routeOptions().pendingComponent ?? router.options.defaultPendingComponent\n\n const routeErrorComponent = () =>\n routeOptions().errorComponent ?? router.options.defaultErrorComponent\n\n const routeNotFoundComponent = () =>\n route.isRoot\n ? // If it's the root route, use the _notFound option, with fallback to the notFoundRoute's component\n (routeOptions().notFoundComponent ??\n router.options.notFoundRoute?.options.component)\n : routeOptions().notFoundComponent\n\n const resolvedNoSsr = () =>\n currentMatch().ssr === false || currentMatch().ssr === 'data-only'\n\n const shouldSkipSuspenseFallback = () =>\n (isServer ?? router.isServer)\n ? resolvedNoSsr()\n : currentMatch().ssr === 'data-only'\n\n const ShellComponent = route.isRoot\n ? ((route.options as RootRouteOptions).shellComponent ?? SafeFragment)\n : SafeFragment\n\n const MatchContent = () => (\n <Solid.Show\n when={currentMatch().status !== 'pending'}\n fallback={(() => {\n if (process.env.NODE_ENV !== 'production') {\n return renderInNonRouteComponentContext(\n () => <Dynamic component={resolvePendingComponent()} />,\n 'pendingComponent',\n )\n }\n return <Dynamic component={resolvePendingComponent()} />\n })()}\n >\n <MatchInner />\n </Solid.Show>\n )\n\n return (\n <ShellComponent>\n <nearestMatchContext.Provider value={nearestMatch}>\n <Solid.Suspense\n fallback={(() => {\n // Data-only SSR renders the inner fallback on the server, so\n // avoid adding an extra suspense fallback on the client.\n if (shouldSkipSuspenseFallback()) {\n return undefined\n }\n if (process.env.NODE_ENV !== 'production') {\n return renderInNonRouteComponentContext(\n () => <Dynamic component={resolvePendingComponent()} />,\n 'pendingComponent',\n )\n }\n return <Dynamic component={resolvePendingComponent()} />\n })()}\n >\n <Dynamic\n component={routeErrorComponent() ? CatchBoundary : SafeFragment}\n getResetKey={currentMatch}\n errorComponent={routeErrorComponent() as any}\n onCatch={(error: Error) => {\n // Forward not found errors (we don't want to show the error component for these)\n const notFoundError = getNotFound(error)\n if (notFoundError) {\n notFoundError.routeId ??= currentMatch().routeId\n throw notFoundError\n }\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n `Warning: Error in route match: ${currentMatch().routeId}`,\n )\n }\n ;(route.options.onCatch ?? router.options.defaultOnCatch)?.(error)\n }}\n >\n <Dynamic\n component={\n routeNotFoundComponent() ? CatchNotFound : SafeFragment\n }\n fallback={(error: any) => {\n const notFoundError = getNotFound(error) ?? error\n\n notFoundError.routeId ??= currentMatch().routeId\n\n if (notFoundError.routeId !== currentMatch().routeId) {\n throw notFoundError\n }\n\n return process.env.NODE_ENV !== 'production' ? (\n renderInNonRouteComponentContext(\n () => (\n <Dynamic\n component={routeNotFoundComponent()}\n {...notFoundError}\n />\n ),\n 'notFoundComponent',\n )\n ) : (\n <Dynamic\n component={routeNotFoundComponent()}\n {...notFoundError}\n />\n )\n }}\n >\n <Solid.Switch>\n <Solid.Match when={resolvedNoSsr()}>\n <ClientOnly\n fallback={(() => {\n if (process.env.NODE_ENV !== 'production') {\n return renderInNonRouteComponentContext(\n () => (\n <Dynamic component={resolvePendingComponent()} />\n ),\n 'pendingComponent',\n )\n }\n return <Dynamic component={resolvePendingComponent()} />\n })()}\n >\n <MatchContent />\n </ClientOnly>\n </Solid.Match>\n <Solid.Match when={!resolvedNoSsr()}>\n <MatchContent />\n </Solid.Match>\n </Solid.Switch>\n </Dynamic>\n </Dynamic>\n </Solid.Suspense>\n </nearestMatchContext.Provider>\n\n {renderScrollRestoration?.(router, route)}\n </ShellComponent>\n )\n}\n\nexport const MatchInner = (): any => {\n const router = useRouter()\n const nearestMatch = Solid.useContext(nearestMatchContext)\n const match = nearestMatch[1 /* match */]\n const routeId = nearestMatch[0 /* route id */]\n const route = router.routesById[routeId()!]!\n const currentMatch = () => match()!\n\n const componentKey = () => {\n const current = currentMatch()\n const remount =\n route.options.remountDeps ?? router.options.defaultRemountDeps\n if (!remount) {\n return routeId()\n }\n const deps = remount({\n routeId: routeId()!,\n loaderDeps: current.loaderDeps,\n params: current._strictParams,\n search: current._strictSearch,\n })\n return JSON.stringify(deps) ?? routeId()\n }\n\n const out = () => {\n const Comp = route.options.component ?? router.options.defaultComponent\n if (Comp) {\n return <Comp />\n }\n return <Outlet />\n }\n\n const keyedOut = () => (\n <Solid.Show when={componentKey()} keyed>\n {(_key) => out()}\n </Solid.Show>\n )\n\n return (\n <Solid.Switch>\n <Solid.Match when={currentMatch().status === 'notFound'}>\n {(_) => renderRouteNotFound(router, route, currentMatch().error)}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'error'}>\n {(_) => {\n if (isServer ?? router.isServer) {\n const RouteErrorComponent =\n (route.options.errorComponent ??\n router.options.defaultErrorComponent) ||\n ErrorComponent\n\n return process.env.NODE_ENV !== 'production' ? (\n renderInNonRouteComponentContext(\n () => (\n <RouteErrorComponent\n error={currentMatch().error}\n info={{\n componentStack: '',\n }}\n />\n ),\n 'errorComponent',\n )\n ) : (\n <RouteErrorComponent\n error={currentMatch().error}\n info={{\n componentStack: '',\n }}\n />\n )\n }\n\n throw currentMatch().error\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'success'}>\n {keyedOut()}\n </Solid.Match>\n </Solid.Switch>\n )\n}\n\nexport const Outlet = () => {\n if (process.env.NODE_ENV !== 'production') {\n const nonRouteComponent = Solid.useContext(nonRouteComponentContext!)\n if (nonRouteComponent) {\n console.warn(\n `Warning: An <Outlet /> was rendered inside a ${nonRouteComponent}. <Outlet /> should only be rendered inside a route component.`,\n )\n }\n }\n\n const router = useRouter()\n const nearestParentMatch = Solid.useContext(nearestMatchContext)\n const parentMatch = nearestParentMatch[1 /* match */]\n const routeId = nearestParentMatch[0 /* route id */]\n const route = router.routesById[routeId()!]!\n\n const childRouteId = () => {\n if (parentMatch()!._notFound) {\n return\n }\n const ids = router.stores.ids.get()\n return ids[ids.indexOf(routeId()!) + 1]\n }\n\n return (\n <Solid.Show\n when={childRouteId()}\n keyed\n fallback={\n parentMatch()!._notFound\n ? renderRouteNotFound(router, route, parentMatch()!.error)\n : undefined\n }\n >\n {(_routeKey: string) => {\n return (\n <Solid.Show\n when={routeId() === rootRouteId}\n fallback={<Match routeId={childRouteId()!} />}\n >\n <Solid.Suspense\n fallback={(() => {\n if (process.env.NODE_ENV !== 'production') {\n return renderInNonRouteComponentContext(\n () => (\n <Dynamic\n component={router.options.defaultPendingComponent}\n />\n ),\n 'pendingComponent',\n )\n }\n return (\n <Dynamic component={router.options.defaultPendingComponent} />\n )\n })()}\n >\n <Match routeId={childRouteId()!} />\n </Solid.Suspense>\n </Solid.Show>\n )\n }}\n </Solid.Show>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAuBA,IAAMmB,0BACJjB,+BAAAA,aAAa,QACTkB,KAAAA,KACCC,QAAmBC,WACjBpB,+BAAAA,YAAYmB,OAAOnB,aACpBoB,MAAMC,aAAaC,OAAOvB,sBAAAA,eAC1BoB,OAAOI,QAAQC,qBAAAA,GAAAA,aAAAA,iBACZd,2BAAAA,mBAAiB,CAAA,CAAA,IAChB;AAEZ,IAAagB,SAASC,UAA+B;CACnD,MAAMR,SAASf,kBAAAA,UAAU;CAEzB,MAAMyB,eAAe/B,SAAMgC,iBACnBX,OAAOY,OAAOC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