@fusion.dev/helix-docs 0.112.0 → 0.113.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
@@ -106,6 +106,19 @@ It also draws landmarks, highway signs, and neighborhood names:
106
106
  roads.
107
107
  - Neighborhoods are in spaced capitals, quieter than the towns.
108
108
 
109
+ Pass `landmarks` to choose which kinds the map draws. `false` draws none, for a
110
+ map whose own markers are the places a reader is looking for. A list draws only
111
+ those kinds:
112
+
113
+ ```js
114
+ mapLibreStyle(colors, { landmarks: ['nature', 'transit'] })
115
+ ```
116
+
117
+ The kinds are `culture`, `food`, `health`, `learning`, `lodging`, `nature`,
118
+ `shopping`, `sport`, and `transit`, and `MAP_LANDMARKS` lists them. The option
119
+ holds when `followTheme` restyles the map, because it builds the style from the
120
+ same options.
121
+
109
122
  The same call builds a light map for a light theme and a dark map for a dark
110
123
  theme. Map labels meet a contrast target of 4.5 against the land. Pass
111
124
  `contrast` to change it, `language` to choose which name each place is labeled
@@ -139,6 +152,42 @@ changes its theme another way, such as by replacing a stylesheet, call
139
152
  a frame or two after the page loads. If the colors never become available, it
140
153
  reports which one is missing.
141
154
 
155
+ ## Put a map behind your content
156
+
157
+ Set `fill` to lay a map behind your page's own content, such as a hero whose
158
+ words decide its height. The frame covers its container instead of taking a
159
+ height of its own, and draws no border or corners, because the container's edge
160
+ is the map's. Give the container a position, such as `position: relative`:
161
+
162
+ ```html
163
+ <section class="hero">
164
+ <helix-map fill credit-placement="bottom-end" label="Downtown Austin">
165
+ <div id="map"></div>
166
+ </helix-map>
167
+ <div class="hero-words">
168
+ <h1>Every stop, one map</h1>
169
+ </div>
170
+ </section>
171
+ ```
172
+
173
+ ```css
174
+ .hero,
175
+ .hero-words {
176
+ position: relative;
177
+ }
178
+ ```
179
+
180
+ Content after the map, with a position of its own, is drawn over it. Give that
181
+ content a ground of its own, such as a translucent panel, so it reads over any
182
+ part of the map.
183
+
184
+ `credit-placement` draws the map's credit in a corner over the map instead of in
185
+ a strip under it. Use `bottom-end` or `bottom-start`, and keep it away from the
186
+ corner your controls are in. The credit is one line until it is pointed at or
187
+ its links are focused, and then it shows in full. That compact form is the one
188
+ OpenStreetMap's attribution guidance accepts for a small credit. Most tile
189
+ licenses require the credit to stay visible, so Helix never hides it.
190
+
142
191
  ## Draw the map before it loads
143
192
 
144
193
  `mapSnapshot(view)` draws the map on your server as an SVG, from the same tiles
@@ -61,7 +61,7 @@ either barrel. The per-component tables show what your page pays.
61
61
  | `@fusion.dev/helix-headless` | 726,171 | 188,118 | 146,385 | 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,257,753 | 294,483 | 216,072 | Every styled family. |
64
+ | `@fusion.dev/helix` | 1,259,099 | 294,668 | 216,376 | 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,7 +84,7 @@ 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,614 bytes gzipped alone, and it adds 2,224 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,782 bytes gzipped alone, and the largest is `data-table` at 63,610. Every family together is 294,483.
87
+ Across the 103 styled components, the smallest is `code` at 9,782 bytes gzipped alone, and the largest is `data-table` at 63,610. Every family together is 294,668.
88
88
 
89
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,118 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
 
@@ -337,7 +337,7 @@ The headless tier plus presentation. `bun add @fusion.dev/helix` installs this t
337
337
  | `list` | 36,624 | 11,044 | 9,710 | 5,782 | 1,307 | 1,089 |
338
338
  | `listbox` | 111,463 | 35,406 | 28,903 | 15,768 | 4,108 | 3,250 |
339
339
  | `loader` | 34,908 | 10,789 | 9,500 | 4,051 | 1,003 | 806 |
340
- | `map` | 160,886 | 43,420 | 36,165 | 66,396 | 12,712 | 10,488 |
340
+ | `map` | 162,232 | 43,691 | 36,301 | 67,742 | 12,991 | 10,725 |
341
341
  | `megamenu` | 66,881 | 21,799 | 19,289 | 9,805 | 2,417 | 1,975 |
