@wireweave/core 4.0.0-beta.12 → 4.0.0-beta.14

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.
Files changed (53) hide show
  1. package/dist/app.cjs +51 -31
  2. package/dist/app.d.cts +5 -145
  3. package/dist/app.d.ts +5 -145
  4. package/dist/app.js +2 -31
  5. package/dist/{chunk-QOS4IC75.js → chunk-2Y3GKARZ.js} +16 -1354
  6. package/dist/chunk-3RWGG5EC.js +296 -342
  7. package/dist/chunk-4DDV6Z2X.js +389 -0
  8. package/dist/chunk-ETV4XYOV.cjs +4 -6
  9. package/dist/chunk-IMUVIIJR.cjs +317 -354
  10. package/dist/chunk-LA5LKIEL.cjs +396 -0
  11. package/dist/chunk-MD6MNOEQ.cjs +121 -142
  12. package/dist/chunk-NV6UV5ID.cjs +2145 -0
  13. package/dist/chunk-PKBMQBKP.js +1 -3
  14. package/dist/{chunk-7VTK6LHL.cjs → chunk-SAN6CJEE.cjs} +96 -1421
  15. package/dist/chunk-TQSOLTMZ.js +2132 -0
  16. package/dist/chunk-V3HVWC7C.js +1 -32
  17. package/dist/chunk-XYACLXXF.js +4 -132
  18. package/dist/chunk-ZPHNXJRY.cjs +158 -180
  19. package/dist/index-BD_4rXH-.d.cts +1031 -0
  20. package/dist/{index-Br7pNaf3.d.cts → index-BEnsO2kE.d.ts} +144 -2
  21. package/dist/{index-G906GEtg.d.cts → index-BlNYFaZd.d.cts} +2 -2
  22. package/dist/{index-CghCKUPx.d.ts → index-Cx4-VXVS.d.ts} +2 -2
  23. package/dist/{index-Da_B3eoM.d.ts → index-YSIzfhOd.d.cts} +144 -2
  24. package/dist/index-g9yV20xb.d.ts +1031 -0
  25. package/dist/index.cjs +939 -429
  26. package/dist/index.d.cts +16 -193
  27. package/dist/index.d.ts +16 -193
  28. package/dist/index.js +210 -396
  29. package/dist/interaction.cjs +26 -17
  30. package/dist/interaction.d.cts +2 -2
  31. package/dist/interaction.d.ts +2 -2
  32. package/dist/interaction.js +1 -17
  33. package/dist/parser.cjs +38 -21
  34. package/dist/parser.d.cts +3 -3
  35. package/dist/parser.d.ts +3 -3
  36. package/dist/parser.js +1 -21
  37. package/dist/renderer.cjs +124 -68
  38. package/dist/renderer.d.cts +4 -756
  39. package/dist/renderer.d.ts +4 -756
  40. package/dist/renderer.js +3 -68
  41. package/dist/spec.cjs +94 -49
  42. package/dist/spec.js +1 -49
  43. package/dist/{types-vhPCZpAW.d.cts → types-CGRi1k2N.d.cts} +1 -1
  44. package/dist/{types-vhPCZpAW.d.ts → types-CGRi1k2N.d.ts} +1 -1
  45. package/dist/{v4-types-Baz9yqAS.d.cts → v4-types-2ORUg6To.d.cts} +1 -1
  46. package/dist/{v4-types-Baz9yqAS.d.ts → v4-types-2ORUg6To.d.ts} +1 -1
  47. package/package.json +21 -23
  48. package/dist/chunk-4TMDPWPR.cjs +0 -196
  49. package/dist/chunk-5DGRIQDU.cjs +0 -842
  50. package/dist/chunk-JJWAFHSV.js +0 -842
  51. package/dist/chunk-R5WBZWBC.js +0 -196
  52. package/dist/chunk-WV724EAW.js +0 -0
  53. package/dist/chunk-XENFKHRC.cjs +0 -1
