@pixldocs/canvas-renderer 0.5.146 → 0.5.148

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.
@@ -15956,7 +15956,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
15956
15956
  }
15957
15957
  return svgString;
15958
15958
  }
15959
- const PACKAGE_VERSION = "0.5.145";
15959
+ const resolvedPackageVersion = "0.5.148";
15960
+ const PACKAGE_VERSION = resolvedPackageVersion;
15961
+ const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.148";
15960
15962
  const roundParityValue = (value) => {
15961
15963
  if (typeof value !== "number") return value;
15962
15964
  return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
@@ -16102,12 +16104,22 @@ class PixldocsRenderer {
16102
16104
  constructor(config) {
16103
16105
  __publicField(this, "config");
16104
16106
  this.config = config;
16107
+ this.installRuntimeGlobals();
16105
16108
  installUnderlineFix(fabric);
16106
16109
  try {
16107
16110
  console.log(`[canvas-renderer] PixldocsRenderer v${PACKAGE_VERSION} initialized`);
16108
16111
  } catch {
16109
16112
  }
16110
16113
  }
16114
+ installRuntimeGlobals() {
16115
+ try {
16116
+ if (typeof window !== "undefined") {
16117
+ window.__PIXLDOCS_SUPABASE_URL = this.config.supabaseUrl;
16118
+ window.__PIXLDOCS_SUPABASE_ANON_KEY = this.config.supabaseAnonKey;
16119
+ }
16120
+ } catch {
16121
+ }
16122
+ }
16111
16123
  /**
16112
16124
  * Render a pre-resolved template config to an image using the full PageCanvas engine.
16113
16125
  * Mounts a hidden PreviewCanvas component and captures the Fabric canvas output.
@@ -16381,7 +16393,7 @@ class PixldocsRenderer {
16381
16393
  await this.waitForCanvasScene(container, cloned, i);
16382
16394
  }
16383
16395
  console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
16384
- const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-DI7k8pt7.js");
16396
+ const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-BX2pT0Zn.js");
16385
16397
  const prepared = preparePagesForExport(
16386
16398
  cloned.pages,
16387
16399
  canvasWidth,
@@ -18483,7 +18495,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
18483
18495
  if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
18484
18496
  sanitizeSvgTreeForPdf(svgToDraw);
18485
18497
  try {
18486
- const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-DI7k8pt7.js");
18498
+ const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-BX2pT0Zn.js");
18487
18499
  try {
18488
18500
  await logTextMeasurementDiagnostic(svgToDraw);
18489
18501
  } catch {
@@ -18778,33 +18790,34 @@ function setAutoShrinkDebug(enabled) {
18778
18790
  }
18779
18791
  }
18780
18792
  export {
18793
+ canvasImageLoader as $,
18781
18794
  API_URL as A,
18782
18795
  collectImageUrls as B,
18783
18796
  configHasAutoShrinkText$1 as C,
18784
- dumpSvgTextDiagnostics as D,
18785
- embedFont as E,
18797
+ DEPLOYMENT_VERSION_MARKER as D,
18798
+ dumpSvgTextDiagnostics as E,
18786
18799
  FONT_FALLBACK_DEVANAGARI as F,
18787
- embedFontsForConfig as G,
18788
- embedFontsInPdf as H,
18789
- ensureFontsForResolvedConfig as I,
18790
- extractFontFamiliesFromSvgs as J,
18791
- getEmbeddedJsPDFFontName as K,
18792
- isBundledAssetUrl as L,
18793
- isFontAvailable as M,
18794
- isPrivateUrl as N,
18795
- loadGoogleFontCSS as O,
18800
+ embedFont as G,
18801
+ embedFontsForConfig as H,
18802
+ embedFontsInPdf as I,
18803
+ ensureFontsForResolvedConfig as J,
18804
+ extractFontFamiliesFromSvgs as K,
18805
+ getEmbeddedJsPDFFontName as L,
18806
+ isBundledAssetUrl as M,
18807
+ isFontAvailable as N,
18808
+ isPrivateUrl as O,
18796
18809
  PACKAGE_VERSION as P,
18797
- normalizeFontFamily as Q,
18798
- resolveFontWeight as R,
18799
- resolveFromForm as S,
18810
+ loadGoogleFontCSS as Q,
18811
+ normalizeFontFamily as R,
18812
+ resolveFontWeight as S,
18800
18813
  TRIANGLE_STROKE_MITER_LIMIT as T,
18801
- resolveTemplateData as U,
18802
- rewriteSvgFontsForJsPDF as V,
18803
- setAutoShrinkDebug as W,
18804
- setBundledAssetPrefixes as X,
18805
- warmResolvedTemplateForPreview as Y,
18806
- warmTemplateFromForm as Z,
18807
- canvasImageLoader as _,
18814
+ resolveFromForm as U,
18815
+ resolveTemplateData as V,
18816
+ rewriteSvgFontsForJsPDF as W,
18817
+ setAutoShrinkDebug as X,
18818
+ setBundledAssetPrefixes as Y,
18819
+ warmResolvedTemplateForPreview as Z,
18820
+ warmTemplateFromForm as _,
18808
18821
  getAbsoluteBounds as a,
18809
18822
  getProxiedImageUrl as b,
18810
18823
  captureFabricCanvasSvgForPdf as c,
@@ -18832,4 +18845,4 @@ export {
18832
18845
  collectFontDescriptorsFromConfig as y,
18833
18846
  collectFontsFromConfig as z
18834
18847
  };
18835
- //# sourceMappingURL=index-oR6VOGAL.js.map
18848
+ //# sourceMappingURL=index-BkhtOI5W.js.map