@local-logic/maps 0.0.6 → 0.0.8

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 (37) hide show
  1. package/dist/index-92HhWupr.js +29 -0
  2. package/dist/{index-Bd-X-1Gd.js → index-BF2kb4Y-.js} +13 -13
  3. package/dist/{index-BAAE2pMq.js → index-C5-_i-6M.js} +21 -21
  4. package/dist/{index-CXLLvdx4.js → index-CY0to_1B.js} +253 -247
  5. package/dist/{index-BHjgd5HB.js → index-ChwN5abO.js} +1 -1
  6. package/dist/index-CrIFr9oc.js +47 -0
  7. package/dist/{index-BbrOUWDy.js → index-D5-2anzJ.js} +1 -1
  8. package/dist/index.es.js +1 -1
  9. package/dist/index.umd.js +12 -12
  10. package/dist/src/components/Map/Root/BaseMap/Google/index.d.ts.map +1 -1
  11. package/dist/src/components/Map/Root/BaseMap/Mapbox/index.d.ts.map +1 -1
  12. package/dist/src/components/Map/Root/BaseMap/index.d.ts.map +1 -1
  13. package/dist/src/components/Map/Root/Layers/Google/index.d.ts +2 -2
  14. package/dist/src/components/Map/Root/Layers/Google/index.d.ts.map +1 -1
  15. package/dist/src/components/Map/Root/Layers/Mapbox/index.d.ts +2 -2
  16. package/dist/src/components/Map/Root/Layers/Mapbox/index.d.ts.map +1 -1
  17. package/dist/src/components/Map/Root/Layers/Maptiler/index.d.ts +2 -2
  18. package/dist/src/components/Map/Root/Layers/Maptiler/index.d.ts.map +1 -1
  19. package/dist/src/components/Map/Root/Layers/index.d.ts +2 -2
  20. package/dist/src/components/Map/Root/Layers/index.d.ts.map +1 -1
  21. package/dist/src/components/Map/Root/Layers/types.d.ts +1 -1
  22. package/dist/src/components/Map/Root/Layers/types.d.ts.map +1 -1
  23. package/dist/src/components/Map/Root/constants.d.ts +5 -0
  24. package/dist/src/components/Map/Root/constants.d.ts.map +1 -1
  25. package/dist/src/components/Map/Root/index.d.ts +0 -3
  26. package/dist/src/components/Map/Root/index.d.ts.map +1 -1
  27. package/dist/src/components/Map/Root/types.d.ts +1 -1
  28. package/dist/src/components/Map/Root/types.d.ts.map +1 -1
  29. package/dist/src/components/Map/index.d.ts +3 -0
  30. package/dist/src/components/Map/index.d.ts.map +1 -1
  31. package/dist/src/components/Map/index.stories.d.ts +1 -1
  32. package/dist/src/components/Map/index.stories.d.ts.map +1 -1
  33. package/dist/src/components/Map/storybook-data.d.ts +1 -15
  34. package/dist/src/components/Map/storybook-data.d.ts.map +1 -1
  35. package/package.json +2 -2
  36. package/dist/index-B_LO5X9C.js +0 -46
  37. package/dist/index-DHw9gU4K.js +0 -29
@@ -0,0 +1,29 @@
1
+ import { jsx as a, jsxs as d, Fragment as c } from "react/jsx-runtime";
2
+ import { C as h, M as l } from "./index-CXjxZmYt.js";
3
+ import { a as f } from "./logo-control-NE-LlsRy.js";
4
+ import "react";
5
+ import { c as g, i as M, b as t } from "./index-CY0to_1B.js";
6
+ function k({ clusters: o, onClick: e, children: p }) {
7
+ return o == null ? void 0 : o.map((r, m) => {
8
+ const i = r.geometry.coordinates[0], n = r.geometry.coordinates[1];
9
+ return /* @__PURE__ */ a(
10
+ f,
11
+ {
12
+ anchor: "bottom",
13
+ longitude: i,
14
+ latitude: n,
15
+ onClick: (s) => {
16
+ s.originalEvent.stopPropagation(), e == null || e(r);
17
+ },
18
+ children: /* @__PURE__ */ a("div", { className: g, "data-is-cluster": !!r.properties.cluster, children: r.properties.cluster ? /* @__PURE__ */ a(h, { cluster: r }) : /* @__PURE__ */ d(c, { children: [
19
+ /* @__PURE__ */ a("div", { className: M, children: r.properties.icon ? /* @__PURE__ */ a(r.properties.icon, { className: t }) : /* @__PURE__ */ a(l, { className: t }) }),
20
+ p
21
+ ] }) })
22
+ },
23
+ `map-marker-${i}-${n}-${m}`
24
+ );
25
+ });
26
+ }
27
+ export {
28
+ k as default
29
+ };
@@ -1,42 +1,42 @@
1
- import { jsxs as l, jsx as a } from "react/jsx-runtime";
1
+ import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
2
  import { useEffect as c } from "react";
3
3
  import { M as f, N as d, u as M } from "./logo-control-NE-LlsRy.js";
