@wireweave/core 2.3.1 → 2.4.0

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/renderer.cjs CHANGED
@@ -1446,11 +1446,36 @@ function generateGridClasses(_theme, prefix) {
1446
1446
  }
1447
1447
 
1448
1448
  /* When explicit width is set, don't flex-grow */
1449
- .${prefix}-row[style*="width:"],
1450
- .${prefix}-col[style*="width:"] {
1449
+ .${prefix}-row[style*="width"],
1450
+ .${prefix}-col[style*="width"] {
1451
1451
  flex: 0 0 auto;
1452
1452
  }
1453
1453
 
1454
+ /* Stack - vertical content grouping (does not fill available space) */
1455
+ .${prefix}-stack {
1456
+ display: flex;
1457
+ flex-direction: column;
1458
+ flex: 0 0 auto;
1459
+ box-sizing: border-box;
1460
+ }
1461
+
1462
+ /* Relative - container for absolute positioning children */
1463
+ .${prefix}-relative {
1464
+ position: relative;
1465
+ display: inline-flex;
1466
+ }
1467
+
1468
+ /* Anchor positioning for relative container children */
1469
+ .${prefix}-anchor-top-left { position: absolute; top: -4px; left: -4px; }
1470
+ .${prefix}-anchor-top-center { position: absolute; top: -4px; left: 50%; transform: translateX(-50%); }
1471
+ .${prefix}-anchor-top-right { position: absolute; top: -4px; right: -4px; }
1472
+ .${prefix}-anchor-center-left { position: absolute; top: 50%; left: -4px; transform: translateY(-50%); }
1473
+ .${prefix}-anchor-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
1474
+ .${prefix}-anchor-center-right { position: absolute; top: 50%; right: -4px; transform: translateY(-50%); }
1475
+ .${prefix}-anchor-bottom-left { position: absolute; bottom: -4px; left: -4px; }
1476
+ .${prefix}-anchor-bottom-center { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); }
1477
+ .${prefix}-anchor-bottom-right { position: absolute; bottom: -4px; right: -4px; }
1478
+
1454
1479
  `;
1455
1480
  for (let i = 1; i <= 12; i++) {
1456
1481
  css += `.${prefix}-col-${i} { flex: ${i} 0 0%; min-width: 0; }
