Repository: bubkoo/html-to-image Branch: master Commit: 116ff7a1d43d Files: 165 Total size: 300.5 KB Directory structure: gitextract_eg26j0ob/ ├── .editorconfig ├── .eslintrc ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.md │ │ └── feature_request.md │ ├── PULL_REQUEST_TEMPLATE.md │ └── workflows/ │ ├── backup/ │ │ └── stale.yml │ ├── ci.yml │ ├── codeql.yml │ ├── config/ │ │ ├── label-commands.yml │ │ ├── needs-more-info.yml │ │ └── pr-label-branch-name.yml │ ├── label-commands.yml │ ├── lock.yml │ ├── needs-more-info.yml │ ├── potential-duplicates.yml │ ├── pr-label-branch-name.yml │ ├── pr-label-patch-size.yml │ ├── pr-label-status.yml │ ├── pr-label-title-body.yml │ ├── release.yml │ ├── update-authors.yml │ ├── update-contributors.yml │ ├── update-license.yml │ └── welcome.yml ├── .gitignore ├── .husky/ │ ├── .gitignore │ ├── commit-msg │ └── pre-commit ├── .prettierignore ├── .prettierrc ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── CONTRIBUTORS ├── LICENSE ├── README.md ├── karma.conf.js ├── package.json ├── rollup.config.js ├── src/ │ ├── apply-style.ts │ ├── clone-node.ts │ ├── clone-pseudos.ts │ ├── dataurl.ts │ ├── embed-images.ts │ ├── embed-resources.ts │ ├── embed-webfonts.ts │ ├── index.ts │ ├── mimes.ts │ ├── types.ts │ └── util.ts ├── test/ │ ├── resources/ │ │ ├── bgcolor/ │ │ │ ├── image │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── bigger/ │ │ │ ├── image │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── border/ │ │ │ ├── image │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── canvas/ │ │ │ ├── image │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── css-bg/ │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── custom-element/ │ │ │ ├── image │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── dimensions/ │ │ │ ├── image │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── ext-css/ │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── filter/ │ │ │ ├── image │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── fonts/ │ │ │ ├── node.html │ │ │ ├── style.css │ │ │ └── web-fonts/ │ │ │ ├── embedded.css │ │ │ ├── empty.html │ │ │ ├── remote.css │ │ │ ├── rules-relative.css │ │ │ ├── rules-relative.html │ │ │ ├── rules.css │ │ │ └── with-query.css │ │ ├── hash/ │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── images/ │ │ │ ├── loading.html │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── input/ │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── page.html │ │ ├── pixeldata/ │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── placeholder/ │ │ │ ├── image │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── pseudo/ │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── scale/ │ │ │ ├── image │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── scroll/ │ │ │ ├── image │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── select/ │ │ │ ├── first │ │ │ ├── first-option.html │ │ │ ├── second │ │ │ ├── second-option.html │ │ │ ├── style.css │ │ │ ├── third │ │ │ └── third-option.html │ │ ├── sheet/ │ │ │ ├── image │ │ │ ├── node.html │ │ │ ├── sheet.css │ │ │ └── style.css │ │ ├── small/ │ │ │ ├── image │ │ │ ├── image-jpeg │ │ │ ├── image-jpeg-low │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── style/ │ │ │ ├── image │ │ │ ├── image-include-style │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── svg-color/ │ │ │ ├── image │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── svg-image/ │ │ │ ├── image │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── svg-ns/ │ │ │ ├── image │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── svg-rect/ │ │ │ ├── image │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── svg-use-tag/ │ │ │ ├── image │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── text/ │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── textarea/ │ │ │ ├── node.html │ │ │ └── style.css │ │ ├── video/ │ │ │ ├── flower.webm │ │ │ ├── image │ │ │ ├── image-poster │ │ │ ├── node.html │ │ │ ├── poster.html │ │ │ └── style.css │ │ └── webp/ │ │ ├── node.html │ │ └── style.css │ └── spec/ │ ├── basic.spec.ts │ ├── canvas.sepc.ts │ ├── embed.spec.ts │ ├── helper.ts │ ├── on-image-error-handler.spec.ts │ ├── options.spec.ts │ ├── select.sepc.ts │ ├── setup.ts │ ├── special.spec.ts │ ├── svg.spec.ts │ ├── video.spec.ts │ └── webfont.spec.ts └── tsconfig.json ================================================ FILE CONTENTS ================================================ ================================================ FILE: .editorconfig ================================================ # EditorConfig is awesome: http://EditorConfig.org # top-most EditorConfig file root = true [*] charset = utf-8 end_of_line = lf trim_trailing_whitespace = true insert_final_newline = true indent_style = space indent_size = 2 [*.md] trim_trailing_whitespace = false [Makefile] indent_style = tab ================================================ FILE: .eslintrc ================================================ { "extends": "@bubkoo/eslint-config" } ================================================ FILE: .github/ISSUE_TEMPLATE/bug_report.md ================================================ --- name: Bug report about: Create a report to help us improve title: '' labels: 'bug' assignees: '' --- ### Expected Behavior ### Current Behavior ### Possible Solution ### Steps To Reproduce 1. ... 2. ... 3. ...
Error Message & Stack Trace

