@rspress/core 2.0.5 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/0~1402.js +1 -0
- package/dist/{0~7675.423f6a06.js → 0~execa.js} +6 -5
- package/dist/1361.js +5 -0
- package/dist/1965.js +7 -0
- package/dist/4454.js +8 -0
- package/dist/{7744.421b464f.js → 4524.js} +20 -5
- package/dist/7397.js +18 -0
- package/dist/{5485.0bb24594.js → 8311.js} +5 -2
- package/dist/8474.js +4 -0
- package/dist/8885.js +4 -0
- package/dist/cli/index.js +2 -3
- package/dist/config/loadConfigFile.js +1 -2
- package/dist/eject-theme/components/Banner/index.tsx +1 -1
- package/dist/eject-theme/components/Button/index.tsx +1 -1
- package/dist/eject-theme/components/CodeBlock/index.scss +54 -1
- package/dist/eject-theme/components/CodeBlock/index.tsx +77 -7
- package/dist/eject-theme/components/CodeBlockRuntime/index.tsx +12 -2
- package/dist/eject-theme/components/CodeButtonGroup/CopyCodeButton.tsx +1 -1
- package/dist/eject-theme/components/CodeButtonGroup/index.tsx +15 -15
- package/dist/eject-theme/components/DocContent/docComponents/a.tsx +1 -1
- package/dist/eject-theme/components/DocContent/docComponents/pre.tsx +5 -1
- package/dist/eject-theme/components/DocContent/docComponents/title.tsx +6 -1
- package/dist/eject-theme/components/DocContent/index.tsx +1 -1
- package/dist/eject-theme/components/DocFooter/index.tsx +1 -1
- package/dist/eject-theme/components/EditLink/index.tsx +1 -1
- package/dist/eject-theme/components/FallbackHeading/index.tsx +4 -1
- package/dist/eject-theme/components/HomeFeature/index.tsx +5 -1
- package/dist/eject-theme/components/HomeFooter/index.tsx +1 -1
- package/dist/eject-theme/components/HomeHero/index.tsx +2 -2
- package/dist/eject-theme/components/HoverGroup/index.tsx +5 -2
- package/dist/eject-theme/components/Link/useLinkNavigate.ts +1 -1
- package/dist/eject-theme/components/Llms/LlmsCopyButton.tsx +3 -2
- package/dist/eject-theme/components/Llms/LlmsCopyRow.tsx +3 -2
- package/dist/eject-theme/components/Llms/LlmsOpenRow.tsx +1 -1
- package/dist/eject-theme/components/Llms/LlmsViewOptions.tsx +3 -2
- package/dist/eject-theme/components/Llms/copy.ts +12 -0
- package/dist/eject-theme/components/Nav/NavMenu.tsx +9 -2
- package/dist/eject-theme/components/Nav/index.tsx +1 -1
- package/dist/eject-theme/components/NavHamburger/index.tsx +6 -1
- package/dist/eject-theme/components/NavScreen/NavScreenAppearance.tsx +1 -1
- package/dist/eject-theme/components/NavScreen/NavScreenLangs.tsx +1 -1
- package/dist/eject-theme/components/NavScreen/NavScreenMenuItem.tsx +5 -1
- package/dist/eject-theme/components/NavScreen/NavScreenMenuOthers.tsx +1 -1
- package/dist/eject-theme/components/NavScreen/NavScreenVersions.tsx +1 -1
- package/dist/eject-theme/components/NavScreen/index.tsx +1 -1
- package/dist/eject-theme/components/NavTitle/index.tsx +1 -1
- package/dist/eject-theme/components/Outline/ScrollToTop.tsx +5 -1
- package/dist/eject-theme/components/Outline/index.tsx +1 -1
- package/dist/eject-theme/components/Overview/index.tsx +1 -1
- package/dist/eject-theme/components/OverviewGroup/index.tsx +2 -2
- package/dist/eject-theme/components/PackageManagerTabs/index.tsx +1 -1
- package/dist/eject-theme/components/PrevNextPage/index.tsx +1 -1
- package/dist/eject-theme/components/Root/index.tsx +1 -1
- package/dist/eject-theme/components/Search/NoSearchResult.tsx +1 -1
- package/dist/eject-theme/components/Search/SearchButton.tsx +1 -1
- package/dist/eject-theme/components/Search/SearchPanel.tsx +3 -1
- package/dist/eject-theme/components/Search/SuggestItem.tsx +1 -1
- package/dist/eject-theme/components/Search/index.tsx +1 -1
- package/dist/eject-theme/components/Sidebar/SidebarGroup.tsx +5 -1
- package/dist/eject-theme/components/Sidebar/SidebarItem.scss +0 -4
- package/dist/eject-theme/components/Sidebar/SidebarItem.tsx +1 -1
- package/dist/eject-theme/components/Sidebar/SidebarSectionHeader.tsx +1 -1
- package/dist/eject-theme/components/SidebarMenu/index.tsx +1 -1
- package/dist/eject-theme/components/SocialLinks/index.tsx +1 -1
- package/dist/eject-theme/components/SourceCode/index.tsx +1 -1
- package/dist/eject-theme/components/SvgWrapper/index.tsx +1 -1
- package/dist/eject-theme/components/SwitchAppearance/index.tsx +1 -1
- package/dist/eject-theme/components/Tabs/index.scss +13 -15
- package/dist/eject-theme/components/Tabs/index.tsx +1 -1
- package/dist/eject-theme/components/Tag/index.tsx +1 -1
- package/dist/eject-theme/components/Toc/TocItem.tsx +5 -1
- package/dist/eject-theme/components/Toc/index.tsx +1 -1
- package/dist/index.js +1 -3
- package/dist/node/PluginDriver.js +3 -8
- package/dist/node/auto-nav-sidebar/index.js +1 -2
- package/dist/node/auto-nav-sidebar/locales.js +1 -1
- package/dist/node/auto-nav-sidebar/normalize.js +3 -2
- package/dist/node/auto-nav-sidebar/utils.js +1 -2
- package/dist/node/auto-nav-sidebar/walk.js +1 -2
- package/dist/node/constants.js +1 -2
- package/dist/node/eject.js +1 -1
- package/dist/node/initRsbuild.js +2 -4
- package/dist/node/last-updated/index.js +1 -1
- package/dist/node/logger/hint.js +4 -1
- package/dist/node/mdx/options.js +1 -3
- package/dist/node/mdx/processor.js +1 -2
- package/dist/node/mdx/rehypePlugins/codeMeta.js +1 -1
- package/dist/node/mdx/rehypePlugins/headerAnchor.js +1 -2
- package/dist/node/mdx/rehypePlugins/shiki.d.ts +1 -1
- package/dist/node/mdx/rehypePlugins/shiki.js +2 -1
- package/dist/node/mdx/rehypePlugins/transformers/add-fold.d.ts +6 -0
- package/dist/node/mdx/rehypePlugins/transformers/add-fold.js +38 -0
- package/dist/node/mdx/rehypePlugins/transformers/index.d.ts +1 -0
- package/dist/node/mdx/rehypePlugins/transformers/index.js +1 -0
- package/dist/node/mdx/rehypePlugins/transformers/meta-highlight.js +1 -1
- package/dist/node/mdx/remarkPlugins/builtin.js +1 -1
- package/dist/node/mdx/remarkPlugins/fileCodeBlock.js +1 -2
- package/dist/node/mdx/remarkPlugins/image.js +1 -1
- package/dist/node/mdx/remarkPlugins/link.js +1 -2
- package/dist/node/mdx/remarkPlugins/toc.js +1 -1
- package/dist/node/medium-zoom/index.js +1 -1
- package/dist/node/route/RoutePage.js +1 -1
- package/dist/node/route/RouteService.js +1 -3
- package/dist/node/route/extractPageData.js +1 -3
- package/dist/node/route/normalizeRoutePath.js +1 -2
- package/dist/node/runtimeModule/i18n.js +2 -3
- package/dist/node/runtimeModule/pageData/createPageData.js +1 -2
- package/dist/node/runtimeModule/pageData/rsbuildPlugin.js +1 -2
- package/dist/node/runtimeModule/searchHooks.js +1 -1
- package/dist/node/runtimeModule/siteData/createSiteData.js +1 -1
- package/dist/node/runtimeModule/siteData/normalizeThemeConfig.js +1 -1
- package/dist/node/runtimeModule/siteData/rsbuildPlugin.js +1 -1
- package/dist/node/serve.js +1 -1
- package/dist/node/ssg/renderPage.js +1 -2
- package/dist/node/ssg/renderPageWorker.js +2 -2
- package/dist/node/ssg/renderPages.js +3 -4
- package/dist/node/ssg/rsbuildPluginSSG.js +1 -2
- package/dist/node/ssg/ssgEnv.d.ts +1 -1
- package/dist/node/ssg/ssgEnv.js +2 -2
- package/dist/node/ssg-md/llms/emitLlmsTxt.js +5 -7
- package/dist/node/ssg-md/llms/llmsTxt.js +1 -2
- package/dist/node/ssg-md/remarkSplitMdx.js +1 -2
- package/dist/node/ssg-md/renderPage.js +1 -2
- package/dist/node/ssg-md/renderPages.js +2 -2
- package/dist/node/ssg-md/rsbuildPluginSSGMD.js +1 -2
- package/dist/node/utils/checkLanguageParity.js +1 -1
- package/dist/node/utils/createHash.js +1 -1
- package/dist/node/utils/error.js +1 -1
- package/dist/node/utils/flattenMdxContent.js +1 -3
- package/dist/node/utils/fs.js +1 -1
- package/dist/node/utils/getPageKey.js +1 -1
- package/dist/node/utils/normalizePath.js +1 -2
- package/dist/node/utils/reactAlias.js +15 -10
- package/dist/runtime/index.js +20 -21
- package/dist/runtime/ssrMdServerEntry.js +2 -2
- package/dist/runtime/ssrServerEntry.js +2 -2
- package/dist/runtime/utils.d.ts +1 -1
- package/dist/runtime/utils.js +1 -1
- package/dist/shiki-transformers.js +1 -0
- package/dist/theme/assets/arrow-down.js +1 -1
- package/dist/theme/assets/arrow-right.js +1 -1
- package/dist/theme/assets/close.js +1 -1
- package/dist/theme/assets/copy.js +1 -1
- package/dist/theme/assets/deprecated.js +1 -1
- package/dist/theme/assets/down.js +1 -1
- package/dist/theme/assets/edit.js +1 -1
- package/dist/theme/assets/empty.js +1 -1
- package/dist/theme/assets/experimental.js +1 -1
- package/dist/theme/assets/external-link.js +1 -1
- package/dist/theme/assets/file.js +1 -1
- package/dist/theme/assets/github.js +1 -1
- package/dist/theme/assets/gitlab.js +1 -1
- package/dist/theme/assets/header.js +1 -1
- package/dist/theme/assets/jump.js +1 -1
- package/dist/theme/assets/link.js +1 -1
- package/dist/theme/assets/loading.js +1 -1
- package/dist/theme/assets/menu.js +1 -1
- package/dist/theme/assets/moon.js +1 -1
- package/dist/theme/assets/scroll-to-top.js +1 -1
- package/dist/theme/assets/search.js +1 -1
- package/dist/theme/assets/small-menu.js +1 -1
- package/dist/theme/assets/success.js +1 -1
- package/dist/theme/assets/sun.js +1 -1
- package/dist/theme/assets/title.js +1 -1
- package/dist/theme/assets/wrap.js +1 -1
- package/dist/theme/assets/wrapped.js +1 -1
- package/dist/theme/components/Banner/index.js +1 -1
- package/dist/theme/components/Button/index.js +1 -1
- package/dist/theme/components/Callout/index.js +2 -1
- package/dist/theme/components/CodeBlock/index.css +49 -1
- package/dist/theme/components/CodeBlock/index.d.ts +11 -3
- package/dist/theme/components/CodeBlock/index.js +51 -6
- package/dist/theme/components/CodeBlockRuntime/index.d.ts +2 -2
- package/dist/theme/components/CodeBlockRuntime/index.js +10 -2
- package/dist/theme/components/CodeButtonGroup/CopyCodeButton.js +1 -1
- package/dist/theme/components/CodeButtonGroup/index.d.ts +6 -6
- package/dist/theme/components/CodeButtonGroup/index.js +10 -10
- package/dist/theme/components/DocContent/docComponents/a.js +1 -1
- package/dist/theme/components/DocContent/docComponents/pre.d.ts +2 -2
- package/dist/theme/components/DocContent/docComponents/pre.js +4 -2
- package/dist/theme/components/DocContent/docComponents/title.js +1 -1
- package/dist/theme/components/DocContent/index.js +1 -1
- package/dist/theme/components/DocFooter/index.js +1 -1
- package/dist/theme/components/EditLink/index.js +1 -1
- package/dist/theme/components/FallbackHeading/index.js +1 -1
- package/dist/theme/components/HomeBackground/index.css +1 -0
- package/dist/theme/components/HomeFeature/index.css +3 -3
- package/dist/theme/components/HomeFeature/index.js +1 -1
- package/dist/theme/components/HomeFooter/index.js +1 -1
- package/dist/theme/components/HomeHero/index.d.ts +1 -1
- package/dist/theme/components/HomeHero/index.js +1 -1
- package/dist/theme/components/HoverGroup/index.d.ts +1 -1
- package/dist/theme/components/HoverGroup/index.js +4 -1
- package/dist/theme/components/Link/useLinkNavigate.d.ts +1 -1
- package/dist/theme/components/Llms/LlmsCopyButton.js +4 -3
- package/dist/theme/components/Llms/LlmsCopyRow.js +3 -2
- package/dist/theme/components/Llms/LlmsOpenRow.js +1 -1
- package/dist/theme/components/Llms/LlmsViewOptions.js +4 -3
- package/dist/theme/components/Llms/copy.d.ts +1 -0
- package/dist/theme/components/Llms/copy.js +9 -0
- package/dist/theme/components/Llms/index.css +1 -0
- package/dist/theme/components/Llms/index.js +4 -5
- package/dist/theme/components/Nav/NavMenu.d.ts +1 -1
- package/dist/theme/components/Nav/NavMenu.js +2 -1
- package/dist/theme/components/Nav/index.css +1 -1
- package/dist/theme/components/Nav/index.js +1 -1
- package/dist/theme/components/NavHamburger/index.js +1 -1
- package/dist/theme/components/NavScreen/NavScreenAppearance.js +1 -1
- package/dist/theme/components/NavScreen/NavScreenLangs.js +1 -1
- package/dist/theme/components/NavScreen/NavScreenMenuItem.d.ts +2 -1
- package/dist/theme/components/NavScreen/NavScreenMenuItem.js +4 -2
- package/dist/theme/components/NavScreen/NavScreenMenuOthers.js +1 -1
- package/dist/theme/components/NavScreen/NavScreenVersions.js +1 -1
- package/dist/theme/components/NavScreen/index.css +1 -1
- package/dist/theme/components/NavScreen/index.js +1 -1
- package/dist/theme/components/NavTitle/index.js +1 -1
- package/dist/theme/components/Outline/ScrollToTop.js +1 -1
- package/dist/theme/components/Outline/index.js +1 -1
- package/dist/theme/components/Overview/index.d.ts +1 -1
- package/dist/theme/components/Overview/index.js +1 -1
- package/dist/theme/components/OverviewGroup/icons/plugin.js +1 -1
- package/dist/theme/components/OverviewGroup/index.css +1 -0
- package/dist/theme/components/OverviewGroup/index.js +1 -1
- package/dist/theme/components/PackageManagerTabs/index.js +1 -1
- package/dist/theme/components/PrevNextPage/index.js +1 -1
- package/dist/theme/components/Root/index.d.ts +1 -1
- package/dist/theme/components/Search/NoSearchResult.js +1 -1
- package/dist/theme/components/Search/SearchButton.js +1 -1
- package/dist/theme/components/Search/SearchPanel.js +3 -2
- package/dist/theme/components/Search/SuggestItem.js +1 -1
- package/dist/theme/components/Search/index.js +1 -1
- package/dist/theme/components/Search/logic/providers/LocalProvider.js +1 -1
- package/dist/theme/components/Sidebar/SidebarGroup.js +1 -1
- package/dist/theme/components/Sidebar/SidebarItem.css +0 -4
- package/dist/theme/components/Sidebar/SidebarItem.js +1 -1
- package/dist/theme/components/Sidebar/SidebarSectionHeader.js +1 -1
- package/dist/theme/components/SidebarMenu/index.js +1 -1
- package/dist/theme/components/SocialLinks/index.js +1 -1
- package/dist/theme/components/SourceCode/index.js +1 -1
- package/dist/theme/components/SvgWrapper/index.js +1 -1
- package/dist/theme/components/SwitchAppearance/index.js +1 -1
- package/dist/theme/components/Tabs/index.css +14 -8
- package/dist/theme/components/Tabs/index.js +1 -1
- package/dist/theme/components/Tag/index.js +1 -1
- package/dist/theme/components/Toc/TocItem.css +1 -1
- package/dist/theme/components/Toc/TocItem.js +1 -1
- package/dist/theme/components/Toc/index.js +1 -1
- package/dist/theme/index.js +66 -67
- package/dist/theme/layout/DocLayout/index.css +11 -11
- package/dist/theme/layout/DocLayout/index.js +1 -1
- package/dist/theme/layout/HomeLayout/index.js +1 -1
- package/dist/theme/layout/Layout/index.d.ts +2 -2
- package/dist/theme/layout/Layout/index.js +16 -6
- package/dist/theme/layout/NotFountLayout/index.js +1 -1
- package/dist/theme/styles/base.css +7 -4
- package/dist/theme/styles/preflight.css +2 -0
- package/dist/theme/styles/vars/home-vars.css +28 -4
- package/nav-json-schema.json +3 -0
- package/package.json +14 -14
- package/dist/6289.29817fb4.js +0 -4
- package/dist/9348.1beb3e25.js +0 -11
- package/dist/cli/index.44f3184c.js +0 -2
- package/dist/node/mdx/loader.15134034.js +0 -9
- /package/dist/{node/ssg/renderPageWorker.165b5d46.js → 9224.js} +0 -0
- /package/dist/{rslib-runtime.99091bf6.js → rslib-runtime.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useActiveMatcher } from "@rspress/core/runtime";
|
|
3
|
-
import { IconArrowRight, SvgWrapper, useLinkNavigate } from "@theme";
|
|
3
|
+
import { IconArrowRight, SvgWrapper, useLinkNavigate } from "@rspress/core/theme";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { SidebarDivider } from "./SidebarDivider.js";
|
|
6
6
|
import "./SidebarGroup.css";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useActiveMatcher } from "@rspress/core/runtime";
|
|
3
|
-
import { Link, Tag, renderInlineMarkdown } from "@theme";
|
|
3
|
+
import { Link, Tag, renderInlineMarkdown } from "@rspress/core/theme";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { useEffect, useRef, useTransition } from "react";
|
|
6
6
|
import "./SidebarItem.css";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Tag, renderInlineMarkdown } from "@theme";
|
|
2
|
+
import { Tag, renderInlineMarkdown } from "@rspress/core/theme";
|
|
3
3
|
import "./SidebarSectionHeader.css";
|
|
4
4
|
function SidebarSectionHeader({ sectionHeaderText, tag }) {
|
|
5
5
|
return /*#__PURE__*/ jsxs("div", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useFrontmatter, useI18n, useLocation } from "@rspress/core/runtime";
|
|
3
|
-
import { IconArrowRight, IconMenu, ReadPercent, SvgWrapper, renderInlineMarkdown, useActiveAnchor, useDynamicToc } from "@theme";
|
|
3
|
+
import { IconArrowRight, IconMenu, ReadPercent, SvgWrapper, renderInlineMarkdown, useActiveAnchor, useDynamicToc } from "@rspress/core/theme";
|
|
4
4
|
import { forwardRef, useEffect, useRef } from "react";
|
|
5
5
|
import { createPortal } from "react-dom";
|
|
6
6
|
import "./index.css";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useSite } from "@rspress/core/runtime";
|
|
3
|
-
import { IconArrowDown, SvgWrapper } from "@theme";
|
|
3
|
+
import { IconArrowDown, SvgWrapper } from "@rspress/core/theme";
|
|
4
4
|
import "./index.css";
|
|
5
5
|
import { useHoverGroup } from "../HoverGroup/useHoverGroup.js";
|
|
6
6
|
import { SocialLink } from "./SocialLink.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useI18n } from "@rspress/core/runtime";
|
|
3
|
-
import { IconGithub, IconGitlab, SvgWrapper } from "@theme";
|
|
3
|
+
import { IconGithub, IconGitlab, SvgWrapper } from "@rspress/core/theme";
|
|
4
4
|
import "./index.css";
|
|
5
5
|
function SourceCode(props) {
|
|
6
6
|
const { href, platform = 'github' } = props;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { normalizeImagePath } from "@rspress/core/runtime";
|
|
3
|
-
import { renderHtmlOrText } from "@theme";
|
|
3
|
+
import { renderHtmlOrText } from "@rspress/core/theme";
|
|
4
4
|
function isUrlOrPath(str) {
|
|
5
5
|
return str.startsWith('/') || str.startsWith('./') || str.startsWith('../') || str.startsWith('http://') || str.startsWith('https://') || str.startsWith('data:');
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ThemeContext, useSite } from "@rspress/core/runtime";
|
|
3
|
-
import { IconMoon, IconSun, SvgWrapper } from "@theme";
|
|
3
|
+
import { IconMoon, IconSun, SvgWrapper } from "@rspress/core/theme";
|
|
4
4
|
import { useContext } from "react";
|
|
5
5
|
import "./global.css";
|
|
6
6
|
import "./index.css";
|
|
@@ -6,13 +6,7 @@
|
|
|
6
6
|
margin: 1rem 0;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.rp-tabs .rp-
|
|
10
|
-
border: none;
|
|
11
|
-
border-radius: 0;
|
|
12
|
-
margin: 0;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.rp-tabs .rp-codeblock .rp-codeblock__title {
|
|
9
|
+
.rp-tabs .rp-codeblock__title {
|
|
16
10
|
padding: 8px 12px;
|
|
17
11
|
}
|
|
18
12
|
|
|
@@ -38,9 +32,10 @@
|
|
|
38
32
|
word-break: keep-all;
|
|
39
33
|
color: var(--rp-c-text-2);
|
|
40
34
|
box-sizing: border-box;
|
|
35
|
+
-webkit-user-select: none;
|
|
41
36
|
user-select: none;
|
|
42
37
|
cursor: pointer;
|
|
43
|
-
border-radius: calc(1.5
|
|
38
|
+
border-radius: calc(1.5*var(--rp-radius-small));
|
|
44
39
|
margin-right: 4px;
|
|
45
40
|
padding: 4px 12px;
|
|
46
41
|
font-size: .875rem;
|
|
@@ -62,6 +57,17 @@
|
|
|
62
57
|
box-shadow: 0px 0px 3px 0px var(--rp-c-divider);
|
|
63
58
|
}
|
|
64
59
|
|
|
60
|
+
.rp-tabs__content__item {
|
|
61
|
+
padding: 0 1rem;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.rp-tabs__content__item > .rp-codeblock:only-child, .rp-tabs__content__item > .rp-tabs:only-child {
|
|
65
|
+
box-shadow: none;
|
|
66
|
+
border: none;
|
|
67
|
+
border-radius: 0;
|
|
68
|
+
margin: 0 -1rem;
|
|
69
|
+
}
|
|
70
|
+
|
|
65
71
|
.rp-tabs__content__item--active {
|
|
66
72
|
display: block;
|
|
67
73
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useStorageValue } from "@theme";
|
|
2
|
+
import { useStorageValue } from "@rspress/core/theme";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { Children, forwardRef, isValidElement, useMemo, useState } from "react";
|
|
5
5
|
import "./index.css";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { isDataUrl, isExternalUrl } from "@rspress/core/runtime";
|
|
3
|
-
import { Badge, IconDeprecated, IconExperimental, SvgWrapper, Tag } from "@theme";
|
|
3
|
+
import { Badge, IconDeprecated, IconExperimental, SvgWrapper, Tag } from "@rspress/core/theme";
|
|
4
4
|
import { useMemo } from "react";
|
|
5
5
|
const BADGE_TAGS = {
|
|
6
6
|
tip: 'tip',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Link, parseInlineMarkdownText, renderInlineMarkdown } from "@theme";
|
|
2
|
+
import { Link, parseInlineMarkdownText, renderInlineMarkdown } from "@rspress/core/theme";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import "./TocItem.css";
|
|
5
5
|
import { useEffect, useRef } from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useActiveAnchor, useDynamicToc } from "@theme";
|
|
2
|
+
import { useActiveAnchor, useDynamicToc } from "@rspress/core/theme";
|
|
3
3
|
import { TocItem } from "./TocItem.js";
|
|
4
4
|
const baseHeaderLevel = 2;
|
|
5
5
|
function Toc() {
|
package/dist/theme/index.js
CHANGED
|
@@ -1,68 +1,67 @@
|
|
|
1
|
-
import { Badge } from "./components/Badge/index.js";
|
|
2
|
-
import { Banner } from "./components/Banner/index.js";
|
|
3
|
-
import { Button } from "./components/Button/index.js";
|
|
4
|
-
import { Callout } from "./components/Callout/index.js";
|
|
5
|
-
import { CodeBlock } from "./components/CodeBlock/index.js";
|
|
6
|
-
import { CodeBlockRuntime } from "./components/CodeBlockRuntime/index.js";
|
|
7
|
-
import { CodeButtonGroup, useCodeButtonGroup } from "./components/CodeButtonGroup/index.js";
|
|
8
|
-
import { getCustomMDXComponent } from "./components/DocContent/docComponents/index.js";
|
|
9
|
-
import { DocContent } from "./components/DocContent/index.js";
|
|
10
|
-
import { DocFooter } from "./components/DocFooter/index.js";
|
|
11
|
-
import { EditLink } from "./components/EditLink/index.js";
|
|
12
|
-
import { useEditLink } from "./components/EditLink/useEditLink.js";
|
|
13
|
-
import { FallbackHeading } from "./components/FallbackHeading/index.js";
|
|
14
|
-
import { HomeBackground } from "./components/HomeBackground/index.js";
|
|
15
|
-
import { HomeFeature } from "./components/HomeFeature/index.js";
|
|
16
|
-
import { HomeFooter } from "./components/HomeFooter/index.js";
|
|
17
|
-
import { HomeHero } from "./components/HomeHero/index.js";
|
|
18
|
-
import { HoverGroup } from "./components/HoverGroup/index.js";
|
|
19
|
-
import { useHoverGroup } from "./components/HoverGroup/useHoverGroup.js";
|
|
20
|
-
import { LastUpdated } from "./components/LastUpdated/index.js";
|
|
21
|
-
import { Link } from "./components/Link/index.js";
|
|
22
|
-
import { useLinkNavigate } from "./components/Link/useLinkNavigate.js";
|
|
23
|
-
import { LlmsContainer, LlmsCopyButton, LlmsViewOptions, useMdUrl } from "./components/Llms/index.js";
|
|
24
|
-
import { LlmsCopyRow } from "./components/Llms/LlmsCopyRow.js";
|
|
25
|
-
import { LlmsOpenRow } from "./components/Llms/LlmsOpenRow.js";
|
|
26
|
-
import { Nav } from "./components/Nav/index.js";
|
|
27
|
-
import { NavHamburger } from "./components/NavHamburger/index.js";
|
|
28
|
-
import { NavTitle } from "./components/NavTitle/index.js";
|
|
29
|
-
import { Outline } from "./components/Outline/index.js";
|
|
30
|
-
import { Overview } from "./components/Overview/index.js";
|
|
31
|
-
import { OverviewGroup } from "./components/OverviewGroup/index.js";
|
|
32
|
-
import { PackageManagerTabs } from "./components/PackageManagerTabs/index.js";
|
|
33
|
-
import { PageTab, PageTabs } from "./components/PageTabs/index.js";
|
|
34
|
-
import { PrevNextPage } from "./components/PrevNextPage/index.js";
|
|
35
|
-
import { ReadPercent } from "./components/ReadPercent/index.js";
|
|
36
|
-
import { useReadPercent } from "./components/ReadPercent/useReadPercent.js";
|
|
37
|
-
import { Root } from "./components/Root/index.js";
|
|
38
|
-
import { Search } from "./components/Search/index.js";
|
|
39
|
-
import { RenderType } from "./components/Search/logic/types.js";
|
|
40
|
-
import { SearchButton } from "./components/Search/SearchButton.js";
|
|
41
|
-
import { SearchPanel } from "./components/Search/SearchPanel.js";
|
|
42
|
-
import { Sidebar, SidebarList } from "./components/Sidebar/index.js";
|
|
43
|
-
import { SocialLinks } from "./components/SocialLinks/index.js";
|
|
44
|
-
import { SourceCode } from "./components/SourceCode/index.js";
|
|
45
|
-
import { Steps } from "./components/Steps/index.js";
|
|
46
|
-
import { SvgWrapper } from "./components/SvgWrapper/index.js";
|
|
47
|
-
import { SwitchAppearance } from "./components/SwitchAppearance/index.js";
|
|
48
|
-
import { Tab, Tabs } from "./components/Tabs/index.js";
|
|
49
|
-
import { Tag } from "./components/Tag/index.js";
|
|
50
|
-
import { Toc } from "./components/Toc/index.js";
|
|
51
|
-
import { useActiveAnchor } from "./hooks/useActiveAnchor.js";
|
|
52
|
-
import { useDynamicToc, useWatchToc } from "./hooks/useDynamicToc.js";
|
|
53
|
-
import { DocLayout } from "./layout/DocLayout/index.js";
|
|
54
|
-
import { HomeLayout } from "./layout/HomeLayout/index.js";
|
|
55
|
-
import { Layout } from "./layout/Layout/index.js";
|
|
56
|
-
import { NotFoundLayout } from "./layout/NotFountLayout/index.js";
|
|
57
|
-
import { mergeRefs } from "./logic/mergeRefs.js";
|
|
58
|
-
import { useFullTextSearch } from "./logic/useFullTextSearch.js";
|
|
59
|
-
import { usePrevNextPage } from "./logic/usePrevNextPage.js";
|
|
60
|
-
import { useRedirect4FirstVisit } from "./logic/useRedirect4FirstVisit.js";
|
|
61
|
-
import { useScrollAfterNav } from "./logic/useScrollAfterNav.js";
|
|
62
|
-
import { useScrollReset } from "./logic/useScrollReset.js";
|
|
63
|
-
import { useSetup } from "./logic/useSetup.js";
|
|
64
|
-
import { useStorageValue } from "./logic/useStorageValue.js";
|
|
65
|
-
import { useThemeState } from "./logic/useThemeState.js";
|
|
66
|
-
import { parseInlineMarkdownText, renderHtmlOrText, renderInlineMarkdown } from "./logic/utils.js";
|
|
67
1
|
export * from "./icons.js";
|
|
68
|
-
export { Badge
|
|
2
|
+
export { Badge } from "./components/Badge/index.js";
|
|
3
|
+
export { Banner } from "./components/Banner/index.js";
|
|
4
|
+
export { Button } from "./components/Button/index.js";
|
|
5
|
+
export { Callout } from "./components/Callout/index.js";
|
|
6
|
+
export { CodeBlock } from "./components/CodeBlock/index.js";
|
|
7
|
+
export { CodeBlockRuntime } from "./components/CodeBlockRuntime/index.js";
|
|
8
|
+
export { CodeButtonGroup, useCodeButtonGroup } from "./components/CodeButtonGroup/index.js";
|
|
9
|
+
export { getCustomMDXComponent } from "./components/DocContent/docComponents/index.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 } from "./components/HomeHero/index.js";
|
|
19
|
+
export { HoverGroup } from "./components/HoverGroup/index.js";
|
|
20
|
+
export { useHoverGroup } from "./components/HoverGroup/useHoverGroup.js";
|
|
21
|
+
export { LastUpdated } from "./components/LastUpdated/index.js";
|
|
22
|
+
export { Link } from "./components/Link/index.js";
|
|
23
|
+
export { useLinkNavigate } from "./components/Link/useLinkNavigate.js";
|
|
24
|
+
export { LlmsContainer, LlmsCopyButton, LlmsViewOptions, useMdUrl } from "./components/Llms/index.js";
|
|
25
|
+
export { LlmsCopyRow } from "./components/Llms/LlmsCopyRow.js";
|
|
26
|
+
export { LlmsOpenRow } from "./components/Llms/LlmsOpenRow.js";
|
|
27
|
+
export { Nav } from "./components/Nav/index.js";
|
|
28
|
+
export { NavHamburger } from "./components/NavHamburger/index.js";
|
|
29
|
+
export { NavTitle } from "./components/NavTitle/index.js";
|
|
30
|
+
export { Outline } from "./components/Outline/index.js";
|
|
31
|
+
export { Overview } from "./components/Overview/index.js";
|
|
32
|
+
export { OverviewGroup } from "./components/OverviewGroup/index.js";
|
|
33
|
+
export { PackageManagerTabs } from "./components/PackageManagerTabs/index.js";
|
|
34
|
+
export { PageTab, PageTabs } from "./components/PageTabs/index.js";
|
|
35
|
+
export { PrevNextPage } from "./components/PrevNextPage/index.js";
|
|
36
|
+
export { ReadPercent } from "./components/ReadPercent/index.js";
|
|
37
|
+
export { useReadPercent } from "./components/ReadPercent/useReadPercent.js";
|
|
38
|
+
export { Root } from "./components/Root/index.js";
|
|
39
|
+
export { Search } from "./components/Search/index.js";
|
|
40
|
+
export { RenderType } from "./components/Search/logic/types.js";
|
|
41
|
+
export { SearchButton } from "./components/Search/SearchButton.js";
|
|
42
|
+
export { SearchPanel } from "./components/Search/SearchPanel.js";
|
|
43
|
+
export { Sidebar, SidebarList } from "./components/Sidebar/index.js";
|
|
44
|
+
export { SocialLinks } from "./components/SocialLinks/index.js";
|
|
45
|
+
export { SourceCode } from "./components/SourceCode/index.js";
|
|
46
|
+
export { Steps } from "./components/Steps/index.js";
|
|
47
|
+
export { SvgWrapper } from "./components/SvgWrapper/index.js";
|
|
48
|
+
export { SwitchAppearance } from "./components/SwitchAppearance/index.js";
|
|
49
|
+
export { Tab, Tabs } from "./components/Tabs/index.js";
|
|
50
|
+
export { Tag } from "./components/Tag/index.js";
|
|
51
|
+
export { Toc } from "./components/Toc/index.js";
|
|
52
|
+
export { useActiveAnchor } from "./hooks/useActiveAnchor.js";
|
|
53
|
+
export { useDynamicToc, useWatchToc } from "./hooks/useDynamicToc.js";
|
|
54
|
+
export { DocLayout } from "./layout/DocLayout/index.js";
|
|
55
|
+
export { HomeLayout } from "./layout/HomeLayout/index.js";
|
|
56
|
+
export { Layout } from "./layout/Layout/index.js";
|
|
57
|
+
export { NotFoundLayout } from "./layout/NotFountLayout/index.js";
|
|
58
|
+
export { mergeRefs } from "./logic/mergeRefs.js";
|
|
59
|
+
export { useFullTextSearch } from "./logic/useFullTextSearch.js";
|
|
60
|
+
export { usePrevNextPage } from "./logic/usePrevNextPage.js";
|
|
61
|
+
export { useRedirect4FirstVisit } from "./logic/useRedirect4FirstVisit.js";
|
|
62
|
+
export { useScrollAfterNav } from "./logic/useScrollAfterNav.js";
|
|
63
|
+
export { useScrollReset } from "./logic/useScrollReset.js";
|
|
64
|
+
export { useSetup } from "./logic/useSetup.js";
|
|
65
|
+
export { useStorageValue } from "./logic/useStorageValue.js";
|
|
66
|
+
export { useThemeState } from "./logic/useThemeState.js";
|
|
67
|
+
export { parseInlineMarkdownText, renderHtmlOrText, renderInlineMarkdown } from "./logic/utils.js";
|
|
@@ -53,12 +53,12 @@
|
|
|
53
53
|
width: var(--rp-sidebar-width);
|
|
54
54
|
max-width: var(--rp-sidebar-width);
|
|
55
55
|
min-width: var(--rp-sidebar-width);
|
|
56
|
-
height: calc(100vh - var(--rp-nav-height)
|
|
57
|
-
max-height: calc(100vh - var(--rp-nav-height)
|
|
56
|
+
height: calc(100vh - var(--rp-nav-height) - var(--rp-banner-height, 0px));
|
|
57
|
+
max-height: calc(100vh - var(--rp-nav-height) - var(--rp-banner-height, 0px));
|
|
58
58
|
padding: var(--rp-sidebar-padding);
|
|
59
59
|
border-right: 1px solid var(--rp-c-divider-light);
|
|
60
|
-
margin-top: calc(-1
|
|
61
|
-
top: calc(var(--rp-nav-height)
|
|
60
|
+
margin-top: calc(-1*var(--rp-sidebar-menu-height));
|
|
61
|
+
top: calc(var(--rp-nav-height) + var(--rp-banner-height, 0px));
|
|
62
62
|
z-index: var(--rp-z-index-sidebar);
|
|
63
63
|
background: var(--rp-c-bg);
|
|
64
64
|
position: sticky;
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
|
|
74
74
|
.rp-doc-layout__outline {
|
|
75
75
|
width: var(--rp-outline-width);
|
|
76
|
-
top: calc(var(--rp-nav-height)
|
|
76
|
+
top: calc(var(--rp-nav-height) + var(--rp-banner-height, 0px));
|
|
77
77
|
margin-top: var(--rp-sidebar-menu-height);
|
|
78
78
|
z-index: var(--rp-z-index-aside);
|
|
79
79
|
padding-top: var(--rp-content-padding-y);
|
|
80
|
-
height: calc(100vh - var(--rp-nav-height)
|
|
80
|
+
height: calc(100vh - var(--rp-nav-height) - var(--rp-banner-height, 0px));
|
|
81
81
|
box-shadow: var(--rp-shadow-1);
|
|
82
82
|
position: sticky;
|
|
83
83
|
right: 0;
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
.rp-doc-layout__menu {
|
|
88
|
-
top: calc(var(--rp-nav-height)
|
|
88
|
+
top: calc(var(--rp-nav-height) + var(--rp-banner-height, 0px));
|
|
89
89
|
z-index: var(--rp-z-index-sidebar-menu);
|
|
90
90
|
height: var(--rp-sidebar-menu-height);
|
|
91
91
|
position: sticky;
|
|
@@ -101,13 +101,13 @@
|
|
|
101
101
|
|
|
102
102
|
@media (width >= 1280px) {
|
|
103
103
|
.rp-doc-layout__doc {
|
|
104
|
-
max-width: min(100%,
|
|
104
|
+
max-width: min(100%,var(--rp-content-max-width));
|
|
105
105
|
flex: 1;
|
|
106
106
|
overflow-x: auto;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
.rp-doc-layout__doc--wide {
|
|
110
|
-
max-width: min(100%,
|
|
110
|
+
max-width: min(100%,var(--rp-content-max-width) + var(--rp-sidebar-width) + var(--rp-outline-width));
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
.rp-doc-layout__sidebar {
|
|
@@ -167,9 +167,9 @@
|
|
|
167
167
|
|
|
168
168
|
.rp-doc-layout__sidebar {
|
|
169
169
|
z-index: var(--rp-z-index-sidebar);
|
|
170
|
-
top: calc(var(--rp-nav-height)
|
|
170
|
+
top: calc(var(--rp-nav-height) + var(--rp-banner-height, 0px));
|
|
171
171
|
height: calc(100vh - var(--rp-nav-height));
|
|
172
|
-
padding: var(--rp-sidebar-padding) var(--rp-sidebar-padding) calc(var(--rp-sidebar-padding)
|
|
172
|
+
padding: var(--rp-sidebar-padding) var(--rp-sidebar-padding) calc(var(--rp-sidebar-padding) + 100px) var(--rp-sidebar-padding);
|
|
173
173
|
background: var(--rp-c-bg);
|
|
174
174
|
opacity: 0;
|
|
175
175
|
margin-top: 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useFrontmatter } from "@rspress/core/runtime";
|
|
3
|
-
import { DocContent, DocFooter, Outline, Overview, Sidebar, useWatchToc } from "@theme";
|
|
3
|
+
import { DocContent, DocFooter, Outline, Overview, Sidebar, useWatchToc } from "@rspress/core/theme";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { useSidebarMenu } from "../../components/SidebarMenu/useSidebarMenu.js";
|
|
6
6
|
import "./index.css";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useFrontmatter } from "@rspress/core/runtime";
|
|
3
|
-
import { HomeBackground, HomeFeature, HomeFooter, HomeHero } from "@theme";
|
|
3
|
+
import { HomeBackground, HomeFeature, HomeFooter, HomeHero } from "@rspress/core/theme";
|
|
4
4
|
function HomeLayoutMarkdown() {
|
|
5
5
|
const { frontmatter } = useFrontmatter();
|
|
6
6
|
const hero = frontmatter?.hero;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { HomeLayoutProps } from '@theme';
|
|
2
|
-
import { type DocLayoutProps, type NavProps } from '@theme';
|
|
1
|
+
import type { HomeLayoutProps } from '@rspress/core/theme';
|
|
2
|
+
import { type DocLayoutProps, type NavProps } from '@rspress/core/theme';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
export type LayoutProps = {
|
|
5
5
|
top?: React.ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Content, useFrontmatter, useLocaleSiteData, usePage, useSite } from "@rspress/core/runtime";
|
|
3
|
-
import { DocLayout, HomeLayout as
|
|
3
|
+
import { DocLayout, HomeLayout as theme_HomeLayout, Nav, NotFoundLayout as theme_NotFoundLayout, useRedirect4FirstVisit, useScrollReset, useSetup } from "@rspress/core/theme";
|
|
4
4
|
import { Head, useHead } from "@unhead/react";
|
|
5
5
|
import react, { memo, useMemo } from "react";
|
|
6
6
|
const concatTitle = (title, suffix)=>{
|
|
@@ -18,26 +18,36 @@ const HeadTags = /*#__PURE__*/ memo((props)=>{
|
|
|
18
18
|
}) : null), [
|
|
19
19
|
head
|
|
20
20
|
]);
|
|
21
|
+
const frontmatterMetaProperties = useMemo(()=>{
|
|
22
|
+
const properties = new Set();
|
|
23
|
+
if (head) for (const [tagName, attrs] of head){
|
|
24
|
+
if ('meta' === tagName && attrs?.property) properties.add(attrs.property);
|
|
25
|
+
if ('meta' === tagName && attrs?.name) properties.add(attrs.name);
|
|
26
|
+
}
|
|
27
|
+
return properties;
|
|
28
|
+
}, [
|
|
29
|
+
head
|
|
30
|
+
]);
|
|
21
31
|
useHead({
|
|
22
32
|
htmlAttrs: {
|
|
23
33
|
lang: lang || 'en'
|
|
24
34
|
},
|
|
25
35
|
title: title || void 0,
|
|
26
36
|
meta: [
|
|
27
|
-
{
|
|
37
|
+
frontmatterMetaProperties.has('og:type') ? void 0 : {
|
|
28
38
|
property: 'og:type',
|
|
29
39
|
content: 'website'
|
|
30
40
|
},
|
|
31
|
-
title ? {
|
|
41
|
+
title && !frontmatterMetaProperties.has('og:title') ? {
|
|
32
42
|
property: 'og:title',
|
|
33
43
|
content: title
|
|
34
44
|
} : void 0,
|
|
35
45
|
...description ? [
|
|
36
|
-
{
|
|
46
|
+
frontmatterMetaProperties.has("description") ? void 0 : {
|
|
37
47
|
name: "description",
|
|
38
48
|
content: description
|
|
39
49
|
},
|
|
40
|
-
{
|
|
50
|
+
frontmatterMetaProperties.has("og:description") ? void 0 : {
|
|
41
51
|
property: "og:description",
|
|
42
52
|
content: description
|
|
43
53
|
}
|
|
@@ -49,7 +59,7 @@ const HeadTags = /*#__PURE__*/ memo((props)=>{
|
|
|
49
59
|
});
|
|
50
60
|
});
|
|
51
61
|
function Layout(props) {
|
|
52
|
-
const { top, bottom, beforeDocFooter, afterDocFooter, beforeDoc, afterDoc, beforeDocContent, afterDocContent, beforeSidebar, afterSidebar, beforeOutline, afterOutline, beforeNavTitle, afterNavTitle, navTitle, beforeNav, afterNav, beforeHero, afterHero, beforeFeatures, afterFeatures, beforeNavMenu, afterNavMenu, components, HomeLayout =
|
|
62
|
+
const { top, bottom, beforeDocFooter, afterDocFooter, beforeDoc, afterDoc, beforeDocContent, afterDocContent, beforeSidebar, afterSidebar, beforeOutline, afterOutline, beforeNavTitle, afterNavTitle, navTitle, beforeNav, afterNav, beforeHero, afterHero, beforeFeatures, afterFeatures, beforeNavMenu, afterNavMenu, components, HomeLayout = theme_HomeLayout, NotFoundLayout = theme_NotFoundLayout } = props;
|
|
53
63
|
const docProps = {
|
|
54
64
|
beforeDocFooter,
|
|
55
65
|
afterDocFooter,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useI18n, usePageData } from "@rspress/core/runtime";
|
|
3
|
-
import { Link } from "@theme";
|
|
3
|
+
import { Link } from "@rspress/core/theme";
|
|
4
4
|
import "./index.css";
|
|
5
5
|
function NotFoundLayout() {
|
|
6
6
|
const { siteData, page } = usePageData();
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
html {
|
|
14
14
|
-webkit-text-size-adjust: 100%;
|
|
15
|
-
scroll-padding-top: calc(var(--rp-banner-height, 0px)
|
|
15
|
+
scroll-padding-top: calc(var(--rp-banner-height, 0px) + var(--rp-nav-height) +
|
|
16
|
+
var(--rp-sidebar-menu-height));
|
|
16
17
|
font-size: 16px;
|
|
17
18
|
line-height: 1.7;
|
|
18
19
|
}
|
|
@@ -28,7 +29,7 @@ body {
|
|
|
28
29
|
color: var(--rp-c-text-1);
|
|
29
30
|
background-color: var(--rp-c-bg);
|
|
30
31
|
font-synthesis: style;
|
|
31
|
-
text-rendering:
|
|
32
|
+
text-rendering: optimizelegibility;
|
|
32
33
|
-webkit-font-smoothing: antialiased;
|
|
33
34
|
-moz-osx-font-smoothing: grayscale;
|
|
34
35
|
direction: ltr;
|
|
@@ -38,12 +39,14 @@ body {
|
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
:root {
|
|
41
|
-
--rp-font-family-base: "Inter var experimental", "Inter var", -apple-system, BlinkMacSystemFont,
|
|
42
|
+
--rp-font-family-base: "Inter var experimental", "Inter var", -apple-system, BlinkMacSystemFont,
|
|
43
|
+
"Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans",
|
|
44
|
+
"Helvetica Neue", sans-serif;
|
|
42
45
|
--rp-font-family-mono: Menlo, Monaco, Consolas, "Courier New", monospace;
|
|
43
46
|
text-autospace: normal;
|
|
44
47
|
}
|
|
45
48
|
|
|
46
|
-
pre {
|
|
49
|
+
pre, code, kbd, samp {
|
|
47
50
|
text-autospace: no-autospace;
|
|
48
51
|
}
|
|
49
52
|
|
|
@@ -27,6 +27,7 @@ hr {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
abbr:where([title]) {
|
|
30
|
+
-webkit-text-decoration: underline dotted;
|
|
30
31
|
text-decoration: underline dotted;
|
|
31
32
|
}
|
|
32
33
|
|
|
@@ -37,6 +38,7 @@ h1, h2, h3, h4, h5, h6 {
|
|
|
37
38
|
|
|
38
39
|
a {
|
|
39
40
|
color: inherit;
|
|
41
|
+
-webkit-text-decoration: inherit;
|
|
40
42
|
text-decoration: inherit;
|
|
41
43
|
}
|
|
42
44
|
|
|
@@ -1,16 +1,40 @@
|
|
|
1
1
|
:where(html:not(.rp-dark)) {
|
|
2
2
|
--rp-home-hero-secondary-color: #a673ff;
|
|
3
3
|
--rp-home-hero-title-color: transparent;
|
|
4
|
-
--rp-home-hero-title-bg: linear-gradient(90deg,
|
|
5
|
-
|
|
4
|
+
--rp-home-hero-title-bg: linear-gradient(90deg,
|
|
5
|
+
var(--rp-c-brand-dark) 0%,
|
|
6
|
+
var(--rp-c-brand-dark) 30%,
|
|
7
|
+
var(--rp-home-hero-secondary-color) 100%);
|
|
8
|
+
--rp-home-background-bg: radial-gradient(42.12% 56.13% at 100% 0%,
|
|
9
|
+
#537dff1a 0%,
|
|
10
|
+
#fff0 100%),
|
|
11
|
+
radial-gradient(42.01% 79.63% at 52.86% 0%,
|
|
12
|
+
#537dff33 0%,
|
|
13
|
+
#fff0 100%),
|
|
14
|
+
radial-gradient(79.67% 58.09% at 0% 0%,
|
|
15
|
+
#7e69ff33 0%,
|
|
16
|
+
#fff0 100%),
|
|
17
|
+
#fff;
|
|
6
18
|
--rp-home-feature-bg: linear-gradient(135deg, #fff, #f9f9f980);
|
|
7
19
|
}
|
|
8
20
|
|
|
9
21
|
:where(html.rp-dark) {
|
|
10
22
|
--rp-home-hero-secondary-color: #a673ff;
|
|
11
23
|
--rp-home-hero-title-color: transparent;
|
|
12
|
-
--rp-home-hero-title-bg: linear-gradient(90deg,
|
|
13
|
-
|
|
24
|
+
--rp-home-hero-title-bg: linear-gradient(90deg,
|
|
25
|
+
var(--rp-c-brand-dark) 0%,
|
|
26
|
+
var(--rp-c-brand-dark) 30%,
|
|
27
|
+
var(--rp-home-hero-secondary-color) 100%);
|
|
28
|
+
--rp-home-background-bg: radial-gradient(42.12% 56.13% at 100% 0%,
|
|
29
|
+
#0c1d48 0%,
|
|
30
|
+
#12121200 100%),
|
|
31
|
+
radial-gradient(55.81% 87.78% at 48.37% 0%,
|
|
32
|
+
#000 0%,
|
|
33
|
+
#12121200 89.55%),
|
|
34
|
+
radial-gradient(122.65% 88.24% at 0% 0%,
|
|
35
|
+
#34268a 0%,
|
|
36
|
+
#12121200 100%),
|
|
37
|
+
#121212;
|
|
14
38
|
--rp-home-feature-bg: linear-gradient(135deg, #fff0, #ffffff08);
|
|
15
39
|
}
|
|
16
40
|
|