@financial-times/content-tree 0.7.0 → 0.9.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
@@ -163,7 +163,7 @@ interface Text extends Node {
163
163
  ### `Phrasing`
164
164
 
165
165
  ```ts
166
- type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Link | FindOutMoreLink
166
+ type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Subscript | Superscript | Link | FindOutMoreLink
167
167
  ```
168
168
 
169
169
  A phrasing node cannot have ancestor of the same type.
@@ -257,6 +257,28 @@ interface Strikethrough extends Parent {
257
257
 
258
258
  **Strikethrough** represents a piece of text that has been stricken.
259
259
 
260
+ ### Subscript
261
+
262
+ ```ts
263
+ interface Subscript extends Parent {
264
+ type: "subscript"
265
+ children: Phrasing[]
266
+ }
267
+ ```
268
+
269
+ **Subscript** represents a piece of text that has a lowered baseline.
270
+
271
+ ### Superscript
272
+
273
+ ```ts
274
+ interface Superscript extends Parent {
275
+ type: "superscript"
276
+ children: Phrasing[]
277
+ }
278
+ ```
279
+
280
+ **Superscript** represents a piece of text with a raised baseline.
281
+
260
282
  ### `Link`
261
283
 
262
284
  ```ts
package/content-tree.d.ts CHANGED
@@ -34,7 +34,7 @@ export declare namespace ContentTree {
34
34
  type: "text";
35
35
  value: string;
36
36
  }
37
- type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Link | FindOutMoreLink;
37
+ type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Subscript | Superscript | Link | FindOutMoreLink;
38
38
  interface Break extends Node {
39
39
  type: "break";
40
40
  }
@@ -63,6 +63,14 @@ export declare namespace ContentTree {
63
63
  type: "strikethrough";
64
64
  children: Phrasing[];
65
65
  }
66
+ interface Subscript extends Parent {
67
+ type: "subscript";
68
+ children: Phrasing[];
69
+ }
70
+ interface Superscript extends Parent {
71
+ type: "superscript";
72
+ children: Phrasing[];
73
+ }
66
74
  interface Link extends Parent {
67
75
  type: "link";
68
76
  url: string;
@@ -462,7 +470,7 @@ export declare namespace ContentTree {
462
470
  type: "text";
463
471
  value: string;
464
472
  }
465
- type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Link | FindOutMoreLink;
473
+ type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Subscript | Superscript | Link | FindOutMoreLink;
466
474
  interface Break extends Node {
467
475
  type: "break";
468
476
  }
@@ -491,6 +499,14 @@ export declare namespace ContentTree {
491
499
  type: "strikethrough";
492
500
  children: Phrasing[];
493
501
  }
502
+ interface Subscript extends Parent {
503
+ type: "subscript";
504
+ children: Phrasing[];
505
+ }
506
+ interface Superscript extends Parent {
507
+ type: "superscript";
508
+ children: Phrasing[];
509
+ }
494
510
  interface Link extends Parent {
495
511
  type: "link";
496
512
  url: string;
@@ -891,7 +907,7 @@ export declare namespace ContentTree {
891
907
  type: "text";
892
908
  value: string;
893
909
  }
894
- type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Link | FindOutMoreLink;
910
+ type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Subscript | Superscript | Link | FindOutMoreLink;
895
911
  interface Break extends Node {
896
912
  type: "break";
897
913
  }
@@ -920,6 +936,14 @@ export declare namespace ContentTree {
920
936
  type: "strikethrough";
921
937
  children: Phrasing[];
922
938
  }
939
+ interface Subscript extends Parent {
940
+ type: "subscript";
941
+ children: Phrasing[];
942
+ }
943
+ interface Superscript extends Parent {
944
+ type: "superscript";
945
+ children: Phrasing[];
946
+ }
923
947
  interface Link extends Parent {
924
948
  type: "link";
925
949
  url: string;
@@ -1293,7 +1317,7 @@ export declare namespace ContentTree {
1293
1317
  type: "text";
1294
1318
  value: string;
1295
1319
  }
1296
- type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Link | FindOutMoreLink;
1320
+ type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Subscript | Superscript | Link | FindOutMoreLink;
1297
1321
  interface Break extends Node {
1298
1322
  type: "break";
1299
1323
  }
@@ -1322,6 +1346,14 @@ export declare namespace ContentTree {
1322
1346
  type: "strikethrough";
1323
1347
  children: Phrasing[];
1324
1348
  }
1349
+ interface Subscript extends Parent {
1350
+ type: "subscript";
1351
+ children: Phrasing[];
1352
+ }
1353
+ interface Superscript extends Parent {
1354
+ type: "superscript";
1355
+ children: Phrasing[];
1356
+ }
1325
1357
  interface Link extends Parent {
1326
1358
  type: "link";
1327
1359
  url: 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.7.0",
4
+ "version": "0.9.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -67,6 +67,12 @@
67
67
  {
68
68
  "$ref": "#/definitions/ContentTree.transit.Strikethrough"
69
69
  },
70
+ {
71
+ "$ref": "#/definitions/ContentTree.transit.Subscript"
72
+ },
73
+ {
74
+ "$ref": "#/definitions/ContentTree.transit.Superscript"
75
+ },
70
76
  {
71
77
  "$ref": "#/definitions/ContentTree.transit.Link"
72
78
  },
@@ -839,6 +845,12 @@
839
845
  {
840
846
  "$ref": "#/definitions/ContentTree.transit.Strikethrough"
841
847
  },
848
+ {
849
+ "$ref": "#/definitions/ContentTree.transit.Subscript"
850
+ },
851
+ {
852
+ "$ref": "#/definitions/ContentTree.transit.Superscript"
853
+ },
842
854
  {
843
855
  "$ref": "#/definitions/ContentTree.transit.Link"
844
856
  },
@@ -899,6 +911,12 @@
899
911
  {
900
912
  "$ref": "#/definitions/ContentTree.transit.Strikethrough"
901
913
  },
914
+ {
915
+ "$ref": "#/definitions/ContentTree.transit.Subscript"
916
+ },
917
+ {
918
+ "$ref": "#/definitions/ContentTree.transit.Superscript"
919
+ },
902
920
  {
903
921
  "$ref": "#/definitions/ContentTree.transit.Link"
904
922
  },
@@ -1178,6 +1196,48 @@
1178
1196
  ],
1179
1197
  "type": "object"
1180
1198
  },
1199
+ "ContentTree.transit.Subscript": {
1200
+ "additionalProperties": false,
1201
+ "properties": {
1202
+ "children": {
1203
+ "items": {
1204
+ "$ref": "#/definitions/ContentTree.transit.Phrasing"
1205
+ },
1206
+ "type": "array"
1207
+ },
1208
+ "data": {},
1209
+ "type": {
1210
+ "const": "subscript",
1211
+ "type": "string"
1212
+ }
1213
+ },
1214
+ "required": [
1215
+ "children",
1216
+ "type"
1217
+ ],
1218
+ "type": "object"
1219
+ },
1220
+ "ContentTree.transit.Superscript": {
1221
+ "additionalProperties": false,
1222
+ "properties": {
1223
+ "children": {
1224
+ "items": {
1225
+ "$ref": "#/definitions/ContentTree.transit.Phrasing"
1226
+ },
1227
+ "type": "array"
1228
+ },
1229
+ "data": {},
1230
+ "type": {
1231
+ "const": "superscript",
1232
+ "type": "string"
1233
+ }
1234
+ },
1235
+ "required": [
1236
+ "children",
1237
+ "type"
1238
+ ],
1239
+ "type": "object"
1240
+ },
1181
1241
  "ContentTree.transit.Table": {
1182
1242
  "additionalProperties": false,
1183
1243
  "properties": {
@@ -79,6 +79,12 @@
79
79
  {
80
80
  "$ref": "#/definitions/ContentTree.full.Strikethrough"
81
81
  },
82
+ {
83
+ "$ref": "#/definitions/ContentTree.full.Subscript"
84
+ },
85
+ {
86
+ "$ref": "#/definitions/ContentTree.full.Superscript"
87
+ },
82
88
  {
83
89
  "$ref": "#/definitions/ContentTree.full.Link"
84
90
  },
@@ -1323,6 +1329,12 @@
1323
1329
  {
1324
1330
  "$ref": "#/definitions/ContentTree.full.Strikethrough"
1325
1331
  },
1332
+ {
1333
+ "$ref": "#/definitions/ContentTree.full.Subscript"
1334
+ },
1335
+ {
1336
+ "$ref": "#/definitions/ContentTree.full.Superscript"
1337
+ },
1326
1338
  {
1327
1339
  "$ref": "#/definitions/ContentTree.full.Link"
1328
1340
  },
@@ -1383,6 +1395,12 @@
1383
1395
  {
1384
1396
  "$ref": "#/definitions/ContentTree.full.Strikethrough"
1385
1397
  },
1398
+ {
1399
+ "$ref": "#/definitions/ContentTree.full.Subscript"
1400
+ },
1401
+ {
1402
+ "$ref": "#/definitions/ContentTree.full.Superscript"
1403
+ },
1386
1404
  {
1387
1405
  "$ref": "#/definitions/ContentTree.full.Link"
1388
1406
  },
@@ -1998,6 +2016,48 @@
1998
2016
  ],
1999
2017
  "type": "object"
2000
2018
  },
2019
+ "ContentTree.full.Subscript": {
2020
+ "additionalProperties": false,
2021
+ "properties": {
2022
+ "children": {
2023
+ "items": {
2024
+ "$ref": "#/definitions/ContentTree.full.Phrasing"
2025
+ },
2026
+ "type": "array"
2027
+ },
2028
+ "data": {},
2029
+ "type": {
2030
+ "const": "subscript",
2031
+ "type": "string"
2032
+ }
2033
+ },
2034
+ "required": [
2035
+ "children",
2036
+ "type"
2037
+ ],
2038
+ "type": "object"
2039
+ },
2040
+ "ContentTree.full.Superscript": {
2041
+ "additionalProperties": false,
2042
+ "properties": {
2043
+ "children": {
2044
+ "items": {
2045
+ "$ref": "#/definitions/ContentTree.full.Phrasing"
2046
+ },
2047
+ "type": "array"
2048
+ },
2049
+ "data": {},
2050
+ "type": {
2051
+ "const": "superscript",
2052
+ "type": "string"
2053
+ }
2054
+ },
2055
+ "required": [
2056
+ "children",
2057
+ "type"
2058
+ ],
2059
+ "type": "object"
2060
+ },
2001
2061
  "ContentTree.full.Table": {
2002
2062
  "additionalProperties": false,
2003
2063
  "properties": {
@@ -67,6 +67,12 @@
67
67
  {
68
68
  "$ref": "#/definitions/ContentTree.transit.Strikethrough"
69
69
  },
70
+ {
71
+ "$ref": "#/definitions/ContentTree.transit.Subscript"
72
+ },
73
+ {
74
+ "$ref": "#/definitions/ContentTree.transit.Superscript"
75
+ },
70
76
  {
71
77
  "$ref": "#/definitions/ContentTree.transit.Link"
72
78
  },
@@ -864,6 +870,12 @@
864
870
  {
865
871
  "$ref": "#/definitions/ContentTree.transit.Strikethrough"
866
872
  },
873
+ {
874
+ "$ref": "#/definitions/ContentTree.transit.Subscript"
875
+ },
876
+ {
877
+ "$ref": "#/definitions/ContentTree.transit.Superscript"
878
+ },
867
879
  {
868
880
  "$ref": "#/definitions/ContentTree.transit.Link"
869
881
  },
@@ -924,6 +936,12 @@
924
936
  {
925
937
  "$ref": "#/definitions/ContentTree.transit.Strikethrough"
926
938
  },
939
+ {
940
+ "$ref": "#/definitions/ContentTree.transit.Subscript"
941
+ },
942
+ {
943
+ "$ref": "#/definitions/ContentTree.transit.Superscript"
944
+ },
927
945
  {
928
946
  "$ref": "#/definitions/ContentTree.transit.Link"
929
947
  },
@@ -1203,6 +1221,48 @@
1203
1221
  ],
1204
1222
  "type": "object"
1205
1223
  },
1224
+ "ContentTree.transit.Subscript": {
1225
+ "additionalProperties": false,
1226
+ "properties": {
1227
+ "children": {
1228
+ "items": {
1229
+ "$ref": "#/definitions/ContentTree.transit.Phrasing"
1230
+ },
1231
+ "type": "array"
1232
+ },
1233
+ "data": {},
1234
+ "type": {
1235
+ "const": "subscript",
1236
+ "type": "string"
1237
+ }
1238
+ },
1239
+ "required": [
1240
+ "children",
1241
+ "type"
1242
+ ],
1243
+ "type": "object"
1244
+ },
1245
+ "ContentTree.transit.Superscript": {
1246
+ "additionalProperties": false,
1247
+ "properties": {
1248
+ "children": {
1249
+ "items": {
1250
+ "$ref": "#/definitions/ContentTree.transit.Phrasing"
1251
+ },
1252
+ "type": "array"
1253
+ },
1254
+ "data": {},
1255
+ "type": {
1256
+ "const": "superscript",
1257
+ "type": "string"
1258
+ }
1259
+ },
1260
+ "required": [
1261
+ "children",
1262
+ "type"
1263
+ ],
1264
+ "type": "object"
1265
+ },
1206
1266
  "ContentTree.transit.Table": {
1207
1267
  "additionalProperties": false,
1208
1268
  "properties": {