@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.
Files changed (32) hide show
  1. package/_vendor/replo-utils/lib/object.d.ts +16 -1
  2. package/_vendor/replo-utils/lib/viewportSnapshot.d.ts +1 -1
  3. package/_vendor/replo-utils/lib/viewportSnapshot.mjs +1 -1
  4. package/_vendor/replo-utils/react/use-viewport-snapshot-responder.mjs +28 -5222
  5. package/_vendor/schemas/componentPreview.d.ts +1 -1
  6. package/_vendor/schemas/componentPreview.mjs +18 -18
  7. package/_vendor/schemas/designLibrary.d.ts +1 -1
  8. package/_vendor/schemas/designLibrary.mjs +72 -72
  9. package/_vendor/schemas/errors.d.ts +3 -43
  10. package/_vendor/schemas/iframeRpcChannel.d.ts +1 -1
  11. package/_vendor/schemas/iframeRpcChannel.mjs +27 -26
  12. package/_vendor/schemas/loaderKeys.d.ts +1 -1
  13. package/_vendor/schemas/pageAnnotations.d.ts +1 -1
  14. package/_vendor/schemas/pageAnnotations.mjs +1 -1
  15. package/_vendor/schemas/reploError.d.ts +43 -0
  16. package/_vendor/schemas/savedStyles.d.ts +1 -1
  17. package/_vendor/schemas/selectMode.d.ts +1 -1
  18. package/_vendor/schemas/selectMode.mjs +1 -1
  19. package/_vendor/schemas/selectModeIframeRpc.d.ts +1 -8
  20. package/_vendor/schemas/selectModeIframeRpc.mjs +3 -10
  21. package/buildMetadata.js +3 -3
  22. package/capturePage.js +1 -1
  23. package/{chunk-3YA3QXUQ.mjs → chunk-B3PLD7SH.mjs} +29 -18
  24. package/{chunk-KFJZ2OLV.mjs → chunk-TP4ZXK4R.mjs} +1 -1
  25. package/package.json +4 -4
  26. package/rrweb-snapshot-GTQBXO2Y.mjs +5761 -0
  27. package/select-mode/descriptor/elementDescriptor.js +1 -1
  28. package/select-mode/fiber.js +1 -1
  29. package/select-mode/hooks/useOptimisticOverrides.js +1 -1
  30. package/select-mode/hooks/useParentMessaging.js +1 -1
  31. package/select-mode/iframeRpcChannel.d.ts +0 -6
  32. package/select-mode/iframeRpcChannel.js +2 -8
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  export declare const MAX_COMPONENT_PREVIEW_PROPS_BYTES: number;
3
3
  export declare const componentPreviewPropNameSchema: z.ZodString;
4
4
  export declare const componentPreviewPropsSchema: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import * as z2 from 'zod';
2
2
 
