@fusion.dev/helix-docs 0.115.0 → 0.116.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/maps.mdx +29 -0
- package/content/metrics.mdx +9 -9
- package/dist/sources.generated.js +38 -9
- package/package.json +9 -9
package/content/maps.mdx
CHANGED
|
@@ -227,6 +227,35 @@ removing it to your framework.
|
|
|
227
227
|
A snapshot is a flat map. A map zoomed out past about 6 is a globe in MapLibre,
|
|
228
228
|
so draw snapshots of city and street views.
|
|
229
229
|
|
|
230
|
+
## Share the scroll with the page
|
|
231
|
+
|
|
232
|
+
By default a map takes every gesture over it: the wheel zooms the map, and one
|
|
233
|
+
finger pans it. That suits a map that is the page, such as a full-screen view.
|
|
234
|
+
A map embedded in a page, such as a hero, takes the wheel from a reader who is
|
|
235
|
+
scrolling past it. Set `gestures` on the frame to share them:
|
|
236
|
+
|
|
237
|
+
```html
|
|
238
|
+
<helix-map gestures="cooperative" label="Downtown Austin">
|
|
239
|
+
<div id="map"></div>
|
|
240
|
+
</helix-map>
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
- `cooperative` leaves the wheel and one finger to the page. The map takes Ctrl
|
|
244
|
+
or ⌘ with the wheel, and two fingers. When a gesture passes to the page, the
|
|
245
|
+
frame says how to reach the map, where the gesture was. Use it for a map
|
|
246
|
+
embedded in a page.
|
|
247
|
+
- `activate` takes nothing until the map is pressed. The frame then shows that
|
|
248
|
+
the map has the gestures, and gives them back when the reader presses Escape,
|
|
249
|
+
moves the pointer off the map, or presses elsewhere on the page.
|
|
250
|
+
- `always`, the default, takes every gesture.
|
|
251
|
+
|
|
252
|
+
The keyboard and the frame's buttons work the same in every mode. `connectMap`
|
|
253
|
+
tells the renderer, so MapLibre and Leaflet behave alike, and MapLibre's own
|
|
254
|
+
message is replaced by the frame's. For Leaflet, pass `L`, as
|
|
255
|
+
`leafletDriver(map, L)`. Change the words with `wheel-hint-label`,
|
|
256
|
+
`two-finger-hint-label`, `activate-hint-label`, and `using-label`. Style the
|
|
257
|
+
hint and the line with `::part(gesture-hint)` and `::part(gesture-status)`.
|
|
258
|
+
|
|
230
259
|
## Show the map once it is drawn
|
|
231
260
|
|
|
232
261
|
MapLibre draws a map in stages: the streets, then the imagery tile by tile,
|
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` | 177,240 | 56,685 | 48,188 | The element base class, mixins, decorators, and floating positioning. |
|
|
61
|
-
| `@fusion.dev/helix-headless` |
|
|
61
|
+
| `@fusion.dev/helix-headless` | 730,340 | 189,029 | 147,027 | 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,
|
|
64
|
+
| `@fusion.dev/helix` | 1,264,143 | 295,868 | 217,227 | 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,9 +84,9 @@ 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 20,629 bytes gzipped alone, and it adds 2,221 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 103 styled components, the smallest is `code` at 9,802 bytes gzipped alone, and the largest is `data-table` at 63,637. Every family together is
|
|
87
|
+
Across the 103 styled components, the smallest is `code` at 9,802 bytes gzipped alone, and the largest is `data-table` at 63,637. Every family together is 295,868.
|
|
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
|
|
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 189,029 bytes gzipped, whatever else the page imports. That is 9 times the median family above. All 103 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
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,082 bytes gzipped alone.
|
|
92
92
|
|
|
@@ -230,7 +230,7 @@ Structure, accessibility, state, and form participation. It has no presentation
|
|
|
230
230
|
| `list` | 32,717 | 10,112 | 8,882 | 1,726 | 351 | 261 |
|
|
231
231
|
| `listbox` | 107,105 | 34,377 | 27,998 | 11,262 | 3,083 | 2,411 |
|
|
232
232
|
| `loader` | 31,901 | 10,048 | 8,837 | 900 | 227 | 50 |
|
|
233
|
-
| `map` |
|
|
233
|
+
| `map` | 130,997 | 39,371 | 32,568 | 36,365 | 8,484 | 6,943 |
|
|
234
234
|
| `megamenu` | 62,159 | 20,749 | 18,373 | 4,941 | 1,351 | 966 |
|
|
235
235
|
| `menu` | 125,881 | 41,816 | 35,009 | 8,855 | 2,228 | 1,664 |
|
|
236
236
|
| `meter` | 35,091 | 10,894 | 9,614 | 4,099 | 1,059 | 815 |
|
|
@@ -337,7 +337,7 @@ The headless tier plus presentation. `bun add @fusion.dev/helix` installs this t
|
|
|
337
337
|
| `list` | 36,783 | 11,064 | 9,720 | 5,782 | 1,298 | 1,049 |
|
|
338
338
|
| `listbox` | 111,622 | 35,424 | 28,887 | 15,768 | 4,115 | 3,277 |
|
|
339
339
|
| `loader` | 35,067 | 10,812 | 9,512 | 4,051 | 995 | 760 |
|
|
340
|
-
| `map` |
|
|
340
|
+
| `map` | 167,235 | 44,872 | 37,264 | 72,588 | 14,039 | 11,630 |
|
|
341
341
|
| `megamenu` | 67,040 | 21,815 | 19,332 | 9,805 | 2,410 | 1,905 |
|
|
342
342
|
| `menu` | 133,408 | 43,467 | 36,434 | 16,362 | 3,837 | 3,129 |
|
|
343
343
|
| `meter` | 40,489 | 12,037 | 10,612 | 9,479 | 2,219 | 1,827 |
|
|
@@ -398,12 +398,12 @@ stripped column shows the bytes we removed.
|
|
|
398
398
|
|
|
399
399
|
| Package | Unpacked | Files | Source maps stripped | Runtime dependencies |
|
|
400
400
|
|---|---|---|---|---|
|
|
401
|
-
| `@fusion.dev/helix-core` | 1,145,
|
|
402
|
-
| `@fusion.dev/helix-headless` | 13,
|
|
401
|
+
| `@fusion.dev/helix-core` | 1,145,925 | 169 | 254,756 | `@floating-ui/dom`, `@fusion.dev/helix-icons` |
|
|
402
|
+
| `@fusion.dev/helix-headless` | 13,213,764 | 504 | 1,057,948 | `@fusion.dev/helix-core`, `@fusion.dev/helix-icons`, `uqr` |
|
|
403
403
|
| `@fusion.dev/helix-icons` | 150,162 | 21 | 50,346 | `svgo` |
|
|
404
404
|
| `@fusion.dev/helix-styles` | 102,108 | 6 | 0 | none |
|
|
405
405
|
| `@fusion.dev/helix-theme` | 500,416 | 8 | 5,191 | none |
|
|
406
|
-
| `@fusion.dev/helix` | 14,
|
|
406
|
+
| `@fusion.dev/helix` | 14,344,183 | 870 | 371,503 | `@fusion.dev/helix-core`, `@fusion.dev/helix-headless`, `@fusion.dev/helix-styles` |
|
|
407
407
|
|
|
408
408
|
## Not measured yet
|
|
409
409
|
|
|
@@ -2506,6 +2506,35 @@ removing it to your framework.
|
|
|
2506
2506
|
A snapshot is a flat map. A map zoomed out past about 6 is a globe in MapLibre,
|
|
2507
2507
|
so draw snapshots of city and street views.
|
|
2508
2508
|
|
|
2509
|
+
## Share the scroll with the page
|
|
2510
|
+
|
|
2511
|
+
By default a map takes every gesture over it: the wheel zooms the map, and one
|
|
2512
|
+
finger pans it. That suits a map that is the page, such as a full-screen view.
|
|
2513
|
+
A map embedded in a page, such as a hero, takes the wheel from a reader who is
|
|
2514
|
+
scrolling past it. Set \`gestures\` on the frame to share them:
|
|
2515
|
+
|
|
2516
|
+
\`\`\`html
|
|
2517
|
+
<helix-map gestures="cooperative" label="Downtown Austin">
|
|
2518
|
+
<div id="map"></div>
|
|
2519
|
+
</helix-map>
|
|
2520
|
+
\`\`\`
|
|
2521
|
+
|
|
2522
|
+
- \`cooperative\` leaves the wheel and one finger to the page. The map takes Ctrl
|
|
2523
|
+
or ⌘ with the wheel, and two fingers. When a gesture passes to the page, the
|
|
2524
|
+
frame says how to reach the map, where the gesture was. Use it for a map
|
|
2525
|
+
embedded in a page.
|
|
2526
|
+
- \`activate\` takes nothing until the map is pressed. The frame then shows that
|
|
2527
|
+
the map has the gestures, and gives them back when the reader presses Escape,
|
|
2528
|
+
moves the pointer off the map, or presses elsewhere on the page.
|
|
2529
|
+
- \`always\`, the default, takes every gesture.
|
|
2530
|
+
|
|
2531
|
+
The keyboard and the frame's buttons work the same in every mode. \`connectMap\`
|
|
2532
|
+
tells the renderer, so MapLibre and Leaflet behave alike, and MapLibre's own
|
|
2533
|
+
message is replaced by the frame's. For Leaflet, pass \`L\`, as
|
|
2534
|
+
\`leafletDriver(map, L)\`. Change the words with \`wheel-hint-label\`,
|
|
2535
|
+
\`two-finger-hint-label\`, \`activate-hint-label\`, and \`using-label\`. Style the
|
|
2536
|
+
hint and the line with \`::part(gesture-hint)\` and \`::part(gesture-status)\`.
|
|
2537
|
+
|
|
2509
2538
|
## Show the map once it is drawn
|
|
2510
2539
|
|
|
2511
2540
|
MapLibre draws a map in stages: the streets, then the imagery tile by tile,
|
|
@@ -2929,10 +2958,10 @@ either barrel. The per-component tables show what your page pays.
|
|
|
2929
2958
|
| Package | Raw | Gzip | Brotli | |
|
|
2930
2959
|
|---|---|---|---|---|
|
|
2931
2960
|
| \`@fusion.dev/helix-core\` | 177,240 | 56,685 | 48,188 | The element base class, mixins, decorators, and floating positioning. |
|
|
2932
|
-
| \`@fusion.dev/helix-headless\` |
|
|
2961
|
+
| \`@fusion.dev/helix-headless\` | 730,340 | 189,029 | 147,027 | Every headless family. The barrel entry includes all of them. |
|
|
2933
2962
|
| \`@fusion.dev/helix-icons\` | 55,565 | 17,727 | 14,864 | The whole glyph set. |
|
|
2934
2963
|
| \`@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. |
|
|
2935
|
-
| \`@fusion.dev/helix\` | 1,
|
|
2964
|
+
| \`@fusion.dev/helix\` | 1,264,143 | 295,868 | 217,227 | Every styled family. |
|
|
2936
2965
|
| \`lit\` | 15,394 | 6,118 | 5,460 | Lit itself, listed so you can subtract it from every row above. |
|
|
2937
2966
|
|
|
2938
2967
|
## Stylesheets
|
|
@@ -2955,9 +2984,9 @@ shows the whole cost of using the base layer on its own.
|
|
|
2955
2984
|
|
|
2956
2985
|
**Most of your first component is the shared runtime.** The median styled family is 20,629 bytes gzipped alone, and it adds 2,221 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.
|
|
2957
2986
|
|
|
2958
|
-
Across the 103 styled components, the smallest is \`code\` at 9,802 bytes gzipped alone, and the largest is \`data-table\` at 63,637. Every family together is
|
|
2987
|
+
Across the 103 styled components, the smallest is \`code\` at 9,802 bytes gzipped alone, and the largest is \`data-table\` at 63,637. Every family together is 295,868.
|
|
2959
2988
|
|
|
2960
|
-
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
|
|
2989
|
+
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 189,029 bytes gzipped, whatever else the page imports. That is 9 times the median family above. All 103 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.
|
|
2961
2990
|
|
|
2962
2991
|
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,082 bytes gzipped alone.
|
|
2963
2992
|
|
|
@@ -3101,7 +3130,7 @@ Structure, accessibility, state, and form participation. It has no presentation
|
|
|
3101
3130
|
| \`list\` | 32,717 | 10,112 | 8,882 | 1,726 | 351 | 261 |
|
|
3102
3131
|
| \`listbox\` | 107,105 | 34,377 | 27,998 | 11,262 | 3,083 | 2,411 |
|
|
3103
3132
|
| \`loader\` | 31,901 | 10,048 | 8,837 | 900 | 227 | 50 |
|
|
3104
|
-
| \`map\` |
|
|
3133
|
+
| \`map\` | 130,997 | 39,371 | 32,568 | 36,365 | 8,484 | 6,943 |
|
|
3105
3134
|
| \`megamenu\` | 62,159 | 20,749 | 18,373 | 4,941 | 1,351 | 966 |
|
|
3106
3135
|
| \`menu\` | 125,881 | 41,816 | 35,009 | 8,855 | 2,228 | 1,664 |
|
|
3107
3136
|
| \`meter\` | 35,091 | 10,894 | 9,614 | 4,099 | 1,059 | 815 |
|
|
@@ -3208,7 +3237,7 @@ The headless tier plus presentation. \`bun add @fusion.dev/helix\` installs this
|
|
|
3208
3237
|
| \`list\` | 36,783 | 11,064 | 9,720 | 5,782 | 1,298 | 1,049 |
|
|
3209
3238
|
| \`listbox\` | 111,622 | 35,424 | 28,887 | 15,768 | 4,115 | 3,277 |
|
|
3210
3239
|
| \`loader\` | 35,067 | 10,812 | 9,512 | 4,051 | 995 | 760 |
|
|
3211
|
-
| \`map\` |
|
|
3240
|
+
| \`map\` | 167,235 | 44,872 | 37,264 | 72,588 | 14,039 | 11,630 |
|
|
3212
3241
|
| \`megamenu\` | 67,040 | 21,815 | 19,332 | 9,805 | 2,410 | 1,905 |
|
|
3213
3242
|
| \`menu\` | 133,408 | 43,467 | 36,434 | 16,362 | 3,837 | 3,129 |
|
|
3214
3243
|
| \`meter\` | 40,489 | 12,037 | 10,612 | 9,479 | 2,219 | 1,827 |
|
|
@@ -3269,12 +3298,12 @@ stripped column shows the bytes we removed.
|
|
|
3269
3298
|
|
|
3270
3299
|
| Package | Unpacked | Files | Source maps stripped | Runtime dependencies |
|
|
3271
3300
|
|---|---|---|---|---|
|
|
3272
|
-
| \`@fusion.dev/helix-core\` | 1,145,
|
|
3273
|
-
| \`@fusion.dev/helix-headless\` | 13,
|
|
3301
|
+
| \`@fusion.dev/helix-core\` | 1,145,925 | 169 | 254,756 | \`@floating-ui/dom\`, \`@fusion.dev/helix-icons\` |
|
|
3302
|
+
| \`@fusion.dev/helix-headless\` | 13,213,764 | 504 | 1,057,948 | \`@fusion.dev/helix-core\`, \`@fusion.dev/helix-icons\`, \`uqr\` |
|
|
3274
3303
|
| \`@fusion.dev/helix-icons\` | 150,162 | 21 | 50,346 | \`svgo\` |
|
|
3275
3304
|
| \`@fusion.dev/helix-styles\` | 102,108 | 6 | 0 | none |
|
|
3276
3305
|
| \`@fusion.dev/helix-theme\` | 500,416 | 8 | 5,191 | none |
|
|
3277
|
-
| \`@fusion.dev/helix\` | 14,
|
|
3306
|
+
| \`@fusion.dev/helix\` | 14,344,183 | 870 | 371,503 | \`@fusion.dev/helix-core\`, \`@fusion.dev/helix-headless\`, \`@fusion.dev/helix-styles\` |
|
|
3278
3307
|
|
|
3279
3308
|
## Not measured yet
|
|
3280
3309
|
|
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.116.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.116.0",
|
|
40
|
+
"@fusion.dev/helix-cem": "0.116.0",
|
|
41
|
+
"@fusion.dev/helix-headless": "0.116.0",
|
|
42
|
+
"@fusion.dev/helix-icons": "0.116.0",
|
|
43
|
+
"@fusion.dev/helix-map": "0.116.0",
|
|
44
|
+
"@fusion.dev/helix-styles": "0.116.0",
|
|
45
|
+
"@fusion.dev/helix-testing": "0.116.0",
|
|
46
|
+
"@fusion.dev/helix-theme": "0.116.0",
|
|
47
47
|
"@fusion.dev/scripts": "0.0.0-dev",
|
|
48
48
|
"lit": "^3.2.1",
|
|
49
49
|
"playwright": "^1.62.1"
|