@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.
@@ -9378,6 +9378,21 @@ var getTracker = () => {
9378
9378
  const scope = globalThis;
9379
9379
  return scope.__ABS_HMR_TRACKED_INSTANCES__ ??= new Set;
9380
9380
  };
9381
+ var getKeyMap = () => {
9382
+ const scope = globalThis;
9383
+ return scope.__ABS_HMR_INSTANCE_KEYS__ ??= new WeakMap;
9384
+ };
9385
+ var getRebootFlag = () => {
9386
+ const scope = globalThis;
9387
+ return scope.__ABS_HMR_REBOOT_IN_PROGRESS__ ??= { value: false };
9388
+ };
9389
+ var buildCacheKey = (instance, key) => {
9390
+ const className = instance.constructor?.name;
9391
+ if (!className || className === "Object")
9392
+ return null;
9393
+ const suffix = key === undefined || key === null ? "" : String(key);
9394
+ return `${className}:${suffix}`;
9395
+ };
9381
9396
  var restoreFromCache = (instance, key) => {
9382
9397
  const cache = getCache();
9383
9398
  const stored = cache.get(key);
@@ -9389,14 +9404,17 @@ var restoreFromCache = (instance, key) => {
9389
9404
  } catch {}
9390
9405
  }
9391
9406
  };
9392
- var preserveAcrossHmr = (instance) => {
9407
+ var preserveAcrossHmr = (instance, key) => {
9393
9408
  if (!isDev())
9394
9409
  return;
9395
- const key = instance.constructor?.name;
9396
- if (!key || key === "Object")
9410
+ const fullKey = buildCacheKey(instance, key);
9411
+ if (fullKey === null)
9397
9412
  return;
9398
- restoreFromCache(instance, key);
9399
9413
  getTracker().add(new WeakRef(instance));
9414
+ getKeyMap().set(instance, fullKey);
9415
+ if (getRebootFlag().value) {
9416
+ restoreFromCache(instance, fullKey);
9417
+ }
9400
9418
  };
9401
9419
  // src/angular/Island.browser.ts
9402
9420
  import"@angular/compiler";
@@ -10181,5 +10199,5 @@ export {
10181
10199
  ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
10182
10200
  };
10183
10201
 
10184
- //# debugId=F7537568EAB7EB8364756E2164756E21
10202
+ //# debugId=3A87E310D66CF71064756E2164756E21
10185
10203
  //# sourceMappingURL=browser.js.map