@bleedingdev/modern-js-renderer-solid 0.0.0-bootstrap → 3.9.3-ultramodern.1
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/esm/actions.js +283 -0
- package/dist/esm/application-router.js +25 -0
- package/dist/esm/client.js +49 -0
- package/dist/esm/entry-application.js +60 -0
- package/dist/esm/entry-client.js +23 -0
- package/dist/esm/federation-context.js +25 -0
- package/dist/esm/federation-ssr.js +84 -0
- package/dist/esm/federation.js +83 -0
- package/dist/esm/i18n/I18nProvider.js +33 -0
- package/dist/esm/i18n/LocalizedLink.js +74 -0
- package/dist/esm/i18n/context.js +3 -0
- package/dist/esm/i18n/index.js +8 -0
- package/dist/esm/i18n/languageSync.js +50 -0
- package/dist/esm/i18n/types.js +0 -0
- package/dist/esm/i18n/useI18n.js +74 -0
- package/dist/esm/index.js +58 -0
- package/dist/esm/manifest.js +150 -0
- package/dist/esm/route-completion.js +150 -0
- package/dist/esm/route-data-error.js +108 -0
- package/dist/esm/router-binding/Asset.js +201 -0
- package/dist/esm/router-binding/CatchBoundary.js +94 -0
- package/dist/esm/router-binding/ClientOnly.js +26 -0
- package/dist/esm/router-binding/HeadContent.js +8 -0
- package/dist/esm/router-binding/LICENSE +21 -0
- package/dist/esm/router-binding/Match.js +319 -0
- package/dist/esm/router-binding/Matches.js +117 -0
- package/dist/esm/router-binding/PROVENANCE.json +94 -0
- package/dist/esm/router-binding/RouterProvider.js +51 -0
- package/dist/esm/router-binding/SafeFragment.js +5 -0
- package/dist/esm/router-binding/ScriptOnce.js +15 -0
- package/dist/esm/router-binding/Scripts.js +30 -0
- package/dist/esm/router-binding/ScrollRestoration.js +16 -0
- package/dist/esm/router-binding/Transitioner.js +103 -0
- package/dist/esm/router-binding/awaited.js +48 -0
- package/dist/esm/router-binding/fileRoute.js +83 -0
- package/dist/esm/router-binding/flightData.js +23 -0
- package/dist/esm/router-binding/headContentUtils.js +162 -0
- package/dist/esm/router-binding/history.js +0 -0
- package/dist/esm/router-binding/index.js +35 -0
- package/dist/esm/router-binding/lazyRouteComponent.js +30 -0
- package/dist/esm/router-binding/link.js +389 -0
- package/dist/esm/router-binding/matchContext.js +7 -0
- package/dist/esm/router-binding/nonRouteComponentContext.js +13 -0
- package/dist/esm/router-binding/not-found.js +35 -0
- package/dist/esm/router-binding/publicMatchData.js +447 -0
- package/dist/esm/router-binding/registryTransfer.js +210 -0
- package/dist/esm/router-binding/renderRouteNotFound.js +23 -0
- package/dist/esm/router-binding/route.js +143 -0
- package/dist/esm/router-binding/router.js +13 -0
- package/dist/esm/router-binding/routerContext.js +3 -0
- package/dist/esm/router-binding/routerStores.js +50 -0
- package/dist/esm/router-binding/scroll-restoration.js +13 -0
- package/dist/esm/router-binding/typePrimitives.js +0 -0
- package/dist/esm/router-binding/useBlocker.js +152 -0
- package/dist/esm/router-binding/useCanGoBack.js +7 -0
- package/dist/esm/router-binding/useLoaderData.js +9 -0
- package/dist/esm/router-binding/useLoaderDeps.js +8 -0
- package/dist/esm/router-binding/useLocation.js +14 -0
- package/dist/esm/router-binding/useMatch.js +28 -0
- package/dist/esm/router-binding/useNavigate.js +19 -0
- package/dist/esm/router-binding/useParams.js +13 -0
- package/dist/esm/router-binding/useRouteContext.js +8 -0
- package/dist/esm/router-binding/useRouter.js +10 -0
- package/dist/esm/router-binding/useRouterState.js +19 -0
- package/dist/esm/router-binding/useSearch.js +13 -0
- package/dist/esm/router-binding/utils.js +23 -0
- package/dist/esm/router.js +187 -0
- package/dist/esm-node/actions.js +263 -0
- package/dist/esm-node/application-router.js +25 -0
- package/dist/esm-node/client.js +49 -0
- package/dist/esm-node/entry-application.js +110 -0
- package/dist/esm-node/entry-client.js +23 -0
- package/dist/esm-node/entry-server.js +47 -0
- package/dist/esm-node/federation-context.js +25 -0
- package/dist/esm-node/federation-ssr.js +84 -0
- package/dist/esm-node/federation.js +83 -0
- package/dist/esm-node/i18n/I18nProvider.js +42 -0
- package/dist/esm-node/i18n/LocalizedLink.js +142 -0
- package/dist/esm-node/i18n/context.js +3 -0
- package/dist/esm-node/i18n/index.js +8 -0
- package/dist/esm-node/i18n/languageSync.js +50 -0
- package/dist/esm-node/i18n/types.js +1 -0
- package/dist/esm-node/i18n/useI18n.js +74 -0
- package/dist/esm-node/index.js +58 -0
- package/dist/esm-node/manifest.js +150 -0
- package/dist/esm-node/native-promise-serialization.js +113 -0
- package/dist/esm-node/plugin/compiler.js +209 -0
- package/dist/esm-node/plugin/create.js +235 -0
- package/dist/esm-node/plugin/index.js +73 -0
- package/dist/esm-node/plugin/profile.js +52 -0
- package/dist/esm-node/route-completion.js +160 -0
- package/dist/esm-node/route-data-error.js +108 -0
- package/dist/esm-node/router-binding/Asset.js +171 -0
- package/dist/esm-node/router-binding/CatchBoundary.js +136 -0
- package/dist/esm-node/router-binding/ClientOnly.js +46 -0
- package/dist/esm-node/router-binding/HeadContent.js +8 -0
- package/dist/esm-node/router-binding/LICENSE +21 -0
- package/dist/esm-node/router-binding/Match.js +660 -0
- package/dist/esm-node/router-binding/Matches.js +161 -0
- package/dist/esm-node/router-binding/PROVENANCE.json +94 -0
- package/dist/esm-node/router-binding/RouterProvider.js +87 -0
- package/dist/esm-node/router-binding/SafeFragment.js +5 -0
- package/dist/esm-node/router-binding/ScriptOnce.js +16 -0
- package/dist/esm-node/router-binding/Scripts.js +49 -0
- package/dist/esm-node/router-binding/ScrollRestoration.js +16 -0
- package/dist/esm-node/router-binding/Transitioner.js +103 -0
- package/dist/esm-node/router-binding/awaited.js +75 -0
- package/dist/esm-node/router-binding/fileRoute.js +83 -0
- package/dist/esm-node/router-binding/flightData.js +23 -0
- package/dist/esm-node/router-binding/headContentUtils.js +162 -0
- package/dist/esm-node/router-binding/history.js +1 -0
- package/dist/esm-node/router-binding/index.js +35 -0
- package/dist/esm-node/router-binding/lazyRouteComponent.js +30 -0
- package/dist/esm-node/router-binding/link.js +399 -0
- package/dist/esm-node/router-binding/matchContext.js +7 -0
- package/dist/esm-node/router-binding/nonRouteComponentContext.js +22 -0
- package/dist/esm-node/router-binding/not-found.js +49 -0
- package/dist/esm-node/router-binding/publicMatchData.js +447 -0
- package/dist/esm-node/router-binding/registryTransfer.js +210 -0
- package/dist/esm-node/router-binding/renderRouteNotFound.js +22 -0
- package/dist/esm-node/router-binding/route.js +162 -0
- package/dist/esm-node/router-binding/router.js +13 -0
- package/dist/esm-node/router-binding/routerContext.js +3 -0
- package/dist/esm-node/router-binding/routerStores.js +50 -0
- package/dist/esm-node/router-binding/scroll-restoration.js +12 -0
- package/dist/esm-node/router-binding/typePrimitives.js +1 -0
- package/dist/esm-node/router-binding/useBlocker.js +152 -0
- package/dist/esm-node/router-binding/useCanGoBack.js +7 -0
- package/dist/esm-node/router-binding/useLoaderData.js +9 -0
- package/dist/esm-node/router-binding/useLoaderDeps.js +8 -0
- package/dist/esm-node/router-binding/useLocation.js +14 -0
- package/dist/esm-node/router-binding/useMatch.js +28 -0
- package/dist/esm-node/router-binding/useNavigate.js +19 -0
- package/dist/esm-node/router-binding/useParams.js +13 -0
- package/dist/esm-node/router-binding/useRouteContext.js +8 -0
- package/dist/esm-node/router-binding/useRouter.js +10 -0
- package/dist/esm-node/router-binding/useRouterState.js +19 -0
- package/dist/esm-node/router-binding/useSearch.js +13 -0
- package/dist/esm-node/router-binding/utils.js +23 -0
- package/dist/esm-node/router.js +187 -0
- package/dist/esm-node/server.js +396 -0
- package/dist/types/actions.d.ts +45 -0
- package/dist/types/application-router.d.ts +5 -0
- package/dist/types/client.d.ts +23 -0
- package/dist/types/entry-application.d.ts +10 -0
- package/dist/types/entry-client.d.ts +5 -0
- package/dist/types/entry-server.d.ts +5 -0
- package/dist/types/federation-context.d.ts +16 -0
- package/dist/types/federation-ssr.d.ts +21 -0
- package/dist/types/federation.d.ts +30 -0
- package/dist/types/i18n/I18nProvider.d.ts +21 -0
- package/dist/types/i18n/LocalizedLink.d.ts +43 -0
- package/dist/types/i18n/context.d.ts +11 -0
- package/dist/types/i18n/index.d.ts +9 -0
- package/dist/types/i18n/languageSync.d.ts +31 -0
- package/dist/types/i18n/types.d.ts +33 -0
- package/dist/types/i18n/useI18n.d.ts +24 -0
- package/dist/types/index.d.ts +41 -0
- package/dist/types/manifest.d.ts +55 -0
- package/dist/types/native-promise-serialization.d.ts +9 -0
- package/dist/types/plugin/compiler.d.ts +6 -0
- package/dist/types/plugin/create.d.ts +21 -0
- package/dist/types/plugin/index.d.ts +3 -0
- package/dist/types/plugin/lazy-modules.d.cts +15 -0
- package/dist/types/plugin/preserve-import-loader.d.cts +3 -0
- package/dist/types/plugin/profile.d.ts +2 -0
- package/dist/types/plugin/solid-loader.d.cts +2 -0
- package/dist/types/plugin/svg-component-template.d.cts +6 -0
- package/dist/types/route-completion.d.ts +21 -0
- package/dist/types/route-data-error.d.ts +17 -0
- package/dist/types/router-binding/Asset.d.ts +3 -0
- package/dist/types/router-binding/CatchBoundary.d.ts +13 -0
- package/dist/types/router-binding/ClientOnly.d.ts +31 -0
- package/dist/types/router-binding/HeadContent.d.ts +13 -0
- package/dist/types/router-binding/Match.d.ts +6 -0
- package/dist/types/router-binding/Matches.d.ts +26 -0
- package/dist/types/router-binding/RouterProvider.d.ts +10 -0
- package/dist/types/router-binding/SafeFragment.d.ts +2 -0
- package/dist/types/router-binding/ScriptOnce.d.ts +6 -0
- package/dist/types/router-binding/Scripts.d.ts +2 -0
- package/dist/types/router-binding/ScrollRestoration.d.ts +14 -0
- package/dist/types/router-binding/Transitioner.d.ts +2 -0
- package/dist/types/router-binding/awaited.d.ts +11 -0
- package/dist/types/router-binding/fileRoute.d.ts +54 -0
- package/dist/types/router-binding/flightData.d.ts +38 -0
- package/dist/types/router-binding/headContentUtils.d.ts +15 -0
- package/dist/types/router-binding/history.d.ts +8 -0
- package/dist/types/router-binding/index.d.ts +45 -0
- package/dist/types/router-binding/lazyRouteComponent.d.ts +2 -0
- package/dist/types/router-binding/link.d.ts +43 -0
- package/dist/types/router-binding/matchContext.d.ts +7 -0
- package/dist/types/router-binding/nonRouteComponentContext.d.ts +5 -0
- package/dist/types/router-binding/not-found.d.ts +11 -0
- package/dist/types/router-binding/publicMatchData.d.ts +19 -0
- package/dist/types/router-binding/registryTransfer.d.ts +47 -0
- package/dist/types/router-binding/renderRouteNotFound.d.ts +11 -0
- package/dist/types/router-binding/route.d.ts +105 -0
- package/dist/types/router-binding/router.d.ts +70 -0
- package/dist/types/router-binding/routerContext.d.ts +3 -0
- package/dist/types/router-binding/routerStores.d.ts +2 -0
- package/dist/types/router-binding/scroll-restoration.d.ts +2 -0
- package/dist/types/router-binding/typePrimitives.d.ts +10 -0
- package/dist/types/router-binding/useBlocker.d.ts +70 -0
- package/dist/types/router-binding/useCanGoBack.d.ts +2 -0
- package/dist/types/router-binding/useLoaderData.d.ts +8 -0
- package/dist/types/router-binding/useLoaderDeps.d.ts +8 -0
- package/dist/types/router-binding/useLocation.d.ts +7 -0
- package/dist/types/router-binding/useMatch.d.ts +10 -0
- package/dist/types/router-binding/useNavigate.d.ts +5 -0
- package/dist/types/router-binding/useParams.d.ts +9 -0
- package/dist/types/router-binding/useRouteContext.d.ts +4 -0
- package/dist/types/router-binding/useRouter.d.ts +4 -0
- package/dist/types/router-binding/useRouterState.d.ts +8 -0
- package/dist/types/router-binding/useSearch.d.ts +9 -0
- package/dist/types/router-binding/utils.d.ts +25 -0
- package/dist/types/router.d.ts +31 -0
- package/dist/types/server.d.ts +47 -0
- package/package.json +118 -4
- package/src/actions.tsx +437 -0
- package/src/application-router.tsx +41 -0
- package/src/client.ts +106 -0
- package/src/entry-application.tsx +73 -0
- package/src/entry-client.tsx +48 -0
- package/src/entry-server.tsx +85 -0
- package/src/federation-context.ts +47 -0
- package/src/federation-ssr.ts +117 -0
- package/src/federation.tsx +193 -0
- package/src/i18n/I18nProvider.tsx +54 -0
- package/src/i18n/LocalizedLink.tsx +122 -0
- package/src/i18n/context.ts +13 -0
- package/src/i18n/index.ts +35 -0
- package/src/i18n/languageSync.ts +113 -0
- package/src/i18n/types.ts +35 -0
- package/src/i18n/useI18n.ts +121 -0
- package/src/index.ts +41 -0
- package/src/manifest.ts +337 -0
- package/src/native-promise-serialization.ts +167 -0
- package/src/plugin/compiler.ts +320 -0
- package/src/plugin/create.ts +270 -0
- package/src/plugin/index.ts +72 -0
- package/src/plugin/lazy-modules.cjs +146 -0
- package/src/plugin/preserve-import-loader.cjs +46 -0
- package/src/plugin/profile.ts +42 -0
- package/src/plugin/solid-loader.cjs +83 -0
- package/src/plugin/svg-component-template.cjs +19 -0
- package/src/route-completion.tsx +222 -0
- package/src/route-data-error.ts +175 -0
- package/src/router-binding/Asset.tsx +283 -0
- package/src/router-binding/CatchBoundary.tsx +130 -0
- package/src/router-binding/ClientOnly.tsx +76 -0
- package/src/router-binding/HeadContent.tsx +23 -0
- package/src/router-binding/LICENSE +21 -0
- package/src/router-binding/Match.tsx +397 -0
- package/src/router-binding/Matches.tsx +242 -0
- package/src/router-binding/PROVENANCE.json +94 -0
- package/src/router-binding/RouterProvider.tsx +129 -0
- package/src/router-binding/SafeFragment.tsx +5 -0
- package/src/router-binding/ScriptOnce.tsx +23 -0
- package/src/router-binding/Scripts.tsx +44 -0
- package/src/router-binding/ScrollRestoration.tsx +49 -0
- package/src/router-binding/Transitioner.tsx +172 -0
- package/src/router-binding/awaited.tsx +71 -0
- package/src/router-binding/fileRoute.ts +268 -0
- package/src/router-binding/flightData.ts +90 -0
- package/src/router-binding/headContentUtils.tsx +290 -0
- package/src/router-binding/history.ts +9 -0
- package/src/router-binding/index.tsx +318 -0
- package/src/router-binding/lazyRouteComponent.tsx +70 -0
- package/src/router-binding/link.tsx +865 -0
- package/src/router-binding/matchContext.tsx +15 -0
- package/src/router-binding/nonRouteComponentContext.tsx +23 -0
- package/src/router-binding/not-found.tsx +65 -0
- package/src/router-binding/publicMatchData.ts +674 -0
- package/src/router-binding/registryTransfer.ts +383 -0
- package/src/router-binding/renderRouteNotFound.tsx +53 -0
- package/src/router-binding/route.tsx +665 -0
- package/src/router-binding/router.ts +121 -0
- package/src/router-binding/routerContext.tsx +6 -0
- package/src/router-binding/routerStores.ts +85 -0
- package/src/router-binding/scroll-restoration.tsx +15 -0
- package/src/router-binding/typePrimitives.ts +74 -0
- package/src/router-binding/useBlocker.tsx +359 -0
- package/src/router-binding/useCanGoBack.ts +9 -0
- package/src/router-binding/useLoaderData.tsx +50 -0
- package/src/router-binding/useLoaderDeps.tsx +46 -0
- package/src/router-binding/useLocation.tsx +43 -0
- package/src/router-binding/useMatch.tsx +111 -0
- package/src/router-binding/useNavigate.tsx +43 -0
- package/src/router-binding/useParams.tsx +72 -0
- package/src/router-binding/useRouteContext.ts +30 -0
- package/src/router-binding/useRouter.tsx +17 -0
- package/src/router-binding/useRouterState.tsx +50 -0
- package/src/router-binding/useSearch.tsx +72 -0
- package/src/router-binding/utils.ts +59 -0
- package/src/router.ts +376 -0
- package/src/server.ts +645 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { JSX } from '@solidjs/web';
|
|
2
|
+
import type { DeferredPromise } from '@tanstack/router-core';
|
|
3
|
+
import type { SolidNode } from './route.js';
|
|
4
|
+
export type AwaitOptions<T> = {
|
|
5
|
+
promise: Promise<T>;
|
|
6
|
+
};
|
|
7
|
+
export declare function useAwaited<T>({ promise: _promise, }: AwaitOptions<T>): [data: T, promise: DeferredPromise<T>];
|
|
8
|
+
export declare function Await<T>(props: AwaitOptions<T> & {
|
|
9
|
+
fallback?: SolidNode;
|
|
10
|
+
children: (result: T) => SolidNode;
|
|
11
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { AnyContext, AnyRoute, AnyRouter, Constrain, ConstrainLiteral, FileBaseRouteOptions, FileRoutesByPath, LazyRouteOptions, Register, RegisteredRouter, ResolveParams, Route, RouteById, RouteConstraints, RouteIds, RouteLoaderEntry, UpdatableRouteOptions, UseNavigateResult } from '@tanstack/router-core';
|
|
2
|
+
import type { UseLoaderDataRoute } from './useLoaderData.js';
|
|
3
|
+
import type { UseLoaderDepsRoute } from './useLoaderDeps.js';
|
|
4
|
+
import type { UseMatchRoute } from './useMatch.js';
|
|
5
|
+
import type { UseParamsRoute } from './useParams.js';
|
|
6
|
+
import type { UseRouteContextRoute } from './useRouteContext.js';
|
|
7
|
+
import type { UseSearchRoute } from './useSearch.js';
|
|
8
|
+
export declare function createFileRoute<TFilePath extends keyof FileRoutesByPath, TParentRoute extends AnyRoute = FileRoutesByPath[TFilePath]['parentRoute'], TId extends RouteConstraints['TId'] = FileRoutesByPath[TFilePath]['id'], TPath extends RouteConstraints['TPath'] = FileRoutesByPath[TFilePath]['path'], TFullPath extends RouteConstraints['TFullPath'] = FileRoutesByPath[TFilePath]['fullPath']>(_path?: TFilePath): FileRoute<TFilePath, TParentRoute, TId, TPath, TFullPath>['createRoute'];
|
|
9
|
+
/**
|
|
10
|
+
@deprecated It's no longer recommended to use the `FileRoute` class directly.
|
|
11
|
+
Instead, use `createFileRoute('/path/to/file')(options)` to create a file route.
|
|
12
|
+
*/
|
|
13
|
+
export declare class FileRoute<TFilePath extends keyof FileRoutesByPath, TParentRoute extends AnyRoute = FileRoutesByPath[TFilePath]['parentRoute'], TId extends RouteConstraints['TId'] = FileRoutesByPath[TFilePath]['id'], TPath extends RouteConstraints['TPath'] = FileRoutesByPath[TFilePath]['path'], TFullPath extends RouteConstraints['TFullPath'] = FileRoutesByPath[TFilePath]['fullPath']> {
|
|
14
|
+
path?: TFilePath | undefined;
|
|
15
|
+
silent?: boolean;
|
|
16
|
+
constructor(path?: TFilePath | undefined, _opts?: {
|
|
17
|
+
silent: boolean;
|
|
18
|
+
});
|
|
19
|
+
createRoute: <TRegister = Register, TSearchValidator = undefined, TParams = ResolveParams<TPath>, TRouteContextFn = AnyContext, TBeforeLoadFn = AnyContext, TLoaderDeps extends Record<string, any> = {}, TLoaderFn = undefined, TChildren = unknown, TSSR = unknown, const TMiddlewares = unknown, THandlers = undefined>(options?: FileBaseRouteOptions<TRegister, TParentRoute, TId, TPath, TSearchValidator, TParams, TLoaderDeps, TLoaderFn, AnyContext, TRouteContextFn, TBeforeLoadFn, AnyContext, TSSR, TMiddlewares, THandlers> & UpdatableRouteOptions<TParentRoute, TId, TFullPath, TParams, TSearchValidator, TLoaderFn, TLoaderDeps, AnyContext, TRouteContextFn, TBeforeLoadFn>) => Route<TRegister, TParentRoute, TPath, TFullPath, TFilePath, TId, TSearchValidator, TParams, AnyContext, TRouteContextFn, TBeforeLoadFn, TLoaderDeps, TLoaderFn, TChildren, unknown, TSSR, TMiddlewares, THandlers>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
@deprecated It's recommended not to split loaders into separate files.
|
|
23
|
+
Instead, place the loader function in the main route file, inside the
|
|
24
|
+
`createFileRoute('/path/to/file)(options)` options.
|
|
25
|
+
*/
|
|
26
|
+
export declare function FileRouteLoader<TFilePath extends keyof FileRoutesByPath, TRoute extends FileRoutesByPath[TFilePath]['preLoaderRoute']>(_path: TFilePath): <TLoaderFn>(loaderFn: Constrain<TLoaderFn, RouteLoaderEntry<Register, TRoute['parentRoute'], TRoute['types']['id'], TRoute['types']['params'], TRoute['types']['loaderDeps'], TRoute['types']['routerContext'], TRoute['types']['routeContextFn'], TRoute['types']['beforeLoadFn']>>) => TLoaderFn;
|
|
27
|
+
declare module '@tanstack/router-core' {
|
|
28
|
+
interface LazyRoute<in out TRoute extends AnyRoute> {
|
|
29
|
+
useMatch: UseMatchRoute<TRoute['id']>;
|
|
30
|
+
useRouteContext: UseRouteContextRoute<TRoute['id']>;
|
|
31
|
+
useSearch: UseSearchRoute<TRoute['id']>;
|
|
32
|
+
useParams: UseParamsRoute<TRoute['id']>;
|
|
33
|
+
useLoaderDeps: UseLoaderDepsRoute<TRoute['id']>;
|
|
34
|
+
useLoaderData: UseLoaderDataRoute<TRoute['id']>;
|
|
35
|
+
useNavigate: () => UseNavigateResult<TRoute['fullPath']>;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export declare class LazyRoute<TRoute extends AnyRoute> {
|
|
39
|
+
options: {
|
|
40
|
+
id: string;
|
|
41
|
+
} & LazyRouteOptions;
|
|
42
|
+
constructor(opts: {
|
|
43
|
+
id: string;
|
|
44
|
+
} & LazyRouteOptions);
|
|
45
|
+
useMatch: UseMatchRoute<TRoute['id']>;
|
|
46
|
+
useRouteContext: UseRouteContextRoute<TRoute['id']>;
|
|
47
|
+
useSearch: UseSearchRoute<TRoute['id']>;
|
|
48
|
+
useParams: UseParamsRoute<TRoute['id']>;
|
|
49
|
+
useLoaderDeps: UseLoaderDepsRoute<TRoute['id']>;
|
|
50
|
+
useLoaderData: UseLoaderDataRoute<TRoute['id']>;
|
|
51
|
+
useNavigate: () => UseNavigateResult<TRoute['fullPath']>;
|
|
52
|
+
}
|
|
53
|
+
export declare function createLazyRoute<TRouter extends AnyRouter = RegisteredRouter, TId extends string = string, TRoute extends AnyRoute = RouteById<TRouter['routeTree'], TId>>(id: ConstrainLiteral<TId, RouteIds<TRouter['routeTree']>>): (opts: LazyRouteOptions) => LazyRoute<TRoute>;
|
|
54
|
+
export declare function createLazyFileRoute<TFilePath extends keyof FileRoutesByPath, TRoute extends FileRoutesByPath[TFilePath]['preLoaderRoute']>(id: TFilePath): (opts: LazyRouteOptions) => LazyRoute<TRoute>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { AnyRouter } from '@tanstack/router-core';
|
|
2
|
+
/**
|
|
3
|
+
* Registers the router as the unnamed single-flight consumer of Solid's
|
|
4
|
+
* server-function transport, so the response helpers a mutation returns —
|
|
5
|
+
* `redirect()`, `reload()`, `respond(value, { revalidate })` — take effect
|
|
6
|
+
* on the client without the caller wrapping the call: the transport hands
|
|
7
|
+
* the caller the plain value and the router applies the metadata. Called
|
|
8
|
+
* by `RouterContextProvider` on the client; returns the unsubscribe.
|
|
9
|
+
*
|
|
10
|
+
* Subscribing is also the single-flight opt-in: while registered, the
|
|
11
|
+
* transport tags mutation calls so the server can fold fresh data for
|
|
12
|
+
* registered collectors into the same response. The router claims no
|
|
13
|
+
* slice of that data itself — route data is reloaded through `invalidate`
|
|
14
|
+
* below, and caches that want seeding (a query client) subscribe under
|
|
15
|
+
* their own source id.
|
|
16
|
+
*/
|
|
17
|
+
export declare function setupFlightDataConsumer(router: AnyRouter): () => void;
|
|
18
|
+
/**
|
|
19
|
+
* Applies a server-function response's integration metadata to the
|
|
20
|
+
* router. A mutation is a write, so a response carrying metadata reloads
|
|
21
|
+
* the route data the page is built on: committed and cached matches are
|
|
22
|
+
* invalidated the way `router.invalidate()` does after a mutation.
|
|
23
|
+
*
|
|
24
|
+
* `X-Revalidate` names entries in caches the router does not own, so the
|
|
25
|
+
* keys themselves are left to those caches' consumers; the router reads
|
|
26
|
+
* only the declaration's shape. Absent (a bare `redirect()`/`reload()`),
|
|
27
|
+
* named keys, or the reserved `*` all say a write happened — route data
|
|
28
|
+
* reloads. An EMPTY declaration (`revalidate: []`) is the author narrowing
|
|
29
|
+
* the scope to nothing, and the router honors that too: a redirect still
|
|
30
|
+
* navigates, but nothing is reloaded on the way.
|
|
31
|
+
*
|
|
32
|
+
* The redirect carrier delivers the target RESOLVED to an absolute url, so
|
|
33
|
+
* the soft/hard split is a real origin comparison: a same-origin target
|
|
34
|
+
* navigates under the router (`replace`, matching what HTTP gives a form
|
|
35
|
+
* post — the destination takes the submission's place in history), and any
|
|
36
|
+
* other origin leaves the app through a document navigation.
|
|
37
|
+
*/
|
|
38
|
+
export declare function applyResponseMetadata(router: AnyRouter, response: Response): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HeadTag } from '@solidjs/web';
|
|
2
|
+
import type { AssetCrossOriginConfig, RouterManagedTag } from '@tanstack/router-core';
|
|
3
|
+
import * as Solid from 'solid-js';
|
|
4
|
+
/**
|
|
5
|
+
* Build the head/link/meta/script tags from the renderable presented prefix.
|
|
6
|
+
* Used internally by `HeadContent`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useTags: (assetCrossOrigin?: AssetCrossOriginConfig) => Solid.SourceAccessor<RouterManagedTag[]>;
|
|
9
|
+
/**
|
|
10
|
+
* Convert the router-managed tags into head registry descriptors for
|
|
11
|
+
* `useHead`. Pure data mapping — it is evaluated inside the registry's own
|
|
12
|
+
* flush boundary (server) / effect (client), so it must not allocate
|
|
13
|
+
* reactive owners.
|
|
14
|
+
*/
|
|
15
|
+
export declare function toHeadTags(tags: Array<RouterManagedTag>): Array<HeadTag>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export type { BlockerFn, HistoryLocation, HistoryState, ParsedPath, RouterHistory, } from '@tanstack/history';
|
|
2
|
+
export { createBrowserHistory, createHashHistory, createHistory, createMemoryHistory, } from '@tanstack/history';
|
|
3
|
+
export type { AbsoluteToPath, ActiveOptions, AllContext, AllLoaderData, AllParams, AnyContext, AnyPathParams, AnyRedirect, AnyRoute, AnyRouteMatch, AnyRouter, AnyRouterWithContext, AnyRouteWithContext, AnySchema, AnySerializationAdapter, AnyValidator, AnyValidatorAdapter, AnyValidatorFn, AnyValidatorObj, Assign, BaseRouteOptions, BeforeLoadContextOptions, BeforeLoadContextParameter, BuildLocationFn, BuildNextOptions, CommitLocationOptions, Constrain, ContextAsyncReturnType, ContextOptions, ContextReturnType, ControllablePromise, ControlledPromise, CreateFileRoute, CreateLazyFileRoute, DefaultValidator, DeferredPromise, DeferredPromiseState, ErrorComponentProps, ErrorRouteProps, Expand, FileBaseRouteOptions, FileRoutesByPath, FileRouteTypes, FullSearchSchema, FullSearchSchemaInput, FullSearchSchemaOption, InferAllContext, InferAllParams, InferDescendantToPaths, InferFrom, InferFullSearchSchema, InferFullSearchSchemaInput, InferMaskFrom, InferMaskTo, InferSelected, InferShouldThrow, InferStrict, InferTo, IntersectAssign, LazyRouteOptions, LinkOptions, ListenerFn, LoaderFnContext, LocationRewrite, LocationRewriteFunction, LooseAsyncReturnType, LooseReturnType, MakeOptionalPathParams, MakeRemountDepsOptionsUnion, MakeRouteMatch, MakeRouteMatchUnion, Manifest, MatchLocation, MatchRouteOptions, MergeAll, MetaDescriptor, NavigateFn, NavigateOptions, NotFoundError, NotFoundRouteProps, ParamsOptions, ParsedLocation, ParseParamsFn, ParseRoute, PathParamOptions, PreloadableObj, Redirect, RedirectOptions, Register, RegisteredRouter, RelativeToCurrentPath, RelativeToParentPath, RelativeToPath, RelativeToPathAutoComplete, RemountDepsOptions, RemoveLeadingSlashes, RemoveTrailingSlashes, ResolveAllContext, ResolveAllParamsFromParent, ResolvedRedirect, ResolveFullPath, ResolveFullSearchSchema, ResolveFullSearchSchemaInput, ResolveId, ResolveLoaderData, ResolveOptionalParams, ResolveParams, ResolveRelativePath, ResolveRequiredParams, ResolveRoute, ResolveRouteContext, ResolveSearchValidatorInput, ResolveSearchValidatorInputFn, ResolveValidatorInput, ResolveValidatorInputFn, ResolveValidatorOutput, ResolveValidatorOutputFn, RootRouteId, RootRouteOptions, RouteById, RouteByPath, RouteConstraints, RouteContext, RouteContextFn, RouteContextOptions, RouteContextParameter, RouteIds, RouteLinkEntry, RouteLoaderFn, RouteMask, RouteMatch, RouteOptions, RoutePathOptions, RoutePathOptionsIntersection, RoutePaths, RouterConstructorOptions, RouterContextOptions, RouterEvent, RouterEvents, RouterListener, RouterManagedTag, RouterOptions, RouterState, RoutesById, RoutesByPath, SearchFilter, SearchParamOptions, SearchParser, SearchSchemaInput, SearchSerializer, SerializableExtensions, SerializationAdapter, StaticDataRouteOption, StringifyParamsFn, ToMaskOptions, ToOptions, ToPathOption, ToSubOptions, TrailingSlashOption, TrimPath, TrimPathLeft, TrimPathRight, UpdatableRouteOptions, UpdatableStaticRouteOption, UseNavigateResult, ValidateFromPath, ValidateId, ValidateNavigateOptions, ValidateNavigateOptionsArray, ValidateParams, ValidateRedirectOptions, ValidateRedirectOptionsArray, ValidateSearch, ValidateToPath, ValidateUseParamsResult, ValidateUseSearchResult, Validator, ValidatorAdapter, ValidatorFn, ValidatorObj, } from '@tanstack/router-core';
|
|
4
|
+
export { cleanPath, composeRewrites, createControlledPromise, createSerializationAdapter, DEFAULT_PROTOCOL_ALLOWLIST, deepEqual, defaultParseSearch, defaultStringifySearch, defer, functionalUpdate, interpolatePath, isMatch, isNotFound, isRedirect, joinPaths, lazyFn, notFound, parseSearchWith, redirect, replaceEqualDeep, resolvePath, retainSearchParams, rootRouteId, SearchParamError, stringifySearchWith, stripSearchParams, trimPath, trimPathLeft, trimPathRight, } from '@tanstack/router-core';
|
|
5
|
+
export { Asset } from './Asset.js';
|
|
6
|
+
export type { AwaitOptions } from './awaited.js';
|
|
7
|
+
export { Await, useAwaited } from './awaited.js';
|
|
8
|
+
export { CatchBoundary, ErrorComponent } from './CatchBoundary.js';
|
|
9
|
+
export { ClientOnly, useHydrated } from './ClientOnly.js';
|
|
10
|
+
export { createFileRoute, createLazyFileRoute, createLazyRoute, FileRoute, FileRouteLoader, LazyRoute, } from './fileRoute.js';
|
|
11
|
+
export { HeadContent } from './HeadContent.js';
|
|
12
|
+
export { useTags } from './headContentUtils.js';
|
|
13
|
+
export * from './history.js';
|
|
14
|
+
export { lazyRouteComponent } from './lazyRouteComponent.js';
|
|
15
|
+
export type { ActiveLinkOptions, CreateLinkProps, LinkComponent, LinkComponentProps, LinkProps, UseLinkPropsOptions, } from './link.js';
|
|
16
|
+
export { createLink, Link, linkOptions, useLinkProps } from './link.js';
|
|
17
|
+
export { Match, Outlet } from './Match.js';
|
|
18
|
+
export type { MakeMatchRouteOptions, UseMatchRouteOptions } from './Matches.js';
|
|
19
|
+
export { Matches, MatchRoute, useChildMatches, useMatches, useMatchRoute, useParentMatches, } from './Matches.js';
|
|
20
|
+
export { CatchNotFound, DefaultGlobalNotFound } from './not-found.js';
|
|
21
|
+
export type { PublicMatchError, PublicSnapshotOwner } from './publicMatchData.js';
|
|
22
|
+
export { preparePublicContextData, preparePublicLoaderData, preparePublicMatchError, } from './publicMatchData.js';
|
|
23
|
+
export type { RouterProps } from './RouterProvider.js';
|
|
24
|
+
export { RouterContextProvider, RouterProvider } from './RouterProvider.js';
|
|
25
|
+
export { prepareRouterMatchTransfer } from './registryTransfer.js';
|
|
26
|
+
export type { AnyRootRoute, AsyncRouteComponent, ErrorRouteComponent, NotFoundRouteComponent, RouteComponent, SolidNode, } from './route.js';
|
|
27
|
+
export { createRootRoute, createRootRouteWithContext, createRoute, createRouteMask, getRouteApi, NotFoundRoute, RootRoute, Route, RouteApi, rootRouteWithContext, } from './route.js';
|
|
28
|
+
export { createRouter, Router } from './router.js';
|
|
29
|
+
export { ScriptOnce } from './ScriptOnce.js';
|
|
30
|
+
export { Scripts } from './Scripts.js';
|
|
31
|
+
export { ScrollRestoration, useElementScrollRestoration, } from './ScrollRestoration.js';
|
|
32
|
+
export type { ValidateLinkOptions, ValidateLinkOptionsArray, ValidateUseParamsOptions, ValidateUseSearchOptions, } from './typePrimitives.js';
|
|
33
|
+
export type { ShouldBlockFn, UseBlockerOpts } from './useBlocker.js';
|
|
34
|
+
export { Block, useBlocker } from './useBlocker.js';
|
|
35
|
+
export { useCanGoBack } from './useCanGoBack.js';
|
|
36
|
+
export { useLoaderData } from './useLoaderData.js';
|
|
37
|
+
export { useLoaderDeps } from './useLoaderDeps.js';
|
|
38
|
+
export { useLocation } from './useLocation.js';
|
|
39
|
+
export { useMatch } from './useMatch.js';
|
|
40
|
+
export { Navigate, useNavigate } from './useNavigate.js';
|
|
41
|
+
export { useParams } from './useParams.js';
|
|
42
|
+
export { useRouteContext } from './useRouteContext.js';
|
|
43
|
+
export { useRouter } from './useRouter.js';
|
|
44
|
+
export { useRouterState } from './useRouterState.js';
|
|
45
|
+
export { useSearch } from './useSearch.js';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { AsyncRouteComponent } from './route.js';
|
|
2
|
+
export declare function lazyRouteComponent<T extends Record<string, any>, TKey extends keyof T = 'default'>(importer: () => Promise<T>, exportName?: TKey): T[TKey] extends (props: infer TProps) => any ? AsyncRouteComponent<TProps> : never;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ComponentProps, JSX, ValidComponent } from '@solidjs/web';
|
|
2
|
+
import type { AnyRouter, Constrain, LinkOptions, RegisteredRouter, RoutePaths } from '@tanstack/router-core';
|
|
3
|
+
import type { ValidateLinkOptions, ValidateLinkOptionsArray } from './typePrimitives.js';
|
|
4
|
+
export declare function useLinkProps<TRouter extends AnyRouter = RegisteredRouter, TFrom extends RoutePaths<TRouter['routeTree']> | string = string, TTo extends string = '', TMaskFrom extends RoutePaths<TRouter['routeTree']> | string = TFrom, TMaskTo extends string = ''>(options: UseLinkPropsOptions<TRouter, TFrom, TTo, TMaskFrom, TMaskTo>): ComponentProps<'a'>;
|
|
5
|
+
export type UseLinkPropsOptions<TRouter extends AnyRouter = RegisteredRouter, TFrom extends RoutePaths<TRouter['routeTree']> | string = string, TTo extends string | undefined = '.', TMaskFrom extends RoutePaths<TRouter['routeTree']> | string = TFrom, TMaskTo extends string = '.'> = ActiveLinkOptions<'a', TRouter, TFrom, TTo, TMaskFrom, TMaskTo> & Omit<ComponentProps<'a'>, 'style'> & {
|
|
6
|
+
style?: JSX.CSSProperties;
|
|
7
|
+
};
|
|
8
|
+
export type ActiveLinkOptions<TComp = 'a', TRouter extends AnyRouter = RegisteredRouter, TFrom extends string = string, TTo extends string | undefined = '.', TMaskFrom extends string = TFrom, TMaskTo extends string = '.'> = LinkOptions<TRouter, TFrom, TTo, TMaskFrom, TMaskTo> & ActiveLinkOptionProps<TComp>;
|
|
9
|
+
type ActiveLinkProps<TComp> = Partial<LinkComponentSolidProps<TComp> & {
|
|
10
|
+
[key: `data-${string}`]: unknown;
|
|
11
|
+
}>;
|
|
12
|
+
export interface ActiveLinkOptionProps<TComp = 'a'> {
|
|
13
|
+
/**
|
|
14
|
+
* A function that returns additional props for the `active` state of this link.
|
|
15
|
+
* These props override other props passed to the link (`style`'s are merged, `class`'s are concatenated)
|
|
16
|
+
*/
|
|
17
|
+
activeProps?: ActiveLinkProps<TComp> | (() => ActiveLinkProps<TComp>);
|
|
18
|
+
/**
|
|
19
|
+
* A function that returns additional props for the `inactive` state of this link.
|
|
20
|
+
* These props override other props passed to the link (`style`'s are merged, `class`'s are concatenated)
|
|
21
|
+
*/
|
|
22
|
+
inactiveProps?: ActiveLinkProps<TComp> | (() => ActiveLinkProps<TComp>);
|
|
23
|
+
}
|
|
24
|
+
export type LinkProps<TComp = 'a', TRouter extends AnyRouter = RegisteredRouter, TFrom extends string = string, TTo extends string | undefined = '.', TMaskFrom extends string = TFrom, TMaskTo extends string = '.'> = ActiveLinkOptions<TComp, TRouter, TFrom, TTo, TMaskFrom, TMaskTo> & LinkPropsChildren;
|
|
25
|
+
export interface LinkPropsChildren {
|
|
26
|
+
children?: JSX.Element | ((state: {
|
|
27
|
+
isActive: boolean;
|
|
28
|
+
}) => JSX.Element);
|
|
29
|
+
}
|
|
30
|
+
type LinkComponentSolidProps<TComp> = TComp extends ValidComponent ? Omit<ComponentProps<TComp>, keyof CreateLinkProps> : never;
|
|
31
|
+
export type LinkComponentProps<TComp = 'a', TRouter extends AnyRouter = RegisteredRouter, TFrom extends string = string, TTo extends string | undefined = '.', TMaskFrom extends string = TFrom, TMaskTo extends string = '.'> = LinkComponentSolidProps<TComp> & LinkProps<TComp, TRouter, TFrom, TTo, TMaskFrom, TMaskTo>;
|
|
32
|
+
export type CreateLinkProps = LinkProps<any, any, string, string, string, string>;
|
|
33
|
+
export type LinkComponent<in out TComp, in out TDefaultFrom extends string = string> = <TRouter extends AnyRouter = RegisteredRouter, const TFrom extends string = TDefaultFrom, const TTo extends string | undefined = undefined, const TMaskFrom extends string = TFrom, const TMaskTo extends string = ''>(props: LinkComponentProps<TComp, TRouter, TFrom, TTo, TMaskFrom, TMaskTo>) => JSX.Element;
|
|
34
|
+
export interface LinkComponentRoute<in out TDefaultFrom extends string = string> {
|
|
35
|
+
defaultFrom: TDefaultFrom;
|
|
36
|
+
<TRouter extends AnyRouter = RegisteredRouter, const TTo extends string | undefined = undefined, const TMaskTo extends string = ''>(props: LinkComponentProps<'a', TRouter, this['defaultFrom'], TTo, this['defaultFrom'], TMaskTo>): JSX.Element;
|
|
37
|
+
}
|
|
38
|
+
export declare function createLink<const TComp>(Comp: Constrain<TComp, any, (props: CreateLinkProps) => JSX.Element>): LinkComponent<TComp>;
|
|
39
|
+
export declare const Link: LinkComponent<'a'>;
|
|
40
|
+
export type LinkOptionsFnOptions<TOptions, TComp, TRouter extends AnyRouter = RegisteredRouter> = TOptions extends ReadonlyArray<any> ? ValidateLinkOptionsArray<TRouter, TOptions, string, TComp> : ValidateLinkOptions<TRouter, TOptions, string, TComp>;
|
|
41
|
+
export type LinkOptionsFn<TComp> = <const TOptions, TRouter extends AnyRouter = RegisteredRouter>(options: LinkOptionsFnOptions<TOptions, TComp, TRouter>) => TOptions;
|
|
42
|
+
export declare const linkOptions: LinkOptionsFn<'a'>;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AnyRouteMatch } from '@tanstack/router-core';
|
|
2
|
+
import * as Solid from 'solid-js';
|
|
3
|
+
export type NearestMatchContextValue = readonly [
|
|
4
|
+
routeId: Solid.Accessor<string | undefined>,
|
|
5
|
+
match: Solid.Accessor<AnyRouteMatch | undefined>
|
|
6
|
+
];
|
|
7
|
+
export declare const nearestMatchContext: Solid.Context<NearestMatchContextValue>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { JSX } from '@solidjs/web';
|
|
2
|
+
import * as Solid from 'solid-js';
|
|
3
|
+
export type NonRouteComponent = 'pendingComponent' | 'errorComponent' | 'notFoundComponent';
|
|
4
|
+
export declare const nonRouteComponentContext: Solid.Context<NonRouteComponent | null> | undefined;
|
|
5
|
+
export declare function renderInNonRouteComponentContext(render: () => JSX.Element, component: NonRouteComponent): JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { JSX } from '@solidjs/web';
|
|
2
|
+
import type { NotFoundError } from '@tanstack/router-core';
|
|
3
|
+
export declare function getNotFound(error: unknown): (NotFoundError & {
|
|
4
|
+
isNotFound: true;
|
|
5
|
+
}) | undefined;
|
|
6
|
+
export declare function CatchNotFound(props: {
|
|
7
|
+
fallback?: (error: NotFoundError) => JSX.Element;
|
|
8
|
+
onCatch?: (error: NotFoundError) => void;
|
|
9
|
+
children: JSX.Element;
|
|
10
|
+
}): JSX.Element;
|
|
11
|
+
export declare function DefaultGlobalNotFound(): JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { RequestSession } from '@modern-js/renderer-core/session';
|
|
2
|
+
import type { RouteDataErrorSnapshot } from '../route-data-error.js';
|
|
3
|
+
export type PublicSnapshotOwner = Pick<RequestSession, 'fail' | 'signal'>;
|
|
4
|
+
/** A stable transfer snapshot; the renderer retains its original values and Promises. */
|
|
5
|
+
export declare function preparePublicLoaderData(value: unknown, owner?: PublicSnapshotOwner, privateContexts?: readonly unknown[]): unknown;
|
|
6
|
+
/** Only the native keyed receiver admits Seroval's checked s/v data metadata. */
|
|
7
|
+
export declare function prepareHydratedLoaderData(value: unknown, owner?: PublicSnapshotOwner, privateContexts?: readonly unknown[]): unknown;
|
|
8
|
+
/** Native beforeLoad context is an explicit pure public return value. */
|
|
9
|
+
export declare function preparePublicContextData(value: unknown, owner?: PublicSnapshotOwner, privateContexts?: readonly unknown[]): unknown;
|
|
10
|
+
/** Preserve the native composed root while replacing authored nested values. */
|
|
11
|
+
export declare function preparePublishedRouteContext(context: Record<string, unknown>, owner: PublicSnapshotOwner, privateContexts?: readonly unknown[]): void;
|
|
12
|
+
export interface PublicMatchError {
|
|
13
|
+
name: string;
|
|
14
|
+
message: string;
|
|
15
|
+
stack?: string;
|
|
16
|
+
cause?: unknown;
|
|
17
|
+
}
|
|
18
|
+
/** Error diagnostics are a fixed public projection, never a raw Error object. */
|
|
19
|
+
export declare function preparePublicMatchError(error: unknown, owner?: PublicSnapshotOwner, privateContexts?: readonly unknown[]): PublicMatchError | RouteDataErrorSnapshot | Record<string, unknown>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { RequestSession } from '@modern-js/renderer-core/session';
|
|
2
|
+
import type { AnyRouter } from '@tanstack/router-core';
|
|
3
|
+
import { type PublicSnapshotOwner } from './publicMatchData.js';
|
|
4
|
+
/**
|
|
5
|
+
* Match-state transfer over Solid's hydration registry — the bare pairing's
|
|
6
|
+
* native SSR channel (no `__TSR_SSR__` script injection, no router-owned
|
|
7
|
+
* stream protocol). Entries are content-addressed (`tsr:<matchId>`; match
|
|
8
|
+
* ids are deterministic route-id + interpolated params, so both sides
|
|
9
|
+
* derive the same key from the same URL), the identical mechanism
|
|
10
|
+
* solid-query v6 ships query payloads through (`sq:<queryHash>`).
|
|
11
|
+
*
|
|
12
|
+
* Server half: while the render's serialization context is live, the
|
|
13
|
+
* provider writes each settled match's transferable state. Client half: the
|
|
14
|
+
* hydration-claiming boot — matching is synchronous, so the provider primes
|
|
15
|
+
* match state from the registry and commits before rendering, without
|
|
16
|
+
* running loaders or resolving route chunks up front. Route components
|
|
17
|
+
* resolve at the read point under the boundaries the server actually
|
|
18
|
+
* rendered (Solid `lazy` semantics), and staleness rules own any
|
|
19
|
+
* post-hydration refetching.
|
|
20
|
+
*
|
|
21
|
+
* Both halves no-op under TanStack Start: `router.serverSsr` marks the
|
|
22
|
+
* Start contract (`attachRouterServerSsrUtils` / `dehydrate` / `hydrate`),
|
|
23
|
+
* which owns transfer there — and a Start-hydrated router reaches the
|
|
24
|
+
* client boot with matches already committed, which skips it.
|
|
25
|
+
*/
|
|
26
|
+
export declare const MATCH_KEY_PREFIX = "tsr:";
|
|
27
|
+
/** Bind the managed public-data scope before native router construction claims hydration. */
|
|
28
|
+
export declare function registerPublicRouteDataOwner(routeTree: object, owner: PublicSnapshotOwner, privateContexts?: readonly object[]): void;
|
|
29
|
+
/** Framework SSR accepts only routers that passed its public-data factory boundary. */
|
|
30
|
+
export declare function requireManagedPublicRouter(router: AnyRouter): void;
|
|
31
|
+
/** Project composed public context before every native match-store publication. */
|
|
32
|
+
export declare function installPublicContextPublication(router: AnyRouter): void;
|
|
33
|
+
/** Validate and capture native settled match state before a response is committed. */
|
|
34
|
+
export declare function prepareRouterMatchTransfer(router: AnyRouter, owner: RequestSession, privateContexts?: readonly unknown[]): void;
|
|
35
|
+
export declare function serializeMatchTransfer(router: AnyRouter): void;
|
|
36
|
+
/**
|
|
37
|
+
* The hydration-claiming boot. Returns true when every synchronously
|
|
38
|
+
* matched route found its registry entry and the matches were committed;
|
|
39
|
+
* false falls back to the caller's existing behavior (no entries — a
|
|
40
|
+
* non-registry server, `noHydrate`, or a pending match the server skipped).
|
|
41
|
+
*
|
|
42
|
+
* Entries arrive as inline scripts that execute at document parse, so they
|
|
43
|
+
* are readable through Solid's keyed value channel before client rendering.
|
|
44
|
+
* The boot commits before hydration; store writes inside the claim would
|
|
45
|
+
* change the owner tree being claimed.
|
|
46
|
+
*/
|
|
47
|
+
export declare function primeRouterFromRegistry(router: AnyRouter): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { JSX } from '@solidjs/web';
|
|
2
|
+
import type { AnyRoute, AnyRouter } from '@tanstack/router-core';
|
|
3
|
+
/**
|
|
4
|
+
* Renders a not found component for a route when no matching route is found.
|
|
5
|
+
*
|
|
6
|
+
* @param router - The router instance containing the route configuration
|
|
7
|
+
* @param route - The route that triggered the not found state
|
|
8
|
+
* @param data - Additional data to pass to the not found component
|
|
9
|
+
* @returns The rendered not found component or a default fallback component
|
|
10
|
+
*/
|
|
11
|
+
export declare function renderRouteNotFound(router: AnyRouter, route: AnyRoute, data: any): JSX.Element;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { JSX } from '@solidjs/web';
|
|
2
|
+
import type { AnyContext, AnyRoute, AnyRouter, ConstrainLiteral, ErrorComponentProps, NotFoundError, NotFoundRouteProps, Register, RegisteredRouter, ResolveFullPath, ResolveId, ResolveParams, RootRoute as RootRouteCore, RootRouteId, RootRouteOptions, RouteConstraints, Route as RouteCore, RouteIds, RouteMask, RouteOptions, RouterCore, RouteTypesById, ToMaskOptions, UseNavigateResult } from '@tanstack/router-core';
|
|
3
|
+
import { BaseRootRoute, BaseRoute, BaseRouteApi } from '@tanstack/router-core';
|
|
4
|
+
import type { LinkComponentRoute } from './link.js';
|
|
5
|
+
import type { UseLoaderDataRoute } from './useLoaderData.js';
|
|
6
|
+
import type { UseLoaderDepsRoute } from './useLoaderDeps.js';
|
|
7
|
+
import type { UseMatchRoute } from './useMatch.js';
|
|
8
|
+
import type { UseParamsRoute } from './useParams.js';
|
|
9
|
+
import type { UseRouteContextRoute } from './useRouteContext.js';
|
|
10
|
+
import type { UseSearchRoute } from './useSearch.js';
|
|
11
|
+
declare module '@tanstack/router-core' {
|
|
12
|
+
interface UpdatableRouteOptionsExtensions {
|
|
13
|
+
component?: RouteComponent;
|
|
14
|
+
errorComponent?: false | null | undefined | ErrorRouteComponent;
|
|
15
|
+
notFoundComponent?: NotFoundRouteComponent;
|
|
16
|
+
pendingComponent?: RouteComponent;
|
|
17
|
+
}
|
|
18
|
+
interface RootRouteOptionsExtensions {
|
|
19
|
+
shellComponent?: ({ children }: {
|
|
20
|
+
children: JSX.Element;
|
|
21
|
+
}) => JSX.Element;
|
|
22
|
+
}
|
|
23
|
+
interface RouteExtensions<in out TId extends string, in out TFullPath extends string> {
|
|
24
|
+
useMatch: UseMatchRoute<TId>;
|
|
25
|
+
useRouteContext: UseRouteContextRoute<TId>;
|
|
26
|
+
useSearch: UseSearchRoute<TId>;
|
|
27
|
+
useParams: UseParamsRoute<TId>;
|
|
28
|
+
useLoaderDeps: UseLoaderDepsRoute<TId>;
|
|
29
|
+
useLoaderData: UseLoaderDataRoute<TId>;
|
|
30
|
+
useNavigate: () => UseNavigateResult<TFullPath>;
|
|
31
|
+
Link: LinkComponentRoute<TFullPath>;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export declare function getRouteApi<const TId, TRouter extends AnyRouter = RegisteredRouter>(id: ConstrainLiteral<TId, RouteIds<TRouter['routeTree']>>): RouteApi<TId, TRouter>;
|
|
35
|
+
export declare class RouteApi<TId, TRouter extends AnyRouter = RegisteredRouter> extends BaseRouteApi<TId, TRouter> {
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated Use the `getRouteApi` function instead.
|
|
38
|
+
*/
|
|
39
|
+
constructor({ id }: {
|
|
40
|
+
id: TId;
|
|
41
|
+
});
|
|
42
|
+
useMatch: UseMatchRoute<TId>;
|
|
43
|
+
useRouteContext: UseRouteContextRoute<TId>;
|
|
44
|
+
useSearch: UseSearchRoute<TId>;
|
|
45
|
+
useParams: UseParamsRoute<TId>;
|
|
46
|
+
useLoaderDeps: UseLoaderDepsRoute<TId>;
|
|
47
|
+
useLoaderData: UseLoaderDataRoute<TId>;
|
|
48
|
+
useNavigate: () => UseNavigateResult<RouteTypesById<TRouter, TId>['fullPath']>;
|
|
49
|
+
notFound: (opts?: NotFoundError) => NotFoundError;
|
|
50
|
+
Link: LinkComponentRoute<RouteTypesById<TRouter, TId>['fullPath']>;
|
|
51
|
+
}
|
|
52
|
+
export declare class Route<in out TRegister = unknown, in out TParentRoute extends RouteConstraints['TParentRoute'] = AnyRoute, in out TPath extends RouteConstraints['TPath'] = '/', in out TFullPath extends RouteConstraints['TFullPath'] = ResolveFullPath<TParentRoute, TPath>, in out TCustomId extends RouteConstraints['TCustomId'] = string, in out TId extends RouteConstraints['TId'] = ResolveId<TParentRoute, TCustomId, TPath>, in out TSearchValidator = undefined, in out TParams = ResolveParams<TPath>, in out TRouterContext = AnyContext, in out TRouteContextFn = AnyContext, in out TBeforeLoadFn = AnyContext, in out TLoaderDeps extends Record<string, any> = {}, in out TLoaderFn = undefined, in out TChildren = unknown, in out TFileRouteTypes = unknown, in out TSSR = unknown, in out TMiddlewares = unknown, in out THandlers = undefined> extends BaseRoute<TRegister, TParentRoute, TPath, TFullPath, TCustomId, TId, TSearchValidator, TParams, TRouterContext, TRouteContextFn, TBeforeLoadFn, TLoaderDeps, TLoaderFn, TChildren, TFileRouteTypes, TSSR, TMiddlewares, THandlers> implements RouteCore<TRegister, TParentRoute, TPath, TFullPath, TCustomId, TId, TSearchValidator, TParams, TRouterContext, TRouteContextFn, TBeforeLoadFn, TLoaderDeps, TLoaderFn, TChildren, TFileRouteTypes, TSSR, TMiddlewares, THandlers> {
|
|
53
|
+
/**
|
|
54
|
+
* @deprecated Use the `createRoute` function instead.
|
|
55
|
+
*/
|
|
56
|
+
constructor(options?: RouteOptions<TRegister, TParentRoute, TId, TCustomId, TFullPath, TPath, TSearchValidator, TParams, TLoaderDeps, TLoaderFn, TRouterContext, TRouteContextFn, TBeforeLoadFn, TSSR, TMiddlewares, THandlers>);
|
|
57
|
+
useMatch: UseMatchRoute<TId>;
|
|
58
|
+
useRouteContext: UseRouteContextRoute<TId>;
|
|
59
|
+
useSearch: UseSearchRoute<TId>;
|
|
60
|
+
useParams: UseParamsRoute<TId>;
|
|
61
|
+
useLoaderDeps: UseLoaderDepsRoute<TId>;
|
|
62
|
+
useLoaderData: UseLoaderDataRoute<TId>;
|
|
63
|
+
useNavigate: () => UseNavigateResult<TFullPath>;
|
|
64
|
+
Link: LinkComponentRoute<TFullPath>;
|
|
65
|
+
}
|
|
66
|
+
export declare function createRoute<TRegister = unknown, TParentRoute extends RouteConstraints['TParentRoute'] = AnyRoute, TPath extends RouteConstraints['TPath'] = '/', TFullPath extends RouteConstraints['TFullPath'] = ResolveFullPath<TParentRoute, TPath>, TCustomId extends RouteConstraints['TCustomId'] = string, TId extends RouteConstraints['TId'] = ResolveId<TParentRoute, TCustomId, TPath>, TSearchValidator = undefined, TParams = ResolveParams<TPath>, TRouteContextFn = AnyContext, TBeforeLoadFn = AnyContext, TLoaderDeps extends Record<string, any> = {}, TLoaderFn = undefined, TChildren = unknown, TSSR = unknown, THandlers = undefined>(options: RouteOptions<TRegister, TParentRoute, TId, TCustomId, TFullPath, TPath, TSearchValidator, TParams, TLoaderDeps, TLoaderFn, AnyContext, TRouteContextFn, TBeforeLoadFn, TSSR, THandlers>): Route<TRegister, TParentRoute, TPath, TFullPath, TCustomId, TId, TSearchValidator, TParams, AnyContext, TRouteContextFn, TBeforeLoadFn, TLoaderDeps, TLoaderFn, TChildren, unknown, TSSR, THandlers>;
|
|
67
|
+
export type AnyRootRoute = RootRoute<any, any, any, any, any, any, any, any, any, any>;
|
|
68
|
+
export declare function createRootRouteWithContext<TRouterContext extends {}>(): <TRegister = Register, TRouteContextFn = AnyContext, TBeforeLoadFn = AnyContext, TSearchValidator = undefined, TLoaderDeps extends Record<string, any> = {}, TLoaderFn = undefined, TSSR = unknown, THandlers = undefined>(options?: RootRouteOptions<TRegister, TSearchValidator, TRouterContext, TRouteContextFn, TBeforeLoadFn, TLoaderDeps, TLoaderFn, TSSR, THandlers>) => RootRoute<TRegister, TSearchValidator, TRouterContext, TRouteContextFn, TBeforeLoadFn, TLoaderDeps, TLoaderFn, unknown, unknown, TSSR, THandlers>;
|
|
69
|
+
/**
|
|
70
|
+
* @deprecated Use the `createRootRouteWithContext` function instead.
|
|
71
|
+
*/
|
|
72
|
+
export declare const rootRouteWithContext: typeof createRootRouteWithContext;
|
|
73
|
+
export declare class RootRoute<in out TRegister = Register, in out TSearchValidator = undefined, in out TRouterContext = {}, in out TRouteContextFn = AnyContext, in out TBeforeLoadFn = AnyContext, in out TLoaderDeps extends Record<string, any> = {}, in out TLoaderFn = undefined, in out TChildren = unknown, in out TFileRouteTypes = unknown, in out TSSR = unknown, in out THandlers = undefined> extends BaseRootRoute<TRegister, TSearchValidator, TRouterContext, TRouteContextFn, TBeforeLoadFn, TLoaderDeps, TLoaderFn, TChildren, TFileRouteTypes, TSSR, THandlers> implements RootRouteCore<TRegister, TSearchValidator, TRouterContext, TRouteContextFn, TBeforeLoadFn, TLoaderDeps, TLoaderFn, TChildren, TFileRouteTypes, TSSR, THandlers> {
|
|
74
|
+
/**
|
|
75
|
+
* @deprecated `RootRoute` is now an internal implementation detail. Use `createRootRoute()` instead.
|
|
76
|
+
*/
|
|
77
|
+
constructor(options?: RootRouteOptions<TRegister, TSearchValidator, TRouterContext, TRouteContextFn, TBeforeLoadFn, TLoaderDeps, TLoaderFn, TSSR, THandlers>);
|
|
78
|
+
useMatch: UseMatchRoute<RootRouteId>;
|
|
79
|
+
useRouteContext: UseRouteContextRoute<RootRouteId>;
|
|
80
|
+
useSearch: UseSearchRoute<RootRouteId>;
|
|
81
|
+
useParams: UseParamsRoute<RootRouteId>;
|
|
82
|
+
useLoaderDeps: UseLoaderDepsRoute<RootRouteId>;
|
|
83
|
+
useLoaderData: UseLoaderDataRoute<RootRouteId>;
|
|
84
|
+
useNavigate: () => UseNavigateResult<'/'>;
|
|
85
|
+
Link: LinkComponentRoute<'/'>;
|
|
86
|
+
}
|
|
87
|
+
export declare function createRouteMask<TRouteTree extends AnyRoute, TFrom extends string, TTo extends string>(opts: {
|
|
88
|
+
routeTree: TRouteTree;
|
|
89
|
+
} & ToMaskOptions<RouterCore<TRouteTree, 'never', false>, TFrom, TTo>): RouteMask<TRouteTree>;
|
|
90
|
+
export type SolidNode = JSX.Element;
|
|
91
|
+
export interface DefaultRouteTypes<TProps> {
|
|
92
|
+
component: (props: TProps) => any;
|
|
93
|
+
}
|
|
94
|
+
export interface RouteTypes<TProps> extends DefaultRouteTypes<TProps> {
|
|
95
|
+
}
|
|
96
|
+
export type AsyncRouteComponent<TProps> = RouteTypes<TProps>['component'] & {
|
|
97
|
+
preload?: () => Promise<void>;
|
|
98
|
+
};
|
|
99
|
+
export type RouteComponent = AsyncRouteComponent<{}>;
|
|
100
|
+
export type ErrorRouteComponent = AsyncRouteComponent<ErrorComponentProps>;
|
|
101
|
+
export type NotFoundRouteComponent = RouteTypes<NotFoundRouteProps>['component'];
|
|
102
|
+
export declare class NotFoundRoute<TRegister, TParentRoute extends AnyRootRoute, TRouterContext = AnyContext, TRouteContextFn = AnyContext, TBeforeLoadFn = AnyContext, TSearchValidator = undefined, TLoaderDeps extends Record<string, any> = {}, TLoaderFn = undefined, TChildren = unknown, TSSR = unknown, THandlers = undefined> extends Route<TRegister, TParentRoute, '/404', '/404', '404', '404', TSearchValidator, {}, TRouterContext, TRouteContextFn, TBeforeLoadFn, TLoaderDeps, TLoaderFn, TChildren, TSSR, THandlers> {
|
|
103
|
+
constructor(options: Omit<RouteOptions<TRegister, TParentRoute, string, string, string, string, TSearchValidator, {}, TLoaderDeps, TLoaderFn, TRouterContext, TRouteContextFn, TBeforeLoadFn, TSSR, THandlers>, 'caseSensitive' | 'parseParams' | 'stringifyParams' | 'path' | 'id' | 'params'>);
|
|
104
|
+
}
|
|
105
|
+
export declare function createRootRoute<TRegister = Register, TSearchValidator = undefined, TRouterContext = {}, TRouteContextFn = AnyContext, TBeforeLoadFn = AnyContext, TLoaderDeps extends Record<string, any> = {}, TLoaderFn = undefined, TSSR = unknown, THandlers = undefined>(options?: RootRouteOptions<TRegister, TSearchValidator, TRouterContext, TRouteContextFn, TBeforeLoadFn, TLoaderDeps, TLoaderFn, TSSR, THandlers>): RootRoute<TRegister, TSearchValidator, TRouterContext, TRouteContextFn, TBeforeLoadFn, TLoaderDeps, TLoaderFn, unknown, unknown, TSSR, THandlers>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { JSX } from '@solidjs/web';
|
|
2
|
+
import type { RouterHistory } from '@tanstack/history';
|
|
3
|
+
import type { AnyRoute, CreateRouterFn, RouterConstructorOptions, TrailingSlashOption } from '@tanstack/router-core';
|
|
4
|
+
import { RouterCore } from '@tanstack/router-core';
|
|
5
|
+
import type { ErrorRouteComponent, NotFoundRouteComponent, RouteComponent } from './route.js';
|
|
6
|
+
declare module '@tanstack/router-core' {
|
|
7
|
+
interface RouterOptionsExtensions {
|
|
8
|
+
/**
|
|
9
|
+
* The default `component` a route should use if no component is provided.
|
|
10
|
+
*
|
|
11
|
+
* @default Outlet
|
|
12
|
+
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#defaultcomponent-property)
|
|
13
|
+
*/
|
|
14
|
+
defaultComponent?: RouteComponent;
|
|
15
|
+
/**
|
|
16
|
+
* The default `errorComponent` a route should use if no error component is provided.
|
|
17
|
+
*
|
|
18
|
+
* @default ErrorComponent
|
|
19
|
+
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#defaulterrorcomponent-property)
|
|
20
|
+
* @link [Guide](https://tanstack.com/router/latest/docs/framework/solid/guide/data-loading#handling-errors-with-routeoptionserrorcomponent)
|
|
21
|
+
*/
|
|
22
|
+
defaultErrorComponent?: ErrorRouteComponent;
|
|
23
|
+
/**
|
|
24
|
+
* The default `pendingComponent` a route should use if no pending component is provided.
|
|
25
|
+
*
|
|
26
|
+
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#defaultpendingcomponent-property)
|
|
27
|
+
* @link [Guide](https://tanstack.com/router/latest/docs/framework/solid/guide/data-loading#showing-a-pending-component)
|
|
28
|
+
*/
|
|
29
|
+
defaultPendingComponent?: RouteComponent;
|
|
30
|
+
/**
|
|
31
|
+
* The default `notFoundComponent` a route should use if no notFound component is provided.
|
|
32
|
+
*
|
|
33
|
+
* @default NotFound
|
|
34
|
+
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#defaultnotfoundcomponent-property)
|
|
35
|
+
* @link [Guide](https://tanstack.com/router/latest/docs/framework/solid/guide/not-found-errors#default-router-wide-not-found-handling)
|
|
36
|
+
*/
|
|
37
|
+
defaultNotFoundComponent?: NotFoundRouteComponent;
|
|
38
|
+
/**
|
|
39
|
+
* A component that will be used to wrap the entire router.
|
|
40
|
+
*
|
|
41
|
+
* This is useful for providing a context to the entire router.
|
|
42
|
+
*
|
|
43
|
+
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#wrap-property)
|
|
44
|
+
*/
|
|
45
|
+
Wrap?: (props: {
|
|
46
|
+
children: any;
|
|
47
|
+
}) => JSX.Element;
|
|
48
|
+
/**
|
|
49
|
+
* A component that will be used to wrap the inner contents of the router.
|
|
50
|
+
*
|
|
51
|
+
* This is useful for providing a context to the inner contents of the router where you also need access to the router context and hooks.
|
|
52
|
+
*
|
|
53
|
+
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#innerwrap-property)
|
|
54
|
+
*/
|
|
55
|
+
InnerWrap?: (props: {
|
|
56
|
+
children: any;
|
|
57
|
+
}) => JSX.Element;
|
|
58
|
+
/**
|
|
59
|
+
* The default `onCatch` handler for errors caught by the Router ErrorBoundary
|
|
60
|
+
*
|
|
61
|
+
* @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#defaultoncatch-property)
|
|
62
|
+
* @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/data-loading#handling-errors-with-routeoptionsoncatch)
|
|
63
|
+
*/
|
|
64
|
+
defaultOnCatch?: (error: Error) => void;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export declare const createRouter: CreateRouterFn;
|
|
68
|
+
export declare class Router<in out TRouteTree extends AnyRoute, in out TTrailingSlashOption extends TrailingSlashOption = 'never', in out TDefaultStructuralSharingOption extends boolean = false, in out TRouterHistory extends RouterHistory = RouterHistory, in out TDehydrated extends Record<string, any> = Record<string, any>> extends RouterCore<TRouteTree, TTrailingSlashOption, TDefaultStructuralSharingOption, TRouterHistory, TDehydrated> {
|
|
69
|
+
constructor(options: RouterConstructorOptions<TRouteTree, TTrailingSlashOption, TDefaultStructuralSharingOption, TRouterHistory, TDehydrated>);
|
|
70
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AnyRouter, Constrain, InferFrom, InferMaskFrom, InferMaskTo, InferSelected, InferShouldThrow, InferStrict, InferTo, RegisteredRouter } from '@tanstack/router-core';
|
|
2
|
+
import type { LinkComponentProps } from './link.js';
|
|
3
|
+
import type { UseParamsOptions } from './useParams.js';
|
|
4
|
+
import type { UseSearchOptions } from './useSearch.js';
|
|
5
|
+
export type ValidateLinkOptions<TRouter extends AnyRouter = RegisteredRouter, TOptions = unknown, TDefaultFrom extends string = string, TComp = 'a'> = Constrain<TOptions, LinkComponentProps<TComp, TRouter, InferFrom<TOptions, TDefaultFrom>, InferTo<TOptions>, InferMaskFrom<TOptions>, InferMaskTo<TOptions>>>;
|
|
6
|
+
export type ValidateLinkOptionsArray<TRouter extends AnyRouter = RegisteredRouter, TOptions extends ReadonlyArray<any> = ReadonlyArray<unknown>, TDefaultFrom extends string = string, TComp = 'a'> = {
|
|
7
|
+
[K in keyof TOptions]: ValidateLinkOptions<TRouter, TOptions[K], TDefaultFrom, TComp>;
|
|
8
|
+
};
|
|
9
|
+
export type ValidateUseSearchOptions<TOptions, TRouter extends AnyRouter = RegisteredRouter> = Constrain<TOptions, UseSearchOptions<TRouter, InferFrom<TOptions>, InferStrict<TOptions>, InferShouldThrow<TOptions>, InferSelected<TOptions>>>;
|
|
10
|
+
export type ValidateUseParamsOptions<TOptions, TRouter extends AnyRouter = RegisteredRouter> = Constrain<TOptions, UseParamsOptions<TRouter, InferFrom<TOptions>, InferStrict<TOptions>, InferShouldThrow<TOptions>, InferSelected<TOptions>>>;
|