@local-logic/maps 0.1.5 → 0.1.6
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-BP_m_WyV.js → index-B13R2TUm.js} +45 -45
- package/dist/index-B2t_G7DM.js +109 -0
- package/dist/{index-D49Xw0s2.js → index-BL4YTPcp.js} +2 -2
- package/dist/{index-aSBXZLeP.js → index-BTgWiuFg.js} +2 -2
- package/dist/{index-DBgzG__6.js → index-BpXydeNl.js} +2 -2
- package/dist/{index-Caot5InX.js → index-BqhW6lBz.js} +50 -50
- package/dist/{index-Bp7Yr6DA.js → index-D9mXgSxJ.js} +2 -2
- package/dist/{index-Cz1bOBd_.js → index-DFGiNPbe.js} +1 -1
- package/dist/{index-DQ1iIFTk.js → index-DM-Ih4p_.js} +2 -2
- package/dist/{index-Bx7faHOu.js → index-Oeg9DKq8.js} +1 -1
- package/dist/{index-Bbgg2AcG.js → index-eyFsWhYO.js} +136 -127
- package/dist/{index-DsyoZEsZ.js → index-qum6AMNP.js} +2 -2
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +9 -9
- 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/Maptiler/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/CenterPin/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/context.d.ts +2 -0
- package/dist/src/components/Map/Root/context.d.ts.map +1 -1
- package/dist/src/components/Map/Root/index.d.ts.map +1 -1
- package/dist/{styles-C0jAgOTJ.js → styles-BPYm8pR9.js} +1 -1
- package/package.json +1 -1
- package/dist/index-wmShBScF.js +0 -109
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Map/Root/BaseMap/Google/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAWxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Map/Root/BaseMap/Google/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAWxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AA4F7C;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,YAAY,4BAqF/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Map/Root/BaseMap/Mapbox/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAGxE,OAAO,8BAA8B,CAAC;AACtC,OAAO,cAAc,CAAC;AAQtB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Map/Root/BaseMap/Mapbox/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAGxE,OAAO,8BAA8B,CAAC;AACtC,OAAO,cAAc,CAAC;AAQtB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AA4F7C,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,YAAY,4BAuC/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Map/Root/BaseMap/Maptiler/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAGxE,OAAO,kCAAkC,CAAC;AAC1C,OAAO,cAAc,CAAC;AAQtB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Map/Root/BaseMap/Maptiler/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAGxE,OAAO,kCAAkC,CAAC;AAC1C,OAAO,cAAc,CAAC;AAQtB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAwF7C,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAE,QAAQ,EAAE,EAAE,YAAY,4BAqCjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Map/Root/CenterPin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Map/Root/CenterPin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAGlE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAO9C,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,4BAwC9C"}
|
|
@@ -5,6 +5,8 @@ export type DefaultContext = RootProps & {
|
|
|
5
5
|
locale: "en" | "fr";
|
|
6
6
|
zoom: number;
|
|
7
7
|
setZoom: (zoom: number) => void;
|
|
8
|
+
centerPinMarkerPoints?: number[];
|
|
9
|
+
setCenterPinMarkerPoints: (points: number[] | undefined) => void;
|
|
8
10
|
markerPoints?: number[][];
|
|
9
11
|
setMarkerPoints: (points: number[][]) => void;
|
|
10
12
|
clusterPoints?: ClusterPoint[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Root/context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE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AE,MAAM,EAAE,EAAE,KAAK,IAAI,CAAC;IAC9C,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,gBAAgB,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;CACpD,CAAC;AAEF,QAAA,MAAM,kBAAkB,+BAA4D,CAAC;AACrF,QAAA,MAAM,cAAc,sBAAuC,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Root/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIzC,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Root/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIzC,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,qBA6BpC;AAED,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
package/package.json
CHANGED
package/dist/index-wmShBScF.js
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { jsx as P, jsxs as x, Fragment as A } from "react/jsx-runtime";
|
|
2
|
-
import { useState as v, useEffect as L, useRef as C, useCallback as E } from "react";
|
|
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-Bbgg2AcG.js";
|
|
5
|
-
import { t as R } from "./index-DscDx7HE.js";
|
|
6
|
-
const F = {
|
|
7
|
-
"top-left": g.LEFT_TOP,
|
|
8
|
-
"top-right": g.RIGHT_TOP,
|
|
9
|
-
"bottom-left": g.LEFT_BOTTOM,
|
|
10
|
-
"bottom-right": g.RIGHT_BOTTOM
|
|
11
|
-
}, D = ({ isMapLoaded: T }) => {
|
|
12
|
-
const e = G(), { markerPoints: s, locationBoundary: a, setZoom: p, mapPadding: r } = B(), [t, y] = v(void 0), i = C(void 0), u = E(() => {
|
|
13
|
-
if (!e)
|
|
14
|
-
return;
|
|
15
|
-
const o = e.getZoom();
|
|
16
|
-
typeof o < "u" && p(o + 1);
|
|
17
|
-
}, [e, p]);
|
|
18
|
-
return L(() => {
|
|
19
|
-
u();
|
|
20
|
-
const o = e?.addListener("zoom_changed", u);
|
|
21
|
-
return () => {
|
|
22
|
-
o?.remove();
|
|
23
|
-
};
|
|
24
|
-
}, [e, u]), L(() => {
|
|
25
|
-
if (!e)
|
|
26
|
-
return;
|
|
27
|
-
const o = [];
|
|
28
|
-
typeof s < "u" && s.length > 0 ? o.push(...s) : o.push(...a || []);
|
|
29
|
-
const n = o.length === 0 ? f : R(I(o));
|
|
30
|
-
(!i.current || !n.every((d, l) => d === i.current?.[l])) && (i.current = n, y(n));
|
|
31
|
-
}, [e, s, a]), L(() => {
|
|
32
|
-
if (!e || typeof t > "u")
|
|
33
|
-
return;
|
|
34
|
-
const [o, n, d, l] = t, c = (d - o) * 0.05 || 1e-3, m = (l - n) * 0.05 || 1e-3;
|
|
35
|
-
e.fitBounds(
|
|
36
|
-
{
|
|
37
|
-
south: n - m,
|
|
38
|
-
west: o - c,
|
|
39
|
-
north: l + m,
|
|
40
|
-
east: d + c
|
|
41
|
-
},
|
|
42
|
-
r
|
|
43
|
-
);
|
|
44
|
-
}, [T, e, t, r]), null;
|
|
45
|
-
};
|
|
46
|
-
function j({ children: T }) {
|
|
47
|
-
const [e, s] = v(!1), [a, p] = v(!1), {
|
|
48
|
-
mapProvider: r,
|
|
49
|
-
mapPadding: t,
|
|
50
|
-
locale: y,
|
|
51
|
-
center: i,
|
|
52
|
-
zoom: u = h.zoom,
|
|
53
|
-
minZoom: o,
|
|
54
|
-
maxZoom: n,
|
|
55
|
-
pitch: d = h.pitch,
|
|
56
|
-
bearing: l = h.bearing,
|
|
57
|
-
cooperativeGestures: c = h.cooperativeGestures,
|
|
58
|
-
zoomPosition: m
|
|
59
|
-
} = B();
|
|
60
|
-
if (L(() => {
|
|
61
|
-
if (!a)
|
|
62
|
-
return;
|
|
63
|
-
const M = document.querySelector(".gm-style-moc");
|
|
64
|
-
M && t && (M.style.paddingLeft = `${t.left}px`, M.style.paddingRight = `${t.right}px`);
|
|
65
|
-
}, [a, t?.left, t?.right]), r.name !== "google")
|
|
66
|
-
return null;
|
|
67
|
-
const _ = () => {
|
|
68
|
-
s(!0);
|
|
69
|
-
}, b = () => {
|
|
70
|
-
p(!0);
|
|
71
|
-
};
|
|
72
|
-
return /* @__PURE__ */ P(O, { apiKey: r.apiKey, language: y, onLoad: _, children: e && /* @__PURE__ */ x(A, { children: [
|
|
73
|
-
/* @__PURE__ */ P(D, { isMapLoaded: a }),
|
|
74
|
-
/* @__PURE__ */ P(
|
|
75
|
-
z,
|
|
76
|
-
{
|
|
77
|
-
mapId: r.theme || Z.google,
|
|
78
|
-
defaultCenter: {
|
|
79
|
-
lat: i.latitude,
|
|
80
|
-
lng: i.longitude
|
|
81
|
-
},
|
|
82
|
-
defaultBounds: {
|
|
83
|
-
north: f[3],
|
|
84
|
-
south: f[1],
|
|
85
|
-
east: f[2],
|
|
86
|
-
west: f[0]
|
|
87
|
-
},
|
|
88
|
-
defaultZoom: u + 1,
|
|
89
|
-
defaultTilt: d,
|
|
90
|
-
defaultHeading: l,
|
|
91
|
-
gestureHandling: c ? "cooperative" : "greedy",
|
|
92
|
-
streetViewControl: !1,
|
|
93
|
-
fullscreenControl: !1,
|
|
94
|
-
clickableIcons: !1,
|
|
95
|
-
mapTypeControl: !1,
|
|
96
|
-
zoomControlOptions: {
|
|
97
|
-
position: m && F[m]
|
|
98
|
-
},
|
|
99
|
-
minZoom: typeof o == "number" ? o + 1 : void 0,
|
|
100
|
-
maxZoom: typeof n == "number" ? n + 1 : void 0,
|
|
101
|
-
onTilesLoaded: b,
|
|
102
|
-
children: T
|
|
103
|
-
}
|
|
104
|
-
)
|
|
105
|
-
] }) });
|
|
106
|
-
}
|
|
107
|
-
export {
|
|
108
|
-
j as default
|
|
109
|
-
};
|