modern-canvas 0.4.56 → 0.5.0
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/dist/index.cjs +1 -1
- package/dist/index.js +59 -59
- package/dist/index.mjs +2 -2
- package/package.json +10 -10
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineProperty, property, getDeclarations, parseColor, RawWeakMap as RawWeakMap$1, isGradient, normalizeFill, isNone, normalizeBackground, normalizeForeground, normalizeOutline, normalizeShadow, normalizeShape, getDefaultStyle, normalizeText } from 'modern-idoc';
|
|
2
2
|
import { extend } from 'colord';
|
|
3
3
|
import namesPlugin from 'colord/plugins/names';
|
|
4
|
-
import { Path2D, Path2DSet,
|
|
4
|
+
import { Path2D, Path2DSet, svgToDom, svgToPath2DSet, Matrix3 as Matrix3$1 } from 'modern-path2d';
|
|
5
5
|
import { Text, textDefaultStyle } from 'modern-text';
|
|
6
6
|
import { loadYoga, BoxSizing, PositionType, Edge, Overflow, Gutter, Justify, Wrap, FlexDirection, Display, Direction, Align } from 'yoga-layout/load';
|
|
7
7
|
|
|
@@ -9219,7 +9219,7 @@ class BaseElement2DShape extends CoreObject {
|
|
|
9219
9219
|
_updatePath2DSet() {
|
|
9220
9220
|
let viewBox;
|
|
9221
9221
|
if (this.svg) {
|
|
9222
|
-
const dom =
|
|
9222
|
+
const dom = svgToDom(this.svg);
|
|
9223
9223
|
this._path2DSet = svgToPath2DSet(dom);
|
|
9224
9224
|
viewBox = this._path2DSet.viewBox;
|
|
9225
9225
|
} else {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "modern-canvas",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"packageManager": "pnpm@9.15.1",
|
|
6
6
|
"description": "A JavaScript WebGL rendering engine.",
|
|
7
7
|
"author": "wxm",
|
|
@@ -71,25 +71,25 @@
|
|
|
71
71
|
"earcut": "^3.0.1",
|
|
72
72
|
"modern-font": "^0.4.1",
|
|
73
73
|
"modern-idoc": "^0.6.16",
|
|
74
|
-
"modern-path2d": "^1.
|
|
75
|
-
"modern-text": "^1.
|
|
74
|
+
"modern-path2d": "^1.4.1",
|
|
75
|
+
"modern-text": "^1.5.0",
|
|
76
76
|
"yoga-layout": "^3.2.1"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@antfu/eslint-config": "^4.
|
|
79
|
+
"@antfu/eslint-config": "^4.16.1",
|
|
80
80
|
"@types/earcut": "^3.0.0",
|
|
81
|
-
"@types/node": "^24.0.
|
|
82
|
-
"bumpp": "^10.
|
|
81
|
+
"@types/node": "^24.0.4",
|
|
82
|
+
"bumpp": "^10.2.0",
|
|
83
83
|
"conventional-changelog-cli": "^5.0.0",
|
|
84
|
-
"eslint": "^9.
|
|
85
|
-
"lint-staged": "^16.1.
|
|
84
|
+
"eslint": "^9.29.0",
|
|
85
|
+
"lint-staged": "^16.1.2",
|
|
86
86
|
"lottie-web": "^5.13.0",
|
|
87
87
|
"modern-gif": "^2.0.4",
|
|
88
88
|
"simple-git-hooks": "^2.13.0",
|
|
89
89
|
"typescript": "^5.8.3",
|
|
90
90
|
"unbuild": "^3.5.0",
|
|
91
|
-
"vite": "^
|
|
92
|
-
"vitest": "^3.2.
|
|
91
|
+
"vite": "^7.0.0",
|
|
92
|
+
"vitest": "^3.2.4"
|
|
93
93
|
},
|
|
94
94
|
"simple-git-hooks": {
|
|
95
95
|
"pre-commit": "pnpm lint-staged"
|