@pixldocs/canvas-renderer 0.5.431 → 0.5.432
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-Ce2dA8D0.cjs → index-CK9heNqN.cjs} +31 -9
- package/dist/index-CK9heNqN.cjs.map +1 -0
- package/dist/{index-BKeBl1Ev.js → index-gL0A2DGr.js} +31 -9
- package/dist/index-gL0A2DGr.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BbcJdy23.js → vectorPdfExport-Bkipkjlc.js} +4 -4
- package/dist/{vectorPdfExport-BbcJdy23.js.map → vectorPdfExport-Bkipkjlc.js.map} +1 -1
- package/dist/{vectorPdfExport-zM3-7B0b.cjs → vectorPdfExport-DgXV6S2u.cjs} +4 -4
- package/dist/{vectorPdfExport-zM3-7B0b.cjs.map → vectorPdfExport-DgXV6S2u.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-BKeBl1Ev.js.map +0 -1
- package/dist/index-Ce2dA8D0.cjs.map +0 -1
|
@@ -13969,10 +13969,32 @@ const PageCanvas = forwardRef(
|
|
|
13969
13969
|
if (!isGroup(node)) continue;
|
|
13970
13970
|
if (node.backgroundColor) continue;
|
|
13971
13971
|
if (activeEditingGroupId && node.id === activeEditingGroupId) continue;
|
|
13972
|
-
const
|
|
13973
|
-
|
|
13974
|
-
|
|
13975
|
-
|
|
13972
|
+
const oriented = groupFabricOrientedBBox(node);
|
|
13973
|
+
let inside = false;
|
|
13974
|
+
let area = 0;
|
|
13975
|
+
if (oriented && Math.abs(oriented.angle) > 0.01) {
|
|
13976
|
+
const rad = -oriented.angle * Math.PI / 180;
|
|
13977
|
+
const cos = Math.cos(rad), sin = Math.sin(rad);
|
|
13978
|
+
let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
|
|
13979
|
+
for (const p of oriented.corners) {
|
|
13980
|
+
const xr2 = p.x * cos - p.y * sin;
|
|
13981
|
+
const yr2 = p.x * sin + p.y * cos;
|
|
13982
|
+
if (xr2 < minX) minX = xr2;
|
|
13983
|
+
if (yr2 < minY) minY = yr2;
|
|
13984
|
+
if (xr2 > maxX) maxX = xr2;
|
|
13985
|
+
if (yr2 > maxY) maxY = yr2;
|
|
13986
|
+
}
|
|
13987
|
+
const xr = px * cos - py * sin;
|
|
13988
|
+
const yr = px * sin + py * cos;
|
|
13989
|
+
inside = xr >= minX && xr <= maxX && yr >= minY && yr <= maxY;
|
|
13990
|
+
area = Math.max(1, (maxX - minX) * (maxY - minY));
|
|
13991
|
+
} else {
|
|
13992
|
+
const b = groupFabricUnionBBox(node);
|
|
13993
|
+
if (!b) continue;
|
|
13994
|
+
inside = !(px < b.left || py < b.top || px > b.right || py > b.bottom);
|
|
13995
|
+
area = Math.max(1, (b.right - b.left) * (b.bottom - b.top));
|
|
13996
|
+
}
|
|
13997
|
+
if (!inside) continue;
|
|
13976
13998
|
if (!pick || area < pick.area) pick = { group: node, area };
|
|
13977
13999
|
}
|
|
13978
14000
|
return pick;
|
|
@@ -25740,9 +25762,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
25740
25762
|
}
|
|
25741
25763
|
return svgString;
|
|
25742
25764
|
}
|
|
25743
|
-
const resolvedPackageVersion = "0.5.
|
|
25765
|
+
const resolvedPackageVersion = "0.5.432";
|
|
25744
25766
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
25745
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
25767
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.432";
|
|
25746
25768
|
const roundParityValue = (value) => {
|
|
25747
25769
|
if (typeof value !== "number") return value;
|
|
25748
25770
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -26556,7 +26578,7 @@ class PixldocsRenderer {
|
|
|
26556
26578
|
await this.waitForCanvasScene(container, cloned, i);
|
|
26557
26579
|
}
|
|
26558
26580
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
26559
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
26581
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-Bkipkjlc.js");
|
|
26560
26582
|
const prepared = preparePagesForExport(
|
|
26561
26583
|
cloned.pages,
|
|
26562
26584
|
canvasWidth,
|
|
@@ -28876,7 +28898,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
28876
28898
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
28877
28899
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
28878
28900
|
try {
|
|
28879
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
28901
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-Bkipkjlc.js");
|
|
28880
28902
|
try {
|
|
28881
28903
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
28882
28904
|
} catch {
|
|
@@ -29276,4 +29298,4 @@ export {
|
|
|
29276
29298
|
buildTeaserBlurFlatKeys as y,
|
|
29277
29299
|
collectFontDescriptorsFromConfig as z
|
|
29278
29300
|
};
|
|
29279
|
-
//# sourceMappingURL=index-
|
|
29301
|
+
//# sourceMappingURL=index-gL0A2DGr.js.map
|