@local-logic/maps 0.0.23 → 0.0.24

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 (68) hide show
  1. package/dist/index-BOZt1-DO.js +69 -0
  2. package/dist/{index-BrxP9NHZ.js → index-Buv9_Jj9.js} +3 -3
  3. package/dist/index-C3Tj3r2u.js +24 -0
  4. package/dist/index-C6a0FCIX.js +92 -0
  5. package/dist/index-CCS3Ef2w.js +92 -0
  6. package/dist/{index-CSVsF1EQ.js → index-CEDpofgZ.js} +1 -1
  7. package/dist/{index-BRD3rjLE.js → index-CIE9YlvM.js} +12 -12
  8. package/dist/index-CUUravWc.js +25 -0
  9. package/dist/index-CUvZ7gVt.js +98 -0
  10. package/dist/{index-CN_dNOir.js → index-Ct-3yYUx.js} +245 -217
  11. package/dist/index-DJx0avMT.js +75 -0
  12. package/dist/{index-B85VZGVP.js → index-DOkeQ2e4.js} +3 -3
  13. package/dist/{index-ufLC1PLO.js → index-DbyYOXrb.js} +16 -16
  14. package/dist/index-DntG4mBo.js +75 -0
  15. package/dist/{index-CFomI3Il.js → index-DscDx7HE.js} +14 -13
  16. package/dist/{index-DfhwDiOS.js → index-GGtrKiJn.js} +22 -22
  17. package/dist/index-Y5T20C1G.js +92 -0
  18. package/dist/{index-CiWKwaC4.js → index-eWv3le07.js} +7 -6
  19. package/dist/index.es.js +1 -1
  20. package/dist/index.umd.js +8 -3615
  21. package/dist/{logo-control-VgN6MEKI.js → logo-control-CHapR1Dt.js} +11 -11
  22. package/dist/{scale-control-jBKptTbw.js → scale-control-Dsir9fWY.js} +21 -21
  23. package/dist/src/components/Map/Root/BaseMap/Google/index.d.ts +1 -1
  24. package/dist/src/components/Map/Root/BaseMap/Google/index.d.ts.map +1 -1
  25. package/dist/src/components/Map/Root/BaseMap/Mapbox/index.d.ts +1 -1
  26. package/dist/src/components/Map/Root/BaseMap/Mapbox/index.d.ts.map +1 -1
  27. package/dist/src/components/Map/Root/BaseMap/Maptiler/index.d.ts +1 -1
  28. package/dist/src/components/Map/Root/BaseMap/Maptiler/index.d.ts.map +1 -1
  29. package/dist/src/components/Map/Root/BaseMap/index.d.ts +1 -1
  30. package/dist/src/components/Map/Root/BaseMap/index.d.ts.map +1 -1
  31. package/dist/src/components/Map/Root/BaseMap/types.d.ts +1 -10
  32. package/dist/src/components/Map/Root/BaseMap/types.d.ts.map +1 -1
  33. package/dist/src/components/Map/Root/Markers/index.d.ts.map +1 -1
  34. package/dist/src/components/Map/Root/Popup/Google/index.d.ts.map +1 -1
  35. package/dist/src/components/Map/Root/Popup/Mapbox/index.d.ts.map +1 -1
  36. package/dist/src/components/Map/Root/Popup/Maptiler/index.d.ts.map +1 -1
  37. package/dist/src/components/Map/Root/Popup/utils/index.d.ts +2 -0
  38. package/dist/src/components/Map/Root/Popup/utils/index.d.ts.map +1 -0
  39. package/dist/src/components/Map/Root/Popup/utils/moveIntoView/index.d.ts +21 -0
  40. package/dist/src/components/Map/Root/Popup/utils/moveIntoView/index.d.ts.map +1 -0
  41. package/dist/src/components/Map/Root/constants.d.ts +11 -2
  42. package/dist/src/components/Map/Root/constants.d.ts.map +1 -1
  43. package/dist/src/components/Map/Root/context.d.ts +6 -6
  44. package/dist/src/components/Map/Root/context.d.ts.map +1 -1
  45. package/dist/src/components/Map/Root/index.d.ts.map +1 -1
  46. package/dist/src/components/Map/Root/types.d.ts +9 -0
  47. package/dist/src/components/Map/Root/types.d.ts.map +1 -1
  48. package/dist/src/components/Map/index.stories.d.ts +9 -3
  49. package/dist/src/components/Map/index.stories.d.ts.map +1 -1
  50. package/dist/style.css +1 -1
  51. package/dist/styles-BNaT0cTi.js +36 -0
  52. package/dist/{styles-BR85tnqI.js → styles-BhmqUA5C.js} +231 -266
  53. package/package.json +30 -10
  54. package/dist/IconBase.es-rM5tt24D.js +0 -48
  55. package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
  56. package/dist/index-BpFpg_5A.js +0 -78
  57. package/dist/index-CRdDPWou.js +0 -34
  58. package/dist/index-CceEGv05.js +0 -104
  59. package/dist/index-CmajMf1d.js +0 -109
  60. package/dist/index-D5kHxP9H.js +0 -43
  61. package/dist/index-DNNz78Rc.js +0 -24
  62. package/dist/index-Db33Ugg9.js +0 -34
  63. package/dist/index-arkRlpaR.js +0 -80
  64. package/dist/index-vHMPqmOL.js +0 -23
  65. package/dist/index.modern-B-ChKejQ.js +0 -914
  66. package/dist/mapbox-gl-C6frO4Gl.js +0 -34625
  67. package/dist/maplibre-gl-DkDrZ6rP.js +0 -21669
  68. package/dist/styles-ChFj97uV.js +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@local-logic/maps",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
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",
@@ -36,14 +36,34 @@
36
36
  "storybook": "storybook dev -p 6006"
