@pixldocs/canvas-renderer 0.5.390 → 0.5.391
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-BAbK6GX5.cjs → index-C5CC51On.cjs} +15 -9
- package/dist/index-C5CC51On.cjs.map +1 -0
- package/dist/{index-ByJXwd5Y.js → index-Cx-Z8HWW.js} +15 -9
- package/dist/{index-BAbK6GX5.cjs.map → index-Cx-Z8HWW.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-3tLyCSst.cjs → vectorPdfExport-B8BF2GBZ.cjs} +4 -4
- package/dist/{vectorPdfExport-3tLyCSst.cjs.map → vectorPdfExport-B8BF2GBZ.cjs.map} +1 -1
- package/dist/{vectorPdfExport-p4K2EISX.js → vectorPdfExport-C8_CSDHY.js} +4 -4
- package/dist/{vectorPdfExport-p4K2EISX.js.map → vectorPdfExport-C8_CSDHY.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-ByJXwd5Y.js.map +0 -1
|
@@ -11473,12 +11473,18 @@ function applyWarpAwareSelectionBorders(selection) {
|
|
|
11473
11473
|
k.calcOwnMatrix()
|
|
11474
11474
|
));
|
|
11475
11475
|
const worldAngles = worldMatrices.map((m) => norm(fabric__namespace.util.qrDecompose(m).angle ?? 0));
|
|
11476
|
-
const first = worldAngles[0] ?? 0;
|
|
11477
11476
|
const ALL_SAME_TOL_DEG = 2;
|
|
11478
|
-
const
|
|
11477
|
+
const buckets = [];
|
|
11478
|
+
for (const a of worldAngles) {
|
|
11479
|
+
const b = buckets.find((x) => angleDelta(x.angle, a) <= ALL_SAME_TOL_DEG);
|
|
11480
|
+
if (b) b.count++;
|
|
11481
|
+
else buckets.push({ angle: a, count: 1 });
|
|
11482
|
+
}
|
|
11483
|
+
buckets.sort((a, b) => b.count - a.count);
|
|
11484
|
+
const dominant = buckets[0];
|
|
11479
11485
|
let targetAngle = null;
|
|
11480
|
-
if (
|
|
11481
|
-
targetAngle =
|
|
11486
|
+
if (dominant && Math.abs(dominant.angle) > 0.5 && (kids.length === 1 || dominant.count >= 2 || dominant.count === kids.length)) {
|
|
11487
|
+
targetAngle = dominant.angle;
|
|
11482
11488
|
}
|
|
11483
11489
|
if (targetAngle != null) {
|
|
11484
11490
|
const restoreKidsFromWorld = () => {
|
|
@@ -25042,9 +25048,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
25042
25048
|
}
|
|
25043
25049
|
return svgString;
|
|
25044
25050
|
}
|
|
25045
|
-
const resolvedPackageVersion = "0.5.
|
|
25051
|
+
const resolvedPackageVersion = "0.5.391";
|
|
25046
25052
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
25047
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
25053
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.391";
|
|
25048
25054
|
const roundParityValue = (value) => {
|
|
25049
25055
|
if (typeof value !== "number") return value;
|
|
25050
25056
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25858,7 +25864,7 @@ class PixldocsRenderer {
|
|
|
25858
25864
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25859
25865
|
}
|
|
25860
25866
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25861
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
25867
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-B8BF2GBZ.cjs"));
|
|
25862
25868
|
const prepared = preparePagesForExport(
|
|
25863
25869
|
cloned.pages,
|
|
25864
25870
|
canvasWidth,
|
|
@@ -28178,7 +28184,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
28178
28184
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
28179
28185
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
28180
28186
|
try {
|
|
28181
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
28187
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-B8BF2GBZ.cjs"));
|
|
28182
28188
|
try {
|
|
28183
28189
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
28184
28190
|
} catch {
|
|
@@ -28575,4 +28581,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
28575
28581
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
28576
28582
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
28577
28583
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
28578
|
-
//# sourceMappingURL=index-
|
|
28584
|
+
//# sourceMappingURL=index-C5CC51On.cjs.map
|