add html2canvas
This commit is contained in:
parent
ccf753f0cc
commit
7b3f873395
465 changed files with 34652 additions and 2 deletions
8
node_modules/.yarn-integrity
generated
vendored
8
node_modules/.yarn-integrity
generated
vendored
|
@ -8,7 +8,8 @@
|
||||||
"topLevelPatterns": [
|
"topLevelPatterns": [
|
||||||
"@fontsource/atkinson-hyperlegible@^4.5.9",
|
"@fontsource/atkinson-hyperlegible@^4.5.9",
|
||||||
"@fontsource/raleway@^4.5.10",
|
"@fontsource/raleway@^4.5.10",
|
||||||
"fomantic-ui@2.9.0"
|
"fomantic-ui@2.9.0",
|
||||||
|
"html2canvas@^1.4.1"
|
||||||
],
|
],
|
||||||
"lockfileEntries": {
|
"lockfileEntries": {
|
||||||
"@actions/core@^1.6.0": "https://registry.yarnpkg.com/@actions/core/-/core-1.10.0.tgz#44551c3c71163949a2f06e94d9ca2157a0cfac4f",
|
"@actions/core@^1.6.0": "https://registry.yarnpkg.com/@actions/core/-/core-1.10.0.tgz#44551c3c71163949a2f06e94d9ca2157a0cfac4f",
|
||||||
|
@ -94,6 +95,7 @@
|
||||||
"autoprefixer@^9.5.1": "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.8.tgz#fd4bd4595385fa6f06599de749a4d5f7a474957a",
|
"autoprefixer@^9.5.1": "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.8.tgz#fd4bd4595385fa6f06599de749a4d5f7a474957a",
|
||||||
"bach@^1.0.0": "https://registry.yarnpkg.com/bach/-/bach-1.2.0.tgz#4b3ce96bf27134f79a1b414a51c14e34c3bd9880",
|
"bach@^1.0.0": "https://registry.yarnpkg.com/bach/-/bach-1.2.0.tgz#4b3ce96bf27134f79a1b414a51c14e34c3bd9880",
|
||||||
"balanced-match@^1.0.0": "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee",
|
"balanced-match@^1.0.0": "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee",
|
||||||
|
"base64-arraybuffer@^1.0.2": "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz#1c37589a7c4b0746e34bd1feb951da2df01c1bdc",
|
||||||
"base64-js@^1.3.1": "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a",
|
"base64-js@^1.3.1": "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a",
|
||||||
"base@^0.11.1": "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f",
|
"base@^0.11.1": "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f",
|
||||||
"beeper@^1.0.0": "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809",
|
"beeper@^1.0.0": "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809",
|
||||||
|
@ -164,6 +166,7 @@
|
||||||
"copy-props@^2.0.1": "https://registry.yarnpkg.com/copy-props/-/copy-props-2.0.5.tgz#03cf9ae328d4ebb36f8f1d804448a6af9ee3f2d2",
|
"copy-props@^2.0.1": "https://registry.yarnpkg.com/copy-props/-/copy-props-2.0.5.tgz#03cf9ae328d4ebb36f8f1d804448a6af9ee3f2d2",
|
||||||
"core-util-is@~1.0.0": "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85",
|
"core-util-is@~1.0.0": "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85",
|
||||||
"cross-spawn@^6.0.0": "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4",
|
"cross-spawn@^6.0.0": "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4",
|
||||||
|
"css-line-break@^2.1.0": "https://registry.yarnpkg.com/css-line-break/-/css-line-break-2.1.0.tgz#bfef660dfa6f5397ea54116bb3cb4873edbc4fa0",
|
||||||
"css@^2.0.0": "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929",
|
"css@^2.0.0": "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929",
|
||||||
"d@1": "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a",
|
"d@1": "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a",
|
||||||
"d@^1.0.1": "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a",
|
"d@^1.0.1": "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a",
|
||||||
|
@ -319,6 +322,7 @@
|
||||||
"has@^1.0.3": "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796",
|
"has@^1.0.3": "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796",
|
||||||
"homedir-polyfill@^1.0.1": "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8",
|
"homedir-polyfill@^1.0.1": "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8",
|
||||||
"hosted-git-info@^2.1.4": "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9",
|
"hosted-git-info@^2.1.4": "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9",
|
||||||
|
"html2canvas@^1.4.1": "https://registry.yarnpkg.com/html2canvas/-/html2canvas-1.4.1.tgz#7cef1888311b5011d507794a066041b14669a543",
|
||||||
"iconv-lite@^0.4.24": "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b",
|
"iconv-lite@^0.4.24": "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b",
|
||||||
"iconv-lite@^0.6.3": "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501",
|
"iconv-lite@^0.6.3": "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501",
|
||||||
"ieee754@^1.1.13": "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352",
|
"ieee754@^1.1.13": "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352",
|
||||||
|
@ -694,6 +698,7 @@
|
||||||
"supports-preserve-symlinks-flag@^1.0.0": "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09",
|
"supports-preserve-symlinks-flag@^1.0.0": "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09",
|
||||||
"sver-compat@^1.5.0": "https://registry.yarnpkg.com/sver-compat/-/sver-compat-1.5.0.tgz#3cf87dfeb4d07b4a3f14827bc186b3fd0c645cd8",
|
"sver-compat@^1.5.0": "https://registry.yarnpkg.com/sver-compat/-/sver-compat-1.5.0.tgz#3cf87dfeb4d07b4a3f14827bc186b3fd0c645cd8",
|
||||||
"ternary-stream@^2.0.1": "https://registry.yarnpkg.com/ternary-stream/-/ternary-stream-2.1.1.tgz#4ad64b98668d796a085af2c493885a435a8a8bfc",
|
"ternary-stream@^2.0.1": "https://registry.yarnpkg.com/ternary-stream/-/ternary-stream-2.1.1.tgz#4ad64b98668d796a085af2c493885a435a8a8bfc",
|
||||||
|
"text-segmentation@^1.0.3": "https://registry.yarnpkg.com/text-segmentation/-/text-segmentation-1.0.3.tgz#52a388159efffe746b24a63ba311b6ac9f2d7943",
|
||||||
"textextensions@^3.2.0": "https://registry.yarnpkg.com/textextensions/-/textextensions-3.3.0.tgz#03530d5287b86773c08b77458589148870cc71d3",
|
"textextensions@^3.2.0": "https://registry.yarnpkg.com/textextensions/-/textextensions-3.3.0.tgz#03530d5287b86773c08b77458589148870cc71d3",
|
||||||
"through2-filter@^3.0.0": "https://registry.yarnpkg.com/through2-filter/-/through2-filter-3.0.0.tgz#700e786df2367c2c88cd8aa5be4cf9c1e7831254",
|
"through2-filter@^3.0.0": "https://registry.yarnpkg.com/through2-filter/-/through2-filter-3.0.0.tgz#700e786df2367c2c88cd8aa5be4cf9c1e7831254",
|
||||||
"through2@3.0.1": "https://registry.yarnpkg.com/through2/-/through2-3.0.1.tgz#39276e713c3302edf9e388dd9c812dd3b825bd5a",
|
"through2@3.0.1": "https://registry.yarnpkg.com/through2/-/through2-3.0.1.tgz#39276e713c3302edf9e388dd9c812dd3b825bd5a",
|
||||||
|
@ -742,6 +747,7 @@
|
||||||
"use@^3.1.0": "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f",
|
"use@^3.1.0": "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f",
|
||||||
"util-deprecate@^1.0.1": "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf",
|
"util-deprecate@^1.0.1": "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf",
|
||||||
"util-deprecate@~1.0.1": "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf",
|
"util-deprecate@~1.0.1": "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf",
|
||||||
|
"utrie@^1.0.2": "https://registry.yarnpkg.com/utrie/-/utrie-1.0.2.tgz#d42fe44de9bc0119c25de7f564a6ed1b2c87a645",
|
||||||
"uuid@^8.3.2": "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2",
|
"uuid@^8.3.2": "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2",
|
||||||
"v8flags@^3.2.0": "https://registry.yarnpkg.com/v8flags/-/v8flags-3.2.0.tgz#b243e3b4dfd731fa774e7492128109a0fe66d656",
|
"v8flags@^3.2.0": "https://registry.yarnpkg.com/v8flags/-/v8flags-3.2.0.tgz#b243e3b4dfd731fa774e7492128109a0fe66d656",
|
||||||
"validate-npm-package-license@^3.0.1": "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a",
|
"validate-npm-package-license@^3.0.1": "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a",
|
||||||
|
|
28
node_modules/base64-arraybuffer/CHANGELOG.md
generated
vendored
Normal file
28
node_modules/base64-arraybuffer/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
# Changelog
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
## [1.0.2](https://github.com/niklasvh/base64-arraybuffer/compare/v1.0.1...v1.0.2) (2022-01-22)
|
||||||
|
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* source maps (#33) ([bd5a8ef](https://github.com/niklasvh/base64-arraybuffer/commit/bd5a8eff3a44ea07f9b68533c477076124220ddd)), closes [#33](https://github.com/niklasvh/base64-arraybuffer/issues/33)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.0.1](https://github.com/niklasvh/base64-arraybuffer/compare/v1.0.0...v1.0.1) (2021-08-10)
|
||||||
|
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* make lib loadable on ie9 (#30) ([a618d14](https://github.com/niklasvh/base64-arraybuffer/commit/a618d14d323f4eb230321a3609bfbc9f23f430c0)), closes [#30](https://github.com/niklasvh/base64-arraybuffer/issues/30)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [1.0.0](https://github.com/niklasvh/base64-arraybuffer/compare/v0.2.0...v1.0.0) (2021-08-10)
|
||||||
|
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* update readme (#29) ([0a0253d](https://github.com/niklasvh/base64-arraybuffer/commit/0a0253dcc2e3f01a1f6d04fa81d578f714fce27f)), closes [#29](https://github.com/niklasvh/base64-arraybuffer/issues/29)
|
22
node_modules/base64-arraybuffer/LICENSE
generated
vendored
Normal file
22
node_modules/base64-arraybuffer/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
Copyright (c) 2012 Niklas von Hertzen
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person
|
||||||
|
obtaining a copy of this software and associated documentation
|
||||||
|
files (the "Software"), to deal in the Software without
|
||||||
|
restriction, including without limitation the rights to use,
|
||||||
|
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the
|
||||||
|
Software is furnished to do so, subject to the following
|
||||||
|
conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
27
node_modules/base64-arraybuffer/README.md
generated
vendored
Normal file
27
node_modules/base64-arraybuffer/README.md
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# base64-arraybuffer
|
||||||
|
|
||||||
|
![CI](https://github.com/niklasvh/base64-arraybuffer/workflows/CI/badge.svg?branch=master)
|
||||||
|
[![NPM Downloads](https://img.shields.io/npm/dm/base64-arraybuffer.svg)](https://www.npmjs.org/package/base64-arraybuffer)
|
||||||
|
[![NPM Version](https://img.shields.io/npm/v/base64-arraybuffer.svg)](https://www.npmjs.org/package/base64-arraybuffer)
|
||||||
|
|
||||||
|
Encode/decode base64 data into ArrayBuffers
|
||||||
|
|
||||||
|
### Installing
|
||||||
|
You can install the module via npm:
|
||||||
|
|
||||||
|
npm install base64-arraybuffer
|
||||||
|
|
||||||
|
## API
|
||||||
|
The library encodes and decodes base64 to and from ArrayBuffers
|
||||||
|
|
||||||
|
- __encode(buffer)__ - Encodes `ArrayBuffer` into base64 string
|
||||||
|
- __decode(str)__ - Decodes base64 string to `ArrayBuffer`
|
||||||
|
|
||||||
|
### Testing
|
||||||
|
You can run the test suite with:
|
||||||
|
|
||||||
|
npm test
|
||||||
|
|
||||||
|
## License
|
||||||
|
Copyright (c) 2012 Niklas von Hertzen
|
||||||
|
Licensed under the MIT license.
|
50
node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js
generated
vendored
Normal file
50
node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js
generated
vendored
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
/*
|
||||||
|
* base64-arraybuffer 1.0.2 <https://github.com/niklasvh/base64-arraybuffer>
|
||||||
|
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
||||||
|
* Released under MIT License
|
||||||
|
*/
|
||||||
|
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
||||||
|
// Use a lookup table to find the index.
|
||||||
|
var lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);
|
||||||
|
for (var i = 0; i < chars.length; i++) {
|
||||||
|
lookup[chars.charCodeAt(i)] = i;
|
||||||
|
}
|
||||||
|
var encode = function (arraybuffer) {
|
||||||
|
var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';
|
||||||
|
for (i = 0; i < len; i += 3) {
|
||||||
|
base64 += chars[bytes[i] >> 2];
|
||||||
|
base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];
|
||||||
|
base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];
|
||||||
|
base64 += chars[bytes[i + 2] & 63];
|
||||||
|
}
|
||||||
|
if (len % 3 === 2) {
|
||||||
|
base64 = base64.substring(0, base64.length - 1) + '=';
|
||||||
|
}
|
||||||
|
else if (len % 3 === 1) {
|
||||||
|
base64 = base64.substring(0, base64.length - 2) + '==';
|
||||||
|
}
|
||||||
|
return base64;
|
||||||
|
};
|
||||||
|
var decode = function (base64) {
|
||||||
|
var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;
|
||||||
|
if (base64[base64.length - 1] === '=') {
|
||||||
|
bufferLength--;
|
||||||
|
if (base64[base64.length - 2] === '=') {
|
||||||
|
bufferLength--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);
|
||||||
|
for (i = 0; i < len; i += 4) {
|
||||||
|
encoded1 = lookup[base64.charCodeAt(i)];
|
||||||
|
encoded2 = lookup[base64.charCodeAt(i + 1)];
|
||||||
|
encoded3 = lookup[base64.charCodeAt(i + 2)];
|
||||||
|
encoded4 = lookup[base64.charCodeAt(i + 3)];
|
||||||
|
bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);
|
||||||
|
bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);
|
||||||
|
bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);
|
||||||
|
}
|
||||||
|
return arraybuffer;
|
||||||
|
};
|
||||||
|
|
||||||
|
export { decode, encode };
|
||||||
|
//# sourceMappingURL=base64-arraybuffer.es5.js.map
|
1
node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js.map
generated
vendored
Normal file
1
node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"base64-arraybuffer.es5.js","sources":["../../src/index.ts"],"sourcesContent":["const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n// Use a lookup table to find the index.\nconst lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\n\nexport const encode = (arraybuffer: ArrayBuffer): string => {\n let bytes = new Uint8Array(arraybuffer),\n i,\n len = bytes.length,\n base64 = '';\n\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n\n return base64;\n};\n\nexport const decode = (base64: string): ArrayBuffer => {\n let bufferLength = base64.length * 0.75,\n len = base64.length,\n i,\n p = 0,\n encoded1,\n encoded2,\n encoded3,\n encoded4;\n\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n const arraybuffer = new ArrayBuffer(bufferLength),\n bytes = new Uint8Array(arraybuffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n\n return arraybuffer;\n};\n"],"names":[],"mappings":";;;;;AAAA,IAAM,KAAK,GAAG,kEAAkE,CAAC;AAEjF;AACA,IAAM,MAAM,GAAG,OAAO,UAAU,KAAK,WAAW,GAAG,EAAE,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;AAC5E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,E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AC,GAAG,CAAC,CAAC,QAAQ,GAAG,CAAC,KAAK,CAAC,KAAK,QAAQ,GAAG,EAAE,CAAC,CAAC;KACxD;IAED,OAAO,WAAW,CAAC;AACvB;;;;"}
|
61
node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js
generated
vendored
Normal file
61
node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js
generated
vendored
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
/*
|
||||||
|
* base64-arraybuffer 1.0.2 <https://github.com/niklasvh/base64-arraybuffer>
|
||||||
|
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
||||||
|
* Released under MIT License
|
||||||
|
*/
|
||||||
|
(function (global, factory) {
|
||||||
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||||
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||||
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['base64-arraybuffer'] = {}));
|
||||||
|
}(this, (function (exports) { 'use strict';
|
||||||
|
|
||||||
|
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
||||||
|
// Use a lookup table to find the index.
|
||||||
|
var lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);
|
||||||
|
for (var i = 0; i < chars.length; i++) {
|
||||||
|
lookup[chars.charCodeAt(i)] = i;
|
||||||
|
}
|
||||||
|
var encode = function (arraybuffer) {
|
||||||
|
var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';
|
||||||
|
for (i = 0; i < len; i += 3) {
|
||||||
|
base64 += chars[bytes[i] >> 2];
|
||||||
|
base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];
|
||||||
|
base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];
|
||||||
|
base64 += chars[bytes[i + 2] & 63];
|
||||||
|
}
|
||||||
|
if (len % 3 === 2) {
|
||||||
|
base64 = base64.substring(0, base64.length - 1) + '=';
|
||||||
|
}
|
||||||
|
else if (len % 3 === 1) {
|
||||||
|
base64 = base64.substring(0, base64.length - 2) + '==';
|
||||||
|
}
|
||||||
|
return base64;
|
||||||
|
};
|
||||||
|
var decode = function (base64) {
|
||||||
|
var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;
|
||||||
|
if (base64[base64.length - 1] === '=') {
|
||||||
|
bufferLength--;
|
||||||
|
if (base64[base64.length - 2] === '=') {
|
||||||
|
bufferLength--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);
|
||||||
|
for (i = 0; i < len; i += 4) {
|
||||||
|
encoded1 = lookup[base64.charCodeAt(i)];
|
||||||
|
encoded2 = lookup[base64.charCodeAt(i + 1)];
|
||||||
|
encoded3 = lookup[base64.charCodeAt(i + 2)];
|
||||||
|
encoded4 = lookup[base64.charCodeAt(i + 3)];
|
||||||
|
bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);
|
||||||
|
bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);
|
||||||
|
bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);
|
||||||
|
}
|
||||||
|
return arraybuffer;
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.decode = decode;
|
||||||
|
exports.encode = encode;
|
||||||
|
|
||||||
|
Object.defineProperty(exports, '__esModule', { value: true });
|
||||||
|
|
||||||
|
})));
|
||||||
|
//# sourceMappingURL=base64-arraybuffer.umd.js.map
|
1
node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js.map
generated
vendored
Normal file
1
node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"base64-arraybuffer.umd.js","sources":["../../src/index.ts"],"sourcesContent":["const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n// Use a lookup table to find the index.\nconst lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\n\nexport const encode = (arraybuffer: ArrayBuffer): string => {\n let bytes = new Uint8Array(arraybuffer),\n i,\n len = bytes.length,\n base64 = '';\n\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n\n return base64;\n};\n\nexport const decode = (base64: string): ArrayBuffer => {\n let bufferLength = base64.length * 0.75,\n len = base64.length,\n i,\n p = 0,\n encoded1,\n encoded2,\n encoded3,\n encoded4;\n\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n const arraybuffer = new ArrayBuffer(bufferLength),\n bytes = new Uint8Array(arraybuffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n\n return arraybuffer;\n};\n"],"names":[],"mappings":";;;;;;;;;;;IAAA,IAAM,KAAK,GAAG,kEAAkE,CAAC;IAEjF;IACA,IAAM,MAAM,GAAG,OAAO,UAAU,KAAK,WAAW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EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,GAAG,EAAE,KAAK,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,CAAC;YACtD,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,GAAG,CAAC,KAAK,CAAC,KAAK,QAAQ,GAAG,EAAE,CAAC,CAAC;SACxD;QAED,OAAO,WAAW,CAAC;IACvB;;;;;;;;;;;"}
|
48
node_modules/base64-arraybuffer/dist/lib/index.js
generated
vendored
Normal file
48
node_modules/base64-arraybuffer/dist/lib/index.js
generated
vendored
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.decode = exports.encode = void 0;
|
||||||
|
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
||||||
|
// Use a lookup table to find the index.
|
||||||
|
var lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);
|
||||||
|
for (var i = 0; i < chars.length; i++) {
|
||||||
|
lookup[chars.charCodeAt(i)] = i;
|
||||||
|
}
|
||||||
|
var encode = function (arraybuffer) {
|
||||||
|
var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';
|
||||||
|
for (i = 0; i < len; i += 3) {
|
||||||
|
base64 += chars[bytes[i] >> 2];
|
||||||
|
base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];
|
||||||
|
base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];
|
||||||
|
base64 += chars[bytes[i + 2] & 63];
|
||||||
|
}
|
||||||
|
if (len % 3 === 2) {
|
||||||
|
base64 = base64.substring(0, base64.length - 1) + '=';
|
||||||
|
}
|
||||||
|
else if (len % 3 === 1) {
|
||||||
|
base64 = base64.substring(0, base64.length - 2) + '==';
|
||||||
|
}
|
||||||
|
return base64;
|
||||||
|
};
|
||||||
|
exports.encode = encode;
|
||||||
|
var decode = function (base64) {
|
||||||
|
var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;
|
||||||
|
if (base64[base64.length - 1] === '=') {
|
||||||
|
bufferLength--;
|
||||||
|
if (base64[base64.length - 2] === '=') {
|
||||||
|
bufferLength--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);
|
||||||
|
for (i = 0; i < len; i += 4) {
|
||||||
|
encoded1 = lookup[base64.charCodeAt(i)];
|
||||||
|
encoded2 = lookup[base64.charCodeAt(i + 1)];
|
||||||
|
encoded3 = lookup[base64.charCodeAt(i + 2)];
|
||||||
|
encoded4 = lookup[base64.charCodeAt(i + 3)];
|
||||||
|
bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);
|
||||||
|
bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);
|
||||||
|
bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);
|
||||||
|
}
|
||||||
|
return arraybuffer;
|
||||||
|
};
|
||||||
|
exports.decode = decode;
|
||||||
|
//# sourceMappingURL=index.js.map
|
1
node_modules/base64-arraybuffer/dist/lib/index.js.map
generated
vendored
Normal file
1
node_modules/base64-arraybuffer/dist/lib/index.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,IAAM,KAAK,GAAG,kEAAkE,CAAC;AAEjF,wCAAwC;AACxC,IAAM,MAAM,GAAG,OAAO,UAAU,KAAK,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;AAC5E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACnC,MAAM,CAAC,KAAK,CAAC,UAAU,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,CAAC,CAAC,CAAC;QACtD,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAC;KACxD;IAED,OAAO,WAAW,CAAC;AACvB,CAAC,CAAC;AAhCW,QAAA,MAAM,UAgCjB"}
|
2
node_modules/base64-arraybuffer/dist/types/index.d.ts
generated
vendored
Normal file
2
node_modules/base64-arraybuffer/dist/types/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
export declare const encode: (arraybuffer: ArrayBuffer) => string;
|
||||||
|
export declare const decode: (base64: string) => ArrayBuffer;
|
54
node_modules/base64-arraybuffer/package.json
generated
vendored
Normal file
54
node_modules/base64-arraybuffer/package.json
generated
vendored
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
{
|
||||||
|
"name": "base64-arraybuffer",
|
||||||
|
"description": "Encode/decode base64 data into ArrayBuffers",
|
||||||
|
"main": "dist/base64-arraybuffer.umd.js",
|
||||||
|
"module": "dist/base64-arraybuffer.es5.js",
|
||||||
|
"typings": "dist/types/index.d.ts",
|
||||||
|
"version": "1.0.2",
|
||||||
|
"homepage": "https://github.com/niklasvh/base64-arraybuffer",
|
||||||
|
"author": {
|
||||||
|
"name": "Niklas von Hertzen",
|
||||||
|
"email": "niklasvh@gmail.com",
|
||||||
|
"url": "https://hertzen.com"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/niklasvh/base64-arraybuffer"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/niklasvh/base64-arraybuffer/issues"
|
||||||
|
},
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6.0"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"prebuild": "rimraf dist/",
|
||||||
|
"build": "tsc --module commonjs && rollup -c rollup.config.ts",
|
||||||
|
"format": "prettier --write \"{src,test}/**/*.ts\"",
|
||||||
|
"lint": "tslint -c tslint.json --project tsconfig.json -t codeFrame src/**/*.ts test/**/*.ts",
|
||||||
|
"mocha": "mocha --require ts-node/register test/*.ts",
|
||||||
|
"test": "npm run lint && npm run mocha",
|
||||||
|
"release": "standard-version"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@rollup/plugin-commonjs": "^19.0.0",
|
||||||
|
"@rollup/plugin-node-resolve": "^13.0.0",
|
||||||
|
"@rollup/plugin-typescript": "^8.2.1",
|
||||||
|
"@types/mocha": "^8.2.2",
|
||||||
|
"@types/node": "^16.0.0",
|
||||||
|
"mocha": "9.0.2",
|
||||||
|
"prettier": "^2.3.2",
|
||||||
|
"rimraf": "3.0.2",
|
||||||
|
"rollup": "^2.52.7",
|
||||||
|
"rollup-plugin-json": "^4.0.0",
|
||||||
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||||
|
"standard-version": "^9.3.0",
|
||||||
|
"ts-node": "^10.0.0",
|
||||||
|
"tslib": "^2.3.0",
|
||||||
|
"tslint": "^6.1.3",
|
||||||
|
"tslint-config-prettier": "^1.18.0",
|
||||||
|
"typescript": "^4.3.5"
|
||||||
|
},
|
||||||
|
"keywords": []
|
||||||
|
}
|
40
node_modules/base64-arraybuffer/rollup.config.ts
generated
vendored
Normal file
40
node_modules/base64-arraybuffer/rollup.config.ts
generated
vendored
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
import resolve from '@rollup/plugin-node-resolve';
|
||||||
|
import commonjs from '@rollup/plugin-commonjs';
|
||||||
|
import sourceMaps from 'rollup-plugin-sourcemaps';
|
||||||
|
import typescript from '@rollup/plugin-typescript';
|
||||||
|
import json from 'rollup-plugin-json';
|
||||||
|
|
||||||
|
const pkg = require('./package.json');
|
||||||
|
|
||||||
|
const banner = `/*
|
||||||
|
* ${pkg.name} ${pkg.version} <${pkg.homepage}>
|
||||||
|
* Copyright (c) ${(new Date()).getFullYear()} ${pkg.author.name} <${pkg.author.url}>
|
||||||
|
* Released under ${pkg.license} License
|
||||||
|
*/`;
|
||||||
|
|
||||||
|
export default {
|
||||||
|
input: `src/index.ts`,
|
||||||
|
output: [
|
||||||
|
{ file: pkg.main, name: pkg.name, format: 'umd', banner, sourcemap: true },
|
||||||
|
{ file: pkg.module, format: 'esm', banner, sourcemap: true },
|
||||||
|
],
|
||||||
|
external: [],
|
||||||
|
watch: {
|
||||||
|
include: 'src/**',
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
// Allow node_modules resolution, so you can use 'external' to control
|
||||||
|
// which external modules to include in the bundle
|
||||||
|
// https://github.com/rollup/rollup-plugin-node-resolve#usage
|
||||||
|
resolve(),
|
||||||
|
// Allow json resolution
|
||||||
|
json(),
|
||||||
|
// Compile TypeScript files
|
||||||
|
typescript({ sourceMap: true, inlineSources: true }),
|
||||||
|
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
|
||||||
|
commonjs(),
|
||||||
|
|
||||||
|
// Resolve source maps to the original source
|
||||||
|
sourceMaps(),
|
||||||
|
],
|
||||||
|
}
|
58
node_modules/css-line-break/CHANGELOG.md
generated
vendored
Normal file
58
node_modules/css-line-break/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
# Changelog
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
# [2.1.0](https://github.com/niklasvh/css-line-break/compare/v2.0.1...v2.1.0) (2022-01-22)
|
||||||
|
|
||||||
|
|
||||||
|
### feat
|
||||||
|
|
||||||
|
* update to use utrie dep (#20) ([18adab4](https://github.com/niklasvh/css-line-break/commit/18adab4010b54bb73add4f23c3325b27c2c13d91)), closes [#20](https://github.com/niklasvh/css-line-break/issues/20)
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* source maps (#19) ([60cdede](https://github.com/niklasvh/css-line-break/commit/60cdedeaa025f685fc7002653f390233becce128)), closes [#19](https://github.com/niklasvh/css-line-break/issues/19)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.0.1](https://github.com/niklasvh/css-line-break/compare/v2.0.0...v2.0.1) (2021-08-04)
|
||||||
|
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* wordBreak break-word (#17) ([d615f1f](https://github.com/niklasvh/css-line-break/commit/d615f1f731c9074035d0dab843a17a64080ba7ba)), closes [#17](https://github.com/niklasvh/css-line-break/issues/17)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0](https://github.com/niklasvh/css-line-break/compare/v1.1.3-0...v2.0.0) (2021-08-02)
|
||||||
|
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* zwj emojis #2 (#16) ([a314ea3](https://github.com/niklasvh/css-line-break/commit/a314ea33768cde9dab4e673d3339d6b4f9c32196)), closes [#2](https://github.com/niklasvh/css-line-break/issues/2) [#16](https://github.com/niklasvh/css-line-break/issues/16)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.1.3-0](https://github.com/niklasvh/css-line-break/compare/v1.1.2-0...v1.1.3-0) (2021-07-15)
|
||||||
|
|
||||||
|
|
||||||
|
### deps
|
||||||
|
|
||||||
|
* update deps (#14) ([330cb73](https://github.com/niklasvh/css-line-break/commit/330cb734f635d4d5e0d61ea991651d6d49b03054)), closes [#14](https://github.com/niklasvh/css-line-break/issues/14)
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* fix readme (#13) ([1f4a330](https://github.com/niklasvh/css-line-break/commit/1f4a3300752c8bbf5a0138c7924b231161f1e4ac)), closes [#13](https://github.com/niklasvh/css-line-break/issues/13) [#10](https://github.com/niklasvh/css-line-break/issues/10)
|
||||||
|
|
||||||
|
### feat
|
||||||
|
|
||||||
|
* implement line-break.txt v13 (#15) ([bc95c80](https://github.com/niklasvh/css-line-break/commit/bc95c809e12613a9531b7985450c6bc96717e8de)), closes [#15](https://github.com/niklasvh/css-line-break/issues/15)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.1.2-0](https://github.com/niklasvh/css-line-break/compare/v1.1.1...v1.1.2-0) (2021-07-04)
|
||||||
|
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* update to use github actions (#12) ([7aed118](https://github.com/niklasvh/css-line-break/commit/7aed11880975b6faf6e46caed93b6d225babd943)), closes [#12](https://github.com/niklasvh/css-line-break/issues/12)
|
22
node_modules/css-line-break/LICENSE
generated
vendored
Normal file
22
node_modules/css-line-break/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
Copyright (c) 2017 Niklas von Hertzen
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person
|
||||||
|
obtaining a copy of this software and associated documentation
|
||||||
|
files (the "Software"), to deal in the Software without
|
||||||
|
restriction, including without limitation the rights to use,
|
||||||
|
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the
|
||||||
|
Software is furnished to do so, subject to the following
|
||||||
|
conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
66
node_modules/css-line-break/README.md
generated
vendored
Normal file
66
node_modules/css-line-break/README.md
generated
vendored
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
css-line-break
|
||||||
|
==============
|
||||||
|
|
||||||
|
![CI](https://github.com/niklasvh/css-line-break/workflows/CI/badge.svg?branch=master)
|
||||||
|
[![NPM Downloads](https://img.shields.io/npm/dm/css-line-break.svg)](https://www.npmjs.org/package/css-line-break)
|
||||||
|
[![NPM Version](https://img.shields.io/npm/v/css-line-break.svg)](https://www.npmjs.org/package/css-line-break)
|
||||||
|
|
||||||
|
A JavaScript library for Line Breaking and identifying Word Boundaries,
|
||||||
|
[implementing the Unicode Line Breaking Algorithm (UAX #14)](http://unicode.org/reports/tr14/)
|
||||||
|
|
||||||
|
>> Line breaking, also known as word wrapping, is the process of breaking a section of text into
|
||||||
|
lines such that it will fit in the available width of a page, window or other display area.
|
||||||
|
The Unicode Line Breaking Algorithm performs part of this process. Given an input text,
|
||||||
|
it produces a set of positions called "break opportunities" that are appropriate points to
|
||||||
|
begin a new line. The selection of actual line break positions from the set of break opportunities
|
||||||
|
is not covered by the Unicode Line Breaking Algorithm, but is in the domain of higher level
|
||||||
|
software with knowledge of the available width and the display size of the text.
|
||||||
|
|
||||||
|
In addition, the module implements CSS specific tailoring options to line breaking as
|
||||||
|
defined in [CSS Text Module Level 3](https://www.w3.org/TR/css-text-3/#line-breaking).
|
||||||
|
|
||||||
|
### Installing
|
||||||
|
You can install the module via npm:
|
||||||
|
|
||||||
|
npm install css-line-break
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
The `LineBreaker` creates an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators) that returns `Break`s for a given text.
|
||||||
|
|
||||||
|
LineBreaker(text, [options]);
|
||||||
|
|
||||||
|
### Example
|
||||||
|
[JSFiddle](https://jsfiddle.net/ofd3752k)
|
||||||
|
```javascript
|
||||||
|
import {LineBreaker} from 'css-line-break';
|
||||||
|
|
||||||
|
const breaker = LineBreaker('Lorem ipsum lol.', {
|
||||||
|
lineBreak: 'strict',
|
||||||
|
wordBreak: 'normal'
|
||||||
|
});
|
||||||
|
|
||||||
|
const words = [];
|
||||||
|
let bk;
|
||||||
|
|
||||||
|
while (!(bk = breaker.next()).done) {
|
||||||
|
words.push(bk.value.slice());
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.deepEqual(words, ['Lorem ', 'ipsum ', 'lol.']);
|
||||||
|
```
|
||||||
|
### Options
|
||||||
|
The following parameters are available for the options:
|
||||||
|
|
||||||
|
- `lineBreak`: `normal` | `strict`
|
||||||
|
- `wordBreak`: `normal` | `break-all` | `break-word` | `keep-all`
|
||||||
|
|
||||||
|
For more information how they affect the line breaking algorithms,
|
||||||
|
check out [CSS Text Module Level 3](https://www.w3.org/TR/css-text-3/#line-breaking).
|
||||||
|
|
||||||
|
### Testing
|
||||||
|
You can run the test suite with:
|
||||||
|
|
||||||
|
npm test
|
||||||
|
|
||||||
|
The library implements all the [LineBreakTest.txt tests](http://www.unicode.org/Public/10.0.0/ucd/auxiliary/LineBreakTest.txt)
|
||||||
|
and a number of CSS web-platform-tests.
|
706
node_modules/css-line-break/dist/css-line-break.es5.js
generated
vendored
Normal file
706
node_modules/css-line-break/dist/css-line-break.es5.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/css-line-break/dist/css-line-break.es5.js.map
generated
vendored
Normal file
1
node_modules/css-line-break/dist/css-line-break.es5.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
718
node_modules/css-line-break/dist/css-line-break.umd.js
generated
vendored
Normal file
718
node_modules/css-line-break/dist/css-line-break.umd.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/css-line-break/dist/css-line-break.umd.js.map
generated
vendored
Normal file
1
node_modules/css-line-break/dist/css-line-break.umd.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
516
node_modules/css-line-break/dist/lib/LineBreak.js
generated
vendored
Normal file
516
node_modules/css-line-break/dist/lib/LineBreak.js
generated
vendored
Normal file
|
@ -0,0 +1,516 @@
|
||||||
|
'use strict';
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.LineBreaker = exports.inlineBreakOpportunities = exports.lineBreakAtIndex = exports.codePointsToCharacterClasses = exports.UnicodeTrie = exports.BREAK_ALLOWED = exports.BREAK_NOT_ALLOWED = exports.BREAK_MANDATORY = exports.classes = exports.LETTER_NUMBER_MODIFIER = void 0;
|
||||||
|
var utrie_1 = require("utrie");
|
||||||
|
var linebreak_trie_1 = require("./linebreak-trie");
|
||||||
|
var Util_1 = require("./Util");
|
||||||
|
exports.LETTER_NUMBER_MODIFIER = 50;
|
||||||
|
// Non-tailorable Line Breaking Classes
|
||||||
|
var BK = 1; // Cause a line break (after)
|
||||||
|
var CR = 2; // Cause a line break (after), except between CR and LF
|
||||||
|
var LF = 3; // Cause a line break (after)
|
||||||
|
var CM = 4; // Prohibit a line break between the character and the preceding character
|
||||||
|
var NL = 5; // Cause a line break (after)
|
||||||
|
var SG = 6; // Do not occur in well-formed text
|
||||||
|
var WJ = 7; // Prohibit line breaks before and after
|
||||||
|
var ZW = 8; // Provide a break opportunity
|
||||||
|
var GL = 9; // Prohibit line breaks before and after
|
||||||
|
var SP = 10; // Enable indirect line breaks
|
||||||
|
var ZWJ = 11; // Prohibit line breaks within joiner sequences
|
||||||
|
// Break Opportunities
|
||||||
|
var B2 = 12; // Provide a line break opportunity before and after the character
|
||||||
|
var BA = 13; // Generally provide a line break opportunity after the character
|
||||||
|
var BB = 14; // Generally provide a line break opportunity before the character
|
||||||
|
var HY = 15; // Provide a line break opportunity after the character, except in numeric context
|
||||||
|
var CB = 16; // Provide a line break opportunity contingent on additional information
|
||||||
|
// Characters Prohibiting Certain Breaks
|
||||||
|
var CL = 17; // Prohibit line breaks before
|
||||||
|
var CP = 18; // Prohibit line breaks before
|
||||||
|
var EX = 19; // Prohibit line breaks before
|
||||||
|
var IN = 20; // Allow only indirect line breaks between pairs
|
||||||
|
var NS = 21; // Allow only indirect line breaks before
|
||||||
|
var OP = 22; // Prohibit line breaks after
|
||||||
|
var QU = 23; // Act like they are both opening and closing
|
||||||
|
// Numeric Context
|
||||||
|
var IS = 24; // Prevent breaks after any and before numeric
|
||||||
|
var NU = 25; // Form numeric expressions for line breaking purposes
|
||||||
|
var PO = 26; // Do not break following a numeric expression
|
||||||
|
var PR = 27; // Do not break in front of a numeric expression
|
||||||
|
var SY = 28; // Prevent a break before; and allow a break after
|
||||||
|
// Other Characters
|
||||||
|
var AI = 29; // Act like AL when the resolvedEAW is N; otherwise; act as ID
|
||||||
|
var AL = 30; // Are alphabetic characters or symbols that are used with alphabetic characters
|
||||||
|
var CJ = 31; // Treat as NS or ID for strict or normal breaking.
|
||||||
|
var EB = 32; // Do not break from following Emoji Modifier
|
||||||
|
var EM = 33; // Do not break from preceding Emoji Base
|
||||||
|
var H2 = 34; // Form Korean syllable blocks
|
||||||
|
var H3 = 35; // Form Korean syllable blocks
|
||||||
|
var HL = 36; // Do not break around a following hyphen; otherwise act as Alphabetic
|
||||||
|
var ID = 37; // Break before or after; except in some numeric context
|
||||||
|
var JL = 38; // Form Korean syllable blocks
|
||||||
|
var JV = 39; // Form Korean syllable blocks
|
||||||
|
var JT = 40; // Form Korean syllable blocks
|
||||||
|
var RI = 41; // Keep pairs together. For pairs; break before and after other classes
|
||||||
|
var SA = 42; // Provide a line break opportunity contingent on additional, language-specific context analysis
|
||||||
|
var XX = 43; // Have as yet unknown line breaking behavior or unassigned code positions
|
||||||
|
var ea_OP = [0x2329, 0xff08];
|
||||||
|
exports.classes = {
|
||||||
|
BK: BK,
|
||||||
|
CR: CR,
|
||||||
|
LF: LF,
|
||||||
|
CM: CM,
|
||||||
|
NL: NL,
|
||||||
|
SG: SG,
|
||||||
|
WJ: WJ,
|
||||||
|
ZW: ZW,
|
||||||
|
GL: GL,
|
||||||
|
SP: SP,
|
||||||
|
ZWJ: ZWJ,
|
||||||
|
B2: B2,
|
||||||
|
BA: BA,
|
||||||
|
BB: BB,
|
||||||
|
HY: HY,
|
||||||
|
CB: CB,
|
||||||
|
CL: CL,
|
||||||
|
CP: CP,
|
||||||
|
EX: EX,
|
||||||
|
IN: IN,
|
||||||
|
NS: NS,
|
||||||
|
OP: OP,
|
||||||
|
QU: QU,
|
||||||
|
IS: IS,
|
||||||
|
NU: NU,
|
||||||
|
PO: PO,
|
||||||
|
PR: PR,
|
||||||
|
SY: SY,
|
||||||
|
AI: AI,
|
||||||
|
AL: AL,
|
||||||
|
CJ: CJ,
|
||||||
|
EB: EB,
|
||||||
|
EM: EM,
|
||||||
|
H2: H2,
|
||||||
|
H3: H3,
|
||||||
|
HL: HL,
|
||||||
|
ID: ID,
|
||||||
|
JL: JL,
|
||||||
|
JV: JV,
|
||||||
|
JT: JT,
|
||||||
|
RI: RI,
|
||||||
|
SA: SA,
|
||||||
|
XX: XX,
|
||||||
|
};
|
||||||
|
exports.BREAK_MANDATORY = '!';
|
||||||
|
exports.BREAK_NOT_ALLOWED = '×';
|
||||||
|
exports.BREAK_ALLOWED = '÷';
|
||||||
|
exports.UnicodeTrie = utrie_1.createTrieFromBase64(linebreak_trie_1.base64, linebreak_trie_1.byteLength);
|
||||||
|
var ALPHABETICS = [AL, HL];
|
||||||
|
var HARD_LINE_BREAKS = [BK, CR, LF, NL];
|
||||||
|
var SPACE = [SP, ZW];
|
||||||
|
var PREFIX_POSTFIX = [PR, PO];
|
||||||
|
var LINE_BREAKS = HARD_LINE_BREAKS.concat(SPACE);
|
||||||
|
var KOREAN_SYLLABLE_BLOCK = [JL, JV, JT, H2, H3];
|
||||||
|
var HYPHEN = [HY, BA];
|
||||||
|
var codePointsToCharacterClasses = function (codePoints, lineBreak) {
|
||||||
|
if (lineBreak === void 0) { lineBreak = 'strict'; }
|
||||||
|
var types = [];
|
||||||
|
var indices = [];
|
||||||
|
var categories = [];
|
||||||
|
codePoints.forEach(function (codePoint, index) {
|
||||||
|
var classType = exports.UnicodeTrie.get(codePoint);
|
||||||
|
if (classType > exports.LETTER_NUMBER_MODIFIER) {
|
||||||
|
categories.push(true);
|
||||||
|
classType -= exports.LETTER_NUMBER_MODIFIER;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
categories.push(false);
|
||||||
|
}
|
||||||
|
if (['normal', 'auto', 'loose'].indexOf(lineBreak) !== -1) {
|
||||||
|
// U+2010, – U+2013, 〜 U+301C, ゠ U+30A0
|
||||||
|
if ([0x2010, 0x2013, 0x301c, 0x30a0].indexOf(codePoint) !== -1) {
|
||||||
|
indices.push(index);
|
||||||
|
return types.push(CB);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (classType === CM || classType === ZWJ) {
|
||||||
|
// LB10 Treat any remaining combining mark or ZWJ as AL.
|
||||||
|
if (index === 0) {
|
||||||
|
indices.push(index);
|
||||||
|
return types.push(AL);
|
||||||
|
}
|
||||||
|
// LB9 Do not break a combining character sequence; treat it as if it has the line breaking class of
|
||||||
|
// the base character in all of the following rules. Treat ZWJ as if it were CM.
|
||||||
|
var prev = types[index - 1];
|
||||||
|
if (LINE_BREAKS.indexOf(prev) === -1) {
|
||||||
|
indices.push(indices[index - 1]);
|
||||||
|
return types.push(prev);
|
||||||
|
}
|
||||||
|
indices.push(index);
|
||||||
|
return types.push(AL);
|
||||||
|
}
|
||||||
|
indices.push(index);
|
||||||
|
if (classType === CJ) {
|
||||||
|
return types.push(lineBreak === 'strict' ? NS : ID);
|
||||||
|
}
|
||||||
|
if (classType === SA) {
|
||||||
|
return types.push(AL);
|
||||||
|
}
|
||||||
|
if (classType === AI) {
|
||||||
|
return types.push(AL);
|
||||||
|
}
|
||||||
|
// For supplementary characters, a useful default is to treat characters in the range 10000..1FFFD as AL
|
||||||
|
// and characters in the ranges 20000..2FFFD and 30000..3FFFD as ID, until the implementation can be revised
|
||||||
|
// to take into account the actual line breaking properties for these characters.
|
||||||
|
if (classType === XX) {
|
||||||
|
if ((codePoint >= 0x20000 && codePoint <= 0x2fffd) || (codePoint >= 0x30000 && codePoint <= 0x3fffd)) {
|
||||||
|
return types.push(ID);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return types.push(AL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
types.push(classType);
|
||||||
|
});
|
||||||
|
return [indices, types, categories];
|
||||||
|
};
|
||||||
|
exports.codePointsToCharacterClasses = codePointsToCharacterClasses;
|
||||||
|
var isAdjacentWithSpaceIgnored = function (a, b, currentIndex, classTypes) {
|
||||||
|
var current = classTypes[currentIndex];
|
||||||
|
if (Array.isArray(a) ? a.indexOf(current) !== -1 : a === current) {
|
||||||
|
var i = currentIndex;
|
||||||
|
while (i <= classTypes.length) {
|
||||||
|
i++;
|
||||||
|
var next = classTypes[i];
|
||||||
|
if (next === b) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (next !== SP) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (current === SP) {
|
||||||
|
var i = currentIndex;
|
||||||
|
while (i > 0) {
|
||||||
|
i--;
|
||||||
|
var prev = classTypes[i];
|
||||||
|
if (Array.isArray(a) ? a.indexOf(prev) !== -1 : a === prev) {
|
||||||
|
var n = currentIndex;
|
||||||
|
while (n <= classTypes.length) {
|
||||||
|
n++;
|
||||||
|
var next = classTypes[n];
|
||||||
|
if (next === b) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (next !== SP) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (prev !== SP) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
var previousNonSpaceClassType = function (currentIndex, classTypes) {
|
||||||
|
var i = currentIndex;
|
||||||
|
while (i >= 0) {
|
||||||
|
var type = classTypes[i];
|
||||||
|
if (type === SP) {
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
};
|
||||||
|
var _lineBreakAtIndex = function (codePoints, classTypes, indicies, index, forbiddenBreaks) {
|
||||||
|
if (indicies[index] === 0) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
var currentIndex = index - 1;
|
||||||
|
if (Array.isArray(forbiddenBreaks) && forbiddenBreaks[currentIndex] === true) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
var beforeIndex = currentIndex - 1;
|
||||||
|
var afterIndex = currentIndex + 1;
|
||||||
|
var current = classTypes[currentIndex];
|
||||||
|
// LB4 Always break after hard line breaks.
|
||||||
|
// LB5 Treat CR followed by LF, as well as CR, LF, and NL as hard line breaks.
|
||||||
|
var before = beforeIndex >= 0 ? classTypes[beforeIndex] : 0;
|
||||||
|
var next = classTypes[afterIndex];
|
||||||
|
if (current === CR && next === LF) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
if (HARD_LINE_BREAKS.indexOf(current) !== -1) {
|
||||||
|
return exports.BREAK_MANDATORY;
|
||||||
|
}
|
||||||
|
// LB6 Do not break before hard line breaks.
|
||||||
|
if (HARD_LINE_BREAKS.indexOf(next) !== -1) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB7 Do not break before spaces or zero width space.
|
||||||
|
if (SPACE.indexOf(next) !== -1) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB8 Break before any character following a zero-width space, even if one or more spaces intervene.
|
||||||
|
if (previousNonSpaceClassType(currentIndex, classTypes) === ZW) {
|
||||||
|
return exports.BREAK_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB8a Do not break after a zero width joiner.
|
||||||
|
if (exports.UnicodeTrie.get(codePoints[currentIndex]) === ZWJ) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// zwj emojis
|
||||||
|
if ((current === EB || current === EM) && exports.UnicodeTrie.get(codePoints[afterIndex]) === ZWJ) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB11 Do not break before or after Word joiner and related characters.
|
||||||
|
if (current === WJ || next === WJ) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB12 Do not break after NBSP and related characters.
|
||||||
|
if (current === GL) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB12a Do not break before NBSP and related characters, except after spaces and hyphens.
|
||||||
|
if ([SP, BA, HY].indexOf(current) === -1 && next === GL) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB13 Do not break before ‘]’ or ‘!’ or ‘;’ or ‘/’, even after spaces.
|
||||||
|
if ([CL, CP, EX, IS, SY].indexOf(next) !== -1) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB14 Do not break after ‘[’, even after spaces.
|
||||||
|
if (previousNonSpaceClassType(currentIndex, classTypes) === OP) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB15 Do not break within ‘”[’, even with intervening spaces.
|
||||||
|
if (isAdjacentWithSpaceIgnored(QU, OP, currentIndex, classTypes)) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB16 Do not break between closing punctuation and a nonstarter (lb=NS), even with intervening spaces.
|
||||||
|
if (isAdjacentWithSpaceIgnored([CL, CP], NS, currentIndex, classTypes)) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB17 Do not break within ‘——’, even with intervening spaces.
|
||||||
|
if (isAdjacentWithSpaceIgnored(B2, B2, currentIndex, classTypes)) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB18 Break after spaces.
|
||||||
|
if (current === SP) {
|
||||||
|
return exports.BREAK_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB19 Do not break before or after quotation marks, such as ‘ ” ’.
|
||||||
|
if (current === QU || next === QU) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB20 Break before and after unresolved CB.
|
||||||
|
if (next === CB || current === CB) {
|
||||||
|
return exports.BREAK_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB21 Do not break before hyphen-minus, other hyphens, fixed-width spaces, small kana, and other non-starters, or after acute accents.
|
||||||
|
if ([BA, HY, NS].indexOf(next) !== -1 || current === BB) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB21a Don't break after Hebrew + Hyphen.
|
||||||
|
if (before === HL && HYPHEN.indexOf(current) !== -1) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB21b Don’t break between Solidus and Hebrew letters.
|
||||||
|
if (current === SY && next === HL) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB22 Do not break before ellipsis.
|
||||||
|
if (next === IN) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB23 Do not break between digits and letters.
|
||||||
|
if ((ALPHABETICS.indexOf(next) !== -1 && current === NU) || (ALPHABETICS.indexOf(current) !== -1 && next === NU)) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB23a Do not break between numeric prefixes and ideographs, or between ideographs and numeric postfixes.
|
||||||
|
if ((current === PR && [ID, EB, EM].indexOf(next) !== -1) ||
|
||||||
|
([ID, EB, EM].indexOf(current) !== -1 && next === PO)) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB24 Do not break between numeric prefix/postfix and letters, or between letters and prefix/postfix.
|
||||||
|
if ((ALPHABETICS.indexOf(current) !== -1 && PREFIX_POSTFIX.indexOf(next) !== -1) ||
|
||||||
|
(PREFIX_POSTFIX.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1)) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB25 Do not break between the following pairs of classes relevant to numbers:
|
||||||
|
if (
|
||||||
|
// (PR | PO) × ( OP | HY )? NU
|
||||||
|
([PR, PO].indexOf(current) !== -1 &&
|
||||||
|
(next === NU || ([OP, HY].indexOf(next) !== -1 && classTypes[afterIndex + 1] === NU))) ||
|
||||||
|
// ( OP | HY ) × NU
|
||||||
|
([OP, HY].indexOf(current) !== -1 && next === NU) ||
|
||||||
|
// NU × (NU | SY | IS)
|
||||||
|
(current === NU && [NU, SY, IS].indexOf(next) !== -1)) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// NU (NU | SY | IS)* × (NU | SY | IS | CL | CP)
|
||||||
|
if ([NU, SY, IS, CL, CP].indexOf(next) !== -1) {
|
||||||
|
var prevIndex = currentIndex;
|
||||||
|
while (prevIndex >= 0) {
|
||||||
|
var type = classTypes[prevIndex];
|
||||||
|
if (type === NU) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
else if ([SY, IS].indexOf(type) !== -1) {
|
||||||
|
prevIndex--;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// NU (NU | SY | IS)* (CL | CP)? × (PO | PR))
|
||||||
|
if ([PR, PO].indexOf(next) !== -1) {
|
||||||
|
var prevIndex = [CL, CP].indexOf(current) !== -1 ? beforeIndex : currentIndex;
|
||||||
|
while (prevIndex >= 0) {
|
||||||
|
var type = classTypes[prevIndex];
|
||||||
|
if (type === NU) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
else if ([SY, IS].indexOf(type) !== -1) {
|
||||||
|
prevIndex--;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// LB26 Do not break a Korean syllable.
|
||||||
|
if ((JL === current && [JL, JV, H2, H3].indexOf(next) !== -1) ||
|
||||||
|
([JV, H2].indexOf(current) !== -1 && [JV, JT].indexOf(next) !== -1) ||
|
||||||
|
([JT, H3].indexOf(current) !== -1 && next === JT)) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB27 Treat a Korean Syllable Block the same as ID.
|
||||||
|
if ((KOREAN_SYLLABLE_BLOCK.indexOf(current) !== -1 && [IN, PO].indexOf(next) !== -1) ||
|
||||||
|
(KOREAN_SYLLABLE_BLOCK.indexOf(next) !== -1 && current === PR)) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB28 Do not break between alphabetics (“at”).
|
||||||
|
if (ALPHABETICS.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB29 Do not break between numeric punctuation and alphabetics (“e.g.”).
|
||||||
|
if (current === IS && ALPHABETICS.indexOf(next) !== -1) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB30 Do not break between letters, numbers, or ordinary symbols and opening or closing parentheses.
|
||||||
|
if ((ALPHABETICS.concat(NU).indexOf(current) !== -1 &&
|
||||||
|
next === OP &&
|
||||||
|
ea_OP.indexOf(codePoints[afterIndex]) === -1) ||
|
||||||
|
(ALPHABETICS.concat(NU).indexOf(next) !== -1 && current === CP)) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB30a Break between two regional indicator symbols if and only if there are an even number of regional
|
||||||
|
// indicators preceding the position of the break.
|
||||||
|
if (current === RI && next === RI) {
|
||||||
|
var i = indicies[currentIndex];
|
||||||
|
var count = 1;
|
||||||
|
while (i > 0) {
|
||||||
|
i--;
|
||||||
|
if (classTypes[i] === RI) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (count % 2 !== 0) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// LB30b Do not break between an emoji base and an emoji modifier.
|
||||||
|
if (current === EB && next === EM) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
return exports.BREAK_ALLOWED;
|
||||||
|
};
|
||||||
|
var lineBreakAtIndex = function (codePoints, index) {
|
||||||
|
// LB2 Never break at the start of text.
|
||||||
|
if (index === 0) {
|
||||||
|
return exports.BREAK_NOT_ALLOWED;
|
||||||
|
}
|
||||||
|
// LB3 Always break at the end of text.
|
||||||
|
if (index >= codePoints.length) {
|
||||||
|
return exports.BREAK_MANDATORY;
|
||||||
|
}
|
||||||
|
var _a = exports.codePointsToCharacterClasses(codePoints), indices = _a[0], classTypes = _a[1];
|
||||||
|
return _lineBreakAtIndex(codePoints, classTypes, indices, index);
|
||||||
|
};
|
||||||
|
exports.lineBreakAtIndex = lineBreakAtIndex;
|
||||||
|
var cssFormattedClasses = function (codePoints, options) {
|
||||||
|
if (!options) {
|
||||||
|
options = { lineBreak: 'normal', wordBreak: 'normal' };
|
||||||
|
}
|
||||||
|
var _a = exports.codePointsToCharacterClasses(codePoints, options.lineBreak), indicies = _a[0], classTypes = _a[1], isLetterNumber = _a[2];
|
||||||
|
if (options.wordBreak === 'break-all' || options.wordBreak === 'break-word') {
|
||||||
|
classTypes = classTypes.map(function (type) { return ([NU, AL, SA].indexOf(type) !== -1 ? ID : type); });
|
||||||
|
}
|
||||||
|
var forbiddenBreakpoints = options.wordBreak === 'keep-all'
|
||||||
|
? isLetterNumber.map(function (letterNumber, i) {
|
||||||
|
return letterNumber && codePoints[i] >= 0x4e00 && codePoints[i] <= 0x9fff;
|
||||||
|
})
|
||||||
|
: undefined;
|
||||||
|
return [indicies, classTypes, forbiddenBreakpoints];
|
||||||
|
};
|
||||||
|
var inlineBreakOpportunities = function (str, options) {
|
||||||
|
var codePoints = Util_1.toCodePoints(str);
|
||||||
|
var output = exports.BREAK_NOT_ALLOWED;
|
||||||
|
var _a = cssFormattedClasses(codePoints, options), indicies = _a[0], classTypes = _a[1], forbiddenBreakpoints = _a[2];
|
||||||
|
codePoints.forEach(function (codePoint, i) {
|
||||||
|
output +=
|
||||||
|
Util_1.fromCodePoint(codePoint) +
|
||||||
|
(i >= codePoints.length - 1
|
||||||
|
? exports.BREAK_MANDATORY
|
||||||
|
: _lineBreakAtIndex(codePoints, classTypes, indicies, i + 1, forbiddenBreakpoints));
|
||||||
|
});
|
||||||
|
return output;
|
||||||
|
};
|
||||||
|
exports.inlineBreakOpportunities = inlineBreakOpportunities;
|
||||||
|
var Break = /** @class */ (function () {
|
||||||
|
function Break(codePoints, lineBreak, start, end) {
|
||||||
|
this.codePoints = codePoints;
|
||||||
|
this.required = lineBreak === exports.BREAK_MANDATORY;
|
||||||
|
this.start = start;
|
||||||
|
this.end = end;
|
||||||
|
}
|
||||||
|
Break.prototype.slice = function () {
|
||||||
|
return Util_1.fromCodePoint.apply(void 0, this.codePoints.slice(this.start, this.end));
|
||||||
|
};
|
||||||
|
return Break;
|
||||||
|
}());
|
||||||
|
var LineBreaker = function (str, options) {
|
||||||
|
var codePoints = Util_1.toCodePoints(str);
|
||||||
|
var _a = cssFormattedClasses(codePoints, options), indicies = _a[0], classTypes = _a[1], forbiddenBreakpoints = _a[2];
|
||||||
|
var length = codePoints.length;
|
||||||
|
var lastEnd = 0;
|
||||||
|
var nextIndex = 0;
|
||||||
|
return {
|
||||||
|
next: function () {
|
||||||
|
if (nextIndex >= length) {
|
||||||
|
return { done: true, value: null };
|
||||||
|
}
|
||||||
|
var lineBreak = exports.BREAK_NOT_ALLOWED;
|
||||||
|
while (nextIndex < length &&
|
||||||
|
(lineBreak = _lineBreakAtIndex(codePoints, classTypes, indicies, ++nextIndex, forbiddenBreakpoints)) ===
|
||||||
|
exports.BREAK_NOT_ALLOWED) { }
|
||||||
|
if (lineBreak !== exports.BREAK_NOT_ALLOWED || nextIndex === length) {
|
||||||
|
var value = new Break(codePoints, lineBreak, lastEnd, nextIndex);
|
||||||
|
lastEnd = nextIndex;
|
||||||
|
return { value: value, done: false };
|
||||||
|
}
|
||||||
|
return { done: true, value: null };
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
exports.LineBreaker = LineBreaker;
|
||||||
|
//# sourceMappingURL=LineBreak.js.map
|
1
node_modules/css-line-break/dist/lib/LineBreak.js.map
generated
vendored
Normal file
1
node_modules/css-line-break/dist/lib/LineBreak.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
109
node_modules/css-line-break/dist/lib/Util.js
generated
vendored
Normal file
109
node_modules/css-line-break/dist/lib/Util.js
generated
vendored
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.polyUint32Array = exports.polyUint16Array = exports.decode = exports.fromCodePoint = exports.toCodePoints = void 0;
|
||||||
|
var toCodePoints = function (str) {
|
||||||
|
var codePoints = [];
|
||||||
|
var i = 0;
|
||||||
|
var length = str.length;
|
||||||
|
while (i < length) {
|
||||||
|
var value = str.charCodeAt(i++);
|
||||||
|
if (value >= 0xd800 && value <= 0xdbff && i < length) {
|
||||||
|
var extra = str.charCodeAt(i++);
|
||||||
|
if ((extra & 0xfc00) === 0xdc00) {
|
||||||
|
codePoints.push(((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
codePoints.push(value);
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
codePoints.push(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return codePoints;
|
||||||
|
};
|
||||||
|
exports.toCodePoints = toCodePoints;
|
||||||
|
var fromCodePoint = function () {
|
||||||
|
var codePoints = [];
|
||||||
|
for (var _i = 0; _i < arguments.length; _i++) {
|
||||||
|
codePoints[_i] = arguments[_i];
|
||||||
|
}
|
||||||
|
if (String.fromCodePoint) {
|
||||||
|
return String.fromCodePoint.apply(String, codePoints);
|
||||||
|
}
|
||||||
|
var length = codePoints.length;
|
||||||
|
if (!length) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
var codeUnits = [];
|
||||||
|
var index = -1;
|
||||||
|
var result = '';
|
||||||
|
while (++index < length) {
|
||||||
|
var codePoint = codePoints[index];
|
||||||
|
if (codePoint <= 0xffff) {
|
||||||
|
codeUnits.push(codePoint);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
codePoint -= 0x10000;
|
||||||
|
codeUnits.push((codePoint >> 10) + 0xd800, (codePoint % 0x400) + 0xdc00);
|
||||||
|
}
|
||||||
|
if (index + 1 === length || codeUnits.length > 0x4000) {
|
||||||
|
result += String.fromCharCode.apply(String, codeUnits);
|
||||||
|
codeUnits.length = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
exports.fromCodePoint = fromCodePoint;
|
||||||
|
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
||||||
|
// Use a lookup table to find the index.
|
||||||
|
var lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);
|
||||||
|
for (var i = 0; i < chars.length; i++) {
|
||||||
|
lookup[chars.charCodeAt(i)] = i;
|
||||||
|
}
|
||||||
|
var decode = function (base64) {
|
||||||
|
var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;
|
||||||
|
if (base64[base64.length - 1] === '=') {
|
||||||
|
bufferLength--;
|
||||||
|
if (base64[base64.length - 2] === '=') {
|
||||||
|
bufferLength--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var buffer = typeof ArrayBuffer !== 'undefined' &&
|
||||||
|
typeof Uint8Array !== 'undefined' &&
|
||||||
|
typeof Uint8Array.prototype.slice !== 'undefined'
|
||||||
|
? new ArrayBuffer(bufferLength)
|
||||||
|
: new Array(bufferLength);
|
||||||
|
var bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);
|
||||||
|
for (i = 0; i < len; i += 4) {
|
||||||
|
encoded1 = lookup[base64.charCodeAt(i)];
|
||||||
|
encoded2 = lookup[base64.charCodeAt(i + 1)];
|
||||||
|
encoded3 = lookup[base64.charCodeAt(i + 2)];
|
||||||
|
encoded4 = lookup[base64.charCodeAt(i + 3)];
|
||||||
|
bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);
|
||||||
|
bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);
|
||||||
|
bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);
|
||||||
|
}
|
||||||
|
return buffer;
|
||||||
|
};
|
||||||
|
exports.decode = decode;
|
||||||
|
var polyUint16Array = function (buffer) {
|
||||||
|
var length = buffer.length;
|
||||||
|
var bytes = [];
|
||||||
|
for (var i = 0; i < length; i += 2) {
|
||||||
|
bytes.push((buffer[i + 1] << 8) | buffer[i]);
|
||||||
|
}
|
||||||
|
return bytes;
|
||||||
|
};
|
||||||
|
exports.polyUint16Array = polyUint16Array;
|
||||||
|
var polyUint32Array = function (buffer) {
|
||||||
|
var length = buffer.length;
|
||||||
|
var bytes = [];
|
||||||
|
for (var i = 0; i < length; i += 4) {
|
||||||
|
bytes.push((buffer[i + 3] << 24) | (buffer[i + 2] << 16) | (buffer[i + 1] << 8) | buffer[i]);
|
||||||
|
}
|
||||||
|
return bytes;
|
||||||
|
};
|
||||||
|
exports.polyUint32Array = polyUint32Array;
|
||||||
|
//# sourceMappingURL=Util.js.map
|
1
node_modules/css-line-break/dist/lib/Util.js.map
generated
vendored
Normal file
1
node_modules/css-line-break/dist/lib/Util.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"Util.js","sourceRoot":"","sources":["../../src/Util.ts"],"names":[],"mappings":";;;AAAO,IAAM,YAAY,GAAG,UAAC,GAAW;IACpC,IAAM,UAAU,GAAG,EAAE,CAAC;IACtB,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,IAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IAC1B,OAAO,CAAC,GAAG,MAAM,EAAE;QACf,IAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;QAClC,IAAI,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,MAAM,IAAI,CAAC,GAAG,MAAM,EAAE;YAClD,IAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;YAClC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,MAAM,EAAE;gBAC7B,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC;aACxE;iBAAM;gBACH,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,CAAC,EAAE,CAAC;aACP;SACJ;aAAM;YACH,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAC1B;KACJ;IACD,OAAO,UAAU,CAAC;AACtB,CAAC,CAAC;AAnBW,QAAA,YAAY,gBAmBvB;AAEK,IAAM,aAAa,GAAG;IAAC,oBAAuB;SAAvB,UAAuB,EAAvB,qBAAuB,EAAvB,IAAuB;QAAvB,+BAAuB;;IACjD,IAAI,MAAM,CAAC,aAAa,EAAE;QACtB,OAAO,MAAM,CAAC,aAAa,OAApB,MAAM,EAAkB,UAAU,EAAE;KAC9C;IAED,IAAM,MAAM,GA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IAAI,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;KAChG;IACD,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC;AAPW,QAAA,eAAe,mBAO1B"}
|
9
node_modules/css-line-break/dist/lib/index.js
generated
vendored
Normal file
9
node_modules/css-line-break/dist/lib/index.js
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.LineBreaker = exports.fromCodePoint = exports.toCodePoints = void 0;
|
||||||
|
var Util_1 = require("./Util");
|
||||||
|
Object.defineProperty(exports, "toCodePoints", { enumerable: true, get: function () { return Util_1.toCodePoints; } });
|
||||||
|
Object.defineProperty(exports, "fromCodePoint", { enumerable: true, get: function () { return Util_1.fromCodePoint; } });
|
||||||
|
var LineBreak_1 = require("./LineBreak");
|
||||||
|
Object.defineProperty(exports, "LineBreaker", { enumerable: true, get: function () { return LineBreak_1.LineBreaker; } });
|
||||||
|
//# sourceMappingURL=index.js.map
|
1
node_modules/css-line-break/dist/lib/index.js.map
generated
vendored
Normal file
1
node_modules/css-line-break/dist/lib/index.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,+BAAmD;AAA3C,oGAAA,YAAY,OAAA;AAAE,qGAAA,aAAa,OAAA;AACnC,yCAAwC;AAAhC,wGAAA,WAAW,OAAA"}
|
6
node_modules/css-line-break/dist/lib/linebreak-trie.js
generated
vendored
Normal file
6
node_modules/css-line-break/dist/lib/linebreak-trie.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/css-line-break/dist/lib/linebreak-trie.js.map
generated
vendored
Normal file
1
node_modules/css-line-break/dist/lib/linebreak-trie.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"linebreak-trie.js","sourceRoot":"","sources":["../../src/linebreak-trie.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GACf,0pnDAA0pnD,CAAC;AAClpnD,QAAA,UAAU,GAAG,KAAK,CAAC"}
|
38
node_modules/css-line-break/dist/types/LineBreak.d.ts
generated
vendored
Normal file
38
node_modules/css-line-break/dist/types/LineBreak.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
export declare const LETTER_NUMBER_MODIFIER = 50;
|
||||||
|
export declare const classes: {
|
||||||
|
[key: string]: number;
|
||||||
|
};
|
||||||
|
export declare const BREAK_MANDATORY = "!";
|
||||||
|
export declare const BREAK_NOT_ALLOWED = "\u00D7";
|
||||||
|
export declare const BREAK_ALLOWED = "\u00F7";
|
||||||
|
export declare const UnicodeTrie: import("utrie").Trie;
|
||||||
|
export declare const codePointsToCharacterClasses: (codePoints: number[], lineBreak?: string) => [number[], number[], boolean[]];
|
||||||
|
export declare type BREAK_OPPORTUNITIES = typeof BREAK_NOT_ALLOWED | typeof BREAK_ALLOWED | typeof BREAK_MANDATORY;
|
||||||
|
export declare const lineBreakAtIndex: (codePoints: number[], index: number) => BREAK_OPPORTUNITIES;
|
||||||
|
export declare type LINE_BREAK = 'auto' | 'normal' | 'strict';
|
||||||
|
export declare type WORD_BREAK = 'normal' | 'break-all' | 'break-word' | 'keep-all';
|
||||||
|
interface IOptions {
|
||||||
|
lineBreak?: LINE_BREAK;
|
||||||
|
wordBreak?: WORD_BREAK;
|
||||||
|
}
|
||||||
|
export declare const inlineBreakOpportunities: (str: string, options?: IOptions | undefined) => string;
|
||||||
|
declare class Break {
|
||||||
|
private readonly codePoints;
|
||||||
|
readonly required: boolean;
|
||||||
|
readonly start: number;
|
||||||
|
readonly end: number;
|
||||||
|
constructor(codePoints: number[], lineBreak: string, start: number, end: number);
|
||||||
|
slice(): string;
|
||||||
|
}
|
||||||
|
export declare type LineBreak = {
|
||||||
|
done: true;
|
||||||
|
value: null;
|
||||||
|
} | {
|
||||||
|
done: false;
|
||||||
|
value: Break;
|
||||||
|
};
|
||||||
|
interface ILineBreakIterator {
|
||||||
|
next: () => LineBreak;
|
||||||
|
}
|
||||||
|
export declare const LineBreaker: (str: string, options?: IOptions | undefined) => ILineBreakIterator;
|
||||||
|
export {};
|
5
node_modules/css-line-break/dist/types/Util.d.ts
generated
vendored
Normal file
5
node_modules/css-line-break/dist/types/Util.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
export declare const toCodePoints: (str: string) => number[];
|
||||||
|
export declare const fromCodePoint: (...codePoints: number[]) => string;
|
||||||
|
export declare const decode: (base64: string) => ArrayBuffer | number[];
|
||||||
|
export declare const polyUint16Array: (buffer: number[]) => number[];
|
||||||
|
export declare const polyUint32Array: (buffer: number[]) => number[];
|
2
node_modules/css-line-break/dist/types/index.d.ts
generated
vendored
Normal file
2
node_modules/css-line-break/dist/types/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
export { toCodePoints, fromCodePoint } from './Util';
|
||||||
|
export { LineBreaker } from './LineBreak';
|
2
node_modules/css-line-break/dist/types/linebreak-trie.d.ts
generated
vendored
Normal file
2
node_modules/css-line-break/dist/types/linebreak-trie.d.ts
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
61
node_modules/css-line-break/package.json
generated
vendored
Normal file
61
node_modules/css-line-break/package.json
generated
vendored
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
{
|
||||||
|
"name": "css-line-break",
|
||||||
|
"version": "2.1.0",
|
||||||
|
"description": "",
|
||||||
|
"main": "dist/css-line-break.umd.js",
|
||||||
|
"module": "dist/css-line-break.es5.js",
|
||||||
|
"typings": "dist/types/index.d.ts",
|
||||||
|
"scripts": {
|
||||||
|
"prebuild": "rimraf dist/",
|
||||||
|
"build": "tsc --module commonjs && rollup -c rollup.config.ts",
|
||||||
|
"format": "prettier --write \"{src,scripts}/**/*.ts\"",
|
||||||
|
"lint": "tslint -c tslint.json --project tsconfig.json -t codeFrame src/**/*.ts tests/**/*.ts scripts/**/*.ts",
|
||||||
|
"generate-trie": "ts-node scripts/generate_line_break_trie.ts",
|
||||||
|
"generate-tests": "ts-node scripts/generate_line_break_tests.ts",
|
||||||
|
"mocha": "mocha --require ts-node/register tests/*.ts",
|
||||||
|
"test": "npm run lint && npm run mocha",
|
||||||
|
"release": "standard-version"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+ssh://git@github.com/niklasvh/css-line-break.git"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"white-space",
|
||||||
|
"line-break",
|
||||||
|
"word-break",
|
||||||
|
"word-wrap",
|
||||||
|
"overflow-wrap"
|
||||||
|
],
|
||||||
|
"dependencies": {
|
||||||
|
"utrie": "^1.0.2"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@rollup/plugin-commonjs": "^19.0.0",
|
||||||
|
"@rollup/plugin-node-resolve": "^13.0.0",
|
||||||
|
"@rollup/plugin-typescript": "^8.2.1",
|
||||||
|
"@types/mocha": "^8.2.2",
|
||||||
|
"@types/node": "^16.0.0",
|
||||||
|
"mocha": "9.0.2",
|
||||||
|
"prettier": "^2.3.2",
|
||||||
|
"rimraf": "3.0.2",
|
||||||
|
"rollup": "^2.52.7",
|
||||||
|
"rollup-plugin-json": "^4.0.0",
|
||||||
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||||
|
"standard-version": "^9.3.0",
|
||||||
|
"ts-node": "^10.0.0",
|
||||||
|
"tslint": "^6.1.3",
|
||||||
|
"tslint-config-prettier": "^1.18.0",
|
||||||
|
"typescript": "^4.3.5"
|
||||||
|
},
|
||||||
|
"author": {
|
||||||
|
"name": "Niklas von Hertzen",
|
||||||
|
"email": "niklasvh@gmail.com",
|
||||||
|
"url": "https://hertzen.com"
|
||||||
|
},
|
||||||
|
"license": "MIT",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/niklasvh/css-line-break/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/niklasvh/css-line-break#readme"
|
||||||
|
}
|
40
node_modules/css-line-break/rollup.config.ts
generated
vendored
Normal file
40
node_modules/css-line-break/rollup.config.ts
generated
vendored
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
import resolve from '@rollup/plugin-node-resolve';
|
||||||
|
import commonjs from '@rollup/plugin-commonjs';
|
||||||
|
import sourceMaps from 'rollup-plugin-sourcemaps';
|
||||||
|
import typescript from '@rollup/plugin-typescript';
|
||||||
|
import json from 'rollup-plugin-json';
|
||||||
|
|
||||||
|
const pkg = require('./package.json');
|
||||||
|
|
||||||
|
const banner = `/*
|
||||||
|
* ${pkg.name} ${pkg.version} <${pkg.homepage}>
|
||||||
|
* Copyright (c) ${(new Date()).getFullYear()} ${pkg.author.name} <${pkg.author.url}>
|
||||||
|
* Released under ${pkg.license} License
|
||||||
|
*/`;
|
||||||
|
|
||||||
|
export default {
|
||||||
|
input: `src/index.ts`,
|
||||||
|
output: [
|
||||||
|
{ file: pkg.main, name: pkg.name, format: 'umd', banner, sourcemap: true },
|
||||||
|
{ file: pkg.module, format: 'esm', banner, sourcemap: true },
|
||||||
|
],
|
||||||
|
external: [],
|
||||||
|
watch: {
|
||||||
|
include: 'src/**',
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
// Allow node_modules resolution, so you can use 'external' to control
|
||||||
|
// which external modules to include in the bundle
|
||||||
|
// https://github.com/rollup/rollup-plugin-node-resolve#usage
|
||||||
|
resolve(),
|
||||||
|
// Allow json resolution
|
||||||
|
json(),
|
||||||
|
// Compile TypeScript files
|
||||||
|
typescript({ sourceMap: true, inlineSources: true }),
|
||||||
|
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
|
||||||
|
commonjs(),
|
||||||
|
|
||||||
|
// Resolve source maps to the original source
|
||||||
|
sourceMaps(),
|
||||||
|
],
|
||||||
|
}
|
566
node_modules/html2canvas/CHANGELOG.md
generated
vendored
Normal file
566
node_modules/html2canvas/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,566 @@
|
||||||
|
# Changelog
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
## [1.4.1](https://github.com/niklasvh/html2canvas/compare/v1.4.0...v1.4.1) (2022-01-22)
|
||||||
|
|
||||||
|
|
||||||
|
### deps
|
||||||
|
|
||||||
|
* fix source maps (#2812) ([67c5e8d](https://github.com/niklasvh/html2canvas/commit/67c5e8dec4b2af9260a2b5b75b3399495fd1fee9)), closes [#2812](https://github.com/niklasvh/html2canvas/issues/2812)
|
||||||
|
|
||||||
|
### feat
|
||||||
|
|
||||||
|
* add support for <video> elements (#2788) ([181d1b1](https://github.com/niklasvh/html2canvas/commit/181d1b1103910d6e1b5277d5c007fc5e3006c6bf)), closes [#2788](https://github.com/niklasvh/html2canvas/issues/2788)
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* Properties x and y of BoundingRect is undefined in old browser (#2797) ([e587a82](https://github.com/niklasvh/html2canvas/commit/e587a82dca01d9ada78cae34fd1bdb934e547f9b)), closes [#2797](https://github.com/niklasvh/html2canvas/issues/2797)
|
||||||
|
* source maps (#2787) ([46db867](https://github.com/niklasvh/html2canvas/commit/46db86755f064828559a4b0b37310f3ae94f5494)), closes [#2787](https://github.com/niklasvh/html2canvas/issues/2787)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [1.4.0](https://github.com/niklasvh/html2canvas/compare/v1.3.4...v1.4.0) (2022-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### feat
|
||||||
|
|
||||||
|
* use native text segmenter where available (#2782) ([6521a48](https://github.com/niklasvh/html2canvas/commit/6521a487d78172f7179f7c973c1a3af40eb92009)), closes [#2782](https://github.com/niklasvh/html2canvas/issues/2782)
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* adopted stylesheets (#2785) ([74696fa](https://github.com/niklasvh/html2canvas/commit/74696faf47c07b48b9c9587db0b999da1c08a8be)), closes [#2785](https://github.com/niklasvh/html2canvas/issues/2785)
|
||||||
|
* ios text wrapping with 0 width rect (#2786) ([0476d06](https://github.com/niklasvh/html2canvas/commit/0476d065158c33d2020a9f602b3043e5e2f90c75)), closes [#2786](https://github.com/niklasvh/html2canvas/issues/2786)
|
||||||
|
* reduce SLICE_STACK_SIZE to 50k (#2784) ([1cc853a](https://github.com/niklasvh/html2canvas/commit/1cc853a3186853eaca00af060f651697dc3497a9)), closes [#2784](https://github.com/niklasvh/html2canvas/issues/2784)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.4](https://github.com/niklasvh/html2canvas/compare/v1.3.3...v1.3.4) (2021-12-29)
|
||||||
|
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* add ios 15.0 testing (#2780) ([d922207](https://github.com/niklasvh/html2canvas/commit/d9222075daaed08884491b0563fc899ee0ced731)), closes [#2780](https://github.com/niklasvh/html2canvas/issues/2780)
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* ios 15 font rendering crash (#2645) ([ba2b1cd](https://github.com/niklasvh/html2canvas/commit/ba2b1cd8e9a9d7932675d7abffce1526a609e769)), closes [#2645](https://github.com/niklasvh/html2canvas/issues/2645)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.3](https://github.com/niklasvh/html2canvas/compare/v1.3.2...v1.3.3) (2021-11-23)
|
||||||
|
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* fix macos action runners (#2757) ([ed57781](https://github.com/niklasvh/html2canvas/commit/ed577815949b6a565df54f2101cf6f0fb731c290)), closes [#2757](https://github.com/niklasvh/html2canvas/issues/2757)
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* "offsets" text when font is big ([fd22a01](https://github.com/niklasvh/html2canvas/commit/fd22a01a3c9e39293f47caaed0c0e13d2dc8170c))
|
||||||
|
* const enums (#2651) ([eeda86b](https://github.com/niklasvh/html2canvas/commit/eeda86bd5e81fb4e97675fe9bee3d4d15899997f)), closes [#2651](https://github.com/niklasvh/html2canvas/issues/2651)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.2](https://github.com/niklasvh/html2canvas/compare/v1.3.1...v1.3.2) (2021-08-15)
|
||||||
|
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* add warning for webgl cloning with preserveDrawingBuffer=false (#2661) ([01ed879](https://github.com/niklasvh/html2canvas/commit/01ed87907ad9c7688880e2c5cb8ebc22ef73a4d8)), closes [#2661](https://github.com/niklasvh/html2canvas/issues/2661)
|
||||||
|
* include src files on www (#2660) ([58ff000](https://github.com/niklasvh/html2canvas/commit/58ff0003f77d825ac027eeec95fa80c0123eaf8f)), closes [#2660](https://github.com/niklasvh/html2canvas/issues/2660)
|
||||||
|
|
||||||
|
### feat
|
||||||
|
|
||||||
|
* add support for data-html2canvas-debug property for debugging (#2658) ([cd0d725](https://github.com/niklasvh/html2canvas/commit/cd0d7258c3a93f2989d5d9ec0244ba2763ea2d23)), closes [#2658](https://github.com/niklasvh/html2canvas/issues/2658)
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* disable transition properties (#2659) ([f143166](https://github.com/niklasvh/html2canvas/commit/f1431665513e0a4636fb167a241f4a0571ba728a)), closes [#2659](https://github.com/niklasvh/html2canvas/issues/2659)
|
||||||
|
* overflows with absolutely positioned content (#2663) ([38c6829](https://github.com/niklasvh/html2canvas/commit/38c682955a9299ca7785af71d8f251df799405b0)), closes [#2663](https://github.com/niklasvh/html2canvas/issues/2663)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.1](https://github.com/niklasvh/html2canvas/compare/v1.3.0...v1.3.1) (2021-08-14)
|
||||||
|
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* multi arg transition/animation duration (#2657) ([1b55ed5](https://github.com/niklasvh/html2canvas/commit/1b55ed5668dcbbe1c6d8d7e94736d8f2da2d31c5)), closes [#2657](https://github.com/niklasvh/html2canvas/issues/2657)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [1.3.0](https://github.com/niklasvh/html2canvas/compare/v1.2.2...v1.3.0) (2021-08-13)
|
||||||
|
|
||||||
|
|
||||||
|
### feat
|
||||||
|
|
||||||
|
* add rtl render support (#2653) ([6947982](https://github.com/niklasvh/html2canvas/commit/694798284838b16882e648914da0905818aa366c)), closes [#2653](https://github.com/niklasvh/html2canvas/issues/2653)
|
||||||
|
* correctly break graphemes (#2652) ([437b367](https://github.com/niklasvh/html2canvas/commit/437b367d3ba9dfd7f9a4c8042ac8d00208c09770)), closes [#2652](https://github.com/niklasvh/html2canvas/issues/2652)
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* correctly handle allowTaint canvas cloning (#2649) ([c378e22](https://github.com/niklasvh/html2canvas/commit/c378e220694c14cb7b3b4b8650a7757f8fc23c7a)), closes [#2649](https://github.com/niklasvh/html2canvas/issues/2649)
|
||||||
|
* finish animation/transitions for elements (#2632) ([969638f](https://github.com/niklasvh/html2canvas/commit/969638fb94a0a14c64a667fa6e5689f79d9f1044)), closes [#2632](https://github.com/niklasvh/html2canvas/issues/2632)
|
||||||
|
|
||||||
|
### test
|
||||||
|
|
||||||
|
* add letter-spacing test for zwj emoji (#2650) ([f919204](https://github.com/niklasvh/html2canvas/commit/f919204efa06af219f155ca279f96124bb92862b)), closes [#2650](https://github.com/niklasvh/html2canvas/issues/2650)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.2.2](https://github.com/niklasvh/html2canvas/compare/v1.2.1...v1.2.2) (2021-08-10)
|
||||||
|
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* add ios15 target (#2564) ([e429e04](https://github.com/niklasvh/html2canvas/commit/e429e0443adf5c7ca3041b97a8157b8911302206)), closes [#2564](https://github.com/niklasvh/html2canvas/issues/2564)
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* update test previewer (#2637) ([7a06d0c](https://github.com/niklasvh/html2canvas/commit/7a06d0c2c2f3b8a1d1a8a85c540f8288b782e8c6)), closes [#2637](https://github.com/niklasvh/html2canvas/issues/2637)
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* parsing counter content in pseudo element (#2640) ([1941b9e](https://github.com/niklasvh/html2canvas/commit/1941b9e0acfd9243da0beaf70e1643cab1b4a963)), closes [#2640](https://github.com/niklasvh/html2canvas/issues/2640)
|
||||||
|
* radial gradient ry check (#2631) ([a0dd38a](https://github.com/niklasvh/html2canvas/commit/a0dd38a8be4e540ae1c1f4b4e41f6c386f3e454f)), closes [#2631](https://github.com/niklasvh/html2canvas/issues/2631)
|
||||||
|
* test for ios range line break error (#2635) ([f43f942](https://github.com/niklasvh/html2canvas/commit/f43f942fcd793dde9cdc6c0438f379ec3c05c405)), closes [#2635](https://github.com/niklasvh/html2canvas/issues/2635)
|
||||||
|
|
||||||
|
### test
|
||||||
|
|
||||||
|
* large base64 encoded background (#2636) ([e36408a](https://github.com/niklasvh/html2canvas/commit/e36408ad030fe31acd9969a37fe24c1621c0bd04)), closes [#2636](https://github.com/niklasvh/html2canvas/issues/2636)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.2.1](https://github.com/niklasvh/html2canvas/compare/v1.2.0...v1.2.1) (2021-08-05)
|
||||||
|
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* none image (#2627) ([6651fc6](https://github.com/niklasvh/html2canvas/commit/6651fc6789d5902d171dc53b4094887870433018)), closes [#2627](https://github.com/niklasvh/html2canvas/issues/2627)
|
||||||
|
* type import that is only available ts 3.8 or higher (#2629) ([c5c6fa0](https://github.com/niklasvh/html2canvas/commit/c5c6fa00d71f36ef963ba5170ebc7b668d39c407)), closes [#2629](https://github.com/niklasvh/html2canvas/issues/2629)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [1.2.0](https://github.com/niklasvh/html2canvas/compare/v1.1.5...v1.2.0) (2021-08-04)
|
||||||
|
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* element cropping & scrolling (#2625) ([878e37a](https://github.com/niklasvh/html2canvas/commit/878e37a24272d0412fe589975ef8eed931c56e0b)), closes [#2625](https://github.com/niklasvh/html2canvas/issues/2625)
|
||||||
|
* overflow-wrap break-word (#2626) ([95a46b0](https://github.com/niklasvh/html2canvas/commit/95a46b00c53563722c035a0e45fdf5fb507275e4)), closes [#2626](https://github.com/niklasvh/html2canvas/issues/2626)
|
||||||
|
|
||||||
|
### test
|
||||||
|
|
||||||
|
* element with scrolled window (#2624) ([1338c7b](https://github.com/niklasvh/html2canvas/commit/1338c7b203535d53509416358d74014200a994eb)), closes [#2624](https://github.com/niklasvh/html2canvas/issues/2624)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.1.5](https://github.com/niklasvh/html2canvas/compare/v1.1.4...v1.1.5) (2021-08-02)
|
||||||
|
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* update README to github discussion Q/A ([5dea36b](https://github.com/niklasvh/html2canvas/commit/5dea36bd6964164e8ba3f8780309e792f5d16255))
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* emoji line breaking (fix #1813) (#2621) ([7d788c6](https://github.com/niklasvh/html2canvas/commit/7d788c6f3d221b87f6b59fcda8517731340b2d1f)), closes [#1813](https://github.com/niklasvh/html2canvas/issues/1813) [#2621](https://github.com/niklasvh/html2canvas/issues/2621) [#1813](https://github.com/niklasvh/html2canvas/issues/1813)
|
||||||
|
* natural sizes for images with srcset (#2622) ([96e23d1](https://github.com/niklasvh/html2canvas/commit/96e23d185198b7131cf0cfa31c14c165790464e9)), closes [#2622](https://github.com/niklasvh/html2canvas/issues/2622)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.1.4](https://github.com/niklasvh/html2canvas/compare/v1.1.3...v1.1.4) (2021-07-15)
|
||||||
|
|
||||||
|
|
||||||
|
### feat
|
||||||
|
|
||||||
|
* add support for webkit-text-stroke and paint-order (#2591) ([522e5aa](https://github.com/niklasvh/html2canvas/commit/522e5aac5fdad090953d095b5d558053a5e2d43d)), closes [#2591](https://github.com/niklasvh/html2canvas/issues/2591)
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* don't copy 'all' css property (#2586) ([fa60716](https://github.com/niklasvh/html2canvas/commit/fa60716d07ed590ec64543a586a7960cbc8557df)), closes [#2586](https://github.com/niklasvh/html2canvas/issues/2586)
|
||||||
|
* svg d path getting truncated on copy (#2589) ([dd6d885](https://github.com/niklasvh/html2canvas/commit/dd6d8856eca820a13a0990c467b9e531433fd4a9)), closes [#2589](https://github.com/niklasvh/html2canvas/issues/2589)
|
||||||
|
* text position for form elements and list markers (#2588) ([cd99f11](https://github.com/niklasvh/html2canvas/commit/cd99f11b1b9eb1260a548a63e2a370a0a5ddafa0)), closes [#2588](https://github.com/niklasvh/html2canvas/issues/2588)
|
||||||
|
* this.canvas.ownerDocument is undefined (#2590) ([45efe54](https://github.com/niklasvh/html2canvas/commit/45efe54da8145f97b9ee0463e686103280e3c8b1)), closes [#2590](https://github.com/niklasvh/html2canvas/issues/2590)
|
||||||
|
* word-break seperators (#2593) ([e9f7f48](https://github.com/niklasvh/html2canvas/commit/e9f7f48d571304be14610a181feedca3c3b42864)), closes [#2593](https://github.com/niklasvh/html2canvas/issues/2593)
|
||||||
|
|
||||||
|
### test
|
||||||
|
|
||||||
|
* refactor language tests (#2594) ([4c360fc](https://github.com/niklasvh/html2canvas/commit/4c360fc1f059f4dcab71a79f9dc8a5b2e25411ea)), closes [#2594](https://github.com/niklasvh/html2canvas/issues/2594)
|
||||||
|
* update box-shadow with radius ([578bb77](https://github.com/niklasvh/html2canvas/commit/578bb771bfeb7e81362e9e355d6cc9ae910e3920))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.1.3](https://github.com/niklasvh/html2canvas/compare/v1.1.2...v1.1.3) (2021-07-14)
|
||||||
|
|
||||||
|
|
||||||
|
### feat
|
||||||
|
|
||||||
|
* allow access to reference element in onclone (#2584) ([58b4591](https://github.com/niklasvh/html2canvas/commit/58b45911741c0dbbccd462b2976560bb3999eaef)), closes [#2584](https://github.com/niklasvh/html2canvas/issues/2584)
|
||||||
|
* support for custom and slot elements (#2581) ([acb4cd2](https://github.com/niklasvh/html2canvas/commit/acb4cd24b85527908c02a60794768949578678f0)), closes [#2581](https://github.com/niklasvh/html2canvas/issues/2581)
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* iframe load to ensure images are loaded (#2577) ([eeb5a3e](https://github.com/niklasvh/html2canvas/commit/eeb5a3ea1d6c94e0f6dcfd40695eb88ebb3e0041)), closes [#2577](https://github.com/niklasvh/html2canvas/issues/2577)
|
||||||
|
* image blob rendering ([1acdc82](https://github.com/niklasvh/html2canvas/commit/1acdc827a4e05933c2f7c9558405c66b7cd82f58))
|
||||||
|
* responsive svg images (#2583) ([92fa448](https://github.com/niklasvh/html2canvas/commit/92fa448913192d5e4e82bfe14f6644b669d4e6ef)), closes [#2583](https://github.com/niklasvh/html2canvas/issues/2583)
|
||||||
|
|
||||||
|
### test
|
||||||
|
|
||||||
|
* add test cases for text-stroke and textarea from (#1540 and #2132) (#2585) ([1d00bfe](https://github.com/niklasvh/html2canvas/commit/1d00bfe175d51e663d0bae88b6dbd10a266a71f1)), closes [#1540](https://github.com/niklasvh/html2canvas/issues/1540) [#2132](https://github.com/niklasvh/html2canvas/issues/2132) [#2585](https://github.com/niklasvh/html2canvas/issues/2585)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.1.2](https://github.com/niklasvh/html2canvas/compare/v1.1.1...v1.1.2) (2021-07-13)
|
||||||
|
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* implement screenshot diffing (#2571) ([e29af58](https://github.com/niklasvh/html2canvas/commit/e29af586618125bbad10ad6bee3d69fddbc5d22a)), closes [#2571](https://github.com/niklasvh/html2canvas/issues/2571)
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* logger unique names (#2575) ([1715854](https://github.com/niklasvh/html2canvas/commit/171585491dd1bee4f30691328bd22e978f3ac79e)), closes [#2575](https://github.com/niklasvh/html2canvas/issues/2575)
|
||||||
|
* text-shadow position with baseline (#2576) ([439e365](https://github.com/niklasvh/html2canvas/commit/439e365ea8c703b528778a268dcfc3bf9ccad6a9)), closes [#2576](https://github.com/niklasvh/html2canvas/issues/2576)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.1.1](https://github.com/niklasvh/html2canvas/compare/v1.1.0...v1.1.1) (2021-07-12)
|
||||||
|
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* allow proxy url with parameters (#2100) ([a4a3ce8](https://github.com/niklasvh/html2canvas/commit/a4a3ce8a2eb6a4f43f1bc9a7935eb16f2b98a3cd)), closes [#2100](https://github.com/niklasvh/html2canvas/issues/2100)
|
||||||
|
* crash on background-size with calc() (fix #2469) (#2569) ([084017a](https://github.com/niklasvh/html2canvas/commit/084017a67319a993d73c6bdf612dd8532f1b8dbe)), closes [#2469](https://github.com/niklasvh/html2canvas/issues/2469) [#2569](https://github.com/niklasvh/html2canvas/issues/2569)
|
||||||
|
* handle unhandled promise rejections (#2568) ([4555940](https://github.com/niklasvh/html2canvas/commit/4555940d0bc17b7fd9327dd0164c382a3dbf1858)), closes [#2568](https://github.com/niklasvh/html2canvas/issues/2568)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [1.1.0](https://github.com/niklasvh/html2canvas/compare/v1.0.0...v1.1.0) (2021-07-11)
|
||||||
|
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* fail build if no artifacts uploaded (#2566) ([e7a021a](https://github.com/niklasvh/html2canvas/commit/e7a021ab931f3c0de060b4643e88fad85345c3d3)), closes [#2566](https://github.com/niklasvh/html2canvas/issues/2566)
|
||||||
|
|
||||||
|
### deps
|
||||||
|
|
||||||
|
* update dependencies with lint fixes (#2565) ([b2902ec](https://github.com/niklasvh/html2canvas/commit/b2902ec31c2a414ea26f864f8e00aa8846890ffc)), closes [#2565](https://github.com/niklasvh/html2canvas/issues/2565)
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* update border-style support ([cf35a28](https://github.com/niklasvh/html2canvas/commit/cf35a282b2c9d41b601c3148e8c08fe7ba61a5f9))
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* Ensure resizeImage's canvas has at least 1px of width and height (#2409) ([bb92371](https://github.com/niklasvh/html2canvas/commit/bb9237155cf0ec090432ee6c5d9c555eb6ffa81f)), closes [#2409](https://github.com/niklasvh/html2canvas/issues/2409)
|
||||||
|
* text-decoration-line fallback (#2088) (#2567) ([44296e5](https://github.com/niklasvh/html2canvas/commit/44296e529368140ec06a937383e05f3074b19ee2)), closes [#2088](https://github.com/niklasvh/html2canvas/issues/2088) [#2567](https://github.com/niklasvh/html2canvas/issues/2567)
|
||||||
|
* use baseline for text positioning (#2109) ([85f79c1](https://github.com/niklasvh/html2canvas/commit/85f79c1a5e4c0b422ace552c430dd389c8477a44)), closes [#2109](https://github.com/niklasvh/html2canvas/issues/2109)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [1.0.0](https://github.com/niklasvh/html2canvas/compare/v1.0.0-rc.7...v1.0.0) (2021-07-04)
|
||||||
|
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* update docs publish action (#2451) ([7222aba](https://github.com/niklasvh/html2canvas/commit/7222aba1b42138c3d466525172411b3d9869095f)), closes [#2451](https://github.com/niklasvh/html2canvas/issues/2451)
|
||||||
|
|
||||||
|
### deps
|
||||||
|
|
||||||
|
* update www deps (#2525) ([2a013e2](https://github.com/niklasvh/html2canvas/commit/2a013e20c814b7dbaea98f54f0bde8f553eb79a2)), closes [#2525](https://github.com/niklasvh/html2canvas/issues/2525)
|
||||||
|
|
||||||
|
### feat
|
||||||
|
|
||||||
|
* add support for border-style dashed, dotted, double (#2531) ([72cd528](https://github.com/niklasvh/html2canvas/commit/72cd5284296e4cdb3fe88f2982ec7528604b6618))
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* opacity with overflow hidden (#2450) ([82b7da5](https://github.com/niklasvh/html2canvas/commit/82b7da558c342e7f53d298bb1d843a5db86c3b21)), closes [#2450](https://github.com/niklasvh/html2canvas/issues/2450)
|
||||||
|
* top right border radius (#2522) ([ba17267](https://github.com/niklasvh/html2canvas/commit/ba172678f07f962e9f54b398df087e86217d7a13))
|
||||||
|
|
||||||
|
### test
|
||||||
|
|
||||||
|
* update karma runner (#2524) ([ff35c7d](https://github.com/niklasvh/html2canvas/commit/ff35c7dbd33f863f5b614d778baf8cb1e8dded60)), closes [#2524](https://github.com/niklasvh/html2canvas/issues/2524)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [1.0.0-rc.7](https://github.com/niklasvh/html2canvas/compare/v1.0.0-rc.6...v1.0.0-rc.7) (2020-08-09)
|
||||||
|
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* concatenate contiguous font-family tokens (#2219) ([bacfadf](https://github.com/niklasvh/html2canvas/commit/bacfadff96d907d9e8ab4ef515ca6487de9e51fc)), closes [#2219](https://github.com/niklasvh/html2canvas/issues/2219)
|
||||||
|
* external styles on svg elements (#2320) ([1514220](https://github.com/niklasvh/html2canvas/commit/1514220812cfb22d64d0974558d9c14fe90a41d3)), closes [#2320](https://github.com/niklasvh/html2canvas/issues/2320)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [1.0.0-rc.6](https://github.com/niklasvh/html2canvas/compare/v1.0.0-rc.5...v1.0.0-rc.6) (2020-08-08)
|
||||||
|
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* Azure Pipelines: upgrade from macOS 10.13 -> 10.14 (#2204) ([c366e87](https://github.com/niklasvh/html2canvas/commit/c366e8790d346ea981b24b7425aef6bf6d7ebcec)), closes [#2204](https://github.com/niklasvh/html2canvas/issues/2204)
|
||||||
|
* build docs (#2305) ([51de347](https://github.com/niklasvh/html2canvas/commit/51de34787ad8aba3f213800be45e878cddb064e9)), closes [#2305](https://github.com/niklasvh/html2canvas/issues/2305)
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* #1868 Clone node, Setting className for SVG element raises error (#2079) ([f139b51](https://github.com/niklasvh/html2canvas/commit/f139b513c5cf9673dc727fd47124e0d779891e3a)), closes [#1868](https://github.com/niklasvh/html2canvas/issues/1868) [#2079](https://github.com/niklasvh/html2canvas/issues/2079) [#1868](https://github.com/niklasvh/html2canvas/issues/1868)
|
||||||
|
* image loading="lazy" fix #2312 (#2314) ([f23e6f6](https://github.com/niklasvh/html2canvas/commit/f23e6f6f2690dc0dbd02621c3bb81025904e6647)), closes [#2312](https://github.com/niklasvh/html2canvas/issues/2312) [#2314](https://github.com/niklasvh/html2canvas/issues/2314)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [1.0.0-rc.5](https://github.com/niklasvh/html2canvas/compare/v1.0.0-rc.4...v1.0.0-rc.5) (2019-09-27)
|
||||||
|
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* correctly respect logging option (#2013) ([34b06d6365603c3b16664ab7804efe94c7945946](https://github.com/niklasvh/html2canvas/commit/34b06d6365603c3b16664ab7804efe94c7945946)), closes [#2013](https://github.com/niklasvh/html2canvas/issues/2013)
|
||||||
|
* safari pseudo element content parsing (#2018) ([3f599103fb139f218ffe917800e74af2c7cc7ad5](https://github.com/niklasvh/html2canvas/commit/3f599103fb139f218ffe917800e74af2c7cc7ad5)), closes [#2018](https://github.com/niklasvh/html2canvas/issues/2018)
|
||||||
|
* using existing canvas option (#2017) ([076492042a73d67b30e4562f2964200e07d25f5e](https://github.com/niklasvh/html2canvas/commit/076492042a73d67b30e4562f2964200e07d25f5e)), closes [#2017](https://github.com/niklasvh/html2canvas/issues/2017)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [1.0.0-rc.4](https://github.com/niklasvh/html2canvas/compare/v1.0.0-rc.3...v1.0.0-rc.4) (2019-09-22)
|
||||||
|
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* fix typo (#1864) ([9a63797aa7fb81454008745d2a1c069ca24339a4](https://github.com/niklasvh/html2canvas/commit/9a63797aa7fb81454008745d2a1c069ca24339a4)), closes [#1864](https://github.com/niklasvh/html2canvas/issues/1864)
|
||||||
|
|
||||||
|
### feat
|
||||||
|
|
||||||
|
* ignore unsupported image functions (#1873) ([61f4819e02102b112513d57b16ec7d37e989af20](https://github.com/niklasvh/html2canvas/commit/61f4819e02102b112513d57b16ec7d37e989af20)), closes [#1873](https://github.com/niklasvh/html2canvas/issues/1873)
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* correctly render partial borders (fix #1920) (#2010) ([eedb81ef9e114366a7e286e975659360cf9d0983](https://github.com/niklasvh/html2canvas/commit/eedb81ef9e114366a7e286e975659360cf9d0983)), closes [#1920](https://github.com/niklasvh/html2canvas/issues/1920) [#2010](https://github.com/niklasvh/html2canvas/issues/2010)
|
||||||
|
* nested z-index ordering (#2011) ([00555cf1efddfed5877811d8a03a326f9943ab06](https://github.com/niklasvh/html2canvas/commit/00555cf1efddfed5877811d8a03a326f9943ab06)), closes [#2011](https://github.com/niklasvh/html2canvas/issues/2011) [#1978](https://github.com/niklasvh/html2canvas/issues/1978)
|
||||||
|
* null backgroundColor option as transparent (#2012) ([7d3456b78c37e7333db087601805b32ec7ca0253](https://github.com/niklasvh/html2canvas/commit/7d3456b78c37e7333db087601805b32ec7ca0253)), closes [#2012](https://github.com/niklasvh/html2canvas/issues/2012)
|
||||||
|
* zero size iframe rendering (#1863) ([81dcf7b6be66920260a60908aa4b86e7530f6e17](https://github.com/niklasvh/html2canvas/commit/81dcf7b6be66920260a60908aa4b86e7530f6e17)), closes [#1863](https://github.com/niklasvh/html2canvas/issues/1863)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [1.0.0-rc.3](https://github.com/niklasvh/html2canvas/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2019-05-30)
|
||||||
|
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* stack exceeding for css tokenizer (#1862) ([cbaecdca28cfaf9bd854e1b0c005cc8058208b36](https://github.com/niklasvh/html2canvas/commit/cbaecdca28cfaf9bd854e1b0c005cc8058208b36)), closes [#1862](https://github.com/niklasvh/html2canvas/issues/1862)
|
||||||
|
* typescript options type definition (#1861) ([cae44a6f0a6649bd8a7c4250a20792bb5c2e5b42](https://github.com/niklasvh/html2canvas/commit/cae44a6f0a6649bd8a7c4250a20792bb5c2e5b42)), closes [#1861](https://github.com/niklasvh/html2canvas/issues/1861)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [1.0.0-rc.2](https://github.com/niklasvh/html2canvas/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2019-05-29)
|
||||||
|
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* refactor browser tests (#1804) ([a7d881019bfe1fd6404c341ca1c6fa69e0274ef5](https://github.com/niklasvh/html2canvas/commit/a7d881019bfe1fd6404c341ca1c6fa69e0274ef5)), closes [#1804](https://github.com/niklasvh/html2canvas/issues/1804)
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* fix README documentation ([20a797cbeb21baca4ce5b9a0642a5959cdf94a51](https://github.com/niklasvh/html2canvas/commit/20a797cbeb21baca4ce5b9a0642a5959cdf94a51))
|
||||||
|
* remove dead donation link (fix #1802) ([43058241b420a5dabe94b0a4e4f6534d16a75ec0](https://github.com/niklasvh/html2canvas/commit/43058241b420a5dabe94b0a4e4f6534d16a75ec0)), closes [#1802](https://github.com/niklasvh/html2canvas/issues/1802)
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* multi token overflow #1850 (#1851) ([409674fba6f8038eb174b9c89360ef8b342971e9](https://github.com/niklasvh/html2canvas/commit/409674fba6f8038eb174b9c89360ef8b342971e9)), closes [#1850](https://github.com/niklasvh/html2canvas/issues/1850) [#1851](https://github.com/niklasvh/html2canvas/issues/1851)
|
||||||
|
|
||||||
|
### test
|
||||||
|
|
||||||
|
* include reftests previewer with docs website (#1799) ([cdc4ca8296570bf842e937c6fb7cc32a1ce2bc09](https://github.com/niklasvh/html2canvas/commit/cdc4ca8296570bf842e937c6fb7cc32a1ce2bc09)), closes [#1799](https://github.com/niklasvh/html2canvas/issues/1799)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [1.0.0-rc.1](https://github.com/niklasvh/html2canvas/compare/v1.0.0-rc.0...v1.0.0-rc.1) (2019-04-10)
|
||||||
|
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* add ios simulator tests (#1794) ([a63cb3c0f132b1af915d9ef55a4c174f6e5502ce](https://github.com/niklasvh/html2canvas/commit/a63cb3c0f132b1af915d9ef55a4c174f6e5502ce)), closes [#1794](https://github.com/niklasvh/html2canvas/issues/1794)
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* fix release date in changelog ([238de790a9f223becbc8726633c0f2a2dabf2cb7](https://github.com/niklasvh/html2canvas/commit/238de790a9f223becbc8726633c0f2a2dabf2cb7))
|
||||||
|
* remove invalid `async` option from docs (fix #1769) (#1796) ([7775d3c0d6f3efca00611bedd5fc9200689a9f7a](https://github.com/niklasvh/html2canvas/commit/7775d3c0d6f3efca00611bedd5fc9200689a9f7a)), closes [#1769](https://github.com/niklasvh/html2canvas/issues/1769) [#1796](https://github.com/niklasvh/html2canvas/issues/1796)
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* context scale for high resolution displays with foreignobjectrendering (#1782) ([7027900f4993dcd00745a4db045ed1c0e3255f8a](https://github.com/niklasvh/html2canvas/commit/7027900f4993dcd00745a4db045ed1c0e3255f8a)), closes [#1782](https://github.com/niklasvh/html2canvas/issues/1782)
|
||||||
|
* don't apply text shadows on elements (#1795) ([397595afb59ee50f0d128abb5945b5b9ddc6650d](https://github.com/niklasvh/html2canvas/commit/397595afb59ee50f0d128abb5945b5b9ddc6650d)), closes [#1795](https://github.com/niklasvh/html2canvas/issues/1795)
|
||||||
|
* safari data url taints (#1797) ([4e4a231683904dfdc1f82472ece5a160a158dbb8](https://github.com/niklasvh/html2canvas/commit/4e4a231683904dfdc1f82472ece5a160a158dbb8)), closes [#1797](https://github.com/niklasvh/html2canvas/issues/1797)
|
||||||
|
|
||||||
|
### test
|
||||||
|
|
||||||
|
* fix RefTestRenderer.js inclusion with karma ([49f87fb680dbfe1898b3aeb60f2f5c3a93bfbe6d](https://github.com/niklasvh/html2canvas/commit/49f87fb680dbfe1898b3aeb60f2f5c3a93bfbe6d))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [1.0.0-rc.0](https://github.com/niklasvh/html2canvas/compare/v1.0.0-alpha.12...v1.0.0-rc.0) (2019-04-07)
|
||||||
|
|
||||||
|
|
||||||
|
### build
|
||||||
|
|
||||||
|
* update webpack and babel (#1793) ([44f3d79f68836624c2673a86f9ad47c17ef843c3](https://github.com/niklasvh/html2canvas/commit/44f3d79f68836624c2673a86f9ad47c17ef843c3)), closes [#1793](https://github.com/niklasvh/html2canvas/issues/1793)
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* automate changelog generation (#1792) ([7ebef72e927eaafd34a1792ece431d2a73109230](https://github.com/niklasvh/html2canvas/commit/7ebef72e927eaafd34a1792ece431d2a73109230)), closes [#1792](https://github.com/niklasvh/html2canvas/issues/1792)
|
||||||
|
* Improve CI pipeline (#1790) ([c45ef099fe8f7142e174f4fce39448a370a987d5](https://github.com/niklasvh/html2canvas/commit/c45ef099fe8f7142e174f4fce39448a370a987d5)), closes [#1790](https://github.com/niklasvh/html2canvas/issues/1790)
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* improve canvas size limit documentation (#1576) ([3212184146b33c3564c2f416e1bfda911737c38b](https://github.com/niklasvh/html2canvas/commit/3212184146b33c3564c2f416e1bfda911737c38b)), closes [#1576](https://github.com/niklasvh/html2canvas/issues/1576)
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* enforce colorstop min 0 (#1743) ([349bbf137abd83464e074db3948fc79a541c2ef3](https://github.com/niklasvh/html2canvas/commit/349bbf137abd83464e074db3948fc79a541c2ef3)), closes [#1743](https://github.com/niklasvh/html2canvas/issues/1743)
|
||||||
|
* prevent unhandled promise rejections for hidden frames (#1762) ([5cbe5db35155e3a9790a30de09feb17843053b7a](https://github.com/niklasvh/html2canvas/commit/5cbe5db35155e3a9790a30de09feb17843053b7a)), closes [#1762](https://github.com/niklasvh/html2canvas/issues/1762)
|
||||||
|
* wrap .sheet.cssRules access in try...catch. (#1693) ([2c018d19875ced30caafdc40f84ca531de6e6f91](https://github.com/niklasvh/html2canvas/commit/2c018d19875ced30caafdc40f84ca531de6e6f91)), closes [#1693](https://github.com/niklasvh/html2canvas/issues/1693)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [1.0.0-alpha.12](https://github.com/niklasvh/html2canvas/compare/v1.0.0-alpha.12...v1.0.0-alpha.13) (2018-04-05)
|
||||||
|
* Fix white space appearing on element rendering (Fix #1438)
|
||||||
|
* Reset canvas transform on finish (Fix #1494)
|
||||||
|
|
||||||
|
# v1.0.0-alpha.11 - 1.4.2018
|
||||||
|
* Fix IE11 member not found error
|
||||||
|
* Support blob image resources in non-foreignObjectRendering mode
|
||||||
|
|
||||||
|
# v1.0.0-alpha.10 - 15.2.2018
|
||||||
|
* Re-introduce `onclone` option (Fix #1434)
|
||||||
|
* Add `ignoreElements` predicate function option
|
||||||
|
* Fix version console logging
|
||||||
|
|
||||||
|
# v1.0.0-alpha.9 - 7.1.2018
|
||||||
|
* Fix dynamic style sheets
|
||||||
|
* Fix > 50% border-radius values
|
||||||
|
|
||||||
|
# v1.0.0-alpha.8 - 2.1.2018
|
||||||
|
* Use correct doctype in cloned Document (Fix #1298)
|
||||||
|
* Fix individual border rendering (Fix #1349)
|
||||||
|
|
||||||
|
# v1.0.0-alpha.7 - 31.12.2017
|
||||||
|
* Fix form input rendering (#1338)
|
||||||
|
* Improve word line breaking algorithm
|
||||||
|
|
||||||
|
# v1.0.0-alpha.6 - 28.12.2017
|
||||||
|
* Fix list-style: none (#1340)
|
||||||
|
* Extend supported values for pseudo element content
|
||||||
|
|
||||||
|
# v1.0.0-alpha.5 - 21.12.2017
|
||||||
|
* Fix underline positioning
|
||||||
|
* Fix canvas rendering on Chrome
|
||||||
|
* Fix overflow: auto
|
||||||
|
* Added support for rendering list-style
|
||||||
|
|
||||||
|
v1.0.0-alpha.4 - 12.12.2017
|
||||||
|
* Fix rendering with multiple fonts defined (Fix #796)
|
||||||
|
* Add support for radial-gradients
|
||||||
|
* Fix logging option (#1302)
|
||||||
|
* Add support for rendering webgl canvas content (#646)
|
||||||
|
* Fix external SVG loading with proxies (#802)
|
||||||
|
|
||||||
|
# v1.0.0-alpha.3 - 9.12.2017
|
||||||
|
* Disable `foreignObjectRendering` by default (#1295)
|
||||||
|
* Fix background-size when using background-origin and background-size: cover/contain (#1299)
|
||||||
|
* Added support for background-origin: content-box (#1299)
|
||||||
|
|
||||||
|
# v1.0.0-alpha.2 - 7.12.2017
|
||||||
|
* Fix scroll positions for CanvasRenderer (#1259)
|
||||||
|
* Fix `data-html2canvas-ignore` attribute (#1253)
|
||||||
|
* Fix decimal `letter-spacing` values (#1293)
|
||||||
|
|
||||||
|
# v1.0.0-alpha.1 - 5.12.2017
|
||||||
|
* Complete rewrite of library
|
||||||
|
##### Breaking Changes #####
|
||||||
|
* Remove deprecated onrendered callback, calling `html2canvas` returns a `Promise<HTMLCanvasElement>`
|
||||||
|
* Removed option `type`, same results can be achieved by assigning `x`, `y`, `scrollX`, `scrollY`, `width` and `height` properties.
|
||||||
|
|
||||||
|
## New featues / fixes
|
||||||
|
* Add support for scaling canvas (defaults to device pixel ratio)
|
||||||
|
* Add support for multiple text-shadows
|
||||||
|
* Add support for multiple text-decorations
|
||||||
|
* Add support for text-decoration-color
|
||||||
|
* Add support for percentage values for border-radius
|
||||||
|
* Correctly handle px and percentage values in linear-gradients
|
||||||
|
* Correctly support all angle types for linear-gradients
|
||||||
|
* Add support for multiple values for background-repeat, background-position and background-size
|
||||||
|
|
||||||
|
# v0.5.0-beta4 - 23.1.2016
|
||||||
|
* Fix logger requiring access to window object
|
||||||
|
* Derequire browserify build
|
||||||
|
* Fix rendering of specific elements when window is scrolled and `type` isn't set to `view`
|
||||||
|
|
||||||
|
# v0.5.0-beta3 - 6.12.2015
|
||||||
|
* Handle color names in linear gradients
|
||||||
|
|
||||||
|
# v0.5.0-beta2 - 20.10.2015
|
||||||
|
* Remove Promise polyfill (use native or provide it yourself)
|
||||||
|
|
||||||
|
# v0.5.0-beta1 - 19.10.2015
|
||||||
|
* Fix bug with unmatched color stops in gradients
|
||||||
|
* Fix scrolling issues with iOS
|
||||||
|
* Correctly handle named colors in gradients
|
||||||
|
* Accept matrix3d transforms
|
||||||
|
* Fix transparent colors breaking gradients
|
||||||
|
* Preserve scrolling positions on render
|
||||||
|
|
||||||
|
# v0.5.0-alpha2 - 3.2.2015
|
||||||
|
* Switch to using browserify for building
|
||||||
|
* Fix (#517) Chrome stretches background images with 'auto' or single attributes
|
||||||
|
|
||||||
|
# v0.5.0-alpha - 19.1.2015
|
||||||
|
* Complete rewrite of library
|
||||||
|
* Switched interface to return Promise
|
||||||
|
* Uses hidden iframe window to perform rendering, allowing async rendering and doesn't force the viewport to be scrolled to the top anymore.
|
||||||
|
* Better support for unicode
|
||||||
|
* Checkbox/radio button rendering
|
||||||
|
* SVG rendering
|
||||||
|
* iframe rendering
|
||||||
|
* Changed format for proxy requests, permitting binary responses with CORS headers as well
|
||||||
|
* Fixed many layering issues (see z-index tests)
|
||||||
|
|
||||||
|
# v0.4.1 - 7.9.2013
|
||||||
|
* Added support for bower
|
||||||
|
* Improved z-index ordering
|
||||||
|
* Basic implementation for CSS transformations
|
||||||
|
* Fixed inline text in top element
|
||||||
|
* Basic implementation for text-shadow
|
||||||
|
|
||||||
|
# v0.4.0 - 30.1.2013
|
||||||
|
* Added rendering tests with <a href="https://github.com/niklasvh/webdriver.js">webdriver</a>
|
||||||
|
* Switched to using grunt for building
|
||||||
|
* Removed support for IE<9, including any FlashCanvas bits
|
||||||
|
* Support for border-radius
|
||||||
|
* Support for multiple background images, size, and clipping
|
||||||
|
* Support for :before and :after pseudo elements
|
||||||
|
* Support for placeholder rendering
|
||||||
|
* Reformatted all tests to small units to test specific features
|
||||||
|
|
||||||
|
# v0.3.4 - 26.6.2012
|
||||||
|
|
||||||
|
* Removed (last?) jQuery dependencies (<a href="https://github.com/niklasvh/html2canvas/commit/343b86705fe163766fcf735eb0217130e4bd5b17">niklasvh</a>)
|
||||||
|
* SVG-powered rendering (<a href="https://github.com/niklasvh/html2canvas/commit/67d3e0d0f59a5a654caf71a2e3be6494ff146c75">niklasvh</a>)
|
||||||
|
* Radial gradients (<a href="https://github.com/niklasvh/html2canvas/commit/4f22c18043a73c0c3bbf3b5e4d62714c56acd3c7">SunboX</a>)
|
||||||
|
* Split renderers to their own objects (<a href="https://github.com/niklasvh/html2canvas/commit/94f2f799a457cd29a21cc56ef8c06f1697866739">niklasvh</a>)
|
||||||
|
* Simplified API, cleaned up code (<a href="https://github.com/niklasvh/html2canvas/commit/c7d526c9eaa6a4abf4754d205fe1dee360c7660e">niklasvh</a>)
|
||||||
|
|
||||||
|
# v0.3.3 - 2.3.2012
|
||||||
|
|
||||||
|
* SVG taint fix, and additional taint testing options for rendering (<a href="https://github.com/niklasvh/html2canvas/commit/2dc8b9385e656696cb019d615bdfa1d98b17d5d4">niklasvh</a>)
|
||||||
|
* Added support for CORS images and option to create canvas as tainted (<a href="https://github.com/niklasvh/html2canvas/commit/3ad49efa0032cde25c6ed32a39e35d1505d3b2ef">niklasvh</a>)
|
||||||
|
* Improved minification saved ~1K! (<a href="https://github.com/cobexer/html2canvas/commit/b82be022b2b9240bd503e078ac980bde2b953e43">cobexer</a>)
|
||||||
|
* Added integrated support for Flashcanvas (<a href="https://github.com/niklasvh/html2canvas/commit/e9257191519f67d74fd5e364d8dee3c0963ba5fc">niklasvh</a>)
|
||||||
|
* Fixed a variety of legacy IE bugs (<a href="https://github.com/niklasvh/html2canvas/commit/b65357c55d0701017bafcd357bc654b54d458f8f">niklasvh</a>)
|
||||||
|
|
||||||
|
# v0.3.2 - 20.2.2012
|
||||||
|
|
||||||
|
* Added changelog!
|
||||||
|
* Added bookmarklet (<a href="https://github.com/niklasvh/html2canvas/commit/b320dd306e1a2d32a3bc5a71b6ebf6d8c060cde5">cobexer</a>)
|
||||||
|
* Option to select single element to render (<a href="https://github.com/niklasvh/html2canvas/commit/0cb252ada91c84ef411288b317c03e97da1f12ad">niklasvh</a>)
|
||||||
|
* Fixed closure compiler warnings (<a href="https://github.com/niklasvh/html2canvas/commit/36ff1ec7aadcbdf66851a0b77f0b9e87e4a8e4a1">cobexer</a>)
|
||||||
|
* Enable profiling in FF (<a href="https://github.com/niklasvh/html2canvas/commit/bbd75286a8406cf9e5aea01fdb7950d547edefb9">cobexer</a>)
|
22
node_modules/html2canvas/LICENSE
generated
vendored
Normal file
22
node_modules/html2canvas/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
Copyright (c) 2012 Niklas von Hertzen
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person
|
||||||
|
obtaining a copy of this software and associated documentation
|
||||||
|
files (the "Software"), to deal in the Software without
|
||||||
|
restriction, including without limitation the rights to use,
|
||||||
|
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the
|
||||||
|
Software is furnished to do so, subject to the following
|
||||||
|
conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
73
node_modules/html2canvas/README.md
generated
vendored
Normal file
73
node_modules/html2canvas/README.md
generated
vendored
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
html2canvas
|
||||||
|
===========
|
||||||
|
|
||||||
|
[Homepage](https://html2canvas.hertzen.com) | [Downloads](https://github.com/niklasvh/html2canvas/releases) | [Questions](https://github.com/niklasvh/html2canvas/discussions/categories/q-a)
|
||||||
|
|
||||||
|
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/niklasvh/html2canvas?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||||
|
![CI](https://github.com/niklasvh/html2canvas/workflows/CI/badge.svg?branch=master)
|
||||||
|
[![NPM Downloads](https://img.shields.io/npm/dm/html2canvas.svg)](https://www.npmjs.org/package/html2canvas)
|
||||||
|
[![NPM Version](https://img.shields.io/npm/v/html2canvas.svg)](https://www.npmjs.org/package/html2canvas)
|
||||||
|
|
||||||
|
#### JavaScript HTML renderer ####
|
||||||
|
|
||||||
|
The script allows you to take "screenshots" of webpages or parts of it, directly on the users browser. The screenshot is based on the DOM and as such may not be 100% accurate to the real representation as it does not make an actual screenshot, but builds the screenshot based on the information available on the page.
|
||||||
|
|
||||||
|
|
||||||
|
### How does it work? ###
|
||||||
|
The script renders the current page as a canvas image, by reading the DOM and the different styles applied to the elements.
|
||||||
|
|
||||||
|
It does **not require any rendering from the server**, as the whole image is created on the **client's browser**. However, as it is heavily dependent on the browser, this library is *not suitable* to be used in nodejs.
|
||||||
|
It doesn't magically circumvent any browser content policy restrictions either, so rendering cross-origin content will require a [proxy](https://github.com/niklasvh/html2canvas/wiki/Proxies) to get the content to the [same origin](http://en.wikipedia.org/wiki/Same_origin_policy).
|
||||||
|
|
||||||
|
The script is still in a **very experimental state**, so I don't recommend using it in a production environment nor start building applications with it yet, as there will be still major changes made.
|
||||||
|
|
||||||
|
### Browser compatibility ###
|
||||||
|
|
||||||
|
The library should work fine on the following browsers (with `Promise` polyfill):
|
||||||
|
|
||||||
|
* Firefox 3.5+
|
||||||
|
* Google Chrome
|
||||||
|
* Opera 12+
|
||||||
|
* IE9+
|
||||||
|
* Safari 6+
|
||||||
|
|
||||||
|
As each CSS property needs to be manually built to be supported, there are a number of properties that are not yet supported.
|
||||||
|
|
||||||
|
### Usage ###
|
||||||
|
|
||||||
|
The html2canvas library utilizes `Promise`s and expects them to be available in the global context. If you wish to
|
||||||
|
support [older browsers](http://caniuse.com/#search=promise) that do not natively support `Promise`s, please include a polyfill such as
|
||||||
|
[es6-promise](https://github.com/jakearchibald/es6-promise) before including `html2canvas`.
|
||||||
|
|
||||||
|
To render an `element` with html2canvas, simply call:
|
||||||
|
` html2canvas(element[, options]);`
|
||||||
|
|
||||||
|
The function returns a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) containing the `<canvas>` element. Simply add a promise fulfillment handler to the promise using `then`:
|
||||||
|
|
||||||
|
html2canvas(document.body).then(function(canvas) {
|
||||||
|
document.body.appendChild(canvas);
|
||||||
|
});
|
||||||
|
|
||||||
|
### Building ###
|
||||||
|
|
||||||
|
You can download ready builds [here](https://github.com/niklasvh/html2canvas/releases).
|
||||||
|
|
||||||
|
Clone git repository:
|
||||||
|
|
||||||
|
$ git clone git://github.com/niklasvh/html2canvas.git
|
||||||
|
|
||||||
|
Install dependencies:
|
||||||
|
|
||||||
|
$ npm install
|
||||||
|
|
||||||
|
Build browser bundle
|
||||||
|
|
||||||
|
$ npm run build
|
||||||
|
|
||||||
|
### Examples ###
|
||||||
|
|
||||||
|
For more information and examples, please visit the [homepage](https://html2canvas.hertzen.com) or try the [test console](https://html2canvas.hertzen.com/tests/).
|
||||||
|
|
||||||
|
### Contributing ###
|
||||||
|
|
||||||
|
If you wish to contribute to the project, please send the pull requests to the develop branch. Before submitting any changes, try and test that the changes work with all the support browsers. If some CSS property isn't supported or is incomplete, please create appropriate tests for it as well before submitting any code changes.
|
7822
node_modules/html2canvas/dist/html2canvas.esm.js
generated
vendored
Normal file
7822
node_modules/html2canvas/dist/html2canvas.esm.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/html2canvas/dist/html2canvas.esm.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/html2canvas.esm.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7830
node_modules/html2canvas/dist/html2canvas.js
generated
vendored
Normal file
7830
node_modules/html2canvas/dist/html2canvas.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/html2canvas/dist/html2canvas.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/html2canvas.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
20
node_modules/html2canvas/dist/html2canvas.min.js
generated
vendored
Normal file
20
node_modules/html2canvas/dist/html2canvas.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
144
node_modules/html2canvas/dist/lib/__tests__/index.js
generated
vendored
Normal file
144
node_modules/html2canvas/dist/lib/__tests__/index.js
generated
vendored
Normal file
|
@ -0,0 +1,144 @@
|
||||||
|
"use strict";
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||||
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||||
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||||
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||||
|
function step(op) {
|
||||||
|
if (f) throw new TypeError("Generator is already executing.");
|
||||||
|
while (_) try {
|
||||||
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||||
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||||
|
switch (op[0]) {
|
||||||
|
case 0: case 1: t = op; break;
|
||||||
|
case 4: _.label++; return { value: op[1], done: false };
|
||||||
|
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||||
|
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||||
|
default:
|
||||||
|
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||||
|
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||||
|
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||||
|
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||||
|
if (t[2]) _.ops.pop();
|
||||||
|
_.trys.pop(); continue;
|
||||||
|
}
|
||||||
|
op = body.call(thisArg, _);
|
||||||
|
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||||
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
var index_1 = require("../index");
|
||||||
|
var canvas_renderer_1 = require("../render/canvas/canvas-renderer");
|
||||||
|
var document_cloner_1 = require("../dom/document-cloner");
|
||||||
|
var color_1 = require("../css/types/color");
|
||||||
|
jest.mock('../core/logger');
|
||||||
|
jest.mock('../css/layout/bounds');
|
||||||
|
jest.mock('../dom/document-cloner');
|
||||||
|
jest.mock('../dom/node-parser', function () {
|
||||||
|
return {
|
||||||
|
isBodyElement: function () { return false; },
|
||||||
|
isHTMLElement: function () { return false; },
|
||||||
|
parseTree: jest.fn().mockImplementation(function () {
|
||||||
|
return { styles: {} };
|
||||||
|
})
|
||||||
|
};
|
||||||
|
});
|
||||||
|
jest.mock('../render/stacking-context');
|
||||||
|
jest.mock('../render/canvas/canvas-renderer');
|
||||||
|
describe('html2canvas', function () {
|
||||||
|
var element = {
|
||||||
|
ownerDocument: {
|
||||||
|
defaultView: {
|
||||||
|
pageXOffset: 12,
|
||||||
|
pageYOffset: 34
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
it('should render with an element', function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0:
|
||||||
|
document_cloner_1.DocumentCloner.destroy = jest.fn().mockReturnValue(true);
|
||||||
|
return [4 /*yield*/, index_1.default(element)];
|
||||||
|
case 1:
|
||||||
|
_a.sent();
|
||||||
|
expect(canvas_renderer_1.CanvasRenderer).toHaveBeenLastCalledWith(expect.objectContaining({
|
||||||
|
cache: expect.any(Object),
|
||||||
|
logger: expect.any(Object),
|
||||||
|
windowBounds: expect.objectContaining({ left: 12, top: 34 })
|
||||||
|
}), expect.objectContaining({
|
||||||
|
backgroundColor: 0xffffffff,
|
||||||
|
scale: 1,
|
||||||
|
height: 50,
|
||||||
|
width: 200,
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
canvas: undefined
|
||||||
|
}));
|
||||||
|
expect(document_cloner_1.DocumentCloner.destroy).toBeCalled();
|
||||||
|
return [2 /*return*/];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}); });
|
||||||
|
it('should have transparent background with backgroundColor: null', function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0: return [4 /*yield*/, index_1.default(element, { backgroundColor: null })];
|
||||||
|
case 1:
|
||||||
|
_a.sent();
|
||||||
|
expect(canvas_renderer_1.CanvasRenderer).toHaveBeenLastCalledWith(expect.anything(), expect.objectContaining({
|
||||||
|
backgroundColor: color_1.COLORS.TRANSPARENT
|
||||||
|
}));
|
||||||
|
return [2 /*return*/];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}); });
|
||||||
|
it('should use existing canvas when given as option', function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||||
|
var canvas;
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0:
|
||||||
|
canvas = {};
|
||||||
|
return [4 /*yield*/, index_1.default(element, { canvas: canvas })];
|
||||||
|
case 1:
|
||||||
|
_a.sent();
|
||||||
|
expect(canvas_renderer_1.CanvasRenderer).toHaveBeenLastCalledWith(expect.anything(), expect.objectContaining({
|
||||||
|
canvas: canvas
|
||||||
|
}));
|
||||||
|
return [2 /*return*/];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}); });
|
||||||
|
it('should not remove cloned window when removeContainer: false', function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0:
|
||||||
|
document_cloner_1.DocumentCloner.destroy = jest.fn();
|
||||||
|
return [4 /*yield*/, index_1.default(element, { removeContainer: false })];
|
||||||
|
case 1:
|
||||||
|
_a.sent();
|
||||||
|
expect(canvas_renderer_1.CanvasRenderer).toHaveBeenLastCalledWith(expect.anything(), expect.objectContaining({
|
||||||
|
backgroundColor: 0xffffffff,
|
||||||
|
scale: 1,
|
||||||
|
height: 50,
|
||||||
|
width: 200,
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
canvas: undefined
|
||||||
|
}));
|
||||||
|
expect(document_cloner_1.DocumentCloner.destroy).not.toBeCalled();
|
||||||
|
return [2 /*return*/];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}); });
|
||||||
|
});
|
||||||
|
//# sourceMappingURL=index.js.map
|
1
node_modules/html2canvas/dist/lib/__tests__/index.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/__tests__/index.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/__tests__/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAmC;AAEnC,oEAAgE;AAChE,0DAAsD;AACtD,4CAA0C;AAE1C,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;AAC5B,IAAI,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;AAClC,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;AACpC,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;IAC5B,OAAO;QACH,aAAa,EAAE,cAAM,OAAA,KAAK,EAAL,CAAK;QAC1B,aAAa,EAAE,cAAM,OAAA,KAAK,EAAL,CAAK;QAC1B,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,CAA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,EAAE,CAAC;;;;SACnD,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
10
node_modules/html2canvas/dist/lib/core/__mocks__/cache-storage.js
generated
vendored
Normal file
10
node_modules/html2canvas/dist/lib/core/__mocks__/cache-storage.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.CacheStorage = void 0;
|
||||||
|
var CacheStorage = /** @class */ (function () {
|
||||||
|
function CacheStorage() {
|
||||||
|
}
|
||||||
|
return CacheStorage;
|
||||||
|
}());
|
||||||
|
exports.CacheStorage = CacheStorage;
|
||||||
|
//# sourceMappingURL=cache-storage.js.map
|
1
node_modules/html2canvas/dist/lib/core/__mocks__/cache-storage.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/core/__mocks__/cache-storage.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"cache-storage.js","sourceRoot":"","sources":["../../../../src/core/__mocks__/cache-storage.ts"],"names":[],"mappings":";;;AAAA;IAAA;IAA2B,CAAC;IAAD,mBAAC;AAAD,CAAC,AAA5B,IAA4B;AAAf,oCAAY"}
|
22
node_modules/html2canvas/dist/lib/core/__mocks__/context.js
generated
vendored
Normal file
22
node_modules/html2canvas/dist/lib/core/__mocks__/context.js
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.Context = void 0;
|
||||||
|
var logger_1 = require("./logger");
|
||||||
|
var Context = /** @class */ (function () {
|
||||||
|
function Context() {
|
||||||
|
var _this = this;
|
||||||
|
this.logger = logger_1.logger;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
this._cache = {};
|
||||||
|
this.cache = {
|
||||||
|
addImage: jest.fn().mockImplementation(function (src) {
|
||||||
|
var result = Promise.resolve();
|
||||||
|
_this._cache[src] = result;
|
||||||
|
return result;
|
||||||
|
})
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return Context;
|
||||||
|
}());
|
||||||
|
exports.Context = Context;
|
||||||
|
//# sourceMappingURL=context.js.map
|
1
node_modules/html2canvas/dist/lib/core/__mocks__/context.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/core/__mocks__/context.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../src/core/__mocks__/context.ts"],"names":[],"mappings":";;;AAAA,mCAAwC;AAExC;IAOI;QAAA,iBAQC;QAdQ,WAAM,GAAW,eAAM,CAAC;QACjC,8DAA8D;QACrD,WAAM,GAAkC,EAAE,CAAC;QAKhD,IAAI,CAAC,KAAK,GAAG;YACT,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,UAAC,GAAW;gBAC/C,IAAM,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;gBACjC,KAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;gBAC1B,OAAO,MAAM,CAAC;YAClB,CAAC,CAAC;SACL,CAAC;IACN,CAAC;IACL,cAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,0BAAO"}
|
12
node_modules/html2canvas/dist/lib/core/__mocks__/features.js
generated
vendored
Normal file
12
node_modules/html2canvas/dist/lib/core/__mocks__/features.js
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.FEATURES = void 0;
|
||||||
|
exports.FEATURES = {
|
||||||
|
SUPPORT_RANGE_BOUNDS: true,
|
||||||
|
SUPPORT_SVG_DRAWING: true,
|
||||||
|
SUPPORT_FOREIGNOBJECT_DRAWING: true,
|
||||||
|
SUPPORT_CORS_IMAGES: true,
|
||||||
|
SUPPORT_RESPONSE_TYPE: true,
|
||||||
|
SUPPORT_CORS_XHR: true
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=features.js.map
|
1
node_modules/html2canvas/dist/lib/core/__mocks__/features.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/core/__mocks__/features.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"features.js","sourceRoot":"","sources":["../../../../src/core/__mocks__/features.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG;IACpB,oBAAoB,EAAE,IAAI;IAC1B,mBAAmB,EAAE,IAAI;IACzB,6BAA6B,EAAE,IAAI;IACnC,mBAAmB,EAAE,IAAI;IACzB,qBAAqB,EAAE,IAAI;IAC3B,gBAAgB,EAAE,IAAI;CACzB,CAAC"}
|
24
node_modules/html2canvas/dist/lib/core/__mocks__/logger.js
generated
vendored
Normal file
24
node_modules/html2canvas/dist/lib/core/__mocks__/logger.js
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.logger = exports.Logger = void 0;
|
||||||
|
var Logger = /** @class */ (function () {
|
||||||
|
function Logger() {
|
||||||
|
}
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||||
|
Logger.prototype.debug = function () { };
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||||
|
Logger.create = function () { };
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||||
|
Logger.destroy = function () { };
|
||||||
|
Logger.getInstance = function () {
|
||||||
|
return exports.logger;
|
||||||
|
};
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||||
|
Logger.prototype.info = function () { };
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||||
|
Logger.prototype.error = function () { };
|
||||||
|
return Logger;
|
||||||
|
}());
|
||||||
|
exports.Logger = Logger;
|
||||||
|
exports.logger = new Logger();
|
||||||
|
//# sourceMappingURL=logger.js.map
|
1
node_modules/html2canvas/dist/lib/core/__mocks__/logger.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/core/__mocks__/logger.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../src/core/__mocks__/logger.ts"],"names":[],"mappings":";;;AAAA;IAAA;IAmBA,CAAC;IAlBG,gEAAgE;IAChE,sBAAK,GAAL,cAAe,CAAC;IAEhB,gEAAgE;IACzD,aAAM,GAAb,cAAuB,CAAC;IAExB,gEAAgE;IACzD,cAAO,GAAd,cAAwB,CAAC;IAElB,kBAAW,GAAlB;QACI,OAAO,cAAM,CAAC;IAClB,CAAC;IAED,gEAAgE;IAChE,qBAAI,GAAJ,cAAc,CAAC;IAEf,gEAAgE;IAChE,sBAAK,GAAL,cAAe,CAAC;IACpB,aAAC;AAAD,CAAC,AAnBD,IAmBC;AAnBY,wBAAM;AAqBN,QAAA,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC"}
|
420
node_modules/html2canvas/dist/lib/core/__tests__/cache-storage.js
generated
vendored
Normal file
420
node_modules/html2canvas/dist/lib/core/__tests__/cache-storage.js
generated
vendored
Normal file
|
@ -0,0 +1,420 @@
|
||||||
|
"use strict";
|
||||||
|
var __assign = (this && this.__assign) || function () {
|
||||||
|
__assign = Object.assign || function(t) {
|
||||||
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||||
|
s = arguments[i];
|
||||||
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||||
|
t[p] = s[p];
|
||||||
|
}
|
||||||
|
return t;
|
||||||
|
};
|
||||||
|
return __assign.apply(this, arguments);
|
||||||
|
};
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||||
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||||
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||||
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||||
|
function step(op) {
|
||||||
|
if (f) throw new TypeError("Generator is already executing.");
|
||||||
|
while (_) try {
|
||||||
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||||
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||||
|
switch (op[0]) {
|
||||||
|
case 0: case 1: t = op; break;
|
||||||
|
case 4: _.label++; return { value: op[1], done: false };
|
||||||
|
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||||
|
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||||
|
default:
|
||||||
|
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||||
|
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||||
|
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||||
|
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||||
|
if (t[2]) _.ops.pop();
|
||||||
|
_.trys.pop(); continue;
|
||||||
|
}
|
||||||
|
op = body.call(thisArg, _);
|
||||||
|
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||||
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
var assert_1 = require("assert");
|
||||||
|
var features_1 = require("../features");
|
||||||
|
var cache_storage_1 = require("../cache-storage");
|
||||||
|
var context_1 = require("../context");
|
||||||
|
var bounds_1 = require("../../css/layout/bounds");
|
||||||
|
var proxy = 'http://example.com/proxy';
|
||||||
|
var createMockContext = function (origin, opts) {
|
||||||
|
if (opts === void 0) { opts = {}; }
|
||||||
|
var context = {
|
||||||
|
location: {
|
||||||
|
href: origin
|
||||||
|
},
|
||||||
|
document: {
|
||||||
|
createElement: function (_name) {
|
||||||
|
var _href = '';
|
||||||
|
return {
|
||||||
|
set href(value) {
|
||||||
|
_href = value;
|
||||||
|
},
|
||||||
|
get href() {
|
||||||
|
return _href;
|
||||||
|
},
|
||||||
|
get protocol() {
|
||||||
|
return new URL(_href).protocol;
|
||||||
|
},
|
||||||
|
get hostname() {
|
||||||
|
return new URL(_href).hostname;
|
||||||
|
},
|
||||||
|
get port() {
|
||||||
|
return new URL(_href).port;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
cache_storage_1.CacheStorage.setContext(context);
|
||||||
|
return new context_1.Context(__assign({ logging: false, imageTimeout: 0, useCORS: false, allowTaint: false, proxy: proxy }, opts), new bounds_1.Bounds(0, 0, 0, 0));
|
||||||
|
};
|
||||||
|
var images = [];
|
||||||
|
var xhr = [];
|
||||||
|
var sleep = function (timeout) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0: return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, timeout); })];
|
||||||
|
case 1: return [2 /*return*/, _a.sent()];
|
||||||
|
}
|
||||||
|
}); }); };
|
||||||
|
var ImageMock = /** @class */ (function () {
|
||||||
|
function ImageMock() {
|
||||||
|
images.push(this);
|
||||||
|
}
|
||||||
|
return ImageMock;
|
||||||
|
}());
|
||||||
|
var XMLHttpRequestMock = /** @class */ (function () {
|
||||||
|
function XMLHttpRequestMock() {
|
||||||
|
this.sent = false;
|
||||||
|
this.status = 500;
|
||||||
|
this.timeout = 5000;
|
||||||
|
xhr.push(this);
|
||||||
|
}
|
||||||
|
XMLHttpRequestMock.prototype.load = function (status, response) {
|
||||||
|
return __awaiter(this, void 0, void 0, function () {
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0:
|
||||||
|
this.response = response;
|
||||||
|
this.status = status;
|
||||||
|
if (this.onload) {
|
||||||
|
this.onload();
|
||||||
|
}
|
||||||
|
return [4 /*yield*/, sleep(0)];
|
||||||
|
case 1:
|
||||||
|
_a.sent();
|
||||||
|
return [2 /*return*/];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
XMLHttpRequestMock.prototype.open = function (method, url) {
|
||||||
|
this.method = method;
|
||||||
|
this.url = url;
|
||||||
|
};
|
||||||
|
XMLHttpRequestMock.prototype.send = function () {
|
||||||
|
this.sent = true;
|
||||||
|
};
|
||||||
|
return XMLHttpRequestMock;
|
||||||
|
}());
|
||||||
|
Object.defineProperty(global, 'Image', { value: ImageMock, writable: true });
|
||||||
|
Object.defineProperty(global, 'XMLHttpRequest', {
|
||||||
|
value: XMLHttpRequestMock,
|
||||||
|
writable: true
|
||||||
|
});
|
||||||
|
var setFeatures = function (opts) {
|
||||||
|
if (opts === void 0) { opts = {}; }
|
||||||
|
var defaults = {
|
||||||
|
SUPPORT_SVG_DRAWING: true,
|
||||||
|
SUPPORT_CORS_IMAGES: true,
|
||||||
|
SUPPORT_CORS_XHR: true,
|
||||||
|
SUPPORT_RESPONSE_TYPE: false
|
||||||
|
};
|
||||||
|
Object.keys(defaults).forEach(function (key) {
|
||||||
|
Object.defineProperty(features_1.FEATURES, key, {
|
||||||
|
value: typeof opts[key] === 'boolean' ? opts[key] : defaults[key],
|
||||||
|
writable: true
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
describe('cache-storage', function () {
|
||||||
|
beforeEach(function () { return setFeatures(); });
|
||||||
|
afterEach(function () {
|
||||||
|
xhr.splice(0, xhr.length);
|
||||||
|
images.splice(0, images.length);
|
||||||
|
});
|
||||||
|
it('addImage adds images to cache', function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||||
|
var cache;
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0:
|
||||||
|
cache = createMockContext('http://example.com', { proxy: null }).cache;
|
||||||
|
return [4 /*yield*/, cache.addImage('http://example.com/test.jpg')];
|
||||||
|
case 1:
|
||||||
|
_a.sent();
|
||||||
|
return [4 /*yield*/, cache.addImage('http://example.com/test2.jpg')];
|
||||||
|
case 2:
|
||||||
|
_a.sent();
|
||||||
|
assert_1.deepStrictEqual(images.length, 2);
|
||||||
|
assert_1.deepStrictEqual(images[0].src, 'http://example.com/test.jpg');
|
||||||
|
assert_1.deepStrictEqual(images[1].src, 'http://example.com/test2.jpg');
|
||||||
|
return [2 /*return*/];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}); });
|
||||||
|
it('addImage should not add duplicate entries', function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||||
|
var cache;
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0:
|
||||||
|
cache = createMockContext('http://example.com').cache;
|
||||||
|
return [4 /*yield*/, cache.addImage('http://example.com/test.jpg')];
|
||||||
|
case 1:
|
||||||
|
_a.sent();
|
||||||
|
return [4 /*yield*/, cache.addImage('http://example.com/test.jpg')];
|
||||||
|
case 2:
|
||||||
|
_a.sent();
|
||||||
|
assert_1.deepStrictEqual(images.length, 1);
|
||||||
|
assert_1.deepStrictEqual(images[0].src, 'http://example.com/test.jpg');
|
||||||
|
return [2 /*return*/];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}); });
|
||||||
|
describe('svg', function () {
|
||||||
|
it('should add svg images correctly', function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||||
|
var cache;
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0:
|
||||||
|
cache = createMockContext('http://example.com').cache;
|
||||||
|
return [4 /*yield*/, cache.addImage('http://example.com/test.svg')];
|
||||||
|
case 1:
|
||||||
|
_a.sent();
|
||||||
|
return [4 /*yield*/, cache.addImage('http://example.com/test2.svg')];
|
||||||
|
case 2:
|
||||||
|
_a.sent();
|
||||||
|
assert_1.deepStrictEqual(images.length, 2);
|
||||||
|
assert_1.deepStrictEqual(images[0].src, 'http://example.com/test.svg');
|
||||||
|
assert_1.deepStrictEqual(images[1].src, 'http://example.com/test2.svg');
|
||||||
|
return [2 /*return*/];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}); });
|
||||||
|
it('should omit svg images if not supported', function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||||
|
var cache;
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0:
|
||||||
|
setFeatures({ SUPPORT_SVG_DRAWING: false });
|
||||||
|
cache = createMockContext('http://example.com').cache;
|
||||||
|
return [4 /*yield*/, cache.addImage('http://example.com/test.svg')];
|
||||||
|
case 1:
|
||||||
|
_a.sent();
|
||||||
|
return [4 /*yield*/, cache.addImage('http://example.com/test2.svg')];
|
||||||
|
case 2:
|
||||||
|
_a.sent();
|
||||||
|
assert_1.deepStrictEqual(images.length, 0);
|
||||||
|
return [2 /*return*/];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}); });
|
||||||
|
});
|
||||||
|
describe('cross-origin', function () {
|
||||||
|
it('addImage should not add images it cannot load/render', function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||||
|
var cache;
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0:
|
||||||
|
cache = createMockContext('http://example.com', {
|
||||||
|
proxy: undefined
|
||||||
|
}).cache;
|
||||||
|
return [4 /*yield*/, cache.addImage('http://html2canvas.hertzen.com/test.jpg')];
|
||||||
|
case 1:
|
||||||
|
_a.sent();
|
||||||
|
assert_1.deepStrictEqual(images.length, 0);
|
||||||
|
return [2 /*return*/];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}); });
|
||||||
|
it('addImage should add images if tainting enabled', function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||||
|
var cache;
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0:
|
||||||
|
cache = createMockContext('http://example.com', {
|
||||||
|
allowTaint: true,
|
||||||
|
proxy: undefined
|
||||||
|
}).cache;
|
||||||
|
return [4 /*yield*/, cache.addImage('http://html2canvas.hertzen.com/test.jpg')];
|
||||||
|
case 1:
|
||||||
|
_a.sent();
|
||||||
|
assert_1.deepStrictEqual(images.length, 1);
|
||||||
|
assert_1.deepStrictEqual(images[0].src, 'http://html2canvas.hertzen.com/test.jpg');
|
||||||
|
assert_1.deepStrictEqual(images[0].crossOrigin, undefined);
|
||||||
|
return [2 /*return*/];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}); });
|
||||||
|
it('addImage should add images if cors enabled', function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||||
|
var cache;
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0:
|
||||||
|
cache = createMockContext('http://example.com', { useCORS: true }).cache;
|
||||||
|
return [4 /*yield*/, cache.addImage('http://html2canvas.hertzen.com/test.jpg')];
|
||||||
|
case 1:
|
||||||
|
_a.sent();
|
||||||
|
assert_1.deepStrictEqual(images.length, 1);
|
||||||
|
assert_1.deepStrictEqual(images[0].src, 'http://html2canvas.hertzen.com/test.jpg');
|
||||||
|
assert_1.deepStrictEqual(images[0].crossOrigin, 'anonymous');
|
||||||
|
return [2 /*return*/];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}); });
|
||||||
|
it('addImage should not add images if cors enabled but not supported', function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||||
|
var cache;
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0:
|
||||||
|
setFeatures({ SUPPORT_CORS_IMAGES: false });
|
||||||
|
cache = createMockContext('http://example.com', {
|
||||||
|
useCORS: true,
|
||||||
|
proxy: undefined
|
||||||
|
}).cache;
|
||||||
|
return [4 /*yield*/, cache.addImage('http://html2canvas.hertzen.com/test.jpg')];
|
||||||
|
case 1:
|
||||||
|
_a.sent();
|
||||||
|
assert_1.deepStrictEqual(images.length, 0);
|
||||||
|
return [2 /*return*/];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}); });
|
||||||
|
it('addImage should not add images to proxy if cors enabled', function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||||
|
var cache;
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0:
|
||||||
|
cache = createMockContext('http://example.com', { useCORS: true }).cache;
|
||||||
|
return [4 /*yield*/, cache.addImage('http://html2canvas.hertzen.com/test.jpg')];
|
||||||
|
case 1:
|
||||||
|
_a.sent();
|
||||||
|
assert_1.deepStrictEqual(images.length, 1);
|
||||||
|
assert_1.deepStrictEqual(images[0].src, 'http://html2canvas.hertzen.com/test.jpg');
|
||||||
|
assert_1.deepStrictEqual(images[0].crossOrigin, 'anonymous');
|
||||||
|
return [2 /*return*/];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}); });
|
||||||
|
it('addImage should use proxy ', function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||||
|
var cache;
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0:
|
||||||
|
cache = createMockContext('http://example.com').cache;
|
||||||
|
return [4 /*yield*/, cache.addImage('http://html2canvas.hertzen.com/test.jpg')];
|
||||||
|
case 1:
|
||||||
|
_a.sent();
|
||||||
|
assert_1.deepStrictEqual(xhr.length, 1);
|
||||||
|
assert_1.deepStrictEqual(xhr[0].url, proxy + "?url=" + encodeURIComponent('http://html2canvas.hertzen.com/test.jpg') + "&responseType=text");
|
||||||
|
return [4 /*yield*/, xhr[0].load(200, '<data response>')];
|
||||||
|
case 2:
|
||||||
|
_a.sent();
|
||||||
|
assert_1.deepStrictEqual(images.length, 1);
|
||||||
|
assert_1.deepStrictEqual(images[0].src, '<data response>');
|
||||||
|
return [2 /*return*/];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}); });
|
||||||
|
it('proxy should respect imageTimeout', function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||||
|
var cache, e_1;
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0:
|
||||||
|
cache = createMockContext('http://example.com', {
|
||||||
|
imageTimeout: 10
|
||||||
|
}).cache;
|
||||||
|
return [4 /*yield*/, cache.addImage('http://html2canvas.hertzen.com/test.jpg')];
|
||||||
|
case 1:
|
||||||
|
_a.sent();
|
||||||
|
assert_1.deepStrictEqual(xhr.length, 1);
|
||||||
|
assert_1.deepStrictEqual(xhr[0].url, proxy + "?url=" + encodeURIComponent('http://html2canvas.hertzen.com/test.jpg') + "&responseType=text");
|
||||||
|
assert_1.deepStrictEqual(xhr[0].timeout, 10);
|
||||||
|
if (xhr[0].ontimeout) {
|
||||||
|
xhr[0].ontimeout();
|
||||||
|
}
|
||||||
|
_a.label = 2;
|
||||||
|
case 2:
|
||||||
|
_a.trys.push([2, 4, , 5]);
|
||||||
|
return [4 /*yield*/, cache.match('http://html2canvas.hertzen.com/test.jpg')];
|
||||||
|
case 3:
|
||||||
|
_a.sent();
|
||||||
|
assert_1.fail('Expected result to timeout');
|
||||||
|
return [3 /*break*/, 5];
|
||||||
|
case 4:
|
||||||
|
e_1 = _a.sent();
|
||||||
|
return [3 /*break*/, 5];
|
||||||
|
case 5: return [2 /*return*/];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}); });
|
||||||
|
});
|
||||||
|
it('match should return cache entry', function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||||
|
var cache, response;
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0:
|
||||||
|
cache = createMockContext('http://example.com').cache;
|
||||||
|
return [4 /*yield*/, cache.addImage('http://example.com/test.jpg')];
|
||||||
|
case 1:
|
||||||
|
_a.sent();
|
||||||
|
if (images[0].onload) {
|
||||||
|
images[0].onload();
|
||||||
|
}
|
||||||
|
return [4 /*yield*/, cache.match('http://example.com/test.jpg')];
|
||||||
|
case 2:
|
||||||
|
response = _a.sent();
|
||||||
|
assert_1.deepStrictEqual(response.src, 'http://example.com/test.jpg');
|
||||||
|
return [2 /*return*/];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}); });
|
||||||
|
it('image should respect imageTimeout', function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||||
|
var cache, e_2;
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0:
|
||||||
|
cache = createMockContext('http://example.com', { imageTimeout: 10 }).cache;
|
||||||
|
cache.addImage('http://example.com/test.jpg');
|
||||||
|
_a.label = 1;
|
||||||
|
case 1:
|
||||||
|
_a.trys.push([1, 3, , 4]);
|
||||||
|
return [4 /*yield*/, cache.match('http://example.com/test.jpg')];
|
||||||
|
case 2:
|
||||||
|
_a.sent();
|
||||||
|
assert_1.fail('Expected result to timeout');
|
||||||
|
return [3 /*break*/, 4];
|
||||||
|
case 3:
|
||||||
|
e_2 = _a.sent();
|
||||||
|
return [3 /*break*/, 4];
|
||||||
|
case 4: return [2 /*return*/];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}); });
|
||||||
|
});
|
||||||
|
//# sourceMappingURL=cache-storage.js.map
|
1
node_modules/html2canvas/dist/lib/core/__tests__/cache-storage.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/core/__tests__/cache-storage.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
28
node_modules/html2canvas/dist/lib/core/__tests__/logger.js
generated
vendored
Normal file
28
node_modules/html2canvas/dist/lib/core/__tests__/logger.js
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
var logger_1 = require("../logger");
|
||||||
|
describe('logger', function () {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
var infoSpy;
|
||||||
|
beforeEach(function () {
|
||||||
|
infoSpy = jest.spyOn(console, 'info').mockImplementation(function () {
|
||||||
|
// do nothing
|
||||||
|
});
|
||||||
|
});
|
||||||
|
afterEach(function () {
|
||||||
|
infoSpy.mockRestore();
|
||||||
|
});
|
||||||
|
it('should call console.info when logger enabled', function () {
|
||||||
|
var id = Math.random().toString();
|
||||||
|
var logger = new logger_1.Logger({ id: id, enabled: true });
|
||||||
|
logger.info('testing');
|
||||||
|
expect(infoSpy).toHaveBeenLastCalledWith(id, expect.stringMatching(/\d+ms/), 'testing');
|
||||||
|
});
|
||||||
|
it("shouldn't call console.info when logger disabled", function () {
|
||||||
|
var id = Math.random().toString();
|
||||||
|
var logger = new logger_1.Logger({ id: id, enabled: false });
|
||||||
|
logger.info('testing');
|
||||||
|
expect(infoSpy).not.toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
//# sourceMappingURL=logger.js.map
|
1
node_modules/html2canvas/dist/lib/core/__tests__/logger.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/core/__tests__/logger.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../src/core/__tests__/logger.ts"],"names":[],"mappings":";;AAAA,oCAAiC;AAEjC,QAAQ,CAAC,QAAQ,EAAE;IACf,8DAA8D;IAC9D,IAAI,OAAY,CAAC;IAEjB,UAAU,CAAC;QACP,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,kBAAkB,CAAC;YACrD,aAAa;QACjB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC;QACN,OAAO,CAAC,WAAW,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE;QAC/C,IAAM,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC;QACpC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,EAAC,EAAE,IAAA,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC;QAC/C,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACvB,MAAM,CAAC,OAAO,CAAC,CAAC,wBAAwB,CAAC,EAAE,EAAE,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC;IAC5F,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kDAAkD,EAAE;QACnD,IAAM,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC;QACpC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,EAAC,EAAE,IAAA,EAAE,OAAO,EAAE,KAAK,EAAC,CAAC,CAAC;QAChD,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACvB,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;IAC3C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
6
node_modules/html2canvas/dist/lib/core/bitwise.js
generated
vendored
Normal file
6
node_modules/html2canvas/dist/lib/core/bitwise.js
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.contains = void 0;
|
||||||
|
var contains = function (bit, value) { return (bit & value) !== 0; };
|
||||||
|
exports.contains = contains;
|
||||||
|
//# sourceMappingURL=bitwise.js.map
|
1
node_modules/html2canvas/dist/lib/core/bitwise.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/core/bitwise.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"bitwise.js","sourceRoot":"","sources":["../../../src/core/bitwise.ts"],"names":[],"mappings":";;;AAAO,IAAM,QAAQ,GAAG,UAAC,GAAW,EAAE,KAAa,IAAc,OAAA,CAAC,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,EAAnB,CAAmB,CAAC;AAAxE,QAAA,QAAQ,YAAgE"}
|
198
node_modules/html2canvas/dist/lib/core/cache-storage.js
generated
vendored
Normal file
198
node_modules/html2canvas/dist/lib/core/cache-storage.js
generated
vendored
Normal file
|
@ -0,0 +1,198 @@
|
||||||
|
"use strict";
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||||
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||||
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||||
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||||
|
function step(op) {
|
||||||
|
if (f) throw new TypeError("Generator is already executing.");
|
||||||
|
while (_) try {
|
||||||
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||||
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||||
|
switch (op[0]) {
|
||||||
|
case 0: case 1: t = op; break;
|
||||||
|
case 4: _.label++; return { value: op[1], done: false };
|
||||||
|
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||||
|
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||||
|
default:
|
||||||
|
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||||
|
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||||
|
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||||
|
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||||
|
if (t[2]) _.ops.pop();
|
||||||
|
_.trys.pop(); continue;
|
||||||
|
}
|
||||||
|
op = body.call(thisArg, _);
|
||||||
|
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||||
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.Cache = exports.CacheStorage = void 0;
|
||||||
|
var features_1 = require("./features");
|
||||||
|
var CacheStorage = /** @class */ (function () {
|
||||||
|
function CacheStorage() {
|
||||||
|
}
|
||||||
|
CacheStorage.getOrigin = function (url) {
|
||||||
|
var link = CacheStorage._link;
|
||||||
|
if (!link) {
|
||||||
|
return 'about:blank';
|
||||||
|
}
|
||||||
|
link.href = url;
|
||||||
|
link.href = link.href; // IE9, LOL! - http://jsfiddle.net/niklasvh/2e48b/
|
||||||
|
return link.protocol + link.hostname + link.port;
|
||||||
|
};
|
||||||
|
CacheStorage.isSameOrigin = function (src) {
|
||||||
|
return CacheStorage.getOrigin(src) === CacheStorage._origin;
|
||||||
|
};
|
||||||
|
CacheStorage.setContext = function (window) {
|
||||||
|
CacheStorage._link = window.document.createElement('a');
|
||||||
|
CacheStorage._origin = CacheStorage.getOrigin(window.location.href);
|
||||||
|
};
|
||||||
|
CacheStorage._origin = 'about:blank';
|
||||||
|
return CacheStorage;
|
||||||
|
}());
|
||||||
|
exports.CacheStorage = CacheStorage;
|
||||||
|
var Cache = /** @class */ (function () {
|
||||||
|
function Cache(context, _options) {
|
||||||
|
this.context = context;
|
||||||
|
this._options = _options;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
this._cache = {};
|
||||||
|
}
|
||||||
|
Cache.prototype.addImage = function (src) {
|
||||||
|
var result = Promise.resolve();
|
||||||
|
if (this.has(src)) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
if (isBlobImage(src) || isRenderable(src)) {
|
||||||
|
(this._cache[src] = this.loadImage(src)).catch(function () {
|
||||||
|
// prevent unhandled rejection
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
Cache.prototype.match = function (src) {
|
||||||
|
return this._cache[src];
|
||||||
|
};
|
||||||
|
Cache.prototype.loadImage = function (key) {
|
||||||
|
return __awaiter(this, void 0, void 0, function () {
|
||||||
|
var isSameOrigin, useCORS, useProxy, src;
|
||||||
|
var _this = this;
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0:
|
||||||
|
isSameOrigin = CacheStorage.isSameOrigin(key);
|
||||||
|
useCORS = !isInlineImage(key) && this._options.useCORS === true && features_1.FEATURES.SUPPORT_CORS_IMAGES && !isSameOrigin;
|
||||||
|
useProxy = !isInlineImage(key) &&
|
||||||
|
!isSameOrigin &&
|
||||||
|
!isBlobImage(key) &&
|
||||||
|
typeof this._options.proxy === 'string' &&
|
||||||
|
features_1.FEATURES.SUPPORT_CORS_XHR &&
|
||||||
|
!useCORS;
|
||||||
|
if (!isSameOrigin &&
|
||||||
|
this._options.allowTaint === false &&
|
||||||
|
!isInlineImage(key) &&
|
||||||
|
!isBlobImage(key) &&
|
||||||
|
!useProxy &&
|
||||||
|
!useCORS) {
|
||||||
|
return [2 /*return*/];
|
||||||
|
}
|
||||||
|
src = key;
|
||||||
|
if (!useProxy) return [3 /*break*/, 2];
|
||||||
|
return [4 /*yield*/, this.proxy(src)];
|
||||||
|
case 1:
|
||||||
|
src = _a.sent();
|
||||||
|
_a.label = 2;
|
||||||
|
case 2:
|
||||||
|
this.context.logger.debug("Added image " + key.substring(0, 256));
|
||||||
|
return [4 /*yield*/, new Promise(function (resolve, reject) {
|
||||||
|
var img = new Image();
|
||||||
|
img.onload = function () { return resolve(img); };
|
||||||
|
img.onerror = reject;
|
||||||
|
//ios safari 10.3 taints canvas with data urls unless crossOrigin is set to anonymous
|
||||||
|
if (isInlineBase64Image(src) || useCORS) {
|
||||||
|
img.crossOrigin = 'anonymous';
|
||||||
|
}
|
||||||
|
img.src = src;
|
||||||
|
if (img.complete === true) {
|
||||||
|
// Inline XML images may fail to parse, throwing an Error later on
|
||||||
|
setTimeout(function () { return resolve(img); }, 500);
|
||||||
|
}
|
||||||
|
if (_this._options.imageTimeout > 0) {
|
||||||
|
setTimeout(function () { return reject("Timed out (" + _this._options.imageTimeout + "ms) loading image"); }, _this._options.imageTimeout);
|
||||||
|
}
|
||||||
|
})];
|
||||||
|
case 3: return [2 /*return*/, _a.sent()];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
Cache.prototype.has = function (key) {
|
||||||
|
return typeof this._cache[key] !== 'undefined';
|
||||||
|
};
|
||||||
|
Cache.prototype.keys = function () {
|
||||||
|
return Promise.resolve(Object.keys(this._cache));
|
||||||
|
};
|
||||||
|
Cache.prototype.proxy = function (src) {
|
||||||
|
var _this = this;
|
||||||
|
var proxy = this._options.proxy;
|
||||||
|
if (!proxy) {
|
||||||
|
throw new Error('No proxy defined');
|
||||||
|
}
|
||||||
|
var key = src.substring(0, 256);
|
||||||
|
return new Promise(function (resolve, reject) {
|
||||||
|
var responseType = features_1.FEATURES.SUPPORT_RESPONSE_TYPE ? 'blob' : 'text';
|
||||||
|
var xhr = new XMLHttpRequest();
|
||||||
|
xhr.onload = function () {
|
||||||
|
if (xhr.status === 200) {
|
||||||
|
if (responseType === 'text') {
|
||||||
|
resolve(xhr.response);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var reader_1 = new FileReader();
|
||||||
|
reader_1.addEventListener('load', function () { return resolve(reader_1.result); }, false);
|
||||||
|
reader_1.addEventListener('error', function (e) { return reject(e); }, false);
|
||||||
|
reader_1.readAsDataURL(xhr.response);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
reject("Failed to proxy resource " + key + " with status code " + xhr.status);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
xhr.onerror = reject;
|
||||||
|
var queryString = proxy.indexOf('?') > -1 ? '&' : '?';
|
||||||
|
xhr.open('GET', "" + proxy + queryString + "url=" + encodeURIComponent(src) + "&responseType=" + responseType);
|
||||||
|
if (responseType !== 'text' && xhr instanceof XMLHttpRequest) {
|
||||||
|
xhr.responseType = responseType;
|
||||||
|
}
|
||||||
|
if (_this._options.imageTimeout) {
|
||||||
|
var timeout_1 = _this._options.imageTimeout;
|
||||||
|
xhr.timeout = timeout_1;
|
||||||
|
xhr.ontimeout = function () { return reject("Timed out (" + timeout_1 + "ms) proxying " + key); };
|
||||||
|
}
|
||||||
|
xhr.send();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
return Cache;
|
||||||
|
}());
|
||||||
|
exports.Cache = Cache;
|
||||||
|
var INLINE_SVG = /^data:image\/svg\+xml/i;
|
||||||
|
var INLINE_BASE64 = /^data:image\/.*;base64,/i;
|
||||||
|
var INLINE_IMG = /^data:image\/.*/i;
|
||||||
|
var isRenderable = function (src) { return features_1.FEATURES.SUPPORT_SVG_DRAWING || !isSVG(src); };
|
||||||
|
var isInlineImage = function (src) { return INLINE_IMG.test(src); };
|
||||||
|
var isInlineBase64Image = function (src) { return INLINE_BASE64.test(src); };
|
||||||
|
var isBlobImage = function (src) { return src.substr(0, 4) === 'blob'; };
|
||||||
|
var isSVG = function (src) { return src.substr(-3).toLowerCase() === 'svg' || INLINE_SVG.test(src); };
|
||||||
|
//# sourceMappingURL=cache-storage.js.map
|
1
node_modules/html2canvas/dist/lib/core/cache-storage.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/core/cache-storage.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
18
node_modules/html2canvas/dist/lib/core/context.js
generated
vendored
Normal file
18
node_modules/html2canvas/dist/lib/core/context.js
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.Context = void 0;
|
||||||
|
var logger_1 = require("./logger");
|
||||||
|
var cache_storage_1 = require("./cache-storage");
|
||||||
|
var Context = /** @class */ (function () {
|
||||||
|
function Context(options, windowBounds) {
|
||||||
|
var _a;
|
||||||
|
this.windowBounds = windowBounds;
|
||||||
|
this.instanceName = "#" + Context.instanceCount++;
|
||||||
|
this.logger = new logger_1.Logger({ id: this.instanceName, enabled: options.logging });
|
||||||
|
this.cache = (_a = options.cache) !== null && _a !== void 0 ? _a : new cache_storage_1.Cache(this, options);
|
||||||
|
}
|
||||||
|
Context.instanceCount = 1;
|
||||||
|
return Context;
|
||||||
|
}());
|
||||||
|
exports.Context = Context;
|
||||||
|
//# sourceMappingURL=context.js.map
|
1
node_modules/html2canvas/dist/lib/core/context.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/core/context.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/core/context.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAChC,iDAAuD;AAQvD;IAOI,iBAAY,OAAuB,EAAS,YAAoB;;QAApB,iBAAY,GAAZ,YAAY,CAAQ;QAN/C,iBAAY,GAAG,MAAI,OAAO,CAAC,aAAa,EAAI,CAAC;QAO1D,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,CAAC,EAAC,EAAE,EAAE,IAAI,CAAC,YAAY,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAC,CAAC,CAAC;QAC5E,IAAI,CAAC,KAAK,GAAG,MAAA,OAAO,CAAC,KAAK,mCAAI,IAAI,qBAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IALc,qBAAa,GAAG,CAAC,CAAC;IAMrC,cAAC;CAAA,AAXD,IAWC;AAXY,0BAAO"}
|
25
node_modules/html2canvas/dist/lib/core/debugger.js
generated
vendored
Normal file
25
node_modules/html2canvas/dist/lib/core/debugger.js
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.isDebugging = void 0;
|
||||||
|
var elementDebuggerAttribute = 'data-html2canvas-debug';
|
||||||
|
var getElementDebugType = function (element) {
|
||||||
|
var attribute = element.getAttribute(elementDebuggerAttribute);
|
||||||
|
switch (attribute) {
|
||||||
|
case 'all':
|
||||||
|
return 1 /* ALL */;
|
||||||
|
case 'clone':
|
||||||
|
return 2 /* CLONE */;
|
||||||
|
case 'parse':
|
||||||
|
return 3 /* PARSE */;
|
||||||
|
case 'render':
|
||||||
|
return 4 /* RENDER */;
|
||||||
|
default:
|
||||||
|
return 0 /* NONE */;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var isDebugging = function (element, type) {
|
||||||
|
var elementType = getElementDebugType(element);
|
||||||
|
return elementType === 1 /* ALL */ || type === elementType;
|
||||||
|
};
|
||||||
|
exports.isDebugging = isDebugging;
|
||||||
|
//# sourceMappingURL=debugger.js.map
|
1
node_modules/html2canvas/dist/lib/core/debugger.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/core/debugger.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"debugger.js","sourceRoot":"","sources":["../../../src/core/debugger.ts"],"names":[],"mappings":";;;AAAA,IAAM,wBAAwB,GAAG,wBAAwB,CAAC;AAS1D,IAAM,mBAAmB,GAAG,UAAC,OAAgB;IACzC,IAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,wBAAwB,CAAC,CAAC;IACjE,QAAQ,SAAS,EAAE;QACf,KAAK,KAAK;YACN,mBAAwB;QAC5B,KAAK,OAAO;YACR,qBAA0B;QAC9B,KAAK,OAAO;YACR,qBAA0B;QAC9B,KAAK,QAAQ;YACT,sBAA2B;QAC/B;YACI,oBAAyB;KAChC;AACL,CAAC,CAAC;AAEK,IAAM,WAAW,GAAG,UAAC,OAAgB,EAAE,IAA2C;IACrF,IAAM,WAAW,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACjD,OAAO,WAAW,gBAAqB,IAAI,IAAI,KAAK,WAAW,CAAC;AACpE,CAAC,CAAC;AAHW,QAAA,WAAW,eAGtB"}
|
193
node_modules/html2canvas/dist/lib/core/features.js
generated
vendored
Normal file
193
node_modules/html2canvas/dist/lib/core/features.js
generated
vendored
Normal file
|
@ -0,0 +1,193 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.FEATURES = exports.loadSerializedSVG = exports.createForeignObjectSVG = void 0;
|
||||||
|
var css_line_break_1 = require("css-line-break");
|
||||||
|
var testRangeBounds = function (document) {
|
||||||
|
var TEST_HEIGHT = 123;
|
||||||
|
if (document.createRange) {
|
||||||
|
var range = document.createRange();
|
||||||
|
if (range.getBoundingClientRect) {
|
||||||
|
var testElement = document.createElement('boundtest');
|
||||||
|
testElement.style.height = TEST_HEIGHT + "px";
|
||||||
|
testElement.style.display = 'block';
|
||||||
|
document.body.appendChild(testElement);
|
||||||
|
range.selectNode(testElement);
|
||||||
|
var rangeBounds = range.getBoundingClientRect();
|
||||||
|
var rangeHeight = Math.round(rangeBounds.height);
|
||||||
|
document.body.removeChild(testElement);
|
||||||
|
if (rangeHeight === TEST_HEIGHT) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
var testIOSLineBreak = function (document) {
|
||||||
|
var testElement = document.createElement('boundtest');
|
||||||
|
testElement.style.width = '50px';
|
||||||
|
testElement.style.display = 'block';
|
||||||
|
testElement.style.fontSize = '12px';
|
||||||
|
testElement.style.letterSpacing = '0px';
|
||||||
|
testElement.style.wordSpacing = '0px';
|
||||||
|
document.body.appendChild(testElement);
|
||||||
|
var range = document.createRange();
|
||||||
|
testElement.innerHTML = typeof ''.repeat === 'function' ? '👨'.repeat(10) : '';
|
||||||
|
var node = testElement.firstChild;
|
||||||
|
var textList = css_line_break_1.toCodePoints(node.data).map(function (i) { return css_line_break_1.fromCodePoint(i); });
|
||||||
|
var offset = 0;
|
||||||
|
var prev = {};
|
||||||
|
// ios 13 does not handle range getBoundingClientRect line changes correctly #2177
|
||||||
|
var supports = textList.every(function (text, i) {
|
||||||
|
range.setStart(node, offset);
|
||||||
|
range.setEnd(node, offset + text.length);
|
||||||
|
var rect = range.getBoundingClientRect();
|
||||||
|
offset += text.length;
|
||||||
|
var boundAhead = rect.x > prev.x || rect.y > prev.y;
|
||||||
|
prev = rect;
|
||||||
|
if (i === 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return boundAhead;
|
||||||
|
});
|
||||||
|
document.body.removeChild(testElement);
|
||||||
|
return supports;
|
||||||
|
};
|
||||||
|
var testCORS = function () { return typeof new Image().crossOrigin !== 'undefined'; };
|
||||||
|
var testResponseType = function () { return typeof new XMLHttpRequest().responseType === 'string'; };
|
||||||
|
var testSVG = function (document) {
|
||||||
|
var img = new Image();
|
||||||
|
var canvas = document.createElement('canvas');
|
||||||
|
var ctx = canvas.getContext('2d');
|
||||||
|
if (!ctx) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
img.src = "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";
|
||||||
|
try {
|
||||||
|
ctx.drawImage(img, 0, 0);
|
||||||
|
canvas.toDataURL();
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
var isGreenPixel = function (data) {
|
||||||
|
return data[0] === 0 && data[1] === 255 && data[2] === 0 && data[3] === 255;
|
||||||
|
};
|
||||||
|
var testForeignObject = function (document) {
|
||||||
|
var canvas = document.createElement('canvas');
|
||||||
|
var size = 100;
|
||||||
|
canvas.width = size;
|
||||||
|
canvas.height = size;
|
||||||
|
var ctx = canvas.getContext('2d');
|
||||||
|
if (!ctx) {
|
||||||
|
return Promise.reject(false);
|
||||||
|
}
|
||||||
|
ctx.fillStyle = 'rgb(0, 255, 0)';
|
||||||
|
ctx.fillRect(0, 0, size, size);
|
||||||
|
var img = new Image();
|
||||||
|
var greenImageSrc = canvas.toDataURL();
|
||||||
|
img.src = greenImageSrc;
|
||||||
|
var svg = exports.createForeignObjectSVG(size, size, 0, 0, img);
|
||||||
|
ctx.fillStyle = 'red';
|
||||||
|
ctx.fillRect(0, 0, size, size);
|
||||||
|
return exports.loadSerializedSVG(svg)
|
||||||
|
.then(function (img) {
|
||||||
|
ctx.drawImage(img, 0, 0);
|
||||||
|
var data = ctx.getImageData(0, 0, size, size).data;
|
||||||
|
ctx.fillStyle = 'red';
|
||||||
|
ctx.fillRect(0, 0, size, size);
|
||||||
|
var node = document.createElement('div');
|
||||||
|
node.style.backgroundImage = "url(" + greenImageSrc + ")";
|
||||||
|
node.style.height = size + "px";
|
||||||
|
// Firefox 55 does not render inline <img /> tags
|
||||||
|
return isGreenPixel(data)
|
||||||
|
? exports.loadSerializedSVG(exports.createForeignObjectSVG(size, size, 0, 0, node))
|
||||||
|
: Promise.reject(false);
|
||||||
|
})
|
||||||
|
.then(function (img) {
|
||||||
|
ctx.drawImage(img, 0, 0);
|
||||||
|
// Edge does not render background-images
|
||||||
|
return isGreenPixel(ctx.getImageData(0, 0, size, size).data);
|
||||||
|
})
|
||||||
|
.catch(function () { return false; });
|
||||||
|
};
|
||||||
|
var createForeignObjectSVG = function (width, height, x, y, node) {
|
||||||
|
var xmlns = 'http://www.w3.org/2000/svg';
|
||||||
|
var svg = document.createElementNS(xmlns, 'svg');
|
||||||
|
var foreignObject = document.createElementNS(xmlns, 'foreignObject');
|
||||||
|
svg.setAttributeNS(null, 'width', width.toString());
|
||||||
|
svg.setAttributeNS(null, 'height', height.toString());
|
||||||
|
foreignObject.setAttributeNS(null, 'width', '100%');
|
||||||
|
foreignObject.setAttributeNS(null, 'height', '100%');
|
||||||
|
foreignObject.setAttributeNS(null, 'x', x.toString());
|
||||||
|
foreignObject.setAttributeNS(null, 'y', y.toString());
|
||||||
|
foreignObject.setAttributeNS(null, 'externalResourcesRequired', 'true');
|
||||||
|
svg.appendChild(foreignObject);
|
||||||
|
foreignObject.appendChild(node);
|
||||||
|
return svg;
|
||||||
|
};
|
||||||
|
exports.createForeignObjectSVG = createForeignObjectSVG;
|
||||||
|
var loadSerializedSVG = function (svg) {
|
||||||
|
return new Promise(function (resolve, reject) {
|
||||||
|
var img = new Image();
|
||||||
|
img.onload = function () { return resolve(img); };
|
||||||
|
img.onerror = reject;
|
||||||
|
img.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(new XMLSerializer().serializeToString(svg));
|
||||||
|
});
|
||||||
|
};
|
||||||
|
exports.loadSerializedSVG = loadSerializedSVG;
|
||||||
|
exports.FEATURES = {
|
||||||
|
get SUPPORT_RANGE_BOUNDS() {
|
||||||
|
'use strict';
|
||||||
|
var value = testRangeBounds(document);
|
||||||
|
Object.defineProperty(exports.FEATURES, 'SUPPORT_RANGE_BOUNDS', { value: value });
|
||||||
|
return value;
|
||||||
|
},
|
||||||
|
get SUPPORT_WORD_BREAKING() {
|
||||||
|
'use strict';
|
||||||
|
var value = exports.FEATURES.SUPPORT_RANGE_BOUNDS && testIOSLineBreak(document);
|
||||||
|
Object.defineProperty(exports.FEATURES, 'SUPPORT_WORD_BREAKING', { value: value });
|
||||||
|
return value;
|
||||||
|
},
|
||||||
|
get SUPPORT_SVG_DRAWING() {
|
||||||
|
'use strict';
|
||||||
|
var value = testSVG(document);
|
||||||
|
Object.defineProperty(exports.FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });
|
||||||
|
return value;
|
||||||
|
},
|
||||||
|
get SUPPORT_FOREIGNOBJECT_DRAWING() {
|
||||||
|
'use strict';
|
||||||
|
var value = typeof Array.from === 'function' && typeof window.fetch === 'function'
|
||||||
|
? testForeignObject(document)
|
||||||
|
: Promise.resolve(false);
|
||||||
|
Object.defineProperty(exports.FEATURES, 'SUPPORT_FOREIGNOBJECT_DRAWING', { value: value });
|
||||||
|
return value;
|
||||||
|
},
|
||||||
|
get SUPPORT_CORS_IMAGES() {
|
||||||
|
'use strict';
|
||||||
|
var value = testCORS();
|
||||||
|
Object.defineProperty(exports.FEATURES, 'SUPPORT_CORS_IMAGES', { value: value });
|
||||||
|
return value;
|
||||||
|
},
|
||||||
|
get SUPPORT_RESPONSE_TYPE() {
|
||||||
|
'use strict';
|
||||||
|
var value = testResponseType();
|
||||||
|
Object.defineProperty(exports.FEATURES, 'SUPPORT_RESPONSE_TYPE', { value: value });
|
||||||
|
return value;
|
||||||
|
},
|
||||||
|
get SUPPORT_CORS_XHR() {
|
||||||
|
'use strict';
|
||||||
|
var value = 'withCredentials' in new XMLHttpRequest();
|
||||||
|
Object.defineProperty(exports.FEATURES, 'SUPPORT_CORS_XHR', { value: value });
|
||||||
|
return value;
|
||||||
|
},
|
||||||
|
get SUPPORT_NATIVE_TEXT_SEGMENTATION() {
|
||||||
|
'use strict';
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
var value = !!(typeof Intl !== 'undefined' && Intl.Segmenter);
|
||||||
|
Object.defineProperty(exports.FEATURES, 'SUPPORT_NATIVE_TEXT_SEGMENTATION', { value: value });
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=features.js.map
|
1
node_modules/html2canvas/dist/lib/core/features.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/core/features.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
88
node_modules/html2canvas/dist/lib/core/logger.js
generated
vendored
Normal file
88
node_modules/html2canvas/dist/lib/core/logger.js
generated
vendored
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
"use strict";
|
||||||
|
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
||||||
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
||||||
|
to[j] = from[i];
|
||||||
|
return to;
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.Logger = void 0;
|
||||||
|
var Logger = /** @class */ (function () {
|
||||||
|
function Logger(_a) {
|
||||||
|
var id = _a.id, enabled = _a.enabled;
|
||||||
|
this.id = id;
|
||||||
|
this.enabled = enabled;
|
||||||
|
this.start = Date.now();
|
||||||
|
}
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
Logger.prototype.debug = function () {
|
||||||
|
var args = [];
|
||||||
|
for (var _i = 0; _i < arguments.length; _i++) {
|
||||||
|
args[_i] = arguments[_i];
|
||||||
|
}
|
||||||
|
if (this.enabled) {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
if (typeof window !== 'undefined' && window.console && typeof console.debug === 'function') {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.debug.apply(console, __spreadArray([this.id, this.getTime() + "ms"], args));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.info.apply(this, args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Logger.prototype.getTime = function () {
|
||||||
|
return Date.now() - this.start;
|
||||||
|
};
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
Logger.prototype.info = function () {
|
||||||
|
var args = [];
|
||||||
|
for (var _i = 0; _i < arguments.length; _i++) {
|
||||||
|
args[_i] = arguments[_i];
|
||||||
|
}
|
||||||
|
if (this.enabled) {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
if (typeof window !== 'undefined' && window.console && typeof console.info === 'function') {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.info.apply(console, __spreadArray([this.id, this.getTime() + "ms"], args));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
Logger.prototype.warn = function () {
|
||||||
|
var args = [];
|
||||||
|
for (var _i = 0; _i < arguments.length; _i++) {
|
||||||
|
args[_i] = arguments[_i];
|
||||||
|
}
|
||||||
|
if (this.enabled) {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
if (typeof window !== 'undefined' && window.console && typeof console.warn === 'function') {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.warn.apply(console, __spreadArray([this.id, this.getTime() + "ms"], args));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.info.apply(this, args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
Logger.prototype.error = function () {
|
||||||
|
var args = [];
|
||||||
|
for (var _i = 0; _i < arguments.length; _i++) {
|
||||||
|
args[_i] = arguments[_i];
|
||||||
|
}
|
||||||
|
if (this.enabled) {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
if (typeof window !== 'undefined' && window.console && typeof console.error === 'function') {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.error.apply(console, __spreadArray([this.id, this.getTime() + "ms"], args));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.info.apply(this, args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Logger.instances = {};
|
||||||
|
return Logger;
|
||||||
|
}());
|
||||||
|
exports.Logger = Logger;
|
||||||
|
//# sourceMappingURL=logger.js.map
|
1
node_modules/html2canvas/dist/lib/core/logger.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/core/logger.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/core/logger.ts"],"names":[],"mappings":";;;;;;;;AAKA;IAOI,gBAAY,EAA4B;YAA3B,EAAE,QAAA,EAAE,OAAO,aAAA;QACpB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC5B,CAAC;IAED,8DAA8D;IAC9D,sBAAK,GAAL;QAAM,cAAkB;aAAlB,UAAkB,EAAlB,qBAAkB,EAAlB,IAAkB;YAAlB,yBAAkB;;QACpB,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,sCAAsC;YACtC,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,OAAO,IAAI,OAAO,OAAO,CAAC,KAAK,KAAK,UAAU,EAAE;gBACxF,sCAAsC;gBACtC,OAAO,CAAC,KAAK,OAAb,OAAO,iBAAO,IAAI,CAAC,EAAE,EAAK,IAAI,CAAC,OAAO,EAAE,OAAI,GAAK,IAAI,GAAE;aAC1D;iBAAM;gBACH,IAAI,CAAC,IAAI,OAAT,IAAI,EAAS,IAAI,EAAE;aACtB;SACJ;IACL,CAAC;I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OAAO,OAAO,CAAC,KAAK,KAAK,UAAU,EAAE;gBACxF,sCAAsC;gBACtC,OAAO,CAAC,KAAK,OAAb,OAAO,iBAAO,IAAI,CAAC,EAAE,EAAK,IAAI,CAAC,OAAO,EAAE,OAAI,GAAK,IAAI,GAAE;aAC1D;iBAAM;gBACH,IAAI,CAAC,IAAI,OAAT,IAAI,EAAS,IAAI,EAAE;aACtB;SACJ;IACL,CAAC;IAhEM,gBAAS,GAA4B,EAAE,CAAC;IAiEnD,aAAC;CAAA,AAlED,IAkEC;AAlEY,wBAAM"}
|
5
node_modules/html2canvas/dist/lib/core/util.js
generated
vendored
Normal file
5
node_modules/html2canvas/dist/lib/core/util.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.SMALL_IMAGE = void 0;
|
||||||
|
exports.SMALL_IMAGE = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
|
||||||
|
//# sourceMappingURL=util.js.map
|
1
node_modules/html2canvas/dist/lib/core/util.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/core/util.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../src/core/util.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,gFAAgF,CAAC"}
|
3
node_modules/html2canvas/dist/lib/css/IPropertyDescriptor.js
generated
vendored
Normal file
3
node_modules/html2canvas/dist/lib/css/IPropertyDescriptor.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
//# sourceMappingURL=IPropertyDescriptor.js.map
|
1
node_modules/html2canvas/dist/lib/css/IPropertyDescriptor.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/css/IPropertyDescriptor.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"IPropertyDescriptor.js","sourceRoot":"","sources":["../../../src/css/IPropertyDescriptor.ts"],"names":[],"mappings":""}
|
3
node_modules/html2canvas/dist/lib/css/ITypeDescriptor.js
generated
vendored
Normal file
3
node_modules/html2canvas/dist/lib/css/ITypeDescriptor.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
//# sourceMappingURL=ITypeDescriptor.js.map
|
1
node_modules/html2canvas/dist/lib/css/ITypeDescriptor.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/css/ITypeDescriptor.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"ITypeDescriptor.js","sourceRoot":"","sources":["../../../src/css/ITypeDescriptor.ts"],"names":[],"mappings":""}
|
216
node_modules/html2canvas/dist/lib/css/index.js
generated
vendored
Normal file
216
node_modules/html2canvas/dist/lib/css/index.js
generated
vendored
Normal file
|
@ -0,0 +1,216 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.CSSParsedCounterDeclaration = exports.CSSParsedPseudoDeclaration = exports.CSSParsedDeclaration = void 0;
|
||||||
|
var background_clip_1 = require("./property-descriptors/background-clip");
|
||||||
|
var background_color_1 = require("./property-descriptors/background-color");
|
||||||
|
var background_image_1 = require("./property-descriptors/background-image");
|
||||||
|
var background_origin_1 = require("./property-descriptors/background-origin");
|
||||||
|
var background_position_1 = require("./property-descriptors/background-position");
|
||||||
|
var background_repeat_1 = require("./property-descriptors/background-repeat");
|
||||||
|
var background_size_1 = require("./property-descriptors/background-size");
|
||||||
|
var border_color_1 = require("./property-descriptors/border-color");
|
||||||
|
var border_radius_1 = require("./property-descriptors/border-radius");
|
||||||
|
var border_style_1 = require("./property-descriptors/border-style");
|
||||||
|
var border_width_1 = require("./property-descriptors/border-width");
|
||||||
|
var color_1 = require("./property-descriptors/color");
|
||||||
|
var direction_1 = require("./property-descriptors/direction");
|
||||||
|
var display_1 = require("./property-descriptors/display");
|
||||||
|
var float_1 = require("./property-descriptors/float");
|
||||||
|
var letter_spacing_1 = require("./property-descriptors/letter-spacing");
|
||||||
|
var line_break_1 = require("./property-descriptors/line-break");
|
||||||
|
var line_height_1 = require("./property-descriptors/line-height");
|
||||||
|
var list_style_image_1 = require("./property-descriptors/list-style-image");
|
||||||
|
var list_style_position_1 = require("./property-descriptors/list-style-position");
|
||||||
|
var list_style_type_1 = require("./property-descriptors/list-style-type");
|
||||||
|
var margin_1 = require("./property-descriptors/margin");
|
||||||
|
var overflow_1 = require("./property-descriptors/overflow");
|
||||||
|
var overflow_wrap_1 = require("./property-descriptors/overflow-wrap");
|
||||||
|
var padding_1 = require("./property-descriptors/padding");
|
||||||
|
var text_align_1 = require("./property-descriptors/text-align");
|
||||||
|
var position_1 = require("./property-descriptors/position");
|
||||||
|
var text_shadow_1 = require("./property-descriptors/text-shadow");
|
||||||
|
var text_transform_1 = require("./property-descriptors/text-transform");
|
||||||
|
var transform_1 = require("./property-descriptors/transform");
|
||||||
|
var transform_origin_1 = require("./property-descriptors/transform-origin");
|
||||||
|
var visibility_1 = require("./property-descriptors/visibility");
|
||||||
|
var word_break_1 = require("./property-descriptors/word-break");
|
||||||
|
var z_index_1 = require("./property-descriptors/z-index");
|
||||||
|
var parser_1 = require("./syntax/parser");
|
||||||
|
var tokenizer_1 = require("./syntax/tokenizer");
|
||||||
|
var color_2 = require("./types/color");
|
||||||
|
var angle_1 = require("./types/angle");
|
||||||
|
var image_1 = require("./types/image");
|
||||||
|
var time_1 = require("./types/time");
|
||||||
|
var opacity_1 = require("./property-descriptors/opacity");
|
||||||
|
var text_decoration_color_1 = require("./property-descriptors/text-decoration-color");
|
||||||
|
var text_decoration_line_1 = require("./property-descriptors/text-decoration-line");
|
||||||
|
var length_percentage_1 = require("./types/length-percentage");
|
||||||
|
var font_family_1 = require("./property-descriptors/font-family");
|
||||||
|
var font_size_1 = require("./property-descriptors/font-size");
|
||||||
|
var length_1 = require("./types/length");
|
||||||
|
var font_weight_1 = require("./property-descriptors/font-weight");
|
||||||
|
var font_variant_1 = require("./property-descriptors/font-variant");
|
||||||
|
var font_style_1 = require("./property-descriptors/font-style");
|
||||||
|
var bitwise_1 = require("../core/bitwise");
|
||||||
|
var content_1 = require("./property-descriptors/content");
|
||||||
|
var counter_increment_1 = require("./property-descriptors/counter-increment");
|
||||||
|
var counter_reset_1 = require("./property-descriptors/counter-reset");
|
||||||
|
var duration_1 = require("./property-descriptors/duration");
|
||||||
|
var quotes_1 = require("./property-descriptors/quotes");
|
||||||
|
var box_shadow_1 = require("./property-descriptors/box-shadow");
|
||||||
|
var paint_order_1 = require("./property-descriptors/paint-order");
|
||||||
|
var webkit_text_stroke_color_1 = require("./property-descriptors/webkit-text-stroke-color");
|
||||||
|
var webkit_text_stroke_width_1 = require("./property-descriptors/webkit-text-stroke-width");
|
||||||
|
var CSSParsedDeclaration = /** @class */ (function () {
|
||||||
|
function CSSParsedDeclaration(context, declaration) {
|
||||||
|
var _a, _b;
|
||||||
|
this.animationDuration = parse(context, duration_1.duration, declaration.animationDuration);
|
||||||
|
this.backgroundClip = parse(context, background_clip_1.backgroundClip, declaration.backgroundClip);
|
||||||
|
this.backgroundColor = parse(context, background_color_1.backgroundColor, declaration.backgroundColor);
|
||||||
|
this.backgroundImage = parse(context, background_image_1.backgroundImage, declaration.backgroundImage);
|
||||||
|
this.backgroundOrigin = parse(context, background_origin_1.backgroundOrigin, declaration.backgroundOrigin);
|
||||||
|
this.backgroundPosition = parse(context, background_position_1.backgroundPosition, declaration.backgroundPosition);
|
||||||
|
this.backgroundRepeat = parse(context, background_repeat_1.backgroundRepeat, declaration.backgroundRepeat);
|
||||||
|
this.backgroundSize = parse(context, background_size_1.backgroundSize, declaration.backgroundSize);
|
||||||
|
this.borderTopColor = parse(context, border_color_1.borderTopColor, declaration.borderTopColor);
|
||||||
|
this.borderRightColor = parse(context, border_color_1.borderRightColor, declaration.borderRightColor);
|
||||||
|
this.borderBottomColor = parse(context, border_color_1.borderBottomColor, declaration.borderBottomColor);
|
||||||
|
this.borderLeftColor = parse(context, border_color_1.borderLeftColor, declaration.borderLeftColor);
|
||||||
|
this.borderTopLeftRadius = parse(context, border_radius_1.borderTopLeftRadius, declaration.borderTopLeftRadius);
|
||||||
|
this.borderTopRightRadius = parse(context, border_radius_1.borderTopRightRadius, declaration.borderTopRightRadius);
|
||||||
|
this.borderBottomRightRadius = parse(context, border_radius_1.borderBottomRightRadius, declaration.borderBottomRightRadius);
|
||||||
|
this.borderBottomLeftRadius = parse(context, border_radius_1.borderBottomLeftRadius, declaration.borderBottomLeftRadius);
|
||||||
|
this.borderTopStyle = parse(context, border_style_1.borderTopStyle, declaration.borderTopStyle);
|
||||||
|
this.borderRightStyle = parse(context, border_style_1.borderRightStyle, declaration.borderRightStyle);
|
||||||
|
this.borderBottomStyle = parse(context, border_style_1.borderBottomStyle, declaration.borderBottomStyle);
|
||||||
|
this.borderLeftStyle = parse(context, border_style_1.borderLeftStyle, declaration.borderLeftStyle);
|
||||||
|
this.borderTopWidth = parse(context, border_width_1.borderTopWidth, declaration.borderTopWidth);
|
||||||
|
this.borderRightWidth = parse(context, border_width_1.borderRightWidth, declaration.borderRightWidth);
|
||||||
|
this.borderBottomWidth = parse(context, border_width_1.borderBottomWidth, declaration.borderBottomWidth);
|
||||||
|
this.borderLeftWidth = parse(context, border_width_1.borderLeftWidth, declaration.borderLeftWidth);
|
||||||
|
this.boxShadow = parse(context, box_shadow_1.boxShadow, declaration.boxShadow);
|
||||||
|
this.color = parse(context, color_1.color, declaration.color);
|
||||||
|
this.direction = parse(context, direction_1.direction, declaration.direction);
|
||||||
|
this.display = parse(context, display_1.display, declaration.display);
|
||||||
|
this.float = parse(context, float_1.float, declaration.cssFloat);
|
||||||
|
this.fontFamily = parse(context, font_family_1.fontFamily, declaration.fontFamily);
|
||||||
|
this.fontSize = parse(context, font_size_1.fontSize, declaration.fontSize);
|
||||||
|
this.fontStyle = parse(context, font_style_1.fontStyle, declaration.fontStyle);
|
||||||
|
this.fontVariant = parse(context, font_variant_1.fontVariant, declaration.fontVariant);
|
||||||
|
this.fontWeight = parse(context, font_weight_1.fontWeight, declaration.fontWeight);
|
||||||
|
this.letterSpacing = parse(context, letter_spacing_1.letterSpacing, declaration.letterSpacing);
|
||||||
|
this.lineBreak = parse(context, line_break_1.lineBreak, declaration.lineBreak);
|
||||||
|
this.lineHeight = parse(context, line_height_1.lineHeight, declaration.lineHeight);
|
||||||
|
this.listStyleImage = parse(context, list_style_image_1.listStyleImage, declaration.listStyleImage);
|
||||||
|
this.listStylePosition = parse(context, list_style_position_1.listStylePosition, declaration.listStylePosition);
|
||||||
|
this.listStyleType = parse(context, list_style_type_1.listStyleType, declaration.listStyleType);
|
||||||
|
this.marginTop = parse(context, margin_1.marginTop, declaration.marginTop);
|
||||||
|
this.marginRight = parse(context, margin_1.marginRight, declaration.marginRight);
|
||||||
|
this.marginBottom = parse(context, margin_1.marginBottom, declaration.marginBottom);
|
||||||
|
this.marginLeft = parse(context, margin_1.marginLeft, declaration.marginLeft);
|
||||||
|
this.opacity = parse(context, opacity_1.opacity, declaration.opacity);
|
||||||
|
var overflowTuple = parse(context, overflow_1.overflow, declaration.overflow);
|
||||||
|
this.overflowX = overflowTuple[0];
|
||||||
|
this.overflowY = overflowTuple[overflowTuple.length > 1 ? 1 : 0];
|
||||||
|
this.overflowWrap = parse(context, overflow_wrap_1.overflowWrap, declaration.overflowWrap);
|
||||||
|
this.paddingTop = parse(context, padding_1.paddingTop, declaration.paddingTop);
|
||||||
|
this.paddingRight = parse(context, padding_1.paddingRight, declaration.paddingRight);
|
||||||
|
this.paddingBottom = parse(context, padding_1.paddingBottom, declaration.paddingBottom);
|
||||||
|
this.paddingLeft = parse(context, padding_1.paddingLeft, declaration.paddingLeft);
|
||||||
|
this.paintOrder = parse(context, paint_order_1.paintOrder, declaration.paintOrder);
|
||||||
|
this.position = parse(context, position_1.position, declaration.position);
|
||||||
|
this.textAlign = parse(context, text_align_1.textAlign, declaration.textAlign);
|
||||||
|
this.textDecorationColor = parse(context, text_decoration_color_1.textDecorationColor, (_a = declaration.textDecorationColor) !== null && _a !== void 0 ? _a : declaration.color);
|
||||||
|
this.textDecorationLine = parse(context, text_decoration_line_1.textDecorationLine, (_b = declaration.textDecorationLine) !== null && _b !== void 0 ? _b : declaration.textDecoration);
|
||||||
|
this.textShadow = parse(context, text_shadow_1.textShadow, declaration.textShadow);
|
||||||
|
this.textTransform = parse(context, text_transform_1.textTransform, declaration.textTransform);
|
||||||
|
this.transform = parse(context, transform_1.transform, declaration.transform);
|
||||||
|
this.transformOrigin = parse(context, transform_origin_1.transformOrigin, declaration.transformOrigin);
|
||||||
|
this.visibility = parse(context, visibility_1.visibility, declaration.visibility);
|
||||||
|
this.webkitTextStrokeColor = parse(context, webkit_text_stroke_color_1.webkitTextStrokeColor, declaration.webkitTextStrokeColor);
|
||||||
|
this.webkitTextStrokeWidth = parse(context, webkit_text_stroke_width_1.webkitTextStrokeWidth, declaration.webkitTextStrokeWidth);
|
||||||
|
this.wordBreak = parse(context, word_break_1.wordBreak, declaration.wordBreak);
|
||||||
|
this.zIndex = parse(context, z_index_1.zIndex, declaration.zIndex);
|
||||||
|
}
|
||||||
|
CSSParsedDeclaration.prototype.isVisible = function () {
|
||||||
|
return this.display > 0 && this.opacity > 0 && this.visibility === 0 /* VISIBLE */;
|
||||||
|
};
|
||||||
|
CSSParsedDeclaration.prototype.isTransparent = function () {
|
||||||
|
return color_2.isTransparent(this.backgroundColor);
|
||||||
|
};
|
||||||
|
CSSParsedDeclaration.prototype.isTransformed = function () {
|
||||||
|
return this.transform !== null;
|
||||||
|
};
|
||||||
|
CSSParsedDeclaration.prototype.isPositioned = function () {
|
||||||
|
return this.position !== 0 /* STATIC */;
|
||||||
|
};
|
||||||
|
CSSParsedDeclaration.prototype.isPositionedWithZIndex = function () {
|
||||||
|
return this.isPositioned() && !this.zIndex.auto;
|
||||||
|
};
|
||||||
|
CSSParsedDeclaration.prototype.isFloating = function () {
|
||||||
|
return this.float !== 0 /* NONE */;
|
||||||
|
};
|
||||||
|
CSSParsedDeclaration.prototype.isInlineLevel = function () {
|
||||||
|
return (bitwise_1.contains(this.display, 4 /* INLINE */) ||
|
||||||
|
bitwise_1.contains(this.display, 33554432 /* INLINE_BLOCK */) ||
|
||||||
|
bitwise_1.contains(this.display, 268435456 /* INLINE_FLEX */) ||
|
||||||
|
bitwise_1.contains(this.display, 536870912 /* INLINE_GRID */) ||
|
||||||
|
bitwise_1.contains(this.display, 67108864 /* INLINE_LIST_ITEM */) ||
|
||||||
|
bitwise_1.contains(this.display, 134217728 /* INLINE_TABLE */));
|
||||||
|
};
|
||||||
|
return CSSParsedDeclaration;
|
||||||
|
}());
|
||||||
|
exports.CSSParsedDeclaration = CSSParsedDeclaration;
|
||||||
|
var CSSParsedPseudoDeclaration = /** @class */ (function () {
|
||||||
|
function CSSParsedPseudoDeclaration(context, declaration) {
|
||||||
|
this.content = parse(context, content_1.content, declaration.content);
|
||||||
|
this.quotes = parse(context, quotes_1.quotes, declaration.quotes);
|
||||||
|
}
|
||||||
|
return CSSParsedPseudoDeclaration;
|
||||||
|
}());
|
||||||
|
exports.CSSParsedPseudoDeclaration = CSSParsedPseudoDeclaration;
|
||||||
|
var CSSParsedCounterDeclaration = /** @class */ (function () {
|
||||||
|
function CSSParsedCounterDeclaration(context, declaration) {
|
||||||
|
this.counterIncrement = parse(context, counter_increment_1.counterIncrement, declaration.counterIncrement);
|
||||||
|
this.counterReset = parse(context, counter_reset_1.counterReset, declaration.counterReset);
|
||||||
|
}
|
||||||
|
return CSSParsedCounterDeclaration;
|
||||||
|
}());
|
||||||
|
exports.CSSParsedCounterDeclaration = CSSParsedCounterDeclaration;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
var parse = function (context, descriptor, style) {
|
||||||
|
var tokenizer = new tokenizer_1.Tokenizer();
|
||||||
|
var value = style !== null && typeof style !== 'undefined' ? style.toString() : descriptor.initialValue;
|
||||||
|
tokenizer.write(value);
|
||||||
|
var parser = new parser_1.Parser(tokenizer.read());
|
||||||
|
switch (descriptor.type) {
|
||||||
|
case 2 /* IDENT_VALUE */:
|
||||||
|
var token = parser.parseComponentValue();
|
||||||
|
return descriptor.parse(context, parser_1.isIdentToken(token) ? token.value : descriptor.initialValue);
|
||||||
|
case 0 /* VALUE */:
|
||||||
|
return descriptor.parse(context, parser.parseComponentValue());
|
||||||
|
case 1 /* LIST */:
|
||||||
|
return descriptor.parse(context, parser.parseComponentValues());
|
||||||
|
case 4 /* TOKEN_VALUE */:
|
||||||
|
return parser.parseComponentValue();
|
||||||
|
case 3 /* TYPE_VALUE */:
|
||||||
|
switch (descriptor.format) {
|
||||||
|
case 'angle':
|
||||||
|
return angle_1.angle.parse(context, parser.parseComponentValue());
|
||||||
|
case 'color':
|
||||||
|
return color_2.color.parse(context, parser.parseComponentValue());
|
||||||
|
case 'image':
|
||||||
|
return image_1.image.parse(context, parser.parseComponentValue());
|
||||||
|
case 'length':
|
||||||
|
var length_2 = parser.parseComponentValue();
|
||||||
|
return length_1.isLength(length_2) ? length_2 : length_percentage_1.ZERO_LENGTH;
|
||||||
|
case 'length-percentage':
|
||||||
|
var value_1 = parser.parseComponentValue();
|
||||||
|
return length_percentage_1.isLengthPercentage(value_1) ? value_1 : length_percentage_1.ZERO_LENGTH;
|
||||||
|
case 'time':
|
||||||
|
return time_1.time.parse(context, parser.parseComponentValue());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=index.js.map
|
1
node_modules/html2canvas/dist/lib/css/index.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/css/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
9
node_modules/html2canvas/dist/lib/css/layout/__mocks__/bounds.js
generated
vendored
Normal file
9
node_modules/html2canvas/dist/lib/css/layout/__mocks__/bounds.js
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.parseBounds = exports.Bounds = void 0;
|
||||||
|
exports.Bounds = jest.requireActual('../bounds').Bounds;
|
||||||
|
var parseBounds = function () {
|
||||||
|
return new exports.Bounds(0, 0, 200, 50);
|
||||||
|
};
|
||||||
|
exports.parseBounds = parseBounds;
|
||||||
|
//# sourceMappingURL=bounds.js.map
|
1
node_modules/html2canvas/dist/lib/css/layout/__mocks__/bounds.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/css/layout/__mocks__/bounds.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"bounds.js","sourceRoot":"","sources":["../../../../../src/css/layout/__mocks__/bounds.ts"],"names":[],"mappings":";;;AAAc,QAAA,MAAM,GAAI,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,QAAC;AACjD,IAAM,WAAW,GAAG;IACvB,OAAO,IAAI,cAAM,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;AACrC,CAAC,CAAC;AAFW,QAAA,WAAW,eAEtB"}
|
42
node_modules/html2canvas/dist/lib/css/layout/bounds.js
generated
vendored
Normal file
42
node_modules/html2canvas/dist/lib/css/layout/bounds.js
generated
vendored
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.parseDocumentSize = exports.parseBounds = exports.Bounds = void 0;
|
||||||
|
var Bounds = /** @class */ (function () {
|
||||||
|
function Bounds(left, top, width, height) {
|
||||||
|
this.left = left;
|
||||||
|
this.top = top;
|
||||||
|
this.width = width;
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
Bounds.prototype.add = function (x, y, w, h) {
|
||||||
|
return new Bounds(this.left + x, this.top + y, this.width + w, this.height + h);
|
||||||
|
};
|
||||||
|
Bounds.fromClientRect = function (context, clientRect) {
|
||||||
|
return new Bounds(clientRect.left + context.windowBounds.left, clientRect.top + context.windowBounds.top, clientRect.width, clientRect.height);
|
||||||
|
};
|
||||||
|
Bounds.fromDOMRectList = function (context, domRectList) {
|
||||||
|
var domRect = Array.from(domRectList).find(function (rect) { return rect.width !== 0; });
|
||||||
|
return domRect
|
||||||
|
? new Bounds(domRect.left + context.windowBounds.left, domRect.top + context.windowBounds.top, domRect.width, domRect.height)
|
||||||
|
: Bounds.EMPTY;
|
||||||
|
};
|
||||||
|
Bounds.EMPTY = new Bounds(0, 0, 0, 0);
|
||||||
|
return Bounds;
|
||||||
|
}());
|
||||||
|
exports.Bounds = Bounds;
|
||||||
|
var parseBounds = function (context, node) {
|
||||||
|
return Bounds.fromClientRect(context, node.getBoundingClientRect());
|
||||||
|
};
|
||||||
|
exports.parseBounds = parseBounds;
|
||||||
|
var parseDocumentSize = function (document) {
|
||||||
|
var body = document.body;
|
||||||
|
var documentElement = document.documentElement;
|
||||||
|
if (!body || !documentElement) {
|
||||||
|
throw new Error("Unable to get document size");
|
||||||
|
}
|
||||||
|
var width = Math.max(Math.max(body.scrollWidth, documentElement.scrollWidth), Math.max(body.offsetWidth, documentElement.offsetWidth), Math.max(body.clientWidth, documentElement.clientWidth));
|
||||||
|
var height = Math.max(Math.max(body.scrollHeight, documentElement.scrollHeight), Math.max(body.offsetHeight, documentElement.offsetHeight), Math.max(body.clientHeight, documentElement.clientHeight));
|
||||||
|
return new Bounds(0, 0, width, height);
|
||||||
|
};
|
||||||
|
exports.parseDocumentSize = parseDocumentSize;
|
||||||
|
//# sourceMappingURL=bounds.js.map
|
1
node_modules/html2canvas/dist/lib/css/layout/bounds.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/css/layout/bounds.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
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AAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC,CAAC;AApBW,QAAA,iBAAiB,qBAoB5B"}
|
137
node_modules/html2canvas/dist/lib/css/layout/text.js
generated
vendored
Normal file
137
node_modules/html2canvas/dist/lib/css/layout/text.js
generated
vendored
Normal file
|
@ -0,0 +1,137 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.segmentGraphemes = exports.parseTextBounds = exports.TextBounds = void 0;
|
||||||
|
var css_line_break_1 = require("css-line-break");
|
||||||
|
var text_segmentation_1 = require("text-segmentation");
|
||||||
|
var bounds_1 = require("./bounds");
|
||||||
|
var features_1 = require("../../core/features");
|
||||||
|
var TextBounds = /** @class */ (function () {
|
||||||
|
function TextBounds(text, bounds) {
|
||||||
|
this.text = text;
|
||||||
|
this.bounds = bounds;
|
||||||
|
}
|
||||||
|
return TextBounds;
|
||||||
|
}());
|
||||||
|
exports.TextBounds = TextBounds;
|
||||||
|
var parseTextBounds = function (context, value, styles, node) {
|
||||||
|
var textList = breakText(value, styles);
|
||||||
|
var textBounds = [];
|
||||||
|
var offset = 0;
|
||||||
|
textList.forEach(function (text) {
|
||||||
|
if (styles.textDecorationLine.length || text.trim().length > 0) {
|
||||||
|
if (features_1.FEATURES.SUPPORT_RANGE_BOUNDS) {
|
||||||
|
var clientRects = createRange(node, offset, text.length).getClientRects();
|
||||||
|
if (clientRects.length > 1) {
|
||||||
|
var subSegments = exports.segmentGraphemes(text);
|
||||||
|
var subOffset_1 = 0;
|
||||||
|
subSegments.forEach(function (subSegment) {
|
||||||
|
textBounds.push(new TextBounds(subSegment, bounds_1.Bounds.fromDOMRectList(context, createRange(node, subOffset_1 + offset, subSegment.length).getClientRects())));
|
||||||
|
subOffset_1 += subSegment.length;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
textBounds.push(new TextBounds(text, bounds_1.Bounds.fromDOMRectList(context, clientRects)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var replacementNode = node.splitText(text.length);
|
||||||
|
textBounds.push(new TextBounds(text, getWrapperBounds(context, node)));
|
||||||
|
node = replacementNode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!features_1.FEATURES.SUPPORT_RANGE_BOUNDS) {
|
||||||
|
node = node.splitText(text.length);
|
||||||
|
}
|
||||||
|
offset += text.length;
|
||||||
|
});
|
||||||
|
return textBounds;
|
||||||
|
};
|
||||||
|
exports.parseTextBounds = parseTextBounds;
|
||||||
|
var getWrapperBounds = function (context, node) {
|
||||||
|
var ownerDocument = node.ownerDocument;
|
||||||
|
if (ownerDocument) {
|
||||||
|
var wrapper = ownerDocument.createElement('html2canvaswrapper');
|
||||||
|
wrapper.appendChild(node.cloneNode(true));
|
||||||
|
var parentNode = node.parentNode;
|
||||||
|
if (parentNode) {
|
||||||
|
parentNode.replaceChild(wrapper, node);
|
||||||
|
var bounds = bounds_1.parseBounds(context, wrapper);
|
||||||
|
if (wrapper.firstChild) {
|
||||||
|
parentNode.replaceChild(wrapper.firstChild, wrapper);
|
||||||
|
}
|
||||||
|
return bounds;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return bounds_1.Bounds.EMPTY;
|
||||||
|
};
|
||||||
|
var createRange = function (node, offset, length) {
|
||||||
|
var ownerDocument = node.ownerDocument;
|
||||||
|
if (!ownerDocument) {
|
||||||
|
throw new Error('Node has no owner document');
|
||||||
|
}
|
||||||
|
var range = ownerDocument.createRange();
|
||||||
|
range.setStart(node, offset);
|
||||||
|
range.setEnd(node, offset + length);
|
||||||
|
return range;
|
||||||
|
};
|
||||||
|
var segmentGraphemes = function (value) {
|
||||||
|
if (features_1.FEATURES.SUPPORT_NATIVE_TEXT_SEGMENTATION) {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
var segmenter = new Intl.Segmenter(void 0, { granularity: 'grapheme' });
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
return Array.from(segmenter.segment(value)).map(function (segment) { return segment.segment; });
|
||||||
|
}
|
||||||
|
return text_segmentation_1.splitGraphemes(value);
|
||||||
|
};
|
||||||
|
exports.segmentGraphemes = segmentGraphemes;
|
||||||
|
var segmentWords = function (value, styles) {
|
||||||
|
if (features_1.FEATURES.SUPPORT_NATIVE_TEXT_SEGMENTATION) {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
var segmenter = new Intl.Segmenter(void 0, {
|
||||||
|
granularity: 'word'
|
||||||
|
});
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
return Array.from(segmenter.segment(value)).map(function (segment) { return segment.segment; });
|
||||||
|
}
|
||||||
|
return breakWords(value, styles);
|
||||||
|
};
|
||||||
|
var breakText = function (value, styles) {
|
||||||
|
return styles.letterSpacing !== 0 ? exports.segmentGraphemes(value) : segmentWords(value, styles);
|
||||||
|
};
|
||||||
|
// https://drafts.csswg.org/css-text/#word-separator
|
||||||
|
var wordSeparators = [0x0020, 0x00a0, 0x1361, 0x10100, 0x10101, 0x1039, 0x1091];
|
||||||
|
var breakWords = function (str, styles) {
|
||||||
|
var breaker = css_line_break_1.LineBreaker(str, {
|
||||||
|
lineBreak: styles.lineBreak,
|
||||||
|
wordBreak: styles.overflowWrap === "break-word" /* BREAK_WORD */ ? 'break-word' : styles.wordBreak
|
||||||
|
});
|
||||||
|
var words = [];
|
||||||
|
var bk;
|
||||||
|
var _loop_1 = function () {
|
||||||
|
if (bk.value) {
|
||||||
|
var value = bk.value.slice();
|
||||||
|
var codePoints = css_line_break_1.toCodePoints(value);
|
||||||
|
var word_1 = '';
|
||||||
|
codePoints.forEach(function (codePoint) {
|
||||||
|
if (wordSeparators.indexOf(codePoint) === -1) {
|
||||||
|
word_1 += css_line_break_1.fromCodePoint(codePoint);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (word_1.length) {
|
||||||
|
words.push(word_1);
|
||||||
|
}
|
||||||
|
words.push(css_line_break_1.fromCodePoint(codePoint));
|
||||||
|
word_1 = '';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (word_1.length) {
|
||||||
|
words.push(word_1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
while (!(bk = breaker.next()).done) {
|
||||||
|
_loop_1();
|
||||||
|
}
|
||||||
|
return words;
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=text.js.map
|
1
node_modules/html2canvas/dist/lib/css/layout/text.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/css/layout/text.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../../../src/css/layout/text.ts"],"names":[],"mappings":";;;AAEA,iDAAwE;AACxE,uDAAiD;AACjD,mCAA6C;AAC7C,gDAA6C;AAG7C;IAII,oBAAY,IAAY,EAAE,MAAc;QACpC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IACL,iBAAC;AAAD,CAAC,AARD,IAQC;AARY,gCAAU;AAUhB,IAAM,eAAe,GAAG,UAC3B,OAAgB,EAChB,KAAa,EACb,MAA4B,EAC5B,IAAU;IAEV,IAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC1C,IAAM,UAAU,GAAiB,EAAE,CAAC;IACpC,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,QAAQ,CAAC,OAAO,CAAC,UAAC,IAAI;QAClB,IAAI,MAAM,CAAC,kBAAkB,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;YAC5D,IAAI,mBAAQ,CAAC,oBAAoB,EAAE;gBAC/B,IAAM,WAAW,GAAG,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,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,SAAS;QAC3B,SAAS,EAAE,MAAM,CAAC,YAAY,kCAA6B,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS;KAChG,CAAC,CAAC;IAEH,IAAM,KAAK,GAAG,EAAE,CAAC;IACjB,IAAI,EAAE,CAAC;;QAGH,IAAI,EAAE,CAAC,KAAK,EAAE;YACV,IAAM,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YAC/B,IAAM,UAAU,GAAG,6BAAY,CAAC,KAAK,CAAC,CAAC;YACvC,IAAI,MAAI,GAAG,EAAE,CAAC;YACd,UAAU,CAAC,OAAO,CAAC,UAAC,SAAS;gBACzB,IAAI,cAAc,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE;oBAC1C,MAAI,IAAI,8BAAa,CAAC,SAAS,CAAC,CAAC;iBACpC;qBAAM;oBACH,IAAI,MAAI,CAAC,MAAM,EAAE;wBACb,KAAK,CAAC,IAAI,CAAC,MAAI,CAAC,CAAC;qBACpB;oBACD,KAAK,CAAC,IAAI,CAAC,8BAAa,CAAC,SAAS,CAAC,CAAC,CAAC;oBACrC,MAAI,GAAG,EAAE,CAAC;iBACb;YACL,CAAC,CAAC,CAAC;YAEH,IAAI,MAAI,CAAC,MAAM,EAAE;gBACb,KAAK,CAAC,IAAI,CAAC,MAAI,CAAC,CAAC;aACpB;SACJ;;IApBL,OAAO,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI;;KAqBjC;IAED,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC"}
|
48
node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/background-tests.js
generated
vendored
Normal file
48
node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/background-tests.js
generated
vendored
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
var assert_1 = require("assert");
|
||||||
|
var parser_1 = require("../../syntax/parser");
|
||||||
|
var background_image_1 = require("../background-image");
|
||||||
|
var color_1 = require("../../types/color");
|
||||||
|
var angle_1 = require("../../types/angle");
|
||||||
|
jest.mock('../../../core/context');
|
||||||
|
var context_1 = require("../../../core/context");
|
||||||
|
jest.mock('../../../core/features');
|
||||||
|
var backgroundImageParse = function (context, value) {
|
||||||
|
return background_image_1.backgroundImage.parse(context, parser_1.Parser.parseValues(value));
|
||||||
|
};
|
||||||
|
describe('property-descriptors', function () {
|
||||||
|
var context;
|
||||||
|
beforeEach(function () {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
context = new context_1.Context({}, {});
|
||||||
|
});
|
||||||
|
describe('background-image', function () {
|
||||||
|
it('none', function () {
|
||||||
|
assert_1.deepStrictEqual(backgroundImageParse(context, 'none'), []);
|
||||||
|
expect(context.cache.addImage).not.toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
it('url(test.jpg), url(test2.jpg)', function () {
|
||||||
|
assert_1.deepStrictEqual(backgroundImageParse(context, 'url(http://example.com/test.jpg), url(http://example.com/test2.jpg)'), [
|
||||||
|
{ url: 'http://example.com/test.jpg', type: 0 /* URL */ },
|
||||||
|
{ url: 'http://example.com/test2.jpg', type: 0 /* URL */ }
|
||||||
|
]);
|
||||||
|
expect(context.cache.addImage).toHaveBeenCalledWith('http://example.com/test.jpg');
|
||||||
|
expect(context.cache.addImage).toHaveBeenCalledWith('http://example.com/test2.jpg');
|
||||||
|
});
|
||||||
|
it("linear-gradient(to bottom, rgba(255,255,0,0.5), rgba(0,0,255,0.5)), url('https://html2canvas.hertzen.com')", function () {
|
||||||
|
return assert_1.deepStrictEqual(backgroundImageParse(context, "linear-gradient(to bottom, rgba(255,255,0,0.5), rgba(0,0,255,0.5)), url('https://html2canvas.hertzen.com')"), [
|
||||||
|
{
|
||||||
|
angle: angle_1.deg(180),
|
||||||
|
type: 1 /* LINEAR_GRADIENT */,
|
||||||
|
stops: [
|
||||||
|
{ color: color_1.pack(255, 255, 0, 0.5), stop: null },
|
||||||
|
{ color: color_1.pack(0, 0, 255, 0.5), stop: null }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{ url: 'https://html2canvas.hertzen.com', type: 0 /* URL */ }
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
//# sourceMappingURL=background-tests.js.map
|
1
node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/background-tests.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/background-tests.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"background-tests.js","sourceRoot":"","sources":["../../../../../src/css/property-descriptors/__tests__/background-tests.ts"],"names":[],"mappings":";;AAAA,iCAAuC;AACvC,8CAA2C;AAC3C,wDAAoD;AAEpD,2CAAuC;AACvC,2CAAsC;AAEtC,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;AACnC,iDAA8C;AAE9C,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;AAEpC,IAAM,oBAAoB,GAAG,UAAC,OAAgB,EAAE,KAAa;IACzD,OAAA,kCAAe,CAAC,KAAK,CAAC,OAAO,EAAE,eAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAAzD,CAAyD,CAAC;AAE9D,QAAQ,CAAC,sBAAsB,EAAE;IAC7B,IAAI,OAAgB,CAAC;IACrB,UAAU,CAAC;QACP,8DAA8D;QAC9D,OAAO,GAAG,IAAI,iBAAO,CAAC,EAAS,EAAE,EAAS,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,kBAAkB,EAAE;QACzB,EAAE,CAAC,MAAM,EAAE;YACP,wBAAe,CAAC,oBAAoB,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;YAC3D,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;QAC1D,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,+BAA+B,EAAE;YAChC,wBAAe,CACX,oBAAoB,CAAC,OAAO,EAAE,qEAAqE,CAAC,EACpG;gBACI,EAAC,GAAG,EAAE,6BAA6B,EAAE,IAAI,aAAkB,EAAC;gBAC5D,EAAC,GAAG,EAAE,8BAA8B,EAAE,IAAI,aAAkB,EAAC;aAChE,CACJ,CAAC;YACF,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,oBAAoB,CAAC,6BAA6B,CAAC,CAAC;YACnF,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,oBAAoB,CAAC,8BAA8B,CAAC,CAAC;QACxF,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,4GAA4G,EAAE;YAC7G,OAAA,wBAAe,CACX,oBAAoB,CAChB,OAAO,EACP,4GAA4G,CAC/G,EACD;gBACI;oBACI,KAAK,EAAE,WAAG,CAAC,GAAG,CAAC;oBACf,IAAI,yBAA8B;oBAClC,KAAK,EAAE;wBACH,EAAC,KAAK,EAAE,YAAI,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAC;wBAC3C,EAAC,KAAK,EAAE,YAAI,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAC;qBAC5C;iBACJ;gBACD,EAAC,GAAG,EAAE,iCAAiC,EAAE,IAAI,aAAkB,EAAC;aACnE,CACJ;QAhBD,CAgBC,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
25
node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/font-family.js
generated
vendored
Normal file
25
node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/font-family.js
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
var assert_1 = require("assert");
|
||||||
|
var parser_1 = require("../../syntax/parser");
|
||||||
|
var font_family_1 = require("../font-family");
|
||||||
|
var fontFamilyParse = function (value) { return font_family_1.fontFamily.parse({}, parser_1.Parser.parseValues(value)); };
|
||||||
|
describe('property-descriptors', function () {
|
||||||
|
describe('font-family', function () {
|
||||||
|
it('sans-serif', function () { return assert_1.deepEqual(fontFamilyParse('sans-serif'), ['sans-serif']); });
|
||||||
|
it('great fonts 40 library', function () {
|
||||||
|
return assert_1.deepEqual(fontFamilyParse('great fonts 40 library'), ["'great fonts 40 library'"]);
|
||||||
|
});
|
||||||
|
it('preferred font, "quoted fallback font", font', function () {
|
||||||
|
return assert_1.deepEqual(fontFamilyParse('preferred font, "quoted fallback font", font'), [
|
||||||
|
"'preferred font'",
|
||||||
|
"'quoted fallback font'",
|
||||||
|
'font'
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
it("'escaping test\\'s font'", function () {
|
||||||
|
return assert_1.deepEqual(fontFamilyParse("'escaping test\\'s font'"), ["'escaping test's font'"]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
//# sourceMappingURL=font-family.js.map
|
1
node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/font-family.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/font-family.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"font-family.js","sourceRoot":"","sources":["../../../../../src/css/property-descriptors/__tests__/font-family.ts"],"names":[],"mappings":";;AAAA,iCAAiC;AACjC,8CAA2C;AAC3C,8CAA0C;AAG1C,IAAM,eAAe,GAAG,UAAC,KAAa,IAAK,OAAA,wBAAU,CAAC,KAAK,CAAC,EAAa,EAAE,eAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAA1D,CAA0D,CAAC;AAEtG,QAAQ,CAAC,sBAAsB,EAAE;IAC7B,QAAQ,CAAC,aAAa,EAAE;QACpB,EAAE,CAAC,YAAY,EAAE,cAAM,OAAA,kBAAS,CAAC,eAAe,CAAC,YAAY,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,EAAxD,CAAwD,CAAC,CAAC;QAEjF,EAAE,CAAC,wBAAwB,EAAE;YACzB,OAAA,kBAAS,CAAC,eAAe,CAAC,wBAAwB,CAAC,EAAE,CAAC,0BAA0B,CAAC,CAAC;QAAlF,CAAkF,CAAC,CAAC;QAExF,EAAE,CAAC,8CAA8C,EAAE;YAC/C,OAAA,kBAAS,CAAC,eAAe,CAAC,8CAA8C,CAAC,EAAE;gBACvE,kBAAkB;gBAClB,wBAAwB;gBACxB,MAAM;aACT,CAAC;QAJF,CAIE,CAAC,CAAC;QAER,EAAE,CAAC,0BAA0B,EAAE;YAC3B,OAAA,kBAAS,CAAC,eAAe,CAAC,0BAA0B,CAAC,EAAE,CAAC,wBAAwB,CAAC,CAAC;QAAlF,CAAkF,CAAC,CAAC;IAC5F,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
88
node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/paint-order.js
generated
vendored
Normal file
88
node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/paint-order.js
generated
vendored
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
var assert_1 = require("assert");
|
||||||
|
var parser_1 = require("../../syntax/parser");
|
||||||
|
var paint_order_1 = require("../paint-order");
|
||||||
|
var paintOrderParse = function (value) { return paint_order_1.paintOrder.parse({}, parser_1.Parser.parseValues(value)); };
|
||||||
|
describe('property-descriptors', function () {
|
||||||
|
describe('paint-order', function () {
|
||||||
|
it('none', function () {
|
||||||
|
return assert_1.deepStrictEqual(paintOrderParse('none'), [
|
||||||
|
0 /* FILL */,
|
||||||
|
1 /* STROKE */,
|
||||||
|
2 /* MARKERS */
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
it('EMPTY', function () {
|
||||||
|
return assert_1.deepStrictEqual(paintOrderParse(''), [
|
||||||
|
0 /* FILL */,
|
||||||
|
1 /* STROKE */,
|
||||||
|
2 /* MARKERS */
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
it('other values', function () {
|
||||||
|
return assert_1.deepStrictEqual(paintOrderParse('other values'), [
|
||||||
|
0 /* FILL */,
|
||||||
|
1 /* STROKE */,
|
||||||
|
2 /* MARKERS */
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
it('normal', function () {
|
||||||
|
return assert_1.deepStrictEqual(paintOrderParse('normal'), [
|
||||||
|
0 /* FILL */,
|
||||||
|
1 /* STROKE */,
|
||||||
|
2 /* MARKERS */
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
it('stroke', function () {
|
||||||
|
return assert_1.deepStrictEqual(paintOrderParse('stroke'), [
|
||||||
|
1 /* STROKE */,
|
||||||
|
0 /* FILL */,
|
||||||
|
2 /* MARKERS */
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
it('fill', function () {
|
||||||
|
return assert_1.deepStrictEqual(paintOrderParse('fill'), [
|
||||||
|
0 /* FILL */,
|
||||||
|
1 /* STROKE */,
|
||||||
|
2 /* MARKERS */
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
it('markers', function () {
|
||||||
|
return assert_1.deepStrictEqual(paintOrderParse('markers'), [
|
||||||
|
2 /* MARKERS */,
|
||||||
|
0 /* FILL */,
|
||||||
|
1 /* STROKE */
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
it('stroke fill', function () {
|
||||||
|
return assert_1.deepStrictEqual(paintOrderParse('stroke fill'), [
|
||||||
|
1 /* STROKE */,
|
||||||
|
0 /* FILL */,
|
||||||
|
2 /* MARKERS */
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
it('markers stroke', function () {
|
||||||
|
return assert_1.deepStrictEqual(paintOrderParse('markers stroke'), [
|
||||||
|
2 /* MARKERS */,
|
||||||
|
1 /* STROKE */,
|
||||||
|
0 /* FILL */
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
it('markers stroke fill', function () {
|
||||||
|
return assert_1.deepStrictEqual(paintOrderParse('markers stroke fill'), [
|
||||||
|
2 /* MARKERS */,
|
||||||
|
1 /* STROKE */,
|
||||||
|
0 /* FILL */
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
it('stroke fill markers', function () {
|
||||||
|
return assert_1.deepStrictEqual(paintOrderParse('stroke fill markers'), [
|
||||||
|
1 /* STROKE */,
|
||||||
|
0 /* FILL */,
|
||||||
|
2 /* MARKERS */
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
//# sourceMappingURL=paint-order.js.map
|
1
node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/paint-order.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/paint-order.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"paint-order.js","sourceRoot":"","sources":["../../../../../src/css/property-descriptors/__tests__/paint-order.ts"],"names":[],"mappings":";;AAAA,iCAAuC;AACvC,8CAA2C;AAC3C,8CAA6D;AAG7D,IAAM,eAAe,GAAG,UAAC,KAAa,IAAK,OAAA,wBAAU,CAAC,KAAK,CAAC,EAAa,EAAE,eAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAA1D,CAA0D,CAAC;AAEtG,QAAQ,CAAC,sBAAsB,EAAE;IAC7B,QAAQ,CAAC,aAAa,EAAE;QACpB,EAAE,CAAC,MAAM,EAAE;YACP,OAAA,wBAAe,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE;;;;aAIxC,CAAC;QAJF,CAIE,CAAC,CAAC;QAER,EAAE,CAAC,OAAO,EAAE;YACR,OAAA,wBAAe,CAAC,eAAe,CAAC,EAAE,CAAC,EAAE;;;;aA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/html2canvas/dist/lib/css/property-descriptors/__tests__/text-shadow.js
generated
vendored
Normal file
94
node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/text-shadow.js
generated
vendored
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
var assert_1 = require("assert");
|
||||||
|
var parser_1 = require("../../syntax/parser");
|
||||||
|
var color_1 = require("../../types/color");
|
||||||
|
var text_shadow_1 = require("../text-shadow");
|
||||||
|
var tokenizer_1 = require("../../syntax/tokenizer");
|
||||||
|
var length_percentage_1 = require("../../types/length-percentage");
|
||||||
|
var textShadowParse = function (value) { return text_shadow_1.textShadow.parse({}, parser_1.Parser.parseValues(value)); };
|
||||||
|
var colorParse = function (value) { return color_1.color.parse({}, parser_1.Parser.parseValue(value)); };
|
||||||
|
var dimension = function (number, unit) { return ({
|
||||||
|
flags: tokenizer_1.FLAG_INTEGER,
|
||||||
|
number: number,
|
||||||
|
unit: unit,
|
||||||
|
type: 15 /* DIMENSION_TOKEN */
|
||||||
|
}); };
|
||||||
|
describe('property-descriptors', function () {
|
||||||
|
describe('text-shadow', function () {
|
||||||
|
it('none', function () { return assert_1.deepStrictEqual(textShadowParse('none'), []); });
|
||||||
|
it('1px 1px 2px pink', function () {
|
||||||
|
return assert_1.deepStrictEqual(textShadowParse('1px 1px 2px pink'), [
|
||||||
|
{
|
||||||
|
color: colorParse('pink'),
|
||||||
|
offsetX: dimension(1, 'px'),
|
||||||
|
offsetY: dimension(1, 'px'),
|
||||||
|
blur: dimension(2, 'px')
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
it('#fc0 1px 0 10px', function () {
|
||||||
|
return assert_1.deepStrictEqual(textShadowParse('#fc0 1px 0 10px'), [
|
||||||
|
{
|
||||||
|
color: colorParse('#fc0'),
|
||||||
|
offsetX: dimension(1, 'px'),
|
||||||
|
offsetY: length_percentage_1.ZERO_LENGTH,
|
||||||
|
blur: dimension(10, 'px')
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
it('5px 5px #558abb', function () {
|
||||||
|
return assert_1.deepStrictEqual(textShadowParse('5px 5px #558abb'), [
|
||||||
|
{
|
||||||
|
color: colorParse('#558abb'),
|
||||||
|
offsetX: dimension(5, 'px'),
|
||||||
|
offsetY: dimension(5, 'px'),
|
||||||
|
blur: length_percentage_1.ZERO_LENGTH
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
it('white 2px 5px', function () {
|
||||||
|
return assert_1.deepStrictEqual(textShadowParse('white 2px 5px'), [
|
||||||
|
{
|
||||||
|
color: colorParse('#fff'),
|
||||||
|
offsetX: dimension(2, 'px'),
|
||||||
|
offsetY: dimension(5, 'px'),
|
||||||
|
blur: length_percentage_1.ZERO_LENGTH
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
it('white 2px 5px', function () {
|
||||||
|
return assert_1.deepStrictEqual(textShadowParse('5px 10px'), [
|
||||||
|
{
|
||||||
|
color: color_1.COLORS.TRANSPARENT,
|
||||||
|
offsetX: dimension(5, 'px'),
|
||||||
|
offsetY: dimension(10, 'px'),
|
||||||
|
blur: length_percentage_1.ZERO_LENGTH
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
it('1px 1px 2px red, 0 0 1em blue, 0 0 2em blue', function () {
|
||||||
|
return assert_1.deepStrictEqual(textShadowParse('1px 1px 2px red, 0 0 1em blue, 0 0 2em blue'), [
|
||||||
|
{
|
||||||
|
color: colorParse('red'),
|
||||||
|
offsetX: dimension(1, 'px'),
|
||||||
|
offsetY: dimension(1, 'px'),
|
||||||
|
blur: dimension(2, 'px')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
color: colorParse('blue'),
|
||||||
|
offsetX: length_percentage_1.ZERO_LENGTH,
|
||||||
|
offsetY: length_percentage_1.ZERO_LENGTH,
|
||||||
|
blur: dimension(1, 'em')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
color: colorParse('blue'),
|
||||||
|
offsetX: length_percentage_1.ZERO_LENGTH,
|
||||||
|
offsetY: length_percentage_1.ZERO_LENGTH,
|
||||||
|
blur: dimension(2, 'em')
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
//# sourceMappingURL=text-shadow.js.map
|
1
node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/text-shadow.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/text-shadow.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"text-shadow.js","sourceRoot":"","sources":["../../../../../src/css/property-descriptors/__tests__/text-shadow.ts"],"names":[],"mappings":";;AAAA,iCAAuC;AACvC,8CAA2C;AAC3C,2CAAgD;AAChD,8CAA0C;AAC1C,oDAA+E;AAC/E,mEAA0D;AAG1D,IAAM,eAAe,GAAG,UAAC,KAAa,IAAK,OAAA,wBAAU,CAAC,KAAK,CAAC,EAAa,EAAE,eAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAA1D,CAA0D,CAAC;AACtG,IAAM,UAAU,GAAG,UAAC,KAAa,IAAK,OAAA,aAAK,CAAC,KAAK,CAAC,EAAa,EAAE,eAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAApD,CAAoD,CAAC;AAC3F,IAAM,SAAS,GAAG,UAAC,MAAc,EAAE,IAAY,IAAqB,OAAA,CAAC;IACjE,KAAK,EAAE,wBAAY;IACnB,MAAM,QAAA;IACN,IAAI,MAAA;IACJ,IAAI,0BAA2B;CAClC,CAAC,EALkE,CAKlE,CAAC;AAEH,QAAQ,CAAC,sBAAsB,EAAE;IAC7B,QAAQ,CAAC,aAAa,EAAE;QACpB,EAAE,CAAC,MAAM,EAAE,cAAM,OAAA,wBAAe,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,EAA5C,CAA4C,CAAC,CAAC;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IAAI,CAAC;oBAC3B,IAAI,EAAE,+BAAW;iBACpB;aACJ,CAAC;QAPF,CAOE,CAAC,CAAC;QAER,EAAE,CAAC,eAAe,EAAE;YAChB,OAAA,wBAAe,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE;gBACzC;oBACI,KAAK,EAAE,cAAM,CAAC,WAAW;oBACzB,OAAO,EAAE,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC;oBAC3B,OAAO,EAAE,SAAS,CAAC,EAAE,EAAE,IAAI,CAAC;oBAC5B,IAAI,EAAE,+BAAW;iBACpB;aACJ,CAAC;QAPF,CAOE,CAAC,CAAC;QAER,EAAE,CAAC,6CAA6C,EAAE;YAC9C,OAAA,wBAAe,CAAC,eAAe,CAAC,6CAA6C,CAAC,EAAE;gBAC5E;oBACI,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC;oBACxB,OAAO,EAAE,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC;oBAC3B,OAAO,EAAE,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC;oBAC3B,IAAI,EAAE,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC;iBAC3B;gBACD;oBACI,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC;oBACzB,OAAO,EAAE,+BAAW;oBACpB,OAAO,EAAE,+BAAW;oBACpB,IAAI,EAAE,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC;iBAC3B;gBACD;oBACI,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC;oBACzB,OAAO,EAAE,+BAAW;oBACpB,OAAO,EAAE,+BAAW;oBACpB,IAAI,EAAE,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC;iBAC3B;aACJ,CAAC;QAnBF,CAmBE,CAAC,CAAC;IACZ,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
18
node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/transform-tests.js
generated
vendored
Normal file
18
node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/transform-tests.js
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
var transform_1 = require("../transform");
|
||||||
|
var parser_1 = require("../../syntax/parser");
|
||||||
|
var assert_1 = require("assert");
|
||||||
|
var parseValue = function (value) { return transform_1.transform.parse({}, parser_1.Parser.parseValue(value)); };
|
||||||
|
describe('property-descriptors', function () {
|
||||||
|
describe('transform', function () {
|
||||||
|
it('none', function () { return assert_1.deepStrictEqual(parseValue('none'), null); });
|
||||||
|
it('matrix(1.0, 2.0, 3.0, 4.0, 5.0, 6.0)', function () {
|
||||||
|
return assert_1.deepStrictEqual(parseValue('matrix(1.0, 2.0, 3.0, 4.0, 5.0, 6.0)'), [1, 2, 3, 4, 5, 6]);
|
||||||
|
});
|
||||||
|
it('matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)', function () {
|
||||||
|
return assert_1.deepStrictEqual(parseValue('matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)'), [1, 0, 0, 1, 0, 0]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
//# sourceMappingURL=transform-tests.js.map
|
1
node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/transform-tests.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/css/property-descriptors/__tests__/transform-tests.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"transform-tests.js","sourceRoot":"","sources":["../../../../../src/css/property-descriptors/__tests__/transform-tests.ts"],"names":[],"mappings":";;AAAA,0CAAuC;AACvC,8CAA2C;AAC3C,iCAAuC;AAEvC,IAAM,UAAU,GAAG,UAAC,KAAa,IAAK,OAAA,qBAAS,CAAC,KAAK,CAAC,EAAa,EAAE,eAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAxD,CAAwD,CAAC;AAE/F,QAAQ,CAAC,sBAAsB,EAAE;IAC7B,QAAQ,CAAC,WAAW,EAAE;QAClB,EAAE,CAAC,MAAM,EAAE,cAAM,OAAA,wBAAe,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,EAAzC,CAAyC,CAAC,CAAC;QAC5D,EAAE,CAAC,sCAAsC,EAAE;YACvC,OAAA,wBAAe,CAAC,UAAU,CAAC,sCAAsC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QAAvF,CAAuF,CAAC,CAAC;QAC7F,EAAE,CAAC,0DAA0D,EAAE;YAC3D,OAAA,wBAAe,CACX,UAAU,CAAC,0DAA0D,CAAC,EACtE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CACrB;QAHD,CAGC,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
24
node_modules/html2canvas/dist/lib/css/property-descriptors/background-clip.js
generated
vendored
Normal file
24
node_modules/html2canvas/dist/lib/css/property-descriptors/background-clip.js
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.backgroundClip = void 0;
|
||||||
|
var parser_1 = require("../syntax/parser");
|
||||||
|
exports.backgroundClip = {
|
||||||
|
name: 'background-clip',
|
||||||
|
initialValue: 'border-box',
|
||||||
|
prefix: false,
|
||||||
|
type: 1 /* LIST */,
|
||||||
|
parse: function (_context, tokens) {
|
||||||
|
return tokens.map(function (token) {
|
||||||
|
if (parser_1.isIdentToken(token)) {
|
||||||
|
switch (token.value) {
|
||||||
|
case 'padding-box':
|
||||||
|
return 1 /* PADDING_BOX */;
|
||||||
|
case 'content-box':
|
||||||
|
return 2 /* CONTENT_BOX */;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0 /* BORDER_BOX */;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=background-clip.js.map
|
1
node_modules/html2canvas/dist/lib/css/property-descriptors/background-clip.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/css/property-descriptors/background-clip.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"background-clip.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/background-clip.ts"],"names":[],"mappings":";;;AACA,2CAAwD;AAU3C,QAAA,cAAc,GAA4C;IACnE,IAAI,EAAE,iBAAiB;IACvB,YAAY,EAAE,YAAY;IAC1B,MAAM,EAAE,KAAK;IACb,IAAI,cAAoC;IACxC,KAAK,EAAE,UAAC,QAAiB,EAAE,MAAkB;QACzC,OAAO,MAAM,CAAC,GAAG,CAAC,UAAC,KAAK;YACpB,IAAI,qBAAY,CAAC,KAAK,CAAC,EAAE;gBACrB,QAAQ,KAAK,CAAC,KAAK,EAAE;oBACjB,KAAK,aAAa;wBACd,2BAAmC;oBACvC,KAAK,aAAa;wBACd,2BAAmC;iBAC1C;aACJ;YACD,0BAAkC;QACtC,CAAC,CAAC,CAAC;IACP,CAAC;CACJ,CAAC"}
|
11
node_modules/html2canvas/dist/lib/css/property-descriptors/background-color.js
generated
vendored
Normal file
11
node_modules/html2canvas/dist/lib/css/property-descriptors/background-color.js
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.backgroundColor = void 0;
|
||||||
|
exports.backgroundColor = {
|
||||||
|
name: "background-color",
|
||||||
|
initialValue: 'transparent',
|
||||||
|
prefix: false,
|
||||||
|
type: 3 /* TYPE_VALUE */,
|
||||||
|
format: 'color'
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=background-color.js.map
|
1
node_modules/html2canvas/dist/lib/css/property-descriptors/background-color.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/css/property-descriptors/background-color.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"background-color.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/background-color.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAiC;IACzD,IAAI,EAAE,kBAAkB;IACxB,YAAY,EAAE,aAAa;IAC3B,MAAM,EAAE,KAAK;IACb,IAAI,oBAA0C;IAC9C,MAAM,EAAE,OAAO;CAClB,CAAC"}
|
24
node_modules/html2canvas/dist/lib/css/property-descriptors/background-image.js
generated
vendored
Normal file
24
node_modules/html2canvas/dist/lib/css/property-descriptors/background-image.js
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.backgroundImage = void 0;
|
||||||
|
var image_1 = require("../types/image");
|
||||||
|
var parser_1 = require("../syntax/parser");
|
||||||
|
exports.backgroundImage = {
|
||||||
|
name: 'background-image',
|
||||||
|
initialValue: 'none',
|
||||||
|
type: 1 /* LIST */,
|
||||||
|
prefix: false,
|
||||||
|
parse: function (context, tokens) {
|
||||||
|
if (tokens.length === 0) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
var first = tokens[0];
|
||||||
|
if (first.type === 20 /* IDENT_TOKEN */ && first.value === 'none') {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
return tokens
|
||||||
|
.filter(function (value) { return parser_1.nonFunctionArgSeparator(value) && image_1.isSupportedImage(value); })
|
||||||
|
.map(function (value) { return image_1.image.parse(context, value); });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=background-image.js.map
|
1
node_modules/html2canvas/dist/lib/css/property-descriptors/background-image.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/css/property-descriptors/background-image.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"background-image.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/background-image.ts"],"names":[],"mappings":";;;AACA,wCAAkE;AAElE,2CAAmE;AAGtD,QAAA,eAAe,GAAyC;IACjE,IAAI,EAAE,kBAAkB;IACxB,YAAY,EAAE,MAAM;IACpB,IAAI,cAAoC;IACxC,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,UAAC,OAAgB,EAAE,MAAkB;QACxC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;YACrB,OAAO,EAAE,CAAC;SACb;QAED,IAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QAExB,IAAI,KAAK,CAAC,IAAI,yBAA0B,IAAI,KAAK,CAAC,KAAK,KAAK,MAAM,EAAE;YAChE,OAAO,EAAE,CAAC;SACb;QAED,OAAO,MAAM;aACR,MAAM,CAAC,UAAC,KAAK,IAAK,OAAA,gCAAuB,CAAC,KAAK,CAAC,IAAI,wBAAgB,CAAC,KAAK,CAAC,EAAzD,CAAyD,CAAC;aAC5E,GAAG,CAAC,UAAC,KAAK,IAAK,OAAA,aAAK,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,EAA3B,CAA2B,CAAC,CAAC;IACrD,CAAC;CACJ,CAAC"}
|
24
node_modules/html2canvas/dist/lib/css/property-descriptors/background-origin.js
generated
vendored
Normal file
24
node_modules/html2canvas/dist/lib/css/property-descriptors/background-origin.js
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.backgroundOrigin = void 0;
|
||||||
|
var parser_1 = require("../syntax/parser");
|
||||||
|
exports.backgroundOrigin = {
|
||||||
|
name: 'background-origin',
|
||||||
|
initialValue: 'border-box',
|
||||||
|
prefix: false,
|
||||||
|
type: 1 /* LIST */,
|
||||||
|
parse: function (_context, tokens) {
|
||||||
|
return tokens.map(function (token) {
|
||||||
|
if (parser_1.isIdentToken(token)) {
|
||||||
|
switch (token.value) {
|
||||||
|
case 'padding-box':
|
||||||
|
return 1 /* PADDING_BOX */;
|
||||||
|
case 'content-box':
|
||||||
|
return 2 /* CONTENT_BOX */;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0 /* BORDER_BOX */;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=background-origin.js.map
|
1
node_modules/html2canvas/dist/lib/css/property-descriptors/background-origin.js.map
generated
vendored
Normal file
1
node_modules/html2canvas/dist/lib/css/property-descriptors/background-origin.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"file":"background-origin.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/background-origin.ts"],"names":[],"mappings":";;;AACA,2CAAwD;AAW3C,QAAA,gBAAgB,GAA8C;IACvE,IAAI,EAAE,mBAAmB;IACzB,YAAY,EAAE,YAAY;IAC1B,MAAM,EAAE,KAAK;IACb,IAAI,cAAoC;IACxC,KAAK,EAAE,UAAC,QAAiB,EAAE,MAAkB;QACzC,OAAO,MAAM,CAAC,GAAG,CAAC,UAAC,KAAK;YACpB,IAAI,qBAAY,CAAC,KAAK,CAAC,EAAE;gBACrB,QAAQ,KAAK,CAAC,KAAK,EAAE;oBACjB,KAAK,aAAa;wBACd,2BAAqC;oBACzC,KAAK,aAAa;wBACd,2BAAqC;iBAC5C;aACJ;YACD,0BAAoC;QACxC,CAAC,CAAC,CAAC;IACP,CAAC;CACJ,CAAC"}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue