@deck.gl/widgets 9.0.0-beta.2 → 9.0.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/components.d.ts +2 -0
- package/dist/components.d.ts.map +1 -0
- package/dist/components.js +5 -0
- package/dist/dist.dev.js +91 -87
- package/dist/fullscreen-widget.js +108 -0
- package/dist/index.cjs +184 -0
- package/dist/index.cjs.map +7 -0
- package/dist/index.js +2 -0
- package/dist/themes.js +36 -0
- package/dist.min.js +1 -2
- package/package.json +13 -6
- package/dist/es5/components.js +0 -25
- package/dist/es5/components.js.map +0 -1
- package/dist/es5/fullscreen-widget.js +0 -272
- package/dist/es5/fullscreen-widget.js.map +0 -1
- package/dist/es5/index.js +0 -31
- package/dist/es5/index.js.map +0 -1
- package/dist/es5/stylesheet.css +0 -79
- package/dist/es5/themes.js +0 -47
- package/dist/es5/themes.js.map +0 -1
- package/dist/esm/components.js +0 -18
- package/dist/esm/components.js.map +0 -1
- package/dist/esm/fullscreen-widget.js +0 -145
- package/dist/esm/fullscreen-widget.js.map +0 -1
- package/dist/esm/index.js +0 -3
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/stylesheet.css +0 -79
- package/dist/esm/themes.js +0 -37
- package/dist/esm/themes.js.map +0 -1
- package/typed/components.d.ts +0 -3
- package/typed/components.d.ts.map +0 -1
- /package/{typed → dist}/fullscreen-widget.d.ts +0 -0
- /package/{typed → dist}/fullscreen-widget.d.ts.map +0 -0
- /package/{typed → dist}/index.d.ts +0 -0
- /package/{typed → dist}/index.d.ts.map +0 -0
- /package/{typed → dist}/themes.d.ts +0 -0
- /package/{typed → dist}/themes.d.ts.map +0 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// dist/index.js
|
|
21
|
+
var dist_exports = {};
|
|
22
|
+
__export(dist_exports, {
|
|
23
|
+
DarkGlassTheme: () => DarkGlassTheme,
|
|
24
|
+
DarkTheme: () => DarkTheme,
|
|
25
|
+
FullscreenWidget: () => FullscreenWidget,
|
|
26
|
+
LightGlassTheme: () => LightGlassTheme,
|
|
27
|
+
LightTheme: () => LightTheme
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(dist_exports);
|
|
30
|
+
|
|
31
|
+
// dist/fullscreen-widget.js
|
|
32
|
+
var import_jsx_runtime2 = require("preact/jsx-runtime");
|
|
33
|
+
var import_core = require("@deck.gl/core");
|
|
34
|
+
var import_preact = require("preact");
|
|
35
|
+
|
|
36
|
+
// dist/components.js
|
|
37
|
+
var import_jsx_runtime = require("preact/jsx-runtime");
|
|
38
|
+
var IconButton = (props) => {
|
|
39
|
+
const { className, label, onClick } = props;
|
|
40
|
+
return (0, import_jsx_runtime.jsx)("div", { className: "deck-widget-button-border", children: (0, import_jsx_runtime.jsx)("button", { className: `deck-widget-button ${className}`, type: "button", onClick, title: label, children: (0, import_jsx_runtime.jsx)("div", { className: "deck-widget-icon" }) }) });
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
// dist/fullscreen-widget.js
|
|
44
|
+
var FullscreenWidget = class {
|
|
45
|
+
constructor(props) {
|
|
46
|
+
this.id = "fullscreen";
|
|
47
|
+
this.placement = "top-left";
|
|
48
|
+
this.fullscreen = false;
|
|
49
|
+
this.id = props.id || "fullscreen";
|
|
50
|
+
this.placement = props.placement || "top-left";
|
|
51
|
+
props.enterLabel = props.enterLabel || "Enter Fullscreen";
|
|
52
|
+
props.exitLabel = props.exitLabel || "Exit Fullscreen";
|
|
53
|
+
props.style = props.style || {};
|
|
54
|
+
this.props = props;
|
|
55
|
+
}
|
|
56
|
+
onAdd({ deck }) {
|
|
57
|
+
const { style, className } = this.props;
|
|
58
|
+
const el = document.createElement("div");
|
|
59
|
+
el.classList.add("deck-widget", "deck-widget-fullscreen");
|
|
60
|
+
if (className)
|
|
61
|
+
el.classList.add(className);
|
|
62
|
+
if (style) {
|
|
63
|
+
Object.entries(style).map(([key, value]) => el.style.setProperty(key, value));
|
|
64
|
+
}
|
|
65
|
+
this.deck = deck;
|
|
66
|
+
this.element = el;
|
|
67
|
+
this.update();
|
|
68
|
+
document.addEventListener("fullscreenchange", this.onFullscreenChange.bind(this));
|
|
69
|
+
return el;
|
|
70
|
+
}
|
|
71
|
+
onRemove() {
|
|
72
|
+
this.deck = void 0;
|
|
73
|
+
this.element = void 0;
|
|
74
|
+
document.removeEventListener("fullscreenchange", this.onFullscreenChange.bind(this));
|
|
75
|
+
}
|
|
76
|
+
update() {
|
|
77
|
+
const { enterLabel, exitLabel } = this.props;
|
|
78
|
+
const el = this.element;
|
|
79
|
+
if (!el) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
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" });
|
|
83
|
+
(0, import_preact.render)(ui, el);
|
|
84
|
+
}
|
|
85
|
+
setProps(props) {
|
|
86
|
+
const oldProps = this.props;
|
|
87
|
+
const el = this.element;
|
|
88
|
+
if (el) {
|
|
89
|
+
if (oldProps.className !== props.className) {
|
|
90
|
+
if (oldProps.className)
|
|
91
|
+
el.classList.remove(oldProps.className);
|
|
92
|
+
if (props.className)
|
|
93
|
+
el.classList.add(props.className);
|
|
94
|
+
}
|
|
95
|
+
if (!(0, import_core._deepEqual)(oldProps.style, props.style, 1)) {
|
|
96
|
+
if (oldProps.style) {
|
|
97
|
+
Object.entries(oldProps.style).map(([key]) => el.style.removeProperty(key));
|
|
98
|
+
}
|
|
99
|
+
if (props.style) {
|
|
100
|
+
Object.entries(props.style).map(([key, value]) => el.style.setProperty(key, value));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
Object.assign(this.props, props);
|
|
105
|
+
}
|
|
106
|
+
getContainer() {
|
|
107
|
+
var _a, _b;
|
|
108
|
+
return this.props.container || ((_b = (_a = this.deck) == null ? void 0 : _a.getCanvas()) == null ? void 0 : _b.parentElement);
|
|
109
|
+
}
|
|
110
|
+
onFullscreenChange() {
|
|
111
|
+
const prevFullscreen = this.fullscreen;
|
|
112
|
+
const fullscreen = document.fullscreenElement === this.getContainer();
|
|
113
|
+
if (prevFullscreen !== fullscreen) {
|
|
114
|
+
this.fullscreen = !this.fullscreen;
|
|
115
|
+
}
|
|
116
|
+
this.update();
|
|
117
|
+
}
|
|
118
|
+
async handleClick() {
|
|
119
|
+
if (this.fullscreen) {
|
|
120
|
+
await this.exitFullscreen();
|
|
121
|
+
} else {
|
|
122
|
+
await this.requestFullscreen();
|
|
123
|
+
}
|
|
124
|
+
this.update();
|
|
125
|
+
}
|
|
126
|
+
async requestFullscreen() {
|
|
127
|
+
const container = this.getContainer();
|
|
128
|
+
if (container == null ? void 0 : container.requestFullscreen) {
|
|
129
|
+
await container.requestFullscreen({ navigationUI: "hide" });
|
|
130
|
+
} else {
|
|
131
|
+
this.togglePseudoFullscreen();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
async exitFullscreen() {
|
|
135
|
+
if (document.exitFullscreen) {
|
|
136
|
+
await document.exitFullscreen();
|
|
137
|
+
} else {
|
|
138
|
+
this.togglePseudoFullscreen();
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
togglePseudoFullscreen() {
|
|
142
|
+
var _a;
|
|
143
|
+
(_a = this.getContainer()) == null ? void 0 : _a.classList.toggle("deck-pseudo-fullscreen");
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
// dist/themes.js
|
|
148
|
+
var LightTheme = {
|
|
149
|
+
"--button-background": "#fff",
|
|
150
|
+
"--button-stroke": "rgba(255, 255, 255, 0.3)",
|
|
151
|
+
"--button-inner-stroke": "unset",
|
|
152
|
+
"--button-shadow": "0px 0px 8px 0px rgba(0, 0, 0, 0.25)",
|
|
153
|
+
"--button-backdrop-filter": "unset",
|
|
154
|
+
"--button-icon-idle": "rgba(97, 97, 102, 1)",
|
|
155
|
+
"--button-icon-hover": "rgba(24, 24, 26, 1)"
|
|
156
|
+
};
|
|
157
|
+
var DarkTheme = {
|
|
158
|
+
"--button-background": "rgba(18, 18, 20, 1)",
|
|
159
|
+
"--button-stroke": "rgba(18, 18, 20, 0.30)",
|
|
160
|
+
"--button-inner-stroke": "unset",
|
|
161
|
+
"--button-shadow": "0px 0px 8px 0px rgba(0, 0, 0, 0.25)",
|
|
162
|
+
"--button-backdrop-filter": "unset",
|
|
163
|
+
"--button-icon-idle": "rgba(158, 157, 168, 1)",
|
|
164
|
+
"--button-icon-hover": "rgba(215, 214, 229, 1)"
|
|
165
|
+
};
|
|
166
|
+
var LightGlassTheme = {
|
|
167
|
+
"--button-background": "rgba(255, 255, 255, 0.6)",
|
|
168
|
+
"--button-stroke": "rgba(255, 255, 255, 0.3)",
|
|
169
|
+
"--button-inner-stroke": "1px solid rgba(255, 255, 255, 0.6)",
|
|
170
|
+
"--button-shadow": "0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset",
|
|
171
|
+
"--button-backdrop-filter": "blur(4px)",
|
|
172
|
+
"--button-icon-idle": "rgba(97, 97, 102, 1)",
|
|
173
|
+
"--button-icon-hover": "rgba(24, 24, 26, 1)"
|
|
174
|
+
};
|
|
175
|
+
var DarkGlassTheme = {
|
|
176
|
+
"--button-background": "rgba(18, 18, 20, 0.75)",
|
|
177
|
+
"--button-stroke": "rgba(18, 18, 20, 0.30)",
|
|
178
|
+
"--button-inner-stroke": "1px solid rgba(18, 18, 20, 0.75)",
|
|
179
|
+
"--button-shadow": "0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset",
|
|
180
|
+
"--button-backdrop-filter": "blur(4px)",
|
|
181
|
+
"--button-icon-idle": "rgba(158, 157, 168, 1)",
|
|
182
|
+
"--button-icon-hover": "rgba(215, 214, 229, 1)"
|
|
183
|
+
};
|
|
184
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["index.js", "fullscreen-widget.js", "components.js", "themes.js"],
|
|
4
|
+
"sourcesContent": ["export { FullscreenWidget } from \"./fullscreen-widget.js\";\nexport * from \"./themes.js\";\n", "import { jsx as _jsx } from \"preact/jsx-runtime\";\n/* global document */\nimport { _deepEqual as deepEqual } 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 if (style) {\n Object.entries(style).map(([key, value]) => el.style.setProperty(key, value));\n }\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 if (oldProps.style) {\n Object.entries(oldProps.style).map(([key]) => el.style.removeProperty(key));\n }\n if (props.style) {\n Object.entries(props.style).map(([key, value]) => el.style.setProperty(key, value));\n }\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-border\", children: _jsx(\"button\", { className: `deck-widget-button ${className}`, type: \"button\", onClick: onClick, title: label, children: _jsx(\"div\", { className: \"deck-widget-icon\" }) }) }));\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};\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};\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};\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};\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["import_jsx_runtime", "_jsx", "_jsx", "deepEqual"]
|
|
7
|
+
}
|
package/dist/index.js
ADDED
package/dist/themes.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const LightTheme = {
|
|
2
|
+
'--button-background': '#fff',
|
|
3
|
+
'--button-stroke': 'rgba(255, 255, 255, 0.3)',
|
|
4
|
+
'--button-inner-stroke': 'unset',
|
|
5
|
+
'--button-shadow': '0px 0px 8px 0px rgba(0, 0, 0, 0.25)',
|
|
6
|
+
'--button-backdrop-filter': 'unset',
|
|
7
|
+
'--button-icon-idle': 'rgba(97, 97, 102, 1)',
|
|
8
|
+
'--button-icon-hover': 'rgba(24, 24, 26, 1)'
|
|
9
|
+
};
|
|
10
|
+
export const DarkTheme = {
|
|
11
|
+
'--button-background': 'rgba(18, 18, 20, 1)',
|
|
12
|
+
'--button-stroke': 'rgba(18, 18, 20, 0.30)',
|
|
13
|
+
'--button-inner-stroke': 'unset',
|
|
14
|
+
'--button-shadow': '0px 0px 8px 0px rgba(0, 0, 0, 0.25)',
|
|
15
|
+
'--button-backdrop-filter': 'unset',
|
|
16
|
+
'--button-icon-idle': 'rgba(158, 157, 168, 1)',
|
|
17
|
+
'--button-icon-hover': 'rgba(215, 214, 229, 1)'
|
|
18
|
+
};
|
|
19
|
+
export const LightGlassTheme = {
|
|
20
|
+
'--button-background': 'rgba(255, 255, 255, 0.6)',
|
|
21
|
+
'--button-stroke': 'rgba(255, 255, 255, 0.3)',
|
|
22
|
+
'--button-inner-stroke': '1px solid rgba(255, 255, 255, 0.6)',
|
|
23
|
+
'--button-shadow': '0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset',
|
|
24
|
+
'--button-backdrop-filter': 'blur(4px)',
|
|
25
|
+
'--button-icon-idle': 'rgba(97, 97, 102, 1)',
|
|
26
|
+
'--button-icon-hover': 'rgba(24, 24, 26, 1)'
|
|
27
|
+
};
|
|
28
|
+
export const DarkGlassTheme = {
|
|
29
|
+
'--button-background': 'rgba(18, 18, 20, 0.75)',
|
|
30
|
+
'--button-stroke': 'rgba(18, 18, 20, 0.30)',
|
|
31
|
+
'--button-inner-stroke': '1px solid rgba(18, 18, 20, 0.75)',
|
|
32
|
+
'--button-shadow': '0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset',
|
|
33
|
+
'--button-backdrop-filter': 'blur(4px)',
|
|
34
|
+
'--button-icon-idle': 'rgba(158, 157, 168, 1)',
|
|
35
|
+
'--button-icon-hover': 'rgba(215, 214, 229, 1)'
|
|
36
|
+
};
|
package/dist.min.js
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
else if (typeof define === 'function' && define.amd) define([], factory);
|
|
5
5
|
else if (typeof exports === 'object') exports['deck'] = factory();
|
|
6
6
|
else root['deck'] = factory();})(globalThis, function () {
|
|
7
|
-
"use strict";var __exports__=(()=>{var ye=Object.create;var D=Object.defineProperty;var ke=Object.getOwnPropertyDescriptor;var xe=Object.getOwnPropertyNames;var we=Object.getPrototypeOf,Ce=Object.prototype.hasOwnProperty;var Fe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Pe=(t,e)=>{for(var n in e)D(t,n,{get:e[n],enumerable:!0})},U=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of xe(e))!Ce.call(t,i)&&i!==n&&D(t,i,{get:()=>e[i],enumerable:!(o=ke(e,i))||o.enumerable});return t},F=(t,e,n)=>(U(t,e,"default"),n&&U(n,e,"default")),B=(t,e,n)=>(n=t!=null?ye(we(t)):{},U(e||!t||!t.__esModule?D(n,"default",{value:t,enumerable:!0}):n,t)),Ee=t=>U(D({},"__esModule",{value:!0}),t);var $=Fe((ze,Y)=>{Y.exports=globalThis.deck});var R={};Pe(R,{DarkGlassTheme:()=>Be,DarkTheme:()=>je,FullscreenWidget:()=>ge,LightGlassTheme:()=>qe,LightTheme:()=>He});var w={},Z=B($());F(w,B($()));if(!Z.Layer)throw new Error("@deck.gl/core is not found");F(R,w);var be=B($());var j,h,le,Se,E,ee,ie,G,Le,T={},se=[],Te=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,V=Array.isArray;function P(t,e){for(var n in e)t[n]=e[n];return t}function ae(t){var e=t.parentNode;e&&e.removeChild(t)}function Ne(t,e,n){var o,i,r,s={};for(r in e)r=="key"?o=e[r]:r=="ref"?i=e[r]:s[r]=e[r];if(arguments.length>2&&(s.children=arguments.length>3?j.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(r in t.defaultProps)s[r]===void 0&&(s[r]=t.defaultProps[r]);return W(t,s,o,i,null)}function W(t,e,n,o,i){var r={type:t,props:e,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++le};return i==null&&h.vnode!=null&&h.vnode(r),r}function q(t){return t.children}function M(t,e){this.props=t,this.context=e}function A(t,e){if(e==null)return t.__?A(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?A(t):null}function _e(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return _e(t)}}function te(t){(!t.__d&&(t.__d=!0)&&E.push(t)&&!O.__r++||ee!==h.debounceRendering)&&((ee=h.debounceRendering)||ie)(O)}function O(){var t,e,n,o,i,r,s,a,_;for(E.sort(G);t=E.shift();)t.__d&&(e=E.length,o=void 0,i=void 0,r=void 0,a=(s=(n=t).__v).__e,(_=n.__P)&&(o=[],i=[],(r=P({},s)).__v=s.__v+1,J(_,s,r,n.__n,_.ownerSVGElement!==void 0,s.__h!=null?[a]:null,o,a??A(s),s.__h,i),pe(o,s,i),s.__e!=a&&_e(s)),E.length>e&&E.sort(G));O.__r=0}function ue(t,e,n,o,i,r,s,a,_,g,p){var l,m,c,u,f,S,d,v,x,y=0,b=o&&o.__k||se,N=b.length,C=N,L=e.length;for(n.__k=[],l=0;l<L;l++)(u=n.__k[l]=(u=e[l])==null||typeof u=="boolean"||typeof u=="function"?null:typeof u=="string"||typeof u=="number"||typeof u=="bigint"?W(null,u,null,null,u):V(u)?W(q,{children:u},null,null,null):u.__b>0?W(u.type,u.props,u.key,u.ref?u.ref:null,u.__v):u)!=null?(u.__=n,u.__b=n.__b+1,(v=Ae(u,b,d=l+y,C))===-1?c=T:(c=b[v]||T,b[v]=void 0,C--),J(t,u,c,i,r,s,a,_,g,p),f=u.__e,(m=u.ref)&&c.ref!=m&&(c.ref&&K(c.ref,null,u),p.push(m,u.__c||f,u)),f!=null&&(S==null&&(S=f),(x=c===T||c.__v===null)?v==-1&&y--:v!==d&&(v===d+1?y++:v>d?C>L-d?y+=v-d:y--:y=v<d&&v==d-1?v-d:0),d=l+y,typeof u.type!="function"||v===d&&c.__k!==u.__k?typeof u.type=="function"||v===d&&!x?u.__d!==void 0?(_=u.__d,u.__d=void 0):_=f.nextSibling:_=fe(t,f,_):_=ce(u,_,t),typeof n.type=="function"&&(n.__d=_))):(c=b[l])&&c.key==null&&c.__e&&(c.__e==_&&(_=A(c)),z(c,c,!1));for(n.__e=S,l=N;l--;)b[l]!=null&&(typeof n.type=="function"&&b[l].__e!=null&&b[l].__e==n.__d&&(n.__d=b[l].__e.nextSibling),z(b[l],b[l]))}function ce(t,e,n){for(var o,i=t.__k,r=0;i&&r<i.length;r++)(o=i[r])&&(o.__=t,e=typeof o.type=="function"?ce(o,e,n):fe(n,o.__e,e));return e}function fe(t,e,n){return n==null||n.parentNode!==t?t.insertBefore(e,null):e==n&&e.parentNode!=null||t.insertBefore(e,n),e.nextSibling}function Ae(t,e,n,o){var i=t.key,r=t.type,s=n-1,a=n+1,_=e[n];if(_===null||_&&i==_.key&&r===_.type)return n;if(o>(_!=null?1:0))for(;s>=0||a<e.length;){if(s>=0){if((_=e[s])&&i==_.key&&r===_.type)return s;s--}if(a<e.length){if((_=e[a])&&i==_.key&&r===_.type)return a;a++}}return-1}function Re(t,e,n,o,i){var r;for(r in n)r==="children"||r==="key"||r in e||H(t,r,null,n[r],o);for(r in e)i&&typeof e[r]!="function"||r==="children"||r==="key"||r==="value"||r==="checked"||n[r]===e[r]||H(t,r,e[r],n[r],o)}function ne(t,e,n){e[0]==="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Te.test(e)?n:n+"px"}function H(t,e,n,o,i){var r;e:if(e==="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof o=="string"&&(t.style.cssText=o=""),o)for(e in o)n&&e in n||ne(t.style,e,"");if(n)for(e in n)o&&n[e]===o[e]||ne(t.style,e,n[e])}else if(e[0]==="o"&&e[1]==="n")r=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?o||t.addEventListener(e,r?oe:re,r):t.removeEventListener(e,r?oe:re,r);else if(e!=="dangerouslySetInnerHTML"){if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,n))}}function re(t){return this.l[t.type+!1](h.event?h.event(t):t)}function oe(t){return this.l[t.type+!0](h.event?h.event(t):t)}function J(t,e,n,o,i,r,s,a,_,g){var p,l,m,c,u,f,S,d,v,x,y,b,N,C,L,k=e.type;if(e.constructor!==void 0)return null;n.__h!=null&&(_=n.__h,a=e.__e=n.__e,e.__h=null,r=[a]),(p=h.__b)&&p(e);e:if(typeof k=="function")try{if(d=e.props,v=(p=k.contextType)&&o[p.__c],x=p?v?v.props.value:p.__:o,n.__c?S=(l=e.__c=n.__c).__=l.__E:("prototype"in k&&k.prototype.render?e.__c=l=new k(d,x):(e.__c=l=new M(d,x),l.constructor=k,l.render=Ue),v&&v.sub(l),l.props=d,l.state||(l.state={}),l.context=x,l.__n=o,m=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),k.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=P({},l.__s)),P(l.__s,k.getDerivedStateFromProps(d,l.__s))),c=l.props,u=l.state,l.__v=e,m)k.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(k.getDerivedStateFromProps==null&&d!==c&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(d,x),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(d,l.__s,x)===!1||e.__v===n.__v)){for(e.__v!==n.__v&&(l.props=d,l.state=l.__s,l.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach(function(I){I&&(I.__=e)}),y=0;y<l._sb.length;y++)l.__h.push(l._sb[y]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(d,l.__s,x),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(c,u,f)})}if(l.context=x,l.props=d,l.__P=t,l.__e=!1,b=h.__r,N=0,"prototype"in k&&k.prototype.render){for(l.state=l.__s,l.__d=!1,b&&b(e),p=l.render(l.props,l.state,l.context),C=0;C<l._sb.length;C++)l.__h.push(l._sb[C]);l._sb=[]}else do l.__d=!1,b&&b(e),p=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++N<25);l.state=l.__s,l.getChildContext!=null&&(o=P(P({},o),l.getChildContext())),m||l.getSnapshotBeforeUpdate==null||(f=l.getSnapshotBeforeUpdate(c,u)),ue(t,V(L=p!=null&&p.type===q&&p.key==null?p.props.children:p)?L:[L],e,n,o,i,r,s,a,_,g),l.base=e.__e,e.__h=null,l.__h.length&&s.push(l),S&&(l.__E=l.__=null)}catch(I){e.__v=null,(_||r!=null)&&(e.__e=a,e.__h=!!_,r[r.indexOf(a)]=null),h.__e(I,e,n)}else r==null&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=Ie(n.__e,e,n,o,i,r,s,_,g);(p=h.diffed)&&p(e)}function pe(t,e,n){for(var o=0;o<n.length;o++)K(n[o],n[++o],n[++o]);h.__c&&h.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(r){r.call(i)})}catch(r){h.__e(r,i.__v)}})}function Ie(t,e,n,o,i,r,s,a,_){var g,p,l,m=n.props,c=e.props,u=e.type,f=0;if(u==="svg"&&(i=!0),r!=null){for(;f<r.length;f++)if((g=r[f])&&"setAttribute"in g==!!u&&(u?g.localName===u:g.nodeType===3)){t=g,r[f]=null;break}}if(t==null){if(u===null)return document.createTextNode(c);t=i?document.createElementNS("http://www.w3.org/2000/svg",u):document.createElement(u,c.is&&c),r=null,a=!1}if(u===null)m===c||a&&t.data===c||(t.data=c);else{if(r=r&&j.call(t.childNodes),p=(m=n.props||T).dangerouslySetInnerHTML,l=c.dangerouslySetInnerHTML,!a){if(r!=null)for(m={},f=0;f<t.attributes.length;f++)m[t.attributes[f].name]=t.attributes[f].value;(l||p)&&(l&&(p&&l.__html==p.__html||l.__html===t.innerHTML)||(t.innerHTML=l&&l.__html||""))}if(Re(t,c,m,i,a),l)e.__k=[];else if(ue(t,V(f=e.props.children)?f:[f],e,n,o,i&&u!=="foreignObject",r,s,r?r[0]:n.__k&&A(n,0),a,_),r!=null)for(f=r.length;f--;)r[f]!=null&&ae(r[f]);a||("value"in c&&(f=c.value)!==void 0&&(f!==t.value||u==="progress"&&!f||u==="option"&&f!==m.value)&&H(t,"value",f,m.value,!1),"checked"in c&&(f=c.checked)!==void 0&&f!==t.checked&&H(t,"checked",f,m.checked,!1))}return t}function K(t,e,n){try{typeof t=="function"?t(e):t.current=e}catch(o){h.__e(o,n)}}function z(t,e,n){var o,i;if(h.unmount&&h.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||K(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(r){h.__e(r,e)}o.base=o.__P=null,t.__c=void 0}if(o=t.__k)for(i=0;i<o.length;i++)o[i]&&z(o[i],e,n||typeof t.type!="function");n||t.__e==null||ae(t.__e),t.__=t.__e=t.__d=void 0}function Ue(t,e,n){return this.constructor(t,n)}function de(t,e,n){var o,i,r,s;h.__&&h.__(t,e),i=(o=typeof n=="function")?null:n&&n.__k||e.__k,r=[],s=[],J(e,t=(!o&&n||e).__k=Ne(q,null,[t]),i||T,T,e.ownerSVGElement!==void 0,!o&&n?[n]:i?null:e.firstChild?j.call(e.childNodes):null,r,!o&&n?n:i?i.__e:e.firstChild,o,s),pe(r,t,s)}j=se.slice,h={__e:function(t,e,n,o){for(var i,r,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((r=i.constructor)&&r.getDerivedStateFromError!=null&&(i.setState(r.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,o||{}),s=i.__d),s)return i.__E=i}catch(a){t=a}throw t}},le=0,Se=function(t){return t!=null&&t.constructor===void 0},M.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=P({},this.state),typeof t=="function"&&(t=t(P({},n),this.props)),t&&P(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),te(this))},M.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),te(this))},M.prototype.render=q,E=[],ie=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,G=function(t,e){return t.__v.__b-e.__v.__b},O.__r=0,Le=0;var he=function(e){var n=e.className,o=e.label,i=e.onClick;return React.createElement("div",{className:"deck-widget-button-border"},React.createElement("button",{className:"deck-widget-button ".concat(n),type:"button",onClick:i,title:o},React.createElement("div",{className:"deck-widget-icon"})))};function ve(t,e,n,o,i,r,s){try{var a=t[r](s),_=a.value}catch(g){n(g);return}a.done?e(_):Promise.resolve(_).then(o,i)}function Q(t){return function(){var e=this,n=arguments;return new Promise(function(o,i){var r=t.apply(e,n);function s(_){ve(r,o,i,s,a,"next",_)}function a(_){ve(r,o,i,s,a,"throw",_)}s(void 0)})}}function X(t,e){return Me(t)||We(t,e)||$e(t,e)||De()}function De(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
8
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $e(t,e){if(t){if(typeof t=="string")return me(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return me(t,e)}}function me(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function We(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var o=[],i=!0,r=!1,s,a;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(o.push(s.value),!(e&&o.length===e));i=!0);}catch(_){r=!0,a=_}finally{try{!i&&n.return!=null&&n.return()}finally{if(r)throw a}}return o}}function Me(t){if(Array.isArray(t))return t}function Oe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var ge=function(){function t(n){Oe(this,t),this.id="fullscreen",this.props=void 0,this.placement="top-left",this.deck=void 0,this.element=void 0,this.fullscreen=!1,this.id=n.id||"fullscreen",this.placement=n.placement||"top-left",n.enterLabel=n.enterLabel||"Enter Fullscreen",n.exitLabel=n.exitLabel||"Exit Fullscreen",n.style=n.style||{},this.props=n}var e=t.prototype;return e.onAdd=function(o){var i=o.deck,r=this.props,s=r.style,a=r.className,_=document.createElement("div");return _.classList.add("deck-widget","deck-widget-fullscreen"),a&&_.classList.add(a),s&&Object.entries(s).map(function(g){var p=X(g,2),l=p[0],m=p[1];return _.style.setProperty(l,m)}),this.deck=i,this.element=_,this.update(),document.addEventListener("fullscreenchange",this.onFullscreenChange.bind(this)),_},e.onRemove=function(){this.deck=void 0,this.element=void 0,document.removeEventListener("fullscreenchange",this.onFullscreenChange.bind(this))},e.update=function(){var o=this.props,i=o.enterLabel,r=o.exitLabel,s=this.element;if(s){var a=React.createElement(he,{onClick:this.handleClick.bind(this),label:this.fullscreen?r:i,className:this.fullscreen?"deck-widget-fullscreen-exit":"deck-widget-fullscreen-enter"});de(a,s)}},e.setProps=function(o){var i=this.props,r=this.element;r&&(i.className!==o.className&&(i.className&&r.classList.remove(i.className),o.className&&r.classList.add(o.className)),(0,be._deepEqual)(i.style,o.style,1)||(i.style&&Object.entries(i.style).map(function(s){var a=X(s,1),_=a[0];return r.style.removeProperty(_)}),o.style&&Object.entries(o.style).map(function(s){var a=X(s,2),_=a[0],g=a[1];return r.style.setProperty(_,g)}))),Object.assign(this.props,o)},e.getContainer=function(){var o,i;return this.props.container||((o=this.deck)===null||o===void 0||(i=o.getCanvas())===null||i===void 0?void 0:i.parentElement)},e.onFullscreenChange=function(){var o=this.fullscreen,i=document.fullscreenElement===this.getContainer();o!==i&&(this.fullscreen=!this.fullscreen),this.update()},e.handleClick=function(){var n=Q(regeneratorRuntime.mark(function i(){return regeneratorRuntime.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(!this.fullscreen){s.next=5;break}return s.next=3,this.exitFullscreen();case 3:s.next=7;break;case 5:return s.next=7,this.requestFullscreen();case 7:this.update();case 8:case"end":return s.stop()}},i,this)}));function o(){return n.apply(this,arguments)}return o}(),e.requestFullscreen=function(){var n=Q(regeneratorRuntime.mark(function i(){var r;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(r=this.getContainer(),!(r!=null&&r.requestFullscreen)){a.next=6;break}return a.next=4,r.requestFullscreen({navigationUI:"hide"});case 4:a.next=7;break;case 6:this.togglePseudoFullscreen();case 7:case"end":return a.stop()}},i,this)}));function o(){return n.apply(this,arguments)}return o}(),e.exitFullscreen=function(){var n=Q(regeneratorRuntime.mark(function i(){return regeneratorRuntime.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(!document.exitFullscreen){s.next=5;break}return s.next=3,document.exitFullscreen();case 3:s.next=6;break;case 5:this.togglePseudoFullscreen();case 6:case"end":return s.stop()}},i,this)}));function o(){return n.apply(this,arguments)}return o}(),e.togglePseudoFullscreen=function(){var o;(o=this.getContainer())===null||o===void 0||o.classList.toggle("deck-pseudo-fullscreen")},t}();var He={"--button-background":"#fff","--button-stroke":"rgba(255, 255, 255, 0.3)","--button-inner-stroke":"unset","--button-shadow":"0px 0px 8px 0px rgba(0, 0, 0, 0.25)","--button-backdrop-filter":"unset","--button-icon-idle":"rgba(97, 97, 102, 1)","--button-icon-hover":"rgba(24, 24, 26, 1)"},je={"--button-background":"rgba(18, 18, 20, 1)","--button-stroke":"rgba(18, 18, 20, 0.30)","--button-inner-stroke":"unset","--button-shadow":"0px 0px 8px 0px rgba(0, 0, 0, 0.25)","--button-backdrop-filter":"unset","--button-icon-idle":"rgba(158, 157, 168, 1)","--button-icon-hover":"rgba(215, 214, 229, 1)"},qe={"--button-background":"rgba(255, 255, 255, 0.6)","--button-stroke":"rgba(255, 255, 255, 0.3)","--button-inner-stroke":"1px solid rgba(255, 255, 255, 0.6)","--button-shadow":"0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset","--button-backdrop-filter":"blur(4px)","--button-icon-idle":"rgba(97, 97, 102, 1)","--button-icon-hover":"rgba(24, 24, 26, 1)"},Be={"--button-background":"rgba(18, 18, 20, 0.75)","--button-stroke":"rgba(18, 18, 20, 0.30)","--button-inner-stroke":"1px solid rgba(18, 18, 20, 0.75)","--button-shadow":"0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset","--button-backdrop-filter":"blur(4px)","--button-icon-idle":"rgba(158, 157, 168, 1)","--button-icon-hover":"rgba(215, 214, 229, 1)"};return Ee(R);})();
|
|
7
|
+
"use strict";var __exports__=(()=>{var ge=Object.create;var A=Object.defineProperty;var be=Object.getOwnPropertyDescriptor;var ve=Object.getOwnPropertyNames;var ye=Object.getPrototypeOf,ke=Object.prototype.hasOwnProperty;var xe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ce=(t,e)=>{for(var n in e)A(t,n,{get:e[n],enumerable:!0})},I=(t,e,n,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ve(e))!ke.call(t,s)&&s!==n&&A(t,s,{get:()=>e[s],enumerable:!(l=be(e,s))||l.enumerable});return t},w=(t,e,n)=>(I(t,e,"default"),n&&I(n,e,"default")),V=(t,e,n)=>(n=t!=null?ge(ye(t)):{},I(e||!t||!t.__esModule?A(n,"default",{value:t,enumerable:!0}):n,t)),Pe=t=>I(A({},"__esModule",{value:!0}),t);var O=xe((Oe,Y)=>{Y.exports=globalThis.deck});var M={};Ce(M,{DarkGlassTheme:()=>Ie,DarkTheme:()=>Me,FullscreenWidget:()=>G,LightGlassTheme:()=>He,LightTheme:()=>Ue});var C={},Z=V(O(),1);w(C,V(O(),1));if(!Z.Layer)throw new Error("@deck.gl/core is not found");w(M,C);var me=V(O(),1);var $,p,le,we,L,ee,se,z,Fe,N={},ie=[],Le=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,K=Array.isArray;function F(t,e){for(var n in e)t[n]=e[n];return t}function _e(t){var e=t.parentNode;e&&e.removeChild(t)}function Ee(t,e,n){var l,s,r,_={};for(r in e)r=="key"?l=e[r]:r=="ref"?s=e[r]:_[r]=e[r];if(arguments.length>2&&(_.children=arguments.length>3?$.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(r in t.defaultProps)_[r]===void 0&&(_[r]=t.defaultProps[r]);return j(t,_,l,s,null)}function j(t,e,n,l,s){var r={type:t,props:e,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:s??++le};return s==null&&p.vnode!=null&&p.vnode(r),r}function U(t){return t.children}function q(t,e){this.props=t,this.context=e}function W(t,e){if(e==null)return t.__?W(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?W(t):null}function ce(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return ce(t)}}function te(t){(!t.__d&&(t.__d=!0)&&L.push(t)&&!B.__r++||ee!==p.debounceRendering)&&((ee=p.debounceRendering)||se)(B)}function B(){var t,e,n,l,s,r,_,a,c;for(L.sort(z);t=L.shift();)t.__d&&(e=L.length,l=void 0,s=void 0,r=void 0,a=(_=(n=t).__v).__e,(c=n.__P)&&(l=[],s=[],(r=F({},_)).__v=_.__v+1,Q(c,_,r,n.__n,c.ownerSVGElement!==void 0,_.__h!=null?[a]:null,l,a??W(_),_.__h,s),pe(l,_,s),_.__e!=a&&ce(_)),L.length>e&&L.sort(z));B.__r=0}function ae(t,e,n,l,s,r,_,a,c,v,h){var o,b,u,i,f,E,d,m,x,y=0,g=l&&l.__k||ie,D=g.length,P=D,S=e.length;for(n.__k=[],o=0;o<S;o++)(i=n.__k[o]=(i=e[o])==null||typeof i=="boolean"||typeof i=="function"?null:typeof i=="string"||typeof i=="number"||typeof i=="bigint"?j(null,i,null,null,i):K(i)?j(U,{children:i},null,null,null):i.__b>0?j(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=n,i.__b=n.__b+1,(m=Se(i,g,d=o+y,P))===-1?u=N:(u=g[m]||N,g[m]=void 0,P--),Q(t,i,u,s,r,_,a,c,v,h),f=i.__e,(b=i.ref)&&u.ref!=b&&(u.ref&&X(u.ref,null,i),h.push(b,i.__c||f,i)),f!=null&&(E==null&&(E=f),(x=u===N||u.__v===null)?m==-1&&y--:m!==d&&(m===d+1?y++:m>d?P>S-d?y+=m-d:y--:y=m<d&&m==d-1?m-d:0),d=o+y,typeof i.type!="function"||m===d&&u.__k!==i.__k?typeof i.type=="function"||m===d&&!x?i.__d!==void 0?(c=i.__d,i.__d=void 0):c=f.nextSibling:c=fe(t,f,c):c=ue(i,c,t),typeof n.type=="function"&&(n.__d=c))):(u=g[o])&&u.key==null&&u.__e&&(u.__e==c&&(c=W(u)),J(u,u,!1));for(n.__e=E,o=D;o--;)g[o]!=null&&(typeof n.type=="function"&&g[o].__e!=null&&g[o].__e==n.__d&&(n.__d=g[o].__e.nextSibling),J(g[o],g[o]))}function ue(t,e,n){for(var l,s=t.__k,r=0;s&&r<s.length;r++)(l=s[r])&&(l.__=t,e=typeof l.type=="function"?ue(l,e,n):fe(n,l.__e,e));return e}function fe(t,e,n){return n==null||n.parentNode!==t?t.insertBefore(e,null):e==n&&e.parentNode!=null||t.insertBefore(e,n),e.nextSibling}function Se(t,e,n,l){var s=t.key,r=t.type,_=n-1,a=n+1,c=e[n];if(c===null||c&&s==c.key&&r===c.type)return n;if(l>(c!=null?1:0))for(;_>=0||a<e.length;){if(_>=0){if((c=e[_])&&s==c.key&&r===c.type)return _;_--}if(a<e.length){if((c=e[a])&&s==c.key&&r===c.type)return a;a++}}return-1}function Ne(t,e,n,l,s){var r;for(r in n)r==="children"||r==="key"||r in e||R(t,r,null,n[r],l);for(r in e)s&&typeof e[r]!="function"||r==="children"||r==="key"||r==="value"||r==="checked"||n[r]===e[r]||R(t,r,e[r],n[r],l)}function ne(t,e,n){e[0]==="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Le.test(e)?n:n+"px"}function R(t,e,n,l,s){var r;e:if(e==="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof l=="string"&&(t.style.cssText=l=""),l)for(e in l)n&&e in n||ne(t.style,e,"");if(n)for(e in n)l&&n[e]===l[e]||ne(t.style,e,n[e])}else if(e[0]==="o"&&e[1]==="n")r=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?l||t.addEventListener(e,r?re:oe,r):t.removeEventListener(e,r?re:oe,r);else if(e!=="dangerouslySetInnerHTML"){if(s)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,n))}}function oe(t){return this.l[t.type+!1](p.event?p.event(t):t)}function re(t){return this.l[t.type+!0](p.event?p.event(t):t)}function Q(t,e,n,l,s,r,_,a,c,v){var h,o,b,u,i,f,E,d,m,x,y,g,D,P,S,k=e.type;if(e.constructor!==void 0)return null;n.__h!=null&&(c=n.__h,a=e.__e=n.__e,e.__h=null,r=[a]),(h=p.__b)&&h(e);e:if(typeof k=="function")try{if(d=e.props,m=(h=k.contextType)&&l[h.__c],x=h?m?m.props.value:h.__:l,n.__c?E=(o=e.__c=n.__c).__=o.__E:("prototype"in k&&k.prototype.render?e.__c=o=new k(d,x):(e.__c=o=new q(d,x),o.constructor=k,o.render=De),m&&m.sub(o),o.props=d,o.state||(o.state={}),o.context=x,o.__n=l,b=o.__d=!0,o.__h=[],o._sb=[]),o.__s==null&&(o.__s=o.state),k.getDerivedStateFromProps!=null&&(o.__s==o.state&&(o.__s=F({},o.__s)),F(o.__s,k.getDerivedStateFromProps(d,o.__s))),u=o.props,i=o.state,o.__v=e,b)k.getDerivedStateFromProps==null&&o.componentWillMount!=null&&o.componentWillMount(),o.componentDidMount!=null&&o.__h.push(o.componentDidMount);else{if(k.getDerivedStateFromProps==null&&d!==u&&o.componentWillReceiveProps!=null&&o.componentWillReceiveProps(d,x),!o.__e&&(o.shouldComponentUpdate!=null&&o.shouldComponentUpdate(d,o.__s,x)===!1||e.__v===n.__v)){for(e.__v!==n.__v&&(o.props=d,o.state=o.__s,o.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach(function(H){H&&(H.__=e)}),y=0;y<o._sb.length;y++)o.__h.push(o._sb[y]);o._sb=[],o.__h.length&&_.push(o);break e}o.componentWillUpdate!=null&&o.componentWillUpdate(d,o.__s,x),o.componentDidUpdate!=null&&o.__h.push(function(){o.componentDidUpdate(u,i,f)})}if(o.context=x,o.props=d,o.__P=t,o.__e=!1,g=p.__r,D=0,"prototype"in k&&k.prototype.render){for(o.state=o.__s,o.__d=!1,g&&g(e),h=o.render(o.props,o.state,o.context),P=0;P<o._sb.length;P++)o.__h.push(o._sb[P]);o._sb=[]}else do o.__d=!1,g&&g(e),h=o.render(o.props,o.state,o.context),o.state=o.__s;while(o.__d&&++D<25);o.state=o.__s,o.getChildContext!=null&&(l=F(F({},l),o.getChildContext())),b||o.getSnapshotBeforeUpdate==null||(f=o.getSnapshotBeforeUpdate(u,i)),ae(t,K(S=h!=null&&h.type===U&&h.key==null?h.props.children:h)?S:[S],e,n,l,s,r,_,a,c,v),o.base=e.__e,e.__h=null,o.__h.length&&_.push(o),E&&(o.__E=o.__=null)}catch(H){e.__v=null,(c||r!=null)&&(e.__e=a,e.__h=!!c,r[r.indexOf(a)]=null),p.__e(H,e,n)}else r==null&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=Te(n.__e,e,n,l,s,r,_,c,v);(h=p.diffed)&&h(e)}function pe(t,e,n){for(var l=0;l<n.length;l++)X(n[l],n[++l],n[++l]);p.__c&&p.__c(e,t),t.some(function(s){try{t=s.__h,s.__h=[],t.some(function(r){r.call(s)})}catch(r){p.__e(r,s.__v)}})}function Te(t,e,n,l,s,r,_,a,c){var v,h,o,b=n.props,u=e.props,i=e.type,f=0;if(i==="svg"&&(s=!0),r!=null){for(;f<r.length;f++)if((v=r[f])&&"setAttribute"in v==!!i&&(i?v.localName===i:v.nodeType===3)){t=v,r[f]=null;break}}if(t==null){if(i===null)return document.createTextNode(u);t=s?document.createElementNS("http://www.w3.org/2000/svg",i):document.createElement(i,u.is&&u),r=null,a=!1}if(i===null)b===u||a&&t.data===u||(t.data=u);else{if(r=r&&$.call(t.childNodes),h=(b=n.props||N).dangerouslySetInnerHTML,o=u.dangerouslySetInnerHTML,!a){if(r!=null)for(b={},f=0;f<t.attributes.length;f++)b[t.attributes[f].name]=t.attributes[f].value;(o||h)&&(o&&(h&&o.__html==h.__html||o.__html===t.innerHTML)||(t.innerHTML=o&&o.__html||""))}if(Ne(t,u,b,s,a),o)e.__k=[];else if(ae(t,K(f=e.props.children)?f:[f],e,n,l,s&&i!=="foreignObject",r,_,r?r[0]:n.__k&&W(n,0),a,c),r!=null)for(f=r.length;f--;)r[f]!=null&&_e(r[f]);a||("value"in u&&(f=u.value)!==void 0&&(f!==t.value||i==="progress"&&!f||i==="option"&&f!==b.value)&&R(t,"value",f,b.value,!1),"checked"in u&&(f=u.checked)!==void 0&&f!==t.checked&&R(t,"checked",f,b.checked,!1))}return t}function X(t,e,n){try{typeof t=="function"?t(e):t.current=e}catch(l){p.__e(l,n)}}function J(t,e,n){var l,s;if(p.unmount&&p.unmount(t),(l=t.ref)&&(l.current&&l.current!==t.__e||X(l,null,e)),(l=t.__c)!=null){if(l.componentWillUnmount)try{l.componentWillUnmount()}catch(r){p.__e(r,e)}l.base=l.__P=null,t.__c=void 0}if(l=t.__k)for(s=0;s<l.length;s++)l[s]&&J(l[s],e,n||typeof t.type!="function");n||t.__e==null||_e(t.__e),t.__=t.__e=t.__d=void 0}function De(t,e,n){return this.constructor(t,n)}function de(t,e,n){var l,s,r,_;p.__&&p.__(t,e),s=(l=typeof n=="function")?null:n&&n.__k||e.__k,r=[],_=[],Q(e,t=(!l&&n||e).__k=Ee(U,null,[t]),s||N,N,e.ownerSVGElement!==void 0,!l&&n?[n]:s?null:e.firstChild?$.call(e.childNodes):null,r,!l&&n?n:s?s.__e:e.firstChild,l,_),pe(r,t,_)}$=ie.slice,p={__e:function(t,e,n,l){for(var s,r,_;e=e.__;)if((s=e.__c)&&!s.__)try{if((r=s.constructor)&&r.getDerivedStateFromError!=null&&(s.setState(r.getDerivedStateFromError(t)),_=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(t,l||{}),_=s.__d),_)return s.__E=s}catch(a){t=a}throw t}},le=0,we=function(t){return t!=null&&t.constructor===void 0},q.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=F({},this.state),typeof t=="function"&&(t=t(F({},n),this.props)),t&&F(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),te(this))},q.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),te(this))},q.prototype.render=U,L=[],se=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,z=function(t,e){return t.__v.__b-e.__v.__b},B.__r=0,Fe=0;var We=0;function T(t,e,n,l,s,r){var _,a,c={};for(a in e)a=="ref"?_=e[a]:c[a]=e[a];var v={type:t,props:c,key:n,ref:_,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--We,__source:s,__self:r};if(typeof t=="function"&&(_=t.defaultProps))for(a in _)c[a]===void 0&&(c[a]=_[a]);return p.vnode&&p.vnode(v),v}var he=t=>{let{className:e,label:n,onClick:l}=t;return T("div",{className:"deck-widget-button-border",children:T("button",{className:`deck-widget-button ${e}`,type:"button",onClick:l,title:n,children:T("div",{className:"deck-widget-icon"})})})};var G=class{constructor(e){this.id="fullscreen";this.placement="top-left";this.fullscreen=!1;this.id=e.id||"fullscreen",this.placement=e.placement||"top-left",e.enterLabel=e.enterLabel||"Enter Fullscreen",e.exitLabel=e.exitLabel||"Exit Fullscreen",e.style=e.style||{},this.props=e}onAdd({deck:e}){let{style:n,className:l}=this.props,s=document.createElement("div");return s.classList.add("deck-widget","deck-widget-fullscreen"),l&&s.classList.add(l),n&&Object.entries(n).map(([r,_])=>s.style.setProperty(r,_)),this.deck=e,this.element=s,this.update(),document.addEventListener("fullscreenchange",this.onFullscreenChange.bind(this)),s}onRemove(){this.deck=void 0,this.element=void 0,document.removeEventListener("fullscreenchange",this.onFullscreenChange.bind(this))}update(){let{enterLabel:e,exitLabel:n}=this.props,l=this.element;if(!l)return;let s=T(he,{onClick:this.handleClick.bind(this),label:this.fullscreen?n:e,className:this.fullscreen?"deck-widget-fullscreen-exit":"deck-widget-fullscreen-enter"});de(s,l)}setProps(e){let n=this.props,l=this.element;l&&(n.className!==e.className&&(n.className&&l.classList.remove(n.className),e.className&&l.classList.add(e.className)),(0,me._deepEqual)(n.style,e.style,1)||(n.style&&Object.entries(n.style).map(([s])=>l.style.removeProperty(s)),e.style&&Object.entries(e.style).map(([s,r])=>l.style.setProperty(s,r)))),Object.assign(this.props,e)}getContainer(){return this.props.container||this.deck?.getCanvas()?.parentElement}onFullscreenChange(){let e=this.fullscreen,n=document.fullscreenElement===this.getContainer();e!==n&&(this.fullscreen=!this.fullscreen),this.update()}async handleClick(){this.fullscreen?await this.exitFullscreen():await this.requestFullscreen(),this.update()}async requestFullscreen(){let e=this.getContainer();e?.requestFullscreen?await e.requestFullscreen({navigationUI:"hide"}):this.togglePseudoFullscreen()}async exitFullscreen(){document.exitFullscreen?await document.exitFullscreen():this.togglePseudoFullscreen()}togglePseudoFullscreen(){this.getContainer()?.classList.toggle("deck-pseudo-fullscreen")}};var Ue={"--button-background":"#fff","--button-stroke":"rgba(255, 255, 255, 0.3)","--button-inner-stroke":"unset","--button-shadow":"0px 0px 8px 0px rgba(0, 0, 0, 0.25)","--button-backdrop-filter":"unset","--button-icon-idle":"rgba(97, 97, 102, 1)","--button-icon-hover":"rgba(24, 24, 26, 1)"},Me={"--button-background":"rgba(18, 18, 20, 1)","--button-stroke":"rgba(18, 18, 20, 0.30)","--button-inner-stroke":"unset","--button-shadow":"0px 0px 8px 0px rgba(0, 0, 0, 0.25)","--button-backdrop-filter":"unset","--button-icon-idle":"rgba(158, 157, 168, 1)","--button-icon-hover":"rgba(215, 214, 229, 1)"},He={"--button-background":"rgba(255, 255, 255, 0.6)","--button-stroke":"rgba(255, 255, 255, 0.3)","--button-inner-stroke":"1px solid rgba(255, 255, 255, 0.6)","--button-shadow":"0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset","--button-backdrop-filter":"blur(4px)","--button-icon-idle":"rgba(97, 97, 102, 1)","--button-icon-hover":"rgba(24, 24, 26, 1)"},Ie={"--button-background":"rgba(18, 18, 20, 0.75)","--button-stroke":"rgba(18, 18, 20, 0.30)","--button-inner-stroke":"1px solid rgba(18, 18, 20, 0.75)","--button-shadow":"0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset","--button-backdrop-filter":"blur(4px)","--button-icon-idle":"rgba(158, 157, 168, 1)","--button-icon-hover":"rgba(215, 214, 229, 1)"};return Pe(M);})();
|
|
9
8
|
return __exports__;
|
|
10
9
|
});
|
package/package.json
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
"name": "@deck.gl/widgets",
|
|
3
3
|
"description": "UI widgets for deck.gl",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"
|
|
5
|
+
"type": "module",
|
|
6
|
+
"version": "9.0.0-beta.3",
|
|
6
7
|
"publishConfig": {
|
|
7
8
|
"access": "public"
|
|
8
9
|
},
|
|
@@ -16,13 +17,19 @@
|
|
|
16
17
|
"type": "git",
|
|
17
18
|
"url": "https://github.com/visgl/deck.gl.git"
|
|
18
19
|
},
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
20
|
+
"types": "dist/index.d.ts",
|
|
21
|
+
"main": "dist/index.cjs",
|
|
22
|
+
"module": "dist/index.js",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"import": "./dist/index.js",
|
|
27
|
+
"require": "./dist/index.cjs"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
22
30
|
"files": [
|
|
23
31
|
"dist",
|
|
24
32
|
"src",
|
|
25
|
-
"typed",
|
|
26
33
|
"dist.min.js"
|
|
27
34
|
],
|
|
28
35
|
"sideEffects": false,
|
|
@@ -37,5 +44,5 @@
|
|
|
37
44
|
"peerDependencies": {
|
|
38
45
|
"@deck.gl/core": "^9.0.0-alpha"
|
|
39
46
|
},
|
|
40
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "643d1009268bbf92b5bc0941d00aa59d5e3a582b"
|
|
41
48
|
}
|
package/dist/es5/components.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.IconButton = void 0;
|
|
7
|
-
|
|
8
|
-
var IconButton = function IconButton(props) {
|
|
9
|
-
var className = props.className,
|
|
10
|
-
label = props.label,
|
|
11
|
-
onClick = props.onClick;
|
|
12
|
-
return h("div", {
|
|
13
|
-
className: "deck-widget-button-border"
|
|
14
|
-
}, h("button", {
|
|
15
|
-
className: "deck-widget-button ".concat(className),
|
|
16
|
-
type: "button",
|
|
17
|
-
onClick: onClick,
|
|
18
|
-
title: label
|
|
19
|
-
}, h("div", {
|
|
20
|
-
className: "deck-widget-icon"
|
|
21
|
-
})));
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
exports.IconButton = IconButton;
|
|
25
|
-
//# sourceMappingURL=components.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components.tsx"],"names":["IconButton","props","className","label","onClick"],"mappings":";;;;;;;AAAO,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAAAC,KAAK,EAAI;AACjC,MAAOC,SAAP,GAAoCD,KAApC,CAAOC,SAAP;AAAA,MAAkBC,KAAlB,GAAoCF,KAApC,CAAkBE,KAAlB;AAAA,MAAyBC,OAAzB,GAAoCH,KAApC,CAAyBG,OAAzB;AACA,SACE;AAAK,IAAA,SAAS,EAAC;AAAf,KACE;AACE,IAAA,SAAS,+BAAwBF,SAAxB,CADX;AAEE,IAAA,IAAI,EAAC,QAFP;AAGE,IAAA,OAAO,EAAEE,OAHX;AAIE,IAAA,KAAK,EAAED;AAJT,KAME;AAAK,IAAA,SAAS,EAAC;AAAf,IANF,CADF,CADF;AAYD,CAdM","sourcesContent":["export const IconButton = props => {\n const {className, label, onClick} = props;\n return (\n <div className=\"deck-widget-button-border\">\n <button\n className={`deck-widget-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"],"file":"components.js"}
|