@replohq/sandbox-runtime 1.7.0 → 1.7.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.
Files changed (117) hide show
  1. package/ClientErrorBoundary.d.ts +1 -1
  2. package/ClientErrorBoundary.js +0 -5
  3. package/DocumentReadyBeacon.js +0 -1
  4. package/LinkInterceptor.js +0 -1
  5. package/NavigationReceiver.js +0 -1
  6. package/NextErrorReporter.js +0 -1
  7. package/_vendor/replo-utils/lib/fonts.mjs +0 -13
  8. package/_vendor/replo-utils/lib/geometry.mjs +0 -1
  9. package/_vendor/replo-utils/lib/math.d.ts +0 -4
  10. package/_vendor/replo-utils/lib/math.mjs +0 -1
  11. package/_vendor/replo-utils/lib/posthogReplay.mjs +0 -1
  12. package/_vendor/replo-utils/react/use-iframe-rpc-channel.mjs +0 -1
  13. package/_vendor/replo-utils/react/use-viewport-snapshot-responder.mjs +9 -25
  14. package/_vendor/schemas/componentPreview.mjs +0 -4
  15. package/_vendor/schemas/designLibrary.mjs +0 -2
  16. package/_vendor/schemas/errors.d.ts +0 -3
  17. package/_vendor/schemas/iframeRpcChannel.d.ts +1 -1
  18. package/_vendor/schemas/iframeRpcChannel.mjs +0 -22
  19. package/_vendor/schemas/pageAnnotations.mjs +0 -3
  20. package/_vendor/schemas/selectMode.d.ts +0 -4
  21. package/_vendor/schemas/selectModeIframeRpc.mjs +0 -10
  22. package/annotations/AnnotationLayerMount.js +0 -1
  23. package/annotations/annotationController.js +0 -3
  24. package/annotations/bridgeGate.js +0 -4
  25. package/buildMetadata.js +3 -3
  26. package/chunk-3YA3QXUQ.mjs +1 -4
  27. package/chunk-FLYEIRFK.mjs +0 -1
  28. package/chunk-G3S6ZNPF.mjs +0 -7
  29. package/chunk-JUKCUPQ6.mjs +5 -129
  30. package/chunk-SGKQ5HGT.mjs +0 -1
  31. package/chunk-TESFJQID.mjs +0 -1
  32. package/chunk-UOBGRB5I.mjs +0 -5
  33. package/design-library-preview/DesignLibraryPreview.js +0 -1
  34. package/next/component-preview-client.js +0 -1
  35. package/next/component-preview-href.js +0 -1
  36. package/next/component-preview-props.js +0 -1
  37. package/next/component-preview.js +0 -1
  38. package/next/config.js +0 -1
  39. package/package.json +4 -4
  40. package/posthog-relay.js +0 -5
  41. package/sandbox-runtime.js +0 -1
  42. package/select-mode/EditorSelection.d.ts +0 -2
  43. package/select-mode/EditorSelection.js +0 -1
  44. package/select-mode/annotationFrames.js +0 -1
  45. package/select-mode/descriptor/elementDescriptor.d.ts +0 -2
  46. package/select-mode/descriptor/elementDescriptor.js +0 -1
  47. package/select-mode/descriptor/styleExtraction.js +0 -1
  48. package/select-mode/displayModeStore.js +0 -2
  49. package/select-mode/fast-refresh-relay.js +0 -1
  50. package/select-mode/fiber.js +1 -5
  51. package/select-mode/hooks/useCrosshairCursor.d.ts +0 -2
  52. package/select-mode/hooks/useCrosshairCursor.js +0 -1
  53. package/select-mode/hooks/useEditModeStateMachine.js +14 -23
  54. package/select-mode/hooks/useOptimisticOverrides.js +0 -1
  55. package/select-mode/hooks/useParentMessaging.d.ts +0 -2
  56. package/select-mode/hooks/useParentMessaging.js +0 -1
  57. package/select-mode/hooks/useSelectModeController.js +0 -1
  58. package/select-mode/hooks/useSelectionHover.d.ts +0 -2
  59. package/select-mode/hooks/useSelectionHover.js +0 -1
  60. package/select-mode/hooks/useSelectionInteractions.d.ts +0 -2
  61. package/select-mode/hooks/useSelectionInteractions.js +0 -1
  62. package/select-mode/hooks/useSelectionScrollSync.d.ts +0 -2
  63. package/select-mode/hooks/useSelectionScrollSync.js +0 -1
  64. package/select-mode/hooks/useSiblingResolution.js +0 -1
  65. package/select-mode/iframeRpcChannel.js +0 -1
  66. package/select-mode/inlineTextMarks.js +0 -1
  67. package/select-mode/interactions/selectionGeometry.d.ts +0 -20
  68. package/select-mode/interactions/selectionGeometry.js +0 -1
  69. package/select-mode/optimisticOverrideDom.js +0 -1
  70. package/select-mode/selectModeSession.js +0 -1
  71. package/select-mode/selectionFrame.d.ts +0 -7
  72. package/select-mode/selectionFrame.js +0 -1
  73. package/select-mode/selectionPublish.js +0 -1
  74. package/select-mode/symbolicate.js +0 -1
  75. package/select-mode/tiptapInlineEditor.js +0 -5
  76. package/ClientErrorBoundary.js.map +0 -7
  77. package/DocumentReadyBeacon.js.map +0 -7
  78. package/LinkInterceptor.js.map +0 -7
  79. package/NavigationReceiver.js.map +0 -7
  80. package/NextErrorReporter.js.map +0 -7
  81. package/annotations/AnnotationLayerMount.js.map +0 -7
  82. package/annotations/annotationController.js.map +0 -7
  83. package/annotations/bridgeGate.js.map +0 -7
  84. package/buildMetadata.js.map +0 -7
  85. package/design-library-preview/DesignLibraryPreview.js.map +0 -7
  86. package/next/component-preview-client.js.map +0 -7
  87. package/next/component-preview-href.js.map +0 -7
  88. package/next/component-preview-props.js.map +0 -7
  89. package/next/component-preview.js.map +0 -7
  90. package/next/config.js.map +0 -7
  91. package/posthog-relay.js.map +0 -7
  92. package/sandbox-runtime.js.map +0 -7
  93. package/select-mode/EditorSelection.js.map +0 -7
  94. package/select-mode/annotationFrames.js.map +0 -7
  95. package/select-mode/descriptor/elementDescriptor.js.map +0 -7
  96. package/select-mode/descriptor/styleExtraction.js.map +0 -7
  97. package/select-mode/displayModeStore.js.map +0 -7
  98. package/select-mode/fast-refresh-relay.js.map +0 -7
  99. package/select-mode/fiber.js.map +0 -7
  100. package/select-mode/hooks/useCrosshairCursor.js.map +0 -7
  101. package/select-mode/hooks/useEditModeStateMachine.js.map +0 -7
  102. package/select-mode/hooks/useOptimisticOverrides.js.map +0 -7
  103. package/select-mode/hooks/useParentMessaging.js.map +0 -7
  104. package/select-mode/hooks/useSelectModeController.js.map +0 -7
  105. package/select-mode/hooks/useSelectionHover.js.map +0 -7
  106. package/select-mode/hooks/useSelectionInteractions.js.map +0 -7
  107. package/select-mode/hooks/useSelectionScrollSync.js.map +0 -7
  108. package/select-mode/hooks/useSiblingResolution.js.map +0 -7
  109. package/select-mode/iframeRpcChannel.js.map +0 -7
  110. package/select-mode/inlineTextMarks.js.map +0 -7
  111. package/select-mode/interactions/selectionGeometry.js.map +0 -7
  112. package/select-mode/optimisticOverrideDom.js.map +0 -7
  113. package/select-mode/selectModeSession.js.map +0 -7
  114. package/select-mode/selectionFrame.js.map +0 -7
  115. package/select-mode/selectionPublish.js.map +0 -7
  116. package/select-mode/symbolicate.js.map +0 -7
  117. package/select-mode/tiptapInlineEditor.js.map +0 -7
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  /**
3
- * NOTE (Max, 2026-06-10): Client-side error boundary. On a caught render error it
3
+ * Client-side error boundary. On a caught render error it
4
4
  * (1) reports the error to the parent editor via postMessage (so it can get reported to Sentry)
5
5
  * and (2) renders a neutral cover instead of going blank, so the preview never flashes the broken
6
6
  * page while the agent fixes it. The editor decides what to show on top (loading
@@ -34,10 +34,6 @@ function ClientErrorBoundary({ children }) {
34
34
  const errorObj = error instanceof Error ? error : new Error(String(error));
35
35
  window.parent.postMessage(
36
36
  {
37
- // TODO (Max, 2026-06-11, REPL-27851): When adding Sentry to miniapps, I'll ensure we listen to this message
38
- // and send it to Sentry. I'm not a fan of having 2 separate post messages for reporting errors (the 'error' post message in NextErrorReporter, and this one).
39
- // But there's no way for the NextErrorReporter to get the actual error object, so we'll
40
- // need a separate postMessage (this one, with an updated name).
41
37
  type: "replo-editor:client-error",
42
38
  payload: {
43
39
  pageRoute: window.location.pathname,
@@ -58,4 +54,3 @@ function ClientErrorBoundary({ children }) {
58
54
  export {
59
55
  ClientErrorBoundary
60
56
  };
61
- //# sourceMappingURL=ClientErrorBoundary.js.map
@@ -6,4 +6,3 @@ function DocumentReadyBeacon() {
6
6
  export {
7
7
  DocumentReadyBeacon
8
8
  };
9
- //# sourceMappingURL=DocumentReadyBeacon.js.map
@@ -169,4 +169,3 @@ function LinkInterceptor() {
169
169
  export {
170
170
  LinkInterceptor as default
171
171
  };
172
- //# sourceMappingURL=LinkInterceptor.js.map
@@ -22,4 +22,3 @@ function NavigationReceiver() {
22
22
  export {
23
23
  NavigationReceiver
24
24
  };
25
- //# sourceMappingURL=NavigationReceiver.js.map
@@ -129,4 +129,3 @@ function NextErrorReporter() {
129
129
  export {
130
130
  NextErrorReporter
131
131
  };
132
- //# sourceMappingURL=NextErrorReporter.js.map
@@ -1,7 +1,6 @@
1
1
  import { isArray_default } from '../../../chunk-TESFJQID.mjs';
2
2
  import { Symbol_default, isObjectLike_default, baseGetTag_default } from '../../../chunk-G3S6ZNPF.mjs';
3
3
 
4
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayMap.js
5
4
  function arrayMap(array, iteratee) {
6
5
  var index = -1, length = array == null ? 0 : array.length, result = Array(length);
7
6
  while (++index < length) {
@@ -11,7 +10,6 @@ function arrayMap(array, iteratee) {
11
10
  }
12
11
  var arrayMap_default = arrayMap;
13
12
 
14
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSymbol.js
15
13
  var symbolTag = "[object Symbol]";
16
14
  function isSymbol(value) {
17
15
  return typeof value == "symbol" || isObjectLike_default(value) && baseGetTag_default(value) == symbolTag;
@@ -34,13 +32,11 @@ function baseToString(value) {
34
32
  }
35
33
  var baseToString_default = baseToString;
36
34
 
37
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toString.js
38
35
  function toString(value) {
39
36
  return value == null ? "" : baseToString_default(value);
40
37
  }
41
38
  var toString_default = toString;
42
39
 
43
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSlice.js
44
40
  function baseSlice(array, start, end) {
45
41
  var index = -1, length = array.length;
46
42
  if (start < 0) {
@@ -60,7 +56,6 @@ function baseSlice(array, start, end) {
60
56
  }
61
57
  var baseSlice_default = baseSlice;
62
58
 
63
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_castSlice.js
64
59
  function castSlice(array, start, end) {
65
60
  var length = array.length;
66
61
  end = end === void 0 ? length : end;
@@ -68,7 +63,6 @@ function castSlice(array, start, end) {
68
63
  }
69
64
  var castSlice_default = castSlice;
70
65
 
71
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hasUnicode.js
72
66
  var rsAstralRange = "\\ud800-\\udfff";
73
67
  var rsComboMarksRange = "\\u0300-\\u036f";
74
68
  var reComboHalfMarksRange = "\\ufe20-\\ufe2f";
@@ -82,13 +76,11 @@ function hasUnicode(string) {
82
76
  }
83
77
  var hasUnicode_default = hasUnicode;
84
78
 
85
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_asciiToArray.js
86
79
  function asciiToArray(string) {
87
80
  return string.split("");
88
81
  }
89
82
  var asciiToArray_default = asciiToArray;
90
83
 
91
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_unicodeToArray.js
92
84
  var rsAstralRange2 = "\\ud800-\\udfff";
93
85
  var rsComboMarksRange2 = "\\u0300-\\u036f";
94
86
  var reComboHalfMarksRange2 = "\\ufe20-\\ufe2f";
@@ -114,13 +106,11 @@ function unicodeToArray(string) {
114
106
  }
115
107
  var unicodeToArray_default = unicodeToArray;
116
108
 
117
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stringToArray.js
118
109
  function stringToArray(string) {
119
110
  return hasUnicode_default(string) ? unicodeToArray_default(string) : asciiToArray_default(string);
120
111
  }
121
112
  var stringToArray_default = stringToArray;
122
113
 
123
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createCaseFirst.js
124
114
  function createCaseFirst(methodName) {
125
115
  return function(string) {
126
116
  string = toString_default(string);
@@ -132,17 +122,14 @@ function createCaseFirst(methodName) {
132
122
  }
133
123
  var createCaseFirst_default = createCaseFirst;
134
124
 
135
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/upperFirst.js
136
125
  var upperFirst = createCaseFirst_default("toUpperCase");
137
126
  var upperFirst_default = upperFirst;
138
127
 
139
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/capitalize.js
140
128
  function capitalize(string) {
141
129
  return upperFirst_default(toString_default(string).toLowerCase());
142
130
  }
143
131
  var capitalize_default = capitalize;
144
132
 
145
- // ../replo-utils/lib/fonts.ts
146
133
  function slugifyFontFamily(family) {
147
134
  return family.replace(/([a-z])([A-Z])/g, "$1-$2").split(/[\s_-]+/u).map((word) => word.toLowerCase()).join("-");
148
135
  }
@@ -1,4 +1,3 @@
1
- // ../replo-utils/lib/geometry.ts
2
1
  function isIntersecting(targetRect, destinationRect, { tolerance = 0 } = {}) {
3
2
  return targetRect.left <= destinationRect.right + tolerance && targetRect.right >= destinationRect.left - tolerance && targetRect.top <= destinationRect.bottom + tolerance && targetRect.bottom >= destinationRect.top - tolerance;
4
3
  }
@@ -40,8 +40,6 @@ export declare function randomBigString(): string;
40
40
  /**
41
41
  * Given a current value and a previous value, calculate the percentage change
42
42
  * from the previous value to the current value.
43
- *
44
- * @author Max 2025-04-01
45
43
  */
