@pixldocs/canvas-renderer 0.5.478 → 0.5.480
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-dIB1dZvd.js → index-Bdt_4Ak_.js} +23 -12
- package/dist/index-Bdt_4Ak_.js.map +1 -0
- package/dist/{index-DfgZSWwY.cjs → index-BvNexoyT.cjs} +23 -12
- package/dist/{index-dIB1dZvd.js.map → index-BvNexoyT.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-B19SgYHz.cjs → vectorPdfExport-8y-rUG9Q.cjs} +4 -4
- package/dist/{vectorPdfExport-B19SgYHz.cjs.map → vectorPdfExport-8y-rUG9Q.cjs.map} +1 -1
- package/dist/{vectorPdfExport-BWLQD50V.js → vectorPdfExport-CwvZ-BD6.js} +4 -4
- package/dist/{vectorPdfExport-BWLQD50V.js.map → vectorPdfExport-CwvZ-BD6.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-DfgZSWwY.cjs.map +0 -1
|
@@ -877,7 +877,11 @@ function resolveStackGroupEffectivePositions(group, pageChildren, options) {
|
|
|
877
877
|
const crossPadEnd = isVertical ? padRight : padBottom;
|
|
878
878
|
crossContainer = maxCross + crossPad0 + crossPadEnd;
|
|
879
879
|
}
|
|
880
|
-
|
|
880
|
+
const anyChildOverride = kids.some((c) => {
|
|
881
|
+
const v = c.alignSelf;
|
|
882
|
+
return typeof v === "string" && v !== "auto";
|
|
883
|
+
});
|
|
884
|
+
if ((align !== "start" || anyChildOverride) && crossContainer != null && kids.length > 0) {
|
|
881
885
|
const crossPad0 = isVertical ? padLeft : padTop;
|
|
882
886
|
const crossPadEnd = isVertical ? padRight : padBottom;
|
|
883
887
|
const innerCross = Math.max(0, crossContainer - crossPad0 - crossPadEnd);
|
|
@@ -886,10 +890,13 @@ function resolveStackGroupEffectivePositions(group, pageChildren, options) {
|
|
|
886
890
|
if (!pos) continue;
|
|
887
891
|
const sz = sizes.get(child.id);
|
|
888
892
|
const childCross = isVertical ? sz.width : sz.height;
|
|
893
|
+
const selfRaw = child.alignSelf;
|
|
894
|
+
const effective = selfRaw && selfRaw !== "auto" ? selfRaw : align;
|
|
895
|
+
if (effective === "start") continue;
|
|
889
896
|
let crossPos;
|
|
890
|
-
if (
|
|
897
|
+
if (effective === "stretch") {
|
|
891
898
|
crossPos = crossPad0;
|
|
892
|
-
} else if (
|
|
899
|
+
} else if (effective === "center") {
|
|
893
900
|
crossPos = crossPad0 + (innerCross - childCross) / 2;
|
|
894
901
|
} else {
|
|
895
902
|
crossPos = crossPad0 + (innerCross - childCross);
|
|
@@ -993,10 +1000,14 @@ function groupBoundsFromChildren(group, pageChildren, options) {
|
|
|
993
1000
|
if (isStack) {
|
|
994
1001
|
const padRight = group.paddingRight ?? 0;
|
|
995
1002
|
const padBottom = group.paddingBottom ?? 0;
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1003
|
+
const contentW = Math.max(1, maxX + padRight);
|
|
1004
|
+
const contentH = Math.max(1, maxY + padBottom);
|
|
1005
|
+
if (group.hugContent === false) {
|
|
1006
|
+
const storedW = typeof group.width === "number" && group.width > 0 ? group.width : contentW;
|
|
1007
|
+
const storedH = typeof group.height === "number" && group.height > 0 ? group.height : contentH;
|
|
1008
|
+
return { width: Math.max(1, storedW), height: Math.max(1, storedH) };
|
|
1009
|
+
}
|
|
1010
|
+
return { width: contentW, height: contentH };
|
|
1000
1011
|
}
|
|
1001
1012
|
return {
|
|
1002
1013
|
width: Math.max(1, maxX - minX),
|
|
@@ -26355,9 +26366,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
26355
26366
|
}
|
|
26356
26367
|
return svgString;
|
|
26357
26368
|
}
|
|
26358
|
-
const resolvedPackageVersion = "0.5.
|
|
26369
|
+
const resolvedPackageVersion = "0.5.480";
|
|
26359
26370
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
26360
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
26371
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.480";
|
|
26361
26372
|
const roundParityValue = (value) => {
|
|
26362
26373
|
if (typeof value !== "number") return value;
|
|
26363
26374
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -27171,7 +27182,7 @@ class PixldocsRenderer {
|
|
|
27171
27182
|
await this.waitForCanvasScene(container, cloned, i);
|
|
27172
27183
|
}
|
|
27173
27184
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
27174
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
27185
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CwvZ-BD6.js");
|
|
27175
27186
|
const prepared = preparePagesForExport(
|
|
27176
27187
|
cloned.pages,
|
|
27177
27188
|
canvasWidth,
|
|
@@ -29491,7 +29502,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
29491
29502
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
29492
29503
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
29493
29504
|
try {
|
|
29494
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
29505
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CwvZ-BD6.js");
|
|
29495
29506
|
try {
|
|
29496
29507
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
29497
29508
|
} catch {
|
|
@@ -29808,4 +29819,4 @@ export {
|
|
|
29808
29819
|
buildTeaserBlurFlatKeys as y,
|
|
29809
29820
|
collectFontDescriptorsFromConfig as z
|
|
29810
29821
|
};
|
|
29811
|
-
//# sourceMappingURL=index-
|
|
29822
|
+
//# sourceMappingURL=index-Bdt_4Ak_.js.map
|