@pixldocs/canvas-renderer 0.5.419 → 0.5.421
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-7_yV-1gx.cjs → index-CHFRo3xN.cjs} +23 -11
- package/dist/index-CHFRo3xN.cjs.map +1 -0
- package/dist/{index-dbWkHXNX.js → index-DTK00FP2.js} +23 -11
- package/dist/index-DTK00FP2.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BVOocc4a.js → vectorPdfExport-BehYdYkb.js} +4 -4
- package/dist/{vectorPdfExport-BVOocc4a.js.map → vectorPdfExport-BehYdYkb.js.map} +1 -1
- package/dist/{vectorPdfExport-ftEgzh_b.cjs → vectorPdfExport-CVTsNdX0.cjs} +4 -4
- package/dist/{vectorPdfExport-ftEgzh_b.cjs.map → vectorPdfExport-CVTsNdX0.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-7_yV-1gx.cjs.map +0 -1
- package/dist/index-dbWkHXNX.js.map +0 -1
|
@@ -14372,7 +14372,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14372
14372
|
fabricCanvas.on("selection:cleared", () => {
|
|
14373
14373
|
});
|
|
14374
14374
|
fabricCanvas.on("object:scaling", (e) => {
|
|
14375
|
-
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
14375
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
14376
14376
|
if (!isActiveRef.current) return;
|
|
14377
14377
|
const t = e.target;
|
|
14378
14378
|
if (t) lastResizeScaleTargetRef.current = t;
|
|
@@ -14665,9 +14665,12 @@ const PageCanvas = react.forwardRef(
|
|
|
14665
14665
|
if (child.__asLiveOrigAngle == null) {
|
|
14666
14666
|
const childId = getObjectId(child);
|
|
14667
14667
|
const sourceChild = childId ? elementsRef.current.find((el) => el.id === childId) : void 0;
|
|
14668
|
-
|
|
14668
|
+
const storedWorldAngle = Number.isFinite(sourceChild == null ? void 0 : sourceChild.angle) ? sourceChild.angle ?? 0 : void 0;
|
|
14669
|
+
const logicalGroupId = obj.__pixldocsGroupSelection;
|
|
14670
|
+
const groupWorldAngle = logicalGroupId ? ((_k = groupSelectionTransformStartRef.current) == null ? void 0 : _k.groupId) === logicalGroupId ? groupSelectionTransformStartRef.current.groupAngle : obj.__pixldocsFrozenGroupAngle ?? (obj.angle ?? 0) : 0;
|
|
14671
|
+
child.__asLiveOrigAngle = storedWorldAngle !== void 0 ? storedWorldAngle - groupWorldAngle : child.angle ?? 0;
|
|
14669
14672
|
}
|
|
14670
|
-
if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((
|
|
14673
|
+
if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((_l = child._ct) == null ? void 0 : _l.isCropGroup))) {
|
|
14671
14674
|
const ct = child.__cropData;
|
|
14672
14675
|
if (!ct) continue;
|
|
14673
14676
|
if (child.__asLiveOrigAngle == null) {
|
|
@@ -14836,7 +14839,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14836
14839
|
child.dirty = true;
|
|
14837
14840
|
didReflowTextChild = true;
|
|
14838
14841
|
}
|
|
14839
|
-
if (isXSide && ((
|
|
14842
|
+
if (isXSide && ((_m = groupShiftReflowSnapshotRef.current) == null ? void 0 : _m.selection) === obj) {
|
|
14840
14843
|
const snap = groupShiftReflowSnapshotRef.current;
|
|
14841
14844
|
const anchorEntry = snap.children[0];
|
|
14842
14845
|
const anchorTopLive = anchorEntry.obj.top ?? 0;
|
|
@@ -14997,7 +15000,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14997
15000
|
setGuides(gridGuidesForScale.length ? [...scaleGuides, ...gridGuidesForScale] : scaleGuides);
|
|
14998
15001
|
if (drilledGroupIdRef.current) {
|
|
14999
15002
|
try {
|
|
15000
|
-
(
|
|
15003
|
+
(_n = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _n.call(fabricCanvas);
|
|
15001
15004
|
} catch {
|
|
15002
15005
|
}
|
|
15003
15006
|
}
|
|
@@ -15927,7 +15930,16 @@ const PageCanvas = react.forwardRef(
|
|
|
15927
15930
|
scaleX: 1,
|
|
15928
15931
|
scaleY: 1,
|
|
15929
15932
|
skewX: 0,
|
|
15930
|
-
skewY: 0
|
|
15933
|
+
skewY: 0,
|
|
15934
|
+
// CRITICAL: restore the child's ORIGINAL local angle (pre-live-preview).
|
|
15935
|
+
// The live preview path mutates obj.angle via qrDecompose(S^-1·R(θ))
|
|
15936
|
+
// to cancel AS shear visually. If we leave that mutated angle on the
|
|
15937
|
+
// object, fabric's AS-discard step bakes (AS.angle + mutatedAngle)
|
|
15938
|
+
// into the standalone image — so the next individual rotation starts
|
|
15939
|
+
// from a wrong base and visibly "snaps back" to the pre-resize angle.
|
|
15940
|
+
// Restoring the original local angle here makes AS-discard bake the
|
|
15941
|
+
// correct world angle (AS.angle + imgChildLocalAngle === worldAngleI).
|
|
15942
|
+
angle: imgChildLocalAngle
|
|
15931
15943
|
});
|
|
15932
15944
|
obj.dirty = true;
|
|
15933
15945
|
obj.setCoords();
|
|
@@ -25565,9 +25577,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
25565
25577
|
}
|
|
25566
25578
|
return svgString;
|
|
25567
25579
|
}
|
|
25568
|
-
const resolvedPackageVersion = "0.5.
|
|
25580
|
+
const resolvedPackageVersion = "0.5.421";
|
|
25569
25581
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
25570
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
25582
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.421";
|
|
25571
25583
|
const roundParityValue = (value) => {
|
|
25572
25584
|
if (typeof value !== "number") return value;
|
|
25573
25585
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -26381,7 +26393,7 @@ class PixldocsRenderer {
|
|
|
26381
26393
|
await this.waitForCanvasScene(container, cloned, i);
|
|
26382
26394
|
}
|
|
26383
26395
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
26384
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
26396
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-CVTsNdX0.cjs"));
|
|
26385
26397
|
const prepared = preparePagesForExport(
|
|
26386
26398
|
cloned.pages,
|
|
26387
26399
|
canvasWidth,
|
|
@@ -28701,7 +28713,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
28701
28713
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
28702
28714
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
28703
28715
|
try {
|
|
28704
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
28716
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-CVTsNdX0.cjs"));
|
|
28705
28717
|
try {
|
|
28706
28718
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
28707
28719
|
} catch {
|
|
@@ -29098,4 +29110,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
29098
29110
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
29099
29111
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
29100
29112
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
29101
|
-
//# sourceMappingURL=index-
|
|
29113
|
+
//# sourceMappingURL=index-CHFRo3xN.cjs.map
|