@fragments-sdk/cli 0.8.1 → 0.9.1

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.
Files changed (128) hide show
  1. package/dist/bin.js +517 -77
  2. package/dist/bin.js.map +1 -1
  3. package/dist/{chunk-WI6SLMSO.js → chunk-5GT62FCB.js} +2 -2
  4. package/dist/{chunk-CJEGT3WD.js → chunk-BW3ZATBW.js} +20 -3
  5. package/dist/chunk-BW3ZATBW.js.map +1 -0
  6. package/dist/{chunk-2JIKCJX3.js → chunk-D7372LQX.js} +13 -6
  7. package/dist/chunk-D7372LQX.js.map +1 -0
  8. package/dist/chunk-EZYXYWNF.js +131 -0
  9. package/dist/chunk-EZYXYWNF.js.map +1 -0
  10. package/dist/{chunk-NGIMCIK2.js → chunk-GF6OVPIN.js} +2 -2
  11. package/dist/{chunk-GOVI6COW.js → chunk-NVSPGSKB.js} +12 -4
  12. package/dist/chunk-NVSPGSKB.js.map +1 -0
  13. package/dist/core/index.d.ts +105 -3
  14. package/dist/core/index.js +12 -2
  15. package/dist/{defineFragment-D0UTve-I.d.ts → defineFragment-CBMS7Bab.d.ts} +21 -1
  16. package/dist/generate-LQA2R7FN.js +461 -0
  17. package/dist/generate-LQA2R7FN.js.map +1 -0
  18. package/dist/index.d.ts +2 -2
  19. package/dist/index.js +5 -4
  20. package/dist/index.js.map +1 -1
  21. package/dist/{init-KFYN37ZY.js → init-2GEGVIUQ.js} +14 -76
  22. package/dist/init-2GEGVIUQ.js.map +1 -0
  23. package/dist/mcp-bin.js +4 -3
  24. package/dist/mcp-bin.js.map +1 -1
  25. package/dist/{scan-65RH3QMM.js → scan-JGS65S7P.js} +6 -5
  26. package/dist/{service-A5GIGGGK.js → service-XP2EAJXD.js} +4 -3
  27. package/dist/{static-viewer-NSODM5VX.js → static-viewer-XCS7UJTO.js} +4 -3
  28. package/dist/storyFilters-3LUYAFZF.js +15 -0
  29. package/dist/storyFilters-3LUYAFZF.js.map +1 -0
  30. package/dist/{test-RPWZAYSJ.js → test-TD6TJNVY.js} +3 -3
  31. package/dist/{tokens-NIXSZRX7.js → tokens-2EXPCVP3.js} +5 -4
  32. package/dist/{tokens-NIXSZRX7.js.map → tokens-2EXPCVP3.js.map} +1 -1
  33. package/dist/{viewer-HZK4BSDK.js → viewer-RFA2KVBG.js} +249 -22
  34. package/dist/viewer-RFA2KVBG.js.map +1 -0
  35. package/package.json +2 -2
  36. package/src/bin.ts +26 -0
  37. package/src/build.ts +12 -2
  38. package/src/commands/build.ts +16 -2
  39. package/src/commands/doctor.ts +498 -0
  40. package/src/commands/generate.ts +383 -68
  41. package/src/commands/init-framework.ts +1 -1
  42. package/src/commands/init.ts +9 -51
  43. package/src/core/config.ts +15 -2
  44. package/src/core/generators/typescript-extractor.ts +10 -0
  45. package/src/core/index.ts +15 -0
  46. package/src/core/schema.ts +10 -2
  47. package/src/core/storyFilters.test.ts +350 -0
  48. package/src/core/storyFilters.ts +253 -0
  49. package/src/core/types.ts +22 -0
  50. package/src/migrate/converter.ts +9 -1
  51. package/src/migrate/parser.ts +2 -0
  52. package/src/migrate/types.ts +2 -0
  53. package/src/setup.ts +69 -24
  54. package/src/viewer/__tests__/viewer-integration.test.ts +1 -1
  55. package/src/viewer/components/AccessibilityPanel.tsx +305 -312
  56. package/src/viewer/components/ActionsPanel.tsx +31 -29
  57. package/src/viewer/components/AllVariantsPreview.tsx +78 -0
  58. package/src/viewer/components/App.tsx +187 -740
  59. package/src/viewer/components/BottomPanel.tsx +228 -132
  60. package/src/viewer/components/CodePanel.tsx +1 -1
  61. package/src/viewer/components/CommandPalette.tsx +7 -10
  62. package/src/viewer/components/ComponentDocView.tsx +164 -0
  63. package/src/viewer/components/ComponentGraph.tsx +111 -142
  64. package/src/viewer/components/ContractPanel.tsx +6 -6
  65. package/src/viewer/components/EmptyVariantMessage.tsx +54 -0
  66. package/src/viewer/components/FigmaEmbed.tsx +20 -18
  67. package/src/viewer/components/FragmentEditor.tsx +92 -115
  68. package/src/viewer/components/HeaderSearch.tsx +24 -0
  69. package/src/viewer/components/HealthDashboard.tsx +16 -2
  70. package/src/viewer/components/Icons.tsx +9 -0
  71. package/src/viewer/components/InteractionsPanel.tsx +101 -117
  72. package/src/viewer/components/IsolatedPreviewFrame.tsx +1 -0
  73. package/src/viewer/components/LandingPage.tsx +3 -3
  74. package/src/viewer/components/LeftSidebar.tsx +141 -63
  75. package/src/viewer/components/LoadErrorMessage.tsx +102 -0
  76. package/src/viewer/components/MultiViewportPreview.tsx +61 -142
  77. package/src/viewer/components/NoVariantsMessage.tsx +59 -0
  78. package/src/viewer/components/PanelShell.tsx +161 -0
  79. package/src/viewer/components/PerformancePanel.tsx +31 -28
  80. package/src/viewer/components/PreviewArea.tsx +1 -1
  81. package/src/viewer/components/PreviewAside.tsx +168 -0
  82. package/src/viewer/components/PreviewFrameHost.tsx +3 -3
  83. package/src/viewer/components/PropsEditor.tsx +70 -156
  84. package/src/viewer/components/ResizablePanel.tsx +103 -263
  85. package/src/viewer/components/RightSidebar.tsx +3 -9
  86. package/src/viewer/components/SkeletonLoader.tsx +13 -13
  87. package/src/viewer/components/TokenStylePanel.tsx +182 -209
  88. package/src/viewer/components/TopToolbar.tsx +159 -0
  89. package/src/viewer/components/VariantMatrix.tsx +42 -86
  90. package/src/viewer/components/VariantTabs.tsx +3 -3
  91. package/src/viewer/components/ViewerHeader.tsx +69 -0
  92. package/src/viewer/components/WebMCPDevTools.tsx +17 -23
  93. package/src/viewer/components/viewer-utils.ts +16 -0
  94. package/src/viewer/entry.tsx +5 -0
  95. package/src/viewer/hooks/useAppState.ts +27 -4
  96. package/src/viewer/hooks/usePreviewBridge.ts +2 -2
  97. package/src/viewer/preview-frame.html +6 -12
  98. package/src/viewer/server.ts +184 -6
  99. package/src/viewer/vendor/shared/src/ComponentDocContent.module.scss +10 -0
  100. package/src/viewer/vendor/shared/src/ComponentDocContent.module.scss.d.ts +2 -0
  101. package/src/viewer/vendor/shared/src/ComponentDocContent.tsx +274 -0
  102. package/src/viewer/vendor/shared/src/DocsPageShell.tsx +5 -0
  103. package/src/viewer/vendor/shared/src/PropsTable.module.scss +68 -0
  104. package/src/viewer/vendor/shared/src/PropsTable.module.scss.d.ts +2 -0
  105. package/src/viewer/vendor/shared/src/PropsTable.tsx +76 -0
  106. package/src/viewer/vendor/shared/src/VariantPreviewCard.module.scss +122 -0
  107. package/src/viewer/vendor/shared/src/VariantPreviewCard.module.scss.d.ts +2 -0
  108. package/src/viewer/vendor/shared/src/VariantPreviewCard.tsx +134 -0
  109. package/src/viewer/vendor/shared/src/docs-data/index.ts +32 -0
  110. package/src/viewer/vendor/shared/src/docs-data/mcp-configs.ts +72 -0
  111. package/src/viewer/vendor/shared/src/docs-data/palettes.ts +75 -0
  112. package/src/viewer/vendor/shared/src/docs-data/setup-examples.ts +55 -0
  113. package/src/viewer/vendor/shared/src/index.ts +8 -0
  114. package/src/viewer/vendor/shared/src/types.ts +12 -0
  115. package/src/viewer/vite-plugin.ts +109 -4
  116. package/dist/chunk-2JIKCJX3.js.map +0 -1
  117. package/dist/chunk-CJEGT3WD.js.map +0 -1
  118. package/dist/chunk-GOVI6COW.js.map +0 -1
  119. package/dist/generate-35OIMW4Y.js +0 -252
  120. package/dist/generate-35OIMW4Y.js.map +0 -1
  121. package/dist/init-KFYN37ZY.js.map +0 -1
  122. package/dist/viewer-HZK4BSDK.js.map +0 -1
  123. /package/dist/{chunk-WI6SLMSO.js.map → chunk-5GT62FCB.js.map} +0 -0
  124. /package/dist/{chunk-NGIMCIK2.js.map → chunk-GF6OVPIN.js.map} +0 -0
  125. /package/dist/{scan-65RH3QMM.js.map → scan-JGS65S7P.js.map} +0 -0
  126. /package/dist/{service-A5GIGGGK.js.map → service-XP2EAJXD.js.map} +0 -0
  127. /package/dist/{static-viewer-NSODM5VX.js.map → static-viewer-XCS7UJTO.js.map} +0 -0
  128. /package/dist/{test-RPWZAYSJ.js.map → test-TD6TJNVY.js.map} +0 -0
