modern-canvas 0.4.47 → 0.4.49

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
@@ -9164,7 +9164,7 @@ class BaseElement2DOutline extends BaseElement2DFill {
9164
9164
  draw() {
9165
9165
  const ctx = this.parent.context;
9166
9166
  const { textureTransform, disableWrapMode } = this._getDrawOptions();
9167
- ctx.lineWidth = this.width;
9167
+ ctx.lineWidth = this.width || 1;
9168
9168
  ctx.textureTransform = textureTransform;
9169
9169
  ctx.strokeStyle = this._texture ?? this.color;
9170
9170
  ctx.stroke({ disableWrapMode });
@@ -9264,7 +9264,7 @@ class BaseElement2DShape extends CoreObject {
9264
9264
  super._updateProperty(key, value, oldValue, declaration);
9265
9265
  switch (key) {
9266
9266
  case "svg":
9267
- case "data":
9267
+ case "paths":
9268
9268
  case "viewBox":
9269
9269
  this._updatePath2DSet();
9270
9270
  this.parent.requestRedraw();
@@ -9279,7 +9279,7 @@ class BaseElement2DShape extends CoreObject {
9279
9279
  viewBox = this._path2DSet.viewBox ?? this.viewBox;
9280
9280
  } else {
9281
9281
  viewBox = this.viewBox;
9282
- this.data?.forEach((path, i) => {
9282
+ this.paths?.forEach((path, i) => {
9283
9283
  const { data, ...style } = path;
9284
9284
  const path2D = new Path2D();
9285
9285
  path2D.style = style;
@@ -9327,7 +9327,7 @@ __decorateClass$p([
9327
9327
  ], BaseElement2DShape.prototype, "viewBox");
9328
9328
  __decorateClass$p([
9329
9329
  property({ default: () => [] })
9330
- ], BaseElement2DShape.prototype, "data");
9330
+ ], BaseElement2DShape.prototype, "paths");
9331
9331
 
9332
9332
  class BaseElement2DStyle extends Resource {
9333
9333
  constructor(properties) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "modern-canvas",
3
3
  "type": "module",
4
- "version": "0.4.47",
4
+ "version": "0.4.49",
5
5
  "packageManager": "pnpm@9.15.1",
6
6
  "description": "A JavaScript WebGL rendering engine.",
7
7
  "author": "wxm",
@@ -71,18 +71,18 @@
71
71
  "earcut": "^3.0.1",
72
72
  "modern-font": "^0.4.1",
73
73
  "modern-idoc": "^0.6.9",
74
- "modern-path2d": "^1.3.0",
74
+ "modern-path2d": "^1.3.2",
75
75
  "modern-text": "^1.4.2",
76
76
  "yoga-layout": "^3.2.1"
77
77
  },
78
78
  "devDependencies": {
79
79
  "@antfu/eslint-config": "^4.13.2",
80
80
  "@types/earcut": "^3.0.0",
81
- "@types/node": "^22.15.21",
81
+ "@types/node": "^22.15.23",
82
82
  "bumpp": "^10.1.1",
83
83
  "conventional-changelog-cli": "^5.0.0",
84
84
  "eslint": "^9.27.0",
85
- "lint-staged": "^16.0.0",
85
+ "lint-staged": "^16.1.0",
86
86
  "lottie-web": "^5.13.0",
87
87
  "modern-gif": "^2.0.4",
88
88
  "simple-git-hooks": "^2.13.0",