@@ -2044,6 +2069,30 @@ function renderCol(node, ctx) {
2044
2069
  ${children}
2045
2070
  </div>`;
2046
2071
  }
2072
+ function renderStack(node, ctx) {
2073
+ const classes = ctx.buildClassString([
2074
+ `${ctx.prefix}-stack`,
2075
+ ...ctx.getCommonClasses(node)
2076
+ ]);
2077
+ const styles = ctx.buildCommonStyles(node);
2078
+ const styleAttr = styles ? ` style="${styles}"` : "";
2079
+ const children = ctx.renderChildren(node.children);
2080
+ return `<div class="${classes}"${styleAttr}>
2081
+ ${children}
2082
+ </div>`;
2083
+ }
2084
+ function renderRelative(node, ctx) {
2085
+ const classes = ctx.buildClassString([
2086
+ `${ctx.prefix}-relative`,
2087
+ ...ctx.getCommonClasses(node)
2088
+ ]);
2089
+ const styles = ctx.buildCommonStyles(node);
2090
+ const styleAttr = styles ? ` style="${styles}"` : "";
2091
+ const children = ctx.renderChildren(node.children);
2092
+ return `<div class="${classes}"${styleAttr}>
2093
+ ${children}
2094
+ </div>`;
2095
+ }
2047
2096
 
2048
2097
  // src/renderer/html/renderers/container.ts
2049
2098
  function buildInteractiveAttrs(node) {
@@ -12879,6 +12928,28 @@ var lucideIcons = {
12879
12928
  }
12880
12929
  ]
12881
12930
  ],
12931
+ "circle-help": [
12932
+ [
12933
+ "circle",
12934
+ {
12935
+ "cx": "12",
12936
+ "cy": "12",
12937
+ "r": "10"
12938
+ }
12939
+ ],
12940
+ [
12941
+ "path",
12942
+ {
12943
+ "d": "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"
12944
+ }
12945
+ ],
12946
+ [
12947
+ "path",
12948
+ {
12949
+ "d": "M12 17h.01"
12950
+ }
12951
+ ]
12952
+ ],
12882
12953
  "circle-minus": [
12883
12954
  [
12884
12955
  "circle",
@@ -48941,10 +49012,20 @@ function renderAvatar(node, ctx) {
48941
49012
  const sizeStyle = sizeResolved.style || "";
48942
49013
  const combinedStyles = baseStyles && sizeStyle ? `${baseStyles}; ${sizeStyle}` : baseStyles || sizeStyle;
48943
49014
  const styleAttr = combinedStyles ? ` style="${combinedStyles}"` : "";
48944
- const initials = node.name ? node.name.split(" ").map((n) => n[0]).join("").toUpperCase().slice(0, 2) : "?";
49015
+ let content;
49016
+ if (node.name) {
49017
+ content = node.name.split(" ").map((n) => n[0]).join("").toUpperCase().slice(0, 2);
49018
+ } else {
49019
+ const iconData = getIconData("user");
49020
+ if (iconData) {
49021
+ content = renderIconSvg(iconData, 16, 2, `${ctx.prefix}-icon`);
49022
+ } else {
49023
+ content = "?";
49024
+ }
49025
+ }
48945
49026
  const interactiveAttrs = buildInteractiveAttrs2(node);
48946
49027
  const interactiveAttrStr = ctx.buildAttrsString(interactiveAttrs);
48947
- return `<div class="${classes}"${styleAttr}${interactiveAttrStr} role="img" aria-label="${ctx.escapeHtml(node.name || "Avatar")}">${initials}</div>`;
49028
+ return `<div class="${classes}"${styleAttr}${interactiveAttrStr} role="img" aria-label="${ctx.escapeHtml(node.name || "Avatar")}">${content}</div>`;
48948
49029
  }
48949
49030
  function renderBadge(node, ctx) {
48950
49031
  const interactiveAttrs = buildInteractiveAttrs2(node);
@@ -48956,6 +49037,7 @@ function renderBadge(node, ctx) {
48956
49037
  `${ctx.prefix}-badge-icon`,
48957
49038
  sizeResolved.className,
48958
49039
  node.variant ? `${ctx.prefix}-badge-icon-${node.variant}` : void 0,
49040
+ node.anchor ? `${ctx.prefix}-anchor-${node.anchor}` : void 0,
48959
49041
  ...ctx.getCommonClasses(node)
48960
49042
  ]);
48961
49043
  const baseStyles2 = ctx.buildCommonStyles(node);
@@ -48975,6 +49057,7 @@ function renderBadge(node, ctx) {
48975
49057
  sizeResolved.className,
48976
49058
  node.variant ? `${ctx.prefix}-badge-${node.variant}` : void 0,
48977
49059
  node.pill ? `${ctx.prefix}-badge-pill` : void 0,
49060
+ node.anchor ? `${ctx.prefix}-anchor-${node.anchor}` : void 0,
48978
49061
  ...ctx.getCommonClasses(node)
48979
49062
  ]);
48980
49063
  const baseStyles = ctx.buildCommonStyles(node);
@@ -49395,6 +49478,8 @@ var HtmlRenderer = class extends BaseRenderer {
49395
49478
  // Grid nodes
49396
49479
  Row: (node) => this.renderRow(node),
49397
49480
  Col: (node) => this.renderCol(node),
49481
+ Stack: (node) => this.renderStack(node),
49482
+ Relative: (node) => this.renderRelative(node),
49398
49483
  // Container nodes
49399
49484
  Card: (node) => this.renderCard(node),
49400
49485
  Modal: (node) => this.renderModal(node),
@@ -49554,6 +49639,12 @@ ${title}${children}
49554
49639
  renderCol(node) {
49555
49640
  return renderCol(node, this.getGridRenderContext());
49556
49641
  }
49642
+ renderStack(node) {
49643
+ return renderStack(node, this.getRenderContext());
49644
+ }
49645
+ renderRelative(node) {
49646
+ return renderRelative(node, this.getRenderContext());
49647
+ }
49557
49648
  /**
49558
49649
  * Build common inline styles for all values
49559
49650
  *
@@ -49716,6 +49807,9 @@ ${title}${children}
49716
49807
  if (commonStyles) {
49717
49808
  styles.push(commonStyles);
49718
49809
  }
49810
+ if (node.w !== void 0 && node.flex === void 0) {
49811
+ styles.push("flex: none");
49812
+ }
49719
49813
  if (node.order !== void 0) {
49720
49814
  styles.push(`order: ${node.order}`);
49721
49815
  }
@@ -1,4 +1,4 @@
1
- import { a1 as WireframeDocument, A as AnyNode, P as PageNode } from './types-D0t4JRY3.cjs';
1
+ import { a1 as WireframeDocument, A as AnyNode, P as PageNode } from './types-D_1QkAXo.cjs';
2
2
 
3
3
  /**
4
4
  * Renderer type definitions for wireweave
@@ -234,6 +234,8 @@ declare class HtmlRenderer extends BaseRenderer {
234
234
  private renderSection;
235
235
  private renderRow;
236
236
  private renderCol;
237
+ private renderStack;
238
+ private renderRelative;
237
239
  /**
238
240
  * Build common inline styles for all values
239
241
  *
@@ -1,4 +1,4 @@
1
- import { a1 as WireframeDocument, A as AnyNode, P as PageNode } from './types-D0t4JRY3.js';
1
+ import { a1 as WireframeDocument, A as AnyNode, P as PageNode } from './types-D_1QkAXo.js';
2
2
 
3
3
  /**
4
4
  * Renderer type definitions for wireweave
@@ -234,6 +234,8 @@ declare class HtmlRenderer extends BaseRenderer {
234
234
  private renderSection;
235
235
  private renderRow;
236
236
  private renderCol;
237
+ private renderStack;
238
+ private renderRelative;
237
239
  /**
238
240
  * Build common inline styles for all values
239
241
  *
package/dist/renderer.js CHANGED
@@ -1408,11 +1408,36 @@ function generateGridClasses(_theme, prefix) {
1408
1408
  }
1409
1409
 
1410
1410
  /* When explicit width is set, don't flex-grow */
1411
- .${prefix}-row[style*="width:"],
1412
- .${prefix}-col[style*="width:"] {
1411
+ .${prefix}-row[style*="width"],
1412
+ .${prefix}-col[style*="width"] {
1413
1413
  flex: 0 0 auto;
1414
1414
  }
1415
1415
 
1416
+ /* Stack - vertical content grouping (does not fill available space) */
1417
+ .${prefix}-stack {
1418
+ display: flex;
1419
+ flex-direction: column;
1420
+ flex: 0 0 auto;
1421
+ box-sizing: border-box;
1422
+ }
1423
+
1424
+ /* Relative - container for absolute positioning children */
1425
+ .${prefix}-relative {
1426
+ position: relative;
1427
+ display: inline-flex;
1428
+ }
1429
+
1430
+ /* Anchor positioning for relative container children */
1431
+ .${prefix}-anchor-top-left { position: absolute; top: -4px; left: -4px; }
1432
+ .${prefix}-anchor-top-center { position: absolute; top: -4px; left: 50%; transform: translateX(-50%); }
1433
+ .${prefix}-anchor-top-right { position: absolute; top: -4px; right: -4px; }
1434
+ .${prefix}-anchor-center-left { position: absolute; top: 50%; left: -4px; transform: translateY(-50%); }
1435
+ .${prefix}-anchor-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
1436
+ .${prefix}-anchor-center-right { position: absolute; top: 50%; right: -4px; transform: translateY(-50%); }
1437
+ .${prefix}-anchor-bottom-left { position: absolute; bottom: -4px; left: -4px; }
1438
+ .${prefix}-anchor-bottom-center { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); }
1439
+ .${prefix}-anchor-bottom-right { position: absolute; bottom: -4px; right: -4px; }
1440
+
1416
1441
  `;
1417
1442
  for (let i = 1; i <= 12; i++) {
1418
1443
  css += `.${prefix}-col-${i} { flex: ${i} 0 0%; min-width: 0; }
@@ -2006,6 +2031,30 @@ function renderCol(node, ctx) {
2006
2031
  ${children}
2007
2032
  </div>`;
2008
2033
  }
2034
+ function renderStack(node, ctx) {
2035
+ const classes = ctx.buildClassString([
2036
+ `${ctx.prefix}-stack`,
2037
+ ...ctx.getCommonClasses(node)
2038
+ ]);
2039
+ const styles = ctx.buildCommonStyles(node);
2040
+ const styleAttr = styles ? ` style="${styles}"` : "";
2041
+ const children = ctx.renderChildren(node.children);
2042
+ return `<div class="${classes}"${styleAttr}>
2043
+ ${children}
2044
+ </div>`;
2045
+ }
2046
+ function renderRelative(node, ctx) {
2047
+ const classes = ctx.buildClassString([
2048
+ `${ctx.prefix}-relative`,
2049
+ ...ctx.getCommonClasses(node)
2050
+ ]);
2051
+ const styles = ctx.buildCommonStyles(node);
2052
+ const styleAttr = styles ? ` style="${styles}"` : "";
2053
+ const children = ctx.renderChildren(node.children);
2054
+ return `<div class="${classes}"${styleAttr}>
2055
+ ${children}
2056
+ </div>`;
2057
+ }
2009
2058
 
2010
2059
  // src/renderer/html/renderers/container.ts
2011
2060
  function buildInteractiveAttrs(node) {
@@ -12841,6 +12890,28 @@ var lucideIcons = {
12841
12890
  }
12842
12891
  ]
12843
12892
  ],
