@prismicio/types-internal 1.3.0 → 1.4.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.
@@ -0,0 +1,662 @@
1
+ import type { Variation } from "../widgets/slices";
2
+ import { type DiffChange } from "./Changes";
3
+ declare type VariationMetadata = Omit<Variation, "primary" | "items">;
4
+ export declare type VariationDiff = DiffChange<Variation, Partial<VariationMetadata>>;
5
+ export declare const VariationComparator: {
6
+ compare(variationA?: ({
7
+ id: string;
8
+ name: string;
9
+ description: string;
10
+ imageUrl: string;
11
+ docURL: string;
12
+ version: string;
13
+ } & {
14
+ display?: string;
15
+ primary?: {
16
+ [x: string]: ({
17
+ type: "Boolean";
18
+ } & {
19
+ config?: {
20
+ label?: string | null | undefined;
21
+ default_value?: boolean;
22
+ placeholder_true?: string;
23
+ placeholder_false?: string;
24
+ };
25
+ }) | ({
26
+ type: "Color";
27
+ } & {
28
+ fieldset?: string | null | undefined;
29
+ config?: {
30
+ label?: string | null | undefined;
31
+ placeholder?: string;
32
+ };
33
+ }) | ({
34
+ type: "Date";
35
+ } & {
36
+ fieldset?: string | null | undefined;
37
+ config?: {
38
+ label?: string | null | undefined;
39
+ placeholder?: string;
40
+ default?: string;
41
+ };
42
+ }) | ({
43
+ type: "Embed";
44
+ } & {
45
+ fieldset?: string | null | undefined;
46
+ config?: {
47
+ label?: string | null | undefined;
48
+ placeholder?: string;
49
+ useAsTitle?: boolean;
50
+ };
51
+ }) | ({
52
+ type: "GeoPoint";
53
+ } & {
54
+ fieldset?: string | null | undefined;
55
+ config?: {
56
+ label?: string | null | undefined;
57
+ };
58
+ }) | ({
59
+ type: "Image";
60
+ } & {
61
+ fieldset?: string | null | undefined;
62
+ config?: {
63
+ label?: string | null | undefined;
64
+ placeholder?: string;
65
+ constraint?: {
66
+ width?: number | null;
67
+ height?: number | null;
68
+ };
69
+ thumbnails?: readonly ({
70
+ name: string;
71
+ } & {
72
+ width?: number | null;
73
+ height?: number | null;
74
+ })[];
75
+ };
76
+ }) | ({
77
+ type: "IntegrationFields";
78
+ } & {
79
+ fieldset?: string | null | undefined;
80
+ config?: {
81
+ label?: string | null | undefined;
82
+ placeholder?: string;
83
+ catalog?: string;
84
+ };
85
+ }) | ({
86
+ type: "Link";
87
+ } & {
88
+ fieldset?: string | null | undefined;
89
+ config?: {
90
+ label?: string | null | undefined;
91
+ useAsTitle?: boolean;
92
+ placeholder?: string;
93
+ select?: "web" | "media" | "document" | null;
94
+ customtypes?: readonly string[];
95
+ masks?: readonly string[];
96
+ tags?: readonly string[];
97
+ allowTargetBlank?: boolean;
98
+ };
99
+ }) | ({
100
+ type: "Number";
101
+ } & {
102
+ fieldset?: string | null | undefined;
103
+ config?: {
104
+ label?: string | null | undefined;
105
+ placeholder?: string;
106
+ min?: number;
107
+ max?: number;
108
+ step?: number;
109
+ };
110
+ }) | ({
111
+ type: "Range";
112
+ } & {
113
+ fieldset?: string | null | undefined;
114
+ config?: {
115
+ label?: string | null | undefined;
116
+ placeholder?: string;
117
+ min?: number;
118
+ max?: number;
119
+ step?: number;
120
+ };
121
+ }) | ({
122
+ type: "StructuredText";
123
+ } & {
124
+ fieldset?: string | null | undefined;
125
+ config?: {
126
+ label?: string | null | undefined;
127
+ placeholder?: string;
128
+ useAsTitle?: boolean;
129
+ single?: string;
130
+ multi?: string;
131
+ imageConstraint?: {
132
+ width?: number | null;
133
+ height?: number | null;
134
+ };
135
+ labels?: readonly string[];
136
+ allowTargetBlank?: boolean;
137
+ };
138
+ }) | ({
139
+ type: "Select";
140
+ } & {
141
+ fieldset?: string | null | undefined;
142
+ config?: {
143
+ label?: string | null | undefined;
144
+ placeholder?: string;
145
+ default_value?: string;
146
+ options?: readonly string[];
147
+ };
148
+ }) | ({
149
+ type: "Separator";
150
+ } & {
151
+ config?: {
152
+ label?: string | null | undefined;
153
+ };
154
+ }) | ({
155
+ type: "Text";
156
+ } & {
157
+ fieldset?: string | null | undefined;
158
+ config?: {
159
+ label?: string | null | undefined;
160
+ useAsTitle?: boolean;
161
+ placeholder?: string;
162
+ };
163
+ }) | ({
164
+ type: "Timestamp";
165
+ } & {
166
+ fieldset?: string | null | undefined;
167
+ config?: {
168
+ label?: string | null | undefined;
169
+ placeholder?: string;
170
+ default?: string;
171
+ };
172
+ });
173
+ };
174
+ items?: {
175
+ [x: string]: ({
176
+ type: "Boolean";
177
+ } & {
178
+ config?: {
179
+ label?: string | null | undefined;
180
+ default_value?: boolean;
181
+ placeholder_true?: string;
182
+ placeholder_false?: string;
183
+ };
184
+ }) | ({
185
+ type: "Color";
186
+ } & {
187
+ fieldset?: string | null | undefined;
188
+ config?: {
189
+ label?: string | null | undefined;
190
+ placeholder?: string;
191
+ };
192
+ }) | ({
193
+ type: "Date";
194
+ } & {
195
+ fieldset?: string | null | undefined;
196
+ config?: {
197
+ label?: string | null | undefined;
198
+ placeholder?: string;
199
+ default?: string;
200
+ };
201
+ }) | ({
202
+ type: "Embed";
203
+ } & {
204
+ fieldset?: string | null | undefined;
205
+ config?: {
206
+ label?: string | null | undefined;
207
+ placeholder?: string;
208
+ useAsTitle?: boolean;
209
+ };
210
+ }) | ({
211
+ type: "GeoPoint";
212
+ } & {
213
+ fieldset?: string | null | undefined;
214
+ config?: {
215
+ label?: string | null | undefined;
216
+ };
217
+ }) | ({
218
+ type: "Image";
219
+ } & {
220
+ fieldset?: string | null | undefined;
221
+ config?: {
222
+ label?: string | null | undefined;
223
+ placeholder?: string;
224
+ constraint?: {
225
+ width?: number | null;
226
+ height?: number | null;
227
+ };
228
+ thumbnails?: readonly ({
229
+ name: string;
230
+ } & {
231
+ width?: number | null;
232
+ height?: number | null;
233
+ })[];
234
+ };
235
+ }) | ({
236
+ type: "IntegrationFields";
237
+ } & {
238
+ fieldset?: string | null | undefined;
239
+ config?: {
240
+ label?: string | null | undefined;
241
+ placeholder?: string;
242
+ catalog?: string;
243
+ };
244
+ }) | ({
245
+ type: "Link";
246
+ } & {
247
+ fieldset?: string | null | undefined;
248
+ config?: {
249
+ label?: string | null | undefined;
250
+ useAsTitle?: boolean;
251
+ placeholder?: string;
252
+ select?: "web" | "media" | "document" | null;
253
+ customtypes?: readonly string[];
254
+ masks?: readonly string[];
255
+ tags?: readonly string[];
256
+ allowTargetBlank?: boolean;
257
+ };
258
+ }) | ({
259
+ type: "Number";
260
+ } & {
261
+ fieldset?: string | null | undefined;
262
+ config?: {
263
+ label?: string | null | undefined;
264
+ placeholder?: string;
265
+ min?: number;
266
+ max?: number;
267
+ step?: number;
268
+ };
269
+ }) | ({
270
+ type: "Range";
271
+ } & {
272
+ fieldset?: string | null | undefined;
273
+ config?: {
274
+ label?: string | null | undefined;
275
+ placeholder?: string;
276
+ min?: number;
277
+ max?: number;
278
+ step?: number;
279
+ };
280
+ }) | ({
281
+ type: "StructuredText";
282
+ } & {
283
+ fieldset?: string | null | undefined;
284
+ config?: {
285
+ label?: string | null | undefined;
286
+ placeholder?: string;
287
+ useAsTitle?: boolean;
288
+ single?: string;
289
+ multi?: string;
290
+ imageConstraint?: {
291
+ width?: number | null;
292
+ height?: number | null;
293
+ };
294
+ labels?: readonly string[];
295
+ allowTargetBlank?: boolean;
296
+ };
297
+ }) | ({
298
+ type: "Select";
299
+ } & {
300
+ fieldset?: string | null | undefined;
301
+ config?: {
302
+ label?: string | null | undefined;
303
+ placeholder?: string;
304
+ default_value?: string;
305
+ options?: readonly string[];
306
+ };
307
+ }) | ({
308
+ type: "Separator";
309
+ } & {
310
+ config?: {
311
+ label?: string | null | undefined;
312
+ };
313
+ }) | ({
314
+ type: "Text";
315
+ } & {
316
+ fieldset?: string | null | undefined;
317
+ config?: {
318
+ label?: string | null | undefined;
319
+ useAsTitle?: boolean;
320
+ placeholder?: string;
321
+ };
322
+ }) | ({
323
+ type: "Timestamp";
324
+ } & {
325
+ fieldset?: string | null | undefined;
326
+ config?: {
327
+ label?: string | null | undefined;
328
+ placeholder?: string;
329
+ default?: string;
330
+ };
331
+ });
332
+ };
333
+ }) | undefined, variationB?: ({
334
+ id: string;
335
+ name: string;
336
+ description: string;
337
+ imageUrl: string;
338
+ docURL: string;
339
+ version: string;
340
+ } & {
341
+ display?: string;
342
+ primary?: {
343
+ [x: string]: ({
344
+ type: "Boolean";
345
+ } & {
346
+ config?: {
347
+ label?: string | null | undefined;
348
+ default_value?: boolean;
349
+ placeholder_true?: string;
350
+ placeholder_false?: string;
351
+ };
352
+ }) | ({
353
+ type: "Color";
354
+ } & {
355
+ fieldset?: string | null | undefined;
356
+ config?: {
357
+ label?: string | null | undefined;
358
+ placeholder?: string;
359
+ };
360
+ }) | ({
361
+ type: "Date";
362
+ } & {
363
+ fieldset?: string | null | undefined;
364
+ config?: {
365
+ label?: string | null | undefined;
366
+ placeholder?: string;
367
+ default?: string;
368
+ };
369
+ }) | ({
370
+ type: "Embed";
371
+ } & {
372
+ fieldset?: string | null | undefined;
373
+ config?: {
374
+ label?: string | null | undefined;
375
+ placeholder?: string;
376
+ useAsTitle?: boolean;
377
+ };
378
+ }) | ({
379
+ type: "GeoPoint";
380
+ } & {
381
+ fieldset?: string | null | undefined;
382
+ config?: {
383
+ label?: string | null | undefined;
384
+ };
385
+ }) | ({
386
+ type: "Image";
387
+ } & {
388
+ fieldset?: string | null | undefined;
389
+ config?: {
390
+ label?: string | null | undefined;
391
+ placeholder?: string;
392
+ constraint?: {
393
+ width?: number | null;
394
+ height?: number | null;
395
+ };
396
+ thumbnails?: readonly ({
397
+ name: string;
398
+ } & {
399
+ width?: number | null;
400
+ height?: number | null;
401
+ })[];
402
+ };
403
+ }) | ({
404
+ type: "IntegrationFields";
405
+ } & {
406
+ fieldset?: string | null | undefined;
407
+ config?: {
408
+ label?: string | null | undefined;
409
+ placeholder?: string;
410
+ catalog?: string;
411
+ };
412
+ }) | ({
413
+ type: "Link";
414
+ } & {
415
+ fieldset?: string | null | undefined;
416
+ config?: {
417
+ label?: string | null | undefined;
418
+ useAsTitle?: boolean;
419
+ placeholder?: string;
420
+ select?: "web" | "media" | "document" | null;
421
+ customtypes?: readonly string[];
422
+ masks?: readonly string[];
423
+ tags?: readonly string[];
424
+ allowTargetBlank?: boolean;
425
+ };
426
+ }) | ({
427
+ type: "Number";
428
+ } & {
429
+ fieldset?: string | null | undefined;
430
+ config?: {
431
+ label?: string | null | undefined;
432
+ placeholder?: string;
433
+ min?: number;
434
+ max?: number;
435
+ step?: number;
436
+ };
437
+ }) | ({
438
+ type: "Range";
439
+ } & {
440
+ fieldset?: string | null | undefined;
441
+ config?: {
442
+ label?: string | null | undefined;
443
+ placeholder?: string;
444
+ min?: number;
445
+ max?: number;
446
+ step?: number;
447
+ };
448
+ }) | ({
449
+ type: "StructuredText";
450
+ } & {
451
+ fieldset?: string | null | undefined;
452
+ config?: {
453
+ label?: string | null | undefined;
454
+ placeholder?: string;
455
+ useAsTitle?: boolean;
456
+ single?: string;
457
+ multi?: string;
458
+ imageConstraint?: {
459
+ width?: number | null;
460
+ height?: number | null;
461
+ };
462
+ labels?: readonly string[];
463
+ allowTargetBlank?: boolean;
464
+ };
465
+ }) | ({
466
+ type: "Select";
467
+ } & {
468
+ fieldset?: string | null | undefined;
469
+ config?: {
470
+ label?: string | null | undefined;
471
+ placeholder?: string;
472
+ default_value?: string;
473
+ options?: readonly string[];
474
+ };
475
+ }) | ({
476
+ type: "Separator";
477
+ } & {
478
+ config?: {
479
+ label?: string | null | undefined;
480
+ };
481
+ }) | ({
482
+ type: "Text";
483
+ } & {
484
+ fieldset?: string | null | undefined;
485
+ config?: {
486
+ label?: string | null | undefined;
487
+ useAsTitle?: boolean;
488
+ placeholder?: string;
489
+ };
490
+ }) | ({
491
+ type: "Timestamp";
492
+ } & {
493
+ fieldset?: string | null | undefined;
494
+ config?: {
495
+ label?: string | null | undefined;
496
+ placeholder?: string;
497
+ default?: string;
498
+ };
499
+ });
500
+ };
501
+ items?: {
502
+ [x: string]: ({
503
+ type: "Boolean";
504
+ } & {
505
+ config?: {
506
+ label?: string | null | undefined;
507
+ default_value?: boolean;
508
+ placeholder_true?: string;
509
+ placeholder_false?: string;
510
+ };
511
+ }) | ({
512
+ type: "Color";
513
+ } & {
514
+ fieldset?: string | null | undefined;
515
+ config?: {
516
+ label?: string | null | undefined;
517
+ placeholder?: string;
518
+ };
519
+ }) | ({
520
+ type: "Date";
521
+ } & {
522
+ fieldset?: string | null | undefined;
523
+ config?: {
524
+ label?: string | null | undefined;
525
+ placeholder?: string;
526
+ default?: string;
527
+ };
528
+ }) | ({
529
+ type: "Embed";
530
+ } & {
531
+ fieldset?: string | null | undefined;
532
+ config?: {
533
+ label?: string | null | undefined;
534
+ placeholder?: string;
535
+ useAsTitle?: boolean;
536
+ };
537
+ }) | ({
538
+ type: "GeoPoint";
539
+ } & {
540
+ fieldset?: string | null | undefined;
541
+ config?: {
542
+ label?: string | null | undefined;
543
+ };
544
+ }) | ({
545
+ type: "Image";
546
+ } & {
547
+ fieldset?: string | null | undefined;
548
+ config?: {
549
+ label?: string | null | undefined;
550
+ placeholder?: string;
551
+ constraint?: {
552
+ width?: number | null;
553
+ height?: number | null;
554
+ };
555
+ thumbnails?: readonly ({
556
+ name: string;
557
+ } & {
558
+ width?: number | null;
559
+ height?: number | null;
560
+ })[];
561
+ };
562
+ }) | ({
563
+ type: "IntegrationFields";
564
+ } & {
565
+ fieldset?: string | null | undefined;
566
+ config?: {
567
+ label?: string | null | undefined;
568
+ placeholder?: string;
569
+ catalog?: string;
570
+ };
571
+ }) | ({
572
+ type: "Link";
573
+ } & {
574
+ fieldset?: string | null | undefined;
575
+ config?: {
576
+ label?: string | null | undefined;
577
+ useAsTitle?: boolean;
578
+ placeholder?: string;
579
+ select?: "web" | "media" | "document" | null;
580
+ customtypes?: readonly string[];
581
+ masks?: readonly string[];
582
+ tags?: readonly string[];
583
+ allowTargetBlank?: boolean;
584
+ };
585
+ }) | ({
586
+ type: "Number";
587
+ } & {
588
+ fieldset?: string | null | undefined;
589
+ config?: {
590
+ label?: string | null | undefined;
591
+ placeholder?: string;
592
+ min?: number;
593
+ max?: number;
594
+ step?: number;
595
+ };
596
+ }) | ({
597
+ type: "Range";
598
+ } & {
599
+ fieldset?: string | null | undefined;
600
+ config?: {
601
+ label?: string | null | undefined;
602
+ placeholder?: string;
603
+ min?: number;
604
+ max?: number;
605
+ step?: number;
606
+ };
607
+ }) | ({
608
+ type: "StructuredText";
609
+ } & {
610
+ fieldset?: string | null | undefined;
611
+ config?: {
612
+ label?: string | null | undefined;
613
+ placeholder?: string;
614
+ useAsTitle?: boolean;
615
+ single?: string;
616
+ multi?: string;
617
+ imageConstraint?: {
618
+ width?: number | null;
619
+ height?: number | null;
620
+ };
621
+ labels?: readonly string[];
622
+ allowTargetBlank?: boolean;
623
+ };
624
+ }) | ({
625
+ type: "Select";
626
+ } & {
627
+ fieldset?: string | null | undefined;
628
+ config?: {
629
+ label?: string | null | undefined;
630
+ placeholder?: string;
631
+ default_value?: string;
632
+ options?: readonly string[];
633
+ };
634
+ }) | ({
635
+ type: "Separator";
636
+ } & {
637
+ config?: {
638
+ label?: string | null | undefined;
639
+ };
640
+ }) | ({
641
+ type: "Text";
642
+ } & {
643
+ fieldset?: string | null | undefined;
644
+ config?: {
645
+ label?: string | null | undefined;
646
+ useAsTitle?: boolean;
647
+ placeholder?: string;
648
+ };
649
+ }) | ({
650
+ type: "Timestamp";
651
+ } & {
652
+ fieldset?: string | null | undefined;
653
+ config?: {
654
+ label?: string | null | undefined;
655
+ placeholder?: string;
656
+ default?: string;
657
+ };
658
+ });
659
+ };
660
+ }) | undefined): VariationDiff | undefined;
661
+ };
662
+ export {};