@rspress/shared 0.0.0-next-20240613032119 → 0.0.0-next-20241010114926

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 CHANGED
@@ -179,7 +179,7 @@ interface Config$1 {
179
179
  docFooter?: DocFooter;
180
180
  /**
181
181
  * The social links to be displayed at the end of the nav bar. Perfect for
182
- * placing links to social services such as GitHub, Twitter, Facebook, etc.
182
+ * placing links to social services such as GitHub, X, Facebook, etc.
183
183
  */
184
184
  socialLinks?: SocialLink[];
185
185
  /**
@@ -223,9 +223,13 @@ interface Config$1 {
223
223
  */
224
224
  hideNavbar?: 'always' | 'auto' | 'never';
225
225
  /**
226
- * Whether to enable the animation for translation pages
226
+ * Whether to enable view transition animation for pages switching
227
227
  */
228
228
  enableContentAnimation?: boolean;
229
+ /**
230
+ * Whether to enable view transition animation for the theme
231
+ */
232
+ enableAppearanceAnimation?: boolean;
229
233
  /**
230
234
  * Enable scroll to top button on documentation
231
235
  * @default false
@@ -356,7 +360,7 @@ interface SocialLink {
356
360
  mode: 'link' | 'text' | 'img' | 'dom';
357
361
  content: string;
358
362
  }
359
- type SocialLinkIcon = 'lark' | 'discord' | 'facebook' | 'github' | 'instagram' | 'linkedin' | 'slack' | 'twitter' | 'youtube' | 'wechat' | 'qq' | 'juejin' | 'zhihu' | 'bilibili' | 'weibo' | 'gitlab' | 'X' | {
363
+ type SocialLinkIcon = 'lark' | 'discord' | 'facebook' | 'github' | 'instagram' | 'linkedin' | 'slack' | 'x' | 'youtube' | 'wechat' | 'qq' | 'juejin' | 'zhihu' | 'bilibili' | 'weibo' | 'gitlab' | 'X' | {
360
364
  svg: string;
361
365
  };
362
366
  interface Footer {
@@ -417,6 +421,9 @@ interface Locale {
417
421
  title?: string;
418
422
  description?: string;
419
423
  }
424
+ type SSGConfig = boolean | {
425
+ strict?: boolean;
426
+ };
420
427
  interface UserConfig<ThemeConfig = Config$1> {
421
428
  /**
422
429
  * The root directory of the site.
@@ -512,7 +519,7 @@ interface UserConfig<ThemeConfig = Config$1> {
512
519
  /**
513
520
  * Whether to enable ssg, default is true
514
521
  */
515
- ssg?: boolean;
522
+ ssg?: SSGConfig;
516
523
  /**
517
524
  * Whether to enable medium-zoom, default is true
518
525
  */
@@ -791,4 +798,4 @@ declare function removeBase(url: string, base: string): string;
791
798
  declare function withoutHash(url: string): string;
792
799
  declare const mergeDocConfig: (...configs: UserConfig[]) => UserConfig;
793
800
 
794
- 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 };
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 };
package/dist/index.js CHANGED
@@ -1128,7 +1128,13 @@ var DEFAULT_HIGHLIGHT_LANGUAGES = [
1128
1128
  ];
1129
1129
  var isSCM = () => Boolean(process.env.BUILD_VERSION);
1130
1130
  var isProduction = () => process.env.NODE_ENV === "production";
1131
- var isDebugMode = () => Boolean(process.env.DOC_DEBUG);
1131
+ var isDebugMode = () => {
1132
+ if (!process.env.DEBUG) {
1133
+ return false;
1134
+ }
1135
+ const values = process.env.DEBUG?.toLocaleLowerCase().split(",") ?? [];
1136
+ return ["rsbuild", "builder", "*"].some((key) => values.includes(key));
1137
+ };
1132
1138
  var cleanUrl = (url) => url.replace(HASH_REGEXP, "").replace(QUERY_REGEXP, "");
1133
1139
  function slash(str) {
1134
1140
  return str.replace(/\\/g, "/");
package/dist/index.mjs CHANGED
@@ -1070,7 +1070,13 @@ var DEFAULT_HIGHLIGHT_LANGUAGES = [
1070
1070
  ];
1071
1071
  var isSCM = () => Boolean(process.env.BUILD_VERSION);
1072
1072
  var isProduction = () => process.env.NODE_ENV === "production";
1073
- var isDebugMode = () => Boolean(process.env.DOC_DEBUG);
1073
+ var isDebugMode = () => {
1074
+ if (!process.env.DEBUG) {
1075
+ return false;
1076
+ }
1077
+ const values = process.env.DEBUG?.toLocaleLowerCase().split(",") ?? [];
1078
+ return ["rsbuild", "builder", "*"].some((key) => values.includes(key));
1079
+ };
1074
1080
  var cleanUrl = (url) => url.replace(HASH_REGEXP, "").replace(QUERY_REGEXP, "");
1075
1081
  function slash(str) {
1076
1082
  return str.replace(/\\/g, "/");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/shared",
3
- "version": "0.0.0-next-20240613032119",
3
+ "version": "0.0.0-next-20241010114926",
4
4
  "types": "./dist/index.d.ts",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -42,8 +42,8 @@
42
42
  }
43
43
  },
44
44
  "dependencies": {
45
- "@rsbuild/core": "0.7.3",
46
- "chalk": "4.1.2",
45
+ "@rsbuild/core": "1.0.11",
46
+ "chalk": "5.3.0",
47
47
  "execa": "5.1.1",
48
48
  "fs-extra": "11.2.0",
49
49
  "gray-matter": "4.0.3",
@@ -51,18 +51,18 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/fs-extra": "11.0.4",
54
- "@types/interpret": "^1.1.1",
55
- "@types/jest": "~29.5.12",
56
- "@types/lodash": "^4.17.0",
57
- "@types/lodash-es": "^4.17.8",
54
+ "@types/interpret": "^1.1.3",
55
+ "@types/jest": "~29.5.13",
56
+ "@types/lodash": "^4.17.10",
57
+ "@types/lodash-es": "^4.17.12",
58
58
  "@types/node": "^18.11.17",
59
- "@types/react": "^18",
60
- "@types/rechoir": "^0.6.1",
59
+ "@types/react": "^18.3.11",
60
+ "@types/rechoir": "^0.6.4",
61
61
  "lodash-es": "^4.17.21",
62
62
  "medium-zoom": "1.1.0",
63
63
  "rimraf": "^3.0.2",
64
- "ts-node": "^10.9.1",
65
- "typescript": "^5"
64
+ "ts-node": "^10.9.2",
65
+ "typescript": "^5.5.3"
66
66
  },
67
67
  "sideEffects": [],
68
68
  "publishConfig": {