mol_jsx_lib 0.0.299 → 0.0.301

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
@@ -1268,6 +1268,12 @@ var $;
1268
1268
  //mol/wire/method/method.ts
1269
1269
  ;
1270
1270
  "use strict";
1271
+ //mol/type/tail/tail.ts
1272
+ ;
1273
+ "use strict";
1274
+ //mol/type/foot/foot.ts
1275
+ ;
1276
+ "use strict";
1271
1277
  var $;
1272
1278
  (function ($) {
1273
1279
  class $mol_wire_atom extends $mol_wire_fiber {
@@ -1321,6 +1327,20 @@ var $;
1321
1327
  once() {
1322
1328
  return this.sync();
1323
1329
  }
1330
+ channel() {
1331
+ return Object.assign((next) => {
1332
+ if (next !== undefined)
1333
+ return this.resync([...this.args, next]);
1334
+ if (!$mol_wire_fiber.warm)
1335
+ return this.result();
1336
+ if ($mol_wire_auto() instanceof $mol_wire_task) {
1337
+ return this.once();
1338
+ }
1339
+ else {
1340
+ return this.sync();
1341
+ }
1342
+ }, { atom: this });
1343
+ }
1324
1344
  destructor() {
1325
1345
  super.destructor();
1326
1346
  const prev = this.cache;
@@ -1409,9 +1429,6 @@ var $;
1409
1429
  //mol/wire/field/field.ts
1410
1430
  ;
1411
1431
  "use strict";
1412
- //mol/type/tail/tail.ts
1413
- ;
1414
- "use strict";
1415
1432
  var $;
1416
1433
  (function ($) {
1417
1434
  function $mol_wire_solo(host, field, descr) {
@@ -1787,6 +1804,22 @@ var $;
1787
1804
  //mol/wire/patch/patch.ts
1788
1805
  ;
1789
1806
  "use strict";
1807
+ //mol/type/result/result.ts
1808
+ ;
1809
+ "use strict";
1810
+ var $;
1811
+ (function ($) {
1812
+ function $mol_wire_let(host) {
1813
+ for (const field of Object.keys(host)) {
1814
+ host[field] = new $mol_wire_atom(field, host[field], host).channel();
1815
+ }
1816
+ return host;
1817
+ }
1818
+ $.$mol_wire_let = $mol_wire_let;
1819
+ })($ || ($ = {}));
1820
+ //mol/wire/let/let.ts
1821
+ ;
1822
+ "use strict";
1790
1823
  var $;
1791
1824
  (function ($) {
1792
1825
  class $mol_wire_set extends Set {