html2canvas-pro 1.5.5 → 1.5.6
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 +27 -11
- package/dist/html2canvas-pro.esm.js +3 -3
- package/dist/html2canvas-pro.esm.js.map +1 -1
- package/dist/html2canvas-pro.js +4 -4
- package/dist/html2canvas-pro.js.map +1 -1
- package/dist/html2canvas-pro.min.js +2 -2
- package/dist/lib/css/types/color.js +1 -1
- package/dist/lib/css/types/color.js.map +1 -1
- package/package.json +18 -20
package/README.md
CHANGED
|
@@ -1,19 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/yorickshan/html2canvas-pro/main/docs/public/logo.png" height="150">
|
|
3
|
+
</p>
|
|
4
|
+
<h1 align="center">
|
|
5
|
+
html2canvas-pro
|
|
6
|
+
</h1>
|
|
7
|
+
<p align="center">
|
|
8
|
+
Next generation JavaScript screenshots tool.
|
|
9
|
+
<p>
|
|
10
|
+
<p align="center">
|
|
11
|
+
<a href="https://github.com/yorickshan/html2canvas-pro/actions/workflows/ci.yml"><img src="https://github.com/yorickshan/html2canvas-pro/actions/workflows/ci.yml/badge.svg?branch=main" alt="build status"></a>
|
|
12
|
+
<a href=https://npm.im/html2canvas-pro><img src="https://badgen.net/npm/v/html2canvas-pro" alt="npm version"></a>
|
|
13
|
+
<a href=http://npm.im/html2canvas-pro><img src="https://badgen.net/npm/dm/html2canvas-pro" alt="npm downloads"></a>
|
|
14
|
+
<p>
|
|
15
|
+
<p align="center">
|
|
16
|
+
<a href="https://yorickshan.github.io/html2canvas-pro/">Documentation</a> | <a href="https://yorickshan.github.io/html2canvas-pro/getting-started.html">Getting Started</a>
|
|
17
|
+
</p>
|
|
18
|
+
<br>
|
|
19
|
+
|
|
20
|
+
## Why html2canvas-pro?
|
|
21
|
+
|
|
22
|
+
html2canvas-pro is a fork of [niklasvh/html2canvas](https://github.com/niklasvh/html2canvas) that includes various fixes and new features. It offers several advantages over the original html2canvas, such as:
|
|
10
23
|
- support color function ```color()``` (including relative colors)
|
|
11
24
|
- support color function ```lab()```
|
|
12
25
|
- support color function ```lch()```
|
|
13
26
|
- support color function ```oklab()```
|
|
14
27
|
- support color function ```oklch()```
|
|
15
28
|
- Support object-fit of ```<img/>```
|
|
16
|
-
- Fixed some
|
|
29
|
+
- Fixed some [issues](./CHANGELOG.md)
|
|
30
|
+
|
|
31
|
+
If you found this helpful, don't forget to
|
|
32
|
+
leave a star 🌟.
|
|
17
33
|
|
|
18
34
|
## Installation
|
|
19
35
|
|
|
@@ -27,7 +43,7 @@ pnpm / yarn add html2canvas-pro
|
|
|
27
43
|
import html2canvas from 'html2canvas-pro';
|
|
28
44
|
```
|
|
29
45
|
|
|
30
|
-
To render an `element` with html2canvas with some (optional) [options](/docs/configuration.md), simply call `html2canvas(element, options);`
|
|
46
|
+
To render an `element` with html2canvas-pro with some (optional) [options](/docs/configuration.md), simply call `html2canvas(element, options);`
|
|
31
47
|
|
|
32
48
|
```javascript
|
|
33
49
|
html2canvas(document.body).then(function(canvas) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
2
|
+
* undefined 1.5.6 <https://yorickshan.github.io/html2canvas-pro/>
|
|
3
3
|
* Copyright (c) 2024 yorickshan <https://github.com/yorickshan>
|
|
4
4
|
* Released under MIT License
|
|
5
5
|
*/
|
|
@@ -2554,7 +2554,7 @@ var _color = function (context, args) {
|
|
|
2554
2554
|
.replace(/r|x/, color[0].toString())
|
|
2555
2555
|
.replace(/g|y/, color[1].toString())
|
|
2556
2556
|
.replace(/b|z/, color[2].toString());
|
|
2557
|
-
return
|
|
2557
|
+
return new Function('return ' + expression)();
|
|
2558
2558
|
}
|
|
2559
2559
|
}
|
|
2560
2560
|
return null;
|
|
@@ -8759,5 +8759,5 @@ var parseBackgroundColor = function (context, element, backgroundColorOverride)
|
|
|
8759
8759
|
: defaultBackgroundColor;
|
|
8760
8760
|
};
|
|
8761
8761
|
|
|
8762
|
-
export default
|
|
8762
|
+
export { html2canvas as default };
|
|
8763
8763
|
//# sourceMappingURL=html2canvas-pro.esm.js.map
|