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

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 +14 -1
  2. package/package.json +2 -2
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
@@ -196,6 +201,7 @@ type Image = string | {
196
201
  src: string;
197
202
  alt?: string;
198
203
  };
204
+ type OverViewDepth = 'h1' | 'h2';
199
205
  interface Sidebar {
200
206
  [path: string]: (SidebarGroup | SidebarItem | SidebarDivider | SidebarSectionHeader)[];
201
207
  }
@@ -210,6 +216,7 @@ interface SidebarGroup {
210
216
  * For hmr usage in development
211
217
  */
212
218
  _fileKey?: string;
219
+ overviewDepth?: OverViewDepth;
213
220
  }
214
221
  type SidebarItem = {
215
222
  text: string;
@@ -219,6 +226,7 @@ type SidebarItem = {
219
226
  * For hmr usage in development
220
227
  */
221
228
  _fileKey?: string;
229
+ overviewDepth?: OverViewDepth;
222
230
  };
223
231
  type SidebarDivider = {
224
232
  dividerType: 'dashed' | 'solid';
@@ -410,6 +418,10 @@ interface UserConfig<ThemeConfig = Config$1> {
410
418
  dark: string;
411
419
  light: string;
412
420
  };
421
+ /**
422
+ * The text of the logo in nav bar.
423
+ */
424
+ logoText?: string;
413
425
  /**
414
426
  * Base path of the site.
415
427
  */
@@ -533,6 +545,7 @@ interface SiteData<ThemeConfig = NormalizedConfig> {
533
545
  dark: string;
534
546
  light: string;
535
547
  };
548
+ logoText: string;
536
549
  pages: BaseRuntimePageInfo[];
537
550
  search: SearchOptions;
538
551
  ssg: boolean;
@@ -748,4 +761,4 @@ declare function removeBase(url: string, base: string): string;
748
761
  declare function withoutHash(url: string): string;
749
762
  declare const mergeDocConfig: (...configs: UserConfig[]) => UserConfig;
750
763
 
751
- 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 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 };
764
+ 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 OverViewDepth, 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 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-20240319081819",
3
+ "version": "0.0.0-next-20240407073144",
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": "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",