@rspress/core 2.0.5 → 2.0.6

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 (143) 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 → 675.js} +20 -5
  7. package/dist/{node/mdx/loader.15134034.js → 7397.js} +9 -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/HomeHero/index.tsx +1 -1
  14. package/dist/eject-theme/components/HoverGroup/index.tsx +1 -1
  15. package/dist/eject-theme/components/Llms/LlmsCopyButton.tsx +2 -1
  16. package/dist/eject-theme/components/Llms/LlmsCopyRow.tsx +2 -1
  17. package/dist/eject-theme/components/Llms/LlmsViewOptions.tsx +2 -1
  18. package/dist/eject-theme/components/Llms/copy.ts +12 -0
  19. package/dist/eject-theme/components/Search/SearchPanel.tsx +2 -0
  20. package/dist/eject-theme/components/Sidebar/SidebarItem.scss +0 -4
  21. package/dist/eject-theme/components/Tabs/index.scss +13 -15
  22. package/dist/index.js +1 -3
  23. package/dist/node/PluginDriver.js +3 -8
  24. package/dist/node/auto-nav-sidebar/index.js +1 -2
  25. package/dist/node/auto-nav-sidebar/locales.js +1 -1
  26. package/dist/node/auto-nav-sidebar/normalize.js +3 -2
  27. package/dist/node/auto-nav-sidebar/utils.js +1 -2
  28. package/dist/node/auto-nav-sidebar/walk.js +1 -2
  29. package/dist/node/constants.js +1 -2
  30. package/dist/node/eject.js +1 -1
  31. package/dist/node/initRsbuild.js +2 -4
  32. package/dist/node/last-updated/index.js +1 -1
  33. package/dist/node/logger/hint.js +4 -1
  34. package/dist/node/mdx/options.js +1 -3
  35. package/dist/node/mdx/processor.js +1 -2
  36. package/dist/node/mdx/rehypePlugins/codeMeta.js +1 -1
  37. package/dist/node/mdx/rehypePlugins/headerAnchor.js +1 -2
  38. package/dist/node/mdx/rehypePlugins/shiki.d.ts +1 -1
  39. package/dist/node/mdx/rehypePlugins/shiki.js +1 -1
  40. package/dist/node/mdx/rehypePlugins/transformers/meta-highlight.js +1 -1
  41. package/dist/node/mdx/remarkPlugins/builtin.js +1 -1
  42. package/dist/node/mdx/remarkPlugins/fileCodeBlock.js +1 -2
  43. package/dist/node/mdx/remarkPlugins/image.js +1 -1
  44. package/dist/node/mdx/remarkPlugins/link.js +1 -2
  45. package/dist/node/mdx/remarkPlugins/toc.js +1 -1
  46. package/dist/node/medium-zoom/index.js +1 -1
  47. package/dist/node/route/RoutePage.js +1 -1
  48. package/dist/node/route/RouteService.js +1 -3
  49. package/dist/node/route/extractPageData.js +1 -3
  50. package/dist/node/route/normalizeRoutePath.js +1 -2
  51. package/dist/node/runtimeModule/i18n.js +1 -2
  52. package/dist/node/runtimeModule/pageData/createPageData.js +1 -2
  53. package/dist/node/runtimeModule/pageData/rsbuildPlugin.js +1 -2
  54. package/dist/node/runtimeModule/searchHooks.js +1 -1
  55. package/dist/node/runtimeModule/siteData/createSiteData.js +1 -1
  56. package/dist/node/runtimeModule/siteData/normalizeThemeConfig.js +1 -1
  57. package/dist/node/runtimeModule/siteData/rsbuildPlugin.js +1 -1
  58. package/dist/node/serve.js +1 -1
  59. package/dist/node/ssg/renderPage.js +1 -2
  60. package/dist/node/ssg/renderPageWorker.js +2 -2
  61. package/dist/node/ssg/renderPages.js +3 -4
  62. package/dist/node/ssg/rsbuildPluginSSG.js +1 -2
  63. package/dist/node/ssg/ssgEnv.d.ts +1 -1
  64. package/dist/node/ssg/ssgEnv.js +2 -2
  65. package/dist/node/ssg-md/llms/emitLlmsTxt.js +5 -7
  66. package/dist/node/ssg-md/llms/llmsTxt.js +1 -2
  67. package/dist/node/ssg-md/remarkSplitMdx.js +1 -2
  68. package/dist/node/ssg-md/renderPage.js +1 -2
  69. package/dist/node/ssg-md/renderPages.js +2 -2
  70. package/dist/node/ssg-md/rsbuildPluginSSGMD.js +1 -2
  71. package/dist/node/utils/checkLanguageParity.js +1 -1
  72. package/dist/node/utils/createHash.js +1 -1
  73. package/dist/node/utils/error.js +1 -1
  74. package/dist/node/utils/flattenMdxContent.js +1 -3
  75. package/dist/node/utils/fs.js +1 -1
  76. package/dist/node/utils/getPageKey.js +1 -1
  77. package/dist/node/utils/normalizePath.js +1 -2
  78. package/dist/node/utils/reactAlias.js +15 -10
  79. package/dist/runtime/index.js +20 -21
  80. package/dist/runtime/ssrMdServerEntry.js +2 -2
  81. package/dist/runtime/ssrServerEntry.js +2 -2
  82. package/dist/runtime/utils.d.ts +1 -1
  83. package/dist/runtime/utils.js +1 -1
  84. package/dist/theme/assets/arrow-down.js +1 -1
  85. package/dist/theme/assets/arrow-right.js +1 -1
  86. package/dist/theme/assets/close.js +1 -1
  87. package/dist/theme/assets/copy.js +1 -1
  88. package/dist/theme/assets/deprecated.js +1 -1
  89. package/dist/theme/assets/down.js +1 -1
  90. package/dist/theme/assets/edit.js +1 -1
  91. package/dist/theme/assets/empty.js +1 -1
  92. package/dist/theme/assets/experimental.js +1 -1
  93. package/dist/theme/assets/external-link.js +1 -1
  94. package/dist/theme/assets/file.js +1 -1
  95. package/dist/theme/assets/github.js +1 -1
  96. package/dist/theme/assets/gitlab.js +1 -1
  97. package/dist/theme/assets/header.js +1 -1
  98. package/dist/theme/assets/jump.js +1 -1
  99. package/dist/theme/assets/link.js +1 -1
  100. package/dist/theme/assets/loading.js +1 -1
  101. package/dist/theme/assets/menu.js +1 -1
  102. package/dist/theme/assets/moon.js +1 -1
  103. package/dist/theme/assets/scroll-to-top.js +1 -1
  104. package/dist/theme/assets/search.js +1 -1
  105. package/dist/theme/assets/small-menu.js +1 -1
  106. package/dist/theme/assets/success.js +1 -1
  107. package/dist/theme/assets/sun.js +1 -1
  108. package/dist/theme/assets/title.js +1 -1
  109. package/dist/theme/assets/wrap.js +1 -1
  110. package/dist/theme/assets/wrapped.js +1 -1
  111. package/dist/theme/components/Callout/index.js +2 -1
  112. package/dist/theme/components/HomeBackground/index.css +1 -0
  113. package/dist/theme/components/HomeFeature/index.css +3 -3
  114. package/dist/theme/components/HomeHero/index.d.ts +1 -1
  115. package/dist/theme/components/HoverGroup/index.d.ts +1 -1
  116. package/dist/theme/components/Llms/LlmsCopyButton.js +3 -2
  117. package/dist/theme/components/Llms/LlmsCopyRow.js +2 -1
  118. package/dist/theme/components/Llms/LlmsViewOptions.js +3 -2
  119. package/dist/theme/components/Llms/copy.d.ts +1 -0
  120. package/dist/theme/components/Llms/copy.js +9 -0
  121. package/dist/theme/components/Llms/index.css +1 -0
  122. package/dist/theme/components/Llms/index.js +4 -5
  123. package/dist/theme/components/Nav/index.css +1 -1
  124. package/dist/theme/components/NavScreen/index.css +1 -1
  125. package/dist/theme/components/OverviewGroup/icons/plugin.js +1 -1
  126. package/dist/theme/components/OverviewGroup/index.css +1 -0
  127. package/dist/theme/components/Search/SearchPanel.js +2 -1
  128. package/dist/theme/components/Search/logic/providers/LocalProvider.js +1 -1
  129. package/dist/theme/components/Sidebar/SidebarItem.css +0 -4
  130. package/dist/theme/components/Tabs/index.css +14 -8
  131. package/dist/theme/components/Toc/TocItem.css +1 -1
  132. package/dist/theme/index.js +66 -67
  133. package/dist/theme/layout/DocLayout/index.css +11 -11
  134. package/dist/theme/layout/Layout/index.js +14 -4
  135. package/dist/theme/styles/base.css +6 -3
  136. package/dist/theme/styles/preflight.css +2 -0
  137. package/dist/theme/styles/vars/home-vars.css +28 -4
  138. package/package.json +7 -7
  139. package/dist/6289.29817fb4.js +0 -4
  140. package/dist/9348.1beb3e25.js +0 -11
  141. package/dist/cli/index.44f3184c.js +0 -2
  142. /package/dist/{node/ssg/renderPageWorker.165b5d46.js → 9224.js} +0 -0
  143. /package/dist/{rslib-runtime.99091bf6.js → rslib-runtime.js} +0 -0
