@pixldocs/canvas-renderer 0.5.146 → 0.5.147

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.cjs CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index-DoPXmxDJ.cjs");
3
+ const index = require("./index-D78ekQx5.cjs");
4
+ exports.DEPLOYMENT_VERSION_MARKER = index.DEPLOYMENT_VERSION_MARKER;
4
5
  exports.FONT_FALLBACK_DEVANAGARI = index.FONT_FALLBACK_DEVANAGARI;
5
6
  exports.FONT_FALLBACK_MATH = index.FONT_FALLBACK_MATH;
6
7
  exports.FONT_FALLBACK_SYMBOLS = index.FONT_FALLBACK_SYMBOLS;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -87,6 +87,8 @@ export declare function collectImageUrls(config: TemplateConfig): string[];
87
87
  */
88
88
  export declare function configHasAutoShrinkText(config: TemplateConfig | null | undefined): boolean;
89
89
 
90
+ export declare const DEPLOYMENT_VERSION_MARKER: string;
91
+
90
92
  export declare function dumpSvgTextDiagnostics(svgStr: string, pageIndex: number, tag: string, stage: string, maxItems?: number): void;
91
93
 
92
94
  export declare interface DynamicField {
@@ -255,11 +257,7 @@ export declare function loadGoogleFontCSS(rawFontFamily: string): Promise<void>;
255
257
  */
256
258
  export declare function normalizeFontFamily(fontStack: string): string;
257
259
 
258
- /**
259
- * Package version banner. Bump alongside package.json so we can confirm
260
- * (via browser:log) that the deployed bundle matches the expected build.
261
- */
262
- export declare const PACKAGE_VERSION = "0.5.145";
260
+ export declare const PACKAGE_VERSION: string;
263
261
 
264
262
  export declare interface PageSettings {
265
263
  backgroundColor?: string;
@@ -382,6 +380,7 @@ export declare interface PixldocsPreviewResolveProps extends PixldocsPreviewBase
382
380
  export declare class PixldocsRenderer {
383
381
  private config;
384
382
  constructor(config: RendererConfig);
383
+ private installRuntimeGlobals;
385
384
  /**
386
385
  * Render a pre-resolved template config to an image using the full PageCanvas engine.
387
386
  * Mounts a hidden PreviewCanvas component and captures the Fabric canvas output.
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
- import { F, o, q, s, P, t, u, v, w, x, y, z, B, C, D, E, G, H, I, J, K, b, L, M, N, O, Q, R, S, U, V, W, X, Y, Z } from "./index-oR6VOGAL.js";
1
+ import { D, F, o, q, s, P, t, u, v, w, x, y, z, B, C, E, G, H, I, J, K, L, b, M, N, O, Q, R, S, U, V, W, X, Y, Z, _ } from "./index-NMZJF9C9.js";
2
2
  export {
3
+ D as DEPLOYMENT_VERSION_MARKER,
3
4
  F as FONT_FALLBACK_DEVANAGARI,
4
5
  o as FONT_FALLBACK_MATH,
5
6
  q as FONT_FALLBACK_SYMBOLS,
@@ -14,26 +15,26 @@ export {
14
15
  z as collectFontsFromConfig,
15
16
  B as collectImageUrls,
16
17
  C as configHasAutoShrinkText,
17
- D as dumpSvgTextDiagnostics,
18
- E as embedFont,
19
- G as embedFontsForConfig,
20
- H as embedFontsInPdf,
21
- I as ensureFontsForResolvedConfig,
22
- J as extractFontFamiliesFromSvgs,
23
- K as getEmbeddedJsPDFFontName,
18
+ E as dumpSvgTextDiagnostics,
19
+ G as embedFont,
20
+ H as embedFontsForConfig,
21
+ I as embedFontsInPdf,
22
+ J as ensureFontsForResolvedConfig,
23
+ K as extractFontFamiliesFromSvgs,
24
+ L as getEmbeddedJsPDFFontName,
24
25
  b as getProxiedImageUrl,
25
- L as isBundledAssetUrl,
26
- M as isFontAvailable,
27
- N as isPrivateUrl,
28
- O as loadGoogleFontCSS,
29
- Q as normalizeFontFamily,
30
- R as resolveFontWeight,
31
- S as resolveFromForm,
32
- U as resolveTemplateData,
33
- V as rewriteSvgFontsForJsPDF,
34
- W as setAutoShrinkDebug,
35
- X as setBundledAssetPrefixes,
36
- Y as warmResolvedTemplateForPreview,
37
- Z as warmTemplateFromForm
26
+ M as isBundledAssetUrl,
27
+ N as isFontAvailable,
28
+ O as isPrivateUrl,
29
+ Q as loadGoogleFontCSS,
30
+ R as normalizeFontFamily,
31
+ S as resolveFontWeight,
32
+ U as resolveFromForm,
33
+ V as resolveTemplateData,
34
+ W as rewriteSvgFontsForJsPDF,
35
+ X as setAutoShrinkDebug,
36
+ Y as setBundledAssetPrefixes,
37
+ Z as warmResolvedTemplateForPreview,
38
+ _ as warmTemplateFromForm
38
39
  };
39
40
  //# sourceMappingURL=index.js.map
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jspdf = require("jspdf");
4
4
  const svg2pdf_js = require("svg2pdf.js");
5
5
  const fabric = require("fabric");
6
- const index = require("./index-DoPXmxDJ.cjs");
6
+ const index = require("./index-D78ekQx5.cjs");
7
7
  const pdfFonts = require("./pdfFonts-BTEVnYX8.cjs");
8
8
  function _interopNamespaceDefault(e) {
9
9
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -2405,7 +2405,7 @@ async function fetchSvgAsElement(imageUrl, colorMap) {
2405
2405
  async function getRecoloredSvgDataUrl(imageUrl, colorMap) {
2406
2406
  if (!colorMap || Object.keys(colorMap).length === 0) return null;
2407
2407
  try {
2408
- const { getNormalizedSvgUrl } = await Promise.resolve().then(() => require("./index-DoPXmxDJ.cjs")).then((n) => n.canvasImageLoader);
2408
+ const { getNormalizedSvgUrl } = await Promise.resolve().then(() => require("./index-D78ekQx5.cjs")).then((n) => n.canvasImageLoader);
2409
2409
  return await getNormalizedSvgUrl(imageUrl, colorMap);
2410
2410
  } catch {
2411
2411
  return null;
@@ -3186,7 +3186,7 @@ async function fetchImageAsBase64(imageUrl, opts = {}) {
3186
3186
  }
3187
3187
  let fetchUrl = imageUrl;
3188
3188
  if (imageUrl.startsWith("http://") || imageUrl.startsWith("https://")) {
3189
- const { isPrivateUrl } = await Promise.resolve().then(() => require("./index-DoPXmxDJ.cjs")).then((n) => n.canvasImageLoader);
3189
+ const { isPrivateUrl } = await Promise.resolve().then(() => require("./index-D78ekQx5.cjs")).then((n) => n.canvasImageLoader);
3190
3190
  if (isPrivateUrl(imageUrl)) return null;
3191
3191
  const proxyUrl = new URL(`${index.API_URL}/image-proxy`);
3192
3192
  proxyUrl.searchParams.set("url", imageUrl);
@@ -5168,4 +5168,4 @@ exports.exportMultiPagePdf = exportMultiPagePdf;
5168
5168
  exports.logTextMeasurementDiagnostic = logTextMeasurementDiagnostic;
5169
5169
  exports.preparePagesForExport = preparePagesForExport;
5170
5170
  exports.rewriteSvgFontsForJsPDFWithSourceMeta = rewriteSvgFontsForJsPDFWithSourceMeta;
5171
- //# sourceMappingURL=vectorPdfExport-SMvSP0el.cjs.map
5171
+ //# sourceMappingURL=vectorPdfExport-DmFmkPUr.cjs.map