@pixldocs/canvas-renderer 0.5.310 → 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-1lUaEm6d.cjs → index-BVdt88VI.cjs} +44 -5
- package/dist/index-BVdt88VI.cjs.map +1 -0
- package/dist/{index-DiALQM5h.js → index-P103UWW3.js} +44 -5
- package/dist/index-P103UWW3.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-iBVh67qr.js → vectorPdfExport-D5wEVDWm.js} +4 -4
- package/dist/{vectorPdfExport-iBVh67qr.js.map → vectorPdfExport-D5wEVDWm.js.map} +1 -1
- package/dist/{vectorPdfExport-BszCIDi_.cjs → vectorPdfExport-WWb68zM6.cjs} +4 -4
- package/dist/{vectorPdfExport-BszCIDi_.cjs.map → vectorPdfExport-WWb68zM6.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-1lUaEm6d.cjs.map +0 -1
- package/dist/index-DiALQM5h.js.map +0 -1
|
@@ -11161,12 +11161,51 @@ const bakeTextboxScaleIntoTypography = (obj, sourceElement) => {
|
|
|
11161
11161
|
return updates;
|
|
11162
11162
|
};
|
|
11163
11163
|
function applyWarpAwareSelectionBorders(selection) {
|
|
11164
|
+
var _a2;
|
|
11164
11165
|
if (selection.__pixldocsOrigASHasBorders !== void 0) {
|
|
11165
11166
|
selection.hasBorders = selection.__pixldocsOrigASHasBorders;
|
|
11166
11167
|
delete selection.__pixldocsOrigASHasBorders;
|
|
11167
11168
|
}
|
|
11168
11169
|
selection.hasBorders = true;
|
|
11169
11170
|
selection.hasControls = true;
|
|
11171
|
+
try {
|
|
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;
|
|
11204
|
+
}
|
|
11205
|
+
}
|
|
11206
|
+
}
|
|
11207
|
+
} catch {
|
|
11208
|
+
}
|
|
11170
11209
|
}
|
|
11171
11210
|
const PageCanvas = forwardRef(
|
|
11172
11211
|
({
|
|
@@ -24210,9 +24249,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24210
24249
|
}
|
|
24211
24250
|
return svgString;
|
|
24212
24251
|
}
|
|
24213
|
-
const resolvedPackageVersion = "0.5.
|
|
24252
|
+
const resolvedPackageVersion = "0.5.312";
|
|
24214
24253
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24215
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24254
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.312";
|
|
24216
24255
|
const roundParityValue = (value) => {
|
|
24217
24256
|
if (typeof value !== "number") return value;
|
|
24218
24257
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25026,7 +25065,7 @@ class PixldocsRenderer {
|
|
|
25026
25065
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25027
25066
|
}
|
|
25028
25067
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25029
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
25068
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-D5wEVDWm.js");
|
|
25030
25069
|
const prepared = preparePagesForExport(
|
|
25031
25070
|
cloned.pages,
|
|
25032
25071
|
canvasWidth,
|
|
@@ -27346,7 +27385,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27346
27385
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27347
27386
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27348
27387
|
try {
|
|
27349
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
27388
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-D5wEVDWm.js");
|
|
27350
27389
|
try {
|
|
27351
27390
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27352
27391
|
} catch {
|
|
@@ -27746,4 +27785,4 @@ export {
|
|
|
27746
27785
|
buildTeaserBlurFlatKeys as y,
|
|
27747
27786
|
collectFontDescriptorsFromConfig as z
|
|
27748
27787
|
};
|
|
27749
|
-
//# sourceMappingURL=index-
|
|
27788
|
+
//# sourceMappingURL=index-P103UWW3.js.map
|