{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://moe-ui-docs.vercel.app/schema/registry-item.json",
  "title": "Moe UI registry item",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "name",
    "type",
    "files",
    "dependencies",
    "registryDependencies",
    "integrity"
  ],
  "properties": {
    "$schema": {
      "type": "string",
      "format": "uri"
    },
    "schemaVersion": {
      "const": 1
    },
    "name": {
      "type": "string",
      "pattern": "^[a-z0-9-]+$"
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "category": {
      "type": "string"
    },
    "type": {
      "enum": [
        "registry:ui",
        "registry:lib"
      ]
    },
    "files": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "path",
          "target",
          "content"
        ],
        "properties": {
          "path": {
            "type": "string"
          },
          "target": {
            "type": "string"
          },
          "content": {
            "type": "string"
          }
        }
      }
    },
    "dependencies": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "registryDependencies": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "integrity": {
      "type": "string",
      "pattern": "^sha256-"
    }
  }
}