37
37
  },
38
38
  "peerDependencies": {
39
+ "@phosphor-icons/react": ">=2",
40
+ "@vis.gl/react-google-maps": ">=1",
41
+ "mapbox-gl": ">=3",
42
+ "maplibre-gl": ">=5",
39
43
  "react": ">=18",
40
44
  "react-dom": ">=18",
45
+ "react-map-gl": ">=8",
41
46
  "tailwindcss": ">=3"
42
47
  },
48
+ "peerDependenciesMeta": {
49
+ "@vis.gl/react-google-maps": {
50
+ "optional": true
51
+ },
52
+ "mapbox-gl": {
53
+ "optional": true
54
+ },
55
+ "maplibre-gl": {
56
+ "optional": true
57
+ },
58
+ "react-map-gl": {
59
+ "optional": true
60
+ }
61
+ },
43
62
  "devDependencies": {
44
63
  "@eslint/eslintrc": "^3.3.0",
45
64
  "@eslint/js": "^9.32.0",
46
- "@local-logic/eslint-config": "*",
65
+ "@local-logic/eslint-config": "workspace:*",
66
+ "@phosphor-icons/react": "^2.1.10",
47
67
  "@storybook/addon-actions": "^8.6.14",
48
68
  "@storybook/addon-essentials": "^8.6.14",
49
69
  "@storybook/addon-interactions": "^8.6.14",
@@ -61,16 +81,20 @@
61
81
  "@types/supercluster": "^7.1.3",
62
82
  "@typescript-eslint/eslint-plugin": "^8.39.0",
63
83
  "@typescript-eslint/parser": "^8.39.0",
84
+ "@vis.gl/react-google-maps": "^1.5.4",
64
85
  "@vitejs/plugin-react": "^4.7.0",
65
86
  "eslint": "^9.32.0",
66
87
  "eslint-plugin-import": "^2.32.0",
67
88
  "eslint-plugin-storybook": "^0.11.6",
89
+ "mapbox-gl": "^3.15.0",
90
+ "maplibre-gl": "5.11.0",
68
91
  "react": "^19.0.0",
69
92
  "react-dom": "^19.1.1",
93
+ "react-map-gl": "^8.1.0",
70
94
  "rollup-plugin-visualizer": "^5.14.0",
71
95
  "storybook": "^8.6.14",
72
96
  "tailwindcss": "^3.4.17",
73
- "tsconfig": "*",
97
+ "tsconfig": "workspace:*",
74
98
  "typescript": "^5.9.2",
75
99
  "vite": "^7.1.11",
76
100
  "vite-plugin-dts": "^4.5.4",
@@ -78,13 +102,9 @@
78
102
  "vitest": "^3.2.4"
79
103
  },
