@alauda/doom 1.17.2 → 1.17.4

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.
@@ -8,7 +8,6 @@ import { pluginSvgr } from '@rsbuild/plugin-svgr';
8
8
  import { pluginYaml } from '@rsbuild/plugin-yaml';
9
9
  import { logger } from '@rspress/core';
10
10
  import { pluginAlgolia } from '@rspress/plugin-algolia';
11
- import { pluginLlms } from '@rspress/plugin-llms';
12
11
  import { pluginSitemap } from '@rspress/plugin-sitemap';
13
12
  import { addLeadingSlash, addTrailingSlash, removeLeadingSlash, } from '@rspress/shared';
14
13
  import { transformerMetaHighlight, transformerMetaWordHighlight, transformerNotationDiff, transformerNotationErrorLevel, transformerNotationFocus, transformerNotationHighlight, transformerNotationWordHighlight, transformerRemoveNotationEscape, } from '@shikijs/transformers';
@@ -169,7 +168,6 @@ const getCommonConfig = async ({ config, root, configFilePath, base, version, do
169
168
  },
170
169
  plugins: [
171
170
  algoliaOptions && pluginAlgolia(),
172
- pluginLlms(),
173
171
  siteUrl &&
174
172
  config.siteUrl &&
175
173
  pluginSitemap({
@@ -239,8 +237,7 @@ const getCommonConfig = async ({ config, root, configFilePath, base, version, do
239
237
  ssg: {
240
238
  experimentalWorker: true,
241
239
  },
242
- // https://github.com/web-infra-dev/rspress/issues/2894
243
- // llms: true,
240
+ llms: true,
244
241
  };
245
242
  };
246
243
  const findConfig = async (basePath) => {
@@ -27,7 +27,9 @@ export const SiteOverrides = () => {
27
27
  const { siteData, page } = usePageData();
28
28
  const { pageType,
29
29
  // Inject by remark-plugin-toc
30
- title: articleTitle, frontmatter = {}, } = page;
30
+ title: articleTitle,
31
+ // eslint-disable-next-line @typescript-eslint/no-useless-default-assignment
32
+ frontmatter = {}, } = page;
31
33
  const { title, logoText } = useSiteOverrides();
32
34
  useEffect(() => {
33
35
  if (!title) {
@@ -49,9 +51,12 @@ export const SiteOverrides = () => {
49
51
  else {
50
52
  newTitle = title;
51
53
  }
52
- requestAnimationFrame(() => {
54
+ const timeoutId = setTimeout(() => {
53
55
  document.title = newTitle;
54
- });
56
+ }, 1);
57
+ return () => {
58
+ clearTimeout(timeoutId);
59
+ };
55
60
  }, [
56
61
  articleTitle,
57
62
  frontmatter.title,
@@ -164,7 +164,8 @@ export const autoSidebar = async (config, { ignore, export: export_ }) => {
164
164
  const exclude = (route.exclude ??= []);
165
165
  exclude.push(...excludeRoutes);
166
166
  // only exclude apis routes for sidebar but not site data to avoid dead links
167
- if (export_) {
167
+ if (export_ &&
168
+ !onlyIncludeRoutes.some((route) => route.startsWith('apis/') || route.startsWith('*/apis/'))) {
168
169
  excludeRoutes.push(...APIS_ROUTES);
169
170
  }
170
171
  }
@@ -146,7 +146,9 @@ export async function scanSideMeta(workDir, rootDir, docsDir, routePrefix, exten
146
146
  _fileKey: path.relative(docsDir, path.join(workDir, metaItem)),
147
147
  };
148
148
  }
149
- const { type = 'file', name, label = '', collapsible, collapsed = true, link, tag, dashed, overviewHeaders, context, } = metaItem;
149
+ const {
150
+ // eslint-disable-next-line @typescript-eslint/no-useless-default-assignment
151
+ type = 'file', name, label = '', collapsible, collapsed = true, link, tag, dashed, overviewHeaders, context, } = metaItem;
150
152
  // when type is divider, name maybe undefined, and link is not used
151
153
  const pureLink = `${relativePath}/${name.replace(/\.mdx?$/, '')}`;
152
154
  if (type === 'file') {
@@ -40,7 +40,13 @@ export const globalPlugin = ({ version, download, }) => {
40
40
  };
41
41
  },
42
42
  addPages(config) {
43
- const loginPath = baseResolve('login');
43
+ let loginPath;
44
+ for (const ext of ['.js', '.tsx']) {
45
+ loginPath = baseResolve(`login/index${ext}`);
46
+ if (fs.existsSync(loginPath)) {
47
+ break;
48
+ }
49
+ }
44
50
  if ((config.themeConfig?.locales?.length ?? 0) < 1) {
45
51
  return [
46
52
  {
@@ -1,3 +1,3 @@
1
1
  import type { Language } from '../../shared/index.js';
2
2
  export declare const useLang: () => Language;
3
- export declare const useTranslation: () => (key: "function" | "name" | "description" | "delete" | "toc" | "login" | "create" | "update" | "password" | "close" | "collapse_all" | "expand_all" | "crd_no_schema" | "action" | "view" | "chinese" | "english" | "chinese_bad_cases" | "english_bad_cases" | "download_pdf" | "view_docs_as_pdf" | "ai_assistant" | "exclamation" | "semicolon" | "period" | "colon" | "user_login" | "user_login_tip1" | "user_login_tip2" | "customer_portal_global" | "customer_portal_china" | "account_id" | "username" | "captcha" | "current_field" | "field_required" | "ERR_INTERNET_DISCONNECTED" | "AccountDisabledError" | "CaptchaError" | "LoginError" | "NetworkError" | "TenantError" | "TenantNotFoundError" | "logout" | "hi_there" | "ai_assistant_tip" | "ai_assistant_placeholder" | "max_chars_exceeded_tip" | "thinking" | "thinking_process" | "referenced_doc_links" | "view_more_related_docs" | "view_less_related_docs" | "new_chat") => string;
3
+ export declare const useTranslation: () => (key: "function" | "name" | "description" | "delete" | "toc" | "create" | "update" | "password" | "close" | "collapse_all" | "expand_all" | "crd_no_schema" | "action" | "view" | "chinese" | "english" | "chinese_bad_cases" | "english_bad_cases" | "download_pdf" | "view_docs_as_pdf" | "ai_assistant" | "exclamation" | "semicolon" | "period" | "colon" | "user_login" | "user_login_tip1" | "user_login_tip2" | "customer_portal_global" | "customer_portal_china" | "account_id" | "username" | "captcha" | "login" | "current_field" | "field_required" | "ERR_INTERNET_DISCONNECTED" | "AccountDisabledError" | "CaptchaError" | "LoginError" | "NetworkError" | "TenantError" | "TenantNotFoundError" | "logout" | "hi_there" | "ai_assistant_tip" | "ai_assistant_placeholder" | "max_chars_exceeded_tip" | "thinking" | "thinking_process" | "referenced_doc_links" | "view_more_related_docs" | "view_less_related_docs" | "new_chat") => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alauda/doom",
3
- "version": "1.17.2",
3
+ "version": "1.17.4",
4
4
  "type": "module",
5
5
  "description": "Doctor Doom making docs.",
6
6
  "repository": {
@@ -42,18 +42,17 @@
42
42
  "dependencies": {
43
43
  "@alauda/doom-export": "^0.3.1",
44
44
  "@cspell/eslint-plugin": "^9.4.0",
45
- "@eslint-react/eslint-plugin": "^2.3.13",
45
+ "@eslint-react/eslint-plugin": "^2.4.0",
46
46
  "@inquirer/prompts": "^8.1.0",
47
47
  "@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
48
48
  "@rsbuild/plugin-react": "^1.4.2",
49
49
  "@rsbuild/plugin-sass": "^1.4.0",
50
50
  "@rsbuild/plugin-svgr": "^1.2.3",
51
51
  "@rsbuild/plugin-yaml": "^1.0.3",
52
- "@rspress/core": "2.0.0-rc.2",
53
- "@rspress/plugin-algolia": "2.0.0-rc.2",
54
- "@rspress/plugin-llms": "2.0.0-rc.2",
55
- "@rspress/plugin-sitemap": "2.0.0-rc.2",
56
- "@rspress/shared": "2.0.0-rc.2",
52
+ "@rspress/core": "2.0.0-rc.3",
53
+ "@rspress/plugin-algolia": "2.0.0-rc.3",
54
+ "@rspress/plugin-sitemap": "2.0.0-rc.3",
55
+ "@rspress/shared": "2.0.0-rc.3",
57
56
  "@shikijs/transformers": "^3.20.0",
58
57
  "@total-typescript/ts-reset": "^0.6.1",
59
58
  "@types/react": "^19.2.7",
@@ -74,7 +73,7 @@
74
73
  "mdast-util-to-markdown": "^2.1.2",
75
74
  "mdast-util-to-string": "^4.0.0",
76
75
  "mermaid": "^11.12.2",
77
- "openai": "^6.10.0",
76
+ "openai": "^6.15.0",
78
77
  "openapi-types": "^12.1.3",
79
78
  "p-ratelimit": "^1.0.1",
80
79
  "picomatch": "^4.0.3",
@@ -102,7 +101,7 @@
102
101
  "tinyglobby": "^0.2.15",
103
102
  "type-fest": "^5.3.1",
104
103
  "typescript": "^5.9.3",
105
- "typescript-eslint": "^8.49.0",
104
+ "typescript-eslint": "^8.50.1",
106
105
  "unified": "^11.0.5",
107
106
  "unified-lint-rule": "^3.0.1",
108
107
  "unist-util-position": "^5.0.0",
@@ -4,10 +4,10 @@
4
4
  position: fixed;
5
5
  right: 1rem;
6
6
  bottom: 1rem;
7
- z-index: 10;
7
+ z-index: var(--rp-z-index-nav);
8
8
  background-color: var(--rp-c-bg);
9
- width: calc(min(100vw, 440px));
10
- height: calc(min(100vh, 700px));
9
+ width: min(100vw, 440px);
10
+ height: min(calc(100vh - 2rem), 700px);
11
11
  padding: 16px;
12
12
  box-shadow: 0px 0px 8px 0px var(--rp-c-divider);
13
13
  border-radius: 8px;
@@ -147,8 +147,6 @@ td {
147
147
 
148
148
  &-doc-layout__doc-container {
149
149
  padding: 0;
150
- // https://github.com/web-infra-dev/rspress/issues/2909
151
- min-height: unset;
152
150
  }
153
151
 
154
152
  &-toc-item--active .rp-toc-item__text {