vibe-design-system 2.5.44 → 2.5.46

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.44",
3
+ "version": "2.5.46",
4
4
  "description": "Auto-generate design systems for vibe coding projects",
5
5
  "type": "module",
6
6
  "bin": {
@@ -846,22 +846,18 @@ function detectExportStyle(source, componentName) {
846
846
  function buildSpecialStories(componentName, variants) {
847
847
  const lines = [];
848
848
 
849
- // Button: show used variant/size/asChild combinations from buttonUsage (if available)
849
+ // Button: show a simple UsedVariants story based on known variants (no JSON injection to avoid \\u escape issues in Storybook)
850
850
  if (componentName === "Button") {
851
- const usage = FOUNDATIONS_DATA?.buttonUsage;
852
- const combos = Array.isArray(usage?.combos) && usage.combos.length
853
- ? usage.combos
854
- : (variants && variants.length ? variants.map((v) => ({ key: v, variant: v, size: "default", asChild: false, count: 1 })) : []);
851
+ const vs = variants && variants.length ? variants : ["default", "secondary", "destructive", "outline"];
852
+ lines.push(`const BUTTON_VARIANTS = [${vs.map((v) => `"${v}"`).join(", ")}];`);
853
+ lines.push(`const BUTTON_SIZES = ["default", "sm", "lg"];`);
854
+ lines.push("");
855
855
  lines.push(`export const UsedVariants: Story = {`);
856
856
  lines.push(` render: () => (`);
857
857
  lines.push(` <div style={{ display: "flex", flexWrap: "wrap", gap: 12 }}>`);
858
- lines.push(` {${JSON.stringify(combos)}.map((c) => (`);
859
- lines.push(` <ComponentRef`);
860
- lines.push(` key={c.key}`);
861
- lines.push(` variant={c.variant}`);
862
- lines.push(` size={c.size}`);
863
- lines.push(` >`);
864
- lines.push(` {c.variant}{c.size !== "default" ? " · " + c.size : ""}`);
858
+ lines.push(` {BUTTON_VARIANTS.map((variant) => (`);
859
+ lines.push(` <ComponentRef key={variant} variant={variant}>`);
860
+ lines.push(` {variant}`);
865
861
  lines.push(` </ComponentRef>`);
866
862
  lines.push(` ))}`);
867
863
  lines.push(` </div>`);