relly-ui 0.0.0-stage → 1.0.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 +21 -0
- package/README.md +183 -2
- package/dist/index.d.ts +970 -0
- package/dist/relly-ui.css +1 -0
- package/dist/relly-ui.es.js +2607 -0
- package/dist/relly-ui.es.js.map +1 -0
- package/dist/relly-ui.iife.js +55 -0
- package/dist/relly-ui.iife.js.map +1 -0
- package/dist/relly-ui.umd.js +55 -0
- package/dist/relly-ui.umd.js.map +1 -0
- package/package.json +50 -4
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,970 @@
|
|
|
1
|
+
export declare abstract class BaseComponent<T = any> implements IBaseComponent<T>, Listenable, SerializableComponent {
|
|
2
|
+
protected bindingEngine?: BindingEngine | undefined;
|
|
3
|
+
protected presetManager?: PresetManager | undefined;
|
|
4
|
+
element: HTMLElement;
|
|
5
|
+
protected labelEl: HTMLElement;
|
|
6
|
+
protected controlEl: HTMLElement;
|
|
7
|
+
protected label: string;
|
|
8
|
+
protected tooltipText?: string;
|
|
9
|
+
protected tooltipEl?: HTMLElement;
|
|
10
|
+
protected conditionPredicate?: ConditionPredicate;
|
|
11
|
+
protected targetObject?: any;
|
|
12
|
+
protected property?: string;
|
|
13
|
+
protected initialValue?: T;
|
|
14
|
+
protected prevValue?: T;
|
|
15
|
+
protected onChangeCallback?: OnChangeCallback<T>;
|
|
16
|
+
protected isListening: boolean;
|
|
17
|
+
protected contextMenuItems?: ContextMenuItem[];
|
|
18
|
+
constructor(label: string, targetObject?: any, property?: string, bindingEngine?: BindingEngine | undefined, presetManager?: PresetManager | undefined);
|
|
19
|
+
setLabel(label: string): this;
|
|
20
|
+
getLabel(): string;
|
|
21
|
+
setTooltip(tooltip: string): this;
|
|
22
|
+
getTooltip(): string | undefined;
|
|
23
|
+
showIf(predicate: ConditionPredicate): this;
|
|
24
|
+
checkVisibility(): boolean;
|
|
25
|
+
setContextMenu(items: ContextMenuItem[]): this;
|
|
26
|
+
getContextMenu(): ContextMenuItem[] | undefined;
|
|
27
|
+
reset(): this;
|
|
28
|
+
onChange(callback: OnChangeCallback<T>): this;
|
|
29
|
+
listen(): this;
|
|
30
|
+
getValue(): T;
|
|
31
|
+
setValue(value: T): this;
|
|
32
|
+
protected disabled: boolean;
|
|
33
|
+
setDisabled(disabled: boolean): this;
|
|
34
|
+
isDisabled(): boolean;
|
|
35
|
+
checkDirty(): void;
|
|
36
|
+
protected triggerChange(value: T, prev: T): void;
|
|
37
|
+
getSerializableKey(): string | null;
|
|
38
|
+
/**
|
|
39
|
+
* Updates the UI elements based on current value.
|
|
40
|
+
* To be implemented by subclasses.
|
|
41
|
+
*/
|
|
42
|
+
abstract update(): this;
|
|
43
|
+
destroy(): void;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export declare class BindingEngine {
|
|
47
|
+
private listeners;
|
|
48
|
+
private rafId;
|
|
49
|
+
private isRunning;
|
|
50
|
+
private isPaused;
|
|
51
|
+
register(component: Listenable): void;
|
|
52
|
+
unregister(component: Listenable): void;
|
|
53
|
+
pause(): void;
|
|
54
|
+
resume(): void;
|
|
55
|
+
private start;
|
|
56
|
+
private stop;
|
|
57
|
+
destroy(): void;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export declare class Button extends BaseComponent<void> {
|
|
61
|
+
private buttonEl;
|
|
62
|
+
private clickHandler?;
|
|
63
|
+
private soundEngine?;
|
|
64
|
+
constructor(label: string, onClick?: OnClickCallback, soundEngine?: SoundEngine);
|
|
65
|
+
setSoundEngine(soundEngine: SoundEngine): this;
|
|
66
|
+
setLabel(label: string): this;
|
|
67
|
+
onClick(callback: OnClickCallback): this;
|
|
68
|
+
update(): this;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export declare class Checkbox extends BaseComponent<boolean> {
|
|
72
|
+
private wrapperEl;
|
|
73
|
+
private boxEl;
|
|
74
|
+
private soundEngine?;
|
|
75
|
+
constructor(label: string, targetObject: any, property: string, bindingEngine?: BindingEngine, presetManager?: PresetManager, soundEngine?: SoundEngine);
|
|
76
|
+
setSoundEngine(soundEngine: SoundEngine): this;
|
|
77
|
+
update(): this;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export declare class ColorPicker extends BaseComponent<string> {
|
|
81
|
+
private wrapperEl;
|
|
82
|
+
private previewEl;
|
|
83
|
+
private hexTextEl;
|
|
84
|
+
private nativeColorInput;
|
|
85
|
+
private eyeDropperBtn?;
|
|
86
|
+
private swatchesContainer?;
|
|
87
|
+
private swatches;
|
|
88
|
+
private swatchButtons;
|
|
89
|
+
private soundEngine?;
|
|
90
|
+
constructor(label: string, targetObject: any, property: string, bindingEngine?: BindingEngine, presetManager?: PresetManager, soundEngine?: SoundEngine);
|
|
91
|
+
setSoundEngine(soundEngine: SoundEngine): this;
|
|
92
|
+
setSwatches(swatches: string[]): this;
|
|
93
|
+
getSwatches(): string[];
|
|
94
|
+
update(): this;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export declare interface ComponentFactoryOptions {
|
|
98
|
+
type: ComponentType;
|
|
99
|
+
label?: string;
|
|
100
|
+
object?: any;
|
|
101
|
+
property?: string;
|
|
102
|
+
min?: number;
|
|
103
|
+
max?: number;
|
|
104
|
+
step?: number;
|
|
105
|
+
options?: string[] | number[] | Record<string, any>;
|
|
106
|
+
onClick?: OnClickCallback;
|
|
107
|
+
onChange?: OnChangeCallback;
|
|
108
|
+
onToggle?: OnChangeCallback;
|
|
109
|
+
format?: (value: any) => string;
|
|
110
|
+
swatches?: string[];
|
|
111
|
+
color?: string;
|
|
112
|
+
fillColor?: string;
|
|
113
|
+
range?: [number, number];
|
|
114
|
+
bufferSize?: number;
|
|
115
|
+
collapsed?: boolean;
|
|
116
|
+
tooltip?: string;
|
|
117
|
+
contextMenu?: ContextMenuItem[];
|
|
118
|
+
showIf?: ConditionPredicate;
|
|
119
|
+
disabled?: boolean;
|
|
120
|
+
status?: StatusType;
|
|
121
|
+
badge?: string;
|
|
122
|
+
detail?: string;
|
|
123
|
+
listen?: boolean;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export declare type ComponentType = 'checkbox' | 'slider' | 'button' | 'select' | 'dynamicLabel' | 'graph' | 'color' | 'point2d' | 'point3d' | 'vector3' | 'range' | 'segmented' | 'status' | 'section' | 'folder' | 'row';
|
|
127
|
+
|
|
128
|
+
export declare type ConditionPredicate = () => boolean;
|
|
129
|
+
|
|
130
|
+
export declare abstract class ContainerHelper {
|
|
131
|
+
protected contentEl: HTMLElement;
|
|
132
|
+
protected bindingEngine: BindingEngine;
|
|
133
|
+
protected presetManager: PresetManager;
|
|
134
|
+
protected soundEngine?: SoundEngine | undefined;
|
|
135
|
+
protected children: Array<BaseComponent | {
|
|
136
|
+
destroy(): void;
|
|
137
|
+
}>;
|
|
138
|
+
protected accordion: boolean;
|
|
139
|
+
constructor(contentEl: HTMLElement, bindingEngine: BindingEngine, presetManager: PresetManager, soundEngine?: SoundEngine | undefined);
|
|
140
|
+
setAccordion(enabled: boolean): this;
|
|
141
|
+
isAccordion(): boolean;
|
|
142
|
+
onSectionExpanded(expandedSection: Section): void;
|
|
143
|
+
addCheckbox(targetOrOptions: any, property?: string): Checkbox;
|
|
144
|
+
createCheckbox(targetOrOptions: any, property?: string): Checkbox;
|
|
145
|
+
addSlider(targetOrOptions: any, property?: string): Slider;
|
|
146
|
+
createSlider(targetOrOptions: any, property?: string): Slider;
|
|
147
|
+
addButton(labelOrOptions: string | {
|
|
148
|
+
label?: string;
|
|
149
|
+
onClick?: OnClickCallback;
|
|
150
|
+
tooltip?: string;
|
|
151
|
+
showIf?: ConditionPredicate;
|
|
152
|
+
}, onClick?: OnClickCallback): Button;
|
|
153
|
+
createButton(labelOrOptions: string | {
|
|
154
|
+
label?: string;
|
|
155
|
+
onClick?: OnClickCallback;
|
|
156
|
+
tooltip?: string;
|
|
157
|
+
showIf?: ConditionPredicate;
|
|
158
|
+
}, onClick?: OnClickCallback): Button;
|
|
159
|
+
addSelect(targetOrOptions: any, property?: string, options?: any): Select;
|
|
160
|
+
createSelect(targetOrOptions: any, property?: string, options?: any): Select;
|
|
161
|
+
addDynamicLabel(targetOrOptions: any, property?: string): DynamicLabel;
|
|
162
|
+
createDynamicLabel(targetOrOptions: any, property?: string): DynamicLabel;
|
|
163
|
+
addGraph(targetOrOptions: any, property?: string): Graph;
|
|
164
|
+
createGraph(targetOrOptions: any, property?: string): Graph;
|
|
165
|
+
addFPSGraph(label?: string): Graph;
|
|
166
|
+
createFPSGraph(label?: string): Graph;
|
|
167
|
+
addMemoryGraph(label?: string): Graph;
|
|
168
|
+
createMemoryGraph(label?: string): Graph;
|
|
169
|
+
addColor(targetOrOptions: any, property?: string): ColorPicker;
|
|
170
|
+
createColor(targetOrOptions: any, property?: string): ColorPicker;
|
|
171
|
+
addPoint2D(targetOrOptions: any, property?: string, options?: Point2DOptions): Point2D;
|
|
172
|
+
createPoint2D(targetOrOptions: any, property?: string, options?: Point2DOptions): Point2D;
|
|
173
|
+
addPoint3D(targetOrOptions: any, property?: string, options?: Point3DOptions): Point3D;
|
|
174
|
+
createPoint3D(targetOrOptions: any, property?: string, options?: Point3DOptions): Point3D;
|
|
175
|
+
addVector3(targetOrOptions: any, property?: string, options?: Point3DOptions): Point3D;
|
|
176
|
+
createVector3(targetOrOptions: any, property?: string, options?: Point3DOptions): Point3D;
|
|
177
|
+
addRange(targetOrOptions: any, property?: string, options?: RangeOptions): RangeSlider;
|
|
178
|
+
createRange(targetOrOptions: any, property?: string, options?: RangeOptions): RangeSlider;
|
|
179
|
+
addSegmented(targetOrOptions: any, property?: string, options?: string[] | number[] | Record<string, any>): Segmented;
|
|
180
|
+
createSegmented(targetOrOptions: any, property?: string, options?: string[] | number[] | Record<string, any>): Segmented;
|
|
181
|
+
addStatus(targetOrOptions: any, property?: string, initialStatus?: StatusType, badge?: string, detail?: string): StatusIndicator;
|
|
182
|
+
createStatus(targetOrOptions: any, property?: string, initialStatus?: StatusType, badge?: string, detail?: string): StatusIndicator;
|
|
183
|
+
addRow(): Row;
|
|
184
|
+
createRow(): Row;
|
|
185
|
+
addSection(labelOrOptions?: string | {
|
|
186
|
+
label?: string;
|
|
187
|
+
title?: string;
|
|
188
|
+
collapsed?: boolean;
|
|
189
|
+
}, collapsed?: boolean): Section;
|
|
190
|
+
addFolder(labelOrOptions?: string | {
|
|
191
|
+
label?: string;
|
|
192
|
+
title?: string;
|
|
193
|
+
collapsed?: boolean;
|
|
194
|
+
}, collapsed?: boolean): Section;
|
|
195
|
+
createSection(labelOrOptions?: string | {
|
|
196
|
+
label?: string;
|
|
197
|
+
title?: string;
|
|
198
|
+
collapsed?: boolean;
|
|
199
|
+
}, collapsed?: boolean): Section;
|
|
200
|
+
createFolder(labelOrOptions?: string | {
|
|
201
|
+
label?: string;
|
|
202
|
+
title?: string;
|
|
203
|
+
collapsed?: boolean;
|
|
204
|
+
}, collapsed?: boolean): Section;
|
|
205
|
+
createComponent(options: ComponentFactoryOptions): any;
|
|
206
|
+
destroyChildren(): void;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export declare interface ContextMenuItem {
|
|
210
|
+
label: string;
|
|
211
|
+
icon?: string;
|
|
212
|
+
action: (component?: any) => void;
|
|
213
|
+
danger?: boolean;
|
|
214
|
+
separator?: boolean;
|
|
215
|
+
disabled?: boolean;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export declare class ContextMenuManager {
|
|
219
|
+
private panelEl;
|
|
220
|
+
private soundEngine?;
|
|
221
|
+
private menuEl;
|
|
222
|
+
private currentComponent?;
|
|
223
|
+
private onDocClickBound;
|
|
224
|
+
private onKeyDownBound;
|
|
225
|
+
constructor(panelEl: HTMLElement, soundEngine?: SoundEngine | undefined);
|
|
226
|
+
private onContextMenu;
|
|
227
|
+
show(items: ContextMenuItem[], clientX: number, clientY: number): void;
|
|
228
|
+
hide(): void;
|
|
229
|
+
destroy(): void;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export declare const CYBERPUNK_THEME: RellyTheme;
|
|
233
|
+
|
|
234
|
+
export declare const DARK_THEME: RellyTheme;
|
|
235
|
+
|
|
236
|
+
export declare const DRACULA_THEME: RellyTheme;
|
|
237
|
+
|
|
238
|
+
export declare class Draggable {
|
|
239
|
+
private handle;
|
|
240
|
+
private panel;
|
|
241
|
+
private soundEngine?;
|
|
242
|
+
private isDragging;
|
|
243
|
+
private startX;
|
|
244
|
+
private startY;
|
|
245
|
+
private initialLeft;
|
|
246
|
+
private initialTop;
|
|
247
|
+
private wasSnapped;
|
|
248
|
+
snapThreshold: number;
|
|
249
|
+
magneticSnap: boolean;
|
|
250
|
+
private onMouseDownBound;
|
|
251
|
+
private onMouseMoveBound;
|
|
252
|
+
private onMouseUpBound;
|
|
253
|
+
private onResizeBound;
|
|
254
|
+
constructor(handle: HTMLElement, panel: HTMLElement, soundEngine?: SoundEngine | undefined);
|
|
255
|
+
clampToViewport(): void;
|
|
256
|
+
private onResize;
|
|
257
|
+
private onMouseDown;
|
|
258
|
+
private onMouseMove;
|
|
259
|
+
private onMouseUp;
|
|
260
|
+
destroy(): void;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export declare class DynamicLabel extends BaseComponent<any> {
|
|
264
|
+
private valueBadge;
|
|
265
|
+
private formatter;
|
|
266
|
+
constructor(label: string, targetObject?: any, property?: string, bindingEngine?: BindingEngine);
|
|
267
|
+
setFormat(formatter: LabelFormatter): this;
|
|
268
|
+
update(): this;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export declare class Graph extends BaseComponent<number | Record<string, number>> {
|
|
272
|
+
private canvasContainer;
|
|
273
|
+
private canvas;
|
|
274
|
+
private ctx;
|
|
275
|
+
private statsEl;
|
|
276
|
+
private graphTooltipEl;
|
|
277
|
+
private legendEl;
|
|
278
|
+
private primarySeries;
|
|
279
|
+
private seriesList;
|
|
280
|
+
private seriesMap;
|
|
281
|
+
private bufferSize;
|
|
282
|
+
private min;
|
|
283
|
+
private max;
|
|
284
|
+
private autoRange;
|
|
285
|
+
private smoothCurves;
|
|
286
|
+
private isPaused;
|
|
287
|
+
private formatter;
|
|
288
|
+
private cssWidth;
|
|
289
|
+
private cssHeight;
|
|
290
|
+
private sampleInterval;
|
|
291
|
+
private lastSampleTime;
|
|
292
|
+
private hoverIndex;
|
|
293
|
+
private resizeObserver;
|
|
294
|
+
private mediaQueryList;
|
|
295
|
+
private soundEngine?;
|
|
296
|
+
constructor(label: string, targetObject?: any, property?: string, bindingEngine?: BindingEngine, soundEngine?: SoundEngine);
|
|
297
|
+
private setupListeners;
|
|
298
|
+
private updateDPRListener;
|
|
299
|
+
private onResolutionChange;
|
|
300
|
+
private initCanvasSize;
|
|
301
|
+
private resizeCanvas;
|
|
302
|
+
private onMouseMove;
|
|
303
|
+
private onMouseLeave;
|
|
304
|
+
private onCanvasClick;
|
|
305
|
+
private updateTooltip;
|
|
306
|
+
setSoundEngine(soundEngine: SoundEngine): this;
|
|
307
|
+
togglePause(): this;
|
|
308
|
+
setPaused(paused: boolean): this;
|
|
309
|
+
isGraphPaused(): boolean;
|
|
310
|
+
setSampleInterval(ms: number): this;
|
|
311
|
+
getSampleInterval(): number;
|
|
312
|
+
checkDirty(): void;
|
|
313
|
+
setSmooth(smooth: boolean): this;
|
|
314
|
+
setFormat(fn: (val: number) => string): this;
|
|
315
|
+
setRange(min: number, max: number): this;
|
|
316
|
+
setAutoRange(enabled: boolean): this;
|
|
317
|
+
setColor(lineColor: string, fillColor?: string): this;
|
|
318
|
+
setBufferSize(size: number): this;
|
|
319
|
+
setHeight(height: number): this;
|
|
320
|
+
addSeries(id: string, options: GraphSeriesOptions): this;
|
|
321
|
+
private updateLegend;
|
|
322
|
+
push(val: number | Record<string, number>): this;
|
|
323
|
+
pushSeries(id: string, val: number): this;
|
|
324
|
+
private updateStats;
|
|
325
|
+
update(): this;
|
|
326
|
+
private draw;
|
|
327
|
+
destroy(): void;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
export declare interface GraphOptions {
|
|
331
|
+
min?: number;
|
|
332
|
+
max?: number;
|
|
333
|
+
autoRange?: boolean;
|
|
334
|
+
color?: string;
|
|
335
|
+
fillColor?: string;
|
|
336
|
+
bufferSize?: number;
|
|
337
|
+
height?: number;
|
|
338
|
+
smooth?: boolean;
|
|
339
|
+
sampleInterval?: number;
|
|
340
|
+
format?: (value: number) => string;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
export declare interface GraphSeriesOptions {
|
|
344
|
+
label?: string;
|
|
345
|
+
color: string;
|
|
346
|
+
fillColor?: string;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export declare class HotkeyManager {
|
|
350
|
+
private hotkey;
|
|
351
|
+
private onToggle;
|
|
352
|
+
private onKeyDownBound;
|
|
353
|
+
constructor(hotkey: string | null, onToggle: () => void);
|
|
354
|
+
private onKeyDown;
|
|
355
|
+
setHotkey(hotkey: string | null): void;
|
|
356
|
+
destroy(): void;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
export declare interface IBaseComponent<T = any> {
|
|
360
|
+
element: HTMLElement;
|
|
361
|
+
setLabel(label: string): this;
|
|
362
|
+
getLabel(): string;
|
|
363
|
+
setTooltip(text: string): this;
|
|
364
|
+
getTooltip(): string | undefined;
|
|
365
|
+
setDisabled(disabled: boolean): this;
|
|
366
|
+
isDisabled(): boolean;
|
|
367
|
+
showIf(predicate: ConditionPredicate): this;
|
|
368
|
+
setContextMenu(items: ContextMenuItem[]): this;
|
|
369
|
+
getContextMenu(): ContextMenuItem[] | undefined;
|
|
370
|
+
setValue(value: T): this;
|
|
371
|
+
getValue(): T;
|
|
372
|
+
onChange(callback: OnChangeCallback<T>): this;
|
|
373
|
+
listen(): this;
|
|
374
|
+
update(): this;
|
|
375
|
+
destroy(): void;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
export declare class ImportModal {
|
|
379
|
+
private parentEl;
|
|
380
|
+
private onApply;
|
|
381
|
+
element: HTMLElement;
|
|
382
|
+
private textareaEl;
|
|
383
|
+
private errorEl;
|
|
384
|
+
private dropzoneEl;
|
|
385
|
+
private fileInput;
|
|
386
|
+
constructor(parentEl: HTMLElement, onApply: (data: Record<string, any>) => void);
|
|
387
|
+
private handleFileSelect;
|
|
388
|
+
private readFile;
|
|
389
|
+
show(): void;
|
|
390
|
+
hide(): void;
|
|
391
|
+
private apply;
|
|
392
|
+
destroy(): void;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
declare type LabelFormatter = (value: any) => string;
|
|
396
|
+
|
|
397
|
+
export declare const LIGHT_THEME: RellyTheme;
|
|
398
|
+
|
|
399
|
+
declare interface Listenable {
|
|
400
|
+
checkDirty(): void;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
export declare const MATRIX_THEME: RellyTheme;
|
|
404
|
+
|
|
405
|
+
export declare const NORD_THEME: RellyTheme;
|
|
406
|
+
|
|
407
|
+
export declare type OnChangeCallback<T = any> = (value: T, prevValue: T) => void;
|
|
408
|
+
|
|
409
|
+
export declare type OnClickCallback = (event: MouseEvent) => void;
|
|
410
|
+
|
|
411
|
+
export declare class Point2D extends BaseComponent<Point2DVal> {
|
|
412
|
+
private containerEl;
|
|
413
|
+
private xInput;
|
|
414
|
+
private yInput;
|
|
415
|
+
private min?;
|
|
416
|
+
private max?;
|
|
417
|
+
private step;
|
|
418
|
+
constructor(label: string, targetObject: any, property: string, bindingEngine?: BindingEngine, presetManager?: PresetManager);
|
|
419
|
+
private setupInputScrubbing;
|
|
420
|
+
setMin(min: number): this;
|
|
421
|
+
setMax(max: number): this;
|
|
422
|
+
setStep(step: number): this;
|
|
423
|
+
getValue(): Point2DVal;
|
|
424
|
+
setValue(value: Point2DVal): this;
|
|
425
|
+
private handleInputChange;
|
|
426
|
+
update(): this;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
export declare interface Point2DOptions {
|
|
430
|
+
min?: number;
|
|
431
|
+
max?: number;
|
|
432
|
+
step?: number;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
declare type Point2DVal = {
|
|
436
|
+
x: number;
|
|
437
|
+
y: number;
|
|
438
|
+
} | [number, number];
|
|
439
|
+
|
|
440
|
+
export declare class Point3D extends BaseComponent<Point3DVal> {
|
|
441
|
+
private containerEl;
|
|
442
|
+
private xInput;
|
|
443
|
+
private yInput;
|
|
444
|
+
private zInput;
|
|
445
|
+
private min?;
|
|
446
|
+
private max?;
|
|
447
|
+
private step;
|
|
448
|
+
constructor(label: string, targetObject: any, property: string, bindingEngine?: BindingEngine, presetManager?: PresetManager);
|
|
449
|
+
private setupInputScrubbing;
|
|
450
|
+
private handleInputChange;
|
|
451
|
+
setMin(min?: number): this;
|
|
452
|
+
setMax(max?: number): this;
|
|
453
|
+
setStep(step: number): this;
|
|
454
|
+
update(): this;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
export declare interface Point3DOptions {
|
|
458
|
+
min?: number;
|
|
459
|
+
max?: number;
|
|
460
|
+
step?: number;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
export declare type Point3DVal = [number, number, number] | {
|
|
464
|
+
x: number;
|
|
465
|
+
y: number;
|
|
466
|
+
z: number;
|
|
467
|
+
};
|
|
468
|
+
|
|
469
|
+
export declare class PresetManager {
|
|
470
|
+
private components;
|
|
471
|
+
private pendingValues;
|
|
472
|
+
private changeCallback?;
|
|
473
|
+
setOnChange(cb: () => void): void;
|
|
474
|
+
notifyChange(): void;
|
|
475
|
+
register(component: SerializableComponent): void;
|
|
476
|
+
setPendingValues(values: Record<string, any>): void;
|
|
477
|
+
getPendingValues(): Record<string, any>;
|
|
478
|
+
unregister(component: SerializableComponent): void;
|
|
479
|
+
export(): Record<string, any>;
|
|
480
|
+
import(data: Record<string, any>): void;
|
|
481
|
+
save(storageKey?: string): void;
|
|
482
|
+
load(storageKey?: string): void;
|
|
483
|
+
clear(): void;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
export declare interface RangeOptions {
|
|
487
|
+
min?: number;
|
|
488
|
+
max?: number;
|
|
489
|
+
step?: number;
|
|
490
|
+
format?: (min: number, max: number) => string;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
export declare class RangeSlider extends BaseComponent<RangeVal> {
|
|
494
|
+
private wrapperEl;
|
|
495
|
+
private trackEl;
|
|
496
|
+
private barEl;
|
|
497
|
+
private thumbMin;
|
|
498
|
+
private thumbMax;
|
|
499
|
+
private inputMin;
|
|
500
|
+
private inputMax;
|
|
501
|
+
private min;
|
|
502
|
+
private max;
|
|
503
|
+
private step;
|
|
504
|
+
private soundEngine?;
|
|
505
|
+
private formatter;
|
|
506
|
+
constructor(label: string, targetObject: any, property: string, bindingEngine?: BindingEngine, presetManager?: PresetManager, soundEngine?: SoundEngine);
|
|
507
|
+
private setupListeners;
|
|
508
|
+
private setupThumbDrag;
|
|
509
|
+
private setupBarDrag;
|
|
510
|
+
private applyStep;
|
|
511
|
+
private getCurrentRange;
|
|
512
|
+
private setRangeValue;
|
|
513
|
+
setMin(min: number): this;
|
|
514
|
+
setMax(max: number): this;
|
|
515
|
+
setStep(step: number): this;
|
|
516
|
+
setFormat(fn: (min: number, max: number) => string): this;
|
|
517
|
+
setSoundEngine(soundEngine: SoundEngine): this;
|
|
518
|
+
update(): this;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
export declare type RangeVal = [number, number] | {
|
|
522
|
+
min: number;
|
|
523
|
+
max: number;
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
export declare interface RellyTheme {
|
|
527
|
+
bg: string;
|
|
528
|
+
fg: string;
|
|
529
|
+
headerBg: string;
|
|
530
|
+
headerFg: string;
|
|
531
|
+
accent: string;
|
|
532
|
+
accentHover: string;
|
|
533
|
+
border: string;
|
|
534
|
+
inputBg: string;
|
|
535
|
+
inputHover: string;
|
|
536
|
+
radius: string;
|
|
537
|
+
font: string;
|
|
538
|
+
fontSize: string;
|
|
539
|
+
rowHeight: string;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
declare class RellyUI extends ContainerHelper {
|
|
543
|
+
static version: string;
|
|
544
|
+
private hostEl?;
|
|
545
|
+
private shadowRoot;
|
|
546
|
+
private panelEl;
|
|
547
|
+
private headerEl;
|
|
548
|
+
private titleEl;
|
|
549
|
+
private collapseBtn;
|
|
550
|
+
private copyToastEl;
|
|
551
|
+
private themeManager;
|
|
552
|
+
protected soundEngine: SoundEngine;
|
|
553
|
+
private draggableInstance?;
|
|
554
|
+
private resizableInstance?;
|
|
555
|
+
private hotkeyInstance?;
|
|
556
|
+
private searchBarInstance?;
|
|
557
|
+
private tabsManagerInstance?;
|
|
558
|
+
private importModalInstance?;
|
|
559
|
+
private toastManager;
|
|
560
|
+
private contextMenuManager;
|
|
561
|
+
private isPanelCollapsed;
|
|
562
|
+
private isPanelHidden;
|
|
563
|
+
private isMiniHud;
|
|
564
|
+
private ghostOnIdle;
|
|
565
|
+
private idleOpacity;
|
|
566
|
+
private onResizeBound;
|
|
567
|
+
private autoSave;
|
|
568
|
+
private autoSaveKey;
|
|
569
|
+
private autoSaveTimeout;
|
|
570
|
+
private sparklineCtx?;
|
|
571
|
+
private sparklineData;
|
|
572
|
+
private sparklineAnimId?;
|
|
573
|
+
constructor(options?: RellyUIOptions);
|
|
574
|
+
private mount;
|
|
575
|
+
addTab(label: string): Tab;
|
|
576
|
+
createTab(label: string): Tab;
|
|
577
|
+
copyJSON(): string;
|
|
578
|
+
notify(message: string, type?: ToastType, duration?: number): HTMLElement;
|
|
579
|
+
getToastManager(): ToastManager;
|
|
580
|
+
getContextMenuManager(): ContextMenuManager;
|
|
581
|
+
importJSON(json: string | Record<string, any>): this;
|
|
582
|
+
loadSchema(schema: SchemaDefinition): this;
|
|
583
|
+
setTitle(title: string): this;
|
|
584
|
+
setTheme(theme: ThemeInput): this;
|
|
585
|
+
setSoundPack(pack: SoundPack): this;
|
|
586
|
+
getSoundPack(): SoundPack;
|
|
587
|
+
getSoundEngine(): SoundEngine;
|
|
588
|
+
toggleMiniHud(): this;
|
|
589
|
+
setMiniHud(mini: boolean): this;
|
|
590
|
+
isMiniHudMode(): boolean;
|
|
591
|
+
setGhostMode(enabled: boolean, idleOpacity?: number): this;
|
|
592
|
+
isGhostMode(): boolean;
|
|
593
|
+
setSoundVolume(volume: number): this;
|
|
594
|
+
getSoundVolume(): number;
|
|
595
|
+
private initSparkline;
|
|
596
|
+
private drawSparkline;
|
|
597
|
+
clampToViewport(): this;
|
|
598
|
+
toggleCollapse(): this;
|
|
599
|
+
setCollapsed(collapsed: boolean): this;
|
|
600
|
+
queueAutoSave(): void;
|
|
601
|
+
saveSession(key?: string): void;
|
|
602
|
+
loadSession(key?: string): boolean;
|
|
603
|
+
clearSession(key?: string): void;
|
|
604
|
+
setAutoSave(enabled: boolean, key?: string): this;
|
|
605
|
+
toggle(): this;
|
|
606
|
+
show(): this;
|
|
607
|
+
hide(): this;
|
|
608
|
+
save(storageKey?: string): this;
|
|
609
|
+
load(storageKey?: string): this;
|
|
610
|
+
export(): Record<string, any>;
|
|
611
|
+
import(data: Record<string, any>): this;
|
|
612
|
+
getElement(): HTMLElement;
|
|
613
|
+
getShadowRoot(): ShadowRoot | null;
|
|
614
|
+
getHost(): HTMLElement | null;
|
|
615
|
+
destroy(): void;
|
|
616
|
+
}
|
|
617
|
+
export { RellyUI }
|
|
618
|
+
export default RellyUI;
|
|
619
|
+
|
|
620
|
+
export declare interface RellyUIOptions {
|
|
621
|
+
/**
|
|
622
|
+
* Title shown in the panel header. Defaults to 'RellyUI'.
|
|
623
|
+
*/
|
|
624
|
+
title?: string;
|
|
625
|
+
/**
|
|
626
|
+
* Target DOM container. If omitted, appends to document.body as a floating panel.
|
|
627
|
+
*/
|
|
628
|
+
container?: HTMLElement | string;
|
|
629
|
+
/**
|
|
630
|
+
* Whether to encapsulate the panel and styles inside Shadow DOM (100% style isolation).
|
|
631
|
+
* Defaults to true.
|
|
632
|
+
*/
|
|
633
|
+
shadowDOM?: boolean;
|
|
634
|
+
/**
|
|
635
|
+
* Whether to display a real-time search bar to filter components.
|
|
636
|
+
* Defaults to false.
|
|
637
|
+
*/
|
|
638
|
+
searchBar?: boolean;
|
|
639
|
+
/**
|
|
640
|
+
* Search configuration options.
|
|
641
|
+
*/
|
|
642
|
+
searchOptions?: SearchOptions;
|
|
643
|
+
/**
|
|
644
|
+
* Width of the panel in pixels or CSS string. Defaults to 280.
|
|
645
|
+
*/
|
|
646
|
+
width?: number | string;
|
|
647
|
+
/**
|
|
648
|
+
* Height of the panel in pixels or CSS string. Defaults to auto.
|
|
649
|
+
*/
|
|
650
|
+
height?: number | string;
|
|
651
|
+
/**
|
|
652
|
+
* Whether the panel is resizable via bottom-right drag handle.
|
|
653
|
+
* Defaults to true.
|
|
654
|
+
*/
|
|
655
|
+
resizable?: boolean;
|
|
656
|
+
/**
|
|
657
|
+
* Whether subtle Web Audio micro-sound effects are enabled.
|
|
658
|
+
* Defaults to true.
|
|
659
|
+
*/
|
|
660
|
+
sound?: boolean;
|
|
661
|
+
/**
|
|
662
|
+
* Sound pack profile ('synth' | 'mechanical' | 'bubble' | 'arcade').
|
|
663
|
+
* Defaults to 'synth'.
|
|
664
|
+
*/
|
|
665
|
+
soundPack?: SoundPack;
|
|
666
|
+
/**
|
|
667
|
+
* Automatically persist component values and panel layout/position to localStorage.
|
|
668
|
+
* Defaults to false.
|
|
669
|
+
*/
|
|
670
|
+
autoSave?: boolean;
|
|
671
|
+
/**
|
|
672
|
+
* localStorage key for autoSave. Defaults to 'relly-ui-session'.
|
|
673
|
+
*/
|
|
674
|
+
autoSaveKey?: string;
|
|
675
|
+
/**
|
|
676
|
+
* Master volume for synthetic sound effects (0.0 to 1.0).
|
|
677
|
+
* Defaults to 1.0.
|
|
678
|
+
*/
|
|
679
|
+
soundVolume?: number;
|
|
680
|
+
/**
|
|
681
|
+
* Ghost mode: panel fades to semi-transparent when cursor is idle outside panel.
|
|
682
|
+
* Defaults to false.
|
|
683
|
+
*/
|
|
684
|
+
ghostOnIdle?: boolean;
|
|
685
|
+
/**
|
|
686
|
+
* Idle opacity when ghostOnIdle is true (0.1 to 1.0). Defaults to 0.38.
|
|
687
|
+
*/
|
|
688
|
+
idleOpacity?: number;
|
|
689
|
+
/**
|
|
690
|
+
* Accordion mode: expanding one section automatically collapses sibling sections.
|
|
691
|
+
* Defaults to false.
|
|
692
|
+
*/
|
|
693
|
+
accordion?: boolean;
|
|
694
|
+
/**
|
|
695
|
+
* Whether the panel starts collapsed. Defaults to false.
|
|
696
|
+
*/
|
|
697
|
+
collapsed?: boolean;
|
|
698
|
+
/**
|
|
699
|
+
* Keyboard code to toggle panel visibility. Defaults to 'KeyH'. Set null or empty string to disable.
|
|
700
|
+
*/
|
|
701
|
+
hotkey?: string | null;
|
|
702
|
+
/**
|
|
703
|
+
* Theme configuration or preset name ('dark' | 'light' | 'cyberpunk' | 'nord' | 'dracula').
|
|
704
|
+
*/
|
|
705
|
+
theme?: ThemeInput;
|
|
706
|
+
/**
|
|
707
|
+
* Whether to automatically inject CSS styles. Defaults to true.
|
|
708
|
+
*/
|
|
709
|
+
autoInjectStyles?: boolean;
|
|
710
|
+
/**
|
|
711
|
+
* Initial floating position.
|
|
712
|
+
*/
|
|
713
|
+
position?: {
|
|
714
|
+
top?: number;
|
|
715
|
+
left?: number;
|
|
716
|
+
right?: number;
|
|
717
|
+
bottom?: number;
|
|
718
|
+
};
|
|
719
|
+
/**
|
|
720
|
+
* Allow moving the panel via drag-and-drop. Defaults to true.
|
|
721
|
+
*/
|
|
722
|
+
draggable?: boolean;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
export declare class Resizable {
|
|
726
|
+
private panel;
|
|
727
|
+
private minWidth;
|
|
728
|
+
private minHeight;
|
|
729
|
+
handleEl: HTMLElement;
|
|
730
|
+
private isResizing;
|
|
731
|
+
private startX;
|
|
732
|
+
private startY;
|
|
733
|
+
private initialWidth;
|
|
734
|
+
private initialHeight;
|
|
735
|
+
private onMouseDownBound;
|
|
736
|
+
private onMouseMoveBound;
|
|
737
|
+
private onMouseUpBound;
|
|
738
|
+
private onResizeBound;
|
|
739
|
+
constructor(panel: HTMLElement, minWidth?: number, minHeight?: number);
|
|
740
|
+
clampToViewport(): void;
|
|
741
|
+
private onWindowResize;
|
|
742
|
+
private onMouseDown;
|
|
743
|
+
private onMouseMove;
|
|
744
|
+
private onMouseUp;
|
|
745
|
+
destroy(): void;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
export declare class Row extends ContainerHelper {
|
|
749
|
+
element: HTMLElement;
|
|
750
|
+
protected disabled: boolean;
|
|
751
|
+
constructor(bindingEngine: BindingEngine, presetManager: PresetManager, soundEngine?: SoundEngine);
|
|
752
|
+
setDisabled(disabled: boolean): this;
|
|
753
|
+
isDisabled(): boolean;
|
|
754
|
+
destroy(): void;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
export declare interface SchemaControl extends ComponentFactoryOptions {
|
|
758
|
+
children?: SchemaControl[];
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
export declare interface SchemaDefinition {
|
|
762
|
+
title?: string;
|
|
763
|
+
target?: any;
|
|
764
|
+
controls: SchemaControl[];
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
export declare class SchemaLoader {
|
|
768
|
+
static load(container: ContainerHelper, schema: SchemaDefinition): void;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
export declare class SearchBar {
|
|
772
|
+
private bodyEl;
|
|
773
|
+
element: HTMLElement;
|
|
774
|
+
private inputEl;
|
|
775
|
+
private clearBtn;
|
|
776
|
+
private ignoreCase;
|
|
777
|
+
private onGlobalKeyDownBound;
|
|
778
|
+
constructor(bodyEl: HTMLElement, options?: SearchOptions);
|
|
779
|
+
private onGlobalKeyDown;
|
|
780
|
+
focus(): this;
|
|
781
|
+
getInput(): HTMLInputElement;
|
|
782
|
+
filter(query: string): void;
|
|
783
|
+
clear(): void;
|
|
784
|
+
private resetFilter;
|
|
785
|
+
destroy(): void;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
export declare interface SearchOptions {
|
|
789
|
+
ignoreCase?: boolean;
|
|
790
|
+
placeholder?: string;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
export declare class Section extends ContainerHelper implements Listenable {
|
|
794
|
+
private label;
|
|
795
|
+
element: HTMLElement;
|
|
796
|
+
private headerEl;
|
|
797
|
+
private titleEl;
|
|
798
|
+
private arrowEl;
|
|
799
|
+
private isCollapsed;
|
|
800
|
+
private conditionPredicate?;
|
|
801
|
+
protected parentContainer?: ContainerHelper;
|
|
802
|
+
protected disabled: boolean;
|
|
803
|
+
constructor(label: string, bindingEngine: BindingEngine, presetManager: PresetManager, initialCollapsed?: boolean, soundEngine?: SoundEngine);
|
|
804
|
+
setParentContainer(parent: ContainerHelper): this;
|
|
805
|
+
setDisabled(disabled: boolean): this;
|
|
806
|
+
isDisabled(): boolean;
|
|
807
|
+
setLabel(label: string): this;
|
|
808
|
+
getLabel(): string;
|
|
809
|
+
toggle(): this;
|
|
810
|
+
setCollapsed(collapsed: boolean): this;
|
|
811
|
+
showIf(predicate: ConditionPredicate): this;
|
|
812
|
+
checkVisibility(): boolean;
|
|
813
|
+
checkDirty(): void;
|
|
814
|
+
destroy(): void;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
export declare class Segmented extends BaseComponent<any> {
|
|
818
|
+
private containerEl;
|
|
819
|
+
private gliderEl;
|
|
820
|
+
private buttons;
|
|
821
|
+
private optionsMap;
|
|
822
|
+
private soundEngine?;
|
|
823
|
+
constructor(label: string, targetObject: any, property: string, options?: string[] | number[] | Record<string, any>, bindingEngine?: BindingEngine, presetManager?: PresetManager, soundEngine?: SoundEngine);
|
|
824
|
+
setOptions(options: string[] | number[] | Record<string, any>): this;
|
|
825
|
+
private createButton;
|
|
826
|
+
setSoundEngine(soundEngine: SoundEngine): this;
|
|
827
|
+
update(): this;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
export declare interface SegmentedOptions {
|
|
831
|
+
options: string[] | number[] | Record<string, any>;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
export declare class Select extends BaseComponent<any> {
|
|
835
|
+
private selectEl;
|
|
836
|
+
private optionsMap;
|
|
837
|
+
constructor(label: string, targetObject: any, property: string, options?: any[] | Record<string, any>, bindingEngine?: BindingEngine, presetManager?: PresetManager);
|
|
838
|
+
setOptions(options: any[] | Record<string, any>): this;
|
|
839
|
+
update(): this;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
declare interface SerializableComponent {
|
|
843
|
+
getSerializableKey(): string | null;
|
|
844
|
+
getValue(): any;
|
|
845
|
+
setValue(val: any): void;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
export declare class Slider extends BaseComponent<number> {
|
|
849
|
+
private containerEl;
|
|
850
|
+
private rangeInput;
|
|
851
|
+
private numberInput;
|
|
852
|
+
private soundEngine?;
|
|
853
|
+
private lastSoundTime;
|
|
854
|
+
private min;
|
|
855
|
+
private max;
|
|
856
|
+
private step;
|
|
857
|
+
constructor(label: string, targetObject: any, property: string, bindingEngine?: BindingEngine, presetManager?: PresetManager, soundEngine?: SoundEngine);
|
|
858
|
+
private setupJogScrubbing;
|
|
859
|
+
private triggerSound;
|
|
860
|
+
setSoundEngine(soundEngine: SoundEngine): this;
|
|
861
|
+
setMin(min: number): this;
|
|
862
|
+
setMax(max: number): this;
|
|
863
|
+
setStep(step: number): this;
|
|
864
|
+
private applyConstraints;
|
|
865
|
+
update(): this;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
export declare class SoundEngine {
|
|
869
|
+
private ctx;
|
|
870
|
+
private enabled;
|
|
871
|
+
private volume;
|
|
872
|
+
private soundPack;
|
|
873
|
+
constructor(enabled?: boolean, soundPack?: SoundPack);
|
|
874
|
+
setEnabled(enabled: boolean): void;
|
|
875
|
+
isEnabled(): boolean;
|
|
876
|
+
setVolume(vol: number): void;
|
|
877
|
+
getVolume(): number;
|
|
878
|
+
setSoundPack(pack: SoundPack): this;
|
|
879
|
+
getSoundPack(): SoundPack;
|
|
880
|
+
private initCtx;
|
|
881
|
+
playClick(): void;
|
|
882
|
+
playToggle(state: boolean): void;
|
|
883
|
+
playNotify(): void;
|
|
884
|
+
playSnap(): void;
|
|
885
|
+
playMiniHud(isEntering?: boolean): void;
|
|
886
|
+
playTick(): void;
|
|
887
|
+
playTab(): void;
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
export declare type SoundPack = 'synth' | 'mechanical' | 'bubble' | 'arcade';
|
|
891
|
+
|
|
892
|
+
export declare class StatusIndicator extends BaseComponent<string> {
|
|
893
|
+
private wrapperEl;
|
|
894
|
+
private ledEl;
|
|
895
|
+
private badgeEl;
|
|
896
|
+
private detailEl;
|
|
897
|
+
private currentStatus;
|
|
898
|
+
private customBadge?;
|
|
899
|
+
private customDetail?;
|
|
900
|
+
constructor(label: string, targetObject?: any, property?: string, bindingEngine?: BindingEngine);
|
|
901
|
+
setStatus(status: StatusType, badge?: string, detail?: string): this;
|
|
902
|
+
setBadge(badge: string): this;
|
|
903
|
+
setDetail(detail: string): this;
|
|
904
|
+
update(): this;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
export declare interface StatusOptions {
|
|
908
|
+
badge?: string;
|
|
909
|
+
detail?: string;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
export declare type StatusType = 'online' | 'busy' | 'offline' | 'info' | 'ready';
|
|
913
|
+
|
|
914
|
+
export declare const SYNTHWAVE_THEME: RellyTheme;
|
|
915
|
+
|
|
916
|
+
export declare class Tab extends ContainerHelper {
|
|
917
|
+
private label;
|
|
918
|
+
contentEl: HTMLElement;
|
|
919
|
+
buttonEl: HTMLButtonElement;
|
|
920
|
+
constructor(label: string, bindingEngine: BindingEngine, presetManager: PresetManager, soundEngine?: SoundEngine);
|
|
921
|
+
getLabel(): string;
|
|
922
|
+
setActive(active: boolean): void;
|
|
923
|
+
destroy(): void;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
export declare class TabsManager {
|
|
927
|
+
private bindingEngine;
|
|
928
|
+
private presetManager;
|
|
929
|
+
private soundEngine?;
|
|
930
|
+
barEl: HTMLElement;
|
|
931
|
+
bodyEl: HTMLElement;
|
|
932
|
+
private tabs;
|
|
933
|
+
private activeTab;
|
|
934
|
+
constructor(parentHeader: HTMLElement, parentBody: HTMLElement, bindingEngine: BindingEngine, presetManager: PresetManager, soundEngine?: SoundEngine | undefined);
|
|
935
|
+
addTab(label: string): Tab;
|
|
936
|
+
switchTab(tab: Tab, playSound?: boolean): void;
|
|
937
|
+
getActiveTab(): Tab | null;
|
|
938
|
+
destroy(): void;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
export declare type ThemeInput = ThemePreset | Partial<RellyTheme>;
|
|
942
|
+
|
|
943
|
+
export declare class ThemeManager {
|
|
944
|
+
private panelElement;
|
|
945
|
+
private currentTheme;
|
|
946
|
+
private currentThemeName?;
|
|
947
|
+
constructor(panelElement: HTMLElement, themeInput?: ThemeInput);
|
|
948
|
+
applyTheme(themeInput: ThemeInput): void;
|
|
949
|
+
getCurrentThemeName(): string | undefined;
|
|
950
|
+
private applyToDOM;
|
|
951
|
+
getTheme(): RellyTheme;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
export declare type ThemePreset = 'dark' | 'light' | 'cyberpunk' | 'nord' | 'dracula' | 'tokyo-night' | 'matrix' | 'synthwave';
|
|
955
|
+
|
|
956
|
+
export declare class ToastManager {
|
|
957
|
+
private parentEl;
|
|
958
|
+
private soundEngine?;
|
|
959
|
+
private containerEl;
|
|
960
|
+
constructor(parentEl: HTMLElement, soundEngine?: SoundEngine | undefined);
|
|
961
|
+
notify(message: string, type?: ToastType, duration?: number): HTMLElement;
|
|
962
|
+
private getIconSvg;
|
|
963
|
+
destroy(): void;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
export declare type ToastType = 'info' | 'success' | 'warning' | 'error';
|
|
967
|
+
|
|
968
|
+
export declare const TOKYO_NIGHT_THEME: RellyTheme;
|
|
969
|
+
|
|
970
|
+
export { }
|