4
- import { u as i, d as o } from "./index-CXLLvdx4.js";
5
- const h = () => {
6
- const { current: t } = M(), { setBounds: e } = i();
4
+ import { u as s, d as o, a as h } from "./index-CY0to_1B.js";
5
+ const y = () => {
6
+ const { current: t } = M(), { setBounds: e } = s();
7
7
  return c(() => {
8
8
  t && e(t.getBounds().toArray().flat());
9
9
  }, [t]), null;
10
10
  };
11
- function x({ children: t }) {
11
+ function z({ children: t }) {
12
12
  const {
13
13
  mapProvider: e,
14
- center: s,
14
+ center: i,
15
15
  zoom: n = o.zoom,
16
16
  pitch: p = o.pitch,
17
17
  bearing: m = o.bearing,
18
18
  cooperativeGestures: u = o.cooperativeGestures,
19
- zoomPosition: r
20
- } = i();
19
+ zoomPosition: a
20
+ } = s();
21
21
  return e.name !== "maptiler" ? null : /* @__PURE__ */ l(
22
22
  f,
23
23
  {
24
24
  initialViewState: {
25
- ...s,
25
+ ...i,
26
26
  zoom: n,
27
27
  pitch: p,
28
28
  bearing: m
29
29
  },
30
30
  cooperativeGestures: u,
31
- mapStyle: `https://api.maptiler.com/maps/${e.maptilerTheme}/style.json?key=${e.apiKey}`,
31
+ mapStyle: `https://api.maptiler.com/maps/${e.theme || h.maptiler}/style.json?key=${e.apiKey}`,
32
32
  children: [
33
- /* @__PURE__ */ a(h, {}),
34
- r && /* @__PURE__ */ a(d, { position: r }),
33
+ /* @__PURE__ */ r(y, {}),
34
+ a && /* @__PURE__ */ r(d, { position: a }),
35
35
  t
36
36
  ]
37
37
  }
38
38
  );
39
39
  }
40
40
  export {
41
- x as default
41
+ z as default
42
42
  };
@@ -1,43 +1,43 @@
1
1
  import { jsxs as g, jsx as i } from "react/jsx-runtime";
2
2
  import { useState as T, useEffect as M } from "react";
3
- import { A as b, M as h, C as a, u as C } from "./index.modern-EsUgbhzI.js";
4
- import { u, d as n } from "./index-CXLLvdx4.js";
5
- const O = {
6
- "top-left": a.LEFT_TOP,
7
- "top-right": a.RIGHT_TOP,
8
- "bottom-left": a.LEFT_BOTTOM,
9
- "bottom-right": a.RIGHT_BOTTOM
10
- }, P = "a7ff20eb973126bb", I = ({ isMapLoaded: s }) => {
11
- const e = C(), { setBounds: r } = u();
3
+ import { A as h, M as C, C as s, u as O } from "./index.modern-EsUgbhzI.js";
4
+ import { u, d as n, a as P } from "./index-CY0to_1B.js";
5
+ const b = {
6
+ "top-left": s.LEFT_TOP,
7
+ "top-right": s.RIGHT_TOP,
8
+ "bottom-left": s.LEFT_BOTTOM,
9
+ "bottom-right": s.RIGHT_BOTTOM
10
+ }, I = ({ isMapLoaded: a }) => {
11
+ const e = O(), { setBounds: r } = u();
12
12
  return M(() => {
13
13
  var t;
14
- if (!s || !e)
14
+ if (!a || !e)
15
15
  return;
16
16
  const o = (t = e.getBounds()) == null ? void 0 : t.toJSON();
17
17
  o && r([o.west, o.south, o.east, o.north]);
18
- }, [s, e]), null;
18
+ }, [a, e]), null;
19
19
  };
20
- function L({ children: s }) {
20
+ function L({ children: a }) {
21
21
  const [e, r] = T(!1), {
22
22
  mapProvider: o,
23
23
  center: t,
24
24
  zoom: p = n.zoom,
25
25
  pitch: d = n.pitch,
26
26
  bearing: f = n.bearing,
27
- cooperativeGestures: c = n.cooperativeGestures,
27
+ cooperativeGestures: m = n.cooperativeGestures,
28
28
  zoomPosition: l
29
29
  } = u();
30
30
  if (o.name !== "google")
31
31
  return null;
32
- const m = () => {
32
+ const c = () => {
33
33
  r(!0);
34
34
  };
35
- return /* @__PURE__ */ g(b, { apiKey: o.apiKey, children: [
35
+ return /* @__PURE__ */ g(h, { apiKey: o.apiKey, children: [
36
36
  /* @__PURE__ */ i(I, { isMapLoaded: e }),
37
37
  /* @__PURE__ */ i(
38
- h,
38
+ C,
39
39
  {
40
- mapId: P,
40
+ mapId: o.theme || P.google,
41
41
  defaultCenter: {
42
42
  lat: t.latitude,
43
43
  lng: t.longitude
@@ -45,16 +45,16 @@ function L({ children: s }) {
45
45
  defaultZoom: p,
46
46
  defaultTilt: d,
47
47
  defaultHeading: f,
48
- gestureHandling: c ? "cooperative" : "greedy",
48
+ gestureHandling: m ? "cooperative" : "greedy",
49
49
  streetViewControl: !1,
50
50
  fullscreenControl: !1,
51
51
  clickableIcons: !1,
52
52
  mapTypeControl: !1,
53
53
  zoomControlOptions: {
54
- position: l && O[l]
54
+ position: l && b[l]
55
55
  },
56
- onTilesLoaded: m,
57
- children: s
56
+ onTilesLoaded: c,
57
+ children: a
58
58
  }
59
59
  )
60
60
  ] });