@wireweave/core 3.0.1-beta.0 → 3.1.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/parser.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { aK as SourceLocation, a1 as WireframeDocument } from './types-hEr_afgw.cjs';
1
+ import { az as SourceLocation, aZ as WireframeDocument } from './types-C1kQ4VAF.cjs';
2
2
 
3
3
  /**
4
4
  * Parser module for wireweave
package/dist/parser.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { aK as SourceLocation, a1 as WireframeDocument } from './types-hEr_afgw.js';
1
+ import { az as SourceLocation, aZ as WireframeDocument } from './types-C1kQ4VAF.js';
2
2
 
3
3
  /**
4
4
  * Parser module for wireweave
package/dist/renderer.cjs CHANGED
@@ -50370,6 +50370,8 @@ function render(document, options = {}) {
50370
50370
  }
50371
50371
  function renderToHtml(document, options = {}) {
50372
50372
  const { html, css } = render(document, options);
50373
+ const isMultiPage = document.children.length > 1;
50374
+ const bodyAlign = isMultiPage ? "justify-content: flex-start;\n align-items: flex-start;" : "justify-content: center;\n align-items: center;";
50373
50375
  return `<!DOCTYPE html>
50374
50376
  <html lang="en">
50375
50377
  <head>
@@ -50377,7 +50379,7 @@ function renderToHtml(document, options = {}) {
50377
50379
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
50378
50380
  <title>Wireframe</title>
50379
50381
  <style>
50380
- /* Browser centering styles */
50382
+ /* Viewport framing: center a single page, anchor a multi-page canvas top-left */
50381
50383
  html, body {
50382
50384
  margin: 0;
50383
50385
  padding: 0;
@@ -50386,8 +50388,7 @@ html, body {
50386
50388
  }
50387
50389
  body {
50388
50390
  display: flex;
50389
- justify-content: center;
50390
- align-items: center;
50391
+ ${bodyAlign}
50391
50392
  padding: 24px;
50392
50393
  box-sizing: border-box;
50393
50394
  }
@@ -1,4 +1,4 @@
1
- import { a1 as WireframeDocument, A as AnyNode, P as PageNode } from './types-hEr_afgw.cjs';
1
+ import { aZ as WireframeDocument, h as AnyNode, aj as PageNode } from './types-C1kQ4VAF.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-hEr_afgw.js';
1
+ import { aZ as WireframeDocument, h as AnyNode, aj as PageNode } from './types-C1kQ4VAF.js';
2
2
 
3
3
  /**
4
4
  * Renderer type definitions for wireweave
package/dist/renderer.js CHANGED
@@ -50328,6 +50328,8 @@ function render(document, options = {}) {
50328
50328
  }
50329
50329
  function renderToHtml(document, options = {}) {
50330
50330
  const { html, css } = render(document, options);
50331
+ const isMultiPage = document.children.length > 1;
50332
+ const bodyAlign = isMultiPage ? "justify-content: flex-start;\n align-items: flex-start;" : "justify-content: center;\n align-items: center;";
50331
50333
  return `<!DOCTYPE html>
50332
50334
  <html lang="en">
50333
50335
  <head>
@@ -50335,7 +50337,7 @@ function renderToHtml(document, options = {}) {
50335
50337
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
50336
50338
  <title>Wireframe</title>
50337
50339
  <style>
50338
- /* Browser centering styles */
50340
+ /* Viewport framing: center a single page, anchor a multi-page canvas top-left */
50339
50341
  html, body {
50340
50342
  margin: 0;
50341
50343
  padding: 0;
@@ -50344,8 +50346,7 @@ html, body {
50344
50346
  }
50345
50347
  body {
50346
50348
  display: flex;
50347
- justify-content: center;
50348
- align-items: center;
50349
+ ${bodyAlign}
50349
50350
  padding: 24px;
50350
50351
  box-sizing: border-box;
50351
50352
  }
@@ -613,4 +613,4 @@ type LeafNode = TextContentNode | InputComponentNode | ButtonNode | DisplayNode
613
613
  type AnyNode = ContainerNode | LeafNode;
614
614
  type NodeType = 'Document' | 'Page' | 'Header' | 'Main' | 'Footer' | 'Sidebar' | 'Section' | 'Row' | 'Col' | 'Stack' | 'Relative' | 'Card' | 'Modal' | 'Drawer' | 'Accordion' | 'Text' | 'Title' | 'Link' | 'Input' | 'Textarea' | 'Select' | 'Checkbox' | 'Radio' | 'Switch' | 'Slider' | 'Button' | 'Image' | 'Placeholder' | 'Avatar' | 'Badge' | 'Icon' | 'Table' | 'List' | 'Alert' | 'Toast' | 'Progress' | 'Spinner' | 'Tooltip' | 'Popover' | 'Dropdown' | 'Nav' | 'Tabs' | 'Breadcrumb' | 'Divider' | 'Marker' | 'Annotations' | 'AnnotationItem';
615
615
 
616
- export type { ToastNode as $, AnyNode as A, BadgeNode as B, CardNode as C, DataNode as D, RowNode as E, FeedbackNode as F, GridNode as G, HeaderNode as H, IconNode as I, SelectNode as J, SidebarNode as K, LayoutNode as L, MainNode as M, NavNode as N, OverlayNode as O, PageNode as P, SliderNode as Q, RadioNode as R, SectionNode as S, SpinnerNode as T, SwitchNode as U, TableNode as V, TabsNode as W, TextContentNode as X, TextNode as Y, TextareaNode as Z, TitleNode as _, AccordionNode as a, TooltipNode as a0, WireframeDocument as a1, AlertVariant as a2, AlignValue as a3, AnchorPosition as a4, AnnotationItemNode as a5, AnnotationNode as a6, AnnotationsNode as a7, AppearanceProps as a8, AvatarSize as a9, NavChild as aA, NavDivider as aB, NavGroupNode as aC, NavItem as aD, Position as aE, PositionProps as aF, RelativeNode as aG, SelectOption as aH, ShadowValue as aI, SizeProps as aJ, SourceLocation as aK, SpacingProps as aL, SpacingValue as aM, SpinnerSize as aN, SpinnerSizeToken as aO, StackNode as aP, TabNode as aQ, TextAlign as aR, TextSize as aS, TextSizeToken as aT, TextWeight as aU, TitleLevel as aV, ToastPosition as aW, TooltipPosition as aX, ValueWithUnit as aY, WidthValue as aZ, AvatarSizeToken as aa, BadgeSize as ab, BadgeSizeToken as ac, BadgeVariant as ad, BaseNode as ae, BreadcrumbItem as af, ButtonSize as ag, ButtonSizeToken as ah, ButtonVariant as ai, CommonProps as aj, DirectionValue as ak, DividerNode as al, DrawerPosition as am, DropdownItemNode as an, FlexProps as ao, GridProps as ap, HeightValue as aq, IconSize as ar, IconSizeToken as as, InputType as at, InteractiveProps as au, JustifyValue as av, ListItemNode as aw, MarkerColor as ax, MarkerNode as ay, NavBlockItem 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 };
616
+ export type { InteractiveProps as $, AccordionNode as A, BadgeNode as B, CardNode as C, ContainerNode as D, DataNode as E, DirectionValue as F, DisplayNode as G, DividerComponentNode as H, DividerNode as I, DrawerNode as J, DrawerPosition as K, DropdownItemNode as L, DropdownNode as M, FeedbackNode as N, FlexProps as O, FooterNode as P, GridNode as Q, GridProps as R, HeaderNode as S, HeightValue as T, IconNode as U, IconSize as V, IconSizeToken as W, ImageNode as X, InputComponentNode as Y, InputNode as Z, InputType as _, AlertNode as a, JustifyValue as a0, LayoutNode as a1, LeafNode as a2, LinkNode as a3, ListItemNode as a4, ListNode as a5, MainNode as a6, MarkerColor as a7, MarkerNode as a8, ModalNode as a9, SpacingProps as aA, SpacingValue as aB, SpinnerNode as aC, SpinnerSize as aD, SpinnerSizeToken as aE, StackNode as aF, SwitchNode as aG, TabNode as aH, TableNode as aI, TabsNode as aJ, TextAlign as aK, TextContentNode as aL, TextNode as aM, TextSize as aN, TextSizeToken as aO, TextWeight as aP, TextareaNode as aQ, TitleLevel as aR, TitleNode as aS, ToastNode as aT, ToastPosition as aU, TooltipNode as aV, TooltipPosition as aW, ValueWithUnit as aX, WidthValue as aY, WireframeDocument as aZ, NavBlockItem as aa, NavChild as ab, NavDivider as ac, NavGroupNode as ad, NavItem as ae, NavNode as af, NavigationNode as ag, NodeType as ah, OverlayNode as ai, PageNode as aj, PlaceholderNode as ak, PopoverNode as al, Position as am, PositionProps as an, ProgressNode as ao, RadioNode as ap, RelativeNode as aq, RowNode as ar, SectionNode as as, SelectNode as at, SelectOption as au, ShadowValue as av, SidebarNode as aw, SizeProps as ax, SliderNode as ay, SourceLocation as az, AlertVariant as b, AlignValue as c, AnchorPosition as d, AnnotationItemNode as e, AnnotationNode as f, AnnotationsNode as g, AnyNode as h, AppearanceProps as i, AvatarNode as j, AvatarSize as k, AvatarSizeToken as l, BadgeSize as m, BadgeSizeToken as n, BadgeVariant as o, BaseNode as p, BreadcrumbItem as q, BreadcrumbNode as r, ButtonNode as s, ButtonSize as t, ButtonSizeToken as u, ButtonVariant as v, CheckboxNode as w, ColNode as x, CommonProps as y, ContainerComponentNode as z };
@@ -613,4 +613,4 @@ type LeafNode = TextContentNode | InputComponentNode | ButtonNode | DisplayNode
613
613
  type AnyNode = ContainerNode | LeafNode;
614
614
  type NodeType = 'Document' | 'Page' | 'Header' | 'Main' | 'Footer' | 'Sidebar' | 'Section' | 'Row' | 'Col' | 'Stack' | 'Relative' | 'Card' | 'Modal' | 'Drawer' | 'Accordion' | 'Text' | 'Title' | 'Link' | 'Input' | 'Textarea' | 'Select' | 'Checkbox' | 'Radio' | 'Switch' | 'Slider' | 'Button' | 'Image' | 'Placeholder' | 'Avatar' | 'Badge' | 'Icon' | 'Table' | 'List' | 'Alert' | 'Toast' | 'Progress' | 'Spinner' | 'Tooltip' | 'Popover' | 'Dropdown' | 'Nav' | 'Tabs' | 'Breadcrumb' | 'Divider' | 'Marker' | 'Annotations' | 'AnnotationItem';
615
615
 
616
- export type { ToastNode as $, AnyNode as A, BadgeNode as B, CardNode as C, DataNode as D, RowNode as E, FeedbackNode as F, GridNode as G, HeaderNode as H, IconNode as I, SelectNode as J, SidebarNode as K, LayoutNode as L, MainNode as M, NavNode as N, OverlayNode as O, PageNode as P, SliderNode as Q, RadioNode as R, SectionNode as S, SpinnerNode as T, SwitchNode as U, TableNode as V, TabsNode as W, TextContentNode as X, TextNode as Y, TextareaNode as Z, TitleNode as _, AccordionNode as a, TooltipNode as a0, WireframeDocument as a1, AlertVariant as a2, AlignValue as a3, AnchorPosition as a4, AnnotationItemNode as a5, AnnotationNode as a6, AnnotationsNode as a7, AppearanceProps as a8, AvatarSize as a9, NavChild as aA, NavDivider as aB, NavGroupNode as aC, NavItem as aD, Position as aE, PositionProps as aF, RelativeNode as aG, SelectOption as aH, ShadowValue as aI, SizeProps as aJ, SourceLocation as aK, SpacingProps as aL, SpacingValue as aM, SpinnerSize as aN, SpinnerSizeToken as aO, StackNode as aP, TabNode as aQ, TextAlign as aR, TextSize as aS, TextSizeToken as aT, TextWeight as aU, TitleLevel as aV, ToastPosition as aW, TooltipPosition as aX, ValueWithUnit as aY, WidthValue as aZ, AvatarSizeToken as aa, BadgeSize as ab, BadgeSizeToken as ac, BadgeVariant as ad, BaseNode as ae, BreadcrumbItem as af, ButtonSize as ag, ButtonSizeToken as ah, ButtonVariant as ai, CommonProps as aj, DirectionValue as ak, DividerNode as al, DrawerPosition as am, DropdownItemNode as an, FlexProps as ao, GridProps as ap, HeightValue as aq, IconSize as ar, IconSizeToken as as, InputType as at, InteractiveProps as au, JustifyValue as av, ListItemNode as aw, MarkerColor as ax, MarkerNode as ay, NavBlockItem 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 };
616
+ export type { InteractiveProps as $, AccordionNode as A, BadgeNode as B, CardNode as C, ContainerNode as D, DataNode as E, DirectionValue as F, DisplayNode as G, DividerComponentNode as H, DividerNode as I, DrawerNode as J, DrawerPosition as K, DropdownItemNode as L, DropdownNode as M, FeedbackNode as N, FlexProps as O, FooterNode as P, GridNode as Q, GridProps as R, HeaderNode as S, HeightValue as T, IconNode as U, IconSize as V, IconSizeToken as W, ImageNode as X, InputComponentNode as Y, InputNode as Z, InputType as _, AlertNode as a, JustifyValue as a0, LayoutNode as a1, LeafNode as a2, LinkNode as a3, ListItemNode as a4, ListNode as a5, MainNode as a6, MarkerColor as a7, MarkerNode as a8, ModalNode as a9, SpacingProps as aA, SpacingValue as aB, SpinnerNode as aC, SpinnerSize as aD, SpinnerSizeToken as aE, StackNode as aF, SwitchNode as aG, TabNode as aH, TableNode as aI, TabsNode as aJ, TextAlign as aK, TextContentNode as aL, TextNode as aM, TextSize as aN, TextSizeToken as aO, TextWeight as aP, TextareaNode as aQ, TitleLevel as aR, TitleNode as aS, ToastNode as aT, ToastPosition as aU, TooltipNode as aV, TooltipPosition as aW, ValueWithUnit as aX, WidthValue as aY, WireframeDocument as aZ, NavBlockItem as aa, NavChild as ab, NavDivider as ac, NavGroupNode as ad, NavItem as ae, NavNode as af, NavigationNode as ag, NodeType as ah, OverlayNode as ai, PageNode as aj, PlaceholderNode as ak, PopoverNode as al, Position as am, PositionProps as an, ProgressNode as ao, RadioNode as ap, RelativeNode as aq, RowNode as ar, SectionNode as as, SelectNode as at, SelectOption as au, ShadowValue as av, SidebarNode as aw, SizeProps as ax, SliderNode as ay, SourceLocation as az, AlertVariant as b, AlignValue as c, AnchorPosition as d, AnnotationItemNode as e, AnnotationNode as f, AnnotationsNode as g, AnyNode as h, AppearanceProps as i, AvatarNode as j, AvatarSize as k, AvatarSizeToken as l, BadgeSize as m, BadgeSizeToken as n, BadgeVariant as o, BaseNode as p, BreadcrumbItem as q, BreadcrumbNode as r, ButtonNode as s, ButtonSize as t, ButtonSizeToken as u, ButtonVariant as v, CheckboxNode as w, ColNode as x, CommonProps as y, ContainerComponentNode as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wireweave/core",
3
- "version": "3.0.1-beta.0",
3
+ "version": "3.1.0-beta.0",
4
4
  "description": "Core parser and renderer for wireweave",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -26,24 +26,6 @@
26
26
  "files": [
27
27
  "dist"
28
28
  ],
29
- "scripts": {
30
- "build:grammar": "peggy --format es -o src/parser/generated-parser.js src/grammar/wireframe.peggy",
31
- "build:ts": "tsup",
32
- "build": "pnpm build:grammar && pnpm build:ts",
33
- "test": "vitest run",
34
- "test:watch": "vitest",
35
- "storybook": "storybook dev -p 6006",
36
- "build-storybook": "storybook build",
37
- "clean": "rm -rf dist",
38
- "typecheck": "tsc --noEmit",
39
- "lint": "eslint .",
40
- "lint:fix": "eslint . --fix",
41
- "format": "prettier --write .",
42
- "format:check": "prettier --check .",
43
- "knip": "knip",
44
- "prepare": "husky",
45
- "release": "release-it"
46
- },
47
29
  "devDependencies": {
48
30
  "@commitlint/cli": "^21.0.1",
49
31
  "@commitlint/config-conventional": "^21.0.1",
@@ -79,6 +61,24 @@
79
61
  "license": "MIT",
80
62
  "repository": {
81
63
  "type": "git",
82
- "url": "https://github.com/wireweave/core.git"
64
+ "url": "git+https://github.com/wireweave/wireweave.git",
65
+ "directory": "packages/core"
66
+ },
67
+ "scripts": {
68
+ "build:grammar": "peggy --format es -o src/parser/generated-parser.js src/grammar/wireframe.peggy",
69
+ "build:ts": "tsup",
70
+ "build": "pnpm build:grammar && pnpm build:ts",
71
+ "test": "vitest run",
72
+ "test:watch": "vitest",
73
+ "storybook": "storybook dev -p 6006",
74
+ "build-storybook": "storybook build",
75
+ "clean": "rm -rf dist",
76
+ "typecheck": "tsc --noEmit",
77
+ "lint": "eslint .",
78
+ "lint:fix": "eslint . --fix",
79
+ "format": "prettier --write .",
80
+ "format:check": "prettier --check .",
81
+ "knip": "knip",
82
+ "release": "release-it"
83
83
  }
84
- }
84
+ }