@zumer/snapdom 1.9.10-dev.0 → 1.9.10-dev.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zumer/snapdom",
3
- "version": "1.9.10-dev.0",
3
+ "version": "1.9.10-dev.2",
4
4
  "description": "snapDOM captures HTML elements to images with exceptional speed and accuracy.",
5
5
  "main": "dist/snapdom.js",
6
6
  "module": "dist/snapdom.mjs",
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * snapDOM – ultra-fast DOM-to-image capture
3
3
  * TypeScript definitions
4
- *
4
+ *
5
5
  * Notes:
6
6
  * - Style compression is always enabled internally (no user option).
7
7
  * - Icon fonts are always embedded; `embedFonts` controls non-icon fonts only.
@@ -101,6 +101,20 @@ export interface CaptureOptions {
101
101
  * - "none": do not reset anything (fastest, may reuse stale resources).
102
102
  */
103
103
  reset?: "soft" | "hard" | "none";
104
+
105
+ /**
106
+ * Fallback image source when an <img> fails to load.
107
+ * - String: use as-is.
108
+ * - Callback: receives measured width/height and original src, returns a URL string.
109
+ */
110
+ defaultImageUrl?:
111
+ | string
112
+ | ((args: {
113
+ width?: number;
114
+ height?: number;
115
+ src?: string;
116
+ element: HTMLImageElement;
117
+ }) => string | Promise<string>);
104
118
  }
105
119
 
106
120
  export interface BlobOptions {