@fusion.dev/helix-docs 0.114.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 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,
@@ -325,6 +354,29 @@ service such as OSRM or Valhalla.
325
354
  - `distancesAlong(points)` measures a route the same way the connector does, so
326
355
  something you move along the route and the lighter part stay in step.
327
356
 
357
+ An area is a shape, such as a delivery zone or a search sector. Set `caption` to
358
+ write a few words on the map with it:
359
+
360
+ ```html
361
+ <helix-map-area
362
+ caption="A"
363
+ label="Sector A"
364
+ points="30.2693,-97.7745 30.2693,-97.7700 30.2655,-97.7700 30.2655,-97.7745"
365
+ tone="success"
366
+ ></helix-map-area>
367
+ ```
368
+
369
+ The caption stands inside the area, at the point furthest from its edges. Set
370
+ `caption-placement="outside"` to stand it above the area's northernmost point
371
+ instead, clear of what the area holds. It is drawn in the area's color, brought
372
+ toward the theme's text color until it reaches a 4.5:1 contrast ratio against
373
+ the map, with a halo of the map's land around it. A caption is drawn, not
374
+ focusable, so it adds nothing to the tab order. A screen reader hears the area's
375
+ `label` in the frame's list of layers.
376
+
377
+ On Leaflet, pass `L`, as `leafletDriver(map, L)`, and the caption is drawn as a
378
+ marker that nobody can press or reach with the keyboard.
379
+
328
380
  ### Live positions
329
381
 