@@ -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 "../../../675.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 "../../../675.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 "../../675.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 "../../../675.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 "../../../675.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 "../../../675.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 "../675.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 "../../675.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 "../../675.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 "../../675.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 "../../../675.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 "../../../675.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 "../../675.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 "../../675.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 "../../675.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 "../../675.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 "../../675.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 "../../675.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 "../../675.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 "../../675.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');
@@ -1,22 +1,21 @@
1
- import { isDataUrl, isExternalUrl, matchNavbar, matchSidebar, normalizeHref } from "@rspress/shared";
2
- import { Head } from "@unhead/react";
3
- import { Content } from "./Content.js";
4
- import { useActiveMatcher } from "./hooks/useActiveMatcher.js";
5
- import { ThemeContext, useDark } from "./hooks/useDark.js";
6
- import { useFrontmatter } from "./hooks/useFrontmatter.js";
7
- import { useI18n } from "./hooks/useI18n.js";
8
- import { useLang } from "./hooks/useLang.js";
9
- import { useLocaleSiteData } from "./hooks/useLocaleSiteData.js";
10
- import { useNav } from "./hooks/useNav.js";
11
- import { PageContext, usePage } from "./hooks/usePage.js";
12
- import { usePageData } from "./hooks/usePageData.js";
13
- import { usePages } from "./hooks/usePages.js";
14
- import { getSidebarDataGroup, useSidebar, useSidebarDynamic } from "./hooks/useSidebar.js";
15
- import { useSite } from "./hooks/useSite.js";
16
- import { useVersion } from "./hooks/useVersion.js";
17
- import { useWindowSize } from "./hooks/useWindowSize.js";
18
- import { NoSSR } from "./NoSSR.js";
19
- import { isActive, pathnameToRouteService, preloadLink } from "./route.js";
20
- import { addLeadingSlash, addTrailingSlash, cleanUrlByConfig, isEqualPath, isProduction, normalizeHrefInRuntime, normalizeImagePath, removeBase, removeTrailingSlash, routePathToMdPath, withBase } from "./utils.js";
21
1
  export * from "react-router-dom";
