@pixldocs/canvas-renderer 0.5.237 → 0.5.238

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.
@@ -21121,9 +21121,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
21121
21121
  }
21122
21122
  return svgString;
21123
21123
  }
21124
- const resolvedPackageVersion = "0.5.237";
21124
+ const resolvedPackageVersion = "0.5.238";
21125
21125
  const PACKAGE_VERSION = resolvedPackageVersion;
21126
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.237";
21126
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.238";
21127
21127
  const roundParityValue = (value) => {
21128
21128
  if (typeof value !== "number") return value;
21129
21129
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -21549,11 +21549,12 @@ class PixldocsRenderer {
21549
21549
  * This is the primary external API for the package.
21550
21550
  */
21551
21551
  async renderFromForm(options) {
21552
- const { templateId, formSchemaId, sectionState, themeId, watermark, watermarkOptions, prefetched, ...renderOpts } = options;
21552
+ const { templateId, formSchemaId, sectionState, flatFormData, themeId, watermark, watermarkOptions, prefetched, ...renderOpts } = options;
21553
21553
  const resolved = await resolveFromForm({
21554
21554
  templateId,
21555
21555
  formSchemaId,
21556
21556
  sectionState,
21557
+ flatFormData,
21557
21558
  themeId,
21558
21559
  supabaseUrl: this.config.supabaseUrl,
21559
21560
  supabaseAnonKey: this.config.supabaseAnonKey,
@@ -21608,11 +21609,12 @@ class PixldocsRenderer {
21608
21609
  * Resolve from V2 sectionState and return SVGs for all pages (for server vector PDF).
21609
21610
  */
21610
21611
  async renderSvgsFromForm(options) {
21611
- const { templateId, formSchemaId, sectionState, themeId, watermark, watermarkOptions, prefetched } = options;
21612
+ const { templateId, formSchemaId, sectionState, flatFormData, themeId, watermark, watermarkOptions, prefetched } = options;
21612
21613
  const resolved = await resolveFromForm({
21613
21614
  templateId,
21614
21615
  formSchemaId,
21615
21616
  sectionState,
21617
+ flatFormData,
21616
21618
  themeId,
21617
21619
  supabaseUrl: this.config.supabaseUrl,
21618
21620
  supabaseAnonKey: this.config.supabaseAnonKey,
@@ -21656,11 +21658,12 @@ class PixldocsRenderer {
21656
21658
  * This is the primary PDF export API — mirrors renderFromForm() but returns a PDF.
21657
21659
  */
21658
21660
  async renderPdfFromForm(options) {
21659
- const { templateId, formSchemaId, sectionState, themeId, watermark, watermarkOptions, prefetched, title, fontBaseUrl, textMode, forcePerElementPdf, maxImageEdgePx, compressImages, compressionQuality } = options;
21661
+ const { templateId, formSchemaId, sectionState, flatFormData, themeId, watermark, watermarkOptions, prefetched, title, fontBaseUrl, textMode, forcePerElementPdf, maxImageEdgePx, compressImages, compressionQuality } = options;
21660
21662
  const resolved = await resolveFromForm({
21661
21663
  templateId,
21662
21664
  formSchemaId,
21663
21665
  sectionState,
21666
+ flatFormData,
21664
21667
  themeId,
21665
21668
  supabaseUrl: this.config.supabaseUrl,
21666
21669
  supabaseAnonKey: this.config.supabaseAnonKey,
@@ -21711,13 +21714,13 @@ class PixldocsRenderer {
21711
21714
  if (!base) {
21712
21715
  throw new Error("renderAndDeliver: RendererConfig.deliveryServerUrl is required");
21713
21716
  }
21714
- const { templateId, formSchemaId, sectionState, themeId, watermark, project, recipient, channels, scale } = options;
21717
+ const { templateId, formSchemaId, sectionState, flatFormData, themeId, watermark, project, recipient, channels, scale } = options;
21715
21718
  if (!project) throw new Error('renderAndDeliver: project is required (e.g. "biomaker", "pixldocs")');
21716
21719
  if (!(recipient == null ? void 0 : recipient.email)) throw new Error("renderAndDeliver: recipient.email is required");
21717
21720
  const body = {
21718
21721
  template_id: templateId,
21719
21722
  form_schema_id: formSchemaId,
21720
- data: { version: 2, sectionState },
21723
+ data: { version: 2, sectionState, ...flatFormData ? { flatFormData } : {} },
21721
21724
  project,
21722
21725
  recipient,
21723
21726
  channels: channels || ["email"]
@@ -21867,7 +21870,7 @@ class PixldocsRenderer {
21867
21870
  await this.waitForCanvasScene(container, cloned, i);
21868
21871
  }
21869
21872
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
21870
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CgEH8Ggz.js");
21873
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-BIPt7Ujn.js");
21871
21874
  const prepared = preparePagesForExport(
21872
21875
  cloned.pages,
21873
21876
  canvasWidth,
@@ -24187,7 +24190,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
24187
24190
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
24188
24191
  sanitizeSvgTreeForPdf(svgToDraw);
24189
24192
  try {
24190
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CgEH8Ggz.js");
24193
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-BIPt7Ujn.js");
24191
24194
  try {
24192
24195
  await logTextMeasurementDiagnostic(svgToDraw);
24193
24196
  } catch {
@@ -24587,4 +24590,4 @@ export {
24587
24590
  buildTeaserBlurFlatKeys as y,
24588
24591
  collectFontDescriptorsFromConfig as z
24589
24592
  };
24590
- //# sourceMappingURL=index-DHRpTjzC.js.map
24593
+ //# sourceMappingURL=index-CTr4Fc8y.js.map