@realsee/dnalogel 3.48.0 → 3.48.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.
Files changed (35) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/dist/Sculpt/Objects/Base/index.d.ts +16 -0
  3. package/dist/Sculpt/Objects/Line/index.d.ts +12 -1
  4. package/dist/Sculpt/index.d.ts +5 -2
  5. package/dist/index.cjs.js +32 -32
  6. package/dist/index.js +2038 -1973
  7. package/dist/index.umd.js +31 -31
  8. package/dist/shared-utils/promise/withResolvers.d.ts +10 -0
  9. package/dist/shared-utils/three/Magnifier.d.ts +1 -1
  10. package/dist/shared-utils/three/PointSelector/utils/PointSelectorHelper.d.ts +4 -1
  11. package/libs/Sculpt/Meshes/Line.js +15 -15
  12. package/libs/Sculpt/Objects/Base/index.d.ts +16 -0
  13. package/libs/Sculpt/Objects/Base/index.js +58 -32
  14. package/libs/Sculpt/Objects/Box/index.js +31 -34
  15. package/libs/Sculpt/Objects/Circle/index.js +36 -39
  16. package/libs/Sculpt/Objects/Line/index.d.ts +12 -1
  17. package/libs/Sculpt/Objects/Line/index.js +104 -75
  18. package/libs/Sculpt/Objects/Point/index.js +13 -16
  19. package/libs/Sculpt/Objects/Polygon/index.js +18 -21
  20. package/libs/Sculpt/Objects/Polyline/index.js +27 -30
  21. package/libs/Sculpt/Objects/Prism/index.js +16 -19
  22. package/libs/Sculpt/Objects/Rectangle/index.js +36 -39
  23. package/libs/Sculpt/index.d.ts +5 -2
  24. package/libs/Sculpt/index.js +80 -65
  25. package/libs/base/BasePlugin.js +1 -1
  26. package/libs/index.js +127 -126
  27. package/libs/shared-utils/logger.js +1 -1
  28. package/libs/shared-utils/promise/withResolvers.d.ts +10 -0
  29. package/libs/shared-utils/promise/withResolvers.js +13 -0
  30. package/libs/shared-utils/tag.js +9 -9
  31. package/libs/shared-utils/three/Magnifier.d.ts +1 -1
  32. package/libs/shared-utils/three/Magnifier.js +12 -12
  33. package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.d.ts +4 -1
  34. package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.js +9 -9
  35. package/package.json +1 -1
@@ -1,47 +1,44 @@
1
- var U = Object.defineProperty, k = Object.defineProperties;
2
- var B = Object.getOwnPropertyDescriptors;
1
+ var U = Object.defineProperty, B = Object.defineProperties;
2
+ var I = Object.getOwnPropertyDescriptors;
3
3
  var A = Object.getOwnPropertySymbols;
4
- var I = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
4
+ var _ = Object.prototype.hasOwnProperty, j = Object.prototype.propertyIsEnumerable;
5
5
  var E = (s, t, e) => t in s ? U(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, d = (s, t) => {
6
6
  for (var e in t || (t = {}))
7
- I.call(t, e) && E(s, e, t[e]);
7
+ _.call(t, e) && E(s, e, t[e]);
8
8
  if (A)
9
9
  for (var e of A(t))
10
- _.call(t, e) && E(s, e, t[e]);
10
+ j.call(t, e) && E(s, e, t[e]);
11
11
  return s;
12
- }, u = (s, t) => k(s, B(t));
12
+ }, u = (s, t) => B(s, I(t));
13
13
  var L = (s, t, e) => (E(s, typeof t != "symbol" ? t + "" : t, e), e);
