@bigmistqke/whiteboard 0.3.0 → 0.4.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.
Files changed (155) hide show
  1. package/README.md +67 -17
  2. package/bin/whiteboard.ts +268 -71
  3. package/dist/client/runtime.js +88 -41
  4. package/dist/define.js +21 -2
  5. package/dist/plugins/callout/index.js +3 -1
  6. package/dist/plugins/callout/public/style.css +30 -0
  7. package/dist/plugins/chat/index.js +7 -4
  8. package/dist/plugins/chat/{client.js → public/client.js} +1 -1
  9. package/dist/plugins/chat/public/style.css +98 -0
  10. package/dist/plugins/code/index.js +3 -1
  11. package/dist/plugins/code/public/style.css +68 -0
  12. package/dist/plugins/comments/index.js +4 -5
  13. package/dist/plugins/comments/public/client.js +19 -0
  14. package/dist/plugins/comments/public/style.css +185 -0
  15. package/dist/plugins/details/index.js +7 -2
  16. package/dist/plugins/details/public/style.css +7 -0
  17. package/dist/plugins/form/index.js +37 -8
  18. package/dist/plugins/form/public/style.css +126 -0
  19. package/dist/plugins/gallery/index.js +4 -3
  20. package/dist/plugins/gallery/public/client.js +1 -0
  21. package/dist/plugins/gallery/public/style.css +90 -0
  22. package/dist/plugins/grid/index.js +9 -3
  23. package/dist/plugins/grid/public/style.css +71 -0
  24. package/dist/plugins/iframe/index.js +13 -14
  25. package/dist/plugins/iframe/public/style.css +13 -0
  26. package/dist/plugins/index.js +3 -1
  27. package/dist/plugins/mermaid/index.js +3 -1
  28. package/dist/plugins/mermaid/{style.css → public/style.css} +7 -2
  29. package/dist/plugins/terminal/index.js +10 -9
  30. package/dist/plugins/terminal/{style.css → public/style.css} +199 -45
  31. package/dist/plugins/toc/README.md +12 -0
  32. package/dist/plugins/toc/index.js +9 -5
  33. package/dist/plugins/toc/public/client.js +1 -0
  34. package/dist/plugins/toc/public/style.css +93 -0
  35. package/dist/plugins/window/README.md +29 -0
  36. package/dist/plugins/window/index.js +64 -0
  37. package/dist/solid/index.js +14 -11
  38. package/dist/src/client/page/base.css +1078 -199
  39. package/dist/src/client/page/main.js +174 -32
  40. package/dist/src/loader.js +7 -2
  41. package/dist/src/package.js +3 -6
  42. package/dist/src/pages/blocks.js +8 -13
  43. package/dist/src/pages/markdown.js +1 -1
  44. package/dist/src/pages/render.js +73 -13
  45. package/dist/src/pages/window.js +30 -0
  46. package/dist/src/public.js +24 -0
  47. package/dist/src/server.js +37 -15
  48. package/package.json +3 -1
  49. package/plugins/callout/index.ts +3 -1
  50. package/plugins/callout/public/style.css +30 -0
  51. package/plugins/chat/autosize.ts +43 -9
  52. package/plugins/chat/client.tsx +22 -5
  53. package/plugins/chat/index.ts +22 -8
  54. package/plugins/chat/public/style.css +98 -0
  55. package/plugins/claude-code/index.ts +49 -14
  56. package/plugins/code/diff.ts +28 -8
  57. package/plugins/code/index.ts +30 -20
  58. package/plugins/code/public/style.css +68 -0
  59. package/plugins/comments/client.ts +139 -71
  60. package/plugins/comments/index.ts +9 -7
  61. package/plugins/comments/public/style.css +185 -0
  62. package/plugins/details/index.ts +7 -2
  63. package/plugins/details/public/style.css +7 -0
  64. package/plugins/forge/index.ts +16 -3
  65. package/plugins/form/index.ts +75 -27
  66. package/plugins/form/public/style.css +126 -0
  67. package/plugins/gallery/client.tsx +9 -3
  68. package/plugins/gallery/index.ts +31 -9
  69. package/plugins/gallery/public/style.css +90 -0
  70. package/plugins/grid/index.ts +19 -5
  71. package/plugins/grid/public/style.css +71 -0
  72. package/plugins/iframe/index.ts +20 -23
  73. package/plugins/iframe/public/style.css +13 -0
  74. package/plugins/index.ts +16 -1
  75. package/plugins/mermaid/index.ts +3 -1
  76. package/plugins/mermaid/{style.css → public/style.css} +7 -2
  77. package/plugins/terminal/client.ts +105 -48
  78. package/plugins/terminal/host.ts +131 -29
  79. package/plugins/terminal/index.ts +84 -25
  80. package/plugins/terminal/public/style.css +225 -0
  81. package/plugins/terminal/server.ts +64 -13
  82. package/plugins/terminal/sizes.ts +13 -3
  83. package/plugins/toc/README.md +12 -0
  84. package/plugins/toc/client.ts +58 -29
  85. package/plugins/toc/index.ts +22 -5
  86. package/plugins/toc/public/style.css +93 -0
  87. package/plugins/window/README.md +29 -0
  88. package/plugins/window/index.ts +85 -0
  89. package/skills/whiteboard/SKILL.md +3 -1
  90. package/solid/index.tsx +24 -9
  91. package/src/auth.ts +25 -7
  92. package/src/client/forms.ts +74 -28
  93. package/src/client/markdown.ts +15 -4
  94. package/src/client/page/base.css +1078 -199
  95. package/src/client/page/elsewhere.ts +32 -15
  96. package/src/client/page/fresh.ts +91 -23
  97. package/src/client/page/hold.ts +11 -2
  98. package/src/client/page/live.ts +10 -6
  99. package/src/client/page/main.ts +106 -34
  100. package/src/client/page/orphans.ts +25 -10
  101. package/src/client/page/sort.ts +14 -4
  102. package/src/client/page/sticky.ts +11 -3
  103. package/src/client/page/theme.ts +11 -7
  104. package/src/client/page/waiting.ts +141 -34
  105. package/src/client/page/window.ts +40 -0
  106. package/src/client/reactive.ts +19 -0
  107. package/src/client/read.ts +17 -10
  108. package/src/client/runtime.ts +130 -35
  109. package/src/client/scroll.ts +14 -4
  110. package/src/client/toast.ts +19 -5
  111. package/src/config.ts +20 -5
  112. package/src/define.ts +67 -23
  113. package/src/events.ts +111 -24
  114. package/src/html.ts +6 -2
  115. package/src/icons.ts +4 -2
  116. package/src/load.ts +10 -2
  117. package/src/loader.ts +75 -11
  118. package/src/package.ts +9 -8
  119. package/src/pages/blocks.ts +20 -14
  120. package/src/pages/markdown.ts +113 -34
  121. package/src/pages/render.ts +198 -37
  122. package/src/pages/window.ts +71 -0
  123. package/src/plugins.ts +90 -24
  124. package/src/public.ts +39 -0
  125. package/src/running.ts +8 -2
  126. package/src/serve.ts +29 -7
  127. package/src/server.ts +351 -108
  128. package/src/status.ts +15 -9
  129. package/dist/plugins/callout/style.css +0 -12
  130. package/dist/plugins/chat/style.css +0 -24
  131. package/dist/plugins/code/style.css +0 -29
  132. package/dist/plugins/comments/client.js +0 -10
  133. package/dist/plugins/comments/style.css +0 -40
  134. package/dist/plugins/details/style.css +0 -3
  135. package/dist/plugins/form/style.css +0 -44
  136. package/dist/plugins/gallery/client.js +0 -1
  137. package/dist/plugins/gallery/style.css +0 -27
  138. package/dist/plugins/grid/style.css +0 -25
  139. package/dist/plugins/iframe/client.js +0 -1
  140. package/dist/plugins/iframe/style.css +0 -29
  141. package/dist/plugins/toc/client.js +0 -1
  142. package/dist/plugins/toc/style.css +0 -19
  143. package/plugins/callout/style.css +0 -12
  144. package/plugins/chat/style.css +0 -24
  145. package/plugins/code/style.css +0 -29
  146. package/plugins/comments/style.css +0 -40
  147. package/plugins/details/style.css +0 -3
  148. package/plugins/form/style.css +0 -44
  149. package/plugins/gallery/style.css +0 -27
  150. package/plugins/grid/style.css +0 -25
  151. package/plugins/iframe/client.ts +0 -46
  152. package/plugins/iframe/style.css +0 -29
  153. package/plugins/terminal/style.css +0 -71
  154. package/plugins/toc/style.css +0 -19
  155. /package/dist/plugins/terminal/{client.js → public/client.js} +0 -0
