@prismicio/types-internal 2.4.1 → 2.5.0-alpha.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.
Files changed (43) hide show
  1. package/lib/content/Document.d.ts +3982 -7936
  2. package/lib/content/fields/GroupContent.d.ts +17 -1754
  3. package/lib/content/fields/GroupContent.js +59 -21
  4. package/lib/content/fields/WidgetContent.d.ts +3375 -7328
  5. package/lib/content/fields/nestable/NestableContent.d.ts +3 -145
  6. package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +4 -212
  7. package/lib/content/fields/nestable/RichTextContent/Blocks.js +2 -0
  8. package/lib/content/fields/nestable/RichTextContent/index.d.ts +4 -184
  9. package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +10 -294
  10. package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +5 -385
  11. package/lib/content/fields/slices/Slice/RepeatableContent.js +4 -1
  12. package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +19 -1337
  13. package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +7 -1182
  14. package/lib/content/fields/slices/Slice/SlicePrimaryContent.d.ts +7 -1182
  15. package/lib/content/fields/slices/Slice/index.d.ts +991 -2943
  16. package/lib/content/fields/slices/SliceItem.d.ts +155 -2107
  17. package/lib/content/fields/slices/SlicesContent.d.ts +1134 -3912
  18. package/lib/content/fields/withDefaultValues.d.ts +4 -3
  19. package/lib/content/fields/withDefaultValues.js +17 -1
  20. package/lib/customtypes/CustomType.d.ts +70 -915
  21. package/lib/customtypes/Section.d.ts +70 -915
  22. package/lib/customtypes/diff/SharedSlice.d.ts +2 -340
  23. package/lib/customtypes/diff/Variation.d.ts +3 -340
  24. package/lib/customtypes/diff/Widgets.d.ts +1 -1
  25. package/lib/customtypes/widgets/Group.d.ts +15 -331
  26. package/lib/customtypes/widgets/Group.js +22 -5
  27. package/lib/customtypes/widgets/Widget.d.ts +7 -1014
  28. package/lib/customtypes/widgets/slices/LegacySlice.d.ts +2 -168
  29. package/lib/customtypes/widgets/slices/SharedSlice.d.ts +2 -336
  30. package/lib/customtypes/widgets/slices/SlicePrimaryWidget.d.ts +3 -338
  31. package/lib/customtypes/widgets/slices/Slices.d.ts +7 -1184
  32. package/package.json +5 -5
  33. package/src/content/fields/GroupContent.ts +101 -31
  34. package/src/content/fields/nestable/RichTextContent/Blocks.ts +3 -1
  35. package/src/content/fields/slices/Slice/RepeatableContent.ts +9 -2
  36. package/src/content/fields/withDefaultValues.ts +27 -3
  37. package/src/customtypes/diff/Variation.ts +4 -2
  38. package/src/customtypes/diff/Widgets.ts +1 -7
  39. package/src/customtypes/widgets/Group.ts +60 -20
  40. package/lib/content/fields/nestable/RichTextContent/TextBlock.d.ts +0 -727
  41. package/lib/content/fields/nestable/RichTextContent/TextBlock.js +0 -80
  42. package/lib/customtypes/widgets/slices/SliceWidget.d.ts +0 -327
  43. package/lib/customtypes/widgets/slices/SliceWidget.js +0 -8
@@ -1,3 +1,4 @@
1
+ import { Group } from "../widgets/Group";
1
2
  import type { Variation } from "../widgets/slices";
2
3
  import { type DiffChange } from "./Changes";
3
4
  import type { NestableWidgetDiff, SlicePrimaryWidgetDiff } from "./Widgets";
@@ -173,176 +174,7 @@ export declare const VariationComparator: {
173
174
  placeholder?: string;
174
175
  default?: string;
175
176
  };
