@replohq/sandbox-runtime 1.19.1 → 1.19.2
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/buildMetadata.js +3 -3
- package/package.json +4 -4
- package/previewHealth.d.ts +7 -0
- package/previewHealth.js +31 -0
package/buildMetadata.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const BUILD_METADATA = {
|
|
2
2
|
"packageName": "@replohq/sandbox-runtime",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.2",
|
|
4
4
|
"branch": "HEAD",
|
|
5
|
-
"commit": "
|
|
6
|
-
"builtAt": "2026-10-
|
|
5
|
+
"commit": "cdc23a21d2f115a5a458a13a97942dac138e692d",
|
|
6
|
+
"builtAt": "2026-10-24T17:26:05.661Z"
|
|
7
7
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@replohq/sandbox-runtime",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.2",
|
|
4
4
|
"reploBuild": {
|
|
5
5
|
"packageName": "@replohq/sandbox-runtime",
|
|
6
|
-
"version": "1.19.
|
|
6
|
+
"version": "1.19.2",
|
|
7
7
|
"branch": "HEAD",
|
|
8
|
-
"commit": "
|
|
9
|
-
"builtAt": "2026-10-
|
|
8
|
+
"commit": "cdc23a21d2f115a5a458a13a97942dac138e692d",
|
|
9
|
+
"builtAt": "2026-10-24T17:26:05.661Z"
|
|
10
10
|
},
|
|
11
11
|
"description": "Replo sandbox runtime — editor integration for agent-built Next.js sites.",
|
|
12
12
|
"license": "SEE LICENSE IN LICENSE",
|
package/previewHealth.d.ts
CHANGED
|
@@ -19,6 +19,13 @@ declare global {
|
|
|
19
19
|
__reploPreviewHealthMonitor?: PreviewHealthMonitor;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Next's error dialog locks the body's scroll while it's open, and the
|
|
24
|
+
* stylesheet above hides that dialog, so the page would stop scrolling for no
|
|
25
|
+
* visible reason. Only a lock taken while the dialog is mounted is released;
|
|
26
|
+
* a site's own lock (a mobile menu, a modal) is left alone.
|
|
27
|
+
*/
|
|
28
|
+
export declare function releaseNextOverlayScrollLock(): () => void;
|
|
22
29
|
/** The document's preview health actions; null outside an embedded preview. */
|
|
23
30
|
export declare function getPreviewHealthActions(): PreviewHealthActions | null;
|
|
24
31
|
export declare function resetPreviewHealthMonitorForTests(): void;
|
package/previewHealth.js
CHANGED
|
@@ -294,6 +294,7 @@ function createPreviewHealthMonitor() {
|
|
|
294
294
|
overlayStyle.dataset.reploPreviewHealth = "";
|
|
295
295
|
overlayStyle.textContent = "nextjs-portal{display:none!important}";
|
|
296
296
|
document.head.append(overlayStyle);
|
|
297
|
+
const stopScrollLockRelease = releaseNextOverlayScrollLock();
|
|
297
298
|
const stopBuildStatus = subscribeToBuildStatus({
|
|
298
299
|
onBuildErrors: actions.buildErrorsChanged
|
|
299
300
|
});
|
|
@@ -303,6 +304,7 @@ function createPreviewHealthMonitor() {
|
|
|
303
304
|
unsubscribe();
|
|
304
305
|
stopBuildStatus();
|
|
305
306
|
overlayStyle.remove();
|
|
307
|
+
stopScrollLockRelease();
|
|
306
308
|
cancelPendingRecovery();
|
|
307
309
|
if (window.__reploNextErrorFeed?.listener === handleNextError) {
|
|
308
310
|
window.__reploNextErrorFeed.listener = null;
|
|
@@ -310,6 +312,34 @@ function createPreviewHealthMonitor() {
|
|
|
310
312
|
}
|
|
311
313
|
};
|
|
312
314
|
}
|
|
315
|
+
function releaseNextOverlayScrollLock() {
|
|
316
|
+
const release = () => {
|
|
317
|
+
const portal = document.querySelector("nextjs-portal");
|
|
318
|
+
const isDialogOpen = Boolean(
|
|
319
|
+
portal?.shadowRoot?.querySelector("[data-nextjs-dialog-overlay]")
|
|
320
|
+
);
|
|
321
|
+
if (isDialogOpen && document.body.style.overflow === "hidden") {
|
|
322
|
+
document.body.style.overflow = "";
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
const observer = new MutationObserver(release);
|
|
326
|
+
const observe = () => {
|
|
327
|
+
observer.observe(document.body, {
|
|
328
|
+
attributes: true,
|
|
329
|
+
attributeFilter: ["style"]
|
|
330
|
+
});
|
|
331
|
+
release();
|
|
332
|
+
};
|
|
333
|
+
if (document.body) {
|
|
334
|
+
observe();
|
|
335
|
+
} else {
|
|
336
|
+
document.addEventListener("DOMContentLoaded", observe, { once: true });
|
|
337
|
+
}
|
|
338
|
+
return () => {
|
|
339
|
+
observer.disconnect();
|
|
340
|
+
document.removeEventListener("DOMContentLoaded", observe);
|
|
341
|
+
};
|
|
342
|
+
}
|
|
313
343
|
function openSocket(url) {
|
|
314
344
|
return new Promise((resolve) => {
|
|
315
345
|
const socket = new window.WebSocket(url);
|
|
@@ -427,5 +457,6 @@ if (typeof window !== "undefined" && process.env.NODE_ENV !== "production") {
|
|
|
427
457
|
}
|
|
428
458
|
export {
|
|
429
459
|
getPreviewHealthActions,
|
|
460
|
+
releaseNextOverlayScrollLock,
|
|
430
461
|
resetPreviewHealthMonitorForTests
|
|
431
462
|
};
|