@markupai/sidebar-adapter 0.0.23 → 1.1.0

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.
Files changed (51) hide show
  1. package/README.md +106 -23
  2. package/dist/adapters/index.d.ts +3 -0
  3. package/dist/adapters/index.d.ts.map +1 -0
  4. package/dist/adapters/pluginAdapter.d.ts +79 -0
  5. package/dist/adapters/pluginAdapter.d.ts.map +1 -0
  6. package/dist/adapters/sidebarAdapter.d.ts +43 -0
  7. package/dist/adapters/sidebarAdapter.d.ts.map +1 -0
  8. package/dist/errors.d.ts +48 -0
  9. package/dist/errors.d.ts.map +1 -0
  10. package/dist/index.d.ts +7 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/ipc/call-signatures.d.ts +69 -0
  13. package/dist/ipc/call-signatures.d.ts.map +1 -0
  14. package/dist/ipc/deferred-promise.d.ts +49 -0
  15. package/dist/ipc/deferred-promise.d.ts.map +1 -0
  16. package/dist/ipc/index.d.ts +9 -0
  17. package/dist/ipc/index.d.ts.map +1 -0
  18. package/dist/ipc/ipc-core.d.ts +72 -0
  19. package/dist/ipc/ipc-core.d.ts.map +1 -0
  20. package/dist/ipc/message-types.d.ts +57 -0
  21. package/dist/ipc/message-types.d.ts.map +1 -0
  22. package/dist/ipc/plugin-ipc-adapter.d.ts +83 -0
  23. package/dist/ipc/plugin-ipc-adapter.d.ts.map +1 -0
  24. package/dist/ipc/sidebar-ipc-adapter.d.ts +38 -0
  25. package/dist/ipc/sidebar-ipc-adapter.d.ts.map +1 -0
  26. package/dist/load-overlay/index.d.ts +2 -0
  27. package/dist/load-overlay/index.d.ts.map +1 -0
  28. package/dist/load-overlay/loadOverlayDom.d.ts +5 -0
  29. package/dist/load-overlay/loadOverlayDom.d.ts.map +1 -0
  30. package/dist/load-overlay/loadOverlayStyles.d.ts +3 -0
  31. package/dist/load-overlay/loadOverlayStyles.d.ts.map +1 -0
  32. package/dist/load-overlay/sidebarLoadOverlay.d.ts +14 -0
  33. package/dist/load-overlay/sidebarLoadOverlay.d.ts.map +1 -0
  34. package/dist/main.js +312 -514
  35. package/dist/main.umd.cjs +12 -12
  36. package/dist/sidebar-host/createSidebarHost.d.ts +107 -0
  37. package/dist/sidebar-host/createSidebarHost.d.ts.map +1 -0
  38. package/dist/sidebar-host/index.d.ts +3 -0
  39. package/dist/sidebar-host/index.d.ts.map +1 -0
  40. package/dist/sidebar-host/sidebarHostShell.d.ts +56 -0
  41. package/dist/sidebar-host/sidebarHostShell.d.ts.map +1 -0
  42. package/dist/types/common.d.ts +132 -0
  43. package/dist/types/common.d.ts.map +1 -0
  44. package/dist/types/index.d.ts +4 -0
  45. package/dist/types/index.d.ts.map +1 -0
  46. package/dist/types/pluginInterface.d.ts +89 -0
  47. package/dist/types/pluginInterface.d.ts.map +1 -0
  48. package/dist/types/sidebarInterface.d.ts +41 -0
  49. package/dist/types/sidebarInterface.d.ts.map +1 -0
  50. package/package.json +5 -5
  51. package/dist/main.d.ts +0 -888
