@bangerpage/cli 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/NOTICE +16 -0
- package/README.md +17 -2
- package/dist/args.d.ts +8 -0
- package/dist/bin.js +943 -0
- package/dist/bin.js.map +7 -0
- package/dist/browser.d.ts +14 -0
- package/dist/capture.d.ts +49 -0
- package/dist/commands/check.d.ts +9 -0
- package/dist/commands/export.d.ts +1 -0
- package/dist/commands/init.d.ts +7 -0
- package/dist/commands/preview.d.ts +1 -0
- package/dist/commands/skill.d.ts +11 -0
- package/dist/commands/snap.d.ts +1 -0
- package/dist/commands/theme.d.ts +1 -0
- package/dist/core-package.d.ts +9 -0
- package/dist/errors.d.ts +11 -0
- package/dist/export/pdf.d.ts +19 -0
- package/dist/html-transform.d.ts +41 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +383 -0
- package/dist/index.js.map +7 -0
- package/dist/server.d.ts +13 -0
- package/dist/skill/SKILL.md +55 -0
- package/dist/skill/meta.json +4 -0
- package/dist/skill/reference/components.md +380 -0
- package/dist/skill/reference/patterns.md +377 -0
- package/dist/skill/reference/themes.md +263 -0
- package/dist/skill/templates/starter.html +20 -0
- package/dist/update-check.d.ts +17 -0
- package/package.json +58 -3
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
<!-- Generated by scripts/gen-skill.mjs from custom-elements.json. Do not edit by hand. -->
|
|
2
|
+
|
|
3
|
+
# Components
|
|
4
|
+
|
|
5
|
+
Every element accepts these global attributes: `id` `lang` `dir` `data-step` `aria-*` `role`. Never write a `style` attribute except inside `bang-free`; pick values from the attributes below instead.
|
|
6
|
+
|
|
7
|
+
## bang-card
|
|
8
|
+
|
|
9
|
+
A box that stacks its children. `panel` is a framed surface (the custom theme's `cardShadow` and `cardRadius` change
|
|
10
|
+
its shadow and corners); `band` has no visible border and is filled with the custom theme's `bandGradient`
|
|
11
|
+
(without a `bandGradient` it is a surface with a border).
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<bang-card grow>
|
|
15
|
+
<bang-text>Inside the card</bang-text>
|
|
16
|
+
</bang-card>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
| Attribute | Values | Default | Description |
|
|
20
|
+
| --- | --- | --- | --- |
|
|
21
|
+
| `kind` | `panel`, `band` | `panel` | `panel` is a framed surface; `band` is filled with the theme's band gradient. |
|
|
22
|
+
| `grow` | boolean | `false` | Fill the rest of the parent frame's height. Without it the card is as tall as its content. |
|
|
23
|
+
| `valign` | `start`, `center`, `spread` | `start` | Vertical position of the content. `start` packs it to the top; `center` centres it and never cuts off the top when it overflows; `spread` puts the first child at the top, the last at the bottom and spaces the rest evenly. |
|
|
24
|
+
|
|
25
|
+
Slots:
|
|
26
|
+
|
|
27
|
+
- default: Content to stack.
|
|
28
|
+
|
|
29
|
+
## bang-chart
|
|
30
|
+
|
|
31
|
+
A chart drawn from an ECharts option written as JSON in a `script` child. Text size and colors come from the
|
|
32
|
+
theme, so leave `fontSize` and `color` out of the option.
|
|
33
|
+
|
|
34
|
+
Supported series types are `bar`, `line`, `pie` and `scatter`. Any other type (radar, heatmap, sankey and so on)
|
|
35
|
+
makes the deck fail with `chart: unsupported series type: <type>`.
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<bang-chart step="1">
|
|
39
|
+
<script type="application/json">
|
|
40
|
+
{
|
|
41
|
+
"xAxis": { "type": "category", "data": ["2024", "2025"] },
|
|
42
|
+
"yAxis": { "type": "value" },
|
|
43
|
+
"series": [
|
|
44
|
+
{ "type": "bar", "name": "A", "data": [3, 5] },
|
|
45
|
+
{ "type": "bar", "name": "B", "data": [2, 6] }
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
</script>
|
|
49
|
+
</bang-chart>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
| Attribute | Values | Default | Description |
|
|
53
|
+
| --- | --- | --- | --- |
|
|
54
|
+
| `step` | number | - | The step at which the first series appears; later series follow one step each. Without it all series show. |
|
|
55
|
+
|
|
56
|
+
Slots:
|
|
57
|
+
|
|
58
|
+
- default: A `script` element of type `application/json` holding the option.
|
|
59
|
+
|
|
60
|
+
## bang-columns
|
|
61
|
+
|
|
62
|
+
Places children side by side.
|
|
63
|
+
|
|
64
|
+
```html
|
|
65
|
+
<bang-columns ratio="1:2">
|
|
66
|
+
<bang-text>Left</bang-text>
|
|
67
|
+
<bang-text>Right</bang-text>
|
|
68
|
+
</bang-columns>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
| Attribute | Values | Default | Description |
|
|
72
|
+
| --- | --- | --- | --- |
|
|
73
|
+
| `ratio` | string | - | Column widths such as "1:2". Must have one number per child, otherwise columns are equal. |
|
|
74
|
+
| `align` | `stretch`, `start`, `center`, `end` | `stretch` | Vertical alignment of the columns. `stretch` makes every column as tall as the tallest one, so a chart or image in one column fills the height. |
|
|
75
|
+
| `gap` | `xs`, `s`, `m`, `l`, `xl`, `2xl` | `m` | Space between columns. |
|
|
76
|
+
|
|
77
|
+
Slots:
|
|
78
|
+
|
|
79
|
+
- default: One child per column.
|
|
80
|
+
|
|
81
|
+
## bang-frame
|
|
82
|
+
|
|
83
|
+
A 1920x1080 area of the canvas. Content that does not fit is clipped.
|
|
84
|
+
|
|
85
|
+
```html
|
|
86
|
+
<bang-root>
|
|
87
|
+
<bang-frame id="intro" at="0,0"><bang-title>Hello</bang-title></bang-frame>
|
|
88
|
+
<bang-path><bang-stop frame="intro"></bang-stop></bang-path>
|
|
89
|
+
</bang-root>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
| Attribute | Values | Default | Description |
|
|
93
|
+
| --- | --- | --- | --- |
|
|
94
|
+
| `at` | string | `0,0` | Grid position as "col,row" (integers from 0). |
|
|
95
|
+
| `span` | string | `1,1` | Number of grid cells covered as "w,h" (integers from 1). |
|
|
96
|
+
| `tone` | `default`, `accent`, `inverse` | `default` | The frame's ground: `default` uses the theme's paper, `accent` the theme's signal, `inverse` the theme's ink. Text colours follow so they stay readable. Use it for covers and section dividers. |
|
|
97
|
+
| `ground` | `default`, `cover` | `default` | Which ground the frame uses. `cover` applies the custom theme's `coverGradient`; `tone` wins over it, and without a `coverGradient` the normal ground stays. |
|
|
98
|
+
| `crumb` | string | - | A bold heading-size line (36px) at the top left, inside the top margin. It does not move the content and is cut to one line. |
|
|
99
|
+
| `label` | string | - | A large name shown over the frame when the camera is far away (the overview, or a stop on another frame), with the content faded behind it. It fades out as the camera comes close. Use it to name a place on a map or a chapter. Experimental, made for `format="map"`; it may change in any release. |
|
|
100
|
+
| `valign` | `center`, `spread` | `center` | Vertical position of the children. `center` centres them; `spread` puts the first child at the top and the last at the bottom, with the rest between. Use it to split a cover's title from the name. With one child it sits at the top. |
|
|
101
|
+
|
|
102
|
+
Slots:
|
|
103
|
+
|
|
104
|
+
- default: The frame's content.
|
|
105
|
+
|
|
106
|
+
## bang-free
|
|
107
|
+
|
|
108
|
+
An escape hatch for a figure no component can draw: a box that fills the space left in its container and holds free HTML, CSS and SVG.
|
|
109
|
+
|
|
110
|
+
Put one root element directly under it, and write its rules in a `<style>` directly under `bang-free`; that `<style>` is wrapped in `@scope`, so its rules apply only inside the box. A `<style>` anywhere deeper is not wrapped. Take colours from the theme (`var(--bang-color-*)`), never colour codes. A `style` attribute is allowed only for placing things in px. Do not write a `<script>`. `data-step` on an inner element reveals it step by step. An `<img>` inside is awaited before export, but an SVG `<image>` is not. Whatever sticks out of the box is clipped.
|
|
111
|
+
|
|
112
|
+
With `overlay`, the box covers the whole frame and the other parts do not move: use at most one overlay box per frame, and make it the last child of the `bang-frame`. Coordinates are px from the top-left of the frame (the same as in a `banger snap` image). `banger snap` warns about colour codes and about elements sticking out of the box.
|
|
113
|
+
|
|
114
|
+
```html
|
|
115
|
+
<bang-free>
|
|
116
|
+
<style>.map { display: grid; }</style>
|
|
117
|
+
<div class="map">...</div>
|
|
118
|
+
</bang-free>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
| Attribute | Values | Default | Description |
|
|
122
|
+
| --- | --- | --- | --- |
|
|
123
|
+
| `overlay` | boolean | `false` | Cover the whole frame, on top of the other parts. Put it as the last child of the frame. |
|
|
124
|
+
|
|
125
|
+
## bang-image
|
|
126
|
+
|
|
127
|
+
An image that fills the space left in its container.
|
|
128
|
+
|
|
129
|
+
```html
|
|
130
|
+
<bang-image src="images/photo.png" alt="Photo" fit="cover"></bang-image>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
| Attribute | Values | Default | Description |
|
|
134
|
+
| --- | --- | --- | --- |
|
|
135
|
+
| `src` | string, required | - | Required. Relative path of the image. |
|
|
136
|
+
| `alt` | string | - | Text alternative. |
|
|
137
|
+
| `fit` | `contain`, `cover` | `contain` | How the image fits its box. |
|
|
138
|
+
|
|
139
|
+
## bang-list
|
|
140
|
+
|
|
141
|
+
A bulleted or numbered list. Write items as `li` children.
|
|
142
|
+
|
|
143
|
+
Inside the text, only `<b>` (bold: one step heavier than the surroundings), `<mark>` (highlighter: the theme's `highlight`, or the signal colour), `<br>` (an intended line break) and `<i>` (italic: for a quotation or the original text of a source) are used. Give them no attributes. Do not use `<br>` to tune wrapping.
|
|
144
|
+
|
|
145
|
+
```html
|
|
146
|
+
<bang-list step="1">
|
|
147
|
+
<li>First</li>
|
|
148
|
+
<li>Second</li>
|
|
149
|
+
</bang-list>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Nest a list by placing a `bang-list` right after the parent `li`, as a direct child of the parent list. Never put it inside the `li`: the HTML parser closes the parent `li` and breaks the nesting. The nested list has no depth limit, but every level looks the same, based on the outermost list: one size smaller, the same tone, a hollow marker. Write `size` on the nested list to pick its size (for example the same size as the parent). A list that holds nested lists leaves half a line before each of its items after the first, so each parent item and its children read as one group. Its `tone` and `step` are ignored, and it appears together with the preceding parent item.
|
|
153
|
+
|
|
154
|
+
```html
|
|
155
|
+
<bang-list step="1">
|
|
156
|
+
<li>Parent</li>
|
|
157
|
+
<bang-list><li>Child</li></bang-list>
|
|
158
|
+
<li>Next</li>
|
|
159
|
+
</bang-list>
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
| Attribute | Values | Default | Description |
|
|
163
|
+
| --- | --- | --- | --- |
|
|
164
|
+
| `size` | `xs`, `s`, `m`, `l`, `xl`, `2xl` | `s` | Text size. |
|
|
165
|
+
| `tone` | `default`, `muted`, `accent` | `default` | Text color. |
|
|
166
|
+
| `step` | number | - | The step at which the first item appears; later items follow one step each. Without it all items show. |
|
|
167
|
+
| `ordered` | boolean | `false` | Number the items. |
|
|
168
|
+
|
|
169
|
+
Slots:
|
|
170
|
+
|
|
171
|
+
- default: `li` items and nested `bang-list`.
|
|
172
|
+
|
|
173
|
+
## bang-notes
|
|
174
|
+
|
|
175
|
+
Speaker notes for the enclosing stop. Shown only in the presenter view.
|
|
176
|
+
|
|
177
|
+
```html
|
|
178
|
+
<bang-root>
|
|
179
|
+
<bang-frame id="intro"><bang-title>Hello</bang-title></bang-frame>
|
|
180
|
+
<bang-path>
|
|
181
|
+
<bang-stop frame="intro"><bang-notes>Greet the audience</bang-notes></bang-stop>
|
|
182
|
+
</bang-path>
|
|
183
|
+
</bang-root>
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
No attributes.
|
|
187
|
+
|
|
188
|
+
Slots:
|
|
189
|
+
|
|
190
|
+
- default: The note text.
|
|
191
|
+
|
|
192
|
+
## bang-path
|
|
193
|
+
|
|
194
|
+
Holds the ordered `bang-stop` elements that make up the presentation.
|
|
195
|
+
|
|
196
|
+
```html
|
|
197
|
+
<bang-root>
|
|
198
|
+
<bang-frame id="intro"><bang-title>Hello</bang-title></bang-frame>
|
|
199
|
+
<bang-path>
|
|
200
|
+
<bang-stop frame="intro"></bang-stop>
|
|
201
|
+
</bang-path>
|
|
202
|
+
</bang-root>
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
No attributes.
|
|
206
|
+
|
|
207
|
+
Slots:
|
|
208
|
+
|
|
209
|
+
- default: `bang-stop` elements.
|
|
210
|
+
|
|
211
|
+
## bang-root
|
|
212
|
+
|
|
213
|
+
The presentation root: lays frames out on a canvas and moves the camera between stops.
|
|
214
|
+
|
|
215
|
+
```html
|
|
216
|
+
<bang-root>
|
|
217
|
+
<bang-frame id="intro"><bang-title>Hello</bang-title></bang-frame>
|
|
218
|
+
<bang-path><bang-stop frame="intro"></bang-stop></bang-path>
|
|
219
|
+
</bang-root>
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
| Attribute | Values | Default | Description |
|
|
223
|
+
| --- | --- | --- | --- |
|
|
224
|
+
| `theme` | `light`, `dark`, `custom` | `light` | Color theme. "custom" reads the colors and fonts from a bang-theme child. |
|
|
225
|
+
| `format` | `slides`, `map` | `slides` | How the canvas is presented. `slides` (the default) is frames side by side. `map` draws the canvas as a map: a ground with contour lines under the frames, roads for each frame's `link`, wider gaps, and fog over every frame the talk has not reached yet. Export pages show what is around the stop instead of masking it. `map` is experimental: its look and behaviour may change in any release. Use `slides` unless the author asks for a map. |
|
|
226
|
+
|
|
227
|
+
Slots:
|
|
228
|
+
|
|
229
|
+
- default: `bang-frame` elements and one `bang-path`.
|
|
230
|
+
|
|
231
|
+
## bang-shape
|
|
232
|
+
|
|
233
|
+
A small flat symbol that sits in the flow: a thick arrow or an ok / ng mark.
|
|
234
|
+
|
|
235
|
+
Put it inside a `bang-text` line, a `bang-list` item, a `bang-columns` child or a `bang-stack` child. `kind` picks the form: `arrow-up`, `arrow-down`, `arrow-left` and `arrow-right` are thick arrows twice as wide as tall, drawn at 60% of the theme text colour so they read as grey; `ok` (a ring) and `ng` (a cross) are square and take the tone colour as is. It is drawn as a vector, so a PDF carries it as a shape, not as text: a tool that extracts text will not see its meaning.
|
|
236
|
+
|
|
237
|
+
```html
|
|
238
|
+
<bang-shape kind="arrow-down" size="l"></bang-shape>
|
|
239
|
+
<bang-shape kind="ng" tone="accent"></bang-shape>
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
| Attribute | Values | Default | Description |
|
|
243
|
+
| --- | --- | --- | --- |
|
|
244
|
+
| `kind` | `arrow-up`, `arrow-down`, `arrow-left`, `arrow-right`, `ok`, `ng` | `arrow-down` | Which form to draw. |
|
|
245
|
+
| `size` | `xs`, `s`, `m`, `l`, `xl`, `2xl` | `m` | Height of the form (a square mark is as wide as it is tall; an arrow is twice as wide). |
|
|
246
|
+
| `tone` | `default`, `muted`, `accent` | `default` | Colour. |
|
|
247
|
+
|
|
248
|
+
## bang-stack
|
|
249
|
+
|
|
250
|
+
Stacks children vertically.
|
|
251
|
+
|
|
252
|
+
```html
|
|
253
|
+
<bang-stack gap="m" align="start">
|
|
254
|
+
<bang-title>Heading</bang-title>
|
|
255
|
+
<bang-text>Body</bang-text>
|
|
256
|
+
</bang-stack>
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
| Attribute | Values | Default | Description |
|
|
260
|
+
| --- | --- | --- | --- |
|
|
261
|
+
| `gap` | `xs`, `s`, `m`, `l`, `xl`, `2xl` | `m` | Space between children. |
|
|
262
|
+
| `align` | `start`, `center`, `end`, `stretch` | `stretch` | Horizontal alignment of children. |
|
|
263
|
+
|
|
264
|
+
Slots:
|
|
265
|
+
|
|
266
|
+
- default: Content to stack.
|
|
267
|
+
|
|
268
|
+
## bang-stat
|
|
269
|
+
|
|
270
|
+
A large number with a caption.
|
|
271
|
+
|
|
272
|
+
```html
|
|
273
|
+
<bang-stat value="1,200" label="members"></bang-stat>
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
| Attribute | Values | Default | Description |
|
|
277
|
+
| --- | --- | --- | --- |
|
|
278
|
+
| `value` | string, required | - | Required. The number or short text to show. |
|
|
279
|
+
| `label` | string | - | Caption under the value. |
|
|
280
|
+
| `label-size` | `xs`, `s`, `m`, `l`, `xl`, `2xl` | `xs` | Size of the caption. Raise it when a large value sits next to body text and the caption reads too small. |
|
|
281
|
+
| `size` | `xs`, `s`, `m`, `l`, `xl`, `2xl` | `xl` | Size of the value. |
|
|
282
|
+
| `tone` | `default`, `muted`, `accent` | `default` | Color of the value. |
|
|
283
|
+
|
|
284
|
+
## bang-stop
|
|
285
|
+
|
|
286
|
+
A point where the camera stops: a whole frame, an element or a region of a frame, or the overview.
|
|
287
|
+
|
|
288
|
+
```html
|
|
289
|
+
<bang-root>
|
|
290
|
+
<bang-frame id="intro"><bang-text data-step="1">Detail</bang-text></bang-frame>
|
|
291
|
+
<bang-path>
|
|
292
|
+
<bang-stop frame="intro" steps="1"><bang-notes>Say hello</bang-notes></bang-stop>
|
|
293
|
+
</bang-path>
|
|
294
|
+
</bang-root>
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
| Attribute | Values | Default | Description |
|
|
298
|
+
| --- | --- | --- | --- |
|
|
299
|
+
| `frame` | string | - | The `id` of the `bang-frame` to show. |
|
|
300
|
+
| `focus` | string | - | The `id` of an element inside the frame (a card, a column) to fill the screen with. The camera follows the element's box, so it stays right when the layout changes. Wins over `region`. |
|
|
301
|
+
| `region` | string | - | Part of the frame to fill the screen with, as "x,y,w,h" fractions from 0 to 1. |
|
|
302
|
+
| `overview` | boolean | `false` | Show every frame instead of one. |
|
|
303
|
+
| `steps` | number | - | How many steps can be revealed at this stop. Without it, the first stop on a frame takes as many steps as the frame's content asks for (`data-step`, and the `step` of lists and charts), and later stops on that frame take none. |
|
|
304
|
+
|
|
305
|
+
Slots:
|
|
306
|
+
|
|
307
|
+
- default: An optional `bang-notes` element.
|
|
308
|
+
|
|
309
|
+
## bang-text
|
|
310
|
+
|
|
311
|
+
A paragraph of body text.
|
|
312
|
+
|
|
313
|
+
Inside the text, only `<b>` (bold: one step heavier than the surroundings), `<mark>` (highlighter: the theme's `highlight`, or the signal colour), `<br>` (an intended line break) and `<i>` (italic: for a quotation or the original text of a source) are used. Give them no attributes. Do not use `<br>` to tune wrapping.
|
|
314
|
+
|
|
315
|
+
```html
|
|
316
|
+
<bang-text size="s" tone="muted">Body text</bang-text>
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
| Attribute | Values | Default | Description |
|
|
320
|
+
| --- | --- | --- | --- |
|
|
321
|
+
| `size` | `xs`, `s`, `m`, `l`, `xl`, `2xl` | `s` | Text size. |
|
|
322
|
+
| `tone` | `default`, `muted`, `accent` | `default` | Text color. |
|
|
323
|
+
|
|
324
|
+
Slots:
|
|
325
|
+
|
|
326
|
+
- default: The text.
|
|
327
|
+
|
|
328
|
+
## bang-theme
|
|
329
|
+
|
|
330
|
+
The colors and fonts of a deck. Used by `<bang-root theme="custom">`; ignored otherwise. Draws nothing.
|
|
331
|
+
|
|
332
|
+
Every key is optional. Keys left out take the value of the base theme. Colors are `#RGB` or `#RRGGBB` only. `line-strong`, `signal-text` and `focus` are computed from the seeds and cannot be written. Only the first `bang-theme` is used. Contrast below the limits warns and is never corrected.
|
|
333
|
+
|
|
334
|
+
- `base`: `"light"` (default) or `"dark"`.
|
|
335
|
+
- Colors: `paper`, `surface`, `ink`, `inkMuted`, `line`, `signal`.
|
|
336
|
+
- `onSignal`: the text colour on signal grounds (`tone="accent"` frames). Defaults to #141414 or #FFFFFF, whichever has the higher contrast with `signal`. Below 3:1 warns; keep body-size text off accent frames when it is under 4.5:1.
|
|
337
|
+
- `paperGradient`: `{ "angle": 0-360, "colors": [2 or 3 colors] }`, the ground of every frame.
|
|
338
|
+
- `coverGradient`: the same shape, the ground of frames that set `ground="cover"`.
|
|
339
|
+
- `bandGradient`: the same shape, the fill of `<bang-card kind="band">`.
|
|
340
|
+
- `typography`: `weightText`, `weightHeading` (100-900 in steps of 100), `leadingText`, `leadingHeading` (a 0.8-1.6 multiplier of each size's leading), `trackingText`, `trackingHeading` (em, -0.1 to 0.3). Headings are title and stat; text is text and list.
|
|
341
|
+
- `cardShadow`: `"none"` (default), `"soft"` or `"lift"`. `soft` shades `<bang-card>` panels inside their edge; `lift` raises them off the ground with a drop shadow and drops their border.
|
|
342
|
+
- `cardRadius`: the corner radius of `<bang-card>` panels in px, 0-64. Defaults to 12.
|
|
343
|
+
- `highlight`: one `#RGB` or `#RRGGBB` color, the highlighter of `<mark>`. Defaults to `signal` at 40% opacity.
|
|
344
|
+
- Fonts (CSS font-family lists): `fontSans`, `fontDisplay`, `fontMono`.
|
|
345
|
+
- `fontsHref`: a Google Fonts `https://fonts.googleapis.com/css2?...` URL that loads the families.
|
|
346
|
+
|
|
347
|
+
```html
|
|
348
|
+
<bang-root theme="custom">
|
|
349
|
+
<bang-theme>
|
|
350
|
+
<script type="application/json">
|
|
351
|
+
{ "base": "dark", "paper": "#0F1B2D", "ink": "#F2F5FA", "signal": "#FFB000" }
|
|
352
|
+
</script>
|
|
353
|
+
</bang-theme>
|
|
354
|
+
</bang-root>
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
No attributes.
|
|
358
|
+
|
|
359
|
+
Slots:
|
|
360
|
+
|
|
361
|
+
- default: A script element of type application/json holding the theme.
|
|
362
|
+
|
|
363
|
+
## bang-title
|
|
364
|
+
|
|
365
|
+
A heading.
|
|
366
|
+
|
|
367
|
+
Inside the text, only `<b>` (bold: one step heavier than the surroundings), `<mark>` (highlighter: the theme's `highlight`, or the signal colour), `<br>` (an intended line break) and `<i>` (italic: for a quotation or the original text of a source) are used. Give them no attributes. Do not use `<br>` to tune wrapping. A `<b>` in a heading goes from 800 to 900, which looks the same unless `fontsHref` loads 900.
|
|
368
|
+
|
|
369
|
+
```html
|
|
370
|
+
<bang-title size="xl">Hello</bang-title>
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
| Attribute | Values | Default | Description |
|
|
374
|
+
| --- | --- | --- | --- |
|
|
375
|
+
| `size` | `xs`, `s`, `m`, `l`, `xl`, `2xl` | `l` | Text size. |
|
|
376
|
+
| `tone` | `default`, `muted`, `accent` | `default` | Text color. |
|
|
377
|
+
|
|
378
|
+
Slots:
|
|
379
|
+
|
|
380
|
+
- default: The heading text.
|