🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@tanstack/solid-router

Package Overview
Dependencies
Maintainers
3
Versions
459
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanstack/solid-router - npm Package Compare versions

Comparing version
2.0.0-beta.22
to
2.0.0-beta.23
+1
-1
dist/cjs/Match.cjs

@@ -54,3 +54,3 @@ const require_runtime = require("./_virtual/_rolldown/runtime.cjs");

const routeOnCatch = solid_js.createMemo(() => route().options.onCatch ?? router.options.defaultOnCatch);
const routeNotFoundComponent = solid_js.createMemo(() => route().isRoot ? route().options.notFoundComponent ?? router.options.notFoundRoute?.options.component : route().options.notFoundComponent);
const routeNotFoundComponent = solid_js.createMemo(() => route().isRoot ? route().options.notFoundComponent ?? router.options.notFoundRoute?.options.component ?? router.options.defaultNotFoundComponent : route().options.notFoundComponent ?? router.options.defaultNotFoundComponent);
const resolvedNoSsr = solid_js.createMemo(() => currentMatchState().ssr === false || currentMatchState().ssr === "data-only");

@@ -57,0 +57,0 @@ const ResolvedSuspenseBoundary = solid_js.createMemo(() => resolvedNoSsr() ? require_SafeFragment.SafeFragment : solid_js.Loading);

@@ -1,1 +0,1 @@

