@tanstack/solid-router 1.114.29 → 1.114.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -115,15 +115,7 @@ function Transitioner() {
115
115
  status: "idle",
116
116
  resolvedLocation: s.location
117
117
  }));
118
- if (typeof document !== "undefined" && document.querySelector) {
119
- const hashScrollIntoViewOptions = router.state.location.state.__hashScrollIntoViewOptions ?? true;
120
- if (hashScrollIntoViewOptions && router.state.location.hash !== "") {
121
- const el = document.getElementById(router.state.location.hash);
122
- if (el) {
123
- el.scrollIntoView(hashScrollIntoViewOptions);
124
- }
125
- }
126
- }
118
+ routerCore.handleHashScroll(router);
127
119
  }
128
120
  }));
129
121
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"Transitioner.cjs","sources":["../../src/Transitioner.tsx"],"sourcesContent":["import * as Solid from 'solid-js'\nimport { getLocationChangeInfo, trimPathRight } from '@tanstack/router-core'\nimport { useRouter } from './useRouter'\nimport { useRouterState } from './useRouterState'\nimport { usePrevious } from './utils'\n\nexport function Transitioner() {\n const router = useRouter()\n let mountLoadForRouter = { router, mounted: false }\n const isLoading = useRouterState({\n select: ({ isLoading }) => isLoading,\n })\n\n const [isTransitioning, setIsTransitioning] = Solid.createSignal(false)\n // Track pending state changes\n const hasPendingMatches = useRouterState({\n select: (s) => s.matches.some((d) => d.status === 'pending'),\n })\n\n const previousIsLoading = usePrevious(isLoading)\n\n const isAnyPending = () =>\n isLoading() || isTransitioning() || hasPendingMatches()\n const previousIsAnyPending = usePrevious(isAnyPending)\n\n const isPagePending = () => isLoading() || hasPendingMatches()\n const previousIsPagePending = usePrevious(isPagePending)\n\n if (!router.isServer) {\n router.startTransition = (fn: () => void) => {\n setIsTransitioning(true)\n fn()\n setIsTransitioning(false)\n }\n }\n\n // Subscribe to location changes\n // and try to load the new location\n Solid.onMount(() => {\n const unsub = router.history.subscribe(router.load)\n\n const nextLocation = router.buildLocation({\n to: router.latestLocation.pathname,\n search: true,\n params: true,\n hash: true,\n state: true,\n _includeValidateSearch: true,\n })\n\n if (\n trimPathRight(router.latestLocation.href) !==\n trimPathRight(nextLocation.href)\n ) {\n router.commitLocation({ ...nextLocation, replace: true })\n }\n\n Solid.onCleanup(() => {\n unsub()\n })\n })\n\n // Try to load the initial location\n Solid.createRenderEffect(() => {\n Solid.untrack(() => {\n if (\n (typeof window !== 'undefined' && router.clientSsr) ||\n (mountLoadForRouter.router === router && mountLoadForRouter.mounted)\n ) {\n return\n }\n mountLoadForRouter = { router, mounted: true }\n const tryLoad = async () => {\n try {\n await router.load()\n } catch (err) {\n console.error(err)\n }\n }\n tryLoad()\n })\n })\n\n Solid.createRenderEffect(\n Solid.on(\n [previousIsLoading, isLoading],\n ([previousIsLoading, isLoading]) => {\n if (previousIsLoading.previous && !isLoading) {\n router.emit({\n type: 'onLoad',\n ...getLocationChangeInfo(router.state),\n })\n }\n },\n ),\n )\n Solid.createRenderEffect(\n Solid.on(\n [isPagePending, previousIsPagePending],\n ([isPagePending, previousIsPagePending]) => {\n // emit onBeforeRouteMount\n if (previousIsPagePending.previous && !isPagePending) {\n router.emit({\n type: 'onBeforeRouteMount',\n ...getLocationChangeInfo(router.state),\n })\n }\n },\n ),\n )\n\n Solid.createRenderEffect(\n Solid.on(\n [isAnyPending, previousIsAnyPending],\n ([isAnyPending, previousIsAnyPending]) => {\n // The router was pending and now it's not\n if (previousIsAnyPending.previous && !isAnyPending) {\n router.emit({\n type: 'onResolved',\n ...getLocationChangeInfo(router.state),\n })\n\n router.__store.setState((s) => ({\n ...s,\n status: 'idle',\n resolvedLocation: s.location,\n }))\n\n if (\n typeof document !== 'undefined' &&\n (document as any).querySelector\n ) {\n const hashScrollIntoViewOptions =\n router.state.location.state.__hashScrollIntoViewOptions ?? true\n\n if (\n hashScrollIntoViewOptions &&\n router.state.location.hash !== ''\n ) {\n const el = document.getElementById(router.state.location.hash)\n if (el) {\n el.scrollIntoView(hashScrollIntoViewOptions)\n }\n }\n }\n }\n },\n ),\n )\n\n return null\n}\n"],"names":["Transitioner","router","useRouter","mountLoadForRouter","mounted","isLoading","useRouterState","select","isTransitioning","setIsTransitioning","Solid","createSignal","hasPendingMatches","s","matches","some","d","status","previousIsLoading","usePrevious","isAnyPending","previousIsAnyPending","isPagePending","previousIsPagePending","isServer","startTransition","fn","onMount","unsub","history","subscribe","load","nextLocation","buildLocation","to","latestLocation","pathname","search","params","hash","state","_includeValidateSearch","trimPathRight","href","commitLocation","replace","onCleanup","createRenderEffect","untrack","window","clientSsr","tryLoad","err","console","error","on","previous","emit","type","getLocationChangeInfo","__store","setState","resolvedLocation","location","document","querySelector","hashScrollIntoViewOptions","__hashScrollIntoViewOptions","el","getElementById","scrollIntoView"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAMO,SAASA,eAAe;AAC7B,QAAMC,SAASC,UAAAA,UAAU;AACzB,MAAIC,qBAAqB;AAAA,IAAEF;AAAAA,IAAQG,SAAS;AAAA,EAAM;AAClD,QAAMC,YAAYC,eAAAA,eAAe;AAAA,IAC/BC,QAAQA,CAAC;AAAA,MAAEF,WAAAA;AAAAA,IAAAA,MAAgBA;AAAAA,EAAAA,CAC5B;AAED,QAAM,CAACG,iBAAiBC,kBAAkB,IAAIC,iBAAMC,aAAa,KAAK;AAEtE,QAAMC,oBAAoBN,eAAAA,eAAe;AAAA,IACvCC,QAASM,OAAMA,EAAEC,QAAQC,KAAMC,CAAMA,MAAAA,EAAEC,WAAW,SAAS;AAAA,EAAA,CAC5D;AAEKC,QAAAA,oBAAoBC,kBAAYd,SAAS;AAE/C,QAAMe,eAAeA,MACnBf,UAAeG,KAAAA,gBAAAA,KAAqBI,kBAAkB;AAClDS,QAAAA,uBAAuBF,kBAAYC,YAAY;AAErD,QAAME,gBAAgBA,MAAMjB,UAAU,KAAKO,kBAAkB;AACvDW,QAAAA,wBAAwBJ,kBAAYG,aAAa;AAEnD,MAAA,CAACrB,OAAOuB,UAAU;AACbC,WAAAA,kBAAkB,CAAC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esContent":["import * as Solid from 'solid-js'\nimport {\n getLocationChangeInfo,\n handleHashScroll,\n trimPathRight,\n} from '@tanstack/router-core'\nimport { useRouter } from './useRouter'\nimport { useRouterState } from './useRouterState'\nimport { usePrevious } from './utils'\n\nexport function Transitioner() {\n const router = useRouter()\n let mountLoadForRouter = { router, mounted: false }\n const isLoading = useRouterState({\n select: ({ isLoading }) => isLoading,\n })\n\n const [isTransitioning, setIsTransitioning] = Solid.createSignal(false)\n // Track pending state changes\n const hasPendingMatches = useRouterState({\n select: (s) => s.matches.some((d) => d.status === 'pending'),\n })\n\n const previousIsLoading = usePrevious(isLoading)\n\n const isAnyPending = () =>\n isLoading() || isTransitioning() || hasPendingMatches()\n const previousIsAnyPending = usePrevious(isAnyPending)\n\n const isPagePending = () => isLoading() || hasPendingMatches()\n const previousIsPagePending = usePrevious(isPagePending)\n\n if (!router.isServer) {\n router.startTransition = (fn: () => void) => {\n setIsTransitioning(true)\n fn()\n setIsTransitioning(false)\n }\n }\n\n // Subscribe to location changes\n // and try to load the new location\n Solid.onMount(() => {\n const unsub = router.history.subscribe(router.load)\n\n const nextLocation = router.buildLocation({\n to: router.latestLocation.pathname,\n search: true,\n params: true,\n hash: true,\n state: true,\n _includeValidateSearch: true,\n })\n\n if (\n trimPathRight(router.latestLocation.href) !==\n trimPathRight(nextLocation.href)\n ) {\n router.commitLocation({ ...nextLocation, replace: true })\n }\n\n Solid.onCleanup(() => {\n unsub()\n })\n })\n\n // Try to load the initial location\n Solid.createRenderEffect(() => {\n Solid.untrack(() => {\n if (\n (typeof window !== 'undefined' && router.clientSsr) ||\n (mountLoadForRouter.router === router && mountLoadForRouter.mounted)\n ) {\n return\n }\n mountLoadForRouter = { router, mounted: true }\n const tryLoad = async () => {\n try {\n await router.load()\n } catch (err) {\n console.error(err)\n }\n }\n tryLoad()\n })\n })\n\n Solid.createRenderEffect(\n Solid.on(\n [previousIsLoading, isLoading],\n ([previousIsLoading, isLoading]) => {\n if (previousIsLoading.previous && !isLoading) {\n router.emit({\n type: 'onLoad',\n ...getLocationChangeInfo(router.state),\n })\n }\n },\n ),\n )\n Solid.createRenderEffect(\n Solid.on(\n [isPagePending, previousIsPagePending],\n ([isPagePending, previousIsPagePending]) => {\n // emit onBeforeRouteMount\n if (previousIsPagePending.previous && !isPagePending) {\n router.emit({\n type: 'onBeforeRouteMount',\n ...getLocationChangeInfo(router.state),\n })\n }\n },\n ),\n )\n\n Solid.createRenderEffect(\n Solid.on(\n [isAnyPending, previousIsAnyPending],\n ([isAnyPending, previousIsAnyPending]) => {\n // The router was pending and now it's not\n if (previousIsAnyPending.previous && !isAnyPending) {\n router.emit({\n type: 'onResolved',\n ...getLocationChangeInfo(router.state),\n })\n\n router.__store.setState((s) => ({\n ...s,\n status: 'idle',\n resolvedLocation: s.location,\n }))\n\n handleHashScroll(router)\n }\n },\n ),\n )\n\n return null\n}\n"],"names":["Transitioner","router","useRouter","mountLoadForRouter","mounted","isLoading","useRouterState","select","isTransitioning","setIsTransitioning","Solid","createSignal","hasPendingMatches","s","matches","some","d","status","previousIsLoading","usePrevious","isAnyPending","previousIsAnyPending","isPagePending","previousIsPagePending","isServer","startTransition","fn","onMount","unsub","history","subscribe","load","nextLocation","buildLocation","to","latestLocation","pathname","search","params","hash","state","_includeValidateSearch","trimPathRight","href","commitLocation","replace","onCleanup","createRenderEffect","untrack","window","clientSsr","tryLoad","err","console","error","on","previous","emit","type","getLocationChangeInfo","__store","setState","resolvedLocation","location","handleHashScroll"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAUO,SAASA,eAAe;AAC7B,QAAMC,SAASC,UAAAA,UAAU;AACzB,MAAIC,qBAAqB;AAAA,IAAEF;AAAAA,IAAQG,SAAS;AAAA,EAAM;AAClD,QAAMC,YAAYC,eAAAA,eAAe;AAAA,IAC/BC,QAAQA,CAAC;AAAA,MAAEF,WAAAA;AAAAA,IAAAA,MAAgBA;AAAAA,EAAAA,CAC5B;AAED,QAAM,CAACG,iBAAiBC,kBAAkB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BjD,EAAEkD;AAAAA,MAAAA,EACpB;AAEFC,iBAAAA,iBAAiB/D,MAAM;AAAA,IAAA;AAAA,EACzB,CAEJ,CACF;AAEO,SAAA;AACT;;"}
@@ -2,7 +2,7 @@ export { default as invariant } from 'tiny-invariant';
2
2
  export { default as warning } from 'tiny-warning';
3
3
  export { defer, TSR_DEFERRED_PROMISE, isMatch, joinPaths, cleanPath, trimPathLeft, trimPathRight, trimPath, resolvePath, parsePathname, interpolatePath, matchPathname, removeBasepath, matchByPath, encode, decode, rootRouteId, defaultSerializeError, defaultParseSearch, defaultStringifySearch, parseSearchWith, stringifySearchWith, escapeJSON, // SSR
4
4
  pick, functionalUpdate, replaceEqualDeep, isPlainObject, isPlainArray, deepEqual, shallow, createControlledPromise, retainSearchParams, stripSearchParams, } from '@tanstack/router-core';
5
- export type { StartSerializer, Serializable, SerializerParse, SerializerParseBy, SerializerStringify, SerializerStringifyBy, DeferredPromiseState, DeferredPromise, ParsedLocation, ParsePathParams, RemoveTrailingSlashes, RemoveLeadingSlashes, ActiveOptions, Segment, ResolveRelativePath, RootRouteId, AnyPathParams, ResolveParams, SearchSchemaInput, AnyContext, RouteContext, PreloadableObj, RoutePathOptions, StaticDataRouteOption, RoutePathOptionsIntersection, UpdatableStaticRouteOption, MetaDescriptor, RouteLinkEntry, ParseParamsFn, SearchFilter, ResolveId, InferFullSearchSchema, InferFullSearchSchemaInput, ErrorRouteProps, ErrorComponentProps, NotFoundRouteProps, TrimPath, TrimPathLeft, TrimPathRight, ParseSplatParams, SplatParams, StringifyParamsFn, ParamsOptions, InferAllParams, InferAllContext, LooseReturnType, LooseAsyncReturnType, ContextReturnType, ContextAsyncReturnType, ResolveLoaderData, ResolveRouteContext, SearchSerializer, SearchParser, TrailingSlashOption, ExtractedEntry, ExtractedStream, ExtractedPromise, StreamState, Manifest, RouterManagedTag, ControlledPromise, Constrain, Expand, MergeAll, Assign, IntersectAssign, ResolveValidatorInput, ResolveValidatorOutput, AnyValidator, DefaultValidator, ValidatorFn, AnySchema, AnyValidatorAdapter, AnyValidatorFn, AnyValidatorObj, ResolveValidatorInputFn, ResolveValidatorOutputFn, ResolveSearchValidatorInput, ResolveSearchValidatorInputFn, Validator, ValidatorAdapter, ValidatorObj, NavigateFn, BuildLocationFn, InferDescendantToPaths, RelativeToPath, RelativeToParentPath, RelativeToCurrentPath, Register, AbsoluteToPath, RelativeToPathAutoComplete, NavigateOptions, ToOptions, ToMaskOptions, ToSubOptions, ResolveRoute, SearchParamOptions, PathParamOptions, ToPathOption, LinkOptions, MakeOptionalPathParams, AnyRouterWithContext, ParseRoute, RoutesById, RouteById, RouteIds, RoutesByPath, RouteByPath, RoutePaths, FullSearchSchema, AllParams, AllLoaderData, FullSearchSchemaInput, AllContext, CommitLocationOptions, MatchLocation, ResolveFullSearchSchema, ResolveFullSearchSchemaInput, ResolveAllParamsFromParent, RouteContextParameter, BeforeLoadContextParameter, ResolveAllContext, FullSearchSchemaOption, MakeRemountDepsOptionsUnion, RemountDepsOptions, FileRouteTypes, FileRoutesByPath, UseNavigateResult, AnyRedirect, Redirect, ResolvedRedirect, RouteOptions, FileBaseRouteOptions, BaseRouteOptions, UpdatableRouteOptions, RouteLoaderFn, LoaderFnContext, MakeRouteMatch, MakeRouteMatchUnion, RouteMatch, AnyRouteMatch, RouteContextFn, RouteContextOptions, BeforeLoadFn, BeforeLoadContextOptions, ContextOptions, RootRouteOptions, AnyRouteWithContext, LazyRouteOptions, AnyRoute, ResolveFullPath, RouteConstraints, RouterState, ListenerFn, BuildNextOptions, AnyRouter, RegisteredRouter, RouterEvents, RouterEvent, RouterListener, MatchRouteOptions, RouteMask, RouterContextOptions, RouterOptions, RouterConstructorOptions, ControllablePromise, InjectedHtmlEntry, RouterErrorSerializer, } from '@tanstack/router-core';
5
+ export type { StartSerializer, Serializable, SerializerParse, SerializerParseBy, SerializerStringify, SerializerStringifyBy, DeferredPromiseState, DeferredPromise, ParsedLocation, ParsePathParams, RemoveTrailingSlashes, RemoveLeadingSlashes, ActiveOptions, Segment, ResolveRelativePath, RootRouteId, AnyPathParams, ResolveParams, SearchSchemaInput, AnyContext, RouteContext, PreloadableObj, RoutePathOptions, StaticDataRouteOption, RoutePathOptionsIntersection, UpdatableStaticRouteOption, MetaDescriptor, RouteLinkEntry, ParseParamsFn, SearchFilter, ResolveId, InferFullSearchSchema, InferFullSearchSchemaInput, ErrorRouteProps, ErrorComponentProps, NotFoundRouteProps, TrimPath, TrimPathLeft, TrimPathRight, ParseSplatParams, SplatParams, StringifyParamsFn, ParamsOptions, InferAllParams, InferAllContext, LooseReturnType, LooseAsyncReturnType, ContextReturnType, ContextAsyncReturnType, ResolveLoaderData, ResolveRouteContext, SearchSerializer, SearchParser, TrailingSlashOption, ExtractedEntry, ExtractedStream, ExtractedPromise, StreamState, Manifest, RouterManagedTag, ControlledPromise, Constrain, Expand, MergeAll, Assign, IntersectAssign, ResolveValidatorInput, ResolveValidatorOutput, AnyValidator, DefaultValidator, ValidatorFn, AnySchema, AnyValidatorAdapter, AnyValidatorFn, AnyValidatorObj, ResolveValidatorInputFn, ResolveValidatorOutputFn, ResolveSearchValidatorInput, ResolveSearchValidatorInputFn, Validator, ValidatorAdapter, ValidatorObj, NavigateFn, BuildLocationFn, InferDescendantToPaths, RelativeToPath, RelativeToParentPath, RelativeToCurrentPath, Register, AbsoluteToPath, RelativeToPathAutoComplete, NavigateOptions, ToOptions, ToMaskOptions, ToSubOptions, ResolveRoute, SearchParamOptions, PathParamOptions, ToPathOption, LinkOptions, MakeOptionalPathParams, AnyRouterWithContext, ParseRoute, RoutesById, RouteById, RouteIds, RoutesByPath, RouteByPath, RoutePaths, FullSearchSchema, AllParams, AllLoaderData, FullSearchSchemaInput, AllContext, CommitLocationOptions, MatchLocation, ResolveFullSearchSchema, ResolveFullSearchSchemaInput, ResolveAllParamsFromParent, RouteContextParameter, BeforeLoadContextParameter, ResolveAllContext, FullSearchSchemaOption, MakeRemountDepsOptionsUnion, RemountDepsOptions, FileRouteTypes, FileRoutesByPath, UseNavigateResult, AnyRedirect, Redirect, ResolvedRedirect, RouteOptions, FileBaseRouteOptions, BaseRouteOptions, UpdatableRouteOptions, RouteLoaderFn, LoaderFnContext, MakeRouteMatch, MakeRouteMatchUnion, RouteMatch, AnyRouteMatch, RouteContextFn, RouteContextOptions, BeforeLoadFn, BeforeLoadContextOptions, ContextOptions, RootRouteOptions, AnyRouteWithContext, LazyRouteOptions, AnyRoute, ResolveFullPath, RouteConstraints, RouterState, ListenerFn, BuildNextOptions, AnyRouter, RegisteredRouter, RouterEvents, RouterEvent, RouterListener, MatchRouteOptions, RouteMask, RouterContextOptions, RouterOptions, RouterConstructorOptions, ControllablePromise, InjectedHtmlEntry, RouterErrorSerializer, SerializerExtensions, } from '@tanstack/router-core';
6
6
  export { createHistory, createBrowserHistory, createHashHistory, createMemoryHistory, } from '@tanstack/history';
7
7
  export type { BlockerFn, HistoryLocation, RouterHistory, ParsedPath, HistoryState, } from '@tanstack/history';
8
8
  export { useAwaited, Await } from './awaited.cjs';
@@ -1,5 +1,5 @@
1
1
  import * as Solid from "solid-js";
2
- import { trimPathRight, getLocationChangeInfo } from "@tanstack/router-core";
2
+ import { trimPathRight, getLocationChangeInfo, handleHashScroll } from "@tanstack/router-core";
3
3
  import { useRouter } from "./useRouter.js";
4
4
  import { useRouterState } from "./useRouterState.js";
5
5
  import { usePrevious } from "./utils.js";
@@ -96,15 +96,7 @@ function Transitioner() {
96
96
  status: "idle",
97
97
  resolvedLocation: s.location
98
98
  }));