342
342
  | `menu` | 133,249 | 43,442 | 36,482 | 16,362 | 3,837 | 3,101 |
343
343
  | `meter` | 40,330 | 12,019 | 10,617 | 9,479 | 2,223 | 1,972 |
@@ -403,7 +403,7 @@ stripped column shows the bytes we removed.
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,295,674 | 870 | 371,115 | `@fusion.dev/helix-core`, `@fusion.dev/helix-headless`, `@fusion.dev/helix-styles` |
406
+ | `@fusion.dev/helix` | 14,306,888 | 870 | 371,453 | `@fusion.dev/helix-core`, `@fusion.dev/helix-headless`, `@fusion.dev/helix-styles` |
407
407
 
408
408
  ## Not measured yet
409
409
 
@@ -2385,6 +2385,19 @@ It also draws landmarks, highway signs, and neighborhood names:
2385
2385
  roads.
2386
2386
  - Neighborhoods are in spaced capitals, quieter than the towns.
2387
2387
 
2388
+ Pass \`landmarks\` to choose which kinds the map draws. \`false\` draws none, for a
2389
+ map whose own markers are the places a reader is looking for. A list draws only
2390
+ those kinds:
2391
+
2392
+ \`\`\`js
2393
+ mapLibreStyle(colors, { landmarks: ['nature', 'transit'] })
2394
+ \`\`\`
2395
+
2396
+ The kinds are \`culture\`, \`food\`, \`health\`, \`learning\`, \`lodging\`, \`nature\`,
2397
+ \`shopping\`, \`sport\`, and \`transit\`, and \`MAP_LANDMARKS\` lists them. The option
2398
+ holds when \`followTheme\` restyles the map, because it builds the style from the
2399
+ same options.
2400
+
2388
2401
  The same call builds a light map for a light theme and a dark map for a dark
2389
2402
  theme. Map labels meet a contrast target of 4.5 against the land. Pass
2390
2403
  \`contrast\` to change it, \`language\` to choose which name each place is labeled
@@ -2418,6 +2431,42 @@ changes its theme another way, such as by replacing a stylesheet, call
2418
2431
  a frame or two after the page loads. If the colors never become available, it
2419
2432
  reports which one is missing.
2420
2433
 
2434
+ ## Put a map behind your content
2435
+
2436
+ Set \`fill\` to lay a map behind your page's own content, such as a hero whose
2437
+ words decide its height. The frame covers its container instead of taking a
2438
+ height of its own, and draws no border or corners, because the container's edge
2439
+ is the map's. Give the container a position, such as \`position: relative\`:
2440
+
2441
+ \`\`\`html
2442
+ <section class="hero">
2443
+ <helix-map fill credit-placement="bottom-end" label="Downtown Austin">
2444
+ <div id="map"></div>
2445
+ </helix-map>
2446
+ <div class="hero-words">
2447
+ <h1>Every stop, one map</h1>
2448
+ </div>
2449
+ </section>
2450
+ \`\`\`
2451
+
2452
+ \`\`\`css
2453
+ .hero,
2454
+ .hero-words {
2455
+ position: relative;
2456
+ }
2457
+ \`\`\`
2458
+
2459
+ Content after the map, with a position of its own, is drawn over it. Give that
2460
+ content a ground of its own, such as a translucent panel, so it reads over any
2461
+ part of the map.
2462
+
2463
+ \`credit-placement\` draws the map's credit in a corner over the map instead of in
2464
+ a strip under it. Use \`bottom-end\` or \`bottom-start\`, and keep it away from the
2465
+ corner your controls are in. The credit is one line until it is pointed at or
2466
+ its links are focused, and then it shows in full. That compact form is the one
2467
+ OpenStreetMap's attribution guidance accepts for a small credit. Most tile
2468
+ licenses require the credit to stay visible, so Helix never hides it.
2469
+
2421
2470
  ## Draw the map before it loads
2422
2471
 
2423
2472
  \`mapSnapshot(view)\` draws the map on your server as an SVG, from the same tiles
@@ -2834,7 +2883,7 @@ either barrel. The per-component tables show what your page pays.
2834
2883
  | \`@fusion.dev/helix-headless\` | 726,171 | 188,118 | 146,385 | Every headless family. The barrel entry includes all of them. |
2835
2884
  | \`@fusion.dev/helix-icons\` | 55,565 | 17,727 | 14,864 | The whole glyph set. |
2836
2885
  | \`@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. |
2837
- | \`@fusion.dev/helix\` | 1,257,753 | 294,483 | 216,072 | Every styled family. |
2886
+ | \`@fusion.dev/helix\` | 1,259,099 | 294,668 | 216,376 | Every styled family. |
2838
2887
  | \`lit\` | 15,394 | 6,118 | 5,460 | Lit itself, listed so you can subtract it from every row above. |
2839
2888
 
2840
2889
  ## Stylesheets
@@ -2857,7 +2906,7 @@ shows the whole cost of using the base layer on its own.
2857
2906
 
2858
2907
  **Most of your first component is the shared runtime.** The median styled family is 20,614 bytes gzipped alone, and it adds 2,224 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.
2859
2908
 
2860
- Across the 103 styled components, the smallest is \`code\` at 9,782 bytes gzipped alone, and the largest is \`data-table\` at 63,610. Every family together is 294,483.
2909
+ Across the 103 styled components, the smallest is \`code\` at 9,782 bytes gzipped alone, and the largest is \`data-table\` at 63,610. Every family together is 294,668.
2861
2910
 
2862
2911
  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,118 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.
2863
2912
 
@@ -3110,7 +3159,7 @@ The headless tier plus presentation. \`bun add @fusion.dev/helix\` installs this
3110
3159
  | \`list\` | 36,624 | 11,044 | 9,710 | 5,782 | 1,307 | 1,089 |
3111
3160
  | \`listbox\` | 111,463 | 35,406 | 28,903 | 15,768 | 4,108 | 3,250 |
3112
3161
  | \`loader\` | 34,908 | 10,789 | 9,500 | 4,051 | 1,003 | 806 |
3113
- | \`map\` | 160,886 | 43,420 | 36,165 | 66,396 | 12,712 | 10,488 |
3162
+ | \`map\` | 162,232 | 43,691 | 36,301 | 67,742 | 12,991 | 10,725 |
3114
3163
  | \`megamenu\` | 66,881 | 21,799 | 19,289 | 9,805 | 2,417 | 1,975 |
3115
3164
  | \`menu\` | 133,249 | 43,442 | 36,482 | 16,362 | 3,837 | 3,101 |
3116
3165
  | \`meter\` | 40,330 | 12,019 | 10,617 | 9,479 | 2,223 | 1,972 |
@@ -3176,7 +3225,7 @@ stripped column shows the bytes we removed.
3176
3225
  | \`@fusion.dev/helix-icons\` | 150,162 | 21 | 50,346 | \`svgo\` |
3177
3226
  | \`@fusion.dev/helix-styles\` | 102,108 | 6 | 0 | none |
3178
3227
  | \`@fusion.dev/helix-theme\` | 500,416 | 8 | 5,191 | none |
3179
- | \`@fusion.dev/helix\` | 14,295,674 | 870 | 371,115 | \`@fusion.dev/helix-core\`, \`@fusion.dev/helix-headless\`, \`@fusion.dev/helix-styles\` |
3228
+ | \`@fusion.dev/helix\` | 14,306,888 | 870 | 371,453 | \`@fusion.dev/helix-core\`, \`@fusion.dev/helix-headless\`, \`@fusion.dev/helix-styles\` |
3180
3229
 
3181
3230
  ## Not measured yet
3182
3231
 
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.112.0",
4
+ "version": "0.113.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.112.0",
40
- "@fusion.dev/helix-cem": "0.112.0",
41
- "@fusion.dev/helix-headless": "0.112.0",
42
- "@fusion.dev/helix-icons": "0.112.0",
43
- "@fusion.dev/helix-map": "0.112.0",
44
- "@fusion.dev/helix-styles": "0.112.0",
45
- "@fusion.dev/helix-testing": "0.112.0",
46
- "@fusion.dev/helix-theme": "0.112.0",
39
+ "@fusion.dev/helix": "0.113.0",
40
+ "@fusion.dev/helix-cem": "0.113.0",
41
+ "@fusion.dev/helix-headless": "0.113.0",
42
+ "@fusion.dev/helix-icons": "0.113.0",
43
+ "@fusion.dev/helix-map": "0.113.0",
44
+ "@fusion.dev/helix-styles": "0.113.0",
45
+ "@fusion.dev/helix-testing": "0.113.0",
46
+ "@fusion.dev/helix-theme": "0.113.0",
47
47
  "@fusion.dev/scripts": "0.0.0-dev",
48
48
  "lit": "^3.2.1",
49
49
  "playwright": "^1.62.1"