@vuepress/client 2.0.0-beta.55 → 2.0.0-beta.57

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 CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  usePageHead,
16
16
  usePageLang,
17
17
  withBase
18
- } from "./chunk-YRWD2ESJ.js";
18
+ } from "./chunk-5XHTLU25.js";
19
19
 
20
20
  // src/app.ts
21
21
  import { createApp, createSSRApp, h as h2 } from "vue";
@@ -105,7 +105,7 @@ var createRoutes = async () => {
105
105
  var historyCreator = __VUEPRESS_SSR__ ? createMemoryHistory : createWebHistory;
106
106
  var createVueRouter = async () => {
107
107
  const router = createRouter({
108
- history: historyCreator(removeEndingSlash(siteData.value.base)),
108
+ history: historyCreator(removeEndingSlash(__VUEPRESS_BASE__)),
109
109
  routes: await createRoutes(),
110
110
  scrollBehavior: (to, from, savedPosition) => {
111
111
  if (savedPosition)
@@ -12,7 +12,6 @@ var pageDataEmpty = readonly({
12
12
  title: "",
13
13
  lang: "",
14
14
  frontmatter: {},
15
- excerpt: "",
16
15
  headers: []
17
16
  });
18
17
  var pageData = ref2(pageDataEmpty);
@@ -199,13 +198,15 @@ var Content = defineComponent2({
199
198
  }
200
199
  });
201
200
 
202
- // src/withBase.ts
201
+ // src/helpers/defineClientConfig.ts
202
+ var defineClientConfig = (clientConfig = {}) => clientConfig;
203
+
204
+ // src/helpers/withBase.ts
203
205
  import { isLinkHttp, removeLeadingSlash } from "@vuepress/shared";
204
206
  var withBase = (url) => {
205
207
  if (isLinkHttp(url))
206
208
  return url;
207
- const base = useSiteData().value.base;
208
- return `${base}${removeLeadingSlash(url)}`;
209
+ return `${__VUEPRESS_BASE__}${removeLeadingSlash(url)}`;
209
210
  };
210
211
 
211
212
  export {
@@ -233,5 +234,6 @@ export {
233
234
  resolvers,
234
235
  ClientOnly,
235
236
  Content,
237
+ defineClientConfig,
236
238
  withBase
237
239
  };
package/dist/index.d.ts CHANGED
@@ -234,6 +234,11 @@ type PageRouteItem = [
234
234
  */
235
235
  declare const defineClientConfig: (clientConfig?: ClientConfig) => ClientConfig;
236
236
 
237
+ /**
238
+ * Prefix url with site base
239
+ */
240
+ declare const withBase: (url: string) => string;
241
+
237
242
  /**
238
243
  * Resolver methods to get global computed
239
244
  *
@@ -249,9 +254,4 @@ declare const resolvers: {
249
254
  resolveSiteLocaleData: (site: SiteData, routeLocale: RouteLocale) => SiteLocaleData;
250
255
  };
251
256
 
252
- /**
253
- * Prefix url with site base
254
- */
255
- declare const withBase: (url: string) => string;
256
-
257
257
  export { ClientConfig, ClientOnly, Content, CreateVueAppFunction, PageDataRef, PageFrontmatterRef, PageHead, PageHeadRef, PageHeadTitle, PageHeadTitleRef, PageLang, PageLangRef, PageRouteItem, PagesData, PagesDataRef, RouteLocale, RouteLocaleRef, SiteDataRef, SiteLocaleData, SiteLocaleDataRef, UpdateHead, 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
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  ClientOnly,
3
3
  Content,
4
+ defineClientConfig,
4
5
  pageData,
5
6
  pageDataEmpty,
6
7
  pageFrontmatterSymbol,
@@ -24,10 +25,7 @@ import {
24
25
  useSiteLocaleData,
25
26
  useUpdateHead,
26
27
  withBase
27
- } from "./chunk-YRWD2ESJ.js";
28
-
29
- // src/helpers/defineClientConfig.ts
30
- var defineClientConfig = (clientConfig = {}) => clientConfig;
28
+ } from "./chunk-5XHTLU25.js";
31
29
  export {
32
30
  ClientOnly,
33
31
  Content,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuepress/client",
3
- "version": "2.0.0-beta.55",
3
+ "version": "2.0.0-beta.57",
4
4
  "description": "Client package of VuePress",
5
5
  "keywords": [
6
6
  "vuepress",
@@ -36,7 +36,7 @@
36
36
  "@vue/devtools-api": "^6.4.5",
37
37
  "vue": "^3.2.45",
38
38
  "vue-router": "^4.1.6",
39
- "@vuepress/shared": "2.0.0-beta.55"
39
+ "@vuepress/shared": "2.0.0-beta.57"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public"
package/types.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  declare const __VUEPRESS_VERSION__: string
2
+ declare const __VUEPRESS_BASE__: string
2
3
  declare const __VUEPRESS_DEV__: boolean
3
4
  declare const __VUEPRESS_SSR__: boolean
4
5
  declare const __VUE_HMR_RUNTIME__: Record<string, any>