22
- export { Content, Head, NoSSR, PageContext, ThemeContext, addLeadingSlash, addTrailingSlash, cleanUrlByConfig, getSidebarDataGroup, isActive, isDataUrl, isEqualPath, isExternalUrl, isProduction, matchNavbar, matchSidebar, normalizeHref, normalizeHrefInRuntime, normalizeImagePath, pathnameToRouteService, preloadLink, removeBase, removeTrailingSlash, routePathToMdPath, useActiveMatcher, useDark, useFrontmatter, useI18n, useLang, useLocaleSiteData, useNav, usePage, usePageData, usePages, useSidebar, useSidebarDynamic, useSite, useVersion, useWindowSize, withBase };
2
+ export { isDataUrl, isExternalUrl, matchNavbar, matchSidebar, normalizeHref } from "@rspress/shared";
3
+ export { Head } from "@unhead/react";
4
+ export { Content } from "./Content.js";
5
+ export { useActiveMatcher } from "./hooks/useActiveMatcher.js";
6
+ export { ThemeContext, useDark } from "./hooks/useDark.js";
7
+ export { useFrontmatter } from "./hooks/useFrontmatter.js";
8
+ export { useI18n } from "./hooks/useI18n.js";
9
+ export { useLang } from "./hooks/useLang.js";
10
+ export { useLocaleSiteData } from "./hooks/useLocaleSiteData.js";
11
+ export { useNav } from "./hooks/useNav.js";
12
+ export { PageContext, usePage } from "./hooks/usePage.js";
13
+ export { usePageData } from "./hooks/usePageData.js";
14
+ export { usePages } from "./hooks/usePages.js";
15
+ export { getSidebarDataGroup, useSidebar, useSidebarDynamic } from "./hooks/useSidebar.js";
16
+ export { useSite } from "./hooks/useSite.js";
17
+ export { useVersion } from "./hooks/useVersion.js";
18
+ export { useWindowSize } from "./hooks/useWindowSize.js";
19
+ export { NoSSR } from "./NoSSR.js";
20
+ export { isActive, pathnameToRouteService, preloadLink } from "./route.js";
21
+ export { addLeadingSlash, addTrailingSlash, cleanUrlByConfig, isEqualPath, isProduction, normalizeHrefInRuntime, normalizeImagePath, removeBase, removeTrailingSlash, routePathToMdPath, withBase } from "./utils.js";
@@ -5,7 +5,6 @@ import { renderToMarkdownString } from "react-render-to-markdown";
5
5
  import { StaticRouter } from "react-router-dom";
