@vuepress/client 2.0.0-beta.45 → 2.0.0-beta.46
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-RTLFYRTT.js → chunk-HEGD2UVF.js} +18 -23
- package/dist/index.d.ts +17 -3
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/dist/app.js
CHANGED
|
@@ -151,6 +151,7 @@ var resolvers = reactive({
|
|
|
151
151
|
// src/components/ClientOnly.ts
|
|
152
152
|
import { defineComponent, onMounted, ref as ref4 } from "vue";
|
|
153
153
|
var ClientOnly = defineComponent({
|
|
154
|
+
name: "ClientOnly",
|
|
154
155
|
setup(_, ctx) {
|
|
155
156
|
const isMounted = ref4(false);
|
|
156
157
|
onMounted(() => {
|
|
@@ -162,38 +163,32 @@ var ClientOnly = defineComponent({
|
|
|
162
163
|
|
|
163
164
|
// src/components/Content.ts
|
|
164
165
|
import { pagesComponents } from "@internal/pagesComponents";
|
|
165
|
-
import { h } from "vue";
|
|
166
|
-
var Content = (
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
166
|
+
import { computed, defineComponent as defineComponent2, h } from "vue";
|
|
167
|
+
var Content = defineComponent2({
|
|
168
|
+
name: "Content",
|
|
169
|
+
props: {
|
|
170
|
+
pageKey: {
|
|
171
|
+
type: String,
|
|
172
|
+
required: false,
|
|
173
|
+
default: ""
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
setup(props) {
|
|
171
177
|
const page = usePageData();
|
|
172
|
-
|
|
178
|
+
const pageComponent = computed(() => pagesComponents[props.pageKey || page.value.key]);
|
|
179
|
+
return () => pageComponent.value ? h(pageComponent.value) : h("div", __VUEPRESS_DEV__ ? "Page does not exist. This is a fallback content." : "404 Not Found");
|
|
173
180
|
}
|
|
174
|
-
|
|
175
|
-
if (component) {
|
|
176
|
-
return h(component);
|
|
177
|
-
}
|
|
178
|
-
return h("div", __VUEPRESS_DEV__ ? "Page does not exist. This is a fallback content." : "404 Not Found");
|
|
179
|
-
};
|
|
180
|
-
Content.displayName = "Content";
|
|
181
|
-
Content.props = {
|
|
182
|
-
pageKey: {
|
|
183
|
-
type: String,
|
|
184
|
-
required: false
|
|
185
|
-
}
|
|
186
|
-
};
|
|
181
|
+
});
|
|
187
182
|
|
|
188
183
|
// src/components/Vuepress.ts
|
|
189
184
|
import { layoutComponents } from "@internal/layoutComponents";
|
|
190
185
|
import { isString as isString2 } from "@vuepress/shared";
|
|
191
|
-
import { computed, defineComponent as
|
|
192
|
-
var Vuepress =
|
|
186
|
+
import { computed as computed2, defineComponent as defineComponent3, h as h2, resolveComponent } from "vue";
|
|
187
|
+
var Vuepress = defineComponent3({
|
|
193
188
|
name: "Vuepress",
|
|
194
189
|
setup() {
|
|
195
190
|
const page = usePageData();
|
|
196
|
-
const layoutComponent =
|
|
191
|
+
const layoutComponent = computed2(() => {
|
|
197
192
|
let layoutName;
|
|
198
193
|
if (page.value.path) {
|
|
199
194
|
const frontmatterLayout = page.value.frontmatter.layout;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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, ComponentOptions
|
|
4
|
+
import { Ref, ComputedRef, InjectionKey, App, ComponentOptions } from 'vue';
|
|
5
5
|
import { Router } from 'vue-router';
|
|
6
6
|
export { C as CreateVueAppFunction } from './createVueAppFunction-c8e67ca1.js';
|
|
7
7
|
|
|
@@ -196,8 +196,22 @@ declare const ClientOnly: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNo
|
|
|
196
196
|
/**
|
|
197
197
|
* Markdown rendered content
|
|
198
198
|
*/
|
|
199
|
-
declare const Content:
|
|
200
|
-
pageKey
|
|
199
|
+
declare const Content: vue.DefineComponent<{
|
|
200
|
+
pageKey: {
|
|
201
|
+
type: StringConstructor;
|
|
202
|
+
required: false;
|
|
203
|
+
default: string;
|
|
204
|
+
};
|
|
205
|
+
}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
206
|
+
[key: string]: any;
|
|
207
|
+
}>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
208
|
+
pageKey: {
|
|
209
|
+
type: StringConstructor;
|
|
210
|
+
required: false;
|
|
211
|
+
default: string;
|
|
212
|
+
};
|
|
213
|
+
}>>, {
|
|
214
|
+
pageKey: string;
|
|
201
215
|
}>;
|
|
202
216
|
|
|
203
217
|
/**
|
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.46",
|
|
4
4
|
"description": "Client package of VuePress",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vuepress",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@vue/devtools-api": "^6.1.4",
|
|
37
|
-
"@vuepress/shared": "2.0.0-beta.
|
|
38
|
-
"vue": "^3.2.
|
|
37
|
+
"@vuepress/shared": "2.0.0-beta.46",
|
|
38
|
+
"vue": "^3.2.35",
|
|
39
39
|
"vue-router": "^4.0.15"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|