@rspress/core 2.0.5 → 2.0.7

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 (265) hide show
  1. package/dist/0~1402.js +1 -0
  2. package/dist/{0~7675.423f6a06.js → 0~execa.js} +6 -5
  3. package/dist/1361.js +5 -0
  4. package/dist/1965.js +7 -0
  5. package/dist/4454.js +8 -0
  6. package/dist/{7744.421b464f.js → 4524.js} +20 -5
  7. package/dist/7397.js +18 -0
  8. package/dist/{5485.0bb24594.js → 8311.js} +5 -2
  9. package/dist/8474.js +4 -0
  10. package/dist/8885.js +4 -0
  11. package/dist/cli/index.js +2 -3
  12. package/dist/config/loadConfigFile.js +1 -2
  13. package/dist/eject-theme/components/Banner/index.tsx +1 -1
  14. package/dist/eject-theme/components/Button/index.tsx +1 -1
  15. package/dist/eject-theme/components/CodeBlock/index.scss +54 -1
  16. package/dist/eject-theme/components/CodeBlock/index.tsx +77 -7
  17. package/dist/eject-theme/components/CodeBlockRuntime/index.tsx +12 -2
  18. package/dist/eject-theme/components/CodeButtonGroup/CopyCodeButton.tsx +1 -1
  19. package/dist/eject-theme/components/CodeButtonGroup/index.tsx +15 -15
  20. package/dist/eject-theme/components/DocContent/docComponents/a.tsx +1 -1
  21. package/dist/eject-theme/components/DocContent/docComponents/pre.tsx +5 -1
  22. package/dist/eject-theme/components/DocContent/docComponents/title.tsx +6 -1
  23. package/dist/eject-theme/components/DocContent/index.tsx +1 -1
  24. package/dist/eject-theme/components/DocFooter/index.tsx +1 -1
  25. package/dist/eject-theme/components/EditLink/index.tsx +1 -1
  26. package/dist/eject-theme/components/FallbackHeading/index.tsx +4 -1
  27. package/dist/eject-theme/components/HomeFeature/index.tsx +5 -1
  28. package/dist/eject-theme/components/HomeFooter/index.tsx +1 -1
  29. package/dist/eject-theme/components/HomeHero/index.tsx +2 -2
  30. package/dist/eject-theme/components/HoverGroup/index.tsx +5 -2
  31. package/dist/eject-theme/components/Link/useLinkNavigate.ts +1 -1
  32. package/dist/eject-theme/components/Llms/LlmsCopyButton.tsx +3 -2
  33. package/dist/eject-theme/components/Llms/LlmsCopyRow.tsx +3 -2
  34. package/dist/eject-theme/components/Llms/LlmsOpenRow.tsx +1 -1
  35. package/dist/eject-theme/components/Llms/LlmsViewOptions.tsx +3 -2
  36. package/dist/eject-theme/components/Llms/copy.ts +12 -0
  37. package/dist/eject-theme/components/Nav/NavMenu.tsx +9 -2
  38. package/dist/eject-theme/components/Nav/index.tsx +1 -1
  39. package/dist/eject-theme/components/NavHamburger/index.tsx +6 -1
  40. package/dist/eject-theme/components/NavScreen/NavScreenAppearance.tsx +1 -1
  41. package/dist/eject-theme/components/NavScreen/NavScreenLangs.tsx +1 -1
  42. package/dist/eject-theme/components/NavScreen/NavScreenMenuItem.tsx +5 -1
  43. package/dist/eject-theme/components/NavScreen/NavScreenMenuOthers.tsx +1 -1
  44. package/dist/eject-theme/components/NavScreen/NavScreenVersions.tsx +1 -1
  45. package/dist/eject-theme/components/NavScreen/index.tsx +1 -1
  46. package/dist/eject-theme/components/NavTitle/index.tsx +1 -1
  47. package/dist/eject-theme/components/Outline/ScrollToTop.tsx +5 -1
  48. package/dist/eject-theme/components/Outline/index.tsx +1 -1
  49. package/dist/eject-theme/components/Overview/index.tsx +1 -1
  50. package/dist/eject-theme/components/OverviewGroup/index.tsx +2 -2
  51. package/dist/eject-theme/components/PackageManagerTabs/index.tsx +1 -1
  52. package/dist/eject-theme/components/PrevNextPage/index.tsx +1 -1
  53. package/dist/eject-theme/components/Root/index.tsx +1 -1
  54. package/dist/eject-theme/components/Search/NoSearchResult.tsx +1 -1
  55. package/dist/eject-theme/components/Search/SearchButton.tsx +1 -1
  56. package/dist/eject-theme/components/Search/SearchPanel.tsx +3 -1
  57. package/dist/eject-theme/components/Search/SuggestItem.tsx +1 -1
  58. package/dist/eject-theme/components/Search/index.tsx +1 -1
  59. package/dist/eject-theme/components/Sidebar/SidebarGroup.tsx +5 -1
  60. package/dist/eject-theme/components/Sidebar/SidebarItem.scss +0 -4
  61. package/dist/eject-theme/components/Sidebar/SidebarItem.tsx +1 -1
  62. package/dist/eject-theme/components/Sidebar/SidebarSectionHeader.tsx +1 -1
  63. package/dist/eject-theme/components/SidebarMenu/index.tsx +1 -1
  64. package/dist/eject-theme/components/SocialLinks/index.tsx +1 -1
  65. package/dist/eject-theme/components/SourceCode/index.tsx +1 -1
  66. package/dist/eject-theme/components/SvgWrapper/index.tsx +1 -1
  67. package/dist/eject-theme/components/SwitchAppearance/index.tsx +1 -1
  68. package/dist/eject-theme/components/Tabs/index.scss +13 -15
  69. package/dist/eject-theme/components/Tabs/index.tsx +1 -1
  70. package/dist/eject-theme/components/Tag/index.tsx +1 -1
  71. package/dist/eject-theme/components/Toc/TocItem.tsx +5 -1
  72. package/dist/eject-theme/components/Toc/index.tsx +1 -1
  73. package/dist/index.js +1 -3
  74. package/dist/node/PluginDriver.js +3 -8
  75. package/dist/node/auto-nav-sidebar/index.js +1 -2
  76. package/dist/node/auto-nav-sidebar/locales.js +1 -1
  77. package/dist/node/auto-nav-sidebar/normalize.js +3 -2
  78. package/dist/node/auto-nav-sidebar/utils.js +1 -2
  79. package/dist/node/auto-nav-sidebar/walk.js +1 -2
  80. package/dist/node/constants.js +1 -2
  81. package/dist/node/eject.js +1 -1
  82. package/dist/node/initRsbuild.js +2 -4
  83. package/dist/node/last-updated/index.js +1 -1
  84. package/dist/node/logger/hint.js +4 -1
  85. package/dist/node/mdx/options.js +1 -3
  86. package/dist/node/mdx/processor.js +1 -2
  87. package/dist/node/mdx/rehypePlugins/codeMeta.js +1 -1
  88. package/dist/node/mdx/rehypePlugins/headerAnchor.js +1 -2
  89. package/dist/node/mdx/rehypePlugins/shiki.d.ts +1 -1
  90. package/dist/node/mdx/rehypePlugins/shiki.js +2 -1
  91. package/dist/node/mdx/rehypePlugins/transformers/add-fold.d.ts +6 -0
  92. package/dist/node/mdx/rehypePlugins/transformers/add-fold.js +38 -0
  93. package/dist/node/mdx/rehypePlugins/transformers/index.d.ts +1 -0
  94. package/dist/node/mdx/rehypePlugins/transformers/index.js +1 -0
  95. package/dist/node/mdx/rehypePlugins/transformers/meta-highlight.js +1 -1
  96. package/dist/node/mdx/remarkPlugins/builtin.js +1 -1
  97. package/dist/node/mdx/remarkPlugins/fileCodeBlock.js +1 -2
  98. package/dist/node/mdx/remarkPlugins/image.js +1 -1
  99. package/dist/node/mdx/remarkPlugins/link.js +1 -2
  100. package/dist/node/mdx/remarkPlugins/toc.js +1 -1
  101. package/dist/node/medium-zoom/index.js +1 -1
  102. package/dist/node/route/RoutePage.js +1 -1
  103. package/dist/node/route/RouteService.js +1 -3
  104. package/dist/node/route/extractPageData.js +1 -3
  105. package/dist/node/route/normalizeRoutePath.js +1 -2
  106. package/dist/node/runtimeModule/i18n.js +2 -3
  107. package/dist/node/runtimeModule/pageData/createPageData.js +1 -2
  108. package/dist/node/runtimeModule/pageData/rsbuildPlugin.js +1 -2
  109. package/dist/node/runtimeModule/searchHooks.js +1 -1
  110. package/dist/node/runtimeModule/siteData/createSiteData.js +1 -1
  111. package/dist/node/runtimeModule/siteData/normalizeThemeConfig.js +1 -1
  112. package/dist/node/runtimeModule/siteData/rsbuildPlugin.js +1 -1
  113. package/dist/node/serve.js +1 -1
  114. package/dist/node/ssg/renderPage.js +1 -2
  115. package/dist/node/ssg/renderPageWorker.js +2 -2
  116. package/dist/node/ssg/renderPages.js +3 -4
  117. package/dist/node/ssg/rsbuildPluginSSG.js +1 -2
  118. package/dist/node/ssg/ssgEnv.d.ts +1 -1
  119. package/dist/node/ssg/ssgEnv.js +2 -2
  120. package/dist/node/ssg-md/llms/emitLlmsTxt.js +5 -7
  121. package/dist/node/ssg-md/llms/llmsTxt.js +1 -2
  122. package/dist/node/ssg-md/remarkSplitMdx.js +1 -2
  123. package/dist/node/ssg-md/renderPage.js +1 -2
  124. package/dist/node/ssg-md/renderPages.js +2 -2
  125. package/dist/node/ssg-md/rsbuildPluginSSGMD.js +1 -2
  126. package/dist/node/utils/checkLanguageParity.js +1 -1
  127. package/dist/node/utils/createHash.js +1 -1
  128. package/dist/node/utils/error.js +1 -1
  129. package/dist/node/utils/flattenMdxContent.js +1 -3
  130. package/dist/node/utils/fs.js +1 -1
  131. package/dist/node/utils/getPageKey.js +1 -1
  132. package/dist/node/utils/normalizePath.js +1 -2
  133. package/dist/node/utils/reactAlias.js +15 -10
  134. package/dist/runtime/index.js +20 -21
  135. package/dist/runtime/ssrMdServerEntry.js +2 -2
  136. package/dist/runtime/ssrServerEntry.js +2 -2
  137. package/dist/runtime/utils.d.ts +1 -1
  138. package/dist/runtime/utils.js +1 -1
  139. package/dist/shiki-transformers.js +1 -0
  140. package/dist/theme/assets/arrow-down.js +1 -1
  141. package/dist/theme/assets/arrow-right.js +1 -1
  142. package/dist/theme/assets/close.js +1 -1
  143. package/dist/theme/assets/copy.js +1 -1
  144. package/dist/theme/assets/deprecated.js +1 -1
  145. package/dist/theme/assets/down.js +1 -1
  146. package/dist/theme/assets/edit.js +1 -1
  147. package/dist/theme/assets/empty.js +1 -1
  148. package/dist/theme/assets/experimental.js +1 -1
  149. package/dist/theme/assets/external-link.js +1 -1
  150. package/dist/theme/assets/file.js +1 -1
  151. package/dist/theme/assets/github.js +1 -1
  152. package/dist/theme/assets/gitlab.js +1 -1
  153. package/dist/theme/assets/header.js +1 -1
  154. package/dist/theme/assets/jump.js +1 -1
  155. package/dist/theme/assets/link.js +1 -1
  156. package/dist/theme/assets/loading.js +1 -1
  157. package/dist/theme/assets/menu.js +1 -1
  158. package/dist/theme/assets/moon.js +1 -1
  159. package/dist/theme/assets/scroll-to-top.js +1 -1
  160. package/dist/theme/assets/search.js +1 -1
  161. package/dist/theme/assets/small-menu.js +1 -1
  162. package/dist/theme/assets/success.js +1 -1
  163. package/dist/theme/assets/sun.js +1 -1
  164. package/dist/theme/assets/title.js +1 -1
  165. package/dist/theme/assets/wrap.js +1 -1
  166. package/dist/theme/assets/wrapped.js +1 -1
  167. package/dist/theme/components/Banner/index.js +1 -1
  168. package/dist/theme/components/Button/index.js +1 -1
  169. package/dist/theme/components/Callout/index.js +2 -1
  170. package/dist/theme/components/CodeBlock/index.css +49 -1
  171. package/dist/theme/components/CodeBlock/index.d.ts +11 -3
  172. package/dist/theme/components/CodeBlock/index.js +51 -6
  173. package/dist/theme/components/CodeBlockRuntime/index.d.ts +2 -2
  174. package/dist/theme/components/CodeBlockRuntime/index.js +10 -2
  175. package/dist/theme/components/CodeButtonGroup/CopyCodeButton.js +1 -1
  176. package/dist/theme/components/CodeButtonGroup/index.d.ts +6 -6
  177. package/dist/theme/components/CodeButtonGroup/index.js +10 -10
  178. package/dist/theme/components/DocContent/docComponents/a.js +1 -1
  179. package/dist/theme/components/DocContent/docComponents/pre.d.ts +2 -2
  180. package/dist/theme/components/DocContent/docComponents/pre.js +4 -2
  181. package/dist/theme/components/DocContent/docComponents/title.js +1 -1
  182. package/dist/theme/components/DocContent/index.js +1 -1
  183. package/dist/theme/components/DocFooter/index.js +1 -1
  184. package/dist/theme/components/EditLink/index.js +1 -1
  185. package/dist/theme/components/FallbackHeading/index.js +1 -1
  186. package/dist/theme/components/HomeBackground/index.css +1 -0
  187. package/dist/theme/components/HomeFeature/index.css +3 -3
  188. package/dist/theme/components/HomeFeature/index.js +1 -1
  189. package/dist/theme/components/HomeFooter/index.js +1 -1
  190. package/dist/theme/components/HomeHero/index.d.ts +1 -1
  191. package/dist/theme/components/HomeHero/index.js +1 -1
  192. package/dist/theme/components/HoverGroup/index.d.ts +1 -1
  193. package/dist/theme/components/HoverGroup/index.js +4 -1
  194. package/dist/theme/components/Link/useLinkNavigate.d.ts +1 -1
  195. package/dist/theme/components/Llms/LlmsCopyButton.js +4 -3
  196. package/dist/theme/components/Llms/LlmsCopyRow.js +3 -2
  197. package/dist/theme/components/Llms/LlmsOpenRow.js +1 -1
  198. package/dist/theme/components/Llms/LlmsViewOptions.js +4 -3
  199. package/dist/theme/components/Llms/copy.d.ts +1 -0
  200. package/dist/theme/components/Llms/copy.js +9 -0
  201. package/dist/theme/components/Llms/index.css +1 -0
  202. package/dist/theme/components/Llms/index.js +4 -5
  203. package/dist/theme/components/Nav/NavMenu.d.ts +1 -1
  204. package/dist/theme/components/Nav/NavMenu.js +2 -1
  205. package/dist/theme/components/Nav/index.css +1 -1
  206. package/dist/theme/components/Nav/index.js +1 -1
  207. package/dist/theme/components/NavHamburger/index.js +1 -1
  208. package/dist/theme/components/NavScreen/NavScreenAppearance.js +1 -1
  209. package/dist/theme/components/NavScreen/NavScreenLangs.js +1 -1
  210. package/dist/theme/components/NavScreen/NavScreenMenuItem.d.ts +2 -1
  211. package/dist/theme/components/NavScreen/NavScreenMenuItem.js +4 -2
  212. package/dist/theme/components/NavScreen/NavScreenMenuOthers.js +1 -1
  213. package/dist/theme/components/NavScreen/NavScreenVersions.js +1 -1
  214. package/dist/theme/components/NavScreen/index.css +1 -1
  215. package/dist/theme/components/NavScreen/index.js +1 -1
  216. package/dist/theme/components/NavTitle/index.js +1 -1
  217. package/dist/theme/components/Outline/ScrollToTop.js +1 -1
  218. package/dist/theme/components/Outline/index.js +1 -1
  219. package/dist/theme/components/Overview/index.d.ts +1 -1
  220. package/dist/theme/components/Overview/index.js +1 -1
  221. package/dist/theme/components/OverviewGroup/icons/plugin.js +1 -1
  222. package/dist/theme/components/OverviewGroup/index.css +1 -0
  223. package/dist/theme/components/OverviewGroup/index.js +1 -1
  224. package/dist/theme/components/PackageManagerTabs/index.js +1 -1
  225. package/dist/theme/components/PrevNextPage/index.js +1 -1
  226. package/dist/theme/components/Root/index.d.ts +1 -1
  227. package/dist/theme/components/Search/NoSearchResult.js +1 -1
  228. package/dist/theme/components/Search/SearchButton.js +1 -1
  229. package/dist/theme/components/Search/SearchPanel.js +3 -2
  230. package/dist/theme/components/Search/SuggestItem.js +1 -1
  231. package/dist/theme/components/Search/index.js +1 -1
  232. package/dist/theme/components/Search/logic/providers/LocalProvider.js +1 -1
  233. package/dist/theme/components/Sidebar/SidebarGroup.js +1 -1
  234. package/dist/theme/components/Sidebar/SidebarItem.css +0 -4
  235. package/dist/theme/components/Sidebar/SidebarItem.js +1 -1
  236. package/dist/theme/components/Sidebar/SidebarSectionHeader.js +1 -1
  237. package/dist/theme/components/SidebarMenu/index.js +1 -1
  238. package/dist/theme/components/SocialLinks/index.js +1 -1
  239. package/dist/theme/components/SourceCode/index.js +1 -1
  240. package/dist/theme/components/SvgWrapper/index.js +1 -1
  241. package/dist/theme/components/SwitchAppearance/index.js +1 -1
  242. package/dist/theme/components/Tabs/index.css +14 -8
  243. package/dist/theme/components/Tabs/index.js +1 -1
  244. package/dist/theme/components/Tag/index.js +1 -1
  245. package/dist/theme/components/Toc/TocItem.css +1 -1
  246. package/dist/theme/components/Toc/TocItem.js +1 -1
  247. package/dist/theme/components/Toc/index.js +1 -1
  248. package/dist/theme/index.js +66 -67
  249. package/dist/theme/layout/DocLayout/index.css +11 -11
  250. package/dist/theme/layout/DocLayout/index.js +1 -1
  251. package/dist/theme/layout/HomeLayout/index.js +1 -1
  252. package/dist/theme/layout/Layout/index.d.ts +2 -2
  253. package/dist/theme/layout/Layout/index.js +16 -6
  254. package/dist/theme/layout/NotFountLayout/index.js +1 -1
  255. package/dist/theme/styles/base.css +7 -4
  256. package/dist/theme/styles/preflight.css +2 -0
  257. package/dist/theme/styles/vars/home-vars.css +28 -4
  258. package/nav-json-schema.json +3 -0
  259. package/package.json +14 -14
  260. package/dist/6289.29817fb4.js +0 -4
  261. package/dist/9348.1beb3e25.js +0 -11
  262. package/dist/cli/index.44f3184c.js +0 -2
  263. package/dist/node/mdx/loader.15134034.js +0 -9
  264. /package/dist/{node/ssg/renderPageWorker.165b5d46.js → 9224.js} +0 -0
  265. /package/dist/{rslib-runtime.99091bf6.js → rslib-runtime.js} +0 -0
