mol_wire_dom 0.0.1434 → 0.0.1436

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/node.mjs CHANGED
@@ -100,7 +100,7 @@ var $;
100
100
  emit(quant = $mol_wire_cursor.stale) {
101
101
  for (let i = this.sub_from; i < this.data.length; i += 2) {
102
102
  ;
103
- this.data[i].absorb(quant);
103
+ this.data[i].absorb(quant, this.data[i + 1]);
104
104
  }
105
105
  }
106
106
  peer_move(from_pos, to_pos) {
@@ -351,13 +351,24 @@ var $;
351
351
  pub?.complete();
352
352
  }
353
353
  }
354
- absorb(quant = $mol_wire_cursor.stale) {
354
+ absorb(quant = $mol_wire_cursor.stale, pos = -1) {
355
355
  if (this.cursor === $mol_wire_cursor.final)
356
356
  return;
357
357
  if (this.cursor >= quant)
358
358
  return;
359
359
  this.cursor = quant;
360
360
  this.emit($mol_wire_cursor.doubt);
361
+ if (pos >= 0 && pos < this.sub_from - 2) {
362
+ const pub = this.data[pos];
363
+ if (pub instanceof $mol_wire_task)
364
+ return;
365
+ for (let cursor = this.pub_from; cursor < this.sub_from; cursor += 2) {
366
+ const pub = this.data[cursor];
367
+ if (pub instanceof $mol_wire_task) {
368
+ pub.destructor();
369
+ }
370
+ }
371
+ }
361
372
  }
362
373
  [$mol_dev_format_head]() {
363
374
  return $mol_dev_format_native(this);
package/node.test.js CHANGED
@@ -91,7 +91,7 @@ var $;
91
91
  emit(quant = $mol_wire_cursor.stale) {
92
92
  for (let i = this.sub_from; i < this.data.length; i += 2) {
93
93
  ;
94
- this.data[i].absorb(quant);
94
+ this.data[i].absorb(quant, this.data[i + 1]);
95
95
  }
96
96
  }
97
97
  peer_move(from_pos, to_pos) {
@@ -342,13 +342,24 @@ var $;
342
342
  pub?.complete();
343
343
  }
344
344
  }
345
- absorb(quant = $mol_wire_cursor.stale) {
345
+ absorb(quant = $mol_wire_cursor.stale, pos = -1) {
346
346
  if (this.cursor === $mol_wire_cursor.final)
347
347
  return;
348
348
  if (this.cursor >= quant)
349
349
  return;
350
350
  this.cursor = quant;
351
351
  this.emit($mol_wire_cursor.doubt);
352
+ if (pos >= 0 && pos < this.sub_from - 2) {
353
+ const pub = this.data[pos];
354
+ if (pub instanceof $mol_wire_task)
355
+ return;
356
+ for (let cursor = this.pub_from; cursor < this.sub_from; cursor += 2) {
357
+ const pub = this.data[cursor];
358
+ if (pub instanceof $mol_wire_task) {
359
+ pub.destructor();
360
+ }
361
+ }
362
+ }
352
363
  }
353
364
  [$mol_dev_format_head]() {
354
365
  return $mol_dev_format_native(this);
@@ -4768,8 +4779,6 @@ var $;
4768
4779
  $mol_wire_sync(this).wait();
4769
4780
  return this.value();
4770
4781
  }
4771
- static test() {
4772
- }
4773
4782
  }
4774
4783
  __decorate([
4775
4784
  $mol_wire_solo
@@ -4780,9 +4789,6 @@ var $;
4780
4789
  __decorate([
4781
4790
  $mol_wire_solo
4782
4791
  ], App, "result", null);
4783
- __decorate([
4784
- $mol_wire_method
4785
- ], App, "test", null);
4786
4792
  $mol_assert_equal(App.result(), 1);
4787
4793
  App.resets(null);
4788
4794
  $mol_wire_fiber.sync();