@financial-times/content-tree 0.5.0 → 0.7.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.
package/SPEC.md CHANGED
@@ -277,7 +277,6 @@ interface Link extends Parent {
277
277
  interface FindOutMoreLink extends Parent {
278
278
  type: "find-out-more-link"
279
279
  url: string
280
- title: string
281
280
  children: [Text | Strong | Emphasis]
282
281
  }
283
282
  ```
@@ -337,6 +336,7 @@ type StoryBlock =
337
336
  | Video
338
337
  | YoutubeVideo
339
338
  | VimeoVideo
339
+ | AcastPodcast
340
340
  | Timeline
341
341
  | ImagePair
342
342
  | InNumbers
@@ -527,7 +527,7 @@ interface Tweet extends Node {
527
527
  }
528
528
  ```
529
529
 
530
- **Tweet** represents a tweet.
530
+ **Tweet** represents a tweet. Rather than embedding the tweet directly in an article, we typically fetch and cache the HTML server-side to avoid the client-side dependencies.
531
531
 
532
532
  ### `Flourish`
533
533
 
@@ -600,6 +600,20 @@ interface VimeoVideo extends Node {
600
600
 
601
601
  _Note: this is currently only used by Specialist Titles_
602
602
 
603
+ ### `AcastPodcast`
604
+
605
+ ```ts
606
+ interface AcastPodcast extends Node {
607
+ type: "acast-podcast"
608
+ /** Acast Podcast embed url e.g. https://embed.acast.com/* */
609
+ url: string
610
+ }
611
+ ```
612
+
613
+ **AcastPodcast** represents an audio embed from Acast referenced by an Acast embed URL.
614
+
615
+ _Note: this is currently only used by Specialist Titles_
616
+
603
617
  ### `ClipSet`
604
618
  ```ts
605
619
  interface ClipSet extends Node {
package/content-tree.d.ts CHANGED
@@ -72,7 +72,6 @@ export declare namespace ContentTree {
72
72
  interface FindOutMoreLink extends Parent {
73
73
  type: "find-out-more-link";
74
74
  url: string;
75
- title: string;
76
75
  children: [Text | Strong | Emphasis];
77
76
  }
78
77
  interface List extends Parent {
@@ -88,7 +87,7 @@ export declare namespace ContentTree {
88
87
  type: "blockquote";
89
88
  children: (Paragraph | Phrasing)[];
90
89
  }
91
- type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | VimeoVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
90
+ type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | VimeoVideo | AcastPodcast | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
92
91
  interface Pullquote extends Node {
93
92
  type: "pullquote";
94
93
  text: string;
@@ -206,6 +205,11 @@ export declare namespace ContentTree {
206
205
  /** Vimeo embed URL e.g. https://player.vimeo.com/player/<id> or https://vimeo.com/<id>*/
207
206
  url: string;
208
207
  }
208
+ interface AcastPodcast extends Node {
209
+ type: "acast-podcast";
210
+ /** Acast Podcast embed url e.g. https://embed.acast.com/* */
211
+ url: string;
212
+ }
209
213
  interface ClipSet extends Node {
210
214
  type: "clip-set";
211
215
  id: string;
@@ -496,7 +500,6 @@ export declare namespace ContentTree {
496
500
  interface FindOutMoreLink extends Parent {
497
501
  type: "find-out-more-link";
498
502
  url: string;
499
- title: string;
500
503
  children: [Text | Strong | Emphasis];
501
504
  }
502
505
  interface List extends Parent {
@@ -512,7 +515,7 @@ export declare namespace ContentTree {
512
515
  type: "blockquote";
513
516
  children: (Paragraph | Phrasing)[];
514
517
  }
515
- type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | VimeoVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
518
+ type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | VimeoVideo | AcastPodcast | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
516
519
  interface Pullquote extends Node {
517
520
  type: "pullquote";
518
521
  text: string;
@@ -630,6 +633,11 @@ export declare namespace ContentTree {
630
633
  /** Vimeo embed URL e.g. https://player.vimeo.com/player/<id> or https://vimeo.com/<id>*/
631
634
  url: string;
632
635
  }
636
+ interface AcastPodcast extends Node {
637
+ type: "acast-podcast";
638
+ /** Acast Podcast embed url e.g. https://embed.acast.com/* */
639
+ url: string;
640
+ }
633
641
  interface ClipSet extends Node {
634
642
  type: "clip-set";
635
643
  id: string;
@@ -921,7 +929,6 @@ export declare namespace ContentTree {
921
929
  interface FindOutMoreLink extends Parent {
922
930
  type: "find-out-more-link";
923
931
  url: string;
924
- title: string;
925
932
  children: [Text | Strong | Emphasis];
926
933
  }
927
934
  interface List extends Parent {
@@ -937,7 +944,7 @@ export declare namespace ContentTree {
937
944
  type: "blockquote";
938
945
  children: (Paragraph | Phrasing)[];
939
946
  }
940
- type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | VimeoVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
947
+ type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | VimeoVideo | AcastPodcast | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
941
948
  interface Pullquote extends Node {
942
949
  type: "pullquote";
943
950
  text: string;
@@ -1050,6 +1057,11 @@ export declare namespace ContentTree {
1050
1057
  /** Vimeo embed URL e.g. https://player.vimeo.com/player/<id> or https://vimeo.com/<id>*/
1051
1058
  url: string;
1052
1059
  }
1060
+ interface AcastPodcast extends Node {
1061
+ type: "acast-podcast";
1062
+ /** Acast Podcast embed url e.g. https://embed.acast.com/* */
1063
+ url: string;
1064
+ }
1053
1065
  interface ClipSet extends Node {
1054
1066
  type: "clip-set";
1055
1067
  id: string;
@@ -1319,7 +1331,6 @@ export declare namespace ContentTree {
1319
1331
  interface FindOutMoreLink extends Parent {
1320
1332
  type: "find-out-more-link";
1321
1333
  url: string;
1322
- title: string;
1323
1334
  children: [Text | Strong | Emphasis];
1324
1335
  }
1325
1336
  interface List extends Parent {
@@ -1335,7 +1346,7 @@ export declare namespace ContentTree {
1335
1346
  type: "blockquote";
1336
1347
  children: (Paragraph | Phrasing)[];
1337
1348
  }
1338
- type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | VimeoVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
1349
+ type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | VimeoVideo | AcastPodcast | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
1339
1350
  interface Pullquote extends Node {
1340
1351
  type: "pullquote";
1341
1352
  text: string;
@@ -1453,6 +1464,11 @@ export declare namespace ContentTree {
1453
1464
  /** Vimeo embed URL e.g. https://player.vimeo.com/player/<id> or https://vimeo.com/<id>*/
1454
1465
  url: string;
1455
1466
  }
1467
+ interface AcastPodcast extends Node {
1468
+ type: "acast-podcast";
1469
+ /** Acast Podcast embed url e.g. https://embed.acast.com/* */
1470
+ url: string;
1471
+ }
1456
1472
  interface ClipSet extends Node {
1457
1473
  type: "clip-set";
1458
1474
  id: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@financial-times/content-tree",
3
3
  "description": "content tree format",
4
- "version": "0.5.0",
4
+ "version": "0.7.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -2,6 +2,25 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "additionalProperties": false,
4
4
  "definitions": {
5
+ "ContentTree.transit.AcastPodcast": {
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "data": {},
9
+ "type": {
10
+ "const": "acast-podcast",
11
+ "type": "string"
12
+ },
13
+ "url": {
14
+ "description": "Acast Podcast embed url e.g. https://embed.acast.com/*",
15
+ "type": "string"
16
+ }
17
+ },
18
+ "required": [
19
+ "type",
20
+ "url"
21
+ ],
22
+ "type": "object"
23
+ },
5
24
  "ContentTree.transit.BigNumber": {
6
25
  "additionalProperties": false,
7
26
  "properties": {
@@ -135,6 +154,9 @@
135
154
  {
136
155
  "$ref": "#/definitions/ContentTree.transit.VimeoVideo"
137
156
  },
157
+ {
158
+ "$ref": "#/definitions/ContentTree.transit.AcastPodcast"
159
+ },
138
160
  {
139
161
  "$ref": "#/definitions/ContentTree.transit.Timeline"
140
162
  },
@@ -353,9 +375,6 @@
353
375
  "type": "array"
354
376
  },
355
377
  "data": {},
356
- "title": {
357
- "type": "string"
358
- },
359
378
  "type": {
360
379
  "const": "find-out-more-link",
361
380
  "type": "string"
@@ -366,7 +385,6 @@
366
385
  },
367
386
  "required": [
368
387
  "children",
369
- "title",
370
388
  "type",
371
389
  "url"
372
390
  ],
@@ -2,6 +2,25 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "additionalProperties": false,
4
4
  "definitions": {
5
+ "ContentTree.full.AcastPodcast": {
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "data": {},
9
+ "type": {
10
+ "const": "acast-podcast",
11
+ "type": "string"
12
+ },
13
+ "url": {
14
+ "description": "Acast Podcast embed url e.g. https://embed.acast.com/*",
15
+ "type": "string"
16
+ }
17
+ },
18
+ "required": [
19
+ "type",
20
+ "url"
21
+ ],
22
+ "type": "object"
23
+ },
5
24
  "ContentTree.full.AssetFormat": {
6
25
  "enum": [
7
26
  "desktop",
@@ -172,6 +191,9 @@
172
191
  {
173
192
  "$ref": "#/definitions/ContentTree.full.VimeoVideo"
174
193
  },
194
+ {
195
+ "$ref": "#/definitions/ContentTree.full.AcastPodcast"
196
+ },
175
197
  {
176
198
  "$ref": "#/definitions/ContentTree.full.Timeline"
177
199
  },
@@ -506,9 +528,6 @@
506
528
  "type": "array"
507
529
  },
508
530
  "data": {},
509
- "title": {
510
- "type": "string"
511
- },
512
531
  "type": {
513
532
  "const": "find-out-more-link",
514
533
  "type": "string"
@@ -519,7 +538,6 @@
519
538
  },
520
539
  "required": [
521
540
  "children",
522
- "title",
523
541
  "type",
524
542
  "url"
525
543
  ],
@@ -2,6 +2,25 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "additionalProperties": false,
4
4
  "definitions": {
5
+ "ContentTree.transit.AcastPodcast": {
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "data": {},
9
+ "type": {
10
+ "const": "acast-podcast",
11
+ "type": "string"
12
+ },
13
+ "url": {
14
+ "description": "Acast Podcast embed url e.g. https://embed.acast.com/*",
15
+ "type": "string"
16
+ }
17
+ },
18
+ "required": [
19
+ "type",
20
+ "url"
21
+ ],
22
+ "type": "object"
23
+ },
5
24
  "ContentTree.transit.BigNumber": {
6
25
  "additionalProperties": false,
7
26
  "properties": {
@@ -160,6 +179,9 @@
160
179
  {
161
180
  "$ref": "#/definitions/ContentTree.transit.VimeoVideo"
162
181
  },
182
+ {
183
+ "$ref": "#/definitions/ContentTree.transit.AcastPodcast"
184
+ },
163
185
  {
164
186
  "$ref": "#/definitions/ContentTree.transit.Timeline"
165
187
  },
@@ -378,9 +400,6 @@
378
400
  "type": "array"
379
401
  },
380
402
  "data": {},
381
- "title": {
382
- "type": "string"
383
- },
384
403
  "type": {
385
404
  "const": "find-out-more-link",
386
405
  "type": "string"
@@ -391,7 +410,6 @@
391
410
  },
392
411
  "required": [
393
412
  "children",
394
- "title",
395
413
  "type",
396
414
  "url"
397
415
  ],