{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "element",
        "variant"
      ]
    },
    "category": {
      "type": "string",
      "enum": [
        "button",
        "navigation",
        "input",
        "select",
        "link",
        "heading"
      ]
    },
    "source": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "selector": {
          "type": "string",
          "maxLength": 2000
        },
        "capturedAt": {
          "type": "string"
        }
      },
      "required": [
        "url",
        "selector",
        "capturedAt"
      ],
      "additionalProperties": false
    },
    "id": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "description": {
      "type": "string",
      "maxLength": 2000
    },
    "html": {
      "type": "string",
      "maxLength": 24000
    },
    "previewStyle": {
      "type": "string",
      "maxLength": 1000
    },
    "previewContext": {
      "type": "object",
      "properties": {
        "css": {
          "type": "string",
          "maxLength": 60000
        },
        "tag": {
          "type": "string",
          "maxLength": 20
        },
        "className": {
          "type": "string",
          "maxLength": 2000
        },
        "id": {
          "type": "string",
          "maxLength": 500
        },
        "style": {
          "type": "string",
          "maxLength": 2000
        },
        "htmlAttributes": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "maxLength": 100
          },
          "additionalProperties": {
            "type": "string",
            "maxLength": 1000
          }
        },
        "bodyAttributes": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "maxLength": 100
          },
          "additionalProperties": {
            "type": "string",
            "maxLength": 1000
          }
        }
      },
      "required": [
        "css",
        "tag"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "id",
    "name",
    "description",
    "html"
  ],
  "additionalProperties": false
}