package/dist/renderer.js CHANGED
@@ -1,68 +1,3 @@
1
- import {
2
- layoutCanvas,
3
- render,
4
- renderCanvas,
5
- renderToHtml,
6
- renderToSvg
7
- } from "./chunk-R5WBZWBC.js";
8
- import {
9
- renderSite
10
- } from "./chunk-JJWAFHSV.js";
11
- import {
12
- ENABLED_GUARD_ATTR,
13
- EXTERNAL_NAVIGATE_ATTR,
14
- HtmlRenderer,
15
- INERT_HREF,
16
- INTERACTIVE_ATTR_NAMES,
17
- TYPED_INTERACTION_ATTR,
18
- VISIBLE_GUARD_ATTR,
19
- anchorIntent,
20
- buildSiteModel,
21
- createHtmlRenderer,
22
- darkTheme,
23
- defaultTheme,
24
- generateComponentStyles,
25
- generateStyles,
26
- getIconData,
27
- getTheme,
28
- guardedOutcomeAttrs,
29
- interactiveAttrs,
30
- lucideIcons,
31
- renderIconSvg,
32
- renderPage,
33
- renderUnknownIconSvg,
34
- resolvePageDimensions
35
- } from "./chunk-XYACLXXF.js";
36
- import "./chunk-V3HVWC7C.js";
37
- import "./chunk-PKBMQBKP.js";
38
- export {
39
- ENABLED_GUARD_ATTR,
40
- EXTERNAL_NAVIGATE_ATTR,
41
- HtmlRenderer,
42
- INERT_HREF,
43
- INTERACTIVE_ATTR_NAMES,
44
- TYPED_INTERACTION_ATTR,
45
- VISIBLE_GUARD_ATTR,
46
- anchorIntent,
47
- buildSiteModel,
48
- createHtmlRenderer,
49
- darkTheme,
50
- defaultTheme,
51
- generateComponentStyles,
52
- generateStyles,
53
- getIconData,
54
- getTheme,
55
- guardedOutcomeAttrs,
56
- interactiveAttrs,
57
- layoutCanvas,
58
- lucideIcons,
59
- render,
60
- renderCanvas,
61
- renderIconSvg,
62
- renderPage,
63
- renderSite,
64
- renderToHtml,
65
- renderToSvg,
66
- renderUnknownIconSvg,
67
- resolvePageDimensions
68
- };
1
+ export { layoutCanvas, render, renderCanvas, renderToHtml, renderToSvg } from './chunk-4DDV6Z2X.js';
2
+ export { renderSite } from './chunk-TQSOLTMZ.js';
3
+ export { ENABLED_GUARD_ATTR, EXTERNAL_NAVIGATE_ATTR, HtmlRenderer, INERT_HREF, INTERACTIVE_ATTR_NAMES, TYPED_INTERACTION_ATTR, VISIBLE_GUARD_ATTR, anchorIntent, buildSiteModel, createHtmlRenderer, darkTheme, defaultTheme, generateComponentStyles, generateStyles, getIconData, getTheme, guardedOutcomeAttrs, interactiveAttrs, lucideIcons, renderIconSvg, renderPage, renderUnknownIconSvg, resolvePageDimensions } from './chunk-XYACLXXF.js';
package/dist/spec.cjs CHANGED
@@ -1,49 +1,94 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
- var _chunkMD6MNOEQcjs = require('./chunk-MD6MNOEQ.cjs');
25
- require('./chunk-ETV4XYOV.cjs');
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
- exports.ATTRIBUTE_MAP = _chunkMD6MNOEQcjs.ATTRIBUTE_MAP; exports.ATTRIBUTE_OVERRIDES = _chunkMD6MNOEQcjs.ATTRIBUTE_OVERRIDES; exports.ATTRIBUTE_SPECS = _chunkMD6MNOEQcjs.ATTRIBUTE_SPECS; exports.BLOCK_NODE_SPECS = _chunkMD6MNOEQcjs.BLOCK_NODE_SPECS; exports.BOX_ATTRIBUTES = _chunkMD6MNOEQcjs.BOX_ATTRIBUTES; exports.COMPONENT_MAP = _chunkMD6MNOEQcjs.COMPONENT_MAP; exports.COMPONENT_NAMES = _chunkMD6MNOEQcjs.COMPONENT_NAMES; exports.COMPONENT_SPECS = _chunkMD6MNOEQcjs.COMPONENT_SPECS; exports.COMPONENT_SPEC_BY_NAME = _chunkMD6MNOEQcjs.COMPONENT_SPEC_BY_NAME; exports.CONTAINER_ATTRIBUTES = _chunkMD6MNOEQcjs.CONTAINER_ATTRIBUTES; exports.ELEMENT_NODE_TYPE_MAP = _chunkMD6MNOEQcjs.ELEMENT_NODE_TYPE_MAP; exports.GRAMMAR_BLOCK_NODE_TYPES = _chunkMD6MNOEQcjs.GRAMMAR_BLOCK_NODE_TYPES; exports.GRAMMAR_CHILD_KEYWORDS = _chunkMD6MNOEQcjs.GRAMMAR_CHILD_KEYWORDS; exports.GRAMMAR_ELEMENTS = _chunkMD6MNOEQcjs.GRAMMAR_ELEMENTS; exports.INTERACTIVE_ATTRIBUTES = _chunkMD6MNOEQcjs.INTERACTIVE_ATTRIBUTES; exports.LUCIDE_ICON_NAMES = _chunkMD6MNOEQcjs.LUCIDE_ICON_NAMES; exports.NODE_TYPE_MAP = _chunkMD6MNOEQcjs.NODE_TYPE_MAP; exports.VALID_ATTRIBUTE_NAMES = _chunkMD6MNOEQcjs.VALID_ATTRIBUTE_NAMES; exports.VALID_COMPONENT_NAMES = _chunkMD6MNOEQcjs.VALID_COMPONENT_NAMES; exports.attributeFor = _chunkMD6MNOEQcjs.attributeFor; exports.getValidAttributes = _chunkMD6MNOEQcjs.getValidAttributes; exports.isValidAttribute = _chunkMD6MNOEQcjs.isValidAttribute;
1
+ 'use strict';
2
+
3
+ var chunkMD6MNOEQ_cjs = require('./chunk-MD6MNOEQ.cjs');
4
+
5
+
6
+
7
+ Object.defineProperty(exports, "ATTRIBUTE_MAP", {
8
+ enumerable: true,
9
+ get: function () { return chunkMD6MNOEQ_cjs.ATTRIBUTE_MAP; }
10
+ });
11
+ Object.defineProperty(exports, "ATTRIBUTE_OVERRIDES", {
12
+ enumerable: true,
13
+ get: function () { return chunkMD6MNOEQ_cjs.ATTRIBUTE_OVERRIDES; }
14
+ });
15
+ Object.defineProperty(exports, "ATTRIBUTE_SPECS", {
16
+ enumerable: true,
17
+ get: function () { return chunkMD6MNOEQ_cjs.ATTRIBUTE_SPECS; }
18
+ });
19
+ Object.defineProperty(exports, "BLOCK_NODE_SPECS", {
20
+ enumerable: true,
21
+ get: function () { return chunkMD6MNOEQ_cjs.BLOCK_NODE_SPECS; }
22
+ });
23
+ Object.defineProperty(exports, "BOX_ATTRIBUTES", {
24
+ enumerable: true,
25
+ get: function () { return chunkMD6MNOEQ_cjs.BOX_ATTRIBUTES; }
26
+ });
27
+ Object.defineProperty(exports, "COMPONENT_MAP", {
28
+ enumerable: true,
29
+ get: function () { return chunkMD6MNOEQ_cjs.COMPONENT_MAP; }
30
+ });
31
+ Object.defineProperty(exports, "COMPONENT_NAMES", {
32
+ enumerable: true,
33
+ get: function () { return chunkMD6MNOEQ_cjs.COMPONENT_NAMES; }
34
+ });
35
+ Object.defineProperty(exports, "COMPONENT_SPECS", {
36
+ enumerable: true,
37
+ get: function () { return chunkMD6MNOEQ_cjs.COMPONENT_SPECS; }
38
+ });
39
+ Object.defineProperty(exports, "COMPONENT_SPEC_BY_NAME", {
40
+ enumerable: true,
41
+ get: function () { return chunkMD6MNOEQ_cjs.COMPONENT_SPEC_BY_NAME; }
42
+ });
43
+ Object.defineProperty(exports, "CONTAINER_ATTRIBUTES", {
44
+ enumerable: true,
45
+ get: function () { return chunkMD6MNOEQ_cjs.CONTAINER_ATTRIBUTES; }
46
+ });
47
+ Object.defineProperty(exports, "ELEMENT_NODE_TYPE_MAP", {
48
+ enumerable: true,
49
+ get: function () { return chunkMD6MNOEQ_cjs.ELEMENT_NODE_TYPE_MAP; }
50
+ });
51
+ Object.defineProperty(exports, "GRAMMAR_BLOCK_NODE_TYPES", {
52
+ enumerable: true,
53
+ get: function () { return chunkMD6MNOEQ_cjs.GRAMMAR_BLOCK_NODE_TYPES; }
54
+ });
55
+ Object.defineProperty(exports, "GRAMMAR_CHILD_KEYWORDS", {
56
+ enumerable: true,
57
+ get: function () { return chunkMD6MNOEQ_cjs.GRAMMAR_CHILD_KEYWORDS; }
58
+ });
59
+ Object.defineProperty(exports, "GRAMMAR_ELEMENTS", {
60
+ enumerable: true,
61
+ get: function () { return chunkMD6MNOEQ_cjs.GRAMMAR_ELEMENTS; }
62
+ });
63
+ Object.defineProperty(exports, "INTERACTIVE_ATTRIBUTES", {
64
+ enumerable: true,
65
+ get: function () { return chunkMD6MNOEQ_cjs.INTERACTIVE_ATTRIBUTES; }
66
+ });
67
+ Object.defineProperty(exports, "LUCIDE_ICON_NAMES", {
68
+ enumerable: true,
69
+ get: function () { return chunkMD6MNOEQ_cjs.LUCIDE_ICON_NAMES; }
70
+ });
71
+ Object.defineProperty(exports, "NODE_TYPE_MAP", {
72
+ enumerable: true,
73
+ get: function () { return chunkMD6MNOEQ_cjs.NODE_TYPE_MAP; }
74
+ });
75
+ Object.defineProperty(exports, "VALID_ATTRIBUTE_NAMES", {
76
+ enumerable: true,
77
+ get: function () { return chunkMD6MNOEQ_cjs.VALID_ATTRIBUTE_NAMES; }
78
+ });
79
+ Object.defineProperty(exports, "VALID_COMPONENT_NAMES", {
80
+ enumerable: true,
81
+ get: function () { return chunkMD6MNOEQ_cjs.VALID_COMPONENT_NAMES; }
82
+ });
83
+ Object.defineProperty(exports, "attributeFor", {
84
+ enumerable: true,
85
+ get: function () { return chunkMD6MNOEQ_cjs.attributeFor; }
86
+ });
87
+ Object.defineProperty(exports, "getValidAttributes", {
88
+ enumerable: true,
89
+ get: function () { return chunkMD6MNOEQ_cjs.getValidAttributes; }
90
+ });
91
+ Object.defineProperty(exports, "isValidAttribute", {
92
+ enumerable: true,
93
+ get: function () { return chunkMD6MNOEQ_cjs.isValidAttribute; }
94
+ });
package/dist/spec.js CHANGED
@@ -1,49 +1 @@
1
- import {
2
- ATTRIBUTE_MAP,
3
- ATTRIBUTE_OVERRIDES,
4
- ATTRIBUTE_SPECS,
5
- BLOCK_NODE_SPECS,
6
- BOX_ATTRIBUTES,
7
- COMPONENT_MAP,
8
- COMPONENT_NAMES,
9
- COMPONENT_SPECS,
10
- COMPONENT_SPEC_BY_NAME,
11
- CONTAINER_ATTRIBUTES,
12
- ELEMENT_NODE_TYPE_MAP,
13
- GRAMMAR_BLOCK_NODE_TYPES,
14
- GRAMMAR_CHILD_KEYWORDS,
15
- GRAMMAR_ELEMENTS,
16
- INTERACTIVE_ATTRIBUTES,
17
- LUCIDE_ICON_NAMES,
18
- NODE_TYPE_MAP,
19
- VALID_ATTRIBUTE_NAMES,
20
- VALID_COMPONENT_NAMES,
21
- attributeFor,
22
- getValidAttributes,
23
- isValidAttribute
24
- } from "./chunk-V3HVWC7C.js";
25
- import "./chunk-PKBMQBKP.js";
26
- export {
27
- ATTRIBUTE_MAP,
28
- ATTRIBUTE_OVERRIDES,
29
- ATTRIBUTE_SPECS,
30
- BLOCK_NODE_SPECS,
31
- BOX_ATTRIBUTES,
32
- COMPONENT_MAP,
33
- COMPONENT_NAMES,
34
- COMPONENT_SPECS,
35
- COMPONENT_SPEC_BY_NAME,
36
- CONTAINER_ATTRIBUTES,
37
- ELEMENT_NODE_TYPE_MAP,
38
- GRAMMAR_BLOCK_NODE_TYPES,
39
- GRAMMAR_CHILD_KEYWORDS,
40
- GRAMMAR_ELEMENTS,
41
- INTERACTIVE_ATTRIBUTES,
42
- LUCIDE_ICON_NAMES,
43
- NODE_TYPE_MAP,
44
- VALID_ATTRIBUTE_NAMES,
45
- VALID_COMPONENT_NAMES,
46
- attributeFor,
47
- getValidAttributes,
48
- isValidAttribute
49
- };
1
+ export { ATTRIBUTE_MAP, ATTRIBUTE_OVERRIDES, ATTRIBUTE_SPECS, BLOCK_NODE_SPECS, BOX_ATTRIBUTES, COMPONENT_MAP, COMPONENT_NAMES, COMPONENT_SPECS, COMPONENT_SPEC_BY_NAME, CONTAINER_ATTRIBUTES, ELEMENT_NODE_TYPE_MAP, GRAMMAR_BLOCK_NODE_TYPES, GRAMMAR_CHILD_KEYWORDS, GRAMMAR_ELEMENTS, INTERACTIVE_ATTRIBUTES, LUCIDE_ICON_NAMES, NODE_TYPE_MAP, VALID_ATTRIBUTE_NAMES, VALID_COMPONENT_NAMES, attributeFor, getValidAttributes, isValidAttribute } from './chunk-V3HVWC7C.js';
@@ -893,4 +893,4 @@ type LeafNode = TextContentNode | InputComponentNode | ButtonNode | DisplayNode
893
893
  type AnyNode = ContainerNode | LeafNode;