{"version":3,"file":"Match.cjs","names":["Solid","createControlledPromise","getLocationChangeInfo","invariant","isNotFound","isRedirect","rootRouteId","isServer","Dynamic","CatchBoundary","ErrorComponent","useRouter","CatchNotFound","getNotFound","nearestMatchContext","SafeFragment","renderRouteNotFound","ScrollRestoration","AnyRoute","RootRouteOptions","NearestMatchContext","Component","value","children","Match","props","matchId","router","match","createMemo","id","undefined","stores","matchStores","get","rawMatchState","currentMatch","routeId","parentRouteId","routesById","parentRoute","ssr","_displayPending","hasPendingMatch","currentRouteId","Boolean","pendingRouteIds","nearestMatch","hasPending","_$createComponent","Show","when","currentMatchState","route","resolvePendingComponent","options","pendingComponent","defaultPendingComponent","routeErrorComponent","errorComponent","defaultErrorComponent","routeOnCatch","onCatch","defaultOnCatch","routeNotFoundComponent","isRoot","notFoundComponent","notFoundRoute","component","resolvedNoSsr","ResolvedSuspenseBoundary","Loading","shouldSkipSuspenseFallback","ResolvedCatchBoundary","ResolvedNotFoundBoundary","ShellComponent","shellComponent","fallback","_$memo","getResetKey","loadedAt","error","Error","notFoundError","process","env","NODE_ENV","console","warn","_$mergeProps","Switch","MatchInner","OnRendered","scrollRestoration","lastOnRenderedKey","WeakMap","location","resolvedLocation","state","__TSR_key","createEffect","const","currentLocationState","currentResolvedLocationState","set","emit","type","useContext","remountFn","remountDeps","defaultRemountDeps","loaderDeps","params","_strictParams","search","_strictSearch","key","JSON","stringify","status","_forcePending","componentKey","Comp","defaultComponent","OutComponent","C","Outlet","RenderOut","getLoadPromise","fallbackMatch","_nonReactive","loadPromise","Promise","getMatch","keyedOut","keyed","_key","_","displayPendingResult","displayPendingPromise","minPendingResult","minPendingPromise","pendingMinMs","untrack","defaultPendingMinMs","routerMatch","setTimeout","resolve","loaderResult","r","FallbackComponent","matchError","_routeId","RouteErrorComponent","info","componentStack","nearestParentMatch","parentMatch","parentGlobalNotFound","globalNotFound","childMatchId","childMatchIdByRouteId","childRouteId","childRoute","childPendingComponent","childMatchStatus","shouldShowNotFound","childRouteKey","cid","resolvedRoute","_routeKey","currentMatchId"],"sources":["../../src/Match.tsx"],"sourcesContent":["import * as Solid from 'solid-js'\nimport {\n createControlledPromise,\n getLocationChangeInfo,\n invariant,\n isNotFound,\n isRedirect,\n rootRouteId,\n} from '@tanstack/router-core'\nimport { isServer } from '@tanstack/router-core/isServer'\nimport { Dynamic } from '@solidjs/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 type { AnyRoute, RootRouteOptions } from '@tanstack/router-core'\n\nconst NearestMatchContext = nearestMatchContext as unknown as Solid.Component<{\n value: any\n children?: any\n}>\n\nexport const Match = (props: { matchId: string }) => {\n const router = useRouter()\n\n const match = Solid.createMemo(() => {\n const id = props.matchId\n if (!id) return undefined\n return router.stores.matchStores.get(id)?.get()\n })\n\n const rawMatchState = Solid.createMemo(() => {\n const currentMatch = match()\n if (!currentMatch) {\n return null\n }\n\n const routeId = currentMatch.routeId as string\n const parentRouteId = (router.routesById[routeId] as AnyRoute)?.parentRoute\n ?.id\n\n return {\n matchId: currentMatch.id,\n routeId,\n ssr: currentMatch.ssr,\n _displayPending: currentMatch._displayPending,\n parentRouteId: parentRouteId as string | undefined,\n }\n })\n\n const hasPendingMatch = Solid.createMemo(() => {\n const currentRouteId = rawMatchState()?.routeId\n return currentRouteId\n ? Boolean(router.stores.pendingRouteIds.get()[currentRouteId])\n : false\n })\n const nearestMatch = {\n matchId: () => rawMatchState()?.matchId,\n routeId: () => rawMatchState()?.routeId,\n match,\n hasPending: hasPendingMatch,\n }\n\n return (\n <Solid.Show when={rawMatchState()}>\n {(currentMatchState) => {\n const route = Solid.createMemo(\n () => router.routesById[currentMatchState().routeId] as AnyRoute,\n )\n\n const resolvePendingComponent = Solid.createMemo(\n () =>\n route().options.pendingComponent ??\n router.options.defaultPendingComponent,\n )\n\n const routeErrorComponent = Solid.createMemo(\n () =>\n route().options.errorComponent ??\n router.options.defaultErrorComponent,\n )\n\n const routeOnCatch = Solid.createMemo(\n () => route().options.onCatch ?? router.options.defaultOnCatch,\n )\n\n const routeNotFoundComponent = Solid.createMemo(() =>\n route().isRoot\n ? // If it's the root route, use the globalNotFound option, with fallback to the notFoundRoute's component\n (route().options.notFoundComponent ??\n router.options.notFoundRoute?.options.component)\n : route().options.notFoundComponent,\n )\n\n const resolvedNoSsr = Solid.createMemo(\n () =>\n currentMatchState().ssr === false ||\n currentMatchState().ssr === 'data-only',\n )\n\n const ResolvedSuspenseBoundary = Solid.createMemo(() =>\n resolvedNoSsr() ? SafeFragment : Solid.Loading,\n )\n const shouldSkipSuspenseFallback = Solid.createMemo(() =>\n (isServer ?? router.isServer)\n ? resolvedNoSsr()\n : currentMatchState().ssr === 'data-only',\n )\n\n const ResolvedCatchBoundary = Solid.createMemo(() =>\n routeErrorComponent() ? CatchBoundary : SafeFragment,\n )\n\n const ResolvedNotFoundBoundary = Solid.createMemo(() =>\n routeNotFoundComponent() ? CatchNotFound : SafeFragment,\n )\n\n const ShellComponent = Solid.createMemo(() =>\n route().isRoot\n ? ((route().options as RootRouteOptions).shellComponent ??\n SafeFragment)\n : SafeFragment,\n )\n\n return (\n <Dynamic component={ShellComponent()}>\n <NearestMatchContext value={nearestMatch}>\n <Dynamic\n component={ResolvedSuspenseBoundary()}\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 shouldSkipSuspenseFallback() ? undefined : (\n <Dynamic component={resolvePendingComponent()} />\n )\n }\n >\n <Dynamic\n component={ResolvedCatchBoundary()}\n getResetKey={() => router.stores.loadedAt.get()}\n errorComponent={routeErrorComponent() || ErrorComponent}\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 ??= currentMatchState()\n .routeId as any\n throw notFoundError\n }\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n `Warning: Error in route match: ${currentMatchState().routeId}`,\n )\n }\n routeOnCatch()?.(error)\n }}\n >\n <Dynamic\n component={ResolvedNotFoundBoundary()}\n fallback={(error: any) => {\n const notFoundError = getNotFound(error) ?? error\n\n notFoundError.routeId ??= currentMatchState()\n .routeId as any\n\n // If the current not found handler doesn't exist or it has a\n // route ID which doesn't match the current route, rethrow the error\n if (\n !routeNotFoundComponent() ||\n (notFoundError.routeId &&\n notFoundError.routeId !==\n currentMatchState().routeId) ||\n (!notFoundError.routeId && !route().isRoot)\n )\n throw notFoundError\n\n return (\n <Dynamic\n component={routeNotFoundComponent()}\n {...notFoundError}\n />\n )\n }}\n >\n <Solid.Switch>\n <Solid.Match when={resolvedNoSsr()}>\n <Solid.Show\n when={!(isServer ?? router.isServer)}\n fallback={\n <Dynamic component={resolvePendingComponent()} />\n }\n >\n <MatchInner />\n </Solid.Show>\n </Solid.Match>\n <Solid.Match when={!resolvedNoSsr()}>\n <MatchInner />\n </Solid.Match>\n </Solid.Switch>\n </Dynamic>\n </Dynamic>\n </Dynamic>\n </NearestMatchContext>\n\n {currentMatchState().parentRouteId === rootRouteId ? (\n <>\n <OnRendered />\n {router.options.scrollRestoration &&\n (isServer ?? router.isServer) ? (\n <ScrollRestoration />\n ) : null}\n </>\n ) : null}\n </Dynamic>\n )\n }}\n </Solid.Show>\n )\n}\n\n// On Rendered can't happen above the root layout because it actually\n// renders a dummy dom element to track the rendered state of the app.\n// We render a script tag with a key that changes based on the current\n// location state.__TSR_key. Also, because it's below the root layout, it\n// allows us to fire onRendered events even after a hydration mismatch\n// error that occurred above the root layout (like bad head/link tags,\n// which is common).\n//\n// In Solid, createEffect(source, fn) fires on initial mount as well as on\n// reactive changes. OnRendered can also remount when the first child route\n// changes (e.g. navigating from / to /posts). We deduplicate by tracking\n// the last emitted resolvedLocation key per router so each unique resolved\n// location only triggers one onRendered event regardless of remounts.\nconst lastOnRenderedKey = new WeakMap<object, string>()\n\nfunction OnRendered() {\n const router = useRouter()\n\n const location = Solid.createMemo(\n () => router.stores.resolvedLocation.get()?.state.__TSR_key,\n )\n Solid.createEffect(\n () =>\n [\n location(),\n router.stores.location.get(),\n router.stores.resolvedLocation.get(),\n ] as const,\n ([location, currentLocationState, currentResolvedLocationState]) => {\n if (!location) return\n if (lastOnRenderedKey.get(router) === location) return\n lastOnRenderedKey.set(router, location)\n router.emit({\n type: 'onRendered',\n ...getLocationChangeInfo(\n currentLocationState,\n currentResolvedLocationState,\n ),\n })\n },\n )\n return null\n}\n\nexport const MatchInner = (): any => {\n const router = useRouter()\n const match = Solid.useContext(nearestMatchContext).match\n\n const rawMatchState = Solid.createMemo(() => {\n const currentMatch = match()\n if (!currentMatch) {\n return null\n }\n\n const routeId = currentMatch.routeId as string\n\n const remountFn =\n (router.routesById[routeId] as AnyRoute).options.remountDeps ??\n router.options.defaultRemountDeps\n const remountDeps = remountFn?.({\n routeId,\n loaderDeps: currentMatch.loaderDeps,\n params: currentMatch._strictParams,\n search: currentMatch._strictSearch,\n })\n const key = remountDeps ? JSON.stringify(remountDeps) : undefined\n\n return {\n key,\n routeId,\n match: {\n id: currentMatch.id,\n status: currentMatch.status,\n error: currentMatch.error,\n _forcePending: currentMatch._forcePending ?? false,\n _displayPending: currentMatch._displayPending ?? false,\n },\n }\n })\n\n return (\n <Solid.Show when={rawMatchState()}>\n {(currentMatchState) => {\n const route = Solid.createMemo(\n () => router.routesById[currentMatchState().routeId]!,\n )\n\n const currentMatch = Solid.createMemo(() => currentMatchState().match)\n\n const componentKey = Solid.createMemo(\n () => currentMatchState().key ?? currentMatchState().match.id,\n )\n\n const Comp = Solid.createMemo(\n () => route().options.component ?? router.options.defaultComponent,\n )\n\n const OutComponent = Solid.createMemo(() => {\n const C = Comp()\n return C || Outlet\n })\n\n const RenderOut = () => <Dynamic component={OutComponent()} />\n\n const getLoadPromise = (\n matchId: string,\n fallbackMatch:\n | {\n _nonReactive: {\n loadPromise?: Promise<void>\n }\n }\n | undefined,\n ) => {\n return (\n router.getMatch(matchId)?._nonReactive.loadPromise ??\n fallbackMatch?._nonReactive.loadPromise\n )\n }\n\n const keyedOut = () => (\n <Solid.Show when={componentKey()} keyed>\n {(_key) => <RenderOut />}\n </Solid.Show>\n )\n\n return (\n <Solid.Switch>\n <Solid.Match when={currentMatch()._displayPending}>\n {(_) => {\n const displayPendingResult = Solid.createMemo(\n () =>\n router.getMatch(currentMatch().id)?._nonReactive\n .displayPendingPromise,\n )\n\n return <>{displayPendingResult()}</>\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch()._forcePending}>\n {(_) => {\n const minPendingResult = Solid.createMemo(\n () =>\n router.getMatch(currentMatch().id)?._nonReactive\n .minPendingPromise,\n )\n\n return <>{minPendingResult()}</>\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'pending'}>\n {(_) => {\n const pendingMinMs = Solid.untrack(\n () =>\n route().options.pendingMinMs ??\n router.options.defaultPendingMinMs,\n )\n\n if (pendingMinMs) {\n const routerMatch = Solid.untrack(() =>\n router.getMatch(currentMatch().id),\n )\n if (\n routerMatch &&\n !routerMatch._nonReactive.minPendingPromise\n ) {\n // Create a promise that will resolve after the minPendingMs\n if (!(isServer ?? router.isServer)) {\n const minPendingPromise = createControlledPromise<void>()\n\n routerMatch._nonReactive.minPendingPromise =\n minPendingPromise\n\n setTimeout(() => {\n minPendingPromise.resolve()\n // We've handled the minPendingPromise, so we can delete it\n routerMatch._nonReactive.minPendingPromise = undefined\n }, pendingMinMs)\n }\n }\n }\n\n const loaderResult = Solid.createMemo(async () => {\n await new Promise((r) => setTimeout(r, 0))\n return router.getMatch(currentMatch().id)?._nonReactive\n .loadPromise\n })\n\n const FallbackComponent = Solid.untrack(\n () =>\n route().options.pendingComponent ??\n router.options.defaultPendingComponent,\n )\n\n return (\n <>\n {FallbackComponent && pendingMinMs > 0 ? (\n <Dynamic component={FallbackComponent} />\n ) : null}\n {loaderResult()}\n </>\n )\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'notFound'}>\n {(_) => {\n const matchError = Solid.untrack(() => currentMatch().error)\n if (!isNotFound(matchError)) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n 'Invariant failed: Expected a notFound error',\n )\n }\n invariant()\n }\n\n // Use Show with keyed to ensure re-render when routeId changes\n return (\n <Solid.Show when={currentMatchState().routeId} keyed>\n {(_routeId) =>\n Solid.untrack(() =>\n renderRouteNotFound(router, route(), matchError),\n )\n }\n </Solid.Show>\n )\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'redirected'}>\n {(_) => {\n if (!isRedirect(currentMatch().error)) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n 'Invariant failed: Expected a redirect error',\n )\n }\n invariant()\n }\n\n return null\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'error'}>\n {(_) => {\n const matchError = Solid.untrack(() => currentMatch().error)\n if (isServer ?? router.isServer) {\n const RouteErrorComponent =\n (route().options.errorComponent ??\n router.options.defaultErrorComponent) ||\n ErrorComponent\n\n return (\n <RouteErrorComponent\n error={matchError}\n info={{\n componentStack: '',\n }}\n />\n )\n }\n\n throw matchError\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'success'}>\n {keyedOut()}\n </Solid.Match>\n </Solid.Switch>\n )\n }}\n </Solid.Show>\n )\n}\n\nexport const Outlet = () => {\n const router = useRouter()\n const nearestParentMatch = Solid.useContext(nearestMatchContext)\n const parentMatch = nearestParentMatch.match\n const routeId = nearestParentMatch.routeId\n const route = Solid.createMemo(() =>\n routeId() ? router.routesById[routeId()!] : undefined,\n )\n\n const parentGlobalNotFound = Solid.createMemo(\n () => parentMatch()?.globalNotFound ?? false,\n )\n\n const childMatchId = Solid.createMemo(() => {\n const currentRouteId = routeId()\n return currentRouteId\n ? router.stores.childMatchIdByRouteId.get()[currentRouteId]\n : undefined\n })\n\n const childRouteId = Solid.createMemo(() => {\n const id = childMatchId()\n if (!id) return undefined\n return router.stores.matchStores.get(id)?.routeId\n })\n\n const childRoute = Solid.createMemo(() => {\n const id = childRouteId()\n return id ? (router.routesById[id] as AnyRoute) : undefined\n })\n\n const childPendingComponent = Solid.createMemo(\n () =>\n childRoute()?.options.pendingComponent ??\n router.options.defaultPendingComponent,\n )\n\n const childMatchStatus = Solid.createMemo(() => {\n const id = childMatchId()\n if (!id) return undefined\n return router.stores.matchStores.get(id)?.get().status\n })\n\n const shouldShowNotFound = () =>\n childMatchStatus() !== 'redirected' && parentGlobalNotFound()\n\n const childRouteKey = Solid.createMemo(() => {\n if (shouldShowNotFound()) return undefined\n const cid = childMatchId()\n if (!cid) return undefined\n return router.stores.matchStores.get(cid)?.routeId ?? cid\n })\n\n return (\n <Solid.Show\n when={childRouteKey()}\n keyed\n fallback={\n <Solid.Show when={shouldShowNotFound() && route()}>\n {(resolvedRoute) =>\n Solid.untrack(() =>\n renderRouteNotFound(router, resolvedRoute(), undefined),\n )\n }\n </Solid.Show>\n }\n >\n {(_routeKey) => {\n const currentMatchId = Solid.createMemo(() => childMatchId())\n\n return (\n <Solid.Show\n when={routeId() === rootRouteId}\n fallback={<Match matchId={currentMatchId()!} />}\n >\n <Solid.Show when={childRouteId()} keyed>\n {(_routeId) => (\n <Solid.Loading\n fallback={\n childPendingComponent() ? (\n <Dynamic component={childPendingComponent()} />\n ) : null\n }\n >\n <Match matchId={currentMatchId()!} />\n </Solid.Loading>\n )}\n </Solid.Show>\n </Solid.Show>\n )\n }}\n </Solid.Show>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAoBA,IAAMoB,sBAAsBN,qBAAAA;AAK5B,IAAaU,SAASC,UAA+B;CACnD,MAAME,SAAShB,kBAAAA,UAAU;CAEzB,MAAMiB,QAAQ5B,SAAM6B,iBAAiB;EACnC,MAAMC,KAAKL,MAAMC;EACjB,IAAI,CAACI,IAAI,OAAOC,KAAAA;EAChB,OAAOJ,OAAOK,OAAOC,YAAYC,IAAIJ,EAAE,GAAGI,IAAI;CAChD,CAAC;CAED,MAAMC,gBAAgBnC,SAAM6B,iBAAiB;EAC3C,MAAMO,eAAeR,MAAM;EAC3B,IAAI,CAACQ,cACH,OAAO;EAGT,MAAMC,UAAUD,aAAaC;EAC7B,MAAMC,gBAAiBX,OAAOY,WAAWF,UAAuBG,aAC5DV;EAEJ,OAAO;GACLJ,SAASU,aAAaN;GACtBO;GACAI,KAAKL,aAAaK;GAClBC,iBAAiBN,aAAaM;GACfJ;EACjB;CACF,CAAC;CAQD,MAAMS,eAAe;EACnBrB,eAAeS,cAAc,GAAGT;EAChCW,eAAeF,cAAc,GAAGE;EAChCT;EACAoB,YAVsBhD,SAAM6B,iBAAiB;GA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CAAA;EAAA;EAAAR,WAKLmJ,cAAc;GACd,MAAMC,iBAAiB3K,SAAM6B,iBAAiBmI,aAAa,CAAC;GAE5D,QAAA,GAAA,aAAA,iBACGhK,SAAMkD,MAAI;IAAA,IACTC,OAAI;KAAA,OAAEd,QAAQ,MAAM/B,sBAAAA;IAAW;IAAA,IAC/BuE,WAAQ;KAAA,QAAA,GAAA,aAAA,iBAAGrD,OAAK,EAAA,IAACE,UAAO;MAAA,OAAEiJ,eAAe;KAAE,EAAA,CAAA;IAAA;IAAA,IAAApJ,WAAA;KAAA,QAAA,GAAA,aAAA,iBAE1CvB,SAAMkD,MAAI;MAAA,IAACC,OAAI;OAAA,OAAE+G,aAAa;MAAC;MAAE3B,OAAK;MAAAhH,WACnCiI,cAAAA,GAAAA,aAAAA,iBACCxJ,SAAMuE,SAAO;OAAA,IACZM,WAAQ;QAAA,QAAA,GAAA,aAAA,YACN,CAAA,CAAAuF,sBAAsB,CAAC,EAAA,KAAA,GAAA,aAAA,iBACpB5J,aAAAA,SAAO,EAAA,IAAC4D,YAAS;SAAA,OAAEgG,sBAAsB;QAAC,EAAA,CAAA,IACzC;OAAI;OAAA,IAAA7I,WAAA;QAAA,QAAA,GAAA,aAAA,iBAGTC,OAAK,EAAA,IAACE,UAAO;SAAA,OAAEiJ,eAAe;QAAE,EAAA,CAAA;OAAA;MAAA,CAAA;KAEpC,CAAA;IAAA;GAAA,CAAA;EAIT;CAAC,CAAA;AAGP"}
{"version":3,"file":"Match.cjs","names":["Solid","createControlledPromise","getLocationChangeInfo","invariant","isNotFound","isRedirect","rootRouteId","isServer","Dynamic","CatchBoundary","ErrorComponent","useRouter","CatchNotFound","getNotFound","nearestMatchContext","SafeFragment","renderRouteNotFound","ScrollRestoration","AnyRoute","RootRouteOptions","NearestMatchContext","Component","value","children","Match","props","matchId","router","match","createMemo","id","undefined","stores","matchStores","get","rawMatchState","currentMatch","routeId","parentRouteId","routesById","parentRoute","ssr","_displayPending","hasPendingMatch","currentRouteId","Boolean","pendingRouteIds","nearestMatch","hasPending","_$createComponent","Show","when","currentMatchState","route","resolvePendingComponent","options","pendingComponent","defaultPendingComponent","routeErrorComponent","errorComponent","defaultErrorComponent","routeOnCatch","onCatch","defaultOnCatch","routeNotFoundComponent","isRoot","notFoundComponent","notFoundRoute","component","defaultNotFoundComponent","resolvedNoSsr","ResolvedSuspenseBoundary","Loading","shouldSkipSuspenseFallback","ResolvedCatchBoundary","ResolvedNotFoundBoundary","ShellComponent","shellComponent","fallback","_$memo","getResetKey","loadedAt","error","Error","notFoundError","process","env","NODE_ENV","console","warn","_$mergeProps","Switch","MatchInner","OnRendered","scrollRestoration","lastOnRenderedKey","WeakMap","location","resolvedLocation","state","__TSR_key","createEffect","const","currentLocationState","currentResolvedLocationState","set","emit","type","useContext","remountFn","remountDeps","defaultRemountDeps","loaderDeps","params","_strictParams","search","_strictSearch","key","JSON","stringify","status","_forcePending","componentKey","Comp","defaultComponent","OutComponent","C","Outlet","RenderOut","getLoadPromise","fallbackMatch","_nonReactive","loadPromise","Promise","getMatch","keyedOut","keyed","_key","_","displayPendingResult","displayPendingPromise","minPendingResult","minPendingPromise","pendingMinMs","untrack","defaultPendingMinMs","routerMatch","setTimeout","resolve","loaderResult","r","FallbackComponent","matchError","_routeId","RouteErrorComponent","info","componentStack","nearestParentMatch","parentMatch","parentGlobalNotFound","globalNotFound","childMatchId","childMatchIdByRouteId","childRouteId","childRoute","childPendingComponent","childMatchStatus","shouldShowNotFound","childRouteKey","cid","resolvedRoute","_routeKey","currentMatchId"],"sources":["../../src/Match.tsx"],"sourcesContent":["import * as Solid from 'solid-js'\nimport {\n createControlledPromise,\n getLocationChangeInfo,\n invariant,\n isNotFound,\n isRedirect,\n rootRouteId,\n} from '@tanstack/router-core'\nimport { isServer } from '@tanstack/router-core/isServer'\nimport { Dynamic } from '@solidjs/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 type { AnyRoute, RootRouteOptions } from '@tanstack/router-core'\n\nconst NearestMatchContext = nearestMatchContext as unknown as Solid.Component<{\n value: any\n children?: any\n}>\n\nexport const Match = (props: { matchId: string }) => {\n const router = useRouter()\n\n const match = Solid.createMemo(() => {\n const id = props.matchId\n if (!id) return undefined\n return router.stores.matchStores.get(id)?.get()\n })\n\n const rawMatchState = Solid.createMemo(() => {\n const currentMatch = match()\n if (!currentMatch) {\n return null\n }\n\n const routeId = currentMatch.routeId as string\n const parentRouteId = (router.routesById[routeId] as AnyRoute)?.parentRoute\n ?.id\n\n return {\n matchId: currentMatch.id,\n routeId,\n ssr: currentMatch.ssr,\n _displayPending: currentMatch._displayPending,\n parentRouteId: parentRouteId as string | undefined,\n }\n })\n\n const hasPendingMatch = Solid.createMemo(() => {\n const currentRouteId = rawMatchState()?.routeId\n return currentRouteId\n ? Boolean(router.stores.pendingRouteIds.get()[currentRouteId])\n : false\n })\n const nearestMatch = {\n matchId: () => rawMatchState()?.matchId,\n routeId: () => rawMatchState()?.routeId,\n match,\n hasPending: hasPendingMatch,\n }\n\n return (\n <Solid.Show when={rawMatchState()}>\n {(currentMatchState) => {\n const route = Solid.createMemo(\n () => router.routesById[currentMatchState().routeId] as AnyRoute,\n )\n\n const resolvePendingComponent = Solid.createMemo(\n () =>\n route().options.pendingComponent ??\n router.options.defaultPendingComponent,\n )\n\n const routeErrorComponent = Solid.createMemo(\n () =>\n route().options.errorComponent ??\n router.options.defaultErrorComponent,\n )\n\n const routeOnCatch = Solid.createMemo(\n () => route().options.onCatch ?? router.options.defaultOnCatch,\n )\n\n // `defaultNotFoundComponent` must be resolved here at render time, not\n // via the lazy route-option mutation in load-matches (which only runs\n // when a notFound is actually handled). Route objects are module\n // singletons shared across server requests, so relying on that mutation\n // makes the presence of the CatchNotFound boundary — and therefore\n // Solid's hydration keys — depend on whether the server has previously\n // served a 404, while a freshly-hydrating client never has it applied.\n const routeNotFoundComponent = Solid.createMemo(() =>\n route().isRoot\n ? // If it's the root route, use the globalNotFound option, with fallback to the notFoundRoute's component\n (route().options.notFoundComponent ??\n router.options.notFoundRoute?.options.component ??\n router.options.defaultNotFoundComponent)\n : (route().options.notFoundComponent ??\n router.options.defaultNotFoundComponent),\n )\n\n const resolvedNoSsr = Solid.createMemo(\n () =>\n currentMatchState().ssr === false ||\n currentMatchState().ssr === 'data-only',\n )\n\n const ResolvedSuspenseBoundary = Solid.createMemo(() =>\n resolvedNoSsr() ? SafeFragment : Solid.Loading,\n )\n const shouldSkipSuspenseFallback = Solid.createMemo(() =>\n (isServer ?? router.isServer)\n ? resolvedNoSsr()\n : currentMatchState().ssr === 'data-only',\n )\n\n const ResolvedCatchBoundary = Solid.createMemo(() =>\n routeErrorComponent() ? CatchBoundary : SafeFragment,\n )\n\n const ResolvedNotFoundBoundary = Solid.createMemo(() =>\n routeNotFoundComponent() ? CatchNotFound : SafeFragment,\n )\n\n const ShellComponent = Solid.createMemo(() =>\n route().isRoot\n ? ((route().options as RootRouteOptions).shellComponent ??\n SafeFragment)\n : SafeFragment,\n )\n\n return (\n <Dynamic component={ShellComponent()}>\n <NearestMatchContext value={nearestMatch}>\n <Dynamic\n component={ResolvedSuspenseBoundary()}\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 shouldSkipSuspenseFallback() ? undefined : (\n <Dynamic component={resolvePendingComponent()} />\n )\n }\n >\n <Dynamic\n component={ResolvedCatchBoundary()}\n getResetKey={() => router.stores.loadedAt.get()}\n errorComponent={routeErrorComponent() || ErrorComponent}\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 ??= currentMatchState()\n .routeId as any\n throw notFoundError\n }\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n `Warning: Error in route match: ${currentMatchState().routeId}`,\n )\n }\n routeOnCatch()?.(error)\n }}\n >\n <Dynamic\n component={ResolvedNotFoundBoundary()}\n fallback={(error: any) => {\n const notFoundError = getNotFound(error) ?? error\n\n notFoundError.routeId ??= currentMatchState()\n .routeId as any\n\n // If the current not found handler doesn't exist or it has a\n // route ID which doesn't match the current route, rethrow the error\n if (\n !routeNotFoundComponent() ||\n (notFoundError.routeId &&\n notFoundError.routeId !==\n currentMatchState().routeId) ||\n (!notFoundError.routeId && !route().isRoot)\n )\n throw notFoundError\n\n return (\n <Dynamic\n component={routeNotFoundComponent()}\n {...notFoundError}\n />\n )\n }}\n >\n <Solid.Switch>\n <Solid.Match when={resolvedNoSsr()}>\n <Solid.Show\n when={!(isServer ?? router.isServer)}\n fallback={\n <Dynamic component={resolvePendingComponent()} />\n }\n >\n <MatchInner />\n </Solid.Show>\n </Solid.Match>\n <Solid.Match when={!resolvedNoSsr()}>\n <MatchInner />\n </Solid.Match>\n </Solid.Switch>\n </Dynamic>\n </Dynamic>\n </Dynamic>\n </NearestMatchContext>\n\n {currentMatchState().parentRouteId === rootRouteId ? (\n <>\n <OnRendered />\n {router.options.scrollRestoration &&\n (isServer ?? router.isServer) ? (\n <ScrollRestoration />\n ) : null}\n </>\n ) : null}\n </Dynamic>\n )\n }}\n </Solid.Show>\n )\n}\n\n// On Rendered can't happen above the root layout because it actually\n// renders a dummy dom element to track the rendered state of the app.\n// We render a script tag with a key that changes based on the current\n// location state.__TSR_key. Also, because it's below the root layout, it\n// allows us to fire onRendered events even after a hydration mismatch\n// error that occurred above the root layout (like bad head/link tags,\n// which is common).\n//\n// In Solid, createEffect(source, fn) fires on initial mount as well as on\n// reactive changes. OnRendered can also remount when the first child route\n// changes (e.g. navigating from / to /posts). We deduplicate by tracking\n// the last emitted resolvedLocation key per router so each unique resolved\n// location only triggers one onRendered event regardless of remounts.\nconst lastOnRenderedKey = new WeakMap<object, string>()\n\nfunction OnRendered() {\n const router = useRouter()\n\n const location = Solid.createMemo(\n () => router.stores.resolvedLocation.get()?.state.__TSR_key,\n )\n Solid.createEffect(\n () =>\n [\n location(),\n router.stores.location.get(),\n router.stores.resolvedLocation.get(),\n ] as const,\n ([location, currentLocationState, currentResolvedLocationState]) => {\n if (!location) return\n if (lastOnRenderedKey.get(router) === location) return\n lastOnRenderedKey.set(router, location)\n router.emit({\n type: 'onRendered',\n ...getLocationChangeInfo(\n currentLocationState,\n currentResolvedLocationState,\n ),\n })\n },\n )\n return null\n}\n\nexport const MatchInner = (): any => {\n const router = useRouter()\n const match = Solid.useContext(nearestMatchContext).match\n\n const rawMatchState = Solid.createMemo(() => {\n const currentMatch = match()\n if (!currentMatch) {\n return null\n }\n\n const routeId = currentMatch.routeId as string\n\n const remountFn =\n (router.routesById[routeId] as AnyRoute).options.remountDeps ??\n router.options.defaultRemountDeps\n const remountDeps = remountFn?.({\n routeId,\n loaderDeps: currentMatch.loaderDeps,\n params: currentMatch._strictParams,\n search: currentMatch._strictSearch,\n })\n const key = remountDeps ? JSON.stringify(remountDeps) : undefined\n\n return {\n key,\n routeId,\n match: {\n id: currentMatch.id,\n status: currentMatch.status,\n error: currentMatch.error,\n _forcePending: currentMatch._forcePending ?? false,\n _displayPending: currentMatch._displayPending ?? false,\n },\n }\n })\n\n return (\n <Solid.Show when={rawMatchState()}>\n {(currentMatchState) => {\n const route = Solid.createMemo(\n () => router.routesById[currentMatchState().routeId]!,\n )\n\n const currentMatch = Solid.createMemo(() => currentMatchState().match)\n\n const componentKey = Solid.createMemo(\n () => currentMatchState().key ?? currentMatchState().match.id,\n )\n\n const Comp = Solid.createMemo(\n () => route().options.component ?? router.options.defaultComponent,\n )\n\n const OutComponent = Solid.createMemo(() => {\n const C = Comp()\n return C || Outlet\n })\n\n const RenderOut = () => <Dynamic component={OutComponent()} />\n\n const getLoadPromise = (\n matchId: string,\n fallbackMatch:\n | {\n _nonReactive: {\n loadPromise?: Promise<void>\n }\n }\n | undefined,\n ) => {\n return (\n router.getMatch(matchId)?._nonReactive.loadPromise ??\n fallbackMatch?._nonReactive.loadPromise\n )\n }\n\n const keyedOut = () => (\n <Solid.Show when={componentKey()} keyed>\n {(_key) => <RenderOut />}\n </Solid.Show>\n )\n\n return (\n <Solid.Switch>\n <Solid.Match when={currentMatch()._displayPending}>\n {(_) => {\n const displayPendingResult = Solid.createMemo(\n () =>\n router.getMatch(currentMatch().id)?._nonReactive\n .displayPendingPromise,\n )\n\n return <>{displayPendingResult()}</>\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch()._forcePending}>\n {(_) => {\n const minPendingResult = Solid.createMemo(\n () =>\n router.getMatch(currentMatch().id)?._nonReactive\n .minPendingPromise,\n )\n\n return <>{minPendingResult()}</>\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'pending'}>\n {(_) => {\n const pendingMinMs = Solid.untrack(\n () =>\n route().options.pendingMinMs ??\n router.options.defaultPendingMinMs,\n )\n\n if (pendingMinMs) {\n const routerMatch = Solid.untrack(() =>\n router.getMatch(currentMatch().id),\n )\n if (\n routerMatch &&\n !routerMatch._nonReactive.minPendingPromise\n ) {\n // Create a promise that will resolve after the minPendingMs\n if (!(isServer ?? router.isServer)) {\n const minPendingPromise = createControlledPromise<void>()\n\n routerMatch._nonReactive.minPendingPromise =\n minPendingPromise\n\n setTimeout(() => {\n minPendingPromise.resolve()\n // We've handled the minPendingPromise, so we can delete it\n routerMatch._nonReactive.minPendingPromise = undefined\n }, pendingMinMs)\n }\n }\n }\n\n const loaderResult = Solid.createMemo(async () => {\n await new Promise((r) => setTimeout(r, 0))\n return router.getMatch(currentMatch().id)?._nonReactive\n .loadPromise\n })\n\n const FallbackComponent = Solid.untrack(\n () =>\n route().options.pendingComponent ??\n router.options.defaultPendingComponent,\n )\n\n return (\n <>\n {FallbackComponent && pendingMinMs > 0 ? (\n <Dynamic component={FallbackComponent} />\n ) : null}\n {loaderResult()}\n </>\n )\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'notFound'}>\n {(_) => {\n const matchError = Solid.untrack(() => currentMatch().error)\n if (!isNotFound(matchError)) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n 'Invariant failed: Expected a notFound error',\n )\n }\n invariant()\n }\n\n // Use Show with keyed to ensure re-render when routeId changes\n return (\n <Solid.Show when={currentMatchState().routeId} keyed>\n {(_routeId) =>\n Solid.untrack(() =>\n renderRouteNotFound(router, route(), matchError),\n )\n }\n </Solid.Show>\n )\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'redirected'}>\n {(_) => {\n if (!isRedirect(currentMatch().error)) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n 'Invariant failed: Expected a redirect error',\n )\n }\n invariant()\n }\n\n return null\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'error'}>\n {(_) => {\n const matchError = Solid.untrack(() => currentMatch().error)\n if (isServer ?? router.isServer) {\n const RouteErrorComponent =\n (route().options.errorComponent ??\n router.options.defaultErrorComponent) ||\n ErrorComponent\n\n return (\n <RouteErrorComponent\n error={matchError}\n info={{\n componentStack: '',\n }}\n />\n )\n }\n\n throw matchError\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'success'}>\n {keyedOut()}\n </Solid.Match>\n </Solid.Switch>\n )\n }}\n </Solid.Show>\n )\n}\n\nexport const Outlet = () => {\n const router = useRouter()\n const nearestParentMatch = Solid.useContext(nearestMatchContext)\n const parentMatch = nearestParentMatch.match\n const routeId = nearestParentMatch.routeId\n const route = Solid.createMemo(() =>\n routeId() ? router.routesById[routeId()!] : undefined,\n )\n\n const parentGlobalNotFound = Solid.createMemo(\n () => parentMatch()?.globalNotFound ?? false,\n )\n\n const childMatchId = Solid.createMemo(() => {\n const currentRouteId = routeId()\n return currentRouteId\n ? router.stores.childMatchIdByRouteId.get()[currentRouteId]\n : undefined\n })\n\n const childRouteId = Solid.createMemo(() => {\n const id = childMatchId()\n if (!id) return undefined\n return router.stores.matchStores.get(id)?.routeId\n })\n\n const childRoute = Solid.createMemo(() => {\n const id = childRouteId()\n return id ? (router.routesById[id] as AnyRoute) : undefined\n })\n\n const childPendingComponent = Solid.createMemo(\n () =>\n childRoute()?.options.pendingComponent ??\n router.options.defaultPendingComponent,\n )\n\n const childMatchStatus = Solid.createMemo(() => {\n const id = childMatchId()\n if (!id) return undefined\n return router.stores.matchStores.get(id)?.get().status\n })\n\n const shouldShowNotFound = () =>\n childMatchStatus() !== 'redirected' && parentGlobalNotFound()\n\n const childRouteKey = Solid.createMemo(() => {\n if (shouldShowNotFound()) return undefined\n const cid = childMatchId()\n if (!cid) return undefined\n return router.stores.matchStores.get(cid)?.routeId ?? cid\n })\n\n return (\n <Solid.Show\n when={childRouteKey()}\n keyed\n fallback={\n <Solid.Show when={shouldShowNotFound() && route()}>\n {(resolvedRoute) =>\n Solid.untrack(() =>\n renderRouteNotFound(router, resolvedRoute(), undefined),\n )\n }\n </Solid.Show>\n }\n >\n {(_routeKey) => {\n const currentMatchId = Solid.createMemo(() => childMatchId())\n\n return (\n <Solid.Show\n when={routeId() === rootRouteId}\n fallback={<Match matchId={currentMatchId()!} />}\n >\n <Solid.Show when={childRouteId()} keyed>\n {(_routeId) => (\n <Solid.Loading\n fallback={\n childPendingComponent() ? (\n <Dynamic component={childPendingComponent()} />\n ) : null\n }\n >\n <Match matchId={currentMatchId()!} />\n </Solid.Loading>\n )}\n </Solid.Show>\n </Solid.Show>\n )\n }}\n </Solid.Show>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAoBA,IAAMoB,sBAAsBN,qBAAAA;AAK5B,IAAaU,SAASC,UAA+B;CACnD,MAAME,SAAShB,kBAAAA,UAAU;CAEzB,MAAMiB,QAAQ5B,SAAM6B,iBAAiB;EACnC,MAAMC,KAAKL,MAAMC;EACjB,IAAI,CAACI,IAAI,OAAOC,KAAAA;EAChB,OAAOJ,OAAOK,OAAOC,YAAYC,IAAIJ,EAAE,GAAGI,IAAI;CAChD,CAAC;CAED,MAAMC,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EAAA,IAACE,UAAO;SAAA,OAAEkJ,eAAe;QAAE,EAAA,CAAA;OAAA;MAAA,CAAA;KAEpC,CAAA;IAAA;GAAA,CAAA;EAIT;CAAC,CAAA;AAGP"}

@@ -52,3 +52,3 @@ import { CatchBoundary, ErrorComponent } from "./CatchBoundary.js";

const routeOnCatch = Solid.createMemo(() => route().options.onCatch ?? router.options.defaultOnCatch);
const routeNotFoundComponent = Solid.createMemo(() => route().isRoot ? route().options.notFoundComponent ?? router.options.notFoundRoute?.options.component : route().options.notFoundComponent);
const routeNotFoundComponent = Solid.createMemo(() => route().isRoot ? route().options.notFoundComponent ?? router.options.notFoundRoute?.options.component ?? router.options.defaultNotFoundComponent : route().options.notFoundComponent ?? router.options.defaultNotFoundComponent);
const resolvedNoSsr = Solid.createMemo(() => currentMatchState().ssr === false || currentMatchState().ssr === "data-only");

@@ -55,0 +55,0 @@ const ResolvedSuspenseBoundary = Solid.createMemo(() => resolvedNoSsr() ? SafeFragment : Solid.Loading);

@@ -1,1 +0,1 @@

{"version":3,"file":"Match.js","names":["Solid","createControlledPromise","getLocationChangeInfo","invariant","isNotFound","isRedirect","rootRouteId","isServer","Dynamic","CatchBoundary","ErrorComponent","useRouter","CatchNotFound","getNotFound","nearestMatchContext","SafeFragment","renderRouteNotFound","ScrollRestoration","AnyRoute","RootRouteOptions","NearestMatchContext","Component","value","children","Match","props","matchId","router","match","createMemo","id","undefined","stores","matchStores","get","rawMatchState","currentMatch","routeId","parentRouteId","routesById","parentRoute","ssr","_displayPending","hasPendingMatch","currentRouteId","Boolean","pendingRouteIds","nearestMatch","hasPending","_$createComponent","Show","when","currentMatchState","route","resolvePendingComponent","options","pendingComponent","defaultPendingComponent","routeErrorComponent","errorComponent","defaultErrorComponent","routeOnCatch","onCatch","defaultOnCatch","routeNotFoundComponent","isRoot","notFoundComponent","notFoundRoute","component","resolvedNoSsr","ResolvedSuspenseBoundary","Loading","shouldSkipSuspenseFallback","ResolvedCatchBoundary","ResolvedNotFoundBoundary","ShellComponent","shellComponent","fallback","_$memo","getResetKey","loadedAt","error","Error","notFoundError","process","env","NODE_ENV","console","warn","_$mergeProps","Switch","MatchInner","OnRendered","scrollRestoration","lastOnRenderedKey","WeakMap","location","resolvedLocation","state","__TSR_key","createEffect","const","currentLocationState","currentResolvedLocationState","set","emit","type","useContext","remountFn","remountDeps","defaultRemountDeps","loaderDeps","params","_strictParams","search","_strictSearch","key","JSON","stringify","status","_forcePending","componentKey","Comp","defaultComponent","OutComponent","C","Outlet","RenderOut","getLoadPromise","fallbackMatch","_nonReactive","loadPromise","Promise","getMatch","keyedOut","keyed","_key","_","displayPendingResult","displayPendingPromise","minPendingResult","minPendingPromise","pendingMinMs","untrack","defaultPendingMinMs","routerMatch","setTimeout","resolve","loaderResult","r","FallbackComponent","matchError","_routeId","RouteErrorComponent","info","componentStack","nearestParentMatch","parentMatch","parentGlobalNotFound","globalNotFound","childMatchId","childMatchIdByRouteId","childRouteId","childRoute","childPendingComponent","childMatchStatus","shouldShowNotFound","childRouteKey","cid","resolvedRoute","_routeKey","currentMatchId"],"sources":["../../src/Match.tsx"],"sourcesContent":["import * as Solid from 'solid-js'\nimport {\n createControlledPromise,\n getLocationChangeInfo,\n invariant,\n isNotFound,\n isRedirect,\n rootRouteId,\n} from '@tanstack/router-core'\nimport { isServer } from '@tanstack/router-core/isServer'\nimport { Dynamic } from '@solidjs/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 type { AnyRoute, RootRouteOptions } from '@tanstack/router-core'\n\nconst NearestMatchContext = nearestMatchContext as unknown as Solid.Component<{\n value: any\n children?: any\n}>\n\nexport const Match = (props: { matchId: string }) => {\n const router = useRouter()\n\n const match = Solid.createMemo(() => {\n const id = props.matchId\n if (!id) return undefined\n return router.stores.matchStores.get(id)?.get()\n })\n\n const rawMatchState = Solid.createMemo(() => {\n const currentMatch = match()\n if (!currentMatch) {\n return null\n }\n\n const routeId = currentMatch.routeId as string\n const parentRouteId = (router.routesById[routeId] as AnyRoute)?.parentRoute\n ?.id\n\n return {\n matchId: currentMatch.id,\n routeId,\n ssr: currentMatch.ssr,\n _displayPending: currentMatch._displayPending,\n parentRouteId: parentRouteId as string | undefined,\n }\n })\n\n const hasPendingMatch = Solid.createMemo(() => {\n const currentRouteId = rawMatchState()?.routeId\n return currentRouteId\n ? Boolean(router.stores.pendingRouteIds.get()[currentRouteId])\n : false\n })\n const nearestMatch = {\n matchId: () => rawMatchState()?.matchId,\n routeId: () => rawMatchState()?.routeId,\n match,\n hasPending: hasPendingMatch,\n }\n\n return (\n <Solid.Show when={rawMatchState()}>\n {(currentMatchState) => {\n const route = Solid.createMemo(\n () => router.routesById[currentMatchState().routeId] as AnyRoute,\n )\n\n const resolvePendingComponent = Solid.createMemo(\n () =>\n route().options.pendingComponent ??\n router.options.defaultPendingComponent,\n )\n\n const routeErrorComponent = Solid.createMemo(\n () =>\n route().options.errorComponent ??\n router.options.defaultErrorComponent,\n )\n\n const routeOnCatch = Solid.createMemo(\n () => route().options.onCatch ?? router.options.defaultOnCatch,\n )\n\n const routeNotFoundComponent = Solid.createMemo(() =>\n route().isRoot\n ? // If it's the root route, use the globalNotFound option, with fallback to the notFoundRoute's component\n (route().options.notFoundComponent ??\n router.options.notFoundRoute?.options.component)\n : route().options.notFoundComponent,\n )\n\n const resolvedNoSsr = Solid.createMemo(\n () =>\n currentMatchState().ssr === false ||\n currentMatchState().ssr === 'data-only',\n )\n\n const ResolvedSuspenseBoundary = Solid.createMemo(() =>\n resolvedNoSsr() ? SafeFragment : Solid.Loading,\n )\n const shouldSkipSuspenseFallback = Solid.createMemo(() =>\n (isServer ?? router.isServer)\n ? resolvedNoSsr()\n : currentMatchState().ssr === 'data-only',\n )\n\n const ResolvedCatchBoundary = Solid.createMemo(() =>\n routeErrorComponent() ? CatchBoundary : SafeFragment,\n )\n\n const ResolvedNotFoundBoundary = Solid.createMemo(() =>\n routeNotFoundComponent() ? CatchNotFound : SafeFragment,\n )\n\n const ShellComponent = Solid.createMemo(() =>\n route().isRoot\n ? ((route().options as RootRouteOptions).shellComponent ??\n SafeFragment)\n : SafeFragment,\n )\n\n return (\n <Dynamic component={ShellComponent()}>\n <NearestMatchContext value={nearestMatch}>\n <Dynamic\n component={ResolvedSuspenseBoundary()}\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 shouldSkipSuspenseFallback() ? undefined : (\n <Dynamic component={resolvePendingComponent()} />\n )\n }\n >\n <Dynamic\n component={ResolvedCatchBoundary()}\n getResetKey={() => router.stores.loadedAt.get()}\n errorComponent={routeErrorComponent() || ErrorComponent}\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 ??= currentMatchState()\n .routeId as any\n throw notFoundError\n }\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n `Warning: Error in route match: ${currentMatchState().routeId}`,\n )\n }\n routeOnCatch()?.(error)\n }}\n >\n <Dynamic\n component={ResolvedNotFoundBoundary()}\n fallback={(error: any) => {\n const notFoundError = getNotFound(error) ?? error\n\n notFoundError.routeId ??= currentMatchState()\n .routeId as any\n\n // If the current not found handler doesn't exist or it has a\n // route ID which doesn't match the current route, rethrow the error\n if (\n !routeNotFoundComponent() ||\n (notFoundError.routeId &&\n notFoundError.routeId !==\n currentMatchState().routeId) ||\n (!notFoundError.routeId && !route().isRoot)\n )\n throw notFoundError\n\n return (\n <Dynamic\n component={routeNotFoundComponent()}\n {...notFoundError}\n />\n )\n }}\n >\n <Solid.Switch>\n <Solid.Match when={resolvedNoSsr()}>\n <Solid.Show\n when={!(isServer ?? router.isServer)}\n fallback={\n <Dynamic component={resolvePendingComponent()} />\n }\n >\n <MatchInner />\n </Solid.Show>\n </Solid.Match>\n <Solid.Match when={!resolvedNoSsr()}>\n <MatchInner />\n </Solid.Match>\n </Solid.Switch>\n </Dynamic>\n </Dynamic>\n </Dynamic>\n </NearestMatchContext>\n\n {currentMatchState().parentRouteId === rootRouteId ? (\n <>\n <OnRendered />\n {router.options.scrollRestoration &&\n (isServer ?? router.isServer) ? (\n <ScrollRestoration />\n ) : null}\n </>\n ) : null}\n </Dynamic>\n )\n }}\n </Solid.Show>\n )\n}\n\n// On Rendered can't happen above the root layout because it actually\n// renders a dummy dom element to track the rendered state of the app.\n// We render a script tag with a key that changes based on the current\n// location state.__TSR_key. Also, because it's below the root layout, it\n// allows us to fire onRendered events even after a hydration mismatch\n// error that occurred above the root layout (like bad head/link tags,\n// which is common).\n//\n// In Solid, createEffect(source, fn) fires on initial mount as well as on\n// reactive changes. OnRendered can also remount when the first child route\n// changes (e.g. navigating from / to /posts). We deduplicate by tracking\n// the last emitted resolvedLocation key per router so each unique resolved\n// location only triggers one onRendered event regardless of remounts.\nconst lastOnRenderedKey = new WeakMap<object, string>()\n\nfunction OnRendered() {\n const router = useRouter()\n\n const location = Solid.createMemo(\n () => router.stores.resolvedLocation.get()?.state.__TSR_key,\n )\n Solid.createEffect(\n () =>\n [\n location(),\n router.stores.location.get(),\n router.stores.resolvedLocation.get(),\n ] as const,\n ([location, currentLocationState, currentResolvedLocationState]) => {\n if (!location) return\n if (lastOnRenderedKey.get(router) === location) return\n lastOnRenderedKey.set(router, location)\n router.emit({\n type: 'onRendered',\n ...getLocationChangeInfo(\n currentLocationState,\n currentResolvedLocationState,\n ),\n })\n },\n )\n return null\n}\n\nexport const MatchInner = (): any => {\n const router = useRouter()\n const match = Solid.useContext(nearestMatchContext).match\n\n const rawMatchState = Solid.createMemo(() => {\n const currentMatch = match()\n if (!currentMatch) {\n return null\n }\n\n const routeId = currentMatch.routeId as string\n\n const remountFn =\n (router.routesById[routeId] as AnyRoute).options.remountDeps ??\n router.options.defaultRemountDeps\n const remountDeps = remountFn?.({\n routeId,\n loaderDeps: currentMatch.loaderDeps,\n params: currentMatch._strictParams,\n search: currentMatch._strictSearch,\n })\n const key = remountDeps ? JSON.stringify(remountDeps) : undefined\n\n return {\n key,\n routeId,\n match: {\n id: currentMatch.id,\n status: currentMatch.status,\n error: currentMatch.error,\n _forcePending: currentMatch._forcePending ?? false,\n _displayPending: currentMatch._displayPending ?? false,\n },\n }\n })\n\n return (\n <Solid.Show when={rawMatchState()}>\n {(currentMatchState) => {\n const route = Solid.createMemo(\n () => router.routesById[currentMatchState().routeId]!,\n )\n\n const currentMatch = Solid.createMemo(() => currentMatchState().match)\n\n const componentKey = Solid.createMemo(\n () => currentMatchState().key ?? currentMatchState().match.id,\n )\n\n const Comp = Solid.createMemo(\n () => route().options.component ?? router.options.defaultComponent,\n )\n\n const OutComponent = Solid.createMemo(() => {\n const C = Comp()\n return C || Outlet\n })\n\n const RenderOut = () => <Dynamic component={OutComponent()} />\n\n const getLoadPromise = (\n matchId: string,\n fallbackMatch:\n | {\n _nonReactive: {\n loadPromise?: Promise<void>\n }\n }\n | undefined,\n ) => {\n return (\n router.getMatch(matchId)?._nonReactive.loadPromise ??\n fallbackMatch?._nonReactive.loadPromise\n )\n }\n\n const keyedOut = () => (\n <Solid.Show when={componentKey()} keyed>\n {(_key) => <RenderOut />}\n </Solid.Show>\n )\n\n return (\n <Solid.Switch>\n <Solid.Match when={currentMatch()._displayPending}>\n {(_) => {\n const displayPendingResult = Solid.createMemo(\n () =>\n router.getMatch(currentMatch().id)?._nonReactive\n .displayPendingPromise,\n )\n\n return <>{displayPendingResult()}</>\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch()._forcePending}>\n {(_) => {\n const minPendingResult = Solid.createMemo(\n () =>\n router.getMatch(currentMatch().id)?._nonReactive\n .minPendingPromise,\n )\n\n return <>{minPendingResult()}</>\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'pending'}>\n {(_) => {\n const pendingMinMs = Solid.untrack(\n () =>\n route().options.pendingMinMs ??\n router.options.defaultPendingMinMs,\n )\n\n if (pendingMinMs) {\n const routerMatch = Solid.untrack(() =>\n router.getMatch(currentMatch().id),\n )\n if (\n routerMatch &&\n !routerMatch._nonReactive.minPendingPromise\n ) {\n // Create a promise that will resolve after the minPendingMs\n if (!(isServer ?? router.isServer)) {\n const minPendingPromise = createControlledPromise<void>()\n\n routerMatch._nonReactive.minPendingPromise =\n minPendingPromise\n\n setTimeout(() => {\n minPendingPromise.resolve()\n // We've handled the minPendingPromise, so we can delete it\n routerMatch._nonReactive.minPendingPromise = undefined\n }, pendingMinMs)\n }\n }\n }\n\n const loaderResult = Solid.createMemo(async () => {\n await new Promise((r) => setTimeout(r, 0))\n return router.getMatch(currentMatch().id)?._nonReactive\n .loadPromise\n })\n\n const FallbackComponent = Solid.untrack(\n () =>\n route().options.pendingComponent ??\n router.options.defaultPendingComponent,\n )\n\n return (\n <>\n {FallbackComponent && pendingMinMs > 0 ? (\n <Dynamic component={FallbackComponent} />\n ) : null}\n {loaderResult()}\n </>\n )\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'notFound'}>\n {(_) => {\n const matchError = Solid.untrack(() => currentMatch().error)\n if (!isNotFound(matchError)) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n 'Invariant failed: Expected a notFound error',\n )\n }\n invariant()\n }\n\n // Use Show with keyed to ensure re-render when routeId changes\n return (\n <Solid.Show when={currentMatchState().routeId} keyed>\n {(_routeId) =>\n Solid.untrack(() =>\n renderRouteNotFound(router, route(), matchError),\n )\n }\n </Solid.Show>\n )\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'redirected'}>\n {(_) => {\n if (!isRedirect(currentMatch().error)) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n 'Invariant failed: Expected a redirect error',\n )\n }\n invariant()\n }\n\n return null\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'error'}>\n {(_) => {\n const matchError = Solid.untrack(() => currentMatch().error)\n if (isServer ?? router.isServer) {\n const RouteErrorComponent =\n (route().options.errorComponent ??\n router.options.defaultErrorComponent) ||\n ErrorComponent\n\n return (\n <RouteErrorComponent\n error={matchError}\n info={{\n componentStack: '',\n }}\n />\n )\n }\n\n throw matchError\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'success'}>\n {keyedOut()}\n </Solid.Match>\n </Solid.Switch>\n )\n }}\n </Solid.Show>\n )\n}\n\nexport const Outlet = () => {\n const router = useRouter()\n const nearestParentMatch = Solid.useContext(nearestMatchContext)\n const parentMatch = nearestParentMatch.match\n const routeId = nearestParentMatch.routeId\n const route = Solid.createMemo(() =>\n routeId() ? router.routesById[routeId()!] : undefined,\n )\n\n const parentGlobalNotFound = Solid.createMemo(\n () => parentMatch()?.globalNotFound ?? false,\n )\n\n const childMatchId = Solid.createMemo(() => {\n const currentRouteId = routeId()\n return currentRouteId\n ? router.stores.childMatchIdByRouteId.get()[currentRouteId]\n : undefined\n })\n\n const childRouteId = Solid.createMemo(() => {\n const id = childMatchId()\n if (!id) return undefined\n return router.stores.matchStores.get(id)?.routeId\n })\n\n const childRoute = Solid.createMemo(() => {\n const id = childRouteId()\n return id ? (router.routesById[id] as AnyRoute) : undefined\n })\n\n const childPendingComponent = Solid.createMemo(\n () =>\n childRoute()?.options.pendingComponent ??\n router.options.defaultPendingComponent,\n )\n\n const childMatchStatus = Solid.createMemo(() => {\n const id = childMatchId()\n if (!id) return undefined\n return router.stores.matchStores.get(id)?.get().status\n })\n\n const shouldShowNotFound = () =>\n childMatchStatus() !== 'redirected' && parentGlobalNotFound()\n\n const childRouteKey = Solid.createMemo(() => {\n if (shouldShowNotFound()) return undefined\n const cid = childMatchId()\n if (!cid) return undefined\n return router.stores.matchStores.get(cid)?.routeId ?? cid\n })\n\n return (\n <Solid.Show\n when={childRouteKey()}\n keyed\n fallback={\n <Solid.Show when={shouldShowNotFound() && route()}>\n {(resolvedRoute) =>\n Solid.untrack(() =>\n renderRouteNotFound(router, resolvedRoute(), undefined),\n )\n }\n </Solid.Show>\n }\n >\n {(_routeKey) => {\n const currentMatchId = Solid.createMemo(() => childMatchId())\n\n return (\n <Solid.Show\n when={routeId() === rootRouteId}\n fallback={<Match matchId={currentMatchId()!} />}\n >\n <Solid.Show when={childRouteId()} keyed>\n {(_routeId) => (\n <Solid.Loading\n fallback={\n childPendingComponent() ? (\n <Dynamic component={childPendingComponent()} />\n ) : null\n }\n >\n <Match matchId={currentMatchId()!} />\n </Solid.Loading>\n )}\n </Solid.Show>\n </Solid.Show>\n )\n }}\n </Solid.Show>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAoBA,IAAMoB,sBAAsBN;AAK5B,IAAaU,SAASC,UAA+B;CACnD,MAAME,SAAShB,UAAU;CAEzB,MAAMiB,QAAQ5B,MAAM6B,iBAAiB;EACnC,MAAMC,KAAKL,MAAMC;EACjB,IAAI,CAACI,IAAI,OAAOC,KAAAA;EAChB,OAAOJ,OAAOK,OAAOC,YAAYC,IAAIJ,EAAE,GAAGI,IAAI;CAChD,CAAC;CAED,MAAMC,gBAAgBnC,MAAM6B,iBAAiB;EAC3C,MAAMO,eAAeR,MAAM;EAC3B,IAAI,CAACQ,cACH,OAAO;EAGT,MAAMC,UAAUD,aAAaC;EAC7B,MAAMC,gBAAiBX,OAAOY,WAAWF,UAAuBG,aAC5DV;EAEJ,OAAO;GACLJ,SAASU,aAAaN;GACtBO;GACAI,KAAKL,aAAaK;GAClBC,iBAAiBN,aAAaM;GACfJ;EACjB;CACF,CAAC;CAQD,MAAMS,eAAe;EACnBrB,eAAeS,cAAc,GAAGT;EAChCW,eAAeF,cAAc,GAAGE;EAChCT;EACAoB,YAVsBhD,MAAM6B,iBAAiB;GAC7C,MAAMe,iBAAiBT,cAAc,GAAGE;GACxC,OAAOO,iBACHC,QAAQlB,OAAOK,OAAOc,gBAAgBZ,IAAI,EAAEU,eAAe,IAC3D;EACN,CAKcD;CACd;CAEA,OAAAM,gBACGjD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":["Solid","createControlledPromise","getLocationChangeInfo","invariant","isNotFound","isRedirect","rootRouteId","isServer","Dynamic","CatchBoundary","ErrorComponent","useRouter","CatchNotFound","getNotFound","nearestMatchContext","SafeFragment","renderRouteNotFound","ScrollRestoration","AnyRoute","RootRouteOptions","NearestMatchContext","Component","value","children","Match","props","matchId","router","match","createMemo","id","undefined","stores","matchStores","get","rawMatchState","currentMatch","routeId","parentRouteId","routesById","parentRoute","ssr","_displayPending","hasPendingMatch","currentRouteId","Boolean","pendingRouteIds","nearestMatch","hasPending","_$createComponent","Show","when","currentMatchState","route","resolvePendingComponent","options","pendingComponent","defaultPendingComponent","routeErrorComponent","errorComponent","defaultErrorComponent","routeOnCatch","onCatch","defaultOnCatch","routeNotFoundComponent","isRoot","notFoundComponent","notFoundRoute","component","defaultNotFoundComponent","resolvedNoSsr","ResolvedSuspenseBoundary","Loading","shouldSkipSuspenseFallback","ResolvedCatchBoundary","ResolvedNotFoundBoundary","ShellComponent","shellComponent","fallback","_$memo","getResetKey","loadedAt","error","Error","notFoundError","process","env","NODE_ENV","console","warn","_$mergeProps","Switch","MatchInner","OnRendered","scrollRestoration","lastOnRenderedKey","WeakMap","location","resolvedLocation","state","__TSR_key","createEffect","const","currentLocationState","currentResolvedLocationState","set","emit","type","useContext","remountFn","remountDeps","defaultRemountDeps","loaderDeps","params","_strictParams","search","_strictSearch","key","JSON","stringify","status","_forcePending","componentKey","Comp","defaultComponent","OutComponent","C","Outlet","RenderOut","getLoadPromise","fallbackMatch","_nonReactive","loadPromise","Promise","getMatch","keyedOut","keyed","_key","_","displayPendingResult","displayPendingPromise","minPendingResult","minPendingPromise","pendingMinMs","untrack","defaultPendingMinMs","routerMatch","setTimeout","resolve","loaderResult","r","FallbackComponent","matchError","_routeId","RouteErrorComponent","info","componentStack","nearestParentMatch","parentMatch","parentGlobalNotFound","globalNotFound","childMatchId","childMatchIdByRouteId","childRouteId","childRoute","childPendingComponent","childMatchStatus","shouldShowNotFound","childRouteKey","cid","resolvedRoute","_routeKey","currentMatchId"],"sources":["../../src/Match.tsx"],"sourcesContent":["import * as Solid from 'solid-js'\nimport {\n createControlledPromise,\n getLocationChangeInfo,\n invariant,\n isNotFound,\n isRedirect,\n rootRouteId,\n} from '@tanstack/router-core'\nimport { isServer } from '@tanstack/router-core/isServer'\nimport { Dynamic } from '@solidjs/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 type { AnyRoute, RootRouteOptions } from '@tanstack/router-core'\n\nconst NearestMatchContext = nearestMatchContext as unknown as Solid.Component<{\n value: any\n children?: any\n}>\n\nexport const Match = (props: { matchId: string }) => {\n const router = useRouter()\n\n const match = Solid.createMemo(() => {\n const id = props.matchId\n if (!id) return undefined\n return router.stores.matchStores.get(id)?.get()\n })\n\n const rawMatchState = Solid.createMemo(() => {\n const currentMatch = match()\n if (!currentMatch) {\n return null\n }\n\n const routeId = currentMatch.routeId as string\n const parentRouteId = (router.routesById[routeId] as AnyRoute)?.parentRoute\n ?.id\n\n return {\n matchId: currentMatch.id,\n routeId,\n ssr: currentMatch.ssr,\n _displayPending: currentMatch._displayPending,\n parentRouteId: parentRouteId as string | undefined,\n }\n })\n\n const hasPendingMatch = Solid.createMemo(() => {\n const currentRouteId = rawMatchState()?.routeId\n return currentRouteId\n ? Boolean(router.stores.pendingRouteIds.get()[currentRouteId])\n : false\n })\n const nearestMatch = {\n matchId: () => rawMatchState()?.matchId,\n routeId: () => rawMatchState()?.routeId,\n match,\n hasPending: hasPendingMatch,\n }\n\n return (\n <Solid.Show when={rawMatchState()}>\n {(currentMatchState) => {\n const route = Solid.createMemo(\n () => router.routesById[currentMatchState().routeId] as AnyRoute,\n )\n\n const resolvePendingComponent = Solid.createMemo(\n () =>\n route().options.pendingComponent ??\n router.options.defaultPendingComponent,\n )\n\n const routeErrorComponent = Solid.createMemo(\n () =>\n route().options.errorComponent ??\n router.options.defaultErrorComponent,\n )\n\n const routeOnCatch = Solid.createMemo(\n () => route().options.onCatch ?? router.options.defaultOnCatch,\n )\n\n // `defaultNotFoundComponent` must be resolved here at render time, not\n // via the lazy route-option mutation in load-matches (which only runs\n // when a notFound is actually handled). Route objects are module\n // singletons shared across server requests, so relying on that mutation\n // makes the presence of the CatchNotFound boundary — and therefore\n // Solid's hydration keys — depend on whether the server has previously\n // served a 404, while a freshly-hydrating client never has it applied.\n const routeNotFoundComponent = Solid.createMemo(() =>\n route().isRoot\n ? // If it's the root route, use the globalNotFound option, with fallback to the notFoundRoute's component\n (route().options.notFoundComponent ??\n router.options.notFoundRoute?.options.component ??\n router.options.defaultNotFoundComponent)\n : (route().options.notFoundComponent ??\n router.options.defaultNotFoundComponent),\n )\n\n const resolvedNoSsr = Solid.createMemo(\n () =>\n currentMatchState().ssr === false ||\n currentMatchState().ssr === 'data-only',\n )\n\n const ResolvedSuspenseBoundary = Solid.createMemo(() =>\n resolvedNoSsr() ? SafeFragment : Solid.Loading,\n )\n const shouldSkipSuspenseFallback = Solid.createMemo(() =>\n (isServer ?? router.isServer)\n ? resolvedNoSsr()\n : currentMatchState().ssr === 'data-only',\n )\n\n const ResolvedCatchBoundary = Solid.createMemo(() =>\n routeErrorComponent() ? CatchBoundary : SafeFragment,\n )\n\n const ResolvedNotFoundBoundary = Solid.createMemo(() =>\n routeNotFoundComponent() ? CatchNotFound : SafeFragment,\n )\n\n const ShellComponent = Solid.createMemo(() =>\n route().isRoot\n ? ((route().options as RootRouteOptions).shellComponent ??\n SafeFragment)\n : SafeFragment,\n )\n\n return (\n <Dynamic component={ShellComponent()}>\n <NearestMatchContext value={nearestMatch}>\n <Dynamic\n component={ResolvedSuspenseBoundary()}\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 shouldSkipSuspenseFallback() ? undefined : (\n <Dynamic component={resolvePendingComponent()} />\n )\n }\n >\n <Dynamic\n component={ResolvedCatchBoundary()}\n getResetKey={() => router.stores.loadedAt.get()}\n errorComponent={routeErrorComponent() || ErrorComponent}\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 ??= currentMatchState()\n .routeId as any\n throw notFoundError\n }\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n `Warning: Error in route match: ${currentMatchState().routeId}`,\n )\n }\n routeOnCatch()?.(error)\n }}\n >\n <Dynamic\n component={ResolvedNotFoundBoundary()}\n fallback={(error: any) => {\n const notFoundError = getNotFound(error) ?? error\n\n notFoundError.routeId ??= currentMatchState()\n .routeId as any\n\n // If the current not found handler doesn't exist or it has a\n // route ID which doesn't match the current route, rethrow the error\n if (\n !routeNotFoundComponent() ||\n (notFoundError.routeId &&\n notFoundError.routeId !==\n currentMatchState().routeId) ||\n (!notFoundError.routeId && !route().isRoot)\n )\n throw notFoundError\n\n return (\n <Dynamic\n component={routeNotFoundComponent()}\n {...notFoundError}\n />\n )\n }}\n >\n <Solid.Switch>\n <Solid.Match when={resolvedNoSsr()}>\n <Solid.Show\n when={!(isServer ?? router.isServer)}\n fallback={\n <Dynamic component={resolvePendingComponent()} />\n }\n >\n <MatchInner />\n </Solid.Show>\n </Solid.Match>\n <Solid.Match when={!resolvedNoSsr()}>\n <MatchInner />\n </Solid.Match>\n </Solid.Switch>\n </Dynamic>\n </Dynamic>\n </Dynamic>\n </NearestMatchContext>\n\n {currentMatchState().parentRouteId === rootRouteId ? (\n <>\n <OnRendered />\n {router.options.scrollRestoration &&\n (isServer ?? router.isServer) ? (\n <ScrollRestoration />\n ) : null}\n </>\n ) : null}\n </Dynamic>\n )\n }}\n </Solid.Show>\n )\n}\n\n// On Rendered can't happen above the root layout because it actually\n// renders a dummy dom element to track the rendered state of the app.\n// We render a script tag with a key that changes based on the current\n// location state.__TSR_key. Also, because it's below the root layout, it\n// allows us to fire onRendered events even after a hydration mismatch\n// error that occurred above the root layout (like bad head/link tags,\n// which is common).\n//\n// In Solid, createEffect(source, fn) fires on initial mount as well as on\n// reactive changes. OnRendered can also remount when the first child route\n// changes (e.g. navigating from / to /posts). We deduplicate by tracking\n// the last emitted resolvedLocation key per router so each unique resolved\n// location only triggers one onRendered event regardless of remounts.\nconst lastOnRenderedKey = new WeakMap<object, string>()\n\nfunction OnRendered() {\n const router = useRouter()\n\n const location = Solid.createMemo(\n () => router.stores.resolvedLocation.get()?.state.__TSR_key,\n )\n Solid.createEffect(\n () =>\n [\n location(),\n router.stores.location.get(),\n router.stores.resolvedLocation.get(),\n ] as const,\n ([location, currentLocationState, currentResolvedLocationState]) => {\n if (!location) return\n if (lastOnRenderedKey.get(router) === location) return\n lastOnRenderedKey.set(router, location)\n router.emit({\n type: 'onRendered',\n ...getLocationChangeInfo(\n currentLocationState,\n currentResolvedLocationState,\n ),\n })\n },\n )\n return null\n}\n\nexport const MatchInner = (): any => {\n const router = useRouter()\n const match = Solid.useContext(nearestMatchContext).match\n\n const rawMatchState = Solid.createMemo(() => {\n const currentMatch = match()\n if (!currentMatch) {\n return null\n }\n\n const routeId = currentMatch.routeId as string\n\n const remountFn =\n (router.routesById[routeId] as AnyRoute).options.remountDeps ??\n router.options.defaultRemountDeps\n const remountDeps = remountFn?.({\n routeId,\n loaderDeps: currentMatch.loaderDeps,\n params: currentMatch._strictParams,\n search: currentMatch._strictSearch,\n })\n const key = remountDeps ? JSON.stringify(remountDeps) : undefined\n\n return {\n key,\n routeId,\n match: {\n id: currentMatch.id,\n status: currentMatch.status,\n error: currentMatch.error,\n _forcePending: currentMatch._forcePending ?? false,\n _displayPending: currentMatch._displayPending ?? false,\n },\n }\n })\n\n return (\n <Solid.Show when={rawMatchState()}>\n {(currentMatchState) => {\n const route = Solid.createMemo(\n () => router.routesById[currentMatchState().routeId]!,\n )\n\n const currentMatch = Solid.createMemo(() => currentMatchState().match)\n\n const componentKey = Solid.createMemo(\n () => currentMatchState().key ?? currentMatchState().match.id,\n )\n\n const Comp = Solid.createMemo(\n () => route().options.component ?? router.options.defaultComponent,\n )\n\n const OutComponent = Solid.createMemo(() => {\n const C = Comp()\n return C || Outlet\n })\n\n const RenderOut = () => <Dynamic component={OutComponent()} />\n\n const getLoadPromise = (\n matchId: string,\n fallbackMatch:\n | {\n _nonReactive: {\n loadPromise?: Promise<void>\n }\n }\n | undefined,\n ) => {\n return (\n router.getMatch(matchId)?._nonReactive.loadPromise ??\n fallbackMatch?._nonReactive.loadPromise\n )\n }\n\n const keyedOut = () => (\n <Solid.Show when={componentKey()} keyed>\n {(_key) => <RenderOut />}\n </Solid.Show>\n )\n\n return (\n <Solid.Switch>\n <Solid.Match when={currentMatch()._displayPending}>\n {(_) => {\n const displayPendingResult = Solid.createMemo(\n () =>\n router.getMatch(currentMatch().id)?._nonReactive\n .displayPendingPromise,\n )\n\n return <>{displayPendingResult()}</>\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch()._forcePending}>\n {(_) => {\n const minPendingResult = Solid.createMemo(\n () =>\n router.getMatch(currentMatch().id)?._nonReactive\n .minPendingPromise,\n )\n\n return <>{minPendingResult()}</>\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'pending'}>\n {(_) => {\n const pendingMinMs = Solid.untrack(\n () =>\n route().options.pendingMinMs ??\n router.options.defaultPendingMinMs,\n )\n\n if (pendingMinMs) {\n const routerMatch = Solid.untrack(() =>\n router.getMatch(currentMatch().id),\n )\n if (\n routerMatch &&\n !routerMatch._nonReactive.minPendingPromise\n ) {\n // Create a promise that will resolve after the minPendingMs\n if (!(isServer ?? router.isServer)) {\n const minPendingPromise = createControlledPromise<void>()\n\n routerMatch._nonReactive.minPendingPromise =\n minPendingPromise\n\n setTimeout(() => {\n minPendingPromise.resolve()\n // We've handled the minPendingPromise, so we can delete it\n routerMatch._nonReactive.minPendingPromise = undefined\n }, pendingMinMs)\n }\n }\n }\n\n const loaderResult = Solid.createMemo(async () => {\n await new Promise((r) => setTimeout(r, 0))\n return router.getMatch(currentMatch().id)?._nonReactive\n .loadPromise\n })\n\n const FallbackComponent = Solid.untrack(\n () =>\n route().options.pendingComponent ??\n router.options.defaultPendingComponent,\n )\n\n return (\n <>\n {FallbackComponent && pendingMinMs > 0 ? (\n <Dynamic component={FallbackComponent} />\n ) : null}\n {loaderResult()}\n </>\n )\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'notFound'}>\n {(_) => {\n const matchError = Solid.untrack(() => currentMatch().error)\n if (!isNotFound(matchError)) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n 'Invariant failed: Expected a notFound error',\n )\n }\n invariant()\n }\n\n // Use Show with keyed to ensure re-render when routeId changes\n return (\n <Solid.Show when={currentMatchState().routeId} keyed>\n {(_routeId) =>\n Solid.untrack(() =>\n renderRouteNotFound(router, route(), matchError),\n )\n }\n </Solid.Show>\n )\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'redirected'}>\n {(_) => {\n if (!isRedirect(currentMatch().error)) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n 'Invariant failed: Expected a redirect error',\n )\n }\n invariant()\n }\n\n return null\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'error'}>\n {(_) => {\n const matchError = Solid.untrack(() => currentMatch().error)\n if (isServer ?? router.isServer) {\n const RouteErrorComponent =\n (route().options.errorComponent ??\n router.options.defaultErrorComponent) ||\n ErrorComponent\n\n return (\n <RouteErrorComponent\n error={matchError}\n info={{\n componentStack: '',\n }}\n />\n )\n }\n\n throw matchError\n }}\n </Solid.Match>\n <Solid.Match when={currentMatch().status === 'success'}>\n {keyedOut()}\n </Solid.Match>\n </Solid.Switch>\n )\n }}\n </Solid.Show>\n )\n}\n\nexport const Outlet = () => {\n const router = useRouter()\n const nearestParentMatch = Solid.useContext(nearestMatchContext)\n const parentMatch = nearestParentMatch.match\n const routeId = nearestParentMatch.routeId\n const route = Solid.createMemo(() =>\n routeId() ? router.routesById[routeId()!] : undefined,\n )\n\n const parentGlobalNotFound = Solid.createMemo(\n () => parentMatch()?.globalNotFound ?? false,\n )\n\n const childMatchId = Solid.createMemo(() => {\n const currentRouteId = routeId()\n return currentRouteId\n ? router.stores.childMatchIdByRouteId.get()[currentRouteId]\n : undefined\n })\n\n const childRouteId = Solid.createMemo(() => {\n const id = childMatchId()\n if (!id) return undefined\n return router.stores.matchStores.get(id)?.routeId\n })\n\n const childRoute = Solid.createMemo(() => {\n const id = childRouteId()\n return id ? (router.routesById[id] as AnyRoute) : undefined\n })\n\n const childPendingComponent = Solid.createMemo(\n () =>\n childRoute()?.options.pendingComponent ??\n router.options.defaultPendingComponent,\n )\n\n const childMatchStatus = Solid.createMemo(() => {\n const id = childMatchId()\n if (!id) return undefined\n return router.stores.matchStores.get(id)?.get().status\n })\n\n const shouldShowNotFound = () =>\n childMatchStatus() !== 'redirected' && parentGlobalNotFound()\n\n const childRouteKey = Solid.createMemo(() => {\n if (shouldShowNotFound()) return undefined\n const cid = childMatchId()\n if (!cid) return undefined\n return router.stores.matchStores.get(cid)?.routeId ?? cid\n })\n\n return (\n <Solid.Show\n when={childRouteKey()}\n keyed\n fallback={\n <Solid.Show when={shouldShowNotFound() && route()}>\n {(resolvedRoute) =>\n Solid.untrack(() =>\n renderRouteNotFound(router, resolvedRoute(), undefined),\n )\n }\n </Solid.Show>\n }\n >\n {(_routeKey) => {\n const currentMatchId = Solid.createMemo(() => childMatchId())\n\n return (\n <Solid.Show\n when={routeId() === rootRouteId}\n fallback={<Match matchId={currentMatchId()!} />}\n >\n <Solid.Show when={childRouteId()} keyed>\n {(_routeId) => (\n <Solid.Loading\n fallback={\n childPendingComponent() ? (\n <Dynamic component={childPendingComponent()} />\n ) : null\n }\n >\n <Match matchId={currentMatchId()!} />\n </Solid.Loading>\n )}\n </Solid.Show>\n </Solid.Show>\n )\n }}\n </Solid.Show>\n )\n}\n"],"mappings":";;;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BAAoBW,QAAQ+I,cAAc,GAAG3I,KAAAA,CAAS,CACxD;GAAC,CAAA;EAAA;EAAAR,WAKLoJ,cAAc;GACd,MAAMC,iBAAiB5K,MAAM6B,iBAAiBoI,aAAa,CAAC;GAE5D,OAAAhH,gBACGjD,MAAMkD,MAAI;IAAA,IACTC,OAAI;KAAA,OAAEd,QAAQ,MAAM/B;IAAW;IAAA,IAC/BwE,WAAQ;KAAA,OAAA7B,gBAAGzB,OAAK,EAAA,IAACE,UAAO;MAAA,OAAEkJ,eAAe;KAAE,EAAA,CAAA;IAAA;IAAA,IAAArJ,WAAA;KAAA,OAAA0B,gBAE1CjD,MAAMkD,MAAI;MAAA,IAACC,OAAI;OAAA,OAAEgH,aAAa;MAAC;MAAE3B,OAAK;MAAAjH,WACnCkI,aAAQxG,gBACPjD,MAAMwE,SAAO;OAAA,IACZM,WAAQ;QAAA,OACNC,WAAA,CAAA,CAAAsF,sBAAsB,CAAC,EAAA,IAAApH,gBACpBzC,SAAO,EAAA,IAAC4D,YAAS;SAAA,OAAEiG,sBAAsB;QAAC,EAAA,CAAA,IACzC;OAAI;OAAA,IAAA9I,WAAA;QAAA,OAAA0B,gBAGTzB,OAAK,EAAA,IAACE,UAAO;SAAA,OAAEkJ,eAAe;QAAE,EAAA,CAAA;OAAA;MAAA,CAAA;KAEpC,CAAA;IAAA;GAAA,CAAA;EAIT;CAAC,CAAA;AAGP"}

@@ -57,7 +57,16 @@ import * as Solid from 'solid-js';

const routeOnCatch = Solid.createMemo(() => route().options.onCatch ?? router.options.defaultOnCatch);
// `defaultNotFoundComponent` must be resolved here at render time, not
// via the lazy route-option mutation in load-matches (which only runs
// when a notFound is actually handled). Route objects are module
// singletons shared across server requests, so relying on that mutation
// makes the presence of the CatchNotFound boundary — and therefore
// Solid's hydration keys — depend on whether the server has previously
// served a 404, while a freshly-hydrating client never has it applied.
const routeNotFoundComponent = Solid.createMemo(() => route().isRoot
? // If it's the root route, use the globalNotFound option, with fallback to the notFoundRoute's component
(route().options.notFoundComponent ??
router.options.notFoundRoute?.options.component)
: route().options.notFoundComponent);
router.options.notFoundRoute?.options.component ??
router.options.defaultNotFoundComponent)
: (route().options.notFoundComponent ??
router.options.defaultNotFoundComponent));
const resolvedNoSsr = Solid.createMemo(() => currentMatchState().ssr === false ||

@@ -64,0 +73,0 @@ currentMatchState().ssr === 'data-only');

@@ -1,1 +0,1 @@

{"version":3,"file":"Match.jsx","sourceRoot":"","sources":["../../src/Match.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,UAAU,CAAA;AACjC,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,SAAS,EACT,UAAU,EACV,UAAU,EACV,WAAW,GACZ,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAGxD,MAAM,mBAAmB,GAAG,mBAG1B,CAAA;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,KAA0B,EAAE,EAAE;IAClD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE1B,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE;QAClC,MAAM,EAAE,GAAG,KAAK,CAAC,OAAO,CAAA;QACxB,IAAI,CAAC,EAAE;YAAE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CAAC,KAAK,CACrC;cAAA,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CACb,CAAC,KAAK,CAAC,OAAO,CACZ,QAAQ,CAAC,CACP,qBAAqB,EAAE,CAAC,CAAC,CAAC,CACxB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,qBAAqB,EAAE,CAAC,EAAG,CAChD,CAAC,CAAC,CAAC,IACN,CAAC,CAED;kBAAA,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,cAAc,EAAG,CAAC,EACpC;gBAAA,EAAE,KAAK,CAAC,OAAO,CAAC,CACjB,CACH;YAAA,EAAE,KAAK,CAAC,IAAI,CACd;UAAA,EAAE,KAAK,CAAC,IAAI,CAAC,CACd,CAAA;QACH,CAAC,CACH;IAAA,EAAE,KAAK,CAAC,IAAI,CAAC,CACd,CAAA;AACH,CAAC,CAAA"}
{
"name": "@tanstack/solid-router",
"version": "2.0.0-beta.22",
"version": "2.0.0-beta.23",
"description": "Modern and scalable routing for Solid applications",

@@ -5,0 +5,0 @@ "author": "Tanner Linsley",

@@ -90,2 +90,9 @@ import * as Solid from 'solid-js'

// `defaultNotFoundComponent` must be resolved here at render time, not
// via the lazy route-option mutation in load-matches (which only runs
// when a notFound is actually handled). Route objects are module
// singletons shared across server requests, so relying on that mutation
// makes the presence of the CatchNotFound boundary — and therefore
// Solid's hydration keys — depend on whether the server has previously
// served a 404, while a freshly-hydrating client never has it applied.
const routeNotFoundComponent = Solid.createMemo(() =>

@@ -95,4 +102,6 @@ route().isRoot

(route().options.notFoundComponent ??
router.options.notFoundRoute?.options.component)
: route().options.notFoundComponent,
router.options.notFoundRoute?.options.component ??
router.options.defaultNotFoundComponent)
: (route().options.notFoundComponent ??
router.options.defaultNotFoundComponent),
)

@@ -99,0 +108,0 @@