@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
|
@@ -13828,7 +13828,7 @@ const PageCanvas = forwardRef(
|
|
|
13828
13828
|
const snap = groupShiftReflowSnapshotRef.current;
|
|
13829
13829
|
const anchorEntry = snap.children[0];
|
|
13830
13830
|
const anchorTopLive = anchorEntry.obj.top ?? 0;
|
|
13831
|
-
|
|
13831
|
+
anchorEntry.top0;
|
|
13832
13832
|
const liveHeightOf = (entry) => {
|
|
13833
13833
|
const c = entry.obj;
|
|
13834
13834
|
if (c instanceof fabric.Textbox) return c.height ?? entry.height0;
|
|
@@ -13839,9 +13839,7 @@ const PageCanvas = forwardRef(
|
|
|
13839
13839
|
for (let i = 1; i < snap.children.length; i++) {
|
|
13840
13840
|
const entry = snap.children[i];
|
|
13841
13841
|
const c = entry.obj;
|
|
13842
|
-
const
|
|
13843
|
-
const minTop = prevBottom + snap.gaps[i - 1];
|
|
13844
|
-
const targetTop = Math.max(naturalTop, minTop);
|
|
13842
|
+
const targetTop = prevBottom + snap.gaps[i - 1];
|
|
13845
13843
|
if (Math.abs((c.top ?? 0) - targetTop) > 0.5) {
|
|
13846
13844
|
c._set("top", targetTop);
|
|
13847
13845
|
c.setCoords();
|
|
@@ -14885,6 +14883,40 @@ const PageCanvas = forwardRef(
|
|
|
14885
14883
|
bakedTextScaleUpdates.minBoxHeight = Math.max(0, nextMinH);
|
|
14886
14884
|
obj.minBoxHeight = bakedTextScaleUpdates.minBoxHeight;
|
|
14887
14885
|
}
|
|
14886
|
+
const effectScale = isCornerHandle ? fontScale : Math.max(1e-3, Math.sqrt(sx * sy));
|
|
14887
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "strokeWidth", effectScale);
|
|
14888
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textShadowBlur", effectScale);
|
|
14889
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textShadowDistance", effectScale);
|
|
14890
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textShadowOffsetX", sx);
|
|
14891
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textShadowOffsetY", sy);
|
|
14892
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textBgPaddingTop", sy);
|
|
14893
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textBgPaddingBottom", sy);
|
|
14894
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textBgPaddingLeft", sx);
|
|
14895
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textBgPaddingRight", sx);
|
|
14896
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textBgPadding", effectScale);
|
|
14897
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textBgRxTL", effectScale);
|
|
14898
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textBgRxTR", effectScale);
|
|
14899
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textBgRxBR", effectScale);
|
|
14900
|
+
scaleUpdateNumber(bakedTextScaleUpdates, sourceElement ?? void 0, "textBgRxBL", effectScale);
|
|
14901
|
+
const tpSource = obj.textPath ?? (sourceElement == null ? void 0 : sourceElement.textPath);
|
|
14902
|
+
if (tpSource) {
|
|
14903
|
+
bakedTextScaleUpdates.textPath = scaleTextPathConfig(tpSource, sx, sy, effectScale);
|
|
14904
|
+
obj.textPath = bakedTextScaleUpdates.textPath;
|
|
14905
|
+
}
|
|
14906
|
+
if (bakedTextScaleUpdates.strokeWidth !== void 0) {
|
|
14907
|
+
obj.set({ strokeWidth: bakedTextScaleUpdates.strokeWidth });
|
|
14908
|
+
}
|
|
14909
|
+
const shadow = obj.shadow;
|
|
14910
|
+
if (shadow) {
|
|
14911
|
+
if (bakedTextScaleUpdates.textShadowBlur !== void 0) shadow.blur = bakedTextScaleUpdates.textShadowBlur;
|
|
14912
|
+
if (bakedTextScaleUpdates.textShadowOffsetX !== void 0) shadow.offsetX = bakedTextScaleUpdates.textShadowOffsetX;
|
|
14913
|
+
if (bakedTextScaleUpdates.textShadowOffsetY !== void 0) shadow.offsetY = bakedTextScaleUpdates.textShadowOffsetY;
|
|
14914
|
+
}
|
|
14915
|
+
if ((sourceElement == null ? void 0 : sourceElement.type) === "text") {
|
|
14916
|
+
const bakedElement = { ...sourceElement, ...bakedTextScaleUpdates };
|
|
14917
|
+
applyTextBackground(obj, extractTextBgConfig(bakedElement));
|
|
14918
|
+
applyTextShadow(obj, bakedElement);
|
|
14919
|
+
}
|
|
14888
14920
|
const prevObjCaching = obj.objectCaching;
|
|
14889
14921
|
obj.set({ width: bakedWidth, scaleX: 1, scaleY: 1, objectCaching: false });
|
|
14890
14922
|
obj.initDimensions();
|
|
@@ -24161,9 +24193,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24161
24193
|
}
|
|
24162
24194
|
return svgString;
|
|
24163
24195
|
}
|
|
24164
|
-
const resolvedPackageVersion = "0.5.
|
|
24196
|
+
const resolvedPackageVersion = "0.5.306";
|
|
24165
24197
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24166
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24198
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.306";
|
|
24167
24199
|
const roundParityValue = (value) => {
|
|
24168
24200
|
if (typeof value !== "number") return value;
|
|
24169
24201
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24977,7 +25009,7 @@ class PixldocsRenderer {
|
|
|
24977
25009
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24978
25010
|
}
|
|
24979
25011
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24980
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
25012
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CBKunRKb.js");
|
|
24981
25013
|
const prepared = preparePagesForExport(
|
|
24982
25014
|
cloned.pages,
|
|
24983
25015
|
canvasWidth,
|
|
@@ -27297,7 +27329,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27297
27329
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27298
27330
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27299
27331
|
try {
|
|
27300
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
27332
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CBKunRKb.js");
|
|
27301
27333
|
try {
|
|
27302
27334
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27303
27335
|
} catch {
|
|
@@ -27697,4 +27729,4 @@ export {
|
|
|
27697
27729
|
buildTeaserBlurFlatKeys as y,
|
|
27698
27730
|
collectFontDescriptorsFromConfig as z
|
|
27699
27731
|
};
|
|
27700
|
-
//# sourceMappingURL=index-
|
|
27732
|
+
//# sourceMappingURL=index-DG1oNkJx.js.map
|