@workadventure/iframe-api-typings 1.26.16 → 1.27.2
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 +5 -2
- package/play/src/front/Api/Events/IframeEvent.d.ts +5 -0
- package/play/src/front/Api/Events/MessagePortEvents.d.ts +3 -0
- package/play/src/front/Api/Events/Ui/ButtonActionBarEvent.d.ts +3 -0
- package/play/src/front/Api/Iframe/IframeApiContribution.d.ts +6 -2
- package/play/src/front/Api/Iframe/Player/AudioStream.d.ts +5 -0
- package/play/src/front/Api/Iframe/spaces.d.ts +3 -2
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workadventure/iframe-api-typings",
|
|
3
|
-
"version": "v1.
|
|
3
|
+
"version": "v1.27.2",
|
|
4
4
|
"description": "Typescript typings for WorkAdventure iFrame API",
|
|
5
5
|
"main": "iframe_api.js",
|
|
6
6
|
"types": "iframe_api.d.ts",
|
|
7
|
-
"repository":
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/workadventure/workadventure.git"
|
|
10
|
+
},
|
|
8
11
|
"author": "David Négrier <d.negrier@thecodingmachine.com>",
|
|
9
12
|
"license": "MIT",
|
|
10
13
|
"publishConfig": {
|
|
@@ -1228,6 +1228,7 @@ export declare const isIframeEventWrapper: z.ZodUnion<[z.ZodObject<{
|
|
|
1228
1228
|
textColor: z.ZodOptional<z.ZodString>;
|
|
1229
1229
|
imageSrc: z.ZodOptional<z.ZodString>;
|
|
1230
1230
|
isGradient: z.ZodOptional<z.ZodBoolean>;
|
|
1231
|
+
location: z.ZodOptional<z.ZodEnum<["top", "appsMenu", "buildMenu", "profileMenu"]>>;
|
|
1231
1232
|
}, "strip", z.ZodTypeAny, {
|
|
1232
1233
|
id: string;
|
|
1233
1234
|
label?: string | undefined;
|
|
@@ -1236,6 +1237,7 @@ export declare const isIframeEventWrapper: z.ZodUnion<[z.ZodObject<{
|
|
|
1236
1237
|
textColor?: string | undefined;
|
|
1237
1238
|
imageSrc?: string | undefined;
|
|
1238
1239
|
isGradient?: boolean | undefined;
|
|
1240
|
+
location?: "top" | "appsMenu" | "buildMenu" | "profileMenu" | undefined;
|
|
1239
1241
|
}, {
|
|
1240
1242
|
id: string;
|
|
1241
1243
|
label?: string | undefined;
|
|
@@ -1244,6 +1246,7 @@ export declare const isIframeEventWrapper: z.ZodUnion<[z.ZodObject<{
|
|
|
1244
1246
|
textColor?: string | undefined;
|
|
1245
1247
|
imageSrc?: string | undefined;
|
|
1246
1248
|
isGradient?: boolean | undefined;
|
|
1249
|
+
location?: "top" | "appsMenu" | "buildMenu" | "profileMenu" | undefined;
|
|
1247
1250
|
}>;
|
|
1248
1251
|
}, "strip", z.ZodTypeAny, {
|
|
1249
1252
|
type: "addButtonActionBar";
|
|
@@ -1255,6 +1258,7 @@ export declare const isIframeEventWrapper: z.ZodUnion<[z.ZodObject<{
|
|
|
1255
1258
|
textColor?: string | undefined;
|
|
1256
1259
|
imageSrc?: string | undefined;
|
|
1257
1260
|
isGradient?: boolean | undefined;
|
|
1261
|
+
location?: "top" | "appsMenu" | "buildMenu" | "profileMenu" | undefined;
|
|
1258
1262
|
};
|
|
1259
1263
|
}, {
|
|
1260
1264
|
type: "addButtonActionBar";
|
|
@@ -1266,6 +1270,7 @@ export declare const isIframeEventWrapper: z.ZodUnion<[z.ZodObject<{
|
|
|
1266
1270
|
textColor?: string | undefined;
|
|
1267
1271
|
imageSrc?: string | undefined;
|
|
1268
1272
|
isGradient?: boolean | undefined;
|
|
1273
|
+
location?: "top" | "appsMenu" | "buildMenu" | "profileMenu" | undefined;
|
|
1269
1274
|
};
|
|
1270
1275
|
}>, z.ZodObject<{
|
|
1271
1276
|
type: z.ZodLiteral<"removeButtonActionBar">;
|
|
@@ -9,12 +9,15 @@ export declare const iframeMessagePortTypeGuards: {
|
|
|
9
9
|
data: z.ZodObject<{
|
|
10
10
|
spaceName: z.ZodString;
|
|
11
11
|
filterType: z.ZodEnum<["everyone", "streaming"]>;
|
|
12
|
+
propertiesToSync: z.ZodArray<z.ZodString, "many">;
|
|
12
13
|
}, "strip", z.ZodTypeAny, {
|
|
13
14
|
spaceName: string;
|
|
14
15
|
filterType: "everyone" | "streaming";
|
|
16
|
+
propertiesToSync: string[];
|
|
15
17
|
}, {
|
|
16
18
|
spaceName: string;
|
|
17
19
|
filterType: "everyone" | "streaming";
|
|
20
|
+
propertiesToSync: string[];
|
|
18
21
|
}>;
|
|
19
22
|
iframeEvents: z.ZodUnion<[z.ZodObject<{
|
|
20
23
|
type: z.ZodLiteral<"watch">;
|
|
@@ -7,6 +7,7 @@ export declare const isAddActionBarButtonEvent: z.ZodObject<{
|
|
|
7
7
|
textColor: z.ZodOptional<z.ZodString>;
|
|
8
8
|
imageSrc: z.ZodOptional<z.ZodString>;
|
|
9
9
|
isGradient: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
location: z.ZodOptional<z.ZodEnum<["top", "appsMenu", "buildMenu", "profileMenu"]>>;
|
|
10
11
|
}, "strip", z.ZodTypeAny, {
|
|
11
12
|
id: string;
|
|
12
13
|
label?: string | undefined;
|
|
@@ -15,6 +16,7 @@ export declare const isAddActionBarButtonEvent: z.ZodObject<{
|
|
|
15
16
|
textColor?: string | undefined;
|
|
16
17
|
imageSrc?: string | undefined;
|
|
17
18
|
isGradient?: boolean | undefined;
|
|
19
|
+
location?: "top" | "appsMenu" | "buildMenu" | "profileMenu" | undefined;
|
|
18
20
|
}, {
|
|
19
21
|
id: string;
|
|
20
22
|
label?: string | undefined;
|
|
@@ -23,6 +25,7 @@ export declare const isAddActionBarButtonEvent: z.ZodObject<{
|
|
|
23
25
|
textColor?: string | undefined;
|
|
24
26
|
imageSrc?: string | undefined;
|
|
25
27
|
isGradient?: boolean | undefined;
|
|
28
|
+
location?: "top" | "appsMenu" | "buildMenu" | "profileMenu" | undefined;
|
|
26
29
|
}>;
|
|
27
30
|
export type AddButtonActionBarEvent = z.infer<typeof isAddActionBarButtonEvent>;
|
|
28
31
|
export type AddActionButtonActionBarEvent = AddButtonActionBarEvent;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IframeEvent, IframeQuery, IframeQueryMap } from "../Events/IframeEvent";
|
|
2
1
|
import { IframeMessagePortData, IframeMessagePortMap } from "../Events/MessagePortEvents";
|
|
2
|
+
import { IframeEvent, IframeQuery, IframeQueryMap } from "../Events/IframeEvent";
|
|
3
3
|
import { CheckedIframeMessagePort } from "./CheckedIframeMessagePort";
|
|
4
4
|
export declare function sendToWorkadventure(content: IframeEvent, transfer?: Transferable[]): void;
|
|
5
5
|
export declare const answerPromises: Map<number, {
|
|
@@ -10,7 +10,11 @@ export declare const answerPromisesMessagePort: Map<number, {
|
|
|
10
10
|
resolve: () => void;
|
|
11
11
|
reject: (reason?: any) => void;
|
|
12
12
|
}>;
|
|
13
|
-
export declare function queryWorkadventure<T extends keyof IframeQueryMap>(content: IframeQuery<T>,
|
|
13
|
+
export declare function queryWorkadventure<T extends keyof IframeQueryMap>(content: IframeQuery<T>, options?: {
|
|
14
|
+
transfer?: Transferable[];
|
|
15
|
+
signal?: AbortSignal;
|
|
16
|
+
timeout?: number | null;
|
|
17
|
+
}): Promise<IframeQueryMap[T]["answer"]>;
|
|
14
18
|
export declare function openMessagePort<K extends keyof IframeMessagePortMap>(type: K, data: IframeMessagePortData<K>["data"]): Promise<CheckedIframeMessagePort<K>>;
|
|
15
19
|
/**
|
|
16
20
|
* !! be aware that the implemented attributes (addMethodsAtRoot and subObjectIdentifier) must be readonly
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export declare class AudioStream {
|
|
2
|
+
/**
|
|
3
|
+
* Append raw PCM audio data to the audio stream.
|
|
4
|
+
* The promise resolves when the sound is played. If the audio buffer is reset with resetAudioBuffer before
|
|
5
|
+
* the data was played, the promise will reject.
|
|
6
|
+
*/
|
|
2
7
|
appendAudioData(float32Array: Float32Array): Promise<void>;
|
|
3
8
|
resetAudioBuffer(): Promise<void>;
|
|
4
9
|
close(): Promise<void>;
|
|
@@ -14,9 +14,10 @@ export declare class WorkAdventureSpacesCommands extends IframeApiContribution<W
|
|
|
14
14
|
* {@link https://docs.workadventu.re/map-building/api-spaces.md#start-following-player | Website documentation}
|
|
15
15
|
*
|
|
16
16
|
* @param {string} spaceName Name of the space to join
|
|
17
|
-
* @param {("everyone"|"streaming")} filterType Type of filter to apply when joining the space.
|
|
17
|
+
* @param {("everyone"|"streaming")} filterType Type of filter to apply when joining the space. This must match the filter decided by the first person joining the space.
|
|
18
|
+
* @param {string[]} propertiesToSync List of properties to listen to. You will be notified if any of these properties change when synchronizing in the space.
|
|
18
19
|
*/
|
|
19
|
-
joinSpace(spaceName: string, filterType: "everyone" | "streaming"): Promise<Space>;
|
|
20
|
+
joinSpace(spaceName: string, filterType: "everyone" | "streaming", propertiesToSync: string[]): Promise<Space>;
|
|
20
21
|
}
|
|
21
22
|
declare const _default: WorkAdventureSpacesCommands;
|
|
22
23
|
export default _default;
|