@pixldocs/canvas-renderer 0.5.155 → 0.5.156
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-BQA8_wgq.js → index-DJQnrBbh.js} +9 -18
- package/dist/index-DJQnrBbh.js.map +1 -0
- package/dist/{index-BwHwQrnS.cjs → index-DhIDZFPx.cjs} +9 -18
- package/dist/index-DhIDZFPx.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{pdfFonts-BTEVnYX8.cjs → svgTextToPath-7fhL08qs.cjs} +796 -31
- package/dist/svgTextToPath-7fhL08qs.cjs.map +1 -0
- package/dist/{pdfFonts-b3_bv7F0.js → svgTextToPath-V1vC0SQt.js} +747 -20
- package/dist/svgTextToPath-V1vC0SQt.js.map +1 -0
- package/dist/{vectorPdfExport-C5NmVmxB.cjs → vectorPdfExport-BbKisSsi.cjs} +40 -51
- package/dist/vectorPdfExport-BbKisSsi.cjs.map +1 -0
- package/dist/{vectorPdfExport-vCax992V.js → vectorPdfExport-DSTA9YWG.js} +40 -51
- package/dist/vectorPdfExport-DSTA9YWG.js.map +1 -0
- package/package.json +1 -1
- package/dist/index-BQA8_wgq.js.map +0 -1
- package/dist/index-BwHwQrnS.cjs.map +0 -1
- package/dist/pdfFonts-BTEVnYX8.cjs.map +0 -1
- package/dist/pdfFonts-b3_bv7F0.js.map +0 -1
- package/dist/svgTextToPath-BXAzwaaR.js +0 -706
- package/dist/svgTextToPath-BXAzwaaR.js.map +0 -1
- package/dist/svgTextToPath-IM1f6F-f.cjs +0 -745
- package/dist/svgTextToPath-IM1f6F-f.cjs.map +0 -1
- package/dist/vectorPdfExport-C5NmVmxB.cjs.map +0 -1
- package/dist/vectorPdfExport-vCax992V.js.map +0 -1
|
@@ -5804,14 +5804,12 @@ 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
|
|
5808
|
-
width: lineW
|
|
5807
|
+
anchor: alignmentAnchor
|
|
5809
5808
|
});
|
|
5810
5809
|
} else {
|
|
5811
5810
|
lineAnchors.push({
|
|
5812
5811
|
x: baseStart + (Number.isFinite(firstGlyphAdjust) ? firstGlyphAdjust : 0),
|
|
5813
|
-
anchor: "start"
|
|
5814
|
-
width: lineW
|
|
5812
|
+
anchor: "start"
|
|
5815
5813
|
});
|
|
5816
5814
|
}
|
|
5817
5815
|
}
|
|
@@ -5849,8 +5847,7 @@ function bakeTextSvgToFabricLineStarts(svg, obj, w) {
|
|
|
5849
5847
|
if (!lineAnchor || typeof lineAnchor.x !== "number" || !Number.isFinite(lineAnchor.x)) return _m;
|
|
5850
5848
|
const cleanPre = stripAnchorAttrs(pre);
|
|
5851
5849
|
const cleanPost = stripAnchorAttrs(post);
|
|
5852
|
-
|
|
5853
|
-
return `<tspan${cleanPre} x="${lineAnchor.x.toFixed(3)}" text-anchor="${lineAnchor.anchor}" data-pd-line-anchor="1"${widthAttr}${cleanPost}>`;
|
|
5850
|
+
return `<tspan${cleanPre} x="${lineAnchor.x.toFixed(3)}" text-anchor="${lineAnchor.anchor}" data-pd-line-anchor="1"${cleanPost}>`;
|
|
5854
5851
|
}
|
|
5855
5852
|
);
|
|
5856
5853
|
return newSvg;
|
|
@@ -16079,9 +16076,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
16079
16076
|
}
|
|
16080
16077
|
return svgString;
|
|
16081
16078
|
}
|
|
16082
|
-
const resolvedPackageVersion = "0.5.
|
|
16079
|
+
const resolvedPackageVersion = "0.5.156";
|
|
16083
16080
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
16084
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
16081
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.156";
|
|
16085
16082
|
const roundParityValue = (value) => {
|
|
16086
16083
|
if (typeof value !== "number") return value;
|
|
16087
16084
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -16516,7 +16513,7 @@ class PixldocsRenderer {
|
|
|
16516
16513
|
await this.waitForCanvasScene(container, cloned, i);
|
|
16517
16514
|
}
|
|
16518
16515
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
16519
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
16516
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-BbKisSsi.cjs"));
|
|
16520
16517
|
const prepared = preparePagesForExport(
|
|
16521
16518
|
cloned.pages,
|
|
16522
16519
|
canvasWidth,
|
|
@@ -18618,7 +18615,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
18618
18615
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
18619
18616
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
18620
18617
|
try {
|
|
18621
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
18618
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-BbKisSsi.cjs"));
|
|
18622
18619
|
try {
|
|
18623
18620
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
18624
18621
|
} catch {
|
|
@@ -18628,12 +18625,6 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
18628
18625
|
console.warn("[canvas-renderer][pdf-export] anchor-bake pass failed (continuing):", e);
|
|
18629
18626
|
}
|
|
18630
18627
|
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
|
-
}
|
|
18637
18628
|
return svgToDraw;
|
|
18638
18629
|
} catch {
|
|
18639
18630
|
return null;
|
|
@@ -18759,7 +18750,7 @@ async function assemblePdfFromSvgs(svgResults, options = {}) {
|
|
|
18759
18750
|
}
|
|
18760
18751
|
if (shouldOutlineText) {
|
|
18761
18752
|
try {
|
|
18762
|
-
const { convertAllTextToPath } = await Promise.resolve().then(() => require("./svgTextToPath-
|
|
18753
|
+
const { convertAllTextToPath } = await Promise.resolve().then(() => require("./svgTextToPath-7fhL08qs.cjs")).then((n) => n.svgTextToPath);
|
|
18763
18754
|
pageSvg = await convertAllTextToPath(pageSvg, fontBaseUrl, { mode: outlineSubMode });
|
|
18764
18755
|
try {
|
|
18765
18756
|
dumpSvgTextDiagnostics(pageSvg, i, PARITY_TAG, "STAGE-1b-after-text-to-path-raw");
|
|
@@ -18971,4 +18962,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
18971
18962
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
18972
18963
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
18973
18964
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
18974
|
-
//# sourceMappingURL=index-
|
|
18965
|
+
//# sourceMappingURL=index-DhIDZFPx.cjs.map
|