@wvdsh/sdk-js 1.2.3 → 1.2.4
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/dist/index.d.ts +7 -3
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ interface RemoteFileMetadata {
|
|
|
73
73
|
}
|
|
74
74
|
interface EngineInstance {
|
|
75
75
|
type: (typeof GAME_ENGINE)[keyof typeof GAME_ENGINE];
|
|
76
|
-
SendMessage(objectName: string, methodName: WavedashEvent, value?: string | number
|
|
76
|
+
SendMessage(objectName: string, methodName: WavedashEvent, value?: string | number): void;
|
|
77
77
|
FS: {
|
|
78
78
|
readFile(path: string, opts?: Record<string, unknown>): string | Uint8Array;
|
|
79
79
|
writeFile(path: string, data: string | ArrayBufferView, opts?: Record<string, unknown>): void;
|
|
@@ -185,6 +185,10 @@ interface BackendConnectionPayload {
|
|
|
185
185
|
connectionCount: number;
|
|
186
186
|
connectionRetries: number;
|
|
187
187
|
}
|
|
188
|
+
/** Payload for FullscreenChanged event - emitted when fullscreen state flips */
|
|
189
|
+
interface FullscreenChangedPayload {
|
|
190
|
+
isFullscreen: boolean;
|
|
191
|
+
}
|
|
188
192
|
interface P2PPeer {
|
|
189
193
|
userId: GenericId<"users">;
|
|
190
194
|
username: string;
|
|
@@ -586,7 +590,7 @@ declare class GameEventManager {
|
|
|
586
590
|
private sdk;
|
|
587
591
|
private eventQueue;
|
|
588
592
|
constructor(sdk: WavedashSDK);
|
|
589
|
-
notifyGame(event: WavedashEvent, payload: string | number |
|
|
593
|
+
notifyGame(event: WavedashEvent, payload: string | number | object): void;
|
|
590
594
|
private sendGameEvent;
|
|
591
595
|
flushEventQueue(): void;
|
|
592
596
|
}
|
|
@@ -1051,4 +1055,4 @@ declare class WavedashSDK extends EventTarget {
|
|
|
1051
1055
|
|
|
1052
1056
|
declare function setupWavedashSDK(): WavedashSDK;
|
|
1053
1057
|
|
|
1054
|
-
export { AVATAR_SIZE_LARGE, AVATAR_SIZE_MEDIUM, AVATAR_SIZE_SMALL, type BackendConnectionPayload, type EngineInstance, type Friend, type Leaderboard, type LeaderboardDisplayType, type LeaderboardEntries, type LeaderboardSortOrder, type Lobby, type LobbyDataUpdatedPayload, type LobbyInvite, type LobbyInvitePayload, type LobbyJoinResponse, type LobbyJoinedPayload, type LobbyKickedPayload, LobbyKickedReason, type LobbyMessage, type LobbyMessagePayload, type LobbyUser, LobbyUserChangeType, type LobbyUsersUpdatedPayload, type LobbyVisibility, type P2PConfig, type P2PConnection, type P2PConnectionEstablishedPayload, type P2PConnectionFailedPayload, type P2PMessage, type P2PPacketDropReason, type P2PPacketDroppedPayload, type P2PPeer, type P2PPeerDisconnectedPayload, type P2PPeerReconnectedPayload, type P2PPeerReconnectingPayload, type P2PSignalingMessage, type P2PTurnCredentials, type RemoteFileMetadata, type StatsStoredPayload, type UGCType, type UGCVisibility, type UpsertedLeaderboardEntry, type WavedashConfig, type WavedashEvent, WavedashEvents, type WavedashResponse, WavedashSDK, setupWavedashSDK };
|
|
1058
|
+
export { AVATAR_SIZE_LARGE, AVATAR_SIZE_MEDIUM, AVATAR_SIZE_SMALL, type BackendConnectionPayload, type EngineInstance, type Friend, type FullscreenChangedPayload, type Leaderboard, type LeaderboardDisplayType, type LeaderboardEntries, type LeaderboardSortOrder, type Lobby, type LobbyDataUpdatedPayload, type LobbyInvite, type LobbyInvitePayload, type LobbyJoinResponse, type LobbyJoinedPayload, type LobbyKickedPayload, LobbyKickedReason, type LobbyMessage, type LobbyMessagePayload, type LobbyUser, LobbyUserChangeType, type LobbyUsersUpdatedPayload, type LobbyVisibility, type P2PConfig, type P2PConnection, type P2PConnectionEstablishedPayload, type P2PConnectionFailedPayload, type P2PMessage, type P2PPacketDropReason, type P2PPacketDroppedPayload, type P2PPeer, type P2PPeerDisconnectedPayload, type P2PPeerReconnectedPayload, type P2PPeerReconnectingPayload, type P2PSignalingMessage, type P2PTurnCredentials, type RemoteFileMetadata, type StatsStoredPayload, type UGCType, type UGCVisibility, type UpsertedLeaderboardEntry, type WavedashConfig, type WavedashEvent, WavedashEvents, type WavedashResponse, WavedashSDK, setupWavedashSDK };
|
package/dist/index.js
CHANGED
|
@@ -6967,7 +6967,7 @@ var FullscreenManager = class {
|
|
|
6967
6967
|
(data) => {
|
|
6968
6968
|
this.sdk.gameEventManager.notifyGame(
|
|
6969
6969
|
WavedashEvents.FULLSCREEN_CHANGED,
|
|
6970
|
-
data.isFullscreen
|
|
6970
|
+
{ isFullscreen: data.isFullscreen }
|
|
6971
6971
|
);
|
|
6972
6972
|
this.setState(data.isFullscreen);
|
|
6973
6973
|
}
|