mol_plot_all 1.2.423 → 1.2.425

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
@@ -1519,6 +1519,34 @@ var $;
1519
1519
  ;
1520
1520
  "use strict";
1521
1521
  var $;
1522
+ (function ($) {
1523
+ function $mol_func_name(func) {
1524
+ let name = func.name;
1525
+ if (name?.length > 1)
1526
+ return name;
1527
+ for (let key in this) {
1528
+ try {
1529
+ if (this[key] !== func)
1530
+ continue;
1531
+ name = key;
1532
+ Object.defineProperty(func, 'name', { value: name });
1533
+ break;
1534
+ }
1535
+ catch { }
1536
+ }
1537
+ return name;
1538
+ }
1539
+ $.$mol_func_name = $mol_func_name;
1540
+ function $mol_func_name_from(target, source) {
1541
+ Object.defineProperty(target, 'name', { value: source.name });
1542
+ return target;
1543
+ }
1544
+ $.$mol_func_name_from = $mol_func_name_from;
1545
+ })($ || ($ = {}));
1546
+ //mol/func/name/name.ts
1547
+ ;
1548
+ "use strict";
1549
+ var $;
1522
1550
  (function ($) {
1523
1551
  function $mol_guid(length = 8, exists = () => false) {
1524
1552
  for (;;) {
@@ -1777,7 +1805,8 @@ var $;
1777
1805
  const existen = Object.getOwnPropertyDescriptor(host ?? task, field)?.value;
1778
1806
  if (existen)
1779
1807
  return existen;
1780
- const key = `${host?.[Symbol.toStringTag] ?? host}.${field}`;
1808
+ const prefix = host?.[Symbol.toStringTag] ?? (host instanceof Function ? $$.$mol_func_name(host) : host);
1809
+ const key = `${prefix}.${field}`;
1781
1810
  const fiber = new $mol_wire_atom(key, task, host, []);
1782
1811
  (host ?? task)[field] = fiber;
1783
1812
  return fiber;
@@ -1785,7 +1814,8 @@ var $;
1785
1814
  static plex(host, task, key) {
1786
1815
  const field = task.name + '()';
1787
1816
  let dict = Object.getOwnPropertyDescriptor(host ?? task, field)?.value;
1788
- const id = `${host?.[Symbol.toStringTag] ?? host}.${task.name}(${$mol_key(key)})`;
1817
+ const prefix = host?.[Symbol.toStringTag] ?? (host instanceof Function ? $$.$mol_func_name(host) : host);
1818
+ const id = `${prefix}.${task.name}(${$mol_key(key)})`;
1789
1819
  if (dict) {
1790
1820
  const existen = dict.get(id);
1791
1821
  if (existen)
@@ -2304,34 +2334,6 @@ var $;
2304
2334
  //mol/dom/render/fields/fields.ts
2305
2335
  ;
2306
2336
  "use strict";
2307
- var $;
2308
- (function ($) {
2309
- function $mol_func_name(func) {
2310
- let name = func.name;
2311
- if (name?.length > 1)
2312
- return name;
2313
- for (let key in this) {
2314
- try {
2315
- if (this[key] !== func)
2316
- continue;
2317
- name = key;
2318
- Object.defineProperty(func, 'name', { value: name });
2319
- break;
2320
- }
2321
- catch { }
2322
- }
2323
- return name;
2324
- }
2325
- $.$mol_func_name = $mol_func_name;
2326
- function $mol_func_name_from(target, source) {
2327
- Object.defineProperty(target, 'name', { value: source.name });
2328
- return target;
2329
- }
2330
- $.$mol_func_name_from = $mol_func_name_from;
2331
- })($ || ($ = {}));
2332
- //mol/func/name/name.ts
2333
- ;
2334
- "use strict";
2335
2337
  //mol/type/keys/extract/extract.ts
2336
2338
  ;
2337
2339
  "use strict";
@@ -6319,7 +6321,7 @@ var $;
6319
6321
  if (key === 'id')
6320
6322
  continue;
6321
6323
  if (typeof props[key] === 'string') {
6322
- if (key in node)
6324
+ if (typeof node[key] === 'string')
6323
6325
  node[key] = props[key];
6324
6326
  node.setAttribute(key, props[key]);
6325
6327
  }