@local-logic/maps 0.0.10 → 0.0.12

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 (49) hide show
  1. package/dist/{index-BYlamtEc.js → index-B3NH4rqN.js} +30 -17
  2. package/dist/index-B9YXnLOH.js +42 -0
  3. package/dist/index-BcpSqK0X.js +74 -0
  4. package/dist/{index-DgHrPgsK.js → index-Bd7meO8V.js} +245 -234
  5. package/dist/index-BhldVNew.js +35 -0
  6. package/dist/index-Bu4XEiYU.js +74 -0
  7. package/dist/{index-CR8t37Oz.js → index-CzBPD5Sw.js} +10 -10
  8. package/dist/index-DFdfOz0d.js +34 -0
  9. package/dist/index-DsrEcQq0.js +71 -0
  10. package/dist/{index-BtwgeEEU.js → index-LKvWHhi6.js} +14 -14
  11. package/dist/{index-BsnsAUt5.js → index-UEadmVww.js} +2 -1
  12. package/dist/{index-JQfyhSrg.js → index-aDlW4ps0.js} +5 -5
  13. package/dist/index.es.js +1 -1
  14. package/dist/index.umd.js +30 -26
  15. package/dist/src/components/Map/Root/BaseMap/index.d.ts.map +1 -1
  16. package/dist/src/components/Map/Root/Layers/Google/index.d.ts.map +1 -1
  17. package/dist/src/components/Map/Root/Markers/Cluster/index.d.ts +2 -1
  18. package/dist/src/components/Map/Root/Markers/Cluster/index.d.ts.map +1 -1
  19. package/dist/src/components/Map/Root/Markers/Google/index.d.ts +1 -1
  20. package/dist/src/components/Map/Root/Markers/Google/index.d.ts.map +1 -1
  21. package/dist/src/components/Map/Root/Markers/Mapbox/index.d.ts +1 -1
  22. package/dist/src/components/Map/Root/Markers/Mapbox/index.d.ts.map +1 -1
  23. package/dist/src/components/Map/Root/Markers/Maptiler/index.d.ts +1 -1
  24. package/dist/src/components/Map/Root/Markers/Maptiler/index.d.ts.map +1 -1
  25. package/dist/src/components/Map/Root/Markers/index.d.ts.map +1 -1
  26. package/dist/src/components/Map/Root/Markers/styles.d.ts +2 -2
  27. package/dist/src/components/Map/Root/Markers/styles.d.ts.map +1 -1
  28. package/dist/src/components/Map/Root/Markers/types.d.ts +1 -0
  29. package/dist/src/components/Map/Root/Markers/types.d.ts.map +1 -1
  30. package/dist/src/components/Map/Root/Popup/Google/index.d.ts.map +1 -1
  31. package/dist/src/components/Map/Root/Popup/Mapbox/index.d.ts.map +1 -1
  32. package/dist/src/components/Map/Root/Popup/Maptiler/index.d.ts.map +1 -1
  33. package/dist/src/components/Map/Root/Popup/styles.d.ts +1 -1
  34. package/dist/src/components/Map/Root/Popup/styles.d.ts.map +1 -1
  35. package/dist/src/components/Map/Root/constants.d.ts +1 -0
  36. package/dist/src/components/Map/Root/constants.d.ts.map +1 -1
  37. package/dist/src/components/Map/Root/context.d.ts +1 -0
  38. package/dist/src/components/Map/Root/context.d.ts.map +1 -1
  39. package/dist/src/components/Map/Root/types.d.ts +1 -0
  40. package/dist/src/components/Map/Root/types.d.ts.map +1 -1
  41. package/dist/style.css +2 -2
  42. package/dist/{styles-uPzJnzVS.js → styles-ChFj97uV.js} +1 -1
  43. package/package.json +1 -1
  44. package/dist/index-9RZYMoMG.js +0 -39
  45. package/dist/index-BOuko7CL.js +0 -32
  46. package/dist/index-CRQ5kxRL.js +0 -65
  47. package/dist/index-D5uhfwEH.js +0 -31
  48. package/dist/index-DNKXUpkv.js +0 -65
  49. package/dist/index-DnsF5I7I.js +0 -62
@@ -1,6 +1,6 @@
1
1
  const o = `
2
2
  bg-base-white border border-primary-100 w-auto overflow-hidden
3
- rounded-lg w-44 px-2.5 py-3 shadow-sm
3
+ rounded-lg shadow-sm
4
4
  `;
