vibe-design-system 2.5.39 → 2.5.40

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.39",
3
+ "version": "2.5.40",
4
4
  "description": "Auto-generate design systems for vibe coding projects",
5
5
  "type": "module",
6
6
  "bin": {
@@ -493,9 +493,9 @@ const COMPONENT_EXTRA_ARGS = {
493
493
  ],
494
494
  };
495
495
 
496
- /** Render'da args'a uygulanacak fallback (useState(estimate.toString()) gibi kullanımlar için; Controls undefined yapsa bile). */
496
+ /** Render'da args'a uygulanacak fallback (useState(estimate.toString()) gibi kullanımlar için; args/Controls undefined yapsa bile). */
497
497
  const RENDER_ARGS_FALLBACKS = {
498
- TaskEstimateInput: ", estimate: args.estimate ?? 0, value: args.value ?? 0, task: args.task ?? { id: \"1\", title: \"Example\", estimate: 0 }",
498
+ TaskEstimateInput: ", estimate: (args && args.estimate) ?? 0, value: (args && args.value) ?? 0, task: (args && args.task) ?? { id: \"1\", title: \"Example\", estimate: 0 }",
499
499
  };
500
500
 
501
501
  /** Recursive list of .tsx/.jsx file paths under dir (relative to dir). Index.tsx / index.tsx first for deterministic "first usage". */
@@ -1089,10 +1089,11 @@ function buildStoryFileContent(comp) {
1089
1089
 
1090
1090
  // Wrap in Suspense so lazy load errors render fallback instead of crashing
1091
1091
  const argsFallback = (componentName && RENDER_ARGS_FALLBACKS[componentName]) || "";
1092
+ const argsParam = argsFallback ? "(args = {})" : "(args)";
1092
1093
  const propsArg = argsFallback ? `{ ...args${argsFallback} }` : "args";
1093
1094
  const renderLine = useReactNodeChildrenRender
1094
1095
  ? ` render: (args) => React.createElement(React.Suspense, { fallback: null }, React.createElement(ComponentRef, { ...args, children: args.children || React.createElement('span', null, 'Example') })),`
1095
- : ` render: (args) => React.createElement(React.Suspense, { fallback: null }, React.createElement(ComponentRef, ${propsArg})),`;
1096
+ : ` render: ${argsParam} => React.createElement(React.Suspense, { fallback: null }, React.createElement(ComponentRef, ${propsArg})),`;
1096
1097
  const childrenArgLine = (label) => (!omitChildren && !useReactNodeChildrenRender ? ` children: ${JSON.stringify(label)},` : null);
1097
1098
 
1098
1099
  if (!variants.length) {