@workadventure/iframe-api-typings 1.27.9 → 1.27.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/Iframe/AbstractEvent.d.ts +1 -1
- package/play/src/front/Api/Iframe/CheckedIframeMessagePort.d.ts +3 -3
- package/play/src/front/Api/Iframe/IframeApiContribution.d.ts +2 -2
- package/play/src/front/Api/Iframe/MapEditor/MapEditorArea.d.ts +1 -1
- package/play/src/front/Api/Iframe/Players/RemotePlayer.d.ts +1 -1
- package/play/src/front/Api/Iframe/PublicPlayerState.d.ts +1 -1
- package/play/src/front/Api/Iframe/Spaces/Space.d.ts +2 -2
- package/play/src/front/Api/Iframe/Spaces/SpaceUser.d.ts +2 -2
- package/play/src/front/Api/Iframe/Ui/Banner.d.ts +1 -1
- package/play/src/front/Api/Iframe/Ui/ButtonActionBar.d.ts +1 -1
- package/play/src/front/Api/Iframe/chat.d.ts +4 -4
- package/play/src/front/Api/Iframe/mapEditor.d.ts +1 -1
- package/play/src/front/Api/Iframe/player.d.ts +1 -1
- package/play/src/front/Api/Iframe/playerState.d.ts +2 -2
- package/play/src/front/Api/Iframe/players.d.ts +1 -1
- package/play/src/front/Api/Iframe/room.d.ts +1 -2
- package/play/src/front/Api/Iframe/state.d.ts +1 -1
- package/play/src/front/Api/Iframe/ui.d.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Observable } from "rxjs";
|
|
2
2
|
import { Subject } from "rxjs";
|
|
3
|
-
import { ReceiveEventEvent } from "../Events/ReceiveEventEvent";
|
|
3
|
+
import type { ReceiveEventEvent } from "../Events/ReceiveEventEvent";
|
|
4
4
|
export type ScriptingEvent = ReceiveEventEvent;
|
|
5
5
|
export declare abstract class AbstractWorkadventureEventCommands {
|
|
6
6
|
protected receivedEventResolvers: Subject<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { Observable } from "rxjs";
|
|
3
|
-
import { IframeMessagePortMap, MessagePortIframeEvent, MessagePortWorkAdventureEvent } from "../Events/MessagePortEvents";
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
import type { Observable } from "rxjs";
|
|
3
|
+
import type { IframeMessagePortMap, MessagePortIframeEvent, MessagePortWorkAdventureEvent } from "../Events/MessagePortEvents";
|
|
4
4
|
type MessagePortMessageEvent<K extends keyof IframeMessagePortMap> = MessageEvent<z.infer<MessagePortWorkAdventureEvent<K>["data"]>>;
|
|
5
5
|
/**
|
|
6
6
|
* A wrapper around a MessagePort that ensures the messages sent and received conform to a specific type.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IframeMessagePortData, IframeMessagePortMap } from "../Events/MessagePortEvents";
|
|
2
|
-
import { IframeEvent, IframeQuery, IframeQueryMap } from "../Events/IframeEvent";
|
|
1
|
+
import type { IframeMessagePortData, IframeMessagePortMap } from "../Events/MessagePortEvents";
|
|
2
|
+
import type { 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, {
|
|
@@ -3,7 +3,7 @@ import { Subject } from "rxjs";
|
|
|
3
3
|
import type { AddPlayerEvent } from "../../Events/AddPlayerEvent";
|
|
4
4
|
import type { PlayerPosition } from "../../Events/PlayerPosition";
|
|
5
5
|
import { ActionsMenuAction } from "../ui";
|
|
6
|
-
import { PublicPlayerState, ReadOnlyPublicPlayerState } from "../PublicPlayerState";
|
|
6
|
+
import type { PublicPlayerState, ReadOnlyPublicPlayerState } from "../PublicPlayerState";
|
|
7
7
|
export interface RemotePlayerInterface {
|
|
8
8
|
/**
|
|
9
9
|
* A unique ID for this player. Each character on the map has a unique ID
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Observable } from "rxjs";
|
|
1
|
+
import type { Observable } from "rxjs";
|
|
2
2
|
/**
|
|
3
3
|
* PublicPlayerState is the part of the state of a player that is shared with other players.
|
|
4
4
|
* The interface is empty. It is meant to be extended by the ScriptingAPI developers to add custom properties.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
|
-
import { CheckedIframeMessagePort } from "../CheckedIframeMessagePort";
|
|
3
|
-
import { SpaceUser } from "./SpaceUser";
|
|
2
|
+
import type { CheckedIframeMessagePort } from "../CheckedIframeMessagePort";
|
|
3
|
+
import type { SpaceUser } from "./SpaceUser";
|
|
4
4
|
export declare class Space {
|
|
5
5
|
private readonly port;
|
|
6
6
|
private watchCount;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Observable } from "rxjs";
|
|
2
|
-
import { NewSpaceUserEvent } from "../../Events/NewSpaceUserEvent";
|
|
1
|
+
import type { Observable } from "rxjs";
|
|
2
|
+
import type { NewSpaceUserEvent } from "../../Events/NewSpaceUserEvent";
|
|
3
3
|
export type SpaceUser = NewSpaceUserEvent & {
|
|
4
4
|
reactiveUser: ReactiveSpaceUser;
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IframeApiContribution } from "../IframeApiContribution";
|
|
2
|
-
import { BannerEvent } from "./../../Events/Ui/BannerEvent";
|
|
2
|
+
import type { BannerEvent } from "./../../Events/Ui/BannerEvent";
|
|
3
3
|
export declare class WorkadventureBannerCommands extends IframeApiContribution<WorkadventureBannerCommands> {
|
|
4
4
|
callbacks: never[];
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AddButtonActionBarEvent } from "../../Events/Ui/ButtonActionBarEvent";
|
|
1
|
+
import type { AddButtonActionBarEvent } from "../../Events/Ui/ButtonActionBarEvent";
|
|
2
2
|
import { IframeApiContribution } from "../IframeApiContribution";
|
|
3
3
|
export type ButtonActionBarClickedCallback = (buttonActionBar: AddButtonActionBarEvent) => void;
|
|
4
4
|
export type ActionBarButtonDescriptor = AddButtonActionBarEvent & {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Subscription } from "rxjs";
|
|
2
|
-
import { SendChatMessageOptions } from "@workadventure/shared-utils";
|
|
1
|
+
import type { Subscription } from "rxjs";
|
|
2
|
+
import type { SendChatMessageOptions } from "@workadventure/shared-utils";
|
|
3
3
|
import { IframeApiContribution } from "./IframeApiContribution";
|
|
4
|
-
import { RemotePlayerInterface } from "./Players/RemotePlayer";
|
|
5
|
-
import { PublicPlayerState } from "./PublicPlayerState";
|
|
4
|
+
import type { RemotePlayerInterface } from "./Players/RemotePlayer";
|
|
5
|
+
import type { PublicPlayerState } from "./PublicPlayerState";
|
|
6
6
|
export interface OnChatMessageOptions {
|
|
7
7
|
scope: "local" | "bubble";
|
|
8
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Observable } from "rxjs";
|
|
2
2
|
import { IframeApiContribution } from "./IframeApiContribution";
|
|
3
|
-
import { MapEditorArea } from "./MapEditor/MapEditorArea";
|
|
3
|
+
import type { MapEditorArea } from "./MapEditor/MapEditorArea";
|
|
4
4
|
declare class WorkadventureMapEditorAreaCommands extends IframeApiContribution<WorkadventureMapEditorAreaCommands> {
|
|
5
5
|
callbacks: ({
|
|
6
6
|
type: "enterMapEditorAreaEvent";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Subscription } from "rxjs";
|
|
1
|
+
import type { Subscription } from "rxjs";
|
|
2
2
|
import type { HasPlayerMovedEventCallback } from "../Events/HasPlayerMovedEvent";
|
|
3
3
|
import { IframeApiContribution } from "./IframeApiContribution";
|
|
4
4
|
import { WorkadventureProximityMeetingCommands } from "./Player/ProximityMeeting";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AbstractWorkadventureStateCommands } from "./AbstractState";
|
|
2
|
-
import { PrivatePlayerState } from "./PrivatePlayerState";
|
|
3
|
-
import { PublicPlayerState } from "./PublicPlayerState";
|
|
2
|
+
import type { PrivatePlayerState } from "./PrivatePlayerState";
|
|
3
|
+
import type { PublicPlayerState } from "./PublicPlayerState";
|
|
4
4
|
type PlayerState = PublicPlayerState & PrivatePlayerState;
|
|
5
5
|
export declare class WorkadventurePlayerStateCommands extends AbstractWorkadventureStateCommands<PlayerState> {
|
|
6
6
|
constructor();
|
|
@@ -2,7 +2,7 @@ import type { Observable } from "rxjs";
|
|
|
2
2
|
import { IframeApiContribution } from "./IframeApiContribution";
|
|
3
3
|
import type { RemotePlayerInterface, RemotePlayerMoved } from "./Players/RemotePlayer";
|
|
4
4
|
import { RemotePlayer } from "./Players/RemotePlayer";
|
|
5
|
-
import { PublicPlayerState } from "./PublicPlayerState";
|
|
5
|
+
import type { PublicPlayerState } from "./PublicPlayerState";
|
|
6
6
|
export interface PlayerVariableChanged<V> {
|
|
7
7
|
player: RemotePlayer;
|
|
8
8
|
value: V;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { Observable } from "rxjs";
|
|
2
|
-
import { Subscription } from "rxjs";
|
|
1
|
+
import type { Observable, Subscription } from "rxjs";
|
|
3
2
|
import type { ITiledMap } from "@workadventure/tiled-map-type-guard";
|
|
4
3
|
import { IframeApiContribution } from "./IframeApiContribution";
|
|
5
4
|
import type { WorkadventureRoomWebsiteCommands } from "./website";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AbstractWorkadventureStateCommands } from "./AbstractState";
|
|
2
|
-
import { RoomState } from "./RoomState";
|
|
2
|
+
import type { RoomState } from "./RoomState";
|
|
3
3
|
export declare class WorkadventureStateCommands extends AbstractWorkadventureStateCommands<RoomState> {
|
|
4
4
|
constructor();
|
|
5
5
|
callbacks: {
|
|
@@ -1,7 +1,7 @@
|
|
|
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";
|
|
4
|
+
import type { VideoConfig } from "../Events/Ui/PlayVideoEvent";
|
|
5
5
|
import { IframeApiContribution } from "./IframeApiContribution";
|
|
6
6
|
import type { ButtonDescriptor } from "./Ui/ButtonDescriptor";
|
|
7
7
|
import { Popup } from "./Ui/Popup";
|
|
@@ -11,8 +11,8 @@ import { Menu } from "./Ui/Menu";
|
|
|
11
11
|
import type { UIWebsiteCommands } from "./Ui/UIWebsite";
|
|
12
12
|
import { RemotePlayer } from "./Players/RemotePlayer";
|
|
13
13
|
import type { WorkadventureModalCommands } from "./Ui/Modal";
|
|
14
|
-
import { WorkAdventureButtonActionBarCommands } from "./Ui/ButtonActionBar";
|
|
15
|
-
import { WorkadventureBannerCommands } from "./Ui/Banner";
|
|
14
|
+
import type { WorkAdventureButtonActionBarCommands } from "./Ui/ButtonActionBar";
|
|
15
|
+
import type { WorkadventureBannerCommands } from "./Ui/Banner";
|
|
16
16
|
import { Video } from "./Ui/Video";
|
|
17
17
|
interface MenuDescriptor {
|
|
18
18
|
callback?: (commandDescriptor: string) => void;
|