{
    "lexicon": 1,
    "id": "pub.oxa.blocks.defs",
    "defs": {
        "richText": {
            "type": "object",
            "description": "Rich text content: a plain text string with facet annotations.",
            "properties": {
                "text": { "type": "string" },
                "facets": {
                    "type": "array",
                    "items": {
                        "type": "ref",
                        "ref": "pub.oxa.richtext.facet"
                    }
                }
            }
        },
        "code": {
            "type": "object",
            "description": "A block of preformatted text, typically source code.",
            "properties": {
                "id": { "type": "string" },
                "classes": {
                    "type": "array",
                    "items": { "type": "string" }
                },
                "data": { "type": "unknown" },
                "language": { "type": "string" },
                "value": { "type": "string" }
            },
            "required": ["value"]
        },
        "heading": {
            "type": "object",
            "description": "A heading with a level and inline content.",
            "properties": {
                "id": { "type": "string" },
                "classes": {
                    "type": "array",
                    "items": { "type": "string" }
                },
                "data": { "type": "unknown" },
                "level": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 6
                },
                "text": { "type": "string" },
                "facets": {
                    "type": "array",
                    "items": {
                        "type": "ref",
                        "ref": "pub.oxa.richtext.facet"
                    }
                }
            },
            "required": ["level"]
        },
        "paragraph": {
            "type": "object",
            "description": "A paragraph of inline content.",
            "properties": {
                "id": { "type": "string" },
                "classes": {
                    "type": "array",
                    "items": { "type": "string" }
                },
                "data": { "type": "unknown" },
                "text": { "type": "string" },
                "facets": {
                    "type": "array",
                    "items": {
                        "type": "ref",
                        "ref": "pub.oxa.richtext.facet"
                    }
                }
            }
        },
        "thematicBreak": {
            "type": "object",
            "description": "A thematic or structural division between sections of content.",
            "properties": {
                "id": { "type": "string" },
                "classes": {
                    "type": "array",
                    "items": { "type": "string" }
                },
                "data": { "type": "unknown" }
            }
        },
        "blockquote": {
            "type": "object",
            "description": "A block quotation with nested block children.",
            "properties": {
                "id": { "type": "string" },
                "classes": {
                    "type": "array",
                    "items": { "type": "string" }
                },
                "data": { "type": "unknown" },
                "children": {
                    "type": "array",
                    "items": {
                        "type": "ref",
                        "ref": "#block"
                    }
                }
            }
        },
        "image": {
            "type": "object",
            "description": "An image with optional alt text.",
            "properties": {
                "id": { "type": "string" },
                "classes": {
                    "type": "array",
                    "items": { "type": "string" }
                },
                "data": { "type": "unknown" },
                "src": { "type": "string" },
                "alt": { "type": "string" }
            }
        },
        "math": {
            "type": "object",
            "description": "A block of mathematical notation (LaTeX).",
            "properties": {
                "id": { "type": "string" },
                "classes": {
                    "type": "array",
                    "items": { "type": "string" }
                },
                "data": { "type": "unknown" },
                "value": { "type": "string" }
            },
            "required": ["value"]
        },
        "listItem": {
            "type": "object",
            "description": "A list item with block children.",
            "properties": {
                "id": { "type": "string" },
                "classes": {
                    "type": "array",
                    "items": { "type": "string" }
                },
                "data": { "type": "unknown" },
                "children": {
                    "type": "array",
                    "items": {
                        "type": "ref",
                        "ref": "#block"
                    }
                }
            }
        },
        "list": {
            "type": "object",
            "description": "An ordered or unordered list.",
            "properties": {
                "id": { "type": "string" },
                "classes": {
                    "type": "array",
                    "items": { "type": "string" }
                },
                "data": { "type": "unknown" },
                "ordered": { "type": "boolean" },
                "startIndex": { "type": "integer" },
                "children": {
                    "type": "array",
                    "items": {
                        "type": "ref",
                        "ref": "#listItem"
                    }
                }
            }
        },
        "admonition": {
            "type": "object",
            "description": "An admonition block (note, warning, tip, etc.).",
            "properties": {
                "id": { "type": "string" },
                "classes": {
                    "type": "array",
                    "items": { "type": "string" }
                },
                "data": { "type": "unknown" },
                "kind": { "type": "string" },
                "title": { "type": "string" },
                "children": {
                    "type": "array",
                    "items": {
                        "type": "ref",
                        "ref": "#block"
                    }
                }
            }
        },
        "tableCell": {
            "type": "object",
            "description": "A table cell with inline content.",
            "properties": {
                "id": { "type": "string" },
                "classes": {
                    "type": "array",
                    "items": { "type": "string" }
                },
                "data": { "type": "unknown" },
                "text": { "type": "string" },
                "facets": {
                    "type": "array",
                    "items": {
                        "type": "ref",
                        "ref": "pub.oxa.richtext.facet"
                    }
                }
            }
        },
        "tableRow": {
            "type": "object",
            "description": "A row of table cells.",
            "properties": {
                "id": { "type": "string" },
                "classes": {
                    "type": "array",
                    "items": { "type": "string" }
                },
                "data": { "type": "unknown" },
                "children": {
                    "type": "array",
                    "items": {
                        "type": "ref",
                        "ref": "#tableCell"
                    }
                }
            }
        },
        "table": {
            "type": "object",
            "description": "A table with rows and optional header rows.",
            "properties": {
                "id": { "type": "string" },
                "classes": {
                    "type": "array",
                    "items": { "type": "string" }
                },
                "data": { "type": "unknown" },
                "headerRows": { "type": "integer", "minimum": 0 },
                "children": {
                    "type": "array",
                    "items": {
                        "type": "ref",
                        "ref": "#tableRow"
                    }
                }
            }
        },
        "block": {
            "type": "union",
            "closed": false,
            "refs": ["#code", "#heading", "#paragraph", "#thematicBreak", "#blockquote", "#image", "#math", "#list", "#admonition", "#table"]
        }
    }
}