@@ -52,8 +52,8 @@ var fragmentMetaSchema = z.object({
52
52
  figmaProps: z.record(figmaPropMappingSchema).optional()
53
53
  });
54
54
  var fragmentUsageSchema = z.object({
55
- when: z.array(z.string()).min(1),
56
- whenNot: z.array(z.string()).min(1),
55
+ when: z.array(z.string()),
56
+ whenNot: z.array(z.string()),
57
57
  guidelines: z.array(z.string()).optional(),
58
58
  accessibility: z.array(z.string()).optional()
59
59
  });
@@ -172,7 +172,15 @@ var fragmentsConfigSchema = z.object({
172
172
  bundleSize: z.number().positive().optional()
173
173
  }).optional()
174
174
  })
175
- ]).optional()
175
+ ]).optional(),
176
+ storybook: z.object({
177
+ exclude: z.array(z.string()).optional(),
178
+ include: z.array(z.string()).optional(),
179
+ excludeDeprecated: z.boolean().optional(),
180
+ excludeTests: z.boolean().optional(),
181
+ excludeSvgIcons: z.boolean().optional(),
182
+ excludeSubComponents: z.boolean().optional()
183
+ }).optional()
176
184
  });
177
185
  var recipeDefinitionSchema = blockDefinitionSchema;
