@wireweave/core 1.1.0 → 1.2.0-beta.1

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.
@@ -76,7 +76,16 @@ interface FlexProps {
76
76
  interface GridProps {
77
77
  span?: number;
78
78
  }
79
- interface CommonProps extends SpacingProps, SizeProps, FlexProps, GridProps {
79
+ /**
80
+ * Position props for absolute/relative positioning
81
+ * - x, y: position coordinates (relative to parent or absolute on page)
82
+ * - All values are in pixels
83
+ */
84
+ interface PositionProps {
85
+ x?: number | ValueWithUnit;
86
+ y?: number | ValueWithUnit;
87
+ }
88
+ interface CommonProps extends SpacingProps, SizeProps, FlexProps, GridProps, PositionProps {
80
89
  }
81
90
  interface WireframeDocument extends BaseNode {
82
91
  type: 'Document';
@@ -100,6 +109,8 @@ interface HeaderNode extends BaseNode, CommonProps {
100
109
  }
101
110
  interface MainNode extends BaseNode, CommonProps {
102
111
  type: 'Main';
112
+ /** Enable vertical scrolling for overflow content */
113
+ scroll?: boolean;
103
114
  children: AnyNode[];
104
115
  }
105
116
  interface FooterNode extends BaseNode, CommonProps {
@@ -269,6 +280,7 @@ interface ImageNode extends BaseNode, CommonProps {
269
280
  interface PlaceholderNode extends BaseNode, CommonProps {
270
281
  type: 'Placeholder';
271
282
  label?: string | null;
283
+ children?: AnyNode[];
272
284
  }
273
285
  type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
274
286
  interface AvatarNode extends BaseNode, CommonProps {
@@ -366,6 +378,7 @@ interface DropdownNode extends BaseNode, CommonProps {
366
378
  type: 'Dropdown';
367
379
  items: (DropdownItemNode | DividerNode)[];
368
380
  }
381
+ /** Nav item for array syntax: nav ["a", "b"] */
369
382
  interface NavItem {
370
383
  label: string;
371
384
  icon?: string;
@@ -373,9 +386,34 @@ interface NavItem {
373
386
  active?: boolean;
374
387
  disabled?: boolean;
375
388
  }
389
+ /** Nav item for block syntax: item "label" icon="x" active */
390
+ interface NavBlockItem {
391
+ type: 'item';
392
+ label: string;
393
+ icon?: string;
394
+ href?: string;
395
+ active?: boolean;
396
+ disabled?: boolean;
397
+ }
398
+ /** Nav group for block syntax: group "label" { ... } */
399
+ interface NavGroupNode {
400
+ type: 'group';
401
+ label: string;
402
+ collapsed?: boolean;
403
+ items: (NavBlockItem | NavDivider)[];
404
+ }
405
+ /** Divider inside nav block */
406
+ interface NavDivider {
407
+ type: 'divider';
408
+ }
409
+ /** Nav child can be group, item, or divider */
410
+ type NavChild = NavGroupNode | NavBlockItem | NavDivider;
376
411
  interface NavNode extends BaseNode, CommonProps {
377
412
  type: 'Nav';
413
+ /** Items for array syntax */
378
414
  items: (string | NavItem)[];
415
+ /** Children for block syntax */
416
+ children: NavChild[];
379
417
  vertical?: boolean;
380
418
  }
381
419
  interface TabNode {
@@ -416,4 +454,4 @@ type LeafNode = TextContentNode | InputComponentNode | ButtonNode | DisplayNode
416
454
  type AnyNode = ContainerNode | LeafNode;
417
455
  type NodeType = 'Document' | 'Page' | 'Header' | 'Main' | 'Footer' | 'Sidebar' | 'Section' | 'Row' | 'Col' | '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';
418
456
 
419
- export type { DividerComponentNode as $, AnyNode as A, ButtonNode as B, ContainerNode as C, DrawerNode as D, FeedbackNode as E, FooterNode as F, GridNode as G, HeaderNode as H, InputComponentNode as I, AlertNode as J, ToastNode as K, LeafNode as L, MainNode as M, ProgressNode as N, SpinnerNode as O, PageNode as P, OverlayNode as Q, RowNode as R, SidebarNode as S, TextContentNode as T, TooltipNode as U, PopoverNode as V, DropdownNode as W, NavigationNode as X, NavNode as Y, TabsNode as Z, BreadcrumbNode as _, LayoutNode as a, NodeType as a0, WireframeDocument as a1, Position as a2, SourceLocation as a3, BaseNode as a4, ValueWithUnit as a5, SpacingValue as a6, SpacingProps as a7, WidthValue as a8, HeightValue as a9, TooltipPosition as aA, DropdownItemNode as aB, DividerNode as aC, NavItem as aD, TabNode as aE, BreadcrumbItem as aF, SizeProps as aa, JustifyValue as ab, AlignValue as ac, DirectionValue as ad, FlexProps as ae, GridProps as af, CommonProps as ag, ShadowValue as ah, DrawerPosition as ai, TextSizeToken as aj, TextSize as ak, TextWeight as al, TextAlign as am, TitleLevel as an, InputType as ao, SelectOption as ap, ButtonVariant as aq, ButtonSize as ar, AvatarSize as as, BadgeVariant as at, BadgeSize as au, IconSize as av, ListItemNode as aw, AlertVariant as ax, ToastPosition as ay, SpinnerSize as az, SectionNode as b, ColNode as c, ContainerComponentNode as d, CardNode as e, ModalNode as f, AccordionNode as g, TextNode as h, TitleNode as i, LinkNode as j, InputNode as k, TextareaNode as l, SelectNode as m, CheckboxNode as n, RadioNode as o, SwitchNode as p, SliderNode as q, DisplayNode as r, ImageNode as s, PlaceholderNode as t, AvatarNode as u, BadgeNode as v, IconNode as w, DataNode as x, TableNode as y, ListNode as z };
457
+ export type { DividerComponentNode as $, AnyNode as A, ButtonNode as B, ContainerNode as C, DrawerNode as D, FeedbackNode as E, FooterNode as F, GridNode as G, HeaderNode as H, InputComponentNode as I, AlertNode as J, ToastNode as K, LeafNode as L, MainNode as M, ProgressNode as N, SpinnerNode as O, PageNode as P, OverlayNode as Q, RowNode as R, SidebarNode as S, TextContentNode as T, TooltipNode as U, PopoverNode as V, DropdownNode as W, NavigationNode as X, NavNode as Y, TabsNode as Z, BreadcrumbNode as _, LayoutNode as a, NodeType as a0, WireframeDocument as a1, Position as a2, SourceLocation as a3, BaseNode as a4, ValueWithUnit as a5, SpacingValue as a6, SpacingProps as a7, WidthValue as a8, HeightValue as a9, SpinnerSize as aA, TooltipPosition as aB, DropdownItemNode as aC, DividerNode as aD, NavItem as aE, NavBlockItem as aF, NavGroupNode as aG, NavDivider as aH, NavChild as aI, TabNode as aJ, BreadcrumbItem as aK, SizeProps as aa, JustifyValue as ab, AlignValue as ac, DirectionValue as ad, FlexProps as ae, GridProps as af, PositionProps as ag, CommonProps as ah, ShadowValue as ai, DrawerPosition as aj, TextSizeToken as ak, TextSize as al, TextWeight as am, TextAlign as an, TitleLevel as ao, InputType as ap, SelectOption as aq, ButtonVariant as ar, ButtonSize as as, AvatarSize as at, BadgeVariant as au, BadgeSize as av, IconSize as aw, ListItemNode as ax, AlertVariant as ay, ToastPosition as az, SectionNode as b, ColNode as c, ContainerComponentNode as d, CardNode as e, ModalNode as f, AccordionNode as g, TextNode as h, TitleNode as i, LinkNode as j, InputNode as k, TextareaNode as l, SelectNode as m, CheckboxNode as n, RadioNode as o, SwitchNode as p, SliderNode as q, DisplayNode as r, ImageNode as s, PlaceholderNode as t, AvatarNode as u, BadgeNode as v, IconNode as w, DataNode as x, TableNode as y, ListNode as z };
@@ -76,7 +76,16 @@ interface FlexProps {
76
76
  interface GridProps {
77
77
  span?: number;
78
78
  }
79
- interface CommonProps extends SpacingProps, SizeProps, FlexProps, GridProps {
79
+ /**
80
+ * Position props for absolute/relative positioning
81
+ * - x, y: position coordinates (relative to parent or absolute on page)
82
+ * - All values are in pixels
83
+ */
84
+ interface PositionProps {
85
+ x?: number | ValueWithUnit;
86
+ y?: number | ValueWithUnit;
87
+ }
88
+ interface CommonProps extends SpacingProps, SizeProps, FlexProps, GridProps, PositionProps {
80
89
  }
81
90
  interface WireframeDocument extends BaseNode {
82
91
  type: 'Document';
@@ -100,6 +109,8 @@ interface HeaderNode extends BaseNode, CommonProps {
100
109
  }
101
110
  interface MainNode extends BaseNode, CommonProps {
102
111
  type: 'Main';
112
+ /** Enable vertical scrolling for overflow content */
113
+ scroll?: boolean;
103
114
  children: AnyNode[];
104
115
  }
105
116
  interface FooterNode extends BaseNode, CommonProps {
@@ -269,6 +280,7 @@ interface ImageNode extends BaseNode, CommonProps {
269
280
  interface PlaceholderNode extends BaseNode, CommonProps {
270
281
  type: 'Placeholder';
271
282
  label?: string | null;
283
+ children?: AnyNode[];
272
284
  }
273
285
  type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
274
286
  interface AvatarNode extends BaseNode, CommonProps {
@@ -366,6 +378,7 @@ interface DropdownNode extends BaseNode, CommonProps {
366
378
  type: 'Dropdown';
367
379
  items: (DropdownItemNode | DividerNode)[];
368
380
  }
381
+ /** Nav item for array syntax: nav ["a", "b"] */
369
382
  interface NavItem {
370
383
  label: string;
371
384
  icon?: string;
@@ -373,9 +386,34 @@ interface NavItem {
373
386
  active?: boolean;
374
387
  disabled?: boolean;
375
388
  }
389
+ /** Nav item for block syntax: item "label" icon="x" active */
390
+ interface NavBlockItem {
391
+ type: 'item';
392
+ label: string;
393
+ icon?: string;
394
+ href?: string;
395
+ active?: boolean;
396
+ disabled?: boolean;
397
+ }
398
+ /** Nav group for block syntax: group "label" { ... } */
399
+ interface NavGroupNode {
400
+ type: 'group';
401
+ label: string;
402
+ collapsed?: boolean;
403
+ items: (NavBlockItem | NavDivider)[];
404
+ }
405
+ /** Divider inside nav block */
406
+ interface NavDivider {
407
+ type: 'divider';
408
+ }
409
+ /** Nav child can be group, item, or divider */
410
+ type NavChild = NavGroupNode | NavBlockItem | NavDivider;
376
411
  interface NavNode extends BaseNode, CommonProps {
377
412
  type: 'Nav';
413
+ /** Items for array syntax */
378
414
  items: (string | NavItem)[];
415
+ /** Children for block syntax */
416
+ children: NavChild[];
379
417
  vertical?: boolean;
380
418
  }
381
419
  interface TabNode {
@@ -416,4 +454,4 @@ type LeafNode = TextContentNode | InputComponentNode | ButtonNode | DisplayNode
416
454
  type AnyNode = ContainerNode | LeafNode;
417
455
  type NodeType = 'Document' | 'Page' | 'Header' | 'Main' | 'Footer' | 'Sidebar' | 'Section' | 'Row' | 'Col' | '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';
418
456
 
419
- export type { DividerComponentNode as $, AnyNode as A, ButtonNode as B, ContainerNode as C, DrawerNode as D, FeedbackNode as E, FooterNode as F, GridNode as G, HeaderNode as H, InputComponentNode as I, AlertNode as J, ToastNode as K, LeafNode as L, MainNode as M, ProgressNode as N, SpinnerNode as O, PageNode as P, OverlayNode as Q, RowNode as R, SidebarNode as S, TextContentNode as T, TooltipNode as U, PopoverNode as V, DropdownNode as W, NavigationNode as X, NavNode as Y, TabsNode as Z, BreadcrumbNode as _, LayoutNode as a, NodeType as a0, WireframeDocument as a1, Position as a2, SourceLocation as a3, BaseNode as a4, ValueWithUnit as a5, SpacingValue as a6, SpacingProps as a7, WidthValue as a8, HeightValue as a9, TooltipPosition as aA, DropdownItemNode as aB, DividerNode as aC, NavItem as aD, TabNode as aE, BreadcrumbItem as aF, SizeProps as aa, JustifyValue as ab, AlignValue as ac, DirectionValue as ad, FlexProps as ae, GridProps as af, CommonProps as ag, ShadowValue as ah, DrawerPosition as ai, TextSizeToken as aj, TextSize as ak, TextWeight as al, TextAlign as am, TitleLevel as an, InputType as ao, SelectOption as ap, ButtonVariant as aq, ButtonSize as ar, AvatarSize as as, BadgeVariant as at, BadgeSize as au, IconSize as av, ListItemNode as aw, AlertVariant as ax, ToastPosition as ay, SpinnerSize as az, SectionNode as b, ColNode as c, ContainerComponentNode as d, CardNode as e, ModalNode as f, AccordionNode as g, TextNode as h, TitleNode as i, LinkNode as j, InputNode as k, TextareaNode as l, SelectNode as m, CheckboxNode as n, RadioNode as o, SwitchNode as p, SliderNode as q, DisplayNode as r, ImageNode as s, PlaceholderNode as t, AvatarNode as u, BadgeNode as v, IconNode as w, DataNode as x, TableNode as y, ListNode as z };
457
+ export type { DividerComponentNode as $, AnyNode as A, ButtonNode as B, ContainerNode as C, DrawerNode as D, FeedbackNode as E, FooterNode as F, GridNode as G, HeaderNode as H, InputComponentNode as I, AlertNode as J, ToastNode as K, LeafNode as L, MainNode as M, ProgressNode as N, SpinnerNode as O, PageNode as P, OverlayNode as Q, RowNode as R, SidebarNode as S, TextContentNode as T, TooltipNode as U, PopoverNode as V, DropdownNode as W, NavigationNode as X, NavNode as Y, TabsNode as Z, BreadcrumbNode as _, LayoutNode as a, NodeType as a0, WireframeDocument as a1, Position as a2, SourceLocation as a3, BaseNode as a4, ValueWithUnit as a5, SpacingValue as a6, SpacingProps as a7, WidthValue as a8, HeightValue as a9, SpinnerSize as aA, TooltipPosition as aB, DropdownItemNode as aC, DividerNode as aD, NavItem as aE, NavBlockItem as aF, NavGroupNode as aG, NavDivider as aH, NavChild as aI, TabNode as aJ, BreadcrumbItem as aK, SizeProps as aa, JustifyValue as ab, AlignValue as ac, DirectionValue as ad, FlexProps as ae, GridProps as af, PositionProps as ag, CommonProps as ah, ShadowValue as ai, DrawerPosition as aj, TextSizeToken as ak, TextSize as al, TextWeight as am, TextAlign as an, TitleLevel as ao, InputType as ap, SelectOption as aq, ButtonVariant as ar, ButtonSize as as, AvatarSize as at, BadgeVariant as au, BadgeSize as av, IconSize as aw, ListItemNode as ax, AlertVariant as ay, ToastPosition as az, SectionNode as b, ColNode as c, ContainerComponentNode as d, CardNode as e, ModalNode as f, AccordionNode as g, TextNode as h, TitleNode as i, LinkNode as j, InputNode as k, TextareaNode as l, SelectNode as m, CheckboxNode as n, RadioNode as o, SwitchNode as p, SliderNode as q, DisplayNode as r, ImageNode as s, PlaceholderNode as t, AvatarNode as u, BadgeNode as v, IconNode as w, DataNode as x, TableNode as y, ListNode as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wireweave/core",
3
- "version": "1.1.0",
3
+ "version": "1.2.0-beta.1",
4
4
  "description": "Core parser and renderer for wireweave",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -37,6 +37,7 @@
37
37
  },
38
38
  "devDependencies": {
39
39
  "@release-it/conventional-changelog": "^10.0.4",
40
+ "@types/node": "^25.0.8",
40
41
  "@vitest/coverage-v8": "^3.2.4",
41
42
  "lucide": "^0.562.0",
42
43
  "peggy": "^5.0.0",