mol_jsx_lib 0.0.63 → 0.0.64

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
@@ -529,6 +529,19 @@ var $;
529
529
  ;
530
530
  "use strict";
531
531
  var $;
532
+ (function ($) {
533
+ function $mol_const(value) {
534
+ var getter = (() => value);
535
+ getter['()'] = value;
536
+ getter[Symbol.toStringTag] = value;
537
+ return getter;
538
+ }
539
+ $.$mol_const = $mol_const;
540
+ })($ || ($ = {}));
541
+ //mol/const/const.ts
542
+ ;
543
+ "use strict";
544
+ var $;
532
545
  (function ($) {
533
546
  $['devtoolsFormatters'] = $['devtoolsFormatters'] || [];
534
547
  function $mol_dev_format_register(config) {
@@ -1363,6 +1376,40 @@ var $;
1363
1376
  ;
1364
1377
  "use strict";
1365
1378
  var $;
1379
+ (function ($) {
1380
+ function $mol_wire_field(host, field, descr) {
1381
+ if (!descr)
1382
+ descr = Reflect.getOwnPropertyDescriptor(host, field);
1383
+ const _get = descr?.get || $mol_const(descr?.value);
1384
+ const persist = $mol_wire_atom.getter(_get, 0);
1385
+ const _set = descr?.set || function (next) {
1386
+ persist(this, []).put(next);
1387
+ };
1388
+ const sup = Reflect.getPrototypeOf(host);
1389
+ const sup_descr = Reflect.getOwnPropertyDescriptor(sup, field);
1390
+ Object.defineProperty(_get, 'name', { value: sup_descr?.get?.name ?? field });
1391
+ Object.defineProperty(_set, 'name', { value: sup_descr?.set?.name ?? field });
1392
+ function get() {
1393
+ return persist(this, []).sync();
1394
+ }
1395
+ const temp = $mol_wire_task.getter(_set);
1396
+ function set(next) {
1397
+ temp(this, [next]).sync();
1398
+ }
1399
+ Object.defineProperty(get, 'name', { value: _get.name + '$' });
1400
+ Object.defineProperty(set, 'name', { value: _set.name + '@' });
1401
+ Object.assign(get, { orig: _get });
1402
+ Object.assign(set, { orig: _set });
1403
+ const { value, writable, ...descr2 } = { ...descr, get, set };
1404
+ Reflect.defineProperty(host, field, descr2);
1405
+ return descr2;
1406
+ }
1407
+ $.$mol_wire_field = $mol_wire_field;
1408
+ })($ || ($ = {}));
1409
+ //mol/wire/field/field.ts
1410
+ ;
1411
+ "use strict";
1412
+ var $;
1366
1413
  (function ($) {
1367
1414
  function $mol_wire_mem(keys) {
1368
1415
  const wrap = $mol_wire_mem_func(keys);
@@ -1430,12 +1477,8 @@ var $;
1430
1477
  ownerDocument;
1431
1478
  className;
1432
1479
  get childNodes() {
1433
- return this._kids();
1434
- }
1435
- set childNodes(next) {
1436
- this._kids(next);
1480
+ return [];
1437
1481
  }
1438
- _kids(next = []) { return next; }
1439
1482
  valueOf() {
1440
1483
  const prefix = $mol_jsx_prefix;
1441
1484
  const booked = $mol_jsx_booked;
@@ -1455,13 +1498,10 @@ var $;
1455
1498
  $mol_jsx_document = document;
1456
1499
  }
1457
1500
  }
1458
- render() {
1459
- return $mol_fail(new Error(`render() isn't implemented`));
1460
- }
1461
1501
  }
1462
1502
  __decorate([
1463
- $mol_mem
1464
- ], $mol_jsx_view.prototype, "_kids", null);
1503
+ $mol_wire_field
1504
+ ], $mol_jsx_view.prototype, "childNodes", null);
1465
1505
  __decorate([
1466
1506
  $mol_mem
1467
1507
  ], $mol_jsx_view.prototype, "valueOf", null);
@@ -1571,53 +1611,6 @@ var $;
1571
1611
  ;
1572
1612
  "use strict";
1573
1613
  var $;
1574
- (function ($) {
1575
- function $mol_const(value) {
1576
- var getter = (() => value);
1577
- getter['()'] = value;
1578
- getter[Symbol.toStringTag] = value;
1579
- return getter;
1580
- }
1581
- $.$mol_const = $mol_const;
1582
- })($ || ($ = {}));
1583
- //mol/const/const.ts
1584
- ;
1585
- "use strict";
1586
- var $;
1587
- (function ($) {
1588
- function $mol_wire_field(host, field, descr) {
1589
- if (!descr)
1590
- descr = Reflect.getOwnPropertyDescriptor(host, field);
1591
- const _get = descr?.get || $mol_const(descr?.value);
1592
- const persist = $mol_wire_atom.getter(_get, 0);
1593
- const _set = descr?.set || function (next) {
1594
- persist(this, []).put(next);
1595
- };
1596
- const sup = Reflect.getPrototypeOf(host);
1597
- const sup_descr = Reflect.getOwnPropertyDescriptor(sup, field);
1598
- Object.defineProperty(_get, 'name', { value: sup_descr?.get?.name ?? field });
1599
- Object.defineProperty(_set, 'name', { value: sup_descr?.set?.name ?? field });
1600
- function get() {
1601
- return persist(this, []).sync();
1602
- }
1603
- const temp = $mol_wire_task.getter(_set);
1604
- function set(next) {
1605
- temp(this, [next]).sync();
1606
- }
1607
- Object.defineProperty(get, 'name', { value: _get.name + '$' });
1608
- Object.defineProperty(set, 'name', { value: _set.name + '@' });
1609
- Object.assign(get, { orig: _get });
1610
- Object.assign(set, { orig: _set });
1611
- const { value, writable, ...descr2 } = { ...descr, get, set };
1612
- Reflect.defineProperty(host, field, descr2);
1613
- return descr2;
1614
- }
1615
- $.$mol_wire_field = $mol_wire_field;
1616
- })($ || ($ = {}));
1617
- //mol/wire/field/field.ts
1618
- ;
1619
- "use strict";
1620
- var $;
1621
1614
  (function ($) {
1622
1615
  function $mol_wire_patch(obj) {
1623
1616
  for (const field of Reflect.ownKeys(obj)) {