894
894
  type NodeType = 'Document' | 'Page' | 'Layout' | 'Component' | 'ComponentUse' | 'Slot' | 'Repeat' | 'Header' | 'Main' | 'Footer' | 'Sidebar' | 'Section' | 'Row' | 'Col' | 'Stack' | 'Relative' | 'Card' | 'Modal' | 'Drawer' | 'Accordion' | 'Text' | 'Title' | 'Link' | 'Input' | 'Textarea' | 'Select' | 'Checkbox' | 'Radio' | 'Switch' | 'Slider' | 'Button' | 'Image' | 'Placeholder' | 'Avatar' | 'Badge' | 'Icon' | 'Table' | 'List' | 'Alert' | 'Toast' | 'Progress' | 'Spinner' | 'Tooltip' | 'Popover' | 'Dropdown' | 'Nav' | 'Tabs' | 'Breadcrumb' | 'Divider' | 'Marker' | 'Annotations' | 'AnnotationItem';
895
895
 
896
- export type { IconNode as $, AccordionNode as A, BadgeNode as B, CardNode as C, ComponentInputValue as D, ComponentParameter as E, ComponentParameterType as F, ComponentSlotFill as G, ComponentUseNode as H, ContainerComponentNode as I, ContainerNode as J, DataNode as K, DefinitionNode as L, DirectionValue as M, DisplayNode as N, DividerComponentNode as O, DrawerNode as P, DrawerPosition as Q, DropdownItemNode as R, DropdownNode as S, FeedbackNode as T, FlexProps as U, FooterNode as V, GridNode as W, GridProps as X, GuardedOutcomeProps as Y, HeaderNode as Z, HeightValue as _, AlertNode as a, TextNode as a$, IconSize as a0, IconSizeToken as a1, ImageNode as a2, InputComponentNode as a3, InputNode as a4, InputType as a5, InteractionEffect as a6, InteractionHandler as a7, InteractiveProps as a8, JustifyValue as a9, RepeatNode as aA, RowNode as aB, SectionNode as aC, SelectNode as aD, SelectOption as aE, ShadowValue as aF, SidebarNode as aG, SizeProps as aH, SliderNode as aI, SlotNode as aJ, SourceLocation as aK, SpacingProps as aL, SpacingValue as aM, SpinnerNode as aN, SpinnerSize as aO, SpinnerSizeToken as aP, StackNode as aQ, StateDeclaration as aR, StateGuard as aS, StateValue as aT, StateValueType as aU, SwitchNode as aV, TabNode as aW, TableNode as aX, TabsNode as aY, TextAlign as aZ, TextContentNode as a_, LayoutDefinitionNode as aa, LayoutNode as ab, LeafNode as ac, LinkNode as ad, ListItemNode as ae, ListNode as af, MainNode as ag, MarkerColor as ah, MarkerNode as ai, ModalNode as aj, NavBlockItem as ak, NavChild as al, NavGroupNode as am, NavItem as an, NavNode as ao, NavigationNode as ap, NodeType as aq, OverlayNode as ar, PageNode as as, PlaceholderNode as at, PopoverNode as au, Position as av, PositionProps as aw, ProgressNode as ax, RadioNode as ay, RelativeNode as az, AlertVariant as b, TextSize as b0, TextSizeToken as b1, TextWeight as b2, TextareaNode as b3, TitleLevel as b4, TitleNode as b5, ToastNode as b6, ToastPosition as b7, TooltipNode as b8, TooltipPosition as b9, TopLevelNode as ba, ValueWithUnit as bb, VariantScopedProps as bc, WidthValue as bd, WireframeDocument as be, AlignValue as c, AnchorPosition as d, AnnotationItemNode as e, AnnotationNode as f, AnnotationsNode as g, AnyNode as h, AppearanceProps as i, AvatarNode as j, AvatarSize as k, AvatarSizeToken as l, BadgeSize as m, BadgeSizeToken as n, BadgeVariant as o, BaseNode as p, BreadcrumbItem as q, BreadcrumbNode as r, ButtonNode as s, ButtonSize as t, ButtonSizeToken as u, ButtonVariant as v, CheckboxNode as w, ColNode as x, CommonProps as y, ComponentDefinitionNode as z };
896
+ export type { SlotNode as $, AnyNode as A, BadgeNode as B, ComponentUseNode as C, DataNode as D, ModalNode as E, FeedbackNode as F, GuardedOutcomeProps as G, HeaderNode as H, InteractiveProps as I, NavigationNode as J, NodeType as K, LayoutDefinitionNode as L, MainNode as M, NavNode as N, OverlayNode as O, PageNode as P, PlaceholderNode as Q, PopoverNode as R, SourceLocation as S, ProgressNode as T, RadioNode as U, RowNode as V, WireframeDocument as W, SectionNode as X, SelectNode as Y, SidebarNode as Z, SliderNode as _, AccordionNode as a, StateDeclaration as a$, SpinnerNode as a0, SwitchNode as a1, TableNode as a2, TabsNode as a3, TextContentNode as a4, TextNode as a5, TextareaNode as a6, TitleNode as a7, ToastNode as a8, TooltipNode as a9, GridProps as aA, HeightValue as aB, IconSize as aC, IconSizeToken as aD, InputType as aE, InteractionEffect as aF, InteractionHandler as aG, JustifyValue as aH, ListItemNode as aI, MarkerColor as aJ, MarkerNode as aK, NavBlockItem as aL, NavChild as aM, NavGroupNode as aN, NavItem as aO, Position as aP, PositionProps as aQ, RelativeNode as aR, RepeatNode as aS, SelectOption as aT, ShadowValue as aU, SizeProps as aV, SpacingProps as aW, SpacingValue as aX, SpinnerSize as aY, SpinnerSizeToken as aZ, StackNode as a_, AlertVariant as aa, AlignValue as ab, AnchorPosition as ac, AnnotationItemNode as ad, AnnotationNode as ae, AnnotationsNode as af, AppearanceProps as ag, AvatarSize as ah, AvatarSizeToken as ai, BadgeSize as aj, BadgeSizeToken as ak, BadgeVariant as al, BaseNode as am, BreadcrumbItem as an, ButtonSize as ao, ButtonSizeToken as ap, ButtonVariant as aq, CommonProps as ar, ComponentInputValue as as, ComponentParameter as at, ComponentParameterType as au, ComponentSlotFill as av, DirectionValue as aw, DrawerPosition as ax, DropdownItemNode as ay, FlexProps as az, AlertNode as b, StateGuard as b0, StateValue as b1, StateValueType as b2, TabNode as b3, TextAlign as b4, TextSize as b5, TextSizeToken as b6, TextWeight as b7, TitleLevel as b8, ToastPosition as b9, TooltipPosition as ba, TopLevelNode as bb, ValueWithUnit as bc, VariantScopedProps as bd, WidthValue as be, AvatarNode as c, BreadcrumbNode as d, ButtonNode as e, CardNode as f, CheckboxNode as g, ColNode as h, ComponentDefinitionNode as i, ContainerComponentNode as j, ContainerNode as k, DefinitionNode as l, DisplayNode as m, DividerComponentNode as n, DrawerNode as o, DropdownNode as p, FooterNode as q, GridNode as r, IconNode as s, ImageNode as t, InputComponentNode as u, InputNode as v, LayoutNode as w, LeafNode as x, LinkNode as y, ListNode as z };
@@ -893,4 +893,4 @@ type LeafNode = TextContentNode | InputComponentNode | ButtonNode | DisplayNode
893
893
  type AnyNode = ContainerNode | LeafNode;
