@caido/sdk-frontend 0.49.1-beta.4 → 0.49.1-beta.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caido/sdk-frontend",
3
- "version": "0.49.1-beta.4",
3
+ "version": "0.49.1-beta.5",
4
4
  "description": "Typing for the Caido Frontend SDK",
5
5
  "author": "Caido Labs Inc. <dev@caido.io>",
6
6
  "license": "MIT",
@@ -1,6 +1,6 @@
1
1
  import type { Editor } from "../types/editor";
2
2
  import type { ComponentDefinition } from "../types/utils";
3
- import { type DialogOptions } from "../types/window";
3
+ import { type Dialog, type DialogOptions } from "../types/window";
4
4
  /**
5
5
  * Utilities to interact with the active page.
6
6
  * @category Window
@@ -32,6 +32,7 @@ export type WindowSDK = {
32
32
  * @param options.modal Whether the dialog is modal. Defaults to true
33
33
  * @param options.position The position of the dialog on the screen. Defaults to center
34
34
  * @param options.closable Whether the close icon is hidden . Defaults to false
35
+ * @returns A dialog object that can be used to close the dialog.
35
36
  */
36
- showDialog: (component: ComponentDefinition, options?: DialogOptions) => void;
37
+ showDialog: (component: ComponentDefinition, options?: DialogOptions) => Dialog;
37
38
  };
@@ -6,3 +6,6 @@ export type DialogOptions = {
6
6
  modal?: boolean;
7
7
  position?: "left" | "right" | "top" | "bottom" | "center" | "topleft" | "topright" | "bottomleft" | "bottomright";
8
8
  };
9
+ export type Dialog = {
10
+ close: () => void;
11
+ };