@depup/nuxt 4.2.2-depup.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/LICENSE +21 -0
- package/README.md +117 -0
- package/app.d.ts +1 -0
- package/bin/nuxt.mjs +2 -0
- package/config.cjs +7 -0
- package/config.d.ts +8 -0
- package/config.js +5 -0
- package/dist/app/compat/capi.d.ts +4 -0
- package/dist/app/compat/capi.js +19 -0
- package/dist/app/compat/idle-callback.d.ts +2 -0
- package/dist/app/compat/idle-callback.js +15 -0
- package/dist/app/compat/interval.d.ts +1 -0
- package/dist/app/compat/interval.js +11 -0
- package/dist/app/compat/vue-demi.d.ts +4 -0
- package/dist/app/compat/vue-demi.js +4 -0
- package/dist/app/components/client-fallback.client.d.ts +50 -0
- package/dist/app/components/client-fallback.client.js +50 -0
- package/dist/app/components/client-fallback.server.d.ts +57 -0
- package/dist/app/components/client-fallback.server.js +80 -0
- package/dist/app/components/client-only.d.ts +26 -0
- package/dist/app/components/client-only.js +130 -0
- package/dist/app/components/dev-only.d.ts +11 -0
- package/dist/app/components/dev-only.js +14 -0
- package/dist/app/components/error-404.d.vue.ts +51 -0
- package/dist/app/components/error-404.vue +48 -0
- package/dist/app/components/error-404.vue.d.ts +51 -0
- package/dist/app/components/error-500.d.vue.ts +51 -0
- package/dist/app/components/error-500.vue +46 -0
- package/dist/app/components/error-500.vue.d.ts +51 -0
- package/dist/app/components/index.d.ts +3 -0
- package/dist/app/components/index.js +1 -0
- package/dist/app/components/injections.d.ts +7 -0
- package/dist/app/components/injections.js +2 -0
- package/dist/app/components/island-renderer.d.ts +20 -0
- package/dist/app/components/island-renderer.js +28 -0
- package/dist/app/components/nuxt-error-boundary.d.vue.ts +24 -0
- package/dist/app/components/nuxt-error-boundary.vue +46 -0
- package/dist/app/components/nuxt-error-boundary.vue.d.ts +24 -0
- package/dist/app/components/nuxt-error-page.d.vue.ts +7 -0
- package/dist/app/components/nuxt-error-page.vue +27 -0
- package/dist/app/components/nuxt-error-page.vue.d.ts +7 -0
- package/dist/app/components/nuxt-island.d.ts +70 -0
- package/dist/app/components/nuxt-island.js +331 -0
- package/dist/app/components/nuxt-layout.d.ts +14 -0
- package/dist/app/components/nuxt-layout.js +171 -0
- package/dist/app/components/nuxt-link.d.ts +101 -0
- package/dist/app/components/nuxt-link.js +409 -0
- package/dist/app/components/nuxt-loading-indicator.d.ts +78 -0
- package/dist/app/components/nuxt-loading-indicator.js +75 -0
- package/dist/app/components/nuxt-root.d.vue.ts +3 -0
- package/dist/app/components/nuxt-root.vue +60 -0
- package/dist/app/components/nuxt-root.vue.d.ts +3 -0
- package/dist/app/components/nuxt-route-announcer.d.ts +26 -0
- package/dist/app/components/nuxt-route-announcer.js +48 -0
- package/dist/app/components/nuxt-stubs.d.ts +6 -0
- package/dist/app/components/nuxt-stubs.js +14 -0
- package/dist/app/components/nuxt-teleport-island-component.d.ts +22 -0
- package/dist/app/components/nuxt-teleport-island-component.js +38 -0
- package/dist/app/components/nuxt-teleport-island-slot.d.ts +32 -0
- package/dist/app/components/nuxt-teleport-island-slot.js +53 -0
- package/dist/app/components/nuxt-time.d.vue.ts +37 -0
- package/dist/app/components/nuxt-time.vue +148 -0
- package/dist/app/components/nuxt-time.vue.d.ts +37 -0
- package/dist/app/components/route-provider.d.ts +48 -0
- package/dist/app/components/route-provider.js +49 -0
- package/dist/app/components/server-placeholder.d.ts +2 -0
- package/dist/app/components/server-placeholder.js +7 -0
- package/dist/app/components/test-component-wrapper.d.ts +4 -0
- package/dist/app/components/test-component-wrapper.js +27 -0
- package/dist/app/components/utils.d.ts +48 -0
- package/dist/app/components/utils.js +126 -0
- package/dist/app/components/welcome.d.vue.ts +24 -0
- package/dist/app/components/welcome.vue +34 -0
- package/dist/app/components/welcome.vue.d.ts +24 -0
- package/dist/app/composables/asyncContext.d.ts +2 -0
- package/dist/app/composables/asyncContext.js +7 -0
- package/dist/app/composables/asyncData.d.ts +146 -0
- package/dist/app/composables/asyncData.js +491 -0
- package/dist/app/composables/chunk.d.ts +25 -0
- package/dist/app/composables/chunk.js +30 -0
- package/dist/app/composables/component.d.ts +4 -0
- package/dist/app/composables/component.js +82 -0
- package/dist/app/composables/cookie.d.ts +22 -0
- package/dist/app/composables/cookie.js +205 -0
- package/dist/app/composables/error.d.ts +25 -0
- package/dist/app/composables/error.js +39 -0
- package/dist/app/composables/fetch.d.ts +37 -0
- package/dist/app/composables/fetch.js +123 -0
- package/dist/app/composables/head.d.ts +1 -0
- package/dist/app/composables/head.js +1 -0
- package/dist/app/composables/hydrate.d.ts +9 -0
- package/dist/app/composables/hydrate.js +14 -0
- package/dist/app/composables/id.d.ts +3 -0
- package/dist/app/composables/id.js +2 -0
- package/dist/app/composables/index.d.ts +29 -0
- package/dist/app/composables/index.js +21 -0
- package/dist/app/composables/lazy-hydration.d.ts +40 -0
- package/dist/app/composables/lazy-hydration.js +2 -0
- package/dist/app/composables/loading-indicator.d.ts +39 -0
- package/dist/app/composables/loading-indicator.js +142 -0
- package/dist/app/composables/manifest.d.ts +20 -0
- package/dist/app/composables/manifest.js +59 -0
- package/dist/app/composables/once.d.ts +14 -0
- package/dist/app/composables/once.js +49 -0
- package/dist/app/composables/payload.d.ts +27 -0
- package/dist/app/composables/payload.js +137 -0
- package/dist/app/composables/preload.d.ts +20 -0
- package/dist/app/composables/preload.js +55 -0
- package/dist/app/composables/preview.d.ts +38 -0
- package/dist/app/composables/preview.js +61 -0
- package/dist/app/composables/ready.d.ts +2 -0
- package/dist/app/composables/ready.js +15 -0
- package/dist/app/composables/route-announcer.d.ts +19 -0
- package/dist/app/composables/route-announcer.js +55 -0
- package/dist/app/composables/router.d.ts +96 -0
- package/dist/app/composables/router.js +197 -0
- package/dist/app/composables/runtime-hook.d.ts +9 -0
- package/dist/app/composables/runtime-hook.js +7 -0
- package/dist/app/composables/script-stubs.d.ts +32 -0
- package/dist/app/composables/script-stubs.js +104 -0
- package/dist/app/composables/ssr.d.ts +33 -0
- package/dist/app/composables/ssr.js +113 -0
- package/dist/app/composables/state.d.ts +11 -0
- package/dist/app/composables/state.js +40 -0
- package/dist/app/composables/url.d.ts +3 -0
- package/dist/app/composables/url.js +8 -0
- package/dist/app/config.d.ts +14 -0
- package/dist/app/config.js +72 -0
- package/dist/app/entry-spa.d.ts +2 -0
- package/dist/app/entry-spa.js +2 -0
- package/dist/app/entry.async.d.ts +3 -0
- package/dist/app/entry.async.js +5 -0
- package/dist/app/entry.d.ts +7 -0
- package/dist/app/entry.js +78 -0
- package/dist/app/index.d.ts +12 -0
- package/dist/app/index.js +8 -0
- package/dist/app/middleware/manifest-route-rule.d.ts +2 -0
- package/dist/app/middleware/manifest-route-rule.js +17 -0
- package/dist/app/nuxt.d.ts +271 -0
- package/dist/app/nuxt.js +279 -0
- package/dist/app/plugins/browser-devtools-timing.client.d.ts +2 -0
- package/dist/app/plugins/browser-devtools-timing.client.js +23 -0
- package/dist/app/plugins/check-if-layout-used.d.ts +2 -0
- package/dist/app/plugins/check-if-layout-used.js +28 -0
- package/dist/app/plugins/check-outdated-build.client.d.ts +2 -0
- package/dist/app/plugins/check-outdated-build.client.js +39 -0
- package/dist/app/plugins/chunk-reload-immediate.client.d.ts +2 -0
- package/dist/app/plugins/chunk-reload-immediate.client.js +20 -0
- package/dist/app/plugins/chunk-reload.client.d.ts +2 -0
- package/dist/app/plugins/chunk-reload.client.js +30 -0
- package/dist/app/plugins/cross-origin-prefetch.client.d.ts +2 -0
- package/dist/app/plugins/cross-origin-prefetch.client.js +37 -0
- package/dist/app/plugins/debug-hooks.d.ts +2 -0
- package/dist/app/plugins/debug-hooks.js +9 -0
- package/dist/app/plugins/dev-server-logs.d.ts +2 -0
- package/dist/app/plugins/dev-server-logs.js +60 -0
- package/dist/app/plugins/navigation-repaint.client.d.ts +2 -0
- package/dist/app/plugins/navigation-repaint.client.js +16 -0
- package/dist/app/plugins/payload.client.d.ts +2 -0
- package/dist/app/plugins/payload.client.js +50 -0
- package/dist/app/plugins/preload.server.d.ts +2 -0
- package/dist/app/plugins/preload.server.js +13 -0
- package/dist/app/plugins/restore-state.client.d.ts +2 -0
- package/dist/app/plugins/restore-state.client.js +18 -0
- package/dist/app/plugins/revive-payload.client.d.ts +2 -0
- package/dist/app/plugins/revive-payload.client.js +44 -0
- package/dist/app/plugins/revive-payload.server.d.ts +2 -0
- package/dist/app/plugins/revive-payload.server.js +26 -0
- package/dist/app/plugins/router.d.ts +59 -0
- package/dist/app/plugins/router.js +222 -0
- package/dist/app/plugins/utils.d.ts +1 -0
- package/dist/app/plugins/utils.js +4 -0
- package/dist/app/plugins/view-transitions.client.d.ts +2 -0
- package/dist/app/plugins/view-transitions.client.js +55 -0
- package/dist/app/plugins/warn.dev.server.d.ts +2 -0
- package/dist/app/plugins/warn.dev.server.js +6 -0
- package/dist/app/types/augments.d.ts +49 -0
- package/dist/app/types/augments.js +0 -0
- package/dist/app/types.d.ts +39 -0
- package/dist/app/types.js +0 -0
- package/dist/app/utils.d.ts +13 -0
- package/dist/app/utils.js +34 -0
- package/dist/components/runtime/client-component.d.ts +2 -0
- package/dist/components/runtime/client-component.js +59 -0
- package/dist/components/runtime/lazy-hydrated-component.d.ts +124 -0
- package/dist/components/runtime/lazy-hydrated-component.js +101 -0
- package/dist/components/runtime/server-component.d.ts +20 -0
- package/dist/components/runtime/server-component.js +69 -0
- package/dist/head/runtime/components.d.ts +1058 -0
- package/dist/head/runtime/components.js +297 -0
- package/dist/head/runtime/composables.d.ts +25 -0
- package/dist/head/runtime/composables.js +47 -0
- package/dist/head/runtime/plugins/unhead.d.ts +2 -0
- package/dist/head/runtime/plugins/unhead.js +31 -0
- package/dist/head/runtime/types.d.ts +7 -0
- package/dist/head/runtime/types.js +0 -0
- package/dist/index.d.mts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.mjs +6974 -0
- package/dist/pages/runtime/app.d.vue.ts +3 -0
- package/dist/pages/runtime/app.vue +6 -0
- package/dist/pages/runtime/app.vue.d.ts +3 -0
- package/dist/pages/runtime/component-stub.d.ts +2 -0
- package/dist/pages/runtime/component-stub.js +1 -0
- package/dist/pages/runtime/composables.d.ts +58 -0
- package/dist/pages/runtime/composables.js +24 -0
- package/dist/pages/runtime/index.d.ts +3 -0
- package/dist/pages/runtime/index.js +1 -0
- package/dist/pages/runtime/page-placeholder.d.ts +4 -0
- package/dist/pages/runtime/page-placeholder.js +11 -0
- package/dist/pages/runtime/page.d.ts +30 -0
- package/dist/pages/runtime/page.js +212 -0
- package/dist/pages/runtime/plugins/check-if-page-unused.d.ts +2 -0
- package/dist/pages/runtime/plugins/check-if-page-unused.js +29 -0
- package/dist/pages/runtime/plugins/prefetch.client.d.ts +2 -0
- package/dist/pages/runtime/plugins/prefetch.client.js +41 -0
- package/dist/pages/runtime/plugins/prerender.server.d.ts +2 -0
- package/dist/pages/runtime/plugins/prerender.server.js +47 -0
- package/dist/pages/runtime/plugins/router.d.ts +6 -0
- package/dist/pages/runtime/plugins/router.js +236 -0
- package/dist/pages/runtime/router.options.d.ts +3 -0
- package/dist/pages/runtime/router.options.js +60 -0
- package/dist/pages/runtime/utils.d.ts +11 -0
- package/dist/pages/runtime/utils.js +18 -0
- package/dist/pages/runtime/validate.d.ts +2 -0
- package/dist/pages/runtime/validate.js +23 -0
- package/kit.d.ts +1 -0
- package/kit.js +1 -0
- package/package.json +156 -0
- package/schema.d.ts +1 -0
- package/schema.js +1 -0
- package/types.d.mts +14 -0
- package/types.d.ts +14 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import destr from "destr";
|
|
2
|
+
import { defineNuxtPlugin, useNuxtApp } from "../nuxt.js";
|
|
3
|
+
export default defineNuxtPlugin({
|
|
4
|
+
name: "nuxt:restore-state",
|
|
5
|
+
hooks: {
|
|
6
|
+
"app:mounted"() {
|
|
7
|
+
const nuxtApp = useNuxtApp();
|
|
8
|
+
try {
|
|
9
|
+
const state = sessionStorage.getItem("nuxt:reload:state");
|
|
10
|
+
if (state) {
|
|
11
|
+
sessionStorage.removeItem("nuxt:reload:state");
|
|
12
|
+
Object.assign(nuxtApp.payload.state, destr(state)?.state);
|
|
13
|
+
}
|
|
14
|
+
} catch {
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { reactive, ref, shallowReactive, shallowRef } from "vue";
|
|
2
|
+
import destr from "destr";
|
|
3
|
+
import { definePayloadReviver, getNuxtClientPayload } from "../composables/payload.js";
|
|
4
|
+
import { createError } from "../composables/error.js";
|
|
5
|
+
import { defineNuxtPlugin, useNuxtApp } from "../nuxt.js";
|
|
6
|
+
import { componentIslands } from "#build/nuxt.config.mjs";
|
|
7
|
+
const revivers = [
|
|
8
|
+
["NuxtError", (data) => createError(data)],
|
|
9
|
+
["EmptyShallowRef", (data) => shallowRef(data === "_" ? void 0 : data === "0n" ? BigInt(0) : destr(data))],
|
|
10
|
+
["EmptyRef", (data) => ref(data === "_" ? void 0 : data === "0n" ? BigInt(0) : destr(data))],
|
|
11
|
+
["ShallowRef", (data) => shallowRef(data)],
|
|
12
|
+
["ShallowReactive", (data) => shallowReactive(data)],
|
|
13
|
+
["Ref", (data) => ref(data)],
|
|
14
|
+
["Reactive", (data) => reactive(data)]
|
|
15
|
+
];
|
|
16
|
+
if (componentIslands) {
|
|
17
|
+
revivers.push(["Island", ({ key, params, result }) => {
|
|
18
|
+
const nuxtApp = useNuxtApp();
|
|
19
|
+
if (!nuxtApp.isHydrating) {
|
|
20
|
+
nuxtApp.payload.data[key] ||= $fetch(`/__nuxt_island/${key}.json`, {
|
|
21
|
+
responseType: "json",
|
|
22
|
+
...params ? { params } : {}
|
|
23
|
+
}).then((r) => {
|
|
24
|
+
nuxtApp.payload.data[key] = r;
|
|
25
|
+
return r;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
html: "",
|
|
30
|
+
...result
|
|
31
|
+
};
|
|
32
|
+
}]);
|
|
33
|
+
}
|
|
34
|
+
export default defineNuxtPlugin({
|
|
35
|
+
name: "nuxt:revive-payload:client",
|
|
36
|
+
order: -30,
|
|
37
|
+
async setup(nuxtApp) {
|
|
38
|
+
for (const [reviver, fn] of revivers) {
|
|
39
|
+
definePayloadReviver(reviver, fn);
|
|
40
|
+
}
|
|
41
|
+
Object.assign(nuxtApp.payload, await nuxtApp.runWithContext(getNuxtClientPayload));
|
|
42
|
+
delete window.__NUXT__;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { isReactive, isRef, isShallow, toRaw } from "vue";
|
|
2
|
+
import { definePayloadReducer } from "../composables/payload.js";
|
|
3
|
+
import { isNuxtError } from "../composables/error.js";
|
|
4
|
+
import { defineNuxtPlugin } from "../nuxt.js";
|
|
5
|
+
import { componentIslands } from "#build/nuxt.config.mjs";
|
|
6
|
+
import { isValidIslandKey } from "./utils.js";
|
|
7
|
+
const reducers = [
|
|
8
|
+
["NuxtError", (data) => isNuxtError(data) && data.toJSON()],
|
|
9
|
+
["EmptyShallowRef", (data) => isRef(data) && isShallow(data) && !data.value && (typeof data.value === "bigint" ? "0n" : JSON.stringify(data.value) || "_")],
|
|
10
|
+
["EmptyRef", (data) => isRef(data) && !data.value && (typeof data.value === "bigint" ? "0n" : JSON.stringify(data.value) || "_")],
|
|
11
|
+
["ShallowRef", (data) => isRef(data) && isShallow(data) && data.value],
|
|
12
|
+
["ShallowReactive", (data) => isReactive(data) && isShallow(data) && toRaw(data)],
|
|
13
|
+
["Ref", (data) => isRef(data) && data.value],
|
|
14
|
+
["Reactive", (data) => isReactive(data) && toRaw(data)]
|
|
15
|
+
];
|
|
16
|
+
if (componentIslands) {
|
|
17
|
+
reducers.push(["Island", (data) => data && data?.__nuxt_island && isValidIslandKey(data.__nuxt_island.key) && data.__nuxt_island]);
|
|
18
|
+
}
|
|
19
|
+
export default defineNuxtPlugin({
|
|
20
|
+
name: "nuxt:revive-payload:server",
|
|
21
|
+
setup() {
|
|
22
|
+
for (const [reducer, fn] of reducers) {
|
|
23
|
+
definePayloadReducer(reducer, fn);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
interface Route {
|
|
3
|
+
/** Percentage encoded pathname section of the URL. */
|
|
4
|
+
path: string;
|
|
5
|
+
/** The whole location including the `search` and `hash`. */
|
|
6
|
+
fullPath: string;
|
|
7
|
+
/** Object representation of the `search` property of the current location. */
|
|
8
|
+
query: Record<string, any>;
|
|
9
|
+
/** Hash of the current location. If present, starts with a `#`. */
|
|
10
|
+
hash: string;
|
|
11
|
+
/** Name of the matched record */
|
|
12
|
+
name: string | null | undefined;
|
|
13
|
+
/** Object of decoded params extracted from the `path`. */
|
|
14
|
+
params: Record<string, any>;
|
|
15
|
+
/**
|
|
16
|
+
* The location we were initially trying to access before ending up
|
|
17
|
+
* on the current location.
|
|
18
|
+
*/
|
|
19
|
+
redirectedFrom: Route | undefined;
|
|
20
|
+
/** Merged `meta` properties from all of the matched route records. */
|
|
21
|
+
meta: Record<string, any>;
|
|
22
|
+
/** compatibility type for vue-router */
|
|
23
|
+
matched: never[];
|
|
24
|
+
}
|
|
25
|
+
type RouteGuardReturn = void | Error | string | boolean;
|
|
26
|
+
interface RouterHooks {
|
|
27
|
+
'resolve:before': (to: Route, from: Route) => RouteGuardReturn | Promise<RouteGuardReturn>;
|
|
28
|
+
'navigate:before': (to: Route, from: Route) => RouteGuardReturn | Promise<RouteGuardReturn>;
|
|
29
|
+
'navigate:after': (to: Route, from: Route) => void | Promise<void>;
|
|
30
|
+
'error': (err: any) => void | Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
interface Router {
|
|
33
|
+
currentRoute: Ref<Route>;
|
|
34
|
+
isReady: () => Promise<void>;
|
|
35
|
+
options: Record<string, unknown>;
|
|
36
|
+
install: () => Promise<void>;
|
|
37
|
+
push: (url: string) => Promise<void>;
|
|
38
|
+
replace: (url: string) => Promise<void>;
|
|
39
|
+
back: () => void;
|
|
40
|
+
go: (delta: number) => void;
|
|
41
|
+
forward: () => void;
|
|
42
|
+
beforeResolve: (guard: RouterHooks['resolve:before']) => () => void;
|
|
43
|
+
beforeEach: (guard: RouterHooks['navigate:before']) => () => void;
|
|
44
|
+
afterEach: (guard: RouterHooks['navigate:after']) => () => void;
|
|
45
|
+
onError: (handler: RouterHooks['error']) => () => void;
|
|
46
|
+
resolve: (url: string | Partial<Route>) => Route;
|
|
47
|
+
addRoute: (parentName: string, route: Route) => void;
|
|
48
|
+
getRoutes: () => any[];
|
|
49
|
+
hasRoute: (name: string) => boolean;
|
|
50
|
+
removeRoute: (name: string) => void;
|
|
51
|
+
}
|
|
52
|
+
declare const _default: import("../nuxt.js").Plugin<{
|
|
53
|
+
route: Route;
|
|
54
|
+
router: Router;
|
|
55
|
+
}> & import("../nuxt.js").ObjectPlugin<{
|
|
56
|
+
route: Route;
|
|
57
|
+
router: Router;
|
|
58
|
+
}>;
|
|
59
|
+
export default _default;
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { computed, defineComponent, h, isReadonly, reactive } from "vue";
|
|
2
|
+
import { isEqual, joinURL, parseQuery, stringifyParsedURL, stringifyQuery, withoutBase } from "ufo";
|
|
3
|
+
import { createError } from "h3";
|
|
4
|
+
import { defineNuxtPlugin, useRuntimeConfig } from "../nuxt.js";
|
|
5
|
+
import { getRouteRules } from "../composables/manifest.js";
|
|
6
|
+
import { clearError, showError } from "../composables/error.js";
|
|
7
|
+
import { navigateTo } from "../composables/router.js";
|
|
8
|
+
import { globalMiddleware } from "#build/middleware";
|
|
9
|
+
import { appManifest as isAppManifestEnabled } from "#build/nuxt.config.mjs";
|
|
10
|
+
function getRouteFromPath(fullPath) {
|
|
11
|
+
const route = fullPath && typeof fullPath === "object" ? fullPath : {};
|
|
12
|
+
if (typeof fullPath === "object") {
|
|
13
|
+
fullPath = stringifyParsedURL({
|
|
14
|
+
pathname: fullPath.path || "",
|
|
15
|
+
search: stringifyQuery(fullPath.query || {}),
|
|
16
|
+
hash: fullPath.hash || ""
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
const url = new URL(fullPath.toString(), import.meta.client ? window.location.href : "http://localhost");
|
|
20
|
+
return {
|
|
21
|
+
path: url.pathname,
|
|
22
|
+
fullPath,
|
|
23
|
+
query: parseQuery(url.search),
|
|
24
|
+
hash: url.hash,
|
|
25
|
+
// stub properties for compat with vue-router
|
|
26
|
+
params: route.params || {},
|
|
27
|
+
name: void 0,
|
|
28
|
+
matched: route.matched || [],
|
|
29
|
+
redirectedFrom: void 0,
|
|
30
|
+
meta: route.meta || {},
|
|
31
|
+
href: fullPath
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export default defineNuxtPlugin({
|
|
35
|
+
name: "nuxt:router",
|
|
36
|
+
enforce: "pre",
|
|
37
|
+
setup(nuxtApp) {
|
|
38
|
+
const initialURL = import.meta.client ? withoutBase(window.location.pathname, useRuntimeConfig().app.baseURL) + window.location.search + window.location.hash : nuxtApp.ssrContext.url;
|
|
39
|
+
const routes = [];
|
|
40
|
+
const hooks = {
|
|
41
|
+
"navigate:before": [],
|
|
42
|
+
"resolve:before": [],
|
|
43
|
+
"navigate:after": [],
|
|
44
|
+
"error": []
|
|
45
|
+
};
|
|
46
|
+
const registerHook = (hook, guard) => {
|
|
47
|
+
hooks[hook].push(guard);
|
|
48
|
+
return () => hooks[hook].splice(hooks[hook].indexOf(guard), 1);
|
|
49
|
+
};
|
|
50
|
+
const baseURL = useRuntimeConfig().app.baseURL;
|
|
51
|
+
const route = reactive(getRouteFromPath(initialURL));
|
|
52
|
+
async function handleNavigation(url, replace) {
|
|
53
|
+
try {
|
|
54
|
+
const to = getRouteFromPath(url);
|
|
55
|
+
for (const middleware of hooks["navigate:before"]) {
|
|
56
|
+
const result = await middleware(to, route);
|
|
57
|
+
if (result === false || result instanceof Error) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (typeof result === "string" && result.length) {
|
|
61
|
+
return handleNavigation(result, true);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
for (const handler of hooks["resolve:before"]) {
|
|
65
|
+
await handler(to, route);
|
|
66
|
+
}
|
|
67
|
+
Object.assign(route, to);
|
|
68
|
+
if (import.meta.client) {
|
|
69
|
+
window.history[replace ? "replaceState" : "pushState"]({}, "", joinURL(baseURL, to.fullPath));
|
|
70
|
+
if (!nuxtApp.isHydrating) {
|
|
71
|
+
await nuxtApp.runWithContext(clearError);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
for (const middleware of hooks["navigate:after"]) {
|
|
75
|
+
await middleware(to, route);
|
|
76
|
+
}
|
|
77
|
+
} catch (err) {
|
|
78
|
+
if (import.meta.dev && !hooks.error.length) {
|
|
79
|
+
console.warn("No error handlers registered to handle middleware errors. You can register an error handler with `router.onError()`", err);
|
|
80
|
+
}
|
|
81
|
+
for (const handler of hooks.error) {
|
|
82
|
+
await handler(err);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
const currentRoute = computed(() => route);
|
|
87
|
+
const router = {
|
|
88
|
+
currentRoute,
|
|
89
|
+
isReady: () => Promise.resolve(),
|
|
90
|
+
// These options provide a similar API to vue-router but have no effect
|
|
91
|
+
options: {},
|
|
92
|
+
install: () => Promise.resolve(),
|
|
93
|
+
// Navigation
|
|
94
|
+
push: (url) => handleNavigation(url, false),
|
|
95
|
+
replace: (url) => handleNavigation(url, true),
|
|
96
|
+
back: () => window.history.go(-1),
|
|
97
|
+
go: (delta) => window.history.go(delta),
|
|
98
|
+
forward: () => window.history.go(1),
|
|
99
|
+
// Guards
|
|
100
|
+
beforeResolve: (guard) => registerHook("resolve:before", guard),
|
|
101
|
+
beforeEach: (guard) => registerHook("navigate:before", guard),
|
|
102
|
+
afterEach: (guard) => registerHook("navigate:after", guard),
|
|
103
|
+
onError: (handler) => registerHook("error", handler),
|
|
104
|
+
// Routes
|
|
105
|
+
resolve: getRouteFromPath,
|
|
106
|
+
addRoute: (parentName, route2) => {
|
|
107
|
+
routes.push(route2);
|
|
108
|
+
},
|
|
109
|
+
getRoutes: () => routes,
|
|
110
|
+
hasRoute: (name) => routes.some((route2) => route2.name === name),
|
|
111
|
+
removeRoute: (name) => {
|
|
112
|
+
const index = routes.findIndex((route2) => route2.name === name);
|
|
113
|
+
if (index !== -1) {
|
|
114
|
+
routes.splice(index, 1);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
nuxtApp.vueApp.component("RouterLink", defineComponent({
|
|
119
|
+
functional: true,
|
|
120
|
+
props: {
|
|
121
|
+
to: {
|
|
122
|
+
type: String,
|
|
123
|
+
required: true
|
|
124
|
+
},
|
|
125
|
+
custom: Boolean,
|
|
126
|
+
replace: Boolean,
|
|
127
|
+
// Not implemented
|
|
128
|
+
activeClass: String,
|
|
129
|
+
exactActiveClass: String,
|
|
130
|
+
ariaCurrentValue: String
|
|
131
|
+
},
|
|
132
|
+
setup: (props, { slots }) => {
|
|
133
|
+
const navigate = () => handleNavigation(props.to, props.replace);
|
|
134
|
+
return () => {
|
|
135
|
+
const route2 = router.resolve(props.to);
|
|
136
|
+
return props.custom ? slots.default?.({ href: props.to, navigate, route: route2 }) : h("a", { href: props.to, onClick: (e) => {
|
|
137
|
+
e.preventDefault();
|
|
138
|
+
return navigate();
|
|
139
|
+
} }, slots);
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
}));
|
|
143
|
+
if (import.meta.client) {
|
|
144
|
+
window.addEventListener("popstate", (event) => {
|
|
145
|
+
const location = event.target.location;
|
|
146
|
+
router.replace(location.href.replace(location.origin, ""));
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
nuxtApp._route = route;
|
|
150
|
+
nuxtApp._middleware ||= {
|
|
151
|
+
global: [],
|
|
152
|
+
named: {}
|
|
153
|
+
};
|
|
154
|
+
const initialLayout = nuxtApp.payload.state._layout;
|
|
155
|
+
nuxtApp.hooks.hookOnce("app:created", async () => {
|
|
156
|
+
router.beforeEach(async (to, from) => {
|
|
157
|
+
to.meta = reactive(to.meta || {});
|
|
158
|
+
if (nuxtApp.isHydrating && initialLayout && !isReadonly(to.meta.layout)) {
|
|
159
|
+
to.meta.layout = initialLayout;
|
|
160
|
+
}
|
|
161
|
+
nuxtApp._processingMiddleware = true;
|
|
162
|
+
if (import.meta.client || !nuxtApp.ssrContext?.islandContext) {
|
|
163
|
+
const middlewareEntries = /* @__PURE__ */ new Set([...globalMiddleware, ...nuxtApp._middleware.global]);
|
|
164
|
+
if (isAppManifestEnabled) {
|
|
165
|
+
const routeRules = await nuxtApp.runWithContext(() => getRouteRules({ path: to.path }));
|
|
166
|
+
if (routeRules.appMiddleware) {
|
|
167
|
+
for (const key in routeRules.appMiddleware) {
|
|
168
|
+
const guard = nuxtApp._middleware.named[key];
|
|
169
|
+
if (!guard) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
if (routeRules.appMiddleware[key]) {
|
|
173
|
+
middlewareEntries.add(guard);
|
|
174
|
+
} else {
|
|
175
|
+
middlewareEntries.delete(guard);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
for (const middleware of middlewareEntries) {
|
|
181
|
+
if (import.meta.dev) {
|
|
182
|
+
nuxtApp._processingMiddleware = middleware._path || true;
|
|
183
|
+
}
|
|
184
|
+
const result = await nuxtApp.runWithContext(() => middleware(to, from));
|
|
185
|
+
if (import.meta.server) {
|
|
186
|
+
if (result === false || result instanceof Error) {
|
|
187
|
+
const error = result || createError({
|
|
188
|
+
statusCode: 404,
|
|
189
|
+
statusMessage: `Page Not Found: ${initialURL}`,
|
|
190
|
+
data: {
|
|
191
|
+
path: initialURL
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
delete nuxtApp._processingMiddleware;
|
|
195
|
+
return nuxtApp.runWithContext(() => showError(error));
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
if (result === true) {
|
|
199
|
+
continue;
|
|
200
|
+
}
|
|
201
|
+
if (result || result === false) {
|
|
202
|
+
return result;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
router.afterEach(() => {
|
|
208
|
+
delete nuxtApp._processingMiddleware;
|
|
209
|
+
});
|
|
210
|
+
await router.replace(initialURL);
|
|
211
|
+
if (!isEqual(route.fullPath, initialURL)) {
|
|
212
|
+
await nuxtApp.runWithContext(() => navigateTo(route.fullPath));
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
return {
|
|
216
|
+
provide: {
|
|
217
|
+
route,
|
|
218
|
+
router
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isValidIslandKey(key: string): boolean;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { isChangingPage } from "../components/utils.js";
|
|
2
|
+
import { useRouter } from "../composables/router.js";
|
|
3
|
+
import { defineNuxtPlugin } from "../nuxt.js";
|
|
4
|
+
import { appViewTransition as defaultViewTransition } from "#build/nuxt.config.mjs";
|
|
5
|
+
export default defineNuxtPlugin((nuxtApp) => {
|
|
6
|
+
if (!document.startViewTransition) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
let transition;
|
|
10
|
+
let hasUAVisualTransition = false;
|
|
11
|
+
let finishTransition;
|
|
12
|
+
let abortTransition;
|
|
13
|
+
const resetTransitionState = () => {
|
|
14
|
+
transition = void 0;
|
|
15
|
+
hasUAVisualTransition = false;
|
|
16
|
+
abortTransition = void 0;
|
|
17
|
+
finishTransition = void 0;
|
|
18
|
+
};
|
|
19
|
+
window.addEventListener("popstate", (event) => {
|
|
20
|
+
hasUAVisualTransition = event.hasUAVisualTransition;
|
|
21
|
+
if (hasUAVisualTransition) {
|
|
22
|
+
transition?.skipTransition();
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const router = useRouter();
|
|
26
|
+
router.beforeResolve(async (to, from) => {
|
|
27
|
+
const viewTransitionMode = to.meta.viewTransition ?? defaultViewTransition;
|
|
28
|
+
const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
29
|
+
const prefersNoTransition = prefersReducedMotion && viewTransitionMode !== "always";
|
|
30
|
+
if (viewTransitionMode === false || prefersNoTransition || hasUAVisualTransition || !isChangingPage(to, from)) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const promise = new Promise((resolve, reject) => {
|
|
34
|
+
finishTransition = resolve;
|
|
35
|
+
abortTransition = reject;
|
|
36
|
+
});
|
|
37
|
+
let changeRoute;
|
|
38
|
+
const ready = new Promise((resolve) => changeRoute = resolve);
|
|
39
|
+
transition = document.startViewTransition(() => {
|
|
40
|
+
changeRoute();
|
|
41
|
+
return promise;
|
|
42
|
+
});
|
|
43
|
+
transition.finished.then(resetTransitionState);
|
|
44
|
+
await nuxtApp.callHook("page:view-transition:start", transition);
|
|
45
|
+
return ready;
|
|
46
|
+
});
|
|
47
|
+
nuxtApp.hook("vue:error", () => {
|
|
48
|
+
abortTransition?.();
|
|
49
|
+
resetTransitionState();
|
|
50
|
+
});
|
|
51
|
+
nuxtApp.hook("page:finish", () => {
|
|
52
|
+
finishTransition?.();
|
|
53
|
+
resetTransitionState();
|
|
54
|
+
});
|
|
55
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { UseHeadInput } from '@unhead/vue/types';
|
|
2
|
+
import type { NuxtApp, useNuxtApp } from '../nuxt.js';
|
|
3
|
+
declare global {
|
|
4
|
+
namespace NodeJS {
|
|
5
|
+
interface Process {
|
|
6
|
+
/** @deprecated Use `import.meta.browser` instead. This may be removed in Nuxt v5 or a future major version. */
|
|
7
|
+
browser: boolean;
|
|
8
|
+
/** @deprecated Use `import.meta.client` instead. This may be removed in Nuxt v5 or a future major version. */
|
|
9
|
+
client: boolean;
|
|
10
|
+
/** @deprecated Use `import.meta.dev` instead. This may be removed in Nuxt v5 or a future major version. */
|
|
11
|
+
dev: boolean;
|
|
12
|
+
/** @deprecated Use `import.meta.server` instead. This may be removed in Nuxt v5 or a future major version. */
|
|
13
|
+
server: boolean;
|
|
14
|
+
/** @deprecated Use `import.meta.test` instead. This may be removed in Nuxt v5 or a future major version. */
|
|
15
|
+
test: boolean;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
interface ImportMeta {
|
|
19
|
+
browser: boolean;
|
|
20
|
+
client: boolean;
|
|
21
|
+
dev: boolean;
|
|
22
|
+
server: boolean;
|
|
23
|
+
test: boolean;
|
|
24
|
+
}
|
|
25
|
+
interface Window {
|
|
26
|
+
__NUXT__?: Record<string, any> | Record<string, Record<string, any>>;
|
|
27
|
+
useNuxtApp?: typeof useNuxtApp;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
declare module 'vue' {
|
|
31
|
+
interface App<HostElement> {
|
|
32
|
+
$nuxt: NuxtApp;
|
|
33
|
+
}
|
|
34
|
+
interface ComponentCustomProperties {
|
|
35
|
+
$nuxt: NuxtApp;
|
|
36
|
+
}
|
|
37
|
+
interface ComponentInternalInstance {
|
|
38
|
+
_nuxtOnBeforeMountCbs: Array<() => void | Promise<void>>;
|
|
39
|
+
_nuxtIdIndex?: Record<string, number>;
|
|
40
|
+
_nuxtClientOnly?: boolean;
|
|
41
|
+
}
|
|
42
|
+
interface ComponentCustomOptions {
|
|
43
|
+
/**
|
|
44
|
+
* Available exclusively for `defineNuxtComponent`.
|
|
45
|
+
* It will not be executed when using `defineComponent`.
|
|
46
|
+
*/
|
|
47
|
+
head?(nuxtApp: NuxtApp): UseHeadInput;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { SerializableHead } from '@unhead/vue';
|
|
2
|
+
export type { PageMeta, NuxtPageProps } from '../pages/runtime/index.js';
|
|
3
|
+
export interface NuxtAppLiterals {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
}
|
|
6
|
+
export interface NuxtIslandSlotResponse {
|
|
7
|
+
props: Array<unknown>;
|
|
8
|
+
fallback?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface NuxtIslandClientResponse {
|
|
11
|
+
html: string;
|
|
12
|
+
props: unknown;
|
|
13
|
+
chunk: string;
|
|
14
|
+
slots?: Record<string, string>;
|
|
15
|
+
}
|
|
16
|
+
export interface NuxtIslandContext {
|
|
17
|
+
id?: string;
|
|
18
|
+
name: string;
|
|
19
|
+
props?: Record<string, any>;
|
|
20
|
+
url: string;
|
|
21
|
+
slots: Record<string, Omit<NuxtIslandSlotResponse, 'fallback'>>;
|
|
22
|
+
components: Record<string, Omit<NuxtIslandClientResponse, 'html'>>;
|
|
23
|
+
}
|
|
24
|
+
export interface NuxtIslandResponse {
|
|
25
|
+
id?: string;
|
|
26
|
+
html: string;
|
|
27
|
+
head: SerializableHead;
|
|
28
|
+
props?: Record<string, Record<string, any>>;
|
|
29
|
+
components?: Record<string, NuxtIslandClientResponse>;
|
|
30
|
+
slots?: Record<string, NuxtIslandSlotResponse>;
|
|
31
|
+
}
|
|
32
|
+
export interface NuxtRenderHTMLContext {
|
|
33
|
+
htmlAttrs: string[];
|
|
34
|
+
head: string[];
|
|
35
|
+
bodyAttrs: string[];
|
|
36
|
+
bodyPrepend: string[];
|
|
37
|
+
body: string[];
|
|
38
|
+
bodyAppend: string[];
|
|
39
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** @since 3.9.0 */
|
|
2
|
+
export declare function toArray<T>(value: T | T[]): T[];
|
|
3
|
+
export declare function getUserTrace(): {
|
|
4
|
+
source: string;
|
|
5
|
+
column?: number;
|
|
6
|
+
function?: string;
|
|
7
|
+
line?: number;
|
|
8
|
+
}[];
|
|
9
|
+
export declare function getUserCaller(): {
|
|
10
|
+
source: string;
|
|
11
|
+
line: number | undefined;
|
|
12
|
+
column: number | undefined;
|
|
13
|
+
} | null;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { captureStackTrace } from "errx";
|
|
2
|
+
export function toArray(value) {
|
|
3
|
+
return Array.isArray(value) ? value : [value];
|
|
4
|
+
}
|
|
5
|
+
const distURL = import.meta.url.replace(/\/app\/.*$/, "/");
|
|
6
|
+
export function getUserTrace() {
|
|
7
|
+
if (!import.meta.dev) {
|
|
8
|
+
return [];
|
|
9
|
+
}
|
|
10
|
+
const trace = captureStackTrace();
|
|
11
|
+
const start = trace.findIndex((entry) => !entry.source.startsWith(distURL));
|
|
12
|
+
const end = [...trace].reverse().findIndex((entry) => !entry.source.includes("node_modules") && !entry.source.startsWith(distURL));
|
|
13
|
+
if (start === -1 || end === -1) {
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
16
|
+
return trace.slice(start, -end).map((i) => ({
|
|
17
|
+
...i,
|
|
18
|
+
source: i.source.replace(/^file:\/\//, "")
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
export function getUserCaller() {
|
|
22
|
+
if (!import.meta.dev) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
const { source, line, column } = captureStackTrace().find((entry) => !entry.source.startsWith(distURL)) ?? {};
|
|
26
|
+
if (!source) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
source: source.replace(/^file:\/\//, ""),
|
|
31
|
+
line,
|
|
32
|
+
column
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { getCurrentInstance, h, onMounted, provide, shallowRef } from "vue";
|
|
2
|
+
import { isPromise } from "@vue/shared";
|
|
3
|
+
import { useNuxtApp } from "#app/nuxt";
|
|
4
|
+
import ServerPlaceholder from "#app/components/server-placeholder";
|
|
5
|
+
import { clientOnlySymbol } from "#app/components/client-only";
|
|
6
|
+
// @__NO_SIDE_EFFECTS__
|
|
7
|
+
export async function createClientPage(loader) {
|
|
8
|
+
const m = await loader();
|
|
9
|
+
const c = m.default || m;
|
|
10
|
+
if (import.meta.dev) {
|
|
11
|
+
c.__clientOnlyPage = true;
|
|
12
|
+
}
|
|
13
|
+
return pageToClientOnly(c);
|
|
14
|
+
}
|
|
15
|
+
const cache = /* @__PURE__ */ new WeakMap();
|
|
16
|
+
function pageToClientOnly(component) {
|
|
17
|
+
if (import.meta.server) {
|
|
18
|
+
return ServerPlaceholder;
|
|
19
|
+
}
|
|
20
|
+
if (cache.has(component)) {
|
|
21
|
+
return cache.get(component);
|
|
22
|
+
}
|
|
23
|
+
const clone = { ...component };
|
|
24
|
+
if (clone.render) {
|
|
25
|
+
clone.render = (ctx, cache2, $props, $setup, $data, $options) => $setup.mounted$ ?? ctx.mounted$ ? h(component.render?.bind(ctx)(ctx, cache2, $props, $setup, $data, $options)) : h("div");
|
|
26
|
+
} else {
|
|
27
|
+
clone.template &&= `
|
|
28
|
+
<template v-if="mounted$">${component.template}</template>
|
|
29
|
+
<template v-else><div></div></template>
|
|
30
|
+
`;
|
|
31
|
+
}
|
|
32
|
+
clone.setup = (props, ctx) => {
|
|
33
|
+
const nuxtApp = useNuxtApp();
|
|
34
|
+
const mounted$ = shallowRef(nuxtApp.isHydrating === false);
|
|
35
|
+
provide(clientOnlySymbol, true);
|
|
36
|
+
const vm = getCurrentInstance();
|
|
37
|
+
if (vm) {
|
|
38
|
+
vm._nuxtClientOnly = true;
|
|
39
|
+
}
|
|
40
|
+
onMounted(() => {
|
|
41
|
+
mounted$.value = true;
|
|
42
|
+
});
|
|
43
|
+
const setupState = component.setup?.(props, ctx) || {};
|
|
44
|
+
if (isPromise(setupState)) {
|
|
45
|
+
return Promise.resolve(setupState).then((setupState2) => {
|
|
46
|
+
if (typeof setupState2 !== "function") {
|
|
47
|
+
setupState2 ||= {};
|
|
48
|
+
setupState2.mounted$ = mounted$;
|
|
49
|
+
return setupState2;
|
|
50
|
+
}
|
|
51
|
+
return (...args) => mounted$.value || !nuxtApp.isHydrating ? h(setupState2(...args)) : h("div");
|
|
52
|
+
});
|
|
53
|
+
} else {
|
|
54
|
+
return typeof setupState === "function" ? (...args) => mounted$.value || !nuxtApp.isHydrating ? h(setupState(...args)) : h("div") : Object.assign(setupState, { mounted$ });
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
cache.set(component, clone);
|
|
58
|
+
return clone;
|
|
59
|
+
}
|