6
6
  import { App } from "./App.js";
7
7
  import { initPageData } from "./initPageData.js";
8
- import { routes } from "virtual-routes";
9
8
  const DEFAULT_THEME = 'light';
10
9
  async function preloadRoute(pathname) {
11
10
  const route = pathnameToRouteService(pathname);
@@ -36,4 +35,5 @@ async function render(routePath, head) {
36
35
  appMd
37
36
  };
38
37
  }
39
- export { render, routes };
38
+ export { routes } from "virtual-routes";
39
+ export { render };
@@ -7,7 +7,6 @@ import { renderToPipeableStream } from "react-dom/server";
7
7
  import { StaticRouter } from "react-router-dom";
8
8
  import { App } from "./App.js";
9
9
  import { initPageData } from "./initPageData.js";
10
- import { routes } from "virtual-routes";
11
10
  const DEFAULT_THEME = 'light';
12
11
  async function preloadRoute(pathname) {
13
12
  const route = pathnameToRouteService(pathname);
@@ -53,4 +52,5 @@ async function render(routePath, head) {
53
52
  appHtml
54
53
  };
55
54
  }
56
- export { render, routes };
55
+ export { routes } from "virtual-routes";
56
+ export { render };
@@ -9,4 +9,4 @@ declare function normalizeHrefInRuntime(link: string): string;
9
9
  declare function cleanUrlByConfig(link: string): string;
10
10
  declare function normalizeImagePath(imagePath: string): string;
11
11
  declare function routePathToMdPath(routePath: string): string;
12
- export { addLeadingSlash, addTrailingSlash, removeTrailingSlash, isProduction, normalizeImagePath, cleanUrlByConfig, removeBase, withBase, isEqualPath, normalizeHrefInRuntime, routePathToMdPath, };
12
+ export { addLeadingSlash, addTrailingSlash, cleanUrlByConfig, isEqualPath, isProduction, normalizeHrefInRuntime, normalizeImagePath, removeBase, removeTrailingSlash, routePathToMdPath, withBase, };
@@ -31,4 +31,4 @@ function routePathToMdPath(routePath) {
31
31
  function isAbsoluteUrl(path) {
32
32
  return isExternalUrl(path) || isDataUrl(path) || path.startsWith('//');
33
33
  }
34
- export { addLeadingSlash, addTrailingSlash, cleanUrlByConfig, isEqualPath, isProduction, normalizeHrefInRuntime, normalizeImagePath, utils_removeBase as removeBase, removeTrailingSlash, routePathToMdPath, utils_withBase as withBase };
34
+ export { addLeadingSlash, addTrailingSlash, cleanUrlByConfig, isEqualPath, isProduction, normalizeHrefInRuntime, normalizeImagePath, removeTrailingSlash, routePathToMdPath, utils_removeBase as removeBase, utils_withBase as withBase };
@@ -11,4 +11,4 @@ const SvgArrowDown = (props)=>/*#__PURE__*/ jsx("svg", {
11
11
  })
12
12
  });
13
13
  var arrow_down = SvgArrowDown;
14
- export { arrow_down as default };
14
+ export default arrow_down;
@@ -11,4 +11,4 @@ const SvgArrowRight = (props)=>/*#__PURE__*/ jsx("svg", {
11
11
  })
