@alauda/doom 1.10.9 → 1.10.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.
@@ -62,7 +62,7 @@ export async function getOutlineNodes(page, tags, outlineContainerSelector = '')
62
62
  else {
63
63
  const newNode = {
64
64
  // http://perfectionkills.com/the-poor-misunderstood-innerText/
65
- title: tag.textContent?.trim().replace(/^#|#$/, '') ?? '',
65
+ title: tag.textContent.trim().replace(/^#|#$/, ''),
66
66
  destination: dest,
67
67
  children: [],
68
68
  depth: orderDepth,
@@ -144,7 +144,7 @@ export class Printer extends EventEmitter {
144
144
  const meta = {};
145
145
  const title = document.querySelector('title');
146
146
  if (title) {
147
- meta.title = title.textContent?.trim();
147
+ meta.title = title.textContent.trim();
148
148
  }
149
149
  const lang = document.querySelector('html')?.getAttribute('lang');
150
150
  if (lang) {
@@ -145,7 +145,6 @@ const getCommonConfig = async ({ config, root, configFilePath, base, version, do
145
145
  ],
146
146
  },
147
147
  markdown: {
148
- checkDeadLinks: true,
149
148
  shiki: {
150
149
  transformers: [
151
150
  // builtin transformers
@@ -24,6 +24,7 @@ const concatTitle = (title, suffix) => {
24
24
  return `${title} ${suffix}`;
25
25
  };
26
26
  export const SiteOverrides = () => {
27
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- `usePage` is not exported...
27
28
  const { siteData, page } = usePageData();
28
29
  const { pageType,
29
30
  // Inject by remark-plugin-toc
@@ -27,6 +27,7 @@ if (!isProduction()) {
27
27
  ALLOWED_LEGACY_DOMAINS.add('localhost');
28
28
  }
29
29
  const VersionsNav_ = () => {
30
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- `usePage` is not exported...
30
31
  const { siteData } = usePageData();
31
32
  const lang = useLang();
32
33
  const t = useTranslation();
@@ -11,6 +11,7 @@ import { useIsPrint } from '../hooks/index.js';
11
11
  import { Directive } from './Directive.js';
12
12
  const ExternalSiteLink_ = ({ name, href = '', className, ...props }) => {
13
13
  const isPrint = useIsPrint();
14
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- `usePage` is not exported...
14
15
  const { siteData } = usePageData();
15
16
  const site = useMemo(() => virtual.sites?.find((s) => s.name === name), [name]);
16
17
  const lang = useLang();
@@ -92,6 +92,7 @@ const getRefsForPath = (openapi, path, knownRefs) => {
92
92
  return Array.from(refs);
93
93
  };
94
94
  export const OpenAPIPath = ({ path, openapiPath: openapiPath_, pathPrefix: pathPrefix_, }) => {
95
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- `usePage` is not exported...
95
96
  const { page } = usePageData();
96
97
  const pathPrefix = pathPrefix_ ?? (virtual.pathPrefix || '');
97
98
  const uid = useId();
@@ -70,6 +70,7 @@ const getRefsForSchema = (openapi, schema, knownRefs) => {
70
70
  return Array.from(refs);
71
71
  };
72
72
  export const OpenAPIRef = ({ schema, openapiPath: openapiPath_, isCommonRef = true, collectRefs = true, }) => {
73
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- `usePage` is not exported...
73
74
  const { page } = usePageData();
74
75
  let uid = useUid();
75
76
  const innerUid = useId();
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { isEqualPath, normalizeHrefInRuntime as normalizeHref, usePageData, } from '@rspress/core/runtime';
3
- import { Link, renderInlineMarkdown, useSidebarData } from '@rspress/core/theme';
2
+ import { isEqualPath, normalizeHrefInRuntime as normalizeHref, usePageData, useSidebar, } from '@rspress/core/runtime';
3
+ import { Link, renderInlineMarkdown } from '@rspress/core/theme';
4
4
  import { Fragment, useCallback, useMemo } from 'react';
5
5
  import classes from '../../../styles/overview.module.scss';
6
6
  import { findItemByRoutePath, isSidebarDivider, isSidebarSectionHeader, isSingleFile, } from './_utils.js';
@@ -17,7 +17,9 @@ const getChildLink = (traverseItem) => {
17
17
  // In overpage page, we select all the related sidebar groups and show the groups in the page.
18
18
  // In the meantime, some sidebar items also should be shown in the page, we collect them in the group named 'Others' and show them in the page.
19
19
  export function Overview(props) {
20
- const { siteData, page: { routePath, frontmatter, title }, } = usePageData();
20
+ const { siteData, page: { routePath, frontmatter, title },
21
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- `usePage` is not exported...
22
+ } = usePageData();
21
23
  const { content, groups: customGroups, defaultGroupTitle = 'Others' } = props;
22
24
  const subFilter = useCallback((link) =>
23
25
  // sidebar items link without base path
@@ -26,7 +28,7 @@ export function Overview(props) {
26
28
  !isEqualPath(link, routePath), [routePath]);
27
29
  const { pages } = siteData;
28
30
  const overviewModules = useMemo(() => pages.filter((page) => subFilter(page.routePath)), [pages, subFilter]);
29
- let overviewSidebarGroups = useSidebarData();
31
+ let overviewSidebarGroups = useSidebar();
30
32
  if (overviewSidebarGroups[0] &&
31
33
  'link' in overviewSidebarGroups[0] &&
32
34
  overviewSidebarGroups[0]?.link !== routePath) {
@@ -17,7 +17,7 @@ export function useIsPrintMedia() {
17
17
  const [printMediaQuery] = useState(getPrintMediaQuery);
18
18
  const [isPrint, changeIsPrint] = useState(!!printMediaQuery?.matches);
19
19
  const onChange = useCallback((mqList) => {
20
- changeIsPrint(!!mqList.matches);
20
+ changeIsPrint(mqList.matches);
21
21
  }, []);
22
22
  useEffect(() => {
23
23
  printMediaQuery?.addEventListener('change', onChange);
package/lib/theme.js CHANGED
@@ -50,7 +50,9 @@ const getClosestSidebar = (sidebarItems, pathname) => {
50
50
  };
51
51
  // eslint-disable-next-line import-x/export
52
52
  export const Layout = () => {
53
- const { siteData: { lang: siteLang, themeConfig }, } = usePageData();
53
+ const { siteData: { lang: siteLang, themeConfig },
54
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- `usePage` is not exported...
55
+ } = usePageData();
54
56
  const lang = useLang();
55
57
  const t = useTranslation();
56
58
  const { pathname } = useLocation();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alauda/doom",
3
- "version": "1.10.9",
3
+ "version": "1.10.10",
4
4
  "type": "module",
5
5
  "description": "Doctor Doom making docs.",
6
6
  "repository": "git+https://github.com/alauda/doom.git",
@@ -37,27 +37,27 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@cspell/eslint-plugin": "^8.19.4 || ^9.2.0",
40
- "@eslint-react/eslint-plugin": "^1.52.3",
41
- "@inquirer/prompts": "^7.7.1",
40
+ "@eslint-react/eslint-plugin": "^1.52.4",
41
+ "@inquirer/prompts": "^7.8.2",
42
42
  "@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
43
- "@playwright/browser-chromium": "^1.54.1",
44
- "@rsbuild/plugin-react": "^1.3.4",
45
- "@rsbuild/plugin-sass": "^1.3.3",
46
- "@rsbuild/plugin-svgr": "^1.2.1",
47
- "@rsbuild/plugin-yaml": "^1.0.2",
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",
52
- "@shikijs/transformers": "^3.8.1",
43
+ "@playwright/browser-chromium": "^1.54.2",
44
+ "@rsbuild/plugin-react": "^1.3.5",
45
+ "@rsbuild/plugin-sass": "^1.3.5",
46
+ "@rsbuild/plugin-svgr": "^1.2.2",
47
+ "@rsbuild/plugin-yaml": "^1.0.3",
48
+ "@rspress/core": "2.0.0-beta.26",
49
+ "@rspress/plugin-algolia": "2.0.0-beta.26",
50
+ "@rspress/plugin-llms": "2.0.0-beta.26",
51
+ "@rspress/shared": "2.0.0-beta.26",
52
+ "@shikijs/transformers": "^3.9.2",
53
53
  "@total-typescript/ts-reset": "^0.6.1",
54
54
  "chokidar": "^4.0.3",
55
55
  "cli-progress": "^3.12.0",
56
56
  "clsx": "^2.1.1",
57
57
  "commander": "^13.1.0 || ^14.0.0",
58
58
  "ejs": "^3.1.10",
59
- "es-toolkit": "^1.39.7",
60
- "eslint": "^9.31.0",
59
+ "es-toolkit": "^1.39.9",
60
+ "eslint": "^9.33.0",
61
61
  "eslint-plugin-mdx": "^3.6.2",
62
62
  "globals": "^16.3.0",
63
63
  "html-tag-names": "^2.1.0",
@@ -68,13 +68,13 @@
68
68
  "mdast-util-to-markdown": "^2.1.2",
69
69
  "mdast-util-to-string": "^4.0.0",
70
70
  "mermaid": "^11.9.0",
71
- "openai": "^5.10.2",
71
+ "openai": "^5.12.2",
72
72
  "openapi-types": "^12.1.3",
73
73
  "p-ratelimit": "^1.0.1",
74
74
  "pdf-lib": "^1.17.1",
75
75
  "pdf-merger-js": "^5.1.2",
76
76
  "picomatch": "^4.0.3",
77
- "playwright": "^1.54.1",
77
+ "playwright": "^1.54.2",
78
78
  "pluralize": "^8.0.0",
79
79
  "react-markdown": "^10.1.0",
80
80
  "rehype-raw": "^7.0.0",
@@ -91,20 +91,20 @@
91
91
  "remark-mdx": "^3.1.0",
92
92
  "remark-message-control": "^8.0.0",
93
93
  "remark-stringify": "^11.0.0",
94
- "shiki": "^3.8.1",
94
+ "shiki": "^3.9.2",
95
95
  "simple-git": "^3.28.0",
96
96
  "string-width": "^7.2.0",
97
97
  "swagger2openapi": "^7.0.8",
98
98
  "tinyglobby": "^0.2.14",
99
99
  "type-fest": "^4.41.0",
100
- "typescript": "^5.8.3",
101
- "typescript-eslint": "^8.38.0",
100
+ "typescript": "^5.9.2",
101
+ "typescript-eslint": "^8.39.1",
102
102
  "unified": "^11.0.5",
103
103
  "unified-lint-rule": "^3.0.1",
104
104
  "unist-util-position": "^5.0.0",
105
105
  "unist-util-visit-parents": "^6.0.1",
106
106
  "x-fetch": "^0.2.6",
107
- "yaml": "^2.8.0",
107
+ "yaml": "^2.8.1",
108
108
  "yoctocolors": "^2.1.1"
109
109
  },
110
110
  "publishConfig": {