mol_plot_all 1.2.259 → 1.2.262

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/node.test.js CHANGED
@@ -6086,7 +6086,7 @@ var $;
6086
6086
  return $mol_jsx("button", { title: props.hint }, target());
6087
6087
  };
6088
6088
  const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
6089
- $mol_assert_equal(dom.outerHTML, '<button title="click me" id="foo" class="Button">hey!</button>');
6089
+ $mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
6090
6090
  },
6091
6091
  'Nested guid generation'() {
6092
6092
  const Foo = () => {
@@ -6151,7 +6151,7 @@ var $;
6151
6151
  function $mol_jsx(Elem, props, ...childNodes) {
6152
6152
  const id = props && props.id || '';
6153
6153
  const guid = id ? $.$mol_jsx_prefix ? $.$mol_jsx_prefix + '/' + id : id : $.$mol_jsx_prefix;
6154
- const crumbs_self = id ? $.$mol_jsx_crumbs.replace(/(\S+)/g, `$1_${id}`) : $.$mol_jsx_crumbs;
6154
+ const crumbs_self = id ? $.$mol_jsx_crumbs.replace(/(\S+)/g, `$1_${id.replace(/\/.*/i, '')}`) : $.$mol_jsx_crumbs;
6155
6155
  if (Elem && $.$mol_jsx_booked) {
6156
6156
  if ($.$mol_jsx_booked.has(id)) {
6157
6157
  $mol_fail(new Error(`JSX already has tag with id ${JSON.stringify(guid)}`));
@@ -6227,7 +6227,11 @@ var $;
6227
6227
  $mol_dom_render_children(node, [].concat(...childNodes));
6228
6228
  if (!Elem)
6229
6229
  return node;
6230
+ if (guid)
6231
+ node.id = guid;
6230
6232
  for (const key in props) {
6233
+ if (key === 'id')
6234
+ continue;
6231
6235
  if (typeof props[key] === 'string') {
6232
6236
  ;
6233
6237
  node.setAttribute(key, props[key]);
@@ -6244,8 +6248,6 @@ var $;
6244
6248
  node[key] = props[key];
6245
6249
  }
6246
6250
  }
6247
- if (guid)
6248
- node.id = guid;
6249
6251
  if ($.$mol_jsx_crumbs)
6250
6252
  node.className = (props?.['class'] ? props['class'] + ' ' : '') + crumbs_self;
6251
6253
  return node;
@@ -7477,6 +7479,33 @@ var $;
7477
7479
  $mol_assert_equal(Fib.value(4), 8);
7478
7480
  $mol_assert_equal(Fib.sums, 6);
7479
7481
  },
7482
+ 'Unsubscribe from temp pubs on complete'($) {
7483
+ class Random extends $mol_object2 {
7484
+ static $ = $;
7485
+ static seed() {
7486
+ return Math.random();
7487
+ }
7488
+ static resets(next) {
7489
+ return Math.random();
7490
+ }
7491
+ static value() {
7492
+ this.resets();
7493
+ return this.seed();
7494
+ }
7495
+ }
7496
+ __decorate([
7497
+ $mol_wire_method
7498
+ ], Random, "seed", null);
7499
+ __decorate([
7500
+ $mol_wire_mem(0)
7501
+ ], Random, "resets", null);
7502
+ __decorate([
7503
+ $mol_wire_mem(0)
7504
+ ], Random, "value", null);
7505
+ const first = Random.value();
7506
+ Random.resets(null);
7507
+ $mol_assert_unique(Random.value(), first);
7508
+ },
7480
7509
  });
7481
7510
  })($ || ($ = {}));
7482
7511
  //mol/wire/mem/mem.test.ts