mol_wire_lib 1.0.429 → 1.0.431

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/web.js CHANGED
@@ -1046,6 +1046,12 @@ var $;
1046
1046
  //mol/wire/method/method.ts
1047
1047
  ;
1048
1048
  "use strict";
1049
+ //mol/type/tail/tail.ts
1050
+ ;
1051
+ "use strict";
1052
+ //mol/type/foot/foot.ts
1053
+ ;
1054
+ "use strict";
1049
1055
  var $;
1050
1056
  (function ($) {
1051
1057
  class $mol_wire_atom extends $mol_wire_fiber {
@@ -1099,6 +1105,20 @@ var $;
1099
1105
  once() {
1100
1106
  return this.sync();
1101
1107
  }
1108
+ channel() {
1109
+ return Object.assign((next) => {
1110
+ if (next !== undefined)
1111
+ return this.resync([...this.args, next]);
1112
+ if (!$mol_wire_fiber.warm)
1113
+ return this.result();
1114
+ if ($mol_wire_auto() instanceof $mol_wire_task) {
1115
+ return this.once();
1116
+ }
1117
+ else {
1118
+ return this.sync();
1119
+ }
1120
+ }, { atom: this });
1121
+ }
1102
1122
  destructor() {
1103
1123
  super.destructor();
1104
1124
  const prev = this.cache;
@@ -1283,9 +1303,6 @@ var $;
1283
1303
  //mol/wire/race/race.ts
1284
1304
  ;
1285
1305
  "use strict";
1286
- //mol/type/tail/tail.ts
1287
- ;
1288
- "use strict";
1289
1306
  var $;
1290
1307
  (function ($) {
1291
1308
  function $mol_wire_solo(host, field, descr) {
@@ -1535,6 +1552,22 @@ var $;
1535
1552
  //mol/wire/patch/patch.ts
1536
1553
  ;
1537
1554
  "use strict";
1555
+ //mol/type/result/result.ts
1556
+ ;
1557
+ "use strict";
1558
+ var $;
1559
+ (function ($) {
1560
+ function $mol_wire_let(host) {
1561
+ for (const field of Object.keys(host)) {
1562
+ host[field] = new $mol_wire_atom(field, host[field], host).channel();
1563
+ }
1564
+ return host;
1565
+ }
1566
+ $.$mol_wire_let = $mol_wire_let;
1567
+ })($ || ($ = {}));
1568
+ //mol/wire/let/let.ts
1569
+ ;
1570
+ "use strict";
1538
1571
  var $;
1539
1572
  (function ($) {
1540
1573
  class $mol_wire_set extends Set {