@replohq/sandbox-runtime 1.15.0 → 1.16.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.
@@ -26,6 +26,21 @@ export declare const deepEqual: typeof dequalLite;
26
26
  * @returns A new object without the specified keys
27
27
  */
28
28
  export declare function omit<ObjectType extends Record<string, any>, KeyType extends keyof ObjectType>(obj: ObjectType, keysToOmit: KeyType[]): Omit<ObjectType, KeyType>;
29
- export declare function filterUndefined<ObjectType extends Record<string, unknown>>(data: ObjectType): Partial<ObjectType>;
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>;
30
45
  export declare function toNullableIfDefined<ValueType>(value: ValueType | undefined): ValueType | null | undefined;
31
46
  export {};
@@ -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,5 +1,5 @@
1
1
  import type { ErrorUserFacingDetails, ErrorUserFacingDetailsWithMessage } from "./generated/errors";
2
- import { z, ZodError } from "zod";
2
+ import * as z from "zod";
3
3
  /**
4
4
  * Config to use for any standard error we throw in Replo
5
5
  */
@@ -485,6 +485,6 @@ export declare class IframeRpcChannelConfigurationError extends IframeRpcChannel
485
485
  export declare class IframeRpcChannelInvalidInputError extends IframeRpcChannelError {
486
486
  constructor({ method, cause }: {
487
487
  method: string;
488
- cause: ZodError;
488
+ cause: z.ZodError;
489
489
  });
490
490
  }
@@ -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;
@@ -3,7 +3,7 @@ import { isNullish } from '../../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 defaultLogger = {
9
9
  info: console.log,
@@ -387,6 +387,12 @@ function createIframeRpcChannel(options) {
387
387
  return;
388
388
  }
389
389
  if (!isExpectedMessage(event)) {
390
+ const isSiblingFrame = typeof document !== "undefined" && Array.from(document.querySelectorAll("iframe")).some((frame) => {
391
+ return event.source !== null && frame.contentWindow === event.source;
392
+ });
393
+ if (isSiblingFrame) {
394
+ return;
395
+ }
390
396
  defaultLogger.error("[iframeRpcChannel] Dropping unexpected message", {
391
397
  channelIdentifier,
392
398
  version,
@@ -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");
@@ -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<{
@@ -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;
package/buildMetadata.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export const BUILD_METADATA = {
2
2
  "packageName": "@replohq/sandbox-runtime",
3
- "version": "1.15.0",
3
+ "version": "1.16.1",
4
4
  "branch": "HEAD",
5
- "commit": "bd37110ed5ca1a7902f9975bafa8169dd3bd3068",
6
- "builtAt": "2026-10-17T07:52:13.118Z"
5
+ "commit": "829bdb2d651053b102e8afdb7bc0ed13022a1833",
6
+ "builtAt": "2026-10-19T22:00:45.884Z"
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;
@@ -1,5 +1,5 @@
1
1
  import { exhaustiveSwitch } from './chunk-PH3S6LJI.mjs';
2
- import { z } from 'zod';
2
+ import * as z from 'zod';
3
3
 
4
4
  function parseJsonOrNull(json) {
5
5
  try {
package/next/config.js CHANGED
@@ -4,6 +4,8 @@ const DEFAULT_PAGE_EXTENSIONS = ["tsx", "ts", "jsx", "js"];
4
4
  const DEVELOPMENT_ONLY_PAGE_EXTENSIONS = ["dev.jsx", "dev.tsx"];
5
5
  const BUILD_ONLY_PAGE_EXTENSIONS = ["published.tsx"];
6
6
  const PUBLISH_TSCONFIG_FILENAME = "tsconfig.publish.json";
7
+ const PLATFORM_DEVICE_SIZES = [640, 828, 1080, 1200, 1920, 2048, 3840];
8
+ const PLATFORM_IMAGE_SIZES = [32, 48, 96, 128, 256, 384];
7
9
  function getPageExtensions(configuredExtensions) {
8
10
  const baseExtensions = (configuredExtensions ?? DEFAULT_PAGE_EXTENSIONS).filter((extension) => {
9
11
  return !DEVELOPMENT_ONLY_PAGE_EXTENSIONS.includes(extension) && !BUILD_ONLY_PAGE_EXTENSIONS.includes(extension);
@@ -21,7 +23,12 @@ function withComponentPreviewPageExtension(config) {
21
23
  return {
22
24
  ...config,
23
25
  pageExtensions: getPageExtensions(config.pageExtensions),
24
- typescript: getTypescriptConfig(config.typescript)
26
+ typescript: getTypescriptConfig(config.typescript),
27
+ images: {
28
+ ...config.images,
29
+ deviceSizes: config.images?.deviceSizes ?? PLATFORM_DEVICE_SIZES,
30
+ imageSizes: config.images?.imageSizes ?? PLATFORM_IMAGE_SIZES
31
+ }
25
32
  };
26
33
  }
27
34
  export {
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@replohq/sandbox-runtime",
3
- "version": "1.15.0",
3
+ "version": "1.16.1",
4
4
  "reploBuild": {
5
5
  "packageName": "@replohq/sandbox-runtime",
6
- "version": "1.15.0",
6
+ "version": "1.16.1",
7
7
  "branch": "HEAD",
8
- "commit": "bd37110ed5ca1a7902f9975bafa8169dd3bd3068",
9
- "builtAt": "2026-10-17T07:52:13.118Z"
8
+ "commit": "829bdb2d651053b102e8afdb7bc0ed13022a1833",
9
+ "builtAt": "2026-10-19T22:00:45.884Z"
10
10
  },
11
11
  "description": "Replo sandbox runtime — editor integration for agent-built Next.js sites.",
12
12
  "license": "SEE LICENSE IN LICENSE",
@@ -3,7 +3,7 @@ import {
3
3
  SELECT_MODE_SELECTABLE_ATTRIBUTE,
4
4
  SELECT_MODE_SELECTABLE_PAYLOAD_ATTRIBUTE
5
5
  } from "../../_vendor/schemas/selectMode.mjs";
6
- import { z } from "zod";
6
+ import * as z from "zod";
7
7
  import { getFiberChain } from "../fiber";
8
8
  import { getImageDescriptor } from "../imageSources";
9
9
  import { skipInlineTextMarkElements } from "../inlineTextMarks";
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  const MAX_FIBER_CHAIN_DEPTH = 80;
3
3
  const MAX_SERIALIZED_PROP_COUNT = 24;
4
4
  const MAX_SERIALIZED_STRING_LENGTH = 500;
@@ -1,6 +1,6 @@
1
1
  import { useCallback } from "react";
2
2
  import { buildGoogleFontsCssUrl, quoteFontFamily } from "../../_vendor/replo-utils/lib/fonts.mjs";
3
- import { z } from "zod";
3
+ import * as z from "zod";
4
4
  import { buildSelector } from "../descriptor/elementDescriptor";
5
5
  import { createImagePreview } from "../imageOverridePreview";
6
6
  import {
@@ -1,7 +1,7 @@
1
1
  import { useEffect, useMemo } from "react";
2
2
  import { useIframeRpcChannel } from "../../_vendor/replo-utils/react/use-iframe-rpc-channel.mjs";
3
3
  import { iframeRuntimeBuildMetadataSchema } from "../../_vendor/schemas/selectModeIframeRpc.mjs";
4
- import { z } from "zod";
4
+ import * as z from "zod";
5
5
  import { BUILD_METADATA } from "../../buildMetadata";
6
6
  import {
7
7
  getSelectModeIframeRpcChannel,