@wireweave/core 3.1.0-beta.1 → 3.1.0-beta.3

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-BDbXDhTp.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-BDbXDhTp.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, renderUnknownIconSvg, resolvePageDimensions } from './renderer.cjs';
4
+ export { CanvasOptions, CanvasRenderResult, HtmlRenderer, IconData, IconElement, InteractiveAttrs, PageRenderResult, PlacedPage, RenderContext, RenderOptions, RenderResult, ShellMiss, SiteModel, SiteOptions, SiteScreen, SiteShell, SvgRenderOptions, SvgRenderResult, ThemeColors, ThemeConfig, anchorIntent, 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
  *
@@ -1134,12 +1146,19 @@ interface TransitionEdge {
1134
1146
  };
1135
1147
  /**
1136
1148
  * Whether `target` resolved to a concrete destination for its kind:
1137
- * - `navigate`: a page whose title matches `target`.
1149
+ * - `navigate`: a page whose title matches `target`, or a URL-shaped external
1150
+ * destination outside this document.
1138
1151
  * - `opens` / `toggles`: a `Modal` / `Drawer` with `id === target` in the
1139
1152
  * source page.
1140
1153
  * - `action`: always `false` (an opaque handler id has no structural target).
1141
1154
  */
1142
1155
  resolved: boolean;
1156
+ /**
1157
+ * Present, and always `true`, when a `navigate` target is a URL rather than a
1158
+ * page name. External edges are resolved destinations outside this document,
1159
+ * so `to` remains `null` and they never appear in `dangling`.
1160
+ */
1161
+ external?: true;
1143
1162
  }
1144
1163
  /**
1145
1164
  * The screen-transition graph derived from a whole document.
@@ -1148,11 +1167,14 @@ interface ScreenTransitionGraph {
1148
1167
  screens: TransitionScreen[];
1149
1168
  edges: TransitionEdge[];
1150
1169
  /**
1151
- * The subset of `navigate` edges whose target matched no page title
1152
- * (`resolved === false`, `to === null`). Intra-page `opens` / `toggles` and
1153
- * opaque `action` edges are not page transitions and never appear here.
1170
+ * The subset of `navigate` edges whose target matched no page title and was
1171
+ * not URL-shaped (`resolved === false`, `to === null`). Intra-page
1172
+ * `opens` / `toggles`, opaque `action` edges, and external URLs never appear
1173
+ * here.
1154
1174
  */
1155
1175
  dangling: TransitionEdge[];
1176
+ /** URL-shaped `navigate` edges that leave the current document. */
1177
+ external: TransitionEdge[];
1156
1178
  }
1157
1179
 
1158
1180
  /**
@@ -1199,10 +1221,10 @@ declare function extractAllScreenFields(doc: WireframeDocument): ScreenFields[];
1199
1221
  *
1200
1222
  * - **`navigate`** is a page transition. Its target resolves to a page when the
1201
1223
  * target string, trimmed, exactly matches a page `title` (case-sensitive). On
1202
- * duplicate titles the first page in document order wins. URL-style targets
1203
- * (`navigate="/dashboard"`) do not match a title and are reported as
1204
- * {@link ScreenTransitionGraph.dangling | dangling}. This mirrors the DSL,
1205
- * where `navigate` is documented as a "URL or page" target.
1224
+ * duplicate titles the first page in document order wins. When no title
1225
+ * matches, URL-shaped targets (`navigate="/dashboard"`, `https://…`) are
1226
+ * reported as {@link ScreenTransitionGraph.external | external}; unmatched
1227
+ * plain names remain {@link ScreenTransitionGraph.dangling | dangling}.
1206
1228
  * - **`opens` / `toggles`** target an overlay *within the source page*, not
1207
1229
  * another page, so their `to` is always `null`. They resolve when a `Modal`
1208
1230
  * or `Drawer` in the same page has `id === target` (the only nodes that carry
@@ -1311,4 +1333,4 @@ declare function getNodeSource(source: string, doc: WireframeDocument, path: str
1311
1333
  */
1312
1334
  declare function buildDomTree(doc: WireframeDocument, pageIndexBase?: number): DomTreeNode[];
