@wireweave/core 3.1.0-beta.1 → 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.cjs +1718 -983
- package/dist/index.d.cts +16 -4
- package/dist/index.d.ts +16 -4
- package/dist/index.js +1712 -983
- package/dist/parser.cjs +1003 -845
- package/dist/parser.d.cts +1 -1
- package/dist/parser.d.ts +1 -1
- package/dist/parser.js +1003 -845
- package/dist/renderer.cjs +572 -40
- package/dist/renderer.d.cts +49 -2
- package/dist/renderer.d.ts +49 -2
- package/dist/renderer.js +570 -40
- package/dist/{types-BDbXDhTp.d.cts → types-BDaNyWMR.d.cts} +28 -6
- package/dist/{types-BDbXDhTp.d.ts → types-BDaNyWMR.d.ts} +28 -6
- package/package.json +1 -1
|
@@ -111,7 +111,7 @@ interface InteractiveProps {
|
|
|
111
111
|
action?: string;
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
|
-
* Wireframe Document — root node, holds
|
|
114
|
+
* Wireframe Document — root node, holds pages and named layout definitions.
|
|
115
115
|
*
|
|
116
116
|
* Multi-page semantics:
|
|
117
117
|
* - A document is a *canvas* of pages. `renderPage` consumes one page;
|
|
@@ -123,7 +123,7 @@ interface InteractiveProps {
|
|
|
123
123
|
*/
|
|
124
124
|
interface WireframeDocument extends BaseNode {
|
|
125
125
|
type: 'Document';
|
|
126
|
-
children:
|
|
126
|
+
children: TopLevelNode[];
|
|
127
127
|
}
|
|
128
128
|
/**
|
|
129
129
|
* Page — a single fixed-size board (one wireframe screen).
|
|
@@ -139,6 +139,8 @@ interface WireframeDocument extends BaseNode {
|
|
|
139
139
|
*/
|
|
140
140
|
interface PageNode extends BaseNode, CommonProps {
|
|
141
141
|
type: 'Page';
|
|
142
|
+
/** Stable address used by `navigate=`; distinct from the display title. */
|
|
143
|
+
id?: string;
|
|
142
144
|
title?: string | null;
|
|
143
145
|
/** Center content both horizontally and vertically */
|
|
144
146
|
centered?: boolean;
|
|
@@ -146,8 +148,26 @@ interface PageNode extends BaseNode, CommonProps {
|
|
|
146
148
|
viewport?: string | number;
|
|
147
149
|
/** Device preset (e.g., "iphone14", "desktop") */
|
|
148
150
|
device?: string;
|
|
151
|
+
/** Named layout shell that hosts this page's own children. */
|
|
152
|
+
uses?: string;
|
|
153
|
+
children: AnyNode[];
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* A named page shell declared with `layout NAME { ... slot ... }`.
|
|
157
|
+
*
|
|
158
|
+
* Layout definitions are top-level structure, not screens. The renderer
|
|
159
|
+
* composes a page's children into the first slot when the page says
|
|
160
|
+
* `uses=NAME`.
|
|
161
|
+
*/
|
|
162
|
+
interface LayoutDefinitionNode extends BaseNode, CommonProps {
|
|
163
|
+
type: 'Layout';
|
|
164
|
+
name: string;
|
|
149
165
|
children: AnyNode[];
|
|
150
166
|
}
|
|
167
|
+
/** Bare positional marker inside a layout definition. */
|
|
168
|
+
interface SlotNode extends BaseNode, CommonProps {
|
|
169
|
+
type: 'Slot';
|
|
170
|
+
}
|
|
151
171
|
interface HeaderNode extends BaseNode, CommonProps {
|
|
152
172
|
type: 'Header';
|
|
153
173
|
border?: boolean;
|
|
@@ -611,6 +631,8 @@ interface AnnotationItemNode extends BaseNode {
|
|
|
611
631
|
children: AnyNode[];
|
|
612
632
|
}
|
|
613
633
|
type LayoutNode = PageNode | HeaderNode | MainNode | FooterNode | SidebarNode | SectionNode;
|
|
634
|
+
type DefinitionNode = LayoutDefinitionNode;
|
|
635
|
+
type TopLevelNode = PageNode | DefinitionNode;
|
|
614
636
|
type GridNode = RowNode | ColNode | StackNode | RelativeNode;
|
|
615
637
|
type ContainerComponentNode = CardNode | ModalNode | DrawerNode | AccordionNode;
|
|
616
638
|
type TextContentNode = TextNode | TitleNode | LinkNode;
|
|
@@ -621,9 +643,9 @@ type FeedbackNode = AlertNode | ToastNode | ProgressNode | SpinnerNode;
|
|
|
621
643
|
type OverlayNode = TooltipNode | PopoverNode | DropdownNode;
|
|
622
644
|
type NavigationNode = NavNode | TabsNode | BreadcrumbNode;
|
|
623
645
|
type AnnotationNode = MarkerNode | AnnotationsNode | AnnotationItemNode;
|
|
624
|
-
type ContainerNode = LayoutNode | GridNode | ContainerComponentNode | PopoverNode | TooltipNode | AnnotationsNode | AnnotationItemNode;
|
|
625
|
-
type LeafNode = TextContentNode | InputComponentNode | ButtonNode | DisplayNode | DataNode | FeedbackNode | DropdownNode | NavigationNode | DividerComponentNode | MarkerNode;
|
|
646
|
+
type ContainerNode = LayoutNode | DefinitionNode | GridNode | ContainerComponentNode | PopoverNode | TooltipNode | AnnotationsNode | AnnotationItemNode;
|
|
647
|
+
type LeafNode = TextContentNode | InputComponentNode | ButtonNode | DisplayNode | DataNode | FeedbackNode | DropdownNode | NavigationNode | DividerComponentNode | MarkerNode | SlotNode;
|
|
626
648
|
type AnyNode = ContainerNode | LeafNode;
|
|
627
|
-
type NodeType = 'Document' | 'Page' | 'Header' | 'Main' | 'Footer' | 'Sidebar' | 'Section' | 'Row' | 'Col' | 'Stack' | 'Relative' | 'Card' | 'Modal' | 'Drawer' | 'Accordion' | 'Text' | 'Title' | 'Link' | 'Input' | 'Textarea' | 'Select' | 'Checkbox' | 'Radio' | 'Switch' | 'Slider' | 'Button' | 'Image' | 'Placeholder' | 'Avatar' | 'Badge' | 'Icon' | 'Table' | 'List' | 'Alert' | 'Toast' | 'Progress' | 'Spinner' | 'Tooltip' | 'Popover' | 'Dropdown' | 'Nav' | 'Tabs' | 'Breadcrumb' | 'Divider' | 'Marker' | 'Annotations' | 'AnnotationItem';
|
|
649
|
+
type NodeType = 'Document' | 'Page' | 'Layout' | 'Slot' | 'Header' | 'Main' | 'Footer' | 'Sidebar' | 'Section' | 'Row' | 'Col' | 'Stack' | 'Relative' | 'Card' | 'Modal' | 'Drawer' | 'Accordion' | 'Text' | 'Title' | 'Link' | 'Input' | 'Textarea' | 'Select' | 'Checkbox' | 'Radio' | 'Switch' | 'Slider' | 'Button' | 'Image' | 'Placeholder' | 'Avatar' | 'Badge' | 'Icon' | 'Table' | 'List' | 'Alert' | 'Toast' | 'Progress' | 'Spinner' | 'Tooltip' | 'Popover' | 'Dropdown' | 'Nav' | 'Tabs' | 'Breadcrumb' | 'Divider' | 'Marker' | 'Annotations' | 'AnnotationItem';
|
|
628
650
|
|
|
629
|
-
export type {
|
|
651
|
+
export type { InputType as $, AccordionNode as A, BadgeNode as B, CardNode as C, ContainerNode as D, DataNode as E, DefinitionNode as F, DirectionValue as G, DisplayNode as H, DividerComponentNode as I, DividerNode as J, DrawerNode as K, DrawerPosition as L, DropdownItemNode as M, DropdownNode as N, FeedbackNode as O, FlexProps as P, FooterNode as Q, GridNode as R, GridProps as S, HeaderNode as T, HeightValue as U, IconNode as V, IconSize as W, IconSizeToken as X, ImageNode as Y, InputComponentNode as Z, InputNode as _, AlertNode as a, ValueWithUnit as a$, InteractiveProps as a0, JustifyValue as a1, LayoutDefinitionNode as a2, LayoutNode as a3, LeafNode as a4, LinkNode as a5, ListItemNode as a6, ListNode as a7, MainNode as a8, MarkerColor as a9, SliderNode as aA, SlotNode as aB, SourceLocation as aC, SpacingProps as aD, SpacingValue as aE, SpinnerNode as aF, SpinnerSize as aG, SpinnerSizeToken as aH, StackNode as aI, SwitchNode as aJ, TabNode as aK, TableNode as aL, TabsNode as aM, TextAlign as aN, TextContentNode as aO, TextNode as aP, TextSize as aQ, TextSizeToken as aR, TextWeight as aS, TextareaNode as aT, TitleLevel as aU, TitleNode as aV, ToastNode as aW, ToastPosition as aX, TooltipNode as aY, TooltipPosition as aZ, TopLevelNode as a_, MarkerNode as aa, ModalNode as ab, NavBlockItem as ac, NavChild as ad, NavDivider as ae, NavGroupNode as af, NavItem as ag, NavNode as ah, NavigationNode as ai, NodeType as aj, OverlayNode as ak, PageNode as al, PlaceholderNode as am, PopoverNode as an, Position as ao, PositionProps as ap, ProgressNode as aq, RadioNode as ar, RelativeNode as as, RowNode as at, SectionNode as au, SelectNode as av, SelectOption as aw, ShadowValue as ax, SidebarNode as ay, SizeProps as az, AlertVariant as b, WidthValue as b0, WireframeDocument as b1, AlignValue as c, AnchorPosition as d, AnnotationItemNode as e, AnnotationNode as f, AnnotationsNode as g, AnyNode as h, AppearanceProps as i, AvatarNode as j, AvatarSize as k, AvatarSizeToken as l, BadgeSize as m, BadgeSizeToken as n, BadgeVariant as o, BaseNode as p, BreadcrumbItem as q, BreadcrumbNode as r, ButtonNode as s, ButtonSize as t, ButtonSizeToken as u, ButtonVariant as v, CheckboxNode as w, ColNode as x, CommonProps as y, ContainerComponentNode as z };
|
|
@@ -111,7 +111,7 @@ interface InteractiveProps {
|
|
|
111
111
|
action?: string;
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
|
-
* Wireframe Document — root node, holds
|
|
114
|
+
* Wireframe Document — root node, holds pages and named layout definitions.
|
|
115
115
|
*
|
|
116
116
|
* Multi-page semantics:
|
|
117
117
|
* - A document is a *canvas* of pages. `renderPage` consumes one page;
|
|
@@ -123,7 +123,7 @@ interface InteractiveProps {
|
|
|
123
123
|
*/
|
|
124
124
|
interface WireframeDocument extends BaseNode {
|
|
125
125
|
type: 'Document';
|
|
126
|
-
children:
|
|
126
|
+
children: TopLevelNode[];
|
|
127
127
|
}
|
|
128
128
|
/**
|
|
129
129
|
* Page — a single fixed-size board (one wireframe screen).
|
|
@@ -139,6 +139,8 @@ interface WireframeDocument extends BaseNode {
|
|
|
139
139
|
*/
|
|
140
140
|
interface PageNode extends BaseNode, CommonProps {
|
|
141
141
|
type: 'Page';
|
|
142
|
+
/** Stable address used by `navigate=`; distinct from the display title. */
|
|
143
|
+
id?: string;
|
|
142
144
|
title?: string | null;
|
|
143
145
|
/** Center content both horizontally and vertically */
|
|
144
146
|
centered?: boolean;
|
|
@@ -146,8 +148,26 @@ interface PageNode extends BaseNode, CommonProps {
|
|
|
146
148
|
viewport?: string | number;
|
|
147
149
|
/** Device preset (e.g., "iphone14", "desktop") */
|
|
148
150
|
device?: string;
|
|
151
|
+
/** Named layout shell that hosts this page's own children. */
|
|
152
|
+
uses?: string;
|
|
153
|
+
children: AnyNode[];
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* A named page shell declared with `layout NAME { ... slot ... }`.
|
|
157
|
+
*
|
|
158
|
+
* Layout definitions are top-level structure, not screens. The renderer
|
|
159
|
+
* composes a page's children into the first slot when the page says
|
|
160
|
+
* `uses=NAME`.
|
|
161
|
+
*/
|
|
162
|
+
interface LayoutDefinitionNode extends BaseNode, CommonProps {
|
|
163
|
+
type: 'Layout';
|
|
164
|
+
name: string;
|
|
149
165
|
children: AnyNode[];
|
|
150
166
|
}
|
|
167
|
+
/** Bare positional marker inside a layout definition. */
|
|
168
|
+
interface SlotNode extends BaseNode, CommonProps {
|
|
169
|
+
type: 'Slot';
|
|
170
|
+
}
|
|
151
171
|
interface HeaderNode extends BaseNode, CommonProps {
|
|
152
172
|
type: 'Header';
|
|
153
173
|
border?: boolean;
|
|
@@ -611,6 +631,8 @@ interface AnnotationItemNode extends BaseNode {
|
|
|
611
631
|
children: AnyNode[];
|
|
612
632
|
}
|
|
613
633
|
type LayoutNode = PageNode | HeaderNode | MainNode | FooterNode | SidebarNode | SectionNode;
|
|
634
|
+
type DefinitionNode = LayoutDefinitionNode;
|
|
635
|
+
type TopLevelNode = PageNode | DefinitionNode;
|
|
614
636
|
type GridNode = RowNode | ColNode | StackNode | RelativeNode;
|
|
615
637
|
type ContainerComponentNode = CardNode | ModalNode | DrawerNode | AccordionNode;
|
|
616
638
|
type TextContentNode = TextNode | TitleNode | LinkNode;
|
|
@@ -621,9 +643,9 @@ type FeedbackNode = AlertNode | ToastNode | ProgressNode | SpinnerNode;
|
|
|
621
643
|
type OverlayNode = TooltipNode | PopoverNode | DropdownNode;
|
|
622
644
|
type NavigationNode = NavNode | TabsNode | BreadcrumbNode;
|
|
623
645
|
type AnnotationNode = MarkerNode | AnnotationsNode | AnnotationItemNode;
|
|
624
|
-
type ContainerNode = LayoutNode | GridNode | ContainerComponentNode | PopoverNode | TooltipNode | AnnotationsNode | AnnotationItemNode;
|
|
625
|
-
type LeafNode = TextContentNode | InputComponentNode | ButtonNode | DisplayNode | DataNode | FeedbackNode | DropdownNode | NavigationNode | DividerComponentNode | MarkerNode;
|
|
646
|
+
type ContainerNode = LayoutNode | DefinitionNode | GridNode | ContainerComponentNode | PopoverNode | TooltipNode | AnnotationsNode | AnnotationItemNode;
|
|
647
|
+
type LeafNode = TextContentNode | InputComponentNode | ButtonNode | DisplayNode | DataNode | FeedbackNode | DropdownNode | NavigationNode | DividerComponentNode | MarkerNode | SlotNode;
|
|
626
648
|
type AnyNode = ContainerNode | LeafNode;
|
|
627
|
-
type NodeType = 'Document' | 'Page' | 'Header' | 'Main' | 'Footer' | 'Sidebar' | 'Section' | 'Row' | 'Col' | 'Stack' | 'Relative' | 'Card' | 'Modal' | 'Drawer' | 'Accordion' | 'Text' | 'Title' | 'Link' | 'Input' | 'Textarea' | 'Select' | 'Checkbox' | 'Radio' | 'Switch' | 'Slider' | 'Button' | 'Image' | 'Placeholder' | 'Avatar' | 'Badge' | 'Icon' | 'Table' | 'List' | 'Alert' | 'Toast' | 'Progress' | 'Spinner' | 'Tooltip' | 'Popover' | 'Dropdown' | 'Nav' | 'Tabs' | 'Breadcrumb' | 'Divider' | 'Marker' | 'Annotations' | 'AnnotationItem';
|
|
649
|
+
type NodeType = 'Document' | 'Page' | 'Layout' | 'Slot' | 'Header' | 'Main' | 'Footer' | 'Sidebar' | 'Section' | 'Row' | 'Col' | 'Stack' | 'Relative' | 'Card' | 'Modal' | 'Drawer' | 'Accordion' | 'Text' | 'Title' | 'Link' | 'Input' | 'Textarea' | 'Select' | 'Checkbox' | 'Radio' | 'Switch' | 'Slider' | 'Button' | 'Image' | 'Placeholder' | 'Avatar' | 'Badge' | 'Icon' | 'Table' | 'List' | 'Alert' | 'Toast' | 'Progress' | 'Spinner' | 'Tooltip' | 'Popover' | 'Dropdown' | 'Nav' | 'Tabs' | 'Breadcrumb' | 'Divider' | 'Marker' | 'Annotations' | 'AnnotationItem';
|
|
628
650
|
|
|
629
|
-
export type {
|
|
651
|
+
export type { InputType as $, AccordionNode as A, BadgeNode as B, CardNode as C, ContainerNode as D, DataNode as E, DefinitionNode as F, DirectionValue as G, DisplayNode as H, DividerComponentNode as I, DividerNode as J, DrawerNode as K, DrawerPosition as L, DropdownItemNode as M, DropdownNode as N, FeedbackNode as O, FlexProps as P, FooterNode as Q, GridNode as R, GridProps as S, HeaderNode as T, HeightValue as U, IconNode as V, IconSize as W, IconSizeToken as X, ImageNode as Y, InputComponentNode as Z, InputNode as _, AlertNode as a, ValueWithUnit as a$, InteractiveProps as a0, JustifyValue as a1, LayoutDefinitionNode as a2, LayoutNode as a3, LeafNode as a4, LinkNode as a5, ListItemNode as a6, ListNode as a7, MainNode as a8, MarkerColor as a9, SliderNode as aA, SlotNode as aB, SourceLocation as aC, SpacingProps as aD, SpacingValue as aE, SpinnerNode as aF, SpinnerSize as aG, SpinnerSizeToken as aH, StackNode as aI, SwitchNode as aJ, TabNode as aK, TableNode as aL, TabsNode as aM, TextAlign as aN, TextContentNode as aO, TextNode as aP, TextSize as aQ, TextSizeToken as aR, TextWeight as aS, TextareaNode as aT, TitleLevel as aU, TitleNode as aV, ToastNode as aW, ToastPosition as aX, TooltipNode as aY, TooltipPosition as aZ, TopLevelNode as a_, MarkerNode as aa, ModalNode as ab, NavBlockItem as ac, NavChild as ad, NavDivider as ae, NavGroupNode as af, NavItem as ag, NavNode as ah, NavigationNode as ai, NodeType as aj, OverlayNode as ak, PageNode as al, PlaceholderNode as am, PopoverNode as an, Position as ao, PositionProps as ap, ProgressNode as aq, RadioNode as ar, RelativeNode as as, RowNode as at, SectionNode as au, SelectNode as av, SelectOption as aw, ShadowValue as ax, SidebarNode as ay, SizeProps as az, AlertVariant as b, WidthValue as b0, WireframeDocument as b1, AlignValue as c, AnchorPosition as d, AnnotationItemNode as e, AnnotationNode as f, AnnotationsNode as g, AnyNode as h, AppearanceProps as i, AvatarNode as j, AvatarSize as k, AvatarSizeToken as l, BadgeSize as m, BadgeSizeToken as n, BadgeVariant as o, BaseNode as p, BreadcrumbItem as q, BreadcrumbNode as r, ButtonNode as s, ButtonSize as t, ButtonSizeToken as u, ButtonVariant as v, CheckboxNode as w, ColNode as x, CommonProps as y, ContainerComponentNode as z };
|