@pixldocs/canvas-renderer 0.5.357 → 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-DH3qeHgQ.cjs → index-B8DKV_MC.cjs} +22 -108
- package/dist/index-B8DKV_MC.cjs.map +1 -0
- package/dist/{index-ErPNn7zc.js → index-lU7E8PIC.js} +22 -108
- package/dist/index-lU7E8PIC.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-yx-dKQqT.js → vectorPdfExport-CaEmOpLs.js} +4 -4
- package/dist/{vectorPdfExport-yx-dKQqT.js.map → vectorPdfExport-CaEmOpLs.js.map} +1 -1
- package/dist/{vectorPdfExport-Ure_JliT.cjs → vectorPdfExport-Cnxqr8BW.cjs} +4 -4
- package/dist/{vectorPdfExport-Ure_JliT.cjs.map → vectorPdfExport-Cnxqr8BW.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-DH3qeHgQ.cjs.map +0 -1
- package/dist/index-ErPNn7zc.js.map +0 -1
|
@@ -11218,7 +11218,18 @@ function applyWarpAwareSelectionBorders(selection) {
|
|
|
11218
11218
|
invSelection,
|
|
11219
11219
|
worldMatrices[index]
|
|
11220
11220
|
);
|
|
11221
|
-
|
|
11221
|
+
const savedLayout = k.layoutManager;
|
|
11222
|
+
try {
|
|
11223
|
+
if (savedLayout) k.layoutManager = void 0;
|
|
11224
|
+
fabric__namespace.util.applyTransformToObject(k, localMatrix);
|
|
11225
|
+
const decomposed = fabric__namespace.util.qrDecompose(
|
|
11226
|
+
localMatrix
|
|
11227
|
+
);
|
|
11228
|
+
const expectedCenter = new fabric__namespace.Point(decomposed.translateX, decomposed.translateY);
|
|
11229
|
+
k.setPositionByOrigin(expectedCenter, "center", "center");
|
|
11230
|
+
} finally {
|
|
11231
|
+
if (savedLayout) k.layoutManager = savedLayout;
|
|
11232
|
+
}
|
|
11222
11233
|
k.setCoords();
|
|
11223
11234
|
k.dirty = true;
|
|
11224
11235
|
});
|
|
@@ -11233,37 +11244,6 @@ function applyWarpAwareSelectionBorders(selection) {
|
|
|
11233
11244
|
selection.setCoords();
|
|
11234
11245
|
selection.dirty = true;
|
|
11235
11246
|
selection.__pixldocsAlignedAngle = targetAngle;
|
|
11236
|
-
try {
|
|
11237
|
-
const payload = {
|
|
11238
|
-
targetAngle,
|
|
11239
|
-
selection: {
|
|
11240
|
-
left: selection.left,
|
|
11241
|
-
top: selection.top,
|
|
11242
|
-
angle: selection.angle,
|
|
11243
|
-
scaleX: selection.scaleX,
|
|
11244
|
-
scaleY: selection.scaleY,
|
|
11245
|
-
width: selection.width,
|
|
11246
|
-
height: selection.height,
|
|
11247
|
-
originX: selection.originX,
|
|
11248
|
-
originY: selection.originY
|
|
11249
|
-
},
|
|
11250
|
-
kids: kids.map((c) => ({
|
|
11251
|
-
id: c.id ?? c.__pixldocsId,
|
|
11252
|
-
type: c.type,
|
|
11253
|
-
left: c.left,
|
|
11254
|
-
top: c.top,
|
|
11255
|
-
angle: c.angle,
|
|
11256
|
-
scaleX: c.scaleX,
|
|
11257
|
-
scaleY: c.scaleY,
|
|
11258
|
-
originX: c.originX,
|
|
11259
|
-
originY: c.originY,
|
|
11260
|
-
width: c.width,
|
|
11261
|
-
height: c.height
|
|
11262
|
-
}))
|
|
11263
|
-
};
|
|
11264
|
-
console.info("[Pixldocs][rot-group-image-drift] aligned-on-select " + JSON.stringify(payload));
|
|
11265
|
-
} catch {
|
|
11266
|
-
}
|
|
11267
11247
|
}
|
|
11268
11248
|
}
|
|
11269
11249
|
}
|
|
@@ -14277,40 +14257,6 @@ const PageCanvas = react.forwardRef(
|
|
|
14277
14257
|
markSimpleTransform(e);
|
|
14278
14258
|
didTransformRef.current = true;
|
|
14279
14259
|
const tr = e.target;
|
|
14280
|
-
try {
|
|
14281
|
-
const t = tr;
|
|
14282
|
-
if (t) {
|
|
14283
|
-
const payload = {
|
|
14284
|
-
targetType: t.type,
|
|
14285
|
-
isAS: t instanceof fabric__namespace.ActiveSelection,
|
|
14286
|
-
left: t.left,
|
|
14287
|
-
top: t.top,
|
|
14288
|
-
angle: t.angle,
|
|
14289
|
-
scaleX: t.scaleX,
|
|
14290
|
-
scaleY: t.scaleY,
|
|
14291
|
-
width: t.width,
|
|
14292
|
-
height: t.height,
|
|
14293
|
-
originX: t.originX,
|
|
14294
|
-
originY: t.originY,
|
|
14295
|
-
childCount: (t._objects ?? []).length,
|
|
14296
|
-
children: (t._objects ?? []).map((c) => ({
|
|
14297
|
-
id: getObjectId(c),
|
|
14298
|
-
type: c.type,
|
|
14299
|
-
left: c.left,
|
|
14300
|
-
top: c.top,
|
|
14301
|
-
angle: c.angle,
|
|
14302
|
-
scaleX: c.scaleX,
|
|
14303
|
-
scaleY: c.scaleY,
|
|
14304
|
-
originX: c.originX,
|
|
14305
|
-
originY: c.originY,
|
|
14306
|
-
width: c.width,
|
|
14307
|
-
height: c.height
|
|
14308
|
-
}))
|
|
14309
|
-
};
|
|
14310
|
-
console.info("[Pixldocs][rot-group-image-drift] rotating " + JSON.stringify(payload));
|
|
14311
|
-
}
|
|
14312
|
-
} catch {
|
|
14313
|
-
}
|
|
14314
14260
|
try {
|
|
14315
14261
|
const getCursor = fabricCanvas.__pixldocsGetRotateCursor;
|
|
14316
14262
|
const upper = fabricCanvas.upperCanvasEl;
|
|
@@ -14343,40 +14289,6 @@ const PageCanvas = react.forwardRef(
|
|
|
14343
14289
|
prepareGroupSelectionTransformStart(e.target);
|
|
14344
14290
|
markTransforming(e.target);
|
|
14345
14291
|
didTransformRef.current = true;
|
|
14346
|
-
try {
|
|
14347
|
-
const t = e.target;
|
|
14348
|
-
if (t && (t.angle ?? 0) !== 0) {
|
|
14349
|
-
const payload = {
|
|
14350
|
-
targetType: t.type,
|
|
14351
|
-
isAS: t instanceof fabric__namespace.ActiveSelection,
|
|
14352
|
-
left: t.left,
|
|
14353
|
-
top: t.top,
|
|
14354
|
-
angle: t.angle,
|
|
14355
|
-
scaleX: t.scaleX,
|
|
14356
|
-
scaleY: t.scaleY,
|
|
14357
|
-
width: t.width,
|
|
14358
|
-
height: t.height,
|
|
14359
|
-
originX: t.originX,
|
|
14360
|
-
originY: t.originY,
|
|
14361
|
-
childCount: (t._objects ?? []).length,
|
|
14362
|
-
children: (t._objects ?? []).map((c) => ({
|
|
14363
|
-
id: getObjectId(c),
|
|
14364
|
-
type: c.type,
|
|
14365
|
-
left: c.left,
|
|
14366
|
-
top: c.top,
|
|
14367
|
-
angle: c.angle,
|
|
14368
|
-
scaleX: c.scaleX,
|
|
14369
|
-
scaleY: c.scaleY,
|
|
14370
|
-
originX: c.originX,
|
|
14371
|
-
originY: c.originY,
|
|
14372
|
-
width: c.width,
|
|
14373
|
-
height: c.height
|
|
14374
|
-
}))
|
|
14375
|
-
};
|
|
14376
|
-
console.info("[Pixldocs][rot-group-image-drift] moving " + JSON.stringify(payload));
|
|
14377
|
-
}
|
|
14378
|
-
} catch {
|
|
14379
|
-
}
|
|
14380
14292
|
const activeDuringMove = fabricCanvas.getActiveObject();
|
|
14381
14293
|
const movingLogicalGroupId = activeDuringMove instanceof fabric__namespace.ActiveSelection ? activeDuringMove.__pixldocsGroupSelection : void 0;
|
|
14382
14294
|
const pendingMoveDrill = pendingGroupDrillInRef.current;
|
|
@@ -16802,7 +16714,7 @@ const PageCanvas = react.forwardRef(
|
|
|
16802
16714
|
const isFlatGroupSelection = toSelect.length > 1 && toSelect.every((o) => !(o instanceof fabric__namespace.Group));
|
|
16803
16715
|
const active = fc.getActiveObject();
|
|
16804
16716
|
const sameSelection = active instanceof fabric__namespace.ActiveSelection && active.getObjects().length === toSelect.length && toSelect.every((obj) => active.getObjects().includes(obj));
|
|
16805
|
-
if (sameSelection && isFlatGroupSelection) {
|
|
16717
|
+
if (sameSelection && (isFlatGroupSelection || isPureSingleGroupSelection)) {
|
|
16806
16718
|
if (selectedGroupSelectionId && active instanceof fabric__namespace.ActiveSelection) {
|
|
16807
16719
|
if (isPureSingleGroupSelection) {
|
|
16808
16720
|
active.__pixldocsGroupSelection = selectedGroupSelectionId;
|
|
@@ -16834,8 +16746,10 @@ const PageCanvas = react.forwardRef(
|
|
|
16834
16746
|
});
|
|
16835
16747
|
if (isPureSingleGroupSelection) {
|
|
16836
16748
|
active.hasBorders = true;
|
|
16837
|
-
active.
|
|
16838
|
-
|
|
16749
|
+
if (active.__pixldocsAlignedAngle == null) {
|
|
16750
|
+
active.setCoords();
|
|
16751
|
+
applyWarpAwareSelectionBorders(active);
|
|
16752
|
+
}
|
|
16839
16753
|
}
|
|
16840
16754
|
}
|
|
16841
16755
|
fc.requestRenderAll();
|
|
@@ -24481,9 +24395,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24481
24395
|
}
|
|
24482
24396
|
return svgString;
|
|
24483
24397
|
}
|
|
24484
|
-
const resolvedPackageVersion = "0.5.
|
|
24398
|
+
const resolvedPackageVersion = "0.5.359";
|
|
24485
24399
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24486
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24400
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.359";
|
|
24487
24401
|
const roundParityValue = (value) => {
|
|
24488
24402
|
if (typeof value !== "number") return value;
|
|
24489
24403
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25297,7 +25211,7 @@ class PixldocsRenderer {
|
|
|
25297
25211
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25298
25212
|
}
|
|
25299
25213
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25300
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
25214
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-Cnxqr8BW.cjs"));
|
|
25301
25215
|
const prepared = preparePagesForExport(
|
|
25302
25216
|
cloned.pages,
|
|
25303
25217
|
canvasWidth,
|
|
@@ -27617,7 +27531,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27617
27531
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27618
27532
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27619
27533
|
try {
|
|
27620
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
27534
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-Cnxqr8BW.cjs"));
|
|
27621
27535
|
try {
|
|
27622
27536
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27623
27537
|
} catch {
|
|
@@ -28014,4 +27928,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
28014
27928
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
28015
27929
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
28016
27930
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
28017
|
-
//# sourceMappingURL=index-
|
|
27931
|
+
//# sourceMappingURL=index-B8DKV_MC.cjs.map
|