@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
|
@@ -6356,6 +6356,8 @@ function createText(element) {
|
|
|
6356
6356
|
const fixedWidth = Math.max(baseWidth, 1);
|
|
6357
6357
|
const splitByGrapheme = overflowPolicy === "auto-shrink" ? false : element.splitByGrapheme ?? element.wordWrap === "break-word";
|
|
6358
6358
|
if (overflowPolicy === "auto-shrink") {
|
|
6359
|
+
const minBoxHForShrink = Math.max(0, Number(element.minBoxHeight) || 0);
|
|
6360
|
+
const heightBound = Math.max(baseHeight || 0, minBoxHForShrink);
|
|
6359
6361
|
const explicitLineCount = Math.max(1, text.split("\n").length);
|
|
6360
6362
|
const debugAutoShrink = typeof window !== "undefined" && window.__pixldocsDebugAutoShrink === true;
|
|
6361
6363
|
const startFontSize = fontSize;
|
|
@@ -6378,7 +6380,7 @@ function createText(element) {
|
|
|
6378
6380
|
const textHeight = testTextbox.height || 0;
|
|
6379
6381
|
const renderedLineCount = ((_a = testTextbox.textLines) == null ? void 0 : _a.length) || 1;
|
|
6380
6382
|
const hasNoImplicitWrap = renderedLineCount <= explicitLineCount;
|
|
6381
|
-
const fitsHeight =
|
|
6383
|
+
const fitsHeight = heightBound <= 0 || textHeight <= heightBound;
|
|
6382
6384
|
const widthMetrics = getTextboxWidthFitMetrics(testTextbox, fixedWidth);
|
|
6383
6385
|
const { maxLineWidth, widthDidGrow, fitsWidth } = widthMetrics;
|
|
6384
6386
|
if (debugAutoShrink) {
|
|
@@ -16100,9 +16102,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
16100
16102
|
}
|
|
16101
16103
|
return svgString;
|
|
16102
16104
|
}
|
|
16103
|
-
const resolvedPackageVersion = "0.5.
|
|
16105
|
+
const resolvedPackageVersion = "0.5.169";
|
|
16104
16106
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
16105
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
16107
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.169";
|
|
16106
16108
|
const roundParityValue = (value) => {
|
|
16107
16109
|
if (typeof value !== "number") return value;
|
|
16108
16110
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -16600,7 +16602,7 @@ class PixldocsRenderer {
|
|
|
16600
16602
|
await this.waitForCanvasScene(container, cloned, i);
|
|
16601
16603
|
}
|
|
16602
16604
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
16603
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
16605
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-C2jE125-.js");
|
|
16604
16606
|
const prepared = preparePagesForExport(
|
|
16605
16607
|
cloned.pages,
|
|
16606
16608
|
canvasWidth,
|
|
@@ -18702,7 +18704,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
18702
18704
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
18703
18705
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
18704
18706
|
try {
|
|
18705
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
18707
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-C2jE125-.js");
|
|
18706
18708
|
try {
|
|
18707
18709
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
18708
18710
|
} catch {
|
|
@@ -19104,4 +19106,4 @@ export {
|
|
|
19104
19106
|
collectFontDescriptorsFromConfig as y,
|
|
19105
19107
|
collectFontsFromConfig as z
|
|
19106
19108
|
};
|
|
19107
|
-
//# sourceMappingURL=index-
|
|
19109
|
+
//# sourceMappingURL=index-qJRuErt-.js.map
|