@pixldocs/canvas-renderer 0.5.311 → 0.5.312
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-C7ZK-TLB.cjs → index-BVdt88VI.cjs} +37 -21
- package/dist/index-BVdt88VI.cjs.map +1 -0
- package/dist/{index-BGRSqiXc.js → index-P103UWW3.js} +37 -21
- package/dist/index-P103UWW3.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-DouKBaoG.js → vectorPdfExport-D5wEVDWm.js} +4 -4
- package/dist/{vectorPdfExport-DouKBaoG.js.map → vectorPdfExport-D5wEVDWm.js.map} +1 -1
- package/dist/{vectorPdfExport-CgqBRltR.cjs → vectorPdfExport-WWb68zM6.cjs} +4 -4
- package/dist/{vectorPdfExport-CgqBRltR.cjs.map → vectorPdfExport-WWb68zM6.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-BGRSqiXc.js.map +0 -1
- package/dist/index-C7ZK-TLB.cjs.map +0 -1
|
@@ -11169,25 +11169,41 @@ function applyWarpAwareSelectionBorders(selection) {
|
|
|
11169
11169
|
selection.hasBorders = true;
|
|
11170
11170
|
selection.hasControls = true;
|
|
11171
11171
|
try {
|
|
11172
|
-
|
|
11173
|
-
|
|
11174
|
-
|
|
11175
|
-
|
|
11176
|
-
|
|
11177
|
-
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11172
|
+
if (selection.__pixldocsAlignedAngle == null) {
|
|
11173
|
+
const kids = selection.getObjects();
|
|
11174
|
+
if (kids.length >= 1) {
|
|
11175
|
+
const norm = (a) => {
|
|
11176
|
+
const n = (a % 360 + 360) % 360;
|
|
11177
|
+
return n > 180 ? n - 360 : n;
|
|
11178
|
+
};
|
|
11179
|
+
const first = norm(((_a2 = kids[0]) == null ? void 0 : _a2.angle) ?? 0);
|
|
11180
|
+
let allSame = Math.abs(first) > 0.5;
|
|
11181
|
+
if (allSame) {
|
|
11182
|
+
for (const k of kids) {
|
|
11183
|
+
if (Math.abs(norm(k.angle ?? 0) - first) > 0.5) {
|
|
11184
|
+
allSame = false;
|
|
11185
|
+
break;
|
|
11186
|
+
}
|
|
11187
|
+
}
|
|
11188
|
+
}
|
|
11189
|
+
if (allSame) {
|
|
11190
|
+
const rad = -first * Math.PI / 180;
|
|
11191
|
+
const cos = Math.cos(rad), sin = Math.sin(rad);
|
|
11192
|
+
for (const k of kids) {
|
|
11193
|
+
const x = k.left ?? 0, y = k.top ?? 0;
|
|
11194
|
+
k.set({
|
|
11195
|
+
left: x * cos - y * sin,
|
|
11196
|
+
top: x * sin + y * cos,
|
|
11197
|
+
angle: 0
|
|
11198
|
+
});
|
|
11199
|
+
k.setCoords();
|
|
11200
|
+
}
|
|
11201
|
+
selection.set({ angle: first });
|
|
11202
|
+
selection.setCoords();
|
|
11203
|
+
selection.__pixldocsAlignedAngle = first;
|
|
11182
11204
|
}
|
|
11183
11205
|
}
|
|
11184
11206
|
}
|
|
11185
|
-
selection.setControlsVisibility({
|
|
11186
|
-
ml: !allSameNonZero,
|
|
11187
|
-
mr: !allSameNonZero,
|
|
11188
|
-
mt: !allSameNonZero,
|
|
11189
|
-
mb: !allSameNonZero
|
|
11190
|
-
});
|
|
11191
11207
|
} catch {
|
|
11192
11208
|
}
|
|
11193
11209
|
}
|
|
@@ -24233,9 +24249,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24233
24249
|
}
|
|
24234
24250
|
return svgString;
|
|
24235
24251
|
}
|
|
24236
|
-
const resolvedPackageVersion = "0.5.
|
|
24252
|
+
const resolvedPackageVersion = "0.5.312";
|
|
24237
24253
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24238
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24254
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.312";
|
|
24239
24255
|
const roundParityValue = (value) => {
|
|
24240
24256
|
if (typeof value !== "number") return value;
|
|
24241
24257
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25049,7 +25065,7 @@ class PixldocsRenderer {
|
|
|
25049
25065
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25050
25066
|
}
|
|
25051
25067
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25052
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
25068
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-D5wEVDWm.js");
|
|
25053
25069
|
const prepared = preparePagesForExport(
|
|
25054
25070
|
cloned.pages,
|
|
25055
25071
|
canvasWidth,
|
|
@@ -27369,7 +27385,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27369
27385
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27370
27386
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27371
27387
|
try {
|
|
27372
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
27388
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-D5wEVDWm.js");
|
|
27373
27389
|
try {
|
|
27374
27390
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27375
27391
|
} catch {
|
|
@@ -27769,4 +27785,4 @@ export {
|
|
|
27769
27785
|
buildTeaserBlurFlatKeys as y,
|
|
27770
27786
|
collectFontDescriptorsFromConfig as z
|
|
27771
27787
|
};
|
|
27772
|
-
//# sourceMappingURL=index-
|
|
27788
|
+
//# sourceMappingURL=index-P103UWW3.js.map
|