@prismicio/types-internal 3.5.0 → 3.7.0-alpha.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.
Files changed (32) hide show
  1. package/lib/content/Document.d.ts +1972 -1588
  2. package/lib/content/fields/GroupContent.js +6 -9
  3. package/lib/content/fields/RepeatableContent.d.ts +51 -123
  4. package/lib/content/fields/RepeatableContent.js +10 -14
  5. package/lib/content/fields/WidgetContent.d.ts +1984 -1600
  6. package/lib/content/fields/nestable/NestableContent.d.ts +314 -250
  7. package/lib/content/fields/nestable/RichTextContent/Block.d.ts +1036 -0
  8. package/lib/content/fields/nestable/RichTextContent/Block.js +31 -0
  9. package/lib/content/fields/nestable/RichTextContent/EmbedBlock.d.ts +60 -0
  10. package/lib/content/fields/nestable/RichTextContent/EmbedBlock.js +53 -0
  11. package/lib/content/fields/nestable/RichTextContent/ImageBlock.d.ts +203 -0
  12. package/lib/content/fields/nestable/RichTextContent/ImageBlock.js +36 -0
  13. package/lib/content/fields/nestable/RichTextContent/TableBlock.d.ts +500 -0
  14. package/lib/content/fields/nestable/RichTextContent/TableBlock.js +21 -0
  15. package/lib/content/fields/nestable/RichTextContent/TextBlock.d.ts +590 -0
  16. package/lib/content/fields/nestable/RichTextContent/TextBlock.js +80 -0
  17. package/lib/content/fields/nestable/RichTextContent/index.d.ts +301 -0
  18. package/lib/content/fields/nestable/RichTextContent/index.js +4 -4
  19. package/lib/content/fields/nestable/TableContent.d.ts +412 -907
  20. package/lib/content/fields/nestable/TableContent.js +50 -59
  21. package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +628 -500
  22. package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +130 -118
  23. package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +628 -500
  24. package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +314 -250
  25. package/lib/content/fields/slices/Slice/SlicePrimaryContent.d.ts +314 -250
  26. package/lib/content/fields/slices/Slice/index.d.ts +1113 -923
  27. package/lib/content/fields/slices/SliceItem.d.ts +1110 -920
  28. package/lib/content/fields/slices/SlicesContent.d.ts +1573 -1253
  29. package/package.json +3 -2
  30. package/src/content/fields/GroupContent.ts +8 -16
  31. package/src/content/fields/nestable/RichTextContent/index.ts +6 -6
  32. package/src/content/fields/nestable/TableContent.ts +61 -84
