@absolutejs/absolute 0.18.3-beta.7 → 0.18.3-beta.9
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/.absolutejs/prettier.cache.json +3 -3
- package/.absolutejs/tsconfig.tsbuildinfo +1 -1
- package/dist/build.js +4 -1
- package/dist/build.js.map +3 -3
- package/dist/index.js +29 -2
- package/dist/index.js.map +4 -4
- package/dist/react/index.js +26 -2
- package/dist/react/index.js.map +3 -3
- package/package.json +1 -2
- package/types/globals.d.ts +4 -0
package/dist/index.js
CHANGED
|
@@ -173716,6 +173716,9 @@ var FRAMEWORK_DIR_KEYS, reloadConfig = async () => {
|
|
|
173716
173716
|
await buildReactVendor(state.resolvedPaths.buildDir);
|
|
173717
173717
|
const vendorDir = resolve20(state.resolvedPaths.buildDir, "react", "vendor");
|
|
173718
173718
|
await loadVendorFiles(state.assetStore, vendorDir, "react");
|
|
173719
|
+
if (!globalThis.__reactModuleRef) {
|
|
173720
|
+
globalThis.__reactModuleRef = await import("react");
|
|
173721
|
+
}
|
|
173719
173722
|
}
|
|
173720
173723
|
if (config.angularDirectory) {
|
|
173721
173724
|
await buildAngularVendor(state.resolvedPaths.buildDir);
|
|
@@ -173887,10 +173890,34 @@ body{min-height:100vh;background:linear-gradient(135deg,rgba(15,23,42,0.98) 0%,r
|
|
|
173887
173890
|
};
|
|
173888
173891
|
|
|
173889
173892
|
// src/react/pageHandler.ts
|
|
173893
|
+
var ensureReactConsistency = (react) => {
|
|
173894
|
+
const pinned = globalThis.__reactModuleRef;
|
|
173895
|
+
if (!pinned || pinned === react)
|
|
173896
|
+
return;
|
|
173897
|
+
const KEY = "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED";
|
|
173898
|
+
const pinnedInternals = pinned[KEY];
|
|
173899
|
+
const currentInternals = react[KEY];
|
|
173900
|
+
if (!pinnedInternals || !currentInternals || pinnedInternals === currentInternals)
|
|
173901
|
+
return;
|
|
173902
|
+
for (const prop of Object.keys(pinnedInternals)) {
|
|
173903
|
+
Object.defineProperty(currentInternals, prop, {
|
|
173904
|
+
get() {
|
|
173905
|
+
return pinnedInternals[prop];
|
|
173906
|
+
},
|
|
173907
|
+
set(v) {
|
|
173908
|
+
pinnedInternals[prop] = v;
|
|
173909
|
+
},
|
|
173910
|
+
configurable: true,
|
|
173911
|
+
enumerable: true
|
|
173912
|
+
});
|
|
173913
|
+
}
|
|
173914
|
+
};
|
|
173890
173915
|
var handleReactPageRequest = async (PageComponent, index, ...props) => {
|
|
173891
173916
|
try {
|
|
173892
173917
|
const [maybeProps] = props;
|
|
173893
|
-
const
|
|
173918
|
+
const react = await import("react");
|
|
173919
|
+
ensureReactConsistency(react);
|
|
173920
|
+
const { createElement } = react;
|
|
173894
173921
|
const { renderToReadableStream } = await import("react-dom/server");
|
|
173895
173922
|
const element = maybeProps !== undefined ? createElement(PageComponent, maybeProps) : createElement(PageComponent);
|
|
173896
173923
|
const refreshStubs = "window.$RefreshReg$=function(){};window.$RefreshSig$=function(){return function(t){return t}};";
|
|
@@ -174192,5 +174219,5 @@ export {
|
|
|
174192
174219
|
ANGULAR_INIT_TIMEOUT_MS
|
|
174193
174220
|
};
|
|
174194
174221
|
|
|
174195
|
-
//# debugId=
|
|
174222
|
+
//# debugId=ED32E2EDE9B6F56B64756E2164756E21
|
|
174196
174223
|
//# sourceMappingURL=index.js.map
|