@workadventure/iframe-api-typings
Advanced tools
Comparing version
@@ -12,3 +12,3 @@ import { z } from "zod"; | ||
}>; | ||
export declare type ActionsMenuActionClickedEvent = z.infer<typeof isActionsMenuActionClickedEvent>; | ||
export declare type ActionsMenuActionClickedEventCallback = (event: ActionsMenuActionClickedEvent) => void; | ||
export type ActionsMenuActionClickedEvent = z.infer<typeof isActionsMenuActionClickedEvent>; | ||
export type ActionsMenuActionClickedEventCallback = (event: ActionsMenuActionClickedEvent) => void; |
@@ -12,3 +12,3 @@ import { z } from "zod"; | ||
}>; | ||
export declare type AddActionsMenuKeyToRemotePlayerEvent = z.infer<typeof isAddActionsMenuKeyToRemotePlayerEvent>; | ||
export declare type AddActionsMenuKeyToRemotePlayerEventCallback = (event: AddActionsMenuKeyToRemotePlayerEvent) => void; | ||
export type AddActionsMenuKeyToRemotePlayerEvent = z.infer<typeof isAddActionsMenuKeyToRemotePlayerEvent>; | ||
export type AddActionsMenuKeyToRemotePlayerEventCallback = (event: AddActionsMenuKeyToRemotePlayerEvent) => void; |
@@ -82,6 +82,6 @@ import { z } from "zod"; | ||
*/ | ||
export declare type AddPlayerEvent = z.infer<typeof isAddPlayerEvent>; | ||
export type AddPlayerEvent = z.infer<typeof isAddPlayerEvent>; | ||
/** | ||
* A message sent from the game to the iFrame to notify a player has changed (moved / changed name, etc...) | ||
*/ | ||
export declare type RemotePlayerChangedEvent = z.infer<typeof isRemotePlayerChangedEvent>; | ||
export type RemotePlayerChangedEvent = z.infer<typeof isRemotePlayerChangedEvent>; |
@@ -15,2 +15,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type AskPositionEvent = z.infer<typeof isAskPositionEvent>; | ||
export type AskPositionEvent = z.infer<typeof isAskPositionEvent>; |
@@ -15,2 +15,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type ButtonClickedEvent = z.infer<typeof isButtonClickedEvent>; | ||
export type ButtonClickedEvent = z.infer<typeof isButtonClickedEvent>; |
@@ -12,2 +12,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type CameraFollowPlayerEvent = z.infer<typeof isCameraFollowPlayerEvent>; | ||
export type CameraFollowPlayerEvent = z.infer<typeof isCameraFollowPlayerEvent>; |
@@ -27,2 +27,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type CameraSetEvent = z.infer<typeof isCameraSetEvent>; | ||
export type CameraSetEvent = z.infer<typeof isCameraSetEvent>; |
@@ -12,2 +12,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type ChangeAreaEvent = z.infer<typeof isChangeAreaEvent>; | ||
export type ChangeAreaEvent = z.infer<typeof isChangeAreaEvent>; |
@@ -12,2 +12,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type ChangeLayerEvent = z.infer<typeof isChangeLayerEvent>; | ||
export type ChangeLayerEvent = z.infer<typeof isChangeLayerEvent>; |
@@ -43,6 +43,6 @@ import { z } from "zod"; | ||
}>; | ||
export declare type ChatMessage = z.infer<typeof isChatMessage>; | ||
export type ChatMessage = z.infer<typeof isChatMessage>; | ||
/** | ||
* A message sent from the iFrame to the game to add a message in the chat. | ||
*/ | ||
export declare type ChatEvent = z.infer<typeof isChatEvent>; | ||
export type ChatEvent = z.infer<typeof isChatEvent>; |
@@ -9,2 +9,2 @@ import { z } from "zod"; | ||
}>; | ||
export declare type ChatVisibilityEvent = z.infer<typeof isChatVisibilityEvent>; | ||
export type ChatVisibilityEvent = z.infer<typeof isChatVisibilityEvent>; |
@@ -12,2 +12,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type ClosePopupEvent = z.infer<typeof isClosePopupEvent>; | ||
export type ClosePopupEvent = z.infer<typeof isClosePopupEvent>; |
@@ -18,2 +18,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type ColorEvent = z.infer<typeof isColorEvent>; | ||
export type ColorEvent = z.infer<typeof isColorEvent>; |
@@ -24,3 +24,3 @@ import { z } from "zod"; | ||
*/ | ||
export declare type ModifyAreaEvent = z.infer<typeof isAreaEvent>; | ||
export type ModifyAreaEvent = z.infer<typeof isAreaEvent>; | ||
export declare const isCreateAreaEvent: z.ZodObject<{ | ||
@@ -45,2 +45,2 @@ name: z.ZodString; | ||
}>; | ||
export declare type CreateAreaEvent = z.infer<typeof isCreateAreaEvent>; | ||
export type CreateAreaEvent = z.infer<typeof isCreateAreaEvent>; |
@@ -18,3 +18,3 @@ import { z } from "zod"; | ||
}>; | ||
export declare type Rectangle = z.infer<typeof isRectangle>; | ||
export type Rectangle = z.infer<typeof isRectangle>; | ||
export declare const isEmbeddedWebsiteEvent: z.ZodObject<{ | ||
@@ -41,3 +41,3 @@ name: z.ZodString; | ||
allow?: string | undefined; | ||
origin?: "player" | "map" | undefined; | ||
origin?: "map" | "player" | undefined; | ||
scale?: number | undefined; | ||
@@ -54,3 +54,3 @@ name: string; | ||
allow?: string | undefined; | ||
origin?: "player" | "map" | undefined; | ||
origin?: "map" | "player" | undefined; | ||
scale?: number | undefined; | ||
@@ -62,3 +62,3 @@ name: string; | ||
*/ | ||
export declare type ModifyEmbeddedWebsiteEvent = z.infer<typeof isEmbeddedWebsiteEvent>; | ||
export type ModifyEmbeddedWebsiteEvent = z.infer<typeof isEmbeddedWebsiteEvent>; | ||
export declare const isCreateEmbeddedWebsiteEvent: z.ZodObject<{ | ||
@@ -92,3 +92,3 @@ name: z.ZodString; | ||
allow?: string | undefined; | ||
origin?: "player" | "map" | undefined; | ||
origin?: "map" | "player" | undefined; | ||
scale?: number | undefined; | ||
@@ -107,3 +107,3 @@ name: string; | ||
allow?: string | undefined; | ||
origin?: "player" | "map" | undefined; | ||
origin?: "map" | "player" | undefined; | ||
scale?: number | undefined; | ||
@@ -119,2 +119,2 @@ name: string; | ||
}>; | ||
export declare type CreateEmbeddedWebsiteEvent = z.infer<typeof isCreateEmbeddedWebsiteEvent>; | ||
export type CreateEmbeddedWebsiteEvent = z.infer<typeof isCreateEmbeddedWebsiteEvent>; |
@@ -15,2 +15,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type EnablePlayersTrackingEvent = z.infer<typeof isEnablePlayersTrackingEvent>; | ||
export type EnablePlayersTrackingEvent = z.infer<typeof isEnablePlayersTrackingEvent>; |
@@ -12,2 +12,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type EnterLeaveEvent = z.infer<typeof isEnterLeaveEvent>; | ||
export type EnterLeaveEvent = z.infer<typeof isEnterLeaveEvent>; |
@@ -15,2 +15,3 @@ import { z } from "zod"; | ||
metadata: z.ZodOptional<z.ZodUnknown>; | ||
iframeId: z.ZodOptional<z.ZodString>; | ||
isLogged: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; | ||
@@ -26,2 +27,3 @@ }, "strip", z.ZodTypeAny, { | ||
metadata?: unknown; | ||
iframeId?: string | undefined; | ||
roomId: string; | ||
@@ -41,2 +43,3 @@ mapUrl: string; | ||
metadata?: unknown; | ||
iframeId?: string | undefined; | ||
isLogged?: boolean | undefined; | ||
@@ -51,2 +54,2 @@ roomId: string; | ||
*/ | ||
export declare type GameStateEvent = z.infer<typeof isGameStateEvent>; | ||
export type GameStateEvent = z.infer<typeof isGameStateEvent>; |
@@ -12,2 +12,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type GoToPageEvent = z.infer<typeof isGoToPageEvent>; | ||
export type GoToPageEvent = z.infer<typeof isGoToPageEvent>; |
@@ -27,3 +27,3 @@ import { z } from "zod"; | ||
*/ | ||
export declare type HasPlayerMovedEvent = z.infer<typeof isHasPlayerMovedEvent>; | ||
export declare type HasPlayerMovedEventCallback = (event: HasPlayerMovedEvent) => void; | ||
export type HasPlayerMovedEvent = z.infer<typeof isHasPlayerMovedEvent>; | ||
export type HasPlayerMovedEventCallback = (event: HasPlayerMovedEvent) => void; |
@@ -21,2 +21,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type JoinMucEvent = z.infer<typeof isJoinMucEvent>; | ||
export type JoinMucEvent = z.infer<typeof isJoinMucEvent>; |
@@ -12,2 +12,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type LayerEvent = z.infer<typeof isLayerEvent>; | ||
export type LayerEvent = z.infer<typeof isLayerEvent>; |
@@ -12,2 +12,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type LeaveMucEvent = z.infer<typeof isLeaveMucEvent>; | ||
export type LeaveMucEvent = z.infer<typeof isLeaveMucEvent>; |
@@ -12,2 +12,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type LoadPageEvent = z.infer<typeof isLoadPageEvent>; | ||
export type LoadPageEvent = z.infer<typeof isLoadPageEvent>; |
@@ -12,2 +12,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type LoadSoundEvent = z.infer<typeof isLoadSoundEvent>; | ||
export type LoadSoundEvent = z.infer<typeof isLoadSoundEvent>; |
@@ -12,2 +12,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type LoadTilesetEvent = z.infer<typeof isLoadTilesetEvent>; | ||
export type LoadTilesetEvent = z.infer<typeof isLoadTilesetEvent>; |
@@ -12,2 +12,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type MapDataEvent = z.infer<typeof isMapDataEvent>; | ||
export type MapDataEvent = z.infer<typeof isMapDataEvent>; |
@@ -24,2 +24,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type ModalEvent = z.infer<typeof isModalEvent>; | ||
export type ModalEvent = z.infer<typeof isModalEvent>; |
@@ -15,2 +15,2 @@ import { z } from "zod"; | ||
}>; | ||
export declare type MovePlayerToEvent = z.infer<typeof isMovePlayerToEventConfig>; | ||
export type MovePlayerToEvent = z.infer<typeof isMovePlayerToEventConfig>; |
@@ -15,2 +15,2 @@ import { z } from "zod"; | ||
}>; | ||
export declare type ActionsMenuActionClickedEvent = z.infer<typeof isMovePlayerToEventAnswer>; | ||
export type ActionsMenuActionClickedEvent = z.infer<typeof isMovePlayerToEventAnswer>; |
@@ -18,2 +18,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type NotificationEvent = z.infer<typeof isNotificationEvent>; | ||
export type NotificationEvent = z.infer<typeof isNotificationEvent>; |
@@ -37,2 +37,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type OpenCoWebsiteEvent = z.infer<typeof isOpenCoWebsiteEvent>; | ||
export type OpenCoWebsiteEvent = z.infer<typeof isOpenCoWebsiteEvent>; |
@@ -46,2 +46,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type OpenPopupEvent = z.infer<typeof isOpenPopupEvent>; | ||
export type OpenPopupEvent = z.infer<typeof isOpenPopupEvent>; |
@@ -12,2 +12,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type OpenTabEvent = z.infer<typeof isOpenTabEvent>; | ||
export type OpenTabEvent = z.infer<typeof isOpenTabEvent>; |
@@ -12,2 +12,2 @@ import { z } from "zod"; | ||
}>; | ||
export declare type PlayerPosition = z.infer<typeof isPlayerPosition>; | ||
export type PlayerPosition = z.infer<typeof isPlayerPosition>; |
@@ -80,2 +80,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type PlaySoundEvent = z.infer<typeof isPlaySoundEvent>; | ||
export type PlaySoundEvent = z.infer<typeof isPlaySoundEvent>; |
@@ -70,2 +70,2 @@ import { z } from "zod"; | ||
}>; | ||
export declare type JoinProximityMeetingEvent = z.infer<typeof isJoinProximityMeetingEvent>; | ||
export type JoinProximityMeetingEvent = z.infer<typeof isJoinProximityMeetingEvent>; |
@@ -70,2 +70,2 @@ import { z } from "zod"; | ||
}>; | ||
export declare type ParticipantProximityMeetingEvent = z.infer<typeof isParticipantProximityMeetingEvent>; | ||
export type ParticipantProximityMeetingEvent = z.infer<typeof isParticipantProximityMeetingEvent>; |
@@ -12,3 +12,3 @@ import { z } from "zod"; | ||
}>; | ||
export declare type RemoveActionsMenuKeyFromRemotePlayerEvent = z.infer<typeof isRemoveActionsMenuKeyFromRemotePlayerEvent>; | ||
export declare type RemoveActionsMenuKeyFromRemotePlayerEventCallback = (event: RemoveActionsMenuKeyFromRemotePlayerEvent) => void; | ||
export type RemoveActionsMenuKeyFromRemotePlayerEvent = z.infer<typeof isRemoveActionsMenuKeyFromRemotePlayerEvent>; | ||
export type RemoveActionsMenuKeyFromRemotePlayerEventCallback = (event: RemoveActionsMenuKeyFromRemotePlayerEvent) => void; |
@@ -18,2 +18,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type SetAreaPropertyEvent = z.infer<typeof isSetAreaPropertyEvent>; | ||
export type SetAreaPropertyEvent = z.infer<typeof isSetAreaPropertyEvent>; |
@@ -27,2 +27,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type SetPlayerVariableEvent = z.infer<typeof isSetPlayerVariableEvent>; | ||
export type SetPlayerVariableEvent = z.infer<typeof isSetPlayerVariableEvent>; |
@@ -18,2 +18,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type SetPropertyEvent = z.infer<typeof isSetPropertyEvent>; | ||
export type SetPropertyEvent = z.infer<typeof isSetPropertyEvent>; |
@@ -18,2 +18,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type SetSharedPlayerVariableEvent = z.infer<typeof isSetSharedPlayerVariableEvent>; | ||
export type SetSharedPlayerVariableEvent = z.infer<typeof isSetSharedPlayerVariableEvent>; |
@@ -21,2 +21,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type SetTilesEvent = z.infer<typeof isSetTilesEvent>; | ||
export type SetTilesEvent = z.infer<typeof isSetTilesEvent>; |
@@ -24,2 +24,2 @@ import { z } from "zod"; | ||
}>; | ||
export declare type SettingsEvent = z.infer<typeof isSettingsEvent>; | ||
export type SettingsEvent = z.infer<typeof isSettingsEvent>; |
@@ -40,2 +40,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type SetVariableEvent = z.infer<typeof isSetVariableEvent>; | ||
export type SetVariableEvent = z.infer<typeof isSetVariableEvent>; |
@@ -12,2 +12,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type ShowBusinessCardEvent = z.infer<typeof isShowBusinessCardEvent>; | ||
export type ShowBusinessCardEvent = z.infer<typeof isShowBusinessCardEvent>; |
@@ -12,2 +12,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type StopSoundEvent = z.infer<typeof isStopSoundEvent>; | ||
export type StopSoundEvent = z.infer<typeof isStopSoundEvent>; |
import { z } from "zod"; | ||
export declare const isAddButtonActionBarEvent: z.ZodObject<{ | ||
export declare const isAddClassicButtonActionBarEvent: z.ZodObject<{ | ||
id: z.ZodString; | ||
label: z.ZodString; | ||
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["button"]>>>; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "button"; | ||
id: string; | ||
label: string; | ||
}, { | ||
type?: "button" | undefined; | ||
id: string; | ||
label: string; | ||
}>; | ||
export declare type AddButtonActionBarEvent = z.infer<typeof isAddButtonActionBarEvent>; | ||
export declare type AddActionsButtonActionBarEventCallback = (event: AddButtonActionBarEvent) => void; | ||
export declare const isAddActionButtonActionBarEvent: z.ZodObject<{ | ||
id: z.ZodString; | ||
type: z.ZodEnum<["action"]>; | ||
imageSrc: z.ZodString; | ||
toolTip: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "action"; | ||
id: string; | ||
imageSrc: string; | ||
toolTip: string; | ||
}, { | ||
type: "action"; | ||
id: string; | ||
imageSrc: string; | ||
toolTip: string; | ||
}>; | ||
export declare const isAddButtonActionBarEvent: z.ZodUnion<[z.ZodObject<{ | ||
id: z.ZodString; | ||
label: z.ZodString; | ||
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["button"]>>>; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "button"; | ||
id: string; | ||
label: string; | ||
}, { | ||
type?: "button" | undefined; | ||
id: string; | ||
label: string; | ||
}>, z.ZodObject<{ | ||
id: z.ZodString; | ||
type: z.ZodEnum<["action"]>; | ||
imageSrc: z.ZodString; | ||
toolTip: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "action"; | ||
id: string; | ||
imageSrc: string; | ||
toolTip: string; | ||
}, { | ||
type: "action"; | ||
id: string; | ||
imageSrc: string; | ||
toolTip: string; | ||
}>]>; | ||
export type AddButtonActionBarEvent = z.infer<typeof isAddButtonActionBarEvent>; | ||
export type AddActionButtonActionBarEvent = z.infer<typeof isAddActionButtonActionBarEvent>; | ||
export type AddClassicButtonActionBarEvent = z.infer<typeof isAddClassicButtonActionBarEvent>; | ||
export type AddActionsButtonActionBarEventCallback = (event: AddButtonActionBarEvent) => void; | ||
export declare const isRemoveButtonActionBarEvent: z.ZodObject<{ | ||
@@ -21,2 +70,2 @@ id: z.ZodString; | ||
}>; | ||
export declare type RemoveButtonActionBarEvent = z.infer<typeof isRemoveButtonActionBarEvent>; | ||
export type RemoveButtonActionBarEvent = z.infer<typeof isRemoveButtonActionBarEvent>; |
@@ -12,2 +12,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type MenuItemClickedEvent = z.infer<typeof isMenuItemClickedEvent>; | ||
export type MenuItemClickedEvent = z.infer<typeof isMenuItemClickedEvent>; |
@@ -12,3 +12,3 @@ import { z } from "zod"; | ||
}>; | ||
export declare type UnregisterMenuEvent = z.infer<typeof isUnregisterMenuEvent>; | ||
export type UnregisterMenuEvent = z.infer<typeof isUnregisterMenuEvent>; | ||
export declare const isMenuRegisterOptions: z.ZodObject<{ | ||
@@ -47,2 +47,2 @@ allowApi: z.ZodBoolean; | ||
}>; | ||
export declare type MenuRegisterEvent = z.infer<typeof isMenuRegisterEvent>; | ||
export type MenuRegisterEvent = z.infer<typeof isMenuRegisterEvent>; |
@@ -5,3 +5,3 @@ import { z } from "zod"; | ||
export declare const isActionMessageType: z.ZodEnum<["message", "warning"]>; | ||
export declare type ActionMessageType = z.infer<typeof isActionMessageType>; | ||
export type ActionMessageType = z.infer<typeof isActionMessageType>; | ||
export declare const isTriggerActionMessageEvent: z.ZodObject<{ | ||
@@ -20,3 +20,3 @@ message: z.ZodString; | ||
}>; | ||
export declare type TriggerActionMessageEvent = z.infer<typeof isTriggerActionMessageEvent>; | ||
export type TriggerActionMessageEvent = z.infer<typeof isTriggerActionMessageEvent>; | ||
export declare const isMessageReferenceEvent: z.ZodObject<{ | ||
@@ -29,2 +29,2 @@ uuid: z.ZodString; | ||
}>; | ||
export declare type MessageReferenceEvent = z.infer<typeof isMessageReferenceEvent>; | ||
export type MessageReferenceEvent = z.infer<typeof isMessageReferenceEvent>; |
import { z } from "zod"; | ||
export declare const isUIWebsiteCSSValue: z.ZodString; | ||
export declare type UIWebsiteCSSValue = z.infer<typeof isUIWebsiteCSSValue>; | ||
export type UIWebsiteCSSValue = z.infer<typeof isUIWebsiteCSSValue>; | ||
export declare const isUIWebsiteMargin: z.ZodObject<{ | ||
@@ -20,7 +20,7 @@ top: z.ZodOptional<z.ZodString>; | ||
}>; | ||
export declare type UIWebsiteMargin = z.infer<typeof isUIWebsiteMargin>; | ||
export type UIWebsiteMargin = z.infer<typeof isUIWebsiteMargin>; | ||
export declare const isViewportPositionVertical: z.ZodEnum<["top", "middle", "bottom"]>; | ||
export declare type ViewportPositionVertical = z.infer<typeof isViewportPositionVertical>; | ||
export type ViewportPositionVertical = z.infer<typeof isViewportPositionVertical>; | ||
export declare const isViewportPositionHorizontal: z.ZodEnum<["left", "middle", "right"]>; | ||
export declare type ViewportPositionHorizontal = z.infer<typeof isViewportPositionHorizontal>; | ||
export type ViewportPositionHorizontal = z.infer<typeof isViewportPositionHorizontal>; | ||
export declare const isUIWebsitePosition: z.ZodObject<{ | ||
@@ -30,9 +30,9 @@ vertical: z.ZodEnum<["top", "middle", "bottom"]>; | ||
}, "strip", z.ZodTypeAny, { | ||
vertical: "top" | "middle" | "bottom"; | ||
horizontal: "middle" | "left" | "right"; | ||
vertical: "top" | "bottom" | "middle"; | ||
horizontal: "left" | "right" | "middle"; | ||
}, { | ||
vertical: "top" | "middle" | "bottom"; | ||
horizontal: "middle" | "left" | "right"; | ||
vertical: "top" | "bottom" | "middle"; | ||
horizontal: "left" | "right" | "middle"; | ||
}>; | ||
export declare type UIWebsitePosition = z.infer<typeof isUIWebsitePosition>; | ||
export type UIWebsitePosition = z.infer<typeof isUIWebsitePosition>; | ||
export declare const isUIWebsiteSize: z.ZodObject<{ | ||
@@ -48,3 +48,3 @@ height: z.ZodString; | ||
}>; | ||
export declare type UIWebsiteSize = z.infer<typeof isUIWebsiteSize>; | ||
export type UIWebsiteSize = z.infer<typeof isUIWebsiteSize>; | ||
export declare const isCreateUIWebsiteEvent: z.ZodObject<{ | ||
@@ -59,7 +59,7 @@ url: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
vertical: "top" | "middle" | "bottom"; | ||
horizontal: "middle" | "left" | "right"; | ||
vertical: "top" | "bottom" | "middle"; | ||
horizontal: "left" | "right" | "middle"; | ||
}, { | ||
vertical: "top" | "middle" | "bottom"; | ||
horizontal: "middle" | "left" | "right"; | ||
vertical: "top" | "bottom" | "middle"; | ||
horizontal: "left" | "right" | "middle"; | ||
}>; | ||
@@ -77,6 +77,6 @@ size: z.ZodObject<{ | ||
margin: z.ZodOptional<z.ZodObject<{ | ||
top: z.ZodOptional<z.ZodString>; | ||
bottom: z.ZodOptional<z.ZodString>; | ||
left: z.ZodOptional<z.ZodString>; | ||
right: z.ZodOptional<z.ZodString>; | ||
top: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
bottom: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
left: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
right: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
}, "strip", z.ZodTypeAny, { | ||
@@ -105,4 +105,4 @@ top?: string | undefined; | ||
position: { | ||
vertical: "top" | "middle" | "bottom"; | ||
horizontal: "middle" | "left" | "right"; | ||
vertical: "top" | "bottom" | "middle"; | ||
horizontal: "left" | "right" | "middle"; | ||
}; | ||
@@ -125,4 +125,4 @@ size: { | ||
position: { | ||
vertical: "top" | "middle" | "bottom"; | ||
horizontal: "middle" | "left" | "right"; | ||
vertical: "top" | "bottom" | "middle"; | ||
horizontal: "left" | "right" | "middle"; | ||
}; | ||
@@ -134,3 +134,3 @@ size: { | ||
}>; | ||
export declare type CreateUIWebsiteEvent = z.infer<typeof isCreateUIWebsiteEvent>; | ||
export type CreateUIWebsiteEvent = z.infer<typeof isCreateUIWebsiteEvent>; | ||
export declare const isModifyUIWebsiteEvent: z.ZodObject<{ | ||
@@ -144,7 +144,7 @@ id: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
vertical: "top" | "middle" | "bottom"; | ||
horizontal: "middle" | "left" | "right"; | ||
vertical: "top" | "bottom" | "middle"; | ||
horizontal: "left" | "right" | "middle"; | ||
}, { | ||
vertical: "top" | "middle" | "bottom"; | ||
horizontal: "middle" | "left" | "right"; | ||
vertical: "top" | "bottom" | "middle"; | ||
horizontal: "left" | "right" | "middle"; | ||
}>>; | ||
@@ -162,6 +162,6 @@ size: z.ZodOptional<z.ZodObject<{ | ||
margin: z.ZodOptional<z.ZodObject<{ | ||
top: z.ZodOptional<z.ZodString>; | ||
bottom: z.ZodOptional<z.ZodString>; | ||
left: z.ZodOptional<z.ZodString>; | ||
right: z.ZodOptional<z.ZodString>; | ||
top: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
bottom: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
left: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
right: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
}, "strip", z.ZodTypeAny, { | ||
@@ -181,4 +181,4 @@ top?: string | undefined; | ||
position?: { | ||
vertical: "top" | "middle" | "bottom"; | ||
horizontal: "middle" | "left" | "right"; | ||
vertical: "top" | "bottom" | "middle"; | ||
horizontal: "left" | "right" | "middle"; | ||
} | undefined; | ||
@@ -200,4 +200,4 @@ visible?: boolean | undefined; | ||
position?: { | ||
vertical: "top" | "middle" | "bottom"; | ||
horizontal: "middle" | "left" | "right"; | ||
vertical: "top" | "bottom" | "middle"; | ||
horizontal: "left" | "right" | "middle"; | ||
} | undefined; | ||
@@ -217,3 +217,3 @@ visible?: boolean | undefined; | ||
}>; | ||
export declare type ModifyUIWebsiteEvent = z.infer<typeof isModifyUIWebsiteEvent>; | ||
export type ModifyUIWebsiteEvent = z.infer<typeof isModifyUIWebsiteEvent>; | ||
export declare const isUIWebsite: z.ZodObject<{ | ||
@@ -229,7 +229,7 @@ id: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
vertical: "top" | "middle" | "bottom"; | ||
horizontal: "middle" | "left" | "right"; | ||
vertical: "top" | "bottom" | "middle"; | ||
horizontal: "left" | "right" | "middle"; | ||
}, { | ||
vertical: "top" | "middle" | "bottom"; | ||
horizontal: "middle" | "left" | "right"; | ||
vertical: "top" | "bottom" | "middle"; | ||
horizontal: "left" | "right" | "middle"; | ||
}>; | ||
@@ -247,6 +247,6 @@ size: z.ZodObject<{ | ||
margin: z.ZodOptional<z.ZodObject<{ | ||
top: z.ZodOptional<z.ZodString>; | ||
bottom: z.ZodOptional<z.ZodString>; | ||
left: z.ZodOptional<z.ZodString>; | ||
right: z.ZodOptional<z.ZodString>; | ||
top: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
bottom: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
left: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
right: z.ZodOptional<z.ZodOptional<z.ZodString>>; | ||
}, "strip", z.ZodTypeAny, { | ||
@@ -274,4 +274,4 @@ top?: string | undefined; | ||
position: { | ||
vertical: "top" | "middle" | "bottom"; | ||
horizontal: "middle" | "left" | "right"; | ||
vertical: "top" | "bottom" | "middle"; | ||
horizontal: "left" | "right" | "middle"; | ||
}; | ||
@@ -295,4 +295,4 @@ id: string; | ||
position: { | ||
vertical: "top" | "middle" | "bottom"; | ||
horizontal: "middle" | "left" | "right"; | ||
vertical: "top" | "bottom" | "middle"; | ||
horizontal: "left" | "right" | "middle"; | ||
}; | ||
@@ -306,2 +306,2 @@ id: string; | ||
}>; | ||
export declare type UIWebsite = z.infer<typeof isUIWebsite>; | ||
export type UIWebsite = z.infer<typeof isUIWebsite>; |
@@ -12,2 +12,2 @@ import { z } from "zod"; | ||
*/ | ||
export declare type UserInputChatEvent = z.infer<typeof isUserInputChatEvent>; | ||
export type UserInputChatEvent = z.infer<typeof isUserInputChatEvent>; |
@@ -24,3 +24,3 @@ import { z } from "zod"; | ||
*/ | ||
export declare type WasCameraUpdatedEvent = z.infer<typeof isWasCameraUpdatedEvent>; | ||
export declare type WasCameraUpdatedEventCallback = (event: WasCameraUpdatedEvent) => void; | ||
export type WasCameraUpdatedEvent = z.infer<typeof isWasCameraUpdatedEvent>; | ||
export type WasCameraUpdatedEventCallback = (event: WasCameraUpdatedEvent) => void; |
@@ -46,2 +46,2 @@ import { z } from "zod"; | ||
}>; | ||
export declare type XmppSettingsMessageEvent = z.infer<typeof isXmppSettingsMessageEvent>; | ||
export type XmppSettingsMessageEvent = z.infer<typeof isXmppSettingsMessageEvent>; |
import type { ITiledMapObject } from "@workadventure/tiled-map-type-guard"; | ||
import type { CreateAreaEvent } from "../../Events/CreateAreaEvent"; | ||
export declare type IArea = Omit<ITiledMapObject, "id" | "gid" | "visible" | "rotation" | "ellipse" | "polygon" | "polyline">; | ||
export type IArea = Omit<ITiledMapObject, "id" | "gid" | "visible" | "rotation" | "ellipse" | "polygon" | "polyline">; | ||
export declare class Area implements IArea { | ||
@@ -5,0 +5,0 @@ private config; |
@@ -154,3 +154,3 @@ import { IframeApiContribution } from "./IframeApiContribution"; | ||
} | ||
export declare type Position = { | ||
export type Position = { | ||
x: number; | ||
@@ -157,0 +157,0 @@ y: number; |
@@ -38,3 +38,3 @@ import type { AddPlayerEvent } from "../../Events/AddPlayerEvent"; | ||
} | ||
export declare type ReadOnlyState = { | ||
export type ReadOnlyState = { | ||
onVariableChange(key: string): Observable<unknown>; | ||
@@ -41,0 +41,0 @@ } & { |
/** | ||
* A copy of the SoundConfig type from Phaser | ||
*/ | ||
export declare type SoundConfig = { | ||
export type SoundConfig = { | ||
/** | ||
@@ -6,0 +6,0 @@ * Boolean indicating whether the sound should be muted or not. |
@@ -13,2 +13,3 @@ import { IframeApiContribution } from "./IframeApiContribution"; | ||
import { WorkAdventureButtonActionBarCommands } from "./Ui/ButtonActionBar"; | ||
import { WorkadventureBannerCommands } from "./Ui/Banner"; | ||
interface MenuDescriptor { | ||
@@ -19,3 +20,3 @@ callback?: (commandDescriptor: string) => void; | ||
} | ||
export declare type MenuOptions = RequireOnlyOne<MenuDescriptor, "callback" | "iframe">; | ||
export type MenuOptions = RequireOnlyOne<MenuDescriptor, "callback" | "iframe">; | ||
export interface ActionMessageOptions { | ||
@@ -118,4 +119,5 @@ message: string; | ||
get actionBar(): WorkAdventureButtonActionBarCommands; | ||
get banner(): WorkadventureBannerCommands; | ||
} | ||
declare const _default: WorkAdventureUiCommands; | ||
export default _default; |
import { AddButtonActionBarEvent } from "../../Events/Ui/ButtonActionBarEvent"; | ||
import { IframeApiContribution } from "../IframeApiContribution"; | ||
export declare type ButtonActionBarClickedCallback = (buttonActionBar: AddButtonActionBarEvent) => void; | ||
export declare type ActionBarButtonDescriptor = { | ||
export type ButtonActionBarClickedCallback = (buttonActionBar: AddButtonActionBarEvent) => void; | ||
declare const ActionBarButtonType: { | ||
readonly button: "button"; | ||
readonly action: "action"; | ||
}; | ||
type ActionBarButtonType = (typeof ActionBarButtonType)[keyof typeof ActionBarButtonType]; | ||
export type ActionBarClassicButtonDescriptor = { | ||
id: string; | ||
label: string; | ||
type?: ActionBarButtonType; | ||
callback?: ButtonActionBarClickedCallback; | ||
}; | ||
export type ActionBarActionButtonDescriptor = { | ||
id: string; | ||
type: ActionBarButtonType; | ||
imageSrc: string; | ||
toolTip: string; | ||
callback?: ButtonActionBarClickedCallback; | ||
}; | ||
export declare class WorkAdventureButtonActionBarCommands extends IframeApiContribution<WorkAdventureButtonActionBarCommands> { | ||
@@ -14,4 +27,10 @@ private _callbacks; | ||
callback: (event: { | ||
type: "button"; | ||
id: string; | ||
label: string; | ||
} | { | ||
type: "action"; | ||
id: string; | ||
imageSrc: string; | ||
toolTip: string; | ||
}) => void; | ||
@@ -23,3 +42,3 @@ }[]; | ||
*/ | ||
addButton(descriptor: ActionBarButtonDescriptor): void; | ||
addButton(descriptor: ActionBarClassicButtonDescriptor | ActionBarActionButtonDescriptor): void; | ||
/** | ||
@@ -26,0 +45,0 @@ * Remove action bar button |
import type { Popup } from "./Popup"; | ||
export declare type ButtonClickedCallback = (popup: Popup) => void; | ||
export type ButtonClickedCallback = (popup: Popup) => void; | ||
export interface ButtonDescriptor { | ||
@@ -4,0 +4,0 @@ /** |
@@ -44,4 +44,11 @@ import type { CreateUIWebsiteEvent, UIWebsiteMargin, UIWebsitePosition, UIWebsiteSize, UIWebsite as UIWebsiteCore } from "../../Events/Ui/UIWebsite"; | ||
getAll(): Promise<UIWebsite[]>; | ||
/** | ||
* Returns one UI website (iframe positionned on the viewport) by ID. | ||
* {@link https://workadventu.re/map-building/api-ui.md#get-all-ui-websites | Website documentation} | ||
* @param {string} id The id of the UIWebsite | ||
* @returns {Promise<UIWebsite | undefined>} Promise to return UI website | ||
*/ | ||
getById(id: string): Promise<UIWebsite | undefined>; | ||
} | ||
declare const _default: UIWebsiteCommands; | ||
export default _default; |
@@ -1,3 +0,3 @@ | ||
export declare type RequireOnlyOne<T, keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, keys>> & { | ||
export type RequireOnlyOne<T, keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, keys>> & { | ||
[K in keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<keys, K>, undefined>>; | ||
}[keys]; |
@@ -44,2 +44,10 @@ import type { CoWebsite } from "./front/Api/Iframe/nav"; | ||
/** | ||
* The iframeId (only set if the code is executed from a UIWebsite iframe) | ||
* Important: You need to wait for the end of the initialization before accessing. | ||
* {@link https://workadventu.re/map-building/api-ui.md#get-ui-website-by-id | Website documentation} | ||
* | ||
* @returns {string|undefined} IframeId | ||
*/ | ||
readonly iframeId: string | undefined; | ||
/** | ||
* @deprecated Use WA.chat.sendChatMessage instead | ||
@@ -105,3 +113,3 @@ */ | ||
}; | ||
export declare type WorkAdventureApi = typeof wa; | ||
export type WorkAdventureApi = typeof wa; | ||
export type { Sound, Popup, ButtonDescriptor, CoWebsite }; | ||
@@ -108,0 +116,0 @@ declare global { |
{ | ||
"name": "@workadventure/iframe-api-typings", | ||
"version": "v1.14.8", | ||
"version": "v1.15.3", | ||
"description": "Typescript typings for WorkAdventure iFrame API", | ||
@@ -5,0 +5,0 @@ "main": "iframe_api.js", |
Sorry, the diff of this file is too big to display
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
216013
5.55%92
2.22%6837
5.89%