@bluepic/embed 0.6.34 → 0.6.35
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/bluepic-embed.iife.js +102 -102
- package/dist/bluepic-embed.umd.js +102 -102
- package/dist/components/TemplateEditor/BxLiveTemplate.vue.d.ts +2 -1
- package/dist/components/TemplateEditor/BxTemplateEditor.vue.d.ts +32 -16
- package/dist/components/TemplateEditor/TemplateView.vue.d.ts +8 -4
- package/dist/embed/embed.d.ts +128 -64
- package/dist/main.cjs +23 -23
- package/dist/main.mjs +1349 -1328
- package/dist/util/bxEmbed.d.ts +2 -1
- package/dist/util/gif/GifEncoderSink.d.ts +2 -7
- package/dist/util/gif/encodeCore.d.ts +2 -1
- package/dist/util/gif/exportGifLocal.d.ts +3 -1
- package/dist/util/gif/sandboxGif.d.ts +6 -1
- package/package.json +1 -1
package/dist/util/bxEmbed.d.ts
CHANGED
|
@@ -36,7 +36,8 @@ export declare class EmbeddedController extends EventTarget {
|
|
|
36
36
|
renderFrame(seconds: number): Promise<{
|
|
37
37
|
width: number;
|
|
38
38
|
height: number;
|
|
39
|
-
buffer
|
|
39
|
+
buffer?: ArrayBuffer;
|
|
40
|
+
bitmap?: ImageBitmap;
|
|
40
41
|
timings: Record<string, number>;
|
|
41
42
|
}>;
|
|
42
43
|
busy: boolean;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Collects frames into a GIF. Encodes in a Web Worker when the page allows one
|
|
3
|
-
* (pipelined with rendering), otherwise on the main thread — a strict CSP
|
|
4
|
-
* `worker-src` on a customer page must not break the export, only slow it.
|
|
5
|
-
*/
|
|
6
1
|
export declare class GifEncoderSink {
|
|
7
2
|
private worker?;
|
|
8
3
|
private local?;
|
|
@@ -17,8 +12,8 @@ export declare class GifEncoderSink {
|
|
|
17
12
|
static create(repeat: number): Promise<GifEncoderSink>;
|
|
18
13
|
private handle;
|
|
19
14
|
private fail;
|
|
20
|
-
/** Queues one frame.
|
|
21
|
-
addFrame(
|
|
15
|
+
/** Queues one frame (pixels or an ImageBitmap). It is taken over (transferred): do not reuse it. */
|
|
16
|
+
addFrame(frame: Uint8ClampedArray | ImageBitmap, width: number, height: number, delayMs: number): Promise<void>;
|
|
22
17
|
finish(): Promise<Blob>;
|
|
23
18
|
dispose(): void;
|
|
24
19
|
}
|
|
@@ -23,10 +23,12 @@ export type GifExportLiveTemplate = SandboxEvaluator & {
|
|
|
23
23
|
/** The watermark as SVG markup for the sandbox renderer (BxLiveTemplate). */
|
|
24
24
|
watermarkOverlay?(width: number, height: number): string;
|
|
25
25
|
};
|
|
26
|
+
/** Pixels (buffer) or, from core >= 0.6.8, an ImageBitmap. */
|
|
26
27
|
export type SandboxFrame = {
|
|
27
28
|
width: number;
|
|
28
29
|
height: number;
|
|
29
|
-
buffer
|
|
30
|
+
buffer?: ArrayBuffer;
|
|
31
|
+
bitmap?: ImageBitmap;
|
|
30
32
|
timings: Record<string, number>;
|
|
31
33
|
};
|
|
32
34
|
/**
|
|
@@ -45,8 +45,13 @@ export declare function sandboxSupportsGifSeek(sandbox: SandboxEvaluator): Promi
|
|
|
45
45
|
export declare function seekSandboxGifs(sandbox: SandboxEvaluator, seconds: number): Promise<void>;
|
|
46
46
|
/** Core >= 0.6.5: the sandbox renders export frames itself (bx_export_begin / renderFrame / bx_export_end). */
|
|
47
47
|
export declare function sandboxSupportsFrameRenderer(sandbox: SandboxEvaluator): Promise<boolean>;
|
|
48
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Opens an export session in the sandbox; resolves with whether the template
|
|
50
|
+
* animates itself. Frames come back as ImageBitmaps (core >= 0.6.8; older
|
|
51
|
+
* sandboxes ignore the option and send pixels).
|
|
52
|
+
*/
|
|
49
53
|
export declare function beginSandboxExport(sandbox: SandboxEvaluator, overlaySvg?: string): Promise<{
|
|
50
54
|
animated: boolean;
|
|
55
|
+
frameBitmaps?: boolean;
|
|
51
56
|
}>;
|
|
52
57
|
export declare function endSandboxExport(sandbox: SandboxEvaluator): Promise<void>;
|