@rspress/shared 2.0.11 → 2.0.12

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.
@@ -1,6 +1,6 @@
1
- export declare const DEFAULT_CONFIG_EXTENSIONS: readonly [".js", ".ts", ".mjs", ".mts", ".cjs", ".cts"];
1
+ export declare const DEFAULT_CONFIG_EXTENSIONS: readonly ['.js', '.ts', '.mjs', '.mts', '.cjs', '.cts'];
2
2
 
3
- export declare const DEFAULT_CONFIG_NAME: "rspress.config";
3
+ export declare const DEFAULT_CONFIG_NAME: 'rspress.config';
4
4
 
5
5
  export declare const DEFAULT_PAGE_EXTENSIONS: string[];
6
6
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,8 @@
1
+ import type { ComponentType } from 'react';
1
2
  import type { loadConfig } from '@rsbuild/core';
2
3
  import type { PluggableList } from 'unified';
4
+ import type { ReactElement } from 'react';
5
+ import type { ReactNode } from 'react';
3
6
  import type { RehypeShikiOptions } from '@shikijs/rehype';
4
7
  import type { RsbuildConfig } from '@rsbuild/core';
5
8
 
@@ -205,12 +208,12 @@ export declare type LlmsUI = {
205
208
  */
206
209
  export declare type LlmsViewOption = 'markdownLink' | 'chatgpt' | 'claude' | {
207
210
  title: string;
208
- icon?: React.ReactNode;
211
+ icon?: ReactNode;
209
212
  onClick?: () => void;
210
213
  } | {
211
214
  title: string;
212
215
  href: string;
213
- icon?: React.ReactNode;
216
+ icon?: ReactNode;
214
217
  };
215
218
 
216
219
  export declare interface Locale {
@@ -416,7 +419,7 @@ export declare interface PageIndexInfo {
416
419
  _relativePath: string;
417
420
  }
418
421
 
419
- export declare interface PageModule<T extends React.ComponentType<unknown>> {
422
+ export declare interface PageModule<T extends ComponentType<unknown>> {
420
423
  default: T;
421
424
  frontmatter?: FrontMatterMeta;
422
425
  content?: string;
@@ -526,9 +529,9 @@ export declare function replaceVersion(rawUrl: string, version: {
526
529
 
527
530
  export declare interface Route {
528
531
  path: string;
529
- element: React.ReactElement;
532
+ element: ReactElement;
530
533
  filePath: string;
531
- preload: () => Promise<PageModule<React.ComponentType<unknown>>>;
534
+ preload: () => Promise<PageModule<ComponentType<unknown>>>;
532
535
  lang: string;
533
536
  }
534
537
 
@@ -4,6 +4,7 @@ import type { MdxJsxExpressionAttribute } from 'mdast-util-mdx-jsx';
4
4
  import type { MdxJsxFlowElement } from 'mdast-util-mdx-jsx';
5
5
  import type { MdxJsxTextElement } from 'mdast-util-mdx-jsx';
6
6
  import type { PluggableList } from 'unified';
7
+ import type { ReactNode } from 'react';
7
8
  import type { RehypeShikiOptions } from '@shikijs/rehype';
8
9
  import type { RsbuildConfig } from '@rsbuild/core';
9
10
 
@@ -198,12 +199,12 @@ declare type LlmsUI = {
198
199
  */
199
200
  declare type LlmsViewOption = 'markdownLink' | 'chatgpt' | 'claude' | {
200
201
  title: string;
201
- icon?: React.ReactNode;
202
+ icon?: ReactNode;
202
203
  onClick?: () => void;
203
204
  } | {
204
205
  title: string;
205
206
  href: string;
206
- icon?: React.ReactNode;
207
+ icon?: ReactNode;
207
208
  };
208
209
 
209
210
  export declare function loadFrontMatter<TFrontmatter extends Record<string, unknown> = FrontMatterMeta>(source: string, filepath: string, root: string, outputWarning?: boolean): {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/shared",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/web-infra-dev/rspress.git",
@@ -44,12 +44,12 @@
44
44
  "dist"
45
45
  ],
46
46
  "dependencies": {
47
- "@rsbuild/core": "^2.0.5",
47
+ "@rsbuild/core": "^2.0.6",
48
48
  "@shikijs/rehype": "^4.0.2",
49
49
  "unified": "^11.0.5"
50
50
  },
51
51
  "devDependencies": {
52
- "@rslib/core": "0.21.4",
52
+ "@rslib/core": "0.21.5",
53
53
  "@types/lodash-es": "^4.17.12",
54
54
  "@types/node": "^22.8.1",
55
55
  "@types/react": "^19.2.14",
@@ -60,7 +60,7 @@
60
60
  "medium-zoom": "1.1.0",
61
61
  "rimraf": "^6.1.3",
62
62
  "rsbuild-plugin-publint": "^0.3.4",
63
- "typescript": "^5.8.2"
63
+ "typescript": "^6.0.3"
64
64
  },
65
65
  "publishConfig": {
66
66
  "access": "public",