@prismicio/types-internal 2.7.0 → 2.8.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.
- package/lib/content/Document.d.ts +132 -132
- package/lib/content/fields/WidgetContent.d.ts +132 -132
- package/lib/content/fields/nestable/LinkContent.d.ts +32 -32
- package/lib/content/fields/nestable/LinkContent.js +2 -10
- package/lib/content/fields/nestable/NestableContent.d.ts +22 -22
- package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +42 -42
- package/lib/content/fields/nestable/RichTextContent/index.d.ts +20 -20
- package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +44 -44
- package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +10 -10
- package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +44 -44
- package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +22 -22
- package/lib/content/fields/slices/Slice/SlicePrimaryContent.d.ts +22 -22
- package/lib/content/fields/slices/Slice/index.d.ts +80 -80
- package/lib/content/fields/slices/SliceItem.d.ts +80 -80
- package/lib/content/fields/slices/SlicesContent.d.ts +110 -110
- package/package.json +1 -1
- package/src/content/fields/nestable/LinkContent.ts +2 -26
package/package.json
CHANGED
|
@@ -12,21 +12,9 @@ import { hasContentType } from "../../utils"
|
|
|
12
12
|
|
|
13
13
|
export const ImageLinkType = "ImageLink"
|
|
14
14
|
|
|
15
|
-
const isImageLinkKind = (input: unknown) => typeof input === "string"
|
|
16
|
-
|
|
17
|
-
const ImageLinkKind = new t.Type<"image">(
|
|
18
|
-
"ImageLinkKind",
|
|
19
|
-
(input): input is "image" => isImageLinkKind(input),
|
|
20
|
-
(input, context) =>
|
|
21
|
-
isImageLinkKind(input)
|
|
22
|
-
? t.success("image" as const)
|
|
23
|
-
: t.failure(input, context),
|
|
24
|
-
() => "image" as const,
|
|
25
|
-
)
|
|
26
|
-
|
|
27
15
|
const filledImageLinkLegacyCodec = t.intersection([
|
|
28
16
|
t.strict({
|
|
29
|
-
kind:
|
|
17
|
+
kind: t.string,
|
|
30
18
|
id: t.string,
|
|
31
19
|
url: t.string,
|
|
32
20
|
height: t.string,
|
|
@@ -117,22 +105,10 @@ export type ImageLinkContent = t.TypeOf<typeof ImageLinkContent>
|
|
|
117
105
|
|
|
118
106
|
export const FileLinkType = "FileLink"
|
|
119
107
|
|
|
120
|
-
const isFileLinkKind = (input: unknown) => typeof input === "string"
|
|
121
|
-
|
|
122
|
-
const FileLinkKind = new t.Type<"file">(
|
|
123
|
-
"FileLinkKind",
|
|
124
|
-
(input): input is "file" => isFileLinkKind(input),
|
|
125
|
-
(input, context) =>
|
|
126
|
-
isFileLinkKind(input)
|
|
127
|
-
? t.success("file" as const)
|
|
128
|
-
: t.failure(input, context),
|
|
129
|
-
() => "file" as const,
|
|
130
|
-
)
|
|
131
|
-
|
|
132
108
|
const filledFileLinkLegacyCodec = t.exact(
|
|
133
109
|
t.intersection([
|
|
134
110
|
t.type({
|
|
135
|
-
kind:
|
|
111
|
+
kind: t.string,
|
|
136
112
|
id: t.string,
|
|
137
113
|
url: t.string,
|
|
138
114
|
name: t.string,
|