html2canvas-pro 2.2.2 → 2.2.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/dist/html2canvas-pro.esm.js +5 -2
- package/dist/html2canvas-pro.esm.js.map +1 -1
- package/dist/html2canvas-pro.js +5 -2
- package/dist/html2canvas-pro.js.map +1 -1
- package/dist/html2canvas-pro.min.js +2 -2
- package/dist/lib/css/index.js +9 -4
- package/dist/lib/css/property-descriptors/background-image.js +1 -0
- package/dist/lib/css/property-descriptors/border-image-source.js +1 -0
- package/dist/lib/css/property-descriptors/list-style-image.js +1 -0
- package/dist/types/css/property-descriptor.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* html2canvas-pro 2.2.
|
|
2
|
+
* html2canvas-pro 2.2.3 <https://yorickshan.github.io/html2canvas-pro/>
|
|
3
3
|
* Copyright (c) 2024-present yorickshan and html2canvas-pro contributors
|
|
4
4
|
* Released under MIT License
|
|
5
5
|
*/
|
|
@@ -3896,6 +3896,7 @@ const backgroundImage = {
|
|
|
3896
3896
|
initialValue: "none",
|
|
3897
3897
|
type: 1,
|
|
3898
3898
|
prefix: false,
|
|
3899
|
+
skipCache: true,
|
|
3899
3900
|
parse: (context, tokens) => {
|
|
3900
3901
|
if (tokens.length === 0) return [];
|
|
3901
3902
|
const first = tokens[0];
|
|
@@ -4338,6 +4339,7 @@ const listStyleImage = {
|
|
|
4338
4339
|
initialValue: "none",
|
|
4339
4340
|
type: 0,
|
|
4340
4341
|
prefix: false,
|
|
4342
|
+
skipCache: true,
|
|
4341
4343
|
parse: (context, token) => {
|
|
4342
4344
|
if (token.type === 20 && token.value === "none") return null;
|
|
4343
4345
|
return image.parse(context, token);
|
|
@@ -5358,6 +5360,7 @@ const borderImageSource = {
|
|
|
5358
5360
|
initialValue: "none",
|
|
5359
5361
|
prefix: false,
|
|
5360
5362
|
type: 1,
|
|
5363
|
+
skipCache: true,
|
|
5361
5364
|
parse: (context, tokens) => {
|
|
5362
5365
|
if (tokens.length === 0) return null;
|
|
5363
5366
|
const filtered = tokens.filter((t) => nonFunctionArgSeparator(t) && isSupportedImage(t));
|
|
@@ -6294,7 +6297,7 @@ const parse = (context, descriptor, style) => {
|
|
|
6294
6297
|
valueCache = /* @__PURE__ */ new Map();
|
|
6295
6298
|
parseCache.set(descriptor, valueCache);
|
|
6296
6299
|
}
|
|
6297
|
-
if (!(descriptor.type === 3 && descriptor.format === "image")) {
|
|
6300
|
+
if (!(descriptor.skipCache || descriptor.type === 3 && descriptor.format === "image")) {
|
|
6298
6301
|
if (valueCache.size >= 200) {
|
|
6299
6302
|
const oldestKey = valueCache.keys().next().value;
|
|
6300
6303
|
valueCache.delete(oldestKey);
|