@await-widget/runtime 0.0.39 → 0.0.40
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 +6 -0
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
|
};
|
|
@@ -216,6 +218,7 @@ type BaseMods = {
|
|
|
216
218
|
buttonStyle?: ButtonStyle;
|
|
217
219
|
clipped?: boolean;
|
|
218
220
|
clipShape?: NativeView | '';
|
|
221
|
+
/** This modifier is currently available, but future availability is uncertain. */
|
|
219
222
|
clockEffect?: number | 'second' | 'minute' | 'hour';
|
|
220
223
|
colorInvert?: boolean;
|
|
221
224
|
colorMultiply?: Color;
|
|
@@ -272,6 +275,9 @@ type BaseMods = {
|
|
|
272
275
|
reverseMask?: NativeView;
|
|
273
276
|
rotation3DEffect?: Rotation3DEffect;
|
|
274
277
|
rotationEffect?: RotationEffect;
|
|
278
|
+
safeAreaInset?:
|
|
279
|
+
| {edge: HorizontalEdge; alignment: VerticalAlignment; content: NativeView}
|
|
280
|
+
| {edge: VerticalEdge; alignment: HorizontalAlignment; content: NativeView};
|
|
275
281
|
saturation?: number;
|
|
276
282
|
scaleEffect?: ScaleEffect;
|
|
277
283
|
shadow?: Shadow;
|