176
- }) | ({
177
- type: "Group";
178
- } & {
179
- fieldset?: string | null | undefined;
180
- icon?: string;
181
- description?: string;
182
- config?: {
183
- label?: string | null | undefined;
184
- repeat?: boolean;
185
- fields?: {
186
- [x: string]: ({
187
- type: "Boolean";
188
- } & {
189
- config?: {
190
- label?: string | null | undefined;
191
- default_value?: boolean;
192
- placeholder_true?: string;
193
- placeholder_false?: string;
194
- };
195
- }) | ({
196
- type: "Color";
197
- } & {
198
- fieldset?: string | null | undefined;
199
- config?: {
200
- label?: string | null | undefined;
201
- placeholder?: string;
202
- };
203
- }) | ({
204
- type: "Date";
205
- } & {
206
- fieldset?: string | null | undefined;
207
- config?: {
208
- label?: string | null | undefined;
209
- placeholder?: string;
210
- default?: string;
211
- };
212
- }) | ({
213
- type: "Embed";
214
- } & {
215
- fieldset?: string | null | undefined;
216
- config?: {
217
- label?: string | null | undefined;
218
- placeholder?: string;
219
- useAsTitle?: boolean;
220
- };
221
- }) | ({
222
- type: "GeoPoint";
223
- } & {
224
- fieldset?: string | null | undefined;
225
- config?: {
226
- label?: string | null | undefined;
227
- };
228
- }) | ({
229
- type: "Image";
230
- } & {
231
- fieldset?: string | null | undefined;
232
- config?: {
233
- label?: string | null | undefined;
234
- placeholder?: string;
235
- constraint?: {
236
- width?: number | null;
237
- height?: number | null;
238
- };
239
- thumbnails?: readonly ({
240
- name: string;
241
- } & {
242
- width?: number | null;
243
- height?: number | null;
244
- })[];
245
- };
246
- }) | ({
247
- type: "IntegrationFields";
248
- } & {
249
- fieldset?: string | null | undefined;
250
- config?: {
251
- label?: string | null | undefined;
252
- placeholder?: string;
253
- catalog?: string;
254
- };
255
- }) | ({
256
- type: "Link";
257
- } & {
258
- fieldset?: string | null | undefined;
259
- config?: {
260
- label?: string | null | undefined;
261
- useAsTitle?: boolean;
262
- placeholder?: string;
263
- select?: "media" | "document" | "web" | null;
264
- customtypes?: readonly string[];
265
- masks?: readonly string[];
266
- tags?: readonly string[];
267
- allowTargetBlank?: boolean;
268
- };
269
- }) | ({
270
- type: "Number";
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: "Range";
282
- } & {
283
- fieldset?: string | null | undefined;
284
- config?: {
285
- label?: string | null | undefined;
286
- placeholder?: string;
287
- min?: number;
288
- max?: number;
289
- step?: number;
290
- };
291
- }) | ({
292
- type: "StructuredText";
293
- } & {
294
- fieldset?: string | null | undefined;
295
- config?: {
296
- label?: string | null | undefined;
297
- placeholder?: string;
298
- useAsTitle?: boolean;
299
- single?: string;
300
- multi?: string;
301
- imageConstraint?: {
302
- width?: number | null;
303
- height?: number | null;
304
- };
305
- labels?: readonly string[];
306
- allowTargetBlank?: boolean;
307
- };
308
- }) | ({
309
- type: "Select";
310
- } & {
311
- fieldset?: string | null | undefined;
312
- config?: {
313
- label?: string | null | undefined;
314
- placeholder?: string;
315
- default_value?: string;
316
- options?: readonly string[];
317
- };
318
- }) | ({
319
- type: "Separator";
320
- } & {
321
- config?: {
322
- label?: string | null | undefined;
323
- };
324
- }) | ({
325
- type: "Text";
326
- } & {
327
- fieldset?: string | null | undefined;
328
- config?: {
329
- label?: string | null | undefined;
330
- useAsTitle?: boolean;
331
- placeholder?: string;
332
- };
333
- }) | ({
334
- type: "Timestamp";
335
- } & {
336
- fieldset?: string | null | undefined;
337
- config?: {
338
- label?: string | null | undefined;
339
- placeholder?: string;
340
- default?: string;
341
- };
342
- });
343
- };
344
- };
345
- });
177
+ }) | Group;
346
178
  };
