@workadventure/iframe-api-typings 1.17.6 → 1.17.7

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.
@@ -1,3 +1,4 @@
1
+ import { Subscription } from "rxjs";
1
2
  import { IframeApiContribution } from "./IframeApiContribution";
2
3
  export declare class WorkadventureChatCommands extends IframeApiContribution<WorkadventureChatCommands> {
3
4
  callbacks: {
@@ -29,8 +30,9 @@ export declare class WorkadventureChatCommands extends IframeApiContribution<Wor
29
30
  * {@link https://workadventu.re/map-building/api-chat.md#listening-to-messages-from-the-chat | Website documentation}
30
31
  *
31
32
  * @param {function(string): void} callback Function that will be called when a message is received. It contains the message typed by the user
33
+ * @return {Subscription} Subscription to the chat message. Call ".unsubscribe()" to stop listening to the chat.
32
34
  */
33
- onChatMessage(callback: (message: string) => void): void;
35
+ onChatMessage(callback: (message: string) => void): Subscription;
34
36
  }
35
37
  declare const _default: WorkadventureChatCommands;
36
38
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { Subscription } from "rxjs";
1
2
  import type { HasPlayerMovedEventCallback } from "../Events/HasPlayerMovedEvent";
2
3
  import { IframeApiContribution } from "./IframeApiContribution";
3
4
  import type { WorkadventureProximityMeetingCommands } from "./Player/ProximityMeeting";
@@ -86,8 +87,9 @@ export declare class WorkadventurePlayerCommands extends IframeApiContribution<W
86
87
  * {@link https://workadventu.re/map-building/api-player.md#listen-to-player-movement | Website documentation}
87
88
  *
88
89
  * @param {HasPlayerMovedEventCallback} callback Function that will be called when the current player is moving. It contains the event
90
+ * @return {Subscription} Subscription to the stream. Use ".unsubscribe()" to stop listening.
89
91
  */
90
- onPlayerMove(callback: HasPlayerMovedEventCallback): void;
92
+ onPlayerMove(callback: HasPlayerMovedEventCallback): Subscription;
91
93
  /**
92
94
  * Player will try to find the shortest path to the destination point and proceed to move there.
93
95
  * {@link https://workadventu.re/map-building/api-player.md#move-player-to-position | Website documentation}
@@ -1,4 +1,5 @@
1
1
  import type { Observable } from "rxjs";
2
+ import { Subscription } from "rxjs";
2
3
  import type { ITiledMap } from "@workadventure/tiled-map-type-guard";
3
4
  import { IframeApiContribution } from "./IframeApiContribution";
4
5
  import type { WorkadventureRoomWebsiteCommands } from "./website";
@@ -36,11 +37,11 @@ export declare class WorkadventureRoomCommands extends IframeApiContribution<Wor
36
37
  /**
37
38
  * @deprecated Use onEnterLayer instead
38
39
  */
39
- onEnterZone(name: string, callback: () => void): void;
40
+ onEnterZone(name: string, callback: () => void): Subscription;
40
41
  /**
41
42
  * @deprecated Use onLeaveLayer instead
42
43
  */
43
- onLeaveZone(name: string, callback: () => void): void;
44
+ onLeaveZone(name: string, callback: () => void): Subscription;
44
45
  /**
45
46
  * Listens to the position of the current user. The event is triggered when the user enters a given layer.
46
47
  * {@link https://workadventu.re/map-building/api-room.md#detecting-when-the-user-entersleaves-a-layer | Website documentation}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workadventure/iframe-api-typings",
3
- "version": "v1.17.6",
3
+ "version": "v1.17.7",
4
4
  "description": "Typescript typings for WorkAdventure iFrame API",
5
5
  "main": "iframe_api.js",
6
6
  "types": "iframe_api.d.ts",