@pixldocs/canvas-renderer 0.5.163 → 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-Dct1bg7t.cjs → index-BfBR4Koj.cjs} +14 -11
- package/dist/index-BfBR4Koj.cjs.map +1 -0
- package/dist/{index-BJTAZJHO.js → index-Gj2Xgcsf.js} +14 -11
- package/dist/index-Gj2Xgcsf.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-DdZj8pHe.js → vectorPdfExport-C-XaAhxd.js} +4 -4
- package/dist/{vectorPdfExport-DdZj8pHe.js.map → vectorPdfExport-C-XaAhxd.js.map} +1 -1
- package/dist/{vectorPdfExport-Cxegm-1t.cjs → vectorPdfExport-gXz5yjal.cjs} +4 -4
- package/dist/{vectorPdfExport-Cxegm-1t.cjs.map → vectorPdfExport-gXz5yjal.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-BJTAZJHO.js.map +0 -1
- package/dist/index-Dct1bg7t.cjs.map +0 -1
|
@@ -649,14 +649,17 @@ function reflowStackGroup(group, pageChildren, spacing) {
|
|
|
649
649
|
}
|
|
650
650
|
return updates;
|
|
651
651
|
}
|
|
652
|
-
function fillTextHeightsInTree(children) {
|
|
652
|
+
function fillTextHeightsInTree(children, options) {
|
|
653
653
|
return children.map((node) => {
|
|
654
654
|
if (isGroup(node)) {
|
|
655
|
-
return { ...node, children: fillTextHeightsInTree(node.children ?? []) };
|
|
655
|
+
return { ...node, children: fillTextHeightsInTree(node.children ?? [], options) };
|
|
656
656
|
}
|
|
657
657
|
if (isElement(node)) {
|
|
658
658
|
const el = node;
|
|
659
659
|
if (el.type === "text") {
|
|
660
|
+
if ((options == null ? void 0 : options.preserveExplicitTextHeights) && typeof el.height === "number") {
|
|
661
|
+
return el;
|
|
662
|
+
}
|
|
660
663
|
const h = measureTextHeight(el);
|
|
661
664
|
return { ...el, height: h };
|
|
662
665
|
}
|
|
@@ -665,8 +668,8 @@ function fillTextHeightsInTree(children) {
|
|
|
665
668
|
return node;
|
|
666
669
|
});
|
|
667
670
|
}
|
|
668
|
-
function applyStackReflowToPageTree(children) {
|
|
669
|
-
return fillTextHeightsInTree(children);
|
|
671
|
+
function applyStackReflowToPageTree(children, options) {
|
|
672
|
+
return fillTextHeightsInTree(children, options);
|
|
670
673
|
}
|
|
671
674
|
function constrainChildrenToGroupBounds(_group, _pageChildren) {
|
|
672
675
|
return /* @__PURE__ */ new Map();
|
|
@@ -12928,7 +12931,7 @@ function applyFormDataToConfig(config, mappings, formValues, repeatableSectionsF
|
|
|
12928
12931
|
}
|
|
12929
12932
|
for (const page of pages) {
|
|
12930
12933
|
if ((_c = page.children) == null ? void 0 : _c.length) {
|
|
12931
|
-
page.children = applyStackReflowToPageTree(page.children);
|
|
12934
|
+
page.children = applyStackReflowToPageTree(page.children, { preserveExplicitTextHeights: true });
|
|
12932
12935
|
}
|
|
12933
12936
|
}
|
|
12934
12937
|
return cloned;
|
|
@@ -15620,7 +15623,7 @@ function normalizeConfigForEC2Parity(config) {
|
|
|
15620
15623
|
if (isStack && node.stackSpacing == null) node.stackSpacing = 8;
|
|
15621
15624
|
if (node.type === "text") {
|
|
15622
15625
|
const overflowPolicy = String(node.overflowPolicy ?? "grow-and-push");
|
|
15623
|
-
if (overflowPolicy !== "auto-shrink") {
|
|
15626
|
+
if (overflowPolicy !== "auto-shrink" && typeof node.height !== "number") {
|
|
15624
15627
|
delete node.height;
|
|
15625
15628
|
}
|
|
15626
15629
|
}
|
|
@@ -16033,9 +16036,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
16033
16036
|
}
|
|
16034
16037
|
return svgString;
|
|
16035
16038
|
}
|
|
16036
|
-
const resolvedPackageVersion = "0.5.
|
|
16039
|
+
const resolvedPackageVersion = "0.5.164";
|
|
16037
16040
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
16038
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
16041
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.164";
|
|
16039
16042
|
const roundParityValue = (value) => {
|
|
16040
16043
|
if (typeof value !== "number") return value;
|
|
16041
16044
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -16470,7 +16473,7 @@ class PixldocsRenderer {
|
|
|
16470
16473
|
await this.waitForCanvasScene(container, cloned, i);
|
|
16471
16474
|
}
|
|
16472
16475
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
16473
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
16476
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-gXz5yjal.cjs"));
|
|
16474
16477
|
const prepared = preparePagesForExport(
|
|
16475
16478
|
cloned.pages,
|
|
16476
16479
|
canvasWidth,
|
|
@@ -18572,7 +18575,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
18572
18575
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
18573
18576
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
18574
18577
|
try {
|
|
18575
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
18578
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-gXz5yjal.cjs"));
|
|
18576
18579
|
try {
|
|
18577
18580
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
18578
18581
|
} catch {
|
|
@@ -18919,4 +18922,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
18919
18922
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
18920
18923
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
18921
18924
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
18922
|
-
//# sourceMappingURL=index-
|
|
18925
|
+
//# sourceMappingURL=index-BfBR4Koj.cjs.map
|