@bluepic/embed 0.6.30 → 0.6.33

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.
@@ -38,6 +38,14 @@ export type RenderRemoteOptions = {
38
38
  env: 'dev' | 'prod';
39
39
  bearerToken?: string;
40
40
  password?: string;
41
+ /**
42
+ * Explicit server render engine (debugging, e.g. bx-template's
43
+ * `?serverSideRenderingEngine=`). Omitted: the server picks (GIF and video
44
+ * resvg, stills puppeteer).
45
+ */
46
+ serverSideRenderingEngine?: 'puppeteer' | 'resvg';
47
+ /** Pods a split server render may use (debugging, `?serverSideRenderingPods=`). */
48
+ serverSideRenderingPods?: number;
41
49
  };
42
50
  export declare function renderSerialRemote(campaignId: number, templateId: string, data: {
43
51
  [k: string]: unknown;
@@ -64,7 +72,9 @@ export type RenderRemoteVideoOptions = {
64
72
  */
65
73
  export declare function renderVideoRemote(campaignId: number, templateId: string, data: {
66
74
  [k: string]: unknown;
67
- }, format: z.infer<typeof Render.videoFormatSchema>, opts: RenderRemoteOptions, onProgress: (progress: Render.RenderProgressEvent) => void,
75
+ },
76
+ /** 'gif': a GIF streamed like a video (API `stream: true`), billed on output by the editor. */
77
+ format: z.infer<typeof Render.videoFormatSchema> | 'gif', opts: RenderRemoteOptions, onProgress: (progress: Render.RenderProgressEvent) => void,
68
78
  /** Multi-canvas: the selected canvas, omitted for single-format templates. */
69
79
  canvasId?: string): Promise<{
70
80
  files: string[];
@@ -92,5 +92,18 @@ declare function exportGifLocalOnce(liveTemplate: GifExportLiveTemplate, options
92
92
  width: number;
93
93
  height: number;
94
94
  };
95
+ /**
96
+ * The file's NETSCAPE repeat value: 0 = endless (default), -1 = plays once,
97
+ * n = n extra plays. From the template's `animation.gifPlays` (gifRepeat()).
98
+ */
99
+ repeat?: number;
95
100
  }): Promise<LocalGifExportResult>;
101
+ /**
102
+ * NETSCAPE repeat value for a template: `animation.gifPlays` null/absent →
103
+ * endless (0); N >= 1 → plays N times (1 → -1, no loop block; N → N - 1).
104
+ * Same rule as @bluepic/types gifRepeatOf (types >= 0.9.37).
105
+ */
106
+ export declare function gifRepeat(serial: {
107
+ animation?: unknown;
108
+ } | null | undefined): number;
96
109
  export {};
@@ -1,15 +1 @@
1
- /**
2
- * Copies a GIF block by block and leaves out everything that can carry
3
- * metadata: comment extensions and every application extension except the
4
- * animation loop blocks (NETSCAPE2.0 / ANIMEXTS1.0). XMP (which may hold GPS,
5
- * author, software) lives in an application extension.
6
- *
7
- * Why not re-encode like other uploads: a canvas cannot write GIF, so the
8
- * re-encode that strips EXIF from photos (AVV) turned every animated GIF into
9
- * a still. GIF has no EXIF block; dropping these extensions removes what
10
- * metadata it can carry and keeps the animation byte for byte.
11
- *
12
- * Returns null when the bytes are not a well-formed GIF — the caller then falls
13
- * back to the normal re-encode.
14
- */
15
1
  export declare function sanitizeGif(input: Uint8Array): Uint8Array | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluepic/embed",
3
- "version": "0.6.30",
3
+ "version": "0.6.33",
4
4
  "description": "Bluepic embed sdk",
5
5
  "type": "module",
6
6
  "sideEffects": false,