@vuepress/client 2.0.0-beta.50 → 2.0.0-beta.51
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 +1 -1
- package/dist/{chunk-V3MKNX2O.js → chunk-O5XLV5GU.js} +14 -5
- package/dist/index.d.ts +5 -1
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/dist/app.js
CHANGED
|
@@ -200,9 +200,18 @@ var Content = defineComponent2({
|
|
|
200
200
|
});
|
|
201
201
|
|
|
202
202
|
// src/components/Vuepress.ts
|
|
203
|
-
import {
|
|
203
|
+
import { clientConfigs } from "@internal/clientConfigs";
|
|
204
204
|
import { isString as isString2 } from "@vuepress/shared";
|
|
205
|
-
import { computed as computed2, defineComponent as defineComponent3, h as h2
|
|
205
|
+
import { computed as computed2, defineComponent as defineComponent3, h as h2 } from "vue";
|
|
206
|
+
var LAYOUT_NAME_DEFAULT = "Layout";
|
|
207
|
+
var LAYOUT_NAME_NOT_FOUND = "NotFound";
|
|
208
|
+
var layouts = clientConfigs.reduce(
|
|
209
|
+
(prev, item) => ({
|
|
210
|
+
...prev,
|
|
211
|
+
...item.layouts
|
|
212
|
+
}),
|
|
213
|
+
{}
|
|
214
|
+
);
|
|
206
215
|
var Vuepress = defineComponent3({
|
|
207
216
|
name: "Vuepress",
|
|
208
217
|
setup() {
|
|
@@ -214,12 +223,12 @@ var Vuepress = defineComponent3({
|
|
|
214
223
|
if (isString2(frontmatterLayout)) {
|
|
215
224
|
layoutName = frontmatterLayout;
|
|
216
225
|
} else {
|
|
217
|
-
layoutName =
|
|
226
|
+
layoutName = LAYOUT_NAME_DEFAULT;
|
|
218
227
|
}
|
|
219
228
|
} else {
|
|
220
|
-
layoutName =
|
|
229
|
+
layoutName = LAYOUT_NAME_NOT_FOUND;
|
|
221
230
|
}
|
|
222
|
-
return
|
|
231
|
+
return layouts[layoutName];
|
|
223
232
|
});
|
|
224
233
|
return () => h2(layoutComponent.value);
|
|
225
234
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -214,6 +214,10 @@ interface ClientConfig {
|
|
|
214
214
|
* A function to be called inside the setup function of vue app
|
|
215
215
|
*/
|
|
216
216
|
setup?: () => void;
|
|
217
|
+
/**
|
|
218
|
+
* Layout components
|
|
219
|
+
*/
|
|
220
|
+
layouts?: Record<string, Component>;
|
|
217
221
|
/**
|
|
218
222
|
* Components to be placed directly into the root node of vue app
|
|
219
223
|
*/
|
|
@@ -235,7 +239,7 @@ declare type PageRouteItem = [
|
|
|
235
239
|
/**
|
|
236
240
|
* A helper function to help you define vuepress client config file
|
|
237
241
|
*/
|
|
238
|
-
declare const defineClientConfig: (clientConfig
|
|
242
|
+
declare const defineClientConfig: (clientConfig?: ClientConfig) => ClientConfig;
|
|
239
243
|
|
|
240
244
|
/**
|
|
241
245
|
* Resolver methods to get global computed
|
package/dist/index.js
CHANGED
|
@@ -25,10 +25,10 @@ import {
|
|
|
25
25
|
useSiteLocaleData,
|
|
26
26
|
useUpdateHead,
|
|
27
27
|
withBase
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-O5XLV5GU.js";
|
|
29
29
|
|
|
30
30
|
// src/helpers/defineClientConfig.ts
|
|
31
|
-
var defineClientConfig = (clientConfig) => clientConfig;
|
|
31
|
+
var defineClientConfig = (clientConfig = {}) => clientConfig;
|
|
32
32
|
export {
|
|
33
33
|
ClientOnly,
|
|
34
34
|
Content,
|
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.51",
|
|
4
4
|
"description": "Client package of VuePress",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vuepress",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@vue/devtools-api": "^6.2.1",
|
|
37
|
-
"@vuepress/shared": "2.0.0-beta.
|
|
37
|
+
"@vuepress/shared": "2.0.0-beta.51",
|
|
38
38
|
"vue": "^3.2.37",
|
|
39
39
|
"vue-router": "^4.1.4"
|
|
40
40
|
},
|