@financial-times/content-tree 0.3.0 → 0.6.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
  ```
@@ -336,6 +335,7 @@ type StoryBlock =
336
335
  | Tweet
337
336
  | Video
338
337
  | YoutubeVideo
338
+ | VimeoVideo
339
339
  | Timeline
340
340
  | ImagePair
341
341
  | InNumbers
@@ -585,6 +585,20 @@ interface YoutubeVideo extends Node {
585
585
 
586
586
  **YoutubeVideo** represents a video referenced by a Youtube URL.
587
587
 
588
+ ### `VimeoVideo`
589
+
590
+ ```ts
591
+ interface VimeoVideo extends Node {
592
+ type: "vimeo-video"
593
+ /** Vimeo embed URL e.g. https://player.vimeo.com/player/<id> or https://vimeo.com/<id>*/
594
+ url: string
595
+ }
596
+ ```
597
+
598
+ **VimeoVideo** represents a video referenced by a Vimeo URL.
599
+
600
+ _Note: this is currently only used by Specialist Titles_
601
+
588
602
  ### `ClipSet`
589
603
  ```ts
590
604
  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 | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
90
+ type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | VimeoVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
92
91
  interface Pullquote extends Node {
93
92
  type: "pullquote";
94
93
  text: string;
@@ -201,6 +200,11 @@ export declare namespace ContentTree {
201
200
  type: "youtube-video";
202
201
  url: string;
203
202
  }
203
+ interface VimeoVideo extends Node {
204
+ type: "vimeo-video";
205
+ /** Vimeo embed URL e.g. https://player.vimeo.com/player/<id> or https://vimeo.com/<id>*/
206
+ url: string;
207
+ }
204
208
  interface ClipSet extends Node {
205
209
  type: "clip-set";
206
210
  id: string;
@@ -491,7 +495,6 @@ export declare namespace ContentTree {
491
495
  interface FindOutMoreLink extends Parent {
492
496
  type: "find-out-more-link";
493
497
  url: string;
494
- title: string;
495
498
  children: [Text | Strong | Emphasis];
496
499
  }
497
500
  interface List extends Parent {
@@ -507,7 +510,7 @@ export declare namespace ContentTree {
507
510
  type: "blockquote";
508
511
  children: (Paragraph | Phrasing)[];
509
512
  }
510
- type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
513
+ type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | VimeoVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
511
514
  interface Pullquote extends Node {
512
515
  type: "pullquote";
513
516
  text: string;
@@ -620,6 +623,11 @@ export declare namespace ContentTree {
620
623
  type: "youtube-video";
621
624
  url: string;
622
625
  }
626
+ interface VimeoVideo extends Node {
627
+ type: "vimeo-video";
628
+ /** Vimeo embed URL e.g. https://player.vimeo.com/player/<id> or https://vimeo.com/<id>*/
629
+ url: string;
630
+ }
623
631
  interface ClipSet extends Node {
624
632
  type: "clip-set";
625
633
  id: string;
@@ -911,7 +919,6 @@ export declare namespace ContentTree {
911
919
  interface FindOutMoreLink extends Parent {
912
920
  type: "find-out-more-link";
913
921
  url: string;
914
- title: string;
915
922
  children: [Text | Strong | Emphasis];
916
923
  }
917
924
  interface List extends Parent {
@@ -927,7 +934,7 @@ export declare namespace ContentTree {
927
934
  type: "blockquote";
928
935
  children: (Paragraph | Phrasing)[];
929
936
  }
930
- type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
937
+ type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | VimeoVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
931
938
  interface Pullquote extends Node {
932
939
  type: "pullquote";
933
940
  text: string;
@@ -1035,6 +1042,11 @@ export declare namespace ContentTree {
1035
1042
  type: "youtube-video";
1036
1043
  url: string;
1037
1044
  }
1045
+ interface VimeoVideo extends Node {
1046
+ type: "vimeo-video";
1047
+ /** Vimeo embed URL e.g. https://player.vimeo.com/player/<id> or https://vimeo.com/<id>*/
1048
+ url: string;
1049
+ }
1038
1050
  interface ClipSet extends Node {
1039
1051
  type: "clip-set";
1040
1052
  id: string;
@@ -1304,7 +1316,6 @@ export declare namespace ContentTree {
1304
1316
  interface FindOutMoreLink extends Parent {
1305
1317
  type: "find-out-more-link";
1306
1318
  url: string;
1307
- title: string;
1308
1319
  children: [Text | Strong | Emphasis];
1309
1320
  }
1310
1321
  interface List extends Parent {
@@ -1320,7 +1331,7 @@ export declare namespace ContentTree {
1320
1331
  type: "blockquote";
1321
1332
  children: (Paragraph | Phrasing)[];
1322
1333
  }
1323
- type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
1334
+ type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | VimeoVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
1324
1335
  interface Pullquote extends Node {
1325
1336
  type: "pullquote";
1326
1337
  text: string;
@@ -1433,6 +1444,11 @@ export declare namespace ContentTree {
1433
1444
  type: "youtube-video";
1434
1445
  url: string;
1435
1446
  }
1447
+ interface VimeoVideo extends Node {
1448
+ type: "vimeo-video";
1449
+ /** Vimeo embed URL e.g. https://player.vimeo.com/player/<id> or https://vimeo.com/<id>*/
1450
+ url: string;
1451
+ }
1436
1452
  interface ClipSet extends Node {
1437
1453
  type: "clip-set";
1438
1454
  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.3.0",
4
+ "version": "0.6.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -132,6 +132,9 @@
132
132
  {
133
133
  "$ref": "#/definitions/ContentTree.transit.YoutubeVideo"
134
134
  },
135
+ {
136
+ "$ref": "#/definitions/ContentTree.transit.VimeoVideo"
137
+ },
135
138
  {
136
139
  "$ref": "#/definitions/ContentTree.transit.Timeline"
137
140
  },
@@ -350,9 +353,6 @@
350
353
  "type": "array"
351
354
  },
352
355
  "data": {},
353
- "title": {
354
- "type": "string"
355
- },
356
356
  "type": {
357
357
  "const": "find-out-more-link",
358
358
  "type": "string"
@@ -363,7 +363,6 @@
363
363
  },
364
364
  "required": [
365
365
  "children",
366
- "title",
367
366
  "type",
368
367
  "url"
369
368
  ],
@@ -1537,6 +1536,25 @@
1537
1536
  ],
1538
1537
  "type": "object"
1539
1538
  },
1539
+ "ContentTree.transit.VimeoVideo": {
1540
+ "additionalProperties": false,
1541
+ "properties": {
1542
+ "data": {},
1543
+ "type": {
1544
+ "const": "vimeo-video",
1545
+ "type": "string"
1546
+ },
1547
+ "url": {
1548
+ "description": "Vimeo embed URL e.g. https://player.vimeo.com/player/<id> or https://vimeo.com/<id>",
1549
+ "type": "string"
1550
+ }
1551
+ },
1552
+ "required": [
1553
+ "type",
1554
+ "url"
1555
+ ],
1556
+ "type": "object"
1557
+ },
1540
1558
  "ContentTree.transit.YoutubeVideo": {
1541
1559
  "additionalProperties": false,
1542
1560
  "properties": {
@@ -169,6 +169,9 @@
169
169
  {
170
170
  "$ref": "#/definitions/ContentTree.full.YoutubeVideo"
171
171
  },
172
+ {
173
+ "$ref": "#/definitions/ContentTree.full.VimeoVideo"
174
+ },
172
175
  {
173
176
  "$ref": "#/definitions/ContentTree.full.Timeline"
174
177
  },
@@ -503,9 +506,6 @@
503
506
  "type": "array"
504
507
  },
505
508
  "data": {},
506
- "title": {
507
- "type": "string"
508
- },
509
509
  "type": {
510
510
  "const": "find-out-more-link",
511
511
  "type": "string"
@@ -516,7 +516,6 @@
516
516
  },
517
517
  "required": [
518
518
  "children",
519
- "title",
520
519
  "type",
521
520
  "url"
522
521
  ],
@@ -2396,6 +2395,25 @@
2396
2395
  ],
2397
2396
  "type": "object"
2398
2397
  },
2398
+ "ContentTree.full.VimeoVideo": {
2399
+ "additionalProperties": false,
2400
+ "properties": {
2401
+ "data": {},
2402
+ "type": {
2403
+ "const": "vimeo-video",
2404
+ "type": "string"
2405
+ },
2406
+ "url": {
2407
+ "description": "Vimeo embed URL e.g. https://player.vimeo.com/player/<id> or https://vimeo.com/<id>",
2408
+ "type": "string"
2409
+ }
2410
+ },
2411
+ "required": [
2412
+ "type",
2413
+ "url"
2414
+ ],
2415
+ "type": "object"
2416
+ },
2399
2417
  "ContentTree.full.YoutubeVideo": {
2400
2418
  "additionalProperties": false,
2401
2419
  "properties": {
@@ -157,6 +157,9 @@
157
157
  {
158
158
  "$ref": "#/definitions/ContentTree.transit.YoutubeVideo"
159
159
  },
160
+ {
161
+ "$ref": "#/definitions/ContentTree.transit.VimeoVideo"
162
+ },
160
163
  {
161
164
  "$ref": "#/definitions/ContentTree.transit.Timeline"
162
165
  },
@@ -375,9 +378,6 @@
375
378
  "type": "array"
376
379
  },
377
380
  "data": {},
378
- "title": {
379
- "type": "string"
380
- },
381
381
  "type": {
382
382
  "const": "find-out-more-link",
383
383
  "type": "string"
@@ -388,7 +388,6 @@
388
388
  },
389
389
  "required": [
390
390
  "children",
391
- "title",
392
391
  "type",
393
392
  "url"
394
393
  ],
@@ -1562,6 +1561,25 @@
1562
1561
  ],
1563
1562
  "type": "object"
1564
1563
  },
1564
+ "ContentTree.transit.VimeoVideo": {
1565
+ "additionalProperties": false,
1566
+ "properties": {
1567
+ "data": {},
1568
+ "type": {
1569
+ "const": "vimeo-video",
1570
+ "type": "string"
1571
+ },
1572
+ "url": {
1573
+ "description": "Vimeo embed URL e.g. https://player.vimeo.com/player/<id> or https://vimeo.com/<id>",
1574
+ "type": "string"
1575
+ }
1576
+ },
1577
+ "required": [
1578
+ "type",
1579
+ "url"
1580
+ ],
1581
+ "type": "object"
1582
+ },
1565
1583
  "ContentTree.transit.YoutubeVideo": {
1566
1584
  "additionalProperties": false,
1567
1585
  "properties": {