@rspress/core 2.0.8 → 2.0.10
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~execa.js +8 -8
- package/dist/0~rslib-runtime.js +20 -0
- package/dist/0~tinypool.js +828 -0
- package/dist/{8311.js → 1688.js} +1 -7
- package/dist/{7397.js → 2240.js} +4 -2
- package/dist/2287.js +2458 -0
- package/dist/{1361.js → 3294.js} +1 -1
- package/dist/{1965.js → 3425.js} +0 -1
- package/dist/8006.js +77 -0
- package/dist/8857.js +4826 -0
- package/dist/8857.js.LICENSE.txt +41 -0
- package/dist/cli/index.js +14 -7
- package/dist/config/loadConfigFile.js +1 -1
- package/dist/eject-theme/components/CodeButtonGroup/CopyCodeButton.scss +1 -1
- package/dist/eject-theme/components/CodeButtonGroup/CopyCodeButton.tsx +17 -21
- package/dist/eject-theme/components/CodeButtonGroup/index.scss +1 -1
- package/dist/eject-theme/components/DocContent/doc.scss +16 -41
- package/dist/eject-theme/components/FallbackHeading/index.tsx +1 -1
- package/dist/eject-theme/components/Link/useLinkNavigate.ts +4 -1
- package/dist/eject-theme/components/Llms/LlmsCopyButton.scss +3 -3
- package/dist/eject-theme/components/Llms/LlmsCopyButton.tsx +13 -6
- package/dist/eject-theme/components/Llms/LlmsCopyRow.tsx +13 -5
- package/dist/eject-theme/components/Llms/LlmsViewOptions.tsx +7 -3
- package/dist/eject-theme/components/Outline/index.scss +1 -1
- package/dist/eject-theme/components/Prompt/icons.tsx +80 -0
- package/dist/eject-theme/components/Prompt/index.scss +478 -0
- package/dist/eject-theme/components/Prompt/index.tsx +335 -0
- package/dist/eject-theme/components/Search/SearchPanel.tsx +1 -1
- package/dist/eject-theme/components/SidebarMenu/index.tsx +5 -1
- package/dist/eject-theme/components/Steps/index.scss +32 -13
- package/dist/node/PluginDriver.js +1 -1
- package/dist/node/auto-nav-sidebar/index.js +1 -1
- package/dist/node/auto-nav-sidebar/locales.js +1 -1
- package/dist/node/auto-nav-sidebar/normalize.js +10 -6
- package/dist/node/auto-nav-sidebar/utils.js +8 -2
- package/dist/node/auto-nav-sidebar/walk.js +2 -8
- package/dist/node/constants.js +1 -1
- package/dist/node/eject.js +12 -7
- package/dist/node/initRsbuild.js +6 -6
- package/dist/node/logger/hint.js +9 -6
- package/dist/node/mdx/options.js +13 -2
- package/dist/node/mdx/processor.js +1 -1
- package/dist/node/mdx/rehypePlugins/codeMeta.js +1 -1
- package/dist/node/mdx/rehypePlugins/headerAnchor.js +1 -1
- package/dist/node/mdx/rehypePlugins/shiki.js +1 -1
- package/dist/node/mdx/remarkPlugins/builtin.js +1 -1
- package/dist/node/mdx/remarkPlugins/fileCodeBlock.js +6 -2
- package/dist/node/mdx/remarkPlugins/image.d.ts +7 -2
- package/dist/node/mdx/remarkPlugins/image.js +51 -2
- package/dist/node/mdx/remarkPlugins/link.js +7 -3
- package/dist/node/mdx/remarkPlugins/toc.js +1 -1
- package/dist/node/route/RoutePage.js +1 -1
- package/dist/node/route/RouteService.js +1 -1
- package/dist/node/route/extractPageData.js +75 -26
- package/dist/node/route/normalizeRoutePath.js +1 -1
- package/dist/node/runtimeModule/DEFAULT_I18N_TEXT.d.ts +28 -0
- package/dist/node/runtimeModule/DEFAULT_I18N_TEXT.js +28 -0
- package/dist/node/runtimeModule/i18n.js +10 -6
- package/dist/node/runtimeModule/pageData/createPageData.js +1 -1
- package/dist/node/runtimeModule/pageData/rsbuildPlugin.js +1 -1
- 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 +8 -4
- package/dist/node/ssg/renderPageWorker.js +1 -1
- package/dist/node/ssg/renderPages.js +9 -5
- package/dist/node/ssg/rsbuildPluginSSG.js +1 -1
- package/dist/node/ssg/ssgEnv.js +1 -1
- package/dist/node/ssg-md/llms/emitLlmsTxt.js +1 -1
- package/dist/node/ssg-md/llms/llmsTxt.js +1 -1
- package/dist/node/ssg-md/remarkSplitMdx.js +1 -1
- package/dist/node/ssg-md/renderPage.js +8 -4
- package/dist/node/ssg-md/renderPages.js +7 -3
- package/dist/node/ssg-md/rsbuildPluginSSGMD.js +1 -1
- package/dist/node/utils/checkLanguageParity.js +1 -1
- package/dist/node/utils/createHash.js +1 -1
- package/dist/node/utils/error.js +5 -2
- package/dist/node/utils/flattenMdxContent.js +1 -1
- package/dist/node/utils/fs.js +1 -1
- package/dist/node/utils/getPageKey.js +1 -1
- package/dist/node/utils/normalizePath.js +1 -1
- package/dist/node/utils/reactAlias.js +7 -3
- package/dist/runtime/App.js +4 -1
- package/dist/runtime/index.d.ts +2 -1
- package/dist/runtime/index.js +2 -1
- package/dist/runtime/initPageData.d.ts +3 -0
- package/dist/runtime/initPageData.js +37 -2
- package/dist/runtime/ssrClientEntry.js +4 -2
- package/dist/theme/assets/success.js +1 -1
- package/dist/theme/assets/wrapped.js +1 -1
- package/dist/theme/components/CodeButtonGroup/CopyCodeButton.css +1 -1
- package/dist/theme/components/CodeButtonGroup/CopyCodeButton.js +14 -12
- package/dist/theme/components/CodeButtonGroup/index.css +1 -1
- package/dist/theme/components/DocContent/doc.css +14 -21
- package/dist/theme/components/FallbackHeading/index.js +1 -1
- package/dist/theme/components/Link/useLinkNavigate.js +3 -2
- package/dist/theme/components/Llms/LlmsCopyButton.css +5 -5
- package/dist/theme/components/Llms/LlmsCopyButton.js +5 -6
- package/dist/theme/components/Llms/LlmsCopyRow.js +5 -5
- package/dist/theme/components/Llms/LlmsViewOptions.js +1 -3
- package/dist/theme/components/Outline/index.css +1 -1
- package/dist/theme/components/Prompt/icons.d.ts +10 -0
- package/dist/theme/components/Prompt/icons.js +64 -0
- package/dist/theme/components/Prompt/index.css +352 -0
- package/dist/theme/components/Prompt/index.d.ts +33 -0
- package/dist/theme/components/Prompt/index.js +262 -0
- package/dist/theme/components/Search/SearchPanel.js +1 -1
- package/dist/theme/components/SidebarMenu/index.js +2 -1
- package/dist/theme/components/Steps/index.css +23 -12
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/index.js +3 -0
- package/dist/theme/layout/DocLayout/index.css +5 -1
- package/dist/theme/layout/DocLayout/index.js +8 -4
- package/dist/theme/logic/copyToClipboard.d.ts +1 -0
- package/dist/theme/{components/Llms/copy.js → logic/copyToClipboard.js} +4 -3
- package/dist/theme/logic/getCopyableText.d.ts +5 -0
- package/dist/theme/logic/getCopyableText.js +52 -0
- package/dist/theme/logic/useThemeState.js +1 -1
- package/dist/theme/styles/vars/base-vars.css +4 -4
- package/package.json +20 -23
- package/dist/4454.js +0 -8
- package/dist/7319.js +0 -88
- package/dist/8885.js +0 -4
- package/dist/eject-theme/components/Llms/copy.ts +0 -12
- package/dist/theme/components/Llms/copy.d.ts +0 -1
package/dist/7319.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import node_path, { extname, join, relative } from "node:path";
|
|
2
|
-
import { __webpack_require__ } from "./0~rslib-runtime.js";
|
|
3
|
-
import { createRequire as __rspack_createRequire } from "node:module";
|
|
4
|
-
const __rspack_createRequire_require = __rspack_createRequire(import.meta.url);
|
|
5
|
-
__webpack_require__.add({
|
|
6
|
-
child_process (module) {
|
|
7
|
-
module.exports = __rspack_createRequire_require("child_process");
|
|
8
|
-
},
|
|
9
|
-
fs (module) {
|
|
10
|
-
module.exports = __rspack_createRequire_require("fs");
|
|
11
|
-
},
|
|
12
|
-
path (module) {
|
|
13
|
-
module.exports = __rspack_createRequire_require("path");
|
|
14
|
-
},
|
|
15
|
-
stream (module) {
|
|
16
|
-
module.exports = __rspack_createRequire_require("stream");
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const PLUGIN_VIRTUAL_MODULE_NAME = 'rsbuild:virtual-module';
|
|
20
|
-
const pluginVirtualModule = (pluginOptions = {})=>({
|
|
21
|
-
name: PLUGIN_VIRTUAL_MODULE_NAME,
|
|
22
|
-
async setup (api) {
|
|
23
|
-
const { virtualModules = {}, tempDir: virtualFolderName = '.rsbuild-virtual-module' } = pluginOptions;
|
|
24
|
-
const TEMP_DIR = join(api.context.rootPath, virtualFolderName);
|
|
25
|
-
const virtualFileAbsolutePaths = Object.keys(virtualModules).map((i)=>{
|
|
26
|
-
let absolutePath = join(TEMP_DIR, i);
|
|
27
|
-
if (!extname(absolutePath)) absolutePath = `${absolutePath}.js`;
|
|
28
|
-
return [
|
|
29
|
-
i,
|
|
30
|
-
absolutePath
|
|
31
|
-
];
|
|
32
|
-
});
|
|
33
|
-
api.modifyBundlerChain((chain, { rspack })=>{
|
|
34
|
-
const pluginId = 'RSBUILD_VIRTUAL_MODULE_PLUGIN';
|
|
35
|
-
const virtualModules = Object.fromEntries(virtualFileAbsolutePaths.map((i)=>[
|
|
36
|
-
i[1],
|
|
37
|
-
''
|
|
38
|
-
]));
|
|
39
|
-
if (chain.plugins.has(pluginId)) chain.plugin(pluginId).tap((options)=>{
|
|
40
|
-
const existingPaths = new Set(Object.keys(options[0] ?? {}));
|
|
41
|
-
const conflictPath = virtualFileAbsolutePaths.find(([, path])=>existingPaths.has(path));
|
|
42
|
-
if (conflictPath) throw new Error(`Virtual module name conflicted: ${conflictPath[0]}`);
|
|
43
|
-
return [
|
|
44
|
-
{
|
|
45
|
-
...options[0],
|
|
46
|
-
...virtualModules
|
|
47
|
-
}
|
|
48
|
-
];
|
|
49
|
-
});
|
|
50
|
-
else chain.plugin(pluginId).use(rspack.experiments.VirtualModulesPlugin, [
|
|
51
|
-
virtualModules
|
|
52
|
-
]);
|
|
53
|
-
chain.resolve.alias.merge(Object.fromEntries(virtualFileAbsolutePaths));
|
|
54
|
-
});
|
|
55
|
-
for (const [moduleName, absolutePath] of virtualFileAbsolutePaths){
|
|
56
|
-
const handler = virtualModules[moduleName];
|
|
57
|
-
if (handler) api.transform({
|
|
58
|
-
test: absolutePath
|
|
59
|
-
}, handler);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
export { DEFAULT_PAGE_EXTENSIONS } from "@rspress/shared/constants";
|
|
64
|
-
export { default as promises, mkdir, readdir, rm, stat, writeFile } from "node:fs/promises";
|
|
65
|
-
export { MDX_OR_MD_REGEXP, RSPRESS_TEMP_DIR, SEARCH_INDEX_NAME, addLeadingSlash, addTrailingSlash, getSidebarDataGroup, isDebugMode, isExternalUrl, normalizeHref, removeLeadingSlash, removeTrailingSlash, slash, withBase } from "@rspress/shared";
|
|
66
|
-
export { glob } from "tinyglobby";
|
|
67
|
-
export { logger } from "@rspress/shared/logger";
|
|
68
|
-
export { default as picocolors } from "picocolors";
|
|
69
|
-
export { extractTextAndId, getIconUrlPath, loadFrontMatter } from "@rspress/shared/node-utils";
|
|
70
|
-
export { createRequire } from "node:module";
|
|
71
|
-
export { cwd } from "node:process";
|
|
72
|
-
export { fileURLToPath, pathToFileURL } from "node:url";
|
|
73
|
-
export { PLUGIN_REACT_NAME, pluginReact } from "@rsbuild/plugin-react";
|
|
74
|
-
export { chunk, groupBy } from "lodash-es";
|
|
75
|
-
export { default as remark_gfm } from "remark-gfm";
|
|
76
|
-
export { default as remark_parse } from "remark-parse";
|
|
77
|
-
export { default as remark_stringify } from "remark-stringify";
|
|
78
|
-
export { unified } from "unified";
|
|
79
|
-
export { remove } from "unist-util-remove";
|
|
80
|
-
export { visit } from "unist-util-visit";
|
|
81
|
-
export { default as node_fs } from "node:fs";
|
|
82
|
-
export { createProcessor } from "@mdx-js/mdx";
|
|
83
|
-
export { mergeRsbuildConfig, rspack as core_rspack } from "@rsbuild/core";
|
|
84
|
-
export { createHash } from "node:crypto";
|
|
85
|
-
export { default as node_os } from "node:os";
|
|
86
|
-
export { matchPath } from "react-router-dom";
|
|
87
|
-
export { createHead } from "@unhead/react/server";
|
|
88
|
-
export { extname, join, node_path, pluginVirtualModule, relative };
|
package/dist/8885.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function copyToClipboard(text: string): Promise<void>;
|