@pixldocs/canvas-renderer 0.5.153 → 0.5.155
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-CAH9akzI.js → index-BQA8_wgq.js} +17 -8
- package/dist/index-BQA8_wgq.js.map +1 -0
- package/dist/{index-Bp0cz5Mq.cjs → index-BwHwQrnS.cjs} +17 -8
- package/dist/index-BwHwQrnS.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-YSo453Ul.cjs → vectorPdfExport-C5NmVmxB.cjs} +53 -23
- package/dist/vectorPdfExport-C5NmVmxB.cjs.map +1 -0
- package/dist/{vectorPdfExport-DTssH1-U.js → vectorPdfExport-vCax992V.js} +53 -23
- package/dist/vectorPdfExport-vCax992V.js.map +1 -0
- package/package.json +1 -1
- package/dist/index-Bp0cz5Mq.cjs.map +0 -1
- package/dist/index-CAH9akzI.js.map +0 -1
- package/dist/vectorPdfExport-DTssH1-U.js.map +0 -1
- package/dist/vectorPdfExport-YSo453Ul.cjs.map +0 -1
|
@@ -5804,12 +5804,14 @@ function bakeTextSvgToFabricLineStarts(svg, obj, w) {
|
|
|
5804
5804
|
if (canUseAlignmentAnchor && Number.isFinite(lineW) && lineW > 0) {
|
|
5805
5805
|
lineAnchors.push({
|
|
5806
5806
|
x: alignmentAnchor === "end" ? baseStart + lineW : baseStart + lineW / 2,
|
|
5807
|
-
anchor: alignmentAnchor
|
|
5807
|
+
anchor: alignmentAnchor,
|
|
5808
|
+
width: lineW
|
|
5808
5809
|
});
|
|
5809
5810
|
} else {
|
|
5810
5811
|
lineAnchors.push({
|
|
5811
5812
|
x: baseStart + (Number.isFinite(firstGlyphAdjust) ? firstGlyphAdjust : 0),
|
|
5812
|
-
anchor: "start"
|
|
5813
|
+
anchor: "start",
|
|
5814
|
+
width: lineW
|
|
5813
5815
|
});
|
|
5814
5816
|
}
|
|
5815
5817
|
}
|
|
@@ -5847,7 +5849,8 @@ function bakeTextSvgToFabricLineStarts(svg, obj, w) {
|
|
|
5847
5849
|
if (!lineAnchor || typeof lineAnchor.x !== "number" || !Number.isFinite(lineAnchor.x)) return _m;
|
|
5848
5850
|
const cleanPre = stripAnchorAttrs(pre);
|
|
5849
5851
|
const cleanPost = stripAnchorAttrs(post);
|
|
5850
|
-
|
|
5852
|
+
const widthAttr = Number.isFinite(lineAnchor.width) && lineAnchor.width > 0 ? ` data-pd-line-width="${lineAnchor.width.toFixed(3)}"` : "";
|
|
5853
|
+
return `<tspan${cleanPre} x="${lineAnchor.x.toFixed(3)}" text-anchor="${lineAnchor.anchor}" data-pd-line-anchor="1"${widthAttr}${cleanPost}>`;
|
|
5851
5854
|
}
|
|
5852
5855
|
);
|
|
5853
5856
|
return newSvg;
|
|
@@ -16076,9 +16079,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
16076
16079
|
}
|
|
16077
16080
|
return svgString;
|
|
16078
16081
|
}
|
|
16079
|
-
const resolvedPackageVersion = "0.5.
|
|
16082
|
+
const resolvedPackageVersion = "0.5.155";
|
|
16080
16083
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
16081
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
16084
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.155";
|
|
16082
16085
|
const roundParityValue = (value) => {
|
|
16083
16086
|
if (typeof value !== "number") return value;
|
|
16084
16087
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -16513,7 +16516,7 @@ class PixldocsRenderer {
|
|
|
16513
16516
|
await this.waitForCanvasScene(container, cloned, i);
|
|
16514
16517
|
}
|
|
16515
16518
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
16516
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
16519
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-C5NmVmxB.cjs"));
|
|
16517
16520
|
const prepared = preparePagesForExport(
|
|
16518
16521
|
cloned.pages,
|
|
16519
16522
|
canvasWidth,
|
|
@@ -18615,7 +18618,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
18615
18618
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
18616
18619
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
18617
18620
|
try {
|
|
18618
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
18621
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-C5NmVmxB.cjs"));
|
|
18619
18622
|
try {
|
|
18620
18623
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
18621
18624
|
} catch {
|
|
@@ -18625,6 +18628,12 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
18625
18628
|
console.warn("[canvas-renderer][pdf-export] anchor-bake pass failed (continuing):", e);
|
|
18626
18629
|
}
|
|
18627
18630
|
await rasterizeShadowMarkers(svgToDraw);
|
|
18631
|
+
try {
|
|
18632
|
+
const { promoteFabricLineAnchorsToSelectableText } = await Promise.resolve().then(() => require("./vectorPdfExport-C5NmVmxB.cjs"));
|
|
18633
|
+
promoteFabricLineAnchorsToSelectableText(svgToDraw);
|
|
18634
|
+
} catch (e) {
|
|
18635
|
+
console.warn("[canvas-renderer][pdf-export] selectable anchor promotion failed (continuing):", e);
|
|
18636
|
+
}
|
|
18628
18637
|
return svgToDraw;
|
|
18629
18638
|
} catch {
|
|
18630
18639
|
return null;
|
|
@@ -18962,4 +18971,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
18962
18971
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
18963
18972
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
18964
18973
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
18965
|
-
//# sourceMappingURL=index-
|
|
18974
|
+
//# sourceMappingURL=index-BwHwQrnS.cjs.map
|