@replohq/sandbox-runtime 1.16.0 → 1.16.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/_vendor/replo-utils/lib/object.d.ts +16 -1
- package/_vendor/replo-utils/lib/viewportSnapshot.d.ts +1 -1
- package/_vendor/replo-utils/lib/viewportSnapshot.mjs +1 -1
- package/_vendor/replo-utils/react/use-viewport-snapshot-responder.mjs +28 -5222
- package/_vendor/schemas/componentPreview.d.ts +1 -1
- package/_vendor/schemas/componentPreview.mjs +18 -18
- package/_vendor/schemas/designLibrary.d.ts +1 -1
- package/_vendor/schemas/designLibrary.mjs +72 -72
- package/_vendor/schemas/errors.d.ts +3 -43
- package/_vendor/schemas/iframeRpcChannel.d.ts +1 -1
- package/_vendor/schemas/iframeRpcChannel.mjs +27 -26
- package/_vendor/schemas/loaderKeys.d.ts +1 -1
- package/_vendor/schemas/pageAnnotations.d.ts +1 -1
- package/_vendor/schemas/pageAnnotations.mjs +1 -1
- package/_vendor/schemas/reploError.d.ts +43 -0
- package/_vendor/schemas/savedStyles.d.ts +1 -1
- package/_vendor/schemas/selectMode.d.ts +1 -1
- package/_vendor/schemas/selectMode.mjs +1 -1
- package/_vendor/schemas/selectModeIframeRpc.d.ts +1 -8
- package/_vendor/schemas/selectModeIframeRpc.mjs +3 -10
- package/buildMetadata.js +3 -3
- package/capturePage.js +1 -1
- package/{chunk-3YA3QXUQ.mjs → chunk-B3PLD7SH.mjs} +29 -18
- package/{chunk-KFJZ2OLV.mjs → chunk-TP4ZXK4R.mjs} +1 -1
- package/package.json +4 -4
- package/rrweb-snapshot-GTQBXO2Y.mjs +5761 -0
- package/select-mode/descriptor/elementDescriptor.js +1 -1
- package/select-mode/fiber.js +1 -1
- package/select-mode/hooks/useOptimisticOverrides.js +1 -1
- package/select-mode/hooks/useParentMessaging.js +1 -1
- package/select-mode/iframeRpcChannel.d.ts +0 -6
- package/select-mode/iframeRpcChannel.js +2 -8
|
@@ -109,6 +109,29 @@ function startViewportSnapshotResponder({
|
|
|
109
109
|
};
|
|
110
110
|
requester.postMessage(response, requesterOrigin);
|
|
111
111
|
};
|
|
112
|
+
const requestType = event.data.type;
|
|
113
|
+
const respondWithChildFrames = (snapshot2, context2) => {
|
|
114
|
+
if (captureDom ? snapshot2 === null : !context2) {
|
|
115
|
+
respond(null);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
void requestChildViewportSnapshots({
|
|
119
|
+
targetWindow,
|
|
120
|
+
requestId: `${requestId}:${frameIndex}`,
|
|
121
|
+
timeoutMs: cascadeTimeoutMs,
|
|
122
|
+
remainingDepth: remainingDepth - 1,
|
|
123
|
+
requestType
|
|
124
|
+
}).then((childCaptures) => {
|
|
125
|
+
respond({
|
|
126
|
+
snapshot: snapshot2,
|
|
127
|
+
...context2 ? { context: context2 } : {},
|
|
128
|
+
childFrames: childCaptures.flatMap((child) => {
|
|
129
|
+
const rect = measureFrameRect(child.frameIndex);
|
|
130
|
+
return rect ? [{ frameIndex: child.frameIndex, rect, capture: child.capture }] : [];
|
|
131
|
+
})
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
};
|
|
112
135
|
let snapshot = null;
|
|
113
136
|
let context;
|
|
114
137
|
try {
|
|
@@ -119,26 +142,14 @@ function startViewportSnapshotResponder({
|
|
|
119
142
|
}
|
|
120
143
|
} catch {
|
|
121
144
|
}
|
|
122
|
-
if (
|
|
123
|
-
|
|
145
|
+
if (snapshot instanceof Promise) {
|
|
146
|
+
snapshot.then(
|
|
147
|
+
(resolved) => respondWithChildFrames(resolved, context),
|
|
148
|
+
() => respond(null)
|
|
149
|
+
);
|
|
124
150
|
return;
|
|
125
151
|
}
|
|
126
|
-
|
|
127
|
-
targetWindow,
|
|
128
|
-
requestId: `${requestId}:${frameIndex}`,
|
|
129
|
-
timeoutMs: cascadeTimeoutMs,
|
|
130
|
-
remainingDepth: remainingDepth - 1,
|
|
131
|
-
requestType: event.data.type
|
|
132
|
-
}).then((childCaptures) => {
|
|
133
|
-
respond({
|
|
134
|
-
snapshot,
|
|
135
|
-
...context ? { context } : {},
|
|
136
|
-
childFrames: childCaptures.flatMap((child) => {
|
|
137
|
-
const rect = measureFrameRect(child.frameIndex);
|
|
138
|
-
return rect ? [{ frameIndex: child.frameIndex, rect, capture: child.capture }] : [];
|
|
139
|
-
})
|
|
140
|
-
});
|
|
141
|
-
});
|
|
152
|
+
respondWithChildFrames(snapshot, context);
|
|
142
153
|
};
|
|
143
154
|
targetWindow.addEventListener("message", onMessage);
|
|
144
155
|
return () => {
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@replohq/sandbox-runtime",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.2",
|
|
4
4
|
"reploBuild": {
|
|
5
5
|
"packageName": "@replohq/sandbox-runtime",
|
|
6
|
-
"version": "1.16.
|
|
6
|
+
"version": "1.16.2",
|
|
7
7
|
"branch": "HEAD",
|
|
8
|
-
"commit": "
|
|
9
|
-
"builtAt": "2026-10-
|
|
8
|
+
"commit": "9158b1e6452ebc5e1945da883b1c8406c7b17f08",
|
|
9
|
+
"builtAt": "2026-10-19T23:23:08.010Z"
|
|
10
10
|
},
|
|
11
11
|
"description": "Replo sandbox runtime — editor integration for agent-built Next.js sites.",
|
|
12
12
|
"license": "SEE LICENSE IN LICENSE",
|