@caido/sdk-frontend 0.53.2-beta.5 → 0.53.2-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
package/src/types/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export type { DialogOptions } from "./types/window";
|
|
|
3
3
|
export type { CommandContext, CommandContextRequest, CommandContextRequestRow, CommandContextResponse, CommandContextBase, } from "./types/commands";
|
|
4
4
|
export type { MenuItem } from "./types/menu";
|
|
5
5
|
export { type ReplayTab, type ReplaySession, type ReplayEntry, type ReplayCollection, type SendRequestOptions, ReplaySlot, type ReplaySlotContent, type RequestSource, type CurrentReplaySessionChangeEvent, } from "./types/replay";
|
|
6
|
+
export { SearchSlot, type SearchSlotContent } from "./types/search";
|
|
6
7
|
export type { HostedFile } from "./types/files";
|
|
7
8
|
export { FilterSlot, type Filter, type FilterSlotContent, } from "./types/filter";
|
|
8
9
|
export type { HTTPQL, ID, ComponentDefinition } from "./types/utils";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Extension } from "@codemirror/state";
|
|
2
2
|
import type { RequestViewModeOptions } from "../types/request";
|
|
3
|
+
import type { SearchSlot, SearchSlotContent } from "../types/search";
|
|
3
4
|
import type { HTTPQL, ID } from "../types/utils";
|
|
4
5
|
/**
|
|
5
6
|
* Utilities to interact with the Search page.
|
|
@@ -41,4 +42,10 @@ export type SearchSDK = {
|
|
|
41
42
|
* @param id The ID of the request to scroll to.
|
|
42
43
|
*/
|
|
43
44
|
scrollTo: (id: ID) => void;
|
|
45
|
+
/**
|
|
46
|
+
* Add content to a slot in the Search UI.
|
|
47
|
+
* @param slot The slot to add content to.
|
|
48
|
+
* @param content The content to add.
|
|
49
|
+
*/
|
|
50
|
+
addToSlot: <T extends SearchSlot>(slot: T, content: SearchSlotContent[T]) => void;
|
|
44
51
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent } from "./slots";
|
|
2
|
+
/**
|
|
3
|
+
* The slots in the Search UI.
|
|
4
|
+
* @category Search
|
|
5
|
+
*/
|
|
6
|
+
export declare const SearchSlot: {
|
|
7
|
+
/**
|
|
8
|
+
* The primary slot in the search toolbar.
|
|
9
|
+
*/
|
|
10
|
+
readonly ToolbarPrimary: "search-toolbar-primary";
|
|
11
|
+
};
|
|
12
|
+
export type SearchSlot = (typeof SearchSlot)[keyof typeof SearchSlot];
|
|
13
|
+
export type SearchSlotContent = {
|
|
14
|
+
[SearchSlot.ToolbarPrimary]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
|
|
15
|
+
};
|