@absolutejs/absolute 0.18.2-beta.2 → 0.18.2-beta.4
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/.absolutejs/prettier.cache.json +12 -11
- package/dist/build.js +6 -15
- package/dist/build.js.map +3 -3
- package/dist/dev/client/constants.ts +25 -0
- package/dist/dev/client/cssUtils.ts +1 -1
- package/dist/dev/client/domDiff.ts +1 -1
- package/dist/dev/client/domState.ts +1 -1
- package/dist/dev/client/errorOverlay.ts +1 -1
- package/dist/dev/client/handlers/angular.ts +1 -1
- package/dist/dev/client/handlers/html.ts +1 -1
- package/dist/dev/client/handlers/htmx.ts +1 -1
- package/dist/dev/client/handlers/rebuild.ts +1 -1
- package/dist/dev/client/handlers/svelte.ts +1 -1
- package/dist/dev/client/hmrClient.ts +1 -1
- package/dist/index.js +6 -15
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* Client-side constants — local copy for dist/dev/client/ portability.
|
|
2
|
+
These values MUST stay in sync with the root constants.ts.
|
|
3
|
+
This file exists because the client files are copied raw to dist/dev/client/
|
|
4
|
+
and cannot import from ../../constants when installed from npm. */
|
|
5
|
+
|
|
6
|
+
export const ANGULAR_INIT_TIMEOUT_MS = 500;
|
|
7
|
+
export const CSS_ERROR_RESOLVE_DELAY_MS = 50;
|
|
8
|
+
export const CSS_MAX_CHECK_ATTEMPTS = 10;
|
|
9
|
+
export const CSS_MAX_PARSE_TIMEOUT_MS = 500;
|
|
10
|
+
export const CSS_SHEET_READY_TIMEOUT_MS = 100;
|
|
11
|
+
export const DOM_UPDATE_DELAY_MS = 50;
|
|
12
|
+
export const FOCUS_ID_PREFIX_LENGTH = 3;
|
|
13
|
+
export const FOCUS_IDX_PREFIX_LENGTH = 4;
|
|
14
|
+
export const FOCUS_NAME_PREFIX_LENGTH = 5;
|
|
15
|
+
export const HMR_UPDATE_TIMEOUT_MS = 2000;
|
|
16
|
+
export const MAX_RECONNECT_ATTEMPTS = 60;
|
|
17
|
+
export const OVERLAY_FADE_DURATION_MS = 150;
|
|
18
|
+
export const PING_INTERVAL_MS = 30_000;
|
|
19
|
+
export const RAF_BATCH_COUNT = 3;
|
|
20
|
+
export const REBUILD_RELOAD_DELAY_MS = 200;
|
|
21
|
+
export const RECONNECT_INITIAL_DELAY_MS = 500;
|
|
22
|
+
export const RECONNECT_POLL_INTERVAL_MS = 300;
|
|
23
|
+
export const SVELTE_CSS_LOAD_TIMEOUT_MS = 500;
|
|
24
|
+
export const UNFOUND_INDEX = -1;
|
|
25
|
+
export const WEBSOCKET_NORMAL_CLOSURE = 1000;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* AbsoluteJS Error Overlay - branded, per-framework, modern styling */
|
|
2
2
|
|
|
3
3
|
import type { ErrorOverlayOptions } from '../../../types/client';
|
|
4
|
-
import { OVERLAY_FADE_DURATION_MS } from '
|
|
4
|
+
import { OVERLAY_FADE_DURATION_MS } from './constants';
|
|
5
5
|
|
|
6
6
|
let errorOverlayElement: HTMLDivElement | null = null;
|
|
7
7
|
let currentOverlayKind: 'compilation' | 'runtime' | null = null;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
callback (which can be async), and crossfades when the callback finishes.
|
|
15
15
|
The user never sees empty/default state — only the before and after. */
|
|
16
16
|
|
|
17
|
-
import { ANGULAR_INIT_TIMEOUT_MS } from '
|
|
17
|
+
import { ANGULAR_INIT_TIMEOUT_MS } from '../constants';
|
|
18
18
|
import {
|
|
19
19
|
saveFormState,
|
|
20
20
|
restoreFormState,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
RECONNECT_INITIAL_DELAY_MS,
|
|
10
10
|
RECONNECT_POLL_INTERVAL_MS,
|
|
11
11
|
WEBSOCKET_NORMAL_CLOSURE
|
|
12
|
-
} from '
|
|
12
|
+
} from './constants';
|
|
13
13
|
import { detectCurrentFramework } from './frameworkDetect';
|
|
14
14
|
import { hideErrorOverlay, showErrorOverlay } from './errorOverlay';
|
|
15
15
|
import { handleAngularUpdate } from './handlers/angular';
|
package/dist/index.js
CHANGED
|
@@ -173571,16 +173571,14 @@ var FRAMEWORK_DIR_KEYS, reloadConfig = async () => {
|
|
|
173571
173571
|
if (!hasChanges)
|
|
173572
173572
|
return;
|
|
173573
173573
|
const oldWatchPaths = new Set(getWatchPaths(oldConfig, state.resolvedPaths));
|
|
173574
|
-
const newlyAddedReact = !oldConfig.reactDirectory && !!newConfig.reactDirectory;
|
|
173575
|
-
const newlyAddedAngular = !oldConfig.angularDirectory && !!newConfig.angularDirectory;
|
|
173576
173574
|
for (const key of FRAMEWORK_DIR_KEYS) {
|
|
173577
173575
|
state.config[key] = newConfig[key];
|
|
173578
173576
|
}
|
|
173579
173577
|
state.resolvedPaths = resolveBuildPaths(state.config);
|
|
173580
|
-
if (
|
|
173578
|
+
if (!oldConfig.reactDirectory && !!newConfig.reactDirectory) {
|
|
173581
173579
|
setDevVendorPaths(computeVendorPaths());
|
|
173582
173580
|
}
|
|
173583
|
-
if (
|
|
173581
|
+
if (!oldConfig.angularDirectory && !!newConfig.angularDirectory) {
|
|
173584
173582
|
setAngularVendorPaths(computeAngularVendorPaths());
|
|
173585
173583
|
}
|
|
173586
173584
|
const newWatchPaths = getWatchPaths(state.config, state.resolvedPaths);
|
|
@@ -173594,6 +173592,8 @@ var FRAMEWORK_DIR_KEYS, reloadConfig = async () => {
|
|
|
173594
173592
|
});
|
|
173595
173593
|
});
|
|
173596
173594
|
}
|
|
173595
|
+
}, rebuildManifest = async (cached) => {
|
|
173596
|
+
const state = cached.hmrState;
|
|
173597
173597
|
try {
|
|
173598
173598
|
const newManifest = await build2({
|
|
173599
173599
|
...state.config,
|
|
@@ -173609,16 +173609,6 @@ var FRAMEWORK_DIR_KEYS, reloadConfig = async () => {
|
|
|
173609
173609
|
await populateAssetStore(state.assetStore, cached.manifest, state.resolvedPaths.buildDir);
|
|
173610
173610
|
await cleanStaleAssets(state.assetStore, cached.manifest, state.resolvedPaths.buildDir);
|
|
173611
173611
|
}
|
|
173612
|
-
if (newlyAddedReact) {
|
|
173613
|
-
await buildReactVendor(state.resolvedPaths.buildDir);
|
|
173614
|
-
const vendorDir = resolve20(state.resolvedPaths.buildDir, "react", "vendor");
|
|
173615
|
-
await loadVendorFiles(state.assetStore, vendorDir, "react");
|
|
173616
|
-
}
|
|
173617
|
-
if (newlyAddedAngular) {
|
|
173618
|
-
await buildAngularVendor(state.resolvedPaths.buildDir);
|
|
173619
|
-
const vendorDir = resolve20(state.resolvedPaths.buildDir, "angular", "vendor");
|
|
173620
|
-
await loadVendorFiles(state.assetStore, vendorDir, "angular");
|
|
173621
|
-
}
|
|
173622
173612
|
} catch {}
|
|
173623
173613
|
}, handleCachedReload = async () => {
|
|
173624
173614
|
const serverMtime = statSync(resolve20(Bun.main)).mtimeMs;
|
|
@@ -173635,6 +173625,7 @@ var FRAMEWORK_DIR_KEYS, reloadConfig = async () => {
|
|
|
173635
173625
|
logServerReload();
|
|
173636
173626
|
if (cached) {
|
|
173637
173627
|
await detectConfigChanges(cached);
|
|
173628
|
+
await rebuildManifest(cached);
|
|
173638
173629
|
}
|
|
173639
173630
|
} else {
|
|
173640
173631
|
globalThis.__hmrSkipServerRestart = true;
|
|
@@ -174174,5 +174165,5 @@ export {
|
|
|
174174
174165
|
ANGULAR_INIT_TIMEOUT_MS
|
|
174175
174166
|
};
|
|
174176
174167
|
|
|
174177
|
-
//# debugId=
|
|
174168
|
+
//# debugId=7812D3EBBB998C4164756E2164756E21
|
|
174178
174169
|
//# sourceMappingURL=index.js.map
|