@zumer/snapdom 1.9.11 → 1.9.12-dev.1
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/README.md +48 -40
- package/dist/snapdom.js +520 -112
- package/dist/snapdom.min.js +5 -5
- package/dist/snapdom.min.mjs +4 -4
- package/dist/snapdom.mjs +492 -90
- package/package.json +1 -1
- package/types/snapdom.d.ts +16 -1
package/package.json
CHANGED
package/types/snapdom.d.ts
CHANGED
|
@@ -13,6 +13,9 @@ export type BlobType = "svg" | RasterMime;
|
|
|
13
13
|
export type IconFontMatcher = string | RegExp;
|
|
14
14
|
export type CachePolicy = "disabled" | "full" | "auto" | "soft";
|
|
15
15
|
|
|
16
|
+
export type ExcludeMode = 'hide' | 'remove';
|
|
17
|
+
export type FilterMode = 'hide' | 'remove';
|
|
18
|
+
|
|
16
19
|
export interface LocalFontDescriptor {
|
|
17
20
|
/** CSS font-family name (e.g. "Inter"). */
|
|
18
21
|
family: string;
|
|
@@ -87,12 +90,24 @@ export interface CaptureOptions {
|
|
|
87
90
|
/** CSS selectors removed from the cloned subtree before processing. */
|
|
88
91
|
exclude?: string[];
|
|
89
92
|
|
|
93
|
+
/**
|
|
94
|
+
* Mode applied to excluded nodes of the cloned tree.
|
|
95
|
+
* Default: "hide"
|
|
96
|
+
*/
|
|
97
|
+
excludeMode?: ExcludeMode;
|
|
98
|
+
|
|
90
99
|
/**
|
|
91
100
|
* Advanced node filter; return false to exclude a node during traversal.
|
|
92
101
|
* Applied to the cloned subtree.
|
|
93
102
|
*/
|
|
94
103
|
filter?: (el: Element) => boolean;
|
|
95
104
|
|
|
105
|
+
/**
|
|
106
|
+
* Mode applied to filtered nodes of the cloned tree.
|
|
107
|
+
* Default: "hide"
|
|
108
|
+
*/
|
|
109
|
+
filterMode?: FilterMode;
|
|
110
|
+
|
|
96
111
|
/**
|
|
97
112
|
* Whether to synthesize placeholders for broken images, etc.
|
|
98
113
|
* Default: true
|
|
@@ -126,7 +141,7 @@ export interface CaptureOptions {
|
|
|
126
141
|
* - String: use as-is.
|
|
127
142
|
* - Callback: receives measured width/height and original src, returns a URL string.
|
|
128
143
|
*/
|
|
129
|
-
|
|
144
|
+
fallbackURL?:
|
|
130
145
|
| string
|
|
131
146
|
| ((
|
|
132
147
|
args: {
|