@prismicio/types-internal 3.0.0 → 3.1.0-alpha.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.
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
@@ -1,4 +1,5 @@
1
1
  import type { SharedSliceItemContent, SliceItemContent, WidgetContent } from "../content";
2
+ import type { RepeatableContent } from "../content/fields/RepeatableContent";
2
3
  import type { CompositeSlice, Group, NestableWidget, StaticSlices, UID, VariationFields } from "../customtypes";
3
4
  export declare type TraverseSliceContentFn = <S extends SliceItemContent | SharedSliceItemContent, D extends VariationFields | CompositeSlice | Group | NestableWidget>({ path, key, apiId, model, content, }: {
4
5
  path: ContentPath;
@@ -7,7 +8,7 @@ export declare type TraverseSliceContentFn = <S extends SliceItemContent | Share
7
8
  model?: D | undefined;
8
9
  content: S;
9
10
  }) => S | SharedSliceItemContent | undefined;
10
- export declare type TraverseWidgetContentFn = <C extends WidgetContent, D extends NestableWidget | StaticSlices | Group | UID>({ path, key, apiId, model, content, }: {
11
+ export declare type TraverseWidgetContentFn = <C extends WidgetContent | RepeatableContent, D extends NestableWidget | StaticSlices | Group | UID>({ path, key, apiId, model, content, }: {
11
12
  path: ContentPath;
12
13
  key: string;
13
14
  apiId: string;
@@ -15,7 +16,7 @@ export declare type TraverseWidgetContentFn = <C extends WidgetContent, D extend
15
16
  content: C;
16
17
  }) => C | undefined;
17
18
  export declare type ContentPathEntry = {
18
- type: "CustomType" | "Widget" | "SharedSlice" | "Slice" | "LegacySlice" | "GroupItem" | "primary" | "items";
19
+ type: "CustomType" | "Widget" | "SharedSlice" | "Slice" | "LegacySlice" | "GroupItem" | "primary" | "items" | "RepeatableItem";
19
20
  key: string;
20
21
  };
21
22
  export declare type ContentPath = ReadonlyArray<ContentPathEntry>;