@alauda/doom 1.10.7 → 1.10.9

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 (67) hide show
  1. package/lib/cli/export.js +1 -1
  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 +1 -1
  6. package/lib/cli/translate.js +1 -1
  7. package/lib/global/SiteOverrides/index.js +1 -1
  8. package/lib/global/VersionsNav/NavMenuGroup.js +1 -1
  9. package/lib/global/VersionsNav/NavMenuSingleItem.d.ts +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 +1 -1
  14. package/lib/plugins/auto-sidebar/index.d.ts +1 -1
  15. package/lib/plugins/auto-sidebar/index.js +2 -1
  16. package/lib/plugins/auto-sidebar/utils.js +1 -1
  17. package/lib/plugins/auto-sidebar/walk.d.ts +2 -1
  18. package/lib/plugins/auto-sidebar/walk.js +2 -2
  19. package/lib/plugins/auto-toc/index.d.ts +1 -1
  20. package/lib/plugins/directives/index.d.ts +1 -1
  21. package/lib/plugins/global/index.d.ts +1 -1
  22. package/lib/plugins/mermaid/index.d.ts +1 -1
  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/remark-replace.js +1 -1
  27. package/lib/plugins/replace/resolve-reference.js +1 -1
  28. package/lib/plugins/replace/resolve-release.js +1 -1
  29. package/lib/plugins/replace/utils.js +1 -1
  30. package/lib/plugins/sitemap/index.d.ts +1 -1
  31. package/lib/plugins/sitemap/index.js +1 -1
  32. package/lib/runtime/components/Badge.d.ts +1 -1
  33. package/lib/runtime/components/Badge.js +1 -1
  34. package/lib/runtime/components/Card.d.ts +1 -1
  35. package/lib/runtime/components/Card.js +1 -1
  36. package/lib/runtime/components/ExternalSiteLink.js +1 -1
  37. package/lib/runtime/components/JsonViewer.js +1 -1
  38. package/lib/runtime/components/K8sCrd.js +1 -1
  39. package/lib/runtime/components/K8sPermissionTable.js +1 -1
  40. package/lib/runtime/components/LinkCard.d.ts +1 -1
  41. package/lib/runtime/components/LinkCard.js +1 -1
  42. package/lib/runtime/components/Mermaid.js +1 -1
  43. package/lib/runtime/components/OpenAPIPath.js +2 -2
  44. package/lib/runtime/components/OpenAPIRef.js +1 -1
  45. package/lib/runtime/components/Overview.js +2 -2
  46. package/lib/runtime/components/PackageManagerTabs.d.ts +1 -1
  47. package/lib/runtime/components/PackageManagerTabs.js +1 -1
  48. package/lib/runtime/components/Steps.d.ts +1 -1
  49. package/lib/runtime/components/Steps.js +1 -1
  50. package/lib/runtime/components/Tab.d.ts +1 -1
  51. package/lib/runtime/components/Tab.js +1 -1
  52. package/lib/runtime/components/Tabs.d.ts +1 -1
  53. package/lib/runtime/components/Tabs.js +1 -1
  54. package/lib/runtime/components/Toc.d.ts +1 -1
  55. package/lib/runtime/components/Toc.js +1 -1
  56. package/lib/runtime/components/_ExternalSiteBase.js +1 -1
  57. package/lib/runtime/components/_X.js +1 -1
  58. package/lib/runtime/components/_utils.d.ts +2 -1
  59. package/lib/runtime/hooks/useSiteOverrides.js +1 -1
  60. package/lib/runtime/hooks/useTranslation.js +1 -1
  61. package/lib/shared/helpers.d.ts +1 -1
  62. package/lib/shared/helpers.js +1 -1
  63. package/lib/theme.d.ts +1 -1
  64. package/lib/theme.js +3 -3
  65. package/lib/types.d.ts +1 -1
  66. package/lib/utils/git.js +1 -1
  67. package/package.json +7 -7
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 { logger, serve } from '@rspress/core';
3
4
  import { removeLeadingSlash } from '@rspress/shared';
4
5
  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';
8
9
  import { watch } from 'chokidar';
9
10
  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/core';
2
3
  import { Command } from 'commander';
3
4
  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/shared';
1
+ import { type UserConfig } from '@rspress/core';
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 { logger } from '@rspress/core';
8
9
  import { pluginAlgolia } from '@rspress/plugin-algolia';
9
10
  import { pluginLlms } from '@rspress/plugin-llms';
10
11
  import { addLeadingSlash, addTrailingSlash, normalizeSlash, removeLeadingSlash, } from '@rspress/shared';
11
12
  import { transformerMetaHighlight, transformerMetaWordHighlight, transformerNotationDiff, transformerNotationErrorLevel, transformerNotationFocus, transformerNotationHighlight, transformerNotationWordHighlight, transformerRemoveNotationEscape, } from '@shikijs/transformers';
