@pixldocs/canvas-renderer 0.5.206 → 0.5.207
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-B1kaODSZ.cjs → index-BqxoYEaM.cjs} +25 -15
- package/dist/{index-B1kaODSZ.cjs.map → index-BqxoYEaM.cjs.map} +1 -1
- package/dist/{index-CyxNh5Y9.js → index-D4Dis-kD.js} +25 -15
- package/dist/{index-CyxNh5Y9.js.map → index-D4Dis-kD.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-C0s166DN.cjs → vectorPdfExport-Cz5kaWEh.cjs} +4 -4
- package/dist/{vectorPdfExport-C0s166DN.cjs.map → vectorPdfExport-Cz5kaWEh.cjs.map} +1 -1
- package/dist/{vectorPdfExport-CyNCzRhQ.js → vectorPdfExport-HZVoeZf3.js} +4 -4
- package/dist/{vectorPdfExport-CyNCzRhQ.js.map → vectorPdfExport-HZVoeZf3.js.map} +1 -1
- package/package.json +1 -1
|
@@ -6986,6 +6986,18 @@ function applyTextBackground(obj, cfg) {
|
|
|
6986
6986
|
bg.rxBR ?? 0,
|
|
6987
6987
|
bg.rxBL ?? 0
|
|
6988
6988
|
) : null;
|
|
6989
|
+
let shearTransform = null;
|
|
6990
|
+
if (isShear) {
|
|
6991
|
+
const fs = this.fontSize || 16;
|
|
6992
|
+
const ep = tpAny.endpoints;
|
|
6993
|
+
const dL = fs * 1.5;
|
|
6994
|
+
const dR = fs * 0.5;
|
|
6995
|
+
const lY = ep && Number.isFinite(ep.leftY) ? ep.leftY : dL;
|
|
6996
|
+
const rY = ep && Number.isFinite(ep.rightY) ? ep.rightY : dR;
|
|
6997
|
+
const slope = w > 0 ? (rY - lY) / w : 0;
|
|
6998
|
+
const dy = (lY + rY) / 2 - h / 2;
|
|
6999
|
+
shearTransform = { slope, dy };
|
|
7000
|
+
}
|
|
6989
7001
|
let bgBounds;
|
|
6990
7002
|
let bgRectsForFill = null;
|
|
6991
7003
|
if (ribbonD) {
|
|
@@ -6996,6 +7008,9 @@ function applyTextBackground(obj, cfg) {
|
|
|
6996
7008
|
}
|
|
6997
7009
|
if (blockShadowActive && bg.shadowAffectsBg !== false) {
|
|
6998
7010
|
ctx.save();
|
|
7011
|
+
if (shearTransform) {
|
|
7012
|
+
ctx.transform(1, shearTransform.slope, 0, 1, 0, shearTransform.dy);
|
|
7013
|
+
}
|
|
6999
7014
|
ctx.fillStyle = bg.shadowColor;
|
|
7000
7015
|
for (let i = blockSteps; i >= 1; i--) {
|
|
7001
7016
|
ctx.save();
|
|
@@ -7028,6 +7043,9 @@ function applyTextBackground(obj, cfg) {
|
|
|
7028
7043
|
}
|
|
7029
7044
|
if (lineShadowActive && bg.shadowAffectsBg !== false) {
|
|
7030
7045
|
ctx.save();
|
|
7046
|
+
if (shearTransform) {
|
|
7047
|
+
ctx.transform(1, shearTransform.slope, 0, 1, 0, shearTransform.dy);
|
|
7048
|
+
}
|
|
7031
7049
|
ctx.translate(extOX, extOY);
|
|
7032
7050
|
ctx.strokeStyle = bg.shadowColor;
|
|
7033
7051
|
ctx.lineWidth = 1;
|
|
@@ -7064,16 +7082,8 @@ function applyTextBackground(obj, cfg) {
|
|
|
7064
7082
|
} catch {
|
|
7065
7083
|
}
|
|
7066
7084
|
} else {
|
|
7067
|
-
if (
|
|
7068
|
-
|
|
7069
|
-
const ep = tpAny.endpoints;
|
|
7070
|
-
const dL = fs * 1.5;
|
|
7071
|
-
const dR = fs * 0.5;
|
|
7072
|
-
const lY = ep && Number.isFinite(ep.leftY) ? ep.leftY : dL;
|
|
7073
|
-
const rY = ep && Number.isFinite(ep.rightY) ? ep.rightY : dR;
|
|
7074
|
-
const slope = w > 0 ? (rY - lY) / w : 0;
|
|
7075
|
-
const dy = (lY + rY) / 2 - h / 2;
|
|
7076
|
-
ctx.transform(1, slope, 0, 1, 0, dy);
|
|
7085
|
+
if (shearTransform) {
|
|
7086
|
+
ctx.transform(1, shearTransform.slope, 0, 1, 0, shearTransform.dy);
|
|
7077
7087
|
}
|
|
7078
7088
|
const rects = bgRectsForFill;
|
|
7079
7089
|
for (const r of rects) {
|
|
@@ -18942,9 +18952,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
18942
18952
|
}
|
|
18943
18953
|
return svgString;
|
|
18944
18954
|
}
|
|
18945
|
-
const resolvedPackageVersion = "0.5.
|
|
18955
|
+
const resolvedPackageVersion = "0.5.207";
|
|
18946
18956
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
18947
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
18957
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.207";
|
|
18948
18958
|
const roundParityValue = (value) => {
|
|
18949
18959
|
if (typeof value !== "number") return value;
|
|
18950
18960
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -19623,7 +19633,7 @@ class PixldocsRenderer {
|
|
|
19623
19633
|
await this.waitForCanvasScene(container, cloned, i);
|
|
19624
19634
|
}
|
|
19625
19635
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
19626
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
19636
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-Cz5kaWEh.cjs"));
|
|
19627
19637
|
const prepared = preparePagesForExport(
|
|
19628
19638
|
cloned.pages,
|
|
19629
19639
|
canvasWidth,
|
|
@@ -21807,7 +21817,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
21807
21817
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
21808
21818
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
21809
21819
|
try {
|
|
21810
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
21820
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-Cz5kaWEh.cjs"));
|
|
21811
21821
|
try {
|
|
21812
21822
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
21813
21823
|
} catch {
|
|
@@ -22204,4 +22214,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
22204
22214
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
22205
22215
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
22206
22216
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
22207
|
-
//# sourceMappingURL=index-
|
|
22217
|
+
//# sourceMappingURL=index-BqxoYEaM.cjs.map
|