99
- if (typeof document !== "undefined" && document.querySelector) {
100
- const hashScrollIntoViewOptions = router.state.location.state.__hashScrollIntoViewOptions ?? true;
101
- if (hashScrollIntoViewOptions && router.state.location.hash !== "") {
102
- const el = document.getElementById(router.state.location.hash);
103
- if (el) {
104
- el.scrollIntoView(hashScrollIntoViewOptions);
105
- }
106
- }
107
- }
99
+ handleHashScroll(router);
108
100
  }
109
101
  }));
110
102
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"Transitioner.js","sources":["../../src/Transitioner.tsx"],"sourcesContent":["import * as Solid from 'solid-js'\nimport { getLocationChangeInfo, trimPathRight } from '@tanstack/router-core'\nimport { useRouter } from './useRouter'\nimport { useRouterState } from './useRouterState'\nimport { usePrevious } from './utils'\n\nexport function Transitioner() {\n const router = useRouter()\n let mountLoadForRouter = { router, mounted: false }\n const isLoading = useRouterState({\n select: ({ isLoading }) => isLoading,\n })\n\n const [isTransitioning, setIsTransitioning] = Solid.createSignal(false)\n // Track pending state changes\n const hasPendingMatches = useRouterState({\n select: (s) => s.matches.some((d) => d.status === 'pending'),\n })\n\n const previousIsLoading = usePrevious(isLoading)\n\n const isAnyPending = () =>\n isLoading() || isTransitioning() || hasPendingMatches()\n const previousIsAnyPending = usePrevious(isAnyPending)\n\n const isPagePending = () => isLoading() || hasPendingMatches()\n const previousIsPagePending = usePrevious(isPagePending)\n\n if (!router.isServer) {\n router.startTransition = (fn: () => void) => {\n setIsTransitioning(true)\n fn()\n setIsTransitioning(false)\n }\n }\n\n // Subscribe to location changes\n // and try to load the new location\n Solid.onMount(() => {\n const unsub = router.history.subscribe(router.load)\n\n const nextLocation = router.buildLocation({\n to: router.latestLocation.pathname,\n search: true,\n params: true,\n hash: true,\n state: true,\n _includeValidateSearch: true,\n })\n\n if (\n trimPathRight(router.latestLocation.href) !==\n trimPathRight(nextLocation.href)\n ) {\n router.commitLocation({ ...nextLocation, replace: true })\n }\n\n Solid.onCleanup(() => {\n unsub()\n })\n })\n\n // Try to load the initial location\n Solid.createRenderEffect(() => {\n Solid.untrack(() => {\n if (\n (typeof window !== 'undefined' && router.clientSsr) ||\n (mountLoadForRouter.router === router && mountLoadForRouter.mounted)\n ) {\n return\n }\n mountLoadForRouter = { router, mounted: true }\n const tryLoad = async () => {\n try {\n await router.load()\n } catch (err) {\n console.error(err)\n }\n }\n tryLoad()\n })\n })\n\n Solid.createRenderEffect(\n Solid.on(\n [previousIsLoading, isLoading],\n ([previousIsLoading, isLoading]) => {\n if (previousIsLoading.previous && !isLoading) {\n router.emit({\n type: 'onLoad',\n ...getLocationChangeInfo(router.state),\n })\n }\n },\n ),\n )\n Solid.createRenderEffect(\n Solid.on(\n [isPagePending, previousIsPagePending],\n ([isPagePending, previousIsPagePending]) => {\n // emit onBeforeRouteMount\n if (previousIsPagePending.previous && !isPagePending) {\n router.emit({\n type: 'onBeforeRouteMount',\n ...getLocationChangeInfo(router.state),\n })\n }\n },\n ),\n )\n\n Solid.createRenderEffect(\n Solid.on(\n [isAnyPending, previousIsAnyPending],\n ([isAnyPending, previousIsAnyPending]) => {\n // The router was pending and now it's not\n if (previousIsAnyPending.previous && !isAnyPending) {\n router.emit({\n type: 'onResolved',\n ...getLocationChangeInfo(router.state),\n })\n\n router.__store.setState((s) => ({\n ...s,\n status: 'idle',\n resolvedLocation: s.location,\n }))\n\n if (\n typeof document !== 'undefined' &&\n (document as any).querySelector\n ) {\n const hashScrollIntoViewOptions =\n router.state.location.state.__hashScrollIntoViewOptions ?? true\n\n if (\n hashScrollIntoViewOptions &&\n router.state.location.hash !== ''\n ) {\n const el = document.getElementById(router.state.location.hash)\n if (el) {\n el.scrollIntoView(hashScrollIntoViewOptions)\n }\n }\n }\n }\n },\n ),\n )\n\n return null\n}\n"],"names":["Transitioner","router","useRouter","mountLoadForRouter","mounted","isLoading","useRouterState","select","isTransitioning","setIsTransitioning","Solid","createSignal","hasPendingMatches","s","matches","some","d","status","previousIsLoading","usePrevious","isAnyPending","previousIsAnyPending","isPagePending","previousIsPagePending","isServer","startTransition","fn","onMount","unsub","history","subscribe","load","nextLocation","buildLocation","to","latestLocation","pathname","search","params","hash","state","_includeValidateSearch","trimPathRight","href","commitLocation","replace","onCleanup","createRenderEffect","untrack","window","clientSsr","tryLoad","err","console","error","on","previous","emit","type","getLocationChangeInfo","__store","setState","resolvedLocation","location","document","querySelector","hashScrollIntoViewOptions","__hashScrollIntoViewOptions","el","getElementById","scrollIntoView"],"mappings":";;;;;AAMO,SAASA,eAAe;AAC7B,QAAM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AA,QACVC,MAAM;AAAA,QACN,GAAGC,sBAAsB1D,OAAOuC,KAAK;AAAA,MAAA,CACtC;AAEMoB,aAAAA,QAAQC,SAAUhD,CAAO,OAAA;AAAA,QAC9B,GAAGA;AAAAA,QACHI,QAAQ;AAAA,QACR6C,kBAAkBjD,EAAEkD;AAAAA,MAAAA,EACpB;AAEF,UACE,OAAOC,aAAa,eACnBA,SAAiBC,eAClB;AACA,cAAMC,4BACJjE,OAAOuC,MAAMuB,SAASvB,MAAM2B,+BAA+B;AAE7D,YACED,6BACAjE,OAAOuC,MAAMuB,SAASxB,SAAS,IAC/B;AACA,gBAAM6B,KAAKJ,SAASK,eAAepE,OAAOuC,MAAMuB,SAASxB,IAAI;AAC7D,cAAI6B,IAAI;AACNA,eAAGE,eAAeJ,yBAAyB;AAAA,UAAA;AAAA,QAC7C;AAAA,MACF;AAAA,IACF;AAAA,EACF,CAEJ,CACF;AAEO,SAAA;AACT;"}
1
+ {"version":3,"file":"Transitioner.js","sources":["../../src/Transitioner.tsx"],"sourcesContent":["import * as Solid from 'solid-js'\nimport {\n getLocationChangeInfo,\n handleHashScroll,\n trimPathRight,\n} from '@tanstack/router-core'\nimport { useRouter } from './useRouter'\nimport { useRouterState } from './useRouterState'\nimport { usePrevious } from './utils'\n\nexport function Transitioner() {\n const router = useRouter()\n let mountLoadForRouter = { router, mounted: false }\n const isLoading = useRouterState({\n select: ({ isLoading }) => isLoading,\n })\n\n const [isTransitioning, setIsTransitioning] = Solid.createSignal(false)\n // Track pending state changes\n const hasPendingMatches = useRouterState({\n select: (s) => s.matches.some((d) => d.status === 'pending'),\n })\n\n const previousIsLoading = usePrevious(isLoading)\n\n const isAnyPending = () =>\n isLoading() || isTransitioning() || hasPendingMatches()\n const previousIsAnyPending = usePrevious(isAnyPending)\n\n const isPagePending = () => isLoading() || hasPendingMatches()\n const previousIsPagePending = usePrevious(isPagePending)\n\n if (!router.isServer) {\n router.startTransition = (fn: () => void) => {\n setIsTransitioning(true)\n fn()\n setIsTransitioning(false)\n }\n }\n\n // Subscribe to location changes\n // and try to load the new location\n Solid.onMount(() => {\n const unsub = router.history.subscribe(router.load)\n\n const nextLocation = router.buildLocation({\n to: router.latestLocation.pathname,\n search: true,\n params: true,\n hash: true,\n state: true,\n _includeValidateSearch: true,\n })\n\n if (\n trimPathRight(router.latestLocation.href) !==\n trimPathRight(nextLocation.href)\n ) {\n router.commitLocation({ ...nextLocation, replace: true })\n }\n\n Solid.onCleanup(() => {\n unsub()\n })\n })\n\n // Try to load the initial location\n Solid.createRenderEffect(() => {\n Solid.untrack(() => {\n if (\n (typeof window !== 'undefined' && router.clientSsr) ||\n (mountLoadForRouter.router === router && mountLoadForRouter.mounted)\n ) {\n return\n }\n mountLoadForRouter = { router, mounted: true }\n const tryLoad = async () => {\n try {\n await router.load()\n } catch (err) {\n console.error(err)\n }\n }\n tryLoad()\n })\n })\n\n Solid.createRenderEffect(\n Solid.on(\n [previousIsLoading, isLoading],\n ([previousIsLoading, isLoading]) => {\n if (previousIsLoading.previous && !isLoading) {\n router.emit({\n type: 'onLoad',\n ...getLocationChangeInfo(router.state),\n })\n }\n },\n ),\n )\n Solid.createRenderEffect(\n Solid.on(\n [isPagePending, previousIsPagePending],\n ([isPagePending, previousIsPagePending]) => {\n // emit onBeforeRouteMount\n if (previousIsPagePending.previous && !isPagePending) {\n router.emit({\n type: 'onBeforeRouteMount',\n ...getLocationChangeInfo(router.state),\n })\n }\n },\n ),\n )\n\n Solid.createRenderEffect(\n Solid.on(\n [isAnyPending, previousIsAnyPending],\n ([isAnyPending, previousIsAnyPending]) => {\n // The router was pending and now it's not\n if (previousIsAnyPending.previous && !isAnyPending) {\n router.emit({\n type: 'onResolved',\n ...getLocationChangeInfo(router.state),\n })\n\n router.__store.setState((s) => ({\n ...s,\n status: 'idle',\n resolvedLocation: s.location,\n }))\n\n handleHashScroll(router)\n }\n },\n ),\n )\n\n return null\n}\n"],"names":["Transitioner","router","useRouter","mountLoadForRouter","mounted","isLoading","useRouterState","select","isTransitioning","setIsTransitioning","Solid","createSignal","hasPendingMatches","s","matches","some","d","status","previousIsLoading","usePrevious","isAnyPending","previousIsAnyPending","isPagePending","previousIsPagePending","isServer","startTransition","fn","onMount","unsub","history","subscribe","load","nextLocation","buildLocation","to","latestLocation","pathname","search","params","hash","state","_includeValidateSearch","trimPathRight","href","commitLocation","replace","onCleanup","createRenderEffect","untrack","window","clientSsr","tryLoad","err","console","error","on","previous","emit","type","getLocationChangeInfo","__store","setState","resolvedLocation","location","handleHashScroll"],"mappings":";;;;;AAUO,SAASA,eAAe;AAC7B,QAAMC,SAASC,UAAU;AACzB,MAAIC,qBAAqB;AAAA,IAAEF;AAAAA,IAAQG,SAAS;AAAA,EAAM;AAClD,QAAMC,YAAYC,eAAe;AAAA,IAC/BC,QAAQA,CAAC;AAAA,MAAEF,WAAAA;AAAAA,IAAAA,MAAgBA;AAAAA,EAAAA,CAC5B;AAED,QAAM,CAACG,iBAAiBC,kBAAkB,IAAIC,MAAMC,aAAa,KAAK;AAEtE,QAAMC,oBAAoBN,eAAe;AAAA,IACvCC,QAASM,OAAMA,EAAEC,QAAQC,KAAMC,CAAMA,MAAAA,EAAEC,WAAW,SAAS;AAAA,EAAA,CAC5D;AAEKC,QAAAA,oBAAoBC,YAAYd,SAAS;AAE/C,QAAMe,eAAeA,MACnBf,UAAeG,KAAAA,gBAAAA,KAAqBI,kBAAkB;AAClDS,QAAAA,uBAAuBF,YAAYC,YAAY;AAErD,QAAME,gBAAgBA,MAAMjB,UAAU,KAAKO,kBAAkB;AACvDW,QAAAA,wBAAwBJ,YAAYG,aAAa;AAEnD,MAAA,CAACrB,OAAOuB,UAAU;AACbC,WAAAA,kBAAkB,CAACC,OAAmB;AAC3CjB,yBAAmB,IAAI;AACpB,SAAA;AACHA,yBAAmB,KAAK;AAAA,IAC1B;AAAA,EAAA;AAKFC,QAAMiB,QAAQ,MAAM;AAClB,UAAMC,QAAQ3B,OAAO4B,QAAQC,UAAU7B,OAAO8B,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sBAAqB,MAAM;AAEtCA,QAAAA,uBAAsBiC,YAAY,CAAClC,gBAAe;AACpDrB,aAAOwD,KAAK;AAAA,QACVC,MAAM;AAAA,QACN,GAAGC,sBAAsB1D,OAAOuC,KAAK;AAAA,MAAA,CACtC;AAAA,IAAA;AAAA,EACH,CAEJ,CACF;AAEMO,QAAAA,mBACJrC,MAAM6C,GACJ,CAACnC,cAAcC,oBAAoB,GACnC,CAAC,CAACD,eAAcC,qBAAoB,MAAM;AAEpCA,QAAAA,sBAAqBmC,YAAY,CAACpC,eAAc;AAClDnB,aAAOwD,KAAK;AAAA,QACVC,MAAM;AAAA,QACN,GAAGC,sBAAsB1D,OAAOuC,KAAK;AAAA,MAAA,CACtC;AAEMoB,aAAAA,QAAQC,SAAUhD,CAAO,OAAA;AAAA,QAC9B,GAAGA;AAAAA,QACHI,QAAQ;AAAA,QACR6C,kBAAkBjD,EAAEkD;AAAAA,MAAAA,EACpB;AAEFC,uBAAiB/D,MAAM;AAAA,IAAA;AAAA,EACzB,CAEJ,CACF;AAEO,SAAA;AACT;"}
@@ -2,7 +2,7 @@ export { default as invariant } from 'tiny-invariant';
2
2
  export { default as warning } from 'tiny-warning';
