@pixldocs/canvas-renderer 0.5.464 → 0.5.465
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-BFIEinvR.cjs → index-Co301SkV.cjs} +17 -6
- package/dist/{index-BFIEinvR.cjs.map → index-Co301SkV.cjs.map} +1 -1
- package/dist/{index-TvXdi5B9.js → index-DmkAdvKz.js} +17 -6
- package/dist/{index-TvXdi5B9.js.map → index-DmkAdvKz.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BlaglUx4.cjs → vectorPdfExport-Bsd1V19b.cjs} +4 -4
- package/dist/{vectorPdfExport-BlaglUx4.cjs.map → vectorPdfExport-Bsd1V19b.cjs.map} +1 -1
- package/dist/{vectorPdfExport-pt3O47hm.js → vectorPdfExport-CVeVbCo7.js} +4 -4
- package/dist/{vectorPdfExport-pt3O47hm.js.map → vectorPdfExport-CVeVbCo7.js.map} +1 -1
- package/package.json +1 -1
|
@@ -17485,6 +17485,17 @@ const PageCanvas = react.forwardRef(
|
|
|
17485
17485
|
const fadeKeyChanged = newFadeKey !== oldFadeKey || newFadeKey !== innerOldKey || cropFadeRendererMissing;
|
|
17486
17486
|
const needsReload = sourceUrlChanged || colorMapChanged || fadeKeyChanged && !isCropGroup2;
|
|
17487
17487
|
const needsCropGroupFadeUpdate = isCropGroup2 && fadeKeyChanged;
|
|
17488
|
+
let cropFrameSizeChanged = false;
|
|
17489
|
+
if (isCropGroup2) {
|
|
17490
|
+
const liveCt = existingObj.__cropData;
|
|
17491
|
+
const liveW = Number(liveCt == null ? void 0 : liveCt.frameW) || 0;
|
|
17492
|
+
const liveH = Number(liveCt == null ? void 0 : liveCt.frameH) || 0;
|
|
17493
|
+
const schemaW = (Number(element.width) || 0) * (Number(element.scaleX) || 1);
|
|
17494
|
+
const schemaH = (Number(element.height) || 0) * (Number(element.scaleY) || 1);
|
|
17495
|
+
if (schemaW > 0 && schemaH > 0 && (Math.abs(schemaW - liveW) > 0.5 || Math.abs(schemaH - liveH) > 0.5)) {
|
|
17496
|
+
cropFrameSizeChanged = true;
|
|
17497
|
+
}
|
|
17498
|
+
}
|
|
17488
17499
|
const hadUrlBefore = storedImageUrl && String(storedImageUrl).trim() !== "";
|
|
17489
17500
|
if (!hasUrl && hadUrlBefore) {
|
|
17490
17501
|
const resolvedSizeImg = (pageChildren == null ? void 0 : pageChildren.length) ? getNodeBounds(element, pageChildren) : { width: typeof element.width === "number" ? element.width : 200, height: typeof element.height === "number" ? element.height : 50 };
|
|
@@ -17521,7 +17532,7 @@ const PageCanvas = react.forwardRef(
|
|
|
17521
17532
|
const clipShapeForReplace = element.clipShape ?? ((_g = element.style) == null ? void 0 : _g.imageFrameShape) ?? (isPreviewMode ? "rectangle" : "none");
|
|
17522
17533
|
const needCropGroupForElement = imageFitForReplace !== "fill" || clipShapeForReplace && clipShapeForReplace !== "none";
|
|
17523
17534
|
const plainImageNeedsCropGroup = hasUrl && !isCropGroup2 && existingObj instanceof fabric__namespace.FabricImage && needCropGroupForElement;
|
|
17524
|
-
if (hasUrl && (needsReload || isPlaceholder || plainImageNeedsCropGroup || needsCropGroupFadeUpdate)) {
|
|
17535
|
+
if (hasUrl && (needsReload || isPlaceholder || plainImageNeedsCropGroup || needsCropGroupFadeUpdate || cropFrameSizeChanged)) {
|
|
17525
17536
|
if (needsReload && !isBeingTransformed && (!wasJustModified || sourceUrlChanged)) {
|
|
17526
17537
|
loadImageAsync2(element, existingObj, fc);
|
|
17527
17538
|
} else if (plainImageNeedsCropGroup) {
|
|
@@ -26297,9 +26308,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
26297
26308
|
}
|
|
26298
26309
|
return svgString;
|
|
26299
26310
|
}
|
|
26300
|
-
const resolvedPackageVersion = "0.5.
|
|
26311
|
+
const resolvedPackageVersion = "0.5.465";
|
|
26301
26312
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
26302
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
26313
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.465";
|
|
26303
26314
|
const roundParityValue = (value) => {
|
|
26304
26315
|
if (typeof value !== "number") return value;
|
|
26305
26316
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -27113,7 +27124,7 @@ class PixldocsRenderer {
|
|
|
27113
27124
|
await this.waitForCanvasScene(container, cloned, i);
|
|
27114
27125
|
}
|
|
27115
27126
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
27116
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
27127
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-Bsd1V19b.cjs"));
|
|
27117
27128
|
const prepared = preparePagesForExport(
|
|
27118
27129
|
cloned.pages,
|
|
27119
27130
|
canvasWidth,
|
|
@@ -29433,7 +29444,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
29433
29444
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
29434
29445
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
29435
29446
|
try {
|
|
29436
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
29447
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-Bsd1V19b.cjs"));
|
|
29437
29448
|
try {
|
|
29438
29449
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
29439
29450
|
} catch {
|
|
@@ -29747,4 +29758,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
29747
29758
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
29748
29759
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
29749
29760
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
29750
|
-
//# sourceMappingURL=index-
|
|
29761
|
+
//# sourceMappingURL=index-Co301SkV.cjs.map
|