@wireweave/core 3.1.0-beta.0 → 3.1.0-beta.2

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,7 +1,7 @@
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 ContainerComponentNode, D as ContainerNode, E as DataNode, G as DisplayNode, H as DividerComponentNode, J as DrawerNode, M as DropdownNode, N as FeedbackNode, P as FooterNode, Q as GridNode, S as HeaderNode, U as IconNode, X as ImageNode, Y as InputComponentNode, Z as InputNode, a1 as LayoutNode, a2 as LeafNode, a3 as LinkNode, a5 as ListNode, a6 as MainNode, a9 as ModalNode, af as NavNode, ag as NavigationNode, ah as NodeType, ai as OverlayNode, aj as PageNode, ak as PlaceholderNode, al as PopoverNode, ao as ProgressNode, ap as RadioNode, ar as RowNode, as as SectionNode, at as SelectNode, aw as SidebarNode, ay as SliderNode, aC as SpinnerNode, aG as SwitchNode, aI as TableNode, aJ as TabsNode, aL as TextContentNode, aM as TextNode, aQ as TextareaNode, aS as TitleNode, aT as ToastNode, aV as TooltipNode, aZ as WireframeDocument, az as SourceLocation, _ as InputType } from './types-C1kQ4VAF.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, F as DirectionValue, I as DividerNode, K as DrawerPosition, L as DropdownItemNode, O as FlexProps, R as GridProps, T as HeightValue, V as IconSize, W as IconSizeToken, $ as InteractiveProps, a0 as JustifyValue, a4 as ListItemNode, a7 as MarkerColor, a8 as MarkerNode, aa as NavBlockItem, ab as NavChild, ac as NavDivider, ad as NavGroupNode, ae as NavItem, am as Position, an as PositionProps, aq as RelativeNode, au as SelectOption, av as ShadowValue, ax as SizeProps, aA as SpacingProps, aB as SpacingValue, aD as SpinnerSize, aE as SpinnerSizeToken, aF as StackNode, aH as TabNode, aK as TextAlign, aN as TextSize, aO as TextSizeToken, aP as TextWeight, aR as TitleLevel, aU as ToastPosition, aW as TooltipPosition, aX as ValueWithUnit, aY as WidthValue } from './types-C1kQ4VAF.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 ContainerComponentNode, D as ContainerNode, E as DataNode, H as DisplayNode, I as DividerComponentNode, K as DrawerNode, N as DropdownNode, O as FeedbackNode, Q as FooterNode, R as GridNode, T as HeaderNode, V as IconNode, Y as ImageNode, Z as InputComponentNode, _ as InputNode, a2 as LayoutDefinitionNode, a3 as LayoutNode, a4 as LeafNode, a5 as LinkNode, a7 as ListNode, a8 as MainNode, ab as ModalNode, ah as NavNode, ai as NavigationNode, aj as NodeType, ak as OverlayNode, al as PageNode, am as PlaceholderNode, an as PopoverNode, aq as ProgressNode, ar as RadioNode, at as RowNode, au as SectionNode, av as SelectNode, ay as SidebarNode, aA as SliderNode, aB as SlotNode, aF as SpinnerNode, aJ as SwitchNode, aL as TableNode, aM as TabsNode, aO as TextContentNode, aP as TextNode, aT as TextareaNode, aV as TitleNode, aW as ToastNode, aY as TooltipNode, b1 as WireframeDocument, F as DefinitionNode, aC as SourceLocation, $ as InputType } from './types-BDaNyWMR.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, G as DirectionValue, J as DividerNode, L as DrawerPosition, M as DropdownItemNode, P as FlexProps, S as GridProps, U as HeightValue, W as IconSize, X as IconSizeToken, a0 as InteractiveProps, a1 as JustifyValue, a6 as ListItemNode, a9 as MarkerColor, aa as MarkerNode, ac as NavBlockItem, ad as NavChild, ae as NavDivider, af as NavGroupNode, ag as NavItem, ao as Position, ap as PositionProps, as as RelativeNode, aw as SelectOption, ax as ShadowValue, az as SizeProps, aD as SpacingProps, aE as SpacingValue, aG as SpinnerSize, aH as SpinnerSizeToken, aI as StackNode, aK as TabNode, aN as TextAlign, aQ as TextSize, aR as TextSizeToken, aS as TextWeight, aU as TitleLevel, aX as ToastPosition, aZ as TooltipPosition, a_ as TopLevelNode, a$ as ValueWithUnit, b0 as WidthValue } from './types-BDaNyWMR.cjs';
3
3
  export { ExpectedToken, ParseError, ParseErrorInfo, ParseOptions, ParseResult, getErrors, isValid, parse, tryParse } from './parser.cjs';