3
3
  var DATA_LOADER_KEYS = {
4
4
  SHOPIFY_INTEGRATION_DETAILS: "shopify_storefront.integration_details",
@@ -28,52 +28,52 @@ var DATA_LOADER_KEYS = {
28
28
  CONTENTFUL_ENTRY: "contentful.entry",
29
29
  CONTENTFUL_ENTRIES: "contentful.entries"
30
30
  };
31
- z.enum(Object.values(DATA_LOADER_KEYS));
31
+ z2.enum(Object.values(DATA_LOADER_KEYS));
32
32
 
33
33
  var MAX_COMPONENT_PREVIEW_PROPS_BYTES = 16 * 1024;
34
- var componentPreviewPropNameSchema = z.string().min(1).max(80).regex(/^[A-Za-z_$][\w$]*$/u).refine((name) => {
34
+ var componentPreviewPropNameSchema = z2.string().min(1).max(80).regex(/^[A-Za-z_$][\w$]*$/u).refine((name) => {
35
35
  return !["__proto__", "constructor", "dangerouslySetInnerHTML"].includes(
36
36
  name
37
37
  );
38
38
  }, "Unsafe prop name");
39
- var componentPreviewPropsSchema = z.record(
39
+ var componentPreviewPropsSchema = z2.record(
40
40
  componentPreviewPropNameSchema,
41
- z.json()
41
+ z2.json()
42
42
  );
43
43
  var COMPONENT_PREVIEW_IFRAME_RPC_CHANNEL_ID = "replo:component-preview-iframe-rpc";
44
44
  var COMPONENT_PREVIEW_IFRAME_RPC_CHANNEL_VERSION = 2;
45
45
  var COMPONENT_PREVIEW_PARENT_ORIGIN_PARAM = "reploParentOrigin";
46
46
  var websiteBuilderToComponentPreviewMethodConfig = {
47
47
  setProps: {
48
- inputSchema: z.object({
48
+ inputSchema: z2.object({
49
49
  props: componentPreviewPropsSchema,
50
- sourceRevision: z.string().min(1)
50
+ sourceRevision: z2.string().min(1)
51
51
  }),
52
- outputSchema: z.object({
53
- mode: z.enum(["client", "navigation", "unchanged"])
52
+ outputSchema: z2.object({
53
+ mode: z2.enum(["client", "navigation", "unchanged"])
54
54
  }),
55
55
  timeoutMs: 1e4
56
56
  }
57
57
  };
58
58
  var componentPreviewToWebsiteBuilderMethodConfig = {
59
59
  contentBoundsChanged: {
60
- inputSchema: z.object({
61
- height: z.number().finite().min(0).max(1e5)
60
+ inputSchema: z2.object({
61
+ height: z2.number().finite().min(0).max(1e5)
62
62
  }),
63
- outputSchema: z.void()
63
+ outputSchema: z2.void()
64
64
  },
65
65
  iframeReady: {
66
- inputSchema: z.undefined(),
67
- outputSchema: z.void()
66
+ inputSchema: z2.undefined(),
67
+ outputSchema: z2.void()
68
68
  }
69
69
  };
70
- var componentPreviewProductReferenceSchema = z.object({
71
- type: z.literal("product"),
72
- loaderKey: z.enum([
70
+ var componentPreviewProductReferenceSchema = z2.object({
71
+ type: z2.literal("product"),
72
+ loaderKey: z2.enum([
73
73
  DATA_LOADER_KEYS.SHOPIFY_PRODUCT,
74
74
  DATA_LOADER_KEYS.REPLO_PRODUCT
75
75
  ]),
76
- productId: z.string().min(1)
76
+ productId: z2.string().min(1)
77
77
  }).strict().describe("ComponentPreviewProductReference");
78
78
 
79
79
  export { COMPONENT_PREVIEW_IFRAME_RPC_CHANNEL_ID, COMPONENT_PREVIEW_IFRAME_RPC_CHANNEL_VERSION, COMPONENT_PREVIEW_PARENT_ORIGIN_PARAM, MAX_COMPONENT_PREVIEW_PROPS_BYTES, componentPreviewProductReferenceSchema, componentPreviewPropNameSchema, componentPreviewPropsSchema, componentPreviewToWebsiteBuilderMethodConfig, websiteBuilderToComponentPreviewMethodConfig };
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  export declare const savedColorStyleSchema: z.ZodObject<{
3
3
  type: z.ZodLiteral<"color">;
4
4
  name: z.ZodString;
@@ -1,6 +1,6 @@
1
- import { z } from 'zod';
1
+ import * as z2 from 'zod';
2
2
 
3
- var colorTypeSchema = z.enum([
3
+ var colorTypeSchema = z2.enum([
4
4
  "basic",
5
5
  "foregroundPrimary",
6
6
  "foregroundSecondary",
@@ -9,12 +9,12 @@ var colorTypeSchema = z.enum([
9
9
  "backgroundSecondary",
10
10
  "backgroundTertiary"
11
11
  ]).describe("SavedStyleColorType");
12
- var savedStyleColorAttributesSchema = z.object({
13
- type: z.literal("color"),
14
- color: z.string(),
12
+ var savedStyleColorAttributesSchema = z2.object({
13
+ type: z2.literal("color"),
14
+ color: z2.string(),
15
15
  colorType: colorTypeSchema
16
16
  }).describe("SavedStyleColorAttributes");
17
- var savedStyleTextHtmlTagSchema = z.enum([
17
+ var savedStyleTextHtmlTagSchema = z2.enum([
18
18
  "h1",
19
19
  "h2",
20
20
  "h3",
@@ -23,13 +23,13 @@ var savedStyleTextHtmlTagSchema = z.enum([
23
23
  "h6",
24
24
  "p"
25
25
  ]);
26
- var savedStyleTextAttributesSchema = z.object({
27
- type: z.literal("text"),
26
+ var savedStyleTextAttributesSchema = z2.object({
27
+ type: z2.literal("text"),
28
28
  htmlTag: savedStyleTextHtmlTagSchema,
29
- color: z.string().optional(),
30
- fontFamily: z.string().nullish(),
31
- fontSize: z.string().optional(),
32
- fontWeight: z.enum([
29
+ color: z2.string().optional(),
30
+ fontFamily: z2.string().nullish(),
31
+ fontSize: z2.string().optional(),
32
+ fontWeight: z2.enum([
33
33
  "100",
34
34
  "200",
35
35
  "300",
@@ -41,91 +41,91 @@ var savedStyleTextAttributesSchema = z.object({
41
41
  "900",
42
42
  "950"
43
43
  ]).optional(),
44
- letterSpacing: z.string().optional(),
45
- lineHeight: z.string().optional(),
46
- textAlign: z.enum(["left", "center", "right"]).optional(),
47
- textDecoration: z.enum(["underline", "line-through", "italic", "none"]).optional(),
48
- textShadow: z.string().optional(),
49
- textStroke: z.string().optional(),
50
- textTransform: z.enum(["lowercase", "uppercase", "capitalize", "none"]).optional()
44
+ letterSpacing: z2.string().optional(),
45
+ lineHeight: z2.string().optional(),
46
+ textAlign: z2.enum(["left", "center", "right"]).optional(),
47
+ textDecoration: z2.enum(["underline", "line-through", "italic", "none"]).optional(),
48
+ textShadow: z2.string().optional(),
49
+ textStroke: z2.string().optional(),
50
+ textTransform: z2.enum(["lowercase", "uppercase", "capitalize", "none"]).optional()
51
51
  }).describe("SavedStyleTextAttributes");
52
- z.discriminatedUnion("type", [
52
+ z2.discriminatedUnion("type", [
53
53
  savedStyleColorAttributesSchema,
54
54
  savedStyleTextAttributesSchema
55
55
  ]).describe("SavedStyleAttributes");
56
56
 
57
- var savedColorStyleSchema = z.object({
58
- type: z.literal("color"),
59
- name: z.string(),
57
+ var savedColorStyleSchema = z2.object({
58
+ type: z2.literal("color"),
59
+ name: z2.string(),
60
60
  attributes: savedStyleColorAttributesSchema,
61
- optionalUsageGuidelines: z.string().nullish(),
62
- deletedAt: z.coerce.date().nullish(),
63
- isPrimary: z.boolean().optional()
61
+ optionalUsageGuidelines: z2.string().nullish(),
62
+ deletedAt: z2.coerce.date().nullish(),
63
+ isPrimary: z2.boolean().optional()
64
64
  }).describe("SavedColorStyle");
65
- var savedTextStyleSchema = z.object({
66
- type: z.literal("text"),
67
- name: z.string(),
65
+ var savedTextStyleSchema = z2.object({
66
+ type: z2.literal("text"),
67
+ name: z2.string(),
68
68
  attributes: savedStyleTextAttributesSchema,
69
- optionalUsageGuidelines: z.string().nullish(),
70
- deletedAt: z.coerce.date().nullish(),
71
- isPrimary: z.boolean().optional()
69
+ optionalUsageGuidelines: z2.string().nullish(),
70
+ deletedAt: z2.coerce.date().nullish(),
71
+ isPrimary: z2.boolean().optional()
72
72
  }).describe("SavedTextStyle");
73
- var designLibrarySavedStylesSchema = z.record(z.string(), z.union([savedColorStyleSchema, savedTextStyleSchema])).describe("DesignLibrarySavedStylesMapping");
74
- var designLibrarySchema = z.object({
75
- id: z.uuid(),
76
- createdAt: z.date(),
77
- updatedAt: z.date(),
78
- deletedAt: z.coerce.date().nullish(),
73
+ var designLibrarySavedStylesSchema = z2.record(z2.string(), z2.union([savedColorStyleSchema, savedTextStyleSchema])).describe("DesignLibrarySavedStylesMapping");
74
+ var designLibrarySchema = z2.object({
75
+ id: z2.uuid(),
76
+ createdAt: z2.date(),
77
+ updatedAt: z2.date(),
78
+ deletedAt: z2.coerce.date().nullish(),
79
79
  savedStyles: designLibrarySavedStylesSchema
80
80
  }).describe("DesignLibrary");
81
- var designLibrarySavedStyleMetadataSchema = z.object({
82
- library: z.record(
83
- z.string(),
84
- z.object({
81
+ var designLibrarySavedStyleMetadataSchema = z2.object({
82
+ library: z2.record(
83
+ z2.string(),
84
+ z2.object({
85
85
  styles: designLibrarySavedStylesSchema
86
86
  })
87
87
  )
88
88
  }).describe("DesignLibrarySavedStyleMetadata");
89
- var globalsCssTokenSchema = z.object({
90
- name: z.string(),
91
- value: z.string()
89
+ var globalsCssTokenSchema = z2.object({
90
+ name: z2.string(),
91
+ value: z2.string()
92
92
  }).describe("GlobalsCssToken");
93
- var globalsCssScopeSchema = z.object({
94
- selector: z.string(),
95
- tokens: z.array(globalsCssTokenSchema)
93
+ var globalsCssScopeSchema = z2.object({
94
+ selector: z2.string(),
95
+ tokens: z2.array(globalsCssTokenSchema)
96
96
  }).describe("GlobalsCssScope");
97
- var globalsCssSnapshotSchema = z.object({
98
- scopes: z.array(globalsCssScopeSchema)
97
+ var globalsCssSnapshotSchema = z2.object({
98
+ scopes: z2.array(globalsCssScopeSchema)
99
99
  }).describe("GlobalsCssSnapshot");
100
- var siteFontRoleSchema = z.object({
101
- role: z.string(),
102
- family: z.string().nullable(),
103
- cssVar: z.string().nullable(),
104
- rawValue: z.string()
100
+ var siteFontRoleSchema = z2.object({
101
+ role: z2.string(),
102
+ family: z2.string().nullable(),
103
+ cssVar: z2.string().nullable(),
104
+ rawValue: z2.string()
105
105
  }).describe("SiteFontRole");
106
- var siteFontsSnapshotSchema = z.object({
107
- roles: z.array(siteFontRoleSchema),
108
- defaultRole: z.string().nullable()
106
+ var siteFontsSnapshotSchema = z2.object({
107
+ roles: z2.array(siteFontRoleSchema),
108
+ defaultRole: z2.string().nullable()
109
109
  }).describe("SiteFontsSnapshot");
110
- var siteDesignLibraryStateSchema = z.object({
111
- siteId: z.uuid(),
110
+ var siteDesignLibraryStateSchema = z2.object({
111
+ siteId: z2.uuid(),
112
112
  globalsCss: globalsCssSnapshotSchema.nullable(),
113
113
  fonts: siteFontsSnapshotSchema.nullable(),
114
- isLoading: z.boolean(),
115
- error: z.string().nullable()
114
+ isLoading: z2.boolean(),
115
+ error: z2.string().nullable()
116
116
  }).describe("SiteDesignLibraryState");
117
117
  var DESIGN_LIBRARY_PREVIEW_MESSAGE_TYPE = "replo:design-library:applyOverrides";
118
- var designLibraryPreviewFontSchema = z.object({
119
- family: z.string(),
120
- cssVar: z.string(),
121
- faceUrl: z.string().optional(),
122
- format: z.string().optional()
118
+ var designLibraryPreviewFontSchema = z2.object({
119
+ family: z2.string(),
120
+ cssVar: z2.string(),
121
+ faceUrl: z2.string().optional(),
122
+ format: z2.string().optional()
123
123
  }).describe("DesignLibraryPreviewFont");
124
- var designLibraryPreviewMessageSchema = z.object({
125
- type: z.literal(DESIGN_LIBRARY_PREVIEW_MESSAGE_TYPE),
126
- cssVars: z.record(z.string(), z.string()),
127
- fonts: z.array(designLibraryPreviewFontSchema),
128
- defaultFontCssVar: z.string().nullable()
124
+ var designLibraryPreviewMessageSchema = z2.object({
125
+ type: z2.literal(DESIGN_LIBRARY_PREVIEW_MESSAGE_TYPE),
126
+ cssVars: z2.record(z2.string(), z2.string()),
127
+ fonts: z2.array(designLibraryPreviewFontSchema),
128
+ defaultFontCssVar: z2.string().nullable()
129
129
  }).describe("DesignLibraryPreviewMessage");
130
130
 
131
131
  export { DESIGN_LIBRARY_PREVIEW_MESSAGE_TYPE, designLibraryPreviewFontSchema, designLibraryPreviewMessageSchema, designLibrarySavedStyleMetadataSchema, designLibrarySavedStylesSchema, designLibrarySchema, globalsCssScopeSchema, globalsCssSnapshotSchema, globalsCssTokenSchema, savedColorStyleSchema, savedTextStyleSchema, siteDesignLibraryStateSchema, siteFontRoleSchema, siteFontsSnapshotSchema };
@@ -1,48 +1,8 @@
1
1
  import type { ErrorUserFacingDetails, ErrorUserFacingDetailsWithMessage } from "./generated/errors";
2
+ import type { ReploErrorConfig } from "./reploError";
2
3
  import * as z from "zod";
3
- /**
4
- * Config to use for any standard error we throw in Replo
5
- */
6
- export type ReploErrorConfig = {
7
- /**
8
- * Message of the error, used only internally. If not provided, defaults to
9
- * the error's class name
10
- */
11
- message?: string;
12
- /**
13
- * Any additional data about the error, e.g. ids of content that was trying
14
- * to be accessed, contextual variables, etc. This is included when the error
15
- * is logged to Sentry, etc
16
- */
17
- additionalData?: Record<string, unknown>;
18
- /** Meta details for error reporting */
19
- errorReportingDetails?: {
20
- /**
21
- * If true, tells Sentry that it should group this error differently when
22
- * it happens on different endpoints ("transactions" in Sentry are endpoints)
23
- */
24
- includeTransactionInFingerprint?: boolean;
25
- /**
26
- * If provided, these get added to the Sentry fingerprint for this error. Useful
27
- * for when you want to modify the grouping of an error, especially for reusing
28
- * errors in different places.
29
- */
30
- customFingerprint?: string[];
31
- };
32
- /**
33
- * Original cause of the error (useful for if you need to catch and re-throw errors
34
- * with more context). Will be reported in stacktraces, sentry, etc.
35
- */
36
- cause?: unknown;
37
- };
38
- /**
39
- * Base error that all errors in Replo inherit from
40
- */
41
- export declare abstract class ReploError extends Error {
42
- config: ReploErrorConfig;
43
- id: string;
44
- constructor(config: ReploErrorConfig);
45
- }
4
+ import { ReploError } from "./reploError";
5
+ export { ReploError, type ReploErrorConfig } from "./reploError";
46
6
  /**
47
7
  * Wraps an error so `async-retry` stops immediately instead of scheduling
48
8
  * another attempt: the library rejects with any thrown error carrying a truthy
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  export type IframeRpcChannelMethodConfig = Record<string, {
3
3
  inputSchema: z.ZodType;
4
4
  outputSchema: z.ZodType;
@@ -4,13 +4,13 @@ import '../../chunk-FLYEIRFK.mjs';
4
4
  import '../../chunk-TESFJQID.mjs';
5
5
  import '../../chunk-G3S6ZNPF.mjs';
6
6
  import * as z from 'zod';
7
- import { z as z$1 } from 'zod';
8
7
 
9
8
  var defaultLogger = {
10
9
  info: console.log,
11
10
  debug: console.debug,
12
11
  error: console.error
13
12
  };
13
+
14
14
  var ReploError = class _ReploError extends Error {
15
15
  config;
16
16
  id;
@@ -31,6 +31,7 @@ var ReploError = class _ReploError extends Error {
31
31
  }
32
32
  }
33
33
  };
34
+
34
35
  var errorUserFacingDetailsMessageSchema = z.object({
35
36
  type: z.enum([
36
37
  "toast",
@@ -167,39 +168,39 @@ var IframeRpcChannelInvalidInputError = class extends IframeRpcChannelError {
167
168
  }
168
169
  };
169
170
 
170
- var iframeRpcCallResultSchema = z$1.discriminatedUnion("type", [
171
- z$1.object({
172
- type: z$1.literal("success"),
173
- data: z$1.unknown()
171
+ var iframeRpcCallResultSchema = z.discriminatedUnion("type", [
172
+ z.object({
173
+ type: z.literal("success"),
174
+ data: z.unknown()
174
175
  }),
175
- z$1.object({
176
- type: z$1.literal("error"),
177
- errorMessage: z$1.string()
176
+ z.object({
177
+ type: z.literal("error"),
178
+ errorMessage: z.string()
178
179
  })
179
180
  ]);
180
- var iframeRpcCallSchema = z$1.discriminatedUnion("type", [
181
- z$1.object({
182
- type: z$1.literal("notify"),
183
- method: z$1.string(),
184
- data: z$1.unknown().optional()
181
+ var iframeRpcCallSchema = z.discriminatedUnion("type", [
182
+ z.object({
183
+ type: z.literal("notify"),
184
+ method: z.string(),
185
+ data: z.unknown().optional()
185
186
  }),
186
- z$1.object({
187
- type: z$1.literal("request"),
188
- id: z$1.uuid(),
189
- method: z$1.string(),
190
- data: z$1.unknown().optional()
187
+ z.object({
188
+ type: z.literal("request"),
189
+ id: z.uuid(),
190
+ method: z.string(),
191
+ data: z.unknown().optional()
191
192
  }),
192
- z$1.object({
193
- type: z$1.literal("response"),
194
- id: z$1.uuid(),
193
+ z.object({
194
+ type: z.literal("response"),
195
+ id: z.uuid(),
195
196
  result: iframeRpcCallResultSchema
196
197
  })
197
198
  ]);
198
199
  function isFireAndForgetOutputSchema(outputSchema) {
199
- return outputSchema.type === "void" || outputSchema instanceof z$1.ZodVoid;
200
+ return outputSchema.type === "void" || outputSchema instanceof z.ZodVoid;
200
201
  }
201
202
  function isUndefinedInputSchema(inputSchema) {
202
- return inputSchema.type === "undefined" || inputSchema instanceof z$1.ZodUndefined;
203
+ return inputSchema.type === "undefined" || inputSchema instanceof z.ZodUndefined;
203
204
  }
204
205
  function coerceEmptyRpcInput({
205
206
  input,
@@ -380,9 +381,9 @@ function createIframeRpcChannel(options) {
380
381
  pendingRequest.resolve(parsedOutput.data);
381
382
  };
382
383
  const handleMessage = (event) => {
383
- const parsedMetadata = z$1.object({
384
- channelIdentifier: z$1.literal(channelIdentifier),
385
- version: z$1.literal(version)
384
+ const parsedMetadata = z.object({
385
+ channelIdentifier: z.literal(channelIdentifier),
386
+ version: z.literal(version)
386
387
  }).safeParse(event.data);
387
388
  if (!parsedMetadata.success) {
388
389
  return;
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  /**
3
3
  * Shared data-loader key constants. Both the integration registry and the
4
4
  * dependency resolver import from here so the strings are never duplicated.
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  export declare const PAGE_ANNOTATIONS_PROTOCOL_VERSION = 1;
3
3
  export declare const pageAnnotationColorSchema: z.ZodEnum<{
4
4
  red: "red";
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod';
2
2
 
3
3
  var PAGE_ANNOTATIONS_PROTOCOL_VERSION = 1;
4
4
  var pageAnnotationColorSchema = z.enum(["red", "purple", "amber"]).describe("PageAnnotationColor");
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Config to use for any standard error we throw in Replo
3
+ */
4
+ export type ReploErrorConfig = {
5
+ /**
6
+ * Message of the error, used only internally. If not provided, defaults to
7
+ * the error's class name
8
+ */
9
+ message?: string;
10
+ /**
11
+ * Any additional data about the error, e.g. ids of content that was trying
12
+ * to be accessed, contextual variables, etc. This is included when the error
13
+ * is logged to Sentry, etc
14
+ */
15
+ additionalData?: Record<string, unknown>;
16
+ /** Meta details for error reporting */
17
+ errorReportingDetails?: {
18
+ /**
19
+ * If true, tells Sentry that it should group this error differently when
20
+ * it happens on different endpoints ("transactions" in Sentry are endpoints)
21
+ */
22
+ includeTransactionInFingerprint?: boolean;
23
+ /**
24
+ * If provided, these get added to the Sentry fingerprint for this error. Useful
25
+ * for when you want to modify the grouping of an error, especially for reusing
26
+ * errors in different places.
27
+ */
28
+ customFingerprint?: string[];
29
+ };
30
+ /**
31
+ * Original cause of the error (useful for if you need to catch and re-throw errors
32
+ * with more context). Will be reported in stacktraces, sentry, etc.
33
+ */
34
+ cause?: unknown;
35
+ };
36
+ /**
37
+ * Base error that all errors in Replo inherit from
38
+ */
39
+ export declare abstract class ReploError extends Error {
40
+ config: ReploErrorConfig;
41
+ id: string;
42
+ constructor(config: ReploErrorConfig);
43
+ }
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  export declare const colorTypeSchema: z.ZodEnum<{
3
3
  basic: "basic";
4
4
  foregroundPrimary: "foregroundPrimary";
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  export declare const SELECT_MODE_SELECTABLE_ATTRIBUTE = "data-replo-selectable";
3
3
  export declare const SELECT_MODE_SELECTABLE_PAYLOAD_ATTRIBUTE = "data-replo-selectable-payload";
4
4
  export declare const displayModeSchema: z.ZodEnum<{
@@ -1,4 +1,4 @@
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-KFJZ2OLV.mjs';
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-TP4ZXK4R.mjs';
2
2
  import '../../chunk-PH3S6LJI.mjs';
3
3
  import '../../chunk-FLYEIRFK.mjs';
4
4
  import '../../chunk-TESFJQID.mjs';
@@ -1,5 +1,5 @@
1
1
  import type { SelectModeIframeMessage, SelectModeParentMessage } from "./generated/selectModeIframeRpc";
2
- import { z } from "zod";
2
+ import * as z from "zod";
3
3
  export declare const SELECT_MODE_IFRAME_RPC_CHANNEL_ID: "replo:select-mode-iframe-rpc";
4
4
  export declare const SELECT_MODE_IFRAME_RPC_CHANNEL_VERSION: 1;
5
5
  export declare const inlineEditFeedbackSchema: z.ZodObject<{
@@ -367,7 +367,6 @@ export declare const websiteBuilderToPreviewIframeMethodConfig: {
367
367
  navigateToRoute: {
368
368
  inputSchema: z.ZodObject<{
369
369
  pathname: z.ZodString;
370
- navigationId: z.ZodOptional<z.ZodNumber>;
371
370
  }, z.core.$strip>;
372
371
  outputSchema: z.ZodVoid;
373
372
  };
@@ -918,12 +917,6 @@ export declare const previewIframeToWebsiteBuilderMethodConfig: {
918
917
  inputSchema: z.ZodUndefined;
919
918
  outputSchema: z.ZodVoid;
920
919
  };
921
- navigationAccepted: {
922
- inputSchema: z.ZodObject<{
923
- navigationId: z.ZodNumber;
924
- }, z.core.$strip>;
925
- outputSchema: z.ZodVoid;
926
- };
927
920
  };
928
921
  export declare const selectModeParentMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
929
922
  method: z.ZodLiteral<"expandToSection">;
@@ -1,9 +1,9 @@
1
- import { selectModeBoundingRectSchema, selectModeTiptapActiveMarksSchema, selectModeSelectionRectSchema, selectableDataSchema, selectModeHoverRectSchema, selectModeFormatCommandSchema, selectModeOptimisticUpdatePayloadSchema, selectModeSelectionTypeSchema, displayModeSchema, selectModeClickPositionSchema, selectedElementSchema } from '../../chunk-KFJZ2OLV.mjs';
1
+ import { selectModeBoundingRectSchema, selectModeTiptapActiveMarksSchema, selectModeSelectionRectSchema, selectableDataSchema, selectModeHoverRectSchema, selectModeFormatCommandSchema, selectModeOptimisticUpdatePayloadSchema, selectModeSelectionTypeSchema, displayModeSchema, selectModeClickPositionSchema, selectedElementSchema } from '../../chunk-TP4ZXK4R.mjs';
2
2
  import '../../chunk-PH3S6LJI.mjs';
3
3
  import '../../chunk-FLYEIRFK.mjs';
4
4
  import '../../chunk-TESFJQID.mjs';
5
5
  import '../../chunk-G3S6ZNPF.mjs';
6
- import { z } from 'zod';
6
+ import * as z from 'zod';
7
7
 
8
8
  var SELECT_MODE_IFRAME_RPC_CHANNEL_ID = "replo:select-mode-iframe-rpc";
9
9
  var SELECT_MODE_IFRAME_RPC_CHANNEL_VERSION = 1;
@@ -51,10 +51,7 @@ var websiteBuilderToPreviewIframeMethodConfig = {
51
51
  timeoutMs: 1500
52
52
  },
53
53
  navigateToRoute: {
54
- inputSchema: z.object({
55
- pathname: z.string(),
56
- navigationId: z.number().int().optional()
57
- }),
54
+ inputSchema: z.object({ pathname: z.string() }),
58
55
  outputSchema: z.void()
59
56
  },
60
57
  setDisplayMode: {
@@ -176,10 +173,6 @@ var previewIframeToWebsiteBuilderMethodConfig = {
176
173
  fastRefreshComplete: {
177
174
  inputSchema: z.undefined(),
178
175
  outputSchema: z.void()
179
- },
180
- navigationAccepted: {
181
- inputSchema: z.object({ navigationId: z.number().int() }),
182
- outputSchema: z.void()
183
176
  }
184
177
  };
185
178
  var selectModeParentMessageSchema = z.discriminatedUnion("method", [
package/buildMetadata.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export const BUILD_METADATA = {
2
2
  "packageName": "@replohq/sandbox-runtime",
3
- "version": "1.16.0",
3
+ "version": "1.16.2",
4
4
  "branch": "HEAD",
5
- "commit": "cce09bc70f0a5638a8b527e5351534efe9bfcdf7",
6
- "builtAt": "2026-10-19T20:42:50.022Z"
5
+ "commit": "9158b1e6452ebc5e1945da883b1c8406c7b17f08",
6
+ "builtAt": "2026-10-19T23:23:08.010Z"
7
7
  };
package/capturePage.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { snapdom } from "@zumer/snapdom";
2
2
  import { PageCaptureError } from "./_vendor/replo-utils/lib/pageCapture.mjs";
3
- import { z } from "zod";
3
+ import * as z from "zod";
4
4
  const JPEG_QUALITY = 0.8;
5
5
  const VIDEO_FRAME_QUALITY = 0.85;
6
6
  const VIDEO_LOAD_TIMEOUT_MS = 4e3;