@rspress/runtime 1.23.0 → 1.24.0

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.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import { type ReactNode } from 'react';
2
2
  export declare const Content: ({ fallback }: {
3
3
  fallback?: ReactNode;
4
4
  }) => any;
package/dist/hooks.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { ReactElement } from 'react';
2
- import { PageData } from '@rspress/shared';
1
+ import { type ReactElement } from 'react';
2
+ import type { PageData } from '@rspress/shared';
3
3
  declare global {
4
4
  interface Window {
5
5
  __MODERN_PAGE_DATA__: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/runtime",
3
- "version": "1.23.0",
3
+ "version": "1.24.0",
4
4
  "description": "The Runtime of Rspress Documentation Framework",
5
5
  "bugs": "https://github.com/web-infra-dev/rspress/issues",
6
6
  "repository": {
@@ -29,10 +29,10 @@
29
29
  "react-dom": "^18.2.0",
30
30
  "react-helmet-async": "^1.3.0",
31
31
  "react-router-dom": "^6.8.1",
32
- "@rspress/shared": "1.23.0"
32
+ "@rspress/shared": "1.24.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@modern-js/tsconfig": "2.51.0",
35
+ "@modern-js/tsconfig": "2.52.0",
36
36
  "@types/jest": "~29.5.12",
37
37
  "@types/react": "^18",
38
38
  "@types/react-dom": "^18",
package/src/Content.tsx CHANGED
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-var-requires */
2
2
  /* eslint-disable @typescript-eslint/no-require-imports */
3
- import { ReactNode, Suspense, memo, ReactElement } from 'react';
3
+ import { type ReactNode, Suspense, memo, type ReactElement } from 'react';
4
4
  import { matchRoutes, useLocation } from 'react-router-dom';
5
5
  import siteData from 'virtual-site-data';
6
6
  import { normalizeRoutePath } from './utils';
package/src/hooks.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import {
2
- ReactElement,
2
+ type ReactElement,
3
3
  createContext,
4
4
  useCallback,
5
5
  useContext,
6
6
  useLayoutEffect,
7
7
  useState,
8
8
  } from 'react';
9
- import { PageData } from '@rspress/shared';
9
+ import type { PageData } from '@rspress/shared';
10
10
  import i18nTextData from 'virtual-i18n-text';
11
11
  import { flushSync } from 'react-dom';
12
12