@rspress/core 2.0.0-rc.1 → 2.0.0-rc.2

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 (256) hide show
  1. package/bin/rspress.js +1 -1
  2. package/dist/0~7675.989ee664.js +1791 -0
  3. package/dist/1218.3869bad6.js +2 -0
  4. package/dist/4669.12208c6a.js +2 -0
  5. package/dist/5313.6594aba0.js +63 -0
  6. package/dist/5485.2a0273cf.js +98 -0
  7. package/dist/6289.c67fe0d5.js +5 -0
  8. package/dist/7805.cadab34e.js +4 -0
  9. package/dist/8813.9da1f210.js +2 -0
  10. package/dist/cli/config/index.js +4 -0
  11. package/dist/cli/config/loadConfigFile.js +30 -0
  12. package/dist/cli/index.cb89dbd1.js +3 -0
  13. package/dist/cli/index.js +122 -0
  14. package/dist/eject-theme/components/Banner/index.tsx +3 -4
  15. package/dist/eject-theme/components/Callout/index.scss +0 -2
  16. package/dist/eject-theme/components/CodeBlock/index.scss +4 -12
  17. package/dist/eject-theme/components/CodeBlock/index.tsx +6 -1
  18. package/dist/eject-theme/components/CodeButtonGroup/CopyCodeButton.tsx +1 -3
  19. package/dist/eject-theme/components/CodeButtonGroup/index.scss +5 -1
  20. package/dist/eject-theme/components/CodeButtonGroup/index.tsx +1 -3
  21. package/dist/eject-theme/components/DocContent/doc.scss +27 -7
  22. package/dist/eject-theme/components/DocContent/docComponents/table.tsx +10 -4
  23. package/dist/eject-theme/components/DocContent/index.tsx +3 -3
  24. package/dist/eject-theme/components/{DocContent/FallbackHeading.tsx → FallbackHeading/index.tsx} +20 -11
  25. package/dist/eject-theme/components/Link/index.tsx +13 -4
  26. package/dist/eject-theme/components/Nav/NavMenu.tsx +2 -3
  27. package/dist/eject-theme/components/NavHamburger/index.tsx +3 -4
  28. package/dist/eject-theme/components/NavScreen/NavScreenMenuItem.tsx +2 -3
  29. package/dist/eject-theme/components/Overview/OverviewGroup.tsx +1 -2
  30. package/dist/eject-theme/components/Overview/index.tsx +6 -2
  31. package/dist/eject-theme/components/PackageManagerTabs/index.tsx +12 -0
  32. package/dist/eject-theme/components/PrevNextPage/index.tsx +6 -3
  33. package/dist/eject-theme/components/Root/index.tsx +58 -0
  34. package/dist/eject-theme/components/Search/NoSearchResult.tsx +2 -3
  35. package/dist/eject-theme/components/Search/SearchButton.tsx +3 -4
  36. package/dist/eject-theme/components/Search/SearchPanel.tsx +12 -7
  37. package/dist/eject-theme/components/Search/SuggestItem.tsx +15 -12
  38. package/dist/eject-theme/components/Sidebar/SidebarGroup.tsx +2 -3
  39. package/dist/eject-theme/components/Sidebar/SidebarItem.tsx +1 -0
  40. package/dist/eject-theme/components/SidebarMenu/index.tsx +4 -4
  41. package/dist/eject-theme/components/SocialLinks/index.tsx +2 -3
  42. package/dist/eject-theme/components/SourceCode/index.tsx +6 -4
  43. package/dist/eject-theme/components/SwitchAppearance/index.tsx +3 -5
  44. package/dist/eject-theme/components/Tabs/index.scss +19 -22
  45. package/dist/eject-theme/components/Toc/TocItem.scss +3 -3
  46. package/dist/eject-theme/components/Toc/TocItem.tsx +1 -0
  47. package/dist/index.d.ts +6 -6
  48. package/dist/index.js +16 -3134
  49. package/dist/node/PluginDriver.d.ts +1 -1
  50. package/dist/node/PluginDriver.js +143 -0
  51. package/dist/node/auto-nav-sidebar/index.js +44 -0
  52. package/dist/node/auto-nav-sidebar/locales.js +26 -0
  53. package/dist/node/auto-nav-sidebar/normalize.js +228 -0
  54. package/dist/node/auto-nav-sidebar/utils.js +68 -0
  55. package/dist/node/auto-nav-sidebar/walk.js +67 -0
  56. package/dist/node/build.js +31 -0
  57. package/dist/node/constants.d.ts +1 -0
  58. package/dist/node/constants.js +33 -0
  59. package/dist/node/dev.js +32 -0
  60. package/dist/node/eject.js +111 -0
  61. package/dist/node/index.d.ts +5 -5
  62. package/dist/node/initRsbuild.d.ts +2 -2
  63. package/dist/node/initRsbuild.js +338 -0
  64. package/dist/node/last-updated/index.js +28 -0
  65. package/dist/node/logger/hint.d.ts +1 -1
  66. package/dist/node/logger/hint.js +85 -0
  67. package/dist/node/mdx/loader.d.ts +1 -1
  68. package/dist/node/mdx/loader.e1578c62.js +13 -0
  69. package/dist/{loader.js → node/mdx/loader.js} +2 -2
  70. package/dist/node/mdx/options.d.ts +2 -2
  71. package/dist/node/mdx/options.js +100 -0
  72. package/dist/node/mdx/processor.d.ts +2 -2
  73. package/dist/node/mdx/processor.js +71 -0
  74. package/dist/node/mdx/rehypePlugins/codeMeta.js +10 -0
  75. package/dist/node/mdx/rehypePlugins/headerAnchor.js +53 -0
  76. package/dist/node/mdx/rehypePlugins/shiki.js +34 -0
  77. package/dist/node/mdx/rehypePlugins/transformers/add-lang.js +15 -0
  78. package/dist/node/mdx/rehypePlugins/transformers/add-line-numbers.js +22 -0
  79. package/dist/node/mdx/rehypePlugins/transformers/add-title.js +24 -0
  80. package/dist/node/mdx/rehypePlugins/transformers/add-wrap-code.js +22 -0
  81. package/dist/node/mdx/rehypePlugins/transformers/index.d.ts +5 -5
  82. package/dist/node/mdx/rehypePlugins/transformers/index.js +5 -0
  83. package/dist/node/mdx/rehypePlugins/transformers/meta-highlight.js +41 -0
  84. package/dist/node/mdx/remarkPlugins/builtin.js +11 -0
  85. package/dist/node/mdx/remarkPlugins/containerSyntax.js +190 -0
  86. package/dist/node/mdx/remarkPlugins/fileCodeBlock.js +66 -0
  87. package/dist/node/mdx/remarkPlugins/image.js +67 -0
  88. package/dist/node/mdx/remarkPlugins/link.d.ts +1 -1
  89. package/dist/node/mdx/remarkPlugins/link.js +99 -0
  90. package/dist/node/mdx/remarkPlugins/toc.js +50 -0
  91. package/dist/node/mdx/types.d.ts +3 -3
  92. package/dist/node/medium-zoom/index.d.ts +1 -1
  93. package/dist/node/medium-zoom/index.js +14 -0
  94. package/dist/node/route/RoutePage.d.ts +1 -1
  95. package/dist/node/route/RoutePage.js +61 -0
  96. package/dist/node/route/RouteService.d.ts +1 -1
  97. package/dist/node/route/RouteService.js +177 -0
  98. package/dist/node/route/extractPageData.d.ts +1 -1
  99. package/dist/node/route/extractPageData.js +112 -0
  100. package/dist/node/route/normalizeRoutePath.js +54 -0
  101. package/dist/node/runtimeModule/DEFAULT_I18N_TEXT.d.ts +21 -0
  102. package/dist/node/runtimeModule/DEFAULT_I18N_TEXT.js +150 -0
  103. package/dist/node/runtimeModule/globalStyles.d.ts +1 -1
  104. package/dist/node/runtimeModule/globalStyles.js +12 -0
  105. package/dist/node/runtimeModule/globalUIComponents.d.ts +1 -1
  106. package/dist/node/runtimeModule/globalUIComponents.js +25 -0
  107. package/dist/node/runtimeModule/i18n.d.ts +2 -2
  108. package/dist/node/runtimeModule/i18n.js +83 -0
  109. package/dist/node/runtimeModule/pageData/createPageData.d.ts +1 -1
  110. package/dist/node/runtimeModule/pageData/createPageData.js +64 -0
  111. package/dist/node/runtimeModule/pageData/rsbuildPlugin.d.ts +1 -1
  112. package/dist/node/runtimeModule/pageData/rsbuildPlugin.js +51 -0
  113. package/dist/node/runtimeModule/routeList.d.ts +1 -1
  114. package/dist/node/runtimeModule/routeList.js +7 -0
  115. package/dist/node/runtimeModule/searchHooks.d.ts +1 -1
  116. package/dist/node/runtimeModule/searchHooks.js +11 -0
  117. package/dist/node/runtimeModule/siteData/createSiteData.js +34 -0
  118. package/dist/node/runtimeModule/siteData/normalizeThemeConfig.js +94 -0
  119. package/dist/node/runtimeModule/siteData/rsbuildPlugin.d.ts +1 -1
  120. package/dist/node/runtimeModule/siteData/rsbuildPlugin.js +24 -0
  121. package/dist/node/runtimeModule/socialLinks.d.ts +1 -1
  122. package/dist/node/runtimeModule/socialLinks.js +8 -0
  123. package/dist/node/runtimeModule/types.d.ts +2 -2
  124. package/dist/node/serve.js +23 -0
  125. package/dist/node/ssg/renderHtmlTemplate.js +33 -0
  126. package/dist/node/ssg/renderPage.js +34 -0
  127. package/dist/node/ssg/renderPageWorker.474f9f73.js +2 -0
  128. package/dist/node/ssg/renderPageWorker.js +15 -0
  129. package/dist/node/ssg/renderPages.d.ts +1 -1
  130. package/dist/node/ssg/renderPages.js +105 -0
  131. package/dist/node/ssg/renderPages.js.LICENSE.txt +4 -0
  132. package/dist/node/ssg/rsbuildPluginCSR.d.ts +1 -1
  133. package/dist/node/ssg/rsbuildPluginCSR.js +27 -0
  134. package/dist/node/ssg/rsbuildPluginSSG.d.ts +1 -1
  135. package/dist/node/ssg/rsbuildPluginSSG.js +72 -0
  136. package/dist/node/ssg/ssgEnv.js +33 -0
  137. package/dist/node/ssg/ssgEnv.js.LICENSE.txt +5 -0
  138. package/dist/node/ssg-md/llms/emitLlmsTxt.d.ts +1 -1
  139. package/dist/node/ssg-md/llms/emitLlmsTxt.js +80 -0
  140. package/dist/node/ssg-md/llms/llmsTxt.d.ts +1 -1
  141. package/dist/node/ssg-md/llms/llmsTxt.js +66 -0
  142. package/dist/node/ssg-md/react/index.d.ts +1 -1
  143. package/dist/node/ssg-md/remarkSplitMdx.js +202 -0
  144. package/dist/node/ssg-md/renderPage.js +31 -0
  145. package/dist/node/ssg-md/renderPages.d.ts +1 -1
  146. package/dist/node/ssg-md/renderPages.js +27 -0
  147. package/dist/node/ssg-md/rsbuildPluginSSGMD.d.ts +1 -1
  148. package/dist/node/ssg-md/rsbuildPluginSSGMD.js +47 -0
  149. package/dist/node/utils/applyReplaceRules.js +6 -0
  150. package/dist/node/utils/checkLanguageParity.js +77 -0
  151. package/dist/node/utils/createHash.js +5 -0
  152. package/dist/node/utils/error.d.ts +9 -0
  153. package/dist/node/utils/error.js +9 -0
  154. package/dist/node/utils/escapeHeadingIds.js +5 -0
  155. package/dist/node/utils/flattenMdxContent.js +74 -0
  156. package/dist/node/utils/fs.js +14 -0
  157. package/dist/node/utils/getImportAstNode.js +63 -0
  158. package/dist/node/utils/getPageKey.js +6 -0
  159. package/dist/node/utils/getSocialIcons.js +32 -0
  160. package/dist/node/utils/index.d.ts +10 -9
  161. package/dist/node/utils/normalizePath.js +10 -0
  162. package/dist/node/utils/reactAlias.d.ts +2 -0
  163. package/dist/node/utils/reactAlias.js +83 -0
  164. package/dist/rslib-runtime.99091bf6.js +18 -0
  165. package/dist/runtime/App.js +2 -2
  166. package/dist/runtime/ClientApp.d.ts +1 -1
  167. package/dist/runtime/ClientApp.js +0 -4
  168. package/dist/runtime/ssrMdServerEntry.js +1 -1
  169. package/dist/runtime/ssrServerEntry.js +2 -1
  170. package/dist/runtime.72d450ac.js +1 -0
  171. package/dist/runtime.js +3 -2
  172. package/dist/shiki-transformers.d.ts +1 -1
  173. package/dist/shiki-transformers.js +6 -120
  174. package/dist/theme/components/Banner/index.d.ts +1 -1
  175. package/dist/theme/components/Banner/index.js +2 -3
  176. package/dist/theme/components/Callout/index.css +0 -2
  177. package/dist/theme/components/CodeBlock/index.css +4 -15
  178. package/dist/theme/components/CodeBlock/index.js +1 -0
  179. package/dist/theme/components/CodeButtonGroup/CopyCodeButton.js +3 -5
  180. package/dist/theme/components/CodeButtonGroup/index.css +5 -1
  181. package/dist/theme/components/CodeButtonGroup/index.js +3 -5
  182. package/dist/theme/components/DocContent/doc.css +28 -7
  183. package/dist/theme/components/DocContent/docComponents/index.d.ts +3 -3
  184. package/dist/theme/components/DocContent/docComponents/table.d.ts +2 -2
  185. package/dist/theme/components/DocContent/docComponents/table.js +8 -3
  186. package/dist/theme/components/DocContent/index.js +2 -3
  187. package/dist/theme/components/{DocContent/FallbackHeading.js → FallbackHeading/index.js} +19 -11
  188. package/dist/theme/components/HoverGroup/useHoverGroup.d.ts +1 -1
  189. package/dist/theme/components/Link/index.js +9 -5
  190. package/dist/theme/components/Nav/NavMenu.js +2 -3
  191. package/dist/theme/components/NavHamburger/index.js +3 -4
  192. package/dist/theme/components/NavScreen/NavScreenMenuItem.js +2 -3
  193. package/dist/theme/components/Overview/OverviewGroup.js +1 -2
  194. package/dist/theme/components/Overview/index.js +1 -2
  195. package/dist/theme/components/PackageManagerTabs/index.d.ts +1 -1
  196. package/dist/theme/components/PackageManagerTabs/index.js +4 -0
  197. package/dist/theme/components/PrevNextPage/index.js +3 -4
  198. package/dist/theme/components/Root/index.d.ts +54 -0
  199. package/dist/theme/components/Root/index.js +7 -0
  200. package/dist/theme/components/Search/NoSearchResult.js +2 -3
  201. package/dist/theme/components/Search/SearchButton.js +3 -4
  202. package/dist/theme/components/Search/SearchPanel.js +12 -15
  203. package/dist/theme/components/Search/SuggestItem.d.ts +1 -1
  204. package/dist/theme/components/Search/SuggestItem.js +7 -11
  205. package/dist/theme/components/Search/logic/Provider.d.ts +1 -1
  206. package/dist/theme/components/Search/logic/providers/LocalProvider.d.ts +2 -2
  207. package/dist/theme/components/Search/logic/search.d.ts +1 -1
  208. package/dist/theme/components/Sidebar/SidebarGroup.js +2 -3
  209. package/dist/theme/components/Sidebar/SidebarItem.js +1 -0
  210. package/dist/theme/components/SidebarMenu/index.js +3 -5
  211. package/dist/theme/components/SocialLinks/index.js +2 -3
  212. package/dist/theme/components/SourceCode/index.js +2 -4
  213. package/dist/theme/components/SwitchAppearance/index.js +3 -5
  214. package/dist/theme/components/Tabs/index.css +13 -22
  215. package/dist/theme/components/Toc/TocItem.css +2 -3
  216. package/dist/theme/components/Toc/TocItem.js +1 -0
  217. package/dist/theme/icons.d.ts +25 -0
  218. package/dist/theme/icons.js +47 -0
  219. package/dist/theme/index.d.ts +62 -59
  220. package/dist/theme/index.js +4 -1
  221. package/dist/theme/layout/DocLayout/index.css +2 -2
  222. package/dist/theme/logic/useFullTextSearch.d.ts +1 -1
  223. package/dist/theme/styles/scrollbar.css +1 -0
  224. package/dist/theme/styles/vars/base-vars.css +5 -3
  225. package/dist/theme/styles/vars/home-vars.css +2 -1
  226. package/package.json +17 -18
  227. package/dist/3~128.js +0 -74
  228. package/dist/3~517.js +0 -1786
  229. package/dist/3~894.js +0 -26
  230. package/dist/cli.js +0 -259
  231. package/dist/index.js.LICENSE.txt +0 -10
  232. package/dist/node/auto-nav-sidebar/fixtures/docs/guide/c.d.ts +0 -2
  233. package/dist/node/auto-nav-sidebar/fixtures/docs-locales/en/guide/c.d.ts +0 -2
  234. package/dist/node/auto-nav-sidebar/fixtures/docs-locales/zh/guide/c.d.ts +0 -2
  235. package/dist/node/auto-nav-sidebar/locales.test.d.ts +0 -1
  236. package/dist/node/auto-nav-sidebar/walk.test.d.ts +0 -1
  237. package/dist/node/mdx/rehypePlugins/headerAnchor.test.d.ts +0 -1
  238. package/dist/node/mdx/remarkPlugins/containerSyntax.test.d.ts +0 -1
  239. package/dist/node/mdx/remarkPlugins/fileCodeBlock.test.d.ts +0 -1
  240. package/dist/node/mdx/remarkPlugins/image.test.d.ts +0 -1
  241. package/dist/node/mdx/remarkPlugins/link.test.d.ts +0 -1
  242. package/dist/node/route/RouteService.test.d.ts +0 -1
  243. package/dist/node/route/extractPageData.test.d.ts +0 -1
  244. package/dist/node/route/fixtures/basic/guide/c.d.ts +0 -2
  245. package/dist/node/route/normalizeRoutePath.test.d.ts +0 -1
  246. package/dist/node/runtimeModule/i18n.test.d.ts +0 -1
  247. package/dist/node/ssg-md/remarkSplitMdx.test.d.ts +0 -4
  248. package/dist/node/utils/checkLanguageParity.test.d.ts +0 -1
  249. package/dist/node/utils/detectCustomIcon.d.ts +0 -1
  250. package/dist/node/utils/detectReactVersion.d.ts +0 -3
  251. package/dist/processor.js +0 -4539
  252. package/dist/renderPageWorker.js +0 -196
  253. package/dist/theme/components/Search/logic/util.test.d.ts +0 -1
  254. /package/dist/cli/{config.d.ts → config/index.d.ts} +0 -0
  255. /package/dist/{shiki-transformers.js.LICENSE.txt → node/mdx/rehypePlugins/transformers/meta-highlight.js.LICENSE.txt} +0 -0
  256. /package/dist/theme/components/{DocContent/FallbackHeading.d.ts → FallbackHeading/index.d.ts} +0 -0
