lumiverse-spindle-types 0.4.51 → 0.4.52
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 +1 -1
- package/src/dom.ts +11 -0
- package/src/index.ts +1 -0
package/package.json
CHANGED
package/src/dom.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { RequestInitDTO } from "./api";
|
|
2
|
+
|
|
1
3
|
/** DOM helper API provided to frontend extension modules. */
|
|
2
4
|
export interface SpindleDOMHelper {
|
|
3
5
|
/** Inject sanitized HTML into the host document at the given target. */
|
|
@@ -188,6 +190,15 @@ export interface SpindleSandboxFrameHandle {
|
|
|
188
190
|
destroy(): void;
|
|
189
191
|
}
|
|
190
192
|
|
|
193
|
+
/** API exposed inside the sandboxed iframe as `window.spindleSandbox`. */
|
|
194
|
+
export interface SpindleSandboxAPI {
|
|
195
|
+
postMessage(payload: unknown): void;
|
|
196
|
+
onMessage(handler: (payload: unknown) => void): () => void;
|
|
197
|
+
requestResize(height?: number): void;
|
|
198
|
+
/** Fetch a URL through the extension's CORS proxy. Requires the `cors_proxy` permission. */
|
|
199
|
+
corsProxy(url: string, options?: RequestInitDTO): Promise<unknown>;
|
|
200
|
+
}
|
|
201
|
+
|
|
191
202
|
export interface SpindleUploadFile {
|
|
192
203
|
name: string;
|
|
193
204
|
mimeType: string;
|