vibe-design-system 2.5.5 → 2.5.6

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-design-system",
3
- "version": "2.5.5",
3
+ "version": "2.5.6",
4
4
  "description": "Auto-generate design systems for vibe coding projects",
5
5
  "type": "module",
6
6
  "bin": {
@@ -29,6 +29,8 @@ const cliT = (key, n) => CLI_LOCALES[CLI_LOCALE][key].replace("{n}", String(n));
29
29
  const SRC_DIR = path.join(PROJECT_ROOT, "src");
30
30
  const COMPONENTS_DIR = path.join(PROJECT_ROOT, "src", "components");
31
31
  const PAGES_DIR = path.join(PROJECT_ROOT, "src", "pages");
32
+
33
+ const IGNORE_DIRS = ["node_modules", "dist", ".next", "build", "vds-generated", ".storybook"];
32
34
  const OUTPUT_FILE = path.join(PROJECT_ROOT, "vds-output.json");
33
35
  const PUBLIC_MANIFEST = path.join(PROJECT_ROOT, "public", "vds-output.json");
34
36
  const HISTORY_FILE = path.join(PROJECT_ROOT, "vds-history.json");
@@ -337,6 +339,7 @@ function getAllComponentFiles(dir, baseDir = dir) {
337
339
  for (const entry of entries) {
338
340
  const fullPath = path.join(dir, entry.name);
339
341
  if (entry.isDirectory()) {
342
+ if (IGNORE_DIRS.includes(entry.name)) continue;
340
343
  files.push(...getAllComponentFiles(fullPath, baseDir));
341
344
  } else if (entry.isFile() && /\.(tsx|jsx)$/i.test(entry.name)) {
342
345
  files.push(path.relative(baseDir, fullPath).replace(/\\/g, "/"));
@@ -1200,8 +1203,6 @@ function scan() {
1200
1203
  foundations.icons = extractLucideIconsUsed(SRC_DIR);
1201
1204
  foundations.brand = { assets: extractBrandAssets() };
1202
1205
  const componentSuggestions = extractComponentSuggestions();
1203
- const vdsGeneratedEntries = writeVdsGeneratedComponents(componentSuggestions);
1204
- results.push(...vdsGeneratedEntries);
1205
1206
  const output = {
1206
1207
  branch: getGitBranch(),
1207
1208
  engineer: getGitEngineer(),
@@ -22,8 +22,7 @@ const STORIES_DIR = path.join(SRC_DIR, "stories");
22
22
 
23
23
  // CSS is loaded from .storybook/preview.tsx — never add CSS import to story files.
24
24
 
25
- // Components we don't want to auto-generate import-based stories for (project-specific dashboards, heavy UIs, etc.)
26
- // vds-generated/ is handled separately: placeholder stories only (no import of broken Figma/Make JSX).
25
+ // Components we don't want to auto-generate stories for (project-specific dashboards, heavy UIs, etc.)
27
26
  const SKIP_LIST = [
28
27
  "AnalysisDashboard",
29
28
  "ComponentLibrary",
@@ -381,33 +380,6 @@ function capitalize(str) {
381
380
  return str.charAt(0).toUpperCase() + str.slice(1);
382
381
  }
383
382
 
384
- /** Placeholder story for vds-generated extracted patterns (no import; broken Figma/Make JSX is not loaded). */
385
- function buildExtractedPlaceholderStory(comp) {
386
- const componentName = toSafeComponentName(comp.name, comp.file);
387
- const occurrenceCount = comp.occurrences ?? 0;
388
- const title = `VDS Generated/${componentName}`;
389
- return [
390
- 'import type { Meta, StoryObj } from "@storybook/react";',
391
- "",
392
- `const meta = { title: ${JSON.stringify(title)} } satisfies Meta;`,
393
- "export default meta;",
394
- "type Story = StoryObj;",
395
- "",
396
- "export const Default: Story = {",
397
- " render: () => (",
398
- " <div style={{ padding: 24, border: \"2px dashed #ccc\", borderRadius: 8 }}>",
399
- " <p style={{ color: \"#999\", fontSize: 12 }}>EXTRACTED PATTERN</p>",
400
- ` <h3 style={{ margin: \"0 0 8px 0\" }}>${componentName}</h3>`,
401
- " <p style={{ color: \"#666\", margin: 0 }}>",
402
- ` This pattern was detected ${occurrenceCount} times in src/pages/.`,
403
- " Extract it as a proper component to see it rendered here.",
404
- " </p>",
405
- " </div>",
406
- " ),",
407
- "};",
408
- ].join("\n");
409
- }
410
-
411
383
  function detectExportStyle(source, componentName) {
412
384
  if (!source) return "unknown";
413
385
  const hasDefault = /export\s+default\b/.test(source);
@@ -988,18 +960,10 @@ function main() {
988
960
  for (const comp of components) {
989
961
  const componentName = toSafeComponentName(comp.name, comp.file);
990
962
  if (onlyName && componentName !== onlyName) continue;
963
+ if (!comp.file.startsWith("ui/") && !comp.file.startsWith("pages/")) continue;
991
964
 
992
965
  const storyFileName = `${componentName}.stories.tsx`;
993
966
  const storyPath = path.join(STORIES_DIR, storyFileName);
994
-
995
- if (comp.file.startsWith("vds-generated/")) {
996
- const content = buildExtractedPlaceholderStory(comp);
997
- fs.writeFileSync(storyPath, content, "utf-8");
998
- console.log(`[VDS] Wrote ${path.relative(PROJECT_ROOT, storyPath)} (placeholder)`);
999
- continue;
1000
- }
1001
-
1002
- if (!comp.file.startsWith("ui/") && !comp.file.startsWith("pages/")) continue;
1003
967
  if (SKIP_LIST.includes(componentName)) continue;
1004
968
  const requiredCount = Array.isArray(comp.props) ? comp.props.filter((p) => p.required === true).length : 0;
1005
969
  if (requiredCount > 3) continue;