@replohq/canopy-sdk 3.0.5 → 3.0.6

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.
@@ -1,6 +1,6 @@
1
- import { selectedElementSchema, selectModeFormatCommandSchema, selectModeOptimisticUpdatePayloadSchema, selectModeSelectionTypeSchema, displayModeSchema, selectModeTiptapActiveMarksSchema, selectModeBoundingRectSchema, selectableDataSchema, selectModeSelectionRectSchema, selectModeClickPositionSchema } from '../../chunk-544ZM65A.mjs';
1
+ import { selectModeBoundingRectSchema, selectModeTiptapActiveMarksSchema, selectModeSelectionRectSchema, selectableDataSchema, selectModeHoverRectSchema, selectModeFormatCommandSchema, selectModeOptimisticUpdatePayloadSchema, selectModeSelectionTypeSchema, displayModeSchema, selectModeClickPositionSchema, selectedElementSchema } from '../../chunk-RLFL66ST.mjs';
2
2
  import '../../chunk-HGXQNZW7.mjs';
3
- import '../../chunk-H36NDYLG.mjs';
3
+ import '../../chunk-EXI4VDHP.mjs';
4
4
  import '../../chunk-ILGEM42C.mjs';
5
5
  import '../../chunk-FNTGY7I5.mjs';
6
6
  import '../../chunk-UJCSKKID.mjs';
@@ -8,6 +8,10 @@ import { z } from 'zod';
8
8
 
9
9
  var SELECT_MODE_IFRAME_RPC_CHANNEL_ID = "replo:select-mode-iframe-rpc";
10
10
  var SELECT_MODE_IFRAME_RPC_CHANNEL_VERSION = 1;
