@wireweave/core 2.1.0-beta.0 → 2.2.0-beta.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/index.cjs CHANGED
@@ -8242,15 +8242,28 @@ ${html}
8242
8242
  function buildClassString(classes) {
8243
8243
  return classes.filter(Boolean).join(" ");
8244
8244
  }
8245
+ function isValueWithUnit(value) {
8246
+ return typeof value === "object" && value !== null && "value" in value && "unit" in value;
8247
+ }
8245
8248
  var SIZE_TOKENS = {
8246
8249
  icon: { xs: 12, sm: 14, md: 16, lg: 20, xl: 24 },
8247
8250
  avatar: { xs: 24, sm: 32, md: 40, lg: 48, xl: 64 },
8248
- spinner: { xs: 12, sm: 16, md: 24, lg: 32, xl: 48 }
8251
+ spinner: { xs: 12, sm: 16, md: 24, lg: 32, xl: 48 },
8252
+ button: { xs: 12, sm: 14, md: 16, lg: 18, xl: 20 },
8253
+ badge: { xs: 10, sm: 12, md: 14, lg: 16, xl: 18 }
8249
8254
  };
8255
+ var FONT_SIZED_COMPONENTS = ["button", "badge"];
8250
8256
  function resolveSizeValue(size, componentType, prefix) {
8251
8257
  if (size === void 0) {
8252
8258
  return {};
8253
8259
  }
8260
+ if (isValueWithUnit(size)) {
8261
+ const cssValue = `${size.value}${size.unit}`;
8262
+ if (FONT_SIZED_COMPONENTS.includes(componentType)) {
8263
+ return { style: `font-size: ${cssValue}` };
8264
+ }
8265
+ return { style: `width: ${cssValue}; height: ${cssValue}` };
8266
+ }
8254
8267
  if (typeof size === "string") {
8255
8268
  const tokens = SIZE_TOKENS[componentType];
8256
8269
  if (size in tokens) {
@@ -8258,12 +8271,18 @@ function resolveSizeValue(size, componentType, prefix) {
8258
8271
  }
8259
8272
  const parsed = parseInt(size, 10);
8260
8273
  if (!isNaN(parsed)) {
8261
- return { style: `width: ${parsed}px; height: ${parsed}px;` };
8274
+ if (FONT_SIZED_COMPONENTS.includes(componentType)) {
8275
+ return { style: `font-size: ${parsed}px` };
8276
+ }
8277
+ return { style: `width: ${parsed}px; height: ${parsed}px` };
8262
8278
  }
8263
8279
  return {};
8264
8280
  }
8265
8281
  if (typeof size === "number") {
8266
- return { style: `width: ${size}px; height: ${size}px;` };
8282
+ if (FONT_SIZED_COMPONENTS.includes(componentType)) {
8283
+ return { style: `font-size: ${size}px` };
8284
+ }
8285
+ return { style: `width: ${size}px; height: ${size}px` };
8267
8286
  }
8268
8287
  return {};
8269
8288
  }
@@ -8450,16 +8469,45 @@ ${children}
8450
8469
  }
8451
8470
 
8452
8471
  // src/renderer/html/renderers/text.ts
8472
+ function isValueWithUnit2(value) {
8473
+ return typeof value === "object" && value !== null && "value" in value && "unit" in value;
8474
+ }
8475
+ function isCustomSize(size) {
8476
+ if (size === void 0) return false;
8477
+ return typeof size === "number" || isValueWithUnit2(size);
8478
+ }
8479
+ function resolveCustomFontSize(size) {
8480
+ if (size === void 0) return void 0;
8481
+ if (isValueWithUnit2(size)) {
8482
+ return `${size.value}${size.unit}`;
8483
+ }
8484
+ if (typeof size === "number") {
8485
+ return `${size}px`;
8486
+ }
8487
+ return void 0;
8488
+ }
8489
+ function getSizeClassName(size, prefix) {
8490
+ if (size === void 0) return void 0;
8491
+ if (isCustomSize(size)) {
8492
+ return void 0;
8493
+ }
8494
+ return `${prefix}-text-${size}`;
8495
+ }
8453
8496
  function renderText(node, ctx) {
8454
8497
  const classes = ctx.buildClassString([
8455
8498
  `${ctx.prefix}-text`,
8456
- node.size ? `${ctx.prefix}-text-${node.size}` : void 0,
8499
+ getSizeClassName(node.size, ctx.prefix),
8457
8500
  node.weight ? `${ctx.prefix}-text-${node.weight}` : void 0,
8458
8501
  node.align ? `${ctx.prefix}-text-${node.align}` : void 0,
8459
8502
  node.muted ? `${ctx.prefix}-text-muted` : void 0,
8460
8503
  ...ctx.getCommonClasses(node)
8461
8504
  ]);
8462
- const styles = ctx.buildCommonStyles(node);
8505
+ const stylesParts = [];
8506
+ const commonStyles = ctx.buildCommonStyles(node);
8507
+ if (commonStyles) stylesParts.push(commonStyles);
8508
+ const customFontSize = resolveCustomFontSize(node.size);
8509
+ if (customFontSize) stylesParts.push(`font-size: ${customFontSize}`);
8510
+ const styles = stylesParts.join("; ");
8463
8511
  const styleAttr = styles ? ` style="${styles}"` : "";
8464
8512
  return `<p class="${classes}"${styleAttr}>${ctx.escapeHtml(node.content)}</p>`;
8465
8513
  }
@@ -8468,11 +8516,16 @@ function renderTitle(node, ctx) {
8468
8516
  const tag = `h${level}`;
8469
8517
  const classes = ctx.buildClassString([
8470
8518
  `${ctx.prefix}-title`,
8471
- node.size ? `${ctx.prefix}-text-${node.size}` : void 0,
8519
+ getSizeClassName(node.size, ctx.prefix),
8472
8520
  node.align ? `${ctx.prefix}-text-${node.align}` : void 0,
8473
8521
  ...ctx.getCommonClasses(node)
8474
8522
  ]);
8475
- const styles = ctx.buildCommonStyles(node);
8523
+ const stylesParts = [];
8524
+ const commonStyles = ctx.buildCommonStyles(node);
8525
+ if (commonStyles) stylesParts.push(commonStyles);
8526
+ const customFontSize = resolveCustomFontSize(node.size);
8527
+ if (customFontSize) stylesParts.push(`font-size: ${customFontSize}`);
8528
+ const styles = stylesParts.join("; ");
8476
8529
  const styleAttr = styles ? ` style="${styles}"` : "";
8477
8530
  return `<${tag} class="${classes}"${styleAttr}>${ctx.escapeHtml(node.content)}</${tag}>`;
8478
8531
  }
