@pixldocs/canvas-renderer 0.5.233 → 0.5.234
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-DJ3tFfRA.js → index-BStk6K2C.js} +22 -10
- package/dist/{index-DJ3tFfRA.js.map → index-BStk6K2C.js.map} +1 -1
- package/dist/{index-3rzFNy2Z.cjs → index-DQRByRIO.cjs} +22 -10
- package/dist/index-DQRByRIO.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-DTCd5GSf.cjs → vectorPdfExport-Bf3z99NE.cjs} +4 -4
- package/dist/{vectorPdfExport-DTCd5GSf.cjs.map → vectorPdfExport-Bf3z99NE.cjs.map} +1 -1
- package/dist/{vectorPdfExport-D-bYnkA5.js → vectorPdfExport-DZm2JXde.js} +4 -4
- package/dist/{vectorPdfExport-D-bYnkA5.js.map → vectorPdfExport-DZm2JXde.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-3rzFNy2Z.cjs.map +0 -1
|
@@ -13368,6 +13368,14 @@ const PageCanvas = forwardRef(
|
|
|
13368
13368
|
clearMeasurementCache();
|
|
13369
13369
|
}
|
|
13370
13370
|
doSyncRef.current();
|
|
13371
|
+
if ((isPreviewMode || isExportMode) && fc && (pageChildren == null ? void 0 : pageChildren.length)) {
|
|
13372
|
+
runFontReloadAndReflow({
|
|
13373
|
+
canvas: fc,
|
|
13374
|
+
pageTree: pageChildren,
|
|
13375
|
+
pageBoundsOptions,
|
|
13376
|
+
preserveGlobalFontCache
|
|
13377
|
+
});
|
|
13378
|
+
}
|
|
13371
13379
|
if (isPreviewMode && fc && (fc.width ?? 0) > 0 && (fc.height ?? 0) > 0) {
|
|
13372
13380
|
fc.requestRenderAll();
|
|
13373
13381
|
}
|
|
@@ -19434,10 +19442,10 @@ async function resolveTemplateData(options) {
|
|
|
19434
19442
|
const inlineFormSchema = template.form_schema;
|
|
19435
19443
|
const defaultData = template.default_data;
|
|
19436
19444
|
if (inlineFormSchema && typeof inlineFormSchema === "object") {
|
|
19437
|
-
if (!Array.isArray(config.dynamicFields) && Array.isArray(inlineFormSchema.dynamicFields)) {
|
|
19445
|
+
if ((!Array.isArray(config.dynamicFields) || config.dynamicFields.length === 0) && Array.isArray(inlineFormSchema.dynamicFields)) {
|
|
19438
19446
|
config.dynamicFields = inlineFormSchema.dynamicFields;
|
|
19439
19447
|
}
|
|
19440
|
-
if (!Array.isArray(config.fieldGroups) && Array.isArray(inlineFormSchema.fieldGroups)) {
|
|
19448
|
+
if ((!Array.isArray(config.fieldGroups) || config.fieldGroups.length === 0) && Array.isArray(inlineFormSchema.fieldGroups)) {
|
|
19441
19449
|
config.fieldGroups = inlineFormSchema.fieldGroups;
|
|
19442
19450
|
}
|
|
19443
19451
|
}
|
|
@@ -19518,10 +19526,10 @@ async function resolveFromForm(options) {
|
|
|
19518
19526
|
const templateFormSchema = templateRow.form_schema;
|
|
19519
19527
|
const formSchema = (formSchemaRow == null ? void 0 : formSchemaRow.schema) ?? void 0;
|
|
19520
19528
|
if (templateFormSchema) {
|
|
19521
|
-
if (!Array.isArray(templateConfig.dynamicFields) && Array.isArray(templateFormSchema.dynamicFields)) {
|
|
19529
|
+
if ((!Array.isArray(templateConfig.dynamicFields) || templateConfig.dynamicFields.length === 0) && Array.isArray(templateFormSchema.dynamicFields)) {
|
|
19522
19530
|
templateConfig.dynamicFields = templateFormSchema.dynamicFields;
|
|
19523
19531
|
}
|
|
19524
|
-
if (!Array.isArray(templateConfig.fieldGroups) && Array.isArray(templateFormSchema.fieldGroups)) {
|
|
19532
|
+
if ((!Array.isArray(templateConfig.fieldGroups) || templateConfig.fieldGroups.length === 0) && Array.isArray(templateFormSchema.fieldGroups)) {
|
|
19525
19533
|
templateConfig.fieldGroups = templateFormSchema.fieldGroups;
|
|
19526
19534
|
}
|
|
19527
19535
|
}
|
|
@@ -19568,7 +19576,11 @@ async function resolveFromForm(options) {
|
|
|
19568
19576
|
mergedSectionState = mergeRepeatableEntryMeta(mergedSectionState, templateDefaultMetaSectionState, inferredSections);
|
|
19569
19577
|
mergedSectionState = mergeRepeatableEntryMeta(mergedSectionState, defaultFormMetaSectionState, inferredSections);
|
|
19570
19578
|
mergedSectionState = sanitizeSectionStateAgainstSchema(mergedSectionState, formSchema);
|
|
19571
|
-
const
|
|
19579
|
+
const sectionFlatFormData = flattenSectionStateToFormData(mergedSectionState, inferredSections);
|
|
19580
|
+
const flatFormData = {
|
|
19581
|
+
...sectionFlatFormData,
|
|
19582
|
+
...directFlatFormData && typeof directFlatFormData === "object" ? directFlatFormData : {}
|
|
19583
|
+
};
|
|
19572
19584
|
const dynamicFields = templateConfig.dynamicFields || [];
|
|
19573
19585
|
const mappings = [];
|
|
19574
19586
|
for (const field of dynamicFields) {
|
|
@@ -21085,9 +21097,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
21085
21097
|
}
|
|
21086
21098
|
return svgString;
|
|
21087
21099
|
}
|
|
21088
|
-
const resolvedPackageVersion = "0.5.
|
|
21100
|
+
const resolvedPackageVersion = "0.5.234";
|
|
21089
21101
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
21090
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
21102
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.234";
|
|
21091
21103
|
const roundParityValue = (value) => {
|
|
21092
21104
|
if (typeof value !== "number") return value;
|
|
21093
21105
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -21831,7 +21843,7 @@ class PixldocsRenderer {
|
|
|
21831
21843
|
await this.waitForCanvasScene(container, cloned, i);
|
|
21832
21844
|
}
|
|
21833
21845
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
21834
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
21846
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-DZm2JXde.js");
|
|
21835
21847
|
const prepared = preparePagesForExport(
|
|
21836
21848
|
cloned.pages,
|
|
21837
21849
|
canvasWidth,
|
|
@@ -24151,7 +24163,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
24151
24163
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
24152
24164
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
24153
24165
|
try {
|
|
24154
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
24166
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-DZm2JXde.js");
|
|
24155
24167
|
try {
|
|
24156
24168
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
24157
24169
|
} catch {
|
|
@@ -24551,4 +24563,4 @@ export {
|
|
|
24551
24563
|
buildTeaserBlurFlatKeys as y,
|
|
24552
24564
|
collectFontDescriptorsFromConfig as z
|
|
24553
24565
|
};
|
|
24554
|
-
//# sourceMappingURL=index-
|
|
24566
|
+
//# sourceMappingURL=index-BStk6K2C.js.map
|