@bigmistqke/whiteboard 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/README.md +609 -2
- package/bin/whiteboard.ts +431 -0
- package/dist/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/taggedTemplateLiteral.js +5 -0
- package/dist/bin/whiteboard.js +471 -0
- package/dist/client/runtime.js +391 -0
- package/dist/define.js +7 -0
- package/dist/plugins/callout/README.md +13 -0
- package/dist/plugins/callout/index.js +27 -0
- package/dist/plugins/callout/style.css +12 -0
- package/dist/plugins/chat/README.md +45 -0
- package/dist/plugins/chat/client.js +3 -0
- package/dist/plugins/chat/index.js +46 -0
- package/dist/plugins/chat/style.css +17 -0
- package/dist/plugins/claude-code/index.js +120 -0
- package/dist/plugins/code/README.md +42 -0
- package/dist/plugins/code/diff.js +64 -0
- package/dist/plugins/code/index.js +77 -0
- package/dist/plugins/code/style.css +29 -0
- package/dist/plugins/comments/client.js +10 -0
- package/dist/plugins/comments/index.js +51 -0
- package/dist/plugins/comments/style.css +32 -0
- package/dist/plugins/details/README.md +17 -0
- package/dist/plugins/details/index.js +17 -0
- package/dist/plugins/details/style.css +3 -0
- package/dist/plugins/form/README.md +111 -0
- package/dist/plugins/form/index.js +102 -0
- package/dist/plugins/form/style.css +41 -0
- package/dist/plugins/gallery/README.md +30 -0
- package/dist/plugins/gallery/client.js +1 -0
- package/dist/plugins/gallery/index.js +74 -0
- package/dist/plugins/gallery/style.css +27 -0
- package/dist/plugins/grid/README.md +33 -0
- package/dist/plugins/grid/index.js +33 -0
- package/dist/plugins/grid/style.css +25 -0
- package/dist/plugins/index.js +26 -0
- package/dist/plugins/mermaid/README.md +21 -0
- package/dist/plugins/mermaid/index.js +34 -0
- package/dist/plugins/mermaid/style.css +16 -0
- package/dist/plugins/quiet/README.md +26 -0
- package/dist/plugins/quiet/index.js +17 -0
- package/dist/plugins/terminal/client.js +41 -0
- package/dist/plugins/terminal/host.js +332 -0
- package/dist/plugins/terminal/index.js +171 -0
- package/dist/plugins/terminal/modes.js +32 -0
- package/dist/plugins/terminal/server.js +256 -0
- package/dist/plugins/terminal/sizes.js +57 -0
- package/dist/plugins/terminal/style.css +357 -0
- package/dist/solid/index.js +35 -0
- package/dist/src/auth.js +54 -0
- package/dist/src/client/page/base.css +274 -0
- package/dist/src/client/page/main.js +1004 -0
- package/dist/src/config.js +76 -0
- package/dist/src/events.js +162 -0
- package/dist/src/html.js +34 -0
- package/dist/src/load.js +77 -0
- package/dist/src/loader.js +120 -0
- package/dist/src/package.js +33 -0
- package/dist/src/pages/blocks.js +49 -0
- package/dist/src/pages/index.js +14 -0
- package/dist/src/pages/markdown.js +307 -0
- package/dist/src/pages/render.js +257 -0
- package/dist/src/plugins.js +238 -0
- package/dist/src/running.js +24 -0
- package/dist/src/serve.js +71 -0
- package/dist/src/server.js +700 -0
- package/dist/src/status.js +43 -0
- package/package.json +131 -4
- package/plugins/callout/README.md +13 -0
- package/plugins/callout/index.ts +25 -0
- package/plugins/callout/style.css +12 -0
- package/plugins/chat/README.md +45 -0
- package/plugins/chat/autosize.ts +101 -0
- package/plugins/chat/client.tsx +81 -0
- package/plugins/chat/index.ts +61 -0
- package/plugins/chat/style.css +17 -0
- package/plugins/claude-code/index.ts +136 -0
- package/plugins/code/README.md +42 -0
- package/plugins/code/diff.ts +58 -0
- package/plugins/code/index.ts +94 -0
- package/plugins/code/style.css +29 -0
- package/plugins/comments/client.ts +448 -0
- package/plugins/comments/index.ts +52 -0
- package/plugins/comments/style.css +32 -0
- package/plugins/details/README.md +17 -0
- package/plugins/details/index.ts +21 -0
- package/plugins/details/style.css +3 -0
- package/plugins/form/README.md +111 -0
- package/plugins/form/index.ts +104 -0
- package/plugins/form/style.css +41 -0
- package/plugins/gallery/README.md +30 -0
- package/plugins/gallery/client.tsx +64 -0
- package/plugins/gallery/index.ts +67 -0
- package/plugins/gallery/style.css +27 -0
- package/plugins/grid/README.md +33 -0
- package/plugins/grid/index.ts +36 -0
- package/plugins/grid/style.css +25 -0
- package/plugins/index.ts +19 -0
- package/plugins/mermaid/README.md +21 -0
- package/plugins/mermaid/index.ts +39 -0
- package/plugins/mermaid/style.css +16 -0
- package/plugins/quiet/README.md +26 -0
- package/plugins/quiet/index.ts +27 -0
- package/plugins/terminal/client.ts +317 -0
- package/plugins/terminal/host.ts +326 -0
- package/plugins/terminal/index.ts +138 -0
- package/plugins/terminal/modes.ts +30 -0
- package/plugins/terminal/server.ts +215 -0
- package/plugins/terminal/sizes.ts +60 -0
- package/plugins/terminal/style.css +71 -0
- package/skills/whiteboard/SKILL.md +292 -0
- package/solid/index.tsx +56 -0
- package/src/auth.ts +66 -0
- package/src/client/forms.ts +186 -0
- package/src/client/page/base.css +274 -0
- package/src/client/page/fresh.ts +205 -0
- package/src/client/page/main.ts +249 -0
- package/src/client/page/orphans.ts +46 -0
- package/src/client/page/theme.ts +32 -0
- package/src/client/page/view.ts +9 -0
- package/src/client/page/waiting.ts +109 -0
- package/src/client/runtime.ts +170 -0
- package/src/config.ts +96 -0
- package/src/define.ts +546 -0
- package/src/events.ts +194 -0
- package/src/html.ts +40 -0
- package/src/load.ts +89 -0
- package/src/loader.ts +109 -0
- package/src/package.ts +39 -0
- package/src/pages/blocks.ts +67 -0
- package/src/pages/index.ts +36 -0
- package/src/pages/markdown.ts +276 -0
- package/src/pages/render.ts +196 -0
- package/src/plugins.ts +197 -0
- package/src/running.ts +22 -0
- package/src/serve.ts +52 -0
- package/src/server.ts +644 -0
- package/src/status.ts +69 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
A named form, written as markdown. Submitting it appends
|
|
2
|
+
`{ id, ts, page, type, action, data }` to the events log, where `type` is the
|
|
3
|
+
form's `name`, `action` is the button that was pressed and `data` holds the
|
|
4
|
+
inputs. The form starts from its last answer.
|
|
5
|
+
|
|
6
|
+
The body of `:::form{name=…}` is ordinary markdown, and inputs are inline
|
|
7
|
+
directives that can sit anywhere in it: in a paragraph, a list, a table
|
|
8
|
+
cell, a heading, a grid card. So a question sits with everything that
|
|
9
|
+
explains it.
|
|
10
|
+
|
|
11
|
+
| input | written as | sends |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| one choice | `:radio[This week]{name=when}` per option | the picked label's text, or `null` |
|
|
14
|
+
| several choices | `:check[Android]{name=phones}` per option | an array of the checked labels |
|
|
15
|
+
| one checkbox | `:check[I read it]{name=read}` | `true` or `false` |
|
|
16
|
+
| text | `:text[Title]{name=title placeholder="a short name"}` | the text |
|
|
17
|
+
| more text | `:textarea[Notes]{name=notes}` | the text |
|
|
18
|
+
| number, date, range | `:number[Count]{name=count min=0 max=10}`, `:date[Due]{name=due}`, `:range[…]{name=… min=0 max=100}` | the value |
|
|
19
|
+
| dropdown | `:select[Target]{name=env options="staging, production"}` | the picked option |
|
|
20
|
+
| fixed value | `:hidden{name=version value=2.3}` | the value |
|
|
21
|
+
| buttons | `:button[Approve]` `:button[Hold]` | which one is `action` |
|
|
22
|
+
|
|
23
|
+
- The label in `[…]` is markdown. An option sends its label as plain text
|
|
24
|
+
(`:radio[This **week**]` sends `This week`), unless `value=…` says what
|
|
25
|
+
to send instead.
|
|
26
|
+
- `recommended` tags an option as the writer's recommendation; it is never
|
|
27
|
+
preselected, so a choice is only made by picking it. `checked` does
|
|
28
|
+
preselect one; use it for defaults, not for decisions.
|
|
29
|
+
- Without a `:button`, the form gets one `Send` button. The first button is
|
|
30
|
+
the primary one.
|
|
31
|
+
- `value=…` on `:text`, `:textarea`, `:select` and the others sets what
|
|
32
|
+
they start with.
|
|
33
|
+
|
|
34
|
+
**Options with what they mean.** When the options of a decision need
|
|
35
|
+
explaining, put each one at the start of a list item, with its explanation
|
|
36
|
+
under it. Such an item reads as a row to pick:
|
|
37
|
+
|
|
38
|
+
````markdown
|
|
39
|
+
:::form{name=storage}
|
|
40
|
+
**Where are answers kept?**
|
|
41
|
+
|
|
42
|
+
- :radio[One log per project]{name=where recommended}
|
|
43
|
+
Simple, and the agent waits on one file.
|
|
44
|
+
- :radio[One log per page]{name=where}
|
|
45
|
+
Pages can be moved with their answers.
|
|
46
|
+
:::
|
|
47
|
+
````
|
|
48
|
+
|
|
49
|
+
:::form{name=storage}
|
|
50
|
+
**Where are answers kept?**
|
|
51
|
+
|
|
52
|
+
- :radio[One log per project]{name=where recommended}
|
|
53
|
+
Simple, and the agent waits on one file.
|
|
54
|
+
- :radio[One log per page]{name=where}
|
|
55
|
+
Pages can be moved with their answers.
|
|
56
|
+
:::
|
|
57
|
+
|
|
58
|
+
An option's explanation can be any markdown: a code block, a table, a
|
|
59
|
+
picture, a `:::details` block. Indent it under the item, and mind the
|
|
60
|
+
colons: a container inside the form needs fewer colons than the form, so
|
|
61
|
+
write the form as `::::form` around a `:::details`.
|
|
62
|
+
|
|
63
|
+
**Inputs anywhere.** Since an input is a word-sized element, any layout
|
|
64
|
+
can hold one: a card per option in a grid, a checkbox per row of a table.
|
|
65
|
+
|
|
66
|
+
````markdown
|
|
67
|
+
::::form{name=deploy-review}
|
|
68
|
+
Ship **v2.3** to production?
|
|
69
|
+
|
|
70
|
+
:::grid{cols=2}
|
|
71
|
+
### :radio[Staging]{name=env}
|
|
72
|
+
Runs the migration on a copy first.
|
|
73
|
+
|
|
74
|
+
### :radio[Production]{name=env recommended}
|
|
75
|
+
The migration is reversible.
|
|
76
|
+
:::
|
|
77
|
+
|
|
78
|
+
:textarea[Notes]{name=notes placeholder="anything to check first"}
|
|
79
|
+
|
|
80
|
+
:button[Approve] :button[Hold]
|
|
81
|
+
::::
|
|
82
|
+
````
|
|
83
|
+
|
|
84
|
+
::::form{name=deploy-review}
|
|
85
|
+
Ship **v2.3** to production?
|
|
86
|
+
|
|
87
|
+
:::grid{cols=2}
|
|
88
|
+
### :radio[Staging]{name=env}
|
|
89
|
+
Runs the migration on a copy first.
|
|
90
|
+
|
|
91
|
+
### :radio[Production]{name=env recommended}
|
|
92
|
+
The migration is reversible.
|
|
93
|
+
:::
|
|
94
|
+
|
|
95
|
+
:textarea[Notes]{name=notes placeholder="anything to check first"}
|
|
96
|
+
|
|
97
|
+
:button[Approve] :button[Hold]
|
|
98
|
+
::::
|
|
99
|
+
|
|
100
|
+
Forms don't nest, and inputs belong inside a form: outside one they show
|
|
101
|
+
but send nothing.
|
|
102
|
+
|
|
103
|
+
**A chat under every form.** The reader can ask about a question without
|
|
104
|
+
answering it: under every form is a chat (see the chat plugin), named
|
|
105
|
+
after the form, whose messages are never a submit, so talking about a choice
|
|
106
|
+
never makes it. Answer there with `whiteboard append --type chat:message
|
|
107
|
+
--data '{"chat":"<form name>","text":"…"}'`, and don't add a free-text field
|
|
108
|
+
for questions to a decision form.
|
|
109
|
+
|
|
110
|
+
A hand-written `<form name="…">` (no `action` attribute) is recorded the same
|
|
111
|
+
way; this block only saves typing.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// :::form{name=…} — a named form whose body is ordinary markdown, with inputs written inline anywhere in
|
|
2
|
+
// it: `:radio[This **week**]{name=when}`, `:check[…]`, `:text[…]`, `:button[Send]` and so on. See
|
|
3
|
+
// README.md.
|
|
4
|
+
//
|
|
5
|
+
// Everything here renders on the server as plain HTML: a `<form name>` the core looks after (it
|
|
6
|
+
// sends a submit as an event, keeps drafts, puts the last answer back and marks where the form
|
|
7
|
+
// stands, which the page shows). The chat under the form is the chat plugin's.
|
|
8
|
+
import fs from 'node:fs'
|
|
9
|
+
import { definePlugin, type Plugin } from '@bigmistqke/whiteboard'
|
|
10
|
+
import { html, raw, type Block, type DirectiveContext } from '@bigmistqke/whiteboard'
|
|
11
|
+
import { chatThread } from '../chat/index.ts'
|
|
12
|
+
import { isQuestionName } from '../../src/status.ts'
|
|
13
|
+
|
|
14
|
+
const style = new URL('./style.css', import.meta.url)
|
|
15
|
+
|
|
16
|
+
const CHOICES = new Set(['radio', 'check', 'select', 'hidden'])
|
|
17
|
+
|
|
18
|
+
interface Node { type: string; name?: string; attributes?: Record<string, string>; children?: Node[] }
|
|
19
|
+
|
|
20
|
+
/** The inputs written inside a form's markdown (forms inside it excluded: forms don't nest). */
|
|
21
|
+
function inputsOf(nodes: Node[]) {
|
|
22
|
+
const found: { name: string; attrs: Record<string, string> }[] = []
|
|
23
|
+
const walk = (node: Node) => {
|
|
24
|
+
if ((node.type === 'textDirective' || node.type === 'leafDirective') && node.name) found.push({ name: node.name, attrs: node.attributes ?? {} })
|
|
25
|
+
if (node.type === 'containerDirective' && node.name === 'form') return
|
|
26
|
+
for (const child of node.children ?? []) walk(child)
|
|
27
|
+
}
|
|
28
|
+
nodes.forEach(walk)
|
|
29
|
+
return found
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const recommendedTag = html`<span class="wb-form-recommended">recommended</span>`
|
|
33
|
+
|
|
34
|
+
const form: Block = {
|
|
35
|
+
style,
|
|
36
|
+
async html(ctx) {
|
|
37
|
+
const c = ctx as DirectiveContext
|
|
38
|
+
const name = c.attrs.name || c.attrs.id || 'form'
|
|
39
|
+
// a colon marks the events of whiteboard or a plugin (`chat:message`), never an answer
|
|
40
|
+
if (!isQuestionName(name)) throw new Error(`form name "${name}" has a colon: those names are reserved for events of whiteboard and plugins`)
|
|
41
|
+
const inputs = inputsOf(c.children as Node[])
|
|
42
|
+
const choices = [...new Set(inputs.filter(i => CHOICES.has(i.name) && i.attrs.name).map(i => i.attrs.name))]
|
|
43
|
+
const hasButton = inputs.some(i => i.name === 'button')
|
|
44
|
+
// the first button is the form's primary one; the markup is the button block's own
|
|
45
|
+
const body = (await c.toHtml(c.children)).replace('<button name="action"', '<button class="wb-primary" name="action"')
|
|
46
|
+
// the form's chat: talk about the question, named after the form (see ../chat)
|
|
47
|
+
const thread = await chatThread(c, name, { choices })
|
|
48
|
+
return html`<form name="${name}" class="wb-form">${raw(body)}${!hasButton && html`<p><button class="wb-primary">Send</button></p>`}${raw(thread)}</form>`
|
|
49
|
+
},
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** The label of an inline input as HTML, else its fallback. */
|
|
53
|
+
const labelOf = (c: DirectiveContext, fallback = '') => (c.label ? raw(c.label) : fallback)
|
|
54
|
+
|
|
55
|
+
/** :radio[label]{name=… value=… recommended checked} and :check[…]{…} */
|
|
56
|
+
const option = (type: 'radio' | 'checkbox'): Block['html'] => (ctx) => {
|
|
57
|
+
const c = ctx as DirectiveContext
|
|
58
|
+
const value = c.attrs.value ?? c.labelText ?? ''
|
|
59
|
+
return html`<label class="wb-form-option"><input type="${type}" name="${c.attrs.name}" value="${value}"${'checked' in c.attrs && raw(' checked')}><span class="wb-form-option-label">${labelOf(c, value)}</span>${'recommended' in c.attrs && recommendedTag}</label>`
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** :text[label]{name=… placeholder=…}, and number, date, range */
|
|
63
|
+
const field = (type: string): Block['html'] => (ctx) => {
|
|
64
|
+
const c = ctx as DirectiveContext
|
|
65
|
+
const extra = ['placeholder', 'min', 'max', 'step', 'value'].filter(k => k in c.attrs).map(k => html` ${raw(k)}="${c.attrs[k]}"`)
|
|
66
|
+
return html`<label class="wb-form-field"><span class="wb-form-label">${labelOf(c)}</span><input type="${type}" name="${c.attrs.name}"${extra}></label>`
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const input = (name: string, render: Block['html']): [string, Block] => [name, { html: render, style }]
|
|
70
|
+
|
|
71
|
+
const inputs: [string, Block][] = [
|
|
72
|
+
input('radio', option('radio')),
|
|
73
|
+
input('check', option('checkbox')),
|
|
74
|
+
input('text', field('text')),
|
|
75
|
+
input('number', field('number')),
|
|
76
|
+
input('date', field('date')),
|
|
77
|
+
input('range', field('range')),
|
|
78
|
+
input('textarea', (ctx) => {
|
|
79
|
+
const c = ctx as DirectiveContext
|
|
80
|
+
return html`<label class="wb-form-field"><span class="wb-form-label">${labelOf(c)}</span><textarea name="${c.attrs.name}" rows="3" placeholder="${c.attrs.placeholder ?? ''}">${c.attrs.value ?? ''}</textarea></label>`
|
|
81
|
+
}),
|
|
82
|
+
input('select', (ctx) => {
|
|
83
|
+
const c = ctx as DirectiveContext
|
|
84
|
+
const options = (c.attrs.options ?? '').split(',').map(s => s.trim()).filter(Boolean)
|
|
85
|
+
return html`<label class="wb-form-field"><span class="wb-form-label">${labelOf(c)}</span><select name="${c.attrs.name}">${options.map(o => html`<option${o === c.attrs.value && raw(' selected')}>${o}</option>`)}</select></label>`
|
|
86
|
+
}),
|
|
87
|
+
input('hidden', (ctx) => {
|
|
88
|
+
const c = ctx as DirectiveContext
|
|
89
|
+
return html`<input type="hidden" name="${c.attrs.name}" value="${c.attrs.value ?? ''}">`
|
|
90
|
+
}),
|
|
91
|
+
input('button', (ctx) => {
|
|
92
|
+
const c = ctx as DirectiveContext
|
|
93
|
+
const value = c.labelText ?? 'Send'
|
|
94
|
+
return html`<button name="action" value="${value}">${labelOf(c, 'Send')}</button>`
|
|
95
|
+
}),
|
|
96
|
+
]
|
|
97
|
+
|
|
98
|
+
export default function formPlugin(): Plugin {
|
|
99
|
+
return definePlugin({
|
|
100
|
+
name: 'form',
|
|
101
|
+
blocks: { form, ...Object.fromEntries(inputs) },
|
|
102
|
+
docs: () => fs.readFileSync(new URL('./README.md', import.meta.url), 'utf8'),
|
|
103
|
+
})
|
|
104
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* a form reads as a set-off part of the article: hairline rules above and below, no box */
|
|
2
|
+
.wb-form {
|
|
3
|
+
margin: 3.6em 0; padding: 1.6em 0 1.7em; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
|
|
4
|
+
display: grid; gap: 20px;
|
|
5
|
+
}
|
|
6
|
+
.wb-form-pending { min-height: 72px; }
|
|
7
|
+
/* the form's body is markdown: its first and last blocks sit flush with the rules */
|
|
8
|
+
.wb-form > :first-child { margin-top: 0; }
|
|
9
|
+
.wb-form > :last-child { margin-bottom: 0; }
|
|
10
|
+
.wb-form > :is(p, ul, ol, table, .wb-grid, div) { margin-top: 0; margin-bottom: 0; }
|
|
11
|
+
|
|
12
|
+
/* an inline option, :radio[…] or :check[…]: the input and its label read as one */
|
|
13
|
+
.wb-form-option { display: inline-flex; gap: 8px; align-items: baseline; cursor: pointer; }
|
|
14
|
+
.wb-form-option + .wb-form-option { margin-left: 18px; }
|
|
15
|
+
.wb-form-option input { margin: 0; translate: 0 .1em; }
|
|
16
|
+
.wb-form-option-label { font-weight: 600; }
|
|
17
|
+
.wb-form-recommended { font: 500 .7rem/1.4 var(--sans); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin-left: 10px; }
|
|
18
|
+
|
|
19
|
+
/* a list item that starts with an option is a row to pick: no bullet, the picked one tinted, and
|
|
20
|
+
the rest of the item reads as what the option means */
|
|
21
|
+
.wb-form li:has(> p:first-child > .wb-form-option:first-child),
|
|
22
|
+
.wb-form li:has(> .wb-form-option:first-child) { list-style: none; margin-left: -1.2em; padding: 6px 10px; border-radius: 6px; }
|
|
23
|
+
.wb-form li:has(> p:first-child > .wb-form-option:first-child):hover,
|
|
24
|
+
.wb-form li:has(> .wb-form-option:first-child):hover { background: var(--tint); }
|
|
25
|
+
.wb-form li:has(> p:first-child > .wb-form-option:first-child input:checked),
|
|
26
|
+
.wb-form li:has(> .wb-form-option:first-child input:checked) { background: color-mix(in srgb, var(--accent) 8%, transparent); }
|
|
27
|
+
.wb-form li > p:first-child { margin-bottom: .2em; }
|
|
28
|
+
.wb-form li > p:first-child > .wb-form-option:first-child,
|
|
29
|
+
.wb-form li > .wb-form-option:first-child { display: flex; margin-bottom: .15em; }
|
|
30
|
+
|
|
31
|
+
/* fields: the label above the input */
|
|
32
|
+
.wb-form-field { display: flex; flex-direction: column; gap: 7px; margin: 0; min-width: 0; }
|
|
33
|
+
.wb-form-field :is(input:not([type=range]), textarea, select) { width: 100%; }
|
|
34
|
+
.wb-form-field textarea { resize: vertical; }
|
|
35
|
+
.wb-form-label { font: 600 .78rem/1.4 var(--sans); color: var(--muted); letter-spacing: .01em; }
|
|
36
|
+
.wb-form-label:empty { display: none; }
|
|
37
|
+
|
|
38
|
+
/* buttons: the first one of a form is its primary one */
|
|
39
|
+
.wb-form button[name=action] + button[name=action] { margin-left: 8px; }
|
|
40
|
+
.wb-form button.wb-primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
|
|
41
|
+
.wb-card .wb-form { padding: 0; border: 0; margin: .6em 0 0; }
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Image cards; clicking one opens a lightbox (arrow keys to step, Esc to close).
|
|
2
|
+
|
|
3
|
+
Each heading at the shallowest level starts an item: the first image under it
|
|
4
|
+
is the picture, the heading is the title and the rest is the caption. Without
|
|
5
|
+
headings, every image in the block is an item and its alt text the title.
|
|
6
|
+
Relative image paths resolve next to the page file.
|
|
7
|
+
|
|
8
|
+
Attributes: `min` (smallest card width, default `240px`).
|
|
9
|
+
|
|
10
|
+
```markdown
|
|
11
|
+
:::gallery{min=200px}
|
|
12
|
+
### Dunes
|
|
13
|
+

|
|
14
|
+
Option A: warm, quiet.
|
|
15
|
+
|
|
16
|
+
### Coast
|
|
17
|
+

|
|
18
|
+
Option B: more contrast.
|
|
19
|
+
:::
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
:::gallery{min=200px}
|
|
23
|
+
### Dunes
|
|
24
|
+

|
|
25
|
+
Option A: warm, quiet.
|
|
26
|
+
|
|
27
|
+
### Coast
|
|
28
|
+

|
|
29
|
+
Option B: more contrast.
|
|
30
|
+
:::
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { createSignal, For, Show, onSettled } from 'solid-js'
|
|
2
|
+
import { solid } from '@bigmistqke/whiteboard/solid'
|
|
3
|
+
import type { Item } from './index'
|
|
4
|
+
|
|
5
|
+
function Gallery(props: { items: Item[]; min: string | null; narrow: boolean }) {
|
|
6
|
+
const [open, setOpen] = createSignal<number | null>(null)
|
|
7
|
+
const current = () => {
|
|
8
|
+
const i = open()
|
|
9
|
+
return i == null ? undefined : props.items[i]
|
|
10
|
+
}
|
|
11
|
+
const step = (d: number) => setOpen(i => (i == null ? i : (i + d + props.items.length) % props.items.length))
|
|
12
|
+
|
|
13
|
+
onSettled(() => {
|
|
14
|
+
const onKey = (e: KeyboardEvent) => {
|
|
15
|
+
if (open() == null) return
|
|
16
|
+
if (e.key === 'Escape') setOpen(null)
|
|
17
|
+
else if (e.key === 'ArrowRight') step(1)
|
|
18
|
+
else if (e.key === 'ArrowLeft') step(-1)
|
|
19
|
+
}
|
|
20
|
+
addEventListener('keydown', onKey)
|
|
21
|
+
return () => removeEventListener('keydown', onKey)
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<>
|
|
26
|
+
<div class={['wb-gallery', { 'wb-wide': !props.narrow }]} style={{ '--wb-gallery-min': props.min ?? '240px' }}>
|
|
27
|
+
<For each={props.items}>
|
|
28
|
+
{(item, i) => (
|
|
29
|
+
<figure class="wb-gallery-item">
|
|
30
|
+
<Show when={item.src}>
|
|
31
|
+
<button type="button" class="wb-gallery-thumb" onClick={() => setOpen(i())}>
|
|
32
|
+
<img src={item.src!} alt={item.alt} loading="lazy" />
|
|
33
|
+
</button>
|
|
34
|
+
</Show>
|
|
35
|
+
<Show when={item.title || item.html}>
|
|
36
|
+
<figcaption>
|
|
37
|
+
<Show when={item.title}>
|
|
38
|
+
<h3 innerHTML={item.title!} />
|
|
39
|
+
</Show>
|
|
40
|
+
<div innerHTML={item.html} />
|
|
41
|
+
</figcaption>
|
|
42
|
+
</Show>
|
|
43
|
+
</figure>
|
|
44
|
+
)}
|
|
45
|
+
</For>
|
|
46
|
+
</div>
|
|
47
|
+
<Show when={current()}>
|
|
48
|
+
{item => (
|
|
49
|
+
<div class="wb-lightbox" onClick={e => e.target === e.currentTarget && setOpen(null)}>
|
|
50
|
+
<img src={item().src ?? ''} alt={item().alt} />
|
|
51
|
+
<div class="wb-lightbox-caption" innerHTML={item().title ?? ''} />
|
|
52
|
+
<Show when={props.items.length > 1}>
|
|
53
|
+
<button type="button" class="wb-lightbox-prev" aria-label="Previous" onClick={() => step(-1)}>‹</button>
|
|
54
|
+
<button type="button" class="wb-lightbox-next" aria-label="Next" onClick={() => step(1)}>›</button>
|
|
55
|
+
</Show>
|
|
56
|
+
<button type="button" class="wb-lightbox-close" aria-label="Close" onClick={() => setOpen(null)}>×</button>
|
|
57
|
+
</div>
|
|
58
|
+
)}
|
|
59
|
+
</Show>
|
|
60
|
+
</>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export default solid(Gallery)
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import fs from 'node:fs'
|
|
2
|
+
import { definePlugin, type Plugin } from '@bigmistqke/whiteboard'
|
|
3
|
+
// Turns the block's content into gallery items: one per heading (first image in the section is
|
|
4
|
+
// its picture), or one per image when there are no headings.
|
|
5
|
+
import { escape, type DirectiveContext } from '@bigmistqke/whiteboard'
|
|
6
|
+
import { builtFile } from '../../src/package.ts'
|
|
7
|
+
|
|
8
|
+
interface Node { type: string; depth?: number; url?: string; alt?: string; children?: Node[] }
|
|
9
|
+
export interface Item { src: string | null; alt: string; title: string | null; html: string }
|
|
10
|
+
|
|
11
|
+
/** Remove and return the first image in a list of nodes (searching inside paragraphs). */
|
|
12
|
+
function takeImage(nodes: Node[]): Node | null {
|
|
13
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
14
|
+
const n = nodes[i]
|
|
15
|
+
if (n.type === 'image') { nodes.splice(i, 1); return n }
|
|
16
|
+
if (n.children) {
|
|
17
|
+
const found = takeImage(n.children)
|
|
18
|
+
if (found) {
|
|
19
|
+
if (n.type === 'paragraph' && n.children.every(c => c.type === 'text' && !String((c as any).value).trim())) nodes.splice(i, 1)
|
|
20
|
+
return found
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return null
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export async function props(ctx: DirectiveContext) {
|
|
28
|
+
const children = ctx.children as Node[]
|
|
29
|
+
const heads = children.filter(n => n.type === 'heading')
|
|
30
|
+
const items: Item[] = []
|
|
31
|
+
if (heads.length) {
|
|
32
|
+
const depth = Math.min(...heads.map(h => h.depth!))
|
|
33
|
+
let current: { heading: Node; body: Node[] } | null = null
|
|
34
|
+
const groups: { heading: Node; body: Node[] }[] = []
|
|
35
|
+
for (const n of children) {
|
|
36
|
+
if (n.type === 'heading' && n.depth === depth) groups.push((current = { heading: n, body: [] }))
|
|
37
|
+
else current?.body.push(n)
|
|
38
|
+
}
|
|
39
|
+
for (const g of groups) {
|
|
40
|
+
const img = takeImage(g.body)
|
|
41
|
+
items.push({ src: img?.url ?? null, alt: img?.alt ?? '', title: await ctx.toHtml(g.heading.children ?? []), html: await ctx.toHtml(g.body) })
|
|
42
|
+
}
|
|
43
|
+
} else {
|
|
44
|
+
const walk = (nodes: Node[]) => {
|
|
45
|
+
for (const n of nodes) {
|
|
46
|
+
if (n.type === 'image') items.push({ src: n.url!, alt: n.alt ?? '', title: n.alt ? escape(n.alt) : null, html: '' })
|
|
47
|
+
else if (n.children) walk(n.children)
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
walk(children)
|
|
51
|
+
}
|
|
52
|
+
return { items, min: ctx.attrs.min ?? null, narrow: 'narrow' in ctx.attrs }
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export default function gallery(): Plugin {
|
|
56
|
+
return definePlugin({
|
|
57
|
+
name: 'gallery',
|
|
58
|
+
blocks: {
|
|
59
|
+
gallery: {
|
|
60
|
+
props,
|
|
61
|
+
client: builtFile(import.meta.url, 'client.js'),
|
|
62
|
+
style: new URL('./style.css', import.meta.url),
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
docs: () => fs.readFileSync(new URL('./README.md', import.meta.url), 'utf8'),
|
|
66
|
+
})
|
|
67
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.wb-gallery {
|
|
2
|
+
display: grid; gap: 40px 24px; margin: 4em 0;
|
|
3
|
+
grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--wb-gallery-min, 240px)), 1fr));
|
|
4
|
+
}
|
|
5
|
+
.wb-gallery-item {
|
|
6
|
+
margin: 0; overflow: hidden; display: flex; flex-direction: column; min-width: 0;
|
|
7
|
+
}
|
|
8
|
+
.wb-gallery-thumb { padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: var(--code-bg); cursor: zoom-in; display: block; }
|
|
9
|
+
.wb-gallery-thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0; }
|
|
10
|
+
.wb-gallery-item figcaption { padding: 14px 2px 0; font: .88rem/1.5 var(--serif); color: var(--text); }
|
|
11
|
+
.wb-gallery-item figcaption h3 { margin: 0 0 .25em; font-size: 1rem; }
|
|
12
|
+
.wb-gallery-item figcaption > div > :first-child { margin-top: 0; }
|
|
13
|
+
.wb-gallery-item figcaption > div > :last-child { margin-bottom: 0; }
|
|
14
|
+
|
|
15
|
+
.wb-lightbox {
|
|
16
|
+
position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .86);
|
|
17
|
+
display: grid; place-items: center; grid-template-rows: 1fr auto; padding: 24px 16px;
|
|
18
|
+
}
|
|
19
|
+
.wb-lightbox img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 4px; }
|
|
20
|
+
.wb-lightbox-caption { color: #eee; text-align: center; padding-top: 10px; }
|
|
21
|
+
.wb-lightbox button {
|
|
22
|
+
position: absolute; background: rgb(255 255 255 / .12); color: #fff; border: 0; font-size: 1.6rem; line-height: 1;
|
|
23
|
+
width: 44px; height: 44px; border-radius: 50%; padding: 0;
|
|
24
|
+
}
|
|
25
|
+
.wb-lightbox-prev { left: 12px; top: 50%; }
|
|
26
|
+
.wb-lightbox-next { right: 12px; top: 50%; }
|
|
27
|
+
.wb-lightbox-close { right: 12px; top: 12px; }
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Cards in a responsive grid. Each heading at the shallowest level inside the
|
|
2
|
+
block starts a card; everything under it is the card body (any markdown,
|
|
3
|
+
including other blocks). Without headings, each paragraph is a card.
|
|
4
|
+
|
|
5
|
+
A heading that ends in `{word}` gets a badge. `done ok yes good` are green,
|
|
6
|
+
`active new info` blue, `open todo maybe warning` amber,
|
|
7
|
+
`blocked no bad error` red; any other word is grey.
|
|
8
|
+
|
|
9
|
+
Attributes: `cols` (target column count on a wide screen, default 3).
|
|
10
|
+
|
|
11
|
+
```markdown
|
|
12
|
+
:::grid{cols=3}
|
|
13
|
+
### Parser {done}
|
|
14
|
+
remark + remark-directive.
|
|
15
|
+
|
|
16
|
+
### Islands {active}
|
|
17
|
+
Solid components mounted per block.
|
|
18
|
+
|
|
19
|
+
### Docs {todo}
|
|
20
|
+
Live examples on `/_/docs`.
|
|
21
|
+
:::
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
:::grid{cols=3}
|
|
25
|
+
### Parser {done}
|
|
26
|
+
remark + remark-directive.
|
|
27
|
+
|
|
28
|
+
### Islands {active}
|
|
29
|
+
Solid components mounted per block.
|
|
30
|
+
|
|
31
|
+
### Docs {todo}
|
|
32
|
+
Live examples on `/_/docs`.
|
|
33
|
+
:::
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import fs from 'node:fs'
|
|
2
|
+
import { definePlugin, type Plugin } from '@bigmistqke/whiteboard'
|
|
3
|
+
// Static block: no component, so no JavaScript on the page.
|
|
4
|
+
import { html, raw, type DirectiveContext } from '@bigmistqke/whiteboard'
|
|
5
|
+
|
|
6
|
+
const slug = (s: string) => s.toLowerCase().trim().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '')
|
|
7
|
+
|
|
8
|
+
export async function render(ctx: DirectiveContext) {
|
|
9
|
+
const { intro, sections } = await ctx.sections()
|
|
10
|
+
const cols = Number(ctx.attrs.cols)
|
|
11
|
+
const style = cols ? html` style="--wb-grid-cols:${cols}"` : null
|
|
12
|
+
const cards = sections.map(s => {
|
|
13
|
+
let title = s.title
|
|
14
|
+
let badge: string | null = null
|
|
15
|
+
const m = title ? /^(.*?)\s*\{([^}]+)\}\s*$/s.exec(title) : null
|
|
16
|
+
if (m) { title = m[1]; badge = m[2].trim() }
|
|
17
|
+
// a section's title and html are HTML already; the badge is text from the heading
|
|
18
|
+
const b = badge && html`<span class="wb-badge" data-badge="${slug(badge)}">${badge}</span>`
|
|
19
|
+
const head = (title || b) && html`<header>${title && html`<h3>${raw(title)}</h3>`}${b}</header>`
|
|
20
|
+
return html`<article class="wb-card"${badge && html` data-badge="${slug(badge)}"`}>${head}<div class="wb-card-body">${raw(s.html)}</div></article>`
|
|
21
|
+
})
|
|
22
|
+
return html`${raw(intro)}<div class="wb-grid${'narrow' in ctx.attrs ? '' : ' wb-wide'}"${style}>${cards}</div>`
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default function grid(): Plugin {
|
|
26
|
+
return definePlugin({
|
|
27
|
+
name: 'grid',
|
|
28
|
+
blocks: {
|
|
29
|
+
grid: {
|
|
30
|
+
html: render,
|
|
31
|
+
style: new URL('./style.css', import.meta.url),
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
docs: () => fs.readFileSync(new URL('./README.md', import.meta.url), 'utf8'),
|
|
35
|
+
})
|
|
36
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.wb-grid {
|
|
2
|
+
display: grid; gap: 22px; margin: 4em 0;
|
|
3
|
+
grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(var(--wide, 1040px) / var(--wb-grid-cols, 3) - 16px)), 1fr));
|
|
4
|
+
}
|
|
5
|
+
.wb-grid:not(.wb-wide) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
|
|
6
|
+
.wb-card {
|
|
7
|
+
background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
|
|
8
|
+
padding: 18px 20px 20px; min-width: 0;
|
|
9
|
+
}
|
|
10
|
+
.wb-card > header { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; margin-bottom: .55em; }
|
|
11
|
+
.wb-card h3 { margin: 0; font-size: 1.02rem; }
|
|
12
|
+
.wb-card-body { font-size: .9rem; line-height: 1.6; }
|
|
13
|
+
.wb-card-body > :first-child { margin-top: 0; }
|
|
14
|
+
.wb-card-body > :last-child { margin-bottom: 0; }
|
|
15
|
+
|
|
16
|
+
/* badge: a coloured dot and a word, not a pill */
|
|
17
|
+
.wb-badge {
|
|
18
|
+
--c: var(--muted); flex: none; display: inline-flex; align-items: center; gap: 6px;
|
|
19
|
+
font: 500 .74rem/1 var(--sans); color: var(--muted); white-space: nowrap;
|
|
20
|
+
}
|
|
21
|
+
.wb-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
|
|
22
|
+
.wb-badge:is([data-badge=done], [data-badge=ok], [data-badge=yes], [data-badge=good]) { --c: var(--ok); }
|
|
23
|
+
.wb-badge:is([data-badge=active], [data-badge=new], [data-badge=info]) { --c: var(--info); }
|
|
24
|
+
.wb-badge:is([data-badge=open], [data-badge=todo], [data-badge=maybe], [data-badge=warning]) { --c: var(--warn); }
|
|
25
|
+
.wb-badge:is([data-badge=blocked], [data-badge=no], [data-badge=bad], [data-badge=error]) { --c: var(--bad); }
|
package/plugins/index.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// The built-in plugins: what every project has, before its config's `plugins` (which add to them,
|
|
2
|
+
// and replace one of the same name: `code({ themes })` for the default `code`). The terminal and the
|
|
3
|
+
// Claude Code plugin are not among them: they run code, or are about one agent, so a project adds
|
|
4
|
+
// them itself.
|
|
5
|
+
import type { Plugin } from '../src/define.ts'
|
|
6
|
+
import callout from './callout/index.ts'
|
|
7
|
+
import chat from './chat/index.ts'
|
|
8
|
+
import code from './code/index.ts'
|
|
9
|
+
import comments from './comments/index.ts'
|
|
10
|
+
import details from './details/index.ts'
|
|
11
|
+
import form from './form/index.ts'
|
|
12
|
+
import gallery from './gallery/index.ts'
|
|
13
|
+
import grid from './grid/index.ts'
|
|
14
|
+
import mermaid from './mermaid/index.ts'
|
|
15
|
+
import quiet from './quiet/index.ts'
|
|
16
|
+
|
|
17
|
+
export function builtins(): Plugin[] {
|
|
18
|
+
return [callout(), chat(), code(), comments(), details(), form(), gallery(), grid(), mermaid(), quiet()]
|
|
19
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
A [Mermaid](https://mermaid.js.org) diagram from a fence: flowcharts,
|
|
2
|
+
sequence, state, class, ER, gantt, pie and the other Mermaid types. Rendered
|
|
3
|
+
to SVG on the server by [Pele](https://pele.run), so no script runs on the
|
|
4
|
+
page; colours follow the page theme. A syntax error shows the line and
|
|
5
|
+
column in place of the diagram.
|
|
6
|
+
|
|
7
|
+
````markdown
|
|
8
|
+
```mermaid
|
|
9
|
+
flowchart LR
|
|
10
|
+
agent[agent writes .md] --> page[page in browser]
|
|
11
|
+
page -- form submit --> log[(events.ndjson)]
|
|
12
|
+
log -- whiteboard wait --> agent
|
|
13
|
+
```
|
|
14
|
+
````
|
|
15
|
+
|
|
16
|
+
```mermaid
|
|
17
|
+
flowchart LR
|
|
18
|
+
agent[agent writes .md] --> page[page in browser]
|
|
19
|
+
page -- form submit --> log[(events.ndjson)]
|
|
20
|
+
log -- whiteboard wait --> agent
|
|
21
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import fs from 'node:fs'
|
|
2
|
+
import { definePlugin, type Plugin } from '@bigmistqke/whiteboard'
|
|
3
|
+
// Mermaid diagrams rendered to SVG on the server with Pele (https://pele.run): no JavaScript on
|
|
4
|
+
// the page, and colours come from CSS variables, so diagrams follow the light/dark theme.
|
|
5
|
+
import crypto from 'node:crypto'
|
|
6
|
+
// pele loads the first time a page has a diagram, not with the plugin
|
|
7
|
+
let pele: typeof import('pele') | undefined
|
|
8
|
+
import { html, raw, type FenceContext } from '@bigmistqke/whiteboard'
|
|
9
|
+
|
|
10
|
+
const FONT = 'ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'
|
|
11
|
+
|
|
12
|
+
export async function render(ctx: FenceContext) {
|
|
13
|
+
pele ??= await import('pele')
|
|
14
|
+
// ids derive from the source, so an unchanged diagram renders the same markup every time
|
|
15
|
+
const idPrefix = `wbm-${crypto.createHash('sha1').update(ctx.text).digest('hex').slice(0, 8)}-`
|
|
16
|
+
try {
|
|
17
|
+
const { svg } = pele.render(ctx.text, { idPrefix, fontFamily: FONT, responsive: true })
|
|
18
|
+
// the SVG is Pele's markup
|
|
19
|
+
return html`<figure class="wb-diagram wb-figure">${raw(svg)}</figure>`
|
|
20
|
+
} catch (err) {
|
|
21
|
+
if (!(err instanceof pele.PeleError)) throw err
|
|
22
|
+
const where = err.line ? ` (line ${err.line}${err.column ? `, column ${err.column}` : ''})` : ''
|
|
23
|
+
const snippet = err.snippet ? `\n\n${err.snippet}` : ''
|
|
24
|
+
return html`<pre class="wb-error">mermaid: ${err.message}${where}${snippet}</pre>`
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default function mermaid(): Plugin {
|
|
29
|
+
return definePlugin({
|
|
30
|
+
name: 'mermaid',
|
|
31
|
+
blocks: {
|
|
32
|
+
mermaid: {
|
|
33
|
+
html: render,
|
|
34
|
+
style: new URL('./style.css', import.meta.url),
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
docs: () => fs.readFileSync(new URL('./README.md', import.meta.url), 'utf8'),
|
|
38
|
+
})
|
|
39
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* Pele reads its colours from --pele-* variables; map them onto the page's tokens so diagrams
|
|
2
|
+
follow the theme without being re-rendered. */
|
|
3
|
+
.wb-diagram {
|
|
4
|
+
margin: 4em 0; overflow-x: auto; text-align: center;
|
|
5
|
+
--pele-bg: transparent;
|
|
6
|
+
--pele-fg: var(--text);
|
|
7
|
+
--pele-muted: var(--muted);
|
|
8
|
+
--pele-line: var(--muted);
|
|
9
|
+
--pele-surface: var(--surface);
|
|
10
|
+
--pele-surface-alt: var(--code-bg);
|
|
11
|
+
--pele-border: var(--border);
|
|
12
|
+
--pele-accent: var(--accent);
|
|
13
|
+
--pele-font: var(--sans);
|
|
14
|
+
--pele-radius: 6px;
|
|
15
|
+
}
|
|
16
|
+
.wb-diagram svg { max-width: 100%; height: auto; }
|