@prismicio/types-internal 0.1.0 → 0.1.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/dist/customtypes/CustomType.d.ts +2703 -0
- package/dist/customtypes/CustomType.js +141 -0
- package/dist/customtypes/Format.d.ts +4 -0
- package/dist/customtypes/Format.js +8 -0
- package/dist/customtypes/Section.d.ts +4010 -0
- package/dist/customtypes/Section.js +40 -0
- package/dist/customtypes/index.d.ts +4 -18433
- package/dist/customtypes/index.js +30 -864
- package/dist/customtypes/widgets/Group.d.ts +172 -0
- package/dist/customtypes/widgets/Group.js +45 -0
- package/dist/customtypes/widgets/UID.d.ts +14 -0
- package/dist/customtypes/widgets/UID.js +42 -0
- package/dist/customtypes/widgets/Widget.d.ts +4011 -0
- package/dist/customtypes/widgets/Widget.js +51 -0
- package/dist/customtypes/widgets/WidgetTypes.d.ts +22 -0
- package/dist/customtypes/widgets/WidgetTypes.js +26 -0
- package/dist/customtypes/widgets/index.d.ts +7 -11697
- package/dist/customtypes/widgets/index.js +34 -734
- package/dist/customtypes/widgets/nestable/BooleanField.d.ts +14 -0
- package/dist/customtypes/widgets/nestable/BooleanField.js +42 -0
- package/dist/customtypes/widgets/nestable/Color.d.ts +13 -0
- package/dist/customtypes/widgets/nestable/Color.js +41 -0
- package/dist/customtypes/widgets/nestable/Date.d.ts +14 -0
- package/dist/customtypes/widgets/nestable/Date.js +42 -0
- package/dist/customtypes/widgets/nestable/Embed.d.ts +14 -0
- package/dist/customtypes/widgets/nestable/Embed.js +42 -0
- package/dist/customtypes/widgets/nestable/GeoPoint.d.ts +12 -0
- package/dist/customtypes/widgets/nestable/GeoPoint.js +40 -0
- package/dist/customtypes/widgets/nestable/Image.d.ts +23 -0
- package/dist/customtypes/widgets/nestable/Image.js +50 -0
- package/dist/customtypes/widgets/nestable/IntegrationField.d.ts +14 -0
- package/dist/customtypes/widgets/nestable/IntegrationField.js +42 -0
- package/dist/customtypes/widgets/nestable/Link.d.ts +19 -0
- package/dist/customtypes/widgets/nestable/Link.js +78 -0
- package/dist/customtypes/widgets/nestable/NestableWidget.d.ts +160 -0
- package/dist/customtypes/widgets/nestable/NestableWidget.js +58 -0
- package/dist/customtypes/widgets/nestable/Number.d.ts +16 -0
- package/dist/customtypes/widgets/nestable/Number.js +45 -0
- package/dist/customtypes/widgets/nestable/Range.d.ts +16 -0
- package/dist/customtypes/widgets/nestable/Range.js +45 -0
- package/dist/customtypes/widgets/nestable/RichText.d.ts +22 -0
- package/dist/customtypes/widgets/nestable/RichText.js +134 -0
- package/dist/customtypes/widgets/nestable/Select.d.ts +15 -0
- package/dist/customtypes/widgets/nestable/Select.js +45 -0
- package/dist/customtypes/widgets/nestable/Separator.d.ts +11 -0
- package/dist/customtypes/widgets/nestable/Separator.js +39 -0
- package/dist/customtypes/widgets/nestable/Text.d.ts +14 -0
- package/dist/customtypes/widgets/nestable/Text.js +42 -0
- package/dist/customtypes/widgets/nestable/Timestamp.d.ts +14 -0
- package/dist/customtypes/widgets/nestable/Timestamp.js +42 -0
- package/dist/customtypes/widgets/nestable/index.d.ts +15 -0
- package/dist/customtypes/widgets/nestable/index.js +36 -0
- package/dist/customtypes/widgets/shared/ImageConstraint.d.ts +7 -0
- package/dist/customtypes/widgets/shared/ImageConstraint.js +48 -0
- package/dist/customtypes/widgets/shared/index.d.ts +1 -0
- package/dist/customtypes/widgets/shared/index.js +8 -0
- package/dist/customtypes/widgets/slices/CompositeSlice.d.ts +329 -0
- package/dist/customtypes/widgets/slices/CompositeSlice.js +46 -0
- package/dist/customtypes/widgets/slices/LegacySlice.d.ts +336 -0
- package/dist/customtypes/widgets/slices/LegacySlice.js +34 -0
- package/dist/customtypes/widgets/slices/SharedSlice.d.ts +335 -0
- package/dist/customtypes/widgets/slices/SharedSlice.js +56 -0
- package/dist/customtypes/widgets/slices/SharedSliceRef.d.ts +7 -0
- package/dist/customtypes/widgets/slices/SharedSliceRef.js +30 -0
- package/dist/customtypes/widgets/slices/Slice.d.ts +6 -0
- package/dist/customtypes/widgets/slices/Slice.js +2 -0
- package/dist/customtypes/widgets/slices/Slices.d.ts +6009 -0
- package/dist/customtypes/widgets/slices/Slices.js +106 -0
- package/dist/customtypes/widgets/slices/SlicesTypes.d.ts +5 -0
- package/dist/customtypes/widgets/slices/SlicesTypes.js +8 -0
- package/dist/customtypes/widgets/slices/index.d.ts +7 -7079
- package/dist/customtypes/widgets/slices/index.js +36 -670
- package/dist/index.d.ts +1 -18455
- package/dist/index.js +23 -844
- package/dist/index.js.map +1 -1
- package/dist/validators/IntFromNumber.d.ts +7 -0
- package/dist/validators/IntFromNumber.js +35 -0
- package/dist/validators/IntFromPixels.d.ts +7 -0
- package/dist/validators/IntFromPixels.js +43 -0
- package/dist/validators/StringFromBoolean.d.ts +7 -0
- package/dist/validators/StringFromBoolean.js +31 -0
- package/dist/validators/StringFromNumber.d.ts +7 -0
- package/dist/validators/StringFromNumber.js +31 -0
- package/dist/validators/StringOrNull.d.ts +2 -0
- package/dist/validators/StringOrNull.js +24 -0
- package/package.json +4 -24
- package/dist/customtypes/index.cjs +0 -864
- package/dist/customtypes/index.cjs.map +0 -1
- package/dist/customtypes/index.d.ts.map +0 -1
- package/dist/customtypes/index.js.map +0 -1
- package/dist/customtypes/widgets/index.cjs +0 -735
- package/dist/customtypes/widgets/index.cjs.map +0 -1
- package/dist/customtypes/widgets/index.d.ts.map +0 -1
- package/dist/customtypes/widgets/index.js.map +0 -1
- package/dist/customtypes/widgets/slices/index.cjs +0 -671
- package/dist/customtypes/widgets/slices/index.cjs.map +0 -1
- package/dist/customtypes/widgets/slices/index.d.ts.map +0 -1
- package/dist/customtypes/widgets/slices/index.js.map +0 -1
- package/dist/index.cjs +0 -870
- package/dist/index.cjs.map +0 -1
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import * as t from 'io-ts';
|
|
2
|
+
import SlicesTypes from './SlicesTypes';
|
|
3
|
+
declare const SharedSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
4
|
+
id: t.StringC;
|
|
5
|
+
type: t.LiteralC<SlicesTypes.SharedSlice>;
|
|
6
|
+
name: t.StringC;
|
|
7
|
+
variations: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
8
|
+
id: t.StringC;
|
|
9
|
+
name: t.StringC;
|
|
10
|
+
description: t.StringC;
|
|
11
|
+
imageUrl: t.StringC;
|
|
12
|
+
docURL: t.StringC;
|
|
13
|
+
version: t.StringC;
|
|
14
|
+
}>, t.PartialC<{
|
|
15
|
+
display: t.StringC;
|
|
16
|
+
primary: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
17
|
+
type: t.LiteralC<import("../WidgetTypes").default.Color>;
|
|
18
|
+
}>, t.PartialC<{
|
|
19
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
20
|
+
config: t.ExactC<t.PartialC<{
|
|
21
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
22
|
+
placeholder: t.StringC;
|
|
23
|
+
}>>;
|
|
24
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
25
|
+
type: t.LiteralC<import("../WidgetTypes").default.BooleanField>;
|
|
26
|
+
}>, t.PartialC<{
|
|
27
|
+
config: t.ExactC<t.PartialC<{
|
|
28
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
29
|
+
default_value: t.BooleanC;
|
|
30
|
+
placeholder_true: t.StringC;
|
|
31
|
+
placeholder_false: t.StringC;
|
|
32
|
+
}>>;
|
|
33
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
34
|
+
type: t.LiteralC<import("../WidgetTypes").default.Embed>;
|
|
35
|
+
}>, t.PartialC<{
|
|
36
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
37
|
+
config: t.ExactC<t.PartialC<{
|
|
38
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
39
|
+
placeholder: t.StringC;
|
|
40
|
+
useAsTitle: t.BooleanC;
|
|
41
|
+
}>>;
|
|
42
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
43
|
+
type: t.LiteralC<import("../WidgetTypes").default.GeoPoint>;
|
|
44
|
+
}>, t.PartialC<{
|
|
45
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
46
|
+
config: t.ExactC<t.PartialC<{
|
|
47
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
48
|
+
}>>;
|
|
49
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
50
|
+
type: t.LiteralC<import("../WidgetTypes").default.Date>;
|
|
51
|
+
}>, t.PartialC<{
|
|
52
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
53
|
+
config: t.ExactC<t.PartialC<{
|
|
54
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
55
|
+
placeholder: t.StringC;
|
|
56
|
+
default: t.StringC;
|
|
57
|
+
}>>;
|
|
58
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
59
|
+
type: t.LiteralC<import("../WidgetTypes").default.Number>;
|
|
60
|
+
}>, t.PartialC<{
|
|
61
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
62
|
+
config: t.ExactC<t.PartialC<{
|
|
63
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
64
|
+
placeholder: t.StringC;
|
|
65
|
+
min: t.UnionC<[t.NumberC, import("io-ts-types/lib/NumberFromString").NumberFromStringC]>;
|
|
66
|
+
max: t.UnionC<[t.NumberC, import("io-ts-types/lib/NumberFromString").NumberFromStringC]>;
|
|
67
|
+
step: t.UnionC<[t.NumberC, import("io-ts-types/lib/NumberFromString").NumberFromStringC]>;
|
|
68
|
+
}>>;
|
|
69
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
70
|
+
type: t.LiteralC<import("../WidgetTypes").default.Range>;
|
|
71
|
+
}>, t.PartialC<{
|
|
72
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
73
|
+
config: t.ExactC<t.PartialC<{
|
|
74
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
75
|
+
placeholder: t.StringC;
|
|
76
|
+
min: t.UnionC<[t.NumberC, import("io-ts-types/lib/NumberFromString").NumberFromStringC]>;
|
|
77
|
+
max: t.UnionC<[t.NumberC, import("io-ts-types/lib/NumberFromString").NumberFromStringC]>;
|
|
78
|
+
step: t.UnionC<[t.NumberC, import("io-ts-types/lib/NumberFromString").NumberFromStringC]>;
|
|
79
|
+
}>>;
|
|
80
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
81
|
+
type: t.LiteralC<import("../WidgetTypes").default.RichText>;
|
|
82
|
+
}>, t.PartialC<{
|
|
83
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
84
|
+
config: t.ExactC<t.PartialC<{
|
|
85
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
86
|
+
placeholder: t.StringC;
|
|
87
|
+
useAsTitle: t.BooleanC;
|
|
88
|
+
single: t.Type<string, string, unknown>;
|
|
89
|
+
multi: t.Type<string, string, unknown>;
|
|
90
|
+
imageConstraint: t.PartialC<{
|
|
91
|
+
width: t.Type<number | null, any, unknown>;
|
|
92
|
+
height: t.Type<number | null, any, unknown>;
|
|
93
|
+
}>;
|
|
94
|
+
labels: t.Type<string[], object, unknown>;
|
|
95
|
+
allowTargetBlank: t.BooleanC;
|
|
96
|
+
}>>;
|
|
97
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
98
|
+
type: t.LiteralC<import("../WidgetTypes").default.Select>;
|
|
99
|
+
}>, t.PartialC<{
|
|
100
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
101
|
+
config: t.ExactC<t.PartialC<{
|
|
102
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
103
|
+
placeholder: t.StringC;
|
|
104
|
+
default_value: t.StringC;
|
|
105
|
+
options: t.ArrayC<t.UnionC<[t.StringC, import("../../../validators/StringFromNumber").StringFromNumberC, import("../../../validators/StringFromBoolean").StringFromBooleanC]>>;
|
|
106
|
+
}>>;
|
|
107
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
108
|
+
type: t.LiteralC<import("../WidgetTypes").default.Separator>;
|
|
109
|
+
}>, t.PartialC<{
|
|
110
|
+
config: t.ExactC<t.PartialC<{
|
|
111
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
112
|
+
}>>;
|
|
113
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
114
|
+
type: t.LiteralC<import("../WidgetTypes").default.Text>;
|
|
115
|
+
}>, t.PartialC<{
|
|
116
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
117
|
+
config: t.ExactC<t.PartialC<{
|
|
118
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
119
|
+
useAsTitle: t.BooleanC;
|
|
120
|
+
placeholder: t.StringC;
|
|
121
|
+
}>>;
|
|
122
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
123
|
+
type: t.LiteralC<import("../WidgetTypes").default.Timestamp>;
|
|
124
|
+
}>, t.PartialC<{
|
|
125
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
126
|
+
config: t.ExactC<t.PartialC<{
|
|
127
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
128
|
+
placeholder: t.StringC;
|
|
129
|
+
default: t.StringC;
|
|
130
|
+
}>>;
|
|
131
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
132
|
+
type: t.LiteralC<import("../WidgetTypes").default.Link>;
|
|
133
|
+
}>, t.PartialC<{
|
|
134
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
135
|
+
config: t.ExactC<t.PartialC<{
|
|
136
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
137
|
+
useAsTitle: t.BooleanC;
|
|
138
|
+
placeholder: t.StringC;
|
|
139
|
+
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
140
|
+
customtypes: t.ArrayC<t.StringC>;
|
|
141
|
+
masks: t.Type<string[], object, unknown>;
|
|
142
|
+
tags: t.Type<string[], object, unknown>;
|
|
143
|
+
allowTargetBlank: t.BooleanC;
|
|
144
|
+
}>>;
|
|
145
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
146
|
+
type: t.LiteralC<import("../WidgetTypes").default.Image>;
|
|
147
|
+
}>, t.PartialC<{
|
|
148
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
149
|
+
config: t.ExactC<t.PartialC<{
|
|
150
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
151
|
+
placeholder: t.StringC;
|
|
152
|
+
constraint: t.PartialC<{
|
|
153
|
+
width: t.Type<number | null, any, unknown>;
|
|
154
|
+
height: t.Type<number | null, any, unknown>;
|
|
155
|
+
}>;
|
|
156
|
+
thumbnails: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
157
|
+
name: t.StringC;
|
|
158
|
+
}>, t.PartialC<{
|
|
159
|
+
width: t.Type<number | null, any, unknown>;
|
|
160
|
+
height: t.Type<number | null, any, unknown>;
|
|
161
|
+
}>]>>>;
|
|
162
|
+
}>>;
|
|
163
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
164
|
+
type: t.LiteralC<import("../WidgetTypes").default.IntegrationField>;
|
|
165
|
+
}>, t.PartialC<{
|
|
166
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
167
|
+
config: t.ExactC<t.PartialC<{
|
|
168
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
169
|
+
placeholder: t.StringC;
|
|
170
|
+
catalog: t.StringC;
|
|
171
|
+
}>>;
|
|
172
|
+
}>]>>]>>;
|
|
173
|
+
items: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
174
|
+
type: t.LiteralC<import("../WidgetTypes").default.Color>;
|
|
175
|
+
}>, t.PartialC<{
|
|
176
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
177
|
+
config: t.ExactC<t.PartialC<{
|
|
178
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
179
|
+
placeholder: t.StringC;
|
|
180
|
+
}>>;
|
|
181
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
182
|
+
type: t.LiteralC<import("../WidgetTypes").default.BooleanField>;
|
|
183
|
+
}>, t.PartialC<{
|
|
184
|
+
config: t.ExactC<t.PartialC<{
|
|
185
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
186
|
+
default_value: t.BooleanC;
|
|
187
|
+
placeholder_true: t.StringC;
|
|
188
|
+
placeholder_false: t.StringC;
|
|
189
|
+
}>>;
|
|
190
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
191
|
+
type: t.LiteralC<import("../WidgetTypes").default.Embed>;
|
|
192
|
+
}>, t.PartialC<{
|
|
193
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
194
|
+
config: t.ExactC<t.PartialC<{
|
|
195
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
196
|
+
placeholder: t.StringC;
|
|
197
|
+
useAsTitle: t.BooleanC;
|
|
198
|
+
}>>;
|
|
199
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
200
|
+
type: t.LiteralC<import("../WidgetTypes").default.GeoPoint>;
|
|
201
|
+
}>, t.PartialC<{
|
|
202
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
203
|
+
config: t.ExactC<t.PartialC<{
|
|
204
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
205
|
+
}>>;
|
|
206
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
207
|
+
type: t.LiteralC<import("../WidgetTypes").default.Date>;
|
|
208
|
+
}>, t.PartialC<{
|
|
209
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
210
|
+
config: t.ExactC<t.PartialC<{
|
|
211
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
212
|
+
placeholder: t.StringC;
|
|
213
|
+
default: t.StringC;
|
|
214
|
+
}>>;
|
|
215
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
216
|
+
type: t.LiteralC<import("../WidgetTypes").default.Number>;
|
|
217
|
+
}>, t.PartialC<{
|
|
218
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
219
|
+
config: t.ExactC<t.PartialC<{
|
|
220
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
221
|
+
placeholder: t.StringC;
|
|
222
|
+
min: t.UnionC<[t.NumberC, import("io-ts-types/lib/NumberFromString").NumberFromStringC]>;
|
|
223
|
+
max: t.UnionC<[t.NumberC, import("io-ts-types/lib/NumberFromString").NumberFromStringC]>;
|
|
224
|
+
step: t.UnionC<[t.NumberC, import("io-ts-types/lib/NumberFromString").NumberFromStringC]>;
|
|
225
|
+
}>>;
|
|
226
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
227
|
+
type: t.LiteralC<import("../WidgetTypes").default.Range>;
|
|
228
|
+
}>, t.PartialC<{
|
|
229
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
230
|
+
config: t.ExactC<t.PartialC<{
|
|
231
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
232
|
+
placeholder: t.StringC;
|
|
233
|
+
min: t.UnionC<[t.NumberC, import("io-ts-types/lib/NumberFromString").NumberFromStringC]>;
|
|
234
|
+
max: t.UnionC<[t.NumberC, import("io-ts-types/lib/NumberFromString").NumberFromStringC]>;
|
|
235
|
+
step: t.UnionC<[t.NumberC, import("io-ts-types/lib/NumberFromString").NumberFromStringC]>;
|
|
236
|
+
}>>;
|
|
237
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
238
|
+
type: t.LiteralC<import("../WidgetTypes").default.RichText>;
|
|
239
|
+
}>, t.PartialC<{
|
|
240
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
241
|
+
config: t.ExactC<t.PartialC<{
|
|
242
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
243
|
+
placeholder: t.StringC;
|
|
244
|
+
useAsTitle: t.BooleanC;
|
|
245
|
+
single: t.Type<string, string, unknown>;
|
|
246
|
+
multi: t.Type<string, string, unknown>;
|
|
247
|
+
imageConstraint: t.PartialC<{
|
|
248
|
+
width: t.Type<number | null, any, unknown>;
|
|
249
|
+
height: t.Type<number | null, any, unknown>;
|
|
250
|
+
}>;
|
|
251
|
+
labels: t.Type<string[], object, unknown>;
|
|
252
|
+
allowTargetBlank: t.BooleanC;
|
|
253
|
+
}>>;
|
|
254
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
255
|
+
type: t.LiteralC<import("../WidgetTypes").default.Select>;
|
|
256
|
+
}>, t.PartialC<{
|
|
257
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
258
|
+
config: t.ExactC<t.PartialC<{
|
|
259
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
260
|
+
placeholder: t.StringC;
|
|
261
|
+
default_value: t.StringC;
|
|
262
|
+
options: t.ArrayC<t.UnionC<[t.StringC, import("../../../validators/StringFromNumber").StringFromNumberC, import("../../../validators/StringFromBoolean").StringFromBooleanC]>>;
|
|
263
|
+
}>>;
|
|
264
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
265
|
+
type: t.LiteralC<import("../WidgetTypes").default.Separator>;
|
|
266
|
+
}>, t.PartialC<{
|
|
267
|
+
config: t.ExactC<t.PartialC<{
|
|
268
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
269
|
+
}>>;
|
|
270
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
271
|
+
type: t.LiteralC<import("../WidgetTypes").default.Text>;
|
|
272
|
+
}>, t.PartialC<{
|
|
273
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
274
|
+
config: t.ExactC<t.PartialC<{
|
|
275
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
276
|
+
useAsTitle: t.BooleanC;
|
|
277
|
+
placeholder: t.StringC;
|
|
278
|
+
}>>;
|
|
279
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
280
|
+
type: t.LiteralC<import("../WidgetTypes").default.Timestamp>;
|
|
281
|
+
}>, t.PartialC<{
|
|
282
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
283
|
+
config: t.ExactC<t.PartialC<{
|
|
284
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
285
|
+
placeholder: t.StringC;
|
|
286
|
+
default: t.StringC;
|
|
287
|
+
}>>;
|
|
288
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
289
|
+
type: t.LiteralC<import("../WidgetTypes").default.Link>;
|
|
290
|
+
}>, t.PartialC<{
|
|
291
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
292
|
+
config: t.ExactC<t.PartialC<{
|
|
293
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
294
|
+
useAsTitle: t.BooleanC;
|
|
295
|
+
placeholder: t.StringC;
|
|
296
|
+
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
297
|
+
customtypes: t.ArrayC<t.StringC>;
|
|
298
|
+
masks: t.Type<string[], object, unknown>;
|
|
299
|
+
tags: t.Type<string[], object, unknown>;
|
|
300
|
+
allowTargetBlank: t.BooleanC;
|
|
301
|
+
}>>;
|
|
302
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
303
|
+
type: t.LiteralC<import("../WidgetTypes").default.Image>;
|
|
304
|
+
}>, t.PartialC<{
|
|
305
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
306
|
+
config: t.ExactC<t.PartialC<{
|
|
307
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
308
|
+
placeholder: t.StringC;
|
|
309
|
+
constraint: t.PartialC<{
|
|
310
|
+
width: t.Type<number | null, any, unknown>;
|
|
311
|
+
height: t.Type<number | null, any, unknown>;
|
|
312
|
+
}>;
|
|
313
|
+
thumbnails: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
314
|
+
name: t.StringC;
|
|
315
|
+
}>, t.PartialC<{
|
|
316
|
+
width: t.Type<number | null, any, unknown>;
|
|
317
|
+
height: t.Type<number | null, any, unknown>;
|
|
318
|
+
}>]>>>;
|
|
319
|
+
}>>;
|
|
320
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
321
|
+
type: t.LiteralC<import("../WidgetTypes").default.IntegrationField>;
|
|
322
|
+
}>, t.PartialC<{
|
|
323
|
+
fieldset: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
324
|
+
config: t.ExactC<t.PartialC<{
|
|
325
|
+
label: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
|
|
326
|
+
placeholder: t.StringC;
|
|
327
|
+
catalog: t.StringC;
|
|
328
|
+
}>>;
|
|
329
|
+
}>]>>]>>;
|
|
330
|
+
}>]>>>;
|
|
331
|
+
}>, t.PartialC<{
|
|
332
|
+
description: t.StringC;
|
|
333
|
+
}>]>>;
|
|
334
|
+
declare type SharedSlice = t.TypeOf<typeof SharedSlice>;
|
|
335
|
+
export default SharedSlice;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
const t = __importStar(require("io-ts"));
|
|
26
|
+
const withFallback_1 = require("io-ts-types/lib/withFallback");
|
|
27
|
+
const NestableWidget_1 = __importDefault(require("../nestable/NestableWidget"));
|
|
28
|
+
const SlicesTypes_1 = __importDefault(require("./SlicesTypes"));
|
|
29
|
+
const IMAGE_PLACEHOLDER_URL = 'https://images.prismic.io/slice-machine/621a5ec4-0387-4bc5-9860-2dd46cbc07cd_default_ss.png?auto=compress,format';
|
|
30
|
+
const Variation = t.exact(t.intersection([
|
|
31
|
+
t.type({
|
|
32
|
+
id: t.string,
|
|
33
|
+
name: t.string,
|
|
34
|
+
description: t.string,
|
|
35
|
+
imageUrl: (0, withFallback_1.withFallback)(t.string, IMAGE_PLACEHOLDER_URL),
|
|
36
|
+
docURL: t.string,
|
|
37
|
+
version: t.string
|
|
38
|
+
}),
|
|
39
|
+
t.partial({
|
|
40
|
+
display: t.string,
|
|
41
|
+
primary: t.record(t.string, NestableWidget_1.default),
|
|
42
|
+
items: t.record(t.string, NestableWidget_1.default)
|
|
43
|
+
})
|
|
44
|
+
]));
|
|
45
|
+
const SharedSlice = t.exact(t.intersection([
|
|
46
|
+
t.type({
|
|
47
|
+
id: t.string,
|
|
48
|
+
type: t.literal(SlicesTypes_1.default.SharedSlice),
|
|
49
|
+
name: t.string,
|
|
50
|
+
variations: t.array(Variation)
|
|
51
|
+
}),
|
|
52
|
+
t.partial({
|
|
53
|
+
description: t.string
|
|
54
|
+
})
|
|
55
|
+
]));
|
|
56
|
+
exports.default = SharedSlice;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as t from 'io-ts';
|
|
2
|
+
import SlicesTypes from './SlicesTypes';
|
|
3
|
+
declare const SharedSliceRef: t.ExactC<t.TypeC<{
|
|
4
|
+
type: t.LiteralC<SlicesTypes.SharedSlice>;
|
|
5
|
+
}>>;
|
|
6
|
+
declare type SharedSliceRef = t.TypeOf<typeof SharedSliceRef>;
|
|
7
|
+
export default SharedSliceRef;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
const t = __importStar(require("io-ts"));
|
|
26
|
+
const SlicesTypes_1 = __importDefault(require("./SlicesTypes"));
|
|
27
|
+
const SharedSliceRef = t.exact(t.type({
|
|
28
|
+
type: t.literal(SlicesTypes_1.default.SharedSlice)
|
|
29
|
+
}));
|
|
30
|
+
exports.default = SharedSliceRef;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import SharedSlice from "./SharedSlice";
|
|
2
|
+
import CompositeSlice from "./CompositeSlice";
|
|
3
|
+
import LegacySlice from "./LegacySlice";
|
|
4
|
+
import SharedSliceRef from "./SharedSliceRef";
|
|
5
|
+
export declare type DynamicSlice = CompositeSlice | LegacySlice | SharedSliceRef;
|
|
6
|
+
export declare type StaticSlice = CompositeSlice | LegacySlice | SharedSlice;
|