3
3
  export { defer, TSR_DEFERRED_PROMISE, isMatch, joinPaths, cleanPath, trimPathLeft, trimPathRight, trimPath, resolvePath, parsePathname, interpolatePath, matchPathname, removeBasepath, matchByPath, encode, decode, rootRouteId, defaultSerializeError, defaultParseSearch, defaultStringifySearch, parseSearchWith, stringifySearchWith, escapeJSON, // SSR
4
4
  pick, functionalUpdate, replaceEqualDeep, isPlainObject, isPlainArray, deepEqual, shallow, createControlledPromise, retainSearchParams, stripSearchParams, } from '@tanstack/router-core';
5
- export type { StartSerializer, Serializable, SerializerParse, SerializerParseBy, SerializerStringify, SerializerStringifyBy, DeferredPromiseState, DeferredPromise, ParsedLocation, ParsePathParams, RemoveTrailingSlashes, RemoveLeadingSlashes, ActiveOptions, Segment, ResolveRelativePath, RootRouteId, AnyPathParams, ResolveParams, SearchSchemaInput, AnyContext, RouteContext, PreloadableObj, RoutePathOptions, StaticDataRouteOption, RoutePathOptionsIntersection, UpdatableStaticRouteOption, MetaDescriptor, RouteLinkEntry, ParseParamsFn, SearchFilter, ResolveId, InferFullSearchSchema, InferFullSearchSchemaInput, ErrorRouteProps, ErrorComponentProps, NotFoundRouteProps, TrimPath, TrimPathLeft, TrimPathRight, ParseSplatParams, SplatParams, StringifyParamsFn, ParamsOptions, InferAllParams, InferAllContext, LooseReturnType, LooseAsyncReturnType, ContextReturnType, ContextAsyncReturnType, ResolveLoaderData, ResolveRouteContext, SearchSerializer, SearchParser, TrailingSlashOption, ExtractedEntry, ExtractedStream, ExtractedPromise, StreamState, Manifest, RouterManagedTag, ControlledPromise, Constrain, Expand, MergeAll, Assign, IntersectAssign, ResolveValidatorInput, ResolveValidatorOutput, AnyValidator, DefaultValidator, ValidatorFn, AnySchema, AnyValidatorAdapter, AnyValidatorFn, AnyValidatorObj, ResolveValidatorInputFn, ResolveValidatorOutputFn, ResolveSearchValidatorInput, ResolveSearchValidatorInputFn, Validator, ValidatorAdapter, ValidatorObj, NavigateFn, BuildLocationFn, InferDescendantToPaths, RelativeToPath, RelativeToParentPath, RelativeToCurrentPath, Register, AbsoluteToPath, RelativeToPathAutoComplete, NavigateOptions, ToOptions, ToMaskOptions, ToSubOptions, ResolveRoute, SearchParamOptions, PathParamOptions, ToPathOption, LinkOptions, MakeOptionalPathParams, AnyRouterWithContext, ParseRoute, RoutesById, RouteById, RouteIds, RoutesByPath, RouteByPath, RoutePaths, FullSearchSchema, AllParams, AllLoaderData, FullSearchSchemaInput, AllContext, CommitLocationOptions, MatchLocation, ResolveFullSearchSchema, ResolveFullSearchSchemaInput, ResolveAllParamsFromParent, RouteContextParameter, BeforeLoadContextParameter, ResolveAllContext, FullSearchSchemaOption, MakeRemountDepsOptionsUnion, RemountDepsOptions, FileRouteTypes, FileRoutesByPath, UseNavigateResult, AnyRedirect, Redirect, ResolvedRedirect, RouteOptions, FileBaseRouteOptions, BaseRouteOptions, UpdatableRouteOptions, RouteLoaderFn, LoaderFnContext, MakeRouteMatch, MakeRouteMatchUnion, RouteMatch, AnyRouteMatch, RouteContextFn, RouteContextOptions, BeforeLoadFn, BeforeLoadContextOptions, ContextOptions, RootRouteOptions, AnyRouteWithContext, LazyRouteOptions, AnyRoute, ResolveFullPath, RouteConstraints, RouterState, ListenerFn, BuildNextOptions, AnyRouter, RegisteredRouter, RouterEvents, RouterEvent, RouterListener, MatchRouteOptions, RouteMask, RouterContextOptions, RouterOptions, RouterConstructorOptions, ControllablePromise, InjectedHtmlEntry, RouterErrorSerializer, } from '@tanstack/router-core';
5
+ export type { StartSerializer, Serializable, SerializerParse, SerializerParseBy, SerializerStringify, SerializerStringifyBy, DeferredPromiseState, DeferredPromise, ParsedLocation, ParsePathParams, RemoveTrailingSlashes, RemoveLeadingSlashes, ActiveOptions, Segment, ResolveRelativePath, RootRouteId, AnyPathParams, ResolveParams, SearchSchemaInput, AnyContext, RouteContext, PreloadableObj, RoutePathOptions, StaticDataRouteOption, RoutePathOptionsIntersection, UpdatableStaticRouteOption, MetaDescriptor, RouteLinkEntry, ParseParamsFn, SearchFilter, ResolveId, InferFullSearchSchema, InferFullSearchSchemaInput, ErrorRouteProps, ErrorComponentProps, NotFoundRouteProps, TrimPath, TrimPathLeft, TrimPathRight, ParseSplatParams, SplatParams, StringifyParamsFn, ParamsOptions, InferAllParams, InferAllContext, LooseReturnType, LooseAsyncReturnType, ContextReturnType, ContextAsyncReturnType, ResolveLoaderData, ResolveRouteContext, SearchSerializer, SearchParser, TrailingSlashOption, ExtractedEntry, ExtractedStream, ExtractedPromise, StreamState, Manifest, RouterManagedTag, ControlledPromise, Constrain, Expand, MergeAll, Assign, IntersectAssign, ResolveValidatorInput, ResolveValidatorOutput, AnyValidator, DefaultValidator, ValidatorFn, AnySchema, AnyValidatorAdapter, AnyValidatorFn, AnyValidatorObj, ResolveValidatorInputFn, ResolveValidatorOutputFn, ResolveSearchValidatorInput, ResolveSearchValidatorInputFn, Validator, ValidatorAdapter, ValidatorObj, NavigateFn, BuildLocationFn, InferDescendantToPaths, RelativeToPath, RelativeToParentPath, RelativeToCurrentPath, Register, AbsoluteToPath, RelativeToPathAutoComplete, NavigateOptions, ToOptions, ToMaskOptions, ToSubOptions, ResolveRoute, SearchParamOptions, PathParamOptions, ToPathOption, LinkOptions, MakeOptionalPathParams, AnyRouterWithContext, ParseRoute, RoutesById, RouteById, RouteIds, RoutesByPath, RouteByPath, RoutePaths, FullSearchSchema, AllParams, AllLoaderData, FullSearchSchemaInput, AllContext, CommitLocationOptions, MatchLocation, ResolveFullSearchSchema, ResolveFullSearchSchemaInput, ResolveAllParamsFromParent, RouteContextParameter, BeforeLoadContextParameter, ResolveAllContext, FullSearchSchemaOption, MakeRemountDepsOptionsUnion, RemountDepsOptions, FileRouteTypes, FileRoutesByPath, UseNavigateResult, AnyRedirect, Redirect, ResolvedRedirect, RouteOptions, FileBaseRouteOptions, BaseRouteOptions, UpdatableRouteOptions, RouteLoaderFn, LoaderFnContext, MakeRouteMatch, MakeRouteMatchUnion, RouteMatch, AnyRouteMatch, RouteContextFn, RouteContextOptions, BeforeLoadFn, BeforeLoadContextOptions, ContextOptions, RootRouteOptions, AnyRouteWithContext, LazyRouteOptions, AnyRoute, ResolveFullPath, RouteConstraints, RouterState, ListenerFn, BuildNextOptions, AnyRouter, RegisteredRouter, RouterEvents, RouterEvent, RouterListener, MatchRouteOptions, RouteMask, RouterContextOptions, RouterOptions, RouterConstructorOptions, ControllablePromise, InjectedHtmlEntry, RouterErrorSerializer, SerializerExtensions, } from '@tanstack/router-core';
6
6
  export { createHistory, createBrowserHistory, createHashHistory, createMemoryHistory, } from '@tanstack/history';
