@pixldocs/canvas-renderer 0.5.258 → 0.5.260
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-DZ8rlYH6.js → index-Dh9WY10e.js} +21 -16
- package/dist/index-Dh9WY10e.js.map +1 -0
- package/dist/{index-Dy4oD06S.cjs → index-iahevkuu.cjs} +21 -16
- package/dist/index-iahevkuu.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BrLwOuTP.js → vectorPdfExport-D4Vl-GPD.js} +4 -4
- package/dist/{vectorPdfExport-BrLwOuTP.js.map → vectorPdfExport-D4Vl-GPD.js.map} +1 -1
- package/dist/{vectorPdfExport-rgv8yUj2.cjs → vectorPdfExport-DuUmVQWJ.cjs} +4 -4
- package/dist/{vectorPdfExport-rgv8yUj2.cjs.map → vectorPdfExport-DuUmVQWJ.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-DZ8rlYH6.js.map +0 -1
- package/dist/index-Dy4oD06S.cjs.map +0 -1
|
@@ -11198,15 +11198,6 @@ const PageCanvas = react.forwardRef(
|
|
|
11198
11198
|
}
|
|
11199
11199
|
}
|
|
11200
11200
|
applyWarpAwareSelectionBorders(selection);
|
|
11201
|
-
try {
|
|
11202
|
-
selection.setControlsVisibility({
|
|
11203
|
-
ml: false,
|
|
11204
|
-
mr: false,
|
|
11205
|
-
mt: false,
|
|
11206
|
-
mb: false
|
|
11207
|
-
});
|
|
11208
|
-
} catch {
|
|
11209
|
-
}
|
|
11210
11201
|
}, []);
|
|
11211
11202
|
const pageBoundsOptions = react.useMemo(
|
|
11212
11203
|
() => ({ pageContentWidth: canvasWidth, pageContentHeight: canvasHeight }),
|
|
@@ -13508,6 +13499,12 @@ const PageCanvas = react.forwardRef(
|
|
|
13508
13499
|
const isXSide = corner === "ml" || corner === "mr";
|
|
13509
13500
|
const sAxis = isXSide ? Math.abs(obj.scaleX ?? 1) : Math.abs(obj.scaleY ?? 1);
|
|
13510
13501
|
if (sAxis > 1e-3) {
|
|
13502
|
+
const asW0 = obj.width ?? 0;
|
|
13503
|
+
const asH0 = obj.height ?? 0;
|
|
13504
|
+
const asSx0 = obj.scaleX ?? 1;
|
|
13505
|
+
const asSy0 = obj.scaleY ?? 1;
|
|
13506
|
+
const asLeft0 = obj.left ?? 0;
|
|
13507
|
+
const asTop0 = obj.top ?? 0;
|
|
13511
13508
|
for (const child of obj.getObjects()) {
|
|
13512
13509
|
if (!(child instanceof fabric__namespace.Textbox)) continue;
|
|
13513
13510
|
if (isXSide) {
|
|
@@ -13517,7 +13514,8 @@ const PageCanvas = react.forwardRef(
|
|
|
13517
13514
|
const origW = child.__asLiveOrigW;
|
|
13518
13515
|
const newW = Math.max(20, origW * sAxis);
|
|
13519
13516
|
if (Math.abs((child.width ?? 0) - newW) > 0.5) {
|
|
13520
|
-
child.
|
|
13517
|
+
child._set("width", newW);
|
|
13518
|
+
child._set("scaleX", 1 / sAxis);
|
|
13521
13519
|
try {
|
|
13522
13520
|
child.initDimensions();
|
|
13523
13521
|
} catch {
|
|
@@ -13531,7 +13529,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13531
13529
|
const origH = child.__asLiveOrigH;
|
|
13532
13530
|
const newH = Math.max(20, origH * sAxis);
|
|
13533
13531
|
child.minBoxHeight = newH;
|
|
13534
|
-
child.
|
|
13532
|
+
child._set("scaleY", 1 / sAxis);
|
|
13535
13533
|
try {
|
|
13536
13534
|
child.initDimensions();
|
|
13537
13535
|
} catch {
|
|
@@ -13539,6 +13537,13 @@ const PageCanvas = react.forwardRef(
|
|
|
13539
13537
|
child.dirty = true;
|
|
13540
13538
|
}
|
|
13541
13539
|
}
|
|
13540
|
+
obj._set("width", asW0);
|
|
13541
|
+
obj._set("height", asH0);
|
|
13542
|
+
obj._set("scaleX", asSx0);
|
|
13543
|
+
obj._set("scaleY", asSy0);
|
|
13544
|
+
obj._set("left", asLeft0);
|
|
13545
|
+
obj._set("top", asTop0);
|
|
13546
|
+
obj.setCoords();
|
|
13542
13547
|
}
|
|
13543
13548
|
}
|
|
13544
13549
|
snapDuringScaleCallback(obj, corner);
|
|
@@ -23555,9 +23560,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
23555
23560
|
}
|
|
23556
23561
|
return svgString;
|
|
23557
23562
|
}
|
|
23558
|
-
const resolvedPackageVersion = "0.5.
|
|
23563
|
+
const resolvedPackageVersion = "0.5.260";
|
|
23559
23564
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
23560
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
23565
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.260";
|
|
23561
23566
|
const roundParityValue = (value) => {
|
|
23562
23567
|
if (typeof value !== "number") return value;
|
|
23563
23568
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24371,7 +24376,7 @@ class PixldocsRenderer {
|
|
|
24371
24376
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24372
24377
|
}
|
|
24373
24378
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24374
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
24379
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-DuUmVQWJ.cjs"));
|
|
24375
24380
|
const prepared = preparePagesForExport(
|
|
24376
24381
|
cloned.pages,
|
|
24377
24382
|
canvasWidth,
|
|
@@ -26691,7 +26696,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
26691
26696
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
26692
26697
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
26693
26698
|
try {
|
|
26694
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
26699
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-DuUmVQWJ.cjs"));
|
|
26695
26700
|
try {
|
|
26696
26701
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
26697
26702
|
} catch {
|
|
@@ -27088,4 +27093,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27088
27093
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27089
27094
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27090
27095
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27091
|
-
//# sourceMappingURL=index-
|
|
27096
|
+
//# sourceMappingURL=index-iahevkuu.cjs.map
|