@pixldocs/canvas-renderer 0.5.237 → 0.5.239
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-DsJJCVHm.cjs → index-BScjmXRG.cjs} +13 -10
- package/dist/{index-DsJJCVHm.cjs.map → index-BScjmXRG.cjs.map} +1 -1
- package/dist/{index-DHRpTjzC.js → index-DSRobH-5.js} +13 -10
- package/dist/{index-DHRpTjzC.js.map → index-DSRobH-5.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BedUEU2U.cjs → vectorPdfExport-ChKqZ9Rs.cjs} +4 -4
- package/dist/{vectorPdfExport-BedUEU2U.cjs.map → vectorPdfExport-ChKqZ9Rs.cjs.map} +1 -1
- package/dist/{vectorPdfExport-CgEH8Ggz.js → vectorPdfExport-DydXa9jD.js} +4 -4
- package/dist/{vectorPdfExport-CgEH8Ggz.js.map → vectorPdfExport-DydXa9jD.js.map} +1 -1
- package/package.json +1 -1
|
@@ -21139,9 +21139,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
21139
21139
|
}
|
|
21140
21140
|
return svgString;
|
|
21141
21141
|
}
|
|
21142
|
-
const resolvedPackageVersion = "0.5.
|
|
21142
|
+
const resolvedPackageVersion = "0.5.239";
|
|
21143
21143
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
21144
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
21144
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.239";
|
|
21145
21145
|
const roundParityValue = (value) => {
|
|
21146
21146
|
if (typeof value !== "number") return value;
|
|
21147
21147
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -21567,11 +21567,12 @@ class PixldocsRenderer {
|
|
|
21567
21567
|
* This is the primary external API for the package.
|
|
21568
21568
|
*/
|
|
21569
21569
|
async renderFromForm(options) {
|
|
21570
|
-
const { templateId, formSchemaId, sectionState, themeId, watermark, watermarkOptions, prefetched, ...renderOpts } = options;
|
|
21570
|
+
const { templateId, formSchemaId, sectionState, flatFormData, themeId, watermark, watermarkOptions, prefetched, ...renderOpts } = options;
|
|
21571
21571
|
const resolved = await resolveFromForm({
|
|
21572
21572
|
templateId,
|
|
21573
21573
|
formSchemaId,
|
|
21574
21574
|
sectionState,
|
|
21575
|
+
flatFormData,
|
|
21575
21576
|
themeId,
|
|
21576
21577
|
supabaseUrl: this.config.supabaseUrl,
|
|
21577
21578
|
supabaseAnonKey: this.config.supabaseAnonKey,
|
|
@@ -21626,11 +21627,12 @@ class PixldocsRenderer {
|
|
|
21626
21627
|
* Resolve from V2 sectionState and return SVGs for all pages (for server vector PDF).
|
|
21627
21628
|
*/
|
|
21628
21629
|
async renderSvgsFromForm(options) {
|
|
21629
|
-
const { templateId, formSchemaId, sectionState, themeId, watermark, watermarkOptions, prefetched } = options;
|
|
21630
|
+
const { templateId, formSchemaId, sectionState, flatFormData, themeId, watermark, watermarkOptions, prefetched } = options;
|
|
21630
21631
|
const resolved = await resolveFromForm({
|
|
21631
21632
|
templateId,
|
|
21632
21633
|
formSchemaId,
|
|
21633
21634
|
sectionState,
|
|
21635
|
+
flatFormData,
|
|
21634
21636
|
themeId,
|
|
21635
21637
|
supabaseUrl: this.config.supabaseUrl,
|
|
21636
21638
|
supabaseAnonKey: this.config.supabaseAnonKey,
|
|
@@ -21674,11 +21676,12 @@ class PixldocsRenderer {
|
|
|
21674
21676
|
* This is the primary PDF export API — mirrors renderFromForm() but returns a PDF.
|
|
21675
21677
|
*/
|
|
21676
21678
|
async renderPdfFromForm(options) {
|
|
21677
|
-
const { templateId, formSchemaId, sectionState, themeId, watermark, watermarkOptions, prefetched, title, fontBaseUrl, textMode, forcePerElementPdf, maxImageEdgePx, compressImages, compressionQuality } = options;
|
|
21679
|
+
const { templateId, formSchemaId, sectionState, flatFormData, themeId, watermark, watermarkOptions, prefetched, title, fontBaseUrl, textMode, forcePerElementPdf, maxImageEdgePx, compressImages, compressionQuality } = options;
|
|
21678
21680
|
const resolved = await resolveFromForm({
|
|
21679
21681
|
templateId,
|
|
21680
21682
|
formSchemaId,
|
|
21681
21683
|
sectionState,
|
|
21684
|
+
flatFormData,
|
|
21682
21685
|
themeId,
|
|
21683
21686
|
supabaseUrl: this.config.supabaseUrl,
|
|
21684
21687
|
supabaseAnonKey: this.config.supabaseAnonKey,
|
|
@@ -21729,13 +21732,13 @@ class PixldocsRenderer {
|
|
|
21729
21732
|
if (!base) {
|
|
21730
21733
|
throw new Error("renderAndDeliver: RendererConfig.deliveryServerUrl is required");
|
|
21731
21734
|
}
|
|
21732
|
-
const { templateId, formSchemaId, sectionState, themeId, watermark, project, recipient, channels, scale } = options;
|
|
21735
|
+
const { templateId, formSchemaId, sectionState, flatFormData, themeId, watermark, project, recipient, channels, scale } = options;
|
|
21733
21736
|
if (!project) throw new Error('renderAndDeliver: project is required (e.g. "biomaker", "pixldocs")');
|
|
21734
21737
|
if (!(recipient == null ? void 0 : recipient.email)) throw new Error("renderAndDeliver: recipient.email is required");
|
|
21735
21738
|
const body = {
|
|
21736
21739
|
template_id: templateId,
|
|
21737
21740
|
form_schema_id: formSchemaId,
|
|
21738
|
-
data: { version: 2, sectionState },
|
|
21741
|
+
data: { version: 2, sectionState, ...flatFormData ? { flatFormData } : {} },
|
|
21739
21742
|
project,
|
|
21740
21743
|
recipient,
|
|
21741
21744
|
channels: channels || ["email"]
|
|
@@ -21885,7 +21888,7 @@ class PixldocsRenderer {
|
|
|
21885
21888
|
await this.waitForCanvasScene(container, cloned, i);
|
|
21886
21889
|
}
|
|
21887
21890
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
21888
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
21891
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-ChKqZ9Rs.cjs"));
|
|
21889
21892
|
const prepared = preparePagesForExport(
|
|
21890
21893
|
cloned.pages,
|
|
21891
21894
|
canvasWidth,
|
|
@@ -24205,7 +24208,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
24205
24208
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
24206
24209
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
24207
24210
|
try {
|
|
24208
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
24211
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-ChKqZ9Rs.cjs"));
|
|
24209
24212
|
try {
|
|
24210
24213
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
24211
24214
|
} catch {
|
|
@@ -24602,4 +24605,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
24602
24605
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
24603
24606
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
24604
24607
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
24605
|
-
//# sourceMappingURL=index-
|
|
24608
|
+
//# sourceMappingURL=index-BScjmXRG.cjs.map
|