@alauda/doom 0.5.4 → 0.5.5

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.
@@ -33,7 +33,7 @@ export async function extractInfoFromFrontmatter(filePath, rootDir, extensions)
33
33
  const fileNameWithoutExt = path.basename(realPath, path.extname(realPath));
34
34
  const h1RegExp = /^#\s+(.*)$/m;
35
35
  const match = content.match(h1RegExp);
36
- let contentTitle = match?.[1];
36
+ let contentTitle = match?.[1]?.trim();
37
37
  if (contentTitle) {
38
38
  contentTitle =
39
39
  contentTitle.match(/{\s*useI18n\s*\(\s*\)\s*\(\s*(['"])([^'"]+)\1\s*\)\s*}/m)?.[2] ?? contentTitle;
@@ -122,7 +122,7 @@ export function Overview(props) {
122
122
  }
123
123
  return [];
124
124
  }, [overviewSidebarGroups, routePath, frontmatter]);
125
- return (_jsxs("div", { className: "overview-index mx-auto", children: [content, groups.map((group) => (_jsxs(Fragment, { children: [(group.name === title || group.name === defaultGroupTitle) &&
125
+ return (_jsxs("div", { className: "overview-index mx-auto", children: [content, groups.map((group) => (_jsxs(Fragment, { children: [(!title || [title, defaultGroupTitle].includes(group.name)) &&
126
126
  groups.length === 1 ? (_jsx("h2", { style: { paddingTop: 0 } })) : (_jsx("h2", { children: renderInlineMarkdown(group.name) })), _jsx("div", { className: classes.overviewGroups, children: group.items.map((item) => (_jsxs("div", { className: classes.overviewGroup, children: [_jsx("div", { className: "flex break-all", children: _jsx("h3", { style: { marginBottom: 8 }, children: _jsx(Link, { href: normalizeHref(item.link), children: renderInlineMarkdown(item.text) }) }) }), _jsx("div", { className: classes.overviewDescription, children: item.description }), _jsx("ul", { className: "list-none", children: item.headers?.map((header) => (_jsx("li", { className: `${classes.overviewGroupLi} ${classes[`level${header.depth}`]} first:mt-2`, children: _jsx(Link, { href: `${normalizeHref(item.link)}#${header.id}`, children: renderInlineMarkdown(header.text) }) }, header.id))) })] }, item.link))) })] }, group.name)))] }));
127
127
  }
128
128
  export default Overview;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alauda/doom",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "type": "module",
5
5
  "description": "Doctor Doom making docs.",
6
6
  "repository": {
@@ -40,9 +40,9 @@
40
40
  "dependencies": {
41
41
  "@inquirer/prompts": "^7.2.1",
42
42
  "@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
43
- "@rspress/core": "^1.38.0",
44
- "@rspress/plugin-preview": "^1.38.0",
45
- "@shikijs/transformers": "^1.24.3",
43
+ "@rspress/core": "^1.39.2",
44
+ "@rspress/plugin-preview": "^1.39.2",
45
+ "@shikijs/transformers": "^1.24.4",
46
46
  "chokidar": "^4.0.3",
47
47
  "clsx": "^2.1.1",
48
48
  "commander": "^12.1.0",
@@ -53,11 +53,11 @@
53
53
  "react-markdown": "^8.0.7",
54
54
  "rehype-raw": "^6.1.1",
55
55
  "remark-gfm": "^3.0.1",
56
- "shiki": "^1.24.3",
56
+ "shiki": "^1.24.4",
57
57
  "simple-git": "^3.27.0",
58
58
  "swagger2openapi": "^7.0.8",
59
59
  "tinyglobby": "^0.2.10",
60
- "type-fest": "^4.30.2",
60
+ "type-fest": "^4.31.0",
61
61
  "yaml": "^2.6.1",
62
62
  "yoctocolors": "^2.1.1"
63
63
  },
@@ -65,7 +65,7 @@
65
65
  "@eslint/js": "^9.17.0",
66
66
  "@swc-node/register": "^1.10.9",
67
67
  "@swc/core": "1.10.1",
68
- "@types/ejs": "^3",
68
+ "@types/ejs": "^3.1.5",
69
69
  "@types/eslint__js": "^8.42.3",
70
70
  "@types/fs-extra": "^11.0.4",
71
71
  "@types/node": "^18.19.68",
@@ -78,7 +78,7 @@
78
78
  "prettier-plugin-pkg": "^0.18.1",
79
79
  "simple-git-hooks": "^2.11.1",
80
80
  "typescript": "^5.7.2",
81
- "typescript-eslint": "^8.18.1"
81
+ "typescript-eslint": "^8.18.2"
82
82
  },
83
83
  "publishConfig": {
84
84
  "access": "public"