@workadventure/iframe-api-typings 1.24.9 → 1.24.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/package.json +1 -1
- package/play/src/front/Api/Events/IframeEvent.d.ts +88 -85
- package/play/src/front/Api/Events/ModalEvent.d.ts +0 -3
- package/play/src/front/Api/Events/ProximityMeeting/AppendPCMDataEvent.d.ts +1 -3
- package/play/src/front/Api/Events/Ui/ButtonActionBarEvent.d.ts +54 -22
- package/play/src/front/Api/Iframe/Ui/ButtonActionBar.d.ts +28 -4
- package/play/src/front/Api/Iframe/Ui/Modal.d.ts +0 -1
- package/play/src/front/Api/Iframe/ui.d.ts +0 -6
- package/play/src/front/Api/Events/Ui/PlayVideoEvent.d.ts +0 -67
- package/play/src/front/Api/Iframe/Ui/Video.d.ts +0 -5
package/package.json
CHANGED
|
@@ -1164,21 +1164,18 @@ export declare const isIframeEventWrapper: z.ZodUnion<[z.ZodObject<{
|
|
|
1164
1164
|
title: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1165
1165
|
position: z.ZodDefault<z.ZodOptional<z.ZodEnum<["right", "left", "center"]>>>;
|
|
1166
1166
|
allowApi: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1167
|
-
allowFullScreen: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1168
1167
|
}, "strip", z.ZodTypeAny, {
|
|
1169
1168
|
title: string;
|
|
1170
1169
|
allowApi: boolean;
|
|
1171
1170
|
position: "left" | "right" | "center";
|
|
1172
1171
|
allow: string | null;
|
|
1173
1172
|
src: string;
|
|
1174
|
-
allowFullScreen: boolean;
|
|
1175
1173
|
}, {
|
|
1176
1174
|
src: string;
|
|
1177
1175
|
title?: string | undefined;
|
|
1178
1176
|
allowApi?: boolean | undefined;
|
|
1179
1177
|
position?: "left" | "right" | "center" | undefined;
|
|
1180
1178
|
allow?: string | null | undefined;
|
|
1181
|
-
allowFullScreen?: boolean | undefined;
|
|
1182
1179
|
}>;
|
|
1183
1180
|
}, "strip", z.ZodTypeAny, {
|
|
1184
1181
|
type: "openModal";
|
|
@@ -1188,7 +1185,6 @@ export declare const isIframeEventWrapper: z.ZodUnion<[z.ZodObject<{
|
|
|
1188
1185
|
position: "left" | "right" | "center";
|
|
1189
1186
|
allow: string | null;
|
|
1190
1187
|
src: string;
|
|
1191
|
-
allowFullScreen: boolean;
|
|
1192
1188
|
};
|
|
1193
1189
|
}, {
|
|
1194
1190
|
type: "openModal";
|
|
@@ -1198,7 +1194,6 @@ export declare const isIframeEventWrapper: z.ZodUnion<[z.ZodObject<{
|
|
|
1198
1194
|
allowApi?: boolean | undefined;
|
|
1199
1195
|
position?: "left" | "right" | "center" | undefined;
|
|
1200
1196
|
allow?: string | null | undefined;
|
|
1201
|
-
allowFullScreen?: boolean | undefined;
|
|
1202
1197
|
};
|
|
1203
1198
|
}>, z.ZodObject<{
|
|
1204
1199
|
type: z.ZodLiteral<"closeModal">;
|
|
@@ -1220,52 +1215,57 @@ export declare const isIframeEventWrapper: z.ZodUnion<[z.ZodObject<{
|
|
|
1220
1215
|
data?: undefined;
|
|
1221
1216
|
}>, z.ZodObject<{
|
|
1222
1217
|
type: z.ZodLiteral<"addButtonActionBar">;
|
|
1223
|
-
data: z.ZodObject<{
|
|
1218
|
+
data: z.ZodUnion<[z.ZodObject<{
|
|
1224
1219
|
id: z.ZodString;
|
|
1225
|
-
label: z.
|
|
1226
|
-
|
|
1227
|
-
bgColor: z.ZodOptional<z.ZodString>;
|
|
1228
|
-
textColor: z.ZodOptional<z.ZodString>;
|
|
1229
|
-
imageSrc: z.ZodOptional<z.ZodString>;
|
|
1230
|
-
isGradient: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1220
|
+
label: z.ZodString;
|
|
1221
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["button"]>>>;
|
|
1231
1222
|
}, "strip", z.ZodTypeAny, {
|
|
1223
|
+
type: "button";
|
|
1224
|
+
label: string;
|
|
1232
1225
|
id: string;
|
|
1233
|
-
isGradient: boolean;
|
|
1234
|
-
label?: string | undefined;
|
|
1235
|
-
toolTip?: string | undefined;
|
|
1236
|
-
bgColor?: string | undefined;
|
|
1237
|
-
textColor?: string | undefined;
|
|
1238
|
-
imageSrc?: string | undefined;
|
|
1239
1226
|
}, {
|
|
1227
|
+
label: string;
|
|
1240
1228
|
id: string;
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
imageSrc
|
|
1246
|
-
|
|
1247
|
-
}
|
|
1229
|
+
type?: "button" | undefined;
|
|
1230
|
+
}>, z.ZodObject<{
|
|
1231
|
+
id: z.ZodString;
|
|
1232
|
+
type: z.ZodEnum<["action"]>;
|
|
1233
|
+
imageSrc: z.ZodString;
|
|
1234
|
+
toolTip: z.ZodString;
|
|
1235
|
+
}, "strip", z.ZodTypeAny, {
|
|
1236
|
+
type: "action";
|
|
1237
|
+
id: string;
|
|
1238
|
+
imageSrc: string;
|
|
1239
|
+
toolTip: string;
|
|
1240
|
+
}, {
|
|
1241
|
+
type: "action";
|
|
1242
|
+
id: string;
|
|
1243
|
+
imageSrc: string;
|
|
1244
|
+
toolTip: string;
|
|
1245
|
+
}>]>;
|
|
1248
1246
|
}, "strip", z.ZodTypeAny, {
|
|
1249
1247
|
type: "addButtonActionBar";
|
|
1250
1248
|
data: {
|
|
1249
|
+
type: "button";
|
|
1250
|
+
label: string;
|
|
1251
1251
|
id: string;
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
imageSrc?: string | undefined;
|
|
1252
|
+
} | {
|
|
1253
|
+
type: "action";
|
|
1254
|
+
id: string;
|
|
1255
|
+
imageSrc: string;
|
|
1256
|
+
toolTip: string;
|
|
1258
1257
|
};
|
|
1259
1258
|
}, {
|
|
1260
1259
|
type: "addButtonActionBar";
|
|
1261
1260
|
data: {
|
|
1261
|
+
label: string;
|
|
1262
1262
|
id: string;
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
imageSrc
|
|
1268
|
-
|
|
1263
|
+
type?: "button" | undefined;
|
|
1264
|
+
} | {
|
|
1265
|
+
type: "action";
|
|
1266
|
+
id: string;
|
|
1267
|
+
imageSrc: string;
|
|
1268
|
+
toolTip: string;
|
|
1269
1269
|
};
|
|
1270
1270
|
}>, z.ZodObject<{
|
|
1271
1271
|
type: z.ZodLiteral<"removeButtonActionBar">;
|
|
@@ -3202,14 +3202,59 @@ export declare const isIframeResponseEvent: z.ZodUnion<[z.ZodObject<{
|
|
|
3202
3202
|
}[];
|
|
3203
3203
|
};
|
|
3204
3204
|
}>, z.ZodObject<{
|
|
3205
|
-
type: z.ZodLiteral<"
|
|
3206
|
-
data: z.
|
|
3205
|
+
type: z.ZodLiteral<"buttonActionBarTrigger">;
|
|
3206
|
+
data: z.ZodUnion<[z.ZodObject<{
|
|
3207
|
+
id: z.ZodString;
|
|
3208
|
+
label: z.ZodString;
|
|
3209
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["button"]>>>;
|
|
3210
|
+
}, "strip", z.ZodTypeAny, {
|
|
3211
|
+
type: "button";
|
|
3212
|
+
label: string;
|
|
3213
|
+
id: string;
|
|
3214
|
+
}, {
|
|
3215
|
+
label: string;
|
|
3216
|
+
id: string;
|
|
3217
|
+
type?: "button" | undefined;
|
|
3218
|
+
}>, z.ZodObject<{
|
|
3219
|
+
id: z.ZodString;
|
|
3220
|
+
type: z.ZodEnum<["action"]>;
|
|
3221
|
+
imageSrc: z.ZodString;
|
|
3222
|
+
toolTip: z.ZodString;
|
|
3223
|
+
}, "strip", z.ZodTypeAny, {
|
|
3224
|
+
type: "action";
|
|
3225
|
+
id: string;
|
|
3226
|
+
imageSrc: string;
|
|
3227
|
+
toolTip: string;
|
|
3228
|
+
}, {
|
|
3229
|
+
type: "action";
|
|
3230
|
+
id: string;
|
|
3231
|
+
imageSrc: string;
|
|
3232
|
+
toolTip: string;
|
|
3233
|
+
}>]>;
|
|
3207
3234
|
}, "strip", z.ZodTypeAny, {
|
|
3208
|
-
type: "
|
|
3209
|
-
data:
|
|
3235
|
+
type: "buttonActionBarTrigger";
|
|
3236
|
+
data: {
|
|
3237
|
+
type: "button";
|
|
3238
|
+
label: string;
|
|
3239
|
+
id: string;
|
|
3240
|
+
} | {
|
|
3241
|
+
type: "action";
|
|
3242
|
+
id: string;
|
|
3243
|
+
imageSrc: string;
|
|
3244
|
+
toolTip: string;
|
|
3245
|
+
};
|
|
3210
3246
|
}, {
|
|
3211
|
-
type: "
|
|
3212
|
-
data:
|
|
3247
|
+
type: "buttonActionBarTrigger";
|
|
3248
|
+
data: {
|
|
3249
|
+
label: string;
|
|
3250
|
+
id: string;
|
|
3251
|
+
type?: "button" | undefined;
|
|
3252
|
+
} | {
|
|
3253
|
+
type: "action";
|
|
3254
|
+
id: string;
|
|
3255
|
+
imageSrc: string;
|
|
3256
|
+
toolTip: string;
|
|
3257
|
+
};
|
|
3213
3258
|
}>, z.ZodObject<{
|
|
3214
3259
|
type: z.ZodLiteral<"modalCloseTrigger">;
|
|
3215
3260
|
data: z.ZodObject<{
|
|
@@ -3218,21 +3263,18 @@ export declare const isIframeResponseEvent: z.ZodUnion<[z.ZodObject<{
|
|
|
3218
3263
|
title: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
3219
3264
|
position: z.ZodDefault<z.ZodOptional<z.ZodEnum<["right", "left", "center"]>>>;
|
|
3220
3265
|
allowApi: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
3221
|
-
allowFullScreen: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
3222
3266
|
}, "strip", z.ZodTypeAny, {
|
|
3223
3267
|
title: string;
|
|
3224
3268
|
allowApi: boolean;
|
|
3225
3269
|
position: "left" | "right" | "center";
|
|
3226
3270
|
allow: string | null;
|
|
3227
3271
|
src: string;
|
|
3228
|
-
allowFullScreen: boolean;
|
|
3229
3272
|
}, {
|
|
3230
3273
|
src: string;
|
|
3231
3274
|
title?: string | undefined;
|
|
3232
3275
|
allowApi?: boolean | undefined;
|
|
3233
3276
|
position?: "left" | "right" | "center" | undefined;
|
|
3234
3277
|
allow?: string | null | undefined;
|
|
3235
|
-
allowFullScreen?: boolean | undefined;
|
|
3236
3278
|
}>;
|
|
3237
3279
|
}, "strip", z.ZodTypeAny, {
|
|
3238
3280
|
type: "modalCloseTrigger";
|
|
@@ -3242,7 +3284,6 @@ export declare const isIframeResponseEvent: z.ZodUnion<[z.ZodObject<{
|
|
|
3242
3284
|
position: "left" | "right" | "center";
|
|
3243
3285
|
allow: string | null;
|
|
3244
3286
|
src: string;
|
|
3245
|
-
allowFullScreen: boolean;
|
|
3246
3287
|
};
|
|
3247
3288
|
}, {
|
|
3248
3289
|
type: "modalCloseTrigger";
|
|
@@ -3252,7 +3293,6 @@ export declare const isIframeResponseEvent: z.ZodUnion<[z.ZodObject<{
|
|
|
3252
3293
|
allowApi?: boolean | undefined;
|
|
3253
3294
|
position?: "left" | "right" | "center" | undefined;
|
|
3254
3295
|
allow?: string | null | undefined;
|
|
3255
|
-
allowFullScreen?: boolean | undefined;
|
|
3256
3296
|
};
|
|
3257
3297
|
}>, z.ZodObject<{
|
|
3258
3298
|
type: z.ZodLiteral<"banUser">;
|
|
@@ -4267,43 +4307,6 @@ export declare const iframeQueryMapTypeGuards: {
|
|
|
4267
4307
|
data?: unknown;
|
|
4268
4308
|
}>;
|
|
4269
4309
|
};
|
|
4270
|
-
playVideo: {
|
|
4271
|
-
query: z.ZodObject<{
|
|
4272
|
-
url: z.ZodString;
|
|
4273
|
-
config: z.ZodOptional<z.ZodObject<{
|
|
4274
|
-
loop: z.ZodOptional<z.ZodBoolean>;
|
|
4275
|
-
name: z.ZodOptional<z.ZodString>;
|
|
4276
|
-
avatar: z.ZodOptional<z.ZodString>;
|
|
4277
|
-
}, "strip", z.ZodTypeAny, {
|
|
4278
|
-
name?: string | undefined;
|
|
4279
|
-
loop?: boolean | undefined;
|
|
4280
|
-
avatar?: string | undefined;
|
|
4281
|
-
}, {
|
|
4282
|
-
name?: string | undefined;
|
|
4283
|
-
loop?: boolean | undefined;
|
|
4284
|
-
avatar?: string | undefined;
|
|
4285
|
-
}>>;
|
|
4286
|
-
}, "strip", z.ZodTypeAny, {
|
|
4287
|
-
url: string;
|
|
4288
|
-
config?: {
|
|
4289
|
-
name?: string | undefined;
|
|
4290
|
-
loop?: boolean | undefined;
|
|
4291
|
-
avatar?: string | undefined;
|
|
4292
|
-
} | undefined;
|
|
4293
|
-
}, {
|
|
4294
|
-
url: string;
|
|
4295
|
-
config?: {
|
|
4296
|
-
name?: string | undefined;
|
|
4297
|
-
loop?: boolean | undefined;
|
|
4298
|
-
avatar?: string | undefined;
|
|
4299
|
-
} | undefined;
|
|
4300
|
-
}>;
|
|
4301
|
-
answer: z.ZodString;
|
|
4302
|
-
};
|
|
4303
|
-
stopVideo: {
|
|
4304
|
-
query: z.ZodString;
|
|
4305
|
-
answer: z.ZodUndefined;
|
|
4306
|
-
};
|
|
4307
4310
|
};
|
|
4308
4311
|
type IframeQueryMapTypeGuardsType = typeof iframeQueryMapTypeGuards;
|
|
4309
4312
|
type UnknownToVoid<T> = undefined extends T ? void : T;
|
|
@@ -5,21 +5,18 @@ export declare const isModalEvent: z.ZodObject<{
|
|
|
5
5
|
title: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
6
6
|
position: z.ZodDefault<z.ZodOptional<z.ZodEnum<["right", "left", "center"]>>>;
|
|
7
7
|
allowApi: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
8
|
-
allowFullScreen: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
9
8
|
}, "strip", z.ZodTypeAny, {
|
|
10
9
|
title: string;
|
|
11
10
|
allowApi: boolean;
|
|
12
11
|
position: "left" | "right" | "center";
|
|
13
12
|
allow: string | null;
|
|
14
13
|
src: string;
|
|
15
|
-
allowFullScreen: boolean;
|
|
16
14
|
}, {
|
|
17
15
|
src: string;
|
|
18
16
|
title?: string | undefined;
|
|
19
17
|
allowApi?: boolean | undefined;
|
|
20
18
|
position?: "left" | "right" | "center" | undefined;
|
|
21
19
|
allow?: string | null | undefined;
|
|
22
|
-
allowFullScreen?: boolean | undefined;
|
|
23
20
|
}>;
|
|
24
21
|
/**
|
|
25
22
|
* A message sent from the iFrame to the game to emit a notification.
|
|
@@ -9,6 +9,4 @@ export declare const isAppendPCMDataEvent: z.ZodObject<{
|
|
|
9
9
|
/**
|
|
10
10
|
* Appends PCM data to the stream played to all players in the current bubble.
|
|
11
11
|
*/
|
|
12
|
-
export type AppendPCMDataEvent =
|
|
13
|
-
data: Float32Array<ArrayBufferLike>;
|
|
14
|
-
};
|
|
12
|
+
export type AppendPCMDataEvent = z.infer<typeof isAppendPCMDataEvent>;
|
|
@@ -1,32 +1,64 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const isAddClassicButtonActionBarEvent: z.ZodObject<{
|
|
3
3
|
id: z.ZodString;
|
|
4
|
-
label: z.
|
|
5
|
-
|
|
6
|
-
bgColor: z.ZodOptional<z.ZodString>;
|
|
7
|
-
textColor: z.ZodOptional<z.ZodString>;
|
|
8
|
-
imageSrc: z.ZodOptional<z.ZodString>;
|
|
9
|
-
isGradient: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
4
|
+
label: z.ZodString;
|
|
5
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["button"]>>>;
|
|
10
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
type: "button";
|
|
8
|
+
label: string;
|
|
11
9
|
id: string;
|
|
12
|
-
isGradient: boolean;
|
|
13
|
-
label?: string | undefined;
|
|
14
|
-
toolTip?: string | undefined;
|
|
15
|
-
bgColor?: string | undefined;
|
|
16
|
-
textColor?: string | undefined;
|
|
17
|
-
imageSrc?: string | undefined;
|
|
18
10
|
}, {
|
|
11
|
+
label: string;
|
|
19
12
|
id: string;
|
|
20
|
-
|
|
21
|
-
toolTip?: string | undefined;
|
|
22
|
-
bgColor?: string | undefined;
|
|
23
|
-
textColor?: string | undefined;
|
|
24
|
-
imageSrc?: string | undefined;
|
|
25
|
-
isGradient?: boolean | undefined;
|
|
13
|
+
type?: "button" | undefined;
|
|
26
14
|
}>;
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
15
|
+
export declare const isAddActionButtonActionBarEvent: z.ZodObject<{
|
|
16
|
+
id: z.ZodString;
|
|
17
|
+
type: z.ZodEnum<["action"]>;
|
|
18
|
+
imageSrc: z.ZodString;
|
|
19
|
+
toolTip: z.ZodString;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
type: "action";
|
|
22
|
+
id: string;
|
|
23
|
+
imageSrc: string;
|
|
24
|
+
toolTip: string;
|
|
25
|
+
}, {
|
|
26
|
+
type: "action";
|
|
27
|
+
id: string;
|
|
28
|
+
imageSrc: string;
|
|
29
|
+
toolTip: string;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const isAddButtonActionBarEvent: z.ZodUnion<[z.ZodObject<{
|
|
32
|
+
id: z.ZodString;
|
|
33
|
+
label: z.ZodString;
|
|
34
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["button"]>>>;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
type: "button";
|
|
37
|
+
label: string;
|
|
38
|
+
id: string;
|
|
39
|
+
}, {
|
|
40
|
+
label: string;
|
|
41
|
+
id: string;
|
|
42
|
+
type?: "button" | undefined;
|
|
43
|
+
}>, z.ZodObject<{
|
|
44
|
+
id: z.ZodString;
|
|
45
|
+
type: z.ZodEnum<["action"]>;
|
|
46
|
+
imageSrc: z.ZodString;
|
|
47
|
+
toolTip: z.ZodString;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
type: "action";
|
|
50
|
+
id: string;
|
|
51
|
+
imageSrc: string;
|
|
52
|
+
toolTip: string;
|
|
53
|
+
}, {
|
|
54
|
+
type: "action";
|
|
55
|
+
id: string;
|
|
56
|
+
imageSrc: string;
|
|
57
|
+
toolTip: string;
|
|
58
|
+
}>]>;
|
|
59
|
+
export type AddButtonActionBarEvent = z.infer<typeof isAddButtonActionBarEvent>;
|
|
60
|
+
export type AddActionButtonActionBarEvent = z.infer<typeof isAddActionButtonActionBarEvent>;
|
|
61
|
+
export type AddClassicButtonActionBarEvent = z.infer<typeof isAddClassicButtonActionBarEvent>;
|
|
30
62
|
export type AddActionsButtonActionBarEventCallback = (event: AddButtonActionBarEvent) => void;
|
|
31
63
|
export declare const isRemoveButtonActionBarEvent: z.ZodObject<{
|
|
32
64
|
id: z.ZodString;
|
|
@@ -1,20 +1,44 @@
|
|
|
1
1
|
import { AddButtonActionBarEvent } from "../../Events/Ui/ButtonActionBarEvent";
|
|
2
2
|
import { IframeApiContribution } from "../IframeApiContribution";
|
|
3
3
|
export type ButtonActionBarClickedCallback = (buttonActionBar: AddButtonActionBarEvent) => void;
|
|
4
|
-
|
|
4
|
+
declare const ActionBarButtonType: {
|
|
5
|
+
readonly button: "button";
|
|
6
|
+
readonly action: "action";
|
|
7
|
+
};
|
|
8
|
+
type ActionBarButtonType = (typeof ActionBarButtonType)[keyof typeof ActionBarButtonType];
|
|
9
|
+
export type ActionBarClassicButtonDescriptor = {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
type?: ActionBarButtonType;
|
|
13
|
+
callback?: ButtonActionBarClickedCallback;
|
|
14
|
+
};
|
|
15
|
+
export type ActionBarActionButtonDescriptor = {
|
|
16
|
+
id: string;
|
|
17
|
+
type: ActionBarButtonType;
|
|
18
|
+
imageSrc: string;
|
|
19
|
+
toolTip: string;
|
|
5
20
|
callback?: ButtonActionBarClickedCallback;
|
|
6
21
|
};
|
|
7
22
|
export declare class WorkAdventureButtonActionBarCommands extends IframeApiContribution<WorkAdventureButtonActionBarCommands> {
|
|
8
23
|
private _callbacks;
|
|
9
24
|
callbacks: {
|
|
10
|
-
type: "
|
|
11
|
-
callback: (event:
|
|
25
|
+
type: "buttonActionBarTrigger";
|
|
26
|
+
callback: (event: {
|
|
27
|
+
type: "button";
|
|
28
|
+
label: string;
|
|
29
|
+
id: string;
|
|
30
|
+
} | {
|
|
31
|
+
type: "action";
|
|
32
|
+
id: string;
|
|
33
|
+
imageSrc: string;
|
|
34
|
+
toolTip: string;
|
|
35
|
+
}) => void;
|
|
12
36
|
}[];
|
|
13
37
|
/**
|
|
14
38
|
* Add action bar button
|
|
15
39
|
* {@link http://workadventure.localhost/map-building/api-ui.md#add-action-bar | Website documentation}
|
|
16
40
|
*/
|
|
17
|
-
addButton(descriptor:
|
|
41
|
+
addButton(descriptor: ActionBarClassicButtonDescriptor | ActionBarActionButtonDescriptor): void;
|
|
18
42
|
/**
|
|
19
43
|
* Remove action bar button
|
|
20
44
|
* {@link http://workadventure.localhost/map-building/api-ui.md#remove-action-bar | Website documentation}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Observable } from "rxjs";
|
|
2
2
|
import { Subject } from "rxjs";
|
|
3
3
|
import type { RequireOnlyOne } from "../types";
|
|
4
|
-
import { VideoConfig } from "../Events/Ui/PlayVideoEvent";
|
|
5
4
|
import { IframeApiContribution } from "./IframeApiContribution";
|
|
6
5
|
import type { ButtonDescriptor } from "./Ui/ButtonDescriptor";
|
|
7
6
|
import { Popup } from "./Ui/Popup";
|
|
@@ -13,7 +12,6 @@ import { RemotePlayer } from "./Players/RemotePlayer";
|
|
|
13
12
|
import type { WorkadventureModalCommands } from "./Ui/Modal";
|
|
14
13
|
import { WorkAdventureButtonActionBarCommands } from "./Ui/ButtonActionBar";
|
|
15
14
|
import { WorkadventureBannerCommands } from "./Ui/Banner";
|
|
16
|
-
import { Video } from "./Ui/Video";
|
|
17
15
|
interface MenuDescriptor {
|
|
18
16
|
callback?: (commandDescriptor: string) => void;
|
|
19
17
|
iframe?: string;
|
|
@@ -146,10 +144,6 @@ export declare class WorkAdventureUiCommands extends IframeApiContribution<WorkA
|
|
|
146
144
|
get modal(): WorkadventureModalCommands;
|
|
147
145
|
get actionBar(): WorkAdventureButtonActionBarCommands;
|
|
148
146
|
get banner(): WorkadventureBannerCommands;
|
|
149
|
-
/**
|
|
150
|
-
* Plays a video as if the video was a player talking to us.
|
|
151
|
-
*/
|
|
152
|
-
playVideo(videoUrl: string, config?: VideoConfig): Promise<Video>;
|
|
153
147
|
}
|
|
154
148
|
declare const _default: WorkAdventureUiCommands;
|
|
155
149
|
export default _default;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const isVideoConfig: z.ZodObject<{
|
|
3
|
-
/**
|
|
4
|
-
* Whether the video should loop.
|
|
5
|
-
*/
|
|
6
|
-
loop: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
-
/**
|
|
8
|
-
* The name displayed at the bottom left of the video.
|
|
9
|
-
*/
|
|
10
|
-
name: z.ZodOptional<z.ZodString>;
|
|
11
|
-
/**
|
|
12
|
-
* A link to the avatar of the speaker, displayed at the bottom left of the video.
|
|
13
|
-
*/
|
|
14
|
-
avatar: z.ZodOptional<z.ZodString>;
|
|
15
|
-
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
name?: string | undefined;
|
|
17
|
-
loop?: boolean | undefined;
|
|
18
|
-
avatar?: string | undefined;
|
|
19
|
-
}, {
|
|
20
|
-
name?: string | undefined;
|
|
21
|
-
loop?: boolean | undefined;
|
|
22
|
-
avatar?: string | undefined;
|
|
23
|
-
}>;
|
|
24
|
-
export declare const isPlayVideoEvent: z.ZodObject<{
|
|
25
|
-
url: z.ZodString;
|
|
26
|
-
config: z.ZodOptional<z.ZodObject<{
|
|
27
|
-
/**
|
|
28
|
-
* Whether the video should loop.
|
|
29
|
-
*/
|
|
30
|
-
loop: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
-
/**
|
|
32
|
-
* The name displayed at the bottom left of the video.
|
|
33
|
-
*/
|
|
34
|
-
name: z.ZodOptional<z.ZodString>;
|
|
35
|
-
/**
|
|
36
|
-
* A link to the avatar of the speaker, displayed at the bottom left of the video.
|
|
37
|
-
*/
|
|
38
|
-
avatar: z.ZodOptional<z.ZodString>;
|
|
39
|
-
}, "strip", z.ZodTypeAny, {
|
|
40
|
-
name?: string | undefined;
|
|
41
|
-
loop?: boolean | undefined;
|
|
42
|
-
avatar?: string | undefined;
|
|
43
|
-
}, {
|
|
44
|
-
name?: string | undefined;
|
|
45
|
-
loop?: boolean | undefined;
|
|
46
|
-
avatar?: string | undefined;
|
|
47
|
-
}>>;
|
|
48
|
-
}, "strip", z.ZodTypeAny, {
|
|
49
|
-
url: string;
|
|
50
|
-
config?: {
|
|
51
|
-
name?: string | undefined;
|
|
52
|
-
loop?: boolean | undefined;
|
|
53
|
-
avatar?: string | undefined;
|
|
54
|
-
} | undefined;
|
|
55
|
-
}, {
|
|
56
|
-
url: string;
|
|
57
|
-
config?: {
|
|
58
|
-
name?: string | undefined;
|
|
59
|
-
loop?: boolean | undefined;
|
|
60
|
-
avatar?: string | undefined;
|
|
61
|
-
} | undefined;
|
|
62
|
-
}>;
|
|
63
|
-
/**
|
|
64
|
-
* A message sent from the iFrame to the game to add a message in the chat.
|
|
65
|
-
*/
|
|
66
|
-
export type PlayVideoEvent = z.infer<typeof isPlayVideoEvent>;
|
|
67
|
-
export type VideoConfig = z.infer<typeof isVideoConfig>;
|