@prismicio/types-internal 3.0.0 → 3.1.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 (53) hide show
  1. package/lib/_internal/utils.d.ts +3 -2
  2. package/lib/content/Document.d.ts +1561 -361
  3. package/lib/content/Document.js +11 -0
  4. package/lib/content/LegacyContentCtx.d.ts +2 -2
  5. package/lib/content/LegacyContentCtx.js +4 -1
  6. package/lib/content/fields/GroupContent.js +13 -0
  7. package/lib/content/fields/RepeatableContent.d.ts +34 -40
  8. package/lib/content/fields/WidgetContent.d.ts +1558 -358
  9. package/lib/content/fields/index.d.ts +1 -0
  10. package/lib/content/fields/index.js +1 -0
  11. package/lib/content/fields/nestable/LinkContent.d.ts +122 -146
  12. package/lib/content/fields/nestable/LinkContent.js +19 -39
  13. package/lib/content/fields/nestable/NestableContent.d.ts +254 -54
  14. package/lib/content/fields/nestable/NestableContent.js +8 -1
  15. package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +66 -66
  16. package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +510 -110
  17. package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +86 -18
  18. package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +512 -112
  19. package/lib/content/fields/slices/Slice/SharedSliceContent.js +20 -4
  20. package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +255 -55
  21. package/lib/content/fields/slices/Slice/SlicePrimaryContent.d.ts +255 -55
  22. package/lib/content/fields/slices/Slice/index.d.ts +855 -185
  23. package/lib/content/fields/slices/SliceItem.d.ts +854 -184
  24. package/lib/content/fields/slices/SlicesContent.d.ts +1278 -278
  25. package/lib/customtypes/CustomType.d.ts +18 -0
  26. package/lib/customtypes/Section.d.ts +18 -0
  27. package/lib/customtypes/diff/SharedSlice.d.ts +8 -0
  28. package/lib/customtypes/diff/Variation.d.ts +8 -0
  29. package/lib/customtypes/widgets/Group.d.ts +6 -0
  30. package/lib/customtypes/widgets/Widget.d.ts +21 -0
  31. package/lib/customtypes/widgets/nestable/Link.d.ts +10 -0
  32. package/lib/customtypes/widgets/nestable/Link.js +5 -0
  33. package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +1 -0
  34. package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +2 -0
  35. package/lib/customtypes/widgets/slices/LegacySlice.d.ts +2 -0
  36. package/lib/customtypes/widgets/slices/SharedSlice.d.ts +8 -0
  37. package/lib/customtypes/widgets/slices/SlicePrimaryWidget.d.ts +6 -0
  38. package/lib/customtypes/widgets/slices/Slices.d.ts +28 -0
  39. package/package.json +2 -1
  40. package/src/_internal/utils.ts +3 -1
  41. package/src/content/Document.ts +12 -0
  42. package/src/content/LegacyContentCtx.ts +4 -1
  43. package/src/content/fields/GroupContent.ts +13 -0
  44. package/src/content/fields/RepeatableContent.ts +147 -0
  45. package/src/content/fields/index.ts +1 -0
  46. package/src/content/fields/nestable/LinkContent.ts +19 -39
  47. package/src/content/fields/nestable/NestableContent.ts +12 -1
  48. package/src/content/fields/slices/Slice/SharedSliceContent.ts +18 -0
  49. package/src/customtypes/widgets/nestable/Link.ts +6 -0
  50. package/lib/content/fields/nestable/RichTextContent/TextBlock.d.ts +0 -727
  51. package/lib/content/fields/nestable/RichTextContent/TextBlock.js +0 -80
  52. package/lib/customtypes/widgets/slices/SliceWidget.d.ts +0 -327
  53. package/lib/customtypes/widgets/slices/SliceWidget.js +0 -8
