@alauda/doom 1.9.2 → 1.10.0

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.
Files changed (65) hide show
  1. package/lib/cli/export.js +2 -2
  2. package/lib/cli/index.js +1 -1
  3. package/lib/cli/lint.js +1 -1
  4. package/lib/cli/load-config.d.ts +1 -1
  5. package/lib/cli/load-config.js +2 -7
  6. package/lib/cli/translate.js +1 -1
  7. package/lib/config.d.ts +1 -1
  8. package/lib/global/SiteOverrides/index.js +1 -1
  9. package/lib/global/VersionsNav/NavMenuGroup.js +1 -1
  10. package/lib/global/VersionsNav/NavMenuSingleItem.js +1 -1
  11. package/lib/global/VersionsNav/index.js +1 -1
  12. package/lib/plugins/api/index.d.ts +1 -1
  13. package/lib/plugins/attributes/index.d.ts +2 -2
  14. package/lib/plugins/auto-sidebar/index.d.ts +1 -1
  15. package/lib/plugins/auto-sidebar/index.js +1 -1
  16. package/lib/plugins/auto-sidebar/utils.js +1 -1
  17. package/lib/plugins/auto-sidebar/walk.js +1 -1
  18. package/lib/plugins/auto-toc/index.d.ts +1 -1
  19. package/lib/plugins/directives/index.d.ts +2 -2
  20. package/lib/plugins/global/index.d.ts +1 -1
  21. package/lib/plugins/global/index.js +1 -1
  22. package/lib/plugins/mermaid/index.d.ts +2 -2
  23. package/lib/plugins/permission/index.d.ts +1 -1
  24. package/lib/plugins/replace/index.d.ts +1 -1
  25. package/lib/plugins/replace/index.js +1 -1
  26. package/lib/plugins/replace/normalize-img-src.js +1 -1
  27. package/lib/plugins/replace/rehype-normalize-link.js +1 -1
  28. package/lib/plugins/replace/remark-replace.js +2 -2
  29. package/lib/plugins/replace/resolve-reference.js +2 -2
  30. package/lib/plugins/replace/resolve-release.js +1 -1
  31. package/lib/plugins/replace/utils.js +1 -1
  32. package/lib/plugins/sitemap/index.js +1 -1
  33. package/lib/runtime/components/Badge.d.ts +1 -1
  34. package/lib/runtime/components/Badge.js +1 -1
  35. package/lib/runtime/components/Card.d.ts +1 -1
  36. package/lib/runtime/components/Card.js +1 -1
  37. package/lib/runtime/components/ExternalSiteLink.js +1 -1
  38. package/lib/runtime/components/JsonViewer.js +1 -1
  39. package/lib/runtime/components/K8sCrd.js +1 -1
  40. package/lib/runtime/components/K8sPermissionTable.js +1 -1
  41. package/lib/runtime/components/LinkCard.d.ts +1 -1
  42. package/lib/runtime/components/LinkCard.js +1 -1
  43. package/lib/runtime/components/Mermaid.js +1 -1
  44. package/lib/runtime/components/OpenAPIPath.js +2 -2
  45. package/lib/runtime/components/OpenAPIRef.js +1 -1
  46. package/lib/runtime/components/Overview.js +1 -1
  47. package/lib/runtime/components/PackageManagerTabs.d.ts +1 -1
  48. package/lib/runtime/components/PackageManagerTabs.js +1 -1
  49. package/lib/runtime/components/Steps.d.ts +1 -1
  50. package/lib/runtime/components/Steps.js +1 -1
  51. package/lib/runtime/components/Tab.d.ts +1 -1
  52. package/lib/runtime/components/Tab.js +1 -1
  53. package/lib/runtime/components/Tabs.d.ts +1 -1
  54. package/lib/runtime/components/Tabs.js +1 -1
  55. package/lib/runtime/components/Toc.d.ts +1 -1
  56. package/lib/runtime/components/Toc.js +1 -1
  57. package/lib/runtime/components/_ExternalSiteBase.js +1 -1
  58. package/lib/runtime/components/_X.js +1 -1
  59. package/lib/runtime/hooks/useSiteOverrides.js +1 -1
  60. package/lib/runtime/hooks/useTranslation.js +1 -1
  61. package/lib/theme.d.ts +1 -1
  62. package/lib/theme.js +3 -3
  63. package/lib/types.d.ts +1 -1
  64. package/lib/utils/git.js +1 -1
  65. package/package.json +15 -14
package/lib/cli/export.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import fs from 'node:fs/promises';
2
2
  import path from 'node:path';
