vibe-design-system 2.5.34 → 2.5.36

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.34",
3
+ "version": "2.5.36",
4
4
  "description": "Auto-generate design systems for vibe coding projects",
5
5
  "type": "module",
6
6
  "bin": {
@@ -69,6 +69,18 @@ Kullanıcının her projede ayrı ayrı provider eklemesi, manuel story düzeltm
69
69
 
70
70
  **"Failed to fetch dynamically imported module"** artık manuel adım gerektirmez: story'ler dinamik import ile üretilir; component yüklenemezse canvas'ta "Component could not be loaded (import error)." mesajı gösterilir, Storybook çökmez.
71
71
 
72
+ ### Test projesinde çıkan hatalar (sorun giderme)
73
+
74
+ | Gördüğünüz mesaj | Ne yapmalı |
75
+ |------------------|------------|
76
+ | **Failed to fetch dynamically imported module: …/X.stories.tsx** | Story dosyası yüklenemiyor. En güncel VDS template’i kullanıp story’leri yeniden üretin: `npm run vds:stories`. Eski template’te statik import vardı; yeni sürümde dinamik import + catch kullanılıyor. |
77
+ | **Cannot read properties of undefined (reading 'dateRange')** (örn. TimeFilterPanel) | `filters` / `dateRange` varsayılanı generator’da var. `npm run vds:stories` tekrar çalıştırın; hâlâ olursa ilgili story’de `args.filters` veya `args.dateRange` manuel ekleyin. |
78
+ | **Cannot read properties of undefined (reading 'toString')** (örn. TaskEstimateInput) | `estimate` / sayısal proplar için varsayılan eklendi. `npm run vds:stories` ile story’leri yenileyin. |
79
+ | **RangeError: Invalid time value** (örn. TimeTable) | entries/rows/logs için mock öğelere geçerli ISO tarih eklendi. `npm run vds:stories` ile yenileyin. |
80
+ | **Başlık/component boş** (örn. UnlockModuleModal) | Modal/drawer için `isOpen` veya `open: true` varsayılanı veriliyor. Story’leri yeniden üretin; gerekirse o story’de `args.open = true` veya `args.isOpen = true` kontrol edin. |
81
+
82
+ Genel adım: `vibe-design-system` güncel olsun, sonra proje kökünde **`npm run vds:stories`** çalıştırıp Storybook’u yeniden başlatın.
83
+
72
84
  ## Layout
73
85
 
74
86
  - `vds-core/scan.mjs` — Projeyi tarar (src/components, CSS, Tailwind). `vds-output.json` ve `public/vds-output.json` yazar.
@@ -552,7 +552,11 @@ function isDateLikeField(name) {
552
552
  /** Build 2-3 mock items for array prop from component source (item type fields). Uses valid ISO date strings for date-like fields to avoid "Invalid time value". */
553
553
  function buildMockArrayItems(componentSource, itemTypeName, propName) {
554
554
  const fields = getItemTypeFieldsFromSource(componentSource, itemTypeName);
555
- const defaultFields = ["label", "value", "title", "id", "name", "description"];
555
+ const propLower = (propName || "").toLowerCase();
556
+ const looksLikeTimeEntries = /entries|rows|logs|data|items|times/.test(propLower) || /time|table|log/.test(propLower);
557
+ const defaultFields = looksLikeTimeEntries
558
+ ? ["id", "date", "start", "end", "title", "value"]
559
+ : ["label", "value", "title", "id", "name", "description"];
556
560
  const useFields = fields.length ? fields : defaultFields;
557
561
  const items = [];
558
562
  const baseDate = new Date("2024-01-15T12:00:00.000Z").getTime();
@@ -562,6 +566,7 @@ function buildMockArrayItems(componentSource, itemTypeName, propName) {
562
566
  if (f === "id") item[f] = String(i);
563
567
  else if (f === "value") item[f] = String(100 - i * 25);
564
568
  else if (isDateLikeField(f)) item[f] = new Date(baseDate + i * 86400000).toISOString();
569
+ else if (looksLikeTimeEntries && /date|time|start|end/.test((f || "").toLowerCase())) item[f] = new Date(baseDate + i * 86400000).toISOString();
565
570
  else item[f] = `Example ${i}`;
566
571
  }
567
572
  items.push(item);
@@ -676,13 +681,13 @@ function buildDefaultArgsForRequiredProps(props, usageFromPages = null, componen
676
681
  } else if (/string/.test(type)) {
677
682
  argLines.push(` ${name}: ${stringFallback(name)},`);
678
683
  added.add(name);
679
- } else if (/number/.test(type) || /^(value|amount|total|count|hours|minutes|progress|percent)$/.test(name)) {
684
+ } else if (/number/.test(type) || /^(value|amount|total|count|hours|minutes|progress|percent|estimate)$/.test(name)) {
680
685
  argLines.push(` ${name}: 0,`);
681
686
  added.add(name);
682
687
  }
683
688
  }
684
- // Optional props that often cause "reading X of undefined" in Storybook if missing
685
- const NUMBER_LIKE_OPTIONAL = new Set(["value", "amount", "total", "count", "hours", "minutes", "progress", "percent", "visibility"]);
689
+ // Optional props that often cause "reading X of undefined" or "reading 'toString'" in Storybook if missing
690
+ const NUMBER_LIKE_OPTIONAL = new Set(["value", "amount", "total", "count", "hours", "minutes", "progress", "percent", "visibility", "estimate"]);
686
691
  const DATE_RANGE_DEFAULT = `{ dateRange: { from: new Date().toISOString(), to: new Date().toISOString() } }`;
687
692
  for (const p of props) {
688
693
  const type = String(p.type || "").trim();
@@ -715,6 +720,9 @@ function buildDefaultArgsForRequiredProps(props, usageFromPages = null, componen
715
720
  } else if (name === "defaultProjectId") {
716
721
  argLines.push(` ${name}: "1",`);
717
722
  added.add(name);
723
+ } else if (name === "task" || /Task\b/.test(type)) {
724
+ argLines.push(` ${name}: { id: "1", title: "Example", estimate: 0 },`);
725
+ added.add(name);
718
726
  }
719
727
  }
720
728
  }