@pixldocs/canvas-renderer 0.5.360 → 0.5.362
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-BTxKjVRe.cjs → index-DQ-6sfz_.cjs} +11 -40
- package/dist/index-DQ-6sfz_.cjs.map +1 -0
- package/dist/{index-UHlXMRk_.js → index-WH1l4oST.js} +11 -40
- package/dist/index-WH1l4oST.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BGYJ-v0u.cjs → vectorPdfExport-BAjK5RAp.cjs} +4 -4
- package/dist/{vectorPdfExport-BGYJ-v0u.cjs.map → vectorPdfExport-BAjK5RAp.cjs.map} +1 -1
- package/dist/{vectorPdfExport-Cxjz5z00.js → vectorPdfExport-BVELqTIO.js} +4 -4
- package/dist/{vectorPdfExport-Cxjz5z00.js.map → vectorPdfExport-BVELqTIO.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-BTxKjVRe.cjs.map +0 -1
- package/dist/index-UHlXMRk_.js.map +0 -1
|
@@ -15096,9 +15096,8 @@ const PageCanvas = react.forwardRef(
|
|
|
15096
15096
|
finalScaleX = 1;
|
|
15097
15097
|
finalScaleY = 1;
|
|
15098
15098
|
if (isActiveSelection && activeObj instanceof fabric__namespace.ActiveSelection) {
|
|
15099
|
-
|
|
15100
|
-
|
|
15101
|
-
absoluteTop = frameBounds.top;
|
|
15099
|
+
absoluteLeft = (decomposed.translateX ?? absoluteLeft) - finalWidth / 2;
|
|
15100
|
+
absoluteTop = (decomposed.translateY ?? absoluteTop) - finalHeight / 2;
|
|
15102
15101
|
} else {
|
|
15103
15102
|
absoluteLeft = (decomposed.translateX ?? absoluteLeft) - finalWidth / 2;
|
|
15104
15103
|
absoluteTop = (decomposed.translateY ?? absoluteTop) - finalHeight / 2;
|
|
@@ -15215,22 +15214,8 @@ const PageCanvas = react.forwardRef(
|
|
|
15215
15214
|
finalScaleX = 1;
|
|
15216
15215
|
finalScaleY = 1;
|
|
15217
15216
|
try {
|
|
15218
|
-
|
|
15219
|
-
|
|
15220
|
-
const sin = Math.sin(angleRad);
|
|
15221
|
-
const hw = finalWidth / 2;
|
|
15222
|
-
const hh = finalHeight / 2;
|
|
15223
|
-
const corners = [
|
|
15224
|
-
{ x: -hw, y: -hh },
|
|
15225
|
-
{ x: hw, y: -hh },
|
|
15226
|
-
{ x: hw, y: hh },
|
|
15227
|
-
{ x: -hw, y: hh }
|
|
15228
|
-
].map((p) => ({
|
|
15229
|
-
x: decomposed.translateX + p.x * cos - p.y * sin,
|
|
15230
|
-
y: decomposed.translateY + p.x * sin + p.y * cos
|
|
15231
|
-
}));
|
|
15232
|
-
absoluteLeft = Math.min(...corners.map((p) => p.x));
|
|
15233
|
-
absoluteTop = Math.min(...corners.map((p) => p.y));
|
|
15217
|
+
absoluteLeft = (decomposed.translateX ?? absoluteLeft) - finalWidth / 2;
|
|
15218
|
+
absoluteTop = (decomposed.translateY ?? absoluteTop) - finalHeight / 2;
|
|
15234
15219
|
} catch {
|
|
15235
15220
|
}
|
|
15236
15221
|
finalAbsoluteMatrix = fabric__namespace.util.composeMatrix({
|
|
@@ -15339,22 +15324,8 @@ const PageCanvas = react.forwardRef(
|
|
|
15339
15324
|
} catch {
|
|
15340
15325
|
}
|
|
15341
15326
|
try {
|
|
15342
|
-
|
|
15343
|
-
|
|
15344
|
-
const sin = Math.sin(angleRad);
|
|
15345
|
-
const hw = finalWidth / 2;
|
|
15346
|
-
const hh = finalHeight / 2;
|
|
15347
|
-
const corners = [
|
|
15348
|
-
{ x: -hw, y: -hh },
|
|
15349
|
-
{ x: hw, y: -hh },
|
|
15350
|
-
{ x: hw, y: hh },
|
|
15351
|
-
{ x: -hw, y: hh }
|
|
15352
|
-
].map((p) => ({
|
|
15353
|
-
x: decomposed.translateX + p.x * cos - p.y * sin,
|
|
15354
|
-
y: decomposed.translateY + p.x * sin + p.y * cos
|
|
15355
|
-
}));
|
|
15356
|
-
absoluteLeft = Math.min(...corners.map((p) => p.x));
|
|
15357
|
-
absoluteTop = Math.min(...corners.map((p) => p.y));
|
|
15327
|
+
absoluteLeft = (decomposed.translateX ?? absoluteLeft) - finalWidth / 2;
|
|
15328
|
+
absoluteTop = (decomposed.translateY ?? absoluteTop) - finalHeight / 2;
|
|
15358
15329
|
} catch {
|
|
15359
15330
|
}
|
|
15360
15331
|
finalAbsoluteMatrix = fabric__namespace.util.composeMatrix({
|
|
@@ -24633,9 +24604,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24633
24604
|
}
|
|
24634
24605
|
return svgString;
|
|
24635
24606
|
}
|
|
24636
|
-
const resolvedPackageVersion = "0.5.
|
|
24607
|
+
const resolvedPackageVersion = "0.5.362";
|
|
24637
24608
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24638
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24609
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.362";
|
|
24639
24610
|
const roundParityValue = (value) => {
|
|
24640
24611
|
if (typeof value !== "number") return value;
|
|
24641
24612
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25449,7 +25420,7 @@ class PixldocsRenderer {
|
|
|
25449
25420
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25450
25421
|
}
|
|
25451
25422
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25452
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
25423
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-BAjK5RAp.cjs"));
|
|
25453
25424
|
const prepared = preparePagesForExport(
|
|
25454
25425
|
cloned.pages,
|
|
25455
25426
|
canvasWidth,
|
|
@@ -27769,7 +27740,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27769
27740
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27770
27741
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27771
27742
|
try {
|
|
27772
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
27743
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-BAjK5RAp.cjs"));
|
|
27773
27744
|
try {
|
|
27774
27745
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27775
27746
|
} catch {
|
|
@@ -28166,4 +28137,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
28166
28137
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
28167
28138
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
28168
28139
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
28169
|
-
//# sourceMappingURL=index-
|
|
28140
|
+
//# sourceMappingURL=index-DQ-6sfz_.cjs.map
|