@wireweave/core 3.1.0-beta.6 → 3.1.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { h as AnyNode, A as AccordionNode, a as AlertNode, j as AvatarNode, B as BadgeNode, r as BreadcrumbNode, s as ButtonNode, C as CardNode, w as CheckboxNode, x as ColNode, z as ComponentDefinitionNode, H as ComponentUseNode, I as ContainerComponentNode, J as ContainerNode, K as DataNode, L as DefinitionNode, N as DisplayNode, O as DividerComponentNode, P as DrawerNode, S as DropdownNode, T as FeedbackNode, V as FooterNode, W as GridNode, Z as HeaderNode, $ as IconNode, a2 as ImageNode, a3 as InputComponentNode, a4 as InputNode, aa as LayoutDefinitionNode, ab as LayoutNode, ac as LeafNode, ad as LinkNode, af as ListNode, ag as MainNode, aj as ModalNode, ao as NavNode, ap as NavigationNode, aq as NodeType, ar as OverlayNode, as as PageNode, at as PlaceholderNode, au as PopoverNode, ax as ProgressNode, ay as RadioNode, aA as RowNode, aB as SectionNode, aC as SelectNode, aF as SidebarNode, aH as SliderNode, aI as SlotNode, aM as SpinnerNode, aU as SwitchNode, aW as TableNode, aX as TabsNode, aZ as TextContentNode, a_ as TextNode, b2 as TextareaNode, b4 as TitleNode, b5 as ToastNode, b7 as TooltipNode, bc as WireframeDocument, aJ as SourceLocation, aQ as StateDeclaration, aR as StateGuard, a6 as InteractionEffect, a5 as InputType } from './types-BiDAgo6f.cjs';
2
- export { b as AlertVariant, c as AlignValue, d as AnchorPosition, e as AnnotationItemNode, f as AnnotationNode, g as AnnotationsNode, i as AppearanceProps, k as AvatarSize, l as AvatarSizeToken, m as BadgeSize, n as BadgeSizeToken, o as BadgeVariant, p as BaseNode, q as BreadcrumbItem, t as ButtonSize, u as ButtonSizeToken, v as ButtonVariant, y as CommonProps, D as ComponentInputValue, E as ComponentParameter, F as ComponentParameterType, G as ComponentSlotFill, M as DirectionValue, Q as DrawerPosition, R as DropdownItemNode, U as FlexProps, X as GridProps, Y as GuardedOutcomeProps, _ as HeightValue, a0 as IconSize, a1 as IconSizeToken, a7 as InteractionHandler, a8 as InteractiveProps, a9 as JustifyValue, ae as ListItemNode, ah as MarkerColor, ai as MarkerNode, ak as NavBlockItem, al as NavChild, am as NavGroupNode, an as NavItem, av as Position, aw as PositionProps, az as RelativeNode, aD as SelectOption, aE as ShadowValue, aG as SizeProps, aK as SpacingProps, aL as SpacingValue, aN as SpinnerSize, aO as SpinnerSizeToken, aP as StackNode, aS as StateValue, aT as StateValueType, aV as TabNode, aY as TextAlign, a$ as TextSize, b0 as TextSizeToken, b1 as TextWeight, b3 as TitleLevel, b6 as ToastPosition, b8 as TooltipPosition, b9 as TopLevelNode, ba as ValueWithUnit, bb as WidthValue } from './types-BiDAgo6f.cjs';
1
+ import { h as AnyNode, A as AccordionNode, a as AlertNode, j as AvatarNode, B as BadgeNode, r as BreadcrumbNode, s as ButtonNode, C as CardNode, w as CheckboxNode, x as ColNode, z as ComponentDefinitionNode, H as ComponentUseNode, I as ContainerComponentNode, J as ContainerNode, K as DataNode, L as DefinitionNode, N as DisplayNode, O as DividerComponentNode, P as DrawerNode, S as DropdownNode, T as FeedbackNode, V as FooterNode, W as GridNode, Z as HeaderNode, $ as IconNode, a2 as ImageNode, a3 as InputComponentNode, a4 as InputNode, aa as LayoutDefinitionNode, ab as LayoutNode, ac as LeafNode, ad as LinkNode, af as ListNode, ag as MainNode, aj as ModalNode, ao as NavNode, ap as NavigationNode, aq as NodeType, ar as OverlayNode, as as PageNode, at as PlaceholderNode, au as PopoverNode, ax as ProgressNode, ay as RadioNode, aB as RowNode, aC as SectionNode, aD as SelectNode, aG as SidebarNode, aI as SliderNode, aJ as SlotNode, aN as SpinnerNode, aV as SwitchNode, aX as TableNode, aY as TabsNode, a_ as TextContentNode, a$ as TextNode, b3 as TextareaNode, b5 as TitleNode, b6 as ToastNode, b8 as TooltipNode, bd as WireframeDocument, aK as SourceLocation, aR as StateDeclaration, aS as StateGuard, a6 as InteractionEffect, a5 as InputType } from './types-DfiCKOPE.cjs';
2
+ export { b as AlertVariant, c as AlignValue, d as AnchorPosition, e as AnnotationItemNode, f as AnnotationNode, g as AnnotationsNode, i as AppearanceProps, k as AvatarSize, l as AvatarSizeToken, m as BadgeSize, n as BadgeSizeToken, o as BadgeVariant, p as BaseNode, q as BreadcrumbItem, t as ButtonSize, u as ButtonSizeToken, v as ButtonVariant, y as CommonProps, D as ComponentInputValue, E as ComponentParameter, F as ComponentParameterType, G as ComponentSlotFill, M as DirectionValue, Q as DrawerPosition, R as DropdownItemNode, U as FlexProps, X as GridProps, Y as GuardedOutcomeProps, _ as HeightValue, a0 as IconSize, a1 as IconSizeToken, a7 as InteractionHandler, a8 as InteractiveProps, a9 as JustifyValue, ae as ListItemNode, ah as MarkerColor, ai as MarkerNode, ak as NavBlockItem, al as NavChild, am as NavGroupNode, an as NavItem, av as Position, aw as PositionProps, az as RelativeNode, aA as RepeatNode, aE as SelectOption, aF as ShadowValue, aH as SizeProps, aL as SpacingProps, aM as SpacingValue, aO as SpinnerSize, aP as SpinnerSizeToken, aQ as StackNode, aT as StateValue, aU as StateValueType, aW as TabNode, aZ as TextAlign, b0 as TextSize, b1 as TextSizeToken, b2 as TextWeight, b4 as TitleLevel, b7 as ToastPosition, b9 as TooltipPosition, ba as TopLevelNode, bb as ValueWithUnit, bc as WidthValue } from './types-DfiCKOPE.cjs';
3
3
  export { ExpectedToken, ParseError, ParseErrorInfo, ParseOptions, ParseResult, getErrors, isValid, parse, tryParse } from './parser.cjs';
