@rspress-theme-anatole/shared 0.0.1

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.
@@ -0,0 +1,939 @@
1
+ import type { loadConfig } from '@rsbuild/core';
2
+ import type { PluggableList } from 'unified';
3
+ import type { RsbuildConfig } from '@rsbuild/core';
4
+ import type { RsbuildPlugin } from '@rsbuild/core';
5
+
6
+ /**
7
+ * There are two ways to define what addition routes represent.
8
+ * 1. Define filepath, then the content will be read from the file.
9
+ * 2. Define content, then then content will be written to temp file and read from it.
10
+ */
11
+ export declare interface AdditionalPage {
12
+ routePath: string;
13
+ content?: string;
14
+ filepath?: string;
15
+ }
16
+
17
+ export declare function addLeadingSlash(url: string): string;
18
+
19
+ export declare function addTrailingSlash(url: string): string;
20
+
21
+ export declare type AnyFunction = (...args: any[]) => any;
22
+
23
+ export declare const APPEARANCE_KEY = "rspress-theme-appearance";
24
+
25
+ export declare type BaseRuntimePageInfo = Omit<RemoveUnderscoreProps<PageIndexInfo>, 'id' | 'content' | 'domain'>;
26
+
27
+ export declare const cleanUrl: (url: string) => string;
28
+
29
+ export declare type Config = UserConfig | Promise<UserConfig> | ((...args: Parameters<typeof loadConfig>) => UserConfig | Promise<UserConfig>);
30
+
31
+ export declare const DEFAULT_HIGHLIGHT_LANGUAGES: string[][];
32
+
33
+ export declare interface DefaultThemeConfig {
34
+ /**
35
+ * Whether to enable dark mode.
36
+ * @default true
37
+ */
38
+ darkMode?: boolean;
39
+ /**
40
+ * Custom outline title in the aside component.
41
+ *
42
+ * @default 'ON THIS PAGE'
43
+ */
44
+ outlineTitle?: string;
45
+ /**
46
+ * Whether to show the sidebar in right position.
47
+ */
48
+ outline?: boolean;
49
+ /**
50
+ * The nav items. When it's an object, the key is the version of current doc.
51
+ */
52
+ nav?: NavItem[] | {
53
+ [key: string]: NavItem[];
54
+ };
55
+ /**
56
+ * The sidebar items.
57
+ */
58
+ sidebar?: Sidebar;
59
+ /**
60
+ * Info for the edit link. If it's undefined, the edit link feature will
61
+ * be disabled.
62
+ */
63
+ editLink?: EditLink;
64
+ /**
65
+ * Set custom last updated text.
66
+ *
67
+ * @default 'Last updated'
68
+ */
69
+ lastUpdatedText?: string;
70
+ /**
71
+ * Set custom last updated text.
72
+ *
73
+ * @default false
74
+ */
75
+ lastUpdated?: boolean;
76
+ /**
77
+ * Set custom prev/next labels.
78
+ */
79
+ docFooter?: DocFooter;
80
+ /**
81
+ * The social links to be displayed at the end of the nav bar. Perfect for
82
+ * placing links to social services such as GitHub, X, Facebook, etc.
83
+ */
84
+ socialLinks?: SocialLink[];
85
+ /**
86
+ * The footer configuration.
87
+ */
88
+ footer?: Footer;
89
+ /**
90
+ * The prev page text.
91
+ */
92
+ prevPageText?: string;
93
+ /**
94
+ * The next page text.
95
+ */
96
+ nextPageText?: string;
97
+ /**
98
+ * The source code text.
99
+ */
100
+ sourceCodeText?: string;
101
+ /**
102
+ * Locale config
103
+ */
104
+ locales?: LocaleConfig[];
105
+ /**
106
+ * Whether to open the full text search
107
+ */
108
+ search?: boolean;
109
+ /**
110
+ * The placeholder of search input
111
+ */
112
+ searchPlaceholderText?: string;
113
+ /**
114
+ * The text of no search result
115
+ */
116
+ searchNoResultsText?: string;
117
+ /**
118
+ * The text of suggested query text when no search result
119
+ */
120
+ searchSuggestedQueryText?: string;
121
+ /**
122
+ * The text of overview filter
123
+ */
124
+ overview?: FilterConfig;
125
+ /**
126
+ * The behavior of hiding navbar
127
+ */
128
+ hideNavbar?: 'always' | 'auto' | 'never';
129
+ /**
130
+ * Whether to enable view transition animation for pages switching
131
+ */
132
+ enableContentAnimation?: boolean;
133
+ /**
134
+ * Whether to enable view transition animation for the theme
135
+ */
136
+ enableAppearanceAnimation?: boolean;
137
+ /**
138
+ * Enable scroll to top button on documentation
139
+ * @default false
140
+ */
141
+ enableScrollToTop?: boolean;
142
+ /**
143
+ * Whether to redirect to the closest locale when the user visits the site
144
+ * @default 'auto'
145
+ */
146
+ localeRedirect?: 'auto' | 'never';
147
+ /**
148
+ * Whether to show the fallback heading title when the heading title is not presented but `frontmatter.title` exists
149
+ * @default true
150
+ */
151
+ fallbackHeadingTitle?: boolean;
152
+ }
153
+
154
+ export declare interface DocFooter {
155
+ /**
156
+ * Custom label for previous page button.
157
+ */
158
+ prev?: SidebarItem;
159
+ /**
160
+ * Custom label for next page button.
161
+ */
162
+ next?: SidebarItem;
163
+ }
164
+
165
+ export declare interface EditLink {
166
+ /**
167
+ * Custom repository url for edit link.
168
+ */
169
+ docRepoBaseUrl: string;
170
+ /**
171
+ * Custom text for edit link.
172
+ *
173
+ * @default 'Edit this page'
174
+ */
175
+ text?: string;
176
+ }
177
+
178
+ export declare interface Feature {
179
+ icon: string;
180
+ title: string;
181
+ details: string;
182
+ span?: number;
183
+ link?: string;
184
+ }
185
+
186
+ /**
187
+ * The config of filter component
188
+ */
189
+ export declare interface FilterConfig {
190
+ filterNameText?: string;
191
+ filterPlaceholderText?: string;
192
+ filterNoResultText?: string;
193
+ }
194
+
195
+ export declare interface Footer {
196
+ message?: string;
197
+ }
198
+
199
+ export declare interface FrontMatterMeta {
200
+ title?: string;
201
+ description?: string;
202
+ overview?: boolean;
203
+ pageType?: PageType;
204
+ features?: Feature[];
205
+ hero?: Hero;
206
+ sidebar?: boolean;
207
+ outline?: boolean;
208
+ lineNumbers?: boolean;
209
+ overviewHeaders?: number[];
210
+ titleSuffix?: string;
211
+ head?: [string, Record<string, string>][];
212
+ context?: string;
213
+ [key: string]: unknown;
214
+ }
215
+
216
+ export declare const HASH_REGEXP: RegExp;
217
+
218
+ export declare interface Header {
219
+ id: string;
220
+ text: string;
221
+ depth: number;
222
+ charIndex: number;
223
+ }
224
+
225
+ export declare interface Hero {
226
+ name: string;
227
+ text: string;
228
+ tagline: string;
229
+ image?: {
230
+ src: string | {
231
+ dark: string;
232
+ light: string;
233
+ };
234
+ alt: string;
235
+ /**
236
+ * `srcset` and `sizes` are attributes of `<img>` tag. Please refer to https://mdn.io/srcset for the usage.
237
+ * When the value is an array, rspress will join array members with commas.
238
+ **/
239
+ sizes?: string | string[];
240
+ srcset?: string | string[];
241
+ };
242
+ actions: {
243
+ text: string;
244
+ link: string;
245
+ theme: 'brand' | 'alt';
246
+ }[];
247
+ }
248
+
249
+ declare type Image_2 = string | {
250
+ src: string;
251
+ alt?: string;
252
+ };
253
+ export { Image_2 as Image }
254
+
255
+ export declare const inBrowser: () => boolean;
256
+
257
+ export declare function isDataUrl(url?: string): boolean;
258
+
259
+ export declare const isDebugMode: () => boolean;
260
+
261
+ export declare const isDevDebugMode: () => boolean;
262
+
263
+ export declare function isExternalUrl(url?: string): boolean;
264
+
265
+ export declare const isProduction: () => boolean;
266
+
267
+ export declare const isSCM: () => boolean;
268
+
269
+ export declare interface Locale {
270
+ lang: string;
271
+ label: string;
272
+ title?: string;
273
+ description?: string;
274
+ }
275
+
276
+ /**
277
+ * locale config
278
+ */
279
+ export declare interface LocaleConfig {
280
+ /**
281
+ * Site i18n config, which will recover the locales config in the site level.
282
+ */
283
+ lang: string;
284
+ title?: string;
285
+ description?: string;
286
+ label: string;
287
+ /**
288
+ * Theme i18n config
289
+ */
290
+ nav?: Nav;
291
+ sidebar?: Sidebar;
292
+ outlineTitle?: string;
293
+ lastUpdatedText?: string;
294
+ lastUpdated?: boolean;
295
+ editLink?: EditLink;
296
+ prevPageText?: string;
297
+ nextPageText?: string;
298
+ sourceCodeText?: string;
299
+ langRoutePrefix?: string;
300
+ searchPlaceholderText?: string;
301
+ searchNoResultsText?: string;
302
+ searchSuggestedQueryText?: string;
303
+ overview?: FilterConfig;
304
+ }
305
+
306
+ export declare interface LocaleLink {
307
+ text: string;
308
+ link: string;
309
+ }
310
+
311
+ export declare interface LocaleLinks {
312
+ text: string;
313
+ items: LocaleLink[];
314
+ }
315
+
316
+ export declare type LocalSearchOptions = SearchHooks & {
317
+ mode?: 'local';
318
+ /**
319
+ * Whether to generate separate search index for each version
320
+ */
321
+ versioned?: boolean;
322
+ /**
323
+ * If enabled, the search index will include code block content, which allows users to search code blocks.
324
+ * @default false
325
+ */
326
+ codeBlocks?: boolean;
327
+ };
328
+
329
+ export declare interface MarkdownOptions {
330
+ remarkPlugins?: PluggableList;
331
+ rehypePlugins?: PluggableList;
332
+ /**
333
+ * Whether to enable check dead links, default is false
334
+ */
335
+ checkDeadLinks?: boolean;
336
+ showLineNumbers?: boolean;
337
+ /**
338
+ * Whether to wrap code by default, default is false
339
+ */
340
+ defaultWrapCode?: boolean;
341
+ /**
342
+ * Register global components in mdx files
343
+ */
344
+ globalComponents?: string[];
345
+ /**
346
+ * Code highlighter, default is prism for performance reason
347
+ */
348
+ codeHighlighter?: 'prism' | 'shiki';
349
+ /**
350
+ * Register prism languages
351
+ */
352
+ highlightLanguages?: (string | [string, string])[];
353
+ /**
354
+ * Whether to enable mdx-rs, default is true
355
+ */
356
+ mdxRs?: boolean | MdxRsOptions;
357
+ /**
358
+ * @deprecated, use `mdxRs` instead
359
+ */
360
+ experimentalMdxRs?: boolean;
361
+ }
362
+
363
+ export declare const MDX_OR_MD_REGEXP: RegExp;
364
+
365
+ export declare interface MdxRsOptions {
366
+ /**
367
+ * Determine whether the file use mdxRs compiler
368
+ */
369
+ include?: (filepath: string) => boolean;
370
+ }
371
+
372
+ export declare type Nav = NavItem[] | {
373
+ [key: string]: NavItem[];
374
+ };
375
+
376
+ export declare type NavItem = NavItemWithLink | NavItemWithChildren | NavItemWithLinkAndChildren;
377
+
378
+ export declare interface NavItemWithChildren {
379
+ text?: string;
380
+ tag?: string;
381
+ items: NavItemWithLink[];
382
+ position?: 'left' | 'right';
383
+ }
384
+
385
+ export declare type NavItemWithLink = {
386
+ text: string;
387
+ link: string;
388
+ tag?: string;
389
+ activeMatch?: string;
390
+ position?: 'left' | 'right';
391
+ };
392
+
393
+ export declare interface NavItemWithLinkAndChildren {
394
+ text: string;
395
+ link: string;
396
+ items: NavItemWithLink[];
397
+ tag?: string;
398
+ activeMatch?: string;
399
+ position?: 'left' | 'right';
400
+ }
401
+
402
+ declare interface NormalizedConfig extends Omit<DefaultThemeConfig, 'locales' | 'sidebar'> {
403
+ locales: NormalizedLocales[];
404
+ sidebar: NormalizedSidebar;
405
+ }
406
+ export { NormalizedConfig }
407
+ export { NormalizedConfig as NormalizedDefaultThemeConfig }
408
+
409
+ export declare interface NormalizedLocales extends Omit<LocaleConfig, 'sidebar'> {
410
+ sidebar: NormalizedSidebar;
411
+ }
412
+
413
+ export declare interface NormalizedSidebar {
414
+ [path: string]: (NormalizedSidebarGroup | SidebarItem | SidebarDivider)[];
415
+ }
416
+
417
+ export declare interface NormalizedSidebarGroup extends Omit<SidebarGroup, 'items'> {
418
+ items: (SidebarDivider | SidebarItem | NormalizedSidebarGroup)[];
419
+ collapsible: boolean;
420
+ collapsed: boolean;
421
+ }
422
+
423
+ export declare function normalizeHref(url?: string, cleanUrls?: boolean): string;
424
+
425
+ export declare function normalizePosixPath(id: string): string;
426
+
427
+ export declare function normalizeSlash(url: string): string;
428
+
429
+ export declare interface PageData {
430
+ siteData: SiteData<DefaultThemeConfig>;
431
+ page: BaseRuntimePageInfo & {
432
+ headingTitle?: string;
433
+ pagePath: string;
434
+ lastUpdatedTime?: string;
435
+ description?: string;
436
+ pageType: PageType;
437
+ [key: string]: unknown;
438
+ };
439
+ }
440
+
441
+ /**
442
+ * @description search-index.json file
443
+ * "_foo" is the private field that won't be written to search-index.json file
444
+ * and should not be used in the runtime (usePageData).
445
+ */
446
+ export declare interface PageIndexInfo {
447
+ id: number;
448
+ title: string;
449
+ routePath: string;
450
+ toc: Header[];
451
+ content: string;
452
+ _html: string;
453
+ frontmatter: FrontMatterMeta;
454
+ lang: string;
455
+ version: string;
456
+ domain: string;
457
+ _filepath: string;
458
+ _relativePath: string;
459
+ }
460
+
461
+ export declare interface PageModule<T extends React.ComponentType<unknown>> {
462
+ default: T;
463
+ frontmatter?: FrontMatterMeta;
464
+ content?: string;
465
+ [key: string]: unknown;
466
+ }
467
+
468
+ export declare type PageType = 'home' | 'doc' | 'custom' | '404' | 'blank';
469
+
470
+ export declare const parseUrl: (url: string) => {
471
+ url: string;
472
+ hash: string;
473
+ };
474
+
475
+ export declare const QUERY_REGEXP: RegExp;
476
+
477
+ export declare type RemotePageInfo = PageIndexInfo & {
478
+ _matchesPosition: {
479
+ content: {
480
+ start: number;
481
+ length: number;
482
+ }[];
483
+ };
484
+ };
485
+
486
+ export declare type RemoteSearchIndexInfo = string | {
487
+ value: string;
488
+ label: string;
489
+ };
490
+
491
+ export declare type RemoteSearchOptions = SearchHooks & {
492
+ mode: 'remote';
493
+ apiUrl: string;
494
+ domain?: string;
495
+ indexName: string;
496
+ searchIndexes?: RemoteSearchIndexInfo[];
497
+ searchLoading?: boolean;
498
+ };
499
+
500
+ export declare function removeBase(url: string, base: string): string;
501
+
502
+ export declare function removeHash(str: string): string;
503
+
504
+ export declare function removeLeadingSlash(url: string): string;
505
+
506
+ export declare function removeTrailingSlash(url: string): string;
507
+
508
+ declare type RemoveUnderscoreProps<T> = {
509
+ [K in keyof T as K extends `_${string}` ? never : K]: T[K];
510
+ };
511
+
512
+ export declare function replaceLang(rawUrl: string, lang: {
513
+ current: string;
514
+ target: string;
515
+ default: string;
516
+ }, version: {
517
+ current: string;
518
+ default: string;
519
+ }, base?: string, cleanUrls?: boolean, isPageNotFound?: boolean): string;
520
+
521
+ export declare interface ReplaceRule {
522
+ search: string | RegExp;
523
+ replace: string;
524
+ }
525
+
526
+ export declare function replaceVersion(rawUrl: string, version: {
527
+ current: string;
528
+ target: string;
529
+ default: string;
530
+ }, base?: string, cleanUrls?: boolean, isPageNotFound?: boolean): string;
531
+
532
+ export declare interface Route {
533
+ path: string;
534
+ element: React.ReactElement;
535
+ filePath: string;
536
+ preload: () => Promise<PageModule<React.ComponentType<unknown>>>;
537
+ lang: string;
538
+ }
539
+
540
+ export declare interface RouteMeta {
541
+ routePath: string;
542
+ absolutePath: string;
543
+ relativePath: string;
544
+ pageName: string;
545
+ lang: string;
546
+ version: string;
547
+ }
548
+
549
+ export declare interface RouteOptions {
550
+ /**
551
+ * The extension name of the filepath that will be converted to a route
552
+ * @default ['js','jsx','ts','tsx','md','mdx']
553
+ */
554
+ extensions?: string[];
555
+ /**
556
+ * Include extra files from being converted to routes
557
+ */
558
+ include?: string[];
559
+ /**
560
+ * Exclude files from being converted to routes
561
+ */
562
+ exclude?: string[];
563
+ /**
564
+ * use links without .html files
565
+ */
566
+ cleanUrls?: boolean;
567
+ }
568
+
569
+ export declare const RSPRESS_TEMP_DIR = ".rspress";
570
+
571
+ declare interface RspressPlugin {
572
+ /**
573
+ * Name of the plugin.
574
+ */
575
+ name: string;
576
+ /**
577
+ * Global style
578
+ */
579
+ globalStyles?: string;
580
+ /**
581
+ * Markdown options.
582
+ */
583
+ markdown?: {
584
+ remarkPlugins?: PluggableList;
585
+ rehypePlugins?: PluggableList;
586
+ globalComponents?: string[];
587
+ };
588
+ /**
589
+ * Rsbuild config.
590
+ */
591
+ builderConfig?: RsbuildConfig;
592
+ /**
593
+ * Inject global components.
594
+ */
595
+ globalUIComponents?: (string | [string, object])[];
596
+ /**
597
+ * Modify doc config.
598
+ */
599
+ config?: (config: UserConfig, utils: {
600
+ addPlugin: (plugin: RspressPlugin) => void;
601
+ removePlugin: (pluginName: string) => void;
602
+ }, isProd: boolean) => UserConfig | Promise<UserConfig>;
603
+ /**
604
+ * Callback before build
605
+ */
606
+ beforeBuild?: (config: UserConfig, isProd: boolean) => void | Promise<void>;
607
+ /**
608
+ * Callback after build
609
+ */
610
+ afterBuild?: (config: UserConfig, isProd: boolean) => void | Promise<void>;
611
+ /**
612
+ * Extend every page's data
613
+ */
614
+ extendPageData?: (pageData: PageIndexInfo, isProd: boolean) => void | Promise<void>;
615
+ /**
616
+ * Add custom route
617
+ */
618
+ addPages?: (config: UserConfig, isProd: boolean) => AdditionalPage[] | Promise<AdditionalPage[]>;
619
+ /**
620
+ * Add runtime modules
621
+ */
622
+ addRuntimeModules?: (config: UserConfig, isProd: boolean) => Record<string, string> | Promise<Record<string, string>>;
623
+ /**
624
+ * Callback after route generated
625
+ */
626
+ routeGenerated?: (routes: RouteMeta[], isProd: boolean) => Promise<void> | void;
627
+ /**
628
+ * Add addition ssg routes, for dynamic routes.
629
+ */
630
+ addSSGRoutes?: (config: UserConfig, isProd: boolean) => {
631
+ path: string;
632
+ }[] | Promise<{
633
+ path: string;
634
+ }[]>;
635
+ /**
636
+ * @private
637
+ * Modify search index data.
638
+ */
639
+ modifySearchIndexData?: (data: PageIndexInfo[], isProd: boolean) => void | Promise<void>;
640
+ }
641
+ export { RspressPlugin as Plugin }
642
+ export { RspressPlugin }
643
+
644
+ export declare const SEARCH_INDEX_NAME = "search_index";
645
+
646
+ export declare interface SearchHooks {
647
+ /**
648
+ * The search hook function path. The corresponding file should export a function named `onSearch`.
649
+ */
650
+ searchHooks?: string;
651
+ }
652
+
653
+ export declare type SearchOptions = LocalSearchOptions | RemoteSearchOptions | false;
654
+
655
+ export declare interface Sidebar {
656
+ [path: string]: (SidebarGroup | SidebarItem | SidebarDivider | SidebarSectionHeader)[];
657
+ }
658
+
659
+ export declare type SidebarDivider = {
660
+ dividerType: 'dashed' | 'solid';
661
+ };
662
+
663
+ export declare interface SidebarGroup {
664
+ text: string;
665
+ link?: string;
666
+ tag?: string;
667
+ items: (SidebarItem | SidebarDivider | SidebarGroup | string)[];
668
+ collapsible?: boolean;
669
+ collapsed?: boolean;
670
+ /**
671
+ * For hmr usage in development
672
+ */
673
+ _fileKey?: string;
674
+ overviewHeaders?: number[];
675
+ context?: string;
676
+ }
677
+
678
+ export declare type SidebarItem = {
679
+ text: string;
680
+ link: string;
681
+ tag?: string;
682
+ /**
683
+ * For hmr usage in development
684
+ */
685
+ _fileKey?: string;
686
+ overviewHeaders?: number[];
687
+ context?: string;
688
+ };
689
+
690
+ export declare type SidebarSectionHeader = {
691
+ sectionHeaderText: string;
692
+ tag?: string;
693
+ };
694
+
695
+ export declare interface SiteData<ThemeConfig = NormalizedConfig> {
696
+ root: string;
697
+ base: string;
698
+ lang: string;
699
+ route: RouteOptions;
700
+ locales: {
701
+ lang: string;
702
+ label: string;
703
+ }[];
704
+ title: string;
705
+ description: string;
706
+ icon: string;
707
+ themeConfig: ThemeConfig;
708
+ logo: string | {
709
+ dark: string;
710
+ light: string;
711
+ };
712
+ logoText: string;
713
+ pages: BaseRuntimePageInfo[];
714
+ search: SearchOptions;
715
+ ssg: boolean;
716
+ markdown: {
717
+ showLineNumbers: boolean;
718
+ defaultWrapCode: boolean;
719
+ codeHighlighter: 'prism' | 'shiki';
720
+ };
721
+ multiVersion: {
722
+ default: string;
723
+ versions: string[];
724
+ };
725
+ }
726
+
727
+ export declare function slash(str: string): string;
728
+
729
+ export declare interface SocialLink {
730
+ icon: SocialLinkIcon;
731
+ mode: 'link' | 'text' | 'img' | 'dom';
732
+ content: string;
733
+ }
734
+
735
+ export declare type SocialLinkIcon = 'lark' | 'discord' | 'facebook' | 'github' | 'instagram' | 'linkedin' | 'slack' | 'x' | 'youtube' | 'wechat' | 'qq' | 'juejin' | 'zhihu' | 'bilibili' | 'weibo' | 'gitlab' | 'X' | 'bluesky' | {
736
+ svg: string;
737
+ };
738
+
739
+ export declare type SSGConfig = boolean | {
740
+ strict?: boolean;
741
+ };
742
+
743
+ export declare interface UserConfig<ThemeConfig = DefaultThemeConfig> {
744
+ /**
745
+ * The root directory of the site.
746
+ * @default 'docs'
747
+ */
748
+ root?: string;
749
+ /**
750
+ * Path to the logo file in nav bar.
751
+ */
752
+ logo?: string | {
753
+ dark: string;
754
+ light: string;
755
+ };
756
+ /**
757
+ * The text of the logo in nav bar.
758
+ * @default ''
759
+ */
760
+ logoText?: string;
761
+ /**
762
+ * Base path of the site.
763
+ * @default '/'
764
+ */
765
+ base?: string;
766
+ /**
767
+ * Path to html icon file.
768
+ */
769
+ icon?: string;
770
+ /**
771
+ * Default language of the site.
772
+ */
773
+ lang?: string;
774
+ /**
775
+ * Title of the site.
776
+ * @default 'Rspress'
777
+ */
778
+ title?: string;
779
+ /**
780
+ * Description of the site.
781
+ * @default ''
782
+ */
783
+ description?: string;
784
+ /**
785
+ * Head tags.
786
+ */
787
+ head?: (string | [string, Record<string, string>] | ((route: RouteMeta) => string | [string, Record<string, string>] | undefined))[];
788
+ /**
789
+ * I18n config of the site.
790
+ */
791
+ locales?: Locale[];
792
+ /**
793
+ * The i18n text data source path. Default is `i18n.json` in cwd.
794
+ */
795
+ i18nSourcePath?: string;
796
+ /**
797
+ * Theme config.
798
+ */
799
+ themeConfig?: ThemeConfig;
800
+ /**
801
+ * Rsbuild Configuration
802
+ */
803
+ builderConfig?: RsbuildConfig;
804
+ /**
805
+ * The custom config of vite-plugin-route
806
+ */
807
+ route?: RouteOptions;
808
+ /**
809
+ * The custom config of markdown compile
810
+ */
811
+ markdown?: MarkdownOptions;
812
+ /**
813
+ * Doc plugins
814
+ */
815
+ plugins?: RspressPlugin[];
816
+ /**
817
+ * Replace rule, will replace the content of the page.
818
+ */
819
+ replaceRules?: ReplaceRule[];
820
+ /**
821
+ * Output directory
822
+ */
823
+ outDir?: string;
824
+ /**
825
+ * Custom theme directory
826
+ */
827
+ themeDir?: string;
828
+ /**
829
+ * Global components
830
+ */
831
+ globalUIComponents?: (string | [string, object])[];
832
+ /**
833
+ * Global styles, is a Absolute path
834
+ */
835
+ globalStyles?: string;
836
+ /**
837
+ * Search options
838
+ */
839
+ search?: SearchOptions;
840
+ /**
841
+ * Whether to enable ssg, default is true
842
+ */
843
+ ssg?: SSGConfig;
844
+ /**
845
+ * Whether to enable medium-zoom, default is true
846
+ */
847
+ mediumZoom?: boolean | {
848
+ selector?: string;
849
+ options?: ZoomOptions;
850
+ };
851
+ /**
852
+ * Add some extra builder plugins
853
+ */
854
+ builderPlugins?: RsbuildPlugin[];
855
+ /**
856
+ * Multi version config
857
+ */
858
+ multiVersion?: {
859
+ /**
860
+ * The default version
861
+ */
862
+ default?: string;
863
+ /**
864
+ * The version list, such as ['v1', 'v2']
865
+ */
866
+ versions: string[];
867
+ };
868
+ /**
869
+ * Language parity checking config
870
+ */
871
+ languageParity?: {
872
+ /**
873
+ * Whether to enable language parity checking
874
+ */
875
+ enabled?: boolean;
876
+ /**
877
+ * Directories to include in the parity check
878
+ */
879
+ include?: string[];
880
+ /**
881
+ * Directories to exclude from the parity check
882
+ */
883
+ exclude?: string[];
884
+ };
885
+ }
886
+
887
+ export declare function withBase(url: string, base: string): string;
888
+
889
+ export declare function withoutBase(path: string, base: string): string;
890
+
891
+ export declare function withoutLang(path: string, langs: string[]): string;
892
+
893
+ declare interface ZoomContainer {
894
+ width?: number
895
+ height?: number
896
+ top?: number
897
+ bottom?: number
898
+ right?: number
899
+ left?: number
900
+ }
901
+
902
+ declare interface ZoomOptions {
903
+ /**
904
+ * The space outside the zoomed image.
905
+ *
906
+ * @default 0
907
+ */
908
+ margin?: number
909
+
910
+ /**
911
+ * The background of the overlay.
912
+ *
913
+ * @default '#fff'
914
+ */
915
+ background?: string
916
+
917
+ /**
918
+ * The number of pixels to scroll to close the zoom.
919
+ *
920
+ * @default 40
921
+ */
922
+ scrollOffset?: number
923
+
924
+ /**
925
+ * The viewport to render the zoom in.
926
+ *
927
+ * @default null
928
+ */
929
+ container?: string | HTMLElement | ZoomContainer
930
+
931
+ /**
932
+ * The template element to display on zoom.
933
+ *
934
+ * @default null
935
+ */
936
+ template?: string | HTMLTemplateElement
937
+ }
938
+
939
+ export { }