@replohq/sandbox-runtime 1.22.0 → 1.22.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  export const BUILD_METADATA = {
2
2
  "packageName": "@replohq/sandbox-runtime",
3
- "version": "1.22.0",
3
+ "version": "1.22.1",
4
4
  "branch": "HEAD",
5
- "commit": "06e25b3341d1e79f6171365410c49bee41b1f3e0",
6
- "builtAt": "2026-10-30T20:22:33.673Z"
5
+ "commit": "073dd1a46fae9bca92aae68286e667ef84854658",
6
+ "builtAt": "2026-10-30T20:41:52.402Z"
7
7
  };
@@ -4,7 +4,7 @@ import type { DisplayMode } from "../_vendor/schemas/generated/selectMode";
4
4
  import type { ElementSource } from "./capture";
5
5
  export declare const OVERLAY_Z_INDEX = 2147483645;
6
6
  export declare const HIGHLIGHT_BACKGROUND = "rgba(250, 204, 21, 0.28)";
7
- export declare const BADGE_SIZE_PX = 20;
7
+ export declare const BADGE_SIZE_PX = 32;
8
8
  export declare const RERESOLVE_DEBOUNCE_MS = 250;
9
9
  export type CommentsOverlayCallbacks = {
10
10
  onAnchorPicked: (input: {
@@ -4,8 +4,9 @@ import { OVERLAY_ROOT_ATTRIBUTE } from "./textQuote";
4
4
  const OVERLAY_Z_INDEX = 2147483645;
5
5
  const HIGHLIGHT_BACKGROUND = "rgba(250, 204, 21, 0.28)";
6
6
  const QUOTE_UNDERLINE = "2px solid rgba(250, 204, 21, 0.9)";
7
- const BADGE_SIZE_PX = 20;
7
+ const BADGE_SIZE_PX = 32;
8
8
  const BADGE_HIT_TARGET_PX = 44;
9
+ const BADGE_HIT_TARGET_WIDTH_PX = 64;
9
10
  const COMPACT_GUTTER_MAX_WIDTH_PX = 600;
10
11
  const RERESOLVE_DEBOUNCE_MS = 250;
11
12
  const SELECTION_PROMPT_DEBOUNCE_MS = 150;
@@ -286,16 +287,17 @@ function createCommentsOverlay(options) {
286
287
  const paintBadges = () => {
287
288
  const isCompact = window.innerWidth <= COMPACT_GUTTER_MAX_WIDTH_PX;
288
289
  const size = BADGE_HIT_TARGET_PX;
289
- const maxLeft = Math.max(0, window.innerWidth - size);
290
+ const width = BADGE_HIT_TARGET_WIDTH_PX;
291
+ const maxLeft = Math.max(0, window.innerWidth - width);
290
292
  const maxTop = Math.max(0, window.innerHeight - size);
291
293
  const placed = [];
292
294
  const place = (rect) => {
293
- const baseLeft = isCompact ? maxLeft : Math.max(0, Math.min(maxLeft, rect.right - size / 2));
295
+ const baseLeft = isCompact ? maxLeft : Math.max(0, Math.min(maxLeft, rect.right - width / 2));
294
296
  const baseTop = Math.max(0, Math.min(maxTop, rect.top - size / 2));
295
- const columns = Math.ceil(maxLeft / size);
297
+ const columns = Math.ceil(maxLeft / width);
296
298
  const rows = Math.ceil(maxTop / size);
297
299
  for (let column = 0; column <= columns * 2; column++) {
298
- const left = baseLeft + (column % 2 ? 1 : -1) * Math.ceil(column / 2) * size;
300
+ const left = baseLeft + (column % 2 ? 1 : -1) * Math.ceil(column / 2) * width;
299
301
  if (left < 0 || left > maxLeft) {
300
302
  continue;
301
303
  }
@@ -305,7 +307,7 @@ function createCommentsOverlay(options) {
305
307
  continue;
306
308
  }
307
309
  const collides = placed.some((slot) => {
308
- return Math.abs(slot.left - left) < size && Math.abs(slot.top - top) < size;
310
+ return Math.abs(slot.left - left) < width && Math.abs(slot.top - top) < size;
309
311
  });
310
312
  if (!collides) {
311
313
  placed.push({ left, top });
@@ -340,7 +342,7 @@ function createCommentsOverlay(options) {
340
342
  "aria-label",
341
343
  pin.count === 1 ? "Open comment" : `Open ${pin.count} comments`
342
344
  );
343
- badge.style.cssText = `position:absolute;pointer-events:auto;display:flex;align-items:center;justify-content:center;width:${size}px;height:${size}px;padding:0;margin:0;border:0;background:transparent;cursor:pointer`;
345
+ badge.style.cssText = `position:absolute;pointer-events:auto;display:flex;align-items:center;justify-content:center;width:${width}px;height:${size}px;padding:0;margin:0;border:0;background:transparent;cursor:pointer;outline-offset:-2px`;
344
346
  if (isCompact) {
345
347
  badge.style.justifyContent = "flex-end";
346
348
  }
@@ -348,25 +350,21 @@ function createCommentsOverlay(options) {
348
350
  badge.style.top = `${position.top}px`;
349
351
  const isActive = isFocused || pin.threadId === hoveredBadgeThreadId;
350
352
  const dot = document.createElement("span");
351
- dot.style.cssText = `display:flex;align-items:center;justify-content:center;gap:3px;box-sizing:border-box;min-width:${BADGE_SIZE_PX}px;height:${BADGE_SIZE_PX}px;padding:0 ${pin.count === 1 ? 0 : 6}px;border-radius:${BADGE_SIZE_PX / 2}px;border:1px solid rgba(17,24,39,.14);background:#fff;color:#6b7280;box-shadow:0 1px 3px rgba(0,0,0,.18);font:600 11px/1 system-ui,-apple-system,sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap`;
353
+ dot.style.cssText = `display:flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;min-width:48px;height:${BADGE_SIZE_PX}px;padding:0 6px;border-radius:8px;border:1px solid rgba(0,0,0,.12);background:#ffeb80;color:#171717;box-shadow:0 1px 3px rgba(0,0,0,.12);font:600 14px/1 system-ui,-apple-system,sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap`;
352
354
  if (isCompact) {
353
355
  dot.style.marginRight = "3px";
354
356
  }
355
357
  if (isActive) {
356
- dot.style.borderColor = "#f59e0b";
357
- dot.style.background = "#fef3c7";
358
- dot.style.color = "#b45309";
358
+ dot.style.borderColor = "rgba(0,0,0,.4)";
359
359
  }
360
360
  if (resolution.status === "ambiguous") {
361
361
  dot.style.borderStyle = "dashed";
362
362
  }
363
- const icon = createIcon("12", "M7.9 20A9 9 0 1 0 4 16.1L2 22Z");
363
+ const icon = createIcon("16", "M7.9 20A9 9 0 1 0 4 16.1L2 22Z");
364
364
  icon.setAttribute("stroke-linecap", "round");
365
365
  icon.setAttribute("stroke-linejoin", "round");
366
366
  dot.append(icon);
367
- if (pin.count > 1) {
368
- dot.append(pin.count > 99 ? "99+" : String(pin.count));
369
- }
367
+ dot.append(pin.count > 99 ? "99+" : String(pin.count));
370
368
  badge.append(dot);
371
369
  badge.addEventListener("click", (event) => {
372
370
  event.preventDefault();
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@replohq/sandbox-runtime",
3
- "version": "1.22.0",
3
+ "version": "1.22.1",
4
4
  "reploBuild": {
5
5
  "packageName": "@replohq/sandbox-runtime",
6
- "version": "1.22.0",
6
+ "version": "1.22.1",
7
7
  "branch": "HEAD",
8
- "commit": "06e25b3341d1e79f6171365410c49bee41b1f3e0",
9
- "builtAt": "2026-10-30T20:22:33.673Z"
8
+ "commit": "073dd1a46fae9bca92aae68286e667ef84854658",
9
+ "builtAt": "2026-10-30T20:41:52.402Z"
10
10
  },
11
11
  "description": "Replo sandbox runtime — editor integration for agent-built Next.js sites.",
12
12
  "license": "SEE LICENSE IN LICENSE",