katucharts.js 0.2.7 → 0.2.8

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.
@@ -18,6 +18,20 @@ export declare class ExportModule {
18
18
  static exportSVG(svgString: string, filename?: string): void;
19
19
  static exportPNG(svgString: string, filename?: string, scale?: number): Promise<void>;
20
20
  static exportJPEG(svgString: string, filename?: string, scale?: number, quality?: number): Promise<void>;
21
+ private static readonly JSPDF_CDN_URL;
22
+ private static jsPDFLoader;
23
+ /**
24
+ * Resolve the `jsPDF` constructor across every runtime the library ships to.
25
+ * Tries, in order: a `jspdf` global already on the page (UMD consumers who
26
+ * loaded it themselves), the bundler-resolved module (consumers who ran
27
+ * `npm install jspdf`), and finally the UMD build from a CDN. The CDN fallback
28
+ * is what makes PDF export work in the plain-browser UMD build and in setups
29
+ * where `jspdf` was never installed — a bare `import('jspdf')` can't resolve
30
+ * without a bundler, so it always failed there before.
31
+ */
32
+ private static loadJsPDF;
33
+ /** Inject a `<script>` once and resolve when it loads. */
34
+ private static injectScript;
21
35
  static exportPDF(svgString: string, filename?: string, scale?: number): Promise<void>;
22
36
  static print(svgString: string, maxWidth?: number): void;
23
37
  static exportCSV(seriesData: {