vibe-design-system 2.8.25 → 2.8.27
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/package.json
CHANGED
|
@@ -369,10 +369,29 @@ function compareComponents(prevList, newResults) {
|
|
|
369
369
|
return { added, removed, modified };
|
|
370
370
|
}
|
|
371
371
|
|
|
372
|
-
/**
|
|
372
|
+
/**
|
|
373
|
+
* Path-based classification: derive Storybook group from the first folder segment.
|
|
374
|
+
* Examples:
|
|
375
|
+
* ui/button.tsx → group: "UI"
|
|
376
|
+
* circles/CircleCard.tsx → group: "Circles"
|
|
377
|
+
* time/TimeDashboard.tsx → group: "Time"
|
|
378
|
+
* time-resources/planning/… → group: "Time Resources"
|
|
379
|
+
* settings/UserProfile.tsx → group: "Settings"
|
|
380
|
+
*/
|
|
373
381
|
function classifyByPath(rel) {
|
|
374
|
-
|
|
375
|
-
|
|
382
|
+
const normalized = rel.replace(/\\/g, "/");
|
|
383
|
+
const firstSegment = normalized.split("/")[0] || "";
|
|
384
|
+
|
|
385
|
+
// ui/ → always "UI" (shadcn primitives)
|
|
386
|
+
if (firstSegment === "ui") return { group: "UI", category: null };
|
|
387
|
+
|
|
388
|
+
// Convert kebab-case folder to Title Case (time-resources → Time Resources)
|
|
389
|
+
const group = firstSegment
|
|
390
|
+
.split("-")
|
|
391
|
+
.map(w => w.charAt(0).toUpperCase() + w.slice(1))
|
|
392
|
+
.join(" ") || "Components";
|
|
393
|
+
|
|
394
|
+
return { group, category: null };
|
|
376
395
|
}
|
|
377
396
|
|
|
378
397
|
/**
|
|
@@ -382,16 +401,22 @@ function classifyByPath(rel) {
|
|
|
382
401
|
* feature → medium, contains state / multiple sub-parts
|
|
383
402
|
* page → full page/view — reference only, not for direct reuse
|
|
384
403
|
*/
|
|
404
|
+
// Semantic filename keywords that indicate a view-level (feature) component
|
|
405
|
+
// even if the file is small (data fetched via context/hooks, not passed as props)
|
|
406
|
+
const FEATURE_FILENAME_KEYWORDS = /Dashboard|Profile|Hub|Overview|Planning|Timesheet|Pipeline|Workload|Schedule|Portfolio|Chart|Board|Reports?|Analytics|Settings$/i;
|
|
407
|
+
|
|
385
408
|
function inferTier(rel, content) {
|
|
386
409
|
const normalized = rel.replace(/\\/g, "/");
|
|
387
410
|
if (normalized.startsWith("ui/") || normalized.includes("/ui/")) return "primitive";
|
|
388
411
|
|
|
412
|
+
const filename = normalized.split("/").pop()?.replace(/\.(tsx|jsx|ts|js)$/, "") || "";
|
|
389
413
|
const lines = content.split("\n").length;
|
|
390
414
|
// Count relative imports (../ ./) AND path-alias imports (@/components/) as local dependencies
|
|
391
415
|
const localImports = (content.match(/from\s+['"](?:\.\.?\/?|@\/components\/)/g) || []).length;
|
|
392
416
|
|
|
393
417
|
if (lines >= 400 || localImports >= 12) return "page";
|
|
394
|
-
|
|
418
|
+
// Semantic keyword: treat as feature even if small (fetches data via context/hooks)
|
|
419
|
+
if (lines >= 200 || localImports >= 7 || FEATURE_FILENAME_KEYWORDS.test(filename)) return "feature";
|
|
395
420
|
return "component";
|
|
396
421
|
}
|
|
397
422
|
|
|
@@ -1138,10 +1138,11 @@ function buildStoryFileContent(comp) {
|
|
|
1138
1138
|
}
|
|
1139
1139
|
if (!importPath.startsWith(".")) importPath = "./" + importPath;
|
|
1140
1140
|
|
|
1141
|
-
|
|
1142
|
-
const
|
|
1143
|
-
const
|
|
1144
|
-
|
|
1141
|
+
// Normalize legacy "shadcn" group → "UI", everything else kept as-is
|
|
1142
|
+
const rawGroup = comp.group || "Components";
|
|
1143
|
+
const group = rawGroup === "shadcn" ? "UI" : rawGroup;
|
|
1144
|
+
// Title: "Module/ComponentName" (category intentionally dropped — folder is the context)
|
|
1145
|
+
const title = `${group}/${componentName}`;
|
|
1145
1146
|
|
|
1146
1147
|
const props = Array.isArray(comp.props) ? comp.props : [];
|
|
1147
1148
|
const variantProp = props.find((p) => p.name === "variant");
|
|
@@ -2844,9 +2845,9 @@ function main() {
|
|
|
2844
2845
|
|
|
2845
2846
|
for (const comp of components) {
|
|
2846
2847
|
const componentName = toSafeComponentName(comp.name, comp.file);
|
|
2847
|
-
//
|
|
2848
|
-
|
|
2849
|
-
if (comp.group
|
|
2848
|
+
// Skip unclassified and shadcn/ui primitives (UI group) — they're documented at ui.shadcn.com
|
|
2849
|
+
// Only project-specific module groups (Circles, Finance, Projects, Time, …) get stories
|
|
2850
|
+
if (comp.group === "Uncategorized" || comp.group === "UI") continue;
|
|
2850
2851
|
if (onlyName && componentName !== onlyName) continue;
|
|
2851
2852
|
|
|
2852
2853
|
const storyFileName = `${componentName}.stories.tsx`;
|