@prismicio/types-internal 3.2.1-alpha.0 → 3.3.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 (39) hide show
  1. package/lib/_internal/utils.d.ts +4 -6
  2. package/lib/content/Document.d.ts +216 -0
  3. package/lib/content/fields/RepeatableContent.d.ts +47 -45
  4. package/lib/content/fields/WidgetContent.d.ts +216 -0
  5. package/lib/content/fields/nestable/LinkContent.d.ts +48 -0
  6. package/lib/content/fields/nestable/LinkContent.js +6 -0
  7. package/lib/content/fields/nestable/NestableContent.d.ts +36 -0
  8. package/lib/content/fields/nestable/RepeatableContent.d.ts +13 -2
  9. package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +72 -0
  10. package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +12 -0
  11. package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +72 -0
  12. package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +36 -0
  13. package/lib/content/fields/slices/Slice/SlicePrimaryContent.d.ts +36 -0
  14. package/lib/content/fields/slices/Slice/index.d.ts +120 -0
  15. package/lib/content/fields/slices/SliceItem.d.ts +120 -0
  16. package/lib/content/fields/slices/SlicesContent.d.ts +180 -0
  17. package/lib/customtypes/CustomType.d.ts +18 -0
  18. package/lib/customtypes/Section.d.ts +18 -0
  19. package/lib/customtypes/diff/SharedSlice.d.ts +8 -0
  20. package/lib/customtypes/diff/Variation.d.ts +8 -0
  21. package/lib/customtypes/widgets/Group.d.ts +6 -0
  22. package/lib/customtypes/widgets/Widget.d.ts +21 -0
  23. package/lib/customtypes/widgets/nestable/Link.d.ts +2 -0
  24. package/lib/customtypes/widgets/nestable/Link.js +1 -0
  25. package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +1 -0
  26. package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +2 -0
  27. package/lib/customtypes/widgets/slices/LegacySlice.d.ts +2 -0
  28. package/lib/customtypes/widgets/slices/SharedSlice.d.ts +8 -0
  29. package/lib/customtypes/widgets/slices/SlicePrimaryWidget.d.ts +6 -0
  30. package/lib/customtypes/widgets/slices/Slices.d.ts +28 -0
  31. package/package.json +3 -3
  32. package/src/_internal/utils.ts +3 -9
  33. package/src/content/fields/nestable/LinkContent.ts +6 -0
  34. package/src/content/fields/nestable/RepeatableContent.ts +1 -1
  35. package/src/customtypes/widgets/nestable/Link.ts +2 -0
  36. package/lib/content/fields/nestable/RichTextContent/TextBlock.d.ts +0 -727
  37. package/lib/content/fields/nestable/RichTextContent/TextBlock.js +0 -80
  38. package/lib/customtypes/widgets/slices/SliceWidget.d.ts +0 -327
  39. package/lib/customtypes/widgets/slices/SliceWidget.js +0 -8
@@ -1,4 +1,4 @@
1
- import type { LinkContent, RepeatableContent, SharedSliceItemContent, SliceItemContent, WidgetContent } from "../content";
1
+ import type { RepeatableContent, SharedSliceItemContent, SliceItemContent, WidgetContent } from "../content";
2
2
  import type { CompositeSlice, Group, NestableWidget, StaticSlices, UID, VariationFields } from "../customtypes";
3
3
  export declare type TraverseSliceContentFn = <S extends SliceItemContent | SharedSliceItemContent, D extends VariationFields | CompositeSlice | Group | NestableWidget>({ path, key, apiId, model, content, }: {
4
4
  path: ContentPath;
@@ -7,14 +7,13 @@ export declare type TraverseSliceContentFn = <S extends SliceItemContent | Share
7
7
  model?: D | undefined;
8
8
  content: S;
9
9
  }) => S | SharedSliceItemContent | undefined;
10
- declare type TransformableContent<C> = C extends LinkContent | RepeatableContent ? LinkContent | RepeatableContent : C;
11
- export declare type TraverseWidgetContentFn = <C extends WidgetContent, D extends NestableWidget | StaticSlices | Group | UID>({ path, key, apiId, model, content, }: {
10
+ export declare type TraverseWidgetContentFn = <C extends WidgetContent | RepeatableContent, D extends NestableWidget | StaticSlices | Group | UID>({ path, key, apiId, model, content, }: {
12
11
  path: ContentPath;
13
12
  key: string;
14
13
  apiId: string;
15
14
  model?: D | undefined;
16
- content: TransformableContent<C>;
17
- }) => TransformableContent<C> | undefined;
15
+ content: C;
16
+ }) => C | undefined;
18
17
  export declare type ContentPathEntry = {
19
18
  type: "CustomType" | "Widget" | "SharedSlice" | "Slice" | "LegacySlice" | "GroupItem" | "primary" | "items" | "RepeatableItem";
20
19
  key: string;
@@ -30,4 +29,3 @@ export declare const ContentPath: {
30
29
  }>): ContentPath;
31
30
  };
32
31
  export declare type SliceModel = VariationFields | NestableWidget | CompositeSlice | Group;
33
- export {};