docs(ui): move component inventory to catalog

This commit is contained in:
2026-07-19 23:24:33 +05:30
parent c71c504d24
commit 2983705ddc
2 changed files with 6315 additions and 1 deletions
+6311
View File
File diff suppressed because it is too large Load Diff
+4 -1
View File
@@ -315,10 +315,13 @@ for (const [name, category, summary] of catalog) {
const typesPath = join(packageRoot, "dist", "index.d.ts"); const typesPath = join(packageRoot, "dist", "index.d.ts");
if (!existsSync(readmePath) || !existsSync(typesPath)) if (!existsSync(readmePath) || !existsSync(typesPath))
throw new Error(`Install @wrnexus/${name} before generating docs`); throw new Error(`Install @wrnexus/${name} before generating docs`);
const readme = readFileSync(readmePath, "utf8") let readme = readFileSync(readmePath, "utf8")
.replace(/^#\s+[^\n]+\n?/, "") .replace(/^#\s+[^\n]+\n?/, "")
.replace(/^## Installation\s*$[\s\S]*?(?=^##\s|\s*$)/m, "") .replace(/^## Installation\s*$[\s\S]*?(?=^##\s|\s*$)/m, "")
.replace(/\bWrNexus\b/g, "WRNexusJS"); .replace(/\bWrNexus\b/g, "WRNexusJS");
if (name === "ui") {
readme = readme.replace(/^### Components\s*$[\s\S]*?(?=^###\s|^##\s|\s*$)/m, "");
}
const types = readFileSync(typesPath, "utf8"); const types = readFileSync(typesPath, "utf8");
const guide = markdown(readme); const guide = markdown(readme);
const componentReference = const componentReference =