@pixldocs/canvas-renderer 0.5.293 → 0.5.295
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-CRNg3m2o.js → index-DmJeO8GF.js} +36 -8
- package/dist/index-DmJeO8GF.js.map +1 -0
- package/dist/{index-CvP_zeI7.cjs → index-Z2C993Tm.cjs} +36 -8
- package/dist/index-Z2C993Tm.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BtxsxKxp.js → vectorPdfExport-BLXRwisV.js} +4 -4
- package/dist/{vectorPdfExport-BtxsxKxp.js.map → vectorPdfExport-BLXRwisV.js.map} +1 -1
- package/dist/{vectorPdfExport-B089WLSf.cjs → vectorPdfExport-BeR1yhlp.cjs} +4 -4
- package/dist/{vectorPdfExport-B089WLSf.cjs.map → vectorPdfExport-BeR1yhlp.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-CRNg3m2o.js.map +0 -1
- package/dist/index-CvP_zeI7.cjs.map +0 -1
|
@@ -11014,6 +11014,7 @@ const scaleUpdateNumber = (updates, source, key, factor) => {
|
|
|
11014
11014
|
if (Number.isFinite(value)) updates[key] = value * factor;
|
|
11015
11015
|
};
|
|
11016
11016
|
const GROUP_TEXT_RESIZE_DEBUG_PREFIX = "[Pixldocs][group-text-corner-resize]";
|
|
11017
|
+
const GROUP_TEXT_RESIZE_DEBUG_MAX_ENTRIES = 200;
|
|
11017
11018
|
const isCornerResizeHandle = (handle) => handle === "tl" || handle === "tr" || handle === "bl" || handle === "br";
|
|
11018
11019
|
const summarizeFabricObjectForResizeDebug = (obj) => {
|
|
11019
11020
|
var _a2;
|
|
@@ -11046,9 +11047,32 @@ const summarizeFabricObjectForResizeDebug = (obj) => {
|
|
|
11046
11047
|
const logGroupTextResizeDebug = (phase, payload) => {
|
|
11047
11048
|
if (typeof console === "undefined") return;
|
|
11048
11049
|
try {
|
|
11049
|
-
|
|
11050
|
-
|
|
11051
|
-
|
|
11050
|
+
const seen = /* @__PURE__ */ new WeakSet();
|
|
11051
|
+
const normalize = (value) => {
|
|
11052
|
+
if (value == null) return value;
|
|
11053
|
+
const valueType = typeof value;
|
|
11054
|
+
if (valueType === "number") return Number.isFinite(value) ? Math.round(value * 1e3) / 1e3 : String(value);
|
|
11055
|
+
if (valueType === "string" || valueType === "boolean") return value;
|
|
11056
|
+
if (valueType === "function") return `[Function ${value.name || "anonymous"}]`;
|
|
11057
|
+
if (Array.isArray(value)) return value.map((entry) => normalize(entry));
|
|
11058
|
+
if (valueType === "object") {
|
|
11059
|
+
if (seen.has(value)) return "[Circular]";
|
|
11060
|
+
seen.add(value);
|
|
11061
|
+
if (value instanceof fabric__namespace.FabricObject) return normalize(summarizeFabricObjectForResizeDebug(value));
|
|
11062
|
+
const output = {};
|
|
11063
|
+
Object.entries(value).forEach(([key, entry]) => {
|
|
11064
|
+
output[key] = normalize(entry);
|
|
11065
|
+
});
|
|
11066
|
+
return output;
|
|
11067
|
+
}
|
|
11068
|
+
return String(value);
|
|
11069
|
+
};
|
|
11070
|
+
const normalizedPayload = normalize(payload);
|
|
11071
|
+
const line = `${GROUP_TEXT_RESIZE_DEBUG_PREFIX} ${phase} ${JSON.stringify(normalizedPayload)}`;
|
|
11072
|
+
const debugWindow = window;
|
|
11073
|
+
debugWindow.__pixldocsGroupTextResizeLogs = Array.isArray(debugWindow.__pixldocsGroupTextResizeLogs) ? debugWindow.__pixldocsGroupTextResizeLogs.slice(-GROUP_TEXT_RESIZE_DEBUG_MAX_ENTRIES + 1) : [];
|
|
11074
|
+
debugWindow.__pixldocsGroupTextResizeLogs.push(line);
|
|
11075
|
+
console.log(line);
|
|
11052
11076
|
} catch {
|
|
11053
11077
|
console.log(GROUP_TEXT_RESIZE_DEBUG_PREFIX, phase, payload);
|
|
11054
11078
|
}
|
|
@@ -14578,6 +14602,10 @@ const PageCanvas = react.forwardRef(
|
|
|
14578
14602
|
obj.initDimensions();
|
|
14579
14603
|
obj.setPositionByOrigin(preBakeCenter, "center", "center");
|
|
14580
14604
|
obj.objectCaching = prevObjCaching;
|
|
14605
|
+
if (sx > 0 && sy > 0) {
|
|
14606
|
+
obj.set({ scaleX: 1 / sx, scaleY: 1 / sy });
|
|
14607
|
+
obj.setPositionByOrigin(preBakeCenter, "center", "center");
|
|
14608
|
+
}
|
|
14581
14609
|
obj.dirty = true;
|
|
14582
14610
|
if (activeObj) activeObj.dirty = true;
|
|
14583
14611
|
finalWidth = bakedWidth;
|
|
@@ -23819,9 +23847,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
23819
23847
|
}
|
|
23820
23848
|
return svgString;
|
|
23821
23849
|
}
|
|
23822
|
-
const resolvedPackageVersion = "0.5.
|
|
23850
|
+
const resolvedPackageVersion = "0.5.295";
|
|
23823
23851
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
23824
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
23852
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.295";
|
|
23825
23853
|
const roundParityValue = (value) => {
|
|
23826
23854
|
if (typeof value !== "number") return value;
|
|
23827
23855
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24635,7 +24663,7 @@ class PixldocsRenderer {
|
|
|
24635
24663
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24636
24664
|
}
|
|
24637
24665
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24638
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
24666
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-BeR1yhlp.cjs"));
|
|
24639
24667
|
const prepared = preparePagesForExport(
|
|
24640
24668
|
cloned.pages,
|
|
24641
24669
|
canvasWidth,
|
|
@@ -26955,7 +26983,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
26955
26983
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
26956
26984
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
26957
26985
|
try {
|
|
26958
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
26986
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-BeR1yhlp.cjs"));
|
|
26959
26987
|
try {
|
|
26960
26988
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
26961
26989
|
} catch {
|
|
@@ -27352,4 +27380,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27352
27380
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27353
27381
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27354
27382
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27355
|
-
//# sourceMappingURL=index-
|
|
27383
|
+
//# sourceMappingURL=index-Z2C993Tm.cjs.map
|