@@ -1,299 +1,1178 @@
1
- /* Base page style: an article, set for reading. Blocks bring their own style.css;
2
- <root>/style.css is loaded after this file to override anything here.
1
+ /* Base page style: an article, set for reading. Blocks bring their own style.css, and the
2
+ project's stylesheet (the config's `style`) is linked after this file to override anything here.
3
3
 
4
- Theme: follows the system unless <html data-theme="light|dark"> is set (the nav toggle). */
4
+ The theme: every colour is a light-dark(light, dark) pair, so it follows the page's color-scheme:
5
+ the system's, unless <html data-theme="light|dark"> pins one (the header's toggle). A project
6
+ overrides a colour for both at once: `--accent: light-dark(#c2410c, #fb923c)`. */
5
7
  :root {
6
- --bg: #fdfdfc; --surface: #ffffff; --text: #1b1c1e; --muted: #696e76; --border: #e3e5e9;
7
- --accent: #1d5bbf; --accent-text: #ffffff; --code-bg: #f2f3f5; --tint: #f6f7f9;
8
- --ok: #1a7a49; --warn: #6b4fc0; --bad: #c4352b; --info: #1d5bbf;
9
- --radius: 8px; --shadow: none;
10
- --serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
11
- --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
12
- --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
8
+ color-scheme: light dark;
9
+ --bg: light-dark(#fdfdfc, #131417);
10
+ --surface: light-dark(#ffffff, #191a1e);
11
+ --text: light-dark(#1b1c1e, #e4e5e7);
12
+ --muted: light-dark(#696e76, #979ca5);
13
+ --border: light-dark(#e3e5e9, #2b2e34);
14
+ --accent: light-dark(#1d5bbf, #82aaff);
15
+ --accent-text: light-dark(#ffffff, #0d1220);
16
+ --code-bg: light-dark(#f2f3f5, #1e2026);
17
+ --tint: light-dark(#f6f7f9, #1a1c21);
18
+ --ok: light-dark(#1a7a49, #57c48c);
19
+ --warn: light-dark(#6b4fc0, #b4a0ff);
20
+ --bad: light-dark(#c4352b, #ff6f66);
21
+ --info: light-dark(#1d5bbf, #82aaff);
22
+ --shadow: none;
23
+
24
+ /* Type. The article is set in --serif at --text-size; everything in it (its margins, its
25
+ headings) is in em, so it follows. The interface (buttons, toasts, cards, the header) is in
26
+ --sans at three sizes of its own. */
27
+ --text-size: 19px;
28
+ --line-height: 1.72;
29
+ --ui-line-height: 1.45;
30
+ --ui-tiny: 0.7rem;
31
+ --ui-small: 0.8rem;
32
+ --ui-text: 0.9rem;
33
+ --weight-strong: 600;
34
+ --caps-spacing: 0.04em;
35
+
36
+ /* The article's rhythm: the space between blocks, and around a set-off one (a form, a window) */
37
+ --rhythm: 1.2em;
38
+
39
+ /* The interface's spacing, a 2px grid: paddings and gaps */
40
+ --space-2xs: 2px;
41
+ --space-xs: 4px;
42
+ --space-sm: 6px;
43
+ --space-md: 8px;
44
+ --space-lg: 10px;
45
+ --space-xl: 12px;
46
+ --space-2xl: 16px;
47
+ --space-3xl: 24px;
48
+
49
+ /* Corners: controls, cards and panels, pills */
50
+ --radius-sm: 5px;
51
+ --radius: 8px;
52
+ --radius-lg: 12px;
53
+ --radius-pill: 999px;
54
+
55
+ /* How strongly a colour is mixed in: a hover or background, a selection or highlight, a mark */
56
+ --tint-faint: 7%;
57
+ --tint-soft: 14%;
58
+ --tint-strong: 40%;
59
+
60
+ --hairline: 1px;
61
+ --shadow-pop: 0 8px 28px rgb(0 0 0 / 0.16);
62
+ --speed: 0.2s;
63
+
64
+ /* What lies over what: beside the text, popovers and threads, a maximized window, the top */
65
+ --layer-aside: 5;
66
+ --layer-popover: 20;
67
+ --layer-window: 40;
68
+ --layer-top: 50;
69
+
70
+ --serif: 'Iowan Old Style', 'Charter', 'Bitstream Charter', 'Sitka Text', Cambria, Georgia, serif;
71
+ --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;
72
+ --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
13
73
  --measure: 680px;
14
74
  --wide: 1040px;
15
75
  --figure: 920px;
16
- color-scheme: light;
17
76
  }
18
- @media (prefers-color-scheme: dark) {
19
- :root:not([data-theme="light"]) {
20
- --bg: #131417; --surface: #191a1e; --text: #e4e5e7; --muted: #979ca5; --border: #2b2e34;
21
- --accent: #82aaff; --accent-text: #0d1220; --code-bg: #1e2026; --tint: #1a1c21;
22
- --ok: #57c48c; --warn: #b4a0ff; --bad: #ff6f66; --info: #82aaff;
23
- color-scheme: dark;
24
- }
77
+ :root[data-theme='light'] {
78
+ color-scheme: light;
25
79
  }
26
- :root[data-theme="dark"] {
27
- --bg: #131417; --surface: #191a1e; --text: #e4e5e7; --muted: #979ca5; --border: #2b2e34;
28
- --accent: #82aaff; --accent-text: #0d1220; --code-bg: #1e2026; --tint: #1a1c21;
29
- --ok: #57c48c; --warn: #b4a0ff; --bad: #ff6f66; --info: #82aaff;
80
+ :root[data-theme='dark'] {
30
81
  color-scheme: dark;
31
82
  }
32
83
 
33
- * { box-sizing: border-box; }
34
- html { -webkit-text-size-adjust: 100%; }
84
+ * {
85
+ box-sizing: border-box;
86
+ }
87
+ html {
88
+ -webkit-text-size-adjust: 100%;
89
+ }
35
90
  body {
36
- margin: 0; background: var(--bg); color: var(--text);
37
- font: 19px/1.72 var(--serif);
38
- font-kerning: normal; font-variant-numeric: oldstyle-nums proportional-nums;
39
- text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
91
+ margin: 0;
92
+ background: var(--bg);
93
+ color: var(--text);
94
+ font: var(--text-size)/var(--line-height) var(--serif);
95
+ font-kerning: normal;
96
+ font-variant-numeric: oldstyle-nums proportional-nums;
97
+ text-rendering: optimizeLegibility;
98
+ -webkit-font-smoothing: antialiased;
40
99
  }
41
100
  /* The column: headings sit on its left edge, everything else is indented by --indent, and section
42
101
  numbers hang in the margin left of the headings. */
43
- main { --indent: 34px; max-width: calc(var(--measure) + var(--indent) + 32px); margin: 0 auto; padding: 120px 16px 220px; }
44
- main > :first-child { margin-top: 0; }
45
- #wb-main > :not(h1, h2, h3, h4, h5, h6, hr, .wb-wide, .wb-island:has(.wb-wide), figure, .wb-figure, p:has(> img:only-child), p:has(> a:only-child > img:only-child)) { margin-left: var(--indent); }
46
- #wb-main > :is(h1, h2, h3, h4) + * { margin-top: 0; }
102
+ main {
103
+ --indent: 34px;
104
+ max-width: calc(var(--measure) + var(--indent) + 32px);
105
+ margin: 0 auto;
106
+ padding: 120px var(--space-2xl) 220px;
107
+ }
108
+ main > :first-child {
109
+ margin-top: 0;
110
+ }
111
+ #wb-main
112
+ > :not(
113
+ h1,
114
+ h2,
115
+ h3,
116
+ h4,
117
+ h5,
118
+ h6,
119
+ hr,
120
+ .wb-wide,
121
+ .wb-island:has(.wb-wide),
122
+ figure,
123
+ .wb-figure,
124
+ p:has(> img:only-child),
125
+ p:has(> a:only-child > img:only-child)
126
+ ) {
127
+ margin-left: var(--indent);
128
+ }
129
+ #wb-main > :is(h1, h2, h3, h4) + * {
130
+ margin-top: 0;
131
+ }
47
132
 
48
133
  /* text */
49
- a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
50
- a:hover { text-decoration-color: currentColor; }
51
- h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
52
- h1 { font-size: 2.9rem; line-height: 1.08; margin: 0 0 1.1em; letter-spacing: -0.022em; }
53
- h2 { font-size: 1.62rem; margin: 4.6em 0 1.5em; }
54
- h3 { font-size: 1.2rem; margin: 3.4em 0 1.2em; }
55
- #wb-main > h3 { font-style: italic; } /* section headings only; card titles stay upright */
56
- h4 { font: 600 .74rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 3em 0 1.1em; }
57
- p, ul, ol, blockquote, pre, table { margin: 0 0 2.2em; }
58
- p { margin-bottom: 2.4em; }
59
- p { text-wrap: pretty; hyphens: auto; }
60
- ul, ol { padding-left: 1.4em; }
61
- li::marker { color: var(--muted); }
62
- li + li { margin-top: .8em; }
63
- li > p { margin-bottom: .8em; }
64
- strong { font-weight: 650; }
65
- img, video { max-width: 100%; height: auto; border-radius: 4px; }
66
- figure { margin: 3.6em 0; }
67
- figcaption { font: italic .9rem/1.5 var(--serif); color: var(--muted); margin-top: .7em; }
68
- code { font: .82em/1.5 var(--mono); background: var(--code-bg); padding: .12em .35em; border-radius: 4px; }
69
- pre { margin: 3em 0; background: var(--code-bg); padding: 14px 16px; border-radius: var(--radius); overflow-x: auto; font-size: .92rem; line-height: 1.55; }
70
- pre code { background: none; padding: 0; font-size: .82rem; }
71
- table { margin: 3em 0; border-collapse: collapse; display: block; overflow-x: auto; max-width: 100%; font: .88rem/1.5 var(--sans); }
72
- th, td { border-bottom: 1px solid var(--border); padding: 7px 12px 7px 0; text-align: left; vertical-align: top; }
73
- th { font-weight: 600; color: var(--muted); }
74
- li:has(> input[type=checkbox]) { list-style: none; margin-left: -1.4em; }
75
- li > input[type=checkbox] { margin-right: 8px; }
134
+ a {
135
+ color: var(--accent);
136
+ text-decoration-thickness: 1px;
137
+ text-underline-offset: 3px;
138
+ text-decoration-color: color-mix(in srgb, var(--accent) var(--tint-strong), transparent);
139
+ }
140
+ a:hover {
141
+ text-decoration-color: currentColor;
142
+ }
143
+ h1,
144
+ h2,
145
+ h3,
146
+ h4 {
147
+ font-family: var(--serif);
148
+ font-weight: 500;
149
+ line-height: 1.2;
150
+ letter-spacing: -0.01em;
151
+ text-wrap: balance;
152
+ }
153
+ h1 {
154
+ font-size: 2.9rem;
155
+ line-height: 1.08;
156
+ margin: 0 0 var(--rhythm);
157
+ letter-spacing: -0.022em;
158
+ }
159
+ h2 {
160
+ font-size: 1.62rem;
161
+ margin: 4.6em 0 1.5em;
162
+ }
163
+ h3 {
164
+ font-size: 1.2rem;
165
+ margin: calc(var(--rhythm) * 3) 0 var(--rhythm);
166
+ }
167
+ #wb-main > h3 {
168
+ font-style: italic;
169
+ } /* section headings only; card titles stay upright */
170
+ h4 {
171
+ font: var(--weight-strong) var(--ui-tiny)/var(--ui-line-height) var(--sans);
172
+ text-transform: uppercase;
173
+ letter-spacing: 0.09em;
174
+ color: var(--muted);
175
+ margin: 3em 0 var(--rhythm);
176
+ }
177
+ p,
178
+ ul,
179
+ ol,
180
+ blockquote,
181
+ pre,
182
+ table {
183
+ margin: 0 0 calc(var(--rhythm) * 2);
184
+ }
185
+ p {
186
+ margin-bottom: calc(var(--rhythm) * 2);
187
+ }
188
+ p {
189
+ text-wrap: pretty;
190
+ hyphens: auto;
191
+ }
192
+ ul,
193
+ ol {
194
+ padding-left: 1.4em;
195
+ }
196
+ li::marker {
197
+ color: var(--muted);
198
+ }
199
+ li + li {
200
+ margin-top: 0.8em;
201
+ }
202
+ li > p {
203
+ margin-bottom: 0.8em;
204
+ }
205
+ strong {
206
+ font-weight: 650;
207
+ }
208
+ img,
209
+ video {
210
+ max-width: 100%;
211
+ height: auto;
212
+ border-radius: var(--radius-sm);
213
+ }
214
+ figure {
215
+ margin: calc(var(--rhythm) * 3) 0;
216
+ }
217
+ figcaption {
218
+ font: italic var(--ui-text)/var(--ui-line-height) var(--serif);
219
+ color: var(--muted);
220
+ margin-top: 0.7em;
221
+ }
222
+ code {
223
+ font: 0.82em/var(--ui-line-height) var(--mono);
224
+ background: var(--code-bg);
225
+ padding: 0.12em 0.35em;
226
+ border-radius: var(--radius-sm);
227
+ }
228
+ pre {
229
+ margin: 3em 0;
230
+ background: var(--code-bg);
231
+ padding: var(--space-xl) var(--space-2xl);
232
+ border-radius: var(--radius);
233
+ overflow-x: auto;
234
+ font-size: var(--ui-text);
235
+ line-height: 1.55;
236
+ }
237
+ pre code {
238
+ background: none;
239
+ padding: 0;
240
+ font-size: var(--ui-small);
241
+ }
242
+ table {
243
+ margin: 3em 0;
244
+ border-collapse: collapse;
245
+ display: block;
246
+ overflow-x: auto;
247
+ max-width: 100%;
248
+ font: var(--ui-text)/var(--ui-line-height) var(--sans);
249
+ }
250
+ th,
251
+ td {
252
+ border-bottom: var(--hairline) solid var(--border);
253
+ padding: var(--space-sm) var(--space-xl) var(--space-sm) 0;
254
+ text-align: left;
255
+ vertical-align: top;
256
+ }
257
+ th {
258
+ font-weight: var(--weight-strong);
259
+ color: var(--muted);
260
+ }
261
+ li:has(> input[type='checkbox']) {
262
+ list-style: none;
263
+ margin-left: -1.4em;
264
+ }
265
+ li > input[type='checkbox'] {
266
+ margin-right: var(--space-md);
267
+ }
76
268
 
77
269
  /* standfirst: the paragraph right under the title introduces the piece */
78
270
  #wb-main > h1 + p {
79
- font-size: 1.24em; line-height: 1.5; color: color-mix(in srgb, var(--text) 72%, var(--bg));
80
- margin-bottom: 3.6em; padding-bottom: 2.6em; border-bottom: 1px solid var(--border);
271
+ font-size: 1.24em;
272
+ line-height: var(--ui-line-height);
273
+ color: color-mix(in srgb, var(--text) 72%, var(--bg));
274
+ margin-bottom: calc(var(--rhythm) * 3);
275
+ padding-bottom: 2.6em;
276
+ border-bottom: var(--hairline) solid var(--border);
81
277
  }
82
278
  /* pull quote */
83
279
  blockquote {
84
- margin: 3.4em 0; padding: 0 0 0 1em; border-left: 2px solid var(--text);
85
- font-size: 1.24em; line-height: 1.45; font-style: italic; color: var(--text);
280
+ margin: calc(var(--rhythm) * 3) 0;
281
+ padding: 0 0 0 1em;
282
+ border-left: 2px solid var(--text);
283
+ font-size: 1.24em;
284
+ line-height: var(--ui-line-height);
285
+ font-style: italic;
286
+ color: var(--text);
287
+ }
288
+ blockquote > :last-child {
289
+ margin-bottom: 0;
86
290
  }
87
- blockquote > :last-child { margin-bottom: 0; }
88
291
  /* a section break: an asterism instead of a rule */
89
- hr { border: 0; margin: 4.6em 0; text-align: center; height: auto; }
90
- hr::after { content: "⁂"; font-size: 1.1em; color: var(--muted); letter-spacing: .3em; }
292
+ hr {
293
+ border: 0;
294
+ margin: 4.6em 0;
295
+ text-align: center;
296
+ height: auto;
297
+ }
298
+ hr::after {
299
+ content: '⁂';
300
+ font-size: 1.1em;
301
+ color: var(--muted);
302
+ letter-spacing: 0.3em;
303
+ }
91
304
 
92
305
  /* section numbers hanging in the margin: 1, 1.1, 1.1.1, in italic oldstyle figures. Only the
93
306
  page's own headings (direct children of main), so headings inside cards stay unnumbered. The
94
307
  number is an inline-block pulled into the margin, so it shares the heading's baseline. */
95
- #wb-main { counter-reset: h2; }
96
- #wb-main > h2 { counter-increment: h2; counter-reset: h3; }
97
- #wb-main > h3 { counter-increment: h3; counter-reset: h4; }
98
- #wb-main > h4 { counter-increment: h4; }
308
+ #wb-main {
309
+ counter-reset: h2;
310
+ }
311
+ #wb-main > h2 {
312
+ counter-increment: h2;
313
+ counter-reset: h3;
314
+ }
315
+ #wb-main > h3 {
316
+ counter-increment: h3;
317
+ counter-reset: h4;
318
+ }
319
+ #wb-main > h4 {
320
+ counter-increment: h4;
321
+ }
99
322
  #wb-main > :is(h2, h3, h4)::before {
100
- display: inline-block; box-sizing: content-box; width: 64px; margin-left: -86px; margin-right: 22px; text-align: right;
101
- font-family: var(--serif); font-style: italic; font-weight: 400; font-variant-numeric: oldstyle-nums tabular-nums;
102
- color: var(--muted); letter-spacing: 0; text-transform: none; white-space: nowrap;
323
+ display: inline-block;
324
+ box-sizing: content-box;
325
+ width: 64px;
326
+ margin-left: -86px;
327
+ margin-right: var(--space-3xl);
328
+ text-align: right;
329
+ font-family: var(--serif);
330
+ font-style: italic;
331
+ font-weight: 400;
332
+ font-variant-numeric: oldstyle-nums tabular-nums;
333
+ color: var(--muted);
334
+ letter-spacing: 0;
335
+ text-transform: none;
336
+ white-space: nowrap;
337
+ }
338
+ #wb-main > h2::before {
339
+ content: counter(h2);
340
+ font-size: 0.82em;
341
+ }
342
+ #wb-main > h3::before {
343
+ content: counter(h2) '.' counter(h3);
344
+ font-size: 0.88em;
345
+ }
346
+ #wb-main > h4::before {
347
+ content: counter(h2) '.' counter(h3) '.' counter(h4);
348
+ font-size: 1.3em;
103
349
  }
104
- #wb-main > h2::before { content: counter(h2); font-size: .82em; }
105
- #wb-main > h3::before { content: counter(h2) "." counter(h3); font-size: .88em; }
106
- #wb-main > h4::before { content: counter(h2) "." counter(h3) "." counter(h4); font-size: 1.3em; }
107
350
  /* no margin to hang them in: set the number in front of the heading, and indent less */
108
351
  @media (max-width: 860px) {
109
- main { --indent: 0px; }
110
- #wb-main > :is(h2, h3, h4)::before { width: auto; margin-left: 0; margin-right: .6em; text-align: left; }
352
+ main {
353
+ --indent: 0px;
354
+ }
355
+ #wb-main > :is(h2, h3, h4)::before {
356
+ width: auto;
357
+ margin-left: 0;
358
+ margin-right: 0.6em;
359
+ text-align: left;
360
+ }
111
361
  }
112
362
 
113
363
  /* a <details>: a quiet, collapsible section rather than a box */
114
- details { margin: 3.2em 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
115
- details + details { margin-top: -3.2em; border-top: 0; }
364
+ details {
365
+ margin: 3.2em 0;
366
+ border-top: var(--hairline) solid var(--border);
367
+ border-bottom: var(--hairline) solid var(--border);
368
+ }
369
+ details + details {
370
+ margin-top: -3.2em;
371
+ border-top: 0;
372
+ }
116
373
  details > summary {
117
- cursor: pointer; list-style: none; padding: .5em 0; font: 500 .95rem/1.4 var(--sans); color: var(--text);
118
- display: flex; gap: .6em; align-items: baseline;
119
- }
120
- details > summary::-webkit-details-marker { display: none; }
121
- details > summary::before { content: "+"; font: 400 1.1em/1 var(--mono); color: var(--muted); width: .8em; flex: none; }
122
- details[open] > summary::before { content: "−"; }
123
- details > summary:hover { color: var(--accent); }
124
- details > :not(summary) { margin-left: 1.4em; }
125
- details[open] > :last-child { margin-bottom: 2em; }
374
+ cursor: pointer;
375
+ list-style: none;
376
+ padding: 0.5em 0;
377
+ font: 500 var(--ui-text)/var(--ui-line-height) var(--sans);
378
+ color: var(--text);
379
+ display: flex;
380
+ gap: 0.6em;
381
+ align-items: baseline;
382
+ }
383
+ details > summary::-webkit-details-marker {
384
+ display: none;
385
+ }
386
+ details > summary::before {
387
+ content: '+';
388
+ font: 400 1.1em/1 var(--mono);
389
+ color: var(--muted);
390
+ width: 0.8em;
391
+ flex: none;
392
+ }
393
+ details[open] > summary::before {
394
+ content: '−';
395
+ }
396
+ details > summary:hover {
397
+ color: var(--accent);
398
+ }
399
+ details > :not(summary) {
400
+ margin-left: var(--rhythm);
401
+ }
402
+ details[open] > :last-child {
403
+ margin-bottom: 2em;
404
+ }
126
405
  /* an open details' summary stays at the top while its content is read, under the header and the
127
406
  summaries of the details around it (sticky.ts says how far down) */
128
- #wb-main details[open] > summary { position: sticky; top: var(--wb-sticky-top, 0px); z-index: var(--wb-sticky-z, 3); background: var(--bg); }
407
+ #wb-main details[open] > summary {
408
+ position: sticky;
409
+ top: var(--wb-sticky-top, 0px);
410
+ z-index: var(--wb-sticky-z, 3);
411
+ background: var(--bg);
412
+ }
129
413
 
130
414
  /* figures: an image alone in its paragraph, an HTML <figure>, or anything with .wb-figure (blocks
131
415
  opt in) may run wider than the text, up to --figure, centred on the column. Images keep their
132
416
  natural size within that. */
133
417
  #wb-main > :is(figure, .wb-figure, p:has(> img:only-child), p:has(> a:only-child > img:only-child)) {
134
- width: min(var(--figure), 100vw - 32px); position: relative; left: 50%; transform: translateX(-50%);
135
- margin-left: 0; margin-right: 0; text-align: center;
418
+ width: min(var(--figure), 100vw - 32px);
419
+ position: relative;
420
+ left: 50%;
421
+ transform: translateX(-50%);
422
+ margin-left: 0;
423
+ margin-right: 0;
424
+ text-align: center;
425
+ }
426
+ #wb-main > p:has(> img:only-child),
427
+ #wb-main > p:has(> a:only-child > img:only-child) {
428
+ margin-top: calc(var(--rhythm) * 3);
429
+ margin-bottom: calc(var(--rhythm) * 3);
430
+ }
431
+ #wb-main > :is(figure, .wb-figure) figcaption {
432
+ text-align: center;
136
433
  }
