{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://zeropress.dev/schemas/theme.v0.2.runtime.schema.json",
  "title": "ZeroPress Theme Manifest (Runtime v0.2)",
  "description": "Metadata manifest for a ZeroPress theme that targets the v0.2 runtime.",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "name",
    "namespace",
    "slug",
    "version",
    "license",
    "runtime"
  ],
  "properties": {
    "name": {
      "description": "Human-readable theme name shown in admin UIs and listings.",
      "markdownDescription": "Human-readable theme name shown in admin UIs and listings.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "namespace": {
      "description": "Publisher or organization slug that owns the theme.",
      "markdownDescription": "Publisher or organization slug that owns the theme. Use lowercase letters, numbers, and hyphens only.",
      "type": "string",
      "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
      "minLength": 3,
      "maxLength": 24
    },
    "slug": {
      "description": "Unique theme identifier used in package and registry contexts.",
      "markdownDescription": "Unique theme identifier used in package and registry contexts. Use lowercase letters, numbers, and hyphens only.",
      "type": "string",
      "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
      "minLength": 3,
      "maxLength": 32
    },
    "version": {
      "description": "Theme version in semantic versioning format.",
      "markdownDescription": "Theme version in semantic versioning format, for example `0.1.0`.",
      "type": "string",
      "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$"
    },
    "license": {
      "description": "SPDX license identifier for the theme.",
      "markdownDescription": "SPDX license identifier for the theme.",
      "type": "string",
      "enum": [
        "MIT",
        "Apache-2.0",
        "BSD-3-Clause",
        "GPL-3.0-only",
        "GPL-3.0-or-later"
      ]
    },
    "runtime": {
      "description": "Target ZeroPress theme runtime version.",
      "markdownDescription": "Target ZeroPress theme runtime version. This schema currently supports `0.2` only.",
      "type": "string",
      "const": "0.2"
    },
    "author": {
      "description": "Optional display name for the theme author or maintainer.",
      "markdownDescription": "Optional display name for the theme author or maintainer.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "description": {
      "description": "Optional short summary used in theme listings.",
      "markdownDescription": "Optional short summary used in theme listings.",
      "type": "string",
      "maxLength": 280
    },
    "thumbnail": {
      "description": "Optional thumbnail URL or asset path used for previews.",
      "markdownDescription": "Optional thumbnail URL or asset path used for previews.",
      "type": "string"
    },
    "settings": {
      "description": "Optional theme-defined settings exposed to the runtime or admin UI.",
      "markdownDescription": "Optional theme-defined settings exposed to the runtime or admin UI.",
      "type": "object"
    }
  },
  "examples": [
    {
      "name": "ZeroPress Starter Theme",
      "namespace": "official",
      "slug": "starter-theme",
      "version": "0.2.0",
      "license": "MIT",
      "runtime": "0.2",
      "description": "Starter theme"
    }
  ]
}
