@local-logic/maps 0.1.2 → 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-Ci9PQ3VM.js → index--PIAfLjo.js} +2 -2
- package/dist/{index-Dy0j33aN.js → index-0EkdzCyN.js} +12 -11
- package/dist/index-BO34uKgS.js +16 -0
- package/dist/{index-vIYPnHrB.js → index-BY_xYg2p.js} +12 -11
- package/dist/{index-DHOxmHER.js → index-BnTZMzoy.js} +2 -2
- package/dist/index-C0inY_TA.js +41 -0
- package/dist/index-CHdAT424.js +44 -0
- package/dist/index-CNP-c5ZB.js +736 -0
- package/dist/index-COB6j_V1.js +25 -0
- package/dist/{index-BOJCRr60.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-CWXZA3V3.js → index-GoHd1Tri.js} +2 -2
- package/dist/{index-CTWLtI5f.js → index-MZUXTR07.js} +1 -1
- package/dist/{index-xDS1OfMB.js → index-QxKYqddl.js} +1 -1
- package/dist/{index-BabQioiH.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-B3ZaR0wz.js → styles-DvWVFFVb.js} +1 -1
- package/package.json +2 -1
- package/dist/index-BUZonjTY.js +0 -75
- package/dist/index-D37STE_k.js +0 -725
- 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
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { XIcon as s } from "@phosphor-icons/react";
|
|
3
|
+
const a = `
|
|
4
|
+
p-3 border-b border-blue-500
|
|
5
|
+
bg-white min-w-[200px]
|
|
6
|
+
`, l = `
|
|
7
|
+
flex justify-between items-start mb-2
|
|
8
|
+
`, c = `
|
|
9
|
+
text-xs text-gray-600 font-mono
|
|
10
|
+
`, d = `
|
|
11
|
+
p-0 bg-transparent border-0 cursor-pointer
|
|
12
|
+
flex items-center justify-center text-gray-600 hover:text-gray-900
|
|
13
|
+
`;
|
|
14
|
+
function b({ latitude: o, longitude: n, onClose: t, children: i }) {
|
|
15
|
+
return o === void 0 || n === void 0 ? null : /* @__PURE__ */ r("div", { className: a, children: [
|
|
16
|
+
/* @__PURE__ */ r("div", { className: l, children: [
|
|
17
|
+
/* @__PURE__ */ e("div", { className: c, children: "Popup" }),
|
|
18
|
+
t && /* @__PURE__ */ e("button", { onClick: t, className: d, "aria-label": "Close popup", children: /* @__PURE__ */ e(s, { size: 20, weight: "bold" }) })
|
|
19
|
+
] }),
|
|
20
|
+
/* @__PURE__ */ e("div", { children: i })
|
|
21
|
+
] });
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
b as default
|
|
25
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsxs as f, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useMap as k, AdvancedMarker as u } from "@vis.gl/react-google-maps";
|
|
3
|
-
import { u as M, M as g } from "./index-
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { u as M, M as g } from "./index-CNP-c5ZB.js";
|
|
4
|
+
import { c as C, M as v } from "./index-D4t3jFAj.js";
|
|
5
|
+
import { C as I } from "./index-CHdAT424.js";
|
|
6
|
+
function y({
|
|
6
7
|
clusters: a,
|
|
7
8
|
colors: o,
|
|
8
9
|
clusterIcon: n,
|
|
@@ -10,7 +11,7 @@ function x({
|
|
|
10
11
|
doesSuperclusterContainActiveMarker: p
|
|
11
12
|
}) {
|
|
12
13
|
k();
|
|
13
|
-
const { activeMarker: d, zoom:
|
|
14
|
+
const { activeMarker: d, zoom: m } = M(), c = (e) => () => {
|
|
14
15
|
e.properties.disableClick || s?.(e);
|
|
15
16
|
};
|
|
16
17
|
return a?.map((e, l) => {
|
|
@@ -22,10 +23,10 @@ function x({
|
|
|
22
23
|
lat: t,
|
|
23
24
|
lng: i
|
|
24
25
|
},
|
|
25
|
-
onClick:
|
|
26
|
+
onClick: c(e),
|
|
26
27
|
children: [
|
|
27
28
|
e.properties.cluster && /* @__PURE__ */ r(
|
|
28
|
-
|
|
29
|
+
I,
|
|
29
30
|
{
|
|
30
31
|
colors: o,
|
|
31
32
|
icon: n,
|
|
@@ -35,15 +36,15 @@ function x({
|
|
|
35
36
|
!e.properties.cluster && /* @__PURE__ */ r(
|
|
36
37
|
"div",
|
|
37
38
|
{
|
|
38
|
-
className:
|
|
39
|
+
className: C,
|
|
39
40
|
style: e.properties.defaultColor ? {} : {
|
|
40
41
|
"--background": o?.background,
|
|
41
42
|
"--fill": o?.fill
|
|
42
43
|
},
|
|
43
44
|
"data-is-cluster": !!e.properties.cluster,
|
|
44
|
-
"data-is-zoomed-out":
|
|
45
|
+
"data-is-zoomed-out": m - 1 < g + 1,
|
|
45
46
|
"data-is-active": d?.id === e.properties.id,
|
|
46
|
-
children: /* @__PURE__ */ r(
|
|
47
|
+
children: /* @__PURE__ */ r(v, { icon: e.properties.icon })
|
|
47
48
|
}
|
|
48
49
|
)
|
|
49
50
|
]
|
|
@@ -53,5 +54,5 @@ function x({
|
|
|
53
54
|
});
|
|
54
55
|
}
|
|
55
56
|
export {
|
|
56
|
-
|
|
57
|
+
y as default
|
|
57
58
|
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { MapPinIcon as t } from "@phosphor-icons/react";
|
|
3
|
+
const s = `
|
|
4
|
+
group/marker cursor-pointer rounded-full
|
|
5
|
+
relative h-7 w-7 flex items-center justify-center
|
|
6
|
+
text-base-white ring-1 ring-inset
|
|
7
|
+
transition-colors
|
|
8
|
+
|
|
9
|
+
bg-[var(--background,theme(colors.base.white))]
|
|
10
|
+
ring-[var(--fill,theme(colors.primary.100))]
|
|
11
|
+
|
|
12
|
+
hover:bg-[var(--fill,theme(colors.primary.100))]
|
|
13
|
+
|
|
14
|
+
data-[is-zoomed-out=true]:bg-[var(--fill,theme(colors.primary.100))]
|
|
15
|
+
data-[is-zoomed-out=true]:h-4
|
|
16
|
+
data-[is-zoomed-out=true]:w-4
|
|
17
|
+
|
|
18
|
+
data-[is-active=true]:bg-[var(--fill,theme(colors.primary.100))]
|
|
19
|
+
`, o = `
|
|
20
|
+
m-auto transition-all w-4 h-4
|
|
21
|
+
|
|
22
|
+
fill-[var(--fill,theme(colors.primary.100))]
|
|
23
|
+
group-hover/marker:fill-[var(--background,theme(colors.base.white))]
|
|
24
|
+
|
|
25
|
+
group-data-[is-zoomed-out=true]/marker:hidden
|
|
26
|
+
|
|
27
|
+
group-data-[is-active=true]/marker:fill-[var(--background,theme(colors.base.white))]
|
|
28
|
+
`;
|
|
29
|
+
function l({ icon: r }) {
|
|
30
|
+
return typeof r < "u" ? /* @__PURE__ */ e(r, { className: o }) : /* @__PURE__ */ e(t, { className: o });
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
l as M,
|
|
34
|
+
s as c
|
|
35
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { M as p } from "./index-D4t3jFAj.js";
|
|
3
|
+
const b = `
|
|
4
|
+
p-2 border-b border-gray-300
|
|
5
|
+
bg-white/95 text-xs font-mono
|
|
6
|
+
`, u = `
|
|
7
|
+
font-bold mb-2
|
|
8
|
+
`, f = "w-6 h-6 flex items-center justify-center", h = `
|
|
9
|
+
p-1.5 mb-1 border border-primary-200 rounded
|
|
10
|
+
flex items-center gap-2 cursor-pointer
|
|
11
|
+
hover:bg-gray-100
|
|
12
|
+
`, k = `
|
|
13
|
+
p-1.5 mb-1 border border-primary-200 rounded
|
|
14
|
+
flex items-center gap-2 cursor-pointer
|
|
15
|
+
hover:bg-gray-100
|
|
16
|
+
`, x = `
|
|
17
|
+
w-6 h-6 rounded-full bg-primary-100 text-white
|
|
18
|
+
flex items-center justify-center font-bold text-xs
|
|
19
|
+
`;
|
|
20
|
+
function w({
|
|
21
|
+
clusters: s,
|
|
22
|
+
onClick: n,
|
|
23
|
+
doesSuperclusterContainActiveMarker: g,
|
|
24
|
+
children: c
|
|
25
|
+
}) {
|
|
26
|
+
return /* @__PURE__ */ t("div", { className: b, children: [
|
|
27
|
+
/* @__PURE__ */ t("div", { className: u, children: [
|
|
28
|
+
"Markers (",
|
|
29
|
+
s.length,
|
|
30
|
+
")"
|
|
31
|
+
] }),
|
|
32
|
+
s.map((e, a) => {
|
|
33
|
+
const m = e.properties.cluster, l = e.properties.cluster_id, d = e.properties.point_count;
|
|
34
|
+
if (m)
|
|
35
|
+
return /* @__PURE__ */ t(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
onClick: () => n(e),
|
|
39
|
+
onKeyDown: (i) => i.key === "Enter" && n(e),
|
|
40
|
+
role: "button",
|
|
41
|
+
tabIndex: 0,
|
|
42
|
+
className: k,
|
|
43
|
+
"data-testid": `map-marker-${a}`,
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ o("div", { className: x, children: d }),
|
|
46
|
+
/* @__PURE__ */ t("span", { children: [
|
|
47
|
+
"Cluster (",
|
|
48
|
+
d,
|
|
49
|
+
" markers)"
|
|
50
|
+
] })
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
`cluster-${l}`
|
|
54
|
+
);
|
|
55
|
+
const r = e.properties;
|
|
56
|
+
return /* @__PURE__ */ t(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
"data-testid": `map-marker-${a}`,
|
|
60
|
+
onClick: () => !r.disableClick && n(e),
|
|
61
|
+
onKeyDown: (i) => !r.disableClick && i.key === "Enter" && n(e),
|
|
62
|
+
role: "button",
|
|
63
|
+
tabIndex: 0,
|
|
64
|
+
className: h,
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ o("div", { className: f, children: /* @__PURE__ */ o(p, { icon: r.icon }) }),
|
|
67
|
+
/* @__PURE__ */ o("span", { children: r.name || r.id })
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
`marker-${r.id}`
|
|
71
|
+
);
|
|
72
|
+
}),
|
|
73
|
+
c
|
|
74
|
+
] });
|
|
75
|
+
}
|
|
76
|
+
export {
|
|
77
|
+
w as default
|
|
78
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsxs as o, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { u as i } from "./index-CNP-c5ZB.js";
|
|
3
|
+
const l = `
|
|
4
|
+
relative w-full h-full bg-gray-200 border-2 border-gray-400
|
|
5
|
+
flex flex-col overflow-hidden
|
|
6
|
+
`, s = `
|
|
7
|
+
p-2 bg-white/90 border-b border-gray-300 text-xs font-mono
|
|
8
|
+
shrink-0
|
|
9
|
+
`, a = `
|
|
10
|
+
flex-1 overflow-y-auto relative
|
|
11
|
+
`;
|
|
12
|
+
function f({ children: t }) {
|
|
13
|
+
const { center: e, zoom: r } = i();
|
|
14
|
+
return /* @__PURE__ */ o("div", { className: l, children: [
|
|
15
|
+
/* @__PURE__ */ o("div", { className: s, children: [
|
|
16
|
+
"Testing Map | Center: (",
|
|
17
|
+
e.latitude.toFixed(2),
|
|
18
|
+
", ",
|
|
19
|
+
e.longitude.toFixed(2),
|
|
20
|
+
") | Zoom:",
|
|
21
|
+
" ",
|
|
22
|
+
r
|
|
23
|
+
] }),
|
|
24
|
+
/* @__PURE__ */ n("div", { className: a, children: t })
|
|
25
|
+
] });
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
f as default
|
|
29
|
+
};
|
|
@@ -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 z, P as D } from "./scale-control-Dsir9fWY.js";
|
|
4
|
-
import { u as H, P as T } from "./index-
|
|
5
|
-
import { c as j, m as A } from "./styles-
|
|
4
|
+
import { u as H, P as T } from "./index-CNP-c5ZB.js";
|
|
5
|
+
import { c as j, m as A } from "./styles-DvWVFFVb.js";
|
|
6
6
|
function Z({
|
|
7
7
|
latitude: h,
|
|
8
8
|
longitude: l,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as v, jsx as g } from "react/jsx-runtime";
|
|
2
2
|
import { useState as T, useRef as E, useCallback as x, useEffect as b } from "react";
|
|
3
3
|
import { M as L, N as A, u as G } from "./logo-control-CHapR1Dt.js";
|
|
4
|
-
import { u as M, D as m, a as F, m as S } from "./index-
|
|
4
|
+
import { u as M, D as m, a as F, m as S } from "./index-CNP-c5ZB.js";
|
|
5
5
|
import { t as h } from "./index-DscDx7HE.js";
|
|
6
6
|
const z = {
|
|
7
7
|
en: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as v, jsx as C } from "react/jsx-runtime";
|
|
2
2
|
import { useState as x, useRef as Z, useCallback as h, useEffect as d } from "react";
|
|
3
3
|
import { M as B, N as L, u as T } from "./scale-control-Dsir9fWY.js";
|
|
4
|
-
import { u as M, D as p, a as z, m as A } from "./index-
|
|
4
|
+
import { u as M, D as p, a as z, m as A } from "./index-CNP-c5ZB.js";
|
|
5
5
|
import { t as E } from "./index-DscDx7HE.js";
|
|
6
6
|
const P = {
|
|
7
7
|
en: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as P, jsxs as x, Fragment as A } from "react/jsx-runtime";
|
|
2
2
|
import { useState as v, useEffect as L, useRef as C, useCallback as E } from "react";
|
|
3
3
|
import { APIProvider as O, Map as z, ControlPosition as g, useMap as G } from "@vis.gl/react-google-maps";
|
|
4
|
-
import { u as B, D as h, W as f, a as Z, m as I } from "./index-
|
|
4
|
+
import { u as B, D as h, W as f, a as Z, m as I } from "./index-CNP-c5ZB.js";
|
|
5
5
|
import { t as R } from "./index-DscDx7HE.js";
|
|
6
6
|
const F = {
|
|
7
7
|
"top-left": g.LEFT_TOP,
|
package/dist/index.es.js
CHANGED