UNPKG

44.4 kBJSONView Raw
1{
2 "$schema": "http://json-schema.org/draft-07/schema#",
3 "$id": "https://spec.myst.tools/json-schema/myst.schema.json",
4 "description": "Myst syntax tree built on existing mdast schemas",
5 "type": "object",
6 "allOf": [
7 {
8 "properties": {
9 "type": {
10 "const": "root"
11 },
12 "children": {
13 "description": "Top-level children of myst document",
14 "anyOf": [
15 {
16 "type": "array",
17 "items": {
18 "anyOf": [
19 {
20 "$ref": "#/$defs/Block"
21 },
22 {
23 "$ref": "#/$defs/BlockBreak"
24 },
25 {
26 "$ref": "#/$defs/FlowContent"
27 }
28 ]
29 }
30 },
31 {
32 "type": "array",
33 "items": {
34 "$ref": "#/$defs/ListContent"
35 }
36 },
37 {
38 "type": "array",
39 "items": {
40 "$ref": "#/$defs/PhrasingContent"
41 }
42 }
43 ]
44 },
45 "position": {},
46 "data": {}
47 },
48 "additionalProperties": false
49 },
50 {
51 "$ref": "#/$defs/Parent"
52 }
53 ],
54 "$defs": {
55 "FlowContent": {
56 "anyOf": [
57 {
58 "$ref": "#/$defs/Paragraph"
59 },
60 {
61 "$ref": "#/$defs/Definition"
62 },
63 {
64 "$ref": "#/$defs/Heading"
65 },
66 {
67 "$ref": "#/$defs/ThematicBreak"
68 },
69 {
70 "$ref": "#/$defs/Blockquote"
71 },
72 {
73 "$ref": "#/$defs/List"
74 },
75 {
76 "$ref": "#/$defs/HTML"
77 },
78 {
79 "$ref": "#/$defs/Code"
80 },
81 {
82 "$ref": "#/$defs/Comment"
83 },
84 {
85 "$ref": "#/$defs/Target"
86 },
87 {
88 "$ref": "#/$defs/Directive"
89 },
90 {
91 "$ref": "#/$defs/Admonition"
92 },
93 {
94 "$ref": "#/$defs/Container"
95 },
96 {
97 "$ref": "#/$defs/Math"
98 },
99 {
100 "$ref": "#/$defs/Table"
101 },
102 {
103 "$ref": "#/$defs/FootnoteDefinition"
104 }
105 ]
106 },
107 "ListContent": {
108 "anyOf": [
109 {
110 "$ref": "#/$defs/ListItem"
111 }
112 ]
113 },
114 "PhrasingContent": {
115 "anyOf": [
116 {
117 "$ref": "#/$defs/StaticPhrasingContent"
118 },
119 {
120 "$ref": "#/$defs/Emphasis"
121 },
122 {
123 "$ref": "#/$defs/Strong"
124 },
125 {
126 "$ref": "#/$defs/Link"
127 },
128 {
129 "$ref": "#/$defs/LinkReference"
130 },
131 {
132 "$ref": "#/$defs/Subscript"
133 },
134 {
135 "$ref": "#/$defs/Superscript"
136 },
137 {
138 "$ref": "#/$defs/Underline"
139 },
140 {
141 "$ref": "#/$defs/Abbreviation"
142 },
143 {
144 "$ref": "#/$defs/CrossReference"
145 },
146 {
147 "$ref": "#/$defs/FootnoteReference"
148 }
149 ]
150 },
151 "StaticPhrasingContent": {
152 "anyOf": [
153 {
154 "$ref": "#/$defs/Text"
155 },
156 {
157 "$ref": "#/$defs/HTML"
158 },
159 {
160 "$ref": "#/$defs/EmphasisStatic"
161 },
162 {
163 "$ref": "#/$defs/StrongStatic"
164 },
165 {
166 "$ref": "#/$defs/InlineCode"
167 },
168 {
169 "$ref": "#/$defs/Break"
170 },
171 {
172 "$ref": "#/$defs/Image"
173 },
174 {
175 "$ref": "#/$defs/ImageReference"
176 },
177 {
178 "$ref": "#/$defs/Role"
179 },
180 {
181 "$ref": "#/$defs/SubscriptStatic"
182 },
183 {
184 "$ref": "#/$defs/SuperscriptStatic"
185 },
186 {
187 "$ref": "#/$defs/UnderlineStatic"
188 },
189 {
190 "$ref": "#/$defs/InlineMath"
191 }
192 ]
193 },
194 "BlockBreak": {
195 "type": "object",
196 "description": "Top-level break in the myst document, breaking it into Blocks",
197 "allOf": [
198 {
199 "properties": {
200 "type": {
201 "const": "blockBreak"
202 },
203 "meta": {
204 "description": "block break metadata; conventionally, a stringified JSON dictionary but may be any arbitrary string",
205 "type": "string"
206 },
207 "position": {},
208 "data": {}
209 },
210 "additionalProperties": false
211 },
212 {
213 "$ref": "#/$defs/Node"
214 }
215 ]
216 },
217 "Block": {
218 "type": "object",
219 "description": "Top-level content blocks or cells the myst document, delimited by BlockBreaks",
220 "allOf": [
221 {
222 "properties": {
223 "type": {
224 "const": "block"
225 },
226 "meta": {
227 "description": "block metadata from preceding break; conventionally, a stringified JSON dictionary but may be any arbitrary string",
228 "type": "string"
229 },
230 "children": {
231 "description": "Top-level children of myst document",
232 "anyOf": [
233 {
234 "type": "array",
235 "items": {
236 "$ref": "#/$defs/FlowContent"
237 }
238 },
239 {
240 "type": "array",
241 "items": {
242 "$ref": "#/$defs/ListContent"
243 }
244 },
245 {
246 "type": "array",
247 "items": {
248 "$ref": "#/$defs/PhrasingContent"
249 }
250 }
251 ]
252 },
253 "position": {},
254 "data": {}
255 },
256 "additionalProperties": false
257 },
258 {
259 "$ref": "#/$defs/Node"
260 }
261 ]
262 },
263 "Role": {
264 "description": "Custom in-line behavior",
265 "type": "object",
266 "allOf": [
267 {
268 "required": [
269 "name"
270 ],
271 "properties": {
272 "type": {
273 "const": "mystRole"
274 },
275 "name": {
276 "type": "string"
277 },
278 "value": {
279 "description": "content of the directive",
280 "type": "string"
281 },
282 "children": {
283 "description": "parsed role content",
284 "type": "array",
285 "items": {
286 "$ref": "#/$defs/PhrasingContent"
287 }
288 },
289 "position": {},
290 "data": {}
291 },
292 "additionalProperties": false
293 },
294 {
295 "$ref": "#/$defs/Node"
296 }
297 ]
298 },
299 "Directive": {
300 "description": "Content block with predefined behavior",
301 "type": "object",
302 "allOf": [
303 {
304 "required": [
305 "name"
306 ],
307 "properties": {
308 "type": {
309 "const": "mystDirective"
310 },
311 "name": {
312 "type": "string"
313 },
314 "args": {
315 "type": "string"
316 },
317 "options": {
318 "type": "object"
319 },
320 "value": {
321 "description": "body of the directive, excluding options",
322 "type": "string"
323 },
324 "children": {
325 "description": "parsed directive content",
326 "type": "array",
327 "items": {
328 "anyOf": [
329 {
330 "$ref": "#/$defs/FlowContent"
331 },
332 {
333 "$ref": "#/$defs/PhrasingContent"
334 }
335 ]
336 }
337 },
338 "position": {},
339 "data": {}
340 },
341 "additionalProperties": false
342 },
343 {
344 "$ref": "#/$defs/Node"
345 }
346 ]
347 },
348 "Target": {
349 "description": "Target node - provides identifier/label for the following node",
350 "type": "object",
351 "allOf": [
352 {
353 "properties": {
354 "type": {
355 "const": "mystTarget"
356 },
357 "label": {
358 "description": "unresolved target label",
359 "type": "string"
360 },
361 "position": {},
362 "data": {}
363 },
364 "additionalProperties": false
365 },
366 {
367 "$ref": "#/$defs/Node"
368 }
369 ]
370 },
371 "CrossReference": {
372 "description": "In-line reference to an associated node",
373 "type": "object",
374 "allOf": [
375 {
376 "properties": {
377 "type": {
378 "const": "crossReference"
379 },
380 "kind": {
381 "type": "string",
382 "enum": [
383 "eq",
384 "numref",
385 "ref"
386 ]
387 },
388 "children": {
389 "type": "array",
390 "items": {
391 "$ref": "#/$defs/StaticPhrasingContent"
392 }
393 },
394 "identifier": {},
395 "label": {},
396 "position": {},
397 "data": {}
398 },
399 "additionalProperties": false
400 },
401 {
402 "$ref": "#/$defs/Association"
403 },
404 {
405 "$ref": "#/$defs/Node"
406 }
407 ]
408 },
409 "Abbreviation": {
410 "description": "Abbreviation node described by title",
411 "type": "object",
412 "allOf": [
413 {
414 "properties": {
415 "type": {
416 "const": "abbreviation"
417 },
418 "children": {
419 "description": "abbreviated value",
420 "type": "array",
421 "items": {
422 "$ref": "#/$defs/StaticPhrasingContent"
423 }
424 },
425 "title": {
426 "description": "advisory information for the abbreviation",
427 "type": "string"
428 },
429 "position": {},
430 "data": {}
431 },
432 "additionalProperties": false
433 },
434 {
435 "$ref": "#/$defs/Parent"
436 }
437 ]
438 },
439 "Admonition": {
440 "description": "Admonition node for drawing attention to text, separate from the neighboring content",
441 "type": "object",
442 "allOf": [
443 {
444 "properties": {
445 "type": {
446 "const": "admonition"
447 },
448 "kind": {
449 "description": "kind of admonition, to determine styling",
450 "type": "string",
451 "enum": [
452 "attention",
453 "caution",
454 "danger",
455 "error",
456 "hint",
457 "important",
458 "note",
459 "seealso",
460 "tip",
461 "warning"
462 ]
463 },
464 "class": {
465 "description": "admonition class info to override kind",
466 "type": "string"
467 },
468 "children": {
469 "type": "array",
470 "items": {
471 "anyOf": [
472 {
473 "$ref": "#/$defs/AdmonitionTitle"
474 },
475 {
476 "$ref": "#/$defs/FlowContent"
477 }
478 ]
479 }
480 },
481 "position": {},
482 "data": {}
483 },
484 "additionalProperties": false
485 },
486 {
487 "$ref": "#/$defs/Node"
488 }
489 ]
490 },
491 "AdmonitionTitle": {
492 "description": "Custom title for admonition, replaces kind as title",
493 "type": "object",
494 "allOf": [
495 {
496 "properties": {
497 "type": {
498 "const": "admonitionTitle"
499 },
500 "children": {
501 "type": "array",
502 "items": {
503 "$ref": "#/$defs/PhrasingContent"
504 }
505 },
506 "position": {},
507 "data": {}
508 },
509 "additionalProperties": false
510 },
511 {
512 "$ref": "#/$defs/Parent"
513 }
514 ]
515 },
516 "Container": {
517 "description": "Top-level container node to provide association and numbering to child content",
518 "type": "object",
519 "allOf": [
520 {
521 "required": [
522 "kind"
523 ],
524 "properties": {
525 "type": {
526 "const": "container"
527 },
528 "kind": {
529 "description": "kind of container contents",
530 "type": "string",
531 "enum": [
532 "figure",
533 "table"
534 ]
535 },
536 "class": {
537 "description": "any custom class information",
538 "type": "string"
539 },
540 "enumerated": {
541 "description": "count this container for numbering based on kind, e.g. Figure 1a",
542 "type": "boolean"
543 },
544 "enumerator": {
545 "description": "resolved enumerated value for this container",
546 "type": "string"
547 },
548 "children": {
549 "type": "array",
550 "items": {
551 "anyOf": [
552 {
553 "$ref": "#/$defs/Caption"
554 },
555 {
556 "$ref": "#/$defs/Legend"
557 },
558 {
559 "$ref": "#/$defs/Image"
560 },
561 {
562 "$ref": "#/$defs/Table"
563 }
564 ]
565 }
566 },
567 "identifier": {},
568 "label": {},
569 "position": {},
570 "data": {}
571 },
572 "additionalProperties": false
573 },
574 {
575 "if": {
576 "properties": {
577 "kind": {
578 "const": "figure"
579 }
580 }
581 },
582 "then": {
583 "properties": {
584 "children": {
585 "type": "array",
586 "items": {
587 "anyOf": [
588 {
589 "$ref": "#/$defs/Caption"
590 },
591 {
592 "$ref": "#/$defs/Legend"
593 },
594 {
595 "$ref": "#/$defs/Image"
596 }
597 ]
598 }
599 }
600 }
601 },
602 "else": {
603 "properties": {
604 "children": {
605 "type": "array",
606 "items": {
607 "anyOf": [
608 {
609 "$ref": "#/$defs/Caption"
610 },
611 {
612 "$ref": "#/$defs/Legend"
613 },
614 {
615 "$ref": "#/$defs/Table"
616 }
617 ]
618 }
619 }
620 }
621 }
622 },
623 {
624 "$ref": "#/$defs/OptionalAssociation"
625 },
626 {
627 "$ref": "#/$defs/Parent"
628 }
629 ]
630 },
631 "Caption": {
632 "description": "Caption for container content",
633 "type": "object",
634 "allOf": [
635 {
636 "properties": {
637 "type": {
638 "const": "caption"
639 },
640 "children": {
641 "type": "array",
642 "items": {
643 "$ref": "#/$defs/FlowContent"
644 }
645 },
646 "position": {},
647 "data": {}
648 },
649 "additionalProperties": false
650 },
651 {
652 "$ref": "#/$defs/Parent"
653 }
654 ]
655 },
656 "Legend": {
657 "description": "Legend for container content",
658 "type": "object",
659 "allOf": [
660 {
661 "properties": {
662 "type": {
663 "const": "legend"
664 },
665 "children": {
666 "type": "array",
667 "items": {
668 "$ref": "#/$defs/FlowContent"
669 }
670 },
671 "position": {},
672 "data": {}
673 },
674 "additionalProperties": false
675 },
676 {
677 "$ref": "#/$defs/Parent"
678 }
679 ]
680 },
681 "FootnoteReference": {
682 "description": "Inilne reference to footnote",
683 "type": "object",
684 "allOf": [
685 {
686 "properties": {
687 "type": {
688 "const": "footnoteReference"
689 },
690 "identifier": {},
691 "label": {},
692 "position": {},
693 "data": {}
694 },
695 "additionalProperties": false
696 },
697 {
698 "$ref": "#/$defs/Association"
699 },
700 {
701 "$ref": "#/$defs/Node"
702 }
703 ]
704 },
705 "FootnoteDefinition": {
706 "description": "Rich footnote content associated with footnote reference",
707 "type": "object",
708 "allOf": [
709 {
710 "properties": {
711 "type": {
712 "const": "footnoteDefinition"
713 },
714 "children": {
715 "type": "array",
716 "items": {
717 "$ref": "#/$defs/FlowContent"
718 }
719 },
720 "identifier": {},
721 "label": {},
722 "position": {},
723 "data": {}
724 },
725 "additionalProperties": false
726 },
727 {
728 "$ref": "#/$defs/Association"
729 },
730 {
731 "$ref": "#/$defs/Parent"
732 }
733 ]
734 },
735 "Math": {
736 "description": "Math node for presenting numbered equations",
737 "type": "object",
738 "allOf": [
739 {
740 "properties": {
741 "type": {
742 "const": "math"
743 },
744 "enumerated": {
745 "description": "count this math block for numbering based on kind, e.g. See equation (1a)",
746 "type": "boolean"
747 },
748 "enumerator": {
749 "description": "resolved enumerated value for this math block",
750 "type": "string"
751 },
752 "identifier": {},
753 "label": {},
754 "value": {},
755 "position": {},
756 "data": {}
757 },
758 "additionalProperties": false
759 },
760 {
761 "$ref": "#/$defs/OptionalAssociation"
762 },
763 {
764 "$ref": "#/$defs/Literal"
765 }
766 ]
767 },
768 "InlineMath": {
769 "description": "Fragment of math, similar to InlineCode, using role {math}",
770 "type": "object",
771 "allOf": [
772 {
773 "properties": {
774 "type": {
775 "const": "inlineMath"
776 },
777 "value": {},
778 "position": {},
779 "data": {}
780 },
781 "additionalProperties": false
782 },
783 {
784 "$ref": "#/$defs/Literal"
785 }
786 ]
787 },
788 "Table": {
789 "description": "Two-dimensional table data",
790 "type": "object",
791 "allOf": [
792 {
793 "properties": {
794 "type": {
795 "const": "table"
796 },
797 "align": {
798 "type": "string",
799 "enum": [
800 "left",
801 "center",
802 "right"
803 ]
804 },
805 "children": {
806 "type": "array",
807 "items": {
808 "$ref": "#/$defs/TableRow"
809 }
810 },
811 "position": {},
812 "data": {}
813 },
814 "additionalProperties": false
815 },
816 {
817 "$ref": "#/$defs/Parent"
818 }
819 ]
820 },
821 "TableRow": {
822 "description": "One row of table containing cells",
823 "type": "object",
824 "allOf": [
825 {
826 "properties": {
827 "type": {
828 "const": "tableRow"
829 },
830 "children": {
831 "type": "array",
832 "items": {
833 "$ref": "#/$defs/TableCell"
834 }
835 },
836 "position": {},
837 "data": {}
838 },
839 "additionalProperties": false
840 },
841 {
842 "$ref": "#/$defs/Parent"
843 }
844 ]
845 },
846 "TableCell": {
847 "description": "One cell of table",
848 "type": "object",
849 "allOf": [
850 {
851 "properties": {
852 "type": {
853 "const": "tableCell"
854 },
855 "header": {
856 "type": "boolean"
857 },
858 "align": {
859 "description": "alignment of content within cell",
860 "type": "string",
861 "enum": [
862 "left",
863 "center",
864 "right"
865 ]
866 },
867 "children": {
868 "type": "array",
869 "items": {
870 "$ref": "#/$defs/PhrasingContent"
871 }
872 },
873 "position": {},
874 "data": {}
875 },
876 "additionalProperties": false
877 },
878 {
879 "$ref": "#/$defs/Parent"
880 }
881 ]
882 },
883 "Subscript": {
884 "description": "Subscript content, using role {subscript}",
885 "type": "object",
886 "allOf": [
887 {
888 "properties": {
889 "type": {
890 "const": "subscript"
891 },
892 "children": {
893 "type": "array",
894 "items": {
895 "$ref": "#/$defs/PhrasingContent"
896 }
897 },
898 "position": {},
899 "data": {}
900 },
901 "additionalProperties": false
902 },
903 {
904 "$ref": "#/$defs/Parent"
905 }
906 ]
907 },
908 "SubscriptStatic": {
909 "description": "Subscript content, with static children; used when parent node requires static content",
910 "type": "object",
911 "allOf": [
912 {
913 "properties": {
914 "type": {
915 "const": "subscript"
916 },
917 "children": {
918 "type": "array",
919 "items": {
920 "$ref": "#/$defs/StaticPhrasingContent"
921 }
922 },
923 "position": {},
924 "data": {}
925 },
926 "additionalProperties": false
927 },
928 {
929 "$ref": "#/$defs/Parent"
930 }
931 ]
932 },
933 "Superscript": {
934 "description": "Superscript content, using role {superscript}",
935 "type": "object",
936 "allOf": [
937 {
938 "properties": {
939 "type": {
940 "const": "superscript"
941 },
942 "children": {
943 "type": "array",
944 "items": {
945 "$ref": "#/$defs/PhrasingContent"
946 }
947 },
948 "position": {},
949 "data": {}
950 },
951 "additionalProperties": false
952 },
953 {
954 "$ref": "#/$defs/Parent"
955 }
956 ]
957 },
958 "SuperscriptStatic": {
959 "description": "Superscript content, with static children; used when parent node requires static content",
960 "type": "object",
961 "allOf": [
962 {
963 "properties": {
964 "type": {
965 "const": "superscript"
966 },
967 "children": {
968 "type": "array",
969 "items": {
970 "$ref": "#/$defs/StaticPhrasingContent"
971 }
972 },
973 "position": {},
974 "data": {}
975 },
976 "additionalProperties": false
977 },
978 {
979 "$ref": "#/$defs/Parent"
980 }
981 ]
982 },
983 "Underline": {
984 "description": "Underline content, using role {underline}",
985 "type": "object",
986 "allOf": [
987 {
988 "properties": {
989 "type": {
990 "const": "underline"
991 },
992 "children": {
993 "type": "array",
994 "items": {
995 "$ref": "#/$defs/PhrasingContent"
996 }
997 },
998 "position": {},
999 "data": {}
1000 },
1001 "additionalProperties": false
1002 },
1003 {
1004 "$ref": "#/$defs/Parent"
1005 }
1006 ]
1007 },
1008 "UnderlineStatic": {
1009 "description": "Underline content, with static children; used when parent node requires static content",
1010 "type": "object",
1011 "allOf": [
1012 {
1013 "properties": {
1014 "type": {
1015 "const": "underline"
1016 },
1017 "children": {
1018 "type": "array",
1019 "items": {
1020 "$ref": "#/$defs/StaticPhrasingContent"
1021 }
1022 },
1023 "position": {},
1024 "data": {}
1025 },
1026 "additionalProperties": false
1027 },
1028 {
1029 "$ref": "#/$defs/Parent"
1030 }
1031 ]
1032 },
1033 "Comment": {
1034 "description": "Comment nodes for comments present in myst but ingnored upon render",
1035 "type": "object",
1036 "allOf": [
1037 {
1038 "properties": {
1039 "type": {
1040 "const": "mystComment"
1041 },
1042 "value": {},
1043 "position": {},
1044 "data": {}
1045 },
1046 "additionalProperties": false
1047 },
1048 {
1049 "$ref": "#/$defs/Literal"
1050 }
1051 ]
1052 },
1053 "Paragraph": {
1054 "type": "object",
1055 "allOf": [
1056 {
1057 "properties": {
1058 "type": {
1059 "const": "paragraph"
1060 },
1061 "children": {
1062 "type": "array",
1063 "items": {
1064 "$ref": "#/$defs/PhrasingContent"
1065 }
1066 },
1067 "position": {},
1068 "data": {}
1069 },
1070 "additionalProperties": false
1071 },
1072 {
1073 "$ref": "#/$defs/Parent"
1074 }
1075 ]
1076 },
1077 "Heading": {
1078 "type": "object",
1079 "allOf": [
1080 {
1081 "required": [
1082 "depth"
1083 ],
1084 "properties": {
1085 "type": {
1086 "const": "heading"
1087 },
1088 "depth": {
1089 "type": "integer",
1090 "minimum": 1,
1091 "maximum": 6
1092 },
1093 "enumerated": {
1094 "description": "count this heading for numbering based on kind, e.g. Section 2.4.1",
1095 "type": "boolean"
1096 },
1097 "enumerator": {
1098 "description": "resolved enumerated value for this heading",
1099 "type": "string"
1100 },
1101 "children": {
1102 "type": "array",
1103 "items": {
1104 "$ref": "#/$defs/PhrasingContent"
1105 }
1106 },
1107 "identifier": {},
1108 "label": {},
1109 "position": {},
1110 "data": {}
1111 },
1112 "additionalProperties": false
1113 },
1114 {
1115 "$ref": "#/$defs/Parent"
1116 },
1117 {
1118 "$ref": "#/$defs/OptionalAssociation"
1119 }
1120 ]
1121 },
1122 "ThematicBreak": {
1123 "type": "object",
1124 "allOf": [
1125 {
1126 "properties": {
1127 "type": {
1128 "const": "thematicBreak"
1129 },
1130 "position": {},
1131 "data": {}
1132 },
1133 "additionalProperties": false
1134 },
1135 {
1136 "$ref": "#/$defs/Node"
1137 }
1138 ]
1139 },
1140 "Blockquote": {
1141 "type": "object",
1142 "allOf": [
1143 {
1144 "properties": {
1145 "type": {
1146 "const": "blockquote"
1147 },
1148 "children": {
1149 "type": "array",
1150 "items": {
1151 "$ref": "#/$defs/FlowContent"
1152 }
1153 },
1154 "position": {},
1155 "data": {}
1156 },
1157 "additionalProperties": false
1158 },
1159 {
1160 "$ref": "#/$defs/Parent"
1161 }
1162 ]
1163 },
1164 "List": {
1165 "type": "object",
1166 "allOf": [
1167 {
1168 "properties": {
1169 "type": {
1170 "const": "list"
1171 },
1172 "ordered": {
1173 "description": "Is item order important or not?",
1174 "type": "boolean"
1175 },
1176 "start": {
1177 "description": "Starting number of ordered list",
1178 "type": "integer"
1179 },
1180 "spread": {
1181 "description": "One or more children are separated with a blank line from others",
1182 "type": "boolean"
1183 },
1184 "children": {
1185 "type": "array",
1186 "items": {
1187 "$ref": "#/$defs/ListContent"
1188 }
1189 },
1190 "position": {},
1191 "data": {}
1192 },
1193 "additionalProperties": false
1194 },
1195 {
1196 "$ref": "#/$defs/Parent"
1197 }
1198 ]
1199 },
1200 "ListItem": {
1201 "type": "object",
1202 "allOf": [
1203 {
1204 "properties": {
1205 "type": {
1206 "const": "listItem"
1207 },
1208 "spread": {
1209 "description": "One or more children are separated with a blank line from others",
1210 "type": "boolean"
1211 },
1212 "children": {
1213 "type": "array",
1214 "items": {
1215 "anyOf": [
1216 {
1217 "$ref": "#/$defs/PhrasingContent"
1218 },
1219 {
1220 "$ref": "#/$defs/FlowContent"
1221 }
1222 ]
1223 }
1224 },
1225 "position": {},
1226 "data": {}
1227 },
1228 "additionalProperties": false
1229 },
1230 {
1231 "$ref": "#/$defs/Parent"
1232 }
1233 ]
1234 },
1235 "HTML": {
1236 "description": "Fragment of raw HTML - does not need to be valid or complete",
1237 "type": "object",
1238 "allOf": [
1239 {
1240 "properties": {
1241 "type": {
1242 "const": "html"
1243 },
1244 "value": {},
1245 "position": {},
1246 "data": {}
1247 },
1248 "additionalProperties": false
1249 },
1250 {
1251 "$ref": "#/$defs/Literal"
1252 }
1253 ]
1254 },
1255 "Code": {
1256 "description": "Block of preformatted text",
1257 "type": "object",
1258 "allOf": [
1259 {
1260 "properties": {
1261 "type": {
1262 "const": "code"
1263 },
1264 "lang": {
1265 "description": "language of the code",
1266 "type": "string"
1267 },
1268 "meta": {
1269 "description": "custom information relating to the node",
1270 "type": "string"
1271 },
1272 "class": {
1273 "description": "user-defined class for code block",
1274 "type": "string"
1275 },
1276 "showLineNumbers": {
1277 "type": "boolean"
1278 },
1279 "startingLineNumber": {
1280 "type": "integer",
1281 "minimum": 1
1282 },
1283 "emphasizeLines": {
1284 "type": "array",
1285 "items": {
1286 "type": "integer",
1287 "minimum": 1
1288 }
1289 },
1290 "identifier": {},
1291 "label": {},
1292 "value": {},
1293 "position": {},
1294 "data": {}
1295 },
1296 "additionalProperties": false
1297 },
1298 {
1299 "if": {
1300 "required": [
1301 "meta"
1302 ]
1303 },
1304 "then": {
1305 "required": [
1306 "lang"
1307 ]
1308 },
1309 "else": {}
1310 },
1311 {
1312 "if": {
1313 "required": [
1314 "startingLineNumber"
1315 ]
1316 },
1317 "then": {
1318 "required": [
1319 "showLineNumbers"
1320 ]
1321 },
1322 "else": {}
1323 },
1324 {
1325 "$ref": "#/$defs/OptionalAssociation"
1326 },
1327 {
1328 "$ref": "#/$defs/Literal"
1329 }
1330 ]
1331 },
1332 "Definition": {
1333 "description": "Reference to a url resource",
1334 "type": "object",
1335 "allOf": [
1336 {
1337 "properties": {
1338 "type": {
1339 "const": "definition"
1340 },
1341 "identifier": {},
1342 "label": {},
1343 "url": {},
1344 "title": {},
1345 "position": {},
1346 "data": {}
1347 },
1348 "additionalProperties": false
1349 },
1350 {
1351 "$ref": "#/$defs/Association"
1352 },
1353 {
1354 "$ref": "#/$defs/Resource"
1355 },
1356 {
1357 "$ref": "#/$defs/Node"
1358 }
1359 ]
1360 },
1361 "Text": {
1362 "type": "object",
1363 "allOf": [
1364 {
1365 "properties": {
1366 "type": {
1367 "const": "text"
1368 },
1369 "value": {},
1370 "position": {},
1371 "data": {}
1372 },
1373 "additionalProperties": false
1374 },
1375 {
1376 "$ref": "#/$defs/Literal"
1377 }
1378 ]
1379 },
1380 "Emphasis": {
1381 "description": "Stressed, italicized content",
1382 "type": "object",
1383 "allOf": [
1384 {
1385 "properties": {
1386 "type": {
1387 "const": "emphasis"
1388 },
1389 "children": {
1390 "type": "array",
1391 "items": {
1392 "$ref": "#/$defs/PhrasingContent"
1393 }
1394 },
1395 "position": {},
1396 "data": {}
1397 },
1398 "additionalProperties": false
1399 },
1400 {
1401 "$ref": "#/$defs/Parent"
1402 }
1403 ]
1404 },
1405 "EmphasisStatic": {
1406 "description": "Stressed, italicized content, with static children; used when parent node requires static content",
1407 "type": "object",
1408 "allOf": [
1409 {
1410 "properties": {
1411 "type": {
1412 "const": "emphasis"
1413 },
1414 "children": {
1415 "type": "array",
1416 "items": {
1417 "$ref": "#/$defs/StaticPhrasingContent"
1418 }
1419 },
1420 "position": {},
1421 "data": {}
1422 },
1423 "additionalProperties": false
1424 },
1425 {
1426 "$ref": "#/$defs/Parent"
1427 }
1428 ]
1429 },
1430 "Strong": {
1431 "description": "Important, serious, urgent, bold content",
1432 "type": "object",
1433 "allOf": [
1434 {
1435 "properties": {
1436 "type": {
1437 "const": "strong"
1438 },
1439 "children": {
1440 "type": "array",
1441 "items": {
1442 "$ref": "#/$defs/PhrasingContent"
1443 }
1444 },
1445 "position": {},
1446 "data": {}
1447 },
1448 "additionalProperties": false
1449 },
1450 {
1451 "$ref": "#/$defs/Parent"
1452 }
1453 ]
1454 },
1455 "StrongStatic": {
1456 "description": "Important, serious, urgent, bold content, with static children; used when parent node requires static content",
1457 "type": "object",
1458 "allOf": [
1459 {
1460 "properties": {
1461 "type": {
1462 "const": "strong"
1463 },
1464 "children": {
1465 "type": "array",
1466 "items": {
1467 "$ref": "#/$defs/StaticPhrasingContent"
1468 }
1469 },
1470 "position": {},
1471 "data": {}
1472 },
1473 "additionalProperties": false
1474 },
1475 {
1476 "$ref": "#/$defs/Parent"
1477 }
1478 ]
1479 },
1480 "InlineCode": {
1481 "description": "Fragment of code",
1482 "type": "object",
1483 "allOf": [
1484 {
1485 "properties": {
1486 "type": {
1487 "const": "inlineCode"
1488 },
1489 "value": {},
1490 "position": {},
1491 "data": {}
1492 },
1493 "additionalProperties": false
1494 },
1495 {
1496 "$ref": "#/$defs/Literal"
1497 }
1498 ]
1499 },
1500 "Break": {
1501 "description": "Line break",
1502 "type": "object",
1503 "allOf": [
1504 {
1505 "properties": {
1506 "type": {
1507 "const": "break"
1508 },
1509 "position": {},
1510 "data": {}
1511 },
1512 "additionalProperties": false
1513 },
1514 {
1515 "$ref": "#/$defs/Node"
1516 }
1517 ]
1518 },
1519 "Link": {
1520 "description": "Hyperlink",
1521 "type": "object",
1522 "allOf": [
1523 {
1524 "properties": {
1525 "type": {
1526 "const": "link"
1527 },
1528 "children": {
1529 "type": "array",
1530 "items": {
1531 "$ref": "#/$defs/StaticPhrasingContent"
1532 }
1533 },
1534 "url": {},
1535 "title": {},
1536 "position": {},
1537 "data": {}
1538 },
1539 "additionalProperties": false
1540 },
1541 {
1542 "$ref": "#/$defs/Resource"
1543 },
1544 {
1545 "$ref": "#/$defs/Parent"
1546 }
1547 ]
1548 },
1549 "Image": {
1550 "description": "Image hyperlink",
1551 "type": "object",
1552 "allOf": [
1553 {
1554 "properties": {
1555 "type": {
1556 "const": "image"
1557 },
1558 "class": {
1559 "description": "user-defined class for image",
1560 "type": "string"
1561 },
1562 "width": {
1563 "description": "image width in pixels or percentage",
1564 "type": "string"
1565 },
1566 "align": {
1567 "type": "string",
1568 "enum": [
1569 "left",
1570 "center",
1571 "right"
1572 ]
1573 },
1574 "url": {},
1575 "title": {},
1576 "alt": {},
1577 "position": {},
1578 "data": {}
1579 },
1580 "additionalProperties": false
1581 },
1582 {
1583 "$ref": "#/$defs/Resource"
1584 },
1585 {
1586 "$ref": "#/$defs/Alternative"
1587 },
1588 {
1589 "$ref": "#/$defs/Node"
1590 }
1591 ]
1592 },
1593 "LinkReference": {
1594 "description": "Hyperlink through association",
1595 "type": "object",
1596 "allOf": [
1597 {
1598 "properties": {
1599 "type": {
1600 "const": "linkReference"
1601 },
1602 "children": {
1603 "type": "array",
1604 "items": {
1605 "$ref": "#/$defs/StaticPhrasingContent"
1606 }
1607 },
1608 "referenceType": {},
1609 "identifier": {},
1610 "label": {},
1611 "position": {},
1612 "data": {}
1613 },
1614 "additionalProperties": false
1615 },
1616 {
1617 "$ref": "#/$defs/Reference"
1618 },
1619 {
1620 "$ref": "#/$defs/Association"
1621 },
1622 {
1623 "$ref": "#/$defs/Parent"
1624 }
1625 ]
1626 },
1627 "ImageReference": {
1628 "description": "Image through association",
1629 "type": "object",
1630 "allOf": [
1631 {
1632 "properties": {
1633 "type": {
1634 "const": "imageReference"
1635 },
1636 "referenceType": {},
1637 "identifier": {},
1638 "label": {},
1639 "alt": {},
1640 "position": {},
1641 "data": {}
1642 },
1643 "additionalProperties": false
1644 },
1645 {
1646 "$ref": "#/$defs/Reference"
1647 },
1648 {
1649 "$ref": "#/$defs/Association"
1650 },
1651 {
1652 "$ref": "#/$defs/Alternative"
1653 },
1654 {
1655 "$ref": "#/$defs/Node"
1656 }
1657 ]
1658 },
1659 "Resource": {
1660 "description": "Reference to external resource",
1661 "type": "object",
1662 "required": [
1663 "url"
1664 ],
1665 "properties": {
1666 "url": {
1667 "type": "string"
1668 },
1669 "title": {
1670 "description": "advisory information, e.g. for a tooltip",
1671 "type": "string"
1672 }
1673 }
1674 },
1675 "OptionalAssociation": {
1676 "description": "Internal relation from one node to another; not required by node",
1677 "type": "object",
1678 "properties": {
1679 "identifier": {
1680 "description": "identifier that may match another node; value is unparsed and must be normalized such that whitespace is collapsed to single space, initial/final space is trimmed, and case is folded",
1681 "type": "string"
1682 },
1683 "label": {
1684 "description": "node label; character escapes and references are parsed; may be normalized to a unique identifier",
1685 "type": "string"
1686 }
1687 }
1688 },
1689 "Association": {
1690 "description": "Internal relation from one node to another",
1691 "type": "object",
1692 "allOf": [
1693 {
1694 "required": [
1695 "identifier"
1696 ],
1697 "properties": {
1698 "identifier": {}
1699 }
1700 },
1701 {
1702 "$ref": "#/$defs/OptionalAssociation"
1703 }
1704 ]
1705 },
1706 "Alternative": {
1707 "description": "Alternative description of image",
1708 "type": "object",
1709 "properties": {
1710 "alt": {
1711 "description": "field describing the image",
1712 "type": "string"
1713 }
1714 }
1715 },
1716 "Reference": {
1717 "description": "Marker associated to another node",
1718 "type": "object",
1719 "required": [
1720 "referenceType"
1721 ],
1722 "properties": {
1723 "referenceType": {
1724 "description": "explicitness of the reference: shortcut - reference is implicit, identifier inferred; collapsed - refernce explicit, identifier inferred; full - reference explicit, identifier explicit",
1725 "type": "string",
1726 "enum": [
1727 "shortcut",
1728 "collapsed",
1729 "full"
1730 ]
1731 }
1732 }
1733 },
1734 "Node": {
1735 "description": "Base unist node",
1736 "type": "object",
1737 "required": [
1738 "type"
1739 ],
1740 "properties": {
1741 "type": {
1742 "description": "identifier for node variant",
1743 "type": "string"
1744 },
1745 "data": {
1746 "description": "information associated by the ecosystem with the node; never specified by mdast",
1747 "type": "object"
1748 },
1749 "position": {
1750 "description": "location of node in source file; must not be present for generated nodes",
1751 "$ref": "#/$defs/Position"
1752 }
1753 }
1754 },
1755 "Literal": {
1756 "description": "Basic node with required string value",
1757 "type": "object",
1758 "allOf": [
1759 {
1760 "required": [
1761 "value"
1762 ],
1763 "properties": {
1764 "value": {
1765 "type": "string"
1766 }
1767 }
1768 },
1769 {
1770 "$ref": "#/$defs/Node"
1771 }
1772 ]
1773 },
1774 "Parent": {
1775 "description": "Basic node with required node children",
1776 "type": "object",
1777 "allOf": [
1778 {
1779 "required": [
1780 "children"
1781 ],
1782 "properties": {
1783 "children": {
1784 "type": "array",
1785 "items": {
1786 "$ref": "#/$defs/Node"
1787 }
1788 }
1789 }
1790 },
1791 {
1792 "$ref": "#/$defs/Node"
1793 }
1794 ]
1795 },
1796 "Point": {
1797 "description": "One place in a source file",
1798 "type": "object",
1799 "required": [
1800 "line",
1801 "column"
1802 ],
1803 "properties": {
1804 "line": {
1805 "description": "line in the source file, 1-indexed",
1806 "type": "integer",
1807 "minimum": 1
1808 },
1809 "column": {
1810 "description": "column in the source file, 1-indexed",
1811 "type": "integer",
1812 "minimum": 1
1813 },
1814 "offset": {
1815 "description": "offset character in the source file, 0-indexed",
1816 "type": "integer",
1817 "minimum": 0
1818 }
1819 },
1820 "additionalProperties": false
1821 },
1822 "Position": {
1823 "description": "Location of a node in a source file",
1824 "type": "object",
1825 "required": [
1826 "start",
1827 "end"
1828 ],
1829 "properties": {
1830 "start": {
1831 "description": "place of first character of parsed source region",
1832 "$ref": "#/$defs/Point"
1833 },
1834 "end": {
1835 "description": "place of first character after parsed source region, whether it exists or not",
1836 "$ref": "#/$defs/Point"
1837 },
1838 "indent": {
1839 "description": "start column at each index in the source region, for elements that span multiple lines",
1840 "type": "array",
1841 "items": {
1842 "type": "integer",
1843 "minimum": 0
1844 }
1845 }
1846 },
1847 "additionalProperties": false
1848 }
1849 }
1850}
\No newline at end of file