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

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
 
@@ -173583,6 +173544,45 @@ var init_rebuildTrigger = __esm(() => {
173583
173544
  init_webSocket();
173584
173545
  });
173585
173546
 
173547
+ // src/react/bridgeInternals.ts
173548
+ var INTERNALS_KEYS, findInternals = (mod) => {
173549
+ for (const key of INTERNALS_KEYS) {
173550
+ const val = mod[key];
173551
+ if (val)
173552
+ return val;
173553
+ }
173554
+ return;
173555
+ }, bridgeReactInternals = async () => {
173556
+ const pinned = globalThis.__reactModuleRef;
173557
+ if (!pinned)
173558
+ return;
173559
+ const react = await import("react");
173560
+ if (pinned === react)
173561
+ return;
173562
+ const pinnedInternals = findInternals(pinned);
173563
+ const currentInternals = findInternals(react);
173564
+ if (!pinnedInternals || !currentInternals || pinnedInternals === currentInternals)
173565
+ return;
173566
+ for (const prop of Object.keys(pinnedInternals)) {
173567
+ Object.defineProperty(currentInternals, prop, {
173568
+ get() {
173569
+ return pinnedInternals[prop];
173570
+ },
173571
+ set(v) {
173572
+ pinnedInternals[prop] = v;
173573
+ },
173574
+ configurable: true,
173575
+ enumerable: true
173576
+ });
173577
+ }
173578
+ };
173579
+ var init_bridgeInternals = __esm(() => {
173580
+ INTERNALS_KEYS = [
173581
+ "__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE",
173582
+ "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED"
173583
+ ];
173584
+ });
173585
+
173586
173586
  // src/core/devBuild.ts
173587
173587
  var exports_devBuild = {};
173588
173588
  __export(exports_devBuild, {
@@ -173824,7 +173824,10 @@ var STORE_KEY = "__elysiaStore", getGlobalValue = (key) => Reflect.get(globalThi
173824
173824
  Reflect.set(globalThis, STORE_KEY, app.store);
173825
173825
  }, hmr = (hmrState2, manifest) => (app) => {
173826
173826
  restoreStore(app);
173827
- return app.onBeforeHandle(({ request }) => {
173827
+ return app.onBeforeHandle(async ({ request }) => {
173828
+ if (globalThis.__reactModuleRef) {
173829
+ await bridgeReactInternals();
173830
+ }
173828
173831
  const rawUrl = request.url;
173829
173832
  const qIdx = rawUrl.indexOf("?");
173830
173833
  const pathEnd = qIdx === UNFOUND_INDEX ? rawUrl.length : qIdx;
@@ -173856,6 +173859,7 @@ var STORE_KEY = "__elysiaStore", getGlobalValue = (key) => Reflect.get(globalThi
173856
173859
  var init_hmr = __esm(() => {
173857
173860
  init_constants();
173858
173861
  init_assetStore();
173862
+ init_bridgeInternals();
173859
173863
  init_webSocket();
173860
173864
  });
173861
173865
  // types/client.ts
@@ -173933,13 +173937,9 @@ body{min-height:100vh;background:linear-gradient(135deg,rgba(15,23,42,0.98) 0%,r
173933
173937
  };
173934
173938
 
173935
173939
  // src/react/pageHandler.ts
173936
- init_bridgeInternals();
173937
173940
  var handleReactPageRequest = async (PageComponent, index, ...props) => {
173938
173941
  try {
173939
173942
  const [maybeProps] = props;
173940
- if (true) {
173941
- await bridgeReactInternals();
173942
- }
173943
173943
  const { createElement } = await import("react");
173944
173944
  const { renderToReadableStream } = await import("react-dom/server");
173945
173945
  const element = maybeProps !== undefined ? createElement(PageComponent, maybeProps) : createElement(PageComponent);
@@ -174242,5 +174242,5 @@ export {
174242
174242
  ANGULAR_INIT_TIMEOUT_MS
174243
174243
  };
174244
174244
 
174245
- //# debugId=108DC1BDF174039564756E2164756E21
174245
+ //# debugId=FE804BF44B83A4E064756E2164756E21
174246
174246
  //# sourceMappingURL=index.js.map