@prismicio/types-internal 2.4.0-alpha.1 → 2.4.0-alpha.3
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/lib/content/Document.d.ts +0 -72
- package/lib/content/fields/GroupContent.d.ts +0 -15
- package/lib/content/fields/WidgetContent.d.ts +0 -72
- package/lib/content/fields/nestable/ImageContent.d.ts +0 -9
- package/lib/content/fields/nestable/ImageContent.js +0 -1
- package/lib/content/fields/nestable/NestableContent.d.ts +0 -9
- package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +0 -4
- package/lib/content/fields/nestable/RichTextContent/index.d.ts +0 -4
- package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +0 -18
- package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +0 -6
- package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +0 -18
- package/lib/content/fields/slices/Slice/SharedSliceContent.js +3 -1
- package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +0 -18
- package/lib/content/fields/slices/Slice/index.d.ts +0 -36
- package/lib/content/fields/slices/SliceItem.d.ts +0 -36
- package/lib/content/fields/slices/SlicesContent.d.ts +0 -54
- package/lib/customtypes/CustomType.d.ts +169 -14
- package/lib/customtypes/Section.d.ts +169 -14
- package/lib/customtypes/diff/SharedSlice.d.ts +338 -4
- package/lib/customtypes/diff/Variation.d.ts +340 -5
- package/lib/customtypes/widgets/Group.d.ts +0 -2
- package/lib/customtypes/widgets/Widget.d.ts +169 -16
- package/lib/customtypes/widgets/nestable/Image.d.ts +0 -2
- package/lib/customtypes/widgets/nestable/Image.js +0 -1
- package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +0 -1
- package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +0 -2
- package/lib/customtypes/widgets/slices/LegacySlice.d.ts +0 -2
- package/lib/customtypes/widgets/slices/SharedSlice.d.ts +336 -6
- package/lib/customtypes/widgets/slices/SharedSlice.js +2 -1
- package/lib/customtypes/widgets/slices/SlicePrimaryWidget.d.ts +327 -0
- package/lib/customtypes/widgets/slices/SlicePrimaryWidget.js +8 -0
- package/lib/customtypes/widgets/slices/SliceWidget.d.ts +327 -0
- package/lib/customtypes/widgets/slices/SliceWidget.js +8 -0
- package/lib/customtypes/widgets/slices/Slices.d.ts +338 -24
- package/lib/customtypes/widgets/slices/index.d.ts +1 -0
- package/lib/customtypes/widgets/slices/index.js +1 -0
- package/package.json +1 -1
- package/src/content/fields/nestable/ImageContent.ts +0 -1
- package/src/content/fields/slices/Slice/SharedSliceContent.ts +12 -2
- package/src/customtypes/diff/Variation.ts +6 -5
- package/src/customtypes/widgets/nestable/Image.ts +0 -1
- package/src/customtypes/widgets/slices/SharedSlice.ts +2 -1
- package/src/customtypes/widgets/slices/SlicePrimaryWidget.ts +9 -0
- package/src/customtypes/widgets/slices/index.ts +1 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { NestableWidget } from "../widgets/nestable";
|
|
2
|
+
import type { SlicePrimaryWidget } from "../widgets/slices";
|
|
2
3
|
import type { Variation } from "../widgets/slices";
|
|
3
4
|
import { type DiffChange } from "./Changes";
|
|
4
5
|
export declare type VariationMetadata = Omit<Variation, "primary" | "items">;
|
|
5
6
|
export declare type VariationDiff = DiffChange<Variation, Partial<VariationMetadata> & {
|
|
6
|
-
primary?: Record<string, DiffChange<
|
|
7
|
+
primary?: Record<string, DiffChange<SlicePrimaryWidget, SlicePrimaryWidget>>;
|
|
7
8
|
items?: Record<string, DiffChange<NestableWidget, NestableWidget>>;
|
|
8
9
|
}>;
|
|
9
10
|
export declare const VariationComparator: {
|
|
@@ -76,7 +77,6 @@ export declare const VariationComparator: {
|
|
|
76
77
|
width?: number | null;
|
|
77
78
|
height?: number | null;
|
|
78
79
|
})[];
|
|
79
|
-
allowCaption?: boolean;
|
|
80
80
|
};
|
|
81
81
|
}) | ({
|
|
82
82
|
type: "IntegrationFields";
|
|
@@ -174,6 +174,175 @@ export declare const VariationComparator: {
|
|
|
174
174
|
placeholder?: string;
|
|
175
175
|
default?: string;
|
|
176
176
|
};
|
|
177
|
+
}) | ({
|
|
178
|
+
type: "Group";
|
|
179
|
+
} & {
|
|
180
|
+
fieldset?: string | null | undefined;
|
|
181
|
+
icon?: string;
|
|
182
|
+
description?: string;
|
|
183
|
+
config?: {
|
|
184
|
+
label?: string | null | undefined;
|
|
185
|
+
repeat?: boolean;
|
|
186
|
+
fields?: {
|
|
187
|
+
[x: string]: ({
|
|
188
|
+
type: "Boolean";
|
|
189
|
+
} & {
|
|
190
|
+
config?: {
|
|
191
|
+
label?: string | null | undefined;
|
|
192
|
+
default_value?: boolean;
|
|
193
|
+
placeholder_true?: string;
|
|
194
|
+
placeholder_false?: string;
|
|
195
|
+
};
|
|
196
|
+
}) | ({
|
|
197
|
+
type: "Color";
|
|
198
|
+
} & {
|
|
199
|
+
fieldset?: string | null | undefined;
|
|
200
|
+
config?: {
|
|
201
|
+
label?: string | null | undefined;
|
|
202
|
+
placeholder?: string;
|
|
203
|
+
};
|
|
204
|
+
}) | ({
|
|
205
|
+
type: "Date";
|
|
206
|
+
} & {
|
|
207
|
+
fieldset?: string | null | undefined;
|
|
208
|
+
config?: {
|
|
209
|
+
label?: string | null | undefined;
|
|
210
|
+
placeholder?: string;
|
|
211
|
+
default?: string;
|
|
212
|
+
};
|
|
213
|
+
}) | ({
|
|
214
|
+
type: "Embed";
|
|
215
|
+
} & {
|
|
216
|
+
fieldset?: string | null | undefined;
|
|
217
|
+
config?: {
|
|
218
|
+
label?: string | null | undefined;
|
|
219
|
+
placeholder?: string;
|
|
220
|
+
useAsTitle?: boolean;
|
|
221
|
+
};
|
|
222
|
+
}) | ({
|
|
223
|
+
type: "GeoPoint";
|
|
224
|
+
} & {
|
|
225
|
+
fieldset?: string | null | undefined;
|
|
226
|
+
config?: {
|
|
227
|
+
label?: string | null | undefined;
|
|
228
|
+
};
|
|
229
|
+
}) | ({
|
|
230
|
+
type: "Image";
|
|
231
|
+
} & {
|
|
232
|
+
fieldset?: string | null | undefined;
|
|
233
|
+
config?: {
|
|
234
|
+
label?: string | null | undefined;
|
|
235
|
+
placeholder?: string;
|
|
236
|
+
constraint?: {
|
|
237
|
+
width?: number | null;
|
|
238
|
+
height?: number | null;
|
|
239
|
+
};
|
|
240
|
+
thumbnails?: readonly ({
|
|
241
|
+
name: string;
|
|
242
|
+
} & {
|
|
243
|
+
width?: number | null;
|
|
244
|
+
height?: number | null;
|
|
245
|
+
})[];
|
|
246
|
+
};
|
|
247
|
+
}) | ({
|
|
248
|
+
type: "IntegrationFields";
|
|
249
|
+
} & {
|
|
250
|
+
fieldset?: string | null | undefined;
|
|
251
|
+
config?: {
|
|
252
|
+
label?: string | null | undefined;
|
|
253
|
+
placeholder?: string;
|
|
254
|
+
catalog?: string;
|
|
255
|
+
};
|
|
256
|
+
}) | ({
|
|
257
|
+
type: "Link";
|
|
258
|
+
} & {
|
|
259
|
+
fieldset?: string | null | undefined;
|
|
260
|
+
config?: {
|
|
261
|
+
label?: string | null | undefined;
|
|
262
|
+
useAsTitle?: boolean;
|
|
263
|
+
placeholder?: string;
|
|
264
|
+
select?: "media" | "document" | "web" | null;
|
|
265
|
+
customtypes?: readonly string[];
|
|
266
|
+
masks?: readonly string[];
|
|
267
|
+
tags?: readonly string[];
|
|
268
|
+
allowTargetBlank?: boolean;
|
|
269
|
+
};
|
|
270
|
+
}) | ({
|
|
271
|
+
type: "Number";
|
|
272
|
+
} & {
|
|
273
|
+
fieldset?: string | null | undefined;
|
|
274
|
+
config?: {
|
|
275
|
+
label?: string | null | undefined;
|
|
276
|
+
placeholder?: string;
|
|
277
|
+
min?: number;
|
|
278
|
+
max?: number;
|
|
279
|
+
step?: number;
|
|
280
|
+
};
|
|
281
|
+
}) | ({
|
|
282
|
+
type: "Range";
|
|
283
|
+
} & {
|
|
284
|
+
fieldset?: string | null | undefined;
|
|
285
|
+
config?: {
|
|
286
|
+
label?: string | null | undefined;
|
|
287
|
+
placeholder?: string;
|
|
288
|
+
min?: number;
|
|
289
|
+
max?: number;
|
|
290
|
+
step?: number;
|
|
291
|
+
};
|
|
292
|
+
}) | ({
|
|
293
|
+
type: "StructuredText";
|
|
294
|
+
} & {
|
|
295
|
+
fieldset?: string | null | undefined;
|
|
296
|
+
config?: {
|
|
297
|
+
label?: string | null | undefined;
|
|
298
|
+
placeholder?: string;
|
|
299
|
+
useAsTitle?: boolean;
|
|
300
|
+
single?: string;
|
|
301
|
+
multi?: string;
|
|
302
|
+
imageConstraint?: {
|
|
303
|
+
width?: number | null;
|
|
304
|
+
height?: number | null;
|
|
305
|
+
};
|
|
306
|
+
labels?: readonly string[];
|
|
307
|
+
allowTargetBlank?: boolean;
|
|
308
|
+
};
|
|
309
|
+
}) | ({
|
|
310
|
+
type: "Select";
|
|
311
|
+
} & {
|
|
312
|
+
fieldset?: string | null | undefined;
|
|
313
|
+
config?: {
|
|
314
|
+
label?: string | null | undefined;
|
|
315
|
+
placeholder?: string;
|
|
316
|
+
default_value?: string;
|
|
317
|
+
options?: readonly string[];
|
|
318
|
+
};
|
|
319
|
+
}) | ({
|
|
320
|
+
type: "Separator";
|
|
321
|
+
} & {
|
|
322
|
+
config?: {
|
|
323
|
+
label?: string | null | undefined;
|
|
324
|
+
};
|
|
325
|
+
}) | ({
|
|
326
|
+
type: "Text";
|
|
327
|
+
} & {
|
|
328
|
+
fieldset?: string | null | undefined;
|
|
329
|
+
config?: {
|
|
330
|
+
label?: string | null | undefined;
|
|
331
|
+
useAsTitle?: boolean;
|
|
332
|
+
placeholder?: string;
|
|
333
|
+
};
|
|
334
|
+
}) | ({
|
|
335
|
+
type: "Timestamp";
|
|
336
|
+
} & {
|
|
337
|
+
fieldset?: string | null | undefined;
|
|
338
|
+
config?: {
|
|
339
|
+
label?: string | null | undefined;
|
|
340
|
+
placeholder?: string;
|
|
341
|
+
default?: string;
|
|
342
|
+
};
|
|
343
|
+
});
|
|
344
|
+
};
|
|
345
|
+
};
|
|
177
346
|
});
|
|
178
347
|
};
|
|
179
348
|
items?: {
|
|
@@ -236,7 +405,6 @@ export declare const VariationComparator: {
|
|
|
236
405
|
width?: number | null;
|
|
237
406
|
height?: number | null;
|
|
238
407
|
})[];
|
|
239
|
-
allowCaption?: boolean;
|
|
240
408
|
};
|
|
241
409
|
}) | ({
|
|
242
410
|
type: "IntegrationFields";
|
|
@@ -405,7 +573,6 @@ export declare const VariationComparator: {
|
|
|
405
573
|
width?: number | null;
|
|
406
574
|
height?: number | null;
|
|
407
575
|
})[];
|
|
408
|
-
allowCaption?: boolean;
|
|
409
576
|
};
|
|
410
577
|
}) | ({
|
|
411
578
|
type: "IntegrationFields";
|
|
@@ -503,6 +670,175 @@ export declare const VariationComparator: {
|
|
|
503
670
|
placeholder?: string;
|
|
504
671
|
default?: string;
|
|
505
672
|
};
|
|
673
|
+
}) | ({
|
|
674
|
+
type: "Group";
|
|
675
|
+
} & {
|
|
676
|
+
fieldset?: string | null | undefined;
|
|
677
|
+
icon?: string;
|
|
678
|
+
description?: string;
|
|
679
|
+
config?: {
|
|
680
|
+
label?: string | null | undefined;
|
|
681
|
+
repeat?: boolean;
|
|
682
|
+
fields?: {
|
|
683
|
+
[x: string]: ({
|
|
684
|
+
type: "Boolean";
|
|
685
|
+
} & {
|
|
686
|
+
config?: {
|
|
687
|
+
label?: string | null | undefined;
|
|
688
|
+
default_value?: boolean;
|
|
689
|
+
placeholder_true?: string;
|
|
690
|
+
placeholder_false?: string;
|
|
691
|
+
};
|
|
692
|
+
}) | ({
|
|
693
|
+
type: "Color";
|
|
694
|
+
} & {
|
|
695
|
+
fieldset?: string | null | undefined;
|
|
696
|
+
config?: {
|
|
697
|
+
label?: string | null | undefined;
|
|
698
|
+
placeholder?: string;
|
|
699
|
+
};
|
|
700
|
+
}) | ({
|
|
701
|
+
type: "Date";
|
|
702
|
+
} & {
|
|
703
|
+
fieldset?: string | null | undefined;
|
|
704
|
+
config?: {
|
|
705
|
+
label?: string | null | undefined;
|
|
706
|
+
placeholder?: string;
|
|
707
|
+
default?: string;
|
|
708
|
+
};
|
|
709
|
+
}) | ({
|
|
710
|
+
type: "Embed";
|
|
711
|
+
} & {
|
|
712
|
+
fieldset?: string | null | undefined;
|
|
713
|
+
config?: {
|
|
714
|
+
label?: string | null | undefined;
|
|
715
|
+
placeholder?: string;
|
|
716
|
+
useAsTitle?: boolean;
|
|
717
|
+
};
|
|
718
|
+
}) | ({
|
|
719
|
+
type: "GeoPoint";
|
|
720
|
+
} & {
|
|
721
|
+
fieldset?: string | null | undefined;
|
|
722
|
+
config?: {
|
|
723
|
+
label?: string | null | undefined;
|
|
724
|
+
};
|
|
725
|
+
}) | ({
|
|
726
|
+
type: "Image";
|
|
727
|
+
} & {
|
|
728
|
+
fieldset?: string | null | undefined;
|
|
729
|
+
config?: {
|
|
730
|
+
label?: string | null | undefined;
|
|
731
|
+
placeholder?: string;
|
|
732
|
+
constraint?: {
|
|
733
|
+
width?: number | null;
|
|
734
|
+
height?: number | null;
|
|
735
|
+
};
|
|
736
|
+
thumbnails?: readonly ({
|
|
737
|
+
name: string;
|
|
738
|
+
} & {
|
|
739
|
+
width?: number | null;
|
|
740
|
+
height?: number | null;
|
|
741
|
+
})[];
|
|
742
|
+
};
|
|
743
|
+
}) | ({
|
|
744
|
+
type: "IntegrationFields";
|
|
745
|
+
} & {
|
|
746
|
+
fieldset?: string | null | undefined;
|
|
747
|
+
config?: {
|
|
748
|
+
label?: string | null | undefined;
|
|
749
|
+
placeholder?: string;
|
|
750
|
+
catalog?: string;
|
|
751
|
+
};
|
|
752
|
+
}) | ({
|
|
753
|
+
type: "Link";
|
|
754
|
+
} & {
|
|
755
|
+
fieldset?: string | null | undefined;
|
|
756
|
+
config?: {
|
|
757
|
+
label?: string | null | undefined;
|
|
758
|
+
useAsTitle?: boolean;
|
|
759
|
+
placeholder?: string;
|
|
760
|
+
select?: "media" | "document" | "web" | null;
|
|
761
|
+
customtypes?: readonly string[];
|
|
762
|
+
masks?: readonly string[];
|
|
763
|
+
tags?: readonly string[];
|
|
764
|
+
allowTargetBlank?: boolean;
|
|
765
|
+
};
|
|
766
|
+
}) | ({
|
|
767
|
+
type: "Number";
|
|
768
|
+
} & {
|
|
769
|
+
fieldset?: string | null | undefined;
|
|
770
|
+
config?: {
|
|
771
|
+
label?: string | null | undefined;
|
|
772
|
+
placeholder?: string;
|
|
773
|
+
min?: number;
|
|
774
|
+
max?: number;
|
|
775
|
+
step?: number;
|
|
776
|
+
};
|
|
777
|
+
}) | ({
|
|
778
|
+
type: "Range";
|
|
779
|
+
} & {
|
|
780
|
+
fieldset?: string | null | undefined;
|
|
781
|
+
config?: {
|
|
782
|
+
label?: string | null | undefined;
|
|
783
|
+
placeholder?: string;
|
|
784
|
+
min?: number;
|
|
785
|
+
max?: number;
|
|
786
|
+
step?: number;
|
|
787
|
+
};
|
|
788
|
+
}) | ({
|
|
789
|
+
type: "StructuredText";
|
|
790
|
+
} & {
|
|
791
|
+
fieldset?: string | null | undefined;
|
|
792
|
+
config?: {
|
|
793
|
+
label?: string | null | undefined;
|
|
794
|
+
placeholder?: string;
|
|
795
|
+
useAsTitle?: boolean;
|
|
796
|
+
single?: string;
|
|
797
|
+
multi?: string;
|
|
798
|
+
imageConstraint?: {
|
|
799
|
+
width?: number | null;
|
|
800
|
+
height?: number | null;
|
|
801
|
+
};
|
|
802
|
+
labels?: readonly string[];
|
|
803
|
+
allowTargetBlank?: boolean;
|
|
804
|
+
};
|
|
805
|
+
}) | ({
|
|
806
|
+
type: "Select";
|
|
807
|
+
} & {
|
|
808
|
+
fieldset?: string | null | undefined;
|
|
809
|
+
config?: {
|
|
810
|
+
label?: string | null | undefined;
|
|
811
|
+
placeholder?: string;
|
|
812
|
+
default_value?: string;
|
|
813
|
+
options?: readonly string[];
|
|
814
|
+
};
|
|
815
|
+
}) | ({
|
|
816
|
+
type: "Separator";
|
|
817
|
+
} & {
|
|
818
|
+
config?: {
|
|
819
|
+
label?: string | null | undefined;
|
|
820
|
+
};
|
|
821
|
+
}) | ({
|
|
822
|
+
type: "Text";
|
|
823
|
+
} & {
|
|
824
|
+
fieldset?: string | null | undefined;
|
|
825
|
+
config?: {
|
|
826
|
+
label?: string | null | undefined;
|
|
827
|
+
useAsTitle?: boolean;
|
|
828
|
+
placeholder?: string;
|
|
829
|
+
};
|
|
830
|
+
}) | ({
|
|
831
|
+
type: "Timestamp";
|
|
832
|
+
} & {
|
|
833
|
+
fieldset?: string | null | undefined;
|
|
834
|
+
config?: {
|
|
835
|
+
label?: string | null | undefined;
|
|
836
|
+
placeholder?: string;
|
|
837
|
+
default?: string;
|
|
838
|
+
};
|
|
839
|
+
});
|
|
840
|
+
};
|
|
841
|
+
};
|
|
506
842
|
});
|
|
507
843
|
};
|
|
508
844
|
items?: {
|
|
@@ -565,7 +901,6 @@ export declare const VariationComparator: {
|
|
|
565
901
|
width?: number | null;
|
|
566
902
|
height?: number | null;
|
|
567
903
|
})[];
|
|
568
|
-
allowCaption?: boolean;
|
|
569
904
|
};
|
|
570
905
|
}) | ({
|
|
571
906
|
type: "IntegrationFields";
|
|
@@ -149,7 +149,6 @@ export declare const GroupConfig: t.ExactC<t.PartialC<{
|
|
|
149
149
|
width: t.Type<number | null, unknown, unknown>;
|
|
150
150
|
height: t.Type<number | null, unknown, unknown>;
|
|
151
151
|
}>]>>>;
|
|
152
|
-
allowCaption: t.BooleanC;
|
|
153
152
|
}>>;
|
|
154
153
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
155
154
|
type: t.LiteralC<"IntegrationFields">;
|
|
@@ -318,7 +317,6 @@ export declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
318
317
|
width: t.Type<number | null, unknown, unknown>;
|
|
319
318
|
height: t.Type<number | null, unknown, unknown>;
|
|
320
319
|
}>]>>>;
|
|
321
|
-
allowCaption: t.BooleanC;
|
|
322
320
|
}>>;
|
|
323
321
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
324
322
|
type: t.LiteralC<"IntegrationFields">;
|