@pixldocs/canvas-renderer 0.5.389 → 0.5.390
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-Z4UNgyZW.cjs → index-BAbK6GX5.cjs} +14 -8
- package/dist/index-BAbK6GX5.cjs.map +1 -0
- package/dist/{index-CxeXN5KG.js → index-ByJXwd5Y.js} +14 -8
- package/dist/index-ByJXwd5Y.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BRGM-p11.cjs → vectorPdfExport-3tLyCSst.cjs} +4 -4
- package/dist/{vectorPdfExport-BRGM-p11.cjs.map → vectorPdfExport-3tLyCSst.cjs.map} +1 -1
- package/dist/{vectorPdfExport-aeROfqEB.js → vectorPdfExport-p4K2EISX.js} +4 -4
- package/dist/{vectorPdfExport-aeROfqEB.js.map → vectorPdfExport-p4K2EISX.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-CxeXN5KG.js.map +0 -1
- package/dist/index-Z4UNgyZW.cjs.map +0 -1
|
@@ -13522,13 +13522,19 @@ const PageCanvas = forwardRef(
|
|
|
13522
13522
|
if (oid && memberIds.has(oid)) members.push(o);
|
|
13523
13523
|
}
|
|
13524
13524
|
if (members.length === 0) return null;
|
|
13525
|
-
const a0 = ((members[0].angle ?? 0) % 360 + 360) % 360;
|
|
13526
13525
|
const TOL = 0.5;
|
|
13526
|
+
const buckets = [];
|
|
13527
13527
|
for (const m of members) {
|
|
13528
13528
|
const a = ((m.angle ?? 0) % 360 + 360) % 360;
|
|
13529
|
-
const
|
|
13530
|
-
|
|
13529
|
+
const b = buckets.find((x) => {
|
|
13530
|
+
const d = Math.min(Math.abs(x.angle - a), 360 - Math.abs(x.angle - a));
|
|
13531
|
+
return d <= TOL;
|
|
13532
|
+
});
|
|
13533
|
+
if (b) b.count++;
|
|
13534
|
+
else buckets.push({ angle: a, count: 1 });
|
|
13531
13535
|
}
|
|
13536
|
+
buckets.sort((a, b) => b.count - a.count);
|
|
13537
|
+
const a0 = buckets[0].angle;
|
|
13532
13538
|
const rad = -a0 * Math.PI / 180;
|
|
13533
13539
|
const cos = Math.cos(rad), sin = Math.sin(rad);
|
|
13534
13540
|
let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
|
|
@@ -25018,9 +25024,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
25018
25024
|
}
|
|
25019
25025
|
return svgString;
|
|
25020
25026
|
}
|
|
25021
|
-
const resolvedPackageVersion = "0.5.
|
|
25027
|
+
const resolvedPackageVersion = "0.5.390";
|
|
25022
25028
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
25023
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
25029
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.390";
|
|
25024
25030
|
const roundParityValue = (value) => {
|
|
25025
25031
|
if (typeof value !== "number") return value;
|
|
25026
25032
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25834,7 +25840,7 @@ class PixldocsRenderer {
|
|
|
25834
25840
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25835
25841
|
}
|
|
25836
25842
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25837
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
25843
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-p4K2EISX.js");
|
|
25838
25844
|
const prepared = preparePagesForExport(
|
|
25839
25845
|
cloned.pages,
|
|
25840
25846
|
canvasWidth,
|
|
@@ -28154,7 +28160,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
28154
28160
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
28155
28161
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
28156
28162
|
try {
|
|
28157
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
28163
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-p4K2EISX.js");
|
|
28158
28164
|
try {
|
|
28159
28165
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
28160
28166
|
} catch {
|
|
@@ -28554,4 +28560,4 @@ export {
|
|
|
28554
28560
|
buildTeaserBlurFlatKeys as y,
|
|
28555
28561
|
collectFontDescriptorsFromConfig as z
|
|
28556
28562
|
};
|
|
28557
|
-
//# sourceMappingURL=index-
|
|
28563
|
+
//# sourceMappingURL=index-ByJXwd5Y.js.map
|