@vuepress/client 2.0.0-beta.46 → 2.0.0-beta.49
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.js +29 -5
- package/dist/{chunk-HEGD2UVF.js → chunk-OOQFWU6B.js} +0 -0
- package/dist/index.d.ts +11 -4
- package/dist/index.js +1 -1
- package/package.json +5 -5
package/dist/app.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClientOnly,
|
|
3
3
|
Content,
|
|
4
|
+
Vuepress,
|
|
4
5
|
pageData,
|
|
5
6
|
pageFrontmatterSymbol,
|
|
6
7
|
pageHeadSymbol,
|
|
@@ -14,7 +15,7 @@ import {
|
|
|
14
15
|
usePageHead,
|
|
15
16
|
usePageLang,
|
|
16
17
|
withBase
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-OOQFWU6B.js";
|
|
18
19
|
|
|
19
20
|
// src/app.ts
|
|
20
21
|
import { clientConfigs } from "@internal/clientConfigs";
|
|
@@ -23,7 +24,6 @@ import { RouterView } from "vue-router";
|
|
|
23
24
|
|
|
24
25
|
// src/router.ts
|
|
25
26
|
import { pagesComponents } from "@internal/pagesComponents";
|
|
26
|
-
import { pagesRoutes } from "@internal/pagesRoutes";
|
|
27
27
|
import { removeEndingSlash } from "@vuepress/shared";
|
|
28
28
|
import {
|
|
29
29
|
createMemoryHistory,
|
|
@@ -31,11 +31,34 @@ import {
|
|
|
31
31
|
createWebHistory,
|
|
32
32
|
START_LOCATION
|
|
33
33
|
} from "vue-router";
|
|
34
|
+
|
|
35
|
+
// src/routes.ts
|
|
36
|
+
import { pagesRoutes } from "@internal/pagesRoutes";
|
|
37
|
+
var createRoutes = () => pagesRoutes.reduce((result, [name, path, meta, redirects]) => {
|
|
38
|
+
result.push({
|
|
39
|
+
name,
|
|
40
|
+
path,
|
|
41
|
+
component: Vuepress,
|
|
42
|
+
meta
|
|
43
|
+
}, ...redirects.map((item) => ({
|
|
44
|
+
path: item,
|
|
45
|
+
redirect: path
|
|
46
|
+
})));
|
|
47
|
+
return result;
|
|
48
|
+
}, [
|
|
49
|
+
{
|
|
50
|
+
name: "404",
|
|
51
|
+
path: "/:catchAll(.*)",
|
|
52
|
+
component: Vuepress
|
|
53
|
+
}
|
|
54
|
+
]);
|
|
55
|
+
|
|
56
|
+
// src/router.ts
|
|
34
57
|
var historyCreator = __VUEPRESS_SSR__ ? createMemoryHistory : createWebHistory;
|
|
35
58
|
var createVueRouter = () => {
|
|
36
59
|
const router = createRouter({
|
|
37
60
|
history: historyCreator(removeEndingSlash(siteData.value.base)),
|
|
38
|
-
routes:
|
|
61
|
+
routes: createRoutes(),
|
|
39
62
|
scrollBehavior: (to, from, savedPosition) => {
|
|
40
63
|
if (savedPosition)
|
|
41
64
|
return savedPosition;
|
|
@@ -58,6 +81,7 @@ var createVueRouter = () => {
|
|
|
58
81
|
|
|
59
82
|
// src/setupDevtools.ts
|
|
60
83
|
import { setupDevtoolsPlugin } from "@vue/devtools-api";
|
|
84
|
+
var COMPONENT_STATE_TYPE = "VuePress";
|
|
61
85
|
var setupDevtools = (app, globalComputed) => {
|
|
62
86
|
setupDevtoolsPlugin({
|
|
63
87
|
app,
|
|
@@ -66,11 +90,11 @@ var setupDevtools = (app, globalComputed) => {
|
|
|
66
90
|
packageName: "@vuepress/client",
|
|
67
91
|
homepage: "https://v2.vuepress.vuejs.org",
|
|
68
92
|
logo: "https://v2.vuepress.vuejs.org/images/hero.png",
|
|
69
|
-
componentStateTypes: [
|
|
93
|
+
componentStateTypes: [COMPONENT_STATE_TYPE]
|
|
70
94
|
}, (api) => {
|
|
71
95
|
api.on.inspectComponent((payload) => {
|
|
72
96
|
payload.instanceData.state.push(...Object.entries(globalComputed).map(([name, item]) => ({
|
|
73
|
-
type:
|
|
97
|
+
type: COMPONENT_STATE_TYPE,
|
|
74
98
|
key: name,
|
|
75
99
|
editable: false,
|
|
76
100
|
value: item.value
|
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PageData, PageFrontmatter, HeadConfig, SiteData } from '@vuepress/shared';
|
|
2
2
|
export { PageData, PageFrontmatter, PageHeader, SiteData } from '@vuepress/shared';
|
|
3
3
|
import * as vue from 'vue';
|
|
4
|
-
import { Ref, ComputedRef, InjectionKey, App,
|
|
5
|
-
import { Router } from 'vue-router';
|
|
4
|
+
import { Ref, ComputedRef, InjectionKey, App, Component } from 'vue';
|
|
5
|
+
import { Router, RouteMeta } from 'vue-router';
|
|
6
6
|
export { C as CreateVueAppFunction } from './createVueAppFunction-c8e67ca1.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -186,9 +186,16 @@ interface ClientConfig {
|
|
|
186
186
|
/**
|
|
187
187
|
* Components to be placed directly into the root node of vue app
|
|
188
188
|
*/
|
|
189
|
-
rootComponents?:
|
|
189
|
+
rootComponents?: Component[];
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
+
declare type PageRouteItem = [
|
|
193
|
+
name: string,
|
|
194
|
+
path: string,
|
|
195
|
+
meta: RouteMeta,
|
|
196
|
+
redirects: string[]
|
|
197
|
+
];
|
|
198
|
+
|
|
192
199
|
declare const ClientOnly: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
193
200
|
[key: string]: any;
|
|
194
201
|
}>[] | null | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{}>>, {}>;
|
|
@@ -246,4 +253,4 @@ declare const resolvers: {
|
|
|
246
253
|
*/
|
|
247
254
|
declare const withBase: (url: string) => string;
|
|
248
255
|
|
|
249
|
-
export { ClientConfig, ClientOnly, Content, PageDataRef, PageFrontmatterRef, PageHead, PageHeadRef, PageHeadTitle, PageHeadTitleRef, PageLang, PageLangRef, PagesData, PagesDataRef, RouteLocale, RouteLocaleRef, SiteDataRef, SiteLocaleData, SiteLocaleDataRef, UpdateHead, Vuepress, defineClientConfig, pageData, pageDataEmpty, pageFrontmatterSymbol, pageHeadSymbol, pageHeadTitleSymbol, pageLangSymbol, pagesData, resolvers, routeLocaleSymbol, siteData, siteLocaleDataSymbol, updateHeadSymbol, usePageData, usePageFrontmatter, usePageHead, usePageHeadTitle, usePageLang, usePagesData, useRouteLocale, useSiteData, useSiteLocaleData, useUpdateHead, withBase };
|
|
256
|
+
export { ClientConfig, ClientOnly, Content, PageDataRef, PageFrontmatterRef, PageHead, PageHeadRef, PageHeadTitle, PageHeadTitleRef, PageLang, PageLangRef, PageRouteItem, PagesData, PagesDataRef, RouteLocale, RouteLocaleRef, SiteDataRef, SiteLocaleData, SiteLocaleDataRef, UpdateHead, Vuepress, defineClientConfig, pageData, pageDataEmpty, pageFrontmatterSymbol, pageHeadSymbol, pageHeadTitleSymbol, pageLangSymbol, pagesData, resolvers, routeLocaleSymbol, siteData, siteLocaleDataSymbol, updateHeadSymbol, usePageData, usePageFrontmatter, usePageHead, usePageHeadTitle, usePageLang, usePagesData, useRouteLocale, useSiteData, useSiteLocaleData, useUpdateHead, withBase };
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuepress/client",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.49",
|
|
4
4
|
"description": "Client package of VuePress",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vuepress",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"types.d.ts"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@vue/devtools-api": "^6.
|
|
37
|
-
"@vuepress/shared": "2.0.0-beta.
|
|
38
|
-
"vue": "^3.2.
|
|
39
|
-
"vue-router": "^4.
|
|
36
|
+
"@vue/devtools-api": "^6.2.0",
|
|
37
|
+
"@vuepress/shared": "2.0.0-beta.49",
|
|
38
|
+
"vue": "^3.2.37",
|
|
39
|
+
"vue-router": "^4.1.2"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|