12
12
  });
13
13
  var arrow_right = SvgArrowRight;
14
- export { arrow_right as default };
14
+ export default arrow_right;
@@ -12,4 +12,4 @@ const SvgClose = (props)=>/*#__PURE__*/ jsx("svg", {
12
12
  })
13
13
  });
14
14
  var assets_close = SvgClose;
15
- export { assets_close as default };
15
+ export default assets_close;
@@ -18,4 +18,4 @@ const SvgCopy = (props)=>/*#__PURE__*/ jsxs("svg", {
18
18
  ]
19
19
  });
20
20
  var copy = SvgCopy;
21
- export { copy as default };
21
+ export default copy;
@@ -15,4 +15,4 @@ const SvgDeprecated = (props)=>/*#__PURE__*/ jsx("svg", {
15
15
  })
16
16
  });
17
17
  var deprecated = SvgDeprecated;
18
- export { deprecated as default };
18
+ export default deprecated;
@@ -11,4 +11,4 @@ const SvgDown = (props)=>/*#__PURE__*/ jsx("svg", {
11
11
  })
12
12
  });
13
13
  var down = SvgDown;
14
- export { down as default };
14
+ export default down;
@@ -15,4 +15,4 @@ const SvgEdit = (props)=>/*#__PURE__*/ jsx("svg", {
15
15
  })
16
16
  });
17
17
  var edit = SvgEdit;
18
- export { edit as default };
18
+ export default edit;
@@ -21,4 +21,4 @@ const SvgEmpty = (props)=>/*#__PURE__*/ jsxs("svg", {
21
21
  ]
22
22
  });
23
23
  var empty = SvgEmpty;
24
- export { empty as default };
24
+ export default empty;
@@ -18,4 +18,4 @@ const SvgExperimental = (props)=>/*#__PURE__*/ jsx("svg", {
18
18
  })
19
19
  });
20
20
  var experimental = SvgExperimental;
21
- export { experimental as default };
21
+ export default experimental;
@@ -13,4 +13,4 @@ const SvgExternalLink = (props)=>/*#__PURE__*/ jsx("svg", {
13
13
  })
14
14
  });
15
15
  var external_link = SvgExternalLink;
16
- export { external_link as default };
16
+ export default external_link;
@@ -28,4 +28,4 @@ const SvgFile = (props)=>/*#__PURE__*/ jsxs("svg", {
28
28
  ]
29
29
  });
30
30
  var file = SvgFile;
31
- export { file as default };
31
+ export default file;
@@ -10,4 +10,4 @@ const SvgGithub = (props)=>/*#__PURE__*/ jsx("svg", {
10
10
  })
11
11
  });
12
12
  var github = SvgGithub;
13
- export { github as default };
13
+ export default github;
@@ -10,4 +10,4 @@ const SvgGitlab = (props)=>/*#__PURE__*/ jsx("svg", {
10
10
  })
11
11
  });
12
12
  var gitlab = SvgGitlab;
13
- export { gitlab as default };
13
+ export default gitlab;
@@ -12,4 +12,4 @@ const SvgHeader = (props)=>/*#__PURE__*/ jsx("svg", {
12
12
  })
13
13
  });
14
14
  var header = SvgHeader;
15
- export { header as default };
15
+ export default header;
@@ -12,4 +12,4 @@ const SvgJump = (props)=>/*#__PURE__*/ jsx("svg", {
12
12
  })
13
13
  });
14
14
  var jump = SvgJump;
15
- export { jump as default };
15
+ export default jump;
@@ -23,4 +23,4 @@ const SvgLink = (props)=>/*#__PURE__*/ jsx("svg", {
23
23
  })
24
24
  });
25
25
  var assets_link = SvgLink;
26
- export { assets_link as default };
26
+ export default assets_link;
@@ -47,4 +47,4 @@ const SvgLoading = (props)=>/*#__PURE__*/ jsx("svg", {
47
47
  })
48
48
  });
49
49
  var loading = SvgLoading;
50
- export { loading as default };
50
+ export default loading;
@@ -11,4 +11,4 @@ const SvgMenu = (props)=>/*#__PURE__*/ jsx("svg", {
11
11
  })
12
12
  });
13
13
  var menu = SvgMenu;
