@hyper-elements/react 0.0.1 → 0.3.1
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/GUIDE.md +195 -0
- package/LICENSE +21 -0
- package/README.md +388 -2
- package/REFERENCE.md +951 -0
- package/dist/builder.cjs +8545 -0
- package/dist/builder.cjs.map +1 -0
- package/dist/builder.d.cts +89 -0
- package/dist/builder.d.ts +89 -0
- package/dist/builder.js +8518 -0
- package/dist/builder.js.map +1 -0
- package/dist/image.cjs +472 -0
- package/dist/image.cjs.map +1 -0
- package/dist/image.d.cts +34 -0
- package/dist/image.d.ts +34 -0
- package/dist/image.js +466 -0
- package/dist/image.js.map +1 -0
- package/dist/inspect.cjs +3601 -0
- package/dist/inspect.cjs.map +1 -0
- package/dist/inspect.d.cts +472 -0
- package/dist/inspect.d.ts +472 -0
- package/dist/inspect.js +3572 -0
- package/dist/inspect.js.map +1 -0
- package/dist/pdf.cjs +1256 -0
- package/dist/pdf.cjs.map +1 -0
- package/dist/pdf.d.cts +29 -0
- package/dist/pdf.d.ts +29 -0
- package/dist/pdf.js +1254 -0
- package/dist/pdf.js.map +1 -0
- package/dist/primitives.cjs +5550 -0
- package/dist/primitives.cjs.map +1 -0
- package/dist/primitives.d.cts +7302 -0
- package/dist/primitives.d.ts +7302 -0
- package/dist/primitives.js +5476 -0
- package/dist/primitives.js.map +1 -0
- package/package.json +143 -7
- package/index.js +0 -3
package/REFERENCE.md
ADDED
|
@@ -0,0 +1,951 @@
|
|
|
1
|
+
# Components reference (`@hyper-elements/react`)
|
|
2
|
+
|
|
3
|
+
<!-- Written from the component definitions by src/primitives/reference.ts: don't edit by hand. Regenerate with UPDATE_REFERENCE=1 pnpm --filter @hyper-elements/react test reference -->
|
|
4
|
+
|
|
5
|
+
Every component, what it holds, and every prop and style it takes, with its default and what it does. [GUIDE.md](./GUIDE.md) shows how a template is written; `validate()` checks one against what's here.
|
|
6
|
+
|
|
7
|
+
Every component also takes:
|
|
8
|
+
|
|
9
|
+
- `style={{ … }}`: the styles listed under it. A number is px (`padding: 16` is `16px`).
|
|
10
|
+
- `style={{ mobile: { … } }}`: style overrides on phones, in an `Email` or a `Page`, for the styles listed under "`style.mobile`".
|
|
11
|
+
- `style={{ hover: { … } }}`: styles on hover, for the ones listed under "`style.hover`".
|
|
12
|
+
- `hidden={{ mobile: true }}` or `hidden={{ desktop: true }}`: shown on one only.
|
|
13
|
+
- `id`: an id of your own, written into the HTML.
|
|
14
|
+
|
|
15
|
+
## Values
|
|
16
|
+
|
|
17
|
+
What a property takes, where it says *kind*:
|
|
18
|
+
|
|
19
|
+
- *fontFaces*: a list of { family, src, format, weight, style }
|
|
20
|
+
- *color*: a color ("#0879a1", "rgb(…)", "rgba(…)" or a CSS name)
|
|
21
|
+
- *fontFamily*: a font stack, as CSS writes it ("Inter, Arial, sans-serif")
|
|
22
|
+
- *fontWeight*: 100 to 900 in hundreds, "normal" or "bold"
|
|
23
|
+
- *lineHeight*: a multiple of the font size (1.5), a percentage ("150%"), px ("24px") or "normal" (the font's own)
|
|
24
|
+
- *breakpoints*: { mobile }: the phone width in px (from 240)
|
|
25
|
+
- *insets*: px for all sides, "8px 16px" (1 to 4 values), [v, h] or [t, r, b, l], or { top, right, bottom, left }
|
|
26
|
+
- *border*: "1px solid #ccc", { width, style, color } for all sides, or { top, right, bottom, left } with one of those each
|
|
27
|
+
- *radius*: px for every corner, [topLeft, topRight, bottomRight, bottomLeft], or { topLeft, topRight, bottomRight, bottomLeft }
|
|
28
|
+
- *flex*: a share of the free width (0 or more), or "none"
|
|
29
|
+
- *link*: a URL (http, https, mailto, tel, a path, or a merge tag) or { href, target }
|
|
30
|
+
- *attributes*: attributes by name, each a text value (no on… handlers, href or style)
|
|
31
|
+
- *asset*: an image URL (http, https or a data:image URI), or { src, width, height }
|
|
32
|
+
- *line*: "1px solid #ccc" or { width, style, color }
|
|
33
|
+
- *video*: a YouTube or Vimeo video's https link
|
|
34
|
+
|
|
35
|
+
## Roots
|
|
36
|
+
|
|
37
|
+
A template is one of these, and the root decides the output: `render()` writes an Email's HTML, a Page's HTML, and a Document's print HTML. `renderPdf()` (`@hyper-elements/react/pdf`) writes a Document's PDF, and `renderImage()` (`@hyper-elements/react/image`) a Canvas's PNG or SVG (`render()` writes a Canvas's HTML, to look at).
|
|
38
|
+
|
|
39
|
+
### Email
|
|
40
|
+
|
|
41
|
+
An email. Its children are stacked down the content width, centered in the window.
|
|
42
|
+
|
|
43
|
+
Holds: Section, Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html.
|
|
44
|
+
|
|
45
|
+
Props:
|
|
46
|
+
- `width`: a length (a number of px) (default `600`)
|
|
47
|
+
- `previewText`: text. Shown after the subject in inbox lists, not in the email.
|
|
48
|
+
- `title`: text. The document's title (shown in a browser tab, and by some email clients).
|
|
49
|
+
- `lang`: text. Its language, as a BCP 47 tag ("en", "ar").
|
|
50
|
+
- `dir`: one of "ltr", "rtl", "auto"
|
|
51
|
+
- `fonts`: *fontFaces*. The font files the template loads: a family's file for each weight and style it uses. Text names a family in its fontFamily stack, before the fonts to show where it can't load.
|
|
52
|
+
|
|
53
|
+
`style`:
|
|
54
|
+
- `color`: *color* (default `"#000000"`, inherited, Typography)
|
|
55
|
+
- `fontFamily`: *fontFamily* (default `"Arial, Helvetica, sans-serif"`, inherited, Typography)
|
|
56
|
+
- `fontSize`: a length (a number of px) (default `16`, inherited, Typography)
|
|
57
|
+
- `fontWeight`: *fontWeight* (default `400`, inherited, Typography)
|
|
58
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
59
|
+
- `lineHeight`: *lineHeight* (default `1.5`, inherited, Typography)
|
|
60
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
61
|
+
- `textAlign`: one of "left", "center", "right", "justify" (default `"left"`, inherited, Typography)
|
|
62
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
63
|
+
- `backgroundColor`: *color* (Background). The window's background, behind the content.
|
|
64
|
+
- `gap`: a length (a number of px) (Spacing). Space between children.
|
|
65
|
+
- `alignItems`: one of "start", "center", "end", "stretch" (Layout). Where children sit across the layout's direction (vertically in a Row, horizontally in a Column), as CSS align-items. Across a Column it places what has its own size (a Button, an Image, an Svg, a box with a width); a block of text fills the width, so its words move with its textAlign.
|
|
66
|
+
|
|
67
|
+
`style.mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `gap`.
|
|
68
|
+
|
|
69
|
+
### Page
|
|
70
|
+
|
|
71
|
+
A web page. Its children are stacked down the content width, centered in the window.
|
|
72
|
+
|
|
73
|
+
Holds: Section, Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html.
|
|
74
|
+
|
|
75
|
+
Props:
|
|
76
|
+
- `width`: a length (a number of px) (default `1200`). The widest the content gets.
|
|
77
|
+
- `description`: text. The page's meta description.
|
|
78
|
+
- `breakpoints`: *breakpoints*. Where its phone styles start: mobile, the widest window they apply to, in px (480 where it's not set).
|
|
79
|
+
- `title`: text. The document's title (shown in a browser tab, and by some email clients).
|
|
80
|
+
- `lang`: text. Its language, as a BCP 47 tag ("en", "ar").
|
|
81
|
+
- `dir`: one of "ltr", "rtl", "auto"
|
|
82
|
+
- `fonts`: *fontFaces*. The font files the template loads: a family's file for each weight and style it uses. Text names a family in its fontFamily stack, before the fonts to show where it can't load.
|
|
83
|
+
|
|
84
|
+
`style`:
|
|
85
|
+
- `color`: *color* (default `"#000000"`, inherited, Typography)
|
|
86
|
+
- `fontFamily`: *fontFamily* (default `"Arial, Helvetica, sans-serif"`, inherited, Typography)
|
|
87
|
+
- `fontSize`: a length (a number of px) (default `16`, inherited, Typography)
|
|
88
|
+
- `fontWeight`: *fontWeight* (default `400`, inherited, Typography)
|
|
89
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
90
|
+
- `lineHeight`: *lineHeight* (default `1.5`, inherited, Typography)
|
|
91
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
92
|
+
- `textAlign`: one of "left", "center", "right", "justify" (default `"left"`, inherited, Typography)
|
|
93
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
94
|
+
- `backgroundColor`: *color* (Background). The window's background, behind the content.
|
|
95
|
+
- `gap`: a length (a number of px) (Spacing). Space between children.
|
|
96
|
+
- `alignItems`: one of "start", "center", "end", "stretch" (Layout). Where children sit across the layout's direction (vertically in a Row, horizontally in a Column), as CSS align-items. Across a Column it places what has its own size (a Button, an Image, an Svg, a box with a width); a block of text fills the width, so its words move with its textAlign.
|
|
97
|
+
|
|
98
|
+
`style.mobile` (on phones): `gap`.
|
|
99
|
+
|
|
100
|
+
### Document
|
|
101
|
+
|
|
102
|
+
A printed document: its children on pages of its size (Document.Page, or split by PageBreaks), a PageHeader and a PageFooter on each. Renders to print HTML, and to PDF with @hyper-elements/react/pdf.
|
|
103
|
+
|
|
104
|
+
Holds: Section, Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html, Document.Page, PageBreak, PageHeader, PageFooter.
|
|
105
|
+
|
|
106
|
+
Props:
|
|
107
|
+
- `size`: one of "A3", "A4", "A5", "Letter", "Legal", "Tabloid" (default `"A4"`)
|
|
108
|
+
- `orientation`: one of "portrait", "landscape" (default `"portrait"`)
|
|
109
|
+
- `margin`: *insets* (default `{"top":48,"right":48,"bottom":48,"left":48}`). Around each page's content (its header and footer too), in px: 96 to the inch.
|
|
110
|
+
- `title`: text. The document's title (shown in a browser tab, and by some email clients).
|
|
111
|
+
- `lang`: text. Its language, as a BCP 47 tag ("en", "ar").
|
|
112
|
+
- `dir`: one of "ltr", "rtl", "auto"
|
|
113
|
+
- `fonts`: *fontFaces*. The font files the template loads: a family's file for each weight and style it uses. Text names a family in its fontFamily stack, before the fonts to show where it can't load.
|
|
114
|
+
|
|
115
|
+
`style`:
|
|
116
|
+
- `color`: *color* (default `"#000000"`, inherited, Typography)
|
|
117
|
+
- `fontFamily`: *fontFamily* (default `"Arial, Helvetica, sans-serif"`, inherited, Typography)
|
|
118
|
+
- `fontSize`: a length (a number of px) (default `16`, inherited, Typography)
|
|
119
|
+
- `fontWeight`: *fontWeight* (default `400`, inherited, Typography)
|
|
120
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
121
|
+
- `lineHeight`: *lineHeight* (default `1.5`, inherited, Typography)
|
|
122
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
123
|
+
- `textAlign`: one of "left", "center", "right", "justify" (default `"left"`, inherited, Typography)
|
|
124
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
125
|
+
- `backgroundColor`: *color* (Background). Each page's background, out to its edges.
|
|
126
|
+
- `gap`: a length (a number of px) (Spacing). Space between children.
|
|
127
|
+
- `alignItems`: one of "start", "center", "end", "stretch" (Layout). Where children sit across the layout's direction (vertically in a Row, horizontally in a Column), as CSS align-items. Across a Column it places what has its own size (a Button, an Image, an Svg, a box with a width); a block of text fills the width, so its words move with its textAlign.
|
|
128
|
+
|
|
129
|
+
### Canvas
|
|
130
|
+
|
|
131
|
+
An image of a fixed size (a social card, a banner): its children laid out in it as on a page. Written as PNG or SVG with @hyper-elements/react/image.
|
|
132
|
+
|
|
133
|
+
Holds: Section, Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html.
|
|
134
|
+
|
|
135
|
+
Props:
|
|
136
|
+
- `width`: a length (a number of px) (default `1200`). The image's width, in px.
|
|
137
|
+
- `height`: a length (a number of px) (default `630`). The image's height, in px: what's past it is cut.
|
|
138
|
+
- `title`: text. The document's title (shown in a browser tab, and by some email clients).
|
|
139
|
+
- `lang`: text. Its language, as a BCP 47 tag ("en", "ar").
|
|
140
|
+
- `dir`: one of "ltr", "rtl", "auto"
|
|
141
|
+
- `fonts`: *fontFaces*. The font files the template loads: a family's file for each weight and style it uses. Text names a family in its fontFamily stack, before the fonts to show where it can't load.
|
|
142
|
+
|
|
143
|
+
`style`:
|
|
144
|
+
- `color`: *color* (default `"#000000"`, inherited, Typography)
|
|
145
|
+
- `fontFamily`: *fontFamily* (default `"Arial, Helvetica, sans-serif"`, inherited, Typography)
|
|
146
|
+
- `fontSize`: a length (a number of px) (default `16`, inherited, Typography)
|
|
147
|
+
- `fontWeight`: *fontWeight* (default `400`, inherited, Typography)
|
|
148
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
149
|
+
- `lineHeight`: *lineHeight* (default `1.5`, inherited, Typography)
|
|
150
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
151
|
+
- `textAlign`: one of "left", "center", "right", "justify" (default `"left"`, inherited, Typography)
|
|
152
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
153
|
+
- `backgroundColor`: *color* (Background). The window's background, behind the content.
|
|
154
|
+
- `gap`: a length (a number of px) (Spacing). Space between children.
|
|
155
|
+
- `alignItems`: one of "start", "center", "end", "stretch" (Layout). Where children sit across the layout's direction (vertically in a Row, horizontally in a Column), as CSS align-items. Across a Column it places what has its own size (a Button, an Image, an Svg, a box with a width); a block of text fills the width, so its words move with its textAlign.
|
|
156
|
+
- `padding`: *insets* (Spacing)
|
|
157
|
+
- `justifyContent`: one of "start", "center", "end", "space-between" (Layout). Where children sit along the layout's direction, as CSS justify-content.
|
|
158
|
+
|
|
159
|
+
## Sections and layout
|
|
160
|
+
|
|
161
|
+
Bands and boxes that arrange blocks. None is required: a root stacks its children.
|
|
162
|
+
|
|
163
|
+
### Section
|
|
164
|
+
|
|
165
|
+
A band across the whole window, directly in an Email or Page: its background spans the window, its children are stacked at the content width.
|
|
166
|
+
|
|
167
|
+
Holds: Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html.
|
|
168
|
+
|
|
169
|
+
`style`:
|
|
170
|
+
- `color`: *color* (inherited, Typography)
|
|
171
|
+
- `fontFamily`: *fontFamily* (inherited, Typography)
|
|
172
|
+
- `fontSize`: a length (a number of px) (inherited, Typography)
|
|
173
|
+
- `fontWeight`: *fontWeight* (inherited, Typography)
|
|
174
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
175
|
+
- `lineHeight`: *lineHeight* (inherited, Typography)
|
|
176
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
177
|
+
- `textAlign`: one of "left", "center", "right", "justify" (inherited, Typography)
|
|
178
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
179
|
+
- `backgroundColor`: *color* (Background)
|
|
180
|
+
- `padding`: *insets* (Spacing)
|
|
181
|
+
- `border`: *border* (Border)
|
|
182
|
+
- `gap`: a length (a number of px) (Spacing). Space between children.
|
|
183
|
+
- `alignItems`: one of "start", "center", "end", "stretch" (Layout). Where children sit across the layout's direction (vertically in a Row, horizontally in a Column), as CSS align-items. Across a Column it places what has its own size (a Button, an Image, an Svg, a box with a width); a block of text fills the width, so its words move with its textAlign.
|
|
184
|
+
|
|
185
|
+
`style.mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `padding`, `border`, `gap`.
|
|
186
|
+
|
|
187
|
+
### Row
|
|
188
|
+
|
|
189
|
+
Lays its children out side by side. A child takes its width, or a share of what's left (its flex, 1 by default).
|
|
190
|
+
|
|
191
|
+
Holds: Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html.
|
|
192
|
+
|
|
193
|
+
Props:
|
|
194
|
+
- `stackOnMobile`: true or false (default `true`). Its children stack full-width on phones (in an Email or a Page).
|
|
195
|
+
- `dir`: one of "ltr", "rtl", "auto". Its text's direction, where it differs from the template's; it starts on that side unless aligned otherwise.
|
|
196
|
+
|
|
197
|
+
`style`:
|
|
198
|
+
- `color`: *color* (inherited, Typography)
|
|
199
|
+
- `fontFamily`: *fontFamily* (inherited, Typography)
|
|
200
|
+
- `fontSize`: a length (a number of px) (inherited, Typography)
|
|
201
|
+
- `fontWeight`: *fontWeight* (inherited, Typography)
|
|
202
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
203
|
+
- `lineHeight`: *lineHeight* (inherited, Typography)
|
|
204
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
205
|
+
- `textAlign`: one of "left", "center", "right", "justify" (inherited, Typography)
|
|
206
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
207
|
+
- `width`: a length (a number of px, %) (Size)
|
|
208
|
+
- `minWidth`: a length (a number of px, %) (Size)
|
|
209
|
+
- `maxWidth`: a length (a number of px, %) (Size)
|
|
210
|
+
- `height`: a length (a number of px) (Size)
|
|
211
|
+
- `padding`: *insets* (Spacing)
|
|
212
|
+
- `backgroundColor`: *color* (Background)
|
|
213
|
+
- `border`: *border* (Border)
|
|
214
|
+
- `borderRadius`: *radius* (Border)
|
|
215
|
+
- `overflow`: one of "visible", "hidden" (Layout). Whether content past a set height is cut off.
|
|
216
|
+
- `gap`: a length (a number of px) (Spacing). Space between children.
|
|
217
|
+
- `alignItems`: one of "start", "center", "end", "stretch" (Layout). Where children sit across the layout's direction (vertically in a Row, horizontally in a Column), as CSS align-items. Across a Column it places what has its own size (a Button, an Image, an Svg, a box with a width); a block of text fills the width, so its words move with its textAlign.
|
|
218
|
+
- `justifyContent`: one of "start", "center", "end", "space-between" (Layout). Where children sit along the layout's direction, as CSS justify-content.
|
|
219
|
+
- `flexWrap`: one of "nowrap", "wrap", "words" (Layout). "wrap": children that don't fit wrap onto another line, as CSS flex-wrap (in an email, in a Row kept side by side on phones, with no gap between the lines). "words": in an email, also a space of the text's font apart, on lines at least as tall as its, as words are.
|
|
220
|
+
- `flex`: *flex* (Layout). In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
|
|
221
|
+
|
|
222
|
+
`style.mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `width`, `maxWidth`, `padding`, `border`, `gap`.
|
|
223
|
+
|
|
224
|
+
### Column
|
|
225
|
+
|
|
226
|
+
Stacks its children vertically, with its own spacing and box.
|
|
227
|
+
|
|
228
|
+
Holds: Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html.
|
|
229
|
+
|
|
230
|
+
`style`:
|
|
231
|
+
- `color`: *color* (inherited, Typography)
|
|
232
|
+
- `fontFamily`: *fontFamily* (inherited, Typography)
|
|
233
|
+
- `fontSize`: a length (a number of px) (inherited, Typography)
|
|
234
|
+
- `fontWeight`: *fontWeight* (inherited, Typography)
|
|
235
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
236
|
+
- `lineHeight`: *lineHeight* (inherited, Typography)
|
|
237
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
238
|
+
- `textAlign`: one of "left", "center", "right", "justify" (inherited, Typography)
|
|
239
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
240
|
+
- `width`: a length (a number of px, %) (Size)
|
|
241
|
+
- `minWidth`: a length (a number of px, %) (Size)
|
|
242
|
+
- `maxWidth`: a length (a number of px, %) (Size)
|
|
243
|
+
- `height`: a length (a number of px) (Size)
|
|
244
|
+
- `padding`: *insets* (Spacing)
|
|
245
|
+
- `backgroundColor`: *color* (Background)
|
|
246
|
+
- `border`: *border* (Border)
|
|
247
|
+
- `borderRadius`: *radius* (Border)
|
|
248
|
+
- `overflow`: one of "visible", "hidden" (Layout). Whether content past a set height is cut off.
|
|
249
|
+
- `gap`: a length (a number of px) (Spacing). Space between children.
|
|
250
|
+
- `alignItems`: one of "start", "center", "end", "stretch" (Layout). Where children sit across the layout's direction (vertically in a Row, horizontally in a Column), as CSS align-items. Across a Column it places what has its own size (a Button, an Image, an Svg, a box with a width); a block of text fills the width, so its words move with its textAlign.
|
|
251
|
+
- `justifyContent`: one of "start", "center", "end", "space-between" (Layout). Where children sit along the layout's direction, as CSS justify-content.
|
|
252
|
+
- `flex`: *flex* (Layout). In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
|
|
253
|
+
|
|
254
|
+
`style.mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `width`, `maxWidth`, `padding`, `border`, `gap`.
|
|
255
|
+
|
|
256
|
+
### Grid
|
|
257
|
+
|
|
258
|
+
Its children in columns of equal width, row after row; on phones, one under another.
|
|
259
|
+
|
|
260
|
+
Holds: Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html.
|
|
261
|
+
|
|
262
|
+
Props:
|
|
263
|
+
- `columns`: an integer from 1 to 12 (default `2`). How many children to a row.
|
|
264
|
+
- `stackOnMobile`: true or false (default `true`). Its children one under another on phones (in an Email or a Page).
|
|
265
|
+
|
|
266
|
+
`style`:
|
|
267
|
+
- `color`: *color* (inherited, Typography)
|
|
268
|
+
- `fontFamily`: *fontFamily* (inherited, Typography)
|
|
269
|
+
- `fontSize`: a length (a number of px) (inherited, Typography)
|
|
270
|
+
- `fontWeight`: *fontWeight* (inherited, Typography)
|
|
271
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
272
|
+
- `lineHeight`: *lineHeight* (inherited, Typography)
|
|
273
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
274
|
+
- `textAlign`: one of "left", "center", "right", "justify" (inherited, Typography)
|
|
275
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
276
|
+
- `width`: a length (a number of px, %) (Size)
|
|
277
|
+
- `minWidth`: a length (a number of px, %) (Size)
|
|
278
|
+
- `maxWidth`: a length (a number of px, %) (Size)
|
|
279
|
+
- `height`: a length (a number of px) (Size)
|
|
280
|
+
- `padding`: *insets* (Spacing)
|
|
281
|
+
- `backgroundColor`: *color* (Background)
|
|
282
|
+
- `border`: *border* (Border)
|
|
283
|
+
- `borderRadius`: *radius* (Border)
|
|
284
|
+
- `overflow`: one of "visible", "hidden" (Layout). Whether content past a set height is cut off.
|
|
285
|
+
- `gap`: a length (a number of px) (Spacing). Space between its children, across and down (unless rowGap is set).
|
|
286
|
+
- `rowGap`: a length (a number of px) (Spacing). Space between its rows (gap by default); on phones, where the children stack, gap is between them.
|
|
287
|
+
- `alignItems`: one of "start", "center", "end", "stretch" (Layout). Where each child sits in its row's height, as CSS align-items.
|
|
288
|
+
- `flex`: *flex* (Layout). In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
|
|
289
|
+
|
|
290
|
+
`style.mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `width`, `maxWidth`, `padding`, `border`, `gap`, `rowGap`.
|
|
291
|
+
|
|
292
|
+
### Layer
|
|
293
|
+
|
|
294
|
+
Its children over each other, in one box as tall as the tallest: words on an image (a background image, its first child). In an email, an Image with one child over it.
|
|
295
|
+
|
|
296
|
+
Holds: Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html.
|
|
297
|
+
|
|
298
|
+
`style`:
|
|
299
|
+
- `color`: *color* (inherited, Typography)
|
|
300
|
+
- `fontFamily`: *fontFamily* (inherited, Typography)
|
|
301
|
+
- `fontSize`: a length (a number of px) (inherited, Typography)
|
|
302
|
+
- `fontWeight`: *fontWeight* (inherited, Typography)
|
|
303
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
304
|
+
- `lineHeight`: *lineHeight* (inherited, Typography)
|
|
305
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
306
|
+
- `textAlign`: one of "left", "center", "right", "justify" (inherited, Typography)
|
|
307
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
308
|
+
- `width`: a length (a number of px, %) (Size)
|
|
309
|
+
- `minWidth`: a length (a number of px, %) (Size)
|
|
310
|
+
- `maxWidth`: a length (a number of px, %) (Size)
|
|
311
|
+
- `backgroundColor`: *color* (Background)
|
|
312
|
+
- `border`: *border* (Border)
|
|
313
|
+
- `borderRadius`: *radius* (Border)
|
|
314
|
+
- `height`: a length (a number of px) (Size). Its height: the image under its children covers it, cut at its sides or its top and bottom.
|
|
315
|
+
- `alignItems`: one of "start", "center", "end", "stretch" (default `"start"`, Layout). Where its children sit in its height, as CSS align-items.
|
|
316
|
+
- `justifyItems`: one of "start", "center", "end", "stretch" (default `"stretch"`, Layout). Where its children sit across its width, as CSS justify-items: stretched to it by default.
|
|
317
|
+
- `flex`: *flex* (Layout). In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
|
|
318
|
+
|
|
319
|
+
`style.mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `width`, `maxWidth`, `border`.
|
|
320
|
+
|
|
321
|
+
## Blocks
|
|
322
|
+
|
|
323
|
+
Content, stacked down whatever holds it.
|
|
324
|
+
|
|
325
|
+
### Svg
|
|
326
|
+
|
|
327
|
+
Shapes (Rect, Circle, Ellipse, Line, Polygon, Path) drawn in a box of its own: its width and height, and the coordinates its viewBox gives them.
|
|
328
|
+
|
|
329
|
+
Holds: Rect, Circle, Ellipse, Line, Polygon, Path. Not in an Email.
|
|
330
|
+
|
|
331
|
+
Props:
|
|
332
|
+
- `width`: a number from 0 (required)
|
|
333
|
+
- `height`: a number from 0 (required)
|
|
334
|
+
- `viewBox`: text. The shapes' coordinates in it, as "x y width height" (its width and height by default).
|
|
335
|
+
- `title`: text. What it shows, read out by screen readers.
|
|
336
|
+
|
|
337
|
+
`style`:
|
|
338
|
+
- `padding`: *insets* (Spacing)
|
|
339
|
+
- `backgroundColor`: *color* (Background)
|
|
340
|
+
- `border`: *border* (Border)
|
|
341
|
+
- `borderRadius`: *radius* (Border)
|
|
342
|
+
- `flex`: *flex* (Layout). In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
|
|
343
|
+
|
|
344
|
+
`style.mobile` (on phones): `padding`, `border`.
|
|
345
|
+
|
|
346
|
+
### Text
|
|
347
|
+
|
|
348
|
+
A paragraph of text.
|
|
349
|
+
|
|
350
|
+
Holds: text; PageNumber, Span, Link, LineBreak, MergeTag, Image.
|
|
351
|
+
|
|
352
|
+
Props:
|
|
353
|
+
- `dir`: one of "ltr", "rtl", "auto". Its text's direction, where it differs from the template's; it starts on that side unless aligned otherwise.
|
|
354
|
+
|
|
355
|
+
`style`:
|
|
356
|
+
- `color`: *color* (inherited, Typography)
|
|
357
|
+
- `fontFamily`: *fontFamily* (inherited, Typography)
|
|
358
|
+
- `fontSize`: a length (a number of px) (inherited, Typography)
|
|
359
|
+
- `fontWeight`: *fontWeight* (inherited, Typography)
|
|
360
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
361
|
+
- `lineHeight`: *lineHeight* (inherited, Typography)
|
|
362
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
363
|
+
- `textAlign`: one of "left", "center", "right", "justify" (inherited, Typography)
|
|
364
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
365
|
+
- `textDecoration`: one of "none", "underline", "line-through" (Typography)
|
|
366
|
+
- `width`: a length (a number of px, %) (Size)
|
|
367
|
+
- `maxWidth`: a length (a number of px, %) (Size)
|
|
368
|
+
- `padding`: *insets* (Spacing)
|
|
369
|
+
- `backgroundColor`: *color* (Background)
|
|
370
|
+
- `border`: *border* (Border)
|
|
371
|
+
- `borderRadius`: *radius* (Border)
|
|
372
|
+
- `flex`: *flex* (Layout). In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
|
|
373
|
+
|
|
374
|
+
`style.mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `width`, `maxWidth`, `padding`, `border`.
|
|
375
|
+
|
|
376
|
+
### Heading
|
|
377
|
+
|
|
378
|
+
A heading, from level 1 (the page's title) to 6.
|
|
379
|
+
|
|
380
|
+
Holds: text; PageNumber, Span, Link, LineBreak, MergeTag.
|
|
381
|
+
|
|
382
|
+
Props:
|
|
383
|
+
- `level`: one of 1, 2, 3, 4, 5, 6 (default `1`)
|
|
384
|
+
- `dir`: one of "ltr", "rtl", "auto". Its text's direction, where it differs from the template's; it starts on that side unless aligned otherwise.
|
|
385
|
+
|
|
386
|
+
`style`:
|
|
387
|
+
- `color`: *color* (inherited, Typography)
|
|
388
|
+
- `fontFamily`: *fontFamily* (inherited, Typography)
|
|
389
|
+
- `fontSize`: a length (a number of px) (inherited, Typography)
|
|
390
|
+
- `fontWeight`: *fontWeight* (default `700`, inherited, Typography)
|
|
391
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
392
|
+
- `lineHeight`: *lineHeight* (default `1.25`, inherited, Typography)
|
|
393
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
394
|
+
- `textAlign`: one of "left", "center", "right", "justify" (inherited, Typography)
|
|
395
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
396
|
+
- `textDecoration`: one of "none", "underline", "line-through" (Typography)
|
|
397
|
+
- `width`: a length (a number of px, %) (Size)
|
|
398
|
+
- `maxWidth`: a length (a number of px, %) (Size)
|
|
399
|
+
- `padding`: *insets* (Spacing)
|
|
400
|
+
- `backgroundColor`: *color* (Background)
|
|
401
|
+
- `border`: *border* (Border)
|
|
402
|
+
- `borderRadius`: *radius* (Border)
|
|
403
|
+
- `flex`: *flex* (Layout). In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
|
|
404
|
+
|
|
405
|
+
`style.mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `width`, `maxWidth`, `padding`, `border`.
|
|
406
|
+
|
|
407
|
+
### Button
|
|
408
|
+
|
|
409
|
+
A link drawn as a button.
|
|
410
|
+
|
|
411
|
+
Holds: text; Span, MergeTag, LineBreak.
|
|
412
|
+
|
|
413
|
+
Props:
|
|
414
|
+
- `href`: *link* (required)
|
|
415
|
+
- `title`: text. Shown as a tooltip by mail clients and browsers that show one.
|
|
416
|
+
- `aria-label`: text. What a screen reader says for it, where its text alone doesn't say enough ("Read more about pricing").
|
|
417
|
+
- `attrs`: *attributes*. More attributes for its link: a class, a `data-` attribute.
|
|
418
|
+
|
|
419
|
+
`style`:
|
|
420
|
+
- `color`: *color* (default `"#ffffff"`, inherited, Typography)
|
|
421
|
+
- `fontFamily`: *fontFamily* (inherited, Typography)
|
|
422
|
+
- `fontSize`: a length (a number of px) (default `14`, inherited, Typography)
|
|
423
|
+
- `fontWeight`: *fontWeight* (inherited, Typography)
|
|
424
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
425
|
+
- `lineHeight`: *lineHeight* (default `1.2`, inherited, Typography)
|
|
426
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
427
|
+
- `textAlign`: one of "left", "center", "right", "justify" (default `"center"`, inherited, Typography)
|
|
428
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
429
|
+
- `textDecoration`: one of "none", "underline", "line-through" (Typography)
|
|
430
|
+
- `width`: a length (a number of px, %) (Size)
|
|
431
|
+
- `maxWidth`: a length (a number of px, %) (Size)
|
|
432
|
+
- `padding`: *insets* (default `{"top":10,"right":20,"bottom":10,"left":20}`, Spacing)
|
|
433
|
+
- `backgroundColor`: *color* (default `"#0879a1"`, Background)
|
|
434
|
+
- `border`: *border* (Border)
|
|
435
|
+
- `borderRadius`: *radius* (default `4`, Border)
|
|
436
|
+
- `boxSizing`: one of "border-box", "content-box" (Size). Whether its width holds its padding and border (border-box), or they go on top of it (content-box).
|
|
437
|
+
- `alignSelf`: one of "start", "center", "end" (Layout). Where it sits in its stack, whatever the stack's alignItems: on phones too, another place than on desktop.
|
|
438
|
+
- `flex`: *flex* (Layout). In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
|
|
439
|
+
|
|
440
|
+
`style.hover`: `color`, `backgroundColor`.
|
|
441
|
+
|
|
442
|
+
`style.mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `width`, `maxWidth`, `padding`, `border`, `alignSelf`.
|
|
443
|
+
|
|
444
|
+
### Image
|
|
445
|
+
|
|
446
|
+
An image in the content. Without a width it takes its own size, no wider than its parent.
|
|
447
|
+
|
|
448
|
+
Holds: nothing.
|
|
449
|
+
|
|
450
|
+
Props:
|
|
451
|
+
- `src`: *asset* (required)
|
|
452
|
+
- `alt`: text (default `""`). Read out by screen readers, and shown where images don't load.
|
|
453
|
+
- `title`: text. Shown as a tooltip by mail clients and browsers that show one.
|
|
454
|
+
|
|
455
|
+
`style`:
|
|
456
|
+
- `width`: a length (a number of px, %) (Size)
|
|
457
|
+
- `maxWidth`: a length (a number of px, %) (Size)
|
|
458
|
+
- `height`: a length (a number of px) (Size)
|
|
459
|
+
- `border`: *border* (Border)
|
|
460
|
+
- `borderRadius`: *radius* (Border)
|
|
461
|
+
- `flex`: *flex* (Layout). In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
|
|
462
|
+
- `alignSelf`: one of "start", "center", "end" (Layout). Where it sits in its stack on phones, where that's another place than on desktop.
|
|
463
|
+
- `verticalAlign`: one of "top", "middle" (Layout). Where it sits in a line of text it's in.
|
|
464
|
+
|
|
465
|
+
`style.mobile` (on phones): `width`, `maxWidth`, `border`, `alignSelf`.
|
|
466
|
+
|
|
467
|
+
### Divider
|
|
468
|
+
|
|
469
|
+
A horizontal line.
|
|
470
|
+
|
|
471
|
+
Holds: nothing.
|
|
472
|
+
|
|
473
|
+
`style`:
|
|
474
|
+
- `borderTop`: *line* (default `{"width":1,"style":"solid","color":"#bbbbbb"}`, Border). The line, as CSS border-top: "1px solid #bbbbbb".
|
|
475
|
+
- `width`: a length (a number of px, %) (default `"100%"`, Size)
|
|
476
|
+
- `padding`: *insets* (Spacing)
|
|
477
|
+
|
|
478
|
+
`style.mobile` (on phones): `width`, `padding`.
|
|
479
|
+
|
|
480
|
+
### List
|
|
481
|
+
|
|
482
|
+
A bulleted or numbered list of ListItems. Its markers sit in a column of their own (indent) before the items.
|
|
483
|
+
|
|
484
|
+
Holds: ListItem.
|
|
485
|
+
|
|
486
|
+
Props:
|
|
487
|
+
- `type`: one of "bullet", "number" (default `"bullet"`)
|
|
488
|
+
- `start`: an integer from 0 (default `1`). The first item's number, in a numbered list.
|
|
489
|
+
|
|
490
|
+
`style`:
|
|
491
|
+
- `color`: *color* (inherited, Typography)
|
|
492
|
+
- `fontFamily`: *fontFamily* (inherited, Typography)
|
|
493
|
+
- `fontSize`: a length (a number of px) (inherited, Typography)
|
|
494
|
+
- `fontWeight`: *fontWeight* (inherited, Typography)
|
|
495
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
496
|
+
- `lineHeight`: *lineHeight* (inherited, Typography)
|
|
497
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
498
|
+
- `textAlign`: one of "left", "center", "right", "justify" (inherited, Typography)
|
|
499
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
500
|
+
- `width`: a length (a number of px, %) (Size)
|
|
501
|
+
- `maxWidth`: a length (a number of px, %) (Size)
|
|
502
|
+
- `padding`: *insets* (Spacing)
|
|
503
|
+
- `backgroundColor`: *color* (Background)
|
|
504
|
+
- `border`: *border* (Border)
|
|
505
|
+
- `gap`: a length (a number of px) (Spacing). Space between items.
|
|
506
|
+
- `indent`: a length (a number of px) (default `24`, Spacing). The width of the markers' column, before the items.
|
|
507
|
+
- `flex`: *flex* (Layout). In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
|
|
508
|
+
|
|
509
|
+
`style.mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `width`, `maxWidth`, `padding`, `border`, `gap`.
|
|
510
|
+
|
|
511
|
+
### Table
|
|
512
|
+
|
|
513
|
+
A table of data: TableRows of TableCells. Columns take their cells' widths; the rest share what's left.
|
|
514
|
+
|
|
515
|
+
Holds: TableRow.
|
|
516
|
+
|
|
517
|
+
`style`:
|
|
518
|
+
- `color`: *color* (inherited, Typography)
|
|
519
|
+
- `fontFamily`: *fontFamily* (inherited, Typography)
|
|
520
|
+
- `fontSize`: a length (a number of px) (inherited, Typography)
|
|
521
|
+
- `fontWeight`: *fontWeight* (inherited, Typography)
|
|
522
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
523
|
+
- `lineHeight`: *lineHeight* (inherited, Typography)
|
|
524
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
525
|
+
- `textAlign`: one of "left", "center", "right", "justify" (inherited, Typography)
|
|
526
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
527
|
+
- `width`: a length (a number of px, %) (Size)
|
|
528
|
+
- `maxWidth`: a length (a number of px, %) (Size)
|
|
529
|
+
- `backgroundColor`: *color* (Background)
|
|
530
|
+
- `border`: *border* (Border)
|
|
531
|
+
- `cellPadding`: *insets* (Spacing). Every cell's padding, where the cell doesn't set its own.
|
|
532
|
+
- `rowBorder`: *line* (Border)
|
|
533
|
+
- `borderCollapse`: one of "separate", "collapse" (Border). Whether cells side by side draw a border each (separate) or share one (collapse).
|
|
534
|
+
- `flex`: *flex* (Layout). In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
|
|
535
|
+
|
|
536
|
+
`style.mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `width`, `maxWidth`, `border`.
|
|
537
|
+
|
|
538
|
+
### Video
|
|
539
|
+
|
|
540
|
+
A YouTube or Vimeo video: its player on a page; in an email (which can't play one), its thumbnail, linked to it.
|
|
541
|
+
|
|
542
|
+
Holds: nothing.
|
|
543
|
+
|
|
544
|
+
Props:
|
|
545
|
+
- `src`: *video* (required). The video's YouTube or Vimeo link.
|
|
546
|
+
- `thumbnail`: *asset*. The image an email shows, linked to the video. A YouTube video's own where there's none; a Vimeo video's can't be found without the network.
|
|
547
|
+
- `title`: text (default `"Video"`). The player's title on a page, the thumbnail's alternate text in an email.
|
|
548
|
+
|
|
549
|
+
`style`:
|
|
550
|
+
- `width`: a length (a number of px, %) (Size)
|
|
551
|
+
- `maxWidth`: a length (a number of px, %) (Size)
|
|
552
|
+
- `flex`: *flex* (Layout). In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
|
|
553
|
+
|
|
554
|
+
`style.mobile` (on phones): `width`, `maxWidth`.
|
|
555
|
+
|
|
556
|
+
### Social
|
|
557
|
+
|
|
558
|
+
Links to social profiles: a line of the networks' icons, each linked to its profile.
|
|
559
|
+
|
|
560
|
+
Holds: nothing.
|
|
561
|
+
|
|
562
|
+
Props:
|
|
563
|
+
- `icons`: a list of icons, each { name, href } (required). Each network by name ("Instagram", "LinkedIn") and the link to its profile.
|
|
564
|
+
- `iconType`: one of "circle", "rounded", "squared" (default `"circle"`)
|
|
565
|
+
- `size`: an integer from 1 (default `32`). Each icon's width and height, in px.
|
|
566
|
+
|
|
567
|
+
`style`:
|
|
568
|
+
- `gap`: a length (a number of px) (default `5`, Spacing). Space between children.
|
|
569
|
+
- `justifyContent`: one of "start", "center", "end" (default `"center"`, Layout). Where the icons sit across the line.
|
|
570
|
+
- `flex`: *flex* (Layout). In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
|
|
571
|
+
|
|
572
|
+
`style.mobile` (on phones): `gap`.
|
|
573
|
+
|
|
574
|
+
### Menu
|
|
575
|
+
|
|
576
|
+
A line of links (a site's sections, a footer's), onto more lines where they don't fit, with a separator between them on desktop; or links down a column.
|
|
577
|
+
|
|
578
|
+
Holds: nothing.
|
|
579
|
+
|
|
580
|
+
Props:
|
|
581
|
+
- `items`: a list of items, each { text, href } (required). Each link's text and where it goes.
|
|
582
|
+
- `separator`: text (default `""`). Between the links of a horizontal menu ("|", "·"), on desktop: phones show none.
|
|
583
|
+
- `layout`: one of "horizontal", "vertical" (default `"horizontal"`)
|
|
584
|
+
|
|
585
|
+
`style`:
|
|
586
|
+
- `color`: *color* (default `"#0068A5"`, inherited, Typography)
|
|
587
|
+
- `fontFamily`: *fontFamily* (inherited, Typography)
|
|
588
|
+
- `fontSize`: a length (a number of px) (default `14`, inherited, Typography)
|
|
589
|
+
- `fontWeight`: *fontWeight* (inherited, Typography)
|
|
590
|
+
- `lineHeight`: *lineHeight* (default `1.2`, inherited, Typography)
|
|
591
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
592
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
593
|
+
- `separatorColor`: *color* (default `"#444444"`, Border)
|
|
594
|
+
- `padding`: *insets* (default `{"top":5,"right":15,"bottom":5,"left":15}`, Spacing). Around each link: its sides are the space between them.
|
|
595
|
+
- `justifyContent`: one of "start", "center", "end" (default `"center"`, Layout). Where the links sit.
|
|
596
|
+
- `flex`: *flex* (Layout). In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
|
|
597
|
+
|
|
598
|
+
`style.mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`.
|
|
599
|
+
|
|
600
|
+
### Html
|
|
601
|
+
|
|
602
|
+
Markup written as it is, for what no component says (the builder's HTML block): in an email and on a page as given, nothing in it checked or escaped. A Document's PDF and a Canvas's image draw its plain text.
|
|
603
|
+
|
|
604
|
+
Holds: nothing.
|
|
605
|
+
|
|
606
|
+
Props:
|
|
607
|
+
- `html`: text (required). The markup, written as it is: only markup you trust. Or give it as JSX inside the block, which React writes.
|
|
608
|
+
- `text`: text. What it reads as in the plain-text version, and in a PDF or an image (its markup's words where there's none).
|
|
609
|
+
|
|
610
|
+
## Inline
|
|
611
|
+
|
|
612
|
+
Inside text: a styled run, a link, a line break, a merge tag.
|
|
613
|
+
|
|
614
|
+
### PageNumber
|
|
615
|
+
|
|
616
|
+
In a Document's text: the number of the page it's on, or (total) how many pages there are.
|
|
617
|
+
|
|
618
|
+
Holds: nothing. Only in a Document.
|
|
619
|
+
|
|
620
|
+
Props:
|
|
621
|
+
- `total`: true or false (default `false`). How many pages the Document has, instead of this page's number.
|
|
622
|
+
|
|
623
|
+
### Span
|
|
624
|
+
|
|
625
|
+
Styled text inside text; raised or lowered (superscript, subscript) with verticalAlign.
|
|
626
|
+
|
|
627
|
+
Holds: text; PageNumber, Span, Link, LineBreak, MergeTag.
|
|
628
|
+
|
|
629
|
+
`style`:
|
|
630
|
+
- `color`: *color* (inherited, Typography)
|
|
631
|
+
- `fontFamily`: *fontFamily* (inherited, Typography)
|
|
632
|
+
- `fontSize`: a length (a number of px) (inherited, Typography)
|
|
633
|
+
- `fontWeight`: *fontWeight* (inherited, Typography)
|
|
634
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
635
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
636
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
637
|
+
- `textDecoration`: one of "none", "underline", "line-through" (Typography)
|
|
638
|
+
- `backgroundColor`: *color* (Background)
|
|
639
|
+
- `verticalAlign`: one of "baseline", "super", "sub" (Layout). "super": superscript (®, a footnote mark); "sub": subscript; as CSS vertical-align.
|
|
640
|
+
|
|
641
|
+
`style.mobile` (on phones): `fontSize`, `letterSpacing`.
|
|
642
|
+
|
|
643
|
+
### Link
|
|
644
|
+
|
|
645
|
+
A link: text inside text, or around an Image.
|
|
646
|
+
|
|
647
|
+
Holds: text; PageNumber, Span, Link, LineBreak, MergeTag, Image.
|
|
648
|
+
|
|
649
|
+
Props:
|
|
650
|
+
- `href`: *link* (required)
|
|
651
|
+
- `title`: text. Shown as a tooltip by mail clients and browsers that show one.
|
|
652
|
+
- `aria-label`: text. What a screen reader says for it, where its text alone doesn't say enough ("Read more about pricing").
|
|
653
|
+
- `attrs`: *attributes*. More attributes for it: a class, a `data-` attribute.
|
|
654
|
+
|
|
655
|
+
`style`:
|
|
656
|
+
- `color`: *color* (default `"#0000ee"`, inherited, Typography)
|
|
657
|
+
- `fontFamily`: *fontFamily* (inherited, Typography)
|
|
658
|
+
- `fontSize`: a length (a number of px) (inherited, Typography)
|
|
659
|
+
- `fontWeight`: *fontWeight* (inherited, Typography)
|
|
660
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
661
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
662
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
663
|
+
- `textDecoration`: one of "none", "underline", "line-through" (default `"underline"`, Typography)
|
|
664
|
+
- `backgroundColor`: *color* (Background)
|
|
665
|
+
- `flex`: *flex* (Layout). In a Row: its share of the width left after children with a width (default 1); "none" takes its own size.
|
|
666
|
+
|
|
667
|
+
`style.hover`: `color`, `textDecoration`, `backgroundColor`.
|
|
668
|
+
|
|
669
|
+
`style.mobile` (on phones): `fontSize`, `letterSpacing`.
|
|
670
|
+
|
|
671
|
+
### LineBreak
|
|
672
|
+
|
|
673
|
+
Starts a new line inside text.
|
|
674
|
+
|
|
675
|
+
Holds: nothing.
|
|
676
|
+
|
|
677
|
+
### MergeTag
|
|
678
|
+
|
|
679
|
+
A value the sending service fills in (a name, a link), written in the service's own syntax.
|
|
680
|
+
|
|
681
|
+
Holds: nothing.
|
|
682
|
+
|
|
683
|
+
Props:
|
|
684
|
+
- `name`: text (required)
|
|
685
|
+
|
|
686
|
+
## Parts
|
|
687
|
+
|
|
688
|
+
Only inside the component named: a list's items, a table's rows and cells, a document's pages, header and footer.
|
|
689
|
+
|
|
690
|
+
### Document.Page
|
|
691
|
+
|
|
692
|
+
One page of a Document (Document.Page in JSX): its children stacked down it, inside the Document's margins.
|
|
693
|
+
|
|
694
|
+
Holds: Section, Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html. Only in a Document.
|
|
695
|
+
|
|
696
|
+
`style`:
|
|
697
|
+
- `color`: *color* (inherited, Typography)
|
|
698
|
+
- `fontFamily`: *fontFamily* (inherited, Typography)
|
|
699
|
+
- `fontSize`: a length (a number of px) (inherited, Typography)
|
|
700
|
+
- `fontWeight`: *fontWeight* (inherited, Typography)
|
|
701
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
702
|
+
- `lineHeight`: *lineHeight* (inherited, Typography)
|
|
703
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
704
|
+
- `textAlign`: one of "left", "center", "right", "justify" (inherited, Typography)
|
|
705
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
706
|
+
- `backgroundColor`: *color* (Background). The page's background, out to its edges.
|
|
707
|
+
- `gap`: a length (a number of px) (Spacing). Space between children.
|
|
708
|
+
- `alignItems`: one of "start", "center", "end", "stretch" (Layout). Where children sit across the layout's direction (vertically in a Row, horizontally in a Column), as CSS align-items. Across a Column it places what has its own size (a Button, an Image, an Svg, a box with a width); a block of text fills the width, so its words move with its textAlign.
|
|
709
|
+
|
|
710
|
+
### PageBreak
|
|
711
|
+
|
|
712
|
+
In a Document, where a page ends: what follows starts the next page.
|
|
713
|
+
|
|
714
|
+
Holds: nothing. Only in a Document.
|
|
715
|
+
|
|
716
|
+
### PageHeader
|
|
717
|
+
|
|
718
|
+
In a Document: drawn at the top of every page, inside its margins.
|
|
719
|
+
|
|
720
|
+
Holds: Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html. Only in a Document.
|
|
721
|
+
|
|
722
|
+
`style`:
|
|
723
|
+
- `color`: *color* (inherited, Typography)
|
|
724
|
+
- `fontFamily`: *fontFamily* (inherited, Typography)
|
|
725
|
+
- `fontSize`: a length (a number of px) (inherited, Typography)
|
|
726
|
+
- `fontWeight`: *fontWeight* (inherited, Typography)
|
|
727
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
728
|
+
- `lineHeight`: *lineHeight* (inherited, Typography)
|
|
729
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
730
|
+
- `textAlign`: one of "left", "center", "right", "justify" (inherited, Typography)
|
|
731
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
732
|
+
- `padding`: *insets* (Spacing)
|
|
733
|
+
- `backgroundColor`: *color* (Background)
|
|
734
|
+
- `border`: *border* (Border)
|
|
735
|
+
- `gap`: a length (a number of px) (Spacing). Space between children.
|
|
736
|
+
- `alignItems`: one of "start", "center", "end", "stretch" (Layout). Where children sit across the layout's direction (vertically in a Row, horizontally in a Column), as CSS align-items. Across a Column it places what has its own size (a Button, an Image, an Svg, a box with a width); a block of text fills the width, so its words move with its textAlign.
|
|
737
|
+
|
|
738
|
+
### PageFooter
|
|
739
|
+
|
|
740
|
+
In a Document: drawn at the bottom of every page, inside its margins.
|
|
741
|
+
|
|
742
|
+
Holds: Row, Column, Grid, Layer, Svg, Text, Heading, Link, Button, Image, Divider, List, Table, Video, Social, Menu, Html. Only in a Document.
|
|
743
|
+
|
|
744
|
+
`style`:
|
|
745
|
+
- `color`: *color* (inherited, Typography)
|
|
746
|
+
- `fontFamily`: *fontFamily* (inherited, Typography)
|
|
747
|
+
- `fontSize`: a length (a number of px) (inherited, Typography)
|
|
748
|
+
- `fontWeight`: *fontWeight* (inherited, Typography)
|
|
749
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
750
|
+
- `lineHeight`: *lineHeight* (inherited, Typography)
|
|
751
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
752
|
+
- `textAlign`: one of "left", "center", "right", "justify" (inherited, Typography)
|
|
753
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
754
|
+
- `padding`: *insets* (Spacing)
|
|
755
|
+
- `backgroundColor`: *color* (Background)
|
|
756
|
+
- `border`: *border* (Border)
|
|
757
|
+
- `gap`: a length (a number of px) (Spacing). Space between children.
|
|
758
|
+
- `alignItems`: one of "start", "center", "end", "stretch" (Layout). Where children sit across the layout's direction (vertically in a Row, horizontally in a Column), as CSS align-items. Across a Column it places what has its own size (a Button, an Image, an Svg, a box with a width); a block of text fills the width, so its words move with its textAlign.
|
|
759
|
+
|
|
760
|
+
### ListItem
|
|
761
|
+
|
|
762
|
+
An item of a List: text, and a List of its own to nest one.
|
|
763
|
+
|
|
764
|
+
Holds: text; PageNumber, Span, Link, LineBreak, MergeTag, List.
|
|
765
|
+
|
|
766
|
+
Props:
|
|
767
|
+
- `dir`: one of "ltr", "rtl", "auto". Its text's direction, where it differs from the template's; it starts on that side unless aligned otherwise.
|
|
768
|
+
|
|
769
|
+
`style`:
|
|
770
|
+
- `color`: *color* (inherited, Typography)
|
|
771
|
+
- `fontFamily`: *fontFamily* (inherited, Typography)
|
|
772
|
+
- `fontSize`: a length (a number of px) (inherited, Typography)
|
|
773
|
+
- `fontWeight`: *fontWeight* (inherited, Typography)
|
|
774
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
775
|
+
- `lineHeight`: *lineHeight* (inherited, Typography)
|
|
776
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
777
|
+
- `textAlign`: one of "left", "center", "right", "justify" (inherited, Typography)
|
|
778
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
779
|
+
- `textDecoration`: one of "none", "underline", "line-through" (Typography)
|
|
780
|
+
|
|
781
|
+
`style.mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`.
|
|
782
|
+
|
|
783
|
+
### TableRow
|
|
784
|
+
|
|
785
|
+
A row of a Table. A header row's cells are header cells, in bold.
|
|
786
|
+
|
|
787
|
+
Holds: TableCell.
|
|
788
|
+
|
|
789
|
+
Props:
|
|
790
|
+
- `header`: true or false (default `false`). Its cells head the columns below them.
|
|
791
|
+
- `footer`: true or false (default `false`). It ends the table (printed, on each page the table runs to).
|
|
792
|
+
|
|
793
|
+
`style`:
|
|
794
|
+
- `color`: *color* (inherited, Typography)
|
|
795
|
+
- `fontFamily`: *fontFamily* (inherited, Typography)
|
|
796
|
+
- `fontSize`: a length (a number of px) (inherited, Typography)
|
|
797
|
+
- `fontWeight`: *fontWeight* (inherited, Typography)
|
|
798
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
799
|
+
- `lineHeight`: *lineHeight* (inherited, Typography)
|
|
800
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
801
|
+
- `textAlign`: one of "left", "center", "right", "justify" (inherited, Typography)
|
|
802
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
803
|
+
- `backgroundColor`: *color* (Background)
|
|
804
|
+
- `height`: a length (a number of px) (Size)
|
|
805
|
+
|
|
806
|
+
`style.mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`.
|
|
807
|
+
|
|
808
|
+
### TableCell
|
|
809
|
+
|
|
810
|
+
A cell of a TableRow: text, and images. Its width sets its column's.
|
|
811
|
+
|
|
812
|
+
Holds: text; PageNumber, Span, Link, LineBreak, MergeTag, Image.
|
|
813
|
+
|
|
814
|
+
Props:
|
|
815
|
+
- `colSpan`: an integer from 1 (default `1`). How many columns it spans.
|
|
816
|
+
- `dir`: one of "ltr", "rtl", "auto". Its text's direction, where it differs from the template's; it starts on that side unless aligned otherwise.
|
|
817
|
+
|
|
818
|
+
`style`:
|
|
819
|
+
- `color`: *color* (inherited, Typography)
|
|
820
|
+
- `fontFamily`: *fontFamily* (inherited, Typography)
|
|
821
|
+
- `fontSize`: a length (a number of px) (inherited, Typography)
|
|
822
|
+
- `fontWeight`: *fontWeight* (inherited, Typography)
|
|
823
|
+
- `fontStyle`: one of "normal", "italic" (inherited, Typography)
|
|
824
|
+
- `lineHeight`: *lineHeight* (inherited, Typography)
|
|
825
|
+
- `letterSpacing`: a length (a number of px) (inherited, Typography)
|
|
826
|
+
- `textAlign`: one of "left", "center", "right", "justify" (inherited, Typography)
|
|
827
|
+
- `textTransform`: one of "none", "uppercase", "lowercase", "capitalize" (inherited, Typography)
|
|
828
|
+
- `textDecoration`: one of "none", "underline", "line-through" (Typography)
|
|
829
|
+
- `padding`: *insets* (Spacing)
|
|
830
|
+
- `backgroundColor`: *color* (Background)
|
|
831
|
+
- `border`: *border* (Border)
|
|
832
|
+
- `width`: a length (a number of px, %) (Size). Its column's width (of a cell spanning one column).
|
|
833
|
+
- `verticalAlign`: one of "top", "middle", "bottom" (Layout)
|
|
834
|
+
|
|
835
|
+
`style.mobile` (on phones): `fontSize`, `lineHeight`, `letterSpacing`, `textAlign`, `padding`, `border`.
|
|
836
|
+
|
|
837
|
+
## Shapes
|
|
838
|
+
|
|
839
|
+
Only inside an Svg, in its viewBox's units.
|
|
840
|
+
|
|
841
|
+
### Rect
|
|
842
|
+
|
|
843
|
+
A rectangle at x, y in its Svg, rounded by rx.
|
|
844
|
+
|
|
845
|
+
Holds: nothing. Not in an Email.
|
|
846
|
+
|
|
847
|
+
Props:
|
|
848
|
+
- `x`: a number (default `0`)
|
|
849
|
+
- `y`: a number (default `0`)
|
|
850
|
+
- `width`: a number from 0 (required)
|
|
851
|
+
- `height`: a number from 0 (required)
|
|
852
|
+
- `rx`: a number from 0
|
|
853
|
+
|
|
854
|
+
`style`:
|
|
855
|
+
- `fill`: *color* (default `"#000000"`, Background). Its inside ("transparent" for none).
|
|
856
|
+
- `stroke`: *color* (Border). Its outline's color.
|
|
857
|
+
- `strokeWidth`: a number from 0 (Border)
|
|
858
|
+
- `opacity`: a number from 0 to 1 (Effects)
|
|
859
|
+
|
|
860
|
+
### Circle
|
|
861
|
+
|
|
862
|
+
A circle centered at cx, cy in its Svg.
|
|
863
|
+
|
|
864
|
+
Holds: nothing. Not in an Email.
|
|
865
|
+
|
|
866
|
+
Props:
|
|
867
|
+
- `cx`: a number (default `0`)
|
|
868
|
+
- `cy`: a number (default `0`)
|
|
869
|
+
- `r`: a number from 0 (required)
|
|
870
|
+
|
|
871
|
+
`style`:
|
|
872
|
+
- `fill`: *color* (default `"#000000"`, Background). Its inside ("transparent" for none).
|
|
873
|
+
- `stroke`: *color* (Border). Its outline's color.
|
|
874
|
+
- `strokeWidth`: a number from 0 (Border)
|
|
875
|
+
- `opacity`: a number from 0 to 1 (Effects)
|
|
876
|
+
|
|
877
|
+
### Ellipse
|
|
878
|
+
|
|
879
|
+
An ellipse centered at cx, cy in its Svg.
|
|
880
|
+
|
|
881
|
+
Holds: nothing. Not in an Email.
|
|
882
|
+
|
|
883
|
+
Props:
|
|
884
|
+
- `cx`: a number (default `0`)
|
|
885
|
+
- `cy`: a number (default `0`)
|
|
886
|
+
- `rx`: a number from 0 (required)
|
|
887
|
+
- `ry`: a number from 0 (required)
|
|
888
|
+
|
|
889
|
+
`style`:
|
|
890
|
+
- `fill`: *color* (default `"#000000"`, Background). Its inside ("transparent" for none).
|
|
891
|
+
- `stroke`: *color* (Border). Its outline's color.
|
|
892
|
+
- `strokeWidth`: a number from 0 (Border)
|
|
893
|
+
- `opacity`: a number from 0 to 1 (Effects)
|
|
894
|
+
|
|
895
|
+
### Line
|
|
896
|
+
|
|
897
|
+
A straight line from x1, y1 to x2, y2 in its Svg (drawn by its stroke).
|
|
898
|
+
|
|
899
|
+
Holds: nothing. Not in an Email.
|
|
900
|
+
|
|
901
|
+
Props:
|
|
902
|
+
- `x1`: a number (default `0`)
|
|
903
|
+
- `y1`: a number (default `0`)
|
|
904
|
+
- `x2`: a number (default `0`)
|
|
905
|
+
- `y2`: a number (default `0`)
|
|
906
|
+
|
|
907
|
+
`style`:
|
|
908
|
+
- `fill`: *color* (default `"#000000"`, Background). Its inside ("transparent" for none).
|
|
909
|
+
- `stroke`: *color* (Border). Its outline's color.
|
|
910
|
+
- `strokeWidth`: a number from 0 (Border)
|
|
911
|
+
- `opacity`: a number from 0 to 1 (Effects)
|
|
912
|
+
|
|
913
|
+
### Polygon
|
|
914
|
+
|
|
915
|
+
A closed shape through its points ("0,0 40,0 20,30"), in its Svg.
|
|
916
|
+
|
|
917
|
+
Holds: nothing. Not in an Email.
|
|
918
|
+
|
|
919
|
+
Props:
|
|
920
|
+
- `points`: text (required)
|
|
921
|
+
|
|
922
|
+
`style`:
|
|
923
|
+
- `fill`: *color* (default `"#000000"`, Background). Its inside ("transparent" for none).
|
|
924
|
+
- `stroke`: *color* (Border). Its outline's color.
|
|
925
|
+
- `strokeWidth`: a number from 0 (Border)
|
|
926
|
+
- `opacity`: a number from 0 to 1 (Effects)
|
|
927
|
+
|
|
928
|
+
### Path
|
|
929
|
+
|
|
930
|
+
A shape drawn by an SVG path (d), in its Svg.
|
|
931
|
+
|
|
932
|
+
Holds: nothing. Not in an Email.
|
|
933
|
+
|
|
934
|
+
Props:
|
|
935
|
+
- `d`: text (required). SVG path data ("M0 0 L40 0 L20 30 Z").
|
|
936
|
+
|
|
937
|
+
`style`:
|
|
938
|
+
- `fill`: *color* (default `"#000000"`, Background). Its inside ("transparent" for none).
|
|
939
|
+
- `stroke`: *color* (Border). Its outline's color.
|
|
940
|
+
- `strokeWidth`: a number from 0 (Border)
|
|
941
|
+
- `opacity`: a number from 0 to 1 (Effects)
|
|
942
|
+
|
|
943
|
+
## For tools: where each block is in an Email's HTML
|
|
944
|
+
|
|
945
|
+
`await render(email, { blockMap: true })` also gives `blocks`, for a tool that previews an Email and needs to know which block of the template it's looking at: `{ version, unit: "utf8", entries: [{ path, nodeId?, offset }] }`.
|
|
946
|
+
|
|
947
|
+
- Each block written as an element has an entry: its place in the template (`root.children[2]`, as diagnostics give it), its `id` where it has one, and the UTF-8 byte offset in `html` just after its outermost element's tag name (`<table`, `<div`). That's the first element every email client but classic Outlook reads, else its first in Outlook's own markup.
|
|
948
|
+
- Entries are in the order of their offsets; at one offset, the outer block comes first. A `LineBreak` and a `MergeTag` have none, nor a `Layer`'s `Image` (drawn as the Layer's background).
|
|
949
|
+
- The HTML is the same bytes as without the option. Merge tags are written before the offsets are taken, and the offsets count the whole document, `<head>` included.
|
|
950
|
+
- `version` is `BLOCK_MAP_VERSION`, which changes only when this format does.
|
|
951
|
+
- Not with `pretty`, which indents the HTML after the offsets are taken (`render/block-map-pretty`). Another root than an Email has no `blocks`.
|