4
- export { CanvasOptions, CanvasRenderResult, HtmlRenderer, IconData, IconElement, PageRenderResult, PlacedPage, RenderContext, RenderOptions, RenderResult, SvgRenderOptions, SvgRenderResult, ThemeColors, ThemeConfig, createHtmlRenderer, darkTheme, defaultTheme, generateComponentStyles, generateStyles, getIconData, getTheme, layoutCanvas, lucideIcons, render, renderCanvas, renderIconSvg, renderPage, renderToHtml, renderToSvg, resolvePageDimensions } from './renderer.cjs';
4
+ export { CanvasOptions, CanvasRenderResult, HtmlRenderer, IconData, IconElement, PageRenderResult, PlacedPage, RenderContext, RenderOptions, RenderResult, ShellMiss, SiteModel, SiteOptions, SiteScreen, SiteShell, SvgRenderOptions, SvgRenderResult, ThemeColors, ThemeConfig, buildSiteModel, createHtmlRenderer, darkTheme, defaultTheme, generateComponentStyles, generateStyles, getIconData, getTheme, layoutCanvas, lucideIcons, render, renderCanvas, renderIconSvg, renderPage, renderSite, renderToHtml, renderToSvg, renderUnknownIconSvg, resolvePageDimensions } from './renderer.cjs';
5
5
 
6
6
  /**
7
7
  * Type guards for wireweave AST
@@ -16,6 +16,8 @@ declare function hasChildren(node: AnyNode): node is AnyNode & {
16
16
  declare function isLeafNode(node: AnyNode): node is LeafNode;
17
17
  declare function isLayoutNode(node: AnyNode): node is LayoutNode;
18
18
  declare function isPageNode(node: AnyNode): node is PageNode;
19
+ declare function isLayoutDefinitionNode(node: AnyNode): node is LayoutDefinitionNode;
20
+ declare function isSlotNode(node: AnyNode): node is SlotNode;
19
21
  declare function isHeaderNode(node: AnyNode): node is HeaderNode;
20
22
  declare function isMainNode(node: AnyNode): node is MainNode;
21
23
  declare function isFooterNode(node: AnyNode): node is FooterNode;
@@ -99,6 +101,16 @@ declare function walk(node: AnyNode, callback: WalkCallback, parent?: AnyNode, d
99
101
  * @param callback - Function called for each node
100
102
  */
101
103
  declare function walkDocument(document: WireframeDocument, callback: WalkCallback): void;
104
+ /**
105
+ * Return only the document's pages, in source order.
106
+ *
107
+ * Layout definitions share the document's top-level list with pages but are
108
+ * not screens. Page-indexed consumers must use this helper so a definition
109
+ * never becomes an accidental page.
110
+ */
111
+ declare function documentPages(document: WireframeDocument): PageNode[];
112
+ /** Return the document's named layout definitions, in source order. */
113
+ declare function documentDefinitions(document: WireframeDocument): DefinitionNode[];
102
114
  /**
103
115
  * Find the first node matching a predicate
104
116
  *
@@ -1311,4 +1323,4 @@ declare function getNodeSource(source: string, doc: WireframeDocument, path: str
1311
1323
  */
1312
1324
  declare function buildDomTree(doc: WireframeDocument, pageIndexBase?: number): DomTreeNode[];
1313
1325
 
