glimpse-sdk 0.3.0 → 0.7.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/README.md +33 -1
- package/dist/src/app.d.ts +25 -1
- package/dist/src/app.js +96 -4
- package/dist/src/events.d.ts +1 -1
- package/dist/src/events.js +1 -1
- package/dist/src/index.d.ts +4 -3
- package/dist/src/index.js +4 -3
- package/dist/src/ipc.d.ts +28 -0
- package/dist/src/ipc.js +214 -0
- package/dist/src/protocol.d.ts +2 -15
- package/dist/src/protocol.js +1 -18
- package/dist/src/widgets.d.ts +415 -256
- package/dist/src/widgets.js +379 -457
- package/package.json +1 -1
- package/src/app.ts +122 -5
- package/src/events.ts +2 -2
- package/src/index.ts +39 -35
- package/src/ipc.ts +233 -0
- package/src/protocol.ts +2 -23
- package/src/widgets.ts +334 -787
package/dist/src/widgets.d.ts
CHANGED
|
@@ -1,369 +1,528 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export type InlineHandler = (event: unknown) => void | Promise<void>;
|
|
2
|
+
export declare class InlineHandlerRegistry {
|
|
3
|
+
readonly handlers: Map<string, InlineHandler>;
|
|
4
|
+
add(event: "click" | "toggle" | "change", id: string, handler: InlineHandler): void;
|
|
5
|
+
}
|
|
6
|
+
export type BadgeKind = "default" | "success" | "warning" | "error" | "accent";
|
|
7
|
+
export type StatusDotStatus = "neutral" | "success" | "warning" | "error" | "accent";
|
|
6
8
|
export type PagerAppearance = "dots" | "numbers";
|
|
7
|
-
export type
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
export type PopoverSize = "small" | "medium" | "large" | "wide";
|
|
10
|
+
export interface ProtocolNode {
|
|
11
|
+
type: string;
|
|
12
|
+
data: Record<string, unknown>;
|
|
11
13
|
}
|
|
12
|
-
export interface
|
|
13
|
-
id?: string;
|
|
14
|
+
export interface CommonOptions {
|
|
14
15
|
visible?: boolean;
|
|
15
|
-
hexpand?: boolean;
|
|
16
|
-
vexpand?: boolean;
|
|
17
|
-
halign?: Align;
|
|
18
|
-
valign?: Align;
|
|
19
16
|
tooltip?: string;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
protected
|
|
25
|
-
protected
|
|
26
|
-
abstract
|
|
17
|
+
css_classes?: string[];
|
|
18
|
+
styles?: Record<string, string>;
|
|
19
|
+
}
|
|
20
|
+
export declare abstract class WidgetBase {
|
|
21
|
+
protected readonly common: CommonOptions;
|
|
22
|
+
protected constructor(common?: CommonOptions);
|
|
23
|
+
abstract readonly type: string;
|
|
24
|
+
abstract data(): Record<string, unknown>;
|
|
25
|
+
bindHandlers(_registry: InlineHandlerRegistry, _path: number[]): void;
|
|
26
|
+
toProtocol(): ProtocolNode;
|
|
27
|
+
protected commonData(): Record<string, unknown>;
|
|
27
28
|
}
|
|
28
29
|
export declare class Label extends WidgetBase {
|
|
29
|
-
readonly
|
|
30
|
+
readonly type = "label";
|
|
30
31
|
private readonly options;
|
|
31
|
-
constructor(
|
|
32
|
-
|
|
32
|
+
constructor(options: string | CommonOptions & {
|
|
33
|
+
label: string;
|
|
33
34
|
xalign?: number;
|
|
34
|
-
|
|
35
|
-
});
|
|
36
|
-
toProtocol(): Record<string, unknown>;
|
|
37
|
-
}
|
|
38
|
-
export declare class Image extends WidgetBase {
|
|
39
|
-
readonly icon: Icon;
|
|
40
|
-
private readonly options;
|
|
41
|
-
constructor(icon: Icon, options?: CommonProps & {
|
|
42
|
-
pixel_size?: number;
|
|
43
|
-
});
|
|
44
|
-
toProtocol(): Record<string, unknown>;
|
|
45
|
-
}
|
|
46
|
-
export declare class Progress extends WidgetBase {
|
|
47
|
-
private readonly options;
|
|
48
|
-
constructor(options: CommonProps & {
|
|
49
|
-
value: number;
|
|
50
|
-
max?: number;
|
|
51
|
-
show_text?: boolean;
|
|
52
|
-
text?: string;
|
|
35
|
+
wrap?: boolean;
|
|
53
36
|
});
|
|
54
|
-
|
|
37
|
+
data(): Record<string, unknown>;
|
|
55
38
|
}
|
|
56
|
-
export declare class
|
|
39
|
+
export declare class Header extends WidgetBase {
|
|
57
40
|
private readonly options;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
max?: number;
|
|
62
|
-
mode?: LevelBarMode;
|
|
41
|
+
readonly type = "header";
|
|
42
|
+
constructor(options: CommonOptions & {
|
|
43
|
+
label: string;
|
|
63
44
|
});
|
|
64
|
-
|
|
45
|
+
data(): Record<string, unknown>;
|
|
65
46
|
}
|
|
66
|
-
export declare class
|
|
67
|
-
readonly options: CommonProps & {
|
|
68
|
-
path: string;
|
|
69
|
-
content_fit?: ContentFit;
|
|
70
|
-
};
|
|
71
|
-
constructor(options: CommonProps & {
|
|
72
|
-
path: string;
|
|
73
|
-
content_fit?: ContentFit;
|
|
74
|
-
});
|
|
75
|
-
toProtocol(): Record<string, unknown>;
|
|
76
|
-
}
|
|
77
|
-
export declare class Button extends WidgetBase {
|
|
47
|
+
export declare class Hero extends WidgetBase {
|
|
78
48
|
private readonly options;
|
|
79
|
-
|
|
80
|
-
|
|
49
|
+
readonly type = "hero";
|
|
50
|
+
constructor(options: CommonOptions & {
|
|
51
|
+
title: string;
|
|
52
|
+
subtitle?: string;
|
|
53
|
+
id?: string;
|
|
81
54
|
icon?: string;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
private readonly options;
|
|
89
|
-
constructor(options: CommonProps & {
|
|
90
|
-
uri: string;
|
|
91
|
-
label?: string;
|
|
55
|
+
icon_size?: number;
|
|
56
|
+
toggle?: boolean;
|
|
57
|
+
toggle_sensitive?: boolean;
|
|
58
|
+
separator?: boolean;
|
|
59
|
+
trailing?: TreeNode;
|
|
60
|
+
on_toggle?: InlineHandler;
|
|
92
61
|
});
|
|
93
|
-
|
|
62
|
+
data(): Record<string, unknown>;
|
|
63
|
+
bindHandlers(registry: InlineHandlerRegistry, path: number[]): void;
|
|
94
64
|
}
|
|
95
|
-
export declare class
|
|
65
|
+
export declare class Badge extends WidgetBase {
|
|
96
66
|
private readonly options;
|
|
97
|
-
|
|
67
|
+
readonly type = "badge";
|
|
68
|
+
constructor(options: CommonOptions & {
|
|
98
69
|
label: string;
|
|
99
|
-
|
|
100
|
-
expanded?: boolean;
|
|
70
|
+
kind?: BadgeKind;
|
|
101
71
|
});
|
|
102
|
-
|
|
72
|
+
data(): Record<string, unknown>;
|
|
103
73
|
}
|
|
104
|
-
export declare class
|
|
74
|
+
export declare class StatusDot extends WidgetBase {
|
|
105
75
|
private readonly options;
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
indent_for_depth?: boolean;
|
|
110
|
-
indent_for_icon?: boolean;
|
|
76
|
+
readonly type = "status_dot";
|
|
77
|
+
constructor(options?: CommonOptions & {
|
|
78
|
+
status?: StatusDotStatus;
|
|
111
79
|
});
|
|
112
|
-
|
|
80
|
+
data(): Record<string, unknown>;
|
|
113
81
|
}
|
|
114
|
-
export declare class
|
|
82
|
+
export declare class PanelIndicator extends WidgetBase {
|
|
115
83
|
private readonly options;
|
|
116
|
-
|
|
117
|
-
|
|
84
|
+
readonly type = "panel_indicator";
|
|
85
|
+
constructor(options: CommonOptions & {
|
|
86
|
+
id?: string;
|
|
118
87
|
icon?: string;
|
|
119
|
-
popover: TreeNode;
|
|
120
|
-
});
|
|
121
|
-
toProtocol(): Record<string, unknown>;
|
|
122
|
-
}
|
|
123
|
-
export declare class Switch extends WidgetBase {
|
|
124
|
-
private readonly options;
|
|
125
|
-
constructor(options?: CommonProps & {
|
|
126
88
|
label?: string;
|
|
127
89
|
active?: boolean;
|
|
90
|
+
checked?: boolean;
|
|
91
|
+
needs_attention?: boolean;
|
|
92
|
+
extra?: TreeNode;
|
|
93
|
+
on_click?: InlineHandler;
|
|
128
94
|
});
|
|
129
|
-
|
|
95
|
+
data(): Record<string, unknown>;
|
|
96
|
+
bindHandlers(registry: InlineHandlerRegistry, path: number[]): void;
|
|
130
97
|
}
|
|
131
|
-
export declare class
|
|
98
|
+
export declare class EmptyState extends WidgetBase {
|
|
132
99
|
private readonly options;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
100
|
+
readonly type = "empty_state";
|
|
101
|
+
constructor(options: CommonOptions & {
|
|
102
|
+
title: string;
|
|
103
|
+
subtitle?: string;
|
|
136
104
|
});
|
|
137
|
-
|
|
105
|
+
data(): Record<string, unknown>;
|
|
138
106
|
}
|
|
139
|
-
export declare class
|
|
107
|
+
export declare class Spinner extends WidgetBase {
|
|
140
108
|
private readonly options;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
step?: number;
|
|
145
|
-
value?: number;
|
|
146
|
-
orientation?: Orientation;
|
|
147
|
-
draw_value?: boolean;
|
|
109
|
+
readonly type = "spinner";
|
|
110
|
+
constructor(options?: CommonOptions & {
|
|
111
|
+
spinning?: boolean;
|
|
148
112
|
});
|
|
149
|
-
|
|
113
|
+
data(): Record<string, unknown>;
|
|
150
114
|
}
|
|
151
|
-
export declare class
|
|
115
|
+
export declare class Meter extends WidgetBase {
|
|
152
116
|
private readonly options;
|
|
153
|
-
|
|
117
|
+
readonly type = "meter";
|
|
118
|
+
constructor(options?: CommonOptions & {
|
|
119
|
+
id?: string;
|
|
120
|
+
icon?: string;
|
|
154
121
|
label?: string;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
constructor(id: string, label: string);
|
|
163
|
-
toProtocol(): Record<string, unknown>;
|
|
164
|
-
}
|
|
165
|
-
export declare class Select extends WidgetBase {
|
|
166
|
-
private readonly options;
|
|
167
|
-
constructor(options?: CommonProps & {
|
|
168
|
-
items?: SelectOption[];
|
|
169
|
-
selected?: number;
|
|
122
|
+
value?: number;
|
|
123
|
+
min?: number;
|
|
124
|
+
max?: number;
|
|
125
|
+
step?: number;
|
|
126
|
+
text?: string;
|
|
127
|
+
interactive?: boolean;
|
|
128
|
+
on_change?: InlineHandler;
|
|
170
129
|
});
|
|
171
|
-
|
|
130
|
+
data(): Record<string, unknown>;
|
|
131
|
+
bindHandlers(registry: InlineHandlerRegistry, _path: number[]): void;
|
|
172
132
|
}
|
|
173
133
|
export declare class Separator extends WidgetBase {
|
|
174
|
-
|
|
175
|
-
constructor(
|
|
176
|
-
|
|
177
|
-
});
|
|
178
|
-
toProtocol(): Record<string, unknown>;
|
|
134
|
+
readonly type = "separator";
|
|
135
|
+
constructor(common?: CommonOptions);
|
|
136
|
+
data(): Record<string, unknown>;
|
|
179
137
|
}
|
|
180
138
|
export declare class Scroll extends WidgetBase {
|
|
181
|
-
private readonly child;
|
|
182
|
-
constructor(child: TreeNode, options?: CommonProps);
|
|
183
|
-
toProtocol(): Record<string, unknown>;
|
|
184
|
-
}
|
|
185
|
-
export declare class Overlay extends WidgetBase {
|
|
186
139
|
private readonly options;
|
|
187
|
-
|
|
140
|
+
readonly type = "scroll";
|
|
141
|
+
constructor(options: CommonOptions & {
|
|
188
142
|
child: TreeNode;
|
|
189
|
-
overlays?: TreeNode[];
|
|
190
143
|
});
|
|
191
|
-
|
|
144
|
+
data(): Record<string, unknown>;
|
|
145
|
+
bindHandlers(registry: InlineHandlerRegistry, path: number[]): void;
|
|
192
146
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
constructor(options?: CommonProps & {
|
|
147
|
+
declare abstract class ChildrenWidget extends WidgetBase {
|
|
148
|
+
constructor(common?: CommonOptions & {
|
|
196
149
|
children?: TreeNode[];
|
|
197
150
|
});
|
|
198
|
-
|
|
151
|
+
protected readonly kids: TreeNode[];
|
|
152
|
+
data(): Record<string, unknown>;
|
|
153
|
+
bindHandlers(registry: InlineHandlerRegistry, path: number[]): void;
|
|
199
154
|
}
|
|
200
|
-
export declare class
|
|
201
|
-
readonly row
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
readonly
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
155
|
+
export declare class Row extends ChildrenWidget {
|
|
156
|
+
readonly type = "row";
|
|
157
|
+
}
|
|
158
|
+
export declare class Column extends ChildrenWidget {
|
|
159
|
+
readonly type = "column";
|
|
160
|
+
}
|
|
161
|
+
export declare class BoxedList extends ChildrenWidget {
|
|
162
|
+
readonly type = "boxed_list";
|
|
208
163
|
}
|
|
209
|
-
export declare class
|
|
164
|
+
export declare class ButtonRow extends ChildrenWidget {
|
|
165
|
+
readonly type = "button_row";
|
|
166
|
+
}
|
|
167
|
+
export declare class CircleBox extends WidgetBase {
|
|
210
168
|
private readonly options;
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
column_spacing?: number;
|
|
169
|
+
readonly type = "circle_box";
|
|
170
|
+
constructor(options: CommonOptions & {
|
|
171
|
+
color: string;
|
|
215
172
|
});
|
|
216
|
-
|
|
173
|
+
data(): Record<string, unknown>;
|
|
217
174
|
}
|
|
218
|
-
export declare class
|
|
175
|
+
export declare class Container extends ChildrenWidget {
|
|
176
|
+
readonly type = "container";
|
|
177
|
+
}
|
|
178
|
+
export declare class PopoverShell extends ChildrenWidget {
|
|
219
179
|
private readonly options;
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
180
|
+
readonly type = "popover_shell";
|
|
181
|
+
constructor(options?: CommonOptions & {
|
|
182
|
+
children?: TreeNode[];
|
|
183
|
+
size?: PopoverSize;
|
|
184
|
+
footer?: TreeNode[];
|
|
185
|
+
footer_visible?: boolean;
|
|
186
|
+
});
|
|
187
|
+
data(): Record<string, unknown>;
|
|
188
|
+
bindHandlers(registry: InlineHandlerRegistry, path: number[]): void;
|
|
189
|
+
}
|
|
190
|
+
export declare class Tile extends WidgetBase {
|
|
191
|
+
protected readonly options: CommonOptions & {
|
|
192
|
+
primary: string;
|
|
193
|
+
id?: string;
|
|
194
|
+
secondary?: string;
|
|
195
|
+
left_icon?: string;
|
|
196
|
+
left?: TreeNode;
|
|
197
|
+
right?: TreeNode;
|
|
198
|
+
activatable?: boolean;
|
|
199
|
+
on_click?: InlineHandler;
|
|
200
|
+
};
|
|
201
|
+
readonly type: string;
|
|
202
|
+
constructor(options: CommonOptions & {
|
|
203
|
+
primary: string;
|
|
204
|
+
id?: string;
|
|
205
|
+
secondary?: string;
|
|
206
|
+
left_icon?: string;
|
|
207
|
+
left?: TreeNode;
|
|
208
|
+
right?: TreeNode;
|
|
209
|
+
activatable?: boolean;
|
|
210
|
+
on_click?: InlineHandler;
|
|
224
211
|
});
|
|
225
|
-
|
|
212
|
+
data(): Record<string, unknown>;
|
|
213
|
+
bindHandlers(registry: InlineHandlerRegistry, path: number[]): void;
|
|
214
|
+
}
|
|
215
|
+
export declare class SegmentedTile extends Tile {
|
|
216
|
+
protected readonly options: ConstructorParameters<typeof Tile>[0] & {
|
|
217
|
+
child?: TreeNode;
|
|
218
|
+
expanded?: boolean;
|
|
219
|
+
on_toggle?: InlineHandler;
|
|
220
|
+
};
|
|
221
|
+
readonly type = "segmented_tile";
|
|
222
|
+
constructor(options: ConstructorParameters<typeof Tile>[0] & {
|
|
223
|
+
child?: TreeNode;
|
|
224
|
+
expanded?: boolean;
|
|
225
|
+
on_toggle?: InlineHandler;
|
|
226
|
+
});
|
|
227
|
+
data(): Record<string, unknown>;
|
|
228
|
+
bindHandlers(registry: InlineHandlerRegistry, path: number[]): void;
|
|
226
229
|
}
|
|
227
|
-
export declare class
|
|
230
|
+
export declare class SwitchTile extends WidgetBase {
|
|
228
231
|
private readonly options;
|
|
229
|
-
|
|
230
|
-
|
|
232
|
+
readonly type = "switch_tile";
|
|
233
|
+
constructor(options: CommonOptions & {
|
|
234
|
+
id: string;
|
|
235
|
+
primary: string;
|
|
236
|
+
secondary?: string;
|
|
237
|
+
left_icon?: string;
|
|
238
|
+
left?: TreeNode;
|
|
239
|
+
active?: boolean;
|
|
240
|
+
on_toggle?: InlineHandler;
|
|
231
241
|
});
|
|
232
|
-
|
|
242
|
+
data(): Record<string, unknown>;
|
|
243
|
+
bindHandlers(registry: InlineHandlerRegistry, path: number[]): void;
|
|
233
244
|
}
|
|
234
|
-
export declare class
|
|
245
|
+
export declare class ExpanderTile extends WidgetBase {
|
|
235
246
|
private readonly options;
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
247
|
+
readonly type = "expander_tile";
|
|
248
|
+
constructor(options: CommonOptions & {
|
|
249
|
+
primary: string;
|
|
250
|
+
id?: string;
|
|
251
|
+
secondary?: string;
|
|
252
|
+
left_icon?: string;
|
|
253
|
+
left?: TreeNode;
|
|
254
|
+
child?: TreeNode;
|
|
255
|
+
expanded?: boolean;
|
|
256
|
+
on_toggle?: InlineHandler;
|
|
240
257
|
});
|
|
241
|
-
|
|
258
|
+
data(): Record<string, unknown>;
|
|
259
|
+
bindHandlers(registry: InlineHandlerRegistry, path: number[]): void;
|
|
242
260
|
}
|
|
243
|
-
export declare class
|
|
261
|
+
export declare class SliderTile extends WidgetBase {
|
|
244
262
|
private readonly options;
|
|
245
|
-
|
|
246
|
-
|
|
263
|
+
readonly type = "slider_tile";
|
|
264
|
+
constructor(options: CommonOptions & {
|
|
265
|
+
id: string;
|
|
247
266
|
label?: string;
|
|
248
|
-
|
|
267
|
+
left_icon?: string;
|
|
268
|
+
left?: TreeNode;
|
|
269
|
+
value?: number;
|
|
249
270
|
min?: number;
|
|
250
271
|
max?: number;
|
|
251
272
|
step?: number;
|
|
252
|
-
|
|
253
|
-
|
|
273
|
+
page?: number;
|
|
274
|
+
digits?: number;
|
|
275
|
+
snap_step?: number;
|
|
276
|
+
on_change?: InlineHandler;
|
|
277
|
+
});
|
|
278
|
+
data(): Record<string, unknown>;
|
|
279
|
+
bindHandlers(registry: InlineHandlerRegistry, path: number[]): void;
|
|
280
|
+
}
|
|
281
|
+
export declare class ChoiceTile extends WidgetBase {
|
|
282
|
+
private readonly options;
|
|
283
|
+
readonly type = "choice_tile";
|
|
284
|
+
constructor(options: CommonOptions & {
|
|
285
|
+
primary: string;
|
|
286
|
+
id?: string;
|
|
287
|
+
secondary?: string;
|
|
288
|
+
left_icon?: string;
|
|
289
|
+
left?: TreeNode;
|
|
290
|
+
selected?: boolean;
|
|
291
|
+
on_click?: InlineHandler;
|
|
292
|
+
});
|
|
293
|
+
data(): Record<string, unknown>;
|
|
294
|
+
bindHandlers(registry: InlineHandlerRegistry, path: number[]): void;
|
|
295
|
+
}
|
|
296
|
+
export declare class Choice {
|
|
297
|
+
readonly options: {
|
|
298
|
+
id: string;
|
|
299
|
+
primary: string;
|
|
300
|
+
secondary?: string;
|
|
301
|
+
icon?: string;
|
|
302
|
+
};
|
|
303
|
+
constructor(options: {
|
|
304
|
+
id: string;
|
|
305
|
+
primary: string;
|
|
306
|
+
secondary?: string;
|
|
307
|
+
icon?: string;
|
|
254
308
|
});
|
|
255
309
|
toProtocol(): Record<string, unknown>;
|
|
256
310
|
}
|
|
257
|
-
export declare class
|
|
311
|
+
export declare class ChoiceList extends WidgetBase {
|
|
258
312
|
private readonly options;
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
313
|
+
readonly type = "choice_list";
|
|
314
|
+
constructor(options: CommonOptions & {
|
|
315
|
+
id: string;
|
|
316
|
+
choices?: Choice[];
|
|
317
|
+
active?: string;
|
|
318
|
+
on_change?: InlineHandler;
|
|
262
319
|
});
|
|
263
|
-
|
|
320
|
+
data(): Record<string, unknown>;
|
|
321
|
+
bindHandlers(registry: InlineHandlerRegistry, _path: number[]): void;
|
|
264
322
|
}
|
|
265
|
-
export declare class
|
|
323
|
+
export declare class KeyValueGrid extends WidgetBase {
|
|
266
324
|
private readonly options;
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
325
|
+
readonly type = "key_value_grid";
|
|
326
|
+
constructor(options?: CommonOptions & {
|
|
327
|
+
rows?: {
|
|
328
|
+
key: string;
|
|
329
|
+
value: string;
|
|
330
|
+
}[];
|
|
270
331
|
});
|
|
271
|
-
|
|
332
|
+
data(): Record<string, unknown>;
|
|
272
333
|
}
|
|
273
|
-
export declare class
|
|
334
|
+
export declare class PagerItem extends WidgetBase {
|
|
274
335
|
private readonly options;
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
336
|
+
readonly type = "pager_item";
|
|
337
|
+
constructor(options: CommonOptions & {
|
|
338
|
+
id: number;
|
|
339
|
+
label?: string;
|
|
340
|
+
appearance?: PagerAppearance;
|
|
341
|
+
active?: boolean;
|
|
342
|
+
inactive?: boolean;
|
|
343
|
+
occupied?: boolean;
|
|
344
|
+
urgent?: boolean;
|
|
345
|
+
on_click?: InlineHandler;
|
|
278
346
|
});
|
|
279
|
-
|
|
347
|
+
data(): Record<string, unknown>;
|
|
348
|
+
bindHandlers(registry: InlineHandlerRegistry, _path: number[]): void;
|
|
280
349
|
}
|
|
281
|
-
export declare class
|
|
350
|
+
export declare class PagerStrip extends WidgetBase {
|
|
282
351
|
private readonly options;
|
|
283
|
-
|
|
284
|
-
|
|
352
|
+
readonly type = "pager_strip";
|
|
353
|
+
constructor(options?: CommonOptions & {
|
|
354
|
+
id?: string;
|
|
355
|
+
items?: PagerItem[];
|
|
356
|
+
placeholder?: boolean;
|
|
357
|
+
on_change?: InlineHandler;
|
|
285
358
|
});
|
|
286
|
-
|
|
359
|
+
data(): Record<string, unknown>;
|
|
360
|
+
bindHandlers(registry: InlineHandlerRegistry, path: number[]): void;
|
|
287
361
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
362
|
+
declare abstract class ActiveIndicator extends WidgetBase {
|
|
363
|
+
protected readonly options: CommonOptions & {
|
|
364
|
+
active?: boolean;
|
|
365
|
+
};
|
|
366
|
+
constructor(options?: CommonOptions & {
|
|
367
|
+
active?: boolean;
|
|
294
368
|
});
|
|
295
|
-
|
|
369
|
+
data(): Record<string, unknown>;
|
|
296
370
|
}
|
|
297
|
-
export declare class
|
|
371
|
+
export declare class CameraIndicator extends ActiveIndicator {
|
|
372
|
+
readonly type = "camera_indicator";
|
|
373
|
+
}
|
|
374
|
+
export declare class MicIndicator extends ActiveIndicator {
|
|
375
|
+
readonly type = "mic_indicator";
|
|
376
|
+
}
|
|
377
|
+
export declare class MutedIndicator extends ActiveIndicator {
|
|
378
|
+
readonly type = "muted_indicator";
|
|
379
|
+
}
|
|
380
|
+
export declare class LocationIndicator extends ActiveIndicator {
|
|
381
|
+
readonly type = "location_indicator";
|
|
382
|
+
}
|
|
383
|
+
export declare class ScreenCastIndicator extends ActiveIndicator {
|
|
384
|
+
protected readonly options: CommonOptions & {
|
|
385
|
+
active?: boolean;
|
|
386
|
+
timer_text?: string;
|
|
387
|
+
};
|
|
388
|
+
readonly type = "screencast_indicator";
|
|
389
|
+
constructor(options?: CommonOptions & {
|
|
390
|
+
active?: boolean;
|
|
391
|
+
timer_text?: string;
|
|
392
|
+
});
|
|
393
|
+
data(): Record<string, unknown>;
|
|
394
|
+
}
|
|
395
|
+
export declare class Calendar extends WidgetBase {
|
|
298
396
|
private readonly options;
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
397
|
+
readonly type = "calendar";
|
|
398
|
+
constructor(options: CommonOptions & {
|
|
399
|
+
selected_date: string;
|
|
400
|
+
id?: string;
|
|
401
|
+
event_days?: string[];
|
|
402
|
+
on_change?: InlineHandler;
|
|
304
403
|
});
|
|
305
|
-
|
|
404
|
+
data(): Record<string, unknown>;
|
|
405
|
+
bindHandlers(registry: InlineHandlerRegistry, _path: number[]): void;
|
|
306
406
|
}
|
|
307
|
-
export declare class
|
|
407
|
+
export declare class BatteryHero extends WidgetBase {
|
|
308
408
|
private readonly options;
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
409
|
+
readonly type = "battery_hero";
|
|
410
|
+
constructor(options: CommonOptions & {
|
|
411
|
+
icon: string;
|
|
412
|
+
percentage: string;
|
|
413
|
+
fraction: number;
|
|
414
|
+
state: string;
|
|
315
415
|
});
|
|
316
|
-
|
|
416
|
+
data(): Record<string, unknown>;
|
|
317
417
|
}
|
|
318
|
-
export declare class
|
|
418
|
+
export declare class DateHero extends WidgetBase {
|
|
319
419
|
private readonly options;
|
|
320
|
-
|
|
420
|
+
readonly type = "date_hero";
|
|
421
|
+
constructor(options: CommonOptions & {
|
|
422
|
+
weekday: string;
|
|
423
|
+
date: string;
|
|
424
|
+
});
|
|
425
|
+
data(): Record<string, unknown>;
|
|
426
|
+
}
|
|
427
|
+
export declare class EventItem {
|
|
428
|
+
readonly options: {
|
|
429
|
+
id: string;
|
|
321
430
|
title: string;
|
|
322
|
-
|
|
431
|
+
start: string;
|
|
432
|
+
end?: string;
|
|
433
|
+
location?: string;
|
|
434
|
+
all_day?: boolean;
|
|
435
|
+
};
|
|
436
|
+
constructor(options: {
|
|
437
|
+
id: string;
|
|
438
|
+
title: string;
|
|
439
|
+
start: string;
|
|
440
|
+
end?: string;
|
|
441
|
+
location?: string;
|
|
442
|
+
all_day?: boolean;
|
|
323
443
|
});
|
|
324
444
|
toProtocol(): Record<string, unknown>;
|
|
325
445
|
}
|
|
326
|
-
export declare class
|
|
446
|
+
export declare class Events extends WidgetBase {
|
|
327
447
|
private readonly options;
|
|
328
|
-
|
|
329
|
-
|
|
448
|
+
readonly type = "events";
|
|
449
|
+
constructor(options: CommonOptions & {
|
|
450
|
+
date: string;
|
|
451
|
+
events?: EventItem[];
|
|
452
|
+
loading?: boolean;
|
|
330
453
|
});
|
|
331
|
-
|
|
454
|
+
data(): Record<string, unknown>;
|
|
332
455
|
}
|
|
333
|
-
export declare class
|
|
334
|
-
|
|
456
|
+
export declare class WeatherForecastItem {
|
|
457
|
+
readonly options: {
|
|
458
|
+
day_name: string;
|
|
459
|
+
icon: string;
|
|
460
|
+
condition: string;
|
|
461
|
+
temperatures: string;
|
|
462
|
+
is_today?: boolean;
|
|
463
|
+
};
|
|
464
|
+
constructor(options: {
|
|
465
|
+
day_name: string;
|
|
466
|
+
icon: string;
|
|
467
|
+
condition: string;
|
|
468
|
+
temperatures: string;
|
|
469
|
+
is_today?: boolean;
|
|
470
|
+
});
|
|
335
471
|
toProtocol(): Record<string, unknown>;
|
|
336
472
|
}
|
|
337
|
-
export declare class
|
|
473
|
+
export declare class WeatherForecastList extends WidgetBase {
|
|
338
474
|
private readonly options;
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
475
|
+
readonly type = "weather_forecast_list";
|
|
476
|
+
constructor(options?: CommonOptions & {
|
|
477
|
+
items?: WeatherForecastItem[];
|
|
478
|
+
});
|
|
479
|
+
data(): Record<string, unknown>;
|
|
480
|
+
}
|
|
481
|
+
export declare class WeatherHourlyItem {
|
|
482
|
+
readonly options: {
|
|
483
|
+
time: string;
|
|
484
|
+
icon: string;
|
|
485
|
+
temperature: string;
|
|
486
|
+
};
|
|
487
|
+
constructor(options: {
|
|
488
|
+
time: string;
|
|
489
|
+
icon: string;
|
|
490
|
+
temperature: string;
|
|
346
491
|
});
|
|
347
|
-
toData(): Record<string, unknown>;
|
|
348
492
|
toProtocol(): Record<string, unknown>;
|
|
349
493
|
}
|
|
350
|
-
export declare class
|
|
494
|
+
export declare class WeatherHourlyStrip extends WidgetBase {
|
|
351
495
|
private readonly options;
|
|
352
|
-
|
|
353
|
-
|
|
496
|
+
readonly type = "weather_hourly_strip";
|
|
497
|
+
constructor(options?: CommonOptions & {
|
|
498
|
+
items?: WeatherHourlyItem[];
|
|
499
|
+
});
|
|
500
|
+
data(): Record<string, unknown>;
|
|
501
|
+
}
|
|
502
|
+
export declare class WorldClockRow {
|
|
503
|
+
readonly options: {
|
|
504
|
+
name: string;
|
|
505
|
+
timezone: string;
|
|
506
|
+
time: string;
|
|
507
|
+
offset: string;
|
|
508
|
+
day_label?: string;
|
|
509
|
+
};
|
|
510
|
+
constructor(options: {
|
|
511
|
+
name: string;
|
|
512
|
+
timezone: string;
|
|
513
|
+
time: string;
|
|
514
|
+
offset: string;
|
|
515
|
+
day_label?: string;
|
|
354
516
|
});
|
|
355
517
|
toProtocol(): Record<string, unknown>;
|
|
356
518
|
}
|
|
357
|
-
export declare class
|
|
519
|
+
export declare class WorldClock extends WidgetBase {
|
|
358
520
|
private readonly options;
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
children?: TreeNode[];
|
|
521
|
+
readonly type = "world_clock";
|
|
522
|
+
constructor(options?: CommonOptions & {
|
|
523
|
+
rows?: WorldClockRow[];
|
|
363
524
|
});
|
|
364
|
-
|
|
365
|
-
static horizontal(children: TreeNode[], spacing?: number, options?: CommonProps): Box;
|
|
366
|
-
toProtocol(): Record<string, unknown>;
|
|
525
|
+
data(): Record<string, unknown>;
|
|
367
526
|
}
|
|
368
|
-
export type TreeNode =
|
|
527
|
+
export type TreeNode = Row | Column | Container | CircleBox | BoxedList | PopoverShell | Label | Header | Hero | Badge | StatusDot | PanelIndicator | EmptyState | Spinner | Meter | Separator | Scroll | Tile | SegmentedTile | ButtonRow | SwitchTile | ExpanderTile | SliderTile | ChoiceTile | ChoiceList | KeyValueGrid | PagerItem | PagerStrip | CameraIndicator | MicIndicator | MutedIndicator | ScreenCastIndicator | LocationIndicator | Calendar | BatteryHero | DateHero | Events | WeatherForecastList | WeatherHourlyStrip | WorldClock;
|
|
369
528
|
export {};
|