@@ -54901,6 +54954,7 @@ function renderIconSvg(data, _size = 24, strokeWidth = 2, className = "", styleA
54901
54954
  // src/renderer/html/renderers/button.ts
54902
54955
  function renderButton(node, ctx) {
54903
54956
  const isIconOnly = node.icon && (!node.content.trim() || node.content === "Button");
54957
+ const sizeResolved = resolveSizeValue(node.size, "button", ctx.prefix);
54904
54958
  const classes = ctx.buildClassString([
54905
54959
  `${ctx.prefix}-button`,
54906
54960
  node.primary ? `${ctx.prefix}-button-primary` : void 0,
@@ -54908,14 +54962,16 @@ function renderButton(node, ctx) {
54908
54962
  node.outline ? `${ctx.prefix}-button-outline` : void 0,
54909
54963
  node.ghost ? `${ctx.prefix}-button-ghost` : void 0,
54910
54964
  node.danger ? `${ctx.prefix}-button-danger` : void 0,
54911
- node.size ? `${ctx.prefix}-button-${node.size}` : void 0,
54965
+ sizeResolved.className,
54912
54966
  node.disabled ? `${ctx.prefix}-button-disabled` : void 0,
54913
54967
  node.loading ? `${ctx.prefix}-button-loading` : void 0,
54914
54968
  isIconOnly ? `${ctx.prefix}-button-icon-only` : void 0,
54915
54969
  ...ctx.getCommonClasses(node)
54916
54970
  ]);
54917
- const styles = ctx.buildCommonStyles(node);
54918
- const styleAttr = styles ? ` style="${styles}"` : "";
54971
+ const baseStyles = ctx.buildCommonStyles(node);
54972
+ const sizeStyle = sizeResolved.style || "";
54973
+ const combinedStyles = baseStyles && sizeStyle ? `${baseStyles}; ${sizeStyle}` : baseStyles || sizeStyle;
54974
+ const styleAttr = combinedStyles ? ` style="${combinedStyles}"` : "";
54919
54975
  const attrs = {
54920
54976
  class: classes,
54921
54977
  disabled: node.disabled,
@@ -55237,16 +55293,19 @@ function renderAvatar(node, ctx) {
55237
55293
  function renderBadge(node, ctx) {
55238
55294
  const interactiveAttrs = buildInteractiveAttrs2(node);
55239
55295
  const interactiveAttrStr = ctx.buildAttrsString(interactiveAttrs);
55296
+ const sizeResolved = resolveSizeValue(node.size, "badge", ctx.prefix);
55240
55297
  if (node.icon) {
55241
55298
  const iconData = getIconData(node.icon);
55242
55299
  const classes2 = ctx.buildClassString([
55243
55300
  `${ctx.prefix}-badge-icon`,
55244
- node.size ? `${ctx.prefix}-badge-icon-${node.size}` : void 0,
55301
+ sizeResolved.className,
55245
55302
  node.variant ? `${ctx.prefix}-badge-icon-${node.variant}` : void 0,
55246
55303
  ...ctx.getCommonClasses(node)
55247
55304
  ]);
55248
- const styles2 = ctx.buildCommonStyles(node);
55249
- const styleAttr2 = styles2 ? ` style="${styles2}"` : "";
55305
+ const baseStyles2 = ctx.buildCommonStyles(node);
55306
+ const sizeStyle2 = sizeResolved.style || "";
55307
+ const combinedStyles2 = baseStyles2 && sizeStyle2 ? `${baseStyles2}; ${sizeStyle2}` : baseStyles2 || sizeStyle2;
55308
+ const styleAttr2 = combinedStyles2 ? ` style="${combinedStyles2}"` : "";
55250
55309
  if (iconData) {
55251
55310
  const svg = renderIconSvg(iconData, 24, 2, `${ctx.prefix}-icon`);
55252
55311
  return `<span class="${classes2}"${styleAttr2}${interactiveAttrStr} aria-label="${ctx.escapeHtml(node.icon)}">${svg}</span>`;
@@ -55257,12 +55316,15 @@ function renderBadge(node, ctx) {
55257
55316
  const classes = ctx.buildClassString([
55258
55317
  `${ctx.prefix}-badge`,
55259
55318
  isDot ? `${ctx.prefix}-badge-dot` : void 0,
55319
+ sizeResolved.className,
55260
55320
  node.variant ? `${ctx.prefix}-badge-${node.variant}` : void 0,
55261
55321
  node.pill ? `${ctx.prefix}-badge-pill` : void 0,
55262
55322
  ...ctx.getCommonClasses(node)
55263
55323
  ]);
55264
- const styles = ctx.buildCommonStyles(node);
55265
- const styleAttr = styles ? ` style="${styles}"` : "";
55324
+ const baseStyles = ctx.buildCommonStyles(node);
55325
+ const sizeStyle = sizeResolved.style || "";
55326
+ const combinedStyles = baseStyles && sizeStyle ? `${baseStyles}; ${sizeStyle}` : baseStyles || sizeStyle;
55327
+ const styleAttr = combinedStyles ? ` style="${combinedStyles}"` : "";
55266
55328
  return `<span class="${classes}"${styleAttr}${interactiveAttrStr}>${ctx.escapeHtml(node.content)}</span>`;
55267
55329
  }
55268
55330
  function renderIcon(node, ctx) {
@@ -55616,12 +55678,12 @@ function resolveSpacingValue(value) {
55616
55678
  }
55617
55679
  return void 0;
55618
55680
  }
55619
- function isValueWithUnit(value) {
55681
+ function isValueWithUnit3(value) {
55620
55682
  return typeof value === "object" && value !== null && "value" in value && "unit" in value;
55621
55683
  }
55622
55684
  function resolveSizeValueToCss(value) {
55623
55685
  if (value === void 0) return void 0;
55624
- if (isValueWithUnit(value)) {
55686
+ if (isValueWithUnit3(value)) {
55625
55687
  return `${value.value}${value.unit}`;
55626
55688
  }
55627
55689
  if (typeof value === "number") {
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as AnyNode, a as AccordionNode, b as AlertNode, c as AvatarNode, B as BadgeNode, d as BreadcrumbNode, e as ButtonNode, C as CardNode, f as CheckboxNode, g as ColNode, h as ContainerComponentNode, i as ContainerNode, D as DataNode, j as DisplayNode, k as DividerComponentNode, l as DrawerNode, m as DropdownNode, F as FeedbackNode, n as FooterNode, G as GridNode, H as HeaderNode, I as IconNode, o as ImageNode, p as InputComponentNode, q as InputNode, L as LayoutNode, r as LeafNode, s as LinkNode, t as ListNode, M as MainNode, u as ModalNode, N as NavNode, v as NavigationNode, w as NodeType, O as OverlayNode, P as PageNode, x as PlaceholderNode, y as PopoverNode, z as ProgressNode, R as RadioNode, E as RowNode, S as SectionNode, J as SelectNode, K as SidebarNode, Q as SliderNode, T as SpinnerNode, U as SwitchNode, V as TableNode, W as TabsNode, X as TextContentNode, Y as TextNode, Z as TextareaNode, _ as TitleNode, $ as ToastNode, a0 as TooltipNode, a1 as WireframeDocument } from './types--qrZlQMM.cjs';
2
- export { a2 as AlertVariant, a3 as AlignValue, a4 as AvatarSize, a5 as BadgeSize, a6 as BadgeVariant, a7 as BaseNode, a8 as BreadcrumbItem, a9 as ButtonSize, aa as ButtonVariant, ab as CommonProps, ac as DirectionValue, ad as DividerNode, ae as DrawerPosition, af as DropdownItemNode, ag as FlexProps, ah as GridProps, ai as HeightValue, aj as IconSize, ak as InputType, al as InteractiveProps, am as JustifyValue, an as ListItemNode, ao as NavBlockItem, ap as NavChild, aq as NavDivider, ar as NavGroupNode, as as NavItem, at as Position, au as PositionProps, av as SelectOption, aw as ShadowValue, ax as SizeProps, ay as SourceLocation, az as SpacingProps, aA as SpacingValue, aB as SpinnerSize, aC as TabNode, aD as TextAlign, aE as TextSize, aF as TextSizeToken, aG as TextWeight, aH as TitleLevel, aI as ToastPosition, aJ as TooltipPosition, aK as ValueWithUnit, aL as WidthValue } from './types--qrZlQMM.cjs';
1
+ import { A as AnyNode, a as AccordionNode, b as AlertNode, c as AvatarNode, B as BadgeNode, d as BreadcrumbNode, e as ButtonNode, C as CardNode, f as CheckboxNode, g as ColNode, h as ContainerComponentNode, i as ContainerNode, D as DataNode, j as DisplayNode, k as DividerComponentNode, l as DrawerNode, m as DropdownNode, F as FeedbackNode, n as FooterNode, G as GridNode, H as HeaderNode, I as IconNode, o as ImageNode, p as InputComponentNode, q as InputNode, L as LayoutNode, r as LeafNode, s as LinkNode, t as ListNode, M as MainNode, u as ModalNode, N as NavNode, v as NavigationNode, w as NodeType, O as OverlayNode, P as PageNode, x as PlaceholderNode, y as PopoverNode, z as ProgressNode, R as RadioNode, E as RowNode, S as SectionNode, J as SelectNode, K as SidebarNode, Q as SliderNode, T as SpinnerNode, U as SwitchNode, V as TableNode, W as TabsNode, X as TextContentNode, Y as TextNode, Z as TextareaNode, _ as TitleNode, $ as ToastNode, a0 as TooltipNode, a1 as WireframeDocument } from './types-D0G2UKwM.cjs';
2
+ export { a2 as AlertVariant, a3 as AlignValue, a4 as AvatarSize, a5 as AvatarSizeToken, a6 as BadgeSize, a7 as BadgeSizeToken, a8 as BadgeVariant, a9 as BaseNode, aa as BreadcrumbItem, ab as ButtonSize, ac as ButtonSizeToken, ad as ButtonVariant, ae as CommonProps, af as DirectionValue, ag as DividerNode, ah as DrawerPosition, ai as DropdownItemNode, aj as FlexProps, ak as GridProps, al as HeightValue, am as IconSize, an as IconSizeToken, ao as InputType, ap as InteractiveProps, aq as JustifyValue, ar as ListItemNode, as as NavBlockItem, at as NavChild, au as NavDivider, av as NavGroupNode, aw as NavItem, ax as Position, ay as PositionProps, az as SelectOption, aA as ShadowValue, aB as SizeProps, aC as SourceLocation, aD as SpacingProps, aE as SpacingValue, aF as SpinnerSize, aG as SpinnerSizeToken, aH as TabNode, aI as TextAlign, aJ as TextSize, aK as TextSizeToken, aL as TextWeight, aM as TitleLevel, aN as ToastPosition, aO as TooltipPosition, aP as ValueWithUnit, aQ as WidthValue } from './types-D0G2UKwM.cjs';
3
3
  export { ExpectedToken, ParseError, ParseErrorInfo, ParseOptions, ParseResult, getErrors, isValid, parse, tryParse } from './parser.cjs';
4
4
  export { HtmlRenderer, IconData, IconElement, RenderContext, RenderOptions, RenderResult, SvgRenderOptions, SvgRenderResult, ThemeColors, ThemeConfig, createHtmlRenderer, darkTheme, defaultTheme, generateComponentStyles, generateStyles, getIconData, getTheme, lucideIcons, render, renderIconSvg, renderToHtml, renderToSvg } from './renderer.cjs';
5
5
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as AnyNode, a as AccordionNode, b as AlertNode, c as AvatarNode, B as BadgeNode, d as BreadcrumbNode, e as ButtonNode, C as CardNode, f as CheckboxNode, g as ColNode, h as ContainerComponentNode, i as ContainerNode, D as DataNode, j as DisplayNode, k as DividerComponentNode, l as DrawerNode, m as DropdownNode, F as FeedbackNode, n as FooterNode, G as GridNode, H as HeaderNode, I as IconNode, o as ImageNode, p as InputComponentNode, q as InputNode, L as LayoutNode, r as LeafNode, s as LinkNode, t as ListNode, M as MainNode, u as ModalNode, N as NavNode, v as NavigationNode, w as NodeType, O as OverlayNode, P as PageNode, x as PlaceholderNode, y as PopoverNode, z as ProgressNode, R as RadioNode, E as RowNode, S as SectionNode, J as SelectNode, K as SidebarNode, Q as SliderNode, T as SpinnerNode, U as SwitchNode, V as TableNode, W as TabsNode, X as TextContentNode, Y as TextNode, Z as TextareaNode, _ as TitleNode, $ as ToastNode, a0 as TooltipNode, a1 as WireframeDocument } from './types--qrZlQMM.js';
2
- export { a2 as AlertVariant, a3 as AlignValue, a4 as AvatarSize, a5 as BadgeSize, a6 as BadgeVariant, a7 as BaseNode, a8 as BreadcrumbItem, a9 as ButtonSize, aa as ButtonVariant, ab as CommonProps, ac as DirectionValue, ad as DividerNode, ae as DrawerPosition, af as DropdownItemNode, ag as FlexProps, ah as GridProps, ai as HeightValue, aj as IconSize, ak as InputType, al as InteractiveProps, am as JustifyValue, an as ListItemNode, ao as NavBlockItem, ap as NavChild, aq as NavDivider, ar as NavGroupNode, as as NavItem, at as Position, au as PositionProps, av as SelectOption, aw as ShadowValue, ax as SizeProps, ay as SourceLocation, az as SpacingProps, aA as SpacingValue, aB as SpinnerSize, aC as TabNode, aD as TextAlign, aE as TextSize, aF as TextSizeToken, aG as TextWeight, aH as TitleLevel, aI as ToastPosition, aJ as TooltipPosition, aK as ValueWithUnit, aL as WidthValue } from './types--qrZlQMM.js';
1
+ import { A as AnyNode, a as AccordionNode, b as AlertNode, c as AvatarNode, B as BadgeNode, d as BreadcrumbNode, e as ButtonNode, C as CardNode, f as CheckboxNode, g as ColNode, h as ContainerComponentNode, i as ContainerNode, D as DataNode, j as DisplayNode, k as DividerComponentNode, l as DrawerNode, m as DropdownNode, F as FeedbackNode, n as FooterNode, G as GridNode, H as HeaderNode, I as IconNode, o as ImageNode, p as InputComponentNode, q as InputNode, L as LayoutNode, r as LeafNode, s as LinkNode, t as ListNode, M as MainNode, u as ModalNode, N as NavNode, v as NavigationNode, w as NodeType, O as OverlayNode, P as PageNode, x as PlaceholderNode, y as PopoverNode, z as ProgressNode, R as RadioNode, E as RowNode, S as SectionNode, J as SelectNode, K as SidebarNode, Q as SliderNode, T as SpinnerNode, U as SwitchNode, V as TableNode, W as TabsNode, X as TextContentNode, Y as TextNode, Z as TextareaNode, _ as TitleNode, $ as ToastNode, a0 as TooltipNode, a1 as WireframeDocument } from './types-D0G2UKwM.js';
2
+ export { a2 as AlertVariant, a3 as AlignValue, a4 as AvatarSize, a5 as AvatarSizeToken, a6 as BadgeSize, a7 as BadgeSizeToken, a8 as BadgeVariant, a9 as BaseNode, aa as BreadcrumbItem, ab as ButtonSize, ac as ButtonSizeToken, ad as ButtonVariant, ae as CommonProps, af as DirectionValue, ag as DividerNode, ah as DrawerPosition, ai as DropdownItemNode, aj as FlexProps, ak as GridProps, al as HeightValue, am as IconSize, an as IconSizeToken, ao as InputType, ap as InteractiveProps, aq as JustifyValue, ar as ListItemNode, as as NavBlockItem, at as NavChild, au as NavDivider, av as NavGroupNode, aw as NavItem, ax as Position, ay as PositionProps, az as SelectOption, aA as ShadowValue, aB as SizeProps, aC as SourceLocation, aD as SpacingProps, aE as SpacingValue, aF as SpinnerSize, aG as SpinnerSizeToken, aH as TabNode, aI as TextAlign, aJ as TextSize, aK as TextSizeToken, aL as TextWeight, aM as TitleLevel, aN as ToastPosition, aO as TooltipPosition, aP as ValueWithUnit, aQ as WidthValue } from './types-D0G2UKwM.js';
3
3
  export { ExpectedToken, ParseError, ParseErrorInfo, ParseOptions, ParseResult, getErrors, isValid, parse, tryParse } from './parser.js';
4
4
  export { HtmlRenderer, IconData, IconElement, RenderContext, RenderOptions, RenderResult, SvgRenderOptions, SvgRenderResult, ThemeColors, ThemeConfig, createHtmlRenderer, darkTheme, defaultTheme, generateComponentStyles, generateStyles, getIconData, getTheme, lucideIcons, render, renderIconSvg, renderToHtml, renderToSvg } from './renderer.js';
5
5
 
package/dist/index.js CHANGED
@@ -8102,15 +8102,28 @@ ${html}
8102
8102
  function buildClassString(classes) {
8103
8103
  return classes.filter(Boolean).join(" ");
8104
8104
  }
8105
+ function isValueWithUnit(value) {
8106
+ return typeof value === "object" && value !== null && "value" in value && "unit" in value;
8107
+ }
8105
8108
  var SIZE_TOKENS = {
8106
8109
  icon: { xs: 12, sm: 14, md: 16, lg: 20, xl: 24 },
8107
8110
  avatar: { xs: 24, sm: 32, md: 40, lg: 48, xl: 64 },
8108
- spinner: { xs: 12, sm: 16, md: 24, lg: 32, xl: 48 }
8111
+ spinner: { xs: 12, sm: 16, md: 24, lg: 32, xl: 48 },
8112
+ button: { xs: 12, sm: 14, md: 16, lg: 18, xl: 20 },
8113
+ badge: { xs: 10, sm: 12, md: 14, lg: 16, xl: 18 }
8109
8114
  };
8115
+ var FONT_SIZED_COMPONENTS = ["button", "badge"];
8110
8116
  function resolveSizeValue(size, componentType, prefix) {
8111
8117
  if (size === void 0) {
8112
8118
  return {};
8113
8119
  }
8120
+ if (isValueWithUnit(size)) {
8121
+ const cssValue = `${size.value}${size.unit}`;
8122
+ if (FONT_SIZED_COMPONENTS.includes(componentType)) {
8123
+ return { style: `font-size: ${cssValue}` };
8124
+ }
8125
+ return { style: `width: ${cssValue}; height: ${cssValue}` };
8126
+ }
8114
8127
  if (typeof size === "string") {
8115
8128
  const tokens = SIZE_TOKENS[componentType];
8116
8129
  if (size in tokens) {
@@ -8118,12 +8131,18 @@ function resolveSizeValue(size, componentType, prefix) {
8118
8131
  }
8119
8132
  const parsed = parseInt(size, 10);
8120
8133
  if (!isNaN(parsed)) {
8121
- return { style: `width: ${parsed}px; height: ${parsed}px;` };
8134
+ if (FONT_SIZED_COMPONENTS.includes(componentType)) {
8135
+ return { style: `font-size: ${parsed}px` };
8136
+ }
8137
+ return { style: `width: ${parsed}px; height: ${parsed}px` };
8122
8138
  }
8123
8139
  return {};
8124
8140
  }
8125
8141
  if (typeof size === "number") {
8126
- return { style: `width: ${size}px; height: ${size}px;` };
8142
+ if (FONT_SIZED_COMPONENTS.includes(componentType)) {
8143
+ return { style: `font-size: ${size}px` };
8144
+ }
8145
+ return { style: `width: ${size}px; height: ${size}px` };
8127
8146
  }
8128
8147
  return {};
8129
8148
  }
@@ -8310,16 +8329,45 @@ ${children}
8310
8329
  }
8311
8330
 
8312
8331
  // src/renderer/html/renderers/text.ts
8332
+ function isValueWithUnit2(value) {
8333
+ return typeof value === "object" && value !== null && "value" in value && "unit" in value;
8334
+ }
8335
+ function isCustomSize(size) {
8336
+ if (size === void 0) return false;
8337
+ return typeof size === "number" || isValueWithUnit2(size);
8338
+ }
8339
+ function resolveCustomFontSize(size) {
8340
+ if (size === void 0) return void 0;
8341
+ if (isValueWithUnit2(size)) {
8342
+ return `${size.value}${size.unit}`;
8343
+ }
8344
+ if (typeof size === "number") {
8345
+ return `${size}px`;
8346
+ }
8347
+ return void 0;
8348
+ }
8349
+ function getSizeClassName(size, prefix) {
8350
+ if (size === void 0) return void 0;
8351
+ if (isCustomSize(size)) {
8352
+ return void 0;
8353
+ }
8354
+ return `${prefix}-text-${size}`;
8355
+ }
8313
8356
  function renderText(node, ctx) {
8314
8357
  const classes = ctx.buildClassString([
8315
8358
  `${ctx.prefix}-text`,
8316
- node.size ? `${ctx.prefix}-text-${node.size}` : void 0,
8359
+ getSizeClassName(node.size, ctx.prefix),
8317
8360
  node.weight ? `${ctx.prefix}-text-${node.weight}` : void 0,
8318
8361
  node.align ? `${ctx.prefix}-text-${node.align}` : void 0,
8319
8362
  node.muted ? `${ctx.prefix}-text-muted` : void 0,
8320
8363
  ...ctx.getCommonClasses(node)
8321
8364
  ]);
8322
- const styles = ctx.buildCommonStyles(node);
8365
+ const stylesParts = [];
8366
+ const commonStyles = ctx.buildCommonStyles(node);
8367
+ if (commonStyles) stylesParts.push(commonStyles);
8368
+ const customFontSize = resolveCustomFontSize(node.size);
8369
+ if (customFontSize) stylesParts.push(`font-size: ${customFontSize}`);
8370
+ const styles = stylesParts.join("; ");
8323
8371
  const styleAttr = styles ? ` style="${styles}"` : "";
8324
8372
  return `<p class="${classes}"${styleAttr}>${ctx.escapeHtml(node.content)}</p>`;
8325
8373
  }
@@ -8328,11 +8376,16 @@ function renderTitle(node, ctx) {
8328
8376
  const tag = `h${level}`;
8329
8377
  const classes = ctx.buildClassString([
8330
8378
  `${ctx.prefix}-title`,
8331
- node.size ? `${ctx.prefix}-text-${node.size}` : void 0,
8379
+ getSizeClassName(node.size, ctx.prefix),
8332
8380
  node.align ? `${ctx.prefix}-text-${node.align}` : void 0,
8333
8381
  ...ctx.getCommonClasses(node)
8334
8382
  ]);
8335
- const styles = ctx.buildCommonStyles(node);
8383
+ const stylesParts = [];
8384
+ const commonStyles = ctx.buildCommonStyles(node);
8385
+ if (commonStyles) stylesParts.push(commonStyles);
8386
+ const customFontSize = resolveCustomFontSize(node.size);
8387
+ if (customFontSize) stylesParts.push(`font-size: ${customFontSize}`);
8388
+ const styles = stylesParts.join("; ");
8336
8389
  const styleAttr = styles ? ` style="${styles}"` : "";
8337
8390
  return `<${tag} class="${classes}"${styleAttr}>${ctx.escapeHtml(node.content)}</${tag}>`;
8338
8391
  }
@@ -54761,6 +54814,7 @@ function renderIconSvg(data, _size = 24, strokeWidth = 2, className = "", styleA
54761
54814
  // src/renderer/html/renderers/button.ts
54762
54815
  function renderButton(node, ctx) {
54763
54816
  const isIconOnly = node.icon && (!node.content.trim() || node.content === "Button");
54817
+ const sizeResolved = resolveSizeValue(node.size, "button", ctx.prefix);
54764
54818
  const classes = ctx.buildClassString([
54765
54819
  `${ctx.prefix}-button`,
54766
54820
  node.primary ? `${ctx.prefix}-button-primary` : void 0,
@@ -54768,14 +54822,16 @@ function renderButton(node, ctx) {
54768
54822
  node.outline ? `${ctx.prefix}-button-outline` : void 0,
54769
54823
  node.ghost ? `${ctx.prefix}-button-ghost` : void 0,
54770
54824
  node.danger ? `${ctx.prefix}-button-danger` : void 0,
54771
- node.size ? `${ctx.prefix}-button-${node.size}` : void 0,
54825
+ sizeResolved.className,
54772
54826
  node.disabled ? `${ctx.prefix}-button-disabled` : void 0,
54773
54827
  node.loading ? `${ctx.prefix}-button-loading` : void 0,
54774
54828
  isIconOnly ? `${ctx.prefix}-button-icon-only` : void 0,
54775
54829
  ...ctx.getCommonClasses(node)
54776
54830
  ]);
54777
- const styles = ctx.buildCommonStyles(node);
54778
- const styleAttr = styles ? ` style="${styles}"` : "";
54831
+ const baseStyles = ctx.buildCommonStyles(node);
54832
+ const sizeStyle = sizeResolved.style || "";
54833
+ const combinedStyles = baseStyles && sizeStyle ? `${baseStyles}; ${sizeStyle}` : baseStyles || sizeStyle;
54834
+ const styleAttr = combinedStyles ? ` style="${combinedStyles}"` : "";
54779
54835
  const attrs = {
54780
54836
  class: classes,
54781
54837
  disabled: node.disabled,
@@ -55097,16 +55153,19 @@ function renderAvatar(node, ctx) {
55097
55153
  function renderBadge(node, ctx) {
55098
55154
  const interactiveAttrs = buildInteractiveAttrs2(node);
55099
55155
  const interactiveAttrStr = ctx.buildAttrsString(interactiveAttrs);
55156
+ const sizeResolved = resolveSizeValue(node.size, "badge", ctx.prefix);
55100
55157
  if (node.icon) {
55101
55158
  const iconData = getIconData(node.icon);
55102
55159
  const classes2 = ctx.buildClassString([
55103
55160
  `${ctx.prefix}-badge-icon`,
55104
- node.size ? `${ctx.prefix}-badge-icon-${node.size}` : void 0,
55161
+ sizeResolved.className,
55105
55162
  node.variant ? `${ctx.prefix}-badge-icon-${node.variant}` : void 0,
55106
55163
  ...ctx.getCommonClasses(node)
55107
55164
  ]);
55108
- const styles2 = ctx.buildCommonStyles(node);
55109
- const styleAttr2 = styles2 ? ` style="${styles2}"` : "";
55165
+ const baseStyles2 = ctx.buildCommonStyles(node);
55166
+ const sizeStyle2 = sizeResolved.style || "";
55167
+ const combinedStyles2 = baseStyles2 && sizeStyle2 ? `${baseStyles2}; ${sizeStyle2}` : baseStyles2 || sizeStyle2;
55168
+ const styleAttr2 = combinedStyles2 ? ` style="${combinedStyles2}"` : "";
55110
55169
  if (iconData) {
55111
55170
  const svg = renderIconSvg(iconData, 24, 2, `${ctx.prefix}-icon`);
55112
55171
  return `<span class="${classes2}"${styleAttr2}${interactiveAttrStr} aria-label="${ctx.escapeHtml(node.icon)}">${svg}</span>`;
@@ -55117,12 +55176,15 @@ function renderBadge(node, ctx) {
55117
55176
  const classes = ctx.buildClassString([
55118
55177
  `${ctx.prefix}-badge`,
55119
55178
  isDot ? `${ctx.prefix}-badge-dot` : void 0,
55179
+ sizeResolved.className,
55120
55180
  node.variant ? `${ctx.prefix}-badge-${node.variant}` : void 0,
55121
55181
  node.pill ? `${ctx.prefix}-badge-pill` : void 0,
55122
55182
  ...ctx.getCommonClasses(node)
55123
55183
  ]);
55124
- const styles = ctx.buildCommonStyles(node);
55125
- const styleAttr = styles ? ` style="${styles}"` : "";
55184
+ const baseStyles = ctx.buildCommonStyles(node);
55185
+ const sizeStyle = sizeResolved.style || "";
55186
+ const combinedStyles = baseStyles && sizeStyle ? `${baseStyles}; ${sizeStyle}` : baseStyles || sizeStyle;
55187
+ const styleAttr = combinedStyles ? ` style="${combinedStyles}"` : "";
55126
55188
  return `<span class="${classes}"${styleAttr}${interactiveAttrStr}>${ctx.escapeHtml(node.content)}</span>`;
55127
55189
  }
55128
55190
  function renderIcon(node, ctx) {
@@ -55476,12 +55538,12 @@ function resolveSpacingValue(value) {
55476
55538
  }
55477
55539
  return void 0;
55478
55540
  }
55479
- function isValueWithUnit(value) {
55541
+ function isValueWithUnit3(value) {
55480
55542
  return typeof value === "object" && value !== null && "value" in value && "unit" in value;
55481
55543
  }
55482
55544
  function resolveSizeValueToCss(value) {
55483
55545
  if (value === void 0) return void 0;
55484
- if (isValueWithUnit(value)) {
55546
+ if (isValueWithUnit3(value)) {
55485
55547
  return `${value.value}${value.unit}`;
55486
55548
  }
55487
55549
  if (typeof value === "number") {
package/dist/parser.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { ay as SourceLocation, a1 as WireframeDocument } from './types--qrZlQMM.cjs';
1
+ import { aC as SourceLocation, a1 as WireframeDocument } from './types-D0G2UKwM.cjs';
2
2
 
3
3
  /**
4
4
  * Parser module for wireweave
package/dist/parser.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ay as SourceLocation, a1 as WireframeDocument } from './types--qrZlQMM.js';
1
+ import { aC as SourceLocation, a1 as WireframeDocument } from './types-D0G2UKwM.js';
2
2
 
3
3
  /**
4
4
  * Parser module for wireweave
package/dist/renderer.cjs CHANGED
@@ -1893,15 +1893,28 @@ function resolveViewport(viewport, device) {
1893
1893
  function buildClassString(classes) {
1894
1894
  return classes.filter(Boolean).join(" ");
1895
1895
  }
1896
+ function isValueWithUnit(value) {
1897
+ return typeof value === "object" && value !== null && "value" in value && "unit" in value;
1898
+ }
1896
1899
  var SIZE_TOKENS = {
1897
1900
  icon: { xs: 12, sm: 14, md: 16, lg: 20, xl: 24 },
1898
1901
  avatar: { xs: 24, sm: 32, md: 40, lg: 48, xl: 64 },
1899
- spinner: { xs: 12, sm: 16, md: 24, lg: 32, xl: 48 }
1902
+ spinner: { xs: 12, sm: 16, md: 24, lg: 32, xl: 48 },
1903
+ button: { xs: 12, sm: 14, md: 16, lg: 18, xl: 20 },
1904
+ badge: { xs: 10, sm: 12, md: 14, lg: 16, xl: 18 }
1900
1905
  };
1906
+ var FONT_SIZED_COMPONENTS = ["button", "badge"];
1901
1907
  function resolveSizeValue(size, componentType, prefix) {
1902
1908
  if (size === void 0) {
1903
1909
  return {};
1904
1910
  }
1911
+ if (isValueWithUnit(size)) {
1912
+ const cssValue = `${size.value}${size.unit}`;
1913
+ if (FONT_SIZED_COMPONENTS.includes(componentType)) {
1914
+ return { style: `font-size: ${cssValue}` };
1915
+ }
1916
+ return { style: `width: ${cssValue}; height: ${cssValue}` };
1917
+ }
1905
1918
  if (typeof size === "string") {
1906
1919
  const tokens = SIZE_TOKENS[componentType];
1907
1920
  if (size in tokens) {
@@ -1909,12 +1922,18 @@ function resolveSizeValue(size, componentType, prefix) {
1909
1922
  }
1910
1923
  const parsed = parseInt(size, 10);
1911
1924
  if (!isNaN(parsed)) {
1912
- return { style: `width: ${parsed}px; height: ${parsed}px;` };
1925
+ if (FONT_SIZED_COMPONENTS.includes(componentType)) {
1926
+ return { style: `font-size: ${parsed}px` };
1927
+ }
1928
+ return { style: `width: ${parsed}px; height: ${parsed}px` };
1913
1929
  }
1914
1930
  return {};
1915
1931
  }
1916
1932
  if (typeof size === "number") {
1917
- return { style: `width: ${size}px; height: ${size}px;` };
1933
+ if (FONT_SIZED_COMPONENTS.includes(componentType)) {
1934
+ return { style: `font-size: ${size}px` };
1935
+ }
1936
+ return { style: `width: ${size}px; height: ${size}px` };
1918
1937
  }
1919
1938
  return {};
1920
1939
  }
@@ -2101,16 +2120,45 @@ ${children}
2101
2120
  }
2102
2121
 
2103
2122
  // src/renderer/html/renderers/text.ts
2123
+ function isValueWithUnit2(value) {
2124
+ return typeof value === "object" && value !== null && "value" in value && "unit" in value;
2125
+ }
2126
+ function isCustomSize(size) {
2127
+ if (size === void 0) return false;
2128
+ return typeof size === "number" || isValueWithUnit2(size);
2129
+ }
2130
+ function resolveCustomFontSize(size) {
2131
+ if (size === void 0) return void 0;
2132
+ if (isValueWithUnit2(size)) {
2133
+ return `${size.value}${size.unit}`;
2134
+ }
2135
+ if (typeof size === "number") {
2136
+ return `${size}px`;
2137
+ }
2138
+ return void 0;
2139
+ }
2140
+ function getSizeClassName(size, prefix) {
2141
+ if (size === void 0) return void 0;
2142
+ if (isCustomSize(size)) {
2143
+ return void 0;
2144
+ }
2145
+ return `${prefix}-text-${size}`;
2146
+ }
2104
2147
  function renderText(node, ctx) {
2105
2148
  const classes = ctx.buildClassString([
2106
2149
  `${ctx.prefix}-text`,
2107
- node.size ? `${ctx.prefix}-text-${node.size}` : void 0,
2150
+ getSizeClassName(node.size, ctx.prefix),
2108
2151
  node.weight ? `${ctx.prefix}-text-${node.weight}` : void 0,
2109
2152
  node.align ? `${ctx.prefix}-text-${node.align}` : void 0,
2110
2153
  node.muted ? `${ctx.prefix}-text-muted` : void 0,
2111
2154
  ...ctx.getCommonClasses(node)
2112
2155
  ]);
2113
- const styles = ctx.buildCommonStyles(node);
2156
+ const stylesParts = [];
2157
+ const commonStyles = ctx.buildCommonStyles(node);
2158
+ if (commonStyles) stylesParts.push(commonStyles);
2159
+ const customFontSize = resolveCustomFontSize(node.size);
2160
+ if (customFontSize) stylesParts.push(`font-size: ${customFontSize}`);
2161
+ const styles = stylesParts.join("; ");
2114
2162
  const styleAttr = styles ? ` style="${styles}"` : "";
2115
2163
  return `<p class="${classes}"${styleAttr}>${ctx.escapeHtml(node.content)}</p>`;
2116
2164
  }
@@ -2119,11 +2167,16 @@ function renderTitle(node, ctx) {
2119
2167
  const tag = `h${level}`;
2120
2168
  const classes = ctx.buildClassString([
2121
2169
  `${ctx.prefix}-title`,
2122
- node.size ? `${ctx.prefix}-text-${node.size}` : void 0,
2170
+ getSizeClassName(node.size, ctx.prefix),
2123
2171
  node.align ? `${ctx.prefix}-text-${node.align}` : void 0,
2124
2172
  ...ctx.getCommonClasses(node)
2125
2173
  ]);
2126
- const styles = ctx.buildCommonStyles(node);
2174
+ const stylesParts = [];
2175
+ const commonStyles = ctx.buildCommonStyles(node);
2176
+ if (commonStyles) stylesParts.push(commonStyles);
2177
+ const customFontSize = resolveCustomFontSize(node.size);
2178
+ if (customFontSize) stylesParts.push(`font-size: ${customFontSize}`);
2179
+ const styles = stylesParts.join("; ");
2127
2180
  const styleAttr = styles ? ` style="${styles}"` : "";
2128
2181
  return `<${tag} class="${classes}"${styleAttr}>${ctx.escapeHtml(node.content)}</${tag}>`;
2129
2182
  }
@@ -48552,6 +48605,7 @@ function renderIconSvg(data, _size = 24, strokeWidth = 2, className = "", styleA
48552
48605
  // src/renderer/html/renderers/button.ts
48553
48606
  function renderButton(node, ctx) {
48554
48607
  const isIconOnly = node.icon && (!node.content.trim() || node.content === "Button");
48608
+ const sizeResolved = resolveSizeValue(node.size, "button", ctx.prefix);
48555
48609
  const classes = ctx.buildClassString([
48556
48610
  `${ctx.prefix}-button`,
48557
48611
  node.primary ? `${ctx.prefix}-button-primary` : void 0,
@@ -48559,14 +48613,16 @@ function renderButton(node, ctx) {
48559
48613
  node.outline ? `${ctx.prefix}-button-outline` : void 0,
48560
48614
  node.ghost ? `${ctx.prefix}-button-ghost` : void 0,
48561
48615
  node.danger ? `${ctx.prefix}-button-danger` : void 0,
48562
- node.size ? `${ctx.prefix}-button-${node.size}` : void 0,
48616
+ sizeResolved.className,
48563
48617
  node.disabled ? `${ctx.prefix}-button-disabled` : void 0,
48564
48618
  node.loading ? `${ctx.prefix}-button-loading` : void 0,
48565
48619
  isIconOnly ? `${ctx.prefix}-button-icon-only` : void 0,
48566
48620
  ...ctx.getCommonClasses(node)
48567
48621
  ]);
48568
- const styles = ctx.buildCommonStyles(node);
48569
- const styleAttr = styles ? ` style="${styles}"` : "";
48622
+ const baseStyles = ctx.buildCommonStyles(node);
48623
+ const sizeStyle = sizeResolved.style || "";
48624
+ const combinedStyles = baseStyles && sizeStyle ? `${baseStyles}; ${sizeStyle}` : baseStyles || sizeStyle;
48625
+ const styleAttr = combinedStyles ? ` style="${combinedStyles}"` : "";
48570
48626
  const attrs = {
48571
48627
  class: classes,
48572
48628
  disabled: node.disabled,
@@ -48888,16 +48944,19 @@ function renderAvatar(node, ctx) {
48888
48944
  function renderBadge(node, ctx) {
48889
48945
  const interactiveAttrs = buildInteractiveAttrs2(node);
48890
48946
  const interactiveAttrStr = ctx.buildAttrsString(interactiveAttrs);
48947
+ const sizeResolved = resolveSizeValue(node.size, "badge", ctx.prefix);
48891
48948
  if (node.icon) {
48892
48949
  const iconData = getIconData(node.icon);
48893
48950
  const classes2 = ctx.buildClassString([
48894
48951
  `${ctx.prefix}-badge-icon`,
48895
- node.size ? `${ctx.prefix}-badge-icon-${node.size}` : void 0,
48952
+ sizeResolved.className,
48896
48953
  node.variant ? `${ctx.prefix}-badge-icon-${node.variant}` : void 0,
48897
48954
  ...ctx.getCommonClasses(node)
48898
48955
  ]);
48899
- const styles2 = ctx.buildCommonStyles(node);
48900
- const styleAttr2 = styles2 ? ` style="${styles2}"` : "";
48956
+ const baseStyles2 = ctx.buildCommonStyles(node);
48957
+ const sizeStyle2 = sizeResolved.style || "";
48958
+ const combinedStyles2 = baseStyles2 && sizeStyle2 ? `${baseStyles2}; ${sizeStyle2}` : baseStyles2 || sizeStyle2;
48959
+ const styleAttr2 = combinedStyles2 ? ` style="${combinedStyles2}"` : "";
48901
48960
  if (iconData) {
48902
48961
  const svg = renderIconSvg(iconData, 24, 2, `${ctx.prefix}-icon`);
48903
48962
  return `<span class="${classes2}"${styleAttr2}${interactiveAttrStr} aria-label="${ctx.escapeHtml(node.icon)}">${svg}</span>`;
@@ -48908,12 +48967,15 @@ function renderBadge(node, ctx) {
48908
48967
  const classes = ctx.buildClassString([
48909
48968
  `${ctx.prefix}-badge`,
48910
48969
  isDot ? `${ctx.prefix}-badge-dot` : void 0,
48970
+ sizeResolved.className,
48911
48971
  node.variant ? `${ctx.prefix}-badge-${node.variant}` : void 0,
48912
48972
  node.pill ? `${ctx.prefix}-badge-pill` : void 0,
48913
48973
  ...ctx.getCommonClasses(node)
48914
48974
  ]);
48915
- const styles = ctx.buildCommonStyles(node);
48916
- const styleAttr = styles ? ` style="${styles}"` : "";
48975
+ const baseStyles = ctx.buildCommonStyles(node);
48976
+ const sizeStyle = sizeResolved.style || "";
48977
+ const combinedStyles = baseStyles && sizeStyle ? `${baseStyles}; ${sizeStyle}` : baseStyles || sizeStyle;
48978
+ const styleAttr = combinedStyles ? ` style="${combinedStyles}"` : "";
48917
48979
  return `<span class="${classes}"${styleAttr}${interactiveAttrStr}>${ctx.escapeHtml(node.content)}</span>`;
48918
48980
  }
48919
48981
  function renderIcon(node, ctx) {
@@ -49267,12 +49329,12 @@ function resolveSpacingValue(value) {
49267
49329
  }
49268
49330
  return void 0;
49269
49331
  }
49270
- function isValueWithUnit(value) {
49332
+ function isValueWithUnit3(value) {
49271
49333
  return typeof value === "object" && value !== null && "value" in value && "unit" in value;
49272
49334
  }
49273
49335
  function resolveSizeValueToCss(value) {
49274
49336
  if (value === void 0) return void 0;
49275
- if (isValueWithUnit(value)) {
49337
+ if (isValueWithUnit3(value)) {
49276
49338
  return `${value.value}${value.unit}`;
49277
49339
  }
49278
49340
  if (typeof value === "number") {
@@ -1,4 +1,4 @@
1
- import { a1 as WireframeDocument, A as AnyNode, P as PageNode } from './types--qrZlQMM.cjs';
1
+ import { a1 as WireframeDocument, A as AnyNode, P as PageNode } from './types-D0G2UKwM.cjs';
2
2
 
3
3
  /**
4
4
  * Renderer type definitions for wireweave
@@ -1,4 +1,4 @@
1
- import { a1 as WireframeDocument, A as AnyNode, P as PageNode } from './types--qrZlQMM.js';
1
+ import { a1 as WireframeDocument, A as AnyNode, P as PageNode } from './types-D0G2UKwM.js';
2
2
 
3
3
  /**
4
4
  * Renderer type definitions for wireweave
package/dist/renderer.js CHANGED
@@ -1855,15 +1855,28 @@ function resolveViewport(viewport, device) {
1855
1855
  function buildClassString(classes) {
1856
1856
  return classes.filter(Boolean).join(" ");
1857
1857
  }
1858
+ function isValueWithUnit(value) {
1859
+ return typeof value === "object" && value !== null && "value" in value && "unit" in value;
1860
+ }
1858
1861
  var SIZE_TOKENS = {
1859
1862
  icon: { xs: 12, sm: 14, md: 16, lg: 20, xl: 24 },
1860
1863
  avatar: { xs: 24, sm: 32, md: 40, lg: 48, xl: 64 },
1861
- spinner: { xs: 12, sm: 16, md: 24, lg: 32, xl: 48 }
1864
+ spinner: { xs: 12, sm: 16, md: 24, lg: 32, xl: 48 },
1865
+ button: { xs: 12, sm: 14, md: 16, lg: 18, xl: 20 },
1866
+ badge: { xs: 10, sm: 12, md: 14, lg: 16, xl: 18 }
1862
1867
  };
1868
+ var FONT_SIZED_COMPONENTS = ["button", "badge"];
1863
1869
  function resolveSizeValue(size, componentType, prefix) {
1864
1870
  if (size === void 0) {
1865
1871
  return {};
1866
1872
  }
1873
+ if (isValueWithUnit(size)) {
1874
+ const cssValue = `${size.value}${size.unit}`;
1875
+ if (FONT_SIZED_COMPONENTS.includes(componentType)) {
1876
+ return { style: `font-size: ${cssValue}` };
1877
+ }
1878
+ return { style: `width: ${cssValue}; height: ${cssValue}` };
1879
+ }
1867
1880
  if (typeof size === "string") {
1868
1881
  const tokens = SIZE_TOKENS[componentType];
1869
1882
  if (size in tokens) {
@@ -1871,12 +1884,18 @@ function resolveSizeValue(size, componentType, prefix) {
1871
1884
  }
1872
1885
  const parsed = parseInt(size, 10);
1873
1886
  if (!isNaN(parsed)) {
1874
- return { style: `width: ${parsed}px; height: ${parsed}px;` };
1887
+ if (FONT_SIZED_COMPONENTS.includes(componentType)) {
1888
+ return { style: `font-size: ${parsed}px` };
1889
+ }
1890
+ return { style: `width: ${parsed}px; height: ${parsed}px` };
1875
1891
  }
1876
1892
  return {};
1877
1893
  }
1878
1894
  if (typeof size === "number") {
1879
- return { style: `width: ${size}px; height: ${size}px;` };
1895
+ if (FONT_SIZED_COMPONENTS.includes(componentType)) {
1896
+ return { style: `font-size: ${size}px` };
1897
+ }
1898
+ return { style: `width: ${size}px; height: ${size}px` };
1880
1899
  }
1881
1900
  return {};
1882
1901
  }
@@ -2063,16 +2082,45 @@ ${children}
2063
2082
  }
2064
2083
 
2065
2084
  // src/renderer/html/renderers/text.ts
2085
+ function isValueWithUnit2(value) {
2086
+ return typeof value === "object" && value !== null && "value" in value && "unit" in value;
2087
+ }
2088
+ function isCustomSize(size) {
2089
+ if (size === void 0) return false;
2090
+ return typeof size === "number" || isValueWithUnit2(size);
2091
+ }
2092
+ function resolveCustomFontSize(size) {
2093
+ if (size === void 0) return void 0;
2094
+ if (isValueWithUnit2(size)) {
2095
+ return `${size.value}${size.unit}`;
2096
+ }
2097
+ if (typeof size === "number") {
2098
+ return `${size}px`;
2099
+ }
2100
+ return void 0;
2101
+ }
2102
+ function getSizeClassName(size, prefix) {
2103
+ if (size === void 0) return void 0;
2104
+ if (isCustomSize(size)) {
2105
+ return void 0;
2106
+ }
2107
+ return `${prefix}-text-${size}`;
2108
+ }
2066
2109
  function renderText(node, ctx) {
2067
2110
  const classes = ctx.buildClassString([
2068
2111
  `${ctx.prefix}-text`,
2069
- node.size ? `${ctx.prefix}-text-${node.size}` : void 0,
2112
+ getSizeClassName(node.size, ctx.prefix),
2070
2113
  node.weight ? `${ctx.prefix}-text-${node.weight}` : void 0,
2071
2114
  node.align ? `${ctx.prefix}-text-${node.align}` : void 0,
2072
2115
  node.muted ? `${ctx.prefix}-text-muted` : void 0,
2073
2116
  ...ctx.getCommonClasses(node)
2074
2117
  ]);
2075
- const styles = ctx.buildCommonStyles(node);
2118
+ const stylesParts = [];
2119
+ const commonStyles = ctx.buildCommonStyles(node);
2120
+ if (commonStyles) stylesParts.push(commonStyles);
2121
+ const customFontSize = resolveCustomFontSize(node.size);
2122
+ if (customFontSize) stylesParts.push(`font-size: ${customFontSize}`);
2123
+ const styles = stylesParts.join("; ");
2076
2124
  const styleAttr = styles ? ` style="${styles}"` : "";
2077
2125
  return `<p class="${classes}"${styleAttr}>${ctx.escapeHtml(node.content)}</p>`;
2078
2126
  }
@@ -2081,11 +2129,16 @@ function renderTitle(node, ctx) {
2081
2129
  const tag = `h${level}`;
2082
2130
  const classes = ctx.buildClassString([
2083
2131
  `${ctx.prefix}-title`,
2084
- node.size ? `${ctx.prefix}-text-${node.size}` : void 0,
2132
+ getSizeClassName(node.size, ctx.prefix),
2085
2133
  node.align ? `${ctx.prefix}-text-${node.align}` : void 0,
2086
2134
  ...ctx.getCommonClasses(node)
2087
2135
  ]);
2088
- const styles = ctx.buildCommonStyles(node);
2136
+ const stylesParts = [];
2137
+ const commonStyles = ctx.buildCommonStyles(node);
2138
+ if (commonStyles) stylesParts.push(commonStyles);
2139
+ const customFontSize = resolveCustomFontSize(node.size);
2140
+ if (customFontSize) stylesParts.push(`font-size: ${customFontSize}`);
2141
+ const styles = stylesParts.join("; ");
2089
2142
  const styleAttr = styles ? ` style="${styles}"` : "";
2090
2143
  return `<${tag} class="${classes}"${styleAttr}>${ctx.escapeHtml(node.content)}</${tag}>`;
2091
2144
  }
@@ -48514,6 +48567,7 @@ function renderIconSvg(data, _size = 24, strokeWidth = 2, className = "", styleA
48514
48567
  // src/renderer/html/renderers/button.ts
48515
48568
  function renderButton(node, ctx) {
48516
48569
  const isIconOnly = node.icon && (!node.content.trim() || node.content === "Button");
48570
+ const sizeResolved = resolveSizeValue(node.size, "button", ctx.prefix);
48517
48571
  const classes = ctx.buildClassString([
48518
48572
  `${ctx.prefix}-button`,
48519
48573
  node.primary ? `${ctx.prefix}-button-primary` : void 0,
@@ -48521,14 +48575,16 @@ function renderButton(node, ctx) {
48521
48575
  node.outline ? `${ctx.prefix}-button-outline` : void 0,
48522
48576
  node.ghost ? `${ctx.prefix}-button-ghost` : void 0,
48523
48577
  node.danger ? `${ctx.prefix}-button-danger` : void 0,
48524
- node.size ? `${ctx.prefix}-button-${node.size}` : void 0,
48578
+ sizeResolved.className,
48525
48579
  node.disabled ? `${ctx.prefix}-button-disabled` : void 0,
48526
48580
  node.loading ? `${ctx.prefix}-button-loading` : void 0,
48527
48581
  isIconOnly ? `${ctx.prefix}-button-icon-only` : void 0,
48528
48582
  ...ctx.getCommonClasses(node)
48529
48583
  ]);
48530
- const styles = ctx.buildCommonStyles(node);
48531
- const styleAttr = styles ? ` style="${styles}"` : "";
48584
+ const baseStyles = ctx.buildCommonStyles(node);
48585
+ const sizeStyle = sizeResolved.style || "";
48586
+ const combinedStyles = baseStyles && sizeStyle ? `${baseStyles}; ${sizeStyle}` : baseStyles || sizeStyle;
48587
+ const styleAttr = combinedStyles ? ` style="${combinedStyles}"` : "";
48532
48588
  const attrs = {
48533
48589
  class: classes,
48534
48590
  disabled: node.disabled,
@@ -48850,16 +48906,19 @@ function renderAvatar(node, ctx) {
48850
48906
  function renderBadge(node, ctx) {
48851
48907
  const interactiveAttrs = buildInteractiveAttrs2(node);
48852
48908
  const interactiveAttrStr = ctx.buildAttrsString(interactiveAttrs);
48909
+ const sizeResolved = resolveSizeValue(node.size, "badge", ctx.prefix);
48853
48910
  if (node.icon) {
48854
48911
  const iconData = getIconData(node.icon);
48855
48912
  const classes2 = ctx.buildClassString([
48856
48913
  `${ctx.prefix}-badge-icon`,
48857
- node.size ? `${ctx.prefix}-badge-icon-${node.size}` : void 0,
48914
+ sizeResolved.className,
48858
48915
  node.variant ? `${ctx.prefix}-badge-icon-${node.variant}` : void 0,
48859
48916
  ...ctx.getCommonClasses(node)
48860
48917
  ]);
48861
- const styles2 = ctx.buildCommonStyles(node);
48862
- const styleAttr2 = styles2 ? ` style="${styles2}"` : "";
48918
+ const baseStyles2 = ctx.buildCommonStyles(node);
48919
+ const sizeStyle2 = sizeResolved.style || "";
48920
+ const combinedStyles2 = baseStyles2 && sizeStyle2 ? `${baseStyles2}; ${sizeStyle2}` : baseStyles2 || sizeStyle2;
48921
+ const styleAttr2 = combinedStyles2 ? ` style="${combinedStyles2}"` : "";
48863
48922
  if (iconData) {
48864
48923
  const svg = renderIconSvg(iconData, 24, 2, `${ctx.prefix}-icon`);
48865
48924
  return `<span class="${classes2}"${styleAttr2}${interactiveAttrStr} aria-label="${ctx.escapeHtml(node.icon)}">${svg}</span>`;
@@ -48870,12 +48929,15 @@ function renderBadge(node, ctx) {
48870
48929
  const classes = ctx.buildClassString([
48871
48930
  `${ctx.prefix}-badge`,
48872
48931
  isDot ? `${ctx.prefix}-badge-dot` : void 0,
48932
+ sizeResolved.className,
48873
48933
  node.variant ? `${ctx.prefix}-badge-${node.variant}` : void 0,
48874
48934
  node.pill ? `${ctx.prefix}-badge-pill` : void 0,
48875
48935
  ...ctx.getCommonClasses(node)
48876
48936
  ]);
48877
- const styles = ctx.buildCommonStyles(node);
48878
- const styleAttr = styles ? ` style="${styles}"` : "";
48937
+ const baseStyles = ctx.buildCommonStyles(node);
48938
+ const sizeStyle = sizeResolved.style || "";
48939
+ const combinedStyles = baseStyles && sizeStyle ? `${baseStyles}; ${sizeStyle}` : baseStyles || sizeStyle;
48940
+ const styleAttr = combinedStyles ? ` style="${combinedStyles}"` : "";
48879
48941
  return `<span class="${classes}"${styleAttr}${interactiveAttrStr}>${ctx.escapeHtml(node.content)}</span>`;
48880
48942
  }
48881
48943
  function renderIcon(node, ctx) {
@@ -49229,12 +49291,12 @@ function resolveSpacingValue(value) {
49229
49291
  }
49230
49292
  return void 0;
49231
49293
  }
49232
- function isValueWithUnit(value) {
49294
+ function isValueWithUnit3(value) {
49233
49295
  return typeof value === "object" && value !== null && "value" in value && "unit" in value;
49234
49296
  }
49235
49297
  function resolveSizeValueToCss(value) {
49236
49298
  if (value === void 0) return void 0;
49237
- if (isValueWithUnit(value)) {
49299
+ if (isValueWithUnit3(value)) {
49238
49300
  return `${value.value}${value.unit}`;
49239
49301
  }
49240
49302
  if (typeof value === "number") {
@@ -278,7 +278,8 @@ interface SliderNode extends BaseNode, CommonProps {
278
278
  disabled?: boolean;
279
279
  }
280
280
  type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger';
281
- type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
281
+ type ButtonSizeToken = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
282
+ type ButtonSize = ButtonSizeToken | number | ValueWithUnit;
282
283
  interface ButtonNode extends BaseNode, CommonProps, InteractiveProps {
283
284
  type: 'Button';
284
285
  content: string;
@@ -302,15 +303,17 @@ interface PlaceholderNode extends BaseNode, CommonProps {
302
303
  label?: string | null;
303
304
  children?: AnyNode[];
304
305
  }
305
- type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
306
+ type AvatarSizeToken = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
307
+ type AvatarSize = AvatarSizeToken | number | ValueWithUnit;
306
308
  interface AvatarNode extends BaseNode, CommonProps, InteractiveProps {
307
309
  type: 'Avatar';
308
310
  name?: string | null;
309
311
  src?: boolean;
310
- size?: AvatarSize | number;
312
+ size?: AvatarSize;
311
313
  }
312
314
  type BadgeVariant = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info';
313
- type BadgeSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
315
+ type BadgeSizeToken = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
316
+ type BadgeSize = BadgeSizeToken | number | ValueWithUnit;
314
317
  interface BadgeNode extends BaseNode, CommonProps, InteractiveProps {
315
318
  type: 'Badge';
316
319
  content: string;
@@ -319,11 +322,12 @@ interface BadgeNode extends BaseNode, CommonProps, InteractiveProps {
319
322
  icon?: string;
320
323
  size?: BadgeSize;
321
324
  }
322
- type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
325
+ type IconSizeToken = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
326
+ type IconSize = IconSizeToken | number | ValueWithUnit;
323
327
  interface IconNode extends BaseNode, CommonProps, InteractiveProps {
324
328
  type: 'Icon';
325
329
  name: string;
326
- size?: IconSize | number;
330
+ size?: IconSize;
327
331
  muted?: boolean;
328
332
  }
329
333
  interface TableNode extends BaseNode, CommonProps {
@@ -367,11 +371,12 @@ interface ProgressNode extends BaseNode, CommonProps {
367
371
  label?: string;
368
372
  indeterminate?: boolean;
369
373
  }
370
- type SpinnerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
374
+ type SpinnerSizeToken = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
375
+ type SpinnerSize = SpinnerSizeToken | number | ValueWithUnit;
371
376
  interface SpinnerNode extends BaseNode, CommonProps {
372
377
  type: 'Spinner';
373
378
  label?: string | null;
374
- size?: SpinnerSize | number;
379
+ size?: SpinnerSize;
375
380
  }
376
381
  type TooltipPosition = 'top' | 'right' | 'bottom' | 'left';
377
382
  interface TooltipNode extends BaseNode, CommonProps {
@@ -475,4 +480,4 @@ type LeafNode = TextContentNode | InputComponentNode | ButtonNode | DisplayNode
475
480
  type AnyNode = ContainerNode | LeafNode;
476
481
  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';
477
482
 
478
- 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, AvatarSize as a4, BadgeSize as a5, BadgeVariant as a6, BaseNode as a7, BreadcrumbItem as a8, ButtonSize as a9, SpacingValue as aA, SpinnerSize as aB, TabNode as aC, TextAlign as aD, TextSize as aE, TextSizeToken as aF, TextWeight as aG, TitleLevel as aH, ToastPosition as aI, TooltipPosition as aJ, ValueWithUnit as aK, WidthValue as aL, ButtonVariant as aa, CommonProps as ab, DirectionValue as ac, DividerNode as ad, DrawerPosition as ae, DropdownItemNode as af, FlexProps as ag, GridProps as ah, HeightValue as ai, IconSize as aj, InputType as ak, InteractiveProps as al, JustifyValue as am, ListItemNode as an, NavBlockItem as ao, NavChild as ap, NavDivider as aq, NavGroupNode as ar, NavItem as as, Position as at, PositionProps as au, SelectOption as av, ShadowValue as aw, SizeProps as ax, SourceLocation as ay, SpacingProps 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 };
483
+ 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, AvatarSize as a4, AvatarSizeToken as a5, BadgeSize as a6, BadgeSizeToken as a7, BadgeVariant as a8, BaseNode as a9, ShadowValue as aA, SizeProps as aB, SourceLocation as aC, SpacingProps as aD, SpacingValue as aE, SpinnerSize as aF, SpinnerSizeToken as aG, TabNode as aH, TextAlign as aI, TextSize as aJ, TextSizeToken as aK, TextWeight as aL, TitleLevel as aM, ToastPosition as aN, TooltipPosition as aO, ValueWithUnit as aP, WidthValue as aQ, BreadcrumbItem as aa, ButtonSize as ab, ButtonSizeToken as ac, ButtonVariant as ad, CommonProps as ae, DirectionValue as af, DividerNode as ag, DrawerPosition as ah, DropdownItemNode as ai, FlexProps as aj, GridProps as ak, HeightValue as al, IconSize as am, IconSizeToken as an, InputType as ao, InteractiveProps as ap, JustifyValue as aq, ListItemNode as ar, NavBlockItem as as, NavChild as at, NavDivider as au, NavGroupNode as av, NavItem as aw, Position as ax, PositionProps as ay, SelectOption 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 };
@@ -278,7 +278,8 @@ interface SliderNode extends BaseNode, CommonProps {
278
278
  disabled?: boolean;
279
279
  }
280
280
  type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger';
281
- type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
281
+ type ButtonSizeToken = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
282
+ type ButtonSize = ButtonSizeToken | number | ValueWithUnit;
282
283
  interface ButtonNode extends BaseNode, CommonProps, InteractiveProps {
283
284
  type: 'Button';
284
285
  content: string;
@@ -302,15 +303,17 @@ interface PlaceholderNode extends BaseNode, CommonProps {
302
303
  label?: string | null;
303
304
  children?: AnyNode[];
304
305
  }
305
- type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
306
+ type AvatarSizeToken = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
307
+ type AvatarSize = AvatarSizeToken | number | ValueWithUnit;
306
308
  interface AvatarNode extends BaseNode, CommonProps, InteractiveProps {
307
309
  type: 'Avatar';
308
310
  name?: string | null;
309
311
  src?: boolean;
310
- size?: AvatarSize | number;
312
+ size?: AvatarSize;
311
313
  }
312
314
  type BadgeVariant = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info';
313
- type BadgeSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
315
+ type BadgeSizeToken = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
316
+ type BadgeSize = BadgeSizeToken | number | ValueWithUnit;
314
317
  interface BadgeNode extends BaseNode, CommonProps, InteractiveProps {
315
318
  type: 'Badge';
316
319
  content: string;
@@ -319,11 +322,12 @@ interface BadgeNode extends BaseNode, CommonProps, InteractiveProps {
319
322
  icon?: string;
320
323
  size?: BadgeSize;
321
324
  }
322
- type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
325
+ type IconSizeToken = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
326
+ type IconSize = IconSizeToken | number | ValueWithUnit;
323
327
  interface IconNode extends BaseNode, CommonProps, InteractiveProps {
324
328
  type: 'Icon';
325
329
  name: string;
326
- size?: IconSize | number;
330
+ size?: IconSize;
327
331
  muted?: boolean;
328
332
  }
329
333
  interface TableNode extends BaseNode, CommonProps {
@@ -367,11 +371,12 @@ interface ProgressNode extends BaseNode, CommonProps {
367
371
  label?: string;
368
372
  indeterminate?: boolean;
369
373
  }
370
- type SpinnerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
374
+ type SpinnerSizeToken = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
375
+ type SpinnerSize = SpinnerSizeToken | number | ValueWithUnit;
371
376
  interface SpinnerNode extends BaseNode, CommonProps {
372
377
  type: 'Spinner';
373
378
  label?: string | null;
374
- size?: SpinnerSize | number;
379
+ size?: SpinnerSize;
375
380
  }
376
381
  type TooltipPosition = 'top' | 'right' | 'bottom' | 'left';
377
382
  interface TooltipNode extends BaseNode, CommonProps {
@@ -475,4 +480,4 @@ type LeafNode = TextContentNode | InputComponentNode | ButtonNode | DisplayNode
475
480
  type AnyNode = ContainerNode | LeafNode;
476
481
  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';
477
482
 
478
- 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, AvatarSize as a4, BadgeSize as a5, BadgeVariant as a6, BaseNode as a7, BreadcrumbItem as a8, ButtonSize as a9, SpacingValue as aA, SpinnerSize as aB, TabNode as aC, TextAlign as aD, TextSize as aE, TextSizeToken as aF, TextWeight as aG, TitleLevel as aH, ToastPosition as aI, TooltipPosition as aJ, ValueWithUnit as aK, WidthValue as aL, ButtonVariant as aa, CommonProps as ab, DirectionValue as ac, DividerNode as ad, DrawerPosition as ae, DropdownItemNode as af, FlexProps as ag, GridProps as ah, HeightValue as ai, IconSize as aj, InputType as ak, InteractiveProps as al, JustifyValue as am, ListItemNode as an, NavBlockItem as ao, NavChild as ap, NavDivider as aq, NavGroupNode as ar, NavItem as as, Position as at, PositionProps as au, SelectOption as av, ShadowValue as aw, SizeProps as ax, SourceLocation as ay, SpacingProps 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 };
483
+ 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, AvatarSize as a4, AvatarSizeToken as a5, BadgeSize as a6, BadgeSizeToken as a7, BadgeVariant as a8, BaseNode as a9, ShadowValue as aA, SizeProps as aB, SourceLocation as aC, SpacingProps as aD, SpacingValue as aE, SpinnerSize as aF, SpinnerSizeToken as aG, TabNode as aH, TextAlign as aI, TextSize as aJ, TextSizeToken as aK, TextWeight as aL, TitleLevel as aM, ToastPosition as aN, TooltipPosition as aO, ValueWithUnit as aP, WidthValue as aQ, BreadcrumbItem as aa, ButtonSize as ab, ButtonSizeToken as ac, ButtonVariant as ad, CommonProps as ae, DirectionValue as af, DividerNode as ag, DrawerPosition as ah, DropdownItemNode as ai, FlexProps as aj, GridProps as ak, HeightValue as al, IconSize as am, IconSizeToken as an, InputType as ao, InteractiveProps as ap, JustifyValue as aq, ListItemNode as ar, NavBlockItem as as, NavChild as at, NavDivider as au, NavGroupNode as av, NavItem as aw, Position as ax, PositionProps as ay, SelectOption 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.1.0-beta.0",
3
+ "version": "2.2.0-beta.0",
4
4
  "description": "Core parser and renderer for wireweave",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",