@absolutejs/absolute 0.18.2-beta.1 → 0.18.2-beta.3

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.
@@ -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;
@@ -8,7 +8,7 @@ import {
8
8
  CSS_SHEET_READY_TIMEOUT_MS,
9
9
  DOM_UPDATE_DELAY_MS,
10
10
  RAF_BATCH_COUNT
11
- } from '../../constants';
11
+ } from './constants';
12
12
 
13
13
  export const getCSSBaseName = (href: string) => {
14
14
  const fileName = href.split('?')[0]?.split('/').pop() || '';
@@ -1,6 +1,6 @@
1
1
  /* DOM diffing/patching for in-place updates (zero flicker) */
2
2
 
3
- import { UNFOUND_INDEX } from '../../constants';
3
+ import { UNFOUND_INDEX } from './constants';
4
4
 
5
5
  type KeyedEntry = {
6
6
  index: number;
@@ -6,7 +6,7 @@ import {
6
6
  FOCUS_IDX_PREFIX_LENGTH,
7
7
  FOCUS_NAME_PREFIX_LENGTH,
8
8
  UNFOUND_INDEX
9
- } from '../../constants';
9
+ } from './constants';
10
10
 
11
11
  const trySetSelectionRange = (
12
12
  element: HTMLInputElement | HTMLTextAreaElement,
@@ -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 '../../constants';
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 '../../../constants';
17
+ import { ANGULAR_INIT_TIMEOUT_MS } from '../constants';
18
18
  import {
19
19
  saveFormState,
20
20
  restoreFormState,
@@ -1,6 +1,6 @@
1
1
  /* HTML + script HMR update handlers */
2
2
 
3
- import { DOM_UPDATE_DELAY_MS } from '../../../constants';
3
+ import { DOM_UPDATE_DELAY_MS } from '../constants';
4
4
  import { patchDOMInPlace } from '../domDiff';
5
5
  import {
6
6
  saveDOMState,
@@ -1,6 +1,6 @@
1
1
  /* HTMX HMR update handler */
2
2
 
3
- import { DOM_UPDATE_DELAY_MS } from '../../../constants';
3
+ import { DOM_UPDATE_DELAY_MS } from '../constants';
4
4
  import { patchDOMInPlace } from '../domDiff';
5
5
  import {
6
6
  saveDOMState,
@@ -1,6 +1,6 @@
1
1
  /* Rebuild, manifest, module-update, and error handlers */
2
2
 
3
- import { REBUILD_RELOAD_DELAY_MS } from '../../../constants';
3
+ import { REBUILD_RELOAD_DELAY_MS } from '../constants';
4
4
  import {
5
5
  hideErrorOverlay,
6
6
  isRuntimeErrorOverlay,
@@ -1,6 +1,6 @@
1
1
  /* Svelte HMR update handler */
2
2
 
3
- import { SVELTE_CSS_LOAD_TIMEOUT_MS } from '../../../constants';
3
+ import { SVELTE_CSS_LOAD_TIMEOUT_MS } from '../constants';
4
4
  import {
5
5
  saveDOMState,
6
6
  restoreDOMState,
@@ -9,7 +9,7 @@ import {
9
9
  RECONNECT_INITIAL_DELAY_MS,
10
10
  RECONNECT_POLL_INTERVAL_MS,
11
11
  WEBSOCKET_NORMAL_CLOSURE
12
- } from '../../constants';
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
@@ -173594,30 +173594,32 @@ var FRAMEWORK_DIR_KEYS, reloadConfig = async () => {
173594
173594
  });
173595
173595
  });
173596
173596
  }
173597
- const newManifest = await build2({
173598
- ...state.config,
173599
- mode: "development",
173600
- options: {
173601
- ...state.config.options,
173602
- injectHMR: true
173597
+ try {
173598
+ const newManifest = await build2({
173599
+ ...state.config,
173600
+ mode: "development",
173601
+ options: {
173602
+ ...state.config.options,
173603
+ injectHMR: true
173604
+ }
173605
+ });
173606
+ if (newManifest) {
173607
+ Object.assign(cached.manifest, newManifest);
173608
+ state.manifest = cached.manifest;
173609
+ await populateAssetStore(state.assetStore, cached.manifest, state.resolvedPaths.buildDir);
173610
+ await cleanStaleAssets(state.assetStore, cached.manifest, state.resolvedPaths.buildDir);
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");
173603
173621
  }
173604
- });
173605
- if (newManifest) {
173606
- Object.assign(cached.manifest, newManifest);
173607
- state.manifest = cached.manifest;
173608
- await populateAssetStore(state.assetStore, cached.manifest, state.resolvedPaths.buildDir);
173609
- await cleanStaleAssets(state.assetStore, cached.manifest, state.resolvedPaths.buildDir);
173610
- }
173611
- if (newlyAddedReact) {
173612
- await buildReactVendor(state.resolvedPaths.buildDir);
173613
- const vendorDir = resolve20(state.resolvedPaths.buildDir, "react", "vendor");
173614
- await loadVendorFiles(state.assetStore, vendorDir, "react");
173615
- }
173616
- if (newlyAddedAngular) {
173617
- await buildAngularVendor(state.resolvedPaths.buildDir);
173618
- const vendorDir = resolve20(state.resolvedPaths.buildDir, "angular", "vendor");
173619
- await loadVendorFiles(state.assetStore, vendorDir, "angular");
173620
- }
173622
+ } catch {}
173621
173623
  }, handleCachedReload = async () => {
173622
173624
  const serverMtime = statSync(resolve20(Bun.main)).mtimeMs;
173623
173625
  const lastMtime = globalThis.__hmrServerMtime;
@@ -174172,5 +174174,5 @@ export {
174172
174174
  ANGULAR_INIT_TIMEOUT_MS
174173
174175
  };
174174
174176
 
174175
- //# debugId=25D616BDD6F0343864756E2164756E21
174177
+ //# debugId=25E41571381617E364756E2164756E21
174176
174178
  //# sourceMappingURL=index.js.map