@await-widget/runtime 0.0.39 → 0.0.41
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/package.json +1 -1
- package/types/bridge.d.ts +7 -0
- package/types/meta.d.ts +7 -1
- package/types/model.d.ts +11 -0
- package/types/prop.d.ts +19 -1
package/package.json
CHANGED
package/types/bridge.d.ts
CHANGED
|
@@ -125,6 +125,7 @@ export declare const AwaitAudio: {
|
|
|
125
125
|
export declare const AwaitUI: {
|
|
126
126
|
readonly displayScale: number;
|
|
127
127
|
haptic(type: string): void;
|
|
128
|
+
goHome(): void;
|
|
128
129
|
};
|
|
129
130
|
type AwaitDefineConfig<T extends Record<string, unknown>, Intents> = {
|
|
130
131
|
widget: (entry: WidgetEntry<T>) => NativeView;
|
|
@@ -158,6 +159,10 @@ export declare const Await: {
|
|
|
158
159
|
config: Config & AwaitDefineConfig<T, Config['widgetIntents']>,
|
|
159
160
|
): AwaitDefineResult<Config['widgetIntents']>;
|
|
160
161
|
};
|
|
162
|
+
export declare const AwaitLive: {
|
|
163
|
+
start(views: LiveViews): Promise<void>;
|
|
164
|
+
end(): Promise<void>;
|
|
165
|
+
};
|
|
161
166
|
export declare const AwaitLaunch: {
|
|
162
167
|
start(bundleId: string): any;
|
|
163
168
|
};
|
|
@@ -172,6 +177,7 @@ export declare const AwaitEnv: {
|
|
|
172
177
|
};
|
|
173
178
|
type AwaitGlobal = typeof Await;
|
|
174
179
|
type AwaitEnvGlobal = typeof AwaitEnv;
|
|
180
|
+
type AwaitLiveGlobal = typeof AwaitLive;
|
|
175
181
|
type AwaitLaunchGlobal = typeof AwaitLaunch;
|
|
176
182
|
type AwaitUIGlobal = typeof AwaitUI;
|
|
177
183
|
type AwaitClipboardGlobal = typeof AwaitClipboard;
|
|
@@ -191,6 +197,7 @@ type SleepGlobal = typeof sleep;
|
|
|
191
197
|
declare global {
|
|
192
198
|
const Await: AwaitGlobal;
|
|
193
199
|
const AwaitEnv: AwaitEnvGlobal;
|
|
200
|
+
const AwaitLive: AwaitLiveGlobal;
|
|
194
201
|
const AwaitLaunch: AwaitLaunchGlobal;
|
|
195
202
|
const AwaitUI: AwaitUIGlobal;
|
|
196
203
|
const AwaitClipboard: AwaitClipboardGlobal;
|
package/types/meta.d.ts
CHANGED
|
@@ -89,7 +89,11 @@ type ContentTransition =
|
|
|
89
89
|
| ['numericText', boolean]
|
|
90
90
|
| ['numericText', number];
|
|
91
91
|
|
|
92
|
-
type
|
|
92
|
+
type VerticalEdge = 'top' | 'bottom';
|
|
93
|
+
|
|
94
|
+
type HorizontalEdge = 'leading' | 'trailing';
|
|
95
|
+
|
|
96
|
+
type Edge = VerticalEdge | HorizontalEdge;
|
|
93
97
|
|
|
94
98
|
type RawTransition =
|
|
95
99
|
| 'identity'
|
|
@@ -349,6 +353,8 @@ type RotationEffect =
|
|
|
349
353
|
|
|
350
354
|
type Frame =
|
|
351
355
|
| {
|
|
356
|
+
minWidth?: Dimension;
|
|
357
|
+
minHeight?: Dimension;
|
|
352
358
|
maxWidth?: Dimension;
|
|
353
359
|
maxHeight?: Dimension;
|
|
354
360
|
alignment?: Alignment;
|
package/types/model.d.ts
CHANGED
|
@@ -408,6 +408,17 @@ type WidgetEntry<T extends Record<string, unknown> = Record<string, unknown>> =
|
|
|
408
408
|
renderingMode: RenderingMode;
|
|
409
409
|
};
|
|
410
410
|
|
|
411
|
+
type LiveViews = {
|
|
412
|
+
lockscreen?: NativeView;
|
|
413
|
+
compactLeading?: NativeView;
|
|
414
|
+
compactTrailing?: NativeView;
|
|
415
|
+
minimal?: NativeView;
|
|
416
|
+
leading?: NativeView;
|
|
417
|
+
trailing?: NativeView;
|
|
418
|
+
center?: NativeView;
|
|
419
|
+
bottom?: NativeView;
|
|
420
|
+
};
|
|
421
|
+
|
|
411
422
|
type TimelineContext = {
|
|
412
423
|
size: Size;
|
|
413
424
|
family: WidgetFamily;
|
package/types/prop.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ type ButtonValue = {
|
|
|
35
35
|
fast?: boolean;
|
|
36
36
|
/** Requests permission to play audio. */
|
|
37
37
|
audio?: boolean;
|
|
38
|
+
/** Runs the intent in the app process so it can start or update a live activity from the background. */
|
|
39
|
+
live?: boolean;
|
|
38
40
|
/** Opens a universal link directly, such as `https://github.com/await-widget/skills`. */
|
|
39
41
|
url?: string;
|
|
40
42
|
};
|
|
@@ -143,12 +145,24 @@ type TimeValue =
|
|
|
143
145
|
format?: DateFormatToken[];
|
|
144
146
|
date?: never;
|
|
145
147
|
style?: never;
|
|
148
|
+
countsDown?: never;
|
|
149
|
+
showsHours?: never;
|
|
146
150
|
}
|
|
147
151
|
| {
|
|
152
|
+
date?: Date;
|
|
153
|
+
style?: TimeStyle;
|
|
148
154
|
timeZone?: never;
|
|
149
155
|
format?: never;
|
|
156
|
+
countsDown?: never;
|
|
157
|
+
showsHours?: never;
|
|
158
|
+
}
|
|
159
|
+
| {
|
|
150
160
|
date?: Date;
|
|
151
|
-
|
|
161
|
+
countsDown?: boolean;
|
|
162
|
+
showsHours?: boolean;
|
|
163
|
+
timeZone?: never;
|
|
164
|
+
format?: never;
|
|
165
|
+
style?: never;
|
|
152
166
|
};
|
|
153
167
|
|
|
154
168
|
type ProgressViewValue = {
|
|
@@ -216,6 +230,7 @@ type BaseMods = {
|
|
|
216
230
|
buttonStyle?: ButtonStyle;
|
|
217
231
|
clipped?: boolean;
|
|
218
232
|
clipShape?: NativeView | '';
|
|
233
|
+
/** This modifier is currently available, but future availability is uncertain. */
|
|
219
234
|
clockEffect?: number | 'second' | 'minute' | 'hour';
|
|
220
235
|
colorInvert?: boolean;
|
|
221
236
|
colorMultiply?: Color;
|
|
@@ -272,6 +287,9 @@ type BaseMods = {
|
|
|
272
287
|
reverseMask?: NativeView;
|
|
273
288
|
rotation3DEffect?: Rotation3DEffect;
|
|
274
289
|
rotationEffect?: RotationEffect;
|
|
290
|
+
safeAreaInset?:
|
|
291
|
+
| {edge: HorizontalEdge; alignment: VerticalAlignment; content: NativeView}
|
|
292
|
+
| {edge: VerticalEdge; alignment: HorizontalAlignment; content: NativeView};
|
|
275
293
|
saturation?: number;
|
|
276
294
|
scaleEffect?: ScaleEffect;
|
|
277
295
|
shadow?: Shadow;
|