{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://modeljlabs.com/aether/learn/widget-runtime-148.schema.json",
  "title": "Aether 2D widget runtime fields (extension to existing widget document)",
  "type": "object",
  "properties": {
    "theme": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "preset": {
          "enum": [
            "classic",
            "neon",
            "flat"
          ]
        },
        "normal": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "borderWidth": {
              "type": "number",
              "minimum": 0,
              "maximum": 12
            },
            "radius": {
              "type": "number",
              "minimum": 0,
              "maximum": 128
            },
            "fontSize": {
              "type": "number",
              "minimum": 8,
              "maximum": 128
            },
            "glow": {
              "type": "number",
              "minimum": 0,
              "maximum": 60
            },
            "opacity": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "background": {
              "type": "string",
              "description": "A CSS hexadecimal color accepted by the widget skin validator"
            },
            "color": {
              "type": "string",
              "description": "A CSS hexadecimal color accepted by the widget skin validator"
            },
            "borderColor": {
              "type": "string",
              "description": "A CSS hexadecimal color accepted by the widget skin validator"
            },
            "imageId": {
              "type": "string",
              "description": "ID of an embedded scene2d image; empty removes it"
            },
            "imageFit": {
              "enum": [
                "contain",
                "cover",
                "stretch"
              ]
            }
          }
        },
        "hover": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "borderWidth": {
              "type": "number",
              "minimum": 0,
              "maximum": 12
            },
            "radius": {
              "type": "number",
              "minimum": 0,
              "maximum": 128
            },
            "fontSize": {
              "type": "number",
              "minimum": 8,
              "maximum": 128
            },
            "glow": {
              "type": "number",
              "minimum": 0,
              "maximum": 60
            },
            "opacity": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "background": {
              "type": "string",
              "description": "A CSS hexadecimal color accepted by the widget skin validator"
            },
            "color": {
              "type": "string",
              "description": "A CSS hexadecimal color accepted by the widget skin validator"
            },
            "borderColor": {
              "type": "string",
              "description": "A CSS hexadecimal color accepted by the widget skin validator"
            },
            "imageId": {
              "type": "string",
              "description": "ID of an embedded scene2d image; empty removes it"
            },
            "imageFit": {
              "enum": [
                "contain",
                "cover",
                "stretch"
              ]
            }
          }
        },
        "pressed": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "borderWidth": {
              "type": "number",
              "minimum": 0,
              "maximum": 12
            },
            "radius": {
              "type": "number",
              "minimum": 0,
              "maximum": 128
            },
            "fontSize": {
              "type": "number",
              "minimum": 8,
              "maximum": 128
            },
            "glow": {
              "type": "number",
              "minimum": 0,
              "maximum": 60
            },
            "opacity": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "background": {
              "type": "string",
              "description": "A CSS hexadecimal color accepted by the widget skin validator"
            },
            "color": {
              "type": "string",
              "description": "A CSS hexadecimal color accepted by the widget skin validator"
            },
            "borderColor": {
              "type": "string",
              "description": "A CSS hexadecimal color accepted by the widget skin validator"
            },
            "imageId": {
              "type": "string",
              "description": "ID of an embedded scene2d image; empty removes it"
            },
            "imageFit": {
              "enum": [
                "contain",
                "cover",
                "stretch"
              ]
            }
          }
        },
        "checked": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "borderWidth": {
              "type": "number",
              "minimum": 0,
              "maximum": 12
            },
            "radius": {
              "type": "number",
              "minimum": 0,
              "maximum": 128
            },
            "fontSize": {
              "type": "number",
              "minimum": 8,
              "maximum": 128
            },
            "glow": {
              "type": "number",
              "minimum": 0,
              "maximum": 60
            },
            "opacity": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "background": {
              "type": "string",
              "description": "A CSS hexadecimal color accepted by the widget skin validator"
            },
            "color": {
              "type": "string",
              "description": "A CSS hexadecimal color accepted by the widget skin validator"
            },
            "borderColor": {
              "type": "string",
              "description": "A CSS hexadecimal color accepted by the widget skin validator"
            },
            "imageId": {
              "type": "string",
              "description": "ID of an embedded scene2d image; empty removes it"
            },
            "imageFit": {
              "enum": [
                "contain",
                "cover",
                "stretch"
              ]
            }
          }
        },
        "disabled": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "borderWidth": {
              "type": "number",
              "minimum": 0,
              "maximum": 12
            },
            "radius": {
              "type": "number",
              "minimum": 0,
              "maximum": 128
            },
            "fontSize": {
              "type": "number",
              "minimum": 8,
              "maximum": 128
            },
            "glow": {
              "type": "number",
              "minimum": 0,
              "maximum": 60
            },
            "opacity": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "background": {
              "type": "string",
              "description": "A CSS hexadecimal color accepted by the widget skin validator"
            },
            "color": {
              "type": "string",
              "description": "A CSS hexadecimal color accepted by the widget skin validator"
            },
            "borderColor": {
              "type": "string",
              "description": "A CSS hexadecimal color accepted by the widget skin validator"
            },
            "imageId": {
              "type": "string",
              "description": "ID of an embedded scene2d image; empty removes it"
            },
            "imageFit": {
              "enum": [
                "contain",
                "cover",
                "stretch"
              ]
            }
          }
        }
      }
    },
    "controls": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Stable runtime ID. Missing legacy IDs are assigned on import."
          },
          "visible": {
            "type": "boolean",
            "default": true
          },
          "visible_target": {
            "type": "string",
            "minLength": 1,
            "description": "Visibility source actor; defaults to target"
          },
          "visible_var": {
            "type": "string"
          },
          "visible_when": {
            "type": "boolean",
            "default": true
          },
          "style": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "preset": {
                "enum": [
                  "classic",
                  "neon",
                  "flat"
                ]
              },
              "normal": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "borderWidth": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 12
                  },
                  "radius": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 128
                  },
                  "fontSize": {
                    "type": "number",
                    "minimum": 8,
                    "maximum": 128
                  },
                  "glow": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 60
                  },
                  "opacity": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "background": {
                    "type": "string",
                    "description": "A CSS hexadecimal color accepted by the widget skin validator"
                  },
                  "color": {
                    "type": "string",
                    "description": "A CSS hexadecimal color accepted by the widget skin validator"
                  },
                  "borderColor": {
                    "type": "string",
                    "description": "A CSS hexadecimal color accepted by the widget skin validator"
                  },
                  "imageId": {
                    "type": "string",
                    "description": "ID of an embedded scene2d image; empty removes it"
                  },
                  "imageFit": {
                    "enum": [
                      "contain",
                      "cover",
                      "stretch"
                    ]
                  }
                }
              },
              "hover": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "borderWidth": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 12
                  },
                  "radius": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 128
                  },
                  "fontSize": {
                    "type": "number",
                    "minimum": 8,
                    "maximum": 128
                  },
                  "glow": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 60
                  },
                  "opacity": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "background": {
                    "type": "string",
                    "description": "A CSS hexadecimal color accepted by the widget skin validator"
                  },
                  "color": {
                    "type": "string",
                    "description": "A CSS hexadecimal color accepted by the widget skin validator"
                  },
                  "borderColor": {
                    "type": "string",
                    "description": "A CSS hexadecimal color accepted by the widget skin validator"
                  },
                  "imageId": {
                    "type": "string",
                    "description": "ID of an embedded scene2d image; empty removes it"
                  },
                  "imageFit": {
                    "enum": [
                      "contain",
                      "cover",
                      "stretch"
                    ]
                  }
                }
              },
              "pressed": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "borderWidth": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 12
                  },
                  "radius": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 128
                  },
                  "fontSize": {
                    "type": "number",
                    "minimum": 8,
                    "maximum": 128
                  },
                  "glow": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 60
                  },
                  "opacity": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "background": {
                    "type": "string",
                    "description": "A CSS hexadecimal color accepted by the widget skin validator"
                  },
                  "color": {
                    "type": "string",
                    "description": "A CSS hexadecimal color accepted by the widget skin validator"
                  },
                  "borderColor": {
                    "type": "string",
                    "description": "A CSS hexadecimal color accepted by the widget skin validator"
                  },
                  "imageId": {
                    "type": "string",
                    "description": "ID of an embedded scene2d image; empty removes it"
                  },
                  "imageFit": {
                    "enum": [
                      "contain",
                      "cover",
                      "stretch"
                    ]
                  }
                }
              },
              "checked": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "borderWidth": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 12
                  },
                  "radius": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 128
                  },
                  "fontSize": {
                    "type": "number",
                    "minimum": 8,
                    "maximum": 128
                  },
                  "glow": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 60
                  },
                  "opacity": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "background": {
                    "type": "string",
                    "description": "A CSS hexadecimal color accepted by the widget skin validator"
                  },
                  "color": {
                    "type": "string",
                    "description": "A CSS hexadecimal color accepted by the widget skin validator"
                  },
                  "borderColor": {
                    "type": "string",
                    "description": "A CSS hexadecimal color accepted by the widget skin validator"
                  },
                  "imageId": {
                    "type": "string",
                    "description": "ID of an embedded scene2d image; empty removes it"
                  },
                  "imageFit": {
                    "enum": [
                      "contain",
                      "cover",
                      "stretch"
                    ]
                  }
                }
              },
              "disabled": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "borderWidth": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 12
                  },
                  "radius": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 128
                  },
                  "fontSize": {
                    "type": "number",
                    "minimum": 8,
                    "maximum": 128
                  },
                  "glow": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 60
                  },
                  "opacity": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "background": {
                    "type": "string",
                    "description": "A CSS hexadecimal color accepted by the widget skin validator"
                  },
                  "color": {
                    "type": "string",
                    "description": "A CSS hexadecimal color accepted by the widget skin validator"
                  },
                  "borderColor": {
                    "type": "string",
                    "description": "A CSS hexadecimal color accepted by the widget skin validator"
                  },
                  "imageId": {
                    "type": "string",
                    "description": "ID of an embedded scene2d image; empty removes it"
                  },
                  "imageFit": {
                    "enum": [
                      "contain",
                      "cover",
                      "stretch"
                    ]
                  }
                }
              }
            }
          }
        },
        "additionalProperties": true
      }
    }
  },
  "additionalProperties": true
}