@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
|
@@ -17467,6 +17467,17 @@ const PageCanvas = forwardRef(
|
|
|
17467
17467
|
const fadeKeyChanged = newFadeKey !== oldFadeKey || newFadeKey !== innerOldKey || cropFadeRendererMissing;
|
|
17468
17468
|
const needsReload = sourceUrlChanged || colorMapChanged || fadeKeyChanged && !isCropGroup2;
|
|
17469
17469
|
const needsCropGroupFadeUpdate = isCropGroup2 && fadeKeyChanged;
|
|
17470
|
+
let cropFrameSizeChanged = false;
|
|
17471
|
+
if (isCropGroup2) {
|
|
17472
|
+
const liveCt = existingObj.__cropData;
|
|
17473
|
+
const liveW = Number(liveCt == null ? void 0 : liveCt.frameW) || 0;
|
|
17474
|
+
const liveH = Number(liveCt == null ? void 0 : liveCt.frameH) || 0;
|
|
17475
|
+
const schemaW = (Number(element.width) || 0) * (Number(element.scaleX) || 1);
|
|
17476
|
+
const schemaH = (Number(element.height) || 0) * (Number(element.scaleY) || 1);
|
|
17477
|
+
if (schemaW > 0 && schemaH > 0 && (Math.abs(schemaW - liveW) > 0.5 || Math.abs(schemaH - liveH) > 0.5)) {
|
|
17478
|
+
cropFrameSizeChanged = true;
|
|
17479
|
+
}
|
|
17480
|
+
}
|
|
17470
17481
|
const hadUrlBefore = storedImageUrl && String(storedImageUrl).trim() !== "";
|
|
17471
17482
|
if (!hasUrl && hadUrlBefore) {
|
|
17472
17483
|
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 };
|
|
@@ -17503,7 +17514,7 @@ const PageCanvas = forwardRef(
|
|
|
17503
17514
|
const clipShapeForReplace = element.clipShape ?? ((_g = element.style) == null ? void 0 : _g.imageFrameShape) ?? (isPreviewMode ? "rectangle" : "none");
|
|
17504
17515
|
const needCropGroupForElement = imageFitForReplace !== "fill" || clipShapeForReplace && clipShapeForReplace !== "none";
|
|
17505
17516
|
const plainImageNeedsCropGroup = hasUrl && !isCropGroup2 && existingObj instanceof fabric.FabricImage && needCropGroupForElement;
|
|
17506
|
-
if (hasUrl && (needsReload || isPlaceholder || plainImageNeedsCropGroup || needsCropGroupFadeUpdate)) {
|
|
17517
|
+
if (hasUrl && (needsReload || isPlaceholder || plainImageNeedsCropGroup || needsCropGroupFadeUpdate || cropFrameSizeChanged)) {
|
|
17507
17518
|
if (needsReload && !isBeingTransformed && (!wasJustModified || sourceUrlChanged)) {
|
|
17508
17519
|
loadImageAsync2(element, existingObj, fc);
|
|
17509
17520
|
} else if (plainImageNeedsCropGroup) {
|
|
@@ -26279,9 +26290,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
26279
26290
|
}
|
|
26280
26291
|
return svgString;
|
|
26281
26292
|
}
|
|
26282
|
-
const resolvedPackageVersion = "0.5.
|
|
26293
|
+
const resolvedPackageVersion = "0.5.465";
|
|
26283
26294
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
26284
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
26295
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.465";
|
|
26285
26296
|
const roundParityValue = (value) => {
|
|
26286
26297
|
if (typeof value !== "number") return value;
|
|
26287
26298
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -27095,7 +27106,7 @@ class PixldocsRenderer {
|
|
|
27095
27106
|
await this.waitForCanvasScene(container, cloned, i);
|
|
27096
27107
|
}
|
|
27097
27108
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
27098
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
27109
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CVeVbCo7.js");
|
|
27099
27110
|
const prepared = preparePagesForExport(
|
|
27100
27111
|
cloned.pages,
|
|
27101
27112
|
canvasWidth,
|
|
@@ -29415,7 +29426,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
29415
29426
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
29416
29427
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
29417
29428
|
try {
|
|
29418
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
29429
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CVeVbCo7.js");
|
|
29419
29430
|
try {
|
|
29420
29431
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
29421
29432
|
} catch {
|
|
@@ -29732,4 +29743,4 @@ export {
|
|
|
29732
29743
|
buildTeaserBlurFlatKeys as y,
|
|
29733
29744
|
collectFontDescriptorsFromConfig as z
|
|
29734
29745
|
};
|
|
29735
|
-
//# sourceMappingURL=index-
|
|
29746
|
+
//# sourceMappingURL=index-DmkAdvKz.js.map
|