@fragments-sdk/cli 0.9.1 → 0.10.0

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 (106) hide show
  1. package/dist/bin.d.ts +1 -0
  2. package/dist/bin.js +435 -67
  3. package/dist/bin.js.map +1 -1
  4. package/dist/{chunk-BW3ZATBW.js → chunk-566BNPQZ.js} +3 -5
  5. package/dist/chunk-566BNPQZ.js.map +1 -0
  6. package/dist/{chunk-5GT62FCB.js → chunk-CAMXG5HJ.js} +5 -5
  7. package/dist/chunk-D2CDBRNU.js +2 -0
  8. package/dist/{chunk-YMPGYEWK.js → chunk-D5PYOXEI.js} +2 -2
  9. package/dist/{chunk-GF6OVPIN.js → chunk-OQO55NKV.js} +405 -34
  10. package/dist/chunk-OQO55NKV.js.map +1 -0
  11. package/dist/{chunk-TOIE7VXF.js → chunk-PW7QTQA6.js} +2 -2
  12. package/dist/{chunk-AWYCDRPG.js → chunk-WXSR2II7.js} +2 -2
  13. package/dist/chunk-WXSR2II7.js.map +1 -0
  14. package/dist/{chunk-D7372LQX.js → chunk-ZDA3PLQ6.js} +8 -12
  15. package/dist/chunk-ZDA3PLQ6.js.map +1 -0
  16. package/dist/core/index.d.ts +1 -2194
  17. package/dist/core/index.js +22 -27
  18. package/dist/{discovery-Z4RDDFVR.js → discovery-NEOY4MPN.js} +3 -3
  19. package/dist/{generate-LQA2R7FN.js → generate-BGKTKO6E.js} +5 -7
  20. package/dist/{generate-LQA2R7FN.js.map → generate-BGKTKO6E.js.map} +1 -1
  21. package/dist/index.d.ts +3 -5
  22. package/dist/index.js +7 -9
  23. package/dist/index.js.map +1 -1
  24. package/dist/{init-2GEGVIUQ.js → init-Q53R5Q2T.js} +58 -6
  25. package/dist/init-Q53R5Q2T.js.map +1 -0
  26. package/dist/mcp-bin.js +5 -8
  27. package/dist/mcp-bin.js.map +1 -1
  28. package/dist/scan-OQU7M4GH.js +14 -0
  29. package/dist/scan-generate-T5QNUG7N.js +691 -0
  30. package/dist/scan-generate-T5QNUG7N.js.map +1 -0
  31. package/dist/{service-XP2EAJXD.js → service-TQYWY65E.js} +4 -6
  32. package/dist/{static-viewer-XCS7UJTO.js → static-viewer-NUBFPKWH.js} +4 -6
  33. package/dist/{test-TD6TJNVY.js → test-2CSOSS3B.js} +4 -5
  34. package/dist/{test-TD6TJNVY.js.map → test-2CSOSS3B.js.map} +1 -1
  35. package/dist/{tokens-2EXPCVP3.js → tokens-DXEGYTOJ.js} +6 -8
  36. package/dist/{tokens-2EXPCVP3.js.map → tokens-DXEGYTOJ.js.map} +1 -1
  37. package/dist/{viewer-RFA2KVBG.js → viewer-DBEPYM3G.js} +16 -19
  38. package/dist/viewer-DBEPYM3G.js.map +1 -0
  39. package/package.json +2 -1
  40. package/src/bin.ts +33 -1
  41. package/src/build.ts +1 -1
  42. package/src/commands/__tests__/scan-generate.test.ts +308 -0
  43. package/src/commands/init.ts +72 -5
  44. package/src/commands/perf.ts +1 -1
  45. package/src/commands/scan-generate.ts +1013 -0
  46. package/src/commands/setup.ts +499 -0
  47. package/src/core/auto-props.ts +1 -1
  48. package/src/core/bundle-measurer.ts +2 -2
  49. package/src/core/config.ts +2 -3
  50. package/src/core/discovery.ts +2 -2
  51. package/src/core/generators/context.ts +1 -1
  52. package/src/core/generators/registry.ts +3 -3
  53. package/src/core/generators/typescript-extractor.ts +1 -1
  54. package/src/core/graph-extractor.ts +1 -1
  55. package/src/core/index.ts +3 -205
  56. package/src/core/loader.ts +2 -2
  57. package/src/core/parser.ts +1 -1
  58. package/src/core/previewLoader.ts +1 -1
  59. package/src/index.ts +2 -2
  60. package/src/service/snippet-validation.test.ts +1 -1
  61. package/src/service/snippet-validation.ts +2 -2
  62. package/src/viewer/__tests__/viewer-integration.test.ts +3 -9
  63. package/src/viewer/vendor/shared/src/VariantPreviewCard.module.scss +2 -10
  64. package/src/viewer/vite-plugin.ts +1 -1
  65. package/dist/chunk-AWYCDRPG.js.map +0 -1
  66. package/dist/chunk-BW3ZATBW.js.map +0 -1
  67. package/dist/chunk-D7372LQX.js.map +0 -1
  68. package/dist/chunk-EKLMXTWU.js +0 -80
  69. package/dist/chunk-EKLMXTWU.js.map +0 -1
  70. package/dist/chunk-EZYXYWNF.js +0 -131
  71. package/dist/chunk-EZYXYWNF.js.map +0 -1
  72. package/dist/chunk-GF6OVPIN.js.map +0 -1
  73. package/dist/chunk-NVSPGSKB.js +0 -203
  74. package/dist/chunk-NVSPGSKB.js.map +0 -1
  75. package/dist/defineFragment-CBMS7Bab.d.ts +0 -685
  76. package/dist/init-2GEGVIUQ.js.map +0 -1
  77. package/dist/scan-JGS65S7P.js +0 -16
  78. package/dist/storyFilters-3LUYAFZF.js +0 -15
  79. package/dist/viewer-RFA2KVBG.js.map +0 -1
  80. package/src/core/__tests__/preview-runtime.test.tsx +0 -111
  81. package/src/core/composition.test.ts +0 -262
  82. package/src/core/composition.ts +0 -318
  83. package/src/core/constants.ts +0 -114
  84. package/src/core/context.ts +0 -2
  85. package/src/core/defineFragment.ts +0 -141
  86. package/src/core/figma.ts +0 -263
  87. package/src/core/fragment-types.ts +0 -214
  88. package/src/core/performance-presets.ts +0 -142
  89. package/src/core/preview-runtime.tsx +0 -144
  90. package/src/core/schema.ts +0 -229
  91. package/src/core/storyAdapter.test.ts +0 -571
  92. package/src/core/storyAdapter.ts +0 -761
  93. package/src/core/storyFilters.test.ts +0 -350
  94. package/src/core/storyFilters.ts +0 -253
  95. package/src/core/storybook-csf.ts +0 -11
  96. package/src/core/token-parser.ts +0 -321
  97. package/src/core/token-types.ts +0 -287
  98. package/src/core/types.ts +0 -784
  99. /package/dist/{chunk-5GT62FCB.js.map → chunk-CAMXG5HJ.js.map} +0 -0
  100. /package/dist/{discovery-Z4RDDFVR.js.map → chunk-D2CDBRNU.js.map} +0 -0
  101. /package/dist/{chunk-YMPGYEWK.js.map → chunk-D5PYOXEI.js.map} +0 -0
  102. /package/dist/{chunk-TOIE7VXF.js.map → chunk-PW7QTQA6.js.map} +0 -0
  103. /package/dist/{scan-JGS65S7P.js.map → discovery-NEOY4MPN.js.map} +0 -0
  104. /package/dist/{service-XP2EAJXD.js.map → scan-OQU7M4GH.js.map} +0 -0
  105. /package/dist/{static-viewer-XCS7UJTO.js.map → service-TQYWY65E.js.map} +0 -0
  106. /package/dist/{storyFilters-3LUYAFZF.js.map → static-viewer-NUBFPKWH.js.map} +0 -0
