@replohq/sandbox-runtime 1.24.3 → 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.d.ts +4 -0
- package/_vendor/schemas/commentsOverlayRpc.mjs +6 -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/comments-overlay/bridge.js +3 -0
- package/comments-overlay/capture.d.ts +4 -1
- package/comments-overlay/capture.js +7 -1
- package/comments-overlay/overlay.d.ts +1 -0
- package/comments-overlay/overlay.js +29 -10
- 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';
|
|
@@ -168,6 +168,10 @@ export declare const hostToCommentsOverlayMethodConfig: {
|
|
|
168
168
|
}, z.core.$strict>;
|
|
169
169
|
outputSchema: z.ZodVoid;
|
|
170
170
|
};
|
|
171
|
+
clearThreadFocus: {
|
|
172
|
+
inputSchema: z.ZodUndefined;
|
|
173
|
+
outputSchema: z.ZodVoid;
|
|
174
|
+
};
|
|
171
175
|
clearDraft: {
|
|
172
176
|
inputSchema: z.ZodUndefined;
|
|
173
177
|
outputSchema: z.ZodVoid;
|
|
@@ -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';
|
|
@@ -40,6 +40,10 @@ var hostToCommentsOverlayMethodConfig = {
|
|
|
40
40
|
inputSchema: z.strictObject({ threadId: z.string() }),
|
|
41
41
|
outputSchema: z.void()
|
|
42
42
|
},
|
|
43
|
+
clearThreadFocus: {
|
|
44
|
+
inputSchema: z.undefined(),
|
|
45
|
+
outputSchema: z.void()
|
|
46
|
+
},
|
|
43
47
|
clearDraft: {
|
|
44
48
|
inputSchema: z.undefined(),
|
|
45
49
|
outputSchema: z.void()
|
|
@@ -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 };
|
|
@@ -32,7 +32,10 @@ export declare function getElementSource(element: Element): ElementSource | null
|
|
|
32
32
|
* none. Inside a shadow root it includes nested shadow roots' text.
|
|
33
33
|
*/
|
|
34
34
|
export declare function getTextPreview(element: Element): string;
|
|
35
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* The element an anchor for this click target or selection describes; null
|
|
37
|
+
* when a click lands in layout spacing or a selection isn't in an element.
|
|
38
|
+
*/
|
|
36
39
|
export declare function getAnchorElement(target: Element | Range): Element | null;
|
|
37
40
|
/**
|
|
38
41
|
* Builds an element anchor (D-13) for a clicked element or a text selection.
|
|
@@ -168,8 +168,14 @@ function createRootAnchorSelectors(element) {
|
|
|
168
168
|
selector: ownSemanticSelector ?? findUniqueSelector(element) ?? createNthChildSelector(element)
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
+
const LAYOUT_SELECTOR = "[data-comment-layout]";
|
|
171
172
|
function getAnchorElement(target) {
|
|
172
|
-
|
|
173
|
+
if (isElement(target)) {
|
|
174
|
+
const element = snapToAnchorElement(target);
|
|
175
|
+
const isLayout = element.matches(LAYOUT_SELECTOR) || element.querySelector(LAYOUT_SELECTOR) !== null;
|
|
176
|
+
return isLayout ? null : element;
|
|
177
|
+
}
|
|
178
|
+
const picked = rangeContainer(target);
|
|
173
179
|
return picked ? snapToAnchorElement(picked) : null;
|
|
174
180
|
}
|
|
175
181
|
function captureAnchor(target, point) {
|
|
@@ -37,6 +37,7 @@ export type CommentsOverlay = {
|
|
|
37
37
|
setMode: (mode: DisplayMode) => void;
|
|
38
38
|
setPins: (pins: CommentOverlayPin[]) => void;
|
|
39
39
|
focusThread: (threadId: string) => void;
|
|
40
|
+
clearThreadFocus: () => void;
|
|
40
41
|
clearDraft: () => void;
|
|
41
42
|
setDraftAnchor: (anchor: CommentAnchor | null) => void;
|
|
42
43
|
/** Re-resolves every anchor now, e.g. after symbolication results arrive. */
|
|
@@ -12,6 +12,7 @@ const COMPACT_GUTTER_MAX_WIDTH_PX = 600;
|
|
|
12
12
|
const RERESOLVE_DEBOUNCE_MS = 250;
|
|
13
13
|
const SELECTION_PROMPT_DEBOUNCE_MS = 150;
|
|
14
14
|
const TEXT_PICK_CLICK_SUPPRESS_MS = 750;
|
|
15
|
+
const PENDING_SCROLL_MS = 1e4;
|
|
15
16
|
const HOVER_OUTLINE_STYLE = `position:absolute;pointer-events:none;box-sizing:border-box;border:${HIGHLIGHT_OUTLINE};background:transparent;border-radius:4px`;
|
|
16
17
|
const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
|
|
17
18
|
const EDITABLE_SELECTOR = "input, textarea, select, [contenteditable]:not([contenteditable='false'])";
|
|
@@ -34,6 +35,7 @@ function createCommentsOverlay(options) {
|
|
|
34
35
|
const boundElements = /* @__PURE__ */ new Map();
|
|
35
36
|
let selection = null;
|
|
36
37
|
let hoveredBadgeThreadId = null;
|
|
38
|
+
let pendingScroll = null;
|
|
37
39
|
let statusesKey = "";
|
|
38
40
|
let hoveredElement = null;
|
|
39
41
|
let hoverOutline = null;
|
|
@@ -105,6 +107,19 @@ function createCommentsOverlay(options) {
|
|
|
105
107
|
return pin.anchor.type === "element" ? [{ pin, anchor: pin.anchor }] : [];
|
|
106
108
|
});
|
|
107
109
|
};
|
|
110
|
+
const scrollToThread = (threadId) => {
|
|
111
|
+
const resolution = resolutions.get(threadId);
|
|
112
|
+
if (!resolution || !isResolutionVisible(resolution)) {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
const target = resolution.range?.startContainer.parentElement ?? resolution.element;
|
|
116
|
+
const reduceMotion = window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches ?? false;
|
|
117
|
+
target?.scrollIntoView?.({
|
|
118
|
+
block: "center",
|
|
119
|
+
behavior: reduceMotion ? "auto" : "smooth"
|
|
120
|
+
});
|
|
121
|
+
return true;
|
|
122
|
+
};
|
|
108
123
|
const resolveAll = () => {
|
|
109
124
|
resolveTimer = null;
|
|
110
125
|
observeShadowRoots(document);
|
|
@@ -130,6 +145,12 @@ function createCommentsOverlay(options) {
|
|
|
130
145
|
}
|
|
131
146
|
}
|
|
132
147
|
resolutions = next;
|
|
148
|
+
if (pendingScroll) {
|
|
149
|
+
const isStale = selection?.kind !== "thread" || selection.threadId !== pendingScroll.threadId || Date.now() > pendingScroll.until;
|
|
150
|
+
if (isStale || scrollToThread(pendingScroll.threadId)) {
|
|
151
|
+
pendingScroll = null;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
133
154
|
if (selection?.kind === "draft") {
|
|
134
155
|
selection.resolution = resolveAnchor(selection.anchor, document, {
|
|
135
156
|
previous: selection.resolution?.element ?? null,
|
|
@@ -589,7 +610,7 @@ function createCommentsOverlay(options) {
|
|
|
589
610
|
if (window.getSelection()?.toString().trim()) {
|
|
590
611
|
return;
|
|
591
612
|
}
|
|
592
|
-
if (!isPageElement(target)) {
|
|
613
|
+
if (!isPageElement(target) || !getAnchorElement(target)) {
|
|
593
614
|
dismissSelection();
|
|
594
615
|
return;
|
|
595
616
|
}
|
|
@@ -741,17 +762,15 @@ function createCommentsOverlay(options) {
|
|
|
741
762
|
},
|
|
742
763
|
focusThread: (threadId) => {
|
|
743
764
|
selection = { kind: "thread", threadId };
|
|
744
|
-
|
|
745
|
-
const target = resolution?.range?.startContainer.parentElement ?? resolution?.element ?? null;
|
|
746
|
-
if (resolution && isResolutionVisible(resolution)) {
|
|
747
|
-
const reduceMotion = window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches ?? false;
|
|
748
|
-
target?.scrollIntoView?.({
|
|
749
|
-
block: "center",
|
|
750
|
-
behavior: reduceMotion ? "auto" : "smooth"
|
|
751
|
-
});
|
|
752
|
-
}
|
|
765
|
+
pendingScroll = scrollToThread(threadId) ? null : { threadId, until: Date.now() + PENDING_SCROLL_MS };
|
|
753
766
|
schedulePaint();
|
|
754
767
|
},
|
|
768
|
+
clearThreadFocus: () => {
|
|
769
|
+
if (selection?.kind === "thread") {
|
|
770
|
+
selection = null;
|
|
771
|
+
schedulePaint();
|
|
772
|
+
}
|
|
773
|
+
},
|
|
755
774
|
clearDraft: () => {
|
|
756
775
|
clearDraft();
|
|
757
776
|
schedulePaint();
|
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
|