@workadventure/iframe-api-typings 1.9.5 → 1.10.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/Api/Events/ActionsMenuActionClickedEvent.d.ts +9 -3
- package/Api/Events/AddActionsMenuKeyToRemotePlayerEvent.d.ts +9 -3
- package/Api/Events/ButtonClickedEvent.d.ts +9 -3
- package/Api/Events/CameraFollowPlayerEvent.d.ts +7 -3
- package/Api/Events/CameraSetEvent.d.ts +19 -5
- package/Api/Events/ChangeAreaEvent.d.ts +12 -0
- package/Api/Events/ChangeLayerEvent.d.ts +7 -3
- package/Api/Events/ChatEvent.d.ts +9 -3
- package/Api/Events/ClosePopupEvent.d.ts +7 -3
- package/Api/Events/ColorEvent.d.ts +11 -3
- package/Api/Events/EmbeddedWebsiteEvent.d.ts +98 -28
- package/Api/Events/EnterLeaveEvent.d.ts +7 -3
- package/Api/Events/GameStateEvent.d.ts +31 -9
- package/Api/Events/GoToPageEvent.d.ts +7 -3
- package/Api/Events/HasPlayerMovedEvent.d.ts +20 -6
- package/Api/Events/IframeEvent.d.ts +1330 -131
- package/Api/Events/LayerEvent.d.ts +7 -3
- package/Api/Events/LoadPageEvent.d.ts +7 -3
- package/Api/Events/LoadSoundEvent.d.ts +7 -3
- package/Api/Events/LoadTilesetEvent.d.ts +7 -3
- package/Api/Events/MapDataEvent.d.ts +8 -4
- package/Api/Events/MovePlayerToEvent.d.ts +12 -4
- package/Api/Events/MovePlayerToEventAnswer.d.ts +11 -3
- package/Api/Events/OpenCoWebsiteEvent.d.ts +30 -10
- package/Api/Events/OpenPopupEvent.d.ts +38 -6
- package/Api/Events/OpenTabEvent.d.ts +7 -3
- package/Api/Events/PlaySoundEvent.d.ts +75 -12
- package/Api/Events/PlayerPosition.d.ts +9 -3
- package/Api/Events/RemotePlayerClickedEvent.d.ts +7 -3
- package/Api/Events/RemoveActionsMenuKeyFromRemotePlayerEvent.d.ts +9 -3
- package/Api/Events/SetTilesEvent.d.ts +14 -4
- package/Api/Events/SetVariableEvent.d.ts +40 -10
- package/Api/Events/StopSoundEvent.d.ts +7 -3
- package/Api/Events/UserInputChatEvent.d.ts +7 -3
- package/Api/Events/WasCameraUpdatedEvent.d.ts +15 -3
- package/Api/Events/setPropertyEvent.d.ts +12 -4
- package/Api/Events/ui/MenuItemClickedEvent.d.ts +7 -3
- package/Api/Events/ui/MenuRegisterEvent.d.ts +32 -8
- package/Api/Events/ui/TriggerActionMessageEvent.d.ts +19 -7
- package/Api/Events/ui/UIWebsite.d.ts +289 -0
- package/Api/iframe/IframeApiContribution.d.ts +4 -4
- package/Api/iframe/Ui/UIWebsite.d.ts +33 -0
- package/Api/iframe/controls.d.ts +2 -0
- package/Api/iframe/ui.d.ts +2 -0
- package/package.json +1 -1
- package/Api/Events/ChangeZoneEvent.d.ts +0 -8
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isLayerEvent:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isLayerEvent: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
name: string;
|
|
6
|
+
}, {
|
|
3
7
|
name: string;
|
|
4
8
|
}>;
|
|
5
9
|
/**
|
|
6
10
|
* A message sent from the iFrame to the game to show/hide a layer.
|
|
7
11
|
*/
|
|
8
|
-
export declare type LayerEvent =
|
|
12
|
+
export declare type LayerEvent = z.infer<typeof isLayerEvent>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isLoadPageEvent:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isLoadPageEvent: z.ZodObject<{
|
|
3
|
+
url: z.ZodString;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
url: string;
|
|
6
|
+
}, {
|
|
3
7
|
url: string;
|
|
4
8
|
}>;
|
|
5
9
|
/**
|
|
6
10
|
* A message sent from the iFrame to the game to add a message in the chat.
|
|
7
11
|
*/
|
|
8
|
-
export declare type LoadPageEvent =
|
|
12
|
+
export declare type LoadPageEvent = z.infer<typeof isLoadPageEvent>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isLoadSoundEvent:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isLoadSoundEvent: z.ZodObject<{
|
|
3
|
+
url: z.ZodString;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
url: string;
|
|
6
|
+
}, {
|
|
3
7
|
url: string;
|
|
4
8
|
}>;
|
|
5
9
|
/**
|
|
6
10
|
* A message sent from the iFrame to the game to add a message in the chat.
|
|
7
11
|
*/
|
|
8
|
-
export declare type LoadSoundEvent =
|
|
12
|
+
export declare type LoadSoundEvent = z.infer<typeof isLoadSoundEvent>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isLoadTilesetEvent:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isLoadTilesetEvent: z.ZodObject<{
|
|
3
|
+
url: z.ZodString;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
url: string;
|
|
6
|
+
}, {
|
|
3
7
|
url: string;
|
|
4
8
|
}>;
|
|
5
9
|
/**
|
|
6
10
|
* A message sent from the iFrame to the game to add a message in the chat.
|
|
7
11
|
*/
|
|
8
|
-
export declare type LoadTilesetEvent =
|
|
12
|
+
export declare type LoadTilesetEvent = z.infer<typeof isLoadTilesetEvent>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isMapDataEvent:
|
|
3
|
-
data:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isMapDataEvent: z.ZodObject<{
|
|
3
|
+
data: z.ZodUnknown;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
data?: unknown;
|
|
6
|
+
}, {
|
|
7
|
+
data?: unknown;
|
|
4
8
|
}>;
|
|
5
9
|
/**
|
|
6
10
|
* A message sent from the game to the iFrame when the data of the layers change after the iFrame send a message to the game that it want to listen to the data of the layers
|
|
7
11
|
*/
|
|
8
|
-
export declare type MapDataEvent =
|
|
12
|
+
export declare type MapDataEvent = z.infer<typeof isMapDataEvent>;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isMovePlayerToEventConfig:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isMovePlayerToEventConfig: z.ZodObject<{
|
|
3
|
+
x: z.ZodNumber;
|
|
4
|
+
y: z.ZodNumber;
|
|
5
|
+
speed: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
speed?: number | undefined;
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
}, {
|
|
11
|
+
speed?: number | undefined;
|
|
3
12
|
x: number;
|
|
4
13
|
y: number;
|
|
5
|
-
speed: number | undefined;
|
|
6
14
|
}>;
|
|
7
|
-
export declare type MovePlayerToEvent =
|
|
15
|
+
export declare type MovePlayerToEvent = z.infer<typeof isMovePlayerToEventConfig>;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isMovePlayerToEventAnswer:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isMovePlayerToEventAnswer: z.ZodObject<{
|
|
3
|
+
x: z.ZodNumber;
|
|
4
|
+
y: z.ZodNumber;
|
|
5
|
+
cancelled: z.ZodBoolean;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
cancelled: boolean;
|
|
10
|
+
}, {
|
|
3
11
|
x: number;
|
|
4
12
|
y: number;
|
|
5
13
|
cancelled: boolean;
|
|
6
14
|
}>;
|
|
7
|
-
export declare type
|
|
15
|
+
export declare type ActionsMenuActionClickedEvent = z.infer<typeof isMovePlayerToEventAnswer>;
|
|
@@ -1,17 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isOpenCoWebsiteEvent:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isOpenCoWebsiteEvent: z.ZodObject<{
|
|
3
|
+
url: z.ZodString;
|
|
4
|
+
allowApi: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
allowPolicy: z.ZodOptional<z.ZodString>;
|
|
6
|
+
widthPercent: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
closable: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
lazy: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
allowApi?: boolean | undefined;
|
|
12
|
+
allowPolicy?: string | undefined;
|
|
13
|
+
widthPercent?: number | undefined;
|
|
14
|
+
position?: number | undefined;
|
|
15
|
+
closable?: boolean | undefined;
|
|
16
|
+
lazy?: boolean | undefined;
|
|
17
|
+
url: string;
|
|
18
|
+
}, {
|
|
19
|
+
allowApi?: boolean | undefined;
|
|
20
|
+
allowPolicy?: string | undefined;
|
|
21
|
+
widthPercent?: number | undefined;
|
|
22
|
+
position?: number | undefined;
|
|
23
|
+
closable?: boolean | undefined;
|
|
24
|
+
lazy?: boolean | undefined;
|
|
3
25
|
url: string;
|
|
4
|
-
allowApi: boolean | undefined;
|
|
5
|
-
allowPolicy: string | undefined;
|
|
6
|
-
widthPercent: number | undefined;
|
|
7
|
-
position: number | undefined;
|
|
8
|
-
closable: boolean | undefined;
|
|
9
|
-
lazy: boolean | undefined;
|
|
10
26
|
}>;
|
|
11
|
-
export declare const isCoWebsite:
|
|
27
|
+
export declare const isCoWebsite: z.ZodObject<{
|
|
28
|
+
id: z.ZodString;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
id: string;
|
|
31
|
+
}, {
|
|
12
32
|
id: string;
|
|
13
33
|
}>;
|
|
14
34
|
/**
|
|
15
35
|
* A message sent from the iFrame to the game to add a message in the chat.
|
|
16
36
|
*/
|
|
17
|
-
export declare type OpenCoWebsiteEvent =
|
|
37
|
+
export declare type OpenCoWebsiteEvent = z.infer<typeof isOpenCoWebsiteEvent>;
|
|
@@ -1,14 +1,46 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isButtonDescriptor: z.ZodObject<{
|
|
3
|
+
label: z.ZodString;
|
|
4
|
+
className: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
className?: string | undefined;
|
|
7
|
+
label: string;
|
|
8
|
+
}, {
|
|
9
|
+
className?: string | undefined;
|
|
10
|
+
label: string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const isOpenPopupEvent: z.ZodObject<{
|
|
13
|
+
popupId: z.ZodNumber;
|
|
14
|
+
targetObject: z.ZodString;
|
|
15
|
+
message: z.ZodString;
|
|
16
|
+
buttons: z.ZodArray<z.ZodObject<{
|
|
17
|
+
label: z.ZodString;
|
|
18
|
+
className: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
className?: string | undefined;
|
|
21
|
+
label: string;
|
|
22
|
+
}, {
|
|
23
|
+
className?: string | undefined;
|
|
24
|
+
label: string;
|
|
25
|
+
}>, "many">;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
3
27
|
popupId: number;
|
|
28
|
+
message: string;
|
|
4
29
|
targetObject: string;
|
|
30
|
+
buttons: {
|
|
31
|
+
className?: string | undefined;
|
|
32
|
+
label: string;
|
|
33
|
+
}[];
|
|
34
|
+
}, {
|
|
35
|
+
popupId: number;
|
|
5
36
|
message: string;
|
|
6
|
-
|
|
37
|
+
targetObject: string;
|
|
38
|
+
buttons: {
|
|
39
|
+
className?: string | undefined;
|
|
7
40
|
label: string;
|
|
8
|
-
|
|
9
|
-
})[];
|
|
41
|
+
}[];
|
|
10
42
|
}>;
|
|
11
43
|
/**
|
|
12
44
|
* A message sent from the iFrame to the game to add a message in the chat.
|
|
13
45
|
*/
|
|
14
|
-
export declare type OpenPopupEvent =
|
|
46
|
+
export declare type OpenPopupEvent = z.infer<typeof isOpenPopupEvent>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isOpenTabEvent:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isOpenTabEvent: z.ZodObject<{
|
|
3
|
+
url: z.ZodString;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
url: string;
|
|
6
|
+
}, {
|
|
3
7
|
url: string;
|
|
4
8
|
}>;
|
|
5
9
|
/**
|
|
6
10
|
* A message sent from the iFrame to the game to add a message in the chat.
|
|
7
11
|
*/
|
|
8
|
-
export declare type OpenTabEvent =
|
|
12
|
+
export declare type OpenTabEvent = z.infer<typeof isOpenTabEvent>;
|
|
@@ -1,17 +1,80 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isSoundConfig: z.ZodObject<{
|
|
3
|
+
volume: z.ZodOptional<z.ZodNumber>;
|
|
4
|
+
loop: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
mute: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
rate: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
detune: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
seek: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
delay: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
volume?: number | undefined;
|
|
12
|
+
loop?: boolean | undefined;
|
|
13
|
+
mute?: boolean | undefined;
|
|
14
|
+
rate?: number | undefined;
|
|
15
|
+
detune?: number | undefined;
|
|
16
|
+
seek?: number | undefined;
|
|
17
|
+
delay?: number | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
volume?: number | undefined;
|
|
20
|
+
loop?: boolean | undefined;
|
|
21
|
+
mute?: boolean | undefined;
|
|
22
|
+
rate?: number | undefined;
|
|
23
|
+
detune?: number | undefined;
|
|
24
|
+
seek?: number | undefined;
|
|
25
|
+
delay?: number | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
export declare const isPlaySoundEvent: z.ZodObject<{
|
|
28
|
+
url: z.ZodString;
|
|
29
|
+
config: z.ZodOptional<z.ZodObject<{
|
|
30
|
+
volume: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
loop: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
mute: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
+
rate: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
detune: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
seek: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
delay: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
volume?: number | undefined;
|
|
39
|
+
loop?: boolean | undefined;
|
|
40
|
+
mute?: boolean | undefined;
|
|
41
|
+
rate?: number | undefined;
|
|
42
|
+
detune?: number | undefined;
|
|
43
|
+
seek?: number | undefined;
|
|
44
|
+
delay?: number | undefined;
|
|
45
|
+
}, {
|
|
46
|
+
volume?: number | undefined;
|
|
47
|
+
loop?: boolean | undefined;
|
|
48
|
+
mute?: boolean | undefined;
|
|
49
|
+
rate?: number | undefined;
|
|
50
|
+
detune?: number | undefined;
|
|
51
|
+
seek?: number | undefined;
|
|
52
|
+
delay?: number | undefined;
|
|
53
|
+
}>>;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
config?: {
|
|
56
|
+
volume?: number | undefined;
|
|
57
|
+
loop?: boolean | undefined;
|
|
58
|
+
mute?: boolean | undefined;
|
|
59
|
+
rate?: number | undefined;
|
|
60
|
+
detune?: number | undefined;
|
|
61
|
+
seek?: number | undefined;
|
|
62
|
+
delay?: number | undefined;
|
|
63
|
+
} | undefined;
|
|
64
|
+
url: string;
|
|
65
|
+
}, {
|
|
66
|
+
config?: {
|
|
67
|
+
volume?: number | undefined;
|
|
68
|
+
loop?: boolean | undefined;
|
|
69
|
+
mute?: boolean | undefined;
|
|
70
|
+
rate?: number | undefined;
|
|
71
|
+
detune?: number | undefined;
|
|
72
|
+
seek?: number | undefined;
|
|
73
|
+
delay?: number | undefined;
|
|
74
|
+
} | undefined;
|
|
3
75
|
url: string;
|
|
4
|
-
config: (object & {
|
|
5
|
-
volume: number | undefined;
|
|
6
|
-
loop: boolean | undefined;
|
|
7
|
-
mute: boolean | undefined;
|
|
8
|
-
rate: number | undefined;
|
|
9
|
-
detune: number | undefined;
|
|
10
|
-
seek: number | undefined;
|
|
11
|
-
delay: number | undefined;
|
|
12
|
-
}) | undefined;
|
|
13
76
|
}>;
|
|
14
77
|
/**
|
|
15
78
|
* A message sent from the iFrame to the game to add a message in the chat.
|
|
16
79
|
*/
|
|
17
|
-
export declare type PlaySoundEvent =
|
|
80
|
+
export declare type PlaySoundEvent = z.infer<typeof isPlaySoundEvent>;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isPlayerPosition:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isPlayerPosition: z.ZodObject<{
|
|
3
|
+
x: z.ZodNumber;
|
|
4
|
+
y: z.ZodNumber;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
}, {
|
|
3
9
|
x: number;
|
|
4
10
|
y: number;
|
|
5
11
|
}>;
|
|
6
|
-
export declare type PlayerPosition =
|
|
12
|
+
export declare type PlayerPosition = z.infer<typeof isPlayerPosition>;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isRemotePlayerClickedEvent:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isRemotePlayerClickedEvent: z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
id: number;
|
|
6
|
+
}, {
|
|
3
7
|
id: number;
|
|
4
8
|
}>;
|
|
5
9
|
/**
|
|
6
10
|
* A message sent from the game to the iFrame when RemotePlayer is clicked.
|
|
7
11
|
*/
|
|
8
|
-
export declare type RemotePlayerClickedEvent =
|
|
12
|
+
export declare type RemotePlayerClickedEvent = z.infer<typeof isRemotePlayerClickedEvent>;
|
|
9
13
|
export declare type RemotePlayerClickedEventCallback = (event: RemotePlayerClickedEvent) => void;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isRemoveActionsMenuKeyFromRemotePlayerEvent:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isRemoveActionsMenuKeyFromRemotePlayerEvent: z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
actionKey: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
id: number;
|
|
7
|
+
actionKey: string;
|
|
8
|
+
}, {
|
|
3
9
|
id: number;
|
|
4
10
|
actionKey: string;
|
|
5
11
|
}>;
|
|
6
|
-
export declare type RemoveActionsMenuKeyFromRemotePlayerEvent =
|
|
12
|
+
export declare type RemoveActionsMenuKeyFromRemotePlayerEvent = z.infer<typeof isRemoveActionsMenuKeyFromRemotePlayerEvent>;
|
|
7
13
|
export declare type RemoveActionsMenuKeyFromRemotePlayerEventCallback = (event: RemoveActionsMenuKeyFromRemotePlayerEvent) => void;
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isSetTilesEvent:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isSetTilesEvent: z.ZodArray<z.ZodObject<{
|
|
3
|
+
x: z.ZodNumber;
|
|
4
|
+
y: z.ZodNumber;
|
|
5
|
+
tile: z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodNull]>;
|
|
6
|
+
layer: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
3
8
|
x: number;
|
|
4
9
|
y: number;
|
|
5
10
|
tile: string | number | null;
|
|
6
11
|
layer: string;
|
|
7
|
-
}
|
|
12
|
+
}, {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
tile: string | number | null;
|
|
16
|
+
layer: string;
|
|
17
|
+
}>, "many">;
|
|
8
18
|
/**
|
|
9
19
|
* A message sent from the iFrame to the game to set one or many tiles.
|
|
10
20
|
*/
|
|
11
|
-
export declare type SetTilesEvent =
|
|
21
|
+
export declare type SetTilesEvent = z.infer<typeof isSetTilesEvent>;
|
|
@@ -1,18 +1,48 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isSetVariableEvent:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isSetVariableEvent: z.ZodObject<{
|
|
3
|
+
key: z.ZodString;
|
|
4
|
+
value: z.ZodUnknown;
|
|
5
|
+
target: z.ZodEnum<["global", "player"]>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
value?: unknown;
|
|
8
|
+
key: string;
|
|
9
|
+
target: "global" | "player";
|
|
10
|
+
}, {
|
|
11
|
+
value?: unknown;
|
|
3
12
|
key: string;
|
|
4
|
-
value: unknown;
|
|
5
13
|
target: "global" | "player";
|
|
6
14
|
}>;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
export declare const isSetVariableIframeEvent: z.ZodObject<{
|
|
16
|
+
type: z.ZodEnum<["setVariable"]>;
|
|
17
|
+
data: z.ZodObject<{
|
|
18
|
+
key: z.ZodString;
|
|
19
|
+
value: z.ZodUnknown;
|
|
20
|
+
target: z.ZodEnum<["global", "player"]>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
value?: unknown;
|
|
23
|
+
key: string;
|
|
24
|
+
target: "global" | "player";
|
|
25
|
+
}, {
|
|
26
|
+
value?: unknown;
|
|
27
|
+
key: string;
|
|
28
|
+
target: "global" | "player";
|
|
29
|
+
}>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
type: "setVariable";
|
|
32
|
+
data: {
|
|
33
|
+
value?: unknown;
|
|
34
|
+
key: string;
|
|
35
|
+
target: "global" | "player";
|
|
36
|
+
};
|
|
37
|
+
}, {
|
|
12
38
|
type: "setVariable";
|
|
13
|
-
data:
|
|
39
|
+
data: {
|
|
40
|
+
value?: unknown;
|
|
14
41
|
key: string;
|
|
15
|
-
value: unknown;
|
|
16
42
|
target: "global" | "player";
|
|
17
43
|
};
|
|
18
44
|
}>;
|
|
45
|
+
/**
|
|
46
|
+
* A message sent from the iFrame to the game to change the value of the property of the layer
|
|
47
|
+
*/
|
|
48
|
+
export declare type SetVariableEvent = z.infer<typeof isSetVariableEvent>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isStopSoundEvent:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isStopSoundEvent: z.ZodObject<{
|
|
3
|
+
url: z.ZodString;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
url: string;
|
|
6
|
+
}, {
|
|
3
7
|
url: string;
|
|
4
8
|
}>;
|
|
5
9
|
/**
|
|
6
10
|
* A message sent from the iFrame to the game to add a message in the chat.
|
|
7
11
|
*/
|
|
8
|
-
export declare type StopSoundEvent =
|
|
12
|
+
export declare type StopSoundEvent = z.infer<typeof isStopSoundEvent>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isUserInputChatEvent:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isUserInputChatEvent: z.ZodObject<{
|
|
3
|
+
message: z.ZodString;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
message: string;
|
|
6
|
+
}, {
|
|
3
7
|
message: string;
|
|
4
8
|
}>;
|
|
5
9
|
/**
|
|
6
10
|
* A message sent from the game to the iFrame when a user types a message in the chat.
|
|
7
11
|
*/
|
|
8
|
-
export declare type UserInputChatEvent =
|
|
12
|
+
export declare type UserInputChatEvent = z.infer<typeof isUserInputChatEvent>;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isWasCameraUpdatedEvent:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isWasCameraUpdatedEvent: z.ZodObject<{
|
|
3
|
+
x: z.ZodNumber;
|
|
4
|
+
y: z.ZodNumber;
|
|
5
|
+
width: z.ZodNumber;
|
|
6
|
+
height: z.ZodNumber;
|
|
7
|
+
zoom: z.ZodNumber;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
zoom: number;
|
|
14
|
+
}, {
|
|
3
15
|
x: number;
|
|
4
16
|
y: number;
|
|
5
17
|
width: number;
|
|
@@ -9,5 +21,5 @@ export declare const isWasCameraUpdatedEvent: tg.TypeGuard<object & {
|
|
|
9
21
|
/**
|
|
10
22
|
* A message sent from the game to the iFrame to notify a movement from the camera.
|
|
11
23
|
*/
|
|
12
|
-
export declare type WasCameraUpdatedEvent =
|
|
24
|
+
export declare type WasCameraUpdatedEvent = z.infer<typeof isWasCameraUpdatedEvent>;
|
|
13
25
|
export declare type WasCameraUpdatedEventCallback = (event: WasCameraUpdatedEvent) => void;
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isSetPropertyEvent:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isSetPropertyEvent: z.ZodObject<{
|
|
3
|
+
layerName: z.ZodString;
|
|
4
|
+
propertyName: z.ZodString;
|
|
5
|
+
propertyValue: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
propertyValue?: string | number | boolean | undefined;
|
|
8
|
+
layerName: string;
|
|
9
|
+
propertyName: string;
|
|
10
|
+
}, {
|
|
11
|
+
propertyValue?: string | number | boolean | undefined;
|
|
3
12
|
layerName: string;
|
|
4
13
|
propertyName: string;
|
|
5
|
-
propertyValue: string | number | boolean | undefined;
|
|
6
14
|
}>;
|
|
7
15
|
/**
|
|
8
16
|
* A message sent from the iFrame to the game to change the value of the property of the layer
|
|
9
17
|
*/
|
|
10
|
-
export declare type SetPropertyEvent =
|
|
18
|
+
export declare type SetPropertyEvent = z.infer<typeof isSetPropertyEvent>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const isMenuItemClickedEvent:
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const isMenuItemClickedEvent: z.ZodObject<{
|
|
3
|
+
menuItem: z.ZodString;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
menuItem: string;
|
|
6
|
+
}, {
|
|
3
7
|
menuItem: string;
|
|
4
8
|
}>;
|
|
5
9
|
/**
|
|
6
10
|
* A message sent from the game to the iFrame when a menu item is clicked.
|
|
7
11
|
*/
|
|
8
|
-
export declare type MenuItemClickedEvent =
|
|
12
|
+
export declare type MenuItemClickedEvent = z.infer<typeof isMenuItemClickedEvent>;
|
|
@@ -1,22 +1,46 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { z } from "zod";
|
|
2
2
|
/**
|
|
3
3
|
* A message sent from a script to the game to remove a custom menu from the menu
|
|
4
4
|
*/
|
|
5
|
-
export declare const isUnregisterMenuEvent:
|
|
5
|
+
export declare const isUnregisterMenuEvent: z.ZodObject<{
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
name: string;
|
|
9
|
+
}, {
|
|
6
10
|
name: string;
|
|
7
11
|
}>;
|
|
8
|
-
export declare type UnregisterMenuEvent =
|
|
9
|
-
export declare const isMenuRegisterOptions:
|
|
12
|
+
export declare type UnregisterMenuEvent = z.infer<typeof isUnregisterMenuEvent>;
|
|
13
|
+
export declare const isMenuRegisterOptions: z.ZodObject<{
|
|
14
|
+
allowApi: z.ZodBoolean;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
allowApi: boolean;
|
|
17
|
+
}, {
|
|
10
18
|
allowApi: boolean;
|
|
11
19
|
}>;
|
|
12
20
|
/**
|
|
13
21
|
* A message sent from a script to the game to add a custom menu from the menu
|
|
14
22
|
*/
|
|
15
|
-
export declare const isMenuRegisterEvent:
|
|
23
|
+
export declare const isMenuRegisterEvent: z.ZodObject<{
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
iframe: z.ZodOptional<z.ZodString>;
|
|
26
|
+
options: z.ZodObject<{
|
|
27
|
+
allowApi: z.ZodBoolean;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
allowApi: boolean;
|
|
30
|
+
}, {
|
|
31
|
+
allowApi: boolean;
|
|
32
|
+
}>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
iframe?: string | undefined;
|
|
35
|
+
options: {
|
|
36
|
+
allowApi: boolean;
|
|
37
|
+
};
|
|
16
38
|
name: string;
|
|
17
|
-
|
|
18
|
-
|
|
39
|
+
}, {
|
|
40
|
+
iframe?: string | undefined;
|
|
41
|
+
options: {
|
|
19
42
|
allowApi: boolean;
|
|
20
43
|
};
|
|
44
|
+
name: string;
|
|
21
45
|
}>;
|
|
22
|
-
export declare type MenuRegisterEvent =
|
|
46
|
+
export declare type MenuRegisterEvent = z.infer<typeof isMenuRegisterEvent>;
|