{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://moe-ui-docs.vercel.app/schema/components.json",
  "title": "Moe UI project configuration",
  "$defs": {
    "paths": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "components",
        "lib",
        "css"
      ],
      "properties": {
        "components": {
          "type": "string"
        },
        "lib": {
          "type": "string"
        },
        "css": {
          "type": "string"
        }
      }
    }
  },
  "oneOf": [
    {
      "title": "Legacy Next.js and Uniwind configuration",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schemaVersion",
        "registry",
        "typescript",
        "paths"
      ],
      "properties": {
        "$schema": {
          "type": "string",
          "format": "uri"
        },
        "schemaVersion": {
          "const": 1
        },
        "registry": {
          "type": "string",
          "format": "uri"
        },
        "typescript": {
          "const": true
        },
        "paths": {
          "$ref": "#/$defs/paths"
        }
      }
    },
    {
      "title": "Framework and styling-aware configuration",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schemaVersion",
        "registry",
        "typescript",
        "framework",
        "styling",
        "paths"
      ],
      "properties": {
        "$schema": {
          "type": "string",
          "format": "uri"
        },
        "schemaVersion": {
          "const": 2
        },
        "registry": {
          "type": "string",
          "format": "uri"
        },
        "typescript": {
          "const": true
        },
        "framework": {
          "enum": [
            "next",
            "expo"
          ]
        },
        "styling": {
          "enum": [
            "uniwind",
            "nativewind"
          ]
        },
        "paths": {
          "$ref": "#/$defs/paths"
        }
      }
    }
  ]
}
