@local-logic/maps 0.0.23 → 0.0.24
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-BOZt1-DO.js +69 -0
- package/dist/{index-BrxP9NHZ.js → index-Buv9_Jj9.js} +3 -3
- package/dist/index-C3Tj3r2u.js +24 -0
- package/dist/index-C6a0FCIX.js +92 -0
- package/dist/index-CCS3Ef2w.js +92 -0
- package/dist/{index-CSVsF1EQ.js → index-CEDpofgZ.js} +1 -1
- package/dist/{index-BRD3rjLE.js → index-CIE9YlvM.js} +12 -12
- package/dist/index-CUUravWc.js +25 -0
- package/dist/index-CUvZ7gVt.js +98 -0
- package/dist/{index-CN_dNOir.js → index-Ct-3yYUx.js} +245 -217
- package/dist/index-DJx0avMT.js +75 -0
- package/dist/{index-B85VZGVP.js → index-DOkeQ2e4.js} +3 -3
- package/dist/{index-ufLC1PLO.js → index-DbyYOXrb.js} +16 -16
- package/dist/index-DntG4mBo.js +75 -0
- package/dist/{index-CFomI3Il.js → index-DscDx7HE.js} +14 -13
- package/dist/{index-DfhwDiOS.js → index-GGtrKiJn.js} +22 -22
- package/dist/index-Y5T20C1G.js +92 -0
- package/dist/{index-CiWKwaC4.js → index-eWv3le07.js} +7 -6
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +8 -3615
- package/dist/{logo-control-VgN6MEKI.js → logo-control-CHapR1Dt.js} +11 -11
- package/dist/{scale-control-jBKptTbw.js → scale-control-Dsir9fWY.js} +21 -21
- package/dist/src/components/Map/Root/BaseMap/Google/index.d.ts +1 -1
- 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 +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 +1 -1
- package/dist/src/components/Map/Root/BaseMap/Maptiler/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/BaseMap/index.d.ts +1 -1
- package/dist/src/components/Map/Root/BaseMap/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/BaseMap/types.d.ts +1 -10
- package/dist/src/components/Map/Root/BaseMap/types.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Markers/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Popup/Google/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Popup/Mapbox/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Popup/Maptiler/index.d.ts.map +1 -1
- package/dist/src/components/Map/Root/Popup/utils/index.d.ts +2 -0
- package/dist/src/components/Map/Root/Popup/utils/index.d.ts.map +1 -0
- package/dist/src/components/Map/Root/Popup/utils/moveIntoView/index.d.ts +21 -0
- package/dist/src/components/Map/Root/Popup/utils/moveIntoView/index.d.ts.map +1 -0
- package/dist/src/components/Map/Root/constants.d.ts +11 -2
- package/dist/src/components/Map/Root/constants.d.ts.map +1 -1
- package/dist/src/components/Map/Root/context.d.ts +6 -6
- 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/src/components/Map/Root/types.d.ts +9 -0
- package/dist/src/components/Map/Root/types.d.ts.map +1 -1
- package/dist/src/components/Map/index.stories.d.ts +9 -3
- package/dist/src/components/Map/index.stories.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/styles-BNaT0cTi.js +36 -0
- package/dist/{styles-BR85tnqI.js → styles-BhmqUA5C.js} +231 -266
- package/package.json +30 -10
- package/dist/IconBase.es-rM5tt24D.js +0 -48
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/index-BpFpg_5A.js +0 -78
- package/dist/index-CRdDPWou.js +0 -34
- package/dist/index-CceEGv05.js +0 -104
- package/dist/index-CmajMf1d.js +0 -109
- package/dist/index-D5kHxP9H.js +0 -43
- package/dist/index-DNNz78Rc.js +0 -24
- package/dist/index-Db33Ugg9.js +0 -34
- package/dist/index-arkRlpaR.js +0 -80
- package/dist/index-vHMPqmOL.js +0 -23
- package/dist/index.modern-B-ChKejQ.js +0 -914
- package/dist/mapbox-gl-C6frO4Gl.js +0 -34625
- package/dist/maplibre-gl-DkDrZ6rP.js +0 -21669
- package/dist/styles-ChFj97uV.js +0 -7
|
@@ -372,26 +372,26 @@ function ot(t, n) {
|
|
|
372
372
|
const e = M(j), [i, r] = G(null), o = E(), { current: s } = E({ mapLib: null, map: null });
|
|
373
373
|
l(() => {
|
|
374
374
|
const u = t.mapLib;
|
|
375
|
-
let w = !0,
|
|
376
|
-
return Promise.resolve(u || import("
|
|
375
|
+
let w = !0, d;
|
|
376
|
+
return Promise.resolve(u || import("maplibre-gl")).then((f) => {
|
|
377
377
|
if (!w)
|
|
378
378
|
return;
|
|
379
|
-
if (!
|
|
379
|
+
if (!f)
|
|
380
380
|
throw new Error("Invalid mapLib");
|
|
381
|
-
const m = "Map" in
|
|
381
|
+
const m = "Map" in f ? f : f.default;
|
|
382
382
|
if (!m.Map)
|
|
383
383
|
throw new Error("Invalid mapLib");
|
|
384
|
-
nt(m, t), t.reuseMaps && (
|
|
385
|
-
}).catch((
|
|
384
|
+
nt(m, t), t.reuseMaps && (d = x.reuse(t, o.current)), d || (d = new x(m.Map, t, o.current)), s.map = X(d), s.mapLib = m, r(d), e?.onMapMount(s.map, t.id);
|
|
385
|
+
}).catch((f) => {
|
|
386
386
|
const { onError: m } = t;
|
|
387
387
|
m ? m({
|
|
388
388
|
type: "error",
|
|
389
389
|
target: null,
|
|
390
390
|
originalEvent: null,
|
|
391
|
-
error:
|
|
392
|
-
}) : console.error(
|
|
391
|
+
error: f
|
|
392
|
+
}) : console.error(f);
|
|
393
393
|
}), () => {
|
|
394
|
-
w = !1,
|
|
394
|
+
w = !1, d && (e?.onMapUnmount(t.id), t.reuseMaps ? d.recycle() : d.destroy());
|
|
395
395
|
};
|
|
396
396
|
}, []), et(() => {
|
|
397
397
|
i && i.setProps(t);
|
|
@@ -463,12 +463,12 @@ const pt = p(T((t, n) => {
|
|
|
463
463
|
l(() => (o.addTo(e.getMap()), () => {
|
|
464
464
|
o.remove();
|
|
465
465
|
}), []);
|
|
466
|
-
const { longitude: s, latitude: a, offset: c, style: u, draggable: w = !1, popup:
|
|
466
|
+
const { longitude: s, latitude: a, offset: c, style: u, draggable: w = !1, popup: d = null, rotation: f = 0, rotationAlignment: m = "auto", pitchAlignment: k = "auto" } = t;
|
|
467
467
|
l(() => {
|
|
468
468
|
y(o.getElement(), u);
|
|
469
469
|
}, [u]), R(n, () => o, []);
|
|
470
470
|
const V = r.current.props;
|
|
471
|
-
(o.getLngLat().lng !== s || o.getLngLat().lat !== a) && o.setLngLat([s, a]), c && !$(o.getOffset(), c) && o.setOffset(c), o.isDraggable() !== w && o.setDraggable(w), o.getRotation() !==
|
|
471
|
+
(o.getLngLat().lng !== s || o.getLngLat().lat !== a) && o.setLngLat([s, a]), c && !$(o.getOffset(), c) && o.setOffset(c), o.isDraggable() !== w && o.setDraggable(w), o.getRotation() !== f && o.setRotation(f), o.getRotationAlignment() !== m && o.setRotationAlignment(m), o.getPitchAlignment() !== k && o.setPitchAlignment(k), o.getPopup() !== d && o.setPopup(d);
|
|
472
472
|
const z = H(V.className, t.className);
|
|
473
473
|
if (z)
|
|
474
474
|
for (const P of z)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as v from "react";
|
|
2
|
-
import { useContext as S, useMemo as E, useLayoutEffect as q, useEffect as
|
|
2
|
+
import { useContext as S, useMemo as E, useLayoutEffect as q, useEffect as f, useState as B, useRef as M, useImperativeHandle as F, memo as b, forwardRef as N } from "react";
|
|
3
3
|
import { createPortal as j } from "react-dom";
|
|
4
4
|
const $ = v.createContext(null);
|
|
5
5
|
function ve() {
|
|
@@ -498,7 +498,7 @@ function se(e) {
|
|
|
498
498
|
}
|
|
499
499
|
return Array.from(t);
|
|
500
500
|
}
|
|
501
|
-
const ae = typeof document < "u" ? q :
|
|
501
|
+
const ae = typeof document < "u" ? q : f, ce = [
|
|
502
502
|
"baseApiUrl",
|
|
503
503
|
"maxParallelImageRequests",
|
|
504
504
|
"workerClass",
|
|
@@ -516,25 +516,25 @@ function le(e, t) {
|
|
|
516
516
|
const T = v.createContext(null);
|
|
517
517
|
function ue(e, t) {
|
|
518
518
|
const o = S($), [i, n] = B(null), r = M(), { current: s } = M({ mapLib: null, map: null });
|
|
519
|
-
|
|
519
|
+
f(() => {
|
|
520
520
|
const l = e.mapLib;
|
|
521
521
|
let p = !0, u;
|
|
522
|
-
return Promise.resolve(l || import("
|
|
522
|
+
return Promise.resolve(l || import("mapbox-gl")).then((d) => {
|
|
523
523
|
if (!p)
|
|
524
524
|
return;
|
|
525
|
-
if (!
|
|
525
|
+
if (!d)
|
|
526
526
|
throw new Error("Invalid mapLib");
|
|
527
|
-
const m = "Map" in
|
|
527
|
+
const m = "Map" in d ? d : d.default;
|
|
528
528
|
if (!m.Map)
|
|
529
529
|
throw new Error("Invalid mapLib");
|
|
530
530
|
le(m, e), e.reuseMaps && (u = L.reuse(e, r.current)), u || (u = new L(m.Map, e, r.current)), s.map = ie(u), s.mapLib = m, n(u), o?.onMapMount(s.map, e.id);
|
|
531
|
-
}).catch((
|
|
531
|
+
}).catch((d) => {
|
|
532
532
|
const { onError: m } = e;
|
|
533
533
|
m ? m({
|
|
534
534
|
type: "error",
|
|
535
535
|
target: null,
|
|
536
|
-
error:
|
|
537
|
-
}) : console.error(
|
|
536
|
+
error: d
|
|
537
|
+
}) : console.error(d);
|
|
538
538
|
}), () => {
|
|
539
539
|
p = !1, u && (o?.onMapUnmount(e.id), e.reuseMaps ? u.recycle() : u.destroy());
|
|
540
540
|
};
|
|
@@ -605,15 +605,15 @@ const Ce = b(N((e, t) => {
|
|
|
605
605
|
g.lngLat = r.getLngLat(), n.current.props.onDragEnd?.(g);
|
|
606
606
|
}), _;
|
|
607
607
|
}, []);
|
|
608
|
-
|
|
608
|
+
f(() => (r.addTo(o.getMap()), () => {
|
|
609
609
|
r.remove();
|
|
610
610
|
}), []);
|
|
611
|
-
const { longitude: s, latitude: a, offset: c, style: l, draggable: p = !1, popup: u = null, rotation:
|
|
612
|
-
|
|
611
|
+
const { longitude: s, latitude: a, offset: c, style: l, draggable: p = !1, popup: u = null, rotation: d = 0, rotationAlignment: m = "auto", pitchAlignment: z = "auto" } = e;
|
|
612
|
+
f(() => {
|
|
613
613
|
C(r.getElement(), l);
|
|
614
614
|
}, [l]), F(t, () => r, []);
|
|
615
615
|
const W = n.current.props;
|
|
616
|
-
(r.getLngLat().lng !== s || r.getLngLat().lat !== a) && r.setLngLat([s, a]), c && !ee(r.getOffset(), c) && r.setOffset(c), r.isDraggable() !== p && r.setDraggable(p), r.getRotation() !==
|
|
616
|
+
(r.getLngLat().lng !== s || r.getLngLat().lat !== a) && r.setLngLat([s, a]), c && !ee(r.getOffset(), c) && r.setOffset(c), r.isDraggable() !== p && r.setDraggable(p), r.getRotation() !== d && r.setRotation(d), r.getRotationAlignment() !== m && r.setRotationAlignment(m), r.getPitchAlignment() !== z && r.setPitchAlignment(z), r.getPopup() !== u && r.setPopup(u);
|
|
617
617
|
const R = V(W.className, e.className);
|
|
618
618
|
if (R)
|
|
619
619
|
for (const w of R)
|
|
@@ -626,14 +626,14 @@ const Ce = b(N((e, t) => {
|
|
|
626
626
|
r.current.props.onOpen?.(l);
|
|
627
627
|
}), c;
|
|
628
628
|
}, []);
|
|
629
|
-
if (
|
|
629
|
+
if (f(() => {
|
|
630
630
|
const a = (c) => {
|
|
631
631
|
r.current.props.onClose?.(c);
|
|
632
632
|
};
|
|
633
633
|
return s.on("close", a), s.setDOMContent(n).addTo(o.getMap()), () => {
|
|
634
634
|
s.off("close", a), s.isOpen() && s.remove();
|
|
635
635
|
};
|
|
636
|
-
}, []),
|
|
636
|
+
}, []), f(() => {
|
|
637
637
|
C(s.getElement(), e.style);
|
|
638
638
|
}, [e.style]), F(t, () => s, []), s.isOpen()) {
|
|
639
639
|
const a = r.current.props;
|
|
@@ -648,7 +648,7 @@ const Ce = b(N((e, t) => {
|
|
|
648
648
|
}));
|
|
649
649
|
function x(e, t, o, i) {
|
|
650
650
|
const n = S(T), r = E(() => e(n), []);
|
|
651
|
-
return
|
|
651
|
+
return f(() => {
|
|
652
652
|
const s = t, a = null, c = typeof t == "function" ? t : null, { map: l } = n;
|
|
653
653
|
return l.hasControl(r) || (l.addControl(r, s?.position), a && a(n)), () => {
|
|
654
654
|
c && c(n), l.hasControl(r) && l.removeControl(r);
|
|
@@ -659,7 +659,7 @@ function de(e) {
|
|
|
659
659
|
const t = x(({ mapLib: o }) => new o.AttributionControl(e), {
|
|
660
660
|
position: e.position
|
|
661
661
|
});
|
|
662
|
-
return
|
|
662
|
+
return f(() => {
|
|
663
663
|
C(t._container, e.style);
|
|
664
664
|
}, [e.style]), null;
|
|
665
665
|
}
|
|
@@ -668,7 +668,7 @@ function me(e) {
|
|
|
668
668
|
const t = x(({ mapLib: o }) => new o.FullscreenControl({
|
|
669
669
|
container: e.containerId && document.getElementById(e.containerId)
|
|
670
670
|
}), { position: e.position });
|
|
671
|
-
return
|
|
671
|
+
return f(() => {
|
|
672
672
|
C(t._controlContainer, e.style);
|
|
673
673
|
}, [e.style]), null;
|
|
674
674
|
}
|
|
@@ -690,7 +690,7 @@ function he(e, t) {
|
|
|
690
690
|
o.current.props.onTrackUserLocationEnd?.(a);
|
|
691
691
|
}), r;
|
|
692
692
|
}, { position: e.position });
|
|
693
|
-
return o.current.props = e, F(t, () => i, []),
|
|
693
|
+
return o.current.props = e, F(t, () => i, []), f(() => {
|
|
694
694
|
C(i._container, e.style);
|
|
695
695
|
}, [e.style]), null;
|
|
696
696
|
}
|
|
@@ -699,7 +699,7 @@ function ge(e) {
|
|
|
699
699
|
const t = x(({ mapLib: o }) => new o.NavigationControl(e), {
|
|
700
700
|
position: e.position
|
|
701
701
|
});
|
|
702
|
-
return
|
|
702
|
+
return f(() => {
|
|
703
703
|
C(t._container, e.style);
|
|
704
704
|
}, [e.style]), null;
|
|
705
705
|
}
|
|
@@ -710,7 +710,7 @@ function ye(e) {
|
|
|
710
710
|
}), o = M(e), i = o.current;
|
|
711
711
|
o.current = e;
|
|
712
712
|
const { style: n } = e;
|
|
713
|
-
return e.maxWidth !== void 0 && e.maxWidth !== i.maxWidth && (t.options.maxWidth = e.maxWidth), e.unit !== void 0 && e.unit !== i.unit && t.setUnit(e.unit),
|
|
713
|
+
return e.maxWidth !== void 0 && e.maxWidth !== i.maxWidth && (t.options.maxWidth = e.maxWidth), e.unit !== void 0 && e.unit !== i.unit && t.setUnit(e.unit), f(() => {
|
|
714
714
|
C(t._container, n);
|
|
715
715
|
}, [n]), null;
|
|
716
716
|
}
|
|
@@ -7,5 +7,5 @@ import { BaseMapProps } from '../types';
|
|
|
7
7
|
* Map styles:
|
|
8
8
|
* https://console.cloud.google.com/google/maps-apis/studio/styles?project=engineering-internal-396021
|
|
9
9
|
*/
|
|
10
|
-
export default function GoogleBaseMap({
|
|
10
|
+
export default function GoogleBaseMap({ children }: BaseMapProps): React.JSX.Element | null;
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Map/Root/BaseMap/Google/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
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;AA+E7C;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,YAAY,4BAyD/D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { BaseMapProps } from '../types';
|
|
3
|
-
export default function MapboxBaseMap({
|
|
3
|
+
export default function MapboxBaseMap({ children }: BaseMapProps): React.JSX.Element | null;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Map/Root/BaseMap/Mapbox/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
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;AAStB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AA0E7C,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,YAAY,4BAqC/D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { BaseMapProps } from '../types';
|
|
3
|
-
export default function MaptilerBaseMap({
|
|
3
|
+
export default function MaptilerBaseMap({ children }: BaseMapProps): React.JSX.Element | null;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Map/Root/BaseMap/Maptiler/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
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;AAStB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAsE7C,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAE,QAAQ,EAAE,EAAE,YAAY,4BAmCjE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { BaseMapProps } from './types';
|
|
3
|
-
export declare const BaseMap: ({
|
|
3
|
+
export declare const BaseMap: ({ children }: BaseMapProps) => React.JSX.Element;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Map/Root/BaseMap/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AAKvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAQ5C,eAAO,MAAM,OAAO,GAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Map/Root/BaseMap/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AAKvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAQ5C,eAAO,MAAM,OAAO,GAAI,cAAc,YAAY,sBA4CjD,CAAC"}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
1
|
import { RootProps } from '../types';
|
|
2
|
-
type
|
|
3
|
-
top: number;
|
|
4
|
-
bottom: number;
|
|
5
|
-
left: number;
|
|
6
|
-
right: number;
|
|
7
|
-
};
|
|
8
|
-
export type BaseMapProps = Pick<RootProps, "children"> & {
|
|
9
|
-
padding?: MarkerBoundsPadding | number;
|
|
10
|
-
};
|
|
11
|
-
export {};
|
|
2
|
+
export type BaseMapProps = Pick<RootProps, "children">;
|
|
12
3
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Map/Root/BaseMap/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Map/Root/BaseMap/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Map/Root/Markers/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Map/Root/Markers/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAQhE,OAAO,KAAK,EAAE,WAAW,EAA6C,MAAM,SAAS,CAAC;AActF,wBAAgB,OAAO,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,WAAW,4BAoHjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Map/Root/Popup/Google/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Map/Root/Popup/Google/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAOjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAI3C,OAAO,aAAa,CAAC;AAGrB,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,QAAQ,EACR,SAAS,EACT,MAAiB,EACjB,OAAO,EACP,QAAQ,GACT,EAAE,UAAU,4BA8JZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Map/Root/Popup/Mapbox/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Map/Root/Popup/Mapbox/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AASjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,aAAa,CAAC;AAGrB,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,QAAQ,EACR,SAAS,EACT,MAAM,EACN,MAAiB,EACjB,OAAO,EACP,QAAQ,GACT,EAAE,UAAU,4BA4IZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Map/Root/Popup/Maptiler/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Map/Root/Popup/Maptiler/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AASjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,aAAa,CAAC;AAGrB,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,QAAQ,EACR,SAAS,EACT,MAAM,EACN,MAAiB,EACjB,OAAO,EACP,QAAQ,GACT,EAAE,UAAU,4BA4IZ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Map/Root/Popup/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MapPadding } from '../../../types';
|
|
2
|
+
type Bounds = {
|
|
3
|
+
left: number;
|
|
4
|
+
right: number;
|
|
5
|
+
top: number;
|
|
6
|
+
bottom: number;
|
|
7
|
+
};
|
|
8
|
+
export declare function moveIntoView(element: DOMRect, center: {
|
|
9
|
+
latitude: number;
|
|
10
|
+
longitude: number;
|
|
11
|
+
}, bounds: Bounds, canvas: {
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
top?: number;
|
|
15
|
+
left?: number;
|
|
16
|
+
}, padding: MapPadding, callback: (center: {
|
|
17
|
+
latitude: number;
|
|
18
|
+
longitude: number;
|
|
19
|
+
}) => void): void;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Map/Root/Popup/utils/moveIntoView/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD,KAAK,MAAM,GAAG;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAgB,YAAY,CAC1B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,EAC/C,MAAM,EAAE,MAAM,EACd,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,EACtE,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,CAAC,MAAM,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,KAAK,IAAI,QA0DpE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { BBox } from 'geojson';
|
|
2
|
+
export declare const DEFAULT_MAP_VALUES: {
|
|
2
3
|
zoom: number;
|
|
3
4
|
pitch: number;
|
|
4
5
|
bearing: number;
|
|
@@ -6,14 +7,22 @@ export declare const defaultMapValues: {
|
|
|
6
7
|
minZoom: number;
|
|
7
8
|
maxZoom: number;
|
|
8
9
|
};
|
|
9
|
-
export declare const
|
|
10
|
+
export declare const DEFAULT_MAP_THEMES: {
|
|
10
11
|
maptiler: string;
|
|
11
12
|
mapbox: string;
|
|
12
13
|
google: string;
|
|
13
14
|
};
|
|
15
|
+
export declare const DEFAULT_MAP_PADDING: {
|
|
16
|
+
top: number;
|
|
17
|
+
bottom: number;
|
|
18
|
+
left: number;
|
|
19
|
+
right: number;
|
|
20
|
+
};
|
|
14
21
|
export declare const MIN_CLUSTER_ZOOM = 13;
|
|
15
22
|
export declare const MAX_CLUSTER_ZOOM = 22;
|
|
16
23
|
export declare const MIN_ZOOM_ICON_DISPLAY = 12.5;
|
|
17
24
|
export declare const CLUSTER_RADIUS = 30;
|
|
18
25
|
export declare const GOOGLE_CLUSTER_RADIUS = 60;
|
|
26
|
+
export declare const POPUP_MIN_RESIZE_THRESHOLD_PX = 15;
|
|
27
|
+
export declare const WORLD_BOUNDS: BBox;
|
|
19
28
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Root/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Root/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEpC,eAAO,MAAM,kBAAkB;;;;;;;CAO9B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;CAI9B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;CAK/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAC1C,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAChD,eAAO,MAAM,YAAY,EAAE,IAAqC,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { RootProps } from './types';
|
|
2
|
+
import { RootProps, MapPadding, ClusterPoint } from './types';
|
|
4
3
|
export type DefaultContext = RootProps & {
|
|
4
|
+
mapPadding: MapPadding;
|
|
5
|
+
zoom: number;
|
|
6
|
+
setZoom: (zoom: number) => void;
|
|
5
7
|
activeMarker?: RootProps["activeMarker"];
|
|
6
8
|
markerPoints?: number[][];
|
|
7
9
|
setMarkerPoints: (points: number[][]) => void;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
zoom: number;
|
|
11
|
-
setZoom: (zoom: number) => void;
|
|
10
|
+
clusterPoints?: ClusterPoint[];
|
|
11
|
+
setClusterPoints: (points: ClusterPoint[]) => void;
|
|
12
12
|
};
|
|
13
13
|
declare const RootElementContext: React.Context<DefaultContext>;
|
|
14
14
|
declare const useRootElement: () => DefaultContext;
|
|
@@ -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,
|
|
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,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnE,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG;IACvC,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,YAAY,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACzC,YAAY,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,eAAe,EAAE,CAAC,MAAM,EAAE,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,qBAqBpC;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"}
|
|
@@ -9,6 +9,12 @@ export type MapProvider = {
|
|
|
9
9
|
name: "maptiler" | "google" | "mapbox";
|
|
10
10
|
theme?: string;
|
|
11
11
|
};
|
|
12
|
+
export type MapPadding = {
|
|
13
|
+
top: number;
|
|
14
|
+
bottom: number;
|
|
15
|
+
left: number;
|
|
16
|
+
right: number;
|
|
17
|
+
};
|
|
12
18
|
export type Coordinates = {
|
|
13
19
|
latitude: number;
|
|
14
20
|
longitude: number;
|
|
@@ -22,9 +28,12 @@ export type Marker = {
|
|
|
22
28
|
icon?: Icon;
|
|
23
29
|
defaultColor?: boolean;
|
|
24
30
|
disableClick?: boolean;
|
|
31
|
+
markers?: Marker[];
|
|
25
32
|
};
|
|
33
|
+
export type ClusterPoint = supercluster.PointFeature<Marker> | supercluster.PointFeature<supercluster.ClusterProperties & supercluster.AnyProps>;
|
|
26
34
|
export type RootProps = {
|
|
27
35
|
mapProvider: MapProvider;
|
|
36
|
+
mapPadding?: MapPadding;
|
|
28
37
|
activeMarker?: Marker;
|
|
29
38
|
center: Coordinates;
|
|
30
39
|
zoom?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Root/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAElD;;;GAGG;AAEH,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;AAErF,MAAM,MAAM,MAAM,GAAG;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAClC,SAAS,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Root/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAElD;;;GAGG;AAEH,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;AAErF,MAAM,MAAM,MAAM,GAAG;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAClC,SAAS,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,YAAY,GACpB,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,GACjC,YAAY,CAAC,YAAY,CAAC,YAAY,CAAC,iBAAiB,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;AAEtF,MAAM,MAAM,SAAS,GAAG;IACtB,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC"}
|
|
@@ -2,7 +2,13 @@ import { Meta } from '@storybook/react';
|
|
|
2
2
|
import { RootProps } from '.';
|
|
3
3
|
declare const _default: Meta<RootProps>;
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const Maptiler: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, RootProps
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export declare const Maptiler: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, RootProps & {
|
|
6
|
+
visualizeMapPadding: boolean;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const Mapbox: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, RootProps & {
|
|
9
|
+
visualizeMapPadding: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const Google: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, RootProps & {
|
|
12
|
+
visualizeMapPadding: boolean;
|
|
13
|
+
}>;
|
|
8
14
|
//# sourceMappingURL=index.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Map/index.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAW,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAIjD,OAAO,KAAK,EAAE,SAAS,EAAe,MAAM,GAAG,CAAC;wBAO3C,IAAI,CAAC,SAAS,CAAC;AAJpB,wBAIqB;
|
|
1
|
+
{"version":3,"file":"index.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Map/index.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAW,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAIjD,OAAO,KAAK,EAAE,SAAS,EAAe,MAAM,GAAG,CAAC;wBAO3C,IAAI,CAAC,SAAS,CAAC;AAJpB,wBAIqB;AA0IrB,eAAO,MAAM,QAAQ;yBA9HsC,OAAO;EA8HzB,CAAC;AAU1C,eAAO,MAAM,MAAM;yBAxIwC,OAAO;EAwI3B,CAAC;AAUxC,eAAO,MAAM,MAAM;yBAlJwC,OAAO;EAkJ3B,CAAC"}
|