@tanstack/solid-router 1.162.4 → 1.162.5
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.
- package/dist/cjs/index.cjs +0 -24
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +2 -4
- package/dist/cjs/index.dev.cjs +0 -24
- package/dist/cjs/index.dev.cjs.map +1 -1
- package/dist/cjs/utils.cjs +0 -2
- package/dist/cjs/utils.cjs.map +1 -1
- package/dist/cjs/utils.d.cts +0 -1
- package/dist/esm/index.d.ts +2 -4
- package/dist/esm/index.dev.js +1 -10
- package/dist/esm/index.dev.js.map +1 -1
- package/dist/esm/index.js +1 -10
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils.d.ts +0 -1
- package/dist/esm/utils.js +0 -2
- package/dist/esm/utils.js.map +1 -1
- package/dist/source/index.d.ts +2 -4
- package/dist/source/index.jsx +2 -4
- package/dist/source/index.jsx.map +1 -1
- package/dist/source/utils.d.ts +0 -1
- package/dist/source/utils.js +0 -1
- package/dist/source/utils.js.map +1 -1
- package/package.json +2 -2
- package/src/index.tsx +1 -12
- package/src/utils.ts +0 -3
package/dist/cjs/index.cjs
CHANGED
|
@@ -9,7 +9,6 @@ const fileRoute = require("./fileRoute.cjs");
|
|
|
9
9
|
const lazyRouteComponent = require("./lazyRouteComponent.cjs");
|
|
10
10
|
const link = require("./link.cjs");
|
|
11
11
|
const Matches = require("./Matches.cjs");
|
|
12
|
-
const matchContext = require("./matchContext.cjs");
|
|
13
12
|
const Match = require("./Match.cjs");
|
|
14
13
|
const useMatch = require("./useMatch.cjs");
|
|
15
14
|
const useLoaderDeps = require("./useLoaderDeps.cjs");
|
|
@@ -27,7 +26,6 @@ const useRouter = require("./useRouter.cjs");
|
|
|
27
26
|
const useRouterState = require("./useRouterState.cjs");
|
|
28
27
|
const useLocation = require("./useLocation.cjs");
|
|
29
28
|
const useCanGoBack = require("./useCanGoBack.cjs");
|
|
30
|
-
const utils = require("./utils.cjs");
|
|
31
29
|
const notFound = require("./not-found.cjs");
|
|
32
30
|
const ScriptOnce = require("./ScriptOnce.cjs");
|
|
33
31
|
const Asset = require("./Asset.cjs");
|
|
@@ -38,26 +36,14 @@ Object.defineProperty(exports, "DEFAULT_PROTOCOL_ALLOWLIST", {
|
|
|
38
36
|
enumerable: true,
|
|
39
37
|
get: () => routerCore.DEFAULT_PROTOCOL_ALLOWLIST
|
|
40
38
|
});
|
|
41
|
-
Object.defineProperty(exports, "PathParamError", {
|
|
42
|
-
enumerable: true,
|
|
43
|
-
get: () => routerCore.PathParamError
|
|
44
|
-
});
|
|
45
39
|
Object.defineProperty(exports, "SearchParamError", {
|
|
46
40
|
enumerable: true,
|
|
47
41
|
get: () => routerCore.SearchParamError
|
|
48
42
|
});
|
|
49
|
-
Object.defineProperty(exports, "TSR_DEFERRED_PROMISE", {
|
|
50
|
-
enumerable: true,
|
|
51
|
-
get: () => routerCore.TSR_DEFERRED_PROMISE
|
|
52
|
-
});
|
|
53
43
|
Object.defineProperty(exports, "cleanPath", {
|
|
54
44
|
enumerable: true,
|
|
55
45
|
get: () => routerCore.cleanPath
|
|
56
46
|
});
|
|
57
|
-
Object.defineProperty(exports, "componentTypes", {
|
|
58
|
-
enumerable: true,
|
|
59
|
-
get: () => routerCore.componentTypes
|
|
60
|
-
});
|
|
61
47
|
Object.defineProperty(exports, "composeRewrites", {
|
|
62
48
|
enumerable: true,
|
|
63
49
|
get: () => routerCore.composeRewrites
|
|
@@ -78,10 +64,6 @@ Object.defineProperty(exports, "defaultParseSearch", {
|
|
|
78
64
|
enumerable: true,
|
|
79
65
|
get: () => routerCore.defaultParseSearch
|
|
80
66
|
});
|
|
81
|
-
Object.defineProperty(exports, "defaultSerializeError", {
|
|
82
|
-
enumerable: true,
|
|
83
|
-
get: () => routerCore.defaultSerializeError
|
|
84
|
-
});
|
|
85
67
|
Object.defineProperty(exports, "defaultStringifySearch", {
|
|
86
68
|
enumerable: true,
|
|
87
69
|
get: () => routerCore.defaultStringifySearch
|
|
@@ -94,10 +76,6 @@ Object.defineProperty(exports, "functionalUpdate", {
|
|
|
94
76
|
enumerable: true,
|
|
95
77
|
get: () => routerCore.functionalUpdate
|
|
96
78
|
});
|
|
97
|
-
Object.defineProperty(exports, "getInitialRouterState", {
|
|
98
|
-
enumerable: true,
|
|
99
|
-
get: () => routerCore.getInitialRouterState
|
|
100
|
-
});
|
|
101
79
|
Object.defineProperty(exports, "interpolatePath", {
|
|
102
80
|
enumerable: true,
|
|
103
81
|
get: () => routerCore.interpolatePath
|
|
@@ -217,7 +195,6 @@ exports.useChildMatches = Matches.useChildMatches;
|
|
|
217
195
|
exports.useMatchRoute = Matches.useMatchRoute;
|
|
218
196
|
exports.useMatches = Matches.useMatches;
|
|
219
197
|
exports.useParentMatches = Matches.useParentMatches;
|
|
220
|
-
exports.matchContext = matchContext.matchContext;
|
|
221
198
|
exports.Match = Match.Match;
|
|
222
199
|
exports.Outlet = Match.Outlet;
|
|
223
200
|
exports.useMatch = useMatch.useMatch;
|
|
@@ -250,7 +227,6 @@ exports.useRouter = useRouter.useRouter;
|
|
|
250
227
|
exports.useRouterState = useRouterState.useRouterState;
|
|
251
228
|
exports.useLocation = useLocation.useLocation;
|
|
252
229
|
exports.useCanGoBack = useCanGoBack.useCanGoBack;
|
|
253
|
-
exports.useLayoutEffect = utils.useLayoutEffect;
|
|
254
230
|
exports.CatchNotFound = notFound.CatchNotFound;
|
|
255
231
|
exports.DefaultGlobalNotFound = notFound.DefaultGlobalNotFound;
|
|
256
232
|
exports.ScriptOnce = ScriptOnce.ScriptOnce;
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/cjs/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { defer,
|
|
1
|
+
export { defer, isMatch, joinPaths, cleanPath, trimPathLeft, trimPathRight, trimPath, resolvePath, interpolatePath, rootRouteId, defaultParseSearch, defaultStringifySearch, parseSearchWith, stringifySearchWith, functionalUpdate, replaceEqualDeep, isPlainObject, isPlainArray, deepEqual, createControlledPromise, retainSearchParams, stripSearchParams, createSerializationAdapter, } from '@tanstack/router-core';
|
|
2
2
|
export type { DeferredPromiseState, DeferredPromise, ParsedLocation, RemoveTrailingSlashes, RemoveLeadingSlashes, ActiveOptions, ResolveRelativePath, RootRouteId, AnyPathParams, ResolveParams, ResolveOptionalParams, ResolveRequiredParams, SearchSchemaInput, AnyContext, RouteContext, PreloadableObj, RoutePathOptions, StaticDataRouteOption, RoutePathOptionsIntersection, UpdatableStaticRouteOption, MetaDescriptor, RouteLinkEntry, ParseParamsFn, SearchFilter, ResolveId, InferFullSearchSchema, InferFullSearchSchemaInput, ErrorRouteProps, ErrorComponentProps, NotFoundRouteProps, TrimPath, TrimPathLeft, TrimPathRight, StringifyParamsFn, ParamsOptions, InferAllParams, InferAllContext, LooseReturnType, LooseAsyncReturnType, ContextReturnType, ContextAsyncReturnType, ResolveLoaderData, ResolveRouteContext, SearchSerializer, SearchParser, TrailingSlashOption, 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, RedirectOptions, ResolvedRedirect, RouteOptions, FileBaseRouteOptions, BaseRouteOptions, UpdatableRouteOptions, RouteLoaderFn, LoaderFnContext, MakeRouteMatch, MakeRouteMatchUnion, RouteMatch, AnyRouteMatch, RouteContextFn, RouteContextOptions, BeforeLoadContextOptions, ContextOptions, RootRouteOptions, AnyRouteWithContext, LazyRouteOptions, AnyRoute, ResolveFullPath, RouteConstraints, RouterState, ListenerFn, BuildNextOptions, AnyRouter, RegisteredRouter, RouterEvents, RouterEvent, RouterListener, MatchRouteOptions, RouteMask, RouterContextOptions, RouterOptions, RouterConstructorOptions, ControllablePromise, InjectedHtmlEntry, CreateFileRoute, CreateLazyFileRoute, AnySerializationAdapter, SerializationAdapter, SerializableExtensions, } from '@tanstack/router-core';
|
|
3
3
|
export { createHistory, createBrowserHistory, createHashHistory, createMemoryHistory, } from '@tanstack/history';
|
|
4
4
|
export type { BlockerFn, HistoryLocation, RouterHistory, ParsedPath, HistoryState, } from '@tanstack/history';
|
|
@@ -13,7 +13,6 @@ export { useLinkProps, createLink, Link, linkOptions } from './link.cjs';
|
|
|
13
13
|
export type { UseLinkPropsOptions, ActiveLinkOptions, LinkProps, LinkComponent, LinkComponentProps, CreateLinkProps, } from './link.cjs';
|
|
14
14
|
export { Matches, useMatchRoute, MatchRoute, useMatches, useParentMatches, useChildMatches, } from './Matches.cjs';
|
|
15
15
|
export type { UseMatchRouteOptions, MakeMatchRouteOptions } from './Matches.cjs';
|
|
16
|
-
export { matchContext } from './matchContext.cjs';
|
|
17
16
|
export { Match, Outlet } from './Match.cjs';
|
|
18
17
|
export { useMatch } from './useMatch.cjs';
|
|
19
18
|
export { useLoaderDeps } from './useLoaderDeps.cjs';
|
|
@@ -22,7 +21,7 @@ export { redirect, isRedirect, DEFAULT_PROTOCOL_ALLOWLIST, } from '@tanstack/rou
|
|
|
22
21
|
export { RouteApi, getRouteApi, Route, createRoute, RootRoute, rootRouteWithContext, createRootRoute, createRootRouteWithContext, createRouteMask, NotFoundRoute, } from './route.cjs';
|
|
23
22
|
export type { AnyRootRoute, SolidNode, AsyncRouteComponent, RouteComponent, ErrorRouteComponent, NotFoundRouteComponent, } from './route.cjs';
|
|
24
23
|
export { createRouter, Router } from './router.cjs';
|
|
25
|
-
export {
|
|
24
|
+
export { lazyFn, SearchParamError } from '@tanstack/router-core';
|
|
26
25
|
export { RouterProvider, RouterContextProvider } from './RouterProvider.cjs';
|
|
27
26
|
export type { RouterProps } from './RouterProvider.cjs';
|
|
28
27
|
export { useElementScrollRestoration, ScrollRestoration, } from './ScrollRestoration.cjs';
|
|
@@ -36,7 +35,6 @@ export { useRouter } from './useRouter.cjs';
|
|
|
36
35
|
export { useRouterState } from './useRouterState.cjs';
|
|
37
36
|
export { useLocation } from './useLocation.cjs';
|
|
38
37
|
export { useCanGoBack } from './useCanGoBack.cjs';
|
|
39
|
-
export { useLayoutEffect } from './utils.cjs';
|
|
40
38
|
export { CatchNotFound, DefaultGlobalNotFound } from './not-found.cjs';
|
|
41
39
|
export { notFound, isNotFound } from '@tanstack/router-core';
|
|
42
40
|
export type { NotFoundError } from '@tanstack/router-core';
|
package/dist/cjs/index.dev.cjs
CHANGED
|
@@ -9,7 +9,6 @@ const fileRoute = require("./fileRoute.cjs");
|
|
|
9
9
|
const lazyRouteComponent = require("./lazyRouteComponent.cjs");
|
|
10
10
|
const link = require("./link.cjs");
|
|
11
11
|
const Matches = require("./Matches.cjs");
|
|
12
|
-
const matchContext = require("./matchContext.cjs");
|
|
13
12
|
const Match = require("./Match.cjs");
|
|
14
13
|
const useMatch = require("./useMatch.cjs");
|
|
15
14
|
const useLoaderDeps = require("./useLoaderDeps.cjs");
|
|
@@ -27,7 +26,6 @@ const useRouter = require("./useRouter.cjs");
|
|
|
27
26
|
const useRouterState = require("./useRouterState.cjs");
|
|
28
27
|
const useLocation = require("./useLocation.cjs");
|
|
29
28
|
const useCanGoBack = require("./useCanGoBack.cjs");
|
|
30
|
-
const utils = require("./utils.cjs");
|
|
31
29
|
const notFound = require("./not-found.cjs");
|
|
32
30
|
const ScriptOnce = require("./ScriptOnce.cjs");
|
|
33
31
|
const Asset = require("./Asset.cjs");
|
|
@@ -38,26 +36,14 @@ Object.defineProperty(exports, "DEFAULT_PROTOCOL_ALLOWLIST", {
|
|
|
38
36
|
enumerable: true,
|
|
39
37
|
get: () => routerCore.DEFAULT_PROTOCOL_ALLOWLIST
|
|
40
38
|
});
|
|
41
|
-
Object.defineProperty(exports, "PathParamError", {
|
|
42
|
-
enumerable: true,
|
|
43
|
-
get: () => routerCore.PathParamError
|
|
44
|
-
});
|
|
45
39
|
Object.defineProperty(exports, "SearchParamError", {
|
|
46
40
|
enumerable: true,
|
|
47
41
|
get: () => routerCore.SearchParamError
|
|
48
42
|
});
|
|
49
|
-
Object.defineProperty(exports, "TSR_DEFERRED_PROMISE", {
|
|
50
|
-
enumerable: true,
|
|
51
|
-
get: () => routerCore.TSR_DEFERRED_PROMISE
|
|
52
|
-
});
|
|
53
43
|
Object.defineProperty(exports, "cleanPath", {
|
|
54
44
|
enumerable: true,
|
|
55
45
|
get: () => routerCore.cleanPath
|
|
56
46
|
});
|
|
57
|
-
Object.defineProperty(exports, "componentTypes", {
|
|
58
|
-
enumerable: true,
|
|
59
|
-
get: () => routerCore.componentTypes
|
|
60
|
-
});
|
|
61
47
|
Object.defineProperty(exports, "composeRewrites", {
|
|
62
48
|
enumerable: true,
|
|
63
49
|
get: () => routerCore.composeRewrites
|
|
@@ -78,10 +64,6 @@ Object.defineProperty(exports, "defaultParseSearch", {
|
|
|
78
64
|
enumerable: true,
|
|
79
65
|
get: () => routerCore.defaultParseSearch
|
|
80
66
|
});
|
|
81
|
-
Object.defineProperty(exports, "defaultSerializeError", {
|
|
82
|
-
enumerable: true,
|
|
83
|
-
get: () => routerCore.defaultSerializeError
|
|
84
|
-
});
|
|
85
67
|
Object.defineProperty(exports, "defaultStringifySearch", {
|
|
86
68
|
enumerable: true,
|
|
87
69
|
get: () => routerCore.defaultStringifySearch
|
|
@@ -94,10 +76,6 @@ Object.defineProperty(exports, "functionalUpdate", {
|
|
|
94
76
|
enumerable: true,
|
|
95
77
|
get: () => routerCore.functionalUpdate
|
|
96
78
|
});
|
|
97
|
-
Object.defineProperty(exports, "getInitialRouterState", {
|
|
98
|
-
enumerable: true,
|
|
99
|
-
get: () => routerCore.getInitialRouterState
|
|
100
|
-
});
|
|
101
79
|
Object.defineProperty(exports, "interpolatePath", {
|
|
102
80
|
enumerable: true,
|
|
103
81
|
get: () => routerCore.interpolatePath
|
|
@@ -217,7 +195,6 @@ exports.useChildMatches = Matches.useChildMatches;
|
|
|
217
195
|
exports.useMatchRoute = Matches.useMatchRoute;
|
|
218
196
|
exports.useMatches = Matches.useMatches;
|
|
219
197
|
exports.useParentMatches = Matches.useParentMatches;
|
|
220
|
-
exports.matchContext = matchContext.matchContext;
|
|
221
198
|
exports.Match = Match.Match;
|
|
222
199
|
exports.Outlet = Match.Outlet;
|
|
223
200
|
exports.useMatch = useMatch.useMatch;
|
|
@@ -250,7 +227,6 @@ exports.useRouter = useRouter.useRouter;
|
|
|
250
227
|
exports.useRouterState = useRouterState.useRouterState;
|
|
251
228
|
exports.useLocation = useLocation.useLocation;
|
|
252
229
|
exports.useCanGoBack = useCanGoBack.useCanGoBack;
|
|
253
|
-
exports.useLayoutEffect = utils.useLayoutEffect;
|
|
254
230
|
exports.CatchNotFound = notFound.CatchNotFound;
|
|
255
231
|
exports.DefaultGlobalNotFound = notFound.DefaultGlobalNotFound;
|
|
256
232
|
exports.ScriptOnce = ScriptOnce.ScriptOnce;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.dev.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.dev.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/cjs/utils.cjs
CHANGED
|
@@ -18,7 +18,6 @@ function _interopNamespaceDefault(e) {
|
|
|
18
18
|
return Object.freeze(n);
|
|
19
19
|
}
|
|
20
20
|
const Solid__namespace = /* @__PURE__ */ _interopNamespaceDefault(Solid);
|
|
21
|
-
const useLayoutEffect = typeof window !== "undefined" ? Solid__namespace.createRenderEffect : Solid__namespace.createEffect;
|
|
22
21
|
const usePrevious = (fn) => {
|
|
23
22
|
return Solid__namespace.createMemo(
|
|
24
23
|
(prev = {
|
|
@@ -53,6 +52,5 @@ function useIntersectionObserver(ref, callback, intersectionObserverOptions = {}
|
|
|
53
52
|
return () => observerRef;
|
|
54
53
|
}
|
|
55
54
|
exports.useIntersectionObserver = useIntersectionObserver;
|
|
56
|
-
exports.useLayoutEffect = useLayoutEffect;
|
|
57
55
|
exports.usePrevious = usePrevious;
|
|
58
56
|
//# sourceMappingURL=utils.cjs.map
|
package/dist/cjs/utils.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.cjs","sources":["../../src/utils.ts"],"sourcesContent":["import * as Solid from 'solid-js'\n\nexport const
|
|
1
|
+
{"version":3,"file":"utils.cjs","sources":["../../src/utils.ts"],"sourcesContent":["import * as Solid from 'solid-js'\n\nexport const usePrevious = (fn: () => boolean) => {\n return Solid.createMemo(\n (\n prev: { current: boolean | null; previous: boolean | null } = {\n current: null,\n previous: null,\n },\n ) => {\n const current = fn()\n\n if (prev.current !== current) {\n prev.previous = prev.current\n prev.current = current\n }\n\n return prev\n },\n )\n}\n\n/**\n * React hook to wrap `IntersectionObserver`.\n *\n * This hook will create an `IntersectionObserver` and observe the ref passed to it.\n *\n * When the intersection changes, the callback will be called with the `IntersectionObserverEntry`.\n *\n * @param ref - The ref to observe\n * @param intersectionObserverOptions - The options to pass to the IntersectionObserver\n * @param options - The options to pass to the hook\n * @param callback - The callback to call when the intersection changes\n * @returns The IntersectionObserver instance\n * @example\n * ```tsx\n * const MyComponent = () => {\n * const ref = React.useRef<HTMLDivElement>(null)\n * useIntersectionObserver(\n * ref,\n * (entry) => { doSomething(entry) },\n * { rootMargin: '10px' },\n * { disabled: false }\n * )\n * return <div ref={ref} />\n * ```\n */\nexport function useIntersectionObserver<T extends Element>(\n ref: Solid.Accessor<T | null>,\n callback: (entry: IntersectionObserverEntry | undefined) => void,\n intersectionObserverOptions: IntersectionObserverInit = {},\n options: { disabled?: boolean } = {},\n): Solid.Accessor<IntersectionObserver | null> {\n const isIntersectionObserverAvailable =\n typeof IntersectionObserver === 'function'\n let observerRef: IntersectionObserver | null = null\n\n Solid.createEffect(() => {\n const r = ref()\n if (!r || !isIntersectionObserverAvailable || options.disabled) {\n return\n }\n\n observerRef = new IntersectionObserver(([entry]) => {\n callback(entry)\n }, intersectionObserverOptions)\n\n observerRef.observe(r)\n\n Solid.onCleanup(() => {\n observerRef?.disconnect()\n })\n })\n\n return () => observerRef\n}\n"],"names":["Solid"],"mappings":";;;;;;;;;;;;;;;;;;;;AAEO,MAAM,cAAc,CAAC,OAAsB;AAChD,SAAOA,iBAAM;AAAA,IACX,CACE,OAA8D;AAAA,MAC5D,SAAS;AAAA,MACT,UAAU;AAAA,IAAA,MAET;AACH,YAAM,UAAU,GAAA;AAEhB,UAAI,KAAK,YAAY,SAAS;AAC5B,aAAK,WAAW,KAAK;AACrB,aAAK,UAAU;AAAA,MACjB;AAEA,aAAO;AAAA,IACT;AAAA,EAAA;AAEJ;AA2BO,SAAS,wBACd,KACA,UACA,8BAAwD,CAAA,GACxD,UAAkC,IACW;AAC7C,QAAM,kCACJ,OAAO,yBAAyB;AAClC,MAAI,cAA2C;AAE/CA,mBAAM,aAAa,MAAM;AACvB,UAAM,IAAI,IAAA;AACV,QAAI,CAAC,KAAK,CAAC,mCAAmC,QAAQ,UAAU;AAC9D;AAAA,IACF;AAEA,kBAAc,IAAI,qBAAqB,CAAC,CAAC,KAAK,MAAM;AAClD,eAAS,KAAK;AAAA,IAChB,GAAG,2BAA2B;AAE9B,gBAAY,QAAQ,CAAC;AAErBA,qBAAM,UAAU,MAAM;AACpB,mBAAa,WAAA;AAAA,IACf,CAAC;AAAA,EACH,CAAC;AAED,SAAO,MAAM;AACf;;;"}
|
package/dist/cjs/utils.d.cts
CHANGED
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { defer,
|
|
1
|
+
export { defer, isMatch, joinPaths, cleanPath, trimPathLeft, trimPathRight, trimPath, resolvePath, interpolatePath, rootRouteId, defaultParseSearch, defaultStringifySearch, parseSearchWith, stringifySearchWith, functionalUpdate, replaceEqualDeep, isPlainObject, isPlainArray, deepEqual, createControlledPromise, retainSearchParams, stripSearchParams, createSerializationAdapter, } from '@tanstack/router-core';
|
|
2
2
|
export type { DeferredPromiseState, DeferredPromise, ParsedLocation, RemoveTrailingSlashes, RemoveLeadingSlashes, ActiveOptions, ResolveRelativePath, RootRouteId, AnyPathParams, ResolveParams, ResolveOptionalParams, ResolveRequiredParams, SearchSchemaInput, AnyContext, RouteContext, PreloadableObj, RoutePathOptions, StaticDataRouteOption, RoutePathOptionsIntersection, UpdatableStaticRouteOption, MetaDescriptor, RouteLinkEntry, ParseParamsFn, SearchFilter, ResolveId, InferFullSearchSchema, InferFullSearchSchemaInput, ErrorRouteProps, ErrorComponentProps, NotFoundRouteProps, TrimPath, TrimPathLeft, TrimPathRight, StringifyParamsFn, ParamsOptions, InferAllParams, InferAllContext, LooseReturnType, LooseAsyncReturnType, ContextReturnType, ContextAsyncReturnType, ResolveLoaderData, ResolveRouteContext, SearchSerializer, SearchParser, TrailingSlashOption, 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, RedirectOptions, ResolvedRedirect, RouteOptions, FileBaseRouteOptions, BaseRouteOptions, UpdatableRouteOptions, RouteLoaderFn, LoaderFnContext, MakeRouteMatch, MakeRouteMatchUnion, RouteMatch, AnyRouteMatch, RouteContextFn, RouteContextOptions, BeforeLoadContextOptions, ContextOptions, RootRouteOptions, AnyRouteWithContext, LazyRouteOptions, AnyRoute, ResolveFullPath, RouteConstraints, RouterState, ListenerFn, BuildNextOptions, AnyRouter, RegisteredRouter, RouterEvents, RouterEvent, RouterListener, MatchRouteOptions, RouteMask, RouterContextOptions, RouterOptions, RouterConstructorOptions, ControllablePromise, InjectedHtmlEntry, CreateFileRoute, CreateLazyFileRoute, AnySerializationAdapter, SerializationAdapter, SerializableExtensions, } from '@tanstack/router-core';
|
|
3
3
|
export { createHistory, createBrowserHistory, createHashHistory, createMemoryHistory, } from '@tanstack/history';
|
|
4
4
|
export type { BlockerFn, HistoryLocation, RouterHistory, ParsedPath, HistoryState, } from '@tanstack/history';
|
|
@@ -13,7 +13,6 @@ export { useLinkProps, createLink, Link, linkOptions } from './link.js';
|
|
|
13
13
|
export type { UseLinkPropsOptions, ActiveLinkOptions, LinkProps, LinkComponent, LinkComponentProps, CreateLinkProps, } from './link.js';
|
|
14
14
|
export { Matches, useMatchRoute, MatchRoute, useMatches, useParentMatches, useChildMatches, } from './Matches.js';
|
|
15
15
|
export type { UseMatchRouteOptions, MakeMatchRouteOptions } from './Matches.js';
|
|
16
|
-
export { matchContext } from './matchContext.js';
|
|
17
16
|
export { Match, Outlet } from './Match.js';
|
|
18
17
|
export { useMatch } from './useMatch.js';
|
|
19
18
|
export { useLoaderDeps } from './useLoaderDeps.js';
|
|
@@ -22,7 +21,7 @@ export { redirect, isRedirect, DEFAULT_PROTOCOL_ALLOWLIST, } from '@tanstack/rou
|
|
|
22
21
|
export { RouteApi, getRouteApi, Route, createRoute, RootRoute, rootRouteWithContext, createRootRoute, createRootRouteWithContext, createRouteMask, NotFoundRoute, } from './route.js';
|
|
23
22
|
export type { AnyRootRoute, SolidNode, AsyncRouteComponent, RouteComponent, ErrorRouteComponent, NotFoundRouteComponent, } from './route.js';
|
|
24
23
|
export { createRouter, Router } from './router.js';
|
|
25
|
-
export {
|
|
24
|
+
export { lazyFn, SearchParamError } from '@tanstack/router-core';
|
|
26
25
|
export { RouterProvider, RouterContextProvider } from './RouterProvider.js';
|
|
27
26
|
export type { RouterProps } from './RouterProvider.js';
|
|
28
27
|
export { useElementScrollRestoration, ScrollRestoration, } from './ScrollRestoration.js';
|
|
@@ -36,7 +35,6 @@ export { useRouter } from './useRouter.js';
|
|
|
36
35
|
export { useRouterState } from './useRouterState.js';
|
|
37
36
|
export { useLocation } from './useLocation.js';
|
|
38
37
|
export { useCanGoBack } from './useCanGoBack.js';
|
|
39
|
-
export { useLayoutEffect } from './utils.js';
|
|
40
38
|
export { CatchNotFound, DefaultGlobalNotFound } from './not-found.js';
|
|
41
39
|
export { notFound, isNotFound } from '@tanstack/router-core';
|
|
42
40
|
export type { NotFoundError } from '@tanstack/router-core';
|
package/dist/esm/index.dev.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_PROTOCOL_ALLOWLIST,
|
|
1
|
+
import { DEFAULT_PROTOCOL_ALLOWLIST, SearchParamError, cleanPath, composeRewrites, createControlledPromise, createSerializationAdapter, deepEqual, defaultParseSearch, defaultStringifySearch, defer, functionalUpdate, interpolatePath, isMatch, isNotFound, isPlainArray, isPlainObject, isRedirect, joinPaths, lazyFn, notFound, parseSearchWith, redirect, replaceEqualDeep, resolvePath, retainSearchParams, rootRouteId, stringifySearchWith, stripSearchParams, trimPath, trimPathLeft, trimPathRight } from "@tanstack/router-core";
|
|
2
2
|
import { createBrowserHistory, createHashHistory, createHistory, createMemoryHistory } from "@tanstack/history";
|
|
3
3
|
import { Await, useAwaited } from "./awaited.js";
|
|
4
4
|
import { CatchBoundary, ErrorComponent } from "./CatchBoundary.js";
|
|
@@ -7,7 +7,6 @@ import { FileRoute, FileRouteLoader, LazyRoute, createFileRoute, createLazyFileR
|
|
|
7
7
|
import { lazyRouteComponent } from "./lazyRouteComponent.js";
|
|
8
8
|
import { Link, createLink, linkOptions, useLinkProps } from "./link.js";
|
|
9
9
|
import { MatchRoute, Matches, useChildMatches, useMatchRoute, useMatches, useParentMatches } from "./Matches.js";
|
|
10
|
-
import { matchContext } from "./matchContext.js";
|
|
11
10
|
import { Match, Outlet } from "./Match.js";
|
|
12
11
|
import { useMatch } from "./useMatch.js";
|
|
13
12
|
import { useLoaderDeps } from "./useLoaderDeps.js";
|
|
@@ -25,7 +24,6 @@ import { useRouter } from "./useRouter.js";
|
|
|
25
24
|
import { useRouterState } from "./useRouterState.js";
|
|
26
25
|
import { useLocation } from "./useLocation.js";
|
|
27
26
|
import { useCanGoBack } from "./useCanGoBack.js";
|
|
28
|
-
import { useLayoutEffect } from "./utils.js";
|
|
29
27
|
import { CatchNotFound, DefaultGlobalNotFound } from "./not-found.js";
|
|
30
28
|
import { ScriptOnce } from "./ScriptOnce.js";
|
|
31
29
|
import { Asset } from "./Asset.js";
|
|
@@ -53,7 +51,6 @@ export {
|
|
|
53
51
|
Navigate,
|
|
54
52
|
NotFoundRoute,
|
|
55
53
|
Outlet,
|
|
56
|
-
PathParamError,
|
|
57
54
|
RootRoute,
|
|
58
55
|
Route,
|
|
59
56
|
RouteApi,
|
|
@@ -64,9 +61,7 @@ export {
|
|
|
64
61
|
Scripts,
|
|
65
62
|
ScrollRestoration,
|
|
66
63
|
SearchParamError,
|
|
67
|
-
TSR_DEFERRED_PROMISE,
|
|
68
64
|
cleanPath,
|
|
69
|
-
componentTypes,
|
|
70
65
|
composeRewrites,
|
|
71
66
|
createBrowserHistory,
|
|
72
67
|
createControlledPromise,
|
|
@@ -85,11 +80,9 @@ export {
|
|
|
85
80
|
createSerializationAdapter,
|
|
86
81
|
deepEqual,
|
|
87
82
|
defaultParseSearch,
|
|
88
|
-
defaultSerializeError,
|
|
89
83
|
defaultStringifySearch,
|
|
90
84
|
defer,
|
|
91
85
|
functionalUpdate,
|
|
92
|
-
getInitialRouterState,
|
|
93
86
|
getRouteApi,
|
|
94
87
|
interpolatePath,
|
|
95
88
|
isMatch,
|
|
@@ -101,7 +94,6 @@ export {
|
|
|
101
94
|
lazyFn,
|
|
102
95
|
lazyRouteComponent,
|
|
103
96
|
linkOptions,
|
|
104
|
-
matchContext,
|
|
105
97
|
notFound,
|
|
106
98
|
parseSearchWith,
|
|
107
99
|
redirect,
|
|
@@ -121,7 +113,6 @@ export {
|
|
|
121
113
|
useChildMatches,
|
|
122
114
|
useElementScrollRestoration,
|
|
123
115
|
useHydrated,
|
|
124
|
-
useLayoutEffect,
|
|
125
116
|
useLinkProps,
|
|
126
117
|
useLoaderData,
|
|
127
118
|
useLoaderDeps,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.dev.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.dev.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_PROTOCOL_ALLOWLIST,
|
|
1
|
+
import { DEFAULT_PROTOCOL_ALLOWLIST, SearchParamError, cleanPath, composeRewrites, createControlledPromise, createSerializationAdapter, deepEqual, defaultParseSearch, defaultStringifySearch, defer, functionalUpdate, interpolatePath, isMatch, isNotFound, isPlainArray, isPlainObject, isRedirect, joinPaths, lazyFn, notFound, parseSearchWith, redirect, replaceEqualDeep, resolvePath, retainSearchParams, rootRouteId, stringifySearchWith, stripSearchParams, trimPath, trimPathLeft, trimPathRight } from "@tanstack/router-core";
|
|
2
2
|
import { createBrowserHistory, createHashHistory, createHistory, createMemoryHistory } from "@tanstack/history";
|
|
3
3
|
import { Await, useAwaited } from "./awaited.js";
|
|
4
4
|
import { CatchBoundary, ErrorComponent } from "./CatchBoundary.js";
|
|
@@ -7,7 +7,6 @@ import { FileRoute, FileRouteLoader, LazyRoute, createFileRoute, createLazyFileR
|
|
|
7
7
|
import { lazyRouteComponent } from "./lazyRouteComponent.js";
|
|
8
8
|
import { Link, createLink, linkOptions, useLinkProps } from "./link.js";
|
|
9
9
|
import { MatchRoute, Matches, useChildMatches, useMatchRoute, useMatches, useParentMatches } from "./Matches.js";
|
|
10
|
-
import { matchContext } from "./matchContext.js";
|
|
11
10
|
import { Match, Outlet } from "./Match.js";
|
|
12
11
|
import { useMatch } from "./useMatch.js";
|
|
13
12
|
import { useLoaderDeps } from "./useLoaderDeps.js";
|
|
@@ -25,7 +24,6 @@ import { useRouter } from "./useRouter.js";
|
|
|
25
24
|
import { useRouterState } from "./useRouterState.js";
|
|
26
25
|
import { useLocation } from "./useLocation.js";
|
|
27
26
|
import { useCanGoBack } from "./useCanGoBack.js";
|
|
28
|
-
import { useLayoutEffect } from "./utils.js";
|
|
29
27
|
import { CatchNotFound, DefaultGlobalNotFound } from "./not-found.js";
|
|
30
28
|
import { ScriptOnce } from "./ScriptOnce.js";
|
|
31
29
|
import { Asset } from "./Asset.js";
|
|
@@ -53,7 +51,6 @@ export {
|
|
|
53
51
|
Navigate,
|
|
54
52
|
NotFoundRoute,
|
|
55
53
|
Outlet,
|
|
56
|
-
PathParamError,
|
|
57
54
|
RootRoute,
|
|
58
55
|
Route,
|
|
59
56
|
RouteApi,
|
|
@@ -64,9 +61,7 @@ export {
|
|
|
64
61
|
Scripts,
|
|
65
62
|
ScrollRestoration,
|
|
66
63
|
SearchParamError,
|
|
67
|
-
TSR_DEFERRED_PROMISE,
|
|
68
64
|
cleanPath,
|
|
69
|
-
componentTypes,
|
|
70
65
|
composeRewrites,
|
|
71
66
|
createBrowserHistory,
|
|
72
67
|
createControlledPromise,
|
|
@@ -85,11 +80,9 @@ export {
|
|
|
85
80
|
createSerializationAdapter,
|
|
86
81
|
deepEqual,
|
|
87
82
|
defaultParseSearch,
|
|
88
|
-
defaultSerializeError,
|
|
89
83
|
defaultStringifySearch,
|
|
90
84
|
defer,
|
|
91
85
|
functionalUpdate,
|
|
92
|
-
getInitialRouterState,
|
|
93
86
|
getRouteApi,
|
|
94
87
|
interpolatePath,
|
|
95
88
|
isMatch,
|
|
@@ -101,7 +94,6 @@ export {
|
|
|
101
94
|
lazyFn,
|
|
102
95
|
lazyRouteComponent,
|
|
103
96
|
linkOptions,
|
|
104
|
-
matchContext,
|
|
105
97
|
notFound,
|
|
106
98
|
parseSearchWith,
|
|
107
99
|
redirect,
|
|
@@ -121,7 +113,6 @@ export {
|
|
|
121
113
|
useChildMatches,
|
|
122
114
|
useElementScrollRestoration,
|
|
123
115
|
useHydrated,
|
|
124
|
-
useLayoutEffect,
|
|
125
116
|
useLinkProps,
|
|
126
117
|
useLoaderData,
|
|
127
118
|
useLoaderDeps,
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/esm/utils.d.ts
CHANGED
package/dist/esm/utils.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as Solid from "solid-js";
|
|
2
|
-
const useLayoutEffect = typeof window !== "undefined" ? Solid.createRenderEffect : Solid.createEffect;
|
|
3
2
|
const usePrevious = (fn) => {
|
|
4
3
|
return Solid.createMemo(
|
|
5
4
|
(prev = {
|
|
@@ -35,7 +34,6 @@ function useIntersectionObserver(ref, callback, intersectionObserverOptions = {}
|
|
|
35
34
|
}
|
|
36
35
|
export {
|
|
37
36
|
useIntersectionObserver,
|
|
38
|
-
useLayoutEffect,
|
|
39
37
|
usePrevious
|
|
40
38
|
};
|
|
41
39
|
//# sourceMappingURL=utils.js.map
|
package/dist/esm/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../src/utils.ts"],"sourcesContent":["import * as Solid from 'solid-js'\n\nexport const
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../src/utils.ts"],"sourcesContent":["import * as Solid from 'solid-js'\n\nexport const usePrevious = (fn: () => boolean) => {\n return Solid.createMemo(\n (\n prev: { current: boolean | null; previous: boolean | null } = {\n current: null,\n previous: null,\n },\n ) => {\n const current = fn()\n\n if (prev.current !== current) {\n prev.previous = prev.current\n prev.current = current\n }\n\n return prev\n },\n )\n}\n\n/**\n * React hook to wrap `IntersectionObserver`.\n *\n * This hook will create an `IntersectionObserver` and observe the ref passed to it.\n *\n * When the intersection changes, the callback will be called with the `IntersectionObserverEntry`.\n *\n * @param ref - The ref to observe\n * @param intersectionObserverOptions - The options to pass to the IntersectionObserver\n * @param options - The options to pass to the hook\n * @param callback - The callback to call when the intersection changes\n * @returns The IntersectionObserver instance\n * @example\n * ```tsx\n * const MyComponent = () => {\n * const ref = React.useRef<HTMLDivElement>(null)\n * useIntersectionObserver(\n * ref,\n * (entry) => { doSomething(entry) },\n * { rootMargin: '10px' },\n * { disabled: false }\n * )\n * return <div ref={ref} />\n * ```\n */\nexport function useIntersectionObserver<T extends Element>(\n ref: Solid.Accessor<T | null>,\n callback: (entry: IntersectionObserverEntry | undefined) => void,\n intersectionObserverOptions: IntersectionObserverInit = {},\n options: { disabled?: boolean } = {},\n): Solid.Accessor<IntersectionObserver | null> {\n const isIntersectionObserverAvailable =\n typeof IntersectionObserver === 'function'\n let observerRef: IntersectionObserver | null = null\n\n Solid.createEffect(() => {\n const r = ref()\n if (!r || !isIntersectionObserverAvailable || options.disabled) {\n return\n }\n\n observerRef = new IntersectionObserver(([entry]) => {\n callback(entry)\n }, intersectionObserverOptions)\n\n observerRef.observe(r)\n\n Solid.onCleanup(() => {\n observerRef?.disconnect()\n })\n })\n\n return () => observerRef\n}\n"],"names":[],"mappings":";AAEO,MAAM,cAAc,CAAC,OAAsB;AAChD,SAAO,MAAM;AAAA,IACX,CACE,OAA8D;AAAA,MAC5D,SAAS;AAAA,MACT,UAAU;AAAA,IAAA,MAET;AACH,YAAM,UAAU,GAAA;AAEhB,UAAI,KAAK,YAAY,SAAS;AAC5B,aAAK,WAAW,KAAK;AACrB,aAAK,UAAU;AAAA,MACjB;AAEA,aAAO;AAAA,IACT;AAAA,EAAA;AAEJ;AA2BO,SAAS,wBACd,KACA,UACA,8BAAwD,CAAA,GACxD,UAAkC,IACW;AAC7C,QAAM,kCACJ,OAAO,yBAAyB;AAClC,MAAI,cAA2C;AAE/C,QAAM,aAAa,MAAM;AACvB,UAAM,IAAI,IAAA;AACV,QAAI,CAAC,KAAK,CAAC,mCAAmC,QAAQ,UAAU;AAC9D;AAAA,IACF;AAEA,kBAAc,IAAI,qBAAqB,CAAC,CAAC,KAAK,MAAM;AAClD,eAAS,KAAK;AAAA,IAChB,GAAG,2BAA2B;AAE9B,gBAAY,QAAQ,CAAC;AAErB,UAAM,UAAU,MAAM;AACpB,mBAAa,WAAA;AAAA,IACf,CAAC;AAAA,EACH,CAAC;AAED,SAAO,MAAM;AACf;"}
|
package/dist/source/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { defer,
|
|
1
|
+
export { defer, isMatch, joinPaths, cleanPath, trimPathLeft, trimPathRight, trimPath, resolvePath, interpolatePath, rootRouteId, defaultParseSearch, defaultStringifySearch, parseSearchWith, stringifySearchWith, functionalUpdate, replaceEqualDeep, isPlainObject, isPlainArray, deepEqual, createControlledPromise, retainSearchParams, stripSearchParams, createSerializationAdapter, } from '@tanstack/router-core';
|
|
2
2
|
export type { DeferredPromiseState, DeferredPromise, ParsedLocation, RemoveTrailingSlashes, RemoveLeadingSlashes, ActiveOptions, ResolveRelativePath, RootRouteId, AnyPathParams, ResolveParams, ResolveOptionalParams, ResolveRequiredParams, SearchSchemaInput, AnyContext, RouteContext, PreloadableObj, RoutePathOptions, StaticDataRouteOption, RoutePathOptionsIntersection, UpdatableStaticRouteOption, MetaDescriptor, RouteLinkEntry, ParseParamsFn, SearchFilter, ResolveId, InferFullSearchSchema, InferFullSearchSchemaInput, ErrorRouteProps, ErrorComponentProps, NotFoundRouteProps, TrimPath, TrimPathLeft, TrimPathRight, StringifyParamsFn, ParamsOptions, InferAllParams, InferAllContext, LooseReturnType, LooseAsyncReturnType, ContextReturnType, ContextAsyncReturnType, ResolveLoaderData, ResolveRouteContext, SearchSerializer, SearchParser, TrailingSlashOption, 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, RedirectOptions, ResolvedRedirect, RouteOptions, FileBaseRouteOptions, BaseRouteOptions, UpdatableRouteOptions, RouteLoaderFn, LoaderFnContext, MakeRouteMatch, MakeRouteMatchUnion, RouteMatch, AnyRouteMatch, RouteContextFn, RouteContextOptions, BeforeLoadContextOptions, ContextOptions, RootRouteOptions, AnyRouteWithContext, LazyRouteOptions, AnyRoute, ResolveFullPath, RouteConstraints, RouterState, ListenerFn, BuildNextOptions, AnyRouter, RegisteredRouter, RouterEvents, RouterEvent, RouterListener, MatchRouteOptions, RouteMask, RouterContextOptions, RouterOptions, RouterConstructorOptions, ControllablePromise, InjectedHtmlEntry, CreateFileRoute, CreateLazyFileRoute, AnySerializationAdapter, SerializationAdapter, SerializableExtensions, } from '@tanstack/router-core';
|
|
3
3
|
export { createHistory, createBrowserHistory, createHashHistory, createMemoryHistory, } from '@tanstack/history';
|
|
4
4
|
export type { BlockerFn, HistoryLocation, RouterHistory, ParsedPath, HistoryState, } from '@tanstack/history';
|
|
@@ -13,7 +13,6 @@ export { useLinkProps, createLink, Link, linkOptions } from './link';
|
|
|
13
13
|
export type { UseLinkPropsOptions, ActiveLinkOptions, LinkProps, LinkComponent, LinkComponentProps, CreateLinkProps, } from './link';
|
|
14
14
|
export { Matches, useMatchRoute, MatchRoute, useMatches, useParentMatches, useChildMatches, } from './Matches';
|
|
15
15
|
export type { UseMatchRouteOptions, MakeMatchRouteOptions } from './Matches';
|
|
16
|
-
export { matchContext } from './matchContext';
|
|
17
16
|
export { Match, Outlet } from './Match';
|
|
18
17
|
export { useMatch } from './useMatch';
|
|
19
18
|
export { useLoaderDeps } from './useLoaderDeps';
|
|
@@ -22,7 +21,7 @@ export { redirect, isRedirect, DEFAULT_PROTOCOL_ALLOWLIST, } from '@tanstack/rou
|
|
|
22
21
|
export { RouteApi, getRouteApi, Route, createRoute, RootRoute, rootRouteWithContext, createRootRoute, createRootRouteWithContext, createRouteMask, NotFoundRoute, } from './route';
|
|
23
22
|
export type { AnyRootRoute, SolidNode, AsyncRouteComponent, RouteComponent, ErrorRouteComponent, NotFoundRouteComponent, } from './route';
|
|
24
23
|
export { createRouter, Router } from './router';
|
|
25
|
-
export {
|
|
24
|
+
export { lazyFn, SearchParamError } from '@tanstack/router-core';
|
|
26
25
|
export { RouterProvider, RouterContextProvider } from './RouterProvider';
|
|
27
26
|
export type { RouterProps } from './RouterProvider';
|
|
28
27
|
export { useElementScrollRestoration, ScrollRestoration, } from './ScrollRestoration';
|
|
@@ -36,7 +35,6 @@ export { useRouter } from './useRouter';
|
|
|
36
35
|
export { useRouterState } from './useRouterState';
|
|
37
36
|
export { useLocation } from './useLocation';
|
|
38
37
|
export { useCanGoBack } from './useCanGoBack';
|
|
39
|
-
export { useLayoutEffect } from './utils';
|
|
40
38
|
export { CatchNotFound, DefaultGlobalNotFound } from './not-found';
|
|
41
39
|
export { notFound, isNotFound } from '@tanstack/router-core';
|
|
42
40
|
export type { NotFoundError } from '@tanstack/router-core';
|
package/dist/source/index.jsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { defer,
|
|
1
|
+
export { defer, isMatch, joinPaths, cleanPath, trimPathLeft, trimPathRight, trimPath, resolvePath, interpolatePath, rootRouteId, defaultParseSearch, defaultStringifySearch, parseSearchWith, stringifySearchWith, functionalUpdate, replaceEqualDeep, isPlainObject, isPlainArray, deepEqual, createControlledPromise, retainSearchParams, stripSearchParams, createSerializationAdapter, } from '@tanstack/router-core';
|
|
2
2
|
export { createHistory, createBrowserHistory, createHashHistory, createMemoryHistory, } from '@tanstack/history';
|
|
3
3
|
export { useAwaited, Await } from './awaited';
|
|
4
4
|
export { CatchBoundary, ErrorComponent } from './CatchBoundary';
|
|
@@ -8,7 +8,6 @@ export * from './history';
|
|
|
8
8
|
export { lazyRouteComponent } from './lazyRouteComponent';
|
|
9
9
|
export { useLinkProps, createLink, Link, linkOptions } from './link';
|
|
10
10
|
export { Matches, useMatchRoute, MatchRoute, useMatches, useParentMatches, useChildMatches, } from './Matches';
|
|
11
|
-
export { matchContext } from './matchContext';
|
|
12
11
|
export { Match, Outlet } from './Match';
|
|
13
12
|
export { useMatch } from './useMatch';
|
|
14
13
|
export { useLoaderDeps } from './useLoaderDeps';
|
|
@@ -16,7 +15,7 @@ export { useLoaderData } from './useLoaderData';
|
|
|
16
15
|
export { redirect, isRedirect, DEFAULT_PROTOCOL_ALLOWLIST, } from '@tanstack/router-core';
|
|
17
16
|
export { RouteApi, getRouteApi, Route, createRoute, RootRoute, rootRouteWithContext, createRootRoute, createRootRouteWithContext, createRouteMask, NotFoundRoute, } from './route';
|
|
18
17
|
export { createRouter, Router } from './router';
|
|
19
|
-
export {
|
|
18
|
+
export { lazyFn, SearchParamError } from '@tanstack/router-core';
|
|
20
19
|
export { RouterProvider, RouterContextProvider } from './RouterProvider';
|
|
21
20
|
export { useElementScrollRestoration, ScrollRestoration, } from './ScrollRestoration';
|
|
22
21
|
export { useBlocker, Block } from './useBlocker';
|
|
@@ -28,7 +27,6 @@ export { useRouter } from './useRouter';
|
|
|
28
27
|
export { useRouterState } from './useRouterState';
|
|
29
28
|
export { useLocation } from './useLocation';
|
|
30
29
|
export { useCanGoBack } from './useCanGoBack';
|
|
31
|
-
export { useLayoutEffect } from './utils';
|
|
32
30
|
export { CatchNotFound, DefaultGlobalNotFound } from './not-found';
|
|
33
31
|
export { notFound, isNotFound } from '@tanstack/router-core';
|
|
34
32
|
export { ScriptOnce } from './ScriptOnce';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"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"}
|
package/dist/source/utils.d.ts
CHANGED
package/dist/source/utils.js
CHANGED
package/dist/source/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,UAAU,CAAA;AAEjC,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,UAAU,CAAA;AAEjC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAiB,EAAE,EAAE;IAC/C,OAAO,KAAK,CAAC,UAAU,CACrB,CACE,OAA8D;QAC5D,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,IAAI;KACf,EACD,EAAE;QACF,MAAM,OAAO,GAAG,EAAE,EAAE,CAAA;QAEpB,IAAI,IAAI,CAAC,OAAO,KAAK,OAAO,EAAE,CAAC;YAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAA;YAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACxB,CAAC;QAED,OAAO,IAAI,CAAA;IACb,CAAC,CACF,CAAA;AACH,CAAC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,uBAAuB,CACrC,GAA6B,EAC7B,QAAgE,EAChE,8BAAwD,EAAE,EAC1D,UAAkC,EAAE;IAEpC,MAAM,+BAA+B,GACnC,OAAO,oBAAoB,KAAK,UAAU,CAAA;IAC5C,IAAI,WAAW,GAAgC,IAAI,CAAA;IAEnD,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE;QACtB,MAAM,CAAC,GAAG,GAAG,EAAE,CAAA;QACf,IAAI,CAAC,CAAC,IAAI,CAAC,+BAA+B,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;YAC/D,OAAM;QACR,CAAC;QAED,WAAW,GAAG,IAAI,oBAAoB,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE;YACjD,QAAQ,CAAC,KAAK,CAAC,CAAA;QACjB,CAAC,EAAE,2BAA2B,CAAC,CAAA;QAE/B,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;QAEtB,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;YACnB,WAAW,EAAE,UAAU,EAAE,CAAA;QAC3B,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,OAAO,GAAG,EAAE,CAAC,WAAW,CAAA;AAC1B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/solid-router",
|
|
3
|
-
"version": "1.162.
|
|
3
|
+
"version": "1.162.5",
|
|
4
4
|
"description": "Modern and scalable routing for Solid applications",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"tiny-invariant": "^1.3.3",
|
|
93
93
|
"tiny-warning": "^1.0.3",
|
|
94
94
|
"@tanstack/history": "1.161.4",
|
|
95
|
-
"@tanstack/router-core": "1.162.
|
|
95
|
+
"@tanstack/router-core": "1.162.5"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
98
|
"@solidjs/testing-library": "^0.8.10",
|
package/src/index.tsx
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export {
|
|
2
2
|
defer,
|
|
3
|
-
TSR_DEFERRED_PROMISE,
|
|
4
3
|
isMatch,
|
|
5
4
|
joinPaths,
|
|
6
5
|
cleanPath,
|
|
@@ -10,7 +9,6 @@ export {
|
|
|
10
9
|
resolvePath,
|
|
11
10
|
interpolatePath,
|
|
12
11
|
rootRouteId,
|
|
13
|
-
defaultSerializeError,
|
|
14
12
|
defaultParseSearch,
|
|
15
13
|
defaultStringifySearch,
|
|
16
14
|
parseSearchWith,
|
|
@@ -244,7 +242,6 @@ export {
|
|
|
244
242
|
|
|
245
243
|
export type { UseMatchRouteOptions, MakeMatchRouteOptions } from './Matches'
|
|
246
244
|
|
|
247
|
-
export { matchContext } from './matchContext'
|
|
248
245
|
export { Match, Outlet } from './Match'
|
|
249
246
|
|
|
250
247
|
export { useMatch } from './useMatch'
|
|
@@ -280,13 +277,7 @@ export type {
|
|
|
280
277
|
|
|
281
278
|
export { createRouter, Router } from './router'
|
|
282
279
|
|
|
283
|
-
export {
|
|
284
|
-
componentTypes,
|
|
285
|
-
lazyFn,
|
|
286
|
-
SearchParamError,
|
|
287
|
-
PathParamError,
|
|
288
|
-
getInitialRouterState,
|
|
289
|
-
} from '@tanstack/router-core'
|
|
280
|
+
export { lazyFn, SearchParamError } from '@tanstack/router-core'
|
|
290
281
|
|
|
291
282
|
export { RouterProvider, RouterContextProvider } from './RouterProvider'
|
|
292
283
|
export type { RouterProps } from './RouterProvider'
|
|
@@ -310,8 +301,6 @@ export { useRouterState } from './useRouterState'
|
|
|
310
301
|
export { useLocation } from './useLocation'
|
|
311
302
|
export { useCanGoBack } from './useCanGoBack'
|
|
312
303
|
|
|
313
|
-
export { useLayoutEffect } from './utils'
|
|
314
|
-
|
|
315
304
|
export { CatchNotFound, DefaultGlobalNotFound } from './not-found'
|
|
316
305
|
export { notFound, isNotFound } from '@tanstack/router-core'
|
|
317
306
|
export type { NotFoundError } from '@tanstack/router-core'
|