@fusion.dev/helix-docs 0.208.0 → 0.209.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/browser-support.mdx +26 -6
- package/content/building-on-the-headless-tier.mdx +2 -1
- package/content/metrics.mdx +244 -242
- package/content/terminals.mdx +422 -0
- package/dist/pages.generated.js +7 -1
- package/dist/sources.generated.js +695 -249
- package/package.json +12 -11
|
@@ -263,7 +263,7 @@ send keys that fast. \`detectChanges()\` renders the change before your handler
|
|
|
263
263
|
returns.
|
|
264
264
|
`,
|
|
265
265
|
'browser-support': `---
|
|
266
|
-
description: The browser features Helix uses, and the
|
|
266
|
+
description: The browser features Helix uses, and the browsers we test in.
|
|
267
267
|
order: 5
|
|
268
268
|
section: Getting started
|
|
269
269
|
title: Browser support
|
|
@@ -277,12 +277,32 @@ support in older browsers. Your browser needs every feature Helix uses.
|
|
|
277
277
|
|
|
278
278
|
## What we test
|
|
279
279
|
|
|
280
|
-
We test in Chromium, through Playwright
|
|
281
|
-
|
|
280
|
+
We test in Chromium and WebKit, through Playwright, on Linux, with the network
|
|
281
|
+
blocked.
|
|
282
282
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
283
|
+
- The DOM specs run in both.
|
|
284
|
+
- The pixel baselines are captured in Chromium only.
|
|
285
|
+
|
|
286
|
+
WebKit is the engine in Safari, and the system webview a Tauri app draws with on
|
|
287
|
+
macOS and Linux. Playwright builds its own WebKit from the same source as
|
|
288
|
+
Safari, so a difference that only Safari shows can still get past our tests.
|
|
289
|
+
|
|
290
|
+
We do not run the tests in Firefox. The rest of this page lists the browser
|
|
291
|
+
features Helix uses. If you ship Helix to Firefox or Safari and find something
|
|
292
|
+
broken, please report it.
|
|
293
|
+
|
|
294
|
+
### Known differences in WebKit
|
|
295
|
+
|
|
296
|
+
A few specs still fail in WebKit. We keep each one on a list until it is fixed.
|
|
297
|
+
|
|
298
|
+
- Checkbox Group, Radio Group, Option, Toast, and Tooltip name or describe their
|
|
299
|
+
host through \`ElementInternals\`, pointing into their own shadow root. WebKit
|
|
300
|
+
reads those references back as empty. We have not yet checked whether
|
|
301
|
+
VoiceOver still reads the name.
|
|
302
|
+
- In Virtual List, End can leave the last row below the viewport after \`gap\`
|
|
303
|
+
changes on a list that is already drawn.
|
|
304
|
+
- In the sandbox's source pane, in WebKit on macOS, one undo after an indent
|
|
305
|
+
also removes the text typed before it.
|
|
286
306
|
|
|
287
307
|
## Browser features Helix uses
|
|
288
308
|
|
|
@@ -411,7 +431,7 @@ names the tag to define.
|
|
|
411
431
|
|
|
412
432
|
[//]: # (renders)
|
|
413
433
|
|
|
414
|
-
**
|
|
434
|
+
**39 of the 107 headless families interpolate another family's tag**, across 26 distinct children.
|
|
415
435
|
|
|
416
436
|
| Family | Renders |
|
|
417
437
|
|---|---|
|
|
@@ -434,6 +454,7 @@ names the tag to define.
|
|
|
434
454
|
| \`pagination\` | \`option\`, \`select\` |
|
|
435
455
|
| \`select\` | \`listbox\` |
|
|
436
456
|
| \`steps\`, \`tour\` | \`button\` |
|
|
457
|
+
| \`terminal\` | \`button\`, \`icon-button\`, \`toolbar\` |
|
|
437
458
|
| \`time-input\` | \`tag\`, \`time-picker\` |
|
|
438
459
|
| \`time-picker\` | \`listbox\`, \`option\` |
|
|
439
460
|
| \`video\`, \`video-playlist\` | \`menu\`, \`menu-item\` |
|
|
@@ -5101,7 +5122,7 @@ on its own.
|
|
|
5101
5122
|
|
|
5102
5123
|
| | Raw | Gzip | Brotli |
|
|
5103
5124
|
|---|---|---|---|
|
|
5104
|
-
| Lit and \`@fusion.dev/helix-core\` |
|
|
5125
|
+
| Lit and \`@fusion.dev/helix-core\` | 266,106 | 85,971 | 73,239 |
|
|
5105
5126
|
|
|
5106
5127
|
## Whole packages
|
|
5107
5128
|
|
|
@@ -5112,12 +5133,12 @@ either barrel. The per-component tables show what your page pays.
|
|
|
5112
5133
|
|
|
5113
5134
|
| Package | Raw | Gzip | Brotli | |
|
|
5114
5135
|
|---|---|---|---|---|
|
|
5115
|
-
| \`@fusion.dev/helix-core\` |
|
|
5116
|
-
| \`@fusion.dev/helix-headless\` | 1,
|
|
5117
|
-
| \`@fusion.dev/helix-icons\` | 56,
|
|
5136
|
+
| \`@fusion.dev/helix-core\` | 265,315 | 85,814 | 72,940 | The element base class, mixins, decorators, and floating positioning. |
|
|
5137
|
+
| \`@fusion.dev/helix-headless\` | 1,477,055 | 413,517 | 310,509 | Every headless family. The barrel entry includes all of them. |
|
|
5138
|
+
| \`@fusion.dev/helix-icons\` | 56,982 | 18,222 | 15,516 | The whole glyph set. |
|
|
5118
5139
|
| \`@fusion.dev/helix-theme\` | 4,030 | 1,791 | 1,560 | The JavaScript that runs the derivation engine. Most sites run it at build time, and a theme switcher runs it in the browser. |
|
|
5119
5140
|
| \`fusion_helix_theme_bg.wasm\` | 412,026 | 152,920 | 123,363 | The derivation engine itself, in WebAssembly. The entry above loads it when the engine runs. |
|
|
5120
|
-
| \`@fusion.dev/helix\` | 2,
|
|
5141
|
+
| \`@fusion.dev/helix\` | 2,206,311 | 570,788 | 406,879 | Every styled family. |
|
|
5121
5142
|
| \`lit\` | 15,394 | 6,118 | 5,460 | Lit itself, listed so you can subtract it from every row above. |
|
|
5122
5143
|
|
|
5123
5144
|
## Stylesheets
|
|
@@ -5131,20 +5152,20 @@ shows the whole cost of using the base layer on its own.
|
|
|
5131
5152
|
| File | Raw | Gzip | Brotli | |
|
|
5132
5153
|
|---|---|---|---|---|
|
|
5133
5154
|
| \`base.css\` | 33,986 | 4,785 | 4,158 | The base layer. It styles markup Helix does not render, and it works with no JavaScript. |
|
|
5134
|
-
| \`elements.css\` | 19,
|
|
5155
|
+
| \`elements.css\` | 19,686 | 2,942 | 2,638 | Hides each element until its definition loads. It is generated from the tags in \`@fusion.dev/helix\`. |
|
|
5135
5156
|
| \`helix.css\` | 207 | 148 | 118 | The other four stylesheets in one import, in the order they must load. |
|
|
5136
5157
|
| \`primitives.css\` | 7,511 | 1,401 | 1,221 | The primitive layer. It is private, and it ships because \`tokens.css\` refers to it. |
|
|
5137
5158
|
| \`tokens.css\` | 23,030 | 2,795 | 2,319 | The 200 semantic tokens. Every styled component needs them. |
|
|
5138
5159
|
|
|
5139
5160
|
## What the numbers say
|
|
5140
5161
|
|
|
5141
|
-
**Most of your first component is the shared runtime.** The median styled family is 19,
|
|
5162
|
+
**Most of your first component is the shared runtime.** The median styled family is 19,793 bytes gzipped alone, and it adds 4,537 to a page that already has Helix. The shared runtime is 77 percent of the first component, and the component itself is 23 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.
|
|
5142
5163
|
|
|
5143
|
-
Across the
|
|
5164
|
+
Across the 114 styled components, the smallest is \`code\` at 8,560 bytes gzipped alone, and the largest is \`data-table\` at 67,608. Every family together is 570,788.
|
|
5144
5165
|
|
|
5145
|
-
No family imports a barrel. The \`barrels\` rule in \`fusion x 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
|
|
5166
|
+
No family imports a barrel. The \`barrels\` rule in \`fusion x 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 413,517 bytes gzipped, whatever else the page imports. That is 21 times the median family above. All 114 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.
|
|
5146
5167
|
|
|
5147
|
-
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 18,
|
|
5168
|
+
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 18,410 bytes gzipped alone.
|
|
5148
5169
|
|
|
5149
5170
|
## Compared with other systems
|
|
5150
5171
|
|
|
@@ -5156,43 +5177,43 @@ The table has no whole-library row. That row would compare how many components e
|
|
|
5156
5177
|
|
|
5157
5178
|
| Component | System | Raw | Gzip | Brotli |
|
|
5158
5179
|
|---|---|---|---|---|
|
|
5159
|
-
| \`button\` | **Helix** | 42,729 | 14,402 | 12,
|
|
5180
|
+
| \`button\` | **Helix** | 42,729 | 14,402 | 12,850 |
|
|
5160
5181
|
| | Carbon | 133,058 | 20,959 | 17,685 |
|
|
5161
5182
|
| | Material Web | 47,060 | 14,173 | 12,591 |
|
|
5162
5183
|
| | Spectrum | 98,792 | 22,045 | 18,674 |
|
|
5163
5184
|
| | Web Awesome | 136,044 | 33,730 | 28,760 |
|
|
5164
|
-
| \`checkbox\` | **Helix** | 47,728 | 15,
|
|
5185
|
+
| \`checkbox\` | **Helix** | 47,728 | 15,519 | 13,814 |
|
|
5165
5186
|
| | Carbon | 60,255 | 15,609 | 13,550 |
|
|
5166
5187
|
| | Material Web | 43,785 | 13,556 | 12,015 |
|
|
5167
5188
|
| | Spectrum | 62,492 | 15,437 | 13,481 |
|
|
5168
5189
|
| | Web Awesome | 115,251 | 28,728 | 24,420 |
|
|
5169
|
-
| \`dialog\` | **Helix** | 44,311 | 15,
|
|
5190
|
+
| \`dialog\` | **Helix** | 44,311 | 15,228 | 13,600 |
|
|
5170
5191
|
| | Carbon | 510,866 | 67,390 | 39,189 |
|
|
5171
5192
|
| | Material Web | 34,238 | 11,510 | 10,229 |
|
|
5172
5193
|
| | Spectrum | 155,708 | 31,899 | 26,262 |
|
|
5173
5194
|
| | Web Awesome | 148,657 | 36,692 | 31,388 |
|
|
5174
|
-
| \`radio\` | **Helix** | 51,120 | 16,
|
|
5195
|
+
| \`radio\` | **Helix** | 51,120 | 16,284 | 14,491 |
|
|
5175
5196
|
| | Carbon | 63,055 | 16,887 | 14,605 |
|
|
5176
5197
|
| | Material Web | 41,044 | 13,234 | 11,757 |
|
|
5177
5198
|
| | Spectrum | 38,685 | 10,660 | 9,370 |
|
|
5178
5199
|
| | Web Awesome | 112,026 | 27,416 | 23,128 |
|
|
5179
|
-
| \`switch\` | **Helix** | 44,449 | 14,
|
|
5200
|
+
| \`switch\` | **Helix** | 44,449 | 14,979 | 13,332 |
|
|
5180
5201
|
| | Carbon | 69,423 | 17,127 | 14,764 |
|
|
5181
5202
|
| | Material Web | 50,155 | 14,577 | 12,935 |
|
|
5182
5203
|
| | Spectrum | 62,322 | 15,059 | 13,321 |
|
|
5183
5204
|
| | Web Awesome | 45,876 | 15,003 | 13,475 |
|
|
5184
|
-
| \`tabs\` | **Helix** | 56,031 | 18,
|
|
5205
|
+
| \`tabs\` | **Helix** | 56,031 | 18,046 | 16,086 |
|
|
5185
5206
|
| | Carbon | 578,766 | 73,537 | 43,235 |
|
|
5186
5207
|
| | Material Web | 38,883 | 12,820 | 11,368 |
|
|
5187
5208
|
| | Spectrum | 64,875 | 18,298 | 16,283 |
|
|
5188
5209
|
| | Web Awesome | 153,439 | 37,030 | 31,737 |
|
|
5189
|
-
| \`tooltip\` | **Helix** | 62,502 | 22,
|
|
5210
|
+
| \`tooltip\` | **Helix** | 62,502 | 22,264 | 19,787 |
|
|
5190
5211
|
| | Carbon | 189,382 | 30,354 | 22,273 |
|
|
5191
5212
|
| | Material Web | | not shipped | |
|
|
5192
5213
|
| | Spectrum | 136,599 | 40,552 | 35,286 |
|
|
5193
5214
|
| | Web Awesome | 70,568 | 24,005 | 21,107 |
|
|
5194
5215
|
|
|
5195
|
-
At least one system is smaller than Helix on \`button\`, \`checkbox\`, \`dialog\`, \`radio\`, \`switch\`, \`tabs\`. The largest gap is radio against Spectrum, at 5,
|
|
5216
|
+
At least one system is smaller than Helix on \`button\`, \`checkbox\`, \`dialog\`, \`radio\`, \`switch\`, \`tabs\`. The largest gap is radio against Spectrum, at 5,624 bytes gzipped. 8 of 27 peer measurements are smaller than the Helix row.
|
|
5196
5217
|
|
|
5197
5218
|
Helix's \`radio\` family includes Radio Group, so its row carries an element that some peer rows measure without.
|
|
5198
5219
|
|
|
@@ -5266,112 +5287,113 @@ Structure, accessibility, state, and form participation. It has no presentation
|
|
|
5266
5287
|
|
|
5267
5288
|
| Family | Alone raw | Alone gzip | Alone brotli | Added raw | Added gzip | Added brotli |
|
|
5268
5289
|
|---|---|---|---|---|---|---|
|
|
5269
|
-
| \`accordion\` | 32,671 | 12,
|
|
5270
|
-
| \`announcement\` | 37,661 | 13,
|
|
5271
|
-
| \`app-header\` | 33,168 | 12,
|
|
5272
|
-
| \`area-chart\` | 99,355 | 34,
|
|
5273
|
-
| \`avatar\` | 31,887 | 12,152 | 10,
|
|
5274
|
-
| \`badge\` | 28,118 | 10,943 | 9,778 | 2,960 |
|
|
5275
|
-
| \`bar-chart\` | 107,369 | 37,
|
|
5276
|
-
| \`blockquote\` | 24,679 | 9,
|
|
5277
|
-
| \`breadcrumbs\` | 37,419 | 14,
|
|
5278
|
-
| \`button\` | 36,221 | 12,
|
|
5279
|
-
| \`button-group\` | 28,214 | 10,616 | 9,
|
|
5280
|
-
| \`callout\` | 36,284 | 13,987 | 12,
|
|
5281
|
-
| \`canvas\` | 109,
|
|
5282
|
-
| \`card\` | 24,397 | 9,311 | 8,
|
|
5283
|
-
| \`carousel\` | 45,
|
|
5284
|
-
| \`chat\` |
|
|
5285
|
-
| \`checkbox\` | 41,242 | 14,
|
|
5286
|
-
| \`checkbox-group\` | 48,465 | 15,
|
|
5287
|
-
| \`code\` | 20,869 | 8,248 | 7,
|
|
5288
|
-
| \`code-block\` | 104,774 | 35,
|
|
5289
|
-
| \`color-input\` | 143,744 | 45,
|
|
5290
|
-
| \`color-picker\` | 105,363 | 33,633 | 29,
|
|
5291
|
-
| \`combobox\` | 133,766 | 42,
|
|
5292
|
-
| \`command\` | 101,170 | 32,
|
|
5293
|
-
| \`copy-button\` | 82,225 | 28,
|
|
5294
|
-
| \`data-table\` |
|
|
5295
|
-
| \`date-input\` | 143,049 | 45,174 | 39,
|
|
5296
|
-
| \`date-picker\` | 63,093 | 21,
|
|
5297
|
-
| \`description-list\` | 23,472 | 8,
|
|
5298
|
-
| \`dialog\` | 39,175 | 13,
|
|
5299
|
-
| \`divider\` | 23,564 | 9,
|
|
5300
|
-
| \`donut-chart\` | 92,673 | 32,
|
|
5301
|
-
| \`drawer\` | 43,812 | 15,
|
|
5302
|
-
| \`drilldown\` | 43,527 | 15,
|
|
5303
|
-
| \`empty\` | 25,007 | 9,
|
|
5304
|
-
| \`file-input\` | 59,118 | 20,
|
|
5305
|
-
| \`filter-input\` | 99,578 | 33,
|
|
5306
|
-
| \`format-date\` | 31,209 | 11,674 | 10,
|
|
5307
|
-
| \`graph\` | 76,986 | 25,
|
|
5308
|
-
| \`heatmap\` | 101,735 | 34,
|
|
5309
|
-
| \`icon\` |
|
|
5310
|
-
| \`icon-button\` | 36,332 |
|
|
5311
|
-
| \`image\` | 26,373 | 9,843 | 8,744 | 3,845 | 1,
|
|
5312
|
-
| \`input\` | 47,049 | 16,
|
|
5313
|
-
| \`kbd\` | 28,084 | 10,
|
|
5314
|
-
| \`legend\` | 36,396 | 13,369 | 11,
|
|
5315
|
-
| \`lightbox\` | 57,138 | 19,
|
|
5316
|
-
| \`line-chart\` | 102,350 | 35,
|
|
5317
|
-
| \`list\` | 62,949 | 21,721 | 19,
|
|
5318
|
-
| \`listbox\` | 78,070 | 25,
|
|
5319
|
-
| \`loader\` | 27,341 | 10,451 | 9,
|
|
5320
|
-
| \`log\` | 80,937 | 27,
|
|
5321
|
-
| \`map\` | 81,046 | 25,
|
|
5322
|
-
| \`megamenu\` | 61,165 | 22,
|
|
5323
|
-
| \`menu\` | 98,510 | 32,
|
|
5324
|
-
| \`meter\` | 32,921 | 12,
|
|
5325
|
-
| \`motion-toggle\` | 26,353 | 10,
|
|
5326
|
-
| \`navigation\` | 33,861 | 12,731 | 11,315 | 3,364 | 1,
|
|
5327
|
-
| \`notifications\` | 59,
|
|
5328
|
-
| \`number-input\` | 57,629 | 19,
|
|
5329
|
-
| \`object-inspector\` | 115,897 | 39,
|
|
5330
|
-
| \`option\` | 27,049 | 9,
|
|
5331
|
-
| \`outline\` | 34,
|
|
5332
|
-
| \`pagination\` | 138,030 | 44,
|
|
5333
|
-
| \`pin-input\` | 48,848 | 17,
|
|
5334
|
-
| \`popover\` | 64,882 | 23,
|
|
5335
|
-
| \`progress\` | 29,235 | 11,
|
|
5336
|
-
| \`qr-code\` | 43,669 | 17,
|
|
5337
|
-
| \`quote\` | 23,088 | 9,
|
|
5338
|
-
| \`radio\` | 43,333 | 14,
|
|
5339
|
-
| \`rating\` | 51,593 | 17,779 | 15,
|
|
5340
|
-
| \`scatter-chart\` | 98,654 | 34,
|
|
5341
|
-
| \`scroll-area\` | 31,294 | 11,433 | 10,
|
|
5342
|
-
| \`select\` | 116,719 | 38,
|
|
5343
|
-
| \`skeleton\` | 22,900 | 8,871 | 7,874 | 991 |
|
|
5344
|
-
| \`skip-link\` | 24,547 | 9,607 | 8,
|
|
5345
|
-
| \`slider\` | 54,642 | 18,
|
|
5346
|
-
| \`sparkline\` | 49,258 | 17,
|
|
5347
|
-
| \`spatial-bar-chart\` | 105,167 | 37,
|
|
5348
|
-
| \`spatial-heatmap\` | 117,089 | 39,972 | 35,
|
|
5349
|
-
| \`spatial-ribbon-chart\` | 104,288 | 36,
|
|
5350
|
-
| \`spatial-scatter-chart\` | 102,521 | 35,980 | 31,
|
|
5351
|
-
| \`spatial-surface-chart\` | 105,443 | 37,265 | 32,
|
|
5352
|
-
| \`spatial-treemap\` | 106,561 | 37,
|
|
5353
|
-
| \`speed-dial\` | 69,618 | 25,
|
|
5354
|
-
| \`splitter\` | 45,071 | 15,639 | 13,
|
|
5355
|
-
| \`stat\` | 26,285 | 10,056 | 8,
|
|
5356
|
-
| \`steps\` | 54,926 | 19,
|
|
5357
|
-
| \`switch\` | 40,096 | 13,
|
|
5358
|
-
| \`table\` | 119,
|
|
5359
|
-
| \`tabs\` | 47,080 | 16,201 | 14,
|
|
5360
|
-
| \`tag\` | 43,623 | 15,
|
|
5361
|
-
| \`
|
|
5362
|
-
| \`
|
|
5363
|
-
| \`time-
|
|
5364
|
-
| \`
|
|
5365
|
-
| \`
|
|
5366
|
-
| \`
|
|
5367
|
-
| \`
|
|
5368
|
-
| \`
|
|
5369
|
-
| \`
|
|
5370
|
-
| \`
|
|
5371
|
-
| \`
|
|
5372
|
-
| \`
|
|
5373
|
-
| \`video
|
|
5374
|
-
| \`
|
|
5290
|
+
| \`accordion\` | 32,671 | 12,094 | 10,733 | 5,377 | 1,558 | 1,223 |
|
|
5291
|
+
| \`announcement\` | 37,661 | 13,708 | 12,261 | 4,700 | 1,372 | 1,069 |
|
|
5292
|
+
| \`app-header\` | 33,168 | 12,241 | 10,876 | 5,900 | 1,744 | 1,346 |
|
|
5293
|
+
| \`area-chart\` | 99,355 | 34,965 | 30,812 | 14,415 | 4,382 | 3,616 |
|
|
5294
|
+
| \`avatar\` | 31,887 | 12,152 | 10,894 | 3,999 | 1,220 | 994 |
|
|
5295
|
+
| \`badge\` | 28,118 | 10,943 | 9,778 | 2,960 | 875 | 742 |
|
|
5296
|
+
| \`bar-chart\` | 107,369 | 37,640 | 33,226 | 21,901 | 6,885 | 5,792 |
|
|
5297
|
+
| \`blockquote\` | 24,679 | 9,637 | 8,534 | 2,400 | 853 | 791 |
|
|
5298
|
+
| \`breadcrumbs\` | 37,419 | 14,327 | 12,786 | 7,381 | 2,378 | 1,839 |
|
|
5299
|
+
| \`button\` | 36,221 | 12,970 | 11,572 | 5,127 | 1,507 | 1,119 |
|
|
5300
|
+
| \`button-group\` | 28,214 | 10,616 | 9,417 | 4,923 | 1,479 | 1,048 |
|
|
5301
|
+
| \`callout\` | 36,284 | 13,987 | 12,429 | 2,884 | 966 | 667 |
|
|
5302
|
+
| \`canvas\` | 109,988 | 35,325 | 30,896 | 68,989 | 21,021 | 17,663 |
|
|
5303
|
+
| \`card\` | 24,397 | 9,311 | 8,258 | 2,090 | 609 | 414 |
|
|
5304
|
+
| \`carousel\` | 45,167 | 16,073 | 14,357 | 15,330 | 4,224 | 3,429 |
|
|
5305
|
+
| \`chat\` | 81,069 | 27,038 | 23,898 | 27,682 | 8,068 | 6,441 |
|
|
5306
|
+
| \`checkbox\` | 41,242 | 14,017 | 12,499 | 3,107 | 939 | 733 |
|
|
5307
|
+
| \`checkbox-group\` | 48,465 | 15,945 | 14,237 | 8,321 | 2,325 | 1,771 |
|
|
5308
|
+
| \`code\` | 20,869 | 8,248 | 7,310 | 138 | 55 | 91 |
|
|
5309
|
+
| \`code-block\` | 104,774 | 35,632 | 31,408 | 37,349 | 10,762 | 8,854 |
|
|
5310
|
+
| \`color-input\` | 143,744 | 45,822 | 39,965 | 55,780 | 14,213 | 11,830 |
|
|
5311
|
+
| \`color-picker\` | 105,363 | 33,633 | 29,451 | 47,900 | 12,658 | 10,525 |
|
|
5312
|
+
| \`combobox\` | 133,766 | 42,658 | 37,464 | 35,968 | 9,150 | 7,270 |
|
|
5313
|
+
| \`command\` | 101,170 | 32,144 | 28,259 | 30,351 | 8,155 | 6,543 |
|
|
5314
|
+
| \`copy-button\` | 82,225 | 28,296 | 25,012 | 18,756 | 5,036 | 3,976 |
|
|
5315
|
+
| \`data-table\` | 202,025 | 62,203 | 53,212 | 89,966 | 24,051 | 19,229 |
|
|
5316
|
+
| \`date-input\` | 143,049 | 45,174 | 39,695 | 38,666 | 9,514 | 7,669 |
|
|
5317
|
+
| \`date-picker\` | 63,093 | 21,513 | 19,286 | 20,720 | 5,624 | 4,549 |
|
|
5318
|
+
| \`description-list\` | 23,472 | 8,992 | 7,982 | 1,565 | 491 | 312 |
|
|
5319
|
+
| \`dialog\` | 39,175 | 13,971 | 12,445 | 5,948 | 1,750 | 1,361 |
|
|
5320
|
+
| \`divider\` | 23,564 | 9,143 | 8,084 | 1,414 | 468 | 290 |
|
|
5321
|
+
| \`donut-chart\` | 92,673 | 32,265 | 28,574 | 14,717 | 4,458 | 3,659 |
|
|
5322
|
+
| \`drawer\` | 43,812 | 15,483 | 13,811 | 7,798 | 2,288 | 1,812 |
|
|
5323
|
+
| \`drilldown\` | 43,527 | 15,251 | 13,602 | 9,709 | 2,688 | 2,127 |
|
|
5324
|
+
| \`empty\` | 25,007 | 9,577 | 8,495 | 1,976 | 615 | 514 |
|
|
5325
|
+
| \`file-input\` | 59,118 | 20,551 | 18,298 | 13,152 | 4,110 | 3,332 |
|
|
5326
|
+
| \`filter-input\` | 99,578 | 33,492 | 29,737 | 21,569 | 6,139 | 4,864 |
|
|
5327
|
+
| \`format-date\` | 31,209 | 11,674 | 10,454 | 4,474 | 1,258 | 922 |
|
|
5328
|
+
| \`graph\` | 76,986 | 25,233 | 22,351 | 23,180 | 6,735 | 5,588 |
|
|
5329
|
+
| \`heatmap\` | 101,735 | 34,690 | 30,621 | 19,071 | 5,563 | 4,485 |
|
|
5330
|
+
| \`icon\` | 84,375 | 28,941 | 24,780 | 59,477 | 20,470 | 16,556 |
|
|
5331
|
+
| \`icon-button\` | 36,332 | 12,999 | 11,592 | 5,236 | 1,537 | 1,070 |
|
|
5332
|
+
| \`image\` | 26,373 | 9,843 | 8,744 | 3,845 | 1,133 | 966 |
|
|
5333
|
+
| \`input\` | 47,049 | 16,179 | 14,344 | 7,005 | 2,218 | 1,560 |
|
|
5334
|
+
| \`kbd\` | 28,084 | 10,787 | 9,545 | 3,518 | 1,086 | 792 |
|
|
5335
|
+
| \`legend\` | 36,396 | 13,369 | 11,915 | 2,955 | 963 | 707 |
|
|
5336
|
+
| \`lightbox\` | 57,138 | 19,379 | 17,221 | 16,762 | 4,594 | 3,574 |
|
|
5337
|
+
| \`line-chart\` | 102,350 | 35,825 | 31,641 | 16,812 | 5,020 | 4,178 |
|
|
5338
|
+
| \`list\` | 62,949 | 21,721 | 19,340 | 15,258 | 4,364 | 3,453 |
|
|
5339
|
+
| \`listbox\` | 78,070 | 25,949 | 22,952 | 15,605 | 4,558 | 3,702 |
|
|
5340
|
+
| \`loader\` | 27,341 | 10,451 | 9,310 | 2,785 | 909 | 838 |
|
|
5341
|
+
| \`log\` | 80,937 | 27,698 | 24,547 | 37,582 | 11,600 | 9,885 |
|
|
5342
|
+
| \`map\` | 81,046 | 25,210 | 22,087 | 37,496 | 10,221 | 8,232 |
|
|
5343
|
+
| \`megamenu\` | 61,165 | 22,171 | 19,600 | 8,723 | 2,415 | 1,696 |
|
|
5344
|
+
| \`menu\` | 98,510 | 32,958 | 29,064 | 30,262 | 7,978 | 6,564 |
|
|
5345
|
+
| \`meter\` | 32,921 | 12,485 | 11,169 | 4,980 | 1,426 | 1,185 |
|
|
5346
|
+
| \`motion-toggle\` | 26,353 | 10,249 | 9,108 | 1,426 | 485 | 409 |
|
|
5347
|
+
| \`navigation\` | 33,861 | 12,731 | 11,315 | 3,364 | 1,123 | 853 |
|
|
5348
|
+
| \`notifications\` | 59,565 | 20,344 | 18,123 | 18,280 | 5,014 | 4,131 |
|
|
5349
|
+
| \`number-input\` | 57,629 | 19,359 | 17,254 | 13,579 | 3,610 | 2,851 |
|
|
5350
|
+
| \`object-inspector\` | 115,897 | 39,007 | 34,366 | 36,018 | 10,378 | 8,431 |
|
|
5351
|
+
| \`option\` | 27,049 | 9,971 | 8,857 | 4,522 | 1,163 | 868 |
|
|
5352
|
+
| \`outline\` | 34,611 | 12,984 | 11,534 | 7,888 | 2,551 | 1,880 |
|
|
5353
|
+
| \`pagination\` | 138,030 | 44,309 | 38,510 | 45,681 | 11,877 | 9,516 |
|
|
5354
|
+
| \`pin-input\` | 48,848 | 17,045 | 15,224 | 7,207 | 2,358 | 1,761 |
|
|
5355
|
+
| \`popover\` | 64,882 | 23,348 | 20,630 | 6,460 | 1,849 | 1,384 |
|
|
5356
|
+
| \`progress\` | 29,235 | 11,152 | 9,980 | 3,006 | 911 | 699 |
|
|
5357
|
+
| \`qr-code\` | 43,669 | 17,005 | 15,118 | 17,002 | 6,262 | 5,336 |
|
|
5358
|
+
| \`quote\` | 23,088 | 9,111 | 8,039 | 1,209 | 469 | 437 |
|
|
5359
|
+
| \`radio\` | 43,333 | 14,778 | 13,155 | 3,815 | 1,194 | 928 |
|
|
5360
|
+
| \`rating\` | 51,593 | 17,779 | 15,843 | 8,057 | 2,431 | 1,811 |
|
|
5361
|
+
| \`scatter-chart\` | 98,654 | 34,306 | 30,268 | 20,338 | 6,357 | 5,276 |
|
|
5362
|
+
| \`scroll-area\` | 31,294 | 11,433 | 10,149 | 8,518 | 2,565 | 2,112 |
|
|
5363
|
+
| \`select\` | 116,719 | 38,719 | 33,938 | 26,155 | 7,152 | 5,621 |
|
|
5364
|
+
| \`skeleton\` | 22,900 | 8,871 | 7,874 | 991 | 357 | 251 |
|
|
5365
|
+
| \`skip-link\` | 24,547 | 9,607 | 8,535 | 1,223 | 436 | 351 |
|
|
5366
|
+
| \`slider\` | 54,642 | 18,410 | 16,473 | 13,623 | 3,834 | 2,938 |
|
|
5367
|
+
| \`sparkline\` | 49,258 | 17,983 | 16,021 | 5,980 | 2,056 | 1,731 |
|
|
5368
|
+
| \`spatial-bar-chart\` | 105,167 | 37,124 | 32,657 | 19,854 | 6,506 | 5,327 |
|
|
5369
|
+
| \`spatial-heatmap\` | 117,089 | 39,972 | 35,195 | 31,738 | 9,608 | 7,970 |
|
|
5370
|
+
| \`spatial-ribbon-chart\` | 104,288 | 36,725 | 32,402 | 20,791 | 6,921 | 5,748 |
|
|
5371
|
+
| \`spatial-scatter-chart\` | 102,521 | 35,980 | 31,675 | 19,085 | 6,254 | 5,104 |
|
|
5372
|
+
| \`spatial-surface-chart\` | 105,443 | 37,265 | 32,832 | 21,949 | 7,454 | 6,208 |
|
|
5373
|
+
| \`spatial-treemap\` | 106,561 | 37,909 | 33,341 | 21,370 | 7,339 | 5,940 |
|
|
5374
|
+
| \`speed-dial\` | 69,618 | 25,072 | 22,188 | 10,934 | 2,947 | 2,313 |
|
|
5375
|
+
| \`splitter\` | 45,071 | 15,639 | 13,967 | 14,506 | 3,849 | 3,069 |
|
|
5376
|
+
| \`stat\` | 26,285 | 10,056 | 8,955 | 2,322 | 726 | 548 |
|
|
5377
|
+
| \`steps\` | 54,926 | 19,119 | 17,023 | 13,804 | 3,872 | 3,213 |
|
|
5378
|
+
| \`switch\` | 40,096 | 13,831 | 12,333 | 1,679 | 580 | 328 |
|
|
5379
|
+
| \`table\` | 119,434 | 37,421 | 32,590 | 45,149 | 12,294 | 10,099 |
|
|
5380
|
+
| \`tabs\` | 47,080 | 16,201 | 14,426 | 10,491 | 2,844 | 2,157 |
|
|
5381
|
+
| \`tag\` | 43,623 | 15,997 | 14,325 | 8,450 | 2,504 | 2,018 |
|
|
5382
|
+
| \`terminal\` | 71,467 | 23,680 | 20,852 | 30,239 | 8,332 | 6,765 |
|
|
5383
|
+
| \`textarea\` | 44,973 | 15,362 | 13,739 | 5,489 | 1,612 | 1,177 |
|
|
5384
|
+
| \`time-input\` | 170,882 | 53,314 | 46,296 | 48,574 | 12,288 | 9,892 |
|
|
5385
|
+
| \`time-picker\` | 101,126 | 32,100 | 28,228 | 33,987 | 9,180 | 7,342 |
|
|
5386
|
+
| \`timeline\` | 32,429 | 12,281 | 11,016 | 4,086 | 1,172 | 885 |
|
|
5387
|
+
| \`toast\` | 52,298 | 18,495 | 16,474 | 12,164 | 3,488 | 2,803 |
|
|
5388
|
+
| \`toggle\` | 46,246 | 15,538 | 13,827 | 6,005 | 1,792 | 1,366 |
|
|
5389
|
+
| \`toolbar\` | 31,928 | 11,893 | 10,591 | 5,267 | 1,646 | 1,305 |
|
|
5390
|
+
| \`tooltip\` | 59,698 | 21,530 | 19,094 | 8,504 | 2,362 | 1,899 |
|
|
5391
|
+
| \`tour\` | 85,264 | 29,312 | 25,904 | 20,091 | 5,495 | 4,376 |
|
|
5392
|
+
| \`tree\` | 68,641 | 23,148 | 20,593 | 17,198 | 4,875 | 3,942 |
|
|
5393
|
+
| \`trend\` | 30,937 | 12,024 | 10,725 | 3,590 | 1,081 | 913 |
|
|
5394
|
+
| \`video\` | 143,863 | 45,086 | 39,243 | 66,787 | 16,872 | 13,886 |
|
|
5395
|
+
| \`video-playlist\` | 128,994 | 41,833 | 36,721 | 42,860 | 11,159 | 9,199 |
|
|
5396
|
+
| \`virtual-list\` | 64,382 | 21,914 | 19,520 | 23,393 | 7,150 | 5,810 |
|
|
5375
5397
|
|
|
5376
5398
|
### Styled tier
|
|
5377
5399
|
|
|
@@ -5379,119 +5401,120 @@ The headless tier plus presentation. \`bun add @fusion.dev/helix\` installs this
|
|
|
5379
5401
|
|
|
5380
5402
|
| Family | Alone raw | Alone gzip | Alone brotli | Added raw | Added gzip | Added brotli |
|
|
5381
5403
|
|---|---|---|---|---|---|---|
|
|
5382
|
-
| \`accordion\` | 36,104 | 12,
|
|
5383
|
-
| \`announcement\` | 42,276 | 14,774 | 13,
|
|
5384
|
-
| \`app-header\` | 38,326 | 13,
|
|
5385
|
-
| \`area-chart\` | 107,559 | 36,
|
|
5386
|
-
| \`aura\` | 59,567 | 20,253 | 17,
|
|
5387
|
-
| \`avatar\` | 34,890 | 12,
|
|
5388
|
-
| \`badge\` | 33,626 | 12,
|
|
5389
|
-
| \`bar-chart\` | 122,404 | 40,670 | 35,
|
|
5390
|
-
| \`blockquote\` | 26,905 | 10,186 | 9,009 | 4,610 | 1,
|
|
5391
|
-
| \`breadcrumbs\` | 44,356 | 15,
|
|
5392
|
-
| \`button\` | 42,729 | 14,402 | 12,
|
|
5393
|
-
| \`button-group\` | 31,709 | 11,
|
|
5394
|
-
| \`callout\` | 40,077 | 14,
|
|
5395
|
-
| \`canvas\` | 131,
|
|
5396
|
-
| \`card\` | 28,297 | 10,317 | 9,
|
|
5397
|
-
| \`carousel\` | 55,
|
|
5398
|
-
| \`chat\` | 96,
|
|
5399
|
-
| \`checkbox\` | 47,728 | 15,
|
|
5400
|
-
| \`checkbox-group\` | 55,688 | 17,587 | 15,
|
|
5401
|
-
| \`code\` | 21,726 | 8,560 | 7,
|
|
5402
|
-
| \`code-block\` | 129,247 | 39,
|
|
5403
|
-
| \`color-input\` | 186,215 | 52,
|
|
5404
|
-
| \`color-picker\` | 142,389 | 39,
|
|
5405
|
-
| \`combobox\` | 149,120 | 45,
|
|
5406
|
-
| \`command\` | 112,469 | 34,
|
|
5407
|
-
| \`copy-button\` | 94,256 | 30,
|
|
5408
|
-
| \`data-table\` | 232,
|
|
5409
|
-
| \`date-input\` | 164,353 | 48,
|
|
5410
|
-
| \`date-picker\` | 71,139 | 22,979 | 20,
|
|
5411
|
-
| \`description-list\` | 26,427 | 9,731 | 8,674 | 4,508 | 1,
|
|
5412
|
-
| \`dialog\` | 44,311 | 15,
|
|
5413
|
-
| \`divider\` | 25,863 | 9,771 | 8,637 | 3,697 | 1,
|
|
5414
|
-
| \`donut-chart\` | 102,652 | 34,
|
|
5415
|
-
| \`drawer\` | 49,642 | 16,
|
|
5416
|
-
| \`drilldown\` | 49,204 | 16,
|
|
5417
|
-
| \`empty\` | 26,316 | 10,056 | 8,
|
|
5418
|
-
| \`file-input\` | 70,648 | 22,
|
|
5419
|
-
| \`filter-input\` | 110,412 | 35,
|
|
5420
|
-
| \`flex\` | 26,312 | 9,424 | 8,375 | 4,761 | 1,
|
|
5421
|
-
| \`format-date\` | 31,463 | 11,789 | 10,568 | 4,712 | 1,
|
|
5422
|
-
| \`graph\` | 92,818 | 27,924 | 24,
|
|
5423
|
-
| \`grid\` | 27,762 | 10,
|
|
5424
|
-
| \`heatmap\` | 110,057 | 36,
|
|
5425
|
-
| \`icon\` |
|
|
5426
|
-
| \`icon-button\` | 44,066 | 14,
|
|
5427
|
-
| \`image\` | 27,760 | 10,306 | 9,
|
|
5428
|
-
| \`input\` | 51,304 | 17,264 | 15,
|
|
5429
|
-
| \`kbd\` | 30,078 | 11,
|
|
5430
|
-
| \`legend\` | 41,634 | 14,661 | 13,
|
|
5431
|
-
| \`lightbox\` | 63,432 | 20,711 | 18,
|
|
5432
|
-
| \`line-chart\` | 113,713 | 38,
|
|
5433
|
-
| \`list\` | 69,295 | 23,
|
|
5434
|
-
| \`listbox\` | 82,511 | 27,
|
|
5435
|
-
| \`loader\` | 30,222 | 11,214 | 10,
|
|
5436
|
-
| \`log\` | 92,
|
|
5437
|
-
| \`map\` | 114,692 | 30,616 | 26,
|
|
5438
|
-
| \`megamenu\` | 66,134 | 23,
|
|
5439
|
-
| \`menu\` | 109,435 | 35,
|
|
5440
|
-
| \`meter\` | 39,093 | 13,
|
|
5441
|
-
| \`motion-toggle\` | 27,988 | 10,
|
|
5442
|
-
| \`navigation\` | 37,585 | 13,566 | 12,044 | 7,
|
|
5443
|
-
| \`notifications\` | 73,
|
|
5444
|
-
| \`number-input\` | 62,610 | 20,
|
|
5445
|
-
| \`object-inspector\` | 132,306 | 41,847 | 36,
|
|
5446
|
-
| \`option\` | 30,122 | 10,
|
|
5447
|
-
| \`orb\` | 36,885 | 14,019 | 12,487 | 10,
|
|
5448
|
-
| \`outline\` | 38,
|
|
5449
|
-
| \`pagination\` | 154,907 | 47,
|
|
5450
|
-
| \`pin-input\` | 52,228 | 17,
|
|
5451
|
-
| \`popover\` | 68,034 | 24,
|
|
5452
|
-
| \`progress\` | 36,415 | 12,
|
|
5453
|
-
| \`qr-code\` | 45,270 | 17,490 | 15,
|
|
5454
|
-
| \`quote\` | 23,646 | 9,303 | 8,221 | 1,750 |
|
|
5455
|
-
| \`radio\` | 51,120 | 16,
|
|
5456
|
-
| \`rating\` | 55,527 | 19,005 | 16,
|
|
5457
|
-
| \`sandbox\` | 108,218 | 32,
|
|
5458
|
-
| \`scatter-chart\` | 108,028 | 36,
|
|
5459
|
-
| \`scroll-area\` | 36,301 | 12,383 | 11,
|
|
5460
|
-
| \`select\` | 125,846 | 40,
|
|
5461
|
-
| \`skeleton\` | 26,848 | 9,947 | 8,858 | 4,755 | 1,
|
|
5462
|
-
| \`skip-link\` | 26,118 | 10,114 | 8,973 | 2,778 |
|
|
5463
|
-
| \`slider\` | 69,605 | 20,
|
|
5464
|
-
| \`sparkline\` | 54,716 | 19,
|
|
5465
|
-
| \`spatial-bar-chart\` | 114,232 | 39,
|
|
5466
|
-
| \`spatial-heatmap\` | 126,828 | 42,
|
|
5467
|
-
| \`spatial-ribbon-chart\` | 113,204 | 38,
|
|
5468
|
-
| \`spatial-scatter-chart\` | 111,501 | 37,
|
|
5469
|
-
| \`spatial-surface-chart\` | 113,878 | 39,
|
|
5470
|
-
| \`spatial-treemap\` | 115,
|
|
5471
|
-
| \`speed-dial\` | 76,667 | 26,
|
|
5472
|
-
| \`splitter\` | 51,121 | 16,689 | 14,
|
|
5473
|
-
| \`stat\` | 29,171 | 10,751 | 9,607 | 5,193 | 1,
|
|
5474
|
-
| \`steps\` | 69,006 | 21,
|
|
5475
|
-
| \`strands\` | 63,680 | 23,
|
|
5476
|
-
| \`switch\` | 44,449 | 14,
|
|
5477
|
-
| \`table\` | 136,
|
|
5478
|
-
| \`tabs\` | 56,031 | 18,
|
|
5479
|
-
| \`tag\` | 48,197 | 17,125 | 15,
|
|
5480
|
-
| \`
|
|
5481
|
-
| \`
|
|
5482
|
-
| \`
|
|
5483
|
-
| \`time-
|
|
5484
|
-
| \`
|
|
5485
|
-
| \`
|
|
5486
|
-
| \`
|
|
5487
|
-
| \`
|
|
5488
|
-
| \`
|
|
5489
|
-
| \`
|
|
5490
|
-
| \`
|
|
5491
|
-
| \`
|
|
5492
|
-
| \`
|
|
5493
|
-
| \`video
|
|
5494
|
-
| \`
|
|
5404
|
+
| \`accordion\` | 36,104 | 12,946 | 11,493 | 8,794 | 2,416 | 1,908 |
|
|
5405
|
+
| \`announcement\` | 42,276 | 14,774 | 13,229 | 9,296 | 2,445 | 1,966 |
|
|
5406
|
+
| \`app-header\` | 38,326 | 13,449 | 11,970 | 11,045 | 2,958 | 2,506 |
|
|
5407
|
+
| \`area-chart\` | 107,559 | 36,864 | 32,535 | 22,602 | 6,329 | 5,149 |
|
|
5408
|
+
| \`aura\` | 59,567 | 20,253 | 17,948 | 31,765 | 9,603 | 8,230 |
|
|
5409
|
+
| \`avatar\` | 34,890 | 12,911 | 11,528 | 6,987 | 1,972 | 1,598 |
|
|
5410
|
+
| \`badge\` | 33,626 | 12,189 | 10,864 | 8,456 | 2,141 | 1,689 |
|
|
5411
|
+
| \`bar-chart\` | 122,404 | 40,670 | 35,879 | 36,918 | 9,900 | 8,408 |
|
|
5412
|
+
| \`blockquote\` | 26,905 | 10,186 | 9,009 | 4,610 | 1,396 | 1,193 |
|
|
5413
|
+
| \`breadcrumbs\` | 44,356 | 15,533 | 13,888 | 14,306 | 3,624 | 3,082 |
|
|
5414
|
+
| \`button\` | 42,729 | 14,402 | 12,850 | 11,617 | 2,951 | 2,411 |
|
|
5415
|
+
| \`button-group\` | 31,709 | 11,294 | 10,051 | 8,406 | 2,192 | 1,752 |
|
|
5416
|
+
| \`callout\` | 40,077 | 14,934 | 13,281 | 6,659 | 1,921 | 1,490 |
|
|
5417
|
+
| \`canvas\` | 131,027 | 39,298 | 34,339 | 89,671 | 24,909 | 21,002 |
|
|
5418
|
+
| \`card\` | 28,297 | 10,317 | 9,174 | 5,976 | 1,616 | 1,282 |
|
|
5419
|
+
| \`carousel\` | 55,653 | 17,867 | 16,026 | 25,801 | 6,075 | 4,977 |
|
|
5420
|
+
| \`chat\` | 96,362 | 29,761 | 26,363 | 42,968 | 10,824 | 8,851 |
|
|
5421
|
+
| \`checkbox\` | 47,728 | 15,519 | 13,814 | 9,579 | 2,460 | 1,917 |
|
|
5422
|
+
| \`checkbox-group\` | 55,688 | 17,587 | 15,677 | 15,535 | 3,997 | 3,145 |
|
|
5423
|
+
| \`code\` | 21,726 | 8,560 | 7,581 | 976 | 365 | 354 |
|
|
5424
|
+
| \`code-block\` | 129,247 | 39,452 | 34,803 | 61,803 | 14,544 | 12,361 |
|
|
5425
|
+
| \`color-input\` | 186,215 | 52,093 | 45,474 | 98,238 | 20,714 | 17,319 |
|
|
5426
|
+
| \`color-picker\` | 142,389 | 39,198 | 34,433 | 84,910 | 18,385 | 15,358 |
|
|
5427
|
+
| \`combobox\` | 149,120 | 45,609 | 40,052 | 51,305 | 12,010 | 9,886 |
|
|
5428
|
+
| \`command\` | 112,469 | 34,492 | 30,359 | 41,644 | 10,562 | 8,671 |
|
|
5429
|
+
| \`copy-button\` | 94,256 | 30,463 | 26,990 | 30,769 | 7,264 | 5,884 |
|
|
5430
|
+
| \`data-table\` | 232,690 | 67,608 | 57,838 | 120,614 | 29,536 | 23,990 |
|
|
5431
|
+
| \`date-input\` | 164,353 | 48,938 | 43,022 | 59,950 | 13,113 | 10,999 |
|
|
5432
|
+
| \`date-picker\` | 71,139 | 22,979 | 20,560 | 28,748 | 7,071 | 5,748 |
|
|
5433
|
+
| \`description-list\` | 26,427 | 9,731 | 8,674 | 4,508 | 1,259 | 1,074 |
|
|
5434
|
+
| \`dialog\` | 44,311 | 15,228 | 13,600 | 11,064 | 3,036 | 2,546 |
|
|
5435
|
+
| \`divider\` | 25,863 | 9,771 | 8,637 | 3,697 | 1,110 | 959 |
|
|
5436
|
+
| \`donut-chart\` | 102,652 | 34,415 | 30,413 | 24,673 | 6,674 | 5,474 |
|
|
5437
|
+
| \`drawer\` | 49,642 | 16,868 | 15,045 | 13,612 | 3,679 | 3,024 |
|
|
5438
|
+
| \`drilldown\` | 49,204 | 16,543 | 14,750 | 15,375 | 3,987 | 3,148 |
|
|
5439
|
+
| \`empty\` | 26,316 | 10,056 | 8,904 | 3,267 | 1,084 | 853 |
|
|
5440
|
+
| \`file-input\` | 70,648 | 22,940 | 20,402 | 24,668 | 6,517 | 5,314 |
|
|
5441
|
+
| \`filter-input\` | 110,412 | 35,682 | 31,633 | 32,396 | 8,349 | 6,810 |
|
|
5442
|
+
| \`flex\` | 26,312 | 9,424 | 8,375 | 4,761 | 1,007 | 816 |
|
|
5443
|
+
| \`format-date\` | 31,463 | 11,789 | 10,568 | 4,712 | 1,358 | 1,044 |
|
|
5444
|
+
| \`graph\` | 92,818 | 27,924 | 24,582 | 38,992 | 9,536 | 7,818 |
|
|
5445
|
+
| \`grid\` | 27,762 | 10,136 | 8,993 | 5,653 | 1,442 | 1,279 |
|
|
5446
|
+
| \`heatmap\` | 110,057 | 36,551 | 32,235 | 27,373 | 7,433 | 6,141 |
|
|
5447
|
+
| \`icon\` | 86,410 | 29,544 | 25,346 | 61,332 | 21,022 | 17,047 |
|
|
5448
|
+
| \`icon-button\` | 44,066 | 14,348 | 12,789 | 12,955 | 2,901 | 2,279 |
|
|
5449
|
+
| \`image\` | 27,760 | 10,306 | 9,128 | 5,214 | 1,587 | 1,229 |
|
|
5450
|
+
| \`input\` | 51,304 | 17,264 | 15,257 | 11,243 | 3,332 | 2,503 |
|
|
5451
|
+
| \`kbd\` | 30,078 | 11,327 | 10,002 | 5,494 | 1,642 | 1,395 |
|
|
5452
|
+
| \`legend\` | 41,634 | 14,661 | 13,022 | 8,065 | 2,234 | 1,742 |
|
|
5453
|
+
| \`lightbox\` | 63,432 | 20,711 | 18,435 | 23,037 | 5,928 | 4,781 |
|
|
5454
|
+
| \`line-chart\` | 113,713 | 38,275 | 33,788 | 28,159 | 7,544 | 6,213 |
|
|
5455
|
+
| \`list\` | 69,295 | 23,264 | 20,709 | 21,585 | 5,865 | 4,846 |
|
|
5456
|
+
| \`listbox\` | 82,511 | 27,060 | 23,925 | 20,034 | 5,672 | 4,460 |
|
|
5457
|
+
| \`loader\` | 30,222 | 11,214 | 10,000 | 5,652 | 1,689 | 1,391 |
|
|
5458
|
+
| \`log\` | 92,972 | 30,033 | 26,625 | 49,605 | 13,886 | 11,925 |
|
|
5459
|
+
| \`map\` | 114,692 | 30,616 | 26,911 | 71,126 | 15,681 | 12,962 |
|
|
5460
|
+
| \`megamenu\` | 66,134 | 23,306 | 20,647 | 13,673 | 3,602 | 2,759 |
|
|
5461
|
+
| \`menu\` | 109,435 | 35,105 | 30,951 | 41,177 | 10,159 | 8,404 |
|
|
5462
|
+
| \`meter\` | 39,093 | 13,832 | 12,348 | 11,136 | 2,809 | 2,384 |
|
|
5463
|
+
| \`motion-toggle\` | 27,988 | 10,726 | 9,544 | 3,044 | 959 | 707 |
|
|
5464
|
+
| \`navigation\` | 37,585 | 13,566 | 12,044 | 7,075 | 1,981 | 1,573 |
|
|
5465
|
+
| \`notifications\` | 73,053 | 22,904 | 20,449 | 31,757 | 7,612 | 6,265 |
|
|
5466
|
+
| \`number-input\` | 62,610 | 20,545 | 18,301 | 18,544 | 4,821 | 3,758 |
|
|
5467
|
+
| \`object-inspector\` | 132,306 | 41,847 | 36,846 | 52,407 | 13,098 | 10,906 |
|
|
5468
|
+
| \`option\` | 30,122 | 10,929 | 9,712 | 7,585 | 2,133 | 1,790 |
|
|
5469
|
+
| \`orb\` | 36,885 | 14,019 | 12,487 | 10,016 | 3,707 | 3,177 |
|
|
5470
|
+
| \`outline\` | 38,845 | 13,846 | 12,301 | 12,105 | 3,440 | 2,893 |
|
|
5471
|
+
| \`pagination\` | 154,907 | 47,575 | 41,364 | 62,541 | 15,085 | 12,496 |
|
|
5472
|
+
| \`pin-input\` | 52,228 | 17,953 | 16,004 | 10,570 | 3,276 | 2,567 |
|
|
5473
|
+
| \`popover\` | 68,034 | 24,115 | 21,386 | 9,594 | 2,630 | 2,102 |
|
|
5474
|
+
| \`progress\` | 36,415 | 12,815 | 11,483 | 10,169 | 2,593 | 2,218 |
|
|
5475
|
+
| \`qr-code\` | 45,270 | 17,490 | 15,584 | 18,586 | 6,747 | 5,751 |
|
|
5476
|
+
| \`quote\` | 23,646 | 9,303 | 8,221 | 1,750 | 667 | 512 |
|
|
5477
|
+
| \`radio\` | 51,120 | 16,284 | 14,491 | 11,591 | 2,733 | 2,180 |
|
|
5478
|
+
| \`rating\` | 55,527 | 19,005 | 16,927 | 11,973 | 3,663 | 2,900 |
|
|
5479
|
+
| \`sandbox\` | 108,218 | 32,975 | 28,892 | 74,725 | 20,337 | 17,089 |
|
|
5480
|
+
| \`scatter-chart\` | 108,028 | 36,474 | 32,155 | 29,693 | 8,555 | 6,997 |
|
|
5481
|
+
| \`scroll-area\` | 36,301 | 12,383 | 11,026 | 13,508 | 3,526 | 2,845 |
|
|
5482
|
+
| \`select\` | 125,846 | 40,635 | 35,644 | 35,267 | 9,098 | 7,292 |
|
|
5483
|
+
| \`skeleton\` | 26,848 | 9,947 | 8,858 | 4,755 | 1,362 | 1,107 |
|
|
5484
|
+
| \`skip-link\` | 26,118 | 10,114 | 8,973 | 2,778 | 933 | 742 |
|
|
5485
|
+
| \`slider\` | 69,605 | 20,727 | 18,561 | 28,572 | 6,231 | 5,058 |
|
|
5486
|
+
| \`sparkline\` | 54,716 | 19,332 | 17,251 | 11,420 | 3,429 | 2,883 |
|
|
5487
|
+
| \`spatial-bar-chart\` | 114,232 | 39,177 | 34,554 | 28,899 | 8,569 | 7,152 |
|
|
5488
|
+
| \`spatial-heatmap\` | 126,828 | 42,151 | 37,057 | 41,457 | 11,708 | 9,722 |
|
|
5489
|
+
| \`spatial-ribbon-chart\` | 113,204 | 38,746 | 34,111 | 29,690 | 8,962 | 7,482 |
|
|
5490
|
+
| \`spatial-scatter-chart\` | 111,501 | 37,966 | 33,427 | 28,039 | 8,229 | 6,793 |
|
|
5491
|
+
| \`spatial-surface-chart\` | 113,878 | 39,176 | 34,564 | 30,366 | 9,355 | 7,849 |
|
|
5492
|
+
| \`spatial-treemap\` | 115,580 | 39,960 | 35,142 | 30,367 | 9,371 | 7,882 |
|
|
5493
|
+
| \`speed-dial\` | 76,667 | 26,447 | 23,479 | 17,966 | 4,352 | 3,553 |
|
|
5494
|
+
| \`splitter\` | 51,121 | 16,689 | 14,958 | 20,542 | 4,919 | 4,024 |
|
|
5495
|
+
| \`stat\` | 29,171 | 10,751 | 9,607 | 5,193 | 1,464 | 1,161 |
|
|
5496
|
+
| \`steps\` | 69,006 | 21,902 | 19,511 | 27,872 | 6,706 | 5,584 |
|
|
5497
|
+
| \`strands\` | 63,680 | 23,700 | 20,906 | 38,177 | 13,675 | 11,897 |
|
|
5498
|
+
| \`switch\` | 44,449 | 14,979 | 13,332 | 6,021 | 1,764 | 1,274 |
|
|
5499
|
+
| \`table\` | 136,974 | 40,482 | 35,192 | 62,692 | 15,341 | 12,836 |
|
|
5500
|
+
| \`tabs\` | 56,031 | 18,046 | 16,086 | 19,434 | 4,722 | 3,889 |
|
|
5501
|
+
| \`tag\` | 48,197 | 17,125 | 15,310 | 13,011 | 3,602 | 2,851 |
|
|
5502
|
+
| \`terminal\` | 96,310 | 27,266 | 24,053 | 55,074 | 12,010 | 9,924 |
|
|
5503
|
+
| \`text\` | 29,286 | 10,212 | 9,014 | 7,182 | 1,462 | 1,170 |
|
|
5504
|
+
| \`textarea\` | 48,905 | 16,375 | 14,608 | 9,403 | 2,632 | 2,089 |
|
|
5505
|
+
| \`time-input\` | 195,137 | 57,469 | 50,040 | 72,814 | 16,486 | 13,672 |
|
|
5506
|
+
| \`time-picker\` | 113,325 | 34,509 | 30,370 | 46,180 | 11,545 | 9,441 |
|
|
5507
|
+
| \`timeline\` | 39,321 | 13,742 | 12,310 | 10,973 | 2,660 | 2,171 |
|
|
5508
|
+
| \`toast\` | 60,192 | 20,340 | 18,154 | 20,046 | 5,371 | 4,349 |
|
|
5509
|
+
| \`toggle\` | 51,106 | 16,788 | 14,913 | 10,851 | 3,062 | 2,407 |
|
|
5510
|
+
| \`toolbar\` | 34,607 | 12,386 | 11,016 | 7,931 | 2,138 | 1,722 |
|
|
5511
|
+
| \`tooltip\` | 62,502 | 22,264 | 19,787 | 11,290 | 3,098 | 2,516 |
|
|
5512
|
+
| \`tour\` | 95,356 | 31,302 | 27,727 | 30,161 | 7,570 | 6,170 |
|
|
5513
|
+
| \`tree\` | 77,329 | 25,057 | 22,299 | 25,871 | 6,844 | 5,730 |
|
|
5514
|
+
| \`trend\` | 32,854 | 12,576 | 11,211 | 5,487 | 1,631 | 1,299 |
|
|
5515
|
+
| \`video\` | 164,366 | 48,824 | 42,602 | 87,272 | 20,643 | 17,204 |
|
|
5516
|
+
| \`video-playlist\` | 144,942 | 44,815 | 39,295 | 58,789 | 13,995 | 11,786 |
|
|
5517
|
+
| \`virtual-list\` | 66,376 | 22,417 | 20,005 | 25,370 | 7,654 | 6,326 |
|
|
5495
5518
|
|
|
5496
5519
|
## What an install adds to \`node_modules\`
|
|
5497
5520
|
|
|
@@ -5504,12 +5527,12 @@ without its whitespace, and the sizes count each one that way.
|
|
|
5504
5527
|
|
|
5505
5528
|
| Package | Unpacked | Files | Source maps stripped | Runtime dependencies |
|
|
5506
5529
|
|---|---|---|---|---|
|
|
5507
|
-
| \`@fusion.dev/helix-core\` | 2,
|
|
5508
|
-
| \`@fusion.dev/helix-headless\` |
|
|
5509
|
-
| \`@fusion.dev/helix-icons\` |
|
|
5510
|
-
| \`@fusion.dev/helix-styles\` | 122,
|
|
5530
|
+
| \`@fusion.dev/helix-core\` | 2,209,739 | 599 | 796,698 | \`@floating-ui/dom\`, \`@fusion.dev/helix-icons\`, \`tslib\` |
|
|
5531
|
+
| \`@fusion.dev/helix-headless\` | 24,213,495 | 778 | 2,564,547 | \`@fusion.dev/helix-core\`, \`@fusion.dev/helix-icons\`, \`tslib\`, \`uqr\` |
|
|
5532
|
+
| \`@fusion.dev/helix-icons\` | 154,507 | 21 | 50,303 | \`svgo\` |
|
|
5533
|
+
| \`@fusion.dev/helix-styles\` | 122,391 | 6 | 0 | none |
|
|
5511
5534
|
| \`@fusion.dev/helix-theme\` | 453,157 | 8 | 6,257 | none |
|
|
5512
|
-
| \`@fusion.dev/helix\` | 24,
|
|
5535
|
+
| \`@fusion.dev/helix\` | 24,834,707 | 1,029 | 569,278 | \`@fusion.dev/helix-core\`, \`@fusion.dev/helix-headless\`, \`@fusion.dev/helix-styles\`, \`tslib\` |
|
|
5513
5536
|
|
|
5514
5537
|
## Not measured yet
|
|
5515
5538
|
|
|
@@ -8327,6 +8350,429 @@ A declared \`value\`, \`open\`, \`checked\`, or \`active\` is a seed. The elemen
|
|
|
8327
8350
|
with that value and then applies its own changes. To refuse a change, cancel the
|
|
8328
8351
|
matching \`helix-before-*\` event. Skipping a state update does not refuse it. See
|
|
8329
8352
|
[State and control](./state-and-control).
|
|
8353
|
+
`,
|
|
8354
|
+
terminals: `---
|
|
8355
|
+
description: Add a terminal that runs your own shell or process to your site, styled with your theme and drawn by xterm.js.
|
|
8356
|
+
section: Essentials
|
|
8357
|
+
title: Terminals
|
|
8358
|
+
---
|
|
8359
|
+
|
|
8360
|
+
# Terminals
|
|
8361
|
+
|
|
8362
|
+
Helix Terminal puts a frame around a terminal drawn by xterm.js or an emulator
|
|
8363
|
+
of your own. The frame adds a header with the terminal's name and controls, a
|
|
8364
|
+
find bar, and a status line for a process that exited. \`@fusion.dev/helix-terminal\`
|
|
8365
|
+
connects the frame to the emulator and themes it from your tokens. Helix does
|
|
8366
|
+
not start processes. You connect the frame to yours, such as a pseudo-terminal
|
|
8367
|
+
on your server or in a desktop app.
|
|
8368
|
+
|
|
8369
|
+
## Add a terminal
|
|
8370
|
+
|
|
8371
|
+
Install Helix, the terminal connector, xterm.js, and the xterm.js addons you
|
|
8372
|
+
want:
|
|
8373
|
+
|
|
8374
|
+
\`\`\`sh
|
|
8375
|
+
bun add @fusion.dev/helix @fusion.dev/helix-terminal @xterm/xterm @xterm/addon-fit @xterm/addon-search @xterm/addon-web-links
|
|
8376
|
+
\`\`\`
|
|
8377
|
+
|
|
8378
|
+
Add the frame and an element for xterm.js to draw in:
|
|
8379
|
+
|
|
8380
|
+
\`\`\`html
|
|
8381
|
+
<helix-terminal label="~/project">
|
|
8382
|
+
<div id="terminal"></div>
|
|
8383
|
+
</helix-terminal>
|
|
8384
|
+
\`\`\`
|
|
8385
|
+
|
|
8386
|
+
Create the terminal in your theme, open it in the frame, then connect the two:
|
|
8387
|
+
|
|
8388
|
+
\`\`\`js
|
|
8389
|
+
import '@fusion.dev/helix/terminal'
|
|
8390
|
+
import '@xterm/xterm/css/xterm.css'
|
|
8391
|
+
import { connectTerminal, terminalThemeReady } from '@fusion.dev/helix-terminal'
|
|
8392
|
+
import { xtermDriver, xtermOptions } from '@fusion.dev/helix-terminal/xterm'
|
|
8393
|
+
import { FitAddon } from '@xterm/addon-fit'
|
|
8394
|
+
import { SearchAddon } from '@xterm/addon-search'
|
|
8395
|
+
import { WebLinksAddon } from '@xterm/addon-web-links'
|
|
8396
|
+
import { Terminal } from '@xterm/xterm'
|
|
8397
|
+
|
|
8398
|
+
const frame = document.querySelector('helix-terminal')
|
|
8399
|
+
const terminal = new Terminal(xtermOptions(await terminalThemeReady(frame)))
|
|
8400
|
+
terminal.open(document.getElementById('terminal'))
|
|
8401
|
+
|
|
8402
|
+
const connection = connectTerminal(
|
|
8403
|
+
frame,
|
|
8404
|
+
xtermDriver(terminal, {
|
|
8405
|
+
fit: new FitAddon(),
|
|
8406
|
+
search: new SearchAddon(),
|
|
8407
|
+
webLinks: WebLinksAddon,
|
|
8408
|
+
}),
|
|
8409
|
+
)
|
|
8410
|
+
|
|
8411
|
+
// Later, when the terminal goes away:
|
|
8412
|
+
connection.disconnect()
|
|
8413
|
+
terminal.dispose()
|
|
8414
|
+
\`\`\`
|
|
8415
|
+
|
|
8416
|
+
\`terminalThemeReady\` waits until your tokens can be read and the monospaced
|
|
8417
|
+
face has loaded. xterm.js measures its cells in the face it opens with, so a
|
|
8418
|
+
terminal created before the face loads keeps the fallback face's cell size.
|
|
8419
|
+
|
|
8420
|
+
Pass each addon new. The driver loads them, so do not load them yourself.
|
|
8421
|
+
|
|
8422
|
+
## Connect a process
|
|
8423
|
+
|
|
8424
|
+
The frame takes the process's output and sends what the reader types and the
|
|
8425
|
+
size of the grid. This example connects a pseudo-terminal on your server over
|
|
8426
|
+
a WebSocket:
|
|
8427
|
+
|
|
8428
|
+
\`\`\`js
|
|
8429
|
+
const socket = new WebSocket('wss://example.com/pty')
|
|
8430
|
+
socket.binaryType = 'arraybuffer'
|
|
8431
|
+
|
|
8432
|
+
// The process's output, as the bytes it wrote.
|
|
8433
|
+
socket.addEventListener('message', (event) => frame.write(new Uint8Array(event.data)))
|
|
8434
|
+
|
|
8435
|
+
// What the reader types and pastes, encoded for the program.
|
|
8436
|
+
frame.addEventListener('helix-terminal-input', (event) => {
|
|
8437
|
+
socket.send(JSON.stringify({ input: event.detail.data }))
|
|
8438
|
+
})
|
|
8439
|
+
|
|
8440
|
+
// The grid's size, which the pseudo-terminal takes as rows and columns.
|
|
8441
|
+
frame.addEventListener('helix-terminal-resize', (event) => {
|
|
8442
|
+
const { columns, rows } = event.detail
|
|
8443
|
+
socket.send(JSON.stringify({ columns, rows }))
|
|
8444
|
+
})
|
|
8445
|
+
\`\`\`
|
|
8446
|
+
|
|
8447
|
+
In a Tauri app, a command writes input to the pseudo-terminal and an event
|
|
8448
|
+
carries its output back. The frame takes the same three calls.
|
|
8449
|
+
|
|
8450
|
+
- \`write(data)\` takes a string or a \`Uint8Array\` of UTF-8. Output written
|
|
8451
|
+
before \`connectTerminal\` runs is held and written first, so the process can
|
|
8452
|
+
start before xterm.js loads.
|
|
8453
|
+
- \`helix-terminal-input\` carries \`data\` and \`binary\`. \`binary\` is \`true\` for
|
|
8454
|
+
some mouse reports, whose characters are each one byte: write them as bytes
|
|
8455
|
+
with \`Uint8Array.from(data, (character) => character.charCodeAt(0))\`.
|
|
8456
|
+
- \`helix-terminal-resize\` carries \`columns\` and \`rows\`, and \`width\` and
|
|
8457
|
+
\`height\` in CSS pixels, which a pseudo-terminal's size also takes. It is sent
|
|
8458
|
+
once when the frame connects and again whenever the grid changes size.
|
|
8459
|
+
- \`paste(text)\` inputs text as a paste does. It arrives as
|
|
8460
|
+
\`helix-terminal-input\`, wrapped in the bracketed paste codes when the program
|
|
8461
|
+
asked for them.
|
|
8462
|
+
|
|
8463
|
+
### Keep up with a fast process
|
|
8464
|
+
|
|
8465
|
+
\`write()\` returns a promise that resolves once xterm.js has parsed the output.
|
|
8466
|
+
A process can write faster than a terminal draws, so pause it while too much
|
|
8467
|
+
is waiting:
|
|
8468
|
+
|
|
8469
|
+
\`\`\`js
|
|
8470
|
+
let waiting = 0
|
|
8471
|
+
|
|
8472
|
+
pty.onData(async (chunk) => {
|
|
8473
|
+
waiting += chunk.length
|
|
8474
|
+
if (waiting > 1_000_000) {
|
|
8475
|
+
pty.pause()
|
|
8476
|
+
}
|
|
8477
|
+
await frame.write(chunk)
|
|
8478
|
+
waiting -= chunk.length
|
|
8479
|
+
if (waiting < 100_000) {
|
|
8480
|
+
pty.resume()
|
|
8481
|
+
}
|
|
8482
|
+
})
|
|
8483
|
+
\`\`\`
|
|
8484
|
+
|
|
8485
|
+
### When the process exits
|
|
8486
|
+
|
|
8487
|
+
Set \`exit-code\` when the process exits. The status line says how it exited,
|
|
8488
|
+
the frame stops sending input, and a Restart button appears. Restart sends
|
|
8489
|
+
\`helix-terminal-restart\`. Start a new process, clear \`exitCode\`, and write the
|
|
8490
|
+
new output:
|
|
8491
|
+
|
|
8492
|
+
Put buttons of your own beside Restart in the \`exit-actions\` slot, such as one
|
|
8493
|
+
that opens the whole log. They show once the process exits.
|
|
8494
|
+
|
|
8495
|
+
\`\`\`js
|
|
8496
|
+
pty.onExit((code) => {
|
|
8497
|
+
frame.exitCode = code
|
|
8498
|
+
})
|
|
8499
|
+
|
|
8500
|
+
frame.addEventListener('helix-terminal-restart', () => {
|
|
8501
|
+
frame.exitCode = undefined
|
|
8502
|
+
frame.reset()
|
|
8503
|
+
pty = start()
|
|
8504
|
+
})
|
|
8505
|
+
\`\`\`
|
|
8506
|
+
|
|
8507
|
+
## What the connector does
|
|
8508
|
+
|
|
8509
|
+
\`connectTerminal\` links the frame to the emulator:
|
|
8510
|
+
|
|
8511
|
+
- The frame's output reaches the emulator, and the reader's input reaches the
|
|
8512
|
+
frame.
|
|
8513
|
+
- The grid fits the frame and fits again when the frame changes size. Set
|
|
8514
|
+
\`columns\` and \`rows\` on the frame for a grid of a fixed size.
|
|
8515
|
+
- The emulator is themed from your tokens, and themed again when your theme or
|
|
8516
|
+
color mode changes.
|
|
8517
|
+
- Every cell's text keeps a contrast of 4.5:1 against its ground, so a color a
|
|
8518
|
+
program chose stays readable on your theme. Pass \`{ contrast: 7 }\` for a
|
|
8519
|
+
higher floor, or \`{ contrast: 1 }\` to draw every color as the program wrote
|
|
8520
|
+
it.
|
|
8521
|
+
- The cursor stops blinking and scrolling stops animating when a reader has
|
|
8522
|
+
asked for reduced motion.
|
|
8523
|
+
- \`connection.fit()\` fits the grid again, for a page that resized the frame in
|
|
8524
|
+
a way the connector cannot see.
|
|
8525
|
+
- \`connection.disconnect()\` puts back everything \`connectTerminal\` changed.
|
|
8526
|
+
|
|
8527
|
+
Use \`xtermDriver(terminal, addons)\` for xterm.js 6. xterm.js is not bundled
|
|
8528
|
+
with Helix, so you can use the version you already have.
|
|
8529
|
+
|
|
8530
|
+
## Use other xterm.js addons
|
|
8531
|
+
|
|
8532
|
+
You create the xterm.js terminal, so you load any addon on it the way
|
|
8533
|
+
xterm.js describes, before or after you connect. This loads the WebGL renderer
|
|
8534
|
+
and the Unicode 11 character widths:
|
|
8535
|
+
|
|
8536
|
+
\`\`\`js
|
|
8537
|
+
import { Unicode11Addon } from '@xterm/addon-unicode11'
|
|
8538
|
+
import { WebglAddon } from '@xterm/addon-webgl'
|
|
8539
|
+
|
|
8540
|
+
const terminal = new Terminal({
|
|
8541
|
+
...xtermOptions(await terminalThemeReady(frame)),
|
|
8542
|
+
allowProposedApi: true,
|
|
8543
|
+
})
|
|
8544
|
+
terminal.open(document.getElementById('terminal'))
|
|
8545
|
+
terminal.loadAddon(new WebglAddon())
|
|
8546
|
+
terminal.loadAddon(new Unicode11Addon())
|
|
8547
|
+
terminal.unicode.activeVersion = '11'
|
|
8548
|
+
\`\`\`
|
|
8549
|
+
|
|
8550
|
+
The connector sets the theme, the face, and its options on the terminal
|
|
8551
|
+
itself, so an addon such as the WebGL renderer draws in your theme and keeps
|
|
8552
|
+
the contrast floor.
|
|
8553
|
+
|
|
8554
|
+
- **Fit, search, and web links go to the driver.** Pass them to \`xtermDriver\`
|
|
8555
|
+
unloaded, and the driver loads them: an addon loaded twice breaks. They are
|
|
8556
|
+
also what draws the frame's find bar and sends \`helix-terminal-link\`. With a
|
|
8557
|
+
search addon of your own, the frame draws no Find control, and with a web
|
|
8558
|
+
links addon of your own, a link it finds skips the event.
|
|
8559
|
+
- **Some addons need xterm.js's proposed API.** xterm.js refuses its Unicode
|
|
8560
|
+
handling, decorations, markers, and character joiners until
|
|
8561
|
+
\`allowProposedApi\` is on, and the Unicode 11 addon uses the first of these.
|
|
8562
|
+
The driver turns the option on while it holds a search addon and puts it
|
|
8563
|
+
back as it was on disconnect, so set it when you create the terminal for any
|
|
8564
|
+
other addon that needs it.
|
|
8565
|
+
- **The connection owns the link handler.** While connected, the driver sets
|
|
8566
|
+
xterm.js's \`linkHandler\` so every link reaches \`helix-terminal-link\`, and it
|
|
8567
|
+
puts yours back on disconnect. Listen for the event to handle a link.
|
|
8568
|
+
- **The key handler stays yours.** The frame takes its own keys before xterm.js
|
|
8569
|
+
sees them, so \`attachCustomKeyEventHandler\` is free for keys of your own.
|
|
8570
|
+
|
|
8571
|
+
## Style the terminal with your theme
|
|
8572
|
+
|
|
8573
|
+
The frame reads each color from a custom property, and the connector draws
|
|
8574
|
+
the terminal in it. The styled frame sets every one from your tokens. Set one
|
|
8575
|
+
on the terminal to choose a color yourself:
|
|
8576
|
+
|
|
8577
|
+
\`\`\`css
|
|
8578
|
+
helix-terminal {
|
|
8579
|
+
--terminal-ansi-blue: #3b82f6;
|
|
8580
|
+
--terminal-cursor-color: var(--helix-color-accent);
|
|
8581
|
+
}
|
|
8582
|
+
\`\`\`
|
|
8583
|
+
|
|
8584
|
+
| Property | Default | Draws |
|
|
8585
|
+
|---|---|---|
|
|
8586
|
+
| \`--terminal-active-match-background-color\` | Warning, mixed with the ground | The current match of a search |
|
|
8587
|
+
| \`--terminal-active-match-border-color\` | \`--helix-color-warning\` | The edge of the current match |
|
|
8588
|
+
| \`--terminal-ansi-black\` | \`--helix-color-foreground\` in light, \`--helix-color-border\` in dark | ANSI black |
|
|
8589
|
+
| \`--terminal-ansi-blue\` | \`--helix-color-info\` | ANSI blue |
|
|
8590
|
+
| \`--terminal-ansi-cyan\` | Info mixed with success | ANSI cyan |
|
|
8591
|
+
| \`--terminal-ansi-green\` | \`--helix-color-success\` | ANSI green |
|
|
8592
|
+
| \`--terminal-ansi-magenta\` | \`--helix-color-syntax-callable\` | ANSI magenta |
|
|
8593
|
+
| \`--terminal-ansi-red\` | \`--helix-color-danger\` | ANSI red |
|
|
8594
|
+
| \`--terminal-ansi-white\` | \`--helix-color-foreground-subtle\` in light, between muted and the foreground in dark | ANSI white |
|
|
8595
|
+
| \`--terminal-ansi-yellow\` | \`--helix-color-warning\` | ANSI yellow |
|
|
8596
|
+
| \`--terminal-background-color\` | \`--helix-color-background\` | The ground |
|
|
8597
|
+
| \`--terminal-color\` | \`--helix-color-foreground\` | Text where the program sets no color |
|
|
8598
|
+
| \`--terminal-cursor-color\` | \`--helix-color-primary\` | The cursor |
|
|
8599
|
+
| \`--terminal-match-background-color\` | Warning, mixed more quietly with the ground | Every other match of a search |
|
|
8600
|
+
| \`--terminal-scrollbar-thumb-color\` | \`--helix-scrollbar-thumb-color\` | The scrollbar |
|
|
8601
|
+
| \`--terminal-selection-background-color\` | Primary at 30% | Selected text |
|
|
8602
|
+
|
|
8603
|
+
Each bright color has a property of its own, such as \`--terminal-ansi-bright-red\`,
|
|
8604
|
+
and defaults to its color mixed a quarter of the way to \`--helix-color-foreground\`,
|
|
8605
|
+
so it is lighter in dark mode and darker in light. Set a color alone and its
|
|
8606
|
+
bright form follows it. The bright gray, \`--terminal-ansi-bright-black\`,
|
|
8607
|
+
defaults to \`--helix-color-foreground-muted\`, and bright white to
|
|
8608
|
+
\`--helix-color-border\` in light and \`--helix-color-foreground\` in dark.
|
|
8609
|
+
|
|
8610
|
+
On the headless tier, \`helix-headless-terminal\` sets none of them. Set the
|
|
8611
|
+
ones you want, and xterm.js keeps its own color for the rest.
|
|
8612
|
+
|
|
8613
|
+
The colors share Log's hues, so a program's output reads the same in a log and
|
|
8614
|
+
in a terminal side by side. The four grays keep their order from dark to light
|
|
8615
|
+
in each color mode: a program that fills a panel with black expects it to be
|
|
8616
|
+
dark. Text a program writes in a gray that is faint against your ground is
|
|
8617
|
+
lifted to the contrast floor.
|
|
8618
|
+
|
|
8619
|
+
The grid is drawn in the viewport's face, which the styled frame sets from
|
|
8620
|
+
\`--terminal-font-family\`, the monospaced face by default, and
|
|
8621
|
+
\`--terminal-font-size\`, the small text step. It also takes
|
|
8622
|
+
\`--terminal-block-size\`, \`--terminal-border-color\`,
|
|
8623
|
+
\`--terminal-header-background-color\`, \`--terminal-padding\`, and
|
|
8624
|
+
\`--terminal-radius\`. The [Terminal reference](/helix/components/terminal) lists
|
|
8625
|
+
what each one draws.
|
|
8626
|
+
|
|
8627
|
+
## Show a command's output
|
|
8628
|
+
|
|
8629
|
+
Set \`readonly\` to show output that takes no input, such as a command an agent
|
|
8630
|
+
ran. The frame draws no cursor and sends no input. Set \`columns\` and \`rows\` to
|
|
8631
|
+
draw the output at the size the command ran at:
|
|
8632
|
+
|
|
8633
|
+
\`\`\`html
|
|
8634
|
+
<helix-terminal controls="find copy" label="bun run build" readonly columns="80" rows="12">
|
|
8635
|
+
<div id="transcript"></div>
|
|
8636
|
+
</helix-terminal>
|
|
8637
|
+
\`\`\`
|
|
8638
|
+
|
|
8639
|
+
## Fill a pane
|
|
8640
|
+
|
|
8641
|
+
Set \`fill\` for a terminal that fills a pane, such as one side of a \`Splitter\`.
|
|
8642
|
+
The frame covers its container, which needs a position of its own, such as
|
|
8643
|
+
\`position: relative\`. Set \`separation="plain"\` where the pane already draws its
|
|
8644
|
+
edges. Put buttons of your own in the \`actions\` slot, before the built-in
|
|
8645
|
+
controls, and in \`find-actions\` for the find bar. Each takes the size of the
|
|
8646
|
+
buttons beside it:
|
|
8647
|
+
|
|
8648
|
+
\`\`\`html
|
|
8649
|
+
<div class="pane">
|
|
8650
|
+
<helix-terminal fill label="zsh" separation="plain">
|
|
8651
|
+
<helix-icon-button label="New terminal" slot="actions">
|
|
8652
|
+
<helix-icon name="plus"></helix-icon>
|
|
8653
|
+
</helix-icon-button>
|
|
8654
|
+
<div id="terminal"></div>
|
|
8655
|
+
</helix-terminal>
|
|
8656
|
+
</div>
|
|
8657
|
+
\`\`\`
|
|
8658
|
+
|
|
8659
|
+
The frame keeps its own \`label\` when a program sets its title.
|
|
8660
|
+
\`helix-terminal-title\` carries the new title, so you can show it where it
|
|
8661
|
+
belongs, such as on the tab the terminal sits under.
|
|
8662
|
+
|
|
8663
|
+
## Links
|
|
8664
|
+
|
|
8665
|
+
A link in the output sends \`helix-terminal-link\` with its \`href\` when a reader
|
|
8666
|
+
activates it. Left alone, the frame opens an \`http\` or \`https\` address in a new
|
|
8667
|
+
tab and opens nothing else, since a program can write any address. Cancel the
|
|
8668
|
+
event to open the link yourself, as a desktop app does through the system's
|
|
8669
|
+
browser:
|
|
8670
|
+
|
|
8671
|
+
\`\`\`js
|
|
8672
|
+
frame.addEventListener('helix-terminal-link', (event) => {
|
|
8673
|
+
event.preventDefault()
|
|
8674
|
+
openInBrowser(event.detail.href)
|
|
8675
|
+
})
|
|
8676
|
+
\`\`\`
|
|
8677
|
+
|
|
8678
|
+
Links a program writes as hyperlinks always work. Pass \`WebLinksAddon\` to
|
|
8679
|
+
\`xtermDriver\` to also make the addresses in plain text into links.
|
|
8680
|
+
|
|
8681
|
+
## Keyboard and screen readers
|
|
8682
|
+
|
|
8683
|
+
- Every key goes to the program, including Tab, Shift+Tab, and Escape, except
|
|
8684
|
+
the keys below.
|
|
8685
|
+
- Control+Shift+F, or Command+F on a Mac, opens the find bar. Enter moves to
|
|
8686
|
+
the next match and Shift+Enter to the previous one. Escape closes the bar and
|
|
8687
|
+
returns focus to the terminal. Screen readers hear how many matches there are.
|
|
8688
|
+
- Control+Shift+C copies the selection. On a Mac, Command+C does.
|
|
8689
|
+
- Control+M, or Control+Shift+M on a Mac, switches Tab between typing in the
|
|
8690
|
+
terminal and moving focus out of it. The status line says when Tab moves
|
|
8691
|
+
focus, and screen readers hear each change. The terminal's input describes
|
|
8692
|
+
this key to a screen reader. In a terminal, Control+M types the same
|
|
8693
|
+
character as Enter.
|
|
8694
|
+
- The frame is a named group. Its controls come before the terminal in the
|
|
8695
|
+
tab order, as one toolbar: Tab reaches it once, and the arrow keys move
|
|
8696
|
+
between its buttons, including the ones you put in \`actions\`. The find bar's
|
|
8697
|
+
buttons are a second toolbar after its field. The terminal's input is one tab
|
|
8698
|
+
stop. Name each terminal with \`label\` so a reader can tell several apart.
|
|
8699
|
+
- A terminal draws its grid as a picture of text, which a screen reader cannot
|
|
8700
|
+
read. Set \`screen-reader-mode\` to have xterm.js keep the grid as lines a
|
|
8701
|
+
screen reader can move through, and announce new output as it arrives. It
|
|
8702
|
+
costs time on every write, so it is off by default. A browser cannot tell
|
|
8703
|
+
whether a screen reader is running, so connect it to a setting your reader
|
|
8704
|
+
can turn on:
|
|
8705
|
+
|
|
8706
|
+
\`\`\`js
|
|
8707
|
+
frame.screenReaderMode = settings.screenReader
|
|
8708
|
+
\`\`\`
|
|
8709
|
+
|
|
8710
|
+
- \`text()\` returns the lines on screen as plain text, and \`text('all')\`
|
|
8711
|
+
returns every line the scrollback holds, which is how an assistant reads a
|
|
8712
|
+
terminal it has been allowed to see.
|
|
8713
|
+
|
|
8714
|
+
## Write a driver
|
|
8715
|
+
|
|
8716
|
+
To use another emulator, write a driver: an object that draws the frame's
|
|
8717
|
+
output and tells the frame what the reader typed. \`connectTerminal\` calls it.
|
|
8718
|
+
\`xtermDriver\` is one, and the \`TerminalDriver\` type in
|
|
8719
|
+
\`@fusion.dev/helix-terminal\` describes every method.
|
|
8720
|
+
|
|
8721
|
+
### Required methods
|
|
8722
|
+
|
|
8723
|
+
- \`write(data, done)\` draws the program's output, a string or a \`Uint8Array\`,
|
|
8724
|
+
and calls \`done\` once it has been parsed.
|
|
8725
|
+
- \`onInput(input)\` calls \`input(data, binary)\` with what the reader types or
|
|
8726
|
+
pastes, encoded for the program, and returns a function that stops.
|
|
8727
|
+
|
|
8728
|
+
### Optional methods
|
|
8729
|
+
|
|
8730
|
+
Each optional method turns on a feature. Without it, the feature is off and
|
|
8731
|
+
nothing fails. A control in the header that a driver cannot answer is not
|
|
8732
|
+
drawn.
|
|
8733
|
+
|
|
8734
|
+
| Method | What it must do | Turns on |
|
|
8735
|
+
|---|---|---|
|
|
8736
|
+
| \`clear()\` | Clear the scrollback, keeping the cursor's line | The clear button, and \`clear()\` |
|
|
8737
|
+
| \`element()\` | Return the element the emulator draws in | Refitting when it changes size |
|
|
8738
|
+
| \`fit()\` | Fit the grid to its element, and report the new size through \`onResize\` | A grid that fills the frame |
|
|
8739
|
+
| \`focus()\` | Focus the emulator's input | \`focus()\`, and focus returning from the find bar |
|
|
8740
|
+
| \`input()\` | Return the element that takes keys | Naming the input for screen readers |
|
|
8741
|
+
| \`onBell(rang)\` | Call \`rang\` on the bell, and return a function that stops | \`helix-terminal-bell\` and the flash |
|
|
8742
|
+
| \`onLink(activated)\` | Call \`activated(href)\` when a link is used, and return a function that stops | \`helix-terminal-link\` |
|
|
8743
|
+
| \`onResize(resized)\` | Call \`resized({ columns, rows })\` when the grid changes size | \`helix-terminal-resize\` after the first |
|
|
8744
|
+
| \`onSelection(changed)\` | Call \`changed\` when the selection changes | The copy button's state |
|
|
8745
|
+
| \`onTitle(changed)\` | Call \`changed(title)\` when the program sets its title | \`helix-terminal-title\` |
|
|
8746
|
+
| \`options(options)\` | Apply \`contrast\`, \`cursor\`, \`input\`, \`motion\`, and \`screenReader\` | Read-only output, the contrast floor, reduced motion, and screen reader mode |
|
|
8747
|
+
| \`paste(text)\` | Input text as a paste does | \`paste()\` |
|
|
8748
|
+
| \`pixels()\` | Return the grid's \`width\` and \`height\` in CSS pixels | The pixel size in \`helix-terminal-resize\` |
|
|
8749
|
+
| \`release()\` | Put back what the driver changed | A clean \`disconnect()\` |
|
|
8750
|
+
| \`reset()\` | Reset the emulator | \`reset()\` |
|
|
8751
|
+
| \`resize(columns, rows)\` | Set the grid's size in cells | \`columns\` and \`rows\` on the frame |
|
|
8752
|
+
| \`search\` | An object with \`find(query, options, matches)\`, \`end()\`, and \`onResults(found)\` | The find bar |
|
|
8753
|
+
| \`selection()\` | Return the selected text | The copy button and its key |
|
|
8754
|
+
| \`size()\` | Return the grid's \`{ columns, rows }\` | The first \`helix-terminal-resize\` |
|
|
8755
|
+
| \`text(scope)\` | Return the screen, or with \`all\` the scrollback, as text | \`text()\` |
|
|
8756
|
+
| \`theme(theme)\` | Draw in \`theme.colors\` and \`theme.font\` | Theming |
|
|
8757
|
+
|
|
8758
|
+
\`connection.disconnect()\` calls every function a method returned, detaches the
|
|
8759
|
+
driver from the frame, and calls \`release()\`.
|
|
8760
|
+
|
|
8761
|
+
### Draw your own terminal
|
|
8762
|
+
|
|
8763
|
+
A page that draws a terminal without a driver hands the frame a renderer of
|
|
8764
|
+
its own with \`frame.attach(renderer)\`. It returns the calls that tell the frame
|
|
8765
|
+
what happened: \`input\`, \`resized\`, \`title\`, \`bell\`, \`link\`, \`selected\`, \`found\`,
|
|
8766
|
+
and \`detach\`. The \`TerminalRenderer\` and \`TerminalSink\` types in
|
|
8767
|
+
\`@fusion.dev/helix-headless/terminal\` describe both.
|
|
8768
|
+
|
|
8769
|
+
### Test a driver
|
|
8770
|
+
|
|
8771
|
+
Our specs test the xterm.js driver twice. A stand-in terminal records what the
|
|
8772
|
+
driver asks of it, which runs anywhere. Then the browser specs connect a frame
|
|
8773
|
+
to the real xterm.js, write output, type, search, and check what the frame
|
|
8774
|
+
said. Test your driver the same way: connect it to a frame, write to the frame,
|
|
8775
|
+
and read \`text()\` back.
|
|
8330
8776
|
`,
|
|
8331
8777
|
'theme-builder': `---
|
|
8332
8778
|
description: Enter your theme inputs and see every token Helix computes from them.
|