5
5
  export {
6
6
  o as c
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@local-logic/maps",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "description": "This is a maps implementation allowing for the display of Local Logic data on a map.",
5
5
  "author": "Local Logic",
6
6
  "license": "ISC",
@@ -1,39 +0,0 @@
1
- import { jsx as u } from "react/jsx-runtime";
2
- import { useEffect as m, useMemo as o } from "react";
3
- import { u as s, I as d } from "./index.modern-CLRs8JwI.js";
4
- import { c as f } from "./styles-uPzJnzVS.js";
5
- function v({
6
- latitude: n,
7
- longitude: t,
8
- offset: r = [0, -25],
9
- onClose: e,
10
- children: a
11
- }) {
12
- const i = s();
13
- m(() => {
14
- if (!i) return;
15
- const c = i.addListener("click", () => {
16
- e == null || e();
17
- });
18
- return () => {
19
- c.remove();
20
- };
21
- }, [i]);
22
- const p = o(() => Array.isArray(r) ? [r[0], r[1]] : [r, r], [r]);
23
- return typeof n > "u" || typeof t > "u" ? null : /* @__PURE__ */ u(
24
- d,
25
- {
26
- shouldFocus: !0,
27
- position: {
28
- lat: n,
29
- lng: t
30
- },
31
- pixelOffset: p,
32
- onClose: e,
33
- children: /* @__PURE__ */ u("div", { className: f, children: a })
34
- }
35
- );
36
- }
37
- export {
38
- v as default
39
- };
@@ -1,32 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { P as u } from "./logo-control-NE-LlsRy.js";
3
- import "react";
4
- import { c as a } from "./styles-uPzJnzVS.js";
5
- function c({
6
- latitude: e,
7
- longitude: p,
8
- anchor: r,
9
- offset: t = [0, -35],
10
- onClose: n,
11
- children: f
12
- }) {
13
- return typeof e > "u" || typeof p > "u" ? null : /* @__PURE__ */ o(
14
- u,
15
- {
16
- className: "maplibre-popup",
17
- focusAfterOpen: !0,
18
- latitude: e,
19
- longitude: p,
20
- anchor: r,
21
- offset: t,
22
- onClose: n,
23
- closeButton: !1,
24
- closeOnMove: !0,
25
- children: /* @__PURE__ */ o("div", { className: a, children: f })
26
- },
27
- "maplibre-popup"
28
- );
29
- }
30
- export {
31
- c as default
32
- };
@@ -1,65 +0,0 @@
1
- import { jsxs as x, jsx as s } from "react/jsx-runtime";
2
- import { useEffect as c } from "react";
3
- import { u as h, a as L } from "./logo-control-NE-LlsRy.js";
4
- import { u as b, M as E } from "./index-DgHrPgsK.js";
5
- import { C as y, c as O, M as $ } from "./index-BYlamtEc.js";
6
- function N({
7
- clusters: r,
8
- colors: a,
9
- clusterIcon: M,
10
- markerBounds: m,
11
- markerBoundsPadding: e,
12
- onClick: p
13
- }) {
14
- const { current: f } = h(), { zoom: u } = b();
15
- c(() => {
16
- if (f && m) {
17
- const [t, i, o, n] = m;
18
- f.fitBounds(
19
- [
20
- [i - e.left, t - e.bottom],
21
- [n + e.right, o + e.top]
22
- ],
23
- {
24
- maxZoom: 17,
25
- duration: 1e3
26
- }
27
- );
28
- }
29
- }, [f, m, e]);
30
- const g = (t) => (i) => {
31
- i.originalEvent.stopPropagation(), p == null || p(t);
32
- };
33
- return r == null ? void 0 : r.map((t, i) => {
34
- const o = t.geometry.coordinates[0], n = t.geometry.coordinates[1];
35
- return /* @__PURE__ */ x(
36
- L,
37
- {
38
- anchor: "bottom",
39
- longitude: o,
40
- latitude: n,
41
- onClick: g(t),
42
- children: [
43
- t.properties.cluster && /* @__PURE__ */ s(y, { colors: a, icon: M }),
44
- !t.properties.cluster && /* @__PURE__ */ s(
45
- "div",
46
- {
47
- className: O,
48
- style: {
49
- "--background": a == null ? void 0 : a.background,
50
- "--fill": a == null ? void 0 : a.fill
51
- },
52
- "data-is-cluster": !!t.properties.cluster,
53
- "data-is-zoomed-out": u < E,
54
- children: /* @__PURE__ */ s($, { icon: t.properties.icon })
55
- }
56
- )
57
- ]
58
- },
59
- `map-marker-${o}-${n}-${i}`
60
- );
61
- });
62
- }
63
- export {
64
- N as default
65
- };
@@ -1,31 +0,0 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { P as s } from "./scale-control-CyJd4u6j.js";
3
- import "react";
4
- import { c as u } from "./styles-uPzJnzVS.js";
5
- function l({
6
- latitude: o,
7
- longitude: e,
8
- anchor: r,
9
- offset: n = [0, -35],
10
- onClose: t,
11
- children: f
12
- }) {
13
- return typeof o > "u" || typeof e > "u" ? null : /* @__PURE__ */ p(
14
- s,
15
- {
16
- className: "mapbox-popup",
17
- focusAfterOpen: !0,
18
- latitude: o,
19
- longitude: e,
20
- anchor: r,
21
- offset: n,
22
- onClose: t,
23
- closeButton: !1,
24
- closeOnMove: !0,
25
- children: /* @__PURE__ */ p("div", { className: u, children: f })
26
- }
27
- );
28
- }
29
- export {
30
- l as default
31
- };
@@ -1,65 +0,0 @@
1
- import { jsxs as g, jsx as s } from "react/jsx-runtime";
2
- import { useEffect as b } from "react";
3
- import { u as c, a as h } from "./scale-control-CyJd4u6j.js";
4
- import { u as L, M as E } from "./index-DgHrPgsK.js";
5
- import { C as y, c as O, M as $ } from "./index-BYlamtEc.js";
6
- function N({
7
- clusters: m,
8
- colors: a,
9
- clusterIcon: M,
10
- markerBoundsPadding: e,
11
- markerBounds: p,
12
- onClick: r
13
- }) {
14
- const { current: f } = c(), { zoom: u } = L();
15
- b(() => {
16
- if (f && p) {
17
- const [t, i, o, n] = p;
18
- f.fitBounds(
19
- [
20
- [i - e.left, t - e.bottom],
21
- [n + e.right, o + e.top]
22
- ],
23
- {
24
- maxZoom: 17,
25
- duration: 1e3
26
- }
27
- );
28
- }
29
- }, [f, p, e]);
30
- const x = (t) => (i) => {
31
- i.originalEvent.stopPropagation(), r == null || r(t);
32
- };
33
- return m == null ? void 0 : m.map((t, i) => {
34
- const o = t.geometry.coordinates[0], n = t.geometry.coordinates[1];
35
- return /* @__PURE__ */ g(
36
- h,
37
- {
38
- anchor: "bottom",
39
- longitude: o,
40
- latitude: n,
41
- onClick: x(t),
42
- children: [
43
- t.properties.cluster && /* @__PURE__ */ s(y, { colors: a, icon: M }),
44
- !t.properties.cluster && /* @__PURE__ */ s(
45
- "div",
46
- {
47
- className: O,
48
- style: {
49
- "--background": a == null ? void 0 : a.background,
50
- "--fill": a == null ? void 0 : a.fill
51
- },
52
- "data-is-cluster": !!t.properties.cluster,
53
- "data-is-zoomed-out": u < E,
54
- children: /* @__PURE__ */ s($, { icon: t.properties.icon })
55
- }
56
- )
57
- ]
58
- },
59
- `map-marker-${o}-${n}-${i}`
60
- );
61
- });
62
- }
63
- export {
64
- N as default
65
- };
@@ -1,62 +0,0 @@
1
- import { jsxs as u, jsx as s } from "react/jsx-runtime";
2
- import { useEffect as x } from "react";
3
- import { u as L, a as c } from "./index.modern-CLRs8JwI.js";
4
- import { u as b, M as d } from "./index-DgHrPgsK.js";
5
- import { C as y, c as E, M as O } from "./index-BYlamtEc.js";
6
- function N({
7
- clusters: n,
8
- colors: e,
9
- clusterIcon: M,
10
- markerBounds: p,
11
- markerBoundsPadding: a,
12
- onClick: m
13
- }) {
14
- const r = L(), { zoom: g } = b();
15
- x(() => {
16
- if (r && p) {
17
- const [t, f, i, o] = p;
18
- r.fitBounds({
19
- south: t - a.bottom,
20
- west: f - a.left,
21
- north: i + a.top,
22
- east: o + a.right
23
- });
24
- }
25
- }, [r, p, a]);
26
- const h = (t) => () => {
27
- m == null || m(t);
28
- };
29
- return n == null ? void 0 : n.map((t, f) => {
30
- const i = t.geometry.coordinates[0], o = t.geometry.coordinates[1];
31
- return /* @__PURE__ */ u(
32
- c,
33
- {
34
- position: {
35
- lat: o,
36
- lng: i
37
- },
38
- onClick: h(t),
39
- children: [
40
- t.properties.cluster && /* @__PURE__ */ s(y, { colors: e, icon: M }),
41
- !t.properties.cluster && /* @__PURE__ */ s(
42
- "div",
43
- {
44
- className: E,
45
- style: {
46
- "--background": e == null ? void 0 : e.background,
47
- "--fill": e == null ? void 0 : e.fill
48
- },
49
- "data-is-cluster": !!t.properties.cluster,
50
- "data-is-zoomed-out": g - 1 < d + 1,
51
- children: /* @__PURE__ */ s(O, { icon: t.properties.icon })
52
- }
53
- )
54
- ]
55
- },
56
- `map-marker-${i}-${o}-${f}`
57
- );
58
- });
59
- }
60
- export {
61
- N as default
62
- };