@@ -120,7 +120,7 @@ export declare const RepeatableWidgets: t.ArrayC<t.ExactC<t.TypeC<{
120
120
  __TYPE__: t.LiteralC<"LinkContent">;
121
121
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
122
122
  __TYPE__: t.LiteralC<"ImageLink">;
123
- }>>, t.UnionC<[t.IntersectionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
123
+ }>>, t.IntersectionC<[t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
124
124
  kind: t.Type<"image", "image", unknown>;
125
125
  id: t.StringC;
126
126
  url: t.StringC;
@@ -130,14 +130,13 @@ export declare const RepeatableWidgets: t.ArrayC<t.ExactC<t.TypeC<{
130
130
  name: t.StringC;
131
131
  }>>, t.ExactC<t.PartialC<{
132
132
  date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
133
- }>>]>, t.ExactC<t.PartialC<{
134
- text: t.StringC;
135
133
  }>>]>, t.ExactC<t.TypeC<{
136
134
  kind: t.LiteralC<"image">;
135
+ }>>]>, t.ExactC<t.PartialC<{
137
136
  text: t.StringC;
138
137
  }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
139
138
  __TYPE__: t.LiteralC<"FileLink">;
140
- }>>, t.UnionC<[t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
139
+ }>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
141
140
  kind: t.Type<"file", "file", unknown>;
142
141
  id: t.StringC;
143
142
  url: t.StringC;
@@ -145,23 +144,21 @@ export declare const RepeatableWidgets: t.ArrayC<t.ExactC<t.TypeC<{
145
144
  size: t.StringC;
146
145
  }>, t.PartialC<{
147
146
  date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
148
- }>]>>, t.ExactC<t.PartialC<{
149
- text: t.StringC;
150
- }>>]>, t.ExactC<t.TypeC<{
147
+ }>]>>, t.ExactC<t.TypeC<{
151
148
  kind: t.LiteralC<"file">;
149
+ }>>]>, t.ExactC<t.PartialC<{
152
150
  text: t.StringC;
153
151
  }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
154
152
  __TYPE__: t.LiteralC<"DocumentLink">;
155
- }>>, t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
153
+ }>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.TypeC<{
156
154
  id: t.Type<string, string, unknown>;
157
- }>>, t.ExactC<t.PartialC<{
158
- text: t.StringC;
159
- }>>]>, t.ExactC<t.TypeC<{
155
+ }>>, t.ExactC<t.TypeC<{
160
156
  kind: t.LiteralC<"document">;
157
+ }>>]>, t.ExactC<t.PartialC<{
161
158
  text: t.StringC;
162
159
  }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
163
160
  __TYPE__: t.LiteralC<"ExternalLink">;
164
- }>>, t.UnionC<[t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
161
+ }>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
165
162
  url: t.StringC;
166
163
  }>, t.PartialC<{
167
164
  kind: t.LiteralC<"web">;
@@ -171,19 +168,19 @@ export declare const RepeatableWidgets: t.ArrayC<t.ExactC<t.TypeC<{
171
168
  }, {
172
169
  title?: string;
173
170
  }, unknown>, t.NullC, t.UndefinedC]>;
174
- }>]>>, t.ExactC<t.PartialC<{
175
- text: t.StringC;
176
- }>>]>, t.ExactC<t.TypeC<{
171
+ }>]>>, t.ExactC<t.TypeC<{
177
172
  kind: t.LiteralC<"web">;
173
+ }>>]>, t.ExactC<t.PartialC<{
178
174
  text: t.StringC;
179
175
  }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
180
176
  __TYPE__: t.LiteralC<"MediaLink">;
181
- }>>, t.ExactC<t.TypeC<{
177
+ }>>, t.IntersectionC<[t.ExactC<t.TypeC<{
182
178
  kind: t.LiteralC<"media">;
179
+ }>>, t.ExactC<t.PartialC<{
183
180
  text: t.StringC;
184
- }>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
181
+ }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
185
182
  __TYPE__: t.LiteralC<"AnyLink">;
