html2canvas-pro 2.5.2 → 2.5.3

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.
@@ -40,6 +40,25 @@ type TrustedTypePolicyLike = {
40
40
  */
41
41
  export declare const resolveTrustedTypesPolicy: (ownerWindow: Window | null) => TrustedTypePolicyLike | null;
42
42
  export declare const createIFrameContainer: (ownerDocument: Document, bounds: Bounds, customContainer?: HTMLElement | ShadowRoot) => HTMLIFrameElement;
43
+ /**
44
+ * Wait until every external stylesheet link of the clone has been applied or
45
+ * definitively failed, or the readiness budget expires.
46
+ *
47
+ * The clone is mounted by adoptNode() into an already-closed document
48
+ * (close() must precede adoptNode for Chrome uppercase class-name matching,
49
+ * see the mount sequence below), so the cloned <link rel="stylesheet">
50
+ * elements are inserted after the document finished loading: they neither
51
+ * delay the iframe load event nor change readyState, and the iframeLoader
52
+ * readiness poll cannot observe them. On a cold cache the first capture
53
+ * could then measure the clone before its external CSS arrived and render
54
+ * an unstyled layout (issue #245). Inline <style> clones apply
55
+ * synchronously and document-level adopted stylesheets are serialised at
56
+ * clone time, so neither needs this wait.
57
+ * @internal – exported for testing only.
58
+ */
59
+ export declare const stylesheetsReady: (documentClone: Document, logger?: {
60
+ warn: (msg: string) => void;
61
+ }, signal?: AbortSignal) => Promise<void>;
43
62
  /**
44
63
  * Serialise a document type declaration to an HTML string.
45
64
  * @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.5.2",
22
+ "version": "2.5.3",
23
23
  "author": {
24
24
  "name": "yorickshan",
25
25
  "email": "yorickshan@gmail.com",
@@ -42,43 +42,43 @@
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": "^26.6.3",
45
+ "@types/node": "^26.6.5",
46
46
  "@types/pngjs": "^6.0.5",
47
47
  "@types/serve-index": "^1.9.4",
48
- "@typescript-eslint/eslint-plugin": "^8.70.1",
49
- "@typescript-eslint/parser": "^8.70.1",
48
+ "@typescript-eslint/eslint-plugin": "^8.71.2",
49
+ "@typescript-eslint/parser": "^8.71.2",
50
50
  "@typescript/native": "npm:typescript@^7.0.2",
51
- "@vitest/coverage-v8": "^5.0.2",
51
+ "@vitest/coverage-v8": "^5.0.4",
52
+ "axios": "^1.20.0",
52
53
  "body-parser": "^2.3.0",
53
54
  "conventional-changelog": "^8.1.3",
54
- "conventional-changelog-conventionalcommits": "^10.4.0",
55
+ "conventional-changelog-conventionalcommits": "^10.4.1",
55
56
  "cors": "^2.8.6",
56
- "eslint": "^10.11.0",
57
+ "eslint": "^10.12.0",
57
58
  "eslint-config-prettier": "^10.1.8",
58
59
  "eslint-plugin-prettier": "^5.5.6",
59
- "express": "^5.2.1",
60
- "filenamify-url": "4.0.0",
60
+ "express": "^5.3.0",
61
+ "express-rate-limit": "^8.7.1",
61
62
  "glob": "^13.0.6",
62
63
  "husky": "^9.1.7",
63
- "jsdom": "^30.1.1",
64
+ "jsdom": "^30.1.2",
64
65
  "lint-staged": "^17.6.0",
65
- "pixelmatch": "^7.2.0",
66
- "playwright": "1.63.0",
66
+ "pixelmatch": "^8.0.0",
67
+ "playwright": "1.64.0",
67
68
  "pngjs": "^7.0.0",
68
- "prettier": "^3.9.9",
69
+ "prettier": "^3.9.10",
69
70
  "rimraf": "^6.1.3",
70
- "rolldown": "^1.2.11",
71
+ "rolldown": "^1.2.13",
71
72
  "serve-index": "^1.9.2",
72
73
  "slash": "5.1.0",
73
74
  "tsx": "^4.23.15",
74
75
  "typedoc": "^0.28.20",
75
76
  "typescript": "npm:@typescript/typescript6@^6.0.2",
76
- "vite": "^8.3.1",
77
- "vitepress": "^1.6.4",
78
- "vitest": "^5.0.2",
77
+ "vite": "^8.3.4",
78
+ "vitepress": "^2.0.0-alpha.20",
79
+ "vitest": "^5.0.4",
79
80
  "yargs": "^18.2.0"
80
81
  },
81
- "dependencies": {},
82
82
  "lint-staged": {
83
83
  "{src,tests}/**/*.ts": [
84
84
  "prettier --write",
@@ -88,7 +88,6 @@
88
88
  "scripts": {
89
89
  "prebuild": "rimraf dist/ && rimraf build/ && mkdir -p dist && mkdir -p build",
90
90
  "build": "tsc -p tsconfig.build.json && rolldown -c rolldown.config.ts && pnpm build:create-reftest-list && node scripts/bundle-filter-surface.mjs",
91
- "build:testrunner": "rolldown -c tests/rolldown.testrunner.config.ts",
92
91
  "build:reftest-result-list": "tsx scripts/create-reftest-result-list.ts",
93
92
  "build:create-reftest-list": "tsx scripts/create-reftest-list.ts tests/reftests/ignore.txt build/reftests.js",
94
93
  "release": "sh scripts/version-upgrade.sh",