mol_jsx_lib 0.0.1370 → 0.0.1372

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
@@ -574,11 +574,11 @@ var $;
574
574
  function $mol_dev_format_button(label, click) {
575
575
  return $mol_dev_format_auto({
576
576
  [$.$mol_dev_format_head]() {
577
- return $mol_dev_format_span({ color: 'cornflowerblue' }, label);
577
+ return $.$mol_dev_format_span({ color: 'cornflowerblue' }, label);
578
578
  },
579
579
  [$.$mol_dev_format_body]() {
580
580
  Promise.resolve().then(click);
581
- return $mol_dev_format_span({});
581
+ return $.$mol_dev_format_span({});
582
582
  }
583
583
  });
584
584
  }
@@ -599,8 +599,8 @@ var $;
599
599
  if (typeof val === 'function') {
600
600
  return $mol_dev_format_native(val);
601
601
  }
602
- if (Error.isError(val)) {
603
- return $mol_dev_format_span({}, $mol_dev_format_native(val), ' ', $mol_dev_format_button('throw', () => $mol_fail_hidden(val)));
602
+ if (val instanceof Error) {
603
+ return $.$mol_dev_format_span({}, $mol_dev_format_native(val), ' ', $mol_dev_format_button('throw', () => $mol_fail_hidden(val)));
604
604
  }
605
605
  if (val instanceof Promise) {
606
606
  return $.$mol_dev_format_shade($mol_dev_format_native(val), ' ', val[Symbol.toStringTag] ?? '');
@@ -672,28 +672,23 @@ var $;
672
672
  ];
673
673
  }
674
674
  $.$mol_dev_format_element = $mol_dev_format_element;
675
- function $mol_dev_format_span(style, ...content) {
676
- return $mol_dev_format_element('span', {
677
- ...style,
678
- }, ...content);
679
- }
680
- $.$mol_dev_format_span = $mol_dev_format_span;
675
+ $.$mol_dev_format_span = $mol_dev_format_element.bind(null, 'span');
681
676
  $.$mol_dev_format_div = $mol_dev_format_element.bind(null, 'div');
682
677
  $.$mol_dev_format_ol = $mol_dev_format_element.bind(null, 'ol');
683
678
  $.$mol_dev_format_li = $mol_dev_format_element.bind(null, 'li');
684
679
  $.$mol_dev_format_table = $mol_dev_format_element.bind(null, 'table');
685
680
  $.$mol_dev_format_tr = $mol_dev_format_element.bind(null, 'tr');
686
681
  $.$mol_dev_format_td = $mol_dev_format_element.bind(null, 'td');
687
- $.$mol_dev_format_accent = $mol_dev_format_span.bind(null, {
682
+ $.$mol_dev_format_accent = $.$mol_dev_format_span.bind(null, {
688
683
  'color': 'magenta',
689
684
  });
690
- $.$mol_dev_format_strong = $mol_dev_format_span.bind(null, {
685
+ $.$mol_dev_format_strong = $.$mol_dev_format_span.bind(null, {
691
686
  'font-weight': 'bold',
692
687
  });
693
- $.$mol_dev_format_string = $mol_dev_format_span.bind(null, {
688
+ $.$mol_dev_format_string = $.$mol_dev_format_span.bind(null, {
694
689
  'color': 'green',
695
690
  });
696
- $.$mol_dev_format_shade = $mol_dev_format_span.bind(null, {
691
+ $.$mol_dev_format_shade = $.$mol_dev_format_span.bind(null, {
697
692
  'color': 'gray',
698
693
  });
699
694
  $.$mol_dev_format_indent = $.$mol_dev_format_div.bind(null, {
@@ -1443,7 +1438,7 @@ var $;
1443
1438
  var $;
1444
1439
  (function ($) {
1445
1440
  function $mol_log3_area_lazy(event) {
1446
- const self = this;
1441
+ const self = this.$;
1447
1442
  const stack = self.$mol_log3_stack;
1448
1443
  const deep = stack.length;
1449
1444
  let logged = false;
@@ -1503,15 +1498,22 @@ var $;
1503
1498
  return function $mol_wire_task_get(host, args) {
1504
1499
  const sub = $mol_wire_auto();
1505
1500
  const existen = sub?.track_next();
1501
+ let cause = '';
1506
1502
  reuse: if (existen) {
1507
1503
  if (!existen.temp)
1508
1504
  break reuse;
1509
- if (existen.host !== host)
1505
+ if (existen.task !== task) {
1506
+ cause = 'task';
1510
1507
  break reuse;
1511
- if (existen.task !== task)
1508
+ }
1509
+ if (existen.host !== host) {
1510
+ cause = 'host';
1512
1511
  break reuse;
1513
- if (!$mol_compare_deep(existen.args, args))
1512
+ }
1513
+ if (!$mol_compare_deep(existen.args, args)) {
1514
+ cause = 'args';
1514
1515
  break reuse;
1516
+ }
1515
1517
  return existen;
1516
1518
  }
1517
1519
  const key = (host?.[Symbol.toStringTag] ?? host) + ('.' + task.name + '<#>');
@@ -1519,11 +1521,11 @@ var $;
1519
1521
  if (existen?.temp) {
1520
1522
  $$.$mol_log3_warn({
1521
1523
  place: '$mol_wire_task',
1522
- message: `Non idempotency`,
1524
+ message: `Different ${cause} on restart`,
1523
1525
  sub,
1524
- pubs: [...sub?.pub_list ?? [], existen],
1526
+ prev: existen,
1525
1527
  next,
1526
- hint: 'Ignore it',
1528
+ hint: 'Maybe required additional memoization',
1527
1529
  });
1528
1530
  }
1529
1531
  return next;