137
- #wb-main > p:has(> img:only-child), #wb-main > p:has(> a:only-child > img:only-child) { margin-top: 3.6em; margin-bottom: 3.6em; }
138
- #wb-main > :is(figure, .wb-figure) figcaption { text-align: center; }
139
434
 
140
435
  /* blocks that may run wider than the text column (blocks opt in with .wb-wide) */
141
436
  /* positioned with left + transform, not margins, so a block's own margin rules can't undo it */
142
- .wb-wide { width: min(var(--wide), 100vw - 32px); position: relative; left: 50%; transform: translateX(-50%); }
437
+ .wb-wide {
438
+ width: min(var(--wide), 100vw - 32px);
439
+ position: relative;
440
+ left: 50%;
441
+ transform: translateX(-50%);
442
+ }
143
443
 
144
444
  /* frame */
145
445
  .wb-nav {
146
- position: sticky; top: 0; z-index: 5; display: flex; gap: 14px; align-items: center; justify-content: space-between;
147
- padding: 10px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
148
- font: .8rem/1.4 var(--sans); color: var(--muted);
446
+ position: sticky;
447
+ top: 0;
448
+ z-index: var(--layer-aside);
449
+ display: flex;
450
+ gap: var(--space-xl);
451
+ align-items: center;
452
+ justify-content: space-between;
453
+ padding: var(--space-lg) var(--space-2xl);
454
+ background: color-mix(in srgb, var(--bg) 88%, transparent);
455
+ backdrop-filter: blur(10px);
456
+ font: var(--ui-small)/var(--ui-line-height) var(--sans);
457
+ color: var(--muted);
458
+ }
459
+ .wb-nav > span:first-child {
460
+ flex: 1;
461
+ min-width: 0;
462
+ overflow: hidden;
463
+ text-overflow: ellipsis;
464
+ white-space: nowrap;
465
+ }
466
+ .wb-nav a {
467
+ color: var(--muted);
468
+ text-decoration: none;
469
+ }
470
+ .wb-nav a:hover {
471
+ color: var(--text);
149
472
  }
