feat(org-chart): support external CSS themes and align documentation

This commit is contained in:
shkim4 committed 2026-10-13 22:43:21 +09:00
1 parent dcfa4e0895
commit 346c648c09
27 files changed
+1189 -75

No files matched your search

+8 -1
View File
@@ -81,10 +81,17 @@ export function themeAnalysis({ records, workspace, postcss, walk, selectedFile,
};
for (const r of records) {
if (r.css) css(r.file, true);
for (const e of r.edges.filter(e => e.runtime)) {
for (const e of r.edges) {
// OrgChart deliberately loads its public CSS inside Shadow DOM via ?url.
// Inventory that export's declarations, without treating arbitrary raw/url
// imports as applied styles or collecting tokens from unrelated packages.
const orgChartCSS = e.spec === '@hm-design/org-chart/style.css' || e.spec === '@hm-design/org-chart/style.css?url';
if (!e.runtime && !orgChartCSS) continue;
const publicCSS = {
'@hm-design/ui/theme.css': 'packages/ui/src/theme.css',
'@hm-design/ui/dashboard-status.css': 'packages/ui/src/patterns/dashboard-status/dashboard-status.css',
'@hm-design/org-chart/style.css': 'packages/org-chart/src/styles/org-chart.css',
'@hm-design/org-chart/style.css?url': 'packages/org-chart/src/styles/org-chart.css',
}[e.spec];
if (publicCSS) css(path.join(workspace, publicCSS));
}