@prismicio/types-internal 3.3.0-alpha.1 → 3.3.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/fields/RepeatableContent.d.ts +45 -47
- package/lib/content/fields/nestable/RichTextContent/TextBlock.d.ts +727 -0
- package/lib/content/fields/nestable/RichTextContent/TextBlock.js +80 -0
- package/lib/customtypes/CustomType.d.ts +18 -18
- package/lib/customtypes/Section.d.ts +18 -18
- package/lib/customtypes/diff/SharedSlice.d.ts +8 -8
- package/lib/customtypes/diff/Variation.d.ts +8 -8
- package/lib/customtypes/widgets/Group.d.ts +6 -6
- package/lib/customtypes/widgets/Widget.d.ts +21 -21
- package/lib/customtypes/widgets/nestable/Link.d.ts +10 -2
- package/lib/customtypes/widgets/nestable/Link.js +5 -1
- package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +1 -1
- package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +2 -2
- package/lib/customtypes/widgets/slices/LegacySlice.d.ts +2 -2
- package/lib/customtypes/widgets/slices/SharedSlice.d.ts +8 -8
- package/lib/customtypes/widgets/slices/SlicePrimaryWidget.d.ts +6 -6
- package/lib/customtypes/widgets/slices/SliceWidget.d.ts +327 -0
- package/lib/customtypes/widgets/slices/SliceWidget.js +8 -0
- package/lib/customtypes/widgets/slices/Slices.d.ts +28 -28
- package/package.json +1 -1
- package/src/customtypes/widgets/nestable/Link.ts +5 -1
|
@@ -5,14 +5,12 @@ import type { LegacyContentCtx, WithTypes } from "../LegacyContentCtx";
|
|
|
5
5
|
export declare const RepeatableContent: t.ExactC<t.TypeC<{
|
|
6
6
|
__TYPE__: t.LiteralC<"RepeatableContent">;
|
|
7
7
|
type: t.LiteralC<"Link">;
|
|
8
|
-
value: t.ArrayC<t.
|
|
9
|
-
key: t.Type<string, string, unknown>;
|
|
10
|
-
}>>, t.ExactC<t.TypeC<{
|
|
8
|
+
value: t.ArrayC<t.ExactC<t.TypeC<{
|
|
11
9
|
__TYPE__: t.LiteralC<"LinkContent">;
|
|
12
10
|
value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
13
11
|
__TYPE__: t.LiteralC<"ImageLink">;
|
|
14
|
-
}>>, t.
|
|
15
|
-
kind: t.
|
|
12
|
+
}>>, t.UnionC<[t.IntersectionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
13
|
+
kind: t.StringC;
|
|
16
14
|
id: t.StringC;
|
|
17
15
|
url: t.StringC;
|
|
18
16
|
height: t.StringC;
|
|
@@ -21,35 +19,38 @@ export declare const RepeatableContent: t.ExactC<t.TypeC<{
|
|
|
21
19
|
name: t.StringC;
|
|
22
20
|
}>>, t.ExactC<t.PartialC<{
|
|
23
21
|
date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
22
|
+
}>>]>, t.ExactC<t.PartialC<{
|
|
23
|
+
text: t.StringC;
|
|
24
24
|
}>>]>, t.ExactC<t.TypeC<{
|
|
25
25
|
kind: t.LiteralC<"image">;
|
|
26
|
-
}>>]>, t.ExactC<t.PartialC<{
|
|
27
26
|
text: t.StringC;
|
|
28
27
|
}>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
29
28
|
__TYPE__: t.LiteralC<"FileLink">;
|
|
30
|
-
}>>, t.
|
|
31
|
-
kind: t.
|
|
29
|
+
}>>, t.UnionC<[t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
30
|
+
kind: t.StringC;
|
|
32
31
|
id: t.StringC;
|
|
33
32
|
url: t.StringC;
|
|
34
33
|
name: t.StringC;
|
|
35
34
|
size: t.StringC;
|
|
36
35
|
}>, t.PartialC<{
|
|
37
36
|
date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
38
|
-
}>]>>, t.ExactC<t.
|
|
37
|
+
}>]>>, t.ExactC<t.PartialC<{
|
|
38
|
+
text: t.StringC;
|
|
39
|
+
}>>]>, t.ExactC<t.TypeC<{
|
|
39
40
|
kind: t.LiteralC<"file">;
|
|
40
|
-
}>>]>, t.ExactC<t.PartialC<{
|
|
41
41
|
text: t.StringC;
|
|
42
42
|
}>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
43
43
|
__TYPE__: t.LiteralC<"DocumentLink">;
|
|
44
|
-
}>>, t.
|
|
44
|
+
}>>, t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
45
45
|
id: t.Type<string, string, unknown>;
|
|
46
|
-
}>>, t.ExactC<t.
|
|
46
|
+
}>>, t.ExactC<t.PartialC<{
|
|
47
|
+
text: t.StringC;
|
|
48
|
+
}>>]>, t.ExactC<t.TypeC<{
|
|
47
49
|
kind: t.LiteralC<"document">;
|
|
48
|
-
}>>]>, t.ExactC<t.PartialC<{
|
|
49
50
|
text: t.StringC;
|
|
50
51
|
}>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
51
52
|
__TYPE__: t.LiteralC<"ExternalLink">;
|
|
52
|
-
}>>, t.
|
|
53
|
+
}>>, t.UnionC<[t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
53
54
|
url: t.StringC;
|
|
54
55
|
}>, t.PartialC<{
|
|
55
56
|
kind: t.LiteralC<"web">;
|
|
@@ -59,37 +60,33 @@ export declare const RepeatableContent: t.ExactC<t.TypeC<{
|
|
|
59
60
|
}, {
|
|
60
61
|
title?: string;
|
|
61
62
|
}, unknown>, t.NullC, t.UndefinedC]>;
|
|
62
|
-
}>]>>, t.ExactC<t.
|
|
63
|
+
}>]>>, t.ExactC<t.PartialC<{
|
|
64
|
+
text: t.StringC;
|
|
65
|
+
}>>]>, t.ExactC<t.TypeC<{
|
|
63
66
|
kind: t.LiteralC<"web">;
|
|
64
|
-
}>>]>, t.ExactC<t.PartialC<{
|
|
65
67
|
text: t.StringC;
|
|
66
68
|
}>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
67
69
|
__TYPE__: t.LiteralC<"MediaLink">;
|
|
68
|
-
}>>, t.
|
|
70
|
+
}>>, t.ExactC<t.TypeC<{
|
|
69
71
|
kind: t.LiteralC<"media">;
|
|
70
|
-
}>>, t.ExactC<t.PartialC<{
|
|
71
72
|
text: t.StringC;
|
|
72
|
-
}>>]
|
|
73
|
+
}>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
73
74
|
__TYPE__: t.LiteralC<"AnyLink">;
|
|
74
|
-
}>>, t.ExactC<t.
|
|
75
|
-
kind: t.LiteralC<"any">;
|
|
76
|
-
}>, t.PartialC<{
|
|
75
|
+
}>>, t.ExactC<t.TypeC<{
|
|
77
76
|
text: t.StringC;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
77
|
+
}>>]>]>;
|
|
78
|
+
}>>>;
|
|
80
79
|
}>>;
|
|
81
80
|
export declare type RepeatableContent = t.TypeOf<typeof RepeatableContent>;
|
|
82
81
|
export declare const isRepeatableContent: t.Is<{
|
|
83
82
|
__TYPE__: "RepeatableContent";
|
|
84
83
|
type: "Link";
|
|
85
|
-
value:
|
|
86
|
-
key: string;
|
|
87
|
-
} & {
|
|
84
|
+
value: {
|
|
88
85
|
__TYPE__: "LinkContent";
|
|
89
86
|
value: ({
|
|
90
87
|
__TYPE__: "ImageLink";
|
|
91
|
-
} & ((
|
|
92
|
-
kind:
|
|
88
|
+
} & (({
|
|
89
|
+
kind: string;
|
|
93
90
|
id: string;
|
|
94
91
|
url: string;
|
|
95
92
|
height: string;
|
|
@@ -98,41 +95,43 @@ export declare const isRepeatableContent: t.Is<{
|
|
|
98
95
|
name: string;
|
|
99
96
|
} & {
|
|
100
97
|
date?: string | null | undefined;
|
|
98
|
+
} & {
|
|
99
|
+
text?: string;
|
|
101
100
|
}) | {
|
|
102
101
|
kind: "image";
|
|
103
|
-
|
|
104
|
-
text?: string;
|
|
102
|
+
text: string;
|
|
105
103
|
})) | ({
|
|
106
104
|
__TYPE__: "FileLink";
|
|
107
|
-
} & ((
|
|
108
|
-
kind:
|
|
105
|
+
} & (({
|
|
106
|
+
kind: string;
|
|
109
107
|
id: string;
|
|
110
108
|
url: string;
|
|
111
109
|
name: string;
|
|
112
110
|
size: string;
|
|
113
111
|
} & {
|
|
114
112
|
date?: string | null | undefined;
|
|
113
|
+
} & {
|
|
114
|
+
text?: string;
|
|
115
115
|
}) | {
|
|
116
116
|
kind: "file";
|
|
117
|
-
|
|
118
|
-
text?: string;
|
|
117
|
+
text: string;
|
|
119
118
|
})) | ({
|
|
120
119
|
__TYPE__: "MediaLink";
|
|
121
120
|
} & {
|
|
122
121
|
kind: "media";
|
|
123
|
-
|
|
124
|
-
text?: string;
|
|
122
|
+
text: string;
|
|
125
123
|
}) | ({
|
|
126
124
|
__TYPE__: "DocumentLink";
|
|
127
125
|
} & (({
|
|
128
126
|
id: string;
|
|
129
|
-
}
|
|
130
|
-
kind: "document";
|
|
131
|
-
}) & {
|
|
127
|
+
} & {
|
|
132
128
|
text?: string;
|
|
129
|
+
}) | {
|
|
130
|
+
kind: "document";
|
|
131
|
+
text: string;
|
|
133
132
|
})) | ({
|
|
134
133
|
__TYPE__: "ExternalLink";
|
|
135
|
-
} & ((
|
|
134
|
+
} & (({
|
|
136
135
|
url: string;
|
|
137
136
|
} & {
|
|
138
137
|
kind?: "web";
|
|
@@ -140,18 +139,17 @@ export declare const isRepeatableContent: t.Is<{
|
|
|
140
139
|
preview?: {
|
|
141
140
|
title?: string;
|
|
142
141
|
} | null | undefined;
|
|
142
|
+
} & {
|
|
143
|
+
text?: string;
|
|
143
144
|
}) | {
|
|
144
145
|
kind: "web";
|
|
145
|
-
|
|
146
|
-
text?: string;
|
|
146
|
+
text: string;
|
|
147
147
|
})) | ({
|
|
148
148
|
__TYPE__: "AnyLink";
|
|
149
149
|
} & {
|
|
150
|
-
|
|
151
|
-
} & {
|
|
152
|
-
text?: string;
|
|
150
|
+
text: string;
|
|
153
151
|
});
|
|
154
|
-
}
|
|
152
|
+
}[];
|
|
155
153
|
}>;
|
|
156
154
|
export declare const RepeatableLegacy: (ctx: LegacyContentCtx, fieldType: "Link") => t.Type<RepeatableContent, WithTypes<Array<unknown>>, unknown>;
|
|
157
155
|
export declare type RepeatableCustomType = Link;
|