150
- .wb-nav > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
151
- .wb-nav a { color: var(--muted); text-decoration: none; }
152
- .wb-nav a:hover { color: var(--text); }
153
473
  /* live.ts: a ring while not connected, grey while live with no agent listening, green with one */
154
- .wb-live { width: 8px; height: 8px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid var(--muted); background: none; flex: none; }
155
- [data-wb-live] .wb-live { border-color: var(--muted); background: var(--muted); }
156
- [data-wb-live] .wb-live[data-agent] { border-color: var(--ok); background: var(--ok); }
474
+ .wb-live {
475
+ width: 8px;
476
+ height: 8px;
477
+ box-sizing: border-box;
478
+ border-radius: 50%;
479
+ border: 1.5px solid var(--muted);
480
+ background: none;
481
+ flex: none;
482
+ }
483
+ [data-wb-live] .wb-live {
484
+ border-color: var(--muted);
485
+ background: var(--muted);
486
+ }
487
+ [data-wb-live] .wb-live[data-agent] {
488
+ border-color: var(--ok);
489
+ background: var(--ok);
490
+ }
157
491
  .wb-theme {
158
- font: inherit; color: var(--muted); background: none; border: 1px solid var(--border); border-radius: 99px;
159
- height: 24px; box-sizing: border-box; padding: 0 7px; cursor: pointer; display: inline-flex; align-items: center; flex: none;
492
+ font: inherit;
493
+ color: var(--muted);
494
+ background: none;
495
+ border: var(--hairline) solid var(--border);
496
+ border-radius: var(--radius-pill);
497
+ height: 24px;
498
+ box-sizing: border-box;
499
+ padding: 0 var(--space-sm);
500
+ cursor: pointer;
501
+ display: inline-flex;
502
+ align-items: center;
503
+ flex: none;
504
+ }
505
+ .wb-theme:hover {
506
+ color: var(--text);
507
+ border-color: var(--muted);
160
508
  }
