@prismicio/types-internal 2.1.0-alpha.2 → 2.1.0-alpha.4

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/content/Document.d.ts +1 -1
  2. package/lib/content/Document.js +1 -6
  3. package/lib/customtypes/CustomType.d.ts +1046 -1180
  4. package/lib/customtypes/CustomType.js +13 -74
  5. package/lib/customtypes/Section.d.ts +1047 -1171
  6. package/lib/customtypes/Section.js +23 -1
  7. package/lib/customtypes/_internal/utils.d.ts +3 -0
  8. package/lib/customtypes/_internal/utils.js +20 -0
  9. package/lib/customtypes/diff/SharedSlice.d.ts +184 -220
  10. package/lib/customtypes/diff/Variation.d.ts +183 -219
  11. package/lib/customtypes/widgets/Group.d.ts +6 -40
  12. package/lib/customtypes/widgets/Group.js +20 -1
  13. package/lib/customtypes/widgets/Widget.d.ts +778 -976
  14. package/lib/customtypes/widgets/nestable/Link/ContentRelationshipResolver.d.ts +4 -22
  15. package/lib/customtypes/widgets/nestable/Link/ContentRelationshipResolver.js +5 -34
  16. package/lib/customtypes/widgets/nestable/Link/index.d.ts +4 -40
  17. package/lib/customtypes/widgets/nestable/Link/index.js +1 -1
  18. package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +2 -20
  19. package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +6 -40
  20. package/lib/customtypes/widgets/slices/CompositeSlice.js +26 -1
  21. package/lib/customtypes/widgets/slices/LegacySlice.d.ts +4 -40
  22. package/lib/customtypes/widgets/slices/SharedSlice.d.ts +10 -80
  23. package/lib/customtypes/widgets/slices/SharedSlice.js +35 -1
  24. package/lib/customtypes/widgets/slices/Slices.d.ts +924 -1246
  25. package/lib/customtypes/widgets/slices/Slices.js +34 -1
  26. package/lib/validators/StringOrT.d.ts +3 -0
  27. package/lib/validators/StringOrT.js +15 -0
  28. package/package.json +1 -1
  29. package/src/content/Document.ts +2 -6
  30. package/src/customtypes/CustomType.ts +24 -97
  31. package/src/customtypes/Section.ts +28 -1
  32. package/src/customtypes/_internal/utils.ts +25 -0
  33. package/src/customtypes/widgets/Group.ts +24 -0
  34. package/src/customtypes/widgets/nestable/Link/ContentRelationshipResolver.ts +5 -54
  35. package/src/customtypes/widgets/nestable/Link/index.ts +2 -2
  36. package/src/customtypes/widgets/slices/CompositeSlice.ts +33 -0
  37. package/src/customtypes/widgets/slices/SharedSlice.ts +47 -0
  38. package/src/customtypes/widgets/slices/Slices.ts +44 -1
  39. package/src/validators/StringOrT.ts +21 -0
@@ -2454,7 +2454,7 @@ declare function extractMetadata(data: {
2454
2454
  declare function parseLegacyDocument(legacyDoc: unknown): Document | undefined;
2455
2455
  declare function encodeToLegacyDocument(document: Document): DocumentLegacy;
2456
2456
  export declare const DocumentLegacy: {
2457
- _codec: (allTypes?: Map<string, "Boolean" | "Color" | "Date" | "Embed" | "GeoPoint" | "Image" | "IntegrationFields" | "Link" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp" | "Group" | "Slice" | "SharedSlice" | "Choice" | "Slices" | "UID"> | undefined) => t.Type<{
2457
+ _codec: (allTypes?: Map<string, "SharedSlice" | "Color" | "Boolean" | "Embed" | "GeoPoint" | "Date" | "Number" | "Range" | "StructuredText" | "Select" | "Separator" | "Text" | "Timestamp" | "Link" | "Image" | "IntegrationFields" | "Group" | "Slice" | "Slices" | "Choice" | "UID"> | undefined) => t.Type<{
2458
2458
  [x: string]: {
2459
2459
  type: string;
2460
2460
  __TYPE__: "EmptyContent";
@@ -62,12 +62,7 @@ function extractMetadata(data) {
62
62
  widgets: {},
63
63
  });
64
64
  const slugs = data["slugs_INTERNAL"] || [];
65
- const uid = (() => {
66
- const rawUID = data["uid"];
67
- if ((0, fields_1.isUIDContent)(rawUID))
68
- return rawUID.value;
69
- return;
70
- })();
65
+ const uid = data["uid"];
71
66
  return {
72
67
  widgets,
73
68
  types,