dommatrix-96029637b54264de452099dedbad684dc18bbc4e/ 000775 000000 000000 00000000000 14236454046 020524 5 ustar 00root root 000000 000000 dommatrix-96029637b54264de452099dedbad684dc18bbc4e/.eslintrc 000664 000000 000000 00000001552 14236454046 022353 0 ustar 00root root 000000 000000 {
"extends": [
// Extend the airbnb eslint config
"airbnb-base"
],
// "parser": "vue-eslint-parser",
"parserOptions": {
"sourceType": "module"
},
// ESLint will not look in parent folders for eslint configs
"root": false,
// An environment defines global variables that are predefined.
"env": {
"browser": true,
"es6": true,
"node": true
},
// Rule overrides
"rules": {
// Disable no-params-reassign for properties
"no-param-reassign": ["error", { "props": false }],
// Impossible to satisfy ESLint here
"no-use-before-define": ["error", { "classes": false }],
// Allow strict mode (we are not dealing with modules)
"strict": [0],
// Disable alert rule till we have a CE in place
"no-alert": 0,
// Allow extensions on imports
"import/extensions": 0
}
}
dommatrix-96029637b54264de452099dedbad684dc18bbc4e/.github/ 000775 000000 000000 00000000000 14236454046 022064 5 ustar 00root root 000000 000000 dommatrix-96029637b54264de452099dedbad684dc18bbc4e/.github/codeql/ 000775 000000 000000 00000000000 14236454046 023333 5 ustar 00root root 000000 000000 dommatrix-96029637b54264de452099dedbad684dc18bbc4e/.github/codeql/codeql-config.yml 000664 000000 000000 00000000016 14236454046 026565 0 ustar 00root root 000000 000000 paths:
- src dommatrix-96029637b54264de452099dedbad684dc18bbc4e/.github/workflows/ 000775 000000 000000 00000000000 14236454046 024121 5 ustar 00root root 000000 000000 dommatrix-96029637b54264de452099dedbad684dc18bbc4e/.github/workflows/badges.yml 000664 000000 000000 00000001351 14236454046 026071 0 ustar 00root root 000000 000000 name: badges
on:
push:
# update README badge only if the README file changes
# or if the package.json file changes, or this file changes
# IMPORTANT: branches must match
branches:
- master
paths:
- README.md
- package.json
- .github/workflows/badges.yml
jobs:
badges:
runs-on: ubuntu-20.04
steps:
- name: Checkout 🛎
uses: actions/checkout@v3
- name: Update version badges 🏷
run: npx -p dependency-version-badge update-badge cypress esbuild
- name: Commit any changed files 💾
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: master
file_pattern: README.md
commit_message: Updated badges
dommatrix-96029637b54264de452099dedbad684dc18bbc4e/.github/workflows/ci.yml 000664 000000 000000 00000001023 14236454046 025233 0 ustar 00root root 000000 000000 name: ci
on: push
jobs:
test:
runs-on: ubuntu-20.04
name: Test on Node v16
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
- uses: bahmutov/npm-install@v1
- run: npm run build
- run: npm run test
- name: Upload coverage report on Node v16 to coveralls.io...
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
dommatrix-96029637b54264de452099dedbad684dc18bbc4e/.github/workflows/codeql.yml 000664 000000 000000 00000005254 14236454046 026121 0 ustar 00root root 000000 000000 # For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
config-file: ./.github/codeql/codeql-config.yml
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
dommatrix-96029637b54264de452099dedbad684dc18bbc4e/.gitignore 000664 000000 000000 00000000202 14236454046 022506 0 ustar 00root root 000000 000000 .npmignore
.nyc_output
node_modules
experiments
coverage
cypress/videos
cypress/screenshots
cypress/coverage
cypress/instrumented
dommatrix-96029637b54264de452099dedbad684dc18bbc4e/.lgtm.yml 000664 000000 000000 00000000156 14236454046 022272 0 ustar 00root root 000000 000000
extraction:
javascript:
index:
exclude:
- node_modules
- coverage
- docs
dommatrix-96029637b54264de452099dedbad684dc18bbc4e/.npmignore 000664 000000 000000 00000000232 14236454046 022520 0 ustar 00root root 000000 000000 .gitignore
.github
.nyc_output
node_modules
docs
experiments
coverage
cypress/videos
cypress/screenshots
cypress/coverage
cypress/instrumented
dommatrix-96029637b54264de452099dedbad684dc18bbc4e/LICENSE 000664 000000 000000 00000002047 14236454046 021534 0 ustar 00root root 000000 000000 MIT License
Copyright (c) 2020 thednp
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.
dommatrix-96029637b54264de452099dedbad684dc18bbc4e/README.md 000664 000000 000000 00000015473 14236454046 022015 0 ustar 00root root 000000 000000 # DOMMatrix
[](https://coveralls.io/github/thednp/dommatrix)


[](https://github.com/thednp/dommatrix/actions/workflows/ci.yml)
An ES6+ sourced [DOMMatrix](https://developer.mozilla.org/en-US/docs/Web/API/DOMMatrix) shim for **Node.js** apps and legacy browsers. Since this source is modernized, legacy browsers might need some additional shims.
[](https://www.npmjs.com/package/dommatrix)
[](http://npm-stat.com/charts.html?dommatrix)
[](https://www.jsdelivr.com/package/npm/dommatrix)
The constructor is close to the **DOMMatrix Interface** in many respects, but tries to keep a sense of simplicity. In that note, we haven't implemented [DOMMatrixReadOnly](https://developer.mozilla.org/en-US/docs/Web/API/DOMMatrixReadOnly) methods like `flipX()` or `inverse()` or aliases for the main methods like `translateSelf` or the old `rotate3d`.
DOMMatrix shim is meant to be a light pocket tool for [many things](http://thednp.github.io/svg-path-commander), for a complete polyfill you might want to also consider more [geometry-interfaces](https://github.com/trusktr/geometry-interfaces)
and [geometry-polyfill](https://github.com/jarek-foksa/geometry-polyfill).
This library implements a full transform string parsing via the static method `.fromString()`, which produce results inline with the DOMMatrix Interface as well as a very [elegant method](https://github.com/jsidea/jsidea/blob/2b4486c131d5cca2334293936fa13454b34fcdef/ts/jsidea/geom/Matrix3D.ts#L788) to determine `is2D`. Before moving to the [technical details](#More-info) of this script, have a look at the demo.
# Demo
See DOMMatrix shim in action, [click me](https://thednp.github.io/dommatrix) and start transforming.
# Installation
```js
npm install dommatrix
```
Download the latest version and copy the `dist/dommatrix.min.js` file to your project assets folder, then load the file in your front-end:
```html