161
- .wb-theme:hover { color: var(--text); border-color: var(--muted); }
162
509
  /* what waits for the reader on other pages (elsewhere.ts): a menu of them */
163
- .wb-elsewhere { position: relative; flex: none; }
164
- .wb-elsewhere[hidden], .wb-elsewhere-list[hidden] { display: none; }
510
+ .wb-elsewhere {
511
+ position: relative;
512
+ flex: none;
513
+ }
514
+ .wb-elsewhere[hidden],
515
+ .wb-elsewhere-list[hidden] {
516
+ display: none;
517
+ }
165
518
  .wb-awaiting {
166
- font: inherit; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent);
167
- border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 99px; height: 24px; box-sizing: border-box; padding: 0 9px; cursor: pointer;
168
- display: inline-flex; align-items: center; gap: 5px;
519
+ font: inherit;
520
+ font-weight: var(--weight-strong);
521
+ color: var(--accent);
522
+ background: color-mix(in srgb, var(--accent) var(--tint-soft), transparent);
523
+ border: var(--hairline) solid color-mix(in srgb, var(--accent) var(--tint-strong), transparent);
524
+ border-radius: var(--radius-pill);
525
+ height: 24px;
526
+ box-sizing: border-box;
527
+ padding: 0 var(--space-md);
528
+ cursor: pointer;
529
+ display: inline-flex;
530
+ align-items: center;
531
+ gap: var(--space-xs);
532
+ }
533
+ .wb-awaiting svg {
534
+ flex: none;
535
+ }
536
+ .wb-index .wb-awaiting {
537
+ vertical-align: 1px;
538
+ margin-left: var(--space-xs);
539
+ font: var(--weight-strong) var(--ui-small)/var(--ui-line-height) var(--sans);
540
+ text-decoration: none;
541
+ }
542
+ .wb-awaiting:hover {
543
+ background: color-mix(in srgb, var(--accent) var(--tint-soft), transparent);
169
544
  }
170
- .wb-awaiting svg { flex: none; }
171
- .wb-index .wb-awaiting { vertical-align: 1px; margin-left: 4px; font: 600 .8rem/1.4 var(--sans); text-decoration: none; }
172
- .wb-awaiting:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
173
545
  .wb-elsewhere-list {
174
- position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: 4px; list-style: none; min-width: 200px; max-width: min(360px, 100vw - 32px);
175
- background: var(--bg); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 28px rgb(0 0 0 / .16);
176
- }
177
- .wb-nav .wb-elsewhere-list a { display: block; padding: 6px 10px; border-radius: 5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
178
- .wb-nav .wb-elsewhere-list a:hover, .wb-nav .wb-elsewhere-list a:focus-visible { background: color-mix(in srgb, var(--accent) 12%, transparent); }
179
- .wb-meta { color: var(--muted); font: .8rem/1.5 var(--sans); }
180
- .wb-index { padding: 0; }
181
- .wb-index li { list-style: none; padding: 12px 0; border-bottom: 1px solid var(--border); }
182
- .wb-index .wb-meta { display: block; }
183
- .wb-error { color: var(--bad); background: color-mix(in srgb, var(--bad) 7%, var(--bg)); white-space: pre-wrap; font: .8rem/1.5 var(--mono); }
184
- .wb-unknown > .wb-label { color: var(--muted); }
185
- .wb-island { display: block; }
186
- span.wb-island { display: inline; }
546
+ position: absolute;
547
+ right: 0;
548
+ top: calc(100% + 6px);
549
+ margin: 0;
550
+ padding: var(--space-xs);
551
+ list-style: none;
552
+ min-width: 200px;
553
+ max-width: min(360px, 100vw - 32px);
554
+ background: var(--bg);
555
+ border: var(--hairline) solid var(--border);
556
+ border-radius: var(--radius);
557
+ box-shadow: var(--shadow-pop);
558
+ }
559
+ .wb-nav .wb-elsewhere-list a {
560
+ display: block;
561
+ padding: var(--space-sm) var(--space-lg);
562
+ border-radius: var(--radius-sm);
563
+ color: var(--text);
564
+ overflow: hidden;
565
+ text-overflow: ellipsis;
566
+ white-space: nowrap;
567
+ }
568
+ .wb-nav .wb-elsewhere-list a:hover,
569
+ .wb-nav .wb-elsewhere-list a:focus-visible {
570
+ background: color-mix(in srgb, var(--accent) var(--tint-soft), transparent);
571
+ }
572
+ .wb-meta {
573
+ color: var(--muted);
574
+ font: var(--ui-small)/var(--ui-line-height) var(--sans);
575
+ }
576
+ .wb-index {
577
+ padding: 0;
578
+ }
579
+ .wb-index li {
580
+ list-style: none;
581
+ padding: var(--space-xl) 0;
582
+ border-bottom: var(--hairline) solid var(--border);
583
+ }
584
+ .wb-index .wb-meta {
585
+ display: block;
586
+ }
587
+ .wb-error {
588
+ color: var(--bad);
589
+ background: color-mix(in srgb, var(--bad) var(--tint-faint), var(--bg));
590
+ white-space: pre-wrap;
591
+ font: var(--ui-small)/var(--ui-line-height) var(--mono);
592
+ }
593
+ .wb-unknown > .wb-label {
594
+ color: var(--muted);
595
+ }
596
+ .wb-island {
597
+ display: block;
598
+ }
599
+ span.wb-island {
600
+ display: inline;
601
+ }
187
602
 
188
603
  /* plain named forms: the only engine-level interaction */
189
- input:not([type=checkbox], [type=radio], [type=range]), textarea, select {
190
- font: .95rem/1.45 var(--sans); color: inherit; background: var(--surface); border: 1px solid var(--border);
191
- border-radius: 6px; padding: 8px 10px; max-width: 100%;
604
+ input:not([type='checkbox'], [type='radio'], [type='range']),
605
+ textarea,
606
+ select {
607
+ font: var(--ui-text)/var(--ui-line-height) var(--sans);
608
+ color: inherit;
609
+ background: var(--surface);
610
+ border: var(--hairline) solid var(--border);
611
+ border-radius: var(--radius-sm);
612
+ padding: var(--space-md) var(--space-lg);
613
+ max-width: 100%;
614
+ }
615
+ input:focus,
616
+ textarea:focus,
617
+ select:focus {
618
+ outline: 2px solid color-mix(in srgb, var(--accent) var(--tint-strong), transparent);
619
+ outline-offset: 0;
620
+ border-color: var(--accent);
621
+ }
622
+ input[type='checkbox'],
623
+ input[type='radio'] {
624
+ accent-color: var(--accent);
192
625
  }
193
- input:focus, textarea:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 0; border-color: var(--accent); }
194
- input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
195
626
  button {
196
- font: 500 .85rem/1.3 var(--sans); padding: 7px 14px; border-radius: 6px; cursor: pointer;
197
- border: 1px solid var(--border); background: var(--surface); color: var(--text);
627
+ font: 500 var(--ui-small)/1.3 var(--sans);
628
+ padding: var(--space-sm) var(--space-xl);
629
+ border-radius: var(--radius-sm);
630
+ cursor: pointer;
631
+ border: var(--hairline) solid var(--border);
632
+ background: var(--surface);
633
+ color: var(--text);
634
+ }
635
+ button:hover {
636
+ border-color: var(--muted);
198
637
  }
199
- button:hover { border-color: var(--muted); }
200
638
 
201
639
  /* new content since the reader last saw the page */
202
- #wb-main > * { scroll-margin-top: 72px; }
640
+ #wb-main > * {
641
+ scroll-margin-top: 72px;
642
+ }
203
643
  /* a 3px bar left of the block, drawn as two shadows (red, with the page's colour over all but its
204
644
  last 3px), not as ::before or ::after: blocks use those themselves (a heading's number, a folded
205
645
  form's lines), and a bar laid over them squeezed their text into its width */
