@local-logic/maps 0.0.14 → 0.0.16
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.
- package/dist/{index-CTk5bvm9.js → index-3kRdcdZh.js} +41 -39
- package/dist/{index-BCa658u4.js → index-BFK3wMTT.js} +1 -1
- package/dist/{index-CNxLnZ8O.js → index-BQRXN0e-.js} +1 -1
- package/dist/{index-Bp1bWq9c.js → index-BUkdAOYF.js} +5 -5
- package/dist/index-Brp2pz_Z.js +57 -0
- package/dist/{index-BGoTpJjt.js → index-BvnFFiii.js} +1 -1
- package/dist/{index-CBp9gCca.js → index-CTU66ogZ.js} +29 -29
- package/dist/{index-DY5pY-zk.js → index-CV_IAyz3.js} +1 -1
- package/dist/{index-CUpaKIZP.js → index-Cg3HD19r.js} +1 -1
- package/dist/{index-S5SfktvB.js → index-CnuTCmRK.js} +1 -1
- package/dist/index-DJ1PVoCd.js +56 -0
- package/dist/{index-C36u5N_F.js → index-DyGtnON3.js} +1 -1
- package/dist/{index-CXUQoF5Q.js → index-Dzgb7feN.js} +1 -1
- package/dist/index-NEUlLLtm.js +56 -0
- package/dist/{index-DVitM43i.js → index-Yh7bUURu.js} +41 -39
- package/dist/index-_YvDHCeI.js +23 -0
- package/dist/index-x3wrHsPD.js +73 -0
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +27 -27
- package/dist/src/components/Map/Root/CenterPin/Maptiler/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/CenterPin/styles.d.ts +2 -2
- package/dist/src/components/Map/Root/CenterPin/styles.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Layers/Google/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Layers/Mapbox/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Layers/Maptiler/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Layers/types.d.ts +1 -0
- package/dist/src/components/Map/Root/Layers/types.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Layers/utils.d.ts +2 -2
- package/dist/src/components/Map/Root/Layers/utils.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Markers/Google/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Markers/Mapbox/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Markers/Maptiler/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Markers/styles.d.ts +2 -2
- package/dist/src/components/Map/Root/Markers/styles.d.ts.map +1 -1
- package/dist/src/components/Map/Root/types.d.ts +2 -0
- package/dist/src/components/Map/Root/types.d.ts.map +1 -1
- package/dist/src/components/Map/index.stories.d.ts.map +1 -1
- package/dist/src/components/Map/storybook-data.d.ts +1 -0
- package/dist/src/components/Map/storybook-data.d.ts.map +1 -1
- package/dist/style.css +1 -24
- package/dist/{styles-D2MYaLhP.js → styles-Do-o-qNU.js} +8 -7
- package/dist/utils-DJ13veBM.js +25 -0
- package/package.json +1 -1
- package/dist/index-58w3Qwxr.js +0 -56
- package/dist/index-CCtDJ-mV.js +0 -56
- package/dist/index-CXTsUiSS.js +0 -57
- package/dist/index-Do_dW76Q.js +0 -23
- package/dist/index-UEadmVww.js +0 -64
- package/dist/utils-YqJg0vBb.js +0 -25
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as u, Fragment as
|
|
2
|
-
import * as
|
|
3
|
-
import { useContext as k, useRef as S, useState as b, useMemo as m, useEffect as w, cloneElement as
|
|
4
|
-
import { b as
|
|
5
|
-
import { g as
|
|
1
|
+
import { jsx as u, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import * as $ from "react";
|
|
3
|
+
import { useContext as k, useRef as S, useState as b, useMemo as m, useEffect as w, cloneElement as j } from "react";
|
|
4
|
+
import { b as C, d as s } from "./logo-control-NE-LlsRy.js";
|
|
5
|
+
import { g as I } from "./utils-DJ13veBM.js";
|
|
6
6
|
function g(t, e) {
|
|
7
7
|
if (!t)
|
|
8
8
|
throw new Error(e);
|
|
9
9
|
}
|
|
10
|
-
let
|
|
10
|
+
let M = 0;
|
|
11
11
|
function z(t, e, n) {
|
|
12
12
|
if (t.style && t.style._loaded) {
|
|
13
13
|
const a = { ...n };
|
|
@@ -16,17 +16,17 @@ function z(t, e, n) {
|
|
|
16
16
|
return null;
|
|
17
17
|
}
|
|
18
18
|
function A(t, e, n) {
|
|
19
|
-
var l, y,
|
|
19
|
+
var l, y, f;
|
|
20
20
|
g(e.id === n.id, "source id changed"), g(e.type === n.type, "source type changed");
|
|
21
21
|
let a = "", i = 0;
|
|
22
|
-
for (const
|
|
23
|
-
|
|
22
|
+
for (const d in e)
|
|
23
|
+
d !== "children" && d !== "id" && !s(n[d], e[d]) && (a = d, i++);
|
|
24
24
|
if (!i)
|
|
25
25
|
return;
|
|
26
|
-
const
|
|
27
|
-
if (
|
|
26
|
+
const o = e.type;
|
|
27
|
+
if (o === "geojson")
|
|
28
28
|
t.setData(e.data);
|
|
29
|
-
else if (
|
|
29
|
+
else if (o === "image")
|
|
30
30
|
t.updateImage({
|
|
31
31
|
url: e.url,
|
|
32
32
|
coordinates: e.coordinates
|
|
@@ -40,53 +40,53 @@ function A(t, e, n) {
|
|
|
40
40
|
(y = t.setUrl) == null || y.call(t, e.url);
|
|
41
41
|
break;
|
|
42
42
|
case "tiles":
|
|
43
|
-
(
|
|
43
|
+
(f = t.setTiles) == null || f.call(t, e.tiles);
|
|
44
44
|
break;
|
|
45
45
|
default:
|
|
46
46
|
console.warn(`Unable to update <Source> prop: ${a}`);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
function E(t) {
|
|
50
|
-
const e = k(
|
|
50
|
+
const e = k(C).map.getMap(), n = S(t), [, a] = b(0), i = m(() => t.id || `jsx-source-${M++}`, []);
|
|
51
51
|
w(() => {
|
|
52
52
|
if (e) {
|
|
53
53
|
const l = () => setTimeout(() => a((y) => y + 1), 0);
|
|
54
54
|
return e.on("styledata", l), l(), () => {
|
|
55
55
|
var y;
|
|
56
56
|
if (e.off("styledata", l), e.style && e.style._loaded && e.getSource(i)) {
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
59
|
-
for (const
|
|
60
|
-
|
|
57
|
+
const f = (y = e.getStyle()) == null ? void 0 : y.layers;
|
|
58
|
+
if (f)
|
|
59
|
+
for (const d of f)
|
|
60
|
+
d.source === i && e.removeLayer(d.id);
|
|
61
61
|
e.removeSource(i);
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
}, [e]);
|
|
66
|
-
let
|
|
67
|
-
return
|
|
66
|
+
let o = e && e.style && e.getSource(i);
|
|
67
|
+
return o ? A(o, t, n.current) : o = z(e, i, t), n.current = t, o && $.Children.map(t.children, (l) => l && j(l, {
|
|
68
68
|
source: i
|
|
69
69
|
})) || null;
|
|
70
70
|
}
|
|
71
71
|
function F(t, e, n, a) {
|
|
72
72
|
if (g(n.id === a.id, "layer id changed"), g(n.type === a.type, "layer type changed"), n.type === "custom" || a.type === "custom")
|
|
73
73
|
return;
|
|
74
|
-
const { layout: i = {}, paint:
|
|
75
|
-
if (
|
|
74
|
+
const { layout: i = {}, paint: o = {}, filter: l, minzoom: y, maxzoom: f, beforeId: d } = n;
|
|
75
|
+
if (d !== a.beforeId && t.moveLayer(e, d), i !== a.layout) {
|
|
76
76
|
const c = a.layout || {};
|
|
77
|
-
for (const
|
|
78
|
-
s(i[
|
|
79
|
-
for (const
|
|
80
|
-
i.hasOwnProperty(
|
|
77
|
+
for (const r in i)
|
|
78
|
+
s(i[r], c[r]) || t.setLayoutProperty(e, r, i[r]);
|
|
79
|
+
for (const r in c)
|
|
80
|
+
i.hasOwnProperty(r) || t.setLayoutProperty(e, r, void 0);
|
|
81
81
|
}
|
|
82
|
-
if (
|
|
82
|
+
if (o !== a.paint) {
|
|
83
83
|
const c = a.paint || {};
|
|
84
|
-
for (const
|
|
85
|
-
s(r
|
|
86
|
-
for (const
|
|
87
|
-
|
|
84
|
+
for (const r in o)
|
|
85
|
+
s(o[r], c[r]) || t.setPaintProperty(e, r, o[r]);
|
|
86
|
+
for (const r in c)
|
|
87
|
+
o.hasOwnProperty(r) || t.setPaintProperty(e, r, void 0);
|
|
88
88
|
}
|
|
89
|
-
s(l, a.filter) || t.setFilter(e, l), (y !== a.minzoom ||
|
|
89
|
+
s(l, a.filter) || t.setFilter(e, l), (y !== a.minzoom || f !== a.maxzoom) && t.setLayerZoomRange(e, y, f);
|
|
90
90
|
}
|
|
91
91
|
function R(t, e, n) {
|
|
92
92
|
if (t.style && t.style._loaded && (!("source" in n) || t.getSource(n.source))) {
|
|
@@ -96,7 +96,7 @@ function R(t, e, n) {
|
|
|
96
96
|
}
|
|
97
97
|
let U = 0;
|
|
98
98
|
function h(t) {
|
|
99
|
-
const e = k(
|
|
99
|
+
const e = k(C).map.getMap(), n = S(t), [, a] = b(0), i = m(() => t.id || `jsx-layer-${U++}`, []);
|
|
100
100
|
if (w(() => {
|
|
101
101
|
if (e) {
|
|
102
102
|
const l = () => a((y) => y + 1);
|
|
@@ -114,7 +114,7 @@ function h(t) {
|
|
|
114
114
|
R(e, i, t);
|
|
115
115
|
return n.current = t, null;
|
|
116
116
|
}
|
|
117
|
-
function L(t, e) {
|
|
117
|
+
function L(t, e, n) {
|
|
118
118
|
switch (t) {
|
|
119
119
|
case "fill":
|
|
120
120
|
return {
|
|
@@ -124,7 +124,7 @@ function L(t, e) {
|
|
|
124
124
|
case "line":
|
|
125
125
|
return {
|
|
126
126
|
"line-color": e,
|
|
127
|
-
"line-width": 2
|
|
127
|
+
"line-width": n === "LineString" ? 6 : 2
|
|
128
128
|
};
|
|
129
129
|
default:
|
|
130
130
|
return {};
|
|
@@ -133,20 +133,22 @@ function L(t, e) {
|
|
|
133
133
|
function T({ sources: t }) {
|
|
134
134
|
const e = m(() => !Array.isArray(t) || t.length === 0 ? [] : t.map((n) => ({
|
|
135
135
|
...n,
|
|
136
|
-
geoJson: n.geometry ?
|
|
136
|
+
geoJson: n.geometry ? I(n.geometry, n.type) : null
|
|
137
137
|
})), [t]);
|
|
138
|
-
return (e == null ? void 0 : e.length) === 0 ? null : /* @__PURE__ */ u(
|
|
138
|
+
return (e == null ? void 0 : e.length) === 0 ? null : /* @__PURE__ */ u(x, { children: e == null ? void 0 : e.map((n) => /* @__PURE__ */ u("div", { children: n.geoJson && /* @__PURE__ */ u(E, { id: n.key, type: "geojson", data: n.geoJson, children: n.layer && (Array.isArray(n.layer) ? n.layer.map((a, i) => /* @__PURE__ */ u(
|
|
139
139
|
h,
|
|
140
140
|
{
|
|
141
|
+
id: `${n.key}-${i}`,
|
|
141
142
|
type: a.type,
|
|
142
|
-
paint: L(a.type, a.color)
|
|
143
|
+
paint: L(a.type, a.color, n.type)
|
|
143
144
|
},
|
|
144
145
|
`${n.key}-${i}`
|
|
145
146
|
)) : /* @__PURE__ */ u(
|
|
146
147
|
h,
|
|
147
148
|
{
|
|
149
|
+
id: n.key,
|
|
148
150
|
type: n.layer.type,
|
|
149
|
-
paint: L(n.layer.type, n.layer.color)
|
|
151
|
+
paint: L(n.layer.type, n.layer.color, n.type)
|
|
150
152
|
}
|
|
151
153
|
)) }, n.key) }, n.key)) });
|
|
152
154
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as n, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { a as e } from "./index.modern-CLRs8JwI.js";
|
|
3
|
-
import { c as o, S as a, o as s, i as r } from "./styles-
|
|
3
|
+
import { c as o, S as a, o as s, i as r } from "./styles-Do-o-qNU.js";
|
|
4
4
|
function m({ marker: t }) {
|
|
5
5
|
return /* @__PURE__ */ n(
|
|
6
6
|
e,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as o, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { a } from "./scale-control-CyJd4u6j.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { c as e, S as n, o as r, i as s } from "./styles-
|
|
4
|
+
import { c as e, S as n, o as r, i as s } from "./styles-Do-o-qNU.js";
|
|
5
5
|
function d({ marker: t }) {
|
|
6
6
|
return /* @__PURE__ */ o(
|
|
7
7
|
a,
|
|
@@ -10,7 +10,7 @@ const tt = it.createContext({}), R = () => at(tt), I = {
|
|
|
10
10
|
maptiler: "600d69cb-288d-445e-9839-3dfe4d76b31a",
|
|
11
11
|
mapbox: "locallogic/cmb9nz9kb011501ru8drq8fqf",
|
|
12
12
|
google: "a7ff20eb973126bb"
|
|
13
|
-
}, Y = 13, ut = 22, Ht = 12.5, ht = 30, pt = 60, lt = "w-full h-full relative overflow-hidden", ft = w(() => import("./index-
|
|
13
|
+
}, Y = 13, ut = 22, Ht = 12.5, ht = 30, pt = 60, lt = "w-full h-full relative overflow-hidden", ft = w(() => import("./index-CnuTCmRK.js")), dt = w(() => import("./index-Cg3HD19r.js")), gt = w(() => import("./index-BvnFFiii.js")), mt = w(() => import("./index-qqbvBkdn.js")), yt = ({ padding: r = 1e-3, children: t }) => {
|
|
14
14
|
const {
|
|
15
15
|
mapProvider: e,
|
|
16
16
|
center: n,
|
|
@@ -48,7 +48,7 @@ const tt = it.createContext({}), R = () => at(tt), I = {
|
|
|
48
48
|
children: /* @__PURE__ */ T(p, { padding: r, children: t })
|
|
49
49
|
}
|
|
50
50
|
);
|
|
51
|
-
}, wt = w(() => import("./index-
|
|
51
|
+
}, wt = w(() => import("./index-_YvDHCeI.js")), Mt = w(() => import("./index-BFK3wMTT.js")), _t = w(() => import("./index-BQRXN0e-.js"));
|
|
52
52
|
function At(r) {
|
|
53
53
|
const { mapProvider: t } = R(), e = P(() => {
|
|
54
54
|
switch (t == null ? void 0 : t.name) {
|
|
@@ -564,7 +564,7 @@ var Lt = function(t) {
|
|
|
564
564
|
supercluster: c.current
|
|
565
565
|
};
|
|
566
566
|
};
|
|
567
|
-
const It = w(() => import("./index-
|
|
567
|
+
const It = w(() => import("./index-NEUlLLtm.js")), vt = w(() => import("./index-Brp2pz_Z.js")), Rt = w(() => import("./index-DJ1PVoCd.js"));
|
|
568
568
|
function Zt({ markers: r, onClick: t, ...e }) {
|
|
569
569
|
const { mapProvider: n, activeMarker: o, center: i, bounds: a, zoom: c, setMarkerPoints: s } = R();
|
|
570
570
|
ct(() => {
|
|
@@ -629,7 +629,7 @@ function Zt({ markers: r, onClick: t, ...e }) {
|
|
|
629
629
|
}
|
|
630
630
|
) : null;
|
|
631
631
|
}
|
|
632
|
-
const Ct = w(() => import("./index-
|
|
632
|
+
const Ct = w(() => import("./index-Dzgb7feN.js")), Ut = w(() => import("./index-CV_IAyz3.js")), Bt = w(() => import("./index-DyGtnON3.js"));
|
|
633
633
|
function Ft({ children: r, anchor: t = "bottom", ...e }) {
|
|
634
634
|
const { mapProvider: n } = R(), o = P(() => {
|
|
635
635
|
switch (n == null ? void 0 : n.name) {
|
|
@@ -645,7 +645,7 @@ function Ft({ children: r, anchor: t = "bottom", ...e }) {
|
|
|
645
645
|
}, [n]);
|
|
646
646
|
return o ? /* @__PURE__ */ T(o, { ...e, anchor: t, children: r }) : null;
|
|
647
647
|
}
|
|
648
|
-
const zt = w(() => import("./index-
|
|
648
|
+
const zt = w(() => import("./index-3kRdcdZh.js")), Dt = w(() => import("./index-x3wrHsPD.js")), Nt = w(() => import("./index-Yh7bUURu.js"));
|
|
649
649
|
function jt(r) {
|
|
650
650
|
const { mapProvider: t } = R(), e = P(() => {
|
|
651
651
|
switch (t == null ? void 0 : t.name) {
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsxs as u, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { u as M, a as k } from "./index.modern-CLRs8JwI.js";
|
|
3
|
+
import { u as I, M as O } from "./index-BUkdAOYF.js";
|
|
4
|
+
import { C as _, c as b, M as h } from "./index-CTU66ogZ.js";
|
|
5
|
+
function C({
|
|
6
|
+
clusters: a,
|
|
7
|
+
colors: i,
|
|
8
|
+
clusterIcon: d,
|
|
9
|
+
onClick: t,
|
|
10
|
+
doesSuperclusterContainActiveMarker: m
|
|
11
|
+
}) {
|
|
12
|
+
M();
|
|
13
|
+
const { activeMarker: r, zoom: s } = I(), f = (e) => () => {
|
|
14
|
+
e.properties.disableClick || t == null || t(e);
|
|
15
|
+
};
|
|
16
|
+
return a == null ? void 0 : a.map((e, g) => {
|
|
17
|
+
const n = e.geometry.coordinates[0], p = e.geometry.coordinates[1];
|
|
18
|
+
return /* @__PURE__ */ u(
|
|
19
|
+
k,
|
|
20
|
+
{
|
|
21
|
+
position: {
|
|
22
|
+
lat: p,
|
|
23
|
+
lng: n
|
|
24
|
+
},
|
|
25
|
+
onClick: f(e),
|
|
26
|
+
children: [
|
|
27
|
+
e.properties.cluster && /* @__PURE__ */ o(
|
|
28
|
+
_,
|
|
29
|
+
{
|
|
30
|
+
colors: i,
|
|
31
|
+
icon: d,
|
|
32
|
+
isActive: m(e.properties.cluster_id)
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
!e.properties.cluster && /* @__PURE__ */ o(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
className: b,
|
|
39
|
+
style: e.properties.defaultColor ? {} : {
|
|
40
|
+
"--background": i == null ? void 0 : i.background,
|
|
41
|
+
"--fill": i == null ? void 0 : i.fill
|
|
42
|
+
},
|
|
43
|
+
"data-is-cluster": !!e.properties.cluster,
|
|
44
|
+
"data-is-zoomed-out": s - 1 < O + 1,
|
|
45
|
+
"data-is-active": (r == null ? void 0 : r.id) === e.properties.id,
|
|
46
|
+
children: /* @__PURE__ */ o(h, { icon: e.properties.icon })
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
`map-marker-${n}-${p}-${g}`
|
|
52
|
+
);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
C as default
|
|
57
|
+
};
|
|
@@ -2,7 +2,7 @@ import { jsxs as M, jsx as d } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as v, useEffect as l } from "react";
|
|
3
3
|
import { M as y, N as g, u as h } from "./scale-control-CyJd4u6j.js";
|
|
4
4
|
import { b as B } from "./index-CFomI3Il.js";
|
|
5
|
-
import { u as b, d as u, a as Z, m as z } from "./index-
|
|
5
|
+
import { u as b, d as u, a as Z, m as z } from "./index-BUkdAOYF.js";
|
|
6
6
|
const L = ({ padding: i }) => {
|
|
7
7
|
const { current: o } = h(), { markerPoints: n, setBounds: m, setZoom: f } = b(), [r, p] = v(void 0), a = () => {
|
|
8
8
|
var t;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
1
|
+
import { jsx as r, jsxs as o, Fragment as f } from "react/jsx-runtime";
|
|
2
2
|
import * as e from "react";
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { u as
|
|
5
|
-
import { p } from "./IconBase.es-rM5tt24D.js";
|
|
6
|
-
const
|
|
3
|
+
import { useMemo as g } from "react";
|
|
4
|
+
import { u as p, M as c } from "./index-BUkdAOYF.js";
|
|
5
|
+
import { p as Z } from "./IconBase.es-rM5tt24D.js";
|
|
6
|
+
const A = /* @__PURE__ */ new Map([
|
|
7
7
|
[
|
|
8
8
|
"bold",
|
|
9
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" }))
|
|
@@ -34,49 +34,49 @@ const h = /* @__PURE__ */ new Map([
|
|
|
34
34
|
"thin",
|
|
35
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
36
|
]
|
|
37
|
-
]), d = e.forwardRef((t, a) => /* @__PURE__ */ e.createElement(
|
|
37
|
+
]), d = e.forwardRef((t, a) => /* @__PURE__ */ e.createElement(Z, { ref: a, ...t, weights: A }));
|
|
38
38
|
d.displayName = "MapPinIcon";
|
|
39
|
-
const
|
|
39
|
+
const n = `
|
|
40
40
|
group/marker cursor-pointer rounded-full
|
|
41
41
|
relative h-7 w-7 flex items-center justify-center
|
|
42
42
|
text-base-white ring-1 ring-inset
|
|
43
43
|
transition-colors
|
|
44
44
|
|
|
45
|
-
bg-[var(--background)]
|
|
46
|
-
ring-[var(--fill)]
|
|
45
|
+
bg-[var(--background,theme(colors.base.white))]
|
|
46
|
+
ring-[var(--fill,theme(colors.primary.100))]
|
|
47
47
|
|
|
48
|
-
hover:bg-[var(--fill)]
|
|
48
|
+
hover:bg-[var(--fill,theme(colors.primary.100))]
|
|
49
49
|
|
|
50
|
-
data-[is-zoomed-out=true]:bg-[var(--fill)]
|
|
50
|
+
data-[is-zoomed-out=true]:bg-[var(--fill,theme(colors.primary.100))]
|
|
51
51
|
data-[is-zoomed-out=true]:h-4
|
|
52
52
|
data-[is-zoomed-out=true]:w-4
|
|
53
53
|
|
|
54
|
-
data-[is-active=true]:bg-[var(--fill)]
|
|
55
|
-
`,
|
|
54
|
+
data-[is-active=true]:bg-[var(--fill,theme(colors.primary.100))]
|
|
55
|
+
`, s = `
|
|
56
56
|
m-auto transition-all w-4 h-4
|
|
57
57
|
|
|
58
|
-
fill-[var(--fill)]
|
|
59
|
-
group-hover/marker:fill-[var(--background)]
|
|
58
|
+
fill-[var(--fill,theme(colors.primary.100))]
|
|
59
|
+
group-hover/marker:fill-[var(--background,theme(colors.base.white))]
|
|
60
60
|
|
|
61
61
|
group-data-[is-zoomed-out=true]/marker:hidden
|
|
62
62
|
|
|
63
|
-
group-data-[is-active=true]/marker:fill-[var(--background)]
|
|
63
|
+
group-data-[is-active=true]/marker:fill-[var(--background,theme(colors.base.white))]
|
|
64
64
|
`;
|
|
65
65
|
function v({ icon: t }) {
|
|
66
|
-
return typeof t < "u" ? /* @__PURE__ */ r(t, { className:
|
|
66
|
+
return typeof t < "u" ? /* @__PURE__ */ r(t, { className: s }) : /* @__PURE__ */ r(d, { className: s });
|
|
67
67
|
}
|
|
68
68
|
const M = `
|
|
69
69
|
relative flex
|
|
70
|
-
`,
|
|
70
|
+
`, u = `
|
|
71
71
|
-ml-6 -z-10 last:-z-20
|
|
72
72
|
`;
|
|
73
|
-
function
|
|
73
|
+
function w({
|
|
74
74
|
isActive: t = !1,
|
|
75
75
|
colors: a,
|
|
76
|
-
icon:
|
|
76
|
+
icon: h
|
|
77
77
|
}) {
|
|
78
|
-
const { zoom:
|
|
79
|
-
return /* @__PURE__ */
|
|
78
|
+
const { zoom: m, mapProvider: l } = p(), i = g(() => l.name === "google" ? m - 1 < c + 1 : m < c, [m, l]);
|
|
79
|
+
return /* @__PURE__ */ o(
|
|
80
80
|
"div",
|
|
81
81
|
{
|
|
82
82
|
className: M,
|
|
@@ -88,22 +88,22 @@ function N({
|
|
|
88
88
|
/* @__PURE__ */ r(
|
|
89
89
|
"div",
|
|
90
90
|
{
|
|
91
|
-
className:
|
|
91
|
+
className: n,
|
|
92
92
|
"data-is-zoomed-out": i,
|
|
93
93
|
"data-is-active": t,
|
|
94
|
-
children: /* @__PURE__ */ r(v, { icon:
|
|
94
|
+
children: /* @__PURE__ */ r(v, { icon: h })
|
|
95
95
|
}
|
|
96
96
|
),
|
|
97
|
-
!i && /* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */ r("div", { className: `${
|
|
99
|
-
/* @__PURE__ */ r("div", { className: `${
|
|
97
|
+
!i && /* @__PURE__ */ o(f, { children: [
|
|
98
|
+
/* @__PURE__ */ r("div", { className: `${n} ${u}` }),
|
|
99
|
+
/* @__PURE__ */ r("div", { className: `${n} ${u}` })
|
|
100
100
|
] })
|
|
101
101
|
]
|
|
102
102
|
}
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
export {
|
|
106
|
-
|
|
106
|
+
w as C,
|
|
107
107
|
v as M,
|
|
108
|
-
|
|
108
|
+
n as c
|
|
109
109
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as a, useMemo as f } from "react";
|
|
3
3
|
import { u as o, I as s } from "./index.modern-CLRs8JwI.js";
|
|
4
|
-
import { u as y } from "./index-
|
|
4
|
+
import { u as y } from "./index-BUkdAOYF.js";
|
|
5
5
|
import { c as x } from "./styles-ChFj97uV.js";
|
|
6
6
|
function I({
|
|
7
7
|
latitude: u,
|
|
@@ -2,7 +2,7 @@ import { jsxs as v, jsx as T } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as h, useEffect as M } from "react";
|
|
3
3
|
import { A as y, M as L, C as f, u as P } from "./index.modern-CLRs8JwI.js";
|
|
4
4
|
import { b as x } from "./index-CFomI3Il.js";
|
|
5
|
-
import { u as b, d as p, a as B, m as O } from "./index-
|
|
5
|
+
import { u as b, d as p, a as B, m as O } from "./index-BUkdAOYF.js";
|
|
6
6
|
const Z = {
|
|
7
7
|
"top-left": f.LEFT_TOP,
|
|
8
8
|
"top-right": f.RIGHT_TOP,
|
|
@@ -2,7 +2,7 @@ import { jsxs as x, jsx as d } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as y, useEffect as c } from "react";
|
|
3
3
|
import { M as g, N as h, u as b } from "./logo-control-NE-LlsRy.js";
|
|
4
4
|
import { b as B } from "./index-CFomI3Il.js";
|
|
5
|
-
import { u as M, d as u, a as Z, m as z } from "./index-
|
|
5
|
+
import { u as M, d as u, a as Z, m as z } from "./index-BUkdAOYF.js";
|
|
6
6
|
const L = ({ padding: i }) => {
|
|
7
7
|
const { current: o } = b(), { markerPoints: n, setBounds: m, setZoom: f } = M(), [r, p] = y(void 0), s = () => {
|
|
8
8
|
var e;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsxs as M, jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { a as b } from "./scale-control-CyJd4u6j.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { u, M as h } from "./index-BUkdAOYF.js";
|
|
5
|
+
import { C as k, c as x, M as I } from "./index-CTU66ogZ.js";
|
|
6
|
+
function N({
|
|
7
|
+
clusters: t,
|
|
8
|
+
colors: e,
|
|
9
|
+
clusterIcon: m,
|
|
10
|
+
onClick: a,
|
|
11
|
+
doesSuperclusterContainActiveMarker: s
|
|
12
|
+
}) {
|
|
13
|
+
const { activeMarker: r, zoom: f } = u(), g = (i) => (o) => {
|
|
14
|
+
o.originalEvent.stopPropagation(), !i.properties.disableClick && (a == null || a(i));
|
|
15
|
+
};
|
|
16
|
+
return t == null ? void 0 : t.map((i, o) => {
|
|
17
|
+
const n = i.geometry.coordinates[0], d = i.geometry.coordinates[1];
|
|
18
|
+
return /* @__PURE__ */ M(
|
|
19
|
+
b,
|
|
20
|
+
{
|
|
21
|
+
anchor: "bottom",
|
|
22
|
+
longitude: n,
|
|
23
|
+
latitude: d,
|
|
24
|
+
onClick: g(i),
|
|
25
|
+
children: [
|
|
26
|
+
i.properties.cluster && /* @__PURE__ */ p(
|
|
27
|
+
k,
|
|
28
|
+
{
|
|
29
|
+
colors: e,
|
|
30
|
+
icon: m,
|
|
31
|
+
isActive: s(i.properties.cluster_id)
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
!i.properties.cluster && /* @__PURE__ */ p(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
className: x,
|
|
38
|
+
style: i.properties.defaultColor ? {} : {
|
|
39
|
+
"--background": e == null ? void 0 : e.background,
|
|
40
|
+
"--fill": e == null ? void 0 : e.fill
|
|
41
|
+
},
|
|
42
|
+
"data-is-cluster": !!i.properties.cluster,
|
|
43
|
+
"data-is-zoomed-out": f < h,
|
|
44
|
+
"data-is-active": (r == null ? void 0 : r.id) === i.properties.id,
|
|
45
|
+
children: /* @__PURE__ */ p(I, { icon: i.properties.icon })
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
`map-marker-${n}-${d}-${o}`
|
|
51
|
+
);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
N as default
|
|
56
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as a } from "react";
|
|
3
3
|
import { P as c } from "./scale-control-CyJd4u6j.js";
|
|
4
|
-
import { u as i } from "./index-
|
|
4
|
+
import { u as i } from "./index-BUkdAOYF.js";
|
|
5
5
|
import { c as n } from "./styles-ChFj97uV.js";
|
|
6
6
|
function l({
|
|
7
7
|
latitude: p,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as a } from "react";
|
|
3
3
|
import { P as i } from "./logo-control-NE-LlsRy.js";
|
|
4
|
-
import { u as c } from "./index-
|
|
4
|
+
import { u as c } from "./index-BUkdAOYF.js";
|
|
5
5
|
import { c as n } from "./styles-ChFj97uV.js";
|
|
6
6
|
function y({
|
|
7
7
|
latitude: e,
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsxs as M, jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { a as u } from "./logo-control-NE-LlsRy.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { u as _, M as b } from "./index-BUkdAOYF.js";
|
|
5
|
+
import { C as h, c as k, M as I } from "./index-CTU66ogZ.js";
|
|
6
|
+
function N({
|
|
7
|
+
clusters: t,
|
|
8
|
+
colors: e,
|
|
9
|
+
clusterIcon: m,
|
|
10
|
+
onClick: a,
|
|
11
|
+
doesSuperclusterContainActiveMarker: s
|
|
12
|
+
}) {
|
|
13
|
+
const { activeMarker: r, zoom: f } = _(), g = (i) => (o) => {
|
|
14
|
+
o.originalEvent.stopPropagation(), !i.properties.disableClick && (a == null || a(i));
|
|
15
|
+
};
|
|
16
|
+
return t == null ? void 0 : t.map((i, o) => {
|
|
17
|
+
const n = i.geometry.coordinates[0], d = i.geometry.coordinates[1];
|
|
18
|
+
return /* @__PURE__ */ M(
|
|
19
|
+
u,
|
|
20
|
+
{
|
|
21
|
+
anchor: "bottom",
|
|
22
|
+
longitude: n,
|
|
23
|
+
latitude: d,
|
|
24
|
+
onClick: g(i),
|
|
25
|
+
children: [
|
|
26
|
+
i.properties.cluster && i.properties.cluster_id && /* @__PURE__ */ p(
|
|
27
|
+
h,
|
|
28
|
+
{
|
|
29
|
+
colors: e,
|
|
30
|
+
icon: m,
|
|
31
|
+
isActive: s(i.properties.cluster_id)
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
!i.properties.cluster && /* @__PURE__ */ p(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
className: k,
|
|
38
|
+
style: i.properties.defaultColor ? {} : {
|
|
39
|
+
"--background": e == null ? void 0 : e.background,
|
|
40
|
+
"--fill": e == null ? void 0 : e.fill
|
|
41
|
+
},
|
|
42
|
+
"data-is-cluster": !!i.properties.cluster,
|
|
43
|
+
"data-is-zoomed-out": f < b,
|
|
44
|
+
"data-is-active": (r == null ? void 0 : r.id) === i.properties.id,
|
|
45
|
+
children: /* @__PURE__ */ p(I, { icon: i.properties.icon })
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
`map-marker-${n}-${d}-${o}`
|
|
51
|
+
);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
N as default
|
|
56
|
+
};
|