@@ -1,2194 +1 @@
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
- import { z } from 'zod';
4
- import { ComponentType, ReactNode } from 'react';
5
- export { ContextOptions, ContextResult, generateContext } from '@fragments-sdk/context/generate';
6
- import { ComponentGraph } from '@fragments-sdk/context/graph';
7
- import { CompiledFragment } from '@fragments-sdk/context/types';
8
- export { CompiledBlock, CompiledFragment, CompiledFragmentsFile, CompiledTokenData, CompiledTokenEntry } from '@fragments-sdk/context/types';
9
- import * as react_jsx_runtime from 'react/jsx-runtime';
10
- import { toId as toId$1, storyNameFromExport as storyNameFromExport$1, isExportStory as isExportStory$1 } from '@storybook/csf';
11
-
12
- declare const toId: typeof toId$1;
13
- declare const storyNameFromExport: typeof storyNameFromExport$1;
14
- declare const isExportStory: typeof isExportStory$1;
15
-
16
- /**
17
- * Runtime adapter for converting Storybook CSF modules to Fragment definitions.
18
- *
19
- * This operates on IMPORTED modules at runtime, not source code parsing.
20
- * By leveraging Vite's module system, we get 100% accurate render functions
21
- * without any regex or AST parsing complexity.
22
- *
23
- * Supports Storybook 8.x with both CSF2 (Template.bind) and CSF3 (object stories).
24
- */
25
-
26
- /**
27
- * Storybook decorator function signature
28
- */
29
- type Decorator = (Story: () => ReactNode, context: StoryContext) => ReactNode;
30
- /**
31
- * Storybook loader function signature
32
- */
33
- type Loader = (context: StoryContext) => Promise<Record<string, unknown>>;
34
- /**
35
- * Storybook play function signature (internal, extends StoryContext)
36
- */
37
- type StorybookPlayFunction = (context: StorybookPlayFunctionContext) => Promise<void>;
38
- /**
39
- * Context passed to Storybook play functions (extends StoryContext for compatibility)
40
- */
41
- interface StorybookPlayFunctionContext extends StoryContext {
42
- canvasElement: HTMLElement;
43
- step: (name: string, fn: () => Promise<void>) => Promise<void>;
44
- }
45
- /**
46
- * Context passed to decorators and render functions
47
- */
48
- interface StoryContext {
49
- args: Record<string, unknown>;
50
- argTypes: Record<string, StoryArgType>;
51
- globals: Record<string, unknown>;
52
- parameters: Record<string, unknown>;
53
- id: string;
54
- kind: string;
55
- name: string;
56
- story: string;
57
- viewMode: "story" | "docs";
58
- loaded: Record<string, unknown>;
59
- abortSignal: AbortSignal;
60
- componentId: string;
61
- title: string;
62
- }
63
- /**
64
- * Storybook Meta (default export)
65
- */
66
- interface StoryMeta {
67
- title?: string;
68
- component?: ComponentType<unknown>;
69
- subcomponents?: Record<string, ComponentType<unknown>>;
70
- tags?: string[];
71
- parameters?: Record<string, unknown> & {
72
- docs?: {
73
- description?: {
74
- component?: string;
75
- };
76
- };
77
- };
78
- argTypes?: Record<string, StoryArgType>;
79
- args?: Record<string, unknown>;
80
- decorators?: Decorator[];
81
- loaders?: Loader[];
82
- render?: (args: Record<string, unknown>, context?: StoryContext) => ReactNode;
83
- includeStories?: string[] | RegExp;
84
- excludeStories?: string[] | RegExp;
85
- }
86
- /**
87
- * Storybook argType definition
88
- */
89
- interface StoryArgType {
90
- control?: string | false | {
91
- type: string;
92
- min?: number;
93
- max?: number;
94
- step?: number;
95
- presetColors?: string[];
96
- };
97
- options?: string[];
98
- description?: string;
99
- table?: {
100
- defaultValue?: {
101
- summary: string;
102
- };
103
- type?: {
104
- summary: string;
105
- };
106
- category?: string;
107
- subcategory?: string;
108
- disable?: boolean;
109
- };
110
- type?: {
111
- name: string;
112
- required?: boolean;
113
- };
114
- name?: string;
115
- defaultValue?: unknown;
116
- if?: {
117
- arg?: string;
118
- exists?: boolean;
119
- };
120
- mapping?: Record<string, unknown>;
121
- action?: string;
122
- }
123
- /**
124
- * Storybook Story export (CSF3)
125
- */
126
- interface Story {
127
- args?: Record<string, unknown>;
128
- argTypes?: Record<string, StoryArgType>;
129
- render?: (args: Record<string, unknown>, context?: StoryContext) => ReactNode;
130
- decorators?: Decorator[];
131
- loaders?: Loader[];
132
- play?: StorybookPlayFunction;
133
- parameters?: Record<string, unknown> & {
134
- docs?: {
135
- description?: {
136
- story?: string;
137
- };
138
- };
139
- };
140
- name?: string;
141
- storyName?: string;
142
- tags?: string[];
143
- }
144
- /**
145
- * CSF2 story function (from Template.bind({})) with args attached
146
- */
147
- type CSF2Story = ((args: Record<string, unknown>) => ReactNode) & {
148
- args?: Record<string, unknown>;
149
- argTypes?: Record<string, StoryArgType>;
150
- decorators?: Decorator[];
151
- loaders?: Loader[];
152
- play?: StorybookPlayFunction;
153
- parameters?: Record<string, unknown>;
154
- storyName?: string;
155
- };
156
- /**
157
- * A complete Storybook module with default meta and named story exports
158
- */
159
- interface StoryModule {
160
- default: StoryMeta;
161
- [exportName: string]: Story | CSF2Story | StoryMeta | unknown;
162
- }
163
- /**
164
- * Global configuration from preview.tsx
165
- */
166
- interface PreviewConfig {
167
- decorators?: Decorator[];
168
- parameters?: Record<string, unknown>;
169
- globalTypes?: Record<string, unknown>;
170
- args?: Record<string, unknown>;
171
- argTypes?: Record<string, StoryArgType>;
172
- loaders?: Loader[];
173
- }
174
- /**
175
- * Set the global preview configuration loaded from .storybook/preview.tsx
176
- */
177
- declare function setPreviewConfig(config: PreviewConfig): void;
178
- /**
179
- * Get the current global preview configuration
180
- */
181
- declare function getPreviewConfig(): PreviewConfig;
182
- /**
183
- * Convert a Storybook module to a Fragment definition at runtime.
184
- *
185
- * @param storyModule - The imported Storybook module
186
- * @param filePath - File path for metadata extraction
187
- * @returns A complete FragmentDefinition ready for the viewer
188
- */
189
- declare function storyModuleToFragment(storyModule: StoryModule, filePath: string): FragmentDefinition | null;
190
-
191
- /**
192
- * TypeScript types for Fragment JSON files.
193
- * These types correspond to the JSON schemas in ./schema/
194
- */
195
- /**
196
- * Figma design links and mappings
197
- */
198
- interface FragmentFigma {
199
- /** Figma file URL */
200
- file?: string;
201
- /** Default Figma node ID for this component */
202
- nodeId?: string;
203
- /** Mapping of variant names to Figma node IDs */
204
- variants?: Record<string, string>;
205
- }
206
- /**
207
- * Anti-pattern with optional alternative
208
- */
209
- interface FragmentDoNotItem {
210
- /** What not to do */
211
- text: string;
212
- /** Component name to use instead */
213
- instead?: string;
214
- }
215
- /**
216
- * Usage pattern with code example
217
- */
218
- interface FragmentPattern {
219
- /** Pattern name */
220
- name: string;
221
- /** Code example */
222
- code: string;
223
- /** When to use this pattern */
224
- description?: string;
225
- }
226
- /**
227
- * Usage guidelines for AI agents and developers
228
- */
229
- interface FragmentUsage {
230
- /** Scenarios when this component should be used */
231
- when?: string[];
232
- /** Anti-patterns and what to use instead */
233
- doNot?: (string | FragmentDoNotItem)[];
234
- /** Common usage patterns with code examples */
235
- patterns?: FragmentPattern[];
236
- }
237
- /**
238
- * Accessibility requirements and guidelines
239
- */
240
- interface FragmentAccessibility {
241
- /** ARIA role this component implements */
242
- role?: string;
243
- /** Accessibility requirements */
244
- requirements?: string[];
245
- /** Keyboard interaction patterns (key -> description) */
246
- keyboard?: Record<string, string>;
247
- }
248
- /**
249
- * Relationships to other components
250
- */
251
- interface FragmentRelated {
252
- /** Similar components that might be alternatives */
253
- similar?: string[];
254
- /** Components commonly used together with this one */
255
- composedWith?: string[];
256
- /** Parent components or patterns where this is commonly used */
257
- usedIn?: string[];
258
- }
259
- /**
260
- * Administrative metadata
261
- */
262
- interface FragmentMeta {
263
- /** Team or person responsible for this component */
264
- owner?: string;
265
- /** Component lifecycle status */
266
- status?: "draft" | "experimental" | "beta" | "stable" | "deprecated";
267
- /** Version when this component was introduced */
268
- since?: string;
269
- /** Version when this component was deprecated */
270
- deprecatedSince?: string;
271
- /** Why this component was deprecated and what to use instead */
272
- deprecatedReason?: string;
273
- /** Tags for categorization and search */
274
- tags?: string[];
275
- }
276
- /**
277
- * Fragment JSON file structure (.fragment.json)
278
- * Contains enrichment metadata for a component
279
- */
280
- interface Fragment {
281
- /** JSON Schema reference */
282
- $schema?: string;
283
- /** Component name (must match the component export name) */
284
- name: string;
285
- /** Brief description of the component's purpose */
286
- description?: string;
287
- /** Figma design links and mappings */
288
- figma?: FragmentFigma;
289
- /** Usage guidelines for AI agents and developers */
290
- usage?: FragmentUsage;
291
- /** Accessibility requirements and guidelines */
292
- accessibility?: FragmentAccessibility;
293
- /** Relationships to other components */
294
- related?: FragmentRelated;
295
- /** Administrative metadata */
296
- meta?: FragmentMeta;
297
- }
298
- /**
299
- * Prop entry in the registry
300
- */
301
- interface RegistryPropEntry {
302
- /** TypeScript type (e.g., 'string', 'boolean', enum values) */
303
- type?: string;
304
- /** Simplified type category */
305
- typeKind?: "string" | "number" | "boolean" | "enum" | "object" | "array" | "function" | "node" | "element" | "union" | "unknown";
306
- /** For enum types, the allowed values */
307
- options?: string[];
308
- /** Default value if specified */
309
- default?: unknown;
310
- /** Whether this prop is required */
311
- required?: boolean;
312
- /** Prop description from JSDoc or TypeScript */
313
- description?: string;
314
- }
315
- /**
316
- * Component entry in the registry (simplified - focuses on paths and enrichment)
317
- */
318
- interface RegistryComponentEntry {
319
- /** Relative path to the component source file */
320
- path: string;
321
- /** Relative path to the .fragment.json file (if exists) */
322
- fragmentPath?: string;
323
- /** Relative path to the .stories.tsx file (if exists) */
324
- storyPath?: string;
325
- /** Component category (inferred from directory or fragment) */
326
- category?: string;
327
- /** Component lifecycle status (from fragment) */
328
- status?: "draft" | "experimental" | "beta" | "stable" | "deprecated";
329
- /** Component description (from fragment or JSDoc) */
330
- description?: string;
331
- /** Has human-authored enrichment (fragment file exists with content beyond skeleton) */
332
- hasEnrichment?: boolean;
333
- /** Extracted prop definitions - only included if config.registry.includeProps is true */
334
- props?: Record<string, RegistryPropEntry>;
335
- /** Named exports from the component file */
336
- exports?: string[];
337
- /** Component dependencies (other components used) */
338
- dependencies?: string[];
339
- /** Merged fragment enrichment data - only included if config.registry.embedFragments is true */
340
- fragment?: Fragment;
341
- }
342
- /**
343
- * Minimal component index (.fragments/index.json)
344
- * Ultra-light name → path mapping for quick lookups
345
- */
346
- interface FragmentIndex {
347
- /** Schema version */
348
- version: string;
349
- /** When this index was generated */
350
- generatedAt: string;
351
- /** Simple name → path mapping */
352
- components: Record<string, string>;
353
- /** Categories for grouping */
354
- categories?: Record<string, string[]>;
355
- }
356
- /**
357
- * Registry file structure (.fragments/registry.json)
358
- * Component index with resolved paths and optional metadata
359
- */
360
- interface FragmentRegistry {
361
- /** JSON Schema reference */
362
- $schema?: string;
363
- /** Schema version */
364
- version: string;
365
- /** When this registry was generated */
366
- generatedAt: string;
367
- /** Component count for quick reference */
368
- componentCount: number;
369
- /** Component index keyed by component name */
370
- components: Record<string, RegistryComponentEntry>;
371
- /** Components grouped by category */
372
- categories?: Record<string, string[]>;
373
- }
374
- /**
375
- * Context file options for generation
376
- */
377
- interface FragmentContextOptions {
378
- /** Output format */
379
- format?: "markdown" | "json";
380
- /** Compact mode - minimal output for token efficiency */
381
- compact?: boolean;
382
- /** What to include in the output */
383
- include?: {
384
- /** Include prop details (default: true) */
385
- props?: boolean;
386
- /** Include code examples (default: false) */
387
- code?: boolean;
388
- /** Include related components (default: true) */
389
- relations?: boolean;
390
- };
391
- }
392
-
393
- /**
394
- * Brand constants for easy rebranding if domain availability requires it.
395
- * All naming throughout the codebase should reference these constants.
396
- */
397
- declare const BRAND: {
398
- /** Display name (e.g., "Fragments") */
399
- readonly name: "Fragments";
400
- /** Lowercase name for file paths and CLI (e.g., "fragments") */
401
- readonly nameLower: "fragments";
402
- /** File extension for fragment definition files (e.g., ".fragment.tsx") */
403
- readonly fileExtension: ".fragment.tsx";
404
- /** Legacy file extension for segments (still supported for migration) */
405
- readonly legacyFileExtension: ".segment.tsx";
406
- /** JSON file extension for compiled output */
407
- readonly jsonExtension: ".fragment.json";
408
- /** Default output file name (e.g., "fragments.json") */
409
- readonly outFile: "fragments.json";
410
- /** Config file name (e.g., "fragments.config.ts") */
411
- readonly configFile: "fragments.config.ts";
412
- /** Legacy config file name (still supported for migration) */
413
- readonly legacyConfigFile: "segments.config.ts";
414
- /** CLI command name (e.g., "fragments") */
415
- readonly cliCommand: "fragments";
416
- /** Package scope (e.g., "@fragments") */
417
- readonly packageScope: "@fragments";
418
- /** Directory for storing fragments, registry, and cache */
419
- readonly dataDir: ".fragments";
420
- /** Components subdirectory within .fragments/ */
421
- readonly componentsDir: "components";
422
- /** Registry file name */
423
- readonly registryFile: "registry.json";
424
- /** Context file name (AI-ready markdown) */
425
- readonly contextFile: "context.md";
426
- /** Screenshots subdirectory */
427
- readonly screenshotsDir: "screenshots";
428
- /** Cache subdirectory (gitignored) */
429
- readonly cacheDir: "cache";
430
- /** Diff output subdirectory (gitignored) */
431
- readonly diffDir: "diff";
432
- /** Manifest filename */
433
- readonly manifestFile: "manifest.json";
434
- /** Prefix for localStorage keys (e.g., "fragments-") */
435
- readonly storagePrefix: "fragments-";
436
- /** Static viewer HTML file name */
437
- readonly viewerHtmlFile: "fragments-viewer.html";
438
- /** MCP tool name prefix (e.g., "fragments_") */
439
- readonly mcpToolPrefix: "fragments_";
440
- /** File extension for block definition files */
441
- readonly blockFileExtension: ".block.ts";
442
- /** @deprecated Use blockFileExtension instead */
443
- readonly recipeFileExtension: ".recipe.ts";
444
- /** Vite plugin namespace */
445
- readonly vitePluginNamespace: "fragments-core-shim";
446
- };
447
- type Brand = typeof BRAND;
448
- /**
449
- * Default configuration values for the service.
450
- * These can be overridden in fragments.config.ts
451
- */
452
- declare const DEFAULTS: {
453
- /** Default viewport dimensions */
454
- readonly viewport: {
455
- readonly width: 1280;
456
- readonly height: 800;
457
- };
458
- /** Default diff threshold (percentage) */
459
- readonly diffThreshold: 5;
460
- /** Browser pool size */
461
- readonly poolSize: 3;
462
- /** Idle timeout before browser shutdown (ms) - 5 minutes */
463
- readonly idleTimeoutMs: number;
464
- /** Delay after render before capture (ms) */
465
- readonly captureDelayMs: 100;
466
- /** Font loading timeout (ms) */
467
- readonly fontTimeoutMs: 3000;
468
- /** Default theme */
469
- readonly theme: "light";
470
- /** Dev server port */
471
- readonly port: 6006;
472
- };
473
- type Defaults = typeof DEFAULTS;
474
-
475
- /**
476
- * Performance budget presets and classification utilities.
477
- *
478
- * ESLint model: global defaults, zero-config, auto-measurement.
479
- * Users configure 0-3 numbers. Per-component overrides are the `eslint-disable` equivalent.
480
- */
481
- interface PerformanceBudgets {
482
- /** Maximum gzipped bundle size in bytes */
483
- bundleSize: number;
484
- }
485
- interface PerformanceConfig {
486
- preset: string;
487
- budgets: PerformanceBudgets;
488
- }
489
- type ComplexityTier = 'lightweight' | 'moderate' | 'heavy';
490
- interface PerformanceData {
491
- /** Gzipped bundle size in bytes */
492
- bundleSize: number;
493
- /** Raw (minified, not gzipped) bundle size in bytes */
494
- rawSize: number;
495
- /** Complexity classification */
496
- complexity: ComplexityTier;
497
- /** Percentage of budget used (0-100+) */
498
- budgetPercent: number;
499
- /** Whether the component exceeds its budget */
500
- overBudget: boolean;
501
- /** ISO timestamp when measured */
502
- measuredAt: string;
503
- }
504
- interface PerformanceSummary {
505
- /** Preset name used */
506
- preset: string;
507
- /** Budget applied in bytes */
508
- budget: number;
509
- /** Total components measured */
510
- total: number;
511
- /** Number of components over budget */
512
- overBudget: number;
513
- /** Distribution by tier */
514
- tiers: Record<ComplexityTier, number>;
515
- }
516
- declare const PRESET_NAMES: readonly string[];
517
- /**
518
- * Resolve a performance config from user input.
519
- * Accepts a preset name string or a custom config object.
520
- */
521
- declare function resolvePerformanceConfig(input: string | {
522
- preset?: string;
523
- budgets?: Partial<PerformanceBudgets>;
524
- } | undefined): PerformanceConfig;
525
- /**
526
- * Classify a component's complexity based on gzipped bundle size.
527
- *
528
- * - lightweight: < 5KB — simple, leaf components
529
- * - moderate: < 15KB — typical composed components
530
- * - heavy: >= 15KB — complex widgets with dependencies
531
- */
532
- declare function classifyComplexity(gzipBytes: number): ComplexityTier;
533
- /**
534
- * Format bytes to a human-readable string (e.g. "2.1KB", "15.3KB").
535
- */
536
- declare function formatBytes(bytes: number): string;
537
- /**
538
- * Create a visual budget bar for terminal output.
539
- */
540
- declare function budgetBar(percent: number, width?: number): string;
541
-
542
- /**
543
- * Design Token Types for Fragments
544
- *
545
- * These types define the structure for CSS custom property (CSS variable) discovery,
546
- * parsing, and reverse lookup capabilities. The token system enables:
547
- *
548
- * 1. Automatic discovery of design tokens from CSS/SCSS files
549
- * 2. Reverse lookup: given a computed value, find which token(s) produce it
550
- * 3. Detection of hardcoded values vs token usage
551
- * 4. AI-friendly fix suggestions
552
- */
553
- /**
554
- * Token categories for grouping and filtering
555
- */
556
- type TokenCategory = "color" | "spacing" | "typography" | "radius" | "shadow" | "sizing" | "border" | "animation" | "z-index" | "other";
557
- /**
558
- * A single design token (CSS custom property)
559
- */
560
- interface DesignToken {
561
- /** Token name with leading dashes (e.g., "--color-primary") */
562
- name: string;
563
- /** Raw value as written in CSS (e.g., "var(--color-cobalt-50)") */
564
- rawValue: string;
565
- /** Fully resolved value (e.g., "#0051c2") */
566
- resolvedValue: string;
567
- /** Inferred category based on naming convention */
568
- category: TokenCategory;
569
- /**
570
- * Token level in the design system hierarchy:
571
- * - 1 = Base/primitive tokens (raw values like colors, sizes)
572
- * - 2 = Semantic tokens (references to base tokens with meaning)
573
- * - 3 = Component tokens (component-specific tokens)
574
- */
575
- level: 1 | 2 | 3;
576
- /**
577
- * Reference chain showing how the value was resolved
578
- * e.g., ["--color-primary", "--color-cobalt-50"] means
579
- * --color-primary references --color-cobalt-50
580
- */
581
- referenceChain: string[];
582
- /** Source file where this token was defined */
583
- sourceFile: string;
584
- /** Line number in source file */
585
- lineNumber?: number;
586
- /** Theme this token belongs to (e.g., "default", "dark", "light") */
587
- theme: string;
588
- /** CSS selector where this token is defined (e.g., ":root", "[data-theme='dark']") */
589
- selector: string;
590
- /** Optional description from comments */
591
- description?: string;
592
- }
593
- /**
594
- * Token registry for fast lookups
595
- */
596
- interface TokenRegistry {
597
- /** Lookup by token name (e.g., "--color-primary") */
598
- byName: Map<string, DesignToken>;
599
- /**
600
- * REVERSE lookup: resolved value -> token names
601
- * Key is normalized value (e.g., "#0051c2" lowercase)
602
- * Value is array of token names that resolve to this value
603
- */
604
- byValue: Map<string, string[]>;
605
- /** Tokens grouped by theme */
606
- byTheme: Map<string, DesignToken[]>;
607
- /** Tokens grouped by category */
608
- byCategory: Map<TokenCategory, DesignToken[]>;
609
- /** Registry metadata */
610
- meta: TokenRegistryMeta;
611
- }
612
- /**
613
- * Token registry metadata
614
- */
615
- interface TokenRegistryMeta {
616
- /** When tokens were discovered */
617
- discoveredAt: Date;
618
- /** Source files that were parsed */
619
- sourceFiles: string[];
620
- /** Total number of tokens discovered */
621
- totalTokens: number;
622
- /** Time taken to parse (ms) */
623
- parseTimeMs: number;
624
- /** Number of circular references detected */
625
- circularRefs: number;
626
- /** Number of unresolved references */
627
- unresolvedRefs: number;
628
- }
629
- /**
630
- * Enhanced style diff item with token information
631
- */
632
- interface EnhancedStyleDiffItem {
633
- /** CSS property name (e.g., "backgroundColor") */
634
- property: string;
635
- /** Value from Figma design */
636
- figma: string;
637
- /** Value from rendered component */
638
- rendered: string;
639
- /** Whether values match (within tolerance) */
640
- match: boolean;
641
- /** Token name if Figma value matches a known token */
642
- figmaToken?: string;
643
- /** Token name if rendered value uses a token */
644
- renderedToken?: string;
645
- /**
646
- * True if rendered value doesn't use a token but should
647
- * (i.e., Figma uses a token but code uses hardcoded value)
648
- */
649
- isHardcoded: boolean;
650
- /** Suggested fix if hardcoded */
651
- suggestedFix?: TokenFix;
652
- }
653
- /**
654
- * Token-based fix suggestion
655
- */
656
- interface TokenFix {
657
- /** Token name to use (e.g., "--color-primary") */
658
- tokenName: string;
659
- /** Token's resolved value */
660
- tokenValue: string;
661
- /** Code snippet to fix the issue */
662
- codeFix: string;
663
- /** Confidence score 0-1 */
664
- confidence: number;
665
- /** Human-readable explanation */
666
- reason: string;
667
- }
668
- /**
669
- * Result of parsing a CSS/SCSS file for tokens
670
- */
671
- interface TokenParseResult {
672
- /** Tokens discovered in the file */
673
- tokens: DesignToken[];
674
- /** Errors encountered during parsing */
675
- errors: TokenParseError[];
676
- /** Warnings (non-fatal issues) */
677
- warnings: string[];
678
- /** Parse time in ms */
679
- parseTimeMs: number;
680
- }
681
- /**
682
- * Error during token parsing
683
- */
684
- interface TokenParseError {
685
- /** Error message */
686
- message: string;
687
- /** File where error occurred */
688
- file: string;
689
- /** Line number if known */
690
- line?: number;
691
- /** The problematic content if available */
692
- content?: string;
693
- }
694
- /**
695
- * Request to match a value to tokens
696
- */
697
- interface TokenMatchRequest {
698
- /** The value to find tokens for (e.g., "#0051c2") */
699
- value: string;
700
- /** Property type hint for better matching (e.g., "color") */
701
- propertyType?: "color" | "spacing" | "typography" | "other";
702
- /** Specific theme to search in */
703
- theme?: string;
704
- }
705
- /**
706
- * Result of token matching
707
- */
708
- interface TokenMatchResult {
709
- /** Exact matches (same resolved value) */
710
- exactMatches: DesignToken[];
711
- /** Close matches (similar value, useful for colors) */
712
- closeMatches: Array<{
713
- token: DesignToken;
714
- /** How close the match is (0-1, 1 = exact) */
715
- similarity: number;
716
- }>;
717
- /** Whether any match was found */
718
- found: boolean;
719
- }
720
- /**
721
- * Summary of token usage in a component
722
- */
723
- interface TokenUsageSummary {
724
- /** Total CSS properties checked */
725
- totalProperties: number;
726
- /** Properties using design tokens */
727
- usingTokens: number;
728
- /** Properties with hardcoded values */
729
- hardcoded: number;
730
- /** Properties matching but not using tokens explicitly */
731
- implicitMatches: number;
732
- /** Compliance percentage (usingTokens / totalProperties * 100) */
733
- compliancePercent: number;
734
- /** List of hardcoded properties with fix suggestions */
735
- hardcodedProperties: EnhancedStyleDiffItem[];
736
- }
737
-
738
- declare const figmaPropMappingSchema: z.ZodDiscriminatedUnion<"__type", [z.ZodObject<{
739
- __type: z.ZodLiteral<"figma-string">;
740
- figmaProperty: z.ZodString;
741
- }, "strip", z.ZodTypeAny, {
742
- __type: "figma-string";
743
- figmaProperty: string;
744
- }, {
745
- __type: "figma-string";
746
- figmaProperty: string;
747
- }>, z.ZodObject<{
748
- __type: z.ZodLiteral<"figma-boolean">;
749
- figmaProperty: z.ZodString;
750
- valueMapping: z.ZodOptional<z.ZodObject<{
751
- true: z.ZodUnknown;
752
- false: z.ZodUnknown;
753
- }, "strip", z.ZodTypeAny, {
754
- true?: unknown;
755
- false?: unknown;
756
- }, {
757
- true?: unknown;
758
- false?: unknown;
759
- }>>;
760
- }, "strip", z.ZodTypeAny, {
761
- __type: "figma-boolean";
762
- figmaProperty: string;
763
- valueMapping?: {
764
- true?: unknown;
765
- false?: unknown;
766
- } | undefined;
767
- }, {
768
- __type: "figma-boolean";
769
- figmaProperty: string;
770
- valueMapping?: {
771
- true?: unknown;
772
- false?: unknown;
773
- } | undefined;
774
- }>, z.ZodObject<{
775
- __type: z.ZodLiteral<"figma-enum">;
776
- figmaProperty: z.ZodString;
777
- valueMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
778
- }, "strip", z.ZodTypeAny, {
779
- __type: "figma-enum";
780
- figmaProperty: string;
781
- valueMapping: Record<string, unknown>;
782
- }, {
783
- __type: "figma-enum";
784
- figmaProperty: string;
785
- valueMapping: Record<string, unknown>;
786
- }>, z.ZodObject<{
787
- __type: z.ZodLiteral<"figma-instance">;
788
- figmaProperty: z.ZodString;
789
- }, "strip", z.ZodTypeAny, {
790
- __type: "figma-instance";
791
- figmaProperty: string;
792
- }, {
793
- __type: "figma-instance";
794
- figmaProperty: string;
795
- }>, z.ZodObject<{
796
- __type: z.ZodLiteral<"figma-children">;
797
- layers: z.ZodArray<z.ZodString, "many">;
798
- }, "strip", z.ZodTypeAny, {
799
- __type: "figma-children";
800
- layers: string[];
801
- }, {
802
- __type: "figma-children";
803
- layers: string[];
804
- }>, z.ZodObject<{
805
- __type: z.ZodLiteral<"figma-text-content">;
806
- layer: z.ZodString;
807
- }, "strip", z.ZodTypeAny, {
808
- __type: "figma-text-content";
809
- layer: string;
810
- }, {
811
- __type: "figma-text-content";
812
- layer: string;
813
- }>]>;
814
- declare const fragmentMetaSchema: z.ZodObject<{
815
- name: z.ZodString;
816
- description: z.ZodString;
817
- category: z.ZodString;
818
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
819
- status: z.ZodOptional<z.ZodEnum<["stable", "beta", "deprecated", "experimental"]>>;
820
- since: z.ZodOptional<z.ZodString>;
821
- dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
822
- name: z.ZodString;
823
- version: z.ZodString;
824
- reason: z.ZodOptional<z.ZodString>;
825
- }, "strip", z.ZodTypeAny, {
826
- name: string;
827
- version: string;
828
- reason?: string | undefined;
829
- }, {
830
- name: string;
831
- version: string;
832
- reason?: string | undefined;
833
- }>, "many">>;
834
- figma: z.ZodOptional<z.ZodString>;
835
- figmaProps: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"__type", [z.ZodObject<{
836
- __type: z.ZodLiteral<"figma-string">;
837
- figmaProperty: z.ZodString;
838
- }, "strip", z.ZodTypeAny, {
839
- __type: "figma-string";
840
- figmaProperty: string;
841
- }, {
842
- __type: "figma-string";
843
- figmaProperty: string;
844
- }>, z.ZodObject<{
845
- __type: z.ZodLiteral<"figma-boolean">;
846
- figmaProperty: z.ZodString;
847
- valueMapping: z.ZodOptional<z.ZodObject<{
848
- true: z.ZodUnknown;
849
- false: z.ZodUnknown;
850
- }, "strip", z.ZodTypeAny, {
851
- true?: unknown;
852
- false?: unknown;
853
- }, {
854
- true?: unknown;
855
- false?: unknown;
856
- }>>;
857
- }, "strip", z.ZodTypeAny, {
858
- __type: "figma-boolean";
859
- figmaProperty: string;
860
- valueMapping?: {
861
- true?: unknown;
862
- false?: unknown;
863
- } | undefined;
864
- }, {
865
- __type: "figma-boolean";
866
- figmaProperty: string;
867
- valueMapping?: {
868
- true?: unknown;
869
- false?: unknown;
870
- } | undefined;
871
- }>, z.ZodObject<{
872
- __type: z.ZodLiteral<"figma-enum">;
873
- figmaProperty: z.ZodString;
874
- valueMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
875
- }, "strip", z.ZodTypeAny, {
876
- __type: "figma-enum";
877
- figmaProperty: string;
878
- valueMapping: Record<string, unknown>;
879
- }, {
880
- __type: "figma-enum";
881
- figmaProperty: string;
882
- valueMapping: Record<string, unknown>;
883
- }>, z.ZodObject<{
884
- __type: z.ZodLiteral<"figma-instance">;
885
- figmaProperty: z.ZodString;
886
- }, "strip", z.ZodTypeAny, {
887
- __type: "figma-instance";
888
- figmaProperty: string;
889
- }, {
890
- __type: "figma-instance";
891
- figmaProperty: string;
892
- }>, z.ZodObject<{
893
- __type: z.ZodLiteral<"figma-children">;
894
- layers: z.ZodArray<z.ZodString, "many">;
895
- }, "strip", z.ZodTypeAny, {
896
- __type: "figma-children";
897
- layers: string[];
898
- }, {
899
- __type: "figma-children";
900
- layers: string[];
901
- }>, z.ZodObject<{
902
- __type: z.ZodLiteral<"figma-text-content">;
903
- layer: z.ZodString;
904
- }, "strip", z.ZodTypeAny, {
905
- __type: "figma-text-content";
906
- layer: string;
907
- }, {
908
- __type: "figma-text-content";
909
- layer: string;
910
- }>]>>>;
911
- }, "strip", z.ZodTypeAny, {
912
- name: string;
913
- category: string;
914
- description: string;
915
- figma?: string | undefined;
916
- tags?: string[] | undefined;
917
- status?: "stable" | "beta" | "deprecated" | "experimental" | undefined;
918
- since?: string | undefined;
919
- dependencies?: {
920
- name: string;
921
- version: string;
922
- reason?: string | undefined;
923
- }[] | undefined;
924
- figmaProps?: Record<string, {
925
- __type: "figma-string";
926
- figmaProperty: string;
927
- } | {
928
- __type: "figma-boolean";
929
- figmaProperty: string;
930
- valueMapping?: {
931
- true?: unknown;
932
- false?: unknown;
933
- } | undefined;
934
- } | {
935
- __type: "figma-enum";
936
- figmaProperty: string;
937
- valueMapping: Record<string, unknown>;
938
- } | {
939
- __type: "figma-instance";
940
- figmaProperty: string;
941
- } | {
942
- __type: "figma-children";
943
- layers: string[];
944
- } | {
945
- __type: "figma-text-content";
946
- layer: string;
947
- }> | undefined;
948
- }, {
949
- name: string;
950
- category: string;
951
- description: string;
952
- figma?: string | undefined;
953
- tags?: string[] | undefined;
954
- status?: "stable" | "beta" | "deprecated" | "experimental" | undefined;
955
- since?: string | undefined;
956
- dependencies?: {
957
- name: string;
958
- version: string;
959
- reason?: string | undefined;
960
- }[] | undefined;
961
- figmaProps?: Record<string, {
962
- __type: "figma-string";
963
- figmaProperty: string;
964
- } | {
965
- __type: "figma-boolean";
966
- figmaProperty: string;
967
- valueMapping?: {
968
- true?: unknown;
969
- false?: unknown;
970
- } | undefined;
971
- } | {
972
- __type: "figma-enum";
973
- figmaProperty: string;
974
- valueMapping: Record<string, unknown>;
975
- } | {
976
- __type: "figma-instance";
977
- figmaProperty: string;
978
- } | {
979
- __type: "figma-children";
980
- layers: string[];
981
- } | {
982
- __type: "figma-text-content";
983
- layer: string;
984
- }> | undefined;
985
- }>;
986
- declare const fragmentUsageSchema: z.ZodObject<{
987
- when: z.ZodArray<z.ZodString, "many">;
988
- whenNot: z.ZodArray<z.ZodString, "many">;
989
- guidelines: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
990
- accessibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
991
- }, "strip", z.ZodTypeAny, {
992
- when: string[];
993
- whenNot: string[];
994
- guidelines?: string[] | undefined;
995
- accessibility?: string[] | undefined;
996
- }, {
997
- when: string[];
998
- whenNot: string[];
999
- guidelines?: string[] | undefined;
1000
- accessibility?: string[] | undefined;
1001
- }>;
1002
- declare const propDefinitionSchema: z.ZodObject<{
1003
- type: z.ZodType<string, z.ZodTypeDef, string>;
1004
- values: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString, "many">>>;
1005
- default: z.ZodOptional<z.ZodUnknown>;
1006
- description: z.ZodOptional<z.ZodString>;
1007
- required: z.ZodOptional<z.ZodBoolean>;
1008
- constraints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1009
- typeDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1010
- }, "strip", z.ZodTypeAny, {
1011
- type: string;
1012
- default?: unknown;
1013
- values?: readonly string[] | undefined;
1014
- description?: string | undefined;
1015
- required?: boolean | undefined;
1016
- constraints?: string[] | undefined;
1017
- typeDetails?: Record<string, unknown> | undefined;
1018
- }, {
1019
- type: string;
1020
- default?: unknown;
1021
- values?: readonly string[] | undefined;
1022
- description?: string | undefined;
1023
- required?: boolean | undefined;
1024
- constraints?: string[] | undefined;
1025
- typeDetails?: Record<string, unknown> | undefined;
1026
- }>;
1027
- declare const componentRelationSchema: z.ZodObject<{
1028
- component: z.ZodString;
1029
- relationship: z.ZodEnum<["alternative", "sibling", "parent", "child", "composition", "complementary", "used-by"]>;
1030
- note: z.ZodString;
1031
- }, "strip", z.ZodTypeAny, {
1032
- component: string;
1033
- relationship: "alternative" | "sibling" | "parent" | "child" | "composition" | "complementary" | "used-by";
1034
- note: string;
1035
- }, {
1036
- component: string;
1037
- relationship: "alternative" | "sibling" | "parent" | "child" | "composition" | "complementary" | "used-by";
1038
- note: string;
1039
- }>;
1040
- declare const fragmentVariantSchema: z.ZodObject<{
1041
- name: z.ZodString;
1042
- description: z.ZodString;
1043
- render: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>;
1044
- code: z.ZodOptional<z.ZodString>;
1045
- figma: z.ZodOptional<z.ZodString>;
1046
- }, "strip", z.ZodTypeAny, {
1047
- name: string;
1048
- description: string;
1049
- render: (...args: unknown[]) => unknown;
1050
- figma?: string | undefined;
1051
- code?: string | undefined;
1052
- }, {
1053
- name: string;
1054
- description: string;
1055
- render: (...args: unknown[]) => unknown;
1056
- figma?: string | undefined;
1057
- code?: string | undefined;
1058
- }>;
1059
- /**
1060
- * Schema for banned patterns in codebase
1061
- */
1062
- declare const fragmentBanSchema: z.ZodObject<{
1063
- pattern: z.ZodString;
1064
- message: z.ZodString;
1065
- }, "strip", z.ZodTypeAny, {
1066
- pattern: string;
1067
- message: string;
1068
- }, {
1069
- pattern: string;
1070
- message: string;
1071
- }>;
1072
- /**
1073
- * Schema for agent-optimized contract metadata
1074
- */
1075
- declare const fragmentContractSchema: z.ZodObject<{
1076
- propsSummary: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1077
- a11yRules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1078
- bans: z.ZodOptional<z.ZodArray<z.ZodObject<{
1079
- pattern: z.ZodString;
1080
- message: z.ZodString;
1081
- }, "strip", z.ZodTypeAny, {
1082
- pattern: string;
1083
- message: string;
1084
- }, {
1085
- pattern: string;
1086
- message: string;
1087
- }>, "many">>;
1088
- scenarioTags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1089
- performanceBudget: z.ZodOptional<z.ZodNumber>;
1090
- }, "strip", z.ZodTypeAny, {
1091
- propsSummary?: string[] | undefined;
1092
- a11yRules?: string[] | undefined;
1093
- bans?: {
1094
- pattern: string;
1095
- message: string;
1096
- }[] | undefined;
1097
- scenarioTags?: string[] | undefined;
1098
- performanceBudget?: number | undefined;
1099
- }, {
1100
- propsSummary?: string[] | undefined;
1101
- a11yRules?: string[] | undefined;
1102
- bans?: {
1103
- pattern: string;
1104
- message: string;
1105
- }[] | undefined;
1106
- scenarioTags?: string[] | undefined;
1107
- performanceBudget?: number | undefined;
1108
- }>;
1109
- /**
1110
- * Schema for provenance tracking of generated fragments
1111
- */
1112
- declare const fragmentGeneratedSchema: z.ZodObject<{
1113
- source: z.ZodEnum<["storybook", "manual", "ai"]>;
1114
- sourceFile: z.ZodOptional<z.ZodString>;
1115
- confidence: z.ZodOptional<z.ZodNumber>;
1116
- timestamp: z.ZodOptional<z.ZodString>;
1117
- }, "strip", z.ZodTypeAny, {
1118
- source: "ai" | "storybook" | "manual";
1119
- sourceFile?: string | undefined;
1120
- confidence?: number | undefined;
1121
- timestamp?: string | undefined;
1122
- }, {
1123
- source: "ai" | "storybook" | "manual";
1124
- sourceFile?: string | undefined;
1125
- confidence?: number | undefined;
1126
- timestamp?: string | undefined;
1127
- }>;
1128
- /**
1129
- * Schema for AI-specific metadata for playground context generation
1130
- */
1131
- declare const aiMetadataSchema: z.ZodObject<{
1132
- compositionPattern: z.ZodOptional<z.ZodEnum<["compound", "simple", "controlled", "wrapper"]>>;
1133
- subComponents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1134
- requiredChildren: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1135
- commonPatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1136
- }, "strip", z.ZodTypeAny, {
1137
- compositionPattern?: "compound" | "simple" | "controlled" | "wrapper" | undefined;
1138
- subComponents?: string[] | undefined;
1139
- requiredChildren?: string[] | undefined;
1140
- commonPatterns?: string[] | undefined;
1141
- }, {
1142
- compositionPattern?: "compound" | "simple" | "controlled" | "wrapper" | undefined;
1143
- subComponents?: string[] | undefined;
1144
- requiredChildren?: string[] | undefined;
1145
- commonPatterns?: string[] | undefined;
1146
- }>;
1147
- /**
1148
- * Schema for block definitions
1149
- */
1150
- declare const blockDefinitionSchema: z.ZodObject<{
1151
- name: z.ZodString;
1152
- description: z.ZodString;
1153
- category: z.ZodString;
1154
- components: z.ZodArray<z.ZodString, "many">;
1155
- code: z.ZodString;
1156
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1157
- }, "strip", z.ZodTypeAny, {
1158
- components: string[];
1159
- name: string;
1160
- category: string;
1161
- code: string;
1162
- description: string;
1163
- tags?: string[] | undefined;
1164
- }, {
1165
- components: string[];
1166
- name: string;
1167
- category: string;
1168
- code: string;
1169
- description: string;
1170
- tags?: string[] | undefined;
1171
- }>;
1172
- declare const fragmentDefinitionSchema: z.ZodObject<{
1173
- component: z.ZodAny;
1174
- meta: z.ZodObject<{
1175
- name: z.ZodString;
1176
- description: z.ZodString;
1177
- category: z.ZodString;
1178
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1179
- status: z.ZodOptional<z.ZodEnum<["stable", "beta", "deprecated", "experimental"]>>;
1180
- since: z.ZodOptional<z.ZodString>;
1181
- dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
1182
- name: z.ZodString;
1183
- version: z.ZodString;
1184
- reason: z.ZodOptional<z.ZodString>;
1185
- }, "strip", z.ZodTypeAny, {
1186
- name: string;
1187
- version: string;
1188
- reason?: string | undefined;
1189
- }, {
1190
- name: string;
1191
- version: string;
1192
- reason?: string | undefined;
1193
- }>, "many">>;
1194
- figma: z.ZodOptional<z.ZodString>;
1195
- figmaProps: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"__type", [z.ZodObject<{
1196
- __type: z.ZodLiteral<"figma-string">;
1197
- figmaProperty: z.ZodString;
1198
- }, "strip", z.ZodTypeAny, {
1199
- __type: "figma-string";
1200
- figmaProperty: string;
1201
- }, {
1202
- __type: "figma-string";
1203
- figmaProperty: string;
1204
- }>, z.ZodObject<{
1205
- __type: z.ZodLiteral<"figma-boolean">;
1206
- figmaProperty: z.ZodString;
1207
- valueMapping: z.ZodOptional<z.ZodObject<{
1208
- true: z.ZodUnknown;
1209
- false: z.ZodUnknown;
1210
- }, "strip", z.ZodTypeAny, {
1211
- true?: unknown;
1212
- false?: unknown;
1213
- }, {
1214
- true?: unknown;
1215
- false?: unknown;
1216
- }>>;
1217
- }, "strip", z.ZodTypeAny, {
1218
- __type: "figma-boolean";
1219
- figmaProperty: string;
1220
- valueMapping?: {
1221
- true?: unknown;
1222
- false?: unknown;
1223
- } | undefined;
1224
- }, {
1225
- __type: "figma-boolean";
1226
- figmaProperty: string;
1227
- valueMapping?: {
1228
- true?: unknown;
1229
- false?: unknown;
1230
- } | undefined;
1231
- }>, z.ZodObject<{
1232
- __type: z.ZodLiteral<"figma-enum">;
1233
- figmaProperty: z.ZodString;
1234
- valueMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1235
- }, "strip", z.ZodTypeAny, {
1236
- __type: "figma-enum";
1237
- figmaProperty: string;
1238
- valueMapping: Record<string, unknown>;
1239
- }, {
1240
- __type: "figma-enum";
1241
- figmaProperty: string;
1242
- valueMapping: Record<string, unknown>;
1243
- }>, z.ZodObject<{
1244
- __type: z.ZodLiteral<"figma-instance">;
1245
- figmaProperty: z.ZodString;
1246
- }, "strip", z.ZodTypeAny, {
1247
- __type: "figma-instance";
1248
- figmaProperty: string;
1249
- }, {
1250
- __type: "figma-instance";
1251
- figmaProperty: string;
1252
- }>, z.ZodObject<{
1253
- __type: z.ZodLiteral<"figma-children">;
1254
- layers: z.ZodArray<z.ZodString, "many">;
1255
- }, "strip", z.ZodTypeAny, {
1256
- __type: "figma-children";
1257
- layers: string[];
1258
- }, {
1259
- __type: "figma-children";
1260
- layers: string[];
1261
- }>, z.ZodObject<{
1262
- __type: z.ZodLiteral<"figma-text-content">;
1263
- layer: z.ZodString;
1264
- }, "strip", z.ZodTypeAny, {
1265
- __type: "figma-text-content";
1266
- layer: string;
1267
- }, {
1268
- __type: "figma-text-content";
1269
- layer: string;
1270
- }>]>>>;
1271
- }, "strip", z.ZodTypeAny, {
1272
- name: string;
1273
- category: string;
1274
- description: string;
1275
- figma?: string | undefined;
1276
- tags?: string[] | undefined;
1277
- status?: "stable" | "beta" | "deprecated" | "experimental" | undefined;
1278
- since?: string | undefined;
1279
- dependencies?: {
1280
- name: string;
1281
- version: string;
1282
- reason?: string | undefined;
1283
- }[] | undefined;
1284
- figmaProps?: Record<string, {
1285
- __type: "figma-string";
1286
- figmaProperty: string;
1287
- } | {
1288
- __type: "figma-boolean";
1289
- figmaProperty: string;
1290
- valueMapping?: {
1291
- true?: unknown;
1292
- false?: unknown;
1293
- } | undefined;
1294
- } | {
1295
- __type: "figma-enum";
1296
- figmaProperty: string;
1297
- valueMapping: Record<string, unknown>;
1298
- } | {
1299
- __type: "figma-instance";
1300
- figmaProperty: string;
1301
- } | {
1302
- __type: "figma-children";
1303
- layers: string[];
1304
- } | {
1305
- __type: "figma-text-content";
1306
- layer: string;
1307
- }> | undefined;
1308
- }, {
1309
- name: string;
1310
- category: string;
1311
- description: string;
1312
- figma?: string | undefined;
1313
- tags?: string[] | undefined;
1314
- status?: "stable" | "beta" | "deprecated" | "experimental" | undefined;
1315
- since?: string | undefined;
1316
- dependencies?: {
1317
- name: string;
1318
- version: string;
1319
- reason?: string | undefined;
1320
- }[] | undefined;
1321
- figmaProps?: Record<string, {
1322
- __type: "figma-string";
1323
- figmaProperty: string;
1324
- } | {
1325
- __type: "figma-boolean";
1326
- figmaProperty: string;
1327
- valueMapping?: {
1328
- true?: unknown;
1329
- false?: unknown;
1330
- } | undefined;
1331
- } | {
1332
- __type: "figma-enum";
1333
- figmaProperty: string;
1334
- valueMapping: Record<string, unknown>;
1335
- } | {
1336
- __type: "figma-instance";
1337
- figmaProperty: string;
1338
- } | {
1339
- __type: "figma-children";
1340
- layers: string[];
1341
- } | {
1342
- __type: "figma-text-content";
1343
- layer: string;
1344
- }> | undefined;
1345
- }>;
1346
- usage: z.ZodObject<{
1347
- when: z.ZodArray<z.ZodString, "many">;
1348
- whenNot: z.ZodArray<z.ZodString, "many">;
1349
- guidelines: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1350
- accessibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1351
- }, "strip", z.ZodTypeAny, {
1352
- when: string[];
1353
- whenNot: string[];
1354
- guidelines?: string[] | undefined;
1355
- accessibility?: string[] | undefined;
1356
- }, {
1357
- when: string[];
1358
- whenNot: string[];
1359
- guidelines?: string[] | undefined;
1360
- accessibility?: string[] | undefined;
1361
- }>;
1362
- props: z.ZodRecord<z.ZodString, z.ZodObject<{
1363
- type: z.ZodType<string, z.ZodTypeDef, string>;
1364
- values: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString, "many">>>;
1365
- default: z.ZodOptional<z.ZodUnknown>;
1366
- description: z.ZodOptional<z.ZodString>;
1367
- required: z.ZodOptional<z.ZodBoolean>;
1368
- constraints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1369
- typeDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1370
- }, "strip", z.ZodTypeAny, {
1371
- type: string;
1372
- default?: unknown;
1373
- values?: readonly string[] | undefined;
1374
- description?: string | undefined;
1375
- required?: boolean | undefined;
1376
- constraints?: string[] | undefined;
1377
- typeDetails?: Record<string, unknown> | undefined;
1378
- }, {
1379
- type: string;
1380
- default?: unknown;
1381
- values?: readonly string[] | undefined;
1382
- description?: string | undefined;
1383
- required?: boolean | undefined;
1384
- constraints?: string[] | undefined;
1385
- typeDetails?: Record<string, unknown> | undefined;
1386
- }>>;
1387
- relations: z.ZodOptional<z.ZodArray<z.ZodObject<{
1388
- component: z.ZodString;
1389
- relationship: z.ZodEnum<["alternative", "sibling", "parent", "child", "composition", "complementary", "used-by"]>;
1390
- note: z.ZodString;
1391
- }, "strip", z.ZodTypeAny, {
1392
- component: string;
1393
- relationship: "alternative" | "sibling" | "parent" | "child" | "composition" | "complementary" | "used-by";
1394
- note: string;
1395
- }, {
1396
- component: string;
1397
- relationship: "alternative" | "sibling" | "parent" | "child" | "composition" | "complementary" | "used-by";
1398
- note: string;
1399
- }>, "many">>;
1400
- variants: z.ZodArray<z.ZodObject<{
1401
- name: z.ZodString;
1402
- description: z.ZodString;
1403
- render: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>;
1404
- code: z.ZodOptional<z.ZodString>;
1405
- figma: z.ZodOptional<z.ZodString>;
1406
- }, "strip", z.ZodTypeAny, {
1407
- name: string;
1408
- description: string;
1409
- render: (...args: unknown[]) => unknown;
1410
- figma?: string | undefined;
1411
- code?: string | undefined;
1412
- }, {
1413
- name: string;
1414
- description: string;
1415
- render: (...args: unknown[]) => unknown;
1416
- figma?: string | undefined;
1417
- code?: string | undefined;
1418
- }>, "many">;
1419
- contract: z.ZodOptional<z.ZodObject<{
1420
- propsSummary: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1421
- a11yRules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1422
- bans: z.ZodOptional<z.ZodArray<z.ZodObject<{
1423
- pattern: z.ZodString;
1424
- message: z.ZodString;
1425
- }, "strip", z.ZodTypeAny, {
1426
- pattern: string;
1427
- message: string;
1428
- }, {
1429
- pattern: string;
1430
- message: string;
1431
- }>, "many">>;
1432
- scenarioTags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1433
- performanceBudget: z.ZodOptional<z.ZodNumber>;
1434
- }, "strip", z.ZodTypeAny, {
1435
- propsSummary?: string[] | undefined;
1436
- a11yRules?: string[] | undefined;
1437
- bans?: {
1438
- pattern: string;
1439
- message: string;
1440
- }[] | undefined;
1441
- scenarioTags?: string[] | undefined;
1442
- performanceBudget?: number | undefined;
1443
- }, {
1444
- propsSummary?: string[] | undefined;
1445
- a11yRules?: string[] | undefined;
1446
- bans?: {
1447
- pattern: string;
1448
- message: string;
1449
- }[] | undefined;
1450
- scenarioTags?: string[] | undefined;
1451
- performanceBudget?: number | undefined;
1452
- }>>;
1453
- ai: z.ZodOptional<z.ZodObject<{
1454
- compositionPattern: z.ZodOptional<z.ZodEnum<["compound", "simple", "controlled", "wrapper"]>>;
1455
- subComponents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1456
- requiredChildren: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1457
- commonPatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1458
- }, "strip", z.ZodTypeAny, {
1459
- compositionPattern?: "compound" | "simple" | "controlled" | "wrapper" | undefined;
1460
- subComponents?: string[] | undefined;
1461
- requiredChildren?: string[] | undefined;
1462
- commonPatterns?: string[] | undefined;
1463
- }, {
1464
- compositionPattern?: "compound" | "simple" | "controlled" | "wrapper" | undefined;
1465
- subComponents?: string[] | undefined;
1466
- requiredChildren?: string[] | undefined;
1467
- commonPatterns?: string[] | undefined;
1468
- }>>;
1469
- _generated: z.ZodOptional<z.ZodObject<{
1470
- source: z.ZodEnum<["storybook", "manual", "ai"]>;
1471
- sourceFile: z.ZodOptional<z.ZodString>;
1472
- confidence: z.ZodOptional<z.ZodNumber>;
1473
- timestamp: z.ZodOptional<z.ZodString>;
1474
- }, "strip", z.ZodTypeAny, {
1475
- source: "ai" | "storybook" | "manual";
1476
- sourceFile?: string | undefined;
1477
- confidence?: number | undefined;
1478
- timestamp?: string | undefined;
1479
- }, {
1480
- source: "ai" | "storybook" | "manual";
1481
- sourceFile?: string | undefined;
1482
- confidence?: number | undefined;
1483
- timestamp?: string | undefined;
1484
- }>>;
1485
- }, "strip", z.ZodTypeAny, {
1486
- variants: {
1487
- name: string;
1488
- description: string;
1489
- render: (...args: unknown[]) => unknown;
1490
- figma?: string | undefined;
1491
- code?: string | undefined;
1492
- }[];
1493
- meta: {
1494
- name: string;
1495
- category: string;
1496
- description: string;
1497
- figma?: string | undefined;
1498
- tags?: string[] | undefined;
1499
- status?: "stable" | "beta" | "deprecated" | "experimental" | undefined;
1500
- since?: string | undefined;
1501
- dependencies?: {
1502
- name: string;
1503
- version: string;
1504
- reason?: string | undefined;
1505
- }[] | undefined;
1506
- figmaProps?: Record<string, {
1507
- __type: "figma-string";
1508
- figmaProperty: string;
1509
- } | {
1510
- __type: "figma-boolean";
1511
- figmaProperty: string;
1512
- valueMapping?: {
1513
- true?: unknown;
1514
- false?: unknown;
1515
- } | undefined;
1516
- } | {
1517
- __type: "figma-enum";
1518
- figmaProperty: string;
1519
- valueMapping: Record<string, unknown>;
1520
- } | {
1521
- __type: "figma-instance";
1522
- figmaProperty: string;
1523
- } | {
1524
- __type: "figma-children";
1525
- layers: string[];
1526
- } | {
1527
- __type: "figma-text-content";
1528
- layer: string;
1529
- }> | undefined;
1530
- };
1531
- usage: {
1532
- when: string[];
1533
- whenNot: string[];
1534
- guidelines?: string[] | undefined;
1535
- accessibility?: string[] | undefined;
1536
- };
1537
- props: Record<string, {
1538
- type: string;
1539
- default?: unknown;
1540
- values?: readonly string[] | undefined;
1541
- description?: string | undefined;
1542
- required?: boolean | undefined;
1543
- constraints?: string[] | undefined;
1544
- typeDetails?: Record<string, unknown> | undefined;
1545
- }>;
1546
- ai?: {
1547
- compositionPattern?: "compound" | "simple" | "controlled" | "wrapper" | undefined;
1548
- subComponents?: string[] | undefined;
1549
- requiredChildren?: string[] | undefined;
1550
- commonPatterns?: string[] | undefined;
1551
- } | undefined;
1552
- component?: any;
1553
- relations?: {
1554
- component: string;
1555
- relationship: "alternative" | "sibling" | "parent" | "child" | "composition" | "complementary" | "used-by";
1556
- note: string;
1557
- }[] | undefined;
1558
- contract?: {
1559
- propsSummary?: string[] | undefined;
1560
- a11yRules?: string[] | undefined;
1561
- bans?: {
1562
- pattern: string;
1563
- message: string;
1564
- }[] | undefined;
1565
- scenarioTags?: string[] | undefined;
1566
- performanceBudget?: number | undefined;
1567
- } | undefined;
1568
- _generated?: {
1569
- source: "ai" | "storybook" | "manual";
1570
- sourceFile?: string | undefined;
1571
- confidence?: number | undefined;
1572
- timestamp?: string | undefined;
1573
- } | undefined;
1574
- }, {
1575
- variants: {
1576
- name: string;
1577
- description: string;
1578
- render: (...args: unknown[]) => unknown;
1579
- figma?: string | undefined;
1580
- code?: string | undefined;
1581
- }[];
1582
- meta: {
1583
- name: string;
1584
- category: string;
1585
- description: string;
1586
- figma?: string | undefined;
1587
- tags?: string[] | undefined;
1588
- status?: "stable" | "beta" | "deprecated" | "experimental" | undefined;
1589
- since?: string | undefined;
1590
- dependencies?: {
1591
- name: string;
1592
- version: string;
1593
- reason?: string | undefined;
1594
- }[] | undefined;
1595
- figmaProps?: Record<string, {
1596
- __type: "figma-string";
1597
- figmaProperty: string;
1598
- } | {
1599
- __type: "figma-boolean";
1600
- figmaProperty: string;
1601
- valueMapping?: {
1602
- true?: unknown;
1603
- false?: unknown;
1604
- } | undefined;
1605
- } | {
1606
- __type: "figma-enum";
1607
- figmaProperty: string;
1608
- valueMapping: Record<string, unknown>;
1609
- } | {
1610
- __type: "figma-instance";
1611
- figmaProperty: string;
1612
- } | {
1613
- __type: "figma-children";
1614
- layers: string[];
1615
- } | {
1616
- __type: "figma-text-content";
1617
- layer: string;
1618
- }> | undefined;
1619
- };
1620
- usage: {
1621
- when: string[];
1622
- whenNot: string[];
1623
- guidelines?: string[] | undefined;
1624
- accessibility?: string[] | undefined;
1625
- };
1626
- props: Record<string, {
1627
- type: string;
1628
- default?: unknown;
1629
- values?: readonly string[] | undefined;
1630
- description?: string | undefined;
1631
- required?: boolean | undefined;
1632
- constraints?: string[] | undefined;
1633
- typeDetails?: Record<string, unknown> | undefined;
1634
- }>;
1635
- ai?: {
1636
- compositionPattern?: "compound" | "simple" | "controlled" | "wrapper" | undefined;
1637
- subComponents?: string[] | undefined;
1638
- requiredChildren?: string[] | undefined;
1639
- commonPatterns?: string[] | undefined;
1640
- } | undefined;
1641
- component?: any;
1642
- relations?: {
1643
- component: string;
1644
- relationship: "alternative" | "sibling" | "parent" | "child" | "composition" | "complementary" | "used-by";
1645
- note: string;
1646
- }[] | undefined;
1647
- contract?: {
1648
- propsSummary?: string[] | undefined;
1649
- a11yRules?: string[] | undefined;
1650
- bans?: {
1651
- pattern: string;
1652
- message: string;
1653
- }[] | undefined;
1654
- scenarioTags?: string[] | undefined;
1655
- performanceBudget?: number | undefined;
1656
- } | undefined;
1657
- _generated?: {
1658
- source: "ai" | "storybook" | "manual";
1659
- sourceFile?: string | undefined;
1660
- confidence?: number | undefined;
1661
- timestamp?: string | undefined;
1662
- } | undefined;
1663
- }>;
1664
- /**
1665
- * Config schema - validates required fields, passes through optional config objects.
1666
- * Type definitions are in types.ts - schema just ensures basic structure.
1667
- */
1668
- declare const fragmentsConfigSchema: z.ZodObject<{
1669
- include: z.ZodArray<z.ZodString, "many">;
1670
- exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1671
- components: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1672
- outFile: z.ZodOptional<z.ZodString>;
1673
- framework: z.ZodOptional<z.ZodEnum<["react", "vue", "svelte"]>>;
1674
- figmaFile: z.ZodOptional<z.ZodString>;
1675
- figmaToken: z.ZodOptional<z.ZodString>;
1676
- screenshots: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
1677
- service: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
1678
- registry: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
1679
- tokens: z.ZodOptional<z.ZodObject<{
1680
- include: z.ZodArray<z.ZodString, "many">;
1681
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1682
- include: z.ZodArray<z.ZodString, "many">;
1683
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1684
- include: z.ZodArray<z.ZodString, "many">;
1685
- }, z.ZodTypeAny, "passthrough">>>;
1686
- snippets: z.ZodOptional<z.ZodObject<{
1687
- mode: z.ZodOptional<z.ZodEnum<["warn", "error"]>>;
1688
- scope: z.ZodOptional<z.ZodEnum<["snippet", "snippet+render"]>>;
1689
- requireFullSnippet: z.ZodOptional<z.ZodBoolean>;
1690
- allowedExternalModules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1691
- }, "strip", z.ZodTypeAny, {
1692
- mode?: "warn" | "error" | undefined;
1693
- scope?: "snippet" | "snippet+render" | undefined;
1694
- requireFullSnippet?: boolean | undefined;
1695
- allowedExternalModules?: string[] | undefined;
1696
- }, {
1697
- mode?: "warn" | "error" | undefined;
1698
- scope?: "snippet" | "snippet+render" | undefined;
1699
- requireFullSnippet?: boolean | undefined;
1700
- allowedExternalModules?: string[] | undefined;
1701
- }>>;
1702
- performance: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["strict", "standard", "relaxed"]>, z.ZodObject<{
1703
- preset: z.ZodOptional<z.ZodEnum<["strict", "standard", "relaxed"]>>;
1704
- budgets: z.ZodOptional<z.ZodObject<{
1705
- bundleSize: z.ZodOptional<z.ZodNumber>;
1706
- }, "strip", z.ZodTypeAny, {
1707
- bundleSize?: number | undefined;
1708
- }, {
1709
- bundleSize?: number | undefined;
1710
- }>>;
1711
- }, "strip", z.ZodTypeAny, {
1712
- preset?: "standard" | "strict" | "relaxed" | undefined;
1713
- budgets?: {
1714
- bundleSize?: number | undefined;
1715
- } | undefined;
1716
- }, {
1717
- preset?: "standard" | "strict" | "relaxed" | undefined;
1718
- budgets?: {
1719
- bundleSize?: number | undefined;
1720
- } | undefined;
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
- }>>;
1744
- }, "strip", z.ZodTypeAny, {
1745
- include: string[];
1746
- components?: string[] | undefined;
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;
1756
- tokens?: z.objectOutputType<{
1757
- include: z.ZodArray<z.ZodString, "many">;
1758
- }, z.ZodTypeAny, "passthrough"> | undefined;
1759
- registry?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
1760
- exclude?: string[] | undefined;
1761
- outFile?: string | undefined;
1762
- framework?: "react" | "vue" | "svelte" | undefined;
1763
- figmaFile?: string | undefined;
1764
- figmaToken?: string | undefined;
1765
- service?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
1766
- snippets?: {
1767
- mode?: "warn" | "error" | undefined;
1768
- scope?: "snippet" | "snippet+render" | undefined;
1769
- requireFullSnippet?: boolean | undefined;
1770
- allowedExternalModules?: string[] | undefined;
1771
- } | undefined;
1772
- performance?: "standard" | "strict" | "relaxed" | {
1773
- preset?: "standard" | "strict" | "relaxed" | undefined;
1774
- budgets?: {
1775
- bundleSize?: number | undefined;
1776
- } | undefined;
1777
- } | undefined;
1778
- }, {
1779
- include: string[];
1780
- components?: string[] | undefined;
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;
1790
- tokens?: z.objectInputType<{
1791
- include: z.ZodArray<z.ZodString, "many">;
1792
- }, z.ZodTypeAny, "passthrough"> | undefined;
1793
- registry?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
1794
- exclude?: string[] | undefined;
1795
- outFile?: string | undefined;
1796
- framework?: "react" | "vue" | "svelte" | undefined;
1797
- figmaFile?: string | undefined;
1798
- figmaToken?: string | undefined;
1799
- service?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
1800
- snippets?: {
1801
- mode?: "warn" | "error" | undefined;
1802
- scope?: "snippet" | "snippet+render" | undefined;
1803
- requireFullSnippet?: boolean | undefined;
1804
- allowedExternalModules?: string[] | undefined;
1805
- } | undefined;
1806
- performance?: "standard" | "strict" | "relaxed" | {
1807
- preset?: "standard" | "strict" | "relaxed" | undefined;
1808
- budgets?: {
1809
- bundleSize?: number | undefined;
1810
- } | undefined;
1811
- } | undefined;
1812
- }>;
1813
- /**
1814
- * @deprecated Use blockDefinitionSchema instead
1815
- */
1816
- declare const recipeDefinitionSchema: z.ZodObject<{
1817
- name: z.ZodString;
1818
- description: z.ZodString;
1819
- category: z.ZodString;
1820
- components: z.ZodArray<z.ZodString, "many">;
1821
- code: z.ZodString;
1822
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1823
- }, "strip", z.ZodTypeAny, {
1824
- components: string[];
1825
- name: string;
1826
- category: string;
1827
- code: string;
1828
- description: string;
1829
- tags?: string[] | undefined;
1830
- }, {
1831
- components: string[];
1832
- name: string;
1833
- category: string;
1834
- code: string;
1835
- description: string;
1836
- tags?: string[] | undefined;
1837
- }>;
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
-
1903
- /**
1904
- * Figma property mapping DSL
1905
- *
1906
- * Provides helpers for mapping Figma component properties to code props.
1907
- * Inspired by Figma Code Connect's API.
1908
- *
1909
- * @example
1910
- * ```tsx
1911
- * import { defineFragment, figma } from '@fragments-sdk/cli/core';
1912
- *
1913
- * export default defineFragment({
1914
- * component: Button,
1915
- * meta: {
1916
- * name: 'Button',
1917
- * description: 'Primary action trigger',
1918
- * category: 'actions',
1919
- * figma: 'https://figma.com/file/abc/Design?node-id=1-2',
1920
- * figmaProps: {
1921
- * children: figma.string('Label'),
1922
- * disabled: figma.boolean('Disabled'),
1923
- * variant: figma.enum('Type', {
1924
- * 'Primary': 'primary',
1925
- * 'Secondary': 'secondary',
1926
- * }),
1927
- * },
1928
- * },
1929
- * // ...
1930
- * });
1931
- * ```
1932
- */
1933
-
1934
- /**
1935
- * Map a Figma text property to a string prop.
1936
- *
1937
- * @param figmaProperty - The name of the text property in Figma
1938
- * @returns A string mapping descriptor
1939
- *
1940
- * @example
1941
- * ```tsx
1942
- * figmaProps: {
1943
- * label: figma.string('Button Text'),
1944
- * placeholder: figma.string('Placeholder'),
1945
- * }
1946
- * ```
1947
- */
1948
- declare function string(figmaProperty: string): FigmaStringMapping;
1949
- /**
1950
- * Map a Figma boolean property to a boolean prop.
1951
- * Optionally map true/false to different values.
1952
- *
1953
- * @param figmaProperty - The name of the boolean property in Figma
1954
- * @param valueMapping - Optional mapping of true/false to other values
1955
- * @returns A boolean mapping descriptor
1956
- *
1957
- * @example
1958
- * ```tsx
1959
- * figmaProps: {
1960
- * disabled: figma.boolean('Disabled'),
1961
- * // Map boolean to string values
1962
- * size: figma.boolean('Large', { true: 'lg', false: 'md' }),
1963
- * }
1964
- * ```
1965
- */
1966
- declare function boolean(figmaProperty: string, valueMapping?: {
1967
- true: unknown;
1968
- false: unknown;
1969
- }): FigmaBooleanMapping;
1970
- /**
1971
- * Map a Figma variant property to an enum prop.
1972
- *
1973
- * @param figmaProperty - The name of the variant property in Figma
1974
- * @param valueMapping - Mapping of Figma values to code values
1975
- * @returns An enum mapping descriptor
1976
- *
1977
- * @example
1978
- * ```tsx
1979
- * figmaProps: {
1980
- * variant: figma.enum('Type', {
1981
- * 'Primary': 'primary',
1982
- * 'Secondary': 'secondary',
1983
- * 'Outline': 'outline',
1984
- * }),
1985
- * size: figma.enum('Size', {
1986
- * 'Small': 'sm',
1987
- * 'Medium': 'md',
1988
- * 'Large': 'lg',
1989
- * }),
1990
- * }
1991
- * ```
1992
- */
1993
- declare function enumValue<T extends Record<string, unknown>>(figmaProperty: string, valueMapping: T): FigmaEnumMapping;
1994
- /**
1995
- * Reference a nested Figma component instance.
1996
- * Use this when a prop accepts a component that's represented
1997
- * as an instance swap in Figma.
1998
- *
1999
- * @param figmaProperty - The name of the instance property in Figma
2000
- * @returns An instance mapping descriptor
2001
- *
2002
- * @example
2003
- * ```tsx
2004
- * figmaProps: {
2005
- * icon: figma.instance('Icon'),
2006
- * avatar: figma.instance('Avatar'),
2007
- * }
2008
- * ```
2009
- */
2010
- declare function instance(figmaProperty: string): FigmaInstanceMapping;
2011
- /**
2012
- * Render children from specific Figma layers.
2013
- * Use this when children are represented as named layers in Figma.
2014
- *
2015
- * @param layers - Array of layer names to include as children
2016
- * @returns A children mapping descriptor
2017
- *
2018
- * @example
2019
- * ```tsx
2020
- * figmaProps: {
2021
- * children: figma.children(['Title', 'Description', 'Actions']),
2022
- * }
2023
- * ```
2024
- */
2025
- declare function children(layers: string[]): FigmaChildrenMapping;
2026
- /**
2027
- * Extract text content from a Figma text layer.
2028
- * Use this when a prop should be the actual text from a layer.
2029
- *
2030
- * @param layer - The name of the text layer in Figma
2031
- * @returns A text content mapping descriptor
2032
- *
2033
- * @example
2034
- * ```tsx
2035
- * figmaProps: {
2036
- * title: figma.textContent('Header Text'),
2037
- * description: figma.textContent('Body Text'),
2038
- * }
2039
- * ```
2040
- */
2041
- declare function textContent(layer: string): FigmaTextContentMapping;
2042
- /**
2043
- * Figma property mapping helpers.
2044
- *
2045
- * Use these to define how Figma properties map to your component props.
2046
- * The mappings are used for:
2047
- * - Generating accurate code snippets in Figma Dev Mode
2048
- * - AI agents understanding the design-to-code relationship
2049
- * - Automated design verification
2050
- */
2051
- declare const figma: {
2052
- readonly string: typeof string;
2053
- readonly boolean: typeof boolean;
2054
- readonly enum: typeof enumValue;
2055
- readonly instance: typeof instance;
2056
- readonly children: typeof children;
2057
- readonly textContent: typeof textContent;
2058
- };
2059
- /**
2060
- * Helper type to check if a value is a Figma prop mapping
2061
- */
2062
- declare function isFigmaPropMapping(value: unknown): value is FigmaStringMapping | FigmaBooleanMapping | FigmaEnumMapping | FigmaInstanceMapping | FigmaChildrenMapping | FigmaTextContentMapping;
2063
- /**
2064
- * Resolve a Figma prop mapping to an actual value given Figma property values.
2065
- *
2066
- * @param mapping - The Figma prop mapping
2067
- * @param figmaValues - Object containing Figma property values
2068
- * @returns The resolved value for the code prop
2069
- */
2070
- declare function resolveFigmaMapping(mapping: FigmaStringMapping | FigmaBooleanMapping | FigmaEnumMapping | FigmaInstanceMapping | FigmaChildrenMapping | FigmaTextContentMapping, figmaValues: Record<string, unknown>): unknown;
2071
-
2072
- /**
2073
- * Token Parser — extracts CSS custom property declarations from SCSS/CSS files.
2074
- *
2075
- * Parses files for `--prefix-*: value;` declarations and groups them
2076
- * by SCSS comment sections (e.g., `// Typography`, `// Colors`).
2077
- * Falls back to naming-convention-based categorization when comments
2078
- * are absent.
2079
- */
2080
- interface ParsedToken {
2081
- /** Full CSS variable name (e.g., "--fui-color-accent") */
2082
- name: string;
2083
- /** Raw value from the declaration (e.g., "#{$fui-space-4}" or "16px") */
2084
- value?: string;
2085
- /** Resolved value after SCSS variable substitution (e.g., "16px") */
2086
- resolvedValue?: string;
2087
- /** Category inferred from SCSS comment or naming convention */
2088
- category: string;
2089
- /** Description from inline comment, if any */
2090
- description?: string;
2091
- }
2092
- interface TokenParseOutput {
2093
- /** Detected prefix (e.g., "--fui-") */
2094
- prefix: string;
2095
- /** Tokens grouped by category */
2096
- categories: Record<string, ParsedToken[]>;
2097
- /** Total number of tokens found */
2098
- total: number;
2099
- }
2100
- /**
2101
- * Parse a SCSS or CSS file and extract CSS custom property declarations.
2102
- *
2103
- * Handles two grouping strategies:
2104
- * 1. Comment-based: Uses `// Category` comments above groups of declarations
2105
- * 2. Naming-based: Falls back to inferring category from variable name patterns
2106
- *
2107
- * Also resolves SCSS variable interpolations (e.g., `#{$fui-space-4}` → `16px`)
2108
- * when the SCSS variable definitions are found in the same file content.
2109
- */
2110
- declare function parseTokenFile(content: string, filePath: string): TokenParseOutput;
2111
-
2112
- interface CompositionWarning {
2113
- type: "missing_parent" | "missing_child" | "missing_composition" | "redundant_alternative" | "deprecated" | "experimental";
2114
- component: string;
2115
- message: string;
2116
- relatedComponent?: string;
2117
- }
2118
- interface CompositionSuggestion {
2119
- component: string;
2120
- reason: string;
2121
- relationship: RelationshipType | "category_gap";
2122
- sourceComponent: string;
2123
- }
2124
- interface CompositionGuideline {
2125
- component: string;
2126
- guideline: string;
2127
- }
2128
- interface CompositionAnalysis {
2129
- /** The validated component names (filtered to those that exist) */
2130
- components: string[];
2131
- /** Components requested but not found in the registry */
2132
- unknown: string[];
2133
- /** Issues with the current selection */
2134
- warnings: CompositionWarning[];
2135
- /** Components to consider adding */
2136
- suggestions: CompositionSuggestion[];
2137
- /** Relevant usage guidelines for the selected components */
2138
- guidelines: CompositionGuideline[];
2139
- }
2140
- /**
2141
- * Analyzes a set of components as a composition group.
2142
- * Returns warnings about missing relations, usage conflicts,
2143
- * and suggestions for additional components.
2144
- *
2145
- * When a ComponentGraph is provided via `options.graph`, the analysis is
2146
- * enhanced with graph-based dependency detection and block-based suggestions.
2147
- *
2148
- * Browser-safe: no Node.js APIs used.
2149
- */
2150
- declare function analyzeComposition(fragments: Record<string, CompiledFragment>, componentNames: string[], _context?: string, options?: {
2151
- graph?: ComponentGraph;
2152
- }): CompositionAnalysis;
2153
-
2154
- /**
2155
- * Minimal contract for rendering a preview variant.
2156
- * Compatible with fragment variants and Storybook-adapted variants.
2157
- */
2158
- interface PreviewVariantLike {
2159
- render: (options?: VariantRenderOptions) => ReactNode;
2160
- loaders?: VariantLoader[];
2161
- }
2162
- interface PreviewRuntimeState {
2163
- content: ReactNode | null;
2164
- isLoading: boolean;
2165
- error: Error | null;
2166
- loadedData?: Record<string, unknown>;
2167
- }
2168
- interface PreviewRuntimeOptions {
2169
- variant?: PreviewVariantLike | null;
2170
- loadedData?: Record<string, unknown>;
2171
- }
2172
- /**
2173
- * Execute all variant loaders and merge their payloads.
2174
- * `loadedData` is applied last so host-level overrides win.
2175
- */
2176
- declare function executeVariantLoaders(loaders: VariantLoader[] | undefined, loadedData?: Record<string, unknown>): Promise<Record<string, unknown> | undefined>;
2177
- /**
2178
- * Resolve a full runtime state (loader execution + render) in one async call.
2179
- * This is useful for testing and for hook/component orchestration.
2180
- */
2181
- declare function resolvePreviewRuntimeState(options: PreviewRuntimeOptions): Promise<PreviewRuntimeState>;
2182
- /**
2183
- * Hook for rendering a preview variant with loader support.
2184
- */
2185
- declare function usePreviewVariantRuntime(options: PreviewRuntimeOptions): PreviewRuntimeState;
2186
- interface PreviewVariantRuntimeProps extends PreviewRuntimeOptions {
2187
- children: (state: PreviewRuntimeState) => ReactNode;
2188
- }
2189
- /**
2190
- * Render-prop component wrapper around `usePreviewVariantRuntime`.
2191
- */
2192
- declare function PreviewVariantRuntime({ variant, loadedData, children, }: PreviewVariantRuntimeProps): react_jsx_runtime.JSX.Element;
2193
-
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 };
1
+ export * from '@fragments-sdk/core';