206
- .wb-new { --wb-new-at: 14px; box-shadow: calc(3px - var(--wb-new-at)) 0 0 var(--bg), calc(0px - var(--wb-new-at)) 0 0 var(--bad); transition: box-shadow 1.2s ease; }
207
- .wb-wide.wb-new { --wb-new-at: 10px; }
208
- .wb-new.wb-new-seen { box-shadow: calc(3px - var(--wb-new-at)) 0 0 var(--bg), calc(0px - var(--wb-new-at)) 0 0 transparent; transition-delay: 1s; }
646
+ .wb-new {
647
+ --wb-new-at: 14px;
648
+ box-shadow:
649
+ calc(3px - var(--wb-new-at)) 0 0 var(--bg),
650
+ calc(0px - var(--wb-new-at)) 0 0 var(--bad);
651
+ transition: box-shadow 1.2s ease;
652
+ }
653
+ .wb-wide.wb-new {
654
+ --wb-new-at: 10px;
655
+ }
656
+ .wb-new.wb-new-seen {
657
+ box-shadow:
658
+ calc(3px - var(--wb-new-at)) 0 0 var(--bg),
659
+ calc(0px - var(--wb-new-at)) 0 0 transparent;
660
+ transition-delay: 1s;
661
+ }
209
662
 
210
- form.wb-form[data-wb-folded] { padding: 1em 0; gap: 0; }
663
+ form.wb-form[data-wb-folded] {
664
+ padding: 1em 0;
665
+ gap: 0;
666
+ }
211
667
  /* named forms: the core marks where each stands (data-wb-open, -pending, -decided); this is how that looks */
212
- form[data-wb-state=sending] { opacity: .7; }
668
+ form[data-wb-state='sending'] {
669
+ opacity: 0.7;
670
+ }
213
671
  /* sending: the form's buttons can't send twice */
214
- form[data-wb-state=sending] button { pointer-events: none; cursor: progress; }
672
+ form[data-wb-state='sending'] button {
673
+ pointer-events: none;
674
+ cursor: progress;
675
+ }
215
676
  /* just sent: a short green flash, and a line saying what happened, for a few seconds */
216
- @keyframes wb-sent { from { background-color: color-mix(in srgb, var(--ok) 22%, transparent); } to { background-color: transparent; } }
217
- form[data-wb-just-sent] { animation: wb-sent 1.4s ease-out; }
218
- form.wb-form[data-wb-state=failed]::before { content: "couldn't send it: try again"; display: block; margin-bottom: 8px; color: var(--bad); font: 600 .75rem/1.4 var(--sans); }
219
- form[data-wb-sent]:not(.wb-form)::after { content: "✓ sent " attr(data-wb-sent); display: block; margin-top: 6px; color: var(--ok); font: .8rem var(--sans); }
220
- form[data-wb-state=failed]:not(.wb-form)::after { content: "failed to send"; color: var(--bad); }
221
-
677
+ @keyframes wb-sent {
678
+ from {
679
+ background-color: color-mix(in srgb, var(--ok) 22%, transparent);
680
+ }
681
+ to {
682
+ background-color: transparent;
683
+ }
684
+ }
685
+ form[data-wb-just-sent] {
686
+ animation: wb-sent 1.4s ease-out;
687
+ }
688
+ form.wb-form[data-wb-state='failed']::before {
689
+ content: "couldn't send it: try again";
690
+ display: block;
691
+ margin-bottom: var(--space-md);
692
+ color: var(--bad);
693
+ font: var(--weight-strong) var(--ui-tiny)/var(--ui-line-height) var(--sans);
694
+ }
695
+ form[data-wb-sent]:not(.wb-form)::after {
696
+ content: '✓ sent ' attr(data-wb-sent);
697
+ display: block;
698
+ margin-top: var(--space-sm);
699
+ color: var(--ok);
700
+ font: var(--ui-small) var(--sans);
701
+ }
702
+ form[data-wb-state='failed']:not(.wb-form)::after {
703
+ content: 'failed to send';
704
+ color: var(--bad);
705
+ }
222
706
 
223
707
  /* a question the reader hasn't answered, or one the agent asks again: outlined, without a label of
224
708
  its own (one laid into the form landed on its content in some layouts; the corner counts them) */
225
- form[data-wb-open] { outline: 2px solid var(--accent); outline-offset: 10px; border-radius: 2px; }
709
+ form[data-wb-open] {
710
+ outline: 2px solid var(--accent);
711
+ outline-offset: 10px;
712
+ border-radius: var(--radius-sm);
713
+ }
226
714
  /* the outline sets it off: the form's rules above and below (its borders, which the outline would
227
715
  enclose) step aside meanwhile */
228
- form.wb-form[data-wb-open] { border-top-color: transparent; border-bottom-color: transparent; }
229
- form[data-wb-pending]::before { content: "sent · waiting for the agent to pick it up"; display: block; margin-bottom: 8px; color: var(--muted); font: .75rem/1.4 var(--sans); }
230
- form[data-wb-pending][data-wb-just-sent]::before { content: "✓ sent · waiting for the agent to pick it up"; color: var(--ok); font-weight: 600; }
716
+ form.wb-form[data-wb-open] {
717
+ border-top-color: transparent;
718
+ border-bottom-color: transparent;
719
+ }
720
+ form[data-wb-pending]::before {
721
+ content: 'sent · waiting for the agent to pick it up';
722
+ display: block;
723
+ margin-bottom: var(--space-md);
724
+ color: var(--muted);
725
+ font: var(--ui-tiny)/var(--ui-line-height) var(--sans);
726
+ }
727
+ form[data-wb-pending][data-wb-just-sent]::before {
728
+ content: '✓ sent · waiting for the agent to pick it up';
729
+ color: var(--ok);
730
+ font-weight: var(--weight-strong);
731
+ }
231
732
 
232
733
  /* decided: the agent picked up the latest answer; the form folds into one line quoting it */
233
- form[data-wb-folded] { cursor: pointer; }
234
- form[data-wb-folded] > :not([data-block=chat-thread]) { display: none !important; }
734
+ form[data-wb-folded] {
735
+ cursor: pointer;
736
+ }
737
+ form[data-wb-folded] > :not([data-block='chat-thread'], .wb-folded) {
738
+ display: none !important;
739
+ }
740
+ /* the chat of a decided form folds into "💬 n messages", until opened (waiting.ts) */
741
+ form[data-wb-folded]:not([data-wb-chat-open]) > [data-block='chat-thread'] {
742
+ display: none !important;
743
+ }
235
744
  /* the question's chat stays with it, under the answer and the line that reopens it */
236
- form[data-wb-folded] > [data-block=chat-thread] { order: 1; margin-top: 14px; cursor: auto; }
237
- form[data-wb-folded]::before { content: "✓ " attr(data-wb-outcome); display: block; white-space: pre-line; color: var(--text); font: .95rem/1.5 var(--sans); }
238
- form[data-wb-folded]::after { content: "decided · click to change the answer"; display: block; margin-top: 4px; color: var(--muted); font: .75rem/1.4 var(--sans); }
239
- form[data-wb-folded][data-wb-just-sent]::after { content: "✓ sent · the agent has it"; color: var(--ok); font-weight: 600; }
240
- form[data-wb-folded]:hover::after { color: var(--accent); }
745
+ form[data-wb-folded] > [data-block='chat-thread'] {
746
+ order: 1;
747
+ margin-top: var(--space-xl);
748
+ cursor: auto;
749
+ }
750
+ /* a decided form as a card: what was chosen, what was written, decided · change, its chat folded */
751
+ .wb-folded {
752
+ display: grid;
753
+ gap: var(--space-sm);
754
+ font: var(--ui-text)/var(--ui-line-height) var(--sans);
755
+ }
756
+ .wb-folded-head {
757
+ display: flex;
758
+ gap: var(--space-xl);
759
+ align-items: baseline;
760
+ justify-content: space-between;
761
+ }
762
+ .wb-folded-choice {
763
+ font-weight: var(--weight-strong);
764
+ color: var(--text);
765
+ }
766
+ .wb-folded-change {
767
+ flex: none;
768
+ color: var(--muted);
769
+ font-size: var(--ui-tiny);
770
+ }
771
+ form[data-wb-folded]:hover .wb-folded-change {
772
+ color: var(--accent);
773
+ }
774
+ form[data-wb-just-sent] .wb-folded-change {
775
+ color: var(--ok);
776
+ font-weight: var(--weight-strong);
777
+ }
778
+ .wb-folded-text {
779
+ color: var(--muted);
780
+ white-space: pre-line;
781
+ display: -webkit-box;
782
+ -webkit-line-clamp: 3;
783
+ -webkit-box-orient: vertical;
784
+ overflow: hidden;
785
+ }
786
+ .wb-folded-text[hidden],
787
+ .wb-folded-chat[hidden],
788
+ .wb-folded-choices[hidden] {
789
+ display: none;
790
+ }
791
+ /* each answer on its own line, under the button it was sent with */
792
+ .wb-folded-choices {
793
+ list-style: none;
794
+ margin: 0;
795
+ padding: 0 0 0 1.2em;
796
+ display: grid;
797
+ gap: var(--space-2xs);
798
+ color: var(--text);
799
+ }
800
+ .wb-folded-choices li {
801
+ position: relative;
802
+ margin: 0;
803
+ padding: 0;
804
+ line-height: var(--ui-line-height);
805
+ }
806
+ .wb-folded-choices li::before {
807
+ content: '·';
808
+ position: absolute;
809
+ left: -0.8em;
810
+ color: var(--muted);
811
+ }
812
+ .wb-folded-chat {
813
+ justify-self: start;
814
+ margin-top: var(--space-2xs);
815
+ padding: var(--space-2xs) var(--space-lg);
816
+ border-radius: var(--radius-pill);
817
+ border: var(--hairline) solid var(--border);
818
+ background: none;
819
+ color: var(--muted);
820
+ font: var(--ui-small)/var(--ui-line-height) var(--sans);
821
+ cursor: pointer;
822
+ }
823
+ .wb-folded-chat:hover {
824
+ color: var(--text);
825
+ border-color: var(--muted);
826
+ }
241
827
 
