@pixldocs/canvas-renderer 0.5.358 → 0.5.359
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-BMPgVllP.cjs → index-B8DKV_MC.cjs} +10 -107
- package/dist/index-B8DKV_MC.cjs.map +1 -0
- package/dist/{index-D14RzE7l.js → index-lU7E8PIC.js} +10 -107
- package/dist/index-lU7E8PIC.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-Bk_ZPaK4.js → vectorPdfExport-CaEmOpLs.js} +4 -4
- package/dist/{vectorPdfExport-Bk_ZPaK4.js.map → vectorPdfExport-CaEmOpLs.js.map} +1 -1
- package/dist/{vectorPdfExport-BjU5UnhU.cjs → vectorPdfExport-Cnxqr8BW.cjs} +4 -4
- package/dist/{vectorPdfExport-BjU5UnhU.cjs.map → vectorPdfExport-Cnxqr8BW.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-BMPgVllP.cjs.map +0 -1
- package/dist/index-D14RzE7l.js.map +0 -1
|
@@ -11226,37 +11226,6 @@ function applyWarpAwareSelectionBorders(selection) {
|
|
|
11226
11226
|
selection.setCoords();
|
|
11227
11227
|
selection.dirty = true;
|
|
11228
11228
|
selection.__pixldocsAlignedAngle = targetAngle;
|
|
11229
|
-
try {
|
|
11230
|
-
const payload = {
|
|
11231
|
-
targetAngle,
|
|
11232
|
-
selection: {
|
|
11233
|
-
left: selection.left,
|
|
11234
|
-
top: selection.top,
|
|
11235
|
-
angle: selection.angle,
|
|
11236
|
-
scaleX: selection.scaleX,
|
|
11237
|
-
scaleY: selection.scaleY,
|
|
11238
|
-
width: selection.width,
|
|
11239
|
-
height: selection.height,
|
|
11240
|
-
originX: selection.originX,
|
|
11241
|
-
originY: selection.originY
|
|
11242
|
-
},
|
|
11243
|
-
kids: kids.map((c) => ({
|
|
11244
|
-
id: c.id ?? c.__pixldocsId,
|
|
11245
|
-
type: c.type,
|
|
11246
|
-
left: c.left,
|
|
11247
|
-
top: c.top,
|
|
11248
|
-
angle: c.angle,
|
|
11249
|
-
scaleX: c.scaleX,
|
|
11250
|
-
scaleY: c.scaleY,
|
|
11251
|
-
originX: c.originX,
|
|
11252
|
-
originY: c.originY,
|
|
11253
|
-
width: c.width,
|
|
11254
|
-
height: c.height
|
|
11255
|
-
}))
|
|
11256
|
-
};
|
|
11257
|
-
console.info("[Pixldocs][rot-group-image-drift] aligned-on-select " + JSON.stringify(payload));
|
|
11258
|
-
} catch {
|
|
11259
|
-
}
|
|
11260
11229
|
}
|
|
11261
11230
|
}
|
|
11262
11231
|
}
|
|
@@ -14270,40 +14239,6 @@ const PageCanvas = forwardRef(
|
|
|
14270
14239
|
markSimpleTransform(e);
|
|
14271
14240
|
didTransformRef.current = true;
|
|
14272
14241
|
const tr = e.target;
|
|
14273
|
-
try {
|
|
14274
|
-
const t = tr;
|
|
14275
|
-
if (t) {
|
|
14276
|
-
const payload = {
|
|
14277
|
-
targetType: t.type,
|
|
14278
|
-
isAS: t instanceof fabric.ActiveSelection,
|
|
14279
|
-
left: t.left,
|
|
14280
|
-
top: t.top,
|
|
14281
|
-
angle: t.angle,
|
|
14282
|
-
scaleX: t.scaleX,
|
|
14283
|
-
scaleY: t.scaleY,
|
|
14284
|
-
width: t.width,
|
|
14285
|
-
height: t.height,
|
|
14286
|
-
originX: t.originX,
|
|
14287
|
-
originY: t.originY,
|
|
14288
|
-
childCount: (t._objects ?? []).length,
|
|
14289
|
-
children: (t._objects ?? []).map((c) => ({
|
|
14290
|
-
id: getObjectId(c),
|
|
14291
|
-
type: c.type,
|
|
14292
|
-
left: c.left,
|
|
14293
|
-
top: c.top,
|
|
14294
|
-
angle: c.angle,
|
|
14295
|
-
scaleX: c.scaleX,
|
|
14296
|
-
scaleY: c.scaleY,
|
|
14297
|
-
originX: c.originX,
|
|
14298
|
-
originY: c.originY,
|
|
14299
|
-
width: c.width,
|
|
14300
|
-
height: c.height
|
|
14301
|
-
}))
|
|
14302
|
-
};
|
|
14303
|
-
console.info("[Pixldocs][rot-group-image-drift] rotating " + JSON.stringify(payload));
|
|
14304
|
-
}
|
|
14305
|
-
} catch {
|
|
14306
|
-
}
|
|
14307
14242
|
try {
|
|
14308
14243
|
const getCursor = fabricCanvas.__pixldocsGetRotateCursor;
|
|
14309
14244
|
const upper = fabricCanvas.upperCanvasEl;
|
|
@@ -14336,40 +14271,6 @@ const PageCanvas = forwardRef(
|
|
|
14336
14271
|
prepareGroupSelectionTransformStart(e.target);
|
|
14337
14272
|
markTransforming(e.target);
|
|
14338
14273
|
didTransformRef.current = true;
|
|
14339
|
-
try {
|
|
14340
|
-
const t = e.target;
|
|
14341
|
-
if (t && (t.angle ?? 0) !== 0) {
|
|
14342
|
-
const payload = {
|
|
14343
|
-
targetType: t.type,
|
|
14344
|
-
isAS: t instanceof fabric.ActiveSelection,
|
|
14345
|
-
left: t.left,
|
|
14346
|
-
top: t.top,
|
|
14347
|
-
angle: t.angle,
|
|
14348
|
-
scaleX: t.scaleX,
|
|
14349
|
-
scaleY: t.scaleY,
|
|
14350
|
-
width: t.width,
|
|
14351
|
-
height: t.height,
|
|
14352
|
-
originX: t.originX,
|
|
14353
|
-
originY: t.originY,
|
|
14354
|
-
childCount: (t._objects ?? []).length,
|
|
14355
|
-
children: (t._objects ?? []).map((c) => ({
|
|
14356
|
-
id: getObjectId(c),
|
|
14357
|
-
type: c.type,
|
|
14358
|
-
left: c.left,
|
|
14359
|
-
top: c.top,
|
|
14360
|
-
angle: c.angle,
|
|
14361
|
-
scaleX: c.scaleX,
|
|
14362
|
-
scaleY: c.scaleY,
|
|
14363
|
-
originX: c.originX,
|
|
14364
|
-
originY: c.originY,
|
|
14365
|
-
width: c.width,
|
|
14366
|
-
height: c.height
|
|
14367
|
-
}))
|
|
14368
|
-
};
|
|
14369
|
-
console.info("[Pixldocs][rot-group-image-drift] moving " + JSON.stringify(payload));
|
|
14370
|
-
}
|
|
14371
|
-
} catch {
|
|
14372
|
-
}
|
|
14373
14274
|
const activeDuringMove = fabricCanvas.getActiveObject();
|
|
14374
14275
|
const movingLogicalGroupId = activeDuringMove instanceof fabric.ActiveSelection ? activeDuringMove.__pixldocsGroupSelection : void 0;
|
|
14375
14276
|
const pendingMoveDrill = pendingGroupDrillInRef.current;
|
|
@@ -16795,7 +16696,7 @@ const PageCanvas = forwardRef(
|
|
|
16795
16696
|
const isFlatGroupSelection = toSelect.length > 1 && toSelect.every((o) => !(o instanceof fabric.Group));
|
|
16796
16697
|
const active = fc.getActiveObject();
|
|
16797
16698
|
const sameSelection = active instanceof fabric.ActiveSelection && active.getObjects().length === toSelect.length && toSelect.every((obj) => active.getObjects().includes(obj));
|
|
16798
|
-
if (sameSelection && isFlatGroupSelection) {
|
|
16699
|
+
if (sameSelection && (isFlatGroupSelection || isPureSingleGroupSelection)) {
|
|
16799
16700
|
if (selectedGroupSelectionId && active instanceof fabric.ActiveSelection) {
|
|
16800
16701
|
if (isPureSingleGroupSelection) {
|
|
16801
16702
|
active.__pixldocsGroupSelection = selectedGroupSelectionId;
|
|
@@ -16827,8 +16728,10 @@ const PageCanvas = forwardRef(
|
|
|
16827
16728
|
});
|
|
16828
16729
|
if (isPureSingleGroupSelection) {
|
|
16829
16730
|
active.hasBorders = true;
|
|
16830
|
-
active.
|
|
16831
|
-
|
|
16731
|
+
if (active.__pixldocsAlignedAngle == null) {
|
|
16732
|
+
active.setCoords();
|
|
16733
|
+
applyWarpAwareSelectionBorders(active);
|
|
16734
|
+
}
|
|
16832
16735
|
}
|
|
16833
16736
|
}
|
|
16834
16737
|
fc.requestRenderAll();
|
|
@@ -24474,9 +24377,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24474
24377
|
}
|
|
24475
24378
|
return svgString;
|
|
24476
24379
|
}
|
|
24477
|
-
const resolvedPackageVersion = "0.5.
|
|
24380
|
+
const resolvedPackageVersion = "0.5.359";
|
|
24478
24381
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24479
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24382
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.359";
|
|
24480
24383
|
const roundParityValue = (value) => {
|
|
24481
24384
|
if (typeof value !== "number") return value;
|
|
24482
24385
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25290,7 +25193,7 @@ class PixldocsRenderer {
|
|
|
25290
25193
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25291
25194
|
}
|
|
25292
25195
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25293
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
25196
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CaEmOpLs.js");
|
|
25294
25197
|
const prepared = preparePagesForExport(
|
|
25295
25198
|
cloned.pages,
|
|
25296
25199
|
canvasWidth,
|
|
@@ -27610,7 +27513,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27610
27513
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27611
27514
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27612
27515
|
try {
|
|
27613
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
27516
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CaEmOpLs.js");
|
|
27614
27517
|
try {
|
|
27615
27518
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27616
27519
|
} catch {
|
|
@@ -28010,4 +27913,4 @@ export {
|
|
|
28010
27913
|
buildTeaserBlurFlatKeys as y,
|
|
28011
27914
|
collectFontDescriptorsFromConfig as z
|
|
28012
27915
|
};
|
|
28013
|
-
//# sourceMappingURL=index-
|
|
27916
|
+
//# sourceMappingURL=index-lU7E8PIC.js.map
|