@await-widget/runtime 0.0.12 → 0.0.13
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 +31 -31
- package/types/bridge.d.ts +6 -6
- package/types/model.d.ts +30 -2
package/package.json
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
2
|
+
"name": "@await-widget/runtime",
|
|
3
|
+
"version": "0.0.13",
|
|
4
|
+
"description": "TypeScript declarations for Await widgets.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "LitoMore",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/await-widget/runtime.git"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"types/*.d.ts"
|
|
17
|
+
],
|
|
18
|
+
"types": "./types/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./types/index.d.ts"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"format:types": "xo --fix types/*.d.ts",
|
|
26
|
+
"test": "tsc --noEmit -p test/tsconfig.json",
|
|
27
|
+
"pack:dry": "npm --cache .npm-cache pack --dry-run"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"typescript": "^6.0.2",
|
|
31
|
+
"xo": "^2.0.2"
|
|
32
|
+
}
|
|
33
33
|
}
|
package/types/bridge.d.ts
CHANGED
|
@@ -65,11 +65,11 @@ export declare const AwaitAlarm: {
|
|
|
65
65
|
schedule(config: AwaitAlarmScheduleConfig): Promise<string>;
|
|
66
66
|
cancel(id: string): any;
|
|
67
67
|
};
|
|
68
|
-
export declare const
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
export declare const AwaitMusic: {
|
|
69
|
+
nowPlaying(config?: AwaitNowPlayingConfig): Promise<AwaitNowPlayingInfo>;
|
|
70
|
+
playerCommand(
|
|
71
71
|
command: AwaitMusicPlayerCommand,
|
|
72
|
-
config?:
|
|
72
|
+
config?: AwaitMusicPlayConfig,
|
|
73
73
|
): Promise<void>;
|
|
74
74
|
};
|
|
75
75
|
export declare const AwaitStore: {
|
|
@@ -167,7 +167,7 @@ type AwaitCalendarGlobal = typeof AwaitCalendar;
|
|
|
167
167
|
type AwaitReminderGlobal = typeof AwaitReminder;
|
|
168
168
|
type AwaitSystemGlobal = typeof AwaitSystem;
|
|
169
169
|
type AwaitAlarmGlobal = typeof AwaitAlarm;
|
|
170
|
-
type
|
|
170
|
+
type AwaitMusicGlobal = typeof AwaitMusic;
|
|
171
171
|
type AwaitStoreGlobal = typeof AwaitStore;
|
|
172
172
|
type AwaitFileGlobal = typeof AwaitFile;
|
|
173
173
|
type AwaitAudioGlobal = typeof AwaitAudio;
|
|
@@ -186,7 +186,7 @@ declare global {
|
|
|
186
186
|
const AwaitReminder: AwaitReminderGlobal;
|
|
187
187
|
const AwaitSystem: AwaitSystemGlobal;
|
|
188
188
|
const AwaitAlarm: AwaitAlarmGlobal;
|
|
189
|
-
const
|
|
189
|
+
const AwaitMusic: AwaitMusicGlobal;
|
|
190
190
|
const AwaitStore: AwaitStoreGlobal;
|
|
191
191
|
const AwaitFile: AwaitFileGlobal;
|
|
192
192
|
const AwaitAudio: AwaitAudioGlobal;
|
package/types/model.d.ts
CHANGED
|
@@ -141,6 +141,26 @@ type AwaitNowPlayingConfig = {
|
|
|
141
141
|
artworkSize?: number;
|
|
142
142
|
};
|
|
143
143
|
|
|
144
|
+
type AwaitMusicSource =
|
|
145
|
+
| {
|
|
146
|
+
type: 'song';
|
|
147
|
+
}
|
|
148
|
+
| {
|
|
149
|
+
type: 'artist';
|
|
150
|
+
id: string;
|
|
151
|
+
name: string;
|
|
152
|
+
}
|
|
153
|
+
| {
|
|
154
|
+
type: 'album';
|
|
155
|
+
id: string;
|
|
156
|
+
name: string;
|
|
157
|
+
}
|
|
158
|
+
| {
|
|
159
|
+
type: 'station';
|
|
160
|
+
id: string;
|
|
161
|
+
name: string;
|
|
162
|
+
};
|
|
163
|
+
|
|
144
164
|
type AwaitNowPlayingInfo = {
|
|
145
165
|
state?:
|
|
146
166
|
| 'playing'
|
|
@@ -149,7 +169,7 @@ type AwaitNowPlayingInfo = {
|
|
|
149
169
|
| 'interrupted'
|
|
150
170
|
| 'seekingForward'
|
|
151
171
|
| 'seekingBackward';
|
|
152
|
-
|
|
172
|
+
source?: AwaitMusicSource;
|
|
153
173
|
id?: string;
|
|
154
174
|
title?: string;
|
|
155
175
|
artistName?: string;
|
|
@@ -175,7 +195,7 @@ type AwaitMusicPlayerCommand =
|
|
|
175
195
|
| 'clearRating'
|
|
176
196
|
| 'dislike';
|
|
177
197
|
|
|
178
|
-
type
|
|
198
|
+
type AwaitMusicPlayConfig =
|
|
179
199
|
| {
|
|
180
200
|
source: 'song';
|
|
181
201
|
id?: string;
|
|
@@ -185,6 +205,14 @@ type AwaitMediaPlayConfig =
|
|
|
185
205
|
loop?: boolean;
|
|
186
206
|
offset?: number;
|
|
187
207
|
}
|
|
208
|
+
| {
|
|
209
|
+
source: 'artist';
|
|
210
|
+
id?: string;
|
|
211
|
+
query?: string;
|
|
212
|
+
limit?: number;
|
|
213
|
+
shuffle?: boolean;
|
|
214
|
+
loop?: boolean;
|
|
215
|
+
}
|
|
188
216
|
| {
|
|
189
217
|
source: 'album';
|
|
190
218
|
id?: string;
|