Skip to content

Commit f4dc224

Browse files
Add InNumbers to BodyBlock to populate schemas
1 parent f85bd7a commit f4dc224

File tree

5 files changed

+201
-4
lines changed

5 files changed

+201
-4
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ type BodyBlock =
116116
| Text
117117
| Timeline
118118
| ImagePair
119+
| InNumbers
120+
| Definition
119121
```
120122
121123
`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 | Timeline | ImagePair;
2+
type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Text | Timeline | ImagePair | InNumbers | Definition;
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 {
@@ -325,7 +325,7 @@ export declare namespace ContentTree {
325325
children: [Definition, Definition, Definition];
326326
}
327327
namespace full {
328-
type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Text | Timeline | ImagePair;
328+
type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Text | Timeline | ImagePair | InNumbers | Definition;
329329
type LayoutWidth = "auto" | "in-line" | "inset-left" | "inset-right" | "full-bleed" | "full-grid" | "mid-grid" | "full-width";
330330
type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Link;
331331
interface Node {
@@ -652,7 +652,7 @@ export declare namespace ContentTree {
652652
}
653653
}
654654
namespace transit {
655-
type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Text | Timeline | ImagePair;
655+
type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Text | Timeline | ImagePair | InNumbers | Definition;
656656
type LayoutWidth = "auto" | "in-line" | "inset-left" | "inset-right" | "full-bleed" | "full-grid" | "mid-grid" | "full-width";
657657
type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Link;
658658
interface Node {
@@ -964,7 +964,7 @@ export declare namespace ContentTree {
964964
}
965965
}
966966
namespace loose {
967-
type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Text | Timeline | ImagePair;
967+
type BodyBlock = Paragraph | Heading | ImageSet | Flourish | BigNumber | CustomCodeComponent | Layout | List | Blockquote | Pullquote | ScrollyBlock | ThematicBreak | Table | Recommended | RecommendedList | Tweet | Video | YoutubeVideo | Text | Timeline | ImagePair | InNumbers | Definition;
968968
type LayoutWidth = "auto" | "in-line" | "inset-left" | "inset-right" | "full-bleed" | "full-grid" | "mid-grid" | "full-width";
969969
type Phrasing = Text | Break | Strong | Emphasis | Strikethrough | Link;
970970
interface Node {

schemas/body-tree.schema.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@
131131
},
132132
{
133133
"$ref": "#/definitions/ContentTree.transit.ImagePair"
134+
},
135+
{
136+
"$ref": "#/definitions/ContentTree.transit.InNumbers"
137+
},
138+
{
139+
"$ref": "#/definitions/ContentTree.transit.Definition"
134140
}
135141
]
136142
},
@@ -173,6 +179,29 @@
173179
],
174180
"type": "object"
175181
},
182+
"ContentTree.transit.Definition": {
183+
"additionalProperties": false,
184+
"description": "A definition has a term and a related description. It is used to describe a term.",
185+
"properties": {
186+
"data": {},
187+
"description": {
188+
"type": "string"
189+
},
190+
"term": {
191+
"type": "string"
192+
},
193+
"type": {
194+
"const": "definition",
195+
"type": "string"
196+
}
197+
},
198+
"required": [
199+
"description",
200+
"term",
201+
"type"
202+
],
203+
"type": "object"
204+
},
176205
"ContentTree.transit.Emphasis": {
177206
"additionalProperties": false,
178207
"properties": {
@@ -318,6 +347,42 @@
318347
],
319348
"type": "object"
320349
},
350+
"ContentTree.transit.InNumbers": {
351+
"additionalProperties": false,
352+
"description": "InNumbers represents a set of numbers with related descriptions.",
353+
"properties": {
354+
"children": {
355+
"items": [
356+
{
357+
"$ref": "#/definitions/ContentTree.transit.Definition"
358+
},
359+
{
360+
"$ref": "#/definitions/ContentTree.transit.Definition"
361+
},
362+
{
363+
"$ref": "#/definitions/ContentTree.transit.Definition"
364+
}
365+
],
366+
"maxItems": 3,
367+
"minItems": 3,
368+
"type": "array"
369+
},
370+
"data": {},
371+
"title": {
372+
"description": "The title for the InNumbers",
373+
"type": "string"
374+
},
375+
"type": {
376+
"const": "in-numbers",
377+
"type": "string"
378+
}
379+
},
380+
"required": [
381+
"children",
382+
"type"
383+
],
384+
"type": "object"
385+
},
321386
"ContentTree.transit.Layout": {
322387
"additionalProperties": false,
323388
"properties": {

schemas/content-tree.schema.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@
156156
},
157157
{
158158
"$ref": "#/definitions/ContentTree.full.ImagePair"
159+
},
160+
{
161+
"$ref": "#/definitions/ContentTree.full.InNumbers"
162+
},
163+
{
164+
"$ref": "#/definitions/ContentTree.full.Definition"
159165
}
160166
]
161167
},
@@ -224,6 +230,29 @@
224230
],
225231
"type": "object"
226232
},
233+
"ContentTree.full.Definition": {
234+
"additionalProperties": false,
235+
"description": "A definition has a term and a related description. It is used to describe a term.",
236+
"properties": {
237+
"data": {},
238+
"description": {
239+
"type": "string"
240+
},
241+
"term": {
242+
"type": "string"
243+
},
244+
"type": {
245+
"const": "definition",
246+
"type": "string"
247+
}
248+
},
249+
"required": [
250+
"description",
251+
"term",
252+
"type"
253+
],
254+
"type": "object"
255+
},
227256
"ContentTree.full.Emphasis": {
228257
"additionalProperties": false,
229258
"properties": {
@@ -587,6 +616,42 @@
587616
],
588617
"type": "object"
589618
},
619+
"ContentTree.full.InNumbers": {
620+
"additionalProperties": false,
621+
"description": "InNumbers represents a set of numbers with related descriptions.",
622+
"properties": {
623+
"children": {
624+
"items": [
625+
{
626+
"$ref": "#/definitions/ContentTree.full.Definition"
627+
},
628+
{
629+
"$ref": "#/definitions/ContentTree.full.Definition"
630+
},
631+
{
632+
"$ref": "#/definitions/ContentTree.full.Definition"
633+
}
634+
],
635+
"maxItems": 3,
636+
"minItems": 3,
637+
"type": "array"
638+
},
639+
"data": {},
640+
"title": {
641+
"description": "The title for the InNumbers",
642+
"type": "string"
643+
},
644+
"type": {
645+
"const": "in-numbers",
646+
"type": "string"
647+
}
648+
},
649+
"required": [
650+
"children",
651+
"type"
652+
],
653+
"type": "object"
654+
},
590655
"ContentTree.full.Layout": {
591656
"additionalProperties": false,
592657
"properties": {

schemas/transit-tree.schema.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@
156156
},
157157
{
158158
"$ref": "#/definitions/ContentTree.transit.ImagePair"
159+
},
160+
{
161+
"$ref": "#/definitions/ContentTree.transit.InNumbers"
162+
},
163+
{
164+
"$ref": "#/definitions/ContentTree.transit.Definition"
159165
}
160166
]
161167
},
@@ -198,6 +204,29 @@
198204
],
199205
"type": "object"
200206
},
207+
"ContentTree.transit.Definition": {
208+
"additionalProperties": false,
209+
"description": "A definition has a term and a related description. It is used to describe a term.",
210+
"properties": {
211+
"data": {},
212+
"description": {
213+
"type": "string"
214+
},
215+
"term": {
216+
"type": "string"
217+
},
218+
"type": {
219+
"const": "definition",
220+
"type": "string"
221+
}
222+
},
223+
"required": [
224+
"description",
225+
"term",
226+
"type"
227+
],
228+
"type": "object"
229+
},
201230
"ContentTree.transit.Emphasis": {
202231
"additionalProperties": false,
203232
"properties": {
@@ -343,6 +372,42 @@
343372
],
344373
"type": "object"
345374
},
375+
"ContentTree.transit.InNumbers": {
376+
"additionalProperties": false,
377+
"description": "InNumbers represents a set of numbers with related descriptions.",
378+
"properties": {
379+
"children": {
380+
"items": [
381+
{
382+
"$ref": "#/definitions/ContentTree.transit.Definition"
383+
},
384+
{
385+
"$ref": "#/definitions/ContentTree.transit.Definition"
386+
},
387+
{
388+
"$ref": "#/definitions/ContentTree.transit.Definition"
389+
}
390+
],
391+
"maxItems": 3,
392+
"minItems": 3,
393+
"type": "array"
394+
},
395+
"data": {},
396+
"title": {
397+
"description": "The title for the InNumbers",
398+
"type": "string"
399+
},
400+
"type": {
401+
"const": "in-numbers",
402+
"type": "string"
403+
}
404+
},
405+
"required": [
406+
"children",
407+
"type"
408+
],
409+
"type": "object"
410+
},
346411
"ContentTree.transit.Layout": {
347412
"additionalProperties": false,
348413
"properties": {

0 commit comments

Comments
 (0)