@rspress/core 2.0.10 → 2.0.12
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 +1 -1
- package/dist/3323.js +8 -0
- package/dist/{2240.js → 6162.js} +1 -4
- package/dist/8006.js +1 -1
- package/dist/8857.js +1 -1
- package/dist/common-Qw-RoVFD.js +25 -0
- package/dist/eject-theme/components/Llms/LlmsContainer.tsx +1 -2
- package/dist/eject-theme/components/Llms/LlmsCopyButton.tsx +1 -2
- package/dist/eject-theme/components/Llms/LlmsViewOptions.tsx +1 -2
- package/dist/eject-theme/components/PackageManagerTabs/index.tsx +16 -17
- package/dist/eject-theme/components/Prompt/icons.tsx +1 -1
- package/dist/eject-theme/components/Prompt/index.scss +325 -380
- package/dist/eject-theme/components/Search/SearchPanel.tsx +1 -6
- package/dist/eject-theme/components/Search/logic/search.ts +10 -5
- package/dist/eject-theme/components/Search/logic/util.test.ts +20 -1
- package/dist/eject-theme/components/Search/logic/util.ts +4 -1
- package/dist/eject-theme/components/Sidebar/SidebarItem.tsx +1 -1
- package/dist/eject-theme/components/Tabs/index.tsx +48 -41
- package/dist/entry/process.d.ts +1 -0
- package/dist/entry/process.js +65 -0
- package/dist/entry/utils.d.ts +7 -0
- package/dist/entry/utils.js +2 -0
- package/dist/entry/worker.d.ts +1 -0
- package/dist/entry/worker.js +74 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -0
- 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.d.ts +1 -1
- package/dist/node/auto-nav-sidebar/normalize.js +1 -1
- package/dist/node/auto-nav-sidebar/utils.js +1 -1
- package/dist/node/auto-nav-sidebar/walk.js +1 -1
- package/dist/node/index.d.ts +1 -0
- package/dist/node/initRsbuild.js +1 -1
- package/dist/node/mdx/options.js +2 -1
- 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/rehypePlugins/transformers/add-title.js +3 -6
- package/dist/node/mdx/rehypePlugins/transformers/index.d.ts +1 -1
- package/dist/node/mdx/remarkPlugins/builtin.js +1 -1
- package/dist/node/mdx/remarkPlugins/containerSyntax.d.ts +1 -1
- package/dist/node/mdx/remarkPlugins/fileCodeBlock.d.ts +1 -0
- package/dist/node/mdx/remarkPlugins/fileCodeBlock.js +9 -4
- package/dist/node/mdx/remarkPlugins/image.d.ts +1 -1
- package/dist/node/mdx/remarkPlugins/image.js +2 -1
- package/dist/node/mdx/remarkPlugins/link.d.ts +1 -1
- package/dist/node/mdx/remarkPlugins/link.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 +1 -1
- package/dist/node/route/normalizeRoutePath.js +1 -1
- package/dist/node/runtimeModule/DEFAULT_I18N_TEXT.d.ts +140 -140
- package/dist/node/runtimeModule/i18n.js +1 -1
- package/dist/node/runtimeModule/pageData/createPageData.js +1 -1
- package/dist/node/runtimeModule/pageData/rsbuildPlugin.d.ts +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/renderPages.js +2 -2
- 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 +1 -1
- package/dist/node/ssg-md/renderPages.js +1 -1
- 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/flattenMdxContent.js +1 -1
- package/dist/node/utils/getPageKey.js +1 -1
- package/dist/node/utils/reactAlias.js +1 -1
- package/dist/runtime/BrowserOnly.d.ts +7 -0
- package/dist/runtime/BrowserOnly.js +40 -0
- package/dist/runtime/BrowserOnly.test.d.ts +1 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.js +1 -0
- package/dist/theme/components/DocContent/docComponents/a.d.ts +1 -1
- package/dist/theme/components/DocContent/docComponents/hr.d.ts +1 -1
- package/dist/theme/components/DocContent/docComponents/img.d.ts +1 -1
- package/dist/theme/components/DocContent/docComponents/index.d.ts +18 -18
- package/dist/theme/components/DocContent/docComponents/list.d.ts +3 -3
- package/dist/theme/components/DocContent/docComponents/paragraph.d.ts +3 -3
- package/dist/theme/components/DocContent/docComponents/table.d.ts +3 -3
- package/dist/theme/components/DocContent/docComponents/title.d.ts +6 -6
- package/dist/theme/components/Nav/hooks.d.ts +1 -1
- package/dist/theme/components/PackageManagerTabs/index.js +17 -17
- package/dist/theme/components/Prompt/icons.js +1 -1
- package/dist/theme/components/Prompt/index.css +11 -37
- package/dist/theme/components/Search/SearchPanel.js +1 -2
- package/dist/theme/components/Search/logic/search.js +5 -3
- package/dist/theme/components/Search/logic/util.js +2 -1
- package/dist/theme/components/Sidebar/SidebarItem.js +1 -0
- package/dist/theme/components/Tabs/index.d.ts +8 -4
- package/dist/theme/components/Tabs/index.js +19 -19
- package/dist/theme/layout/DocLayout/index.css +4 -0
- package/dist/theme/layout/DocLayout/index.js +3 -2
- package/dist/theme/logic/useThemeState.d.ts +5 -10
- package/dist/theme/logic/useThemeState.js +15 -20
- package/dist/utils-B--2TaWv.js +34 -0
- package/dist/utils-De75vAgL.js +7 -0
- package/package.json +13 -13
- package/dist/3425.js +0 -6
- package/dist/runtime/getSidebarDataGroup.test.js +0 -68
- package/dist/runtime/hooks/useWindowSize.test.js +0 -36
- package/dist/runtime/route.test.js +0 -154
- package/dist/runtime/utils.test.js +0 -34
- package/dist/theme/components/Search/logic/util.test.js +0 -51
- /package/dist/{2287.js → 2235.js} +0 -0
package/dist/0~execa.js
CHANGED
|
@@ -8,7 +8,7 @@ import { createReadStream, createWriteStream, readFileSync } from "node:fs";
|
|
|
8
8
|
import { setTimeout as promises_setTimeout } from "node:timers/promises";
|
|
9
9
|
import { debuglog } from "node:util";
|
|
10
10
|
import { __webpack_require__ } from "./0~rslib-runtime.js";
|
|
11
|
-
import "./
|
|
11
|
+
import "./2235.js";
|
|
12
12
|
__webpack_require__.add({
|
|
13
13
|
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
14
14
|
const cp = __webpack_require__("child_process");
|
package/dist/3323.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { readFile } from "node:fs/promises";
|
|
2
|
+
export { default as node_path } from "node:path";
|
|
3
|
+
export { cwd } from "node:process";
|
|
4
|
+
export { logger } from "@rspress/shared/logger";
|
|
5
|
+
export { visit } from "unist-util-visit";
|
|
6
|
+
export { existsSync } from "node:fs";
|
|
7
|
+
export { addLeadingSlash, isDataUrl, isExternalUrl, isProduction, normalizeHref, parseUrl, withBase } from "@rspress/shared";
|
|
8
|
+
export { getNodeAttribute } from "@rspress/shared/node-utils";
|
package/dist/{2240.js → 6162.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as node_path } from "node:path";
|
|
2
2
|
export { createProcessor, nodeTypes } from "@mdx-js/mdx";
|
|
3
|
-
export { extractTextAndId,
|
|
3
|
+
export { extractTextAndId, loadFrontMatter } from "@rspress/shared/node-utils";
|
|
4
4
|
export { default as rehype } from "@shikijs/rehype";
|
|
5
5
|
export { default as rehype_external_links } from "rehype-external-links";
|
|
6
6
|
export { default as rehype_raw } from "rehype-raw";
|
|
@@ -15,6 +15,3 @@ export { default as github_slugger } from "@rspress/shared/github-slugger";
|
|
|
15
15
|
export { headingRank } from "hast-util-heading-rank";
|
|
16
16
|
export { transformerAddFold, transformerAddLang, transformerAddLineNumbers, transformerAddTitle, transformerAddWrapCode } from "@rspress/core/shiki-transformers";
|
|
17
17
|
export { createCssVariablesTheme } from "shiki";
|
|
18
|
-
export { existsSync } from "node:fs";
|
|
19
|
-
export { isDataUrl, isExternalUrl, isProduction, parseUrl } from "@rspress/shared";
|
|
20
|
-
export { logger } from "@rspress/shared/logger";
|
package/dist/8006.js
CHANGED
package/dist/8857.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! LICENSE: 8857.js.LICENSE.txt */
|
|
2
2
|
import { __webpack_require__ } from "./0~rslib-runtime.js";
|
|
3
|
-
import "./
|
|
3
|
+
import "./2235.js";
|
|
4
4
|
import { createRequire as __rspack_createRequire } from "node:module";
|
|
5
5
|
const __rspack_createRequire_require = __rspack_createRequire(import.meta.url);
|
|
6
6
|
__webpack_require__.add({
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const kMovable = Symbol("Tinypool.kMovable");
|
|
2
|
+
const kTransferable = Symbol.for("Tinypool.transferable");
|
|
3
|
+
const kValue = Symbol.for("Tinypool.valueOf");
|
|
4
|
+
const kQueueOptions = Symbol.for("Tinypool.queueOptions");
|
|
5
|
+
function isTransferable(value) {
|
|
6
|
+
return null != value && "object" == typeof value && kTransferable in value && kValue in value;
|
|
7
|
+
}
|
|
8
|
+
function isMovable(value) {
|
|
9
|
+
return isTransferable(value) && true === value[kMovable];
|
|
10
|
+
}
|
|
11
|
+
function markMovable(value) {
|
|
12
|
+
Object.defineProperty(value, kMovable, {
|
|
13
|
+
enumerable: false,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value: true
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function isTaskQueue(value) {
|
|
20
|
+
return "object" == typeof value && null !== value && "size" in value && "function" == typeof value.shift && "function" == typeof value.remove && "function" == typeof value.push;
|
|
21
|
+
}
|
|
22
|
+
const kRequestCountField = 0;
|
|
23
|
+
const kResponseCountField = 1;
|
|
24
|
+
const kFieldCount = 2;
|
|
25
|
+
export { isMovable, isTaskQueue, isTransferable, kFieldCount, kQueueOptions, kRequestCountField, kResponseCountField, kTransferable, kValue, markMovable };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import './LlmsContainer.scss';
|
|
3
3
|
|
|
4
|
-
export interface LlmsContainerProps
|
|
5
|
-
extends React.HTMLAttributes<HTMLDivElement> {}
|
|
4
|
+
export interface LlmsContainerProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
6
5
|
|
|
7
6
|
export function LlmsContainer(props: LlmsContainerProps) {
|
|
8
7
|
return <div {...props} className={'rp-not-doc rp-llms-container'} />;
|
|
@@ -15,8 +15,7 @@ import './index.scss';
|
|
|
15
15
|
import './LlmsCopyButton.scss';
|
|
16
16
|
import { useMdUrl } from './useMdUrl';
|
|
17
17
|
|
|
18
|
-
export interface LlmsCopyButtonProps
|
|
19
|
-
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
18
|
+
export interface LlmsCopyButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
20
19
|
/**
|
|
21
20
|
* Text by language, used with `useLang`.
|
|
22
21
|
* @default en: 'Copy Markdown', zh: '\u590d\u5236 Markdown'
|
|
@@ -32,8 +32,7 @@ type Option =
|
|
|
32
32
|
| 'chatgpt'
|
|
33
33
|
| 'claude';
|
|
34
34
|
|
|
35
|
-
export interface LlmsViewOptionsProps
|
|
36
|
-
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
35
|
+
export interface LlmsViewOptionsProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
37
36
|
/**
|
|
38
37
|
* Default options for the dropdown.
|
|
39
38
|
* @default ['markdownLink', 'chatgpt', 'claude']
|
|
@@ -231,27 +231,26 @@ export function PackageManagerTabs({
|
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
return (
|
|
234
|
-
<Tabs
|
|
235
|
-
groupId="package.manager"
|
|
236
|
-
values={Object.entries(commandInfo).map(([key]) => (
|
|
237
|
-
<div
|
|
238
|
-
key={key}
|
|
239
|
-
style={{
|
|
240
|
-
display: 'flex',
|
|
241
|
-
alignItems: 'center',
|
|
242
|
-
fontSize: 15,
|
|
243
|
-
}}
|
|
244
|
-
>
|
|
245
|
-
{packageMangerToIcon[key]}
|
|
246
|
-
<span style={{ marginLeft: 6, marginBottom: 2 }}>{key}</span>
|
|
247
|
-
</div>
|
|
248
|
-
))}
|
|
249
|
-
>
|
|
234
|
+
<Tabs groupId="package.manager">
|
|
250
235
|
{Object.entries(commandInfo).map(([key, value]) => {
|
|
251
236
|
const [packageManager, command] = splitTo2Parts(value);
|
|
252
237
|
|
|
253
238
|
return (
|
|
254
|
-
<Tab
|
|
239
|
+
<Tab
|
|
240
|
+
key={key}
|
|
241
|
+
label={
|
|
242
|
+
<div
|
|
243
|
+
style={{
|
|
244
|
+
display: 'flex',
|
|
245
|
+
alignItems: 'center',
|
|
246
|
+
fontSize: 15,
|
|
247
|
+
}}
|
|
248
|
+
>
|
|
249
|
+
{packageMangerToIcon[key]}
|
|
250
|
+
<span style={{ marginLeft: 6, marginBottom: 2 }}>{key}</span>
|
|
251
|
+
</div>
|
|
252
|
+
}
|
|
253
|
+
>
|
|
255
254
|
<Pre
|
|
256
255
|
lang="bash"
|
|
257
256
|
className="shiki css-variables"
|