11
+ var inlineEditFeedbackSchema = z.object({
12
+ status: z.enum(["pending", "unavailable", "failed"]),
13
+ rect: selectModeBoundingRectSchema
14
+ }).describe("InlineEditFeedback");
11
15
  var iframeRuntimeBuildMetadataSchema = z.object({
12
16
  packageName: z.string(),
13
17
  version: z.string(),
@@ -15,11 +19,33 @@ var iframeRuntimeBuildMetadataSchema = z.object({
15
19
  commit: z.string().nullable(),
16
20
  builtAt: z.string().nullable()
17
21
  }).describe("IframeRuntimeBuildMetadata");
18
- var selectedComponentEditRequestSchema = z.object({
19
- siteId: z.uuid(),
20
- element: selectedElementSchema
21
- }).describe("SelectedComponentEditRequest");
22
- var websiteBuilderToCanopyMethodConfig = {
22
+ var selectModeEventInputSchemas = {
23
+ hover: z.object({
24
+ rect: selectModeHoverRectSchema.nullable()
25
+ }),
26
+ areaSelection: z.object({
27
+ rect: selectModeBoundingRectSchema,
28
+ items: z.array(selectableDataSchema)
29
+ }),
30
+ dragRect: z.object({
31
+ dragRect: selectModeBoundingRectSchema.nullable(),
32
+ selectionRects: z.array(selectModeSelectionRectSchema)
33
+ }),
34
+ inlineEditState: z.object({
35
+ activeMarks: selectModeTiptapActiveMarksSchema,
36
+ isInlineEditing: z.boolean(),
37
+ isInlineEditPending: z.boolean()
38
+ })
39
+ };
40
+ var websiteBuilderToPreviewIframeMethodConfig = {
41
+ expandToSection: {
42
+ inputSchema: z.object({ targetSelector: z.string() }),
43
+ outputSchema: z.void()
44
+ },
45
+ setSectionPreview: {
46
+ inputSchema: z.object({ targetSelector: z.string().nullable() }),
47
+ outputSchema: z.void()
48
+ },
23
49
  symbolicateSelectedElement: {
24
50
  inputSchema: selectedElementSchema,
25
51
  outputSchema: selectedElementSchema,
@@ -84,7 +110,7 @@ var websiteBuilderToCanopyMethodConfig = {
84
110
  outputSchema: z.void()
85
111
  }
86
112
  };
87
- var canopyToWebsiteBuilderMethodConfig = {
113
+ var previewIframeToWebsiteBuilderMethodConfig = {
88
114
  requestInlineTextEdit: {
89
115
  inputSchema: z.object({
90
116
  editId: z.string(),
@@ -104,9 +130,7 @@ var canopyToWebsiteBuilderMethodConfig = {
104
130
  outputSchema: z.void()
105
131
  },
106
132
  hoverElement: {
107
- inputSchema: z.object({
108
- rect: selectModeBoundingRectSchema.nullable()
109
- }),
133
+ inputSchema: selectModeEventInputSchemas.hover,
110
134
  outputSchema: z.void()
111
135
  },
112
136
  selectedElementRectUpdate: {
@@ -123,17 +147,11 @@ var canopyToWebsiteBuilderMethodConfig = {
123
147
  outputSchema: z.void()
124
148
  },
125
149
  dragRectUpdated: {
126
- inputSchema: z.object({
127
- dragRect: selectModeBoundingRectSchema.nullable(),
128
- selectionRects: z.array(selectModeSelectionRectSchema)
129
- }),
150
+ inputSchema: selectModeEventInputSchemas.dragRect,
130
151
  outputSchema: z.void()
131
152
  },
132
153
  areaSelected: {
133
- inputSchema: z.object({
134
- rect: selectModeBoundingRectSchema,
135
- items: z.array(selectableDataSchema)
136
- }),
154
+ inputSchema: selectModeEventInputSchemas.areaSelection,
137
155
  outputSchema: z.void()
138
156
  },
139
157
  textCommitted: {
@@ -145,11 +163,12 @@ var canopyToWebsiteBuilderMethodConfig = {
145
163
  }),
146
164
  outputSchema: z.void()
147
165
  },
166
+ inlineEditFeedbackChanged: {
167
+ inputSchema: z.object({ feedback: inlineEditFeedbackSchema.nullable() }),
168
+ outputSchema: z.void()
169
+ },
148
170
  editorStateUpdate: {
149
- inputSchema: z.object({
150
- activeMarks: selectModeTiptapActiveMarksSchema,
151
- isEditing: z.boolean()
152
- }),
171
+ inputSchema: selectModeEventInputSchemas.inlineEditState,
153
172
  outputSchema: z.void()
154
173
  },
155
174
  fastRefreshComplete: {
@@ -159,32 +178,36 @@ var canopyToWebsiteBuilderMethodConfig = {
159
178
  };
160
179
  var selectModeParentMessageSchema = z.discriminatedUnion("method", [
161
180
  z.object({
162
- method: z.literal("editSelectedComponent"),
163
- data: selectedComponentEditRequestSchema
181
+ method: z.literal("expandToSection"),
182
+ data: websiteBuilderToPreviewIframeMethodConfig.expandToSection.inputSchema
183
+ }),
184
+ z.object({
185
+ method: z.literal("setSectionPreview"),
186
+ data: websiteBuilderToPreviewIframeMethodConfig.setSectionPreview.inputSchema
164
187
  }),
165
188
  z.object({
166
189
  method: z.literal("setDisplayMode"),
167
- data: websiteBuilderToCanopyMethodConfig.setDisplayMode.inputSchema
190
+ data: websiteBuilderToPreviewIframeMethodConfig.setDisplayMode.inputSchema
168
191
  }),
169
192
  z.object({
170
193
  method: z.literal("setSelectionType"),
171
- data: websiteBuilderToCanopyMethodConfig.setSelectionType.inputSchema
194
+ data: websiteBuilderToPreviewIframeMethodConfig.setSelectionType.inputSchema
172
195
  }),
173
196
  z.object({
174
197
  method: z.literal("applyOptimisticUpdate"),
175
- data: websiteBuilderToCanopyMethodConfig.applyOptimisticUpdate.inputSchema
198
+ data: websiteBuilderToPreviewIframeMethodConfig.applyOptimisticUpdate.inputSchema
176
199
  }),
177
200
  z.object({
178
201
  method: z.literal("markCommitted"),
179
- data: websiteBuilderToCanopyMethodConfig.markCommitted.inputSchema
202
+ data: websiteBuilderToPreviewIframeMethodConfig.markCommitted.inputSchema
180
203
  }),
181
204
  z.object({
182
205
  method: z.literal("resolveSessionOverrides"),
183
- data: websiteBuilderToCanopyMethodConfig.resolveSessionOverrides.inputSchema
206
+ data: websiteBuilderToPreviewIframeMethodConfig.resolveSessionOverrides.inputSchema
184
207
  }),
185
208
  z.object({
186
209
  method: z.literal("revertOverride"),
187
- data: websiteBuilderToCanopyMethodConfig.revertOverride.inputSchema
210
+ data: websiteBuilderToPreviewIframeMethodConfig.revertOverride.inputSchema
188
211
  }),
189
212
  z.object({
190
213
  method: z.literal("enterEditMode")
@@ -194,7 +217,7 @@ var selectModeParentMessageSchema = z.discriminatedUnion("method", [
194
217
  }),
195
218
  z.object({
196
219
  method: z.literal("formatCommand"),
197
- data: websiteBuilderToCanopyMethodConfig.formatCommand.inputSchema
220
+ data: websiteBuilderToPreviewIframeMethodConfig.formatCommand.inputSchema
198
221
  })
199
222
  ]).describe("SelectModeParentMessage");
200
223
  var selectModeIframeMessageSchema = z.discriminatedUnion("method", [
@@ -204,39 +227,43 @@ var selectModeIframeMessageSchema = z.discriminatedUnion("method", [
204
227
  }),
205
228
  z.object({
206
229
  method: z.literal("elementSelected"),
207
- data: canopyToWebsiteBuilderMethodConfig.elementSelected.inputSchema
230
+ data: previewIframeToWebsiteBuilderMethodConfig.elementSelected.inputSchema
208
231
  }),
209
232
  z.object({
210
233
  method: z.literal("hoverElement"),
211
- data: canopyToWebsiteBuilderMethodConfig.hoverElement.inputSchema
234
+ data: previewIframeToWebsiteBuilderMethodConfig.hoverElement.inputSchema
212
235
  }),
213
236
  z.object({
214
237
  method: z.literal("selectedElementRectUpdate"),
215
- data: canopyToWebsiteBuilderMethodConfig.selectedElementRectUpdate.inputSchema
238
+ data: previewIframeToWebsiteBuilderMethodConfig.selectedElementRectUpdate.inputSchema
216
239
  }),
217
240
  z.object({
218
241
  method: z.literal("selectedAreaRectUpdate"),
219
- data: canopyToWebsiteBuilderMethodConfig.selectedAreaRectUpdate.inputSchema
242
+ data: previewIframeToWebsiteBuilderMethodConfig.selectedAreaRectUpdate.inputSchema
220
243
  }),
221
244
  z.object({
222
245
  method: z.literal("dragRectUpdated"),
223
- data: canopyToWebsiteBuilderMethodConfig.dragRectUpdated.inputSchema
246
+ data: previewIframeToWebsiteBuilderMethodConfig.dragRectUpdated.inputSchema
224
247
  }),
225
248
  z.object({
226
249
  method: z.literal("areaSelected"),
227
- data: canopyToWebsiteBuilderMethodConfig.areaSelected.inputSchema
250
+ data: previewIframeToWebsiteBuilderMethodConfig.areaSelected.inputSchema
228
251
  }),
229
252
  z.object({
230
253
  method: z.literal("textCommitted"),
231
- data: canopyToWebsiteBuilderMethodConfig.textCommitted.inputSchema
254
+ data: previewIframeToWebsiteBuilderMethodConfig.textCommitted.inputSchema
255
+ }),
256
+ z.object({
257
+ method: z.literal("inlineEditFeedbackChanged"),
258
+ data: previewIframeToWebsiteBuilderMethodConfig.inlineEditFeedbackChanged.inputSchema
232
259
  }),
233
260
  z.object({
234
261
  method: z.literal("editorStateUpdate"),
235
- data: canopyToWebsiteBuilderMethodConfig.editorStateUpdate.inputSchema
262
+ data: previewIframeToWebsiteBuilderMethodConfig.editorStateUpdate.inputSchema
236
263
  }),
237
264
  z.object({
238
265
  method: z.literal("fastRefreshComplete")
239
266
  })
240
267
  ]).describe("SelectModeIframeMessage");
241
268
 
242
- export { SELECT_MODE_IFRAME_RPC_CHANNEL_ID, SELECT_MODE_IFRAME_RPC_CHANNEL_VERSION, canopyToWebsiteBuilderMethodConfig, iframeRuntimeBuildMetadataSchema, selectModeIframeMessageSchema, selectModeParentMessageSchema, selectedComponentEditRequestSchema, websiteBuilderToCanopyMethodConfig };
269
+ export { SELECT_MODE_IFRAME_RPC_CHANNEL_ID, SELECT_MODE_IFRAME_RPC_CHANNEL_VERSION, iframeRuntimeBuildMetadataSchema, inlineEditFeedbackSchema, previewIframeToWebsiteBuilderMethodConfig, selectModeEventInputSchemas, selectModeIframeMessageSchema, selectModeParentMessageSchema, websiteBuilderToPreviewIframeMethodConfig };
@@ -172,7 +172,9 @@ function sanitizePublicHttpUrl(value, { preserveProtocol = false } = {}) {
172
172
  if (!host.includes(".") || host === "localhost" || host.endsWith(".") || host.endsWith(".localhost") || host.endsWith(".local") || host.endsWith(".internal") || host.endsWith(".lan") || /^\d{1,3}(\.\d{1,3}){3}$/u.test(host) || host.startsWith("[")) {
173
173
  return null;
174
174
  }
175
- if (!preserveProtocol) url.protocol = "https:";
175
+ if (!preserveProtocol) {
176
+ url.protocol = "https:";
177
+ }
176
178
  url.hash = "";
177
179
  return url.toString();
178
180
  }
@@ -1379,6 +1379,26 @@ function formatFileSize(byteCount, decimalPlaces = 0) {
1379
1379
  var sleep = async (ms) => {
1380
1380
  return await new Promise((resolve) => setTimeout(resolve, ms));
1381
1381
  };
1382
+ function sleepWithSignal({
1383
+ delayMs,
1384
+ signal
1385
+ }) {
1386
+ if (signal === null) {
1387
+ return sleep(delayMs);
1388
+ }
1389
+ signal.throwIfAborted();
1390
+ return new Promise((resolve, reject) => {
1391
+ const onAbort = () => {
1392
+ clearTimeout(timeoutId);
1393
+ reject(signal.reason);
1394
+ };
1395
+ const timeoutId = setTimeout(() => {
1396
+ signal.removeEventListener("abort", onAbort);
1397
+ resolve();
1398
+ }, delayMs);
1399
+ signal.addEventListener("abort", onAbort, { once: true });
1400
+ });
1401
+ }
1382
1402
  function errorMessage(error) {
1383
1403
  if (error instanceof Error) {
1384
1404
  return error.message;
@@ -1390,4 +1410,4 @@ function errorMessage(error) {
1390
1410
  return String(error);
1391
1411
  }
1392
1412
 
1393
- export { coerceNumberToString, deepCloneAndMergeReplacingArrays, errorMessage, exhaustiveSwitch, formatFileSize, getFromRecordOrNull, hasOwnProperty12 as hasOwnProperty, invariant, isEmpty2 as isEmpty, isFunction_default, isNotNullish, isNullish, isPrimitive, mergeReplacingArrays, mergeReplacingObjects, noop, preventDefault, sleep, warning };
1413
+ export { coerceNumberToString, deepCloneAndMergeReplacingArrays, errorMessage, exhaustiveSwitch, formatFileSize, getFromRecordOrNull, hasOwnProperty12 as hasOwnProperty, invariant, isEmpty2 as isEmpty, isFunction_default, isNotNullish, isNullish, isPrimitive, mergeReplacingArrays, mergeReplacingObjects, noop, preventDefault, sleep, sleepWithSignal, warning };
@@ -1,5 +1,5 @@
1
1
  import { parseJsonOrNull } from './chunk-HGXQNZW7.mjs';
2
- import { exhaustiveSwitch } from './chunk-H36NDYLG.mjs';
2
+ import { exhaustiveSwitch } from './chunk-EXI4VDHP.mjs';
3
3
  import { z } from 'zod';
4
4
 
5
5
  function parseSchemaOrNull(value, schema) {
@@ -41,6 +41,7 @@ var selectModeBoundingRectSchema = z.object({
41
41
  width: z.number(),
42
42
  height: z.number()
43
43
  }).describe("SelectModeBoundingRect");
44
+ var selectModeHoverRectSchema = selectModeBoundingRectSchema.extend({ isSection: z.boolean().optional() }).describe("SelectModeHoverRect");
44
45
  var selectModeSelectionRectSchema = z.object({
45
46
  id: z.string(),
46
47
  rect: selectModeBoundingRectSchema
@@ -93,16 +94,46 @@ function getIframeOffset(iframe) {
93
94
  const iframeRect = iframe.getBoundingClientRect();
94
95
  return { left: iframeRect.left, top: iframeRect.top };
95
96
  }
97
+ var selectModeImageScopeSchema = z.discriminatedUnion("kind", [
98
+ z.object({ kind: z.literal("all") }),
99
+ z.object({ kind: z.literal("media"), media: z.string() })
100
+ ]).describe("SelectModeImageScope");
101
+ var selectModeImageSourceSchema = z.object({
102
+ srcSet: z.string(),
103
+ sizes: z.string(),
104
+ media: z.string(),
105
+ type: z.string(),
106
+ previewUrl: z.string().nullable()
107
+ }).describe("SelectModeImageSource");
108
+ var selectModeImageSchema = z.object({
109
+ src: z.string(),
110
+ currentSrc: z.string(),
111
+ srcSet: z.string(),
112
+ sizes: z.string(),
113
+ previewUrl: z.string().nullable(),
114
+ sources: z.array(selectModeImageSourceSchema)
115
+ }).describe("SelectModeImage");
116
+ var selectModeVideoSchema = z.object({
117
+ src: z.string(),
118
+ currentSrc: z.string()
119
+ }).describe("SelectModeVideo");
96
120
  var selectedElementSchema = z.object({
97
121
  kind: z.literal("react-element"),
98
122
  selector: z.string(),
123
+ section: z.object({ selector: z.string() }).optional(),
99
124
  tagName: z.string(),
100
125
  elementType: z.string(),
101
126
  textContent: z.string().nullable(),
127
+ sectionLabel: z.string().optional(),
102
128
  rect: selectModeBoundingRectSchema,
103
129
  textMetrics: selectModeTextMetricsSchema.nullable(),
104
130
  outerHTML: z.string(),
131
+ image: selectModeImageSchema.optional(),
132
+ video: selectModeVideoSchema.optional(),
105
133
  definedStyles: z.array(selectModeDefinedStyleSchema).default([]),
134
+ authoredStyles: z.record(z.string(), z.string()).default({}).describe(
135
+ "Authored CSS value of the winning declaration per control property, custom properties expanded (e.g. 1.5rem for text-2xl at a wide viewport)."
136
+ ),
106
137
  inheritedStyles: z.record(z.string(), z.string()).default({}),
107
138
  clickPosition: selectModeClickPositionSchema,
108
139
  sourceLocation: selectModeSourceLocationSchema.optional(),
@@ -118,6 +149,9 @@ var selectablePlanDataSchema = z.object({
118
149
  var selectablePlanPayloadSchema = selectablePlanDataSchema.omit({ rect: true }).describe("SelectablePlanPayload");
119
150
  var selectableDataPayloadSchema = z.discriminatedUnion("kind", [selectablePlanPayloadSchema]).describe("SelectableDataPayload");
120
151
  var selectableDataSchema = z.discriminatedUnion("kind", [selectedElementSchema, selectablePlanDataSchema]).describe("SelectableData");
152
+ function isSelectedSection(data) {
153
+ return data.kind === "react-element" && data.selector === data.section?.selector;
154
+ }
121
155
  function transformSelectedElement({
122
156
  element,
123
157
  offset,
@@ -159,8 +193,13 @@ function readSelectablePayload(rawPayload) {
159
193
  return parseSchemaOrNull(parsedPayload, selectableDataPayloadSchema);
160
194
  }
161
195
  var selectModeOptimisticUpdatePayloadSchema = z.discriminatedUnion("kind", [
196
+ z.object({
197
+ kind: z.literal("image"),
198
+ image: selectModeImageSchema
199
+ }),
162
200
  z.object({
163
201
  kind: z.literal("css"),
202
+ fontSource: z.enum(["google", "site"]).optional(),
164
203
  property: z.string(),
165
204
  value: z.string().nullable()
166
205
  }),
@@ -200,4 +239,4 @@ var selectModeSelectionSchema = z.discriminatedUnion("type", [
200
239
  })
201
240
  ]).describe("SelectModeSelection");
202
241
 
203
- export { SELECT_MODE_SELECTABLE_ATTRIBUTE, SELECT_MODE_SELECTABLE_PAYLOAD_ATTRIBUTE, displayModeSchema, getIframeOffset, readSelectablePayload, selectModeBoundingRectSchema, selectModeClickPositionSchema, selectModeDefinedStyleSchema, selectModeFiberChainEntrySchema, selectModeFormatCommandSchema, selectModeInlineTextStatusSchema, selectModeOptimisticUpdatePayloadSchema, selectModeSelectionRectSchema, selectModeSelectionSchema, selectModeSelectionTypeSchema, selectModeSourceLocationSchema, selectModeStyleAtRuleSchema, selectModeStyleVariantSchema, selectModeTextMetricsSchema, selectModeTiptapActiveMarksSchema, selectableDataPayloadSchema, selectableDataSchema, selectablePlanDataSchema, selectablePlanPayloadSchema, selectedElementSchema, transformPoint, transformRect, transformSelectableData, transformSelectedElement };
242
+ 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 };
@@ -153,6 +153,17 @@ var IframeRpcChannelTimeoutError = class extends IframeRpcChannelError {
153
153
  });
154
154
  }
155
155
  };
156
+ var IframeRpcChannelTargetUnavailableError = class extends IframeRpcChannelError {
157
+ constructor({
158
+ callType,
159
+ method
160
+ }) {
161
+ super({
162
+ message: method ? `RPC target window was unavailable for '${method}'` : "RPC target window was unavailable for a response",
163
+ additionalData: { callType, method }
164
+ });
165
+ }
166
+ };
156
167
  var IframeRpcChannelRemoteError = class extends IframeRpcChannelError {
157
168
  constructor({ method, message }) {
158
169
  super({
@@ -192,4 +203,4 @@ var IframeRpcChannelInvalidInputError = class extends IframeRpcChannelError {
192
203
  }
193
204
  };
194
205
 
195
- export { IframeRpcChannelConfigurationError, IframeRpcChannelInvalidInputError, IframeRpcChannelRemoteError, IframeRpcChannelTimeoutError, IframeRpcChannelUnknownMethodError, IframeRpcChannelUnsubscribedError, ReploError, randomUUID2 as randomUUID };
206
+ export { IframeRpcChannelConfigurationError, IframeRpcChannelInvalidInputError, IframeRpcChannelRemoteError, IframeRpcChannelTargetUnavailableError, IframeRpcChannelTimeoutError, IframeRpcChannelUnknownMethodError, IframeRpcChannelUnsubscribedError, ReploError, randomUUID2 as randomUUID };
@@ -1,10 +1,10 @@
1
1
  import type { SelectedElement } from "../../_vendor/schemas/generated/selectMode";
2
2
  import type { IframeRpcChannel, IframeRpcChannelInputHandlers, IframeRpcChannelRemote } from "../../_vendor/schemas/iframeRpcChannel";
3
- import type { canopyToWebsiteBuilderMethodConfig, websiteBuilderToCanopyMethodConfig } from "../../_vendor/schemas/selectModeIframeRpc";
4
- export type WebsiteBuilderRpcRemote = IframeRpcChannelRemote<typeof canopyToWebsiteBuilderMethodConfig>;
5
- type SelectModeParentMessagingHandlers = Omit<IframeRpcChannelInputHandlers<typeof websiteBuilderToCanopyMethodConfig>, "symbolicateSelectedElement">;
3
+ import type { previewIframeToWebsiteBuilderMethodConfig, websiteBuilderToPreviewIframeMethodConfig } from "../../_vendor/schemas/selectModeIframeRpc";
4
+ export type WebsiteBuilderRpcRemote = IframeRpcChannelRemote<typeof previewIframeToWebsiteBuilderMethodConfig>;
5
+ type SelectModeParentMessagingHandlers = Omit<IframeRpcChannelInputHandlers<typeof websiteBuilderToPreviewIframeMethodConfig>, "symbolicateSelectedElement">;
6
6
  /** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
7
- export declare function getSelectModeIframeRpcChannel(): IframeRpcChannel<typeof canopyToWebsiteBuilderMethodConfig> | null;
7
+ export declare function getSelectModeIframeRpcChannel(): IframeRpcChannel<typeof previewIframeToWebsiteBuilderMethodConfig> | null;
8
8
  /** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
9
9
  export declare function setSelectModeParentHandlers(_nextHandlers: SelectModeParentMessagingHandlers | null): void;
10
10
  /** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
package/lib/tombstone.js CHANGED
@@ -1,5 +1,5 @@
1
- const migrationCommand = `pnpm add --ignore-workspace @replohq/sdk@latest @replohq/sandbox-runtime@latest && pnpm remove --ignore-workspace canopy-sdk
2
- (if package.json lists "@replohq/canopy-sdk" instead of the "canopy-sdk" alias, run: pnpm remove --ignore-workspace @replohq/canopy-sdk)`;
1
+ const migrationCommand = `pnpm add @replohq/sdk@latest @replohq/sandbox-runtime@latest && pnpm remove canopy-sdk
2
+ (if package.json lists "@replohq/canopy-sdk" instead of the "canopy-sdk" alias, run: pnpm remove @replohq/canopy-sdk)`;
3
3
  const providerComposition = `import { ReploProvider } from "@replohq/sdk/providers/replo-provider";
4
4
  import { SandboxRuntime } from "@replohq/sandbox-runtime";
5
5
 
@@ -22,8 +22,8 @@ declare const orderStatusShipmentSchemaDefinition: z.ZodObject<{
22
22
  shippedAt: z.ZodString;
23
23
  }, z.core.$strip>;
24
24
  declare const orderFinancialStatusSchemaDefinition: z.ZodEnum<{
25
- failed: "failed";
26
25
  pending: "pending";
26
+ failed: "failed";
27
27
  paid: "paid";
28
28
  refunded: "refunded";
29
29
  partiallyRefunded: "partiallyRefunded";
@@ -33,8 +33,8 @@ declare const orderStatusSummarySchemaDefinition: z.ZodObject<{
33
33
  orderNumber: z.ZodString;
34
34
  placedAt: z.ZodString;
35
35
  financialStatus: z.ZodEnum<{
36
- failed: "failed";
37
36
  pending: "pending";
37
+ failed: "failed";
38
38
  paid: "paid";
39
39
  refunded: "refunded";
40
40
  partiallyRefunded: "partiallyRefunded";
@@ -94,8 +94,8 @@ declare const orderStatusResultSchemaDefinition: z.ZodDiscriminatedUnion<[z.ZodO
94
94
  orderNumber: z.ZodString;
95
95
  placedAt: z.ZodString;
96
96
  financialStatus: z.ZodEnum<{
97
- failed: "failed";
98
97
  pending: "pending";
98
+ failed: "failed";
99
99
  paid: "paid";
100
100
  refunded: "refunded";
101
101
  partiallyRefunded: "partiallyRefunded";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@replohq/canopy-sdk",
3
- "version": "3.0.5",
3
+ "version": "3.0.6",
4
4
  "description": "Replo Canopy SDK — cart, analytics, data loaders, and editor runtime for agent-built Next.js sites.",
5
5
  "type": "module",
6
6
  "sideEffects": false,