@local-logic/maps 0.0.21 → 0.0.23

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.
Files changed (38) hide show
  1. package/dist/index-B85VZGVP.js +56 -0
  2. package/dist/index-BRD3rjLE.js +138 -0
  3. package/dist/index-BpFpg_5A.js +78 -0
  4. package/dist/index-BrxP9NHZ.js +56 -0
  5. package/dist/{index-AcZakyxd.js → index-CN_dNOir.js} +168 -172
  6. package/dist/index-CRdDPWou.js +34 -0
  7. package/dist/{index-Dz1XJJEv.js → index-CSVsF1EQ.js} +28 -28
  8. package/dist/index-CceEGv05.js +104 -0
  9. package/dist/{index-DdYanSGw.js → index-CiWKwaC4.js} +2 -2
  10. package/dist/{index-6JzOJU8O.js → index-CmajMf1d.js} +21 -21
  11. package/dist/index-D5kHxP9H.js +43 -0
  12. package/dist/{index-29Y5fJR0.js → index-DNNz78Rc.js} +2 -2
  13. package/dist/index-Db33Ugg9.js +34 -0
  14. package/dist/index-DfhwDiOS.js +155 -0
  15. package/dist/index-arkRlpaR.js +80 -0
  16. package/dist/index-ufLC1PLO.js +57 -0
  17. package/dist/{index-Dxh7aMoG.js → index-vHMPqmOL.js} +2 -2
  18. package/dist/index.es.js +1 -1
  19. package/dist/{index.modern-fpUBOYPT.js → index.modern-B-ChKejQ.js} +9 -9
  20. package/dist/index.umd.js +115 -115
  21. package/dist/{logo-control-C5ZdRec5.js → logo-control-VgN6MEKI.js} +186 -206
  22. package/dist/{mapbox-gl-D6JObe4m.js → mapbox-gl-C6frO4Gl.js} +1877 -1877
  23. package/dist/{maplibre-gl-DDfJU6SR.js → maplibre-gl-DkDrZ6rP.js} +1230 -1228
  24. package/dist/{scale-control-Cflgzbvb.js → scale-control-jBKptTbw.js} +234 -252
  25. package/dist/style.css +1 -1
  26. package/dist/{styles-B8oT_wcC.js → styles-BR85tnqI.js} +16 -17
  27. package/package.json +2 -2
  28. package/dist/index-CHSsiFtN.js +0 -139
  29. package/dist/index-CqUTGwL0.js +0 -34
  30. package/dist/index-Cwn0dgP_.js +0 -56
  31. package/dist/index-D--WdzK4.js +0 -79
  32. package/dist/index-D1Phs0fA.js +0 -57
  33. package/dist/index-D1vI6Ww_.js +0 -43
  34. package/dist/index-DHHG0vNa.js +0 -157
  35. package/dist/index-DKFcZs0A.js +0 -81
  36. package/dist/index-DZTFM839.js +0 -105
  37. package/dist/index-_8n5sl1B.js +0 -56
  38. package/dist/index-_n1FGHXc.js +0 -34
@@ -0,0 +1,57 @@
1
+ import { jsxs as u, jsx as r } from "react/jsx-runtime";
2
+ import { u as f, a as k } from "./index.modern-B-ChKejQ.js";
3
+ import { u as M, M as g } from "./index-CN_dNOir.js";
4
+ import { C, c as v, M as I } from "./index-CmajMf1d.js";
5
+ function x({
6
+ clusters: t,
7
+ colors: o,
8
+ clusterIcon: s,
9
+ onClick: n,
10
+ doesSuperclusterContainActiveMarker: p
11
+ }) {
12
+ f();
13
+ const { activeMarker: d, zoom: c } = M(), m = (e) => () => {
14
+ e.properties.disableClick || n?.(e);
15
+ };
16
+ return t?.map((e, l) => {
17
+ const i = e.geometry.coordinates[0], a = e.geometry.coordinates[1];
18
+ return /* @__PURE__ */ u(
19
+ k,
20
+ {
21
+ position: {
22
+ lat: a,
23
+ lng: i
24
+ },
25
+ onClick: m(e),
26
+ children: [
27
+ e.properties.cluster && /* @__PURE__ */ r(
28
+ C,
29
+ {
30
+ colors: o,
31
+ icon: s,
32
+ isActive: p(e.properties.cluster_id)
33
+ }
34
+ ),
35
+ !e.properties.cluster && /* @__PURE__ */ r(
36
+ "div",
37
+ {
38
+ className: v,
39
+ style: e.properties.defaultColor ? {} : {
40
+ "--background": o?.background,
41
+ "--fill": o?.fill
42
+ },
43
+ "data-is-cluster": !!e.properties.cluster,
44
+ "data-is-zoomed-out": c - 1 < g + 1,
45
+ "data-is-active": d?.id === e.properties.id,
46
+ children: /* @__PURE__ */ r(I, { icon: e.properties.icon })
47
+ }
48
+ )
49
+ ]
50
+ },
51
+ `map-marker-${i}-${a}-${l}`
52
+ );
53
+ });
54
+ }
55
+ export {
56
+ x as default
57
+ };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as n, jsx as i } from "react/jsx-runtime";
2
- import { t as a, b as o, S as r, o as s, i as c, c as d } from "./styles-B8oT_wcC.js";
3
- import { a as l } from "./logo-control-C5ZdRec5.js";
2
+ import { t as a, b as o, S as r, o as s, i as c, c as d } from "./styles-BR85tnqI.js";
3
+ import { a as l } from "./logo-control-VgN6MEKI.js";
4
4
  import "react";
