@thednp/dommatrix 3.0.5 → 3.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/README.md +8 -7
- package/package.json +2 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [3.0.6] - 2026-08-04
|
|
9
|
+
- The `README.md` now documents installing from JSR (`jsr add @thednp/dommatrix`).
|
|
10
|
+
|
|
11
|
+
## [3.0.5] - 2026-08-04
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- JSDoc coverage for every public class member (the `m11`–`m44` and `a`–`f` properties plus all static helpers), so the generated documentation is complete.
|
|
16
|
+
- A `deno.json` for JSR publishing (`@thednp/dommatrix@3.0.5`, `exports: "./src/index.ts"`) with Deno tasks mirroring the `package.json` scripts (`test`, `test-ui`, `clean-coverage`, `lint`, `check`, `format`, `fix`, `build`, `copy-docs`), the vitest/playwright dev dependencies declared via `npm:` specifiers in `imports`, and a `publish.include` list.
|
|
17
|
+
- The GitHub Actions publish workflow now also publishes to JSR (`deno publish`).
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Migrated the build from Vite + `vite-plugin-dts` to [tsdown](https://tsdown.dev) (rolldown-based). The `dist/` output files are unchanged (`dommatrix.mjs`, `dommatrix.cjs`, `dommatrix.js` UMD with the `CSSMatrix` global, plus sourcemaps), so `exports`, `main`, `module` and the `docs/` copy script keep working as-is.
|
|
23
|
+
- The bundled `dist/dommatrix.d.ts` now contains the full type declarations (the Vite build emitted an empty `export { }` stub).
|
|
24
|
+
- The helper types (`Matrix`, `Matrix3d`, `JSONMatrix`, `PointTuple`, `CSSMatrixInput`) are now exported from the package root, so `import type { Matrix } from "@thednp/dommatrix"` works.
|
|
25
|
+
- `src/types.ts` now uses a type-only import (`import type CSSMatrix from "."`) to satisfy `deno lint`'s `verbatim-module-syntax` rule when `deno.json` is present.
|
|
26
|
+
- Added `"type": "module"` to `package.json`, eliminating the Node `MODULE_TYPELESS_PACKAGE_JSON` ESM-reparse warning during builds. The `exports` map still routes `require` to the `.cjs` build, so CommonJS consumers are unaffected.
|
|
27
|
+
- Renamed `tsdown.config.ts` to `tsdown.config.mts` and `vitest.config.ts` to `vitest.config.mts`, explicitly marking both as ESM.
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- `transformPoint()` no longer references the `DOMPoint` global unconditionally — calling it in Node.js previously threw a `ReferenceError`. It now falls back to a plain `{ x, y, z, w }` tuple when `DOMPoint` is unavailable.
|
|
32
|
+
- Initializing a matrix from a JSON object (`new CSSMatrix({...})`, `CSSMatrix.fromMatrix()`, `CSSMatrix.isCompatibleObject()`) no longer throws a `ReferenceError` in Node.js, where the `DOMMatrix` global does not exist.
|
|
33
|
+
|
|
34
|
+
### Docs
|
|
35
|
+
|
|
36
|
+
- Added `AGENTS.md` with guidance for AI agents working on this repository.
|
|
37
|
+
- Added this `CHANGELOG.md`.
|
|
38
|
+
- Added a "CSSMatrix vs native DOMMatrix" comparison section to the `README.md`.
|
|
39
|
+
|
|
40
|
+
[3.0.5]: https://github.com/thednp/dommatrix/releases/tag/3.0.5
|
package/README.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://coveralls.io/github/thednp/dommatrix)
|
|
4
4
|
[](https://www.npmjs.com/package/@thednp/dommatrix)
|
|
5
|
+
[](https://jsr.io/@thednp/dommatrix)
|
|
5
6
|
[](http://npm-stat.com/charts.html?@thednp/dommatrix)
|
|
6
7
|
[](https://github.com/thednp/dommatrix/actions/workflows/ci.yml)
|
|
7
8
|
[](https://www.jsdelivr.com/package/npm/@thednp/dommatrix)
|
|
@@ -17,8 +18,8 @@ A TypeScript sourced [DOMMatrix](https://developer.mozilla.org/en-US/docs/Web/AP
|
|
|
17
18
|
- [API Reference](#api-reference)
|
|
18
19
|
- [CSSMatrix vs native DOMMatrix](#cssmatrix-vs-native-dommatrix)
|
|
19
20
|
- [Alternatives](#alternatives)
|
|
20
|
-
- [Thanks](#thanks)
|
|
21
21
|
- [History](#history)
|
|
22
|
+
- [Thanks](#thanks)
|
|
22
23
|
- [License](#license)
|
|
23
24
|
|
|
24
25
|
## Features
|
|
@@ -197,12 +198,6 @@ Methods of the `DOMMatrixReadOnly` prototype that are not part of this shim: `fl
|
|
|
197
198
|
|
|
198
199
|
DOMMatrix shim is meant to be a light pocket tool for many things like [svg-path-commander](http://thednp.github.io/svg-path-commander). For a complete polyfill that fills in the missing `DOMMatrixReadOnly` methods (`inverse()`, `flipX()`, `flipY()`, ...), you might want to also consider [geometry-interfaces](https://github.com/trusktr/geometry-interfaces) and [geometry-polyfill](https://github.com/jarek-foksa/geometry-polyfill).
|
|
199
200
|
|
|
200
|
-
## Thanks
|
|
201
|
-
|
|
202
|
-
- Joe Pea for his [geometry-interfaces](https://github.com/trusktr/geometry-interfaces)
|
|
203
|
-
- Jarek Foksa for his [geometry-polyfill](https://github.com/jarek-foksa/geometry-polyfill)
|
|
204
|
-
- Arian Stolwijk for his [CSSMatrix](https://github.com/arian/CSSMatrix/)
|
|
205
|
-
|
|
206
201
|
## History
|
|
207
202
|
|
|
208
203
|
`@thednp/dommatrix` started as a fork of the [original CSSMatrix](https://github.com/arian/CSSMatrix/). In contrast with the original source there have been a series of changes to the prototype for consistency, performance as well as requirements to better accommodate the **DOMMatrix** interface:
|
|
@@ -234,6 +229,12 @@ DOMMatrix shim is meant to be a light pocket tool for many things like [svg-path
|
|
|
234
229
|
- *not supported* `flipX()` or `flipY()` instance methods of the *DOMMatrixReadOnly* prototype are not supported;
|
|
235
230
|
- *not supported* `scaleNonUniformSelf()` or `rotate3d()` with `{x, y, z}` transform origin parameters are not implemented.
|
|
236
231
|
|
|
232
|
+
## Thanks
|
|
233
|
+
|
|
234
|
+
- Joe Pea for his [geometry-interfaces](https://github.com/trusktr/geometry-interfaces)
|
|
235
|
+
- Jarek Foksa for his [geometry-polyfill](https://github.com/jarek-foksa/geometry-polyfill)
|
|
236
|
+
- Arian Stolwijk for his [CSSMatrix](https://github.com/arian/CSSMatrix/)
|
|
237
|
+
|
|
237
238
|
## License
|
|
238
239
|
|
|
239
240
|
DOMMatrix shim is [MIT Licensed](https://github.com/thednp/DOMMatrix/blob/master/LICENSE).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thednp/dommatrix",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.6",
|
|
4
4
|
"description": "TypeScript shim for DOMMatrix",
|
|
5
5
|
"homepage": "https://thednp.github.io/dommatrix/",
|
|
6
6
|
"type": "module",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"README.md",
|
|
24
24
|
"AGENTS.md",
|
|
25
25
|
"CLAUDE.md",
|
|
26
|
+
"CHANGELOG.md",
|
|
26
27
|
"LICENSE"
|
|
27
28
|
],
|
|
28
29
|
"repository": {
|