@pixldocs/canvas-renderer 0.5.162 → 0.5.164
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-D96xE7-z.cjs → index-BfBR4Koj.cjs} +15 -12
- package/dist/index-BfBR4Koj.cjs.map +1 -0
- package/dist/{index-C6rEqM4R.js → index-Gj2Xgcsf.js} +15 -12
- package/dist/index-Gj2Xgcsf.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-C5vnOg8Q.js → vectorPdfExport-C-XaAhxd.js} +35 -4
- package/dist/vectorPdfExport-C-XaAhxd.js.map +1 -0
- package/dist/{vectorPdfExport-KTzhlsHG.cjs → vectorPdfExport-gXz5yjal.cjs} +35 -4
- package/dist/vectorPdfExport-gXz5yjal.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/index-C6rEqM4R.js.map +0 -1
- package/dist/index-D96xE7-z.cjs.map +0 -1
- package/dist/vectorPdfExport-C5vnOg8Q.js.map +0 -1
- package/dist/vectorPdfExport-KTzhlsHG.cjs.map +0 -1
|
@@ -631,14 +631,17 @@ function reflowStackGroup(group, pageChildren, spacing) {
|
|
|
631
631
|
}
|
|
632
632
|
return updates;
|
|
633
633
|
}
|
|
634
|
-
function fillTextHeightsInTree(children) {
|
|
634
|
+
function fillTextHeightsInTree(children, options) {
|
|
635
635
|
return children.map((node) => {
|
|
636
636
|
if (isGroup(node)) {
|
|
637
|
-
return { ...node, children: fillTextHeightsInTree(node.children ?? []) };
|
|
637
|
+
return { ...node, children: fillTextHeightsInTree(node.children ?? [], options) };
|
|
638
638
|
}
|
|
639
639
|
if (isElement(node)) {
|
|
640
640
|
const el = node;
|
|
641
641
|
if (el.type === "text") {
|
|
642
|
+
if ((options == null ? void 0 : options.preserveExplicitTextHeights) && typeof el.height === "number") {
|
|
643
|
+
return el;
|
|
644
|
+
}
|
|
642
645
|
const h = measureTextHeight(el);
|
|
643
646
|
return { ...el, height: h };
|
|
644
647
|
}
|
|
@@ -647,8 +650,8 @@ function fillTextHeightsInTree(children) {
|
|
|
647
650
|
return node;
|
|
648
651
|
});
|
|
649
652
|
}
|
|
650
|
-
function applyStackReflowToPageTree(children) {
|
|
651
|
-
return fillTextHeightsInTree(children);
|
|
653
|
+
function applyStackReflowToPageTree(children, options) {
|
|
654
|
+
return fillTextHeightsInTree(children, options);
|
|
652
655
|
}
|
|
653
656
|
function constrainChildrenToGroupBounds(_group, _pageChildren) {
|
|
654
657
|
return /* @__PURE__ */ new Map();
|
|
@@ -12075,7 +12078,7 @@ function setInTree(nodes, elementId, targetProperty, value) {
|
|
|
12075
12078
|
}
|
|
12076
12079
|
if (targetProperty === "text" && node.type === "text") {
|
|
12077
12080
|
const overflowPolicy = String(node.overflowPolicy ?? "grow-and-push");
|
|
12078
|
-
if (overflowPolicy !== "auto-shrink") {
|
|
12081
|
+
if (overflowPolicy !== "auto-shrink" && typeof node.height !== "number") {
|
|
12079
12082
|
delete node.height;
|
|
12080
12083
|
}
|
|
12081
12084
|
}
|
|
@@ -12910,7 +12913,7 @@ function applyFormDataToConfig(config, mappings, formValues, repeatableSectionsF
|
|
|
12910
12913
|
}
|
|
12911
12914
|
for (const page of pages) {
|
|
12912
12915
|
if ((_c = page.children) == null ? void 0 : _c.length) {
|
|
12913
|
-
page.children = applyStackReflowToPageTree(page.children);
|
|
12916
|
+
page.children = applyStackReflowToPageTree(page.children, { preserveExplicitTextHeights: true });
|
|
12914
12917
|
}
|
|
12915
12918
|
}
|
|
12916
12919
|
return cloned;
|
|
@@ -15602,7 +15605,7 @@ function normalizeConfigForEC2Parity(config) {
|
|
|
15602
15605
|
if (isStack && node.stackSpacing == null) node.stackSpacing = 8;
|
|
15603
15606
|
if (node.type === "text") {
|
|
15604
15607
|
const overflowPolicy = String(node.overflowPolicy ?? "grow-and-push");
|
|
15605
|
-
if (overflowPolicy !== "auto-shrink") {
|
|
15608
|
+
if (overflowPolicy !== "auto-shrink" && typeof node.height !== "number") {
|
|
15606
15609
|
delete node.height;
|
|
15607
15610
|
}
|
|
15608
15611
|
}
|
|
@@ -16015,9 +16018,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
16015
16018
|
}
|
|
16016
16019
|
return svgString;
|
|
16017
16020
|
}
|
|
16018
|
-
const resolvedPackageVersion = "0.5.
|
|
16021
|
+
const resolvedPackageVersion = "0.5.164";
|
|
16019
16022
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
16020
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
16023
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.164";
|
|
16021
16024
|
const roundParityValue = (value) => {
|
|
16022
16025
|
if (typeof value !== "number") return value;
|
|
16023
16026
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -16452,7 +16455,7 @@ class PixldocsRenderer {
|
|
|
16452
16455
|
await this.waitForCanvasScene(container, cloned, i);
|
|
16453
16456
|
}
|
|
16454
16457
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
16455
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
16458
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-C-XaAhxd.js");
|
|
16456
16459
|
const prepared = preparePagesForExport(
|
|
16457
16460
|
cloned.pages,
|
|
16458
16461
|
canvasWidth,
|
|
@@ -18554,7 +18557,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
18554
18557
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
18555
18558
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
18556
18559
|
try {
|
|
18557
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
18560
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-C-XaAhxd.js");
|
|
18558
18561
|
try {
|
|
18559
18562
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
18560
18563
|
} catch {
|
|
@@ -18904,4 +18907,4 @@ export {
|
|
|
18904
18907
|
collectFontDescriptorsFromConfig as y,
|
|
18905
18908
|
collectFontsFromConfig as z
|
|
18906
18909
|
};
|
|
18907
|
-
//# sourceMappingURL=index-
|
|
18910
|
+
//# sourceMappingURL=index-Gj2Xgcsf.js.map
|