@element-editor/react 0.2.0 → 0.2.2

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.
@@ -1,90 +1,102 @@
1
1
  "use client";
2
2
  import { ElementEditorError as q, writeStorage as G, readStorage as J } from "@element-editor/core";
3
- import { ACCENT_STEPS as _e, DEFAULT_ACCENT as Ne, ElementEditorError as De, accentPalette as Fe } from "@element-editor/core";
4
- import { useUIStore as x, useElementEditorConfig as R } from "@element-editor/ui";
5
- import { DEFAULT_LAYOUT as Ze, IconButton as je, Tooltip as ze, withLayout as Ye } from "@element-editor/ui";
6
- import { jsxs as W, Fragment as K, jsx as v } from "react/jsx-runtime";
7
- import { memo as X, useRef as w, useState as P, useEffect as _, forwardRef as H, useCallback as Q } from "react";
8
- import { useBasemap as ee, ElementEditorControls as te, BasemapControl as oe } from "@element-editor/adapter-maplibre";
9
- import { loadErrorCode as ne, warnOnce as Z, isDevBuild as re } from "@element-editor/core/internal";
10
- import { r as ie, F as se, a as ae, s as le, u as ce, b as me, p as ue, E as de } from "./useBasemapState-DChxz3lv.js";
11
- import N from "maplibre-gl";
12
- import { useServiceAttribution as pe } from "@element-editor/ui/internal";
13
- import { loadBasemapStyle as fe, resolveBasemap as Ee } from "@element-editor/adapter-maplibre/basemaps";
14
- const D = { version: 8, sources: {}, layers: [] }, be = X(function({ basemap: r, themeMode: E, attributionTarget: s, attributionCorner: b, getFeatureStyle: O, setup: C, onReady: d }) {
15
- const T = x((t) => t.readonly), p = x((t) => t.reportError), A = x((t) => t.bounds), L = w(null), [n, S] = P(null), h = w({ basemap: r, themeMode: E, scope: R(), setup: C }), B = w(p);
16
- B.current = p, ee(n, r, { theme: E, initialApplied: !0 });
17
- const o = pe();
18
- _(() => {
19
- const t = L.current;
20
- if (!t) return;
21
- let l = !1, f = null, i = null, k;
22
- const { basemap: Y, themeMode: I, scope: M, setup: U } = h.current, V = (m) => {
23
- const u = `The basemap could not be loaded (${m instanceof Error ? m.message : String(m)}). The map shows no basemap; editing still works.`;
24
- console.error(`[element-editor] ${u}`), B.current(new q(ne(m), "basemap", u, { cause: m }));
3
+ import { ACCENT_STEPS as je, DEFAULT_ACCENT as De, ElementEditorError as Fe, accentPalette as Pe } from "@element-editor/core";
4
+ import { useUIStore as M, useElementEditorConfig as R } from "@element-editor/ui";
5
+ import { DEFAULT_LAYOUT as ze, IconButton as Ye, Tooltip as $e, withLayout as qe } from "@element-editor/ui";
6
+ import { jsxs as K, Fragment as X, jsx as v } from "react/jsx-runtime";
7
+ import { memo as H, useRef as w, useState as F, useEffect as W, forwardRef as Q, useCallback as ee } from "react";
8
+ import { useBasemap as te, ElementEditorControls as oe, BasemapControl as re } from "@element-editor/adapter-maplibre";
9
+ import { loadErrorCode as ne, warnOnce as P, isDevBuild as ie } from "@element-editor/core/internal";
10
+ import { r as se, F as le, a as ae, s as ce, u as ue, b as me, p as de, E as pe } from "./useBasemapState-DChxz3lv.js";
11
+ import * as x from "maplibre-gl";
12
+ import { useServiceAttribution as fe } from "@element-editor/ui/internal";
13
+ import { loadBasemapStyle as Ee, resolveBasemap as be } from "@element-editor/adapter-maplibre/basemaps";
14
+ const ge = (e) => `https://cdn.jsdelivr.net/npm/maplibre-gl@${e}/dist/maplibre-gl-worker.mjs`;
15
+ function he(e, t, s) {
16
+ return !(parseInt(t, 10) >= 6) || s || e === !1 ? null : e ?? ge(t);
17
+ }
18
+ function we(e, t = x) {
19
+ if (typeof t.getWorkerUrl != "function" || typeof t.setWorkerUrl != "function" || typeof t.getVersion != "function") return;
20
+ const s = he(e, t.getVersion(), t.getWorkerUrl());
21
+ s && t.setWorkerUrl(s);
22
+ }
23
+ const j = { version: 8, sources: {}, layers: [] }, ye = H(function({ basemap: t, themeMode: s, attributionTarget: l, attributionCorner: b, getFeatureStyle: B, setup: C, onReady: p }) {
24
+ const O = M((o) => o.readonly), f = M((o) => o.reportError), k = M((o) => o.bounds), A = w(null), [n, L] = F(null), g = w({ basemap: t, themeMode: s, scope: R(), setup: C }), S = w(f);
25
+ S.current = f, te(n, t, { theme: s, initialApplied: !0 });
26
+ const r = fe();
27
+ W(() => {
28
+ const o = A.current;
29
+ if (!o) return;
30
+ let c = !1, E = null, i = null, T;
31
+ const { basemap: Y, themeMode: I, scope: U, setup: V } = g.current, _ = (m) => {
32
+ const d = `The basemap could not be loaded (${m instanceof Error ? m.message : String(m)}). The map shows no basemap; editing still works.`;
33
+ console.error(`[element-editor] ${d}`), S.current(new q(ne(m), "basemap", d, { cause: m }));
25
34
  };
26
- return fe(Ee(Y, I), { network: M.network, theme: I }).catch((m) => (l || V(m), D)).then((m) => {
27
- if (l) return;
28
- const u = ie(U, M), c = new N.Map({
29
- ...U.mapOptions,
30
- container: t,
35
+ return Ee(be(Y, I), { network: U.network, theme: I }).catch((m) => (c || _(m), j)).then((m) => {
36
+ var N;
37
+ if (c) return;
38
+ const d = se(V, U);
39
+ we((N = U.network) == null ? void 0 : N.maplibreWorker);
40
+ const u = new x.Map({
41
+ ...V.mapOptions,
42
+ container: o,
31
43
  style: m,
32
- ..."bounds" in u ? { bounds: [[u.bounds[0], u.bounds[1]], [u.bounds[2], u.bounds[3]]], fitBoundsOptions: { padding: ae, maxZoom: se } } : { center: u.center, zoom: u.zoom },
44
+ ..."bounds" in d ? { bounds: [[d.bounds[0], d.bounds[1]], [d.bounds[2], d.bounds[3]]], fitBoundsOptions: { padding: ae, maxZoom: le } } : { center: d.center, zoom: d.zoom },
33
45
  attributionControl: !1
34
46
  });
35
- if (f = c, typeof m == "string") {
36
- const g = ($) => {
37
- c.off("error", g), V($.error), c.setStyle(D, { diff: !1 });
47
+ if (E = u, typeof m == "string") {
48
+ const h = ($) => {
49
+ u.off("error", h), _($.error), u.setStyle(j, { diff: !1 });
38
50
  };
39
- c.on("error", g), c.once("styledata", () => c.off("error", g));
51
+ u.on("error", h), u.once("styledata", () => u.off("error", h));
40
52
  }
41
- c.on("moveend", () => {
42
- clearTimeout(k), k = setTimeout(() => {
43
- const g = c.getCenter();
44
- le(g.lat, g.lng, c.getZoom(), M);
53
+ u.on("moveend", () => {
54
+ clearTimeout(T), T = setTimeout(() => {
55
+ const h = u.getCenter();
56
+ ce(h.lat, h.lng, u.getZoom(), U);
45
57
  }, 300);
46
- }), i = new ResizeObserver(() => c.resize()), i.observe(t), S(c);
58
+ }), i = new ResizeObserver(() => u.resize()), i.observe(o), L(u);
47
59
  }), () => {
48
- l = !0, clearTimeout(k), i == null || i.disconnect(), f == null || f.remove(), S(null);
60
+ c = !0, clearTimeout(T), i == null || i.disconnect(), E == null || E.remove(), L(null);
49
61
  };
50
62
  }, []);
51
- const a = w(null), y = ce(n == null ? void 0 : n.getContainer(), () => {
52
- const t = a.current;
53
- t && t.classList.contains("maplibregl-compact") && !t.classList.contains("maplibregl-attrib-empty") && t.classList.remove("maplibregl-compact-show");
54
- }, !!n && !s);
55
- return _(() => {
63
+ const a = w(null), y = ue(n == null ? void 0 : n.getContainer(), () => {
64
+ const o = a.current;
65
+ o && o.classList.contains("maplibregl-compact") && !o.classList.contains("maplibregl-attrib-empty") && o.classList.remove("maplibregl-compact-show");
66
+ }, !!n && !l);
67
+ return W(() => {
56
68
  if (!n) return;
57
- const t = new N.AttributionControl({
58
- compact: !s,
59
- ...o && { customAttribution: o }
69
+ const o = new x.AttributionControl({
70
+ compact: !l,
71
+ ...r && { customAttribution: r }
60
72
  });
61
- n.addControl(t, "bottom-right");
62
- const l = n.getContainer().querySelector(".maplibregl-ctrl-attrib");
63
- a.current = l;
64
- const f = s ?? b;
65
- f && l && (l.classList.add(s ? "elm-attribution-bar" : "elm-attribution-corner"), f.appendChild(l));
66
- const i = l == null ? void 0 : l.querySelector(".maplibregl-ctrl-attrib-button");
73
+ n.addControl(o, "bottom-right");
74
+ const c = n.getContainer().querySelector(".maplibregl-ctrl-attrib");
75
+ a.current = c;
76
+ const E = l ?? b;
77
+ E && c && (c.classList.add(l ? "elm-attribution-bar" : "elm-attribution-corner"), E.appendChild(c));
78
+ const i = c == null ? void 0 : c.querySelector(".maplibregl-ctrl-attrib-button");
67
79
  return i == null || i.addEventListener("click", y), () => {
68
80
  i == null || i.removeEventListener("click", y), a.current = null;
69
81
  try {
70
- n.removeControl(t);
82
+ n.removeControl(o);
71
83
  } catch {
72
84
  }
73
85
  };
74
- }, [n, s, b, o, y]), /* @__PURE__ */ W(K, { children: [
75
- /* @__PURE__ */ v("div", { ref: L, style: { position: "absolute", inset: 0, zIndex: 0 } }),
86
+ }, [n, l, b, r, y]), /* @__PURE__ */ K(X, { children: [
87
+ /* @__PURE__ */ v("div", { ref: A, style: { position: "absolute", inset: 0, zIndex: 0 } }),
76
88
  n && /* @__PURE__ */ v(
77
- te,
89
+ oe,
78
90
  {
79
91
  map: n,
80
- readonly: T,
81
- getFeatureStyle: O,
82
- maxBounds: A ?? null,
83
- onReady: d
92
+ readonly: O,
93
+ getFeatureStyle: B,
94
+ maxBounds: k ?? null,
95
+ onReady: p
84
96
  }
85
97
  )
86
98
  ] });
87
- }), he = {
99
+ }), ve = {
88
100
  container: "Element creates the map container.",
89
101
  style: "Use the `basemap` / `defaultBasemap` prop.",
90
102
  center: "Use `initialView`.",
@@ -97,82 +109,82 @@ const D = { version: 8, sources: {}, layers: [] }, be = X(function({ basemap: r,
97
109
  dragPan: "Element turns dragPan on and off while editing.",
98
110
  boxZoom: "Element turns boxZoom on and off while editing.",
99
111
  doubleClickZoom: "Element turns doubleClickZoom on and off while editing."
100
- }, j = "elm_basemap", ge = ["auto", "streets", "terrain", "light", "dark", "osm"], z = (e) => typeof e == "string" ? e : e.id, F = (e) => typeof e == "object" && !e.id && !e.label && "style" in e && typeof e.style != "string";
101
- function we(e) {
102
- const r = w(e);
103
- re() && e !== r.current && F(e) && F(r.current) && JSON.stringify(e) === JSON.stringify(r.current) && Z("basemap-anon-style", "<ElementEditor basemap>: an id-less style object is passed as a new object on every render, so the style is re-applied each time. Give it an `id` or keep the object stable (module-level or useMemo)."), r.current = e;
112
+ }, Z = "elm_basemap", Ce = ["auto", "streets", "terrain", "light", "dark", "osm"], z = (e) => typeof e == "string" ? e : e.id, D = (e) => typeof e == "object" && !e.id && !e.label && "style" in e && typeof e.style != "string";
113
+ function ke(e) {
114
+ const t = w(e);
115
+ ie() && e !== t.current && D(e) && D(t.current) && JSON.stringify(e) === JSON.stringify(t.current) && P("basemap-anon-style", "<ElementEditor basemap>: an id-less style object is passed as a new object on every render, so the style is re-applied each time. Give it an `id` or keep the object stable (module-level or useMemo)."), t.current = e;
104
116
  }
105
- function ye(e, r, E) {
106
- if (r === !1) return e;
107
- const s = J(j, E);
108
- return r.find((b) => s && z(b) === s) ?? e;
117
+ function Ae(e, t, s) {
118
+ if (t === !1) return e;
119
+ const l = J(Z, s);
120
+ return t.find((b) => l && z(b) === l) ?? e;
109
121
  }
110
- const ve = ["tileLayer", "renderer"], Ce = H(
111
- ({ basemap: e, defaultBasemap: r = "auto", onBasemapChange: E, basemaps: s, getFeatureStyle: b, mapOptions: O, onMapReady: C, ...d }, T) => {
112
- for (const o of ve)
113
- d[o] !== void 0 && Z(`maplibre-${o}`, `<ElementEditor ${o}> is a Leaflet prop and is ignored by the default (MapLibre) editor. Import ElementEditor from '@element-editor/react/leaflet' (and '@element-editor/react/leaflet/style.css') to keep using it.`);
114
- const p = s === void 0 ? ge : s, { current: A, pick: L, api: n } = me(
122
+ const Le = ["tileLayer", "renderer"], Se = Q(
123
+ ({ basemap: e, defaultBasemap: t = "auto", onBasemapChange: s, basemaps: l, getFeatureStyle: b, mapOptions: B, onMapReady: C, ...p }, O) => {
124
+ for (const r of Le)
125
+ p[r] !== void 0 && P(`maplibre-${r}`, `<ElementEditor ${r}> is a Leaflet prop and is ignored by the default (MapLibre) editor. Import ElementEditor from '@element-editor/react/leaflet' (and '@element-editor/react/leaflet/style.css') to keep using it.`);
126
+ const f = l === void 0 ? Ce : l, { current: k, pick: A, api: n } = me(
115
127
  e,
116
- () => ye(r, p, d.config),
117
- E,
118
- (o) => {
119
- const a = z(o);
120
- a && G(j, a, d.config);
128
+ () => Ae(t, f, p.config),
129
+ s,
130
+ (r) => {
131
+ const a = z(r);
132
+ a && G(Z, a, p.config);
121
133
  },
122
- p !== !1
134
+ f !== !1
123
135
  );
124
- we(e);
125
- const [S] = P(() => ({
126
- initialView: d.initialView,
127
- initialData: d.initialData,
128
- bounds: d.bounds,
129
- mapOptions: ue(O, he, "maplibre")
130
- })), h = w(C);
131
- h.current = C;
132
- const B = Q((o) => {
136
+ ke(e);
137
+ const [L] = F(() => ({
138
+ initialView: p.initialView,
139
+ initialData: p.initialData,
140
+ bounds: p.bounds,
141
+ mapOptions: de(B, ve, "maplibre")
142
+ })), g = w(C);
143
+ g.current = C;
144
+ const S = ee((r) => {
133
145
  var a;
134
- return (a = h.current) == null ? void 0 : a.call(h, o);
146
+ return (a = g.current) == null ? void 0 : a.call(g, r);
135
147
  }, []);
136
148
  return /* @__PURE__ */ v(
137
- de,
149
+ pe,
138
150
  {
139
- ...d,
140
- ref: T,
151
+ ...p,
152
+ ref: O,
141
153
  extraApi: n,
142
154
  engine: "maplibre",
143
- basemapControl: p === !1 ? void 0 : /* @__PURE__ */ v(
144
- oe,
155
+ basemapControl: f === !1 ? void 0 : /* @__PURE__ */ v(
156
+ re,
145
157
  {
146
- basemaps: p,
147
- value: A,
148
- onChange: (o) => L(o, !0)
158
+ basemaps: f,
159
+ value: k,
160
+ onChange: (r) => A(r, !0)
149
161
  }
150
162
  ),
151
- renderMap: ({ attributionTarget: o, attributionCorner: a, themeMode: y }) => /* @__PURE__ */ v(
152
- be,
163
+ renderMap: ({ attributionTarget: r, attributionCorner: a, themeMode: y }) => /* @__PURE__ */ v(
164
+ ye,
153
165
  {
154
- basemap: A,
166
+ basemap: k,
155
167
  themeMode: y,
156
- attributionTarget: o,
168
+ attributionTarget: r,
157
169
  attributionCorner: a,
158
170
  getFeatureStyle: b,
159
- setup: S,
160
- onReady: B
171
+ setup: L,
172
+ onReady: S
161
173
  }
162
174
  )
163
175
  }
164
176
  );
165
177
  }
166
178
  );
167
- Ce.displayName = "ElementEditor";
179
+ Se.displayName = "ElementEditor";
168
180
  export {
169
- _e as ACCENT_STEPS,
170
- Ne as DEFAULT_ACCENT,
171
- Ze as DEFAULT_LAYOUT,
172
- Ce as ElementEditor,
173
- De as ElementEditorError,
174
- je as IconButton,
175
- ze as Tooltip,
176
- Fe as accentPalette,
177
- Ye as withLayout
181
+ je as ACCENT_STEPS,
182
+ De as DEFAULT_ACCENT,
183
+ ze as DEFAULT_LAYOUT,
184
+ Se as ElementEditor,
185
+ Fe as ElementEditorError,
186
+ Ye as IconButton,
187
+ $e as Tooltip,
188
+ Pe as accentPalette,
189
+ qe as withLayout
178
190
  };
@@ -1,8 +1,9 @@
1
- import { default as maplibregl, MapOptions } from 'maplibre-gl';
1
+ import { MapOptions } from 'maplibre-gl';
2
2
  import { FeatureStyleFn } from '@element-editor/adapter-maplibre';
3
3
  import { BasemapInput } from '@element-editor/adapter-maplibre/basemaps';
4
4
  import { InitialView } from '../shell/savedView.cjs';
5
5
  import { BoundsInput, FeatureCollectionInput, GeoJSONFeatureInput } from '@element-editor/core';
6
+ import * as maplibregl from 'maplibre-gl';
6
7
  /** Creation-time inputs of the map, read once (the entry passes the first values). */
7
8
  export interface MapSetup {
8
9
  initialView?: InitialView;
@@ -1,8 +1,9 @@
1
- import { default as maplibregl, MapOptions } from 'maplibre-gl';
1
+ import { MapOptions } from 'maplibre-gl';
2
2
  import { FeatureStyleFn } from '@element-editor/adapter-maplibre';
3
3
  import { BasemapInput } from '@element-editor/adapter-maplibre/basemaps';
4
4
  import { InitialView } from '../shell/savedView.js';
5
5
  import { BoundsInput, FeatureCollectionInput, GeoJSONFeatureInput } from '@element-editor/core';
6
+ import * as maplibregl from 'maplibre-gl';
6
7
  /** Creation-time inputs of the map, read once (the entry passes the first values). */
7
8
  export interface MapSetup {
8
9
  initialView?: InitialView;
@@ -0,0 +1,21 @@
1
+ import { NetworkConfig } from '@element-editor/core';
2
+ import * as maplibregl from 'maplibre-gl';
3
+ /** Default `config.network.maplibreWorker`: jsDelivr copy of the installed maplibre-gl version. */
4
+ export declare const workerCdnUrl: (version: string) => string;
5
+ type WorkerApi = Pick<typeof maplibregl, 'getVersion' | 'getWorkerUrl' | 'setWorkerUrl'>;
6
+ /**
7
+ * The worker URL the drop-in should pass to `setWorkerUrl`, or `null` to leave MapLibre alone:
8
+ * on 5.x (worker built in), when the app already set one (`current`), or with `setting: false`.
9
+ */
10
+ export declare function resolveWorkerUrl(setting: NetworkConfig['maplibreWorker'], version: string, current: string): string | null;
11
+ /**
12
+ * Makes sure MapLibre can start its worker before the drop-in creates its map.
13
+ *
14
+ * MapLibre GL JS 5 inlines its worker. Version 6 is ESM-only and loads the worker from a separate
15
+ * file (`maplibre-gl-worker.mjs`) that it looks for next to its own module (`import.meta.url`).
16
+ * Bundlers (Vite, webpack, Turbopack) move maplibre-gl into their own chunks, so that lookup misses
17
+ * and the map shows nothing unless someone calls `setWorkerUrl`. The drop-in does, with
18
+ * `config.network.maplibreWorker` (see `resolveWorkerUrl`).
19
+ */
20
+ export declare function ensureWorkerUrl(setting: NetworkConfig['maplibreWorker'], lib?: WorkerApi): void;
21
+ export {};
@@ -0,0 +1,21 @@
1
+ import { NetworkConfig } from '@element-editor/core';
2
+ import * as maplibregl from 'maplibre-gl';
3
+ /** Default `config.network.maplibreWorker`: jsDelivr copy of the installed maplibre-gl version. */
4
+ export declare const workerCdnUrl: (version: string) => string;
5
+ type WorkerApi = Pick<typeof maplibregl, 'getVersion' | 'getWorkerUrl' | 'setWorkerUrl'>;
6
+ /**
7
+ * The worker URL the drop-in should pass to `setWorkerUrl`, or `null` to leave MapLibre alone:
8
+ * on 5.x (worker built in), when the app already set one (`current`), or with `setting: false`.
9
+ */
10
+ export declare function resolveWorkerUrl(setting: NetworkConfig['maplibreWorker'], version: string, current: string): string | null;
11
+ /**
12
+ * Makes sure MapLibre can start its worker before the drop-in creates its map.
13
+ *
14
+ * MapLibre GL JS 5 inlines its worker. Version 6 is ESM-only and loads the worker from a separate
15
+ * file (`maplibre-gl-worker.mjs`) that it looks for next to its own module (`import.meta.url`).
16
+ * Bundlers (Vite, webpack, Turbopack) move maplibre-gl into their own chunks, so that lookup misses
17
+ * and the map shows nothing unless someone calls `setWorkerUrl`. The drop-in does, with
18
+ * `config.network.maplibreWorker` (see `resolveWorkerUrl`).
19
+ */
20
+ export declare function ensureWorkerUrl(setting: NetworkConfig['maplibreWorker'], lib?: WorkerApi): void;
21
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@element-editor/react",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Drop-in React map editor: one component with drawing tools, vertex editing, snapping, a data table and a GeoJSON inspector, on MapLibre GL or Leaflet.",
5
5
  "keywords": [
6
6
  "element-editor",
@@ -43,6 +43,10 @@
43
43
  },
44
44
  "exports": {
45
45
  ".": {
46
+ "module": {
47
+ "types": "./dist/index.d.ts",
48
+ "default": "./dist/element-editor.es.js"
49
+ },
46
50
  "import": {
47
51
  "types": "./dist/index.d.ts",
48
52
  "default": "./dist/element-editor.es.js"
@@ -81,9 +85,9 @@
81
85
  "dependencies": {
82
86
  "@phosphor-icons/react": "^2.1.10",
83
87
  "sonner": "^2.0.7",
84
- "@element-editor/adapter-maplibre": "0.2.0",
85
- "@element-editor/ui": "0.2.0",
86
- "@element-editor/core": "0.2.0"
88
+ "@element-editor/adapter-maplibre": "0.2.2",
89
+ "@element-editor/core": "0.2.2",
90
+ "@element-editor/ui": "0.2.2"
87
91
  },
88
92
  "devDependencies": {
89
93
  "@playwright/test": "^1.58.2",
@@ -101,7 +105,7 @@
101
105
  "@vitest/coverage-v8": "^4.1.0",
102
106
  "jsdom": "^29.0.0",
103
107
  "leaflet": "^1.9.0",
104
- "maplibre-gl": "^5.0.0",
108
+ "maplibre-gl": "^6.18.0",
105
109
  "playwright": "^1.59.1",
106
110
  "react-data-grid": "7.0.0-beta.57",
107
111
  "react-leaflet": "^5.0.0",
@@ -110,15 +114,15 @@
110
114
  "vite": "^6.0.5",
111
115
  "vite-plugin-dts": "^4.5.4",
112
116
  "vitest": "^4.1.0",
113
- "@element-editor/adapter-leaflet": "0.2.0"
117
+ "@element-editor/adapter-leaflet": "0.2.2"
114
118
  },
115
119
  "peerDependencies": {
116
120
  "leaflet": "^1.9.0",
117
- "maplibre-gl": "^5.5.0",
121
+ "maplibre-gl": "^5.5.0 || ^6.0.0",
118
122
  "react": "^19.2.0",
119
123
  "react-dom": "^19.2.0",
120
124
  "react-leaflet": "^5.0.0",
121
- "@element-editor/adapter-leaflet": "^0.2.0"
125
+ "@element-editor/adapter-leaflet": "^0.2.2"
122
126
  },
123
127
  "peerDependenciesMeta": {
124
128
  "@element-editor/adapter-leaflet": {