@prismicio/types-internal 2.6.0 → 2.7.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.
- package/lib/content/Document.d.ts +409 -13
- package/lib/content/fields/WidgetContent.d.ts +408 -12
- package/lib/content/fields/nestable/LinkContent.d.ts +54 -8
- package/lib/content/fields/nestable/LinkContent.js +10 -1
- package/lib/content/fields/nestable/NestableContent.d.ts +68 -2
- package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +129 -6
- package/lib/content/fields/nestable/RichTextContent/index.d.ts +60 -0
- package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +136 -4
- package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +32 -2
- package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +136 -4
- package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +68 -2
- package/lib/content/fields/slices/Slice/SlicePrimaryContent.d.ts +68 -2
- package/lib/content/fields/slices/Slice/index.d.ts +250 -10
- package/lib/content/fields/slices/SliceItem.d.ts +250 -10
- package/lib/content/fields/slices/SlicesContent.d.ts +340 -10
- package/lib/customtypes/CustomType.d.ts +342 -162
- package/lib/customtypes/Section.d.ts +342 -162
- package/lib/customtypes/diff/SharedSlice.d.ts +152 -72
- package/lib/customtypes/diff/Variation.d.ts +152 -72
- package/lib/customtypes/widgets/Group.d.ts +60 -0
- package/lib/customtypes/widgets/Widget.d.ts +318 -108
- package/lib/customtypes/widgets/nestable/Link.d.ts +20 -0
- package/lib/customtypes/widgets/nestable/Link.js +2 -0
- package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +10 -0
- package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +20 -0
- package/lib/customtypes/widgets/slices/LegacySlice.d.ts +20 -0
- package/lib/customtypes/widgets/slices/SharedSlice.d.ts +80 -0
- package/lib/customtypes/widgets/slices/SlicePrimaryWidget.d.ts +87 -27
- package/lib/customtypes/widgets/slices/Slices.d.ts +424 -144
- package/package.json +1 -1
- package/src/content/fields/nestable/LinkContent.ts +12 -1
- package/src/customtypes/widgets/nestable/Link.ts +2 -0
- package/lib/content/fields/nestable/RichTextContent/TextBlock.d.ts +0 -727
- package/lib/content/fields/nestable/RichTextContent/TextBlock.js +0 -80
- package/lib/customtypes/widgets/slices/SliceWidget.d.ts +0 -327
- package/lib/customtypes/widgets/slices/SliceWidget.js +0 -8
package/package.json
CHANGED
|
@@ -23,6 +23,7 @@ const imageLinkLegacyCodec = t.exact(
|
|
|
23
23
|
}),
|
|
24
24
|
t.partial({
|
|
25
25
|
date: StringOrNull,
|
|
26
|
+
text: t.string,
|
|
26
27
|
}),
|
|
27
28
|
]),
|
|
28
29
|
)
|
|
@@ -68,6 +69,7 @@ const fileLinkLegacyCodec = t.exact(
|
|
|
68
69
|
}),
|
|
69
70
|
t.partial({
|
|
70
71
|
date: nullable(t.string),
|
|
72
|
+
text: t.string,
|
|
71
73
|
}),
|
|
72
74
|
]),
|
|
73
75
|
)
|
|
@@ -100,6 +102,7 @@ export const FileLinkContent = t.intersection([
|
|
|
100
102
|
}),
|
|
101
103
|
t.partial({
|
|
102
104
|
size: withFallback(t.string, "0"),
|
|
105
|
+
text: t.string,
|
|
103
106
|
}),
|
|
104
107
|
]),
|
|
105
108
|
),
|
|
@@ -108,7 +111,14 @@ export type FileLinkContent = t.TypeOf<typeof FileLinkContent>
|
|
|
108
111
|
|
|
109
112
|
export const DocumentLinkType = "DocumentLink"
|
|
110
113
|
|
|
111
|
-
const documentLinkLegacyCodec = t.
|
|
114
|
+
const documentLinkLegacyCodec = t.exact(
|
|
115
|
+
t.intersection([
|
|
116
|
+
t.type({ id: NonEmptyString }),
|
|
117
|
+
t.partial({
|
|
118
|
+
text: t.string,
|
|
119
|
+
}),
|
|
120
|
+
]),
|
|
121
|
+
)
|
|
112
122
|
type DocumentLinkLegacy = t.TypeOf<typeof documentLinkLegacyCodec>
|
|
113
123
|
const DocumentLinkLegacy = new t.Type<DocumentLinkContent, DocumentLinkLegacy>(
|
|
114
124
|
"DocumentLink",
|
|
@@ -152,6 +162,7 @@ const externalLinkLegacyCodec = t.exact(
|
|
|
152
162
|
title: t.string,
|
|
153
163
|
}),
|
|
154
164
|
),
|
|
165
|
+
text: t.string,
|
|
155
166
|
}),
|
|
156
167
|
]),
|
|
157
168
|
)
|
|
@@ -3,6 +3,7 @@ import * as t from "io-ts"
|
|
|
3
3
|
import { withFallback } from "io-ts-types/lib/withFallback"
|
|
4
4
|
|
|
5
5
|
import { StringOrNull } from "../../../validators"
|
|
6
|
+
import { Text } from "./Text"
|
|
6
7
|
|
|
7
8
|
const arrayString = (
|
|
8
9
|
entries:
|
|
@@ -78,6 +79,7 @@ export const LinkConfig = t.exact(
|
|
|
78
79
|
masks: MasksArrayString,
|
|
79
80
|
tags: MasksArrayString,
|
|
80
81
|
allowTargetBlank: t.boolean,
|
|
82
|
+
text: Text,
|
|
81
83
|
}),
|
|
82
84
|
)
|
|
83
85
|
export type LinkConfig = t.TypeOf<typeof LinkConfig>
|