@workadventure/iframe-api-typings 1.14.7 → 1.14.8

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,6 +1,11 @@
1
1
  import { AddButtonActionBarEvent } from "../../Events/Ui/ButtonActionBarEvent";
2
2
  import { IframeApiContribution } from "../IframeApiContribution";
3
3
  export declare type ButtonActionBarClickedCallback = (buttonActionBar: AddButtonActionBarEvent) => void;
4
+ export declare type ActionBarButtonDescriptor = {
5
+ id: string;
6
+ label: string;
7
+ callback?: ButtonActionBarClickedCallback;
8
+ };
4
9
  export declare class WorkAdventureButtonActionBarCommands extends IframeApiContribution<WorkAdventureButtonActionBarCommands> {
5
10
  private _callbacks;
6
11
  callbacks: {
@@ -13,17 +18,11 @@ export declare class WorkAdventureButtonActionBarCommands extends IframeApiContr
13
18
  /**
14
19
  * Add action bar button
15
20
  * {@link http://workadventure.localhost/map-building/api-ui.md#add-action-bar | Website documentation}
16
- *
17
- * @param id
18
- * @param label
19
- * @param callback
20
21
  */
21
- addButton(id: string, label: string, callback?: ButtonActionBarClickedCallback): void;
22
+ addButton(descriptor: ActionBarButtonDescriptor): void;
22
23
  /**
23
24
  * Remove action bar button
24
25
  * {@link http://workadventure.localhost/map-building/api-ui.md#remove-action-bar | Website documentation}
25
- *
26
- * @param id
27
26
  */
28
27
  removeButton(id: string): void;
29
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workadventure/iframe-api-typings",
3
- "version": "v1.14.7",
3
+ "version": "v1.14.8",
4
4
  "description": "Typescript typings for WorkAdventure iFrame API",
5
5
  "main": "iframe_api.js",
6
6
  "types": "iframe_api.d.ts",