7
7
  export type { BlockerFn, HistoryLocation, RouterHistory, ParsedPath, HistoryState, } from '@tanstack/history';
8
8
  export { useAwaited, Await } from './awaited.js';
@@ -1,5 +1,5 @@
1
1
  import * as Solid from 'solid-js';
2
- import { getLocationChangeInfo, trimPathRight } from '@tanstack/router-core';
2
+ import { getLocationChangeInfo, handleHashScroll, trimPathRight, } from '@tanstack/router-core';
3
3
  import { useRouter } from './useRouter';
4
4
  import { useRouterState } from './useRouterState';
5
5
  import { usePrevious } from './utils';
@@ -94,17 +94,7 @@ export function Transitioner() {
94
94
  status: 'idle',
95
95
  resolvedLocation: s.location,
96
96
  }));
97
- if (typeof document !== 'undefined' &&
98
- document.querySelector) {
99
- const hashScrollIntoViewOptions = router.state.location.state.__hashScrollIntoViewOptions ?? true;
100
- if (hashScrollIntoViewOptions &&
101
- router.state.location.hash !== '') {
102
- const el = document.getElementById(router.state.location.hash);
103
- if (el) {
104
- el.scrollIntoView(hashScrollIntoViewOptions);
105
- }
106
- }
107
- }
97
+ handleHashScroll(router);
108
98
  }