80
104
  "dependencies": {
81
- "@local-logic/design-system": "*",
82
- "@phosphor-icons/react": "^2.1.10",
83
- "@turf/turf": "^7.2.0",
84
- "@vis.gl/react-google-maps": "^1.5.4",
85
- "mapbox-gl": "^3.15.0",
86
- "maplibre-gl": "^5.9.0",
87
- "react-map-gl": "^8.1.0",
105
+ "@local-logic/design-system": "workspace:*",
106
+ "@turf/bbox": "^7.2.0",
107
+ "@turf/helpers": "^7.2.0",
88
108
  "supercluster": "^8.0.1",
89
109
  "tailwind-merge": "^3.3.1",
90
110
  "use-supercluster": "^1.2.0"
@@ -1,48 +0,0 @@
1
- import * as r from "react";
2
- import { createContext as h } from "react";
3
- const p = h({
4
- color: "currentColor",
5
- size: "1em",
6
- weight: "regular",
7
- mirrored: !1
8
- }), x = r.forwardRef(
9
- (n, s) => {
10
- const {
11
- alt: t,
12
- color: o,
13
- size: e,
14
- weight: l,
15
- mirrored: a,
16
- children: c,
17
- weights: m,
18
- ...g
19
- } = n, {
20
- color: w = "currentColor",
21
- size: i,
22
- weight: u = "regular",
23
- mirrored: f = !1,
24
- ...d
25
- } = r.useContext(p);
26
- return /* @__PURE__ */ r.createElement(
27
- "svg",
28
- {
29
- ref: s,
30
- xmlns: "http://www.w3.org/2000/svg",
31
- width: e ?? i,
32
- height: e ?? i,
33
- fill: o ?? w,
34
- viewBox: "0 0 256 256",
35
- transform: a || f ? "scale(-1, 1)" : void 0,
36
- ...d,
37
- ...g
38
- },
39
- !!t && /* @__PURE__ */ r.createElement("title", null, t),
40
- c,
41
- m.get(l ?? u)
42
- );
43
- }
44
- );
45
- x.displayName = "IconBase";
46
- export {
47
- x as p
48
- };
@@ -1,6 +0,0 @@
1
- function e(t) {
2
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
3
- }
4
- export {
5
- e as g
6
- };
@@ -1,78 +0,0 @@
1
- import { jsxs as x, jsx as d } from "react/jsx-runtime";
2
- import { useState as y, useEffect as c } from "react";
3
- import { M as B, N as g, u as h } from "./logo-control-VgN6MEKI.js";
4
- import { b } from "./index-CFomI3Il.js";
5
- import { u as M, d as m, a as Z, m as k } from "./index-CN_dNOir.js";
6
- const z = ({ padding: i }) => {
7
- const { current: o } = h(), { markerPoints: e, setBounds: u, setZoom: p } = M(), [n, f] = y(void 0), a = () => {
8
- if (!o)
9
- return;
10
- const t = o.getBounds()?.toArray().flat();
11
- t && u(t);
12
- }, s = () => {
13
- o && p(o.getZoom());
14
- };
15
- return c(() => (a(), s(), o?.on("move", () => {
16
- a();
17
- }), o?.on("zoom", () => {
18
- s();
19
- }), () => {
20
- o?.off("move", a), o?.off("zoom", s);
21
- }), [o]), c(() => {
22
- if (!o || typeof e > "u" || e.length === 0)
23
- return;
24
- const t = b(k(e));
25
- t.every((r, l) => r === n?.[l]) || f(t);
26
- }, [o, e]), c(() => {
27
- if (!o || typeof n > "u")
28
- return;
29
- const [t, r, l, v] = n;
30
- o.fitBounds(
31
- [
32
- [r, t],
33
- [v, l]
34
- ],
35
- {
36
- maxZoom: 17,
37
- duration: 700,
38
- padding: i
39
- }
40
- );
41
- }, [o, n, i]), null;
42
- };
43
- function C({ padding: i, children: o }) {
44
- const {
45
- mapProvider: e,
46
- center: u,
47
- zoom: p = m.zoom,
48
- minZoom: n,
49
- maxZoom: f,
50
- pitch: a = m.pitch,
51
- bearing: s = m.bearing,
52
- cooperativeGestures: t = m.cooperativeGestures,
53
- zoomPosition: r
54
- } = M();
55
- return e.name !== "maptiler" ? null : /* @__PURE__ */ x(
56
- B,
57
- {
58
- initialViewState: {
59
- ...u,
60
- zoom: p,
61
- pitch: a,
62
- bearing: s
63
- },
64
- cooperativeGestures: t,
65
- minZoom: n,
66
- maxZoom: f,
67
- mapStyle: `https://api.maptiler.com/maps/${e.theme || Z.maptiler}/style.json?key=${e.apiKey}`,
68
- children: [
69
- /* @__PURE__ */ d(z, { padding: i }),
70
- r && /* @__PURE__ */ d(g, { position: r }),
71
- o
72
- ]
73
- }
74
- );
75
- }
76
- export {
77
- C as default
78
- };
@@ -1,34 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { useEffect as s } from "react";
3
- import { P as u } from "./logo-control-VgN6MEKI.js";
4
- import { u as a } from "./index-CN_dNOir.js";
5
- import { c as i } from "./styles-ChFj97uV.js";
6
- function y({
7
- latitude: e,
8
- longitude: o,
9
- anchor: p,
10
- offset: f = [0, -35],
11
- onClose: r,
12
- children: m
13
- }) {
14
- const { zoom: n } = a();
15
- return s(() => {
16
- r?.();
17
- }, [n]), typeof e > "u" || typeof o > "u" ? null : /* @__PURE__ */ t(
18
- u,
19
- {
20
- className: "maplibre-popup",
21
- focusAfterOpen: !0,
22
- latitude: e,
23
- longitude: o,
24
- anchor: p,
25
- offset: f,
26
- onClose: r,
27
- closeButton: !1,
28
- children: /* @__PURE__ */ t("div", { className: i, children: m })
29
- }
30
- );
31
- }
32
- export {
33
- y as default
34
- };
@@ -1,104 +0,0 @@
1
- import { jsxs as b, jsx as M } from "react/jsx-runtime";
2
- import { useState as L, useEffect as h } from "react";
3
- import { A as v, M as y, C as f, u as B } from "./index.modern-B-ChKejQ.js";
4
- import { b as C } from "./index-CFomI3Il.js";
5
- import { u as T, d as p, a as P, m as x } from "./index-CN_dNOir.js";
6
- const z = {
7
- "top-left": f.LEFT_TOP,
8
- "top-right": f.RIGHT_TOP,
9
- "bottom-left": f.LEFT_BOTTOM,
10
- "bottom-right": f.RIGHT_BOTTOM
11
- }, O = ({
12
- isMapLoaded: c,
13
- padding: d
14
- }) => {
15
- const e = B(), { markerPoints: n, setBounds: r, setZoom: u } = T(), [s, m] = L(void 0), i = () => {
16
- if (!e)
17
- return;
18
- const o = e.getBounds()?.toJSON();
19
- o && r([o.west, o.south, o.east, o.north]);
20
- }, l = () => {
21
- if (!e)
22
- return;
23
- const o = e.getZoom();
24
- typeof o < "u" && u(o + 1);
25
- };
26
- return h(() => {
27
- i(), l();
28
- const o = e?.addListener("bounds_changed", () => {
29
- i();
30
- }), t = e?.addListener("zoom_changed", () => {
31
- l();
32
- });
33
- return () => {
34
- o?.remove(), t?.remove();
35
- };
36
- }, [e]), h(() => {
37
- if (!e || typeof n > "u" || n.length === 0)
38
- return;
39
- const o = C(x(n));
40
- o.every((t, a) => t === s?.[a]) || m(o);
41
- }, [e, n]), h(() => {
42
- if (!e || typeof s > "u")
43
- return;
44
- const [o, t, a, g] = s;
45
- e.fitBounds(
46
- {
47
- south: o,
48
- west: t,
49
- north: a,
50
- east: g
51
- },
52
- d
53
- );
54
- }, [c, e, s, d]), null;
55
- };
56
- function w({ padding: c, children: d }) {
57
- const [e, n] = L(!1), {
58
- mapProvider: r,
59
- center: u,
60
- zoom: s = p.zoom,
61
- minZoom: m,
62
- maxZoom: i,
63
- pitch: l = p.pitch,
64
- bearing: o = p.bearing,
65
- cooperativeGestures: t = p.cooperativeGestures,
66
- zoomPosition: a
67
- } = T();
68
- if (r.name !== "google")
69
- return null;
70
- const g = () => {
71
- n(!0);
72
- };
73
- return /* @__PURE__ */ b(v, { apiKey: r.apiKey, children: [
74
- /* @__PURE__ */ M(O, { isMapLoaded: e, padding: c }),
75
- /* @__PURE__ */ M(
76
- y,
77
- {
78
- mapId: r.theme || P.google,
79
- defaultCenter: {
80
- lat: u.latitude,
81
- lng: u.longitude
82
- },
83
- defaultZoom: s + 1,
84
- defaultTilt: l,
85
- defaultHeading: o,
86
- gestureHandling: t ? "cooperative" : "greedy",
87
- streetViewControl: !1,
88
- fullscreenControl: !1,
89
- clickableIcons: !1,
90
- mapTypeControl: !1,
91
- zoomControlOptions: {
92
- position: a && z[a]
93
- },
94
- minZoom: typeof m == "number" ? m + 1 : void 0,
95
- maxZoom: typeof i == "number" ? i + 1 : void 0,
96
- onTilesLoaded: g,
97
- children: d
98
- }
99
- )
100
- ] });
101
- }
102
- export {
103
- w as default
104
- };
@@ -1,109 +0,0 @@
1
- import { jsx as t, jsxs as i, Fragment as f } from "react/jsx-runtime";
2
- import * as e from "react";
3
- import { useMemo as g } from "react";
4
- import { u as p, M as c } from "./index-CN_dNOir.js";
5
- import { p as Z } from "./IconBase.es-rM5tt24D.js";
6
- const A = /* @__PURE__ */ new Map([
7
- [
8
- "bold",
9
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M128,60a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,60Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,124Zm0-112a92.1,92.1,0,0,0-92,92c0,77.36,81.64,135.4,85.12,137.83a12,12,0,0,0,13.76,0,259,259,0,0,0,42.18-39C205.15,170.57,220,136.37,220,104A92.1,92.1,0,0,0,128,12Zm31.3,174.71A249.35,249.35,0,0,1,128,216.89a249.35,249.35,0,0,1-31.3-30.18C80,167.37,60,137.31,60,104a68,68,0,0,1,136,0C196,137.31,176,167.37,159.3,186.71Z" }))
10
- ],
11
- [
12
- "duotone",
13
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
14
- "path",
15
- {
16
- d: "M128,24a80,80,0,0,0-80,80c0,72,80,128,80,128s80-56,80-128A80,80,0,0,0,128,24Zm0,112a32,32,0,1,1,32-32A32,32,0,0,1,128,136Z",
17
- opacity: "0.2"
18
- }
19
- ), /* @__PURE__ */ e.createElement("path", { d: "M128,64a40,40,0,1,0,40,40A40,40,0,0,0,128,64Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,128Zm0-112a88.1,88.1,0,0,0-88,88c0,31.4,14.51,64.68,42,96.25a254.19,254.19,0,0,0,41.45,38.3,8,8,0,0,0,9.18,0A254.19,254.19,0,0,0,174,200.25c27.45-31.57,42-64.85,42-96.25A88.1,88.1,0,0,0,128,16Zm0,206c-16.53-13-72-60.75-72-118a72,72,0,0,1,144,0C200,161.23,144.53,209,128,222Z" }))
20
- ],
21
- [
22
- "fill",
23
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M128,16a88.1,88.1,0,0,0-88,88c0,75.3,80,132.17,83.41,134.55a8,8,0,0,0,9.18,0C136,236.17,216,179.3,216,104A88.1,88.1,0,0,0,128,16Zm0,56a32,32,0,1,1-32,32A32,32,0,0,1,128,72Z" }))
24
- ],
25
- [
26
- "light",
27
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M128,66a38,38,0,1,0,38,38A38,38,0,0,0,128,66Zm0,64a26,26,0,1,1,26-26A26,26,0,0,1,128,130Zm0-112a86.1,86.1,0,0,0-86,86c0,30.91,14.34,63.74,41.47,94.94a252.32,252.32,0,0,0,41.09,38,6,6,0,0,0,6.88,0,252.32,252.32,0,0,0,41.09-38c27.13-31.2,41.47-64,41.47-94.94A86.1,86.1,0,0,0,128,18Zm0,206.51C113,212.93,54,163.62,54,104a74,74,0,0,1,148,0C202,163.62,143,212.93,128,224.51Z" }))
28
- ],
29
- [
30
- "regular",
31
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M128,64a40,40,0,1,0,40,40A40,40,0,0,0,128,64Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,128Zm0-112a88.1,88.1,0,0,0-88,88c0,31.4,14.51,64.68,42,96.25a254.19,254.19,0,0,0,41.45,38.3,8,8,0,0,0,9.18,0A254.19,254.19,0,0,0,174,200.25c27.45-31.57,42-64.85,42-96.25A88.1,88.1,0,0,0,128,16Zm0,206c-16.53-13-72-60.75-72-118a72,72,0,0,1,144,0C200,161.23,144.53,209,128,222Z" }))
32
- ],
33
- [
34
- "thin",
35
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M128,68a36,36,0,1,0,36,36A36,36,0,0,0,128,68Zm0,64a28,28,0,1,1,28-28A28,28,0,0,1,128,132Zm0-112a84.09,84.09,0,0,0-84,84c0,30.42,14.17,62.79,41,93.62a250,250,0,0,0,40.73,37.66,4,4,0,0,0,4.58,0A250,250,0,0,0,171,197.62c26.81-30.83,41-63.2,41-93.62A84.09,84.09,0,0,0,128,20Zm37.1,172.23A254.62,254.62,0,0,1,128,227a254.62,254.62,0,0,1-37.1-34.81C73.15,171.8,52,139.9,52,104a76,76,0,0,1,152,0C204,139.9,182.85,171.8,165.1,192.23Z" }))
36
- ]
37
- ]), d = e.forwardRef((a, r) => /* @__PURE__ */ e.createElement(Z, { ref: r, ...a, weights: A }));
38
- d.displayName = "MapPinIcon";
39
- const m = `
40
- group/marker cursor-pointer rounded-full
41
- relative h-7 w-7 flex items-center justify-center
42
- text-base-white ring-1 ring-inset
43
- transition-colors
44
-
45
- bg-[var(--background,theme(colors.base.white))]
46
- ring-[var(--fill,theme(colors.primary.100))]
47
-
48
- hover:bg-[var(--fill,theme(colors.primary.100))]
49
-
50
- data-[is-zoomed-out=true]:bg-[var(--fill,theme(colors.primary.100))]
51
- data-[is-zoomed-out=true]:h-4
52
- data-[is-zoomed-out=true]:w-4
53
-
54
- data-[is-active=true]:bg-[var(--fill,theme(colors.primary.100))]
55
- `, s = `
56
- m-auto transition-all w-4 h-4
57
-
58
- fill-[var(--fill,theme(colors.primary.100))]
59
- group-hover/marker:fill-[var(--background,theme(colors.base.white))]
60
-
61
- group-data-[is-zoomed-out=true]/marker:hidden
62
-
63
- group-data-[is-active=true]/marker:fill-[var(--background,theme(colors.base.white))]
64
- `;
65
- function v({ icon: a }) {
66
- return typeof a < "u" ? /* @__PURE__ */ t(a, { className: s }) : /* @__PURE__ */ t(d, { className: s });
67
- }
68
- const M = `
69
- relative flex
70
- `, u = `
71
- -ml-6 -z-10 last:-z-20
72
- `;
73
- function w({
74
- isActive: a = !1,
75
- colors: r,
76
- icon: h
77
- }) {
78
- const { zoom: o, mapProvider: l } = p(), n = g(() => l.name === "google" ? o - 1 < c + 1 : o < c, [o, l]);
79
- return /* @__PURE__ */ i(
80
- "div",
81
- {
82
- className: M,
83
- style: {
84
- "--background": r?.background,
85
- "--fill": r?.fill
86
- },
87
- children: [
88
- /* @__PURE__ */ t(
89
- "div",
90
- {
91
- className: m,
92
- "data-is-zoomed-out": n,
93
- "data-is-active": a,
94
- children: /* @__PURE__ */ t(v, { icon: h })
95
- }
96
- ),
97
- !n && /* @__PURE__ */ i(f, { children: [
98
- /* @__PURE__ */ t("div", { className: `${m} ${u}` }),
99
- /* @__PURE__ */ t("div", { className: `${m} ${u}` })
100
- ] })
101
- ]
102
- }
103
- );
104
- }
105
- export {
106
- w as C,
107
- v as M,
108
- m as c
109
- };
@@ -1,43 +0,0 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { useEffect as u, useMemo as c } from "react";
3
- import { u as d, I as l } from "./index.modern-B-ChKejQ.js";
4
- import { u as f } from "./index-CN_dNOir.js";
5
- import { c as y } from "./styles-ChFj97uV.js";
6
- function I({
7
- latitude: o,
8
- longitude: t,
9
- offset: r = [0, -25],
10
- onClose: e,
11
- children: s
12
- }) {
13
- const n = d(), { zoom: a } = f();
14
- u(() => {
15
- e?.();
16
- }, [a]), u(() => {
17
- if (!n) return;
18
- const p = n.addListener("click", () => {
19
- e?.();
20
- });
21
- return () => {
22
- p.remove();
23
- };
24
- }, [n]);
25
- const m = c(() => Array.isArray(r) ? [r[0], r[1]] : [r, r], [r]);
26
- return typeof o > "u" || typeof t > "u" ? null : /* @__PURE__ */ i(
27
- l,
28
- {
29
- shouldFocus: !0,
30
- disableAutoPan: !0,
31
- position: {
32
- lat: o,
33
- lng: t
34
- },
35
- pixelOffset: m,
36
- onClose: e,
37
- children: /* @__PURE__ */ i("div", { className: y, children: s })
38
- }
39
- );
40
- }
41
- export {
42
- I as default
43
- };
@@ -1,24 +0,0 @@
1
- import { jsxs as t, jsx as e } 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-BR85tnqI.js";
3
- import { a as l } from "./index.modern-B-ChKejQ.js";
4
- function m({ marker: n, className: i }) {
5
- return /* @__PURE__ */ t(
6
- l,
7
- {
8
- position: {
9
- lat: n.latitude,
10
- lng: n.longitude
11
- },
12
- className: a(d.trim(), i),
13
- zIndex: 10,
14
- children: [
15
- /* @__PURE__ */ e("span", { id: "center-pin-background", className: o, children: /* @__PURE__ */ e(r, {}) }),
16
- /* @__PURE__ */ e(s, { id: "center-pin-icon", className: c })
17
- ]
18
- },
19
- `center-pin-marker-${n.longitude}-${n.latitude}`
20
- );
21
- }
22
- export {
23
- m as default
24
- };
@@ -1,34 +0,0 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { useEffect as s } from "react";
3
- import { P as u } from "./scale-control-jBKptTbw.js";
4
- import { u as a } from "./index-CN_dNOir.js";
5
- import { c } from "./styles-ChFj97uV.js";
6
- function b({
7
- latitude: o,
8
- longitude: e,
9
- anchor: t,
10
- offset: f = [0, -35],
11
- onClose: r,
12
- children: m
13
- }) {
14
- const { zoom: n } = a();
15
- return s(() => {
16
- r?.();
17
- }, [n]), typeof o > "u" || typeof e > "u" ? null : /* @__PURE__ */ p(
18
- u,
19
- {
20
- className: "mapbox-popup",
21
- focusAfterOpen: !0,
22
- latitude: o,
23
- longitude: e,
24
- anchor: t,
25
- offset: f,
26
- onClose: r,
27
- closeButton: !1,
28
- children: /* @__PURE__ */ p("div", { className: c, children: m })
29
- }
30
- );
31
- }
32
- export {
33
- b as default
34
- };
@@ -1,80 +0,0 @@
1
- import { jsxs as M, jsx as l } from "react/jsx-runtime";
2
- import { useState as v, useEffect as d } from "react";
3
- import { M as y, N as B, u as g } from "./scale-control-jBKptTbw.js";
4
- import { b as h } from "./index-CFomI3Il.js";
5
- import { u as b, d as i, a as Z, m as k } from "./index-CN_dNOir.js";
6
- const z = ({ padding: m }) => {
7
- const { current: o } = g(), { markerPoints: t, setBounds: u, setZoom: p } = b(), [a, f] = v(void 0), r = () => {
8
- if (!o)
9
- return;
10
- const e = o.getBounds()?.toArray().flat();
11
- e && u(e);
12
- }, s = () => {
13
- o && p(o.getZoom());
14
- };
15
- return d(() => (r(), s(), o?.on("move", () => {
16
- r();
17
- }), o?.on("zoom", () => {
18
- s();
19
- }), () => {
20
- o?.off("move", r), o?.off("zoom", s);
21
- }), [o]), d(() => {
22
- if (!o || typeof t > "u" || t.length === 0)
23
- return;
24
- const e = h(k(t));
25
- e.every((n, c) => n === a?.[c]) || f(e);
26
- }, [o, t]), d(() => {
27
- if (!o || typeof a > "u")
28
- return;
29
- const [e, n, c, x] = a;
30
- o.fitBounds(
31
- [
32
- [n, e],
33
- [x, c]
34
- ],
35
- {
36
- maxZoom: 17,
37
- duration: 700,
38
- padding: m
39
- }
40
- );
41
- }, [o, a, m]), null;
42
- };
43
- function A({ padding: m, children: o }) {
44
- const {
45
- mapProvider: t,
46
- center: u,
47
- zoom: p = i.zoom,
48
- minZoom: a,
49
- maxZoom: f,
50
- pitch: r = i.pitch,
51
- bearing: s = i.bearing,
52
- cooperativeGestures: e = i.cooperativeGestures,
53
- zoomPosition: n
54
- } = b();
55
- return t.name !== "mapbox" ? null : /* @__PURE__ */ M(
56
- y,
57
- {
58
- mapboxAccessToken: t.apiKey,
59
- initialViewState: {
60
- ...u,
61
- zoom: p,
62
- pitch: r,
63
- bearing: s
64
- },
65
- cooperativeGestures: e,
66
- minZoom: a,
67
- maxZoom: f,
68
- mapStyle: `mapbox://styles/${t.theme || Z.mapbox}`,
69
- interactiveLayerIds: ["road-label", "waterway-label"],
70
- children: [
71
- /* @__PURE__ */ l(z, { padding: m }),
72
- n && /* @__PURE__ */ l(B, { position: n }),
73
- o
74
- ]
75
- }
76
- );
77
- }
78
- export {
79
- A as default
80
- };
@@ -1,23 +0,0 @@
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-BR85tnqI.js";
3
- import { a as l } from "./logo-control-VgN6MEKI.js";
4
- import "react";
5
- function f({ marker: t, className: e }) {
6
- return /* @__PURE__ */ n(
7
- l,
8
- {
9
- anchor: "bottom",
10
- longitude: t.longitude,
11
- latitude: t.latitude,
12
- className: a(d.trim(), e),
13
- children: [
14
- /* @__PURE__ */ i("span", { id: "center-pin-background", className: o, children: /* @__PURE__ */ i(r, {}) }),
15
- /* @__PURE__ */ i(s, { id: "center-pin-icon", className: c })
16
- ]
17
- },
18
- `center-pin-marker-${t.longitude}-${t.latitude}`
19
- );
20
- }
21
- export {
22
- f as default
23
- };