vibe-design-system 2.5.15 → 2.5.17

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/bin/init.js CHANGED
@@ -165,6 +165,9 @@ function needsStorybook(projectRoot) {
165
165
  return !(dev.storybook && dev["@storybook/react-vite"] && dev["@tailwindcss/vite"]);
166
166
  }
167
167
 
168
+ // Storybook 8.6.x — aynı minor sürümde tutarak addon uyumluluk uyarısını önler
169
+ const STORYBOOK_VERSION = "8.6.17";
170
+
168
171
  function installStorybook(projectRoot) {
169
172
  console.log("📚 Storybook v8 ve @tailwindcss/vite kuruluyor...");
170
173
  const r = spawnSync(
@@ -172,14 +175,15 @@ function installStorybook(projectRoot) {
172
175
  [
173
176
  "install",
174
177
  "--save-dev",
175
- "storybook@8",
176
- "@storybook/react-vite@8",
177
- "@storybook/react@8",
178
- "@storybook/addon-essentials@8",
179
- "@storybook/blocks@8",
178
+ "--save-exact",
179
+ `storybook@${STORYBOOK_VERSION}`,
180
+ `@storybook/react-vite@${STORYBOOK_VERSION}`,
181
+ `@storybook/react@${STORYBOOK_VERSION}`,
182
+ `@storybook/addon-essentials@${STORYBOOK_VERSION}`,
183
+ `@storybook/blocks@${STORYBOOK_VERSION}`,
180
184
  "@tailwindcss/vite",
181
185
  ],
182
- { cwd: projectRoot, stdio: "inherit" }
186
+ { cwd: projectRoot, stdio: "inherit", shell: false }
183
187
  );
184
188
  if (r.status !== 0) {
185
189
  console.warn("⚠️ npm install storybook tamamlanamadı.");
@@ -374,4 +378,5 @@ runStoryGenerator(projectRoot);
374
378
  // ADIM 8
375
379
  console.log("\n✅ VDS kuruldu!");
376
380
  console.log("→ npm run storybook ile design system'ını aç");
377
- console.log("→ npm run vds:watch ile otomatik güncellemeyi başlat\n");
381
+ console.log("→ npm run vds:watch ile otomatik güncellemeyi başlat");
382
+ console.log("\nNot: Storybook başlarken (Node 24+) DEP0190 uyarısı çıkarsa Storybook kaynaklıdır, güvenle yok sayabilirsiniz.\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-design-system",
3
- "version": "2.5.15",
3
+ "version": "2.5.17",
4
4
  "description": "Auto-generate design systems for vibe coding projects",
5
5
  "type": "module",
6
6
  "bin": {
@@ -459,10 +459,12 @@ function buildDefaultArgsForRequiredProps(props) {
459
459
  lucideImports.add(iconName);
460
460
  argLines.push(` ${name}: ${iconName},`);
461
461
  } else if (/\[\]/.test(type)) {
462
- const itemTypeMatch = type.match(/([A-Za-z0-9_]+)(?=\s*\[\])/);
463
- const itemType = itemTypeMatch ? itemTypeMatch[1] : "Item";
464
- const example = getExampleItemForArrayType(itemType);
465
- argLines.push(` ${name}: ${JSON.stringify(example)},`);
462
+ if (/string\s*\[\]/.test(type)) {
463
+ argLines.push(` ${name}: ["Example"],`);
464
+ } else {
465
+ // Object arrays ({ label, value } vb.) birçok component'te doğrudan child olarak render edilince hata verir; güvenli varsayılan boş dizi.
466
+ argLines.push(` ${name}: [],`);
467
+ }
466
468
  }
467
469
  }
468
470
  return { argLines, lucideImports: [...lucideImports] };
@@ -591,19 +593,15 @@ function buildRecipeStoryContent(comp, componentName, importPath, title, source,
591
593
  lines.push(`import { ${lucideImports.join(", ")} } from "lucide-react";`);
592
594
  }
593
595
 
594
- const isCardWithoutNamedExports = componentName === "Card" && !hasNamedExports(source, ["CardHeader", "CardTitle", "CardDescription", "CardContent", "CardFooter"]);
596
+ // Card: compound component (Header/Content) bazı projelerde yok; displayName hatasını önlemek için her zaman basit fallback kullanıyoruz.
597
+ const isCard = componentName === "Card";
595
598
  let effectiveRecipe = recipe;
596
- if (isCardWithoutNamedExports) {
599
+ if (isCard) {
597
600
  effectiveRecipe = {
598
601
  imports: [],
599
602
  render: `(args) => (
600
603
  <ComponentRef className="w-[340px]" {...args}>
601
- <ComponentRef.Header>
602
- <ComponentRef.Title>Card title</ComponentRef.Title>
603
- <ComponentRef.Description>Short description.</ComponentRef.Description>
604
- </ComponentRef.Header>
605
- <ComponentRef.Content><p>Card body content here.</p></ComponentRef.Content>
606
- <ComponentRef.Footer>Footer</ComponentRef.Footer>
604
+ <p>Card content</p>
607
605
  </ComponentRef>
608
606
  )`,
609
607
  };
@@ -630,18 +628,11 @@ function buildRecipeStoryContent(comp, componentName, importPath, title, source,
630
628
  lines.push(`import { ${ext.names.join(", ")} } from "${ext.from}";`);
631
629
  }
632
630
 
633
- const needsRouterDecorator = hasToOrHrefProp(comp, source);
634
- if (needsRouterDecorator) {
635
- lines.push(`import { MemoryRouter } from "react-router-dom";`);
636
- }
637
631
  lines.push("");
638
632
  lines.push(`const meta = {`);
639
633
  lines.push(` title: ${JSON.stringify(title)},`);
640
634
  lines.push(` component: ComponentRef,`);
641
635
  lines.push(` tags: ["autodocs"],`);
642
- if (needsRouterDecorator) {
643
- lines.push(` decorators: [(Story) => <MemoryRouter><Story /></MemoryRouter>],`);
644
- }
645
636
  lines.push(`} satisfies Meta<typeof ComponentRef>;`);
646
637
  lines.push("");
647
638
  lines.push(`export default meta;`);
@@ -757,18 +748,11 @@ function buildStoryFileContent(comp) {
757
748
  lines.push(`const ComponentRef = ${namedAlias} ?? ${defaultAlias};`);
758
749
  }
759
750
 
760
- const needsRouterDecorator = hasToOrHrefProp(comp, source);
761
- if (needsRouterDecorator) {
762
- lines.push(`import { MemoryRouter } from "react-router-dom";`);
763
- }
764
751
  lines.push("");
765
752
  lines.push(`const meta = {`);
766
753
  lines.push(` title: ${JSON.stringify(title)},`);
767
754
  lines.push(` component: ComponentRef,`);
768
755
  lines.push(` tags: ["autodocs"],`);
769
- if (needsRouterDecorator) {
770
- lines.push(` decorators: [(Story) => <MemoryRouter><Story /></MemoryRouter>],`);
771
- }
772
756
  lines.push(`} satisfies Meta<typeof ComponentRef>;`);
773
757
  lines.push("");
774
758
  lines.push(`export default meta;`);