@vuepress/client 2.0.0-rc.20 → 2.0.0-rc.21

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
@@ -12,7 +12,7 @@ import {
12
12
  usePageLang,
13
13
  usePageLayout,
14
14
  withBase
15
- } from "./chunk-TET3OVHF.js";
15
+ } from "./chunk-XDHI2EHH.js";
16
16
  import "./chunk-MLKGABMK.js";
17
17
 
18
18
  // src/app.ts
@@ -30,16 +30,13 @@ var useSiteLocaleData = () => useClientData().siteLocaleData;
30
30
  import { onUnmounted } from "vue";
31
31
 
32
32
  // src/internal/contentUpdatedCallbacks.ts
33
- import { shallowRef } from "vue";
34
- var contentUpdatedCallbacks = shallowRef([]);
33
+ var contentUpdatedCallbacks = /* @__PURE__ */ new Set();
35
34
 
36
35
  // src/composables/onContentUpdated.ts
37
36
  var onContentUpdated = (fn) => {
38
- contentUpdatedCallbacks.value.push(fn);
37
+ contentUpdatedCallbacks.add(fn);
39
38
  onUnmounted(() => {
40
- contentUpdatedCallbacks.value = contentUpdatedCallbacks.value.filter(
41
- (f) => f !== fn
42
- );
39
+ contentUpdatedCallbacks.delete(fn);
43
40
  });
44
41
  };
45
42
 
@@ -64,9 +61,9 @@ import {
64
61
  redirects as redirectsRaw,
65
62
  routes as routesRaw
66
63
  } from "@internal/routes";
67
- import { shallowRef as shallowRef2 } from "vue";
68
- var redirects = shallowRef2(redirectsRaw);
69
- var routes = shallowRef2(routesRaw);
64
+ import { shallowRef } from "vue";
65
+ var redirects = shallowRef(redirectsRaw);
66
+ var routes = shallowRef(routesRaw);
70
67
  if (__VUEPRESS_DEV__ && (import.meta.webpackHot || import.meta.hot)) {
71
68
  __VUE_HMR_RUNTIME__.updateRedirects = (data) => {
72
69
  redirects.value = data;
@@ -281,7 +278,7 @@ var ClientOnly = defineComponent3({
281
278
  // src/components/Content.ts
282
279
  import { computed as computed3, defineAsyncComponent, defineComponent as defineComponent4, h as h3, watch } from "vue";
283
280
  var runContentUpdatedCallbacks = (reason) => {
284
- contentUpdatedCallbacks.value.forEach((fn) => fn(reason));
281
+ contentUpdatedCallbacks.forEach((fn) => fn(reason));
285
282
  };
286
283
  var Content = defineComponent4({
287
284
  name: "Content",
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  useSiteLocaleData,
30
30
  useUpdateHead,
31
31
  withBase
32
- } from "./chunk-TET3OVHF.js";
32
+ } from "./chunk-XDHI2EHH.js";
33
33
  import {
34
34
  constants_exports
35
35
  } from "./chunk-XZCIWC7J.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuepress/client",
3
- "version": "2.0.0-rc.20",
3
+ "version": "2.0.0-rc.21",
4
4
  "description": "Client package of VuePress",
5
5
  "keywords": [
6
6
  "vuepress",
@@ -37,7 +37,7 @@
37
37
  "@vue/devtools-kit": "^7.7.2",
38
38
  "vue": "^3.5.13",
39
39
  "vue-router": "^4.5.0",
40
- "@vuepress/shared": "2.0.0-rc.20"
40
+ "@vuepress/shared": "2.0.0-rc.21"
41
41
  },
42
42
  "publishConfig": {
43
43
  "access": "public"