vibe-design-system 2.5.36 → 2.5.37
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
|
@@ -687,7 +687,7 @@ function buildDefaultArgsForRequiredProps(props, usageFromPages = null, componen
|
|
|
687
687
|
}
|
|
688
688
|
}
|
|
689
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"]);
|
|
690
|
+
const NUMBER_LIKE_OPTIONAL = new Set(["value", "amount", "total", "count", "hours", "minutes", "progress", "percent", "visibility", "estimate", "initialValue", "defaultValue", "currentValue", "initialEstimate", "defaultEstimate"]);
|
|
691
691
|
const DATE_RANGE_DEFAULT = `{ dateRange: { from: new Date().toISOString(), to: new Date().toISOString() } }`;
|
|
692
692
|
for (const p of props) {
|
|
693
693
|
const type = String(p.type || "").trim();
|
|
@@ -725,6 +725,15 @@ function buildDefaultArgsForRequiredProps(props, usageFromPages = null, componen
|
|
|
725
725
|
added.add(name);
|
|
726
726
|
}
|
|
727
727
|
}
|
|
728
|
+
// TaskEstimateInput etc.: ensure task, estimate, value always have safe defaults (avoid .toString() on undefined)
|
|
729
|
+
if (componentName && /Task|Estimate|Input/i.test(componentName)) {
|
|
730
|
+
for (const key of ["task", "estimate", "value"]) {
|
|
731
|
+
if (added.has(key)) continue;
|
|
732
|
+
if (key === "task") argLines.push(` task: { id: "1", title: "Example", estimate: 0 },`);
|
|
733
|
+
else argLines.push(` ${key}: 0,`);
|
|
734
|
+
added.add(key);
|
|
735
|
+
}
|
|
736
|
+
}
|
|
728
737
|
}
|
|
729
738
|
for (const name of Object.keys(fromPages)) {
|
|
730
739
|
if (added.has(name)) continue;
|