← All releasesReleased on with 0.2.0 and 0.2.2
Element Editor 0.2.1: works with MapLibre GL JS 6
Element now works with MapLibre GL JS 6 as well as 5.5 and later. If npm i maplibre-gl gave you version 6 and your build failed, update to 0.2.1: the MapLibre drop-in renders with no extra setup. Keyboard users also get clearer focus rings.
Added
- You choose where MapLibre 6 loads its worker from. MapLibre GL JS 6 needs a separate worker file. The MapLibre drop-in loads it from jsDelivr by default, pinned to the
maplibre-glversion you installed. To serve it yourself (offline, intranet, strict CSP), pointconfig.network.maplibreWorkerat your copy; set it tofalseif your app callssetWorkerUrlitself. It has no effect on MapLibre 5, or when your app has already calledsetWorkerUrl. See MapLibre GL JS 6 worker.
Changed
- Install without pinning MapLibre again:
npm i @element-editor/react maplibre-gl. Themaplibre-glpeer range of@element-editor/reactand@element-editor/adapter-maplibreis now^5.5.0 || ^6.0.0. - On MapLibre 6 the MapLibre drop-in sets up the worker for you, so the map renders behind Vite, webpack or Turbopack without app setup. If you use
@element-editor/adapter-maplibreon your own map, call MapLibre'ssetWorkerUrlin your map setup, as shown in the MapLibre adapter quick start.
Fixed
- Builds work on MapLibre GL JS 6. They failed with
"default" is not exported by maplibre-gl/dist/maplibre-gl.mjs. Element now loads MapLibre in a way that works on both 5.x and 6.x. - Next.js with webpack works on MapLibre GL JS 6. webpack picked Element's CommonJS build, which can't load MapLibre 6. Bundlers now get the ES build. One limit remains: if you load Element with plain Node
require(), you needmaplibre-gl5, because MapLibre 6 can't be loaded withrequire(). - Clicks that slip a few pixels still place a point on MapLibre 6, instead of nudging the map. The click tools had lost their 8 px tolerance there.
- Floating windows no longer get an outline around them when opened with the mouse or a keyboard shortcut, even if your page styles
:focus-visible. - Keyboard users can see where focus is on the toolbars. The toolbar buttons show a focus ring, and form inputs use the same neutral ring instead of blue.