@vuepress/client 2.0.0-rc.3 → 2.0.0-rc.31

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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  ## Documentation
7
7
 
8
- https://v2.vuepress.vuejs.org
8
+ https://vuepress.vuejs.org
9
9
 
10
10
  ## License
11
11
 
package/dist/app.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { C as CreateVueAppFunction } from './createVueAppFunction-YNGNKfE3.js';
2
- import 'vue';
3
- import 'vue-router';
4
-
1
+ import { t as CreateVueAppFunction } from "./index-wQR7Pl0s.js";
2
+ import "@internal/userStyle";
3
+ //#region src/app.d.ts
5
4
  declare const createVueApp: CreateVueAppFunction;
6
-
7
- export { createVueApp };
5
+ //#endregion
6
+ export { createVueApp };
package/dist/app.js CHANGED
@@ -1,326 +1,264 @@
1
- import {
2
- ClientOnly,
3
- Content,
4
- VPLink,
5
- layoutsSymbol,
6
- pageDataSymbol,
7
- pageFrontmatterSymbol,
8
- pageHeadSymbol,
9
- pageHeadTitleSymbol,
10
- pageLangSymbol,
11
- pageLayoutSymbol,
12
- resolveRoute,
13
- resolvers,
14
- routeLocaleSymbol,
15
- routes,
16
- siteData,
17
- siteLocaleDataSymbol,
18
- updateHeadSymbol,
19
- usePageHead,
20
- usePageLang,
21
- usePageLayout,
22
- withBase
23
- } from "./chunk-2SMBJWK6.js";
24
-
25
- // src/app.ts
1
+ import { D as usePageLang, E as usePageHead, L as clientDataSymbol, O as usePageLayout, f as redirects, i as ClientOnly, m as updateHeadSymbol, n as resolvers, o as RouteLink, p as routes, r as Content, t as withBase, u as resolveRoute } from "./utils-jFeCv-dX.js";
26
2
  import { clientConfigs } from "@internal/clientConfigs";
