vibe-design-system 2.8.59 → 2.8.61

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
@@ -488,6 +488,19 @@ function ensureVdsCore(projectRoot) {
488
488
  console.log("📦 vds-core/ hazır.");
489
489
  }
490
490
 
491
+ /**
492
+ * Computes a deterministic Storybook port based on the project root path.
493
+ * Each project gets a consistent unique port (6100–6899) so switching between
494
+ * projects doesn't cause "story not found" errors from stale browser URLs.
495
+ */
496
+ function computeProjectPort(projectRoot) {
497
+ let h = 5381;
498
+ for (let i = 0; i < projectRoot.length; i++) {
499
+ h = ((h << 5) + h + projectRoot.charCodeAt(i)) & 0x7fffffff;
500
+ }
501
+ return 6100 + (h % 800);
502
+ }
503
+
491
504
  // ADIM 4 — package.json scriptleri
492
505
  function addScripts(projectRoot) {
493
506
  const pkgPath = path.join(projectRoot, "package.json");
@@ -508,7 +521,8 @@ function addScripts(projectRoot) {
508
521
  changed = true;
509
522
  }
510
523
  if (!scripts.storybook) {
511
- scripts.storybook = "storybook dev -p 6006";
524
+ const sbPort = computeProjectPort(projectRoot);
525
+ scripts.storybook = `storybook dev -p ${sbPort}`;
512
526
  changed = true;
513
527
  }
514
528
  if (!scripts["build-storybook"]) {
@@ -714,13 +728,15 @@ runSetupStorybookProviders(projectRoot);
714
728
  runStorybookAdapt(projectRoot);
715
729
 
716
730
  // ADIM 8
731
+ const _finalPort = computeProjectPort(projectRoot);
717
732
  console.log("\n✅ VDS kuruldu!");
733
+ console.log(`→ Storybook: http://localhost:${_finalPort}`);
718
734
  console.log("→ npm run vds:stories — tarama + story + provider (tek komut)");
719
735
  console.log("→ npm run vds:watch — otomatik güncelleme (watch modu)");
720
736
  console.log("\nNot: Storybook başlarken (Node 24+) DEP0190 uyarısı çıkarsa Storybook kaynaklıdır, güvenle yok sayabilirsiniz.\n");
721
737
 
722
738
  // ADIM 10 — Storybook'u otomatik başlat
723
- console.log("🚀 Storybook başlatılıyor → http://localhost:6006\n");
739
+ console.log(`🚀 Storybook başlatılıyor → http://localhost:${_finalPort}\n`);
724
740
  const sbProc = spawn("npm", ["run", "storybook"], {
725
741
  stdio: "inherit",
726
742
  cwd: projectRoot,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-design-system",
3
- "version": "2.8.59",
3
+ "version": "2.8.61",
4
4
  "description": "Auto-generate design systems for vibe coding projects",
5
5
  "homepage": "https://vibedesign.tech",
6
6
  "repository": {
@@ -2143,7 +2143,7 @@ function writeFoundationsStories(foundations) {
2143
2143
  "",
2144
2144
  "export const Default: Story = {",
2145
2145
  " render: () => (",
2146
- " <div style={{ fontFamily: \"system-ui,sans-serif\", padding: 32, background: \"#f8fafc\", minHeight: 500 }}>",
2146
+ " <div style={{ fontFamily: \"system-ui,sans-serif\", padding: 32, background: \"#fff\", minHeight: 500, color: \"#111\" }}>",
2147
2147
  " <h2 style={{ fontSize: 20, fontWeight: 700, margin: \"0 0 4px\", color: \"#111\" }}>Colors</h2>",
2148
2148
  " <p style={{ fontSize: 13, color: \"#888\", margin: \"0 0 40px\" }}>Design tokens defined in CSS variables — grouped by role</p>",
2149
2149
  "",
@@ -2262,7 +2262,7 @@ function writeFoundationsStories(foundations) {
2262
2262
  "",
2263
2263
  "export const Default: Story = {",
2264
2264
  " render: () => (",
2265
- " <div style={{ fontFamily: \"system-ui,sans-serif\", padding: 32, maxWidth: 860, color: \"#111\" }}>",
2265
+ " <div style={{ fontFamily: \"system-ui,sans-serif\", padding: 32, maxWidth: 860, color: \"#111\", background: \"#fff\", minHeight: \"100vh\" }}>",
2266
2266
  " <h2 style={{ fontSize: 20, fontWeight: 700, margin: \"0 0 4px\" }}>Typography</h2>",
2267
2267
  " <p style={{ fontSize: 13, color: \"#888\", margin: \"0 0 32px\" }}>Type scale, font families, and weights</p>",
2268
2268
  "",
@@ -2418,7 +2418,7 @@ function writeFoundationsStories(foundations) {
2418
2418
  "",
2419
2419
  "export const Default: Story = {",
2420
2420
  " render: () => (",
2421
- " <div style={{ display: \"flex\", gap: 24, flexWrap: \"wrap\", padding: 24 }}>",
2421
+ " <div style={{ display: \"flex\", gap: 24, flexWrap: \"wrap\", padding: 32, background: \"#fff\", minHeight: \"100vh\" }}>",
2422
2422
  " {assets.length === 0 ? <p style={{ color: '#888', fontFamily: 'monospace' }}>No brand assets found — add images to public/ or client/public/</p> : assets.map((a, i) => (",
2423
2423
  " <div key={i} style={{ textAlign: \"center\", background: '#f8f8f8', borderRadius: 8, padding: 12, minWidth: 120 }}>",
2424
2424
  " <img src={a.url || (\"/\" + String(a.path || \"\").replace(/^public\\//, \"\"))} style={{ maxHeight: 100, maxWidth: 180, objectFit: \"contain\", display: 'block', margin: '0 auto' }} alt={a.name || \"\"} />",
@@ -2475,33 +2475,33 @@ function writeFoundationsStories(foundations) {
2475
2475
  " title={`Click to copy: ${d.name}`}",
2476
2476
  " style={{",
2477
2477
  " display: \"flex\", flexDirection: \"column\", gap: 10, padding: 14,",
2478
- " border: `1px solid ${isCopied ? \"#4ade80\" : \"#1e293b\"}`,",
2478
+ " border: `1px solid ${isCopied ? \"#16a34a\" : \"#e5e7eb\"}`,",
2479
2479
  " borderRadius: 10,",
2480
- " background: isCopied ? \"#052e16\" : \"#0f172a\",",
2480
+ " background: isCopied ? \"#f0fdf4\" : \"#f9fafb\",",
2481
2481
  " cursor: \"pointer\",",
2482
2482
  " opacity: faded ? 0.4 : 1,",
2483
2483
  " transition: \"border-color 0.15s, background 0.15s\",",
2484
2484
  " }}",
2485
2485
  " >",
2486
2486
  " <div style={{ display: \"flex\", justifyContent: \"space-between\", alignItems: \"flex-start\" }}>",
2487
- " <div style={{ padding: 8, background: \"#1e293b\", borderRadius: 8, display: \"flex\", alignItems: \"center\", justifyContent: \"center\" }}>",
2488
- " <Icon size={22} strokeWidth={1.75} color=\"#94a3b8\" />",
2487
+ " <div style={{ padding: 8, background: \"#f3f4f6\", borderRadius: 8, display: \"flex\", alignItems: \"center\", justifyContent: \"center\" }}>",
2488
+ " <Icon size={22} strokeWidth={1.75} color=\"#374151\" />",
2489
2489
  " </div>",
2490
2490
  " {d.total > 0 && (",
2491
- " <span style={{ fontSize: 11, fontWeight: 600, background: \"#1e293b\",",
2492
- " color: \"#94a3b8\", padding: \"2px 7px\", borderRadius: 999, alignSelf: \"flex-start\" }}>",
2491
+ " <span style={{ fontSize: 11, fontWeight: 600, background: \"#e5e7eb\",",
2492
+ " color: \"#374151\", padding: \"2px 7px\", borderRadius: 999, alignSelf: \"flex-start\" }}>",
2493
2493
  " ×{d.total}",
2494
2494
  " </span>",
2495
2495
  " )}",
2496
2496
  " </div>",
2497
- " <span style={{ fontSize: 12, fontWeight: 500, color: isCopied ? \"#4ade80\" : \"#e2e8f0\" }}>",
2497
+ " <span style={{ fontSize: 12, fontWeight: 500, color: isCopied ? \"#16a34a\" : \"#111827\" }}>",
2498
2498
  " {isCopied ? \"Copied!\" : d.name}",
2499
2499
  " </span>",
2500
2500
  " {d.topFiles.length > 0 && (",
2501
2501
  " <div style={{ display: \"flex\", flexWrap: \"wrap\", gap: 4 }}>",
2502
2502
  " {d.topFiles.map((f) => (",
2503
- " <span key={f} style={{ fontSize: 10, background: \"#1e293b\", color: \"#64748b\",",
2504
- " padding: \"1px 6px\", borderRadius: 4 }}>{f}</span>",
2503
+ " <span key={f} style={{ fontSize: 10, background: \"#e8f0fe\", color: \"#1e40af\",",
2504
+ " padding: \"1px 6px\", borderRadius: 4, fontFamily: \"monospace\" }}>{f}</span>",
2505
2505
  " ))}",
2506
2506
  " </div>",
2507
2507
  " )}",
@@ -2509,18 +2509,19 @@ function writeFoundationsStories(foundations) {
2509
2509
  " );",
2510
2510
  " };",
2511
2511
  " return (",
2512
- " <div style={{ padding: 24, fontFamily: \"sans-serif\" }}>",
2512
+ " <div style={{ padding: 32, fontFamily: \"system-ui,sans-serif\", background: \"#fff\", minHeight: \"100vh\", color: \"#111\" }}>",
2513
+ " <h2 style={{ fontSize: 20, fontWeight: 700, margin: \"0 0 4px\" }}>Icons</h2>",
2513
2514
  " <div style={{ marginBottom: 24 }}>",
2514
- " <p style={{ margin: 0, marginBottom: 4, fontSize: 14, color: \"#94a3b8\" }}>",
2515
- " {iconData.length} icons imported from <code style={{ fontSize: 12 }}>lucide-react</code> in app code.",
2515
+ " <p style={{ margin: 0, marginBottom: 4, fontSize: 13, color: \"#6b7280\" }}>",
2516
+ " {iconData.length} icons imported from <code style={{ fontSize: 12, background: \"#f3f4f6\", padding: \"1px 5px\", borderRadius: 4 }}>lucide-react</code> in app code.",
2516
2517
  " </p>",
2517
- " <p style={{ margin: 0, fontSize: 12, color: \"#475569\" }}>",
2518
+ " <p style={{ margin: 0, fontSize: 12, color: \"#9ca3af\" }}>",
2518
2519
  " Sorted by usage frequency · Badge = total JSX usages · Click any card to copy the icon name.",
2519
2520
  " </p>",
2520
2521
  " </div>",
2521
2522
  " {usedIcons.length > 0 && (",
2522
2523
  " <>",
2523
- " <p style={{ margin: \"0 0 12px\", fontSize: 12, fontWeight: 600, color: \"#64748b\",",
2524
+ " <p style={{ margin: \"0 0 12px\", fontSize: 12, fontWeight: 600, color: \"#374151\",",
2524
2525
  " textTransform: \"uppercase\", letterSpacing: \"0.06em\" }}>",
2525
2526
  " Active — {usedIcons.length}",
2526
2527
  " </p>",
@@ -2532,7 +2533,7 @@ function writeFoundationsStories(foundations) {
2532
2533
  " )}",
2533
2534
  " {unusedIcons.length > 0 && (",
2534
2535
  " <>",
2535
- " <p style={{ margin: \"0 0 12px\", fontSize: 12, fontWeight: 600, color: \"#334155\",",
2536
+ " <p style={{ margin: \"0 0 12px\", fontSize: 12, fontWeight: 600, color: \"#9ca3af\",",
2536
2537
  " textTransform: \"uppercase\", letterSpacing: \"0.06em\" }}>",
2537
2538
  " Imported, not used in JSX — {unusedIcons.length}",
2538
2539
  " </p>",
@@ -2587,7 +2588,7 @@ function writeFoundationsStories(foundations) {
2587
2588
  " const gapEntries = Object.entries(gridSystem.gaps || {});",
2588
2589
  " const maxWEntries = Object.entries(gridSystem.maxWidths || {});",
2589
2590
  " const chip = (label: string) => (",
2590
- " <span key={label} style={{ fontSize: 10, background: \"#1e293b\", color: \"#64748b\", padding: \"1px 6px\", borderRadius: 4 }}>{label}</span>",
2591
+ " <span key={label} style={{ fontSize: 10, background: \"#e8f0fe\", color: \"#1e40af\", padding: \"1px 6px\", borderRadius: 4, fontFamily: \"monospace\" }}>{label}</span>",
2591
2592
  " );",
2592
2593
  " const renderColPreview = (colVal: string) => {",
2593
2594
  " const n = parseInt(colVal, 10);",
@@ -2595,7 +2596,7 @@ function writeFoundationsStories(foundations) {
2595
2596
  " return (",
2596
2597
  " <div style={{ display: \"grid\", gridTemplateColumns: `repeat(${n}, 1fr)`, gap: 2, marginBottom: 8 }}>",
2597
2598
  " {Array.from({ length: n }).map((_, i) => (",
2598
- " <div key={i} style={{ height: 20, borderRadius: 3, background: \"#1e3a5f\" }} />",
2599
+ " <div key={i} style={{ height: 20, borderRadius: 3, background: \"#3b82f6\" }} />",
2599
2600
  " ))}",
2600
2601
  " </div>",
2601
2602
  " );",
@@ -2607,7 +2608,7 @@ function writeFoundationsStories(foundations) {
2607
2608
  " );",
2608
2609
  " };",
2609
2610
  " return (",
2610
- " <div style={{ padding: 24, fontFamily: \"sans-serif\", maxWidth: 900 }}>",
2611
+ " <div style={{ padding: 24, fontFamily: \"sans-serif\", maxWidth: 900, background: \"#fff\", minHeight: \"100vh\", color: \"#111\" }}>",
2611
2612
  "",
2612
2613
  " {/* ── Breakpoints ── */}",
2613
2614
  " <section style={{ marginBottom: 40 }}>",
@@ -2707,7 +2708,7 @@ function writeFoundationsStories(foundations) {
2707
2708
  " <span key={val} style={{ display: \"flex\", alignItems: \"center\", gap: 6,",
2708
2709
  " background: \"#0a0f1a\", border: \"1px solid #1e293b\", borderRadius: 6, padding: \"5px 10px\", fontSize: 12 }}>",
2709
2710
  " <code style={{ color: \"#67e8f9\" }}>gap-{val}</code>",
2710
- " <span style={{ color: \"#475569\", fontSize: 11 }}>×{data.count}</span>",
2711
+ " <span style={{ color: \"#374151\", fontSize: 11 }}>×{data.count}</span>",
2711
2712
  " </span>",
2712
2713
  " ))}",
2713
2714
  " </div>",
@@ -2763,7 +2764,7 @@ function writeFoundationsStories(foundations) {
2763
2764
  "",
2764
2765
  "export const Default: Story = {",
2765
2766
  " render: () => (",
2766
- " <div style={{ padding: 24, fontFamily: \"system-ui, sans-serif\" }}>",
2767
+ " <div style={{ padding: 32, fontFamily: \"system-ui, sans-serif\", background: \"#fff\", minHeight: \"100vh\", color: \"#111\" }}>",
2767
2768
  " <h2 style={{ marginBottom: 8 }}>Used Button variants in app code</h2>",
2768
2769
  " <p style={{ marginBottom: 16, color: \"#888\", fontSize: 13 }}>Based on &lt;Button ... /&gt; usages in src/ (ignores lowercase &lt;button&gt;).</p>",
2769
2770
  " <table style={{ borderCollapse: \"collapse\", width: \"100%\", fontSize: 13 }}>",
@@ -2840,7 +2841,7 @@ function writeFoundationsStories(foundations) {
2840
2841
  "",
2841
2842
  "export const Default: Story = {",
2842
2843
  " render: () => (",
2843
- " <div style={{ fontFamily: \"system-ui,sans-serif\", padding: 32, maxWidth: 760, color: \"#111\" }}>",
2844
+ " <div style={{ fontFamily: \"system-ui,sans-serif\", padding: 32, maxWidth: 760, color: \"#111\", background: \"#fff\", minHeight: \"100vh\" }}>",
2844
2845
  " <h2 style={{ fontSize: 20, fontWeight: 700, margin: \"0 0 4px\" }}>Spacing Scale</h2>",
2845
2846
  " <p style={{ fontSize: 13, color: \"#888\", margin: \"0 0 24px\" }}>Base unit: 0.25rem = 4px · built on an 8px grid system</p>",
2846
2847
  " {usedSpacing.length > 0 && (",
@@ -2950,7 +2951,7 @@ function writeFoundationsStories(foundations) {
2950
2951
  "",
2951
2952
  "export const Default: Story = {",
2952
2953
  " render: () => (",
2953
- " <div style={{ fontFamily: \"system-ui,sans-serif\", padding: 32, background: \"#f1f5f9\", minHeight: 400 }}>",
2954
+ " <div style={{ fontFamily: \"system-ui,sans-serif\", padding: 32, background: \"#fff\", minHeight: \"100vh\", color: \"#111\" }}>",
2954
2955
  " <h2 style={{ fontSize: 20, fontWeight: 700, margin: \"0 0 4px\", color: \"#111\" }}>Elevation & Shadows</h2>",
2955
2956
  " <p style={{ fontSize: 13, color: \"#888\", margin: \"0 0 32px\" }}>Depth is communicated through layered shadow levels</p>",
2956
2957
  " <h3 style={{ fontSize: 15, fontWeight: 600, margin: \"0 0 14px\", color: \"#374151\" }}>Shadow Scale</h3>",
@@ -3068,7 +3069,7 @@ function writeFoundationsStories(foundations) {
3068
3069
  "",
3069
3070
  "export const Default: Story = {",
3070
3071
  " render: () => (",
3071
- " <div style={{ fontFamily: \"system-ui,sans-serif\", padding: 32, maxWidth: 800 }}>",
3072
+ " <div style={{ fontFamily: \"system-ui,sans-serif\", padding: 32, maxWidth: 800, background: \"#fff\", minHeight: \"100vh\", color: \"#111\" }}>",
3072
3073
  " <h2 style={{ fontSize: 20, fontWeight: 700, margin: \"0 0 4px\" }}>Border & Radius</h2>",
3073
3074
  " <p style={{ fontSize: 13, color: \"#888\", margin: \"0 0 32px\" }}>Corner radius scale — from sharp edges to fully rounded</p>",
3074
3075
  " {usedRadius.length > 0 && (",
@@ -3174,7 +3175,7 @@ function writeFoundationsStories(foundations) {
3174
3175
  "",
3175
3176
  "export const Default: Story = {",
3176
3177
  " render: () => (",
3177
- " <div style={{ fontFamily: \"system-ui,sans-serif\", padding: 32, maxWidth: 700, color: \"#111\" }}>",
3178
+ " <div style={{ fontFamily: \"system-ui,sans-serif\", padding: 32, maxWidth: 700, color: \"#111\", background: \"#fff\", minHeight: \"100vh\" }}>",
3178
3179
  " <h2 style={{ fontSize: 20, fontWeight: 700, margin: \"0 0 4px\" }}>Motion & Interaction</h2>",
3179
3180
  " <p style={{ fontSize: 13, color: \"#888\", margin: \"0 0 32px\" }}>Consistent timing and easing for smooth, intentional motion</p>",
3180
3181
  " {usedAnimations.length > 0 && (",
@@ -3304,7 +3305,7 @@ function writeComponentSuggestionsStory(componentSuggestions) {
3304
3305
  "",
3305
3306
  "export const Default: Story = {",
3306
3307
  " render: () => (",
3307
- " <div style={{ padding: 32, fontFamily: 'system-ui, sans-serif', background: '#f7fafc', minHeight: '100vh' }}>",
3308
+ " <div style={{ padding: 32, fontFamily: 'system-ui, sans-serif', background: '#fff', minHeight: '100vh', color: '#111' }}>",
3308
3309
  " <h2 style={{ marginBottom: 8, fontSize: 24, fontWeight: 700, color: '#1a202c' }}>Component Suggestions</h2>",
3309
3310
  " <p style={{ color: '#718096', marginBottom: 32, fontSize: 14 }}>Bu pattern'ler birden fazla dosyada tekrar ediyor. Her biri ayrı bir component olabilir. <strong>Copy Prompt</strong> butonuna tıklayıp Cursor veya Superflex'e yapıştır.</p>",
3310
3311
  " <div style={{ display: 'flex', flexDirection: 'column', gap: 20 }}>",
@@ -3334,7 +3335,7 @@ function writeChangelogStory(changelog) {
3334
3335
  "",
3335
3336
  "export const Default: Story = {",
3336
3337
  " render: () => (",
3337
- " <div style={{ fontFamily: \"monospace\", padding: 24 }}>",
3338
+ " <div style={{ fontFamily: \"system-ui,sans-serif\", padding: 32, background: \"#fff\", minHeight: \"100vh\", color: \"#111\" }}>",
3338
3339
  " <h2>CHANGELOG</h2>",
3339
3340
  " {changelog.length === 0 ? <p>No changes recorded yet.</p> : changelog.map((entry) => (",
3340
3341
  " <div key={entry.version}>",