330
382
  ```html
@@ -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` | 726,527 | 188,207 | 146,254 | Every headless family. The barrel entry includes all of them. |
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,259,455 | 294,753 | 216,500 | Every styled family. |
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 294,753.
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 188,207 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.
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` | 127,184 | 38,398 | 31,806 | 32,551 | 7,567 | 6,138 |
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` | 162,545 | 43,764 | 36,429 | 67,896 | 13,040 | 10,771 |
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,832 | 169 | 254,745 | `@floating-ui/dom`, `@fusion.dev/helix-icons` |
402
- | `@fusion.dev/helix-headless` | 13,176,137 | 504 | 1,051,621 | `@fusion.dev/helix-core`, `@fusion.dev/helix-icons`, `uqr` |
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,313,272 | 870 | 371,466 | `@fusion.dev/helix-core`, `@fusion.dev/helix-headless`, `@fusion.dev/helix-styles` |
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,
@@ -2604,6 +2633,29 @@ service such as OSRM or Valhalla.
2604
2633
  - \`distancesAlong(points)\` measures a route the same way the connector does, so
2605
2634
  something you move along the route and the lighter part stay in step.
2606
2635
 
2636
+ An area is a shape, such as a delivery zone or a search sector. Set \`caption\` to
2637
+ write a few words on the map with it:
2638
+
2639
+ \`\`\`html
2640
+ <helix-map-area
2641
+ caption="A"
2642
+ label="Sector A"
2643
+ points="30.2693,-97.7745 30.2693,-97.7700 30.2655,-97.7700 30.2655,-97.7745"
2644
+ tone="success"
2645
+ ></helix-map-area>
2646
+ \`\`\`
2647
+
2648
+ The caption stands inside the area, at the point furthest from its edges. Set
2649
+ \`caption-placement="outside"\` to stand it above the area's northernmost point
2650
+ instead, clear of what the area holds. It is drawn in the area's color, brought
2651
+ toward the theme's text color until it reaches a 4.5:1 contrast ratio against
2652
+ the map, with a halo of the map's land around it. A caption is drawn, not
2653
+ focusable, so it adds nothing to the tab order. A screen reader hears the area's
2654
+ \`label\` in the frame's list of layers.
2655
+
2656
+ On Leaflet, pass \`L\`, as \`leafletDriver(map, L)\`, and the caption is drawn as a
2657
+ marker that nobody can press or reach with the keyboard.
2658
+
2607
2659
  ### Live positions
2608
2660
 
2609
2661
  \`\`\`html
@@ -2906,10 +2958,10 @@ either barrel. The per-component tables show what your page pays.
2906
2958
  | Package | Raw | Gzip | Brotli | |
2907
2959
  |---|---|---|---|---|
2908
2960
  | \`@fusion.dev/helix-core\` | 177,240 | 56,685 | 48,188 | The element base class, mixins, decorators, and floating positioning. |
2909
- | \`@fusion.dev/helix-headless\` | 726,527 | 188,207 | 146,254 | Every headless family. The barrel entry includes all of them. |
2961
+ | \`@fusion.dev/helix-headless\` | 730,340 | 189,029 | 147,027 | Every headless family. The barrel entry includes all of them. |
2910
2962
  | \`@fusion.dev/helix-icons\` | 55,565 | 17,727 | 14,864 | The whole glyph set. |
2911
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. |
2912
- | \`@fusion.dev/helix\` | 1,259,455 | 294,753 | 216,500 | Every styled family. |
2964
+ | \`@fusion.dev/helix\` | 1,264,143 | 295,868 | 217,227 | Every styled family. |
2913
2965
  | \`lit\` | 15,394 | 6,118 | 5,460 | Lit itself, listed so you can subtract it from every row above. |
2914
2966
 
2915
2967
  ## Stylesheets
@@ -2932,9 +2984,9 @@ shows the whole cost of using the base layer on its own.
2932
2984
 
2933
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.
2934
2986
 
2935
- 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 294,753.
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.
2936
2988
 
2937
- 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 188,207 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.
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.
2938
2990
 
2939
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.
2940
2992
 
@@ -3078,7 +3130,7 @@ Structure, accessibility, state, and form participation. It has no presentation
3078
3130
  | \`list\` | 32,717 | 10,112 | 8,882 | 1,726 | 351 | 261 |
3079
3131
  | \`listbox\` | 107,105 | 34,377 | 27,998 | 11,262 | 3,083 | 2,411 |
3080
3132
  | \`loader\` | 31,901 | 10,048 | 8,837 | 900 | 227 | 50 |
3081
- | \`map\` | 127,184 | 38,398 | 31,806 | 32,551 | 7,567 | 6,138 |
3133
+ | \`map\` | 130,997 | 39,371 | 32,568 | 36,365 | 8,484 | 6,943 |
3082
3134
  | \`megamenu\` | 62,159 | 20,749 | 18,373 | 4,941 | 1,351 | 966 |
3083
3135
  | \`menu\` | 125,881 | 41,816 | 35,009 | 8,855 | 2,228 | 1,664 |
3084
3136
  | \`meter\` | 35,091 | 10,894 | 9,614 | 4,099 | 1,059 | 815 |
@@ -3185,7 +3237,7 @@ The headless tier plus presentation. \`bun add @fusion.dev/helix\` installs this
3185
3237
  | \`list\` | 36,783 | 11,064 | 9,720 | 5,782 | 1,298 | 1,049 |
3186
3238
  | \`listbox\` | 111,622 | 35,424 | 28,887 | 15,768 | 4,115 | 3,277 |
3187
3239
  | \`loader\` | 35,067 | 10,812 | 9,512 | 4,051 | 995 | 760 |
3188
- | \`map\` | 162,545 | 43,764 | 36,429 | 67,896 | 13,040 | 10,771 |
3240
+ | \`map\` | 167,235 | 44,872 | 37,264 | 72,588 | 14,039 | 11,630 |
3189
3241
  | \`megamenu\` | 67,040 | 21,815 | 19,332 | 9,805 | 2,410 | 1,905 |
3190
3242
  | \`menu\` | 133,408 | 43,467 | 36,434 | 16,362 | 3,837 | 3,129 |
3191
3243
  | \`meter\` | 40,489 | 12,037 | 10,612 | 9,479 | 2,219 | 1,827 |
@@ -3246,12 +3298,12 @@ stripped column shows the bytes we removed.
3246
3298
 
3247
3299
  | Package | Unpacked | Files | Source maps stripped | Runtime dependencies |
3248
3300
  |---|---|---|---|---|
3249
- | \`@fusion.dev/helix-core\` | 1,145,832 | 169 | 254,745 | \`@floating-ui/dom\`, \`@fusion.dev/helix-icons\` |
3250
- | \`@fusion.dev/helix-headless\` | 13,176,137 | 504 | 1,051,621 | \`@fusion.dev/helix-core\`, \`@fusion.dev/helix-icons\`, \`uqr\` |
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\` |
3251
3303
  | \`@fusion.dev/helix-icons\` | 150,162 | 21 | 50,346 | \`svgo\` |
3252
3304
  | \`@fusion.dev/helix-styles\` | 102,108 | 6 | 0 | none |
3253
3305
  | \`@fusion.dev/helix-theme\` | 500,416 | 8 | 5,191 | none |
3254
- | \`@fusion.dev/helix\` | 14,313,272 | 870 | 371,466 | \`@fusion.dev/helix-core\`, \`@fusion.dev/helix-headless\`, \`@fusion.dev/helix-styles\` |
3306
+ | \`@fusion.dev/helix\` | 14,344,183 | 870 | 371,503 | \`@fusion.dev/helix-core\`, \`@fusion.dev/helix-headless\`, \`@fusion.dev/helix-styles\` |
3255
3307
 
3256
3308
  ## Not measured yet
3257
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.114.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.114.0",
40
- "@fusion.dev/helix-cem": "0.114.0",
41
- "@fusion.dev/helix-headless": "0.114.0",
42
- "@fusion.dev/helix-icons": "0.114.0",
43
- "@fusion.dev/helix-map": "0.114.0",
44
- "@fusion.dev/helix-styles": "0.114.0",
45
- "@fusion.dev/helix-testing": "0.114.0",
46
- "@fusion.dev/helix-theme": "0.114.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"