modern-canvas 0.24.0 → 0.24.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.js CHANGED
@@ -6656,10 +6656,10 @@ var Si = class extends T {
6656
6656
  return super.setProperties(e);
6657
6657
  }
6658
6658
  toJSON() {
6659
- return m(Object.values(this._properties)) ?? [];
6659
+ return m(Object.values(this._properties).filter(Boolean)) ?? [];
6660
6660
  }
6661
6661
  isValid() {
6662
- return Object.keys(this._properties).length > 0;
6662
+ return Object.values(this._properties).some(Boolean);
6663
6663
  }
6664
6664
  }, Ci = class extends T {
6665
6665
  _parent;
@@ -14,7 +14,7 @@ export declare class Element2DComments extends CoreObject {
14
14
  getPropertyDeclaration(key: string): PropertyDeclaration | undefined;
15
15
  /** 接受 CommentThread[](按 thread.id 归键)或已归键的对象。 */
16
16
  setProperties(value?: CommentThread[] | Record<string, CommentThread>): this;
17
- /** 序列化为 idoc 规范的线程数组。 */
17
+ /** 序列化为 idoc 规范的线程数组(过滤已删除留下的空位)。 */
18
18
  toJSON(): NormalizedCommentThread[];
19
19
  isValid(): boolean;
20
20
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "modern-canvas",
3
3
  "type": "module",
4
- "version": "0.24.0",
4
+ "version": "0.24.1",
5
5
  "packageManager": "pnpm@10.19.0",
6
6
  "description": "A JavaScript WebGL rendering engine. only the ESM.",
7
7
  "author": "wxm",