109
99
  }));
110
100
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"Transitioner.jsx","sourceRoot":"","sources":["../../src/Transitioner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAErC,MAAM,UAAU,YAAY;IAC1B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,IAAI,kBAAkB,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,CAAA;IACnD,MAAM,SAAS,GAAG,cAAc,CAAC;QAC/B,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,SAAS;KACrC,CAAC,CAAA;IAEF,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;IACvE,8BAA8B;IAC9B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tC,CAAC,CAAC,aAAa,EAAE,qBAAqB,CAAC,EAAE,EAAE;QACzC,0BAA0B;QAC1B,IAAI,qBAAqB,CAAC,QAAQ,IAAI,CAAC,aAAa,EAAE,CAAC;YACrD,MAAM,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,oBAAoB;gBAC1B,GAAG,qBAAqB,CAAC,MAAM,CAAC,KAAK,CAAC;aACvC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC,CACF,CACF,CAAA;IAED,KAAK,CAAC,kBAAkB,CACtB,KAAK,CAAC,EAAE,CACN,CAAC,YAAY,EAAE,oBAAoB,CAAC,EACpC,CAAC,CAAC,YAAY,EAAE,oBAAoB,CAAC,EAAE,EAAE;QACvC,0CAA0C;QAC1C,IAAI,oBAAoB,CAAC,QAAQ,IAAI,CAAC,YAAY,EAAE,CAAC;YACnD,MAAM,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,YAAY;gBAClB,GAAG,qBAAqB,CAAC,MAAM,CAAC,KAAK,CAAC;aACvC,CAAC,CAAA;YAEF,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC9B,GAAG,CAAC;gBACJ,MAAM,EAAE,MAAM;gBACd,gBAAgB,EAAE,CAAC,CAAC,QAAQ;aAC7B,CAAC,CAAC,CAAA;YAEH,gBAAgB,CAAC,MAAM,CAAC,CAAA;QAC1B,CAAC;IACH,CAAC,CACF,CACF,CAAA;IAED,OAAO,IAAI,CAAA;AACb,CAAC"}
@@ -2,7 +2,7 @@ export { default as invariant } from 'tiny-invariant';
2
2
  export { default as warning } from 'tiny-warning';
