@pixldocs/canvas-renderer 0.5.254 → 0.5.256
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-9Lw_NdWM.cjs → index-C1nsxh7P.cjs} +33 -9
- package/dist/index-C1nsxh7P.cjs.map +1 -0
- package/dist/{index-DNP0J9Fe.js → index-DdXbqycP.js} +33 -9
- package/dist/index-DdXbqycP.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BpVM86xb.cjs → vectorPdfExport-BNa-hQ-e.cjs} +4 -4
- package/dist/{vectorPdfExport-BpVM86xb.cjs.map → vectorPdfExport-BNa-hQ-e.cjs.map} +1 -1
- package/dist/{vectorPdfExport-MzXdlOEY.js → vectorPdfExport-CZHhQLm0.js} +4 -4
- package/dist/{vectorPdfExport-MzXdlOEY.js.map → vectorPdfExport-CZHhQLm0.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-9Lw_NdWM.cjs.map +0 -1
- package/dist/index-DNP0J9Fe.js.map +0 -1
|
@@ -7142,10 +7142,20 @@ function applyTextPathControls(textbox) {
|
|
|
7142
7142
|
ctx.stroke();
|
|
7143
7143
|
ctx.restore();
|
|
7144
7144
|
};
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7145
|
+
const radialCursorHandler = (dir) => (_e2, _control, fabricObject) => {
|
|
7146
|
+
var _a3;
|
|
7147
|
+
const baseAngle = dir === "N" || dir === "S" ? 90 : 0;
|
|
7148
|
+
const objAngle = ((_a3 = fabricObject == null ? void 0 : fabricObject.getTotalAngle) == null ? void 0 : _a3.call(fabricObject)) ?? (fabricObject == null ? void 0 : fabricObject.angle) ?? 0;
|
|
7149
|
+
let a = ((baseAngle + objAngle) % 180 + 180) % 180;
|
|
7150
|
+
if (a < 22.5 || a >= 157.5) return "ew-resize";
|
|
7151
|
+
if (a < 67.5) return "nesw-resize";
|
|
7152
|
+
if (a < 112.5) return "ns-resize";
|
|
7153
|
+
return "nwse-resize";
|
|
7154
|
+
};
|
|
7155
|
+
obj.controls.crN = new fabric.Control({ x: 0, y: -0.5, cursorStyleHandler: radialCursorHandler("N"), actionName: "textPath", actionHandler: dragRadius("N"), positionHandler: positionAtRing("N"), render: renderRingHandle });
|
|
7156
|
+
obj.controls.crE = new fabric.Control({ x: 0.5, y: 0, cursorStyleHandler: radialCursorHandler("E"), actionName: "textPath", actionHandler: dragRadius("E"), positionHandler: positionAtRing("E"), render: renderRingHandle });
|
|
7157
|
+
obj.controls.crS = new fabric.Control({ x: 0, y: 0.5, cursorStyleHandler: radialCursorHandler("S"), actionName: "textPath", actionHandler: dragRadius("S"), positionHandler: positionAtRing("S"), render: renderRingHandle });
|
|
7158
|
+
obj.controls.crW = new fabric.Control({ x: -0.5, y: 0, cursorStyleHandler: radialCursorHandler("W"), actionName: "textPath", actionHandler: dragRadius("W"), positionHandler: positionAtRing("W"), render: renderRingHandle });
|
|
7149
7159
|
(_g = obj.setControlVisible) == null ? void 0 : _g.call(obj, "crN", true);
|
|
7150
7160
|
(_h = obj.setControlVisible) == null ? void 0 : _h.call(obj, "crE", true);
|
|
7151
7161
|
(_i = obj.setControlVisible) == null ? void 0 : _i.call(obj, "crS", true);
|
|
@@ -13306,6 +13316,7 @@ const PageCanvas = forwardRef(
|
|
|
13306
13316
|
fabricCanvas.on("selection:cleared", () => {
|
|
13307
13317
|
});
|
|
13308
13318
|
fabricCanvas.on("object:scaling", (e) => {
|
|
13319
|
+
var _a2;
|
|
13309
13320
|
if (!isActiveRef.current) return;
|
|
13310
13321
|
const t = e.target;
|
|
13311
13322
|
if (t) lastResizeScaleTargetRef.current = t;
|
|
@@ -13587,8 +13598,15 @@ const PageCanvas = forwardRef(
|
|
|
13587
13598
|
} catch {
|
|
13588
13599
|
}
|
|
13589
13600
|
setGuides(gridGuidesForScale.length ? [...scaleGuides, ...gridGuidesForScale] : scaleGuides);
|
|
13601
|
+
if (drilledGroupIdRef.current) {
|
|
13602
|
+
try {
|
|
13603
|
+
(_a2 = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _a2.call(fabricCanvas);
|
|
13604
|
+
} catch {
|
|
13605
|
+
}
|
|
13606
|
+
}
|
|
13590
13607
|
});
|
|
13591
13608
|
fabricCanvas.on("object:resizing", (e) => {
|
|
13609
|
+
var _a2;
|
|
13592
13610
|
if (!isActiveRef.current) return;
|
|
13593
13611
|
const t = e.target;
|
|
13594
13612
|
if (t) lastResizeScaleTargetRef.current = t;
|
|
@@ -13665,6 +13683,12 @@ const PageCanvas = forwardRef(
|
|
|
13665
13683
|
} catch {
|
|
13666
13684
|
}
|
|
13667
13685
|
setGuides(gridGuidesForTextResize.length ? [...scaleGuides, ...gridGuidesForTextResize] : scaleGuides);
|
|
13686
|
+
if (drilledGroupIdRef.current) {
|
|
13687
|
+
try {
|
|
13688
|
+
(_a2 = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _a2.call(fabricCanvas);
|
|
13689
|
+
} catch {
|
|
13690
|
+
}
|
|
13691
|
+
}
|
|
13668
13692
|
});
|
|
13669
13693
|
fabricCanvas.on("object:rotating", (e) => {
|
|
13670
13694
|
markSimpleTransform(e);
|
|
@@ -23497,9 +23521,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
23497
23521
|
}
|
|
23498
23522
|
return svgString;
|
|
23499
23523
|
}
|
|
23500
|
-
const resolvedPackageVersion = "0.5.
|
|
23524
|
+
const resolvedPackageVersion = "0.5.256";
|
|
23501
23525
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
23502
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
23526
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.256";
|
|
23503
23527
|
const roundParityValue = (value) => {
|
|
23504
23528
|
if (typeof value !== "number") return value;
|
|
23505
23529
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24313,7 +24337,7 @@ class PixldocsRenderer {
|
|
|
24313
24337
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24314
24338
|
}
|
|
24315
24339
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24316
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
24340
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CZHhQLm0.js");
|
|
24317
24341
|
const prepared = preparePagesForExport(
|
|
24318
24342
|
cloned.pages,
|
|
24319
24343
|
canvasWidth,
|
|
@@ -26633,7 +26657,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
26633
26657
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
26634
26658
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
26635
26659
|
try {
|
|
26636
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
26660
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CZHhQLm0.js");
|
|
26637
26661
|
try {
|
|
26638
26662
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
26639
26663
|
} catch {
|
|
@@ -27033,4 +27057,4 @@ export {
|
|
|
27033
27057
|
buildTeaserBlurFlatKeys as y,
|
|
27034
27058
|
collectFontDescriptorsFromConfig as z
|
|
27035
27059
|
};
|
|
27036
|
-
//# sourceMappingURL=index-
|
|
27060
|
+
//# sourceMappingURL=index-DdXbqycP.js.map
|