@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.
@@ -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
@@ -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 (newlyAddedReact) {
173578
+ if (!oldConfig.reactDirectory && !!newConfig.reactDirectory) {
173581
173579
  setDevVendorPaths(computeVendorPaths());
173582
173580
  }
173583
- if (newlyAddedAngular) {
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=25E41571381617E364756E2164756E21
174168
+ //# debugId=7812D3EBBB998C4164756E2164756E21
174178
174169
  //# sourceMappingURL=index.js.map