@rspress/shared 0.0.0-next-20241010114926 → 0.0.0-next-20241029080927
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 +24 -3
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
@@ -218,6 +218,10 @@ interface Config$1 {
|
|
218
218
|
* The text of suggested query text when no search result
|
219
219
|
*/
|
220
220
|
searchSuggestedQueryText?: string;
|
221
|
+
/**
|
222
|
+
* The text of overview filter
|
223
|
+
*/
|
224
|
+
overview?: FilterConfig;
|
221
225
|
/**
|
222
226
|
* The behavior of hiding navbar
|
223
227
|
*/
|
@@ -268,6 +272,15 @@ interface LocaleConfig {
|
|
268
272
|
searchPlaceholderText?: string;
|
269
273
|
searchNoResultsText?: string;
|
270
274
|
searchSuggestedQueryText?: string;
|
275
|
+
overview?: FilterConfig;
|
276
|
+
}
|
277
|
+
/**
|
278
|
+
* The config of filter component
|
279
|
+
*/
|
280
|
+
interface FilterConfig {
|
281
|
+
filterNameText?: string;
|
282
|
+
filterPlaceholderText?: string;
|
283
|
+
filterNoResultText?: string;
|
271
284
|
}
|
272
285
|
type Nav = NavItem[] | {
|
273
286
|
[key: string]: NavItem[];
|
@@ -545,7 +558,10 @@ interface UserConfig<ThemeConfig = Config$1> {
|
|
545
558
|
versions: string[];
|
546
559
|
};
|
547
560
|
}
|
548
|
-
type
|
561
|
+
type RemoveUnderscoreProps<T> = {
|
562
|
+
[K in keyof T as K extends `_${string}` ? never : K]: T[K];
|
563
|
+
};
|
564
|
+
type BaseRuntimePageInfo = Omit<RemoveUnderscoreProps<PageIndexInfo>, 'id' | 'content' | 'domain'>;
|
549
565
|
interface SiteData<ThemeConfig = NormalizedConfig> {
|
550
566
|
root: string;
|
551
567
|
base: string;
|
@@ -577,12 +593,18 @@ interface SiteData<ThemeConfig = NormalizedConfig> {
|
|
577
593
|
versions: string[];
|
578
594
|
};
|
579
595
|
}
|
596
|
+
/**
|
597
|
+
* @description search-index.json file
|
598
|
+
* "_foo" is the private field that won't be written to search-index.json file
|
599
|
+
* and should not be used in the runtime (usePageData).
|
600
|
+
*/
|
580
601
|
type PageIndexInfo = {
|
581
602
|
id: number;
|
582
603
|
title: string;
|
583
604
|
routePath: string;
|
584
605
|
toc: Header[];
|
585
606
|
content: string;
|
607
|
+
_html: string;
|
586
608
|
frontmatter: Record<string, unknown>;
|
587
609
|
lang: string;
|
588
610
|
version: string;
|
@@ -658,7 +680,6 @@ interface PageData {
|
|
658
680
|
lastUpdatedTime?: string;
|
659
681
|
description?: string;
|
660
682
|
pageType: PageType;
|
661
|
-
_relativePath: string;
|
662
683
|
[key: string]: unknown;
|
663
684
|
};
|
664
685
|
}
|
@@ -798,4 +819,4 @@ declare function removeBase(url: string, base: string): string;
|
|
798
819
|
declare function withoutHash(url: string): string;
|
799
820
|
declare const mergeDocConfig: (...configs: UserConfig[]) => UserConfig;
|
800
821
|
|
801
|
-
export { APPEARANCE_KEY, type AdditionalPage, type BaseRuntimePageInfo, type Config, DEFAULT_HIGHLIGHT_LANGUAGES, type Config$1 as DefaultThemeConfig, type DocFooter, type EditLink, type Feature, type Footer, type FrontMatterMeta, HASH_REGEXP, type Header, type Hero, type Image, type LocalSearchOptions, type Locale, type LocaleConfig, type LocaleLink, type LocaleLinks, MDX_REGEXP, type MarkdownOptions, type MdxRsOptions, type Nav, type NavItem, type NavItemWithChildren, type NavItemWithLink, type NavItemWithLinkAndChildren, type NormalizedConfig, type NormalizedConfig as NormalizedDefaultThemeConfig, type NormalizedLocales, type NormalizedSidebar, type NormalizedSidebarGroup, type PageData, type PageIndexInfo, type PageModule, type PageType, type RspressPlugin as Plugin, QUERY_REGEXP, RSPRESS_TEMP_DIR, type RemotePageInfo, type RemoteSearchIndexInfo, type RemoteSearchOptions, type ReplaceRule, type Route, type RouteMeta, type RouteOptions, type RspressPlugin, SEARCH_INDEX_NAME, type SSGConfig, type SearchHooks, type SearchOptions, type Sidebar, type SidebarDivider, type SidebarGroup, type SidebarItem, type SidebarSectionHeader, type SiteData, type SocialLink, type SocialLinkIcon, type UserConfig, addLeadingSlash, addTrailingSlash, cleanUrl, inBrowser, isDataUrl, isDebugMode, isExternalUrl, isProduction, isSCM, mergeDocConfig, normalizeHref, normalizePosixPath, normalizeSlash, omit, parseUrl, removeBase, removeHash, removeLeadingSlash, removeTrailingSlash, replaceLang, replaceVersion, slash, withBase, withoutBase, withoutHash, withoutLang };
|
822
|
+
export { APPEARANCE_KEY, type AdditionalPage, type BaseRuntimePageInfo, type Config, DEFAULT_HIGHLIGHT_LANGUAGES, type Config$1 as DefaultThemeConfig, type DocFooter, type EditLink, type Feature, type FilterConfig, type Footer, type FrontMatterMeta, HASH_REGEXP, type Header, type Hero, type Image, type LocalSearchOptions, type Locale, type LocaleConfig, type LocaleLink, type LocaleLinks, MDX_REGEXP, type MarkdownOptions, type MdxRsOptions, type Nav, type NavItem, type NavItemWithChildren, type NavItemWithLink, type NavItemWithLinkAndChildren, type NormalizedConfig, type NormalizedConfig as NormalizedDefaultThemeConfig, type NormalizedLocales, type NormalizedSidebar, type NormalizedSidebarGroup, type PageData, type PageIndexInfo, type PageModule, type PageType, type RspressPlugin as Plugin, QUERY_REGEXP, RSPRESS_TEMP_DIR, type RemotePageInfo, type RemoteSearchIndexInfo, type RemoteSearchOptions, type ReplaceRule, type Route, type RouteMeta, type RouteOptions, type RspressPlugin, SEARCH_INDEX_NAME, type SSGConfig, type SearchHooks, type SearchOptions, type Sidebar, type SidebarDivider, type SidebarGroup, type SidebarItem, type SidebarSectionHeader, type SiteData, type SocialLink, type SocialLinkIcon, type UserConfig, addLeadingSlash, addTrailingSlash, cleanUrl, inBrowser, isDataUrl, isDebugMode, isExternalUrl, isProduction, isSCM, mergeDocConfig, normalizeHref, normalizePosixPath, normalizeSlash, omit, parseUrl, removeBase, removeHash, removeLeadingSlash, removeTrailingSlash, replaceLang, replaceVersion, slash, withBase, withoutBase, withoutHash, withoutLang };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspress/shared",
|
3
|
-
"version": "0.0.0-next-
|
3
|
+
"version": "0.0.0-next-20241029080927",
|
4
4
|
"types": "./dist/index.d.ts",
|
5
5
|
"main": "./dist/index.js",
|
6
6
|
"module": "./dist/index.mjs",
|
@@ -42,7 +42,7 @@
|
|
42
42
|
}
|
43
43
|
},
|
44
44
|
"dependencies": {
|
45
|
-
"@rsbuild/core": "1.0.
|
45
|
+
"@rsbuild/core": "~1.0.18",
|
46
46
|
"chalk": "5.3.0",
|
47
47
|
"execa": "5.1.1",
|
48
48
|
"fs-extra": "11.2.0",
|
@@ -52,11 +52,11 @@
|
|
52
52
|
"devDependencies": {
|
53
53
|
"@types/fs-extra": "11.0.4",
|
54
54
|
"@types/interpret": "^1.1.3",
|
55
|
-
"@types/jest": "~29.5.
|
56
|
-
"@types/lodash": "^4.17.
|
55
|
+
"@types/jest": "~29.5.14",
|
56
|
+
"@types/lodash": "^4.17.12",
|
57
57
|
"@types/lodash-es": "^4.17.12",
|
58
58
|
"@types/node": "^18.11.17",
|
59
|
-
"@types/react": "^18.3.
|
59
|
+
"@types/react": "^18.3.12",
|
60
60
|
"@types/rechoir": "^0.6.4",
|
61
61
|
"lodash-es": "^4.17.21",
|
62
62
|
"medium-zoom": "1.1.0",
|