@replohq/sandbox-runtime 1.24.4 → 1.24.5
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/PagePreviewHeightResponder.js +20 -1
- package/_vendor/replo-utils/lib/crypto.d.ts +5 -0
- package/_vendor/replo-utils/lib/crypto.mjs +1 -1
- package/_vendor/replo-utils/lib/json.d.ts +0 -4
- package/_vendor/replo-utils/lib/math.mjs +1 -1
- package/_vendor/replo-utils/lib/misc.mjs +1 -1
- package/_vendor/replo-utils/lib/pageCapture.mjs +1 -1
- package/_vendor/schemas/commentsOverlayRpc.mjs +2 -2
- package/_vendor/schemas/externalNavigationIframeRpc.mjs +3 -3
- package/_vendor/schemas/iframeRpcChannel.mjs +3 -3
- package/_vendor/schemas/previewHealthIframeRpc.mjs +3 -3
- package/_vendor/schemas/selectMode.mjs +2 -2
- package/_vendor/schemas/selectModeIframeRpc.mjs +2 -2
- package/buildMetadata.js +3 -3
- package/{chunk-6WREP7C2.mjs → chunk-WLPBO36O.mjs} +2 -2
- package/{chunk-ZTT7SNYN.mjs → chunk-WMAKU6GT.mjs} +12 -1
- package/{chunk-CGRTGQO5.mjs → chunk-YNBU56LF.mjs} +1 -1
- package/package.json +4 -4
- package/_vendor/replo-utils/lib/object.d.ts +0 -46
- /package/{chunk-THOBCJJA.mjs → chunk-HB4GV2QH.mjs} +0 -0
|
@@ -21,6 +21,20 @@ function startResponder() {
|
|
|
21
21
|
if (!parentOrigin) {
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
|
+
awaitingMeasurement = false;
|
|
25
|
+
if (!reportedHeight) {
|
|
26
|
+
const pendingImages = Array.from(document.images).filter(
|
|
27
|
+
(image) => !image.complete
|
|
28
|
+
);
|
|
29
|
+
for (const image of pendingImages) {
|
|
30
|
+
if (image.loading === "lazy") {
|
|
31
|
+
image.loading = "eager";
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (pendingImages.length) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
24
38
|
const body = document.body;
|
|
25
39
|
pinPreviewViewportUnits({
|
|
26
40
|
width: window.innerWidth,
|
|
@@ -37,7 +51,6 @@ function startResponder() {
|
|
|
37
51
|
)
|
|
38
52
|
);
|
|
39
53
|
baselineRootHeight = getComputedStyle(document.documentElement).height;
|
|
40
|
-
awaitingMeasurement = false;
|
|
41
54
|
if (height > 0) {
|
|
42
55
|
reportedHeight = height;
|
|
43
56
|
window.parent.postMessage(
|
|
@@ -91,6 +104,10 @@ function startResponder() {
|
|
|
91
104
|
if (!parentOrigin || awaitingMeasurement) {
|
|
92
105
|
return;
|
|
93
106
|
}
|
|
107
|
+
if (!reportedHeight) {
|
|
108
|
+
schedule();
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
94
111
|
cancelAnimationFrame(scheduledFrame);
|
|
95
112
|
scheduledFrame = requestAnimationFrame(() => {
|
|
96
113
|
scheduledFrame = 0;
|
|
@@ -135,6 +152,7 @@ function startResponder() {
|
|
|
135
152
|
document.addEventListener(event, measureInteraction, true);
|
|
136
153
|
}
|
|
137
154
|
document.addEventListener("load", schedule, true);
|
|
155
|
+
document.addEventListener("error", schedule, true);
|
|
138
156
|
document.addEventListener("toggle", schedule, true);
|
|
139
157
|
return () => {
|
|
140
158
|
cancelAnimationFrame(scheduledFrame);
|
|
@@ -145,6 +163,7 @@ function startResponder() {
|
|
|
145
163
|
mutations.disconnect();
|
|
146
164
|
window.removeEventListener("message", receive);
|
|
147
165
|
document.removeEventListener("load", schedule, true);
|
|
166
|
+
document.removeEventListener("error", schedule, true);
|
|
148
167
|
document.removeEventListener("toggle", schedule, true);
|
|
149
168
|
for (const event of events) {
|
|
150
169
|
document.removeEventListener(event, measureInteraction, true);
|
|
@@ -22,4 +22,9 @@ export declare function getHmacSha256Hex({ rawBody, signingKey, }: {
|
|
|
22
22
|
rawBody: string;
|
|
23
23
|
signingKey: string;
|
|
24
24
|
}): Promise<string>;
|
|
25
|
+
export declare function isValidHmacSha256Hex({ rawBody, signingKey, signature, }: {
|
|
26
|
+
rawBody: string;
|
|
27
|
+
signingKey: string;
|
|
28
|
+
signature: string;
|
|
29
|
+
}): Promise<boolean>;
|
|
25
30
|
export declare function deterministicUUID(value: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { base64UrlToBytes, bytesToBase64Url, constantTimeEqual, deterministicUUID, getHmacSha256Hex, randomBase64Url, randomUUID, sha256Hex } from '../../../chunk-
|
|
1
|
+
export { base64UrlToBytes, bytesToBase64Url, constantTimeEqual, deterministicUUID, getHmacSha256Hex, isValidHmacSha256Hex, randomBase64Url, randomUUID, sha256Hex } from '../../../chunk-WMAKU6GT.mjs';
|
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
export declare function parseJsonOrNull(json: string): unknown | null;
|
|
2
|
-
export declare function omitJsonObjectFieldsOrNull({ json, fields, }: {
|
|
3
|
-
json: string;
|
|
4
|
-
fields: string[];
|
|
5
|
-
}): string | null;
|
|
6
2
|
export declare function jsonStringifyOrNull(value: unknown): string | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { coerceNumberToString, deepCloneAndMergeReplacingArrays, errorMessage, exhaustiveSwitch, formatFileSize, getFromRecordOrNull, hasOwnProperty, invariant, isEmpty, isFunction_default as isFunction, isNotNullish, isNullish, isPrimitive, isString_default as isString, mergeReplacingArrays, mergeReplacingObjects, noop, preventDefault, sleep, sleepWithSignal, warning } from '../../../chunk-
|
|
1
|
+
export { coerceNumberToString, deepCloneAndMergeReplacingArrays, errorMessage, exhaustiveSwitch, formatFileSize, getFromRecordOrNull, hasOwnProperty, invariant, isEmpty, isFunction_default as isFunction, isNotNullish, isNullish, isPrimitive, isString_default as isString, mergeReplacingArrays, mergeReplacingObjects, noop, preventDefault, sleep, sleepWithSignal, warning } from '../../../chunk-HB4GV2QH.mjs';
|
|
2
2
|
export { isNumber_default as isNumber } from '../../../chunk-SKVPFN7M.mjs';
|
|
3
3
|
import '../../../chunk-4ITJNSXZ.mjs';
|
|
4
4
|
import '../../../chunk-XYS6G2ZC.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { commentAnchorSchema, displayModeSchema, commentAnchorElementSchema } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
import { commentAnchorSchema, displayModeSchema, commentAnchorElementSchema } from '../../chunk-YNBU56LF.mjs';
|
|
2
|
+
import '../../chunk-HB4GV2QH.mjs';
|
|
3
3
|
import '../../chunk-SKVPFN7M.mjs';
|
|
4
4
|
import '../../chunk-4ITJNSXZ.mjs';
|
|
5
5
|
import '../../chunk-XYS6G2ZC.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createIframeRpcChannel } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
import { createIframeRpcChannel } from '../../chunk-WLPBO36O.mjs';
|
|
2
|
+
import '../../chunk-WMAKU6GT.mjs';
|
|
3
|
+
import '../../chunk-HB4GV2QH.mjs';
|
|
4
4
|
import '../../chunk-SKVPFN7M.mjs';
|
|
5
5
|
import '../../chunk-4ITJNSXZ.mjs';
|
|
6
6
|
import '../../chunk-XYS6G2ZC.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { createIframeRpcChannel, createIframeRpcRemote, iframeRpcCallSchema } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
export { createIframeRpcChannel, createIframeRpcRemote, iframeRpcCallSchema } from '../../chunk-WLPBO36O.mjs';
|
|
2
|
+
import '../../chunk-WMAKU6GT.mjs';
|
|
3
|
+
import '../../chunk-HB4GV2QH.mjs';
|
|
4
4
|
import '../../chunk-SKVPFN7M.mjs';
|
|
5
5
|
import '../../chunk-4ITJNSXZ.mjs';
|
|
6
6
|
import '../../chunk-XYS6G2ZC.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createIframeRpcChannel } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
import { createIframeRpcChannel } from '../../chunk-WLPBO36O.mjs';
|
|
2
|
+
import '../../chunk-WMAKU6GT.mjs';
|
|
3
|
+
import '../../chunk-HB4GV2QH.mjs';
|
|
4
4
|
import '../../chunk-SKVPFN7M.mjs';
|
|
5
5
|
import '../../chunk-4ITJNSXZ.mjs';
|
|
6
6
|
import '../../chunk-XYS6G2ZC.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { SELECT_MODE_SELECTABLE_ATTRIBUTE, SELECT_MODE_SELECTABLE_PAYLOAD_ATTRIBUTE, displayModeSchema, getIframeOffset, isSelectedSection, readSelectablePayload, selectModeBoundingRectSchema, selectModeClickPositionSchema, selectModeDefinedStyleSchema, selectModeFiberChainEntrySchema, selectModeFormatCommandSchema, selectModeHoverRectSchema, selectModeImageSchema, selectModeImageScopeSchema, selectModeImageSourceSchema, selectModeInlineTextStatusSchema, selectModeOptimisticUpdatePayloadSchema, selectModeSelectionRectSchema, selectModeSelectionSchema, selectModeSelectionTypeSchema, selectModeSourceLocationSchema, selectModeStyleAtRuleSchema, selectModeStyleVariantSchema, selectModeTextMetricsSchema, selectModeTiptapActiveMarksSchema, selectModeVideoSchema, selectableDataPayloadSchema, selectableDataSchema, selectablePlanDataSchema, selectablePlanPayloadSchema, selectedElementSchema, transformPoint, transformRect, transformSelectableData, transformSelectedElement } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { SELECT_MODE_SELECTABLE_ATTRIBUTE, SELECT_MODE_SELECTABLE_PAYLOAD_ATTRIBUTE, displayModeSchema, getIframeOffset, isSelectedSection, readSelectablePayload, selectModeBoundingRectSchema, selectModeClickPositionSchema, selectModeDefinedStyleSchema, selectModeFiberChainEntrySchema, selectModeFormatCommandSchema, selectModeHoverRectSchema, selectModeImageSchema, selectModeImageScopeSchema, selectModeImageSourceSchema, selectModeInlineTextStatusSchema, selectModeOptimisticUpdatePayloadSchema, selectModeSelectionRectSchema, selectModeSelectionSchema, selectModeSelectionTypeSchema, selectModeSourceLocationSchema, selectModeStyleAtRuleSchema, selectModeStyleVariantSchema, selectModeTextMetricsSchema, selectModeTiptapActiveMarksSchema, selectModeVideoSchema, selectableDataPayloadSchema, selectableDataSchema, selectablePlanDataSchema, selectablePlanPayloadSchema, selectedElementSchema, transformPoint, transformRect, transformSelectableData, transformSelectedElement } from '../../chunk-YNBU56LF.mjs';
|
|
2
|
+
import '../../chunk-HB4GV2QH.mjs';
|
|
3
3
|
import '../../chunk-SKVPFN7M.mjs';
|
|
4
4
|
import '../../chunk-4ITJNSXZ.mjs';
|
|
5
5
|
import '../../chunk-XYS6G2ZC.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { selectModeBoundingRectSchema, selectModeTiptapActiveMarksSchema, selectModeSelectionRectSchema, selectableDataSchema, selectModeHoverRectSchema, selectModeFormatCommandSchema, selectModeOptimisticUpdatePayloadSchema, selectModeSelectionTypeSchema, displayModeSchema, selectModeClickPositionSchema, selectedElementSchema } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
import { selectModeBoundingRectSchema, selectModeTiptapActiveMarksSchema, selectModeSelectionRectSchema, selectableDataSchema, selectModeHoverRectSchema, selectModeFormatCommandSchema, selectModeOptimisticUpdatePayloadSchema, selectModeSelectionTypeSchema, displayModeSchema, selectModeClickPositionSchema, selectedElementSchema } from '../../chunk-YNBU56LF.mjs';
|
|
2
|
+
import '../../chunk-HB4GV2QH.mjs';
|
|
3
3
|
import '../../chunk-SKVPFN7M.mjs';
|
|
4
4
|
import '../../chunk-4ITJNSXZ.mjs';
|
|
5
5
|
import '../../chunk-XYS6G2ZC.mjs';
|
package/buildMetadata.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const BUILD_METADATA = {
|
|
2
2
|
"packageName": "@replohq/sandbox-runtime",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.5",
|
|
4
4
|
"branch": "HEAD",
|
|
5
|
-
"commit": "
|
|
6
|
-
"builtAt": "2026-11-
|
|
5
|
+
"commit": "547c2f890567e78210f5359114f849b43d7611da",
|
|
6
|
+
"builtAt": "2026-11-07T18:09:33.143Z"
|
|
7
7
|
};
|
|
@@ -63,8 +63,19 @@ async function getHmacSha256Hex({
|
|
|
63
63
|
);
|
|
64
64
|
return [...new Uint8Array(signature)].map((byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
65
65
|
}
|
|
66
|
+
async function isValidHmacSha256Hex({
|
|
67
|
+
rawBody,
|
|
68
|
+
signingKey,
|
|
69
|
+
signature
|
|
70
|
+
}) {
|
|
71
|
+
const encoder = new TextEncoder();
|
|
72
|
+
return constantTimeEqual({
|
|
73
|
+
left: encoder.encode(await getHmacSha256Hex({ rawBody, signingKey })),
|
|
74
|
+
right: encoder.encode(signature)
|
|
75
|
+
});
|
|
76
|
+
}
|
|
66
77
|
function deterministicUUID(value) {
|
|
67
78
|
return v5(value, v5.URL);
|
|
68
79
|
}
|
|
69
80
|
|
|
70
|
-
export { base64UrlToBytes, bytesToBase64Url, constantTimeEqual, deterministicUUID, getHmacSha256Hex, randomBase64Url, randomUUID, sha256Hex };
|
|
81
|
+
export { base64UrlToBytes, bytesToBase64Url, constantTimeEqual, deterministicUUID, getHmacSha256Hex, isValidHmacSha256Hex, randomBase64Url, randomUUID, sha256Hex };
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@replohq/sandbox-runtime",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.5",
|
|
4
4
|
"reploBuild": {
|
|
5
5
|
"packageName": "@replohq/sandbox-runtime",
|
|
6
|
-
"version": "1.24.
|
|
6
|
+
"version": "1.24.5",
|
|
7
7
|
"branch": "HEAD",
|
|
8
|
-
"commit": "
|
|
9
|
-
"builtAt": "2026-11-
|
|
8
|
+
"commit": "547c2f890567e78210f5359114f849b43d7611da",
|
|
9
|
+
"builtAt": "2026-11-07T18:09:33.143Z"
|
|
10
10
|
},
|
|
11
11
|
"description": "Replo sandbox runtime — editor integration for agent-built Next.js sites.",
|
|
12
12
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { dequal as dequalLite } from "dequal/lite";
|
|
2
|
-
interface ForEachPrimitiveValueArgs {
|
|
3
|
-
target: Record<string, any> | unknown[] | null;
|
|
4
|
-
fn: (value: unknown, key: string, newTarget: Record<string, any>) => void;
|
|
5
|
-
valueConversionFunction?: (transformValue: Record<string, any> | unknown[]) => Record<string, any> | unknown[];
|
|
6
|
-
}
|
|
7
|
-
/** There's probably a bug somewhere here since it assumes target is initially an object */
|
|
8
|
-
export declare function forEachPrimitiveValue({ target, fn, valueConversionFunction, }: ForEachPrimitiveValueArgs): void;
|
|
9
|
-
export declare function shallowEqual(objA: unknown, objB: unknown): boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Internally we use `dequal` for deep equality checks. It benchmarks faster
|
|
12
|
-
* than lodash and most other libraries.
|
|
13
|
-
*
|
|
14
|
-
* This function is an alias for `dequal`'s "lite" module. It does not check
|
|
15
|
-
* equality for `Map` or `Set` values. If you need to compare those, use
|
|
16
|
-
* `deepEqualHeavy`.
|
|
17
|
-
*
|
|
18
|
-
* @see https://github.com/lukeed/dequal#modes
|
|
19
|
-
*/
|
|
20
|
-
export declare const deepEqual: typeof dequalLite;
|
|
21
|
-
/**
|
|
22
|
-
* Creates a new object with specified keys omitted.
|
|
23
|
-
*
|
|
24
|
-
* @param obj - The source object
|
|
25
|
-
* @param keysToOmit - Array of keys to omit from the result
|
|
26
|
-
* @returns A new object without the specified keys
|
|
27
|
-
*/
|
|
28
|
-
export declare function omit<ObjectType extends Record<string, any>, KeyType extends keyof ObjectType>(obj: ObjectType, keysToOmit: KeyType[]): Omit<ObjectType, KeyType>;
|
|
29
|
-
/**
|
|
30
|
-
* `ObjectType` with every key that can hold `undefined` made optional and
|
|
31
|
-
* `undefined` removed from its value type. Keys that can't be `undefined`
|
|
32
|
-
* stay required.
|
|
33
|
-
*/
|
|
34
|
-
export type WithoutUndefined<ObjectType> = {
|
|
35
|
-
[Key in keyof ObjectType as undefined extends ObjectType[Key] ? never : Key]: ObjectType[Key];
|
|
36
|
-
} & {
|
|
37
|
-
[Key in keyof ObjectType as undefined extends ObjectType[Key] ? Key : never]?: Exclude<ObjectType[Key], undefined>;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Copies `data` without its `undefined`-valued own keys. A plain loop rather
|
|
41
|
-
* than lodash `pickBy`: this ships in the published SDK, and `pickBy` drags in
|
|
42
|
-
* lodash's iteratee-shorthand machinery (~6 KB gzipped) for a one-line check.
|
|
43
|
-
*/
|
|
44
|
-
export declare function filterUndefined<ObjectType extends Record<string, unknown>>(data: ObjectType): WithoutUndefined<ObjectType>;
|
|
45
|
-
export declare function toNullableIfDefined<ValueType>(value: ValueType | undefined): ValueType | null | undefined;
|
|
46
|
-
export {};
|
|
File without changes
|