@prismicio/types-internal 3.11.0-alpha.0 → 3.11.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.
@@ -1,500 +0,0 @@
1
- import * as t from "io-ts";
2
- export declare const TableBlockLegacy: t.Type<{
3
- type: "table";
4
- content: {
5
- type: "tableRow";
6
- content: ({
7
- type: "tableHeader";
8
- content: ({
9
- type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table";
10
- content: {
11
- text: string;
12
- } & {
13
- spans?: ({
14
- data: ({
15
- __TYPE__: "ImageLink";
16
- } & {
17
- kind: "image";
18
- id: string;
19
- url: string;
20
- height: string;
21
- width: string;
22
- size: string;
23
- name: string;
24
- } & {
25
- date?: string | null | undefined;
26
- }) | ({
27
- __TYPE__: "FileLink";
28
- } & {
29
- kind: "file";
30
- id: string;
31
- url: string;
32
- name: string;
33
- size: string;
34
- } & {
35
- date?: string | null | undefined;
36
- }) | ({
37
- __TYPE__: "DocumentLink";
38
- } & {
39
- id: string;
40
- }) | ({
41
- __TYPE__: "ExternalLink";
42
- } & {
43
- url: string;
44
- } & {
45
- kind?: "web";
46
- target?: string | null | undefined;
47
- preview?: {
48
- title?: string;
49
- } | null | undefined;
50
- });
51
- start: number;
52
- end: number;
53
- type: "hyperlink";
54
- } | {
55
- data: string;
56
- start: number;
57
- end: number;
58
- type: "label";
59
- } | {
60
- start: number;
61
- end: number;
62
- type: "strong" | "em" | "list-item";
63
- })[];
64
- };
65
- } & {
66
- label?: string;
67
- direction?: string;
68
- })[];
69
- } | {
70
- type: "tableCell";
71
- content: ({
72
- type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table";
73
- content: {
74
- text: string;
75
- } & {
76
- spans?: ({
77
- data: ({
78
- __TYPE__: "ImageLink";
79
- } & {
80
- kind: "image";
81
- id: string;
82
- url: string;
83
- height: string;
84
- width: string;
85
- size: string;
86
- name: string;
87
- } & {
88
- date?: string | null | undefined;
89
- }) | ({
90
- __TYPE__: "FileLink";
91
- } & {
92
- kind: "file";
93
- id: string;
94
- url: string;
95
- name: string;
96
- size: string;
97
- } & {
98
- date?: string | null | undefined;
99
- }) | ({
100
- __TYPE__: "DocumentLink";
101
- } & {
102
- id: string;
103
- }) | ({
104
- __TYPE__: "ExternalLink";
105
- } & {
106
- url: string;
107
- } & {
108
- kind?: "web";
109
- target?: string | null | undefined;
110
- preview?: {
111
- title?: string;
112
- } | null | undefined;
113
- });
114
- start: number;
115
- end: number;
116
- type: "hyperlink";
117
- } | {
118
- data: string;
119
- start: number;
120
- end: number;
121
- type: "label";
122
- } | {
123
- start: number;
124
- end: number;
125
- type: "strong" | "em" | "list-item";
126
- })[];
127
- };
128
- } & {
129
- label?: string;
130
- direction?: string;
131
- })[];
132
- })[];
133
- }[];
134
- }, {
135
- content: {
136
- type: "tableRow";
137
- content: ({
138
- type: "tableHeader";
139
- content: ({
140
- type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table";
141
- content: {
142
- text: string;
143
- } & {
144
- spans?: ({
145
- data: ({
146
- __TYPE__: "ImageLink";
147
- } & {
148
- kind: "image";
149
- id: string;
150
- url: string;
151
- height: string;
152
- width: string;
153
- size: string;
154
- name: string;
155
- } & {
156
- date?: string | null | undefined;
157
- }) | ({
158
- __TYPE__: "FileLink";
159
- } & {
160
- kind: "file";
161
- id: string;
162
- url: string;
163
- name: string;
164
- size: string;
165
- } & {
166
- date?: string | null | undefined;
167
- }) | ({
168
- __TYPE__: "DocumentLink";
169
- } & {
170
- id: string;
171
- }) | ({
172
- __TYPE__: "ExternalLink";
173
- } & {
174
- url: string;
175
- } & {
176
- kind?: "web";
177
- target?: string | null | undefined;
178
- preview?: {
179
- title?: string;
180
- } | null | undefined;
181
- });
182
- start: number;
183
- end: number;
184
- type: "hyperlink";
185
- } | {
186
- data: string;
187
- start: number;
188
- end: number;
189
- type: "label";
190
- } | {
191
- start: number;
192
- end: number;
193
- type: "strong" | "em" | "list-item";
194
- })[];
195
- };
196
- } & {
197
- label?: string;
198
- direction?: string;
199
- })[];
200
- } | {
201
- type: "tableCell";
202
- content: ({
203
- type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table";
204
- content: {
205
- text: string;
206
- } & {
207
- spans?: ({
208
- data: ({
209
- __TYPE__: "ImageLink";
210
- } & {
211
- kind: "image";
212
- id: string;
213
- url: string;
214
- height: string;
215
- width: string;
216
- size: string;
217
- name: string;
218
- } & {
219
- date?: string | null | undefined;
220
- }) | ({
221
- __TYPE__: "FileLink";
222
- } & {
223
- kind: "file";
224
- id: string;
225
- url: string;
226
- name: string;
227
- size: string;
228
- } & {
229
- date?: string | null | undefined;
230
- }) | ({
231
- __TYPE__: "DocumentLink";
232
- } & {
233
- id: string;
234
- }) | ({
235
- __TYPE__: "ExternalLink";
236
- } & {
237
- url: string;
238
- } & {
239
- kind?: "web";
240
- target?: string | null | undefined;
241
- preview?: {
242
- title?: string;
243
- } | null | undefined;
244
- });
245
- start: number;
246
- end: number;
247
- type: "hyperlink";
248
- } | {
249
- data: string;
250
- start: number;
251
- end: number;
252
- type: "label";
253
- } | {
254
- start: number;
255
- end: number;
256
- type: "strong" | "em" | "list-item";
257
- })[];
258
- };
259
- } & {
260
- label?: string;
261
- direction?: string;
262
- })[];
263
- })[];
264
- }[];
265
- }, unknown>;
266
- export declare type TableBlockLegacy = t.TypeOf<typeof TableBlockLegacy>;
267
- export declare const TableBlock: t.ExactC<t.TypeC<{
268
- type: t.LiteralC<"table">;
269
- content: t.ArrayC<t.ExactC<t.TypeC<{
270
- type: t.LiteralC<"tableRow">;
271
- content: t.ArrayC<t.UnionC<[t.ExactC<t.TypeC<{
272
- type: t.LiteralC<"tableHeader">;
273
- content: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
274
- type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table", unknown>;
275
- content: t.IntersectionC<[t.TypeC<{
276
- text: t.StringC;
277
- }>, t.PartialC<{
278
- spans: t.Type<({
279
- data: ({
280
- __TYPE__: "ImageLink";
281
- } & {
282
- kind: "image";
283
- id: string;
284
- url: string;
285
- height: string;
286
- width: string;
287
- size: string;
288
- name: string;
289
- } & {
290
- date?: string | null | undefined;
291
- }) | ({
292
- __TYPE__: "FileLink";
293
- } & {
294
- kind: "file";
295
- id: string;
296
- url: string;
297
- name: string;
298
- size: string;
299
- } & {
300
- date?: string | null | undefined;
301
- }) | ({
302
- __TYPE__: "DocumentLink";
303
- } & {
304
- id: string;
305
- }) | ({
306
- __TYPE__: "ExternalLink";
307
- } & {
308
- url: string;
309
- } & {
310
- kind?: "web";
311
- target?: string | null | undefined;
312
- preview?: {
313
- title?: string;
314
- } | null | undefined;
315
- });
316
- start: number;
317
- end: number;
318
- type: "hyperlink";
319
- } | {
320
- data: string;
321
- start: number;
322
- end: number;
323
- type: "label";
324
- } | {
325
- start: number;
326
- end: number;
327
- type: "strong" | "em" | "list-item";
328
- })[], ({
329
- data: ({
330
- __TYPE__: "ImageLink";
331
- } & {
332
- kind: "image";
333
- id: string;
334
- url: string;
335
- height: string;
336
- width: string;
337
- size: string;
338
- name: string;
339
- } & {
340
- date?: string | null | undefined;
341
- }) | ({
342
- __TYPE__: "FileLink";
343
- } & {
344
- kind: "file";
345
- id: string;
346
- url: string;
347
- name: string;
348
- size: string;
349
- } & {
350
- date?: string | null | undefined;
351
- }) | ({
352
- __TYPE__: "DocumentLink";
353
- } & {
354
- id: string;
355
- }) | ({
356
- __TYPE__: "ExternalLink";
357
- } & {
358
- url: string;
359
- } & {
360
- kind?: "web";
361
- target?: string | null | undefined;
362
- preview?: {
363
- title?: string;
364
- } | null | undefined;
365
- });
366
- start: number;
367
- end: number;
368
- type: "hyperlink";
369
- } | {
370
- data: string;
371
- start: number;
372
- end: number;
373
- type: "label";
374
- } | {
375
- start: number;
376
- end: number;
377
- type: "strong" | "em" | "list-item";
378
- })[], unknown>;
379
- }>]>;
380
- }>, t.PartialC<{
381
- label: t.StringC;
382
- direction: t.StringC;
383
- }>]>>>;
384
- }>>, t.ExactC<t.TypeC<{
385
- type: t.LiteralC<"tableCell">;
386
- content: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
387
- type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl" | "table", unknown>;
388
- content: t.IntersectionC<[t.TypeC<{
389
- text: t.StringC;
390
- }>, t.PartialC<{
391
- spans: t.Type<({
392
- data: ({
393
- __TYPE__: "ImageLink";
394
- } & {
395
- kind: "image";
396
- id: string;
397
- url: string;
398
- height: string;
399
- width: string;
400
- size: string;
401
- name: string;
402
- } & {
403
- date?: string | null | undefined;
404
- }) | ({
405
- __TYPE__: "FileLink";
406
- } & {
407
- kind: "file";
408
- id: string;
409
- url: string;
410
- name: string;
411
- size: string;
412
- } & {
413
- date?: string | null | undefined;
414
- }) | ({
415
- __TYPE__: "DocumentLink";
416
- } & {
417
- id: string;
418
- }) | ({
419
- __TYPE__: "ExternalLink";
420
- } & {
421
- url: string;
422
- } & {
423
- kind?: "web";
424
- target?: string | null | undefined;
425
- preview?: {
426
- title?: string;
427
- } | null | undefined;
428
- });
429
- start: number;
430
- end: number;
431
- type: "hyperlink";
432
- } | {
433
- data: string;
434
- start: number;
435
- end: number;
436
- type: "label";
437
- } | {
438
- start: number;
439
- end: number;
440
- type: "strong" | "em" | "list-item";
441
- })[], ({
442
- data: ({
443
- __TYPE__: "ImageLink";
444
- } & {
445
- kind: "image";
446
- id: string;
447
- url: string;
448
- height: string;
449
- width: string;
450
- size: string;
451
- name: string;
452
- } & {
453
- date?: string | null | undefined;
454
- }) | ({
455
- __TYPE__: "FileLink";
456
- } & {
457
- kind: "file";
458
- id: string;
459
- url: string;
460
- name: string;
461
- size: string;
462
- } & {
463
- date?: string | null | undefined;
464
- }) | ({
465
- __TYPE__: "DocumentLink";
466
- } & {
467
- id: string;
468
- }) | ({
469
- __TYPE__: "ExternalLink";
470
- } & {
471
- url: string;
472
- } & {
473
- kind?: "web";
474
- target?: string | null | undefined;
475
- preview?: {
476
- title?: string;
477
- } | null | undefined;
478
- });
479
- start: number;
480
- end: number;
481
- type: "hyperlink";
482
- } | {
483
- data: string;
484
- start: number;
485
- end: number;
486
- type: "label";
487
- } | {
488
- start: number;
489
- end: number;
490
- type: "strong" | "em" | "list-item";
491
- })[], unknown>;
492
- }>]>;
493
- }>, t.PartialC<{
494
- label: t.StringC;
495
- direction: t.StringC;
496
- }>]>>>;
497
- }>>]>>;
498
- }>>>;
499
- }>>;
500
- export declare type TableBlock = t.TypeOf<typeof TableBlock>;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TableBlock = exports.TableBlockLegacy = void 0;
4
- const tslib_1 = require("tslib");
5
- const fp_ts_1 = require("fp-ts");
6
- const function_1 = require("fp-ts/lib/function");
7
- const t = (0, tslib_1.__importStar)(require("io-ts"));
8
- const nestable_1 = require("../../../../customtypes/widgets/nestable");
9
- const TableContent_1 = require("../TableContent");
10
- exports.TableBlockLegacy = new t.Type("TableBlockLegacy", (u) => u.type === "table", (block) => {
11
- return (0, function_1.pipe)(TableContent_1.tableContentLegacyCodec.decode(block), fp_ts_1.either.map((parseBlock) => ({
12
- type: nestable_1.RichTextNodeType.table,
13
- content: parseBlock.content.map(TableContent_1.TableRow.encode),
14
- })));
15
- }, (tableBlock) => {
16
- return TableContent_1.tableContentLegacyCodec.encode(tableBlock);
17
- });
18
- exports.TableBlock = t.exact(t.type({
19
- type: t.literal(nestable_1.RichTextNodeType.table),
20
- content: t.array(TableContent_1.TableRow),
21
- }));