@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/README.md +80 -417
- package/dist/index.cjs +895 -10
- package/dist/index.d.cts +369 -3
- package/dist/index.d.ts +369 -3
- package/dist/index.js +883 -10
- package/dist/parser.d.cts +1 -1
- package/dist/parser.d.ts +1 -1
- package/dist/renderer.cjs +4 -3
- package/dist/renderer.d.cts +1 -1
- package/dist/renderer.d.ts +1 -1
- package/dist/renderer.js +4 -3
- package/dist/{types-hEr_afgw.d.cts → types-C1kQ4VAF.d.cts} +1 -1
- package/dist/{types-hEr_afgw.d.ts → types-C1kQ4VAF.d.ts} +1 -1
- package/package.json +21 -21
package/dist/parser.d.cts
CHANGED
package/dist/parser.d.ts
CHANGED
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
|
-
/*
|
|
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
|
-
|
|
50390
|
-
align-items: center;
|
|
50391
|
+
${bodyAlign}
|
|
50391
50392
|
padding: 24px;
|
|
50392
50393
|
box-sizing: border-box;
|
|
50393
50394
|
}
|
package/dist/renderer.d.cts
CHANGED
package/dist/renderer.d.ts
CHANGED
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
|
-
/*
|
|
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
|
-
|
|
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 {
|
|
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 {
|
|
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
|
|
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/
|
|
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
|
+
}
|