@fusion.dev/helix-docs 0.99.0 → 0.101.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.
@@ -46,7 +46,7 @@ a combobox that appears not to open.
46
46
 
47
47
  [//]: # (renders)
48
48
 
49
- **27 of the 94 headless families interpolate another family's tag**, across 20 distinct children.
49
+ **27 of the 95 headless families interpolate another family's tag**, across 20 distinct children.
50
50
 
51
51
  | Family | Renders |
52
52
  |---|---|
@@ -119,7 +119,41 @@ consumer's 15 kB to about 90.
119
119
  Only the default weight carries that index, so `name` draws bold. A consumer who
120
120
  wants the set in another weight imports the values and hands them over.
121
121
 
122
- ## Adding one
122
+ ## A set of your own
123
+
124
+ The generator that builds this set is the package's own command, so you are not
125
+ waiting on us to carry a glyph:
126
+
127
+ ```sh
128
+ npx helix-icons build --source ./brand-icons --out src/icons.ts
129
+ ```
130
+
131
+ ```tsx
132
+ import { peak } from './icons'
133
+
134
+ <helix-icon icon={peak} />
135
+ ```
136
+
137
+ It reads a directory of SVG files and writes the module the element draws from,
138
+ which is the same job whether the drawings are yours, another library's, or the
139
+ 1,404 Phosphor glyphs this set does not carry:
140
+
141
+ ```sh
142
+ npx helix-icons build \
143
+ --source node_modules/@phosphor-icons/core/assets/regular \
144
+ --list mine.txt --out src/icons.ts
145
+ ```
146
+
147
+ `--suffix` is for a set that spells the weight into the file name, Phosphor's
148
+ bold being `caret-down-bold.svg`. `--index` also writes the record `name` reads,
149
+ which you want if your own elements take a name in markup and do not want
150
+ otherwise, since it is the part nothing can drop.
151
+
152
+ **A name in two sources is refused rather than decided.** A precedence decides
153
+ silently, and the glyph on the page would be whichever directory sat higher with
154
+ nothing looking wrong afterwards.
155
+
156
+ ## Adding one to this set
123
157
 
124
158
  Add the name to `helix/icons/icons.txt` and run `turbo run icons`. Phosphor names
125
159
  resolve from `@phosphor-icons/core` at build time, so adding a glyph is adding a
@@ -59,10 +59,10 @@ repository does that. The per-component tables are what a page pays.
59
59
  | Package | Raw | Gzip | Brotli | |
60
60
  |---|---|---|---|---|
61
61
  | `@fusion.dev/helix-core` | 156,003 | 51,384 | 43,598 | Element base class, mixins, decorators, floating positioning. |
62
- | `@fusion.dev/helix-headless` | 604,545 | 156,940 | 122,421 | Every headless family, which is what the barrel means. |
62
+ | `@fusion.dev/helix-headless` | 609,467 | 158,001 | 122,755 | Every headless family, which is what the barrel means. |
63
63
  | `@fusion.dev/helix-icons` | 47,484 | 14,907 | 12,553 | The whole glyph set. |
64
64
  | `@fusion.dev/helix-theme` | 3,288 | 1,571 | 1,355 | The derivation engine. Build time for most consumers, runtime for a theme switcher. |
65
- | `@fusion.dev/helix` | 1,081,623 | 253,263 | 186,323 | Every styled family. |
65
+ | `@fusion.dev/helix` | 1,089,445 | 254,911 | 187,079 | Every styled family. |
66
66
  | `lit` | 15,394 | 6,118 | 5,460 | Not ours. Here so it can be subtracted from every row above it. |
67
67
 
68
68
  ## The stylesheets
@@ -76,20 +76,20 @@ is the whole cost of adopting the base layer on its own.
76
76
  | File | Raw | Gzip | Brotli | |
77
77
  |---|---|---|---|---|
78
78
  | `base.css` | 30,672 | 4,430 | 3,844 | The base layer. Recipes for markup Helix does not render, usable with no JavaScript at all. |
79
- | `elements.css` | 7,848 | 1,341 | 1,202 | Hides each element until its definition loads, generated from the tags in `@fusion.dev/helix`. |
79
+ | `elements.css` | 7,964 | 1,356 | 1,217 | Hides each element until its definition loads, generated from the tags in `@fusion.dev/helix`. |
80
80
  | `helix.css` | 207 | 148 | 118 | The four above in one import, in the order they have to be in. |
81
81
  | `primitives.css` | 6,390 | 1,260 | 1,084 | The primitive layer. Private, shipped because `tokens.css` resolves into it. |
82
82
  | `tokens.css` | 20,987 | 2,567 | 2,138 | The 191 semantic tokens. Nothing paints without this. |
83
83
 
84
84
  ## What the numbers say
85
85
 
86
- **Most of a first component is the runtime under it.** The median styled family is 18,837 bytes gzipped alone and adds 2,220 to a page that already has Helix on it, so 88 percent of the first one is shared and 12 percent is the component. Ten typical components are one plus nine additions rather than ten of the first number, and the pair of columns below is what lets that be worked out rather than guessed.
86
+ **Most of a first component is the runtime under it.** The median styled family is 17,431 bytes gzipped alone and adds 2,218 to a page that already has Helix on it, so 87 percent of the first one is shared and 13 percent is the component. Ten typical components are one plus nine additions rather than ten of the first number, and the pair of columns below is what lets that be worked out rather than guessed.
87
87
 
88
- Across the tier: the cheapest is `code` at 9,451 gzipped alone, the dearest `data-table` at 59,280, over 100 components. Every family at once is 253,263.
88
+ Across the tier: the cheapest is `code` at 9,451 gzipped alone, the dearest `data-table` at 59,280, over 101 components. Every family at once is 254,911.
89
89
 
90
- **No family imports a barrel, and the `barrels` rule in `fusion workspace` is what keeps it that way.** `@fusion.dev/helix-headless` is `sideEffects` over every module in `dist`, which is true of a file that calls `customElements.define` and which means a bundler may drop none of it: one `import { HelixHeadlessButton } from '@fusion.dev/helix-headless'` costs 156,940 bytes gzipped whatever else the page does, which is 8 times the median family measured above. The styled tier imports the family it extends instead, all 100 of them, and the check refuses the shape rather than the package name, so the rule follows `sideEffects` wherever it goes.
90
+ **No family imports a barrel, and the `barrels` rule in `fusion workspace` is what keeps it that way.** `@fusion.dev/helix-headless` is `sideEffects` over every module in `dist`, which is true of a file that calls `customElements.define` and which means a bundler may drop none of it: one `import { HelixHeadlessButton } from '@fusion.dev/helix-headless'` costs 158,001 bytes gzipped whatever else the page does, which is 9 times the median family measured above. The styled tier imports the family it extends instead, all 101 of them, and the check refuses the shape rather than the package name, so the rule follows `sideEffects` wherever it goes.
91
91
 
92
- The headless tier never had the problem, and it is the control: `@fusion.dev/helix-core` is `sideEffects: false`, and a headless family is a median of 20,531 bytes gzipped alone.
92
+ The headless tier never had the problem, and it is the control: `@fusion.dev/helix-core` is `sideEffects: false`, and a headless family is a median of 20,365 bytes gzipped alone.
93
93
 
94
94
  ## Against other systems
95
95
 
@@ -226,6 +226,7 @@ Structure, accessibility, state and form participation. No presentation, and no
226
226
  | `input` | 86,357 | 28,367 | 23,214 | 4,742 | 1,328 | 1,072 |
227
227
  | `kbd` | 30,274 | 10,348 | 9,112 | 2,976 | 1,036 | 863 |
228
228
  | `legend` | 32,326 | 10,852 | 9,561 | 1,080 | 299 | 308 |
229
+ | `lightbox` | 36,221 | 11,642 | 10,265 | 4,740 | 1,295 | 1,048 |
229
230
  | `line-chart` | 74,340 | 25,327 | 22,436 | 10,591 | 3,107 | 2,621 |
230
231
  | `list` | 29,376 | 9,761 | 8,590 | 1,726 | 354 | 293 |
231
232
  | `listbox` | 94,570 | 30,854 | 25,190 | 10,942 | 3,007 | 2,401 |
@@ -330,6 +331,7 @@ The headless tier plus presentation. This is what `bun add @fusion.dev/helix` gi
330
331
  | `input` | 92,624 | 29,730 | 24,373 | 11,004 | 2,686 | 2,186 |
331
332
  | `kbd` | 31,686 | 10,798 | 9,494 | 4,373 | 1,491 | 1,217 |
332
333
  | `legend` | 37,142 | 11,968 | 10,511 | 5,790 | 1,395 | 1,125 |
334
+ | `lightbox` | 39,168 | 12,359 | 10,889 | 7,670 | 2,017 | 1,697 |
333
335
  | `line-chart` | 84,111 | 27,333 | 24,253 | 20,340 | 5,147 | 4,337 |
334
336
  | `list` | 33,442 | 10,705 | 9,446 | 5,782 | 1,313 | 1,161 |
335
337
  | `listbox` | 98,839 | 31,853 | 26,044 | 15,204 | 3,989 | 3,280 |
@@ -395,11 +397,11 @@ column is what was removed rather than part of what remains.
395
397
  | Package | Unpacked | Files | Source maps stripped | Runtime dependencies |
396
398
  |---|---|---|---|---|
397
399
  | `@fusion.dev/helix-core` | 984,477 | 153 | 222,482 | `@floating-ui/dom`, `@fusion.dev/helix-icons` |
398
- | `@fusion.dev/helix-headless` | 11,366,181 | 464 | 836,952 | `@fusion.dev/helix-core`, `@fusion.dev/helix-icons`, `uqr` |
399
- | `@fusion.dev/helix-icons` | 121,091 | 17 | 37,263 | none |
400
- | `@fusion.dev/helix-styles` | 101,139 | 6 | 0 | none |
400
+ | `@fusion.dev/helix-headless` | 11,510,142 | 470 | 847,366 | `@fusion.dev/helix-core`, `@fusion.dev/helix-icons`, `uqr` |
401
+ | `@fusion.dev/helix-icons` | 131,512 | 21 | 44,809 | `svgo` |
402
+ | `@fusion.dev/helix-styles` | 101,255 | 6 | 0 | none |
401
403
  | `@fusion.dev/helix-theme` | 465,413 | 8 | 4,703 | none |
402
- | `@fusion.dev/helix` | 12,499,093 | 796 | 333,986 | `@fusion.dev/helix-core`, `@fusion.dev/helix-headless`, `@fusion.dev/helix-styles` |
404
+ | `@fusion.dev/helix` | 12,639,631 | 806 | 337,152 | `@fusion.dev/helix-core`, `@fusion.dev/helix-headless`, `@fusion.dev/helix-styles` |
403
405
 
404
406
  ## Not measured yet
405
407
 
@@ -316,7 +316,7 @@ a combobox that appears not to open.
316
316
 
317
317
  [//]: # (renders)
318
318
 
319
- **27 of the 94 headless families interpolate another family's tag**, across 20 distinct children.
319
+ **27 of the 95 headless families interpolate another family's tag**, across 20 distinct children.
320
320
 
321
321
  | Family | Renders |
322
322
  |---|---|
@@ -1570,7 +1570,41 @@ consumer's 15 kB to about 90.
1570
1570
  Only the default weight carries that index, so \`name\` draws bold. A consumer who
1571
1571
  wants the set in another weight imports the values and hands them over.
1572
1572
 
1573
- ## Adding one
1573
+ ## A set of your own
1574
+
1575
+ The generator that builds this set is the package's own command, so you are not
1576
+ waiting on us to carry a glyph:
1577
+
1578
+ \`\`\`sh
1579
+ npx helix-icons build --source ./brand-icons --out src/icons.ts
1580
+ \`\`\`
1581
+
1582
+ \`\`\`tsx
1583
+ import { peak } from './icons'
1584
+
1585
+ <helix-icon icon={peak} />
1586
+ \`\`\`
1587
+
1588
+ It reads a directory of SVG files and writes the module the element draws from,
1589
+ which is the same job whether the drawings are yours, another library's, or the
1590
+ 1,404 Phosphor glyphs this set does not carry:
1591
+
1592
+ \`\`\`sh
1593
+ npx helix-icons build \\
1594
+ --source node_modules/@phosphor-icons/core/assets/regular \\
1595
+ --list mine.txt --out src/icons.ts
1596
+ \`\`\`
1597
+
1598
+ \`--suffix\` is for a set that spells the weight into the file name, Phosphor's
1599
+ bold being \`caret-down-bold.svg\`. \`--index\` also writes the record \`name\` reads,
1600
+ which you want if your own elements take a name in markup and do not want
1601
+ otherwise, since it is the part nothing can drop.
1602
+
1603
+ **A name in two sources is refused rather than decided.** A precedence decides
1604
+ silently, and the glyph on the page would be whichever directory sat higher with
1605
+ nothing looking wrong afterwards.
1606
+
1607
+ ## Adding one to this set
1574
1608
 
1575
1609
  Add the name to \`helix/icons/icons.txt\` and run \`turbo run icons\`. Phosphor names
1576
1610
  resolve from \`@phosphor-icons/core\` at build time, so adding a glyph is adding a
@@ -2091,10 +2125,10 @@ repository does that. The per-component tables are what a page pays.
2091
2125
  | Package | Raw | Gzip | Brotli | |
2092
2126
  |---|---|---|---|---|
2093
2127
  | \`@fusion.dev/helix-core\` | 156,003 | 51,384 | 43,598 | Element base class, mixins, decorators, floating positioning. |
2094
- | \`@fusion.dev/helix-headless\` | 604,545 | 156,940 | 122,421 | Every headless family, which is what the barrel means. |
2128
+ | \`@fusion.dev/helix-headless\` | 609,467 | 158,001 | 122,755 | Every headless family, which is what the barrel means. |
2095
2129
  | \`@fusion.dev/helix-icons\` | 47,484 | 14,907 | 12,553 | The whole glyph set. |
2096
2130
  | \`@fusion.dev/helix-theme\` | 3,288 | 1,571 | 1,355 | The derivation engine. Build time for most consumers, runtime for a theme switcher. |
2097
- | \`@fusion.dev/helix\` | 1,081,623 | 253,263 | 186,323 | Every styled family. |
2131
+ | \`@fusion.dev/helix\` | 1,089,445 | 254,911 | 187,079 | Every styled family. |
2098
2132
  | \`lit\` | 15,394 | 6,118 | 5,460 | Not ours. Here so it can be subtracted from every row above it. |
2099
2133
 
2100
2134
  ## The stylesheets
@@ -2108,20 +2142,20 @@ is the whole cost of adopting the base layer on its own.
2108
2142
  | File | Raw | Gzip | Brotli | |
2109
2143
  |---|---|---|---|---|
2110
2144
  | \`base.css\` | 30,672 | 4,430 | 3,844 | The base layer. Recipes for markup Helix does not render, usable with no JavaScript at all. |
2111
- | \`elements.css\` | 7,848 | 1,341 | 1,202 | Hides each element until its definition loads, generated from the tags in \`@fusion.dev/helix\`. |
2145
+ | \`elements.css\` | 7,964 | 1,356 | 1,217 | Hides each element until its definition loads, generated from the tags in \`@fusion.dev/helix\`. |
2112
2146
  | \`helix.css\` | 207 | 148 | 118 | The four above in one import, in the order they have to be in. |
2113
2147
  | \`primitives.css\` | 6,390 | 1,260 | 1,084 | The primitive layer. Private, shipped because \`tokens.css\` resolves into it. |
2114
2148
  | \`tokens.css\` | 20,987 | 2,567 | 2,138 | The 191 semantic tokens. Nothing paints without this. |
2115
2149
 
2116
2150
  ## What the numbers say
2117
2151
 
2118
- **Most of a first component is the runtime under it.** The median styled family is 18,837 bytes gzipped alone and adds 2,220 to a page that already has Helix on it, so 88 percent of the first one is shared and 12 percent is the component. Ten typical components are one plus nine additions rather than ten of the first number, and the pair of columns below is what lets that be worked out rather than guessed.
2152
+ **Most of a first component is the runtime under it.** The median styled family is 17,431 bytes gzipped alone and adds 2,218 to a page that already has Helix on it, so 87 percent of the first one is shared and 13 percent is the component. Ten typical components are one plus nine additions rather than ten of the first number, and the pair of columns below is what lets that be worked out rather than guessed.
2119
2153
 
2120
- Across the tier: the cheapest is \`code\` at 9,451 gzipped alone, the dearest \`data-table\` at 59,280, over 100 components. Every family at once is 253,263.
2154
+ Across the tier: the cheapest is \`code\` at 9,451 gzipped alone, the dearest \`data-table\` at 59,280, over 101 components. Every family at once is 254,911.
2121
2155
 
2122
- **No family imports a barrel, and the \`barrels\` rule in \`fusion workspace\` is what keeps it that way.** \`@fusion.dev/helix-headless\` is \`sideEffects\` over every module in \`dist\`, which is true of a file that calls \`customElements.define\` and which means a bundler may drop none of it: one \`import { HelixHeadlessButton } from '@fusion.dev/helix-headless'\` costs 156,940 bytes gzipped whatever else the page does, which is 8 times the median family measured above. The styled tier imports the family it extends instead, all 100 of them, and the check refuses the shape rather than the package name, so the rule follows \`sideEffects\` wherever it goes.
2156
+ **No family imports a barrel, and the \`barrels\` rule in \`fusion workspace\` is what keeps it that way.** \`@fusion.dev/helix-headless\` is \`sideEffects\` over every module in \`dist\`, which is true of a file that calls \`customElements.define\` and which means a bundler may drop none of it: one \`import { HelixHeadlessButton } from '@fusion.dev/helix-headless'\` costs 158,001 bytes gzipped whatever else the page does, which is 9 times the median family measured above. The styled tier imports the family it extends instead, all 101 of them, and the check refuses the shape rather than the package name, so the rule follows \`sideEffects\` wherever it goes.
2123
2157
 
2124
- The headless tier never had the problem, and it is the control: \`@fusion.dev/helix-core\` is \`sideEffects: false\`, and a headless family is a median of 20,531 bytes gzipped alone.
2158
+ The headless tier never had the problem, and it is the control: \`@fusion.dev/helix-core\` is \`sideEffects: false\`, and a headless family is a median of 20,365 bytes gzipped alone.
2125
2159
 
2126
2160
  ## Against other systems
2127
2161
 
@@ -2258,6 +2292,7 @@ Structure, accessibility, state and form participation. No presentation, and no
2258
2292
  | \`input\` | 86,357 | 28,367 | 23,214 | 4,742 | 1,328 | 1,072 |
2259
2293
  | \`kbd\` | 30,274 | 10,348 | 9,112 | 2,976 | 1,036 | 863 |
2260
2294
  | \`legend\` | 32,326 | 10,852 | 9,561 | 1,080 | 299 | 308 |
2295
+ | \`lightbox\` | 36,221 | 11,642 | 10,265 | 4,740 | 1,295 | 1,048 |
2261
2296
  | \`line-chart\` | 74,340 | 25,327 | 22,436 | 10,591 | 3,107 | 2,621 |
2262
2297
  | \`list\` | 29,376 | 9,761 | 8,590 | 1,726 | 354 | 293 |
2263
2298
  | \`listbox\` | 94,570 | 30,854 | 25,190 | 10,942 | 3,007 | 2,401 |
@@ -2362,6 +2397,7 @@ The headless tier plus presentation. This is what \`bun add @fusion.dev/helix\`
2362
2397
  | \`input\` | 92,624 | 29,730 | 24,373 | 11,004 | 2,686 | 2,186 |
2363
2398
  | \`kbd\` | 31,686 | 10,798 | 9,494 | 4,373 | 1,491 | 1,217 |
2364
2399
  | \`legend\` | 37,142 | 11,968 | 10,511 | 5,790 | 1,395 | 1,125 |
2400
+ | \`lightbox\` | 39,168 | 12,359 | 10,889 | 7,670 | 2,017 | 1,697 |
2365
2401
  | \`line-chart\` | 84,111 | 27,333 | 24,253 | 20,340 | 5,147 | 4,337 |
2366
2402
  | \`list\` | 33,442 | 10,705 | 9,446 | 5,782 | 1,313 | 1,161 |
2367
2403
  | \`listbox\` | 98,839 | 31,853 | 26,044 | 15,204 | 3,989 | 3,280 |
@@ -2427,11 +2463,11 @@ column is what was removed rather than part of what remains.
2427
2463
  | Package | Unpacked | Files | Source maps stripped | Runtime dependencies |
2428
2464
  |---|---|---|---|---|
2429
2465
  | \`@fusion.dev/helix-core\` | 984,477 | 153 | 222,482 | \`@floating-ui/dom\`, \`@fusion.dev/helix-icons\` |
2430
- | \`@fusion.dev/helix-headless\` | 11,366,181 | 464 | 836,952 | \`@fusion.dev/helix-core\`, \`@fusion.dev/helix-icons\`, \`uqr\` |
2431
- | \`@fusion.dev/helix-icons\` | 121,091 | 17 | 37,263 | none |
2432
- | \`@fusion.dev/helix-styles\` | 101,139 | 6 | 0 | none |
2466
+ | \`@fusion.dev/helix-headless\` | 11,510,142 | 470 | 847,366 | \`@fusion.dev/helix-core\`, \`@fusion.dev/helix-icons\`, \`uqr\` |
2467
+ | \`@fusion.dev/helix-icons\` | 131,512 | 21 | 44,809 | \`svgo\` |
2468
+ | \`@fusion.dev/helix-styles\` | 101,255 | 6 | 0 | none |
2433
2469
  | \`@fusion.dev/helix-theme\` | 465,413 | 8 | 4,703 | none |
2434
- | \`@fusion.dev/helix\` | 12,499,093 | 796 | 333,986 | \`@fusion.dev/helix-core\`, \`@fusion.dev/helix-headless\`, \`@fusion.dev/helix-styles\` |
2470
+ | \`@fusion.dev/helix\` | 12,639,631 | 806 | 337,152 | \`@fusion.dev/helix-core\`, \`@fusion.dev/helix-headless\`, \`@fusion.dev/helix-styles\` |
2435
2471
 
2436
2472
  ## Not measured yet
2437
2473
 
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.99.0",
4
+ "version": "0.101.0",
5
5
  "license": "MIT",
6
6
  "author": "Ross Sheppard <ross.sheppard@fusion.dev>",
7
7
  "repository": {
@@ -36,8 +36,8 @@
36
36
  },
37
37
  "bugs": "https://github.com/project-fusion/fusion/issues",
38
38
  "devDependencies": {
39
- "@fusion.dev/helix-cem": "0.99.0",
40
- "@fusion.dev/helix-testing": "0.99.0",
39
+ "@fusion.dev/helix-cem": "0.101.0",
40
+ "@fusion.dev/helix-testing": "0.101.0",
41
41
  "@fusion.dev/scripts": "0.0.0-dev",
42
42
  "lit": "^3.2.1",
43
43
  "playwright": "^1.62.1"