mol_wire_dom 0.0.1452 → 0.0.1453

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
@@ -28,6 +28,21 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
28
28
  var $ = ( typeof module === 'object' ) ? ( module['export'+'s'] = globalThis ) : globalThis
29
29
  $.$$ = $
30
30
 
31
+ ;
32
+ "use strict";
33
+ var $;
34
+ (function ($) {
35
+ function $mol_guid(length = 8, exists = () => false) {
36
+ for (;;) {
37
+ let id = Math.random().toString(36).substring(2, length + 2).toUpperCase();
38
+ if (exists(id))
39
+ continue;
40
+ return id;
41
+ }
42
+ }
43
+ $.$mol_guid = $mol_guid;
44
+ })($ || ($ = {}));
45
+
31
46
  ;
32
47
  "use strict";
33
48
  var $;
@@ -56,6 +71,11 @@ var $;
56
71
  var $;
57
72
  (function ($) {
58
73
  class $mol_wire_pub extends Object {
74
+ constructor(id = `$mol_wire_pub:${$mol_guid()}`) {
75
+ super();
76
+ this[Symbol.toStringTag] = id;
77
+ }
78
+ [Symbol.toStringTag];
59
79
  data = [];
60
80
  static get [Symbol.species]() {
61
81
  return Array;
@@ -649,7 +669,6 @@ var $;
649
669
  }
650
670
  }
651
671
  }
652
- [Symbol.toStringTag];
653
672
  cache = undefined;
654
673
  get args() {
655
674
  return this.data.slice(0, this.pub_from);
@@ -668,13 +687,12 @@ var $;
668
687
  return this.task.name + '()';
669
688
  }
670
689
  constructor(id, task, host, args) {
671
- super();
690
+ super(id);
672
691
  this.task = task;
673
692
  this.host = host;
674
693
  if (args)
675
694
  this.data.push(...args);
676
695
  this.pub_from = this.sub_from = args?.length ?? 0;
677
- this[Symbol.toStringTag] = id;
678
696
  }
679
697
  plan() {
680
698
  $mol_wire_fiber.planning.add(this);
@@ -859,21 +877,6 @@ var $;
859
877
  $.$mol_wire_fiber = $mol_wire_fiber;
860
878
  })($ || ($ = {}));
861
879
 
862
- ;
863
- "use strict";
864
- var $;
865
- (function ($) {
866
- function $mol_guid(length = 8, exists = () => false) {
867
- for (;;) {
868
- let id = Math.random().toString(36).substring(2, length + 2).toUpperCase();
869
- if (exists(id))
870
- continue;
871
- return id;
872
- }
873
- }
874
- $.$mol_guid = $mol_guid;
875
- })($ || ($ = {}));
876
-
877
880
  ;
878
881
  "use strict";
879
882
  var $;
package/node.test.js CHANGED
@@ -19,6 +19,21 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
19
19
  var $ = ( typeof module === 'object' ) ? ( module['export'+'s'] = globalThis ) : globalThis
20
20
  $.$$ = $
21
21
 
22
+ ;
23
+ "use strict";
24
+ var $;
25
+ (function ($) {
26
+ function $mol_guid(length = 8, exists = () => false) {
27
+ for (;;) {
28
+ let id = Math.random().toString(36).substring(2, length + 2).toUpperCase();
29
+ if (exists(id))
30
+ continue;
31
+ return id;
32
+ }
33
+ }
34
+ $.$mol_guid = $mol_guid;
35
+ })($ || ($ = {}));
36
+
22
37
  ;
23
38
  "use strict";
24
39
  var $;
@@ -47,6 +62,11 @@ var $;
47
62
  var $;
48
63
  (function ($) {
49
64
  class $mol_wire_pub extends Object {
65
+ constructor(id = `$mol_wire_pub:${$mol_guid()}`) {
66
+ super();
67
+ this[Symbol.toStringTag] = id;
68
+ }
69
+ [Symbol.toStringTag];
50
70
  data = [];
51
71
  static get [Symbol.species]() {
52
72
  return Array;
@@ -640,7 +660,6 @@ var $;
640
660
  }
641
661
  }
642
662
  }
643
- [Symbol.toStringTag];
644
663
  cache = undefined;
645
664
  get args() {
646
665
  return this.data.slice(0, this.pub_from);
@@ -659,13 +678,12 @@ var $;
659
678
  return this.task.name + '()';
660
679
  }
661
680
  constructor(id, task, host, args) {
662
- super();
681
+ super(id);
663
682
  this.task = task;
664
683
  this.host = host;
665
684
  if (args)
666
685
  this.data.push(...args);
667
686
  this.pub_from = this.sub_from = args?.length ?? 0;
668
- this[Symbol.toStringTag] = id;
669
687
  }
670
688
  plan() {
671
689
  $mol_wire_fiber.planning.add(this);
@@ -850,21 +868,6 @@ var $;
850
868
  $.$mol_wire_fiber = $mol_wire_fiber;
851
869
  })($ || ($ = {}));
852
870
 
853
- ;
854
- "use strict";
855
- var $;
856
- (function ($) {
857
- function $mol_guid(length = 8, exists = () => false) {
858
- for (;;) {
859
- let id = Math.random().toString(36).substring(2, length + 2).toUpperCase();
860
- if (exists(id))
861
- continue;
862
- return id;
863
- }
864
- }
865
- $.$mol_guid = $mol_guid;
866
- })($ || ($ = {}));
867
-
868
871
  ;
869
872
  "use strict";
870
873
  var $;