3
3
  export { defer, TSR_DEFERRED_PROMISE, isMatch, joinPaths, cleanPath, trimPathLeft, trimPathRight, trimPath, resolvePath, parsePathname, interpolatePath, matchPathname, removeBasepath, matchByPath, encode, decode, rootRouteId, defaultSerializeError, defaultParseSearch, defaultStringifySearch, parseSearchWith, stringifySearchWith, escapeJSON, // SSR
4
4
  pick, functionalUpdate, replaceEqualDeep, isPlainObject, isPlainArray, deepEqual, shallow, createControlledPromise, retainSearchParams, stripSearchParams, } from '@tanstack/router-core';
5
- export type { StartSerializer, Serializable, SerializerParse, SerializerParseBy, SerializerStringify, SerializerStringifyBy, DeferredPromiseState, DeferredPromise, ParsedLocation, ParsePathParams, RemoveTrailingSlashes, RemoveLeadingSlashes, ActiveOptions, Segment, ResolveRelativePath, RootRouteId, AnyPathParams, ResolveParams, SearchSchemaInput, AnyContext, RouteContext, PreloadableObj, RoutePathOptions, StaticDataRouteOption, RoutePathOptionsIntersection, UpdatableStaticRouteOption, MetaDescriptor, RouteLinkEntry, ParseParamsFn, SearchFilter, ResolveId, InferFullSearchSchema, InferFullSearchSchemaInput, ErrorRouteProps, ErrorComponentProps, NotFoundRouteProps, TrimPath, TrimPathLeft, TrimPathRight, ParseSplatParams, SplatParams, StringifyParamsFn, ParamsOptions, InferAllParams, InferAllContext, LooseReturnType, LooseAsyncReturnType, ContextReturnType, ContextAsyncReturnType, ResolveLoaderData, ResolveRouteContext, SearchSerializer, SearchParser, TrailingSlashOption, ExtractedEntry, ExtractedStream, ExtractedPromise, StreamState, Manifest, RouterManagedTag, ControlledPromise, Constrain, Expand, MergeAll, Assign, IntersectAssign, ResolveValidatorInput, ResolveValidatorOutput, AnyValidator, DefaultValidator, ValidatorFn, AnySchema, AnyValidatorAdapter, AnyValidatorFn, AnyValidatorObj, ResolveValidatorInputFn, ResolveValidatorOutputFn, ResolveSearchValidatorInput, ResolveSearchValidatorInputFn, Validator, ValidatorAdapter, ValidatorObj, NavigateFn, BuildLocationFn, InferDescendantToPaths, RelativeToPath, RelativeToParentPath, RelativeToCurrentPath, Register, AbsoluteToPath, RelativeToPathAutoComplete, NavigateOptions, ToOptions, ToMaskOptions, ToSubOptions, ResolveRoute, SearchParamOptions, PathParamOptions, ToPathOption, LinkOptions, MakeOptionalPathParams, AnyRouterWithContext, ParseRoute, RoutesById, RouteById, RouteIds, RoutesByPath, RouteByPath, RoutePaths, FullSearchSchema, AllParams, AllLoaderData, FullSearchSchemaInput, AllContext, CommitLocationOptions, MatchLocation, ResolveFullSearchSchema, ResolveFullSearchSchemaInput, ResolveAllParamsFromParent, RouteContextParameter, BeforeLoadContextParameter, ResolveAllContext, FullSearchSchemaOption, MakeRemountDepsOptionsUnion, RemountDepsOptions, FileRouteTypes, FileRoutesByPath, UseNavigateResult, AnyRedirect, Redirect, ResolvedRedirect, RouteOptions, FileBaseRouteOptions, BaseRouteOptions, UpdatableRouteOptions, RouteLoaderFn, LoaderFnContext, MakeRouteMatch, MakeRouteMatchUnion, RouteMatch, AnyRouteMatch, RouteContextFn, RouteContextOptions, BeforeLoadFn, BeforeLoadContextOptions, ContextOptions, RootRouteOptions, AnyRouteWithContext, LazyRouteOptions, AnyRoute, ResolveFullPath, RouteConstraints, RouterState, ListenerFn, BuildNextOptions, AnyRouter, RegisteredRouter, RouterEvents, RouterEvent, RouterListener, MatchRouteOptions, RouteMask, RouterContextOptions, RouterOptions, RouterConstructorOptions, ControllablePromise, InjectedHtmlEntry, RouterErrorSerializer, } from '@tanstack/router-core';
5
+ export type { StartSerializer, Serializable, SerializerParse, SerializerParseBy, SerializerStringify, SerializerStringifyBy, DeferredPromiseState, DeferredPromise, ParsedLocation, ParsePathParams, RemoveTrailingSlashes, RemoveLeadingSlashes, ActiveOptions, Segment, ResolveRelativePath, RootRouteId, AnyPathParams, ResolveParams, SearchSchemaInput, AnyContext, RouteContext, PreloadableObj, RoutePathOptions, StaticDataRouteOption, RoutePathOptionsIntersection, UpdatableStaticRouteOption, MetaDescriptor, RouteLinkEntry, ParseParamsFn, SearchFilter, ResolveId, InferFullSearchSchema, InferFullSearchSchemaInput, ErrorRouteProps, ErrorComponentProps, NotFoundRouteProps, TrimPath, TrimPathLeft, TrimPathRight, ParseSplatParams, SplatParams, StringifyParamsFn, ParamsOptions, InferAllParams, InferAllContext, LooseReturnType, LooseAsyncReturnType, ContextReturnType, ContextAsyncReturnType, ResolveLoaderData, ResolveRouteContext, SearchSerializer, SearchParser, TrailingSlashOption, ExtractedEntry, ExtractedStream, ExtractedPromise, StreamState, Manifest, RouterManagedTag, ControlledPromise, Constrain, Expand, MergeAll, Assign, IntersectAssign, ResolveValidatorInput, ResolveValidatorOutput, AnyValidator, DefaultValidator, ValidatorFn, AnySchema, AnyValidatorAdapter, AnyValidatorFn, AnyValidatorObj, ResolveValidatorInputFn, ResolveValidatorOutputFn, ResolveSearchValidatorInput, ResolveSearchValidatorInputFn, Validator, ValidatorAdapter, ValidatorObj, NavigateFn, BuildLocationFn, InferDescendantToPaths, RelativeToPath, RelativeToParentPath, RelativeToCurrentPath, Register, AbsoluteToPath, RelativeToPathAutoComplete, NavigateOptions, ToOptions, ToMaskOptions, ToSubOptions, ResolveRoute, SearchParamOptions, PathParamOptions, ToPathOption, LinkOptions, MakeOptionalPathParams, AnyRouterWithContext, ParseRoute, RoutesById, RouteById, RouteIds, RoutesByPath, RouteByPath, RoutePaths, FullSearchSchema, AllParams, AllLoaderData, FullSearchSchemaInput, AllContext, CommitLocationOptions, MatchLocation, ResolveFullSearchSchema, ResolveFullSearchSchemaInput, ResolveAllParamsFromParent, RouteContextParameter, BeforeLoadContextParameter, ResolveAllContext, FullSearchSchemaOption, MakeRemountDepsOptionsUnion, RemountDepsOptions, FileRouteTypes, FileRoutesByPath, UseNavigateResult, AnyRedirect, Redirect, ResolvedRedirect, RouteOptions, FileBaseRouteOptions, BaseRouteOptions, UpdatableRouteOptions, RouteLoaderFn, LoaderFnContext, MakeRouteMatch, MakeRouteMatchUnion, RouteMatch, AnyRouteMatch, RouteContextFn, RouteContextOptions, BeforeLoadFn, BeforeLoadContextOptions, ContextOptions, RootRouteOptions, AnyRouteWithContext, LazyRouteOptions, AnyRoute, ResolveFullPath, RouteConstraints, RouterState, ListenerFn, BuildNextOptions, AnyRouter, RegisteredRouter, RouterEvents, RouterEvent, RouterListener, MatchRouteOptions, RouteMask, RouterContextOptions, RouterOptions, RouterConstructorOptions, ControllablePromise, InjectedHtmlEntry, RouterErrorSerializer, SerializerExtensions, } from '@tanstack/router-core';
6
6
  export { createHistory, createBrowserHistory, createHashHistory, createMemoryHistory, } from '@tanstack/history';
