@await-widget/runtime 0.0.38 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@await-widget/runtime",
3
- "version": "0.0.38",
3
+ "version": "0.0.40",
4
4
  "description": "TypeScript declarations for Await widgets.",
5
5
  "license": "MIT",
6
6
  "author": "Maundy",
package/types/await.d.ts CHANGED
@@ -30,6 +30,13 @@ declare module 'await' {
30
30
  children?: NativeView;
31
31
  },
32
32
  ): NativeView;
33
+ export function Flow(
34
+ props: FlowValue &
35
+ ID &
36
+ Mods & {
37
+ children?: NativeView;
38
+ },
39
+ ): NativeView;
33
40
  export function ZStack(
34
41
  props: ZStackValue &
35
42
  ID &
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 Edge = 'top' | 'bottom' | 'leading' | 'trailing';
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
@@ -14,6 +14,15 @@ type HStackValue = {
14
14
  alignment?: VerticalAlignment;
15
15
  };
16
16
 
17
+ type FlowValue = {
18
+ /** Default 0. */
19
+ spacing?: number;
20
+ /** Default 0. */
21
+ rowSpacing?: number;
22
+ /** Vertical alignment for items within each row. */
23
+ alignment?: VerticalAlignment;
24
+ };
25
+
17
26
  type ZStackValue = {
18
27
  /** Horizontal and vertical alignment for child views. */
19
28
  alignment?: Alignment;
@@ -26,6 +35,8 @@ type ButtonValue = {
26
35
  fast?: boolean;
27
36
  /** Requests permission to play audio. */
28
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;
29
40
  /** Opens a universal link directly, such as `https://github.com/await-widget/skills`. */
30
41
  url?: string;
31
42
  };
@@ -207,6 +218,7 @@ type BaseMods = {
207
218
  buttonStyle?: ButtonStyle;
208
219
  clipped?: boolean;
209
220
  clipShape?: NativeView | '';
221
+ /** This modifier is currently available, but future availability is uncertain. */
210
222
  clockEffect?: number | 'second' | 'minute' | 'hour';
211
223
  colorInvert?: boolean;
212
224
  colorMultiply?: Color;
@@ -263,6 +275,9 @@ type BaseMods = {
263
275
  reverseMask?: NativeView;
264
276
  rotation3DEffect?: Rotation3DEffect;
265
277
  rotationEffect?: RotationEffect;
278
+ safeAreaInset?:
279
+ | {edge: HorizontalEdge; alignment: VerticalAlignment; content: NativeView}
280
+ | {edge: VerticalEdge; alignment: HorizontalAlignment; content: NativeView};
266
281
  saturation?: number;
267
282
  scaleEffect?: ScaleEffect;
268
283
  shadow?: Shadow;