html2canvas-pro 1.5.2 → 1.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.
- package/.commitlintrc.json +23 -0
- package/.husky/commit-msg +4 -0
- package/.husky/pre-commit +4 -0
- package/.versionrc.json +12 -0
- package/CHANGELOG.md +17 -11
- package/dist/html2canvas-pro.esm.js +7 -5
- package/dist/html2canvas-pro.esm.js.map +1 -1
- package/dist/html2canvas-pro.js +7 -5
- package/dist/html2canvas-pro.js.map +1 -1
- package/dist/html2canvas-pro.min.js +2 -2
- package/dist/lib/render/canvas/canvas-renderer.js +6 -4
- package/dist/lib/render/canvas/canvas-renderer.js.map +1 -1
- package/package.json +17 -5
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": ["@commitlint/config-conventional"],
|
|
3
|
+
"rules": {
|
|
4
|
+
"type-enum": [
|
|
5
|
+
2,
|
|
6
|
+
"always",
|
|
7
|
+
[
|
|
8
|
+
"feat",
|
|
9
|
+
"fix",
|
|
10
|
+
"docs",
|
|
11
|
+
"style",
|
|
12
|
+
"refactor",
|
|
13
|
+
"perf",
|
|
14
|
+
"test",
|
|
15
|
+
"chore",
|
|
16
|
+
"revert",
|
|
17
|
+
"build",
|
|
18
|
+
"ci"
|
|
19
|
+
]
|
|
20
|
+
],
|
|
21
|
+
"subject-case": [0]
|
|
22
|
+
}
|
|
23
|
+
}
|
package/.versionrc.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"header": "",
|
|
3
|
+
"types": [
|
|
4
|
+
{ "type": "feat", "section": "Features" },
|
|
5
|
+
{ "type": "fix", "section": "Fixes" },
|
|
6
|
+
{ "type": "docs", "section": "Documentation" },
|
|
7
|
+
{ "type": "refactor", "section": "Refactor" },
|
|
8
|
+
{ "type": "perf", "section": "Performance" },
|
|
9
|
+
{ "type": "chore", "section": "Chore" },
|
|
10
|
+
{ "type": "test", "section": "Chore" }
|
|
11
|
+
]
|
|
12
|
+
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
## [1.5.2](https://github.com/yorickshan/html2canvas-pro/compare/v1.5.1...v1.5.2) (2024-07-03)
|
|
2
1
|
|
|
2
|
+
### [1.5.3](https://github.com/yorickshan/html2canvas-pro/compare/v1.5.2...v1.5.3) (2024-07-04)
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
### Fixes
|
|
6
6
|
|
|
7
|
+
* added fix for Firefox issue ([c807c3f](https://github.com/yorickshan/html2canvas-pro/commit/c807c3fed1360a752c8ee5659992b52fcfb02613))
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
|
|
10
|
+
### Chore
|
|
11
|
+
|
|
12
|
+
* add commitlint ([75c196f](https://github.com/yorickshan/html2canvas-pro/commit/75c196fa884b635d5207824fb52d38f225f39646))
|
|
13
|
+
* npm publish ([107672d](https://github.com/yorickshan/html2canvas-pro/commit/107672d74dda264a39b8989142ec99dbacdeb13d))
|
|
14
|
+
|
|
15
|
+
### [1.5.2](https://github.com/yorickshan/html2canvas-pro/compare/v1.5.1...v1.5.2) (2024-07-03)
|
|
16
|
+
|
|
17
|
+
### 1.5.1 (2024-07-01)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Fixes
|
|
9
21
|
|
|
10
22
|
* operation is insecure on safari ([71f7c28](https://github.com/yorickshan/html2canvas-pro/commit/71f7c283dfe5a8cd64b39343bc7cec85e3932200))
|
|
11
23
|
|
|
@@ -17,13 +29,7 @@
|
|
|
17
29
|
* complete work on relative from colors in the color() function ([ac6e331](https://github.com/yorickshan/html2canvas-pro/commit/ac6e33118be76734ff9b1f5cd92e147babd46548))
|
|
18
30
|
* work on relative color support ([88e6aba](https://github.com/yorickshan/html2canvas-pro/commit/88e6abaa47b9c59e49a7bc3c0008849cc365f787))
|
|
19
31
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
# Changelog
|
|
23
|
-
|
|
24
|
-
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
25
|
-
|
|
26
|
-
## 1.5.0 (2024-05-27)
|
|
32
|
+
### 1.5.0 (2024-05-27)
|
|
27
33
|
|
|
28
34
|
|
|
29
35
|
### Features
|
|
@@ -34,6 +40,6 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
34
40
|
* work on relative color support ([88e6aba](https://github.com/yorickshan/html2canvas-pro/commit/88e6abaa47b9c59e49a7bc3c0008849cc365f787))
|
|
35
41
|
|
|
36
42
|
|
|
37
|
-
###
|
|
43
|
+
### Fixes
|
|
38
44
|
|
|
39
45
|
* color function display-p3 conversion ([b9fd943](https://github.com/yorickshan/html2canvas-pro/commit/b9fd943332a5627a9cd86c62bd6029d461356c14))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* html2canvas-pro 1.5.
|
|
2
|
+
* html2canvas-pro 1.5.3 <undefined>
|
|
3
3
|
* Copyright (c) 2024 yorickshan <https://github.com/yorickshan>
|
|
4
4
|
* Released under MIT License
|
|
5
5
|
*/
|
|
@@ -8087,7 +8087,7 @@ var CanvasRenderer = /** @class */ (function (_super) {
|
|
|
8087
8087
|
case 0:
|
|
8088
8088
|
index = container.styles.backgroundImage.length - 1;
|
|
8089
8089
|
_loop_1 = function (backgroundImage) {
|
|
8090
|
-
var image, url, _c, path, x, y, width, height, pattern, _d, path, x, y, width, height, _e, lineLength, x0, x1, y0, y1, canvas, ctx, gradient_1, pattern, _f, path, left, top_1, width, height, position, x, y, _g, rx, ry, radialGradient_1, midX, midY, f, invF;
|
|
8090
|
+
var image, url, imageWidth, imageHeight, _c, path, x, y, width, height, pattern, _d, path, x, y, width, height, _e, lineLength, x0, x1, y0, y1, canvas, ctx, gradient_1, pattern, _f, path, left, top_1, width, height, position, x, y, _g, rx, ry, radialGradient_1, midX, midY, f, invF;
|
|
8091
8091
|
return __generator(this, function (_h) {
|
|
8092
8092
|
switch (_h.label) {
|
|
8093
8093
|
case 0:
|
|
@@ -8107,10 +8107,12 @@ var CanvasRenderer = /** @class */ (function (_super) {
|
|
|
8107
8107
|
return [3 /*break*/, 4];
|
|
8108
8108
|
case 4:
|
|
8109
8109
|
if (image) {
|
|
8110
|
+
imageWidth = isNaN(image.width) || image.width === 0 ? 1 : image.width;
|
|
8111
|
+
imageHeight = isNaN(image.height) || image.height === 0 ? 1 : image.height;
|
|
8110
8112
|
_c = calculateBackgroundRendering(container, index, [
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8113
|
+
imageWidth,
|
|
8114
|
+
imageHeight,
|
|
8115
|
+
imageWidth / imageHeight
|
|
8114
8116
|
]), path = _c[0], x = _c[1], y = _c[2], width = _c[3], height = _c[4];
|
|
8115
8117
|
pattern = this_1.ctx.createPattern(this_1.resizeImage(image, width, height), 'repeat');
|
|
8116
8118
|
this_1.renderRepeat(path, pattern, x, y);
|