242
828
  /* the line above the page: what waits for the reader, what nobody listens for, what is answered */
243
- .wb-summary[hidden] { display: none; }
244
- .wb-summary button { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
245
- .wb-summary button:hover { color: var(--text); }
246
- .wb-summary button:is([data-state=open], [data-state=messages]) { color: var(--accent); font-weight: 600; }
247
- .wb-summary { max-width: calc(var(--measure) + var(--indent, 34px) + 32px); margin: 0 auto; padding: 96px 16px 0; box-sizing: border-box; color: var(--muted); font: .8rem/1.5 var(--sans); }
829
+ .wb-summary[hidden] {
830
+ display: none;
831
+ }
832
+ .wb-summary button {
833
+ all: unset;
834
+ cursor: pointer;
835
+ text-decoration: underline;
836
+ text-underline-offset: 3px;
837
+ text-decoration-color: color-mix(in srgb, currentColor var(--tint-strong), transparent);
838
+ }
839
+ .wb-summary button:hover {
840
+ color: var(--text);
841
+ }
842
+ .wb-summary button:is([data-state='open'], [data-state='messages']) {
843
+ color: var(--accent);
844
+ font-weight: var(--weight-strong);
845
+ }
846
+ .wb-summary {
847
+ max-width: calc(var(--measure) + var(--indent, 34px) + 32px);
848
+ margin: 0 auto;
849
+ padding: 96px var(--space-2xl) 0;
850
+ box-sizing: border-box;
851
+ color: var(--muted);
852
+ font: var(--ui-small)/var(--ui-line-height) var(--sans);
853
+ }
248
854
  /* the summary takes the space above the title that the page would otherwise start with */
249
- .wb-summary:not([hidden]) + main { padding-top: 20px; }
855
+ .wb-summary:not([hidden]) + main {
856
+ padding-top: var(--space-2xl);
857
+ }
250
858
 
251
859
  @media (max-width: 600px) {
252
- body { font-size: 18px; }
253
- main { padding-top: 32px; }
254
- h1 { font-size: 2.2rem; }
255
- .wb-new { --wb-new-at: 9px; }
860
+ body {
861
+ font-size: 18px;
862
+ }
863
+ main {
864
+ padding-top: 32px;
865
+ }
866
+ h1 {
867
+ font-size: 2.2rem;
868
+ }
869
+ .wb-new {
870
+ --wb-new-at: 9px;
871
+ }
256
872
  }
257
873
 
258
874
  /* repository views: folder listings and code */
259
- .wb-files { padding: 0; font: .92rem/1.5 var(--mono); }
260
- .wb-files li { list-style: none; margin: 0; padding: 5px 0; border-bottom: 1px solid var(--border); }
261
- .wb-files li + li { margin-top: 0; }
262
- .wb-files a { text-decoration: none; }
263
- .wb-code-title { font: 500 1.1rem/1.4 var(--mono); letter-spacing: 0; }
264
- .wb-code.wb-wide { margin-top: 0; }
875
+ .wb-files {
876
+ padding: 0;
877
+ font: var(--ui-text)/var(--ui-line-height) var(--mono);
878
+ }
879
+ .wb-files li {
880
+ list-style: none;
881
+ margin: 0;
882
+ padding: var(--space-xs) 0;
883
+ border-bottom: var(--hairline) solid var(--border);
884
+ }
885
+ .wb-files li + li {
886
+ margin-top: 0;
887
+ }
888
+ .wb-files a {
889
+ text-decoration: none;
890
+ }
891
+ .wb-code-title {
892
+ font: 500 1.1rem/var(--ui-line-height) var(--mono);
893
+ letter-spacing: 0;
894
+ }
895
+ .wb-code.wb-wide {
896
+ margin-top: 0;
897
+ }
265
898
 
266
- .wb-code > pre { margin-top: 0; }
899
+ .wb-code > pre {
900
+ margin-top: 0;
901
+ }
267
902
 
268
903
  /* the overview's list of the project's documents */
269
- .wb-documents { margin-top: 2.5em; }
270
- .wb-documents h2 { font-size: 1.1rem; margin: 0; }
904
+ .wb-documents {
905
+ margin-top: calc(var(--rhythm) * 2);
906
+ }
907
+ .wb-documents h2 {
908
+ font-size: 1.1rem;
909
+ margin: 0;
910
+ }
271
911
  /* a list's heading with its sort control at the right (sort.ts) */
272
- .wb-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: .4em; }
273
- .wb-sort { font: .8rem/1.4 var(--sans); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
912
+ .wb-list-head {
913
+ display: flex;
914
+ align-items: baseline;
915
+ justify-content: space-between;
916
+ gap: var(--space-xl);
917
+ margin-bottom: 0.4em;
918
+ }
919
+ .wb-sort {
920
+ font: var(--ui-small)/var(--ui-line-height) var(--sans);
921
+ color: var(--muted);
922
+ display: inline-flex;
923
+ align-items: center;
924
+ gap: var(--space-sm);
925
+ }
274
926
  /* in the look of the header's buttons: a rounded outline, its own arrow */
275
927
  .wb-sort select {
276
- appearance: none; -webkit-appearance: none; font: inherit; color: var(--muted); cursor: pointer;
277
- height: 24px; box-sizing: border-box; padding: 0 24px 0 10px; border: 1px solid var(--border); border-radius: 99px;
928
+ appearance: none;
929
+ -webkit-appearance: none;
930
+ font: inherit;
931
+ color: var(--muted);
932
+ cursor: pointer;
933
+ height: 24px;
934
+ box-sizing: border-box;
935
+ padding: 0 var(--space-3xl) 0 var(--space-lg);
936
+ border: var(--hairline) solid var(--border);
937
+ border-radius: var(--radius-pill);
278
938
  background: var(--bg) no-repeat right 9px center / 8px 5px;
279
939
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 5'%3E%3Cpath d='M.5.5 4 4 7.5.5' fill='none' stroke='%23888' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
280
940
  }
281
- .wb-sort select:hover { color: var(--text); border-color: var(--muted); }
282
- .wb-sort select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
941
+ .wb-sort select:hover {
942
+ color: var(--text);
943
+ border-color: var(--muted);
944
+ }
945
+ .wb-sort select:focus-visible {
946
+ outline: 2px solid var(--accent);
947
+ outline-offset: 1px;
948
+ }
949
+
950
+ /* where the browser lets the list of a select be styled (customizable select; Chromium, not WebKit
951
+ yet), it opens in the page's look instead of the system's: elsewhere the system's list shows */
952
+ @supports (appearance: base-select) {
953
+ .wb-sort select,
954
+ .wb-form select {
955
+ appearance: base-select;
956
+ }
957
+ .wb-sort select::picker-icon {
958
+ display: none;
959
+ }
960
+ :is(.wb-sort, .wb-form) select::picker(select) {
961
+ appearance: base-select;
962
+ margin-top: var(--space-xs);
963
+ padding: var(--space-xs);
964
+ min-width: anchor-size(width);
965
+ background: var(--bg);
966
+ color: var(--text);
967
+ border: var(--hairline) solid var(--border);
968
+ border-radius: var(--radius);
969
+ box-shadow: var(--shadow-pop);
970
+ }
971
+ :is(.wb-sort, .wb-form) select option {
972
+ padding: var(--space-sm) var(--space-lg);
973
+ border-radius: var(--radius-sm);
974
+ font: var(--ui-small)/var(--ui-line-height) var(--sans);
975
+ color: var(--text);
976
+ }
977
+ :is(.wb-sort, .wb-form) select option:hover,
978
+ :is(.wb-sort, .wb-form) select option:focus-visible {
979
+ background: color-mix(in srgb, var(--accent) var(--tint-soft), transparent);
980
+ outline: none;
981
+ }
982
+ :is(.wb-sort, .wb-form) select option:checked {
983
+ font-weight: var(--weight-strong);
984
+ color: var(--accent);
985
+ }
986
+ :is(.wb-sort, .wb-form) select option::checkmark {
987
+ display: none;
988
+ }
989
+ }
283
990
 
284
991
  /* threads whose form is no longer on the page (orphans.ts): read-only, after the content */
285
- .wb-orphans { --indent: 34px; max-width: calc(var(--measure) + var(--indent) + 32px); margin: 0 auto; padding: 0 16px 220px; box-sizing: border-box; font: .92rem/1.45 var(--sans); }
286
- .wb-orphans > * { margin-left: var(--indent); }
287
- .wb-orphans > h2 { margin-left: 0; padding-top: 2em; }
992
+ .wb-orphans {
993
+ --indent: 34px;
994
+ max-width: calc(var(--measure) + var(--indent) + 32px);
995
+ margin: 0 auto;
996
+ padding: 0 var(--space-2xl) 220px;
997
+ box-sizing: border-box;
998
+ font: var(--ui-text)/var(--ui-line-height) var(--sans);
999
+ }
1000
+ .wb-orphans > * {
1001
+ margin-left: var(--indent);
1002
+ }
1003
+ .wb-orphans > h2 {
1004
+ margin-left: 0;
1005
+ padding-top: 2em;
1006
+ }
288
1007
  /* the page's own bottom space moves below the list */
289
- main:has(+ .wb-orphans:not([hidden])) { padding-bottom: 0; }
290
- @media (max-width: 860px) { .wb-orphans { --indent: 0px; } }
291
- .wb-orphans[hidden] { display: none; }
292
- .wb-orphans h2 { font-size: 1rem; margin: 0 0 .8em; color: var(--muted); }
293
- .wb-orphans h3 { font: 600 .8rem/1.4 var(--mono, monospace); margin: 1.2em 0 .5em; }
294
- .wb-orphan { display: flex; flex-direction: column; gap: 8px; }
295
- .wb-orphan-message { display: flex; flex-direction: column; gap: 2px; max-width: 85%; align-self: flex-start; }
296
- .wb-orphan-message[data-from=you] { align-self: flex-end; align-items: flex-end; }
297
- .wb-orphan-who { font: 600 .68rem/1.3 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
298
- .wb-orphan-message[data-from=agent] .wb-orphan-who { color: var(--accent); }
299
- .wb-orphan-text { white-space: pre-wrap; padding: 6px 10px; border-radius: 12px; background: var(--tint, var(--surface)); border: 1px solid var(--border); }
1008
+ main:has(+ .wb-orphans:not([hidden])) {
1009
+ padding-bottom: 0;
1010
+ }
1011
+ @media (max-width: 860px) {
1012
+ .wb-orphans {
1013
+ --indent: 0px;
1014
+ }
1015
+ }
1016
+ .wb-orphans[hidden] {
1017
+ display: none;
1018
+ }
1019
+ .wb-orphans h2 {
1020
+ font-size: 1rem;
1021
+ margin: 0 0 0.8em;
1022
+ color: var(--muted);
1023
+ }
1024
+ .wb-orphans h3 {
1025
+ font: var(--weight-strong) var(--ui-small)/var(--ui-line-height) var(--mono, monospace);
1026
+ margin: var(--rhythm) 0 0.5em;
1027
+ }
1028
+ .wb-orphan {
1029
+ display: flex;
1030
+ flex-direction: column;
1031
+ gap: var(--space-md);
1032
+ }
1033
+ .wb-orphan-message {
1034
+ display: flex;
1035
+ flex-direction: column;
1036
+ gap: var(--space-2xs);
1037
+ max-width: 85%;
1038
+ align-self: flex-start;
1039
+ }
1040
+ .wb-orphan-message[data-from='you'] {
1041
+ align-self: flex-end;
1042
+ align-items: flex-end;
1043
+ }
1044
+ .wb-orphan-who {
1045
+ font: var(--weight-strong) var(--ui-tiny)/1.3 var(--sans);
1046
+ letter-spacing: var(--caps-spacing);
1047
+ text-transform: uppercase;
1048
+ color: var(--muted);
1049
+ }
1050
+ .wb-orphan-message[data-from='agent'] .wb-orphan-who {
1051
+ color: var(--accent);
1052
+ }
1053
+ .wb-orphan-text {
1054
+ white-space: pre-wrap;
1055
+ padding: var(--space-sm) var(--space-lg);
1056
+ border-radius: var(--radius-lg);
1057
+ background: var(--tint, var(--surface));
1058
+ border: var(--hairline) solid var(--border);
1059
+ }
1060
+
1061
+ /* a window around a block (src/pages/window.ts, window.ts here): a header like a browser window's,
1062
+ with its label, open on its own, fill the window */
1063
+ .wb-window {
1064
+ margin: 1.6em 0;
1065
+ border: var(--hairline) solid var(--border);
1066
+ border-radius: var(--radius, 6px);
1067
+ overflow: hidden;
1068
+ background: var(--bg);
1069
+ }
1070
+ .wb-window-body > :first-child {
1071
+ margin-top: 0;
1072
+ }
1073
+ .wb-window-body > :last-child {
1074
+ margin-bottom: 0;
1075
+ }
1076
+ .wb-window-body:not(.wb-iframe-frame) {
1077
+ padding: var(--space-xl) var(--space-xl);
1078
+ overflow: auto;
1079
+ }
1080
+ .wb-window-body img,
1081
+ .wb-window-body video {
1082
+ display: block;
1083
+ max-width: 100%;
1084
+ height: auto;
1085
+ margin: 0 auto;
1086
+ }
1087
+ .wb-window-bar {
1088
+ display: flex;
1089
+ align-items: center;
1090
+ gap: var(--space-xs);
1091
+ padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-xl);
1092
+ min-height: 32px;
1093
+ box-sizing: border-box;
1094
+ border-bottom: var(--hairline) solid var(--border);
1095
+ background: var(--tint, var(--bg));
1096
+ font: var(--ui-small)/var(--ui-line-height) var(--sans);
1097
+ color: var(--muted);
1098
+ }
1099
+ .wb-window-name {
1100
+ flex: 1;
1101
+ min-width: 0;
1102
+ display: flex;
1103
+ gap: var(--space-md);
1104
+ align-items: baseline;
1105
+ overflow: hidden;
1106
+ white-space: nowrap;
1107
+ }
1108
+ .wb-window-title {
1109
+ color: var(--text);
1110
+ font-weight: var(--weight-strong);
1111
+ overflow: hidden;
1112
+ text-overflow: ellipsis;
1113
+ }
1114
+ .wb-window-address {
1115
+ font-family: var(--mono, monospace);
1116
+ font-size: var(--ui-tiny);
1117
+ overflow: hidden;
1118
+ text-overflow: ellipsis;
1119
+ }
1120
+ .wb-window-button {
1121
+ flex: none;
1122
+ display: inline-grid;
1123
+ place-items: center;
1124
+ width: 26px;
1125
+ height: 24px;
1126
+ padding: 0;
1127
+ border: 0;
1128
+ border-radius: var(--radius-sm);
1129
+ background: none;
1130
+ color: var(--muted);
1131
+ cursor: pointer;
1132
+ }
1133
+ .wb-window-button:hover {
1134
+ background: color-mix(in srgb, var(--text) var(--tint-faint), transparent);
1135
+ color: var(--text);
1136
+ }
1137
+ .wb-window-restore,
1138
+ .wb-window[data-wb-maximized] .wb-window-max {
1139
+ display: none;
1140
+ }
1141
+ .wb-window[data-wb-maximized] .wb-window-restore,
1142
+ .wb-window-max {
1143
+ display: contents;
1144
+ }
1145
+ /* filling the window, above the page and its header; the terminal drawer stays below it. The
1146
+ margin is !important: the page indents its blocks with a rule more specific than any here */
1147
+ .wb-window[data-wb-maximized] {
1148
+ position: fixed;
1149
+ inset: 0 0 var(--wb-inset-bottom, 0px) 0;
1150
+ z-index: var(--layer-window);
1151
+ margin: 0 !important;
1152
+ border-radius: 0;
1153
+ border: 0;
1154
+ display: flex;
1155
+ flex-direction: column;
1156
+ width: auto;
1157
+ left: 0;
1158
+ transform: none;
1159
+ }
1160
+ .wb-window[data-wb-maximized] .wb-window-body {
1161
+ flex: 1;
1162
+ height: auto !important;
1163
+ resize: none;
1164
+ min-height: 0;
1165
+ }
1166
+ /* what fills it, as large as fits */
1167
+ .wb-window[data-wb-maximized]
1168
+ .wb-window-body:has(> p:only-child > :is(img, video):only-child, > :is(img, video):only-child) {
1169
+ display: grid;
1170
+ place-items: center;
1171
+ }
1172
+ .wb-window[data-wb-maximized] .wb-window-body :is(img, video) {
1173
+ max-height: calc(100vh - 80px - var(--wb-inset-bottom, 0px));
1174
+ width: auto;
1175
+ }
1176
+ :root[data-wb-window-maximized] {
1177
+ overflow: hidden;
1178
+ }