mol_jsx_lib 0.0.732 → 0.0.734

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.mjs CHANGED
@@ -431,7 +431,7 @@ var $;
431
431
  destructor() { }
432
432
  static destructor() { }
433
433
  toString() {
434
- return this[Symbol.toStringTag] || this.constructor.name + '()';
434
+ return this[Symbol.toStringTag] || this.constructor.name + '<>';
435
435
  }
436
436
  static toJSON() {
437
437
  return this[Symbol.toStringTag] || this.$.$mol_func_name(this);
@@ -909,7 +909,7 @@ var $;
909
909
  return $mol_promise_like(this.cache);
910
910
  }
911
911
  field() {
912
- return this.task.name + '()';
912
+ return this.task.name + '<>';
913
913
  }
914
914
  constructor(id, task, host, args) {
915
915
  super();
@@ -1348,7 +1348,7 @@ var $;
1348
1348
  break reuse;
1349
1349
  return existen;
1350
1350
  }
1351
- const next = new $mol_wire_task(`${host?.[Symbol.toStringTag] ?? host}.${task.name}(#)`, task, host, args);
1351
+ const next = new $mol_wire_task(`${host?.[Symbol.toStringTag] ?? host}.${task.name}<#>`, task, host, args);
1352
1352
  if (existen?.temp) {
1353
1353
  $$.$mol_log3_warn({
1354
1354
  place: '$mol_wire_task',
@@ -1460,7 +1460,7 @@ var $;
1460
1460
  (function ($) {
1461
1461
  class $mol_wire_atom extends $mol_wire_fiber {
1462
1462
  static solo(host, task) {
1463
- const field = task.name + '()';
1463
+ const field = task.name + '<>';
1464
1464
  const existen = Object.getOwnPropertyDescriptor(host ?? task, field)?.value;
1465
1465
  if (existen)
1466
1466
  return existen;
@@ -1471,7 +1471,7 @@ var $;
1471
1471
  return fiber;
1472
1472
  }
1473
1473
  static plex(host, task, key) {
1474
- const field = task.name + '()';
1474
+ const field = task.name + '<>';
1475
1475
  let dict = Object.getOwnPropertyDescriptor(host ?? task, field)?.value;
1476
1476
  const prefix = host?.[Symbol.toStringTag] ?? (host instanceof Function ? $$.$mol_func_name(host) : host);
1477
1477
  const key_str = $mol_key(key);
@@ -1483,7 +1483,7 @@ var $;
1483
1483
  else {
1484
1484
  dict = (host ?? task)[field] = new Map();
1485
1485
  }
1486
- const id = `${prefix}.${task.name}(${key_str.replace(/^"|"$/g, "'")})`;
1486
+ const id = `${prefix}.${task.name}<${key_str.replace(/^"|"$/g, "'")}>`;
1487
1487
  const fiber = new $mol_wire_atom(id, task, host, [key]);
1488
1488
  dict.set(key_str, fiber);
1489
1489
  return fiber;
package/web.test.js CHANGED
@@ -174,6 +174,10 @@ var $;
174
174
  const print = (val) => {
175
175
  if (!val)
176
176
  return val;
177
+ if (typeof val === 'bigint')
178
+ return String(val) + 'n';
179
+ if (typeof val === 'symbol')
180
+ return `Symbol(${val.description})`;
177
181
  if (typeof val !== 'object')
178
182
  return val;
179
183
  if ('outerHTML' in val)
@@ -1626,7 +1630,7 @@ var $;
1626
1630
  __decorate([
1627
1631
  $mol_wire_solo
1628
1632
  ], App, "title", null);
1629
- $mol_assert_equal(`${App.title()}`, 'App.title()');
1633
+ $mol_assert_equal(`${App.title()}`, 'App.title<>');
1630
1634
  },
1631
1635
  'Unsubscribe from temp pubs on complete'($) {
1632
1636
  class Random extends $mol_object2 {
@@ -1745,8 +1749,8 @@ var $;
1745
1749
  __decorate([
1746
1750
  $mol_wire_plex
1747
1751
  ], App, "relation", null);
1748
- $mol_assert_equal(`${App.like(123)}`, 'App.like(123)');
1749
- $mol_assert_equal(`${App.relation([123, [456]])}`, 'App.relation([123,[456]])');
1752
+ $mol_assert_equal(`${App.like(123)}`, 'App.like<123>');
1753
+ $mol_assert_equal(`${App.relation([123, [456]])}`, 'App.relation<[123,[456]]>');
1750
1754
  },
1751
1755
  'Deep deps'($) {
1752
1756
  class Fib extends $mol_object2 {