1314
- export { ANCHOR_LOC_ATTR, ANCHOR_PATH_ATTR, ATTRIBUTE_MAP, ATTRIBUTE_SPECS, type AccessibilityMetrics, AccordionNode, AlertNode, type AnalysisOptions, type AnalysisResult, type AnchorEntry, AnyNode, type AttributeChange, type AttributeSpec, type AttributeValueType, AvatarNode, BadgeNode, BreadcrumbNode, ButtonNode, COMMON_ATTRIBUTES, COMPONENT_MAP, COMPONENT_SPECS, CardNode, CheckboxNode, ColNode, type ComplexityMetrics, type ComponentCategory, type ComponentSpec, type ComponentStats, ContainerComponentNode, ContainerNode, type ContentAnalysis, DEFAULT_VIEWPORT, DEVICE_PRESETS, DataNode, 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 InteractionKind, type JsonExportResult, type JsonNode, type LayoutAnalysis, LayoutNode, LeafNode, LinkNode, ListNode, MainNode, ModalNode, NODE_TYPE_MAP, NavNode, NavigationNode, type NodeChange, type NodePredicate, NodeType, OverlayNode, PageNode, PlaceholderNode, PopoverNode, type PreviewWrapperOptions, ProgressNode, RadioNode, RowNode, type ScreenAction, type ScreenDisplay, type ScreenElement, type ScreenFields, type ScreenFieldsSummary, type ScreenInput, type ScreenTransitionGraph, SectionNode, SelectNode, SidebarNode, SliderNode, SourceLocation, type SourceSlice, SpinnerNode, SwitchNode, TableNode, TabsNode, TextContentNode, TextNode, TextareaNode, TitleNode, ToastNode, TooltipNode, type TransitionEdge, type TransitionScreen, type TreeMetrics, VALID_ATTRIBUTE_NAMES, VALID_COMPONENT_NAMES, type ValidationError, type ValidationOptions, type ValidationResult, type ViewportSize, type WalkCallback, WireframeDocument, analyze, areIdentical, buildAnchorIndex, buildDomTree, calculateViewportScale, cloneNode, contains, countNodes, diff, exportToFigma, exportToFigmaString, exportToJson, exportToJsonString, extractAllScreenFields, extractScreenFields, extractScreenTransitions, find, findAll, findByType, formatWireframeCode, getAncestors, getChangeSummary, getDevicePresets, getMaxDepth, getNodeSource, getNodeTypes, getPageSource, getValidAttributes, getValidationErrors, hasChildren, importFromJson, isAccordionNode, isAlertNode, isAvatarNode, isBadgeNode, isBreadcrumbNode, isButtonNode, isCardNode, isCheckboxNode, isColNode, isContainerComponentNode, isContainerNode, isDataNode, isDisplayNode, isDividerNode, isDrawerNode, isDropdownNode, isFeedbackNode, isFooterNode, isGridNode, isHeaderNode, isIconNode, isImageNode, isInputComponentNode, isInputNode, isLayoutNode, isLeafNode, isLinkNode, isListNode, isMainNode, isModalNode, isNavNode, isNavigationNode, isNodeType, isOverlayNode, isPageNode, isPlaceholderNode, isPopoverNode, isProgressNode, isRadioNode, isRowNode, isSectionNode, isSelectNode, isSidebarNode, isSliderNode, isSpinnerNode, isSwitchNode, isTableNode, isTabsNode, isTextContentNode, isTextNode, isTextareaNode, isTitleNode, isToastNode, isTooltipNode, isValidAst, isValidAttribute, isValidDevicePreset, mapNodes, parseViewportString, printWireframe, resetFigmaIdCounter, resolveAnchor, resolveViewport, validate, walk, walkDocument, wrapInPreviewContainer };
1326
+ export { ANCHOR_LOC_ATTR, ANCHOR_PATH_ATTR, ATTRIBUTE_MAP, ATTRIBUTE_SPECS, type AccessibilityMetrics, AccordionNode, AlertNode, type AnalysisOptions, type AnalysisResult, type AnchorEntry, AnyNode, type AttributeChange, type AttributeSpec, type AttributeValueType, AvatarNode, BadgeNode, BreadcrumbNode, ButtonNode, COMMON_ATTRIBUTES, COMPONENT_MAP, COMPONENT_SPECS, CardNode, CheckboxNode, ColNode, type ComplexityMetrics, type ComponentCategory, type ComponentSpec, type ComponentStats, 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 InteractionKind, type JsonExportResult, type JsonNode, type LayoutAnalysis, LayoutDefinitionNode, LayoutNode, LeafNode, LinkNode, ListNode, MainNode, ModalNode, NODE_TYPE_MAP, NavNode, NavigationNode, type NodeChange, type NodePredicate, NodeType, OverlayNode, PageNode, PlaceholderNode, PopoverNode, type PreviewWrapperOptions, ProgressNode, RadioNode, RowNode, type ScreenAction, type ScreenDisplay, type ScreenElement, type ScreenFields, type ScreenFieldsSummary, type ScreenInput, type ScreenTransitionGraph, SectionNode, SelectNode, SidebarNode, SliderNode, SlotNode, SourceLocation, type SourceSlice, SpinnerNode, SwitchNode, TableNode, TabsNode, TextContentNode, TextNode, TextareaNode, TitleNode, ToastNode, TooltipNode, type TransitionEdge, type TransitionScreen, type TreeMetrics, VALID_ATTRIBUTE_NAMES, VALID_COMPONENT_NAMES, type ValidationError, type ValidationOptions, type ValidationResult, type ViewportSize, type WalkCallback, WireframeDocument, analyze, areIdentical, buildAnchorIndex, buildDomTree, calculateViewportScale, cloneNode, contains, countNodes, diff, documentDefinitions, documentPages, exportToFigma, exportToFigmaString, exportToJson, exportToJsonString, extractAllScreenFields, extractScreenFields, extractScreenTransitions, find, findAll, findByType, formatWireframeCode, getAncestors, getChangeSummary, getDevicePresets, getMaxDepth, getNodeSource, getNodeTypes, getPageSource, getValidAttributes, getValidationErrors, hasChildren, importFromJson, isAccordionNode, isAlertNode, isAvatarNode, isBadgeNode, isBreadcrumbNode, isButtonNode, isCardNode, isCheckboxNode, isColNode, isContainerComponentNode, isContainerNode, isDataNode, 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, isValidAst, isValidAttribute, isValidDevicePreset, mapNodes, parseViewportString, printWireframe, resetFigmaIdCounter, resolveAnchor, resolveViewport, validate, walk, walkDocument, wrapInPreviewContainer };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
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 ContainerComponentNode, D as ContainerNode, E as DataNode, G as DisplayNode, H as DividerComponentNode, J as DrawerNode, M as DropdownNode, N as FeedbackNode, P as FooterNode, Q as GridNode, S as HeaderNode, U as IconNode, X as ImageNode, Y as InputComponentNode, Z as InputNode, a1 as LayoutNode, a2 as LeafNode, a3 as LinkNode, a5 as ListNode, a6 as MainNode, a9 as ModalNode, af as NavNode, ag as NavigationNode, ah as NodeType, ai as OverlayNode, aj as PageNode, ak as PlaceholderNode, al as PopoverNode, ao as ProgressNode, ap as RadioNode, ar as RowNode, as as SectionNode, at as SelectNode, aw as SidebarNode, ay as SliderNode, aC as SpinnerNode, aG as SwitchNode, aI as TableNode, aJ as TabsNode, aL as TextContentNode, aM as TextNode, aQ as TextareaNode, aS as TitleNode, aT as ToastNode, aV as TooltipNode, aZ as WireframeDocument, az as SourceLocation, _ as InputType } from './types-C1kQ4VAF.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, F as DirectionValue, I as DividerNode, K as DrawerPosition, L as DropdownItemNode, O as FlexProps, R as GridProps, T as HeightValue, V as IconSize, W as IconSizeToken, $ as InteractiveProps, a0 as JustifyValue, a4 as ListItemNode, a7 as MarkerColor, a8 as MarkerNode, aa as NavBlockItem, ab as NavChild, ac as NavDivider, ad as NavGroupNode, ae as NavItem, am as Position, an as PositionProps, aq as RelativeNode, au as SelectOption, av as ShadowValue, ax as SizeProps, aA as SpacingProps, aB as SpacingValue, aD as SpinnerSize, aE as SpinnerSizeToken, aF as StackNode, aH as TabNode, aK as TextAlign, aN as TextSize, aO as TextSizeToken, aP as TextWeight, aR as TitleLevel, aU as ToastPosition, aW as TooltipPosition, aX as ValueWithUnit, aY as WidthValue } from './types-C1kQ4VAF.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 ContainerComponentNode, D as ContainerNode, E as DataNode, H as DisplayNode, I as DividerComponentNode, K as DrawerNode, N as DropdownNode, O as FeedbackNode, Q as FooterNode, R as GridNode, T as HeaderNode, V as IconNode, Y as ImageNode, Z as InputComponentNode, _ as InputNode, a2 as LayoutDefinitionNode, a3 as LayoutNode, a4 as LeafNode, a5 as LinkNode, a7 as ListNode, a8 as MainNode, ab as ModalNode, ah as NavNode, ai as NavigationNode, aj as NodeType, ak as OverlayNode, al as PageNode, am as PlaceholderNode, an as PopoverNode, aq as ProgressNode, ar as RadioNode, at as RowNode, au as SectionNode, av as SelectNode, ay as SidebarNode, aA as SliderNode, aB as SlotNode, aF as SpinnerNode, aJ as SwitchNode, aL as TableNode, aM as TabsNode, aO as TextContentNode, aP as TextNode, aT as TextareaNode, aV as TitleNode, aW as ToastNode, aY as TooltipNode, b1 as WireframeDocument, F as DefinitionNode, aC as SourceLocation, $ as InputType } from './types-BDaNyWMR.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, G as DirectionValue, J as DividerNode, L as DrawerPosition, M as DropdownItemNode, P as FlexProps, S as GridProps, U as HeightValue, W as IconSize, X as IconSizeToken, a0 as InteractiveProps, a1 as JustifyValue, a6 as ListItemNode, a9 as MarkerColor, aa as MarkerNode, ac as NavBlockItem, ad as NavChild, ae as NavDivider, af as NavGroupNode, ag as NavItem, ao as Position, ap as PositionProps, as as RelativeNode, aw as SelectOption, ax as ShadowValue, az as SizeProps, aD as SpacingProps, aE as SpacingValue, aG as SpinnerSize, aH as SpinnerSizeToken, aI as StackNode, aK as TabNode, aN as TextAlign, aQ as TextSize, aR as TextSizeToken, aS as TextWeight, aU as TitleLevel, aX as ToastPosition, aZ as TooltipPosition, a_ as TopLevelNode, a$ as ValueWithUnit, b0 as WidthValue } from './types-BDaNyWMR.js';
3
3
  export { ExpectedToken, ParseError, ParseErrorInfo, ParseOptions, ParseResult, getErrors, isValid, parse, tryParse } from './parser.js';