894
894
  type NodeType = 'Document' | 'Page' | 'Layout' | 'Component' | 'ComponentUse' | 'Slot' | 'Repeat' | 'Header' | 'Main' | 'Footer' | 'Sidebar' | 'Section' | 'Row' | 'Col' | 'Stack' | 'Relative' | 'Card' | 'Modal' | 'Drawer' | 'Accordion' | 'Text' | 'Title' | 'Link' | 'Input' | 'Textarea' | 'Select' | 'Checkbox' | 'Radio' | 'Switch' | 'Slider' | 'Button' | 'Image' | 'Placeholder' | 'Avatar' | 'Badge' | 'Icon' | 'Table' | 'List' | 'Alert' | 'Toast' | 'Progress' | 'Spinner' | 'Tooltip' | 'Popover' | 'Dropdown' | 'Nav' | 'Tabs' | 'Breadcrumb' | 'Divider' | 'Marker' | 'Annotations' | 'AnnotationItem';
895
895
 
896
- export type { IconNode as $, AccordionNode as A, BadgeNode as B, CardNode as C, ComponentInputValue as D, ComponentParameter as E, ComponentParameterType as F, ComponentSlotFill as G, ComponentUseNode as H, ContainerComponentNode as I, ContainerNode as J, DataNode as K, DefinitionNode as L, DirectionValue as M, DisplayNode as N, DividerComponentNode as O, DrawerNode as P, DrawerPosition as Q, DropdownItemNode as R, DropdownNode as S, FeedbackNode as T, FlexProps as U, FooterNode as V, GridNode as W, GridProps as X, GuardedOutcomeProps as Y, HeaderNode as Z, HeightValue as _, AlertNode as a, TextNode as a$, IconSize as a0, IconSizeToken as a1, ImageNode as a2, InputComponentNode as a3, InputNode as a4, InputType as a5, InteractionEffect as a6, InteractionHandler as a7, InteractiveProps as a8, JustifyValue as a9, RepeatNode as aA, RowNode as aB, SectionNode as aC, SelectNode as aD, SelectOption as aE, ShadowValue as aF, SidebarNode as aG, SizeProps as aH, SliderNode as aI, SlotNode as aJ, SourceLocation as aK, SpacingProps as aL, SpacingValue as aM, SpinnerNode as aN, SpinnerSize as aO, SpinnerSizeToken as aP, StackNode as aQ, StateDeclaration as aR, StateGuard as aS, StateValue as aT, StateValueType as aU, SwitchNode as aV, TabNode as aW, TableNode as aX, TabsNode as aY, TextAlign as aZ, TextContentNode as a_, LayoutDefinitionNode as aa, LayoutNode as ab, LeafNode as ac, LinkNode as ad, ListItemNode as ae, ListNode as af, MainNode as ag, MarkerColor as ah, MarkerNode as ai, ModalNode as aj, NavBlockItem as ak, NavChild as al, NavGroupNode as am, NavItem as an, NavNode as ao, NavigationNode as ap, NodeType as aq, OverlayNode as ar, PageNode as as, PlaceholderNode as at, PopoverNode as au, Position as av, PositionProps as aw, ProgressNode as ax, RadioNode as ay, RelativeNode as az, AlertVariant as b, TextSize as b0, TextSizeToken as b1, TextWeight as b2, TextareaNode as b3, TitleLevel as b4, TitleNode as b5, ToastNode as b6, ToastPosition as b7, TooltipNode as b8, TooltipPosition as b9, TopLevelNode as ba, ValueWithUnit as bb, VariantScopedProps as bc, WidthValue as bd, WireframeDocument as be, AlignValue as c, AnchorPosition as d, AnnotationItemNode as e, AnnotationNode as f, AnnotationsNode as g, AnyNode as h, AppearanceProps as i, AvatarNode as j, AvatarSize as k, AvatarSizeToken as l, BadgeSize as m, BadgeSizeToken as n, BadgeVariant as o, BaseNode as p, BreadcrumbItem as q, BreadcrumbNode as r, ButtonNode as s, ButtonSize as t, ButtonSizeToken as u, ButtonVariant as v, CheckboxNode as w, ColNode as x, CommonProps as y, ComponentDefinitionNode as z };
896
+ export type { SlotNode as $, AnyNode as A, BadgeNode as B, ComponentUseNode as C, DataNode as D, ModalNode as E, FeedbackNode as F, GuardedOutcomeProps as G, HeaderNode as H, InteractiveProps as I, NavigationNode as J, NodeType as K, LayoutDefinitionNode as L, MainNode as M, NavNode as N, OverlayNode as O, PageNode as P, PlaceholderNode as Q, PopoverNode as R, SourceLocation as S, ProgressNode as T, RadioNode as U, RowNode as V, WireframeDocument as W, SectionNode as X, SelectNode as Y, SidebarNode as Z, SliderNode as _, AccordionNode as a, StateDeclaration as a$, SpinnerNode as a0, SwitchNode as a1, TableNode as a2, TabsNode as a3, TextContentNode as a4, TextNode as a5, TextareaNode as a6, TitleNode as a7, ToastNode as a8, TooltipNode as a9, GridProps as aA, HeightValue as aB, IconSize as aC, IconSizeToken as aD, InputType as aE, InteractionEffect as aF, InteractionHandler as aG, JustifyValue as aH, ListItemNode as aI, MarkerColor as aJ, MarkerNode as aK, NavBlockItem as aL, NavChild as aM, NavGroupNode as aN, NavItem as aO, Position as aP, PositionProps as aQ, RelativeNode as aR, RepeatNode as aS, SelectOption as aT, ShadowValue as aU, SizeProps as aV, SpacingProps as aW, SpacingValue as aX, SpinnerSize as aY, SpinnerSizeToken as aZ, StackNode as a_, AlertVariant as aa, AlignValue as ab, AnchorPosition as ac, AnnotationItemNode as ad, AnnotationNode as ae, AnnotationsNode as af, AppearanceProps as ag, AvatarSize as ah, AvatarSizeToken as ai, BadgeSize as aj, BadgeSizeToken as ak, BadgeVariant as al, BaseNode as am, BreadcrumbItem as an, ButtonSize as ao, ButtonSizeToken as ap, ButtonVariant as aq, CommonProps as ar, ComponentInputValue as as, ComponentParameter as at, ComponentParameterType as au, ComponentSlotFill as av, DirectionValue as aw, DrawerPosition as ax, DropdownItemNode as ay, FlexProps as az, AlertNode as b, StateGuard as b0, StateValue as b1, StateValueType as b2, TabNode as b3, TextAlign as b4, TextSize as b5, TextSizeToken as b6, TextWeight as b7, TitleLevel as b8, ToastPosition as b9, TooltipPosition as ba, TopLevelNode as bb, ValueWithUnit as bc, VariantScopedProps as bd, WidthValue as be, AvatarNode as c, BreadcrumbNode as d, ButtonNode as e, CardNode as f, CheckboxNode as g, ColNode as h, ComponentDefinitionNode as i, ContainerComponentNode as j, ContainerNode as k, DefinitionNode as l, DisplayNode as m, DividerComponentNode as n, DrawerNode as o, DropdownNode as p, FooterNode as q, GridNode as r, IconNode as s, ImageNode as t, InputComponentNode as u, InputNode as v, LayoutNode as w, LeafNode as x, LinkNode as y, ListNode as z };
@@ -134,4 +134,4 @@ interface ParsedDocument {
134
134
  };
