@alauda/doom 1.0.2 → 1.0.3
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.
package/lib/cli/translate.js
CHANGED
|
@@ -247,6 +247,9 @@ export const translateCommand = new Command('translate')
|
|
|
247
247
|
if (sourceFrontmatter.i18n?.title?.[target]) {
|
|
248
248
|
newFrontmatter.title = sourceFrontmatter.i18n.title[target];
|
|
249
249
|
}
|
|
250
|
+
if (typeof newFrontmatter.title !== 'string') {
|
|
251
|
+
delete newFrontmatter.title;
|
|
252
|
+
}
|
|
250
253
|
targetContent = matter.stringify(content.startsWith('\n') ? content : '\n' + content, newFrontmatter);
|
|
251
254
|
await fs.mkdir(targetBase, { recursive: true });
|
|
252
255
|
await fs.writeFile(targetFilePath, targetContent);
|
|
@@ -33,7 +33,7 @@ const ExternalSiteLink_ = ({ name, href = '', className, ...props }) => {
|
|
|
33
33
|
? site.base
|
|
34
34
|
: addTrailingSlash(site.base + site.version)) +
|
|
35
35
|
(lang ? addTrailingSlash(lang) : '') +
|
|
36
|
-
(hash ? `${url}#${hash}` : url), target: "_blank", rel: "noopener noreferrer", className: clsx(classes.link, 'cursor-pointer', className), ...props }));
|
|
36
|
+
(hash ? `${url}#${hash}` : url), target: "_blank", rel: "noopener noreferrer", className: clsx(classes.link, 'rp-cursor-pointer', className), ...props }));
|
|
37
37
|
};
|
|
38
38
|
export const ExternalSiteLink = (props) => (_jsx(NoSSR, { children: _jsx(ExternalSiteLink_, { ...props }) }));
|
|
39
39
|
export default ExternalSiteLink;
|
|
@@ -51,7 +51,7 @@ export const K8sCrdSchema = ({ schema, version, }) => {
|
|
|
51
51
|
const toggleExpandAll = useCallback(() => {
|
|
52
52
|
setExpandAll((all) => !all);
|
|
53
53
|
}, []);
|
|
54
|
-
return (_jsxs(_Fragment, { children: [_jsx(Markdown, { children: description }), _jsxs("div", { className: "flex items-center", children: [_jsxs("span", { children: [_jsx("code", { children: version }), " ", _jsx(Badge, { children: "version" })] }), !isPrint && properties != null && (_jsx(Button, { className: "ml-auto doom-btn", type: "button",
|
|
54
|
+
return (_jsxs(_Fragment, { children: [_jsx(Markdown, { children: description }), _jsxs("div", { className: "rp-flex rp-items-center", children: [_jsxs("span", { children: [_jsx("code", { children: version }), " ", _jsx(Badge, { children: "version" })] }), !isPrint && properties != null && (_jsx(Button, { className: "rp-ml-auto doom-btn", type: "button", size: "medium", theme: "alt", children: _jsxs("span", { onClick: toggleExpandAll, children: [expandAll ? '-' : '+', ' ', t(expandAll ? 'collapse_all' : 'expand_all')] }) }))] }), properties == null ? (_jsx(Directive, { type: "warning", children: t('crd_no_schema') })) : (_jsx("div", { className: "doom-collapse-group", children: Object.entries(properties).map(([name, subSchema]) => SKIPPED_PROPERTIES.includes(name) || (_jsx(K8sCrdSchemaPart, { name: name, parent: schema, schema: subSchema, expandAll: expandAll }, name))) }))] }));
|
|
55
55
|
};
|
|
56
56
|
export const K8sCrd = ({ name, crdPath }) => {
|
|
57
57
|
const [, crd] = useMemo(() => Object.entries(crdsMap).find(([pathname, crd]) => {
|
|
@@ -112,7 +112,7 @@ export function Overview(props) {
|
|
|
112
112
|
return [];
|
|
113
113
|
}, [getGroup, overviewSidebarGroups]);
|
|
114
114
|
const groups = customGroups ?? defaultGroups;
|
|
115
|
-
return (_jsxs("div", { className: "overview-index doom-overview-index mx-auto", children: [content, groups.map((group) => (_jsxs(Fragment, { children: [(!title || [title, defaultGroupTitle].includes(group.name)) &&
|
|
116
|
-
groups.length === 1 ? (_jsx("h2", { style: { paddingTop: 0 } })) : (_jsx("h2", {
|
|
115
|
+
return (_jsxs("div", { className: "overview-index doom-overview-index rp-mx-auto", children: [content, groups.map((group) => (_jsxs(Fragment, { children: [(!title || [title, defaultGroupTitle].includes(group.name)) &&
|
|
116
|
+
groups.length === 1 ? (_jsx("h2", { style: { paddingTop: 0 } })) : (_jsx("h2", { ...renderInlineMarkdown(group.name) })), _jsx("div", { className: classes.overviewGroups, children: group.items.map((item) => (_jsxs("div", { className: classes.overviewGroup, children: [_jsx("h3", { style: { marginBottom: 8 }, children: _jsx(Link, { href: normalizeHref(item.link), ...renderInlineMarkdown(item.text) }) }), _jsx("div", { className: classes.overviewDescription, children: item.description }), _jsx("ul", { className: "rp-list-none", children: item.headers?.map((header) => (_jsx("li", { className: `${classes.overviewGroupLi} ${classes[`level${header.depth}`]} first:rp-mt-2`, children: _jsx(Link, { href: `${normalizeHref(item.link)}#${header.id}`, ...renderInlineMarkdown(header.text) }) }, header.id))) })] }, item.link))) })] }, group.name)))] }));
|
|
117
117
|
}
|
|
118
118
|
export default Overview;
|
|
@@ -17,7 +17,7 @@ export declare const X: {
|
|
|
17
17
|
blockquote: (props: import("react").ComponentProps<"blockquote">) => import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
strong: (props: import("react").ComponentProps<"strong">) => import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
a: (props: import("react").ComponentProps<"a">) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
code:
|
|
21
|
-
pre:
|
|
20
|
+
code: typeof import("@rspress/theme-default").Code;
|
|
21
|
+
pre: typeof import("@rspress/theme-default").PreWithCodeButtonGroup;
|
|
22
22
|
img: (props: import("react").ComponentProps<"img">) => import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alauda/doom",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Doctor Doom making docs.",
|
|
6
6
|
"repository": "git+https://github.com/alauda/doom.git",
|
|
@@ -35,22 +35,22 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@cspell/eslint-plugin": "^8.19.4 || ^9.0.2",
|
|
38
|
-
"@eslint-react/eslint-plugin": "^1.51.
|
|
38
|
+
"@eslint-react/eslint-plugin": "^1.51.1",
|
|
39
39
|
"@inquirer/prompts": "^7.5.3",
|
|
40
40
|
"@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
|
|
41
41
|
"@playwright/browser-chromium": "^1.52.0",
|
|
42
42
|
"@rsbuild/plugin-sass": "^1.3.2",
|
|
43
43
|
"@rsbuild/plugin-yaml": "^1.0.2",
|
|
44
|
-
"@rspress/core": "2.0.0-beta.
|
|
45
|
-
"@rspress/plugin-algolia": "2.0.0-beta.
|
|
46
|
-
"@rspress/plugin-llms": "^2.0.0-beta.
|
|
47
|
-
"@shikijs/transformers": "^3.
|
|
44
|
+
"@rspress/core": "2.0.0-beta.11",
|
|
45
|
+
"@rspress/plugin-algolia": "2.0.0-beta.11",
|
|
46
|
+
"@rspress/plugin-llms": "^2.0.0-beta.11",
|
|
47
|
+
"@shikijs/transformers": "^3.6.0",
|
|
48
48
|
"chokidar": "^4.0.3",
|
|
49
49
|
"cli-progress": "^3.12.0",
|
|
50
50
|
"clsx": "^2.1.1",
|
|
51
51
|
"commander": "^13.1.0 || ^14.0.0",
|
|
52
52
|
"ejs": "^3.1.10",
|
|
53
|
-
"es-toolkit": "^1.39.
|
|
53
|
+
"es-toolkit": "^1.39.1",
|
|
54
54
|
"eslint": "^9.28.0",
|
|
55
55
|
"eslint-plugin-mdx": "^3.4.2",
|
|
56
56
|
"html-tag-names": "^2.1.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"remark-mdx": "^3.1.0",
|
|
72
72
|
"remark-stringify": "^11.0.0",
|
|
73
73
|
"shiki": "^3.6.0",
|
|
74
|
-
"simple-git": "^3.
|
|
74
|
+
"simple-git": "^3.28.0",
|
|
75
75
|
"swagger2openapi": "^7.0.8",
|
|
76
76
|
"tinyglobby": "^0.2.14",
|
|
77
77
|
"type-fest": "^4.41.0",
|