@financial-times/content-tree 0.1.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.
@@ -0,0 +1,1461 @@
1
+ export declare namespace ContentTree {
2
+ type LayoutWidth = "auto" | "in-line" | "inset-left" | "inset-right" | "full-bleed" | "full-grid" | "mid-grid" | "full-width";
3
+ interface Node {
4
+ type: string;
5
+ data?: any;
6
+ }
7
+ interface Parent extends Node {
8
+ children: Node[];
9
+ }
10
+ interface Root extends Node {
11
+ type: "root";
12
+ body: Body;
13
+ }
14
+ interface Body extends Parent {
15
+ type: "body";
16
+ version: number;
17
+ children: BodyBlock[];
18
+ }
19
+ type BodyBlock = FormattingBlock | StoryBlock;
20
+ type FormattingBlock = Paragraph | Heading | List | Blockquote | ThematicBreak | Text;
21
+ interface Text extends Node {
22
+ type: "text";
23
+ value: string;
24
+ }
25
+ type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Link | FindOutMoreLink;
26
+ interface Break extends Node {
27
+ type: "break";
28
+ }
29
+ interface ThematicBreak extends Node {
30
+ type: "thematic-break";
31
+ }
32
+ interface Paragraph extends Parent {
33
+ type: "paragraph";
34
+ children: Phrasing[];
35
+ }
36
+ interface Heading extends Parent {
37
+ type: "heading";
38
+ children: Text[];
39
+ level: "chapter" | "subheading" | "label";
40
+ fragmentIdentifier?: string;
41
+ }
42
+ interface Strong extends Parent {
43
+ type: "strong";
44
+ children: Phrasing[];
45
+ }
46
+ interface Emphasis extends Parent {
47
+ type: "emphasis";
48
+ children: Phrasing[];
49
+ }
50
+ interface Strikethrough extends Parent {
51
+ type: "strikethrough";
52
+ children: Phrasing[];
53
+ }
54
+ interface Link extends Parent {
55
+ type: "link";
56
+ url: string;
57
+ title: string;
58
+ children: Phrasing[];
59
+ }
60
+ interface FindOutMoreLink extends Parent {
61
+ type: "find-out-more-link";
62
+ url: string;
63
+ title: string;
64
+ children: Phrasing[];
65
+ }
66
+ interface List extends Parent {
67
+ type: "list";
68
+ ordered: boolean;
69
+ children: ListItem[];
70
+ }
71
+ interface ListItem extends Parent {
72
+ type: "list-item";
73
+ children: (Paragraph | Phrasing)[];
74
+ }
75
+ interface Blockquote extends Parent {
76
+ type: "blockquote";
77
+ children: (Paragraph | Phrasing)[];
78
+ }
79
+ type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
80
+ interface Pullquote extends Node {
81
+ type: "pullquote";
82
+ text: string;
83
+ source?: string;
84
+ }
85
+ interface ImageSet extends Node {
86
+ type: "image-set";
87
+ id: string;
88
+ picture: ImageSetPicture;
89
+ fragmentIdentifier?: string;
90
+ }
91
+ type ImageSetPicture = {
92
+ layoutWidth: string;
93
+ imageType: "image" | "graphic";
94
+ alt: string;
95
+ caption: string;
96
+ credit: string;
97
+ images: Image[];
98
+ fallbackImage: Image;
99
+ };
100
+ type Image = {
101
+ id: string;
102
+ width: number;
103
+ height: number;
104
+ format: "desktop" | "mobile" | "square" | "square-ftedit" | "standard" | "wide" | "standard-inline";
105
+ url: string;
106
+ sourceSet?: ImageSource[];
107
+ };
108
+ type ImageSource = {
109
+ url: string;
110
+ width: number;
111
+ dpr: number;
112
+ };
113
+ interface Recommended extends Node {
114
+ type: "recommended";
115
+ id: string;
116
+ heading?: string;
117
+ teaserTitleOverride?: string;
118
+ teaser: Teaser;
119
+ }
120
+ interface RecommendedList extends Node {
121
+ type: "recommended-list";
122
+ heading?: string;
123
+ children: Recommended[];
124
+ }
125
+ type TeaserConcept = {
126
+ apiUrl: string;
127
+ directType: string;
128
+ id: string;
129
+ predicate: string;
130
+ prefLabel: string;
131
+ type: string;
132
+ types: string[];
133
+ url: string;
134
+ };
135
+ type Teaser = {
136
+ id: string;
137
+ url: string;
138
+ type: "article" | "video" | "podcast" | "audio" | "package" | "liveblog" | "promoted-content" | "paid-post";
139
+ title: string;
140
+ publishedDate: string;
141
+ firstPublishedDate: string;
142
+ metaLink?: TeaserConcept;
143
+ metaAltLink?: TeaserConcept;
144
+ metaPrefixText?: string;
145
+ metaSuffixText?: string;
146
+ indicators: {
147
+ accessLevel: "premium" | "subscribed" | "registered" | "free";
148
+ isOpinion?: boolean;
149
+ isColumn?: boolean;
150
+ isPodcast?: boolean;
151
+ isEditorsChoice?: boolean;
152
+ isExclusive?: boolean;
153
+ isScoop?: boolean;
154
+ };
155
+ image: {
156
+ url: string;
157
+ width: number;
158
+ height: number;
159
+ };
160
+ clientName?: string;
161
+ };
162
+ interface Tweet extends Node {
163
+ id: string;
164
+ type: "tweet";
165
+ html: string;
166
+ }
167
+ type FlourishLayoutWidth = Extract<LayoutWidth, "full-grid" | "in-line">;
168
+ interface Flourish extends Node {
169
+ type: "flourish";
170
+ id: string;
171
+ layoutWidth: FlourishLayoutWidth;
172
+ flourishType: string;
173
+ description?: string;
174
+ timestamp?: string;
175
+ fallbackImage?: Image;
176
+ fragmentIdentifier?: string;
177
+ }
178
+ interface BigNumber extends Node {
179
+ type: "big-number";
180
+ number: string;
181
+ description: string;
182
+ }
183
+ interface Video extends Node {
184
+ type: "video";
185
+ id: string;
186
+ title: string;
187
+ }
188
+ interface YoutubeVideo extends Node {
189
+ type: "youtube-video";
190
+ url: string;
191
+ }
192
+ interface ScrollyBlock extends Parent {
193
+ type: "scrolly-block";
194
+ theme: "sans" | "serif";
195
+ children: ScrollySection[];
196
+ }
197
+ interface ScrollySection extends Parent {
198
+ type: "scrolly-section";
199
+ display: "dark-background" | "light-background";
200
+ noBox?: true;
201
+ position: "left" | "center" | "right";
202
+ transition?: "delay-before" | "delay-after";
203
+ children: [ScrollyImage, ...ScrollyCopy[]];
204
+ }
205
+ interface ScrollyImage extends Node {
206
+ type: "scrolly-image";
207
+ id: string;
208
+ picture: ImageSetPicture;
209
+ }
210
+ interface ScrollyCopy extends Parent {
211
+ type: "scrolly-copy";
212
+ children: (ScrollyHeading | Paragraph)[];
213
+ }
214
+ interface ScrollyHeading extends Parent {
215
+ type: "scrolly-heading";
216
+ level: "chapter" | "heading" | "subheading";
217
+ children: Text[];
218
+ }
219
+ interface Layout extends Parent {
220
+ type: "layout";
221
+ layoutName: "auto" | "card" | "timeline";
222
+ layoutWidth: string;
223
+ children: [Heading, LayoutImage, ...LayoutSlot[]] | [Heading, ...LayoutSlot[]] | LayoutSlot[];
224
+ }
225
+ interface LayoutSlot extends Parent {
226
+ type: "layout-slot";
227
+ children: (Heading | Paragraph | LayoutImage)[];
228
+ }
229
+ interface LayoutImage extends Node {
230
+ type: "layout-image";
231
+ id: string;
232
+ alt: string;
233
+ caption: string;
234
+ credit: string;
235
+ picture: ImageSetPicture;
236
+ }
237
+ type TableColumnSettings = {
238
+ hideOnMobile: boolean;
239
+ sortable: boolean;
240
+ sortType: 'text' | 'number' | 'date' | 'currency' | 'percent';
241
+ };
242
+ type TableLayoutWidth = Extract<LayoutWidth, 'auto' | 'full-grid' | 'inset-left' | 'inset-right' | 'full-bleed'>;
243
+ interface TableCaption extends Parent {
244
+ type: 'table-caption';
245
+ children: Phrasing[];
246
+ }
247
+ interface TableCell extends Parent {
248
+ type: 'table-cell';
249
+ heading?: boolean;
250
+ columnSpan?: number;
251
+ rowSpan?: number;
252
+ children: Phrasing[];
253
+ }
254
+ interface TableRow extends Parent {
255
+ type: 'table-row';
256
+ children: TableCell[];
257
+ }
258
+ interface TableBody extends Parent {
259
+ type: 'table-body';
260
+ children: TableRow[];
261
+ }
262
+ interface TableFooter extends Parent {
263
+ type: 'table-footer';
264
+ children: Phrasing[];
265
+ }
266
+ interface Table extends Parent {
267
+ type: 'table';
268
+ stripes: boolean;
269
+ compact: boolean;
270
+ layoutWidth: TableLayoutWidth;
271
+ collapseAfterHowManyRows?: number;
272
+ responsiveStyle: 'overflow' | 'flat' | 'scroll';
273
+ children: [TableCaption, TableBody, TableFooter] | [TableCaption, TableBody] | [TableBody, TableFooter] | [TableBody];
274
+ columnSettings: TableColumnSettings[];
275
+ }
276
+ type CustomCodeComponentAttributes = {
277
+ [key: string]: string | boolean | undefined;
278
+ };
279
+ interface CustomCodeComponent extends Node {
280
+ /** Component type */
281
+ type: "custom-code-component";
282
+ /** Id taken from the CAPI url */
283
+ id: string;
284
+ /** How the component should be presented in the article page according to the column layout system */
285
+ layoutWidth: LayoutWidth;
286
+ /** Repository for the code of the component in the format "[github org]/[github repo]/[component name]". */
287
+ path: string;
288
+ /** Semantic version of the code of the component, e.g. "^0.3.5". */
289
+ versionRange: string;
290
+ /** Last date-time when the attributes for this block were modified, in ISO-8601 format. */
291
+ attributesLastModified: string;
292
+ /** Configuration data to be passed to the component. */
293
+ attributes: CustomCodeComponentAttributes;
294
+ }
295
+ interface ImagePair extends Parent {
296
+ type: 'image-pair';
297
+ children: [ImageSet, ImageSet];
298
+ }
299
+ /**
300
+ * Timeline nodes display a timeline of events in arbitrary order.
301
+ */
302
+ interface Timeline extends Parent {
303
+ type: "timeline";
304
+ /** The title for the timeline */
305
+ title: string;
306
+ children: TimelineEvent[];
307
+ }
308
+ /**
309
+ * TimelineEvent is the representation of a single event in a Timeline.
310
+ */
311
+ interface TimelineEvent extends Parent {
312
+ type: "timeline-event";
313
+ /** The title of the event */
314
+ title: string;
315
+ /** Any combination of paragraphs and image sets */
316
+ children: (Paragraph | ImageSet)[];
317
+ }
318
+ /**
319
+ * A definition has a term and a related description. It is used to describe a term.
320
+ */
321
+ interface Definition extends Node {
322
+ type: "definition";
323
+ term: string;
324
+ description: string;
325
+ }
326
+ /**
327
+ * InNumbers represents a set of numbers with related descriptions.
328
+ */
329
+ interface InNumbers extends Parent {
330
+ type: "in-numbers";
331
+ /** The title for the InNumbers */
332
+ title?: string;
333
+ children: [Definition, Definition, Definition];
334
+ }
335
+ /** Allowed children for a card
336
+ */
337
+ type CardChildren = ImageSet | Exclude<FormattingBlock, Heading>;
338
+ /**
339
+ * A card describes a subject with images and text
340
+ */
341
+ interface Card extends Parent {
342
+ type: "card";
343
+ /** The title of this card */
344
+ title?: string;
345
+ children: CardChildren[];
346
+ }
347
+ /**
348
+ * Allowed layout widths for an InfoBox.
349
+ */
350
+ type InfoBoxLayoutWidth = Extract<LayoutWidth, "in-line" | "inset-left">;
351
+ /**
352
+ * An info box describes a subject via a single card
353
+ */
354
+ interface InfoBox extends Parent {
355
+ type: "info-box";
356
+ /** The layout width supported by this node */
357
+ layoutWidth: InfoBoxLayoutWidth;
358
+ children: [Card];
359
+ }
360
+ /**
361
+ * InfoPair provides exactly two cards.
362
+ */
363
+ interface InfoPair extends Parent {
364
+ type: "info-pair";
365
+ /** The title of the info pair */
366
+ title?: string;
367
+ children: [Card, Card];
368
+ }
369
+ namespace full {
370
+ type LayoutWidth = "auto" | "in-line" | "inset-left" | "inset-right" | "full-bleed" | "full-grid" | "mid-grid" | "full-width";
371
+ interface Node {
372
+ type: string;
373
+ data?: any;
374
+ }
375
+ interface Parent extends Node {
376
+ children: Node[];
377
+ }
378
+ interface Root extends Node {
379
+ type: "root";
380
+ body: Body;
381
+ }
382
+ interface Body extends Parent {
383
+ type: "body";
384
+ version: number;
385
+ children: BodyBlock[];
386
+ }
387
+ type BodyBlock = FormattingBlock | StoryBlock;
388
+ type FormattingBlock = Paragraph | Heading | List | Blockquote | ThematicBreak | Text;
389
+ interface Text extends Node {
390
+ type: "text";
391
+ value: string;
392
+ }
393
+ type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Link | FindOutMoreLink;
394
+ interface Break extends Node {
395
+ type: "break";
396
+ }
397
+ interface ThematicBreak extends Node {
398
+ type: "thematic-break";
399
+ }
400
+ interface Paragraph extends Parent {
401
+ type: "paragraph";
402
+ children: Phrasing[];
403
+ }
404
+ interface Heading extends Parent {
405
+ type: "heading";
406
+ children: Text[];
407
+ level: "chapter" | "subheading" | "label";
408
+ fragmentIdentifier?: string;
409
+ }
410
+ interface Strong extends Parent {
411
+ type: "strong";
412
+ children: Phrasing[];
413
+ }
414
+ interface Emphasis extends Parent {
415
+ type: "emphasis";
416
+ children: Phrasing[];
417
+ }
418
+ interface Strikethrough extends Parent {
419
+ type: "strikethrough";
420
+ children: Phrasing[];
421
+ }
422
+ interface Link extends Parent {
423
+ type: "link";
424
+ url: string;
425
+ title: string;
426
+ children: Phrasing[];
427
+ }
428
+ interface FindOutMoreLink extends Parent {
429
+ type: "find-out-more-link";
430
+ url: string;
431
+ title: string;
432
+ children: Phrasing[];
433
+ }
434
+ interface List extends Parent {
435
+ type: "list";
436
+ ordered: boolean;
437
+ children: ListItem[];
438
+ }
439
+ interface ListItem extends Parent {
440
+ type: "list-item";
441
+ children: (Paragraph | Phrasing)[];
442
+ }
443
+ interface Blockquote extends Parent {
444
+ type: "blockquote";
445
+ children: (Paragraph | Phrasing)[];
446
+ }
447
+ type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
448
+ interface Pullquote extends Node {
449
+ type: "pullquote";
450
+ text: string;
451
+ source?: string;
452
+ }
453
+ interface ImageSet extends Node {
454
+ type: "image-set";
455
+ id: string;
456
+ picture: ImageSetPicture;
457
+ fragmentIdentifier?: string;
458
+ }
459
+ type ImageSetPicture = {
460
+ layoutWidth: string;
461
+ imageType: "image" | "graphic";
462
+ alt: string;
463
+ caption: string;
464
+ credit: string;
465
+ images: Image[];
466
+ fallbackImage: Image;
467
+ };
468
+ type Image = {
469
+ id: string;
470
+ width: number;
471
+ height: number;
472
+ format: "desktop" | "mobile" | "square" | "square-ftedit" | "standard" | "wide" | "standard-inline";
473
+ url: string;
474
+ sourceSet?: ImageSource[];
475
+ };
476
+ type ImageSource = {
477
+ url: string;
478
+ width: number;
479
+ dpr: number;
480
+ };
481
+ interface Recommended extends Node {
482
+ type: "recommended";
483
+ id: string;
484
+ heading?: string;
485
+ teaserTitleOverride?: string;
486
+ teaser: Teaser;
487
+ }
488
+ interface RecommendedList extends Node {
489
+ type: "recommended-list";
490
+ heading?: string;
491
+ children: Recommended[];
492
+ }
493
+ type TeaserConcept = {
494
+ apiUrl: string;
495
+ directType: string;
496
+ id: string;
497
+ predicate: string;
498
+ prefLabel: string;
499
+ type: string;
500
+ types: string[];
501
+ url: string;
502
+ };
503
+ type Teaser = {
504
+ id: string;
505
+ url: string;
506
+ type: "article" | "video" | "podcast" | "audio" | "package" | "liveblog" | "promoted-content" | "paid-post";
507
+ title: string;
508
+ publishedDate: string;
509
+ firstPublishedDate: string;
510
+ metaLink?: TeaserConcept;
511
+ metaAltLink?: TeaserConcept;
512
+ metaPrefixText?: string;
513
+ metaSuffixText?: string;
514
+ indicators: {
515
+ accessLevel: "premium" | "subscribed" | "registered" | "free";
516
+ isOpinion?: boolean;
517
+ isColumn?: boolean;
518
+ isPodcast?: boolean;
519
+ isEditorsChoice?: boolean;
520
+ isExclusive?: boolean;
521
+ isScoop?: boolean;
522
+ };
523
+ image: {
524
+ url: string;
525
+ width: number;
526
+ height: number;
527
+ };
528
+ clientName?: string;
529
+ };
530
+ interface Tweet extends Node {
531
+ id: string;
532
+ type: "tweet";
533
+ html: string;
534
+ }
535
+ type FlourishLayoutWidth = Extract<LayoutWidth, "full-grid" | "in-line">;
536
+ interface Flourish extends Node {
537
+ type: "flourish";
538
+ id: string;
539
+ layoutWidth: FlourishLayoutWidth;
540
+ flourishType: string;
541
+ description?: string;
542
+ timestamp?: string;
543
+ fallbackImage?: Image;
544
+ fragmentIdentifier?: string;
545
+ }
546
+ interface BigNumber extends Node {
547
+ type: "big-number";
548
+ number: string;
549
+ description: string;
550
+ }
551
+ interface Video extends Node {
552
+ type: "video";
553
+ id: string;
554
+ title: string;
555
+ }
556
+ interface YoutubeVideo extends Node {
557
+ type: "youtube-video";
558
+ url: string;
559
+ }
560
+ interface ScrollyBlock extends Parent {
561
+ type: "scrolly-block";
562
+ theme: "sans" | "serif";
563
+ children: ScrollySection[];
564
+ }
565
+ interface ScrollySection extends Parent {
566
+ type: "scrolly-section";
567
+ display: "dark-background" | "light-background";
568
+ noBox?: true;
569
+ position: "left" | "center" | "right";
570
+ transition?: "delay-before" | "delay-after";
571
+ children: [ScrollyImage, ...ScrollyCopy[]];
572
+ }
573
+ interface ScrollyImage extends Node {
574
+ type: "scrolly-image";
575
+ id: string;
576
+ picture: ImageSetPicture;
577
+ }
578
+ interface ScrollyCopy extends Parent {
579
+ type: "scrolly-copy";
580
+ children: (ScrollyHeading | Paragraph)[];
581
+ }
582
+ interface ScrollyHeading extends Parent {
583
+ type: "scrolly-heading";
584
+ level: "chapter" | "heading" | "subheading";
585
+ children: Text[];
586
+ }
587
+ interface Layout extends Parent {
588
+ type: "layout";
589
+ layoutName: "auto" | "card" | "timeline";
590
+ layoutWidth: string;
591
+ children: [Heading, LayoutImage, ...LayoutSlot[]] | [Heading, ...LayoutSlot[]] | LayoutSlot[];
592
+ }
593
+ interface LayoutSlot extends Parent {
594
+ type: "layout-slot";
595
+ children: (Heading | Paragraph | LayoutImage)[];
596
+ }
597
+ interface LayoutImage extends Node {
598
+ type: "layout-image";
599
+ id: string;
600
+ alt: string;
601
+ caption: string;
602
+ credit: string;
603
+ picture: ImageSetPicture;
604
+ }
605
+ type TableColumnSettings = {
606
+ hideOnMobile: boolean;
607
+ sortable: boolean;
608
+ sortType: 'text' | 'number' | 'date' | 'currency' | 'percent';
609
+ };
610
+ type TableLayoutWidth = Extract<LayoutWidth, 'auto' | 'full-grid' | 'inset-left' | 'inset-right' | 'full-bleed'>;
611
+ interface TableCaption extends Parent {
612
+ type: 'table-caption';
613
+ children: Phrasing[];
614
+ }
615
+ interface TableCell extends Parent {
616
+ type: 'table-cell';
617
+ heading?: boolean;
618
+ columnSpan?: number;
619
+ rowSpan?: number;
620
+ children: Phrasing[];
621
+ }
622
+ interface TableRow extends Parent {
623
+ type: 'table-row';
624
+ children: TableCell[];
625
+ }
626
+ interface TableBody extends Parent {
627
+ type: 'table-body';
628
+ children: TableRow[];
629
+ }
630
+ interface TableFooter extends Parent {
631
+ type: 'table-footer';
632
+ children: Phrasing[];
633
+ }
634
+ interface Table extends Parent {
635
+ type: 'table';
636
+ stripes: boolean;
637
+ compact: boolean;
638
+ layoutWidth: TableLayoutWidth;
639
+ collapseAfterHowManyRows?: number;
640
+ responsiveStyle: 'overflow' | 'flat' | 'scroll';
641
+ children: [TableCaption, TableBody, TableFooter] | [TableCaption, TableBody] | [TableBody, TableFooter] | [TableBody];
642
+ columnSettings: TableColumnSettings[];
643
+ }
644
+ type CustomCodeComponentAttributes = {
645
+ [key: string]: string | boolean | undefined;
646
+ };
647
+ interface CustomCodeComponent extends Node {
648
+ /** Component type */
649
+ type: "custom-code-component";
650
+ /** Id taken from the CAPI url */
651
+ id: string;
652
+ /** How the component should be presented in the article page according to the column layout system */
653
+ layoutWidth: LayoutWidth;
654
+ /** Repository for the code of the component in the format "[github org]/[github repo]/[component name]". */
655
+ path: string;
656
+ /** Semantic version of the code of the component, e.g. "^0.3.5". */
657
+ versionRange: string;
658
+ /** Last date-time when the attributes for this block were modified, in ISO-8601 format. */
659
+ attributesLastModified: string;
660
+ /** Configuration data to be passed to the component. */
661
+ attributes: CustomCodeComponentAttributes;
662
+ }
663
+ interface ImagePair extends Parent {
664
+ type: 'image-pair';
665
+ children: [ImageSet, ImageSet];
666
+ }
667
+ /**
668
+ * Timeline nodes display a timeline of events in arbitrary order.
669
+ */
670
+ interface Timeline extends Parent {
671
+ type: "timeline";
672
+ /** The title for the timeline */
673
+ title: string;
674
+ children: TimelineEvent[];
675
+ }
676
+ /**
677
+ * TimelineEvent is the representation of a single event in a Timeline.
678
+ */
679
+ interface TimelineEvent extends Parent {
680
+ type: "timeline-event";
681
+ /** The title of the event */
682
+ title: string;
683
+ /** Any combination of paragraphs and image sets */
684
+ children: (Paragraph | ImageSet)[];
685
+ }
686
+ /**
687
+ * A definition has a term and a related description. It is used to describe a term.
688
+ */
689
+ interface Definition extends Node {
690
+ type: "definition";
691
+ term: string;
692
+ description: string;
693
+ }
694
+ /**
695
+ * InNumbers represents a set of numbers with related descriptions.
696
+ */
697
+ interface InNumbers extends Parent {
698
+ type: "in-numbers";
699
+ /** The title for the InNumbers */
700
+ title?: string;
701
+ children: [Definition, Definition, Definition];
702
+ }
703
+ /** Allowed children for a card
704
+ */
705
+ type CardChildren = ImageSet | Exclude<FormattingBlock, Heading>;
706
+ /**
707
+ * A card describes a subject with images and text
708
+ */
709
+ interface Card extends Parent {
710
+ type: "card";
711
+ /** The title of this card */
712
+ title?: string;
713
+ children: CardChildren[];
714
+ }
715
+ /**
716
+ * Allowed layout widths for an InfoBox.
717
+ */
718
+ type InfoBoxLayoutWidth = Extract<LayoutWidth, "in-line" | "inset-left">;
719
+ /**
720
+ * An info box describes a subject via a single card
721
+ */
722
+ interface InfoBox extends Parent {
723
+ type: "info-box";
724
+ /** The layout width supported by this node */
725
+ layoutWidth: InfoBoxLayoutWidth;
726
+ children: [Card];
727
+ }
728
+ /**
729
+ * InfoPair provides exactly two cards.
730
+ */
731
+ interface InfoPair extends Parent {
732
+ type: "info-pair";
733
+ /** The title of the info pair */
734
+ title?: string;
735
+ children: [Card, Card];
736
+ }
737
+ }
738
+ namespace transit {
739
+ type LayoutWidth = "auto" | "in-line" | "inset-left" | "inset-right" | "full-bleed" | "full-grid" | "mid-grid" | "full-width";
740
+ interface Node {
741
+ type: string;
742
+ data?: any;
743
+ }
744
+ interface Parent extends Node {
745
+ children: Node[];
746
+ }
747
+ interface Root extends Node {
748
+ type: "root";
749
+ body: Body;
750
+ }
751
+ interface Body extends Parent {
752
+ type: "body";
753
+ version: number;
754
+ children: BodyBlock[];
755
+ }
756
+ type BodyBlock = FormattingBlock | StoryBlock;
757
+ type FormattingBlock = Paragraph | Heading | List | Blockquote | ThematicBreak | Text;
758
+ interface Text extends Node {
759
+ type: "text";
760
+ value: string;
761
+ }
762
+ type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Link | FindOutMoreLink;
763
+ interface Break extends Node {
764
+ type: "break";
765
+ }
766
+ interface ThematicBreak extends Node {
767
+ type: "thematic-break";
768
+ }
769
+ interface Paragraph extends Parent {
770
+ type: "paragraph";
771
+ children: Phrasing[];
772
+ }
773
+ interface Heading extends Parent {
774
+ type: "heading";
775
+ children: Text[];
776
+ level: "chapter" | "subheading" | "label";
777
+ fragmentIdentifier?: string;
778
+ }
779
+ interface Strong extends Parent {
780
+ type: "strong";
781
+ children: Phrasing[];
782
+ }
783
+ interface Emphasis extends Parent {
784
+ type: "emphasis";
785
+ children: Phrasing[];
786
+ }
787
+ interface Strikethrough extends Parent {
788
+ type: "strikethrough";
789
+ children: Phrasing[];
790
+ }
791
+ interface Link extends Parent {
792
+ type: "link";
793
+ url: string;
794
+ title: string;
795
+ children: Phrasing[];
796
+ }
797
+ interface FindOutMoreLink extends Parent {
798
+ type: "find-out-more-link";
799
+ url: string;
800
+ title: string;
801
+ children: Phrasing[];
802
+ }
803
+ interface List extends Parent {
804
+ type: "list";
805
+ ordered: boolean;
806
+ children: ListItem[];
807
+ }
808
+ interface ListItem extends Parent {
809
+ type: "list-item";
810
+ children: (Paragraph | Phrasing)[];
811
+ }
812
+ interface Blockquote extends Parent {
813
+ type: "blockquote";
814
+ children: (Paragraph | Phrasing)[];
815
+ }
816
+ type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
817
+ interface Pullquote extends Node {
818
+ type: "pullquote";
819
+ text: string;
820
+ source?: string;
821
+ }
822
+ interface ImageSet extends Node {
823
+ type: "image-set";
824
+ id: string;
825
+ fragmentIdentifier?: string;
826
+ }
827
+ type ImageSetPicture = {
828
+ layoutWidth: string;
829
+ imageType: "image" | "graphic";
830
+ alt: string;
831
+ caption: string;
832
+ credit: string;
833
+ images: Image[];
834
+ fallbackImage: Image;
835
+ };
836
+ type Image = {
837
+ id: string;
838
+ width: number;
839
+ height: number;
840
+ format: "desktop" | "mobile" | "square" | "square-ftedit" | "standard" | "wide" | "standard-inline";
841
+ url: string;
842
+ sourceSet?: ImageSource[];
843
+ };
844
+ type ImageSource = {
845
+ url: string;
846
+ width: number;
847
+ dpr: number;
848
+ };
849
+ interface Recommended extends Node {
850
+ type: "recommended";
851
+ id: string;
852
+ heading?: string;
853
+ teaserTitleOverride?: string;
854
+ }
855
+ interface RecommendedList extends Node {
856
+ type: "recommended-list";
857
+ heading?: string;
858
+ children: Recommended[];
859
+ }
860
+ type TeaserConcept = {
861
+ apiUrl: string;
862
+ directType: string;
863
+ id: string;
864
+ predicate: string;
865
+ prefLabel: string;
866
+ type: string;
867
+ types: string[];
868
+ url: string;
869
+ };
870
+ type Teaser = {
871
+ id: string;
872
+ url: string;
873
+ type: "article" | "video" | "podcast" | "audio" | "package" | "liveblog" | "promoted-content" | "paid-post";
874
+ title: string;
875
+ publishedDate: string;
876
+ firstPublishedDate: string;
877
+ metaLink?: TeaserConcept;
878
+ metaAltLink?: TeaserConcept;
879
+ metaPrefixText?: string;
880
+ metaSuffixText?: string;
881
+ indicators: {
882
+ accessLevel: "premium" | "subscribed" | "registered" | "free";
883
+ isOpinion?: boolean;
884
+ isColumn?: boolean;
885
+ isPodcast?: boolean;
886
+ isEditorsChoice?: boolean;
887
+ isExclusive?: boolean;
888
+ isScoop?: boolean;
889
+ };
890
+ image: {
891
+ url: string;
892
+ width: number;
893
+ height: number;
894
+ };
895
+ clientName?: string;
896
+ };
897
+ interface Tweet extends Node {
898
+ id: string;
899
+ type: "tweet";
900
+ }
901
+ type FlourishLayoutWidth = Extract<LayoutWidth, "full-grid" | "in-line">;
902
+ interface Flourish extends Node {
903
+ type: "flourish";
904
+ id: string;
905
+ layoutWidth: FlourishLayoutWidth;
906
+ flourishType: string;
907
+ description?: string;
908
+ timestamp?: string;
909
+ fragmentIdentifier?: string;
910
+ }
911
+ interface BigNumber extends Node {
912
+ type: "big-number";
913
+ number: string;
914
+ description: string;
915
+ }
916
+ interface Video extends Node {
917
+ type: "video";
918
+ id: string;
919
+ }
920
+ interface YoutubeVideo extends Node {
921
+ type: "youtube-video";
922
+ url: string;
923
+ }
924
+ interface ScrollyBlock extends Parent {
925
+ type: "scrolly-block";
926
+ theme: "sans" | "serif";
927
+ children: ScrollySection[];
928
+ }
929
+ interface ScrollySection extends Parent {
930
+ type: "scrolly-section";
931
+ display: "dark-background" | "light-background";
932
+ noBox?: true;
933
+ position: "left" | "center" | "right";
934
+ transition?: "delay-before" | "delay-after";
935
+ children: [ScrollyImage, ...ScrollyCopy[]];
936
+ }
937
+ interface ScrollyImage extends Node {
938
+ type: "scrolly-image";
939
+ id: string;
940
+ }
941
+ interface ScrollyCopy extends Parent {
942
+ type: "scrolly-copy";
943
+ children: (ScrollyHeading | Paragraph)[];
944
+ }
945
+ interface ScrollyHeading extends Parent {
946
+ type: "scrolly-heading";
947
+ level: "chapter" | "heading" | "subheading";
948
+ children: Text[];
949
+ }
950
+ interface Layout extends Parent {
951
+ type: "layout";
952
+ layoutName: "auto" | "card" | "timeline";
953
+ layoutWidth: string;
954
+ children: [Heading, LayoutImage, ...LayoutSlot[]] | [Heading, ...LayoutSlot[]] | LayoutSlot[];
955
+ }
956
+ interface LayoutSlot extends Parent {
957
+ type: "layout-slot";
958
+ children: (Heading | Paragraph | LayoutImage)[];
959
+ }
960
+ interface LayoutImage extends Node {
961
+ type: "layout-image";
962
+ id: string;
963
+ alt: string;
964
+ caption: string;
965
+ credit: string;
966
+ }
967
+ type TableColumnSettings = {
968
+ hideOnMobile: boolean;
969
+ sortable: boolean;
970
+ sortType: 'text' | 'number' | 'date' | 'currency' | 'percent';
971
+ };
972
+ type TableLayoutWidth = Extract<LayoutWidth, 'auto' | 'full-grid' | 'inset-left' | 'inset-right' | 'full-bleed'>;
973
+ interface TableCaption extends Parent {
974
+ type: 'table-caption';
975
+ children: Phrasing[];
976
+ }
977
+ interface TableCell extends Parent {
978
+ type: 'table-cell';
979
+ heading?: boolean;
980
+ columnSpan?: number;
981
+ rowSpan?: number;
982
+ children: Phrasing[];
983
+ }
984
+ interface TableRow extends Parent {
985
+ type: 'table-row';
986
+ children: TableCell[];
987
+ }
988
+ interface TableBody extends Parent {
989
+ type: 'table-body';
990
+ children: TableRow[];
991
+ }
992
+ interface TableFooter extends Parent {
993
+ type: 'table-footer';
994
+ children: Phrasing[];
995
+ }
996
+ interface Table extends Parent {
997
+ type: 'table';
998
+ stripes: boolean;
999
+ compact: boolean;
1000
+ layoutWidth: TableLayoutWidth;
1001
+ collapseAfterHowManyRows?: number;
1002
+ responsiveStyle: 'overflow' | 'flat' | 'scroll';
1003
+ children: [TableCaption, TableBody, TableFooter] | [TableCaption, TableBody] | [TableBody, TableFooter] | [TableBody];
1004
+ columnSettings: TableColumnSettings[];
1005
+ }
1006
+ type CustomCodeComponentAttributes = {
1007
+ [key: string]: string | boolean | undefined;
1008
+ };
1009
+ interface CustomCodeComponent extends Node {
1010
+ /** Component type */
1011
+ type: "custom-code-component";
1012
+ /** Id taken from the CAPI url */
1013
+ id: string;
1014
+ /** How the component should be presented in the article page according to the column layout system */
1015
+ layoutWidth: LayoutWidth;
1016
+ }
1017
+ interface ImagePair extends Parent {
1018
+ type: 'image-pair';
1019
+ children: [ImageSet, ImageSet];
1020
+ }
1021
+ /**
1022
+ * Timeline nodes display a timeline of events in arbitrary order.
1023
+ */
1024
+ interface Timeline extends Parent {
1025
+ type: "timeline";
1026
+ /** The title for the timeline */
1027
+ title: string;
1028
+ children: TimelineEvent[];
1029
+ }
1030
+ /**
1031
+ * TimelineEvent is the representation of a single event in a Timeline.
1032
+ */
1033
+ interface TimelineEvent extends Parent {
1034
+ type: "timeline-event";
1035
+ /** The title of the event */
1036
+ title: string;
1037
+ /** Any combination of paragraphs and image sets */
1038
+ children: (Paragraph | ImageSet)[];
1039
+ }
1040
+ /**
1041
+ * A definition has a term and a related description. It is used to describe a term.
1042
+ */
1043
+ interface Definition extends Node {
1044
+ type: "definition";
1045
+ term: string;
1046
+ description: string;
1047
+ }
1048
+ /**
1049
+ * InNumbers represents a set of numbers with related descriptions.
1050
+ */
1051
+ interface InNumbers extends Parent {
1052
+ type: "in-numbers";
1053
+ /** The title for the InNumbers */
1054
+ title?: string;
1055
+ children: [Definition, Definition, Definition];
1056
+ }
1057
+ /** Allowed children for a card
1058
+ */
1059
+ type CardChildren = ImageSet | Exclude<FormattingBlock, Heading>;
1060
+ /**
1061
+ * A card describes a subject with images and text
1062
+ */
1063
+ interface Card extends Parent {
1064
+ type: "card";
1065
+ /** The title of this card */
1066
+ title?: string;
1067
+ children: CardChildren[];
1068
+ }
1069
+ /**
1070
+ * Allowed layout widths for an InfoBox.
1071
+ */
1072
+ type InfoBoxLayoutWidth = Extract<LayoutWidth, "in-line" | "inset-left">;
1073
+ /**
1074
+ * An info box describes a subject via a single card
1075
+ */
1076
+ interface InfoBox extends Parent {
1077
+ type: "info-box";
1078
+ /** The layout width supported by this node */
1079
+ layoutWidth: InfoBoxLayoutWidth;
1080
+ children: [Card];
1081
+ }
1082
+ /**
1083
+ * InfoPair provides exactly two cards.
1084
+ */
1085
+ interface InfoPair extends Parent {
1086
+ type: "info-pair";
1087
+ /** The title of the info pair */
1088
+ title?: string;
1089
+ children: [Card, Card];
1090
+ }
1091
+ }
1092
+ namespace loose {
1093
+ type LayoutWidth = "auto" | "in-line" | "inset-left" | "inset-right" | "full-bleed" | "full-grid" | "mid-grid" | "full-width";
1094
+ interface Node {
1095
+ type: string;
1096
+ data?: any;
1097
+ }
1098
+ interface Parent extends Node {
1099
+ children: Node[];
1100
+ }
1101
+ interface Root extends Node {
1102
+ type: "root";
1103
+ body: Body;
1104
+ }
1105
+ interface Body extends Parent {
1106
+ type: "body";
1107
+ version: number;
1108
+ children: BodyBlock[];
1109
+ }
1110
+ type BodyBlock = FormattingBlock | StoryBlock;
1111
+ type FormattingBlock = Paragraph | Heading | List | Blockquote | ThematicBreak | Text;
1112
+ interface Text extends Node {
1113
+ type: "text";
1114
+ value: string;
1115
+ }
1116
+ type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Link | FindOutMoreLink;
1117
+ interface Break extends Node {
1118
+ type: "break";
1119
+ }
1120
+ interface ThematicBreak extends Node {
1121
+ type: "thematic-break";
1122
+ }
1123
+ interface Paragraph extends Parent {
1124
+ type: "paragraph";
1125
+ children: Phrasing[];
1126
+ }
1127
+ interface Heading extends Parent {
1128
+ type: "heading";
1129
+ children: Text[];
1130
+ level: "chapter" | "subheading" | "label";
1131
+ fragmentIdentifier?: string;
1132
+ }
1133
+ interface Strong extends Parent {
1134
+ type: "strong";
1135
+ children: Phrasing[];
1136
+ }
1137
+ interface Emphasis extends Parent {
1138
+ type: "emphasis";
1139
+ children: Phrasing[];
1140
+ }
1141
+ interface Strikethrough extends Parent {
1142
+ type: "strikethrough";
1143
+ children: Phrasing[];
1144
+ }
1145
+ interface Link extends Parent {
1146
+ type: "link";
1147
+ url: string;
1148
+ title: string;
1149
+ children: Phrasing[];
1150
+ }
1151
+ interface FindOutMoreLink extends Parent {
1152
+ type: "find-out-more-link";
1153
+ url: string;
1154
+ title: string;
1155
+ children: Phrasing[];
1156
+ }
1157
+ interface List extends Parent {
1158
+ type: "list";
1159
+ ordered: boolean;
1160
+ children: ListItem[];
1161
+ }
1162
+ interface ListItem extends Parent {
1163
+ type: "list-item";
1164
+ children: (Paragraph | Phrasing)[];
1165
+ }
1166
+ interface Blockquote extends Parent {
1167
+ type: "blockquote";
1168
+ children: (Paragraph | Phrasing)[];
1169
+ }
1170
+ type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
1171
+ interface Pullquote extends Node {
1172
+ type: "pullquote";
1173
+ text: string;
1174
+ source?: string;
1175
+ }
1176
+ interface ImageSet extends Node {
1177
+ type: "image-set";
1178
+ id: string;
1179
+ picture?: ImageSetPicture;
1180
+ fragmentIdentifier?: string;
1181
+ }
1182
+ type ImageSetPicture = {
1183
+ layoutWidth: string;
1184
+ imageType: "image" | "graphic";
1185
+ alt: string;
1186
+ caption: string;
1187
+ credit: string;
1188
+ images: Image[];
1189
+ fallbackImage: Image;
1190
+ };
1191
+ type Image = {
1192
+ id: string;
1193
+ width: number;
1194
+ height: number;
1195
+ format: "desktop" | "mobile" | "square" | "square-ftedit" | "standard" | "wide" | "standard-inline";
1196
+ url: string;
1197
+ sourceSet?: ImageSource[];
1198
+ };
1199
+ type ImageSource = {
1200
+ url: string;
1201
+ width: number;
1202
+ dpr: number;
1203
+ };
1204
+ interface Recommended extends Node {
1205
+ type: "recommended";
1206
+ id: string;
1207
+ heading?: string;
1208
+ teaserTitleOverride?: string;
1209
+ teaser?: Teaser;
1210
+ }
1211
+ interface RecommendedList extends Node {
1212
+ type: "recommended-list";
1213
+ heading?: string;
1214
+ children: Recommended[];
1215
+ }
1216
+ type TeaserConcept = {
1217
+ apiUrl: string;
1218
+ directType: string;
1219
+ id: string;
1220
+ predicate: string;
1221
+ prefLabel: string;
1222
+ type: string;
1223
+ types: string[];
1224
+ url: string;
1225
+ };
1226
+ type Teaser = {
1227
+ id: string;
1228
+ url: string;
1229
+ type: "article" | "video" | "podcast" | "audio" | "package" | "liveblog" | "promoted-content" | "paid-post";
1230
+ title: string;
1231
+ publishedDate: string;
1232
+ firstPublishedDate: string;
1233
+ metaLink?: TeaserConcept;
1234
+ metaAltLink?: TeaserConcept;
1235
+ metaPrefixText?: string;
1236
+ metaSuffixText?: string;
1237
+ indicators: {
1238
+ accessLevel: "premium" | "subscribed" | "registered" | "free";
1239
+ isOpinion?: boolean;
1240
+ isColumn?: boolean;
1241
+ isPodcast?: boolean;
1242
+ isEditorsChoice?: boolean;
1243
+ isExclusive?: boolean;
1244
+ isScoop?: boolean;
1245
+ };
1246
+ image: {
1247
+ url: string;
1248
+ width: number;
1249
+ height: number;
1250
+ };
1251
+ clientName?: string;
1252
+ };
1253
+ interface Tweet extends Node {
1254
+ id: string;
1255
+ type: "tweet";
1256
+ html?: string;
1257
+ }
1258
+ type FlourishLayoutWidth = Extract<LayoutWidth, "full-grid" | "in-line">;
1259
+ interface Flourish extends Node {
1260
+ type: "flourish";
1261
+ id: string;
1262
+ layoutWidth: FlourishLayoutWidth;
1263
+ flourishType: string;
1264
+ description?: string;
1265
+ timestamp?: string;
1266
+ fallbackImage?: Image;
1267
+ fragmentIdentifier?: string;
1268
+ }
1269
+ interface BigNumber extends Node {
1270
+ type: "big-number";
1271
+ number: string;
1272
+ description: string;
1273
+ }
1274
+ interface Video extends Node {
1275
+ type: "video";
1276
+ id: string;
1277
+ title?: string;
1278
+ }
1279
+ interface YoutubeVideo extends Node {
1280
+ type: "youtube-video";
1281
+ url: string;
1282
+ }
1283
+ interface ScrollyBlock extends Parent {
1284
+ type: "scrolly-block";
1285
+ theme: "sans" | "serif";
1286
+ children: ScrollySection[];
1287
+ }
1288
+ interface ScrollySection extends Parent {
1289
+ type: "scrolly-section";
1290
+ display: "dark-background" | "light-background";
1291
+ noBox?: true;
1292
+ position: "left" | "center" | "right";
1293
+ transition?: "delay-before" | "delay-after";
1294
+ children: [ScrollyImage, ...ScrollyCopy[]];
1295
+ }
1296
+ interface ScrollyImage extends Node {
1297
+ type: "scrolly-image";
1298
+ id: string;
1299
+ picture?: ImageSetPicture;
1300
+ }
1301
+ interface ScrollyCopy extends Parent {
1302
+ type: "scrolly-copy";
1303
+ children: (ScrollyHeading | Paragraph)[];
1304
+ }
1305
+ interface ScrollyHeading extends Parent {
1306
+ type: "scrolly-heading";
1307
+ level: "chapter" | "heading" | "subheading";
1308
+ children: Text[];
1309
+ }
1310
+ interface Layout extends Parent {
1311
+ type: "layout";
1312
+ layoutName: "auto" | "card" | "timeline";
1313
+ layoutWidth: string;
1314
+ children: [Heading, LayoutImage, ...LayoutSlot[]] | [Heading, ...LayoutSlot[]] | LayoutSlot[];
1315
+ }
1316
+ interface LayoutSlot extends Parent {
1317
+ type: "layout-slot";
1318
+ children: (Heading | Paragraph | LayoutImage)[];
1319
+ }
1320
+ interface LayoutImage extends Node {
1321
+ type: "layout-image";
1322
+ id: string;
1323
+ alt: string;
1324
+ caption: string;
1325
+ credit: string;
1326
+ picture?: ImageSetPicture;
1327
+ }
1328
+ type TableColumnSettings = {
1329
+ hideOnMobile: boolean;
1330
+ sortable: boolean;
1331
+ sortType: 'text' | 'number' | 'date' | 'currency' | 'percent';
1332
+ };
1333
+ type TableLayoutWidth = Extract<LayoutWidth, 'auto' | 'full-grid' | 'inset-left' | 'inset-right' | 'full-bleed'>;
1334
+ interface TableCaption extends Parent {
1335
+ type: 'table-caption';
1336
+ children: Phrasing[];
1337
+ }
1338
+ interface TableCell extends Parent {
1339
+ type: 'table-cell';
1340
+ heading?: boolean;
1341
+ columnSpan?: number;
1342
+ rowSpan?: number;
1343
+ children: Phrasing[];
1344
+ }
1345
+ interface TableRow extends Parent {
1346
+ type: 'table-row';
1347
+ children: TableCell[];
1348
+ }
1349
+ interface TableBody extends Parent {
1350
+ type: 'table-body';
1351
+ children: TableRow[];
1352
+ }
1353
+ interface TableFooter extends Parent {
1354
+ type: 'table-footer';
1355
+ children: Phrasing[];
1356
+ }
1357
+ interface Table extends Parent {
1358
+ type: 'table';
1359
+ stripes: boolean;
1360
+ compact: boolean;
1361
+ layoutWidth: TableLayoutWidth;
1362
+ collapseAfterHowManyRows?: number;
1363
+ responsiveStyle: 'overflow' | 'flat' | 'scroll';
1364
+ children: [TableCaption, TableBody, TableFooter] | [TableCaption, TableBody] | [TableBody, TableFooter] | [TableBody];
1365
+ columnSettings: TableColumnSettings[];
1366
+ }
1367
+ type CustomCodeComponentAttributes = {
1368
+ [key: string]: string | boolean | undefined;
1369
+ };
1370
+ interface CustomCodeComponent extends Node {
1371
+ /** Component type */
1372
+ type: "custom-code-component";
1373
+ /** Id taken from the CAPI url */
1374
+ id: string;
1375
+ /** How the component should be presented in the article page according to the column layout system */
1376
+ layoutWidth: LayoutWidth;
1377
+ /** Repository for the code of the component in the format "[github org]/[github repo]/[component name]". */
1378
+ path?: string;
1379
+ /** Semantic version of the code of the component, e.g. "^0.3.5". */
1380
+ versionRange?: string;
1381
+ /** Last date-time when the attributes for this block were modified, in ISO-8601 format. */
1382
+ attributesLastModified?: string;
1383
+ /** Configuration data to be passed to the component. */
1384
+ attributes?: CustomCodeComponentAttributes;
1385
+ }
1386
+ interface ImagePair extends Parent {
1387
+ type: 'image-pair';
1388
+ children: [ImageSet, ImageSet];
1389
+ }
1390
+ /**
1391
+ * Timeline nodes display a timeline of events in arbitrary order.
1392
+ */
1393
+ interface Timeline extends Parent {
1394
+ type: "timeline";
1395
+ /** The title for the timeline */
1396
+ title: string;
1397
+ children: TimelineEvent[];
1398
+ }
1399
+ /**
1400
+ * TimelineEvent is the representation of a single event in a Timeline.
1401
+ */
1402
+ interface TimelineEvent extends Parent {
1403
+ type: "timeline-event";
1404
+ /** The title of the event */
1405
+ title: string;
1406
+ /** Any combination of paragraphs and image sets */
1407
+ children: (Paragraph | ImageSet)[];
1408
+ }
1409
+ /**
1410
+ * A definition has a term and a related description. It is used to describe a term.
1411
+ */
1412
+ interface Definition extends Node {
1413
+ type: "definition";
1414
+ term: string;
1415
+ description: string;
1416
+ }
1417
+ /**
1418
+ * InNumbers represents a set of numbers with related descriptions.
1419
+ */
1420
+ interface InNumbers extends Parent {
1421
+ type: "in-numbers";
1422
+ /** The title for the InNumbers */
1423
+ title?: string;
1424
+ children: [Definition, Definition, Definition];
1425
+ }
1426
+ /** Allowed children for a card
1427
+ */
1428
+ type CardChildren = ImageSet | Exclude<FormattingBlock, Heading>;
1429
+ /**
1430
+ * A card describes a subject with images and text
1431
+ */
1432
+ interface Card extends Parent {
1433
+ type: "card";
1434
+ /** The title of this card */
1435
+ title?: string;
1436
+ children: CardChildren[];
1437
+ }
1438
+ /**
1439
+ * Allowed layout widths for an InfoBox.
1440
+ */
1441
+ type InfoBoxLayoutWidth = Extract<LayoutWidth, "in-line" | "inset-left">;
1442
+ /**
1443
+ * An info box describes a subject via a single card
1444
+ */
1445
+ interface InfoBox extends Parent {
1446
+ type: "info-box";
1447
+ /** The layout width supported by this node */
1448
+ layoutWidth: InfoBoxLayoutWidth;
1449
+ children: [Card];
1450
+ }
1451
+ /**
1452
+ * InfoPair provides exactly two cards.
1453
+ */
1454
+ interface InfoPair extends Parent {
1455
+ type: "info-pair";
1456
+ /** The title of the info pair */
1457
+ title?: string;
1458
+ children: [Card, Card];
1459
+ }
1460
+ }
1461
+ }