hyoo_sync_client 0.0.295 → 0.0.296

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.mjs CHANGED
@@ -1284,9 +1284,6 @@ var $;
1284
1284
  function $mol_dev_format_auto(obj) {
1285
1285
  if (obj == null)
1286
1286
  return $.$mol_dev_format_shade(String(obj));
1287
- if (typeof obj === 'object' && $.$mol_dev_format_head in obj) {
1288
- return obj[$.$mol_dev_format_head]();
1289
- }
1290
1287
  return [
1291
1288
  'object',
1292
1289
  {
@@ -1951,7 +1948,12 @@ var $;
1951
1948
  [$mol_wire_cursor.fresh]: '🟢',
1952
1949
  [$mol_wire_cursor.final]: '🔵',
1953
1950
  }[this.cursor] ?? this.cursor.toString();
1954
- return $mol_dev_format_div({}, $mol_dev_format_native(this), $mol_dev_format_shade(cursor + ' '), $mol_dev_format_auto(this.cache));
1951
+ return $mol_dev_format_div({}, $mol_owning_check(this, this.cache)
1952
+ ? $mol_dev_format_auto({
1953
+ [$mol_dev_format_head]: () => $mol_dev_format_shade(cursor),
1954
+ [$mol_dev_format_body]: () => $mol_dev_format_native(this),
1955
+ })
1956
+ : $mol_dev_format_shade($mol_dev_format_native(this), cursor), $mol_dev_format_auto(this.cache));
1955
1957
  }
1956
1958
  get $() {
1957
1959
  return (this.host ?? this.task)['$'];
@@ -2419,17 +2421,18 @@ var $;
2419
2421
  const field = task.name + '()';
2420
2422
  let dict = Object.getOwnPropertyDescriptor(host ?? task, field)?.value;
2421
2423
  const prefix = host?.[Symbol.toStringTag] ?? (host instanceof Function ? $$.$mol_func_name(host) : host);
2422
- const id = `${prefix}.${task.name}(${$mol_key(key).replace(/^"|"$/g, "'")})`;
2424
+ const key_str = $mol_key(key);
2423
2425
  if (dict) {
2424
- const existen = dict.get(id);
2426
+ const existen = dict.get(key_str);
2425
2427
  if (existen)
2426
2428
  return existen;
2427
2429
  }
2428
2430
  else {
2429
2431
  dict = (host ?? task)[field] = new Map();
2430
2432
  }
2433
+ const id = `${prefix}.${task.name}(${key_str.replace(/^"|"$/g, "'")})`;
2431
2434
  const fiber = new $mol_wire_atom(id, task, host, [key]);
2432
- dict.set(id, fiber);
2435
+ dict.set(key_str, fiber);
2433
2436
  return fiber;
2434
2437
  }
2435
2438
  static watching = new Set();
@@ -2484,7 +2487,7 @@ var $;
2484
2487
  }
2485
2488
  else {
2486
2489
  ;
2487
- (this.host ?? this.task)[this.field()].delete(this[Symbol.toStringTag]);
2490
+ (this.host ?? this.task)[this.field()].delete($mol_key(this.args[0]));
2488
2491
  }
2489
2492
  }
2490
2493
  put(next) {
package/node.test.js CHANGED
@@ -1276,9 +1276,6 @@ var $;
1276
1276
  function $mol_dev_format_auto(obj) {
1277
1277
  if (obj == null)
1278
1278
  return $.$mol_dev_format_shade(String(obj));
1279
- if (typeof obj === 'object' && $.$mol_dev_format_head in obj) {
1280
- return obj[$.$mol_dev_format_head]();
1281
- }
1282
1279
  return [
1283
1280
  'object',
1284
1281
  {
@@ -1943,7 +1940,12 @@ var $;
1943
1940
  [$mol_wire_cursor.fresh]: '🟢',
1944
1941
  [$mol_wire_cursor.final]: '🔵',
1945
1942
  }[this.cursor] ?? this.cursor.toString();
1946
- return $mol_dev_format_div({}, $mol_dev_format_native(this), $mol_dev_format_shade(cursor + ' '), $mol_dev_format_auto(this.cache));
1943
+ return $mol_dev_format_div({}, $mol_owning_check(this, this.cache)
1944
+ ? $mol_dev_format_auto({
1945
+ [$mol_dev_format_head]: () => $mol_dev_format_shade(cursor),
1946
+ [$mol_dev_format_body]: () => $mol_dev_format_native(this),
1947
+ })
1948
+ : $mol_dev_format_shade($mol_dev_format_native(this), cursor), $mol_dev_format_auto(this.cache));
1947
1949
  }
1948
1950
  get $() {
1949
1951
  return (this.host ?? this.task)['$'];
@@ -2411,17 +2413,18 @@ var $;
2411
2413
  const field = task.name + '()';
2412
2414
  let dict = Object.getOwnPropertyDescriptor(host ?? task, field)?.value;
2413
2415
  const prefix = host?.[Symbol.toStringTag] ?? (host instanceof Function ? $$.$mol_func_name(host) : host);
2414
- const id = `${prefix}.${task.name}(${$mol_key(key).replace(/^"|"$/g, "'")})`;
2416
+ const key_str = $mol_key(key);
2415
2417
  if (dict) {
2416
- const existen = dict.get(id);
2418
+ const existen = dict.get(key_str);
2417
2419
  if (existen)
2418
2420
  return existen;
2419
2421
  }
2420
2422
  else {
2421
2423
  dict = (host ?? task)[field] = new Map();
2422
2424
  }
2425
+ const id = `${prefix}.${task.name}(${key_str.replace(/^"|"$/g, "'")})`;
2423
2426
  const fiber = new $mol_wire_atom(id, task, host, [key]);
2424
- dict.set(id, fiber);
2427
+ dict.set(key_str, fiber);
2425
2428
  return fiber;
2426
2429
  }
2427
2430
  static watching = new Set();
@@ -2476,7 +2479,7 @@ var $;
2476
2479
  }
2477
2480
  else {
2478
2481
  ;
2479
- (this.host ?? this.task)[this.field()].delete(this[Symbol.toStringTag]);
2482
+ (this.host ?? this.task)[this.field()].delete($mol_key(this.args[0]));
2480
2483
  }
2481
2484
  }
2482
2485
  put(next) {