12893
+ "circle-help": [
12894
+ [
12895
+ "circle",
12896
+ {
12897
+ "cx": "12",
12898
+ "cy": "12",
12899
+ "r": "10"
12900
+ }
12901
+ ],
12902
+ [
12903
+ "path",
12904
+ {
12905
+ "d": "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"
12906
+ }
12907
+ ],
12908
+ [
12909
+ "path",
12910
+ {
12911
+ "d": "M12 17h.01"
12912
+ }
12913
+ ]
12914
+ ],
12844
12915
  "circle-minus": [
12845
12916
  [
12846
12917
  "circle",
@@ -48903,10 +48974,20 @@ function renderAvatar(node, ctx) {
48903
48974
  const sizeStyle = sizeResolved.style || "";
48904
48975
  const combinedStyles = baseStyles && sizeStyle ? `${baseStyles}; ${sizeStyle}` : baseStyles || sizeStyle;
48905
48976
  const styleAttr = combinedStyles ? ` style="${combinedStyles}"` : "";
48906
- const initials = node.name ? node.name.split(" ").map((n) => n[0]).join("").toUpperCase().slice(0, 2) : "?";
48977
+ let content;
48978
+ if (node.name) {
48979
+ content = node.name.split(" ").map((n) => n[0]).join("").toUpperCase().slice(0, 2);
48980
+ } else {
48981
+ const iconData = getIconData("user");
48982
+ if (iconData) {
48983
+ content = renderIconSvg(iconData, 16, 2, `${ctx.prefix}-icon`);
48984
+ } else {
48985
+ content = "?";
48986
+ }
48987
+ }
48907
48988
  const interactiveAttrs = buildInteractiveAttrs2(node);
48908
48989
  const interactiveAttrStr = ctx.buildAttrsString(interactiveAttrs);
48909
- return `<div class="${classes}"${styleAttr}${interactiveAttrStr} role="img" aria-label="${ctx.escapeHtml(node.name || "Avatar")}">${initials}</div>`;
48990
+ return `<div class="${classes}"${styleAttr}${interactiveAttrStr} role="img" aria-label="${ctx.escapeHtml(node.name || "Avatar")}">${content}</div>`;
48910
48991
  }
48911
48992
  function renderBadge(node, ctx) {
48912
48993
  const interactiveAttrs = buildInteractiveAttrs2(node);
@@ -48918,6 +48999,7 @@ function renderBadge(node, ctx) {
48918
48999
  `${ctx.prefix}-badge-icon`,
48919
49000
  sizeResolved.className,
48920
49001
  node.variant ? `${ctx.prefix}-badge-icon-${node.variant}` : void 0,
49002
+ node.anchor ? `${ctx.prefix}-anchor-${node.anchor}` : void 0,
48921
49003
  ...ctx.getCommonClasses(node)
48922
49004
  ]);
48923
49005
  const baseStyles2 = ctx.buildCommonStyles(node);
@@ -48937,6 +49019,7 @@ function renderBadge(node, ctx) {
48937
49019
  sizeResolved.className,
48938
49020
  node.variant ? `${ctx.prefix}-badge-${node.variant}` : void 0,
48939
49021
  node.pill ? `${ctx.prefix}-badge-pill` : void 0,
49022
+ node.anchor ? `${ctx.prefix}-anchor-${node.anchor}` : void 0,
48940
49023
  ...ctx.getCommonClasses(node)
48941
49024
  ]);
48942
49025
  const baseStyles = ctx.buildCommonStyles(node);
@@ -49357,6 +49440,8 @@ var HtmlRenderer = class extends BaseRenderer {
49357
49440
  // Grid nodes
49358
49441
  Row: (node) => this.renderRow(node),
49359
49442
  Col: (node) => this.renderCol(node),
49443
+ Stack: (node) => this.renderStack(node),
49444
+ Relative: (node) => this.renderRelative(node),
49360
49445
  // Container nodes
49361
49446
  Card: (node) => this.renderCard(node),
49362
49447
  Modal: (node) => this.renderModal(node),
@@ -49516,6 +49601,12 @@ ${title}${children}
49516
49601
  renderCol(node) {
49517
49602
  return renderCol(node, this.getGridRenderContext());
49518
49603
  }
49604
+ renderStack(node) {
49605
+ return renderStack(node, this.getRenderContext());
49606
+ }
49607
+ renderRelative(node) {
49608
+ return renderRelative(node, this.getRenderContext());
49609
+ }
49519
49610
  /**
49520
49611
  * Build common inline styles for all values
49521
49612
  *
@@ -49678,6 +49769,9 @@ ${title}${children}
49678
49769
  if (commonStyles) {
49679
49770
  styles.push(commonStyles);
49680
49771
  }
49772
+ if (node.w !== void 0 && node.flex === void 0) {
49773
+ styles.push("flex: none");
49774
+ }
49681
49775
  if (node.order !== void 0) {
49682
49776
  styles.push(`order: ${node.order}`);
49683
49777
  }
@@ -169,6 +169,36 @@ interface ColNode extends BaseNode, CommonProps {
169
169
  scroll?: boolean;
170
170
  children: AnyNode[];
171
171
  }
172
+ /**
173
+ * Stack - Vertical content grouping container
174
+ *
175
+ * Unlike Col which fills available space (flex: 1),
176
+ * Stack only takes up the space needed by its content (flex: 0 0 auto).
177
+ *
178
+ * Use cases:
179
+ * - Grouping form fields vertically
180
+ * - Card content layout
181
+ * - Centering content with justify/align
182
+ */
183
+ interface StackNode extends BaseNode, CommonProps {
184
+ type: 'Stack';
185
+ children: AnyNode[];
186
+ }
187
+ /**
188
+ * Relative - Position children with absolute positioning
189
+ *
190
+ * Creates a position: relative container.
191
+ * First child is the base element, subsequent children are overlaid on top.
192
+ * Child elements can use `anchor` attribute to specify position:
193
+ * - top-left, top-center, top-right
194
+ * - center-left, center, center-right
195
+ * - bottom-left, bottom-center, bottom-right
196
+ */
197
+ interface RelativeNode extends BaseNode, CommonProps {
198
+ type: 'Relative';
199
+ children: AnyNode[];
200
+ }
201
+ type AnchorPosition = 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
172
202
  type ShadowValue = 'none' | 'sm' | 'md' | 'lg' | 'xl';
173
203
  interface CardNode extends BaseNode, CommonProps, InteractiveProps {
174
204
  type: 'Card';
@@ -330,6 +360,8 @@ interface BadgeNode extends BaseNode, CommonProps, InteractiveProps {
330
360
  pill?: boolean;
331
361
  icon?: string;
332
362
  size?: BadgeSize;
363
+ /** Anchor position when inside an overlay container */
364
+ anchor?: AnchorPosition;
333
365
  }
334
366
  type IconSizeToken = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
335
367
  type IconSize = IconSizeToken | number | ValueWithUnit;
@@ -475,7 +507,7 @@ interface DividerComponentNode extends BaseNode, CommonProps {
475
507
  type: 'Divider';
476
508
  }
477
509
  type LayoutNode = PageNode | HeaderNode | MainNode | FooterNode | SidebarNode | SectionNode;
478
- type GridNode = RowNode | ColNode;
510
+ type GridNode = RowNode | ColNode | StackNode | RelativeNode;
479
511
  type ContainerComponentNode = CardNode | ModalNode | DrawerNode | AccordionNode;
480
512
  type TextContentNode = TextNode | TitleNode | LinkNode;
481
513
  type InputComponentNode = InputNode | TextareaNode | SelectNode | CheckboxNode | RadioNode | SwitchNode | SliderNode;
@@ -487,6 +519,6 @@ type NavigationNode = NavNode | TabsNode | BreadcrumbNode;
487
519
  type ContainerNode = LayoutNode | GridNode | ContainerComponentNode | PopoverNode | TooltipNode;
488
520
  type LeafNode = TextContentNode | InputComponentNode | ButtonNode | DisplayNode | DataNode | FeedbackNode | DropdownNode | NavigationNode | DividerComponentNode;
489
521
  type AnyNode = ContainerNode | LeafNode;
490
- 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';
522
+ 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';
491
523
 
492
- export type { ToastNode as $, AnyNode as A, BadgeNode as B, CardNode as C, DataNode as D, RowNode as E, FeedbackNode as F, GridNode as G, HeaderNode as H, IconNode as I, SelectNode as J, SidebarNode as K, LayoutNode as L, MainNode as M, NavNode as N, OverlayNode as O, PageNode as P, SliderNode as Q, RadioNode as R, SectionNode as S, SpinnerNode as T, SwitchNode as U, TableNode as V, TabsNode as W, TextContentNode as X, TextNode as Y, TextareaNode as Z, TitleNode as _, AccordionNode as a, TooltipNode as a0, WireframeDocument as a1, AlertVariant as a2, AlignValue as a3, AppearanceProps as a4, AvatarSize as a5, AvatarSizeToken as a6, BadgeSize as a7, BadgeSizeToken as a8, BadgeVariant as a9, SelectOption as aA, ShadowValue as aB, SizeProps as aC, SourceLocation as aD, SpacingProps as aE, SpacingValue as aF, SpinnerSize as aG, SpinnerSizeToken as aH, TabNode as aI, TextAlign as aJ, TextSize as aK, TextSizeToken as aL, TextWeight as aM, TitleLevel as aN, ToastPosition as aO, TooltipPosition as aP, ValueWithUnit as aQ, WidthValue as aR, BaseNode as aa, BreadcrumbItem as ab, ButtonSize as ac, ButtonSizeToken as ad, ButtonVariant as ae, CommonProps as af, DirectionValue as ag, DividerNode as ah, DrawerPosition as ai, DropdownItemNode as aj, FlexProps as ak, GridProps as al, HeightValue as am, IconSize as an, IconSizeToken as ao, InputType as ap, InteractiveProps as aq, JustifyValue as ar, ListItemNode as as, NavBlockItem as at, NavChild as au, NavDivider as av, NavGroupNode as aw, NavItem as ax, Position as ay, PositionProps as az, AlertNode as b, AvatarNode as c, BreadcrumbNode as d, ButtonNode as e, CheckboxNode as f, ColNode as g, ContainerComponentNode as h, ContainerNode as i, DisplayNode as j, DividerComponentNode as k, DrawerNode as l, DropdownNode as m, FooterNode as n, ImageNode as o, InputComponentNode as p, InputNode as q, LeafNode as r, LinkNode as s, ListNode as t, ModalNode as u, NavigationNode as v, NodeType as w, PlaceholderNode as x, PopoverNode as y, ProgressNode as z };
524
+ export type { ToastNode as $, AnyNode as A, BadgeNode as B, CardNode as C, DataNode as D, RowNode as E, FeedbackNode as F, GridNode as G, HeaderNode as H, IconNode as I, SelectNode as J, SidebarNode as K, LayoutNode as L, MainNode as M, NavNode as N, OverlayNode as O, PageNode as P, SliderNode as Q, RadioNode as R, SectionNode as S, SpinnerNode as T, SwitchNode as U, TableNode as V, TabsNode as W, TextContentNode as X, TextNode as Y, TextareaNode as Z, TitleNode as _, AccordionNode as a, TooltipNode as a0, WireframeDocument as a1, AlertVariant as a2, AlignValue as a3, AnchorPosition as a4, AppearanceProps as a5, AvatarSize as a6, AvatarSizeToken as a7, BadgeSize as a8, BadgeSizeToken as a9, PositionProps as aA, RelativeNode as aB, SelectOption as aC, ShadowValue as aD, SizeProps as aE, SourceLocation as aF, SpacingProps as aG, SpacingValue as aH, SpinnerSize as aI, SpinnerSizeToken as aJ, StackNode as aK, TabNode as aL, TextAlign as aM, TextSize as aN, TextSizeToken as aO, TextWeight as aP, TitleLevel as aQ, ToastPosition as aR, TooltipPosition as aS, ValueWithUnit as aT, WidthValue as aU, BadgeVariant as aa, BaseNode as ab, BreadcrumbItem as ac, ButtonSize as ad, ButtonSizeToken as ae, ButtonVariant as af, CommonProps as ag, DirectionValue as ah, DividerNode as ai, DrawerPosition as aj, DropdownItemNode as ak, FlexProps as al, GridProps as am, HeightValue as an, IconSize as ao, IconSizeToken as ap, InputType as aq, InteractiveProps as ar, JustifyValue as as, ListItemNode as at, NavBlockItem as au, NavChild as av, NavDivider as aw, NavGroupNode as ax, NavItem as ay, Position as az, AlertNode as b, AvatarNode as c, BreadcrumbNode as d, ButtonNode as e, CheckboxNode as f, ColNode as g, ContainerComponentNode as h, ContainerNode as i, DisplayNode as j, DividerComponentNode as k, DrawerNode as l, DropdownNode as m, FooterNode as n, ImageNode as o, InputComponentNode as p, InputNode as q, LeafNode as r, LinkNode as s, ListNode as t, ModalNode as u, NavigationNode as v, NodeType as w, PlaceholderNode as x, PopoverNode as y, ProgressNode as z };
@@ -169,6 +169,36 @@ interface ColNode extends BaseNode, CommonProps {
169
169
  scroll?: boolean;
170
170
  children: AnyNode[];
171
171
  }
172
+ /**
173
+ * Stack - Vertical content grouping container
174
+ *
175
+ * Unlike Col which fills available space (flex: 1),
176
+ * Stack only takes up the space needed by its content (flex: 0 0 auto).
177
+ *
178
+ * Use cases:
179
+ * - Grouping form fields vertically
180
+ * - Card content layout
181
+ * - Centering content with justify/align
182
+ */
183
+ interface StackNode extends BaseNode, CommonProps {
184
+ type: 'Stack';
185
+ children: AnyNode[];
186
+ }
187
+ /**
188
+ * Relative - Position children with absolute positioning
189
+ *
190
+ * Creates a position: relative container.
191
+ * First child is the base element, subsequent children are overlaid on top.
192
+ * Child elements can use `anchor` attribute to specify position:
193
+ * - top-left, top-center, top-right
194
+ * - center-left, center, center-right
195
+ * - bottom-left, bottom-center, bottom-right
196
+ */
197
+ interface RelativeNode extends BaseNode, CommonProps {
198
+ type: 'Relative';
199
+ children: AnyNode[];
200
+ }
201
+ type AnchorPosition = 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
172
202
  type ShadowValue = 'none' | 'sm' | 'md' | 'lg' | 'xl';
173
203
  interface CardNode extends BaseNode, CommonProps, InteractiveProps {
174
204
  type: 'Card';
@@ -330,6 +360,8 @@ interface BadgeNode extends BaseNode, CommonProps, InteractiveProps {
330
360
  pill?: boolean;
331
361
  icon?: string;
332
362
  size?: BadgeSize;
363
+ /** Anchor position when inside an overlay container */
364
+ anchor?: AnchorPosition;
333
365
  }
334
366
  type IconSizeToken = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
335
367
  type IconSize = IconSizeToken | number | ValueWithUnit;
@@ -475,7 +507,7 @@ interface DividerComponentNode extends BaseNode, CommonProps {
475
507
  type: 'Divider';
476
508
  }
477
509
  type LayoutNode = PageNode | HeaderNode | MainNode | FooterNode | SidebarNode | SectionNode;
478
- type GridNode = RowNode | ColNode;
510
+ type GridNode = RowNode | ColNode | StackNode | RelativeNode;
479
511
  type ContainerComponentNode = CardNode | ModalNode | DrawerNode | AccordionNode;
480
512
  type TextContentNode = TextNode | TitleNode | LinkNode;
481
513
  type InputComponentNode = InputNode | TextareaNode | SelectNode | CheckboxNode | RadioNode | SwitchNode | SliderNode;
@@ -487,6 +519,6 @@ type NavigationNode = NavNode | TabsNode | BreadcrumbNode;
487
519
  type ContainerNode = LayoutNode | GridNode | ContainerComponentNode | PopoverNode | TooltipNode;
488
520
  type LeafNode = TextContentNode | InputComponentNode | ButtonNode | DisplayNode | DataNode | FeedbackNode | DropdownNode | NavigationNode | DividerComponentNode;
489
521
  type AnyNode = ContainerNode | LeafNode;
490
- 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';
522
+ 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';
491
523
 
492
- export type { ToastNode as $, AnyNode as A, BadgeNode as B, CardNode as C, DataNode as D, RowNode as E, FeedbackNode as F, GridNode as G, HeaderNode as H, IconNode as I, SelectNode as J, SidebarNode as K, LayoutNode as L, MainNode as M, NavNode as N, OverlayNode as O, PageNode as P, SliderNode as Q, RadioNode as R, SectionNode as S, SpinnerNode as T, SwitchNode as U, TableNode as V, TabsNode as W, TextContentNode as X, TextNode as Y, TextareaNode as Z, TitleNode as _, AccordionNode as a, TooltipNode as a0, WireframeDocument as a1, AlertVariant as a2, AlignValue as a3, AppearanceProps as a4, AvatarSize as a5, AvatarSizeToken as a6, BadgeSize as a7, BadgeSizeToken as a8, BadgeVariant as a9, SelectOption as aA, ShadowValue as aB, SizeProps as aC, SourceLocation as aD, SpacingProps as aE, SpacingValue as aF, SpinnerSize as aG, SpinnerSizeToken as aH, TabNode as aI, TextAlign as aJ, TextSize as aK, TextSizeToken as aL, TextWeight as aM, TitleLevel as aN, ToastPosition as aO, TooltipPosition as aP, ValueWithUnit as aQ, WidthValue as aR, BaseNode as aa, BreadcrumbItem as ab, ButtonSize as ac, ButtonSizeToken as ad, ButtonVariant as ae, CommonProps as af, DirectionValue as ag, DividerNode as ah, DrawerPosition as ai, DropdownItemNode as aj, FlexProps as ak, GridProps as al, HeightValue as am, IconSize as an, IconSizeToken as ao, InputType as ap, InteractiveProps as aq, JustifyValue as ar, ListItemNode as as, NavBlockItem as at, NavChild as au, NavDivider as av, NavGroupNode as aw, NavItem as ax, Position as ay, PositionProps as az, AlertNode as b, AvatarNode as c, BreadcrumbNode as d, ButtonNode as e, CheckboxNode as f, ColNode as g, ContainerComponentNode as h, ContainerNode as i, DisplayNode as j, DividerComponentNode as k, DrawerNode as l, DropdownNode as m, FooterNode as n, ImageNode as o, InputComponentNode as p, InputNode as q, LeafNode as r, LinkNode as s, ListNode as t, ModalNode as u, NavigationNode as v, NodeType as w, PlaceholderNode as x, PopoverNode as y, ProgressNode as z };
524
+ export type { ToastNode as $, AnyNode as A, BadgeNode as B, CardNode as C, DataNode as D, RowNode as E, FeedbackNode as F, GridNode as G, HeaderNode as H, IconNode as I, SelectNode as J, SidebarNode as K, LayoutNode as L, MainNode as M, NavNode as N, OverlayNode as O, PageNode as P, SliderNode as Q, RadioNode as R, SectionNode as S, SpinnerNode as T, SwitchNode as U, TableNode as V, TabsNode as W, TextContentNode as X, TextNode as Y, TextareaNode as Z, TitleNode as _, AccordionNode as a, TooltipNode as a0, WireframeDocument as a1, AlertVariant as a2, AlignValue as a3, AnchorPosition as a4, AppearanceProps as a5, AvatarSize as a6, AvatarSizeToken as a7, BadgeSize as a8, BadgeSizeToken as a9, PositionProps as aA, RelativeNode as aB, SelectOption as aC, ShadowValue as aD, SizeProps as aE, SourceLocation as aF, SpacingProps as aG, SpacingValue as aH, SpinnerSize as aI, SpinnerSizeToken as aJ, StackNode as aK, TabNode as aL, TextAlign as aM, TextSize as aN, TextSizeToken as aO, TextWeight as aP, TitleLevel as aQ, ToastPosition as aR, TooltipPosition as aS, ValueWithUnit as aT, WidthValue as aU, BadgeVariant as aa, BaseNode as ab, BreadcrumbItem as ac, ButtonSize as ad, ButtonSizeToken as ae, ButtonVariant as af, CommonProps as ag, DirectionValue as ah, DividerNode as ai, DrawerPosition as aj, DropdownItemNode as ak, FlexProps as al, GridProps as am, HeightValue as an, IconSize as ao, IconSizeToken as ap, InputType as aq, InteractiveProps as ar, JustifyValue as as, ListItemNode as at, NavBlockItem as au, NavChild as av, NavDivider as aw, NavGroupNode as ax, NavItem as ay, Position as az, AlertNode as b, AvatarNode as c, BreadcrumbNode as d, ButtonNode as e, CheckboxNode as f, ColNode as g, ContainerComponentNode as h, ContainerNode as i, DisplayNode as j, DividerComponentNode as k, DrawerNode as l, DropdownNode as m, FooterNode as n, ImageNode as o, InputComponentNode as p, InputNode as q, LeafNode as r, LinkNode as s, ListNode as t, ModalNode as u, NavigationNode as v, NodeType as w, PlaceholderNode as x, PopoverNode as y, ProgressNode as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wireweave/core",
3
- "version": "2.3.1",
3
+ "version": "2.4.0",
4
4
  "description": "Core parser and renderer for wireweave",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",