12
13
  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';
@@ -3,13 +3,13 @@ import fs from 'node:fs/promises';
3
3
  import path from 'node:path';
4
4
  import { setTimeout } from 'node:timers/promises';
5
5
  import { isDeepStrictEqual } from 'node:util';
6
+ import { logger } from '@rspress/core';
6
7
  import { removeLeadingSlash } from '@rspress/shared';
7
8
  import { Command } from 'commander';
8
9
  import { render } from 'ejs';
9
10
  import matter from 'gray-matter';
10
11
  import { AzureOpenAI, RateLimitError } from 'openai';
11
12
  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';
@@ -1,5 +1,5 @@
1
+ import { usePageData } from '@rspress/core/runtime';
1
2
  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';
2
3
  import { isExternalUrl, } from '@rspress/shared';
3
4
  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,4 +1,4 @@
1
- import { type NavItemWithLink } from '@rspress/shared';
1
+ import type { NavItemWithLink } from '@rspress/core';
2
2
  import { type ReactNode } from 'react';
3
3
  export interface NavMenuSingleItemProps extends Omit<NavItemWithLink, 'text'> {
4
4
  base?: string;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Tag } from '@rspress/core/theme';
2
3
  import { isExternalUrl } from '@rspress/shared';
3
4
  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';
2
3
  import {} from '@rspress/shared';
3
4
  import virtual from 'doom-@global-virtual';
4
5
  import { noop } from 'es-toolkit';
5
6
  import { useEffect, useMemo, useState } from 'react';
6
7
  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 { RspressPlugin } from 'rspress/core';
1
+ import type { RspressPlugin } from '@rspress/core';
2
2
  export declare const attributesPlugin: () => RspressPlugin;
@@ -1,4 +1,4 @@
1
- import { type RspressPlugin, type UserConfig } from '@rspress/shared';
1
+ import { type RspressPlugin, type UserConfig } from '@rspress/core';
2
2
  export type * from './walk.js';
3
3
  export type * from './type.js';
