@absolutejs/absolute 0.19.0-beta.747 → 0.19.0-beta.748
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/dist/angular/browser.js +35 -1
- package/dist/angular/browser.js.map +5 -4
- package/dist/angular/index.js +35 -1
- package/dist/angular/index.js.map +5 -4
- package/dist/dev/client/handlers/angular.ts +47 -0
- package/dist/src/angular/browser.d.ts +1 -0
- package/dist/src/angular/index.d.ts +1 -0
- package/dist/src/angular/preserveAcrossHmr.d.ts +7 -0
- package/package.json +1 -1
package/dist/angular/index.js
CHANGED
|
@@ -14350,6 +14350,39 @@ var handleAngularPageRequest = async (input) => {
|
|
|
14350
14350
|
};
|
|
14351
14351
|
// src/angular/page.ts
|
|
14352
14352
|
var defineAngularPage = (definition) => definition;
|
|
14353
|
+
// src/angular/preserveAcrossHmr.ts
|
|
14354
|
+
var isDev2 = () => {
|
|
14355
|
+
const scope = globalThis;
|
|
14356
|
+
return Boolean(scope.__DEV__) || Boolean(scope.ngDevMode);
|
|
14357
|
+
};
|
|
14358
|
+
var getCache = () => {
|
|
14359
|
+
const scope = globalThis;
|
|
14360
|
+
return scope.__ABS_HMR_INSTANCE_STATE__ ??= new Map;
|
|
14361
|
+
};
|
|
14362
|
+
var getTracker = () => {
|
|
14363
|
+
const scope = globalThis;
|
|
14364
|
+
return scope.__ABS_HMR_TRACKED_INSTANCES__ ??= new Set;
|
|
14365
|
+
};
|
|
14366
|
+
var restoreFromCache = (instance, key) => {
|
|
14367
|
+
const cache = getCache();
|
|
14368
|
+
const stored = cache.get(key);
|
|
14369
|
+
if (!stored)
|
|
14370
|
+
return;
|
|
14371
|
+
for (const [prop, value] of Object.entries(stored)) {
|
|
14372
|
+
try {
|
|
14373
|
+
instance[prop] = value;
|
|
14374
|
+
} catch {}
|
|
14375
|
+
}
|
|
14376
|
+
};
|
|
14377
|
+
var preserveAcrossHmr = (instance) => {
|
|
14378
|
+
if (!isDev2())
|
|
14379
|
+
return;
|
|
14380
|
+
const key = instance.constructor?.name;
|
|
14381
|
+
if (!key || key === "Object")
|
|
14382
|
+
return;
|
|
14383
|
+
restoreFromCache(instance, key);
|
|
14384
|
+
getTracker().add(new WeakRef(instance));
|
|
14385
|
+
};
|
|
14353
14386
|
// src/angular/pendingTask.ts
|
|
14354
14387
|
import { inject, PendingTasks } from "@angular/core";
|
|
14355
14388
|
var withPendingTask = async (work) => {
|
|
@@ -14666,6 +14699,7 @@ export {
|
|
|
14666
14699
|
withPendingTask,
|
|
14667
14700
|
renderIsland,
|
|
14668
14701
|
provideDeterministicEnv,
|
|
14702
|
+
preserveAcrossHmr,
|
|
14669
14703
|
handleAngularPageRequest,
|
|
14670
14704
|
getCachedRouteData,
|
|
14671
14705
|
defineAngularPage,
|
|
@@ -14684,5 +14718,5 @@ export {
|
|
|
14684
14718
|
ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
|
|
14685
14719
|
};
|
|
14686
14720
|
|
|
14687
|
-
//# debugId=
|
|
14721
|
+
//# debugId=8D1E0475EE1846E464756E2164756E21
|
|
14688
14722
|
//# sourceMappingURL=index.js.map
|