135
135
  }
136
136
 
137
- export { type CanonicalDefinition as C, type JsonObject as J, type ParsedDocument as P, type V4Diagnostic as V, type CanonicalModule as a, type CanonicalNode as b, type CanonicalParameter as c, type CanonicalPrimitive as d, type CanonicalSymbol as e, type CanonicalUse as f, type JsonValue as g, V4ParseError as h, type V4ParseOptions as i, type V4ParseResult as j, type V4SourceSpan as k };
137
+ export { type CanonicalDefinition as C, type JsonObject as J, type ParsedDocument as P, type V4SourceSpan as V, type V4ParseOptions as a, type V4ParseResult as b, type CanonicalModule as c, type CanonicalNode as d, type CanonicalParameter as e, type CanonicalPrimitive as f, type CanonicalSymbol as g, type CanonicalUse as h, type V4Diagnostic as i, V4ParseError as j, type JsonValue as k };
@@ -134,4 +134,4 @@ interface ParsedDocument {
134
134
  };
135
135
  }
136
136
 
137
- export { type CanonicalDefinition as C, type JsonObject as J, type ParsedDocument as P, type V4Diagnostic as V, type CanonicalModule as a, type CanonicalNode as b, type CanonicalParameter as c, type CanonicalPrimitive as d, type CanonicalSymbol as e, type CanonicalUse as f, type JsonValue as g, V4ParseError as h, type V4ParseOptions as i, type V4ParseResult as j, type V4SourceSpan as k };
137
+ export { type CanonicalDefinition as C, type JsonObject as J, type ParsedDocument as P, type V4SourceSpan as V, type V4ParseOptions as a, type V4ParseResult as b, type CanonicalModule as c, type CanonicalNode as d, type CanonicalParameter as e, type CanonicalPrimitive as f, type CanonicalSymbol as g, type CanonicalUse as h, type V4Diagnostic as i, V4ParseError as j, type JsonValue as k };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wireweave/core",
3
- "version": "4.0.0-beta.12",
3
+ "version": "4.0.0-beta.14",
4
4
  "description": "Core parser and renderer for wireweave",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -76,30 +76,28 @@
