@deck.gl/widgets 9.3.0-alpha.1 → 9.3.0-alpha.2
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/context-menu-widget.d.ts +7 -5
- package/dist/context-menu-widget.d.ts.map +1 -1
- package/dist/context-menu-widget.js +2 -1
- package/dist/context-menu-widget.js.map +1 -1
- package/dist/dist.dev.js +687 -555
- package/dist/icon-widget.d.ts +28 -0
- package/dist/icon-widget.d.ts.map +1 -0
- package/dist/icon-widget.js +35 -0
- package/dist/icon-widget.js.map +1 -0
- package/dist/index.cjs +468 -309
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +11 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/info-widget.d.ts +1 -0
- package/dist/info-widget.d.ts.map +1 -1
- package/dist/info-widget.js +6 -0
- package/dist/info-widget.js.map +1 -1
- package/dist/lib/components/dropdown-menu.d.ts +3 -2
- package/dist/lib/components/dropdown-menu.d.ts.map +1 -1
- package/dist/lib/components/dropdown-menu.js +12 -8
- package/dist/lib/components/dropdown-menu.js.map +1 -1
- package/dist/lib/components/icon-button.d.ts +3 -0
- package/dist/lib/components/icon-button.d.ts.map +1 -1
- package/dist/lib/components/icon-button.js +10 -2
- package/dist/lib/components/icon-button.js.map +1 -1
- package/dist/lib/components/popover.js +1 -1
- package/dist/lib/components/popover.js.map +1 -1
- package/dist/lib/data-url.d.ts +5 -0
- package/dist/lib/data-url.d.ts.map +1 -0
- package/dist/lib/data-url.js +7 -0
- package/dist/lib/data-url.js.map +1 -0
- package/dist/popup-widget.d.ts +1 -0
- package/dist/popup-widget.d.ts.map +1 -1
- package/dist/popup-widget.js +6 -0
- package/dist/popup-widget.js.map +1 -1
- package/dist/selector-widget.d.ts +44 -0
- package/dist/selector-widget.d.ts.map +1 -0
- package/dist/selector-widget.js +64 -0
- package/dist/selector-widget.js.map +1 -0
- package/dist/splitter-widget.d.ts +52 -11
- package/dist/splitter-widget.d.ts.map +1 -1
- package/dist/splitter-widget.js +177 -76
- package/dist/splitter-widget.js.map +1 -1
- package/dist/stats-widget.d.ts +2 -1
- package/dist/stats-widget.d.ts.map +1 -1
- package/dist/stats-widget.js +37 -8
- package/dist/stats-widget.js.map +1 -1
- package/dist/stylesheet.css +50 -13
- package/dist/timeline-widget.d.ts.map +1 -1
- package/dist/timeline-widget.js +6 -1
- package/dist/timeline-widget.js.map +1 -1
- package/dist/toggle-widget.d.ts +38 -0
- package/dist/toggle-widget.d.ts.map +1 -0
- package/dist/toggle-widget.js +47 -0
- package/dist/toggle-widget.js.map +1 -0
- package/dist.min.js +2 -2
- package/package.json +3 -3
- package/src/context-menu-widget.tsx +9 -9
- package/src/icon-widget.tsx +69 -0
- package/src/index.ts +11 -9
- package/src/info-widget.tsx +7 -0
- package/src/lib/components/dropdown-menu.tsx +22 -15
- package/src/lib/components/icon-button.tsx +15 -3
- package/src/lib/components/popover.tsx +1 -1
- package/src/lib/data-url.ts +5 -0
- package/src/popup-widget.tsx +7 -0
- package/src/selector-widget.tsx +111 -0
- package/src/splitter-widget.tsx +281 -96
- package/src/stats-widget.tsx +50 -9
- package/src/stylesheet.css +50 -13
- package/src/timeline-widget.tsx +8 -1
- package/src/toggle-widget.tsx +101 -0
- package/dist/fps-widget.d.ts +0 -28
- package/dist/fps-widget.d.ts.map +0 -1
- package/dist/fps-widget.js +0 -51
- package/dist/fps-widget.js.map +0 -1
- package/dist/lib/components/icon-menu.d.ts +0 -16
- package/dist/lib/components/icon-menu.d.ts.map +0 -1
- package/dist/lib/components/icon-menu.js +0 -33
- package/dist/lib/components/icon-menu.js.map +0 -1
- package/dist/view-selector-widget.d.ts +0 -35
- package/dist/view-selector-widget.d.ts.map +0 -1
- package/dist/view-selector-widget.js +0 -63
- package/dist/view-selector-widget.js.map +0 -1
- package/src/fps-widget.tsx +0 -77
- package/src/lib/components/icon-menu.tsx +0 -70
- package/src/view-selector-widget.tsx +0 -151
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { WidgetPlacement, WidgetProps } from '@deck.gl/core';
|
|
2
|
+
import { Widget } from '@deck.gl/core';
|
|
3
|
+
export type IconWidgetProps = WidgetProps & {
|
|
4
|
+
/** Widget positioning within the view. Default 'bottom-left'. */
|
|
5
|
+
placement?: WidgetPlacement;
|
|
6
|
+
/** View to attach to and interact with. Required when using multiple views. */
|
|
7
|
+
viewId?: string | null;
|
|
8
|
+
/** Data url to display as icon */
|
|
9
|
+
icon: string;
|
|
10
|
+
/** Tooltip label */
|
|
11
|
+
label?: string;
|
|
12
|
+
/** Icon color, a CSS Color string */
|
|
13
|
+
color?: string;
|
|
14
|
+
/** Callback when the widget is clicked */
|
|
15
|
+
onClick?: () => void;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* A generic widget that displays a button with icon or text content.
|
|
19
|
+
*/
|
|
20
|
+
export declare class IconWidget extends Widget<IconWidgetProps> {
|
|
21
|
+
static defaultProps: Required<IconWidgetProps>;
|
|
22
|
+
className: string;
|
|
23
|
+
placement: WidgetPlacement;
|
|
24
|
+
constructor(props: IconWidgetProps);
|
|
25
|
+
setProps(props: Partial<IconWidgetProps>): void;
|
|
26
|
+
onRenderHTML(rootElement: HTMLElement): void;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=icon-widget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-widget.d.ts","sourceRoot":"","sources":["../src/icon-widget.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,eAAe,EAAE,WAAW,EAAC,MAAM,eAAe,CAAC;AAEhE,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AAGrC,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG;IAC1C,iEAAiE;IACjE,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,+EAA+E;IAC/E,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,qBAAa,UAAW,SAAQ,MAAM,CAAC,eAAe,CAAC;IACrD,MAAM,CAAC,YAAY,EAAE,QAAQ,CAAC,eAAe,CAAC,CAS5C;IAEF,SAAS,SAAM;IACf,SAAS,EAAE,eAAe,CAAc;gBAE5B,KAAK,EAAE,eAAe;IAKlC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC;IAMxC,YAAY,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;CAe7C"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx } from "preact/jsx-runtime";
|
|
2
|
+
import { render } from 'preact';
|
|
3
|
+
import { Widget } from '@deck.gl/core';
|
|
4
|
+
import { IconButton } from "./lib/components/icon-button.js";
|
|
5
|
+
/**
|
|
6
|
+
* A generic widget that displays a button with icon or text content.
|
|
7
|
+
*/
|
|
8
|
+
export class IconWidget extends Widget {
|
|
9
|
+
constructor(props) {
|
|
10
|
+
super(props);
|
|
11
|
+
this.className = '';
|
|
12
|
+
this.placement = 'top-left';
|
|
13
|
+
this.setProps(this.props);
|
|
14
|
+
}
|
|
15
|
+
setProps(props) {
|
|
16
|
+
this.placement = props.placement ?? this.placement;
|
|
17
|
+
this.viewId = props.viewId;
|
|
18
|
+
super.setProps(props);
|
|
19
|
+
}
|
|
20
|
+
onRenderHTML(rootElement) {
|
|
21
|
+
const { className, style, icon, color, label, onClick } = this.props;
|
|
22
|
+
render(_jsx(IconButton, { className: className, style: style, color: color, icon: icon, label: label, onClick: onClick }), rootElement);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
IconWidget.defaultProps = {
|
|
26
|
+
...Widget.defaultProps,
|
|
27
|
+
id: 'icon',
|
|
28
|
+
placement: 'top-left',
|
|
29
|
+
viewId: null,
|
|
30
|
+
icon: '',
|
|
31
|
+
label: '',
|
|
32
|
+
color: '',
|
|
33
|
+
onClick: undefined
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=icon-widget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-widget.js","sourceRoot":"","sources":["../src/icon-widget.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,MAAM,EAAW,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AACrC,OAAO,EAAC,UAAU,EAAC,wCAAqC;AAiBxD;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,MAAuB;IAerD,YAAY,KAAsB;QAChC,KAAK,CAAC,KAAK,CAAC,CAAC;QAJf,cAAS,GAAG,EAAE,CAAC;QACf,cAAS,GAAoB,UAAU,CAAC;QAItC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,QAAQ,CAAC,KAA+B;QACtC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC;QACnD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC3B,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;IAED,YAAY,CAAC,WAAwB;QACnC,MAAM,EAAC,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QAEnE,MAAM,CACJ,KAAC,UAAU,IACT,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAA0B,EACjC,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,GAChB,EACF,WAAW,CACZ,CAAC;IACJ,CAAC;;AAvCM,uBAAY,GAA8B;IAC/C,GAAG,MAAM,CAAC,YAAY;IACtB,EAAE,EAAE,MAAM;IACV,SAAS,EAAE,UAAU;IACrB,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,EAAE;IACR,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,SAAU;CACpB,AATkB,CASjB"}
|