@await-widget/runtime 0.0.8 → 0.0.10

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.8",
3
+ "version": "0.0.10",
4
4
  "description": "TypeScript declarations for Await widgets.",
5
5
  "license": "MIT",
6
6
  "author": "LitoMore",
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/model.d.ts CHANGED
@@ -155,6 +155,8 @@ type AwaitNowPlayingInfo = {
155
155
  title?: string;
156
156
  artistName?: string;
157
157
  albumTitle?: string;
158
+ duration?: number;
159
+ isFavorite?: boolean;
158
160
  artworkURL?: string;
159
161
  maximumWidth?: number;
160
162
  maximumHeight?: number;
@@ -165,7 +167,12 @@ type AwaitNowPlayingInfo = {
165
167
  quaternaryTextColor?: Color;
166
168
  };
167
169
 
168
- type AwaitMusicPlayerCommand = 'start' | 'toggle' | 'next' | 'previous';
170
+ type AwaitMusicPlayerCommand =
171
+ | 'start'
172
+ | 'toggle'
173
+ | 'next'
174
+ | 'previous'
175
+ | 'favorite';
169
176
 
170
177
  type AwaitMediaPlayConfig =
171
178
  | {
@@ -191,6 +198,12 @@ type AwaitMediaPlayConfig =
191
198
  id?: string;
192
199
  };
193
200
 
201
+ type AwaitMediaFavoriteConfig = {
202
+ rating?: -1 | 0 | 1;
203
+ };
204
+
205
+ type AwaitMediaCommandConfig = AwaitMediaPlayConfig | AwaitMediaFavoriteConfig;
206
+
194
207
  type AwaitCalendarConfig = {
195
208
  start?: Date;
196
209
  end?: Date;