3
- import { removeLeadingSlash, serve } from '@rspress/core';
4
- import { logger } from '@rspress/shared/logger';
3
+ import { removeLeadingSlash } from '@rspress/shared';
5
4
  import { Command } from 'commander';
5
+ import { logger, serve } from 'rspress/core';
6
6
  import { cyan, yellow } from 'yoctocolors';
7
7
  import { autoSidebar, } from '../plugins/index.js';
8
8
  import { getPdfName } from '../shared/index.js';
package/lib/cli/index.js CHANGED
@@ -5,9 +5,9 @@
5
5
  import module from 'node:module';
6
6
  import path from 'node:path';
7
7
  import { logger } from '@rsbuild/core';
8
- import { build, dev, serve } from '@rspress/core';
9
8
  import { watch } from 'chokidar';
10
9
  import { program } from 'commander';
10
+ import { build, dev, serve } from 'rspress/core';
11
11
  import { green } from 'yoctocolors';
12
12
  import { setNodeEnv } from '../utils/index.js';
13
13
  import { CWD, DEFAULT_CONFIGS, SITES_FILE } from './constants.js';
package/lib/cli/lint.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import path from 'node:path';
2
- import { logger } from '@rspress/shared/logger';
3
2
  import { Command } from 'commander';
4
3
  import { ESLint } from 'eslint';
4
+ import { logger } from 'rspress/core';
5
5
  import { cyan } from 'yoctocolors';
6
6
  import doom from '../eslint.js';
7
7
  import { loadConfig } from './load-config.js';
@@ -1,4 +1,4 @@
1
- import { type UserConfig } from '@rspress/core';
1
+ import { type UserConfig } from '@rspress/shared';
2
2
  import type { GlobalCliOptions } from '../types.js';