4
- export { CanvasOptions, CanvasRenderResult, HtmlRenderer, IconData, IconElement, PageRenderResult, PlacedPage, RenderContext, RenderOptions, RenderResult, SvgRenderOptions, SvgRenderResult, ThemeColors, ThemeConfig, createHtmlRenderer, darkTheme, defaultTheme, generateComponentStyles, generateStyles, getIconData, getTheme, layoutCanvas, lucideIcons, render, renderCanvas, renderIconSvg, renderPage, renderToHtml, renderToSvg, resolvePageDimensions } from './renderer.js';
4
+ export { CanvasOptions, CanvasRenderResult, HtmlRenderer, IconData, IconElement, PageRenderResult, PlacedPage, RenderContext, RenderOptions, RenderResult, ShellMiss, SiteModel, SiteOptions, SiteScreen, SiteShell, SvgRenderOptions, SvgRenderResult, ThemeColors, ThemeConfig, buildSiteModel, createHtmlRenderer, darkTheme, defaultTheme, generateComponentStyles, generateStyles, getIconData, getTheme, layoutCanvas, lucideIcons, render, renderCanvas, renderIconSvg, renderPage, renderSite, renderToHtml, renderToSvg, renderUnknownIconSvg, resolvePageDimensions } from './renderer.js';
5
5
 
