@prismicio/types-internal 1.4.1 → 1.5.1-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/CustomType.d.ts +2972 -0
- package/lib/content/CustomType.js +15 -0
- package/lib/content/fields/UIDContent.d.ts +7 -0
- package/lib/content/fields/UIDContent.js +11 -0
- package/lib/content/fields/index.d.ts +2990 -0
- package/lib/content/fields/index.js +19 -0
- package/lib/content/fields/nestable/EmbedContent.d.ts +1 -0
- package/lib/content/fields/nestable/EmbedContent.js +2 -1
- package/lib/content/fields/nestable/ImageContent.d.ts +25 -0
- package/lib/content/fields/nestable/ImageContent.js +2 -1
- package/lib/content/fields/nestable/LinkContent.d.ts +7 -0
- package/lib/content/fields/nestable/LinkContent.js +8 -1
- package/lib/content/fields/nestable/NestableContent.d.ts +17 -0
- package/lib/content/fields/nestable/NestableContent.js +13 -1
- package/lib/content/fields/nestable/RichTextContent.d.ts +249 -0
- package/lib/content/fields/nestable/RichTextContent.js +6 -1
- package/lib/content/fields/slices/CompositeSliceContent.d.ts +743 -0
- package/lib/content/fields/slices/CompositeSliceContent.js +14 -0
- package/lib/content/fields/slices/RepeatableContent.d.ts +371 -0
- package/lib/content/fields/slices/RepeatableContent.js +16 -0
- package/lib/content/fields/slices/SharedSliceContent.js +2 -2
- package/lib/content/fields/slices/SimpleSliceContent.d.ts +741 -0
- package/lib/content/fields/slices/SimpleSliceContent.js +8 -0
- package/lib/content/fields/slices/SlicesContent.d.ts +4453 -0
- package/lib/content/fields/slices/SlicesContent.js +24 -0
- package/lib/content/fields/slices/index.d.ts +3 -0
- package/lib/content/fields/slices/index.js +3 -0
- package/lib/content/index.d.ts +1 -0
- package/lib/content/index.js +1 -0
- package/lib/customtypes/index.d.ts +1 -1
- package/lib/customtypes/index.js +1 -1
- package/package.json +2 -1
- package/src/content/CustomType.ts +21 -0
- package/src/content/fields/UIDContent.ts +11 -0
- package/src/content/fields/index.ts +24 -0
- package/src/content/fields/nestable/EmbedContent.ts +3 -2
- package/src/content/fields/nestable/ImageContent.ts +4 -0
- package/src/content/fields/nestable/LinkContent.ts +8 -0
- package/src/content/fields/nestable/NestableContent.ts +26 -7
- package/src/content/fields/nestable/RichTextContent.ts +18 -0
- package/src/content/fields/slices/CompositeSliceContent.ts +14 -0
- package/src/content/fields/slices/RepeatableContent.ts +15 -0
- package/src/content/fields/slices/SharedSliceContent.ts +2 -2
- package/src/content/fields/slices/SimpleSliceContent.ts +7 -0
- package/src/content/fields/slices/SlicesContent.ts +28 -0
- package/src/content/fields/slices/index.ts +3 -0
- package/src/content/index.ts +1 -0
- package/src/customtypes/index.ts +1 -1
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WidgetTypes = exports.WidgetContent = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
|
+
const GroupContent_1 = require("./GroupContent");
|
|
7
|
+
const nestable_1 = require("./nestable");
|
|
8
|
+
const slices_1 = require("./slices");
|
|
9
|
+
const UIDContent_1 = require("./UIDContent");
|
|
4
10
|
(0, tslib_1.__exportStar)(require("./GroupContent"), exports);
|
|
5
11
|
(0, tslib_1.__exportStar)(require("./nestable"), exports);
|
|
6
12
|
(0, tslib_1.__exportStar)(require("./slices"), exports);
|
|
13
|
+
(0, tslib_1.__exportStar)(require("./UIDContent"), exports);
|
|
14
|
+
exports.WidgetContent = t.union([
|
|
15
|
+
GroupContent_1.GroupContent,
|
|
16
|
+
nestable_1.NestableContent,
|
|
17
|
+
UIDContent_1.UIDContent,
|
|
18
|
+
slices_1.SlicesContent,
|
|
19
|
+
]);
|
|
20
|
+
exports.WidgetTypes = {
|
|
21
|
+
...nestable_1.NestableTypes,
|
|
22
|
+
UID: UIDContent_1.UIDContentType,
|
|
23
|
+
Group: GroupContent_1.GroupContentType,
|
|
24
|
+
slices: slices_1.SlicesContentType,
|
|
25
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EmbedContent = void 0;
|
|
3
|
+
exports.EmbedContentType = exports.EmbedContent = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
6
|
const EmbedContent_1 = require("../../../documents/widgets/nestable/EmbedContent");
|
|
@@ -11,3 +11,4 @@ exports.EmbedContent = t.intersection([
|
|
|
11
11
|
all: t.unknown,
|
|
12
12
|
}),
|
|
13
13
|
]);
|
|
14
|
+
exports.EmbedContentType = EmbedContent_1.EmbedContentType;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as t from "io-ts";
|
|
2
|
+
import { ImageContentView as view } from "../../../documents/widgets/nestable/ImageContent";
|
|
2
3
|
export declare const ImageContent: t.IntersectionC<[t.Type<{
|
|
3
4
|
origin: {
|
|
4
5
|
id: string;
|
|
@@ -102,3 +103,27 @@ export declare const ImageContent: t.IntersectionC<[t.Type<{
|
|
|
102
103
|
}>>]>;
|
|
103
104
|
export declare type ImageContent = t.TypeOf<typeof ImageContent>;
|
|
104
105
|
export declare const ImageContentType = "ImageContent";
|
|
106
|
+
export declare const ImageContentView: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
107
|
+
origin: t.ExactC<t.TypeC<{
|
|
108
|
+
id: t.StringC;
|
|
109
|
+
url: t.StringC;
|
|
110
|
+
width: t.NumberC;
|
|
111
|
+
height: t.NumberC;
|
|
112
|
+
}>>;
|
|
113
|
+
width: t.NumberC;
|
|
114
|
+
height: t.NumberC;
|
|
115
|
+
edit: t.TypeC<{
|
|
116
|
+
zoom: t.NumberC;
|
|
117
|
+
crop: t.TypeC<{
|
|
118
|
+
x: t.NumberC;
|
|
119
|
+
y: t.NumberC;
|
|
120
|
+
}>;
|
|
121
|
+
background: t.StringC;
|
|
122
|
+
}>;
|
|
123
|
+
}>, t.PartialC<{
|
|
124
|
+
url: t.StringC;
|
|
125
|
+
credits: t.Type<string | null, string | null, unknown>;
|
|
126
|
+
alt: t.Type<string | null, string | null, unknown>;
|
|
127
|
+
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
128
|
+
}>]>>;
|
|
129
|
+
export declare type ImageContentView = view;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ImageContentType = exports.ImageContent = void 0;
|
|
3
|
+
exports.ImageContentView = exports.ImageContentType = exports.ImageContent = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
6
|
const ImageContent_1 = require("../../../documents/widgets/nestable/ImageContent");
|
|
@@ -11,3 +11,4 @@ exports.ImageContent = t.intersection([
|
|
|
11
11
|
}),
|
|
12
12
|
]);
|
|
13
13
|
exports.ImageContentType = ImageContent_1.ImageContentType;
|
|
14
|
+
exports.ImageContentView = ImageContent_1.ImageContentView;
|
|
@@ -159,3 +159,10 @@ export declare const LinkContent: t.ExactC<t.TypeC<{
|
|
|
159
159
|
}>>;
|
|
160
160
|
export declare type LinkContent = t.TypeOf<typeof LinkContent>;
|
|
161
161
|
export declare const LinkContentType = "LinkContent";
|
|
162
|
+
export declare const LinksTypes: {
|
|
163
|
+
readonly DocumentLink: "DocumentLink";
|
|
164
|
+
readonly FileLink: "FileLink";
|
|
165
|
+
readonly ExternalLink: "ExternalLink";
|
|
166
|
+
readonly ImageLink: "ImageLink";
|
|
167
|
+
readonly LinkContent: "LinkContent";
|
|
168
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LinkContentType = exports.LinkContent = exports.ExternalLinkType = exports.ExternalLinkContent = exports.DocumentLinkType = exports.DocumentLinkContent = exports.FileLinkType = exports.FileLinkContent = exports.ImageLinkType = exports.ImageLinkContent = void 0;
|
|
3
|
+
exports.LinksTypes = exports.LinkContentType = exports.LinkContent = exports.ExternalLinkType = exports.ExternalLinkContent = exports.DocumentLinkType = exports.DocumentLinkContent = exports.FileLinkType = exports.FileLinkContent = exports.ImageLinkType = exports.ImageLinkContent = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
6
|
const io_ts_types_1 = require("io-ts-types");
|
|
@@ -48,3 +48,10 @@ exports.LinkContent = t.strict({
|
|
|
48
48
|
]),
|
|
49
49
|
});
|
|
50
50
|
exports.LinkContentType = LinkContent_1.LinkContentType;
|
|
51
|
+
exports.LinksTypes = {
|
|
52
|
+
DocumentLink: exports.DocumentLinkType,
|
|
53
|
+
FileLink: exports.FileLinkType,
|
|
54
|
+
ExternalLink: exports.ExternalLinkType,
|
|
55
|
+
ImageLink: exports.ImageLinkType,
|
|
56
|
+
LinkContent: exports.LinkContentType,
|
|
57
|
+
};
|
|
@@ -367,3 +367,20 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
|
|
|
367
367
|
__TYPE__: t.LiteralC<"SeparatorContent">;
|
|
368
368
|
}>>]>;
|
|
369
369
|
export declare type NestableContent = t.TypeOf<typeof NestableContent>;
|
|
370
|
+
export declare const NestableTypes: {
|
|
371
|
+
readonly Links: {
|
|
372
|
+
readonly DocumentLink: "DocumentLink";
|
|
373
|
+
readonly FileLink: "FileLink";
|
|
374
|
+
readonly ExternalLink: "ExternalLink";
|
|
375
|
+
readonly ImageLink: "ImageLink";
|
|
376
|
+
readonly LinkContent: "LinkContent";
|
|
377
|
+
};
|
|
378
|
+
readonly RichText: "StructuredTextContent";
|
|
379
|
+
readonly Boolean: "BooleanContent";
|
|
380
|
+
readonly Embed: "EmbedContent";
|
|
381
|
+
readonly Field: "FieldContent";
|
|
382
|
+
readonly GeoPoint: "GeoPointContent";
|
|
383
|
+
readonly Image: "ImageContent";
|
|
384
|
+
readonly IntegrationFields: "IntegrationFieldsContent";
|
|
385
|
+
readonly Separator: "SeparatorContent";
|
|
386
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NestableContent = void 0;
|
|
3
|
+
exports.NestableTypes = exports.NestableContent = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
|
+
const nestable_1 = require("../../../documents/widgets/nestable");
|
|
6
7
|
const BooleanContent_1 = require("./BooleanContent");
|
|
7
8
|
const EmbedContent_1 = require("./EmbedContent");
|
|
8
9
|
const FieldContent_1 = require("./FieldContent");
|
|
@@ -23,3 +24,14 @@ exports.NestableContent = t.union([
|
|
|
23
24
|
RichTextContent_1.RichTextContent,
|
|
24
25
|
SeparatorContent_1.SeparatorContent,
|
|
25
26
|
]);
|
|
27
|
+
exports.NestableTypes = {
|
|
28
|
+
Links: LinkContent_1.LinksTypes,
|
|
29
|
+
RichText: nestable_1.StructuredTextContentType,
|
|
30
|
+
Boolean: BooleanContent_1.BooleanContentType,
|
|
31
|
+
Embed: nestable_1.EmbedContentType,
|
|
32
|
+
Field: FieldContent_1.FieldContentType,
|
|
33
|
+
GeoPoint: GeoPointContent_1.GeoPointContentType,
|
|
34
|
+
Image: ImageContent_1.ImageContentType,
|
|
35
|
+
IntegrationFields: IntegrationFieldContent_1.IntegrationFieldsContentType,
|
|
36
|
+
Separator: SeparatorContent_1.SeparatorContentType,
|
|
37
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as t from "io-ts";
|
|
2
|
+
import { Block as b, EmbedBlock as eBlock, ImageBlock as iBlock, TextBlock as tBlock } from "../../../documents/widgets/nestable/StructuredTextContent/Block";
|
|
2
3
|
export declare const RichTextContent: t.ExactC<t.TypeC<{
|
|
3
4
|
__TYPE__: t.LiteralC<"StructuredTextContent">;
|
|
4
5
|
value: t.ArrayC<t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
@@ -125,3 +126,251 @@ export declare const RichTextContent: t.ExactC<t.TypeC<{
|
|
|
125
126
|
}>>;
|
|
126
127
|
export declare type RichTextContent = t.TypeOf<typeof RichTextContent>;
|
|
127
128
|
export declare const RichTextContentType = "StructuredTextContent";
|
|
129
|
+
export declare const TextBlock: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
130
|
+
type: t.Type<"paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl", "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
|
|
131
|
+
content: t.IntersectionC<[t.TypeC<{
|
|
132
|
+
text: t.StringC;
|
|
133
|
+
}>, t.PartialC<{
|
|
134
|
+
spans: t.Type<({
|
|
135
|
+
data?: unknown;
|
|
136
|
+
} & {
|
|
137
|
+
start: number;
|
|
138
|
+
end: number;
|
|
139
|
+
type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
|
|
140
|
+
})[], ({
|
|
141
|
+
data?: unknown;
|
|
142
|
+
} & {
|
|
143
|
+
start: number;
|
|
144
|
+
end: number;
|
|
145
|
+
type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
|
|
146
|
+
})[], unknown>;
|
|
147
|
+
}>]>;
|
|
148
|
+
}>, t.PartialC<{
|
|
149
|
+
label: t.StringC;
|
|
150
|
+
direction: t.StringC;
|
|
151
|
+
}>]>>;
|
|
152
|
+
export declare type TextBlock = tBlock;
|
|
153
|
+
export declare const ImageBlock: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
154
|
+
type: t.LiteralC<"image">;
|
|
155
|
+
data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
156
|
+
origin: t.ExactC<t.TypeC<{
|
|
157
|
+
id: t.StringC;
|
|
158
|
+
url: t.StringC;
|
|
159
|
+
width: t.NumberC;
|
|
160
|
+
height: t.NumberC;
|
|
161
|
+
}>>;
|
|
162
|
+
width: t.NumberC;
|
|
163
|
+
height: t.NumberC;
|
|
164
|
+
edit: t.TypeC<{
|
|
165
|
+
zoom: t.NumberC;
|
|
166
|
+
crop: t.TypeC<{
|
|
167
|
+
x: t.NumberC;
|
|
168
|
+
y: t.NumberC;
|
|
169
|
+
}>;
|
|
170
|
+
background: t.StringC;
|
|
171
|
+
}>;
|
|
172
|
+
}>, t.PartialC<{
|
|
173
|
+
url: t.StringC;
|
|
174
|
+
credits: t.Type<string | null, string | null, unknown>;
|
|
175
|
+
alt: t.Type<string | null, string | null, unknown>;
|
|
176
|
+
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
177
|
+
}>]>>, t.PartialC<{
|
|
178
|
+
linkTo: t.UnionC<[t.Type<{
|
|
179
|
+
id: string;
|
|
180
|
+
} | ({
|
|
181
|
+
url: string;
|
|
182
|
+
} & {
|
|
183
|
+
kind?: "web";
|
|
184
|
+
target?: string | null | undefined;
|
|
185
|
+
preview?: {
|
|
186
|
+
title?: string;
|
|
187
|
+
} | null | undefined;
|
|
188
|
+
}) | ({
|
|
189
|
+
id: string;
|
|
190
|
+
url: string;
|
|
191
|
+
name: string;
|
|
192
|
+
kind: string;
|
|
193
|
+
} & {
|
|
194
|
+
date?: string | null | undefined;
|
|
195
|
+
size?: string;
|
|
196
|
+
}) | ({
|
|
197
|
+
id: string;
|
|
198
|
+
url: string;
|
|
199
|
+
height: string;
|
|
200
|
+
width: string;
|
|
201
|
+
size: string;
|
|
202
|
+
name: string;
|
|
203
|
+
kind: string;
|
|
204
|
+
} & {
|
|
205
|
+
date?: string | null | undefined;
|
|
206
|
+
}), ({
|
|
207
|
+
id: string;
|
|
208
|
+
} & {
|
|
209
|
+
__TYPE__: "DocumentLink";
|
|
210
|
+
}) | ({
|
|
211
|
+
url: string;
|
|
212
|
+
} & {
|
|
213
|
+
kind?: "web";
|
|
214
|
+
target?: string | null | undefined;
|
|
215
|
+
preview?: {
|
|
216
|
+
title?: string;
|
|
217
|
+
} | null | undefined;
|
|
218
|
+
} & {
|
|
219
|
+
__TYPE__: "ExternalLink";
|
|
220
|
+
}) | {
|
|
221
|
+
readonly size: string;
|
|
222
|
+
readonly __TYPE__: "FileLink";
|
|
223
|
+
readonly id: string;
|
|
224
|
+
readonly url: string;
|
|
225
|
+
readonly name: string;
|
|
226
|
+
readonly kind: string;
|
|
227
|
+
readonly date?: string | null | undefined;
|
|
228
|
+
} | ({
|
|
229
|
+
id: string;
|
|
230
|
+
url: string;
|
|
231
|
+
height: string;
|
|
232
|
+
width: string;
|
|
233
|
+
size: string;
|
|
234
|
+
name: string;
|
|
235
|
+
kind: string;
|
|
236
|
+
} & {
|
|
237
|
+
date?: string | null | undefined;
|
|
238
|
+
} & {
|
|
239
|
+
__TYPE__: "ImageLink";
|
|
240
|
+
}), unknown>, t.NullC, t.UndefinedC]>;
|
|
241
|
+
}>]>;
|
|
242
|
+
}>, t.PartialC<{
|
|
243
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
244
|
+
direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
245
|
+
}>]>>;
|
|
246
|
+
export declare type ImageBlock = iBlock;
|
|
247
|
+
export declare const EmbedBlock: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
248
|
+
type: t.LiteralC<"embed">;
|
|
249
|
+
data: t.Type<import("../../../documents/widgets/nestable").EmbedContentO, unknown, unknown>;
|
|
250
|
+
}>, t.PartialC<{
|
|
251
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
252
|
+
direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
253
|
+
}>]>>;
|
|
254
|
+
export declare type EmbedBlock = eBlock;
|
|
255
|
+
export declare const Block: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
256
|
+
type: t.LiteralC<"image">;
|
|
257
|
+
data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
258
|
+
origin: t.ExactC<t.TypeC<{
|
|
259
|
+
id: t.StringC;
|
|
260
|
+
url: t.StringC;
|
|
261
|
+
width: t.NumberC;
|
|
262
|
+
height: t.NumberC;
|
|
263
|
+
}>>;
|
|
264
|
+
width: t.NumberC;
|
|
265
|
+
height: t.NumberC;
|
|
266
|
+
edit: t.TypeC<{
|
|
267
|
+
zoom: t.NumberC;
|
|
268
|
+
crop: t.TypeC<{
|
|
269
|
+
x: t.NumberC;
|
|
270
|
+
y: t.NumberC;
|
|
271
|
+
}>;
|
|
272
|
+
background: t.StringC;
|
|
273
|
+
}>;
|
|
274
|
+
}>, t.PartialC<{
|
|
275
|
+
url: t.StringC;
|
|
276
|
+
credits: t.Type<string | null, string | null, unknown>;
|
|
277
|
+
alt: t.Type<string | null, string | null, unknown>;
|
|
278
|
+
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
279
|
+
}>]>>, t.PartialC<{
|
|
280
|
+
linkTo: t.UnionC<[t.Type<{
|
|
281
|
+
id: string;
|
|
282
|
+
} | ({
|
|
283
|
+
url: string;
|
|
284
|
+
} & {
|
|
285
|
+
kind?: "web";
|
|
286
|
+
target?: string | null | undefined;
|
|
287
|
+
preview?: {
|
|
288
|
+
title?: string;
|
|
289
|
+
} | null | undefined;
|
|
290
|
+
}) | ({
|
|
291
|
+
id: string;
|
|
292
|
+
url: string;
|
|
293
|
+
name: string;
|
|
294
|
+
kind: string;
|
|
295
|
+
} & {
|
|
296
|
+
date?: string | null | undefined;
|
|
297
|
+
size?: string;
|
|
298
|
+
}) | ({
|
|
299
|
+
id: string;
|
|
300
|
+
url: string;
|
|
301
|
+
height: string;
|
|
302
|
+
width: string;
|
|
303
|
+
size: string;
|
|
304
|
+
name: string;
|
|
305
|
+
kind: string;
|
|
306
|
+
} & {
|
|
307
|
+
date?: string | null | undefined;
|
|
308
|
+
}), ({
|
|
309
|
+
id: string;
|
|
310
|
+
} & {
|
|
311
|
+
__TYPE__: "DocumentLink";
|
|
312
|
+
}) | ({
|
|
313
|
+
url: string;
|
|
314
|
+
} & {
|
|
315
|
+
kind?: "web";
|
|
316
|
+
target?: string | null | undefined;
|
|
317
|
+
preview?: {
|
|
318
|
+
title?: string;
|
|
319
|
+
} | null | undefined;
|
|
320
|
+
} & {
|
|
321
|
+
__TYPE__: "ExternalLink";
|
|
322
|
+
}) | {
|
|
323
|
+
readonly size: string;
|
|
324
|
+
readonly __TYPE__: "FileLink";
|
|
325
|
+
readonly id: string;
|
|
326
|
+
readonly url: string;
|
|
327
|
+
readonly name: string;
|
|
328
|
+
readonly kind: string;
|
|
329
|
+
readonly date?: string | null | undefined;
|
|
330
|
+
} | ({
|
|
331
|
+
id: string;
|
|
332
|
+
url: string;
|
|
333
|
+
height: string;
|
|
334
|
+
width: string;
|
|
335
|
+
size: string;
|
|
336
|
+
name: string;
|
|
337
|
+
kind: string;
|
|
338
|
+
} & {
|
|
339
|
+
date?: string | null | undefined;
|
|
340
|
+
} & {
|
|
341
|
+
__TYPE__: "ImageLink";
|
|
342
|
+
}), unknown>, t.NullC, t.UndefinedC]>;
|
|
343
|
+
}>]>;
|
|
344
|
+
}>, t.PartialC<{
|
|
345
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
346
|
+
direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
347
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
348
|
+
type: t.LiteralC<"embed">;
|
|
349
|
+
data: t.Type<import("../../../documents/widgets/nestable").EmbedContentO, unknown, unknown>;
|
|
350
|
+
}>, t.PartialC<{
|
|
351
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
352
|
+
direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
353
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
354
|
+
type: t.Type<"paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl", "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
|
|
355
|
+
content: t.IntersectionC<[t.TypeC<{
|
|
356
|
+
text: t.StringC;
|
|
357
|
+
}>, t.PartialC<{
|
|
358
|
+
spans: t.Type<({
|
|
359
|
+
data?: unknown;
|
|
360
|
+
} & {
|
|
361
|
+
start: number;
|
|
362
|
+
end: number;
|
|
363
|
+
type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
|
|
364
|
+
})[], ({
|
|
365
|
+
data?: unknown;
|
|
366
|
+
} & {
|
|
367
|
+
start: number;
|
|
368
|
+
end: number;
|
|
369
|
+
type: "label" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "image" | "embed" | "list-item" | "o-list-item" | "rtl";
|
|
370
|
+
})[], unknown>;
|
|
371
|
+
}>]>;
|
|
372
|
+
}>, t.PartialC<{
|
|
373
|
+
label: t.StringC;
|
|
374
|
+
direction: t.StringC;
|
|
375
|
+
}>]>>]>;
|
|
376
|
+
export declare type Block = b;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RichTextContentType = exports.RichTextContent = void 0;
|
|
3
|
+
exports.Block = exports.EmbedBlock = exports.ImageBlock = exports.TextBlock = exports.RichTextContentType = exports.RichTextContent = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
6
|
const StructuredTextContent_1 = require("../../../documents/widgets/nestable/StructuredTextContent");
|
|
7
|
+
const Block_1 = require("../../../documents/widgets/nestable/StructuredTextContent/Block");
|
|
7
8
|
exports.RichTextContent = t.strict({
|
|
8
9
|
__TYPE__: t.literal(StructuredTextContent_1.StructuredTextContentType),
|
|
9
10
|
value: t.array(StructuredTextContent_1.Blocks.Block),
|
|
10
11
|
});
|
|
11
12
|
exports.RichTextContentType = StructuredTextContent_1.StructuredTextContentType;
|
|
13
|
+
exports.TextBlock = Block_1.TextBlock;
|
|
14
|
+
exports.ImageBlock = Block_1.ImageBlock;
|
|
15
|
+
exports.EmbedBlock = Block_1.EmbedBlock;
|
|
16
|
+
exports.Block = Block_1.Block;
|