@rspress/runtime 2.0.0-beta.20 → 2.0.0-beta.22

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/hooks.js CHANGED
@@ -47,8 +47,8 @@ function useViewTransition(dom) {
47
47
  }
48
48
  function useWindowSize(initialWidth, initialHeight) {
49
49
  const [size, setSize] = useState({
50
- width: initialWidth ?? Number.POSITIVE_INFINITY,
51
- height: initialHeight ?? Number.POSITIVE_INFINITY
50
+ width: initialWidth ?? 1 / 0,
51
+ height: initialHeight ?? 1 / 0
52
52
  });
53
53
  useLayoutEffect(()=>{
54
54
  const handleResize = ()=>{
package/dist/utils.d.ts CHANGED
@@ -4,5 +4,4 @@ export declare function removeBase(url: string): string;
4
4
  export declare function isEqualPath(a: string, b: string): boolean;
5
5
  export declare function normalizeHrefInRuntime(a: string): string;
6
6
  export declare function normalizeImagePath(imagePath: string): string;
7
- export declare function isAbsoluteUrl(path: string): boolean;
8
7
  export { addLeadingSlash, removeTrailingSlash, normalizeSlash, isProduction };
package/dist/utils.js CHANGED
@@ -22,4 +22,4 @@ function normalizeImagePath(imagePath) {
22
22
  function isAbsoluteUrl(path) {
23
23
  return isExternalUrl(path) || isDataUrl(path) || path.startsWith('//');
24
24
  }
25
- export { addLeadingSlash, isAbsoluteUrl, isEqualPath, isProduction, normalizeHrefInRuntime, normalizeImagePath, normalizeSlash, utils_removeBase as removeBase, removeTrailingSlash, utils_withBase as withBase };
25
+ export { addLeadingSlash, isEqualPath, isProduction, normalizeHrefInRuntime, normalizeImagePath, normalizeSlash, utils_removeBase as removeBase, removeTrailingSlash, utils_withBase as withBase };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/runtime",
3
- "version": "2.0.0-beta.20",
3
+ "version": "2.0.0-beta.22",
4
4
  "description": "The Runtime of Rspress Documentation Framework",
5
5
  "bugs": "https://github.com/web-infra-dev/rspress/issues",
6
6
  "repository": {
@@ -37,11 +37,11 @@
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.20"
40
+ "@rspress/shared": "2.0.0-beta.22"
41
41
  },
42
42
  "devDependencies": {
43
- "@rsbuild/plugin-react": "~1.3.3",
44
- "@rslib/core": "0.10.4",
43
+ "@rsbuild/plugin-react": "~1.3.4",
44
+ "@rslib/core": "0.10.6",
45
45
  "@types/jest": "~29.5.14",
46
46
  "@types/react": "^19.1.8",
47
47
  "@types/react-dom": "^19.1.6",
package/server.js CHANGED
@@ -1,2 +1,2 @@
1
- export { StaticRouter } from 'react-router-dom/server';
1
+ export { StaticRouter } from 'react-router-dom/server.mjs';
2
2
  export { matchPath } from 'react-router-dom';