@@ -8,670 +8,35 @@ export declare const isTableContent: (u: unknown) => u is {
8
8
  content: {
9
9
  type: "tableRow";
10
10
  content: ({
11
- type: "tableHeader";
11
+ type: "tableHeader" | "tableCell";
12
12
  content: {
13
13
  __TYPE__: "StructuredTextContent";
14
- value: ({
15
- type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
16
- content: {
17
- text: string;
18
- } & {
19
- spans?: ({
20
- data: ({
21
- __TYPE__: "ImageLink";
22
- } & {
23
- kind: "image";
24
- id: string;
25
- url: string;
26
- height: string;
27
- width: string;
28
- size: string;
29
- name: string;
30
- } & {
31
- date?: string | null | undefined;
32
- }) | ({
33
- __TYPE__: "FileLink";
34
- } & {
35
- kind: "file";
36
- id: string;
37
- url: string;
38
- name: string;
39
- size: string;
40
- } & {
41
- date?: string | null | undefined;
42
- }) | ({
43
- __TYPE__: "DocumentLink";
44
- } & {
45
- id: string;
46
- }) | ({
47
- __TYPE__: "ExternalLink";
48
- } & {
49
- url: string;
50
- } & {
51
- kind?: "web";
52
- target?: string | null | undefined;
53
- preview?: {
54
- title?: string;
55
- } | null | undefined;
56
- });
57
- start: number;
58
- end: number;
59
- type: "hyperlink";
60
- } | {
61
- data: string;
62
- start: number;
63
- end: number;
64
- type: "label";
65
- } | {
66
- start: number;
67
- end: number;
68
- type: "strong" | "em" | "list-item";
69
- })[];
70
- };
71
- } & {
72
- label?: string;
73
- direction?: string;
74
- })[];
75
- };
76
- } | {
77
- type: "tableCell";
78
- content: {
79
- __TYPE__: "StructuredTextContent";
80
- value: ({
81
- type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
82
- content: {
83
- text: string;
84
- } & {
85
- spans?: ({
86
- data: ({
87
- __TYPE__: "ImageLink";
88
- } & {
89
- kind: "image";
90
- id: string;
91
- url: string;
92
- height: string;
93
- width: string;
94
- size: string;
95
- name: string;
96
- } & {
97
- date?: string | null | undefined;
98
- }) | ({
99
- __TYPE__: "FileLink";
100
- } & {
101
- kind: "file";
102
- id: string;
103
- url: string;
104
- name: string;
105
- size: string;
106
- } & {
107
- date?: string | null | undefined;
108
- }) | ({
109
- __TYPE__: "DocumentLink";
110
- } & {
111
- id: string;
112
- }) | ({
113
- __TYPE__: "ExternalLink";
114
- } & {
115
- url: string;
116
- } & {
117
- kind?: "web";
118
- target?: string | null | undefined;
119
- preview?: {
120
- title?: string;
121
- } | null | undefined;
122
- });
123
- start: number;
124
- end: number;
125
- type: "hyperlink";
126
- } | {
127
- data: string;
128
- start: number;
129
- end: number;
130
- type: "label";
131
- } | {
132
- start: number;
133
- end: number;
134
- type: "strong" | "em" | "list-item";
135
- })[];
136
- };
137
- } & {
138
- label?: string;
139
- direction?: string;
140
- })[];
141
- };
142
- })[];
143
- }[];
144
- };
145
- export declare const TableCellContent: t.ExactC<t.TypeC<{
146
- __TYPE__: t.LiteralC<"StructuredTextContent">;
147
- value: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
148
- type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
149
- content: t.IntersectionC<[t.TypeC<{
150
- text: t.StringC;
151
- }>, t.PartialC<{
152
- spans: t.Type<({
153
- data: ({
154
- __TYPE__: "ImageLink";
155
- } & {
156
- kind: "image";
157
- id: string;
158
- url: string;
159
- height: string;
160
- width: string;
161
- size: string;
162
- name: string;
163
- } & {
164
- date?: string | null | undefined;
165
- }) | ({
166
- __TYPE__: "FileLink";
167
- } & {
168
- kind: "file";
169
- id: string;
170
- url: string;
171
- name: string;
172
- size: string;
173
- } & {
174
- date?: string | null | undefined;
175
- }) | ({
176
- __TYPE__: "DocumentLink";
177
- } & {
178
- id: string;
179
- }) | ({
180
- __TYPE__: "ExternalLink";
181
- } & {
182
- url: string;
183
- } & {
184
- kind?: "web";
185
- target?: string | null | undefined;
186
- preview?: {
187
- title?: string;
188
- } | null | undefined;
189
- });
190
- start: number;
191
- end: number;
192
- type: "hyperlink";
193
- } | {
194
- data: string;
195
- start: number;
196
- end: number;
197
- type: "label";
198
- } | {
199
- start: number;
200
- end: number;
201
- type: "strong" | "em" | "list-item";
202
- })[], ({
203
- data: ({
204
- __TYPE__: "ImageLink";
205
- } & {
206
- kind: "image";
207
- id: string;
208
- url: string;
209
- height: string;
210
- width: string;
211
- size: string;
212
- name: string;
213
- } & {
214
- date?: string | null | undefined;
215
- }) | ({
216
- __TYPE__: "FileLink";
217
- } & {
218
- kind: "file";
219
- id: string;
220
- url: string;
221
- name: string;
222
- size: string;
223
- } & {
224
- date?: string | null | undefined;
225
- }) | ({
226
- __TYPE__: "DocumentLink";
227
- } & {
228
- id: string;
229
- }) | ({
230
- __TYPE__: "ExternalLink";
231
- } & {
232
- url: string;
233
- } & {
234
- kind?: "web";
235
- target?: string | null | undefined;
236
- preview?: {
237
- title?: string;
238
- } | null | undefined;
239
- });
240
- start: number;
241
- end: number;
242
- type: "hyperlink";
243
- } | {
244
- data: string;
245
- start: number;
246
- end: number;
247
- type: "label";
248
- } | {
249
- start: number;
250
- end: number;
251
- type: "strong" | "em" | "list-item";
252
- })[], unknown>;
253
- }>]>;
254
- }>, t.PartialC<{
255
- label: t.StringC;
256
- direction: t.StringC;
257
- }>]>>>;
258
- }>>;
259
- export declare type TableCellContent = t.TypeOf<typeof TableCellContent>;
260
- export declare const TableDataCell: t.ExactC<t.TypeC<{
261
- type: t.LiteralC<"tableCell">;
262
- content: t.ExactC<t.TypeC<{
263
- __TYPE__: t.LiteralC<"StructuredTextContent">;
264
- value: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
265
- type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
266
- content: t.IntersectionC<[t.TypeC<{
267
- text: t.StringC;
268
- }>, t.PartialC<{
269
- spans: t.Type<({
270
- data: ({
271
- __TYPE__: "ImageLink";
272
- } & {
273
- kind: "image";
274
- id: string;
275
- url: string;
276
- height: string;
277
- width: string;
278
- size: string;
279
- name: string;
280
- } & {
281
- date?: string | null | undefined;
282
- }) | ({
283
- __TYPE__: "FileLink";
284
- } & {
285
- kind: "file";
286
- id: string;
287
- url: string;
288
- name: string;
289
- size: string;
290
- } & {
291
- date?: string | null | undefined;
292
- }) | ({
293
- __TYPE__: "DocumentLink";
294
- } & {
295
- id: string;
296
- }) | ({
297
- __TYPE__: "ExternalLink";
298
- } & {
299
- url: string;
300
- } & {
301
- kind?: "web";
302
- target?: string | null | undefined;
303
- preview?: {
304
- title?: string;
305
- } | null | undefined;
306
- });
307
- start: number;
308
- end: number;
309
- type: "hyperlink";
310
- } | {
311
- data: string;
312
- start: number;
313
- end: number;
314
- type: "label";
315
- } | {
316
- start: number;
317
- end: number;
318
- type: "strong" | "em" | "list-item";
319
- })[], ({
320
- data: ({
321
- __TYPE__: "ImageLink";
322
- } & {
323
- kind: "image";
324
- id: string;
325
- url: string;
326
- height: string;
327
- width: string;
328
- size: string;
329
- name: string;
330
- } & {
331
- date?: string | null | undefined;
332
- }) | ({
333
- __TYPE__: "FileLink";
334
- } & {
335
- kind: "file";
336
- id: string;
337
- url: string;
338
- name: string;
339
- size: string;
340
- } & {
341
- date?: string | null | undefined;
342
- }) | ({
343
- __TYPE__: "DocumentLink";
344
- } & {
345
- id: string;
346
- }) | ({
347
- __TYPE__: "ExternalLink";
348
- } & {
349
- url: string;
350
- } & {
351
- kind?: "web";
352
- target?: string | null | undefined;
353
- preview?: {
354
- title?: string;
355
- } | null | undefined;
356
- });
357
- start: number;
358
- end: number;
359
- type: "hyperlink";
360
- } | {
361
- data: string;
362
- start: number;
363
- end: number;
364
- type: "label";
365
- } | {
366
- start: number;
367
- end: number;
368
- type: "strong" | "em" | "list-item";
369
- })[], unknown>;
370
- }>]>;
371
- }>, t.PartialC<{
372
- label: t.StringC;
373
- direction: t.StringC;
374
- }>]>>>;
375
- }>>;
376
- }>>;
377
- export declare type TableDataCell = t.TypeOf<typeof TableDataCell>;
378
- export declare const TableHeaderCell: t.ExactC<t.TypeC<{
379
- type: t.LiteralC<"tableHeader">;
380
- content: t.ExactC<t.TypeC<{
381
- __TYPE__: t.LiteralC<"StructuredTextContent">;
382
- value: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
383
- type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
384
- content: t.IntersectionC<[t.TypeC<{
385
- text: t.StringC;
386
- }>, t.PartialC<{
387
- spans: t.Type<({
388
- data: ({
389
- __TYPE__: "ImageLink";
390
- } & {
391
- kind: "image";
392
- id: string;
393
- url: string;
394
- height: string;
395
- width: string;
396
- size: string;
397
- name: string;
398
- } & {
399
- date?: string | null | undefined;
400
- }) | ({
401
- __TYPE__: "FileLink";
402
- } & {
403
- kind: "file";
404
- id: string;
405
- url: string;
406
- name: string;
407
- size: string;
408
- } & {
409
- date?: string | null | undefined;
410
- }) | ({
411
- __TYPE__: "DocumentLink";
412
- } & {
413
- id: string;
414
- }) | ({
415
- __TYPE__: "ExternalLink";
416
- } & {
417
- url: string;
418
- } & {
419
- kind?: "web";
420
- target?: string | null | undefined;
421
- preview?: {
422
- title?: string;
423
- } | null | undefined;
424
- });
425
- start: number;
426
- end: number;
427
- type: "hyperlink";
428
- } | {
429
- data: string;
430
- start: number;
431
- end: number;
432
- type: "label";
433
- } | {
434
- start: number;
435
- end: number;
436
- type: "strong" | "em" | "list-item";
437
- })[], ({
438
- data: ({
439
- __TYPE__: "ImageLink";
440
- } & {
441
- kind: "image";
442
- id: string;
443
- url: string;
444
- height: string;
445
- width: string;
446
- size: string;
447
- name: string;
448
- } & {
449
- date?: string | null | undefined;
450
- }) | ({
451
- __TYPE__: "FileLink";
452
- } & {
453
- kind: "file";
454
- id: string;
455
- url: string;
456
- name: string;
457
- size: string;
458
- } & {
459
- date?: string | null | undefined;
460
- }) | ({
461
- __TYPE__: "DocumentLink";
462
- } & {
463
- id: string;
464
- }) | ({
465
- __TYPE__: "ExternalLink";
466
- } & {
467
- url: string;
468
- } & {
469
- kind?: "web";
470
- target?: string | null | undefined;
471
- preview?: {
472
- title?: string;
473
- } | null | undefined;
474
- });
475
- start: number;
476
- end: number;
477
- type: "hyperlink";
478
- } | {
479
- data: string;
480
- start: number;
481
- end: number;
482
- type: "label";
483
- } | {
484
- start: number;
485
- end: number;
486
- type: "strong" | "em" | "list-item";
487
- })[], unknown>;
488
- }>]>;
489
- }>, t.PartialC<{
490
- label: t.StringC;
491
- direction: t.StringC;
492
- }>]>>>;
493
- }>>;
494
- }>>;
495
- export declare type TableHeaderCell = t.TypeOf<typeof TableHeaderCell>;
496
- export declare const TableRow: t.ExactC<t.TypeC<{
497
- type: t.LiteralC<"tableRow">;
498
- content: t.ArrayC<t.UnionC<[t.ExactC<t.TypeC<{
499
- type: t.LiteralC<"tableHeader">;
500
- content: t.ExactC<t.TypeC<{
501
- __TYPE__: t.LiteralC<"StructuredTextContent">;
502
- value: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
503
- type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
504
- content: t.IntersectionC<[t.TypeC<{
505
- text: t.StringC;
506
- }>, t.PartialC<{
507
- spans: t.Type<({
508
- data: ({
509
- __TYPE__: "ImageLink";
510
- } & {
511
- kind: "image";
512
- id: string;
513
- url: string;
514
- height: string;
515
- width: string;
516
- size: string;
517
- name: string;
518
- } & {
519
- date?: string | null | undefined;
520
- }) | ({
521
- __TYPE__: "FileLink";
522
- } & {
523
- kind: "file";
524
- id: string;
525
- url: string;
526
- name: string;
527
- size: string;
528
- } & {
529
- date?: string | null | undefined;
530
- }) | ({
531
- __TYPE__: "DocumentLink";
532
- } & {
533
- id: string;
534
- }) | ({
535
- __TYPE__: "ExternalLink";
536
- } & {
537
- url: string;
538
- } & {
539
- kind?: "web";
540
- target?: string | null | undefined;
541
- preview?: {
542
- title?: string;
543
- } | null | undefined;
544
- });
545
- start: number;
546
- end: number;
547
- type: "hyperlink";
548
- } | {
549
- data: string;
550
- start: number;
551
- end: number;
552
- type: "label";
553
- } | {
554
- start: number;
555
- end: number;
556
- type: "strong" | "em" | "list-item";
557
- })[], ({
558
- data: ({
559
- __TYPE__: "ImageLink";
560
- } & {
561
- kind: "image";
562
- id: string;
563
- url: string;
564
- height: string;
565
- width: string;
566
- size: string;
567
- name: string;
568
- } & {
569
- date?: string | null | undefined;
570
- }) | ({
571
- __TYPE__: "FileLink";
572
- } & {
573
- kind: "file";
574
- id: string;
575
- url: string;
576
- name: string;
577
- size: string;
578
- } & {
579
- date?: string | null | undefined;
580
- }) | ({
581
- __TYPE__: "DocumentLink";
582
- } & {
583
- id: string;
584
- }) | ({
585
- __TYPE__: "ExternalLink";
586
- } & {
587
- url: string;
588
- } & {
589
- kind?: "web";
590
- target?: string | null | undefined;
591
- preview?: {
592
- title?: string;
593
- } | null | undefined;
594
- });
595
- start: number;
596
- end: number;
597
- type: "hyperlink";
598
- } | {
599
- data: string;
600
- start: number;
601
- end: number;
602
- type: "label";
603
- } | {
604
- start: number;
605
- end: number;
606
- type: "strong" | "em" | "list-item";
607
- })[], unknown>;
608
- }>]>;
609
- }>, t.PartialC<{
610
- label: t.StringC;
611
- direction: t.StringC;
612
- }>]>>>;
613
- }>>;
614
- }>>, t.ExactC<t.TypeC<{
615
- type: t.LiteralC<"tableCell">;
616
- content: t.ExactC<t.TypeC<{
617
- __TYPE__: t.LiteralC<"StructuredTextContent">;
618
- value: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
619
- type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
620
- content: t.IntersectionC<[t.TypeC<{
621
- text: t.StringC;
622
- }>, t.PartialC<{
623
- spans: t.Type<({
624
- data: ({
625
- __TYPE__: "ImageLink";
626
- } & {
627
- kind: "image";
628
- id: string;
629
- url: string;
630
- height: string;
631
- width: string;
632
- size: string;
633
- name: string;
634
- } & {
635
- date?: string | null | undefined;
636
- }) | ({
637
- __TYPE__: "FileLink";
638
- } & {
639
- kind: "file";
640
- id: string;
641
- url: string;
642
- name: string;
643
- size: string;
644
- } & {
645
- date?: string | null | undefined;
646
- }) | ({
647
- __TYPE__: "DocumentLink";
648
- } & {
14
+ value: (({
15
+ type: "image";
16
+ data: {
17
+ origin: {
649
18
  id: string;
650
- }) | ({
651
- __TYPE__: "ExternalLink";
652
- } & {
653
19
  url: string;
654
- } & {
655
- kind?: "web";
656
- target?: string | null | undefined;
657
- preview?: {
658
- title?: string;
659
- } | null | undefined;
660
- });
661
- start: number;
662
- end: number;
663
- type: "hyperlink";
664
- } | {
665
- data: string;
666
- start: number;
667
- end: number;
668
- type: "label";
669
- } | {
670
- start: number;
671
- end: number;
672
- type: "strong" | "em" | "list-item";
673
- })[], ({
674
- data: ({
20
+ width: number;
21
+ height: number;
22
+ };
23
+ width: number;
24
+ height: number;
25
+ edit: {
26
+ zoom: number;
27
+ crop: {
28
+ x: number;
29
+ y: number;
30
+ };
31
+ background: string;
32
+ };
33
+ } & {
34
+ url?: string;
35
+ credits?: string | null;
36
+ alt?: string | null;
37
+ provider?: string | null | undefined;
38
+ } & {
39
+ linkTo?: ({
675
40
  __TYPE__: "ImageLink";
676
41
  } & {
677
42
  kind: "image";
@@ -707,104 +72,36 @@ export declare const TableRow: t.ExactC<t.TypeC<{
707
72
  preview?: {
708
73
  title?: string;
709
74
  } | null | undefined;
710
- });
711
- start: number;
712
- end: number;
713
- type: "hyperlink";
714
- } | {
715
- data: string;
716
- start: number;
717
- end: number;
718
- type: "label";
719
- } | {
720
- start: number;
721
- end: number;
722
- type: "strong" | "em" | "list-item";
723
- })[], unknown>;
724
- }>]>;
725
- }>, t.PartialC<{
726
- label: t.StringC;
727
- direction: t.StringC;
728
- }>]>>>;
729
- }>>;
730
- }>>]>>;
731
- }>>;
732
- export declare type TableRow = t.TypeOf<typeof TableRow>;
733
- export declare const TableLegacy: (ctx: LegacyContentCtx) => t.Type<{
734
- __TYPE__: "TableContent";
735
- content: {
736
- type: "tableRow";
737
- content: ({
738
- type: "tableHeader";
739
- content: {
740
- __TYPE__: "StructuredTextContent";
741
- value: ({
742
- type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
743
- content: {
744
- text: string;
745
- } & {
746
- spans?: ({
747
- data: ({
748
- __TYPE__: "ImageLink";
749
- } & {
750
- kind: "image";
751
- id: string;
752
- url: string;
753
- height: string;
754
- width: string;
755
- size: string;
756
- name: string;
757
- } & {
758
- date?: string | null | undefined;
759
- }) | ({
760
- __TYPE__: "FileLink";
761
- } & {
762
- kind: "file";
763
- id: string;
764
- url: string;
765
- name: string;
766
- size: string;
767
- } & {
768
- date?: string | null | undefined;
769
- }) | ({
770
- __TYPE__: "DocumentLink";
771
- } & {
772
- id: string;
773
- }) | ({
774
- __TYPE__: "ExternalLink";
775
- } & {
776
- url: string;
777
- } & {
778
- kind?: "web";
779
- target?: string | null | undefined;
780
- preview?: {
781
- title?: string;
782
- } | null | undefined;
783
- });
784
- start: number;
785
- end: number;
786
- type: "hyperlink";
787
- } | {
788
- data: string;
789
- start: number;
790
- end: number;
791
- type: "label";
792
- } | {
793
- start: number;
794
- end: number;
795
- type: "strong" | "em" | "list-item";
796
- })[];
75
+ }) | null | undefined;
797
76
  };
798
77
  } & {
799
- label?: string;
800
- direction?: string;
801
- })[];
802
- };
803
- } | {
804
- type: "tableCell";
805
- content: {
806
- __TYPE__: "StructuredTextContent";
807
- value: ({
78
+ label?: string | null | undefined;
79
+ direction?: string | null | undefined;
80
+ }) | ({
81
+ type: "embed";
82
+ data: {
83
+ embed_url: string;
84
+ type: string;
85
+ } & {
86
+ version?: string | number | null;
87
+ title?: string | null | undefined;
88
+ author_name?: string | null | undefined;
89
+ author_url?: string | null | undefined;
90
+ provider_name?: string | null | undefined;
91
+ provider_url?: string | null | undefined;
92
+ cache_age?: string | number | null;
93
+ thumbnail_url?: string | null | undefined;
94
+ thumbnail_width?: number | null | undefined;
95
+ thumbnail_height?: number | null | undefined;
96
+ html?: string | null | undefined;
97
+ } & {
98
+ __TYPE__: "EmbedContent";
99
+ all: unknown;
100
+ };
101
+ } & {
102
+ label?: string | null | undefined;
103
+ direction?: string | null | undefined;
104
+ }) | ({
808
105
  type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
809
106
  content: {
810
107
  text: string;
@@ -864,22 +161,47 @@ export declare const TableLegacy: (ctx: LegacyContentCtx) => t.Type<{
864
161
  } & {
865
162
  label?: string;
866
163
  direction?: string;
867
- })[];
164
+ }))[];
868
165
  };
166
+ } & {
167
+ columnWidth?: number;
869
168
  })[];
870
169
  }[];
871
- }, WithTypes<{
872
- content: {
873
- type: "tableRow";
874
- content: ({
875
- type: "tableCell";
876
- content: ({
877
- type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
878
- content: {
879
- text: string;
880
- } & {
881
- spans?: ({
882
- data: ({
170
+ };
171
+ export declare const TableContent: t.ExactC<t.TypeC<{
172
+ __TYPE__: t.LiteralC<"TableContent">;
173
+ content: t.ArrayC<t.ExactC<t.TypeC<{
174
+ type: t.LiteralC<"tableRow">;
175
+ content: t.ArrayC<t.IntersectionC<[t.ExactC<t.TypeC<{
176
+ type: t.UnionC<[t.LiteralC<"tableHeader">, t.LiteralC<"tableCell">]>;
177
+ content: t.ExactC<t.TypeC<{
178
+ __TYPE__: t.LiteralC<"StructuredTextContent">;
179
+ value: t.ArrayC<t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
180
+ type: t.LiteralC<"image">;
181
+ data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
182
+ origin: t.ExactC<t.TypeC<{
183
+ id: t.StringC;
184
+ url: t.StringC;
185
+ width: t.NumberC;
186
+ height: t.NumberC;
187
+ }>>;
188
+ width: t.NumberC;
189
+ height: t.NumberC;
190
+ edit: t.TypeC<{
191
+ zoom: t.NumberC;
192
+ crop: t.TypeC<{
193
+ x: t.NumberC;
194
+ y: t.NumberC;
195
+ }>;
196
+ background: t.StringC;
197
+ }>;
198
+ }>, t.PartialC<{
199
+ url: t.StringC;
200
+ credits: t.Type<string | null, string | null, unknown>;
201
+ alt: t.Type<string | null, string | null, unknown>;
202
+ provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
203
+ }>]>>, t.PartialC<{
204
+ linkTo: t.UnionC<[t.Type<({
883
205
  __TYPE__: "ImageLink";
884
206
  } & {
885
207
  kind: "image";
@@ -915,34 +237,7 @@ export declare const TableLegacy: (ctx: LegacyContentCtx) => t.Type<{
915
237
  preview?: {
916
238
  title?: string;
917
239
  } | null | undefined;
918
- });
919
- start: number;
920
- end: number;
921
- type: "hyperlink";
922
- } | {
923
- data: string;
924
- start: number;
925
- end: number;
926
- type: "label";
927
- } | {
928
- start: number;
929
- end: number;
930
- type: "strong" | "em" | "list-item";
931
- })[];
932
- };
933
- } & {
934
- label?: string;
935
- direction?: string;
936
- })[];
937
- } | {
938
- type: "tableHeader";
939
- content: ({
940
- type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
941
- content: {
942
- text: string;
943
- } & {
944
- spans?: ({
945
- data: ({
240
+ }), ({
946
241
  __TYPE__: "ImageLink";
947
242
  } & {
948
243
  kind: "image";
@@ -971,44 +266,43 @@ export declare const TableLegacy: (ctx: LegacyContentCtx) => t.Type<{
971
266
  }) | ({
972
267
  __TYPE__: "ExternalLink";
973
268
  } & {
974
- url: string;
975
- } & {
976
- kind?: "web";
977
- target?: string | null | undefined;
978
- preview?: {
979
- title?: string;
980
- } | null | undefined;
981
- });
982
- start: number;
983
- end: number;
984
- type: "hyperlink";
985
- } | {
986
- data: string;
987
- start: number;
988
- end: number;
989
- type: "label";
990
- } | {
991
- start: number;
992
- end: number;
993
- type: "strong" | "em" | "list-item";
994
- })[];
995
- };
996
- } & {
997
- label?: string;
998
- direction?: string;
999
- })[];
1000
- })[];
1001
- }[];
1002
- }>, unknown>;
1003
- export declare const TableContent: t.ExactC<t.TypeC<{
1004
- __TYPE__: t.LiteralC<"TableContent">;
1005
- content: t.ArrayC<t.ExactC<t.TypeC<{
1006
- type: t.LiteralC<"tableRow">;
1007
- content: t.ArrayC<t.UnionC<[t.ExactC<t.TypeC<{
1008
- type: t.LiteralC<"tableHeader">;
1009
- content: t.ExactC<t.TypeC<{
1010
- __TYPE__: t.LiteralC<"StructuredTextContent">;
1011
- value: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
269
+ url: string;
270
+ } & {
271
+ kind?: "web";
272
+ target?: string | null | undefined;
273
+ preview?: {
274
+ title?: string;
275
+ } | null | undefined;
276
+ }), unknown>, t.NullC, t.UndefinedC]>;
277
+ }>]>;
278
+ }>, t.PartialC<{
279
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
280
+ direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
281
+ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
282
+ type: t.LiteralC<"embed">;
283
+ data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
284
+ embed_url: t.StringC;
285
+ type: t.StringC;
286
+ }>, t.PartialC<{
287
+ version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
288
+ title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
289
+ author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
290
+ author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
291
+ provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
292
+ provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
293
+ cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
294
+ thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
295
+ thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
296
+ thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
297
+ html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
298
+ }>]>>, t.ExactC<t.TypeC<{
299
+ __TYPE__: t.LiteralC<"EmbedContent">;
300
+ all: t.UnknownC;
301
+ }>>]>;
302
+ }>, t.PartialC<{
303
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
304
+ direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
305
+ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
1012
306
  type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
1013
307
  content: t.IntersectionC<[t.TypeC<{
1014
308
  text: t.StringC;
@@ -1118,68 +412,118 @@ export declare const TableContent: t.ExactC<t.TypeC<{
1118
412
  }>, t.PartialC<{
1119
413
  label: t.StringC;
1120
414
  direction: t.StringC;
1121
- }>]>>>;
415
+ }>]>>]>>;
1122
416
  }>>;
1123
- }>>, t.ExactC<t.TypeC<{
1124
- type: t.LiteralC<"tableCell">;
1125
- content: t.ExactC<t.TypeC<{
1126
- __TYPE__: t.LiteralC<"StructuredTextContent">;
1127
- value: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
1128
- type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
1129
- content: t.IntersectionC<[t.TypeC<{
1130
- text: t.StringC;
1131
- }>, t.PartialC<{
1132
- spans: t.Type<({
1133
- data: ({
1134
- __TYPE__: "ImageLink";
1135
- } & {
1136
- kind: "image";
1137
- id: string;
1138
- url: string;
1139
- height: string;
1140
- width: string;
1141
- size: string;
1142
- name: string;
1143
- } & {
1144
- date?: string | null | undefined;
1145
- }) | ({
1146
- __TYPE__: "FileLink";
1147
- } & {
1148
- kind: "file";
1149
- id: string;
1150
- url: string;
1151
- name: string;
1152
- size: string;
1153
- } & {
1154
- date?: string | null | undefined;
1155
- }) | ({
1156
- __TYPE__: "DocumentLink";
1157
- } & {
1158
- id: string;
1159
- }) | ({
1160
- __TYPE__: "ExternalLink";
1161
- } & {
1162
- url: string;
1163
- } & {
1164
- kind?: "web";
1165
- target?: string | null | undefined;
1166
- preview?: {
1167
- title?: string;
1168
- } | null | undefined;
1169
- });
1170
- start: number;
1171
- end: number;
1172
- type: "hyperlink";
1173
- } | {
1174
- data: string;
1175
- start: number;
1176
- end: number;
1177
- type: "label";
1178
- } | {
1179
- start: number;
1180
- end: number;
1181
- type: "strong" | "em" | "list-item";
1182
- })[], ({
417
+ }>>, t.PartialC<{
418
+ columnWidth: t.NumberC;
419
+ }>]>>;
420
+ }>>>;
421
+ }>>;
422
+ export declare type TableContent = t.TypeOf<typeof TableContent>;
423
+ export declare const TableLegacy: (ctx: LegacyContentCtx) => t.Type<{
424
+ __TYPE__: "TableContent";
425
+ content: {
426
+ type: "tableRow";
427
+ content: ({
428
+ type: "tableHeader" | "tableCell";
429
+ content: {
430
+ __TYPE__: "StructuredTextContent";
431
+ value: (({
432
+ type: "image";
433
+ data: {
434
+ origin: {
435
+ id: string;
436
+ url: string;
437
+ width: number;
438
+ height: number;
439
+ };
440
+ width: number;
441
+ height: number;
442
+ edit: {
443
+ zoom: number;
444
+ crop: {
445
+ x: number;
446
+ y: number;
447
+ };
448
+ background: string;
449
+ };
450
+ } & {
451
+ url?: string;
452
+ credits?: string | null;
453
+ alt?: string | null;
454
+ provider?: string | null | undefined;
455
+ } & {
456
+ linkTo?: ({
457
+ __TYPE__: "ImageLink";
458
+ } & {
459
+ kind: "image";
460
+ id: string;
461
+ url: string;
462
+ height: string;
463
+ width: string;
464
+ size: string;
465
+ name: string;
466
+ } & {
467
+ date?: string | null | undefined;
468
+ }) | ({
469
+ __TYPE__: "FileLink";
470
+ } & {
471
+ kind: "file";
472
+ id: string;
473
+ url: string;
474
+ name: string;
475
+ size: string;
476
+ } & {
477
+ date?: string | null | undefined;
478
+ }) | ({
479
+ __TYPE__: "DocumentLink";
480
+ } & {
481
+ id: string;
482
+ }) | ({
483
+ __TYPE__: "ExternalLink";
484
+ } & {
485
+ url: string;
486
+ } & {
487
+ kind?: "web";
488
+ target?: string | null | undefined;
489
+ preview?: {
490
+ title?: string;
491
+ } | null | undefined;
492
+ }) | null | undefined;
493
+ };
494
+ } & {
495
+ label?: string | null | undefined;
496
+ direction?: string | null | undefined;
497
+ }) | ({
498
+ type: "embed";
499
+ data: {
500
+ embed_url: string;
501
+ type: string;
502
+ } & {
503
+ version?: string | number | null;
504
+ title?: string | null | undefined;
505
+ author_name?: string | null | undefined;
506
+ author_url?: string | null | undefined;
507
+ provider_name?: string | null | undefined;
508
+ provider_url?: string | null | undefined;
509
+ cache_age?: string | number | null;
510
+ thumbnail_url?: string | null | undefined;
511
+ thumbnail_width?: number | null | undefined;
512
+ thumbnail_height?: number | null | undefined;
513
+ html?: string | null | undefined;
514
+ } & {
515
+ __TYPE__: "EmbedContent";
516
+ all: unknown;
517
+ };
518
+ } & {
519
+ label?: string | null | undefined;
520
+ direction?: string | null | undefined;
521
+ }) | ({
522
+ type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
523
+ content: {
524
+ text: string;
525
+ } & {
526
+ spans?: ({
1183
527
  data: ({
1184
528
  __TYPE__: "ImageLink";
1185
529
  } & {
@@ -1229,17 +573,178 @@ export declare const TableContent: t.ExactC<t.TypeC<{
1229
573
  start: number;
1230
574
  end: number;
1231
575
  type: "strong" | "em" | "list-item";
1232
- })[], unknown>;
1233
- }>]>;
1234
- }>, t.PartialC<{
1235
- label: t.StringC;
1236
- direction: t.StringC;
1237
- }>]>>>;
1238
- }>>;
1239
- }>>]>>;
1240
- }>>>;
1241
- }>>;
1242
- export declare type TableContent = t.TypeOf<typeof TableContent>;
576
+ })[];
577
+ };
578
+ } & {
579
+ label?: string;
580
+ direction?: string;
581
+ }))[];
582
+ };
583
+ } & {
584
+ columnWidth?: number;
585
+ })[];
586
+ }[];
587
+ }, WithTypes<{
588
+ content: {
589
+ type: "tableRow";
590
+ content: ({
591
+ type: "tableHeader" | "tableCell";
592
+ content: (({
593
+ type: "image";
594
+ data: {
595
+ origin: {
596
+ id: string;
597
+ url: string;
598
+ width: number;
599
+ height: number;
600
+ };
601
+ width: number;
602
+ height: number;
603
+ edit: {
604
+ zoom: number;
605
+ crop: {
606
+ x: number;
607
+ y: number;
608
+ };
609
+ background: string;
610
+ };
611
+ } & {
612
+ url?: string;
613
+ credits?: string | null;
614
+ alt?: string | null;
615
+ provider?: string | null | undefined;
616
+ } & {
617
+ linkTo?: ({
618
+ __TYPE__: "ImageLink";
619
+ } & {
620
+ kind: "image";
621
+ id: string;
622
+ url: string;
623
+ height: string;
624
+ width: string;
625
+ size: string;
626
+ name: string;
627
+ } & {
628
+ date?: string | null | undefined;
629
+ }) | ({
630
+ __TYPE__: "FileLink";
631
+ } & {
632
+ kind: "file";
633
+ id: string;
634
+ url: string;
635
+ name: string;
636
+ size: string;
637
+ } & {
638
+ date?: string | null | undefined;
639
+ }) | ({
640
+ __TYPE__: "DocumentLink";
641
+ } & {
642
+ id: string;
643
+ }) | ({
644
+ __TYPE__: "ExternalLink";
645
+ } & {
646
+ url: string;
647
+ } & {
648
+ kind?: "web";
649
+ target?: string | null | undefined;
650
+ preview?: {
651
+ title?: string;
652
+ } | null | undefined;
653
+ }) | null | undefined;
654
+ };
655
+ } & {
656
+ label?: string | null | undefined;
657
+ direction?: string | null | undefined;
658
+ }) | ({
659
+ type: "embed";
660
+ data: {
661
+ embed_url: string;
662
+ type: string;
663
+ } & {
664
+ version?: string | number | null;
665
+ title?: string | null | undefined;
666
+ author_name?: string | null | undefined;
667
+ author_url?: string | null | undefined;
668
+ provider_name?: string | null | undefined;
669
+ provider_url?: string | null | undefined;
670
+ cache_age?: string | number | null;
671
+ thumbnail_url?: string | null | undefined;
672
+ thumbnail_width?: number | null | undefined;
673
+ thumbnail_height?: number | null | undefined;
674
+ html?: string | null | undefined;
675
+ } & {
676
+ __TYPE__: "EmbedContent";
677
+ all: unknown;
678
+ };
679
+ } & {
680
+ label?: string | null | undefined;
681
+ direction?: string | null | undefined;
682
+ }) | ({
683
+ type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
684
+ content: {
685
+ text: string;
686
+ } & {
687
+ spans?: ({
688
+ data: ({
689
+ __TYPE__: "ImageLink";
690
+ } & {
691
+ kind: "image";
692
+ id: string;
693
+ url: string;
694
+ height: string;
695
+ width: string;
696
+ size: string;
697
+ name: string;
698
+ } & {
699
+ date?: string | null | undefined;
700
+ }) | ({
701
+ __TYPE__: "FileLink";
702
+ } & {
703
+ kind: "file";
704
+ id: string;
705
+ url: string;
706
+ name: string;
707
+ size: string;
708
+ } & {
709
+ date?: string | null | undefined;
710
+ }) | ({
711
+ __TYPE__: "DocumentLink";
712
+ } & {
713
+ id: string;
714
+ }) | ({
715
+ __TYPE__: "ExternalLink";
716
+ } & {
717
+ url: string;
718
+ } & {
719
+ kind?: "web";
720
+ target?: string | null | undefined;
721
+ preview?: {
722
+ title?: string;
723
+ } | null | undefined;
724
+ });
725
+ start: number;
726
+ end: number;
727
+ type: "hyperlink";
728
+ } | {
729
+ data: string;
730
+ start: number;
731
+ end: number;
732
+ type: "label";
733
+ } | {
734
+ start: number;
735
+ end: number;
736
+ type: "strong" | "em" | "list-item";
737
+ })[];
738
+ };
739
+ } & {
740
+ label?: string;
741
+ direction?: string;
742
+ }))[];
743
+ } & {
744
+ columnWidth?: number;
745
+ })[];
746
+ }[];
747
+ }>, unknown>;
1243
748
  export declare function traverseTableContent({ path, key, apiId, model, content, }: {
1244
749
  path: ContentPath;
1245
750
  key: string;