14
14
  var D = (s, t, e) => new Promise((c, p) => {
15
15
  var a = (l) => {
16
16
  try {
17
- g(e.next(l));
17
+ m(e.next(l));
18
18
  } catch (h) {
19
19
  p(h);
20
20
  }
21
- }, m = (l) => {
21
+ }, g = (l) => {
22
22
  try {
23
- g(e.throw(l));
23
+ m(e.throw(l));
24
24
  } catch (h) {
25
25
  p(h);
26
26
  }
27
- }, g = (l) => l.done ? c(l.value) : Promise.resolve(l.value).then(a, m);
28
- g((e = e.apply(s, t)).next());
27
+ }, m = (l) => l.done ? c(l.value) : Promise.resolve(l.value).then(a, g);
28
+ m((e = e.apply(s, t)).next());
29
29
  });
30
- import { hotkeys as j } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
31
- import { BaseObject as q } from "../Base/index.js";
30
+ import { BaseObject as k } from "../Base/index.js";
32
31
  import * as o from "three";
33
32
  import { PolylineWithDotsMesh as M } from "../../Meshes/Polyline.js";
34
- import { RectangleEditor as G } from "./Editor.js";
33
+ import { RectangleEditor as q } from "./Editor.js";
35
34
  import { RectangleWithEdgeMesh as H } from "../../Meshes/RectangleWithEdge.js";
36
35
  const P = new o.Vector3();
