@await-widget/runtime 0.0.9 → 0.0.11

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 CHANGED
@@ -1,6 +1,12 @@
1
- # Await Widget Types
1
+ <p align="center"><img width="128" src="https://raw.githubusercontent.com/await-widget/.github/refs/heads/main/assets/app-icon.webp" /></p>
2
2
 
3
- TypeScript declarations for Await widgets.
3
+ <h1 align="center">Await Widget Types</h1>
4
+
5
+ <p align="center">TypeScript declarations for Await widgets.</p>
6
+
7
+ <p align="center"><a href="https://apps.apple.com/app/id6755678187"><img src="https://developer.apple.com/assets/elements/badges/download-on-the-app-store.svg" /></a></p>
8
+
9
+ ## What's Included
4
10
 
5
11
  This package replaces the local `paths` setup used by widget templates. It provides:
6
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@await-widget/runtime",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "TypeScript declarations for Await widgets.",
5
5
  "license": "MIT",
6
6
  "author": "LitoMore",
package/types/await.d.ts CHANGED
@@ -65,6 +65,13 @@ declare module 'await' {
65
65
  children?: never;
66
66
  },
67
67
  ): NativeView;
68
+ export function ProgressView(
69
+ props: ProgressViewValue &
70
+ ID &
71
+ Mods & {
72
+ children?: never;
73
+ },
74
+ ): NativeView;
68
75
  export function Image(
69
76
  props: ImageValue &
70
77
  ID &
package/types/bridge.d.ts CHANGED
@@ -69,7 +69,7 @@ export declare const AwaitMedia: {
69
69
  nowPlayingMedia(config?: AwaitNowPlayingConfig): Promise<AwaitNowPlayingInfo>;
70
70
  mediaPlayerCommand(
71
71
  command: AwaitMusicPlayerCommand,
72
- config?: AwaitMediaPlayConfig,
72
+ config?: AwaitMediaCommandConfig,
73
73
  ): Promise<void>;
74
74
  };
75
75
  export declare const AwaitStore: {
package/types/meta.d.ts CHANGED
@@ -2,6 +2,8 @@ type CornerRadiusStyle = 'circular' | 'continuous';
2
2
 
3
3
  type TimeStyle = 'time' | 'date' | 'relative' | 'offset' | 'timer';
4
4
 
5
+ type ProgressViewStyle = 'automatic' | 'linear' | 'circular';
6
+
5
7
  type Material = 'regular' | 'thin' | 'thick' | 'ultraThin' | 'ultraThick';
6
8
 
7
9
  type ShapeStyle =
package/types/model.d.ts CHANGED
@@ -11,7 +11,6 @@ type WidgetFamily =
11
11
  | 'medium'
12
12
  | 'large'
13
13
  | 'extraLarge'
14
- | 'extraLargePortrait'
15
14
  | 'accessoryInline'
16
15
  | 'accessoryCircular'
17
16
  | 'accessoryRectangular'
@@ -156,6 +155,7 @@ type AwaitNowPlayingInfo = {
156
155
  artistName?: string;
157
156
  albumTitle?: string;
158
157
  duration?: number;
158
+ isFavorite?: boolean;
159
159
  artworkURL?: string;
160
160
  maximumWidth?: number;
161
161
  maximumHeight?: number;
@@ -166,7 +166,12 @@ type AwaitNowPlayingInfo = {
166
166
  quaternaryTextColor?: Color;
167
167
  };
168
168
 
169
- type AwaitMusicPlayerCommand = 'start' | 'toggle' | 'next' | 'previous';
169
+ type AwaitMusicPlayerCommand =
170
+ | 'start'
171
+ | 'toggle'
172
+ | 'next'
173
+ | 'previous'
174
+ | 'favorite';
170
175
 
171
176
  type AwaitMediaPlayConfig =
172
177
  | {
@@ -192,6 +197,12 @@ type AwaitMediaPlayConfig =
192
197
  id?: string;
193
198
  };
194
199
 
200
+ type AwaitMediaFavoriteConfig = {
201
+ rating?: -1 | 0 | 1;
202
+ };
203
+
204
+ type AwaitMediaCommandConfig = AwaitMediaPlayConfig | AwaitMediaFavoriteConfig;
205
+
195
206
  type AwaitCalendarConfig = {
196
207
  start?: Date;
197
208
  end?: Date;
package/types/prop.d.ts CHANGED
@@ -124,6 +124,12 @@ type TimeValue = {
124
124
  style?: TimeStyle;
125
125
  };
126
126
 
127
+ type ProgressViewValue = {
128
+ value: number | [start: Date, end: Date];
129
+ /** Default true. Only applies when value is a date range. */
130
+ countsDown?: boolean;
131
+ };
132
+
127
133
  type SvgValue = {
128
134
  /** For example, `img.png`, `path/img.png`, or `https://example.com/img.png`. */
129
135
  url?: string;
@@ -225,6 +231,7 @@ type BaseMods = {
225
231
  padding?: Padding | boolean;
226
232
  pixelPerfectCenter?: boolean | Point;
227
233
  position?: Point;
234
+ progressViewStyle?: ProgressViewStyle;
228
235
  reverseMask?: NativeView;
229
236
  rotation3DEffect?: Rotation3DEffect;
230
237
  rotationEffect?: RotationEffect;