{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/block-protocol-metadata/latest.json",
  "x-lintel": {
    "source": "https://blockprotocol.org/schemas/block-metadata.json",
    "sourceSha256": "40fead18e8bf1fe865bca931c551442b339208bca1c6883715fe20cdfaf0892e",
    "fileMatch": [
      "block-metadata.json"
    ],
    "parsers": [
      "json"
    ]
  },
  "type": "object",
  "properties": {
    "author": {
      "description": "The name of the author of the block",
      "type": "string"
    },
    "blockType": {
      "description": "The type of block this is (e.g. custom element, React)",
      "properties": {
        "entryPoint": {
          "enum": [
            "custom-element",
            "html",
            "react"
          ],
          "type": "string"
        },
        "tagName": {
          "type": "string"
        }
      },
      "required": [
        "entryPoint"
      ],
      "type": "object"
    },
    "commit": {
      "description": "The commit hash of the source this block was built from. If specified, 'repository' must also be specified.",
      "type": "string"
    },
    "description": {
      "description": "A short description of the block, to help users understand its capabilities",
      "type": "string"
    },
    "devReloadEndpoint": {
      "description": "URL of a web socket that reports updates in locally developed blocks. To be used by EAs to auto reload.",
      "type": "string"
    },
    "displayName": {
      "description": "The display name used for a block",
      "type": "string"
    },
    "examples": {
      "description": "A list of examples property objects which comply with the block's schema, for demonstration purposes",
      "items": {
        "$ref": "#/$defs/JsonObject"
      },
      "type": "array"
    },
    "externals": {
      "$ref": "#/$defs/JsonObject",
      "description": "The dependencies a block relies on but expects the embedding application to provide, e.g. { \"react\": \"^18.0.0\" }"
    },
    "icon": {
      "description": "An icon for the block, to be displayed when the user is selecting from available blocks (as well as elsewhere as appropriate, e.g. in a website listing the block).",
      "type": "string"
    },
    "image": {
      "description": "A preview image of the block for users to see it in action before using it. This would ideally have a 3:2 width:height ratio and be a minimum of 900x1170px.",
      "type": "string"
    },
    "license": {
      "description": "The license the block is made available under (e.g. MIT).",
      "type": "string"
    },
    "name": {
      "description": "A unique, slugified name for the block.",
      "type": "string"
    },
    "protocol": {
      "description": "The applicable block protocol version, e.g. 0.3",
      "type": "string"
    },
    "repository": {
      "$ref": "#/$defs/BlockMetadataRepository",
      "description": "Specify the place where your block's code lives. This is helpful for people who want to explore the source, or contribute to your block's development."
    },
    "schema": {
      "description": "The versioned URL to the block's schema, e.g. <https://blockprotocol.org/@blockprotocol/types/entity-type/thing/v/2>",
      "type": "string"
    },
    "source": {
      "description": "The path or URL to the entrypoint source file (e.g. index.html, index.js).",
      "type": "string"
    },
    "variants": {
      "description": "A list which represents different variants of the block that the user can create.",
      "items": {
        "properties": {
          "description": {
            "type": "string"
          },
          "examples": {
            "items": {
              "$ref": "#/$defs/JsonObject"
            },
            "type": "array"
          },
          "icon": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "properties": {
            "$ref": "#/$defs/JsonObject"
          }
        },
        "required": [
          "name",
          "properties"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "version": {
      "description": "The version of the block, which should use semantic versioning (@see <https://semver.org/)>.",
      "type": "string"
    }
  },
  "required": [
    "blockType",
    "name",
    "protocol",
    "schema",
    "source",
    "version"
  ],
  "$defs": {
    "BlockMetadataRepository": {
      "anyOf": [
        {
          "properties": {
            "directory": {
              "type": "string"
            },
            "type": {
              "type": "string"
            },
            "url": {
              "type": "string"
            }
          },
          "required": [
            "type",
            "url"
          ],
          "type": "object"
        },
        {
          "type": "string"
        }
      ]
    },
    "JsonObject": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/JsonValue"
      }
    },
    "JsonValue": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/JsonValue"
          },
          "type": "array"
        },
        {
          "$ref": "#/$defs/JsonObject"
        },
        {
          "type": [
            "string",
            "number",
            "boolean"
          ]
        }
      ]
    }
  }
}
