@rspress/core 2.0.0-rc.1 → 2.0.0-rc.3
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.723d12b2.js +1794 -0
- package/dist/3521.56e42d70.js +56 -0
- package/dist/4669.12208c6a.js +2 -0
- package/dist/5485.077f14ff.js +98 -0
- package/dist/6289.c67fe0d5.js +5 -0
- package/dist/8813.9da1f210.js +2 -0
- package/dist/9643.f109822d.js +5 -0
- package/dist/_private/react/render.js +17 -4
- 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/Badge/index.scss +1 -0
- package/dist/eject-theme/components/Banner/index.tsx +6 -5
- package/dist/eject-theme/components/Callout/index.scss +0 -2
- package/dist/eject-theme/components/Callout/index.tsx +8 -2
- package/dist/eject-theme/components/CodeBlock/index.scss +12 -18
- package/dist/eject-theme/components/CodeBlock/index.tsx +10 -1
- package/dist/eject-theme/components/CodeBlockRuntime/index.tsx +50 -11
- 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 +27 -7
- package/dist/eject-theme/components/DocContent/docComponents/pre.tsx +2 -1
- package/dist/eject-theme/components/DocContent/docComponents/table.tsx +10 -4
- package/dist/eject-theme/components/DocContent/index.tsx +21 -4
- package/dist/eject-theme/components/DocFooter/index.tsx +1 -6
- package/dist/eject-theme/components/{DocContent/FallbackHeading.tsx → FallbackHeading/index.tsx} +20 -11
- package/dist/eject-theme/components/HoverGroup/index.scss +1 -1
- package/dist/eject-theme/components/LastUpdated/index.tsx +8 -1
- package/dist/eject-theme/components/Link/index.tsx +22 -6
- package/dist/eject-theme/components/Nav/NavMenu.tsx +2 -3
- package/dist/eject-theme/components/NavHamburger/index.tsx +3 -4
- package/dist/eject-theme/components/NavScreen/NavScreenLangs.scss +6 -0
- package/dist/eject-theme/components/NavScreen/NavScreenLangs.tsx +23 -9
- package/dist/eject-theme/components/NavScreen/NavScreenMenuItem.tsx +2 -3
- package/dist/eject-theme/components/NavScreen/NavScreenVersions.scss +6 -0
- package/dist/eject-theme/components/NavScreen/NavScreenVersions.tsx +22 -9
- package/dist/eject-theme/components/Overview/index.tsx +7 -8
- package/dist/eject-theme/components/{Overview/OverviewGroup.scss → OverviewGroup/index.scss} +66 -12
- package/dist/eject-theme/components/{Overview/OverviewGroup.tsx → OverviewGroup/index.tsx} +51 -5
- 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 +12 -7
- package/dist/eject-theme/components/Search/SuggestItem.tsx +15 -12
- package/dist/eject-theme/components/Search/logic/util.test.ts +1 -1
- package/dist/eject-theme/components/Sidebar/SidebarGroup.tsx +2 -3
- package/dist/eject-theme/components/Sidebar/SidebarItem.tsx +1 -0
- 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.tsx +6 -4
- package/dist/eject-theme/components/SwitchAppearance/index.tsx +3 -5
- package/dist/eject-theme/components/Tabs/index.scss +31 -26
- package/dist/eject-theme/components/Tabs/index.tsx +16 -0
- package/dist/eject-theme/components/Tag/index.tsx +84 -5
- package/dist/eject-theme/components/Toc/TocItem.scss +3 -3
- 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 +142 -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 +230 -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 +2 -0
- package/dist/node/constants.js +34 -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 +346 -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} +4 -3
- package/dist/node/mdx/options.d.ts +2 -2
- package/dist/node/mdx/options.js +103 -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 +84 -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 +244 -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 +10 -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/initPageData.js +1 -1
- 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/deprecated.js +18 -0
- package/dist/theme/assets/experimental.js +21 -0
- package/dist/theme/components/Badge/index.css +1 -0
- package/dist/theme/components/Banner/index.d.ts +1 -1
- package/dist/theme/components/Banner/index.js +4 -5
- package/dist/theme/components/Callout/index.css +0 -2
- package/dist/theme/components/Callout/index.js +5 -2
- package/dist/theme/components/CodeBlock/index.css +11 -21
- package/dist/theme/components/CodeBlock/index.js +5 -1
- package/dist/theme/components/CodeBlockRuntime/index.d.ts +1 -1
- package/dist/theme/components/CodeBlockRuntime/index.js +38 -8
- 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 +28 -7
- package/dist/theme/components/DocContent/docComponents/index.d.ts +3 -3
- package/dist/theme/components/DocContent/docComponents/pre.js +3 -1
- 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.d.ts +11 -2
- package/dist/theme/components/DocContent/index.js +6 -6
- package/dist/theme/components/DocFooter/index.js +1 -5
- package/dist/theme/components/{DocContent/FallbackHeading.js → FallbackHeading/index.js} +19 -11
- package/dist/theme/components/HoverGroup/index.css +3 -3
- package/dist/theme/components/HoverGroup/useHoverGroup.d.ts +1 -1
- package/dist/theme/components/LastUpdated/index.d.ts +1 -1
- package/dist/theme/components/LastUpdated/index.js +5 -1
- package/dist/theme/components/Link/index.d.ts +1 -1
- package/dist/theme/components/Link/index.js +17 -7
- package/dist/theme/components/Nav/NavMenu.js +2 -3
- package/dist/theme/components/NavHamburger/index.js +3 -4
- package/dist/theme/components/NavScreen/NavScreenLangs.css +6 -0
- package/dist/theme/components/NavScreen/NavScreenLangs.js +13 -3
- package/dist/theme/components/NavScreen/NavScreenMenuItem.js +2 -3
- package/dist/theme/components/NavScreen/NavScreenVersions.css +6 -0
- package/dist/theme/components/NavScreen/NavScreenVersions.js +12 -3
- package/dist/theme/components/Overview/index.d.ts +0 -1
- package/dist/theme/components/Overview/index.js +2 -3
- package/dist/theme/components/{Overview/OverviewGroup.css → OverviewGroup/index.css} +60 -8
- package/dist/theme/components/{Overview/OverviewGroup.d.ts → OverviewGroup/index.d.ts} +1 -1
- package/dist/theme/components/OverviewGroup/index.js +88 -0
- 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 +12 -15
- 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/Search/logic/util.test.js +1 -1
- package/dist/theme/components/Sidebar/SidebarGroup.js +2 -3
- package/dist/theme/components/Sidebar/SidebarItem.js +1 -0
- package/dist/theme/components/SidebarMenu/index.js +3 -5
- package/dist/theme/components/SocialLinks/index.js +2 -3
- 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 +19 -27
- package/dist/theme/components/Tabs/index.js +9 -0
- package/dist/theme/components/Tag/index.d.ts +3 -0
- package/dist/theme/components/Tag/index.js +63 -8
- package/dist/theme/components/Toc/TocItem.css +2 -3
- package/dist/theme/components/Toc/TocItem.js +1 -0
- package/dist/theme/hooks/useActiveAnchor.js +1 -1
- package/dist/theme/icons.d.ts +27 -0
- package/dist/theme/icons.js +51 -0
- package/dist/theme/index.d.ts +64 -59
- package/dist/theme/index.js +7 -2
- package/dist/theme/layout/DocLayout/index.css +2 -4
- package/dist/theme/layout/Layout/index.js +1 -2
- package/dist/theme/layout/NotFountLayout/index.js +1 -1
- package/dist/theme/logic/useAppearance.js +1 -1
- package/dist/theme/logic/useFullTextSearch.d.ts +1 -1
- package/dist/theme/logic/useMediaQuery.js +1 -1
- package/dist/theme/styles/base.css +1 -0
- package/dist/theme/styles/scrollbar.css +1 -0
- package/dist/theme/styles/shiki.css +9 -3
- package/dist/theme/styles/vars/base-vars.css +7 -5
- package/dist/theme/styles/vars/code-vars.css +2 -0
- package/dist/theme/styles/vars/home-vars.css +2 -1
- package/package.json +22 -23
- package/dist/3~128.js +0 -74
- package/dist/3~517.js +0 -1786
- package/dist/3~894.js +0 -26
- 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/Overview/OverviewGroup.js +0 -58
- 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/eject-theme/components/{Overview → OverviewGroup}/icons/plugin.svg +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/components/{Overview → OverviewGroup}/icons/plugin.js +0 -0
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,59 +1,64 @@
|
|
|
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/OverviewGroup/index.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 { useScrollAfterNav } from './logic/useScrollAfterNav.js';
|
|
61
|
+
export { useScrollReset } from './logic/useScrollReset.js';
|
|
62
|
+
export { useSetup } from './logic/useSetup.js';
|
|
63
|
+
export { useStorageValue } from './logic/useStorageValue.js';
|
|
64
|
+
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";
|
|
@@ -23,11 +24,12 @@ import { Nav } from "./components/Nav/index.js";
|
|
|
23
24
|
import { NavHamburger } from "./components/NavHamburger/index.js";
|
|
24
25
|
import { Outline } from "./components/Outline/index.js";
|
|
25
26
|
import { Overview } from "./components/Overview/index.js";
|
|
26
|
-
import { OverviewGroup } from "./components/
|
|
27
|
+
import { OverviewGroup } from "./components/OverviewGroup/index.js";
|
|
27
28
|
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";
|
|
@@ -52,7 +54,10 @@ import { useThemeState } from "./logic/useAppearance.js";
|
|
|
52
54
|
import { useFullTextSearch } from "./logic/useFullTextSearch.js";
|
|
53
55
|
import { usePrevNextPage } from "./logic/usePrevNextPage.js";
|
|
54
56
|
import { useRedirect4FirstVisit } from "./logic/useRedirect4FirstVisit.js";
|
|
57
|
+
import { useScrollAfterNav } from "./logic/useScrollAfterNav.js";
|
|
58
|
+
import { useScrollReset } from "./logic/useScrollReset.js";
|
|
55
59
|
import { useSetup } from "./logic/useSetup.js";
|
|
56
60
|
import { useStorageValue } from "./logic/useStorageValue.js";
|
|
57
61
|
import { parseInlineMarkdownText, renderHtmlOrText, renderInlineMarkdown } from "./logic/utils.js";
|
|
58
|
-
export
|
|
62
|
+
export * from "./icons.js";
|
|
63
|
+
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, useScrollAfterNav, useScrollReset, useSetup, useStorageValue, useThemeState, useWatchToc };
|
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
.rp-doc-layout__overview {
|
|
45
45
|
width: 100%;
|
|
46
46
|
max-width: min(100%, 1280px);
|
|
47
|
-
min-height: 60vh;
|
|
48
47
|
padding: var(--rp-content-padding-y) var(--rp-content-padding-x);
|
|
49
48
|
position: relative;
|
|
50
49
|
overflow-x: auto;
|
|
@@ -69,7 +68,6 @@
|
|
|
69
68
|
}
|
|
70
69
|
|
|
71
70
|
.rp-doc-layout__doc-container {
|
|
72
|
-
min-height: 60vh;
|
|
73
71
|
padding: var(--rp-content-padding-y) var(--rp-content-padding-x);
|
|
74
72
|
}
|
|
75
73
|
|
|
@@ -143,10 +141,10 @@
|
|
|
143
141
|
background-color: color-mix(in srgb, var(--rp-c-bg) 60%, transparent);
|
|
144
142
|
backdrop-filter: blur(25px);
|
|
145
143
|
border-radius: var(--rp-radius-small);
|
|
146
|
-
|
|
144
|
+
max-width: 100%;
|
|
145
|
+
box-shadow: var(--rp-shadow-2);
|
|
147
146
|
visibility: hidden;
|
|
148
147
|
opacity: 0;
|
|
149
|
-
max-width: 100%;
|
|
150
148
|
padding: 20px 0;
|
|
151
149
|
transition: opacity .2s, transform .2s cubic-bezier(.19, 1, .22, 1);
|
|
152
150
|
position: fixed;
|
|
@@ -1,9 +1,8 @@
|
|
|
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, useRedirect4FirstVisit, useSetup } from "@theme";
|
|
3
|
+
import { DocLayout, HomeLayout as external_theme_HomeLayout, Nav, NotFoundLayout as external_theme_NotFoundLayout, useRedirect4FirstVisit, useScrollReset, useSetup } from "@theme";
|
|
4
4
|
import { Head, useHead } from "@unhead/react";
|
|
5
5
|
import react, { memo, useMemo } from "react";
|
|
6
|
-
import { useScrollReset } from "../../logic/useScrollReset.js";
|
|
7
6
|
const concatTitle = (title, suffix)=>{
|
|
8
7
|
if (!suffix) return title;
|
|
9
8
|
title = title.trim();
|
|
@@ -7,7 +7,7 @@ function NotFoundLayout() {
|
|
|
7
7
|
const defaultLang = siteData.lang;
|
|
8
8
|
const defaultVersion = siteData.multiVersion.default;
|
|
9
9
|
const t = useI18n();
|
|
10
|
-
if (defaultLang &&
|
|
10
|
+
if (defaultLang && "u" > typeof window) {
|
|
11
11
|
const regexp = new RegExp(`/${defaultLang}(\\/|$)`);
|
|
12
12
|
if (regexp.test(location.pathname)) {
|
|
13
13
|
const redirectUrl = location.pathname.replace(regexp, '/');
|
|
@@ -20,7 +20,7 @@ const useThemeState = ()=>{
|
|
|
20
20
|
return 'auto' === sanitized ? matchesDark ? 'dark' : 'light' : sanitized;
|
|
21
21
|
});
|
|
22
22
|
const [theme, setThemeInternal] = useState(()=>{
|
|
23
|
-
if (
|
|
23
|
+
if ("u" < typeof window) return 'light';
|
|
24
24
|
const defaultTheme = window.RSPRESS_THEME ?? window.MODERN_THEME;
|
|
25
25
|
if (defaultTheme) return 'dark' === defaultTheme ? 'dark' : 'light';
|
|
26
26
|
return getPreferredTheme();
|
|
@@ -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>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
2
|
const useMediaQuery = (query)=>{
|
|
3
|
-
const [matches, setMatches] = useState(()=>
|
|
3
|
+
const [matches, setMatches] = useState(()=>"u" > typeof window ? window.matchMedia(query).matches : false);
|
|
4
4
|
useEffect(()=>{
|
|
5
5
|
const mediaQueryList = window.matchMedia(query);
|
|
6
6
|
const listener = (e)=>setMatches(e.matches);
|
|
@@ -40,6 +40,7 @@ body {
|
|
|
40
40
|
:root {
|
|
41
41
|
--rp-font-family-base: "Inter var experimental", "Inter var", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
|
42
42
|
--rp-font-family-mono: Menlo, Monaco, Consolas, "Courier New", monospace;
|
|
43
|
+
text-autospace: normal;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
:root #nprogress .bar {
|
|
@@ -42,18 +42,24 @@
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
.shiki.has-highlighted .line.highlighted {
|
|
45
|
-
background-color: #0063c71a;
|
|
46
45
|
width: 100%;
|
|
47
46
|
display: inline-block;
|
|
48
47
|
position: static;
|
|
49
48
|
}
|
|
50
49
|
|
|
50
|
+
.shiki.has-highlighted .line.highlighted:not(.error):not(.warning) {
|
|
51
|
+
background-color: #3b82f61a;
|
|
52
|
+
box-shadow: inset 2px 0 #3b82f6;
|
|
53
|
+
}
|
|
54
|
+
|
|
51
55
|
.shiki.has-highlighted .line.highlighted.error {
|
|
52
|
-
background-color: #
|
|
56
|
+
background-color: #ed3c501a;
|
|
57
|
+
box-shadow: inset 2px 0 #ed3c50;
|
|
53
58
|
}
|
|
54
59
|
|
|
55
60
|
.shiki.has-highlighted .line.highlighted.warning {
|
|
56
|
-
background-color: #
|
|
61
|
+
background-color: #ffc5171a;
|
|
62
|
+
box-shadow: inset 2px 0 #ffc517;
|
|
57
63
|
}
|
|
58
64
|
|
|
59
65
|
.shiki.has-focused .line:not(.focused) {
|
|
@@ -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
|
|
|
@@ -39,8 +41,8 @@
|
|
|
39
41
|
--rp-c-gray-light-3: #d1d1d1;
|
|
40
42
|
--rp-c-gray-light-4: #e5e5e5;
|
|
41
43
|
--rp-c-gray-light-5: #f2f2f2;
|
|
42
|
-
--rp-shadow-1: 0 1px
|
|
43
|
-
--rp-shadow-2: 0 3px 12px #
|
|
44
|
+
--rp-shadow-1: 0 1px 2px #00000005, 0 1px 0 #0000000f;
|
|
45
|
+
--rp-shadow-2: 0 3px 12px #0000000f, 0 1px 4px #00000012;
|
|
44
46
|
--rp-shadow-3: 0 12px 32px #0000001a, 0 2px 6px #00000014;
|
|
45
47
|
--rp-shadow-4: 0 14px 44px #0000001f, 0 3px 9px #0000001f;
|
|
46
48
|
--rp-shadow-5: 0 18px 56px #00000029, 0 4px 12px #00000029;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
--rp-code-block-color: #2e3440;
|
|
5
5
|
--rp-code-block-bg: var(--rp-c-bg);
|
|
6
6
|
--rp-code-block-border: 1px solid var(--rp-c-divider-light);
|
|
7
|
+
--rp-code-block-shadow: var(--rp-shadow-1);
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
:where(html.rp-dark) {
|
|
@@ -12,5 +13,6 @@
|
|
|
12
13
|
--rp-code-block-color: #e5e7eb;
|
|
13
14
|
--rp-code-block-bg: var(--rp-c-bg);
|
|
14
15
|
--rp-code-block-border: 1px solid var(--rp-c-divider-light);
|
|
16
|
+
--rp-code-block-shadow: var(--rp-shadow-1);
|
|
15
17
|
}
|
|
16
18
|
|
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
:where(html.rp-dark) {
|
|
10
|
+
--rp-home-hero-secondary-color: #a673ff;
|
|
10
11
|
--rp-home-hero-title-color: transparent;
|
|
11
|
-
--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%);
|
|
12
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;
|
|
13
14
|
--rp-home-feature-bg: linear-gradient(135deg, #fff0, #ffffff08);
|
|
14
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.3",
|
|
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,10 +63,10 @@
|
|
|
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.15",
|
|
63
67
|
"@rsbuild/plugin-react": "~1.4.2",
|
|
64
68
|
"@rspress/mdx-rs": "0.6.6",
|
|
65
|
-
"@shikijs/rehype": "^3.
|
|
69
|
+
"@shikijs/rehype": "^3.20.0",
|
|
66
70
|
"@types/unist": "^3.0.3",
|
|
67
71
|
"@unhead/react": "^2.0.19",
|
|
68
72
|
"body-scroll-lock": "4.0.0-beta.0",
|
|
@@ -75,36 +79,37 @@
|
|
|
75
79
|
"hast-util-heading-rank": "^3.0.0",
|
|
76
80
|
"hast-util-to-jsx-runtime": "^2.3.6",
|
|
77
81
|
"html-to-text": "^9.0.5",
|
|
78
|
-
"lodash-es": "^4.17.
|
|
82
|
+
"lodash-es": "^4.17.22",
|
|
79
83
|
"mdast-util-mdx": "^3.0.0",
|
|
80
84
|
"mdast-util-mdxjs-esm": "^2.0.1",
|
|
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.3",
|
|
89
|
+
"react-dom": "^19.2.3",
|
|
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.11.0",
|
|
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
|
-
"shiki": "^3.
|
|
99
|
+
"shiki": "^3.20.0",
|
|
95
100
|
"tinyglobby": "^0.2.15",
|
|
96
101
|
"tinypool": "^1.1.1",
|
|
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.3",
|
|
106
|
+
"@rspress/shared": "2.0.0-rc.3"
|
|
102
107
|
},
|
|
103
108
|
"devDependencies": {
|
|
104
|
-
"@microsoft/api-extractor": "^7.55.
|
|
109
|
+
"@microsoft/api-extractor": "^7.55.2",
|
|
105
110
|
"@rsbuild/plugin-sass": "~1.4.0",
|
|
106
|
-
"@rsbuild/plugin-svgr": "^1.2.
|
|
107
|
-
"@rslib/core": "0.
|
|
111
|
+
"@rsbuild/plugin-svgr": "^1.2.3",
|
|
112
|
+
"@rslib/core": "0.18.5",
|
|
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,26 +117,20 @@
|
|
|
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.
|
|
120
|
+
"@types/react": "^19.2.7",
|
|
116
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.306",
|
|
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.51.
|
|
127
|
+
"memfs": "^4.51.1",
|
|
123
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
|
-
"tailwindcss": "^3.4.
|
|
133
|
+
"tailwindcss": "^3.4.19",
|
|
135
134
|
"ts-json-schema-generator": "^2.4.0",
|
|
136
135
|
"typescript": "^5.8.2",
|
|
137
136
|
"vfile": "^6.0.3",
|
package/dist/3~128.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import * as __WEBPACK_EXTERNAL_MODULE_child_process__ from "child_process";
|
|
2
|
-
import * as __WEBPACK_EXTERNAL_MODULE_fs__ from "fs";
|
|
3
|
-
import * as __WEBPACK_EXTERNAL_MODULE_node_buffer_fb286294__ from "node:buffer";
|
|
4
|
-
import * as __WEBPACK_EXTERNAL_MODULE_node_child_process_27f17141__ from "node:child_process";
|
|
5
|
-
import * as __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__ from "node:process";
|
|
6
|
-
import * as __WEBPACK_EXTERNAL_MODULE_node_timers_promises_aedbf14c__ from "node:timers/promises";
|
|
7
|
-
import * as __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__ from "node:util";
|
|
8
|
-
import * as __WEBPACK_EXTERNAL_MODULE_path__ from "path";
|
|
9
|
-
import * as __WEBPACK_EXTERNAL_MODULE_stream__ from "stream";
|
|
10
|
-
export const __webpack_id__ = "128";
|
|
11
|
-
export const __webpack_ids__ = [
|
|
12
|
-
"128"
|
|
13
|
-
];
|
|
14
|
-
export const __webpack_modules__ = {
|
|
15
|
-
"./src/node/last-updated/index.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
16
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
17
|
-
pluginLastUpdated: ()=>pluginLastUpdated
|
|
18
|
-
});
|
|
19
|
-
var execa__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/index.js");
|
|
20
|
-
function transform(timestamp, lang) {
|
|
21
|
-
return new Date(timestamp).toLocaleString(lang || 'zh');
|
|
22
|
-
}
|
|
23
|
-
async function getGitLastUpdatedTimeStamp(filePath) {
|
|
24
|
-
let lastUpdated;
|
|
25
|
-
try {
|
|
26
|
-
const { stdout } = await (0, execa__WEBPACK_IMPORTED_MODULE_0__.Ho)('git', [
|
|
27
|
-
'log',
|
|
28
|
-
'-1',
|
|
29
|
-
'--format=%at',
|
|
30
|
-
filePath
|
|
31
|
-
]);
|
|
32
|
-
lastUpdated = 1000 * Number(stdout);
|
|
33
|
-
} catch (_e) {}
|
|
34
|
-
return lastUpdated;
|
|
35
|
-
}
|
|
36
|
-
function pluginLastUpdated() {
|
|
37
|
-
return {
|
|
38
|
-
name: '@rspress/plugin-last-updated',
|
|
39
|
-
async extendPageData (pageData) {
|
|
40
|
-
const { _filepath, lang } = pageData;
|
|
41
|
-
const lastUpdated = await getGitLastUpdatedTimeStamp(_filepath);
|
|
42
|
-
if (lastUpdated) pageData.lastUpdatedTime = transform(lastUpdated, lang);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
child_process: function(module) {
|
|
48
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_child_process__;
|
|
49
|
-
},
|
|
50
|
-
fs: function(module) {
|
|
51
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_fs__;
|
|
52
|
-
},
|
|
53
|
-
"node:buffer": function(module) {
|
|
54
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_node_buffer_fb286294__;
|
|
55
|
-
},
|
|
56
|
-
"node:child_process": function(module) {
|
|
57
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_node_child_process_27f17141__;
|
|
58
|
-
},
|
|
59
|
-
"node:process": function(module) {
|
|
60
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__;
|
|
61
|
-
},
|
|
62
|
-
"node:timers/promises": function(module) {
|
|
63
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_node_timers_promises_aedbf14c__;
|
|
64
|
-
},
|
|
65
|
-
"node:util": function(module) {
|
|
66
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__;
|
|
67
|
-
},
|
|
68
|
-
path: function(module) {
|
|
69
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_path__;
|
|
70
|
-
},
|
|
71
|
-
stream: function(module) {
|
|
72
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_stream__;
|
|
73
|
-
}
|
|
74
|
-
};
|