@axsdk/core 0.2.11 → 0.2.13
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/dist/axhandler.d.ts +1 -4
- package/dist/axtools.d.ts +0 -32
- package/dist/lib.cjs +9 -9
- package/dist/lib.cjs.map +9 -8
- package/dist/lib.d.ts +1 -0
- package/dist/lib.js +9 -9
- package/dist/lib.js.map +9 -8
- package/package.json +1 -1
package/dist/axhandler.d.ts
CHANGED
|
@@ -1,4 +1 @@
|
|
|
1
|
-
export declare function processAXHandler(command: string, args: Record<string, unknown>): Promise<string |
|
|
2
|
-
"$": () => Promise<void>;
|
|
3
|
-
message: string;
|
|
4
|
-
}>;
|
|
1
|
+
export declare function processAXHandler(command: string, args: Record<string, unknown>): Promise<string | [string, Promise<void>]>;
|
package/dist/axtools.d.ts
CHANGED
|
@@ -1,40 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Options for screenshot capture functions.
|
|
3
|
-
*/
|
|
4
1
|
export interface ScreenshotOptions {
|
|
5
|
-
/** The DOM element to capture. Defaults to `document.documentElement`. */
|
|
6
2
|
element?: HTMLElement;
|
|
7
|
-
/** MIME type for the output image. Defaults to `'image/png'`. */
|
|
8
3
|
type?: 'image/png' | 'image/jpeg' | 'image/webp';
|
|
9
|
-
/** Image quality (0–1) for lossy formats like jpeg/webp. Defaults to `0.92`. */
|
|
10
4
|
quality?: number;
|
|
11
|
-
/** Device pixel ratio scale factor. Defaults to `window.devicePixelRatio` or `1`. */
|
|
12
5
|
scale?: number;
|
|
13
6
|
}
|
|
14
|
-
/**
|
|
15
|
-
* Captures the current browser viewport (or a specified element) as a
|
|
16
|
-
* base64-encoded data URL string.
|
|
17
|
-
*
|
|
18
|
-
* @param options - Optional screenshot configuration.
|
|
19
|
-
* @returns A `Promise<string>` that resolves to a base64 data URL (e.g. `data:image/png;base64,...`).
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```ts
|
|
23
|
-
* const dataUrl = await captureScreenshot();
|
|
24
|
-
* // dataUrl === 'data:image/png;base64,...'
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
7
|
export declare function captureScreenshot(options?: ScreenshotOptions): Promise<string>;
|
|
28
|
-
/**
|
|
29
|
-
* Captures the current browser viewport (or a specified element) as a `Blob`.
|
|
30
|
-
*
|
|
31
|
-
* @param options - Optional screenshot configuration.
|
|
32
|
-
* @returns A `Promise<Blob>` containing the image data.
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```ts
|
|
36
|
-
* const blob = await captureScreenshotBlob({ type: 'image/jpeg', quality: 0.8 });
|
|
37
|
-
* const url = URL.createObjectURL(blob);
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
8
|
export declare function captureScreenshotBlob(options?: ScreenshotOptions): Promise<Blob>;
|