76
76
  "node": ">=22.13.0"
77
77
  },
78
78
  "devDependencies": {
79
- "@commitlint/cli": "^21.0.1",
80
- "@commitlint/config-conventional": "^21.0.1",
79
+ "@commitlint/cli": "^21.2.2",
80
+ "@commitlint/config-conventional": "^21.2.2",
81
81
  "@eslint/js": "^10.0.1",
82
- "@release-it/conventional-changelog": "^10.0.4",
83
- "@storybook/html": "^10.2.18",
84
- "@storybook/html-vite": "^10.2.18",
82
+ "@storybook/html": "^10.6.0",
83
+ "@storybook/html-vite": "^10.6.0",
85
84
  "@types/jsdom": "^28.0.3",
86
- "@types/node": "^25.0.8",
87
- "@vitest/coverage-v8": "^3.2.4",
88
- "eslint": "^10.3.0",
85
+ "@types/node": "^25.9.6",
86
+ "@vitest/coverage-v8": "^4.1.11",
87
+ "eslint": "^10.10.0",
89
88
  "husky": "^9.1.7",
90
89
  "jsdom": "^30.0.1",
91
- "knip": "^6.13.1",
92
- "lint-staged": "^17.0.4",
90
+ "knip": "^6.35.1",
91
+ "lint-staged": "^16.4.0",
93
92
  "lucide": "^0.562.0",
94
- "peggy": "^5.0.0",
95
- "prettier": "^3.8.3",
96
- "publint": "^0.3.21",
97
- "release-it": "^19.2.3",
98
- "storybook": "^10.2.18",
99
- "tsup": "^8.3.5",
100
- "typescript": "^5.7.2",
101
- "typescript-eslint": "^8.59.3",
102
- "vitest": "^3.1.1"
93
+ "peggy": "^5.1.0",
94
+ "prettier": "^3.9.6",
95
+ "publint": "^0.3.24",
96
+ "storybook": "^10.6.0",
97
+ "tsup": "^8.5.1",
98
+ "typescript": "^5.9.3",
99
+ "typescript-eslint": "^8.70.0",
100
+ "vitest": "^4.1.11"
103
101
  },
