@rspress/core 2.0.0-rc.0 → 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.
- package/bin/rspress.js +1 -1
- package/dist/0~7675.989ee664.js +1791 -0
- package/dist/1218.3869bad6.js +2 -0
- package/dist/4669.12208c6a.js +2 -0
- package/dist/5313.6594aba0.js +63 -0
- package/dist/5485.2a0273cf.js +98 -0
- package/dist/6289.c67fe0d5.js +5 -0
- package/dist/7805.cadab34e.js +4 -0
- package/dist/8813.9da1f210.js +2 -0
- package/dist/cli/config/index.js +4 -0
- package/dist/cli/config/loadConfigFile.js +30 -0
- package/dist/cli/index.cb89dbd1.js +3 -0
- package/dist/cli/index.js +122 -0
- package/dist/eject-theme/components/Banner/index.tsx +3 -4
- package/dist/eject-theme/components/Button/index.scss +1 -6
- package/dist/eject-theme/components/Callout/index.scss +0 -2
- package/dist/eject-theme/components/CodeBlock/index.scss +4 -12
- package/dist/eject-theme/components/CodeBlock/index.tsx +6 -1
- package/dist/eject-theme/components/CodeButtonGroup/CopyCodeButton.tsx +1 -3
- package/dist/eject-theme/components/CodeButtonGroup/index.scss +5 -1
- package/dist/eject-theme/components/CodeButtonGroup/index.tsx +1 -3
- package/dist/eject-theme/components/DocContent/doc.scss +30 -9
- package/dist/eject-theme/components/DocContent/docComponents/table.tsx +10 -4
- package/dist/eject-theme/components/DocContent/index.tsx +5 -2
- package/dist/eject-theme/components/{DocContent/FallbackHeading.tsx → FallbackHeading/index.tsx} +20 -11
- package/dist/eject-theme/components/HoverGroup/index.scss +5 -1
- package/dist/eject-theme/components/HoverGroup/index.tsx +5 -1
- package/dist/eject-theme/components/Link/index.tsx +43 -9
- package/dist/eject-theme/components/Link/useLinkNavigate.ts +32 -16
- package/dist/eject-theme/components/Nav/NavMenu.scss +1 -0
- package/dist/eject-theme/components/Nav/NavMenu.tsx +2 -3
- package/dist/eject-theme/components/Nav/NavTitle.scss +11 -0
- package/dist/eject-theme/components/Nav/NavTitle.tsx +1 -0
- package/dist/eject-theme/components/Nav/index.scss +0 -8
- package/dist/eject-theme/components/NavHamburger/index.tsx +3 -4
- package/dist/eject-theme/components/NavScreen/NavScreenMenuItem.scss +14 -0
- package/dist/eject-theme/components/NavScreen/NavScreenMenuItem.tsx +2 -3
- package/dist/eject-theme/components/Outline/index.scss +0 -1
- package/dist/eject-theme/components/Overview/OverviewGroup.tsx +1 -2
- package/dist/eject-theme/components/Overview/index.tsx +6 -2
- package/dist/eject-theme/components/PackageManagerTabs/index.tsx +12 -0
- package/dist/eject-theme/components/PrevNextPage/index.tsx +6 -3
- package/dist/eject-theme/components/Root/index.tsx +58 -0
- package/dist/eject-theme/components/Search/NoSearchResult.tsx +2 -3
- package/dist/eject-theme/components/Search/SearchButton.tsx +3 -4
- package/dist/eject-theme/components/Search/SearchPanel.tsx +14 -9
- package/dist/eject-theme/components/Search/SuggestItem.tsx +15 -12
- package/dist/eject-theme/components/Sidebar/SidebarGroup.tsx +2 -3
- package/dist/eject-theme/components/Sidebar/SidebarItem.scss +12 -8
- package/dist/eject-theme/components/Sidebar/SidebarItem.tsx +6 -4
- package/dist/eject-theme/components/Sidebar/SidebarSectionHeader.scss +1 -1
- package/dist/eject-theme/components/SidebarMenu/index.tsx +4 -4
- package/dist/eject-theme/components/SocialLinks/index.tsx +2 -3
- package/dist/eject-theme/components/SourceCode/index.scss +2 -1
- package/dist/eject-theme/components/SourceCode/index.tsx +6 -4
- package/dist/eject-theme/components/SwitchAppearance/index.tsx +3 -5
- package/dist/eject-theme/components/Tabs/index.scss +19 -22
- package/dist/eject-theme/components/Toc/TocItem.scss +8 -4
- package/dist/eject-theme/components/Toc/TocItem.tsx +1 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.js +16 -3134
- package/dist/node/PluginDriver.d.ts +1 -1
- package/dist/node/PluginDriver.js +143 -0
- package/dist/node/auto-nav-sidebar/index.js +44 -0
- package/dist/node/auto-nav-sidebar/locales.js +26 -0
- package/dist/node/auto-nav-sidebar/normalize.js +228 -0
- package/dist/node/auto-nav-sidebar/utils.js +68 -0
- package/dist/node/auto-nav-sidebar/walk.js +67 -0
- package/dist/node/build.js +31 -0
- package/dist/node/constants.d.ts +1 -0
- package/dist/node/constants.js +33 -0
- package/dist/node/dev.js +32 -0
- package/dist/node/eject.js +111 -0
- package/dist/node/index.d.ts +5 -5
- package/dist/node/initRsbuild.d.ts +2 -2
- package/dist/node/initRsbuild.js +338 -0
- package/dist/node/last-updated/index.js +28 -0
- package/dist/node/logger/hint.d.ts +1 -1
- package/dist/node/logger/hint.js +85 -0
- package/dist/node/mdx/loader.d.ts +1 -1
- package/dist/node/mdx/loader.e1578c62.js +13 -0
- package/dist/{loader.js → node/mdx/loader.js} +2 -2
- package/dist/node/mdx/options.d.ts +2 -2
- package/dist/node/mdx/options.js +100 -0
- package/dist/node/mdx/processor.d.ts +2 -2
- package/dist/node/mdx/processor.js +71 -0
- package/dist/node/mdx/rehypePlugins/codeMeta.js +10 -0
- package/dist/node/mdx/rehypePlugins/headerAnchor.js +53 -0
- package/dist/node/mdx/rehypePlugins/shiki.js +34 -0
- package/dist/node/mdx/rehypePlugins/transformers/add-lang.js +15 -0
- package/dist/node/mdx/rehypePlugins/transformers/add-line-numbers.js +22 -0
- package/dist/node/mdx/rehypePlugins/transformers/add-title.js +24 -0
- package/dist/node/mdx/rehypePlugins/transformers/add-wrap-code.js +22 -0
- package/dist/node/mdx/rehypePlugins/transformers/index.d.ts +5 -5
- package/dist/node/mdx/rehypePlugins/transformers/index.js +5 -0
- package/dist/node/mdx/rehypePlugins/transformers/meta-highlight.js +41 -0
- package/dist/node/mdx/remarkPlugins/builtin.js +11 -0
- package/dist/node/mdx/remarkPlugins/containerSyntax.js +190 -0
- package/dist/node/mdx/remarkPlugins/fileCodeBlock.js +66 -0
- package/dist/node/mdx/remarkPlugins/image.js +67 -0
- package/dist/node/mdx/remarkPlugins/link.d.ts +1 -1
- package/dist/node/mdx/remarkPlugins/link.js +99 -0
- package/dist/node/mdx/remarkPlugins/toc.js +50 -0
- package/dist/node/mdx/types.d.ts +3 -3
- package/dist/node/medium-zoom/index.d.ts +1 -1
- package/dist/node/medium-zoom/index.js +14 -0
- package/dist/node/route/RoutePage.d.ts +1 -1
- package/dist/node/route/RoutePage.js +61 -0
- package/dist/node/route/RouteService.d.ts +1 -1
- package/dist/node/route/RouteService.js +177 -0
- package/dist/node/route/extractPageData.d.ts +1 -1
- package/dist/node/route/extractPageData.js +112 -0
- package/dist/node/route/normalizeRoutePath.js +54 -0
- package/dist/node/runtimeModule/DEFAULT_I18N_TEXT.d.ts +21 -0
- package/dist/node/runtimeModule/DEFAULT_I18N_TEXT.js +150 -0
- package/dist/node/runtimeModule/globalStyles.d.ts +1 -1
- package/dist/node/runtimeModule/globalStyles.js +12 -0
- package/dist/node/runtimeModule/globalUIComponents.d.ts +1 -1
- package/dist/node/runtimeModule/globalUIComponents.js +25 -0
- package/dist/node/runtimeModule/i18n.d.ts +2 -2
- package/dist/node/runtimeModule/i18n.js +83 -0
- package/dist/node/runtimeModule/pageData/createPageData.d.ts +1 -1
- package/dist/node/runtimeModule/pageData/createPageData.js +64 -0
- package/dist/node/runtimeModule/pageData/rsbuildPlugin.d.ts +1 -1
- package/dist/node/runtimeModule/pageData/rsbuildPlugin.js +51 -0
- package/dist/node/runtimeModule/routeList.d.ts +1 -1
- package/dist/node/runtimeModule/routeList.js +7 -0
- package/dist/node/runtimeModule/searchHooks.d.ts +1 -1
- package/dist/node/runtimeModule/searchHooks.js +11 -0
- package/dist/node/runtimeModule/siteData/createSiteData.js +34 -0
- package/dist/node/runtimeModule/siteData/normalizeThemeConfig.js +94 -0
- package/dist/node/runtimeModule/siteData/rsbuildPlugin.d.ts +1 -1
- package/dist/node/runtimeModule/siteData/rsbuildPlugin.js +24 -0
- package/dist/node/runtimeModule/socialLinks.d.ts +1 -1
- package/dist/node/runtimeModule/socialLinks.js +8 -0
- package/dist/node/runtimeModule/types.d.ts +2 -2
- package/dist/node/serve.js +23 -0
- package/dist/node/ssg/renderHtmlTemplate.js +33 -0
- package/dist/node/ssg/renderPage.js +34 -0
- package/dist/node/ssg/renderPageWorker.474f9f73.js +2 -0
- package/dist/node/ssg/renderPageWorker.js +15 -0
- package/dist/node/ssg/renderPages.d.ts +1 -1
- package/dist/node/ssg/renderPages.js +105 -0
- package/dist/node/ssg/renderPages.js.LICENSE.txt +4 -0
- package/dist/node/ssg/rsbuildPluginCSR.d.ts +1 -1
- package/dist/node/ssg/rsbuildPluginCSR.js +27 -0
- package/dist/node/ssg/rsbuildPluginSSG.d.ts +1 -1
- package/dist/node/ssg/rsbuildPluginSSG.js +72 -0
- package/dist/node/ssg/ssgEnv.js +33 -0
- package/dist/node/ssg/ssgEnv.js.LICENSE.txt +5 -0
- package/dist/node/ssg-md/llms/emitLlmsTxt.d.ts +1 -1
- package/dist/node/ssg-md/llms/emitLlmsTxt.js +80 -0
- package/dist/node/ssg-md/llms/llmsTxt.d.ts +1 -1
- package/dist/node/ssg-md/llms/llmsTxt.js +66 -0
- package/dist/node/ssg-md/react/index.d.ts +1 -1
- package/dist/node/ssg-md/remarkSplitMdx.js +202 -0
- package/dist/node/ssg-md/renderPage.js +31 -0
- package/dist/node/ssg-md/renderPages.d.ts +1 -1
- package/dist/node/ssg-md/renderPages.js +27 -0
- package/dist/node/ssg-md/rsbuildPluginSSGMD.d.ts +1 -1
- package/dist/node/ssg-md/rsbuildPluginSSGMD.js +47 -0
- package/dist/node/utils/applyReplaceRules.js +6 -0
- package/dist/node/utils/checkLanguageParity.js +77 -0
- package/dist/node/utils/createHash.js +5 -0
- package/dist/node/utils/error.d.ts +9 -0
- package/dist/node/utils/error.js +9 -0
- package/dist/node/utils/escapeHeadingIds.js +5 -0
- package/dist/node/utils/flattenMdxContent.js +74 -0
- package/dist/node/utils/fs.js +14 -0
- package/dist/node/utils/getImportAstNode.js +63 -0
- package/dist/node/utils/getPageKey.js +6 -0
- package/dist/node/utils/getSocialIcons.js +32 -0
- package/dist/node/utils/index.d.ts +10 -9
- package/dist/node/utils/normalizePath.js +10 -0
- package/dist/node/utils/reactAlias.d.ts +2 -0
- package/dist/node/utils/reactAlias.js +83 -0
- package/dist/rslib-runtime.99091bf6.js +18 -0
- package/dist/runtime/App.js +2 -2
- package/dist/runtime/ClientApp.d.ts +1 -1
- package/dist/runtime/ClientApp.js +0 -4
- package/dist/runtime/ssrMdServerEntry.js +1 -1
- package/dist/runtime/ssrServerEntry.js +2 -1
- package/dist/runtime.72d450ac.js +1 -0
- package/dist/runtime.js +3 -2
- package/dist/shiki-transformers.d.ts +1 -1
- package/dist/shiki-transformers.js +6 -120
- package/dist/theme/assets/moon.js +9 -26
- package/dist/theme/components/Banner/index.d.ts +1 -1
- package/dist/theme/components/Banner/index.js +2 -3
- package/dist/theme/components/Button/index.css +1 -1
- package/dist/theme/components/Callout/index.css +0 -2
- package/dist/theme/components/CodeBlock/index.css +4 -15
- package/dist/theme/components/CodeBlock/index.js +1 -0
- package/dist/theme/components/CodeButtonGroup/CopyCodeButton.js +3 -5
- package/dist/theme/components/CodeButtonGroup/index.css +5 -1
- package/dist/theme/components/CodeButtonGroup/index.js +3 -5
- package/dist/theme/components/DocContent/doc.css +30 -8
- package/dist/theme/components/DocContent/docComponents/index.d.ts +3 -3
- package/dist/theme/components/DocContent/docComponents/table.d.ts +2 -2
- package/dist/theme/components/DocContent/docComponents/table.js +8 -3
- package/dist/theme/components/DocContent/index.js +3 -2
- package/dist/theme/components/{DocContent/FallbackHeading.js → FallbackHeading/index.js} +19 -11
- package/dist/theme/components/HoverGroup/index.css +5 -1
- package/dist/theme/components/HoverGroup/index.js +1 -0
- package/dist/theme/components/HoverGroup/useHoverGroup.d.ts +1 -1
- package/dist/theme/components/Link/index.d.ts +18 -1
- package/dist/theme/components/Link/index.js +14 -8
- package/dist/theme/components/Link/useLinkNavigate.d.ts +4 -1
- package/dist/theme/components/Link/useLinkNavigate.js +23 -17
- package/dist/theme/components/Nav/NavMenu.css +1 -0
- package/dist/theme/components/Nav/NavMenu.js +2 -3
- package/dist/theme/components/Nav/NavTitle.css +12 -0
- package/dist/theme/components/Nav/NavTitle.d.ts +1 -0
- package/dist/theme/components/Nav/NavTitle.js +1 -0
- package/dist/theme/components/Nav/index.css +0 -8
- package/dist/theme/components/NavHamburger/index.js +3 -4
- package/dist/theme/components/NavScreen/NavScreenMenuItem.css +9 -0
- package/dist/theme/components/NavScreen/NavScreenMenuItem.js +2 -3
- package/dist/theme/components/Outline/index.css +0 -1
- package/dist/theme/components/Overview/OverviewGroup.js +1 -2
- package/dist/theme/components/Overview/index.js +1 -2
- package/dist/theme/components/PackageManagerTabs/index.d.ts +1 -1
- package/dist/theme/components/PackageManagerTabs/index.js +4 -0
- package/dist/theme/components/PrevNextPage/index.js +3 -4
- package/dist/theme/components/Root/index.d.ts +54 -0
- package/dist/theme/components/Root/index.js +7 -0
- package/dist/theme/components/Search/NoSearchResult.js +2 -3
- package/dist/theme/components/Search/SearchButton.js +3 -4
- package/dist/theme/components/Search/SearchPanel.js +13 -16
- package/dist/theme/components/Search/SuggestItem.d.ts +1 -1
- package/dist/theme/components/Search/SuggestItem.js +7 -11
- package/dist/theme/components/Search/logic/Provider.d.ts +1 -1
- package/dist/theme/components/Search/logic/providers/LocalProvider.d.ts +2 -2
- package/dist/theme/components/Search/logic/search.d.ts +1 -1
- package/dist/theme/components/Sidebar/SidebarGroup.js +2 -3
- package/dist/theme/components/Sidebar/SidebarItem.css +11 -3
- package/dist/theme/components/Sidebar/SidebarItem.js +6 -3
- package/dist/theme/components/Sidebar/SidebarSectionHeader.css +1 -1
- package/dist/theme/components/SidebarMenu/index.js +3 -5
- package/dist/theme/components/SocialLinks/index.js +2 -3
- package/dist/theme/components/SourceCode/index.css +5 -0
- package/dist/theme/components/SourceCode/index.js +2 -4
- package/dist/theme/components/SwitchAppearance/index.js +3 -5
- package/dist/theme/components/Tabs/index.css +13 -22
- package/dist/theme/components/Toc/TocItem.css +7 -4
- package/dist/theme/components/Toc/TocItem.js +1 -0
- package/dist/theme/icons.d.ts +25 -0
- package/dist/theme/icons.js +47 -0
- package/dist/theme/index.d.ts +62 -59
- package/dist/theme/index.js +5 -2
- package/dist/theme/layout/DocLayout/index.css +2 -2
- package/dist/theme/layout/DocLayout/index.js +1 -4
- package/dist/theme/layout/Layout/index.d.ts +1 -1
- package/dist/theme/layout/Layout/index.js +3 -3
- package/dist/theme/logic/useFullTextSearch.d.ts +1 -1
- package/dist/theme/logic/useScrollAfterNav.d.ts +5 -0
- package/dist/theme/logic/{sideEffects.js → useScrollAfterNav.js} +5 -6
- package/dist/theme/logic/useScrollReset.d.ts +5 -0
- package/dist/theme/logic/useScrollReset.js +12 -0
- package/dist/theme/logic/useSetup.js +2 -0
- package/dist/theme/styles/base.css +1 -10
- package/dist/theme/styles/index.d.ts +1 -1
- package/dist/theme/styles/index.js +1 -1
- package/dist/theme/styles/scrollbar.css +1 -0
- package/dist/theme/styles/vars/base-vars.css +5 -3
- package/dist/theme/styles/vars/home-vars.css +4 -2
- package/package.json +19 -20
- package/dist/3~101.js +0 -1786
- package/dist/3~335.js +0 -26
- package/dist/3~395.js +0 -74
- package/dist/cli.js +0 -259
- package/dist/index.js.LICENSE.txt +0 -10
- package/dist/node/auto-nav-sidebar/fixtures/docs/guide/c.d.ts +0 -2
- package/dist/node/auto-nav-sidebar/fixtures/docs-locales/en/guide/c.d.ts +0 -2
- package/dist/node/auto-nav-sidebar/fixtures/docs-locales/zh/guide/c.d.ts +0 -2
- package/dist/node/auto-nav-sidebar/locales.test.d.ts +0 -1
- package/dist/node/auto-nav-sidebar/walk.test.d.ts +0 -1
- package/dist/node/mdx/rehypePlugins/headerAnchor.test.d.ts +0 -1
- package/dist/node/mdx/remarkPlugins/containerSyntax.test.d.ts +0 -1
- package/dist/node/mdx/remarkPlugins/fileCodeBlock.test.d.ts +0 -1
- package/dist/node/mdx/remarkPlugins/image.test.d.ts +0 -1
- package/dist/node/mdx/remarkPlugins/link.test.d.ts +0 -1
- package/dist/node/route/RouteService.test.d.ts +0 -1
- package/dist/node/route/extractPageData.test.d.ts +0 -1
- package/dist/node/route/fixtures/basic/guide/c.d.ts +0 -2
- package/dist/node/route/normalizeRoutePath.test.d.ts +0 -1
- package/dist/node/runtimeModule/i18n.test.d.ts +0 -1
- package/dist/node/ssg-md/remarkSplitMdx.test.d.ts +0 -4
- package/dist/node/utils/checkLanguageParity.test.d.ts +0 -1
- package/dist/node/utils/detectCustomIcon.d.ts +0 -1
- package/dist/node/utils/detectReactVersion.d.ts +0 -3
- package/dist/processor.js +0 -4539
- package/dist/renderPageWorker.js +0 -196
- package/dist/theme/components/Search/logic/util.test.d.ts +0 -1
- /package/dist/cli/{config.d.ts → config/index.d.ts} +0 -0
- /package/dist/{shiki-transformers.js.LICENSE.txt → node/mdx/rehypePlugins/transformers/meta-highlight.js.LICENSE.txt} +0 -0
- /package/dist/theme/components/{DocContent/FallbackHeading.d.ts → FallbackHeading/index.d.ts} +0 -0
- /package/dist/theme/logic/{sideEffects.d.ts → useSetup.d.ts} +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type Icon = React.FC<React.SVGProps<SVGSVGElement>> | string;
|
|
2
|
+
declare const IconArrowDown: Icon;
|
|
3
|
+
declare const IconArrowRight: Icon;
|
|
4
|
+
declare const IconClose: Icon;
|
|
5
|
+
declare const IconCopy: Icon;
|
|
6
|
+
declare const IconDown: Icon;
|
|
7
|
+
declare const IconEmpty: Icon;
|
|
8
|
+
declare const IconFile: Icon;
|
|
9
|
+
declare const IconGithub: Icon;
|
|
10
|
+
declare const IconGitlab: Icon;
|
|
11
|
+
declare const IconHeader: Icon;
|
|
12
|
+
declare const IconJump: Icon;
|
|
13
|
+
declare const IconLoading: Icon;
|
|
14
|
+
declare const IconMenu: Icon;
|
|
15
|
+
declare const IconMoon: Icon;
|
|
16
|
+
declare const IconRight: Icon;
|
|
17
|
+
declare const IconSearch: Icon;
|
|
18
|
+
declare const IconSmallMenu: Icon;
|
|
19
|
+
declare const IconSuccess: Icon;
|
|
20
|
+
declare const IconSun: Icon;
|
|
21
|
+
declare const IconTitle: Icon;
|
|
22
|
+
declare const IconTranslator: Icon;
|
|
23
|
+
declare const IconWrap: Icon;
|
|
24
|
+
declare const IconWrapped: Icon;
|
|
25
|
+
export { IconArrowDown, IconArrowRight, IconClose, IconCopy, IconDown, IconEmpty, IconFile, IconGithub, IconGitlab, IconHeader, IconJump, IconLoading, IconMenu, IconMoon, IconRight, IconSearch, IconSmallMenu, IconSuccess, IconSun, IconTitle, IconTranslator, IconWrap, IconWrapped, };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import arrow_down from "./assets/arrow-down.js";
|
|
2
|
+
import arrow_right from "./assets/arrow-right.js";
|
|
3
|
+
import assets_close from "./assets/close.js";
|
|
4
|
+
import copy from "./assets/copy.js";
|
|
5
|
+
import down from "./assets/down.js";
|
|
6
|
+
import empty from "./assets/empty.js";
|
|
7
|
+
import file from "./assets/file.js";
|
|
8
|
+
import github from "./assets/github.js";
|
|
9
|
+
import gitlab from "./assets/gitlab.js";
|
|
10
|
+
import header from "./assets/header.js";
|
|
11
|
+
import jump from "./assets/jump.js";
|
|
12
|
+
import loading from "./assets/loading.js";
|
|
13
|
+
import menu from "./assets/menu.js";
|
|
14
|
+
import moon from "./assets/moon.js";
|
|
15
|
+
import right from "./assets/right.js";
|
|
16
|
+
import search from "./assets/search.js";
|
|
17
|
+
import small_menu from "./assets/small-menu.js";
|
|
18
|
+
import success from "./assets/success.js";
|
|
19
|
+
import sun from "./assets/sun.js";
|
|
20
|
+
import title from "./assets/title.js";
|
|
21
|
+
import translator from "./assets/translator.js";
|
|
22
|
+
import wrap from "./assets/wrap.js";
|
|
23
|
+
import wrapped from "./assets/wrapped.js";
|
|
24
|
+
const IconArrowDown = arrow_down;
|
|
25
|
+
const IconArrowRight = arrow_right;
|
|
26
|
+
const IconClose = assets_close;
|
|
27
|
+
const IconCopy = copy;
|
|
28
|
+
const IconDown = down;
|
|
29
|
+
const IconEmpty = empty;
|
|
30
|
+
const IconFile = file;
|
|
31
|
+
const IconGithub = github;
|
|
32
|
+
const IconGitlab = gitlab;
|
|
33
|
+
const IconHeader = header;
|
|
34
|
+
const IconJump = jump;
|
|
35
|
+
const IconLoading = loading;
|
|
36
|
+
const IconMenu = menu;
|
|
37
|
+
const IconMoon = moon;
|
|
38
|
+
const IconRight = right;
|
|
39
|
+
const IconSearch = search;
|
|
40
|
+
const IconSmallMenu = small_menu;
|
|
41
|
+
const IconSuccess = success;
|
|
42
|
+
const IconSun = sun;
|
|
43
|
+
const IconTitle = title;
|
|
44
|
+
const IconTranslator = translator;
|
|
45
|
+
const IconWrap = wrap;
|
|
46
|
+
const IconWrapped = wrapped;
|
|
47
|
+
export { IconArrowDown, IconArrowRight, IconClose, IconCopy, IconDown, IconEmpty, IconFile, IconGithub, IconGitlab, IconHeader, IconJump, IconLoading, IconMenu, IconMoon, IconRight, IconSearch, IconSmallMenu, IconSuccess, IconSun, IconTitle, IconTranslator, IconWrap, IconWrapped };
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,59 +1,62 @@
|
|
|
1
|
-
export { Badge } from './components/Badge/index';
|
|
2
|
-
export { Banner, type BannerProps } from './components/Banner/index';
|
|
3
|
-
export { Button } from './components/Button/index';
|
|
4
|
-
export { Callout, type CalloutProps } from './components/Callout/index';
|
|
5
|
-
export { CodeBlock, type CodeBlockProps } from './components/CodeBlock/index';
|
|
6
|
-
export { CodeBlockRuntime, type CodeBlockRuntimeProps, } from './components/CodeBlockRuntime/index';
|
|
7
|
-
export { CodeButtonGroup, type CodeButtonGroupProps, useCodeButtonGroup, } from './components/CodeButtonGroup';
|
|
8
|
-
export { getCustomMDXComponent } from './components/DocContent/docComponents/index';
|
|
9
|
-
export type { ShikiPreProps } from './components/DocContent/docComponents/pre';
|
|
10
|
-
export { DocContent } from './components/DocContent/index';
|
|
11
|
-
export { DocFooter } from './components/DocFooter/index';
|
|
12
|
-
export { EditLink } from './components/EditLink/index';
|
|
13
|
-
export { useEditLink } from './components/EditLink/useEditLink';
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export { type
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
33
|
-
export
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export {
|
|
37
|
-
export {
|
|
38
|
-
export {
|
|
39
|
-
export {
|
|
40
|
-
export {
|
|
41
|
-
export {
|
|
42
|
-
export {
|
|
43
|
-
export {
|
|
44
|
-
export {
|
|
45
|
-
export {
|
|
46
|
-
export {
|
|
47
|
-
export {
|
|
48
|
-
export {
|
|
49
|
-
export {
|
|
50
|
-
export
|
|
51
|
-
export {
|
|
52
|
-
export {
|
|
53
|
-
export {
|
|
54
|
-
export {
|
|
55
|
-
export {
|
|
56
|
-
export {
|
|
57
|
-
export {
|
|
58
|
-
export {
|
|
59
|
-
export {
|
|
1
|
+
export { Badge } from './components/Badge/index.js';
|
|
2
|
+
export { Banner, type BannerProps } from './components/Banner/index.js';
|
|
3
|
+
export { Button } from './components/Button/index.js';
|
|
4
|
+
export { Callout, type CalloutProps } from './components/Callout/index.js';
|
|
5
|
+
export { CodeBlock, type CodeBlockProps } from './components/CodeBlock/index.js';
|
|
6
|
+
export { CodeBlockRuntime, type CodeBlockRuntimeProps, } from './components/CodeBlockRuntime/index.js';
|
|
7
|
+
export { CodeButtonGroup, type CodeButtonGroupProps, useCodeButtonGroup, } from './components/CodeButtonGroup/index.js';
|
|
8
|
+
export { getCustomMDXComponent } from './components/DocContent/docComponents/index.js';
|
|
9
|
+
export type { ShikiPreProps } from './components/DocContent/docComponents/pre.js';
|
|
10
|
+
export { DocContent } from './components/DocContent/index.js';
|
|
11
|
+
export { DocFooter } from './components/DocFooter/index.js';
|
|
12
|
+
export { EditLink } from './components/EditLink/index.js';
|
|
13
|
+
export { useEditLink } from './components/EditLink/useEditLink.js';
|
|
14
|
+
export { FallbackHeading } from './components/FallbackHeading/index.js';
|
|
15
|
+
export { HomeBackground } from './components/HomeBackground/index.js';
|
|
16
|
+
export { HomeFeature } from './components/HomeFeature/index.js';
|
|
17
|
+
export { HomeFooter } from './components/HomeFooter/index.js';
|
|
18
|
+
export { HomeHero, type HomeHeroProps } from './components/HomeHero/index.js';
|
|
19
|
+
export { HoverGroup, type HoverGroupProps } from './components/HoverGroup/index.js';
|
|
20
|
+
export { useHoverGroup } from './components/HoverGroup/useHoverGroup.js';
|
|
21
|
+
export { LastUpdated } from './components/LastUpdated/index.js';
|
|
22
|
+
export { Link, type LinkProps } from './components/Link/index.js';
|
|
23
|
+
export { useLinkNavigate } from './components/Link/useLinkNavigate.js';
|
|
24
|
+
export { Nav, type NavProps } from './components/Nav/index.js';
|
|
25
|
+
export { NavHamburger } from './components/NavHamburger/index.js';
|
|
26
|
+
export { Outline } from './components/Outline/index.js';
|
|
27
|
+
export { Overview } from './components/Overview/index.js';
|
|
28
|
+
export { type Group, type GroupItem, OverviewGroup, } from './components/Overview/OverviewGroup.js';
|
|
29
|
+
export { type PackageManagerTabProps, PackageManagerTabs, } from './components/PackageManagerTabs/index.js';
|
|
30
|
+
export { PageTab, type PageTabProps, PageTabs, type PageTabsProps, } from './components/PageTabs/index.js';
|
|
31
|
+
export { PrevNextPage } from './components/PrevNextPage/index.js';
|
|
32
|
+
export { ReadPercent } from './components/ReadPercent/index.js';
|
|
33
|
+
export { Root, type RootProps } from './components/Root/index.js';
|
|
34
|
+
export { Search } from './components/Search/index.js';
|
|
35
|
+
export type { AfterSearch, BeforeSearch, CustomMatchResult, DefaultMatchResult, DefaultMatchResultItem, HighlightInfo, MatchResult, OnSearch, PageSearcherConfig, RenderSearchFunction, SearchOptions, UserMatchResultItem, } from './components/Search/logic/types.js';
|
|
36
|
+
export { RenderType } from './components/Search/logic/types.js';
|
|
37
|
+
export { SearchButton, type SearchButtonProps, } from './components/Search/SearchButton.js';
|
|
38
|
+
export { SearchPanel, type SearchPanelProps, } from './components/Search/SearchPanel.js';
|
|
39
|
+
export { Sidebar, SidebarList } from './components/Sidebar/index.js';
|
|
40
|
+
export { SocialLinks } from './components/SocialLinks/index.js';
|
|
41
|
+
export { SourceCode } from './components/SourceCode/index.js';
|
|
42
|
+
export { Steps } from './components/Steps/index.js';
|
|
43
|
+
export { SvgWrapper } from './components/SvgWrapper/index.js';
|
|
44
|
+
export { SwitchAppearance } from './components/SwitchAppearance/index.js';
|
|
45
|
+
export { Tab, Tabs } from './components/Tabs/index.js';
|
|
46
|
+
export { Tag } from './components/Tag/index.js';
|
|
47
|
+
export { Toc } from './components/Toc/index.js';
|
|
48
|
+
export { useActiveAnchor } from './hooks/useActiveAnchor.js';
|
|
49
|
+
export { useDynamicToc, useWatchToc } from './hooks/useDynamicToc.js';
|
|
50
|
+
export * from './icons.js';
|
|
51
|
+
export { DocLayout, type DocLayoutProps } from './layout/DocLayout/index.js';
|
|
52
|
+
export { HomeLayout, type HomeLayoutProps } from './layout/HomeLayout/index.js';
|
|
53
|
+
export { Layout, type LayoutProps } from './layout/Layout/index.js';
|
|
54
|
+
export { NotFoundLayout } from './layout/NotFountLayout/index.js';
|
|
55
|
+
export { mergeRefs } from './logic/mergeRefs.js';
|
|
56
|
+
export { useThemeState } from './logic/useAppearance.js';
|
|
57
|
+
export { useFullTextSearch } from './logic/useFullTextSearch.js';
|
|
58
|
+
export { usePrevNextPage } from './logic/usePrevNextPage.js';
|
|
59
|
+
export { useRedirect4FirstVisit } from './logic/useRedirect4FirstVisit.js';
|
|
60
|
+
export { useSetup } from './logic/useSetup.js';
|
|
61
|
+
export { useStorageValue } from './logic/useStorageValue.js';
|
|
62
|
+
export { parseInlineMarkdownText, renderHtmlOrText, renderInlineMarkdown, } from './logic/utils.js';
|
package/dist/theme/index.js
CHANGED
|
@@ -10,6 +10,7 @@ import { DocContent } from "./components/DocContent/index.js";
|
|
|
10
10
|
import { DocFooter } from "./components/DocFooter/index.js";
|
|
11
11
|
import { EditLink } from "./components/EditLink/index.js";
|
|
12
12
|
import { useEditLink } from "./components/EditLink/useEditLink.js";
|
|
13
|
+
import { FallbackHeading } from "./components/FallbackHeading/index.js";
|
|
13
14
|
import { HomeBackground } from "./components/HomeBackground/index.js";
|
|
14
15
|
import { HomeFeature } from "./components/HomeFeature/index.js";
|
|
15
16
|
import { HomeFooter } from "./components/HomeFooter/index.js";
|
|
@@ -28,6 +29,7 @@ import { PackageManagerTabs } from "./components/PackageManagerTabs/index.js";
|
|
|
28
29
|
import { PageTab, PageTabs } from "./components/PageTabs/index.js";
|
|
29
30
|
import { PrevNextPage } from "./components/PrevNextPage/index.js";
|
|
30
31
|
import { ReadPercent } from "./components/ReadPercent/index.js";
|
|
32
|
+
import { Root } from "./components/Root/index.js";
|
|
31
33
|
import { Search } from "./components/Search/index.js";
|
|
32
34
|
import { RenderType } from "./components/Search/logic/types.js";
|
|
33
35
|
import { SearchButton } from "./components/Search/SearchButton.js";
|
|
@@ -48,11 +50,12 @@ import { HomeLayout } from "./layout/HomeLayout/index.js";
|
|
|
48
50
|
import { Layout } from "./layout/Layout/index.js";
|
|
49
51
|
import { NotFoundLayout } from "./layout/NotFountLayout/index.js";
|
|
50
52
|
import { mergeRefs } from "./logic/mergeRefs.js";
|
|
51
|
-
import { useSetup } from "./logic/sideEffects.js";
|
|
52
53
|
import { useThemeState } from "./logic/useAppearance.js";
|
|
53
54
|
import { useFullTextSearch } from "./logic/useFullTextSearch.js";
|
|
54
55
|
import { usePrevNextPage } from "./logic/usePrevNextPage.js";
|
|
55
56
|
import { useRedirect4FirstVisit } from "./logic/useRedirect4FirstVisit.js";
|
|
57
|
+
import { useSetup } from "./logic/useSetup.js";
|
|
56
58
|
import { useStorageValue } from "./logic/useStorageValue.js";
|
|
57
59
|
import { parseInlineMarkdownText, renderHtmlOrText, renderInlineMarkdown } from "./logic/utils.js";
|
|
58
|
-
export
|
|
60
|
+
export * from "./icons.js";
|
|
61
|
+
export { Badge, Banner, Button, Callout, CodeBlock, CodeBlockRuntime, CodeButtonGroup, DocContent, DocFooter, DocLayout, EditLink, FallbackHeading, HomeBackground, HomeFeature, HomeFooter, HomeHero, HomeLayout, HoverGroup, LastUpdated, Layout, Link, Nav, NavHamburger, NotFoundLayout, Outline, Overview, OverviewGroup, PackageManagerTabs, PageTab, PageTabs, PrevNextPage, ReadPercent, RenderType, Root, Search, SearchButton, SearchPanel, Sidebar, SidebarList, SocialLinks, SourceCode, Steps, SvgWrapper, SwitchAppearance, Tab, Tabs, Tag, Toc, getCustomMDXComponent, mergeRefs, parseInlineMarkdownText, renderHtmlOrText, renderInlineMarkdown, useActiveAnchor, useCodeButtonGroup, useDynamicToc, useEditLink, useFullTextSearch, useHoverGroup, useLinkNavigate, usePrevNextPage, useRedirect4FirstVisit, useSetup, useStorageValue, useThemeState, useWatchToc };
|
|
@@ -143,10 +143,10 @@
|
|
|
143
143
|
background-color: color-mix(in srgb, var(--rp-c-bg) 60%, transparent);
|
|
144
144
|
backdrop-filter: blur(25px);
|
|
145
145
|
border-radius: var(--rp-radius-small);
|
|
146
|
-
|
|
146
|
+
max-width: 100%;
|
|
147
|
+
box-shadow: var(--rp-shadow-2);
|
|
147
148
|
visibility: hidden;
|
|
148
149
|
opacity: 0;
|
|
149
|
-
max-width: 100%;
|
|
150
150
|
padding: 20px 0;
|
|
151
151
|
transition: opacity .2s, transform .2s cubic-bezier(.19, 1, .22, 1);
|
|
152
152
|
position: fixed;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useFrontmatter } from "@rspress/core/runtime";
|
|
3
|
-
import { DocContent, Overview, useWatchToc } from "@theme";
|
|
3
|
+
import { DocContent, DocFooter, Outline, Overview, Sidebar, useWatchToc } from "@theme";
|
|
4
4
|
import clsx from "clsx";
|
|
5
|
-
import { DocFooter } from "../../components/DocFooter/index.js";
|
|
6
|
-
import { Outline } from "../../components/Outline/index.js";
|
|
7
|
-
import { Sidebar } from "../../components/Sidebar/index.js";
|
|
8
5
|
import { useSidebarMenu } from "../../components/SidebarMenu/useSidebarMenu.js";
|
|
9
6
|
import "./index.css";
|
|
10
7
|
function DocLayout(props) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { HomeLayoutProps } from '@theme';
|
|
1
2
|
import { type DocLayoutProps, type NavProps } from '@theme';
|
|
2
3
|
import React from 'react';
|
|
3
|
-
import type { HomeLayoutProps } from '../HomeLayout';
|
|
4
4
|
export type LayoutProps = {
|
|
5
5
|
top?: React.ReactNode;
|
|
6
6
|
bottom?: React.ReactNode;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Content, useFrontmatter, useLocaleSiteData, usePageData, useSite } from "@rspress/core/runtime";
|
|
3
|
-
import { DocLayout, HomeLayout as external_theme_HomeLayout, Nav, NotFoundLayout as external_theme_NotFoundLayout } from "@theme";
|
|
3
|
+
import { DocLayout, HomeLayout as external_theme_HomeLayout, Nav, NotFoundLayout as external_theme_NotFoundLayout, useRedirect4FirstVisit, useSetup } from "@theme";
|
|
4
4
|
import { Head, useHead } from "@unhead/react";
|
|
5
5
|
import react, { memo, useMemo } from "react";
|
|
6
|
-
import {
|
|
7
|
-
import { useRedirect4FirstVisit } from "../../logic/useRedirect4FirstVisit.js";
|
|
6
|
+
import { useScrollReset } from "../../logic/useScrollReset.js";
|
|
8
7
|
const concatTitle = (title, suffix)=>{
|
|
9
8
|
if (!suffix) return title;
|
|
10
9
|
title = title.trim();
|
|
@@ -71,6 +70,7 @@ function Layout(props) {
|
|
|
71
70
|
const { pageType, lang: currentLang, title: articleTitle } = page;
|
|
72
71
|
const localesData = useLocaleSiteData();
|
|
73
72
|
useSetup();
|
|
73
|
+
useScrollReset();
|
|
74
74
|
useRedirect4FirstVisit();
|
|
75
75
|
let title = frontmatter.title ?? articleTitle;
|
|
76
76
|
const mainTitle = site.title || localesData.title || '';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MatchResult } from '../components/Search/logic/types';
|
|
1
|
+
import type { MatchResult } from '../components/Search/logic/types.js';
|
|
2
2
|
export declare function useFullTextSearch(): {
|
|
3
3
|
initialized: boolean;
|
|
4
4
|
search: (keyword: string, limit?: number) => Promise<MatchResult>;
|
|
@@ -18,17 +18,16 @@ function scrollToTarget(target) {
|
|
|
18
18
|
top: offsetTop
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const
|
|
21
|
+
function useScrollAfterNav() {
|
|
22
|
+
const location = useLocation();
|
|
23
23
|
useEffect(()=>{
|
|
24
24
|
const decodedHash = decodeURIComponent(window.location.hash);
|
|
25
|
-
if (
|
|
26
|
-
else {
|
|
25
|
+
if (decodedHash.length > 0) {
|
|
27
26
|
const target = document.getElementById(decodedHash.slice(1));
|
|
28
27
|
if (target) scrollToTarget(target);
|
|
29
28
|
}
|
|
30
29
|
}, [
|
|
31
|
-
|
|
30
|
+
location
|
|
32
31
|
]);
|
|
33
32
|
}
|
|
34
|
-
export {
|
|
33
|
+
export { useScrollAfterNav };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
import { useLocation } from "react-router-dom";
|
|
3
|
+
function useScrollReset() {
|
|
4
|
+
const { pathname } = useLocation();
|
|
5
|
+
useEffect(()=>{
|
|
6
|
+
const decodedHash = decodeURIComponent(window.location.hash);
|
|
7
|
+
if (0 === decodedHash.length) window.scrollTo(0, 0);
|
|
8
|
+
}, [
|
|
9
|
+
pathname
|
|
10
|
+
]);
|
|
11
|
+
}
|
|
12
|
+
export { useScrollReset };
|
|
@@ -42,16 +42,7 @@ body {
|
|
|
42
42
|
--rp-font-family-mono: Menlo, Monaco, Consolas, "Courier New", monospace;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
.
|
|
46
|
-
height: 1.6rem;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
#nprogress .bar {
|
|
45
|
+
:root #nprogress .bar {
|
|
50
46
|
background: var(--rp-c-brand);
|
|
51
|
-
width: 100%;
|
|
52
|
-
height: 2px;
|
|
53
|
-
position: fixed;
|
|
54
|
-
top: 0;
|
|
55
|
-
left: 0;
|
|
56
47
|
}
|
|
57
48
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The theme code will be bundled by Modern.js Module Tools, but it will ignore the `@import` in css file. So we need to import the css file in js/ts file to make sure the css file will be bundled.
|
|
3
3
|
*/
|
|
4
|
+
import 'nprogress/nprogress.css';
|
|
4
5
|
import './vars/brand-vars.css';
|
|
5
6
|
import './vars/shiki-vars.css';
|
|
6
7
|
import './vars/code-vars.css';
|
|
@@ -9,4 +10,3 @@ import './vars/base-vars.css';
|
|
|
9
10
|
import './base.css';
|
|
10
11
|
import './scrollbar.scss';
|
|
11
12
|
import './shiki.scss';
|
|
12
|
-
import 'nprogress/nprogress.css';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "nprogress/nprogress.css";
|
|
1
2
|
import "./vars/brand-vars.css";
|
|
2
3
|
import "./vars/shiki-vars.css";
|
|
3
4
|
import "./vars/code-vars.css";
|
|
@@ -6,4 +7,3 @@ import "./vars/base-vars.css";
|
|
|
6
7
|
import "./base.css";
|
|
7
8
|
import "./scrollbar.css";
|
|
8
9
|
import "./shiki.css";
|
|
9
|
-
import "nprogress/nprogress.css";
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
--rp-c-text-2: #000000b3;
|
|
11
11
|
--rp-c-text-3: #3c3c3c54;
|
|
12
12
|
--rp-c-text-4: #3c3c3c2e;
|
|
13
|
-
--rp-c-text-code: #
|
|
14
|
-
--rp-c-text-code-bg: #
|
|
13
|
+
--rp-c-text-code: #476582;
|
|
14
|
+
--rp-c-text-code-bg: #99a1b314;
|
|
15
|
+
--rp-c-text-code-border: #0000000d;
|
|
15
16
|
--rp-c-link: var(--rp-c-brand-dark);
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -28,7 +29,8 @@
|
|
|
28
29
|
--rp-c-text-3: #ebebeb61;
|
|
29
30
|
--rp-c-text-4: #ebebeb2e;
|
|
30
31
|
--rp-c-text-code: #c9def1;
|
|
31
|
-
--rp-c-text-code-bg: #
|
|
32
|
+
--rp-c-text-code-bg: #ffffff14;
|
|
33
|
+
--rp-c-text-code-border: #ffffff0d;
|
|
32
34
|
--rp-c-link: var(--rp-c-brand-light);
|
|
33
35
|
}
|
|
34
36
|
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
:where(html:not(.rp-dark)) {
|
|
2
|
+
--rp-home-hero-secondary-color: #a673ff;
|
|
2
3
|
--rp-home-hero-title-color: transparent;
|
|
3
|
-
--rp-home-hero-title-bg: linear-gradient(90deg, var(--rp-c-brand-dark) 0%, var(--rp-c-brand-dark) 30%,
|
|
4
|
+
--rp-home-hero-title-bg: linear-gradient(90deg, var(--rp-c-brand-dark) 0%, var(--rp-c-brand-dark) 30%, var(--rp-home-hero-secondary-color) 100%);
|
|
4
5
|
--rp-home-background-bg: radial-gradient(42.12% 56.13% at 100% 0%, #537dff1a 0%, #fff0 100%), radial-gradient(42.01% 79.63% at 52.86% 0%, #537dff33 0%, #fff0 100%), radial-gradient(79.67% 58.09% at 0% 0%, #7e69ff33 0%, #fff0 100%), #fff;
|
|
5
6
|
--rp-home-feature-bg: linear-gradient(135deg, #fff, #f9f9f980);
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
:where(html.rp-dark) {
|
|
10
|
+
--rp-home-hero-secondary-color: #a673ff;
|
|
9
11
|
--rp-home-hero-title-color: transparent;
|
|
10
|
-
--rp-home-hero-title-bg: linear-gradient(90deg, var(--rp-c-brand-dark) 0%, var(--rp-c-brand-dark) 30%,
|
|
12
|
+
--rp-home-hero-title-bg: linear-gradient(90deg, var(--rp-c-brand-dark) 0%, var(--rp-c-brand-dark) 30%, var(--rp-home-hero-secondary-color) 100%);
|
|
11
13
|
--rp-home-background-bg: radial-gradient(42.12% 56.13% at 100% 0%, #0c1d48 0%, #12121200 100%), radial-gradient(55.81% 87.78% at 48.37% 0%, #000 0%, #12121200 89.55%), radial-gradient(122.65% 88.24% at 0% 0%, #34268a 0%, #12121200 100%), #121212;
|
|
12
14
|
--rp-home-feature-bg: linear-gradient(135deg, #fff0, #ffffff08);
|
|
13
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspress/core",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.2",
|
|
4
4
|
"description": "The Rspress Documentation Framework",
|
|
5
5
|
"bugs": "https://github.com/web-infra-dev/rspress/issues",
|
|
6
6
|
"repository": {
|
|
@@ -30,6 +30,10 @@
|
|
|
30
30
|
"types": "./dist/theme/index.d.ts",
|
|
31
31
|
"default": "./dist/theme/index.js"
|
|
32
32
|
},
|
|
33
|
+
"./theme-original": {
|
|
34
|
+
"types": "./dist/theme/index.d.ts",
|
|
35
|
+
"default": "./dist/theme/index.js"
|
|
36
|
+
},
|
|
33
37
|
"./runtime": {
|
|
34
38
|
"types": "./dist/runtime.d.ts",
|
|
35
39
|
"default": "./dist/runtime.js"
|
|
@@ -59,7 +63,7 @@
|
|
|
59
63
|
"dependencies": {
|
|
60
64
|
"@mdx-js/mdx": "^3.1.1",
|
|
61
65
|
"@mdx-js/react": "^3.1.1",
|
|
62
|
-
"@rsbuild/core": "~1.6.
|
|
66
|
+
"@rsbuild/core": "~1.6.13",
|
|
63
67
|
"@rsbuild/plugin-react": "~1.4.2",
|
|
64
68
|
"@rspress/mdx-rs": "0.6.6",
|
|
65
69
|
"@shikijs/rehype": "^3.12.2",
|
|
@@ -81,15 +85,16 @@
|
|
|
81
85
|
"medium-zoom": "1.1.0",
|
|
82
86
|
"nprogress": "^0.2.0",
|
|
83
87
|
"picocolors": "^1.1.1",
|
|
84
|
-
"react": "^19.2.
|
|
85
|
-
"react-dom": "^19.2.
|
|
88
|
+
"react": "^19.2.1",
|
|
89
|
+
"react-dom": "^19.2.1",
|
|
86
90
|
"react-lazy-with-preload": "^2.2.1",
|
|
87
91
|
"react-reconciler": "0.33.0",
|
|
88
|
-
"react-router-dom": "^
|
|
92
|
+
"react-router-dom": "^7.10.1",
|
|
89
93
|
"rehype-external-links": "^3.0.0",
|
|
90
94
|
"rehype-raw": "^7.0.0",
|
|
91
95
|
"remark-gfm": "^4.0.1",
|
|
92
96
|
"remark-mdx": "^3.1.1",
|
|
97
|
+
"remark-stringify": "^11.0.0",
|
|
93
98
|
"scroll-into-view-if-needed": "^3.1.0",
|
|
94
99
|
"shiki": "^3.12.2",
|
|
95
100
|
"tinyglobby": "^0.2.15",
|
|
@@ -97,14 +102,14 @@
|
|
|
97
102
|
"unified": "^11.0.5",
|
|
98
103
|
"unist-util-visit": "^5.0.0",
|
|
99
104
|
"unist-util-visit-children": "^3.0.0",
|
|
100
|
-
"@rspress/runtime": "2.0.0-rc.
|
|
101
|
-
"@rspress/shared": "2.0.0-rc.
|
|
105
|
+
"@rspress/runtime": "2.0.0-rc.2",
|
|
106
|
+
"@rspress/shared": "2.0.0-rc.2"
|
|
102
107
|
},
|
|
103
108
|
"devDependencies": {
|
|
104
|
-
"@microsoft/api-extractor": "^7.
|
|
109
|
+
"@microsoft/api-extractor": "^7.55.2",
|
|
105
110
|
"@rsbuild/plugin-sass": "~1.4.0",
|
|
106
111
|
"@rsbuild/plugin-svgr": "^1.2.2",
|
|
107
|
-
"@rslib/core": "0.
|
|
112
|
+
"@rslib/core": "0.18.3",
|
|
108
113
|
"@types/body-scroll-lock": "^3.1.2",
|
|
109
114
|
"@types/hast": "^3.0.4",
|
|
110
115
|
"@types/html-to-text": "^9.0.4",
|
|
@@ -112,23 +117,17 @@
|
|
|
112
117
|
"@types/mdast": "^4.0.4",
|
|
113
118
|
"@types/node": "^22.8.1",
|
|
114
119
|
"@types/nprogress": "^0.2.3",
|
|
115
|
-
"@types/react": "^19.2.
|
|
116
|
-
"@types/react-dom": "^19.2.
|
|
120
|
+
"@types/react": "^19.2.7",
|
|
121
|
+
"@types/react-dom": "^19.2.3",
|
|
117
122
|
"@types/react-reconciler": "^0.32.3",
|
|
118
|
-
"@types/web": "^0.0.
|
|
123
|
+
"@types/web": "^0.0.297",
|
|
119
124
|
"execa": "8.0.1",
|
|
120
125
|
"mdast-util-directive": "^3.1.0",
|
|
121
126
|
"mdast-util-mdx-expression": "^2.0.1",
|
|
122
|
-
"memfs": "^4.
|
|
123
|
-
"p-map": "^7.0.
|
|
127
|
+
"memfs": "^4.51.1",
|
|
128
|
+
"p-map": "^7.0.4",
|
|
124
129
|
"postcss": "8.5.6",
|
|
125
|
-
"rehype-stringify": "^10.0.1",
|
|
126
130
|
"remark-directive": "^4.0.0",
|
|
127
|
-
"remark-mdx": "^3.1.1",
|
|
128
|
-
"remark-parse": "^11.0.0",
|
|
129
|
-
"remark-rehype": "^11.1.2",
|
|
130
|
-
"remark-stringify": "^11.0.0",
|
|
131
|
-
"rimraf": "^6.0.1",
|
|
132
131
|
"rsbuild-plugin-publint": "^0.3.3",
|
|
133
132
|
"rsbuild-plugin-virtual-module": "0.4.1",
|
|
134
133
|
"tailwindcss": "^3.4.18",
|