@absolutejs/absolute 0.19.0-beta.1010 → 0.19.0-beta.1012

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.
@@ -8,7 +8,7 @@ import type {} from '../../types/globals';
8
8
  is preserved so new component registrations feed into the SAME RefreshRuntime
9
9
  instance that owns the current React tree. */
10
10
 
11
- import * as RefreshRuntime from 'react-refresh/runtime';
11
+ import * as RefreshRuntime from './vendor/reactRefreshRuntime.js';
12
12
 
13
13
  if (!window.$RefreshRuntime$) {
14
14
  RefreshRuntime.injectIntoGlobalHook(window);
@@ -0,0 +1,12 @@
1
+ import type {} from '../../../types/globals';
2
+ /* Typed surface for the vendored react-refresh runtime bundle
3
+ * (reactRefreshRuntime.js). Colocated with the vendored artifact, mirroring
4
+ * the vendor/lview pattern. Only the members the framework actually uses are
5
+ * declared. */
6
+
7
+ export const createSignatureFunctionForTransform: () => (
8
+ type: unknown
9
+ ) => unknown;
10
+ export const injectIntoGlobalHook: (win: Window) => void;
11
+ export const performReactRefresh: () => void;
12
+ export const register: (type: unknown, id: string) => void;
@@ -0,0 +1,313 @@
1
+ // @ts-nocheck
2
+ /* VENDORED: react-refresh@0.18.0 runtime (react-refresh/runtime), bundled to
3
+ * browser ESM with NODE_ENV="development". Dev-HMR only; never shipped to a
4
+ * client bundle. Regenerate with: bun run scripts/vendorReactRefresh.ts */
5
+ var __create = Object.create;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __defProp = Object.defineProperty;
8
+ var __getOwnPropNames = Object.getOwnPropertyNames;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ function __accessProp(key) {
11
+ return this[key];
12
+ }
13
+ var __toESMCache_node;
14
+ var __toESMCache_esm;
15
+ var __toESM = (mod, isNodeMode, target) => {
16
+ var canCache = mod != null && typeof mod === "object";
17
+ if (canCache) {
18
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
19
+ var cached = cache.get(mod);
20
+ if (cached)
21
+ return cached;
22
+ }
23
+ target = mod != null ? __create(__getProtoOf(mod)) : {};
24
+ const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
25
+ for (let key of __getOwnPropNames(mod))
26
+ if (!__hasOwnProp.call(to, key))
27
+ __defProp(to, key, {
28
+ get: __accessProp.bind(mod, key),
29
+ enumerable: true
30
+ });
31
+ if (canCache)
32
+ cache.set(mod, to);
33
+ return to;
34
+ };
35
+ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
36
+
37
+ // node_modules/react-refresh/cjs/react-refresh-runtime.development.js
38
+ var require_react_refresh_runtime_development = __commonJS((exports) => {
39
+ (function() {
40
+ function computeFullKey(signature) {
41
+ if (signature.fullKey !== null)
42
+ return signature.fullKey;
43
+ var fullKey = signature.ownKey;
44
+ try {
45
+ var hooks = signature.getCustomHooks();
46
+ } catch (err) {
47
+ return signature.forceReset = true, signature.fullKey = fullKey;
48
+ }
49
+ for (var i = 0;i < hooks.length; i++) {
50
+ var hook = hooks[i];
51
+ if (typeof hook !== "function")
52
+ return signature.forceReset = true, signature.fullKey = fullKey;
53
+ hook = allSignaturesByType.get(hook);
54
+ if (hook !== undefined) {
55
+ var nestedHookKey = computeFullKey(hook);
56
+ hook.forceReset && (signature.forceReset = true);
57
+ fullKey += `
58
+ ---
59
+ ` + nestedHookKey;
60
+ }
61
+ }
62
+ return signature.fullKey = fullKey;
63
+ }
64
+ function resolveFamily(type) {
65
+ return updatedFamiliesByType.get(type);
66
+ }
67
+ function cloneMap(map) {
68
+ var clone = new Map;
69
+ map.forEach(function(value, key) {
70
+ clone.set(key, value);
71
+ });
72
+ return clone;
73
+ }
74
+ function cloneSet(set) {
75
+ var clone = new Set;
76
+ set.forEach(function(value) {
77
+ clone.add(value);
78
+ });
79
+ return clone;
80
+ }
81
+ function getProperty(object, property) {
82
+ try {
83
+ return object[property];
84
+ } catch (err) {}
85
+ }
86
+ function register(type, id) {
87
+ if (!(type === null || typeof type !== "function" && typeof type !== "object" || allFamiliesByType.has(type))) {
88
+ var family = allFamiliesByID.get(id);
89
+ family === undefined ? (family = { current: type }, allFamiliesByID.set(id, family)) : pendingUpdates.push([family, type]);
90
+ allFamiliesByType.set(type, family);
91
+ if (typeof type === "object" && type !== null)
92
+ switch (getProperty(type, "$$typeof")) {
93
+ case REACT_FORWARD_REF_TYPE:
94
+ register(type.render, id + "$render");
95
+ break;
96
+ case REACT_MEMO_TYPE:
97
+ register(type.type, id + "$type");
98
+ }
99
+ }
100
+ }
101
+ function setSignature(type, key) {
102
+ var forceReset = 2 < arguments.length && arguments[2] !== undefined ? arguments[2] : false, getCustomHooks = 3 < arguments.length ? arguments[3] : undefined;
103
+ allSignaturesByType.has(type) || allSignaturesByType.set(type, {
104
+ forceReset,
105
+ ownKey: key,
106
+ fullKey: null,
107
+ getCustomHooks: getCustomHooks || function() {
108
+ return [];
109
+ }
110
+ });
111
+ if (typeof type === "object" && type !== null)
112
+ switch (getProperty(type, "$$typeof")) {
113
+ case REACT_FORWARD_REF_TYPE:
114
+ setSignature(type.render, key, forceReset, getCustomHooks);
115
+ break;
116
+ case REACT_MEMO_TYPE:
117
+ setSignature(type.type, key, forceReset, getCustomHooks);
118
+ }
119
+ }
120
+ function collectCustomHooksForSignature(type) {
121
+ type = allSignaturesByType.get(type);
122
+ type !== undefined && computeFullKey(type);
123
+ }
124
+ var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_MEMO_TYPE = Symbol.for("react.memo"), PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map, allFamiliesByID = new Map, allFamiliesByType = new PossiblyWeakMap, allSignaturesByType = new PossiblyWeakMap, updatedFamiliesByType = new PossiblyWeakMap, pendingUpdates = [], helpersByRendererID = new Map, helpersByRoot = new Map, mountedRoots = new Set, failedRoots = new Set, rootElements = typeof WeakMap === "function" ? new WeakMap : null, isPerformingRefresh = false;
125
+ exports._getMountedRootCount = function() {
126
+ return mountedRoots.size;
127
+ };
128
+ exports.collectCustomHooksForSignature = collectCustomHooksForSignature;
129
+ exports.createSignatureFunctionForTransform = function() {
130
+ var savedType, hasCustomHooks, didCollectHooks = false;
131
+ return function(type, key, forceReset, getCustomHooks) {
132
+ if (typeof key === "string")
133
+ return savedType || (savedType = type, hasCustomHooks = typeof getCustomHooks === "function"), type == null || typeof type !== "function" && typeof type !== "object" || setSignature(type, key, forceReset, getCustomHooks), type;
134
+ !didCollectHooks && hasCustomHooks && (didCollectHooks = true, collectCustomHooksForSignature(savedType));
135
+ };
136
+ };
137
+ exports.getFamilyByID = function(id) {
138
+ return allFamiliesByID.get(id);
139
+ };
140
+ exports.getFamilyByType = function(type) {
141
+ return allFamiliesByType.get(type);
142
+ };
143
+ exports.hasUnrecoverableErrors = function() {
144
+ return false;
145
+ };
146
+ exports.injectIntoGlobalHook = function(globalObject) {
147
+ var hook = globalObject.__REACT_DEVTOOLS_GLOBAL_HOOK__;
148
+ if (hook === undefined) {
149
+ var nextID = 0;
150
+ globalObject.__REACT_DEVTOOLS_GLOBAL_HOOK__ = hook = {
151
+ renderers: new Map,
152
+ supportsFiber: true,
153
+ inject: function() {
154
+ return nextID++;
155
+ },
156
+ onScheduleFiberRoot: function() {},
157
+ onCommitFiberRoot: function() {},
158
+ onCommitFiberUnmount: function() {}
159
+ };
160
+ }
161
+ if (hook.isDisabled)
162
+ console.warn("Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). Fast Refresh is not compatible with this shim and will be disabled.");
163
+ else {
164
+ var oldInject = hook.inject;
165
+ hook.inject = function(injected) {
166
+ var id = oldInject.apply(this, arguments);
167
+ typeof injected.scheduleRefresh === "function" && typeof injected.setRefreshHandler === "function" && helpersByRendererID.set(id, injected);
168
+ return id;
169
+ };
170
+ hook.renderers.forEach(function(injected, id) {
171
+ typeof injected.scheduleRefresh === "function" && typeof injected.setRefreshHandler === "function" && helpersByRendererID.set(id, injected);
172
+ });
173
+ var oldOnCommitFiberRoot = hook.onCommitFiberRoot, oldOnScheduleFiberRoot = hook.onScheduleFiberRoot || function() {};
174
+ hook.onScheduleFiberRoot = function(id, root, children) {
175
+ isPerformingRefresh || (failedRoots.delete(root), rootElements !== null && rootElements.set(root, children));
176
+ return oldOnScheduleFiberRoot.apply(this, arguments);
177
+ };
178
+ hook.onCommitFiberRoot = function(id, root, maybePriorityLevel, didError) {
179
+ var helpers = helpersByRendererID.get(id);
180
+ if (helpers !== undefined) {
181
+ helpersByRoot.set(root, helpers);
182
+ helpers = root.current;
183
+ var alternate = helpers.alternate;
184
+ alternate !== null ? (alternate = alternate.memoizedState != null && alternate.memoizedState.element != null && mountedRoots.has(root), helpers = helpers.memoizedState != null && helpers.memoizedState.element != null, !alternate && helpers ? (mountedRoots.add(root), failedRoots.delete(root)) : alternate && helpers || (alternate && !helpers ? (mountedRoots.delete(root), didError ? failedRoots.add(root) : helpersByRoot.delete(root)) : alternate || helpers || didError && failedRoots.add(root))) : mountedRoots.add(root);
185
+ }
186
+ return oldOnCommitFiberRoot.apply(this, arguments);
187
+ };
188
+ }
189
+ };
190
+ exports.isLikelyComponentType = function(type) {
191
+ switch (typeof type) {
192
+ case "function":
193
+ if (type.prototype != null) {
194
+ if (type.prototype.isReactComponent)
195
+ return true;
196
+ var ownNames = Object.getOwnPropertyNames(type.prototype);
197
+ if (1 < ownNames.length || ownNames[0] !== "constructor" || type.prototype.__proto__ !== Object.prototype)
198
+ return false;
199
+ }
200
+ type = type.name || type.displayName;
201
+ return typeof type === "string" && /^[A-Z]/.test(type);
202
+ case "object":
203
+ if (type != null)
204
+ switch (getProperty(type, "$$typeof")) {
205
+ case REACT_FORWARD_REF_TYPE:
206
+ case REACT_MEMO_TYPE:
207
+ return true;
208
+ }
209
+ return false;
210
+ default:
211
+ return false;
212
+ }
213
+ };
214
+ exports.performReactRefresh = function() {
215
+ if (pendingUpdates.length === 0 || isPerformingRefresh)
216
+ return null;
217
+ isPerformingRefresh = true;
218
+ try {
219
+ var staleFamilies = new Set, updatedFamilies = new Set, updates = pendingUpdates;
220
+ pendingUpdates = [];
221
+ updates.forEach(function(_ref) {
222
+ var family = _ref[0];
223
+ _ref = _ref[1];
224
+ var prevType = family.current;
225
+ updatedFamiliesByType.set(prevType, family);
226
+ updatedFamiliesByType.set(_ref, family);
227
+ family.current = _ref;
228
+ prevType.prototype && prevType.prototype.isReactComponent || _ref.prototype && _ref.prototype.isReactComponent ? _ref = false : (prevType = allSignaturesByType.get(prevType), _ref = allSignaturesByType.get(_ref), _ref = prevType === undefined && _ref === undefined || prevType !== undefined && _ref !== undefined && computeFullKey(prevType) === computeFullKey(_ref) && !_ref.forceReset ? true : false);
229
+ _ref ? updatedFamilies.add(family) : staleFamilies.add(family);
230
+ });
231
+ var update = {
232
+ updatedFamilies,
233
+ staleFamilies
234
+ };
235
+ helpersByRendererID.forEach(function(helpers) {
236
+ helpers.setRefreshHandler(resolveFamily);
237
+ });
238
+ var didError = false, firstError = null, failedRootsSnapshot = cloneSet(failedRoots), mountedRootsSnapshot = cloneSet(mountedRoots), helpersByRootSnapshot = cloneMap(helpersByRoot);
239
+ failedRootsSnapshot.forEach(function(root) {
240
+ var helpers = helpersByRootSnapshot.get(root);
241
+ if (helpers === undefined)
242
+ throw Error("Could not find helpers for a root. This is a bug in React Refresh.");
243
+ failedRoots.has(root);
244
+ if (rootElements !== null && rootElements.has(root)) {
245
+ var element = rootElements.get(root);
246
+ try {
247
+ helpers.scheduleRoot(root, element);
248
+ } catch (err) {
249
+ didError || (didError = true, firstError = err);
250
+ }
251
+ }
252
+ });
253
+ mountedRootsSnapshot.forEach(function(root) {
254
+ var helpers = helpersByRootSnapshot.get(root);
255
+ if (helpers === undefined)
256
+ throw Error("Could not find helpers for a root. This is a bug in React Refresh.");
257
+ mountedRoots.has(root);
258
+ try {
259
+ helpers.scheduleRefresh(root, update);
260
+ } catch (err) {
261
+ didError || (didError = true, firstError = err);
262
+ }
263
+ });
264
+ if (didError)
265
+ throw firstError;
266
+ return update;
267
+ } finally {
268
+ isPerformingRefresh = false;
269
+ }
270
+ };
271
+ exports.register = register;
272
+ exports.setSignature = setSignature;
273
+ })();
274
+ });
275
+
276
+ // node_modules/react-refresh/runtime.js
277
+ var require_runtime = __commonJS((exports, module) => {
278
+ var react_refresh_runtime_development = __toESM(require_react_refresh_runtime_development());
279
+ if (false) {} else {
280
+ module.exports = react_refresh_runtime_development;
281
+ }
282
+ });
283
+
284
+ // .vendor_react_refresh_tmp/entry.ts
285
+ var import_runtime = __toESM(require_runtime(), 1);
286
+ var import_runtime2 = __toESM(require_runtime(), 1);
287
+ var export_setSignature = import_runtime.setSignature;
288
+ var export_register = import_runtime.register;
289
+ var export_performReactRefresh = import_runtime.performReactRefresh;
290
+ var export_isLikelyComponentType = import_runtime.isLikelyComponentType;
291
+ var export_injectIntoGlobalHook = import_runtime.injectIntoGlobalHook;
292
+ var export_hasUnrecoverableErrors = import_runtime.hasUnrecoverableErrors;
293
+ var export_getFamilyByType = import_runtime.getFamilyByType;
294
+ var export_getFamilyByID = import_runtime.getFamilyByID;
295
+ var export_default = import_runtime2.default;
296
+ var export_createSignatureFunctionForTransform = import_runtime.createSignatureFunctionForTransform;
297
+ var export_collectCustomHooksForSignature = import_runtime.collectCustomHooksForSignature;
298
+ var export__getMountedRootCount = import_runtime._getMountedRootCount;
299
+
300
+ export {
301
+ export_setSignature as setSignature,
302
+ export_register as register,
303
+ export_performReactRefresh as performReactRefresh,
304
+ export_isLikelyComponentType as isLikelyComponentType,
305
+ export_injectIntoGlobalHook as injectIntoGlobalHook,
306
+ export_hasUnrecoverableErrors as hasUnrecoverableErrors,
307
+ export_getFamilyByType as getFamilyByType,
308
+ export_getFamilyByID as getFamilyByID,
309
+ export_default as default,
310
+ export_createSignatureFunctionForTransform as createSignatureFunctionForTransform,
311
+ export_collectCustomHooksForSignature as collectCustomHooksForSignature,
312
+ export__getMountedRootCount as _getMountedRootCount
313
+ };
package/dist/index.js CHANGED
@@ -9083,7 +9083,7 @@ var indexContentCache, resolveDevClientDir = () => {
9083
9083
  if (existsSync8(fromNodeModules))
9084
9084
  return fromNodeModules;
9085
9085
  return resolve13(import.meta.dir, "./dev/client");
9086
- }, devClientDir, errorOverlayPath, hmrClientPath, refreshSetupPath, generateReactIndexFiles = async (reactPagesDirectory, reactIndexesDirectory, isDev2 = false) => {
9086
+ }, devClientDir, errorOverlayPath, hmrClientPath, refreshSetupPath, reactRefreshRuntimePath, generateReactIndexFiles = async (reactPagesDirectory, reactIndexesDirectory, isDev2 = false) => {
9087
9087
  if (!existsSync8(reactIndexesDirectory)) {
9088
9088
  mkdirSync2(reactIndexesDirectory, { recursive: true });
9089
9089
  }
@@ -9416,6 +9416,7 @@ var init_generateReactIndexes = __esm(() => {
9416
9416
  errorOverlayPath = join9(devClientDir, "errorOverlay.ts").replace(/\\/g, "/");
9417
9417
  hmrClientPath = join9(devClientDir, "hmrClient.ts").replace(/\\/g, "/");
9418
9418
  refreshSetupPath = join9(devClientDir, "reactRefreshSetup.ts").replace(/\\/g, "/");
9419
+ reactRefreshRuntimePath = join9(devClientDir, "vendor", "reactRefreshRuntime.js").replace(/\\/g, "/");
9419
9420
  });
9420
9421
 
9421
9422
  // src/build/wrapHTMLScript.ts
@@ -18953,21 +18954,9 @@ var resolveJsxDevRuntimeCompatPath = () => {
18953
18954
  }
18954
18955
  }
18955
18956
  return (candidates[0] ?? resolve27(import.meta.dir, "react", "jsxDevRuntimeCompat.js")).replace(/\\/g, "/");
18956
- }, jsxDevRuntimeCompatPath, reactSpecifiers, isResolvable = (specifier) => {
18957
- try {
18958
- Bun.resolveSync(specifier, process.cwd());
18959
- return true;
18960
- } catch {
18961
- return false;
18962
- }
18963
- }, resolveVendorSpecifiers = () => {
18964
- if (isResolvable("react-refresh/runtime")) {
18965
- return [...reactSpecifiers, "react-refresh/runtime"];
18966
- }
18967
- return reactSpecifiers;
18968
- }, toSafeFileName = (specifier) => specifier.replace(/\//g, "_"), computeVendorPaths = () => {
18957
+ }, jsxDevRuntimeCompatPath, reactSpecifiers, toSafeFileName = (specifier) => specifier.replace(/\//g, "_"), computeVendorPaths = () => {
18969
18958
  const paths = {};
18970
- for (const specifier of resolveVendorSpecifiers()) {
18959
+ for (const specifier of reactSpecifiers) {
18971
18960
  paths[specifier] = `/react/vendor/${toSafeFileName(specifier)}.js`;
18972
18961
  }
18973
18962
  return paths;
@@ -18993,7 +18982,7 @@ var resolveJsxDevRuntimeCompatPath = () => {
18993
18982
  mkdirSync8(vendorDir, { recursive: true });
18994
18983
  const tmpDir = join31(buildDir, "_vendor_tmp");
18995
18984
  mkdirSync8(tmpDir, { recursive: true });
18996
- const specifiers = resolveVendorSpecifiers();
18985
+ const specifiers = reactSpecifiers;
18997
18986
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
18998
18987
  const safeName = toSafeFileName(specifier);
18999
18988
  const entryPath = join31(tmpDir, `${safeName}.ts`);
@@ -19064,7 +19053,7 @@ import { mkdirSync as mkdirSync9 } from "fs";
19064
19053
  import { join as join32 } from "path";
19065
19054
  import { rm as rm6 } from "fs/promises";
19066
19055
  var {build: bunBuild4, Glob: Glob7 } = globalThis.Bun;
19067
- var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => jitMode ? [...REQUIRED_ANGULAR_SPECIFIERS_BASE, "@angular/compiler"] : REQUIRED_ANGULAR_SPECIFIERS_BASE, SERVER_ONLY_ANGULAR_SPECIFIERS, BUILD_ONLY_ANGULAR_SPECIFIER_PREFIXES, isBuildOnlyAngularSpecifier = (spec) => BUILD_ONLY_ANGULAR_SPECIFIER_PREFIXES.some((prefix) => spec === prefix || spec.startsWith(`${prefix}/`)), SCAN_SKIP_DIRS, isResolvable2 = (specifier) => {
19056
+ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => jitMode ? [...REQUIRED_ANGULAR_SPECIFIERS_BASE, "@angular/compiler"] : REQUIRED_ANGULAR_SPECIFIERS_BASE, SERVER_ONLY_ANGULAR_SPECIFIERS, BUILD_ONLY_ANGULAR_SPECIFIER_PREFIXES, isBuildOnlyAngularSpecifier = (spec) => BUILD_ONLY_ANGULAR_SPECIFIER_PREFIXES.some((prefix) => spec === prefix || spec.startsWith(`${prefix}/`)), SCAN_SKIP_DIRS, isResolvable = (specifier) => {
19068
19057
  try {
19069
19058
  Bun.resolveSync(specifier, process.cwd());
19070
19059
  return true;
@@ -19156,7 +19145,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
19156
19145
  angular.add(spec);
19157
19146
  }
19158
19147
  await collectTransitiveAngularSpecs([...angular, ...transitiveRoots], angular);
19159
- return Array.from(angular).filter(isResolvable2);
19148
+ return Array.from(angular).filter(isResolvable);
19160
19149
  }, buildAngularVendor = async (buildDir, directories = [], linkerJitMode = false, depVendorSpecifiers = []) => {
19161
19150
  const vendorDir = join32(buildDir, "angular", "vendor");
19162
19151
  mkdirSync9(vendorDir, { recursive: true });
@@ -19203,7 +19192,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
19203
19192
  const browserSpecs = await resolveAngularSpecifiers(directories, linkerJitMode);
19204
19193
  const allSpecs = new Set(browserSpecs);
19205
19194
  for (const spec of SERVER_ONLY_ANGULAR_SPECIFIERS) {
19206
- if (isResolvable2(spec))
19195
+ if (isResolvable(spec))
19207
19196
  allSpecs.add(spec);
19208
19197
  }
19209
19198
  const specifiers = Array.from(allSpecs);
@@ -19240,7 +19229,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
19240
19229
  const browserSpecs = await resolveAngularSpecifiers(directories, linkerJitMode);
19241
19230
  const allSpecs = new Set(browserSpecs);
19242
19231
  for (const spec of SERVER_ONLY_ANGULAR_SPECIFIERS) {
19243
- if (isResolvable2(spec))
19232
+ if (isResolvable(spec))
19244
19233
  allSpecs.add(spec);
19245
19234
  }
19246
19235
  return computeAngularServerVendorPaths(buildDir, Array.from(allSpecs));
@@ -19357,15 +19346,15 @@ import { mkdirSync as mkdirSync11 } from "fs";
19357
19346
  import { join as join34 } from "path";
19358
19347
  import { rm as rm8 } from "fs/promises";
19359
19348
  var {build: bunBuild6 } = globalThis.Bun;
19360
- var svelteSpecifiers, isResolvable3 = (specifier) => {
19349
+ var svelteSpecifiers, isResolvable2 = (specifier) => {
19361
19350
  try {
19362
19351
  __require.resolve(specifier);
19363
19352
  return true;
19364
19353
  } catch {
19365
19354
  return false;
19366
19355
  }
19367
- }, resolveVendorSpecifiers2 = () => svelteSpecifiers.filter(isResolvable3), toSafeFileName4 = (specifier) => specifier.replace(/\//g, "_"), buildSvelteVendor = async (buildDir) => {
19368
- const specifiers = resolveVendorSpecifiers2();
19356
+ }, resolveVendorSpecifiers = () => svelteSpecifiers.filter(isResolvable2), toSafeFileName4 = (specifier) => specifier.replace(/\//g, "_"), buildSvelteVendor = async (buildDir) => {
19357
+ const specifiers = resolveVendorSpecifiers();
19369
19358
  if (specifiers.length === 0)
19370
19359
  return;
19371
19360
  const vendorDir = join34(buildDir, "svelte", "vendor");
@@ -19395,7 +19384,7 @@ var svelteSpecifiers, isResolvable3 = (specifier) => {
19395
19384
  }
19396
19385
  }, computeSvelteVendorPaths = () => {
19397
19386
  const paths = {};
19398
- for (const specifier of resolveVendorSpecifiers2()) {
19387
+ for (const specifier of resolveVendorSpecifiers()) {
19399
19388
  paths[specifier] = `/svelte/vendor/${toSafeFileName4(specifier)}.js`;
19400
19389
  }
19401
19390
  return paths;
@@ -19604,7 +19593,10 @@ import {
19604
19593
  } from "fs";
19605
19594
  import { basename as basename11, dirname as dirname19, extname as extname8, join as join36, relative as relative13, resolve as resolve28 } from "path";
19606
19595
  import { cwd, env as env3, exit } from "process";
19607
- var {build: bunBuild7, Glob: Glob8 } = globalThis.Bun;
19596
+ var {
19597
+ build: bunBuild7,
19598
+ Glob: Glob8
19599
+ } = globalThis.Bun;
19608
19600
  var isDev2, isBuildTraceEnabled = () => {
19609
19601
  const value = env3.ABSOLUTE_BUILD_TRACE?.toLowerCase();
19610
19602
  return value === "1" || value === "true" || value === "yes";
@@ -20747,6 +20739,14 @@ ${content.slice(firstUseIdx)}`;
20747
20739
  ];
20748
20740
  const svelteResolveConditions = svelteDir ? ["svelte", "main"] : undefined;
20749
20741
  const htmlScriptPlugin = hmr ? createHTMLScriptHMRPlugin(htmlDir, htmxDir) : undefined;
20742
+ const reactRefreshRuntimePlugin = {
20743
+ name: "absolute-react-refresh-runtime",
20744
+ setup(builder) {
20745
+ builder.onResolve({ filter: /^react-refresh\/runtime$/ }, () => ({
20746
+ path: reactRefreshRuntimePath
20747
+ }));
20748
+ }
20749
+ };
20750
20750
  const reactBuildConfig = reactClientEntryPoints.length > 0 ? mergeBunBuildConfig({
20751
20751
  entrypoints: reactClientEntryPoints,
20752
20752
  ...Object.keys(reactExternalPaths).length > 0 ? { external: Object.keys(reactExternalPaths) } : {},
@@ -20758,7 +20758,10 @@ ${content.slice(firstUseIdx)}`;
20758
20758
  jsx: { development: true },
20759
20759
  reactFastRefresh: true
20760
20760
  } : {},
20761
- plugins: [stylePreprocessorPlugin2],
20761
+ plugins: hmr ? [
20762
+ stylePreprocessorPlugin2,
20763
+ reactRefreshRuntimePlugin
20764
+ ] : [stylePreprocessorPlugin2],
20762
20765
  root: clientRoot,
20763
20766
  splitting: true,
20764
20767
  target: "browser",
@@ -26483,7 +26486,7 @@ var {build: bunBuild9, Glob: Glob10 } = globalThis.Bun;
26483
26486
  var toSafeFileName6 = (specifier) => {
26484
26487
  const prefix = specifier.startsWith("@") ? "_" : "";
26485
26488
  return prefix + specifier.replace(/\//g, "_").replace(/@/g, "").replace(/-/g, "_");
26486
- }, isResolvable4 = (specifier) => {
26489
+ }, isResolvable3 = (specifier) => {
26487
26490
  try {
26488
26491
  Bun.resolveSync(specifier, process.cwd());
26489
26492
  return true;
@@ -26527,8 +26530,8 @@ var toSafeFileName6 = (specifier) => {
26527
26530
  const transpiler6 = new Bun.Transpiler({ loader: "tsx" });
26528
26531
  await Promise.all(directories.map((dir) => collectDirSpecifiers(dir, transpiler6, dep, framework)));
26529
26532
  return {
26530
- dep: Array.from(dep).filter(isResolvable4),
26531
- framework: Array.from(framework).filter(isResolvable4)
26533
+ dep: Array.from(dep).filter(isResolvable3),
26534
+ framework: Array.from(framework).filter(isResolvable3)
26532
26535
  };
26533
26536
  }, collectTransitiveImports = async (specs, alreadyVendored, alreadyScanned) => {
26534
26537
  const { readFileSync: readFileSync29 } = await import("fs");
@@ -26566,7 +26569,7 @@ var toSafeFileName6 = (specifier) => {
26566
26569
  continue;
26567
26570
  if (alreadyVendored.has(child))
26568
26571
  continue;
26569
- if (!isResolvable4(child))
26572
+ if (!isResolvable3(child))
26570
26573
  continue;
26571
26574
  newSpecs.add(child);
26572
26575
  }
@@ -26705,7 +26708,6 @@ var init_buildDepVendor = __esm(() => {
26705
26708
  "react-dom/server",
26706
26709
  "react/jsx-runtime",
26707
26710
  "react/jsx-dev-runtime",
26708
- "react-refresh/runtime",
26709
26711
  "svelte",
26710
26712
  "svelte/internal",
26711
26713
  "svelte/internal/flags/async",
@@ -35851,5 +35853,5 @@ export {
35851
35853
  ANGULAR_INIT_TIMEOUT_MS
35852
35854
  };
35853
35855
 
35854
- //# debugId=B5C2BA8F3C10B49764756E2164756E21
35856
+ //# debugId=E2B3E7F15839C01C64756E2164756E21
35855
35857
  //# sourceMappingURL=index.js.map