@pixldocs/canvas-renderer 0.5.293 → 0.5.294

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.
@@ -10996,6 +10996,7 @@ const scaleUpdateNumber = (updates, source, key, factor) => {
10996
10996
  if (Number.isFinite(value)) updates[key] = value * factor;
10997
10997
  };
10998
10998
  const GROUP_TEXT_RESIZE_DEBUG_PREFIX = "[Pixldocs][group-text-corner-resize]";
10999
+ const GROUP_TEXT_RESIZE_DEBUG_MAX_ENTRIES = 200;
10999
11000
  const isCornerResizeHandle = (handle) => handle === "tl" || handle === "tr" || handle === "bl" || handle === "br";
11000
11001
  const summarizeFabricObjectForResizeDebug = (obj) => {
11001
11002
  var _a2;
@@ -11028,9 +11029,32 @@ const summarizeFabricObjectForResizeDebug = (obj) => {
11028
11029
  const logGroupTextResizeDebug = (phase, payload) => {
11029
11030
  if (typeof console === "undefined") return;
11030
11031
  try {
11031
- console.groupCollapsed(`${GROUP_TEXT_RESIZE_DEBUG_PREFIX} ${phase}`);
11032
- console.log(payload);
11033
- console.groupEnd();
11032
+ const seen = /* @__PURE__ */ new WeakSet();
11033
+ const normalize = (value) => {
11034
+ if (value == null) return value;
11035
+ const valueType = typeof value;
11036
+ if (valueType === "number") return Number.isFinite(value) ? Math.round(value * 1e3) / 1e3 : String(value);
11037
+ if (valueType === "string" || valueType === "boolean") return value;
11038
+ if (valueType === "function") return `[Function ${value.name || "anonymous"}]`;
11039
+ if (Array.isArray(value)) return value.map((entry) => normalize(entry));
11040
+ if (valueType === "object") {
11041
+ if (seen.has(value)) return "[Circular]";
11042
+ seen.add(value);
11043
+ if (value instanceof fabric.FabricObject) return normalize(summarizeFabricObjectForResizeDebug(value));
11044
+ const output = {};
11045
+ Object.entries(value).forEach(([key, entry]) => {
11046
+ output[key] = normalize(entry);
11047
+ });
11048
+ return output;
11049
+ }
11050
+ return String(value);
11051
+ };
11052
+ const normalizedPayload = normalize(payload);
11053
+ const line = `${GROUP_TEXT_RESIZE_DEBUG_PREFIX} ${phase} ${JSON.stringify(normalizedPayload)}`;
11054
+ const debugWindow = window;
11055
+ debugWindow.__pixldocsGroupTextResizeLogs = Array.isArray(debugWindow.__pixldocsGroupTextResizeLogs) ? debugWindow.__pixldocsGroupTextResizeLogs.slice(-GROUP_TEXT_RESIZE_DEBUG_MAX_ENTRIES + 1) : [];
11056
+ debugWindow.__pixldocsGroupTextResizeLogs.push(line);
11057
+ console.log(line);
11034
11058
  } catch {
11035
11059
  console.log(GROUP_TEXT_RESIZE_DEBUG_PREFIX, phase, payload);
11036
11060
  }
@@ -23801,9 +23825,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
23801
23825
  }
23802
23826
  return svgString;
23803
23827
  }
23804
- const resolvedPackageVersion = "0.5.293";
23828
+ const resolvedPackageVersion = "0.5.294";
23805
23829
  const PACKAGE_VERSION = resolvedPackageVersion;
23806
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.293";
23830
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.294";
23807
23831
  const roundParityValue = (value) => {
23808
23832
  if (typeof value !== "number") return value;
23809
23833
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -24617,7 +24641,7 @@ class PixldocsRenderer {
24617
24641
  await this.waitForCanvasScene(container, cloned, i);
24618
24642
  }
24619
24643
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
24620
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-BtxsxKxp.js");
24644
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-uoX8_JuH.js");
24621
24645
  const prepared = preparePagesForExport(
24622
24646
  cloned.pages,
24623
24647
  canvasWidth,
@@ -26937,7 +26961,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
26937
26961
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
26938
26962
  sanitizeSvgTreeForPdf(svgToDraw);
26939
26963
  try {
26940
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-BtxsxKxp.js");
26964
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-uoX8_JuH.js");
26941
26965
  try {
26942
26966
  await logTextMeasurementDiagnostic(svgToDraw);
26943
26967
  } catch {
@@ -27337,4 +27361,4 @@ export {
27337
27361
  buildTeaserBlurFlatKeys as y,
27338
27362
  collectFontDescriptorsFromConfig as z
27339
27363
  };
27340
- //# sourceMappingURL=index-CRNg3m2o.js.map
27364
+ //# sourceMappingURL=index-CvuMfLba.js.map