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