@pixldocs/canvas-renderer 0.5.304 → 0.5.306
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-Cxt1LQoh.js → index-DG1oNkJx.js} +41 -9
- package/dist/index-DG1oNkJx.js.map +1 -0
- package/dist/{index-C4r2zesf.cjs → index-Dtus6g8-.cjs} +41 -9
- package/dist/index-Dtus6g8-.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-M5_Qv3Nm.js → vectorPdfExport-CBKunRKb.js} +4 -4
- package/dist/{vectorPdfExport-M5_Qv3Nm.js.map → vectorPdfExport-CBKunRKb.js.map} +1 -1
- package/dist/{vectorPdfExport-BwdX7s-7.cjs → vectorPdfExport-DlIHeeIS.cjs} +4 -4
- package/dist/{vectorPdfExport-BwdX7s-7.cjs.map → vectorPdfExport-DlIHeeIS.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-C4r2zesf.cjs.map +0 -1
- package/dist/index-Cxt1LQoh.js.map +0 -1
|
@@ -13846,7 +13846,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13846
13846
|
const snap = groupShiftReflowSnapshotRef.current;
|
|
13847
13847
|
const anchorEntry = snap.children[0];
|
|
13848
13848
|
const anchorTopLive = anchorEntry.obj.top ?? 0;
|
|
13849
|
-
|
|
13849
|
+
anchorEntry.top0;
|
|
13850
13850
|
const liveHeightOf = (entry) => {
|
|
13851
13851
|
const c = entry.obj;
|
|
13852
13852
|
if (c instanceof fabric__namespace.Textbox) return c.height ?? entry.height0;
|
|
@@ -13857,9 +13857,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13857
13857
|
for (let i = 1; i < snap.children.length; i++) {
|
|
13858
13858
|
const entry = snap.children[i];
|
|
13859
13859
|
const c = entry.obj;
|
|
13860
|
-
const
|
|
13861
|
-
const minTop = prevBottom + snap.gaps[i - 1];
|
|
13862
|
-
const targetTop = Math.max(naturalTop, minTop);
|
|
13860
|
+
const targetTop = prevBottom + snap.gaps[i - 1];
|
|
13863
13861
|
if (Math.abs((c.top ?? 0) - targetTop) > 0.5) {
|
|
13864
13862
|
c._set("top", targetTop);
|
|
13865
13863
|
c.setCoords();
|
|
@@ -14903,6 +14901,40 @@ const PageCanvas = react.forwardRef(
|
|
|
14903
14901
|
bakedTextScaleUpdates.minBoxHeight = Math.max(0, nextMinH);
|
|
14904
14902
|
obj.minBoxHeight = bakedTextScaleUpdates.minBoxHeight;
|
|
14905
14903
|
}
|
|
14904
|
+
const effectScale = isCornerHandle ? fontScale : Math.max(1e-3, Math.sqrt(sx * sy));
|
|
14905
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "strokeWidth", effectScale);
|
|
14906
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textShadowBlur", effectScale);
|
|
14907
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textShadowDistance", effectScale);
|
|
14908
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textShadowOffsetX", sx);
|
|
14909
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textShadowOffsetY", sy);
|
|
14910
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textBgPaddingTop", sy);
|
|
14911
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textBgPaddingBottom", sy);
|
|
14912
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textBgPaddingLeft", sx);
|
|
14913
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textBgPaddingRight", sx);
|
|
14914
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textBgPadding", effectScale);
|
|
14915
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textBgRxTL", effectScale);
|
|
14916
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textBgRxTR", effectScale);
|
|
14917
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textBgRxBR", effectScale);
|
|
14918
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textBgRxBL", effectScale);
|
|
14919
|
+
const tpSource = obj.textPath ?? (sourceElement == null ? void 0 : sourceElement.textPath);
|
|
14920
|
+
if (tpSource) {
|
|
14921
|
+
bakedTextScaleUpdates.textPath = scaleTextPathConfig(tpSource, sx, sy, effectScale);
|
|
14922
|
+
obj.textPath = bakedTextScaleUpdates.textPath;
|
|
14923
|
+
}
|
|
14924
|
+
if (bakedTextScaleUpdates.strokeWidth !== void 0) {
|
|
14925
|
+
obj.set({ strokeWidth: bakedTextScaleUpdates.strokeWidth });
|
|
14926
|
+
}
|
|
14927
|
+
const shadow = obj.shadow;
|
|
14928
|
+
if (shadow) {
|
|
14929
|
+
if (bakedTextScaleUpdates.textShadowBlur !== void 0) shadow.blur = bakedTextScaleUpdates.textShadowBlur;
|
|
14930
|
+
if (bakedTextScaleUpdates.textShadowOffsetX !== void 0) shadow.offsetX = bakedTextScaleUpdates.textShadowOffsetX;
|
|
14931
|
+
if (bakedTextScaleUpdates.textShadowOffsetY !== void 0) shadow.offsetY = bakedTextScaleUpdates.textShadowOffsetY;
|
|
14932
|
+
}
|
|
14933
|
+
if ((sourceElement == null ? void 0 : sourceElement.type) === "text") {
|
|
14934
|
+
const bakedElement = { ...sourceElement, ...bakedTextScaleUpdates };
|
|
14935
|
+
applyTextBackground(obj, extractTextBgConfig(bakedElement));
|
|
14936
|
+
applyTextShadow(obj, bakedElement);
|
|
14937
|
+
}
|
|
14906
14938
|
const prevObjCaching = obj.objectCaching;
|
|
14907
14939
|
obj.set({ width: bakedWidth, scaleX: 1, scaleY: 1, objectCaching: false });
|
|
14908
14940
|
obj.initDimensions();
|
|
@@ -24179,9 +24211,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24179
24211
|
}
|
|
24180
24212
|
return svgString;
|
|
24181
24213
|
}
|
|
24182
|
-
const resolvedPackageVersion = "0.5.
|
|
24214
|
+
const resolvedPackageVersion = "0.5.306";
|
|
24183
24215
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24184
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24216
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.306";
|
|
24185
24217
|
const roundParityValue = (value) => {
|
|
24186
24218
|
if (typeof value !== "number") return value;
|
|
24187
24219
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24995,7 +25027,7 @@ class PixldocsRenderer {
|
|
|
24995
25027
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24996
25028
|
}
|
|
24997
25029
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24998
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
25030
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-DlIHeeIS.cjs"));
|
|
24999
25031
|
const prepared = preparePagesForExport(
|
|
25000
25032
|
cloned.pages,
|
|
25001
25033
|
canvasWidth,
|
|
@@ -27315,7 +27347,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27315
27347
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27316
27348
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27317
27349
|
try {
|
|
27318
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
27350
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-DlIHeeIS.cjs"));
|
|
27319
27351
|
try {
|
|
27320
27352
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27321
27353
|
} catch {
|
|
@@ -27712,4 +27744,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27712
27744
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27713
27745
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27714
27746
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27715
|
-
//# sourceMappingURL=index-
|
|
27747
|
+
//# sourceMappingURL=index-Dtus6g8-.cjs.map
|