@vuepress/client 2.0.0-beta.25 → 2.0.0-beta.29
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/lib/app.js +2 -2
- package/lib/components/ClientOnly.d.ts +1 -1
- package/lib/components/ClientOnly.js +1 -1
- package/lib/components/Vuepress.d.ts +1 -1
- package/lib/components/index.d.ts +0 -1
- package/lib/components/index.js +0 -1
- package/lib/composables/pageData.js +1 -1
- package/lib/composables/updateHead.js +4 -2
- package/lib/provideGlobalComputed.js +1 -1
- package/lib/registerGlobalComponents.js +1 -2
- package/package.json +7 -7
- package/lib/components/OutboundLink.css +0 -7
- package/lib/components/OutboundLink.d.ts +0 -3
- package/lib/components/OutboundLink.js +0 -24
package/lib/app.js
CHANGED
|
@@ -5,8 +5,8 @@ import { pagesComponents } from '@internal/pagesComponents';
|
|
|
5
5
|
import { pagesRoutes } from '@internal/pagesRoutes';
|
|
6
6
|
import { removeEndingSlash } from '@vuepress/shared';
|
|
7
7
|
import { createApp, createSSRApp, h } from 'vue';
|
|
8
|
-
import { createRouter, createWebHistory,
|
|
9
|
-
import {
|
|
8
|
+
import { createMemoryHistory, createRouter, createWebHistory, RouterView, START_LOCATION, } from 'vue-router';
|
|
9
|
+
import { pageData, resolvePageData, setupUpdateHead, siteData, } from './composables';
|
|
10
10
|
import { provideGlobalComputed } from './provideGlobalComputed';
|
|
11
11
|
import { registerGlobalComponents } from './registerGlobalComponents';
|
|
12
12
|
/**
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const ClientOnly: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
2
2
|
[key: string]: any;
|
|
3
|
-
}>[] | null | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{} & {} & {}
|
|
3
|
+
}>[] | null | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{} & {} & {}>, {}>;
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare const Vuepress: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
5
5
|
[key: string]: any;
|
|
6
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{} & {} & {}
|
|
6
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{} & {} & {}>, {}>;
|
package/lib/components/index.js
CHANGED
|
@@ -72,7 +72,8 @@ export const setupUpdateHead = () => {
|
|
|
72
72
|
* Query the matched head tag of head config
|
|
73
73
|
*/
|
|
74
74
|
export const queryHeadTag = ([tagName, attrs, content = '',]) => {
|
|
75
|
-
const attrsSelector = Object.entries(attrs)
|
|
75
|
+
const attrsSelector = Object.entries(attrs)
|
|
76
|
+
.map(([key, value]) => {
|
|
76
77
|
if (isString(value)) {
|
|
77
78
|
return `[${key}="${value}"]`;
|
|
78
79
|
}
|
|
@@ -80,7 +81,8 @@ export const queryHeadTag = ([tagName, attrs, content = '',]) => {
|
|
|
80
81
|
return `[${key}]`;
|
|
81
82
|
}
|
|
82
83
|
return '';
|
|
83
|
-
})
|
|
84
|
+
})
|
|
85
|
+
.join('');
|
|
84
86
|
const selector = `head > ${tagName}${attrsSelector}`;
|
|
85
87
|
const tags = Array.from(document.querySelectorAll(selector));
|
|
86
88
|
const matchedTag = tags.find((item) => item.innerText === content);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { pageData, pageFrontmatterSymbol, pageHeadSymbol, pageHeadTitleSymbol, pageLangSymbol, resolvePageFrontmatter, resolvePageHead, resolvePageHeadTitle, resolvePageLang, resolveRouteLocale, resolveSiteLocaleData, routeLocaleSymbol, siteData, siteLocaleDataSymbol, } from './composables';
|
|
3
3
|
import { withBase } from './utils';
|
|
4
4
|
/**
|
|
5
5
|
* Create and provide global computed
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClientOnly, Content
|
|
1
|
+
import { ClientOnly, Content } from './components';
|
|
2
2
|
/**
|
|
3
3
|
* Register global built-in components
|
|
4
4
|
*/
|
|
@@ -6,6 +6,5 @@ export const registerGlobalComponents = (app) => {
|
|
|
6
6
|
/* eslint-disable vue/match-component-file-name */
|
|
7
7
|
app.component('ClientOnly', ClientOnly);
|
|
8
8
|
app.component('Content', Content);
|
|
9
|
-
app.component('OutboundLink', OutboundLink);
|
|
10
9
|
/* eslint-enable vue/match-component-file-name */
|
|
11
10
|
};
|
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.29",
|
|
4
4
|
"description": "Client package of VuePress",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vuepress",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"copy": "cpx \"src/**/*.{d.ts,css}\" lib"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@vuepress/shared": "2.0.0-beta.
|
|
33
|
-
"vue": "^3.2.
|
|
34
|
-
"vue-router": "^4.0.
|
|
32
|
+
"@vuepress/shared": "2.0.0-beta.28",
|
|
33
|
+
"vue": "^3.2.24",
|
|
34
|
+
"vue-router": "^4.0.12"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@types/webpack-env": "^1.16.
|
|
38
|
-
"vite": "^2.
|
|
37
|
+
"@types/webpack-env": "^1.16.3",
|
|
38
|
+
"vite": "^2.7.1"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "2c6eb4270f96b6351cd1f565798bed1f662a6bb2"
|
|
44
44
|
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { h } from 'vue';
|
|
2
|
-
import './OutboundLink.css';
|
|
3
|
-
const svg = h('svg', {
|
|
4
|
-
class: 'icon outbound',
|
|
5
|
-
xmlns: 'http://www.w3.org/2000/svg',
|
|
6
|
-
ariaHidden: 'true',
|
|
7
|
-
focusable: 'false',
|
|
8
|
-
x: '0px',
|
|
9
|
-
y: '0px',
|
|
10
|
-
viewBox: '0 0 100 100',
|
|
11
|
-
width: '15',
|
|
12
|
-
height: '15',
|
|
13
|
-
}, [
|
|
14
|
-
h('path', {
|
|
15
|
-
fill: 'currentColor',
|
|
16
|
-
d: 'M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z',
|
|
17
|
-
}),
|
|
18
|
-
h('polygon', {
|
|
19
|
-
fill: 'currentColor',
|
|
20
|
-
points: '45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9',
|
|
21
|
-
}),
|
|
22
|
-
]);
|
|
23
|
-
export const OutboundLink = (_, { slots }) => { var _a; return h('span', [svg, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)]); };
|
|
24
|
-
OutboundLink.displayName = 'OutboundLink';
|