← 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-gl version you installed. To serve it yourself (offline, intranet, strict CSP), point config.network.maplibreWorker at your copy; set it to false if your app calls setWorkerUrl itself. It has no effect on MapLibre 5, or when your app has already called setWorkerUrl. See MapLibre GL JS 6 worker.

Changed

  • Install without pinning MapLibre again: npm i @element-editor/react maplibre-gl. The maplibre-gl peer range of @element-editor/react and @element-editor/adapter-maplibre is 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-maplibre on your own map, call MapLibre's setWorkerUrl in 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 need maplibre-gl 5, because MapLibre 6 can't be loaded with require().
  • 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.