@pixldocs/canvas-renderer 0.5.187 → 0.5.189

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,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index-DgMi1JSR.cjs");
3
+ const index = require("./index-CmrxeQ_K.cjs");
4
4
  exports.DEPLOYMENT_VERSION_MARKER = index.DEPLOYMENT_VERSION_MARKER;
5
5
  exports.FONT_FALLBACK_DEVANAGARI = index.FONT_FALLBACK_DEVANAGARI;
6
6
  exports.FONT_FALLBACK_MATH = index.FONT_FALLBACK_MATH;
@@ -12,6 +12,7 @@ exports.PixldocsRenderer = index.PixldocsRenderer;
12
12
  exports.applyThemeToConfig = index.applyThemeToConfig;
13
13
  exports.assemblePdfFromSvgs = index.assemblePdfFromSvgs;
14
14
  exports.awaitFontsForConfig = index.awaitFontsForConfig;
15
+ exports.buildTeaserBlurFlatKeys = index.buildTeaserBlurFlatKeys;
15
16
  exports.collectFontDescriptorsFromConfig = index.collectFontDescriptorsFromConfig;
16
17
  exports.collectFontsFromConfig = index.collectFontsFromConfig;
17
18
  exports.collectImageUrls = index.collectImageUrls;
@@ -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
@@ -1,3 +1,5 @@
1
+ import { buildTeaserBlurFlatKeys } from '../../../src/lib/previewBlur';
2
+ import { BuildTeaserBlurFlatKeysOptions } from '../../../src/lib/previewBlur';
1
3
  import { FormConfig } from '../../../src/lib/formsApi';
2
4
  import { getProxiedImageUrl } from '../../../src/lib/canvasImageLoader';
3
5
  import { hasAnyPreviewBlur } from '../../../src/lib/previewBlur';
@@ -7,6 +9,8 @@ import { isBundledAssetUrl } from '../../../src/lib/canvasImageLoader';
7
9
  import { isPrivateUrl } from '../../../src/lib/canvasImageLoader';
8
10
  import { jsPDF } from 'jspdf';
9
11
  import { JSX as JSX_2 } from 'react/jsx-runtime';
12
+ import { resolveBlurElementExactIdsFromFlatFormKeys } from '../../../src/lib/previewBlur';
13
+ import { ResolveBlurOptions } from '../../../src/lib/previewBlur';
10
14
  import { SectionFormState } from '../../../src/lib/inferFormSchemaFromTemplate';
11
15
  import { setBundledAssetPrefixes } from '../../../src/lib/canvasImageLoader';
12
16
  import { SmartElementProps } from '../../../shared/smart-elements/types';
