@rspress/shared 0.0.0-next-20240319081819 → 0.0.0-next-20240408090346

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +13 -0
  2. package/package.json +15 -15
package/dist/index.d.ts CHANGED
@@ -140,6 +140,11 @@ interface Config$1 {
140
140
  * @default false
141
141
  */
142
142
  enableScrollToTop?: boolean;
143
+ /**
144
+ * Whether to redirect to the closest locale when the user visits the site
145
+ * @default 'auto'
146
+ */
147
+ localeRedirect?: 'auto' | 'never';
143
148
  }
144
149
  /**
145
150
  * locale config
@@ -210,6 +215,7 @@ interface SidebarGroup {
210
215
  * For hmr usage in development
211
216
  */
212
217
  _fileKey?: string;
218
+ overviewHeaders?: number[];
213
219
  }
214
220
  type SidebarItem = {
215
221
  text: string;
@@ -219,6 +225,7 @@ type SidebarItem = {
219
225
  * For hmr usage in development
220
226
  */
221
227
  _fileKey?: string;
228
+ overviewHeaders?: number[];
222
229
  };
223
230
  type SidebarDivider = {
224
231
  dividerType: 'dashed' | 'solid';
@@ -410,6 +417,10 @@ interface UserConfig<ThemeConfig = Config$1> {
410
417
  dark: string;
411
418
  light: string;
412
419
  };
420
+ /**
421
+ * The text of the logo in nav bar.
422
+ */
423
+ logoText?: string;
413
424
  /**
414
425
  * Base path of the site.
415
426
  */
@@ -533,6 +544,7 @@ interface SiteData<ThemeConfig = NormalizedConfig> {
533
544
  dark: string;
534
545
  light: string;
535
546
  };
547
+ logoText: string;
536
548
  pages: BaseRuntimePageInfo[];
537
549
  search: SearchOptions;
538
550
  ssg: boolean;
@@ -605,6 +617,7 @@ interface FrontMatterMeta {
605
617
  sidebar?: boolean;
606
618
  outline?: boolean;
607
619
  lineNumbers?: boolean;
620
+ overviewHeaders?: number;
608
621
  }
609
622
  interface PageData {
610
623
  siteData: SiteData<Config$1>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/shared",
3
- "version": "0.0.0-next-20240319081819",
3
+ "version": "0.0.0-next-20240408090346",
4
4
  "types": "./dist/index.d.ts",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -11,38 +11,38 @@
11
11
  },
12
12
  "exports": {
13
13
  ".": {
14
+ "types": "./dist/index.d.ts",
14
15
  "import": "./dist/index.mjs",
15
- "require": "./dist/index.js",
16
- "types": "./dist/index.d.ts"
16
+ "require": "./dist/index.js"
17
17
  },
18
18
  "./execa": {
19
+ "types": "./dist/execa.d.ts",
19
20
  "import": "./dist/execa.mjs",
20
- "require": "./dist/execa.js",
21
- "types": "./dist/execa.d.ts"
21
+ "require": "./dist/execa.js"
22
22
  },
23
23
  "./chalk": {
24
+ "types": "./dist/chalk.d.ts",
24
25
  "import": "./dist/chalk.mjs",
25
- "require": "./dist/chalk.js",
26
- "types": "./dist/chalk.d.ts"
26
+ "require": "./dist/chalk.js"
27
27
  },
28
28
  "./fs-extra": {
29
+ "types": "./dist/fs-extra.d.ts",
29
30
  "import": "./dist/fs-extra.mjs",
30
- "require": "./dist/fs-extra.js",
31
- "types": "./dist/fs-extra.d.ts"
31
+ "require": "./dist/fs-extra.js"
32
32
  },
33
33
  "./logger": {
34
+ "types": "./dist/logger.d.ts",
34
35
  "import": "./dist/logger.mjs",
35
- "require": "./dist/logger.js",
36
- "types": "./dist/logger.d.ts"
36
+ "require": "./dist/logger.js"
37
37
  },
38
38
  "./node-utils": {
39
+ "types": "./dist/node-utils.d.ts",
39
40
  "import": "./dist/node-utils.mjs",
40
- "require": "./dist/node-utils.js",
41
- "types": "./dist/node-utils.d.ts"
41
+ "require": "./dist/node-utils.js"
42
42
  }
43
43
  },
44
44
  "dependencies": {
45
- "@rsbuild/core": "0.4.15",
45
+ "@rsbuild/core": "0.5.1",
46
46
  "unified": "10.1.2",
47
47
  "chalk": "4.1.2",
48
48
  "execa": "5.1.1",
@@ -53,7 +53,7 @@
53
53
  "lodash-es": "^4.17.21",
54
54
  "@types/interpret": "^1.1.1",
55
55
  "@types/jest": "~29.2.4",
56
- "@types/lodash": "^4.14.197",
56
+ "@types/lodash": "^4.17.0",
57
57
  "@types/lodash-es": "^4.17.8",
58
58
  "@types/node": "~16.11.7",
59
59
  "@types/react": "~18.0.26",