@rspress/runtime 0.0.0-next-20240620083724 → 0.0.0-next-20241010114926

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/NoSSR.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare function NoSSR(props: {
3
2
  children: React.ReactNode;
4
- }): JSX.Element | null;
3
+ }): import("react/jsx-runtime").JSX.Element | null;
package/dist/hooks.d.ts CHANGED
@@ -22,7 +22,7 @@ export declare function useDark(): boolean;
22
22
  export declare function useI18n<T = Record<string, Record<string, string>>>(): (key: keyof T) => any;
23
23
  declare global {
24
24
  interface Document {
25
- startViewTransition: (callback: () => void) => void;
25
+ startViewTransition: (callback: () => void) => any;
26
26
  }
27
27
  }
28
28
  export declare function useViewTransition(dom: ReactElement): ReactElement<any, string | import("react").JSXElementConstructor<any>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/runtime",
3
- "version": "0.0.0-next-20240620083724",
3
+ "version": "0.0.0-next-20241010114926",
4
4
  "description": "The Runtime of Rspress Documentation Framework",
5
5
  "bugs": "https://github.com/web-infra-dev/rspress/issues",
6
6
  "repository": {
@@ -25,18 +25,18 @@
25
25
  "node": ">=14.17.6"
26
26
  },
27
27
  "dependencies": {
28
- "react": "^18.2.0",
29
- "react-dom": "^18.2.0",
28
+ "react": "^18.3.1",
29
+ "react-dom": "^18.3.1",
30
30
  "react-helmet-async": "^1.3.0",
31
- "react-router-dom": "^6.8.1",
32
- "@rspress/shared": "0.0.0-next-20240620083724"
31
+ "react-router-dom": "^6.26.2",
32
+ "@rspress/shared": "0.0.0-next-20241010114926"
33
33
  },
34
34
  "devDependencies": {
35
- "@modern-js/tsconfig": "2.53.0",
36
- "@types/jest": "~29.5.12",
37
- "@types/react": "^18",
38
- "@types/react-dom": "^18",
39
- "typescript": "^5"
35
+ "@modern-js/tsconfig": "2.60.2",
36
+ "@types/jest": "~29.5.13",
37
+ "@types/react": "^18.3.11",
38
+ "@types/react-dom": "^18.3.0",
39
+ "typescript": "^5.5.3"
40
40
  },
41
41
  "sideEffects": [
42
42
  "*.css",
package/src/hooks.ts CHANGED
@@ -58,7 +58,8 @@ export function useI18n<T = Record<string, Record<string, string>>>() {
58
58
 
59
59
  declare global {
60
60
  interface Document {
61
- startViewTransition: (callback: () => void) => void;
61
+ // @ts-ignore view-transition new API type is failed in tsc, but it works in vscode
62
+ startViewTransition: (callback: () => void) => any;
62
63
  }
63
64
  }
64
65
 
package/src/utils.ts CHANGED
@@ -43,7 +43,11 @@ export function normalizeImagePath(imagePath: string) {
43
43
  if (!isProd) {
44
44
  return imagePath;
45
45
  }
46
- if (isExternalUrl(imagePath) || isDataUrl(imagePath) || imagePath.startsWith('//')) {
46
+ if (
47
+ isExternalUrl(imagePath) ||
48
+ isDataUrl(imagePath) ||
49
+ imagePath.startsWith('//')
50
+ ) {
47
51
  return imagePath;
48
52
  }
49
53
  // only append base to internal non-relative urls