@pixldocs/canvas-renderer 0.5.207 → 0.5.210
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-BqxoYEaM.cjs → index-54CXM_hR.cjs} +23 -10
- package/dist/index-54CXM_hR.cjs.map +1 -0
- package/dist/{index-D4Dis-kD.js → index-DwYUddYW.js} +27 -14
- package/dist/index-DwYUddYW.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-Cz5kaWEh.cjs → vectorPdfExport-BSK-Z1p4.cjs} +214 -34
- package/dist/vectorPdfExport-BSK-Z1p4.cjs.map +1 -0
- package/dist/{vectorPdfExport-HZVoeZf3.js → vectorPdfExport-Ch6GbQqO.js} +214 -34
- package/dist/vectorPdfExport-Ch6GbQqO.js.map +1 -0
- package/package.json +1 -1
- package/dist/index-BqxoYEaM.cjs.map +0 -1
- package/dist/index-D4Dis-kD.js.map +0 -1
- package/dist/vectorPdfExport-Cz5kaWEh.cjs.map +0 -1
- package/dist/vectorPdfExport-HZVoeZf3.js.map +0 -1
|
@@ -10576,14 +10576,15 @@ const PageCanvas = react.forwardRef(
|
|
|
10576
10576
|
const storePos = absoluteToStorePosition(absoluteLeft, absoluteTop, objId, pageChildrenForSave);
|
|
10577
10577
|
const isLineObj = obj instanceof fabric__namespace.Line;
|
|
10578
10578
|
const isAutoShrinkText = (sourceElement == null ? void 0 : sourceElement.type) === "text" && sourceElement.overflowPolicy === "auto-shrink";
|
|
10579
|
-
const autoShrinkStoredWidth = isAutoShrinkText ? sourceElement.width : void 0;
|
|
10580
10579
|
const autoShrinkStoredHeight = isAutoShrinkText ? sourceElement.height : void 0;
|
|
10581
10580
|
const elementUpdate = {
|
|
10582
10581
|
left: storePos.left,
|
|
10583
10582
|
top: storePos.top,
|
|
10584
|
-
// Auto-shrink:
|
|
10585
|
-
|
|
10586
|
-
|
|
10583
|
+
// Auto-shrink: persist width from the user-driven resize handles (ml/mr/corners).
|
|
10584
|
+
// Fabric's Textbox 'resizing' event updates obj.width directly with scaleX=1,
|
|
10585
|
+
// so finalWidth already reflects the new width chosen by the user.
|
|
10586
|
+
width: finalWidth,
|
|
10587
|
+
height: isLineObj ? 0 : isAutoShrinkText ? typeof autoShrinkStoredHeight === "number" ? autoShrinkStoredHeight : finalHeight : finalHeight,
|
|
10587
10588
|
angle: decomposed.angle,
|
|
10588
10589
|
skewX: isLineObj ? 0 : decomposed.skewX,
|
|
10589
10590
|
skewY: isLineObj ? 0 : decomposed.skewY,
|
|
@@ -10777,7 +10778,12 @@ const PageCanvas = react.forwardRef(
|
|
|
10777
10778
|
top: 0,
|
|
10778
10779
|
width: canvasWidth,
|
|
10779
10780
|
height: canvasHeight,
|
|
10780
|
-
absolutePositioned: true
|
|
10781
|
+
absolutePositioned: true,
|
|
10782
|
+
// Rect defaults to strokeWidth:1, which makes the clip region inset
|
|
10783
|
+
// by ~0.5px on top/left and bleed ~0.5px on bottom/right after the
|
|
10784
|
+
// viewport-transform multiply — visible as a 1px page-bg sliver
|
|
10785
|
+
// along the top/left edges of the canvas at any zoom level.
|
|
10786
|
+
strokeWidth: 0
|
|
10781
10787
|
});
|
|
10782
10788
|
fc.requestRenderAll();
|
|
10783
10789
|
}, [canvasWidth, canvasHeight]);
|
|
@@ -18554,6 +18560,13 @@ function warpTextboxSvgAlongPath(svg, obj) {
|
|
|
18554
18560
|
const existing = bgEl.getAttribute("transform");
|
|
18555
18561
|
bgEl.setAttribute("transform", existing ? `${matrix} ${existing}` : matrix);
|
|
18556
18562
|
}
|
|
18563
|
+
const bgShadowPaths = Array.from(doc2.querySelectorAll(
|
|
18564
|
+
"g.__pdBgShadowClone > path, g.__pdShadowRaster > path"
|
|
18565
|
+
));
|
|
18566
|
+
for (const p of bgShadowPaths) {
|
|
18567
|
+
const existing = p.getAttribute("transform");
|
|
18568
|
+
p.setAttribute("transform", existing ? `${matrix} ${existing}` : matrix);
|
|
18569
|
+
}
|
|
18557
18570
|
return new XMLSerializer().serializeToString(doc2.documentElement);
|
|
18558
18571
|
}
|
|
18559
18572
|
const resolved = resolveTextPath(tp, Number(obj.width) || 0, Number(obj.fontSize) || 16);
|
|
@@ -18952,9 +18965,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
18952
18965
|
}
|
|
18953
18966
|
return svgString;
|
|
18954
18967
|
}
|
|
18955
|
-
const resolvedPackageVersion = "0.5.
|
|
18968
|
+
const resolvedPackageVersion = "0.5.210";
|
|
18956
18969
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
18957
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
18970
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.210";
|
|
18958
18971
|
const roundParityValue = (value) => {
|
|
18959
18972
|
if (typeof value !== "number") return value;
|
|
18960
18973
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -19633,7 +19646,7 @@ class PixldocsRenderer {
|
|
|
19633
19646
|
await this.waitForCanvasScene(container, cloned, i);
|
|
19634
19647
|
}
|
|
19635
19648
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
19636
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
19649
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-BSK-Z1p4.cjs"));
|
|
19637
19650
|
const prepared = preparePagesForExport(
|
|
19638
19651
|
cloned.pages,
|
|
19639
19652
|
canvasWidth,
|
|
@@ -21817,7 +21830,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
21817
21830
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
21818
21831
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
21819
21832
|
try {
|
|
21820
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
21833
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-BSK-Z1p4.cjs"));
|
|
21821
21834
|
try {
|
|
21822
21835
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
21823
21836
|
} catch {
|
|
@@ -22214,4 +22227,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
22214
22227
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
22215
22228
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
22216
22229
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
22217
|
-
//# sourceMappingURL=index-
|
|
22230
|
+
//# sourceMappingURL=index-54CXM_hR.cjs.map
|