@absolutejs/absolute 0.19.0-beta.1066 → 0.19.0-beta.1068
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/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/build.js +11 -2
- package/dist/build.js.map +4 -4
- package/dist/dev/client/handlers/svelte.ts +20 -0
- package/dist/index.js +11 -2
- package/dist/index.js.map +4 -4
- package/dist/types/globals.d.ts +6 -0
- package/package.json +1 -1
|
@@ -282,6 +282,26 @@ export const handleSvelteUpdate = (message: {
|
|
|
282
282
|
acceptFn(newModule);
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
+
/* $.hmr_accept swaps component code in place but re-runs
|
|
286
|
+
* the <script> body with the original mount props, so any
|
|
287
|
+
* state seeded from a prop (e.g. a composable doing
|
|
288
|
+
* $state(initialCount)) resets. Remount with the preserved
|
|
289
|
+
* state merged into props — mirroring the bundled-fallback
|
|
290
|
+
* bootstrap — so that state carries across (issue #41). */
|
|
291
|
+
const preserved = window.__HMR_PRESERVED_STATE__;
|
|
292
|
+
const remount = window.__SVELTE_REMOUNT__;
|
|
293
|
+
if (
|
|
294
|
+
typeof remount === 'function' &&
|
|
295
|
+
preserved &&
|
|
296
|
+
Object.keys(preserved).length > 0
|
|
297
|
+
) {
|
|
298
|
+
remount({
|
|
299
|
+
...(window.__INITIAL_PROPS__ ?? {}),
|
|
300
|
+
...preserved
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
window.__HMR_PRESERVED_STATE__ = undefined;
|
|
304
|
+
|
|
285
305
|
if (
|
|
286
306
|
window.__HMR_WS__ &&
|
|
287
307
|
message.data.serverDuration !== undefined
|
package/dist/index.js
CHANGED
|
@@ -23061,6 +23061,14 @@ if (isHMR) {
|
|
|
23061
23061
|
if (typeof window !== "undefined") {
|
|
23062
23062
|
window.__SVELTE_COMPONENT__ = component;
|
|
23063
23063
|
window.__SVELTE_UNMOUNT__ = function() { if (component) { unmount(component); } };
|
|
23064
|
+
window.__SVELTE_REMOUNT__ = function(props) {
|
|
23065
|
+
if (typeof window.__SVELTE_UNMOUNT__ === "function") {
|
|
23066
|
+
try { window.__SVELTE_UNMOUNT__(); } catch (err) { /* ignore */ }
|
|
23067
|
+
}
|
|
23068
|
+
component = mount(Component, { target, props });
|
|
23069
|
+
window.__SVELTE_COMPONENT__ = component;
|
|
23070
|
+
window.__SVELTE_UNMOUNT__ = function() { if (component) { unmount(component); } };
|
|
23071
|
+
};
|
|
23064
23072
|
window.__ABS_SLOT_HYDRATION_PENDING__ = shouldHydrate;
|
|
23065
23073
|
var releaseStreamingSlots = function() {
|
|
23066
23074
|
window.__ABS_SLOT_HYDRATION_PENDING__ = false;
|
|
@@ -33982,7 +33990,8 @@ var init_moduleServer = __esm(() => {
|
|
|
33982
33990
|
};
|
|
33983
33991
|
reactTranspiler = new Bun.Transpiler(reactTranspilerOptions);
|
|
33984
33992
|
reactFastRefreshSupported = probeReactFastRefresh();
|
|
33985
|
-
svelteExternalCss = new Map;
|
|
33993
|
+
svelteExternalCss = globalThis.__svelteExternalCss ?? new Map;
|
|
33994
|
+
globalThis.__svelteExternalCss = svelteExternalCss;
|
|
33986
33995
|
BUN_WRAP_MODULE = `
|
|
33987
33996
|
export function __legacyDecorateClassTS(decorators, target, key, desc) {
|
|
33988
33997
|
var c = arguments.length;
|
|
@@ -46599,5 +46608,5 @@ export {
|
|
|
46599
46608
|
ANGULAR_INIT_TIMEOUT_MS
|
|
46600
46609
|
};
|
|
46601
46610
|
|
|
46602
|
-
//# debugId=
|
|
46611
|
+
//# debugId=119C10E5B5088D9764756E2164756E21
|
|
46603
46612
|
//# sourceMappingURL=index.js.map
|