@performant-software/geospatial 3.0.6-beta.2 → 3.0.6-beta.3
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.cjs19.js +1 -1
- package/dist/index.cjs199.js +1 -1
- package/dist/index.cjs209.js +1 -1
- package/dist/index.cjs210.js +1 -1
- package/dist/index.cjs211.js +1 -1
- package/dist/index.cjs229.js +1 -1
- package/dist/index.cjs234.js +1 -1
- package/dist/index.cjs234.js.map +1 -1
- package/dist/index.cjs235.js +1 -1
- package/dist/index.cjs235.js.map +1 -1
- package/dist/index.cjs237.js +1 -1
- package/dist/index.cjs237.js.map +1 -1
- package/dist/index.cjs238.js +1 -1
- package/dist/index.cjs238.js.map +1 -1
- package/dist/index.cjs246.js +1 -1
- package/dist/index.cjs251.js +1 -1
- package/dist/index.cjs254.js +1 -1
- package/dist/index.cjs258.js +1 -1
- package/dist/index.cjs258.js.map +1 -1
- package/dist/index.cjs259.js +1 -1
- package/dist/index.cjs259.js.map +1 -1
- package/dist/index.cjs63.js +1 -1
- package/dist/index.cjs64.js +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.cjs81.js +1 -1
- package/dist/index.cjs81.js.map +1 -1
- package/dist/index.es14.js +1 -1
- package/dist/index.es15.js +3 -3
- package/dist/index.es19.js +1 -1
- package/dist/index.es199.js +2 -2
- package/dist/index.es209.js +1 -1
- package/dist/index.es210.js +1 -1
- package/dist/index.es211.js +1 -1
- package/dist/index.es229.js +1 -1
- package/dist/index.es234.js +44 -6
- package/dist/index.es234.js.map +1 -1
- package/dist/index.es235.js +22 -5
- package/dist/index.es235.js.map +1 -1
- package/dist/index.es237.js +6 -44
- package/dist/index.es237.js.map +1 -1
- package/dist/index.es238.js +5 -22
- package/dist/index.es238.js.map +1 -1
- package/dist/index.es246.js +1 -1
- package/dist/index.es251.js +1 -1
- package/dist/index.es254.js +1 -1
- package/dist/index.es258.js +4 -15
- package/dist/index.es258.js.map +1 -1
- package/dist/index.es259.js +15 -4
- package/dist/index.es259.js.map +1 -1
- package/dist/index.es61.js +2 -2
- package/dist/index.es63.js +1 -1
- package/dist/index.es64.js +1 -1
- package/dist/index.es67.js +2 -2
- package/dist/index.es77.js +2 -28
- package/dist/index.es77.js.map +1 -1
- package/dist/index.es78.js +2 -51
- package/dist/index.es78.js.map +1 -1
- package/dist/index.es79.js +25 -62
- package/dist/index.es79.js.map +1 -1
- package/dist/index.es80.js +51 -2
- package/dist/index.es80.js.map +1 -1
- package/dist/index.es81.js +65 -2
- package/dist/index.es81.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es237.js
CHANGED
|
@@ -1,49 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function r(n, o) {
|
|
7
|
-
if (!n.getProjection)
|
|
8
|
-
return;
|
|
9
|
-
const i = n.getProjection(), e = o.getProjection();
|
|
10
|
-
c(i, e) || o.setProjection(i);
|
|
11
|
-
}
|
|
12
|
-
function d(n) {
|
|
13
|
-
return {
|
|
14
|
-
longitude: n.center.lng,
|
|
15
|
-
latitude: n.center.lat,
|
|
16
|
-
zoom: n.zoom,
|
|
17
|
-
pitch: n.pitch,
|
|
18
|
-
bearing: n.bearing,
|
|
19
|
-
padding: n.padding
|
|
1
|
+
import { MAX_ARRAY_INDEX as o } from "./index.es24.js";
|
|
2
|
+
function u(e) {
|
|
3
|
+
return function(t) {
|
|
4
|
+
var r = e(t);
|
|
5
|
+
return typeof r == "number" && r >= 0 && r <= o;
|
|
20
6
|
};
|
|
21
7
|
}
|
|
22
|
-
function s(n, o) {
|
|
23
|
-
const i = o.viewState || o;
|
|
24
|
-
let e = !1;
|
|
25
|
-
if ("longitude" in i && "latitude" in i) {
|
|
26
|
-
const t = n.center;
|
|
27
|
-
n.center = new t.constructor(i.longitude, i.latitude), e = e || t !== n.center;
|
|
28
|
-
}
|
|
29
|
-
if ("zoom" in i) {
|
|
30
|
-
const t = n.zoom;
|
|
31
|
-
n.zoom = i.zoom, e = e || t !== n.zoom;
|
|
32
|
-
}
|
|
33
|
-
if ("bearing" in i) {
|
|
34
|
-
const t = n.bearing;
|
|
35
|
-
n.bearing = i.bearing, e = e || t !== n.bearing;
|
|
36
|
-
}
|
|
37
|
-
if ("pitch" in i) {
|
|
38
|
-
const t = n.pitch;
|
|
39
|
-
n.pitch = i.pitch, e = e || t !== n.pitch;
|
|
40
|
-
}
|
|
41
|
-
return i.padding && !n.isPaddingEqual(i.padding) && (e = !0, n.padding = i.padding), e;
|
|
42
|
-
}
|
|
43
8
|
export {
|
|
44
|
-
|
|
45
|
-
g as cloneTransform,
|
|
46
|
-
r as syncProjection,
|
|
47
|
-
d as transformToViewState
|
|
9
|
+
u as default
|
|
48
10
|
};
|
|
49
11
|
//# sourceMappingURL=index.es237.js.map
|
package/dist/index.es237.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es237.js","sources":["../../../node_modules/
|
|
1
|
+
{"version":3,"file":"index.es237.js","sources":["../../../node_modules/underscore/modules/_createSizePropertyCheck.js"],"sourcesContent":["import { MAX_ARRAY_INDEX } from './_setup.js';\n\n// Common internal logic for `isArrayLike` and `isBufferLike`.\nexport default function createSizePropertyCheck(getSizeProperty) {\n return function(collection) {\n var sizeProperty = getSizeProperty(collection);\n return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;\n }\n}\n"],"names":["createSizePropertyCheck","getSizeProperty","collection","sizeProperty","MAX_ARRAY_INDEX"],"mappings":";AAGA,SAAwBA,EAAwBC,GAAiB;AAC/D,SAAO,SAASC,GAAY;AACtB,QAAAC,IAAeF,EAAgBC,CAAU;AAC7C,WAAO,OAAOC,KAAgB,YAAYA,KAAgB,KAAKA,KAAgBC;AAAA,EAAA;AAEnF;","x_google_ignoreList":[0]}
|
package/dist/index.es238.js
CHANGED
|
@@ -1,26 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (typeof r == "string" || ("toJS" in r && (r = r.toJS()), !r.layers))
|
|
6
|
-
return r;
|
|
7
|
-
const t = {};
|
|
8
|
-
for (const e of r.layers)
|
|
9
|
-
t[e.id] = e;
|
|
10
|
-
const f = r.layers.map((e) => {
|
|
11
|
-
let n = null;
|
|
12
|
-
"interactive" in e && (n = Object.assign({}, e), delete n.interactive);
|
|
13
|
-
const o = t[e.ref];
|
|
14
|
-
if (o) {
|
|
15
|
-
n = n || Object.assign({}, e), delete n.ref;
|
|
16
|
-
for (const i of a)
|
|
17
|
-
i in o && (n[i] = o[i]);
|
|
18
|
-
}
|
|
19
|
-
return n || e;
|
|
20
|
-
});
|
|
21
|
-
return { ...r, layers: f };
|
|
1
|
+
function t(r) {
|
|
2
|
+
return function(n) {
|
|
3
|
+
return n == null ? void 0 : n[r];
|
|
4
|
+
};
|
|
22
5
|
}
|
|
23
6
|
export {
|
|
24
|
-
|
|
7
|
+
t as default
|
|
25
8
|
};
|
|
26
9
|
//# sourceMappingURL=index.es238.js.map
|
package/dist/index.es238.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es238.js","sources":["../../../node_modules/
|
|
1
|
+
{"version":3,"file":"index.es238.js","sources":["../../../node_modules/underscore/modules/_shallowProperty.js"],"sourcesContent":["// Internal helper to generate a function to obtain property `key` from `obj`.\nexport default function shallowProperty(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n}\n"],"names":["shallowProperty","key","obj"],"mappings":"AACA,SAAwBA,EAAgBC,GAAK;AAC3C,SAAO,SAASC,GAAK;AACnB,WAAOA,KAAO,OAAO,SAASA,EAAID,CAAG;AAAA,EAAA;AAEzC;","x_google_ignoreList":[0]}
|
package/dist/index.es246.js
CHANGED
package/dist/index.es251.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cartesian as Q, cartesianCross as T, cartesianDot as R, cartesianScale as g, cartesianAddInPlace as y, spherical as U } from "./index.es241.js";
|
|
2
2
|
import { circleStream as $ } from "./index.es240.js";
|
|
3
3
|
import { pi as v, cos as F, epsilon as x, abs as G, sqrt as b } from "./index.es242.js";
|
|
4
|
-
import J from "./index.
|
|
4
|
+
import J from "./index.es258.js";
|
|
5
5
|
import m from "./index.es260.js";
|
|
6
6
|
function fn(S, V) {
|
|
7
7
|
var A = F(S), C = A > 0, W = G(A) > x;
|
package/dist/index.es254.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import c from "./index.es256.js";
|
|
2
|
-
import n from "./index.
|
|
2
|
+
import n from "./index.es259.js";
|
|
3
3
|
function S(l, a, r) {
|
|
4
4
|
var f = a[1][0] - a[0][0], m = a[1][1] - a[0][1], i = l.clipExtent && l.clipExtent();
|
|
5
5
|
l.scale(150).translate([0, 0]), i != null && l.clipExtent(null), c(r, l.stream(n));
|
package/dist/index.es258.js
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import r from "./index.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
lineStart: r,
|
|
5
|
-
lineEnd: r,
|
|
6
|
-
polygonStart: r,
|
|
7
|
-
polygonEnd: r,
|
|
8
|
-
result: function() {
|
|
9
|
-
var n = [[o, f], [t, a]];
|
|
10
|
-
return t = a = -(f = o = 1 / 0), n;
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
function u(n, i) {
|
|
14
|
-
n < o && (o = n), n > t && (t = n), i < f && (f = i), i > a && (a = i);
|
|
1
|
+
import { abs as n, epsilon as r } from "./index.es242.js";
|
|
2
|
+
function i(o, t) {
|
|
3
|
+
return n(o[0] - t[0]) < r && n(o[1] - t[1]) < r;
|
|
15
4
|
}
|
|
16
5
|
export {
|
|
17
|
-
|
|
6
|
+
i as default
|
|
18
7
|
};
|
|
19
8
|
//# sourceMappingURL=index.es258.js.map
|
package/dist/index.es258.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es258.js","sources":["../../../node_modules/d3-geo/src/
|
|
1
|
+
{"version":3,"file":"index.es258.js","sources":["../../../node_modules/d3-geo/src/pointEqual.js"],"sourcesContent":["import {abs, epsilon} from \"./math\";\n\nexport default function(a, b) {\n return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n"],"names":["pointEqual","a","b","abs","epsilon"],"mappings":";AAEA,SAAAA,EAAwBC,GAAGC,GAAG;AAC5B,SAAOC,EAAIF,EAAE,CAAC,IAAIC,EAAE,CAAC,CAAC,IAAIE,KAAWD,EAAIF,EAAE,CAAC,IAAIC,EAAE,CAAC,CAAC,IAAIE;AAC1D;","x_google_ignoreList":[0]}
|
package/dist/index.es259.js
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import r from "./index.es257.js";
|
|
2
|
+
var o = 1 / 0, f = o, t = -o, a = t, d = {
|
|
3
|
+
point: u,
|
|
4
|
+
lineStart: r,
|
|
5
|
+
lineEnd: r,
|
|
6
|
+
polygonStart: r,
|
|
7
|
+
polygonEnd: r,
|
|
8
|
+
result: function() {
|
|
9
|
+
var n = [[o, f], [t, a]];
|
|
10
|
+
return t = a = -(f = o = 1 / 0), n;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
function u(n, i) {
|
|
14
|
+
n < o && (o = n), n > t && (t = n), i < f && (f = i), i > a && (a = i);
|
|
4
15
|
}
|
|
5
16
|
export {
|
|
6
|
-
|
|
17
|
+
d as default
|
|
7
18
|
};
|
|
8
19
|
//# sourceMappingURL=index.es259.js.map
|
package/dist/index.es259.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es259.js","sources":["../../../node_modules/d3-geo/src/
|
|
1
|
+
{"version":3,"file":"index.es259.js","sources":["../../../node_modules/d3-geo/src/path/bounds.js"],"sourcesContent":["import noop from \"../noop\";\n\nvar x0 = Infinity,\n y0 = x0,\n x1 = -x0,\n y1 = x1;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop,\n result: function() {\n var bounds = [[x0, y0], [x1, y1]];\n x1 = y1 = -(y0 = x0 = Infinity);\n return bounds;\n }\n};\n\nfunction boundsPoint(x, y) {\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n"],"names":["x0","y0","x1","y1","boundsStream","boundsPoint","noop","bounds","x","y"],"mappings":";AAEA,IAAIA,IAAK,OACLC,IAAKD,GACLE,IAAK,CAACF,GACNG,IAAKD,GAELE,IAAe;AAAA,EACjB,OAAOC;AAAA,EACP,WAAWC;AAAA,EACX,SAASA;AAAA,EACT,cAAcA;AAAA,EACd,YAAYA;AAAA,EACZ,QAAQ,WAAW;AACb,QAAAC,IAAS,CAAC,CAACP,GAAIC,CAAE,GAAG,CAACC,GAAIC,CAAE,CAAC;AAC3B,WAAAD,IAAAC,IAAK,EAAEF,IAAKD,IAAK,QACfO;AAAA,EACT;AACF;AAEA,SAASF,EAAYG,GAAGC,GAAG;AACzB,EAAID,IAAIR,MAASA,IAAAQ,IACbA,IAAIN,MAASA,IAAAM,IACbC,IAAIR,MAASA,IAAAQ,IACbA,IAAIN,MAASA,IAAAM;AACnB;","x_google_ignoreList":[0]}
|
package/dist/index.es61.js
CHANGED
package/dist/index.es63.js
CHANGED
package/dist/index.es64.js
CHANGED
package/dist/index.es67.js
CHANGED
package/dist/index.es77.js
CHANGED
|
@@ -1,31 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
function i(r, s) {
|
|
3
|
-
for (var o = 0; o < s.length; o++) {
|
|
4
|
-
const e = s[o];
|
|
5
|
-
if (typeof e != "string" && !Array.isArray(e)) {
|
|
6
|
-
for (const t in e)
|
|
7
|
-
if (t !== "default" && !(t in r)) {
|
|
8
|
-
const n = Object.getOwnPropertyDescriptor(e, t);
|
|
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" }));
|
|
17
|
-
}
|
|
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]);
|
|
1
|
+
var r = {};
|
|
26
2
|
export {
|
|
27
|
-
|
|
28
|
-
p as i,
|
|
29
|
-
f as printMsg
|
|
3
|
+
r as __exports
|
|
30
4
|
};
|
|
31
5
|
//# sourceMappingURL=index.es77.js.map
|
package/dist/index.es77.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es77.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.es77.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index.es78.js
CHANGED
|
@@ -1,54 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { MapContext as b } from "./index.es68.js";
|
|
3
|
-
import d from "./index.es205.js";
|
|
4
|
-
import { deepEqual as l } from "./index.es204.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 e = {};
|
|
51
2
|
export {
|
|
52
|
-
|
|
3
|
+
e as __exports
|
|
53
4
|
};
|
|
54
5
|
//# sourceMappingURL=index.es78.js.map
|
package/dist/index.es78.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es78.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.es78.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index.es79.js
CHANGED
|
@@ -1,68 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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);
|
|
1
|
+
import { __exports as a } from "./index.es206.js";
|
|
2
|
+
function i(r, s) {
|
|
3
|
+
for (var o = 0; o < s.length; o++) {
|
|
4
|
+
const e = s[o];
|
|
5
|
+
if (typeof e != "string" && !Array.isArray(e)) {
|
|
6
|
+
for (const t in e)
|
|
7
|
+
if (t !== "default" && !(t in r)) {
|
|
8
|
+
const n = Object.getOwnPropertyDescriptor(e, t);
|
|
9
|
+
n && Object.defineProperty(r, t, n.get ? n : {
|
|
10
|
+
enumerable: !0,
|
|
11
|
+
get: () => e[t]
|
|
12
|
+
});
|
|
56
13
|
}
|
|
57
|
-
};
|
|
58
14
|
}
|
|
59
|
-
}
|
|
60
|
-
|
|
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;
|
|
15
|
+
}
|
|
16
|
+
return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }));
|
|
64
17
|
}
|
|
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]);
|
|
65
26
|
export {
|
|
66
|
-
|
|
27
|
+
a as default,
|
|
28
|
+
p as i,
|
|
29
|
+
f as printMsg
|
|
67
30
|
};
|
|
68
31
|
//# sourceMappingURL=index.es79.js.map
|
package/dist/index.es79.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es79.js","sources":["../../../node_modules/
|
|
1
|
+
{"version":3,"file":"index.es79.js","sources":["../../../node_modules/mapbox-gl/index.js"],"sourcesContent":["exports.printMsg = function() {\r\n console.log(\"This is a message from the demo package\");\r\n }"],"names":["printMsg","mapboxGl"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,IAAAC,EAAA,WAAmB,WAAW;AAC1B,UAAQ,IAAI,yCAAyC;AACvD;;;;;;","x_google_ignoreList":[0]}
|
package/dist/index.es80.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.es205.js";
|
|
4
|
+
import { deepEqual as l } from "./index.es204.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.es80.js.map
|
package/dist/index.es80.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es80.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index.es80.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,OAAOC,EAAU,IAAI,kBAAkB,GACpDC,EAAOF,EAAM,SAASC,EAAU,MAAM,oBAAoB,GACtDD,EAAM,SAAS,YAAYC,EAAU,SAAS;AAC9C;AAEE,QAAA,EAAE,QAAAE,IAAS,IAAI,OAAAC,IAAQ,CAAC,GAAG,QAAAC,GAAQ,SAAAC,GAAS,SAAAC,GAAS,UAAAC,EAAa,IAAAR;AAIpE,MAHAQ,MAAaP,EAAU,YACnBH,EAAA,UAAUC,GAAIS,CAAQ,GAE1BL,MAAWF,EAAU,QAAQ;AACvB,UAAAQ,IAAaR,EAAU,UAAU;AACvC,eAAWS,KAAOP;AACV,MAACQ,EAAUR,EAAOO,CAAG,GAAGD,EAAWC,CAAG,CAAC,KACvCZ,EAAI,kBAAkBC,GAAIW,GAAKP,EAAOO,CAAG,CAAC;AAGlD,eAAWA,KAAOD;AACd,MAAKN,EAAO,eAAeO,CAAG,KACtBZ,EAAA,kBAAkBC,GAAIW,GAAK,MAAS;AAAA,EAGpD;AACI,MAAAN,MAAUH,EAAU,OAAO;AACrB,UAAAW,IAAYX,EAAU,SAAS;AACrC,eAAWS,KAAON;AACV,MAACO,EAAUP,EAAMM,CAAG,GAAGE,EAAUF,CAAG,CAAC,KACrCZ,EAAI,iBAAiBC,GAAIW,GAAKN,EAAMM,CAAG,CAAC;AAGhD,eAAWA,KAAOE;AACd,MAAKR,EAAM,eAAeM,CAAG,KACrBZ,EAAA,iBAAiBC,GAAIW,GAAK,MAAS;AAAA,EAGnD;AACA,EAAKC,EAAUN,GAAQJ,EAAU,MAAM,KAC/BH,EAAA,UAAUC,GAAIM,CAAM,IAExBC,MAAYL,EAAU,WAAWM,MAAYN,EAAU,YACnDH,EAAA,kBAAkBC,GAAIO,GAASC,CAAO;AAElD;AACA,SAASM,EAAYf,GAAKC,GAAIC,GAAO;AAEjC,MAAIF,EAAI,SAASA,EAAI,MAAM,YAAY,EAAE,YAAYE,MAAUF,EAAI,UAAUE,EAAM,MAAM,IAAI;AACzF,UAAMc,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.es81.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.es205.js";
|
|
5
|
+
import { deepEqual as v } from "./index.es204.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.es81.js.map
|