@deck.gl/widgets 9.0.40 → 9.1.0-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/compass-widget.d.ts +6 -4
- package/dist/compass-widget.d.ts.map +1 -1
- package/dist/compass-widget.js +22 -10
- package/dist/compass-widget.js.map +1 -0
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +4 -0
- package/dist/components.js.map +1 -0
- package/dist/dist.dev.js +214 -168
- package/dist/fullscreen-widget.d.ts +5 -3
- package/dist/fullscreen-widget.d.ts.map +1 -1
- package/dist/fullscreen-widget.js +17 -9
- package/dist/fullscreen-widget.js.map +1 -0
- package/dist/index.cjs +53 -31
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/themes.d.ts.map +1 -1
- package/dist/themes.js +4 -0
- package/dist/themes.js.map +1 -0
- package/dist/zoom-widget.d.ts +6 -4
- package/dist/zoom-widget.d.ts.map +1 -1
- package/dist/zoom-widget.js +27 -12
- package/dist/zoom-widget.js.map +1 -0
- package/dist.min.js +1 -1
- package/package.json +3 -3
- package/src/compass-widget.tsx +29 -13
- package/src/components.tsx +4 -0
- package/src/fullscreen-widget.tsx +23 -11
- package/src/index.ts +8 -0
- package/src/themes.ts +4 -0
- package/src/zoom-widget.tsx +47 -29
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { Deck, Widget, WidgetPlacement } from '@deck.gl/core';
|
|
2
|
-
|
|
2
|
+
export type FullscreenWidgetProps = {
|
|
3
3
|
id?: string;
|
|
4
|
+
/**
|
|
5
|
+
* Widget positioning within the view. Default 'top-left'.
|
|
6
|
+
*/
|
|
4
7
|
placement?: WidgetPlacement;
|
|
5
8
|
/**
|
|
6
9
|
* A [compatible DOM element](https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen#Compatible_elements) which should be made full screen.
|
|
@@ -23,7 +26,7 @@ interface FullscreenWidgetProps {
|
|
|
23
26
|
* Additional CSS class.
|
|
24
27
|
*/
|
|
25
28
|
className?: string;
|
|
26
|
-
}
|
|
29
|
+
};
|
|
27
30
|
export declare class FullscreenWidget implements Widget<FullscreenWidgetProps> {
|
|
28
31
|
id: string;
|
|
29
32
|
props: FullscreenWidgetProps;
|
|
@@ -45,5 +48,4 @@ export declare class FullscreenWidget implements Widget<FullscreenWidgetProps> {
|
|
|
45
48
|
exitFullscreen(): Promise<void>;
|
|
46
49
|
togglePseudoFullscreen(): void;
|
|
47
50
|
}
|
|
48
|
-
export {};
|
|
49
51
|
//# sourceMappingURL=fullscreen-widget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fullscreen-widget.d.ts","sourceRoot":"","sources":["../src/fullscreen-widget.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fullscreen-widget.d.ts","sourceRoot":"","sources":["../src/fullscreen-widget.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAIjE,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B;;;OAGG;IAEH,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACrC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,qBAAa,gBAAiB,YAAW,MAAM,CAAC,qBAAqB,CAAC;IACpE,EAAE,SAAgB;IAClB,KAAK,EAAE,qBAAqB,CAAC;IAC7B,SAAS,EAAE,eAAe,CAAc;IAExC,IAAI,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IACjB,OAAO,CAAC,EAAE,cAAc,CAAC;IAEzB,UAAU,EAAE,OAAO,CAAS;gBAEhB,KAAK,EAAE,qBAAqB;IAYxC,KAAK,CAAC,EAAC,IAAI,EAAC,EAAE;QAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAA;KAAC,GAAG,cAAc;IAahD,QAAQ;IAMR,OAAO,CAAC,MAAM;IAiBd,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,qBAAqB,CAAC;IAoB9C,YAAY;IAIZ,kBAAkB;IASZ,WAAW;IASX,iBAAiB;IASjB,cAAc;IAQpB,sBAAsB;CAGvB"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "preact/jsx-runtime";
|
|
2
|
+
// deck.gl
|
|
3
|
+
// SPDX-License-Identifier: MIT
|
|
4
|
+
// Copyright (c) vis.gl contributors
|
|
2
5
|
/* global document */
|
|
3
6
|
import { _deepEqual as deepEqual, _applyStyles as applyStyles, _removeStyles as removeStyles } from '@deck.gl/core';
|
|
4
7
|
import { render } from 'preact';
|
|
@@ -8,12 +11,14 @@ export class FullscreenWidget {
|
|
|
8
11
|
this.id = 'fullscreen';
|
|
9
12
|
this.placement = 'top-left';
|
|
10
13
|
this.fullscreen = false;
|
|
11
|
-
this.id = props.id
|
|
12
|
-
this.placement = props.placement
|
|
13
|
-
props
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
this.id = props.id ?? this.id;
|
|
15
|
+
this.placement = props.placement ?? this.placement;
|
|
16
|
+
this.props = {
|
|
17
|
+
...props,
|
|
18
|
+
enterLabel: props.enterLabel ?? 'Enter Fullscreen',
|
|
19
|
+
exitLabel: props.exitLabel ?? 'Exit Fullscreen',
|
|
20
|
+
style: props.style ?? {}
|
|
21
|
+
};
|
|
17
22
|
}
|
|
18
23
|
onAdd({ deck }) {
|
|
19
24
|
const { style, className } = this.props;
|
|
@@ -35,14 +40,15 @@ export class FullscreenWidget {
|
|
|
35
40
|
}
|
|
36
41
|
update() {
|
|
37
42
|
const { enterLabel, exitLabel } = this.props;
|
|
38
|
-
const
|
|
39
|
-
if (!
|
|
43
|
+
const element = this.element;
|
|
44
|
+
if (!element) {
|
|
40
45
|
return;
|
|
41
46
|
}
|
|
42
47
|
const ui = (_jsx(IconButton, { onClick: this.handleClick.bind(this), label: this.fullscreen ? exitLabel : enterLabel, className: this.fullscreen ? 'deck-widget-fullscreen-exit' : 'deck-widget-fullscreen-enter' }));
|
|
43
|
-
render(ui,
|
|
48
|
+
render(ui, element);
|
|
44
49
|
}
|
|
45
50
|
setProps(props) {
|
|
51
|
+
this.placement = props.placement ?? this.placement;
|
|
46
52
|
const oldProps = this.props;
|
|
47
53
|
const el = this.element;
|
|
48
54
|
if (el) {
|
|
@@ -58,6 +64,7 @@ export class FullscreenWidget {
|
|
|
58
64
|
}
|
|
59
65
|
}
|
|
60
66
|
Object.assign(this.props, props);
|
|
67
|
+
this.update();
|
|
61
68
|
}
|
|
62
69
|
getContainer() {
|
|
63
70
|
return this.props.container || this.deck?.getCanvas()?.parentElement;
|
|
@@ -100,3 +107,4 @@ export class FullscreenWidget {
|
|
|
100
107
|
this.getContainer()?.classList.toggle('deck-pseudo-fullscreen');
|
|
101
108
|
}
|
|
102
109
|
}
|
|
110
|
+
//# sourceMappingURL=fullscreen-widget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fullscreen-widget.js","sourceRoot":"","sources":["../src/fullscreen-widget.tsx"],"names":[],"mappings":";AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,qBAAqB;AACrB,OAAO,EACL,UAAU,IAAI,SAAS,EACvB,YAAY,IAAI,WAAW,EAC3B,aAAa,IAAI,YAAY,EAC9B,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAC,MAAM,EAAC,MAAM,QAAQ,CAAC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AAC,YAAY,EAAE,MAAM,EAAC,CAAC,CAAC;QAC5D,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAChC,CAAC;IACH,CAAC;IAED,KAAK,CAAC,cAAc;QAClB,IAAI,QAAQ,CAAC,cAAc,EAAE,CAAC;YAC5B,MAAM,QAAQ,CAAC,cAAc,EAAE,CAAC;QAClC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAChC,CAAC;IACH,CAAC;IAED,sBAAsB;QACpB,IAAI,CAAC,YAAY,EAAE,EAAE,SAAS,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;IAClE,CAAC;CACF"}
|
package/dist/index.cjs
CHANGED
|
@@ -56,12 +56,14 @@ var FullscreenWidget = class {
|
|
|
56
56
|
this.id = "fullscreen";
|
|
57
57
|
this.placement = "top-left";
|
|
58
58
|
this.fullscreen = false;
|
|
59
|
-
this.id = props.id
|
|
60
|
-
this.placement = props.placement
|
|
61
|
-
props
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
this.id = props.id ?? this.id;
|
|
60
|
+
this.placement = props.placement ?? this.placement;
|
|
61
|
+
this.props = {
|
|
62
|
+
...props,
|
|
63
|
+
enterLabel: props.enterLabel ?? "Enter Fullscreen",
|
|
64
|
+
exitLabel: props.exitLabel ?? "Exit Fullscreen",
|
|
65
|
+
style: props.style ?? {}
|
|
66
|
+
};
|
|
65
67
|
}
|
|
66
68
|
onAdd({ deck }) {
|
|
67
69
|
const { style, className } = this.props;
|
|
@@ -83,14 +85,15 @@ var FullscreenWidget = class {
|
|
|
83
85
|
}
|
|
84
86
|
update() {
|
|
85
87
|
const { enterLabel, exitLabel } = this.props;
|
|
86
|
-
const
|
|
87
|
-
if (!
|
|
88
|
+
const element = this.element;
|
|
89
|
+
if (!element) {
|
|
88
90
|
return;
|
|
89
91
|
}
|
|
90
92
|
const ui = (0, import_jsx_runtime2.jsx)(IconButton, { onClick: this.handleClick.bind(this), label: this.fullscreen ? exitLabel : enterLabel, className: this.fullscreen ? "deck-widget-fullscreen-exit" : "deck-widget-fullscreen-enter" });
|
|
91
|
-
(0, import_preact.render)(ui,
|
|
93
|
+
(0, import_preact.render)(ui, element);
|
|
92
94
|
}
|
|
93
95
|
setProps(props) {
|
|
96
|
+
this.placement = props.placement ?? this.placement;
|
|
94
97
|
const oldProps = this.props;
|
|
95
98
|
const el = this.element;
|
|
96
99
|
if (el) {
|
|
@@ -106,6 +109,7 @@ var FullscreenWidget = class {
|
|
|
106
109
|
}
|
|
107
110
|
}
|
|
108
111
|
Object.assign(this.props, props);
|
|
112
|
+
this.update();
|
|
109
113
|
}
|
|
110
114
|
getContainer() {
|
|
111
115
|
var _a, _b;
|
|
@@ -158,15 +162,19 @@ var CompassWidget = class {
|
|
|
158
162
|
this.placement = "top-left";
|
|
159
163
|
this.viewId = null;
|
|
160
164
|
this.viewports = {};
|
|
161
|
-
this.id = props.id
|
|
162
|
-
this.viewId = props.viewId
|
|
163
|
-
this.placement = props.placement
|
|
164
|
-
props
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
165
|
+
this.id = props.id ?? this.id;
|
|
166
|
+
this.viewId = props.viewId ?? this.viewId;
|
|
167
|
+
this.placement = props.placement ?? this.placement;
|
|
168
|
+
this.props = {
|
|
169
|
+
...props,
|
|
170
|
+
transitionDuration: props.transitionDuration ?? 200,
|
|
171
|
+
label: props.label ?? "Reset Compass",
|
|
172
|
+
style: props.style ?? {}
|
|
173
|
+
};
|
|
168
174
|
}
|
|
169
175
|
setProps(props) {
|
|
176
|
+
this.placement = props.placement ?? this.placement;
|
|
177
|
+
this.viewId = props.viewId ?? this.viewId;
|
|
170
178
|
const oldProps = this.props;
|
|
171
179
|
const el = this.element;
|
|
172
180
|
if (el) {
|
|
@@ -182,10 +190,13 @@ var CompassWidget = class {
|
|
|
182
190
|
}
|
|
183
191
|
}
|
|
184
192
|
Object.assign(this.props, props);
|
|
193
|
+
this.update();
|
|
185
194
|
}
|
|
186
195
|
onViewportChange(viewport) {
|
|
187
|
-
this.viewports[viewport.id]
|
|
188
|
-
|
|
196
|
+
if (!viewport.equals(this.viewports[viewport.id])) {
|
|
197
|
+
this.viewports[viewport.id] = viewport;
|
|
198
|
+
this.update();
|
|
199
|
+
}
|
|
189
200
|
}
|
|
190
201
|
onAdd({ deck }) {
|
|
191
202
|
const { style, className } = this.props;
|
|
@@ -220,7 +231,7 @@ var CompassWidget = class {
|
|
|
220
231
|
for (const viewport2 of Object.values(this.viewports)) {
|
|
221
232
|
this.handleCompassReset(viewport2);
|
|
222
233
|
}
|
|
223
|
-
},
|
|
234
|
+
}, title: this.props.label, style: { transform: `rotateX(${rx}deg)` }, children: (0, import_jsx_runtime3.jsx)("svg", { fill: "none", width: "100%", height: "100%", viewBox: "0 0 26 26", children: (0, import_jsx_runtime3.jsxs)("g", { transform: `rotate(${rz},13,13)`, children: [(0, import_jsx_runtime3.jsx)("path", { d: "M10 13.0001L12.9999 5L15.9997 13.0001H10Z", fill: "var(--icon-compass-north-color, #F05C44)" }), (0, import_jsx_runtime3.jsx)("path", { d: "M16.0002 12.9999L13.0004 21L10.0005 12.9999H16.0002Z", fill: "var(--icon-compass-south-color, #C2C2CC)" })] }) }) }) });
|
|
224
235
|
(0, import_preact2.render)(ui, element);
|
|
225
236
|
}
|
|
226
237
|
onRemove() {
|
|
@@ -250,18 +261,19 @@ var ZoomWidget = class {
|
|
|
250
261
|
constructor(props) {
|
|
251
262
|
this.id = "zoom";
|
|
252
263
|
this.placement = "top-left";
|
|
253
|
-
this.orientation = "vertical";
|
|
254
264
|
this.viewId = null;
|
|
255
265
|
this.viewports = {};
|
|
256
|
-
this.id = props.id
|
|
257
|
-
this.viewId = props.viewId
|
|
258
|
-
this.placement = props.placement
|
|
259
|
-
this.
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
266
|
+
this.id = props.id ?? this.id;
|
|
267
|
+
this.viewId = props.viewId ?? this.viewId;
|
|
268
|
+
this.placement = props.placement ?? this.placement;
|
|
269
|
+
this.props = {
|
|
270
|
+
...props,
|
|
271
|
+
orientation: props.orientation ?? "vertical",
|
|
272
|
+
transitionDuration: props.transitionDuration ?? 200,
|
|
273
|
+
zoomInLabel: props.zoomInLabel ?? "Zoom In",
|
|
274
|
+
zoomOutLabel: props.zoomOutLabel ?? "Zoom Out",
|
|
275
|
+
style: props.style ?? {}
|
|
276
|
+
};
|
|
265
277
|
}
|
|
266
278
|
onAdd({ deck }) {
|
|
267
279
|
const { style, className } = this.props;
|
|
@@ -270,10 +282,9 @@ var ZoomWidget = class {
|
|
|
270
282
|
if (className)
|
|
271
283
|
element.classList.add(className);
|
|
272
284
|
(0, import_core3._applyStyles)(element, style);
|
|
273
|
-
const ui = (0, import_jsx_runtime4.jsxs)(ButtonGroup, { orientation: this.orientation, children: [(0, import_jsx_runtime4.jsx)(GroupedIconButton, { onClick: () => this.handleZoomIn(), label: this.props.zoomInLabel, className: "deck-widget-zoom-in" }), (0, import_jsx_runtime4.jsx)(GroupedIconButton, { onClick: () => this.handleZoomOut(), label: this.props.zoomOutLabel, className: "deck-widget-zoom-out" })] });
|
|
274
|
-
(0, import_preact3.render)(ui, element);
|
|
275
285
|
this.deck = deck;
|
|
276
286
|
this.element = element;
|
|
287
|
+
this.update();
|
|
277
288
|
return element;
|
|
278
289
|
}
|
|
279
290
|
onRemove() {
|
|
@@ -281,6 +292,8 @@ var ZoomWidget = class {
|
|
|
281
292
|
this.element = void 0;
|
|
282
293
|
}
|
|
283
294
|
setProps(props) {
|
|
295
|
+
this.placement = props.placement ?? this.placement;
|
|
296
|
+
this.viewId = props.viewId ?? this.viewId;
|
|
284
297
|
const oldProps = this.props;
|
|
285
298
|
const el = this.element;
|
|
286
299
|
if (el) {
|
|
@@ -296,6 +309,7 @@ var ZoomWidget = class {
|
|
|
296
309
|
}
|
|
297
310
|
}
|
|
298
311
|
Object.assign(this.props, props);
|
|
312
|
+
this.update();
|
|
299
313
|
}
|
|
300
314
|
onViewportChange(viewport) {
|
|
301
315
|
this.viewports[viewport.id] = viewport;
|
|
@@ -320,6 +334,14 @@ var ZoomWidget = class {
|
|
|
320
334
|
this.handleZoom(viewport, viewport.zoom - 1);
|
|
321
335
|
}
|
|
322
336
|
}
|
|
337
|
+
update() {
|
|
338
|
+
const element = this.element;
|
|
339
|
+
if (!element) {
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
const ui = (0, import_jsx_runtime4.jsxs)(ButtonGroup, { orientation: this.props.orientation, children: [(0, import_jsx_runtime4.jsx)(GroupedIconButton, { onClick: () => this.handleZoomIn(), label: this.props.zoomInLabel, className: "deck-widget-zoom-in" }), (0, import_jsx_runtime4.jsx)(GroupedIconButton, { onClick: () => this.handleZoomOut(), label: this.props.zoomOutLabel, className: "deck-widget-zoom-out" })] });
|
|
343
|
+
(0, import_preact3.render)(ui, element);
|
|
344
|
+
}
|
|
323
345
|
};
|
|
324
346
|
|
|
325
347
|
// dist/themes.js
|
package/dist/index.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["index.
|
|
4
|
-
"sourcesContent": ["export { FullscreenWidget } from \"./fullscreen-widget.js\";\nexport { CompassWidget } from \"./compass-widget.js\";\nexport { ZoomWidget } from \"./zoom-widget.js\";\nexport * from \"./themes.js\";\n", "import { jsx as _jsx } from \"preact/jsx-runtime\";\n/* global document */\nimport { _deepEqual as deepEqual, _applyStyles as applyStyles, _removeStyles as removeStyles } from '@deck.gl/core';\nimport { render } from 'preact';\nimport { IconButton } from \"./components.js\";\nexport class FullscreenWidget {\n constructor(props) {\n this.id = 'fullscreen';\n this.placement = 'top-left';\n this.fullscreen = false;\n this.id = props.id || 'fullscreen';\n this.placement = props.placement || 'top-left';\n props.enterLabel = props.enterLabel || 'Enter Fullscreen';\n props.exitLabel = props.exitLabel || 'Exit Fullscreen';\n props.style = props.style || {};\n this.props = props;\n }\n onAdd({ deck }) {\n const { style, className } = this.props;\n const el = document.createElement('div');\n el.classList.add('deck-widget', 'deck-widget-fullscreen');\n if (className)\n el.classList.add(className);\n applyStyles(el, style);\n this.deck = deck;\n this.element = el;\n this.update();\n document.addEventListener('fullscreenchange', this.onFullscreenChange.bind(this));\n return el;\n }\n onRemove() {\n this.deck = undefined;\n this.element = undefined;\n document.removeEventListener('fullscreenchange', this.onFullscreenChange.bind(this));\n }\n update() {\n const { enterLabel, exitLabel } = this.props;\n const el = this.element;\n if (!el) {\n return;\n }\n const ui = (_jsx(IconButton, { onClick: this.handleClick.bind(this), label: this.fullscreen ? exitLabel : enterLabel, className: this.fullscreen ? 'deck-widget-fullscreen-exit' : 'deck-widget-fullscreen-enter' }));\n render(ui, el);\n }\n setProps(props) {\n const oldProps = this.props;\n const el = this.element;\n if (el) {\n if (oldProps.className !== props.className) {\n if (oldProps.className)\n el.classList.remove(oldProps.className);\n if (props.className)\n el.classList.add(props.className);\n }\n if (!deepEqual(oldProps.style, props.style, 1)) {\n removeStyles(el, oldProps.style);\n applyStyles(el, props.style);\n }\n }\n Object.assign(this.props, props);\n }\n getContainer() {\n return this.props.container || this.deck?.getCanvas()?.parentElement;\n }\n onFullscreenChange() {\n const prevFullscreen = this.fullscreen;\n const fullscreen = document.fullscreenElement === this.getContainer();\n if (prevFullscreen !== fullscreen) {\n this.fullscreen = !this.fullscreen;\n }\n this.update();\n }\n async handleClick() {\n if (this.fullscreen) {\n await this.exitFullscreen();\n }\n else {\n await this.requestFullscreen();\n }\n this.update();\n }\n async requestFullscreen() {\n const container = this.getContainer();\n if (container?.requestFullscreen) {\n await container.requestFullscreen({ navigationUI: 'hide' });\n }\n else {\n this.togglePseudoFullscreen();\n }\n }\n async exitFullscreen() {\n if (document.exitFullscreen) {\n await document.exitFullscreen();\n }\n else {\n this.togglePseudoFullscreen();\n }\n }\n togglePseudoFullscreen() {\n this.getContainer()?.classList.toggle('deck-pseudo-fullscreen');\n }\n}\n", "import { jsx as _jsx } from \"preact/jsx-runtime\";\nexport const IconButton = props => {\n const { className, label, onClick } = props;\n return (_jsx(\"div\", { className: \"deck-widget-button\", children: _jsx(\"button\", { className: `deck-widget-icon-button ${className}`, type: \"button\", onClick: onClick, title: label, children: _jsx(\"div\", { className: \"deck-widget-icon\" }) }) }));\n};\nexport const ButtonGroup = props => {\n const { children, orientation } = props;\n return _jsx(\"div\", { className: `deck-widget-button-group ${orientation}`, children: children });\n};\nexport const GroupedIconButton = props => {\n const { className, label, onClick } = props;\n return (_jsx(\"button\", { className: `deck-widget-icon-button ${className}`, type: \"button\", onClick: onClick, title: label, children: _jsx(\"div\", { className: \"deck-widget-icon\" }) }));\n};\n", "import { jsx as _jsx, jsxs as _jsxs } from \"preact/jsx-runtime\";\n/* global document */\nimport { FlyToInterpolator, WebMercatorViewport, _GlobeViewport, _deepEqual as deepEqual, _applyStyles as applyStyles, _removeStyles as removeStyles } from '@deck.gl/core';\nimport { render } from 'preact';\nexport class CompassWidget {\n constructor(props) {\n this.id = 'compass';\n this.placement = 'top-left';\n this.viewId = null;\n this.viewports = {};\n this.id = props.id || 'compass';\n this.viewId = props.viewId || null;\n this.placement = props.placement || 'top-left';\n props.transitionDuration = props.transitionDuration || 200;\n props.label = props.label || 'Compass';\n props.style = props.style || {};\n this.props = props;\n }\n setProps(props) {\n const oldProps = this.props;\n const el = this.element;\n if (el) {\n if (oldProps.className !== props.className) {\n if (oldProps.className)\n el.classList.remove(oldProps.className);\n if (props.className)\n el.classList.add(props.className);\n }\n if (!deepEqual(oldProps.style, props.style, 1)) {\n removeStyles(el, oldProps.style);\n applyStyles(el, props.style);\n }\n }\n Object.assign(this.props, props);\n }\n onViewportChange(viewport) {\n this.viewports[viewport.id] = viewport;\n this.update();\n }\n onAdd({ deck }) {\n const { style, className } = this.props;\n const element = document.createElement('div');\n element.classList.add('deck-widget', 'deck-widget-compass');\n if (className)\n element.classList.add(className);\n applyStyles(element, style);\n this.deck = deck;\n this.element = element;\n this.update();\n return element;\n }\n getRotation(viewport) {\n if (viewport instanceof WebMercatorViewport) {\n return [-viewport.bearing, viewport.pitch];\n }\n else if (viewport instanceof _GlobeViewport) {\n return [0, Math.max(-80, Math.min(80, viewport.latitude))];\n }\n return [0, 0];\n }\n update() {\n const viewId = this.viewId || Object.values(this.viewports)[0]?.id || 'default-view';\n const viewport = this.viewports[viewId];\n const [rz, rx] = this.getRotation(viewport);\n const element = this.element;\n if (!element) {\n return;\n }\n const ui = (_jsx(\"div\", { className: \"deck-widget-button\", style: { perspective: 100 }, children: _jsx(\"button\", { type: \"button\", onClick: () => {\n for (const viewport of Object.values(this.viewports)) {\n this.handleCompassReset(viewport);\n }\n }, label: this.props.label, style: { transform: `rotateX(${rx}deg)` }, children: _jsx(\"svg\", { fill: \"none\", width: \"100%\", height: \"100%\", viewBox: \"0 0 26 26\", children: _jsxs(\"g\", { transform: `rotate(${rz},13,13)`, children: [_jsx(\"path\", { d: \"M10 13.0001L12.9999 5L15.9997 13.0001H10Z\", fill: \"var(--icon-compass-north-color, #F05C44)\" }), _jsx(\"path\", { d: \"M16.0002 12.9999L13.0004 21L10.0005 12.9999H16.0002Z\", fill: \"var(--icon-compass-south-color, #C2C2CC)\" })] }) }) }) }));\n render(ui, element);\n }\n onRemove() {\n this.deck = undefined;\n this.element = undefined;\n }\n handleCompassReset(viewport) {\n const viewId = this.viewId || viewport.id || 'default-view';\n if (viewport instanceof WebMercatorViewport) {\n const nextViewState = {\n ...viewport,\n bearing: 0,\n ...(this.getRotation(viewport)[0] === 0 ? { pitch: 0 } : {}),\n transitionDuration: this.props.transitionDuration,\n transitionInterpolator: new FlyToInterpolator()\n };\n // @ts-ignore Using private method temporary until there's a public one\n this.deck._onViewStateChange({ viewId, viewState: nextViewState, interactionState: {} });\n }\n }\n}\n", "import { jsx as _jsx, jsxs as _jsxs } from \"preact/jsx-runtime\";\n/* global document */\nimport { FlyToInterpolator, _deepEqual as deepEqual, _applyStyles as applyStyles, _removeStyles as removeStyles } from '@deck.gl/core';\nimport { render } from 'preact';\nimport { ButtonGroup, GroupedIconButton } from \"./components.js\";\nexport class ZoomWidget {\n constructor(props) {\n this.id = 'zoom';\n this.placement = 'top-left';\n this.orientation = 'vertical';\n this.viewId = null;\n this.viewports = {};\n this.id = props.id || 'zoom';\n this.viewId = props.viewId || null;\n this.placement = props.placement || 'top-left';\n this.orientation = props.orientation || 'vertical';\n props.transitionDuration = props.transitionDuration || 200;\n props.zoomInLabel = props.zoomInLabel || 'Zoom In';\n props.zoomOutLabel = props.zoomOutLabel || 'Zoom Out';\n props.style = props.style || {};\n this.props = props;\n }\n onAdd({ deck }) {\n const { style, className } = this.props;\n const element = document.createElement('div');\n element.classList.add('deck-widget', 'deck-widget-zoom');\n if (className)\n element.classList.add(className);\n applyStyles(element, style);\n const ui = (_jsxs(ButtonGroup, { orientation: this.orientation, children: [_jsx(GroupedIconButton, { onClick: () => this.handleZoomIn(), label: this.props.zoomInLabel, className: \"deck-widget-zoom-in\" }), _jsx(GroupedIconButton, { onClick: () => this.handleZoomOut(), label: this.props.zoomOutLabel, className: \"deck-widget-zoom-out\" })] }));\n render(ui, element);\n this.deck = deck;\n this.element = element;\n return element;\n }\n onRemove() {\n this.deck = undefined;\n this.element = undefined;\n }\n setProps(props) {\n const oldProps = this.props;\n const el = this.element;\n if (el) {\n if (oldProps.className !== props.className) {\n if (oldProps.className)\n el.classList.remove(oldProps.className);\n if (props.className)\n el.classList.add(props.className);\n }\n if (!deepEqual(oldProps.style, props.style, 1)) {\n removeStyles(el, oldProps.style);\n applyStyles(el, props.style);\n }\n }\n Object.assign(this.props, props);\n }\n onViewportChange(viewport) {\n this.viewports[viewport.id] = viewport;\n }\n handleZoom(viewport, nextZoom) {\n const viewId = this.viewId || viewport?.id || 'default-view';\n const nextViewState = {\n ...viewport,\n zoom: nextZoom,\n transitionDuration: this.props.transitionDuration,\n transitionInterpolator: new FlyToInterpolator()\n };\n // @ts-ignore Using private method temporary until there's a public one\n this.deck._onViewStateChange({ viewId, viewState: nextViewState, interactionState: {} });\n }\n handleZoomIn() {\n for (const viewport of Object.values(this.viewports)) {\n this.handleZoom(viewport, viewport.zoom + 1);\n }\n }\n handleZoomOut() {\n for (const viewport of Object.values(this.viewports)) {\n this.handleZoom(viewport, viewport.zoom - 1);\n }\n }\n}\n", "export const LightTheme = {\n '--button-background': '#fff',\n '--button-stroke': 'rgba(255, 255, 255, 0.3)',\n '--button-inner-stroke': 'unset',\n '--button-shadow': '0px 0px 8px 0px rgba(0, 0, 0, 0.25)',\n '--button-backdrop-filter': 'unset',\n '--button-icon-idle': 'rgba(97, 97, 102, 1)',\n '--button-icon-hover': 'rgba(24, 24, 26, 1)',\n '--icon-compass-north-color': '#F05C44',\n '--icon-compass-south-color': '#C2C2CC'\n};\nexport const DarkTheme = {\n '--button-background': 'rgba(18, 18, 20, 1)',\n '--button-stroke': 'rgba(18, 18, 20, 0.30)',\n '--button-inner-stroke': 'unset',\n '--button-shadow': '0px 0px 8px 0px rgba(0, 0, 0, 0.25)',\n '--button-backdrop-filter': 'unset',\n '--button-icon-idle': 'rgba(158, 157, 168, 1)',\n '--button-icon-hover': 'rgba(215, 214, 229, 1)',\n '--icon-compass-north-color': '#F05C44',\n '--icon-compass-south-color': '#C2C2CC'\n};\nexport const LightGlassTheme = {\n '--button-background': 'rgba(255, 255, 255, 0.6)',\n '--button-stroke': 'rgba(255, 255, 255, 0.3)',\n '--button-inner-stroke': '1px solid rgba(255, 255, 255, 0.6)',\n '--button-shadow': '0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset',\n '--button-backdrop-filter': 'blur(4px)',\n '--button-icon-idle': 'rgba(97, 97, 102, 1)',\n '--button-icon-hover': 'rgba(24, 24, 26, 1)',\n '--icon-compass-north-color': '#F05C44',\n '--icon-compass-south-color': '#C2C2CC'\n};\nexport const DarkGlassTheme = {\n '--button-background': 'rgba(18, 18, 20, 0.75)',\n '--button-stroke': 'rgba(18, 18, 20, 0.30)',\n '--button-inner-stroke': '1px solid rgba(18, 18, 20, 0.75)',\n '--button-shadow': '0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset',\n '--button-backdrop-filter': 'blur(4px)',\n '--button-icon-idle': 'rgba(158, 157, 168, 1)',\n '--button-icon-hover': 'rgba(215, 214, 229, 1)',\n '--icon-compass-north-color': '#F05C44',\n '--icon-compass-south-color': '#C2C2CC'\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA
|
|
6
|
-
"names": ["
|
|
3
|
+
"sources": ["../src/index.ts", "../src/fullscreen-widget.tsx", "../src/components.tsx", "../src/compass-widget.tsx", "../src/zoom-widget.tsx", "../src/themes.ts"],
|
|
4
|
+
"sourcesContent": ["// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nexport {FullscreenWidget} from './fullscreen-widget';\nexport {CompassWidget} from './compass-widget';\nexport {ZoomWidget} from './zoom-widget';\n\nexport type {FullscreenWidgetProps} from './fullscreen-widget';\nexport type {CompassWidgetProps} from './compass-widget';\nexport type {ZoomWidgetProps} from './zoom-widget';\n\nexport * from './themes';\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n/* global document */\nimport {\n _deepEqual as deepEqual,\n _applyStyles as applyStyles,\n _removeStyles as removeStyles\n} from '@deck.gl/core';\nimport type {Deck, Widget, WidgetPlacement} from '@deck.gl/core';\nimport {render} from 'preact';\nimport {IconButton} from './components';\n\nexport type FullscreenWidgetProps = {\n id?: string;\n /**\n * Widget positioning within the view. Default 'top-left'.\n */\n placement?: WidgetPlacement;\n /**\n * A [compatible DOM element](https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen#Compatible_elements) which should be made full screen.\n * By default, the map container element will be made full screen.\n */\n /* eslint-enable max-len */\n container?: HTMLElement;\n /**\n * Tooltip message when out of fullscreen.\n */\n enterLabel?: string;\n /**\n * Tooltip message when fullscreen.\n */\n exitLabel?: string;\n /**\n * CSS inline style overrides.\n */\n style?: Partial<CSSStyleDeclaration>;\n /**\n * Additional CSS class.\n */\n className?: string;\n};\n\nexport class FullscreenWidget implements Widget<FullscreenWidgetProps> {\n id = 'fullscreen';\n props: FullscreenWidgetProps;\n placement: WidgetPlacement = 'top-left';\n\n deck?: Deck<any>;\n element?: HTMLDivElement;\n\n fullscreen: boolean = false;\n\n constructor(props: FullscreenWidgetProps) {\n this.id = props.id ?? this.id;\n this.placement = props.placement ?? this.placement;\n\n this.props = {\n ...props,\n enterLabel: props.enterLabel ?? 'Enter Fullscreen',\n exitLabel: props.exitLabel ?? 'Exit Fullscreen',\n style: props.style ?? {}\n };\n }\n\n onAdd({deck}: {deck: Deck<any>}): HTMLDivElement {\n const {style, className} = this.props;\n const el = document.createElement('div');\n el.classList.add('deck-widget', 'deck-widget-fullscreen');\n if (className) el.classList.add(className);\n applyStyles(el, style);\n this.deck = deck;\n this.element = el;\n this.update();\n document.addEventListener('fullscreenchange', this.onFullscreenChange.bind(this));\n return el;\n }\n\n onRemove() {\n this.deck = undefined;\n this.element = undefined;\n document.removeEventListener('fullscreenchange', this.onFullscreenChange.bind(this));\n }\n\n private update() {\n const {enterLabel, exitLabel} = this.props;\n const element = this.element;\n if (!element) {\n return;\n }\n\n const ui = (\n <IconButton\n onClick={this.handleClick.bind(this)}\n label={this.fullscreen ? exitLabel : enterLabel}\n className={this.fullscreen ? 'deck-widget-fullscreen-exit' : 'deck-widget-fullscreen-enter'}\n />\n );\n render(ui, element);\n }\n\n setProps(props: Partial<FullscreenWidgetProps>) {\n this.placement = props.placement ?? this.placement;\n const oldProps = this.props;\n const el = this.element;\n if (el) {\n if (oldProps.className !== props.className) {\n if (oldProps.className) el.classList.remove(oldProps.className);\n if (props.className) el.classList.add(props.className);\n }\n\n if (!deepEqual(oldProps.style, props.style, 1)) {\n removeStyles(el, oldProps.style);\n applyStyles(el, props.style);\n }\n }\n\n Object.assign(this.props, props);\n this.update();\n }\n\n getContainer() {\n return this.props.container || this.deck?.getCanvas()?.parentElement;\n }\n\n onFullscreenChange() {\n const prevFullscreen = this.fullscreen;\n const fullscreen = document.fullscreenElement === this.getContainer();\n if (prevFullscreen !== fullscreen) {\n this.fullscreen = !this.fullscreen;\n }\n this.update();\n }\n\n async handleClick() {\n if (this.fullscreen) {\n await this.exitFullscreen();\n } else {\n await this.requestFullscreen();\n }\n this.update();\n }\n\n async requestFullscreen() {\n const container = this.getContainer();\n if (container?.requestFullscreen) {\n await container.requestFullscreen({navigationUI: 'hide'});\n } else {\n this.togglePseudoFullscreen();\n }\n }\n\n async exitFullscreen() {\n if (document.exitFullscreen) {\n await document.exitFullscreen();\n } else {\n this.togglePseudoFullscreen();\n }\n }\n\n togglePseudoFullscreen() {\n this.getContainer()?.classList.toggle('deck-pseudo-fullscreen');\n }\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nexport const IconButton = props => {\n const {className, label, onClick} = props;\n return (\n <div className=\"deck-widget-button\">\n <button\n className={`deck-widget-icon-button ${className}`}\n type=\"button\"\n onClick={onClick}\n title={label}\n >\n <div className=\"deck-widget-icon\" />\n </button>\n </div>\n );\n};\n\nexport const ButtonGroup = props => {\n const {children, orientation} = props;\n return <div className={`deck-widget-button-group ${orientation}`}>{children}</div>;\n};\n\nexport const GroupedIconButton = props => {\n const {className, label, onClick} = props;\n return (\n <button\n className={`deck-widget-icon-button ${className}`}\n type=\"button\"\n onClick={onClick}\n title={label}\n >\n <div className=\"deck-widget-icon\" />\n </button>\n );\n};\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n/* global document */\nimport {\n FlyToInterpolator,\n WebMercatorViewport,\n _GlobeViewport,\n _deepEqual as deepEqual,\n _applyStyles as applyStyles,\n _removeStyles as removeStyles\n} from '@deck.gl/core';\nimport type {Deck, Viewport, Widget, WidgetPlacement} from '@deck.gl/core';\nimport {render} from 'preact';\n\nexport type CompassWidgetProps = {\n id?: string;\n /**\n * Widget positioning within the view. Default 'top-left'.\n */\n placement?: WidgetPlacement;\n /**\n * View to attach to and interact with. Required when using multiple views.\n */\n viewId?: string | null;\n /**\n * Tooltip message.\n */\n label?: string;\n /**\n * Bearing and pitch reset transition duration in ms.\n */\n transitionDuration?: number;\n /**\n * CSS inline style overrides.\n */\n style?: Partial<CSSStyleDeclaration>;\n /**\n * Additional CSS class.\n */\n className?: string;\n};\n\nexport class CompassWidget implements Widget<CompassWidgetProps> {\n id = 'compass';\n props: CompassWidgetProps;\n placement: WidgetPlacement = 'top-left';\n viewId?: string | null = null;\n viewports: {[id: string]: Viewport} = {};\n deck?: Deck<any>;\n element?: HTMLDivElement;\n\n constructor(props: CompassWidgetProps) {\n this.id = props.id ?? this.id;\n this.viewId = props.viewId ?? this.viewId;\n this.placement = props.placement ?? this.placement;\n\n this.props = {\n ...props,\n transitionDuration: props.transitionDuration ?? 200,\n label: props.label ?? 'Reset Compass',\n style: props.style ?? {}\n };\n }\n\n setProps(props: Partial<CompassWidgetProps>) {\n this.placement = props.placement ?? this.placement;\n this.viewId = props.viewId ?? this.viewId;\n const oldProps = this.props;\n const el = this.element;\n if (el) {\n if (oldProps.className !== props.className) {\n if (oldProps.className) el.classList.remove(oldProps.className);\n if (props.className) el.classList.add(props.className);\n }\n\n if (!deepEqual(oldProps.style, props.style, 1)) {\n removeStyles(el, oldProps.style);\n applyStyles(el, props.style);\n }\n }\n\n Object.assign(this.props, props);\n this.update();\n }\n\n onViewportChange(viewport: Viewport) {\n // no need to update if viewport is the same\n if (!viewport.equals(this.viewports[viewport.id])) {\n this.viewports[viewport.id] = viewport;\n this.update();\n }\n }\n\n onAdd({deck}: {deck: Deck<any>}): HTMLDivElement {\n const {style, className} = this.props;\n const element = document.createElement('div');\n element.classList.add('deck-widget', 'deck-widget-compass');\n if (className) element.classList.add(className);\n applyStyles(element, style);\n this.deck = deck;\n this.element = element;\n this.update();\n return element;\n }\n\n getRotation(viewport?: Viewport) {\n if (viewport instanceof WebMercatorViewport) {\n return [-viewport.bearing, viewport.pitch];\n } else if (viewport instanceof _GlobeViewport) {\n return [0, Math.max(-80, Math.min(80, viewport.latitude))];\n }\n return [0, 0];\n }\n\n private update() {\n const viewId = this.viewId || Object.values(this.viewports)[0]?.id || 'default-view';\n const viewport = this.viewports[viewId];\n const [rz, rx] = this.getRotation(viewport);\n const element = this.element;\n if (!element) {\n return;\n }\n const ui = (\n <div className=\"deck-widget-button\" style={{perspective: 100}}>\n <button\n type=\"button\"\n onClick={() => {\n for (const viewport of Object.values(this.viewports)) {\n this.handleCompassReset(viewport);\n }\n }}\n title={this.props.label}\n style={{transform: `rotateX(${rx}deg)`}}\n >\n <svg fill=\"none\" width=\"100%\" height=\"100%\" viewBox=\"0 0 26 26\">\n <g transform={`rotate(${rz},13,13)`}>\n <path\n d=\"M10 13.0001L12.9999 5L15.9997 13.0001H10Z\"\n fill=\"var(--icon-compass-north-color, #F05C44)\"\n />\n <path\n d=\"M16.0002 12.9999L13.0004 21L10.0005 12.9999H16.0002Z\"\n fill=\"var(--icon-compass-south-color, #C2C2CC)\"\n />\n </g>\n </svg>\n </button>\n </div>\n );\n render(ui, element);\n }\n\n onRemove() {\n this.deck = undefined;\n this.element = undefined;\n }\n\n handleCompassReset(viewport: Viewport) {\n const viewId = this.viewId || viewport.id || 'default-view';\n if (viewport instanceof WebMercatorViewport) {\n const nextViewState = {\n ...viewport,\n bearing: 0,\n ...(this.getRotation(viewport)[0] === 0 ? {pitch: 0} : {}),\n transitionDuration: this.props.transitionDuration,\n transitionInterpolator: new FlyToInterpolator()\n };\n // @ts-ignore Using private method temporary until there's a public one\n this.deck._onViewStateChange({viewId, viewState: nextViewState, interactionState: {}});\n }\n }\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n/* global document */\nimport {\n FlyToInterpolator,\n _deepEqual as deepEqual,\n _applyStyles as applyStyles,\n _removeStyles as removeStyles\n} from '@deck.gl/core';\nimport type {Deck, Viewport, Widget, WidgetPlacement} from '@deck.gl/core';\nimport {render} from 'preact';\nimport {ButtonGroup, GroupedIconButton} from './components';\n\nexport type ZoomWidgetProps = {\n id?: string;\n /**\n * Widget positioning within the view. Default 'top-left'.\n */\n placement?: WidgetPlacement;\n /**\n * View to attach to and interact with. Required when using multiple views.\n */\n viewId?: string | null;\n /**\n * Button orientation.\n */\n orientation?: 'vertical' | 'horizontal';\n /**\n * Tooltip message on zoom in button.\n */\n zoomInLabel?: string;\n /**\n * Tooltip message on zoom out button.\n */\n zoomOutLabel?: string;\n /**\n * Zoom transition duration in ms.\n */\n transitionDuration?: number;\n /**\n * CSS inline style overrides.\n */\n style?: Partial<CSSStyleDeclaration>;\n /**\n * Additional CSS class.\n */\n className?: string;\n};\n\nexport class ZoomWidget implements Widget<ZoomWidgetProps> {\n id = 'zoom';\n props: ZoomWidgetProps;\n placement: WidgetPlacement = 'top-left';\n viewId?: string | null = null;\n viewports: {[id: string]: Viewport} = {};\n deck?: Deck<any>;\n element?: HTMLDivElement;\n\n constructor(props: ZoomWidgetProps) {\n this.id = props.id ?? this.id;\n this.viewId = props.viewId ?? this.viewId;\n this.placement = props.placement ?? this.placement;\n\n this.props = {\n ...props,\n orientation: props.orientation ?? 'vertical',\n transitionDuration: props.transitionDuration ?? 200,\n zoomInLabel: props.zoomInLabel ?? 'Zoom In',\n zoomOutLabel: props.zoomOutLabel ?? 'Zoom Out',\n style: props.style ?? {}\n };\n }\n\n onAdd({deck}: {deck: Deck<any>}): HTMLDivElement {\n const {style, className} = this.props;\n const element = document.createElement('div');\n element.classList.add('deck-widget', 'deck-widget-zoom');\n if (className) element.classList.add(className);\n applyStyles(element, style);\n this.deck = deck;\n this.element = element;\n this.update();\n return element;\n }\n\n onRemove() {\n this.deck = undefined;\n this.element = undefined;\n }\n\n setProps(props: Partial<ZoomWidgetProps>) {\n this.placement = props.placement ?? this.placement;\n this.viewId = props.viewId ?? this.viewId;\n const oldProps = this.props;\n const el = this.element;\n if (el) {\n if (oldProps.className !== props.className) {\n if (oldProps.className) el.classList.remove(oldProps.className);\n if (props.className) el.classList.add(props.className);\n }\n\n if (!deepEqual(oldProps.style, props.style, 1)) {\n removeStyles(el, oldProps.style);\n applyStyles(el, props.style);\n }\n }\n\n Object.assign(this.props, props);\n this.update();\n }\n\n onViewportChange(viewport: Viewport) {\n this.viewports[viewport.id] = viewport;\n }\n\n handleZoom(viewport: Viewport, nextZoom: number) {\n const viewId = this.viewId || viewport?.id || 'default-view';\n const nextViewState = {\n ...viewport,\n zoom: nextZoom,\n transitionDuration: this.props.transitionDuration,\n transitionInterpolator: new FlyToInterpolator()\n };\n // @ts-ignore Using private method temporary until there's a public one\n this.deck._onViewStateChange({viewId, viewState: nextViewState, interactionState: {}});\n }\n\n handleZoomIn() {\n for (const viewport of Object.values(this.viewports)) {\n this.handleZoom(viewport, viewport.zoom + 1);\n }\n }\n\n handleZoomOut() {\n for (const viewport of Object.values(this.viewports)) {\n this.handleZoom(viewport, viewport.zoom - 1);\n }\n }\n\n private update() {\n const element = this.element;\n if (!element) {\n return;\n }\n const ui = (\n <ButtonGroup orientation={this.props.orientation}>\n <GroupedIconButton\n onClick={() => this.handleZoomIn()}\n label={this.props.zoomInLabel}\n className=\"deck-widget-zoom-in\"\n />\n <GroupedIconButton\n onClick={() => this.handleZoomOut()}\n label={this.props.zoomOutLabel}\n className=\"deck-widget-zoom-out\"\n />\n </ButtonGroup>\n );\n render(ui, element);\n }\n}\n", "// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nexport const LightTheme = {\n '--button-background': '#fff',\n '--button-stroke': 'rgba(255, 255, 255, 0.3)',\n '--button-inner-stroke': 'unset',\n '--button-shadow': '0px 0px 8px 0px rgba(0, 0, 0, 0.25)',\n '--button-backdrop-filter': 'unset',\n '--button-icon-idle': 'rgba(97, 97, 102, 1)',\n '--button-icon-hover': 'rgba(24, 24, 26, 1)',\n '--icon-compass-north-color': '#F05C44',\n '--icon-compass-south-color': '#C2C2CC'\n};\n\nexport const DarkTheme = {\n '--button-background': 'rgba(18, 18, 20, 1)',\n '--button-stroke': 'rgba(18, 18, 20, 0.30)',\n '--button-inner-stroke': 'unset',\n '--button-shadow': '0px 0px 8px 0px rgba(0, 0, 0, 0.25)',\n '--button-backdrop-filter': 'unset',\n '--button-icon-idle': 'rgba(158, 157, 168, 1)',\n '--button-icon-hover': 'rgba(215, 214, 229, 1)',\n '--icon-compass-north-color': '#F05C44',\n '--icon-compass-south-color': '#C2C2CC'\n};\n\nexport const LightGlassTheme = {\n '--button-background': 'rgba(255, 255, 255, 0.6)',\n '--button-stroke': 'rgba(255, 255, 255, 0.3)',\n '--button-inner-stroke': '1px solid rgba(255, 255, 255, 0.6)',\n '--button-shadow':\n '0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset',\n '--button-backdrop-filter': 'blur(4px)',\n '--button-icon-idle': 'rgba(97, 97, 102, 1)',\n '--button-icon-hover': 'rgba(24, 24, 26, 1)',\n '--icon-compass-north-color': '#F05C44',\n '--icon-compass-south-color': '#C2C2CC'\n};\n\nexport const DarkGlassTheme = {\n '--button-background': 'rgba(18, 18, 20, 0.75)',\n '--button-stroke': 'rgba(18, 18, 20, 0.30)',\n '--button-inner-stroke': '1px solid rgba(18, 18, 20, 0.75)',\n '--button-shadow':\n '0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset',\n '--button-backdrop-filter': 'blur(4px)',\n '--button-icon-idle': 'rgba(158, 157, 168, 1)',\n '--button-icon-hover': 'rgba(215, 214, 229, 1)',\n '--icon-compass-north-color': '#F05C44',\n '--icon-compass-south-color': '#C2C2CC'\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;ACKA,kBAIO;AAEP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;EACzB,mBACE;EACF,4BAA4B;EAC5B,sBAAsB;EACtB,uBAAuB;EACvB,8BAA8B;EAC9B,8BAA8B;;AAGzB,IAAM,iBAAiB;EAC5B,uBAAuB;EACvB,mBAAmB;EACnB,yBAAyB;EACzB,mBACE;EACF,4BAA4B;EAC5B,sBAAsB;EACtB,uBAAuB;EACvB,8BAA8B;EAC9B,8BAA8B;;",
|
|
6
|
+
"names": ["_jsx", "applyStyles", "_jsx", "deepEqual", "removeStyles", "import_core", "import_preact", "deepEqual", "removeStyles", "applyStyles", "_jsx", "viewport", "_jsxs", "import_core", "import_preact", "applyStyles", "deepEqual", "removeStyles", "_jsxs", "_jsx"]
|
|
7
7
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export { FullscreenWidget } from "./fullscreen-widget.js";
|
|
2
2
|
export { CompassWidget } from "./compass-widget.js";
|
|
3
3
|
export { ZoomWidget } from "./zoom-widget.js";
|
|
4
|
+
export type { FullscreenWidgetProps } from "./fullscreen-widget.js";
|
|
5
|
+
export type { CompassWidgetProps } from "./compass-widget.js";
|
|
6
|
+
export type { ZoomWidgetProps } from "./zoom-widget.js";
|
|
4
7
|
export * from "./themes.js";
|
|
5
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,gBAAgB,EAAC,+BAA4B;AACrD,OAAO,EAAC,aAAa,EAAC,4BAAyB;AAC/C,OAAO,EAAC,UAAU,EAAC,yBAAsB;AAEzC,YAAY,EAAC,qBAAqB,EAAC,+BAA4B;AAC/D,YAAY,EAAC,kBAAkB,EAAC,4BAAyB;AACzD,YAAY,EAAC,eAAe,EAAC,yBAAsB;AAEnD,4BAAyB"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
// deck.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
1
4
|
export { FullscreenWidget } from "./fullscreen-widget.js";
|
|
2
5
|
export { CompassWidget } from "./compass-widget.js";
|
|
3
6
|
export { ZoomWidget } from "./zoom-widget.js";
|
|
4
7
|
export * from "./themes.js";
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EAAC,gBAAgB,EAAC,+BAA4B;AACrD,OAAO,EAAC,aAAa,EAAC,4BAAyB;AAC/C,OAAO,EAAC,UAAU,EAAC,yBAAsB;AAMzC,4BAAyB"}
|
package/dist/themes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../src/themes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../src/themes.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU;;;;;;;;;;CAUtB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;CAUrB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;CAW3B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;CAW1B,CAAC"}
|
package/dist/themes.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// deck.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
1
4
|
export const LightTheme = {
|
|
2
5
|
'--button-background': '#fff',
|
|
3
6
|
'--button-stroke': 'rgba(255, 255, 255, 0.3)',
|
|
@@ -42,3 +45,4 @@ export const DarkGlassTheme = {
|
|
|
42
45
|
'--icon-compass-north-color': '#F05C44',
|
|
43
46
|
'--icon-compass-south-color': '#C2C2CC'
|
|
44
47
|
};
|
|
48
|
+
//# sourceMappingURL=themes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.js","sourceRoot":"","sources":["../src/themes.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,qBAAqB,EAAE,MAAM;IAC7B,iBAAiB,EAAE,0BAA0B;IAC7C,uBAAuB,EAAE,OAAO;IAChC,iBAAiB,EAAE,qCAAqC;IACxD,0BAA0B,EAAE,OAAO;IACnC,oBAAoB,EAAE,sBAAsB;IAC5C,qBAAqB,EAAE,qBAAqB;IAC5C,4BAA4B,EAAE,SAAS;IACvC,4BAA4B,EAAE,SAAS;CACxC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,qBAAqB,EAAE,qBAAqB;IAC5C,iBAAiB,EAAE,wBAAwB;IAC3C,uBAAuB,EAAE,OAAO;IAChC,iBAAiB,EAAE,qCAAqC;IACxD,0BAA0B,EAAE,OAAO;IACnC,oBAAoB,EAAE,wBAAwB;IAC9C,qBAAqB,EAAE,wBAAwB;IAC/C,4BAA4B,EAAE,SAAS;IACvC,4BAA4B,EAAE,SAAS;CACxC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,qBAAqB,EAAE,0BAA0B;IACjD,iBAAiB,EAAE,0BAA0B;IAC7C,uBAAuB,EAAE,oCAAoC;IAC7D,iBAAiB,EACf,+EAA+E;IACjF,0BAA0B,EAAE,WAAW;IACvC,oBAAoB,EAAE,sBAAsB;IAC5C,qBAAqB,EAAE,qBAAqB;IAC5C,4BAA4B,EAAE,SAAS;IACvC,4BAA4B,EAAE,SAAS;CACxC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,qBAAqB,EAAE,wBAAwB;IAC/C,iBAAiB,EAAE,wBAAwB;IAC3C,uBAAuB,EAAE,kCAAkC;IAC3D,iBAAiB,EACf,+EAA+E;IACjF,0BAA0B,EAAE,WAAW;IACvC,oBAAoB,EAAE,wBAAwB;IAC9C,qBAAqB,EAAE,wBAAwB;IAC/C,4BAA4B,EAAE,SAAS;IACvC,4BAA4B,EAAE,SAAS;CACxC,CAAC"}
|
package/dist/zoom-widget.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { Deck, Viewport, Widget, WidgetPlacement } from '@deck.gl/core';
|
|
2
|
-
|
|
2
|
+
export type ZoomWidgetProps = {
|
|
3
3
|
id?: string;
|
|
4
|
+
/**
|
|
5
|
+
* Widget positioning within the view. Default 'top-left'.
|
|
6
|
+
*/
|
|
4
7
|
placement?: WidgetPlacement;
|
|
5
8
|
/**
|
|
6
9
|
* View to attach to and interact with. Required when using multiple views.
|
|
@@ -30,12 +33,11 @@ interface ZoomWidgetProps {
|
|
|
30
33
|
* Additional CSS class.
|
|
31
34
|
*/
|
|
32
35
|
className?: string;
|
|
33
|
-
}
|
|
36
|
+
};
|
|
34
37
|
export declare class ZoomWidget implements Widget<ZoomWidgetProps> {
|
|
35
38
|
id: string;
|
|
36
39
|
props: ZoomWidgetProps;
|
|
37
40
|
placement: WidgetPlacement;
|
|
38
|
-
orientation: 'vertical' | 'horizontal';
|
|
39
41
|
viewId?: string | null;
|
|
40
42
|
viewports: {
|
|
41
43
|
[id: string]: Viewport;
|
|
@@ -52,6 +54,6 @@ export declare class ZoomWidget implements Widget<ZoomWidgetProps> {
|
|
|
52
54
|
handleZoom(viewport: Viewport, nextZoom: number): void;
|
|
53
55
|
handleZoomIn(): void;
|
|
54
56
|
handleZoomOut(): void;
|
|
57
|
+
private update;
|
|
55
58
|
}
|
|
56
|
-
export {};
|
|
57
59
|
//# sourceMappingURL=zoom-widget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zoom-widget.d.ts","sourceRoot":"","sources":["../src/zoom-widget.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zoom-widget.d.ts","sourceRoot":"","sources":["../src/zoom-widget.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAI3E,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;OAEG;IACH,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACxC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACrC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,qBAAa,UAAW,YAAW,MAAM,CAAC,eAAe,CAAC;IACxD,EAAE,SAAU;IACZ,KAAK,EAAE,eAAe,CAAC;IACvB,SAAS,EAAE,eAAe,CAAc;IACxC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC9B,SAAS,EAAE;QAAC,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,CAAA;KAAC,CAAM;IACzC,IAAI,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IACjB,OAAO,CAAC,EAAE,cAAc,CAAC;gBAEb,KAAK,EAAE,eAAe;IAelC,KAAK,CAAC,EAAC,IAAI,EAAC,EAAE;QAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAA;KAAC,GAAG,cAAc;IAYhD,QAAQ;IAKR,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC;IAqBxC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ;IAInC,UAAU,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM;IAY/C,YAAY;IAMZ,aAAa;IAMb,OAAO,CAAC,MAAM;CAqBf"}
|
package/dist/zoom-widget.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
|
|
2
|
+
// deck.gl
|
|
3
|
+
// SPDX-License-Identifier: MIT
|
|
4
|
+
// Copyright (c) vis.gl contributors
|
|
2
5
|
/* global document */
|
|
3
6
|
import { FlyToInterpolator, _deepEqual as deepEqual, _applyStyles as applyStyles, _removeStyles as removeStyles } from '@deck.gl/core';
|
|
4
7
|
import { render } from 'preact';
|
|
@@ -7,18 +10,19 @@ export class ZoomWidget {
|
|
|
7
10
|
constructor(props) {
|
|
8
11
|
this.id = 'zoom';
|
|
9
12
|
this.placement = 'top-left';
|
|
10
|
-
this.orientation = 'vertical';
|
|
11
13
|
this.viewId = null;
|
|
12
14
|
this.viewports = {};
|
|
13
|
-
this.id = props.id
|
|
14
|
-
this.viewId = props.viewId
|
|
15
|
-
this.placement = props.placement
|
|
16
|
-
this.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
this.id = props.id ?? this.id;
|
|
16
|
+
this.viewId = props.viewId ?? this.viewId;
|
|
17
|
+
this.placement = props.placement ?? this.placement;
|
|
18
|
+
this.props = {
|
|
19
|
+
...props,
|
|
20
|
+
orientation: props.orientation ?? 'vertical',
|
|
21
|
+
transitionDuration: props.transitionDuration ?? 200,
|
|
22
|
+
zoomInLabel: props.zoomInLabel ?? 'Zoom In',
|
|
23
|
+
zoomOutLabel: props.zoomOutLabel ?? 'Zoom Out',
|
|
24
|
+
style: props.style ?? {}
|
|
25
|
+
};
|
|
22
26
|
}
|
|
23
27
|
onAdd({ deck }) {
|
|
24
28
|
const { style, className } = this.props;
|
|
@@ -27,10 +31,9 @@ export class ZoomWidget {
|
|
|
27
31
|
if (className)
|
|
28
32
|
element.classList.add(className);
|
|
29
33
|
applyStyles(element, style);
|
|
30
|
-
const ui = (_jsxs(ButtonGroup, { orientation: this.orientation, children: [_jsx(GroupedIconButton, { onClick: () => this.handleZoomIn(), label: this.props.zoomInLabel, className: "deck-widget-zoom-in" }), _jsx(GroupedIconButton, { onClick: () => this.handleZoomOut(), label: this.props.zoomOutLabel, className: "deck-widget-zoom-out" })] }));
|
|
31
|
-
render(ui, element);
|
|
32
34
|
this.deck = deck;
|
|
33
35
|
this.element = element;
|
|
36
|
+
this.update();
|
|
34
37
|
return element;
|
|
35
38
|
}
|
|
36
39
|
onRemove() {
|
|
@@ -38,6 +41,8 @@ export class ZoomWidget {
|
|
|
38
41
|
this.element = undefined;
|
|
39
42
|
}
|
|
40
43
|
setProps(props) {
|
|
44
|
+
this.placement = props.placement ?? this.placement;
|
|
45
|
+
this.viewId = props.viewId ?? this.viewId;
|
|
41
46
|
const oldProps = this.props;
|
|
42
47
|
const el = this.element;
|
|
43
48
|
if (el) {
|
|
@@ -53,6 +58,7 @@ export class ZoomWidget {
|
|
|
53
58
|
}
|
|
54
59
|
}
|
|
55
60
|
Object.assign(this.props, props);
|
|
61
|
+
this.update();
|
|
56
62
|
}
|
|
57
63
|
onViewportChange(viewport) {
|
|
58
64
|
this.viewports[viewport.id] = viewport;
|
|
@@ -78,4 +84,13 @@ export class ZoomWidget {
|
|
|
78
84
|
this.handleZoom(viewport, viewport.zoom - 1);
|
|
79
85
|
}
|
|
80
86
|
}
|
|
87
|
+
update() {
|
|
88
|
+
const element = this.element;
|
|
89
|
+
if (!element) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const ui = (_jsxs(ButtonGroup, { orientation: this.props.orientation, children: [_jsx(GroupedIconButton, { onClick: () => this.handleZoomIn(), label: this.props.zoomInLabel, className: "deck-widget-zoom-in" }), _jsx(GroupedIconButton, { onClick: () => this.handleZoomOut(), label: this.props.zoomOutLabel, className: "deck-widget-zoom-out" })] }));
|
|
93
|
+
render(ui, element);
|
|
94
|
+
}
|
|
81
95
|
}
|
|
96
|
+
//# sourceMappingURL=zoom-widget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zoom-widget.js","sourceRoot":"","sources":["../src/zoom-widget.tsx"],"names":[],"mappings":";AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAEpC,qBAAqB;AACrB,OAAO,EACL,iBAAiB,EACjB,UAAU,IAAI,SAAS,EACvB,YAAY,IAAI,WAAW,EAC3B,aAAa,IAAI,YAAY,EAC9B,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAC,MAAM,EAAC,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAC,WAAW,EAAE,iBAAiB,EAAC,wBAAqB;AAsC5D,MAAM,OAAO,UAAU;IASrB,YAAY,KAAsB;QARlC,OAAE,GAAG,MAAM,CAAC;QAEZ,cAAS,GAAoB,UAAU,CAAC;QACxC,WAAM,GAAmB,IAAI,CAAC;QAC9B,cAAS,GAA6B,EAAE,CAAC;QAKvC,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC;QAC1C,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC;QAEnD,IAAI,CAAC,KAAK,GAAG;YACX,GAAG,KAAK;YACR,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI,UAAU;YAC5C,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,IAAI,GAAG;YACnD,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI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