@performant-software/geospatial 2.3.12-beta.4 → 2.3.12-beta.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.cjs14.js +1 -1
- package/dist/index.cjs15.js +1 -1
- package/dist/index.cjs16.js +1 -1
- package/dist/index.cjs183.js +1 -1
- package/dist/index.cjs183.js.map +1 -1
- package/dist/index.cjs184.js +1 -1
- package/dist/index.cjs184.js.map +1 -1
- package/dist/index.cjs185.js +4 -1
- package/dist/index.cjs185.js.map +1 -1
- package/dist/index.cjs186.js +1 -1
- package/dist/index.cjs186.js.map +1 -1
- package/dist/index.cjs187.js +1 -1
- package/dist/index.cjs187.js.map +1 -1
- package/dist/index.cjs188.js +1 -1
- package/dist/index.cjs188.js.map +1 -1
- package/dist/index.cjs189.js +1 -1
- package/dist/index.cjs189.js.map +1 -1
- package/dist/index.cjs19.js +1 -1
- package/dist/index.cjs190.js +1 -1
- package/dist/index.cjs190.js.map +1 -1
- package/dist/index.cjs191.js +1 -1
- package/dist/index.cjs191.js.map +1 -1
- package/dist/index.cjs192.js +1 -4
- package/dist/index.cjs192.js.map +1 -1
- package/dist/index.cjs193.js +1 -1
- package/dist/index.cjs193.js.map +1 -1
- package/dist/index.cjs194.js +1 -1
- package/dist/index.cjs194.js.map +1 -1
- package/dist/index.cjs195.js +1 -1
- package/dist/index.cjs195.js.map +1 -1
- package/dist/index.cjs196.js +1 -1
- package/dist/index.cjs196.js.map +1 -1
- package/dist/index.cjs197.js +1 -1
- package/dist/index.cjs197.js.map +1 -1
- package/dist/index.cjs198.js +1 -1
- package/dist/index.cjs198.js.map +1 -1
- package/dist/index.cjs199.js +1 -1
- package/dist/index.cjs199.js.map +1 -1
- package/dist/index.cjs200.js +1 -1
- package/dist/index.cjs200.js.map +1 -1
- package/dist/index.cjs201.js +1 -1
- package/dist/index.cjs201.js.map +1 -1
- package/dist/index.cjs202.js +1 -1
- package/dist/index.cjs202.js.map +1 -1
- package/dist/index.cjs203.js +1 -1
- package/dist/index.cjs203.js.map +1 -1
- package/dist/index.cjs204.js +1 -1
- package/dist/index.cjs204.js.map +1 -1
- package/dist/index.cjs208.js +1 -1
- package/dist/index.cjs209.js +1 -1
- package/dist/index.cjs210.js +1 -1
- package/dist/index.cjs228.js +1 -1
- package/dist/index.cjs233.js +1 -1
- package/dist/index.cjs236.js +1 -1
- package/dist/index.cjs236.js.map +1 -1
- package/dist/index.cjs237.js +1 -1
- package/dist/index.cjs237.js.map +1 -1
- package/dist/index.cjs239.js +1 -1
- package/dist/index.cjs242.js +1 -1
- package/dist/index.cjs248.js +1 -1
- package/dist/index.cjs254.js +1 -1
- package/dist/index.cjs259.js +1 -1
- package/dist/index.cjs52.js +1 -1
- package/dist/index.cjs56.js +1 -1
- package/dist/index.cjs58.js +1 -1
- package/dist/index.cjs62.js +1 -1
- package/dist/index.cjs63.js +1 -1
- package/dist/index.cjs67.js +1 -1
- package/dist/index.cjs67.js.map +1 -1
- package/dist/index.cjs68.js +1 -1
- package/dist/index.cjs68.js.map +1 -1
- package/dist/index.cjs69.js +1 -1
- package/dist/index.cjs69.js.map +1 -1
- package/dist/index.cjs70.js +1 -1
- package/dist/index.cjs70.js.map +1 -1
- package/dist/index.cjs71.js +1 -1
- package/dist/index.cjs71.js.map +1 -1
- package/dist/index.cjs72.js +1 -1
- package/dist/index.cjs72.js.map +1 -1
- package/dist/index.cjs73.js +1 -1
- package/dist/index.cjs73.js.map +1 -1
- package/dist/index.cjs74.js +1 -1
- package/dist/index.cjs74.js.map +1 -1
- package/dist/index.cjs75.js +1 -1
- package/dist/index.cjs75.js.map +1 -1
- package/dist/index.cjs76.js +1 -1
- package/dist/index.cjs76.js.map +1 -1
- package/dist/index.cjs77.js +1 -1
- package/dist/index.cjs77.js.map +1 -1
- package/dist/index.cjs78.js +1 -1
- package/dist/index.cjs78.js.map +1 -1
- package/dist/index.cjs79.js +1 -1
- package/dist/index.cjs79.js.map +1 -1
- package/dist/index.cjs80.js +1 -1
- package/dist/index.cjs80.js.map +1 -1
- package/dist/index.es14.js +1 -1
- package/dist/index.es15.js +8 -8
- package/dist/index.es16.js +1 -1
- package/dist/index.es183.js +7 -320
- package/dist/index.es183.js.map +1 -1
- package/dist/index.es184.js +144 -71
- package/dist/index.es184.js.map +1 -1
- package/dist/index.es185.js +12197 -3
- package/dist/index.es185.js.map +1 -1
- package/dist/index.es186.js +3 -18
- package/dist/index.es186.js.map +1 -1
- package/dist/index.es187.js +3 -13
- package/dist/index.es187.js.map +1 -1
- package/dist/index.es188.js +33 -28
- package/dist/index.es188.js.map +1 -1
- package/dist/index.es189.js +3 -7
- package/dist/index.es189.js.map +1 -1
- package/dist/index.es19.js +1 -1
- package/dist/index.es190.js +22 -7
- package/dist/index.es190.js.map +1 -1
- package/dist/index.es191.js +2 -150
- package/dist/index.es191.js.map +1 -1
- package/dist/index.es192.js +3 -12199
- package/dist/index.es192.js.map +1 -1
- package/dist/index.es193.js +0 -1
- package/dist/index.es193.js.map +1 -1
- package/dist/index.es194.js +34 -3
- package/dist/index.es194.js.map +1 -1
- package/dist/index.es195.js +13 -36
- package/dist/index.es195.js.map +1 -1
- package/dist/index.es196.js +16 -3
- package/dist/index.es196.js.map +1 -1
- package/dist/index.es197.js +8 -22
- package/dist/index.es197.js.map +1 -1
- package/dist/index.es198.js +323 -2
- package/dist/index.es198.js.map +1 -1
- package/dist/index.es199.js +77 -3
- package/dist/index.es199.js.map +1 -1
- package/dist/index.es200.js +5 -2
- package/dist/index.es200.js.map +1 -1
- package/dist/index.es201.js +15 -31
- package/dist/index.es201.js.map +1 -1
- package/dist/index.es202.js +11 -13
- package/dist/index.es202.js.map +1 -1
- package/dist/index.es203.js +30 -13
- package/dist/index.es203.js.map +1 -1
- package/dist/index.es204.js +4 -8
- package/dist/index.es204.js.map +1 -1
- package/dist/index.es208.js +1 -1
- package/dist/index.es209.js +1 -1
- package/dist/index.es210.js +1 -1
- package/dist/index.es228.js +1 -1
- package/dist/index.es233.js +1 -1
- package/dist/index.es236.js +6 -4
- package/dist/index.es236.js.map +1 -1
- package/dist/index.es237.js +4 -6
- package/dist/index.es237.js.map +1 -1
- package/dist/index.es239.js +1 -1
- package/dist/index.es242.js +1 -1
- package/dist/index.es248.js +2 -2
- package/dist/index.es254.js +1 -1
- package/dist/index.es259.js +2 -2
- package/dist/index.es52.js +4 -4
- package/dist/index.es56.js +1 -1
- package/dist/index.es58.js +11 -11
- package/dist/index.es60.js +2 -2
- package/dist/index.es62.js +1 -1
- package/dist/index.es63.js +1 -1
- package/dist/index.es66.js +2 -2
- package/dist/index.es67.js +27 -54
- package/dist/index.es67.js.map +1 -1
- package/dist/index.es68.js +56 -47
- package/dist/index.es68.js.map +1 -1
- package/dist/index.es69.js +46 -37
- package/dist/index.es69.js.map +1 -1
- package/dist/index.es70.js +38 -11
- package/dist/index.es70.js.map +1 -1
- package/dist/index.es71.js +10 -13
- package/dist/index.es71.js.map +1 -1
- package/dist/index.es72.js +14 -29
- package/dist/index.es72.js.map +1 -1
- package/dist/index.es73.js +29 -14
- package/dist/index.es73.js.map +1 -1
- package/dist/index.es74.js +13 -12
- package/dist/index.es74.js.map +1 -1
- package/dist/index.es75.js +13 -12
- package/dist/index.es75.js.map +1 -1
- package/dist/index.es76.js +51 -2
- package/dist/index.es76.js.map +1 -1
- package/dist/index.es77.js +65 -2
- package/dist/index.es77.js.map +1 -1
- package/dist/index.es78.js +10 -27
- package/dist/index.es78.js.map +1 -1
- package/dist/index.es79.js +2 -51
- package/dist/index.es79.js.map +1 -1
- package/dist/index.es80.js +2 -65
- package/dist/index.es80.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es72.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es72.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/
|
|
1
|
+
{"version":3,"file":"index.es72.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/fullscreen-control.js"],"sourcesContent":["import { useEffect, memo } from 'react';\nimport { applyReactStyle } from '../utils/apply-react-style';\nimport useControl from './use-control';\nfunction FullscreenControl(props) {\n const ctrl = useControl(({ mapLib }) => new mapLib.FullscreenControl({\n container: props.containerId && document.getElementById(props.containerId)\n }), { position: props.position });\n useEffect(() => {\n applyReactStyle(ctrl._controlContainer, props.style);\n }, [props.style]);\n return null;\n}\nexport default memo(FullscreenControl);\n//# sourceMappingURL=fullscreen-control.js.map"],"names":["FullscreenControl","props","ctrl","useControl","mapLib","useEffect","applyReactStyle","_FullscreenControl","memo"],"mappings":";;;AAGA,SAASA,EAAkBC,GAAO;AACxB,QAAAC,IAAOC,EAAW,CAAC,EAAE,QAAAC,QAAa,IAAIA,EAAO,kBAAkB;AAAA,IACjE,WAAWH,EAAM,eAAe,SAAS,eAAeA,EAAM,WAAW;AAAA,EAC5E,CAAA,GAAG,EAAE,UAAUA,EAAM,SAAU,CAAA;AAChC,SAAAI,EAAU,MAAM;AACI,IAAAC,EAAAJ,EAAK,mBAAmBD,EAAM,KAAK;AAAA,EAAA,GACpD,CAACA,EAAM,KAAK,CAAC,GACT;AACX;AACA,MAAeM,IAAAC,EAAKR,CAAiB;","x_google_ignoreList":[0]}
|
package/dist/index.es73.js
CHANGED
|
@@ -1,16 +1,31 @@
|
|
|
1
|
-
import { memo as
|
|
2
|
-
import { applyReactStyle as
|
|
3
|
-
import
|
|
4
|
-
function
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { memo as s, forwardRef as d, useRef as v, useImperativeHandle as _, useEffect as f } from "react";
|
|
2
|
+
import { applyReactStyle as p } from "./index.es202.js";
|
|
3
|
+
import m from "./index.es16.js";
|
|
4
|
+
function b(e, c) {
|
|
5
|
+
const a = v({ props: e }), l = m(({ mapLib: i }) => {
|
|
6
|
+
const n = new i.GeolocateControl(e), u = n._setupUI;
|
|
7
|
+
return n._setupUI = (t) => {
|
|
8
|
+
n._container.hasChildNodes() || u(t);
|
|
9
|
+
}, n.on("geolocate", (t) => {
|
|
10
|
+
var r, o;
|
|
11
|
+
(o = (r = a.current.props).onGeolocate) === null || o === void 0 || o.call(r, t);
|
|
12
|
+
}), n.on("error", (t) => {
|
|
13
|
+
var r, o;
|
|
14
|
+
(o = (r = a.current.props).onError) === null || o === void 0 || o.call(r, t);
|
|
15
|
+
}), n.on("outofmaxbounds", (t) => {
|
|
16
|
+
var r, o;
|
|
17
|
+
(o = (r = a.current.props).onOutOfMaxBounds) === null || o === void 0 || o.call(r, t);
|
|
18
|
+
}), n.on("trackuserlocationstart", (t) => {
|
|
19
|
+
var r, o;
|
|
20
|
+
(o = (r = a.current.props).onTrackUserLocationStart) === null || o === void 0 || o.call(r, t);
|
|
21
|
+
}), n.on("trackuserlocationend", (t) => {
|
|
22
|
+
var r, o;
|
|
23
|
+
(o = (r = a.current.props).onTrackUserLocationEnd) === null || o === void 0 || o.call(r, t);
|
|
24
|
+
}), n;
|
|
25
|
+
}, { position: e.position });
|
|
26
|
+
return a.current.props = e, _(c, () => l, []), f(() => {
|
|
27
|
+
p(l._container, e.style);
|
|
28
|
+
}, [e.style]), null;
|
|
11
29
|
}
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
s as default
|
|
15
|
-
};
|
|
30
|
+
s(d(b));
|
|
16
31
|
//# sourceMappingURL=index.es73.js.map
|
package/dist/index.es73.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es73.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/
|
|
1
|
+
{"version":3,"file":"index.es73.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/geolocate-control.js"],"sourcesContent":["import { useImperativeHandle, useRef, useEffect, forwardRef, memo } from 'react';\nimport { applyReactStyle } from '../utils/apply-react-style';\nimport useControl from './use-control';\nfunction GeolocateControl(props, ref) {\n const thisRef = useRef({ props });\n const ctrl = useControl(({ mapLib }) => {\n const gc = new mapLib.GeolocateControl(props);\n // Hack: fix GeolocateControl reuse\n // When using React strict mode, the component is mounted twice.\n // GeolocateControl's UI creation is asynchronous. Removing and adding it back causes the UI to be initialized twice.\n // @ts-expect-error private method\n const setupUI = gc._setupUI;\n // @ts-expect-error private method\n gc._setupUI = args => {\n if (!gc._container.hasChildNodes()) {\n setupUI(args);\n }\n };\n gc.on('geolocate', e => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onGeolocate) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n });\n gc.on('error', e => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onError) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n });\n gc.on('outofmaxbounds', e => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onOutOfMaxBounds) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n });\n gc.on('trackuserlocationstart', e => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onTrackUserLocationStart) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n });\n gc.on('trackuserlocationend', e => {\n var _a, _b;\n (_b = (_a = thisRef.current.props).onTrackUserLocationEnd) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n });\n return gc;\n }, { position: props.position });\n thisRef.current.props = props;\n useImperativeHandle(ref, () => ctrl, []);\n useEffect(() => {\n applyReactStyle(ctrl._container, props.style);\n }, [props.style]);\n return null;\n}\nexport default memo(forwardRef(GeolocateControl));\n//# sourceMappingURL=geolocate-control.js.map"],"names":["GeolocateControl","props","ref","thisRef","useRef","ctrl","useControl","mapLib","gc","setupUI","args","e","_a","_b","useImperativeHandle","useEffect","applyReactStyle","memo","forwardRef"],"mappings":";;;AAGA,SAASA,EAAiBC,GAAOC,GAAK;AAClC,QAAMC,IAAUC,EAAO,EAAE,OAAAH,EAAO,CAAA,GAC1BI,IAAOC,EAAW,CAAC,EAAE,QAAAC,QAAa;AACpC,UAAMC,IAAK,IAAID,EAAO,iBAAiBN,CAAK,GAKtCQ,IAAUD,EAAG;AAEnB,WAAA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X;AACegB,EAAKC,EAAWlB,CAAgB,CAAC;","x_google_ignoreList":[0]}
|
package/dist/index.es74.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { memo as
|
|
2
|
-
import { applyReactStyle as
|
|
3
|
-
import
|
|
4
|
-
function
|
|
5
|
-
const
|
|
1
|
+
import { memo as i, useEffect as e } from "react";
|
|
2
|
+
import { applyReactStyle as l } from "./index.es202.js";
|
|
3
|
+
import r from "./index.es16.js";
|
|
4
|
+
function a(t) {
|
|
5
|
+
const o = r(({ mapLib: n }) => new n.NavigationControl(t), {
|
|
6
6
|
position: t.position
|
|
7
|
-
})
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
a(i._container, o);
|
|
12
|
-
}, [o]), null;
|
|
7
|
+
});
|
|
8
|
+
return e(() => {
|
|
9
|
+
l(o._container, t.style);
|
|
10
|
+
}, [t.style]), null;
|
|
13
11
|
}
|
|
14
|
-
|
|
12
|
+
const s = i(a);
|
|
13
|
+
export {
|
|
14
|
+
s as default
|
|
15
|
+
};
|
|
15
16
|
//# sourceMappingURL=index.es74.js.map
|
package/dist/index.es74.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es74.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/
|
|
1
|
+
{"version":3,"file":"index.es74.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/navigation-control.js"],"sourcesContent":["import { useEffect, memo } from 'react';\nimport { applyReactStyle } from '../utils/apply-react-style';\nimport useControl from './use-control';\nfunction NavigationControl(props) {\n const ctrl = useControl(({ mapLib }) => new mapLib.NavigationControl(props), {\n position: props.position\n });\n useEffect(() => {\n applyReactStyle(ctrl._container, props.style);\n }, [props.style]);\n return null;\n}\nexport default memo(NavigationControl);\n//# sourceMappingURL=navigation-control.js.map"],"names":["NavigationControl","props","ctrl","useControl","mapLib","useEffect","applyReactStyle","_NavigationControl","memo"],"mappings":";;;AAGA,SAASA,EAAkBC,GAAO;AACxB,QAAAC,IAAOC,EAAW,CAAC,EAAE,QAAAC,QAAa,IAAIA,EAAO,kBAAkBH,CAAK,GAAG;AAAA,IACzE,UAAUA,EAAM;AAAA,EAAA,CACnB;AACD,SAAAI,EAAU,MAAM;AACI,IAAAC,EAAAJ,EAAK,YAAYD,EAAM,KAAK;AAAA,EAAA,GAC7C,CAACA,EAAM,KAAK,CAAC,GACT;AACX;AACA,MAAeM,IAAAC,EAAKR,CAAiB;","x_google_ignoreList":[0]}
|
package/dist/index.es75.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { memo as m, useRef as u, useEffect as l } from "react";
|
|
2
|
+
import { applyReactStyle as a } from "./index.es202.js";
|
|
3
|
+
import f from "./index.es16.js";
|
|
4
|
+
function r(t) {
|
|
5
|
+
const i = f(({ mapLib: c }) => new c.ScaleControl(t), {
|
|
6
|
+
position: t.position
|
|
7
|
+
}), n = u(t), e = n.current;
|
|
8
|
+
n.current = t;
|
|
9
|
+
const { style: o } = t;
|
|
10
|
+
return t.maxWidth !== void 0 && t.maxWidth !== e.maxWidth && (i.options.maxWidth = t.maxWidth), t.unit !== void 0 && t.unit !== e.unit && i.setUnit(t.unit), l(() => {
|
|
11
|
+
a(i._container, o);
|
|
12
|
+
}, [o]), null;
|
|
9
13
|
}
|
|
10
|
-
|
|
11
|
-
p as MountedMapsContext,
|
|
12
|
-
c as useMap
|
|
13
|
-
};
|
|
14
|
+
m(r);
|
|
14
15
|
//# sourceMappingURL=index.es75.js.map
|
package/dist/index.es75.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es75.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/
|
|
1
|
+
{"version":3,"file":"index.es75.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/scale-control.js"],"sourcesContent":["import { useEffect, useRef, memo } from 'react';\nimport { applyReactStyle } from '../utils/apply-react-style';\nimport useControl from './use-control';\nfunction ScaleControl(props) {\n const ctrl = useControl(({ mapLib }) => new mapLib.ScaleControl(props), {\n position: props.position\n });\n const propsRef = useRef(props);\n const prevProps = propsRef.current;\n propsRef.current = props;\n const { style } = props;\n if (props.maxWidth !== undefined && props.maxWidth !== prevProps.maxWidth) {\n ctrl.options.maxWidth = props.maxWidth;\n }\n if (props.unit !== undefined && props.unit !== prevProps.unit) {\n ctrl.setUnit(props.unit);\n }\n useEffect(() => {\n applyReactStyle(ctrl._container, style);\n }, [style]);\n return null;\n}\nexport default memo(ScaleControl);\n//# sourceMappingURL=scale-control.js.map"],"names":["ScaleControl","props","ctrl","useControl","mapLib","propsRef","useRef","prevProps","style","useEffect","applyReactStyle","memo"],"mappings":";;;AAGA,SAASA,EAAaC,GAAO;AACnB,QAAAC,IAAOC,EAAW,CAAC,EAAE,QAAAC,QAAa,IAAIA,EAAO,aAAaH,CAAK,GAAG;AAAA,IACpE,UAAUA,EAAM;AAAA,EAAA,CACnB,GACKI,IAAWC,EAAOL,CAAK,GACvBM,IAAYF,EAAS;AAC3B,EAAAA,EAAS,UAAUJ;AACb,QAAA,EAAE,OAAAO,EAAU,IAAAP;AAClB,SAAIA,EAAM,aAAa,UAAaA,EAAM,aAAaM,EAAU,aACxDL,EAAA,QAAQ,WAAWD,EAAM,WAE9BA,EAAM,SAAS,UAAaA,EAAM,SAASM,EAAU,QAChDL,EAAA,QAAQD,EAAM,IAAI,GAE3BQ,EAAU,MAAM;AACI,IAAAC,EAAAR,EAAK,YAAYM,CAAK;AAAA,EAAA,GACvC,CAACA,CAAK,CAAC,GACH;AACX;AACeG,EAAKX,CAAY;","x_google_ignoreList":[0]}
|
package/dist/index.es76.js
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
|
-
|
|
1
|
+
import { useContext as m, useRef as L, useState as g, useMemo as x, useEffect as h } from "react";
|
|
2
|
+
import { MapContext as b } from "./index.es68.js";
|
|
3
|
+
import d from "./index.es204.js";
|
|
4
|
+
import { deepEqual as l } from "./index.es203.js";
|
|
5
|
+
function k(t, e, a, o) {
|
|
6
|
+
if (d(a.id === o.id, "layer id changed"), d(a.type === o.type, "layer type changed"), a.type === "custom" || o.type === "custom")
|
|
7
|
+
return;
|
|
8
|
+
const { layout: r = {}, paint: i = {}, filter: y, minzoom: c, maxzoom: u, beforeId: s } = a;
|
|
9
|
+
if (s !== o.beforeId && t.moveLayer(e, s), r !== o.layout) {
|
|
10
|
+
const f = o.layout || {};
|
|
11
|
+
for (const n in r)
|
|
12
|
+
l(r[n], f[n]) || t.setLayoutProperty(e, n, r[n]);
|
|
13
|
+
for (const n in f)
|
|
14
|
+
r.hasOwnProperty(n) || t.setLayoutProperty(e, n, void 0);
|
|
15
|
+
}
|
|
16
|
+
if (i !== o.paint) {
|
|
17
|
+
const f = o.paint || {};
|
|
18
|
+
for (const n in i)
|
|
19
|
+
l(i[n], f[n]) || t.setPaintProperty(e, n, i[n]);
|
|
20
|
+
for (const n in f)
|
|
21
|
+
i.hasOwnProperty(n) || t.setPaintProperty(e, n, void 0);
|
|
22
|
+
}
|
|
23
|
+
l(y, o.filter) || t.setFilter(e, y), (c !== o.minzoom || u !== o.maxzoom) && t.setLayerZoomRange(e, c, u);
|
|
24
|
+
}
|
|
25
|
+
function z(t, e, a) {
|
|
26
|
+
if (t.style && t.style._loaded && (!("source" in a) || t.getSource(a.source))) {
|
|
27
|
+
const o = { ...a, id: e };
|
|
28
|
+
delete o.beforeId, t.addLayer(o, a.beforeId);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
let I = 0;
|
|
32
|
+
function S(t) {
|
|
33
|
+
const e = m(b).map.getMap(), a = L(t), [, o] = g(0), r = x(() => t.id || `jsx-layer-${I++}`, []);
|
|
34
|
+
if (h(() => {
|
|
35
|
+
if (e) {
|
|
36
|
+
const y = () => o((c) => c + 1);
|
|
37
|
+
return e.on("styledata", y), y(), () => {
|
|
38
|
+
e.off("styledata", y), e.style && e.style._loaded && e.getLayer(r) && e.removeLayer(r);
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}, [e]), e && e.style && e.getLayer(r))
|
|
42
|
+
try {
|
|
43
|
+
k(e, r, t, a.current);
|
|
44
|
+
} catch (y) {
|
|
45
|
+
console.warn(y);
|
|
46
|
+
}
|
|
47
|
+
else
|
|
48
|
+
z(e, r, t);
|
|
49
|
+
return a.current = t, null;
|
|
50
|
+
}
|
|
2
51
|
export {
|
|
3
|
-
|
|
52
|
+
S as default
|
|
4
53
|
};
|
|
5
54
|
//# sourceMappingURL=index.es76.js.map
|
package/dist/index.es76.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es76.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index.es76.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/layer.js"],"sourcesContent":["import { useContext, useEffect, useMemo, useState, useRef } from 'react';\nimport { MapContext } from './map';\nimport assert from '../utils/assert';\nimport { deepEqual } from '../utils/deep-equal';\n/* eslint-disable complexity, max-statements */\nfunction updateLayer(map, id, props, prevProps) {\n assert(props.id === prevProps.id, 'layer id changed');\n assert(props.type === prevProps.type, 'layer type changed');\n if (props.type === 'custom' || prevProps.type === 'custom') {\n return;\n }\n const { layout = {}, paint = {}, filter, minzoom, maxzoom, beforeId } = props;\n if (beforeId !== prevProps.beforeId) {\n map.moveLayer(id, beforeId);\n }\n if (layout !== prevProps.layout) {\n const prevLayout = prevProps.layout || {};\n for (const key in layout) {\n if (!deepEqual(layout[key], prevLayout[key])) {\n map.setLayoutProperty(id, key, layout[key]);\n }\n }\n for (const key in prevLayout) {\n if (!layout.hasOwnProperty(key)) {\n map.setLayoutProperty(id, key, undefined);\n }\n }\n }\n if (paint !== prevProps.paint) {\n const prevPaint = prevProps.paint || {};\n for (const key in paint) {\n if (!deepEqual(paint[key], prevPaint[key])) {\n map.setPaintProperty(id, key, paint[key]);\n }\n }\n for (const key in prevPaint) {\n if (!paint.hasOwnProperty(key)) {\n map.setPaintProperty(id, key, undefined);\n }\n }\n }\n if (!deepEqual(filter, prevProps.filter)) {\n map.setFilter(id, filter);\n }\n if (minzoom !== prevProps.minzoom || maxzoom !== prevProps.maxzoom) {\n map.setLayerZoomRange(id, minzoom, maxzoom);\n }\n}\nfunction createLayer(map, id, props) {\n // @ts-ignore\n if (map.style && map.style._loaded && (!('source' in props) || map.getSource(props.source))) {\n const options = { ...props, id };\n delete options.beforeId;\n // @ts-ignore\n map.addLayer(options, props.beforeId);\n }\n}\n/* eslint-enable complexity, max-statements */\nlet layerCounter = 0;\nfunction Layer(props) {\n const map = useContext(MapContext).map.getMap();\n const propsRef = useRef(props);\n const [, setStyleLoaded] = useState(0);\n const id = useMemo(() => props.id || `jsx-layer-${layerCounter++}`, []);\n useEffect(() => {\n if (map) {\n const forceUpdate = () => setStyleLoaded(version => version + 1);\n map.on('styledata', forceUpdate);\n forceUpdate();\n return () => {\n map.off('styledata', forceUpdate);\n // @ts-ignore\n if (map.style && map.style._loaded && map.getLayer(id)) {\n map.removeLayer(id);\n }\n };\n }\n return undefined;\n }, [map]);\n // @ts-ignore\n const layer = map && map.style && map.getLayer(id);\n if (layer) {\n try {\n updateLayer(map, id, props, propsRef.current);\n }\n catch (error) {\n console.warn(error); // eslint-disable-line\n }\n }\n else {\n createLayer(map, id, props);\n }\n // Store last rendered props\n propsRef.current = props;\n return null;\n}\nexport default Layer;\n//# sourceMappingURL=layer.js.map"],"names":["updateLayer","map","id","props","prevProps","assert","layout","paint","filter","minzoom","maxzoom","beforeId","prevLayout","key","deepEqual","prevPaint","createLayer","options","layerCounter","Layer","useContext","MapContext","propsRef","useRef","setStyleLoaded","useState","useMemo","useEffect","forceUpdate","version","error"],"mappings":";;;;AAKA,SAASA,EAAYC,GAAKC,GAAIC,GAAOC,GAAW;AAG5C,MAFAC,EAAOF,EAAM,O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AMc,IAAU,EAAE,GAAGd,GAAO,IAAAD,EAAG;AAC/B,WAAOe,EAAQ,UAEXhB,EAAA,SAASgB,GAASd,EAAM,QAAQ;AAAA,EACxC;AACJ;AAEA,IAAIe,IAAe;AACnB,SAASC,EAAMhB,GAAO;AAClB,QAAMF,IAAMmB,EAAWC,CAAU,EAAE,IAAI,OAAO,GACxCC,IAAWC,EAAOpB,CAAK,GACvB,GAAGqB,CAAc,IAAIC,EAAS,CAAC,GAC/BvB,IAAKwB,EAAQ,MAAMvB,EAAM,MAAM,aAAae,GAAc,IAAI,CAAA,CAAE;AAkBtE,MAjBAS,EAAU,MAAM;AACZ,QAAI1B,GAAK;AACL,YAAM2B,IAAc,MAAMJ,EAAe,CAAAK,MAAWA,IAAU,CAAC;AAC3D,aAAA5B,EAAA,GAAG,aAAa2B,CAAW,GACnBA,KACL,MAAM;AACL,QAAA3B,EAAA,IAAI,aAAa2B,CAAW,GAE5B3B,EAAI,SAASA,EAAI,MAAM,WAAWA,EAAI,SAASC,CAAE,KACjDD,EAAI,YAAYC,CAAE;AAAA,MACtB;AAAA,IAER;AAAA,EACO,GACR,CAACD,CAAG,CAAC,GAEMA,KAAOA,EAAI,SAASA,EAAI,SAASC,CAAE;AAEzC,QAAA;AACA,MAAAF,EAAYC,GAAKC,GAAIC,GAAOmB,EAAS,OAAO;AAAA,aAEzCQ,GAAO;AACV,cAAQ,KAAKA,CAAK;AAAA,IACtB;AAAA;AAGY,IAAAd,EAAAf,GAAKC,GAAIC,CAAK;AAG9B,SAAAmB,EAAS,UAAUnB,GACZ;AACX;","x_google_ignoreList":[0]}
|
package/dist/index.es77.js
CHANGED
|
@@ -1,5 +1,68 @@
|
|
|
1
|
-
|
|
1
|
+
import * as u from "react";
|
|
2
|
+
import { useContext as f, useRef as y, useState as m, useMemo as g, useEffect as S, cloneElement as h } from "react";
|
|
3
|
+
import { MapContext as C } from "./index.es68.js";
|
|
4
|
+
import s from "./index.es204.js";
|
|
5
|
+
import { deepEqual as v } from "./index.es203.js";
|
|
6
|
+
let x = 0;
|
|
7
|
+
function U(t, e, a) {
|
|
8
|
+
if (t.style && t.style._loaded) {
|
|
9
|
+
const n = { ...a };
|
|
10
|
+
return delete n.id, delete n.children, t.addSource(e, n), t.getSource(e);
|
|
11
|
+
}
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
function b(t, e, a) {
|
|
15
|
+
s(e.id === a.id, "source id changed"), s(e.type === a.type, "source type changed");
|
|
16
|
+
let n = "", r = 0;
|
|
17
|
+
for (const o in e)
|
|
18
|
+
o !== "children" && o !== "id" && !v(a[o], e[o]) && (n = o, r++);
|
|
19
|
+
if (!r)
|
|
20
|
+
return;
|
|
21
|
+
const l = e.type;
|
|
22
|
+
if (l === "geojson")
|
|
23
|
+
t.setData(e.data);
|
|
24
|
+
else if (l === "image")
|
|
25
|
+
t.updateImage({
|
|
26
|
+
url: e.url,
|
|
27
|
+
coordinates: e.coordinates
|
|
28
|
+
});
|
|
29
|
+
else if ("setCoordinates" in t && r === 1 && n === "coordinates")
|
|
30
|
+
t.setCoordinates(e.coordinates);
|
|
31
|
+
else if ("setUrl" in t)
|
|
32
|
+
switch (n) {
|
|
33
|
+
case "url":
|
|
34
|
+
t.setUrl(e.url);
|
|
35
|
+
break;
|
|
36
|
+
case "tiles":
|
|
37
|
+
t.setTiles(e.tiles);
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
else
|
|
41
|
+
console.warn(`Unable to update <Source> prop: ${n}`);
|
|
42
|
+
}
|
|
43
|
+
function R(t) {
|
|
44
|
+
const e = f(C).map.getMap(), a = y(t), [, n] = m(0), r = g(() => t.id || `jsx-source-${x++}`, []);
|
|
45
|
+
S(() => {
|
|
46
|
+
if (e) {
|
|
47
|
+
const o = () => setTimeout(() => n((i) => i + 1), 0);
|
|
48
|
+
return e.on("styledata", o), o(), () => {
|
|
49
|
+
var i;
|
|
50
|
+
if (e.off("styledata", o), e.style && e.style._loaded && e.getSource(r)) {
|
|
51
|
+
const c = (i = e.getStyle()) === null || i === void 0 ? void 0 : i.layers;
|
|
52
|
+
if (c)
|
|
53
|
+
for (const d of c)
|
|
54
|
+
d.source === r && e.removeLayer(d.id);
|
|
55
|
+
e.removeSource(r);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}, [e]);
|
|
60
|
+
let l = e && e.style && e.getSource(r);
|
|
61
|
+
return l ? b(l, t, a.current) : l = U(e, r, t), a.current = t, l && u.Children.map(t.children, (o) => o && h(o, {
|
|
62
|
+
source: r
|
|
63
|
+
})) || null;
|
|
64
|
+
}
|
|
2
65
|
export {
|
|
3
|
-
|
|
66
|
+
R as default
|
|
4
67
|
};
|
|
5
68
|
//# sourceMappingURL=index.es77.js.map
|
package/dist/index.es77.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es77.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index.es77.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/source.js"],"sourcesContent":["import * as React from 'react';\nimport { useContext, useEffect, useMemo, useState, useRef } from 'react';\nimport { cloneElement } from 'react';\nimport { MapContext } from './map';\nimport assert from '../utils/assert';\nimport { deepEqual } from '../utils/deep-equal';\nlet sourceCounter = 0;\nfunction createSource(map, id, props) {\n // @ts-ignore\n if (map.style && map.style._loaded) {\n const options = { ...props };\n delete options.id;\n delete options.children;\n // @ts-ignore\n map.addSource(id, options);\n return map.getSource(id);\n }\n return null;\n}\n/* eslint-disable complexity */\nfunction updateSource(source, props, prevProps) {\n assert(props.id === prevProps.id, 'source id changed');\n assert(props.type === prevProps.type, 'source type changed');\n let changedKey = '';\n let changedKeyCount = 0;\n for (const key in props) {\n if (key !== 'children' && key !== 'id' && !deepEqual(prevProps[key], props[key])) {\n changedKey = key;\n changedKeyCount++;\n }\n }\n if (!changedKeyCount) {\n return;\n }\n const type = props.type;\n if (type === 'geojson') {\n source.setData(props.data);\n }\n else if (type === 'image') {\n source.updateImage({\n url: props.url,\n coordinates: props.coordinates\n });\n }\n else if ('setCoordinates' in source && changedKeyCount === 1 && changedKey === 'coordinates') {\n source.setCoordinates(props.coordinates);\n }\n else if ('setUrl' in source) {\n // Added in 1.12.0:\n // vectorTileSource.setTiles\n // vectorTileSource.setUrl\n switch (changedKey) {\n case 'url':\n source.setUrl(props.url);\n break;\n case 'tiles':\n source.setTiles(props.tiles);\n break;\n default:\n }\n }\n else {\n // eslint-disable-next-line\n console.warn(`Unable to update <Source> prop: ${changedKey}`);\n }\n}\n/* eslint-enable complexity */\nfunction Source(props) {\n const map = useContext(MapContext).map.getMap();\n const propsRef = useRef(props);\n const [, setStyleLoaded] = useState(0);\n const id = useMemo(() => props.id || `jsx-source-${sourceCounter++}`, []);\n useEffect(() => {\n if (map) {\n /* global setTimeout */\n const forceUpdate = () => setTimeout(() => setStyleLoaded(version => version + 1), 0);\n map.on('styledata', forceUpdate);\n forceUpdate();\n return () => {\n var _a;\n map.off('styledata', forceUpdate);\n // @ts-ignore\n if (map.style && map.style._loaded && map.getSource(id)) {\n // Parent effects are destroyed before child ones, see\n // https://github.com/facebook/react/issues/16728\n // Source can only be removed after all child layers are removed\n const allLayers = (_a = map.getStyle()) === null || _a === void 0 ? void 0 : _a.layers;\n if (allLayers) {\n for (const layer of allLayers) {\n // @ts-ignore (2339) source does not exist on all layer types\n if (layer.source === id) {\n map.removeLayer(layer.id);\n }\n }\n }\n map.removeSource(id);\n }\n };\n }\n return undefined;\n }, [map]);\n // @ts-ignore\n let source = map && map.style && map.getSource(id);\n if (source) {\n updateSource(source, props, propsRef.current);\n }\n else {\n source = createSource(map, id, props);\n }\n propsRef.current = props;\n return ((source &&\n React.Children.map(props.children, child => child &&\n cloneElement(child, {\n source: id\n }))) ||\n null);\n}\nexport default Source;\n//# sourceMappingURL=source.js.map"],"names":["sourceCounter","createSource","map","id","props","options","updateSource","source","prevProps","assert","changedKey","changedKeyCount","key","deepEqual","type","Source","useContext","MapContext","propsRef","useRef","setStyleLoaded","useState","useMemo","useEffect","forceUpdate","version","_a","allLayers","layer","React","child","cloneElement"],"mappings":";;;;;AAMA,IAAIA,IAAgB;AACpB,SAASC,EAAaC,GAAKC,GAAIC,GAAO;AAElC,MAAIF,EAAI,SAASA,EAAI,MAAM,SAAS;AAC1B,UAAAG,IAAU,EAAE,GAAGD;AACrB,kBAAOC,EAAQ,IACf,OAAOA,EAAQ,UAEXH,EAAA,UAAUC,GAAIE,CAAO,GAClBH,EAAI,UAAUC,CAAE;AAAA,EAC3B;AACO,SAAA;AACX;AAEA,SAASG,EAAaC,GAAQH,GAAOI,GAAW;AAC5C,EAAAC,EAAOL,EAAM,OAAOI,EAAU,IAAI,mBAAmB,GACrDC,EAAOL,EAAM,SAASI,EAAU,MAAM,qBAAqB;AAC3D,MAAIE,IAAa,IACbC,IAAkB;AACtB,aAAWC,KAAOR;AACd,IAAIQ,MAAQ,cAAcA,MAAQ,QAAQ,CAACC,EAAUL,EAAUI,CAAG,GAAGR,EAAMQ,CAAG,CAAC,MAC9DF,IAAAE,GACbD;AAGR,MAAI,CAACA;AACD;AAEJ,QAAMG,IAAOV,EAAM;AACnB,MAAIU,MAAS;AACF,IAAAP,EAAA,QAAQH,EAAM,IAAI;AAAA,WAEpBU,MAAS;AACd,IAAAP,EAAO,YAAY;AAAA,MACf,KAAKH,EAAM;AAAA,MACX,aAAaA,EAAM;AAAA,IAAA,CACtB;AAAA,WAEI,oBAAoBG,KAAUI,MAAoB,KAAKD,MAAe;AACpE,IAAAH,EAAA,eAAeH,EAAM,WAAW;AAAA,WAElC,YAAYG;AAIjB,YAAQG,GAAY;AAAA,MAChB,KAAK;AACM,QAAAH,EAAA,OAAOH,EAAM,GAAG;AACvB;AAAA,MACJ,KAAK;AACM,QAAAG,EAAA,SAASH,EAAM,KAAK;AAC3B;AAAA,IAER;AAAA;AAIQ,YAAA,KAAK,mCAAmCM,CAAU,EAAE;AAEpE;AAEA,SAASK,EAAOX,G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
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
n && Object.defineProperty(r, t, n.get ? n : {
|
|
10
|
-
enumerable: !0,
|
|
11
|
-
get: () => e[t]
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }));
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import { useContext as n, useMemo as a } from "react";
|
|
3
|
+
import { MapContext as u } from "./index.es68.js";
|
|
4
|
+
const p = e.createContext(null);
|
|
5
|
+
function c() {
|
|
6
|
+
var o;
|
|
7
|
+
const r = (o = n(p)) === null || o === void 0 ? void 0 : o.maps, t = n(u);
|
|
8
|
+
return a(() => ({ ...r, current: t == null ? void 0 : t.map }), [r, t]);
|
|
17
9
|
}
|
|
18
|
-
var f = a.printMsg = function() {
|
|
19
|
-
console.log("This is a message from the demo package");
|
|
20
|
-
};
|
|
21
|
-
const p = /* @__PURE__ */ i({
|
|
22
|
-
__proto__: null,
|
|
23
|
-
default: a,
|
|
24
|
-
printMsg: f
|
|
25
|
-
}, [a]);
|
|
26
10
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
f as printMsg
|
|
11
|
+
p as MountedMapsContext,
|
|
12
|
+
c as useMap
|
|
30
13
|
};
|
|
31
14
|
//# sourceMappingURL=index.es78.js.map
|
package/dist/index.es78.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es78.js","sources":["../../../node_modules/
|
|
1
|
+
{"version":3,"file":"index.es78.js","sources":["../../../node_modules/react-map-gl/dist/esm/components/use-map.js"],"sourcesContent":["import * as React from 'react';\nimport { useState, useCallback, useMemo, useContext } from 'react';\nimport { MapContext } from './map';\nexport const MountedMapsContext = React.createContext(null);\nexport const MapProvider = props => {\n const [maps, setMaps] = useState({});\n const onMapMount = useCallback((map, id = 'default') => {\n setMaps(currMaps => {\n if (id === 'current') {\n throw new Error(\"'current' cannot be used as map id\");\n }\n if (currMaps[id]) {\n throw new Error(`Multiple maps with the same id: ${id}`);\n }\n return { ...currMaps, [id]: map };\n });\n }, []);\n const onMapUnmount = useCallback((id = 'default') => {\n setMaps(currMaps => {\n if (currMaps[id]) {\n const nextMaps = { ...currMaps };\n delete nextMaps[id];\n return nextMaps;\n }\n return currMaps;\n });\n }, []);\n return (React.createElement(MountedMapsContext.Provider, { value: {\n maps,\n onMapMount,\n onMapUnmount\n } }, props.children));\n};\nexport function useMap() {\n var _a;\n const maps = (_a = useContext(MountedMapsContext)) === null || _a === void 0 ? void 0 : _a.maps;\n const currentMap = useContext(MapContext);\n const mapsWithCurrent = useMemo(() => {\n return { ...maps, current: currentMap === null || currentMap === void 0 ? void 0 : currentMap.map };\n }, [maps, currentMap]);\n return mapsWithCurrent;\n}\n//# sourceMappingURL=use-map.js.map"],"names":["MountedMapsContext","React","useMap","_a","maps","useContext","currentMap","MapContext","useMemo"],"mappings":";;;AAGa,MAAAA,IAAqBC,EAAM,cAAc,IAAI;AA8BnD,SAASC,IAAS;AACjB,MAAAC;AACE,QAAAC,KAAQD,IAAKE,EAAWL,CAAkB,OAAO,QAAQG,MAAO,SAAS,SAASA,EAAG,MACrFG,IAAaD,EAAWE,CAAU;AAIjC,SAHiBC,EAAQ,OACrB,EAAE,GAAGJ,GAAM,SAASE,KAAe,OAAgC,SAASA,EAAW,IAAI,IACnG,CAACF,GAAME,CAAU,CAAC;AAEzB;","x_google_ignoreList":[0]}
|
package/dist/index.es79.js
CHANGED
|
@@ -1,54 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { MapContext as b } from "./index.es67.js";
|
|
3
|
-
import d from "./index.es189.js";
|
|
4
|
-
import { deepEqual as l } from "./index.es188.js";
|
|
5
|
-
function k(t, e, a, o) {
|
|
6
|
-
if (d(a.id === o.id, "layer id changed"), d(a.type === o.type, "layer type changed"), a.type === "custom" || o.type === "custom")
|
|
7
|
-
return;
|
|
8
|
-
const { layout: r = {}, paint: i = {}, filter: y, minzoom: c, maxzoom: u, beforeId: s } = a;
|
|
9
|
-
if (s !== o.beforeId && t.moveLayer(e, s), r !== o.layout) {
|
|
10
|
-
const f = o.layout || {};
|
|
11
|
-
for (const n in r)
|
|
12
|
-
l(r[n], f[n]) || t.setLayoutProperty(e, n, r[n]);
|
|
13
|
-
for (const n in f)
|
|
14
|
-
r.hasOwnProperty(n) || t.setLayoutProperty(e, n, void 0);
|
|
15
|
-
}
|
|
16
|
-
if (i !== o.paint) {
|
|
17
|
-
const f = o.paint || {};
|
|
18
|
-
for (const n in i)
|
|
19
|
-
l(i[n], f[n]) || t.setPaintProperty(e, n, i[n]);
|
|
20
|
-
for (const n in f)
|
|
21
|
-
i.hasOwnProperty(n) || t.setPaintProperty(e, n, void 0);
|
|
22
|
-
}
|
|
23
|
-
l(y, o.filter) || t.setFilter(e, y), (c !== o.minzoom || u !== o.maxzoom) && t.setLayerZoomRange(e, c, u);
|
|
24
|
-
}
|
|
25
|
-
function z(t, e, a) {
|
|
26
|
-
if (t.style && t.style._loaded && (!("source" in a) || t.getSource(a.source))) {
|
|
27
|
-
const o = { ...a, id: e };
|
|
28
|
-
delete o.beforeId, t.addLayer(o, a.beforeId);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
let I = 0;
|
|
32
|
-
function S(t) {
|
|
33
|
-
const e = m(b).map.getMap(), a = L(t), [, o] = g(0), r = x(() => t.id || `jsx-layer-${I++}`, []);
|
|
34
|
-
if (h(() => {
|
|
35
|
-
if (e) {
|
|
36
|
-
const y = () => o((c) => c + 1);
|
|
37
|
-
return e.on("styledata", y), y(), () => {
|
|
38
|
-
e.off("styledata", y), e.style && e.style._loaded && e.getLayer(r) && e.removeLayer(r);
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
}, [e]), e && e.style && e.getLayer(r))
|
|
42
|
-
try {
|
|
43
|
-
k(e, r, t, a.current);
|
|
44
|
-
} catch (y) {
|
|
45
|
-
console.warn(y);
|
|
46
|
-
}
|
|
47
|
-
else
|
|
48
|
-
z(e, r, t);
|
|
49
|
-
return a.current = t, null;
|
|
50
|
-
}
|
|
1
|
+
var r = {};
|
|
51
2
|
export {
|
|
52
|
-
|
|
3
|
+
r as __exports
|
|
53
4
|
};
|
|
54
5
|
//# sourceMappingURL=index.es79.js.map
|
package/dist/index.es79.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es79.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.es79.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index.es80.js
CHANGED
|
@@ -1,68 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { useContext as f, useRef as y, useState as m, useMemo as g, useEffect as S, cloneElement as h } from "react";
|
|
3
|
-
import { MapContext as C } from "./index.es67.js";
|
|
4
|
-
import s from "./index.es189.js";
|
|
5
|
-
import { deepEqual as v } from "./index.es188.js";
|
|
6
|
-
let x = 0;
|
|
7
|
-
function U(t, e, a) {
|
|
8
|
-
if (t.style && t.style._loaded) {
|
|
9
|
-
const n = { ...a };
|
|
10
|
-
return delete n.id, delete n.children, t.addSource(e, n), t.getSource(e);
|
|
11
|
-
}
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
function b(t, e, a) {
|
|
15
|
-
s(e.id === a.id, "source id changed"), s(e.type === a.type, "source type changed");
|
|
16
|
-
let n = "", r = 0;
|
|
17
|
-
for (const o in e)
|
|
18
|
-
o !== "children" && o !== "id" && !v(a[o], e[o]) && (n = o, r++);
|
|
19
|
-
if (!r)
|
|
20
|
-
return;
|
|
21
|
-
const l = e.type;
|
|
22
|
-
if (l === "geojson")
|
|
23
|
-
t.setData(e.data);
|
|
24
|
-
else if (l === "image")
|
|
25
|
-
t.updateImage({
|
|
26
|
-
url: e.url,
|
|
27
|
-
coordinates: e.coordinates
|
|
28
|
-
});
|
|
29
|
-
else if ("setCoordinates" in t && r === 1 && n === "coordinates")
|
|
30
|
-
t.setCoordinates(e.coordinates);
|
|
31
|
-
else if ("setUrl" in t)
|
|
32
|
-
switch (n) {
|
|
33
|
-
case "url":
|
|
34
|
-
t.setUrl(e.url);
|
|
35
|
-
break;
|
|
36
|
-
case "tiles":
|
|
37
|
-
t.setTiles(e.tiles);
|
|
38
|
-
break;
|
|
39
|
-
}
|
|
40
|
-
else
|
|
41
|
-
console.warn(`Unable to update <Source> prop: ${n}`);
|
|
42
|
-
}
|
|
43
|
-
function R(t) {
|
|
44
|
-
const e = f(C).map.getMap(), a = y(t), [, n] = m(0), r = g(() => t.id || `jsx-source-${x++}`, []);
|
|
45
|
-
S(() => {
|
|
46
|
-
if (e) {
|
|
47
|
-
const o = () => setTimeout(() => n((i) => i + 1), 0);
|
|
48
|
-
return e.on("styledata", o), o(), () => {
|
|
49
|
-
var i;
|
|
50
|
-
if (e.off("styledata", o), e.style && e.style._loaded && e.getSource(r)) {
|
|
51
|
-
const c = (i = e.getStyle()) === null || i === void 0 ? void 0 : i.layers;
|
|
52
|
-
if (c)
|
|
53
|
-
for (const d of c)
|
|
54
|
-
d.source === r && e.removeLayer(d.id);
|
|
55
|
-
e.removeSource(r);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
}, [e]);
|
|
60
|
-
let l = e && e.style && e.getSource(r);
|
|
61
|
-
return l ? b(l, t, a.current) : l = U(e, r, t), a.current = t, l && u.Children.map(t.children, (o) => o && h(o, {
|
|
62
|
-
source: r
|
|
63
|
-
})) || null;
|
|
64
|
-
}
|
|
1
|
+
var e = {};
|
|
65
2
|
export {
|
|
66
|
-
|
|
3
|
+
e as __exports
|
|
67
4
|
};
|
|
68
5
|
//# sourceMappingURL=index.es80.js.map
|
package/dist/index.es80.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es80.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.es80.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|