-
Notifications
You must be signed in to change notification settings - Fork 0
/
bento.d.ts
76 lines (70 loc) · 2.63 KB
/
bento.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import BentoParty from "./public/elements/party"
import BentoNav from "./public/elements/nav"
import BentoMachine from "./public/elements/machine"
import BentoControlButton, {
BentoRecordButton,
BentoFlipButton,
BentoLoopButton,
BentoHearButton
} from "./public/elements/controls/button"
import BentoBox from "./public/elements/box"
import BentoGrid from "./public/elements/grid"
import BentoGridControls from "./public/elements/grid-controls"
import BentoLayerSelector from "./public/elements/layer-selector"
import BentoMasterControls from "./public/elements/master-controls"
import BentoMiniGrid from "./public/elements/mini-grid"
import BentoScreen from "./public/elements/screen"
import BentoScreenControls from "./public/elements/screen-controls"
import BentoScreenSelector from "./public/elements/screen-selector"
import BentoGridSelector from "./public/elements/grid-selector"
import BentoTape from "./public/elements/tape"
import BentoControlPopout, {
BentoLayerTypeSelector,
BentoSpeedSelector,
BentoLoopSelector
} from "./public/elements/controls/popout"
import BentoLayerSelectorChoice from "./public/elements/layer-selector-choice"
declare global {
type BentoControl = BentoControlButton | BentoControlPopout
type BentoControlSpec<T> = PopoutControlSpec<T> | ButtonControlSpec
interface HTMLElementTagNameMap {
"bento-party": BentoParty
"bento-nav": BentoNav
"bento-machine": BentoMachine
"bento-master-controls": BentoMasterControls
"bento-layer-selector": BentoLayerSelector
"bento-layer-selector-choice": BentoLayerSelectorChoice
"bento-screen-controls": BentoScreenControls
"bento-control-button": BentoControlButton
"bento-record-button": BentoRecordButton
"bento-hear-button": BentoHearButton
"bento-flip-button": BentoFlipButton
"bento-loop-button": BentoLoopButton
"bento-layer-type-selector": BentoLayerTypeSelector
"bento-speed-selector": BentoSpeedSelector
"bento-loop-selector": BentoLoopSelector
"bento-control-popout": BentoControlPopout
"bento-screen": BentoScreen
"bento-screen-selector": BentoScreenSelector
"bento-grid": BentoGrid
"bento-box": BentoBox
"bento-grid-controls": BentoGridControls
"bento-grid-selector": BentoGridSelector
"bento-mini-grid": BentoMiniGrid
"bento-tape": BentoTape
dialog: HTMLDialogElement
"template[icon]": HTMLTemplateElement
}
interface Math {
clamp: (num: number, min: number, max: number) => number
wrap: (num: number, min: number, max: number) => number
lerp: (num: number, min: number, max: number) => number
}
interface Array<T> {
chunk: (size: number) => T[][]
random: () => T
}
interface HTMLElement {
connectedCallback(): void
}
}