@rspress/runtime 2.0.0-beta.10 → 2.0.0-beta.11

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,5 +1,4 @@
1
1
  import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
2
- import * as __WEBPACK_EXTERNAL_MODULE__rspress_shared_baa012d0__ from "@rspress/shared";
3
2
  import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
4
3
  import * as __WEBPACK_EXTERNAL_MODULE_react_router_dom_5358f3fe__ from "react-router-dom";
5
4
  import * as __WEBPACK_EXTERNAL_MODULE_virtual_site_data_fa42d4c0__ from "virtual-site-data";
@@ -19,10 +18,6 @@ const Content = ({ fallback = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_
19
18
  }, [
20
19
  pathname
21
20
  ]);
22
- if (!matchedElement) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {});
23
- if (!(0, __WEBPACK_EXTERNAL_MODULE__rspress_shared_baa012d0__.inBrowser)()) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(TransitionContent, {
24
- el: matchedElement
25
- });
26
21
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_react__.Suspense, {
27
22
  fallback: fallback,
28
23
  children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(TransitionContent, {
package/dist/hooks.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { PageData } from '@rspress/shared';
2
- import { type ReactElement } from 'react';
2
+ import { type ReactNode } from 'react';
3
3
  declare global {
4
4
  interface Window {
5
5
  __MODERN_PAGE_DATA__: any;
@@ -20,7 +20,7 @@ export declare function useLang(): string;
20
20
  export declare function useVersion(): string;
21
21
  export declare function useDark(): boolean;
22
22
  export declare function useI18n<T = Record<string, Record<string, string>>>(): (key: keyof T) => any;
23
- export declare function useViewTransition(dom: ReactElement): ReactElement<any, string | import("react").JSXElementConstructor<any>>;
23
+ export declare function useViewTransition(dom: ReactNode): string | number | bigint | boolean | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | import("react").ReactPortal | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
24
24
  export declare function useWindowSize(initialWidth?: number, initialHeight?: number): {
25
25
  width: number;
26
26
  height: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/runtime",
3
- "version": "2.0.0-beta.10",
3
+ "version": "2.0.0-beta.11",
4
4
  "description": "The Runtime of Rspress Documentation Framework",
5
5
  "bugs": "https://github.com/web-infra-dev/rspress/issues",
6
6
  "repository": {
@@ -37,14 +37,14 @@
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.10"
40
+ "@rspress/shared": "2.0.0-beta.11"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@rsbuild/plugin-react": "~1.3.1",
44
44
  "@rslib/core": "0.8.0",
45
45
  "@types/jest": "~29.5.14",
46
- "@types/react": "^18.3.22",
47
- "@types/react-dom": "^18.3.7",
46
+ "@types/react": "^19.1.6",
47
+ "@types/react-dom": "^19.1.6",
48
48
  "rsbuild-plugin-publint": "^0.3.2",
49
49
  "typescript": "^5.8.2",
50
50
  "@rspress/config": "1.0.0"