@ubean/client 0.4.5 → 0.4.7
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/{app-emLZM9XN.d.ts → app-Busq_M7n.d.ts} +2 -2
- package/dist/{app-Bt-2meGm.js → app-C5YuXGJl.js} +5 -3
- package/dist/app.d.ts +2 -2
- package/dist/app.js +2 -2
- package/dist/{i18n-CAeXKTpy.js → i18n-DPOzFBuG.js} +10 -1
- package/dist/index.d.ts +61 -54
- package/dist/index.js +4 -4
- package/dist/server.d.ts +2 -2
- package/dist/server.js +2 -2
- package/dist/ssr.d.ts +5 -6
- package/dist/ssr.js +1 -1
- package/package.json +9 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as RouterConfig } from "./define-app-RzHOZlYB.js";
|
|
2
2
|
import { App, Component } from "vue";
|
|
3
3
|
import { RouteRecordRaw, Router, RouterOptions } from "vue-router";
|
|
4
|
-
import { ERROR_KEY as ERROR_KEY$1, LAYOUT_CHAIN_KEY, LOADING_KEY as LOADING_KEY$1, LOCALIZE_PATH_KEY as LOCALIZE_PATH_KEY$1, LayoutChainContext, LayoutChainRenderer as LayoutChainRenderer$1, Link, PAGE_KEY as PAGE_KEY$1, PageMeta, PageView, SSR_KEY as SSR_KEY$1, SlotView, TRANSITION_KEY as TRANSITION_KEY$1, UbeanVueOptions, ViewTransitionOptions, ubeanVue, useViewTransition } from "@ubean/vue";
|
|
4
|
+
import { ClientOnly, ERROR_KEY as ERROR_KEY$1, LAYOUT_CHAIN_KEY, LOADING_KEY as LOADING_KEY$1, LOCALIZE_PATH_KEY as LOCALIZE_PATH_KEY$1, LayoutChainContext, LayoutChainRenderer as LayoutChainRenderer$1, Link, PAGE_KEY as PAGE_KEY$1, PageMeta, PageView, SSR_KEY as SSR_KEY$1, SlotView, TRANSITION_KEY as TRANSITION_KEY$1, UbeanVueOptions, ViewTransitionOptions, ubeanVue, useViewTransition } from "@ubean/vue";
|
|
5
5
|
import { VueHeadClient, useHead as useUnheadHead, useSeoMeta } from "@unhead/vue";
|
|
6
6
|
import { PageObject } from "@ubean/pages";
|
|
7
7
|
import { I18n } from "vue-i18n";
|
|
@@ -134,4 +134,4 @@ declare function createUbeanSSRApp(initialPage: PageObject, options: Omit<UbeanA
|
|
|
134
134
|
};
|
|
135
135
|
declare const Head: import("vue").DefineComponent;
|
|
136
136
|
//#endregion
|
|
137
|
-
export {
|
|
137
|
+
export { createUbeanRouter as A, useViewTransition as C, UbeanVuePage as D, definePage as E, usePage as O, useUnheadHead as S, defineMiddleware as T, UbeanVueOptions as _, LOADING_KEY$1 as a, ubeanVue as b, LayoutChainRenderer$1 as c, PageView as d, SSR_KEY$1 as f, UbeanAppOptions as g, UbeanAppInstance as h, LAYOUT_CHAIN_KEY as i, CreateUbeanRouterOptions as k, Link as l, TRANSITION_KEY$1 as m, ERROR_KEY$1 as n, LOCALIZE_PATH_KEY$1 as o, SlotView as p, Head as r, LayoutChainContext as s, ClientOnly as t, PAGE_KEY$1 as u, createUbeanClientApp as v, defineMeta as w, useSeoMeta as x, createUbeanSSRApp as y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as getI18nRuntimeConfig, l as localizePath, r as createUbeanI18n, s as initClientI18n, t as bindI18nRuntime } from "./i18n-
|
|
1
|
+
import { a as getI18nRuntimeConfig, l as localizePath, r as createUbeanI18n, s as initClientI18n, t as bindI18nRuntime } from "./i18n-DPOzFBuG.js";
|
|
2
2
|
import { computed, createApp, createSSRApp, defineComponent, h, inject, markRaw, provide, reactive, shallowRef, watchEffect } from "vue";
|
|
3
3
|
import { createMemoryHistory, createRouter, createWebHistory, useRoute } from "vue-router";
|
|
4
|
-
import { ERROR_KEY, ERROR_KEY as ERROR_KEY$1, LAYOUT_CHAIN_KEY, LOADING_KEY, LOADING_KEY as LOADING_KEY$1, LOCALIZE_PATH_KEY, LOCALIZE_PATH_KEY as LOCALIZE_PATH_KEY$1, LayoutChainRenderer, LayoutChainRenderer as LayoutChainRenderer$1, Link, PAGE_KEY, PAGE_KEY as PAGE_KEY$1, PageView, SSR_KEY, SSR_KEY as SSR_KEY$1, SlotView, TRANSITION_KEY, TRANSITION_KEY as TRANSITION_KEY$1, initCachedViewsFromRoutes, ubeanVue, useViewTransition } from "@ubean/vue";
|
|
4
|
+
import { ClientOnly, ERROR_KEY, ERROR_KEY as ERROR_KEY$1, LAYOUT_CHAIN_KEY, LOADING_KEY, LOADING_KEY as LOADING_KEY$1, LOCALIZE_PATH_KEY, LOCALIZE_PATH_KEY as LOCALIZE_PATH_KEY$1, LayoutChainRenderer, LayoutChainRenderer as LayoutChainRenderer$1, Link, PAGE_KEY, PAGE_KEY as PAGE_KEY$1, PageView, SSR_KEY, SSR_KEY as SSR_KEY$1, SlotView, TRANSITION_KEY, TRANSITION_KEY as TRANSITION_KEY$1, initCachedViewsFromRoutes, ubeanVue, useViewTransition } from "@ubean/vue";
|
|
5
5
|
import { useHead as useUnheadHead, useSeoMeta } from "@unhead/vue";
|
|
6
6
|
import { vClient } from "@ubean/islands/directive";
|
|
7
7
|
import { Head } from "@unhead/vue/components";
|
|
@@ -206,6 +206,7 @@ function createUbeanClientApp(options) {
|
|
|
206
206
|
app.component("Link", Link);
|
|
207
207
|
app.component("PageView", PageView);
|
|
208
208
|
app.component("SlotView", SlotView);
|
|
209
|
+
app.component("ClientOnly", ClientOnly);
|
|
209
210
|
app.directive("client", vClient);
|
|
210
211
|
app.config.globalProperties.$ubean = {
|
|
211
212
|
page,
|
|
@@ -245,6 +246,7 @@ function createUbeanSSRApp(initialPage, options) {
|
|
|
245
246
|
app.component("Link", Link);
|
|
246
247
|
app.component("PageView", PageView);
|
|
247
248
|
app.component("SlotView", SlotView);
|
|
249
|
+
app.component("ClientOnly", ClientOnly);
|
|
248
250
|
app.directive("client", vClient);
|
|
249
251
|
app.config.globalProperties.$ubean = {
|
|
250
252
|
page,
|
|
@@ -260,4 +262,4 @@ function createUbeanSSRApp(initialPage, options) {
|
|
|
260
262
|
}
|
|
261
263
|
const Head$1 = Head;
|
|
262
264
|
//#endregion
|
|
263
|
-
export {
|
|
265
|
+
export { createUbeanRouter as C, definePage as S, useSeoMeta as _, LOADING_KEY$1 as a, defineMeta as b, Link as c, SSR_KEY$1 as d, SlotView as f, ubeanVue as g, createUbeanSSRApp as h, LAYOUT_CHAIN_KEY as i, PAGE_KEY$1 as l, createUbeanClientApp as m, ERROR_KEY$1 as n, LOCALIZE_PATH_KEY$1 as o, TRANSITION_KEY$1 as p, Head$1 as r, LayoutChainRenderer$1 as s, ClientOnly as t, PageView as u, useUnheadHead as v, usePage as w, defineMiddleware as x, useViewTransition as y };
|
package/dist/app.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export { type CreateUbeanRouterOptions, ERROR_KEY, Head, LAYOUT_CHAIN_KEY, LOADING_KEY, LOCALIZE_PATH_KEY, type LayoutChainContext, LayoutChainRenderer, Link, PAGE_KEY, PageView, SSR_KEY, SlotView, TRANSITION_KEY, UbeanAppInstance, UbeanAppOptions, type UbeanVueOptions, type UbeanVuePage, createUbeanClientApp, createUbeanRouter, createUbeanSSRApp, defineMeta, defineMiddleware, definePage, ubeanVue, useUnheadHead as useHead, usePage, useSeoMeta, useViewTransition };
|
|
1
|
+
import { A as createUbeanRouter, C as useViewTransition, D as UbeanVuePage, E as definePage, O as usePage, S as useUnheadHead, T as defineMiddleware, _ as UbeanVueOptions, a as LOADING_KEY, b as ubeanVue, c as LayoutChainRenderer, d as PageView, f as SSR_KEY, g as UbeanAppOptions, h as UbeanAppInstance, i as LAYOUT_CHAIN_KEY, k as CreateUbeanRouterOptions, l as Link, m as TRANSITION_KEY, n as ERROR_KEY, o as LOCALIZE_PATH_KEY, p as SlotView, r as Head, s as LayoutChainContext, t as ClientOnly, u as PAGE_KEY, v as createUbeanClientApp, w as defineMeta, x as useSeoMeta, y as createUbeanSSRApp } from "./app-Busq_M7n.js";
|
|
2
|
+
export { ClientOnly, type CreateUbeanRouterOptions, ERROR_KEY, Head, LAYOUT_CHAIN_KEY, LOADING_KEY, LOCALIZE_PATH_KEY, type LayoutChainContext, LayoutChainRenderer, Link, PAGE_KEY, PageView, SSR_KEY, SlotView, TRANSITION_KEY, UbeanAppInstance, UbeanAppOptions, type UbeanVueOptions, type UbeanVuePage, createUbeanClientApp, createUbeanRouter, createUbeanSSRApp, defineMeta, defineMiddleware, definePage, ubeanVue, useUnheadHead as useHead, usePage, useSeoMeta, useViewTransition };
|
package/dist/app.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export { ERROR_KEY, Head, LAYOUT_CHAIN_KEY, LOADING_KEY, LOCALIZE_PATH_KEY, LayoutChainRenderer, Link, PAGE_KEY, PageView, SSR_KEY, SlotView, TRANSITION_KEY, createUbeanClientApp, createUbeanRouter, createUbeanSSRApp, defineMeta, defineMiddleware, definePage, ubeanVue, useUnheadHead as useHead, usePage, useSeoMeta, useViewTransition };
|
|
1
|
+
import { C as createUbeanRouter, S as definePage, _ as useSeoMeta, a as LOADING_KEY, b as defineMeta, c as Link, d as SSR_KEY, f as SlotView, g as ubeanVue, h as createUbeanSSRApp, i as LAYOUT_CHAIN_KEY, l as PAGE_KEY, m as createUbeanClientApp, n as ERROR_KEY, o as LOCALIZE_PATH_KEY, p as TRANSITION_KEY, r as Head, s as LayoutChainRenderer, t as ClientOnly, u as PageView, v as useUnheadHead, w as usePage, x as defineMiddleware, y as useViewTransition } from "./app-C5YuXGJl.js";
|
|
2
|
+
export { ClientOnly, ERROR_KEY, Head, LAYOUT_CHAIN_KEY, LOADING_KEY, LOCALIZE_PATH_KEY, LayoutChainRenderer, Link, PAGE_KEY, PageView, SSR_KEY, SlotView, TRANSITION_KEY, createUbeanClientApp, createUbeanRouter, createUbeanSSRApp, defineMeta, defineMiddleware, definePage, ubeanVue, useUnheadHead as useHead, usePage, useSeoMeta, useViewTransition };
|
|
@@ -108,6 +108,13 @@ function writeLocaleCookie(code) {
|
|
|
108
108
|
* Framework setLocale: load messages, switch composer locale, write cookie,
|
|
109
109
|
* navigate to the localized path (`no_prefix` skips navigation).
|
|
110
110
|
*
|
|
111
|
+
* Server-side (no `window`) the navigation is skipped: the render URL is the
|
|
112
|
+
* source of truth during SSR/SSG, and `router.replace` on the shared
|
|
113
|
+
* memory-history router — often a stale instance from a previous render —
|
|
114
|
+
* cancels in-flight initial navigations. Combined with a navigation guard
|
|
115
|
+
* calling `setLocale`, this used to create a self-sustaining replace loop
|
|
116
|
+
* that starved the event loop (docs SSG build hang, 2026-09-10).
|
|
117
|
+
*
|
|
111
118
|
* Uses the runtime bound by `bindI18nRuntime` (not Vue composables) so it is
|
|
112
119
|
* safe to call from click handlers.
|
|
113
120
|
*/
|
|
@@ -123,7 +130,7 @@ async function setLocale(code) {
|
|
|
123
130
|
}) : Promise.resolve();
|
|
124
131
|
const cfg = state.config;
|
|
125
132
|
let navPromise = Promise.resolve();
|
|
126
|
-
if (cfg && cfg.strategy !== "no_prefix") {
|
|
133
|
+
if (cfg && cfg.strategy !== "no_prefix" && typeof window !== "undefined") {
|
|
127
134
|
const router = state.router;
|
|
128
135
|
const currentPath = (router?.currentRoute.value.path || router?.currentRoute.value.fullPath?.split("?")[0] || (typeof window !== "undefined" ? window.location.pathname : "/")).split("?")[0];
|
|
129
136
|
const target = switchLocalePath(code, currentPath, routingFrom(cfg));
|
|
@@ -135,6 +142,8 @@ function getLocale() {
|
|
|
135
142
|
try {
|
|
136
143
|
return String(useI18n().locale.value);
|
|
137
144
|
} catch {
|
|
145
|
+
const composer = getRuntimeState().i18n?.global;
|
|
146
|
+
if (composer) return String(composer.locale.value);
|
|
138
147
|
return getRuntimeConfigState()?.defaultLocale || "en";
|
|
139
148
|
}
|
|
140
149
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as createUbeanRouter, D as UbeanVuePage, E as definePage, O as usePage, S as useUnheadHead, T as defineMiddleware, g as UbeanAppOptions, h as UbeanAppInstance, k as CreateUbeanRouterOptions, r as Head, v as createUbeanClientApp, w as defineMeta, x as useSeoMeta, y as createUbeanSSRApp } from "./app-Busq_M7n.js";
|
|
2
2
|
import { a as applyAppConfig, c as mergeAppConfig, n as DefineAppOptions, o as createDefaultAppConfig, r as ResolvedAppConfig, s as defineApp, t as AppPluginConfig } from "./define-app-RzHOZlYB.js";
|
|
3
3
|
import { App, ComputedRef, Ref, ShallowRef } from "vue";
|
|
4
4
|
import "vue-router";
|
|
5
|
-
import { ERROR_KEY, ErrorBoundary, LAYOUT_CHAIN_KEY, LOADING_KEY, LOCALIZE_PATH_KEY, LayoutChainContext, LayoutChainRenderer, Link, PAGE_KEY, PageView, RouteLocation, RouteLocationRaw, SSR_KEY, SlotView, TRANSITION_KEY, TypedLinkProps, UbeanVueOptions, UbeanVuePageData, UseCacheViewsReturn, UsePageTransitionReturn, UseReloadSignalReturn, ViewTransitionOptions, clearPageTransition, disablePageCache, enablePageCache, excludePageCache, getCacheEnabled, getCachedViewNames, getExcludedViewNames, getNamedPageWrapper, getNavigationType, getPageTransitionName, getReloadCounter, includePageCache, initCachedViewsFromRoutes, invalidatePageCache, isActiveRoute, isCacheEnabled, isPageCached, isPageExcluded, isReloading, reloadPage, resetNamedPageWrappers, resetRouteCache, resolveRoute, setPageTransition, supportsViewTransitions, ubeanVue, useCacheViews, usePageTransition, useReloadSignal, useViewTransition, useViewTransitionState, withViewTransition } from "@ubean/vue";
|
|
5
|
+
import { ClientOnly, ClientOnlyProps, ClientOnlySlots, ERROR_KEY, ErrorBoundary, LAYOUT_CHAIN_KEY, LOADING_KEY, LOCALIZE_PATH_KEY, LayoutChainContext, LayoutChainRenderer, Link, PAGE_KEY, PageView, RouteLocation, RouteLocationRaw, SSR_KEY, SlotView, TRANSITION_KEY, TypedLinkProps, UbeanVueOptions, UbeanVuePageData, UseCacheViewsReturn, UsePageTransitionReturn, UseReloadSignalReturn, ViewTransitionOptions, clearPageTransition, disablePageCache, enablePageCache, excludePageCache, getCacheEnabled, getCachedViewNames, getExcludedViewNames, getNamedPageWrapper, getNavigationType, getPageTransitionName, getReloadCounter, includePageCache, initCachedViewsFromRoutes, invalidatePageCache, isActiveRoute, isCacheEnabled, isPageCached, isPageExcluded, isReloading, reloadPage, resetNamedPageWrappers, resetRouteCache, resolveRoute, setPageTransition, supportsViewTransitions, ubeanVue, useCacheViews, usePageTransition, useReloadSignal, useViewTransition, useViewTransitionState, withViewTransition } from "@ubean/vue";
|
|
6
6
|
import { createHead as createClientHead } from "@unhead/vue/client";
|
|
7
7
|
import { DataResult, PageObject, UseAsyncDataOptions, UseFetchOptions, invalidateData, setDefaultFetch, useAsyncData, useData, useFetch } from "@ubean/pages";
|
|
8
8
|
import { I18n } from "vue-i18n";
|
|
@@ -10,7 +10,7 @@ import { LocaleRoutingConfig, buildLocaleHead } from "@ubean/i18n/browser";
|
|
|
10
10
|
import { HydrateIslandsOptions, IslandHydrateOptions, IslandHydrationScheduler, IslandRecord, collectIslands, hasPendingIslands, hydrateIsland, hydrateIslands, scheduleIslandHydration } from "@ubean/islands/runtime";
|
|
11
11
|
import { LinkTag, MetaTag, SeoMetadata } from "@ubean/seo";
|
|
12
12
|
//#region src/client.d.ts
|
|
13
|
-
declare function getInitialPageData<T = Record<string, unknown>>(): PageObject<T> | null;
|
|
13
|
+
export declare function getInitialPageData<T = Record<string, unknown>>(): PageObject<T> | null;
|
|
14
14
|
/**
|
|
15
15
|
* 从 DOM 中的 `<script id="__UBEAN_STATE__">` 读取 SSR 序列化的状态。
|
|
16
16
|
*
|
|
@@ -21,10 +21,10 @@ declare function getInitialPageData<T = Record<string, unknown>>(): PageObject<T
|
|
|
21
21
|
*
|
|
22
22
|
* @returns 解析后的状态对象,或 `null`(无状态 / 解析失败 / 非 DOM 环境)
|
|
23
23
|
*/
|
|
24
|
-
declare function getInitialState(): Record<string, unknown> | null;
|
|
24
|
+
export declare function getInitialState(): Record<string, unknown> | null;
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/head.d.ts
|
|
27
|
-
declare function useHeadInstance(): import("@unhead/vue").VueHeadClient;
|
|
27
|
+
export declare function useHeadInstance(): import("@unhead/vue").VueHeadClient;
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region src/composables.d.ts
|
|
30
30
|
interface UbeanVueContext {
|
|
@@ -45,7 +45,7 @@ interface DataCacheStore {
|
|
|
45
45
|
subscribe: (fn: () => void) => () => void;
|
|
46
46
|
getTimestamp: (key: string | symbol) => number | undefined;
|
|
47
47
|
}
|
|
48
|
-
declare function createDataCacheStore(): DataCacheStore;
|
|
48
|
+
export declare function createDataCacheStore(): DataCacheStore;
|
|
49
49
|
interface UseAsyncDataOptions$1<T> {
|
|
50
50
|
key?: string;
|
|
51
51
|
tags?: string[];
|
|
@@ -67,20 +67,20 @@ interface UseAsyncDataReturn<T> {
|
|
|
67
67
|
refresh: () => Promise<void>;
|
|
68
68
|
invalidate: () => void;
|
|
69
69
|
}
|
|
70
|
-
declare function createUseAsyncData(store: DataCacheStore): <T = unknown>(keyOrFetcher: string | (() => Promise<T>), fetcherOrOptions?: (() => Promise<T>) | UseAsyncDataOptions$1<T>, options?: UseAsyncDataOptions$1<T>) => UseAsyncDataReturn<T>;
|
|
71
|
-
declare function invalidateCache(store: DataCacheStore, keyOrTag: string): number;
|
|
72
|
-
declare function clearCache(store: DataCacheStore): void;
|
|
73
|
-
declare function defineDataKey(key: string): symbol;
|
|
74
|
-
declare function createLinkHandler(ctx: UbeanVueContext): {
|
|
70
|
+
export declare function createUseAsyncData(store: DataCacheStore): <T = unknown>(keyOrFetcher: string | (() => Promise<T>), fetcherOrOptions?: (() => Promise<T>) | UseAsyncDataOptions$1<T>, options?: UseAsyncDataOptions$1<T>) => UseAsyncDataReturn<T>;
|
|
71
|
+
export declare function invalidateCache(store: DataCacheStore, keyOrTag: string): number;
|
|
72
|
+
export declare function clearCache(store: DataCacheStore): void;
|
|
73
|
+
export declare function defineDataKey(key: string): symbol;
|
|
74
|
+
export declare function createLinkHandler(ctx: UbeanVueContext): {
|
|
75
75
|
getProps: () => {};
|
|
76
76
|
navigate(href: string, opts?: {
|
|
77
77
|
replace?: boolean;
|
|
78
78
|
}): Promise<void>;
|
|
79
79
|
prefetch(_href: string): Promise<void>;
|
|
80
80
|
};
|
|
81
|
-
declare function extractPageData<T = Record<string, unknown>>(): PageObject<T> | null;
|
|
82
|
-
declare function useServerData<T>(fetcher: () => Promise<T>): Promise<T>;
|
|
83
|
-
declare function getInvalidatedKeysForAction(actionName: string, invalidationMap: Record<string, Array<string | symbol>>, store: DataCacheStore): number;
|
|
81
|
+
export declare function extractPageData<T = Record<string, unknown>>(): PageObject<T> | null;
|
|
82
|
+
export declare function useServerData<T>(fetcher: () => Promise<T>): Promise<T>;
|
|
83
|
+
export declare function getInvalidatedKeysForAction(actionName: string, invalidationMap: Record<string, Array<string | symbol>>, store: DataCacheStore): number;
|
|
84
84
|
//#endregion
|
|
85
85
|
//#region src/i18n.d.ts
|
|
86
86
|
type LocaleMessages = Record<string, unknown>;
|
|
@@ -120,40 +120,47 @@ interface HydratedLocalePayload {
|
|
|
120
120
|
isDefault?: boolean;
|
|
121
121
|
}>;
|
|
122
122
|
}
|
|
123
|
-
declare function configureI18nRuntime(options: {
|
|
123
|
+
export declare function configureI18nRuntime(options: {
|
|
124
124
|
config: I18nRuntimeConfig;
|
|
125
125
|
loadLocale?: LocaleLoader;
|
|
126
126
|
locales?: HydratedLocalePayload['locales'];
|
|
127
127
|
}): void;
|
|
128
|
-
declare function getI18nRuntimeConfig(): I18nRuntimeConfig | null;
|
|
129
|
-
declare function createUbeanI18n(options?: {
|
|
128
|
+
export declare function getI18nRuntimeConfig(): I18nRuntimeConfig | null;
|
|
129
|
+
export declare function createUbeanI18n(options?: {
|
|
130
130
|
locale?: string;
|
|
131
131
|
fallbackLocale?: string;
|
|
132
132
|
messages?: Record<string, LocaleMessages>;
|
|
133
133
|
vueI18n?: Record<string, unknown>;
|
|
134
134
|
}): I18n;
|
|
135
|
-
declare function installUbeanI18n(app: App, i18n: I18n): void;
|
|
135
|
+
export declare function installUbeanI18n(app: App, i18n: I18n): void;
|
|
136
136
|
/**
|
|
137
137
|
* Framework setLocale: load messages, switch composer locale, write cookie,
|
|
138
138
|
* navigate to the localized path (`no_prefix` skips navigation).
|
|
139
139
|
*
|
|
140
|
+
* Server-side (no `window`) the navigation is skipped: the render URL is the
|
|
141
|
+
* source of truth during SSR/SSG, and `router.replace` on the shared
|
|
142
|
+
* memory-history router — often a stale instance from a previous render —
|
|
143
|
+
* cancels in-flight initial navigations. Combined with a navigation guard
|
|
144
|
+
* calling `setLocale`, this used to create a self-sustaining replace loop
|
|
145
|
+
* that starved the event loop (docs SSG build hang, 2026-09-10).
|
|
146
|
+
*
|
|
140
147
|
* Uses the runtime bound by `bindI18nRuntime` (not Vue composables) so it is
|
|
141
148
|
* safe to call from click handlers.
|
|
142
149
|
*/
|
|
143
|
-
declare function setLocale(code: string): Promise<void>;
|
|
144
|
-
declare function getLocale(): string;
|
|
145
|
-
declare function localizePath(path: string, locale?: string): string;
|
|
146
|
-
declare function switchLocalePath(locale: string, path?: string): string;
|
|
147
|
-
declare function extractLocaleFromPath(path: string): {
|
|
150
|
+
export declare function setLocale(code: string): Promise<void>;
|
|
151
|
+
export declare function getLocale(): string;
|
|
152
|
+
export declare function localizePath(path: string, locale?: string): string;
|
|
153
|
+
export declare function switchLocalePath(locale: string, path?: string): string;
|
|
154
|
+
export declare function extractLocaleFromPath(path: string): {
|
|
148
155
|
locale: string | null;
|
|
149
156
|
pathWithoutLocale: string;
|
|
150
157
|
};
|
|
151
|
-
declare function useLocalePath(): (path: string, locale?: string) => string;
|
|
152
|
-
declare function useSwitchLocalePath(): (locale: string) => string;
|
|
153
|
-
declare function useLocaleRoute(): (path: string, locale?: string) => string;
|
|
154
|
-
declare function useLocaleHead(): ComputedRef<ReturnType<typeof buildLocaleHead>>;
|
|
158
|
+
export declare function useLocalePath(): (path: string, locale?: string) => string;
|
|
159
|
+
export declare function useSwitchLocalePath(): (locale: string) => string;
|
|
160
|
+
export declare function useLocaleRoute(): (path: string, locale?: string) => string;
|
|
161
|
+
export declare function useLocaleHead(): ComputedRef<ReturnType<typeof buildLocaleHead>>;
|
|
155
162
|
/** Hydrate routing config from SSR payload before the first render. */
|
|
156
|
-
declare function initClientI18n(): void;
|
|
163
|
+
export declare function initClientI18n(): void;
|
|
157
164
|
//#endregion
|
|
158
165
|
//#region src/color-mode.d.ts
|
|
159
166
|
interface ColorModeConfig {
|
|
@@ -193,7 +200,7 @@ interface ColorMode {
|
|
|
193
200
|
toggle: () => void;
|
|
194
201
|
}
|
|
195
202
|
/** Merge user config with defaults. */
|
|
196
|
-
declare function resolveColorModeConfig(config?: Partial<ColorModeConfig>): ColorModeConfig;
|
|
203
|
+
export declare function resolveColorModeConfig(config?: Partial<ColorModeConfig>): ColorModeConfig;
|
|
197
204
|
/**
|
|
198
205
|
* Generate the no-FOUC inline script that resolves the color mode and sets
|
|
199
206
|
* the `<html>` class/attribute **before** the page renders.
|
|
@@ -206,11 +213,11 @@ declare function resolveColorModeConfig(config?: Partial<ColorModeConfig>): Colo
|
|
|
206
213
|
*
|
|
207
214
|
* This script is injected into `<head>` and runs synchronously.
|
|
208
215
|
*/
|
|
209
|
-
declare function getColorModeScript(config: ColorModeConfig): string;
|
|
216
|
+
export declare function getColorModeScript(config: ColorModeConfig): string;
|
|
210
217
|
/** Configure the color mode module (called once during app initialization). */
|
|
211
|
-
declare function configureColorMode(config?: Partial<ColorModeConfig>): ColorModeConfig;
|
|
218
|
+
export declare function configureColorMode(config?: Partial<ColorModeConfig>): ColorModeConfig;
|
|
212
219
|
/** Get the current color mode config. */
|
|
213
|
-
declare function getColorModeConfig(): ColorModeConfig;
|
|
220
|
+
export declare function getColorModeConfig(): ColorModeConfig;
|
|
214
221
|
/**
|
|
215
222
|
* Reactively access and control the color mode.
|
|
216
223
|
*
|
|
@@ -230,21 +237,21 @@ declare function getColorModeConfig(): ColorModeConfig;
|
|
|
230
237
|
* colorMode.toggle(); // cycles: light → dark → light
|
|
231
238
|
* ```
|
|
232
239
|
*/
|
|
233
|
-
declare function useColorMode(): ColorMode;
|
|
240
|
+
export declare function useColorMode(): ColorMode;
|
|
234
241
|
/**
|
|
235
242
|
* Force a color mode (e.g. from route meta `colorMode: 'dark'`).
|
|
236
243
|
* When forced, user changes are ignored until `unforceColorMode()` is called.
|
|
237
244
|
*/
|
|
238
|
-
declare function forceColorMode(mode: string): void;
|
|
245
|
+
export declare function forceColorMode(mode: string): void;
|
|
239
246
|
/**
|
|
240
247
|
* Remove the forced color mode, returning to user preference.
|
|
241
248
|
*/
|
|
242
|
-
declare function unforceColorMode(): void;
|
|
249
|
+
export declare function unforceColorMode(): void;
|
|
243
250
|
/**
|
|
244
251
|
* Reset the color mode module state (for testing).
|
|
245
252
|
* @internal
|
|
246
253
|
*/
|
|
247
|
-
declare function _resetColorMode(): void;
|
|
254
|
+
export declare function _resetColorMode(): void;
|
|
248
255
|
//#endregion
|
|
249
256
|
//#region src/party-town.d.ts
|
|
250
257
|
interface PartyTownConfig {
|
|
@@ -271,7 +278,7 @@ interface PartyTownConfig {
|
|
|
271
278
|
nonBlocking: boolean;
|
|
272
279
|
}
|
|
273
280
|
/** Merge user config with defaults. */
|
|
274
|
-
declare function resolvePartyTownConfig(config?: Partial<PartyTownConfig>): PartyTownConfig;
|
|
281
|
+
export declare function resolvePartyTownConfig(config?: Partial<PartyTownConfig>): PartyTownConfig;
|
|
275
282
|
/**
|
|
276
283
|
* Generate the inline Partytown config script for `<head>`.
|
|
277
284
|
*
|
|
@@ -281,12 +288,12 @@ declare function resolvePartyTownConfig(config?: Partial<PartyTownConfig>): Part
|
|
|
281
288
|
*
|
|
282
289
|
* Returns an empty string if Partytown is not enabled.
|
|
283
290
|
*/
|
|
284
|
-
declare function getPartyTownScript(config: PartyTownConfig): string;
|
|
291
|
+
export declare function getPartyTownScript(config: PartyTownConfig): string;
|
|
285
292
|
/**
|
|
286
293
|
* Generate the full HTML for Partytown initialization.
|
|
287
294
|
* Used by the Vite plugin to inject into `<head>`.
|
|
288
295
|
*/
|
|
289
|
-
declare function getPartyTownHeadContent(config: PartyTownConfig): string;
|
|
296
|
+
export declare function getPartyTownHeadContent(config: PartyTownConfig): string;
|
|
290
297
|
type ScriptTrigger = 'load' | 'idle' | 'visible' | 'manual';
|
|
291
298
|
interface UseScriptOptions {
|
|
292
299
|
/** When to load the script (default: 'load'). */
|
|
@@ -355,15 +362,15 @@ interface UseScriptReturn {
|
|
|
355
362
|
* useScript('/analytics.js', { trigger: 'visible', target: targetRef });
|
|
356
363
|
* ```
|
|
357
364
|
*/
|
|
358
|
-
declare function useScript(src: string, options?: UseScriptOptions): UseScriptReturn;
|
|
365
|
+
export declare function useScript(src: string, options?: UseScriptOptions): UseScriptReturn;
|
|
359
366
|
/** Configure the Partytown module globally. */
|
|
360
|
-
declare function configurePartyTown(config?: Partial<PartyTownConfig>): PartyTownConfig;
|
|
367
|
+
export declare function configurePartyTown(config?: Partial<PartyTownConfig>): PartyTownConfig;
|
|
361
368
|
/** Get the current Partytown config. */
|
|
362
|
-
declare function getPartyTownConfig(): PartyTownConfig;
|
|
369
|
+
export declare function getPartyTownConfig(): PartyTownConfig;
|
|
363
370
|
/** Check if Partytown is enabled. */
|
|
364
|
-
declare function isPartyTownEnabled(): boolean;
|
|
371
|
+
export declare function isPartyTownEnabled(): boolean;
|
|
365
372
|
/** Reset Partytown module state (for testing). @internal */
|
|
366
|
-
declare function _resetPartyTown(): void;
|
|
373
|
+
export declare function _resetPartyTown(): void;
|
|
367
374
|
//#endregion
|
|
368
375
|
//#region src/search.d.ts
|
|
369
376
|
/** A single search result from Pagefind. */
|
|
@@ -435,11 +442,11 @@ interface SearchRuntimeConfig {
|
|
|
435
442
|
* Configure the search runtime globally. Call this in `app.ts` (client-side)
|
|
436
443
|
* to override defaults before any `useSearch()` call.
|
|
437
444
|
*/
|
|
438
|
-
declare function configureSearch(config: Partial<SearchRuntimeConfig>): void;
|
|
445
|
+
export declare function configureSearch(config: Partial<SearchRuntimeConfig>): void;
|
|
439
446
|
/** Get the current runtime search config. */
|
|
440
|
-
declare function getSearchConfig(): SearchRuntimeConfig;
|
|
447
|
+
export declare function getSearchConfig(): SearchRuntimeConfig;
|
|
441
448
|
/** Resolve a user-provided config object into a full SearchRuntimeConfig. */
|
|
442
|
-
declare function resolveSearchConfig(config?: Partial<SearchRuntimeConfig> | true): SearchRuntimeConfig;
|
|
449
|
+
export declare function resolveSearchConfig(config?: Partial<SearchRuntimeConfig> | true): SearchRuntimeConfig;
|
|
443
450
|
/** The loaded Pagefind browser module (cached after first load). */
|
|
444
451
|
type PagefindModule = any;
|
|
445
452
|
/**
|
|
@@ -449,18 +456,18 @@ type PagefindModule = any;
|
|
|
449
456
|
* served at `/pagefind/pagefind-modern.js`. In dev mode or when Pagefind is
|
|
450
457
|
* not enabled, the import will fail — callers should catch and show a message.
|
|
451
458
|
*/
|
|
452
|
-
declare function initPagefind(options?: {
|
|
459
|
+
export declare function initPagefind(options?: {
|
|
453
460
|
pagefindPath?: string;
|
|
454
461
|
}): Promise<PagefindModule>;
|
|
455
462
|
/** Check whether the Pagefind browser library has been loaded. */
|
|
456
|
-
declare function isPagefindLoaded(): boolean;
|
|
463
|
+
export declare function isPagefindLoaded(): boolean;
|
|
457
464
|
/**
|
|
458
465
|
* Execute a raw Pagefind search. Returns normalized `SearchResult[]`.
|
|
459
466
|
*
|
|
460
467
|
* Exposed for advanced use cases where the reactive composable is not needed
|
|
461
468
|
* (e.g. server-side API routes that proxy search requests).
|
|
462
469
|
*/
|
|
463
|
-
declare function executeSearch(query: string, options?: {
|
|
470
|
+
export declare function executeSearch(query: string, options?: {
|
|
464
471
|
filters?: SearchFilters;
|
|
465
472
|
limit?: number;
|
|
466
473
|
pagefindPath?: string;
|
|
@@ -494,9 +501,9 @@ declare function executeSearch(query: string, options?: {
|
|
|
494
501
|
* </template>
|
|
495
502
|
* ```
|
|
496
503
|
*/
|
|
497
|
-
declare function useSearch(options?: UseSearchOptions): UseSearchReturn;
|
|
504
|
+
export declare function useSearch(options?: UseSearchOptions): UseSearchReturn;
|
|
498
505
|
/** Reset all internal state (for unit tests only). */
|
|
499
|
-
declare function _resetSearch(): void;
|
|
506
|
+
export declare function _resetSearch(): void;
|
|
500
507
|
/**
|
|
501
508
|
* Inject a mock Pagefind module for testing.
|
|
502
509
|
*
|
|
@@ -504,6 +511,6 @@ declare function _resetSearch(): void;
|
|
|
504
511
|
* results without a real Pagefind build. Also calls `mock.init()` to mimic
|
|
505
512
|
* the real library's initialization.
|
|
506
513
|
*/
|
|
507
|
-
declare function _setPagefindMock(mock: any): void;
|
|
514
|
+
export declare function _setPagefindMock(mock: any): void;
|
|
508
515
|
//#endregion
|
|
509
|
-
export { type AppPluginConfig, type ColorMode, type ColorModeConfig, type CreateUbeanRouterOptions, type DataCacheStore, type DataResult, type DefineAppOptions, ERROR_KEY, ErrorBoundary, Head, type HydrateIslandsOptions, type I18nRuntimeConfig, type IslandHydrateOptions, type IslandHydrationScheduler, type IslandRecord, LAYOUT_CHAIN_KEY, LOADING_KEY, LOCALIZE_PATH_KEY, type LayoutChainContext, LayoutChainRenderer, Link, type LinkProps, type LinkTag, type LocaleLoader, type LocaleMessages, type MetaTag, PAGE_KEY, PageView, type PartyTownConfig, type ResolvedAppConfig, type RouteLocation, type RouteLocationRaw, SSR_KEY, type ScriptTrigger, type SearchFilters, type SearchResult, type SearchRuntimeConfig, type SeoMetadata, SlotView, TRANSITION_KEY, type TypedLinkProps, type UbeanAppInstance, type UbeanAppOptions, type UbeanVueContext, type UbeanVueOptions, type UbeanVuePage, type UbeanVuePageData, type UseAsyncDataOptions, type UseAsyncDataReturn, type UseCacheViewsReturn, type UseFetchOptions, type UsePageTransitionReturn, type UseReloadSignalReturn, type UseScriptOptions, type UseScriptReturn, type UseSearchOptions, type UseSearchReturn, type ViewTransitionOptions,
|
|
516
|
+
export { type AppPluginConfig, ClientOnly, type ClientOnlyProps, type ClientOnlySlots, type ColorMode, type ColorModeConfig, type CreateUbeanRouterOptions, type DataCacheStore, type DataResult, type DefineAppOptions, ERROR_KEY, ErrorBoundary, Head, type HydrateIslandsOptions, type I18nRuntimeConfig, type IslandHydrateOptions, type IslandHydrationScheduler, type IslandRecord, LAYOUT_CHAIN_KEY, LOADING_KEY, LOCALIZE_PATH_KEY, type LayoutChainContext, LayoutChainRenderer, Link, type LinkProps, type LinkTag, type LocaleLoader, type LocaleMessages, type MetaTag, PAGE_KEY, PageView, type PartyTownConfig, type ResolvedAppConfig, type RouteLocation, type RouteLocationRaw, SSR_KEY, type ScriptTrigger, type SearchFilters, type SearchResult, type SearchRuntimeConfig, type SeoMetadata, SlotView, TRANSITION_KEY, type TypedLinkProps, type UbeanAppInstance, type UbeanAppOptions, type UbeanVueContext, type UbeanVueOptions, type UbeanVuePage, type UbeanVuePageData, type UseAsyncDataOptions, type UseAsyncDataReturn, type UseCacheViewsReturn, type UseFetchOptions, type UsePageTransitionReturn, type UseReloadSignalReturn, type UseScriptOptions, type UseScriptReturn, type UseSearchOptions, type UseSearchReturn, type ViewTransitionOptions, applyAppConfig, clearPageTransition, collectIslands, createClientHead, createDefaultAppConfig, createUbeanClientApp, createUbeanRouter, createUbeanSSRApp, defineApp, defineMeta, defineMiddleware, definePage, disablePageCache, enablePageCache, excludePageCache, getCacheEnabled, getCachedViewNames, getExcludedViewNames, getNamedPageWrapper, getNavigationType, getPageTransitionName, getReloadCounter, hasPendingIslands, hydrateIsland, hydrateIslands, includePageCache, initCachedViewsFromRoutes, invalidateData, invalidatePageCache, isActiveRoute, isCacheEnabled, isPageCached, isPageExcluded, isReloading, mergeAppConfig, reloadPage, resetNamedPageWrappers, resetRouteCache, resolveRoute, scheduleIslandHydration, setDefaultFetch, setPageTransition, supportsViewTransitions, ubeanVue, useAsyncData, useCacheViews, useData, useFetch, useUnheadHead as useHead, usePage, usePageTransition, useReloadSignal, useSeoMeta, useViewTransition, useViewTransitionState, withViewTransition };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { a as getI18nRuntimeConfig, c as installUbeanI18n, d as switchLocalePath, f as useLocaleHead, h as useSwitchLocalePath, i as extractLocaleFromPath, l as localizePath, m as useLocaleRoute, n as configureI18nRuntime, o as getLocale, p as useLocalePath, r as createUbeanI18n, s as initClientI18n, u as setLocale } from "./i18n-
|
|
1
|
+
import { C as createUbeanRouter, S as definePage, _ as useSeoMeta, b as defineMeta, h as createUbeanSSRApp, m as createUbeanClientApp, r as Head, v as useUnheadHead, w as usePage, x as defineMiddleware } from "./app-C5YuXGJl.js";
|
|
2
|
+
import { a as getI18nRuntimeConfig, c as installUbeanI18n, d as switchLocalePath, f as useLocaleHead, h as useSwitchLocalePath, i as extractLocaleFromPath, l as localizePath, m as useLocaleRoute, n as configureI18nRuntime, o as getLocale, p as useLocalePath, r as createUbeanI18n, s as initClientI18n, u as setLocale } from "./i18n-DPOzFBuG.js";
|
|
3
3
|
import { applyAppConfig, createDefaultAppConfig, defineApp, mergeAppConfig } from "./define-app.js";
|
|
4
4
|
import { computed, getCurrentInstance, markRaw, onMounted, onScopeDispose, onUnmounted, ref, shallowRef, watch } from "vue";
|
|
5
|
-
import { ERROR_KEY, ErrorBoundary, LAYOUT_CHAIN_KEY, LOADING_KEY, LOCALIZE_PATH_KEY, LayoutChainRenderer, Link, PAGE_KEY, PageView, SSR_KEY, SlotView, TRANSITION_KEY, clearPageTransition, disablePageCache, enablePageCache, excludePageCache, getCacheEnabled, getCachedViewNames, getExcludedViewNames, getNamedPageWrapper, getNavigationType, getPageTransitionName, getReloadCounter, includePageCache, initCachedViewsFromRoutes, invalidatePageCache, isActiveRoute, isCacheEnabled, isPageCached, isPageExcluded, isReloading, reloadPage, resetNamedPageWrappers, resetRouteCache, resolveRoute, setPageTransition, supportsViewTransitions, ubeanVue, useCacheViews, usePageTransition, useReloadSignal, useViewTransition, useViewTransitionState, withViewTransition } from "@ubean/vue";
|
|
5
|
+
import { ClientOnly, ERROR_KEY, ErrorBoundary, LAYOUT_CHAIN_KEY, LOADING_KEY, LOCALIZE_PATH_KEY, LayoutChainRenderer, Link, PAGE_KEY, PageView, SSR_KEY, SlotView, TRANSITION_KEY, clearPageTransition, disablePageCache, enablePageCache, excludePageCache, getCacheEnabled, getCachedViewNames, getExcludedViewNames, getNamedPageWrapper, getNavigationType, getPageTransitionName, getReloadCounter, includePageCache, initCachedViewsFromRoutes, invalidatePageCache, isActiveRoute, isCacheEnabled, isPageCached, isPageExcluded, isReloading, reloadPage, resetNamedPageWrappers, resetRouteCache, resolveRoute, setPageTransition, supportsViewTransitions, ubeanVue, useCacheViews, usePageTransition, useReloadSignal, useViewTransition, useViewTransitionState, withViewTransition } from "@ubean/vue";
|
|
6
6
|
import { injectHead } from "@unhead/vue";
|
|
7
7
|
import { createHead as createClientHead } from "@unhead/vue/client";
|
|
8
8
|
import { defineDataKey as defineDataKey$1, invalidateData, setDefaultFetch, useAsyncData, useData, useFetch } from "@ubean/pages";
|
|
@@ -1021,4 +1021,4 @@ function _setPagefindMock(mock) {
|
|
|
1021
1021
|
pagefindPromise = Promise.resolve(mock);
|
|
1022
1022
|
}
|
|
1023
1023
|
//#endregion
|
|
1024
|
-
export { ERROR_KEY, ErrorBoundary, Head, LAYOUT_CHAIN_KEY, LOADING_KEY, LOCALIZE_PATH_KEY, LayoutChainRenderer, Link, PAGE_KEY, PageView, SSR_KEY, SlotView, TRANSITION_KEY, _resetColorMode, _resetPartyTown, _resetSearch, _setPagefindMock, applyAppConfig, clearCache, clearPageTransition, collectIslands, configureColorMode, configureI18nRuntime, configurePartyTown, configureSearch, createClientHead, createDataCacheStore, createDefaultAppConfig, createLinkHandler, createUbeanClientApp, createUbeanI18n, createUbeanRouter, createUbeanSSRApp, createUseAsyncData, defineApp, defineDataKey, defineMeta, defineMiddleware, definePage, disablePageCache, enablePageCache, excludePageCache, executeSearch, extractLocaleFromPath, extractPageData, forceColorMode, getCacheEnabled, getCachedViewNames, getColorModeConfig, getColorModeScript, getExcludedViewNames, getI18nRuntimeConfig, getInitialPageData, getInitialState, getInvalidatedKeysForAction, getLocale, getNamedPageWrapper, getNavigationType, getPageTransitionName, getPartyTownConfig, getPartyTownHeadContent, getPartyTownScript, getReloadCounter, getSearchConfig, hasPendingIslands, hydrateIsland, hydrateIslands, includePageCache, initCachedViewsFromRoutes, initClientI18n, initPagefind, installUbeanI18n, invalidateCache, invalidateData, invalidatePageCache, isActiveRoute, isCacheEnabled, isPageCached, isPageExcluded, isPagefindLoaded, isPartyTownEnabled, isReloading, localizePath, mergeAppConfig, reloadPage, resetNamedPageWrappers, resetRouteCache, resolveColorModeConfig, resolvePartyTownConfig, resolveRoute, resolveSearchConfig, scheduleIslandHydration, setDefaultFetch, setLocale, setPageTransition, supportsViewTransitions, switchLocalePath, ubeanVue, unforceColorMode, useAsyncData, useCacheViews, useColorMode, useData, useFetch, useUnheadHead as useHead, useHeadInstance, useLocaleHead, useLocalePath, useLocaleRoute, usePage, usePageTransition, useReloadSignal, useScript, useSearch, useSeoMeta, useServerData, useSwitchLocalePath, useViewTransition, useViewTransitionState, withViewTransition };
|
|
1024
|
+
export { ClientOnly, ERROR_KEY, ErrorBoundary, Head, LAYOUT_CHAIN_KEY, LOADING_KEY, LOCALIZE_PATH_KEY, LayoutChainRenderer, Link, PAGE_KEY, PageView, SSR_KEY, SlotView, TRANSITION_KEY, _resetColorMode, _resetPartyTown, _resetSearch, _setPagefindMock, applyAppConfig, clearCache, clearPageTransition, collectIslands, configureColorMode, configureI18nRuntime, configurePartyTown, configureSearch, createClientHead, createDataCacheStore, createDefaultAppConfig, createLinkHandler, createUbeanClientApp, createUbeanI18n, createUbeanRouter, createUbeanSSRApp, createUseAsyncData, defineApp, defineDataKey, defineMeta, defineMiddleware, definePage, disablePageCache, enablePageCache, excludePageCache, executeSearch, extractLocaleFromPath, extractPageData, forceColorMode, getCacheEnabled, getCachedViewNames, getColorModeConfig, getColorModeScript, getExcludedViewNames, getI18nRuntimeConfig, getInitialPageData, getInitialState, getInvalidatedKeysForAction, getLocale, getNamedPageWrapper, getNavigationType, getPageTransitionName, getPartyTownConfig, getPartyTownHeadContent, getPartyTownScript, getReloadCounter, getSearchConfig, hasPendingIslands, hydrateIsland, hydrateIslands, includePageCache, initCachedViewsFromRoutes, initClientI18n, initPagefind, installUbeanI18n, invalidateCache, invalidateData, invalidatePageCache, isActiveRoute, isCacheEnabled, isPageCached, isPageExcluded, isPagefindLoaded, isPartyTownEnabled, isReloading, localizePath, mergeAppConfig, reloadPage, resetNamedPageWrappers, resetRouteCache, resolveColorModeConfig, resolvePartyTownConfig, resolveRoute, resolveSearchConfig, scheduleIslandHydration, setDefaultFetch, setLocale, setPageTransition, supportsViewTransitions, switchLocalePath, ubeanVue, unforceColorMode, useAsyncData, useCacheViews, useColorMode, useData, useFetch, useUnheadHead as useHead, useHeadInstance, useLocaleHead, useLocalePath, useLocaleRoute, usePage, usePageTransition, useReloadSignal, useScript, useSearch, useSeoMeta, useServerData, useSwitchLocalePath, useViewTransition, useViewTransitionState, withViewTransition };
|
package/dist/server.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as
|
|
1
|
+
import { A as createUbeanRouter, C as useViewTransition, D as UbeanVuePage, E as definePage, O as usePage, S as useUnheadHead, T as defineMiddleware, _ as UbeanVueOptions, a as LOADING_KEY, b as ubeanVue, c as LayoutChainRenderer, d as PageView, f as SSR_KEY, g as UbeanAppOptions, h as UbeanAppInstance, i as LAYOUT_CHAIN_KEY, k as CreateUbeanRouterOptions, l as Link, m as TRANSITION_KEY, n as ERROR_KEY, o as LOCALIZE_PATH_KEY, p as SlotView, r as Head, s as LayoutChainContext, t as ClientOnly, u as PAGE_KEY, v as createUbeanClientApp, w as defineMeta, x as useSeoMeta, y as createUbeanSSRApp } from "./app-Busq_M7n.js";
|
|
2
2
|
import { createHead as createServerHead } from "@unhead/vue/server";
|
|
3
|
-
export { type CreateUbeanRouterOptions, ERROR_KEY, Head, LAYOUT_CHAIN_KEY, LOADING_KEY, LOCALIZE_PATH_KEY, type LayoutChainContext, LayoutChainRenderer, Link, PAGE_KEY, PageView, SSR_KEY, SlotView, TRANSITION_KEY, UbeanAppInstance, UbeanAppOptions, type UbeanVueOptions, type UbeanVuePage, createServerHead, createUbeanClientApp, createUbeanRouter, createUbeanSSRApp, defineMeta, defineMiddleware, definePage, ubeanVue, useUnheadHead as useHead, usePage, useSeoMeta, useViewTransition };
|
|
3
|
+
export { ClientOnly, type CreateUbeanRouterOptions, ERROR_KEY, Head, LAYOUT_CHAIN_KEY, LOADING_KEY, LOCALIZE_PATH_KEY, type LayoutChainContext, LayoutChainRenderer, Link, PAGE_KEY, PageView, SSR_KEY, SlotView, TRANSITION_KEY, UbeanAppInstance, UbeanAppOptions, type UbeanVueOptions, type UbeanVuePage, createServerHead, createUbeanClientApp, createUbeanRouter, createUbeanSSRApp, defineMeta, defineMiddleware, definePage, ubeanVue, useUnheadHead as useHead, usePage, useSeoMeta, useViewTransition };
|
package/dist/server.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as
|
|
1
|
+
import { C as createUbeanRouter, S as definePage, _ as useSeoMeta, a as LOADING_KEY, b as defineMeta, c as Link, d as SSR_KEY, f as SlotView, g as ubeanVue, h as createUbeanSSRApp, i as LAYOUT_CHAIN_KEY, l as PAGE_KEY, m as createUbeanClientApp, n as ERROR_KEY, o as LOCALIZE_PATH_KEY, p as TRANSITION_KEY, r as Head, s as LayoutChainRenderer, t as ClientOnly, u as PageView, v as useUnheadHead, w as usePage, x as defineMiddleware, y as useViewTransition } from "./app-C5YuXGJl.js";
|
|
2
2
|
import { createHead as createServerHead } from "@unhead/vue/server";
|
|
3
|
-
export { ERROR_KEY, Head, LAYOUT_CHAIN_KEY, LOADING_KEY, LOCALIZE_PATH_KEY, LayoutChainRenderer, Link, PAGE_KEY, PageView, SSR_KEY, SlotView, TRANSITION_KEY, createServerHead, createUbeanClientApp, createUbeanRouter, createUbeanSSRApp, defineMeta, defineMiddleware, definePage, ubeanVue, useUnheadHead as useHead, usePage, useSeoMeta, useViewTransition };
|
|
3
|
+
export { ClientOnly, ERROR_KEY, Head, LAYOUT_CHAIN_KEY, LOADING_KEY, LOCALIZE_PATH_KEY, LayoutChainRenderer, Link, PAGE_KEY, PageView, SSR_KEY, SlotView, TRANSITION_KEY, createServerHead, createUbeanClientApp, createUbeanRouter, createUbeanSSRApp, defineMeta, defineMiddleware, definePage, ubeanVue, useUnheadHead as useHead, usePage, useSeoMeta, useViewTransition };
|
package/dist/ssr.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Component } from "vue";
|
|
|
3
3
|
import { RouteRecordRaw } from "vue-router";
|
|
4
4
|
import { PageRenderer } from "@ubean/pages";
|
|
5
5
|
//#region src/ssr.d.ts
|
|
6
|
-
interface VueRendererSimpleOptions {
|
|
6
|
+
export interface VueRendererSimpleOptions {
|
|
7
7
|
resolvePageComponent: (path: string) => Promise<Component | null>;
|
|
8
8
|
resolveLayoutComponent: (name: string | false | null | undefined) => Promise<Component | null>;
|
|
9
9
|
defaultLayout?: string | null;
|
|
@@ -14,7 +14,7 @@ interface VueRendererSimpleOptions {
|
|
|
14
14
|
*/
|
|
15
15
|
resolveAppConfig?: () => ResolvedAppConfig | Promise<ResolvedAppConfig>;
|
|
16
16
|
}
|
|
17
|
-
interface VueRendererRouterOptions {
|
|
17
|
+
export interface VueRendererRouterOptions {
|
|
18
18
|
routes: RouteRecordRaw[];
|
|
19
19
|
resolveLayoutComponent: (name: string | false | null | undefined) => Promise<Component | null>;
|
|
20
20
|
defaultLayout?: string | null;
|
|
@@ -25,7 +25,6 @@ interface VueRendererRouterOptions {
|
|
|
25
25
|
*/
|
|
26
26
|
resolveAppConfig?: () => ResolvedAppConfig | Promise<ResolvedAppConfig>;
|
|
27
27
|
}
|
|
28
|
-
type VueRendererOptions = VueRendererSimpleOptions | VueRendererRouterOptions;
|
|
29
|
-
declare function createVueRenderer(options: VueRendererOptions): PageRenderer;
|
|
30
|
-
//#endregion
|
|
31
|
-
export { VueRendererOptions, VueRendererRouterOptions, VueRendererSimpleOptions, createVueRenderer };
|
|
28
|
+
export type VueRendererOptions = VueRendererSimpleOptions | VueRendererRouterOptions;
|
|
29
|
+
export declare function createVueRenderer(options: VueRendererOptions): PageRenderer;
|
|
30
|
+
//#endregion
|
package/dist/ssr.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as configureI18nRuntime, r as createUbeanI18n } from "./i18n-
|
|
1
|
+
import { n as configureI18nRuntime, r as createUbeanI18n } from "./i18n-DPOzFBuG.js";
|
|
2
2
|
import { applyAppConfig } from "./define-app.js";
|
|
3
3
|
import { createSSRApp, defineComponent, h, provide, reactive } from "vue";
|
|
4
4
|
import { SSR_CONTENT_MARKER, STATE_DATA_ID, STATE_MARKER, __clearDataPayload, __clearDeferred, __resolveDataPayload, __resolveDeferred, __serializeDataPayload, __serializeDeferred, safeJsonStringify } from "@ubean/pages";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ubean/client",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"description": "Framework client runtime for ubean — layered over the lean @ubean/vue kernel, adding app factories, unhead, i18n, data layer, islands hydration and SSR state helpers",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@ubean/i18n": "0.4.
|
|
36
|
-
"@ubean/islands": "0.4.
|
|
37
|
-
"@ubean/pages": "0.4.
|
|
38
|
-
"@ubean/shared": "0.4.
|
|
39
|
-
"@ubean/vue": "0.4.
|
|
35
|
+
"@ubean/i18n": "0.4.7",
|
|
36
|
+
"@ubean/islands": "0.4.7",
|
|
37
|
+
"@ubean/pages": "0.4.7",
|
|
38
|
+
"@ubean/shared": "0.4.7",
|
|
39
|
+
"@ubean/vue": "0.4.7",
|
|
40
40
|
"@unhead/vue": "^3.4.0",
|
|
41
41
|
"@vue/server-renderer": "^3.5.42",
|
|
42
42
|
"vue": "^3.5.42",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/node": "^26.5.0",
|
|
48
|
-
"typescript": "
|
|
49
|
-
"vite-plus": "0.3.
|
|
48
|
+
"typescript": "npm:typescript-native-bridge@latest",
|
|
49
|
+
"vite-plus": "0.3.1"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@ubean/seo": "0.4.
|
|
52
|
+
"@ubean/seo": "0.4.7"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"@ubean/seo": {
|