347
179
  items?: {
348
180
  [x: string]: ({
@@ -669,176 +501,7 @@ export declare const VariationComparator: {
669
501
  placeholder?: string;
670
502
  default?: string;
671
503
  };
672
- }) | ({
673
- type: "Group";
674
- } & {
675
- fieldset?: string | null | undefined;
676
- icon?: string;
677
- description?: string;
678
- config?: {
679
- label?: string | null | undefined;
680
- repeat?: boolean;
681
- fields?: {
682
- [x: string]: ({
683
- type: "Boolean";
684
- } & {
685
- config?: {
686
- label?: string | null | undefined;
687
- default_value?: boolean;
688
- placeholder_true?: string;
689
- placeholder_false?: string;
690
- };
691
- }) | ({
692
- type: "Color";
693
- } & {
694
- fieldset?: string | null | undefined;
695
- config?: {
696
- label?: string | null | undefined;
697
- placeholder?: string;
698
- };
699
- }) | ({
700
- type: "Date";
701
- } & {
702
- fieldset?: string | null | undefined;
703
- config?: {
704
- label?: string | null | undefined;
705
- placeholder?: string;
706
- default?: string;
707
- };
708
- }) | ({
709
- type: "Embed";
710
- } & {
711
- fieldset?: string | null | undefined;
712
- config?: {
713
- label?: string | null | undefined;
714
- placeholder?: string;
715
- useAsTitle?: boolean;
716
- };
717
- }) | ({
718
- type: "GeoPoint";
719
- } & {
720
- fieldset?: string | null | undefined;
721
- config?: {
722
- label?: string | null | undefined;
723
- };
724
- }) | ({
725
- type: "Image";
726
- } & {
727
- fieldset?: string | null | undefined;
728
- config?: {
729
- label?: string | null | undefined;
730
- placeholder?: string;
731
- constraint?: {
732
- width?: number | null;
733
- height?: number | null;
734
- };
735
- thumbnails?: readonly ({
736
- name: string;
737
- } & {
738
- width?: number | null;
739
- height?: number | null;
740
- })[];
741
- };
742
- }) | ({
743
- type: "IntegrationFields";
744
- } & {
745
- fieldset?: string | null | undefined;
746
- config?: {
747
- label?: string | null | undefined;
748
- placeholder?: string;
749
- catalog?: string;
750
- };
751
- }) | ({
752
- type: "Link";
753
- } & {
754
- fieldset?: string | null | undefined;
755
- config?: {
756
- label?: string | null | undefined;
757
- useAsTitle?: boolean;
758
- placeholder?: string;
759
- select?: "media" | "document" | "web" | null;
760
- customtypes?: readonly string[];
761
- masks?: readonly string[];
762
- tags?: readonly string[];
763
- allowTargetBlank?: boolean;
764
- };
765
- }) | ({
766
- type: "Number";
767
- } & {
768
- fieldset?: string | null | undefined;
769
- config?: {
770
- label?: string | null | undefined;
771
- placeholder?: string;
772
- min?: number;
773
- max?: number;
774
- step?: number;
775
- };
776
- }) | ({
777
- type: "Range";
778
- } & {
779
- fieldset?: string | null | undefined;
780
- config?: {
781
- label?: string | null | undefined;
782
- placeholder?: string;
783
- min?: number;
784
- max?: number;
785
- step?: number;
786
- };
787
- }) | ({
788
- type: "StructuredText";
789
- } & {
790
- fieldset?: string | null | undefined;
791
- config?: {
792
- label?: string | null | undefined;
793
- placeholder?: string;
794
- useAsTitle?: boolean;
795
- single?: string;
796
- multi?: string;
797
- imageConstraint?: {
798
- width?: number | null;
799
- height?: number | null;
800
- };
801
- labels?: readonly string[];
802
- allowTargetBlank?: boolean;
803
- };
804
- }) | ({
805
- type: "Select";
806
- } & {
807
- fieldset?: string | null | undefined;
808
- config?: {
809
- label?: string | null | undefined;
810
- placeholder?: string;
811
- default_value?: string;
812
- options?: readonly string[];
813
- };
814
- }) | ({
815
- type: "Separator";
816
- } & {
817
- config?: {
818
- label?: string | null | undefined;
819
- };
820
- }) | ({
821
- type: "Text";
822
- } & {
823
- fieldset?: string | null | undefined;
824
- config?: {
825
- label?: string | null | undefined;
826
- useAsTitle?: boolean;
827
- placeholder?: string;
828
- };
829
- }) | ({
830
- type: "Timestamp";
831
- } & {
832
- fieldset?: string | null | undefined;
833
- config?: {
834
- label?: string | null | undefined;
835
- placeholder?: string;
836
- default?: string;
837
- };
838
- });
839
- };
840
- };
841
- });
504
+ }) | Group;
842
505
  };
843
506
  items?: {
844
507
  [x: string]: ({
@@ -4,7 +4,7 @@ import type { DiffChange } from "./Changes";
4
4
  export declare type NestableWidgetDiff = DiffChange<NestableWidget, NestableWidget>;
5
5
  export declare type GroupWidgetWithFieldsDiff = Omit<Group, "config"> & {
6
6
  config: Omit<Group["config"], "fields"> & {
7
- fields?: Record<string, NestableWidgetDiff>;
7
+ fields?: Record<string, GroupWidgetDiff | NestableWidgetDiff>;
8
8
  };
9
9
  };
10
10
  export declare type GroupWidgetDiff = DiffChange<GroupWidgetWithFieldsDiff, GroupWidgetWithFieldsDiff>;