@local-logic/maps 0.0.6 → 0.0.8
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-92HhWupr.js +29 -0
- package/dist/{index-Bd-X-1Gd.js → index-BF2kb4Y-.js} +13 -13
- package/dist/{index-BAAE2pMq.js → index-C5-_i-6M.js} +21 -21
- package/dist/{index-CXLLvdx4.js → index-CY0to_1B.js} +253 -247
- package/dist/{index-BHjgd5HB.js → index-ChwN5abO.js} +1 -1
- package/dist/index-CrIFr9oc.js +47 -0
- package/dist/{index-BbrOUWDy.js → index-D5-2anzJ.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +12 -12
- package/dist/src/components/Map/Root/BaseMap/Google/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/BaseMap/Mapbox/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/BaseMap/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Layers/Google/index.d.ts +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/src/components/Map/Root/Layers/Maptiler/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Layers/index.d.ts +2 -2
- package/dist/src/components/Map/Root/Layers/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Layers/types.d.ts +1 -1
- package/dist/src/components/Map/Root/Layers/types.d.ts.map +1 -1
- package/dist/src/components/Map/Root/constants.d.ts +5 -0
- package/dist/src/components/Map/Root/constants.d.ts.map +1 -1
- package/dist/src/components/Map/Root/index.d.ts +0 -3
- package/dist/src/components/Map/Root/index.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.d.ts +3 -0
- package/dist/src/components/Map/index.d.ts.map +1 -1
- package/dist/src/components/Map/index.stories.d.ts +1 -1
- package/dist/src/components/Map/index.stories.d.ts.map +1 -1
- package/dist/src/components/Map/storybook-data.d.ts +1 -15
- package/dist/src/components/Map/storybook-data.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/index-B_LO5X9C.js +0 -46
- package/dist/index-DHw9gU4K.js +0 -29
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as a, jsxs as d, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import { C as h, M as l } from "./index-CXjxZmYt.js";
|
|
3
|
+
import { a as f } from "./logo-control-NE-LlsRy.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { c as g, i as M, b as t } from "./index-CY0to_1B.js";
|
|
6
|
+
function k({ clusters: o, onClick: e, children: p }) {
|
|
7
|
+
return o == null ? void 0 : o.map((r, m) => {
|
|
8
|
+
const i = r.geometry.coordinates[0], n = r.geometry.coordinates[1];
|
|
9
|
+
return /* @__PURE__ */ a(
|
|
10
|
+
f,
|
|
11
|
+
{
|
|
12
|
+
anchor: "bottom",
|
|
13
|
+
longitude: i,
|
|
14
|
+
latitude: n,
|
|
15
|
+
onClick: (s) => {
|
|
16
|
+
s.originalEvent.stopPropagation(), e == null || e(r);
|
|
17
|
+
},
|
|
18
|
+
children: /* @__PURE__ */ a("div", { className: g, "data-is-cluster": !!r.properties.cluster, children: r.properties.cluster ? /* @__PURE__ */ a(h, { cluster: r }) : /* @__PURE__ */ d(c, { children: [
|
|
19
|
+
/* @__PURE__ */ a("div", { className: M, children: r.properties.icon ? /* @__PURE__ */ a(r.properties.icon, { className: t }) : /* @__PURE__ */ a(l, { className: t }) }),
|
|
20
|
+
p
|
|
21
|
+
] }) })
|
|
22
|
+
},
|
|
23
|
+
`map-marker-${i}-${n}-${m}`
|
|
24
|
+
);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
k as default
|
|
29
|
+
};
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { jsxs as l, jsx as
|
|
1
|
+
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as c } from "react";
|
|
3
3
|
import { M as f, N as d, u as M } from "./logo-control-NE-LlsRy.js";
|
|
4
|
-
import { u as
|
|
5
|
-
const
|
|
6
|
-
const { current: t } = M(), { setBounds: e } =
|
|
4
|
+
import { u as s, d as o, a as h } from "./index-CY0to_1B.js";
|
|
5
|
+
const y = () => {
|
|
6
|
+
const { current: t } = M(), { setBounds: e } = s();
|
|
7
7
|
return c(() => {
|
|
8
8
|
t && e(t.getBounds().toArray().flat());
|
|
9
9
|
}, [t]), null;
|
|
10
10
|
};
|
|
11
|
-
function
|
|
11
|
+
function z({ children: t }) {
|
|
12
12
|
const {
|
|
13
13
|
mapProvider: e,
|
|
14
|
-
center:
|
|
14
|
+
center: i,
|
|
15
15
|
zoom: n = o.zoom,
|
|
16
16
|
pitch: p = o.pitch,
|
|
17
17
|
bearing: m = o.bearing,
|
|
18
18
|
cooperativeGestures: u = o.cooperativeGestures,
|
|
19
|
-
zoomPosition:
|
|
20
|
-
} =
|
|
19
|
+
zoomPosition: a
|
|
20
|
+
} = s();
|
|
21
21
|
return e.name !== "maptiler" ? null : /* @__PURE__ */ l(
|
|
22
22
|
f,
|
|
23
23
|
{
|
|
24
24
|
initialViewState: {
|
|
25
|
-
...
|
|
25
|
+
...i,
|
|
26
26
|
zoom: n,
|
|
27
27
|
pitch: p,
|
|
28
28
|
bearing: m
|
|
29
29
|
},
|
|
30
30
|
cooperativeGestures: u,
|
|
31
|
-
mapStyle: `https://api.maptiler.com/maps/${e.
|
|
31
|
+
mapStyle: `https://api.maptiler.com/maps/${e.theme || h.maptiler}/style.json?key=${e.apiKey}`,
|
|
32
32
|
children: [
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
|
|
33
|
+
/* @__PURE__ */ r(y, {}),
|
|
34
|
+
a && /* @__PURE__ */ r(d, { position: a }),
|
|
35
35
|
t
|
|
36
36
|
]
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
z as default
|
|
42
42
|
};
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { jsxs as g, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { useState as T, useEffect as M } from "react";
|
|
3
|
-
import { A as
|
|
4
|
-
import { u, d as n } from "./index-
|
|
5
|
-
const
|
|
6
|
-
"top-left":
|
|
7
|
-
"top-right":
|
|
8
|
-
"bottom-left":
|
|
9
|
-
"bottom-right":
|
|
10
|
-
},
|
|
11
|
-
const e =
|
|
3
|
+
import { A as h, M as C, C as s, u as O } from "./index.modern-EsUgbhzI.js";
|
|
4
|
+
import { u, d as n, a as P } from "./index-CY0to_1B.js";
|
|
5
|
+
const b = {
|
|
6
|
+
"top-left": s.LEFT_TOP,
|
|
7
|
+
"top-right": s.RIGHT_TOP,
|
|
8
|
+
"bottom-left": s.LEFT_BOTTOM,
|
|
9
|
+
"bottom-right": s.RIGHT_BOTTOM
|
|
10
|
+
}, I = ({ isMapLoaded: a }) => {
|
|
11
|
+
const e = O(), { setBounds: r } = u();
|
|
12
12
|
return M(() => {
|
|
13
13
|
var t;
|
|
14
|
-
if (!
|
|
14
|
+
if (!a || !e)
|
|
15
15
|
return;
|
|
16
16
|
const o = (t = e.getBounds()) == null ? void 0 : t.toJSON();
|
|
17
17
|
o && r([o.west, o.south, o.east, o.north]);
|
|
18
|
-
}, [
|
|
18
|
+
}, [a, e]), null;
|
|
19
19
|
};
|
|
20
|
-
function L({ children:
|
|
20
|
+
function L({ children: a }) {
|
|
21
21
|
const [e, r] = T(!1), {
|
|
22
22
|
mapProvider: o,
|
|
23
23
|
center: t,
|
|
24
24
|
zoom: p = n.zoom,
|
|
25
25
|
pitch: d = n.pitch,
|
|
26
26
|
bearing: f = n.bearing,
|
|
27
|
-
cooperativeGestures:
|
|
27
|
+
cooperativeGestures: m = n.cooperativeGestures,
|
|
28
28
|
zoomPosition: l
|
|
29
29
|
} = u();
|
|
30
30
|
if (o.name !== "google")
|
|
31
31
|
return null;
|
|
32
|
-
const
|
|
32
|
+
const c = () => {
|
|
33
33
|
r(!0);
|
|
34
34
|
};
|
|
35
|
-
return /* @__PURE__ */ g(
|
|
35
|
+
return /* @__PURE__ */ g(h, { apiKey: o.apiKey, children: [
|
|
36
36
|
/* @__PURE__ */ i(I, { isMapLoaded: e }),
|
|
37
37
|
/* @__PURE__ */ i(
|
|
38
|
-
|
|
38
|
+
C,
|
|
39
39
|
{
|
|
40
|
-
mapId: P,
|
|
40
|
+
mapId: o.theme || P.google,
|
|
41
41
|
defaultCenter: {
|
|
42
42
|
lat: t.latitude,
|
|
43
43
|
lng: t.longitude
|
|
@@ -45,16 +45,16 @@ function L({ children: s }) {
|
|
|
45
45
|
defaultZoom: p,
|
|
46
46
|
defaultTilt: d,
|
|
47
47
|
defaultHeading: f,
|
|
48
|
-
gestureHandling:
|
|
48
|
+
gestureHandling: m ? "cooperative" : "greedy",
|
|
49
49
|
streetViewControl: !1,
|
|
50
50
|
fullscreenControl: !1,
|
|
51
51
|
clickableIcons: !1,
|
|
52
52
|
mapTypeControl: !1,
|
|
53
53
|
zoomControlOptions: {
|
|
54
|
-
position: l &&
|
|
54
|
+
position: l && b[l]
|
|
55
55
|
},
|
|
56
|
-
onTilesLoaded:
|
|
57
|
-
children:
|
|
56
|
+
onTilesLoaded: c,
|
|
57
|
+
children: a
|
|
58
58
|
}
|
|
59
59
|
)
|
|
60
60
|
] });
|