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

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.5",
3
+ "version": "0.49.1-beta.6",
4
4
  "description": "Typing for the Caido Frontend SDK",
5
5
  "author": "Caido Labs Inc. <dev@caido.io>",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  import { type Extension } from "@codemirror/state";
2
- import { type ReplayCollection, type ReplaySession, type ReplaySlotContent, type ReplayTab } from "../types/replay";
2
+ import { type OpenTabOptions, type ReplayCollection, type ReplaySession, type ReplaySlotContent, type ReplayTab } from "../types/replay";
3
3
  import { type DefineAddToSlotFn } from "../types/slots";
4
4
  import type { ID } from "../types/utils";
5
5
  /**
@@ -10,8 +10,9 @@ export type ReplaySDK = {
10
10
  /**
11
11
  * Open a replay tab for the given session.
12
12
  * @param sessionId The ID of the session to open.
13
+ * @param options The options for opening the tab.
13
14
  */
14
- openTab: (sessionId: ID) => void;
15
+ openTab: (sessionId: ID, options?: OpenTabOptions) => void;
15
16
  /**
16
17
  * Close a replay tab for the given session.
17
18
  * @param sessionId The ID of the session to close.
@@ -11,6 +11,17 @@ export type ReplaySlotContent = {
11
11
  [ReplaySlot.SessionToolbarSecondary]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
12
12
  [ReplaySlot.Topbar]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
13
13
  };
14
+ /**
15
+ * Options for opening a tab.
16
+ * @category Replay
17
+ */
18
+ export type OpenTabOptions = {
19
+ /**
20
+ * Whether to select the tab after opening it.
21
+ * Defaults to true.
22
+ */
23
+ select?: boolean;
24
+ };
14
25
  /**
15
26
  * A replay tab.
16
27
  * @category Replay