@performant-software/geospatial 3.0.6-beta.12 → 3.0.6-beta.14
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.cjs15.js +1 -1
- package/dist/index.cjs19.js +1 -1
- package/dist/index.cjs21.js +1 -1
- package/dist/index.cjs22.js +1 -1
- package/dist/index.cjs5.js +1 -1
- package/dist/index.cjs5.js.map +1 -1
- package/dist/index.cjs63.js +1 -1
- package/dist/index.cjs64.js +1 -1
- package/dist/index.cjs65.js +1 -1
- package/dist/index.cjs65.js.map +1 -1
- package/dist/index.cjs66.js +1 -1
- package/dist/index.cjs66.js.map +1 -1
- package/dist/index.cjs67.js +1 -1
- package/dist/index.cjs67.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.cjs81.js +1 -1
- package/dist/index.cjs81.js.map +1 -1
- package/dist/index.es15.js +3 -3
- package/dist/index.es19.js +1 -1
- package/dist/index.es21.js +2 -2
- package/dist/index.es22.js +2 -2
- package/dist/index.es5.js +6 -7
- package/dist/index.es5.js.map +1 -1
- package/dist/index.es63.js +1 -1
- package/dist/index.es64.js +1 -1
- package/dist/index.es65.js +2 -107
- package/dist/index.es65.js.map +1 -1
- package/dist/index.es66.js +107 -10
- package/dist/index.es66.js.map +1 -1
- package/dist/index.es67.js +10 -2
- package/dist/index.es67.js.map +1 -1
- package/dist/index.es77.js +28 -2
- package/dist/index.es77.js.map +1 -1
- package/dist/index.es78.js +51 -2
- package/dist/index.es78.js.map +1 -1
- package/dist/index.es79.js +62 -25
- package/dist/index.es79.js.map +1 -1
- package/dist/index.es80.js +2 -51
- package/dist/index.es80.js.map +1 -1
- package/dist/index.es81.js +2 -65
- package/dist/index.es81.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/LayerMenu.js +1 -2
- package/types/components/LayerMenu.js.flow +1 -2
package/dist/index.es66.js
CHANGED
|
@@ -1,13 +1,110 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import l from "react";
|
|
2
|
+
import { IconContext as s, DefaultContext as y } from "./index.es67.js";
|
|
3
|
+
var O = ["attr", "size", "title"];
|
|
4
|
+
function v(e, t) {
|
|
5
|
+
if (e == null)
|
|
6
|
+
return {};
|
|
7
|
+
var r = p(e, t), n, i;
|
|
8
|
+
if (Object.getOwnPropertySymbols) {
|
|
9
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
10
|
+
for (i = 0; i < o.length; i++)
|
|
11
|
+
n = o[i], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(e, n) && (r[n] = e[n]);
|
|
12
|
+
}
|
|
13
|
+
return r;
|
|
14
|
+
}
|
|
15
|
+
function p(e, t) {
|
|
16
|
+
if (e == null)
|
|
17
|
+
return {};
|
|
18
|
+
var r = {}, n = Object.keys(e), i, o;
|
|
19
|
+
for (o = 0; o < n.length; o++)
|
|
20
|
+
i = n[o], !(t.indexOf(i) >= 0) && (r[i] = e[i]);
|
|
21
|
+
return r;
|
|
22
|
+
}
|
|
23
|
+
function c() {
|
|
24
|
+
return c = Object.assign ? Object.assign.bind() : function(e) {
|
|
25
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
26
|
+
var r = arguments[t];
|
|
27
|
+
for (var n in r)
|
|
28
|
+
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
29
|
+
}
|
|
30
|
+
return e;
|
|
31
|
+
}, c.apply(this, arguments);
|
|
32
|
+
}
|
|
33
|
+
function m(e, t) {
|
|
34
|
+
var r = Object.keys(e);
|
|
35
|
+
if (Object.getOwnPropertySymbols) {
|
|
36
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
37
|
+
t && (n = n.filter(function(i) {
|
|
38
|
+
return Object.getOwnPropertyDescriptor(e, i).enumerable;
|
|
39
|
+
})), r.push.apply(r, n);
|
|
40
|
+
}
|
|
41
|
+
return r;
|
|
42
|
+
}
|
|
43
|
+
function u(e) {
|
|
44
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
45
|
+
var r = arguments[t] != null ? arguments[t] : {};
|
|
46
|
+
t % 2 ? m(Object(r), !0).forEach(function(n) {
|
|
47
|
+
j(e, n, r[n]);
|
|
48
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : m(Object(r)).forEach(function(n) {
|
|
49
|
+
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return e;
|
|
53
|
+
}
|
|
54
|
+
function j(e, t, r) {
|
|
55
|
+
return t = P(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
56
|
+
}
|
|
57
|
+
function P(e) {
|
|
58
|
+
var t = h(e, "string");
|
|
59
|
+
return typeof t == "symbol" ? t : String(t);
|
|
60
|
+
}
|
|
61
|
+
function h(e, t) {
|
|
62
|
+
if (typeof e != "object" || e === null)
|
|
63
|
+
return e;
|
|
64
|
+
var r = e[Symbol.toPrimitive];
|
|
65
|
+
if (r !== void 0) {
|
|
66
|
+
var n = r.call(e, t || "default");
|
|
67
|
+
if (typeof n != "object")
|
|
68
|
+
return n;
|
|
69
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
70
|
+
}
|
|
71
|
+
return (t === "string" ? String : Number)(e);
|
|
72
|
+
}
|
|
73
|
+
function b(e) {
|
|
74
|
+
return e && e.map((t, r) => /* @__PURE__ */ l.createElement(t.tag, u({
|
|
75
|
+
key: r
|
|
76
|
+
}, t.attr), b(t.child)));
|
|
77
|
+
}
|
|
78
|
+
function _(e) {
|
|
79
|
+
return (t) => /* @__PURE__ */ l.createElement(d, c({
|
|
80
|
+
attr: u({}, e.attr)
|
|
81
|
+
}, t), b(e.child));
|
|
82
|
+
}
|
|
83
|
+
function d(e) {
|
|
84
|
+
var t = (r) => {
|
|
85
|
+
var {
|
|
86
|
+
attr: n,
|
|
87
|
+
size: i,
|
|
88
|
+
title: o
|
|
89
|
+
} = e, g = v(e, O), f = i || r.size || "1em", a;
|
|
90
|
+
return r.className && (a = r.className), e.className && (a = (a ? a + " " : "") + e.className), /* @__PURE__ */ l.createElement("svg", c({
|
|
91
|
+
stroke: "currentColor",
|
|
92
|
+
fill: "currentColor",
|
|
93
|
+
strokeWidth: "0"
|
|
94
|
+
}, r.attr, n, g, {
|
|
95
|
+
className: a,
|
|
96
|
+
style: u(u({
|
|
97
|
+
color: e.color || r.color
|
|
98
|
+
}, r.style), e.style),
|
|
99
|
+
height: f,
|
|
100
|
+
width: f,
|
|
101
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
102
|
+
}), o && /* @__PURE__ */ l.createElement("title", null, o), e.children);
|
|
103
|
+
};
|
|
104
|
+
return s !== void 0 ? /* @__PURE__ */ l.createElement(s.Consumer, null, (r) => t(r)) : t(y);
|
|
105
|
+
}
|
|
9
106
|
export {
|
|
10
|
-
|
|
11
|
-
d as
|
|
107
|
+
_ as GenIcon,
|
|
108
|
+
d as IconBase
|
|
12
109
|
};
|
|
13
110
|
//# sourceMappingURL=index.es66.js.map
|
package/dist/index.es66.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es66.js","sources":["../../../node_modules/react-icons/lib/
|
|
1
|
+
{"version":3,"file":"index.es66.js","sources":["../../../node_modules/react-icons/lib/iconBase.mjs"],"sourcesContent":["var _excluded = [\"attr\", \"size\", \"title\"];\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport React from \"react\";\nimport { IconContext, DefaultContext } from \"./iconContext.mjs\";\nfunction Tree2Element(tree) {\n return tree && tree.map((node, i) => /*#__PURE__*/React.createElement(node.tag, _objectSpread({\n key: i\n }, node.attr), Tree2Element(node.child)));\n}\nexport function GenIcon(data) {\n // eslint-disable-next-line react/display-name\n return props => /*#__PURE__*/React.createElement(IconBase, _extends({\n attr: _objectSpread({}, data.attr)\n }, props), Tree2Element(data.child));\n}\nexport function IconBase(props) {\n var elem = conf => {\n var {\n attr,\n size,\n title\n } = props,\n svgProps = _objectWithoutProperties(props, _excluded);\n var computedSize = size || conf.size || \"1em\";\n var className;\n if (conf.className) className = conf.className;\n if (props.className) className = (className ? className + \" \" : \"\") + props.className;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n stroke: \"currentColor\",\n fill: \"currentColor\",\n strokeWidth: \"0\"\n }, conf.attr, attr, svgProps, {\n className: className,\n style: _objectSpread(_objectSpread({\n color: props.color || conf.color\n }, conf.style), props.style),\n height: computedSize,\n width: computedSize,\n xmlns: \"http://www.w3.org/2000/svg\"\n }), title && /*#__PURE__*/React.createElement(\"title\", null, title), props.children);\n };\n return IconContext !== undefined ? /*#__PURE__*/React.createElement(IconContext.Consumer, null, conf => elem(conf)) : elem(DefaultContext);\n}"],"names":["_excluded","_objectWithoutProperties","source","excluded","target","_objectWithoutPropertiesLoose","key","sourceSymbolKeys","sourceKeys","i","_extends","ownKeys","r","t","o","_objectSpread","_defineProperty","obj","value","_toPropertyKey","arg","_toPrimitive","input","hint","prim","res","Tree2Element","tree","node","React","GenIcon","data","props","IconBase","elem","conf","attr","size","title","svgProps","computedSize","className","IconContext","DefaultContext"],"mappings":";;AAAA,IAAIA,IAAY,CAAC,QAAQ,QAAQ,OAAO;AACxC,SAASC,EAAyBC,GAAQC,GAAU;AAAE,MAAID,KAAU;AAA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AAA,IACb,CAAK,GAAGF,KAAsBT,gBAAAA,EAAM,cAAc,SAAS,MAAMS,CAAK,GAAGN,EAAM,QAAQ;AAAA,EACvF;AACE,SAAOU,MAAgB,SAAyBb,gBAAAA,EAAM,cAAca,EAAY,UAAU,MAAM,CAAAP,MAAQD,EAAKC,CAAI,CAAC,IAAID,EAAKS,CAAc;AAC3I;","x_google_ignoreList":[0]}
|
package/dist/index.es67.js
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import e from "react";
|
|
2
|
+
var t = {
|
|
3
|
+
color: void 0,
|
|
4
|
+
size: void 0,
|
|
5
|
+
className: void 0,
|
|
6
|
+
style: void 0,
|
|
7
|
+
attr: void 0
|
|
8
|
+
}, d = e.createContext && /* @__PURE__ */ e.createContext(t);
|
|
2
9
|
export {
|
|
3
|
-
|
|
10
|
+
t as DefaultContext,
|
|
11
|
+
d as IconContext
|
|
4
12
|
};
|
|
5
13
|
//# sourceMappingURL=index.es67.js.map
|
package/dist/index.es67.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es67.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index.es67.js","sources":["../../../node_modules/react-icons/lib/iconContext.mjs"],"sourcesContent":["import React from \"react\";\nexport var DefaultContext = {\n color: undefined,\n size: undefined,\n className: undefined,\n style: undefined,\n attr: undefined\n};\nexport var IconContext = React.createContext && /*#__PURE__*/React.createContext(DefaultContext);"],"names":["DefaultContext","IconContext","React"],"mappings":";AACU,IAACA,IAAiB;AAAA,EAC1B,OAAO;AAAA,EACP,MAAM;AAAA,EACN,WAAW;AAAA,EACX,OAAO;AAAA,EACP,MAAM;AACR,GACWC,IAAcC,EAAM,iBAA8BA,gBAAAA,EAAM,cAAcF,CAAc;","x_google_ignoreList":[0]}
|
package/dist/index.es77.js
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
|
-
|
|
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
|
+
});
|
|
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]);
|
|
2
26
|
export {
|
|
3
|
-
|
|
27
|
+
a as default,
|
|
28
|
+
p as i,
|
|
29
|
+
f as printMsg
|
|
4
30
|
};
|
|
5
31
|
//# 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/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.es78.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.es190.js";
|
|
4
|
+
import { deepEqual as l } from "./index.es189.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.es78.js.map
|
package/dist/index.es78.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es78.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index.es78.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,GAAK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
|
12
|
-
|
|
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.es190.js";
|
|
5
|
+
import { deepEqual as v } from "./index.es189.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);
|
|
13
56
|
}
|
|
57
|
+
};
|
|
14
58
|
}
|
|
15
|
-
}
|
|
16
|
-
|
|
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;
|
|
17
64
|
}
|
|
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
65
|
export {
|
|
27
|
-
|
|
28
|
-
p as i,
|
|
29
|
-
f as printMsg
|
|
66
|
+
R as default
|
|
30
67
|
};
|
|
31
68
|
//# 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/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,IA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OA,EAAI,SAASA,EAAI,UAAUC,CAAE;AACjD,SAAII,IACaD,EAAAC,GAAQH,GAAOc,EAAS,OAAO,IAGnCX,IAAAN,EAAaC,GAAKC,GAAIC,CAAK,GAExCc,EAAS,UAAUd,GACVG,KACLsB,EAAM,SAAS,IAAIzB,EAAM,UAAU,CAAA0B,MAASA,KACxCC,EAAaD,GAAO;AAAA,IAChB,QAAQ3B;AAAA,EAAA,CACX,CAAC,KACN;AACR;","x_google_ignoreList":[0]}
|
package/dist/index.es80.js
CHANGED
|
@@ -1,54 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { MapContext as b } from "./index.es68.js";
|
|
3
|
-
import d from "./index.es190.js";
|
|
4
|
-
import { deepEqual as l } from "./index.es189.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.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":";"}
|
package/dist/index.es81.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.es68.js";
|
|
4
|
-
import s from "./index.es190.js";
|
|
5
|
-
import { deepEqual as v } from "./index.es189.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.es81.js.map
|
package/dist/index.es81.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es81.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.es81.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|