聊天记录导出
This commit is contained in:
@@ -87,7 +87,7 @@
|
||||
:fileOps="{ name: 'name', size: 'fileSizeStr' }"
|
||||
></ai-file-list>
|
||||
|
||||
<div class="revoke-text" v-if="item.msgType == 'revoke'">{{item.userName}}{{item.msgSendTime.substring(0, 16)}}撤回了一条消息</div>
|
||||
<div class="revoke-text" v-if="item.msgType == 'revoke'">{{item.userName}}撤回了一条消息</div>
|
||||
|
||||
<div class="revoke-text" v-if="item.msgType == 'disagree'">对方不同意会话存档内容,你将无法继续提供服务</div>
|
||||
|
||||
|
||||
@@ -285,9 +285,6 @@
|
||||
</ai-list>
|
||||
</template>
|
||||
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/html2canvas/1.4.1/html2canvas.esm.js"></script>
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/jspdf/2.5.1/jspdf.es.js"></script>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
import Viewer from "v-viewer";
|
||||
@@ -295,9 +292,8 @@ import AMapLoader from "@amap/amap-jsapi-loader";
|
||||
import Vue from "vue";
|
||||
Vue.use(Viewer);
|
||||
|
||||
|
||||
import html2canvas from "html2canvas";
|
||||
import jsPDF from "jspdf";
|
||||
import html2canvas from "../html2canvas/dist/html2canvas.esm.js";
|
||||
import jsPDF from "../jspdf";
|
||||
|
||||
import { Loading } from "element-ui";
|
||||
|
||||
|
||||
566
project/pidu/app/AppSessionArchive/html2canvas/CHANGELOG.md
Normal file
566
project/pidu/app/AppSessionArchive/html2canvas/CHANGELOG.md
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
project/pidu/app/AppSessionArchive/html2canvas/LICENSE
Normal file
22
project/pidu/app/AppSessionArchive/html2canvas/LICENSE
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
project/pidu/app/AppSessionArchive/html2canvas/README.md
Normal file
73
project/pidu/app/AppSessionArchive/html2canvas/README.md
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)
|
||||
|
||||
[](https://gitter.im/niklasvh/html2canvas?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||

|
||||
[](https://www.npmjs.org/package/html2canvas)
|
||||
[](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
project/pidu/app/AppSessionArchive/html2canvas/dist/html2canvas.esm.js
vendored
Normal file
7822
project/pidu/app/AppSessionArchive/html2canvas/dist/html2canvas.esm.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
project/pidu/app/AppSessionArchive/html2canvas/dist/html2canvas.esm.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/html2canvas.esm.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7830
project/pidu/app/AppSessionArchive/html2canvas/dist/html2canvas.js
vendored
Normal file
7830
project/pidu/app/AppSessionArchive/html2canvas/dist/html2canvas.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
project/pidu/app/AppSessionArchive/html2canvas/dist/html2canvas.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/html2canvas.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
20
project/pidu/app/AppSessionArchive/html2canvas/dist/html2canvas.min.js
vendored
Normal file
20
project/pidu/app/AppSessionArchive/html2canvas/dist/html2canvas.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
144
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/__tests__/index.js
vendored
Normal file
144
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/__tests__/index.js
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/__tests__/index.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/__tests__/index.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/__tests__/index.ts"],"names":[],"mappings":"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"}
|
||||
10
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__mocks__/cache-storage.js
vendored
Normal file
10
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__mocks__/cache-storage.js
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__mocks__/cache-storage.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__mocks__/cache-storage.js.map
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__mocks__/context.js
vendored
Normal file
22
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__mocks__/context.js
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__mocks__/context.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__mocks__/context.js.map
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__mocks__/features.js
vendored
Normal file
12
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__mocks__/features.js
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__mocks__/features.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__mocks__/features.js.map
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__mocks__/logger.js
vendored
Normal file
24
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__mocks__/logger.js
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__mocks__/logger.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__mocks__/logger.js.map
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__tests__/cache-storage.js
vendored
Normal file
420
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__tests__/cache-storage.js
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__tests__/cache-storage.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__tests__/cache-storage.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
28
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__tests__/logger.js
vendored
Normal file
28
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__tests__/logger.js
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__tests__/logger.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/__tests__/logger.js.map
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/bitwise.js
vendored
Normal file
6
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/bitwise.js
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/bitwise.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/bitwise.js.map
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/cache-storage.js
vendored
Normal file
198
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/cache-storage.js
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/cache-storage.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/cache-storage.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
18
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/context.js
vendored
Normal file
18
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/context.js
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/context.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/context.js.map
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/debugger.js
vendored
Normal file
25
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/debugger.js
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/debugger.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/debugger.js.map
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/features.js
vendored
Normal file
193
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/features.js
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/features.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/features.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
88
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/logger.js
vendored
Normal file
88
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/logger.js
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/logger.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/logger.js.map
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;IAED,wBAAO,GAAP;QACI,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;IACnC,CAAC;IAED,8DAA8D;IAC9D,qBAAI,GAAJ;QAAK,cAAkB;aAAlB,UAAkB,EAAlB,qBAAkB,EAAlB,IAAkB;YAAlB,yBAAkB;;QACnB,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,sCAAsC;YACtC,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,OAAO,IAAI,OAAO,OAAO,CAAC,IAAI,KAAK,UAAU,EAAE;gBACvF,sCAAsC;gBACtC,OAAO,CAAC,IAAI,OAAZ,OAAO,iBAAM,IAAI,CAAC,EAAE,EAAK,IAAI,CAAC,OAAO,EAAE,OAAI,GAAK,IAAI,GAAE;aACzD;SACJ;IACL,CAAC;IAED,8DAA8D;IAC9D,qBAAI,GAAJ;QAAK,cAAkB;aAAlB,UAAkB,EAAlB,qBAAkB,EAAlB,IAAkB;YAAlB,yBAAkB;;QACnB,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,sCAAsC;YACtC,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,OAAO,IAAI,OAAO,OAAO,CAAC,IAAI,KAAK,UAAU,EAAE;gBACvF,sCAAsC;gBACtC,OAAO,CAAC,IAAI,OAAZ,OAAO,iBAAM,IAAI,CAAC,EAAE,EAAK,IAAI,CAAC,OAAO,EAAE,OAAI,GAAK,IAAI,GAAE;aACzD;iBAAM;gBACH,IAAI,CAAC,IAAI,OAAT,IAAI,EAAS,IAAI,EAAE;aACtB;SACJ;IACL,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;IAhEM,gBAAS,GAA4B,EAAE,CAAC;IAiEnD,aAAC;CAAA,AAlED,IAkEC;AAlEY,wBAAM"}
|
||||
5
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/util.js
vendored
Normal file
5
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/util.js
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/util.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/core/util.js.map
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/IPropertyDescriptor.js
vendored
Normal file
3
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/IPropertyDescriptor.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=IPropertyDescriptor.js.map
|
||||
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/IPropertyDescriptor.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/IPropertyDescriptor.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"IPropertyDescriptor.js","sourceRoot":"","sources":["../../../src/css/IPropertyDescriptor.ts"],"names":[],"mappings":""}
|
||||
3
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/ITypeDescriptor.js
vendored
Normal file
3
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/ITypeDescriptor.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=ITypeDescriptor.js.map
|
||||
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/ITypeDescriptor.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/ITypeDescriptor.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ITypeDescriptor.js","sourceRoot":"","sources":["../../../src/css/ITypeDescriptor.ts"],"names":[],"mappings":""}
|
||||
216
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/index.js
vendored
Normal file
216
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/index.js
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/index.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/index.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
9
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/layout/__mocks__/bounds.js
vendored
Normal file
9
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/layout/__mocks__/bounds.js
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/layout/__mocks__/bounds.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/layout/__mocks__/bounds.js.map
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/layout/bounds.js
vendored
Normal file
42
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/layout/bounds.js
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/layout/bounds.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/layout/bounds.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"bounds.js","sourceRoot":"","sources":["../../../../src/css/layout/bounds.ts"],"names":[],"mappings":";;;AAEA;IACI,gBAAqB,IAAY,EAAW,GAAW,EAAW,KAAa,EAAW,MAAc;QAAnF,SAAI,GAAJ,IAAI,CAAQ;QAAW,QAAG,GAAH,GAAG,CAAQ;QAAW,UAAK,GAAL,KAAK,CAAQ;QAAW,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAE5G,oBAAG,GAAH,UAAI,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS;QAC1C,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACpF,CAAC;IAEM,qBAAc,GAArB,UAAsB,OAAgB,EAAE,UAAsB;QAC1D,OAAO,IAAI,MAAM,CACb,UAAU,CAAC,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,IAAI,EAC3C,UAAU,CAAC,GAAG,GAAG,OAAO,CAAC,YAAY,CAAC,GAAG,EACzC,UAAU,CAAC,KAAK,EAChB,UAAU,CAAC,MAAM,CACpB,CAAC;IACN,CAAC;IAEM,sBAAe,GAAtB,UAAuB,OAAgB,EAAE,WAAwB;QAC7D,IAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,KAAK,KAAK,CAAC,EAAhB,CAAgB,CAAC,CAAC;QACzE,OAAO,OAAO;YACV,CAAC,CAAC,IAAI,MAAM,CACN,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,IAAI,EACxC,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,YAAY,CAAC,GAAG,EACtC,OAAO,CAAC,KAAK,EACb,OAAO,CAAC,MAAM,CACjB;YACH,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;IACvB,CAAC;IAEM,YAAK,GAAG,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1C,aAAC;CAAA,AA7BD,IA6BC;AA7BY,wBAAM;AA+BZ,IAAM,WAAW,GAAG,UAAC,OAAgB,EAAE,IAAa;IACvD,OAAO,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,qBAAqB,EAAE,CAAC,CAAC;AACxE,CAAC,CAAC;AAFW,QAAA,WAAW,eAEtB;AAEK,IAAM,iBAAiB,GAAG,UAAC,QAAkB;IAChD,IAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;IAC3B,IAAM,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC;IAEjD,IAAI,CAAC,IAAI,IAAI,CAAC,eAAe,EAAE;QAC3B,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;KAClD;IACD,IAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAClB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,WAAW,CAAC,EACvD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,WAAW,CAAC,EACvD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,WAAW,CAAC,CAC1D,CAAC;IAEF,IAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CACnB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,eAAe,CAAC,YAAY,CAAC,EACzD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,eAAe,CAAC,YAAY,CAAC,EACzD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,eAAe,CAAC,YAAY,CAAC,CAC5D,CAAC;IAEF,OAAO,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC,CAAC;AApBW,QAAA,iBAAiB,qBAoB5B"}
|
||||
137
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/layout/text.js
vendored
Normal file
137
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/layout/text.js
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
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/layout/text.js.map
vendored
Normal file
1
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/layout/text.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../../../src/css/layout/text.ts"],"names":[],"mappings":"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"}
|
||||
@@ -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
|
||||
@@ -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"}
|
||||
@@ -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
|
||||
@@ -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"}
|
||||
@@ -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
|
||||
@@ -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;;;;aAIpC,CAAC;QAJF,CAIE,CAAC,CAAC;QAER,EAAE,CAAC,cAAc,EAAE;YACf,OAAA,wBAAe,CAAC,eAAe,CAAC,cAAc,CAAC,EAAE;;;;aAIhD,CAAC;QAJF,CAIE,CAAC,CAAC;QAER,EAAE,CAAC,QAAQ,EAAE;YACT,OAAA,wBAAe,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE;;;;aAI1C,CAAC;QAJF,CAIE,CAAC,CAAC;QAER,EAAE,CAAC,QAAQ,EAAE;YACT,OAAA,wBAAe,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE;;;;aAI1C,CAAC;QAJF,CAIE,CAAC,CAAC;QAER,EAAE,CAAC,MAAM,EAAE;YACP,OAAA,wBAAe,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE;;;;aAIxC,CAAC;QAJF,CAIE,CAAC,CAAC;QAER,EAAE,CAAC,SAAS,EAAE;YACV,OAAA,wBAAe,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE;;;;aAI3C,CAAC;QAJF,CAIE,CAAC,CAAC;QAER,EAAE,CAAC,aAAa,EAAE;YACd,OAAA,wBAAe,CAAC,eAAe,CAAC,aAAa,CAAC,EAAE;;;;aAI/C,CAAC;QAJF,CAIE,CAAC,CAAC;QAER,EAAE,CAAC,gBAAgB,EAAE;YACjB,OAAA,wBAAe,CAAC,eAAe,CAAC,gBAAgB,CAAC,EAAE;;;;aAIlD,CAAC;QAJF,CAIE,CAAC,CAAC;QAER,EAAE,CAAC,qBAAqB,EAAE;YACtB,OAAA,wBAAe,CAAC,eAAe,CAAC,qBAAqB,CAAC,EAAE;;;;aAIvD,CAAC;QAJF,CAIE,CAAC,CAAC;QAER,EAAE,CAAC,qBAAqB,EAAE;YACtB,OAAA,wBAAe,CAAC,eAAe,CAAC,qBAAqB,CAAC,EAAE;;;;aAIvD,CAAC;QAJF,CAIE,CAAC,CAAC;IACZ,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
||||
@@ -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
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"text-shadow.js","sourceRoot":"","sources":["../../../../../src/css/property-descriptors/__tests__/text-shadow.ts"],"names":[],"mappings":"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"}
|
||||
@@ -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
|
||||
@@ -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"}
|
||||
@@ -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
|
||||
@@ -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"}
|
||||
@@ -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
|
||||
@@ -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"}
|
||||
@@ -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
|
||||
@@ -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"}
|
||||
@@ -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
|
||||
@@ -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"}
|
||||
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.backgroundPosition = void 0;
|
||||
var parser_1 = require("../syntax/parser");
|
||||
var length_percentage_1 = require("../types/length-percentage");
|
||||
exports.backgroundPosition = {
|
||||
name: 'background-position',
|
||||
initialValue: '0% 0%',
|
||||
type: 1 /* LIST */,
|
||||
prefix: false,
|
||||
parse: function (_context, tokens) {
|
||||
return parser_1.parseFunctionArgs(tokens)
|
||||
.map(function (values) { return values.filter(length_percentage_1.isLengthPercentage); })
|
||||
.map(length_percentage_1.parseLengthPercentageTuple);
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=background-position.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"background-position.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/background-position.ts"],"names":[],"mappings":";;;AACA,2CAA6D;AAC7D,gEAAiH;AAMpG,QAAA,kBAAkB,GAAgD;IAC3E,IAAI,EAAE,qBAAqB;IAC3B,YAAY,EAAE,OAAO;IACrB,IAAI,cAAoC;IACxC,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,UAAC,QAAiB,EAAE,MAAkB;QACzC,OAAO,0BAAiB,CAAC,MAAM,CAAC;aAC3B,GAAG,CAAC,UAAC,MAAkB,IAAK,OAAA,MAAM,CAAC,MAAM,CAAC,sCAAkB,CAAC,EAAjC,CAAiC,CAAC;aAC9D,GAAG,CAAC,8CAA0B,CAAC,CAAC;IACzC,CAAC;CACJ,CAAC"}
|
||||
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.backgroundRepeat = void 0;
|
||||
var parser_1 = require("../syntax/parser");
|
||||
exports.backgroundRepeat = {
|
||||
name: 'background-repeat',
|
||||
initialValue: 'repeat',
|
||||
prefix: false,
|
||||
type: 1 /* LIST */,
|
||||
parse: function (_context, tokens) {
|
||||
return parser_1.parseFunctionArgs(tokens)
|
||||
.map(function (values) {
|
||||
return values
|
||||
.filter(parser_1.isIdentToken)
|
||||
.map(function (token) { return token.value; })
|
||||
.join(' ');
|
||||
})
|
||||
.map(parseBackgroundRepeat);
|
||||
}
|
||||
};
|
||||
var parseBackgroundRepeat = function (value) {
|
||||
switch (value) {
|
||||
case 'no-repeat':
|
||||
return 1 /* NO_REPEAT */;
|
||||
case 'repeat-x':
|
||||
case 'repeat no-repeat':
|
||||
return 2 /* REPEAT_X */;
|
||||
case 'repeat-y':
|
||||
case 'no-repeat repeat':
|
||||
return 3 /* REPEAT_Y */;
|
||||
case 'repeat':
|
||||
default:
|
||||
return 0 /* REPEAT */;
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=background-repeat.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"background-repeat.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/background-repeat.ts"],"names":[],"mappings":";;;AACA,2CAA2E;AAW9D,QAAA,gBAAgB,GAA8C;IACvE,IAAI,EAAE,mBAAmB;IACzB,YAAY,EAAE,QAAQ;IACtB,MAAM,EAAE,KAAK;IACb,IAAI,cAAoC;IACxC,KAAK,EAAE,UAAC,QAAiB,EAAE,MAAkB;QACzC,OAAO,0BAAiB,CAAC,MAAM,CAAC;aAC3B,GAAG,CAAC,UAAC,MAAM;YACR,OAAA,MAAM;iBACD,MAAM,CAAC,qBAAY,CAAC;iBACpB,GAAG,CAAC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,KAAK,EAAX,CAAW,CAAC;iBAC3B,IAAI,CAAC,GAAG,CAAC;QAHd,CAGc,CACjB;aACA,GAAG,CAAC,qBAAqB,CAAC,CAAC;IACpC,CAAC;CACJ,CAAC;AAEF,IAAM,qBAAqB,GAAG,UAAC,KAAa;IACxC,QAAQ,KAAK,EAAE;QACX,KAAK,WAAW;YACZ,yBAAmC;QACvC,KAAK,UAAU,CAAC;QAChB,KAAK,kBAAkB;YACnB,wBAAkC;QACtC,KAAK,UAAU,CAAC;QAChB,KAAK,kBAAkB;YACnB,wBAAkC;QACtC,KAAK,QAAQ,CAAC;QACd;YACI,sBAAgC;KACvC;AACL,CAAC,CAAC"}
|
||||
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.backgroundSize = exports.BACKGROUND_SIZE = void 0;
|
||||
var parser_1 = require("../syntax/parser");
|
||||
var length_percentage_1 = require("../types/length-percentage");
|
||||
var BACKGROUND_SIZE;
|
||||
(function (BACKGROUND_SIZE) {
|
||||
BACKGROUND_SIZE["AUTO"] = "auto";
|
||||
BACKGROUND_SIZE["CONTAIN"] = "contain";
|
||||
BACKGROUND_SIZE["COVER"] = "cover";
|
||||
})(BACKGROUND_SIZE = exports.BACKGROUND_SIZE || (exports.BACKGROUND_SIZE = {}));
|
||||
exports.backgroundSize = {
|
||||
name: 'background-size',
|
||||
initialValue: '0',
|
||||
prefix: false,
|
||||
type: 1 /* LIST */,
|
||||
parse: function (_context, tokens) {
|
||||
return parser_1.parseFunctionArgs(tokens).map(function (values) { return values.filter(isBackgroundSizeInfoToken); });
|
||||
}
|
||||
};
|
||||
var isBackgroundSizeInfoToken = function (value) {
|
||||
return parser_1.isIdentToken(value) || length_percentage_1.isLengthPercentage(value);
|
||||
};
|
||||
//# sourceMappingURL=background-size.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"background-size.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/background-size.ts"],"names":[],"mappings":";;;AACA,2CAA2E;AAC3E,gEAAgF;AAIhF,IAAY,eAIX;AAJD,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,sCAAmB,CAAA;IACnB,kCAAe,CAAA;AACnB,CAAC,EAJW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAI1B;AAKY,QAAA,cAAc,GAA4C;IACnE,IAAI,EAAE,iBAAiB;IACvB,YAAY,EAAE,GAAG;IACjB,MAAM,EAAE,KAAK;IACb,IAAI,cAAoC;IACxC,KAAK,EAAE,UAAC,QAAiB,EAAE,MAAkB;QACzC,OAAO,0BAAiB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,UAAC,MAAM,IAAK,OAAA,MAAM,CAAC,MAAM,CAAC,yBAAyB,CAAC,EAAxC,CAAwC,CAAC,CAAC;IAC/F,CAAC;CACJ,CAAC;AAEF,IAAM,yBAAyB,GAAG,UAAC,KAAe;IAC9C,OAAA,qBAAY,CAAC,KAAK,CAAC,IAAI,sCAAkB,CAAC,KAAK,CAAC;AAAhD,CAAgD,CAAC"}
|
||||
15
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/property-descriptors/border-color.js
vendored
Normal file
15
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/property-descriptors/border-color.js
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.borderLeftColor = exports.borderBottomColor = exports.borderRightColor = exports.borderTopColor = void 0;
|
||||
var borderColorForSide = function (side) { return ({
|
||||
name: "border-" + side + "-color",
|
||||
initialValue: 'transparent',
|
||||
prefix: false,
|
||||
type: 3 /* TYPE_VALUE */,
|
||||
format: 'color'
|
||||
}); };
|
||||
exports.borderTopColor = borderColorForSide('top');
|
||||
exports.borderRightColor = borderColorForSide('right');
|
||||
exports.borderBottomColor = borderColorForSide('bottom');
|
||||
exports.borderLeftColor = borderColorForSide('left');
|
||||
//# sourceMappingURL=border-color.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"border-color.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/border-color.ts"],"names":[],"mappings":";;;AACA,IAAM,kBAAkB,GAAG,UAAC,IAAY,IAAmC,OAAA,CAAC;IACxE,IAAI,EAAE,YAAU,IAAI,WAAQ;IAC5B,YAAY,EAAE,aAAa;IAC3B,MAAM,EAAE,KAAK;IACb,IAAI,oBAA0C;IAC9C,MAAM,EAAE,OAAO;CAClB,CAAC,EANyE,CAMzE,CAAC;AAEU,QAAA,cAAc,GAAiC,kBAAkB,CAAC,KAAK,CAAC,CAAC;AACzE,QAAA,gBAAgB,GAAiC,kBAAkB,CAAC,OAAO,CAAC,CAAC;AAC7E,QAAA,iBAAiB,GAAiC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AAC/E,QAAA,eAAe,GAAiC,kBAAkB,CAAC,MAAM,CAAC,CAAC"}
|
||||
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.borderBottomLeftRadius = exports.borderBottomRightRadius = exports.borderTopRightRadius = exports.borderTopLeftRadius = void 0;
|
||||
var length_percentage_1 = require("../types/length-percentage");
|
||||
var borderRadiusForSide = function (side) { return ({
|
||||
name: "border-radius-" + side,
|
||||
initialValue: '0 0',
|
||||
prefix: false,
|
||||
type: 1 /* LIST */,
|
||||
parse: function (_context, tokens) {
|
||||
return length_percentage_1.parseLengthPercentageTuple(tokens.filter(length_percentage_1.isLengthPercentage));
|
||||
}
|
||||
}); };
|
||||
exports.borderTopLeftRadius = borderRadiusForSide('top-left');
|
||||
exports.borderTopRightRadius = borderRadiusForSide('top-right');
|
||||
exports.borderBottomRightRadius = borderRadiusForSide('bottom-right');
|
||||
exports.borderBottomLeftRadius = borderRadiusForSide('bottom-left');
|
||||
//# sourceMappingURL=border-radius.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"border-radius.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/border-radius.ts"],"names":[],"mappings":";;;AAEA,gEAAiH;AAIjH,IAAM,mBAAmB,GAAG,UAAC,IAAY,IAA4C,OAAA,CAAC;IAClF,IAAI,EAAE,mBAAiB,IAAM;IAC7B,YAAY,EAAE,KAAK;IACnB,MAAM,EAAE,KAAK;IACb,IAAI,cAAoC;IACxC,KAAK,EAAE,UAAC,QAAiB,EAAE,MAAkB;QACzC,OAAA,8CAA0B,CAAC,MAAM,CAAC,MAAM,CAAC,sCAAkB,CAAC,CAAC;IAA7D,CAA6D;CACpE,CAAC,EAPmF,CAOnF,CAAC;AAEU,QAAA,mBAAmB,GAA0C,mBAAmB,CAAC,UAAU,CAAC,CAAC;AAC7F,QAAA,oBAAoB,GAA0C,mBAAmB,CAAC,WAAW,CAAC,CAAC;AAC/F,QAAA,uBAAuB,GAA0C,mBAAmB,CAAC,cAAc,CAAC,CAAC;AACrG,QAAA,sBAAsB,GAA0C,mBAAmB,CAAC,aAAa,CAAC,CAAC"}
|
||||
27
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/property-descriptors/border-style.js
vendored
Normal file
27
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/property-descriptors/border-style.js
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.borderLeftStyle = exports.borderBottomStyle = exports.borderRightStyle = exports.borderTopStyle = void 0;
|
||||
var borderStyleForSide = function (side) { return ({
|
||||
name: "border-" + side + "-style",
|
||||
initialValue: 'solid',
|
||||
prefix: false,
|
||||
type: 2 /* IDENT_VALUE */,
|
||||
parse: function (_context, style) {
|
||||
switch (style) {
|
||||
case 'none':
|
||||
return 0 /* NONE */;
|
||||
case 'dashed':
|
||||
return 2 /* DASHED */;
|
||||
case 'dotted':
|
||||
return 3 /* DOTTED */;
|
||||
case 'double':
|
||||
return 4 /* DOUBLE */;
|
||||
}
|
||||
return 1 /* SOLID */;
|
||||
}
|
||||
}); };
|
||||
exports.borderTopStyle = borderStyleForSide('top');
|
||||
exports.borderRightStyle = borderStyleForSide('right');
|
||||
exports.borderBottomStyle = borderStyleForSide('bottom');
|
||||
exports.borderLeftStyle = borderStyleForSide('left');
|
||||
//# sourceMappingURL=border-style.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"border-style.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/border-style.ts"],"names":[],"mappings":";;;AAUA,IAAM,kBAAkB,GAAG,UAAC,IAAY,IAAkD,OAAA,CAAC;IACvF,IAAI,EAAE,YAAU,IAAI,WAAQ;IAC5B,YAAY,EAAE,OAAO;IACrB,MAAM,EAAE,KAAK;IACb,IAAI,qBAA2C;IAC/C,KAAK,EAAE,UAAC,QAAiB,EAAE,KAAa;QACpC,QAAQ,KAAK,EAAE;YACX,KAAK,MAAM;gBACP,oBAAyB;YAC7B,KAAK,QAAQ;gBACT,sBAA2B;YAC/B,KAAK,QAAQ;gBACT,sBAA2B;YAC/B,KAAK,QAAQ;gBACT,sBAA2B;SAClC;QACD,qBAA0B;IAC9B,CAAC;CACJ,CAAC,EAlBwF,CAkBxF,CAAC;AAEU,QAAA,cAAc,GAAgD,kBAAkB,CAAC,KAAK,CAAC,CAAC;AACxF,QAAA,gBAAgB,GAAgD,kBAAkB,CAAC,OAAO,CAAC,CAAC;AAC5F,QAAA,iBAAiB,GAAgD,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AAC9F,QAAA,eAAe,GAAgD,kBAAkB,CAAC,MAAM,CAAC,CAAC"}
|
||||
21
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/property-descriptors/border-width.js
vendored
Normal file
21
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/property-descriptors/border-width.js
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.borderLeftWidth = exports.borderBottomWidth = exports.borderRightWidth = exports.borderTopWidth = void 0;
|
||||
var parser_1 = require("../syntax/parser");
|
||||
var borderWidthForSide = function (side) { return ({
|
||||
name: "border-" + side + "-width",
|
||||
initialValue: '0',
|
||||
type: 0 /* VALUE */,
|
||||
prefix: false,
|
||||
parse: function (_context, token) {
|
||||
if (parser_1.isDimensionToken(token)) {
|
||||
return token.number;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}); };
|
||||
exports.borderTopWidth = borderWidthForSide('top');
|
||||
exports.borderRightWidth = borderWidthForSide('right');
|
||||
exports.borderBottomWidth = borderWidthForSide('bottom');
|
||||
exports.borderLeftWidth = borderWidthForSide('left');
|
||||
//# sourceMappingURL=border-width.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"border-width.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/border-width.ts"],"names":[],"mappings":";;;AACA,2CAA4D;AAE5D,IAAM,kBAAkB,GAAG,UAAC,IAAY,IAAuC,OAAA,CAAC;IAC5E,IAAI,EAAE,YAAU,IAAI,WAAQ;IAC5B,YAAY,EAAE,GAAG;IACjB,IAAI,eAAqC;IACzC,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,UAAC,QAAiB,EAAE,KAAe;QACtC,IAAI,yBAAgB,CAAC,KAAK,CAAC,EAAE;YACzB,OAAO,KAAK,CAAC,MAAM,CAAC;SACvB;QACD,OAAO,CAAC,CAAC;IACb,CAAC;CACJ,CAAC,EAX6E,CAW7E,CAAC;AAEU,QAAA,cAAc,GAAqC,kBAAkB,CAAC,KAAK,CAAC,CAAC;AAC7E,QAAA,gBAAgB,GAAqC,kBAAkB,CAAC,OAAO,CAAC,CAAC;AACjF,QAAA,iBAAiB,GAAqC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AACnF,QAAA,eAAe,GAAqC,kBAAkB,CAAC,MAAM,CAAC,CAAC"}
|
||||
55
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/property-descriptors/box-shadow.js
vendored
Normal file
55
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/property-descriptors/box-shadow.js
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.boxShadow = void 0;
|
||||
var parser_1 = require("../syntax/parser");
|
||||
var length_percentage_1 = require("../types/length-percentage");
|
||||
var color_1 = require("../types/color");
|
||||
var length_1 = require("../types/length");
|
||||
exports.boxShadow = {
|
||||
name: 'box-shadow',
|
||||
initialValue: 'none',
|
||||
type: 1 /* LIST */,
|
||||
prefix: false,
|
||||
parse: function (context, tokens) {
|
||||
if (tokens.length === 1 && parser_1.isIdentWithValue(tokens[0], 'none')) {
|
||||
return [];
|
||||
}
|
||||
return parser_1.parseFunctionArgs(tokens).map(function (values) {
|
||||
var shadow = {
|
||||
color: 0x000000ff,
|
||||
offsetX: length_percentage_1.ZERO_LENGTH,
|
||||
offsetY: length_percentage_1.ZERO_LENGTH,
|
||||
blur: length_percentage_1.ZERO_LENGTH,
|
||||
spread: length_percentage_1.ZERO_LENGTH,
|
||||
inset: false
|
||||
};
|
||||
var c = 0;
|
||||
for (var i = 0; i < values.length; i++) {
|
||||
var token = values[i];
|
||||
if (parser_1.isIdentWithValue(token, 'inset')) {
|
||||
shadow.inset = true;
|
||||
}
|
||||
else if (length_1.isLength(token)) {
|
||||
if (c === 0) {
|
||||
shadow.offsetX = token;
|
||||
}
|
||||
else if (c === 1) {
|
||||
shadow.offsetY = token;
|
||||
}
|
||||
else if (c === 2) {
|
||||
shadow.blur = token;
|
||||
}
|
||||
else {
|
||||
shadow.spread = token;
|
||||
}
|
||||
c++;
|
||||
}
|
||||
else {
|
||||
shadow.color = color_1.color.parse(context, token);
|
||||
}
|
||||
}
|
||||
return shadow;
|
||||
});
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=box-shadow.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"box-shadow.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/box-shadow.ts"],"names":[],"mappings":";;;AACA,2CAA+E;AAC/E,gEAAuD;AACvD,wCAA4C;AAC5C,0CAAiD;AAapC,QAAA,SAAS,GAAuC;IACzD,IAAI,EAAE,YAAY;IAClB,YAAY,EAAE,MAAM;IACpB,IAAI,cAAoC;IACxC,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,UAAC,OAAgB,EAAE,MAAkB;QACxC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,yBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE;YAC5D,OAAO,EAAE,CAAC;SACb;QAED,OAAO,0BAAiB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,UAAC,MAAkB;YACpD,IAAM,MAAM,GAAkB;gBAC1B,KAAK,EAAE,UAAU;gBACjB,OAAO,EAAE,+BAAW;gBACpB,OAAO,EAAE,+BAAW;gBACpB,IAAI,EAAE,+BAAW;gBACjB,MAAM,EAAE,+BAAW;gBACnB,KAAK,EAAE,KAAK;aACf,CAAC;YACF,IAAI,CAAC,GAAG,CAAC,CAAC;YACV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACpC,IAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;gBACxB,IAAI,yBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE;oBAClC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;iBACvB;qBAAM,IAAI,iBAAQ,CAAC,KAAK,CAAC,EAAE;oBACxB,IAAI,CAAC,KAAK,CAAC,EAAE;wBACT,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC;qBAC1B;yBAAM,IAAI,CAAC,KAAK,CAAC,EAAE;wBAChB,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC;qBAC1B;yBAAM,IAAI,CAAC,KAAK,CAAC,EAAE;wBAChB,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC;qBACvB;yBAAM;wBACH,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC;qBACzB;oBACD,CAAC,EAAE,CAAC;iBACP;qBAAM;oBACH,MAAM,CAAC,KAAK,GAAG,aAAK,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;iBAC9C;aACJ;YACD,OAAO,MAAM,CAAC;QAClB,CAAC,CAAC,CAAC;IACP,CAAC;CACJ,CAAC"}
|
||||
11
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/property-descriptors/color.js
vendored
Normal file
11
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/property-descriptors/color.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.color = void 0;
|
||||
exports.color = {
|
||||
name: "color",
|
||||
initialValue: 'transparent',
|
||||
prefix: false,
|
||||
type: 3 /* TYPE_VALUE */,
|
||||
format: 'color'
|
||||
};
|
||||
//# sourceMappingURL=color.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"color.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/color.ts"],"names":[],"mappings":";;;AAEa,QAAA,KAAK,GAAiC;IAC/C,IAAI,EAAE,OAAO;IACb,YAAY,EAAE,aAAa;IAC3B,MAAM,EAAE,KAAK;IACb,IAAI,oBAA0C;IAC9C,MAAM,EAAE,OAAO;CAClB,CAAC"}
|
||||
20
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/property-descriptors/content.js
vendored
Normal file
20
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/property-descriptors/content.js
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.content = void 0;
|
||||
exports.content = {
|
||||
name: 'content',
|
||||
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;
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=content.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"content.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/content.ts"],"names":[],"mappings":";;;AAOa,QAAA,OAAO,GAAqC;IACrD,IAAI,EAAE,SAAS;IACf,YAAY,EAAE,MAAM;IACpB,IAAI,cAAoC;IACxC,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,UAAC,QAAiB,EAAE,MAAkB;QACzC,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,CAAC;IAClB,CAAC;CACJ,CAAC"}
|
||||
@@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.counterIncrement = void 0;
|
||||
var parser_1 = require("../syntax/parser");
|
||||
exports.counterIncrement = {
|
||||
name: 'counter-increment',
|
||||
initialValue: 'none',
|
||||
prefix: true,
|
||||
type: 1 /* LIST */,
|
||||
parse: function (_context, tokens) {
|
||||
if (tokens.length === 0) {
|
||||
return null;
|
||||
}
|
||||
var first = tokens[0];
|
||||
if (first.type === 20 /* IDENT_TOKEN */ && first.value === 'none') {
|
||||
return null;
|
||||
}
|
||||
var increments = [];
|
||||
var filtered = tokens.filter(parser_1.nonWhiteSpace);
|
||||
for (var i = 0; i < filtered.length; i++) {
|
||||
var counter = filtered[i];
|
||||
var next = filtered[i + 1];
|
||||
if (counter.type === 20 /* IDENT_TOKEN */) {
|
||||
var increment = next && parser_1.isNumberToken(next) ? next.number : 1;
|
||||
increments.push({ counter: counter.value, increment: increment });
|
||||
}
|
||||
}
|
||||
return increments;
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=counter-increment.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"counter-increment.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/counter-increment.ts"],"names":[],"mappings":";;;AACA,2CAAwE;AAW3D,QAAA,gBAAgB,GAA8C;IACvE,IAAI,EAAE,mBAAmB;IACzB,YAAY,EAAE,MAAM;IACpB,MAAM,EAAE,IAAI;IACZ,IAAI,cAAoC;IACxC,KAAK,EAAE,UAAC,QAAiB,EAAE,MAAkB;QACzC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;YACrB,OAAO,IAAI,CAAC;SACf;QAED,IAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QAExB,IAAI,KAAK,CAAC,IAAI,yBAA0B,IAAI,KAAK,CAAC,KAAK,KAAK,MAAM,EAAE;YAChE,OAAO,IAAI,CAAC;SACf;QAED,IAAM,UAAU,GAAG,EAAE,CAAC;QACtB,IAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,sBAAa,CAAC,CAAC;QAE9C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACtC,IAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC5B,IAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YAC7B,IAAI,OAAO,CAAC,IAAI,yBAA0B,EAAE;gBACxC,IAAM,SAAS,GAAG,IAAI,IAAI,sBAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;gBAChE,UAAU,CAAC,IAAI,CAAC,EAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,SAAS,WAAA,EAAC,CAAC,CAAC;aACxD;SACJ;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ,CAAC"}
|
||||
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.counterReset = void 0;
|
||||
var parser_1 = require("../syntax/parser");
|
||||
exports.counterReset = {
|
||||
name: 'counter-reset',
|
||||
initialValue: 'none',
|
||||
prefix: true,
|
||||
type: 1 /* LIST */,
|
||||
parse: function (_context, tokens) {
|
||||
if (tokens.length === 0) {
|
||||
return [];
|
||||
}
|
||||
var resets = [];
|
||||
var filtered = tokens.filter(parser_1.nonWhiteSpace);
|
||||
for (var i = 0; i < filtered.length; i++) {
|
||||
var counter = filtered[i];
|
||||
var next = filtered[i + 1];
|
||||
if (parser_1.isIdentToken(counter) && counter.value !== 'none') {
|
||||
var reset = next && parser_1.isNumberToken(next) ? next.number : 0;
|
||||
resets.push({ counter: counter.value, reset: reset });
|
||||
}
|
||||
}
|
||||
return resets;
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=counter-reset.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"counter-reset.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/counter-reset.ts"],"names":[],"mappings":";;;AACA,2CAAsF;AAUzE,QAAA,YAAY,GAA0C;IAC/D,IAAI,EAAE,eAAe;IACrB,YAAY,EAAE,MAAM;IACpB,MAAM,EAAE,IAAI;IACZ,IAAI,cAAoC;IACxC,KAAK,EAAE,UAAC,QAAiB,EAAE,MAAkB;QACzC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;YACrB,OAAO,EAAE,CAAC;SACb;QAED,IAAM,MAAM,GAAG,EAAE,CAAC;QAClB,IAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,sBAAa,CAAC,CAAC;QAE9C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACtC,IAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC5B,IAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YAC7B,IAAI,qBAAY,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,KAAK,KAAK,MAAM,EAAE;gBACnD,IAAM,KAAK,GAAG,IAAI,IAAI,sBAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC5D,MAAM,CAAC,IAAI,CAAC,EAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,KAAK,OAAA,EAAC,CAAC,CAAC;aAChD;SACJ;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAC"}
|
||||
19
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/property-descriptors/direction.js
vendored
Normal file
19
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/property-descriptors/direction.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.direction = void 0;
|
||||
exports.direction = {
|
||||
name: 'direction',
|
||||
initialValue: 'ltr',
|
||||
prefix: false,
|
||||
type: 2 /* IDENT_VALUE */,
|
||||
parse: function (_context, direction) {
|
||||
switch (direction) {
|
||||
case 'rtl':
|
||||
return 1 /* RTL */;
|
||||
case 'ltr':
|
||||
default:
|
||||
return 0 /* LTR */;
|
||||
}
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=direction.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"direction.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/direction.ts"],"names":[],"mappings":";;;AAQa,QAAA,SAAS,GAA6C;IAC/D,IAAI,EAAE,WAAW;IACjB,YAAY,EAAE,KAAK;IACnB,MAAM,EAAE,KAAK;IACb,IAAI,qBAA2C;IAC/C,KAAK,EAAE,UAAC,QAAiB,EAAE,SAAiB;QACxC,QAAQ,SAAS,EAAE;YACf,KAAK,KAAK;gBACN,mBAAqB;YACzB,KAAK,KAAK,CAAC;YACX;gBACI,mBAAqB;SAC5B;IACL,CAAC;CACJ,CAAC"}
|
||||
82
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/property-descriptors/display.js
vendored
Normal file
82
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/property-descriptors/display.js
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.display = void 0;
|
||||
var parser_1 = require("../syntax/parser");
|
||||
exports.display = {
|
||||
name: 'display',
|
||||
initialValue: 'inline-block',
|
||||
prefix: false,
|
||||
type: 1 /* LIST */,
|
||||
parse: function (_context, tokens) {
|
||||
return tokens.filter(parser_1.isIdentToken).reduce(function (bit, token) {
|
||||
return bit | parseDisplayValue(token.value);
|
||||
}, 0 /* NONE */);
|
||||
}
|
||||
};
|
||||
var parseDisplayValue = function (display) {
|
||||
switch (display) {
|
||||
case 'block':
|
||||
case '-webkit-box':
|
||||
return 2 /* BLOCK */;
|
||||
case 'inline':
|
||||
return 4 /* INLINE */;
|
||||
case 'run-in':
|
||||
return 8 /* RUN_IN */;
|
||||
case 'flow':
|
||||
return 16 /* FLOW */;
|
||||
case 'flow-root':
|
||||
return 32 /* FLOW_ROOT */;
|
||||
case 'table':
|
||||
return 64 /* TABLE */;
|
||||
case 'flex':
|
||||
case '-webkit-flex':
|
||||
return 128 /* FLEX */;
|
||||
case 'grid':
|
||||
case '-ms-grid':
|
||||
return 256 /* GRID */;
|
||||
case 'ruby':
|
||||
return 512 /* RUBY */;
|
||||
case 'subgrid':
|
||||
return 1024 /* SUBGRID */;
|
||||
case 'list-item':
|
||||
return 2048 /* LIST_ITEM */;
|
||||
case 'table-row-group':
|
||||
return 4096 /* TABLE_ROW_GROUP */;
|
||||
case 'table-header-group':
|
||||
return 8192 /* TABLE_HEADER_GROUP */;
|
||||
case 'table-footer-group':
|
||||
return 16384 /* TABLE_FOOTER_GROUP */;
|
||||
case 'table-row':
|
||||
return 32768 /* TABLE_ROW */;
|
||||
case 'table-cell':
|
||||
return 65536 /* TABLE_CELL */;
|
||||
case 'table-column-group':
|
||||
return 131072 /* TABLE_COLUMN_GROUP */;
|
||||
case 'table-column':
|
||||
return 262144 /* TABLE_COLUMN */;
|
||||
case 'table-caption':
|
||||
return 524288 /* TABLE_CAPTION */;
|
||||
case 'ruby-base':
|
||||
return 1048576 /* RUBY_BASE */;
|
||||
case 'ruby-text':
|
||||
return 2097152 /* RUBY_TEXT */;
|
||||
case 'ruby-base-container':
|
||||
return 4194304 /* RUBY_BASE_CONTAINER */;
|
||||
case 'ruby-text-container':
|
||||
return 8388608 /* RUBY_TEXT_CONTAINER */;
|
||||
case 'contents':
|
||||
return 16777216 /* CONTENTS */;
|
||||
case 'inline-block':
|
||||
return 33554432 /* INLINE_BLOCK */;
|
||||
case 'inline-list-item':
|
||||
return 67108864 /* INLINE_LIST_ITEM */;
|
||||
case 'inline-table':
|
||||
return 134217728 /* INLINE_TABLE */;
|
||||
case 'inline-flex':
|
||||
return 268435456 /* INLINE_FLEX */;
|
||||
case 'inline-grid':
|
||||
return 536870912 /* INLINE_GRID */;
|
||||
}
|
||||
return 0 /* NONE */;
|
||||
};
|
||||
//# sourceMappingURL=display.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"display.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/display.ts"],"names":[],"mappings":";;;AACA,2CAAwD;AAqC3C,QAAA,OAAO,GAAqC;IACrD,IAAI,EAAE,SAAS;IACf,YAAY,EAAE,cAAc;IAC5B,MAAM,EAAE,KAAK;IACb,IAAI,cAAoC;IACxC,KAAK,EAAE,UAAC,QAAiB,EAAE,MAAkB;QACzC,OAAO,MAAM,CAAC,MAAM,CAAC,qBAAY,CAAC,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,KAAK;YACjD,OAAO,GAAG,GAAG,iBAAiB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAChD,CAAC,eAAe,CAAC;IACrB,CAAC;CACJ,CAAC;AAEF,IAAM,iBAAiB,GAAG,UAAC,OAAe;IACtC,QAAQ,OAAO,EAAE;QACb,KAAK,OAAO,CAAC;QACb,KAAK,aAAa;YACd,qBAAqB;QACzB,KAAK,QAAQ;YACT,sBAAsB;QAC1B,KAAK,QAAQ;YACT,sBAAsB;QAC1B,KAAK,MAAM;YACP,qBAAoB;QACxB,KAAK,WAAW;YACZ,0BAAyB;QAC7B,KAAK,OAAO;YACR,sBAAqB;QACzB,KAAK,MAAM,CAAC;QACZ,KAAK,cAAc;YACf,sBAAoB;QACxB,KAAK,MAAM,CAAC;QACZ,KAAK,UAAU;YACX,sBAAoB;QACxB,KAAK,MAAM;YACP,sBAAoB;QACxB,KAAK,SAAS;YACV,0BAAuB;QAC3B,KAAK,WAAW;YACZ,4BAAyB;QAC7B,KAAK,iBAAiB;YAClB,kCAA+B;QACnC,KAAK,oBAAoB;YACrB,qCAAkC;QACtC,KAAK,oBAAoB;YACrB,sCAAkC;QACtC,KAAK,WAAW;YACZ,6BAAyB;QAC7B,KAAK,YAAY;YACb,8BAA0B;QAC9B,KAAK,oBAAoB;YACrB,uCAAkC;QACtC,KAAK,cAAc;YACf,iCAA4B;QAChC,KAAK,eAAe;YAChB,kCAA6B;QACjC,KAAK,WAAW;YACZ,+BAAyB;QAC7B,KAAK,WAAW;YACZ,+BAAyB;QAC7B,KAAK,qBAAqB;YACtB,yCAAmC;QACvC,KAAK,qBAAqB;YACtB,yCAAmC;QACvC,KAAK,UAAU;YACX,+BAAwB;QAC5B,KAAK,cAAc;YACf,mCAA4B;QAChC,KAAK,kBAAkB;YACnB,uCAAgC;QACpC,KAAK,cAAc;YACf,oCAA4B;QAChC,KAAK,aAAa;YACd,mCAA2B;QAC/B,KAAK,aAAa;YACd,mCAA2B;KAClC;IAED,oBAAoB;AACxB,CAAC,CAAC"}
|
||||
15
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/property-descriptors/duration.js
vendored
Normal file
15
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/property-descriptors/duration.js
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.duration = void 0;
|
||||
var parser_1 = require("../syntax/parser");
|
||||
var time_1 = require("../types/time");
|
||||
exports.duration = {
|
||||
name: 'duration',
|
||||
initialValue: '0s',
|
||||
prefix: false,
|
||||
type: 1 /* LIST */,
|
||||
parse: function (context, tokens) {
|
||||
return tokens.filter(parser_1.isDimensionToken).map(function (token) { return time_1.time.parse(context, token); });
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=duration.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"duration.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/duration.ts"],"names":[],"mappings":";;;AAEA,2CAA4D;AAC5D,sCAAmC;AAEtB,QAAA,QAAQ,GAAsC;IACvD,IAAI,EAAE,UAAU;IAChB,YAAY,EAAE,IAAI;IAClB,MAAM,EAAE,KAAK;IACb,IAAI,cAAoC;IACxC,KAAK,EAAE,UAAC,OAAgB,EAAE,MAAkB;QACxC,OAAO,MAAM,CAAC,MAAM,CAAC,yBAAgB,CAAC,CAAC,GAAG,CAAC,UAAC,KAAK,IAAK,OAAA,WAAI,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,EAA1B,CAA0B,CAAC,CAAC;IACtF,CAAC;CACJ,CAAC"}
|
||||
23
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/property-descriptors/float.js
vendored
Normal file
23
project/pidu/app/AppSessionArchive/html2canvas/dist/lib/css/property-descriptors/float.js
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.float = void 0;
|
||||
exports.float = {
|
||||
name: 'float',
|
||||
initialValue: 'none',
|
||||
prefix: false,
|
||||
type: 2 /* IDENT_VALUE */,
|
||||
parse: function (_context, float) {
|
||||
switch (float) {
|
||||
case 'left':
|
||||
return 1 /* LEFT */;
|
||||
case 'right':
|
||||
return 2 /* RIGHT */;
|
||||
case 'inline-start':
|
||||
return 3 /* INLINE_START */;
|
||||
case 'inline-end':
|
||||
return 4 /* INLINE_END */;
|
||||
}
|
||||
return 0 /* NONE */;
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=float.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"float.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/float.ts"],"names":[],"mappings":";;;AAUa,QAAA,KAAK,GAAyC;IACvD,IAAI,EAAE,OAAO;IACb,YAAY,EAAE,MAAM;IACpB,MAAM,EAAE,KAAK;IACb,IAAI,qBAA2C;IAC/C,KAAK,EAAE,UAAC,QAAiB,EAAE,KAAa;QACpC,QAAQ,KAAK,EAAE;YACX,KAAK,MAAM;gBACP,oBAAkB;YACtB,KAAK,OAAO;gBACR,qBAAmB;YACvB,KAAK,cAAc;gBACf,4BAA0B;YAC9B,KAAK,YAAY;gBACb,0BAAwB;SAC/B;QACD,oBAAkB;IACtB,CAAC;CACJ,CAAC"}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user