104
102
  "keywords": [
105
103
  "wireframe",
@@ -130,7 +128,8 @@
130
128
  "check:icons-sync": "node scripts/generate-icons.mjs --check",
131
129
  "check:icon-names-sync": "node scripts/extract-icon-names.mjs --check",
132
130
  "pretest": "pnpm run check:parser-sync && pnpm run check:spec-sync && pnpm run check:icons-sync && pnpm run check:icon-names-sync",
133
- "test": "vitest run",
131
+ "test": "pnpm test:generators && vitest run",
132
+ "test:generators": "node --test scripts/*.test.mjs",
134
133
  "test:watch": "vitest",
135
134
  "storybook": "storybook dev -p 6006",
136
135
  "build-storybook": "storybook build",
@@ -141,7 +140,6 @@
141
140
  "format": "prettier --write .",
142
141
  "format:check": "prettier --check .",
143
142
  "knip": "knip",
144
- "publint": "publint --strict",
145
- "release": "release-it"
143
+ "publint": "publint --strict"
146
144
  }
147
145
  }
@@ -1,196 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunk5DGRIQDUcjs = require('./chunk-5DGRIQDU.cjs');
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
- var _chunkZPHNXJRYcjs = require('./chunk-ZPHNXJRY.cjs');
13
-
14
- // src/renderer/canvas-renderer.ts
15
- var DEFAULT_GAP = 64;
16
- var DEFAULT_PREFIX = "wf";
17
- function layoutCanvas(pages, gap = DEFAULT_GAP) {
18
- const placed = [];
19
- let cursorX = 0;
20
- let maxRight = 0;
21
- let maxBottom = 0;
22
- for (const page of pages) {
23
- const { width, height } = _chunkZPHNXJRYcjs.resolvePageDimensions.call(void 0, page);
24
- const explicitX = typeof page.x === "number" ? page.x : void 0;
25
- const explicitY = typeof page.y === "number" ? page.y : void 0;
26
- const x = explicitX != null ? explicitX : cursorX;
27
- const y = explicitY != null ? explicitY : 0;
28
- placed.push({ page, x, y, w: width, h: height });
29
- if (explicitX === void 0) {
30
- cursorX = x + width + gap;
31
- }
32
- maxRight = Math.max(maxRight, x + width);
33
- maxBottom = Math.max(maxBottom, y + height);
34
- }
35
- return { placed, width: maxRight, height: maxBottom };
36
- }
37
- function renderCanvas(doc, options = {}) {
38
- var _a, _b;
39
- const gap = (_a = options.gap) != null ? _a : DEFAULT_GAP;
40
- const prefix = (_b = options.classPrefix) != null ? _b : DEFAULT_PREFIX;
41
- const includeStyles = options.includeStyles !== false;
42
- const theme = options.theme === "dark" ? _chunkZPHNXJRYcjs.darkTheme : _chunkZPHNXJRYcjs.defaultTheme;
43
- const css = includeStyles ? _chunkZPHNXJRYcjs.generateStyles.call(void 0, theme, prefix, options.annotationStyle) : "";
44
- const pages = _chunkZPHNXJRYcjs.documentPages.call(void 0, doc);
45
- if (pages.length === 0) {
46
- return {
47
- html: `<div class="${prefix}-canvas" data-empty="true"></div>`,
48
- css,
49
- width: 0,
50
- height: 0
51
- };
52
- }
53
- const { placed, width, height } = layoutCanvas(pages, gap);
54
- const boards = placed.map((p, pageIndex) => {
55
- const pageRenderer = new (0, _chunkZPHNXJRYcjs.HtmlRenderer)({ ...options, includeStyles: false }, pageIndex);
56
- const { html: pageHtml } = pageRenderer.render({
57
- type: "Document",
58
- children: [p.page]
59
- });
60
- return wrapBoard(pageHtml, p, prefix);
61
- }).join("\n");
62
- const canvasStyle = `position: relative; width: ${width}px; height: ${height}px;`;
63
- const html = `<div class="${prefix}-canvas" style="${canvasStyle}" data-page-count="${placed.length}">
64
- ${boards}
65
- </div>`;
66
- return { html, css, width, height };
67
- }
68
- function wrapBoard(pageHtml, placed, prefix) {
69
- const { x, y, w, h, page } = placed;
70
- const positionStyle = `position: absolute; left: ${x}px; top: ${y}px; width: ${w}px; height: ${h}px;`;
71
- const titleAttr = page.title ? ` data-page-title="${escapeAttr(page.title)}"` : "";
72
- const variantAttr = page.variant ? ` data-wf-variant="${escapeAttr(page.variant)}"` : "";
73
- const dataAttrs = ` data-page-x="${x}" data-page-y="${y}" data-page-w="${w}" data-page-h="${h}"${titleAttr}${variantAttr}`;
74
- return `<div class="${prefix}-canvas-board" style="${positionStyle}"${dataAttrs}>
75
- ${pageHtml}
76
- </div>`;
77
- }
78
- function escapeAttr(s) {
79
- return s.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;");
80
- }
81
-
82
- // src/renderer/index.ts
83
- function render(document, options = {}) {
84
- document = _chunk5DGRIQDUcjs.expandVariants.call(void 0, document);
85
- const isMultiPage = _chunkZPHNXJRYcjs.documentPages.call(void 0, document).length > 1;
86
- if (isMultiPage) {
87
- const result = renderCanvas(document, options);
88
- return { html: result.html, css: result.css };
89
- }
90
- const renderer = _chunkZPHNXJRYcjs.createHtmlRenderer.call(void 0, options);
91
- return renderer.render(document);
92
- }
93
- function renderToHtml(document, options = {}) {
94
- var _a;
95
- document = _chunk5DGRIQDUcjs.expandVariants.call(void 0, document);
96
- const { html, css } = render(document, options);
97
- const prefix = (_a = options.classPrefix) != null ? _a : "wf";
98
- const isMultiPage = _chunkZPHNXJRYcjs.documentPages.call(void 0, document).length > 1;
99
- const bodyAlign = isMultiPage ? "justify-content: flex-start;\n align-items: flex-start;" : "justify-content: center;\n align-items: center;";
100
- return `<!DOCTYPE html>
101
- <html lang="en">
102
- <head>
103
- <meta charset="UTF-8">
104
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
105
- <title>Wireframe</title>
106
- <style>
107
- /* Viewport framing: center a single page, anchor a multi-page canvas top-left */
108
- html, body {
109
- margin: 0;
110
- padding: 0;
111
- min-height: 100vh;
112
- background: #f4f4f5;
113
- }
114
- body {
115
- display: flex;
116
- ${bodyAlign}
117
- padding: 24px;
118
- box-sizing: border-box;
119
- }
120
- /* Fixed-layout invariant: the multi-page canvas is a flex item of <body> and
121
- must keep its intrinsic size when the viewport is narrower than the canvas.
122
- Without flex-shrink:0 the flex item shrinks and the boards reflow \u2014 the same
123
- defect class as .wf-page (see no-responsive.md). Single pages already carry
124
- flex-shrink:0 via generateStyles; the canvas wrapper needs it here. */
125
- .${prefix}-canvas {
126
- flex-shrink: 0;
127
- }
128
- ${css}
129
- </style>
130
- </head>
131
- <body>
132
- ${html}
133
- </body>
134
- </html>`;
135
- }
136
- function renderToSvg(document, options = {}) {
137
- var _a, _b, _c, _d, _e;
138
- document = _chunk5DGRIQDUcjs.expandVariants.call(void 0, document);
139
- const isMultiPage = _chunkZPHNXJRYcjs.documentPages.call(void 0, document).length > 1;
140
- let width = (_a = options.width) != null ? _a : 800;
141
- let height = (_b = options.height) != null ? _b : 600;
142
- let html;
143
- let css;
144
- if (isMultiPage) {
145
- const canvas = renderCanvas(document, {
146
- theme: (_c = options.theme) != null ? _c : "light"
147
- });
148
- if (options.width === void 0 && options.height === void 0) {
149
- width = canvas.width;
150
- height = canvas.height;
151
- }
152
- html = canvas.html;
153
- css = canvas.css;
154
- } else {
155
- const firstPage = _chunkZPHNXJRYcjs.documentPages.call(void 0, document)[0];
156
- if (firstPage && options.width === void 0 && options.height === void 0) {
157
- const dims = _chunkZPHNXJRYcjs.resolvePageDimensions.call(void 0, firstPage);
158
- width = dims.width;
159
- height = dims.height;
160
- }
161
- const result = render(document, { theme: (_d = options.theme) != null ? _d : "light" });
162
- html = result.html;
163
- css = result.css;
164
- }
165
- const background = (_e = options.background) != null ? _e : "#ffffff";
166
- const svg = `<?xml version="1.0" encoding="UTF-8"?>
167
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
168
- viewBox="0 0 ${width} ${height}" width="${width}" height="${height}">
169
- <rect width="100%" height="100%" fill="${background}"/>
170
- <foreignObject x="0" y="0" width="${width}" height="${height}">
171
- <div xmlns="http://www.w3.org/1999/xhtml" style="
172
- width: ${width}px;
173
- height: ${height}px;
174
- overflow: hidden;
175
- display: flex;
176
- justify-content: center;
177
- align-items: center;
178
- box-sizing: border-box;
179
- ">
180
- <style type="text/css">
181
- ${css}
182
- </style>
183
- ${html}
184
- </div>
185
- </foreignObject>
186
- </svg>`;
187
- return { svg, width, height };
188
- }
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196
- exports.layoutCanvas = layoutCanvas; exports.renderCanvas = renderCanvas; exports.render = render; exports.renderToHtml = renderToHtml; exports.renderToSvg = renderToSvg;