@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.
- package/_vendor/replo-utils/lib/errors.d.ts +1 -0
- package/_vendor/replo-utils/lib/fonts.d.ts +12 -1
- package/_vendor/replo-utils/lib/fonts.mjs +59 -9
- package/_vendor/replo-utils/lib/misc.d.ts +4 -0
- package/_vendor/replo-utils/lib/misc.mjs +1 -1
- package/_vendor/replo-utils/lib/url.mjs +1 -1
- package/_vendor/schemas/designLibrary.d.ts +23 -0
- package/_vendor/schemas/designLibrary.mjs +8 -1
- package/_vendor/schemas/errors.d.ts +14 -0
- package/_vendor/schemas/generated/selectMode.d.ts +49 -0
- package/_vendor/schemas/generated/selectModeIframeRpc.d.ts +21 -8
- package/_vendor/schemas/iframeRpcChannel.mjs +37 -13
- package/_vendor/schemas/loaderKeys.mjs +2 -2
- package/_vendor/schemas/money.mjs +2 -2
- package/_vendor/schemas/routing/rules.mjs +3 -3
- package/_vendor/schemas/selectMode.d.ts +155 -0
- package/_vendor/schemas/selectMode.mjs +2 -2
- package/_vendor/schemas/selectModeIframeRpc.d.ts +429 -110
- package/_vendor/schemas/selectModeIframeRpc.mjs +68 -41
- package/{chunk-3A2F6BOM.mjs → chunk-DINXH6YP.mjs} +3 -1
- package/{chunk-H36NDYLG.mjs → chunk-EXI4VDHP.mjs} +21 -1
- package/{chunk-544ZM65A.mjs → chunk-RLFL66ST.mjs} +41 -2
- package/{chunk-QPGBIWJK.mjs → chunk-VUXOGD76.mjs} +12 -1
- package/editor/select-mode/iframeRpcChannel.d.ts +4 -4
- package/lib/tombstone.js +2 -2
- package/orders/order-status-schema.d.ts +3 -3
- package/package.json +1 -1
|
@@ -46,6 +46,17 @@ export declare const selectModeBoundingRectSchema: z.ZodObject<{
|
|
|
46
46
|
width: z.ZodNumber;
|
|
47
47
|
height: z.ZodNumber;
|
|
48
48
|
}, z.core.$strip>;
|
|
49
|
+
export declare const selectModeHoverRectSchema: z.ZodObject<{
|
|
50
|
+
x: z.ZodNumber;
|
|
51
|
+
y: z.ZodNumber;
|
|
52
|
+
left: z.ZodNumber;
|
|
53
|
+
top: z.ZodNumber;
|
|
54
|
+
right: z.ZodNumber;
|
|
55
|
+
bottom: z.ZodNumber;
|
|
56
|
+
width: z.ZodNumber;
|
|
57
|
+
height: z.ZodNumber;
|
|
58
|
+
isSection: z.ZodOptional<z.ZodBoolean>;
|
|
59
|
+
}, z.core.$strip>;
|
|
49
60
|
export declare const selectModeSelectionRectSchema: z.ZodObject<{
|
|
50
61
|
id: z.ZodString;
|
|
51
62
|
rect: z.ZodObject<{
|
|
@@ -98,12 +109,47 @@ export declare function transformPoint({ point, offset, scale, }: {
|
|
|
98
109
|
scale?: number;
|
|
99
110
|
}): SelectModeClickPosition;
|
|
100
111
|
export declare function getIframeOffset(iframe: HTMLIFrameElement | null): RectOffset;
|
|
112
|
+
export declare const selectModeImageScopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
113
|
+
kind: z.ZodLiteral<"all">;
|
|
114
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
115
|
+
kind: z.ZodLiteral<"media">;
|
|
116
|
+
media: z.ZodString;
|
|
117
|
+
}, z.core.$strip>], "kind">;
|
|
118
|
+
export declare const selectModeImageSourceSchema: z.ZodObject<{
|
|
119
|
+
srcSet: z.ZodString;
|
|
120
|
+
sizes: z.ZodString;
|
|
121
|
+
media: z.ZodString;
|
|
122
|
+
type: z.ZodString;
|
|
123
|
+
previewUrl: z.ZodNullable<z.ZodString>;
|
|
124
|
+
}, z.core.$strip>;
|
|
125
|
+
export declare const selectModeImageSchema: z.ZodObject<{
|
|
126
|
+
src: z.ZodString;
|
|
127
|
+
currentSrc: z.ZodString;
|
|
128
|
+
srcSet: z.ZodString;
|
|
129
|
+
sizes: z.ZodString;
|
|
130
|
+
previewUrl: z.ZodNullable<z.ZodString>;
|
|
131
|
+
sources: z.ZodArray<z.ZodObject<{
|
|
132
|
+
srcSet: z.ZodString;
|
|
133
|
+
sizes: z.ZodString;
|
|
134
|
+
media: z.ZodString;
|
|
135
|
+
type: z.ZodString;
|
|
136
|
+
previewUrl: z.ZodNullable<z.ZodString>;
|
|
137
|
+
}, z.core.$strip>>;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
export declare const selectModeVideoSchema: z.ZodObject<{
|
|
140
|
+
src: z.ZodString;
|
|
141
|
+
currentSrc: z.ZodString;
|
|
142
|
+
}, z.core.$strip>;
|
|
101
143
|
export declare const selectedElementSchema: z.ZodObject<{
|
|
102
144
|
kind: z.ZodLiteral<"react-element">;
|
|
103
145
|
selector: z.ZodString;
|
|
146
|
+
section: z.ZodOptional<z.ZodObject<{
|
|
147
|
+
selector: z.ZodString;
|
|
148
|
+
}, z.core.$strip>>;
|
|
104
149
|
tagName: z.ZodString;
|
|
105
150
|
elementType: z.ZodString;
|
|
106
151
|
textContent: z.ZodNullable<z.ZodString>;
|
|
152
|
+
sectionLabel: z.ZodOptional<z.ZodString>;
|
|
107
153
|
rect: z.ZodObject<{
|
|
108
154
|
x: z.ZodNumber;
|
|
109
155
|
y: z.ZodNumber;
|
|
@@ -120,6 +166,24 @@ export declare const selectedElementSchema: z.ZodObject<{
|
|
|
120
166
|
lineHeight: z.ZodNumber;
|
|
121
167
|
}, z.core.$strip>>;
|
|
122
168
|
outerHTML: z.ZodString;
|
|
169
|
+
image: z.ZodOptional<z.ZodObject<{
|
|
170
|
+
src: z.ZodString;
|
|
171
|
+
currentSrc: z.ZodString;
|
|
172
|
+
srcSet: z.ZodString;
|
|
173
|
+
sizes: z.ZodString;
|
|
174
|
+
previewUrl: z.ZodNullable<z.ZodString>;
|
|
175
|
+
sources: z.ZodArray<z.ZodObject<{
|
|
176
|
+
srcSet: z.ZodString;
|
|
177
|
+
sizes: z.ZodString;
|
|
178
|
+
media: z.ZodString;
|
|
179
|
+
type: z.ZodString;
|
|
180
|
+
previewUrl: z.ZodNullable<z.ZodString>;
|
|
181
|
+
}, z.core.$strip>>;
|
|
182
|
+
}, z.core.$strip>>;
|
|
183
|
+
video: z.ZodOptional<z.ZodObject<{
|
|
184
|
+
src: z.ZodString;
|
|
185
|
+
currentSrc: z.ZodString;
|
|
186
|
+
}, z.core.$strip>>;
|
|
123
187
|
definedStyles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
124
188
|
property: z.ZodString;
|
|
125
189
|
variant: z.ZodNullable<z.ZodObject<{
|
|
@@ -133,6 +197,7 @@ export declare const selectedElementSchema: z.ZodObject<{
|
|
|
133
197
|
raw: z.ZodString;
|
|
134
198
|
resolved: z.ZodString;
|
|
135
199
|
}, z.core.$strip>>>;
|
|
200
|
+
authoredStyles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
136
201
|
inheritedStyles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
137
202
|
clickPosition: z.ZodObject<{
|
|
138
203
|
x: z.ZodNumber;
|
|
@@ -185,9 +250,13 @@ export declare const selectableDataPayloadSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
185
250
|
export declare const selectableDataSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
186
251
|
kind: z.ZodLiteral<"react-element">;
|
|
187
252
|
selector: z.ZodString;
|
|
253
|
+
section: z.ZodOptional<z.ZodObject<{
|
|
254
|
+
selector: z.ZodString;
|
|
255
|
+
}, z.core.$strip>>;
|
|
188
256
|
tagName: z.ZodString;
|
|
189
257
|
elementType: z.ZodString;
|
|
190
258
|
textContent: z.ZodNullable<z.ZodString>;
|
|
259
|
+
sectionLabel: z.ZodOptional<z.ZodString>;
|
|
191
260
|
rect: z.ZodObject<{
|
|
192
261
|
x: z.ZodNumber;
|
|
193
262
|
y: z.ZodNumber;
|
|
@@ -204,6 +273,24 @@ export declare const selectableDataSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
204
273
|
lineHeight: z.ZodNumber;
|
|
205
274
|
}, z.core.$strip>>;
|
|
206
275
|
outerHTML: z.ZodString;
|
|
276
|
+
image: z.ZodOptional<z.ZodObject<{
|
|
277
|
+
src: z.ZodString;
|
|
278
|
+
currentSrc: z.ZodString;
|
|
279
|
+
srcSet: z.ZodString;
|
|
280
|
+
sizes: z.ZodString;
|
|
281
|
+
previewUrl: z.ZodNullable<z.ZodString>;
|
|
282
|
+
sources: z.ZodArray<z.ZodObject<{
|
|
283
|
+
srcSet: z.ZodString;
|
|
284
|
+
sizes: z.ZodString;
|
|
285
|
+
media: z.ZodString;
|
|
286
|
+
type: z.ZodString;
|
|
287
|
+
previewUrl: z.ZodNullable<z.ZodString>;
|
|
288
|
+
}, z.core.$strip>>;
|
|
289
|
+
}, z.core.$strip>>;
|
|
290
|
+
video: z.ZodOptional<z.ZodObject<{
|
|
291
|
+
src: z.ZodString;
|
|
292
|
+
currentSrc: z.ZodString;
|
|
293
|
+
}, z.core.$strip>>;
|
|
207
294
|
definedStyles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
208
295
|
property: z.ZodString;
|
|
209
296
|
variant: z.ZodNullable<z.ZodObject<{
|
|
@@ -217,6 +304,7 @@ export declare const selectableDataSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
217
304
|
raw: z.ZodString;
|
|
218
305
|
resolved: z.ZodString;
|
|
219
306
|
}, z.core.$strip>>>;
|
|
307
|
+
authoredStyles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
220
308
|
inheritedStyles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
221
309
|
clickPosition: z.ZodObject<{
|
|
222
310
|
x: z.ZodNumber;
|
|
@@ -259,6 +347,7 @@ export type SelectModeBoundingRect = z.infer<typeof selectModeBoundingRectSchema
|
|
|
259
347
|
export type SelectModeClickPosition = z.infer<typeof selectModeClickPositionSchema>;
|
|
260
348
|
export type SelectableData = z.infer<typeof selectableDataSchema>;
|
|
261
349
|
export type SelectableDataPayload = z.infer<typeof selectableDataPayloadSchema>;
|
|
350
|
+
export declare function isSelectedSection(data: SelectableData): boolean;
|
|
262
351
|
export declare function transformSelectedElement({ element, offset, scale, }: {
|
|
263
352
|
element: z.infer<typeof selectedElementSchema>;
|
|
264
353
|
offset: RectOffset;
|
|
@@ -274,7 +363,27 @@ export declare function readSelectablePayload(rawPayload: string | null): {
|
|
|
274
363
|
label: string;
|
|
275
364
|
} | null;
|
|
276
365
|
export declare const selectModeOptimisticUpdatePayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
366
|
+
kind: z.ZodLiteral<"image">;
|
|
367
|
+
image: z.ZodObject<{
|
|
368
|
+
src: z.ZodString;
|
|
369
|
+
currentSrc: z.ZodString;
|
|
370
|
+
srcSet: z.ZodString;
|
|
371
|
+
sizes: z.ZodString;
|
|
372
|
+
previewUrl: z.ZodNullable<z.ZodString>;
|
|
373
|
+
sources: z.ZodArray<z.ZodObject<{
|
|
374
|
+
srcSet: z.ZodString;
|
|
375
|
+
sizes: z.ZodString;
|
|
376
|
+
media: z.ZodString;
|
|
377
|
+
type: z.ZodString;
|
|
378
|
+
previewUrl: z.ZodNullable<z.ZodString>;
|
|
379
|
+
}, z.core.$strip>>;
|
|
380
|
+
}, z.core.$strip>;
|
|
381
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
277
382
|
kind: z.ZodLiteral<"css">;
|
|
383
|
+
fontSource: z.ZodOptional<z.ZodEnum<{
|
|
384
|
+
google: "google";
|
|
385
|
+
site: "site";
|
|
386
|
+
}>>;
|
|
278
387
|
property: z.ZodString;
|
|
279
388
|
value: z.ZodNullable<z.ZodString>;
|
|
280
389
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -343,9 +452,13 @@ export declare const selectModeSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
343
452
|
data: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
344
453
|
kind: z.ZodLiteral<"react-element">;
|
|
345
454
|
selector: z.ZodString;
|
|
455
|
+
section: z.ZodOptional<z.ZodObject<{
|
|
456
|
+
selector: z.ZodString;
|
|
457
|
+
}, z.core.$strip>>;
|
|
346
458
|
tagName: z.ZodString;
|
|
347
459
|
elementType: z.ZodString;
|
|
348
460
|
textContent: z.ZodNullable<z.ZodString>;
|
|
461
|
+
sectionLabel: z.ZodOptional<z.ZodString>;
|
|
349
462
|
rect: z.ZodObject<{
|
|
350
463
|
x: z.ZodNumber;
|
|
351
464
|
y: z.ZodNumber;
|
|
@@ -362,6 +475,24 @@ export declare const selectModeSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
362
475
|
lineHeight: z.ZodNumber;
|
|
363
476
|
}, z.core.$strip>>;
|
|
364
477
|
outerHTML: z.ZodString;
|
|
478
|
+
image: z.ZodOptional<z.ZodObject<{
|
|
479
|
+
src: z.ZodString;
|
|
480
|
+
currentSrc: z.ZodString;
|
|
481
|
+
srcSet: z.ZodString;
|
|
482
|
+
sizes: z.ZodString;
|
|
483
|
+
previewUrl: z.ZodNullable<z.ZodString>;
|
|
484
|
+
sources: z.ZodArray<z.ZodObject<{
|
|
485
|
+
srcSet: z.ZodString;
|
|
486
|
+
sizes: z.ZodString;
|
|
487
|
+
media: z.ZodString;
|
|
488
|
+
type: z.ZodString;
|
|
489
|
+
previewUrl: z.ZodNullable<z.ZodString>;
|
|
490
|
+
}, z.core.$strip>>;
|
|
491
|
+
}, z.core.$strip>>;
|
|
492
|
+
video: z.ZodOptional<z.ZodObject<{
|
|
493
|
+
src: z.ZodString;
|
|
494
|
+
currentSrc: z.ZodString;
|
|
495
|
+
}, z.core.$strip>>;
|
|
365
496
|
definedStyles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
366
497
|
property: z.ZodString;
|
|
367
498
|
variant: z.ZodNullable<z.ZodObject<{
|
|
@@ -375,6 +506,7 @@ export declare const selectModeSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
375
506
|
raw: z.ZodString;
|
|
376
507
|
resolved: z.ZodString;
|
|
377
508
|
}, z.core.$strip>>>;
|
|
509
|
+
authoredStyles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
378
510
|
inheritedStyles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
379
511
|
clickPosition: z.ZodObject<{
|
|
380
512
|
x: z.ZodNumber;
|
|
@@ -428,9 +560,13 @@ export declare const selectModeSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
428
560
|
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
429
561
|
kind: z.ZodLiteral<"react-element">;
|
|
430
562
|
selector: z.ZodString;
|
|
563
|
+
section: z.ZodOptional<z.ZodObject<{
|
|
564
|
+
selector: z.ZodString;
|
|
565
|
+
}, z.core.$strip>>;
|
|
431
566
|
tagName: z.ZodString;
|
|
432
567
|
elementType: z.ZodString;
|
|
433
568
|
textContent: z.ZodNullable<z.ZodString>;
|
|
569
|
+
sectionLabel: z.ZodOptional<z.ZodString>;
|
|
434
570
|
rect: z.ZodObject<{
|
|
435
571
|
x: z.ZodNumber;
|
|
436
572
|
y: z.ZodNumber;
|
|
@@ -447,6 +583,24 @@ export declare const selectModeSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
447
583
|
lineHeight: z.ZodNumber;
|
|
448
584
|
}, z.core.$strip>>;
|
|
449
585
|
outerHTML: z.ZodString;
|
|
586
|
+
image: z.ZodOptional<z.ZodObject<{
|
|
587
|
+
src: z.ZodString;
|
|
588
|
+
currentSrc: z.ZodString;
|
|
589
|
+
srcSet: z.ZodString;
|
|
590
|
+
sizes: z.ZodString;
|
|
591
|
+
previewUrl: z.ZodNullable<z.ZodString>;
|
|
592
|
+
sources: z.ZodArray<z.ZodObject<{
|
|
593
|
+
srcSet: z.ZodString;
|
|
594
|
+
sizes: z.ZodString;
|
|
595
|
+
media: z.ZodString;
|
|
596
|
+
type: z.ZodString;
|
|
597
|
+
previewUrl: z.ZodNullable<z.ZodString>;
|
|
598
|
+
}, z.core.$strip>>;
|
|
599
|
+
}, z.core.$strip>>;
|
|
600
|
+
video: z.ZodOptional<z.ZodObject<{
|
|
601
|
+
src: z.ZodString;
|
|
602
|
+
currentSrc: z.ZodString;
|
|
603
|
+
}, z.core.$strip>>;
|
|
450
604
|
definedStyles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
451
605
|
property: z.ZodString;
|
|
452
606
|
variant: z.ZodNullable<z.ZodObject<{
|
|
@@ -460,6 +614,7 @@ export declare const selectModeSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
460
614
|
raw: z.ZodString;
|
|
461
615
|
resolved: z.ZodString;
|
|
462
616
|
}, z.core.$strip>>>;
|
|
617
|
+
authoredStyles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
463
618
|
inheritedStyles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
464
619
|
clickPosition: z.ZodObject<{
|
|
465
620
|
x: z.ZodNumber;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
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 } from '../../chunk-
|
|
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-RLFL66ST.mjs';
|
|
2
2
|
import '../../chunk-HGXQNZW7.mjs';
|
|
3
|
-
import '../../chunk-
|
|
3
|
+
import '../../chunk-EXI4VDHP.mjs';
|
|
4
4
|
import '../../chunk-ILGEM42C.mjs';
|
|
5
5
|
import '../../chunk-FNTGY7I5.mjs';
|
|
6
6
|
import '../../chunk-UJCSKKID.mjs';
|