@@ -1,5 +1,4 @@
1
- import { readdir, extname, stat as promises_stat, relative, logger, join, picocolors } from "../../6289.29817fb4.js";
2
- import { isExternalUrl, slash } from "../../9348.1beb3e25.js";
1
+ import { extname, stat as promises_stat, logger, picocolors, readdir, isExternalUrl, relative, slash, join } from "../../4524.js";
3
2
  import { createError } from "../utils/error.js";
4
3
  import { PUBLIC_DIR } from "../constants.js";
5
4
  import { pathExists, extractInfoFromFrontmatterWithAbsolutePath, readJson } from "./utils.js";
@@ -152,6 +151,7 @@ async function metaDirItemToSidebarItem(metaItem, workDir, docsDir, extensions,
152
151
  collapsible,
153
152
  collapsed,
154
153
  items: await getItems(),
154
+ tag: metaJsonTag,
155
155
  overviewHeaders: metaJsonOverviewHeaders,
156
156
  context: metaJsonContext,
157
157
  _fileKey: getFileKey(dirAbsolutePath, docsDir)
@@ -163,6 +163,7 @@ async function metaDirItemToSidebarItem(metaItem, workDir, docsDir, extensions,
163
163
  collapsible,
164
164
  collapsed,
165
165
  items: await getItems(),
166
+ tag: metaJsonTag,
166
167
  overviewHeaders: metaJsonOverviewHeaders,
167
168
  context: metaJsonContext,
168
169
  _fileKey: getFileKey(dirAbsolutePath, docsDir)
@@ -1,5 +1,4 @@
1
- import { node_path, promises } from "../../6289.29817fb4.js";
2
- import { loadFrontMatter, extractTextAndId } from "../../9348.1beb3e25.js";
1
+ import { node_path, extractTextAndId, promises, loadFrontMatter } from "../../4524.js";
3
2
  async function pathExists(path) {
4
3
  try {
5
4
  await promises.access(path);
@@ -1,5 +1,4 @@
1
- import { node_path, promises } from "../../6289.29817fb4.js";
2
- import { isExternalUrl } from "../../9348.1beb3e25.js";
1
+ import { isExternalUrl, node_path, promises } from "../../4524.js";
3
2
  import { pathExists } from "../utils/fs.js";
4
3
  import { readJson } from "./utils.js";
5
4
  import { createError } from "../utils/error.js";
@@ -1,5 +1,4 @@
1
- import { createRequire, package_namespaceObject } from "../5485.0bb24594.js";
2
- import { node_path } from "../6289.29817fb4.js";
1
+ import { createRequire, node_path, package_namespaceObject } from "../8311.js";
3
2
  const constants_require = createRequire(import.meta.url);
4
3
  const RSPRESS_VERSION = package_namespaceObject.rE;
5
4
  const APPEARANCE_KEY = 'rspress-theme-appearance';
@@ -1,4 +1,4 @@
1
- import { node_path, logger, promises, picocolors } from "../6289.29817fb4.js";
1
+ import { node_path, logger, promises, picocolors } from "../4454.js";
2
2
  import { EJECTED_THEME } from "./constants.js";
3
3
  let _themeComponentsPathOverride;
4
4
  function getThemeComponentsPath() {
@@ -1,7 +1,4 @@
1
- import { createRequire, fileURLToPath, package_namespaceObject } from "../5485.0bb24594.js";
2
- import { node_path } from "../6289.29817fb4.js";
3
- import { addTrailingSlash, removeTrailingSlash, cwd, MDX_OR_MD_REGEXP } from "../9348.1beb3e25.js";
4
- import { PLUGIN_REACT_NAME, pluginReact, pluginVirtualModule } from "../7744.421b464f.js";
1
+ import { addTrailingSlash, node_path, fileURLToPath, cwd, PLUGIN_REACT_NAME, removeTrailingSlash, pluginVirtualModule, pluginReact, createRequire, MDX_OR_MD_REGEXP } from "../4524.js";
5
2
  import { createError } from "./utils/error.js";
6
3
  import { PUBLIC_DIR, CSR_CLIENT_ENTRY, SSR_CLIENT_ENTRY, OUTPUT_DIR, SSG_MD_SERVER_ENTRY, inlineThemeScript, NODE_SSG_BUNDLE_FOLDER, isProduction, PACKAGE_ROOT, SSR_SERVER_ENTRY, TEMPLATE_PATH, NODE_SSG_MD_BUNDLE_FOLDER, DEFAULT_THEME, NODE_SSG_MD_BUNDLE_NAME, DEFAULT_TITLE, NODE_SSG_BUNDLE_NAME } from "./constants.js";
7
4
  import { hintBuilderPluginsBreakingChange, hintThemeBreakingChange } from "./logger/hint.js";
@@ -17,6 +14,7 @@ import { siteDataVMPlugin } from "./runtimeModule/siteData/rsbuildPlugin.js";
17
14
  import { rsbuildPluginSSG } from "./ssg/rsbuildPluginSSG.js";
18
15
  import { rsbuildPluginCSR } from "./ssg/rsbuildPluginCSR.js";
19
16
  import { rsbuildPluginSSGMD } from "./ssg-md/rsbuildPluginSSGMD.js";
17
+ import { package_namespaceObject } from "../8311.js";
20
18
  function isPluginIncluded(config, pluginName) {
21
19
  return Boolean(config.builderConfig?.plugins?.some((plugin)=>plugin && plugin.name === pluginName));
22
20
  }
@@ -1,4 +1,4 @@
1
- import { execa } from "../../0~7675.423f6a06.js";
1
+ import { execa } from "../../0~execa.js";
2
2
  function transform(timestamp, lang) {
3
3
  return new Date(timestamp).toLocaleString(lang || 'zh');
4
4
  }
@@ -1,4 +1,4 @@
1
- import { picocolors, relative, logger, join, readFile } from "../../6289.29817fb4.js";
1
+ import { picocolors, relative, logger, join, readFile } from "../../8885.js";
2
2
  import { pathExists } from "../utils/fs.js";
3
3
  const THEME_DEFAULT_EXPORT_PATTERN = /export\s+default\s+\{/;
4
4
  const THEME_OLD_IMPORT_0 = /from\s+['"]rspress\/theme['"]/;
@@ -65,7 +65,10 @@ function hintSSGFailed() {
65
65
  function hintSSGFalse() {
66
66
  logger.info('`ssg: false` detected, SSG will be disabled.');
67
67
  }
68
+ let reactVersionLogged = false;
68
69
  function hintReactVersion() {
70
+ if (reactVersionLogged) return;
71
+ reactVersionLogged = true;
69
72
  logger.info('[Rspress v2] Rspress support React 18 and 19, please confirm that both react and react-dom are installed in package.json with the same version. ');
70
73
  }
71
74
  function hintNavJsonChangeThenPanic(metaJson, metaJsonDir, docsDir) {
@@ -1,6 +1,4 @@
1
- import { node_path } from "../../6289.29817fb4.js";
2
- import { remark_gfm, nodeTypes } from "../../9348.1beb3e25.js";
3
- import { rehype_external_links, rehype_raw, remark_cjk_friendly, rehype, remark_cjk_friendly_gfm_strikethrough } from "./loader.15134034.js";
1
+ import { node_path, rehype_external_links, rehype_raw, remark_cjk_friendly, nodeTypes, remark_gfm, rehype, remark_cjk_friendly_gfm_strikethrough } from "../../7397.js";
4
2
  import { remarkToc } from "./remarkPlugins/toc.js";
5
3
  import { remarkContainerSyntax } from "./remarkPlugins/containerSyntax.js";
6
4
  import { remarkFileCodeBlock } from "./remarkPlugins/fileCodeBlock.js";
@@ -1,5 +1,4 @@
1
- import { node_path } from "../../6289.29817fb4.js";
2
- import { createProcessor, loadFrontMatter, extractTextAndId } from "../../9348.1beb3e25.js";
1
+ import { node_path, extractTextAndId, createProcessor, loadFrontMatter } from "../../7397.js";
3
2
  import { createMDXOptions } from "./options.js";
4
3
  import { applyReplaceRules } from "../utils/applyReplaceRules.js";
5
4
  import { escapeMarkdownHeadingIds } from "../utils/escapeHeadingIds.js";
@@ -1,4 +1,4 @@
1
- import { visit } from "../../../9348.1beb3e25.js";
1
+ import { visit } from "../../../7397.js";
2
2
  const rehypeCodeMeta = ()=>(tree)=>{
3
3
  visit(tree, 'element', (node)=>{
4
4
  if ('pre' === node.tagName && node.children[0]?.type === 'element' && 'code' === node.children[0].tagName) {
@@ -1,5 +1,4 @@
1
- import { visit, github_slugger, extractTextAndId } from "../../../9348.1beb3e25.js";
2
- import { headingRank } from "../loader.15134034.js";
1
+ import { visit, extractTextAndId, github_slugger, headingRank } from "../../../7397.js";
3
2
  const rehypeHeaderAnchor = ()=>{
4
3
  const slugger = new github_slugger();
5
4
  return (tree)=>{
@@ -1,4 +1,4 @@
1
1
  import type { RehypeShikiOptions } from '@shikijs/rehype';
2
2
  import rehypeShiki from '@shikijs/rehype';
3
3
  declare function createRehypeShikiOptions(showLineNumbers: boolean, defaultWrapCode: boolean, options?: Partial<RehypeShikiOptions>): RehypeShikiOptions;
4
- export { rehypeShiki, createRehypeShikiOptions };
4
+ export { createRehypeShikiOptions, rehypeShiki };
@@ -1,4 +1,4 @@
1
- import { transformerAddLang, transformerAddLineNumbers, transformerAddTitle, createCssVariablesTheme, transformerAddWrapCode } from "../loader.15134034.js";
1
+ import { transformerAddLang, transformerAddLineNumbers, transformerAddTitle, transformerAddFold, createCssVariablesTheme, transformerAddWrapCode } from "../../../7397.js";
2
2
  const cssVariablesTheme = createCssVariablesTheme({
3
3
  name: 'css-variables',
4
4
  variablePrefix: '--shiki-',
@@ -16,6 +16,7 @@ function createRehypeShikiOptions(showLineNumbers, defaultWrapCode, options) {
16
16
  transformerAddWrapCode({
17
17
  defaultWrapCode
18
18
  }),
19
+ transformerAddFold(),
19
20
  ...transformers
20
21
  ];
21
22
  return {
@@ -0,0 +1,6 @@
1
+ import type { ShikiTransformer } from 'shiki';
2
+ export declare const SHIKI_TRANSFORMER_ADD_FOLD = "shiki-transformer:add-fold";
3
+ /**
4
+ * @private compile-time only
5
+ */
6
+ export declare function transformerAddFold(): ShikiTransformer;
@@ -0,0 +1,38 @@
1
+ const SHIKI_TRANSFORMER_ADD_FOLD = 'shiki-transformer:add-fold';
2
+ const DEFAULT_FOLD_HEIGHT = 300;
3
+ function hasFoldInMeta(meta) {
4
+ if (!meta) return;
5
+ const kvList = meta.split(' ').filter(Boolean);
6
+ if (kvList.includes('fold=false')) return false;
7
+ if (kvList.includes('fold') || kvList.includes('fold=true')) return true;
8
+ }
9
+ function parseHeightFromMeta(meta) {
10
+ if (!meta) return;
11
+ const kvList = meta.split(' ').filter(Boolean);
12
+ for (const item of kvList){
13
+ const [k, v = ''] = item.split('=').filter(Boolean);
14
+ if ('height' === k && v.length > 0) {
15
+ const num = Number(v.replace(/["'`]/g, ''));
16
+ if (!Number.isNaN(num) && num > 0) return num;
17
+ }
18
+ }
19
+ }
20
+ function transformerAddFold() {
21
+ return {
22
+ name: SHIKI_TRANSFORMER_ADD_FOLD,
23
+ pre (pre) {
24
+ const meta = this.options.meta?.__raw;
25
+ const shouldFold = hasFoldInMeta(meta);
26
+ if (shouldFold) {
27
+ const height = parseHeightFromMeta(meta) ?? DEFAULT_FOLD_HEIGHT;
28
+ pre.properties = {
29
+ ...pre.properties,
30
+ fold: true,
31
+ height
32
+ };
33
+ }
34
+ return pre;
35
+ }
36
+ };
37
+ }
38
+ export { SHIKI_TRANSFORMER_ADD_FOLD, transformerAddFold };
@@ -1,3 +1,4 @@
1
+ export { SHIKI_TRANSFORMER_ADD_FOLD, transformerAddFold, } from './add-fold.js';
1
2
  export { SHIKI_TRANSFORMER_ADD_LANG, transformerAddLang } from './add-lang.js';
2
3
  export { SHIKI_TRANSFORMER_ADD_LINE_NUMBERS, transformerAddLineNumbers, } from './add-line-numbers.js';
3
4
  export { SHIKI_TRANSFORMER_ADD_TITLE, transformerAddTitle } from './add-title.js';
@@ -1,3 +1,4 @@
1
+ import "./add-fold.js";
1
2
  import "./add-lang.js";
2
3
  import "./add-line-numbers.js";
3
4
  import "./add-title.js";
@@ -1,4 +1,4 @@
1
- /*! For license information please see meta-highlight.js.LICENSE.txt */
1
+ /*! LICENSE: meta-highlight.js.LICENSE.txt */
2
2
  /**
3
3
  * these codes are copied from @shiki/transformers, transformerMetaHighlight
4
4
  * @source https://github.com/shikijs/shiki/blob/f5cf06f55a0b4643d7b02f15ee2c5033be6f1245/packages/transformers/src/transformers/meta-highlight.ts#L56
@@ -1,4 +1,4 @@
1
- import { node_path } from "../../../6289.29817fb4.js";
1
+ import { node_path } from "../../../7397.js";
2
2
  import { getDefaultImportAstNode } from "../../utils/getImportAstNode.js";
3
3
  const remarkBuiltin = ({ globalComponents })=>(tree)=>{
4
4
  const demos = globalComponents.map((componentPath)=>{
@@ -1,5 +1,4 @@
1
- import { node_path, logger, picocolors, readFile } from "../../../6289.29817fb4.js";
2
- import { visit, cwd } from "../../../9348.1beb3e25.js";
1
+ import { visit, node_path, logger, cwd, picocolors, readFile } from "../../../1965.js";
3
2
  import { createError } from "../../utils/error.js";
4
3
  const ERROR_PREFIX = '[remarkFileCodeBlock]';
5
4
  function parseFileFromMeta(meta) {
@@ -1,4 +1,4 @@
1
- import { isExternalUrl, getNodeAttribute, visit } from "../../../9348.1beb3e25.js";
1
+ import { isExternalUrl, getNodeAttribute, visit } from "../../../7397.js";
2
2
  import { getDefaultImportAstNode } from "../../utils/getImportAstNode.js";
3
3
  const normalizeImageUrl = (imageUrl)=>{
4
4
  if (isExternalUrl(imageUrl) || imageUrl.startsWith('/')) return '';
@@ -1,5 +1,4 @@
1
- import { node_path, logger, picocolors } from "../../../6289.29817fb4.js";
2
- import { isExternalUrl, isProduction, addLeadingSlash, parseUrl, normalizeHref, visit, withBase } from "../../../9348.1beb3e25.js";
1
+ import { normalizeHref, node_path, addLeadingSlash, logger, visit, picocolors, isExternalUrl, isProduction, parseUrl, withBase } from "../../../1965.js";
3
2
  import { hintRelativeMarkdownLink } from "../../logger/hint.js";
4
3
  import { createError } from "../../utils/error.js";
5
4
  function link_checkDeadLinks(checkDeadLinks, internalLinks, file, lint) {
@@ -1,4 +1,4 @@
1
- import { github_slugger, visitChildren, extractTextAndId } from "../../../9348.1beb3e25.js";
1
+ import { github_slugger, visitChildren, extractTextAndId } from "../../../1361.js";
2
2
  const extractChildText = (child)=>{
3
3
  if ('link' === child.type) return child.children?.map(extractChildText).join('') ?? '';
4
4
  if ('strong' === child.type) return `**${child.children?.map(extractChildText).join('') ?? ''}**`;
@@ -1,4 +1,4 @@
1
- import { node_path } from "../../6289.29817fb4.js";
1
+ import { node_path } from "../../0~1402.js";
2
2
  import { PACKAGE_ROOT } from "../constants.js";
3
3
  function pluginMediumZoom(options = {}) {
4
4
  return {
@@ -1,4 +1,4 @@
1
- import { node_path } from "../../6289.29817fb4.js";
1
+ import { node_path } from "../../4524.js";
2
2
  import { RouteService } from "./RouteService.js";
3
3
  import { normalizePath, slash } from "../utils/normalizePath.js";
4
4
  import { getPageKey } from "../utils/getPageKey.js";
@@ -1,6 +1,4 @@
1
- import { node_path, promises } from "../../6289.29817fb4.js";
2
- import { RSPRESS_TEMP_DIR, removeTrailingSlash, addTrailingSlash } from "../../9348.1beb3e25.js";
3
- import { DEFAULT_PAGE_EXTENSIONS, glob } from "../../7744.421b464f.js";
1
+ import { RSPRESS_TEMP_DIR, node_path, removeTrailingSlash, promises, addTrailingSlash, DEFAULT_PAGE_EXTENSIONS, glob } from "../../4524.js";
4
2
  import { PUBLIC_DIR } from "../constants.js";
5
3
  import { RoutePage, absolutePathToRoutePath, absolutePathToRelativePath } from "./RoutePage.js";
6
4
  import { createError } from "../utils/error.js";
@@ -1,6 +1,4 @@
1
- import { node_path, promises } from "../../6289.29817fb4.js";
2
- import { unified, visit, remark_gfm, loadFrontMatter, remark_stringify, MDX_OR_MD_REGEXP } from "../../9348.1beb3e25.js";
3
- import { remove, remark_parse } from "../../7744.421b464f.js";
1
+ import { unified, node_path, visit, promises, loadFrontMatter, remark_stringify, remove, remark_gfm, MDX_OR_MD_REGEXP, remark_parse } from "../../4524.js";
4
2
  import { applyReplaceRules } from "../utils/applyReplaceRules.js";
5
3
  import { flattenMdxContent } from "../utils/flattenMdxContent.js";
6
4
  import { importStatementRegex } from "../constants.js";
@@ -1,5 +1,4 @@
1
- import { addTrailingSlash, addLeadingSlash } from "../../9348.1beb3e25.js";
2
- import { DEFAULT_PAGE_EXTENSIONS } from "../../7744.421b464f.js";
1
+ import { addTrailingSlash, DEFAULT_PAGE_EXTENSIONS, addLeadingSlash } from "../../4524.js";
3
2
  const getRoutePathParts = (relativePath, lang, version, langs, versions)=>{
4
3
  const [versionPart, langPart, purePath] = splitRoutePathParts(relativePath, lang, version, langs, versions);
5
4
  return [
@@ -1,5 +1,4 @@
1
- import { createRequire } from "../../5485.0bb24594.js";
2
- import { picocolors, join, logger } from "../../6289.29817fb4.js";
1
+ import { logger, createRequire, join, picocolors } from "../../4524.js";
3
2
  import { DEFAULT_I18N_TEXT } from "./DEFAULT_I18N_TEXT.js";
4
3
  import { createError } from "../utils/error.js";
5
4
  import { pathExists } from "../utils/fs.js";
@@ -30,7 +29,7 @@ async function getI18nData(docConfig, pluginDriver) {
30
29
  delete i18n_require.cache[i18nSourcePath];
31
30
  i18nSourceFromJson = i18n_require(i18nSourcePath);
32
31
  } catch (e) {
33
- logger.debug('getI18nData from i18n.json Failed: \n', e);
32
+ logger.debug('getI18nData from i18n.json Failed: \n', e instanceof Error ? e.message : '');
34
33
  }
35
34
  i18nSourceFull = mergeI18nData(i18nSourceFull, i18nSourceFromJson);
36
35
  if ('function' == typeof i18nSource) try {
@@ -1,5 +1,4 @@
1
- import { SEARCH_INDEX_NAME } from "../../../9348.1beb3e25.js";
2
- import { groupBy } from "../../../7744.421b464f.js";
1
+ import { SEARCH_INDEX_NAME, groupBy } from "../../../4524.js";
3
2
  import { extractPageData } from "../../route/extractPageData.js";
4
3
  import { createHash } from "../../utils/createHash.js";
5
4
  function deletePrivateField(obj) {
@@ -1,5 +1,4 @@
1
- import { logger } from "../../../6289.29817fb4.js";
2
- import { pluginVirtualModule } from "../../../7744.421b464f.js";
1
+ import { logger, pluginVirtualModule } from "../../../4524.js";
3
2
  import { createPageData } from "./createPageData.js";
4
3
  const rsbuildPluginDocVM = async ({ config, userDocRoot, routeService, pluginDriver })=>{
5
4
  const ref = {
@@ -1,4 +1,4 @@
1
- import { node_path } from "../../6289.29817fb4.js";
1
+ import { node_path } from "../../4524.js";
2
2
  const searchHookVMPlugin = (context)=>({
3
3
  ["virtual-search-hooks"]: ()=>{
4
4
  const { config } = context;
@@ -1,4 +1,4 @@
1
- import { getIconUrlPath } from "../../../9348.1beb3e25.js";
1
+ import { getIconUrlPath } from "../../../4524.js";
2
2
  import { normalizeThemeConfig } from "./normalizeThemeConfig.js";
3
3
  async function createSiteData(userConfig) {
4
4
  const tempSearchObj = Object.assign({}, userConfig.search);
@@ -1,4 +1,4 @@
1
- import { isExternalUrl, slash, addLeadingSlash, normalizeHref } from "../../../9348.1beb3e25.js";
1
+ import { isExternalUrl, slash, addLeadingSlash, normalizeHref } from "../../../4524.js";
2
2
  import { getI18nData } from "../i18n.js";
3
3
  import { applyReplaceRules } from "../../utils/applyReplaceRules.js";
4
4
  async function normalizeThemeConfig(docConfig) {
@@ -1,4 +1,4 @@
1
- import { logger } from "../../../6289.29817fb4.js";
1
+ import { logger } from "../../../4524.js";
2
2
  import { modifyConfigWithAutoNavSide } from "../../auto-nav-sidebar/index.js";
3
3
  import { createSiteData } from "./createSiteData.js";
4
4
  const siteDataVMPlugin = (context)=>{
@@ -1,4 +1,4 @@
1
- import { mergeRsbuildConfig } from "../7744.421b464f.js";
1
+ import { mergeRsbuildConfig } from "../4524.js";
2
2
  import { PluginDriver } from "./PluginDriver.js";
3
3
  import { initRsbuild } from "./initRsbuild.js";
4
4
  import { RouteService } from "./route/RouteService.js";
@@ -1,5 +1,4 @@
1
- import { transformHtmlTemplate, pathToFileURL, createHead } from "../../5485.0bb24594.js";
2
- import { logger, picocolors } from "../../6289.29817fb4.js";
1
+ import { createHead, logger, transformHtmlTemplate, pathToFileURL, picocolors } from "../../8311.js";
3
2
  import { hintSSGFailed } from "../logger/hint.js";
4
3
  import { renderHtmlTemplate } from "./renderHtmlTemplate.js";
5
4
  async function renderPage(route, htmlTemplate, configHead, ssrBundlePath) {
@@ -1,6 +1,6 @@
1
- import { workerData } from "./renderPageWorker.165b5d46.js";
1
+ import { workerData } from "../../9224.js";
2
2
  import { createError } from "../utils/error.js";
3
- import { pMap } from "../../5485.0bb24594.js";
3
+ import { pMap } from "../../8311.js";
4
4
  import { renderPage } from "./renderPage.js";
5
5
  const params = workerData?.[1]?.params;
6
6
  if (!params) throw createError('SSG Worker Thread workerData params missing');
@@ -1,8 +1,7 @@
1
- /*! For license information please see renderPages.js.LICENSE.txt */
2
- import { logger, picocolors } from "../../6289.29817fb4.js";
3
- import { chunk } from "../../7744.421b464f.js";
1
+ /*! LICENSE: renderPages.js.LICENSE.txt */
2
+ import { chunk, logger, picocolors } from "../../4524.js";
4
3
  import { SSGWorkerThreadTaskSize, getNumberOfThreads, SSGWorkerThreadRecyclerMaxMemory, SSGConcurrency } from "./ssgEnv.js";
5
- import { pMap } from "../../5485.0bb24594.js";
4
+ import { pMap } from "../../8311.js";
6
5
  import { renderPage } from "./renderPage.js";
7
6
  import { hintSSGFailed } from "../logger/hint.js";
8
7
  import { renderHtmlTemplate } from "./renderHtmlTemplate.js";
@@ -1,5 +1,4 @@
1
- import { logger, writeFile, mkdir, rm, join } from "../../6289.29817fb4.js";
2
- import { isDebugMode } from "../../9348.1beb3e25.js";
1
+ import { logger, writeFile, mkdir, rm, join, isDebugMode } from "../../4524.js";
3
2
  import { NODE_SSG_BUNDLE_FOLDER, NODE_SSG_BUNDLE_NAME } from "../constants.js";
4
3
  import { renderPages } from "./renderPages.js";
5
4
  const rsbuildPluginSSG = ({ routeService, config })=>({
@@ -7,4 +7,4 @@ declare function SSGWorkerThreadTaskSize(): number;
7
7
  declare function SSGWorkerThreadRecyclerMaxMemory(): number | undefined;
8
8
  declare function getNumberOfThreads(pathnamesLength: number): number;
9
9
  declare function SSGConcurrency(): number;
10
- export { SSGWorkerThreadRecyclerMaxMemory, SSGWorkerThreadTaskSize, SSGConcurrency, getNumberOfThreads, };
10
+ export { getNumberOfThreads, SSGConcurrency, SSGWorkerThreadRecyclerMaxMemory, SSGWorkerThreadTaskSize, };
@@ -1,5 +1,5 @@
1
- /*! For license information please see ssgEnv.js.LICENSE.txt */
2
- import { node_os } from "../../9348.1beb3e25.js";
1
+ /*! LICENSE: ssgEnv.js.LICENSE.txt */
2
+ import { node_os } from "../../4524.js";
3
3
  /**
4
4
  * these codes are copied from
5
5
  * @link https://github.com/facebook/docusaurus/blob/45065e8d2b5831117b8d69fec1be28f5520cf105/packages/docusaurus/src/ssg/ssgEnv.ts#L11
@@ -1,5 +1,4 @@
1
- import { getSidebarDataGroup } from "../../../9348.1beb3e25.js";
2
- import { matchPath } from "../../../7744.421b464f.js";
1
+ import { matchPath, getSidebarDataGroup } from "../../../4524.js";
3
2
  import { generateLlmsTxt, generateLlmsFullTxt } from "./llmsTxt.js";
4
3
  async function emitLlmsTxt(config, routeService, emitAsset, mdContents) {
5
4
  const base = config.base ?? '/';
@@ -87,12 +86,11 @@ function organizeBySidebar(sidebar, routes) {
87
86
  const currSidebar = getSidebarDataGroup(sidebar, route);
88
87
  if (0 === currSidebar.length) return;
89
88
  const orderList = flatSidebar(currSidebar);
89
+ const normalizeLink = (p)=>p.replace(/\.html$/, '').replace(/\/index$/, '/');
90
90
  routes.sort((a, b)=>{
91
- let aIndex = orderList.findIndex((order)=>matchPath(order, a));
92
- if (-1 === aIndex) aIndex = Number.MAX_SAFE_INTEGER;
93
- let bIndex = orderList.findIndex((order)=>matchPath(order, b));
94
- if (-1 === bIndex) bIndex = Number.MAX_SAFE_INTEGER;
95
- return aIndex - bIndex;
91
+ const aIndex = orderList.findIndex((order)=>matchPath(normalizeLink(order), a));
92
+ const bIndex = orderList.findIndex((order)=>matchPath(normalizeLink(order), b));
93
+ return (-1 === aIndex ? Number.MAX_SAFE_INTEGER : aIndex) - (-1 === bIndex ? Number.MAX_SAFE_INTEGER : bIndex);
96
94
  });
97
95
  }
98
96
  export { emitLlmsTxt };
@@ -1,5 +1,4 @@
1
- import { normalizeHref, withBase } from "../../../9348.1beb3e25.js";
2
- import { logger } from "../../../6289.29817fb4.js";
1
+ import { normalizeHref, logger, withBase } from "../../../4524.js";
3
2
  import { extractInfoFromFrontmatterWithAbsolutePath } from "../../auto-nav-sidebar/utils.js";
4
3
  function routePathToMdPath(routePath, base) {
5
4
  let url = routePath;
@@ -1,5 +1,4 @@
1
- import { unified, visit, remark_gfm, remark_stringify } from "../../9348.1beb3e25.js";
2
- import { remark_mdx } from "../mdx/loader.15134034.js";
1
+ import { unified, visit, remark_gfm, remark_mdx, remark_stringify } from "../../7397.js";
3
2
  function remarkSplitMdx(options = {}) {
4
3
  return (tree)=>{
5
4
  const newChildren = [];
@@ -1,5 +1,4 @@
1
- import { pathToFileURL, createHead } from "../../5485.0bb24594.js";
2
- import { logger, picocolors } from "../../6289.29817fb4.js";
1
+ import { createHead, logger, pathToFileURL, picocolors } from "../../4524.js";
3
2
  import { hintSSGFailed } from "../logger/hint.js";
4
3
  async function renderPage(route, ssrBundlePath) {
5
4
  let render;
@@ -1,5 +1,5 @@
1
- import { logger, picocolors } from "../../6289.29817fb4.js";
2
- import { pMap } from "../../5485.0bb24594.js";
1
+ import { logger, picocolors } from "../../4524.js";
2
+ import { pMap } from "../../8311.js";
3
3
  import { renderPage } from "./renderPage.js";
4
4
  import { SSGConcurrency } from "../ssg/ssgEnv.js";
5
5
  const routePage2MdFilename = (routePath)=>{
@@ -1,5 +1,4 @@
1
- import { writeFile, mkdir, rm, join } from "../../6289.29817fb4.js";
2
- import { isDebugMode } from "../../9348.1beb3e25.js";
1
+ import { writeFile, mkdir, rm, join, isDebugMode } from "../../4524.js";
3
2
  import { NODE_SSG_MD_BUNDLE_FOLDER, NODE_SSG_MD_BUNDLE_NAME } from "../constants.js";
4
3
  import { renderPages } from "./renderPages.js";
5
4
  import { emitLlmsTxt } from "./llms/emitLlmsTxt.js";
@@ -1,4 +1,4 @@
1
- import { node_path, logger, promises } from "../../6289.29817fb4.js";
1
+ import { node_path, logger, promises } from "../../4524.js";
2
2
  import { createError } from "./error.js";
3
3
  function normalizePath(filePath) {
4
4
  return filePath.split(node_path.sep).join('/');
@@ -1,4 +1,4 @@
1
- import { createHash as external_node_crypto_createHash } from "../../7744.421b464f.js";
1
+ import { createHash as external_node_crypto_createHash } from "../../4524.js";
2
2
  function createHash(str) {
3
3
  return external_node_crypto_createHash('sha256').update(str).digest('hex').slice(0, 8);
4
4
  }
@@ -1,4 +1,4 @@
1
- import { picocolors } from "../../6289.29817fb4.js";
1
+ import { picocolors } from "../../8885.js";
2
2
  function createError(message, maxStackLines = 5) {
3
3
  const error = new Error(message);
4
4
  if (error.stack) {
@@ -1,6 +1,4 @@
1
- import { node_fs, core_rspack } from "../../7744.421b464f.js";
2
- import { node_path, logger } from "../../6289.29817fb4.js";
3
- import { createProcessor, MDX_OR_MD_REGEXP } from "../../9348.1beb3e25.js";
1
+ import { node_fs, node_path, core_rspack, logger, createProcessor, MDX_OR_MD_REGEXP } from "../../4524.js";
4
2
  import { createError } from "./error.js";
5
3
  import { importStatementRegex } from "../constants.js";
6
4
  const RspackResolveFactory = core_rspack.experiments.resolver.ResolverFactory;
@@ -1,4 +1,4 @@
1
- import { promises } from "../../6289.29817fb4.js";
1
+ import { promises } from "../../8885.js";
2
2
  async function pathExists(path) {
3
3
  try {
4
4
  await promises.access(path);
@@ -1,4 +1,4 @@
1
- import { removeLeadingSlash } from "../../9348.1beb3e25.js";
1
+ import { removeLeadingSlash } from "../../4524.js";
2
2
  function getPageKey(route) {
3
3
  const cleanRoute = removeLeadingSlash(route);
4
4
  return cleanRoute.replace(/\//g, '_').replace(/\.[^.]+$/, '') || 'index';
@@ -1,5 +1,4 @@
1
- import { node_os } from "../../9348.1beb3e25.js";
2
- import { node_path } from "../../6289.29817fb4.js";
1
+ import { node_os, node_path } from "../../1361.js";
3
2
  const isWindows = 'win32' === node_os.platform();
4
3
  function slash(p) {
5
4
  return p.replace(/\\/g, '/');
@@ -1,5 +1,4 @@
1
- import { node_path, logger, picocolors } from "../../6289.29817fb4.js";
2
- import { core_rspack } from "../../7744.421b464f.js";
1
+ import { node_path, core_rspack, logger, picocolors } from "../../4524.js";
3
2
  import { pathExists, readJson } from "./fs.js";
4
3
  import { PACKAGE_ROOT } from "../constants.js";
5
4
  import { hintReactVersion } from "../logger/hint.js";
@@ -26,7 +25,8 @@ async function resolveReactRouterDomAlias() {
26
25
  extensions: [
27
26
  '.js'
28
27
  ],
29
- alias
28
+ alias,
29
+ enablePnp: !!process.versions.pnp
30
30
  });
31
31
  try {
32
32
  const resolved = await resolver.async(basedir, 'react-router-dom/package.json');
@@ -59,12 +59,16 @@ async function resolveReactAlias(isSSR) {
59
59
  '.js'
60
60
  ],
61
61
  alias,
62
- conditionNames: isSSR ? [
63
- '...'
64
- ] : [
65
- 'browser',
66
- '...'
67
- ]
62
+ conditionNames: [
63
+ ...isSSR ? [
64
+ 'node'
65
+ ] : [
66
+ 'browser'
67
+ ],
68
+ 'import',
69
+ 'module'
70
+ ],
71
+ enablePnp: !!process.versions.pnp
68
72
  });
69
73
  await Promise.all(libPaths.map(async (lib)=>{
70
74
  try {
@@ -98,7 +102,8 @@ async function resolveReactRenderToMarkdownAlias() {
98
102
  'require',
99
103
  'node',
100
104
  'default'
101
- ]
105
+ ],
106
+ enablePnp: !!process.versions.pnp
102
107
  });
103
108
  try {
104
109
  const resolved = await resolver.async(process.cwd(), 'react-render-to-markdown');