Skip to content

Commit bedc664

Browse files
Add InNumbers to BodyBlock to populate schemas
1 parent 3ba073b commit bedc664

File tree

5 files changed

+191
-4
lines changed

5 files changed

+191
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ type BodyBlock =
107107
| Video
108108
| YoutubeVideo
109109
| Text
110+
| InNumbers
110111
```
111112
112113
`BodyBlock` nodes are the only things that are valid as the top level of a `Body`.

content-tree.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export declare namespace ContentTree {
2-
type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Text;
2+
type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Text | InNumbers;
33
type LayoutWidth = "auto" | "in-line" | "inset-left" | "inset-right" | "full-bleed" | "full-grid" | "mid-grid" | "full-width";
44
type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Link;
55
interface Node {
@@ -303,7 +303,7 @@ export declare namespace ContentTree {
303303
children: [Definition, Definition, Definition];
304304
}
305305
namespace full {
306-
type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Text;
306+
type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Text | InNumbers;
307307
type LayoutWidth = "auto" | "in-line" | "inset-left" | "inset-right" | "full-bleed" | "full-grid" | "mid-grid" | "full-width";
308308
type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Link;
309309
interface Node {
@@ -608,7 +608,7 @@ export declare namespace ContentTree {
608608
}
609609
}
610610
namespace transit {
611-
type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Text;
611+
type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Text | InNumbers;
612612
type LayoutWidth = "auto" | "in-line" | "inset-left" | "inset-right" | "full-bleed" | "full-grid" | "mid-grid" | "full-width";
613613
type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Link;
614614
interface Node {
@@ -898,7 +898,7 @@ export declare namespace ContentTree {
898898
}
899899
}
900900
namespace loose {
901-
type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Text;
901+
type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Text | InNumbers;
902902
type LayoutWidth = "auto" | "in-line" | "inset-left" | "inset-right" | "full-bleed" | "full-grid" | "mid-grid" | "full-width";
903903
type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Link;
904904
interface Node {

schemas/body-tree.schema.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@
125125
},
126126
{
127127
"$ref": "#/definitions/ContentTree.transit.Text"
128+
},
129+
{
130+
"$ref": "#/definitions/ContentTree.transit.InNumbers"
128131
}
129132
]
130133
},
@@ -167,6 +170,29 @@
167170
],
168171
"type": "object"
169172
},
173+
"ContentTree.transit.Definition": {
174+
"additionalProperties": false,
175+
"description": "A definition has a term and a related description. It is used to describe a term.",
176+
"properties": {
177+
"data": {},
178+
"description": {
179+
"type": "string"
180+
},
181+
"term": {
182+
"type": "string"
183+
},
184+
"type": {
185+
"const": "definition",
186+
"type": "string"
187+
}
188+
},
189+
"required": [
190+
"description",
191+
"term",
192+
"type"
193+
],
194+
"type": "object"
195+
},
170196
"ContentTree.transit.Emphasis": {
171197
"additionalProperties": false,
172198
"properties": {
@@ -284,6 +310,42 @@
284310
],
285311
"type": "object"
286312
},
313+
"ContentTree.transit.InNumbers": {
314+
"additionalProperties": false,
315+
"description": "InNumbers represents a set of numbers with related descriptions.",
316+
"properties": {
317+
"children": {
318+
"items": [
319+
{
320+
"$ref": "#/definitions/ContentTree.transit.Definition"
321+
},
322+
{
323+
"$ref": "#/definitions/ContentTree.transit.Definition"
324+
},
325+
{
326+
"$ref": "#/definitions/ContentTree.transit.Definition"
327+
}
328+
],
329+
"maxItems": 3,
330+
"minItems": 3,
331+
"type": "array"
332+
},
333+
"data": {},
334+
"title": {
335+
"description": "The title for the InNumbers",
336+
"type": "string"
337+
},
338+
"type": {
339+
"const": "in-numbers",
340+
"type": "string"
341+
}
342+
},
343+
"required": [
344+
"children",
345+
"type"
346+
],
347+
"type": "object"
348+
},
287349
"ContentTree.transit.Layout": {
288350
"additionalProperties": false,
289351
"properties": {

schemas/content-tree.schema.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@
150150
},
151151
{
152152
"$ref": "#/definitions/ContentTree.full.Text"
153+
},
154+
{
155+
"$ref": "#/definitions/ContentTree.full.InNumbers"
153156
}
154157
]
155158
},
@@ -218,6 +221,29 @@
218221
],
219222
"type": "object"
220223
},
224+
"ContentTree.full.Definition": {
225+
"additionalProperties": false,
226+
"description": "A definition has a term and a related description. It is used to describe a term.",
227+
"properties": {
228+
"data": {},
229+
"description": {
230+
"type": "string"
231+
},
232+
"term": {
233+
"type": "string"
234+
},
235+
"type": {
236+
"const": "definition",
237+
"type": "string"
238+
}
239+
},
240+
"required": [
241+
"description",
242+
"term",
243+
"type"
244+
],
245+
"type": "object"
246+
},
221247
"ContentTree.full.Emphasis": {
222248
"additionalProperties": false,
223249
"properties": {
@@ -553,6 +579,42 @@
553579
],
554580
"type": "object"
555581
},
582+
"ContentTree.full.InNumbers": {
583+
"additionalProperties": false,
584+
"description": "InNumbers represents a set of numbers with related descriptions.",
585+
"properties": {
586+
"children": {
587+
"items": [
588+
{
589+
"$ref": "#/definitions/ContentTree.full.Definition"
590+
},
591+
{
592+
"$ref": "#/definitions/ContentTree.full.Definition"
593+
},
594+
{
595+
"$ref": "#/definitions/ContentTree.full.Definition"
596+
}
597+
],
598+
"maxItems": 3,
599+
"minItems": 3,
600+
"type": "array"
601+
},
602+
"data": {},
603+
"title": {
604+
"description": "The title for the InNumbers",
605+
"type": "string"
606+
},
607+
"type": {
608+
"const": "in-numbers",
609+
"type": "string"
610+
}
611+
},
612+
"required": [
613+
"children",
614+
"type"
615+
],
616+
"type": "object"
617+
},
556618
"ContentTree.full.Layout": {
557619
"additionalProperties": false,
558620
"properties": {

schemas/transit-tree.schema.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@
150150
},
151151
{
152152
"$ref": "#/definitions/ContentTree.transit.Text"
153+
},
154+
{
155+
"$ref": "#/definitions/ContentTree.transit.InNumbers"
153156
}
154157
]
155158
},
@@ -192,6 +195,29 @@
192195
],
193196
"type": "object"
194197
},
198+
"ContentTree.transit.Definition": {
199+
"additionalProperties": false,
200+
"description": "A definition has a term and a related description. It is used to describe a term.",
201+
"properties": {
202+
"data": {},
203+
"description": {
204+
"type": "string"
205+
},
206+
"term": {
207+
"type": "string"
208+
},
209+
"type": {
210+
"const": "definition",
211+
"type": "string"
212+
}
213+
},
214+
"required": [
215+
"description",
216+
"term",
217+
"type"
218+
],
219+
"type": "object"
220+
},
195221
"ContentTree.transit.Emphasis": {
196222
"additionalProperties": false,
197223
"properties": {
@@ -309,6 +335,42 @@
309335
],
310336
"type": "object"
311337
},
338+
"ContentTree.transit.InNumbers": {
339+
"additionalProperties": false,
340+
"description": "InNumbers represents a set of numbers with related descriptions.",
341+
"properties": {
342+
"children": {
343+
"items": [
344+
{
345+
"$ref": "#/definitions/ContentTree.transit.Definition"
346+
},
347+
{
348+
"$ref": "#/definitions/ContentTree.transit.Definition"
349+
},
350+
{
351+
"$ref": "#/definitions/ContentTree.transit.Definition"
352+
}
353+
],
354+
"maxItems": 3,
355+
"minItems": 3,
356+
"type": "array"
357+
},
358+
"data": {},
359+
"title": {
360+
"description": "The title for the InNumbers",
361+
"type": "string"
362+
},
363+
"type": {
364+
"const": "in-numbers",
365+
"type": "string"
366+
}
367+
},
368+
"required": [
369+
"children",
370+
"type"
371+
],
372+
"type": "object"
373+
},
312374
"ContentTree.transit.Layout": {
313375
"additionalProperties": false,
314376
"properties": {

0 commit comments

Comments
 (0)