6
6
  /**
7
7
  * Type guards for wireweave AST
@@ -16,6 +16,8 @@ declare function hasChildren(node: AnyNode): node is AnyNode & {
16
16
  declare function isLeafNode(node: AnyNode): node is LeafNode;
17
17
  declare function isLayoutNode(node: AnyNode): node is LayoutNode;
18
18
  declare function isPageNode(node: AnyNode): node is PageNode;
19
+ declare function isLayoutDefinitionNode(node: AnyNode): node is LayoutDefinitionNode;
20
+ declare function isSlotNode(node: AnyNode): node is SlotNode;
19
21
  declare function isHeaderNode(node: AnyNode): node is HeaderNode;
20
22
  declare function isMainNode(node: AnyNode): node is MainNode;
21
23
  declare function isFooterNode(node: AnyNode): node is FooterNode;
@@ -99,6 +101,16 @@ declare function walk(node: AnyNode, callback: WalkCallback, parent?: AnyNode, d
99
101
  * @param callback - Function called for each node
100
102
  */
101
103
  declare function walkDocument(document: WireframeDocument, callback: WalkCallback): void;
104
+ /**
105
+ * Return only the document's pages, in source order.
106
+ *
107
+ * Layout definitions share the document's top-level list with pages but are
108
+ * not screens. Page-indexed consumers must use this helper so a definition
109
+ * never becomes an accidental page.
110
+ */
111
+ declare function documentPages(document: WireframeDocument): PageNode[];
112
+ /** Return the document's named layout definitions, in source order. */
113
+ declare function documentDefinitions(document: WireframeDocument): DefinitionNode[];
102
114
  /**
103
115
  * Find the first node matching a predicate
104
116
  *
@@ -1311,4 +1323,4 @@ declare function getNodeSource(source: string, doc: WireframeDocument, path: str
1311
1323
  */
