@pixldocs/canvas-renderer 0.5.235 → 0.5.237
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-B8RvBKaU.js → index-DHRpTjzC.js} +18 -12
- package/dist/index-DHRpTjzC.js.map +1 -0
- package/dist/{index-CFIdusRV.cjs → index-DsJJCVHm.cjs} +18 -12
- package/dist/index-DsJJCVHm.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BtoxAWSs.cjs → vectorPdfExport-BedUEU2U.cjs} +4 -4
- package/dist/{vectorPdfExport-BtoxAWSs.cjs.map → vectorPdfExport-BedUEU2U.cjs.map} +1 -1
- package/dist/{vectorPdfExport-DzgUFIK9.js → vectorPdfExport-CgEH8Ggz.js} +4 -4
- package/dist/{vectorPdfExport-DzgUFIK9.js.map → vectorPdfExport-CgEH8Ggz.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-B8RvBKaU.js.map +0 -1
- package/dist/index-CFIdusRV.cjs.map +0 -1
|
@@ -7341,6 +7341,7 @@ function extractTextBgConfig(element) {
|
|
|
7341
7341
|
shadowAffectsBg: element.textShadowAffectsBg !== false,
|
|
7342
7342
|
shadowAffectsText: element.textShadowAffectsText !== false,
|
|
7343
7343
|
fitToText: element.textBgFitToText === true,
|
|
7344
|
+
lineFullWidth: element.textBgPerLineFullWidth === true,
|
|
7344
7345
|
shadowType: element.textShadowType,
|
|
7345
7346
|
shadowColor: element.textShadowColor,
|
|
7346
7347
|
shadowOffsetX: Number(element.textShadowOffsetX ?? 0) || 0,
|
|
@@ -7538,7 +7539,7 @@ function applyTextBackground(obj, cfg) {
|
|
|
7538
7539
|
if (ribbonD) {
|
|
7539
7540
|
bgBounds = computeRibbonBoundsFor(this, pT, pR, pB, pL);
|
|
7540
7541
|
} else {
|
|
7541
|
-
bgRectsForFill = computeBgRects(this, w, h, pT, pR, pB, pL, !!bg.fitToText);
|
|
7542
|
+
bgRectsForFill = computeBgRects(this, w, h, pT, pR, pB, pL, !!bg.fitToText, !!bg.lineFullWidth);
|
|
7542
7543
|
bgBounds = unionBounds(bgRectsForFill);
|
|
7543
7544
|
}
|
|
7544
7545
|
if (blockShadowActive && bg.shadowAffectsBg !== false) {
|
|
@@ -7730,7 +7731,8 @@ function applyTextBackground(obj, cfg) {
|
|
|
7730
7731
|
const pB = Math.max(0, Number((bg == null ? void 0 : bg.padBottom) ?? 0));
|
|
7731
7732
|
const pL = Math.max(0, Number((bg == null ? void 0 : bg.padLeft) ?? 0));
|
|
7732
7733
|
const fit = !!(bg == null ? void 0 : bg.fitToText);
|
|
7733
|
-
const
|
|
7734
|
+
const lineFull = !!(bg == null ? void 0 : bg.lineFullWidth);
|
|
7735
|
+
const rects = computeBgRects(this, w, h, pT, pR, pB, pL, fit, lineFull);
|
|
7734
7736
|
const ribbonD = buildWarpRibbonD(
|
|
7735
7737
|
this,
|
|
7736
7738
|
pT,
|
|
@@ -8002,9 +8004,9 @@ function computeTextVisualBounds(obj, w, h) {
|
|
|
8002
8004
|
}
|
|
8003
8005
|
return unionBounds(rects.length > 0 ? rects : [{ x: -w / 2, y: -h / 2, w, h }]);
|
|
8004
8006
|
}
|
|
8005
|
-
function computeBgRects(obj, w, h, pT, pR, pB, pL, fit) {
|
|
8007
|
+
function computeBgRects(obj, w, h, pT, pR, pB, pL, fit, lineFullWidth = false) {
|
|
8006
8008
|
var _a2;
|
|
8007
|
-
if (!fit) {
|
|
8009
|
+
if (!fit && !lineFullWidth) {
|
|
8008
8010
|
return [{
|
|
8009
8011
|
x: -w / 2 - pL,
|
|
8010
8012
|
y: -h / 2 - pT,
|
|
@@ -8066,14 +8068,16 @@ function computeBgRects(obj, w, h, pT, pR, pB, pL, fit) {
|
|
|
8066
8068
|
const usedH = cursorY + halfH;
|
|
8067
8069
|
const remaining = h - usedH;
|
|
8068
8070
|
const slotH = Math.max(0, Math.min(rawSlotH, remaining));
|
|
8069
|
-
|
|
8071
|
+
const effectiveW = lineFullWidth ? w : lineW;
|
|
8072
|
+
const effectiveLeft = lineFullWidth ? 0 : lineLeft;
|
|
8073
|
+
if (effectiveW <= 0 || slotH <= 0) {
|
|
8070
8074
|
cursorY += slotH;
|
|
8071
8075
|
continue;
|
|
8072
8076
|
}
|
|
8073
8077
|
rects.push({
|
|
8074
|
-
x: -halfW +
|
|
8078
|
+
x: -halfW + effectiveLeft - pL,
|
|
8075
8079
|
y: cursorY - pT,
|
|
8076
|
-
w:
|
|
8080
|
+
w: effectiveW + pL + pR,
|
|
8077
8081
|
h: slotH + pT + pB
|
|
8078
8082
|
});
|
|
8079
8083
|
cursorY += slotH;
|
|
@@ -13106,6 +13110,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13106
13110
|
br: element.textBgRxBR ?? 0,
|
|
13107
13111
|
bl: element.textBgRxBL ?? 0,
|
|
13108
13112
|
ft: element.textBgFitToText === true,
|
|
13113
|
+
lf: element.textBgPerLineFullWidth === true,
|
|
13109
13114
|
bo: element.textBgOpacity ?? 1,
|
|
13110
13115
|
sc: element.textShadowColor ?? null,
|
|
13111
13116
|
sb: element.textShadowBlur ?? 0,
|
|
@@ -14244,6 +14249,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14244
14249
|
br: element.textBgRxBR ?? 0,
|
|
14245
14250
|
bl: element.textBgRxBL ?? 0,
|
|
14246
14251
|
ft: element.textBgFitToText === true,
|
|
14252
|
+
lf: element.textBgPerLineFullWidth === true,
|
|
14247
14253
|
bo: element.textBgOpacity ?? 1,
|
|
14248
14254
|
sc: element.textShadowColor ?? null,
|
|
14249
14255
|
sb: element.textShadowBlur ?? 0,
|
|
@@ -21133,9 +21139,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
21133
21139
|
}
|
|
21134
21140
|
return svgString;
|
|
21135
21141
|
}
|
|
21136
|
-
const resolvedPackageVersion = "0.5.
|
|
21142
|
+
const resolvedPackageVersion = "0.5.237";
|
|
21137
21143
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
21138
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
21144
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.237";
|
|
21139
21145
|
const roundParityValue = (value) => {
|
|
21140
21146
|
if (typeof value !== "number") return value;
|
|
21141
21147
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -21879,7 +21885,7 @@ class PixldocsRenderer {
|
|
|
21879
21885
|
await this.waitForCanvasScene(container, cloned, i);
|
|
21880
21886
|
}
|
|
21881
21887
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
21882
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
21888
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-BedUEU2U.cjs"));
|
|
21883
21889
|
const prepared = preparePagesForExport(
|
|
21884
21890
|
cloned.pages,
|
|
21885
21891
|
canvasWidth,
|
|
@@ -24199,7 +24205,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
24199
24205
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
24200
24206
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
24201
24207
|
try {
|
|
24202
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
24208
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-BedUEU2U.cjs"));
|
|
24203
24209
|
try {
|
|
24204
24210
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
24205
24211
|
} catch {
|
|
@@ -24596,4 +24602,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
24596
24602
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
24597
24603
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
24598
24604
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
24599
|
-
//# sourceMappingURL=index-
|
|
24605
|
+
//# sourceMappingURL=index-DsJJCVHm.cjs.map
|