@fusion.dev/helix-docs 0.108.0 → 0.108.1

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
@@ -40,7 +40,10 @@ import '@fusion.dev/helix'
40
40
  import 'maplibre-gl/dist/maplibre-gl.css'
41
41
  import { colorsReady, connectMap } from '@fusion.dev/helix-map'
42
42
  import { followTheme, mapLibreDriver, mapLibreStyle } from '@fusion.dev/helix-map/maplibre'
43
- import maplibregl from 'maplibre-gl'
43
+ import * as maplibregl from 'maplibre-gl'
44
+
45
+ // MapLibre 6 runs its worker from a file of its own. Point it there once.
46
+ maplibregl.setWorkerUrl('/maplibre/maplibre-gl-worker.mjs')
44
47
 
45
48
  const frame = document.querySelector('helix-map')
46
49
  const style = (colors) => mapLibreStyle(colors)
@@ -68,10 +71,17 @@ followTheme(map, frame, style)
68
71
  - `connection.fit()` frames every place on the map.
69
72
  - `connection.disconnect()` puts back everything `connectMap` changed.
70
73
 
71
- Use `mapLibreDriver(map)` for MapLibre GL JS 5 and `leafletDriver(map, L)` for
72
- Leaflet 1.9. Neither renderer is bundled with Helix, so you can use the version
73
- you already have. Leaflet draws routes, areas, and points only when you pass it
74
- `L`.
74
+ Use `mapLibreDriver(map)` for MapLibre GL JS 5 or 6 and `leafletDriver(map, L)`
75
+ for Leaflet 1.9. Neither renderer is bundled with Helix, so you can use the
76
+ version you already have. Leaflet draws routes, areas, and points only when you
77
+ pass it `L`.
78
+
79
+ MapLibre 6 ships as modules and runs its worker from its own file,
80
+ `maplibre-gl-worker.mjs`, which imports `maplibre-gl-shared.mjs` beside it.
81
+ Serve both from one folder and call `setWorkerUrl` with the worker's address
82
+ before you create a map, as MapLibre's installation guide shows for your
83
+ bundler. In Next.js, copy both files into `public/` at build time. MapLibre 6
84
+ fixes a sanitizing flaw in earlier versions, so use 6.4.1 or later.
75
85
 
76
86
  ## Style the map with your theme
77
87
 
@@ -2315,7 +2315,10 @@ import '@fusion.dev/helix'
2315
2315
  import 'maplibre-gl/dist/maplibre-gl.css'
2316
2316
  import { colorsReady, connectMap } from '@fusion.dev/helix-map'
2317
2317
  import { followTheme, mapLibreDriver, mapLibreStyle } from '@fusion.dev/helix-map/maplibre'
2318
- import maplibregl from 'maplibre-gl'
2318
+ import * as maplibregl from 'maplibre-gl'
2319
+
2320
+ // MapLibre 6 runs its worker from a file of its own. Point it there once.
2321
+ maplibregl.setWorkerUrl('/maplibre/maplibre-gl-worker.mjs')
2319
2322
 
2320
2323
  const frame = document.querySelector('helix-map')
2321
2324
  const style = (colors) => mapLibreStyle(colors)
@@ -2343,10 +2346,17 @@ followTheme(map, frame, style)
2343
2346
  - \`connection.fit()\` frames every place on the map.
2344
2347
  - \`connection.disconnect()\` puts back everything \`connectMap\` changed.
2345
2348
 
2346
- Use \`mapLibreDriver(map)\` for MapLibre GL JS 5 and \`leafletDriver(map, L)\` for
2347
- Leaflet 1.9. Neither renderer is bundled with Helix, so you can use the version
2348
- you already have. Leaflet draws routes, areas, and points only when you pass it
2349
- \`L\`.
2349
+ Use \`mapLibreDriver(map)\` for MapLibre GL JS 5 or 6 and \`leafletDriver(map, L)\`
2350
+ for Leaflet 1.9. Neither renderer is bundled with Helix, so you can use the
2351
+ version you already have. Leaflet draws routes, areas, and points only when you
2352
+ pass it \`L\`.
2353
+
2354
+ MapLibre 6 ships as modules and runs its worker from its own file,
2355
+ \`maplibre-gl-worker.mjs\`, which imports \`maplibre-gl-shared.mjs\` beside it.
2356
+ Serve both from one folder and call \`setWorkerUrl\` with the worker's address
2357
+ before you create a map, as MapLibre's installation guide shows for your
2358
+ bundler. In Next.js, copy both files into \`public/\` at build time. MapLibre 6
2359
+ fixes a sanitizing flaw in earlier versions, so use 6.4.1 or later.
2350
2360
 
2351
2361
  ## Style the map with your theme
2352
2362
 
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.108.0",
4
+ "version": "0.108.1",
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.108.0",
40
- "@fusion.dev/helix-testing": "0.108.0",
39
+ "@fusion.dev/helix-cem": "0.108.1",
40
+ "@fusion.dev/helix-testing": "0.108.1",
41
41
  "@fusion.dev/scripts": "0.0.0-dev",
42
42
  "lit": "^3.2.1",
43
43
  "playwright": "^1.62.1"