@daasboard/ui 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +5 -0
- package/README.md +6 -2
- package/dist/LICENSE-lucide.txt +43 -0
- package/dist/color/color.d.ts +34 -0
- package/dist/color/color.js +106 -0
- package/dist/color/edit.d.ts +34 -0
- package/dist/color/edit.js +40 -0
- package/dist/color/gradient.d.ts +39 -0
- package/dist/color/gradient.js +129 -0
- package/dist/color/index.d.ts +3 -0
- package/dist/color/index.js +3 -0
- package/dist/controls/buttons.d.ts +54 -0
- package/dist/controls/buttons.js +95 -0
- package/dist/controls/font-picker.d.ts +35 -0
- package/dist/controls/font-picker.js +178 -0
- package/dist/controls/index.d.ts +43 -0
- package/dist/controls/index.js +32 -0
- package/dist/controls/number-field.d.ts +60 -0
- package/dist/controls/number-field.js +190 -0
- package/dist/controls/place.d.ts +10 -0
- package/dist/controls/place.js +77 -0
- package/dist/controls/popover.d.ts +84 -0
- package/dist/controls/popover.js +366 -0
- package/dist/controls/shared.d.ts +30 -0
- package/dist/controls/shared.js +134 -0
- package/dist/controls/slider.d.ts +82 -0
- package/dist/controls/slider.js +241 -0
- package/dist/controls/swatch.d.ts +25 -0
- package/dist/controls/swatch.js +38 -0
- package/dist/controls/tooltip.d.ts +19 -0
- package/dist/controls/tooltip.js +84 -0
- package/dist/controls/typed.d.ts +28 -0
- package/dist/controls/typed.js +126 -0
- package/dist/element.d.ts +40 -0
- package/dist/element.js +78 -0
- package/dist/host.d.ts +99 -0
- package/dist/host.js +1 -0
- package/dist/icons/index.d.ts +7 -0
- package/dist/icons/index.js +31 -0
- package/dist/icons/lucide.d.ts +851 -0
- package/dist/icons/lucide.js +90 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +16 -0
- package/dist/keys.d.ts +30 -0
- package/dist/keys.js +122 -0
- package/dist/mount.d.ts +11 -0
- package/dist/mount.js +96 -0
- package/dist/options.d.ts +152 -0
- package/dist/options.js +78 -0
- package/dist/palette.d.ts +6 -0
- package/dist/palette.js +9 -0
- package/dist/picker/handles.d.ts +7 -0
- package/dist/picker/handles.js +8 -0
- package/dist/picker/index.d.ts +21 -0
- package/dist/picker/index.js +20 -0
- package/dist/picker/palette.d.ts +8 -0
- package/dist/picker/palette.js +14 -0
- package/dist/picker/picker.d.ts +63 -0
- package/dist/picker/picker.js +561 -0
- package/dist/picker/solid-editor.d.ts +60 -0
- package/dist/picker/solid-editor.js +330 -0
- package/dist/picker/stop-bar.d.ts +27 -0
- package/dist/picker/stop-bar.js +140 -0
- package/dist/prefs.d.ts +6 -0
- package/dist/prefs.js +34 -0
- package/dist/recents.d.ts +9 -0
- package/dist/recents.js +140 -0
- package/dist/root.d.ts +31 -0
- package/dist/root.js +526 -0
- package/dist/scheduler.d.ts +21 -0
- package/dist/scheduler.js +132 -0
- package/dist/strings.d.ts +284 -0
- package/dist/strings.js +287 -0
- package/dist/surface.d.ts +27 -0
- package/dist/surface.js +8 -0
- package/dist/surfaces/context-menu/index.d.ts +2 -0
- package/dist/surfaces/context-menu/index.js +2 -0
- package/dist/surfaces/context-menu/items.d.ts +14 -0
- package/dist/surfaces/context-menu/items.js +38 -0
- package/dist/surfaces/context-menu/menu.d.ts +16 -0
- package/dist/surfaces/context-menu/menu.js +135 -0
- package/dist/surfaces/pane/index.d.ts +16 -0
- package/dist/surfaces/pane/index.js +19 -0
- package/dist/surfaces/pane/model.d.ts +41 -0
- package/dist/surfaces/pane/model.js +139 -0
- package/dist/surfaces/pane/outlet.d.ts +16 -0
- package/dist/surfaces/pane/outlet.js +20 -0
- package/dist/surfaces/pane/pane.d.ts +40 -0
- package/dist/surfaces/pane/pane.js +1429 -0
- package/dist/surfaces/pane/placement.d.ts +11 -0
- package/dist/surfaces/pane/placement.js +62 -0
- package/dist/surfaces/pane/text-field.d.ts +16 -0
- package/dist/surfaces/pane/text-field.js +20 -0
- package/dist/surfaces/selection-toolbar/index.d.ts +2 -0
- package/dist/surfaces/selection-toolbar/index.js +2 -0
- package/dist/surfaces/selection-toolbar/items.d.ts +37 -0
- package/dist/surfaces/selection-toolbar/items.js +183 -0
- package/dist/surfaces/selection-toolbar/toolbar.d.ts +27 -0
- package/dist/surfaces/selection-toolbar/toolbar.js +956 -0
- package/dist/surfaces/tools/index.d.ts +2 -0
- package/dist/surfaces/tools/index.js +2 -0
- package/dist/surfaces/tools/keys.d.ts +11 -0
- package/dist/surfaces/tools/keys.js +21 -0
- package/dist/surfaces/tools/model.d.ts +48 -0
- package/dist/surfaces/tools/model.js +155 -0
- package/dist/surfaces/tools/toolbar.d.ts +27 -0
- package/dist/surfaces/tools/toolbar.js +502 -0
- package/dist/theme.d.ts +26 -0
- package/dist/theme.js +47 -0
- package/package.json +31 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Copyright (c) 2026 Spotworks AI LLC. All rights reserved.
|
|
2
|
+
|
|
3
|
+
This software is proprietary. No license or other right to use, copy, modify,
|
|
4
|
+
merge, publish, distribute, sublicense or sell it, in whole or in part, is
|
|
5
|
+
granted except under a separate written agreement with Spotworks AI LLC.
|
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @daasboard/ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The built-in Lit controls, toolbars, menus and property pane for daasboard.
|
|
4
|
+
|
|
5
|
+
Hosts normally start from [`@daasboard/embed`](https://www.npmjs.com/package/@daasboard/embed), which mounts the editor and documents the required wasm and font assets. Keep every `@daasboard` package on the same exact release version.
|
|
6
|
+
|
|
7
|
+
This package provides ES modules and TypeScript declarations through its root entry point. Public availability grants no license; see `LICENSE`. Third-party components retain their own licenses.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lucide Icons and Contributors
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
15
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
The following Lucide icons are derived from the Feather project:
|
|
20
|
+
|
|
21
|
+
airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
|
|
22
|
+
|
|
23
|
+
The MIT License (MIT) (for the icons listed above)
|
|
24
|
+
|
|
25
|
+
Copyright (c) 2013-present Cole Bemis
|
|
26
|
+
|
|
27
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
28
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
29
|
+
in the Software without restriction, including without limitation the rights
|
|
30
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
31
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
32
|
+
furnished to do so, subject to the following conditions:
|
|
33
|
+
|
|
34
|
+
The above copyright notice and this permission notice shall be included in all
|
|
35
|
+
copies or substantial portions of the Software.
|
|
36
|
+
|
|
37
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
38
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
39
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
40
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
41
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
42
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
43
|
+
SOFTWARE.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { GradientStop } from "@daasboard/editor";
|
|
2
|
+
import type { ColorFormat } from "../options.js";
|
|
3
|
+
export interface Rgba {
|
|
4
|
+
r: number;
|
|
5
|
+
g: number;
|
|
6
|
+
b: number;
|
|
7
|
+
a: number;
|
|
8
|
+
}
|
|
9
|
+
export interface Hsv {
|
|
10
|
+
h: number;
|
|
11
|
+
s: number;
|
|
12
|
+
v: number;
|
|
13
|
+
a: number;
|
|
14
|
+
}
|
|
15
|
+
export interface Hsl {
|
|
16
|
+
h: number;
|
|
17
|
+
s: number;
|
|
18
|
+
l: number;
|
|
19
|
+
a: number;
|
|
20
|
+
}
|
|
21
|
+
export declare function parseHex(text: string): Rgba | null;
|
|
22
|
+
export declare function formatHex(c: Rgba): string;
|
|
23
|
+
export declare function parseStored(text: string | undefined | null): Rgba;
|
|
24
|
+
export declare function normalizeHex(text: string): string | null;
|
|
25
|
+
export declare function rgbToHsv({ r, g, b, a }: Rgba): Hsv;
|
|
26
|
+
export declare function hsvToRgb({ h, s, v, a }: Hsv): Rgba;
|
|
27
|
+
export declare function rgbToHsl({ r, g, b, a }: Rgba): Hsl;
|
|
28
|
+
export declare function hslToRgb({ h, s, l, a }: Hsl): Rgba;
|
|
29
|
+
export declare function hsvFrom(c: Rgba, prev?: Hsv): Hsv;
|
|
30
|
+
export declare function channelsOf(c: Rgba, format: ColorFormat, prev?: readonly number[]): number[];
|
|
31
|
+
export declare function fromChannels(format: Exclude<ColorFormat, "hex">, ch: readonly number[], a: number): Rgba;
|
|
32
|
+
export declare const cssColor: (c: Rgba) => string;
|
|
33
|
+
export declare function mixRgba(a: Rgba, b: Rgba, t: number): Rgba;
|
|
34
|
+
export declare function colorAt(stops: readonly GradientStop[], t: number): Rgba;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
const clamp = (v, lo, hi) => (v < lo ? lo : v > hi ? hi : v);
|
|
2
|
+
const byte = (v) => Math.round(clamp(v, 0, 255));
|
|
3
|
+
const hex2 = (v) => byte(v).toString(16).padStart(2, "0");
|
|
4
|
+
export function parseHex(text) {
|
|
5
|
+
const s = text.trim().replace(/^#/, "");
|
|
6
|
+
if (!/^[0-9a-f]+$/i.test(s) || ![3, 4, 6, 8].includes(s.length))
|
|
7
|
+
return null;
|
|
8
|
+
const short = s.length <= 4;
|
|
9
|
+
const at = (i) => parseInt(short ? s[i] + s[i] : s.slice(i * 2, i * 2 + 2), 16);
|
|
10
|
+
return { r: at(0), g: at(1), b: at(2), a: s.length === 4 || s.length === 8 ? at(3) / 255 : 1 };
|
|
11
|
+
}
|
|
12
|
+
export function formatHex(c) {
|
|
13
|
+
const a = byte(clamp(c.a, 0, 1) * 255);
|
|
14
|
+
return `#${hex2(c.r)}${hex2(c.g)}${hex2(c.b)}${a === 255 ? "" : hex2(a)}`;
|
|
15
|
+
}
|
|
16
|
+
export function parseStored(text) {
|
|
17
|
+
if (!text)
|
|
18
|
+
return { r: 0, g: 0, b: 0, a: 0 };
|
|
19
|
+
return (text[0] === "#" ? parseHex(text) : null) ?? { r: 255, g: 0, b: 255, a: 1 };
|
|
20
|
+
}
|
|
21
|
+
export function normalizeHex(text) {
|
|
22
|
+
const c = parseHex(text);
|
|
23
|
+
return c ? formatHex(c) : null;
|
|
24
|
+
}
|
|
25
|
+
export function rgbToHsv({ r, g, b, a }) {
|
|
26
|
+
const R = clamp(r, 0, 255) / 255;
|
|
27
|
+
const G = clamp(g, 0, 255) / 255;
|
|
28
|
+
const B = clamp(b, 0, 255) / 255;
|
|
29
|
+
const max = Math.max(R, G, B);
|
|
30
|
+
const d = max - Math.min(R, G, B);
|
|
31
|
+
return { h: hueOf(R, G, B, max, d), s: max === 0 ? 0 : d / max, v: max, a };
|
|
32
|
+
}
|
|
33
|
+
export function hsvToRgb({ h, s, v, a }) {
|
|
34
|
+
const f = (n) => {
|
|
35
|
+
const k = (n + h / 60) % 6;
|
|
36
|
+
return v - v * s * Math.max(0, Math.min(k, 4 - k, 1));
|
|
37
|
+
};
|
|
38
|
+
return { r: f(5) * 255, g: f(3) * 255, b: f(1) * 255, a };
|
|
39
|
+
}
|
|
40
|
+
export function rgbToHsl({ r, g, b, a }) {
|
|
41
|
+
const R = clamp(r, 0, 255) / 255;
|
|
42
|
+
const G = clamp(g, 0, 255) / 255;
|
|
43
|
+
const B = clamp(b, 0, 255) / 255;
|
|
44
|
+
const max = Math.max(R, G, B);
|
|
45
|
+
const min = Math.min(R, G, B);
|
|
46
|
+
const d = max - min;
|
|
47
|
+
const l = (max + min) / 2;
|
|
48
|
+
return { h: hueOf(R, G, B, max, d), s: d === 0 ? 0 : d / (1 - Math.abs(2 * l - 1)), l, a };
|
|
49
|
+
}
|
|
50
|
+
export function hslToRgb({ h, s, l, a }) {
|
|
51
|
+
const k = (n) => (n + h / 30) % 12;
|
|
52
|
+
const q = s * Math.min(l, 1 - l);
|
|
53
|
+
const f = (n) => l - q * Math.max(-1, Math.min(k(n) - 3, 9 - k(n), 1));
|
|
54
|
+
return { r: f(0) * 255, g: f(8) * 255, b: f(4) * 255, a };
|
|
55
|
+
}
|
|
56
|
+
function hueOf(R, G, B, max, d) {
|
|
57
|
+
if (d === 0)
|
|
58
|
+
return 0;
|
|
59
|
+
const h = max === R ? ((G - B) / d) % 6 : max === G ? (B - R) / d + 2 : (R - G) / d + 4;
|
|
60
|
+
return (h * 60 + 360) % 360;
|
|
61
|
+
}
|
|
62
|
+
export function hsvFrom(c, prev) {
|
|
63
|
+
const hsv = rgbToHsv(c);
|
|
64
|
+
if (!prev)
|
|
65
|
+
return hsv;
|
|
66
|
+
if (hsv.v === 0)
|
|
67
|
+
return { ...hsv, h: prev.h, s: prev.s };
|
|
68
|
+
if (hsv.s === 0)
|
|
69
|
+
return { ...hsv, h: prev.h };
|
|
70
|
+
return hsv;
|
|
71
|
+
}
|
|
72
|
+
export function channelsOf(c, format, prev) {
|
|
73
|
+
if (format === "rgb")
|
|
74
|
+
return [byte(c.r), byte(c.g), byte(c.b)];
|
|
75
|
+
if (format === "hsl") {
|
|
76
|
+
if (prev?.length === 3 && formatHex(fromChannels("hsl", prev, c.a)) === formatHex(c))
|
|
77
|
+
return [...prev];
|
|
78
|
+
const { h, s, l } = rgbToHsl(c);
|
|
79
|
+
return [h % 360, s * 100, l * 100];
|
|
80
|
+
}
|
|
81
|
+
return [];
|
|
82
|
+
}
|
|
83
|
+
export function fromChannels(format, ch, a) {
|
|
84
|
+
const [x = 0, y = 0, z = 0] = ch;
|
|
85
|
+
if (format === "rgb")
|
|
86
|
+
return { r: clamp(x, 0, 255), g: clamp(y, 0, 255), b: clamp(z, 0, 255), a };
|
|
87
|
+
return hslToRgb({ h: ((x % 360) + 360) % 360, s: clamp(y, 0, 100) / 100, l: clamp(z, 0, 100) / 100, a });
|
|
88
|
+
}
|
|
89
|
+
export const cssColor = (c) => formatHex(c);
|
|
90
|
+
export function mixRgba(a, b, t) {
|
|
91
|
+
const u = clamp(t, 0, 1);
|
|
92
|
+
return { r: a.r + (b.r - a.r) * u, g: a.g + (b.g - a.g) * u, b: a.b + (b.b - a.b) * u, a: a.a + (b.a - a.a) * u };
|
|
93
|
+
}
|
|
94
|
+
export function colorAt(stops, t) {
|
|
95
|
+
const sorted = [...stops].sort((x, y) => x.at - y.at).map((s) => ({ at: clamp(s.at, 0, 1), c: parseStored(s.color) }));
|
|
96
|
+
if (sorted.length === 0)
|
|
97
|
+
return { r: 0, g: 0, b: 0, a: 0 };
|
|
98
|
+
if (t < sorted[0].at)
|
|
99
|
+
return sorted[0].c;
|
|
100
|
+
let i = sorted.length - 1;
|
|
101
|
+
while (sorted[i].at > t)
|
|
102
|
+
i--;
|
|
103
|
+
const p = sorted[i];
|
|
104
|
+
const q = sorted[i + 1];
|
|
105
|
+
return q ? mixRgba(p.c, q.c, (t - p.at) / (q.at - p.at)) : p.c;
|
|
106
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { FillPaint, GradientStop } from "@daasboard/editor";
|
|
2
|
+
import { type Box, type PaintType, type Vec } from "./gradient.js";
|
|
3
|
+
export type PaintEdit = {
|
|
4
|
+
op: "color";
|
|
5
|
+
hex: string;
|
|
6
|
+
} | {
|
|
7
|
+
op: "none";
|
|
8
|
+
} | {
|
|
9
|
+
op: "paint";
|
|
10
|
+
paint: FillPaint;
|
|
11
|
+
} | {
|
|
12
|
+
op: "type";
|
|
13
|
+
to: PaintType;
|
|
14
|
+
} | {
|
|
15
|
+
op: "stops";
|
|
16
|
+
stops: readonly GradientStop[];
|
|
17
|
+
} | {
|
|
18
|
+
op: "angle";
|
|
19
|
+
deg: number;
|
|
20
|
+
} | {
|
|
21
|
+
op: "rotate90";
|
|
22
|
+
} | {
|
|
23
|
+
op: "flip";
|
|
24
|
+
} | {
|
|
25
|
+
op: "radial";
|
|
26
|
+
cx?: number;
|
|
27
|
+
cy?: number;
|
|
28
|
+
r?: number;
|
|
29
|
+
} | {
|
|
30
|
+
op: "axis";
|
|
31
|
+
p0: Vec;
|
|
32
|
+
p1: Vec;
|
|
33
|
+
};
|
|
34
|
+
export declare function applyPaintEdit(edit: PaintEdit, paint: FillPaint | null, box: Box): FillPaint | null;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { normalizeHex } from "./color.js";
|
|
2
|
+
import { axisForAngle, axisFromPoints, convertPaint, flipStops, rotate90 } from "./gradient.js";
|
|
3
|
+
export function applyPaintEdit(edit, paint, box) {
|
|
4
|
+
switch (edit.op) {
|
|
5
|
+
case "color":
|
|
6
|
+
return normalizeHex(edit.hex) ?? paint;
|
|
7
|
+
case "none":
|
|
8
|
+
return null;
|
|
9
|
+
case "paint":
|
|
10
|
+
return edit.paint;
|
|
11
|
+
case "type":
|
|
12
|
+
return convertPaint(paint, edit.to);
|
|
13
|
+
}
|
|
14
|
+
if (paint === null || typeof paint === "string")
|
|
15
|
+
return paint;
|
|
16
|
+
switch (edit.op) {
|
|
17
|
+
case "stops":
|
|
18
|
+
return { ...paint, stops: edit.stops.map((s) => ({ ...s })) };
|
|
19
|
+
case "flip":
|
|
20
|
+
return { ...paint, stops: flipStops(paint.stops) };
|
|
21
|
+
case "angle":
|
|
22
|
+
return paint.type === "linear" ? { ...paint, ...axisForAngle(edit.deg, box) } : paint;
|
|
23
|
+
case "rotate90":
|
|
24
|
+
return paint.type === "linear" ? rotate90(paint, box) : paint;
|
|
25
|
+
case "axis":
|
|
26
|
+
return paint.type === "linear" ? { ...paint, ...axisFromPoints(edit.p0, edit.p1, box) } : paint;
|
|
27
|
+
case "radial": {
|
|
28
|
+
if (paint.type !== "radial")
|
|
29
|
+
return paint;
|
|
30
|
+
const next = { ...paint };
|
|
31
|
+
if (edit.cx !== undefined && Number.isFinite(edit.cx))
|
|
32
|
+
next.cx = edit.cx;
|
|
33
|
+
if (edit.cy !== undefined && Number.isFinite(edit.cy))
|
|
34
|
+
next.cy = edit.cy;
|
|
35
|
+
if (edit.r !== undefined && Number.isFinite(edit.r) && edit.r > 0)
|
|
36
|
+
next.r = edit.r;
|
|
37
|
+
return next;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { FillPaint, GradientStop, LinearGradient } from "@daasboard/editor";
|
|
2
|
+
export interface Box {
|
|
3
|
+
w: number;
|
|
4
|
+
h: number;
|
|
5
|
+
}
|
|
6
|
+
export type Vec = [number, number];
|
|
7
|
+
export type PaintType = "solid" | "linear" | "radial";
|
|
8
|
+
export declare const DEFAULT_LINEAR_AXIS: {
|
|
9
|
+
start: Vec;
|
|
10
|
+
end: Vec;
|
|
11
|
+
};
|
|
12
|
+
export declare const normalizeDeg: (deg: number) => number;
|
|
13
|
+
export declare const directionOf: (deg: number) => Vec;
|
|
14
|
+
export declare function cssLine(deg: number, box: Box): {
|
|
15
|
+
p0: Vec;
|
|
16
|
+
p1: Vec;
|
|
17
|
+
};
|
|
18
|
+
export declare function axisFromPoints(p0: Vec, p1: Vec, box: Box): {
|
|
19
|
+
start: Vec;
|
|
20
|
+
end: Vec;
|
|
21
|
+
};
|
|
22
|
+
export declare function pointsOfAxis(start: readonly number[], end: readonly number[], box: Box): {
|
|
23
|
+
p0: Vec;
|
|
24
|
+
p1: Vec;
|
|
25
|
+
};
|
|
26
|
+
export declare function angleOf(g: Pick<LinearGradient, "start" | "end">, box: Box): number;
|
|
27
|
+
export declare function axisForAngle(deg: number, box: Box): {
|
|
28
|
+
start: Vec;
|
|
29
|
+
end: Vec;
|
|
30
|
+
};
|
|
31
|
+
export declare function rotate90(g: LinearGradient, box: Box): LinearGradient;
|
|
32
|
+
export declare function flipStops(stops: readonly GradientStop[]): GradientStop[];
|
|
33
|
+
export declare const paintTypeOf: (p: FillPaint) => PaintType;
|
|
34
|
+
export declare const sortedStops: (stops: readonly GradientStop[]) => GradientStop[];
|
|
35
|
+
export declare function firstColor(p: FillPaint): string;
|
|
36
|
+
export declare const NO_PAINT_GRAY = "#dee2e6";
|
|
37
|
+
export declare function convertPaint(p: FillPaint | null, to: PaintType): FillPaint;
|
|
38
|
+
export declare const stopColorAt: (stops: readonly GradientStop[], at: number) => string;
|
|
39
|
+
export declare function paintCss(p: FillPaint | null, box: Box): string;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { colorAt, formatHex, mixRgba, parseStored } from "./color.js";
|
|
2
|
+
export const DEFAULT_LINEAR_AXIS = { start: [0.5, 0], end: [0.5, 1] };
|
|
3
|
+
function frameOf(box) {
|
|
4
|
+
return box.w > 0 && box.h > 0 && Number.isFinite(box.w) && Number.isFinite(box.h) ? box : { w: 1, h: 1 };
|
|
5
|
+
}
|
|
6
|
+
const RAD = Math.PI / 180;
|
|
7
|
+
export const normalizeDeg = (deg) => ((deg % 360) + 360) % 360;
|
|
8
|
+
export const directionOf = (deg) => [Math.sin(deg * RAD), -Math.cos(deg * RAD)];
|
|
9
|
+
export function cssLine(deg, box) {
|
|
10
|
+
const { w, h } = frameOf(box);
|
|
11
|
+
const [dx, dy] = directionOf(deg);
|
|
12
|
+
const half = (Math.abs(w * dx) + Math.abs(h * dy)) / 2;
|
|
13
|
+
return { p0: [w / 2 - dx * half, h / 2 - dy * half], p1: [w / 2 + dx * half, h / 2 + dy * half] };
|
|
14
|
+
}
|
|
15
|
+
export function axisFromPoints(p0, p1, box) {
|
|
16
|
+
const { w, h } = frameOf(box);
|
|
17
|
+
const v = [p1[0] - p0[0], p1[1] - p0[1]];
|
|
18
|
+
const vv = v[0] * v[0] + v[1] * v[1];
|
|
19
|
+
if (!(vv > 0))
|
|
20
|
+
return { start: [...DEFAULT_LINEAR_AXIS.start], end: [...DEFAULT_LINEAR_AXIS.end] };
|
|
21
|
+
const sv = [w * v[0], h * v[1]];
|
|
22
|
+
const k = vv / (sv[0] * sv[0] + sv[1] * sv[1]);
|
|
23
|
+
const start = [p0[0] / w, p0[1] / h];
|
|
24
|
+
return { start, end: [start[0] + sv[0] * k, start[1] + sv[1] * k] };
|
|
25
|
+
}
|
|
26
|
+
export function pointsOfAxis(start, end, box) {
|
|
27
|
+
const { w, h } = frameOf(box);
|
|
28
|
+
const a = [end[0] - start[0], end[1] - start[1]];
|
|
29
|
+
const aa = a[0] * a[0] + a[1] * a[1];
|
|
30
|
+
const p0 = [w * start[0], h * start[1]];
|
|
31
|
+
if (!(aa > 0))
|
|
32
|
+
return { p0, p1: [...p0] };
|
|
33
|
+
const g = [a[0] / (w * aa), a[1] / (h * aa)];
|
|
34
|
+
const gg = g[0] * g[0] + g[1] * g[1];
|
|
35
|
+
return { p0, p1: [p0[0] + g[0] / gg, p0[1] + g[1] / gg] };
|
|
36
|
+
}
|
|
37
|
+
export function angleOf(g, box) {
|
|
38
|
+
const { p0, p1 } = pointsOfAxis(g.start, g.end, box);
|
|
39
|
+
const dx = p1[0] - p0[0];
|
|
40
|
+
const dy = p1[1] - p0[1];
|
|
41
|
+
if (dx === 0 && dy === 0)
|
|
42
|
+
return 180;
|
|
43
|
+
return normalizeDeg(Math.atan2(dx, -dy) / RAD);
|
|
44
|
+
}
|
|
45
|
+
export function axisForAngle(deg, box) {
|
|
46
|
+
const { p0, p1 } = cssLine(deg, box);
|
|
47
|
+
return axisFromPoints(p0, p1, box);
|
|
48
|
+
}
|
|
49
|
+
export function rotate90(g, box) {
|
|
50
|
+
return { ...g, ...axisForAngle(angleOf(g, box) + 90, box) };
|
|
51
|
+
}
|
|
52
|
+
export function flipStops(stops) {
|
|
53
|
+
return stops.map((s) => ({ ...s, at: 1 - s.at })).reverse();
|
|
54
|
+
}
|
|
55
|
+
export const paintTypeOf = (p) => (typeof p === "string" ? "solid" : p.type);
|
|
56
|
+
export const sortedStops = (stops) => [...stops].sort((a, b) => a.at - b.at);
|
|
57
|
+
export function firstColor(p) {
|
|
58
|
+
if (typeof p === "string")
|
|
59
|
+
return p;
|
|
60
|
+
const first = sortedStops(p.stops)[0];
|
|
61
|
+
return first ? first.color : "#00000000";
|
|
62
|
+
}
|
|
63
|
+
export const NO_PAINT_GRAY = "#dee2e6";
|
|
64
|
+
export function convertPaint(p, to) {
|
|
65
|
+
if (p === null) {
|
|
66
|
+
const start = { type: "linear", start: [...DEFAULT_LINEAR_AXIS.start], end: [...DEFAULT_LINEAR_AXIS.end], stops: [{ at: 0, color: NO_PAINT_GRAY }, { at: 1, color: "#ffffff" }] };
|
|
67
|
+
return convertPaint(start, to);
|
|
68
|
+
}
|
|
69
|
+
const from = paintTypeOf(p);
|
|
70
|
+
if (from === to)
|
|
71
|
+
return p;
|
|
72
|
+
if (to === "solid")
|
|
73
|
+
return firstColor(p);
|
|
74
|
+
const stops = typeof p === "string" ? [{ at: 0, color: formatHex(parseStored(p)) }, { at: 1, color: formatHex({ ...parseStored(p), a: 0 }) }] : p.stops.map((s) => ({ ...s }));
|
|
75
|
+
if (to === "linear")
|
|
76
|
+
return { type: "linear", start: [...DEFAULT_LINEAR_AXIS.start], end: [...DEFAULT_LINEAR_AXIS.end], stops };
|
|
77
|
+
return { type: "radial", stops };
|
|
78
|
+
}
|
|
79
|
+
export const stopColorAt = (stops, at) => formatHex(colorAt(stops, at));
|
|
80
|
+
const pct = (v) => `${+(v * 100).toFixed(4)}%`;
|
|
81
|
+
const cssStop = (color, at) => `${color} ${pct(at)}`;
|
|
82
|
+
const DEGENERATE = 1 / 32768;
|
|
83
|
+
const finite = (v) => typeof v === "number" && Number.isFinite(v);
|
|
84
|
+
function previewStops(stops) {
|
|
85
|
+
const out = [];
|
|
86
|
+
stops.forEach((s, i) => {
|
|
87
|
+
const a = parseStored(s.color);
|
|
88
|
+
out.push({ color: formatHex(a), at: s.at });
|
|
89
|
+
const next = stops[i + 1];
|
|
90
|
+
if (!next || next.at <= s.at)
|
|
91
|
+
return;
|
|
92
|
+
const b = parseStored(next.color);
|
|
93
|
+
const channel = Math.max(Math.abs(a.r - b.r), Math.abs(a.g - b.g), Math.abs(a.b - b.b));
|
|
94
|
+
const n = Math.ceil(Math.sqrt((Math.abs(a.a - b.a) * channel) / 4));
|
|
95
|
+
for (let k = 1; k < n; k++)
|
|
96
|
+
out.push({ color: formatHex(mixRgba(a, b, k / n)), at: s.at + ((next.at - s.at) * k) / n });
|
|
97
|
+
});
|
|
98
|
+
return out;
|
|
99
|
+
}
|
|
100
|
+
export function paintCss(p, box) {
|
|
101
|
+
if (p === null)
|
|
102
|
+
return "transparent";
|
|
103
|
+
if (typeof p === "string")
|
|
104
|
+
return formatHex(parseStored(p));
|
|
105
|
+
const stops = sortedStops(p.stops).map((s) => ({ ...s, at: Math.min(1, Math.max(0, s.at)) }));
|
|
106
|
+
if (stops.length === 0)
|
|
107
|
+
return "transparent";
|
|
108
|
+
if (p.type === "radial" && !(finite(p.r ?? 0.5) && (p.r ?? 0.5) > 0 && finite(p.cx ?? 0.5) && finite(p.cy ?? 0.5)))
|
|
109
|
+
return "transparent";
|
|
110
|
+
const extent = p.type === "radial" ? (p.r ?? 0.5) : Math.hypot(p.end[0] - p.start[0], p.end[1] - p.start[1]);
|
|
111
|
+
if (extent <= DEGENERATE)
|
|
112
|
+
return formatHex(parseStored(stops[stops.length - 1].color));
|
|
113
|
+
if (stops.length === 1)
|
|
114
|
+
stops.push({ ...stops[0], at: 1 });
|
|
115
|
+
const css = previewStops(stops);
|
|
116
|
+
if (p.type === "radial") {
|
|
117
|
+
const r = p.r ?? 0.5;
|
|
118
|
+
return `radial-gradient(ellipse ${pct(r)} ${pct(r)} at ${pct(p.cx ?? 0.5)} ${pct(p.cy ?? 0.5)}, ${css.map((s) => cssStop(s.color, s.at)).join(", ")})`;
|
|
119
|
+
}
|
|
120
|
+
const deg = angleOf(p, box);
|
|
121
|
+
const line = cssLine(deg, box);
|
|
122
|
+
const { p0, p1 } = pointsOfAxis(p.start, p.end, box);
|
|
123
|
+
const d = directionOf(deg);
|
|
124
|
+
const length = Math.hypot(line.p1[0] - line.p0[0], line.p1[1] - line.p0[1]) || 1;
|
|
125
|
+
const along = (q) => ((q[0] - line.p0[0]) * d[0] + (q[1] - line.p0[1]) * d[1]) / length;
|
|
126
|
+
const f0 = along(p0);
|
|
127
|
+
const f1 = along(p1);
|
|
128
|
+
return `linear-gradient(${+deg.toFixed(4)}deg, ${css.map((s) => cssStop(s.color, f0 + s.at * (f1 - f0))).join(", ")})`;
|
|
129
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type PropertyDeclarations } from "lit";
|
|
2
|
+
import { UiElement } from "../element.js";
|
|
3
|
+
import type { IconName } from "../icons/index.js";
|
|
4
|
+
import { Tooltip } from "./tooltip.js";
|
|
5
|
+
export declare const buttonStyles: import("lit").CSSResult;
|
|
6
|
+
export declare class IconButton extends UiElement {
|
|
7
|
+
static styles: import("lit").CSSResult[];
|
|
8
|
+
static properties: PropertyDeclarations;
|
|
9
|
+
icon: IconName | undefined;
|
|
10
|
+
label: string;
|
|
11
|
+
shortcut: string | undefined;
|
|
12
|
+
text: string | undefined;
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
protected readonly tooltip: Tooltip;
|
|
15
|
+
constructor();
|
|
16
|
+
protected pressedState(): "true" | "false" | undefined;
|
|
17
|
+
protected activate(): void;
|
|
18
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
19
|
+
}
|
|
20
|
+
export declare class ToggleButton extends IconButton {
|
|
21
|
+
static properties: PropertyDeclarations;
|
|
22
|
+
pressed: boolean;
|
|
23
|
+
constructor();
|
|
24
|
+
protected pressedState(): "true" | "false";
|
|
25
|
+
protected activate(): void;
|
|
26
|
+
}
|
|
27
|
+
export interface Segment {
|
|
28
|
+
value: string;
|
|
29
|
+
label: string;
|
|
30
|
+
icon?: IconName;
|
|
31
|
+
shortcut?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare class SegmentedControl extends UiElement {
|
|
34
|
+
#private;
|
|
35
|
+
static styles: import("lit").CSSResult[];
|
|
36
|
+
static properties: {
|
|
37
|
+
options: {
|
|
38
|
+
attribute: boolean;
|
|
39
|
+
};
|
|
40
|
+
value: {};
|
|
41
|
+
label: {};
|
|
42
|
+
disabled: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
reflect: boolean;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
options: readonly Segment[];
|
|
48
|
+
value: string | null;
|
|
49
|
+
label: string;
|
|
50
|
+
disabled: boolean;
|
|
51
|
+
constructor();
|
|
52
|
+
focusSegment(value: string): void;
|
|
53
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
54
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { css, html, nothing } from "lit";
|
|
2
|
+
import { UiElement } from "../element.js";
|
|
3
|
+
import { tok } from "../theme.js";
|
|
4
|
+
import { baseStyles, COMMIT, emit, keepFocus } from "./shared.js";
|
|
5
|
+
import { Tooltip, tooltipStyles } from "./tooltip.js";
|
|
6
|
+
export const buttonStyles = css `
|
|
7
|
+
:host{display: inline-flex;}button{display: inline-flex;align-items: center;justify-content: center;gap: 4px;min-width: ${tok("control")};height: ${tok("control")};padding: 0 6px;border-radius: calc(${tok("radius")} - 4px);color: ${tok("text")};}button:hover:not(:disabled){background: ${tok("hover")};color: ${tok("fg")};}button[aria-pressed="true"]{background: ${tok("accentSoft")};color: ${tok("accent")};}`;
|
|
8
|
+
export class IconButton extends UiElement {
|
|
9
|
+
static styles = [baseStyles, tooltipStyles, buttonStyles];
|
|
10
|
+
static properties = {
|
|
11
|
+
icon: {},
|
|
12
|
+
label: {},
|
|
13
|
+
shortcut: {},
|
|
14
|
+
text: {},
|
|
15
|
+
disabled: { type: Boolean, reflect: true },
|
|
16
|
+
};
|
|
17
|
+
tooltip = new Tooltip(this);
|
|
18
|
+
constructor() {
|
|
19
|
+
super();
|
|
20
|
+
this.label = "";
|
|
21
|
+
this.disabled = false;
|
|
22
|
+
}
|
|
23
|
+
pressedState() {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
activate() { }
|
|
27
|
+
render() {
|
|
28
|
+
const pressed = this.pressedState();
|
|
29
|
+
return html `<button part="button" aria-label=${this.label} aria-pressed=${pressed ?? nothing} aria-keyshortcuts=${this.shortcutAria(this.shortcut) || nothing} data-tip=${this.label} data-shortcut=${this.shortcutText(this.shortcut) || nothing} ?disabled=${this.disabled} @pointerdown=${(e) => {
|
|
30
|
+
keepFocus(e);
|
|
31
|
+
this.tooltip.hide();
|
|
32
|
+
}} @mousedown=${keepFocus} @pointerenter=${this.tooltip.enter} @pointerleave=${this.tooltip.leave} @focus=${this.tooltip.focus} @blur=${this.tooltip.leave} @keydown=${this.tooltip.key} @click=${() => this.activate()} >
|
|
33
|
+
${this.icon ? this.drawIcon(this.icon) : nothing}${this.text ? html `<span part="text">${this.text}</span>` : nothing}</button >${this.tooltip.template()}`;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export class ToggleButton extends IconButton {
|
|
37
|
+
static properties = { pressed: { type: Boolean, reflect: true } };
|
|
38
|
+
constructor() {
|
|
39
|
+
super();
|
|
40
|
+
this.pressed = false;
|
|
41
|
+
}
|
|
42
|
+
pressedState() {
|
|
43
|
+
return this.pressed ? "true" : "false";
|
|
44
|
+
}
|
|
45
|
+
activate() {
|
|
46
|
+
emit(this, COMMIT, !this.pressed);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export class SegmentedControl extends UiElement {
|
|
50
|
+
static styles = [
|
|
51
|
+
baseStyles,
|
|
52
|
+
tooltipStyles,
|
|
53
|
+
buttonStyles,
|
|
54
|
+
css `
|
|
55
|
+
[role="group"]{display: inline-flex;gap: 2px;padding: 2px;border-radius: calc(${tok("radius")} - 2px);background: ${tok("bg2")};}button{height: calc(${tok("control")} - 4px);}`,
|
|
56
|
+
];
|
|
57
|
+
static properties = { options: { attribute: false }, value: {}, label: {}, disabled: { type: Boolean, reflect: true } };
|
|
58
|
+
#tooltip = new Tooltip(this);
|
|
59
|
+
constructor() {
|
|
60
|
+
super();
|
|
61
|
+
this.options = [];
|
|
62
|
+
this.value = null;
|
|
63
|
+
this.label = "";
|
|
64
|
+
this.disabled = false;
|
|
65
|
+
}
|
|
66
|
+
#pick(value) {
|
|
67
|
+
if (value !== this.value)
|
|
68
|
+
emit(this, COMMIT, value);
|
|
69
|
+
}
|
|
70
|
+
focusSegment(value) {
|
|
71
|
+
const at = this.options.findIndex((o) => o.value === value);
|
|
72
|
+
this.renderRoot.querySelectorAll("button[part=segment]")[at]?.focus();
|
|
73
|
+
}
|
|
74
|
+
#keys(e) {
|
|
75
|
+
const buttons = [...this.renderRoot.querySelectorAll("button")];
|
|
76
|
+
const at = buttons.indexOf(e.target);
|
|
77
|
+
if (at < 0)
|
|
78
|
+
return;
|
|
79
|
+
const to = e.key === "ArrowRight" || e.key === "ArrowDown" ? (at + 1) % buttons.length : e.key === "ArrowLeft" || e.key === "ArrowUp" ? (at - 1 + buttons.length) % buttons.length : e.key === "Home" ? 0 : e.key === "End" ? buttons.length - 1 : -1;
|
|
80
|
+
if (to < 0)
|
|
81
|
+
return this.#tooltip.key(e);
|
|
82
|
+
e.preventDefault();
|
|
83
|
+
buttons[to].focus();
|
|
84
|
+
}
|
|
85
|
+
render() {
|
|
86
|
+
const chosen = Math.max(0, this.options.findIndex((o) => o.value === this.value));
|
|
87
|
+
return html `<div role="group" part="group" aria-label=${this.label || nothing} @keydown=${this.#keys}>
|
|
88
|
+
${this.options.map((o, i) => html `<button part="segment" aria-pressed=${o.value === this.value ? "true" : "false"} aria-label=${o.icon ? o.label : nothing} aria-keyshortcuts=${this.shortcutAria(o.shortcut) || nothing} data-tip=${o.icon || o.shortcut ? o.label : nothing} data-shortcut=${this.shortcutText(o.shortcut) || nothing} tabindex=${i === chosen ? 0 : -1} ?disabled=${this.disabled} @pointerdown=${(e) => {
|
|
89
|
+
keepFocus(e);
|
|
90
|
+
this.#tooltip.hide();
|
|
91
|
+
}} @mousedown=${keepFocus} @pointerenter=${this.#tooltip.enter} @pointerleave=${this.#tooltip.leave} @focus=${this.#tooltip.focus} @blur=${this.#tooltip.leave} @click=${() => this.#pick(o.value)} >
|
|
92
|
+
${o.icon ? this.drawIcon(o.icon) : o.label}
|
|
93
|
+
</button>`)}</div >${this.#tooltip.template()}`;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type PropertyValues } from "lit";
|
|
2
|
+
import { UiElement } from "../element.js";
|
|
3
|
+
import type { FontFamilyInfo } from "../host.js";
|
|
4
|
+
export interface FontChoice {
|
|
5
|
+
family: string;
|
|
6
|
+
weight: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const FONT_ROW_PX = 28;
|
|
9
|
+
export declare const FONT_LIST_PX = 240;
|
|
10
|
+
export declare const FONT_VIRTUAL_PAST = 100;
|
|
11
|
+
export declare function weightFor(f: FontFamilyInfo, current: number | null): number;
|
|
12
|
+
export declare class FontPicker extends UiElement {
|
|
13
|
+
#private;
|
|
14
|
+
static styles: import("lit").CSSResult[];
|
|
15
|
+
static properties: {
|
|
16
|
+
fonts: {
|
|
17
|
+
attribute: boolean;
|
|
18
|
+
};
|
|
19
|
+
value: {};
|
|
20
|
+
weight: {
|
|
21
|
+
type: NumberConstructor;
|
|
22
|
+
};
|
|
23
|
+
mixed: {
|
|
24
|
+
type: BooleanConstructor;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
fonts: readonly FontFamilyInfo[];
|
|
28
|
+
value: string | null;
|
|
29
|
+
weight: number | null;
|
|
30
|
+
mixed: boolean;
|
|
31
|
+
constructor();
|
|
32
|
+
get results(): readonly FontFamilyInfo[];
|
|
33
|
+
protected willUpdate(changed: PropertyValues<this>): void;
|
|
34
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
35
|
+
}
|