vibe-design-system 2.5.37 → 2.5.38
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
|
@@ -478,6 +478,21 @@ const REACTNODE_PLACEHOLDER_TEXT = {
|
|
|
478
478
|
children: "Example content",
|
|
479
479
|
};
|
|
480
480
|
|
|
481
|
+
/** Component adına göre ekstra args (toString/undefined hatalarını önlemek için; her prop güvenli değer alır). */
|
|
482
|
+
const COMPONENT_EXTRA_ARGS = {
|
|
483
|
+
TaskEstimateInput: [
|
|
484
|
+
" task: { id: \"1\", title: \"Example\", estimate: 0, description: \"\" },",
|
|
485
|
+
" estimate: 0,",
|
|
486
|
+
" value: 0,",
|
|
487
|
+
" initialValue: 0,",
|
|
488
|
+
" defaultValue: 0,",
|
|
489
|
+
" min: 0,",
|
|
490
|
+
" max: 100,",
|
|
491
|
+
" step: 1,",
|
|
492
|
+
" taskId: \"1\",",
|
|
493
|
+
],
|
|
494
|
+
};
|
|
495
|
+
|
|
481
496
|
/** Recursive list of .tsx/.jsx file paths under dir (relative to dir). Index.tsx / index.tsx first for deterministic "first usage". */
|
|
482
497
|
function getAllTsxJsxUnderDir(dir) {
|
|
483
498
|
if (!fs.existsSync(dir)) return [];
|
|
@@ -734,6 +749,29 @@ function buildDefaultArgsForRequiredProps(props, usageFromPages = null, componen
|
|
|
734
749
|
added.add(key);
|
|
735
750
|
}
|
|
736
751
|
}
|
|
752
|
+
// Component-specific extra args (COMPONENT_EXTRA_ARGS) — tüm olası proplar güvenli değer alsın
|
|
753
|
+
const extraLines = componentName && COMPONENT_EXTRA_ARGS[componentName];
|
|
754
|
+
if (extraLines) {
|
|
755
|
+
for (const line of extraLines) {
|
|
756
|
+
const keyMatch = line.match(/^\s*(\w+)\s*:/);
|
|
757
|
+
const key = keyMatch ? keyMatch[1] : null;
|
|
758
|
+
if (key && !added.has(key)) {
|
|
759
|
+
argLines.push(line);
|
|
760
|
+
added.add(key);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
// COMPONENT_EXTRA_ARGS: props listesi boş olsa bile (örn. parse edilemeyen component) uygula
|
|
766
|
+
if (componentName && COMPONENT_EXTRA_ARGS[componentName]) {
|
|
767
|
+
for (const line of COMPONENT_EXTRA_ARGS[componentName]) {
|
|
768
|
+
const keyMatch = line.match(/^\s*(\w+)\s*:/);
|
|
769
|
+
const key = keyMatch ? keyMatch[1] : null;
|
|
770
|
+
if (key && !added.has(key)) {
|
|
771
|
+
argLines.push(line);
|
|
772
|
+
added.add(key);
|
|
773
|
+
}
|
|
774
|
+
}
|
|
737
775
|
}
|
|
738
776
|
for (const name of Object.keys(fromPages)) {
|
|
739
777
|
if (added.has(name)) continue;
|