@absolutejs/absolute 0.19.0-beta.859 → 0.19.0-beta.860
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/index.js
CHANGED
|
@@ -9836,6 +9836,19 @@ var ENTITY_DECORATOR_RE, buildHmrTail = (className, encodedIdLiteral) => `
|
|
|
9836
9836
|
|
|
9837
9837
|
// absolutejs HMR \u2014 auto-generated; mirrors compileHmrInitializer from
|
|
9838
9838
|
// @angular/compiler with import.meta.hot adapted to globalThis.__angularHmr.
|
|
9839
|
+
//
|
|
9840
|
+
// We invoke \`\u0275\u0275replaceMetadata\` rather than calling the surgical
|
|
9841
|
+
// update directly. Both end up applying the new \`\u0275cmp\` to the class,
|
|
9842
|
+
// but \`\u0275\u0275replaceMetadata\` ALSO walks the LView tree and runs
|
|
9843
|
+
// \`recreateLView\` on each affected instance \u2014 that's what triggers
|
|
9844
|
+
// the actual template re-render, style swap, and lifecycle hook
|
|
9845
|
+
// re-fire. Calling the update fn directly mutates the def but
|
|
9846
|
+
// Angular's runtime never observes it, so views don't update.
|
|
9847
|
+
//
|
|
9848
|
+
// Pipes / directives / services don't have a \`\u0275cmp\` and aren't
|
|
9849
|
+
// tracked in the LView tree the same way; for those we still fall
|
|
9850
|
+
// back to a direct call (the surgical module's job is just to
|
|
9851
|
+
// patch the prototype, no view recreation needed).
|
|
9839
9852
|
{
|
|
9840
9853
|
const __ng_hmr_id = ${encodedIdLiteral};
|
|
9841
9854
|
const __ng_hmr_load = async (t) => {
|
|
@@ -9843,7 +9856,21 @@ var ENTITY_DECORATOR_RE, buildHmrTail = (className, encodedIdLiteral) => `
|
|
|
9843
9856
|
import('/@ng/component?c=' + encodeURIComponent(__ng_hmr_id) + '&t=' + t),
|
|
9844
9857
|
import('@angular/core')
|
|
9845
9858
|
]);
|
|
9846
|
-
if (u
|
|
9859
|
+
if (!u || typeof u.default !== 'function') return;
|
|
9860
|
+
if (${className}.\u0275cmp && typeof core.\u0275\u0275replaceMetadata === 'function') {
|
|
9861
|
+
core.\u0275\u0275replaceMetadata(
|
|
9862
|
+
${className},
|
|
9863
|
+
u.default,
|
|
9864
|
+
[core],
|
|
9865
|
+
[],
|
|
9866
|
+
import.meta,
|
|
9867
|
+
__ng_hmr_id
|
|
9868
|
+
);
|
|
9869
|
+
} else {
|
|
9870
|
+
// Non-component entity (pipe / directive / service) \u2014 no
|
|
9871
|
+
// LView tree to walk, just apply the prototype patch.
|
|
9872
|
+
u.default(${className}, [core]);
|
|
9873
|
+
}
|
|
9847
9874
|
};
|
|
9848
9875
|
if (typeof globalThis !== 'undefined' &&
|
|
9849
9876
|
globalThis.__angularHmr &&
|
|
@@ -30223,5 +30250,5 @@ export {
|
|
|
30223
30250
|
ANGULAR_INIT_TIMEOUT_MS
|
|
30224
30251
|
};
|
|
30225
30252
|
|
|
30226
|
-
//# debugId=
|
|
30253
|
+
//# debugId=3EAC3B6AC15A2EA264756E2164756E21
|
|
30227
30254
|
//# sourceMappingURL=index.js.map
|