@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.
- package/lib/content/Document.d.ts +1 -1
- package/lib/content/Document.js +1 -6
- package/lib/customtypes/CustomType.d.ts +1046 -1180
- package/lib/customtypes/CustomType.js +13 -74
- package/lib/customtypes/Section.d.ts +1047 -1171
- package/lib/customtypes/Section.js +23 -1
- package/lib/customtypes/_internal/utils.d.ts +3 -0
- package/lib/customtypes/_internal/utils.js +20 -0
- package/lib/customtypes/diff/SharedSlice.d.ts +184 -220
- package/lib/customtypes/diff/Variation.d.ts +183 -219
- package/lib/customtypes/widgets/Group.d.ts +6 -40
- package/lib/customtypes/widgets/Group.js +20 -1
- package/lib/customtypes/widgets/Widget.d.ts +778 -976
- package/lib/customtypes/widgets/nestable/Link/ContentRelationshipResolver.d.ts +4 -22
- package/lib/customtypes/widgets/nestable/Link/ContentRelationshipResolver.js +5 -34
- package/lib/customtypes/widgets/nestable/Link/index.d.ts +4 -40
- package/lib/customtypes/widgets/nestable/Link/index.js +1 -1
- package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +2 -20
- package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +6 -40
- package/lib/customtypes/widgets/slices/CompositeSlice.js +26 -1
- package/lib/customtypes/widgets/slices/LegacySlice.d.ts +4 -40
- package/lib/customtypes/widgets/slices/SharedSlice.d.ts +10 -80
- package/lib/customtypes/widgets/slices/SharedSlice.js +35 -1
- package/lib/customtypes/widgets/slices/Slices.d.ts +924 -1246
- package/lib/customtypes/widgets/slices/Slices.js +34 -1
- package/lib/validators/StringOrT.d.ts +3 -0
- package/lib/validators/StringOrT.js +15 -0
- package/package.json +1 -1
- package/src/content/Document.ts +2 -6
- package/src/customtypes/CustomType.ts +24 -97
- package/src/customtypes/Section.ts +28 -1
- package/src/customtypes/_internal/utils.ts +25 -0
- package/src/customtypes/widgets/Group.ts +24 -0
- package/src/customtypes/widgets/nestable/Link/ContentRelationshipResolver.ts +5 -54
- package/src/customtypes/widgets/nestable/Link/index.ts +2 -2
- package/src/customtypes/widgets/slices/CompositeSlice.ts +33 -0
- package/src/customtypes/widgets/slices/SharedSlice.ts +47 -0
- package/src/customtypes/widgets/slices/Slices.ts +44 -1
- 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, "
|
|
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";
|
package/lib/content/Document.js
CHANGED
|
@@ -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,
|