@fusion.dev/helix-docs 0.132.0 → 0.133.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/content/graphs.mdx +19 -0
- package/content/metrics.mdx +26 -26
- package/content/theme-builder.mdx +5 -0
- package/content/theming.mdx +33 -0
- package/dist/sources.generated.js +83 -26
- package/package.json +9 -9
package/content/graphs.mdx
CHANGED
|
@@ -206,6 +206,25 @@ frame.addEventListener('helix-graph-filter', (event) => {
|
|
|
206
206
|
The legend is drawn where the notes have two groups or more. On a frame
|
|
207
207
|
narrower than 40rem it is one row, which scrolls.
|
|
208
208
|
|
|
209
|
+
## Find groups in the links
|
|
210
|
+
|
|
211
|
+
Notes without a `group` are drawn in one color. Where your data has no groups,
|
|
212
|
+
`groupByCommunity` finds them in the links: notes that link mostly to each other
|
|
213
|
+
become one group, named after its most linked note. Hand its result to the frame,
|
|
214
|
+
and the drawing colors the groups and the legend names them:
|
|
215
|
+
|
|
216
|
+
```ts
|
|
217
|
+
import { groupByCommunity } from '@fusion.dev/helix-graph'
|
|
218
|
+
|
|
219
|
+
frame.nodes = groupByCommunity(notes, links)
|
|
220
|
+
frame.links = links
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
A note that has a `group` keeps it. Communities of fewer than three notes share
|
|
224
|
+
one group, named `Other`. Set `fewest` and `rest` to change either. The same
|
|
225
|
+
notes and links give the same groups every time. On 20,000 notes it takes about
|
|
226
|
+
65 milliseconds.
|
|
227
|
+
|
|
209
228
|
## Select a note
|
|
210
229
|
|
|
211
230
|
Pressing a note selects it, and pressing where no note is clears the selection.
|
package/content/metrics.mdx
CHANGED
|
@@ -58,10 +58,10 @@ either barrel. The per-component tables show what your page pays.
|
|
|
58
58
|
| Package | Raw | Gzip | Brotli | |
|
|
59
59
|
|---|---|---|---|---|
|
|
60
60
|
| `@fusion.dev/helix-core` | 183,735 | 58,230 | 49,473 | The element base class, mixins, decorators, and floating positioning. |
|
|
61
|
-
| `@fusion.dev/helix-headless` | 746,
|
|
61
|
+
| `@fusion.dev/helix-headless` | 746,304 | 193,314 | 149,776 | Every headless family. The barrel entry includes all of them. |
|
|
62
62
|
| `@fusion.dev/helix-icons` | 55,565 | 17,727 | 14,864 | The whole glyph set. |
|
|
63
63
|
| `@fusion.dev/helix-theme` | 3,626 | 1,597 | 1,384 | The derivation engine. Most sites run it at build time, and a theme switcher runs it in the browser. |
|
|
64
|
-
| `@fusion.dev/helix` | 1,291,
|
|
64
|
+
| `@fusion.dev/helix` | 1,291,679 | 302,007 | 220,657 | Every styled family. |
|
|
65
65
|
| `lit` | 15,394 | 6,118 | 5,460 | Lit itself, listed so you can subtract it from every row above. |
|
|
66
66
|
|
|
67
67
|
## Stylesheets
|
|
@@ -84,11 +84,11 @@ shows the whole cost of using the base layer on its own.
|
|
|
84
84
|
|
|
85
85
|
**Most of your first component is the shared runtime.** The median styled family is 21,372 bytes gzipped alone, and it adds 2,254 to a page that already has Helix. The shared runtime is 89 percent of the first component, and the component itself is 11 percent. Ten typical components cost the first number once, plus nine of the added number. The two columns in the tables below let you work that out for your own components.
|
|
86
86
|
|
|
87
|
-
Across the 104 styled components, the smallest is `code` at 9,928 bytes gzipped alone, and the largest is `data-table` at 63,813. Every family together is
|
|
87
|
+
Across the 104 styled components, the smallest is `code` at 9,928 bytes gzipped alone, and the largest is `data-table` at 63,813. Every family together is 302,007.
|
|
88
88
|
|
|
89
|
-
No family imports a barrel. The `barrels` rule in `fusion workspace` enforces that. `@fusion.dev/helix-headless` marks every module in `dist` as having side effects, which is true of a file that calls `customElements.define`. A bundler can remove none of it. One `import { HelixHeadlessButton } from '@fusion.dev/helix-headless'` costs 193,
|
|
89
|
+
No family imports a barrel. The `barrels` rule in `fusion workspace` enforces that. `@fusion.dev/helix-headless` marks every module in `dist` as having side effects, which is true of a file that calls `customElements.define`. A bundler can remove none of it. One `import { HelixHeadlessButton } from '@fusion.dev/helix-headless'` costs 193,314 bytes gzipped, whatever else the page imports. That is 9 times the median family above. All 104 styled families import the headless family they extend directly. The rule checks the shape of the import, so it applies to any package that sets `sideEffects`, whatever its name.
|
|
90
90
|
|
|
91
|
-
The headless tier never had the problem, so it serves as the control. `@fusion.dev/helix-core` is `sideEffects: false`, and the median headless family is 21,
|
|
91
|
+
The headless tier never had the problem, so it serves as the control. `@fusion.dev/helix-core` is `sideEffects: false`, and the median headless family is 21,942 bytes gzipped alone.
|
|
92
92
|
|
|
93
93
|
## Compared with other systems
|
|
94
94
|
|
|
@@ -100,7 +100,7 @@ The table has no whole-library row. That row would compare how many components e
|
|
|
100
100
|
|
|
101
101
|
| Component | System | Raw | Gzip | Brotli |
|
|
102
102
|
|---|---|---|---|---|
|
|
103
|
-
| `button` | **Helix** | 43,
|
|
103
|
+
| `button` | **Helix** | 43,982 | 12,620 | 11,082 |
|
|
104
104
|
| | Carbon | 133,058 | 20,959 | 17,685 |
|
|
105
105
|
| | Material Web | 47,060 | 14,173 | 12,591 |
|
|
106
106
|
| | Shoelace | 62,628 | 18,287 | 15,805 |
|
|
@@ -189,7 +189,7 @@ Structure, accessibility, state, and form participation. It has no presentation
|
|
|
189
189
|
| `bar-chart` | 81,076 | 26,555 | 23,488 | 12,644 | 3,701 | 3,035 |
|
|
190
190
|
| `blockquote` | 33,053 | 10,175 | 8,938 | 774 | 176 | 128 |
|
|
191
191
|
| `breadcrumbs` | 88,957 | 28,651 | 23,520 | 1,965 | 451 | 379 |
|
|
192
|
-
| `button` | 37,
|
|
192
|
+
| `button` | 37,725 | 11,440 | 10,034 | 3,194 | 814 | 619 |
|
|
193
193
|
| `button-group` | 32,909 | 10,061 | 8,843 | 661 | 137 | 34 |
|
|
194
194
|
| `callout` | 88,077 | 28,508 | 23,396 | 914 | 233 | 168 |
|
|
195
195
|
| `canvas` | 94,126 | 27,730 | 24,309 | 50,034 | 14,930 | 12,613 |
|
|
@@ -199,12 +199,12 @@ Structure, accessibility, state, and form participation. It has no presentation
|
|
|
199
199
|
| `checkbox` | 42,424 | 12,472 | 10,962 | 2,703 | 748 | 514 |
|
|
200
200
|
| `checkbox-group` | 45,548 | 13,159 | 11,549 | 5,307 | 1,316 | 1,017 |
|
|
201
201
|
| `code` | 31,528 | 9,644 | 8,470 | 451 | 77 | -1 |
|
|
202
|
-
| `code-block` | 133,
|
|
203
|
-
| `color-input` | 151,
|
|
204
|
-
| `color-picker` | 118,
|
|
202
|
+
| `code-block` | 133,832 | 43,676 | 36,796 | 17,317 | 4,502 | 3,798 |
|
|
203
|
+
| `color-input` | 151,907 | 47,747 | 40,241 | 25,819 | 6,027 | 5,016 |
|
|
204
|
+
| `color-picker` | 118,278 | 37,129 | 30,542 | 19,642 | 4,706 | 4,026 |
|
|
205
205
|
| `combobox` | 146,722 | 46,415 | 38,946 | 21,177 | 5,239 | 4,380 |
|
|
206
206
|
| `command` | 116,641 | 36,394 | 29,750 | 18,065 | 4,588 | 3,719 |
|
|
207
|
-
| `copy-button` | 128,
|
|
207
|
+
| `copy-button` | 128,413 | 42,045 | 35,300 | 11,895 | 2,938 | 2,421 |
|
|
208
208
|
| `data-table` | 186,894 | 56,878 | 48,021 | 57,295 | 14,485 | 11,997 |
|
|
209
209
|
| `date-input` | 144,981 | 45,912 | 38,562 | 19,209 | 4,845 | 4,000 |
|
|
210
210
|
| `date-picker` | 100,136 | 32,351 | 26,467 | 9,900 | 2,714 | 2,336 |
|
|
@@ -221,7 +221,7 @@ Structure, accessibility, state, and form participation. It has no presentation
|
|
|
221
221
|
| `graph` | 114,708 | 36,466 | 29,953 | 11,479 | 3,233 | 2,708 |
|
|
222
222
|
| `heatmap` | 78,430 | 25,372 | 22,403 | 10,872 | 2,982 | 2,366 |
|
|
223
223
|
| `icon` | 87,644 | 28,324 | 23,220 | 1,018 | 245 | 126 |
|
|
224
|
-
| `icon-button` | 38,
|
|
224
|
+
| `icon-button` | 38,124 | 11,469 | 10,075 | 3,593 | 854 | 670 |
|
|
225
225
|
| `image` | 35,082 | 10,613 | 9,334 | 3,156 | 809 | 657 |
|
|
226
226
|
| `input` | 99,537 | 31,813 | 25,941 | 4,745 | 1,288 | 938 |
|
|
227
227
|
| `kbd` | 34,863 | 10,848 | 9,529 | 2,976 | 922 | 855 |
|
|
@@ -238,7 +238,7 @@ Structure, accessibility, state, and form participation. It has no presentation
|
|
|
238
238
|
| `navigation` | 34,843 | 10,709 | 9,395 | 1,361 | 301 | 226 |
|
|
239
239
|
| `notifications` | 104,181 | 33,078 | 26,996 | 11,383 | 2,637 | 2,263 |
|
|
240
240
|
| `number-input` | 102,465 | 32,630 | 26,674 | 7,670 | 2,010 | 1,515 |
|
|
241
|
-
| `object-inspector` | 141,
|
|
241
|
+
| `object-inspector` | 141,531 | 46,276 | 38,905 | 19,579 | 5,236 | 4,304 |
|
|
242
242
|
| `option` | 35,204 | 10,629 | 9,352 | 2,958 | 646 | 543 |
|
|
243
243
|
| `outline` | 38,267 | 11,902 | 10,469 | 4,628 | 1,320 | 1,075 |
|
|
244
244
|
| `pagination` | 150,818 | 47,121 | 39,598 | 27,821 | 6,525 | 5,229 |
|
|
@@ -259,7 +259,7 @@ Structure, accessibility, state, and form participation. It has no presentation
|
|
|
259
259
|
| `speed-dial` | 118,638 | 39,539 | 33,189 | 3,743 | 915 | 719 |
|
|
260
260
|
| `splitter` | 42,714 | 12,692 | 11,214 | 10,282 | 2,596 | 2,223 |
|
|
261
261
|
| `stat` | 33,397 | 10,120 | 8,906 | 1,148 | 193 | 173 |
|
|
262
|
-
| `steps` | 97,
|
|
262
|
+
| `steps` | 97,217 | 31,122 | 25,454 | 6,294 | 1,492 | 1,245 |
|
|
263
263
|
| `switch` | 41,773 | 12,384 | 10,883 | 1,650 | 497 | 338 |
|
|
264
264
|
| `table` | 99,327 | 32,297 | 26,296 | 10,158 | 2,798 | 2,311 |
|
|
265
265
|
| `tabs` | 41,013 | 12,219 | 10,747 | 3,925 | 834 | 594 |
|
|
@@ -272,7 +272,7 @@ Structure, accessibility, state, and form participation. It has no presentation
|
|
|
272
272
|
| `toggle` | 45,957 | 13,403 | 11,795 | 3,342 | 816 | 583 |
|
|
273
273
|
| `toolbar` | 35,003 | 10,814 | 9,482 | 2,624 | 717 | 552 |
|
|
274
274
|
| `tooltip` | 64,751 | 21,220 | 18,782 | 6,369 | 1,715 | 1,350 |
|
|
275
|
-
| `tour` | 70,
|
|
275
|
+
| `tour` | 70,633 | 22,663 | 19,991 | 11,095 | 2,741 | 2,236 |
|
|
276
276
|
| `tree` | 99,021 | 31,924 | 25,969 | 7,223 | 1,882 | 1,539 |
|
|
277
277
|
| `trend` | 87,684 | 28,370 | 23,291 | 1,056 | 289 | 243 |
|
|
278
278
|
| `video` | 155,346 | 48,784 | 41,231 | 32,520 | 7,642 | 6,463 |
|
|
@@ -295,7 +295,7 @@ The headless tier plus presentation. `bun add @fusion.dev/helix` installs this t
|
|
|
295
295
|
| `bar-chart` | 93,880 | 29,107 | 25,756 | 25,425 | 6,313 | 5,329 |
|
|
296
296
|
| `blockquote` | 34,209 | 10,468 | 9,196 | 1,914 | 467 | 315 |
|
|
297
297
|
| `breadcrumbs` | 92,523 | 29,466 | 24,178 | 5,518 | 1,244 | 1,129 |
|
|
298
|
-
| `button` | 43,
|
|
298
|
+
| `button` | 43,982 | 12,620 | 11,082 | 9,433 | 1,995 | 1,639 |
|
|
299
299
|
| `button-group` | 34,585 | 10,450 | 9,174 | 2,320 | 528 | 375 |
|
|
300
300
|
| `callout` | 90,078 | 29,063 | 23,826 | 2,899 | 756 | 687 |
|
|
301
301
|
| `canvas` | 114,431 | 31,475 | 27,500 | 70,328 | 18,720 | 15,791 |
|
|
@@ -305,12 +305,12 @@ The headless tier plus presentation. `bun add @fusion.dev/helix` installs this t
|
|
|
305
305
|
| `checkbox` | 49,050 | 13,927 | 12,237 | 9,313 | 2,208 | 1,876 |
|
|
306
306
|
| `checkbox-group` | 47,829 | 13,751 | 12,052 | 7,574 | 1,903 | 1,474 |
|
|
307
307
|
| `code` | 32,605 | 9,928 | 8,729 | 1,511 | 377 | 380 |
|
|
308
|
-
| `code-block` | 150,
|
|
309
|
-
| `color-input` | 185,
|
|
310
|
-
| `color-picker` | 146,
|
|
308
|
+
| `code-block` | 150,282 | 46,558 | 39,136 | 33,746 | 7,230 | 6,118 |
|
|
309
|
+
| `color-input` | 185,752 | 52,943 | 44,844 | 59,644 | 11,374 | 9,743 |
|
|
310
|
+
| `color-picker` | 146,420 | 41,723 | 34,558 | 47,778 | 9,346 | 8,013 |
|
|
311
311
|
| `combobox` | 161,978 | 49,085 | 41,270 | 36,410 | 7,955 | 6,615 |
|
|
312
312
|
| `command` | 127,393 | 38,493 | 31,618 | 28,803 | 6,694 | 5,583 |
|
|
313
|
-
| `copy-button` | 138,
|
|
313
|
+
| `copy-button` | 138,417 | 43,836 | 36,896 | 21,883 | 4,669 | 3,882 |
|
|
314
314
|
| `data-table` | 225,180 | 63,813 | 53,600 | 95,314 | 21,365 | 17,447 |
|
|
315
315
|
| `date-input` | 161,140 | 48,929 | 41,318 | 35,357 | 7,899 | 6,643 |
|
|
316
316
|
| `date-picker` | 105,753 | 33,518 | 27,415 | 15,499 | 3,859 | 3,238 |
|
|
@@ -329,7 +329,7 @@ The headless tier plus presentation. `bun add @fusion.dev/helix` installs this t
|
|
|
329
329
|
| `grid` | 34,559 | 10,478 | 9,220 | 2,667 | 630 | 522 |
|
|
330
330
|
| `heatmap` | 85,228 | 26,779 | 23,661 | 17,648 | 4,434 | 3,682 |
|
|
331
331
|
| `icon` | 88,350 | 28,509 | 23,354 | 1,707 | 422 | 288 |
|
|
332
|
-
| `icon-button` | 44,
|
|
332
|
+
| `icon-button` | 44,139 | 12,487 | 10,941 | 9,594 | 1,856 | 1,555 |
|
|
333
333
|
| `image` | 36,784 | 11,092 | 9,750 | 4,840 | 1,285 | 1,066 |
|
|
334
334
|
| `input` | 105,902 | 33,263 | 27,153 | 11,104 | 2,685 | 2,139 |
|
|
335
335
|
| `kbd` | 36,275 | 11,305 | 9,919 | 4,373 | 1,361 | 1,190 |
|
|
@@ -346,7 +346,7 @@ The headless tier plus presentation. `bun add @fusion.dev/helix` installs this t
|
|
|
346
346
|
| `navigation` | 36,224 | 11,110 | 9,735 | 2,726 | 713 | 628 |
|
|
347
347
|
| `notifications` | 117,292 | 35,506 | 29,125 | 24,486 | 5,059 | 4,265 |
|
|
348
348
|
| `number-input` | 107,345 | 33,815 | 27,626 | 12,539 | 3,150 | 2,570 |
|
|
349
|
-
| `object-inspector` | 155,
|
|
349
|
+
| `object-inspector` | 155,168 | 48,532 | 40,983 | 33,196 | 7,574 | 6,373 |
|
|
350
350
|
| `option` | 38,458 | 11,533 | 10,163 | 6,201 | 1,574 | 1,257 |
|
|
351
351
|
| `orb` | 43,162 | 13,930 | 12,278 | 8,623 | 3,224 | 2,742 |
|
|
352
352
|
| `outline` | 42,007 | 12,688 | 11,173 | 8,351 | 2,127 | 1,739 |
|
|
@@ -369,7 +369,7 @@ The headless tier plus presentation. `bun add @fusion.dev/helix` installs this t
|
|
|
369
369
|
| `speed-dial` | 126,270 | 41,059 | 34,489 | 11,356 | 2,382 | 1,920 |
|
|
370
370
|
| `splitter` | 48,786 | 13,681 | 12,145 | 16,336 | 3,627 | 3,136 |
|
|
371
371
|
| `stat` | 36,822 | 10,836 | 9,555 | 4,565 | 915 | 730 |
|
|
372
|
-
| `steps` |
|
|
372
|
+
| `steps` | 111,022 | 33,661 | 27,603 | 20,088 | 3,981 | 3,398 |
|
|
373
373
|
| `switch` | 46,139 | 13,459 | 11,778 | 6,001 | 1,568 | 1,279 |
|
|
374
374
|
| `table` | 104,921 | 33,482 | 27,341 | 15,746 | 3,981 | 3,421 |
|
|
375
375
|
| `tabs` | 47,249 | 13,492 | 11,867 | 10,154 | 2,155 | 1,927 |
|
|
@@ -383,7 +383,7 @@ The headless tier plus presentation. `bun add @fusion.dev/helix` installs this t
|
|
|
383
383
|
| `toggle` | 51,152 | 14,607 | 12,844 | 8,525 | 2,066 | 1,725 |
|
|
384
384
|
| `toolbar` | 36,295 | 11,108 | 9,755 | 3,899 | 1,022 | 824 |
|
|
385
385
|
| `tooltip` | 67,829 | 21,974 | 19,470 | 9,429 | 2,451 | 2,085 |
|
|
386
|
-
| `tour` | 80,
|
|
386
|
+
| `tour` | 80,348 | 24,304 | 21,526 | 20,792 | 4,456 | 3,750 |
|
|
387
387
|
| `tree` | 104,871 | 33,337 | 27,201 | 13,069 | 3,306 | 2,728 |
|
|
388
388
|
| `trend` | 90,903 | 29,129 | 23,898 | 4,271 | 985 | 862 |
|
|
389
389
|
| `video` | 174,764 | 52,259 | 44,284 | 51,918 | 11,165 | 9,570 |
|
|
@@ -401,11 +401,11 @@ stripped column shows the bytes we removed.
|
|
|
401
401
|
| Package | Unpacked | Files | Source maps stripped | Runtime dependencies |
|
|
402
402
|
|---|---|---|---|---|
|
|
403
403
|
| `@fusion.dev/helix-core` | 1,192,742 | 171 | 267,144 | `@floating-ui/dom`, `@fusion.dev/helix-icons` |
|
|
404
|
-
| `@fusion.dev/helix-headless` | 13,
|
|
404
|
+
| `@fusion.dev/helix-headless` | 13,515,038 | 510 | 1,077,677 | `@fusion.dev/helix-core`, `@fusion.dev/helix-icons`, `uqr` |
|
|
405
405
|
| `@fusion.dev/helix-icons` | 150,162 | 21 | 50,346 | `svgo` |
|
|
406
406
|
| `@fusion.dev/helix-styles` | 102,155 | 6 | 0 | none |
|
|
407
407
|
| `@fusion.dev/helix-theme` | 514,288 | 8 | 5,300 | none |
|
|
408
|
-
| `@fusion.dev/helix` | 14,
|
|
408
|
+
| `@fusion.dev/helix` | 14,628,121 | 876 | 373,810 | `@fusion.dev/helix-core`, `@fusion.dev/helix-headless`, `@fusion.dev/helix-styles` |
|
|
409
409
|
|
|
410
410
|
## Not measured yet
|
|
411
411
|
|
|
@@ -39,6 +39,11 @@ or black, the grays take its tint, and every text color is solved against it. A
|
|
|
39
39
|
page that no text color can reach the contrast target on is left out of the
|
|
40
40
|
preview, and a caption under the fields says so.
|
|
41
41
|
|
|
42
|
+
**Color the figures band** gives one section of the Marketing site layout a
|
|
43
|
+
color of its own, as its own theme. The band is dark or light by whichever text
|
|
44
|
+
reads better on it, and its block follows the page's in the generated
|
|
45
|
+
stylesheet. See [Color one section](./theming#color-one-section).
|
|
46
|
+
|
|
42
47
|
## The audit
|
|
43
48
|
|
|
44
49
|
The audit lists every color pair Helix computed. Each pair shows its ratio,
|
package/content/theming.mdx
CHANGED
|
@@ -110,6 +110,39 @@ console.log(css[':root'])
|
|
|
110
110
|
A value that is not a color and still changes with the mode, such as the edge
|
|
111
111
|
of a floating surface, is set by rules after the block, one for each mode.
|
|
112
112
|
|
|
113
|
+
## Color one section
|
|
114
|
+
|
|
115
|
+
A section in a color of its own, such as a deep teal band on a cream page, is a
|
|
116
|
+
theme of its own. Derive it from the same intent, with the section's color as
|
|
117
|
+
its page, under a selector for the section:
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
const band = engine.derive(
|
|
121
|
+
{ ...intent, background: { dark: '#0b2a33' }, scheme: 'dark' },
|
|
122
|
+
['[data-band]'],
|
|
123
|
+
)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Choose the scheme the color needs: `dark` for a color light text reads on, and
|
|
127
|
+
`light` for one dark text reads on. A color no text can reach the contrast
|
|
128
|
+
target on is refused, as a page is.
|
|
129
|
+
|
|
130
|
+
Mark the section so the stylesheet derives its own colors there from the
|
|
131
|
+
section's seeds, in the section's mode, and paint it with its page color:
|
|
132
|
+
|
|
133
|
+
```html
|
|
134
|
+
<section data-band data-color-mode="dark" data-helix-theme>…</section>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
```css
|
|
138
|
+
[data-band] {
|
|
139
|
+
background-color: var(--helix-color-background);
|
|
140
|
+
color: var(--helix-color-foreground);
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Write the section's block after the page's, so it wins inside the section.
|
|
145
|
+
|
|
113
146
|
## Why Helix uses OKLCH
|
|
114
147
|
|
|
115
148
|
Equal numeric steps in sRGB do not look like equal steps. That makes scales and
|
|
@@ -1790,6 +1790,25 @@ frame.addEventListener('helix-graph-filter', (event) => {
|
|
|
1790
1790
|
The legend is drawn where the notes have two groups or more. On a frame
|
|
1791
1791
|
narrower than 40rem it is one row, which scrolls.
|
|
1792
1792
|
|
|
1793
|
+
## Find groups in the links
|
|
1794
|
+
|
|
1795
|
+
Notes without a \`group\` are drawn in one color. Where your data has no groups,
|
|
1796
|
+
\`groupByCommunity\` finds them in the links: notes that link mostly to each other
|
|
1797
|
+
become one group, named after its most linked note. Hand its result to the frame,
|
|
1798
|
+
and the drawing colors the groups and the legend names them:
|
|
1799
|
+
|
|
1800
|
+
\`\`\`ts
|
|
1801
|
+
import { groupByCommunity } from '@fusion.dev/helix-graph'
|
|
1802
|
+
|
|
1803
|
+
frame.nodes = groupByCommunity(notes, links)
|
|
1804
|
+
frame.links = links
|
|
1805
|
+
\`\`\`
|
|
1806
|
+
|
|
1807
|
+
A note that has a \`group\` keeps it. Communities of fewer than three notes share
|
|
1808
|
+
one group, named \`Other\`. Set \`fewest\` and \`rest\` to change either. The same
|
|
1809
|
+
notes and links give the same groups every time. On 20,000 notes it takes about
|
|
1810
|
+
65 milliseconds.
|
|
1811
|
+
|
|
1793
1812
|
## Select a note
|
|
1794
1813
|
|
|
1795
1814
|
Pressing a note selects it, and pressing where no note is clears the selection.
|
|
@@ -3346,10 +3365,10 @@ either barrel. The per-component tables show what your page pays.
|
|
|
3346
3365
|
| Package | Raw | Gzip | Brotli | |
|
|
3347
3366
|
|---|---|---|---|---|
|
|
3348
3367
|
| \`@fusion.dev/helix-core\` | 183,735 | 58,230 | 49,473 | The element base class, mixins, decorators, and floating positioning. |
|
|
3349
|
-
| \`@fusion.dev/helix-headless\` | 746,
|
|
3368
|
+
| \`@fusion.dev/helix-headless\` | 746,304 | 193,314 | 149,776 | Every headless family. The barrel entry includes all of them. |
|
|
3350
3369
|
| \`@fusion.dev/helix-icons\` | 55,565 | 17,727 | 14,864 | The whole glyph set. |
|
|
3351
3370
|
| \`@fusion.dev/helix-theme\` | 3,626 | 1,597 | 1,384 | The derivation engine. Most sites run it at build time, and a theme switcher runs it in the browser. |
|
|
3352
|
-
| \`@fusion.dev/helix\` | 1,291,
|
|
3371
|
+
| \`@fusion.dev/helix\` | 1,291,679 | 302,007 | 220,657 | Every styled family. |
|
|
3353
3372
|
| \`lit\` | 15,394 | 6,118 | 5,460 | Lit itself, listed so you can subtract it from every row above. |
|
|
3354
3373
|
|
|
3355
3374
|
## Stylesheets
|
|
@@ -3372,11 +3391,11 @@ shows the whole cost of using the base layer on its own.
|
|
|
3372
3391
|
|
|
3373
3392
|
**Most of your first component is the shared runtime.** The median styled family is 21,372 bytes gzipped alone, and it adds 2,254 to a page that already has Helix. The shared runtime is 89 percent of the first component, and the component itself is 11 percent. Ten typical components cost the first number once, plus nine of the added number. The two columns in the tables below let you work that out for your own components.
|
|
3374
3393
|
|
|
3375
|
-
Across the 104 styled components, the smallest is \`code\` at 9,928 bytes gzipped alone, and the largest is \`data-table\` at 63,813. Every family together is
|
|
3394
|
+
Across the 104 styled components, the smallest is \`code\` at 9,928 bytes gzipped alone, and the largest is \`data-table\` at 63,813. Every family together is 302,007.
|
|
3376
3395
|
|
|
3377
|
-
No family imports a barrel. The \`barrels\` rule in \`fusion workspace\` enforces that. \`@fusion.dev/helix-headless\` marks every module in \`dist\` as having side effects, which is true of a file that calls \`customElements.define\`. A bundler can remove none of it. One \`import { HelixHeadlessButton } from '@fusion.dev/helix-headless'\` costs 193,
|
|
3396
|
+
No family imports a barrel. The \`barrels\` rule in \`fusion workspace\` enforces that. \`@fusion.dev/helix-headless\` marks every module in \`dist\` as having side effects, which is true of a file that calls \`customElements.define\`. A bundler can remove none of it. One \`import { HelixHeadlessButton } from '@fusion.dev/helix-headless'\` costs 193,314 bytes gzipped, whatever else the page imports. That is 9 times the median family above. All 104 styled families import the headless family they extend directly. The rule checks the shape of the import, so it applies to any package that sets \`sideEffects\`, whatever its name.
|
|
3378
3397
|
|
|
3379
|
-
The headless tier never had the problem, so it serves as the control. \`@fusion.dev/helix-core\` is \`sideEffects: false\`, and the median headless family is 21,
|
|
3398
|
+
The headless tier never had the problem, so it serves as the control. \`@fusion.dev/helix-core\` is \`sideEffects: false\`, and the median headless family is 21,942 bytes gzipped alone.
|
|
3380
3399
|
|
|
3381
3400
|
## Compared with other systems
|
|
3382
3401
|
|
|
@@ -3388,7 +3407,7 @@ The table has no whole-library row. That row would compare how many components e
|
|
|
3388
3407
|
|
|
3389
3408
|
| Component | System | Raw | Gzip | Brotli |
|
|
3390
3409
|
|---|---|---|---|---|
|
|
3391
|
-
| \`button\` | **Helix** | 43,
|
|
3410
|
+
| \`button\` | **Helix** | 43,982 | 12,620 | 11,082 |
|
|
3392
3411
|
| | Carbon | 133,058 | 20,959 | 17,685 |
|
|
3393
3412
|
| | Material Web | 47,060 | 14,173 | 12,591 |
|
|
3394
3413
|
| | Shoelace | 62,628 | 18,287 | 15,805 |
|
|
@@ -3477,7 +3496,7 @@ Structure, accessibility, state, and form participation. It has no presentation
|
|
|
3477
3496
|
| \`bar-chart\` | 81,076 | 26,555 | 23,488 | 12,644 | 3,701 | 3,035 |
|
|
3478
3497
|
| \`blockquote\` | 33,053 | 10,175 | 8,938 | 774 | 176 | 128 |
|
|
3479
3498
|
| \`breadcrumbs\` | 88,957 | 28,651 | 23,520 | 1,965 | 451 | 379 |
|
|
3480
|
-
| \`button\` | 37,
|
|
3499
|
+
| \`button\` | 37,725 | 11,440 | 10,034 | 3,194 | 814 | 619 |
|
|
3481
3500
|
| \`button-group\` | 32,909 | 10,061 | 8,843 | 661 | 137 | 34 |
|
|
3482
3501
|
| \`callout\` | 88,077 | 28,508 | 23,396 | 914 | 233 | 168 |
|
|
3483
3502
|
| \`canvas\` | 94,126 | 27,730 | 24,309 | 50,034 | 14,930 | 12,613 |
|
|
@@ -3487,12 +3506,12 @@ Structure, accessibility, state, and form participation. It has no presentation
|
|
|
3487
3506
|
| \`checkbox\` | 42,424 | 12,472 | 10,962 | 2,703 | 748 | 514 |
|
|
3488
3507
|
| \`checkbox-group\` | 45,548 | 13,159 | 11,549 | 5,307 | 1,316 | 1,017 |
|
|
3489
3508
|
| \`code\` | 31,528 | 9,644 | 8,470 | 451 | 77 | -1 |
|
|
3490
|
-
| \`code-block\` | 133,
|
|
3491
|
-
| \`color-input\` | 151,
|
|
3492
|
-
| \`color-picker\` | 118,
|
|
3509
|
+
| \`code-block\` | 133,832 | 43,676 | 36,796 | 17,317 | 4,502 | 3,798 |
|
|
3510
|
+
| \`color-input\` | 151,907 | 47,747 | 40,241 | 25,819 | 6,027 | 5,016 |
|
|
3511
|
+
| \`color-picker\` | 118,278 | 37,129 | 30,542 | 19,642 | 4,706 | 4,026 |
|
|
3493
3512
|
| \`combobox\` | 146,722 | 46,415 | 38,946 | 21,177 | 5,239 | 4,380 |
|
|
3494
3513
|
| \`command\` | 116,641 | 36,394 | 29,750 | 18,065 | 4,588 | 3,719 |
|
|
3495
|
-
| \`copy-button\` | 128,
|
|
3514
|
+
| \`copy-button\` | 128,413 | 42,045 | 35,300 | 11,895 | 2,938 | 2,421 |
|
|
3496
3515
|
| \`data-table\` | 186,894 | 56,878 | 48,021 | 57,295 | 14,485 | 11,997 |
|
|
3497
3516
|
| \`date-input\` | 144,981 | 45,912 | 38,562 | 19,209 | 4,845 | 4,000 |
|
|
3498
3517
|
| \`date-picker\` | 100,136 | 32,351 | 26,467 | 9,900 | 2,714 | 2,336 |
|
|
@@ -3509,7 +3528,7 @@ Structure, accessibility, state, and form participation. It has no presentation
|
|
|
3509
3528
|
| \`graph\` | 114,708 | 36,466 | 29,953 | 11,479 | 3,233 | 2,708 |
|
|
3510
3529
|
| \`heatmap\` | 78,430 | 25,372 | 22,403 | 10,872 | 2,982 | 2,366 |
|
|
3511
3530
|
| \`icon\` | 87,644 | 28,324 | 23,220 | 1,018 | 245 | 126 |
|
|
3512
|
-
| \`icon-button\` | 38,
|
|
3531
|
+
| \`icon-button\` | 38,124 | 11,469 | 10,075 | 3,593 | 854 | 670 |
|
|
3513
3532
|
| \`image\` | 35,082 | 10,613 | 9,334 | 3,156 | 809 | 657 |
|
|
3514
3533
|
| \`input\` | 99,537 | 31,813 | 25,941 | 4,745 | 1,288 | 938 |
|
|
3515
3534
|
| \`kbd\` | 34,863 | 10,848 | 9,529 | 2,976 | 922 | 855 |
|
|
@@ -3526,7 +3545,7 @@ Structure, accessibility, state, and form participation. It has no presentation
|
|
|
3526
3545
|
| \`navigation\` | 34,843 | 10,709 | 9,395 | 1,361 | 301 | 226 |
|
|
3527
3546
|
| \`notifications\` | 104,181 | 33,078 | 26,996 | 11,383 | 2,637 | 2,263 |
|
|
3528
3547
|
| \`number-input\` | 102,465 | 32,630 | 26,674 | 7,670 | 2,010 | 1,515 |
|
|
3529
|
-
| \`object-inspector\` | 141,
|
|
3548
|
+
| \`object-inspector\` | 141,531 | 46,276 | 38,905 | 19,579 | 5,236 | 4,304 |
|
|
3530
3549
|
| \`option\` | 35,204 | 10,629 | 9,352 | 2,958 | 646 | 543 |
|
|
3531
3550
|
| \`outline\` | 38,267 | 11,902 | 10,469 | 4,628 | 1,320 | 1,075 |
|
|
3532
3551
|
| \`pagination\` | 150,818 | 47,121 | 39,598 | 27,821 | 6,525 | 5,229 |
|
|
@@ -3547,7 +3566,7 @@ Structure, accessibility, state, and form participation. It has no presentation
|
|
|
3547
3566
|
| \`speed-dial\` | 118,638 | 39,539 | 33,189 | 3,743 | 915 | 719 |
|
|
3548
3567
|
| \`splitter\` | 42,714 | 12,692 | 11,214 | 10,282 | 2,596 | 2,223 |
|
|
3549
3568
|
| \`stat\` | 33,397 | 10,120 | 8,906 | 1,148 | 193 | 173 |
|
|
3550
|
-
| \`steps\` | 97,
|
|
3569
|
+
| \`steps\` | 97,217 | 31,122 | 25,454 | 6,294 | 1,492 | 1,245 |
|
|
3551
3570
|
| \`switch\` | 41,773 | 12,384 | 10,883 | 1,650 | 497 | 338 |
|
|
3552
3571
|
| \`table\` | 99,327 | 32,297 | 26,296 | 10,158 | 2,798 | 2,311 |
|
|
3553
3572
|
| \`tabs\` | 41,013 | 12,219 | 10,747 | 3,925 | 834 | 594 |
|
|
@@ -3560,7 +3579,7 @@ Structure, accessibility, state, and form participation. It has no presentation
|
|
|
3560
3579
|
| \`toggle\` | 45,957 | 13,403 | 11,795 | 3,342 | 816 | 583 |
|
|
3561
3580
|
| \`toolbar\` | 35,003 | 10,814 | 9,482 | 2,624 | 717 | 552 |
|
|
3562
3581
|
| \`tooltip\` | 64,751 | 21,220 | 18,782 | 6,369 | 1,715 | 1,350 |
|
|
3563
|
-
| \`tour\` | 70,
|
|
3582
|
+
| \`tour\` | 70,633 | 22,663 | 19,991 | 11,095 | 2,741 | 2,236 |
|
|
3564
3583
|
| \`tree\` | 99,021 | 31,924 | 25,969 | 7,223 | 1,882 | 1,539 |
|
|
3565
3584
|
| \`trend\` | 87,684 | 28,370 | 23,291 | 1,056 | 289 | 243 |
|
|
3566
3585
|
| \`video\` | 155,346 | 48,784 | 41,231 | 32,520 | 7,642 | 6,463 |
|
|
@@ -3583,7 +3602,7 @@ The headless tier plus presentation. \`bun add @fusion.dev/helix\` installs this
|
|
|
3583
3602
|
| \`bar-chart\` | 93,880 | 29,107 | 25,756 | 25,425 | 6,313 | 5,329 |
|
|
3584
3603
|
| \`blockquote\` | 34,209 | 10,468 | 9,196 | 1,914 | 467 | 315 |
|
|
3585
3604
|
| \`breadcrumbs\` | 92,523 | 29,466 | 24,178 | 5,518 | 1,244 | 1,129 |
|
|
3586
|
-
| \`button\` | 43,
|
|
3605
|
+
| \`button\` | 43,982 | 12,620 | 11,082 | 9,433 | 1,995 | 1,639 |
|
|
3587
3606
|
| \`button-group\` | 34,585 | 10,450 | 9,174 | 2,320 | 528 | 375 |
|
|
3588
3607
|
| \`callout\` | 90,078 | 29,063 | 23,826 | 2,899 | 756 | 687 |
|
|
3589
3608
|
| \`canvas\` | 114,431 | 31,475 | 27,500 | 70,328 | 18,720 | 15,791 |
|
|
@@ -3593,12 +3612,12 @@ The headless tier plus presentation. \`bun add @fusion.dev/helix\` installs this
|
|
|
3593
3612
|
| \`checkbox\` | 49,050 | 13,927 | 12,237 | 9,313 | 2,208 | 1,876 |
|
|
3594
3613
|
| \`checkbox-group\` | 47,829 | 13,751 | 12,052 | 7,574 | 1,903 | 1,474 |
|
|
3595
3614
|
| \`code\` | 32,605 | 9,928 | 8,729 | 1,511 | 377 | 380 |
|
|
3596
|
-
| \`code-block\` | 150,
|
|
3597
|
-
| \`color-input\` | 185,
|
|
3598
|
-
| \`color-picker\` | 146,
|
|
3615
|
+
| \`code-block\` | 150,282 | 46,558 | 39,136 | 33,746 | 7,230 | 6,118 |
|
|
3616
|
+
| \`color-input\` | 185,752 | 52,943 | 44,844 | 59,644 | 11,374 | 9,743 |
|
|
3617
|
+
| \`color-picker\` | 146,420 | 41,723 | 34,558 | 47,778 | 9,346 | 8,013 |
|
|
3599
3618
|
| \`combobox\` | 161,978 | 49,085 | 41,270 | 36,410 | 7,955 | 6,615 |
|
|
3600
3619
|
| \`command\` | 127,393 | 38,493 | 31,618 | 28,803 | 6,694 | 5,583 |
|
|
3601
|
-
| \`copy-button\` | 138,
|
|
3620
|
+
| \`copy-button\` | 138,417 | 43,836 | 36,896 | 21,883 | 4,669 | 3,882 |
|
|
3602
3621
|
| \`data-table\` | 225,180 | 63,813 | 53,600 | 95,314 | 21,365 | 17,447 |
|
|
3603
3622
|
| \`date-input\` | 161,140 | 48,929 | 41,318 | 35,357 | 7,899 | 6,643 |
|
|
3604
3623
|
| \`date-picker\` | 105,753 | 33,518 | 27,415 | 15,499 | 3,859 | 3,238 |
|
|
@@ -3617,7 +3636,7 @@ The headless tier plus presentation. \`bun add @fusion.dev/helix\` installs this
|
|
|
3617
3636
|
| \`grid\` | 34,559 | 10,478 | 9,220 | 2,667 | 630 | 522 |
|
|
3618
3637
|
| \`heatmap\` | 85,228 | 26,779 | 23,661 | 17,648 | 4,434 | 3,682 |
|
|
3619
3638
|
| \`icon\` | 88,350 | 28,509 | 23,354 | 1,707 | 422 | 288 |
|
|
3620
|
-
| \`icon-button\` | 44,
|
|
3639
|
+
| \`icon-button\` | 44,139 | 12,487 | 10,941 | 9,594 | 1,856 | 1,555 |
|
|
3621
3640
|
| \`image\` | 36,784 | 11,092 | 9,750 | 4,840 | 1,285 | 1,066 |
|
|
3622
3641
|
| \`input\` | 105,902 | 33,263 | 27,153 | 11,104 | 2,685 | 2,139 |
|
|
3623
3642
|
| \`kbd\` | 36,275 | 11,305 | 9,919 | 4,373 | 1,361 | 1,190 |
|
|
@@ -3634,7 +3653,7 @@ The headless tier plus presentation. \`bun add @fusion.dev/helix\` installs this
|
|
|
3634
3653
|
| \`navigation\` | 36,224 | 11,110 | 9,735 | 2,726 | 713 | 628 |
|
|
3635
3654
|
| \`notifications\` | 117,292 | 35,506 | 29,125 | 24,486 | 5,059 | 4,265 |
|
|
3636
3655
|
| \`number-input\` | 107,345 | 33,815 | 27,626 | 12,539 | 3,150 | 2,570 |
|
|
3637
|
-
| \`object-inspector\` | 155,
|
|
3656
|
+
| \`object-inspector\` | 155,168 | 48,532 | 40,983 | 33,196 | 7,574 | 6,373 |
|
|
3638
3657
|
| \`option\` | 38,458 | 11,533 | 10,163 | 6,201 | 1,574 | 1,257 |
|
|
3639
3658
|
| \`orb\` | 43,162 | 13,930 | 12,278 | 8,623 | 3,224 | 2,742 |
|
|
3640
3659
|
| \`outline\` | 42,007 | 12,688 | 11,173 | 8,351 | 2,127 | 1,739 |
|
|
@@ -3657,7 +3676,7 @@ The headless tier plus presentation. \`bun add @fusion.dev/helix\` installs this
|
|
|
3657
3676
|
| \`speed-dial\` | 126,270 | 41,059 | 34,489 | 11,356 | 2,382 | 1,920 |
|
|
3658
3677
|
| \`splitter\` | 48,786 | 13,681 | 12,145 | 16,336 | 3,627 | 3,136 |
|
|
3659
3678
|
| \`stat\` | 36,822 | 10,836 | 9,555 | 4,565 | 915 | 730 |
|
|
3660
|
-
| \`steps\` |
|
|
3679
|
+
| \`steps\` | 111,022 | 33,661 | 27,603 | 20,088 | 3,981 | 3,398 |
|
|
3661
3680
|
| \`switch\` | 46,139 | 13,459 | 11,778 | 6,001 | 1,568 | 1,279 |
|
|
3662
3681
|
| \`table\` | 104,921 | 33,482 | 27,341 | 15,746 | 3,981 | 3,421 |
|
|
3663
3682
|
| \`tabs\` | 47,249 | 13,492 | 11,867 | 10,154 | 2,155 | 1,927 |
|
|
@@ -3671,7 +3690,7 @@ The headless tier plus presentation. \`bun add @fusion.dev/helix\` installs this
|
|
|
3671
3690
|
| \`toggle\` | 51,152 | 14,607 | 12,844 | 8,525 | 2,066 | 1,725 |
|
|
3672
3691
|
| \`toolbar\` | 36,295 | 11,108 | 9,755 | 3,899 | 1,022 | 824 |
|
|
3673
3692
|
| \`tooltip\` | 67,829 | 21,974 | 19,470 | 9,429 | 2,451 | 2,085 |
|
|
3674
|
-
| \`tour\` | 80,
|
|
3693
|
+
| \`tour\` | 80,348 | 24,304 | 21,526 | 20,792 | 4,456 | 3,750 |
|
|
3675
3694
|
| \`tree\` | 104,871 | 33,337 | 27,201 | 13,069 | 3,306 | 2,728 |
|
|
3676
3695
|
| \`trend\` | 90,903 | 29,129 | 23,898 | 4,271 | 985 | 862 |
|
|
3677
3696
|
| \`video\` | 174,764 | 52,259 | 44,284 | 51,918 | 11,165 | 9,570 |
|
|
@@ -3689,11 +3708,11 @@ stripped column shows the bytes we removed.
|
|
|
3689
3708
|
| Package | Unpacked | Files | Source maps stripped | Runtime dependencies |
|
|
3690
3709
|
|---|---|---|---|---|
|
|
3691
3710
|
| \`@fusion.dev/helix-core\` | 1,192,742 | 171 | 267,144 | \`@floating-ui/dom\`, \`@fusion.dev/helix-icons\` |
|
|
3692
|
-
| \`@fusion.dev/helix-headless\` | 13,
|
|
3711
|
+
| \`@fusion.dev/helix-headless\` | 13,515,038 | 510 | 1,077,677 | \`@fusion.dev/helix-core\`, \`@fusion.dev/helix-icons\`, \`uqr\` |
|
|
3693
3712
|
| \`@fusion.dev/helix-icons\` | 150,162 | 21 | 50,346 | \`svgo\` |
|
|
3694
3713
|
| \`@fusion.dev/helix-styles\` | 102,155 | 6 | 0 | none |
|
|
3695
3714
|
| \`@fusion.dev/helix-theme\` | 514,288 | 8 | 5,300 | none |
|
|
3696
|
-
| \`@fusion.dev/helix\` | 14,
|
|
3715
|
+
| \`@fusion.dev/helix\` | 14,628,121 | 876 | 373,810 | \`@fusion.dev/helix-core\`, \`@fusion.dev/helix-headless\`, \`@fusion.dev/helix-styles\` |
|
|
3697
3716
|
|
|
3698
3717
|
## Not measured yet
|
|
3699
3718
|
|
|
@@ -5609,6 +5628,11 @@ or black, the grays take its tint, and every text color is solved against it. A
|
|
|
5609
5628
|
page that no text color can reach the contrast target on is left out of the
|
|
5610
5629
|
preview, and a caption under the fields says so.
|
|
5611
5630
|
|
|
5631
|
+
**Color the figures band** gives one section of the Marketing site layout a
|
|
5632
|
+
color of its own, as its own theme. The band is dark or light by whichever text
|
|
5633
|
+
reads better on it, and its block follows the page's in the generated
|
|
5634
|
+
stylesheet. See [Color one section](./theming#color-one-section).
|
|
5635
|
+
|
|
5612
5636
|
## The audit
|
|
5613
5637
|
|
|
5614
5638
|
The audit lists every color pair Helix computed. Each pair shows its ratio,
|
|
@@ -5765,6 +5789,39 @@ console.log(css[':root'])
|
|
|
5765
5789
|
A value that is not a color and still changes with the mode, such as the edge
|
|
5766
5790
|
of a floating surface, is set by rules after the block, one for each mode.
|
|
5767
5791
|
|
|
5792
|
+
## Color one section
|
|
5793
|
+
|
|
5794
|
+
A section in a color of its own, such as a deep teal band on a cream page, is a
|
|
5795
|
+
theme of its own. Derive it from the same intent, with the section's color as
|
|
5796
|
+
its page, under a selector for the section:
|
|
5797
|
+
|
|
5798
|
+
\`\`\`ts
|
|
5799
|
+
const band = engine.derive(
|
|
5800
|
+
{ ...intent, background: { dark: '#0b2a33' }, scheme: 'dark' },
|
|
5801
|
+
['[data-band]'],
|
|
5802
|
+
)
|
|
5803
|
+
\`\`\`
|
|
5804
|
+
|
|
5805
|
+
Choose the scheme the color needs: \`dark\` for a color light text reads on, and
|
|
5806
|
+
\`light\` for one dark text reads on. A color no text can reach the contrast
|
|
5807
|
+
target on is refused, as a page is.
|
|
5808
|
+
|
|
5809
|
+
Mark the section so the stylesheet derives its own colors there from the
|
|
5810
|
+
section's seeds, in the section's mode, and paint it with its page color:
|
|
5811
|
+
|
|
5812
|
+
\`\`\`html
|
|
5813
|
+
<section data-band data-color-mode="dark" data-helix-theme>…</section>
|
|
5814
|
+
\`\`\`
|
|
5815
|
+
|
|
5816
|
+
\`\`\`css
|
|
5817
|
+
[data-band] {
|
|
5818
|
+
background-color: var(--helix-color-background);
|
|
5819
|
+
color: var(--helix-color-foreground);
|
|
5820
|
+
}
|
|
5821
|
+
\`\`\`
|
|
5822
|
+
|
|
5823
|
+
Write the section's block after the page's, so it wins inside the section.
|
|
5824
|
+
|
|
5768
5825
|
## Why Helix uses OKLCH
|
|
5769
5826
|
|
|
5770
5827
|
Equal numeric steps in sRGB do not look like equal steps. That makes scales and
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix-docs",
|
|
3
3
|
"description": "Versioned documentation content and registry for Helix.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.133.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
},
|
|
37
37
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@fusion.dev/helix": "0.
|
|
40
|
-
"@fusion.dev/helix-cem": "0.
|
|
41
|
-
"@fusion.dev/helix-headless": "0.
|
|
42
|
-
"@fusion.dev/helix-icons": "0.
|
|
43
|
-
"@fusion.dev/helix-map": "0.
|
|
44
|
-
"@fusion.dev/helix-styles": "0.
|
|
45
|
-
"@fusion.dev/helix-testing": "0.
|
|
46
|
-
"@fusion.dev/helix-theme": "0.
|
|
39
|
+
"@fusion.dev/helix": "0.133.0",
|
|
40
|
+
"@fusion.dev/helix-cem": "0.133.0",
|
|
41
|
+
"@fusion.dev/helix-headless": "0.133.0",
|
|
42
|
+
"@fusion.dev/helix-icons": "0.133.0",
|
|
43
|
+
"@fusion.dev/helix-map": "0.133.0",
|
|
44
|
+
"@fusion.dev/helix-styles": "0.133.0",
|
|
45
|
+
"@fusion.dev/helix-testing": "0.133.0",
|
|
46
|
+
"@fusion.dev/helix-theme": "0.133.0",
|
|
47
47
|
"@fusion.dev/scripts": "0.0.0-dev",
|
|
48
48
|
"lit": "^3.2.1",
|
|
49
49
|
"playwright": "^1.62.1"
|