```txt ```

### Additional Context ### Your Environment - html-to-image: [e.g. 0.1.0] - OS: [e.g. macOS Sierra 10.12.3] - Browser: [e.g. chrome 78.0.3904.108] ================================================ FILE: .github/ISSUE_TEMPLATE/feature_request.md ================================================ --- name: Feature request about: Suggest an idea for this project title: '' labels: 'enhancement' assignees: '' --- ### Expected Behavior ### Possible Solution ### Additional Context ================================================ FILE: .github/PULL_REQUEST_TEMPLATE.md ================================================ ### Description ### Motivation and Context ### Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Enhancement (changes that improvement of current feature or performance) - [ ] Refactoring (changes that neither fixes a bug nor adds a feature) - [ ] Test Case (changes that add missing tests or correct existing tests) - [ ] Code style optimization (changes that do not affect the meaning of the code) - [ ] Docs (changes that only update documentation) - [ ] Chore (changes that don't modify src or test files) ### Self Check before Merge - [ ] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [ ] I have read the [**CONTRIBUTING**](https://github.com/bubkoo/html-to-image/blob/master/CONTRIBUTING.md) document. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. ================================================ FILE: .github/workflows/backup/stale.yml ================================================ name: 👻 Stale on: schedule: - cron: "0 0 * * *" jobs: run: runs-on: ubuntu-latest steps: - uses: bubkoo/use-app-token@v1 with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} variable_name: bot_token - uses: actions/stale@v3 with: repo-token: ${{ env.bot_token }} stale-issue-message: > Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not-stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Thanks for being a part of the Antv community! 💪💯 close-issue-message: > Hey again! It’s been 60 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m `HUMAN_EMOTION_SORRY`. Please feel free to comment on this issue or create a new one if you need anything else. As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Thanks again for being part of the Antv community! 💪💯 stale-pr-message: > Hiya! This PR has gone quiet. Spooky quiet. 👻 We get a lot of PRs, so we currently close PRs after 60 days of inactivity. It’s been at least 20 days since the last update here. If we missed this PR or if you want to keep it open, please reply here. You can also add the label "not-stale" to keep this PR open! Thanks for being a part of the Antv community! 💪💯 close-pr-message: > Hey again! It’s been 60 days since anything happened on this PR, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot, so if I’ve closed this PR in error, I’m `HUMAN_EMOTION_SORRY`. Please feel free to comment on this PR or create a new one if you need anything else. Thanks again for being part of the Antv community! 💪💯 days-before-stale: 20 days-before-close: 40 stale-issue-label: 'stale' exempt-issue-label: 'not-stale,awaiting-approval,work-in-progress' stale-pr-label: 'stale' exempt-pr-label: 'not-stale,awaiting-approval,work-in-progress' ================================================ FILE: .github/workflows/ci.yml ================================================ name: 👷 CI on: pull_request: pull_request_target: push: branches: - master - next - next-major - alpha - beta jobs: ci: runs-on: ubuntu-latest steps: - name: ⤵️ Checkout uses: actions/checkout@v3 - name: 🎉 Setup nodejs uses: actions/setup-node@v3 with: node-version: 16.x - name: 🎉 Setup pnpm uses: pnpm/action-setup@v2 with: version: 7 run_install: false - name: 🌱 Get pnpm store directory id: pnpm-cache shell: bash run: | echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - name: 🚸 Setup pnpm cache uses: actions/cache@v3 with: path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm-store- - name: 🚧 Install dependencies run: pnpm install --no-frozen-lockfile --ignore-scripts - name: 📦 Build run: pnpm run build - name: ✅ Test run: pnpm run test - name: 🔑 Generate Token uses: wow-actions/use-app-token@v2 with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} - name: 💡 Coveralls uses: coverallsapp/github-action@master with: github-token: ${{ env.BOT_TOKEN }} path-to-lcov: ./test/coverage/lcov.info - name: 💡 Codecov uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./test/coverage/lcov.info ================================================ FILE: .github/workflows/codeql.yml ================================================ name: ⛵️ CodeQL on: push: branches: [ "master" ] pull_request: branches: [ "master" ] schedule: - cron: "21 15 * * 5" jobs: analyze: name: Analyze runs-on: ubuntu-latest permissions: actions: read contents: read security-events: write strategy: fail-fast: false matrix: language: [ javascript ] steps: - name: Checkout uses: actions/checkout@v3 - name: Initialize CodeQL uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} queries: +security-and-quality - name: Autobuild uses: github/codeql-action/autobuild@v2 - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 with: category: "/language:${{ matrix.language }}" ================================================ FILE: .github/workflows/config/label-commands.yml ================================================ heated: lock: true lockReason: too heated comment: The thread has been temporarily locked. -heated: unlock: true issues: feature: close: true comment: > :wave: @{{ author }}, please use our idea board to request new features. -wontfix: open: true needs-more-info: close: true comment: > @{{ author }} In order to communicate effectively, we have a certain format requirement for the issue, your issue is automatically closed because there is no recurring step or reproducible warehouse, and will be REOPEN after the offer. -needs-more-info: open: true ================================================ FILE: .github/workflows/config/needs-more-info.yml ================================================ # common config # ------------- # chenck issue and PR template checkTemplate: true # minimum title length required miniTitleLength: 8 # add label to trigger a label command, see ./label-commands.yml labelToAdd: needs-more-info # reactions to add reactions: - '-1' - confused # config for issues # ----------------- issue: badTitles: - update - updates - test - issue - debug - demo badTitleComment: '' badBodyComment: '' # config for PRs # -------------- pullRequest: badTitles: - update - updates - test badTitleComment: > @{{ author }} Please provide us with more info about this pull request title. badBodyComment: > @{{ author }} Please provide us with more info about this pull request. ================================================ FILE: .github/workflows/config/pr-label-branch-name.yml ================================================ # https://github.com/marketplace/actions/PR-labeler PR(fix): ['fix/*', 'bug/*'] PR(chore): chore/* PR(test): ['testing/*', 'test/*'] PR(feature): ['feature/*', 'feat/*'] PR(breaking): ['breaking/*', 'break/*'] PR(internal): ['internal/*', 'inter/*'] PR(documentation): ['documentation/*', 'document/*', 'doc/*'] PR(enhancement): ['enhancement/*', 'enhance/*'] PR(dependency): ['dependency/*', 'dep/*'] PR(refactor): ['refactoring/*', 'refactor/*'] ================================================ FILE: .github/workflows/label-commands.yml ================================================ name: 👾 Label Commands on: pull_request_target: types: [labeled, unlabeled] issues: types: [labeled, unlabeled] jobs: run: runs-on: ubuntu-latest steps: - uses: bubkoo/use-app-token@v1 with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} variable_name: bot_token - uses: bubkoo/label-commands@v1 with: GITHUB_TOKEN: ${{ env.bot_token }} CONFIG_FILE: .github/workflows/config/label-commands.yml ================================================ FILE: .github/workflows/lock.yml ================================================ name: ⛔️ Lock Threads on: schedule: - cron: 0 0 * * * jobs: run: runs-on: ubuntu-latest steps: - uses: bubkoo/use-app-token@v1 with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} variable_name: bot_token - uses: dessant/lock-threads@v2 with: github-token: ${{ env.bot_token }} issue-lock-inactive-days: 365 issue-lock-comment: > This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. process-only: issues ================================================ FILE: .github/workflows/needs-more-info.yml ================================================ name: 🚨 Needs More Info on: pull_request_target: types: [opened] issues: types: [opened] jobs: run: runs-on: ubuntu-latest steps: - uses: bubkoo/use-app-token@v1 with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} variable_name: bot_token - uses: bubkoo/needs-more-info@v1 with: GITHUB_TOKEN: ${{ env.bot_token }} CONFIG_FILE: .github/workflows/config/needs-more-info.yml ================================================ FILE: .github/workflows/potential-duplicates.yml ================================================ name: 🆖 Potential Duplicates on: issues: types: [opened, edited] jobs: run: runs-on: ubuntu-latest steps: - uses: bubkoo/use-app-token@v1 with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} variable_name: bot_token - uses: bubkoo/potential-duplicates@v1 with: GITHUB_TOKEN: ${{ env.bot_token }} ================================================ FILE: .github/workflows/pr-label-branch-name.yml ================================================ name: 🏷️ Label(Branch Name) on: pull_request_target: types: [opened] jobs: run: runs-on: ubuntu-latest steps: - uses: bubkoo/use-app-token@v1 with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} variable_name: bot_token - uses: TimonVS/pr-labeler-action@v3 with: configuration-path: .github/workflows/config/pr-label-branch-name.yml env: GITHUB_TOKEN: ${{ env.bot_token }} ================================================ FILE: .github/workflows/pr-label-patch-size.yml ================================================ name: 🏷️ Label(Patch Size) on: pull_request_target jobs: run: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: bubkoo/use-app-token@v1 with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} variable_name: bot_token - uses: pascalgn/size-label-action@v0.1.1 env: GITHUB_TOKEN: "${{ env.bot_token }}" IGNORED: "!.gitignore\npnpm-lock.yaml" ================================================ FILE: .github/workflows/pr-label-status.yml ================================================ name: 🏷️ Label(Status) on: pull_request_target: types: [opened, closed, edited, reopened, synchronize, ready_for_review] pull_request_review: types: [submitted, dismissed] jobs: triage: runs-on: ubuntu-latest steps: - uses: bubkoo/use-app-token@v1 with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} env_name: bot_token - uses: bubkoo/pr-triage@v1 with: GITHUB_TOKEN: ${{ env.bot_token }} ================================================ FILE: .github/workflows/pr-label-title-body.yml ================================================ # Github action for automatically adding label or setting assignee when a new # Issue or PR is opened. https://github.com/marketplace/actions/issue-labeler name: 🏷️ Label(Title and Body) on: issues: types: [opened] pull_request_target: types: [opened] jobs: run: runs-on: ubuntu-latest steps: - uses: bubkoo/use-app-token@v1 with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} variable_name: bot_token - uses: Naturalclar/issue-action@v2.0.1 with: github-token: ${{ env.bot_token }} title-or-body: title parameters: > [ { "keywords": ["bug", "error"], "labels": ["bug"] }, { "keywords": ["help", "guidance"], "labels": ["help-wanted"] } ] ================================================ FILE: .github/workflows/release.yml ================================================ name: 🚀 Release on: push: branches: - master - next - next-major - alpha - beta jobs: run: runs-on: ubuntu-latest steps: - name: ⤵️ Checkout uses: actions/checkout@v3 with: persist-credentials: false - name: 🎉 Setup nodejs uses: actions/setup-node@v3 with: node-version: 16.x - name: 🎉 Setup pnpm uses: pnpm/action-setup@v2 with: version: 7 run_install: false - name: 🌱 Get pnpm store directory id: pnpm-cache shell: bash run: | echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - name: 🚸 Setup pnpm cache uses: actions/cache@v3 with: path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm-store- - name: 🚧 Install dependencies run: pnpm install --no-frozen-lockfile --ignore-scripts - name: 📦 Build run: pnpm run build - name: ✅ Test run: pnpm run test - name: 🔑 Generate Token uses: wow-actions/use-app-token@v2 with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} - name: 📦 Semantic Release uses: cycjimmy/semantic-release-action@v3 id: semantic with: extends: '@bubkoo/semantic-release-config' extra_plugins: | @semantic-release/changelog @semantic-release/git env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} GITHUB_TOKEN: ${{ env.BOT_TOKEN }} GIT_AUTHOR_NAME: ${{ env.BOT_NAME }}[bot] GIT_AUTHOR_EMAIL: ${{ env.BOT_NAME }}[bot]@users.noreply.github.com GIT_COMMITTER_NAME: ${{ env.BOT_NAME }}[bot] GIT_COMMITTER_EMAIL: ${{ env.BOT_NAME }}[bot]@users.noreply.github.com - name: 🎉 Setup Node.js with GitHub Package Registry if: steps.semantic.outputs.new_release_published == 'true' uses: actions/setup-node@v3 with: node-version: 16 registry-url: https://npm.pkg.github.com scope: bubkoo - name: 🔀 Publish To GitHub Package Registry if: steps.semantic.outputs.new_release_published == 'true' run: | sed -i 's/\("name"\:[[:space:]]*"\)\(html-to-image"\)/\1@bubkoo\/\2/' package.json npm publish env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} ================================================ FILE: .github/workflows/update-authors.yml ================================================ name: 🎗 Update Authors on: push: branches: - master - alpha - beta jobs: authors: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - uses: bubkoo/use-app-token@v1 with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} env_name: bot_token - uses: bubkoo/update-authors@v1 with: GITHUB_TOKEN: ${{ env.bot_token }} bots: false path: CONTRIBUTORS commit: 'chore: update CONTRIBUTORS [skip ci]' ================================================ FILE: .github/workflows/update-contributors.yml ================================================ name: 🤝 Update Contributors on: schedule: - cron: '0 1 * * *' push: branches: - master - alpha - beta jobs: contributors: runs-on: ubuntu-latest steps: - uses: bubkoo/use-app-token@v1 with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} env_name: bot_token - uses: bubkoo/contributors-list@v1 with: GITHUB_TOKEN: ${{ env.bot_token }} excludeUsers: semantic-release-bot ImgBotApp ================================================ FILE: .github/workflows/update-license.yml ================================================ name: 🔑 Update License on: schedule: - cron: '0 3 1 1 *' # At 03:00 on day-of-month 1 in January. jobs: update: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - uses: bubkoo/use-app-token@v1 with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} env_name: bot_token - uses: FantasticFiasco/action-update-license-year@v2 with: token: ${{ env.bot_token }} ================================================ FILE: .github/workflows/welcome.yml ================================================ name: 👋 Welcome on: pull_request_target: types: [opened, closed] issues: types: [opened] jobs: run: runs-on: ubuntu-latest steps: - uses: bubkoo/use-app-token@v1 with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} variable_name: bot_token - uses: bubkoo/welcome-action@v1 with: GITHUB_TOKEN: ${{ env.bot_token }} FIRST_ISSUE: | 👋 @{{ author }} Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. To help make it easier for us to investigate your issue, please follow the [contributing guidelines](https://github.com/antvis/X6/blob/master/CONTRIBUTING.md). We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. FIRST_PR: | 👋 @{{ author }} 💖 Thanks for opening this pull request! 💖 Please follow the [contributing guidelines](https://github.com/antvis/X6/blob/master/CONTRIBUTING.md). And we use [semantic commit messages](https://www.conventionalcommits.org/en/v1.0.0/) to streamline the release process. Examples of commit messages with semantic prefixes: - `fix: don't overwrite prevent_default if default wasn't prevented` - `feat: add graph.scale() method` - `docs: graph.getShortestPath is now available` Things that will help get your PR across the finish line: - Follow the TypeScript coding style. - Run `npm run lint` locally to catch formatting errors earlier. - Document any user-facing changes you've made. - Include tests when adding/changing behavior. - Include screenshots and animated GIFs whenever possible. We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. FIRST_PR_MERGED: | 👋 @{{ author }} Congrats on merging your first pull request! 🎉🎉🎉 ================================================ FILE: .gitignore ================================================ .DS_Store .idea .vscode .nyc_output .DS_Store .vscode npm-debug.log yarn-error.log node_modules dist es lib test/coverage ================================================ FILE: .husky/.gitignore ================================================ _ ================================================ FILE: .husky/commit-msg ================================================ #!/bin/sh . "$(dirname "$0")/_/husky.sh" npx @commitlint/cli --extends @bubkoo/commitlint-config --edit "$1" ================================================ FILE: .husky/pre-commit ================================================ #!/bin/sh . "$(dirname "$0")/_/husky.sh" npx lint-staged ================================================ FILE: .prettierignore ================================================ *.md *.sh *.yml *.svg *.gif .DS_Store .gitignore .npmignore .prettierignore .babelrc .editorconfig .eslintrc .eslintignore .stylelintrc.json package.json tsconfig.json tslint.json CNAME LICENSE lib/ es/ dist/ coverage/ yarn.lock yarn-error.log npm-debug.log lerna-debug.log pnpm-lock.yaml ================================================ FILE: .prettierrc ================================================ { "semi": false, "singleQuote": true, "printWidth": 80, "trailingComma": "all", "proseWrap": "never", "overrides": [ { "files": ".eslintrc", "options": { "parser": "json" } }, { "files": ".prettierrc", "options": { "parser": "json" } } ] } ================================================ FILE: CHANGELOG.md ================================================ ## [1.11.13](https://github.com/bubkoo/html-to-image/compare/v1.11.12...v1.11.13) (2025-02-14) ### Bug Fixes * **mask:** add support for -webkit-mask and -webkit-mask-image ([#382](https://github.com/bubkoo/html-to-image/issues/382)) ([5bdfda7](https://github.com/bubkoo/html-to-image/commit/5bdfda75cc41248f4e161ea434bbfc535e72f95e)) ## [1.11.12](https://github.com/bubkoo/html-to-image/compare/v1.11.11...v1.11.12) (2025-02-12) ### Bug Fixes * add possibility to use own handling of onerror which will not en… ([#453](https://github.com/bubkoo/html-to-image/issues/453)) ([04160c3](https://github.com/bubkoo/html-to-image/commit/04160c3e77f55e95082cbd4879847d0afda92883)) * ensure images are totally prcoessed before using them (ios) ([#478](https://github.com/bubkoo/html-to-image/issues/478)) ([51fb98f](https://github.com/bubkoo/html-to-image/commit/51fb98f69b6eef6c391a5a7859711a5f0601f467)) * Fix `fontEmbedCSS ` incorrect sizing ([#422](https://github.com/bubkoo/html-to-image/issues/422)) ([7020162](https://github.com/bubkoo/html-to-image/commit/702016256cc03b5637e75645f3d70131ddd0e45f)) ### Performance Improvements * embed only used fonts ([#476](https://github.com/bubkoo/html-to-image/issues/476)) ([09bee44](https://github.com/bubkoo/html-to-image/commit/09bee442c27bde2af06442417f4269e763e6b6cd)) * svg cloning optimized using deep clone ([#462](https://github.com/bubkoo/html-to-image/issues/462)) ([9aac2fd](https://github.com/bubkoo/html-to-image/commit/9aac2fd11333ca302d10f2c438cd16be07a1429d)) ## [1.11.11](https://github.com/bubkoo/html-to-image/compare/v1.11.10...v1.11.11) (2023-02-01) ## [1.11.10](https://github.com/bubkoo/html-to-image/compare/v1.11.9...v1.11.10) (2023-02-01) ### Bug Fixes * revert the change in the pre-install hook ([ed7db4d](https://github.com/bubkoo/html-to-image/commit/ed7db4d090c600da632c2c7ef9319ed033d9c3e5)), closes [#365](https://github.com/bubkoo/html-to-image/issues/365) ## [1.11.9](https://github.com/bubkoo/html-to-image/compare/v1.11.8...v1.11.9) (2023-01-31) ### Bug Fixes * use "secrets.GITHUB_TOKEN" to publish to GPR ([2652288](https://github.com/bubkoo/html-to-image/commit/2652288af04f6a4775cf107981f3292b0a231973)) ## [1.11.8](https://github.com/bubkoo/html-to-image/compare/v1.11.7...v1.11.8) (2023-01-31) ### Bug Fixes * specify plugins ([d90ec23](https://github.com/bubkoo/html-to-image/commit/d90ec23daca23cda0d515cd7dda8d80cdf75546b)) ## [1.11.7](https://github.com/bubkoo/html-to-image/compare/v1.11.6...v1.11.7) (2023-01-30) ## [1.11.6](https://github.com/bubkoo/html-to-image/compare/v1.11.5...v1.11.6) (2023-01-30) ### Bug Fixes * clone iframe nodes better ([#352](https://github.com/bubkoo/html-to-image/issues/352)) ([bc6b865](https://github.com/bubkoo/html-to-image/commit/bc6b8652f0504cf5be19ed77f9c88b986e7aaeed)) ## [1.11.5](https://github.com/bubkoo/html-to-image/compare/v1.11.4...v1.11.5) (2023-01-30) ### Bug Fixes * **cloneCSSStyle:** rounded values of d attr fix ([#358](https://github.com/bubkoo/html-to-image/issues/358)) ([6d28bdb](https://github.com/bubkoo/html-to-image/commit/6d28bdb96f15877666b222067bfb082da300f355)), closes [#357](https://github.com/bubkoo/html-to-image/issues/357) * include source in npm package ([#316](https://github.com/bubkoo/html-to-image/issues/316)) ([b609415](https://github.com/bubkoo/html-to-image/commit/b6094151fb199fad699e74d93a8cef14089dda71)) * switch lazy loading images to eager ([#359](https://github.com/bubkoo/html-to-image/issues/359)) ([f7c311b](https://github.com/bubkoo/html-to-image/commit/f7c311b5285d4ca8383c5fe7c3dfb0c9fbc6f630)) ## [1.11.4](https://github.com/bubkoo/html-to-image/compare/v1.11.3...v1.11.4) (2023-01-01) ## [1.11.3](https://github.com/bubkoo/html-to-image/compare/v1.11.2...v1.11.3) (2022-12-16) ## [1.11.2](https://github.com/bubkoo/html-to-image/compare/v1.11.1...v1.11.2) (2022-12-13) ### Bug Fixes * fallback to `poster` when `currentSrc` of video is null ([5d79666](https://github.com/bubkoo/html-to-image/commit/5d7966691a0dae64de8fb2bf9e56be7d274cef83)) * use frames for video capture & add iframes ([#346](https://github.com/bubkoo/html-to-image/issues/346)) ([e316c61](https://github.com/bubkoo/html-to-image/commit/e316c610364d6a774b736e36e310be79d0085d60)) ## [1.11.1](https://github.com/bubkoo/html-to-image/compare/v1.11.0...v1.11.1) (2022-12-05) ### Bug Fixes * clone svg symbols ([#344](https://github.com/bubkoo/html-to-image/issues/344)) ([aec6fa1](https://github.com/bubkoo/html-to-image/commit/aec6fa1573d0f64be6e2879e54a8e4d7e9e300ac)) # [1.11.0](https://github.com/bubkoo/html-to-image/compare/v1.10.10...v1.11.0) (2022-12-05) ### Features * support webp format ([#343](https://github.com/bubkoo/html-to-image/issues/343)) ([09d4810](https://github.com/bubkoo/html-to-image/commit/09d4810ce3084e43f039c63efd65ba500451b9df)), closes [#326](https://github.com/bubkoo/html-to-image/issues/326) ## [1.10.10](https://github.com/bubkoo/html-to-image/compare/v1.10.9...v1.10.10) (2022-12-03) ### Bug Fixes * build script ([db7d435](https://github.com/bubkoo/html-to-image/commit/db7d43507c9419fb84ee126b8c334ffa1655b8b3)) * type errors ([b516783](https://github.com/bubkoo/html-to-image/commit/b516783244e9aa847c89cd3ca3b8114bc6157934)) ## [1.10.9](https://github.com/bubkoo/html-to-image/compare/v1.10.8...v1.10.9) (2022-12-01) ## [1.10.8](https://github.com/bubkoo/html-to-image/compare/v1.10.7...v1.10.8) (2022-09-01) ## [1.10.7](https://github.com/bubkoo/html-to-image/compare/v1.10.6...v1.10.7) (2022-09-01) ### Bug Fixes * handle 404 status of fetch ([ecfdbcc](https://github.com/bubkoo/html-to-image/commit/ecfdbcc189771c3fe212ee2ce6f641495b0d650a)) ## [1.10.6](https://github.com/bubkoo/html-to-image/compare/v1.10.5...v1.10.6) (2022-08-26) ### Bug Fixes * apply skipFonts option ([6b7e923](https://github.com/bubkoo/html-to-image/commit/6b7e923ca6a82dddb409a8ab2cda24c469640014)), closes [#93](https://github.com/bubkoo/html-to-image/issues/93) [#310](https://github.com/bubkoo/html-to-image/issues/310) ## [1.10.5](https://github.com/bubkoo/html-to-image/compare/v1.10.4...v1.10.5) (2022-08-26) ## [1.10.4](https://github.com/bubkoo/html-to-image/compare/v1.10.3...v1.10.4) (2022-08-16) ## [1.10.3](https://github.com/bubkoo/html-to-image/compare/v1.10.2...v1.10.3) (2022-08-16) ## [1.10.2](https://github.com/bubkoo/html-to-image/compare/v1.10.1...v1.10.2) (2022-08-15) ## [1.10.1](https://github.com/bubkoo/html-to-image/compare/v1.10.0...v1.10.1) (2022-08-15) ### Bug Fixes * node version ([13a6989](https://github.com/bubkoo/html-to-image/commit/13a6989d00440984ea631bb92cb484d3bedbfb02)) # [1.10.0](https://github.com/bubkoo/html-to-image/compare/v1.9.0...v1.10.0) (2022-08-11) ### Bug Fixes * 🐛 cloneCSSStyle: copy transformOriginProp ([#297](https://github.com/bubkoo/html-to-image/issues/297)) ([76b978a](https://github.com/bubkoo/html-to-image/commit/76b978a943ee11ad78ef09f9b3363377baebcbb3)) * 🐛 font format could be without qoutation ([#217](https://github.com/bubkoo/html-to-image/issues/217)) ([2a96149](https://github.com/bubkoo/html-to-image/commit/2a9614966f636636be133d3e16d8fe93cf26db0d)) * 🐛 set selected attribute on option to draw it ([#280](https://github.com/bubkoo/html-to-image/issues/280)) ([caf97c8](https://github.com/bubkoo/html-to-image/commit/caf97c80a3b6ef6f7205d12ab59ef42c5ab2f071)) * 🐛 text breaks on the last word ([#270](https://github.com/bubkoo/html-to-image/issues/270)) ([062c98a](https://github.com/bubkoo/html-to-image/commit/062c98ab3491fb731d660780b1a0408e1f53549a)) * test specs ([c7a664e](https://github.com/bubkoo/html-to-image/commit/c7a664e8148bfa813391e124e33ba44c60e1cdae)) ### Features * ✨ add 'fetchRequestInit' option ([#210](https://github.com/bubkoo/html-to-image/issues/210)) ([c51da3a](https://github.com/bubkoo/html-to-image/commit/c51da3a5cc7421c530ffb7cbaa7b5009c677c2d8)) * ✨ added includeQueryParams flag ([#260](https://github.com/bubkoo/html-to-image/issues/260)) ([259d71e](https://github.com/bubkoo/html-to-image/commit/259d71e431445ba0c32bc081d9164fa094b4da32)) # [1.9.0](https://github.com/bubkoo/html-to-image/compare/v1.8.5...v1.9.0) (2021-10-09) ### Bug Fixes * Large Dom sizes failing to be drawn correctly into canvas when exporting to PNG ([#197](https://github.com/bubkoo/html-to-image/issues/197)) ([1ee2e7f](https://github.com/bubkoo/html-to-image/commit/1ee2e7f366ccbaf247caefdcf479f52a2abd22bb)) ### Features * ✨ add svg image with href support ([#198](https://github.com/bubkoo/html-to-image/issues/198)) ([cb6f916](https://github.com/bubkoo/html-to-image/commit/cb6f91692fd0ff06852bf83751e0606df841f429)) ## [1.8.5](https://github.com/bubkoo/html-to-image/compare/v1.8.4...v1.8.5) (2021-09-15) ### Bug Fixes * 🐛 config changelog ([297b17f](https://github.com/bubkoo/html-to-image/commit/297b17f6e213c2278e7655dec3fd2444a3e705bf)) ================================================ FILE: CODE_OF_CONDUCT.md ================================================ # Contributor Covenant Code of Conduct ## Our Pledge We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. ## Our Standards Examples of behavior that contributes to a positive environment for our community include: * Demonstrating empathy and kindness toward other people * Being respectful of differing opinions, viewpoints, and experiences * Giving and gracefully accepting constructive feedback * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience * Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: * The use of sexualized language or imagery, and sexual attention or advances of any kind * Trolling, insulting or derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or email address, without their explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. ## Scope This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at bubkoo.wy@gmail.com. All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the reporter of any incident. ## Enforcement Guidelines Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: ### 1. Correction **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. ### 2. Warning **Community Impact**: A violation through a single incident or series of actions. **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. ### 3. Temporary Ban **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within the community. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. ================================================ FILE: CONTRIBUTING.md ================================================ # Contribution Guide If you have any comment or advice, please report your [issue](https://github.com/bubkoo/html-to-image/issues), or make any change as you wish and submit a [PR](https://github.com/bubkoo/html-to-image/pulls). ## Reporting New Issues - Please specify what kind of issue it is. - Before you report an issue, please search for related issues. Make sure you are not going to open a duplicate issue. - Explain your purpose clearly in labels, title, or content. We will confirm the purpose of the issue, replace more accurate labels for it, identify related milestone, and assign developers working on it. ## Submitting Code ### Pull Request Guide 1. [Fork][fork] and clone the repository 2. Configure and install the dependencies `pnpm` 3. Make sure the tests pass on your machine `pnpm test`, note: these tests also run the TypeScript compiler (`tsc`) to check for type errors, so there's no need to run these commands separately. 4. Create a new branch `git checkout -b my-branch-name` for development. The name of branch should be semantic, avoiding words like 'update' or 'tmp'. We suggest to use `'feature/xxx'`, if the modification is about to implement a new feature. 5. Run the test `pnpm test` after you finish your modification. Add new test cases or change old ones if you feel necessary. 6. Push to your fork and [submit a pull request][pr] 7. Pat your self on the back and wait for your pull request to be reviewed and merged. No one can guarantee how much will be remembered about certain PR after some time. To make sure we can easily recap what happened previously, please provide the following information in your PR. 1. Need: What function you want to achieve (Generally, please point out which issue is related). 2. Updating Reason: Different with issue. Briefly describe your reason and logic about why you need to make such modification. 3. Related Testing: Briefly describe what part of testing is relevant to your modification. 4. User Tips: Notice for html-to-image users. You can skip this part, if the PR is not about update in API or potential compatibility problem. ### Style Guide tslint can help to identify styling issues that may exist in your code. Your code is required to pass the test from tslint. Run the test locally by `$ pnpm lint`. ### Commit Message Format You are encouraged to use [angular commit-message-format](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format) to write commit message. In this way, we could have a more trackable history and an automatically generated changelog. ```xml ():