@absolutejs/absolute 0.18.3-beta.12 → 0.18.3-beta.14

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/index.js CHANGED
@@ -79,45 +79,6 @@ var init_constants = __esm(() => {
79
79
  TWO_THIRDS = 2 / 3;
80
80
  });
81
81
 
82
- // src/react/bridgeInternals.ts
83
- var INTERNALS_KEYS, findInternals = (mod) => {
84
- for (const key of INTERNALS_KEYS) {
85
- const val = mod[key];
86
- if (val)
87
- return val;
88
- }
89
- return;
90
- }, bridgeReactInternals = async () => {
91
- const pinned = globalThis.__reactModuleRef;
92
- if (!pinned)
93
- return;
94
- const react = await import("react");
95
- if (pinned === react)
96
- return;
97
- const pinnedInternals = findInternals(pinned);
98
- const currentInternals = findInternals(react);
99
- if (!pinnedInternals || !currentInternals || pinnedInternals === currentInternals)
100
- return;
101
- for (const prop of Object.keys(pinnedInternals)) {
102
- Object.defineProperty(currentInternals, prop, {
103
- get() {
104
- return pinnedInternals[prop];
105
- },
106
- set(v) {
107
- pinnedInternals[prop] = v;
108
- },
109
- configurable: true,
110
- enumerable: true
111
- });
112
- }
113
- };
114
- var init_bridgeInternals = __esm(() => {
115
- INTERNALS_KEYS = [
116
- "__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE",
117
- "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED"
118
- ];
119
- });
120
-
121
82
  // src/utils/normalizePath.ts
122
83
  var normalizePath = (path) => path.replace(/\\/g, "/");
123
84
 
@@ -173671,9 +173632,6 @@ var FRAMEWORK_DIR_KEYS, reloadConfig = async () => {
173671
173632
  await cleanStaleAssets(state.assetStore, cached.manifest, state.resolvedPaths.buildDir);
173672
173633
  }
173673
173634
  state.rebuildCount++;
173674
- if (state.config.reactDirectory) {
173675
- await bridgeReactInternals();
173676
- }
173677
173635
  } catch {} finally {
173678
173636
  state.isRebuilding = false;
173679
173637
  state.fileChangeQueue.clear();
@@ -173795,7 +173753,6 @@ var init_devBuild = __esm(() => {
173795
173753
  init_assetStore();
173796
173754
  init_rebuildTrigger();
173797
173755
  init_logger();
173798
- init_bridgeInternals();
173799
173756
  FRAMEWORK_DIR_KEYS = [
173800
173757
  "reactDirectory",
173801
173758
  "svelteDirectory",
@@ -173806,6 +173763,45 @@ var init_devBuild = __esm(() => {
173806
173763
  ];
173807
173764
  });
173808
173765
 
173766
+ // src/react/bridgeInternals.ts
173767
+ var INTERNALS_KEYS, findInternals = (mod) => {
173768
+ for (const key of INTERNALS_KEYS) {
173769
+ const val = mod[key];
173770
+ if (val)
173771
+ return val;
173772
+ }
173773
+ return;
173774
+ }, bridgeReactInternals = async () => {
173775
+ const pinned = globalThis.__reactModuleRef;
173776
+ if (!pinned)
173777
+ return;
173778
+ const react = await import("react");
173779
+ if (pinned === react)
173780
+ return;
173781
+ const pinnedInternals = findInternals(pinned);
173782
+ const currentInternals = findInternals(react);
173783
+ if (!pinnedInternals || !currentInternals || pinnedInternals === currentInternals)
173784
+ return;
173785
+ for (const prop of Object.keys(pinnedInternals)) {
173786
+ Object.defineProperty(currentInternals, prop, {
173787
+ get() {
173788
+ return pinnedInternals[prop];
173789
+ },
173790
+ set(v) {
173791
+ pinnedInternals[prop] = v;
173792
+ },
173793
+ configurable: true,
173794
+ enumerable: true
173795
+ });
173796
+ }
173797
+ };
173798
+ var init_bridgeInternals = __esm(() => {
173799
+ INTERNALS_KEYS = [
173800
+ "__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE",
173801
+ "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED"
173802
+ ];
173803
+ });
173804
+
173809
173805
  // src/plugins/hmr.ts
173810
173806
  var exports_hmr = {};
173811
173807
  __export(exports_hmr, {
@@ -173824,7 +173820,10 @@ var STORE_KEY = "__elysiaStore", getGlobalValue = (key) => Reflect.get(globalThi
173824
173820
  Reflect.set(globalThis, STORE_KEY, app.store);
173825
173821
  }, hmr = (hmrState2, manifest) => (app) => {
173826
173822
  restoreStore(app);
173827
- return app.onBeforeHandle(({ request }) => {
173823
+ return app.onBeforeHandle(async ({ request }) => {
173824
+ if (globalThis.__reactModuleRef) {
173825
+ await bridgeReactInternals();
173826
+ }
173828
173827
  const rawUrl = request.url;
173829
173828
  const qIdx = rawUrl.indexOf("?");
173830
173829
  const pathEnd = qIdx === UNFOUND_INDEX ? rawUrl.length : qIdx;
@@ -173856,6 +173855,7 @@ var STORE_KEY = "__elysiaStore", getGlobalValue = (key) => Reflect.get(globalThi
173856
173855
  var init_hmr = __esm(() => {
173857
173856
  init_constants();
173858
173857
  init_assetStore();
173858
+ init_bridgeInternals();
173859
173859
  init_webSocket();
173860
173860
  });
173861
173861
  // types/client.ts
@@ -173933,13 +173933,9 @@ body{min-height:100vh;background:linear-gradient(135deg,rgba(15,23,42,0.98) 0%,r
173933
173933
  };
173934
173934
 
173935
173935
  // src/react/pageHandler.ts
173936
- init_bridgeInternals();
173937
173936
  var handleReactPageRequest = async (PageComponent, index, ...props) => {
173938
173937
  try {
173939
173938
  const [maybeProps] = props;
173940
- if (true) {
173941
- await bridgeReactInternals();
173942
- }
173943
173939
  const { createElement } = await import("react");
173944
173940
  const { renderToReadableStream } = await import("react-dom/server");
173945
173941
  const element = maybeProps !== undefined ? createElement(PageComponent, maybeProps) : createElement(PageComponent);
@@ -174242,5 +174238,5 @@ export {
174242
174238
  ANGULAR_INIT_TIMEOUT_MS
174243
174239
  };
174244
174240
 
174245
- //# debugId=108DC1BDF174039564756E2164756E21
174241
+ //# debugId=2A3A0CC85454252364756E2164756E21
174246
174242
  //# sourceMappingURL=index.js.map