@tanstack/vue-router 1.167.1 → 1.167.3
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/Asset.js +107 -151
- package/dist/esm/Asset.js.map +1 -1
- package/dist/esm/Body.js +15 -24
- package/dist/esm/Body.js.map +1 -1
- package/dist/esm/CatchBoundary.js +112 -130
- package/dist/esm/CatchBoundary.js.map +1 -1
- package/dist/esm/ClientOnly.js +59 -29
- package/dist/esm/ClientOnly.js.map +1 -1
- package/dist/esm/HeadContent.dev.js +29 -23
- package/dist/esm/HeadContent.dev.js.map +1 -1
- package/dist/esm/HeadContent.js +21 -16
- package/dist/esm/HeadContent.js.map +1 -1
- package/dist/esm/Html.js +42 -61
- package/dist/esm/Html.js.map +1 -1
- package/dist/esm/Match.js +238 -319
- package/dist/esm/Match.js.map +1 -1
- package/dist/esm/Matches.js +127 -170
- package/dist/esm/Matches.js.map +1 -1
- package/dist/esm/RouterProvider.js +50 -65
- package/dist/esm/RouterProvider.js.map +1 -1
- package/dist/esm/ScriptOnce.js +31 -36
- package/dist/esm/ScriptOnce.js.map +1 -1
- package/dist/esm/Scripts.js +79 -101
- package/dist/esm/Scripts.js.map +1 -1
- package/dist/esm/ScrollRestoration.js +25 -29
- package/dist/esm/ScrollRestoration.js.map +1 -1
- package/dist/esm/Transitioner.js +146 -164
- package/dist/esm/Transitioner.js.map +1 -1
- package/dist/esm/awaited.js +27 -34
- package/dist/esm/awaited.js.map +1 -1
- package/dist/esm/fileRoute.js +90 -92
- package/dist/esm/fileRoute.js.map +1 -1
- package/dist/esm/headContentUtils.js +92 -123
- package/dist/esm/headContentUtils.js.map +1 -1
- package/dist/esm/index.dev.js +16 -118
- package/dist/esm/index.js +18 -119
- package/dist/esm/lazyRouteComponent.js +69 -82
- package/dist/esm/lazyRouteComponent.js.map +1 -1
- package/dist/esm/link.js +364 -385
- package/dist/esm/link.js.map +1 -1
- package/dist/esm/matchContext.js +16 -11
- package/dist/esm/matchContext.js.map +1 -1
- package/dist/esm/not-found.js +30 -40
- package/dist/esm/not-found.js.map +1 -1
- package/dist/esm/renderRouteNotFound.js +20 -15
- package/dist/esm/renderRouteNotFound.js.map +1 -1
- package/dist/esm/route.js +196 -174
- package/dist/esm/route.js.map +1 -1
- package/dist/esm/router.js +11 -11
- package/dist/esm/router.js.map +1 -1
- package/dist/esm/routerContext.js +10 -7
- package/dist/esm/routerContext.js.map +1 -1
- package/dist/esm/scroll-restoration.js +39 -50
- package/dist/esm/scroll-restoration.js.map +1 -1
- package/dist/esm/ssr/RouterClient.js +29 -43
- package/dist/esm/ssr/RouterClient.js.map +1 -1
- package/dist/esm/ssr/RouterServer.js +29 -32
- package/dist/esm/ssr/RouterServer.js.map +1 -1
- package/dist/esm/ssr/client.js +1 -4
- package/dist/esm/ssr/defaultRenderHandler.js +11 -13
- package/dist/esm/ssr/defaultRenderHandler.js.map +1 -1
- package/dist/esm/ssr/defaultStreamHandler.js +12 -15
- package/dist/esm/ssr/defaultStreamHandler.js.map +1 -1
- package/dist/esm/ssr/renderRouterToStream.js +47 -65
- package/dist/esm/ssr/renderRouterToStream.js.map +1 -1
- package/dist/esm/ssr/renderRouterToString.js +24 -32
- package/dist/esm/ssr/renderRouterToString.js.map +1 -1
- package/dist/esm/ssr/server.js +3 -10
- package/dist/esm/useBlocker.js +243 -287
- package/dist/esm/useBlocker.js.map +1 -1
- package/dist/esm/useCanGoBack.js +6 -5
- package/dist/esm/useCanGoBack.js.map +1 -1
- package/dist/esm/useLoaderData.js +12 -11
- package/dist/esm/useLoaderData.js.map +1 -1
- package/dist/esm/useLoaderDeps.js +12 -14
- package/dist/esm/useLoaderDeps.js.map +1 -1
- package/dist/esm/useLocation.js +6 -7
- package/dist/esm/useLocation.js.map +1 -1
- package/dist/esm/useMatch.js +27 -35
- package/dist/esm/useMatch.js.map +1 -1
- package/dist/esm/useNavigate.js +18 -24
- package/dist/esm/useNavigate.js.map +1 -1
- package/dist/esm/useParams.js +13 -12
- package/dist/esm/useParams.js.map +1 -1
- package/dist/esm/useRouteContext.js +9 -8
- package/dist/esm/useRouteContext.js.map +1 -1
- package/dist/esm/useRouter.js +9 -8
- package/dist/esm/useRouter.js.map +1 -1
- package/dist/esm/useRouterState.js +18 -22
- package/dist/esm/useRouterState.js.map +1 -1
- package/dist/esm/useSearch.js +13 -12
- package/dist/esm/useSearch.js.map +1 -1
- package/dist/esm/utils.js +59 -38
- package/dist/esm/utils.js.map +1 -1
- package/package.json +3 -3
- package/dist/esm/index.dev.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/ssr/client.js.map +0 -1
- package/dist/esm/ssr/server.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CatchBoundary.js","sources":["../../src/CatchBoundary.tsx"],"sourcesContent":["import * as Vue from 'vue'\nimport type { ErrorRouteComponent } from './route'\n\ninterface ErrorComponentProps {\n error: Error\n reset: () => void\n}\n\ntype CatchBoundaryProps = {\n getResetKey: () => number | string\n children: Vue.VNode\n errorComponent?: ErrorRouteComponent | Vue.Component\n onCatch?: (error: Error) => void\n}\n\nconst VueErrorBoundary = Vue.defineComponent({\n name: 'VueErrorBoundary',\n props: {\n onError: Function,\n resetKey: [String, Number],\n },\n emits: ['catch'],\n setup(props, { slots }) {\n const error = Vue.ref<Error | null>(null)\n const resetFn = Vue.ref<(() => void) | null>(null)\n\n const reset = () => {\n error.value = null\n }\n\n Vue.watch(\n () => props.resetKey,\n (newKey, oldKey) => {\n if (newKey !== oldKey && error.value) {\n reset()\n }\n },\n )\n\n Vue.onErrorCaptured((err: Error) => {\n if (\n err instanceof Promise ||\n (err && typeof (err as any).then === 'function')\n ) {\n return false\n }\n\n error.value = err\n resetFn.value = reset\n\n if (props.onError) {\n props.onError(err)\n }\n\n return false\n })\n\n return () => {\n if (error.value && slots.fallback) {\n const fallbackContent = slots.fallback({\n error: error.value,\n reset,\n })\n return Array.isArray(fallbackContent) && fallbackContent.length === 1\n ? fallbackContent[0]\n : fallbackContent\n }\n\n const defaultContent = slots.default && slots.default()\n return Array.isArray(defaultContent) && defaultContent.length === 1\n ? defaultContent[0]\n : defaultContent\n }\n },\n})\n\nconst CatchBoundaryWrapper = Vue.defineComponent({\n name: 'CatchBoundary',\n inheritAttrs: false,\n props: ['getResetKey', 'children', 'errorComponent', 'onCatch'] as any,\n setup(props: CatchBoundaryProps) {\n const resetKey = Vue.computed(() => props.getResetKey())\n\n return () => {\n return Vue.h(\n VueErrorBoundary,\n {\n resetKey: resetKey.value,\n onError: props.onCatch,\n },\n {\n default: () => props.children,\n fallback: ({ error, reset }: ErrorComponentProps) => {\n if (props.errorComponent) {\n return Vue.h(props.errorComponent, { error, reset })\n }\n return Vue.h(ErrorComponent, { error, reset })\n },\n },\n )\n }\n },\n})\n\nexport function CatchBoundary(props: CatchBoundaryProps) {\n return Vue.h(CatchBoundaryWrapper, props as any)\n}\n\nexport const ErrorComponent = Vue.defineComponent({\n name: 'ErrorComponent',\n props: {\n error: Object,\n reset: Function,\n },\n setup(props) {\n const show = Vue.ref(process.env.NODE_ENV !== 'production')\n\n const toggleShow = () => {\n show.value = !show.value\n }\n\n return () =>\n Vue.h('div', { style: { padding: '.5rem', maxWidth: '100%' } }, [\n Vue.h(\n 'div',\n { style: { display: 'flex', alignItems: 'center', gap: '.5rem' } },\n [\n Vue.h(\n 'strong',\n { style: { fontSize: '1rem' } },\n 'Something went wrong!',\n ),\n Vue.h(\n 'button',\n {\n style: {\n appearance: 'none',\n fontSize: '.6em',\n border: '1px solid currentColor',\n padding: '.1rem .2rem',\n fontWeight: 'bold',\n borderRadius: '.25rem',\n },\n onClick: toggleShow,\n },\n show.value ? 'Hide Error' : 'Show Error',\n ),\n ],\n ),\n Vue.h('div', { style: { height: '.25rem' } }),\n show.value\n ? Vue.h('div', {}, [\n Vue.h(\n 'pre',\n {\n style: {\n fontSize: '.7em',\n border: '1px solid red',\n borderRadius: '.25rem',\n padding: '.3rem',\n color: 'red',\n overflow: 'auto',\n },\n },\n [\n props.error?.message\n ? Vue.h('code', {}, props.error.message)\n : null,\n ],\n ),\n ])\n : null,\n ])\n },\n})\n"],"
|
|
1
|
+
{"version":3,"file":"CatchBoundary.js","names":["Vue","VueErrorBoundary","defineComponent","name","props","onError","Function","resetKey","String","Number","emits","setup","slots","error","ref","resetFn","reset","value","watch","newKey","oldKey","onErrorCaptured","err","Promise","then","fallback","fallbackContent","Array","isArray","length","defaultContent","default","CatchBoundaryWrapper","inheritAttrs","computed","getResetKey","h","onCatch","children","errorComponent","ErrorComponent","CatchBoundary","Object","show","process","env","NODE_ENV","toggleShow","style","padding","maxWidth","display","alignItems","gap","fontSize","appearance","border","fontWeight","borderRadius","onClick","height","color","overflow","message"],"sources":["../../src/CatchBoundary.tsx"],"sourcesContent":["import * as Vue from 'vue'\nimport type { ErrorRouteComponent } from './route'\n\ninterface ErrorComponentProps {\n error: Error\n reset: () => void\n}\n\ntype CatchBoundaryProps = {\n getResetKey: () => number | string\n children: Vue.VNode\n errorComponent?: ErrorRouteComponent | Vue.Component\n onCatch?: (error: Error) => void\n}\n\nconst VueErrorBoundary = Vue.defineComponent({\n name: 'VueErrorBoundary',\n props: {\n onError: Function,\n resetKey: [String, Number],\n },\n emits: ['catch'],\n setup(props, { slots }) {\n const error = Vue.ref<Error | null>(null)\n const resetFn = Vue.ref<(() => void) | null>(null)\n\n const reset = () => {\n error.value = null\n }\n\n Vue.watch(\n () => props.resetKey,\n (newKey, oldKey) => {\n if (newKey !== oldKey && error.value) {\n reset()\n }\n },\n )\n\n Vue.onErrorCaptured((err: Error) => {\n if (\n err instanceof Promise ||\n (err && typeof (err as any).then === 'function')\n ) {\n return false\n }\n\n error.value = err\n resetFn.value = reset\n\n if (props.onError) {\n props.onError(err)\n }\n\n return false\n })\n\n return () => {\n if (error.value && slots.fallback) {\n const fallbackContent = slots.fallback({\n error: error.value,\n reset,\n })\n return Array.isArray(fallbackContent) && fallbackContent.length === 1\n ? fallbackContent[0]\n : fallbackContent\n }\n\n const defaultContent = slots.default && slots.default()\n return Array.isArray(defaultContent) && defaultContent.length === 1\n ? defaultContent[0]\n : defaultContent\n }\n },\n})\n\nconst CatchBoundaryWrapper = Vue.defineComponent({\n name: 'CatchBoundary',\n inheritAttrs: false,\n props: ['getResetKey', 'children', 'errorComponent', 'onCatch'] as any,\n setup(props: CatchBoundaryProps) {\n const resetKey = Vue.computed(() => props.getResetKey())\n\n return () => {\n return Vue.h(\n VueErrorBoundary,\n {\n resetKey: resetKey.value,\n onError: props.onCatch,\n },\n {\n default: () => props.children,\n fallback: ({ error, reset }: ErrorComponentProps) => {\n if (props.errorComponent) {\n return Vue.h(props.errorComponent, { error, reset })\n }\n return Vue.h(ErrorComponent, { error, reset })\n },\n },\n )\n }\n },\n})\n\nexport function CatchBoundary(props: CatchBoundaryProps) {\n return Vue.h(CatchBoundaryWrapper, props as any)\n}\n\nexport const ErrorComponent = Vue.defineComponent({\n name: 'ErrorComponent',\n props: {\n error: Object,\n reset: Function,\n },\n setup(props) {\n const show = Vue.ref(process.env.NODE_ENV !== 'production')\n\n const toggleShow = () => {\n show.value = !show.value\n }\n\n return () =>\n Vue.h('div', { style: { padding: '.5rem', maxWidth: '100%' } }, [\n Vue.h(\n 'div',\n { style: { display: 'flex', alignItems: 'center', gap: '.5rem' } },\n [\n Vue.h(\n 'strong',\n { style: { fontSize: '1rem' } },\n 'Something went wrong!',\n ),\n Vue.h(\n 'button',\n {\n style: {\n appearance: 'none',\n fontSize: '.6em',\n border: '1px solid currentColor',\n padding: '.1rem .2rem',\n fontWeight: 'bold',\n borderRadius: '.25rem',\n },\n onClick: toggleShow,\n },\n show.value ? 'Hide Error' : 'Show Error',\n ),\n ],\n ),\n Vue.h('div', { style: { height: '.25rem' } }),\n show.value\n ? Vue.h('div', {}, [\n Vue.h(\n 'pre',\n {\n style: {\n fontSize: '.7em',\n border: '1px solid red',\n borderRadius: '.25rem',\n padding: '.3rem',\n color: 'red',\n overflow: 'auto',\n },\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KAAK1B,QACDjB,IAAIoC,EAAE,OAAO,EAAE,EAAE,CACfpC,IAAIoC,EACF,OACA,EACEY,OAAO;IACLM,UAAU;IACVE,QAAQ;IACRE,cAAc;IACdT,SAAS;IACTY,OAAO;IACPC,UAAU;IACZ,EACD,EACD,CACE1D,MAAMS,OAAOkD,UACT/D,IAAIoC,EAAE,QAAQ,EAAE,EAAEhC,MAAMS,MAAMkD,QAAQ,GACtC,KAER,CAAC,CACF,CAAC,GACF;GACL,CAAC;;CAEP,CAAC"}
|
package/dist/esm/ClientOnly.js
CHANGED
|
@@ -1,33 +1,63 @@
|
|
|
1
1
|
import * as Vue from "vue";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
//#region src/ClientOnly.tsx
|
|
3
|
+
/**
|
|
4
|
+
* Render the children only after the JS has loaded client-side. Use an optional
|
|
5
|
+
* fallback component if the JS is not yet loaded.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* Render a Chart component if JS loads, renders a simple FakeChart
|
|
9
|
+
* component server-side or if there is no JS. The FakeChart can have only the
|
|
10
|
+
* UI without the behavior or be a loading spinner or skeleton.
|
|
11
|
+
*
|
|
12
|
+
* ```tsx
|
|
13
|
+
* return (
|
|
14
|
+
* <ClientOnly fallback={<FakeChart />}>
|
|
15
|
+
* <Chart />
|
|
16
|
+
* </ClientOnly>
|
|
17
|
+
* )
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
var ClientOnly = Vue.defineComponent({
|
|
21
|
+
name: "ClientOnly",
|
|
22
|
+
props: { fallback: {
|
|
23
|
+
type: Object,
|
|
24
|
+
default: null
|
|
25
|
+
} },
|
|
26
|
+
setup(props, { slots }) {
|
|
27
|
+
const hydrated = useHydrated();
|
|
28
|
+
return () => {
|
|
29
|
+
if (hydrated.value) return slots.default?.();
|
|
30
|
+
return props.fallback ?? null;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
21
33
|
});
|
|
34
|
+
/**
|
|
35
|
+
* Return a boolean indicating if the JS has been hydrated already.
|
|
36
|
+
* When doing Server-Side Rendering, the result will always be false.
|
|
37
|
+
* When doing Client-Side Rendering, the result will always be false on the
|
|
38
|
+
* first render and true from then on. Even if a new component renders it will
|
|
39
|
+
* always start with true.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```tsx
|
|
43
|
+
* // Disable a button that needs JS to work.
|
|
44
|
+
* const hydrated = useHydrated()
|
|
45
|
+
* return (
|
|
46
|
+
* <button type="button" disabled={!hydrated.value} onClick={doSomethingCustom}>
|
|
47
|
+
* Click me
|
|
48
|
+
* </button>
|
|
49
|
+
* )
|
|
50
|
+
* ```
|
|
51
|
+
* @returns True if the JS has been hydrated already, false otherwise.
|
|
52
|
+
*/
|
|
22
53
|
function useHydrated() {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
54
|
+
const hydrated = Vue.ref(false);
|
|
55
|
+
Vue.onMounted(() => {
|
|
56
|
+
hydrated.value = true;
|
|
57
|
+
});
|
|
58
|
+
return hydrated;
|
|
28
59
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
//# sourceMappingURL=ClientOnly.js.map
|
|
60
|
+
//#endregion
|
|
61
|
+
export { ClientOnly, useHydrated };
|
|
62
|
+
|
|
63
|
+
//# sourceMappingURL=ClientOnly.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientOnly.js","sources":["../../src/ClientOnly.tsx"],"sourcesContent":["import * as Vue from 'vue'\n\nexport interface ClientOnlyProps {\n /**\n * The children to render when the JS is loaded.\n */\n children?: Vue.VNode\n /**\n * The fallback component to render if the JS is not yet loaded.\n */\n fallback?: Vue.VNode\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 const ClientOnly = Vue.defineComponent({\n name: 'ClientOnly',\n props: {\n fallback: {\n type: Object as Vue.PropType<Vue.VNode>,\n default: null,\n },\n },\n setup(props, { slots }) {\n const hydrated = useHydrated()\n return () => {\n if (hydrated.value) {\n return slots.default?.()\n }\n return props.fallback ?? null\n }\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.value} 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(): Vue.Ref<boolean> {\n const hydrated = Vue.ref(false)\n Vue.onMounted(() => {\n hydrated.value = true\n })\n return hydrated\n}\n"],"
|
|
1
|
+
{"version":3,"file":"ClientOnly.js","names":["Vue","ClientOnly","defineComponent","name","props","fallback","type","Object","default","setup","slots","hydrated","useHydrated","value","ref","onMounted"],"sources":["../../src/ClientOnly.tsx"],"sourcesContent":["import * as Vue from 'vue'\n\nexport interface ClientOnlyProps {\n /**\n * The children to render when the JS is loaded.\n */\n children?: Vue.VNode\n /**\n * The fallback component to render if the JS is not yet loaded.\n */\n fallback?: Vue.VNode\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 const ClientOnly = Vue.defineComponent({\n name: 'ClientOnly',\n props: {\n fallback: {\n type: Object as Vue.PropType<Vue.VNode>,\n default: null,\n },\n },\n setup(props, { slots }) {\n const hydrated = useHydrated()\n return () => {\n if (hydrated.value) {\n return slots.default?.()\n }\n return props.fallback ?? null\n }\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.value} 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(): Vue.Ref<boolean> {\n const hydrated = Vue.ref(false)\n Vue.onMounted(() => {\n hydrated.value = true\n })\n return hydrated\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA8BA,IAAaC,aAAaD,IAAIE,gBAAgB;CAC5CC,MAAM;CACNC,OAAO,EACLC,UAAU;EACRC,MAAMC;EACNC,SAAS;EACX,EACD;CACDC,MAAML,OAAO,EAAEM,SAAS;EACtB,MAAMC,WAAWC,aAAa;AAC9B,eAAa;AACX,OAAID,SAASE,MACX,QAAOH,MAAMF,WAAW;AAE1B,UAAOJ,MAAMC,YAAY;;;CAG9B,CAAC;;;;;;;;;;;;;;;;;;;;AAqBF,SAAgBO,cAAgC;CAC9C,MAAMD,WAAWX,IAAIc,IAAI,MAAM;AAC/Bd,KAAIe,gBAAgB;AAClBJ,WAASE,QAAQ;GACjB;AACF,QAAOF"}
|
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
import * as Vue from "vue";
|
|
2
|
-
import { Asset } from "./Asset.js";
|
|
3
1
|
import { useHydrated } from "./ClientOnly.js";
|
|
2
|
+
import { Asset } from "./Asset.js";
|
|
4
3
|
import { useTags } from "./headContentUtils.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
4
|
+
import * as Vue from "vue";
|
|
5
|
+
//#region src/HeadContent.dev.tsx
|
|
6
|
+
var DEV_STYLES_ATTR = "data-tanstack-router-dev-styles";
|
|
7
|
+
/**
|
|
8
|
+
* @description The `HeadContent` component is used to render meta tags, links, and scripts for the current route.
|
|
9
|
+
* It should be rendered in the `<head>` of your document.
|
|
10
|
+
*
|
|
11
|
+
* This is the development version that filters out dev styles after hydration.
|
|
12
|
+
*/
|
|
13
|
+
var HeadContent = Vue.defineComponent({
|
|
14
|
+
name: "HeadContent",
|
|
15
|
+
setup() {
|
|
16
|
+
const tags = useTags();
|
|
17
|
+
const hydrated = useHydrated();
|
|
18
|
+
Vue.onMounted(() => {
|
|
19
|
+
document.querySelectorAll(`link[${DEV_STYLES_ATTR}]`).forEach((el) => el.remove());
|
|
20
|
+
});
|
|
21
|
+
return () => {
|
|
22
|
+
return (hydrated.value ? tags().filter((tag) => !tag.attrs?.[DEV_STYLES_ATTR]) : tags()).map((tag) => Vue.h(Asset, {
|
|
23
|
+
...tag,
|
|
24
|
+
key: `tsr-meta-${JSON.stringify(tag)}`
|
|
25
|
+
}));
|
|
26
|
+
};
|
|
27
|
+
}
|
|
22
28
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
//# sourceMappingURL=HeadContent.dev.js.map
|
|
29
|
+
//#endregion
|
|
30
|
+
export { HeadContent };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=HeadContent.dev.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadContent.dev.js","sources":["../../src/HeadContent.dev.tsx"],"sourcesContent":["import * as Vue from 'vue'\n\nimport { Asset } from './Asset'\nimport { useHydrated } from './ClientOnly'\nimport { useTags } from './headContentUtils'\n\nconst DEV_STYLES_ATTR = 'data-tanstack-router-dev-styles'\n\n/**\n * @description The `HeadContent` component is used to render meta tags, links, and scripts for the current route.\n * It should be rendered in the `<head>` of your document.\n *\n * This is the development version that filters out dev styles after hydration.\n */\nexport const HeadContent = Vue.defineComponent({\n name: 'HeadContent',\n setup() {\n const tags = useTags()\n const hydrated = useHydrated()\n\n // Fallback cleanup for hydration mismatch cases\n Vue.onMounted(() => {\n document\n .querySelectorAll(`link[${DEV_STYLES_ATTR}]`)\n .forEach((el) => el.remove())\n })\n\n return () => {\n // Filter out dev styles after hydration\n const filteredTags = hydrated.value\n ? tags().filter((tag) => !tag.attrs?.[DEV_STYLES_ATTR])\n : tags()\n\n return filteredTags.map((tag) =>\n Vue.h(Asset, {\n ...tag,\n key: `tsr-meta-${JSON.stringify(tag)}`,\n }),\n )\n }\n },\n})\n"],"
|
|
1
|
+
{"version":3,"file":"HeadContent.dev.js","names":["Vue","Asset","useHydrated","useTags","DEV_STYLES_ATTR","HeadContent","defineComponent","name","setup","tags","hydrated","onMounted","document","querySelectorAll","forEach","el","remove","filteredTags","value","filter","tag","attrs","map","h","key","JSON","stringify"],"sources":["../../src/HeadContent.dev.tsx"],"sourcesContent":["import * as Vue from 'vue'\n\nimport { Asset } from './Asset'\nimport { useHydrated } from './ClientOnly'\nimport { useTags } from './headContentUtils'\n\nconst DEV_STYLES_ATTR = 'data-tanstack-router-dev-styles'\n\n/**\n * @description The `HeadContent` component is used to render meta tags, links, and scripts for the current route.\n * It should be rendered in the `<head>` of your document.\n *\n * This is the development version that filters out dev styles after hydration.\n */\nexport const HeadContent = Vue.defineComponent({\n name: 'HeadContent',\n setup() {\n const tags = useTags()\n const hydrated = useHydrated()\n\n // Fallback cleanup for hydration mismatch cases\n Vue.onMounted(() => {\n document\n .querySelectorAll(`link[${DEV_STYLES_ATTR}]`)\n .forEach((el) => el.remove())\n })\n\n return () => {\n // Filter out dev styles after hydration\n const filteredTags = hydrated.value\n ? tags().filter((tag) => !tag.attrs?.[DEV_STYLES_ATTR])\n : tags()\n\n return filteredTags.map((tag) =>\n Vue.h(Asset, {\n ...tag,\n key: `tsr-meta-${JSON.stringify(tag)}`,\n }),\n )\n }\n },\n})\n"],"mappings":";;;;;AAMA,IAAMI,kBAAkB;;;;;;;AAQxB,IAAaC,cAAcL,IAAIM,gBAAgB;CAC7CC,MAAM;CACNC,QAAQ;EACN,MAAMC,OAAON,SAAS;EACtB,MAAMO,WAAWR,aAAa;AAG9BF,MAAIW,gBAAgB;AAClBC,YACGC,iBAAiB,QAAQT,gBAAe,GAAI,CAC5CU,SAASC,OAAOA,GAAGC,QAAQ,CAAC;IAC/B;AAEF,eAAa;AAMX,WAJqBN,SAASQ,QAC1BT,MAAM,CAACU,QAAQC,QAAQ,CAACA,IAAIC,QAAQjB,iBAAiB,GACrDK,MAAM,EAEUa,KAAKF,QACvBpB,IAAIuB,EAAEtB,OAAO;IACX,GAAGmB;IACHI,KAAK,YAAYC,KAAKC,UAAUN,IAAI;IACrC,CACH,CAAC;;;CAGN,CAAC"}
|
package/dist/esm/HeadContent.js
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
import * as Vue from "vue";
|
|
2
1
|
import { Asset } from "./Asset.js";
|
|
3
2
|
import { useTags } from "./headContentUtils.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
import * as Vue from "vue";
|
|
4
|
+
//#region src/HeadContent.tsx
|
|
5
|
+
/**
|
|
6
|
+
* @description The `HeadContent` component is used to render meta tags, links, and scripts for the current route.
|
|
7
|
+
* It should be rendered in the `<head>` of your document.
|
|
8
|
+
*/
|
|
9
|
+
var HeadContent = Vue.defineComponent({
|
|
10
|
+
name: "HeadContent",
|
|
11
|
+
setup() {
|
|
12
|
+
const tags = useTags();
|
|
13
|
+
return () => {
|
|
14
|
+
return tags().map((tag) => Vue.h(Asset, {
|
|
15
|
+
...tag,
|
|
16
|
+
key: `tsr-meta-${JSON.stringify(tag)}`
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
19
|
+
}
|
|
15
20
|
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
//# sourceMappingURL=HeadContent.js.map
|
|
21
|
+
//#endregion
|
|
22
|
+
export { HeadContent };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=HeadContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadContent.js","sources":["../../src/HeadContent.tsx"],"sourcesContent":["import * as Vue from 'vue'\n\nimport { Asset } from './Asset'\nimport { useTags } from './headContentUtils'\n\n/**\n * @description The `HeadContent` component is used to render meta tags, links, and scripts for the current route.\n * It should be rendered in the `<head>` of your document.\n */\nexport const HeadContent = Vue.defineComponent({\n name: 'HeadContent',\n setup() {\n const tags = useTags()\n\n return () => {\n return tags().map((tag) =>\n Vue.h(Asset, {\n ...tag,\n key: `tsr-meta-${JSON.stringify(tag)}`,\n }),\n )\n }\n },\n})\n"],"
|
|
1
|
+
{"version":3,"file":"HeadContent.js","names":["Vue","Asset","useTags","HeadContent","defineComponent","name","setup","tags","map","tag","h","key","JSON","stringify"],"sources":["../../src/HeadContent.tsx"],"sourcesContent":["import * as Vue from 'vue'\n\nimport { Asset } from './Asset'\nimport { useTags } from './headContentUtils'\n\n/**\n * @description The `HeadContent` component is used to render meta tags, links, and scripts for the current route.\n * It should be rendered in the `<head>` of your document.\n */\nexport const HeadContent = Vue.defineComponent({\n name: 'HeadContent',\n setup() {\n const tags = useTags()\n\n return () => {\n return tags().map((tag) =>\n Vue.h(Asset, {\n ...tag,\n key: `tsr-meta-${JSON.stringify(tag)}`,\n }),\n )\n }\n },\n})\n"],"mappings":";;;;;;;;AASA,IAAaG,cAAcH,IAAII,gBAAgB;CAC7CC,MAAM;CACNC,QAAQ;EACN,MAAMC,OAAOL,SAAS;AAEtB,eAAa;AACX,UAAOK,MAAM,CAACC,KAAKC,QACjBT,IAAIU,EAAET,OAAO;IACX,GAAGQ;IACHE,KAAK,YAAYC,KAAKC,UAAUJ,IAAI;IACrC,CACH,CAAC;;;CAGN,CAAC"}
|
package/dist/esm/Html.js
CHANGED
|
@@ -1,63 +1,44 @@
|
|
|
1
|
-
import * as Vue from "vue";
|
|
2
1
|
import { Body } from "./Body.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
if (!bodyVnode) {
|
|
43
|
-
bodyVnode = vnode;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
const result = [];
|
|
48
|
-
if (bodyVnode) {
|
|
49
|
-
result.push(bodyVnode);
|
|
50
|
-
}
|
|
51
|
-
if (hydrated.value && headChildren.length > 0) {
|
|
52
|
-
result.push(Vue.h(Vue.Teleport, {
|
|
53
|
-
to: "head"
|
|
54
|
-
}, headChildren));
|
|
55
|
-
}
|
|
56
|
-
return result.length === 1 ? result[0] : Vue.h(Vue.Fragment, result);
|
|
57
|
-
};
|
|
58
|
-
}
|
|
2
|
+
import * as Vue from "vue";
|
|
3
|
+
//#region src/Html.tsx
|
|
4
|
+
var Html = Vue.defineComponent({
|
|
5
|
+
name: "Html",
|
|
6
|
+
setup(_, { slots }) {
|
|
7
|
+
const isServer = typeof window === "undefined";
|
|
8
|
+
const hydrated = Vue.ref(false);
|
|
9
|
+
if (!isServer) Vue.onMounted(() => {
|
|
10
|
+
hydrated.value = true;
|
|
11
|
+
});
|
|
12
|
+
return () => {
|
|
13
|
+
if (isServer) return Vue.h("html", {}, slots.default?.());
|
|
14
|
+
const children = slots.default?.() || [];
|
|
15
|
+
const flatChildren = Array.isArray(children) ? children : [children];
|
|
16
|
+
let bodyVnode = null;
|
|
17
|
+
const headChildren = [];
|
|
18
|
+
for (const child of flatChildren) if (typeof child === "object" && child !== null) {
|
|
19
|
+
const vnode = child;
|
|
20
|
+
if (vnode.type === "head") {
|
|
21
|
+
if (vnode.children) {
|
|
22
|
+
if (Array.isArray(vnode.children)) {
|
|
23
|
+
for (const c of vnode.children) if (typeof c === "object" && c !== null && "type" in c) headChildren.push(c);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
if (vnode.type === Body) {
|
|
29
|
+
bodyVnode = vnode;
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
if (!bodyVnode) bodyVnode = vnode;
|
|
33
|
+
}
|
|
34
|
+
const result = [];
|
|
35
|
+
if (bodyVnode) result.push(bodyVnode);
|
|
36
|
+
if (hydrated.value && headChildren.length > 0) result.push(Vue.h(Vue.Teleport, { to: "head" }, headChildren));
|
|
37
|
+
return result.length === 1 ? result[0] : Vue.h(Vue.Fragment, result);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
59
40
|
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
//# sourceMappingURL=Html.js.map
|
|
41
|
+
//#endregion
|
|
42
|
+
export { Html };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=Html.js.map
|
package/dist/esm/Html.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Html.js","sources":["../../src/Html.tsx"],"sourcesContent":["import * as Vue from 'vue'\nimport { Body } from './Body'\n\nexport const Html = Vue.defineComponent({\n name: 'Html',\n setup(_, { slots }) {\n const isServer = typeof window === 'undefined'\n\n const hydrated = Vue.ref(false)\n\n if (!isServer) {\n Vue.onMounted(() => {\n hydrated.value = true\n })\n }\n\n return () => {\n if (isServer) {\n return Vue.h('html', {}, slots.default?.())\n }\n\n const children = slots.default?.() || []\n const flatChildren = Array.isArray(children) ? children : [children]\n let bodyVnode: Vue.VNode | null = null\n const headChildren: Array<Vue.VNode> = []\n\n for (const child of flatChildren) {\n if (typeof child === 'object' && child !== null) {\n const vnode = child\n if (vnode.type === 'head') {\n if (vnode.children) {\n if (Array.isArray(vnode.children)) {\n for (const c of vnode.children) {\n if (typeof c === 'object' && c !== null && 'type' in c) {\n headChildren.push(c)\n }\n }\n }\n }\n continue\n }\n if (vnode.type === Body) {\n bodyVnode = vnode\n continue\n }\n if (!bodyVnode) {\n bodyVnode = vnode\n }\n }\n }\n\n const result: Array<Vue.VNode> = []\n\n if (bodyVnode) {\n result.push(bodyVnode)\n }\n\n if (hydrated.value && headChildren.length > 0) {\n result.push(Vue.h(Vue.Teleport, { to: 'head' }, headChildren))\n }\n\n return result.length === 1 ? result[0] : Vue.h(Vue.Fragment, result)\n }\n },\n})\n"],"
|
|
1
|
+
{"version":3,"file":"Html.js","names":["Vue","Body","Html","defineComponent","name","setup","_","slots","isServer","window","hydrated","ref","onMounted","value","h","default","children","flatChildren","Array","isArray","bodyVnode","headChildren","child","vnode","type","c","push","result","length","Teleport","to","Fragment"],"sources":["../../src/Html.tsx"],"sourcesContent":["import * as Vue from 'vue'\nimport { Body } from './Body'\n\nexport const Html = Vue.defineComponent({\n name: 'Html',\n setup(_, { slots }) {\n const isServer = typeof window === 'undefined'\n\n const hydrated = Vue.ref(false)\n\n if (!isServer) {\n Vue.onMounted(() => {\n hydrated.value = true\n })\n }\n\n return () => {\n if (isServer) {\n return Vue.h('html', {}, slots.default?.())\n }\n\n const children = slots.default?.() || []\n const flatChildren = Array.isArray(children) ? children : [children]\n let bodyVnode: Vue.VNode | null = null\n const headChildren: Array<Vue.VNode> = []\n\n for (const child of flatChildren) {\n if (typeof child === 'object' && child !== null) {\n const vnode = child\n if (vnode.type === 'head') {\n if (vnode.children) {\n if (Array.isArray(vnode.children)) {\n for (const c of vnode.children) {\n if (typeof c === 'object' && c !== null && 'type' in c) {\n headChildren.push(c)\n }\n }\n }\n }\n continue\n }\n if (vnode.type === Body) {\n bodyVnode = vnode\n continue\n }\n if (!bodyVnode) {\n bodyVnode = vnode\n }\n }\n }\n\n const result: Array<Vue.VNode> = []\n\n if (bodyVnode) {\n result.push(bodyVnode)\n }\n\n if (hydrated.value && headChildren.length > 0) {\n result.push(Vue.h(Vue.Teleport, { to: 'head' }, headChildren))\n }\n\n return result.length === 1 ? result[0] : Vue.h(Vue.Fragment, result)\n }\n },\n})\n"],"mappings":";;;AAGA,IAAaE,OAAOF,IAAIG,gBAAgB;CACtCC,MAAM;CACNC,MAAMC,GAAG,EAAEC,SAAS;EAClB,MAAMC,WAAW,OAAOC,WAAW;EAEnC,MAAMC,WAAWV,IAAIW,IAAI,MAAM;AAE/B,MAAI,CAACH,SACHR,KAAIY,gBAAgB;AAClBF,YAASG,QAAQ;IACjB;AAGJ,eAAa;AACX,OAAIL,SACF,QAAOR,IAAIc,EAAE,QAAQ,EAAE,EAAEP,MAAMQ,WAAW,CAAC;GAG7C,MAAMC,WAAWT,MAAMQ,WAAW,IAAI,EAAE;GACxC,MAAME,eAAeC,MAAMC,QAAQH,SAAS,GAAGA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