27
- import { createApp, createSSRApp, h as h2 } from "vue";
28
- import { RouterView } from "vue-router";
29
-
30
- // src/createVueRouter.ts
31
- import { removeEndingSlash } from "@vuepress/shared";
32
- import {
33
- createMemoryHistory,
34
- createRouter,
35
- createWebHistory,
36
- START_LOCATION
37
- } from "vue-router";
38
-
39
- // src/components/Vuepress.ts
40
- import { defineComponent, h } from "vue";
41
- var Vuepress = defineComponent({
42
- name: "Vuepress",
43
- setup() {
44
- const layout = usePageLayout();
45
- return () => h(layout.value);
46
- }
47
- });
48
-
49
- // src/createVueRouter.ts
50
- var historyCreator = __VUEPRESS_SSR__ ? createMemoryHistory : createWebHistory;
51
- var createVueRouter = () => {
52
- const router = createRouter({
53
- // it might be an issue of vue-router that have to remove the ending slash
54
- history: historyCreator(removeEndingSlash(__VUEPRESS_BASE__)),
55
- routes: [
56
- {
57
- name: "vuepress-route",
58
- path: "/:catchAll(.*)",
59
- component: Vuepress
60
- }
61
- ],
62
- scrollBehavior: (to, _from, savedPosition) => {
63
- if (savedPosition)
64
- return savedPosition;
65
- if (to.hash)
66
- return { el: to.hash };
67
- return { top: 0 };
68
- }
69
- });
70
- router.beforeResolve(async (to, from) => {
71
- if (to.path !== from.path || from === START_LOCATION) {
72
- const route = resolveRoute(to.path);
73
- if (route.path !== to.path) {
74
- return route.path;
75
- }
76
- const pageChunk = await route.loader();
77
- to.meta = {
78
- // attach route meta
79
- ...route.meta,
80
- // attach page data to route meta to trigger page data computed when route changes
81
- _data: pageChunk.data
82
- };
83
- }
84
- });
85
- return router;
3
+ import { computed, createApp, createSSRApp, customRef, h, onMounted, provide, shallowRef, useSSRContext, watch } from "vue";
4
+ import { siteData } from "@internal/siteData";
5
+ import { isPlainObject, isString, removeEndingSlash } from "@vuepress/shared";
6
+ import { START_LOCATION, createMemoryHistory, createRouter, createWebHistory } from "vue-router";
7
+ import "@internal/userStyle";
8
+ //#region src/internal/siteData.ts
9
+ /**
10
+ * Global site data ref
11
+ */
12
+ const siteData$1 = shallowRef(siteData);
13
+ if (__VUEPRESS_DEV__ && (import.meta.webpackHot || import.meta.hot)) __VUE_HMR_RUNTIME__.updateSiteData = (data) => {
14
+ siteData$1.value = data;
86
15
  };
87
-
88
- // src/setupGlobalComponents.ts
89
- var setupGlobalComponents = (app) => {
90
- app.component("ClientOnly", ClientOnly);
91
- app.component("Content", Content);
92
- app.component("VPLink", VPLink);
16
+ //#endregion
17
+ //#region src/router/createVueRouter.ts
18
+ /**
19
+ * - use `createWebHistory` in dev mode and build mode client bundle
20
+ * - use `createMemoryHistory` in build mode server bundle
21
+ */
22
+ const historyCreator = __VUEPRESS_SSR__ ? createMemoryHistory : createWebHistory;
23
+ /**
24
+ * Create router instance
25
+ */
26
+ const createVueRouter = () => {
27
+ const router = createRouter({
28
+ history: historyCreator(removeEndingSlash(__VUEPRESS_BASE__)),
29
+ routes: [{
30
+ name: "vuepress-route",
31
+ path: "/:catchAll(.*)",
32
+ components: {}
33
+ }],
34
+ scrollBehavior: (to, _from, savedPosition) => {
35
+ if (savedPosition) return savedPosition;
36
+ if (to.hash) return { el: to.hash };
37
+ return { top: 0 };
38
+ }
39
+ });
40
+ router.beforeResolve(async (to, from) => {
41
+ if (to.path !== from.path || from === START_LOCATION) {
42
+ const route = resolveRoute(to.fullPath);
43
+ if (route.path !== to.fullPath) return route.path;
44
+ const pageChunk = await route.loader();
45
+ to.meta = {
46
+ ...route.meta,
47
+ _pageChunk: pageChunk
48
+ };
49
+ } else if (to.path === from.path) to.meta = from.meta;
50
+ });
51
+ return router;
93
52
  };
94
-
95
- // src/setupGlobalComputed.ts
96
- import { computedWithControl } from "@vueuse/core";
97
- import { computed } from "vue";
98
- var setupGlobalComputed = (app, router, clientConfigs2) => {
99
- const routePath = computed(() => router.currentRoute.value.path);
100
- const pageData = computedWithControl(
101
- routePath,
102
- () => router.currentRoute.value.meta._data
103
- );
104
- if (__VUEPRESS_DEV__ && (import.meta.webpackHot || import.meta.hot)) {
105
- __VUE_HMR_RUNTIME__.updatePageData = async (data) => {
106
- const pageChunk = await routes.value[data.path].loader();
107
- routes.value[data.path].loader = () => Promise.resolve({ comp: pageChunk.comp, data });
108
- if (data.path === router.currentRoute.value.meta._data?.path) {
109
- router.currentRoute.value.meta._data = data;
110
- pageData.trigger();
111
- }
112
- };
113
- }
114
- const layouts = computed(() => resolvers.resolveLayouts(clientConfigs2));
115
- const routeLocale = computed(
116
- () => resolvers.resolveRouteLocale(siteData.value.locales, routePath.value)
117
- );
118
- const siteLocaleData = computed(
119
- () => resolvers.resolveSiteLocaleData(siteData.value, routeLocale.value)
120
- );
121
- const pageFrontmatter = computed(
122
- () => resolvers.resolvePageFrontmatter(pageData.value)
123
- );
124
- const pageHeadTitle = computed(
125
- () => resolvers.resolvePageHeadTitle(pageData.value, siteLocaleData.value)
126
- );
127
- const pageHead = computed(
128
- () => resolvers.resolvePageHead(
129
- pageHeadTitle.value,
130
- pageFrontmatter.value,
131
- siteLocaleData.value
132
- )
133
- );
134
- const pageLang = computed(
135
- () => resolvers.resolvePageLang(pageData.value, siteLocaleData.value)
136
- );
137
- const pageLayout = computed(
138
- () => resolvers.resolvePageLayout(pageData.value, layouts.value)
139
- );
140
- app.provide(layoutsSymbol, layouts);
141
- app.provide(pageDataSymbol, pageData);
142
- app.provide(pageFrontmatterSymbol, pageFrontmatter);
143
- app.provide(pageHeadTitleSymbol, pageHeadTitle);
144
- app.provide(pageHeadSymbol, pageHead);
145
- app.provide(pageLangSymbol, pageLang);
146
- app.provide(pageLayoutSymbol, pageLayout);
147
- app.provide(routeLocaleSymbol, routeLocale);
148
- app.provide(siteLocaleDataSymbol, siteLocaleData);
149
- Object.defineProperties(app.config.globalProperties, {
150
- $frontmatter: { get: () => pageFrontmatter.value },
151
- $head: { get: () => pageHead.value },
152
- $headTitle: { get: () => pageHeadTitle.value },
153
- $lang: { get: () => pageLang.value },
154
- $page: { get: () => pageData.value },
155
- $routeLocale: { get: () => routeLocale.value },
156
- $site: { get: () => siteData.value },
157
- $siteLocale: { get: () => siteLocaleData.value },
158
- $withBase: { get: () => withBase }
159
- });
160
- return {
161
- layouts,
162
- pageData,
163
- pageFrontmatter,
164
- pageHead,
165
- pageHeadTitle,
166
- pageLang,
167
- pageLayout,
168
- routeLocale,
169
- siteData,
170
- siteLocaleData
171
- };
53
+ //#endregion
54
+ //#region src/setupGlobalComponents.ts
55
+ /**
56
+ * Register global built-in components
57
+ */
58
+ const setupGlobalComponents = (app) => {
59
+ app.component("ClientOnly", ClientOnly);
60
+ app.component("Content", Content);
61
+ app.component("RouteLink", RouteLink);
172
62
  };
173
-
174
- // src/setupUpdateHead.ts
175
- import { isPlainObject, isString } from "@vuepress/shared";
176
- import { onMounted, provide, useSSRContext, watch } from "vue";
177
- var setupUpdateHead = () => {
178
- const head = usePageHead();
179
- const lang = usePageLang();
180
- if (__VUEPRESS_SSR__) {
181
- const ssrContext = useSSRContext();
182
- if (ssrContext) {
183
- ssrContext.head = head.value;
184
- ssrContext.lang = lang.value;
185
- }
186
- return;
187
- }
188
- let managedHeadElements = [];
189
- const takeOverHeadElements = () => {
190
- head.value.forEach((item) => {
191
- const headElement = queryHeadElement(item);
192
- if (headElement) {
193
- managedHeadElements.push(headElement);
194
- }
195
- });
196
- };
197
- const generateHeadElements = () => {
198
- const result = [];
199
- head.value.forEach((item) => {
200
- const headElement = createHeadElement(item);
201
- if (headElement) {
202
- result.push(headElement);
203
- }
204
- });
205
- return result;
206
- };
207
- const updateHead = () => {
208
- document.documentElement.lang = lang.value;
209
- const newHeadElements = generateHeadElements();
210
- managedHeadElements.forEach((oldEl, oldIndex) => {
211
- const matchedIndex = newHeadElements.findIndex(
212
- (newEl) => oldEl.isEqualNode(newEl)
213
- );
214
- if (matchedIndex === -1) {
215
- oldEl.remove();
216
- delete managedHeadElements[oldIndex];
217
- } else {
218
- newHeadElements.splice(matchedIndex, 1);
219
- }
220
- });
221
- newHeadElements.forEach((el) => document.head.appendChild(el));
222
- managedHeadElements = [
223
- // filter out empty deleted items
224
- ...managedHeadElements.filter((item) => !!item),
225
- ...newHeadElements
226
- ];
227
- };
228
- provide(updateHeadSymbol, updateHead);
229
- onMounted(() => {
230
- if (!__VUEPRESS_DEV__) {
231
- takeOverHeadElements();
232
- }
233
- watch(head, updateHead, { immediate: __VUEPRESS_DEV__ });
234
- });
63
+ //#endregion
64
+ //#region src/setupGlobalComputed.ts
65
+ /**
66
+ * Create and provide global computed
67
+ */
68
+ const setupGlobalComputed = (app, router, clientConfigs) => {
69
+ const routePath = computed(() => router.currentRoute.value.path);
70
+ const pageChunk = customRef((track, trigger) => ({
71
+ get() {
72
+ track();
73
+ return router.currentRoute.value.meta._pageChunk;
74
+ },
75
+ set(value) {
76
+ router.currentRoute.value.meta._pageChunk = value;
77
+ trigger();
78
+ }
79
+ }));
80
+ if (__VUEPRESS_DEV__ && (import.meta.webpackHot || import.meta.hot)) __VUE_HMR_RUNTIME__.updatePageData = async (newPageData) => {
81
+ const newPageChunk = {
82
+ default: (await routes.value[newPageData.path].loader()).default,
83
+ _pageData: newPageData
84
+ };
85
+ routes.value[newPageData.path].loader = async () => Promise.resolve(newPageChunk);
86
+ if (newPageData.path === router.currentRoute.value.meta._pageChunk?._pageData.path) pageChunk.value = newPageChunk;
87
+ };
88
+ const layouts = computed(() => resolvers.resolveLayouts(clientConfigs));
89
+ const routeLocale = computed(() => resolvers.resolveRouteLocale(siteData$1.value.locales, routePath.value));
90
+ const siteLocaleData = computed(() => resolvers.resolveSiteLocaleData(siteData$1.value, routeLocale.value));
91
+ const pageComponent = computed(() => pageChunk.value.default);
92
+ const pageData = computed(() => pageChunk.value._pageData);
93
+ const pageFrontmatter = computed(() => pageData.value.frontmatter);
94
+ const pageHeadTitle = computed(() => resolvers.resolvePageHeadTitle(pageData.value, siteLocaleData.value));
95
+ const pageHead = computed(() => resolvers.resolvePageHead(pageHeadTitle.value, pageFrontmatter.value, siteLocaleData.value));
96
+ const pageLang = computed(() => resolvers.resolvePageLang(pageData.value, siteLocaleData.value));
97
+ const clientData = {
98
+ layouts,
99
+ pageData,
100
+ pageComponent,
101
+ pageFrontmatter,
102
+ pageHead,
103
+ pageHeadTitle,
104
+ pageLang,
105
+ pageLayout: computed(() => resolvers.resolvePageLayout(pageData.value, layouts.value)),
106
+ redirects,
107
+ routeLocale,
108
+ routePath,
109
+ routes,
110
+ siteData: siteData$1,
111
+ siteLocaleData,
112
+ frontmatter: pageFrontmatter,
113
+ head: pageHead,
114
+ headTitle: pageHeadTitle,
115
+ lang: pageLang,
116
+ page: pageData,
117
+ site: siteData$1,
118
+ siteLocale: siteLocaleData
119
+ };
120
+ app.provide(clientDataSymbol, clientData);
121
+ Object.defineProperties(app.config.globalProperties, {
122
+ $pageFrontmatter: { get: () => pageFrontmatter.value },
123
+ $pageHead: { get: () => pageHead.value },
124
+ $pageHeadTitle: { get: () => pageHeadTitle.value },
125
+ $pageLang: { get: () => pageLang.value },
126
+ $pageData: { get: () => pageData.value },
127
+ $routeLocale: { get: () => routeLocale.value },
128
+ $withBase: { get: () => withBase },
129
+ $frontmatter: { get: () => pageFrontmatter.value },
130
+ $head: { get: () => pageHead.value },
131
+ $headTitle: { get: () => pageHeadTitle.value },
132
+ $lang: { get: () => pageLang.value },
133
+ $page: { get: () => pageData.value },
134
+ $site: { get: () => siteData$1.value },
135
+ $siteLocale: { get: () => siteLocaleData.value }
136
+ });
137
+ return clientData;
235
138
  };
236
- var queryHeadElement = ([
237
- tagName,
238
- attrs,
239
- content = ""
240
- ]) => {
241
- const attrsSelector = Object.entries(attrs).map(([key, value]) => {
242
- if (isString(value)) {
243
- return `[${key}=${JSON.stringify(value)}]`;
244
- }
245
- if (value === true) {
246
- return `[${key}]`;
247
- }
248
- return "";
249
- }).join("");
250
- const selector = `head > ${tagName}${attrsSelector}`;
251
- const headElements = Array.from(
252
- document.querySelectorAll(selector)
253
- );
254
- const matchedHeadElement = headElements.find(
255
- (item) => item.innerText === content
256
- );
257
- return matchedHeadElement || null;
139
+ //#endregion
140
+ //#region src/setupUpdateHead.ts
141
+ /**
142
+ * Query the matched head element of head config
143
+ */
144
+ const queryHeadElement = ([tagName, attrs, content = ""]) => {
145
+ const selector = `head > ${tagName}${Object.entries(attrs).map(([key, value]) => {
146
+ if (isString(value)) return `[${key}=${JSON.stringify(value)}]`;
147
+ if (value) return `[${key}]`;
148
+ return "";
149
+ }).join("")}`;
150
+ return Array.from(document.querySelectorAll(selector)).find((item) => item.innerText === content) ?? null;
258
151
  };
259
- var createHeadElement = ([
260
- tagName,
261
- attrs,
262
- content
263
- ]) => {
264
- if (!isString(tagName)) {
265
- return null;
266
- }
267
- const headElement = document.createElement(tagName);
268
- if (isPlainObject(attrs)) {
269
- Object.entries(attrs).forEach(([key, value]) => {
270
- if (isString(value)) {
271
- headElement.setAttribute(key, value);
272
- } else if (value === true) {
273
- headElement.setAttribute(key, "");
274
- }
275
- });
276
- }
277
- if (isString(content)) {
278
- headElement.appendChild(document.createTextNode(content));
279
- }
280
- return headElement;
152
+ /**
153
+ * Create head element from head config
154
+ */
155
+ const createHeadElement = ([tagName, attrs, content]) => {
156
+ if (!isString(tagName)) return null;
157
+ const headElement = document.createElement(tagName);
158
+ if (isPlainObject(attrs)) Object.entries(attrs).forEach(([key, value]) => {
159
+ if (isString(value)) headElement.setAttribute(key, value);
160
+ else if (value) headElement.setAttribute(key, "");
161
+ });
162
+ if (isString(content)) headElement.appendChild(document.createTextNode(content));
163
+ return headElement;
281
164
  };
282
-
283
- // src/app.ts
284
- var appCreator = __VUEPRESS_DEV__ ? createApp : createSSRApp;
285
- var createVueApp = async () => {
286
- const app = appCreator({
287
- name: "VuepressApp",
288
- setup() {
289
- setupUpdateHead();
290
- for (const clientConfig of clientConfigs) {
291
- clientConfig.setup?.();
292
- }
293
- return () => [
294
- h2(RouterView),
295
- ...clientConfigs.flatMap(
296
- ({ rootComponents = [] }) => rootComponents.map((component) => h2(component))
297
- )
298
- ];
299
- }
300
- });
301
- const router = createVueRouter();
302
- setupGlobalComponents(app);
303
- const globalComputed = setupGlobalComputed(app, router, clientConfigs);
304
- if (__VUEPRESS_DEV__ || __VUE_PROD_DEVTOOLS__) {
305
- const { setupDevtools } = await import("./setupDevtools-X4YFRK4B.js");
306
- setupDevtools(app, globalComputed);
307
- }
308
- for (const clientConfig of clientConfigs) {
309
- await clientConfig.enhance?.({ app, router, siteData });
310
- }
311
- app.use(router);
312
- return {
313
- app,
314
- router
315
- };
165
+ /**
166
+ * Auto update head and provide as global util
167
+ */
168
+ const setupUpdateHead = () => {
169
+ const head = usePageHead();
170
+ const lang = usePageLang();
171
+ if (__VUEPRESS_SSR__) {
172
+ const ssrContext = useSSRContext();
173
+ if (ssrContext) {
174
+ ssrContext.head = head.value;
175
+ ssrContext.lang = lang.value;
176
+ }
177
+ return;
178
+ }
179
+ let managedHeadElements = [];
180
+ /**
181
+ * Take over the existing head elements
182
+ */
183
+ const takeOverHeadElements = () => {
184
+ head.value.forEach((item) => {
185
+ const headElement = queryHeadElement(item);
186
+ if (headElement) managedHeadElements.push(headElement);
187
+ });
188
+ };
189
+ /**
190
+ * Generate head elements from current head config
191
+ */
192
+ const generateHeadElements = () => {
193
+ const result = [];
194
+ head.value.forEach((item) => {
195
+ const headElement = createHeadElement(item);
196
+ if (headElement) result.push(headElement);
197
+ });
198
+ return result;
199
+ };
200
+ /**
201
+ * Update head elements
202
+ */
203
+ const updateHead = () => {
204
+ document.documentElement.lang = lang.value;
205
+ const newHeadElements = generateHeadElements();
206
+ managedHeadElements.forEach((oldEl, oldIndex) => {
207
+ const matchedIndex = newHeadElements.findIndex((newEl) => oldEl.isEqualNode(newEl));
208
+ if (matchedIndex === -1) {
209
+ oldEl.remove();
210
+ delete managedHeadElements[oldIndex];
211
+ } else newHeadElements.splice(matchedIndex, 1);
212
+ });
213
+ newHeadElements.forEach((el) => document.head.appendChild(el));
214
+ managedHeadElements = [...managedHeadElements.filter((item) => !!item), ...newHeadElements];
215
+ };
216
+ provide(updateHeadSymbol, updateHead);
217
+ onMounted(() => {
218
+ if (!__VUEPRESS_DEV__) takeOverHeadElements();
219
+ watch(head, updateHead, { immediate: __VUEPRESS_DEV__ });
220
+ });
316
221
  };
317
- if (!__VUEPRESS_SSR__) {
318
- createVueApp().then(({ app, router }) => {
319
- router.isReady().then(() => {
320
- app.mount("#app");
321
- });
322
- });
323
- }
324
- export {
325
- createVueApp
222
+ //#endregion
223
+ //#region src/app.ts
224
+ /**
225
+ * - use `createApp` in dev mode
226
+ * - use `createSSRApp` in build mode
227
+ */
228
+ const appCreator = __VUEPRESS_DEV__ ? createApp : createSSRApp;
229
+ const createVueApp = async () => {
230
+ const app = appCreator({
231
+ name: "Vuepress",
232
+ setup() {
233
+ setupUpdateHead();
234
+ for (const clientConfig of clientConfigs) clientConfig.setup?.();
235
+ const clientRootComponents = clientConfigs.flatMap(({ rootComponents = [] }) => rootComponents.map((component) => h(component)));
236
+ const pageLayout = usePageLayout();
237
+ return () => [h(pageLayout.value), clientRootComponents];
238
+ }
239
+ });
240
+ const router = createVueRouter();
241
+ setupGlobalComponents(app);
242
+ const globalComputed = setupGlobalComputed(app, router, clientConfigs);
243
+ if (__VUEPRESS_DEV__ || __VUE_PROD_DEVTOOLS__) {
244
+ const { setupDevtools } = await import("./setupDevtools-DJemw8CK.js");
245
+ setupDevtools(app, globalComputed);
246
+ }
247
+ for (const clientConfig of clientConfigs) await clientConfig.enhance?.({
248
+ app,
249
+ router,
250
+ siteData: siteData$1
251
+ });
252
+ app.use(router);
253
+ return {
254
+ app,
255
+ router
256
+ };
326
257
  };
258
+ if (!__VUEPRESS_SSR__) createVueApp().then(({ app, router }) => {
259
+ router.isReady().then(() => {
260
+ app.mount("#app");
261
+ });
262
+ });
263
+ //#endregion
264
+ export { createVueApp };
@@ -0,0 +1,57 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
+ //#region src/devtools/constants.ts
3
+ var constants_exports = /* @__PURE__ */ __exportAll({
4
+ COMPONENT_STATE_TYPE: () => COMPONENT_STATE_TYPE,
5
+ INSPECTOR_ID: () => INSPECTOR_ID,
6
+ INSPECTOR_LABEL: () => INSPECTOR_LABEL,
7
+ INSPECTOR_NODES: () => INSPECTOR_NODES,
8
+ INSPECTOR_STATE_SECTION_NAME: () => INSPECTOR_STATE_SECTION_NAME,
9
+ PLUGIN_ID: () => PLUGIN_ID,
10
+ PLUGIN_LABEL: () => PLUGIN_LABEL
11
+ });
12
+ const PLUGIN_ID = "org.vuejs.vuepress";
13
+ const PLUGIN_LABEL = "VuePress";
14
+ const COMPONENT_STATE_TYPE = PLUGIN_LABEL;
15
+ const INSPECTOR_ID = PLUGIN_ID;
16
+ const INSPECTOR_LABEL = PLUGIN_LABEL;
17
+ const INSPECTOR_NODE_INTERNAL = {
18
+ id: "INTERNAL",
19
+ label: "Internal",
20
+ keys: [
21
+ "layouts",
22
+ "routes",
23
+ "redirects"
24
+ ]
25
+ };
26
+ const INSPECTOR_NODE_SITE = {
27
+ id: "SITE",
28
+ label: "Site",
29
+ keys: ["siteData", "siteLocaleData"]
30
+ };
31
+ const INSPECTOR_NODE_ROUTE = {
32
+ id: "ROUTE",
33
+ label: "Route",
34
+ keys: ["routePath", "routeLocale"]
35
+ };
36
+ const INSPECTOR_NODE_PAGE = {
37
+ id: "PAGE",
38
+ label: "Page",
39
+ keys: [
40
+ "pageData",
41
+ "pageFrontmatter",
42
+ "pageLang",
43
+ "pageHead",
44
+ "pageHeadTitle",
45
+ "pageLayout",
46
+ "pageComponent"
47
+ ]
48
+ };
49
+ const INSPECTOR_NODES = {
50
+ [INSPECTOR_NODE_INTERNAL.id]: INSPECTOR_NODE_INTERNAL,
51
+ [INSPECTOR_NODE_SITE.id]: INSPECTOR_NODE_SITE,
52
+ [INSPECTOR_NODE_ROUTE.id]: INSPECTOR_NODE_ROUTE,
53
+ [INSPECTOR_NODE_PAGE.id]: INSPECTOR_NODE_PAGE
54
+ };
55
+ const INSPECTOR_STATE_SECTION_NAME = "State";
56
+ //#endregion
57
+ export { INSPECTOR_STATE_SECTION_NAME as a, constants_exports as c, INSPECTOR_NODES as i, INSPECTOR_ID as n, PLUGIN_ID as o, INSPECTOR_LABEL as r, PLUGIN_LABEL as s, COMPONENT_STATE_TYPE as t };