@rspress/runtime 2.0.0-beta.13 → 2.0.0-beta.15

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/Content.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { Fragment, jsx } from "react/jsx-runtime";
2
2
  import { Suspense, memo, useMemo } from "react";
3
3
  import { useLocation } from "react-router-dom";
4
- import external_virtual_site_data_default from "virtual-site-data";
4
+ import virtual_site_data from "virtual-site-data";
5
5
  import { useViewTransition } from "./hooks.js";
6
6
  import { pathnameToRouteService } from "./route.js";
7
7
  function TransitionContentImpl(props) {
8
8
  let element = props.el;
9
- if (external_virtual_site_data_default?.themeConfig?.enableContentAnimation) element = useViewTransition(props.el);
9
+ if (virtual_site_data?.themeConfig?.enableContentAnimation) element = useViewTransition(props.el);
10
10
  return element;
11
11
  }
12
12
  const TransitionContent = /*#__PURE__*/ memo(TransitionContentImpl, (prevProps, nextProps)=>prevProps.el === nextProps.el);
package/dist/hooks.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createContext, useCallback, useContext, useLayoutEffect, useState } from "react";
2
2
  import { flushSync } from "react-dom";
3
- import external_virtual_i18n_text_default from "virtual-i18n-text";
3
+ import virtual_i18n_text from "virtual-i18n-text";
4
4
  const DataContext = createContext({});
5
5
  const ThemeContext = createContext({});
6
6
  function usePageData() {
@@ -21,7 +21,7 @@ function useDark() {
21
21
  }
22
22
  function useI18n() {
23
23
  const lang = useLang();
24
- return useCallback((key)=>external_virtual_i18n_text_default[key][lang], [
24
+ return useCallback((key)=>virtual_i18n_text[key][lang], [
25
25
  lang
26
26
  ]);
27
27
  }
package/dist/utils.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { addLeadingSlash, isDataUrl, isExternalUrl, isProduction, normalizeHref, normalizeSlash, removeBase, removeHash, removeTrailingSlash, withBase } from "@rspress/shared";
2
- import external_virtual_site_data_default from "virtual-site-data";
2
+ import virtual_site_data from "virtual-site-data";
3
3
  function utils_withBase(url = '/') {
4
- return withBase(url, external_virtual_site_data_default.base);
4
+ return withBase(url, virtual_site_data.base);
5
5
  }
6
6
  function utils_removeBase(url) {
7
- return removeBase(url, external_virtual_site_data_default.base);
7
+ return removeBase(url, virtual_site_data.base);
8
8
  }
9
9
  function isEqualPath(a, b) {
10
10
  return utils_withBase(normalizeHrefInRuntime(removeHash(a))) === utils_withBase(normalizeHrefInRuntime(removeHash(b)));
11
11
  }
12
12
  function normalizeHrefInRuntime(a) {
13
- const cleanUrls = Boolean(external_virtual_site_data_default?.route?.cleanUrls);
13
+ const cleanUrls = Boolean(virtual_site_data?.route?.cleanUrls);
14
14
  return normalizeHref(a, cleanUrls);
15
15
  }
16
16
  function normalizeImagePath(imagePath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/runtime",
3
- "version": "2.0.0-beta.13",
3
+ "version": "2.0.0-beta.15",
4
4
  "description": "The Runtime of Rspress Documentation Framework",
5
5
  "bugs": "https://github.com/web-infra-dev/rspress/issues",
6
6
  "repository": {
@@ -37,13 +37,13 @@
37
37
  "react": "^19.1.0",
38
38
  "react-dom": "^19.1.0",
39
39
  "react-router-dom": "^6.29.0",
40
- "@rspress/shared": "2.0.0-beta.13"
40
+ "@rspress/shared": "2.0.0-beta.15"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@rsbuild/plugin-react": "~1.3.2",
44
- "@rslib/core": "0.9.2",
44
+ "@rslib/core": "0.10.0",
45
45
  "@types/jest": "~29.5.14",
46
- "@types/react": "^19.1.6",
46
+ "@types/react": "^19.1.8",
47
47
  "@types/react-dom": "^19.1.6",
48
48
  "rsbuild-plugin-publint": "^0.3.2",
49
49
  "typescript": "^5.8.2",