@@ -0,0 +1,72 @@
1
+ import type { CallSignatures } from "../ipc/call-signatures";
2
+ import type { IPCMessage, IPCConfig, CallOptions } from "../ipc/message-types";
3
+ export type ReceiverFn<R extends keyof CallSignatures> = (...data: Parameters<NonNullable<CallSignatures[R]>>) => ReturnType<NonNullable<CallSignatures[R]>>;
4
+ /**
5
+ * Core IPC system managing bidirectional communication
6
+ */
7
+ export declare class IPCCore {
8
+ private promisesByID;
9
+ private receiversByName;
10
+ private currentID;
11
+ private config;
12
+ private readonly postMessage;
13
+ constructor(postMessage: (message: IPCMessage) => void, config?: IPCConfig);
14
+ /**
15
+ * Update IPC configuration
16
+ */
17
+ configure(config: IPCConfig): void;
18
+ /**
19
+ * Makes a call to the other side. Returns a promise that resolves when
20
+ * the other side responds.
21
+ *
22
+ * @param name - The name of the receiver on the other side
23
+ * @param data - Parameters to send to the receiver
24
+ * @returns Promise that resolves with the receiver's response
25
+ */
26
+ call<T extends keyof CallSignatures>(name: T, ...data: Parameters<NonNullable<CallSignatures[T]>>): Promise<ReturnType<NonNullable<CallSignatures[T]>>>;
27
+ /**
28
+ * Makes a call with per-call overrides (e.g. timeout).
29
+ *
30
+ * @param name - The name of the receiver on the other side
31
+ * @param options - Per-call overrides (e.g. timeout in ms)
32
+ * @param data - Parameters to send to the receiver
33
+ * @returns Promise that resolves with the receiver's response
34
+ */
35
+ callWithOptions<T extends keyof CallSignatures>(name: T, options: CallOptions, ...data: Parameters<NonNullable<CallSignatures[T]>>): Promise<ReturnType<NonNullable<CallSignatures[T]>>>;
36
+ /**
37
+ * Registers a function to receive calls with a particular name.
38
+ * The return value will be sent back to the caller.
39
+ *
40
+ * @param name - The name of the receiver
41
+ * @param fn - The function that will receive calls
42
+ */
43
+ receive<R extends keyof CallSignatures>(name: R, fn: ReceiverFn<R>): void;
44
+ /**
45
+ * Unregisters a receiver for a given call name
46
+ *
47
+ * @param name - The name of the receiver to unregister
48
+ */
49
+ ignore(name: string): void;
50
+ /**
51
+ * Handles incoming messages from the other side
52
+ * @param message - The IPC message to handle
53
+ */
54
+ handleMessage(message: IPCMessage): Promise<void>;
55
+ /**
56
+ * Handles incoming call messages
57
+ */
58
+ private handleCall;
59
+ /**
60
+ * Handles incoming response messages
61
+ */
62
+ private handleResponse;
63
+ /**
64
+ * Handles incoming error messages
65
+ */
66
+ private handleError;
67
+ /**
68
+ * Cleanup all pending promises and receivers
69
+ */
70
+ destroy(): void;
71
+ }
72
+ //# sourceMappingURL=ipc-core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ipc-core.d.ts","sourceRoot":"","sources":["../../src/ipc/ipc-core.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,KAAK,EAGV,UAAU,EAEV,SAAS,EACT,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAK7B,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,MAAM,cAAc,IAAI,CACvD,GAAG,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,KAChD,UAAU,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAUhD;;GAEG;AACH,qBAAa,OAAO;IAClB,OAAO,CAAC,YAAY,CAA+C;IACnE,OAAO,CAAC,eAAe,CAAoE;IAC3F,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,MAAM,CAAsB;IACpC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAgC;gBAEhD,WAAW,EAAE,CAAC,OAAO,EAAE,UAAU,KAAK,IAAI,EAAE,MAAM,CAAC,EAAE,SAAS;IAK1E;;OAEG;IACI,SAAS,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI;IAIzC;;;;;;;OAOG;IACI,IAAI,CAAC,CAAC,SAAS,MAAM,cAAc,EACxC,IAAI,EAAE,CAAC,EACP,GAAG,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAClD,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAItD;;;;;;;OAOG;IACI,eAAe,CAAC,CAAC,SAAS,MAAM,cAAc,EACnD,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,WAAW,EACpB,GAAG,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAClD,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IA+BtD;;;;;;OAMG;IACI,OAAO,CAAC,CAAC,SAAS,MAAM,cAAc,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI;IAKhF;;;;OAIG;IACI,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAMjC;;;OAGG;IACU,aAAa,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAwB9D;;OAEG;YACW,UAAU;IAkExB;;OAEG;IACH,OAAO,CAAC,cAAc;IActB;;OAEG;IACH,OAAO,CAAC,WAAW;IAuBnB;;OAEG;IACI,OAAO,IAAI,IAAI;CAWvB"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Base message structure for IPC communication
3
+ */
4
+ export type MessageBase = {
5
+ type: "call" | "response" | "error";
6
+ id: number;
7
+ name: string;
8
+ };
9
+ /**
10
+ * Message sent when calling a remote function
11
+ */
12
+ export type CallMessage = MessageBase & {
13
+ type: "call";
14
+ data: any[];
15
+ };
16
+ /**
17
+ * Message sent when responding to a call
18
+ */
19
+ export type ResponseMessage = MessageBase & {
20
+ type: "response";
21
+ data: any;
22
+ };
23
+ /**
24
+ * Message sent when an error occurs during call handling
25
+ */
26
+ export type ErrorMessage = MessageBase & {
27
+ type: "error";
28
+ errorJSON: string;
29
+ };
30
+ /**
31
+ * Union of all possible message types
32
+ */
33
+ export type IPCMessage = CallMessage | ResponseMessage | ErrorMessage;
34
+ /**
35
+ * Configuration for IPC system
36
+ */
37
+ export interface IPCConfig {
38
+ /**
39
+ * Timeout in milliseconds for waiting for a response
40
+ * @default 10000 (10 seconds)
41
+ */
42
+ timeout?: number;
43
+ }
44
+ /**
45
+ * Optional overrides for a single IPC call (e.g. timeout).
46
+ */
47
+ export interface CallOptions {
48
+ /**
49
+ * Timeout in milliseconds for this call. Overrides default IPC config timeout.
50
+ */
51
+ timeout?: number;
52
+ }
53
+ /**
54
+ * Default IPC configuration
55
+ */
56
+ export declare const DEFAULT_IPC_CONFIG: Required<IPCConfig>;
57
+ //# sourceMappingURL=message-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-types.d.ts","sourceRoot":"","sources":["../../src/ipc/message-types.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,GAAG,EAAE,CAAC;CACb,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG;IAC1C,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,GAAG,CAAC;CACX,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,eAAe,GAAG,YAAY,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,SAAS,CAElD,CAAC"}
@@ -0,0 +1,83 @@
1
+ import type { CallOptions, IPCConfig } from "../ipc/message-types";
2
+ import type { ContentRange, ContentReplacement, ContentInfo, SidebarConfig, AgenticIssuePayload } from "../types/common";
3
+ import type { SidebarInterface } from "../types/sidebarInterface";
4
+ /**
5
+ * PluginIPCAdapter - Used in the Sidebar to communicate with the Plugin in the editor
6
+ * Provides async methods to call plugin functions
7
+ *
8
+ * Primarily uses PULL pattern where Sidebar initiates calls.
9
+ * Optional SidebarInterface parameter allows Plugin → Sidebar callbacks if needed.
10
+ */
11
+ export declare class PluginIPCAdapter {
12
+ private readonly ipc;
13
+ private readonly sidebar;
14
+ private targetOrigin;
15
+ constructor(sidebar?: SidebarInterface, config?: IPCConfig, targetOrigin?: string);
16
+ private readonly handleMessage;
17
+ private registerReceivers;
18
+ /**
19
+ * Request initialization configuration from the editor
20
+ */
21
+ getInitConfig(): Promise<SidebarConfig>;
22
+ /**
23
+ * Request content from the editor in whatever format the integration supports
24
+ * @param options - Optional per-call overrides (e.g. timeout in ms; overrides default IPC timeout)
25
+ */
26
+ getContent(options?: CallOptions): Promise<ContentInfo>;
27
+ /**
28
+ * Request selected content from the editor in whatever format the integration supports
29
+ * @param options - Optional per-call overrides (e.g. timeout in ms; overrides default IPC timeout)
30
+ */
31
+ getSelectedContent(options?: CallOptions): Promise<ContentInfo>;
32
+ /**
33
+ * Replace content in the editor
34
+ */
35
+ replaceContent(suggestion: string, range: ContentRange): Promise<void>;
36
+ /**
37
+ * Select content in the editor
38
+ */
39
+ selectContent(range: ContentRange): Promise<void>;
40
+ /**
41
+ * Show a dialog in the editor
42
+ */
43
+ showDialog(dialogHtml: string, width?: number, height?: number, title?: string): Promise<void>;
44
+ /**
45
+ * Close the dialog in the editor
46
+ */
47
+ closeDialog(): Promise<void>;
48
+ /**
49
+ * Replace multiple contents in the editor
50
+ */
51
+ replaceMultipleContents(replacements: ContentReplacement[]): Promise<void>;
52
+ /**
53
+ * Notify plugin that one agent's results are available (streaming).
54
+ */
55
+ onAgenticAgentResults(agentName: string, issues: AgenticIssuePayload[]): Promise<void>;
56
+ /**
57
+ * Notify plugin that the agentic stream has finished.
58
+ */
59
+ onAgenticStreamComplete(): Promise<void>;
60
+ /**
61
+ * Ask the plugin to open an external URL during an auth flow.
62
+ * Throws if the plugin has not registered a handler, so callers can fall
63
+ * back (e.g. to `globalThis.open`).
64
+ */
65
+ openAuthUrl(url: string): Promise<void>;
66
+ /**
67
+ * Update IPC configuration
68
+ */
69
+ configure(config: IPCConfig): void;
70
+ /**
71
+ * Set or update the target origin for postMessage communication
72
+ */
73
+ setTargetOrigin(targetOrigin: string): void;
74
+ /**
75
+ * Get the current target origin
76
+ */
77
+ getTargetOrigin(): string;
78
+ /**
79
+ * Cleanup and destroy the adapter
80
+ */
81
+ destroy(): void;
82
+ }
83
+ //# sourceMappingURL=plugin-ipc-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-ipc-adapter.d.ts","sourceRoot":"","sources":["../../src/ipc/plugin-ipc-adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAc,MAAM,qBAAqB,CAAC;AAC9E,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,mBAAmB,EACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE;;;;;;GAMG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAU;IAC9B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmB;IAC3C,OAAO,CAAC,YAAY,CAAS;gBAEjB,OAAO,CAAC,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,SAAS,EAAE,YAAY,GAAE,MAAY;IAkBtF,OAAO,CAAC,QAAQ,CAAC,aAAa,CAqB5B;IAEF,OAAO,CAAC,iBAAiB;IAiCzB;;OAEG;IACU,aAAa,IAAI,OAAO,CAAC,aAAa,CAAC;IAKpD;;;OAGG;IACU,UAAU,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAKpE;;;OAGG;IACU,kBAAkB,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAK5E;;OAEG;IACU,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAKnF;;OAEG;IACU,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAK9D;;OAEG;IACU,UAAU,CACrB,UAAU,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC;IAKhB;;OAEG;IACU,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAKzC;;OAEG;IACU,uBAAuB,CAAC,YAAY,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAKvF;;OAEG;IACU,qBAAqB,CAChC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,mBAAmB,EAAE,GAC5B,OAAO,CAAC,IAAI,CAAC;IAIhB;;OAEG;IACU,uBAAuB,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrD;;;;OAIG;IACU,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKpD;;OAEG;IACI,SAAS,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI;IAIzC;;OAEG;IACI,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;IAkBlD;;OAEG;IACI,eAAe,IAAI,MAAM;IAIhC;;OAEG;IACI,OAAO,IAAI,IAAI;CAKvB"}
@@ -0,0 +1,38 @@
1
+ import type { IPCConfig } from "../ipc/message-types";
2
+ import type { PluginInterface } from "../types/pluginInterface";
3
+ /**
4
+ * SidebarIPCAdapter - Used in the Plugin to communicate with the Sidebar in the iframe
5
+ * Provides async methods to call sidebar functions and registers receivers for plugin functions
6
+ */
7
+ export declare class SidebarIPCAdapter {
8
+ private readonly ipc;
9
+ private readonly plugin;
10
+ private readonly iframe;
11
+ private readonly window;
12
+ private readonly targetOrigin;
13
+ constructor(plugin: PluginInterface, iframe: HTMLIFrameElement, win?: Window, config?: IPCConfig, targetOrigin?: string);
14
+ private readonly handleMessage;
15
+ private registerReceivers;
16
+ /**
17
+ * Request sidebar to activate (expand and scroll to) the card for the given issue.
18
+ */
19
+ activateAgenticIssue(issueId: string): Promise<void>;
20
+ /**
21
+ * Request sidebar to invalidate (dismiss) the card for the given issue.
22
+ */
23
+ invalidateAgenticIssue(issueId: string): Promise<void>;
24
+ /**
25
+ * Notify sidebar of plugin status changes
26
+ * Example method demonstrating Plugin → Sidebar communication
27
+ */
28
+ notifyPluginStatus(status: string): Promise<void>;
29
+ /**
30
+ * Update IPC configuration
31
+ */
32
+ configure(config: IPCConfig): void;
33
+ /**
34
+ * Cleanup and destroy the adapter
35
+ */
36
+ destroy(): void;
37
+ }
38
+ //# sourceMappingURL=sidebar-ipc-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-ipc-adapter.d.ts","sourceRoot":"","sources":["../../src/ipc/sidebar-ipc-adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D;;;GAGG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAU;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoB;IAC3C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;gBAGpC,MAAM,EAAE,eAAe,EACvB,MAAM,EAAE,iBAAiB,EACzB,GAAG,CAAC,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,SAAS,EAClB,YAAY,GAAE,MAAY;IAqB5B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAqB5B;IAEF,OAAO,CAAC,iBAAiB;IAmFzB;;OAEG;IACU,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKjE;;OAEG;IACU,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKnE;;;OAGG;IACU,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK9D;;OAEG;IACI,SAAS,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI;IAIzC;;OAEG;IACI,OAAO,IAAI,IAAI;CAKvB"}
@@ -0,0 +1,2 @@
1
+ export { setupSidebarLoadOverlay, type SidebarLoadOverlayOptions } from "./sidebarLoadOverlay";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/load-overlay/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,KAAK,yBAAyB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const buildLoadOverlay: () => {
2
+ overlay: HTMLDivElement;
3
+ button: HTMLButtonElement;
4
+ };
5
+ //# sourceMappingURL=loadOverlayDom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadOverlayDom.d.ts","sourceRoot":"","sources":["../../src/load-overlay/loadOverlayDom.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,gBAAgB;;;CAY5B,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** When omitted, styles are injected into the global `document` (original behavior). */
2
+ export declare const injectSidebarLoadOverlayStyles: (targetDocument?: Document) => void;
3
+ //# sourceMappingURL=loadOverlayStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadOverlayStyles.d.ts","sourceRoot":"","sources":["../../src/load-overlay/loadOverlayStyles.ts"],"names":[],"mappings":"AAgGA,wFAAwF;AACxF,eAAO,MAAM,8BAA8B,GAAI,iBAAiB,QAAQ,SAOvE,CAAC"}
@@ -0,0 +1,14 @@
1
+ export type SidebarLoadOverlayOptions = {
2
+ sidebarUrl?: string;
3
+ targetOrigin?: string;
4
+ timeoutMs?: number;
5
+ retryIntervalMs?: number;
6
+ /**
7
+ * Window that receives `message` events from the sidebar iframe (typically `iframe.contentWindow`'s parent).
8
+ * Use the iframe's parent `Window` when the iframe is not a direct child of the host page (e.g. undocked popup).
9
+ * Defaults to the global `window` (the page that called `setupSidebarLoadOverlay`).
10
+ */
11
+ messageListenWindow?: Window;
12
+ };
13
+ export declare const setupSidebarLoadOverlay: (container: HTMLElement, iframe: HTMLIFrameElement, options?: SidebarLoadOverlayOptions) => () => void;
14
+ //# sourceMappingURL=sidebarLoadOverlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebarLoadOverlay.d.ts","sourceRoot":"","sources":["../../src/load-overlay/sidebarLoadOverlay.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,yBAAyB,GAAG;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAKF,eAAO,MAAM,uBAAuB,GAClC,WAAW,WAAW,EACtB,QAAQ,iBAAiB,EACzB,UAAS,yBAA8B,eAoHxC,CAAC"}