4
4
  import { SiteOptions } from './renderer.cjs';
5
5
  export { AnnotationStyle, CanvasOptions, CanvasRenderResult, ENABLED_GUARD_ATTR, EXTERNAL_NAVIGATE_ATTR, HtmlRenderer, INERT_HREF, INTERACTIVE_ATTR_NAMES, IconData, IconElement, InteractiveAttrs, PageRenderResult, PlacedPage, RenderContext, RenderOptions, RenderResult, ShellMiss, SiteModel, SiteScreen, SiteShell, SvgRenderOptions, SvgRenderResult, TYPED_INTERACTION_ATTR, ThemeColors, ThemeConfig, VISIBLE_GUARD_ATTR, anchorIntent, buildSiteModel, createHtmlRenderer, darkTheme, defaultTheme, generateComponentStyles, generateStyles, getIconData, getTheme, guardedOutcomeAttrs, interactiveAttrs, layoutCanvas, lucideIcons, render, renderCanvas, renderIconSvg, renderPage, renderSite, renderToHtml, renderToSvg, renderUnknownIconSvg, resolvePageDimensions } from './renderer.cjs';
@@ -264,6 +264,135 @@ interface ComponentParameterReference {
264
264
  */
265
265
  declare function collectParameterReferences(children: readonly AnyNode[]): ComponentParameterReference[];
266
266
 
267
+ /**
268
+ * `repeat N { … }` expansion — folding syntax turned into the tree it denotes.
269
+ *
270
+ * ## Why this is a pass over the document, not a case in the renderer
271
+ *
272
+ * `repeat` has to disappear before anything *measures* the tree, not merely
273
+ * before something draws it. The renderer builds its anchor index up front:
274
+ * `HtmlRenderer.render` calls `buildAnchorPathMap(document)` before emitting a
275
+ * byte, and that map is keyed by **node object identity**. A `Repeat` expanded
276
+ * lazily inside `renderNode` would hand back copies the map has never seen, so
277
+ * every copy but the first would render without a `data-wf-path` and the anchor
278
+ * count would stop matching the index — the exact drift `anchor-path.ts` exists
279
+ * to prevent. Expanding the whole document first means the map, the markup, the
280
+ * DOM map and the UX rules all see one identical tree.
281
+ *
282
+ * It is equally deliberate that this is **not** in the parser. The AST keeps the
283
+ * `Repeat` node so the printer can write `repeat 6` back out; expanding at parse
284
+ * time would make `parse(print(parse(src)))` return six bodies where the source
285
+ * had one, breaking the round-trip law the corpus harness pins.
286
+ *
287
+ * ## Identity and source anchors
288
+ *
289
+ * Every copy is a fresh deep clone, never a shared reference — see above for why
290
+ * identity matters. Clones intentionally keep the `loc` of the body they came
291
+ * from: all six copies of `repeat 6 { … }` really do originate at one span of
292
+ * source, so pointing back at it is accurate, and it is the same thing component
293
+ * expansion already does. Uniqueness comes from position instead — anchor paths
294
+ * are child indices (`0.2.1`), so the copies land at distinct sibling indices
295
+ * automatically and no two share a path.
296
+ */
297
+
298
+ /**
299
+ * Total node budget for one expansion.
300
+ *
301
+ * Nesting multiplies — `repeat 100 { repeat 100 { … } }` is ten thousand bodies
302
+ * — so a per-`repeat` cap on `N` would not bound the result. The budget is
303
+ * therefore on the **expanded total**, which is the quantity that actually costs
304
+ * anything, and it is checked as the tree is built so a runaway document stops
305
+ * early instead of being materialised and then rejected.
306
+ *
307
+ * The number is the page-complexity ceiling `ux-rules` already applies
308
+ * (`MAX_PAGE_ELEMENTS`, 50) times ten. Tying it to that constant rather than
309
+ * inventing a figure keeps one notion of "too big for a wireframe" in the
310
+ * codebase; the multiplier is headroom, so that a document merely worth warning
311
+ * about still renders — `tooManyPageElements` reports at 50 and this refuses at
312
+ * 500, leaving an order of magnitude in which a document is complained about
313
+ * but still drawn, and only past that is it refused outright.
314
+ */
315
+ declare const REPEAT_EXPANSION_BUDGET = 500;
316
+ /** Thrown when an expansion would exceed {@link REPEAT_EXPANSION_BUDGET}. */
317
+ declare class RepeatBudgetError extends Error {
318
+ constructor(budget: number);
319
+ }
320
+ /**
321
+ * Replace every `repeat N { … }` in a document with `N` copies of its body.
322
+ *
323
+ * Idempotent by construction — the result contains no `Repeat` nodes, so a
324
+ * second application is a no-op. A document with no `repeat` is returned as-is,
325
+ * identity included, so the common case costs one traversal and no allocation.
326
+ *
327
+ * @param document - Parsed wireframe document
328
+ * @returns The document with all `repeat` nodes expanded
329
+ * @throws {RepeatBudgetError} when expansion exceeds {@link REPEAT_EXPANSION_BUDGET}
330
+ * @public
331
+ * @example
332
+ * `const drawable = expandRepeats(parse(source))`
333
+ */
334
+ declare function expandRepeats(document: WireframeDocument): WireframeDocument;
335
+
336
+ /**
337
+ * `page … variants=[a, b, c]` expansion — one page turned into the screens it denotes.
338
+ *
339
+ * ## What a variant is, and why it is not a state
340
+ *
341
+ * A wireframe usually has to show a screen in several conditions: loading,
342
+ * empty, populated, failed. The language already has `states` for that, and it
343
+ * is the wrong tool: a `state` is a runtime value the site runtime flips and
344
+ * `visibleWhen` guards read, so *something in the wireframe has to flip it*.
345
+ * That something is a control the product does not have — a reviewer opening
346
+ * the artifact sees state-switching buttons among the real UI and cannot tell
347
+ * which is which. It also produces one board, so the conditions are only
348
+ * visible one at a time, and any block common to two conditions is written
349
+ * twice because a guard has no disjunction.
350
+ *
351
+ * A variant moves the same information from a toggle inside the screen to an
352
+ * axis of the document: `variants=[loading, empty, ready]` draws the page three
353
+ * times, side by side, with no switching UI in any of them. The artifact
354
+ * becomes the sheet of state-by-state boards a reviewer reads top to bottom,
355
+ * and the common blocks are shared because they are one authored body.
356
+ *
357
+ * ## Why this is a document pass, like `repeat`
358
+ *
359
+ * For the reason spelled out at length in `expand-repeats.ts`: the renderer
360
+ * builds `buildAnchorPathMap(document)` up front and keys it by **node object
361
+ * identity**. Two variant boards sharing one child tree would be two boards the
362
+ * map has seen once, so the second would render without `data-wf-path` and the
363
+ * anchor count would stop matching the index. Every variant is therefore a
364
+ * fresh deep clone, and `loc` is deliberately shared: all three boards really do
365
+ * originate at one span of source.
366
+ *
367
+ * Doing it here rather than in each renderer is also what keeps the surfaces
368
+ * agreeing. `render`'s canvas counts pages and `renderSite` builds a screen
369
+ * model; if each expanded on its own, a variant would be a canvas board and a
370
+ * site screen by two separate rules that could drift. They both run this pass
371
+ * and then count what it produced.
372
+ *
373
+ * And, as with `repeat`, this is deliberately **not** in the parser: the AST
374
+ * keeps `variants` so the printer writes it back out, and expanding at parse
375
+ * time would break the `parse(print(parse(src)))` round-trip law the corpus
376
+ * harness pins.
377
+ */
378
+
379
+ /**
380
+ * Replace every page declaring `variants=` with one page per variant.
381
+ *
382
+ * Each produced page carries `variant` naming which one it is and no longer
383
+ * carries `variants`, so the result declares none and a second application is a
384
+ * no-op. A document with no variants is returned as-is, identity included, so
385
+ * the common case costs one scan and no allocation — the property every
386
+ * existing document relies on to render exactly as it did before.
387
+ *
388
+ * @param document - Parsed wireframe document
389
+ * @returns The document with all variant-bearing pages expanded
390
+ * @public
391
+ * @example
392
+ * `const drawable = expandVariants(parse(source))`
393
+ */
394
+ declare function expandVariants(document: WireframeDocument): WireframeDocument;
395
+
267
396
  /**
268
397
  * Node/document-level canonical `.wf` printing.
269
398
  *
@@ -1678,4 +1807,4 @@ declare function compileApp(document: AppDocument, options?: CompileAppOptions):
1678
1807
  */
1679
1808
  declare function linkAndCompileApp(manifest: AppManifest, modules: readonly AppModuleInput[], options?: CompileAppOptions): AppCompileResult;
1680
1809
 
1681
- export { ANCHOR_LOC_ATTR, ANCHOR_PATH_ATTR, type AccessibilityMetrics, AccordionNode, AlertNode, type AnalysisOptions, type AnalysisResult, type AnchorEntry, AnyNode, type AppCompileResult, type AppComponentInput, type AppComponentInstanceId, type AppDefinitionKind, type AppDocument, type AppLayoutInput, type AppLinkDiagnostic, type AppLinkDiagnosticCode, type AppLinkResult, type AppManifest, type AppManifestModule, type AppModuleInput, type AppNodeId, type AppNodeKind, type AppReferenceInput, type AppScreenInput, type AppSourceMapEntry, type AppSourceSpan, type AttributeChange, AvatarNode, BadgeNode, BreadcrumbNode, ButtonNode, CardNode, CheckboxNode, ColNode, type CompileAppOptions, type ComplexityMetrics, ComponentCategory, ComponentDefinitionNode, type ComponentParameterReference, type ComponentStats, ComponentUseNode, ContainerComponentNode, ContainerNode, type ContentAnalysis, DEFAULT_VIEWPORT, DEVICE_PRESETS, DataNode, DefinitionNode, type DiffChangeType, type DiffOptions, type DiffResult, type DiffSummary, DisplayNode, DividerComponentNode, type DomTreeNode, DrawerNode, DropdownNode, type ExportOptions, FeedbackNode, type FigmaAutoLayout, type FigmaColor, type FigmaCounterAxisAlign, type FigmaExportResult, type FigmaLayoutMode, type FigmaNode, type FigmaNodeType, type FigmaPrimaryAxisAlign, type FigmaSize, type FigmaSizingMode, type FigmaSolidFill, type FigmaStroke, type FigmaTextAlign, type FigmaTextStyle, FooterNode, GridNode, HeaderNode, IconNode, ImageNode, InputComponentNode, InputNode, InputType, type InteractionDiagnostic, type InteractionDiagnosticCode, InteractionEffect, type InteractionKind, type InteractionModel, type JsonExportResult, type JsonNode, type LayoutAnalysis, LayoutDefinitionNode, LayoutNode, LeafNode, LinkNode, ListNode, MainNode, ModalNode, NavNode, NavigationNode, type NodeChange, type NodePredicate, NodeType, type NormalizedInteraction, type NormalizedInteractionEffect, type NormalizedInteractionHandler, OverlayNode, PageNode, PlaceholderNode, PopoverNode, type PreviewWrapperOptions, ProgressNode, RadioNode, type ResolvedAppComponent, type ResolvedAppLayout, type ResolvedAppModule, type ResolvedAppReference, type ResolvedAppScreen, RowNode, type ScreenAction, type ScreenDisplay, type ScreenElement, type ScreenFields, type ScreenFieldsSummary, type ScreenInput, type ScreenTransitionGraph, SectionNode, SelectNode, SidebarNode, SiteOptions, SliderNode, SlotNode, SourceLocation, type SourceSlice, SpinnerNode, StateDeclaration, StateGuard, SwitchNode, TableNode, TabsNode, TextContentNode, TextNode, TextareaNode, TitleNode, ToastNode, TooltipNode, type TransitionEdge, type TransitionScreen, type TreeMetrics, type ValidationError, type ValidationOptions, type ValidationResult, type ViewportSize, type WalkCallback, WireframeDocument, analyze, areIdentical, buildAnchorIndex, buildDomTree, calculateViewportScale, cloneNode, collectInteractions, collectParameterReferences, compileApp, contains, countNodes, createAppComponentInstanceId, createAppNodeId, diff, documentDefinitions, documentPages, exportToFigma, exportToFigmaString, exportToJson, exportToJsonString, extractAllScreenFields, extractScreenFields, extractScreenTransitions, find, findAll, findByType, formatWireframeCode, getAncestors, getChangeSummary, getDevicePresets, getMaxDepth, getNodeSource, getNodeTypes, getPageSource, getValidationErrors, hasChildren, importFromJson, interactionSignature, isAccordionNode, isAlertNode, isAvatarNode, isBadgeNode, isBreadcrumbNode, isButtonNode, isCardNode, isCheckboxNode, isColNode, isComponentDefinitionNode, isComponentUseNode, isContainerComponentNode, isContainerNode, isDataNode, isDefinitionNode, isDisplayNode, isDividerNode, isDrawerNode, isDropdownNode, isFeedbackNode, isFooterNode, isGridNode, isHeaderNode, isIconNode, isImageNode, isInputComponentNode, isInputNode, isLayoutDefinitionNode, isLayoutNode, isLeafNode, isLinkNode, isListNode, isMainNode, isModalNode, isNavNode, isNavigationNode, isNodeType, isOverlayNode, isPageNode, isPlaceholderNode, isPopoverNode, isProgressNode, isRadioNode, isRowNode, isSectionNode, isSelectNode, isSidebarNode, isSliderNode, isSlotNode, isSpinnerNode, isSwitchNode, isTableNode, isTabsNode, isTextContentNode, isTextNode, isTextareaNode, isTitleNode, isToastNode, isTooltipNode, isUrlTarget, isValidAst, isValidDevicePreset, linkAndCompileApp, linkApp, mapNodes, normalizeInteractionHandlers, normalizeStateGuard, parameterReferenceName, parseViewportString, printWireframe, resetFigmaIdCounter, resolveAnchor, resolveViewport, validate, walk, walkDocument, wrapInPreviewContainer };
1810
+ export { ANCHOR_LOC_ATTR, ANCHOR_PATH_ATTR, type AccessibilityMetrics, AccordionNode, AlertNode, type AnalysisOptions, type AnalysisResult, type AnchorEntry, AnyNode, type AppCompileResult, type AppComponentInput, type AppComponentInstanceId, type AppDefinitionKind, type AppDocument, type AppLayoutInput, type AppLinkDiagnostic, type AppLinkDiagnosticCode, type AppLinkResult, type AppManifest, type AppManifestModule, type AppModuleInput, type AppNodeId, type AppNodeKind, type AppReferenceInput, type AppScreenInput, type AppSourceMapEntry, type AppSourceSpan, type AttributeChange, AvatarNode, BadgeNode, BreadcrumbNode, ButtonNode, CardNode, CheckboxNode, ColNode, type CompileAppOptions, type ComplexityMetrics, ComponentCategory, ComponentDefinitionNode, type ComponentParameterReference, type ComponentStats, ComponentUseNode, ContainerComponentNode, ContainerNode, type ContentAnalysis, DEFAULT_VIEWPORT, DEVICE_PRESETS, DataNode, DefinitionNode, type DiffChangeType, type DiffOptions, type DiffResult, type DiffSummary, DisplayNode, DividerComponentNode, type DomTreeNode, DrawerNode, DropdownNode, type ExportOptions, FeedbackNode, type FigmaAutoLayout, type FigmaColor, type FigmaCounterAxisAlign, type FigmaExportResult, type FigmaLayoutMode, type FigmaNode, type FigmaNodeType, type FigmaPrimaryAxisAlign, type FigmaSize, type FigmaSizingMode, type FigmaSolidFill, type FigmaStroke, type FigmaTextAlign, type FigmaTextStyle, FooterNode, GridNode, HeaderNode, IconNode, ImageNode, InputComponentNode, InputNode, InputType, type InteractionDiagnostic, type InteractionDiagnosticCode, InteractionEffect, type InteractionKind, type InteractionModel, type JsonExportResult, type JsonNode, type LayoutAnalysis, LayoutDefinitionNode, LayoutNode, LeafNode, LinkNode, ListNode, MainNode, ModalNode, NavNode, NavigationNode, type NodeChange, type NodePredicate, NodeType, type NormalizedInteraction, type NormalizedInteractionEffect, type NormalizedInteractionHandler, OverlayNode, PageNode, PlaceholderNode, PopoverNode, type PreviewWrapperOptions, ProgressNode, REPEAT_EXPANSION_BUDGET, RadioNode, RepeatBudgetError, type ResolvedAppComponent, type ResolvedAppLayout, type ResolvedAppModule, type ResolvedAppReference, type ResolvedAppScreen, RowNode, type ScreenAction, type ScreenDisplay, type ScreenElement, type ScreenFields, type ScreenFieldsSummary, type ScreenInput, type ScreenTransitionGraph, SectionNode, SelectNode, SidebarNode, SiteOptions, SliderNode, SlotNode, SourceLocation, type SourceSlice, SpinnerNode, StateDeclaration, StateGuard, SwitchNode, TableNode, TabsNode, TextContentNode, TextNode, TextareaNode, TitleNode, ToastNode, TooltipNode, type TransitionEdge, type TransitionScreen, type TreeMetrics, type ValidationError, type ValidationOptions, type ValidationResult, type ViewportSize, type WalkCallback, WireframeDocument, analyze, areIdentical, buildAnchorIndex, buildDomTree, calculateViewportScale, cloneNode, collectInteractions, collectParameterReferences, compileApp, contains, countNodes, createAppComponentInstanceId, createAppNodeId, diff, documentDefinitions, documentPages, expandRepeats, expandVariants, exportToFigma, exportToFigmaString, exportToJson, exportToJsonString, extractAllScreenFields, extractScreenFields, extractScreenTransitions, find, findAll, findByType, formatWireframeCode, getAncestors, getChangeSummary, getDevicePresets, getMaxDepth, getNodeSource, getNodeTypes, getPageSource, getValidationErrors, hasChildren, importFromJson, interactionSignature, isAccordionNode, isAlertNode, isAvatarNode, isBadgeNode, isBreadcrumbNode, isButtonNode, isCardNode, isCheckboxNode, isColNode, isComponentDefinitionNode, isComponentUseNode, isContainerComponentNode, isContainerNode, isDataNode, isDefinitionNode, isDisplayNode, isDividerNode, isDrawerNode, isDropdownNode, isFeedbackNode, isFooterNode, isGridNode, isHeaderNode, isIconNode, isImageNode, isInputComponentNode, isInputNode, isLayoutDefinitionNode, isLayoutNode, isLeafNode, isLinkNode, isListNode, isMainNode, isModalNode, isNavNode, isNavigationNode, isNodeType, isOverlayNode, isPageNode, isPlaceholderNode, isPopoverNode, isProgressNode, isRadioNode, isRowNode, isSectionNode, isSelectNode, isSidebarNode, isSliderNode, isSlotNode, isSpinnerNode, isSwitchNode, isTableNode, isTabsNode, isTextContentNode, isTextNode, isTextareaNode, isTitleNode, isToastNode, isTooltipNode, isUrlTarget, isValidAst, isValidDevicePreset, linkAndCompileApp, linkApp, mapNodes, normalizeInteractionHandlers, normalizeStateGuard, parameterReferenceName, parseViewportString, printWireframe, resetFigmaIdCounter, resolveAnchor, resolveViewport, validate, walk, walkDocument, wrapInPreviewContainer };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { h as AnyNode, A as AccordionNode, a as AlertNode, j as AvatarNode, B as BadgeNode, r as BreadcrumbNode, s as ButtonNode, C as CardNode, w as CheckboxNode, x as ColNode, z as ComponentDefinitionNode, H as ComponentUseNode, I as ContainerComponentNode, J as ContainerNode, K as DataNode, L as DefinitionNode, N as DisplayNode, O as DividerComponentNode, P as DrawerNode, S as DropdownNode, T as FeedbackNode, V as FooterNode, W as GridNode, Z as HeaderNode, $ as IconNode, a2 as ImageNode, a3 as InputComponentNode, a4 as InputNode, aa as LayoutDefinitionNode, ab as LayoutNode, ac as LeafNode, ad as LinkNode, af as ListNode, ag as MainNode, aj as ModalNode, ao as NavNode, ap as NavigationNode, aq as NodeType, ar as OverlayNode, as as PageNode, at as PlaceholderNode, au as PopoverNode, ax as ProgressNode, ay as RadioNode, aA as RowNode, aB as SectionNode, aC as SelectNode, aF as SidebarNode, aH as SliderNode, aI as SlotNode, aM as SpinnerNode, aU as SwitchNode, aW as TableNode, aX as TabsNode, aZ as TextContentNode, a_ as TextNode, b2 as TextareaNode, b4 as TitleNode, b5 as ToastNode, b7 as TooltipNode, bc as WireframeDocument, aJ as SourceLocation, aQ as StateDeclaration, aR as StateGuard, a6 as InteractionEffect, a5 as InputType } from './types-BiDAgo6f.js';
2
- export { b as AlertVariant, c as AlignValue, d as AnchorPosition, e as AnnotationItemNode, f as AnnotationNode, g as AnnotationsNode, i as AppearanceProps, k as AvatarSize, l as AvatarSizeToken, m as BadgeSize, n as BadgeSizeToken, o as BadgeVariant, p as BaseNode, q as BreadcrumbItem, t as ButtonSize, u as ButtonSizeToken, v as ButtonVariant, y as CommonProps, D as ComponentInputValue, E as ComponentParameter, F as ComponentParameterType, G as ComponentSlotFill, M as DirectionValue, Q as DrawerPosition, R as DropdownItemNode, U as FlexProps, X as GridProps, Y as GuardedOutcomeProps, _ as HeightValue, a0 as IconSize, a1 as IconSizeToken, a7 as InteractionHandler, a8 as InteractiveProps, a9 as JustifyValue, ae as ListItemNode, ah as MarkerColor, ai as MarkerNode, ak as NavBlockItem, al as NavChild, am as NavGroupNode, an as NavItem, av as Position, aw as PositionProps, az as RelativeNode, aD as SelectOption, aE as ShadowValue, aG as SizeProps, aK as SpacingProps, aL as SpacingValue, aN as SpinnerSize, aO as SpinnerSizeToken, aP as StackNode, aS as StateValue, aT as StateValueType, aV as TabNode, aY as TextAlign, a$ as TextSize, b0 as TextSizeToken, b1 as TextWeight, b3 as TitleLevel, b6 as ToastPosition, b8 as TooltipPosition, b9 as TopLevelNode, ba as ValueWithUnit, bb as WidthValue } from './types-BiDAgo6f.js';
1
+ import { h as AnyNode, A as AccordionNode, a as AlertNode, j as AvatarNode, B as BadgeNode, r as BreadcrumbNode, s as ButtonNode, C as CardNode, w as CheckboxNode, x as ColNode, z as ComponentDefinitionNode, H as ComponentUseNode, I as ContainerComponentNode, J as ContainerNode, K as DataNode, L as DefinitionNode, N as DisplayNode, O as DividerComponentNode, P as DrawerNode, S as DropdownNode, T as FeedbackNode, V as FooterNode, W as GridNode, Z as HeaderNode, $ as IconNode, a2 as ImageNode, a3 as InputComponentNode, a4 as InputNode, aa as LayoutDefinitionNode, ab as LayoutNode, ac as LeafNode, ad as LinkNode, af as ListNode, ag as MainNode, aj as ModalNode, ao as NavNode, ap as NavigationNode, aq as NodeType, ar as OverlayNode, as as PageNode, at as PlaceholderNode, au as PopoverNode, ax as ProgressNode, ay as RadioNode, aB as RowNode, aC as SectionNode, aD as SelectNode, aG as SidebarNode, aI as SliderNode, aJ as SlotNode, aN as SpinnerNode, aV as SwitchNode, aX as TableNode, aY as TabsNode, a_ as TextContentNode, a$ as TextNode, b3 as TextareaNode, b5 as TitleNode, b6 as ToastNode, b8 as TooltipNode, bd as WireframeDocument, aK as SourceLocation, aR as StateDeclaration, aS as StateGuard, a6 as InteractionEffect, a5 as InputType } from './types-DfiCKOPE.js';
2
+ export { b as AlertVariant, c as AlignValue, d as AnchorPosition, e as AnnotationItemNode, f as AnnotationNode, g as AnnotationsNode, i as AppearanceProps, k as AvatarSize, l as AvatarSizeToken, m as BadgeSize, n as BadgeSizeToken, o as BadgeVariant, p as BaseNode, q as BreadcrumbItem, t as ButtonSize, u as ButtonSizeToken, v as ButtonVariant, y as CommonProps, D as ComponentInputValue, E as ComponentParameter, F as ComponentParameterType, G as ComponentSlotFill, M as DirectionValue, Q as DrawerPosition, R as DropdownItemNode, U as FlexProps, X as GridProps, Y as GuardedOutcomeProps, _ as HeightValue, a0 as IconSize, a1 as IconSizeToken, a7 as InteractionHandler, a8 as InteractiveProps, a9 as JustifyValue, ae as ListItemNode, ah as MarkerColor, ai as MarkerNode, ak as NavBlockItem, al as NavChild, am as NavGroupNode, an as NavItem, av as Position, aw as PositionProps, az as RelativeNode, aA as RepeatNode, aE as SelectOption, aF as ShadowValue, aH as SizeProps, aL as SpacingProps, aM as SpacingValue, aO as SpinnerSize, aP as SpinnerSizeToken, aQ as StackNode, aT as StateValue, aU as StateValueType, aW as TabNode, aZ as TextAlign, b0 as TextSize, b1 as TextSizeToken, b2 as TextWeight, b4 as TitleLevel, b7 as ToastPosition, b9 as TooltipPosition, ba as TopLevelNode, bb as ValueWithUnit, bc as WidthValue } from './types-DfiCKOPE.js';
3
3
  export { ExpectedToken, ParseError, ParseErrorInfo, ParseOptions, ParseResult, getErrors, isValid, parse, tryParse } from './parser.js';
4
4
  import { SiteOptions } from './renderer.js';
5
5
  export { AnnotationStyle, CanvasOptions, CanvasRenderResult, ENABLED_GUARD_ATTR, EXTERNAL_NAVIGATE_ATTR, HtmlRenderer, INERT_HREF, INTERACTIVE_ATTR_NAMES, IconData, IconElement, InteractiveAttrs, PageRenderResult, PlacedPage, RenderContext, RenderOptions, RenderResult, ShellMiss, SiteModel, SiteScreen, SiteShell, SvgRenderOptions, SvgRenderResult, TYPED_INTERACTION_ATTR, ThemeColors, ThemeConfig, VISIBLE_GUARD_ATTR, anchorIntent, buildSiteModel, createHtmlRenderer, darkTheme, defaultTheme, generateComponentStyles, generateStyles, getIconData, getTheme, guardedOutcomeAttrs, interactiveAttrs, layoutCanvas, lucideIcons, render, renderCanvas, renderIconSvg, renderPage, renderSite, renderToHtml, renderToSvg, renderUnknownIconSvg, resolvePageDimensions } from './renderer.js';
@@ -264,6 +264,135 @@ interface ComponentParameterReference {
264
264
  */
265
265
  declare function collectParameterReferences(children: readonly AnyNode[]): ComponentParameterReference[];
266
266
 
267
+ /**
268
+ * `repeat N { … }` expansion — folding syntax turned into the tree it denotes.
269
+ *
270
+ * ## Why this is a pass over the document, not a case in the renderer
271
+ *
272
+ * `repeat` has to disappear before anything *measures* the tree, not merely
273
+ * before something draws it. The renderer builds its anchor index up front:
274
+ * `HtmlRenderer.render` calls `buildAnchorPathMap(document)` before emitting a
275
+ * byte, and that map is keyed by **node object identity**. A `Repeat` expanded
276
+ * lazily inside `renderNode` would hand back copies the map has never seen, so
277
+ * every copy but the first would render without a `data-wf-path` and the anchor
278
+ * count would stop matching the index — the exact drift `anchor-path.ts` exists
279
+ * to prevent. Expanding the whole document first means the map, the markup, the
280
+ * DOM map and the UX rules all see one identical tree.
281
+ *
282
+ * It is equally deliberate that this is **not** in the parser. The AST keeps the
283
+ * `Repeat` node so the printer can write `repeat 6` back out; expanding at parse
284
+ * time would make `parse(print(parse(src)))` return six bodies where the source
285
+ * had one, breaking the round-trip law the corpus harness pins.
286
+ *
287
+ * ## Identity and source anchors
288
+ *
289
+ * Every copy is a fresh deep clone, never a shared reference — see above for why
290
+ * identity matters. Clones intentionally keep the `loc` of the body they came
291
+ * from: all six copies of `repeat 6 { … }` really do originate at one span of
292
+ * source, so pointing back at it is accurate, and it is the same thing component
293
+ * expansion already does. Uniqueness comes from position instead — anchor paths
294
+ * are child indices (`0.2.1`), so the copies land at distinct sibling indices
295
+ * automatically and no two share a path.
296
+ */
297
+
298
+ /**
299
+ * Total node budget for one expansion.
300
+ *
301
+ * Nesting multiplies — `repeat 100 { repeat 100 { … } }` is ten thousand bodies
302
+ * — so a per-`repeat` cap on `N` would not bound the result. The budget is
303
+ * therefore on the **expanded total**, which is the quantity that actually costs
304
+ * anything, and it is checked as the tree is built so a runaway document stops
305
+ * early instead of being materialised and then rejected.
306
+ *
307
+ * The number is the page-complexity ceiling `ux-rules` already applies
308
+ * (`MAX_PAGE_ELEMENTS`, 50) times ten. Tying it to that constant rather than
309
+ * inventing a figure keeps one notion of "too big for a wireframe" in the
310
+ * codebase; the multiplier is headroom, so that a document merely worth warning
311
+ * about still renders — `tooManyPageElements` reports at 50 and this refuses at
312
+ * 500, leaving an order of magnitude in which a document is complained about
313
+ * but still drawn, and only past that is it refused outright.
314
+ */
315
+ declare const REPEAT_EXPANSION_BUDGET = 500;
316
+ /** Thrown when an expansion would exceed {@link REPEAT_EXPANSION_BUDGET}. */
317
+ declare class RepeatBudgetError extends Error {
318
+ constructor(budget: number);
319
+ }
320
+ /**
321
+ * Replace every `repeat N { … }` in a document with `N` copies of its body.
322
+ *
323
+ * Idempotent by construction — the result contains no `Repeat` nodes, so a
324
+ * second application is a no-op. A document with no `repeat` is returned as-is,
325
+ * identity included, so the common case costs one traversal and no allocation.
326
+ *
327
+ * @param document - Parsed wireframe document
328
+ * @returns The document with all `repeat` nodes expanded
329
+ * @throws {RepeatBudgetError} when expansion exceeds {@link REPEAT_EXPANSION_BUDGET}
330
+ * @public
331
+ * @example
332
+ * `const drawable = expandRepeats(parse(source))`
333
+ */
334
+ declare function expandRepeats(document: WireframeDocument): WireframeDocument;
335
+
336
+ /**
337
+ * `page … variants=[a, b, c]` expansion — one page turned into the screens it denotes.
338
+ *
339
+ * ## What a variant is, and why it is not a state
340
+ *
341
+ * A wireframe usually has to show a screen in several conditions: loading,
342
+ * empty, populated, failed. The language already has `states` for that, and it
343
+ * is the wrong tool: a `state` is a runtime value the site runtime flips and
344
+ * `visibleWhen` guards read, so *something in the wireframe has to flip it*.
345
+ * That something is a control the product does not have — a reviewer opening
346
+ * the artifact sees state-switching buttons among the real UI and cannot tell
347
+ * which is which. It also produces one board, so the conditions are only
348
+ * visible one at a time, and any block common to two conditions is written
349
+ * twice because a guard has no disjunction.
350
+ *
351
+ * A variant moves the same information from a toggle inside the screen to an
352
+ * axis of the document: `variants=[loading, empty, ready]` draws the page three
353
+ * times, side by side, with no switching UI in any of them. The artifact
354
+ * becomes the sheet of state-by-state boards a reviewer reads top to bottom,
355
+ * and the common blocks are shared because they are one authored body.
356
+ *
357
+ * ## Why this is a document pass, like `repeat`
358
+ *
359
+ * For the reason spelled out at length in `expand-repeats.ts`: the renderer
360
+ * builds `buildAnchorPathMap(document)` up front and keys it by **node object
361
+ * identity**. Two variant boards sharing one child tree would be two boards the
362
+ * map has seen once, so the second would render without `data-wf-path` and the
363
+ * anchor count would stop matching the index. Every variant is therefore a
364
+ * fresh deep clone, and `loc` is deliberately shared: all three boards really do
365
+ * originate at one span of source.
366
+ *
367
+ * Doing it here rather than in each renderer is also what keeps the surfaces
368
+ * agreeing. `render`'s canvas counts pages and `renderSite` builds a screen
369
+ * model; if each expanded on its own, a variant would be a canvas board and a
370
+ * site screen by two separate rules that could drift. They both run this pass
371
+ * and then count what it produced.
372
+ *
373
+ * And, as with `repeat`, this is deliberately **not** in the parser: the AST
374
+ * keeps `variants` so the printer writes it back out, and expanding at parse
375
+ * time would break the `parse(print(parse(src)))` round-trip law the corpus
376
+ * harness pins.
377
+ */
378
+
379
+ /**
380
+ * Replace every page declaring `variants=` with one page per variant.
381
+ *
382
+ * Each produced page carries `variant` naming which one it is and no longer
383
+ * carries `variants`, so the result declares none and a second application is a
384
+ * no-op. A document with no variants is returned as-is, identity included, so
385
+ * the common case costs one scan and no allocation — the property every
386
+ * existing document relies on to render exactly as it did before.
387
+ *
388
+ * @param document - Parsed wireframe document
389
+ * @returns The document with all variant-bearing pages expanded
390
+ * @public
391
+ * @example
392
+ * `const drawable = expandVariants(parse(source))`
393
+ */
394
+ declare function expandVariants(document: WireframeDocument): WireframeDocument;
395
+
267
396
  /**
268
397
  * Node/document-level canonical `.wf` printing.
269
398
  *
@@ -1678,4 +1807,4 @@ declare function compileApp(document: AppDocument, options?: CompileAppOptions):
1678
1807
  */
1679
1808
  declare function linkAndCompileApp(manifest: AppManifest, modules: readonly AppModuleInput[], options?: CompileAppOptions): AppCompileResult;
1680
1809
 
1681
- export { ANCHOR_LOC_ATTR, ANCHOR_PATH_ATTR, type AccessibilityMetrics, AccordionNode, AlertNode, type AnalysisOptions, type AnalysisResult, type AnchorEntry, AnyNode, type AppCompileResult, type AppComponentInput, type AppComponentInstanceId, type AppDefinitionKind, type AppDocument, type AppLayoutInput, type AppLinkDiagnostic, type AppLinkDiagnosticCode, type AppLinkResult, type AppManifest, type AppManifestModule, type AppModuleInput, type AppNodeId, type AppNodeKind, type AppReferenceInput, type AppScreenInput, type AppSourceMapEntry, type AppSourceSpan, type AttributeChange, AvatarNode, BadgeNode, BreadcrumbNode, ButtonNode, CardNode, CheckboxNode, ColNode, type CompileAppOptions, type ComplexityMetrics, ComponentCategory, ComponentDefinitionNode, type ComponentParameterReference, type ComponentStats, ComponentUseNode, ContainerComponentNode, ContainerNode, type ContentAnalysis, DEFAULT_VIEWPORT, DEVICE_PRESETS, DataNode, DefinitionNode, type DiffChangeType, type DiffOptions, type DiffResult, type DiffSummary, DisplayNode, DividerComponentNode, type DomTreeNode, DrawerNode, DropdownNode, type ExportOptions, FeedbackNode, type FigmaAutoLayout, type FigmaColor, type FigmaCounterAxisAlign, type FigmaExportResult, type FigmaLayoutMode, type FigmaNode, type FigmaNodeType, type FigmaPrimaryAxisAlign, type FigmaSize, type FigmaSizingMode, type FigmaSolidFill, type FigmaStroke, type FigmaTextAlign, type FigmaTextStyle, FooterNode, GridNode, HeaderNode, IconNode, ImageNode, InputComponentNode, InputNode, InputType, type InteractionDiagnostic, type InteractionDiagnosticCode, InteractionEffect, type InteractionKind, type InteractionModel, type JsonExportResult, type JsonNode, type LayoutAnalysis, LayoutDefinitionNode, LayoutNode, LeafNode, LinkNode, ListNode, MainNode, ModalNode, NavNode, NavigationNode, type NodeChange, type NodePredicate, NodeType, type NormalizedInteraction, type NormalizedInteractionEffect, type NormalizedInteractionHandler, OverlayNode, PageNode, PlaceholderNode, PopoverNode, type PreviewWrapperOptions, ProgressNode, RadioNode, type ResolvedAppComponent, type ResolvedAppLayout, type ResolvedAppModule, type ResolvedAppReference, type ResolvedAppScreen, RowNode, type ScreenAction, type ScreenDisplay, type ScreenElement, type ScreenFields, type ScreenFieldsSummary, type ScreenInput, type ScreenTransitionGraph, SectionNode, SelectNode, SidebarNode, SiteOptions, SliderNode, SlotNode, SourceLocation, type SourceSlice, SpinnerNode, StateDeclaration, StateGuard, SwitchNode, TableNode, TabsNode, TextContentNode, TextNode, TextareaNode, TitleNode, ToastNode, TooltipNode, type TransitionEdge, type TransitionScreen, type TreeMetrics, type ValidationError, type ValidationOptions, type ValidationResult, type ViewportSize, type WalkCallback, WireframeDocument, analyze, areIdentical, buildAnchorIndex, buildDomTree, calculateViewportScale, cloneNode, collectInteractions, collectParameterReferences, compileApp, contains, countNodes, createAppComponentInstanceId, createAppNodeId, diff, documentDefinitions, documentPages, exportToFigma, exportToFigmaString, exportToJson, exportToJsonString, extractAllScreenFields, extractScreenFields, extractScreenTransitions, find, findAll, findByType, formatWireframeCode, getAncestors, getChangeSummary, getDevicePresets, getMaxDepth, getNodeSource, getNodeTypes, getPageSource, getValidationErrors, hasChildren, importFromJson, interactionSignature, isAccordionNode, isAlertNode, isAvatarNode, isBadgeNode, isBreadcrumbNode, isButtonNode, isCardNode, isCheckboxNode, isColNode, isComponentDefinitionNode, isComponentUseNode, isContainerComponentNode, isContainerNode, isDataNode, isDefinitionNode, isDisplayNode, isDividerNode, isDrawerNode, isDropdownNode, isFeedbackNode, isFooterNode, isGridNode, isHeaderNode, isIconNode, isImageNode, isInputComponentNode, isInputNode, isLayoutDefinitionNode, isLayoutNode, isLeafNode, isLinkNode, isListNode, isMainNode, isModalNode, isNavNode, isNavigationNode, isNodeType, isOverlayNode, isPageNode, isPlaceholderNode, isPopoverNode, isProgressNode, isRadioNode, isRowNode, isSectionNode, isSelectNode, isSidebarNode, isSliderNode, isSlotNode, isSpinnerNode, isSwitchNode, isTableNode, isTabsNode, isTextContentNode, isTextNode, isTextareaNode, isTitleNode, isToastNode, isTooltipNode, isUrlTarget, isValidAst, isValidDevicePreset, linkAndCompileApp, linkApp, mapNodes, normalizeInteractionHandlers, normalizeStateGuard, parameterReferenceName, parseViewportString, printWireframe, resetFigmaIdCounter, resolveAnchor, resolveViewport, validate, walk, walkDocument, wrapInPreviewContainer };
1810
+ export { ANCHOR_LOC_ATTR, ANCHOR_PATH_ATTR, type AccessibilityMetrics, AccordionNode, AlertNode, type AnalysisOptions, type AnalysisResult, type AnchorEntry, AnyNode, type AppCompileResult, type AppComponentInput, type AppComponentInstanceId, type AppDefinitionKind, type AppDocument, type AppLayoutInput, type AppLinkDiagnostic, type AppLinkDiagnosticCode, type AppLinkResult, type AppManifest, type AppManifestModule, type AppModuleInput, type AppNodeId, type AppNodeKind, type AppReferenceInput, type AppScreenInput, type AppSourceMapEntry, type AppSourceSpan, type AttributeChange, AvatarNode, BadgeNode, BreadcrumbNode, ButtonNode, CardNode, CheckboxNode, ColNode, type CompileAppOptions, type ComplexityMetrics, ComponentCategory, ComponentDefinitionNode, type ComponentParameterReference, type ComponentStats, ComponentUseNode, ContainerComponentNode, ContainerNode, type ContentAnalysis, DEFAULT_VIEWPORT, DEVICE_PRESETS, DataNode, DefinitionNode, type DiffChangeType, type DiffOptions, type DiffResult, type DiffSummary, DisplayNode, DividerComponentNode, type DomTreeNode, DrawerNode, DropdownNode, type ExportOptions, FeedbackNode, type FigmaAutoLayout, type FigmaColor, type FigmaCounterAxisAlign, type FigmaExportResult, type FigmaLayoutMode, type FigmaNode, type FigmaNodeType, type FigmaPrimaryAxisAlign, type FigmaSize, type FigmaSizingMode, type FigmaSolidFill, type FigmaStroke, type FigmaTextAlign, type FigmaTextStyle, FooterNode, GridNode, HeaderNode, IconNode, ImageNode, InputComponentNode, InputNode, InputType, type InteractionDiagnostic, type InteractionDiagnosticCode, InteractionEffect, type InteractionKind, type InteractionModel, type JsonExportResult, type JsonNode, type LayoutAnalysis, LayoutDefinitionNode, LayoutNode, LeafNode, LinkNode, ListNode, MainNode, ModalNode, NavNode, NavigationNode, type NodeChange, type NodePredicate, NodeType, type NormalizedInteraction, type NormalizedInteractionEffect, type NormalizedInteractionHandler, OverlayNode, PageNode, PlaceholderNode, PopoverNode, type PreviewWrapperOptions, ProgressNode, REPEAT_EXPANSION_BUDGET, RadioNode, RepeatBudgetError, type ResolvedAppComponent, type ResolvedAppLayout, type ResolvedAppModule, type ResolvedAppReference, type ResolvedAppScreen, RowNode, type ScreenAction, type ScreenDisplay, type ScreenElement, type ScreenFields, type ScreenFieldsSummary, type ScreenInput, type ScreenTransitionGraph, SectionNode, SelectNode, SidebarNode, SiteOptions, SliderNode, SlotNode, SourceLocation, type SourceSlice, SpinnerNode, StateDeclaration, StateGuard, SwitchNode, TableNode, TabsNode, TextContentNode, TextNode, TextareaNode, TitleNode, ToastNode, TooltipNode, type TransitionEdge, type TransitionScreen, type TreeMetrics, type ValidationError, type ValidationOptions, type ValidationResult, type ViewportSize, type WalkCallback, WireframeDocument, analyze, areIdentical, buildAnchorIndex, buildDomTree, calculateViewportScale, cloneNode, collectInteractions, collectParameterReferences, compileApp, contains, countNodes, createAppComponentInstanceId, createAppNodeId, diff, documentDefinitions, documentPages, expandRepeats, expandVariants, exportToFigma, exportToFigmaString, exportToJson, exportToJsonString, extractAllScreenFields, extractScreenFields, extractScreenTransitions, find, findAll, findByType, formatWireframeCode, getAncestors, getChangeSummary, getDevicePresets, getMaxDepth, getNodeSource, getNodeTypes, getPageSource, getValidationErrors, hasChildren, importFromJson, interactionSignature, isAccordionNode, isAlertNode, isAvatarNode, isBadgeNode, isBreadcrumbNode, isButtonNode, isCardNode, isCheckboxNode, isColNode, isComponentDefinitionNode, isComponentUseNode, isContainerComponentNode, isContainerNode, isDataNode, isDefinitionNode, isDisplayNode, isDividerNode, isDrawerNode, isDropdownNode, isFeedbackNode, isFooterNode, isGridNode, isHeaderNode, isIconNode, isImageNode, isInputComponentNode, isInputNode, isLayoutDefinitionNode, isLayoutNode, isLeafNode, isLinkNode, isListNode, isMainNode, isModalNode, isNavNode, isNavigationNode, isNodeType, isOverlayNode, isPageNode, isPlaceholderNode, isPopoverNode, isProgressNode, isRadioNode, isRowNode, isSectionNode, isSelectNode, isSidebarNode, isSliderNode, isSlotNode, isSpinnerNode, isSwitchNode, isTableNode, isTabsNode, isTextContentNode, isTextNode, isTextareaNode, isTitleNode, isToastNode, isTooltipNode, isUrlTarget, isValidAst, isValidDevicePreset, linkAndCompileApp, linkApp, mapNodes, normalizeInteractionHandlers, normalizeStateGuard, parameterReferenceName, parseViewportString, printWireframe, resetFigmaIdCounter, resolveAnchor, resolveViewport, validate, walk, walkDocument, wrapInPreviewContainer };