4
4
  export interface AutoSidebarPluginOptions {
@@ -1,5 +1,6 @@
1
1
  import path from 'node:path';
2
- import { addTrailingSlash, } from '@rspress/shared';
2
+ import {} from '@rspress/core';
3
+ import { addTrailingSlash } from '@rspress/shared';
3
4
  import { APIS_ROUTES } from '../../shared/index.js';
4
5
  import { combineWalkResult } from './utils.js';
5
6
  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/core';
3
4
  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,4 +1,5 @@
1
- import { type NavItem, type SidebarDivider, type SidebarGroup, type SidebarItem, type SidebarSectionHeader } from '@rspress/shared';
1
+ import { type SidebarDivider, type SidebarGroup, type SidebarItem, type SidebarSectionHeader } from '@rspress/core';
2
+ import { type NavItem } from '@rspress/shared';
2
3
  export interface DoomSidebarItem extends SidebarItem {
3
4
  weight?: number;
4
5
  }
@@ -1,9 +1,9 @@
1
1
  import fs from 'node:fs/promises';
2
2
  import path from 'node:path';
3
- import { isExternalUrl, removeLeadingSlash, removeTrailingSlash, slash, withBase, } from '@rspress/shared';
3
+ import { logger, removeTrailingSlash, withBase, } from '@rspress/core';
4
+ import { isExternalUrl, removeLeadingSlash, slash, } from '@rspress/shared';
4
5
  import { unset } from 'es-toolkit/compat';
5
6
  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 { RspressPlugin } from 'rspress/core';
1
+ import type { RspressPlugin } from '@rspress/core';
2
2
  export declare const directivesPlugin: () => RspressPlugin;
@@ -1,4 +1,4 @@
1
- import { type RspressPlugin } from '@rspress/shared';
1
+ import type { RspressPlugin } from '@rspress/core';
2
2
  import { type DoomSite } from '../../shared/index.js';
3
3
  import type { ExportItem } from '../../types.js';
4
4
  export interface GlobalPluginOptions {
@@ -1,2 +1,2 @@
1
- import type { RspressPlugin } from 'rspress/core';
1
+ import type { RspressPlugin } from '@rspress/core';
2
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/core';
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,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 { logger } from '@rspress/core';
4
5
  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 { logger } from '@rspress/core';
3
4
  import { isProduction } from '@rspress/shared';
4
5
  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/core';
1
2
  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/core';
1
2
  import remarkFrontmatter from 'remark-frontmatter';
2
3
  import remarkGfm from 'remark-gfm';
3
4
  import remarkMdx from 'remark-mdx';
4
5
  import remarkParse from 'remark-parse';
5
6
  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,4 +1,4 @@
1
- import type { RspressPlugin } from '@rspress/shared';
1
+ import { type RspressPlugin } from '@rspress/core';
2
2
  export type ChangeFreq = 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never';
3
3
  export type Priority = '0.0' | '0.1' | '0.2' | '0.3' | '0.4' | '0.5' | '0.6' | '0.7' | '0.8' | '0.9' | '1.0';
4
4
  export interface Sitemap {
@@ -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/core';
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/theme';
1
+ export { Badge, Badge as default } from '@rspress/core/theme';
@@ -1 +1 @@
1
- export { Badge, Badge as default } from 'rspress/theme';
1
+ export { Badge, Badge as default } from '@rspress/core/theme';
@@ -1 +1 @@
1
- export { Card, Card as default } from 'rspress/theme';
1
+ export { Card, Card as default } from '@rspress/core/theme';
@@ -1 +1 @@
1
- export { Card, Card as default } from 'rspress/theme';
1
+ export { Card, Card as default } from '@rspress/core/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';
2
3
  import { addTrailingSlash, isExternalUrl, normalizeHref, parseUrl, removeLeadingSlash, } from '@rspress/shared';
3
4
  import { DEFAULT_PAGE_EXTENSIONS } from '@rspress/shared/constants';
4
5
  import { clsx } from 'clsx';
5
6
  import virtual from 'doom-@global-virtual';
6
7
  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/theme';
2
+ import { CodeBlockRuntime, Tab, Tabs } from '@rspress/core/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';
5
6
  import crdsMap from 'doom-@api-crdsMap';
6
7
  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';
2
3
  import functionResourcesMap from 'doom-@permission-functionResourcesMap';
3
4
  import roleTemplatesMap from 'doom-@permission-roleTemplatesMap';
4
5
  import { intersection, sortBy } from 'es-toolkit';
5
6
  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/theme';
1
+ export { LinkCard, LinkCard as default } from '@rspress/core/theme';
@@ -1 +1 @@
1
- export { LinkCard, LinkCard as default } from 'rspress/theme';
1
+ export { LinkCard, LinkCard as default } from '@rspress/core/theme';
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useDark } from '@rspress/core/runtime';
2
3
  import { clsx } from 'clsx';
3
4
  import mermaid from 'mermaid';
4
5
  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';
2
4
  import openapisMap from 'doom-@api-openapisMap';
3
5
  import virtual from 'doom-@api-virtual';
4
6
  import BananaSlug from 'github-slugger';
5
7
  import { OpenAPIV3 } from 'openapi-types';
6
8
  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';
2
3
  import openapisMap from 'doom-@api-openapisMap';
3
4
  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 { isEqualPath, normalizeHrefInRuntime as normalizeHref, usePageData, } from '@rspress/runtime';
2
+ import { isEqualPath, normalizeHrefInRuntime as normalizeHref, usePageData, } from '@rspress/core/runtime';
3
+ import { Link, renderInlineMarkdown, useSidebarData } from '@rspress/core/theme';
3
4
  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/theme';
1
+ export { PackageManagerTabs, PackageManagerTabs as default, } from '@rspress/core/theme';
@@ -1 +1 @@
1
- export { PackageManagerTabs, PackageManagerTabs as default, } from 'rspress/theme';
1
+ export { PackageManagerTabs, PackageManagerTabs as default, } from '@rspress/core/theme';
@@ -1 +1 @@
1
- export { Steps, Steps as default } from 'rspress/theme';
1
+ export { Steps, Steps as default } from '@rspress/core/theme';
@@ -1 +1 @@
1
- export { Steps, Steps as default } from 'rspress/theme';
1
+ export { Steps, Steps as default } from '@rspress/core/theme';
@@ -1 +1 @@
1
- export { Tab, Tab as default } from 'rspress/theme';
1
+ export { Tab, Tab as default } from '@rspress/core/theme';
@@ -1 +1 @@
1
- export { Tab, Tab as default } from 'rspress/theme';
1
+ export { Tab, Tab as default } from '@rspress/core/theme';
@@ -1,5 +1,5 @@
1
+ import { Tabs as Tabs_ } from '@rspress/core/theme';
1
2
  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';
2
3
  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/theme';
1
+ export { Toc, Toc as default } from '@rspress/core/theme';
@@ -1 +1 @@
1
- export { Toc, Toc as default } from 'rspress/theme';
1
+ export { Toc, Toc as default } from '@rspress/core/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';
2
3
  import virtual from 'doom-@global-virtual';
3
4
  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/theme';
1
+ import { getCustomMDXComponent } from '@rspress/core/theme';
2
2
  export const X = getCustomMDXComponent();
@@ -1,4 +1,5 @@
1
- import type { NormalizedSidebarGroup, SidebarDivider, SidebarItem, SidebarSectionHeader } from '@rspress/shared';
1
+ import type { SidebarDivider, SidebarItem, SidebarSectionHeader } from '@rspress/core';
2
+ import type { NormalizedSidebarGroup } from '@rspress/shared';
2
3
  export declare const isSidebarDivider: (item: NormalizedSidebarGroup | SidebarItem | SidebarDivider | SidebarSectionHeader) => item is SidebarDivider;
3
4
  export declare const isSidebarSectionHeader: (item: NormalizedSidebarGroup | SidebarItem | SidebarDivider | SidebarSectionHeader) => item is SidebarSectionHeader;
4
5
  export declare const isSingleFile: (item: SidebarItem | SidebarSectionHeader | SidebarDivider | NormalizedSidebarGroup) => item is SidebarItem | (NormalizedSidebarGroup & {
@@ -1,7 +1,7 @@
1
+ import { isProduction, withBase } from '@rspress/core/runtime';
1
2
  import virtual from 'doom-@global-virtual';
2
3
  import { merge } from 'es-toolkit/compat';
3
4
  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';
1
2
  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 = () => {
@@ -1,4 +1,4 @@
1
- import { type NavItemWithLink } from '@rspress/shared';
1
+ import type { NavItemWithLink } from '@rspress/core';
2
2
  import type { UnversionedVersion } from './types.ts';
3
3
  export declare const removeBothEndsSlashes: (str?: string) => string;
4
4
  export declare const getPdfName: (lang: string, userBase?: string, title?: string) => string;
@@ -1,4 +1,4 @@
1
- import { addLeadingSlash, normalizeSlash, } from '@rspress/shared';
1
+ import { addLeadingSlash, normalizeSlash } from '@rspress/shared';
2
2
  import { UNVERSIONED, UNVERSIONED_PREFIX } from "./constants.js";
3
3
  export const removeBothEndsSlashes = (str) => str?.replace(/^\/|\/$/g, '') || '';
4
4
  export const getPdfName = (lang, userBase, title) => `${removeBothEndsSlashes(userBase) || title || 'exported'}-${lang}.pdf`;
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/theme';
3
+ export * from '@rspress/core/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';
2
4
  import { Search as AlgoliaSearch, ZH_LOCALES, } from '@rspress/plugin-algolia/runtime';
3
5
  import virtual from 'doom-@global-virtual';
4
6
  import { useMemo } from 'react';
5
7
  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/theme';
11
+ export * from '@rspress/core/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/core';
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.10.7",
3
+ "version": "1.10.9",
4
4
  "type": "module",
5
5
  "description": "Doctor Doom making docs.",
6
6
  "repository": "git+https://github.com/alauda/doom.git",
@@ -36,7 +36,7 @@
36
36
  "rspress-plugins"
37
37
  ],
38
38
  "dependencies": {
39
- "@cspell/eslint-plugin": "^8.19.4 || ^9.1.5",
39
+ "@cspell/eslint-plugin": "^8.19.4 || ^9.2.0",
40
40
  "@eslint-react/eslint-plugin": "^1.52.3",
41
41
  "@inquirer/prompts": "^7.7.1",
42
42
  "@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
@@ -45,9 +45,10 @@
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/plugin-algolia": "2.0.0-beta.21",
49
- "@rspress/plugin-llms": "2.0.0-beta.21",
50
- "@rspress/shared": "2.0.0-beta.21",
48
+ "@rspress/core": "2.0.0-beta.22",
49
+ "@rspress/plugin-algolia": "2.0.0-beta.22",
50
+ "@rspress/plugin-llms": "2.0.0-beta.22",
51
+ "@rspress/shared": "2.0.0-beta.22",
51
52
  "@shikijs/transformers": "^3.8.1",
52
53
  "@total-typescript/ts-reset": "^0.6.1",
53
54
  "chokidar": "^4.0.3",
@@ -67,7 +68,7 @@
67
68
  "mdast-util-to-markdown": "^2.1.2",
68
69
  "mdast-util-to-string": "^4.0.0",
69
70
  "mermaid": "^11.9.0",
70
- "openai": "^5.10.1",
71
+ "openai": "^5.10.2",
71
72
  "openapi-types": "^12.1.3",
72
73
  "p-ratelimit": "^1.0.1",
73
74
  "pdf-lib": "^1.17.1",
@@ -90,7 +91,6 @@
90
91
  "remark-mdx": "^3.1.0",
91
92
  "remark-message-control": "^8.0.0",
92
93
  "remark-stringify": "^11.0.0",
93
- "rspress": "2.0.0-beta.21",
94
94
  "shiki": "^3.8.1",
95
95
  "simple-git": "^3.28.0",
96
96
  "string-width": "^7.2.0",