{
  "$defs": {
    "__schema0": {
      "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
      "title": "EntityId",
      "type": "string"
    },
    "__schema1": {
      "const": "animation",
      "type": "string"
    },
    "__schema10": {
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    },
    "__schema11": {
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "type": "integer"
    },
    "__schema12": {
      "additionalProperties": false,
      "properties": {
        "contentHash": {
          "minLength": 1,
          "type": "string"
        },
        "originalName": {
          "minLength": 1,
          "type": "string"
        },
        "path": {
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "path",
        "contentHash",
        "originalName"
      ],
      "type": "object"
    },
    "__schema2": {
      "additionalProperties": false,
      "properties": {
        "height": {
          "$ref": "#/$defs/__schema4"
        },
        "width": {
          "$ref": "#/$defs/__schema3"
        }
      },
      "required": [
        "width",
        "height"
      ],
      "title": "AnimationCanvas",
      "type": "object",
      "x-noveltea-documentation": {
        "name": "AnimationCanvas",
        "notes": [
          "The logical canvas is stable across every motion and frame. Source image dimensions do not change world placement."
        ]
      }
    },
    "__schema3": {
      "exclusiveMinimum": 0,
      "maximum": 10000,
      "type": "integer"
    },
    "__schema4": {
      "exclusiveMinimum": 0,
      "maximum": 10000,
      "type": "integer"
    },
    "__schema5": {
      "items": {
        "$ref": "#/$defs/__schema6"
      },
      "minItems": 1,
      "type": "array"
    },
    "__schema6": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "frames": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "durationMs": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  },
                  "image": {
                    "$ref": "#/$defs/__schema0"
                  }
                },
                "required": [
                  "image",
                  "durationMs"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "id": {
              "$ref": "#/$defs/__schema0"
            },
            "kind": {
              "const": "sprite-sequence",
              "type": "string"
            },
            "markers": {
              "items": {
                "$ref": "#/$defs/__schema9"
              },
              "type": "array"
            }
          },
          "required": [
            "id",
            "kind",
            "frames",
            "markers"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "frameSampling": {
              "oneOf": [
                {
                  "additionalProperties": false,
                  "properties": {
                    "mode": {
                      "const": "source",
                      "type": "string"
                    }
                  },
                  "required": [
                    "mode"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "fps": {
                      "additionalProperties": false,
                      "properties": {
                        "denominator": {
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991,
                          "type": "integer"
                        },
                        "numerator": {
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "numerator",
                        "denominator"
                      ],
                      "type": "object"
                    },
                    "mode": {
                      "const": "target-fps",
                      "type": "string"
                    }
                  },
                  "required": [
                    "mode",
                    "fps"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "mode": {
                      "const": "retain-percent",
                      "type": "string"
                    },
                    "percent": {
                      "maximum": 100,
                      "minimum": 1,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "mode",
                    "percent"
                  ],
                  "type": "object"
                }
              ]
            },
            "id": {
              "$ref": "#/$defs/__schema0"
            },
            "kind": {
              "const": "video",
              "type": "string"
            },
            "markers": {
              "items": {
                "$ref": "#/$defs/__schema9"
              },
              "type": "array"
            },
            "sourceRange": {
              "additionalProperties": false,
              "properties": {
                "endMs": {
                  "$ref": "#/$defs/__schema11"
                },
                "startMs": {
                  "$ref": "#/$defs/__schema10"
                }
              },
              "required": [
                "startMs",
                "endMs"
              ],
              "type": "object"
            },
            "video": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": [
            "id",
            "kind",
            "video",
            "markers"
          ],
          "type": "object"
        }
      ]
    },
    "__schema7": {
      "$ref": "#/$defs/__schema0"
    },
    "__schema8": {
      "additionalProperties": false,
      "properties": {
        "collection": {
          "const": "assets",
          "type": "string"
        },
        "id": {
          "$ref": "#/$defs/__schema0"
        }
      },
      "required": [
        "collection",
        "id"
      ],
      "type": "object"
    },
    "__schema9": {
      "additionalProperties": false,
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema0"
        },
        "timeMs": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "id",
        "timeMs"
      ],
      "type": "object"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "data": {
      "additionalProperties": false,
      "properties": {
        "canvas": {
          "$ref": "#/$defs/__schema2"
        },
        "defaultMotionId": {
          "$ref": "#/$defs/__schema0"
        },
        "motions": {
          "$ref": "#/$defs/__schema5"
        }
      },
      "required": [
        "canvas",
        "defaultMotionId",
        "motions"
      ],
      "title": "Animation",
      "type": "object",
      "x-noveltea-documentation": {
        "name": "Animation",
        "notes": [
          "Animation is immutable reusable raster presentation content. Playback phase belongs to presentation realization, not this resource.",
          "Motion IDs are scoped to the Animation. Sprite frames name Image Assets with explicit positive durations; video motions name semantic Video Assets and may select an in/out source range."
        ]
      }
    },
    "description": {
      "type": "string"
    },
    "id": {
      "$ref": "#/$defs/__schema0"
    },
    "import": {
      "additionalProperties": false,
      "properties": {
        "format": {
          "enum": [
            "image-sequence",
            "gif",
            "apng"
          ],
          "type": "string"
        },
        "frameDurationMs": {
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991,
          "type": "integer"
        },
        "importedAt": {
          "minLength": 1,
          "type": "string"
        },
        "sources": {
          "items": {
            "$ref": "#/$defs/__schema12"
          },
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "format",
        "sources",
        "frameDurationMs",
        "importedAt"
      ],
      "type": "object"
    },
    "label": {
      "minLength": 1,
      "type": "string"
    },
    "narrativeRefs": {
      "items": {
        "pattern": "^(?:creative-direction|arc|milestone|event|character|fact|world-entity|relationship|revelation|choice-point|puzzle|authored-content|narrative-position)\\.[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "id",
    "label",
    "data"
  ],
  "type": "object"
}
