@pixldocs/canvas-renderer 0.5.453 → 0.5.454
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-B4ZctiMj.js → index-CeVp5eqp.js} +43 -9
- package/dist/index-CeVp5eqp.js.map +1 -0
- package/dist/{index-B8LHS1IK.cjs → index-DCWaFt-_.cjs} +43 -9
- package/dist/index-DCWaFt-_.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-B4XYT84_.cjs → vectorPdfExport-1e96-5qI.cjs} +4 -4
- package/dist/{vectorPdfExport-B4XYT84_.cjs.map → vectorPdfExport-1e96-5qI.cjs.map} +1 -1
- package/dist/{vectorPdfExport-DA8kyWb1.js → vectorPdfExport-xz20N_5g.js} +4 -4
- package/dist/{vectorPdfExport-DA8kyWb1.js.map → vectorPdfExport-xz20N_5g.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-B4ZctiMj.js.map +0 -1
- package/dist/index-B8LHS1IK.cjs.map +0 -1
|
@@ -20991,6 +20991,20 @@ function flattenSectionStateToFormData(sectionState, sections) {
|
|
|
20991
20991
|
}
|
|
20992
20992
|
return flat;
|
|
20993
20993
|
}
|
|
20994
|
+
function gradientSiblingForTarget(targetProperty) {
|
|
20995
|
+
switch (targetProperty) {
|
|
20996
|
+
case "fill":
|
|
20997
|
+
return "fillGradient";
|
|
20998
|
+
case "stroke":
|
|
20999
|
+
return "strokeGradient";
|
|
21000
|
+
case "textBgColor":
|
|
21001
|
+
return "textBgGradient";
|
|
21002
|
+
case "backgroundColor":
|
|
21003
|
+
return "backgroundGradient";
|
|
21004
|
+
default:
|
|
21005
|
+
return null;
|
|
21006
|
+
}
|
|
21007
|
+
}
|
|
20994
21008
|
const CLONE_SUFFIX = /_\d+$/;
|
|
20995
21009
|
function baseId(id) {
|
|
20996
21010
|
let s = id;
|
|
@@ -21091,7 +21105,18 @@ function setInTree(nodes, elementId, targetProperty, value) {
|
|
|
21091
21105
|
delete node.cropZoom;
|
|
21092
21106
|
}
|
|
21093
21107
|
} else {
|
|
21094
|
-
|
|
21108
|
+
const gradSibling = gradientSiblingForTarget(targetProperty);
|
|
21109
|
+
if (gradSibling) {
|
|
21110
|
+
if (isGradientConfig(value)) {
|
|
21111
|
+
node[gradSibling] = value;
|
|
21112
|
+
node[targetProperty] = targetProperty === "textBgColor" ? "transparent" : "";
|
|
21113
|
+
} else {
|
|
21114
|
+
if (gradSibling in node) delete node[gradSibling];
|
|
21115
|
+
node[targetProperty] = value;
|
|
21116
|
+
}
|
|
21117
|
+
} else {
|
|
21118
|
+
node[targetProperty] = value;
|
|
21119
|
+
}
|
|
21095
21120
|
}
|
|
21096
21121
|
if (targetProperty === "text" && node.type === "text") {
|
|
21097
21122
|
const overflowPolicy = String(node.overflowPolicy ?? "grow-and-push");
|
|
@@ -21763,10 +21788,19 @@ function applyFormDataToConfig(config, mappings, formValues, repeatableSectionsF
|
|
|
21763
21788
|
effectiveValue = formatTimeForDisplay(effectiveValue);
|
|
21764
21789
|
}
|
|
21765
21790
|
}
|
|
21766
|
-
if (elementId === PAGE_BACKGROUND_ELEMENT_ID && targetProperty === "backgroundColor"
|
|
21791
|
+
if (elementId === PAGE_BACKGROUND_ELEMENT_ID && targetProperty === "backgroundColor") {
|
|
21767
21792
|
if ((_a3 = pages[0]) == null ? void 0 : _a3.settings) {
|
|
21768
|
-
pages[0].settings
|
|
21769
|
-
|
|
21793
|
+
const settings = pages[0].settings;
|
|
21794
|
+
if (isGradientConfig(effectiveValue)) {
|
|
21795
|
+
settings.backgroundGradient = effectiveValue;
|
|
21796
|
+
settings.backgroundColor = "";
|
|
21797
|
+
return true;
|
|
21798
|
+
}
|
|
21799
|
+
if (typeof effectiveValue === "string") {
|
|
21800
|
+
if ("backgroundGradient" in settings) delete settings.backgroundGradient;
|
|
21801
|
+
settings.backgroundColor = effectiveValue;
|
|
21802
|
+
return true;
|
|
21803
|
+
}
|
|
21770
21804
|
}
|
|
21771
21805
|
}
|
|
21772
21806
|
for (const page of pages) {
|
|
@@ -26014,9 +26048,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
26014
26048
|
}
|
|
26015
26049
|
return svgString;
|
|
26016
26050
|
}
|
|
26017
|
-
const resolvedPackageVersion = "0.5.
|
|
26051
|
+
const resolvedPackageVersion = "0.5.454";
|
|
26018
26052
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
26019
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
26053
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.454";
|
|
26020
26054
|
const roundParityValue = (value) => {
|
|
26021
26055
|
if (typeof value !== "number") return value;
|
|
26022
26056
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -26830,7 +26864,7 @@ class PixldocsRenderer {
|
|
|
26830
26864
|
await this.waitForCanvasScene(container, cloned, i);
|
|
26831
26865
|
}
|
|
26832
26866
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
26833
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
26867
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-1e96-5qI.cjs"));
|
|
26834
26868
|
const prepared = preparePagesForExport(
|
|
26835
26869
|
cloned.pages,
|
|
26836
26870
|
canvasWidth,
|
|
@@ -29150,7 +29184,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
29150
29184
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
29151
29185
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
29152
29186
|
try {
|
|
29153
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
29187
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-1e96-5qI.cjs"));
|
|
29154
29188
|
try {
|
|
29155
29189
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
29156
29190
|
} catch {
|
|
@@ -29547,4 +29581,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
29547
29581
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
29548
29582
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
29549
29583
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
29550
|
-
//# sourceMappingURL=index-
|
|
29584
|
+
//# sourceMappingURL=index-DCWaFt-_.cjs.map
|