@pixldocs/canvas-renderer 0.3.20 → 0.3.21
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/index.cjs +12 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -201,6 +201,10 @@ export declare class PixldocsRenderer {
|
|
|
201
201
|
* Convenience: fetch by ID with simple flat data and render.
|
|
202
202
|
*/
|
|
203
203
|
renderById(templateId: string, formData?: Record<string, any>, options?: RenderOptions): Promise<RenderResult>;
|
|
204
|
+
/**
|
|
205
|
+
* Convenience: fetch by ID with flat data and render ALL pages.
|
|
206
|
+
*/
|
|
207
|
+
renderAllById(templateId: string, formData?: Record<string, any>, options?: Omit<RenderOptions, 'pageIndex'>): Promise<RenderResult[]>;
|
|
204
208
|
private getExpectedImageCount;
|
|
205
209
|
private waitForCanvasImages;
|
|
206
210
|
private getNormalizedGradientStops;
|
package/dist/index.js
CHANGED
|
@@ -10758,6 +10758,18 @@ class PixldocsRenderer {
|
|
|
10758
10758
|
});
|
|
10759
10759
|
return this.render(resolved.config, options);
|
|
10760
10760
|
}
|
|
10761
|
+
/**
|
|
10762
|
+
* Convenience: fetch by ID with flat data and render ALL pages.
|
|
10763
|
+
*/
|
|
10764
|
+
async renderAllById(templateId, formData, options) {
|
|
10765
|
+
const resolved = await resolveTemplateData({
|
|
10766
|
+
templateId,
|
|
10767
|
+
formData,
|
|
10768
|
+
supabaseUrl: this.config.supabaseUrl,
|
|
10769
|
+
supabaseAnonKey: this.config.supabaseAnonKey
|
|
10770
|
+
});
|
|
10771
|
+
return this.renderAllPages(resolved.config, options);
|
|
10772
|
+
}
|
|
10761
10773
|
// ─── Internal: render a page using the full PreviewCanvas engine ───
|
|
10762
10774
|
getExpectedImageCount(config, pageIndex) {
|
|
10763
10775
|
const page = config.pages[pageIndex];
|