@@ -40,6 +44,10 @@ export declare function assemblePdfFromSvgs(svgResults: SvgRenderResult[], optio
40
44
  */
41
45
  export declare function awaitFontsForConfig(config: TemplateConfig, maxWaitMs: number): Promise<void>;
42
46
 
47
+ export { buildTeaserBlurFlatKeys }
48
+
49
+ export { BuildTeaserBlurFlatKeysOptions }
50
+
43
51
  export declare interface CanvasNode {
44
52
  id: string;
45
53
  name?: string;
@@ -685,27 +693,9 @@ export declare interface RenderResult {
685
693
  pixelHeight: number;
686
694
  }
687
695
 
688
- /**
689
- * Resolve a list of flat form keys to the exact cloned canvas element ids
690
- * they bind to (across all pages and repeatable instances) by walking
691
- * `config.__cloneIdMap`.
692
- *
693
- * Unknown keys are silently ignored — never blur something we can't
694
- * positively identify.
695
- */
696
- export declare function resolveBlurElementExactIdsFromFlatFormKeys(config: TemplateConfig, flatFormKeys: Iterable<string>, options?: ResolveBlurOptions): string[];
696
+ export { resolveBlurElementExactIdsFromFlatFormKeys }
697
697
 
698
- export declare interface ResolveBlurOptions {
699
- /**
700
- * Restrict resolution to flat keys that bind the **value** column of a
701
- * dynamic field row (i.e. keys ending in `_value`). This is the typical
702
- * biodata teaser pattern — blur values, leave labels / section titles /
703
- * full-name / photo sharp. Default: `'value'`.
704
- *
705
- * Pass `'all'` to resolve every key regardless of suffix.
706
- */
707
- bindings?: 'value' | 'all';
708
- }
698
+ export { ResolveBlurOptions }
709
699
 
710
700
  export declare interface ResolvedTemplate {
711
701
  config: TemplateConfig;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
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, _, $, a0, a1, a2, a3, a4 } from "./index-C9H38u7P.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, M, b, N, O, Q, R, S, U, V, W, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5 } from "./index-lQXXPpb8.js";
2
2
  export {
3
3
  D as DEPLOYMENT_VERSION_MARKER,
4
4
  F as FONT_FALLBACK_DEVANAGARI,
@@ -11,36 +11,37 @@ export {
11
11
  v as applyThemeToConfig,
12
12
  w as assemblePdfFromSvgs,
13
13
  x as awaitFontsForConfig,
14
- y as collectFontDescriptorsFromConfig,
15
- z as collectFontsFromConfig,
16
- B as collectImageUrls,
17
- C as configHasAutoShrinkText,
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,
14
+ y as buildTeaserBlurFlatKeys,
15
+ z as collectFontDescriptorsFromConfig,
16
+ B as collectFontsFromConfig,
17
+ C as collectImageUrls,
18
+ E as configHasAutoShrinkText,
19
+ G as dumpSvgTextDiagnostics,
20
+ H as embedFont,
21
+ I as embedFontsForConfig,
22
+ J as embedFontsInPdf,
23
+ K as ensureFontsForResolvedConfig,
24
+ L as extractFontFamiliesFromSvgs,
25
+ M as getEmbeddedJsPDFFontName,
25
26
  b as getProxiedImageUrl,
26
- M as getPublishedTemplate,
27
- N as getTemplateForm,
28
- O as hasAnyPreviewBlur,
29
- Q as injectPreviewBlur,
30
- R as isBundledAssetUrl,
31
- S as isFontAvailable,
32
- U as isPrivateUrl,
33
- V as listPublishedTemplates,
34
- W as loadGoogleFontCSS,
35
- X as normalizeFontFamily,
36
- Y as resolveBlurElementExactIdsFromFlatFormKeys,
37
- Z as resolveFontWeight,
38
- _ as resolveFromForm,
39
- $ as resolveTemplateData,
40
- a0 as rewriteSvgFontsForJsPDF,
41
- a1 as setAutoShrinkDebug,
42
- a2 as setBundledAssetPrefixes,
43
- a3 as warmResolvedTemplateForPreview,
44
- a4 as warmTemplateFromForm
27
+ N as getPublishedTemplate,
28
+ O as getTemplateForm,
29
+ Q as hasAnyPreviewBlur,
30
+ R as injectPreviewBlur,
31
+ S as isBundledAssetUrl,
32
+ U as isFontAvailable,
33
+ V as isPrivateUrl,
34
+ W as listPublishedTemplates,
35
+ X as loadGoogleFontCSS,
36
+ Y as normalizeFontFamily,
37
+ Z as resolveBlurElementExactIdsFromFlatFormKeys,
38
+ _ as resolveFontWeight,
39
+ $ as resolveFromForm,
40
+ a0 as resolveTemplateData,
41
+ a1 as rewriteSvgFontsForJsPDF,
42
+ a2 as setAutoShrinkDebug,
43
+ a3 as setBundledAssetPrefixes,
44
+ a4 as warmResolvedTemplateForPreview,
45
+ a5 as warmTemplateFromForm
45
46
  };
46
47
  //# 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-DgMi1JSR.cjs");
6
+ const index = require("./index-CmrxeQ_K.cjs");
7
7
  const pdfFonts = require("./pdfFonts-BTj2f465.cjs");
8
8
  function _interopNamespaceDefault(e) {
9
9
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -2525,7 +2525,7 @@ async function fetchSvgAsElement(imageUrl, colorMap) {
2525
2525
  async function getRecoloredSvgDataUrl(imageUrl, colorMap) {
2526
2526
  if (!colorMap || Object.keys(colorMap).length === 0) return null;
2527
2527
  try {
2528
- const { getNormalizedSvgUrl } = await Promise.resolve().then(() => require("./index-DgMi1JSR.cjs")).then((n) => n.canvasImageLoader);
2528
+ const { getNormalizedSvgUrl } = await Promise.resolve().then(() => require("./index-CmrxeQ_K.cjs")).then((n) => n.canvasImageLoader);
2529
2529
  return await getNormalizedSvgUrl(imageUrl, colorMap);
2530
2530
  } catch {
2531
2531
  return null;
@@ -3316,7 +3316,7 @@ async function fetchImageAsBase64(imageUrl, opts = {}) {
3316
3316
  }
3317
3317
  let fetchUrl = imageUrl;
3318
3318
  if (imageUrl.startsWith("http://") || imageUrl.startsWith("https://")) {
3319
- const { isPrivateUrl } = await Promise.resolve().then(() => require("./index-DgMi1JSR.cjs")).then((n) => n.canvasImageLoader);
3319
+ const { isPrivateUrl } = await Promise.resolve().then(() => require("./index-CmrxeQ_K.cjs")).then((n) => n.canvasImageLoader);
3320
3320
  if (isPrivateUrl(imageUrl)) return null;
3321
3321
  const proxyUrl = new URL(`${index.API_URL}/image-proxy`);
3322
3322
  proxyUrl.searchParams.set("url", imageUrl);
@@ -5310,4 +5310,4 @@ exports.exportMultiPagePdf = exportMultiPagePdf;
5310
5310
  exports.logTextMeasurementDiagnostic = logTextMeasurementDiagnostic;
5311
5311
  exports.preparePagesForExport = preparePagesForExport;
5312
5312
  exports.rewriteSvgFontsForJsPDFWithSourceMeta = rewriteSvgFontsForJsPDFWithSourceMeta;
5313
- //# sourceMappingURL=vectorPdfExport-BknzMTNP.cjs.map
5313
+ //# sourceMappingURL=vectorPdfExport-BAAJU0RL.cjs.map