46
44
  export declare function calculatePercentageChange(current: number, previous: number): number | null;
47
45
  /**
@@ -54,7 +52,5 @@ export declare function calculatePercentageChange(current: number, previous: num
54
52
  * formatBytes(1536) // "1.50 KB"
55
53
  * formatBytes(1048576) // "1.00 MB"
56
54
  * formatBytes("1073741824") // "1.00 GB"
57
- *
58
- * @author Max 2024-08-28
59
55
  */
60
56
  export declare function formatBytes(bytes: number | string): string;
@@ -2,7 +2,6 @@ import { randomUUID } from '../../../chunk-SGKQ5HGT.mjs';
2
2
  import { isNumber_default } from '../../../chunk-FLYEIRFK.mjs';
3
3
  import '../../../chunk-G3S6ZNPF.mjs';
4
4
 
5
- // ../replo-utils/lib/math.ts
6
5
  var EPSILON = 0.03;
7
6
  function isCloseTo(number, comparator, epsilon = EPSILON) {
8
7
  return Math.abs(number - comparator) < epsilon;
@@ -1,4 +1,3 @@
1
- // ../replo-utils/lib/posthogReplay.ts
2
1
  var POSTHOG_REPLAY_SNAPSHOT_REQUEST = "posthog:replay:request-full-snapshot";
3
2
  var POSTHOG_REPLAY_READY_POLL_INTERVAL_MS = 100;
4
3
  var POSTHOG_REPLAY_READY_POLL_TIMEOUT_MS = 1e4;
@@ -1,6 +1,5 @@
1
1
  import * as React from 'react';
2
2
 
3
- // ../replo-utils/react/use-iframe-rpc-channel.ts
4
3
  function useIframeRpcChannel(channel) {
5
4
  React.useEffect(() => {
6
5
  if (!channel) {
@@ -1,7 +1,6 @@
1
1
  import { startViewportSnapshotResponder } from '../../../chunk-3YA3QXUQ.mjs';
2
2
  import { useEffect } from 'react';
3
3
 
4
- // ../../node_modules/.pnpm/rrweb-snapshot@2.1.1/node_modules/rrweb-snapshot/dist/rrweb-snapshot.js
5
4
  var __defProp = Object.defineProperty;
6
5
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
6
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -44,7 +43,7 @@ function getUntaintedPrototype(key) {
44
43
  const defaultPrototype = defaultObj.prototype;
45
44
  const accessorNames = key in testableAccessors ? testableAccessors[key] : void 0;
46
45
  const isUntaintedAccessors = Boolean(
47
- accessorNames && // @ts-expect-error 2345
46
+ accessorNames &&
48
47
  accessorNames.every(
49
48
  (accessor) => {
50
49
  var _a, _b;
@@ -57,7 +56,6 @@ function getUntaintedPrototype(key) {
57
56
  const methodNames = key in testableMethods ? testableMethods[key] : void 0;
58
57
  const isUntaintedMethods = Boolean(
59
58
  methodNames && methodNames.every(
60
- // @ts-expect-error 2345
61
59
  (method) => {
62
60
  var _a;
63
61
  return typeof defaultPrototype[method] === "function" && ((_a = defaultPrototype[method]) == null ? void 0 : _a.toString().includes("[native code]"));
@@ -219,8 +217,6 @@ function isElement(n) {
219
217
  }
220
218
  function isShadowRoot(n) {
221
219
  const hostEl = (
222
- // anchor and textarea elements also have a `host` property
223
- // but only shadow roots have a `mode` property
224
220
  n && "host" in n && "mode" in n && index.host(n) || null
225
221
  );
226
222
  return Boolean(
@@ -279,9 +275,8 @@ function stringifyRule(rule2, sheetHref) {
279
275
  if (isCSSImportRule(rule2)) {
280
276
  let importStringified;
281
277
  try {
282
- importStringified = // for same-origin stylesheets,
283
- // we can access the imported stylesheet rules directly
284
- stringifyStylesheet(rule2.styleSheet) || // work around browser issues with the raw string `@import url(...)` statement
278
+ importStringified =
279
+ stringifyStylesheet(rule2.styleSheet) ||
285
280
  escapeImportStatement(rule2);
286
281
  } catch (error) {
287
282
  importStringified = rule2.cssText;
@@ -331,8 +326,6 @@ var Mirror = class {
331
326
  getMeta(n) {
332
327
  return this.nodeMetaMap.get(n) || null;
333
328
  }
334
- // removes the node from idNodeMap
335
- // doesn't remove the node from nodeMetaMap
336
329
  removeNodeFromMap(n) {
337
330
  const id = this.getId(n);
338
331
  this.idNodeMap.delete(id);
@@ -398,7 +391,6 @@ function is2DCanvasBlank(canvas) {
398
391
  const getImageData = ctx.getImageData;
399
392
  const originalGetImageData = ORIGINAL_ATTRIBUTE_NAME in getImageData ? getImageData[ORIGINAL_ATTRIBUTE_NAME] : getImageData;
400
393
  const pixelBuffer = new Uint32Array(
401
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
402
394
  originalGetImageData.call(
403
395
  ctx,
404
396
  x,
@@ -415,7 +407,6 @@ function is2DCanvasBlank(canvas) {
415
407
  function getInputType(element) {
416
408
  const type = element.type;
417
409
  return element.hasAttribute("data-rr-is-password") ? "password" : type ? (
418
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
419
410
  toLowerCase(type)
420
411
  ) : null;
421
412
  }
@@ -504,8 +495,7 @@ function splitCssText(cssText, style, _testNoPxNorm = false) {
504
495
  let j = 3;
505
496
  for (; j < textContentNorm.length; j++) {
506
497
  if (
507
- // keep consuming css identifiers (to get a decent chunk more quickly)
508
- textContentNorm[j].match(/[a-zA-Z0-9]/) || // substring needs to be unique to this section
498
+ textContentNorm[j].match(/[a-zA-Z0-9]/) ||
509
499
  textContentNorm.indexOf(textContentNorm.substring(0, j), 1) !== -1
510
500
  ) {
511
501
  continue;
@@ -854,7 +844,6 @@ function serializeNode(n, options) {
854
844
  type: NodeType.Document,
855
845
  childNodes: [],
856
846
  compatMode: n.compatMode
857
- // probably "BackCompat"
858
847
  };
859
848
  } else {
860
849
  return {
@@ -1147,8 +1136,6 @@ function slimDOMDefaults(_slimDOMOptions) {
1147
1136
  headMetaRobots: true,
1148
1137
  headMetaHttpEquiv: true,
1149
1138
  headMetaVerification: true,
1150
- // the following are off for slimDOMOptions === true,
1151
- // as they destroy some (hidden) info:
1152
1139
  headMetaAuthorship: _slimDOMOptions === "all",
1153
1140
  headMetaDescKeywords: _slimDOMOptions === "all",
1154
1141
  headTitleMutations: _slimDOMOptions === "all"
@@ -1162,9 +1149,9 @@ function slimDOMExcluded(sn, slimDOMOptions) {
1162
1149
  if (slimDOMOptions.comment && sn.type === NodeType.Comment) {
1163
1150
  return true;
1164
1151
  } else if (sn.type === NodeType.Element) {
1165
- if (slimDOMOptions.script && // script tag
1166
- (sn.tagName === "script" || // (module)preload link
1167
- sn.tagName === "link" && (sn.attributes.rel === "preload" && sn.attributes.as === "script" || sn.attributes.rel === "modulepreload") || // prefetch link
1152
+ if (slimDOMOptions.script &&
1153
+ (sn.tagName === "script" ||
1154
+ sn.tagName === "link" && (sn.attributes.rel === "preload" && sn.attributes.as === "script" || sn.attributes.rel === "modulepreload") ||
1168
1155
  sn.tagName === "link" && sn.attributes.rel === "prefetch" && typeof sn.attributes.href === "string" && extractFileExtension(sn.attributes.href) === "js")) {
1169
1156
  return true;
1170
1157
  } else if (slimDOMOptions.headFavicon && (sn.tagName === "link" && sn.attributes.rel === "shortcut icon" || sn.tagName === "meta" && (lowerIfExists(sn.attributes.name).match(
@@ -1174,7 +1161,7 @@ function slimDOMExcluded(sn, slimDOMOptions) {
1174
1161
  } else if (sn.tagName === "meta") {
1175
1162
  if (slimDOMOptions.headMetaDescKeywords && lowerIfExists(sn.attributes.name).match(/^description|keywords$/)) {
1176
1163
  return true;
1177
- } else if (slimDOMOptions.headMetaSocial && (lowerIfExists(sn.attributes.property).match(/^(og|twitter|fb):/) || // og = opengraph (facebook)
1164
+ } else if (slimDOMOptions.headMetaSocial && (lowerIfExists(sn.attributes.property).match(/^(og|twitter|fb):/) ||
1178
1165
  lowerIfExists(sn.attributes.name).match(/^(og|twitter):/) || lowerIfExists(sn.attributes.name) === "pinterest")) {
1179
1166
  return true;
1180
1167
  } else if (slimDOMOptions.headMetaRobots && (lowerIfExists(sn.attributes.name) === "robots" || lowerIfExists(sn.attributes.name) === "googlebot" || lowerIfExists(sn.attributes.name) === "bingbot")) {
@@ -2067,7 +2054,7 @@ function requireNode() {
2067
2054
  set(node2, prop, value) {
2068
2055
  if (node2[prop] === value) return true;
2069
2056
  node2[prop] = value;
2070
- if (prop === "prop" || prop === "value" || prop === "name" || prop === "params" || prop === "important" || /* c8 ignore next */
2057
+ if (prop === "prop" || prop === "value" || prop === "name" || prop === "params" || prop === "important" ||
2071
2058
  prop === "text") {
2072
2059
  node2.markDirty();
2073
2060
  }
@@ -4158,7 +4145,6 @@ function requireParser() {
4158
4145
  }
4159
4146
  }
4160
4147
  }
4161
- // Helpers
4162
4148
  getPosition(offset) {
4163
4149
  let pos = this.input.fromOffset(offset);
4164
4150
  return {
@@ -4317,7 +4303,6 @@ function requireParser() {
4317
4303
  }
4318
4304
  return spaces;
4319
4305
  }
4320
- // Errors
4321
4306
  spacesAndCommentsFromStart(tokens) {
4322
4307
  let next;
4323
4308
  let spaces = "";
@@ -5235,7 +5220,6 @@ postcss.Rule;
5235
5220
  postcss.Root;
5236
5221
  postcss.Node;
5237
5222
 
5238
- // ../replo-utils/react/use-viewport-snapshot-responder.tsx
5239
5223
  function measureViewportFrameRect(frameIndex) {
5240
5224
  const element = document.querySelectorAll("iframe")[frameIndex];
5241
5225
  if (!element) {
@@ -1,6 +1,5 @@
1
1
  import { z } from 'zod';
2
2
 
3
- // ../schemas/componentPreview.ts
4
3
  var DATA_LOADER_KEYS = {
5
4
  SHOPIFY_PRODUCT: "shopify_storefront.product",
6
5
  SHOPIFY_COLLECTION: "shopify_storefront.collection",
@@ -29,7 +28,6 @@ var DATA_LOADER_KEYS = {
29
28
  };
30
29
  z.enum(Object.values(DATA_LOADER_KEYS));
31
30
 
32
- // ../schemas/componentPreview.ts
33
31
  var MAX_COMPONENT_PREVIEW_PROPS_BYTES = 16 * 1024;
34
32
  var componentPreviewPropNameSchema = z.string().min(1).max(80).regex(/^[A-Za-z_$][\w$]*$/u).refine((name) => {
35
33
  return !["__proto__", "constructor", "dangerouslySetInnerHTML"].includes(
@@ -49,8 +47,6 @@ var websiteBuilderToComponentPreviewMethodConfig = {
49
47
  props: componentPreviewPropsSchema,
50
48
  sourceRevision: z.string().min(1)
51
49
  }),
52
- // How the frame applied the update: in place via the client prop store,
53
- // via an in-frame server navigation, or not at all (already current).
54
50
  outputSchema: z.object({
55
51
  mode: z.enum(["client", "navigation", "unchanged"])
56
52
  }),
@@ -1,6 +1,5 @@
1
1
  import { z } from 'zod';
2
2
 
3
- // ../schemas/designLibrary.ts
4
3
  var colorTypeSchema = z.enum([
5
4
  "basic",
6
5
  "foregroundPrimary",
@@ -55,7 +54,6 @@ z.discriminatedUnion("type", [
55
54
  savedStyleTextAttributesSchema
56
55
  ]).describe("SavedStyleAttributes");
57
56
 
58
- // ../schemas/designLibrary.ts
59
57
  var savedColorStyleSchema = z.object({
60
58
  type: z.literal("color"),
61
59
  name: z.string(),
@@ -186,9 +186,6 @@ export type ErrorDetails = {
186
186
  * Map of error keys to custom user-facing details. Should ONLY be used
187
187
  * in cases where we want to override the default behavior of ErrorUserFacingDetails
188
188
  * from the backend.
189
- *
190
- * TODO (Noah, 2024-01-15): Clean up these custom configs, all of them
191
- * are only used by Django (and 'base' can be moved directly into the reducer function)
192
189
  */
193
190
  export declare const CUSTOM_ERROR_KEY_TO_PROPS: {
194
191
  "shopifyArticle.failedToPublish": () => {
@@ -16,7 +16,7 @@ export type IframeRpcChannelHandlerMeta<OutgoingMethods extends IframeRpcChannel
16
16
  channel: IframeRpcChannelRemote<OutgoingMethods>;
17
17
  };
18
18
  export type IframeRpcChannelHandlers<IncomingMethods extends IframeRpcChannelMethodConfig, OutgoingMethods extends IframeRpcChannelMethodConfig = IframeRpcChannelMethodConfig> = {
19
- [Method in keyof IncomingMethods]: (input: z.output<IncomingMethods[Method]["inputSchema"]>, meta: IframeRpcChannelHandlerMeta<OutgoingMethods>) => IsVoidMethod<IncomingMethods, Method> extends true ? void : // Valued handlers stay `unknown` so callers can return domain/generated
19
+ [Method in keyof IncomingMethods]: (input: z.output<IncomingMethods[Method]["inputSchema"]>, meta: IframeRpcChannelHandlerMeta<OutgoingMethods>) => IsVoidMethod<IncomingMethods, Method> extends true ? void :
20
20
  unknown | Promise<unknown>;
21
21
  };
22
22
  export type IframeRpcChannelInputHandlers<IncomingMethods extends IframeRpcChannelMethodConfig> = {
@@ -5,7 +5,6 @@ import '../../chunk-TESFJQID.mjs';
5
5
  import '../../chunk-G3S6ZNPF.mjs';
6
6
  import { z } from 'zod';
7
7
 
8
- // ../replo-utils/lib/log.ts
9
8
  var defaultLogger = {
10
9
  info: console.log,
11
10
  debug: console.debug,
@@ -39,7 +38,6 @@ var errorUserFacingDetailsMessageSchema = z.object({
39
38
  "billing.addPublishedElements",
40
39
  "billing.addShopifyThemeProject",
41
40
  "billing.addReploSite",
42
- // Agent Billing ONLY
43
41
  "agentBilling.shopifyThemeBuilder.publishedElements.exceeded",
44
42
  "agentBilling.shopifyThemeBuilder.projects.exceeded",
45
43
  "agentBilling.sites.exceeded",
@@ -48,14 +46,8 @@ var errorUserFacingDetailsMessageSchema = z.object({
48
46
  ]),
49
47
  message: z.string(),
50
48
  isRecoverable: z.boolean().optional(),
51
- // NOTE (Matt 2024-03-22): We support detail being an array of strings
52
- // in FullPageModal only.
53
49
  detail: z.array(z.string()).or(z.string()).optional(),
54
50
  key: z.string(),
55
- // Structured data for API callers next to the human message, e.g. the
56
- // current draft version on a project-context 409 or the offending paths on
57
- // a 422. The worker error handler serializes userFacingDetails as-is, so
58
- // this is the one place such data can travel without a second envelope.
59
51
  details: z.record(z.string(), z.unknown()).optional(),
60
52
  usage: z.object({
61
53
  current: z.number(),
@@ -101,15 +93,7 @@ var errorUserFacingDetailsMessageSchema = z.object({
101
93
  ]).optional()
102
94
  }).describe("ErrorUserFacingDetailsWithMessage");
103
95
  z.discriminatedUnion("type", [
104
- /**
105
- * Normal errors, show error UI depending on the type
106
- */
107
96
  errorUserFacingDetailsMessageSchema,
108
- /**
109
- * Errors which should be ignored by the frontend. This is uncommon, usually
110
- * you want to show an error in the UI, and if you don't want to then you catch
111
- * the error in your route.
112
- */
113
97
  z.object({
114
98
  type: z.literal("uncommon_none"),
115
99
  key: z.string(),
@@ -171,7 +155,6 @@ var IframeRpcChannelInvalidInputError = class extends IframeRpcChannelError {
171
155
  }
172
156
  };
173
157
 
174
- // ../schemas/iframeRpcChannel.ts
175
158
  var iframeRpcCallResultSchema = z.discriminatedUnion("type", [
176
159
  z.object({
177
160
  type: z.literal("success"),
@@ -308,7 +291,6 @@ function createIframeRpcChannel(options) {
308
291
  }
309
292
  try {
310
293
  const handler = handlers[
311
- // eslint-disable-next-line replo/no-as-cast -- NOTE (Noah, 2026-07-25): The method existence check above narrows this dynamic wire string to the configured handler keys.
312
294
  message.method
313
295
  ];
314
296
  const result = await handler(parsedInput.data, handlerMeta);
@@ -350,7 +332,6 @@ function createIframeRpcChannel(options) {
350
332
  return;
351
333
  }
352
334
  const handler = handlers[
353
- // eslint-disable-next-line replo/no-as-cast -- NOTE (Noah, 2026-08-07): Method existence check narrows this wire string to configured handler keys.
354
335
  message.method
355
336
  ];
356
337
  handler(parsedInput.data, handlerMeta);
@@ -493,9 +474,6 @@ function createIframeRpcChannel(options) {
493
474
  }, timeoutMs);
494
475
  pendingRequests.set(id, {
495
476
  method,
496
- // PendingRequest is shared across methods, so resolve is typed as
497
- // unknown; handleResponse already validated against this method's
498
- // outputSchema before calling it.
499
477
  resolve: (value) => {
500
478
  resolve(value);
501
479
  },
@@ -1,6 +1,5 @@
1
1
  import { z } from 'zod';
2
2
 
3
- // ../schemas/pageAnnotations.ts
4
3
  var PAGE_ANNOTATIONS_PROTOCOL_VERSION = 1;
5
4
  var pageAnnotationColorSchema = z.enum(["red", "purple", "amber"]).describe("PageAnnotationColor");
6
5
  var pageAnnotationPlacementSchema = z.enum(["element", "pageTop"]).describe("PageAnnotationPlacement");
@@ -9,8 +8,6 @@ var pageAnnotationMarkerSchema = z.object({
9
8
  number: z.number().int().min(1).max(99),
10
9
  color: pageAnnotationColorSchema,
11
10
  selector: z.string().min(1).max(2e3),
12
- // "pageTop" markers ignore the selector and stack near the top of the
13
- // page (page-wide findings); "element" markers pin to their selector.
14
11
  placement: pageAnnotationPlacementSchema.default("element")
15
12
  }).describe("PageAnnotationMarker");
16
13
  var pageAnnotationViewportRectSchema = z.object({
@@ -312,8 +312,6 @@ export declare const selectModeFormatCommandSchema: z.ZodEnum<{
312
312
  * are pinned to this enum via `Extract<SelectModeSelectionType, …>`
313
313
  *
314
314
  * Renaming or adding a variant here is a TS error in all three.
315
- *
316
- * @author Kevin O'Connell 2026-04-20
317
315
  */
318
316
  export declare const selectModeSelectionTypeSchema: z.ZodEnum<{
319
317
  element: "element";
@@ -337,8 +335,6 @@ export declare const selectModeSelectionTypeSchema: z.ZodEnum<{
337
335
  * Distinct from the SDK-internal `SelectModeInteractionSession`, which
338
336
  * holds live DOM `Element` refs and live pointer/scroll geometry. This
339
337
  * type holds only the message-passable, serialized projection.
340
- *
341
- * @author Kevin O'Connell 2026-04-23
342
338
  */
343
339
  export declare const selectModeSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
344
340
  type: z.ZodLiteral<"none">;
@@ -24,7 +24,6 @@ var websiteBuilderToCanopyMethodConfig = {
24
24
  outputSchema: selectedElementSchema,
25
25
  timeoutMs: 1500
26
26
  },
27
- // Client-side transition command; fire-and-forget because success is observed as the `replo:navigated` echo.
28
27
  navigateToRoute: {
29
28
  inputSchema: z.object({ pathname: z.string() }),
30
29
  outputSchema: z.void()
@@ -33,13 +32,6 @@ var websiteBuilderToCanopyMethodConfig = {
33
32
  inputSchema: z.object({ displayMode: displayModeSchema }),
34
33
  outputSchema: z.void()
35
34
  },
36
- // Declarative push of the parent's current selection into the canopy
37
- // iframe. Transitioning to `none` is canopy's signal to hide its
38
- // in-iframe selection frame and drop any in-progress drag — there's no
39
- // separate "clear" message because selection state always flows through
40
- // agentUiState. For an `area` selection the parent may also send the
41
- // selectors of the members it still holds, so an item removed in the
42
- // editor is dropped from the in-iframe selection too.
43
35
  setSelectionType: {
44
36
  inputSchema: z.object({
45
37
  selectionType: selectModeSelectionTypeSchema,
@@ -155,8 +147,6 @@ var canopyToWebsiteBuilderMethodConfig = {
155
147
  editorStateUpdate: {
156
148
  inputSchema: z.object({
157
149
  activeMarks: selectModeTiptapActiveMarksSchema,
158
- // Whether an inline text edit is currently open. Lets the parent show the
159
- // inline formatting controls (and live mark state) only while editing.
160
150
  isEditing: z.boolean()
161
151
  }),
162
152
  outputSchema: z.void()
@@ -10,4 +10,3 @@ function AnnotationLayerMount() {
10
10
  export {
11
11
  AnnotationLayerMount
12
12
  };
13
- //# sourceMappingURL=AnnotationLayerMount.js.map
@@ -77,7 +77,6 @@ function resolveMarkers() {
77
77
  width: 0,
78
78
  height: 0
79
79
  },
80
- // The editor owns numbering; rendering the wire number keeps dots in sync with the panel.
81
80
  displayNumber: marker.number
82
81
  });
83
82
  pageTopSlot += 1;
@@ -99,7 +98,6 @@ function resolveMarkers() {
99
98
  marker,
100
99
  element,
101
100
  isFixed,
102
- // Fixed frames use viewport coords; absolute frames use page coords.
103
101
  rect: {
104
102
  x: domRect.x + (isFixed ? 0 : scrollOffset.left),
105
103
  y: domRect.y + (isFixed ? 0 : scrollOffset.top),
@@ -420,4 +418,3 @@ function initAnnotationLayer() {
420
418
  export {
421
419
  initAnnotationLayer
422
420
  };
423
- //# sourceMappingURL=annotationController.js.map
@@ -1,9 +1,6 @@
1
1
  const ALLOWED_EDITOR_ORIGIN_PATTERNS = [
2
- // Local dev editors (any port).
3
2
  /^https?:\/\/localhost(?::\d+)?$/u,
4
- // Hosted editors and miniapps; multi-label hosts like website-builder.apps.replo.app must pass.
5
3
  /^https:\/\/(?:[a-z0-9-]+\.)*replo\.app$/u,
6
- // Dev front-door tunnels (`https://replo-<alias>.ngrok.app`).
7
4
  /^https:\/\/replo-[a-z0-9-]+\.ngrok\.app$/u
8
5
  ];
9
6
  function isAllowedEditorOrigin(origin) {
@@ -19,4 +16,3 @@ export {
19
16
  isAllowedEditorMessage,
20
17
  isAllowedEditorOrigin
21
18
  };
22
- //# sourceMappingURL=bridgeGate.js.map
package/buildMetadata.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export const BUILD_METADATA = {
2
2
  "packageName": "@replohq/sandbox-runtime",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "branch": "HEAD",
5
- "commit": "d7576c3808fcbadef1e0cb29b3ea3ed492485a05",
6
- "builtAt": "2026-09-14T23:38:15.448Z"
5
+ "commit": "d7ee0ec28234216b633c81e1a6d8683591c946f8",
6
+ "builtAt": "2026-09-15T17:30:06.538Z"
7
7
  };
@@ -1,4 +1,3 @@
1
- // ../replo-utils/lib/viewportSnapshot.ts
2
1
  var VIEWPORT_SNAPSHOT_REQUEST = "replo:viewport-snapshot:request";
3
2
  var VIEWPORT_SNAPSHOT_RESPONSE = "replo:viewport-snapshot:response";
4
3
  var VIEWPORT_CONTEXT_REQUEST = "replo:viewport-context:request";
@@ -51,8 +50,7 @@ function requestChildViewportSnapshots({
51
50
  );
52
51
  };
53
52
  const onMessage = (event) => {
54
- if (!isResponseMessage(event.data) || event.data.requestId !== requestId || // A frame may only answer for its own slot — anything else could
55
- // overwrite a sibling's capture or force an early settle.
53
+ if (!isResponseMessage(event.data) || event.data.requestId !== requestId ||
56
54
  event.source !== targetWindow.frames[event.data.frameIndex]) {
57
55
  return;
58
56
  }
@@ -127,7 +125,6 @@ function startViewportSnapshotResponder({
127
125
  }
128
126
  void requestChildViewportSnapshots({
129
127
  targetWindow,
130
- // Derived per level so a child's own fan-out can't collide with ours.
131
128
  requestId: `${requestId}:${frameIndex}`,
132
129
  timeoutMs: cascadeTimeoutMs,
133
130
  remainingDepth: remainingDepth - 1,
@@ -1,6 +1,5 @@
1
1
  import { isObjectLike_default, baseGetTag_default } from './chunk-G3S6ZNPF.mjs';
2
2
 
3
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isNumber.js
4
3
  var numberTag = "[object Number]";
5
4
  function isNumber(value) {
6
5
  return typeof value == "number" || isObjectLike_default(value) && baseGetTag_default(value) == numberTag;