1312
1324
  declare function buildDomTree(doc: WireframeDocument, pageIndexBase?: number): DomTreeNode[];
1313
1325
 
1314
- export { ANCHOR_LOC_ATTR, ANCHOR_PATH_ATTR, ATTRIBUTE_MAP, ATTRIBUTE_SPECS, type AccessibilityMetrics, AccordionNode, AlertNode, type AnalysisOptions, type AnalysisResult, type AnchorEntry, AnyNode, type AttributeChange, type AttributeSpec, type AttributeValueType, AvatarNode, BadgeNode, BreadcrumbNode, ButtonNode, COMMON_ATTRIBUTES, COMPONENT_MAP, COMPONENT_SPECS, CardNode, CheckboxNode, ColNode, type ComplexityMetrics, type ComponentCategory, type ComponentSpec, type ComponentStats, ContainerComponentNode, ContainerNode, type ContentAnalysis, DEFAULT_VIEWPORT, DEVICE_PRESETS, DataNode, 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 InteractionKind, type JsonExportResult, type JsonNode, type LayoutAnalysis, LayoutNode, LeafNode, LinkNode, ListNode, MainNode, ModalNode, NODE_TYPE_MAP, NavNode, NavigationNode, type NodeChange, type NodePredicate, NodeType, OverlayNode, PageNode, PlaceholderNode, PopoverNode, type PreviewWrapperOptions, ProgressNode, RadioNode, RowNode, type ScreenAction, type ScreenDisplay, type ScreenElement, type ScreenFields, type ScreenFieldsSummary, type ScreenInput, type ScreenTransitionGraph, SectionNode, SelectNode, SidebarNode, SliderNode, SourceLocation, type SourceSlice, SpinnerNode, SwitchNode, TableNode, TabsNode, TextContentNode, TextNode, TextareaNode, TitleNode, ToastNode, TooltipNode, type TransitionEdge, type TransitionScreen, type TreeMetrics, VALID_ATTRIBUTE_NAMES, VALID_COMPONENT_NAMES, type ValidationError, type ValidationOptions, type ValidationResult, type ViewportSize, type WalkCallback, WireframeDocument, analyze, areIdentical, buildAnchorIndex, buildDomTree, calculateViewportScale, cloneNode, contains, countNodes, diff, exportToFigma, exportToFigmaString, exportToJson, exportToJsonString, extractAllScreenFields, extractScreenFields, extractScreenTransitions, find, findAll, findByType, formatWireframeCode, getAncestors, getChangeSummary, getDevicePresets, getMaxDepth, getNodeSource, getNodeTypes, getPageSource, getValidAttributes, getValidationErrors, hasChildren, importFromJson, isAccordionNode, isAlertNode, isAvatarNode, isBadgeNode, isBreadcrumbNode, isButtonNode, isCardNode, isCheckboxNode, isColNode, isContainerComponentNode, isContainerNode, isDataNode, isDisplayNode, isDividerNode, isDrawerNode, isDropdownNode, isFeedbackNode, isFooterNode, isGridNode, isHeaderNode, isIconNode, isImageNode, isInputComponentNode, isInputNode, isLayoutNode, isLeafNode, isLinkNode, isListNode, isMainNode, isModalNode, isNavNode, isNavigationNode, isNodeType, isOverlayNode, isPageNode, isPlaceholderNode, isPopoverNode, isProgressNode, isRadioNode, isRowNode, isSectionNode, isSelectNode, isSidebarNode, isSliderNode, isSpinnerNode, isSwitchNode, isTableNode, isTabsNode, isTextContentNode, isTextNode, isTextareaNode, isTitleNode, isToastNode, isTooltipNode, isValidAst, isValidAttribute, isValidDevicePreset, mapNodes, parseViewportString, printWireframe, resetFigmaIdCounter, resolveAnchor, resolveViewport, validate, walk, walkDocument, wrapInPreviewContainer };
1326
+ export { ANCHOR_LOC_ATTR, ANCHOR_PATH_ATTR, ATTRIBUTE_MAP, ATTRIBUTE_SPECS, type AccessibilityMetrics, AccordionNode, AlertNode, type AnalysisOptions, type AnalysisResult, type AnchorEntry, AnyNode, type AttributeChange, type AttributeSpec, type AttributeValueType, AvatarNode, BadgeNode, BreadcrumbNode, ButtonNode, COMMON_ATTRIBUTES, COMPONENT_MAP, COMPONENT_SPECS, CardNode, CheckboxNode, ColNode, type ComplexityMetrics, type ComponentCategory, type ComponentSpec, type ComponentStats, 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 InteractionKind, type JsonExportResult, type JsonNode, type LayoutAnalysis, LayoutDefinitionNode, LayoutNode, LeafNode, LinkNode, ListNode, MainNode, ModalNode, NODE_TYPE_MAP, NavNode, NavigationNode, type NodeChange, type NodePredicate, NodeType, OverlayNode, PageNode, PlaceholderNode, PopoverNode, type PreviewWrapperOptions, ProgressNode, RadioNode, RowNode, type ScreenAction, type ScreenDisplay, type ScreenElement, type ScreenFields, type ScreenFieldsSummary, type ScreenInput, type ScreenTransitionGraph, SectionNode, SelectNode, SidebarNode, SliderNode, SlotNode, SourceLocation, type SourceSlice, SpinnerNode, SwitchNode, TableNode, TabsNode, TextContentNode, TextNode, TextareaNode, TitleNode, ToastNode, TooltipNode, type TransitionEdge, type TransitionScreen, type TreeMetrics, VALID_ATTRIBUTE_NAMES, VALID_COMPONENT_NAMES, type ValidationError, type ValidationOptions, type ValidationResult, type ViewportSize, type WalkCallback, WireframeDocument, analyze, areIdentical, buildAnchorIndex, buildDomTree, calculateViewportScale, cloneNode, contains, countNodes, diff, documentDefinitions, documentPages, exportToFigma, exportToFigmaString, exportToJson, exportToJsonString, extractAllScreenFields, extractScreenFields, extractScreenTransitions, find, findAll, findByType, formatWireframeCode, getAncestors, getChangeSummary, getDevicePresets, getMaxDepth, getNodeSource, getNodeTypes, getPageSource, getValidAttributes, getValidationErrors, hasChildren, importFromJson, isAccordionNode, isAlertNode, isAvatarNode, isBadgeNode, isBreadcrumbNode, isButtonNode, isCardNode, isCheckboxNode, isColNode, isContainerComponentNode, isContainerNode, isDataNode, 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, isValidAst, isValidAttribute, isValidDevicePreset, mapNodes, parseViewportString, printWireframe, resetFigmaIdCounter, resolveAnchor, resolveViewport, validate, walk, walkDocument, wrapInPreviewContainer };