@pixldocs/canvas-renderer 0.5.168 → 0.5.169
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-DgX2Y94P.cjs → index-Bg1FRZ3d.cjs} +8 -6
- package/dist/{index-oFnROAcT.js.map → index-Bg1FRZ3d.cjs.map} +1 -1
- package/dist/{index-oFnROAcT.js → index-qJRuErt-.js} +8 -6
- package/dist/index-qJRuErt-.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-Bw2WQNoU.cjs → vectorPdfExport-BU855BbG.cjs} +4 -4
- package/dist/{vectorPdfExport-Bw2WQNoU.cjs.map → vectorPdfExport-BU855BbG.cjs.map} +1 -1
- package/dist/{vectorPdfExport-DCy1uYUF.js → vectorPdfExport-C2jE125-.js} +4 -4
- package/dist/{vectorPdfExport-DCy1uYUF.js.map → vectorPdfExport-C2jE125-.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-DgX2Y94P.cjs.map +0 -1
|
@@ -6374,6 +6374,8 @@ function createText(element) {
|
|
|
6374
6374
|
const fixedWidth = Math.max(baseWidth, 1);
|
|
6375
6375
|
const splitByGrapheme = overflowPolicy === "auto-shrink" ? false : element.splitByGrapheme ?? element.wordWrap === "break-word";
|
|
6376
6376
|
if (overflowPolicy === "auto-shrink") {
|
|
6377
|
+
const minBoxHForShrink = Math.max(0, Number(element.minBoxHeight) || 0);
|
|
6378
|
+
const heightBound = Math.max(baseHeight || 0, minBoxHForShrink);
|
|
6377
6379
|
const explicitLineCount = Math.max(1, text.split("\n").length);
|
|
6378
6380
|
const debugAutoShrink = typeof window !== "undefined" && window.__pixldocsDebugAutoShrink === true;
|
|
6379
6381
|
const startFontSize = fontSize;
|
|
@@ -6396,7 +6398,7 @@ function createText(element) {
|
|
|
6396
6398
|
const textHeight = testTextbox.height || 0;
|
|
6397
6399
|
const renderedLineCount = ((_a = testTextbox.textLines) == null ? void 0 : _a.length) || 1;
|
|
6398
6400
|
const hasNoImplicitWrap = renderedLineCount <= explicitLineCount;
|
|
6399
|
-
const fitsHeight =
|
|
6401
|
+
const fitsHeight = heightBound <= 0 || textHeight <= heightBound;
|
|
6400
6402
|
const widthMetrics = getTextboxWidthFitMetrics(testTextbox, fixedWidth);
|
|
6401
6403
|
const { maxLineWidth, widthDidGrow, fitsWidth } = widthMetrics;
|
|
6402
6404
|
if (debugAutoShrink) {
|
|
@@ -16118,9 +16120,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
16118
16120
|
}
|
|
16119
16121
|
return svgString;
|
|
16120
16122
|
}
|
|
16121
|
-
const resolvedPackageVersion = "0.5.
|
|
16123
|
+
const resolvedPackageVersion = "0.5.169";
|
|
16122
16124
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
16123
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
16125
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.169";
|
|
16124
16126
|
const roundParityValue = (value) => {
|
|
16125
16127
|
if (typeof value !== "number") return value;
|
|
16126
16128
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -16618,7 +16620,7 @@ class PixldocsRenderer {
|
|
|
16618
16620
|
await this.waitForCanvasScene(container, cloned, i);
|
|
16619
16621
|
}
|
|
16620
16622
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
16621
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
16623
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-BU855BbG.cjs"));
|
|
16622
16624
|
const prepared = preparePagesForExport(
|
|
16623
16625
|
cloned.pages,
|
|
16624
16626
|
canvasWidth,
|
|
@@ -18720,7 +18722,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
18720
18722
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
18721
18723
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
18722
18724
|
try {
|
|
18723
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
18725
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-BU855BbG.cjs"));
|
|
18724
18726
|
try {
|
|
18725
18727
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
18726
18728
|
} catch {
|
|
@@ -19119,4 +19121,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
19119
19121
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
19120
19122
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
19121
19123
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
19122
|
-
//# sourceMappingURL=index-
|
|
19124
|
+
//# sourceMappingURL=index-Bg1FRZ3d.cjs.map
|