@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
|
@@ -15078,9 +15078,8 @@ const PageCanvas = forwardRef(
|
|
|
15078
15078
|
finalScaleX = 1;
|
|
15079
15079
|
finalScaleY = 1;
|
|
15080
15080
|
if (isActiveSelection && activeObj instanceof fabric.ActiveSelection) {
|
|
15081
|
-
|
|
15082
|
-
|
|
15083
|
-
absoluteTop = frameBounds.top;
|
|
15081
|
+
absoluteLeft = (decomposed.translateX ?? absoluteLeft) - finalWidth / 2;
|
|
15082
|
+
absoluteTop = (decomposed.translateY ?? absoluteTop) - finalHeight / 2;
|
|
15084
15083
|
} else {
|
|
15085
15084
|
absoluteLeft = (decomposed.translateX ?? absoluteLeft) - finalWidth / 2;
|
|
15086
15085
|
absoluteTop = (decomposed.translateY ?? absoluteTop) - finalHeight / 2;
|
|
@@ -15197,22 +15196,8 @@ const PageCanvas = forwardRef(
|
|
|
15197
15196
|
finalScaleX = 1;
|
|
15198
15197
|
finalScaleY = 1;
|
|
15199
15198
|
try {
|
|
15200
|
-
|
|
15201
|
-
|
|
15202
|
-
const sin = Math.sin(angleRad);
|
|
15203
|
-
const hw = finalWidth / 2;
|
|
15204
|
-
const hh = finalHeight / 2;
|
|
15205
|
-
const corners = [
|
|
15206
|
-
{ x: -hw, y: -hh },
|
|
15207
|
-
{ x: hw, y: -hh },
|
|
15208
|
-
{ x: hw, y: hh },
|
|
15209
|
-
{ x: -hw, y: hh }
|
|
15210
|
-
].map((p) => ({
|
|
15211
|
-
x: decomposed.translateX + p.x * cos - p.y * sin,
|
|
15212
|
-
y: decomposed.translateY + p.x * sin + p.y * cos
|
|
15213
|
-
}));
|
|
15214
|
-
absoluteLeft = Math.min(...corners.map((p) => p.x));
|
|
15215
|
-
absoluteTop = Math.min(...corners.map((p) => p.y));
|
|
15199
|
+
absoluteLeft = (decomposed.translateX ?? absoluteLeft) - finalWidth / 2;
|
|
15200
|
+
absoluteTop = (decomposed.translateY ?? absoluteTop) - finalHeight / 2;
|
|
15216
15201
|
} catch {
|
|
15217
15202
|
}
|
|
15218
15203
|
finalAbsoluteMatrix = fabric.util.composeMatrix({
|
|
@@ -15321,22 +15306,8 @@ const PageCanvas = forwardRef(
|
|
|
15321
15306
|
} catch {
|
|
15322
15307
|
}
|
|
15323
15308
|
try {
|
|
15324
|
-
|
|
15325
|
-
|
|
15326
|
-
const sin = Math.sin(angleRad);
|
|
15327
|
-
const hw = finalWidth / 2;
|
|
15328
|
-
const hh = finalHeight / 2;
|
|
15329
|
-
const corners = [
|
|
15330
|
-
{ x: -hw, y: -hh },
|
|
15331
|
-
{ x: hw, y: -hh },
|
|
15332
|
-
{ x: hw, y: hh },
|
|
15333
|
-
{ x: -hw, y: hh }
|
|
15334
|
-
].map((p) => ({
|
|
15335
|
-
x: decomposed.translateX + p.x * cos - p.y * sin,
|
|
15336
|
-
y: decomposed.translateY + p.x * sin + p.y * cos
|
|
15337
|
-
}));
|
|
15338
|
-
absoluteLeft = Math.min(...corners.map((p) => p.x));
|
|
15339
|
-
absoluteTop = Math.min(...corners.map((p) => p.y));
|
|
15309
|
+
absoluteLeft = (decomposed.translateX ?? absoluteLeft) - finalWidth / 2;
|
|
15310
|
+
absoluteTop = (decomposed.translateY ?? absoluteTop) - finalHeight / 2;
|
|
15340
15311
|
} catch {
|
|
15341
15312
|
}
|
|
15342
15313
|
finalAbsoluteMatrix = fabric.util.composeMatrix({
|
|
@@ -24615,9 +24586,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24615
24586
|
}
|
|
24616
24587
|
return svgString;
|
|
24617
24588
|
}
|
|
24618
|
-
const resolvedPackageVersion = "0.5.
|
|
24589
|
+
const resolvedPackageVersion = "0.5.362";
|
|
24619
24590
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24620
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24591
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.362";
|
|
24621
24592
|
const roundParityValue = (value) => {
|
|
24622
24593
|
if (typeof value !== "number") return value;
|
|
24623
24594
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25431,7 +25402,7 @@ class PixldocsRenderer {
|
|
|
25431
25402
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25432
25403
|
}
|
|
25433
25404
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25434
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
25405
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-BVELqTIO.js");
|
|
25435
25406
|
const prepared = preparePagesForExport(
|
|
25436
25407
|
cloned.pages,
|
|
25437
25408
|
canvasWidth,
|
|
@@ -27751,7 +27722,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27751
27722
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27752
27723
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27753
27724
|
try {
|
|
27754
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
27725
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-BVELqTIO.js");
|
|
27755
27726
|
try {
|
|
27756
27727
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27757
27728
|
} catch {
|
|
@@ -28151,4 +28122,4 @@ export {
|
|
|
28151
28122
|
buildTeaserBlurFlatKeys as y,
|
|
28152
28123
|
collectFontDescriptorsFromConfig as z
|
|
28153
28124
|
};
|
|
28154
|
-
//# sourceMappingURL=index-
|
|
28125
|
+
//# sourceMappingURL=index-WH1l4oST.js.map
|