@deck.gl/widgets 9.0.0-beta.9 → 9.0.0
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/compass-widget.d.ts +46 -0
- package/dist/compass-widget.d.ts.map +1 -0
- package/dist/compass-widget.js +75 -0
- package/dist/components.d.ts +2 -0
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +9 -1
- package/dist/dist.dev.js +400 -178
- package/dist/fullscreen-widget.d.ts +6 -0
- package/dist/fullscreen-widget.d.ts.map +1 -1
- package/dist/index.cjs +165 -6
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/stylesheet.css +81 -11
- package/dist/themes.d.ts +8 -0
- package/dist/themes.d.ts.map +1 -1
- package/dist/themes.js +12 -4
- package/dist/zoom-widget.d.ts +55 -0
- package/dist/zoom-widget.d.ts.map +1 -0
- package/dist/zoom-widget.js +68 -0
- package/dist.min.js +1 -1
- package/package.json +3 -3
- package/src/compass-widget.tsx +133 -0
- package/src/components.tsx +21 -2
- package/src/fullscreen-widget.tsx +6 -0
- package/src/index.ts +2 -0
- package/src/stylesheet.css +81 -11
- package/src/themes.ts +12 -4
- package/src/zoom-widget.tsx +128 -0
package/dist/dist.dev.js
CHANGED
|
@@ -44,11 +44,13 @@ var __exports__ = (() => {
|
|
|
44
44
|
// bundle.ts
|
|
45
45
|
var bundle_exports = {};
|
|
46
46
|
__export(bundle_exports, {
|
|
47
|
+
CompassWidget: () => CompassWidget,
|
|
47
48
|
DarkGlassTheme: () => DarkGlassTheme,
|
|
48
49
|
DarkTheme: () => DarkTheme,
|
|
49
50
|
FullscreenWidget: () => FullscreenWidget,
|
|
50
51
|
LightGlassTheme: () => LightGlassTheme,
|
|
51
|
-
LightTheme: () => LightTheme
|
|
52
|
+
LightTheme: () => LightTheme,
|
|
53
|
+
ZoomWidget: () => ZoomWidget
|
|
52
54
|
});
|
|
53
55
|
|
|
54
56
|
// ../core/bundle/peer-dependency.ts
|
|
@@ -80,301 +82,335 @@ var __exports__ = (() => {
|
|
|
80
82
|
var a = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
|
|
81
83
|
var h = Array.isArray;
|
|
82
84
|
function v(n2, l2) {
|
|
83
|
-
for (var
|
|
84
|
-
n2[
|
|
85
|
+
for (var u3 in l2)
|
|
86
|
+
n2[u3] = l2[u3];
|
|
85
87
|
return n2;
|
|
86
88
|
}
|
|
87
89
|
function p(n2) {
|
|
88
90
|
var l2 = n2.parentNode;
|
|
89
91
|
l2 && l2.removeChild(n2);
|
|
90
92
|
}
|
|
91
|
-
function y(l2,
|
|
92
|
-
var
|
|
93
|
-
for (r2 in
|
|
94
|
-
"key" == r2 ?
|
|
95
|
-
if (arguments.length > 2 && (
|
|
93
|
+
function y(l2, u3, t2) {
|
|
94
|
+
var i3, o2, r2, f3 = {};
|
|
95
|
+
for (r2 in u3)
|
|
96
|
+
"key" == r2 ? i3 = u3[r2] : "ref" == r2 ? o2 = u3[r2] : f3[r2] = u3[r2];
|
|
97
|
+
if (arguments.length > 2 && (f3.children = arguments.length > 3 ? n.call(arguments, 2) : t2), "function" == typeof l2 && null != l2.defaultProps)
|
|
96
98
|
for (r2 in l2.defaultProps)
|
|
97
|
-
void 0 ===
|
|
98
|
-
return d(l2,
|
|
99
|
+
void 0 === f3[r2] && (f3[r2] = l2.defaultProps[r2]);
|
|
100
|
+
return d(l2, f3, i3, o2, null);
|
|
99
101
|
}
|
|
100
|
-
function d(n2, t2,
|
|
101
|
-
var
|
|
102
|
-
return null == r2 && null != l.vnode && l.vnode(
|
|
102
|
+
function d(n2, t2, i3, o2, r2) {
|
|
103
|
+
var f3 = { type: n2, props: t2, key: i3, ref: o2, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: null == r2 ? ++u : r2, __i: -1, __u: 0 };
|
|
104
|
+
return null == r2 && null != l.vnode && l.vnode(f3), f3;
|
|
103
105
|
}
|
|
104
|
-
function
|
|
106
|
+
function g(n2) {
|
|
105
107
|
return n2.children;
|
|
106
108
|
}
|
|
107
109
|
function b(n2, l2) {
|
|
108
110
|
this.props = n2, this.context = l2;
|
|
109
111
|
}
|
|
110
|
-
function
|
|
112
|
+
function m(n2, l2) {
|
|
111
113
|
if (null == l2)
|
|
112
|
-
return n2.__ ?
|
|
113
|
-
for (var
|
|
114
|
-
if (null != (
|
|
115
|
-
return
|
|
116
|
-
return "function" == typeof n2.type ?
|
|
114
|
+
return n2.__ ? m(n2.__, n2.__i + 1) : null;
|
|
115
|
+
for (var u3; l2 < n2.__k.length; l2++)
|
|
116
|
+
if (null != (u3 = n2.__k[l2]) && null != u3.__e)
|
|
117
|
+
return u3.__e;
|
|
118
|
+
return "function" == typeof n2.type ? m(n2) : null;
|
|
117
119
|
}
|
|
118
|
-
function
|
|
119
|
-
var l2,
|
|
120
|
+
function w(n2) {
|
|
121
|
+
var l2, u3;
|
|
120
122
|
if (null != (n2 = n2.__) && null != n2.__c) {
|
|
121
123
|
for (n2.__e = n2.__c.base = null, l2 = 0; l2 < n2.__k.length; l2++)
|
|
122
|
-
if (null != (
|
|
123
|
-
n2.__e = n2.__c.base =
|
|
124
|
+
if (null != (u3 = n2.__k[l2]) && null != u3.__e) {
|
|
125
|
+
n2.__e = n2.__c.base = u3.__e;
|
|
124
126
|
break;
|
|
125
127
|
}
|
|
126
|
-
return
|
|
128
|
+
return w(n2);
|
|
127
129
|
}
|
|
128
130
|
}
|
|
129
|
-
function
|
|
131
|
+
function k(n2) {
|
|
130
132
|
(!n2.__d && (n2.__d = true) && i.push(n2) && !x.__r++ || o !== l.debounceRendering) && ((o = l.debounceRendering) || r)(x);
|
|
131
133
|
}
|
|
132
134
|
function x() {
|
|
133
|
-
var n2,
|
|
135
|
+
var n2, u3, t2, o2, r2, e2, c2, s2, a2;
|
|
134
136
|
for (i.sort(f); n2 = i.shift(); )
|
|
135
|
-
n2.__d && (
|
|
137
|
+
n2.__d && (u3 = i.length, o2 = void 0, e2 = (r2 = (t2 = n2).__v).__e, s2 = [], a2 = [], (c2 = t2.__P) && ((o2 = v({}, r2)).__v = r2.__v + 1, l.vnode && l.vnode(o2), L(c2, o2, r2, t2.__n, void 0 !== c2.ownerSVGElement, 32 & r2.__u ? [e2] : null, s2, null == e2 ? m(r2) : e2, !!(32 & r2.__u), a2), o2.__v = r2.__v, o2.__.__k[o2.__i] = o2, M(s2, o2, a2), o2.__e != e2 && w(o2)), i.length > u3 && i.sort(f));
|
|
136
138
|
x.__r = 0;
|
|
137
139
|
}
|
|
138
|
-
function
|
|
139
|
-
var p2, y2,
|
|
140
|
-
for (
|
|
141
|
-
null != (
|
|
142
|
-
|
|
143
|
-
null != I2[p2] && ("function" == typeof u2.type && null != I2[p2].__e && I2[p2].__e == u2.__d && (u2.__d = I2[p2].__e.nextSibling), q(I2[p2], I2[p2]));
|
|
140
|
+
function C(n2, l2, u3, t2, i3, o2, r2, f3, e2, a2, h2) {
|
|
141
|
+
var v2, p2, y2, d2, _, g2 = t2 && t2.__k || s, b2 = l2.length;
|
|
142
|
+
for (u3.__d = e2, P(u3, l2, g2), e2 = u3.__d, v2 = 0; v2 < b2; v2++)
|
|
143
|
+
null != (y2 = u3.__k[v2]) && "boolean" != typeof y2 && "function" != typeof y2 && (p2 = -1 === y2.__i ? c : g2[y2.__i] || c, y2.__i = v2, L(n2, y2, p2, i3, o2, r2, f3, e2, a2, h2), d2 = y2.__e, y2.ref && p2.ref != y2.ref && (p2.ref && z(p2.ref, null, y2), h2.push(y2.ref, y2.__c || d2, y2)), null == _ && null != d2 && (_ = d2), 65536 & y2.__u || p2.__k === y2.__k ? (d2 || p2.__e != e2 || (e2 = m(p2)), e2 = S(y2, e2, n2)) : "function" == typeof y2.type && void 0 !== y2.__d ? e2 = y2.__d : d2 && (e2 = d2.nextSibling), y2.__d = void 0, y2.__u &= -196609);
|
|
144
|
+
u3.__d = e2, u3.__e = _;
|
|
144
145
|
}
|
|
145
|
-
function
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
function P(n2, l2, u3) {
|
|
147
|
+
var t2, i3, o2, r2, f3, e2 = l2.length, c2 = u3.length, s2 = c2, a2 = 0;
|
|
148
|
+
for (n2.__k = [], t2 = 0; t2 < e2; t2++)
|
|
149
|
+
r2 = t2 + a2, null != (i3 = n2.__k[t2] = null == (i3 = l2[t2]) || "boolean" == typeof i3 || "function" == typeof i3 ? null : "string" == typeof i3 || "number" == typeof i3 || "bigint" == typeof i3 || i3.constructor == String ? d(null, i3, null, null, null) : h(i3) ? d(g, { children: i3 }, null, null, null) : void 0 === i3.constructor && i3.__b > 0 ? d(i3.type, i3.props, i3.key, i3.ref ? i3.ref : null, i3.__v) : i3) ? (i3.__ = n2, i3.__b = n2.__b + 1, f3 = H(i3, u3, r2, s2), i3.__i = f3, o2 = null, -1 !== f3 && (s2--, (o2 = u3[f3]) && (o2.__u |= 131072)), null == o2 || null === o2.__v ? (-1 == f3 && a2--, "function" != typeof i3.type && (i3.__u |= 65536)) : f3 !== r2 && (f3 === r2 + 1 ? a2++ : f3 > r2 ? s2 > e2 - r2 ? a2 += f3 - r2 : a2-- : f3 < r2 ? f3 == r2 - 1 && (a2 = f3 - r2) : a2 = 0, f3 !== t2 + a2 && (i3.__u |= 65536))) : (o2 = u3[r2]) && null == o2.key && o2.__e && 0 == (131072 & o2.__u) && (o2.__e == n2.__d && (n2.__d = m(o2)), N(o2, o2, false), u3[r2] = null, s2--);
|
|
150
|
+
if (s2)
|
|
151
|
+
for (t2 = 0; t2 < c2; t2++)
|
|
152
|
+
null != (o2 = u3[t2]) && 0 == (131072 & o2.__u) && (o2.__e == n2.__d && (n2.__d = m(o2)), N(o2, o2));
|
|
149
153
|
}
|
|
150
|
-
function
|
|
151
|
-
|
|
154
|
+
function S(n2, l2, u3) {
|
|
155
|
+
var t2, i3;
|
|
156
|
+
if ("function" == typeof n2.type) {
|
|
157
|
+
for (t2 = n2.__k, i3 = 0; t2 && i3 < t2.length; i3++)
|
|
158
|
+
t2[i3] && (t2[i3].__ = n2, l2 = S(t2[i3], l2, u3));
|
|
159
|
+
return l2;
|
|
160
|
+
}
|
|
161
|
+
n2.__e != l2 && (u3.insertBefore(n2.__e, l2 || null), l2 = n2.__e);
|
|
162
|
+
do {
|
|
163
|
+
l2 = l2 && l2.nextSibling;
|
|
164
|
+
} while (null != l2 && 8 === l2.nodeType);
|
|
165
|
+
return l2;
|
|
152
166
|
}
|
|
153
|
-
function
|
|
154
|
-
var
|
|
155
|
-
if (null === e2 || e2 &&
|
|
156
|
-
return
|
|
157
|
-
if (t2 > (null != e2 ? 1 : 0))
|
|
158
|
-
for (; r2 >= 0 ||
|
|
167
|
+
function H(n2, l2, u3, t2) {
|
|
168
|
+
var i3 = n2.key, o2 = n2.type, r2 = u3 - 1, f3 = u3 + 1, e2 = l2[u3];
|
|
169
|
+
if (null === e2 || e2 && i3 == e2.key && o2 === e2.type && 0 == (131072 & e2.__u))
|
|
170
|
+
return u3;
|
|
171
|
+
if (t2 > (null != e2 && 0 == (131072 & e2.__u) ? 1 : 0))
|
|
172
|
+
for (; r2 >= 0 || f3 < l2.length; ) {
|
|
159
173
|
if (r2 >= 0) {
|
|
160
|
-
if ((e2 = l2[r2]) &&
|
|
174
|
+
if ((e2 = l2[r2]) && 0 == (131072 & e2.__u) && i3 == e2.key && o2 === e2.type)
|
|
161
175
|
return r2;
|
|
162
176
|
r2--;
|
|
163
177
|
}
|
|
164
|
-
if (
|
|
165
|
-
if ((e2 = l2[
|
|
166
|
-
return
|
|
167
|
-
|
|
178
|
+
if (f3 < l2.length) {
|
|
179
|
+
if ((e2 = l2[f3]) && 0 == (131072 & e2.__u) && i3 == e2.key && o2 === e2.type)
|
|
180
|
+
return f3;
|
|
181
|
+
f3++;
|
|
168
182
|
}
|
|
169
183
|
}
|
|
170
184
|
return -1;
|
|
171
185
|
}
|
|
172
|
-
function
|
|
173
|
-
|
|
174
|
-
for (o3 in u2)
|
|
175
|
-
"children" === o3 || "key" === o3 || o3 in l2 || T(n2, o3, null, u2[o3], t2);
|
|
176
|
-
for (o3 in l2)
|
|
177
|
-
i2 && "function" != typeof l2[o3] || "children" === o3 || "key" === o3 || "value" === o3 || "checked" === o3 || u2[o3] === l2[o3] || T(n2, o3, l2[o3], u2[o3], t2);
|
|
178
|
-
}
|
|
179
|
-
function I(n2, l2, u2) {
|
|
180
|
-
"-" === l2[0] ? n2.setProperty(l2, null == u2 ? "" : u2) : n2[l2] = null == u2 ? "" : "number" != typeof u2 || a.test(l2) ? u2 : u2 + "px";
|
|
186
|
+
function I(n2, l2, u3) {
|
|
187
|
+
"-" === l2[0] ? n2.setProperty(l2, null == u3 ? "" : u3) : n2[l2] = null == u3 ? "" : "number" != typeof u3 || a.test(l2) ? u3 : u3 + "px";
|
|
181
188
|
}
|
|
182
|
-
function T(n2, l2,
|
|
183
|
-
var
|
|
189
|
+
function T(n2, l2, u3, t2, i3) {
|
|
190
|
+
var o2;
|
|
184
191
|
n:
|
|
185
192
|
if ("style" === l2)
|
|
186
|
-
if ("string" == typeof
|
|
187
|
-
n2.style.cssText =
|
|
193
|
+
if ("string" == typeof u3)
|
|
194
|
+
n2.style.cssText = u3;
|
|
188
195
|
else {
|
|
189
196
|
if ("string" == typeof t2 && (n2.style.cssText = t2 = ""), t2)
|
|
190
197
|
for (l2 in t2)
|
|
191
|
-
|
|
192
|
-
if (
|
|
193
|
-
for (l2 in
|
|
194
|
-
t2 &&
|
|
198
|
+
u3 && l2 in u3 || I(n2.style, l2, "");
|
|
199
|
+
if (u3)
|
|
200
|
+
for (l2 in u3)
|
|
201
|
+
t2 && u3[l2] === t2[l2] || I(n2.style, l2, u3[l2]);
|
|
195
202
|
}
|
|
196
203
|
else if ("o" === l2[0] && "n" === l2[1])
|
|
197
|
-
|
|
198
|
-
else
|
|
199
|
-
if (
|
|
204
|
+
o2 = l2 !== (l2 = l2.replace(/(PointerCapture)$|Capture$/i, "$1")), l2 = l2.toLowerCase() in n2 ? l2.toLowerCase().slice(2) : l2.slice(2), n2.l || (n2.l = {}), n2.l[l2 + o2] = u3, u3 ? t2 ? u3.u = t2.u : (u3.u = Date.now(), n2.addEventListener(l2, o2 ? D : A, o2)) : n2.removeEventListener(l2, o2 ? D : A, o2);
|
|
205
|
+
else {
|
|
206
|
+
if (i3)
|
|
200
207
|
l2 = l2.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
201
|
-
else if ("width" !== l2 && "height" !== l2 && "href" !== l2 && "list" !== l2 && "form" !== l2 && "tabIndex" !== l2 && "download" !== l2 && "rowSpan" !== l2 && "colSpan" !== l2 && l2 in n2)
|
|
208
|
+
else if ("width" !== l2 && "height" !== l2 && "href" !== l2 && "list" !== l2 && "form" !== l2 && "tabIndex" !== l2 && "download" !== l2 && "rowSpan" !== l2 && "colSpan" !== l2 && "role" !== l2 && l2 in n2)
|
|
202
209
|
try {
|
|
203
|
-
n2[l2] = null ==
|
|
210
|
+
n2[l2] = null == u3 ? "" : u3;
|
|
204
211
|
break n;
|
|
205
212
|
} catch (n3) {
|
|
206
213
|
}
|
|
207
|
-
"function" == typeof
|
|
214
|
+
"function" == typeof u3 || (null == u3 || false === u3 && "-" !== l2[4] ? n2.removeAttribute(l2) : n2.setAttribute(l2, u3));
|
|
208
215
|
}
|
|
209
216
|
}
|
|
210
|
-
function
|
|
211
|
-
|
|
217
|
+
function A(n2) {
|
|
218
|
+
if (this.l) {
|
|
219
|
+
var u3 = this.l[n2.type + false];
|
|
220
|
+
if (n2.t) {
|
|
221
|
+
if (n2.t <= u3.u)
|
|
222
|
+
return;
|
|
223
|
+
} else
|
|
224
|
+
n2.t = Date.now();
|
|
225
|
+
return u3(l.event ? l.event(n2) : n2);
|
|
226
|
+
}
|
|
212
227
|
}
|
|
213
|
-
function
|
|
214
|
-
|
|
228
|
+
function D(n2) {
|
|
229
|
+
if (this.l)
|
|
230
|
+
return this.l[n2.type + true](l.event ? l.event(n2) : n2);
|
|
215
231
|
}
|
|
216
|
-
function L(n2,
|
|
217
|
-
var a2, p2, y2, d2,
|
|
218
|
-
if (void 0 !==
|
|
232
|
+
function L(n2, u3, t2, i3, o2, r2, f3, e2, c2, s2) {
|
|
233
|
+
var a2, p2, y2, d2, _, m2, w2, k2, x2, P2, S2, $, H2, I2, T2, A2 = u3.type;
|
|
234
|
+
if (void 0 !== u3.constructor)
|
|
219
235
|
return null;
|
|
220
|
-
|
|
236
|
+
128 & t2.__u && (c2 = !!(32 & t2.__u), r2 = [e2 = u3.__e = t2.__e]), (a2 = l.__b) && a2(u3);
|
|
221
237
|
n:
|
|
222
|
-
if ("function" == typeof
|
|
238
|
+
if ("function" == typeof A2)
|
|
223
239
|
try {
|
|
224
|
-
if (
|
|
225
|
-
null ==
|
|
240
|
+
if (k2 = u3.props, x2 = (a2 = A2.contextType) && i3[a2.__c], P2 = a2 ? x2 ? x2.props.value : a2.__ : i3, t2.__c ? w2 = (p2 = u3.__c = t2.__c).__ = p2.__E : ("prototype" in A2 && A2.prototype.render ? u3.__c = p2 = new A2(k2, P2) : (u3.__c = p2 = new b(k2, P2), p2.constructor = A2, p2.render = O), x2 && x2.sub(p2), p2.props = k2, p2.state || (p2.state = {}), p2.context = P2, p2.__n = i3, y2 = p2.__d = true, p2.__h = [], p2._sb = []), null == p2.__s && (p2.__s = p2.state), null != A2.getDerivedStateFromProps && (p2.__s == p2.state && (p2.__s = v({}, p2.__s)), v(p2.__s, A2.getDerivedStateFromProps(k2, p2.__s))), d2 = p2.props, _ = p2.state, p2.__v = u3, y2)
|
|
241
|
+
null == A2.getDerivedStateFromProps && null != p2.componentWillMount && p2.componentWillMount(), null != p2.componentDidMount && p2.__h.push(p2.componentDidMount);
|
|
226
242
|
else {
|
|
227
|
-
if (null ==
|
|
228
|
-
for (
|
|
229
|
-
n3 && (n3.__ =
|
|
230
|
-
}),
|
|
231
|
-
p2.__h.push(p2._sb[
|
|
232
|
-
p2._sb = [], p2.__h.length &&
|
|
243
|
+
if (null == A2.getDerivedStateFromProps && k2 !== d2 && null != p2.componentWillReceiveProps && p2.componentWillReceiveProps(k2, P2), !p2.__e && (null != p2.shouldComponentUpdate && false === p2.shouldComponentUpdate(k2, p2.__s, P2) || u3.__v === t2.__v)) {
|
|
244
|
+
for (u3.__v !== t2.__v && (p2.props = k2, p2.state = p2.__s, p2.__d = false), u3.__e = t2.__e, u3.__k = t2.__k, u3.__k.forEach(function(n3) {
|
|
245
|
+
n3 && (n3.__ = u3);
|
|
246
|
+
}), S2 = 0; S2 < p2._sb.length; S2++)
|
|
247
|
+
p2.__h.push(p2._sb[S2]);
|
|
248
|
+
p2._sb = [], p2.__h.length && f3.push(p2);
|
|
233
249
|
break n;
|
|
234
250
|
}
|
|
235
|
-
null != p2.componentWillUpdate && p2.componentWillUpdate(
|
|
236
|
-
p2.componentDidUpdate(d2,
|
|
251
|
+
null != p2.componentWillUpdate && p2.componentWillUpdate(k2, p2.__s, P2), null != p2.componentDidUpdate && p2.__h.push(function() {
|
|
252
|
+
p2.componentDidUpdate(d2, _, m2);
|
|
237
253
|
});
|
|
238
254
|
}
|
|
239
|
-
if (p2.context =
|
|
240
|
-
for (p2.state = p2.__s, p2.__d = false, $
|
|
241
|
-
p2.__h.push(p2._sb[
|
|
255
|
+
if (p2.context = P2, p2.props = k2, p2.__P = n2, p2.__e = false, $ = l.__r, H2 = 0, "prototype" in A2 && A2.prototype.render) {
|
|
256
|
+
for (p2.state = p2.__s, p2.__d = false, $ && $(u3), a2 = p2.render(p2.props, p2.state, p2.context), I2 = 0; I2 < p2._sb.length; I2++)
|
|
257
|
+
p2.__h.push(p2._sb[I2]);
|
|
242
258
|
p2._sb = [];
|
|
243
259
|
} else
|
|
244
260
|
do {
|
|
245
|
-
p2.__d = false, $
|
|
246
|
-
} while (p2.__d && ++
|
|
247
|
-
p2.state = p2.__s, null != p2.getChildContext && (
|
|
261
|
+
p2.__d = false, $ && $(u3), a2 = p2.render(p2.props, p2.state, p2.context), p2.state = p2.__s;
|
|
262
|
+
} while (p2.__d && ++H2 < 25);
|
|
263
|
+
p2.state = p2.__s, null != p2.getChildContext && (i3 = v(v({}, i3), p2.getChildContext())), y2 || null == p2.getSnapshotBeforeUpdate || (m2 = p2.getSnapshotBeforeUpdate(d2, _)), C(n2, h(T2 = null != a2 && a2.type === g && null == a2.key ? a2.props.children : a2) ? T2 : [T2], u3, t2, i3, o2, r2, f3, e2, c2, s2), p2.base = u3.__e, u3.__u &= -161, p2.__h.length && f3.push(p2), w2 && (p2.__E = p2.__ = null);
|
|
248
264
|
} catch (n3) {
|
|
249
|
-
|
|
265
|
+
u3.__v = null, c2 || null != r2 ? (u3.__e = e2, u3.__u |= c2 ? 160 : 32, r2[r2.indexOf(e2)] = null) : (u3.__e = t2.__e, u3.__k = t2.__k), l.__e(n3, u3, t2);
|
|
250
266
|
}
|
|
251
267
|
else
|
|
252
|
-
null == r2 &&
|
|
253
|
-
(a2 = l.diffed) && a2(
|
|
268
|
+
null == r2 && u3.__v === t2.__v ? (u3.__k = t2.__k, u3.__e = t2.__e) : u3.__e = j(t2.__e, u3, t2, i3, o2, r2, f3, c2, s2);
|
|
269
|
+
(a2 = l.diffed) && a2(u3);
|
|
254
270
|
}
|
|
255
|
-
function M(n2,
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
271
|
+
function M(n2, u3, t2) {
|
|
272
|
+
u3.__d = void 0;
|
|
273
|
+
for (var i3 = 0; i3 < t2.length; i3++)
|
|
274
|
+
z(t2[i3], t2[++i3], t2[++i3]);
|
|
275
|
+
l.__c && l.__c(u3, n2), n2.some(function(u4) {
|
|
259
276
|
try {
|
|
260
|
-
n2 =
|
|
261
|
-
n3.call(
|
|
277
|
+
n2 = u4.__h, u4.__h = [], n2.some(function(n3) {
|
|
278
|
+
n3.call(u4);
|
|
262
279
|
});
|
|
263
280
|
} catch (n3) {
|
|
264
|
-
l.__e(n3,
|
|
281
|
+
l.__e(n3, u4.__v);
|
|
265
282
|
}
|
|
266
283
|
});
|
|
267
284
|
}
|
|
268
|
-
function
|
|
269
|
-
var a2, v2, y2, d2
|
|
270
|
-
if ("svg" ===
|
|
271
|
-
for (;
|
|
272
|
-
if ((
|
|
273
|
-
l2 =
|
|
285
|
+
function j(l2, u3, t2, i3, o2, r2, f3, e2, s2) {
|
|
286
|
+
var a2, v2, y2, d2, _, g2, b2, w2 = t2.props, k2 = u3.props, x2 = u3.type;
|
|
287
|
+
if ("svg" === x2 && (o2 = true), null != r2) {
|
|
288
|
+
for (a2 = 0; a2 < r2.length; a2++)
|
|
289
|
+
if ((_ = r2[a2]) && "setAttribute" in _ == !!x2 && (x2 ? _.localName === x2 : 3 === _.nodeType)) {
|
|
290
|
+
l2 = _, r2[a2] = null;
|
|
274
291
|
break;
|
|
275
292
|
}
|
|
276
293
|
}
|
|
277
294
|
if (null == l2) {
|
|
278
|
-
if (null ===
|
|
279
|
-
return document.createTextNode(
|
|
280
|
-
l2 =
|
|
295
|
+
if (null === x2)
|
|
296
|
+
return document.createTextNode(k2);
|
|
297
|
+
l2 = o2 ? document.createElementNS("http://www.w3.org/2000/svg", x2) : document.createElement(x2, k2.is && k2), r2 = null, e2 = false;
|
|
281
298
|
}
|
|
282
|
-
if (null ===
|
|
283
|
-
|
|
299
|
+
if (null === x2)
|
|
300
|
+
w2 === k2 || e2 && l2.data === k2 || (l2.data = k2);
|
|
284
301
|
else {
|
|
285
|
-
if (r2 = r2 && n.call(l2.childNodes),
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
302
|
+
if (r2 = r2 && n.call(l2.childNodes), w2 = t2.props || c, !e2 && null != r2)
|
|
303
|
+
for (w2 = {}, a2 = 0; a2 < l2.attributes.length; a2++)
|
|
304
|
+
w2[(_ = l2.attributes[a2]).name] = _.value;
|
|
305
|
+
for (a2 in w2)
|
|
306
|
+
_ = w2[a2], "children" == a2 || ("dangerouslySetInnerHTML" == a2 ? y2 = _ : "key" === a2 || a2 in k2 || T(l2, a2, null, _, o2));
|
|
307
|
+
for (a2 in k2)
|
|
308
|
+
_ = k2[a2], "children" == a2 ? d2 = _ : "dangerouslySetInnerHTML" == a2 ? v2 = _ : "value" == a2 ? g2 = _ : "checked" == a2 ? b2 = _ : "key" === a2 || e2 && "function" != typeof _ || w2[a2] === _ || T(l2, a2, _, w2[a2], o2);
|
|
309
|
+
if (v2)
|
|
310
|
+
e2 || y2 && (v2.__html === y2.__html || v2.__html === l2.innerHTML) || (l2.innerHTML = v2.__html), u3.__k = [];
|
|
311
|
+
else if (y2 && (l2.innerHTML = ""), C(l2, h(d2) ? d2 : [d2], u3, t2, i3, o2 && "foreignObject" !== x2, r2, f3, r2 ? r2[0] : t2.__k && m(t2, 0), e2, s2), null != r2)
|
|
312
|
+
for (a2 = r2.length; a2--; )
|
|
313
|
+
null != r2[a2] && p(r2[a2]);
|
|
314
|
+
e2 || (a2 = "value", void 0 !== g2 && (g2 !== l2[a2] || "progress" === x2 && !g2 || "option" === x2 && g2 !== w2[a2]) && T(l2, a2, g2, w2[a2], false), a2 = "checked", void 0 !== b2 && b2 !== l2[a2] && T(l2, a2, b2, w2[a2], false));
|
|
297
315
|
}
|
|
298
316
|
return l2;
|
|
299
317
|
}
|
|
300
|
-
function
|
|
318
|
+
function z(n2, u3, t2) {
|
|
301
319
|
try {
|
|
302
|
-
"function" == typeof n2 ? n2(
|
|
320
|
+
"function" == typeof n2 ? n2(u3) : n2.current = u3;
|
|
303
321
|
} catch (n3) {
|
|
304
322
|
l.__e(n3, t2);
|
|
305
323
|
}
|
|
306
324
|
}
|
|
307
|
-
function
|
|
308
|
-
var
|
|
309
|
-
if (l.unmount && l.unmount(n2), (
|
|
310
|
-
if (
|
|
325
|
+
function N(n2, u3, t2) {
|
|
326
|
+
var i3, o2;
|
|
327
|
+
if (l.unmount && l.unmount(n2), (i3 = n2.ref) && (i3.current && i3.current !== n2.__e || z(i3, null, u3)), null != (i3 = n2.__c)) {
|
|
328
|
+
if (i3.componentWillUnmount)
|
|
311
329
|
try {
|
|
312
|
-
|
|
330
|
+
i3.componentWillUnmount();
|
|
313
331
|
} catch (n3) {
|
|
314
|
-
l.__e(n3,
|
|
332
|
+
l.__e(n3, u3);
|
|
315
333
|
}
|
|
316
|
-
|
|
334
|
+
i3.base = i3.__P = null, n2.__c = void 0;
|
|
317
335
|
}
|
|
318
|
-
if (
|
|
319
|
-
for (
|
|
320
|
-
|
|
336
|
+
if (i3 = n2.__k)
|
|
337
|
+
for (o2 = 0; o2 < i3.length; o2++)
|
|
338
|
+
i3[o2] && N(i3[o2], u3, t2 || "function" != typeof n2.type);
|
|
321
339
|
t2 || null == n2.__e || p(n2.__e), n2.__ = n2.__e = n2.__d = void 0;
|
|
322
340
|
}
|
|
323
|
-
function
|
|
324
|
-
return this.constructor(n2,
|
|
341
|
+
function O(n2, l2, u3) {
|
|
342
|
+
return this.constructor(n2, u3);
|
|
325
343
|
}
|
|
326
|
-
function
|
|
327
|
-
var
|
|
328
|
-
l.__ && l.__(
|
|
344
|
+
function q(u3, t2, i3) {
|
|
345
|
+
var o2, r2, f3, e2;
|
|
346
|
+
l.__ && l.__(u3, t2), r2 = (o2 = "function" == typeof i3) ? null : i3 && i3.__k || t2.__k, f3 = [], e2 = [], L(t2, u3 = (!o2 && i3 || t2).__k = y(g, null, [u3]), r2 || c, c, void 0 !== t2.ownerSVGElement, !o2 && i3 ? [i3] : r2 ? null : t2.firstChild ? n.call(t2.childNodes) : null, f3, !o2 && i3 ? i3 : r2 ? r2.__e : t2.firstChild, o2, e2), M(f3, u3, e2);
|
|
329
347
|
}
|
|
330
|
-
n = s.slice, l = { __e: function(n2, l2,
|
|
331
|
-
for (var
|
|
332
|
-
if ((
|
|
348
|
+
n = s.slice, l = { __e: function(n2, l2, u3, t2) {
|
|
349
|
+
for (var i3, o2, r2; l2 = l2.__; )
|
|
350
|
+
if ((i3 = l2.__c) && !i3.__)
|
|
333
351
|
try {
|
|
334
|
-
if ((
|
|
335
|
-
return
|
|
352
|
+
if ((o2 = i3.constructor) && null != o2.getDerivedStateFromError && (i3.setState(o2.getDerivedStateFromError(n2)), r2 = i3.__d), null != i3.componentDidCatch && (i3.componentDidCatch(n2, t2 || {}), r2 = i3.__d), r2)
|
|
353
|
+
return i3.__E = i3;
|
|
336
354
|
} catch (l3) {
|
|
337
355
|
n2 = l3;
|
|
338
356
|
}
|
|
339
357
|
throw n2;
|
|
340
358
|
} }, u = 0, t = function(n2) {
|
|
341
|
-
return null != n2 &&
|
|
359
|
+
return null != n2 && null == n2.constructor;
|
|
342
360
|
}, b.prototype.setState = function(n2, l2) {
|
|
343
|
-
var
|
|
344
|
-
|
|
361
|
+
var u3;
|
|
362
|
+
u3 = null != this.__s && this.__s !== this.state ? this.__s : this.__s = v({}, this.state), "function" == typeof n2 && (n2 = n2(v({}, u3), this.props)), n2 && v(u3, n2), null != n2 && this.__v && (l2 && this._sb.push(l2), k(this));
|
|
345
363
|
}, b.prototype.forceUpdate = function(n2) {
|
|
346
|
-
this.__v && (this.__e = true, n2 && this.__h.push(n2),
|
|
347
|
-
}, b.prototype.render =
|
|
364
|
+
this.__v && (this.__e = true, n2 && this.__h.push(n2), k(this));
|
|
365
|
+
}, b.prototype.render = g, i = [], r = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, f = function(n2, l2) {
|
|
348
366
|
return n2.__v.__b - l2.__v.__b;
|
|
349
367
|
}, x.__r = 0, e = 0;
|
|
350
368
|
|
|
351
369
|
// ../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
|
|
352
|
-
var
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
370
|
+
var f2 = 0;
|
|
371
|
+
var i2 = Array.isArray;
|
|
372
|
+
function u2(e2, t2, n2, o2, i3, u3) {
|
|
373
|
+
var a2, c2, p2 = {};
|
|
374
|
+
for (c2 in t2)
|
|
375
|
+
"ref" == c2 ? a2 = t2[c2] : p2[c2] = t2[c2];
|
|
376
|
+
var l2 = { type: e2, props: p2, key: n2, ref: a2, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --f2, __i: -1, __u: 0, __source: i3, __self: u3 };
|
|
377
|
+
if ("function" == typeof e2 && (a2 = e2.defaultProps))
|
|
378
|
+
for (c2 in a2)
|
|
379
|
+
void 0 === p2[c2] && (p2[c2] = a2[c2]);
|
|
380
|
+
return l.vnode && l.vnode(l2), l2;
|
|
362
381
|
}
|
|
363
382
|
|
|
364
383
|
// src/components.tsx
|
|
365
384
|
var IconButton = (props) => {
|
|
366
385
|
const { className, label, onClick } = props;
|
|
367
|
-
return /* @__PURE__ */
|
|
386
|
+
return /* @__PURE__ */ u2("div", { className: "deck-widget-button", children: /* @__PURE__ */ u2(
|
|
368
387
|
"button",
|
|
369
388
|
{
|
|
370
|
-
className: `deck-widget-button ${className}`,
|
|
389
|
+
className: `deck-widget-icon-button ${className}`,
|
|
371
390
|
type: "button",
|
|
372
391
|
onClick,
|
|
373
392
|
title: label,
|
|
374
|
-
children: /* @__PURE__ */
|
|
393
|
+
children: /* @__PURE__ */ u2("div", { className: "deck-widget-icon" })
|
|
375
394
|
}
|
|
376
395
|
) });
|
|
377
396
|
};
|
|
397
|
+
var ButtonGroup = (props) => {
|
|
398
|
+
const { children, orientation } = props;
|
|
399
|
+
return /* @__PURE__ */ u2("div", { className: `deck-widget-button-group ${orientation}`, children });
|
|
400
|
+
};
|
|
401
|
+
var GroupedIconButton = (props) => {
|
|
402
|
+
const { className, label, onClick } = props;
|
|
403
|
+
return /* @__PURE__ */ u2(
|
|
404
|
+
"button",
|
|
405
|
+
{
|
|
406
|
+
className: `deck-widget-icon-button ${className}`,
|
|
407
|
+
type: "button",
|
|
408
|
+
onClick,
|
|
409
|
+
title: label,
|
|
410
|
+
children: /* @__PURE__ */ u2("div", { className: "deck-widget-icon" })
|
|
411
|
+
}
|
|
412
|
+
);
|
|
413
|
+
};
|
|
378
414
|
|
|
379
415
|
// src/fullscreen-widget.tsx
|
|
380
416
|
var FullscreenWidget = class {
|
|
@@ -415,7 +451,7 @@ var __exports__ = (() => {
|
|
|
415
451
|
if (!el) {
|
|
416
452
|
return;
|
|
417
453
|
}
|
|
418
|
-
const ui = /* @__PURE__ */
|
|
454
|
+
const ui = /* @__PURE__ */ u2(
|
|
419
455
|
IconButton,
|
|
420
456
|
{
|
|
421
457
|
onClick: this.handleClick.bind(this),
|
|
@@ -423,7 +459,7 @@ var __exports__ = (() => {
|
|
|
423
459
|
className: this.fullscreen ? "deck-widget-fullscreen-exit" : "deck-widget-fullscreen-enter"
|
|
424
460
|
}
|
|
425
461
|
);
|
|
426
|
-
|
|
462
|
+
q(ui, el);
|
|
427
463
|
}
|
|
428
464
|
setProps(props) {
|
|
429
465
|
const oldProps = this.props;
|
|
@@ -487,6 +523,184 @@ var __exports__ = (() => {
|
|
|
487
523
|
}
|
|
488
524
|
};
|
|
489
525
|
|
|
526
|
+
// src/compass-widget.tsx
|
|
527
|
+
var import_core3 = __toESM(require_core(), 1);
|
|
528
|
+
var CompassWidget = class {
|
|
529
|
+
constructor(props) {
|
|
530
|
+
this.id = "compass";
|
|
531
|
+
this.placement = "top-left";
|
|
532
|
+
this.viewId = null;
|
|
533
|
+
this.id = props.id || "compass";
|
|
534
|
+
this.viewId = props.viewId || null;
|
|
535
|
+
this.placement = props.placement || "top-left";
|
|
536
|
+
props.transitionDuration = props.transitionDuration || 200;
|
|
537
|
+
props.label = props.label || "Compass";
|
|
538
|
+
props.style = props.style || {};
|
|
539
|
+
this.props = props;
|
|
540
|
+
}
|
|
541
|
+
setProps(props) {
|
|
542
|
+
Object.assign(this.props, props);
|
|
543
|
+
}
|
|
544
|
+
onViewportChange(viewport) {
|
|
545
|
+
this.viewport = viewport;
|
|
546
|
+
this.update();
|
|
547
|
+
}
|
|
548
|
+
onAdd({ deck }) {
|
|
549
|
+
const { style, className } = this.props;
|
|
550
|
+
const element = document.createElement("div");
|
|
551
|
+
element.classList.add("deck-widget", "deck-widget-compass");
|
|
552
|
+
if (className)
|
|
553
|
+
element.classList.add(className);
|
|
554
|
+
if (style) {
|
|
555
|
+
Object.entries(style).map(([key, value]) => element.style.setProperty(key, value));
|
|
556
|
+
}
|
|
557
|
+
this.deck = deck;
|
|
558
|
+
this.element = element;
|
|
559
|
+
this.update();
|
|
560
|
+
return element;
|
|
561
|
+
}
|
|
562
|
+
getRotation() {
|
|
563
|
+
if (this.viewport instanceof import_core3.WebMercatorViewport) {
|
|
564
|
+
return [-this.viewport.bearing, this.viewport.pitch];
|
|
565
|
+
} else if (this.viewport instanceof import_core3._GlobeViewport) {
|
|
566
|
+
return [0, Math.max(-80, Math.min(80, this.viewport.latitude))];
|
|
567
|
+
}
|
|
568
|
+
return [0, 0];
|
|
569
|
+
}
|
|
570
|
+
update() {
|
|
571
|
+
const [rz, rx] = this.getRotation();
|
|
572
|
+
const element = this.element;
|
|
573
|
+
if (!element) {
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
const ui = /* @__PURE__ */ u2("div", { className: "deck-widget-button", style: { perspective: 100 }, children: /* @__PURE__ */ u2(
|
|
577
|
+
"button",
|
|
578
|
+
{
|
|
579
|
+
type: "button",
|
|
580
|
+
onClick: () => this.handleCompassReset(),
|
|
581
|
+
label: this.props.label,
|
|
582
|
+
style: { transform: `rotateX(${rx}deg)` },
|
|
583
|
+
children: /* @__PURE__ */ u2("svg", { fill: "none", width: "100%", height: "100%", viewBox: "0 0 26 26", children: /* @__PURE__ */ u2("g", { transform: `rotate(${rz},13,13)`, children: [
|
|
584
|
+
/* @__PURE__ */ u2(
|
|
585
|
+
"path",
|
|
586
|
+
{
|
|
587
|
+
d: "M10 13.0001L12.9999 5L15.9997 13.0001H10Z",
|
|
588
|
+
fill: "var(--icon-compass-north-color, #F05C44)"
|
|
589
|
+
}
|
|
590
|
+
),
|
|
591
|
+
/* @__PURE__ */ u2(
|
|
592
|
+
"path",
|
|
593
|
+
{
|
|
594
|
+
d: "M16.0002 12.9999L13.0004 21L10.0005 12.9999H16.0002Z",
|
|
595
|
+
fill: "var(--icon-compass-south-color, #C2C2CC)"
|
|
596
|
+
}
|
|
597
|
+
)
|
|
598
|
+
] }) })
|
|
599
|
+
}
|
|
600
|
+
) });
|
|
601
|
+
q(ui, element);
|
|
602
|
+
}
|
|
603
|
+
onRemove() {
|
|
604
|
+
this.deck = void 0;
|
|
605
|
+
this.element = void 0;
|
|
606
|
+
}
|
|
607
|
+
handleCompassReset() {
|
|
608
|
+
const viewId = this.viewId || "default-view";
|
|
609
|
+
if (this.viewport instanceof import_core3.WebMercatorViewport) {
|
|
610
|
+
const nextViewState = {
|
|
611
|
+
...this.viewport,
|
|
612
|
+
bearing: 0,
|
|
613
|
+
...this.getRotation()[0] === 0 ? { pitch: 0 } : {},
|
|
614
|
+
transitionDuration: this.props.transitionDuration,
|
|
615
|
+
transitionInterpolator: new import_core3.FlyToInterpolator()
|
|
616
|
+
};
|
|
617
|
+
this.deck._onViewStateChange({ viewId, viewState: nextViewState, interactionState: {} });
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
};
|
|
621
|
+
|
|
622
|
+
// src/zoom-widget.tsx
|
|
623
|
+
var import_core4 = __toESM(require_core(), 1);
|
|
624
|
+
var ZoomWidget = class {
|
|
625
|
+
constructor(props) {
|
|
626
|
+
this.id = "zoom";
|
|
627
|
+
this.placement = "top-left";
|
|
628
|
+
this.orientation = "vertical";
|
|
629
|
+
this.viewId = null;
|
|
630
|
+
this.id = props.id || "zoom";
|
|
631
|
+
this.viewId = props.viewId || null;
|
|
632
|
+
this.placement = props.placement || "top-left";
|
|
633
|
+
this.orientation = props.orientation || "vertical";
|
|
634
|
+
props.transitionDuration = props.transitionDuration || 200;
|
|
635
|
+
props.zoomInLabel = props.zoomInLabel || "Zoom In";
|
|
636
|
+
props.zoomOutLabel = props.zoomOutLabel || "Zoom Out";
|
|
637
|
+
props.style = props.style || {};
|
|
638
|
+
this.props = props;
|
|
639
|
+
}
|
|
640
|
+
onAdd({ deck }) {
|
|
641
|
+
const { style, className } = this.props;
|
|
642
|
+
const element = document.createElement("div");
|
|
643
|
+
element.classList.add("deck-widget", "deck-widget-zoom");
|
|
644
|
+
if (className)
|
|
645
|
+
element.classList.add(className);
|
|
646
|
+
if (style) {
|
|
647
|
+
Object.entries(style).map(([key, value]) => element.style.setProperty(key, value));
|
|
648
|
+
}
|
|
649
|
+
const ui = /* @__PURE__ */ u2(ButtonGroup, { orientation: this.orientation, children: [
|
|
650
|
+
/* @__PURE__ */ u2(
|
|
651
|
+
GroupedIconButton,
|
|
652
|
+
{
|
|
653
|
+
onClick: () => this.handleZoomIn(),
|
|
654
|
+
label: this.props.zoomInLabel,
|
|
655
|
+
className: "deck-widget-zoom-in"
|
|
656
|
+
}
|
|
657
|
+
),
|
|
658
|
+
/* @__PURE__ */ u2(
|
|
659
|
+
GroupedIconButton,
|
|
660
|
+
{
|
|
661
|
+
onClick: () => this.handleZoomOut(),
|
|
662
|
+
label: this.props.zoomOutLabel,
|
|
663
|
+
className: "deck-widget-zoom-out"
|
|
664
|
+
}
|
|
665
|
+
)
|
|
666
|
+
] });
|
|
667
|
+
q(ui, element);
|
|
668
|
+
this.deck = deck;
|
|
669
|
+
this.element = element;
|
|
670
|
+
return element;
|
|
671
|
+
}
|
|
672
|
+
onRemove() {
|
|
673
|
+
this.deck = void 0;
|
|
674
|
+
this.element = void 0;
|
|
675
|
+
}
|
|
676
|
+
setProps(props) {
|
|
677
|
+
Object.assign(this.props, props);
|
|
678
|
+
}
|
|
679
|
+
onViewportChange(viewport) {
|
|
680
|
+
this.viewport = viewport;
|
|
681
|
+
}
|
|
682
|
+
handleZoom(nextZoom) {
|
|
683
|
+
const viewId = this.viewId || "default-view";
|
|
684
|
+
const nextViewState = {
|
|
685
|
+
...this.viewport,
|
|
686
|
+
zoom: nextZoom,
|
|
687
|
+
transitionDuration: this.props.transitionDuration,
|
|
688
|
+
transitionInterpolator: new import_core4.FlyToInterpolator()
|
|
689
|
+
};
|
|
690
|
+
this.deck._onViewStateChange({ viewId, viewState: nextViewState, interactionState: {} });
|
|
691
|
+
}
|
|
692
|
+
handleZoomIn() {
|
|
693
|
+
if (this.viewport) {
|
|
694
|
+
this.handleZoom(this.viewport.zoom + 1);
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
handleZoomOut() {
|
|
698
|
+
if (this.viewport) {
|
|
699
|
+
this.handleZoom(this.viewport.zoom - 1);
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
};
|
|
703
|
+
|
|
490
704
|
// src/themes.ts
|
|
491
705
|
var LightTheme = {
|
|
492
706
|
"--button-background": "#fff",
|
|
@@ -495,7 +709,9 @@ var __exports__ = (() => {
|
|
|
495
709
|
"--button-shadow": "0px 0px 8px 0px rgba(0, 0, 0, 0.25)",
|
|
496
710
|
"--button-backdrop-filter": "unset",
|
|
497
711
|
"--button-icon-idle": "rgba(97, 97, 102, 1)",
|
|
498
|
-
"--button-icon-hover": "rgba(24, 24, 26, 1)"
|
|
712
|
+
"--button-icon-hover": "rgba(24, 24, 26, 1)",
|
|
713
|
+
"--icon-compass-north-color": "#F05C44",
|
|
714
|
+
"--icon-compass-south-color": "#C2C2CC"
|
|
499
715
|
};
|
|
500
716
|
var DarkTheme = {
|
|
501
717
|
"--button-background": "rgba(18, 18, 20, 1)",
|
|
@@ -504,7 +720,9 @@ var __exports__ = (() => {
|
|
|
504
720
|
"--button-shadow": "0px 0px 8px 0px rgba(0, 0, 0, 0.25)",
|
|
505
721
|
"--button-backdrop-filter": "unset",
|
|
506
722
|
"--button-icon-idle": "rgba(158, 157, 168, 1)",
|
|
507
|
-
"--button-icon-hover": "rgba(215, 214, 229, 1)"
|
|
723
|
+
"--button-icon-hover": "rgba(215, 214, 229, 1)",
|
|
724
|
+
"--icon-compass-north-color": "#F05C44",
|
|
725
|
+
"--icon-compass-south-color": "#C2C2CC"
|
|
508
726
|
};
|
|
509
727
|
var LightGlassTheme = {
|
|
510
728
|
"--button-background": "rgba(255, 255, 255, 0.6)",
|
|
@@ -513,7 +731,9 @@ var __exports__ = (() => {
|
|
|
513
731
|
"--button-shadow": "0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset",
|
|
514
732
|
"--button-backdrop-filter": "blur(4px)",
|
|
515
733
|
"--button-icon-idle": "rgba(97, 97, 102, 1)",
|
|
516
|
-
"--button-icon-hover": "rgba(24, 24, 26, 1)"
|
|
734
|
+
"--button-icon-hover": "rgba(24, 24, 26, 1)",
|
|
735
|
+
"--icon-compass-north-color": "#F05C44",
|
|
736
|
+
"--icon-compass-south-color": "#C2C2CC"
|
|
517
737
|
};
|
|
518
738
|
var DarkGlassTheme = {
|
|
519
739
|
"--button-background": "rgba(18, 18, 20, 0.75)",
|
|
@@ -522,7 +742,9 @@ var __exports__ = (() => {
|
|
|
522
742
|
"--button-shadow": "0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset",
|
|
523
743
|
"--button-backdrop-filter": "blur(4px)",
|
|
524
744
|
"--button-icon-idle": "rgba(158, 157, 168, 1)",
|
|
525
|
-
"--button-icon-hover": "rgba(215, 214, 229, 1)"
|
|
745
|
+
"--button-icon-hover": "rgba(215, 214, 229, 1)",
|
|
746
|
+
"--icon-compass-north-color": "#F05C44",
|
|
747
|
+
"--icon-compass-south-color": "#C2C2CC"
|
|
526
748
|
};
|
|
527
749
|
return __toCommonJS(bundle_exports);
|
|
528
750
|
})();
|