@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.
- package/dist/{index-oR6VOGAL.js → index-BkhtOI5W.js} +38 -25
- package/dist/{index-oR6VOGAL.js.map → index-BkhtOI5W.js.map} +1 -1
- package/dist/{index-DoPXmxDJ.cjs → index-Bt1m9Esp.cjs} +17 -4
- package/dist/{index-DoPXmxDJ.cjs.map → index-Bt1m9Esp.cjs.map} +1 -1
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -5
- package/dist/index.js +22 -21
- package/dist/{vectorPdfExport-DI7k8pt7.js → vectorPdfExport-BX2pT0Zn.js} +68 -4
- package/dist/vectorPdfExport-BX2pT0Zn.js.map +1 -0
- package/dist/{vectorPdfExport-SMvSP0el.cjs → vectorPdfExport-JGntLQJQ.cjs} +68 -4
- package/dist/vectorPdfExport-JGntLQJQ.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/vectorPdfExport-DI7k8pt7.js.map +0 -1
- package/dist/vectorPdfExport-SMvSP0el.cjs.map +0 -1
|
@@ -15956,7 +15956,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
15956
15956
|
}
|
|
15957
15957
|
return svgString;
|
|
15958
15958
|
}
|
|
15959
|
-
const
|
|
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-
|
|
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-
|
|
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
|
-
|
|
18785
|
-
|
|
18797
|
+
DEPLOYMENT_VERSION_MARKER as D,
|
|
18798
|
+
dumpSvgTextDiagnostics as E,
|
|
18786
18799
|
FONT_FALLBACK_DEVANAGARI as F,
|
|
18787
|
-
|
|
18788
|
-
|
|
18789
|
-
|
|
18790
|
-
|
|
18791
|
-
|
|
18792
|
-
|
|
18793
|
-
|
|
18794
|
-
|
|
18795
|
-
|
|
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
|
-
|
|
18798
|
-
|
|
18799
|
-
|
|
18810
|
+
loadGoogleFontCSS as Q,
|
|
18811
|
+
normalizeFontFamily as R,
|
|
18812
|
+
resolveFontWeight as S,
|
|
18800
18813
|
TRIANGLE_STROKE_MITER_LIMIT as T,
|
|
18801
|
-
|
|
18802
|
-
|
|
18803
|
-
|
|
18804
|
-
|
|
18805
|
-
|
|
18806
|
-
|
|
18807
|
-
|
|
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-
|
|
18848
|
+
//# sourceMappingURL=index-BkhtOI5W.js.map
|