@pixldocs/canvas-renderer 0.5.286 → 0.5.288
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-4L9uZ78v.cjs → index-BJkc3Hss.cjs} +19 -10
- package/dist/index-BJkc3Hss.cjs.map +1 -0
- package/dist/{index-EkY5XEkR.js → index-Dc3vuyOU.js} +19 -10
- package/dist/index-Dc3vuyOU.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-wObaRY6z.js → vectorPdfExport-BeBLRc4B.js} +4 -4
- package/dist/{vectorPdfExport-wObaRY6z.js.map → vectorPdfExport-BeBLRc4B.js.map} +1 -1
- package/dist/{vectorPdfExport-DqdRBbl_.cjs → vectorPdfExport-DUVeRe5f.cjs} +4 -4
- package/dist/{vectorPdfExport-DqdRBbl_.cjs.map → vectorPdfExport-DUVeRe5f.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-4L9uZ78v.cjs.map +0 -1
- package/dist/index-EkY5XEkR.js.map +0 -1
|
@@ -11000,10 +11000,12 @@ const bakeTextboxScaleIntoTypography = (obj, sourceElement) => {
|
|
|
11000
11000
|
const sy = Math.abs(obj.scaleY ?? 1) || 1;
|
|
11001
11001
|
if (Math.abs(sx - 1) < 1e-3 && Math.abs(sy - 1) < 1e-3) return null;
|
|
11002
11002
|
const isUniform = Math.abs(sx - sy) < 0.01;
|
|
11003
|
-
const
|
|
11003
|
+
const isHeightOnly = !isUniform && Math.abs(sx - 1) < 0.01 && Math.abs(sy - 1) > 1e-3;
|
|
11004
|
+
const fontScale = isUniform ? (sx + sy) / 2 : 1;
|
|
11004
11005
|
const effectScale = isUniform ? fontScale : Math.max(1e-3, Math.sqrt(sx * sy));
|
|
11006
|
+
const newWidth = isHeightOnly ? obj.width ?? (sourceElement == null ? void 0 : sourceElement.width) ?? 20 : Math.max(20, (obj.width ?? (sourceElement == null ? void 0 : sourceElement.width) ?? 20) * sx);
|
|
11005
11007
|
const updates = {
|
|
11006
|
-
width:
|
|
11008
|
+
width: newWidth,
|
|
11007
11009
|
scaleX: 1,
|
|
11008
11010
|
scaleY: 1
|
|
11009
11011
|
};
|
|
@@ -11011,6 +11013,10 @@ const bakeTextboxScaleIntoTypography = (obj, sourceElement) => {
|
|
|
11011
11013
|
updates.fontSize = Math.max(1, Number(obj.fontSize || (sourceElement == null ? void 0 : sourceElement.fontSize) || 16) * fontScale);
|
|
11012
11014
|
const minBoxHeight = Number(obj.minBoxHeight ?? (sourceElement == null ? void 0 : sourceElement.minBoxHeight));
|
|
11013
11015
|
if (Number.isFinite(minBoxHeight) && minBoxHeight > 0) updates.minBoxHeight = minBoxHeight * sy;
|
|
11016
|
+
} else if (isHeightOnly) {
|
|
11017
|
+
const baseMinH = Number(obj.minBoxHeight ?? (sourceElement == null ? void 0 : sourceElement.minBoxHeight));
|
|
11018
|
+
const baselineH = Number.isFinite(baseMinH) && baseMinH > 0 ? baseMinH : obj.height ?? (sourceElement == null ? void 0 : sourceElement.height) ?? 0;
|
|
11019
|
+
if (baselineH > 0) updates.minBoxHeight = Math.max(0, baselineH * sy);
|
|
11014
11020
|
}
|
|
11015
11021
|
scaleUpdateNumber(updates, sourceElement ?? void 0, "strokeWidth", effectScale);
|
|
11016
11022
|
scaleUpdateNumber(updates, sourceElement ?? void 0, "textShadowBlur", effectScale);
|
|
@@ -14596,10 +14602,13 @@ const PageCanvas = forwardRef(
|
|
|
14596
14602
|
}
|
|
14597
14603
|
skipSelectionClearOnDiscardRef.current = false;
|
|
14598
14604
|
if (wasGroupSel) {
|
|
14599
|
-
|
|
14605
|
+
const resizeRestoreSnapshot = {
|
|
14600
14606
|
memberIds: membersToReselect.map((obj) => getObjectId(obj)).filter((id) => !!id && id !== "__background__"),
|
|
14601
|
-
groupSelectionId: wasGroupSel
|
|
14602
|
-
|
|
14607
|
+
groupSelectionId: wasGroupSel,
|
|
14608
|
+
expiresAt: Date.now() + 1200
|
|
14609
|
+
};
|
|
14610
|
+
recentGroupSelectionRestoreRef.current = resizeRestoreSnapshot;
|
|
14611
|
+
restorePreservedGroupSelectionSoon(resizeRestoreSnapshot);
|
|
14603
14612
|
}
|
|
14604
14613
|
fabricCanvas.requestRenderAll();
|
|
14605
14614
|
}
|
|
@@ -23616,9 +23625,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
23616
23625
|
}
|
|
23617
23626
|
return svgString;
|
|
23618
23627
|
}
|
|
23619
|
-
const resolvedPackageVersion = "0.5.
|
|
23628
|
+
const resolvedPackageVersion = "0.5.288";
|
|
23620
23629
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
23621
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
23630
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.288";
|
|
23622
23631
|
const roundParityValue = (value) => {
|
|
23623
23632
|
if (typeof value !== "number") return value;
|
|
23624
23633
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24432,7 +24441,7 @@ class PixldocsRenderer {
|
|
|
24432
24441
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24433
24442
|
}
|
|
24434
24443
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24435
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
24444
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-BeBLRc4B.js");
|
|
24436
24445
|
const prepared = preparePagesForExport(
|
|
24437
24446
|
cloned.pages,
|
|
24438
24447
|
canvasWidth,
|
|
@@ -26752,7 +26761,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
26752
26761
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
26753
26762
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
26754
26763
|
try {
|
|
26755
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
26764
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-BeBLRc4B.js");
|
|
26756
26765
|
try {
|
|
26757
26766
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
26758
26767
|
} catch {
|
|
@@ -27152,4 +27161,4 @@ export {
|
|
|
27152
27161
|
buildTeaserBlurFlatKeys as y,
|
|
27153
27162
|
collectFontDescriptorsFromConfig as z
|
|
27154
27163
|
};
|
|
27155
|
-
//# sourceMappingURL=index-
|
|
27164
|
+
//# sourceMappingURL=index-Dc3vuyOU.js.map
|