14
- export { menu as default };
14
+ export default menu;
@@ -13,4 +13,4 @@ const SvgMoon = (props)=>/*#__PURE__*/ jsx("svg", {
13
13
  })
14
14
  });
15
15
  var moon = SvgMoon;
16
- export { moon as default };
16
+ export default moon;
@@ -33,4 +33,4 @@ const SvgScrollToTop = (props)=>/*#__PURE__*/ jsxs("svg", {
33
33
  ]
34
34
  });
35
35
  var scroll_to_top = SvgScrollToTop;
36
- export { scroll_to_top as default };
36
+ export default scroll_to_top;
@@ -13,4 +13,4 @@ const SvgSearch = (props)=>/*#__PURE__*/ jsx("svg", {
13
13
  })
14
14
  });
15
15
  var search = SvgSearch;
16
- export { search as default };
16
+ export default search;
@@ -16,4 +16,4 @@ const SvgSmallMenu = (props)=>/*#__PURE__*/ jsx("svg", {
16
16
  })
17
17
  });
18
18
  var small_menu = SvgSmallMenu;
19
- export { small_menu as default };
19
+ export default small_menu;
@@ -12,4 +12,4 @@ const SvgSuccess = (props)=>/*#__PURE__*/ jsx("svg", {
12
12
  })
13
13
  });
14
14
  var success = SvgSuccess;
15
- export { success as default };
15
+ export default success;
@@ -13,4 +13,4 @@ const SvgSun = (props)=>/*#__PURE__*/ jsx("svg", {
13
13
  })
14
14
  });
15
15
  var sun = SvgSun;
16
- export { sun as default };
16
+ export default sun;
@@ -12,4 +12,4 @@ const SvgTitle = (props)=>/*#__PURE__*/ jsx("svg", {
12
12
  })
13
13
  });
14
14
  var title = SvgTitle;
15
- export { title as default };
15
+ export default title;
@@ -12,4 +12,4 @@ const SvgWrap = (props)=>/*#__PURE__*/ jsx("svg", {
12
12
  })
13
13
  });
14
14
  var wrap = SvgWrap;
15
- export { wrap as default };
15
+ export default wrap;
@@ -12,4 +12,4 @@ const SvgWrapped = (props)=>/*#__PURE__*/ jsx("svg", {
12
12
  })
13
13
  });
14
14
  var wrapped = SvgWrapped;
15
- export { wrapped as default };
15
+ export default wrapped;
@@ -33,4 +33,5 @@ function Callout({ type, title, children }) {
33
33
  });
34
34
  }
35
35
  var components_Callout = Callout;
36
- export { Callout, components_Callout as default };
36
+ export default components_Callout;
37
+ export { Callout };
@@ -2,6 +2,7 @@
2
2
  z-index: -1;
3
3
  filter: blur(2px);
4
4
  pointer-events: none;
5
+ -webkit-user-select: none;
5
6
  user-select: none;
6
7
  background: var(--rp-home-background-bg);
7
8
  width: 100%;
@@ -26,17 +26,17 @@
26
26
  }
27
27
 
28
28
  .rp-home-feature__item--span-3, .rp-home-feature__item--span-6 {
29
- width: calc((100% - 2 * var(--rp-home-feature-gap)) / 3);
29
+ width: calc((100% - 2*var(--rp-home-feature-gap))/3);
30
30
  }
31
31
  }
32
32
 
33
33
  @media (width >= 960px) {
34
34
  .rp-home-feature__item--span-3 {
35
- width: calc((100% - 3 * var(--rp-home-feature-gap)) / 4);
35
+ width: calc((100% - 3*var(--rp-home-feature-gap))/4);
36
36
  }
37
37
 
38
38
  .rp-home-feature__item--span-4 {
39
- width: calc((100% - 2 * var(--rp-home-feature-gap)) / 3);
39
+ width: calc((100% - 2*var(--rp-home-feature-gap))/3);
40
40
  }
41
41
 
42
42
  .rp-home-feature__item--span-6 {
@@ -5,5 +5,5 @@ interface HomeHeroProps {
5
5
  image?: React.ReactNode;
6
6
  }
7
7
  declare function HomeHero({ beforeHeroActions, afterHeroActions, image, }: HomeHeroProps): import("react/jsx-runtime").JSX.Element;
8
- export { HomeHero };
9
8
  export type { HomeHeroProps };
9
+ export { HomeHero };