178
186
 
@@ -192,4 +200,4 @@ export {
192
200
  fragmentsConfigSchema,
193
201
  recipeDefinitionSchema
194
202
  };
195
- //# sourceMappingURL=chunk-GOVI6COW.js.map
203
+ //# sourceMappingURL=chunk-NVSPGSKB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/schema.ts"],"sourcesContent":["import { z } from 'zod';\n\n/**\n * Zod schemas for runtime validation of fragment definitions\n */\n\n// Figma property mapping schemas\nconst figmaStringMappingSchema = z.object({\n __type: z.literal('figma-string'),\n figmaProperty: z.string().min(1),\n});\n\nconst figmaBooleanMappingSchema = z.object({\n __type: z.literal('figma-boolean'),\n figmaProperty: z.string().min(1),\n valueMapping: z.object({ true: z.unknown(), false: z.unknown() }).optional(),\n});\n\nconst figmaEnumMappingSchema = z.object({\n __type: z.literal('figma-enum'),\n figmaProperty: z.string().min(1),\n valueMapping: z.record(z.unknown()),\n});\n\nconst figmaInstanceMappingSchema = z.object({\n __type: z.literal('figma-instance'),\n figmaProperty: z.string().min(1),\n});\n\nconst figmaChildrenMappingSchema = z.object({\n __type: z.literal('figma-children'),\n layers: z.array(z.string().min(1)),\n});\n\nconst figmaTextContentMappingSchema = z.object({\n __type: z.literal('figma-text-content'),\n layer: z.string().min(1),\n});\n\nexport const figmaPropMappingSchema = z.discriminatedUnion('__type', [\n figmaStringMappingSchema,\n figmaBooleanMappingSchema,\n figmaEnumMappingSchema,\n figmaInstanceMappingSchema,\n figmaChildrenMappingSchema,\n figmaTextContentMappingSchema,\n]);\n\nexport const fragmentMetaSchema = z.object({\n name: z.string().min(1),\n description: z.string().min(1),\n category: z.string().min(1),\n tags: z.array(z.string()).optional(),\n status: z.enum(['stable', 'beta', 'deprecated', 'experimental']).optional(),\n since: z.string().optional(),\n dependencies: z.array(z.object({\n name: z.string().min(1),\n version: z.string().min(1),\n reason: z.string().optional(),\n })).optional(),\n figma: z.string().url().optional(),\n figmaProps: z.record(figmaPropMappingSchema).optional(),\n});\n\nexport const fragmentUsageSchema = z.object({\n when: z.array(z.string()),\n whenNot: z.array(z.string()),\n guidelines: z.array(z.string()).optional(),\n accessibility: z.array(z.string()).optional(),\n});\n\nexport const propTypeSchema: z.ZodType<string> = z.enum([\n 'string',\n 'number',\n 'boolean',\n 'enum',\n 'function',\n 'node',\n 'element',\n 'object',\n 'array',\n 'union',\n 'custom',\n]);\n\nexport const propDefinitionSchema = z.object({\n type: propTypeSchema,\n values: z.array(z.string()).readonly().optional(),\n default: z.unknown().optional(),\n description: z.string().optional(),\n required: z.boolean().optional(),\n constraints: z.array(z.string()).optional(),\n typeDetails: z.record(z.unknown()).optional(),\n});\n\nexport const relationshipTypeSchema = z.enum([\n 'alternative',\n 'sibling',\n 'parent',\n 'child',\n 'composition',\n 'complementary',\n 'used-by',\n]);\n\nexport const componentRelationSchema = z.object({\n component: z.string().min(1),\n relationship: relationshipTypeSchema,\n note: z.string().min(1),\n});\n\nexport const fragmentVariantSchema = z.object({\n name: z.string().min(1),\n description: z.string().min(1),\n render: z.function().returns(z.unknown()),\n code: z.string().optional(),\n figma: z.string().url().optional(),\n});\n\n/**\n * Schema for banned patterns in codebase\n */\nexport const fragmentBanSchema = z.object({\n pattern: z.string().min(1),\n message: z.string().min(1),\n});\n\n/**\n * Schema for agent-optimized contract metadata\n */\nexport const fragmentContractSchema = z.object({\n propsSummary: z.array(z.string()).optional(),\n a11yRules: z.array(z.string()).optional(),\n bans: z.array(fragmentBanSchema).optional(),\n scenarioTags: z.array(z.string()).optional(),\n performanceBudget: z.number().positive().optional(),\n});\n\n/**\n * Schema for provenance tracking of generated fragments\n */\nexport const fragmentGeneratedSchema = z.object({\n source: z.enum(['storybook', 'manual', 'ai']),\n sourceFile: z.string().optional(),\n confidence: z.number().min(0).max(1).optional(),\n timestamp: z.string().datetime().optional(),\n});\n\n/**\n * Schema for AI-specific metadata for playground context generation\n */\nexport const aiMetadataSchema = z.object({\n compositionPattern: z.enum(['compound', 'simple', 'controlled', 'wrapper']).optional(),\n subComponents: z.array(z.string()).optional(),\n requiredChildren: z.array(z.string()).optional(),\n commonPatterns: z.array(z.string()).optional(),\n});\n\n/**\n * Schema for block definitions\n */\nexport const blockDefinitionSchema = z.object({\n name: z.string().min(1),\n description: z.string().min(1),\n category: z.string().min(1),\n components: z.array(z.string().min(1)).min(1),\n code: z.string().min(1),\n tags: z.array(z.string()).optional(),\n});\n\nexport const fragmentDefinitionSchema = z.object({\n component: z.any(), // Allow any component type (function, class, forwardRef, etc.)\n meta: fragmentMetaSchema,\n usage: fragmentUsageSchema,\n props: z.record(propDefinitionSchema),\n relations: z.array(componentRelationSchema).optional(),\n variants: z.array(fragmentVariantSchema), // Allow empty variants array\n contract: fragmentContractSchema.optional(),\n ai: aiMetadataSchema.optional(),\n _generated: fragmentGeneratedSchema.optional(),\n});\n\n/**\n * Config schema - validates required fields, passes through optional config objects.\n * Type definitions are in types.ts - schema just ensures basic structure.\n */\nexport const fragmentsConfigSchema = z.object({\n include: z.array(z.string()).min(1),\n exclude: z.array(z.string()).optional(),\n components: z.array(z.string()).optional(),\n outFile: z.string().optional(),\n framework: z.enum(['react', 'vue', 'svelte']).optional(),\n figmaFile: z.string().url().optional(),\n figmaToken: z.string().optional(),\n screenshots: z.object({}).passthrough().optional(),\n service: z.object({}).passthrough().optional(),\n registry: z.object({}).passthrough().optional(),\n tokens: z.object({\n include: z.array(z.string()).min(1),\n }).passthrough().optional(),\n snippets: z.object({\n mode: z.enum(['warn', 'error']).optional(),\n scope: z.enum(['snippet', 'snippet+render']).optional(),\n requireFullSnippet: z.boolean().optional(),\n allowedExternalModules: z.array(z.string().min(1)).optional(),\n }).optional(),\n performance: z.union([\n z.enum(['strict', 'standard', 'relaxed']),\n z.object({\n preset: z.enum(['strict', 'standard', 'relaxed']).optional(),\n budgets: z.object({\n bundleSize: z.number().positive().optional(),\n }).optional(),\n }),\n ]).optional(),\n storybook: z.object({\n exclude: z.array(z.string()).optional(),\n include: z.array(z.string()).optional(),\n excludeDeprecated: z.boolean().optional(),\n excludeTests: z.boolean().optional(),\n excludeSvgIcons: z.boolean().optional(),\n excludeSubComponents: z.boolean().optional(),\n }).optional(),\n});\n\n/**\n * @deprecated Use blockDefinitionSchema instead\n */\nexport const recipeDefinitionSchema = blockDefinitionSchema;\n"],"mappings":";;;AAAA,SAAS,SAAS;AAOlB,IAAM,2BAA2B,EAAE,OAAO;AAAA,EACxC,QAAQ,EAAE,QAAQ,cAAc;AAAA,EAChC,eAAe,EAAE,OAAO,EAAE,IAAI,CAAC;AACjC,CAAC;AAED,IAAM,4BAA4B,EAAE,OAAO;AAAA,EACzC,QAAQ,EAAE,QAAQ,eAAe;AAAA,EACjC,eAAe,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EAC/B,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,GAAG,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,SAAS;AAC7E,CAAC;AAED,IAAM,yBAAyB,EAAE,OAAO;AAAA,EACtC,QAAQ,EAAE,QAAQ,YAAY;AA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AA,IACtC,mBAAmB,EAAE,QAAQ,EAAE,SAAS;AAAA,IACxC,cAAc,EAAE,QAAQ,EAAE,SAAS;AAAA,IACnC,iBAAiB,EAAE,QAAQ,EAAE,SAAS;AAAA,IACtC,sBAAsB,EAAE,QAAQ,EAAE,SAAS;AAAA,EAC7C,CAAC,EAAE,SAAS;AACd,CAAC;AAKM,IAAM,yBAAyB;","names":[]}
@@ -1,5 +1,5 @@
1
- import { b as FragmentDefinition, c as FigmaStringMapping, e as FigmaBooleanMapping, f as FigmaEnumMapping, g as FigmaInstanceMapping, h as FigmaChildrenMapping, i as FigmaTextContentMapping, R as RelationshipType, V as VariantLoader, j as VariantRenderOptions } from '../defineFragment-D0UTve-I.js';
2
- export { A as AIMetadata, I as BaselineInfo, B as BlockDefinition, H as BoundingBox, u as CompiledRecipe, o as ComponentRelation, C as ControlType, D as DiffResult, L as FigmaPropMapping, k as FragmentComponent, v as FragmentContract, w as FragmentGenerated, l as FragmentMeta, m as FragmentUsage, r as FragmentVariant, F as FragmentsConfig, X as InferProps, M as Manifest, p as PlayFunction, q as PlayFunctionContext, n as PropDefinition, P as PropType, t as RecipeDefinition, s as RegistryOptions, E as Screenshot, x as ScreenshotConfig, G as ScreenshotMetadata, y as ServiceConfig, S as SnippetPolicyConfig, T as Theme, N as TokenConfig, J as VerifyRequest, K as VerifyResult, z as Viewport, Q as compileBlock, O as compileFragment, W as compileRecipe, a as defineBlock, d as defineFragment, U as defineRecipe } from '../defineFragment-D0UTve-I.js';
1
+ import { b as FragmentDefinition, S as StorybookFilterConfig, c as FigmaStringMapping, e as FigmaBooleanMapping, f as FigmaEnumMapping, g as FigmaInstanceMapping, h as FigmaChildrenMapping, i as FigmaTextContentMapping, R as RelationshipType, V as VariantLoader, j as VariantRenderOptions } from '../defineFragment-CBMS7Bab.js';
2
+ export { A as AIMetadata, J as BaselineInfo, B as BlockDefinition, I as BoundingBox, v as CompiledRecipe, o as ComponentRelation, C as ControlType, D as DiffResult, N as FigmaPropMapping, k as FragmentComponent, w as FragmentContract, x as FragmentGenerated, l as FragmentMeta, m as FragmentUsage, r as FragmentVariant, F as FragmentsConfig, Y as InferProps, M as Manifest, p as PlayFunction, q as PlayFunctionContext, n as PropDefinition, P as PropType, u as RecipeDefinition, t as RegistryOptions, G as Screenshot, y as ScreenshotConfig, H as ScreenshotMetadata, z as ServiceConfig, s as SnippetPolicyConfig, T as Theme, O as TokenConfig, K as VerifyRequest, L as VerifyResult, E as Viewport, U as compileBlock, Q as compileFragment, X as compileRecipe, a as defineBlock, d as defineFragment, W as defineRecipe } from '../defineFragment-CBMS7Bab.js';
3
3
  import { z } from 'zod';