37
- class S extends q {
36
+ class Z extends k {
38
37
  constructor(e, c) {
39
38
  super(e, c);
40
39
  L(this, "type", "Rectangle");
41
40
  L(this, "rectangleMesh");
42
- this.config.canEdit && (this.editor = new G(this)), e && (this.rectangleMesh = new H(d(d({}, e.style), e)), this.add(this.rectangleMesh)), j("esc", () => {
43
- this.stopCreating();
44
- });
41
+ this.config.canEdit && (this.editor = new q(this)), e && (this.rectangleMesh = new H(d(d({}, e.style), e)), this.add(this.rectangleMesh));
45
42
  }
46
43
  get data() {
47
44
  return u(d({}, this.baseData), {
@@ -65,23 +62,23 @@ class S extends q {
65
62
  return D(this, null, function* () {
66
63
  this.removeChildren();
67
64
  const c = new H(e);
68
- this.rectangleMesh = c, this.add(this.rectangleMesh), yield J(this.rectangleMesh, this.pointSelector, e);
65
+ this.rectangleMesh = c, this.add(this.rectangleMesh), yield G(this.rectangleMesh, this.pointSelector, e);
69
66
  });
70
67
  }
71
68
  }
72
- function J(s, t, e) {
69
+ function G(s, t, e) {
73
70
  return new Promise((c, p) => {
74
71
  var N, T;
75
72
  const a = s.parent;
76
73
  if (!a)
77
74
  return p(new Error("No container"));
78
- const m = (N = e == null ? void 0 : e.limit) != null ? N : "none", g = (T = e == null ? void 0 : e.drawMethod) != null ? T : "diagonal", l = new M(u(d({}, s.style), { dashed: !0, lengthEnable: !0 })), h = new M(u(d({}, s.style), { dashed: !0, lengthEnable: !1 })), y = new M(u(d({}, s.style), { dashed: !1, lengthEnable: !1 }));
75
+ const g = (N = e == null ? void 0 : e.limit) != null ? N : "none", m = (T = e == null ? void 0 : e.drawMethod) != null ? T : "diagonal", l = new M(u(d({}, s.style), { dashed: !0, lengthEnable: !0 })), h = new M(u(d({}, s.style), { dashed: !0, lengthEnable: !1 })), y = new M(u(d({}, s.style), { dashed: !1, lengthEnable: !1 }));
79
76
  a.add(l, y, h), t.enable();
80
77
  const n = [];
81
78
  let i = new o.Vector3(), v = new o.Vector3();
82
- const f = new o.Plane(), C = () => {
83
- n.push(i.clone()), n.length === 1 ? (m === "xoz" && f.setFromNormalAndCoplanarPoint(new o.Vector3(0, 1, 0), n[0]), m === "none" && f.setFromNormalAndCoplanarPoint(v, n[0])) : n.length === 2 ? m === "y" ? (V(), c()) : y.setPoints([n[0], n[1]]) : n.length === 3 && (V(), c());
84
- }, x = (r) => {
79
+ const w = new o.Plane(), x = () => {
80
+ n.push(i.clone()), n.length === 1 ? (g === "xoz" && w.setFromNormalAndCoplanarPoint(new o.Vector3(0, 1, 0), n[0]), g === "none" && w.setFromNormalAndCoplanarPoint(v, n[0])) : n.length === 2 ? g === "y" ? (V(), c()) : y.setPoints([n[0], n[1]]) : n.length === 3 && (V(), c());
81
+ }, C = (r) => {
85
82
  var W;
86
83
  if (!(r != null && r.raycaster))
87
84
  return;
@@ -90,36 +87,36 @@ function J(s, t, e) {
90
87
  i = r.point.clone(), v = r.face.normal;
91
88
  return;
92
89
  }
93
- if (n.length === 1 && m === "y") {
94
- const w = new o.Line3(new o.Vector3(0, 1, 0).add(n[0]), new o.Vector3(0, -1, 0).add(n[0])).closestPointToPoint(r.point, !1, new o.Vector3());
95
- s.setPoints([n[0], w, r.point]);
90
+ if (n.length === 1 && g === "y") {
91
+ const f = new o.Line3(new o.Vector3(0, 1, 0).add(n[0]), new o.Vector3(0, -1, 0).add(n[0])).closestPointToPoint(r.point, !1, new o.Vector3());
92
+ s.setPoints([n[0], f, r.point]);
96
93
  return;
97
94
  }
98
95
  if (n.length === 1) {
99
- f ? (i = r.raycaster.ray.intersectPlane(f, P), h.setPoints([i, r.point])) : i = r.point.clone(), l.setPoints([O, i]);
96
+ w ? (i = r.raycaster.ray.intersectPlane(w, P), h.setPoints([i, r.point])) : i = r.point.clone(), l.setPoints([O, i]);
100
97
  return;
101
98
  }
102
99
  if (n.length === 2) {
103
100
  a.remove(l);
104
- const z = r.raycaster.ray.intersectPlane(f, P);
105
- if (g === "diagonal") {
106
- const w = n[0].distanceTo(n[1]) / 2, b = new o.Vector3().lerpVectors(n[0], n[1], 0.5), F = new o.Vector3().subVectors(z, b).normalize();
107
- i = new o.Vector3().addVectors(b, F.multiplyScalar(w)), s.setPoints([n[0], i, n[1]]);
108
- } else if (g === "vertex") {
109
- const w = P.crossVectors(n[0].clone().sub(n[1]), f.normal).normalize();
110
- i = new o.Line3(n[1].clone().add(w), n[1].clone().sub(w)).closestPointToPoint(r.point, !1, P), s.setPoints([n[0], n[1], i]);
101
+ const z = r.raycaster.ray.intersectPlane(w, P);
102
+ if (m === "diagonal") {
103
+ const f = n[0].distanceTo(n[1]) / 2, b = new o.Vector3().lerpVectors(n[0], n[1], 0.5), F = new o.Vector3().subVectors(z, b).normalize();
104
+ i = new o.Vector3().addVectors(b, F.multiplyScalar(f)), s.setPoints([n[0], i, n[1]]);
105
+ } else if (m === "vertex") {
106
+ const f = P.crossVectors(n[0].clone().sub(n[1]), w.normal).normalize();
107
+ i = new o.Line3(n[1].clone().add(f), n[1].clone().sub(f)).closestPointToPoint(r.point, !1, P), s.setPoints([n[0], n[1], i]);
111
108
  }
112
109
  return;
113
110
  }
114
111
  }, V = () => {
115
- t.off("select", C), t.off("intersectionUpdate", x), t.off("disable", R), t.disable(), a == null || a.remove(l, y, h);
112
+ t.off("select", x), t.off("intersectionUpdate", C), t.off("disable", R), t.disable(), a == null || a.remove(l, y, h);
116
113
  }, R = () => {
117
114
  V(), a == null || a.remove(s), p(new Error("Cancelled"));
118
115
  };
119
- t.on("select", C), t.on("intersectionUpdate", x), t.on("disable", R);
116
+ t.on("select", x), t.on("intersectionUpdate", C), t.on("disable", R);
120
117
  });
121
118
  }
122
119
  export {
123
- S as Rectangle,
124
- J as createRectangle
120
+ Z as Rectangle,
121
+ G as createRectangle
125
122
  };
@@ -109,6 +109,7 @@ export declare class Sculpt extends Subscribe<Event> {
109
109
  get items(): BuiltInItem[];
110
110
  private five;
111
111
  private theme;
112
+ private creatingItem;
112
113
  constructor(five: Five, theme?: Theme);
113
114
  /**
114
115
  * @description: 加载数据 展示
@@ -158,14 +159,16 @@ export declare class Sculpt extends Subscribe<Event> {
158
159
  * @description: 开始绘制 Box
159
160
  */
160
161
  createBox(params?: Parameters<Box['create']>[0]): Promise<Box>;
162
+ canUndo(): false | void;
163
+ canRedo(): false | void;
161
164
  /**
162
165
  * @description: 撤销
163
166
  */
164
- undo(): void;
167
+ undo: () => void;
165
168
  /**
166
169
  * @description: 重做
167
170
  */
168
- redo(): void;
171
+ redo: () => void;
169
172
  /**
170
173
  * @description: 清空数据
171
174
  */
@@ -1,35 +1,35 @@
1
- var _ = Object.defineProperty, x = Object.defineProperties;
2
- var E = Object.getOwnPropertyDescriptors;
3
- var f = Object.getOwnPropertySymbols;
4
- var L = Object.prototype.hasOwnProperty, O = Object.prototype.propertyIsEnumerable;
5
- var d = (m, i, e) => i in m ? _(m, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[i] = e, r = (m, i) => {
1
+ var U = Object.defineProperty, _ = Object.defineProperties;
2
+ var x = Object.getOwnPropertyDescriptors;
3
+ var g = Object.getOwnPropertySymbols;
4
+ var E = Object.prototype.hasOwnProperty, L = Object.prototype.propertyIsEnumerable;
5
+ var f = (m, i, e) => i in m ? U(m, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[i] = e, r = (m, i) => {
6
6
  for (var e in i || (i = {}))
7
- L.call(i, e) && d(m, e, i[e]);
8
- if (f)
9
- for (var e of f(i))
10
- O.call(i, e) && d(m, e, i[e]);
7
+ E.call(i, e) && f(m, e, i[e]);
8
+ if (g)
9
+ for (var e of g(i))
10
+ L.call(i, e) && f(m, e, i[e]);
11
11
  return m;
12
- }, w = (m, i) => x(m, E(i));
13
- var a = (m, i, e) => (d(m, typeof i != "symbol" ? i + "" : i, e), e);
14
- var c = (m, i, e) => new Promise((t, o) => {
12
+ }, I = (m, i) => _(m, x(i));
13
+ var h = (m, i, e) => (f(m, typeof i != "symbol" ? i + "" : i, e), e);
14
+ var c = (m, i, e) => new Promise((t, n) => {
15
15
  var l = (u) => {
16
16
  try {
17
- n(e.next(u));
17
+ o(e.next(u));
18
18
  } catch (y) {
19
- o(y);
19
+ n(y);
20
20
  }
21
21
  }, s = (u) => {
22
22
  try {
23
- n(e.throw(u));
23
+ o(e.throw(u));
24
24
  } catch (y) {
25
- o(y);
25
+ n(y);
26
26
  }
27
- }, n = (u) => u.done ? t(u.value) : Promise.resolve(u.value).then(l, s);
28
- n((e = e.apply(m, i)).next());
27
+ }, o = (u) => u.done ? t(u.value) : Promise.resolve(u.value).then(l, s);
28
+ o((e = e.apply(m, i)).next());
29
29
  });
30
- import { globalModules as R } from "./utils/Modules/Global.js";
30
+ import { globalModules as O } from "./utils/Modules/Global.js";
31
31
  import { Subscribe as S } from "../shared-utils/Subscribe.js";
32
- import { IObject3D as U } from "../shared-utils/three/IObject3D.js";
32
+ import { IObject3D as z } from "../shared-utils/three/IObject3D.js";
33
33
  import "three";
34
34
  import "hammerjs";
35
35
  import "three/examples/jsm/renderers/CSS3DRenderer";
@@ -37,30 +37,46 @@ import "@realsee/five/line";
37
37
  import "../shared-utils/tag.js";
38
38
  import "../shared-utils/three/THREESphere.js";
39
39
  import "animejs";
40
- import { notNil as H } from "../shared-utils/isNil.js";
40
+ import { notNil as k } from "../shared-utils/isNil.js";
41
41
  import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
42
- import { recurveFindObject as M } from "../shared-utils/three/recurveFindObject.js";
43
- import { Polyline as g } from "./Objects/Polyline/index.js";
42
+ import { recurveFindObject as H } from "../shared-utils/three/recurveFindObject.js";
43
+ import { Polyline as w } from "./Objects/Polyline/index.js";
44
44
  import { Point as P } from "./Objects/Point/index.js";
45
- import { Polygon as I } from "./Objects/Polygon/index.js";
46
- import { Prism as b } from "./Objects/Prism/index.js";
47
- import { Rectangle as v } from "./Objects/Rectangle/index.js";
48
- import { Circle as C } from "./Objects/Circle/index.js";
45
+ import { Polygon as b } from "./Objects/Polygon/index.js";
46
+ import { Prism as v } from "./Objects/Prism/index.js";
47
+ import { Rectangle as C } from "./Objects/Rectangle/index.js";
48
+ import { Circle as R } from "./Objects/Circle/index.js";
49
49
  import { Cylinder as D } from "./Objects/Cylinder/index.js";
50
50
  import { Box as j } from "./Objects/Box/index.js";
51
- import { forReverseEach as k } from "../shared-utils/forReverseEach.js";
51
+ import { forReverseEach as M } from "../shared-utils/forReverseEach.js";
52
52
  import { Line as B } from "./Objects/Line/index.js";
53
- const p = class extends S {
53
+ import { hotkeys as p } from "../vendor/hotkeys-js/dist/hotkeys.esm.js";
54
+ const a = class extends S {
54
55
  constructor(e, t) {
55
56
  super();
56
- a(this, "group");
57
- a(this, "five");
58
- a(this, "theme");
59
- this.five = e, this.theme = t, this.group = new U(), this.group.name = "Sculpt", e.scene.add(this.group), p.modules.init(e), p.modules.fiveDomEvents.addEventListener(this.group, "click", ({ intersects: o }) => {
57
+ h(this, "group");
58
+ h(this, "five");
59
+ h(this, "theme");
60
+ h(this, "creatingItem", null);
61
+ /**
62
+ * @description: 撤销
63
+ */
64
+ h(this, "undo", () => {
65
+ var e;
66
+ (e = this.creatingItem) == null || e.undo(), this.five.needsRender = !0;
67
+ });
68
+ /**
69
+ * @description: 重做
70
+ */
71
+ h(this, "redo", () => {
72
+ var e;
73
+ (e = this.creatingItem) == null || e.redo(), this.five.needsRender = !0;
74
+ });
75
+ this.five = e, this.theme = t, this.group = new z(), this.group.name = "Sculpt", e.scene.add(this.group), a.modules.init(e), p.unbind("ctrl+z", this.undo), p.unbind("ctrl+shift+z", this.redo), p("ctrl+z", this.undo), p("ctrl+shift+z", this.redo), a.modules.fiveDomEvents.addEventListener(this.group, "click", ({ intersects: n }) => {
60
76
  var s;
61
- const l = M((s = o == null ? void 0 : o[0]) == null ? void 0 : s.object, (n) => n.isSculptObject);
77
+ const l = H((s = n == null ? void 0 : n[0]) == null ? void 0 : s.object, (o) => o.isSculptObject);
62
78
  return l ? this.emit("click", l) : !1;
63
- }), window.__SCLUPT_DEBUG__ = this, window.__SCLUPT_MODULES_DEBUG__ = p.modules;
79
+ }), window.__SCLUPT_DEBUG__ = this, window.__SCLUPT_MODULES_DEBUG__ = a.modules;
64
80
  }
65
81
  get data() {
66
82
  return {
@@ -70,7 +86,7 @@ const p = class extends S {
70
86
  } catch (t) {
71
87
  return console.error(t), null;
72
88
  }
73
- }).filter(H)
89
+ }).filter(k)
74
90
  };
75
91
  }
76
92
  get items() {
@@ -82,14 +98,14 @@ const p = class extends S {
82
98
  load(e, t) {
83
99
  var l;
84
100
  this.clear();
85
- const o = (l = e == null ? void 0 : e.items) == null ? void 0 : l.map((s) => {
101
+ const n = (l = e == null ? void 0 : e.items) == null ? void 0 : l.map((s) => {
86
102
  var u;
87
- const n = w(r({}, s), {
103
+ const o = I(r({}, s), {
88
104
  style: r(r({}, (u = this.theme) == null ? void 0 : u[s.type.toLowerCase()]), s.style)
89
105
  });
90
- return s.type === "Point" ? new P(n, t) : s.type === "line" ? new B(n, t) : s.type === "Polyline" ? new g(n, t) : s.type === "Polygon" ? new I(n, t) : s.type === "Prism" ? new b(n, t) : s.type === "Rectangle" ? new v(n, t) : s.type === "Circle" ? new C(n, t) : s.type === "Cylinder" ? new D(n, t) : s.type === "Box" ? new j(n, t) : null;
106
+ return s.type === "Point" ? new P(o, t) : s.type === "line" ? new B(o, t) : s.type === "Polyline" ? new w(o, t) : s.type === "Polygon" ? new b(o, t) : s.type === "Prism" ? new v(o, t) : s.type === "Rectangle" ? new C(o, t) : s.type === "Circle" ? new R(o, t) : s.type === "Cylinder" ? new D(o, t) : s.type === "Box" ? new j(o, t) : null;
91
107
  });
92
- this.group.add(...o), this.five.needsRender = !0;
108
+ this.group.add(...n), this.five.needsRender = !0;
93
109
  }
94
110
  /**
95
111
  * @description: 获取物体实例
@@ -103,8 +119,8 @@ const p = class extends S {
103
119
  putObject(e) {
104
120
  var l;
105
121
  this.group.add(e);
106
- const t = p.modules.object3DHelper, o = t.addObject3DHelper(e);
107
- return (l = o == null ? void 0 : o.moveController) == null || l.moveByMouse(), t;
122
+ const t = a.modules.object3DHelper, n = t.addObject3DHelper(e);
123
+ return (l = n == null ? void 0 : n.moveController) == null || l.moveByMouse(), t;
108
124
  }
109
125
  /**
110
126
  * @description: 开始绘制点
@@ -130,7 +146,7 @@ const p = class extends S {
130
146
  createPolyline(e) {
131
147
  return c(this, null, function* () {
132
148
  var t;
133
- return this.createItem(g, r(r({}, (t = this.theme) == null ? void 0 : t.polyline), e));
149
+ return this.createItem(w, r(r({}, (t = this.theme) == null ? void 0 : t.polyline), e));
134
150
  });
135
151
  }
136
152
  /**
@@ -139,7 +155,7 @@ const p = class extends S {
139
155
  createPolygon(e) {
140
156
  return c(this, null, function* () {
141
157
  var t;
142
- return this.createItem(I, r(r({}, (t = this.theme) == null ? void 0 : t.polygon), e));
158
+ return this.createItem(b, r(r({}, (t = this.theme) == null ? void 0 : t.polygon), e));
143
159
  });
144
160
  }
145
161
  /**
@@ -148,7 +164,7 @@ const p = class extends S {
148
164
  createPrism(e) {
149
165
  return c(this, null, function* () {
150
166
  var t;
151
- return this.createItem(b, r(r({}, (t = this.theme) == null ? void 0 : t.prism), e));
167
+ return this.createItem(v, r(r({}, (t = this.theme) == null ? void 0 : t.prism), e));
152
168
  });
153
169
  }
154
170
  /**
@@ -157,7 +173,7 @@ const p = class extends S {
157
173
  createRectangle(e) {
158
174
  return c(this, null, function* () {
159
175
  var t;
160
- return this.createItem(v, r(r({}, (t = this.theme) == null ? void 0 : t.rectangle), e));
176
+ return this.createItem(C, r(r({}, (t = this.theme) == null ? void 0 : t.rectangle), e));
161
177
  });
162
178
  }
163
179
  /**
@@ -166,7 +182,7 @@ const p = class extends S {
166
182
  createCircle(e) {
167
183
  return c(this, null, function* () {
168
184
  var t;
169
- return this.createItem(C, r(r({}, (t = this.theme) == null ? void 0 : t.circle), e));
185
+ return this.createItem(R, r(r({}, (t = this.theme) == null ? void 0 : t.circle), e));
170
186
  });
171
187
  }
172
188
  /**
@@ -187,35 +203,34 @@ const p = class extends S {
187
203
  return this.createItem(j, r(r({}, (t = this.theme) == null ? void 0 : t.box), e));
188
204
  });
189
205
  }
190
- /**
191
- * @description: 撤销
192
- */
193
- undo() {
206
+ canUndo() {
207
+ var e;
208
+ return this.creatingItem ? (e = this.creatingItem) == null ? void 0 : e.canUndo() : !1;
194
209
  }
195
- /**
196
- * @description: 重做
197
- */
198
- redo() {
210
+ canRedo() {
211
+ var e;
212
+ return this.creatingItem ? (e = this.creatingItem) == null ? void 0 : e.canRedo() : !1;
199
213
  }
200
214
  /**
201
215
  * @description: 清空数据
202
216
  */
203
217
  clear() {
204
- k(this.items, (e) => e.delete()), this.five.needsRender = !0;
218
+ M(this.items, (e) => e.delete()), this.five.needsRender = !0;
205
219
  }
206
220
  createItem(e, ...t) {
207
221
  return c(this, null, function* () {
208
- const o = new e();
209
- return this.group.add(o), yield o.create(...t).catch((l) => {
210
- console.error(l), this.group.remove(o);
211
- }), o;
222
+ this.creatingItem && (this.creatingItem.stopCreating(), this.creatingItem = null);
223
+ const n = new e();
224
+ return this.creatingItem = n, this.group.add(n), yield n.create(...t).then((...l) => (this.creatingItem = null, l)).catch((l) => {
225
+ console.error(l), this.group.remove(n);
226
+ }), n;
212
227
  });
213
228
  }
214
229
  };
215
- let h = p;
216
- a(h, "modules", R);
217
- const le = (m) => new h(m);
230
+ let d = a;
231
+ h(d, "modules", O);
232
+ const ue = (m) => new d(m);
218
233
  export {
219
- h as Sculpt,
220
- le as SculptPlugin
234
+ d as Sculpt,
235
+ ue as SculptPlugin
221
236
  };
@@ -17,7 +17,7 @@ let x = class {
17
17
  /**
18
18
  * @realsee/dnalogel 版本号
19
19
  */
20
- i(this, "VERSION", "3.48.0");
20
+ i(this, "VERSION", "3.48.1");
21
21
  i(this, "NAME");
22
22
  i(this, "five");
23
23
  i(this, "workUtil");