186
- }>>, t.ExactC<t.TypeC<{
183
+ }>>, t.ExactC<t.PartialC<{
187
184
  text: t.StringC;
188
185
  }>>]>]>;
189
186
  }>>, t.ExactC<t.TypeC<{
@@ -427,5 +424,76 @@ export declare const RepeatableWidgets: t.ArrayC<t.ExactC<t.TypeC<{
427
424
  }>]>>]>>;
428
425
  }>>, t.ExactC<t.TypeC<{
429
426
  __TYPE__: t.LiteralC<"SeparatorContent">;
427
+ }>>, t.ExactC<t.TypeC<{
428
+ __TYPE__: t.LiteralC<"RepeatableContent">;
429
+ type: t.LiteralC<"Link">;
430
+ value: t.ArrayC<t.ExactC<t.TypeC<{
431
+ __TYPE__: t.LiteralC<"LinkContent">;
432
+ value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
433
+ __TYPE__: t.LiteralC<"ImageLink">;
434
+ }>>, t.IntersectionC<[t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
435
+ kind: t.Type<"image", "image", unknown>;
436
+ id: t.StringC;
437
+ url: t.StringC;
438
+ height: t.StringC;
439
+ width: t.StringC;
440
+ size: t.StringC;
441
+ name: t.StringC;
442
+ }>>, t.ExactC<t.PartialC<{
443
+ date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
444
+ }>>]>, t.ExactC<t.TypeC<{
445
+ kind: t.LiteralC<"image">;
446
+ }>>]>, t.ExactC<t.PartialC<{
447
+ text: t.StringC;
448
+ }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
449
+ __TYPE__: t.LiteralC<"FileLink">;
450
+ }>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
451
+ kind: t.Type<"file", "file", unknown>;
452
+ id: t.StringC;
453
+ url: t.StringC;
454
+ name: t.StringC;
455
+ size: t.StringC;
456
+ }>, t.PartialC<{
457
+ date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
458
+ }>]>>, t.ExactC<t.TypeC<{
459
+ kind: t.LiteralC<"file">;
460
+ }>>]>, t.ExactC<t.PartialC<{
461
+ text: t.StringC;
462
+ }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
463
+ __TYPE__: t.LiteralC<"DocumentLink">;
464
+ }>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.TypeC<{
465
+ id: t.Type<string, string, unknown>;
466
+ }>>, t.ExactC<t.TypeC<{
467
+ kind: t.LiteralC<"document">;
468
+ }>>]>, t.ExactC<t.PartialC<{
469
+ text: t.StringC;
470
+ }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
471
+ __TYPE__: t.LiteralC<"ExternalLink">;
472
+ }>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
473
+ url: t.StringC;
474
+ }>, t.PartialC<{
475
+ kind: t.LiteralC<"web">;
476
+ target: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
477
+ preview: t.UnionC<[t.Type<{
478
+ title?: string;
479
+ }, {
480
+ title?: string;
481
+ }, unknown>, t.NullC, t.UndefinedC]>;
482
+ }>]>>, t.ExactC<t.TypeC<{
483
+ kind: t.LiteralC<"web">;
484
+ }>>]>, t.ExactC<t.PartialC<{
485
+ text: t.StringC;
486
+ }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
487
+ __TYPE__: t.LiteralC<"MediaLink">;
488
+ }>>, t.IntersectionC<[t.ExactC<t.TypeC<{
489
+ kind: t.LiteralC<"media">;
490
+ }>>, t.ExactC<t.PartialC<{
491
+ text: t.StringC;
492
+ }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
493
+ __TYPE__: t.LiteralC<"AnyLink">;
494
+ }>>, t.ExactC<t.PartialC<{
495
+ text: t.StringC;
496
+ }>>]>]>;
497
+ }>>>;
430
498
  }>>]>, t.Type<GroupContent, GroupContent, unknown>]>]>>;
431
499
  }>>>;