@caido/sdk-frontend 0.48.2-beta.3 → 0.48.2-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caido/sdk-frontend",
3
- "version": "0.48.2-beta.3",
3
+ "version": "0.48.2-beta.4",
4
4
  "description": "Typing for the Caido Frontend SDK",
5
5
  "author": "Caido Labs Inc. <dev@caido.io>",
6
6
  "license": "MIT",
@@ -2,7 +2,9 @@ import { type Extension } from "@codemirror/state";
2
2
  import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent, type DefineAddToSlotFn } from "./slots";
3
3
  import type { ID } from "./utils";
4
4
  export declare const ReplaySlot: {
5
- readonly SessionToolbar: "session-toolbar";
5
+ readonly SessionToolbarPrimary: "session-toolbar-primary";
6
+ readonly SessionToolbarSecondary: "session-toolbar-secondary";
7
+ readonly Topbar: "topbar";
6
8
  };
7
9
  export type ReplaySlot = (typeof ReplaySlot)[keyof typeof ReplaySlot];
8
10
  /**
@@ -122,9 +124,33 @@ export type ReplaySDK = {
122
124
  * Add a component to a slot.
123
125
  * @param slot The slot to add the component to.
124
126
  * @param content The content to add to the slot.
127
+ * @example
128
+ * ```ts
129
+ * addToSlot(ReplaySlot.SessionToolbar, {
130
+ * kind: "Command",
131
+ * commandId: "my-command",
132
+ * icon: "my-icon",
133
+ * });
134
+ *
135
+ * addToSlot(ReplaySlot.SessionToolbar, {
136
+ * kind: "Custom",
137
+ * component: MyComponent,
138
+ * });
139
+ *
140
+ * addToSlot(ReplaySlot.SessionToolbar, {
141
+ * kind: "Button",
142
+ * label: "My Button",
143
+ * icon: "my-icon",
144
+ * onClick: () => {
145
+ * console.log("Button clicked");
146
+ * },
147
+ * });
148
+ * ```
125
149
  */
126
150
  addToSlot: DefineAddToSlotFn<{
127
- [ReplaySlot.SessionToolbar]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
151
+ [ReplaySlot.SessionToolbarPrimary]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
152
+ [ReplaySlot.SessionToolbarSecondary]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
153
+ [ReplaySlot.Topbar]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
128
154
  }>;
129
155
  /**
130
156
  * Add an extension to the request editor.