1313
1335
 
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 };
1336
+ 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-BDbXDhTp.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-BDbXDhTp.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, renderUnknownIconSvg, resolvePageDimensions } from './renderer.js';
4
+ export { CanvasOptions, CanvasRenderResult, HtmlRenderer, IconData, IconElement, InteractiveAttrs, PageRenderResult, PlacedPage, RenderContext, RenderOptions, RenderResult, ShellMiss, SiteModel, SiteOptions, SiteScreen, SiteShell, SvgRenderOptions, SvgRenderResult, ThemeColors, ThemeConfig, anchorIntent, 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
  *
@@ -1134,12 +1146,19 @@ interface TransitionEdge {
1134
1146
  };
1135
1147
  /**
1136
1148
  * Whether `target` resolved to a concrete destination for its kind:
1137
- * - `navigate`: a page whose title matches `target`.
1149
+ * - `navigate`: a page whose title matches `target`, or a URL-shaped external
1150
+ * destination outside this document.
1138
1151
  * - `opens` / `toggles`: a `Modal` / `Drawer` with `id === target` in the
1139
1152
  * source page.
1140
1153
  * - `action`: always `false` (an opaque handler id has no structural target).
1141
1154
  */
1142
1155
  resolved: boolean;
1156
+ /**
1157
+ * Present, and always `true`, when a `navigate` target is a URL rather than a
1158
+ * page name. External edges are resolved destinations outside this document,
1159
+ * so `to` remains `null` and they never appear in `dangling`.
1160
+ */
1161
+ external?: true;
1143
1162
  }
1144
1163
  /**
1145
1164
  * The screen-transition graph derived from a whole document.
@@ -1148,11 +1167,14 @@ interface ScreenTransitionGraph {
1148
1167
  screens: TransitionScreen[];
1149
1168
  edges: TransitionEdge[];
1150
1169
  /**
1151
- * The subset of `navigate` edges whose target matched no page title
1152
- * (`resolved === false`, `to === null`). Intra-page `opens` / `toggles` and
1153
- * opaque `action` edges are not page transitions and never appear here.
1170
+ * The subset of `navigate` edges whose target matched no page title and was
1171
+ * not URL-shaped (`resolved === false`, `to === null`). Intra-page
1172
+ * `opens` / `toggles`, opaque `action` edges, and external URLs never appear
1173
+ * here.
1154
1174
  */
1155
1175
  dangling: TransitionEdge[];
1176
+ /** URL-shaped `navigate` edges that leave the current document. */
1177
+ external: TransitionEdge[];
1156
1178
  }
1157
1179
 
1158
1180
  /**
@@ -1199,10 +1221,10 @@ declare function extractAllScreenFields(doc: WireframeDocument): ScreenFields[];
1199
1221
  *
1200
1222
  * - **`navigate`** is a page transition. Its target resolves to a page when the
1201
1223
  * target string, trimmed, exactly matches a page `title` (case-sensitive). On
1202
- * duplicate titles the first page in document order wins. URL-style targets
1203
- * (`navigate="/dashboard"`) do not match a title and are reported as
1204
- * {@link ScreenTransitionGraph.dangling | dangling}. This mirrors the DSL,
1205
- * where `navigate` is documented as a "URL or page" target.
1224
+ * duplicate titles the first page in document order wins. When no title
1225
+ * matches, URL-shaped targets (`navigate="/dashboard"`, `https://…`) are
1226
+ * reported as {@link ScreenTransitionGraph.external | external}; unmatched
1227
+ * plain names remain {@link ScreenTransitionGraph.dangling | dangling}.
1206
1228
  * - **`opens` / `toggles`** target an overlay *within the source page*, not
1207
1229
  * another page, so their `to` is always `null`. They resolve when a `Modal`
1208
1230
  * or `Drawer` in the same page has `id === target` (the only nodes that carry
@@ -1311,4 +1333,4 @@ declare function getNodeSource(source: string, doc: WireframeDocument, path: str
1311
1333
  */
1312
1334
  declare function buildDomTree(doc: WireframeDocument, pageIndexBase?: number): DomTreeNode[];
1313
1335
 
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 };
1336
+ 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 };