7
7
  export type { BlockerFn, HistoryLocation, RouterHistory, ParsedPath, HistoryState, } from '@tanstack/history';
8
8
  export { useAwaited, Await } from './awaited';
@@ -1 +1 @@
1
- {"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAA;AAEjD,OAAO,EACL,KAAK,EACL,oBAAoB,EACpB,OAAO,EACP,SAAS,EACT,SAAS,EACT,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,WAAW,EACX,aAAa,EACb,eAAe,EACf,aAAa,EACb,cAAc,EACd,WAAW,EACX,MAAM,EACN,MAAM,EACN,WAAW,EACX,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,mBAAmB,EACnB,UAAU,EAAE,MAAM;AAClB,IAAI,EACJ,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,SAAS,EACT,OAAO,EACP,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,uBAAuB,CAAA;AA6K9B,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,mBAAmB,CAAA;AAU1B,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAG7C,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAE/D,OAAO,EACL,SAAS,EACT,eAAe,EACf,eAAe,EACf,SAAS,EACT,eAAe,EACf,mBAAmB,GACpB,MAAM,aAAa,CAAA;AAEpB,cAAc,WAAW,CAAA;AAEzB,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"name": "@tanstack/solid-router",
3
- "version": "1.114.29",
3
+ "version": "1.114.33",
4
4
  "description": "Modern and scalable routing for Solid applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -60,8 +60,8 @@
60
60
  "jsesc": "^3.0.2",
61
61
  "tiny-invariant": "^1.3.3",
62
62
  "tiny-warning": "^1.0.3",
63
- "@tanstack/history": "1.114.29",
64
- "@tanstack/router-core": "1.114.29"
63
+ "@tanstack/router-core": "1.114.33",
64
+ "@tanstack/history": "1.114.29"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@solidjs/testing-library": "^0.8.10",
@@ -1,5 +1,9 @@
1
1
  import * as Solid from 'solid-js'
2
- import { getLocationChangeInfo, trimPathRight } from '@tanstack/router-core'
2
+ import {
3
+ getLocationChangeInfo,
4
+ handleHashScroll,
5
+ trimPathRight,
6
+ } from '@tanstack/router-core'
3
7
  import { useRouter } from './useRouter'
4
8
  import { useRouterState } from './useRouterState'
5
9
  import { usePrevious } from './utils'
@@ -126,23 +130,7 @@ export function Transitioner() {
126
130
  resolvedLocation: s.location,
127
131
  }))
128
132
 
129
- if (
130
- typeof document !== 'undefined' &&
131
- (document as any).querySelector
132
- ) {
133
- const hashScrollIntoViewOptions =
134
- router.state.location.state.__hashScrollIntoViewOptions ?? true
135
-
136
- if (
137
- hashScrollIntoViewOptions &&
138
- router.state.location.hash !== ''
139
- ) {
140
- const el = document.getElementById(router.state.location.hash)
141
- if (el) {
142
- el.scrollIntoView(hashScrollIntoViewOptions)
143
- }
144
- }
145
- }
133
+ handleHashScroll(router)
146
134
  }
147
135
  },
148
136
  ),
package/src/index.tsx CHANGED
@@ -206,6 +206,7 @@ export type {
206
206
  ControllablePromise,
207
207
  InjectedHtmlEntry,
208
208
  RouterErrorSerializer,
209
+ SerializerExtensions,
209
210
  } from '@tanstack/router-core'
210
211
 
211
212
  export {