@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
|
@@ -10558,14 +10558,15 @@ const PageCanvas = forwardRef(
|
|
|
10558
10558
|
const storePos = absoluteToStorePosition(absoluteLeft, absoluteTop, objId, pageChildrenForSave);
|
|
10559
10559
|
const isLineObj = obj instanceof fabric.Line;
|
|
10560
10560
|
const isAutoShrinkText = (sourceElement == null ? void 0 : sourceElement.type) === "text" && sourceElement.overflowPolicy === "auto-shrink";
|
|
10561
|
-
const autoShrinkStoredWidth = isAutoShrinkText ? sourceElement.width : void 0;
|
|
10562
10561
|
const autoShrinkStoredHeight = isAutoShrinkText ? sourceElement.height : void 0;
|
|
10563
10562
|
const elementUpdate = {
|
|
10564
10563
|
left: storePos.left,
|
|
10565
10564
|
top: storePos.top,
|
|
10566
|
-
// Auto-shrink:
|
|
10567
|
-
|
|
10568
|
-
|
|
10565
|
+
// Auto-shrink: persist width from the user-driven resize handles (ml/mr/corners).
|
|
10566
|
+
// Fabric's Textbox 'resizing' event updates obj.width directly with scaleX=1,
|
|
10567
|
+
// so finalWidth already reflects the new width chosen by the user.
|
|
10568
|
+
width: finalWidth,
|
|
10569
|
+
height: isLineObj ? 0 : isAutoShrinkText ? typeof autoShrinkStoredHeight === "number" ? autoShrinkStoredHeight : finalHeight : finalHeight,
|
|
10569
10570
|
angle: decomposed.angle,
|
|
10570
10571
|
skewX: isLineObj ? 0 : decomposed.skewX,
|
|
10571
10572
|
skewY: isLineObj ? 0 : decomposed.skewY,
|
|
@@ -10759,7 +10760,12 @@ const PageCanvas = forwardRef(
|
|
|
10759
10760
|
top: 0,
|
|
10760
10761
|
width: canvasWidth,
|
|
10761
10762
|
height: canvasHeight,
|
|
10762
|
-
absolutePositioned: true
|
|
10763
|
+
absolutePositioned: true,
|
|
10764
|
+
// Rect defaults to strokeWidth:1, which makes the clip region inset
|
|
10765
|
+
// by ~0.5px on top/left and bleed ~0.5px on bottom/right after the
|
|
10766
|
+
// viewport-transform multiply — visible as a 1px page-bg sliver
|
|
10767
|
+
// along the top/left edges of the canvas at any zoom level.
|
|
10768
|
+
strokeWidth: 0
|
|
10763
10769
|
});
|
|
10764
10770
|
fc.requestRenderAll();
|
|
10765
10771
|
}, [canvasWidth, canvasHeight]);
|
|
@@ -18536,6 +18542,13 @@ function warpTextboxSvgAlongPath(svg, obj) {
|
|
|
18536
18542
|
const existing = bgEl.getAttribute("transform");
|
|
18537
18543
|
bgEl.setAttribute("transform", existing ? `${matrix} ${existing}` : matrix);
|
|
18538
18544
|
}
|
|
18545
|
+
const bgShadowPaths = Array.from(doc2.querySelectorAll(
|
|
18546
|
+
"g.__pdBgShadowClone > path, g.__pdShadowRaster > path"
|
|
18547
|
+
));
|
|
18548
|
+
for (const p of bgShadowPaths) {
|
|
18549
|
+
const existing = p.getAttribute("transform");
|
|
18550
|
+
p.setAttribute("transform", existing ? `${matrix} ${existing}` : matrix);
|
|
18551
|
+
}
|
|
18539
18552
|
return new XMLSerializer().serializeToString(doc2.documentElement);
|
|
18540
18553
|
}
|
|
18541
18554
|
const resolved = resolveTextPath(tp, Number(obj.width) || 0, Number(obj.fontSize) || 16);
|
|
@@ -18934,9 +18947,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
18934
18947
|
}
|
|
18935
18948
|
return svgString;
|
|
18936
18949
|
}
|
|
18937
|
-
const resolvedPackageVersion = "0.5.
|
|
18950
|
+
const resolvedPackageVersion = "0.5.210";
|
|
18938
18951
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
18939
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
18952
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.210";
|
|
18940
18953
|
const roundParityValue = (value) => {
|
|
18941
18954
|
if (typeof value !== "number") return value;
|
|
18942
18955
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -19615,7 +19628,7 @@ class PixldocsRenderer {
|
|
|
19615
19628
|
await this.waitForCanvasScene(container, cloned, i);
|
|
19616
19629
|
}
|
|
19617
19630
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
19618
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
19631
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-Ch6GbQqO.js");
|
|
19619
19632
|
const prepared = preparePagesForExport(
|
|
19620
19633
|
cloned.pages,
|
|
19621
19634
|
canvasWidth,
|
|
@@ -21799,7 +21812,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
21799
21812
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
21800
21813
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
21801
21814
|
try {
|
|
21802
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
21815
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-Ch6GbQqO.js");
|
|
21803
21816
|
try {
|
|
21804
21817
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
21805
21818
|
} catch {
|
|
@@ -22175,14 +22188,14 @@ export {
|
|
|
22175
22188
|
canvasImageLoader as a6,
|
|
22176
22189
|
getProxiedImageUrl as b,
|
|
22177
22190
|
captureFabricCanvasSvgForPdf as c,
|
|
22178
|
-
|
|
22191
|
+
getImageProxyFetchOptions as d,
|
|
22179
22192
|
isGroup as e,
|
|
22180
22193
|
findNodeById as f,
|
|
22181
22194
|
getCanvasForPage as g,
|
|
22182
|
-
|
|
22195
|
+
buildRoundedTrianglePath as h,
|
|
22183
22196
|
isElement as i,
|
|
22184
|
-
|
|
22185
|
-
|
|
22197
|
+
hasEdgeFade as j,
|
|
22198
|
+
bakeEdgeFade as k,
|
|
22186
22199
|
getRoundedRectRadii as l,
|
|
22187
22200
|
getTrianglePoints as m,
|
|
22188
22201
|
normalizeShapeType as n,
|
|
@@ -22199,4 +22212,4 @@ export {
|
|
|
22199
22212
|
buildTeaserBlurFlatKeys as y,
|
|
22200
22213
|
collectFontDescriptorsFromConfig as z
|
|
22201
22214
|
};
|
|
22202
|
-
//# sourceMappingURL=index-
|
|
22215
|
+
//# sourceMappingURL=index-DwYUddYW.js.map
|