5
5
  function f({ marker: t, className: e }) {
6
6
  return /* @__PURE__ */ n(
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as c } from "./index-AcZakyxd.js";
1
+ import { i as c } from "./index-CN_dNOir.js";
2
2
  export {
3
3
  c as LocalLogicMap
4
4
  };
@@ -165,7 +165,7 @@ function Oe(t) {
165
165
  libraries: i = []
166
166
  } = t, a = D(t, ve), [s, c] = A(B.loadingStatus), [u, d] = ee((l, g) => l[g.name] ? l : _({}, l, {
167
167
  [g.name]: g.value
168
- }), {}), p = P(() => i == null ? void 0 : i.join(","), [i]), f = P(() => JSON.stringify(_({
168
+ }), {}), p = P(() => i?.join(","), [i]), f = P(() => JSON.stringify(_({
169
169
  apiKey: o,
170
170
  version: r
171
171
  }, a)), [o, r, a]), m = te(async (l) => {
@@ -187,7 +187,7 @@ function Oe(t) {
187
187
  const l = _({
188
188
  key: o
189
189
  }, a);
190
- r && (l.v = r), (p == null ? void 0 : p.length) > 0 && (l.libraries = p), (l.channel === void 0 || l.channel < 0 || l.channel > 999) && delete l.channel, l.solutionChannel === void 0 ? l.solutionChannel = ye : l.solutionChannel === "" && delete l.solutionChannel, await B.load(l, (g) => c(g));
190
+ r && (l.v = r), p?.length > 0 && (l.libraries = p), (l.channel === void 0 || l.channel < 0 || l.channel > 999) && delete l.channel, l.solutionChannel === void 0 ? l.solutionChannel = ye : l.solutionChannel === "" && delete l.solutionChannel, await B.load(l, (g) => c(g));
191
191
  for (const g of ["core", "maps", ...i])
192
192
  await m(g);
193
193
  e && e();
@@ -253,14 +253,14 @@ function Ee(t, e, n) {
253
253
  if (Le.includes(t)) {
254
254
  const i = o, a = e.getCenter(), s = e.getZoom(), c = e.getHeading() || 0, u = e.getTilt() || 0, d = e.getBounds();
255
255
  return (!a || !d || !Number.isFinite(s)) && console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"), i.detail = {
256
- center: (a == null ? void 0 : a.toJSON()) || {
256
+ center: a?.toJSON() || {
257
257
  lat: 0,
258
258
  lng: 0
259
259
  },
260
260
  zoom: s || 0,
261
261
  heading: c,
262
262
  tilt: u,
263
- bounds: (d == null ? void 0 : d.toJSON()) || {
263
+ bounds: d?.toJSON() || {
264
264
  north: 90,
265
265
  east: 180,
266
266
  south: -90,
@@ -409,7 +409,7 @@ function Ne() {
409
409
  function ze(t, e) {
410
410
  const n = t.getCenter(), o = t.getZoom(), r = t.getHeading() || 0, i = t.getTilt() || 0, a = t.getBounds();
411
411
  (!n || !a || !Number.isFinite(o)) && console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"), Object.assign(e.current, {
412
- center: (n == null ? void 0 : n.toJSON()) || {
412
+ center: n?.toJSON() || {
413
413
  lat: 0,
414
414
  lng: 0
415
415
  },
@@ -616,7 +616,7 @@ function ce(t) {
616
616
  const e = se(), n = R(G);
617
617
  return v(() => {
618
618
  !e || !n || n.importLibrary(t);
619
- }, [e, n, t]), (n == null ? void 0 : n.loadedLibraries[t]) || null;
619
+ }, [e, n, t]), n?.loadedLibraries[t] || null;
620
620
  }
621
621
  function N(t, e, n) {
622
622
  v(() => {
@@ -700,7 +700,7 @@ function Je(t) {
700
700
  if (!e) return;
701
701
  const y = C !== void 0 || !!c || !!d || !!p;
702
702
  e.gmpClickable = y, y && e != null && e.content && K(e.content) && (e.content.style.pointerEvents = "none", e.content.firstElementChild && (e.content.firstElementChild.style.pointerEvents = "all"));
703
- }, [e, C, c, d, p]), N(e, "click", c), N(e, "drag", f), N(e, "dragstart", m), N(e, "dragend", l), V(e == null ? void 0 : e.element, "mouseenter", d), V(e == null ? void 0 : e.element, "mouseleave", p), [e, o];
703
+ }, [e, C, c, d, p]), N(e, "click", c), N(e, "drag", f), N(e, "dragstart", m), N(e, "dragend", l), V(e?.element, "mouseenter", d), V(e?.element, "mouseleave", p), [e, o];
704
704
  }
705
705
  const it = Y((t, e) => {
706
706
  const {
@@ -849,10 +849,10 @@ const Ye = ["children", "headerContent", "style", "className", "pixelOffset", "a
849
849
  map: I
850
850
  };
851
851
  if (a && (E.anchor = a, $e(a) && a.content instanceof Element)) {
852
- const y = a.content, M = y == null ? void 0 : y.getBoundingClientRect();
852
+ const y = a.content, M = y?.getBoundingClientRect();
853
853
  if (M && y != null && y.isCustomMarker) {
854
854
  var w;
855
- const k = (w = a.content.firstElementChild) == null ? void 0 : w.firstElementChild, S = k == null ? void 0 : k.getBoundingClientRect(), L = S.x - M.x + (S.width - M.width) / 2, T = S.y - M.y, F = C;
855
+ const k = (w = a.content.firstElementChild) == null ? void 0 : w.firstElementChild, S = k?.getBoundingClientRect(), L = S.x - M.x + (S.width - M.width) / 2, T = S.y - M.y, F = C;
856
856
  F.pixelOffset = new google.maps.Size(i ? i[0] + L : L, i ? i[1] + T : T), f.setOptions(F);
857
857
  }
858
858
  }