@pixldocs/canvas-renderer 0.5.276 → 0.5.277
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-AzU8Pmse.cjs → index-DcwU_VE_.cjs} +39 -25
- package/dist/index-DcwU_VE_.cjs.map +1 -0
- package/dist/{index-CszEZlZ7.js → index-uuizjIPx.js} +39 -25
- package/dist/index-uuizjIPx.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-C9akdCtS.js → vectorPdfExport-CateNrsD.js} +4 -4
- package/dist/{vectorPdfExport-C9akdCtS.js.map → vectorPdfExport-CateNrsD.js.map} +1 -1
- package/dist/{vectorPdfExport-CvLitjuI.cjs → vectorPdfExport-D1OXNkaD.cjs} +4 -4
- package/dist/{vectorPdfExport-CvLitjuI.cjs.map → vectorPdfExport-D1OXNkaD.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-AzU8Pmse.cjs.map +0 -1
- package/dist/index-CszEZlZ7.js.map +0 -1
|
@@ -10494,6 +10494,10 @@ const SELECTION_PRIMARY = "hsl(217, 91%, 60%)";
|
|
|
10494
10494
|
const SELECTION_BORDER_SCALE = 2;
|
|
10495
10495
|
let ensureCanvaControlRenders = () => {
|
|
10496
10496
|
};
|
|
10497
|
+
const shouldLogGroupMove = () => {
|
|
10498
|
+
if (typeof window === "undefined") return false;
|
|
10499
|
+
return window.__pixldocsDebugGroupMove !== false;
|
|
10500
|
+
};
|
|
10497
10501
|
try {
|
|
10498
10502
|
const InteractiveBase = fabric__namespace.InteractiveFabricObject ?? fabric__namespace.Object;
|
|
10499
10503
|
if ((InteractiveBase == null ? void 0 : InteractiveBase.prototype) && !InteractiveBase.prototype.__pixldocsCenteredSelectionBorder) {
|
|
@@ -10943,20 +10947,31 @@ try {
|
|
|
10943
10947
|
} catch (e) {
|
|
10944
10948
|
}
|
|
10945
10949
|
};
|
|
10946
|
-
const
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
|
|
10950
|
-
|
|
10951
|
-
|
|
10950
|
+
const tryPatchFactory = (target, key, bindTarget = target) => {
|
|
10951
|
+
try {
|
|
10952
|
+
if (!target || typeof target[key] !== "function") return;
|
|
10953
|
+
const descriptor = Object.getOwnPropertyDescriptor(target, key);
|
|
10954
|
+
if (descriptor && descriptor.writable === false && !descriptor.set) return;
|
|
10955
|
+
const original = target[key].bind(bindTarget);
|
|
10956
|
+
target[key] = () => installPillRenders(original());
|
|
10957
|
+
} catch {
|
|
10958
|
+
}
|
|
10959
|
+
};
|
|
10960
|
+
tryPatchFactory(cu, "createObjectDefaultControls");
|
|
10961
|
+
tryPatchFactory(cu, "createTextboxDefaultControls");
|
|
10952
10962
|
const wrapClassCreateControls = (Klass) => {
|
|
10953
|
-
|
|
10954
|
-
|
|
10955
|
-
|
|
10956
|
-
|
|
10957
|
-
|
|
10958
|
-
|
|
10959
|
-
|
|
10963
|
+
try {
|
|
10964
|
+
if (!Klass || typeof Klass.createControls !== "function") return;
|
|
10965
|
+
const descriptor = Object.getOwnPropertyDescriptor(Klass, "createControls");
|
|
10966
|
+
if (descriptor && descriptor.writable === false && !descriptor.set) return;
|
|
10967
|
+
const orig = Klass.createControls.bind(Klass);
|
|
10968
|
+
Klass.createControls = () => {
|
|
10969
|
+
const res = orig();
|
|
10970
|
+
if (res && res.controls) installPillRenders(res.controls);
|
|
10971
|
+
return res;
|
|
10972
|
+
};
|
|
10973
|
+
} catch {
|
|
10974
|
+
}
|
|
10960
10975
|
};
|
|
10961
10976
|
wrapClassCreateControls(fabric__namespace.InteractiveFabricObject);
|
|
10962
10977
|
wrapClassCreateControls(fabric__namespace.FabricObject);
|
|
@@ -10979,8 +10994,7 @@ try {
|
|
|
10979
10994
|
};
|
|
10980
10995
|
}
|
|
10981
10996
|
}
|
|
10982
|
-
} catch
|
|
10983
|
-
console.warn("[PageCanvas] Failed to install Canva-style control handles:", e);
|
|
10997
|
+
} catch {
|
|
10984
10998
|
}
|
|
10985
10999
|
const scaleTextPathConfig = (textPath, sx, sy, uniform) => {
|
|
10986
11000
|
if (!textPath || typeof textPath !== "object") return textPath;
|
|
@@ -13911,7 +13925,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13911
13925
|
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i;
|
|
13912
13926
|
try {
|
|
13913
13927
|
dragStarted = false;
|
|
13914
|
-
if (
|
|
13928
|
+
if (shouldLogGroupMove()) {
|
|
13915
13929
|
const t = e.target;
|
|
13916
13930
|
console.log("[GRP-MOVE] object:modified fired", {
|
|
13917
13931
|
targetType: (_a2 = t == null ? void 0 : t.constructor) == null ? void 0 : _a2.name,
|
|
@@ -14270,7 +14284,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14270
14284
|
return memberIds.every((mid) => selectedSet.has(mid));
|
|
14271
14285
|
})();
|
|
14272
14286
|
const groupToMove = candidateIsStack || allMembersSelected ? candidateGroup : null;
|
|
14273
|
-
if (
|
|
14287
|
+
if (shouldLogGroupMove()) {
|
|
14274
14288
|
console.log("[GRP-MOVE] entry", {
|
|
14275
14289
|
selectedElementIds,
|
|
14276
14290
|
isActiveSelection,
|
|
@@ -14346,7 +14360,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14346
14360
|
const { updateNode: updateNodeStore, commitHistory: commitHistoryStore, getCurrentElements } = useEditorStore.getState();
|
|
14347
14361
|
const newLeft = (groupToMove.left ?? 0) + deltaX;
|
|
14348
14362
|
const newTop = (groupToMove.top ?? 0) + deltaY;
|
|
14349
|
-
const __dbg =
|
|
14363
|
+
const __dbg = shouldLogGroupMove();
|
|
14350
14364
|
if (__dbg) {
|
|
14351
14365
|
console.log("[GRP-MOVE] commit", {
|
|
14352
14366
|
groupId: groupToMove.id,
|
|
@@ -14398,7 +14412,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14398
14412
|
obj.set({ left: abs.left, top: abs.top });
|
|
14399
14413
|
}
|
|
14400
14414
|
obj.setCoords();
|
|
14401
|
-
if (
|
|
14415
|
+
if (shouldLogGroupMove()) {
|
|
14402
14416
|
console.log("[GRP-MOVE] rebake-member", {
|
|
14403
14417
|
id,
|
|
14404
14418
|
nodeType: node.type,
|
|
@@ -15652,7 +15666,7 @@ const PageCanvas = react.forwardRef(
|
|
|
15652
15666
|
} else {
|
|
15653
15667
|
const skipPositionBecauseSelection = preserveSelectionMemberPosition || !forceStorePositionSync && isSelected && (deltaX > 0.1 || deltaY > 0.1) && (wasJustModified || isBeingTransformed);
|
|
15654
15668
|
const anyChange = positionChanged || otherPropsChanged || forceApplyFromPanel;
|
|
15655
|
-
if (
|
|
15669
|
+
if (shouldLogGroupMove() && (forceStorePositionSync || preserveSelectionMemberPosition || (deltaX > 0.1 || deltaY > 0.1))) {
|
|
15656
15670
|
console.log("[GRP-MOVE] doSync-member", {
|
|
15657
15671
|
id: element.id,
|
|
15658
15672
|
type: element.type,
|
|
@@ -23855,9 +23869,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
23855
23869
|
}
|
|
23856
23870
|
return svgString;
|
|
23857
23871
|
}
|
|
23858
|
-
const resolvedPackageVersion = "0.5.
|
|
23872
|
+
const resolvedPackageVersion = "0.5.277";
|
|
23859
23873
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
23860
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
23874
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.277";
|
|
23861
23875
|
const roundParityValue = (value) => {
|
|
23862
23876
|
if (typeof value !== "number") return value;
|
|
23863
23877
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24671,7 +24685,7 @@ class PixldocsRenderer {
|
|
|
24671
24685
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24672
24686
|
}
|
|
24673
24687
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24674
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
24688
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-D1OXNkaD.cjs"));
|
|
24675
24689
|
const prepared = preparePagesForExport(
|
|
24676
24690
|
cloned.pages,
|
|
24677
24691
|
canvasWidth,
|
|
@@ -26991,7 +27005,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
26991
27005
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
26992
27006
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
26993
27007
|
try {
|
|
26994
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
27008
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-D1OXNkaD.cjs"));
|
|
26995
27009
|
try {
|
|
26996
27010
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
26997
27011
|
} catch {
|
|
@@ -27388,4 +27402,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27388
27402
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27389
27403
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27390
27404
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27391
|
-
//# sourceMappingURL=index-
|
|
27405
|
+
//# sourceMappingURL=index-DcwU_VE_.cjs.map
|