modern-canvas 0.3.0 → 0.3.1

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.mjs CHANGED
@@ -5924,12 +5924,12 @@ let Node = class extends CoreObject {
5924
5924
  setTree(tree) {
5925
5925
  const oldTree = this._tree;
5926
5926
  if (tree !== oldTree) {
5927
+ if (oldTree) {
5928
+ this.emit("treeExit", oldTree);
5929
+ }
5930
+ this._tree = tree;
5927
5931
  if (tree) {
5928
- this._tree = tree;
5929
5932
  this.emit("treeEnter", tree);
5930
- } else if (oldTree) {
5931
- this.emit("treeExit", oldTree);
5932
- this._tree = tree;
5933
5933
  }
5934
5934
  for (let len = this._children.length, i = 0; i < len; i++) {
5935
5935
  const node = this._children[i];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "modern-canvas",
3
3
  "type": "module",
4
- "version": "0.3.0",
4
+ "version": "0.3.1",
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.0",
73
73
  "modern-idoc": "^0.1.5",
74
- "modern-path2d": "^1.2.6",
75
- "modern-text": "^1.2.2",
74
+ "modern-path2d": "^1.2.7",
75
+ "modern-text": "^1.2.3",
76
76
  "yoga-layout": "^3.2.1"
77
77
  },
78
78
  "devDependencies": {
79
- "@antfu/eslint-config": "^3.12.2",
80
- "@types/earcut": "^2.1.4",
81
- "@types/node": "^22.10.5",
82
- "bumpp": "^9.9.3",
79
+ "@antfu/eslint-config": "^3.14.0",
80
+ "@types/earcut": "^3.0.0",
81
+ "@types/node": "^22.10.7",
82
+ "bumpp": "^9.10.1",
83
83
  "conventional-changelog-cli": "^5.0.0",
84
- "eslint": "^9.17.0",
85
- "lint-staged": "^15.3.0",
84
+ "eslint": "^9.18.0",
85
+ "lint-staged": "^15.4.1",
86
86
  "lottie-web": "^5.12.2",
87
87
  "modern-gif": "^2.0.4",
88
88
  "simple-git-hooks": "^2.11.1",
89
89
  "typescript": "^5.7.3",
90
- "unbuild": "^3.2.0",
91
- "vite": "^6.0.7",
92
- "vitest": "^2.1.8"
90
+ "unbuild": "^3.3.1",
91
+ "vite": "^6.0.8",
92
+ "vitest": "^3.0.2"
93
93
  },
94
94
  "simple-git-hooks": {
95
95
  "pre-commit": "pnpm lint-staged"