@deck.gl/widgets 9.0.0-beta.1 → 9.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compass-widget.d.ts +46 -0
- package/dist/compass-widget.d.ts.map +1 -0
- package/dist/compass-widget.js +75 -0
- package/dist/components.d.ts +4 -0
- package/dist/components.d.ts.map +1 -0
- package/dist/components.js +13 -0
- package/dist/dist.dev.js +430 -204
- package/{typed → dist}/fullscreen-widget.d.ts +8 -2
- package/dist/fullscreen-widget.d.ts.map +1 -0
- package/dist/fullscreen-widget.js +108 -0
- package/dist/index.cjs +343 -0
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.ts +5 -0
- package/{typed → dist}/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/{es5/stylesheet.css → stylesheet.css} +81 -11
- package/{typed → dist}/themes.d.ts +8 -0
- package/dist/themes.d.ts.map +1 -0
- package/dist/themes.js +44 -0
- package/dist/zoom-widget.d.ts +55 -0
- package/dist/zoom-widget.d.ts.map +1 -0
- package/dist/zoom-widget.js +68 -0
- package/dist.min.js +1 -2
- package/package.json +15 -8
- package/src/compass-widget.tsx +133 -0
- package/src/components.tsx +21 -2
- package/src/fullscreen-widget.tsx +8 -2
- package/src/index.ts +2 -0
- package/src/stylesheet.css +81 -11
- package/src/themes.ts +12 -4
- package/src/zoom-widget.tsx +128 -0
- package/dist/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/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/fullscreen-widget.d.ts.map +0 -1
- package/typed/index.d.ts +0 -3
- package/typed/themes.d.ts.map +0 -1
|
@@ -15,19 +15,25 @@ interface FullscreenWidgetProps {
|
|
|
15
15
|
* Tooltip message when fullscreen.
|
|
16
16
|
*/
|
|
17
17
|
exitLabel?: string;
|
|
18
|
+
/**
|
|
19
|
+
* CSS inline style overrides.
|
|
20
|
+
*/
|
|
18
21
|
style?: Partial<CSSStyleDeclaration>;
|
|
22
|
+
/**
|
|
23
|
+
* Additional CSS class.
|
|
24
|
+
*/
|
|
19
25
|
className?: string;
|
|
20
26
|
}
|
|
21
27
|
export declare class FullscreenWidget implements Widget<FullscreenWidgetProps> {
|
|
22
28
|
id: string;
|
|
23
29
|
props: FullscreenWidgetProps;
|
|
24
30
|
placement: WidgetPlacement;
|
|
25
|
-
deck?: Deck
|
|
31
|
+
deck?: Deck<any>;
|
|
26
32
|
element?: HTMLDivElement;
|
|
27
33
|
fullscreen: boolean;
|
|
28
34
|
constructor(props: FullscreenWidgetProps);
|
|
29
35
|
onAdd({ deck }: {
|
|
30
|
-
deck: Deck
|
|
36
|
+
deck: Deck<any>;
|
|
31
37
|
}): HTMLDivElement;
|
|
32
38
|
onRemove(): void;
|
|
33
39
|
private update;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fullscreen-widget.d.ts","sourceRoot":"","sources":["../src/fullscreen-widget.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAIjE,UAAU,qBAAqB;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,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;AAED,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;IASxC,KAAK,CAAC,EAAC,IAAI,EAAC,EAAE;QAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAA;KAAC,GAAG,cAAc;IAehD,QAAQ;IAMR,OAAO,CAAC,MAAM;IAiBd,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,qBAAqB,CAAC;IAwB9C,YAAY;IAIZ,kBAAkB;IASZ,WAAW;IASX,iBAAiB;IASjB,cAAc;IAQpB,sBAAsB;CAGvB"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { jsx as _jsx } from "preact/jsx-runtime";
|
|
2
|
+
/* global document */
|
|
3
|
+
import { _deepEqual as deepEqual } from '@deck.gl/core';
|
|
4
|
+
import { render } from 'preact';
|
|
5
|
+
import { IconButton } from "./components.js";
|
|
6
|
+
export class FullscreenWidget {
|
|
7
|
+
constructor(props) {
|
|
8
|
+
this.id = 'fullscreen';
|
|
9
|
+
this.placement = 'top-left';
|
|
10
|
+
this.fullscreen = false;
|
|
11
|
+
this.id = props.id || 'fullscreen';
|
|
12
|
+
this.placement = props.placement || 'top-left';
|
|
13
|
+
props.enterLabel = props.enterLabel || 'Enter Fullscreen';
|
|
14
|
+
props.exitLabel = props.exitLabel || 'Exit Fullscreen';
|
|
15
|
+
props.style = props.style || {};
|
|
16
|
+
this.props = props;
|
|
17
|
+
}
|
|
18
|
+
onAdd({ deck }) {
|
|
19
|
+
const { style, className } = this.props;
|
|
20
|
+
const el = document.createElement('div');
|
|
21
|
+
el.classList.add('deck-widget', 'deck-widget-fullscreen');
|
|
22
|
+
if (className)
|
|
23
|
+
el.classList.add(className);
|
|
24
|
+
if (style) {
|
|
25
|
+
Object.entries(style).map(([key, value]) => el.style.setProperty(key, value));
|
|
26
|
+
}
|
|
27
|
+
this.deck = deck;
|
|
28
|
+
this.element = el;
|
|
29
|
+
this.update();
|
|
30
|
+
document.addEventListener('fullscreenchange', this.onFullscreenChange.bind(this));
|
|
31
|
+
return el;
|
|
32
|
+
}
|
|
33
|
+
onRemove() {
|
|
34
|
+
this.deck = undefined;
|
|
35
|
+
this.element = undefined;
|
|
36
|
+
document.removeEventListener('fullscreenchange', this.onFullscreenChange.bind(this));
|
|
37
|
+
}
|
|
38
|
+
update() {
|
|
39
|
+
const { enterLabel, exitLabel } = this.props;
|
|
40
|
+
const el = this.element;
|
|
41
|
+
if (!el) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
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' }));
|
|
45
|
+
render(ui, el);
|
|
46
|
+
}
|
|
47
|
+
setProps(props) {
|
|
48
|
+
const oldProps = this.props;
|
|
49
|
+
const el = this.element;
|
|
50
|
+
if (el) {
|
|
51
|
+
if (oldProps.className !== props.className) {
|
|
52
|
+
if (oldProps.className)
|
|
53
|
+
el.classList.remove(oldProps.className);
|
|
54
|
+
if (props.className)
|
|
55
|
+
el.classList.add(props.className);
|
|
56
|
+
}
|
|
57
|
+
if (!deepEqual(oldProps.style, props.style, 1)) {
|
|
58
|
+
if (oldProps.style) {
|
|
59
|
+
Object.entries(oldProps.style).map(([key]) => el.style.removeProperty(key));
|
|
60
|
+
}
|
|
61
|
+
if (props.style) {
|
|
62
|
+
Object.entries(props.style).map(([key, value]) => el.style.setProperty(key, value));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
Object.assign(this.props, props);
|
|
67
|
+
}
|
|
68
|
+
getContainer() {
|
|
69
|
+
return this.props.container || this.deck?.getCanvas()?.parentElement;
|
|
70
|
+
}
|
|
71
|
+
onFullscreenChange() {
|
|
72
|
+
const prevFullscreen = this.fullscreen;
|
|
73
|
+
const fullscreen = document.fullscreenElement === this.getContainer();
|
|
74
|
+
if (prevFullscreen !== fullscreen) {
|
|
75
|
+
this.fullscreen = !this.fullscreen;
|
|
76
|
+
}
|
|
77
|
+
this.update();
|
|
78
|
+
}
|
|
79
|
+
async handleClick() {
|
|
80
|
+
if (this.fullscreen) {
|
|
81
|
+
await this.exitFullscreen();
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
await this.requestFullscreen();
|
|
85
|
+
}
|
|
86
|
+
this.update();
|
|
87
|
+
}
|
|
88
|
+
async requestFullscreen() {
|
|
89
|
+
const container = this.getContainer();
|
|
90
|
+
if (container?.requestFullscreen) {
|
|
91
|
+
await container.requestFullscreen({ navigationUI: 'hide' });
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
this.togglePseudoFullscreen();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
async exitFullscreen() {
|
|
98
|
+
if (document.exitFullscreen) {
|
|
99
|
+
await document.exitFullscreen();
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
this.togglePseudoFullscreen();
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
togglePseudoFullscreen() {
|
|
106
|
+
this.getContainer()?.classList.toggle('deck-pseudo-fullscreen');
|
|
107
|
+
}
|
|
108
|
+
}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
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
|
+
CompassWidget: () => CompassWidget,
|
|
24
|
+
DarkGlassTheme: () => DarkGlassTheme,
|
|
25
|
+
DarkTheme: () => DarkTheme,
|
|
26
|
+
FullscreenWidget: () => FullscreenWidget,
|
|
27
|
+
LightGlassTheme: () => LightGlassTheme,
|
|
28
|
+
LightTheme: () => LightTheme,
|
|
29
|
+
ZoomWidget: () => ZoomWidget
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(dist_exports);
|
|
32
|
+
|
|
33
|
+
// dist/fullscreen-widget.js
|
|
34
|
+
var import_jsx_runtime2 = require("preact/jsx-runtime");
|
|
35
|
+
var import_core = require("@deck.gl/core");
|
|
36
|
+
var import_preact = require("preact");
|
|
37
|
+
|
|
38
|
+
// dist/components.js
|
|
39
|
+
var import_jsx_runtime = require("preact/jsx-runtime");
|
|
40
|
+
var IconButton = (props) => {
|
|
41
|
+
const { className, label, onClick } = props;
|
|
42
|
+
return (0, import_jsx_runtime.jsx)("div", { className: "deck-widget-button", children: (0, import_jsx_runtime.jsx)("button", { className: `deck-widget-icon-button ${className}`, type: "button", onClick, title: label, children: (0, import_jsx_runtime.jsx)("div", { className: "deck-widget-icon" }) }) });
|
|
43
|
+
};
|
|
44
|
+
var ButtonGroup = (props) => {
|
|
45
|
+
const { children, orientation } = props;
|
|
46
|
+
return (0, import_jsx_runtime.jsx)("div", { className: `deck-widget-button-group ${orientation}`, children });
|
|
47
|
+
};
|
|
48
|
+
var GroupedIconButton = (props) => {
|
|
49
|
+
const { className, label, onClick } = props;
|
|
50
|
+
return (0, import_jsx_runtime.jsx)("button", { className: `deck-widget-icon-button ${className}`, type: "button", onClick, title: label, children: (0, import_jsx_runtime.jsx)("div", { className: "deck-widget-icon" }) });
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// dist/fullscreen-widget.js
|
|
54
|
+
var FullscreenWidget = class {
|
|
55
|
+
constructor(props) {
|
|
56
|
+
this.id = "fullscreen";
|
|
57
|
+
this.placement = "top-left";
|
|
58
|
+
this.fullscreen = false;
|
|
59
|
+
this.id = props.id || "fullscreen";
|
|
60
|
+
this.placement = props.placement || "top-left";
|
|
61
|
+
props.enterLabel = props.enterLabel || "Enter Fullscreen";
|
|
62
|
+
props.exitLabel = props.exitLabel || "Exit Fullscreen";
|
|
63
|
+
props.style = props.style || {};
|
|
64
|
+
this.props = props;
|
|
65
|
+
}
|
|
66
|
+
onAdd({ deck }) {
|
|
67
|
+
const { style, className } = this.props;
|
|
68
|
+
const el = document.createElement("div");
|
|
69
|
+
el.classList.add("deck-widget", "deck-widget-fullscreen");
|
|
70
|
+
if (className)
|
|
71
|
+
el.classList.add(className);
|
|
72
|
+
if (style) {
|
|
73
|
+
Object.entries(style).map(([key, value]) => el.style.setProperty(key, value));
|
|
74
|
+
}
|
|
75
|
+
this.deck = deck;
|
|
76
|
+
this.element = el;
|
|
77
|
+
this.update();
|
|
78
|
+
document.addEventListener("fullscreenchange", this.onFullscreenChange.bind(this));
|
|
79
|
+
return el;
|
|
80
|
+
}
|
|
81
|
+
onRemove() {
|
|
82
|
+
this.deck = void 0;
|
|
83
|
+
this.element = void 0;
|
|
84
|
+
document.removeEventListener("fullscreenchange", this.onFullscreenChange.bind(this));
|
|
85
|
+
}
|
|
86
|
+
update() {
|
|
87
|
+
const { enterLabel, exitLabel } = this.props;
|
|
88
|
+
const el = this.element;
|
|
89
|
+
if (!el) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
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" });
|
|
93
|
+
(0, import_preact.render)(ui, el);
|
|
94
|
+
}
|
|
95
|
+
setProps(props) {
|
|
96
|
+
const oldProps = this.props;
|
|
97
|
+
const el = this.element;
|
|
98
|
+
if (el) {
|
|
99
|
+
if (oldProps.className !== props.className) {
|
|
100
|
+
if (oldProps.className)
|
|
101
|
+
el.classList.remove(oldProps.className);
|
|
102
|
+
if (props.className)
|
|
103
|
+
el.classList.add(props.className);
|
|
104
|
+
}
|
|
105
|
+
if (!(0, import_core._deepEqual)(oldProps.style, props.style, 1)) {
|
|
106
|
+
if (oldProps.style) {
|
|
107
|
+
Object.entries(oldProps.style).map(([key]) => el.style.removeProperty(key));
|
|
108
|
+
}
|
|
109
|
+
if (props.style) {
|
|
110
|
+
Object.entries(props.style).map(([key, value]) => el.style.setProperty(key, value));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
Object.assign(this.props, props);
|
|
115
|
+
}
|
|
116
|
+
getContainer() {
|
|
117
|
+
var _a, _b;
|
|
118
|
+
return this.props.container || ((_b = (_a = this.deck) == null ? void 0 : _a.getCanvas()) == null ? void 0 : _b.parentElement);
|
|
119
|
+
}
|
|
120
|
+
onFullscreenChange() {
|
|
121
|
+
const prevFullscreen = this.fullscreen;
|
|
122
|
+
const fullscreen = document.fullscreenElement === this.getContainer();
|
|
123
|
+
if (prevFullscreen !== fullscreen) {
|
|
124
|
+
this.fullscreen = !this.fullscreen;
|
|
125
|
+
}
|
|
126
|
+
this.update();
|
|
127
|
+
}
|
|
128
|
+
async handleClick() {
|
|
129
|
+
if (this.fullscreen) {
|
|
130
|
+
await this.exitFullscreen();
|
|
131
|
+
} else {
|
|
132
|
+
await this.requestFullscreen();
|
|
133
|
+
}
|
|
134
|
+
this.update();
|
|
135
|
+
}
|
|
136
|
+
async requestFullscreen() {
|
|
137
|
+
const container = this.getContainer();
|
|
138
|
+
if (container == null ? void 0 : container.requestFullscreen) {
|
|
139
|
+
await container.requestFullscreen({ navigationUI: "hide" });
|
|
140
|
+
} else {
|
|
141
|
+
this.togglePseudoFullscreen();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
async exitFullscreen() {
|
|
145
|
+
if (document.exitFullscreen) {
|
|
146
|
+
await document.exitFullscreen();
|
|
147
|
+
} else {
|
|
148
|
+
this.togglePseudoFullscreen();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
togglePseudoFullscreen() {
|
|
152
|
+
var _a;
|
|
153
|
+
(_a = this.getContainer()) == null ? void 0 : _a.classList.toggle("deck-pseudo-fullscreen");
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
// dist/compass-widget.js
|
|
158
|
+
var import_jsx_runtime3 = require("preact/jsx-runtime");
|
|
159
|
+
var import_core2 = require("@deck.gl/core");
|
|
160
|
+
var import_preact2 = require("preact");
|
|
161
|
+
var CompassWidget = class {
|
|
162
|
+
constructor(props) {
|
|
163
|
+
this.id = "compass";
|
|
164
|
+
this.placement = "top-left";
|
|
165
|
+
this.viewId = null;
|
|
166
|
+
this.id = props.id || "compass";
|
|
167
|
+
this.viewId = props.viewId || null;
|
|
168
|
+
this.placement = props.placement || "top-left";
|
|
169
|
+
props.transitionDuration = props.transitionDuration || 200;
|
|
170
|
+
props.label = props.label || "Compass";
|
|
171
|
+
props.style = props.style || {};
|
|
172
|
+
this.props = props;
|
|
173
|
+
}
|
|
174
|
+
setProps(props) {
|
|
175
|
+
Object.assign(this.props, props);
|
|
176
|
+
}
|
|
177
|
+
onViewportChange(viewport) {
|
|
178
|
+
this.viewport = viewport;
|
|
179
|
+
this.update();
|
|
180
|
+
}
|
|
181
|
+
onAdd({ deck }) {
|
|
182
|
+
const { style, className } = this.props;
|
|
183
|
+
const element = document.createElement("div");
|
|
184
|
+
element.classList.add("deck-widget", "deck-widget-compass");
|
|
185
|
+
if (className)
|
|
186
|
+
element.classList.add(className);
|
|
187
|
+
if (style) {
|
|
188
|
+
Object.entries(style).map(([key, value]) => element.style.setProperty(key, value));
|
|
189
|
+
}
|
|
190
|
+
this.deck = deck;
|
|
191
|
+
this.element = element;
|
|
192
|
+
this.update();
|
|
193
|
+
return element;
|
|
194
|
+
}
|
|
195
|
+
getRotation() {
|
|
196
|
+
if (this.viewport instanceof import_core2.WebMercatorViewport) {
|
|
197
|
+
return [-this.viewport.bearing, this.viewport.pitch];
|
|
198
|
+
} else if (this.viewport instanceof import_core2._GlobeViewport) {
|
|
199
|
+
return [0, Math.max(-80, Math.min(80, this.viewport.latitude))];
|
|
200
|
+
}
|
|
201
|
+
return [0, 0];
|
|
202
|
+
}
|
|
203
|
+
update() {
|
|
204
|
+
const [rz, rx] = this.getRotation();
|
|
205
|
+
const element = this.element;
|
|
206
|
+
if (!element) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
const ui = (0, import_jsx_runtime3.jsx)("div", { className: "deck-widget-button", style: { perspective: 100 }, children: (0, import_jsx_runtime3.jsx)("button", { type: "button", onClick: () => this.handleCompassReset(), label: 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)" })] }) }) }) });
|
|
210
|
+
(0, import_preact2.render)(ui, element);
|
|
211
|
+
}
|
|
212
|
+
onRemove() {
|
|
213
|
+
this.deck = void 0;
|
|
214
|
+
this.element = void 0;
|
|
215
|
+
}
|
|
216
|
+
handleCompassReset() {
|
|
217
|
+
const viewId = this.viewId || "default-view";
|
|
218
|
+
if (this.viewport instanceof import_core2.WebMercatorViewport) {
|
|
219
|
+
const nextViewState = {
|
|
220
|
+
...this.viewport,
|
|
221
|
+
bearing: 0,
|
|
222
|
+
...this.getRotation()[0] === 0 ? { pitch: 0 } : {},
|
|
223
|
+
transitionDuration: this.props.transitionDuration,
|
|
224
|
+
transitionInterpolator: new import_core2.FlyToInterpolator()
|
|
225
|
+
};
|
|
226
|
+
this.deck._onViewStateChange({ viewId, viewState: nextViewState, interactionState: {} });
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
// dist/zoom-widget.js
|
|
232
|
+
var import_jsx_runtime4 = require("preact/jsx-runtime");
|
|
233
|
+
var import_core3 = require("@deck.gl/core");
|
|
234
|
+
var import_preact3 = require("preact");
|
|
235
|
+
var ZoomWidget = class {
|
|
236
|
+
constructor(props) {
|
|
237
|
+
this.id = "zoom";
|
|
238
|
+
this.placement = "top-left";
|
|
239
|
+
this.orientation = "vertical";
|
|
240
|
+
this.viewId = null;
|
|
241
|
+
this.id = props.id || "zoom";
|
|
242
|
+
this.viewId = props.viewId || null;
|
|
243
|
+
this.placement = props.placement || "top-left";
|
|
244
|
+
this.orientation = props.orientation || "vertical";
|
|
245
|
+
props.transitionDuration = props.transitionDuration || 200;
|
|
246
|
+
props.zoomInLabel = props.zoomInLabel || "Zoom In";
|
|
247
|
+
props.zoomOutLabel = props.zoomOutLabel || "Zoom Out";
|
|
248
|
+
props.style = props.style || {};
|
|
249
|
+
this.props = props;
|
|
250
|
+
}
|
|
251
|
+
onAdd({ deck }) {
|
|
252
|
+
const { style, className } = this.props;
|
|
253
|
+
const element = document.createElement("div");
|
|
254
|
+
element.classList.add("deck-widget", "deck-widget-zoom");
|
|
255
|
+
if (className)
|
|
256
|
+
element.classList.add(className);
|
|
257
|
+
if (style) {
|
|
258
|
+
Object.entries(style).map(([key, value]) => element.style.setProperty(key, value));
|
|
259
|
+
}
|
|
260
|
+
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" })] });
|
|
261
|
+
(0, import_preact3.render)(ui, element);
|
|
262
|
+
this.deck = deck;
|
|
263
|
+
this.element = element;
|
|
264
|
+
return element;
|
|
265
|
+
}
|
|
266
|
+
onRemove() {
|
|
267
|
+
this.deck = void 0;
|
|
268
|
+
this.element = void 0;
|
|
269
|
+
}
|
|
270
|
+
setProps(props) {
|
|
271
|
+
Object.assign(this.props, props);
|
|
272
|
+
}
|
|
273
|
+
onViewportChange(viewport) {
|
|
274
|
+
this.viewport = viewport;
|
|
275
|
+
}
|
|
276
|
+
handleZoom(nextZoom) {
|
|
277
|
+
const viewId = this.viewId || "default-view";
|
|
278
|
+
const nextViewState = {
|
|
279
|
+
...this.viewport,
|
|
280
|
+
zoom: nextZoom,
|
|
281
|
+
transitionDuration: this.props.transitionDuration,
|
|
282
|
+
transitionInterpolator: new import_core3.FlyToInterpolator()
|
|
283
|
+
};
|
|
284
|
+
this.deck._onViewStateChange({ viewId, viewState: nextViewState, interactionState: {} });
|
|
285
|
+
}
|
|
286
|
+
handleZoomIn() {
|
|
287
|
+
if (this.viewport) {
|
|
288
|
+
this.handleZoom(this.viewport.zoom + 1);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
handleZoomOut() {
|
|
292
|
+
if (this.viewport) {
|
|
293
|
+
this.handleZoom(this.viewport.zoom - 1);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
// dist/themes.js
|
|
299
|
+
var LightTheme = {
|
|
300
|
+
"--button-background": "#fff",
|
|
301
|
+
"--button-stroke": "rgba(255, 255, 255, 0.3)",
|
|
302
|
+
"--button-inner-stroke": "unset",
|
|
303
|
+
"--button-shadow": "0px 0px 8px 0px rgba(0, 0, 0, 0.25)",
|
|
304
|
+
"--button-backdrop-filter": "unset",
|
|
305
|
+
"--button-icon-idle": "rgba(97, 97, 102, 1)",
|
|
306
|
+
"--button-icon-hover": "rgba(24, 24, 26, 1)",
|
|
307
|
+
"--icon-compass-north-color": "#F05C44",
|
|
308
|
+
"--icon-compass-south-color": "#C2C2CC"
|
|
309
|
+
};
|
|
310
|
+
var DarkTheme = {
|
|
311
|
+
"--button-background": "rgba(18, 18, 20, 1)",
|
|
312
|
+
"--button-stroke": "rgba(18, 18, 20, 0.30)",
|
|
313
|
+
"--button-inner-stroke": "unset",
|
|
314
|
+
"--button-shadow": "0px 0px 8px 0px rgba(0, 0, 0, 0.25)",
|
|
315
|
+
"--button-backdrop-filter": "unset",
|
|
316
|
+
"--button-icon-idle": "rgba(158, 157, 168, 1)",
|
|
317
|
+
"--button-icon-hover": "rgba(215, 214, 229, 1)",
|
|
318
|
+
"--icon-compass-north-color": "#F05C44",
|
|
319
|
+
"--icon-compass-south-color": "#C2C2CC"
|
|
320
|
+
};
|
|
321
|
+
var LightGlassTheme = {
|
|
322
|
+
"--button-background": "rgba(255, 255, 255, 0.6)",
|
|
323
|
+
"--button-stroke": "rgba(255, 255, 255, 0.3)",
|
|
324
|
+
"--button-inner-stroke": "1px solid rgba(255, 255, 255, 0.6)",
|
|
325
|
+
"--button-shadow": "0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset",
|
|
326
|
+
"--button-backdrop-filter": "blur(4px)",
|
|
327
|
+
"--button-icon-idle": "rgba(97, 97, 102, 1)",
|
|
328
|
+
"--button-icon-hover": "rgba(24, 24, 26, 1)",
|
|
329
|
+
"--icon-compass-north-color": "#F05C44",
|
|
330
|
+
"--icon-compass-south-color": "#C2C2CC"
|
|
331
|
+
};
|
|
332
|
+
var DarkGlassTheme = {
|
|
333
|
+
"--button-background": "rgba(18, 18, 20, 0.75)",
|
|
334
|
+
"--button-stroke": "rgba(18, 18, 20, 0.30)",
|
|
335
|
+
"--button-inner-stroke": "1px solid rgba(18, 18, 20, 0.75)",
|
|
336
|
+
"--button-shadow": "0px 0px 8px 0px rgba(0, 0, 0, 0.25), 0px 0px 8px 0px rgba(0, 0, 0, 0.1) inset",
|
|
337
|
+
"--button-backdrop-filter": "blur(4px)",
|
|
338
|
+
"--button-icon-idle": "rgba(158, 157, 168, 1)",
|
|
339
|
+
"--button-icon-hover": "rgba(215, 214, 229, 1)",
|
|
340
|
+
"--icon-compass-north-color": "#F05C44",
|
|
341
|
+
"--icon-compass-south-color": "#C2C2CC"
|
|
342
|
+
};
|
|
343
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["index.js", "fullscreen-widget.js", "components.js", "compass-widget.js", "zoom-widget.js", "themes.js"],
|
|
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 } 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\", 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 } 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.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 Object.assign(this.props, props);\n }\n onViewportChange(viewport) {\n this.viewport = 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 if (style) {\n Object.entries(style).map(([key, value]) => element.style.setProperty(key, value));\n }\n this.deck = deck;\n this.element = element;\n this.update();\n return element;\n }\n getRotation() {\n if (this.viewport instanceof WebMercatorViewport) {\n return [-this.viewport.bearing, this.viewport.pitch];\n }\n else if (this.viewport instanceof _GlobeViewport) {\n return [0, Math.max(-80, Math.min(80, this.viewport.latitude))];\n }\n return [0, 0];\n }\n update() {\n const [rz, rx] = this.getRotation();\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: () => this.handleCompassReset(), 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() {\n const viewId = this.viewId || 'default-view';\n if (this.viewport instanceof WebMercatorViewport) {\n const nextViewState = {\n ...this.viewport,\n bearing: 0,\n ...(this.getRotation()[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 } 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.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 if (style) {\n Object.entries(style).map(([key, value]) => element.style.setProperty(key, value));\n }\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 Object.assign(this.props, props);\n }\n onViewportChange(viewport) {\n this.viewport = viewport;\n }\n handleZoom(nextZoom) {\n const viewId = this.viewId || 'default-view';\n const nextViewState = {\n ...this.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 if (this.viewport) {\n this.handleZoom(this.viewport.zoom + 1);\n }\n }\n handleZoomOut() {\n if (this.viewport) {\n this.handleZoom(this.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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,sBAA4B;AAE5B,kBAAwC;AACxC,oBAAuB;;;ACHvB,yBAA4B;AACrB,IAAM,aAAa,WAAS;AAC/B,QAAM,EAAE,WAAW,OAAO,QAAQ,IAAI;AACtC,aAAQ,mBAAAC,KAAK,OAAO,EAAE,WAAW,sBAAsB,cAAU,mBAAAA,KAAK,UAAU,EAAE,WAAW,2BAA2B,aAAa,MAAM,UAAU,SAAkB,OAAO,OAAO,cAAU,mBAAAA,KAAK,OAAO,EAAE,WAAW,mBAAmB,CAAC,EAAE,CAAC,EAAE,CAAC;AACtP;AACO,IAAM,cAAc,WAAS;AAChC,QAAM,EAAE,UAAU,YAAY,IAAI;AAClC,aAAO,mBAAAA,KAAK,OAAO,EAAE,WAAW,4BAA4B,eAAe,SAAmB,CAAC;AACnG;AACO,IAAM,oBAAoB,WAAS;AACtC,QAAM,EAAE,WAAW,OAAO,QAAQ,IAAI;AACtC,aAAQ,mBAAAA,KAAK,UAAU,EAAE,WAAW,2BAA2B,aAAa,MAAM,UAAU,SAAkB,OAAO,OAAO,cAAU,mBAAAA,KAAK,OAAO,EAAE,WAAW,mBAAmB,CAAC,EAAE,CAAC;AAC1L;;;ADPO,IAAM,mBAAN,MAAuB;AAAA,EAC1B,YAAY,OAAO;AACf,SAAK,KAAK;AACV,SAAK,YAAY;AACjB,SAAK,aAAa;AAClB,SAAK,KAAK,MAAM,MAAM;AACtB,SAAK,YAAY,MAAM,aAAa;AACpC,UAAM,aAAa,MAAM,cAAc;AACvC,UAAM,YAAY,MAAM,aAAa;AACrC,UAAM,QAAQ,MAAM,SA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;AAAA,EACtB,uBAAuB;AAAA,EACvB,8BAA8B;AAAA,EAC9B,8BAA8B;AAClC;AACO,IAAM,iBAAiB;AAAA,EAC1B,uBAAuB;AAAA,EACvB,mBAAmB;AAAA,EACnB,yBAAyB;AAAA,EACzB,mBAAmB;AAAA,EACnB,4BAA4B;AAAA,EAC5B,sBAAsB;AAAA,EACtB,uBAAuB;AAAA,EACvB,8BAA8B;AAAA,EAC9B,8BAA8B;AAClC;",
|
|
6
|
+
"names": ["import_jsx_runtime", "_jsx", "_jsx", "deepEqual", "import_jsx_runtime", "import_core", "import_preact", "_jsx", "_jsxs", "import_jsx_runtime", "import_core", "import_preact", "_jsxs", "_jsx"]
|
|
7
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,+BAA4B;AACrD,OAAO,EAAC,aAAa,EAAC,4BAAyB;AAC/C,OAAO,EAAC,UAAU,EAAC,yBAAsB;AAEzC,4BAAyB"}
|
package/dist/index.js
ADDED