@shoplix-ai/sdui-schema 1.3.0 → 1.5.0
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/dist/binding.d.ts +26 -4
- package/dist/binding.d.ts.map +1 -1
- package/dist/binding.js +23 -3
- package/dist/binding.js.map +1 -1
- package/dist/block-definition.d.ts +85 -13
- package/dist/block-definition.d.ts.map +1 -1
- package/dist/block-definition.js +29 -5
- package/dist/block-definition.js.map +1 -1
- package/dist/blocks.d.ts +277 -6
- package/dist/blocks.d.ts.map +1 -1
- package/dist/blocks.js +33 -0
- package/dist/blocks.js.map +1 -1
- package/dist/definition-validator.d.ts +2 -0
- package/dist/definition-validator.d.ts.map +1 -1
- package/dist/definition-validator.js +30 -0
- package/dist/definition-validator.js.map +1 -1
- package/dist/display.d.ts +163 -7
- package/dist/display.d.ts.map +1 -1
- package/dist/display.js +69 -8
- package/dist/display.js.map +1 -1
- package/dist/envelope.d.ts +148 -22
- package/dist/envelope.d.ts.map +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/manifest.d.ts +2 -0
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js.map +1 -1
- package/dist/parse.d.ts +2 -1
- package/dist/parse.d.ts.map +1 -1
- package/dist/parse.js +4 -1
- package/dist/parse.js.map +1 -1
- package/dist/screen.d.ts +27 -5
- package/dist/screen.d.ts.map +1 -1
- package/dist/screen.js +39 -1
- package/dist/screen.js.map +1 -1
- package/dist/theme.d.ts +1 -1
- package/package.json +1 -1
package/dist/blocks.d.ts
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/** JSON-safe, for an editor that has to shape an id before the parse sees it. */
|
|
3
3
|
export declare const BLOCK_ID_PATTERN = "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$";
|
|
4
|
+
/**
|
|
5
|
+
* When a placed block of the cart screen draws, by the state of the held
|
|
6
|
+
* cart. Absent means always. The screen document holds it to the cart screen.
|
|
7
|
+
*/
|
|
8
|
+
export declare const CART_VISIBILITIES: readonly ["always", "when_empty", "when_has_lines"];
|
|
9
|
+
export type CartVisibility = (typeof CART_VISIBILITIES)[number];
|
|
4
10
|
export declare const textBlockSchema: z.ZodObject<{
|
|
5
11
|
id: z.ZodString;
|
|
12
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
13
|
+
always: "always";
|
|
14
|
+
when_empty: "when_empty";
|
|
15
|
+
when_has_lines: "when_has_lines";
|
|
16
|
+
}>>;
|
|
6
17
|
type: z.ZodLiteral<"text">;
|
|
7
18
|
props: z.ZodObject<{
|
|
8
19
|
text: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -27,6 +38,11 @@ export declare const textBlockSchema: z.ZodObject<{
|
|
|
27
38
|
}, z.core.$strip>;
|
|
28
39
|
export declare const imageBlockSchema: z.ZodObject<{
|
|
29
40
|
id: z.ZodString;
|
|
41
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
42
|
+
always: "always";
|
|
43
|
+
when_empty: "when_empty";
|
|
44
|
+
when_has_lines: "when_has_lines";
|
|
45
|
+
}>>;
|
|
30
46
|
type: z.ZodLiteral<"image">;
|
|
31
47
|
props: z.ZodObject<{
|
|
32
48
|
image: z.ZodOptional<z.ZodObject<{
|
|
@@ -49,6 +65,11 @@ export declare const imageBlockSchema: z.ZodObject<{
|
|
|
49
65
|
}, z.core.$strip>;
|
|
50
66
|
export declare const buttonBlockSchema: z.ZodObject<{
|
|
51
67
|
id: z.ZodString;
|
|
68
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
69
|
+
always: "always";
|
|
70
|
+
when_empty: "when_empty";
|
|
71
|
+
when_has_lines: "when_has_lines";
|
|
72
|
+
}>>;
|
|
52
73
|
type: z.ZodLiteral<"button">;
|
|
53
74
|
props: z.ZodObject<{
|
|
54
75
|
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -68,6 +89,11 @@ export declare const buttonBlockSchema: z.ZodObject<{
|
|
|
68
89
|
}, z.core.$strip>;
|
|
69
90
|
export declare const spacerBlockSchema: z.ZodObject<{
|
|
70
91
|
id: z.ZodString;
|
|
92
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
93
|
+
always: "always";
|
|
94
|
+
when_empty: "when_empty";
|
|
95
|
+
when_has_lines: "when_has_lines";
|
|
96
|
+
}>>;
|
|
71
97
|
type: z.ZodLiteral<"spacer">;
|
|
72
98
|
props: z.ZodObject<{
|
|
73
99
|
size: z.ZodEnum<{
|
|
@@ -82,6 +108,11 @@ export declare const spacerBlockSchema: z.ZodObject<{
|
|
|
82
108
|
}, z.core.$strip>;
|
|
83
109
|
export declare const dividerBlockSchema: z.ZodObject<{
|
|
84
110
|
id: z.ZodString;
|
|
111
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
112
|
+
always: "always";
|
|
113
|
+
when_empty: "when_empty";
|
|
114
|
+
when_has_lines: "when_has_lines";
|
|
115
|
+
}>>;
|
|
85
116
|
type: z.ZodLiteral<"divider">;
|
|
86
117
|
props: z.ZodObject<{
|
|
87
118
|
label: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -90,6 +121,11 @@ export declare const dividerBlockSchema: z.ZodObject<{
|
|
|
90
121
|
}, z.core.$strip>;
|
|
91
122
|
export declare const sectionHeaderBlockSchema: z.ZodObject<{
|
|
92
123
|
id: z.ZodString;
|
|
124
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
125
|
+
always: "always";
|
|
126
|
+
when_empty: "when_empty";
|
|
127
|
+
when_has_lines: "when_has_lines";
|
|
128
|
+
}>>;
|
|
93
129
|
type: z.ZodLiteral<"section_header">;
|
|
94
130
|
props: z.ZodObject<{
|
|
95
131
|
title: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -109,6 +145,11 @@ export declare const sectionHeaderBlockSchema: z.ZodObject<{
|
|
|
109
145
|
}, z.core.$strip>;
|
|
110
146
|
export declare const searchBarBlockSchema: z.ZodObject<{
|
|
111
147
|
id: z.ZodString;
|
|
148
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
149
|
+
always: "always";
|
|
150
|
+
when_empty: "when_empty";
|
|
151
|
+
when_has_lines: "when_has_lines";
|
|
152
|
+
}>>;
|
|
112
153
|
type: z.ZodLiteral<"search_bar">;
|
|
113
154
|
props: z.ZodObject<{
|
|
114
155
|
placeholder: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -117,6 +158,11 @@ export declare const searchBarBlockSchema: z.ZodObject<{
|
|
|
117
158
|
}, z.core.$strip>;
|
|
118
159
|
export declare const videoBlockSchema: z.ZodObject<{
|
|
119
160
|
id: z.ZodString;
|
|
161
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
162
|
+
always: "always";
|
|
163
|
+
when_empty: "when_empty";
|
|
164
|
+
when_has_lines: "when_has_lines";
|
|
165
|
+
}>>;
|
|
120
166
|
type: z.ZodLiteral<"video">;
|
|
121
167
|
props: z.ZodObject<{
|
|
122
168
|
assetId: z.ZodOptional<z.ZodUUID>;
|
|
@@ -129,6 +175,11 @@ export declare const videoBlockSchema: z.ZodObject<{
|
|
|
129
175
|
}, z.core.$strip>;
|
|
130
176
|
export declare const heroBannerBlockSchema: z.ZodObject<{
|
|
131
177
|
id: z.ZodString;
|
|
178
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
179
|
+
always: "always";
|
|
180
|
+
when_empty: "when_empty";
|
|
181
|
+
when_has_lines: "when_has_lines";
|
|
182
|
+
}>>;
|
|
132
183
|
type: z.ZodLiteral<"hero_banner">;
|
|
133
184
|
props: z.ZodObject<{
|
|
134
185
|
title: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -153,6 +204,11 @@ export declare const heroBannerBlockSchema: z.ZodObject<{
|
|
|
153
204
|
}, z.core.$strip>;
|
|
154
205
|
export declare const promoBannerBlockSchema: z.ZodObject<{
|
|
155
206
|
id: z.ZodString;
|
|
207
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
208
|
+
always: "always";
|
|
209
|
+
when_empty: "when_empty";
|
|
210
|
+
when_has_lines: "when_has_lines";
|
|
211
|
+
}>>;
|
|
156
212
|
type: z.ZodLiteral<"promo_banner">;
|
|
157
213
|
props: z.ZodObject<{
|
|
158
214
|
image: z.ZodOptional<z.ZodObject<{
|
|
@@ -176,6 +232,11 @@ export declare const promoBannerBlockSchema: z.ZodObject<{
|
|
|
176
232
|
}, z.core.$strip>;
|
|
177
233
|
export declare const announcementBarBlockSchema: z.ZodObject<{
|
|
178
234
|
id: z.ZodString;
|
|
235
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
236
|
+
always: "always";
|
|
237
|
+
when_empty: "when_empty";
|
|
238
|
+
when_has_lines: "when_has_lines";
|
|
239
|
+
}>>;
|
|
179
240
|
type: z.ZodLiteral<"announcement_bar">;
|
|
180
241
|
props: z.ZodObject<{
|
|
181
242
|
text: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -184,6 +245,11 @@ export declare const announcementBarBlockSchema: z.ZodObject<{
|
|
|
184
245
|
}, z.core.$strip>;
|
|
185
246
|
export declare const countdownBlockSchema: z.ZodObject<{
|
|
186
247
|
id: z.ZodString;
|
|
248
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
249
|
+
always: "always";
|
|
250
|
+
when_empty: "when_empty";
|
|
251
|
+
when_has_lines: "when_has_lines";
|
|
252
|
+
}>>;
|
|
187
253
|
type: z.ZodLiteral<"countdown">;
|
|
188
254
|
props: z.ZodObject<{
|
|
189
255
|
endsAt: z.ZodISODateTime;
|
|
@@ -193,6 +259,11 @@ export declare const countdownBlockSchema: z.ZodObject<{
|
|
|
193
259
|
}, z.core.$strip>;
|
|
194
260
|
export declare const featureStripBlockSchema: z.ZodObject<{
|
|
195
261
|
id: z.ZodString;
|
|
262
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
263
|
+
always: "always";
|
|
264
|
+
when_empty: "when_empty";
|
|
265
|
+
when_has_lines: "when_has_lines";
|
|
266
|
+
}>>;
|
|
196
267
|
type: z.ZodLiteral<"feature_strip">;
|
|
197
268
|
props: z.ZodObject<{
|
|
198
269
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -204,6 +275,11 @@ export declare const featureStripBlockSchema: z.ZodObject<{
|
|
|
204
275
|
}, z.core.$strip>;
|
|
205
276
|
export declare const productCardBlockSchema: z.ZodObject<{
|
|
206
277
|
id: z.ZodString;
|
|
278
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
279
|
+
always: "always";
|
|
280
|
+
when_empty: "when_empty";
|
|
281
|
+
when_has_lines: "when_has_lines";
|
|
282
|
+
}>>;
|
|
207
283
|
type: z.ZodLiteral<"product_card">;
|
|
208
284
|
binding: z.ZodObject<{
|
|
209
285
|
kind: z.ZodLiteral<"product">;
|
|
@@ -222,13 +298,18 @@ export declare const productCardBlockSchema: z.ZodObject<{
|
|
|
222
298
|
}, z.core.$strip>;
|
|
223
299
|
export declare const productCarouselBlockSchema: z.ZodObject<{
|
|
224
300
|
id: z.ZodString;
|
|
301
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
302
|
+
always: "always";
|
|
303
|
+
when_empty: "when_empty";
|
|
304
|
+
when_has_lines: "when_has_lines";
|
|
305
|
+
}>>;
|
|
225
306
|
type: z.ZodLiteral<"product_carousel">;
|
|
226
307
|
binding: z.ZodObject<{
|
|
227
308
|
kind: z.ZodLiteral<"products">;
|
|
228
309
|
selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
229
310
|
mode: z.ZodLiteral<"handpicked">;
|
|
230
311
|
ids: z.ZodArray<z.ZodString>;
|
|
231
|
-
}, z.core.$
|
|
312
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
232
313
|
mode: z.ZodLiteral<"collection">;
|
|
233
314
|
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
234
315
|
form: z.ZodLiteral<"literal">;
|
|
@@ -255,13 +336,18 @@ export declare const productCarouselBlockSchema: z.ZodObject<{
|
|
|
255
336
|
}, z.core.$strip>;
|
|
256
337
|
export declare const productGridBlockSchema: z.ZodObject<{
|
|
257
338
|
id: z.ZodString;
|
|
339
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
340
|
+
always: "always";
|
|
341
|
+
when_empty: "when_empty";
|
|
342
|
+
when_has_lines: "when_has_lines";
|
|
343
|
+
}>>;
|
|
258
344
|
type: z.ZodLiteral<"product_grid">;
|
|
259
345
|
binding: z.ZodObject<{
|
|
260
346
|
kind: z.ZodLiteral<"products">;
|
|
261
347
|
selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
262
348
|
mode: z.ZodLiteral<"handpicked">;
|
|
263
349
|
ids: z.ZodArray<z.ZodString>;
|
|
264
|
-
}, z.core.$
|
|
350
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
265
351
|
mode: z.ZodLiteral<"collection">;
|
|
266
352
|
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
267
353
|
form: z.ZodLiteral<"literal">;
|
|
@@ -289,13 +375,18 @@ export declare const productGridBlockSchema: z.ZodObject<{
|
|
|
289
375
|
}, z.core.$strip>;
|
|
290
376
|
export declare const productListBlockSchema: z.ZodObject<{
|
|
291
377
|
id: z.ZodString;
|
|
378
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
379
|
+
always: "always";
|
|
380
|
+
when_empty: "when_empty";
|
|
381
|
+
when_has_lines: "when_has_lines";
|
|
382
|
+
}>>;
|
|
292
383
|
type: z.ZodLiteral<"product_list">;
|
|
293
384
|
binding: z.ZodObject<{
|
|
294
385
|
kind: z.ZodLiteral<"products">;
|
|
295
386
|
selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
296
387
|
mode: z.ZodLiteral<"handpicked">;
|
|
297
388
|
ids: z.ZodArray<z.ZodString>;
|
|
298
|
-
}, z.core.$
|
|
389
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
299
390
|
mode: z.ZodLiteral<"collection">;
|
|
300
391
|
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
301
392
|
form: z.ZodLiteral<"literal">;
|
|
@@ -322,6 +413,11 @@ export declare const productListBlockSchema: z.ZodObject<{
|
|
|
322
413
|
}, z.core.$strip>;
|
|
323
414
|
export declare const collectionCirclesBlockSchema: z.ZodObject<{
|
|
324
415
|
id: z.ZodString;
|
|
416
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
417
|
+
always: "always";
|
|
418
|
+
when_empty: "when_empty";
|
|
419
|
+
when_has_lines: "when_has_lines";
|
|
420
|
+
}>>;
|
|
325
421
|
type: z.ZodLiteral<"collection_circles">;
|
|
326
422
|
binding: z.ZodObject<{
|
|
327
423
|
kind: z.ZodLiteral<"collections">;
|
|
@@ -334,6 +430,11 @@ export declare const collectionCirclesBlockSchema: z.ZodObject<{
|
|
|
334
430
|
}, z.core.$strip>;
|
|
335
431
|
export declare const collectionGridBlockSchema: z.ZodObject<{
|
|
336
432
|
id: z.ZodString;
|
|
433
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
434
|
+
always: "always";
|
|
435
|
+
when_empty: "when_empty";
|
|
436
|
+
when_has_lines: "when_has_lines";
|
|
437
|
+
}>>;
|
|
337
438
|
type: z.ZodLiteral<"collection_grid">;
|
|
338
439
|
binding: z.ZodObject<{
|
|
339
440
|
kind: z.ZodLiteral<"collections">;
|
|
@@ -347,6 +448,11 @@ export declare const collectionGridBlockSchema: z.ZodObject<{
|
|
|
347
448
|
}, z.core.$strip>;
|
|
348
449
|
export declare const collectionRowBlockSchema: z.ZodObject<{
|
|
349
450
|
id: z.ZodString;
|
|
451
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
452
|
+
always: "always";
|
|
453
|
+
when_empty: "when_empty";
|
|
454
|
+
when_has_lines: "when_has_lines";
|
|
455
|
+
}>>;
|
|
350
456
|
type: z.ZodLiteral<"collection_row">;
|
|
351
457
|
binding: z.ZodObject<{
|
|
352
458
|
kind: z.ZodLiteral<"collections">;
|
|
@@ -359,6 +465,11 @@ export declare const collectionRowBlockSchema: z.ZodObject<{
|
|
|
359
465
|
}, z.core.$strip>;
|
|
360
466
|
export declare const productGalleryBlockSchema: z.ZodObject<{
|
|
361
467
|
id: z.ZodString;
|
|
468
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
469
|
+
always: "always";
|
|
470
|
+
when_empty: "when_empty";
|
|
471
|
+
when_has_lines: "when_has_lines";
|
|
472
|
+
}>>;
|
|
362
473
|
type: z.ZodLiteral<"product_gallery">;
|
|
363
474
|
binding: z.ZodObject<{
|
|
364
475
|
kind: z.ZodLiteral<"product">;
|
|
@@ -371,6 +482,11 @@ export declare const productGalleryBlockSchema: z.ZodObject<{
|
|
|
371
482
|
}, z.core.$strip>;
|
|
372
483
|
export declare const productSummaryBlockSchema: z.ZodObject<{
|
|
373
484
|
id: z.ZodString;
|
|
485
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
486
|
+
always: "always";
|
|
487
|
+
when_empty: "when_empty";
|
|
488
|
+
when_has_lines: "when_has_lines";
|
|
489
|
+
}>>;
|
|
374
490
|
type: z.ZodLiteral<"product_summary">;
|
|
375
491
|
binding: z.ZodObject<{
|
|
376
492
|
kind: z.ZodLiteral<"product">;
|
|
@@ -388,6 +504,11 @@ export declare const productSummaryBlockSchema: z.ZodObject<{
|
|
|
388
504
|
*/
|
|
389
505
|
export declare const variantPickerBlockSchema: z.ZodObject<{
|
|
390
506
|
id: z.ZodString;
|
|
507
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
508
|
+
always: "always";
|
|
509
|
+
when_empty: "when_empty";
|
|
510
|
+
when_has_lines: "when_has_lines";
|
|
511
|
+
}>>;
|
|
391
512
|
type: z.ZodLiteral<"variant_picker">;
|
|
392
513
|
binding: z.ZodObject<{
|
|
393
514
|
kind: z.ZodLiteral<"product">;
|
|
@@ -405,6 +526,11 @@ export declare const variantPickerBlockSchema: z.ZodObject<{
|
|
|
405
526
|
}, z.core.$strip>;
|
|
406
527
|
export declare const addToCartBlockSchema: z.ZodObject<{
|
|
407
528
|
id: z.ZodString;
|
|
529
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
530
|
+
always: "always";
|
|
531
|
+
when_empty: "when_empty";
|
|
532
|
+
when_has_lines: "when_has_lines";
|
|
533
|
+
}>>;
|
|
408
534
|
type: z.ZodLiteral<"add_to_cart">;
|
|
409
535
|
binding: z.ZodObject<{
|
|
410
536
|
kind: z.ZodLiteral<"product">;
|
|
@@ -419,6 +545,11 @@ export declare const addToCartBlockSchema: z.ZodObject<{
|
|
|
419
545
|
}, z.core.$strip>;
|
|
420
546
|
export declare const productSpecsBlockSchema: z.ZodObject<{
|
|
421
547
|
id: z.ZodString;
|
|
548
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
549
|
+
always: "always";
|
|
550
|
+
when_empty: "when_empty";
|
|
551
|
+
when_has_lines: "when_has_lines";
|
|
552
|
+
}>>;
|
|
422
553
|
type: z.ZodLiteral<"product_specs">;
|
|
423
554
|
binding: z.ZodObject<{
|
|
424
555
|
kind: z.ZodLiteral<"product">;
|
|
@@ -431,6 +562,11 @@ export declare const productSpecsBlockSchema: z.ZodObject<{
|
|
|
431
562
|
}, z.core.$strip>;
|
|
432
563
|
export declare const reviewsSlotBlockSchema: z.ZodObject<{
|
|
433
564
|
id: z.ZodString;
|
|
565
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
566
|
+
always: "always";
|
|
567
|
+
when_empty: "when_empty";
|
|
568
|
+
when_has_lines: "when_has_lines";
|
|
569
|
+
}>>;
|
|
434
570
|
type: z.ZodLiteral<"reviews_slot">;
|
|
435
571
|
binding: z.ZodObject<{
|
|
436
572
|
kind: z.ZodLiteral<"product">;
|
|
@@ -446,6 +582,11 @@ export type BlockType = (typeof BLOCK_TYPES)[number];
|
|
|
446
582
|
export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
447
583
|
readonly text: z.ZodObject<{
|
|
448
584
|
id: z.ZodString;
|
|
585
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
586
|
+
always: "always";
|
|
587
|
+
when_empty: "when_empty";
|
|
588
|
+
when_has_lines: "when_has_lines";
|
|
589
|
+
}>>;
|
|
449
590
|
type: z.ZodLiteral<"text">;
|
|
450
591
|
props: z.ZodObject<{
|
|
451
592
|
text: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -470,6 +611,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
470
611
|
}, z.core.$strip>;
|
|
471
612
|
readonly image: z.ZodObject<{
|
|
472
613
|
id: z.ZodString;
|
|
614
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
615
|
+
always: "always";
|
|
616
|
+
when_empty: "when_empty";
|
|
617
|
+
when_has_lines: "when_has_lines";
|
|
618
|
+
}>>;
|
|
473
619
|
type: z.ZodLiteral<"image">;
|
|
474
620
|
props: z.ZodObject<{
|
|
475
621
|
image: z.ZodOptional<z.ZodObject<{
|
|
@@ -492,6 +638,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
492
638
|
}, z.core.$strip>;
|
|
493
639
|
readonly button: z.ZodObject<{
|
|
494
640
|
id: z.ZodString;
|
|
641
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
642
|
+
always: "always";
|
|
643
|
+
when_empty: "when_empty";
|
|
644
|
+
when_has_lines: "when_has_lines";
|
|
645
|
+
}>>;
|
|
495
646
|
type: z.ZodLiteral<"button">;
|
|
496
647
|
props: z.ZodObject<{
|
|
497
648
|
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -511,6 +662,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
511
662
|
}, z.core.$strip>;
|
|
512
663
|
readonly spacer: z.ZodObject<{
|
|
513
664
|
id: z.ZodString;
|
|
665
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
666
|
+
always: "always";
|
|
667
|
+
when_empty: "when_empty";
|
|
668
|
+
when_has_lines: "when_has_lines";
|
|
669
|
+
}>>;
|
|
514
670
|
type: z.ZodLiteral<"spacer">;
|
|
515
671
|
props: z.ZodObject<{
|
|
516
672
|
size: z.ZodEnum<{
|
|
@@ -525,6 +681,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
525
681
|
}, z.core.$strip>;
|
|
526
682
|
readonly divider: z.ZodObject<{
|
|
527
683
|
id: z.ZodString;
|
|
684
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
685
|
+
always: "always";
|
|
686
|
+
when_empty: "when_empty";
|
|
687
|
+
when_has_lines: "when_has_lines";
|
|
688
|
+
}>>;
|
|
528
689
|
type: z.ZodLiteral<"divider">;
|
|
529
690
|
props: z.ZodObject<{
|
|
530
691
|
label: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -533,6 +694,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
533
694
|
}, z.core.$strip>;
|
|
534
695
|
readonly section_header: z.ZodObject<{
|
|
535
696
|
id: z.ZodString;
|
|
697
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
698
|
+
always: "always";
|
|
699
|
+
when_empty: "when_empty";
|
|
700
|
+
when_has_lines: "when_has_lines";
|
|
701
|
+
}>>;
|
|
536
702
|
type: z.ZodLiteral<"section_header">;
|
|
537
703
|
props: z.ZodObject<{
|
|
538
704
|
title: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -552,6 +718,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
552
718
|
}, z.core.$strip>;
|
|
553
719
|
readonly search_bar: z.ZodObject<{
|
|
554
720
|
id: z.ZodString;
|
|
721
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
722
|
+
always: "always";
|
|
723
|
+
when_empty: "when_empty";
|
|
724
|
+
when_has_lines: "when_has_lines";
|
|
725
|
+
}>>;
|
|
555
726
|
type: z.ZodLiteral<"search_bar">;
|
|
556
727
|
props: z.ZodObject<{
|
|
557
728
|
placeholder: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -560,6 +731,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
560
731
|
}, z.core.$strip>;
|
|
561
732
|
readonly video: z.ZodObject<{
|
|
562
733
|
id: z.ZodString;
|
|
734
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
735
|
+
always: "always";
|
|
736
|
+
when_empty: "when_empty";
|
|
737
|
+
when_has_lines: "when_has_lines";
|
|
738
|
+
}>>;
|
|
563
739
|
type: z.ZodLiteral<"video">;
|
|
564
740
|
props: z.ZodObject<{
|
|
565
741
|
assetId: z.ZodOptional<z.ZodUUID>;
|
|
@@ -572,6 +748,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
572
748
|
}, z.core.$strip>;
|
|
573
749
|
readonly hero_banner: z.ZodObject<{
|
|
574
750
|
id: z.ZodString;
|
|
751
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
752
|
+
always: "always";
|
|
753
|
+
when_empty: "when_empty";
|
|
754
|
+
when_has_lines: "when_has_lines";
|
|
755
|
+
}>>;
|
|
575
756
|
type: z.ZodLiteral<"hero_banner">;
|
|
576
757
|
props: z.ZodObject<{
|
|
577
758
|
title: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -596,6 +777,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
596
777
|
}, z.core.$strip>;
|
|
597
778
|
readonly promo_banner: z.ZodObject<{
|
|
598
779
|
id: z.ZodString;
|
|
780
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
781
|
+
always: "always";
|
|
782
|
+
when_empty: "when_empty";
|
|
783
|
+
when_has_lines: "when_has_lines";
|
|
784
|
+
}>>;
|
|
599
785
|
type: z.ZodLiteral<"promo_banner">;
|
|
600
786
|
props: z.ZodObject<{
|
|
601
787
|
image: z.ZodOptional<z.ZodObject<{
|
|
@@ -619,6 +805,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
619
805
|
}, z.core.$strip>;
|
|
620
806
|
readonly announcement_bar: z.ZodObject<{
|
|
621
807
|
id: z.ZodString;
|
|
808
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
809
|
+
always: "always";
|
|
810
|
+
when_empty: "when_empty";
|
|
811
|
+
when_has_lines: "when_has_lines";
|
|
812
|
+
}>>;
|
|
622
813
|
type: z.ZodLiteral<"announcement_bar">;
|
|
623
814
|
props: z.ZodObject<{
|
|
624
815
|
text: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -627,6 +818,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
627
818
|
}, z.core.$strip>;
|
|
628
819
|
readonly countdown: z.ZodObject<{
|
|
629
820
|
id: z.ZodString;
|
|
821
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
822
|
+
always: "always";
|
|
823
|
+
when_empty: "when_empty";
|
|
824
|
+
when_has_lines: "when_has_lines";
|
|
825
|
+
}>>;
|
|
630
826
|
type: z.ZodLiteral<"countdown">;
|
|
631
827
|
props: z.ZodObject<{
|
|
632
828
|
endsAt: z.ZodISODateTime;
|
|
@@ -636,6 +832,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
636
832
|
}, z.core.$strip>;
|
|
637
833
|
readonly feature_strip: z.ZodObject<{
|
|
638
834
|
id: z.ZodString;
|
|
835
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
836
|
+
always: "always";
|
|
837
|
+
when_empty: "when_empty";
|
|
838
|
+
when_has_lines: "when_has_lines";
|
|
839
|
+
}>>;
|
|
639
840
|
type: z.ZodLiteral<"feature_strip">;
|
|
640
841
|
props: z.ZodObject<{
|
|
641
842
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -647,6 +848,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
647
848
|
}, z.core.$strip>;
|
|
648
849
|
readonly product_card: z.ZodObject<{
|
|
649
850
|
id: z.ZodString;
|
|
851
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
852
|
+
always: "always";
|
|
853
|
+
when_empty: "when_empty";
|
|
854
|
+
when_has_lines: "when_has_lines";
|
|
855
|
+
}>>;
|
|
650
856
|
type: z.ZodLiteral<"product_card">;
|
|
651
857
|
binding: z.ZodObject<{
|
|
652
858
|
kind: z.ZodLiteral<"product">;
|
|
@@ -665,13 +871,18 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
665
871
|
}, z.core.$strip>;
|
|
666
872
|
readonly product_carousel: z.ZodObject<{
|
|
667
873
|
id: z.ZodString;
|
|
874
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
875
|
+
always: "always";
|
|
876
|
+
when_empty: "when_empty";
|
|
877
|
+
when_has_lines: "when_has_lines";
|
|
878
|
+
}>>;
|
|
668
879
|
type: z.ZodLiteral<"product_carousel">;
|
|
669
880
|
binding: z.ZodObject<{
|
|
670
881
|
kind: z.ZodLiteral<"products">;
|
|
671
882
|
selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
672
883
|
mode: z.ZodLiteral<"handpicked">;
|
|
673
884
|
ids: z.ZodArray<z.ZodString>;
|
|
674
|
-
}, z.core.$
|
|
885
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
675
886
|
mode: z.ZodLiteral<"collection">;
|
|
676
887
|
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
677
888
|
form: z.ZodLiteral<"literal">;
|
|
@@ -698,13 +909,18 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
698
909
|
}, z.core.$strip>;
|
|
699
910
|
readonly product_grid: z.ZodObject<{
|
|
700
911
|
id: z.ZodString;
|
|
912
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
913
|
+
always: "always";
|
|
914
|
+
when_empty: "when_empty";
|
|
915
|
+
when_has_lines: "when_has_lines";
|
|
916
|
+
}>>;
|
|
701
917
|
type: z.ZodLiteral<"product_grid">;
|
|
702
918
|
binding: z.ZodObject<{
|
|
703
919
|
kind: z.ZodLiteral<"products">;
|
|
704
920
|
selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
705
921
|
mode: z.ZodLiteral<"handpicked">;
|
|
706
922
|
ids: z.ZodArray<z.ZodString>;
|
|
707
|
-
}, z.core.$
|
|
923
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
708
924
|
mode: z.ZodLiteral<"collection">;
|
|
709
925
|
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
710
926
|
form: z.ZodLiteral<"literal">;
|
|
@@ -732,13 +948,18 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
732
948
|
}, z.core.$strip>;
|
|
733
949
|
readonly product_list: z.ZodObject<{
|
|
734
950
|
id: z.ZodString;
|
|
951
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
952
|
+
always: "always";
|
|
953
|
+
when_empty: "when_empty";
|
|
954
|
+
when_has_lines: "when_has_lines";
|
|
955
|
+
}>>;
|
|
735
956
|
type: z.ZodLiteral<"product_list">;
|
|
736
957
|
binding: z.ZodObject<{
|
|
737
958
|
kind: z.ZodLiteral<"products">;
|
|
738
959
|
selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
739
960
|
mode: z.ZodLiteral<"handpicked">;
|
|
740
961
|
ids: z.ZodArray<z.ZodString>;
|
|
741
|
-
}, z.core.$
|
|
962
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
742
963
|
mode: z.ZodLiteral<"collection">;
|
|
743
964
|
target: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
744
965
|
form: z.ZodLiteral<"literal">;
|
|
@@ -765,6 +986,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
765
986
|
}, z.core.$strip>;
|
|
766
987
|
readonly collection_circles: z.ZodObject<{
|
|
767
988
|
id: z.ZodString;
|
|
989
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
990
|
+
always: "always";
|
|
991
|
+
when_empty: "when_empty";
|
|
992
|
+
when_has_lines: "when_has_lines";
|
|
993
|
+
}>>;
|
|
768
994
|
type: z.ZodLiteral<"collection_circles">;
|
|
769
995
|
binding: z.ZodObject<{
|
|
770
996
|
kind: z.ZodLiteral<"collections">;
|
|
@@ -777,6 +1003,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
777
1003
|
}, z.core.$strip>;
|
|
778
1004
|
readonly collection_grid: z.ZodObject<{
|
|
779
1005
|
id: z.ZodString;
|
|
1006
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
1007
|
+
always: "always";
|
|
1008
|
+
when_empty: "when_empty";
|
|
1009
|
+
when_has_lines: "when_has_lines";
|
|
1010
|
+
}>>;
|
|
780
1011
|
type: z.ZodLiteral<"collection_grid">;
|
|
781
1012
|
binding: z.ZodObject<{
|
|
782
1013
|
kind: z.ZodLiteral<"collections">;
|
|
@@ -790,6 +1021,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
790
1021
|
}, z.core.$strip>;
|
|
791
1022
|
readonly collection_row: z.ZodObject<{
|
|
792
1023
|
id: z.ZodString;
|
|
1024
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
1025
|
+
always: "always";
|
|
1026
|
+
when_empty: "when_empty";
|
|
1027
|
+
when_has_lines: "when_has_lines";
|
|
1028
|
+
}>>;
|
|
793
1029
|
type: z.ZodLiteral<"collection_row">;
|
|
794
1030
|
binding: z.ZodObject<{
|
|
795
1031
|
kind: z.ZodLiteral<"collections">;
|
|
@@ -802,6 +1038,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
802
1038
|
}, z.core.$strip>;
|
|
803
1039
|
readonly product_gallery: z.ZodObject<{
|
|
804
1040
|
id: z.ZodString;
|
|
1041
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
1042
|
+
always: "always";
|
|
1043
|
+
when_empty: "when_empty";
|
|
1044
|
+
when_has_lines: "when_has_lines";
|
|
1045
|
+
}>>;
|
|
805
1046
|
type: z.ZodLiteral<"product_gallery">;
|
|
806
1047
|
binding: z.ZodObject<{
|
|
807
1048
|
kind: z.ZodLiteral<"product">;
|
|
@@ -814,6 +1055,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
814
1055
|
}, z.core.$strip>;
|
|
815
1056
|
readonly product_summary: z.ZodObject<{
|
|
816
1057
|
id: z.ZodString;
|
|
1058
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
1059
|
+
always: "always";
|
|
1060
|
+
when_empty: "when_empty";
|
|
1061
|
+
when_has_lines: "when_has_lines";
|
|
1062
|
+
}>>;
|
|
817
1063
|
type: z.ZodLiteral<"product_summary">;
|
|
818
1064
|
binding: z.ZodObject<{
|
|
819
1065
|
kind: z.ZodLiteral<"product">;
|
|
@@ -826,6 +1072,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
826
1072
|
}, z.core.$strip>;
|
|
827
1073
|
readonly variant_picker: z.ZodObject<{
|
|
828
1074
|
id: z.ZodString;
|
|
1075
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
1076
|
+
always: "always";
|
|
1077
|
+
when_empty: "when_empty";
|
|
1078
|
+
when_has_lines: "when_has_lines";
|
|
1079
|
+
}>>;
|
|
829
1080
|
type: z.ZodLiteral<"variant_picker">;
|
|
830
1081
|
binding: z.ZodObject<{
|
|
831
1082
|
kind: z.ZodLiteral<"product">;
|
|
@@ -843,6 +1094,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
843
1094
|
}, z.core.$strip>;
|
|
844
1095
|
readonly add_to_cart: z.ZodObject<{
|
|
845
1096
|
id: z.ZodString;
|
|
1097
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
1098
|
+
always: "always";
|
|
1099
|
+
when_empty: "when_empty";
|
|
1100
|
+
when_has_lines: "when_has_lines";
|
|
1101
|
+
}>>;
|
|
846
1102
|
type: z.ZodLiteral<"add_to_cart">;
|
|
847
1103
|
binding: z.ZodObject<{
|
|
848
1104
|
kind: z.ZodLiteral<"product">;
|
|
@@ -857,6 +1113,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
857
1113
|
}, z.core.$strip>;
|
|
858
1114
|
readonly product_specs: z.ZodObject<{
|
|
859
1115
|
id: z.ZodString;
|
|
1116
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
1117
|
+
always: "always";
|
|
1118
|
+
when_empty: "when_empty";
|
|
1119
|
+
when_has_lines: "when_has_lines";
|
|
1120
|
+
}>>;
|
|
860
1121
|
type: z.ZodLiteral<"product_specs">;
|
|
861
1122
|
binding: z.ZodObject<{
|
|
862
1123
|
kind: z.ZodLiteral<"product">;
|
|
@@ -869,6 +1130,11 @@ export declare const KNOWN_BLOCK_SCHEMAS: {
|
|
|
869
1130
|
}, z.core.$strip>;
|
|
870
1131
|
readonly reviews_slot: z.ZodObject<{
|
|
871
1132
|
id: z.ZodString;
|
|
1133
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
1134
|
+
always: "always";
|
|
1135
|
+
when_empty: "when_empty";
|
|
1136
|
+
when_has_lines: "when_has_lines";
|
|
1137
|
+
}>>;
|
|
872
1138
|
type: z.ZodLiteral<"reviews_slot">;
|
|
873
1139
|
binding: z.ZodObject<{
|
|
874
1140
|
kind: z.ZodLiteral<"product">;
|
|
@@ -915,6 +1181,11 @@ export type KnownBlock = TextBlock | ImageBlock | ButtonBlock | SpacerBlock | Di
|
|
|
915
1181
|
*/
|
|
916
1182
|
declare const unknownBlockSchema: z.ZodObject<{
|
|
917
1183
|
id: z.ZodString;
|
|
1184
|
+
cartVisibility: z.ZodOptional<z.ZodEnum<{
|
|
1185
|
+
always: "always";
|
|
1186
|
+
when_empty: "when_empty";
|
|
1187
|
+
when_has_lines: "when_has_lines";
|
|
1188
|
+
}>>;
|
|
918
1189
|
type: z.ZodString;
|
|
919
1190
|
}, z.core.$loose>;
|
|
920
1191
|
export type UnknownBlock = z.infer<typeof unknownBlockSchema>;
|