@pixldocs/canvas-renderer 0.5.362 → 0.5.363
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-DQ-6sfz_.cjs → index-2dvR-r9n.cjs} +12 -7
- package/dist/{index-DQ-6sfz_.cjs.map → index-2dvR-r9n.cjs.map} +1 -1
- package/dist/{index-WH1l4oST.js → index-Cw161PRH.js} +12 -7
- package/dist/{index-WH1l4oST.js.map → index-Cw161PRH.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BAjK5RAp.cjs → vectorPdfExport-DcTlFDUW.cjs} +4 -4
- package/dist/{vectorPdfExport-BAjK5RAp.cjs.map → vectorPdfExport-DcTlFDUW.cjs.map} +1 -1
- package/dist/{vectorPdfExport-BVELqTIO.js → vectorPdfExport-DtI5z_ZO.js} +4 -4
- package/dist/{vectorPdfExport-BVELqTIO.js.map → vectorPdfExport-DtI5z_ZO.js.map} +1 -1
- package/package.json +1 -1
|
@@ -15324,8 +15324,13 @@ const PageCanvas = react.forwardRef(
|
|
|
15324
15324
|
} catch {
|
|
15325
15325
|
}
|
|
15326
15326
|
try {
|
|
15327
|
-
|
|
15328
|
-
|
|
15327
|
+
const textCenterX = decomposed.translateX ?? absoluteLeft;
|
|
15328
|
+
const textCenterY = decomposed.translateY ?? absoluteTop;
|
|
15329
|
+
const theta = fabric__namespace.util.degreesToRadians(decomposed.angle ?? 0);
|
|
15330
|
+
const cos = Math.cos(theta);
|
|
15331
|
+
const sin = Math.sin(theta);
|
|
15332
|
+
absoluteLeft = textCenterX - (cos * finalWidth / 2 - sin * finalHeight / 2);
|
|
15333
|
+
absoluteTop = textCenterY - (sin * finalWidth / 2 + cos * finalHeight / 2);
|
|
15329
15334
|
} catch {
|
|
15330
15335
|
}
|
|
15331
15336
|
finalAbsoluteMatrix = fabric__namespace.util.composeMatrix({
|
|
@@ -24604,9 +24609,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24604
24609
|
}
|
|
24605
24610
|
return svgString;
|
|
24606
24611
|
}
|
|
24607
|
-
const resolvedPackageVersion = "0.5.
|
|
24612
|
+
const resolvedPackageVersion = "0.5.363";
|
|
24608
24613
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24609
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24614
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.363";
|
|
24610
24615
|
const roundParityValue = (value) => {
|
|
24611
24616
|
if (typeof value !== "number") return value;
|
|
24612
24617
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25420,7 +25425,7 @@ class PixldocsRenderer {
|
|
|
25420
25425
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25421
25426
|
}
|
|
25422
25427
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25423
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
25428
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-DcTlFDUW.cjs"));
|
|
25424
25429
|
const prepared = preparePagesForExport(
|
|
25425
25430
|
cloned.pages,
|
|
25426
25431
|
canvasWidth,
|
|
@@ -27740,7 +27745,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27740
27745
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27741
27746
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27742
27747
|
try {
|
|
27743
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
27748
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-DcTlFDUW.cjs"));
|
|
27744
27749
|
try {
|
|
27745
27750
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27746
27751
|
} catch {
|
|
@@ -28137,4 +28142,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
28137
28142
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
28138
28143
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
28139
28144
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
28140
|
-
//# sourceMappingURL=index-
|
|
28145
|
+
//# sourceMappingURL=index-2dvR-r9n.cjs.map
|