@vuepress/client 2.0.0-rc.25 → 2.0.0-rc.27
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.d.ts +4 -5
- package/dist/app.js +254 -322
- package/dist/chunk-pbuEa-1d.js +13 -0
- package/dist/constants-COBTj3zj.js +57 -0
- package/dist/index-CNztZIId.d.ts +117 -0
- package/dist/index.d.ts +184 -279
- package/dist/index.js +3 -83
- package/dist/setupDevtools-B3cgI7XH.js +64 -0
- package/dist/utils-_b2e7bpk.js +365 -0
- package/package.json +18 -22
- package/dist/chunk-MLKGABMK.js +0 -9
- package/dist/chunk-XZCIWC7J.js +0 -66
- package/dist/chunk-YWDQ52BP.js +0 -459
- package/dist/createVueAppFunction-onJTVJru.d.ts +0 -9
- package/dist/setupDevtools-QXEOFQJV.js +0 -91
package/dist/index.d.ts
CHANGED
|
@@ -1,141 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { Router } from 'vue-router';
|
|
6
|
-
export { RouteLocationNormalizedLoaded, Router, useRoute, useRouter } from 'vue-router';
|
|
7
|
-
export { C as CreateVueAppFunction } from './createVueAppFunction-onJTVJru.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Name of the default layout
|
|
11
|
-
*/
|
|
12
|
-
declare const LAYOUT_NAME_DEFAULT = "Layout";
|
|
13
|
-
/**
|
|
14
|
-
* Name of the 404 page layout
|
|
15
|
-
*/
|
|
16
|
-
declare const LAYOUT_NAME_NOT_FOUND = "NotFound";
|
|
17
|
-
|
|
18
|
-
interface PageChunk {
|
|
19
|
-
comp: Component;
|
|
20
|
-
data: PageData;
|
|
21
|
-
}
|
|
22
|
-
type RouteMeta = Record<string, unknown>;
|
|
23
|
-
interface Route<T extends RouteMeta = RouteMeta> {
|
|
24
|
-
loader: () => Promise<PageChunk>;
|
|
25
|
-
meta: T;
|
|
26
|
-
}
|
|
27
|
-
type Redirects = Record<string, string>;
|
|
28
|
-
type Routes = Record<string, Route>;
|
|
29
|
-
|
|
30
|
-
interface Layouts {
|
|
31
|
-
[LAYOUT_NAME_DEFAULT]: Component;
|
|
32
|
-
[LAYOUT_NAME_NOT_FOUND]: Component;
|
|
33
|
-
[key: string]: Component;
|
|
34
|
-
}
|
|
35
|
-
type PageComponent = Component;
|
|
36
|
-
type PageHead = HeadConfig[];
|
|
37
|
-
type PageHeadTitle = string;
|
|
38
|
-
type PageLang = string;
|
|
39
|
-
type PageLayout = Component;
|
|
40
|
-
type RoutePath = string;
|
|
41
|
-
type RouteLocale = string;
|
|
42
|
-
type LayoutsRef = ComputedRef<Layouts>;
|
|
43
|
-
type PageComponentRef = ComputedRef<PageComponent>;
|
|
44
|
-
type PageDataRef<T extends Record<string, unknown> = Record<string, unknown>> = ComputedRef<PageData<T>>;
|
|
45
|
-
type PageFrontmatterRef<T extends Record<string, unknown> = Record<string, unknown>> = ComputedRef<PageFrontmatter<T>>;
|
|
46
|
-
type PageHeadRef = ComputedRef<PageHead>;
|
|
47
|
-
type PageHeadTitleRef = ComputedRef<PageHeadTitle>;
|
|
48
|
-
type PageLangRef = ComputedRef<PageLang>;
|
|
49
|
-
type PageLayoutRef = ComputedRef<PageLayout>;
|
|
50
|
-
type RedirectsRef = Ref<Redirects>;
|
|
51
|
-
type RoutePathRef = ComputedRef<RoutePath>;
|
|
52
|
-
type RouteLocaleRef = ComputedRef<RouteLocale>;
|
|
53
|
-
type RoutesRef = Ref<Routes>;
|
|
54
|
-
type SiteDataRef = Ref<SiteData>;
|
|
55
|
-
type SiteLocaleDataRef = ComputedRef<SiteLocaleData>;
|
|
56
|
-
interface ClientData<Frontmatter extends Record<string, unknown> = Record<string, unknown>, Data extends Record<string, unknown> = Record<string, unknown>> {
|
|
57
|
-
layouts: LayoutsRef;
|
|
58
|
-
pageComponent: PageComponentRef;
|
|
59
|
-
pageData: PageDataRef<Data>;
|
|
60
|
-
pageFrontmatter: PageFrontmatterRef<Frontmatter>;
|
|
61
|
-
pageHead: PageHeadRef;
|
|
62
|
-
pageHeadTitle: PageHeadTitleRef;
|
|
63
|
-
pageLang: PageLangRef;
|
|
64
|
-
pageLayout: PageLayoutRef;
|
|
65
|
-
redirects: RedirectsRef;
|
|
66
|
-
routePath: RoutePathRef;
|
|
67
|
-
routeLocale: RouteLocaleRef;
|
|
68
|
-
routes: RoutesRef;
|
|
69
|
-
siteData: SiteDataRef;
|
|
70
|
-
siteLocaleData: SiteLocaleDataRef;
|
|
71
|
-
frontmatter: PageFrontmatterRef<Frontmatter>;
|
|
72
|
-
head: PageHeadRef;
|
|
73
|
-
headTitle: PageHeadTitleRef;
|
|
74
|
-
lang: PageLangRef;
|
|
75
|
-
page: PageDataRef<Data>;
|
|
76
|
-
site: SiteDataRef;
|
|
77
|
-
siteLocale: SiteLocaleDataRef;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Configure vuepress client
|
|
82
|
-
*/
|
|
83
|
-
interface ClientConfig {
|
|
84
|
-
/**
|
|
85
|
-
* An enhance function to be called after vue app instance and
|
|
86
|
-
* vue-router instance has been created
|
|
87
|
-
*/
|
|
88
|
-
enhance?: (context: {
|
|
89
|
-
app: App;
|
|
90
|
-
router: Router;
|
|
91
|
-
siteData: SiteDataRef;
|
|
92
|
-
}) => Promise<void> | void;
|
|
93
|
-
/**
|
|
94
|
-
* A function to be called inside the setup function of vue app
|
|
95
|
-
*/
|
|
96
|
-
setup?: () => void;
|
|
97
|
-
/**
|
|
98
|
-
* Layout components
|
|
99
|
-
*/
|
|
100
|
-
layouts?: Partial<Layouts>;
|
|
101
|
-
/**
|
|
102
|
-
* Components to be placed directly into the root node of vue app
|
|
103
|
-
*/
|
|
104
|
-
rootComponents?: Component[];
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
type ContentUpdatedReason = 'beforeUnmount' | 'mounted' | 'updated';
|
|
108
|
-
type ContentUpdatedCallback = (reason: ContentUpdatedReason) => unknown;
|
|
1
|
+
import { A as SiteData, C as PageLayoutRef, D as RoutePath, E as RouteLocaleRef, F as Redirects, I as Route, L as RouteMeta, M as SiteLocaleData, N as SiteLocaleDataRef, O as RoutePathRef, P as PageChunk, R as Routes, S as PageLayout, T as RouteLocale, _ as PageHeadTitle, a as ClientData, b as PageLang, c as LayoutsRef, d as PageData, f as PageDataRef, g as PageHeadRef, h as PageHead, i as ClientConfig, j as SiteDataRef, k as RoutesRef, l as PageComponent, m as PageFrontmatterRef, n as ContentUpdatedReason, o as HeadConfig, p as PageFrontmatter, r as CreateVueAppFunction, s as Layouts, t as ContentUpdatedCallback, u as PageComponentRef, v as PageHeadTitleRef, w as RedirectsRef, x as PageLangRef, y as PageHeader } from "./index-CNztZIId.js";
|
|
2
|
+
import * as vue from "vue";
|
|
3
|
+
import { InjectionKey, PropType, SlotsType, VNode } from "vue";
|
|
4
|
+
import { RouteLocationNormalizedLoaded, Router, useRoute, useRouter } from "vue-router";
|
|
109
5
|
|
|
6
|
+
//#region src/components/AutoLink.d.ts
|
|
110
7
|
interface AutoLinkConfig {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Pattern to determine if the link should be active, which has higher priority than `exact`
|
|
10
|
+
*/
|
|
11
|
+
activeMatch?: RegExp | string;
|
|
12
|
+
/**
|
|
13
|
+
* The `aria-label` attribute
|
|
14
|
+
*/
|
|
15
|
+
ariaLabel?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the link should be active only if the url is an exact match
|
|
18
|
+
*/
|
|
19
|
+
exact?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* URL of the auto link
|
|
22
|
+
*/
|
|
23
|
+
link: string;
|
|
24
|
+
/**
|
|
25
|
+
* The `rel` attribute
|
|
26
|
+
*/
|
|
27
|
+
rel?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The `target` attribute
|
|
30
|
+
*/
|
|
31
|
+
target?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Text of the auto link
|
|
34
|
+
*/
|
|
35
|
+
text: string;
|
|
139
36
|
}
|
|
140
37
|
/**
|
|
141
38
|
* Component to render a link automatically according to the link type
|
|
@@ -144,23 +41,24 @@ interface AutoLinkConfig {
|
|
|
144
41
|
* - If the link is external, it will be rendered as a normal `<a>` tag
|
|
145
42
|
*/
|
|
146
43
|
declare const AutoLink: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
44
|
+
config: {
|
|
45
|
+
type: PropType<AutoLinkConfig>;
|
|
46
|
+
required: true;
|
|
47
|
+
};
|
|
151
48
|
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
152
|
-
|
|
49
|
+
[key: string]: any;
|
|
153
50
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
51
|
+
config: {
|
|
52
|
+
type: PropType<AutoLinkConfig>;
|
|
53
|
+
required: true;
|
|
54
|
+
};
|
|
158
55
|
}>> & Readonly<{}>, {}, SlotsType<{
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
56
|
+
default?: (config: AutoLinkConfig) => VNode | VNode[];
|
|
57
|
+
before?: (config: AutoLinkConfig) => VNode | VNode[] | null;
|
|
58
|
+
after?: (config: AutoLinkConfig) => VNode | VNode[] | null;
|
|
162
59
|
}>, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
163
|
-
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/components/ClientOnly.d.ts
|
|
164
62
|
/**
|
|
165
63
|
* Wrapper component that only renders its content on the client side and skips server side rendering
|
|
166
64
|
*
|
|
@@ -169,49 +67,51 @@ declare const AutoLink: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
169
67
|
* @see https://blog.vuejs.org/posts/vue-3-5#data-allow-mismatch
|
|
170
68
|
*/
|
|
171
69
|
declare const ClientOnly: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
172
|
-
|
|
70
|
+
[key: string]: any;
|
|
173
71
|
}>[] | null | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
174
|
-
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/components/Content.d.ts
|
|
175
74
|
/**
|
|
176
75
|
* Markdown rendered content
|
|
177
76
|
*/
|
|
178
77
|
declare const Content: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
78
|
+
path: {
|
|
79
|
+
type: StringConstructor;
|
|
80
|
+
required: false;
|
|
81
|
+
default: string;
|
|
82
|
+
};
|
|
184
83
|
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
185
|
-
|
|
84
|
+
[key: string]: any;
|
|
186
85
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
86
|
+
path: {
|
|
87
|
+
type: StringConstructor;
|
|
88
|
+
required: false;
|
|
89
|
+
default: string;
|
|
90
|
+
};
|
|
192
91
|
}>> & Readonly<{}>, {
|
|
193
|
-
|
|
92
|
+
path: string;
|
|
194
93
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
195
|
-
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/components/RouteLink.d.ts
|
|
196
96
|
interface RouteLinkProps {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
97
|
+
/**
|
|
98
|
+
* Whether the link is active to have an active class
|
|
99
|
+
*
|
|
100
|
+
* Notice that the active status is not automatically determined according to the current route.
|
|
101
|
+
*
|
|
102
|
+
* @default false
|
|
103
|
+
*/
|
|
104
|
+
active?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* The class to add when the link is active
|
|
107
|
+
*
|
|
108
|
+
* @default 'route-link-active'
|
|
109
|
+
*/
|
|
110
|
+
activeClass?: string;
|
|
111
|
+
/**
|
|
112
|
+
* The route path to link to
|
|
113
|
+
*/
|
|
114
|
+
to: string;
|
|
215
115
|
}
|
|
216
116
|
/**
|
|
217
117
|
* Component to render a link to another route.
|
|
@@ -221,56 +121,57 @@ interface RouteLinkProps {
|
|
|
221
121
|
* It's recommended to use `RouteLink` in VuePress.
|
|
222
122
|
*/
|
|
223
123
|
declare const RouteLink: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
124
|
+
/**
|
|
125
|
+
* The route path to link to
|
|
126
|
+
*/
|
|
127
|
+
to: {
|
|
128
|
+
type: StringConstructor;
|
|
129
|
+
required: true;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Whether the link is active to have an active class
|
|
133
|
+
*
|
|
134
|
+
* Notice that the active status is not automatically determined according to the current route.
|
|
135
|
+
*/
|
|
136
|
+
active: BooleanConstructor;
|
|
137
|
+
/**
|
|
138
|
+
* The class to add when the link is active
|
|
139
|
+
*/
|
|
140
|
+
activeClass: {
|
|
141
|
+
type: StringConstructor;
|
|
142
|
+
default: string;
|
|
143
|
+
};
|
|
244
144
|
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
245
|
-
|
|
145
|
+
[key: string]: any;
|
|
246
146
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
147
|
+
/**
|
|
148
|
+
* The route path to link to
|
|
149
|
+
*/
|
|
150
|
+
to: {
|
|
151
|
+
type: StringConstructor;
|
|
152
|
+
required: true;
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* Whether the link is active to have an active class
|
|
156
|
+
*
|
|
157
|
+
* Notice that the active status is not automatically determined according to the current route.
|
|
158
|
+
*/
|
|
159
|
+
active: BooleanConstructor;
|
|
160
|
+
/**
|
|
161
|
+
* The class to add when the link is active
|
|
162
|
+
*/
|
|
163
|
+
activeClass: {
|
|
164
|
+
type: StringConstructor;
|
|
165
|
+
default: string;
|
|
166
|
+
};
|
|
267
167
|
}>> & Readonly<{}>, {
|
|
268
|
-
|
|
269
|
-
|
|
168
|
+
active: boolean;
|
|
169
|
+
activeClass: string;
|
|
270
170
|
}, SlotsType<{
|
|
271
|
-
|
|
171
|
+
default: () => (VNode | string)[] | VNode | string;
|
|
272
172
|
}>, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
273
|
-
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region src/composables/clientData.d.ts
|
|
274
175
|
/**
|
|
275
176
|
* Injection key for client data
|
|
276
177
|
*/
|
|
@@ -279,7 +180,8 @@ declare const clientDataSymbol: InjectionKey<ClientData>;
|
|
|
279
180
|
* Returns client data
|
|
280
181
|
*/
|
|
281
182
|
declare const useClientData: <Frontmatter extends Record<string, unknown> = Record<string, unknown>, Data extends Record<string, unknown> = Record<string, unknown>>() => ClientData<Frontmatter, Data>;
|
|
282
|
-
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region src/composables/clientDataUtils.d.ts
|
|
283
185
|
declare const useLayouts: () => LayoutsRef;
|
|
284
186
|
declare const usePageComponent: () => PageComponentRef;
|
|
285
187
|
declare const usePageData: <T extends Record<string, unknown> = Record<string, unknown>>() => PageDataRef<T>;
|
|
@@ -300,13 +202,15 @@ declare const useLang: () => PageLangRef;
|
|
|
300
202
|
declare const usePage: <T extends Record<string, unknown> = Record<string, unknown>>() => PageDataRef<T>;
|
|
301
203
|
declare const useSite: () => SiteDataRef;
|
|
302
204
|
declare const useSiteLocale: () => SiteLocaleDataRef;
|
|
303
|
-
|
|
205
|
+
//#endregion
|
|
206
|
+
//#region src/composables/onContentUpdated.d.ts
|
|
304
207
|
/**
|
|
305
208
|
* Register callback that is called every time the markdown content is updated
|
|
306
209
|
* in the DOM.
|
|
307
210
|
*/
|
|
308
211
|
declare const onContentUpdated: (fn: ContentUpdatedCallback) => void;
|
|
309
|
-
|
|
212
|
+
//#endregion
|
|
213
|
+
//#region src/composables/updateHead.d.ts
|
|
310
214
|
/**
|
|
311
215
|
* A util function to force update `<head>` of current page
|
|
312
216
|
*/
|
|
@@ -319,66 +223,61 @@ declare const updateHeadSymbol: InjectionKey<UpdateHead>;
|
|
|
319
223
|
* Returns the `updateHead` util
|
|
320
224
|
*/
|
|
321
225
|
declare const useUpdateHead: () => UpdateHead;
|
|
322
|
-
|
|
226
|
+
declare namespace constants_d_exports {
|
|
227
|
+
export { COMPONENT_STATE_TYPE, INSPECTOR_ID, INSPECTOR_LABEL, INSPECTOR_NODES, INSPECTOR_STATE_SECTION_NAME, PLUGIN_ID, PLUGIN_LABEL };
|
|
228
|
+
}
|
|
323
229
|
declare const PLUGIN_ID = "org.vuejs.vuepress";
|
|
324
230
|
declare const PLUGIN_LABEL = "VuePress";
|
|
325
231
|
declare const COMPONENT_STATE_TYPE = "VuePress";
|
|
326
232
|
declare const INSPECTOR_ID = "org.vuejs.vuepress";
|
|
327
233
|
declare const INSPECTOR_LABEL = "VuePress";
|
|
328
234
|
declare const INSPECTOR_NODES: {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
235
|
+
INTERNAL: {
|
|
236
|
+
readonly id: "INTERNAL";
|
|
237
|
+
readonly label: "Internal";
|
|
238
|
+
readonly keys: ["layouts", "routes", "redirects"];
|
|
239
|
+
};
|
|
240
|
+
SITE: {
|
|
241
|
+
readonly id: "SITE";
|
|
242
|
+
readonly label: "Site";
|
|
243
|
+
readonly keys: ["siteData", "siteLocaleData"];
|
|
244
|
+
};
|
|
245
|
+
ROUTE: {
|
|
246
|
+
readonly id: "ROUTE";
|
|
247
|
+
readonly label: "Route";
|
|
248
|
+
readonly keys: ["routePath", "routeLocale"];
|
|
249
|
+
};
|
|
250
|
+
PAGE: {
|
|
251
|
+
readonly id: "PAGE";
|
|
252
|
+
readonly label: "Page";
|
|
253
|
+
readonly keys: ["pageData", "pageFrontmatter", "pageLang", "pageHead", "pageHeadTitle", "pageLayout", "pageComponent"];
|
|
254
|
+
};
|
|
349
255
|
};
|
|
350
256
|
declare const INSPECTOR_STATE_SECTION_NAME = "State";
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
declare const constants_INSPECTOR_ID: typeof INSPECTOR_ID;
|
|
354
|
-
declare const constants_INSPECTOR_LABEL: typeof INSPECTOR_LABEL;
|
|
355
|
-
declare const constants_INSPECTOR_NODES: typeof INSPECTOR_NODES;
|
|
356
|
-
declare const constants_INSPECTOR_STATE_SECTION_NAME: typeof INSPECTOR_STATE_SECTION_NAME;
|
|
357
|
-
declare const constants_PLUGIN_ID: typeof PLUGIN_ID;
|
|
358
|
-
declare const constants_PLUGIN_LABEL: typeof PLUGIN_LABEL;
|
|
359
|
-
declare namespace constants {
|
|
360
|
-
export { constants_COMPONENT_STATE_TYPE as COMPONENT_STATE_TYPE, constants_INSPECTOR_ID as INSPECTOR_ID, constants_INSPECTOR_LABEL as INSPECTOR_LABEL, constants_INSPECTOR_NODES as INSPECTOR_NODES, constants_INSPECTOR_STATE_SECTION_NAME as INSPECTOR_STATE_SECTION_NAME, constants_PLUGIN_ID as PLUGIN_ID, constants_PLUGIN_LABEL as PLUGIN_LABEL };
|
|
361
|
-
}
|
|
362
|
-
|
|
257
|
+
//#endregion
|
|
258
|
+
//#region src/router/resolveRoute.d.ts
|
|
363
259
|
interface ResolvedRoute<T extends RouteMeta = RouteMeta> extends Route<T> {
|
|
364
|
-
|
|
365
|
-
|
|
260
|
+
path: string;
|
|
261
|
+
notFound: boolean;
|
|
366
262
|
}
|
|
367
263
|
/**
|
|
368
264
|
* Resolve route with given path
|
|
369
265
|
*/
|
|
370
266
|
declare const resolveRoute: <T extends RouteMeta = RouteMeta>(path: string, currentPath?: string) => ResolvedRoute<T>;
|
|
371
|
-
|
|
267
|
+
//#endregion
|
|
268
|
+
//#region src/router/resolveRouteFullPath.d.ts
|
|
372
269
|
/**
|
|
373
270
|
* Resolve route full path with given raw path
|
|
374
271
|
*/
|
|
375
272
|
declare const resolveRouteFullPath: (path: string, currentPath?: string) => string;
|
|
376
|
-
|
|
273
|
+
//#endregion
|
|
274
|
+
//#region src/router/resolveRoutePath.d.ts
|
|
377
275
|
/**
|
|
378
276
|
* Resolve route path with given raw path
|
|
379
277
|
*/
|
|
380
278
|
declare const resolveRoutePath: (pathname: string, currentPath?: string) => string;
|
|
381
|
-
|
|
279
|
+
//#endregion
|
|
280
|
+
//#region src/resolvers.d.ts
|
|
382
281
|
/**
|
|
383
282
|
* Resolver methods to get global computed
|
|
384
283
|
*
|
|
@@ -387,23 +286,29 @@ declare const resolveRoutePath: (pathname: string, currentPath?: string) => stri
|
|
|
387
286
|
* @experimental - This is an experimental API and may be changed in minor versions
|
|
388
287
|
*/
|
|
389
288
|
declare const resolvers: {
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
289
|
+
resolveLayouts: (clientConfigs: ClientConfig[]) => Layouts;
|
|
290
|
+
resolvePageHead: (pageHeadTitle: PageHeadTitle, pageFrontmatter: PageFrontmatter, siteLocaleDate: SiteLocaleData) => PageHead;
|
|
291
|
+
resolvePageHeadTitle: (pageData: PageData, siteLocaleDate: SiteLocaleData) => PageHeadTitle;
|
|
292
|
+
resolvePageLang: (pageData: PageData, siteLocaleData: SiteLocaleData) => PageLang;
|
|
293
|
+
resolvePageLayout: (pageData: PageData, layouts: Layouts) => PageLayout;
|
|
294
|
+
resolveRouteLocale: (locales: SiteData["locales"], routePath: string) => RouteLocale;
|
|
295
|
+
resolveSiteLocaleData: ({
|
|
296
|
+
base,
|
|
297
|
+
locales,
|
|
298
|
+
...siteData
|
|
299
|
+
}: SiteData, routeLocale: RouteLocale) => SiteLocaleData;
|
|
397
300
|
};
|
|
398
|
-
|
|
301
|
+
//#endregion
|
|
302
|
+
//#region src/utils/defineClientConfig.d.ts
|
|
399
303
|
/**
|
|
400
304
|
* A helper function to help you define vuepress client config file
|
|
401
305
|
*/
|
|
402
306
|
declare const defineClientConfig: (clientConfig?: ClientConfig) => ClientConfig;
|
|
403
|
-
|
|
307
|
+
//#endregion
|
|
308
|
+
//#region src/utils/withBase.d.ts
|
|
404
309
|
/**
|
|
405
310
|
* Prefix url with site base
|
|
406
311
|
*/
|
|
407
312
|
declare const withBase: (url: string) => string;
|
|
408
|
-
|
|
409
|
-
export { AutoLink,
|
|
313
|
+
//#endregion
|
|
314
|
+
export { AutoLink, AutoLinkConfig, ClientConfig, ClientData, ClientOnly, Content, ContentUpdatedCallback, ContentUpdatedReason, CreateVueAppFunction, constants_d_exports as DEVTOOLS, HeadConfig, Layouts, LayoutsRef, PageChunk, PageComponent, PageComponentRef, PageData, PageDataRef, PageFrontmatter, PageFrontmatterRef, PageHead, PageHeadRef, PageHeadTitle, PageHeadTitleRef, PageHeader, PageLang, PageLangRef, PageLayout, PageLayoutRef, Redirects, RedirectsRef, ResolvedRoute, Route, RouteLink, RouteLinkProps, RouteLocale, RouteLocaleRef, type RouteLocationNormalizedLoaded, RouteMeta, RoutePath, RoutePathRef, type Router, Routes, RoutesRef, SiteData, SiteDataRef, SiteLocaleData, SiteLocaleDataRef, UpdateHead, clientDataSymbol, defineClientConfig, onContentUpdated, resolveRoute, resolveRouteFullPath, resolveRoutePath, resolvers, updateHeadSymbol, useClientData, useData, useFrontmatter, useHead, useLang, useLayouts, usePage, usePageComponent, usePageData, usePageFrontmatter, usePageHead, usePageLang, usePageLayout, useRedirects, useRoute, useRouteLocale, useRoutePath, useRouter, useRoutes, useSite, useSiteData, useSiteLocale, useSiteLocaleData, useUpdateHead, withBase };
|
package/dist/index.js
CHANGED
|
@@ -1,83 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Content,
|
|
5
|
-
RouteLink,
|
|
6
|
-
clientDataSymbol,
|
|
7
|
-
defineClientConfig,
|
|
8
|
-
onContentUpdated,
|
|
9
|
-
resolveRoute,
|
|
10
|
-
resolveRouteFullPath,
|
|
11
|
-
resolveRoutePath,
|
|
12
|
-
resolvers,
|
|
13
|
-
updateHeadSymbol,
|
|
14
|
-
useClientData,
|
|
15
|
-
useData,
|
|
16
|
-
useFrontmatter,
|
|
17
|
-
useHead,
|
|
18
|
-
useLang,
|
|
19
|
-
useLayouts,
|
|
20
|
-
usePage,
|
|
21
|
-
usePageComponent,
|
|
22
|
-
usePageData,
|
|
23
|
-
usePageFrontmatter,
|
|
24
|
-
usePageHead,
|
|
25
|
-
usePageLang,
|
|
26
|
-
usePageLayout,
|
|
27
|
-
useRedirects,
|
|
28
|
-
useRoute,
|
|
29
|
-
useRouteLocale,
|
|
30
|
-
useRoutePath,
|
|
31
|
-
useRouter,
|
|
32
|
-
useRoutes,
|
|
33
|
-
useSite,
|
|
34
|
-
useSiteData,
|
|
35
|
-
useSiteLocale,
|
|
36
|
-
useSiteLocaleData,
|
|
37
|
-
useUpdateHead,
|
|
38
|
-
withBase
|
|
39
|
-
} from "./chunk-YWDQ52BP.js";
|
|
40
|
-
import {
|
|
41
|
-
constants_exports
|
|
42
|
-
} from "./chunk-XZCIWC7J.js";
|
|
43
|
-
import "./chunk-MLKGABMK.js";
|
|
44
|
-
export {
|
|
45
|
-
AutoLink,
|
|
46
|
-
ClientOnly,
|
|
47
|
-
Content,
|
|
48
|
-
constants_exports as DEVTOOLS,
|
|
49
|
-
RouteLink,
|
|
50
|
-
clientDataSymbol,
|
|
51
|
-
defineClientConfig,
|
|
52
|
-
onContentUpdated,
|
|
53
|
-
resolveRoute,
|
|
54
|
-
resolveRouteFullPath,
|
|
55
|
-
resolveRoutePath,
|
|
56
|
-
resolvers,
|
|
57
|
-
updateHeadSymbol,
|
|
58
|
-
useClientData,
|
|
59
|
-
useData,
|
|
60
|
-
useFrontmatter,
|
|
61
|
-
useHead,
|
|
62
|
-
useLang,
|
|
63
|
-
useLayouts,
|
|
64
|
-
usePage,
|
|
65
|
-
usePageComponent,
|
|
66
|
-
usePageData,
|
|
67
|
-
usePageFrontmatter,
|
|
68
|
-
usePageHead,
|
|
69
|
-
usePageLang,
|
|
70
|
-
usePageLayout,
|
|
71
|
-
useRedirects,
|
|
72
|
-
useRoute,
|
|
73
|
-
useRouteLocale,
|
|
74
|
-
useRoutePath,
|
|
75
|
-
useRouter,
|
|
76
|
-
useRoutes,
|
|
77
|
-
useSite,
|
|
78
|
-
useSiteData,
|
|
79
|
-
useSiteLocale,
|
|
80
|
-
useSiteLocaleData,
|
|
81
|
-
useUpdateHead,
|
|
82
|
-
withBase
|
|
83
|
-
};
|
|
1
|
+
import { A as useRedirects, C as usePage, D as usePageHead, E as usePageFrontmatter, F as useSiteData, I as useSiteLocale, L as useSiteLocaleData, M as useRoutePath, N as useRoutes, O as usePageLang, P as useSite, R as clientDataSymbol, S as useLayouts, T as usePageData, _ as onContentUpdated, a as ClientOnly, b as useHead, c as useRoute, d as resolveRoute, f as resolveRoutePath, g as useUpdateHead, h as updateHeadSymbol, i as Content, j as useRouteLocale, k as usePageLayout, l as useRouter, n as defineClientConfig, o as AutoLink, r as resolvers, s as RouteLink, t as withBase, u as resolveRouteFullPath, v as useData, w as usePageComponent, x as useLang, y as useFrontmatter, z as useClientData } from "./utils-_b2e7bpk.js";
|
|
2
|
+
import { c as constants_exports } from "./constants-COBTj3zj.js";
|
|
3
|
+
export { AutoLink, ClientOnly, Content, constants_exports as DEVTOOLS, RouteLink, clientDataSymbol, defineClientConfig, onContentUpdated, resolveRoute, resolveRouteFullPath, resolveRoutePath, resolvers, updateHeadSymbol, useClientData, useData, useFrontmatter, useHead, useLang, useLayouts, usePage, usePageComponent, usePageData, usePageFrontmatter, usePageHead, usePageLang, usePageLayout, useRedirects, useRoute, useRouteLocale, useRoutePath, useRouter, useRoutes, useSite, useSiteData, useSiteLocale, useSiteLocaleData, useUpdateHead, withBase };
|