@rspress/shared 2.0.0-beta.21 → 2.0.0-beta.22
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/index.d.ts +22 -14
- package/dist/node-utils.d.ts +22 -13
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
@@ -132,6 +132,7 @@ export declare interface DefaultThemeConfig {
|
|
132
132
|
enableContentAnimation?: boolean;
|
133
133
|
/**
|
134
134
|
* Whether to enable view transition animation for the theme
|
135
|
+
* @default false
|
135
136
|
*/
|
136
137
|
enableAppearanceAnimation?: boolean;
|
137
138
|
/**
|
@@ -337,12 +338,14 @@ export declare interface MarkdownOptions {
|
|
337
338
|
remarkPlugins?: PluggableList;
|
338
339
|
rehypePlugins?: PluggableList;
|
339
340
|
/**
|
340
|
-
* Whether to enable check dead links
|
341
|
+
* Whether to enable check dead links
|
342
|
+
* @default false
|
341
343
|
*/
|
342
344
|
checkDeadLinks?: boolean;
|
343
345
|
showLineNumbers?: boolean;
|
344
346
|
/**
|
345
|
-
* Whether to wrap code by default
|
347
|
+
* Whether to wrap code by default
|
348
|
+
* @default false
|
346
349
|
*/
|
347
350
|
defaultWrapCode?: boolean;
|
348
351
|
/**
|
@@ -555,6 +558,7 @@ export declare interface RouteOptions {
|
|
555
558
|
exclude?: string[];
|
556
559
|
/**
|
557
560
|
* use links without .html files
|
561
|
+
* @default false
|
558
562
|
*/
|
559
563
|
cleanUrls?: boolean;
|
560
564
|
}
|
@@ -622,14 +626,6 @@ declare interface RspressPlugin {
|
|
622
626
|
* Callback after routeService generated
|
623
627
|
*/
|
624
628
|
routeServiceGenerated?: (routeService: any, isProd: boolean) => Promise<void> | void;
|
625
|
-
/**
|
626
|
-
* Add addition ssg routes, for dynamic routes.
|
627
|
-
*/
|
628
|
-
addSSGRoutes?: (config: UserConfig, isProd: boolean) => {
|
629
|
-
path: string;
|
630
|
-
}[] | Promise<{
|
631
|
-
path: string;
|
632
|
-
}[]>;
|
633
629
|
/**
|
634
630
|
* @private
|
635
631
|
* Modify search index data.
|
@@ -709,7 +705,6 @@ export declare interface SiteData<ThemeConfig = NormalizedConfig> {
|
|
709
705
|
logoText: string;
|
710
706
|
pages: BaseRuntimePageInfo[];
|
711
707
|
search: SearchOptions;
|
712
|
-
ssg: boolean;
|
713
708
|
markdown: {
|
714
709
|
showLineNumbers: boolean;
|
715
710
|
defaultWrapCode: boolean;
|
@@ -831,11 +826,24 @@ export declare interface UserConfig<ThemeConfig = DefaultThemeConfig> {
|
|
831
826
|
*/
|
832
827
|
search?: SearchOptions;
|
833
828
|
/**
|
834
|
-
* Whether to enable ssg
|
829
|
+
* Whether to enable ssg
|
830
|
+
* @default true
|
835
831
|
*/
|
836
|
-
ssg?: boolean
|
832
|
+
ssg?: boolean | {
|
833
|
+
/**
|
834
|
+
* After enabled, you can use worker to accelerate the SSG process and reduce memory usage. It is suitable for large document sites and is based on [tinypool](https://github.com/tinylibs/tinypool).
|
835
|
+
* @default false
|
836
|
+
*/
|
837
|
+
experimentalWorker?: boolean;
|
838
|
+
/**
|
839
|
+
* After enabled, some pages will not be rendered by SSG, and they will directly use html under CSR. This is suitable for SSG errors in large document sites bypassing a small number of pages. It is not recommended to enable this option actively.
|
840
|
+
* @default []
|
841
|
+
*/
|
842
|
+
experimentalExcludeRoutePaths?: (string | RegExp)[];
|
843
|
+
};
|
837
844
|
/**
|
838
|
-
* Whether to enable medium-zoom
|
845
|
+
* Whether to enable medium-zoom
|
846
|
+
* @default true
|
839
847
|
*/
|
840
848
|
mediumZoom?: boolean | {
|
841
849
|
selector?: string;
|
package/dist/node-utils.d.ts
CHANGED
@@ -120,6 +120,7 @@ declare interface Config {
|
|
120
120
|
enableContentAnimation?: boolean;
|
121
121
|
/**
|
122
122
|
* Whether to enable view transition animation for the theme
|
123
|
+
* @default false
|
123
124
|
*/
|
124
125
|
enableAppearanceAnimation?: boolean;
|
125
126
|
/**
|
@@ -314,12 +315,14 @@ declare interface MarkdownOptions {
|
|
314
315
|
remarkPlugins?: PluggableList;
|
315
316
|
rehypePlugins?: PluggableList;
|
316
317
|
/**
|
317
|
-
* Whether to enable check dead links
|
318
|
+
* Whether to enable check dead links
|
319
|
+
* @default false
|
318
320
|
*/
|
319
321
|
checkDeadLinks?: boolean;
|
320
322
|
showLineNumbers?: boolean;
|
321
323
|
/**
|
322
|
-
* Whether to wrap code by default
|
324
|
+
* Whether to wrap code by default
|
325
|
+
* @default false
|
323
326
|
*/
|
324
327
|
defaultWrapCode?: boolean;
|
325
328
|
/**
|
@@ -422,6 +425,7 @@ declare interface RouteOptions {
|
|
422
425
|
exclude?: string[];
|
423
426
|
/**
|
424
427
|
* use links without .html files
|
428
|
+
* @default false
|
425
429
|
*/
|
426
430
|
cleanUrls?: boolean;
|
427
431
|
}
|
@@ -487,14 +491,6 @@ declare interface RspressPlugin {
|
|
487
491
|
* Callback after routeService generated
|
488
492
|
*/
|
489
493
|
routeServiceGenerated?: (routeService: any, isProd: boolean) => Promise<void> | void;
|
490
|
-
/**
|
491
|
-
* Add addition ssg routes, for dynamic routes.
|
492
|
-
*/
|
493
|
-
addSSGRoutes?: (config: UserConfig, isProd: boolean) => {
|
494
|
-
path: string;
|
495
|
-
}[] | Promise<{
|
496
|
-
path: string;
|
497
|
-
}[]>;
|
498
494
|
/**
|
499
495
|
* @private
|
500
496
|
* Modify search index data.
|
@@ -659,11 +655,24 @@ declare interface UserConfig<ThemeConfig = Config> {
|
|
659
655
|
*/
|
660
656
|
search?: SearchOptions;
|
661
657
|
/**
|
662
|
-
* Whether to enable ssg
|
658
|
+
* Whether to enable ssg
|
659
|
+
* @default true
|
663
660
|
*/
|
664
|
-
ssg?: boolean
|
661
|
+
ssg?: boolean | {
|
662
|
+
/**
|
663
|
+
* After enabled, you can use worker to accelerate the SSG process and reduce memory usage. It is suitable for large document sites and is based on [tinypool](https://github.com/tinylibs/tinypool).
|
664
|
+
* @default false
|
665
|
+
*/
|
666
|
+
experimentalWorker?: boolean;
|
667
|
+
/**
|
668
|
+
* After enabled, some pages will not be rendered by SSG, and they will directly use html under CSR. This is suitable for SSG errors in large document sites bypassing a small number of pages. It is not recommended to enable this option actively.
|
669
|
+
* @default []
|
670
|
+
*/
|
671
|
+
experimentalExcludeRoutePaths?: (string | RegExp)[];
|
672
|
+
};
|
665
673
|
/**
|
666
|
-
* Whether to enable medium-zoom
|
674
|
+
* Whether to enable medium-zoom
|
675
|
+
* @default true
|
667
676
|
*/
|
668
677
|
mediumZoom?: boolean | {
|
669
678
|
selector?: string;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspress/shared",
|
3
|
-
"version": "2.0.0-beta.
|
3
|
+
"version": "2.0.0-beta.22",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
6
|
"url": "git+https://github.com/web-infra-dev/rspress.git",
|
@@ -32,14 +32,14 @@
|
|
32
32
|
"dist"
|
33
33
|
],
|
34
34
|
"dependencies": {
|
35
|
-
"@rsbuild/core": "~1.4.
|
36
|
-
"@shikijs/rehype": "^3.
|
35
|
+
"@rsbuild/core": "~1.4.8",
|
36
|
+
"@shikijs/rehype": "^3.8.1",
|
37
37
|
"gray-matter": "4.0.3",
|
38
38
|
"lodash-es": "^4.17.21",
|
39
39
|
"unified": "^11.0.5"
|
40
40
|
},
|
41
41
|
"devDependencies": {
|
42
|
-
"@rslib/core": "0.10.
|
42
|
+
"@rslib/core": "0.10.6",
|
43
43
|
"@types/jest": "~29.5.14",
|
44
44
|
"@types/lodash-es": "^4.17.12",
|
45
45
|
"@types/node": "^22.8.1",
|