@elyx-code/project-logic-tree 0.0.6278 → 0.0.6279

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
@@ -71088,6 +71088,7 @@ const ie = class ie extends kv {
71088
71088
  h(this, "startedInitialization", !1);
71089
71089
  h(this, "onCloseChangeSetCallback", null);
71090
71090
  h(this, "onAddChangeSetCallback", null);
71091
+ h(this, "onDiscardChangeSetCallback", null);
71091
71092
  h(this, "onRequestActiveValueCallback", null);
71092
71093
  this.initialData = e, this.id = e.id, this.name = e.name, this.description = e.description, this.x = 0, this.y = 0, this.instances[this.id] = this;
71093
71094
  try {
@@ -71160,6 +71161,9 @@ const ie = class ie extends kv {
71160
71161
  onAddChangeSet(e) {
71161
71162
  this.onAddChangeSetCallback = e;
71162
71163
  }
71164
+ onDiscardChangeSet(e) {
71165
+ this.onDiscardChangeSetCallback = e;
71166
+ }
71163
71167
  async closeChangeSet(e) {
71164
71168
  const t = this.history.findIndex((l) => l.id === e.id), i = this.history.slice(0, t), s = i[i.length - 1];
71165
71169
  if (!(s != null && s.dirty) && this.onCloseChangeSetCallback) {
@@ -71221,8 +71225,9 @@ const ie = class ie extends kv {
71221
71225
  // Sometimes change-sets get initialized by default but end up not having any changes.
71222
71226
  // So we remove them from the state
71223
71227
  discardChangeSet(e) {
71224
- const t = this.history.findIndex((i) => i.id === (e == null ? void 0 : e.id));
71225
- return t !== -1 && this.history.splice(t, 1), this;
71228
+ var i;
71229
+ const t = this.history.findIndex((s) => s.id === (e == null ? void 0 : e.id));
71230
+ return t !== -1 && ((i = this.onDiscardChangeSetCallback) == null || i.call(this, e), this.history.splice(t, 1)), this;
71226
71231
  }
71227
71232
  async inject(...e) {
71228
71233
  return await Promise.all(