@local-logic/maps 0.1.3 → 0.1.4
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-zqYpD_YN.js → index--PIAfLjo.js} +2 -2
- package/dist/{index-Deqck8KU.js → index-0EkdzCyN.js} +12 -11
- package/dist/index-BO34uKgS.js +16 -0
- package/dist/{index-CyFpPXRS.js → index-BY_xYg2p.js} +12 -11
- package/dist/{index-CzqD82Cl.js → index-BnTZMzoy.js} +2 -2
- package/dist/index-C0inY_TA.js +41 -0
- package/dist/index-CHdAT424.js +44 -0
- package/dist/{index-J8lmJ6Xj.js → index-CNP-c5ZB.js} +205 -194
- package/dist/index-COB6j_V1.js +25 -0
- package/dist/{index-CFioISlP.js → index-CZPGxjSJ.js} +11 -10
- package/dist/index-D4t3jFAj.js +35 -0
- package/dist/index-DEFuc-6u.js +78 -0
- package/dist/index-DXT59VJA.js +29 -0
- package/dist/{index-VFglx6lb.js → index-GoHd1Tri.js} +2 -2
- package/dist/{index-NMqp09ek.js → index-MZUXTR07.js} +1 -1
- package/dist/{index-Bm2KdhhT.js → index-QxKYqddl.js} +1 -1
- package/dist/{index-B1dI6iqp.js → index-zzok3ruU.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +62 -7
- package/dist/src/components/Map/Root/BaseMap/Testing/index.d.ts +4 -0
- package/dist/src/components/Map/Root/BaseMap/Testing/index.d.ts.map +1 -0
- package/dist/src/components/Map/Root/BaseMap/Testing/styles.d.ts +4 -0
- package/dist/src/components/Map/Root/BaseMap/Testing/styles.d.ts.map +1 -0
- package/dist/src/components/Map/Root/BaseMap/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/CenterPin/Testing/index.d.ts +4 -0
- package/dist/src/components/Map/Root/CenterPin/Testing/index.d.ts.map +1 -0
- package/dist/src/components/Map/Root/CenterPin/Testing/styles.d.ts +2 -0
- package/dist/src/components/Map/Root/CenterPin/Testing/styles.d.ts.map +1 -0
- package/dist/src/components/Map/Root/CenterPin/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Layers/Testing/index.d.ts +4 -0
- package/dist/src/components/Map/Root/Layers/Testing/index.d.ts.map +1 -0
- package/dist/src/components/Map/Root/Layers/Testing/styles.d.ts +9 -0
- package/dist/src/components/Map/Root/Layers/Testing/styles.d.ts.map +1 -0
- package/dist/src/components/Map/Root/Layers/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Markers/Testing/index.d.ts +4 -0
- package/dist/src/components/Map/Root/Markers/Testing/index.d.ts.map +1 -0
- package/dist/src/components/Map/Root/Markers/Testing/styles.d.ts +7 -0
- package/dist/src/components/Map/Root/Markers/Testing/styles.d.ts.map +1 -0
- package/dist/src/components/Map/Root/Markers/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Popup/Testing/index.d.ts +4 -0
- package/dist/src/components/Map/Root/Popup/Testing/index.d.ts.map +1 -0
- package/dist/src/components/Map/Root/Popup/Testing/styles.d.ts +5 -0
- package/dist/src/components/Map/Root/Popup/Testing/styles.d.ts.map +1 -0
- package/dist/src/components/Map/Root/Popup/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/constants.d.ts +1 -0
- package/dist/src/components/Map/Root/constants.d.ts.map +1 -1
- package/dist/src/components/Map/Root/types.d.ts +1 -1
- package/dist/src/components/Map/Root/types.d.ts.map +1 -1
- package/dist/src/components/Map/index.stories.d.ts +3 -0
- package/dist/src/components/Map/index.stories.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-J872R1eq.js → styles-DvWVFFVb.js} +1 -1
- package/package.json +2 -1
- package/dist/index-HWDZde-a.js +0 -75
- package/dist/index-qqbvBkdn.js +0 -7
- package/dist/src/components/Map/Root/BaseMap/Empty/index.d.ts +0 -3
- package/dist/src/components/Map/Root/BaseMap/Empty/index.d.ts.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as E } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as d, useEffect as M } from "react";
|
|
3
3
|
import { u as D, P as H } from "./logo-control-CHapR1Dt.js";
|
|
4
|
-
import { u as j, P as T } from "./index-
|
|
5
|
-
import { c as x, m as A } from "./styles-
|
|
4
|
+
import { u as j, P as T } from "./index-CNP-c5ZB.js";
|
|
5
|
+
import { c as x, m as A } from "./styles-DvWVFFVb.js";
|
|
6
6
|
function Z({
|
|
7
7
|
latitude: l,
|
|
8
8
|
longitude: h,
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { jsxs as f, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { a as k } from "./logo-control-CHapR1Dt.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { u, M } from "./index-
|
|
5
|
-
import {
|
|
6
|
-
|
|
4
|
+
import { u, M } from "./index-CNP-c5ZB.js";
|
|
5
|
+
import { c as g, M as C } from "./index-D4t3jFAj.js";
|
|
6
|
+
import { C as v } from "./index-CHdAT424.js";
|
|
7
|
+
function y({
|
|
7
8
|
clusters: n,
|
|
8
9
|
colors: o,
|
|
9
|
-
clusterIcon:
|
|
10
|
-
onClick:
|
|
10
|
+
clusterIcon: p,
|
|
11
|
+
onClick: s,
|
|
11
12
|
doesSuperclusterContainActiveMarker: d
|
|
12
13
|
}) {
|
|
13
14
|
const { activeMarker: m, zoom: c } = u(), l = (r) => (e) => {
|
|
14
|
-
e.originalEvent.stopPropagation(), !r.properties.disableClick &&
|
|
15
|
+
e.originalEvent.stopPropagation(), !r.properties.disableClick && s?.(r);
|
|
15
16
|
};
|
|
16
17
|
return n?.map((r, e) => {
|
|
17
18
|
const t = r.geometry.coordinates[0], a = r.geometry.coordinates[1];
|
|
@@ -24,17 +25,17 @@ function x({
|
|
|
24
25
|
onClick: l(r),
|
|
25
26
|
children: [
|
|
26
27
|
r.properties.cluster && r.properties.cluster_id && /* @__PURE__ */ i(
|
|
27
|
-
|
|
28
|
+
v,
|
|
28
29
|
{
|
|
29
30
|
colors: o,
|
|
30
|
-
icon:
|
|
31
|
+
icon: p,
|
|
31
32
|
isActive: d(r.properties.cluster_id)
|
|
32
33
|
}
|
|
33
34
|
),
|
|
34
35
|
!r.properties.cluster && /* @__PURE__ */ i(
|
|
35
36
|
"div",
|
|
36
37
|
{
|
|
37
|
-
className:
|
|
38
|
+
className: g,
|
|
38
39
|
style: r.properties.defaultColor ? {} : {
|
|
39
40
|
"--background": o?.background,
|
|
40
41
|
"--fill": o?.fill
|
|
@@ -42,7 +43,7 @@ function x({
|
|
|
42
43
|
"data-is-cluster": !!r.properties.cluster,
|
|
43
44
|
"data-is-zoomed-out": c < M,
|
|
44
45
|
"data-is-active": m?.id === r.properties.id,
|
|
45
|
-
children: /* @__PURE__ */ i(
|
|
46
|
+
children: /* @__PURE__ */ i(C, { icon: r.properties.icon })
|
|
46
47
|
}
|
|
47
48
|
)
|
|
48
49
|
]
|
|
@@ -52,5 +53,5 @@ function x({
|
|
|
52
53
|
});
|
|
53
54
|
}
|
|
54
55
|
export {
|
|
55
|
-
|
|
56
|
+
y as default
|
|
56
57
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { HouseLineIcon as i } from "@phosphor-icons/react";
|
|
3
|
+
const o = `
|
|
4
|
+
p-2 border-b border-primary-200
|
|
5
|
+
bg-primary-100 text-white
|
|
6
|
+
flex items-center gap-2 text-xs font-mono
|
|
7
|
+
`;
|
|
8
|
+
function m({ marker: r, className: t }) {
|
|
9
|
+
return /* @__PURE__ */ n("div", { className: `${o} ${t || ""}`, children: [
|
|
10
|
+
/* @__PURE__ */ e(i, { size: 20, weight: "fill" }),
|
|
11
|
+
/* @__PURE__ */ e("span", { children: r.name || "Center" })
|
|
12
|
+
] });
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
m as default
|
|
16
|
+
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { jsxs as f, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { a as k } from "./scale-control-Dsir9fWY.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { u, M } from "./index-
|
|
5
|
-
import {
|
|
6
|
-
|
|
4
|
+
import { u, M } from "./index-CNP-c5ZB.js";
|
|
5
|
+
import { c as g, M as C } from "./index-D4t3jFAj.js";
|
|
6
|
+
import { C as b } from "./index-CHdAT424.js";
|
|
7
|
+
function y({
|
|
7
8
|
clusters: n,
|
|
8
9
|
colors: r,
|
|
9
10
|
clusterIcon: s,
|
|
10
11
|
onClick: p,
|
|
11
|
-
doesSuperclusterContainActiveMarker:
|
|
12
|
+
doesSuperclusterContainActiveMarker: m
|
|
12
13
|
}) {
|
|
13
|
-
const { activeMarker:
|
|
14
|
+
const { activeMarker: d, zoom: c } = u(), l = (o) => (e) => {
|
|
14
15
|
e.originalEvent.stopPropagation(), !o.properties.disableClick && p?.(o);
|
|
15
16
|
};
|
|
16
17
|
return n?.map((o, e) => {
|
|
@@ -24,25 +25,25 @@ function _({
|
|
|
24
25
|
onClick: l(o),
|
|
25
26
|
children: [
|
|
26
27
|
o.properties.cluster && /* @__PURE__ */ i(
|
|
27
|
-
|
|
28
|
+
b,
|
|
28
29
|
{
|
|
29
30
|
colors: r,
|
|
30
31
|
icon: s,
|
|
31
|
-
isActive:
|
|
32
|
+
isActive: m(o.properties.cluster_id)
|
|
32
33
|
}
|
|
33
34
|
),
|
|
34
35
|
!o.properties.cluster && /* @__PURE__ */ i(
|
|
35
36
|
"div",
|
|
36
37
|
{
|
|
37
|
-
className:
|
|
38
|
+
className: g,
|
|
38
39
|
style: o.properties.defaultColor ? {} : {
|
|
39
40
|
"--background": r?.background,
|
|
40
41
|
"--fill": r?.fill
|
|
41
42
|
},
|
|
42
43
|
"data-is-cluster": !!o.properties.cluster,
|
|
43
44
|
"data-is-zoomed-out": c < M,
|
|
44
|
-
"data-is-active":
|
|
45
|
-
children: /* @__PURE__ */ i(
|
|
45
|
+
"data-is-active": d?.id === o.properties.id,
|
|
46
|
+
children: /* @__PURE__ */ i(C, { icon: o.properties.icon })
|
|
46
47
|
}
|
|
47
48
|
)
|
|
48
49
|
]
|
|
@@ -52,5 +53,5 @@ function _({
|
|
|
52
53
|
});
|
|
53
54
|
}
|
|
54
55
|
export {
|
|
55
|
-
|
|
56
|
+
y as default
|
|
56
57
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as E } from "react/jsx-runtime";
|
|
2
2
|
import { useState as L, useRef as M, useCallback as N, useEffect as f, useMemo as W } from "react";
|
|
3
3
|
import { useMap as _, InfoWindow as x } from "@vis.gl/react-google-maps";
|
|
4
|
-
import { u as z, P as y } from "./index-
|
|
5
|
-
import { c as H, m as j } from "./styles-
|
|
4
|
+
import { u as z, P as y } from "./index-CNP-c5ZB.js";
|
|
5
|
+
import { c as H, m as j } from "./styles-DvWVFFVb.js";
|
|
6
6
|
function Z({
|
|
7
7
|
latitude: g,
|
|
8
8
|
longitude: m,
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsxs as r, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
const o = `
|
|
3
|
+
p-2 border-b border-gray-300
|
|
4
|
+
bg-white/95 text-xs
|
|
5
|
+
`, d = `
|
|
6
|
+
font-bold mb-2
|
|
7
|
+
`, i = `
|
|
8
|
+
p-1.5 mb-1 bg-gray-50 border border-gray-200 rounded
|
|
9
|
+
`, c = `
|
|
10
|
+
font-bold
|
|
11
|
+
`, y = `
|
|
12
|
+
flex gap-1.5 mt-1
|
|
13
|
+
`, m = `
|
|
14
|
+
flex items-center gap-1
|
|
15
|
+
`, b = `
|
|
16
|
+
w-4 h-4 border border-gray-400 rounded-sm
|
|
17
|
+
`, g = `
|
|
18
|
+
text-xs
|
|
19
|
+
`;
|
|
20
|
+
function p({ sources: l = [] }) {
|
|
21
|
+
return l.length === 0 ? null : /* @__PURE__ */ r("div", { className: o, children: [
|
|
22
|
+
/* @__PURE__ */ r("div", { className: d, children: [
|
|
23
|
+
"Layers (",
|
|
24
|
+
l.length,
|
|
25
|
+
")"
|
|
26
|
+
] }),
|
|
27
|
+
l.map((e) => {
|
|
28
|
+
const n = Array.isArray(e.layer) ? e.layer : [e.layer];
|
|
29
|
+
return /* @__PURE__ */ r("div", { className: i, children: [
|
|
30
|
+
/* @__PURE__ */ a("div", { className: c, children: e.key }),
|
|
31
|
+
/* @__PURE__ */ a("div", { className: y, children: n.map((t, s) => /* @__PURE__ */ r("div", { className: m, children: [
|
|
32
|
+
/* @__PURE__ */ a("div", { className: b, style: { backgroundColor: t.color } }),
|
|
33
|
+
/* @__PURE__ */ a("span", { className: g, children: t.type })
|
|
34
|
+
] }, s)) })
|
|
35
|
+
] }, e.key);
|
|
36
|
+
})
|
|
37
|
+
] });
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
p as default
|
|
41
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsxs as i, jsx as e, Fragment as d } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as u } from "react";
|
|
3
|
+
import { u as f, M as n } from "./index-CNP-c5ZB.js";
|
|
4
|
+
import { c as o, M as v } from "./index-D4t3jFAj.js";
|
|
5
|
+
const M = `
|
|
6
|
+
relative flex
|
|
7
|
+
`, m = `
|
|
8
|
+
-ml-6 -z-10 last:-z-20
|
|
9
|
+
`;
|
|
10
|
+
function $({
|
|
11
|
+
isActive: c = !1,
|
|
12
|
+
colors: r,
|
|
13
|
+
icon: l
|
|
14
|
+
}) {
|
|
15
|
+
const { zoom: a, mapProvider: s } = f(), t = u(() => s.name === "google" ? a - 1 < n + 1 : a < n, [a, s]);
|
|
16
|
+
return /* @__PURE__ */ i(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
className: M,
|
|
20
|
+
style: {
|
|
21
|
+
"--background": r?.background,
|
|
22
|
+
"--fill": r?.fill
|
|
23
|
+
},
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ e(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: o,
|
|
29
|
+
"data-is-zoomed-out": t,
|
|
30
|
+
"data-is-active": c,
|
|
31
|
+
children: /* @__PURE__ */ e(v, { icon: l })
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
!t && /* @__PURE__ */ i(d, { children: [
|
|
35
|
+
/* @__PURE__ */ e("div", { className: `${o} ${m}` }),
|
|
36
|
+
/* @__PURE__ */ e("div", { className: `${o} ${m}` })
|
|
37
|
+
] })
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
$ as C
|
|
44
|
+
};
|