@absolutejs/absolute 0.19.0-beta.749 → 0.19.0-beta.750

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.
@@ -14374,6 +14374,21 @@ var getTracker = () => {
14374
14374
  const scope = globalThis;
14375
14375
  return scope.__ABS_HMR_TRACKED_INSTANCES__ ??= new Set;
14376
14376
  };
14377
+ var getKeyMap = () => {
14378
+ const scope = globalThis;
14379
+ return scope.__ABS_HMR_INSTANCE_KEYS__ ??= new WeakMap;
14380
+ };
14381
+ var getRebootFlag = () => {
14382
+ const scope = globalThis;
14383
+ return scope.__ABS_HMR_REBOOT_IN_PROGRESS__ ??= { value: false };
14384
+ };
14385
+ var buildCacheKey = (instance, key) => {
14386
+ const className = instance.constructor?.name;
14387
+ if (!className || className === "Object")
14388
+ return null;
14389
+ const suffix = key === undefined || key === null ? "" : String(key);
14390
+ return `${className}:${suffix}`;
14391
+ };
14377
14392
  var restoreFromCache = (instance, key) => {
14378
14393
  const cache = getCache();
14379
14394
  const stored = cache.get(key);
@@ -14385,14 +14400,17 @@ var restoreFromCache = (instance, key) => {
14385
14400
  } catch {}
14386
14401
  }
14387
14402
  };
14388
- var preserveAcrossHmr = (instance) => {
14403
+ var preserveAcrossHmr = (instance, key) => {
14389
14404
  if (!isDev2())
14390
14405
  return;
14391
- const key = instance.constructor?.name;
14392
- if (!key || key === "Object")
14406
+ const fullKey = buildCacheKey(instance, key);
14407
+ if (fullKey === null)
14393
14408
  return;
14394
- restoreFromCache(instance, key);
14395
14409
  getTracker().add(new WeakRef(instance));
14410
+ getKeyMap().set(instance, fullKey);
14411
+ if (getRebootFlag().value) {
14412
+ restoreFromCache(instance, fullKey);
14413
+ }
14396
14414
  };
14397
14415
  // src/angular/pendingTask.ts
14398
14416
  import { inject, PendingTasks } from "@angular/core";
@@ -14729,5 +14747,5 @@ export {
14729
14747
  ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
14730
14748
  };
14731
14749
 
14732
- //# debugId=23B9411230D851E064756E2164756E21
14750
+ //# debugId=ADBF5B233B29BFC764756E2164756E21
14733
14751
  //# sourceMappingURL=index.js.map