4
4
  import { ComponentType, ReactNode } from 'react';
5
5
  export { ContextOptions, ContextResult, generateContext } from '@fragments-sdk/context/generate';
@@ -1719,10 +1719,40 @@ declare const fragmentsConfigSchema: z.ZodObject<{
1719
1719
  bundleSize?: number | undefined;
1720
1720
  } | undefined;
1721
1721
  }>]>>;
1722
+ storybook: z.ZodOptional<z.ZodObject<{
1723
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1724
+ include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1725
+ excludeDeprecated: z.ZodOptional<z.ZodBoolean>;
1726
+ excludeTests: z.ZodOptional<z.ZodBoolean>;
1727
+ excludeSvgIcons: z.ZodOptional<z.ZodBoolean>;
1728
+ excludeSubComponents: z.ZodOptional<z.ZodBoolean>;
1729
+ }, "strip", z.ZodTypeAny, {
1730
+ include?: string[] | undefined;
1731
+ exclude?: string[] | undefined;
1732
+ excludeDeprecated?: boolean | undefined;
1733
+ excludeTests?: boolean | undefined;
1734
+ excludeSvgIcons?: boolean | undefined;
1735
+ excludeSubComponents?: boolean | undefined;
1736
+ }, {
1737
+ include?: string[] | undefined;
1738
+ exclude?: string[] | undefined;
1739
+ excludeDeprecated?: boolean | undefined;
1740
+ excludeTests?: boolean | undefined;
1741
+ excludeSvgIcons?: boolean | undefined;
1742
+ excludeSubComponents?: boolean | undefined;
1743
+ }>>;
1722
1744
  }, "strip", z.ZodTypeAny, {
1723
1745
  include: string[];
1724
1746
  components?: string[] | undefined;
1725
1747
  screenshots?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
1748
+ storybook?: {
1749
+ include?: string[] | undefined;
1750
+ exclude?: string[] | undefined;
1751
+ excludeDeprecated?: boolean | undefined;
1752
+ excludeTests?: boolean | undefined;
1753
+ excludeSvgIcons?: boolean | undefined;
1754
+ excludeSubComponents?: boolean | undefined;
1755
+ } | undefined;
1726
1756
  tokens?: z.objectOutputType<{
1727
1757
  include: z.ZodArray<z.ZodString, "many">;
1728
1758
  }, z.ZodTypeAny, "passthrough"> | undefined;
@@ -1749,6 +1779,14 @@ declare const fragmentsConfigSchema: z.ZodObject<{
1749
1779
  include: string[];
1750
1780
  components?: string[] | undefined;
1751
1781
  screenshots?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
1782
+ storybook?: {
1783
+ include?: string[] | undefined;
1784
+ exclude?: string[] | undefined;
1785
+ excludeDeprecated?: boolean | undefined;
1786
+ excludeTests?: boolean | undefined;
1787
+ excludeSvgIcons?: boolean | undefined;
1788
+ excludeSubComponents?: boolean | undefined;
1789
+ } | undefined;
1752
1790
  tokens?: z.objectInputType<{
1753
1791
  include: z.ZodArray<z.ZodString, "many">;
1754
1792
  }, z.ZodTypeAny, "passthrough"> | undefined;
@@ -1798,6 +1836,70 @@ declare const recipeDefinitionSchema: z.ZodObject<{
1798
1836
  tags?: string[] | undefined;
1799
1837
  }>;
1800
1838
 
1839
+ /**
1840
+ * Smart filtering for Storybook adapter.
1841
+ *
1842
+ * Two layers:
1843
+ * 1. Per-file heuristics — checkStoryExclusion() checks title, tags, component name, etc.
1844
+ * 2. Cross-file sub-component detection — detectSubComponentPaths() uses directory structure.
1845
+ *
1846
+ * All functions are pure (no I/O, no side effects) for easy testing.
1847
+ */
1848
+
1849
+ type ExclusionReason = 'deprecated' | 'test-story' | 'svg-icon' | 'tag-excluded' | 'empty-variants' | 'sub-component' | 'config-excluded';
1850
+ interface ExclusionResult {
1851
+ excluded: boolean;
1852
+ reason?: ExclusionReason;
1853
+ detail?: string;
1854
+ }
1855
+ interface CheckStoryExclusionOpts {
1856
+ storybookTitle?: string;
1857
+ componentName: string;
1858
+ componentDisplayName?: string;
1859
+ componentFunctionName?: string;
1860
+ tags?: string[];
1861
+ variantCount: number;
1862
+ filePath: string;
1863
+ config: StorybookFilterConfig;
1864
+ }
1865
+ /**
1866
+ * Per-file exclusion check. Returns `{ excluded: true, reason, detail }` when
1867
+ * the fragment should be filtered out, or `{ excluded: false }` when it should
1868
+ * be kept.
1869
+ *
1870
+ * Config `include` trumps everything — if a name matches `include`, it is
1871
+ * never excluded by heuristics.
1872
+ */
1873
+ declare function checkStoryExclusion(opts: CheckStoryExclusionOpts): ExclusionResult;
1874
+ /**
1875
+ * Given all story file relative paths, detect which ones are sub-components
1876
+ * based on directory structure.
1877
+ *
1878
+ * Heuristic: within a directory, if one story file's base name matches the
1879
+ * directory name, it is the "primary" component. All other story files in
1880
+ * the same directory are considered sub-components.
1881
+ *
1882
+ * Example:
1883
+ * src/components/Form/Form.stories.tsx → primary ("Form")
1884
+ * src/components/Form/Checkbox.stories.tsx → sub-component of "Form"
1885
+ * src/components/Form/RadioGroup.stories.tsx → sub-component of "Form"
1886
+ *
1887
+ * Returns a Map from relative path → parent component name.
1888
+ * Paths NOT in the map are standalone components.
1889
+ */
1890
+ declare function detectSubComponentPaths(storyFiles: Array<{
1891
+ relativePath: string;
1892
+ }>): Map<string, string>;
1893
+ /**
1894
+ * Check if a component name matches the `storybook.include` patterns.
1895
+ * Include is a force-include that bypasses all heuristic filters.
1896
+ */
1897
+ declare function isForceIncluded(name: string, config: StorybookFilterConfig): boolean;
1898
+ /**
1899
+ * Check if a component name matches the `storybook.exclude` patterns.
1900
+ */
1901
+ declare function isConfigExcluded(name: string, config: StorybookFilterConfig): boolean;
1902
+
1801
1903
  /**
1802
1904
  * Figma property mapping DSL
1803
1905
  *
@@ -2089,4 +2191,4 @@ interface PreviewVariantRuntimeProps extends PreviewRuntimeOptions {
2089
2191
  */
2090
2192
  declare function PreviewVariantRuntime({ variant, loadedData, children, }: PreviewVariantRuntimeProps): react_jsx_runtime.JSX.Element;
2091
2193
 
2092
- export { BRAND, type Brand, type CSF2Story, type ComplexityTier, type CompositionAnalysis, type CompositionGuideline, type CompositionSuggestion, type CompositionWarning, DEFAULTS, type Decorator, type Defaults, type DesignToken, type EnhancedStyleDiffItem, FigmaBooleanMapping, FigmaChildrenMapping, FigmaEnumMapping, FigmaInstanceMapping, FigmaStringMapping, FigmaTextContentMapping, type Fragment, type FragmentAccessibility, type FragmentContextOptions, FragmentDefinition, type FragmentDoNotItem, type FragmentFigma, type FragmentIndex, type FragmentMeta as FragmentJsonMeta, type FragmentUsage as FragmentJsonUsage, type FragmentPattern, type FragmentRegistry, type FragmentRelated, type Loader, PRESET_NAMES, type ParsedToken, type PerformanceData as PerfData, type PerformanceSummary as PerfSummary, type PerformanceBudgets, type PerformanceConfig, type PreviewConfig, type PreviewRuntimeOptions, type PreviewRuntimeState, type PreviewVariantLike, PreviewVariantRuntime, type RegistryComponentEntry, type RegistryPropEntry, RelationshipType, type Story, type StoryArgType, type StoryContext, type StoryMeta, type StoryModule, type TokenCategory, type TokenFix, type TokenMatchRequest, type TokenMatchResult, type TokenParseError, type TokenParseOutput, type TokenParseResult, type TokenRegistry, type TokenRegistryMeta, type TokenUsageSummary, VariantLoader, aiMetadataSchema, analyzeComposition, blockDefinitionSchema, budgetBar, classifyComplexity, componentRelationSchema, executeVariantLoaders, figma, figmaPropMappingSchema, formatBytes, fragmentBanSchema, fragmentContractSchema, fragmentDefinitionSchema, fragmentGeneratedSchema, fragmentMetaSchema, fragmentUsageSchema, fragmentVariantSchema, fragmentsConfigSchema, getPreviewConfig, isExportStory, isFigmaPropMapping, parseTokenFile, propDefinitionSchema, recipeDefinitionSchema, resolveFigmaMapping, resolvePerformanceConfig, resolvePreviewRuntimeState, setPreviewConfig, storyModuleToFragment, storyNameFromExport, toId, usePreviewVariantRuntime };
2194
+ export { BRAND, type Brand, type CSF2Story, type CheckStoryExclusionOpts, type ComplexityTier, type CompositionAnalysis, type CompositionGuideline, type CompositionSuggestion, type CompositionWarning, DEFAULTS, type Decorator, type Defaults, type DesignToken, type EnhancedStyleDiffItem, type ExclusionReason, type ExclusionResult, FigmaBooleanMapping, FigmaChildrenMapping, FigmaEnumMapping, FigmaInstanceMapping, FigmaStringMapping, FigmaTextContentMapping, type Fragment, type FragmentAccessibility, type FragmentContextOptions, FragmentDefinition, type FragmentDoNotItem, type FragmentFigma, type FragmentIndex, type FragmentMeta as FragmentJsonMeta, type FragmentUsage as FragmentJsonUsage, type FragmentPattern, type FragmentRegistry, type FragmentRelated, type Loader, PRESET_NAMES, type ParsedToken, type PerformanceData as PerfData, type PerformanceSummary as PerfSummary, type PerformanceBudgets, type PerformanceConfig, type PreviewConfig, type PreviewRuntimeOptions, type PreviewRuntimeState, type PreviewVariantLike, PreviewVariantRuntime, type RegistryComponentEntry, type RegistryPropEntry, RelationshipType, type Story, type StoryArgType, type StoryContext, type StoryMeta, type StoryModule, StorybookFilterConfig, type TokenCategory, type TokenFix, type TokenMatchRequest, type TokenMatchResult, type TokenParseError, type TokenParseOutput, type TokenParseResult, type TokenRegistry, type TokenRegistryMeta, type TokenUsageSummary, VariantLoader, aiMetadataSchema, analyzeComposition, blockDefinitionSchema, budgetBar, checkStoryExclusion, classifyComplexity, componentRelationSchema, detectSubComponentPaths, executeVariantLoaders, figma, figmaPropMappingSchema, formatBytes, fragmentBanSchema, fragmentContractSchema, fragmentDefinitionSchema, fragmentGeneratedSchema, fragmentMetaSchema, fragmentUsageSchema, fragmentVariantSchema, fragmentsConfigSchema, getPreviewConfig, isConfigExcluded, isExportStory, isFigmaPropMapping, isForceIncluded, parseTokenFile, propDefinitionSchema, recipeDefinitionSchema, resolveFigmaMapping, resolvePerformanceConfig, resolvePreviewRuntimeState, setPreviewConfig, storyModuleToFragment, storyNameFromExport, toId, usePreviewVariantRuntime };
@@ -27,7 +27,7 @@ import {
27
27
  storyNameFromExport,
28
28
  toId,
29
29
  usePreviewVariantRuntime
30
- } from "../chunk-NGIMCIK2.js";
30
+ } from "../chunk-GF6OVPIN.js";
31
31
  import {
32
32
  aiMetadataSchema,
33
33
  blockDefinitionSchema,
@@ -43,7 +43,13 @@ import {
43
43
  fragmentsConfigSchema,
44
44
  propDefinitionSchema,
45
45
  recipeDefinitionSchema
46
- } from "../chunk-GOVI6COW.js";
46
+ } from "../chunk-NVSPGSKB.js";
47
+ import {
48
+ checkStoryExclusion,
49
+ detectSubComponentPaths,
50
+ isConfigExcluded,
51
+ isForceIncluded
52
+ } from "../chunk-EZYXYWNF.js";
47
53
  import {
48
54
  BRAND,
49
55
  DEFAULTS
@@ -58,6 +64,7 @@ export {
58
64
  analyzeComposition,
59
65
  blockDefinitionSchema,
60
66
  budgetBar,
67
+ checkStoryExclusion,
61
68
  classifyComplexity,
62
69
  compileBlock,
63
70
  compileFragment,
@@ -66,6 +73,7 @@ export {
66
73
  defineBlock,
67
74
  defineFragment,
68
75
  defineRecipe,
76
+ detectSubComponentPaths,
69
77
  executeVariantLoaders,
70
78
  figma,
71
79
  figmaPropMappingSchema,
@@ -80,8 +88,10 @@ export {
80
88
  fragmentsConfigSchema,
81
89
  generateContext,
82
90
  getPreviewConfig,
91
+ isConfigExcluded,
83
92
  isExportStory,
84
93
  isFigmaPropMapping,
94
+ isForceIncluded,
85
95
  parseTokenFile,
86
96
  propDefinitionSchema,
87
97
  recipeDefinitionSchema,
@@ -359,6 +359,24 @@ interface SnippetPolicyConfig {
359
359
  /** Allow these external modules for JSX components in snippets/renders. */
360
360
  allowedExternalModules?: string[];
361
361
  }
362
+ /**
363
+ * Storybook adapter filtering configuration.
364
+ * Controls which Storybook stories are included when generating fragments.
365
+ */
366
+ interface StorybookFilterConfig {
367
+ /** Glob-style patterns for component names to explicitly exclude */
368
+ exclude?: string[];
369
+ /** Glob-style patterns for component names to force-include (bypasses all heuristic filters) */
370
+ include?: string[];
371
+ /** Exclude stories with "Deprecated" in the title (default: true) */
372
+ excludeDeprecated?: boolean;
373
+ /** Exclude test stories (title ending /test(s) or *.test.stories.* files) (default: true) */
374
+ excludeTests?: boolean;
375
+ /** Exclude SVG icon components (names matching Svg[A-Z]*) (default: true) */
376
+ excludeSvgIcons?: boolean;
377
+ /** Exclude sub-components detected by directory structure (default: true) */
378
+ excludeSubComponents?: boolean;
379
+ }
362
380
  /**
363
381
  * Config file structure
364
382
  */
@@ -396,6 +414,8 @@ interface FragmentsConfig {
396
414
  bundleSize?: number;
397
415
  };
398
416
  };
417
+ /** Storybook adapter filtering configuration */
418
+ storybook?: StorybookFilterConfig;
399
419
  }
400
420
  /**
401
421
  * Screenshot capture configuration
@@ -662,4 +682,4 @@ declare const compileRecipe: typeof compileBlock;
662
682
  */
663
683
  type InferProps<T> = T extends FragmentComponent<infer P> ? P : never;
664
684
 
665
- export { type AIMetadata as A, type BlockDefinition as B, type ControlType as C, type DiffResult as D, type Screenshot as E, type FragmentsConfig as F, type ScreenshotMetadata as G, type BoundingBox as H, type BaselineInfo as I, type VerifyRequest as J, type VerifyResult as K, type FigmaPropMapping as L, type Manifest as M, type TokenConfig as N, compileFragment as O, type PropType as P, compileBlock as Q, type RelationshipType as R, type SnippetPolicyConfig as S, type Theme as T, defineRecipe as U, type VariantLoader as V, compileRecipe as W, type InferProps as X, defineBlock as a, type FragmentDefinition as b, type FigmaStringMapping as c, defineFragment as d, type FigmaBooleanMapping as e, type FigmaEnumMapping as f, type FigmaInstanceMapping as g, type FigmaChildrenMapping as h, type FigmaTextContentMapping as i, type VariantRenderOptions as j, type FragmentComponent as k, type FragmentMeta as l, type FragmentUsage as m, type PropDefinition as n, type ComponentRelation as o, type PlayFunction as p, type PlayFunctionContext as q, type FragmentVariant as r, type RegistryOptions as s, type RecipeDefinition as t, type CompiledRecipe as u, type FragmentContract as v, type FragmentGenerated as w, type ScreenshotConfig as x, type ServiceConfig as y, type Viewport as z };
685
+ export { type AIMetadata as A, type BlockDefinition as B, type ControlType as C, type DiffResult as D, type Viewport as E, type FragmentsConfig as F, type Screenshot as G, type ScreenshotMetadata as H, type BoundingBox as I, type BaselineInfo as J, type VerifyRequest as K, type VerifyResult as L, type Manifest as M, type FigmaPropMapping as N, type TokenConfig as O, type PropType as P, compileFragment as Q, type RelationshipType as R, type StorybookFilterConfig as S, type Theme as T, compileBlock as U, type VariantLoader as V, defineRecipe as W, compileRecipe as X, type InferProps as Y, defineBlock as a, type FragmentDefinition as b, type FigmaStringMapping as c, defineFragment as d, type FigmaBooleanMapping as e, type FigmaEnumMapping as f, type FigmaInstanceMapping as g, type FigmaChildrenMapping as h, type FigmaTextContentMapping as i, type VariantRenderOptions as j, type FragmentComponent as k, type FragmentMeta as l, type FragmentUsage as m, type PropDefinition as n, type ComponentRelation as o, type PlayFunction as p, type PlayFunctionContext as q, type FragmentVariant as r, type SnippetPolicyConfig as s, type RegistryOptions as t, type RecipeDefinition as u, type CompiledRecipe as v, type FragmentContract as w, type FragmentGenerated as x, type ScreenshotConfig as y, type ServiceConfig as z };