@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
|
@@ -10476,6 +10476,10 @@ const SELECTION_PRIMARY = "hsl(217, 91%, 60%)";
|
|
|
10476
10476
|
const SELECTION_BORDER_SCALE = 2;
|
|
10477
10477
|
let ensureCanvaControlRenders = () => {
|
|
10478
10478
|
};
|
|
10479
|
+
const shouldLogGroupMove = () => {
|
|
10480
|
+
if (typeof window === "undefined") return false;
|
|
10481
|
+
return window.__pixldocsDebugGroupMove !== false;
|
|
10482
|
+
};
|
|
10479
10483
|
try {
|
|
10480
10484
|
const InteractiveBase = fabric.InteractiveFabricObject ?? fabric.Object;
|
|
10481
10485
|
if ((InteractiveBase == null ? void 0 : InteractiveBase.prototype) && !InteractiveBase.prototype.__pixldocsCenteredSelectionBorder) {
|
|
@@ -10925,20 +10929,31 @@ try {
|
|
|
10925
10929
|
} catch (e) {
|
|
10926
10930
|
}
|
|
10927
10931
|
};
|
|
10928
|
-
const
|
|
10929
|
-
|
|
10930
|
-
|
|
10931
|
-
|
|
10932
|
-
|
|
10933
|
-
|
|
10932
|
+
const tryPatchFactory = (target, key, bindTarget = target) => {
|
|
10933
|
+
try {
|
|
10934
|
+
if (!target || typeof target[key] !== "function") return;
|
|
10935
|
+
const descriptor = Object.getOwnPropertyDescriptor(target, key);
|
|
10936
|
+
if (descriptor && descriptor.writable === false && !descriptor.set) return;
|
|
10937
|
+
const original = target[key].bind(bindTarget);
|
|
10938
|
+
target[key] = () => installPillRenders(original());
|
|
10939
|
+
} catch {
|
|
10940
|
+
}
|
|
10941
|
+
};
|
|
10942
|
+
tryPatchFactory(cu, "createObjectDefaultControls");
|
|
10943
|
+
tryPatchFactory(cu, "createTextboxDefaultControls");
|
|
10934
10944
|
const wrapClassCreateControls = (Klass) => {
|
|
10935
|
-
|
|
10936
|
-
|
|
10937
|
-
|
|
10938
|
-
|
|
10939
|
-
|
|
10940
|
-
|
|
10941
|
-
|
|
10945
|
+
try {
|
|
10946
|
+
if (!Klass || typeof Klass.createControls !== "function") return;
|
|
10947
|
+
const descriptor = Object.getOwnPropertyDescriptor(Klass, "createControls");
|
|
10948
|
+
if (descriptor && descriptor.writable === false && !descriptor.set) return;
|
|
10949
|
+
const orig = Klass.createControls.bind(Klass);
|
|
10950
|
+
Klass.createControls = () => {
|
|
10951
|
+
const res = orig();
|
|
10952
|
+
if (res && res.controls) installPillRenders(res.controls);
|
|
10953
|
+
return res;
|
|
10954
|
+
};
|
|
10955
|
+
} catch {
|
|
10956
|
+
}
|
|
10942
10957
|
};
|
|
10943
10958
|
wrapClassCreateControls(fabric.InteractiveFabricObject);
|
|
10944
10959
|
wrapClassCreateControls(fabric.FabricObject);
|
|
@@ -10961,8 +10976,7 @@ try {
|
|
|
10961
10976
|
};
|
|
10962
10977
|
}
|
|
10963
10978
|
}
|
|
10964
|
-
} catch
|
|
10965
|
-
console.warn("[PageCanvas] Failed to install Canva-style control handles:", e);
|
|
10979
|
+
} catch {
|
|
10966
10980
|
}
|
|
10967
10981
|
const scaleTextPathConfig = (textPath, sx, sy, uniform) => {
|
|
10968
10982
|
if (!textPath || typeof textPath !== "object") return textPath;
|
|
@@ -13893,7 +13907,7 @@ const PageCanvas = forwardRef(
|
|
|
13893
13907
|
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i;
|
|
13894
13908
|
try {
|
|
13895
13909
|
dragStarted = false;
|
|
13896
|
-
if (
|
|
13910
|
+
if (shouldLogGroupMove()) {
|
|
13897
13911
|
const t = e.target;
|
|
13898
13912
|
console.log("[GRP-MOVE] object:modified fired", {
|
|
13899
13913
|
targetType: (_a2 = t == null ? void 0 : t.constructor) == null ? void 0 : _a2.name,
|
|
@@ -14252,7 +14266,7 @@ const PageCanvas = forwardRef(
|
|
|
14252
14266
|
return memberIds.every((mid) => selectedSet.has(mid));
|
|
14253
14267
|
})();
|
|
14254
14268
|
const groupToMove = candidateIsStack || allMembersSelected ? candidateGroup : null;
|
|
14255
|
-
if (
|
|
14269
|
+
if (shouldLogGroupMove()) {
|
|
14256
14270
|
console.log("[GRP-MOVE] entry", {
|
|
14257
14271
|
selectedElementIds,
|
|
14258
14272
|
isActiveSelection,
|
|
@@ -14328,7 +14342,7 @@ const PageCanvas = forwardRef(
|
|
|
14328
14342
|
const { updateNode: updateNodeStore, commitHistory: commitHistoryStore, getCurrentElements } = useEditorStore.getState();
|
|
14329
14343
|
const newLeft = (groupToMove.left ?? 0) + deltaX;
|
|
14330
14344
|
const newTop = (groupToMove.top ?? 0) + deltaY;
|
|
14331
|
-
const __dbg =
|
|
14345
|
+
const __dbg = shouldLogGroupMove();
|
|
14332
14346
|
if (__dbg) {
|
|
14333
14347
|
console.log("[GRP-MOVE] commit", {
|
|
14334
14348
|
groupId: groupToMove.id,
|
|
@@ -14380,7 +14394,7 @@ const PageCanvas = forwardRef(
|
|
|
14380
14394
|
obj.set({ left: abs.left, top: abs.top });
|
|
14381
14395
|
}
|
|
14382
14396
|
obj.setCoords();
|
|
14383
|
-
if (
|
|
14397
|
+
if (shouldLogGroupMove()) {
|
|
14384
14398
|
console.log("[GRP-MOVE] rebake-member", {
|
|
14385
14399
|
id,
|
|
14386
14400
|
nodeType: node.type,
|
|
@@ -15634,7 +15648,7 @@ const PageCanvas = forwardRef(
|
|
|
15634
15648
|
} else {
|
|
15635
15649
|
const skipPositionBecauseSelection = preserveSelectionMemberPosition || !forceStorePositionSync && isSelected && (deltaX > 0.1 || deltaY > 0.1) && (wasJustModified || isBeingTransformed);
|
|
15636
15650
|
const anyChange = positionChanged || otherPropsChanged || forceApplyFromPanel;
|
|
15637
|
-
if (
|
|
15651
|
+
if (shouldLogGroupMove() && (forceStorePositionSync || preserveSelectionMemberPosition || (deltaX > 0.1 || deltaY > 0.1))) {
|
|
15638
15652
|
console.log("[GRP-MOVE] doSync-member", {
|
|
15639
15653
|
id: element.id,
|
|
15640
15654
|
type: element.type,
|
|
@@ -23837,9 +23851,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
23837
23851
|
}
|
|
23838
23852
|
return svgString;
|
|
23839
23853
|
}
|
|
23840
|
-
const resolvedPackageVersion = "0.5.
|
|
23854
|
+
const resolvedPackageVersion = "0.5.277";
|
|
23841
23855
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
23842
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
23856
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.277";
|
|
23843
23857
|
const roundParityValue = (value) => {
|
|
23844
23858
|
if (typeof value !== "number") return value;
|
|
23845
23859
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24653,7 +24667,7 @@ class PixldocsRenderer {
|
|
|
24653
24667
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24654
24668
|
}
|
|
24655
24669
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24656
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
24670
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CateNrsD.js");
|
|
24657
24671
|
const prepared = preparePagesForExport(
|
|
24658
24672
|
cloned.pages,
|
|
24659
24673
|
canvasWidth,
|
|
@@ -26973,7 +26987,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
26973
26987
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
26974
26988
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
26975
26989
|
try {
|
|
26976
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
26990
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CateNrsD.js");
|
|
26977
26991
|
try {
|
|
26978
26992
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
26979
26993
|
} catch {
|
|
@@ -27373,4 +27387,4 @@ export {
|
|
|
27373
27387
|
buildTeaserBlurFlatKeys as y,
|
|
27374
27388
|
collectFontDescriptorsFromConfig as z
|
|
27375
27389
|
};
|
|
27376
|
-
//# sourceMappingURL=index-
|
|
27390
|
+
//# sourceMappingURL=index-uuizjIPx.js.map
|