html2canvas-pro 2.5.4 → 2.6.0
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/html2canvas-pro.cjs +46 -11
- package/dist/html2canvas-pro.cjs.map +1 -1
- package/dist/html2canvas-pro.esm.js +46 -11
- package/dist/html2canvas-pro.esm.js.map +1 -1
- package/dist/html2canvas-pro.js +46 -11
- package/dist/html2canvas-pro.js.map +1 -1
- package/dist/html2canvas-pro.min.js +6 -6
- package/dist/types/core/validator.d.ts +9 -1
- package/dist/types/dom/iframe-mount.d.ts +1 -1
- package/package.json +5 -4
|
@@ -22,7 +22,8 @@ export interface ValidatorConfig {
|
|
|
22
22
|
*/
|
|
23
23
|
allowedProxyDomains?: string[];
|
|
24
24
|
/**
|
|
25
|
-
* Allow localhost/127.0.0.1 as proxy URL. Only set for development or test
|
|
25
|
+
* Allow localhost/127.0.0.1 as proxy URL. Only set for development or test
|
|
26
|
+
* (e.g. the Playwright reftest runner, which proxies through localhost).
|
|
26
27
|
* @default false
|
|
27
28
|
*/
|
|
28
29
|
allowLocalhostProxy?: boolean;
|
|
@@ -81,6 +82,13 @@ export declare class Validator {
|
|
|
81
82
|
* @returns Validation result
|
|
82
83
|
*/
|
|
83
84
|
validateCspNonce(nonce: string): ValidationResult;
|
|
85
|
+
/**
|
|
86
|
+
* Validate the backgroundColor option
|
|
87
|
+
*
|
|
88
|
+
* @param backgroundColor - CSS color string or null (transparent)
|
|
89
|
+
* @returns Validation result
|
|
90
|
+
*/
|
|
91
|
+
validateBackgroundColor(backgroundColor: unknown): ValidationResult;
|
|
84
92
|
/**
|
|
85
93
|
* Validate image timeout
|
|
86
94
|
*
|
|
@@ -64,7 +64,7 @@ export declare const createIFrameContainer: (ownerDocument: Document, bounds: Bo
|
|
|
64
64
|
*/
|
|
65
65
|
export declare const stylesheetsReady: (documentClone: Document, logger?: {
|
|
66
66
|
warn: (msg: string) => void;
|
|
67
|
-
}, signal?: AbortSignal) => Promise<void>;
|
|
67
|
+
}, signal?: AbortSignal, timeoutMs?: number) => Promise<void>;
|
|
68
68
|
/**
|
|
69
69
|
* Serialise a document type declaration to an HTML string.
|
|
70
70
|
* @internal – exported for testing only, not part of the public API.
|
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"default": "./dist/html2canvas-pro.esm.js"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
-
"version": "2.
|
|
22
|
+
"version": "2.6.0",
|
|
23
23
|
"author": {
|
|
24
24
|
"name": "yorickshan",
|
|
25
25
|
"email": "yorickshan@gmail.com",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@commitlint/cli": "^21.2.3",
|
|
43
43
|
"@commitlint/config-conventional": "^21.2.3",
|
|
44
44
|
"@types/express": "^5.0.6",
|
|
45
|
-
"@types/node": "^
|
|
45
|
+
"@types/node": "^24.0.0",
|
|
46
46
|
"@types/pngjs": "^6.0.5",
|
|
47
47
|
"@types/serve-index": "^1.9.4",
|
|
48
48
|
"@typescript-eslint/eslint-plugin": "^8.71.2",
|
|
@@ -91,8 +91,9 @@
|
|
|
91
91
|
"build:reftest-result-list": "tsx scripts/create-reftest-result-list.ts",
|
|
92
92
|
"build:create-reftest-list": "tsx scripts/create-reftest-list.ts tests/reftests/ignore.txt build/reftests.js",
|
|
93
93
|
"release": "sh scripts/version-upgrade.sh",
|
|
94
|
-
"format": "prettier --write \"{src,tests,scripts}/**/*.ts\"",
|
|
95
|
-
"lint": "eslint \"src/**/*.ts\" \"tests/**/*.ts\" \"scripts/**/*.ts\" \"scripts/**/*.mjs\" --max-warnings 0",
|
|
94
|
+
"format": "prettier --write \"{src,tests,scripts,examples}/**/*.ts\"",
|
|
95
|
+
"lint": "eslint \"src/**/*.ts\" \"tests/**/*.ts\" \"scripts/**/*.ts\" \"scripts/**/*.mjs\" \"examples/**/*.ts\" --max-warnings 0",
|
|
96
|
+
"typecheck:examples": "tsc -p tsconfig.examples.json",
|
|
96
97
|
"test": "pnpm lint && pnpm unittest && pnpm reftests:pw",
|
|
97
98
|
"unittest": "vitest run",
|
|
98
99
|
"unittest:coverage": "vitest run --coverage",
|