3
3
  export declare function loadConfig(root?: string | URL, { config: configFile, base, prefix, v: version, download, export: export_, ignore, force, open, lazy, include, exclude, outDir, redirect, editRepo, algolia, siteUrl, }?: GlobalCliOptions): Promise<{
4
4
  config: UserConfig;
@@ -5,12 +5,12 @@ import { pluginReact } from '@rsbuild/plugin-react';
5
5
  import { pluginSass } from '@rsbuild/plugin-sass';
6
6
  import { pluginSvgr } from '@rsbuild/plugin-svgr';
7
7
  import { pluginYaml } from '@rsbuild/plugin-yaml';
8
- import { addLeadingSlash, addTrailingSlash, normalizeSlash, removeLeadingSlash, } from '@rspress/core';
9
8
  import { pluginAlgolia } from '@rspress/plugin-algolia';
10
9
  import { pluginLlms } from '@rspress/plugin-llms';
11
- import { logger } from '@rspress/shared/logger';
10
+ import { addLeadingSlash, addTrailingSlash, normalizeSlash, removeLeadingSlash, } from '@rspress/shared';
12
11
  import { transformerMetaHighlight, transformerMetaWordHighlight, transformerNotationDiff, transformerNotationErrorLevel, transformerNotationFocus, transformerNotationHighlight, transformerNotationWordHighlight, transformerRemoveNotationEscape, } from '@shikijs/transformers';
13
12
  import { difference } from 'es-toolkit';
13
+ import { logger } from 'rspress/core';
14
14
  import { glob } from 'tinyglobby';
15
15
  import { cyan } from 'yoctocolors';
16
16
  import { attributesPlugin } from '../plugins/attributes/index.js';
@@ -216,11 +216,6 @@ const getCommonConfig = async ({ config, root, configFilePath, base, version, do
216
216
  server: {
217
217
  open,
218
218
  },
219
- performance: {
220
- buildCache: {
221
- cacheDigest: [root, configFilePath, base, version],
222
- },
223
- },
224
219
  tools: {
225
220
  rspack(rspackConfig, { mergeConfig, rspack }) {
226
221
  return mergeConfig(rspackConfig, {
@@ -4,12 +4,12 @@ import path from 'node:path';
4
4
  import { setTimeout } from 'node:timers/promises';
5
5
  import { isDeepStrictEqual } from 'node:util';
6
6
  import { removeLeadingSlash } from '@rspress/shared';
7
- import { logger } from '@rspress/shared/logger';
8
7
  import { Command } from 'commander';
9
8
  import { render } from 'ejs';
10
9
  import matter from 'gray-matter';
11
10
  import { AzureOpenAI, RateLimitError } from 'openai';
12
11
  import { pRateLimit } from 'p-ratelimit';
12
+ import { logger } from 'rspress/core';
13
13
  import { glob } from 'tinyglobby';
14
14
  import { cyan, red } from 'yoctocolors';
15
15
  import { mdProcessor, mdxProcessor, normalizeImgSrc, } from '../plugins/index.js';
package/lib/config.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import type { Config } from '@rspress/core';
1
+ import type { Config } from '@rspress/shared';
2
2
  export declare const defineConfig: (config: Config) => Config;
@@ -1,5 +1,5 @@
1
- import { usePageData } from '@rspress/core/runtime';
2
1
  import { useEffect } from 'react';
2
+ import { usePageData } from 'rspress/runtime';
3
3
  import { useSiteOverrides } from '@alauda/doom/runtime';
4
4
  const setNavBarSpans = (logoText) => {
5
5
  const navBarLinks = document.querySelectorAll('[class^=navBarTitle] > a');
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Tag } from '@rspress/core/theme';
3
2
  import { isExternalUrl, } from '@rspress/shared';
4
3
  import { useRef, useState } from 'react';
4
+ import { Tag } from 'rspress/theme';
5
5
  import { matchNavbar } from '../../shared/index.js';
6
6
  import { Down } from './Down.js';
7
7
  import { NavMenuSingleItem, } from './NavMenuSingleItem.js';
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Tag } from '@rspress/core/theme';
3
2
  import { isExternalUrl } from '@rspress/shared';
4
3
  import { useMemo } from 'react';
4
+ import { Tag } from 'rspress/theme';
5
5
  import styles from '../../../styles/versions-nav.module.scss';
6
6
  import { withoutBase } from '../../shared/index.js';
7
7
  export function NavMenuSingleItem({ activeMatch, base, compact, download, link, pathname, rightIcon, text, tag, }) {
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { isProduction, NoSSR, usePageData, withBase, } from '@rspress/core/runtime';
3
2
  import {} from '@rspress/shared';
4
3
  import virtual from 'doom-@global-virtual';
5
4
  import { noop } from 'es-toolkit';
6
5
  import { useEffect, useMemo, useState } from 'react';
7
6
  import { createPortal } from 'react-dom';
7
+ import { isProduction, NoSSR, usePageData, withBase } from 'rspress/runtime';
8
8
  import { base } from 'virtual-runtime-config';
9
9
  import { parse } from 'yaml';
10
10
  import { ACP_BASE, getPdfName, getUnversionedVersion, isExplicitlyUnversioned, } from '../../shared/index.js';
@@ -1,4 +1,4 @@
1
- import type { RspressPlugin } from '@rspress/core';
1
+ import type { RspressPlugin } from 'rspress/core';
2
2
  import type { ApiPluginOptions } from './types.js';
3
3
  export type * from './types.js';
4
4
  export declare const apiPlugin: ({ localBasePath, }: ApiPluginOptions) => RspressPlugin;
@@ -1,2 +1,2 @@
1
- import type { Plugin } from '@rspress/core';
2
- export declare const attributesPlugin: () => Plugin;
1
+ import type { RspressPlugin } from 'rspress/core';
2
+ export declare const attributesPlugin: () => RspressPlugin;
@@ -1,4 +1,4 @@
1
- import { type RspressPlugin, type UserConfig } from '@rspress/core';
1
+ import { type RspressPlugin, type UserConfig } from '@rspress/shared';
2
2
  export type * from './walk.js';
3
3
  export type * from './type.js';
4
4
  export interface AutoSidebarPluginOptions {
@@ -1,5 +1,5 @@
1
1
  import path from 'node:path';
2
- import { addTrailingSlash, } from '@rspress/core';
2
+ import { addTrailingSlash, } from '@rspress/shared';
3
3
  import { APIS_ROUTES } from '../../shared/index.js';
4
4
  import { combineWalkResult } from './utils.js';
5
5
  import { walk } from './walk.js';
@@ -1,7 +1,7 @@
1
1
  import fs from 'node:fs/promises';
2
2
  import path from 'node:path';
3
- import { logger } from '@rspress/shared/logger';
4
3
  import { loadFrontMatter } from '@rspress/shared/node-utils';
4
+ import { logger } from 'rspress/core';
5
5
  import { extractTextAndId } from '../../shared/index.js';
6
6
  import { pathExists } from '../../utils/index.js';
7
7
  export async function detectFilePath(rawPath, extensions) {
@@ -1,9 +1,9 @@
1
1
  import fs from 'node:fs/promises';
2
2
  import path from 'node:path';
3
3
  import { isExternalUrl, removeLeadingSlash, removeTrailingSlash, slash, withBase, } from '@rspress/shared';
4
- import { logger } from '@rspress/shared/logger';
5
4
  import { unset } from 'es-toolkit/compat';
6
5
  import picomatch from 'picomatch';
6
+ import { logger } from 'rspress/core';
7
7
  import { pathExists, readJson } from '../../utils/index.js';
8
8
  import { detectFilePath, extractInfoFromFrontmatter } from './utils.js';
9
9
  const sidebarSorter = (a, b) => {
@@ -1,2 +1,2 @@
1
- import type { RspressPlugin } from '@rspress/core';
1
+ import type { RspressPlugin } from 'rspress/core';
2
2
  export declare const autoTocPlugin: () => RspressPlugin;
@@ -1,2 +1,2 @@
1
- import type { Plugin } from '@rspress/core';
2
- export declare const directivesPlugin: () => Plugin;
1
+ import type { RspressPlugin } from 'rspress/core';
2
+ export declare const directivesPlugin: () => RspressPlugin;
@@ -1,4 +1,4 @@
1
- import { type RspressPlugin } from '@rspress/core';
1
+ import { type RspressPlugin } from '@rspress/shared';
2
2
  import { type DoomSite } from '../../shared/index.js';
3
3
  import type { ExportItem } from '../../types.js';
4
4
  export interface GlobalPluginOptions {
@@ -1,6 +1,6 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
- import { addTrailingSlash } from '@rspress/core';
3
+ import { addTrailingSlash } from '@rspress/shared';
4
4
  import { ACP_BASE } from '../../shared/index.js';
5
5
  import { baseResolve, pkgResolve } from '../../utils/index.js';
6
6
  const globalComponentsDir = baseResolve('global');
@@ -1,2 +1,2 @@
1
- import type { Plugin } from '@rspress/core';
2
- export declare const mermaidPlugin: () => Plugin;
1
+ import type { RspressPlugin } from 'rspress/core';
2
+ export declare const mermaidPlugin: () => RspressPlugin;
@@ -1,4 +1,4 @@
1
- import type { RspressPlugin } from '@rspress/core';
1
+ import type { RspressPlugin } from 'rspress/core';
2
2
  import type { PermissionPluginOptions } from './types.js';
3
3
  export type * from './types.js';
4
4
  export declare const permissionPlugin: ({ localBasePath, }: PermissionPluginOptions) => RspressPlugin;
@@ -1,4 +1,4 @@
1
- import type { RspressPlugin } from '@rspress/core';
1
+ import type { RspressPlugin } from 'rspress/core';
2
2
  export * from './normalize-img-src.js';
3
3
  export type * from './types.js';
4
4
  export * from './utils.js';
@@ -1,5 +1,5 @@
1
1
  import fs from 'node:fs/promises';
2
- import { logger } from '@rspress/shared/logger';
2
+ import { logger } from 'rspress/core';
3
3
  import { rehypeNormalizeLink } from './rehype-normalize-link.js';
4
4
  import { remarkExplicitJsx } from './remark-explicit-jsx.js';
5
5
  import { MD_RELEASE_COMMENT_PATTERN, MDX_RELEASE_COMMENT_PATTERN, remarkReplace, } from './remark-replace.js';
@@ -1,6 +1,6 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
- import { isExternalUrl, removeLeadingSlash } from '@rspress/core';
3
+ import { isExternalUrl, removeLeadingSlash } from '@rspress/shared';
4
4
  import { cloneDeep } from 'es-toolkit';
5
5
  import { visit } from 'unist-util-visit';
6
6
  import { RELATIVE_URL_PATTERN } from './utils.js';
@@ -1,4 +1,4 @@
1
- import { isExternalUrl } from '@rspress/core';
1
+ import { isExternalUrl } from '@rspress/shared';
2
2
  import { visit } from 'unist-util-visit';
3
3
  import { getASTNodeImport } from '../shared.js';
4
4
  const getMdxSrcAttribute = (tempVar) => {
@@ -1,8 +1,8 @@
1
1
  /* eslint-disable regexp/optimal-quantifier-concatenation, regexp/no-misleading-capturing-group, regexp/no-super-linear-backtracking */
2
2
  import fs from 'node:fs/promises';
3
3
  import path from 'node:path';
4
- import { isProduction } from '@rspress/core';
5
- import { logger } from '@rspress/shared/logger';
4
+ import { isProduction } from '@rspress/shared';
5
+ import { logger } from 'rspress/core';
6
6
  import { parse, stringify } from 'yaml';
7
7
  import { cyan, red } from 'yoctocolors';
8
8
  import { normalizeImgSrc } from './normalize-img-src.js';
@@ -1,8 +1,8 @@
1
1
  import fs from 'node:fs/promises';
2
2
  import path from 'node:path';
3
- import { isProduction } from '@rspress/core';
4
- import { logger } from '@rspress/shared/logger';
3
+ import { isProduction } from '@rspress/shared';
5
4
  import { render } from 'ejs';
5
+ import { logger } from 'rspress/core';
6
6
  import { red } from 'yoctocolors';
7
7
  import { resolveRepo } from '../../utils/index.js';
8
8
  import { parseToc } from './parse-toc.js';
@@ -1,5 +1,5 @@
1
- import { logger } from '@rspress/shared/logger';
2
1
  import { render } from 'ejs';
2
+ import { logger } from 'rspress/core';
3
3
  import { ResponseError, xfetch } from 'x-fetch';
4
4
  import { cyan, red } from 'yoctocolors';
5
5
  import { isCI } from './utils.js';
@@ -1,9 +1,9 @@
1
- import { logger } from '@rspress/shared/logger';
2
1
  import remarkFrontmatter from 'remark-frontmatter';
3
2
  import remarkGfm from 'remark-gfm';
4
3
  import remarkMdx from 'remark-mdx';
5
4
  import remarkParse from 'remark-parse';
6
5
  import remarkStringify, {} from 'remark-stringify';
6
+ import { logger } from 'rspress/core';
7
7
  import { unified } from 'unified';
8
8
  import { red } from 'yoctocolors';
9
9
  export const RELATIVE_URL_PATTERN = /^\.\.?\//;
@@ -1,7 +1,7 @@
1
1
  // based on https://github.com/jl917/rspress-plugin-sitemap/blob/master/src/index.ts
2
2
  import fs from 'node:fs';
3
3
  import { dirname } from 'node:path';
4
- import { logger } from '@rspress/shared/logger';
4
+ import { logger } from 'rspress/core';
5
5
  const generateNode = (sitemap) => {
6
6
  let result = '<url>';
7
7
  for (const [tag, value] of Object.entries(sitemap)) {
@@ -1 +1 @@
1
- export { Badge, Badge as default } from '@rspress/core/theme';
1
+ export { Badge, Badge as default } from 'rspress/theme';
@@ -1 +1 @@
1
- export { Badge, Badge as default } from '@rspress/core/theme';
1
+ export { Badge, Badge as default } from 'rspress/theme';
@@ -1 +1 @@
1
- export { Card, Card as default } from '@rspress/core/theme';
1
+ export { Card, Card as default } from 'rspress/theme';
@@ -1 +1 @@
1
- export { Card, Card as default } from '@rspress/core/theme';
1
+ export { Card, Card as default } from 'rspress/theme';
@@ -1,10 +1,10 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { NoSSR, useLang, usePageData } from '@rspress/core/runtime';
3
2
  import { addTrailingSlash, isExternalUrl, normalizeHref, parseUrl, removeLeadingSlash, } from '@rspress/shared';
4
3
  import { DEFAULT_PAGE_EXTENSIONS } from '@rspress/shared/constants';
5
4
  import { clsx } from 'clsx';
6
5
  import virtual from 'doom-@global-virtual';
7
6
  import { useMemo } from 'react';
7
+ import { NoSSR, useLang, usePageData } from 'rspress/runtime';
8
8
  import classes from '../../../styles/link.module.scss';
9
9
  import { isUnversioned } from '../../shared/helpers.js';
10
10
  import { useIsPrint } from '../hooks/index.js';
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { CodeBlockRuntime, Tab, Tabs } from '@rspress/core/theme';
2
+ import { CodeBlockRuntime, Tab, Tabs } from 'rspress/theme';
3
3
  import { stringify } from 'yaml';
4
4
  export const JsonViewer = ({ value }) => {
5
5
  return (_jsxs(Tabs, { children: [_jsx(Tab, { label: "yaml", children: _jsx(CodeBlockRuntime, { lang: "yaml", code: stringify(value) }) }), _jsx(Tab, { label: "json", children: _jsx(CodeBlockRuntime, { lang: "json", code: JSON.stringify(value, null, 2) }) })] }));
@@ -2,9 +2,9 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  /**
3
3
  * modified based on @see https://github.com/crdsdev/doc/blob/main/template/doc.html
4
4
  */
5
- import { Badge, Button } from '@rspress/core/theme';
6
5
  import crdsMap from 'doom-@api-crdsMap';
7
6
  import { useCallback, useEffect, useMemo, useState } from 'react';
7
+ import { Badge, Button } from 'rspress/theme';
8
8
  import { useIsPrint, useTranslation } from '../hooks/index.js';
9
9
  import { Directive } from './Directive.js';
10
10
  import { Markdown } from './Markdown.js';
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useLang } from '@rspress/core/runtime';
3
2
  import functionResourcesMap from 'doom-@permission-functionResourcesMap';
4
3
  import roleTemplatesMap from 'doom-@permission-roleTemplatesMap';
5
4
  import { intersection, sortBy } from 'es-toolkit';
6
5
  import { Fragment, useMemo } from 'react';
6
+ import { useLang } from 'rspress/runtime';
7
7
  import { useTranslation } from '../hooks/index.js';
8
8
  import { X } from './_X.js';
9
9
  export const VerbsMap = {
@@ -1 +1 @@
1
- export { LinkCard, LinkCard as default } from '@rspress/core/theme';
1
+ export { LinkCard, LinkCard as default } from 'rspress/theme';
@@ -1 +1 @@
1
- export { LinkCard, LinkCard as default } from '@rspress/core/theme';
1
+ export { LinkCard, LinkCard as default } from 'rspress/theme';
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useDark } from '@rspress/core/runtime';
3
2
  import { clsx } from 'clsx';
4
3
  import mermaid from 'mermaid';
5
4
  import { useEffect, useId, useRef } from 'react';
5
+ import { useDark } from 'rspress/runtime';
6
6
  export const Mermaid = ({ className, children }) => {
7
7
  const id = useId();
8
8
  const isDark = useDark();
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { usePageData } from '@rspress/core/runtime';
3
- import { Badge } from '@rspress/core/theme';
4
2
  import openapisMap from 'doom-@api-openapisMap';
5
3
  import virtual from 'doom-@api-virtual';
6
4
  import BananaSlug from 'github-slugger';
7
5
  import { OpenAPIV3 } from 'openapi-types';
8
6
  import { Fragment, useId, useMemo } from 'react';
7
+ import { usePageData } from 'rspress/runtime';
8
+ import { Badge } from 'rspress/theme';
9
9
  import { omitRoutePathRefs, resolveRef } from '../utils.js';
10
10
  import { Markdown } from './Markdown.js';
11
11
  import { OpenAPIProperties, OpenAPIProperty, OpenAPIRef } from './OpenAPIRef.js';
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { usePageData } from '@rspress/core/runtime';
3
2
  import openapisMap from 'doom-@api-openapisMap';
4
3
  import { useId, useMemo } from 'react';
4
+ import { usePageData } from 'rspress/runtime';
5
5
  import { modelName, omitRoutePathRefs, resolveRef } from '../utils.js';
6
6
  import { Markdown } from './Markdown.js';
7
7
  import { HeadingTitle } from './_HeadingTitle.js';
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Link, renderInlineMarkdown, useSidebarData } from '@rspress/core/theme';
3
2
  import { isEqualPath, normalizeHrefInRuntime as normalizeHref, usePageData, } from '@rspress/runtime';
4
3
  import { Fragment, useCallback, useMemo } from 'react';
4
+ import { Link, renderInlineMarkdown, useSidebarData } from 'rspress/theme';
5
5
  import classes from '../../../styles/overview.module.scss';
6
6
  import { findItemByRoutePath, isSidebarDivider, isSidebarSectionHeader, isSingleFile, } from './_utils.js';
7
7
  const getChildLink = (traverseItem) => {
@@ -1 +1 @@
1
- export { PackageManagerTabs, PackageManagerTabs as default, } from '@rspress/core/theme';
1
+ export { PackageManagerTabs, PackageManagerTabs as default, } from 'rspress/theme';
@@ -1 +1 @@
1
- export { PackageManagerTabs, PackageManagerTabs as default, } from '@rspress/core/theme';
1
+ export { PackageManagerTabs, PackageManagerTabs as default, } from 'rspress/theme';
@@ -1 +1 @@
1
- export { Steps, Steps as default } from '@rspress/core/theme';
1
+ export { Steps, Steps as default } from 'rspress/theme';
@@ -1 +1 @@
1
- export { Steps, Steps as default } from '@rspress/core/theme';
1
+ export { Steps, Steps as default } from 'rspress/theme';
@@ -1 +1 @@
1
- export { Tab, Tab as default } from '@rspress/core/theme';
1
+ export { Tab, Tab as default } from 'rspress/theme';
@@ -1 +1 @@
1
- export { Tab, Tab as default } from '@rspress/core/theme';
1
+ export { Tab, Tab as default } from 'rspress/theme';
@@ -1,5 +1,5 @@
1
- import { Tabs as Tabs_ } from '@rspress/core/theme';
2
1
  import { type RefAttributes } from 'react';
2
+ import { Tabs as Tabs_ } from 'rspress/theme';
3
3
  export type TabsProps = Parameters<typeof Tabs_>[0] & RefAttributes<HTMLDivElement>;
4
4
  export declare const Tabs: ({ ref, children, ...props }: TabsProps) => import("react/jsx-runtime").JSX.Element;
5
5
  export default Tabs;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Tabs as Tabs_ } from '@rspress/core/theme';
3
2
  import { Children } from 'react';
3
+ import { Tabs as Tabs_ } from 'rspress/theme';
4
4
  import { useIsPrint } from '../hooks/index.js';
5
5
  export const Tabs = ({ ref, children, ...props }) => {
6
6
  const isPrint = useIsPrint();
@@ -1 +1 @@
1
- export { Toc, Toc as default } from '@rspress/core/theme';
1
+ export { Toc, Toc as default } from 'rspress/theme';
@@ -1 +1 @@
1
- export { Toc, Toc as default } from '@rspress/core/theme';
1
+ export { Toc, Toc as default } from 'rspress/theme';
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useLang } from '@rspress/core/runtime';
3
2
  import virtual from 'doom-@global-virtual';
4
3
  import { useMemo } from 'react';
4
+ import { useLang } from 'rspress/runtime';
5
5
  import { handleCJKWhitespaces } from '../utils.js';
6
6
  import { Directive } from './Directive.js';
7
7
  import { ExternalSiteLink } from './ExternalSiteLink.js';
@@ -1,2 +1,2 @@
1
- import { getCustomMDXComponent } from '@rspress/core/theme';
1
+ import { getCustomMDXComponent } from 'rspress/theme';
2
2
  export const X = getCustomMDXComponent();
@@ -1,7 +1,7 @@
1
- import { isProduction, withBase } from '@rspress/core/runtime';
2
1
  import virtual from 'doom-@global-virtual';
3
2
  import { merge } from 'es-toolkit/compat';
4
3
  import { useEffect, useMemo, useState } from 'react';
4
+ import { isProduction, withBase } from 'rspress/runtime';
5
5
  import { parse } from 'yaml';
6
6
  import { isUnversioned } from '../../shared/index.js';
7
7
  import { namedTerms } from '../../terms.js';
@@ -1,5 +1,5 @@
1
- import { useLang as useLang_ } from '@rspress/core/runtime';
2
1
  import { useCallback } from 'react';
2
+ import { useLang as useLang_ } from 'rspress/runtime';
3
3
  import { TRANSLATIONS } from '../translation.js';
4
4
  export const useLang = () => useLang_();
5
5
  export const useTranslation = () => {
package/lib/theme.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { DoomSidebarGroup, DoomSidebarItem } from './plugins/index.js';
2
2
  import type { ExportItem } from './types.js';
3
- export * from '@rspress/core/theme';
3
+ export * from 'rspress/theme';
4
4
  export interface MatchedSidebar {
5
5
  sidebar: DoomSidebarGroup | DoomSidebarItem;
6
6
  exportItem: ExportItem;
package/lib/theme.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useLang, usePageData, withBase } from '@rspress/core/runtime';
3
- import { Search as OriginalSearch, Layout as OriginalLayout, getCustomMDXComponent, } from '@rspress/core/theme';
4
2
  import { Search as AlgoliaSearch, ZH_LOCALES, } from '@rspress/plugin-algolia/runtime';
5
3
  import virtual from 'doom-@global-virtual';
6
4
  import { useMemo } from 'react';
7
5
  import { useLocation } from 'react-router';
6
+ import { useLang, usePageData, withBase } from 'rspress/runtime';
7
+ import { Search as OriginalSearch, Layout as OriginalLayout, getCustomMDXComponent, } from 'rspress/theme';
8
8
  import classes from '../styles/link.module.scss';
9
9
  import { useTranslation } from './runtime/index.js';
10
10
  // eslint-disable-next-line import-x/export
11
- export * from '@rspress/core/theme';
11
+ export * from 'rspress/theme';
12
12
  const X = getCustomMDXComponent();
13
13
  const getClosestSidebar_ = (sidebarItems, pathname, exportItem, matched, depth = 0) => {
14
14
  for (const sidebar of sidebarItems) {
package/lib/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Options } from '@cspell/eslint-plugin';
2
- import type { serve } from '@rspress/core';
2
+ import type { serve } from 'rspress/core';
3
3
  import type { ApiPluginOptions, AutoSidebarPluginOptions, PermissionPluginOptions, ReferenceItem, ReleaseNotesOptions } from './plugins/index.js';
4
4
  import type { DoomSite } from './shared/index.js';
5
5
  export type BaseServeOptions = Parameters<typeof serve>[0];
package/lib/utils/git.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import fs from 'node:fs/promises';
2
2
  import os from 'node:os';
3
3
  import path from 'node:path';
4
- import { logger } from '@rspress/shared/logger';
4
+ import { logger } from 'rspress/core';
5
5
  import { simpleGit } from 'simple-git';
6
6
  import { cyan, red } from 'yoctocolors';
7
7
  const remotesFolder = path.resolve(os.homedir(), '.doom/remotes');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alauda/doom",
3
- "version": "1.9.2",
3
+ "version": "1.10.0",
4
4
  "type": "module",
5
5
  "description": "Doctor Doom making docs.",
6
6
  "repository": "git+https://github.com/alauda/doom.git",
@@ -36,19 +36,19 @@
36
36
  "rspress-plugins"
37
37
  ],
38
38
  "dependencies": {
39
- "@cspell/eslint-plugin": "^8.19.4 || ^9.1.3",
40
- "@eslint-react/eslint-plugin": "^1.52.2",
39
+ "@cspell/eslint-plugin": "^8.19.4 || ^9.1.5",
40
+ "@eslint-react/eslint-plugin": "^1.52.3",
41
41
  "@inquirer/prompts": "^7.6.0",
42
42
  "@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
43
- "@playwright/browser-chromium": "^1.53.2",
43
+ "@playwright/browser-chromium": "^1.54.1",
44
44
  "@rsbuild/plugin-react": "^1.3.4",
45
45
  "@rsbuild/plugin-sass": "^1.3.3",
46
46
  "@rsbuild/plugin-svgr": "^1.2.1",
47
47
  "@rsbuild/plugin-yaml": "^1.0.2",
48
- "@rspress/core": "2.0.0-beta.20",
49
- "@rspress/plugin-algolia": "2.0.0-beta.20",
50
- "@rspress/plugin-llms": "2.0.0-beta.20",
51
- "@shikijs/transformers": "^3.7.0",
48
+ "@rspress/plugin-algolia": "2.0.0-beta.21",
49
+ "@rspress/plugin-llms": "2.0.0-beta.21",
50
+ "@rspress/shared": "2.0.0-beta.21",
51
+ "@shikijs/transformers": "^3.8.0",
52
52
  "@total-typescript/ts-reset": "^0.6.1",
53
53
  "chokidar": "^4.0.3",
54
54
  "cli-progress": "^3.12.0",
@@ -56,7 +56,7 @@
56
56
  "commander": "^13.1.0 || ^14.0.0",
57
57
  "ejs": "^3.1.10",
58
58
  "es-toolkit": "^1.39.7",
59
- "eslint": "^9.30.1",
59
+ "eslint": "^9.31.0",
60
60
  "eslint-plugin-mdx": "^3.6.2",
61
61
  "globals": "^16.3.0",
62
62
  "html-tag-names": "^2.1.0",
@@ -66,13 +66,13 @@
66
66
  "mdast-util-phrasing": "^4.1.0",
67
67
  "mdast-util-to-string": "^4.0.0",
68
68
  "mermaid": "^11.8.1",
69
- "openai": "^5.8.3",
69
+ "openai": "^5.9.2",
70
70
  "openapi-types": "^12.1.3",
71
71
  "p-ratelimit": "^1.0.1",
72
72
  "pdf-lib": "^1.17.1",
73
73
  "pdf-merger-js": "^5.1.2",
74
- "picomatch": "^4.0.2",
75
- "playwright": "^1.53.2",
74
+ "picomatch": "^4.0.3",
75
+ "playwright": "^1.54.1",
76
76
  "pluralize": "^8.0.0",
77
77
  "react-markdown": "^10.1.0",
78
78
  "rehype-raw": "^7.0.0",
@@ -92,14 +92,15 @@
92
92
  "remark-mdx": "^3.1.0",
93
93
  "remark-message-control": "^8.0.0",
94
94
  "remark-stringify": "^11.0.0",
95
- "shiki": "^3.7.0",
95
+ "rspress": "2.0.0-beta.21",
96
+ "shiki": "^3.8.0",
96
97
  "simple-git": "^3.28.0",
97
98
  "string-width": "^7.2.0",
98
99
  "swagger2openapi": "^7.0.8",
99
100
  "tinyglobby": "^0.2.14",
100
101
  "type-fest": "^4.41.0",
101
102
  "typescript": "^5.8.3",
102
- "typescript-eslint": "^8.36.0",
103
+ "typescript-eslint": "^8.37.0",
103
104
  "unified": "^11.0.5",
104
105
  "unified-lint-rule": "^3.0.1",
105
106
  "unist-util-position": "^5.0.0",