@tanstack/solid-router 1.134.19 → 1.135.0
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/ClientOnly.cjs +1 -0
- package/dist/cjs/ClientOnly.cjs.map +1 -1
- package/dist/cjs/ClientOnly.d.cts +20 -0
- package/dist/cjs/index.cjs +1 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +1 -1
- package/dist/esm/ClientOnly.d.ts +20 -0
- package/dist/esm/ClientOnly.js +2 -1
- package/dist/esm/ClientOnly.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/source/ClientOnly.d.ts +20 -0
- package/dist/source/ClientOnly.jsx +1 -1
- package/dist/source/ClientOnly.jsx.map +1 -1
- package/dist/source/index.d.ts +1 -1
- package/dist/source/index.jsx +1 -1
- package/dist/source/index.jsx.map +1 -1
- package/package.json +3 -3
- package/src/ClientOnly.tsx +1 -1
- package/src/index.tsx +1 -1
package/dist/cjs/ClientOnly.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientOnly.cjs","sources":["../../src/ClientOnly.tsx"],"sourcesContent":["import * as Solid from 'solid-js'\n\nexport interface ClientOnlyProps {\n /**\n * The children to render when the JS is loaded.\n */\n children: Solid.JSX.Element\n /**\n * The fallback component to render if the JS is not yet loaded.\n */\n fallback?: Solid.JSX.Element\n}\n\n/**\n * Render the children only after the JS has loaded client-side. Use an optional\n * fallback component if the JS is not yet loaded.\n *\n * @example\n * Render a Chart component if JS loads, renders a simple FakeChart\n * component server-side or if there is no JS. The FakeChart can have only the\n * UI without the behavior or be a loading spinner or skeleton.\n *\n * ```tsx\n * return (\n * <ClientOnly fallback={<FakeChart />}>\n * <Chart />\n * </ClientOnly>\n * )\n * ```\n */\nexport function ClientOnly(props: ClientOnlyProps) {\n const hydrated = useHydrated()\n return (\n <Solid.Show when={hydrated()} fallback={props.fallback ?? null}>\n <>{props.children}</>\n </Solid.Show>\n )\n}\n\n/**\n * Return a boolean indicating if the JS has been hydrated already.\n * When doing Server-Side Rendering, the result will always be false.\n * When doing Client-Side Rendering, the result will always be false on the\n * first render and true from then on. Even if a new component renders it will\n * always start with true.\n *\n * @example\n * ```tsx\n * // Disable a button that needs JS to work.\n * const hydrated = useHydrated()\n * return (\n * <button type=\"button\" disabled={!hydrated()} onClick={doSomethingCustom}>\n * Click me\n * </button>\n * )\n * ```\n * @returns True if the JS has been hydrated already, false otherwise.\n */\
|
|
1
|
+
{"version":3,"file":"ClientOnly.cjs","sources":["../../src/ClientOnly.tsx"],"sourcesContent":["import * as Solid from 'solid-js'\n\nexport interface ClientOnlyProps {\n /**\n * The children to render when the JS is loaded.\n */\n children: Solid.JSX.Element\n /**\n * The fallback component to render if the JS is not yet loaded.\n */\n fallback?: Solid.JSX.Element\n}\n\n/**\n * Render the children only after the JS has loaded client-side. Use an optional\n * fallback component if the JS is not yet loaded.\n *\n * @example\n * Render a Chart component if JS loads, renders a simple FakeChart\n * component server-side or if there is no JS. The FakeChart can have only the\n * UI without the behavior or be a loading spinner or skeleton.\n *\n * ```tsx\n * return (\n * <ClientOnly fallback={<FakeChart />}>\n * <Chart />\n * </ClientOnly>\n * )\n * ```\n */\nexport function ClientOnly(props: ClientOnlyProps) {\n const hydrated = useHydrated()\n return (\n <Solid.Show when={hydrated()} fallback={props.fallback ?? null}>\n <>{props.children}</>\n </Solid.Show>\n )\n}\n\n/**\n * Return a boolean indicating if the JS has been hydrated already.\n * When doing Server-Side Rendering, the result will always be false.\n * When doing Client-Side Rendering, the result will always be false on the\n * first render and true from then on. Even if a new component renders it will\n * always start with true.\n *\n * @example\n * ```tsx\n * // Disable a button that needs JS to work.\n * const hydrated = useHydrated()\n * return (\n * <button type=\"button\" disabled={!hydrated()} onClick={doSomethingCustom}>\n * Click me\n * </button>\n * )\n * ```\n * @returns True if the JS has been hydrated already, false otherwise.\n */\nexport function useHydrated(): Solid.Accessor<boolean> {\n const [hydrated, setHydrated] = Solid.createSignal(false)\n Solid.onMount(() => {\n setHydrated(true)\n })\n return hydrated\n}\n"],"names":["ClientOnly","props","hydrated","useHydrated","_$createComponent","Solid","Show","when","fallback","children","_$memo","setHydrated","createSignal","onMount"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA8BO,SAASA,WAAWC,OAAwB;AACjD,QAAMC,WAAWC,YAAAA;AACjB,SAAAC,MAAAA,gBACGC,iBAAMC,MAAI;AAAA,IAAA,IAACC,OAAI;AAAA,aAAEL,SAAAA;AAAAA,IAAU;AAAA,IAAA,IAAEM,WAAQ;AAAA,aAAEP,MAAMO,YAAY;AAAA,IAAI;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAAC,MAAAA,KAAA,MACzDT,MAAMQ,QAAQ;AAAA,IAAA;AAAA,EAAA,CAAA;AAGvB;AAqBO,SAASN,cAAuC;AACrD,QAAM,CAACD,UAAUS,WAAW,IAAIN,iBAAMO,aAAa,KAAK;AACxDP,mBAAMQ,QAAQ,MAAM;AAClBF,gBAAY,IAAI;AAAA,EAClB,CAAC;AACD,SAAOT;AACT;;;"}
|
|
@@ -27,3 +27,23 @@ export interface ClientOnlyProps {
|
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
29
|
export declare function ClientOnly(props: ClientOnlyProps): Solid.JSX.Element;
|
|
30
|
+
/**
|
|
31
|
+
* Return a boolean indicating if the JS has been hydrated already.
|
|
32
|
+
* When doing Server-Side Rendering, the result will always be false.
|
|
33
|
+
* When doing Client-Side Rendering, the result will always be false on the
|
|
34
|
+
* first render and true from then on. Even if a new component renders it will
|
|
35
|
+
* always start with true.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* // Disable a button that needs JS to work.
|
|
40
|
+
* const hydrated = useHydrated()
|
|
41
|
+
* return (
|
|
42
|
+
* <button type="button" disabled={!hydrated()} onClick={doSomethingCustom}>
|
|
43
|
+
* Click me
|
|
44
|
+
* </button>
|
|
45
|
+
* )
|
|
46
|
+
* ```
|
|
47
|
+
* @returns True if the JS has been hydrated already, false otherwise.
|
|
48
|
+
*/
|
|
49
|
+
export declare function useHydrated(): Solid.Accessor<boolean>;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -207,6 +207,7 @@ exports.useAwaited = awaited.useAwaited;
|
|
|
207
207
|
exports.CatchBoundary = CatchBoundary.CatchBoundary;
|
|
208
208
|
exports.ErrorComponent = CatchBoundary.ErrorComponent;
|
|
209
209
|
exports.ClientOnly = ClientOnly.ClientOnly;
|
|
210
|
+
exports.useHydrated = ClientOnly.useHydrated;
|
|
210
211
|
exports.FileRoute = fileRoute.FileRoute;
|
|
211
212
|
exports.FileRouteLoader = fileRoute.FileRouteLoader;
|
|
212
213
|
exports.LazyRoute = fileRoute.LazyRoute;
|
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
|
@@ -5,7 +5,7 @@ export type { BlockerFn, HistoryLocation, RouterHistory, ParsedPath, HistoryStat
|
|
|
5
5
|
export { useAwaited, Await } from './awaited.cjs';
|
|
6
6
|
export type { AwaitOptions } from './awaited.cjs';
|
|
7
7
|
export { CatchBoundary, ErrorComponent } from './CatchBoundary.cjs';
|
|
8
|
-
export { ClientOnly } from './ClientOnly.cjs';
|
|
8
|
+
export { ClientOnly, useHydrated } from './ClientOnly.cjs';
|
|
9
9
|
export { FileRoute, createFileRoute, FileRouteLoader, LazyRoute, createLazyRoute, createLazyFileRoute, } from './fileRoute.cjs';
|
|
10
10
|
export * from './history.cjs';
|
|
11
11
|
export { lazyRouteComponent } from './lazyRouteComponent.cjs';
|
package/dist/esm/ClientOnly.d.ts
CHANGED
|
@@ -27,3 +27,23 @@ export interface ClientOnlyProps {
|
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
29
|
export declare function ClientOnly(props: ClientOnlyProps): Solid.JSX.Element;
|
|
30
|
+
/**
|
|
31
|
+
* Return a boolean indicating if the JS has been hydrated already.
|
|
32
|
+
* When doing Server-Side Rendering, the result will always be false.
|
|
33
|
+
* When doing Client-Side Rendering, the result will always be false on the
|
|
34
|
+
* first render and true from then on. Even if a new component renders it will
|
|
35
|
+
* always start with true.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* // Disable a button that needs JS to work.
|
|
40
|
+
* const hydrated = useHydrated()
|
|
41
|
+
* return (
|
|
42
|
+
* <button type="button" disabled={!hydrated()} onClick={doSomethingCustom}>
|
|
43
|
+
* Click me
|
|
44
|
+
* </button>
|
|
45
|
+
* )
|
|
46
|
+
* ```
|
|
47
|
+
* @returns True if the JS has been hydrated already, false otherwise.
|
|
48
|
+
*/
|
|
49
|
+
export declare function useHydrated(): Solid.Accessor<boolean>;
|
package/dist/esm/ClientOnly.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientOnly.js","sources":["../../src/ClientOnly.tsx"],"sourcesContent":["import * as Solid from 'solid-js'\n\nexport interface ClientOnlyProps {\n /**\n * The children to render when the JS is loaded.\n */\n children: Solid.JSX.Element\n /**\n * The fallback component to render if the JS is not yet loaded.\n */\n fallback?: Solid.JSX.Element\n}\n\n/**\n * Render the children only after the JS has loaded client-side. Use an optional\n * fallback component if the JS is not yet loaded.\n *\n * @example\n * Render a Chart component if JS loads, renders a simple FakeChart\n * component server-side or if there is no JS. The FakeChart can have only the\n * UI without the behavior or be a loading spinner or skeleton.\n *\n * ```tsx\n * return (\n * <ClientOnly fallback={<FakeChart />}>\n * <Chart />\n * </ClientOnly>\n * )\n * ```\n */\nexport function ClientOnly(props: ClientOnlyProps) {\n const hydrated = useHydrated()\n return (\n <Solid.Show when={hydrated()} fallback={props.fallback ?? null}>\n <>{props.children}</>\n </Solid.Show>\n )\n}\n\n/**\n * Return a boolean indicating if the JS has been hydrated already.\n * When doing Server-Side Rendering, the result will always be false.\n * When doing Client-Side Rendering, the result will always be false on the\n * first render and true from then on. Even if a new component renders it will\n * always start with true.\n *\n * @example\n * ```tsx\n * // Disable a button that needs JS to work.\n * const hydrated = useHydrated()\n * return (\n * <button type=\"button\" disabled={!hydrated()} onClick={doSomethingCustom}>\n * Click me\n * </button>\n * )\n * ```\n * @returns True if the JS has been hydrated already, false otherwise.\n */\
|
|
1
|
+
{"version":3,"file":"ClientOnly.js","sources":["../../src/ClientOnly.tsx"],"sourcesContent":["import * as Solid from 'solid-js'\n\nexport interface ClientOnlyProps {\n /**\n * The children to render when the JS is loaded.\n */\n children: Solid.JSX.Element\n /**\n * The fallback component to render if the JS is not yet loaded.\n */\n fallback?: Solid.JSX.Element\n}\n\n/**\n * Render the children only after the JS has loaded client-side. Use an optional\n * fallback component if the JS is not yet loaded.\n *\n * @example\n * Render a Chart component if JS loads, renders a simple FakeChart\n * component server-side or if there is no JS. The FakeChart can have only the\n * UI without the behavior or be a loading spinner or skeleton.\n *\n * ```tsx\n * return (\n * <ClientOnly fallback={<FakeChart />}>\n * <Chart />\n * </ClientOnly>\n * )\n * ```\n */\nexport function ClientOnly(props: ClientOnlyProps) {\n const hydrated = useHydrated()\n return (\n <Solid.Show when={hydrated()} fallback={props.fallback ?? null}>\n <>{props.children}</>\n </Solid.Show>\n )\n}\n\n/**\n * Return a boolean indicating if the JS has been hydrated already.\n * When doing Server-Side Rendering, the result will always be false.\n * When doing Client-Side Rendering, the result will always be false on the\n * first render and true from then on. Even if a new component renders it will\n * always start with true.\n *\n * @example\n * ```tsx\n * // Disable a button that needs JS to work.\n * const hydrated = useHydrated()\n * return (\n * <button type=\"button\" disabled={!hydrated()} onClick={doSomethingCustom}>\n * Click me\n * </button>\n * )\n * ```\n * @returns True if the JS has been hydrated already, false otherwise.\n */\nexport function useHydrated(): Solid.Accessor<boolean> {\n const [hydrated, setHydrated] = Solid.createSignal(false)\n Solid.onMount(() => {\n setHydrated(true)\n })\n return hydrated\n}\n"],"names":["ClientOnly","props","hydrated","useHydrated","_$createComponent","Solid","Show","when","fallback","children","_$memo","setHydrated","createSignal","onMount"],"mappings":";;AA8BO,SAASA,WAAWC,OAAwB;AACjD,QAAMC,WAAWC,YAAAA;AACjB,SAAAC,gBACGC,MAAMC,MAAI;AAAA,IAAA,IAACC,OAAI;AAAA,aAAEL,SAAAA;AAAAA,IAAU;AAAA,IAAA,IAAEM,WAAQ;AAAA,aAAEP,MAAMO,YAAY;AAAA,IAAI;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAAC,KAAA,MACzDT,MAAMQ,QAAQ;AAAA,IAAA;AAAA,EAAA,CAAA;AAGvB;AAqBO,SAASN,cAAuC;AACrD,QAAM,CAACD,UAAUS,WAAW,IAAIN,MAAMO,aAAa,KAAK;AACxDP,QAAMQ,QAAQ,MAAM;AAClBF,gBAAY,IAAI;AAAA,EAClB,CAAC;AACD,SAAOT;AACT;"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export type { BlockerFn, HistoryLocation, RouterHistory, ParsedPath, HistoryStat
|
|
|
5
5
|
export { useAwaited, Await } from './awaited.js';
|
|
6
6
|
export type { AwaitOptions } from './awaited.js';
|
|
7
7
|
export { CatchBoundary, ErrorComponent } from './CatchBoundary.js';
|
|
8
|
-
export { ClientOnly } from './ClientOnly.js';
|
|
8
|
+
export { ClientOnly, useHydrated } from './ClientOnly.js';
|
|
9
9
|
export { FileRoute, createFileRoute, FileRouteLoader, LazyRoute, createLazyRoute, createLazyFileRoute, } from './fileRoute.js';
|
|
10
10
|
export * from './history.js';
|
|
11
11
|
export { lazyRouteComponent } from './lazyRouteComponent.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { PathParamError, SearchParamError, TSR_DEFERRED_PROMISE, cleanPath, comp
|
|
|
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";
|
|
5
|
-
import { ClientOnly } from "./ClientOnly.js";
|
|
5
|
+
import { ClientOnly, useHydrated } from "./ClientOnly.js";
|
|
6
6
|
import { FileRoute, FileRouteLoader, LazyRoute, createFileRoute, createLazyFileRoute, createLazyRoute } from "./fileRoute.js";
|
|
7
7
|
import { lazyRouteComponent } from "./lazyRouteComponent.js";
|
|
8
8
|
import { Link, createLink, linkOptions, useLinkProps } from "./link.js";
|
|
@@ -123,6 +123,7 @@ export {
|
|
|
123
123
|
useCanGoBack,
|
|
124
124
|
useChildMatches,
|
|
125
125
|
useElementScrollRestoration,
|
|
126
|
+
useHydrated,
|
|
126
127
|
useLayoutEffect,
|
|
127
128
|
useLinkProps,
|
|
128
129
|
useLoaderData,
|
|
@@ -27,3 +27,23 @@ export interface ClientOnlyProps {
|
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
29
|
export declare function ClientOnly(props: ClientOnlyProps): Solid.JSX.Element;
|
|
30
|
+
/**
|
|
31
|
+
* Return a boolean indicating if the JS has been hydrated already.
|
|
32
|
+
* When doing Server-Side Rendering, the result will always be false.
|
|
33
|
+
* When doing Client-Side Rendering, the result will always be false on the
|
|
34
|
+
* first render and true from then on. Even if a new component renders it will
|
|
35
|
+
* always start with true.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* // Disable a button that needs JS to work.
|
|
40
|
+
* const hydrated = useHydrated()
|
|
41
|
+
* return (
|
|
42
|
+
* <button type="button" disabled={!hydrated()} onClick={doSomethingCustom}>
|
|
43
|
+
* Click me
|
|
44
|
+
* </button>
|
|
45
|
+
* )
|
|
46
|
+
* ```
|
|
47
|
+
* @returns True if the JS has been hydrated already, false otherwise.
|
|
48
|
+
*/
|
|
49
|
+
export declare function useHydrated(): Solid.Accessor<boolean>;
|
|
@@ -41,7 +41,7 @@ export function ClientOnly(props) {
|
|
|
41
41
|
* ```
|
|
42
42
|
* @returns True if the JS has been hydrated already, false otherwise.
|
|
43
43
|
*/
|
|
44
|
-
function useHydrated() {
|
|
44
|
+
export function useHydrated() {
|
|
45
45
|
const [hydrated, setHydrated] = Solid.createSignal(false);
|
|
46
46
|
Solid.onMount(() => {
|
|
47
47
|
setHydrated(true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientOnly.jsx","sourceRoot":"","sources":["../../src/ClientOnly.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,UAAU,CAAA;AAajC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC/C,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAC9B,OAAO,CACL,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAC,CAC7D;MAAA,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,GACpB;IAAA,EAAE,KAAK,CAAC,IAAI,CAAC,CACd,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,
|
|
1
|
+
{"version":3,"file":"ClientOnly.jsx","sourceRoot":"","sources":["../../src/ClientOnly.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,UAAU,CAAA;AAajC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC/C,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAC9B,OAAO,CACL,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAC,CAC7D;MAAA,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,GACpB;IAAA,EAAE,KAAK,CAAC,IAAI,CAAC,CACd,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,WAAW;IACzB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;IACzD,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACjB,WAAW,CAAC,IAAI,CAAC,CAAA;IACnB,CAAC,CAAC,CAAA;IACF,OAAO,QAAQ,CAAA;AACjB,CAAC"}
|
package/dist/source/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export type { BlockerFn, HistoryLocation, RouterHistory, ParsedPath, HistoryStat
|
|
|
5
5
|
export { useAwaited, Await } from './awaited';
|
|
6
6
|
export type { AwaitOptions } from './awaited';
|
|
7
7
|
export { CatchBoundary, ErrorComponent } from './CatchBoundary';
|
|
8
|
-
export { ClientOnly } from './ClientOnly';
|
|
8
|
+
export { ClientOnly, useHydrated } from './ClientOnly';
|
|
9
9
|
export { FileRoute, createFileRoute, FileRouteLoader, LazyRoute, createLazyRoute, createLazyFileRoute, } from './fileRoute';
|
|
10
10
|
export * from './history';
|
|
11
11
|
export { lazyRouteComponent } from './lazyRouteComponent';
|
package/dist/source/index.jsx
CHANGED
|
@@ -2,7 +2,7 @@ export { defer, TSR_DEFERRED_PROMISE, isMatch, joinPaths, cleanPath, trimPathLef
|
|
|
2
2
|
export { createHistory, createBrowserHistory, createHashHistory, createMemoryHistory, } from '@tanstack/history';
|
|
3
3
|
export { useAwaited, Await } from './awaited';
|
|
4
4
|
export { CatchBoundary, ErrorComponent } from './CatchBoundary';
|
|
5
|
-
export { ClientOnly } from './ClientOnly';
|
|
5
|
+
export { ClientOnly, useHydrated } from './ClientOnly';
|
|
6
6
|
export { FileRoute, createFileRoute, FileRouteLoader, LazyRoute, createLazyRoute, createLazyFileRoute, } from './fileRoute';
|
|
7
7
|
export * from './history';
|
|
8
8
|
export { lazyRouteComponent } from './lazyRouteComponent';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,oBAAoB,EACpB,OAAO,EACP,SAAS,EACT,SAAS,EACT,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,WAAW,EACX,aAAa,EACb,eAAe,EACf,aAAa,EACb,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,SAAS,EACT,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,uBAAuB,CAAA;AAqK9B,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,mBAAmB,CAAA;AAU1B,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAG7C,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAA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E,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AA+B5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/solid-router",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.135.0",
|
|
4
4
|
"description": "Modern and scalable routing for Solid applications",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
"isbot": "^5.1.22",
|
|
89
89
|
"tiny-invariant": "^1.3.3",
|
|
90
90
|
"tiny-warning": "^1.0.3",
|
|
91
|
-
"@tanstack/
|
|
92
|
-
"@tanstack/
|
|
91
|
+
"@tanstack/history": "1.133.28",
|
|
92
|
+
"@tanstack/router-core": "1.134.20"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@solidjs/testing-library": "^0.8.10",
|
package/src/ClientOnly.tsx
CHANGED
|
@@ -56,7 +56,7 @@ export function ClientOnly(props: ClientOnlyProps) {
|
|
|
56
56
|
* ```
|
|
57
57
|
* @returns True if the JS has been hydrated already, false otherwise.
|
|
58
58
|
*/
|
|
59
|
-
function useHydrated(): Solid.Accessor<boolean> {
|
|
59
|
+
export function useHydrated(): Solid.Accessor<boolean> {
|
|
60
60
|
const [hydrated, setHydrated] = Solid.createSignal(false)
|
|
61
61
|
Solid.onMount(() => {
|
|
62
62
|
setHydrated(true)
|
package/src/index.tsx
CHANGED
|
@@ -211,7 +211,7 @@ export { useAwaited, Await } from './awaited'
|
|
|
211
211
|
export type { AwaitOptions } from './awaited'
|
|
212
212
|
|
|
213
213
|
export { CatchBoundary, ErrorComponent } from './CatchBoundary'
|
|
214
|
-
export { ClientOnly } from './ClientOnly'
|
|
214
|
+
export { ClientOnly, useHydrated } from './ClientOnly'
|
|
215
215
|
|
|
216
216
|
export {
|
|
217
217
|
FileRoute,
|