@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
|
@@ -11018,10 +11018,12 @@ const bakeTextboxScaleIntoTypography = (obj, sourceElement) => {
|
|
|
11018
11018
|
const sy = Math.abs(obj.scaleY ?? 1) || 1;
|
|
11019
11019
|
if (Math.abs(sx - 1) < 1e-3 && Math.abs(sy - 1) < 1e-3) return null;
|
|
11020
11020
|
const isUniform = Math.abs(sx - sy) < 0.01;
|
|
11021
|
-
const
|
|
11021
|
+
const isHeightOnly = !isUniform && Math.abs(sx - 1) < 0.01 && Math.abs(sy - 1) > 1e-3;
|
|
11022
|
+
const fontScale = isUniform ? (sx + sy) / 2 : 1;
|
|
11022
11023
|
const effectScale = isUniform ? fontScale : Math.max(1e-3, Math.sqrt(sx * sy));
|
|
11024
|
+
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);
|
|
11023
11025
|
const updates = {
|
|
11024
|
-
width:
|
|
11026
|
+
width: newWidth,
|
|
11025
11027
|
scaleX: 1,
|
|
11026
11028
|
scaleY: 1
|
|
11027
11029
|
};
|
|
@@ -11029,6 +11031,10 @@ const bakeTextboxScaleIntoTypography = (obj, sourceElement) => {
|
|
|
11029
11031
|
updates.fontSize = Math.max(1, Number(obj.fontSize || (sourceElement == null ? void 0 : sourceElement.fontSize) || 16) * fontScale);
|
|
11030
11032
|
const minBoxHeight = Number(obj.minBoxHeight ?? (sourceElement == null ? void 0 : sourceElement.minBoxHeight));
|
|
11031
11033
|
if (Number.isFinite(minBoxHeight) && minBoxHeight > 0) updates.minBoxHeight = minBoxHeight * sy;
|
|
11034
|
+
} else if (isHeightOnly) {
|
|
11035
|
+
const baseMinH = Number(obj.minBoxHeight ?? (sourceElement == null ? void 0 : sourceElement.minBoxHeight));
|
|
11036
|
+
const baselineH = Number.isFinite(baseMinH) && baseMinH > 0 ? baseMinH : obj.height ?? (sourceElement == null ? void 0 : sourceElement.height) ?? 0;
|
|
11037
|
+
if (baselineH > 0) updates.minBoxHeight = Math.max(0, baselineH * sy);
|
|
11032
11038
|
}
|
|
11033
11039
|
scaleUpdateNumber(updates, sourceElement ?? void 0, "strokeWidth", effectScale);
|
|
11034
11040
|
scaleUpdateNumber(updates, sourceElement ?? void 0, "textShadowBlur", effectScale);
|
|
@@ -14614,10 +14620,13 @@ const PageCanvas = react.forwardRef(
|
|
|
14614
14620
|
}
|
|
14615
14621
|
skipSelectionClearOnDiscardRef.current = false;
|
|
14616
14622
|
if (wasGroupSel) {
|
|
14617
|
-
|
|
14623
|
+
const resizeRestoreSnapshot = {
|
|
14618
14624
|
memberIds: membersToReselect.map((obj) => getObjectId(obj)).filter((id) => !!id && id !== "__background__"),
|
|
14619
|
-
groupSelectionId: wasGroupSel
|
|
14620
|
-
|
|
14625
|
+
groupSelectionId: wasGroupSel,
|
|
14626
|
+
expiresAt: Date.now() + 1200
|
|
14627
|
+
};
|
|
14628
|
+
recentGroupSelectionRestoreRef.current = resizeRestoreSnapshot;
|
|
14629
|
+
restorePreservedGroupSelectionSoon(resizeRestoreSnapshot);
|
|
14621
14630
|
}
|
|
14622
14631
|
fabricCanvas.requestRenderAll();
|
|
14623
14632
|
}
|
|
@@ -23634,9 +23643,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
23634
23643
|
}
|
|
23635
23644
|
return svgString;
|
|
23636
23645
|
}
|
|
23637
|
-
const resolvedPackageVersion = "0.5.
|
|
23646
|
+
const resolvedPackageVersion = "0.5.288";
|
|
23638
23647
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
23639
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
23648
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.288";
|
|
23640
23649
|
const roundParityValue = (value) => {
|
|
23641
23650
|
if (typeof value !== "number") return value;
|
|
23642
23651
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24450,7 +24459,7 @@ class PixldocsRenderer {
|
|
|
24450
24459
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24451
24460
|
}
|
|
24452
24461
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24453
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
24462
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-DUVeRe5f.cjs"));
|
|
24454
24463
|
const prepared = preparePagesForExport(
|
|
24455
24464
|
cloned.pages,
|
|
24456
24465
|
canvasWidth,
|
|
@@ -26770,7 +26779,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
26770
26779
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
26771
26780
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
26772
26781
|
try {
|
|
26773
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
26782
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-DUVeRe5f.cjs"));
|
|
26774
26783
|
try {
|
|
26775
26784
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
26776
26785
|
} catch {
|
|
@@ -27167,4 +27176,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27167
27176
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27168
27177
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27169
27178
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27170
|
-
//# sourceMappingURL=index-
|
|
27179
|
+
//# sourceMappingURL=index-BJkc3Hss.cjs.map
|