@@ -1,7 +1,5 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { SvgWrapper } from "@theme";
3
- import copy from "@theme-assets/copy";
4
- import success from "@theme-assets/success";
2
+ import { IconCopy, IconSuccess, SvgWrapper } from "@theme";
5
3
  import copy_to_clipboard from "copy-to-clipboard";
6
4
  import { useRef } from "react";
7
5
  import "./CopyCodeButton.css";
@@ -39,11 +37,11 @@ function CopyCodeButton({ codeBlockRef }) {
39
37
  title: t('codeButtonGroupCopyButtonText'),
40
38
  children: [
41
39
  /*#__PURE__*/ jsx(SvgWrapper, {
42
- icon: copy,
40
+ icon: IconCopy,
43
41
  className: "rp-code-button-group__icon rp-code-copy-button__icon rp-code-copy-button__icon--copy"
44
42
  }),
45
43
  /*#__PURE__*/ jsx(SvgWrapper, {
46
- icon: success,
44
+ icon: IconSuccess,
47
45
  className: "rp-code-button-group__icon rp-code-copy-button__icon rp-code-copy-button__icon--success"
48
46
  })
49
47
  ]
@@ -1,9 +1,13 @@
1
+ :root {
2
+ --rp-code-button-group-z-index: 10;
3
+ }
4
+
1
5
  .rp-codeblock__content:hover .rp-code-button-group__button {
2
6
  opacity: 1;
3
7
  }
4
8
 
5
9
  .rp-code-button-group {
6
- z-index: 10;
10
+ z-index: var(--rp-code-button-group-z-index);
7
11
  gap: 10px;
8
12
  display: flex;
9
13
  position: absolute;
@@ -1,8 +1,6 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useSite } from "@rspress/core/runtime";
3
- import { SvgWrapper } from "@theme";
4
- import wrap from "@theme-assets/wrap";
5
- import wrapped from "@theme-assets/wrapped";
3
+ import { IconWrap, IconWrapped, SvgWrapper } from "@theme";
6
4
  import clsx from "clsx";
7
5
  import { useRef, useState } from "react";
8
6
  import "./index.css";
@@ -32,11 +30,11 @@ function CodeButtonGroup({ codeWrap, toggleCodeWrap, copyElementRef, showCodeWra
32
30
  title: "Toggle code wrap",
33
31
  children: [
34
32
  /*#__PURE__*/ jsx(SvgWrapper, {
35
- icon: wrapped,
33
+ icon: IconWrapped,
36
34
  className: "rp-code-button-group__icon rp-code-button-group__icon--wrapped"
37
35
  }),
38
36
  /*#__PURE__*/ jsx(SvgWrapper, {
39
- icon: wrap,
37
+ icon: IconWrap,
40
38
  className: "rp-code-button-group__icon rp-code-button-group__icon--wrap"
41
39
  })
42
40
  ]
@@ -25,8 +25,8 @@
25
25
  }
26
26
 
27
27
  .rp-doc :not(:where(.rp-not-doc, .rp-not-doc *)):where(a.rp-link):not(:where(.rp-header-anchor)):hover {
28
- border-bottom: 1px solid var(--rp-c-brand);
29
28
  opacity: .85;
29
+ border-bottom: 1px solid;
30
30
  }
31
31
 
32
32
  .rp-doc :not(:where(.rp-not-doc, .rp-not-doc *)):where(a.rp-link):not(:where(.rp-header-anchor))[target="_blank"]:after {
@@ -149,35 +149,55 @@
149
149
  margin-top: .5rem;
150
150
  }
151
151
 
152
+ .rp-doc :not(:where(.rp-not-doc, .rp-not-doc *)):where(.rp-table-scroll-container) {
153
+ overflow-x: auto;
154
+ }
155
+
152
156
  .rp-doc :not(:where(.rp-not-doc, .rp-not-doc *)):where(table) {
157
+ table-layout: auto;
158
+ border-collapse: separate;
159
+ border-spacing: 0;
160
+ border: 1px solid var(--rp-c-divider-light);
153
161
  border-radius: var(--rp-radius);
154
162
  width: 100%;
155
- box-shadow: inset 0 0 0 .5px var(--rp-c-divider-light);
156
- outline: 1px solid var(--rp-c-divider-light);
157
163
  overflow: hidden;
158
164
  }
159
165
 
166
+ .rp-doc :not(:where(.rp-not-doc, .rp-not-doc *)):where(table)::-webkit-scrollbar {
167
+ width: 5px;
168
+ height: 5px;
169
+ }
170
+
171
+ .rp-doc :not(:where(.rp-not-doc, .rp-not-doc *)):where(table)::-webkit-scrollbar-corner {
172
+ display: none;
173
+ }
174
+
175
+ .rp-doc :not(:where(.rp-not-doc, .rp-not-doc *)):where(table)::-webkit-scrollbar-thumb {
176
+ background-color: #0000000d;
177
+ border-radius: 10px;
178
+ }
179
+
160
180
  .rp-doc :not(:where(.rp-not-doc, .rp-not-doc *)):where(thead) {
161
181
  color: var(--rp-c-text-0);
162
- background: var(--rp-c-bg-soft);
182
+ background: var(--rp-code-title-bg);
163
183
  }
164
184
 
165
185
  .rp-doc :not(:where(.rp-not-doc, .rp-not-doc *)):where(th) {
166
186
  text-align: left;
167
187
  border-bottom: 1px solid var(--rp-c-divider-light);
168
- padding: 1rem 2rem;
188
+ padding: .75rem 1.25rem;
169
189
  font-size: .875rem;
170
190
  font-weight: 600;
171
191
  position: relative;
172
192
  }
173
193
 
174
194
  .rp-doc :not(:where(.rp-not-doc, .rp-not-doc *)):where(tbody) {
175
- background: none;
195
+ background: var(--rp-c-bg);
176
196
  }
177
197
 
178
198
  .rp-doc :not(:where(.rp-not-doc, .rp-not-doc *)):where(td) {
179
199
  border-bottom: 1px solid var(--rp-c-divider-light);
180
- padding: 1rem 1.5rem;
200
+ padding: .75rem 1.25rem;
181
201
  font-size: .875rem;
182
202
  }
183
203
 
@@ -198,6 +218,7 @@
198
218
  font-family: var(--rp-font-family-mono);
199
219
  border-radius: var(--rp-radius-small);
200
220
  background-color: var(--rp-c-text-code-bg);
221
+ border: 1px solid var(--rp-c-text-code-border);
201
222
  overflow-wrap: break-word;
202
223
  padding: 3px 6px;
203
224
  }
@@ -1,5 +1,5 @@
1
- import { Code } from './code';
2
- import { ShikiPre } from './pre';
1
+ import { Code } from './code.js';
2
+ import { ShikiPre } from './pre.js';
3
3
  export declare function getCustomMDXComponent(): {
4
4
  h1: (props: React.ComponentProps<"h1">) => import("react/jsx-runtime").JSX.Element;
5
5
  h2: (props: React.ComponentProps<"h2">) => import("react/jsx-runtime").JSX.Element;
@@ -10,7 +10,7 @@ export declare function getCustomMDXComponent(): {
10
10
  ul: (props: import("react").ComponentProps<"ul">) => import("react/jsx-runtime").JSX.Element;
11
11
  ol: (props: import("react").ComponentProps<"ol">) => import("react/jsx-runtime").JSX.Element;
12
12
  li: (props: import("react").ComponentProps<"li">) => import("react/jsx-runtime").JSX.Element;
13
- table: (props: import("react").ComponentProps<"table">) => import("react/jsx-runtime").JSX.Element;
13
+ table: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "ref"> & import("react").RefAttributes<HTMLTableElement>>;
14
14
  td: (props: import("react").ComponentProps<"td">) => import("react/jsx-runtime").JSX.Element;
15
15
  th: (props: import("react").ComponentProps<"th">) => import("react/jsx-runtime").JSX.Element;
16
16
  tr: (props: import("react").ComponentProps<"tr">) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import type { ComponentProps } from 'react';
2
- export declare const Table: (props: ComponentProps<"table">) => import("react/jsx-runtime").JSX.Element;
1
+ import { type ComponentProps } from 'react';
2
+ export declare const Table: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "ref"> & import("react").RefAttributes<HTMLTableElement>>;
3
3
  export declare const Tr: (props: ComponentProps<"tr">) => import("react/jsx-runtime").JSX.Element;
4
4
  export declare const Td: (props: ComponentProps<"td">) => import("react/jsx-runtime").JSX.Element;
5
5
  export declare const Th: (props: ComponentProps<"th">) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,12 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- const Table = (props)=>/*#__PURE__*/ jsx("table", {
3
- ...props
4
- });
2
+ import { forwardRef } from "react";
3
+ const Table = /*#__PURE__*/ forwardRef((props, ref)=>/*#__PURE__*/ jsx("div", {
4
+ className: "rp-table-scroll-container rp-scrollbar",
5
+ children: /*#__PURE__*/ jsx("table", {
6
+ ref: ref,
7
+ ...props
8
+ })
9
+ }));
5
10
  const Tr = (props)=>/*#__PURE__*/ jsx("tr", {
6
11
  ...props
7
12
  });
@@ -1,10 +1,9 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { MDXProvider } from "@mdx-js/react";
3
3
  import { Content, usePage, useSite } from "@rspress/core/runtime";
4
- import { Callout, getCustomMDXComponent } from "@theme";
5
- import "./doc.css";
4
+ import { Callout, FallbackHeading, getCustomMDXComponent } from "@theme";
6
5
  import { useScrollAfterNav } from "../../logic/useScrollAfterNav.js";
7
- import { FallbackHeading } from "./FallbackHeading.js";
6
+ import "./doc.css";
8
7
  function FallbackTitle() {
9
8
  const { site } = useSite();
10
9
  const { page } = usePage();
@@ -1,19 +1,27 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { renderInlineMarkdown } from "@theme";
2
+ import { getCustomMDXComponent, renderInlineMarkdown } from "@theme";
3
3
  import { slug } from "github-slugger";
4
- import { A } from "./docComponents/a.js";
5
- import { H1, H2, H3, H4, H5, H6 } from "./docComponents/title.js";
6
- const HEADING_MAP = {
7
- 1: H1,
8
- 2: H2,
9
- 3: H3,
10
- 4: H4,
11
- 5: H5,
12
- 6: H6
4
+ import { useMemo } from "react";
5
+ const getHeadingMap = ()=>{
6
+ const { h1, h2, h3, h4, h5, h6 } = getCustomMDXComponent();
7
+ return {
8
+ 1: h1,
9
+ 2: h2,
10
+ 3: h3,
11
+ 4: h4,
12
+ 5: h5,
13
+ 6: h6
14
+ };
13
15
  };
14
16
  function FallbackHeading({ level, title }) {
15
17
  const titleSlug = title && slug(title.trim());
16
- const Element = HEADING_MAP[level] || H1;
18
+ const Element = useMemo(()=>{
19
+ const headingMap = getHeadingMap();
20
+ return headingMap[level] || headingMap[1];
21
+ }, [
22
+ level
23
+ ]);
24
+ const A = useMemo(()=>getCustomMDXComponent().a, []);
17
25
  return titleSlug && /*#__PURE__*/ jsxs(Element, {
18
26
  id: titleSlug,
19
27
  children: [
@@ -1,4 +1,4 @@
1
- import { type Items } from '.';
1
+ import { type Items } from './index.js';
2
2
  declare function useHoverGroup(props: {
3
3
  items?: Items;
4
4
  activeMatcher?: (item: Items[number]) => boolean;
@@ -8,27 +8,30 @@ nprogress.configure({
8
8
  showSpinner: false
9
9
  });
10
10
  function Link(props) {
11
- const { href = '/', children, className = '', onClick, onMouseEnter, startTransition } = props;
11
+ const { href = '/', children, className = '', onClick, onMouseEnter, startTransition, ...otherProps } = props;
12
12
  const { linkType, removeBaseHref, withBaseHref } = getHref(href);
13
13
  const navigate = useLinkNavigate({
14
14
  startTransition
15
15
  });
16
16
  if ('external' === linkType) return /*#__PURE__*/ jsx("a", {
17
- ...props,
18
17
  href: href,
19
18
  target: "_blank",
20
19
  rel: "noopener noreferrer",
21
20
  className: clsx(className, 'rp-link'),
21
+ onClick: onClick,
22
+ onMouseEnter: onMouseEnter,
23
+ ...otherProps,
22
24
  children: children
23
25
  });
24
26
  if ('hashOnly' === linkType) return /*#__PURE__*/ jsx("a", {
25
- ...props,
26
27
  href: href,
27
28
  className: clsx(className, 'rp-link'),
29
+ onClick: onClick,
30
+ onMouseEnter: onMouseEnter,
31
+ ...otherProps,
28
32
  children: children
29
33
  });
30
34
  if ('relative' === linkType) return /*#__PURE__*/ jsx("a", {
31
- ...props,
32
35
  href: href,
33
36
  className: clsx(className, 'rp-link'),
34
37
  onMouseEnter: (event)=>{
@@ -41,10 +44,10 @@ function Link(props) {
41
44
  e.preventDefault();
42
45
  navigate(href);
43
46
  },
47
+ ...otherProps,
44
48
  children: children
45
49
  });
46
50
  return /*#__PURE__*/ jsx("a", {
47
- ...props,
48
51
  href: withBaseHref,
49
52
  className: clsx(className, 'rp-link'),
50
53
  onMouseEnter: (event)=>{
@@ -57,6 +60,7 @@ function Link(props) {
57
60
  e.preventDefault();
58
61
  navigate(removeBaseHref);
59
62
  },
63
+ ...otherProps,
60
64
  children: children
61
65
  });
62
66
  }
@@ -1,13 +1,12 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { matchNavbar, useLocation } from "@rspress/core/runtime";
3
- import { Link, SvgWrapper, Tag, useHoverGroup } from "@theme";
4
- import arrow_down from "@theme-assets/arrow-down";
3
+ import { IconArrowDown, Link, SvgWrapper, Tag, useHoverGroup } from "@theme";
5
4
  import clsx from "clsx";
6
5
  import { useMemo } from "react";
7
6
  import { useLangsMenu, useVersionsMenu } from "./hooks.js";
8
7
  import "./NavMenu.css";
9
8
  const SvgDown = (props)=>/*#__PURE__*/ jsx(SvgWrapper, {
10
- icon: arrow_down,
9
+ icon: IconArrowDown,
11
10
  ...props
12
11
  });
13
12
  function NavMenuItemWithChildren({ menuItem, activeMatcher }) {
@@ -1,6 +1,5 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import { SocialLinks, SvgWrapper, useHoverGroup } from "@theme";
3
- import small_menu from "@theme-assets/small-menu";
2
+ import { IconSmallMenu, SocialLinks, SvgWrapper, useHoverGroup } from "@theme";
4
3
  import clsx from "clsx";
5
4
  import { createPortal } from "react-dom";
6
5
  import { NavVersions } from "../Nav/NavMenu.js";
@@ -41,7 +40,7 @@ function NavHamburger() {
41
40
  'rp-nav-hamburger--active': isScreenOpen
42
41
  }),
43
42
  children: /*#__PURE__*/ jsx(SvgWrapper, {
44
- icon: small_menu
43
+ icon: IconSmallMenu
45
44
  })
46
45
  }),
47
46
  /*#__PURE__*/ jsxs("button", {
@@ -54,7 +53,7 @@ function NavHamburger() {
54
53
  onMouseLeave: handleMouseLeave,
55
54
  children: [
56
55
  /*#__PURE__*/ jsx(SvgWrapper, {
57
- icon: small_menu
56
+ icon: IconSmallMenu
58
57
  }),
59
58
  hoverGroup
60
59
  ]
@@ -1,12 +1,11 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { matchNavbar, useLocation } from "@rspress/core/runtime";
3
- import { Link, SvgWrapper, Tag } from "@theme";
4
- import arrow_down from "@theme-assets/arrow-down";
3
+ import { IconArrowDown, Link, SvgWrapper, Tag } from "@theme";
5
4
  import clsx from "clsx";
6
5
  import { useMemo, useState } from "react";
7
6
  import "./NavScreenMenuItem.css";
8
7
  const SvgDown = (props)=>/*#__PURE__*/ jsx(SvgWrapper, {
9
- icon: arrow_down,
8
+ icon: IconArrowDown,
10
9
  ...props
11
10
  });
12
11
  function NavScreenMenuItemRaw({ left, right, isOpen, isActive, onClick, href }) {
@@ -1,7 +1,6 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import { Link, SvgWrapper, renderInlineMarkdown } from "@theme";
2
+ import { FallbackHeading, Link, SvgWrapper, renderInlineMarkdown } from "@theme";
3
3
  import "./OverviewGroup.css";
4
- import { FallbackHeading } from "../DocContent/FallbackHeading.js";
5
4
  import icons_plugin from "./icons/plugin.js";
6
5
  const OverviewGroup = ({ group })=>/*#__PURE__*/ jsxs(Fragment, {
7
6
  children: [
@@ -1,8 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { isEqualPath, useI18n, usePageData, useSidebar } from "@rspress/core/runtime";
3
- import { OverviewGroup } from "@theme";
3
+ import { FallbackHeading, OverviewGroup } from "@theme";
4
4
  import { useEffect, useMemo, useRef, useState } from "react";
5
- import { FallbackHeading } from "../DocContent/FallbackHeading.js";
6
5
  import { isSidebarDivider, isSidebarSectionHeader, isSidebarSingleFile } from "../Sidebar/utils.js";
7
6
  import "./index.css";
8
7
  import { findItemByRoutePath } from "./utils.js";
@@ -28,4 +28,4 @@ export type PackageManagerTabProps = ({
28
28
  icon?: ReactNode;
29
29
  }[];
30
30
  };
31
- export declare function PackageManagerTabs({ command, exec, dlx, additionalTabs, }: PackageManagerTabProps): import("react/jsx-runtime").JSX.Element;
31
+ export declare function PackageManagerTabs({ command, exec, dlx, additionalTabs, }: PackageManagerTabProps): string | import("react/jsx-runtime").JSX.Element;
@@ -104,6 +104,10 @@ function PackageManagerTabs({ command, exec, dlx, additionalTabs = [] }) {
104
104
  commandInfo.bun = normalizeCommand(commandInfo.bun);
105
105
  commandInfo.deno = normalizeCommand(commandInfo.deno);
106
106
  } else commandInfo = command;
107
+ if (process.env.__SSR_MD__) return Object.values(commandInfo).reduce((previous, current)=>{
108
+ const [packageManager, command] = splitTo2Parts(current);
109
+ return previous + `\n\`\`\`sh [${packageManager}]\n` + `${packageManager}${command}\n` + "```\n";
110
+ }, '');
107
111
  return /*#__PURE__*/ jsx(Tabs, {
108
112
  groupId: "package.manager",
109
113
  values: Object.entries(commandInfo).map(([key])=>/*#__PURE__*/ jsxs("div", {
@@ -1,7 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useI18n } from "@rspress/core/runtime";
3
- import { Link, SvgWrapper, renderInlineMarkdown, usePrevNextPage } from "@theme";
4
- import arrow_right from "@theme-assets/arrow-right";
3
+ import { IconArrowRight, Link, SvgWrapper, renderInlineMarkdown, usePrevNextPage } from "@theme";
5
4
  import clsx from "clsx";
6
5
  import "./index.css";
7
6
  function PrevNextPage() {
@@ -22,7 +21,7 @@ function PrevNextPage() {
22
21
  className: "rp-prev-next-page__item__title",
23
22
  children: [
24
23
  /*#__PURE__*/ jsx(SvgWrapper, {
25
- icon: arrow_right,
24
+ icon: IconArrowRight,
26
25
  className: "rp-prev-next-page__icon rp-prev-next-page__rotate_180"
27
26
  }),
28
27
  /*#__PURE__*/ jsx("span", {
@@ -49,7 +48,7 @@ function PrevNextPage() {
49
48
  ...renderInlineMarkdown(nextPage.text)
50
49
  }),
51
50
  /*#__PURE__*/ jsx(SvgWrapper, {
52
- icon: arrow_right,
51
+ icon: IconArrowRight,
53
52
  className: "rp-prev-next-page__icon"
54
53
  })
55
54
  ]
@@ -0,0 +1,54 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface RootProps {
3
+ /**
4
+ * The children elements to render inside the Root component.
5
+ */
6
+ children: ReactNode;
7
+ }
8
+ /**
9
+ * A wrapper component for the entire application.
10
+ *
11
+ * The Root component wraps all content in the application, including the Layout
12
+ * and global UI components. By default, it simply renders its children without
13
+ * any additional markup or styling.
14
+ *
15
+ * You can eject and customize this component to add global wrappers, providers,
16
+ * or any other elements that should wrap your entire application.
17
+ *
18
+ * @param {RootProps} props - The properties for the Root component.
19
+ * @returns {JSX.Element} The children elements wrapped by the Root component.
20
+ *
21
+ * @example
22
+ * Default usage (no customization needed):
23
+ * ```tsx
24
+ * import { Root } from '@theme';
25
+ *
26
+ * function App() {
27
+ * return (
28
+ * <Root>
29
+ * <YourContent />
30
+ * </Root>
31
+ * );
32
+ * }
33
+ * ```
34
+ *
35
+ * @example
36
+ * Ejected and customized:
37
+ * ```tsx
38
+ * // In your ejected theme/components/Root/index.tsx
39
+ * import type { ReactNode } from 'react';
40
+ *
41
+ * export interface RootProps {
42
+ * children: ReactNode;
43
+ * }
44
+ *
45
+ * export function Root({ children }: RootProps) {
46
+ * return (
47
+ * <div className="my-custom-root">
48
+ * {children}
49
+ * </div>
50
+ * );
51
+ * }
52
+ * ```
53
+ */
54
+ export declare function Root({ children }: RootProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { Fragment, jsx } from "react/jsx-runtime";
2
+ function Root({ children }) {
3
+ return /*#__PURE__*/ jsx(Fragment, {
4
+ children: children
5
+ });
6
+ }
7
+ export { Root };
@@ -1,7 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useI18n } from "@rspress/core/runtime";
3
- import { SvgWrapper } from "@theme";
4
- import empty from "@theme-assets/empty";
3
+ import { IconEmpty, SvgWrapper } from "@theme";
5
4
  import "./NoSearchResult.css";
6
5
  function NoSearchResult({ query }) {
7
6
  const t = useI18n();
@@ -9,7 +8,7 @@ function NoSearchResult({ query }) {
9
8
  className: "rp-no-search-result",
10
9
  children: [
11
10
  /*#__PURE__*/ jsx(SvgWrapper, {
12
- icon: empty,
11
+ icon: IconEmpty,
13
12
  className: "rp-no-search-result__icon"
14
13
  }),
15
14
  /*#__PURE__*/ jsxs("p", {
@@ -1,7 +1,6 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useI18n } from "@rspress/core/runtime";
3
- import { SvgWrapper } from "@theme";
4
- import search from "@theme-assets/search";
3
+ import { IconSearch, SvgWrapper } from "@theme";
5
4
  import { useEffect, useState } from "react";
6
5
  import "./SearchButton.css";
7
6
  function SearchButton({ setFocused }) {
@@ -20,7 +19,7 @@ function SearchButton({ setFocused }) {
20
19
  className: "rp-search-button__content",
21
20
  children: [
22
21
  /*#__PURE__*/ jsx(SvgWrapper, {
23
- icon: search,
22
+ icon: IconSearch,
24
23
  className: "rp-search-button__icon"
25
24
  }),
26
25
  /*#__PURE__*/ jsx("span", {
@@ -49,7 +48,7 @@ function SearchButton({ setFocused }) {
49
48
  className: "rp-search-button--mobile",
50
49
  onClick: ()=>setFocused(true),
51
50
  children: /*#__PURE__*/ jsx(SvgWrapper, {
52
- icon: search
51
+ icon: IconSearch
53
52
  })
54
53
  })
55
54
  ]
@@ -1,9 +1,6 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useI18n, usePageData } from "@rspress/core/runtime";
3
- import { SvgWrapper, Tab, Tabs, useLinkNavigate } from "@theme";
4
- import _theme_assets_close from "@theme-assets/close";
5
- import loading from "@theme-assets/loading";
6
- import _theme_assets_search from "@theme-assets/search";
3
+ import { IconClose, IconLoading, IconSearch, SvgWrapper, Tab, Tabs, useLinkNavigate } from "@theme";
7
4
  import { debounce } from "lodash-es";
8
5
  import { useCallback, useEffect, useRef, useState } from "react";
9
6
  import { createPortal } from "react-dom";
@@ -12,7 +9,7 @@ import { RenderType } from "./logic/types.js";
12
9
  import { NoSearchResult } from "./NoSearchResult.js";
13
10
  import "./SearchPanel.css";
14
11
  import { SuggestItem } from "./SuggestItem.js";
15
- import * as __WEBPACK_EXTERNAL_MODULE_virtual_search_hooks_9d01d01f__ from "virtual-search-hooks";
12
+ import * as __rspack_external_virtual_search_hooks_9d01d01f from "virtual-search-hooks";
16
13
  const KEY_CODE = {
17
14
  ARROW_UP: 'ArrowUp',
18
15
  ARROW_DOWN: 'ArrowDown',
@@ -197,24 +194,24 @@ function SearchPanel({ focused, setFocused }) {
197
194
  setQuery(newQuery);
198
195
  if (newQuery) {
199
196
  const searchResult = [];
200
- if ("beforeSearch" in __WEBPACK_EXTERNAL_MODULE_virtual_search_hooks_9d01d01f__) {
197
+ if ("beforeSearch" in __rspack_external_virtual_search_hooks_9d01d01f) {
201
198
  const key = 'beforeSearch';
202
- const transformedQuery = await __WEBPACK_EXTERNAL_MODULE_virtual_search_hooks_9d01d01f__[key](newQuery);
199
+ const transformedQuery = await __rspack_external_virtual_search_hooks_9d01d01f[key](newQuery);
203
200
  if (transformedQuery) newQuery = transformedQuery;
204
201
  }
205
202
  const defaultSearchResult = await pageSearcherRef.current?.match(newQuery);
206
203
  if (defaultSearchResult) searchResult.push(...defaultSearchResult);
207
- if ("onSearch" in __WEBPACK_EXTERNAL_MODULE_virtual_search_hooks_9d01d01f__) {
204
+ if ("onSearch" in __rspack_external_virtual_search_hooks_9d01d01f) {
208
205
  const key = 'onSearch';
209
- const customSearchResult = await __WEBPACK_EXTERNAL_MODULE_virtual_search_hooks_9d01d01f__[key](newQuery, searchResult);
206
+ const customSearchResult = await __rspack_external_virtual_search_hooks_9d01d01f[key](newQuery, searchResult);
210
207
  if (customSearchResult) searchResult.push(...customSearchResult.map((item)=>({
211
208
  renderType: RenderType.Custom,
212
209
  ...item
213
210
  })));
214
211
  }
215
- if ("afterSearch" in __WEBPACK_EXTERNAL_MODULE_virtual_search_hooks_9d01d01f__) {
212
+ if ("afterSearch" in __rspack_external_virtual_search_hooks_9d01d01f) {
216
213
  const key = 'afterSearch';
217
- await __WEBPACK_EXTERNAL_MODULE_virtual_search_hooks_9d01d01f__[key](newQuery, searchResult);
214
+ await __rspack_external_virtual_search_hooks_9d01d01f[key](newQuery, searchResult);
218
215
  }
219
216
  const currQuery = searchInputRef.current?.value;
220
217
  if (currQuery === newQuery) {
@@ -255,7 +252,7 @@ function SearchPanel({ focused, setFocused }) {
255
252
  children: result.map((item)=>/*#__PURE__*/ jsxs(Tab, {
256
253
  children: [
257
254
  item.renderType === RenderType.Default && renderSearchResultItem(item.result, query, isSearching),
258
- item.renderType === RenderType.Custom && __WEBPACK_EXTERNAL_MODULE_virtual_search_hooks_9d01d01f__[renderKey](item.result)
255
+ item.renderType === RenderType.Custom && __rspack_external_virtual_search_hooks_9d01d01f[renderKey](item.result)
259
256
  ]
260
257
  }, item.group))
261
258
  });
@@ -264,7 +261,7 @@ function SearchPanel({ focused, setFocused }) {
264
261
  if (isSearching) return /*#__PURE__*/ jsx("div", {
265
262
  className: "rp-search-panel__loading",
266
263
  children: /*#__PURE__*/ jsx(SvgWrapper, {
267
- icon: loading
264
+ icon: IconLoading
268
265
  })
269
266
  });
270
267
  if (0 === suggestionList.length && 'inited' === initStatus) return /*#__PURE__*/ jsx(NoSearchResult, {
@@ -328,7 +325,7 @@ function SearchPanel({ focused, setFocused }) {
328
325
  children: [
329
326
  /*#__PURE__*/ jsx("label", {
330
327
  children: /*#__PURE__*/ jsx(SvgWrapper, {
331
- icon: _theme_assets_search
328
+ icon: IconSearch
332
329
  })
333
330
  }),
334
331
  /*#__PURE__*/ jsx("input", {
@@ -342,7 +339,7 @@ function SearchPanel({ focused, setFocused }) {
342
339
  }),
343
340
  /*#__PURE__*/ jsx("label", {
344
341
  children: /*#__PURE__*/ jsx(SvgWrapper, {
345
- icon: _theme_assets_close,
342
+ icon: IconClose,
346
343
  className: "rp-search-panel__close",
347
344
  onClick: (e)=>{
348
345
  if (searchInputRef.current) {
@@ -1,5 +1,5 @@
1
1
  import './SuggestItem.scss';
2
- import type { DefaultMatchResultItem } from './logic/types';
2
+ import type { DefaultMatchResultItem } from './logic/types.js';
3
3
  export declare function SuggestItem({ suggestion, closeSearch, isCurrent, setCurrentSuggestionIndex, scrollTo, onMouseMove, }: {
4
4
  suggestion: DefaultMatchResultItem;
5
5
  closeSearch: () => void;