@pixldocs/canvas-renderer 0.5.246 → 0.5.247

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.
@@ -9461,7 +9461,7 @@ function createShape(element) {
9461
9461
  function createText(element) {
9462
9462
  var _a2, _b2, _c, _d, _e;
9463
9463
  const overflowPolicy = element.overflowPolicy || "grow-and-push";
9464
- let text = element.text || "Text";
9464
+ let text = element.text != null && element.text !== "" ? element.text : " ";
9465
9465
  let fontSize = element.fontSize || 16;
9466
9466
  const minFontSize = element.minFontSize || 8;
9467
9467
  const maxLines = element.maxLines || 3;
@@ -9552,7 +9552,7 @@ function createText(element) {
9552
9552
  }
9553
9553
  }
9554
9554
  if (overflowPolicy === "max-lines-ellipsis") {
9555
- const originalText = element.text || "Text";
9555
+ const originalText = element.text || " ";
9556
9556
  const countLines = (testText) => {
9557
9557
  var _a3;
9558
9558
  const tb = new fabric.Textbox(testText, {
@@ -11732,7 +11732,7 @@ const PageCanvas = forwardRef(
11732
11732
  const targetWidth = Math.max(1, Number(element.width) > 0 ? Number(element.width) : Number(obj.width ?? 200));
11733
11733
  const overflowPolicy = element.overflowPolicy || "grow-and-push";
11734
11734
  const splitByGrapheme = overflowPolicy === "auto-shrink" ? false : element.splitByGrapheme ?? element.wordWrap === "break-word";
11735
- let reflowText = element.text || "Text";
11735
+ let reflowText = element.text != null && element.text !== "" ? element.text : " ";
11736
11736
  let reflowParsedStyles = null;
11737
11737
  if (element.formattingEnabled === true) {
11738
11738
  const parsed = parseTextMarkdown(reflowText);
@@ -16231,7 +16231,7 @@ const PageCanvas = forwardRef(
16231
16231
  });
16232
16232
  } else if (obj instanceof fabric.Textbox) {
16233
16233
  const overflowPolicy = element.overflowPolicy || "grow-and-push";
16234
- let text = element.text || "Text";
16234
+ let text = element.text != null && element.text !== "" ? element.text : " ";
16235
16235
  let parsedStyles = null;
16236
16236
  if (element.formattingEnabled === true) {
16237
16237
  const parsed = parseTextMarkdown(text);
@@ -16269,7 +16269,7 @@ const PageCanvas = forwardRef(
16269
16269
  }
16270
16270
  }
16271
16271
  if (overflowPolicy === "max-lines-ellipsis") {
16272
- const testTextbox = new fabric.Textbox(element.text || "Text", {
16272
+ const testTextbox = new fabric.Textbox(element.text || " ", {
16273
16273
  width: rW,
16274
16274
  fontSize,
16275
16275
  fontFamily: element.fontFamily || "Open Sans",
@@ -16279,7 +16279,7 @@ const PageCanvas = forwardRef(
16279
16279
  testTextbox.initDimensions();
16280
16280
  const lines = testTextbox.textLines || [];
16281
16281
  if (lines.length > maxLines) {
16282
- const originalText = element.text || "Text";
16282
+ const originalText = element.text || " ";
16283
16283
  const countLines = (testText) => {
16284
16284
  var _a3;
16285
16285
  const tb = new fabric.Textbox(testText, {
@@ -23445,9 +23445,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
23445
23445
  }
23446
23446
  return svgString;
23447
23447
  }
23448
- const resolvedPackageVersion = "0.5.246";
23448
+ const resolvedPackageVersion = "0.5.247";
23449
23449
  const PACKAGE_VERSION = resolvedPackageVersion;
23450
- const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.246";
23450
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.247";
23451
23451
  const roundParityValue = (value) => {
23452
23452
  if (typeof value !== "number") return value;
23453
23453
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -24261,7 +24261,7 @@ class PixldocsRenderer {
24261
24261
  await this.waitForCanvasScene(container, cloned, i);
24262
24262
  }
24263
24263
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
24264
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-D91zbb8z.js");
24264
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-Cej7-4rP.js");
24265
24265
  const prepared = preparePagesForExport(
24266
24266
  cloned.pages,
24267
24267
  canvasWidth,
@@ -26581,7 +26581,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
26581
26581
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
26582
26582
  sanitizeSvgTreeForPdf(svgToDraw);
26583
26583
  try {
26584
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-D91zbb8z.js");
26584
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-Cej7-4rP.js");
26585
26585
  try {
26586
26586
  await logTextMeasurementDiagnostic(svgToDraw);
26587
26587
  } catch {
@@ -26981,4 +26981,4 @@ export {
26981
26981
  buildTeaserBlurFlatKeys as y,
26982
26982
  collectFontDescriptorsFromConfig as z
26983
26983
  };
26984
- //# sourceMappingURL=index-krO2Qm7P.js.map
26984
+ //# sourceMappingURL=index-B70vNKRX.js.map