@financial-times/content-tree 0.3.0 → 0.5.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
@@ -336,6 +336,7 @@ type StoryBlock =
336
336
  | Tweet
337
337
  | Video
338
338
  | YoutubeVideo
339
+ | VimeoVideo
339
340
  | Timeline
340
341
  | ImagePair
341
342
  | InNumbers
@@ -585,6 +586,20 @@ interface YoutubeVideo extends Node {
585
586
 
586
587
  **YoutubeVideo** represents a video referenced by a Youtube URL.
587
588
 
589
+ ### `VimeoVideo`
590
+
591
+ ```ts
592
+ interface VimeoVideo extends Node {
593
+ type: "vimeo-video"
594
+ /** Vimeo embed URL e.g. https://player.vimeo.com/player/<id> or https://vimeo.com/<id>*/
595
+ url: string
596
+ }
597
+ ```
598
+
599
+ **VimeoVideo** represents a video referenced by a Vimeo URL.
600
+
601
+ _Note: this is currently only used by Specialist Titles_
602
+
588
603
  ### `ClipSet`
589
604
  ```ts
590
605
  interface ClipSet extends Node {
package/content-tree.d.ts CHANGED
@@ -88,7 +88,7 @@ export declare namespace ContentTree {
88
88
  type: "blockquote";
89
89
  children: (Paragraph | Phrasing)[];
90
90
  }
91
- type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
91
+ type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | VimeoVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
92
92
  interface Pullquote extends Node {
93
93
  type: "pullquote";
94
94
  text: string;
@@ -201,6 +201,11 @@ export declare namespace ContentTree {
201
201
  type: "youtube-video";
202
202
  url: string;
203
203
  }
204
+ interface VimeoVideo extends Node {
205
+ type: "vimeo-video";
206
+ /** Vimeo embed URL e.g. https://player.vimeo.com/player/<id> or https://vimeo.com/<id>*/
207
+ url: string;
208
+ }
204
209
  interface ClipSet extends Node {
205
210
  type: "clip-set";
206
211
  id: string;
@@ -507,7 +512,7 @@ export declare namespace ContentTree {
507
512
  type: "blockquote";
508
513
  children: (Paragraph | Phrasing)[];
509
514
  }
510
- type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
515
+ type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | VimeoVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
511
516
  interface Pullquote extends Node {
512
517
  type: "pullquote";
513
518
  text: string;
@@ -620,6 +625,11 @@ export declare namespace ContentTree {
620
625
  type: "youtube-video";
621
626
  url: string;
622
627
  }
628
+ interface VimeoVideo extends Node {
629
+ type: "vimeo-video";
630
+ /** Vimeo embed URL e.g. https://player.vimeo.com/player/<id> or https://vimeo.com/<id>*/
631
+ url: string;
632
+ }
623
633
  interface ClipSet extends Node {
624
634
  type: "clip-set";
625
635
  id: string;
@@ -927,7 +937,7 @@ export declare namespace ContentTree {
927
937
  type: "blockquote";
928
938
  children: (Paragraph | Phrasing)[];
929
939
  }
930
- type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
940
+ type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | VimeoVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
931
941
  interface Pullquote extends Node {
932
942
  type: "pullquote";
933
943
  text: string;
@@ -1035,6 +1045,11 @@ export declare namespace ContentTree {
1035
1045
  type: "youtube-video";
1036
1046
  url: string;
1037
1047
  }
1048
+ interface VimeoVideo extends Node {
1049
+ type: "vimeo-video";
1050
+ /** Vimeo embed URL e.g. https://player.vimeo.com/player/<id> or https://vimeo.com/<id>*/
1051
+ url: string;
1052
+ }
1038
1053
  interface ClipSet extends Node {
1039
1054
  type: "clip-set";
1040
1055
  id: string;
@@ -1320,7 +1335,7 @@ export declare namespace ContentTree {
1320
1335
  type: "blockquote";
1321
1336
  children: (Paragraph | Phrasing)[];
1322
1337
  }
1323
- type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
1338
+ type StoryBlock = ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | Pullquote | ScrollyBlock | ClipSet | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | VimeoVideo | Timeline | ImagePair | InNumbers | Definition | InfoBox | InfoPair;
1324
1339
  interface Pullquote extends Node {
1325
1340
  type: "pullquote";
1326
1341
  text: string;
@@ -1433,6 +1448,11 @@ export declare namespace ContentTree {
1433
1448
  type: "youtube-video";
1434
1449
  url: string;
1435
1450
  }
1451
+ interface VimeoVideo extends Node {
1452
+ type: "vimeo-video";
1453
+ /** Vimeo embed URL e.g. https://player.vimeo.com/player/<id> or https://vimeo.com/<id>*/
1454
+ url: string;
1455
+ }
1436
1456
  interface ClipSet extends Node {
1437
1457
  type: "clip-set";
1438
1458
  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.5.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
  },
@@ -1537,6 +1540,25 @@
1537
1540
  ],
1538
1541
  "type": "object"
1539
1542
  },
1543
+ "ContentTree.transit.VimeoVideo": {
1544
+ "additionalProperties": false,
1545
+ "properties": {
1546
+ "data": {},
1547
+ "type": {
1548
+ "const": "vimeo-video",
1549
+ "type": "string"
1550
+ },
1551
+ "url": {
1552
+ "description": "Vimeo embed URL e.g. https://player.vimeo.com/player/<id> or https://vimeo.com/<id>",
1553
+ "type": "string"
1554
+ }
1555
+ },
1556
+ "required": [
1557
+ "type",
1558
+ "url"
1559
+ ],
1560
+ "type": "object"
1561
+ },
1540
1562
  "ContentTree.transit.YoutubeVideo": {
1541
1563
  "additionalProperties": false,
1542
1564
  "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
  },
@@ -2396,6 +2399,25 @@
2396
2399
  ],
2397
2400
  "type": "object"
2398
2401
  },
2402
+ "ContentTree.full.VimeoVideo": {
2403
+ "additionalProperties": false,
2404
+ "properties": {
2405
+ "data": {},
2406
+ "type": {
2407
+ "const": "vimeo-video",
2408
+ "type": "string"
2409
+ },
2410
+ "url": {
2411
+ "description": "Vimeo embed URL e.g. https://player.vimeo.com/player/<id> or https://vimeo.com/<id>",
2412
+ "type": "string"
2413
+ }
2414
+ },
2415
+ "required": [
2416
+ "type",
2417
+ "url"
2418
+ ],
2419
+ "type": "object"
2420
+ },
2399
2421
  "ContentTree.full.YoutubeVideo": {
2400
2422
  "additionalProperties": false,
2401
2423
  "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
  },
@@ -1562,6 +1565,25 @@
1562
1565
  ],
1563
1566
  "type": "object"
1564
1567
  },
1568
+ "ContentTree.transit.VimeoVideo": {
1569
+ "additionalProperties": false,
1570
+ "properties": {
1571
+ "data": {},
1572
+ "type": {
1573
+ "const": "vimeo-video",
1574
+ "type": "string"
1575
+ },
1576
+ "url": {
1577
+ "description": "Vimeo embed URL e.g. https://player.vimeo.com/player/<id> or https://vimeo.com/<id>",
1578
+ "type": "string"
1579
+ }
1580
+ },
1581
+ "required": [
1582
+ "type",
1583
+ "url"
1584
+ ],
1585
+ "type": "object"
1586
+ },
1565
1587
  "ContentTree.transit.YoutubeVideo": {
1566
1588
  "additionalProperties": false,
1567
1589
  "properties": {