{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "slide.schema.json",
  "title": "Slide",
  "type": "object",
  "description": "CTK ingestion contract for one slide in a deck, aligned to the Doolittle SlideContent object. Maps to ContentInput via canvas, elements, grid, slideTemplateId and curriculumGuidance. The content-item envelope (type, sourceId) is optional and derived during ingestion when absent.",
  "required": [ "canvas", "elements" ],
  "properties": {
    "type": {
      "type": "string",
      "const": "slide",
      "description": "When present, must be 'slide'."
    },
    "sourceId": {
      "type": "string",
      "description": "Optional source identifier; a deterministic one is derived at ingestion when absent."
    },
    "id": {
      "type": "string",
      "description": "Component-local id (e.g. 'slide-0'); not the CTK contentId."
    },
    "canvas": { "$ref": "slide-canvas.schema.json" },
    "grid": {
      "anyOf": [
        { "type": "null" },
        { "$ref": "slide-grid.schema.json" }
      ],
      "description": "Optional authoring grid; null for a purely absolute-positioned slide."
    },
    "elements": {
      "type": "array",
      "description": "The elements that make up the slide.",
      "items": { "$ref": "slide-element.schema.json" }
    },
    "slideTemplateId": {
      "type": "string",
      "description": "Id of the slide template this slide was bootstrapped from."
    },
    "curriculumGuidance": {
      "type": "string",
      "description": "Sanitized HTML teacher guidance shown with the slide."
    },
    "meta": {
      "type": "array",
      "description": "Evolving provenance key/value pairs; carried through but not yet mapped to CTK metadata definitions.",
      "items": {
        "type": "object",
        "required": [ "key", "value" ],
        "properties": {
          "key": { "type": "string" },
          "value": { "type": "string" }
        },
        "additionalProperties": true
      }
    }
  },
  "additionalProperties": true
}
