{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://urdeck.app/schemas/v1/shader-manifest.json",
  "title": "UrDeck background manifest, version 1",
  "description": "manifest.json of a background folder. Unknown keys are allowed so that a newer manifest does not light up red; UrDeck warns about them when it loads the background.",
  "type": "object",
  "required": ["manifest"],
  "additionalProperties": true,
  "properties": {
    "$schema": { "type": "string", "description": "This schema's URL, for editor completion. Ignored." },
    "manifest": { "const": 1, "description": "The version of the format. A background without it, or with another value, does not load." },
    "title": { "type": "string", "description": "The name a person sees." },
    "description": { "type": "string", "description": "What the background looks like." },
    "entry": { "type": "string", "description": "The shader file inside the folder. Default: <folder name>.sksl." },
    "author": { "type": "string", "description": "Who made the background. For a person and a store; it never decides what runs." },
    "license": { "type": "string", "description": "An SPDX identifier is best." },
    "version": { "type": "string", "description": "The background's own version." },
    "tags": { "type": "array", "items": { "type": "string" }, "description": "Words that help find the background." },
    "pairsWith": {
      "type": "object",
      "description": "Themes this background suits. Used to recommend, never to decide what runs.",
      "additionalProperties": true,
      "properties": {
        "themes": { "type": "array", "items": { "type": "string" }, "description": "Theme names, best first." }
      }
    },
    "parameters": {
      "type": "object",
      "description": "Annotations, keyed by the name of a uniform the shader declares.",
      "additionalProperties": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "label": { "type": "string", "description": "The name an editor shows for the parameter." },
          "description": { "type": "string", "description": "What the parameter changes, in a sentence." },
          "kind": { "enum": ["number", "color"], "description": "color only for a parameter with three or four components." },
          "min": { "type": "number", "description": "Per component for a vector." },
          "max": { "type": "number", "description": "Per component for a vector." },
          "step": { "type": "number", "description": "The size of one step in an editor's slider." },
          "unit": { "type": "string", "description": "The unit to show beside the value, such as `degrees`." },
          "hidden": { "type": "boolean", "description": "Keeps the parameter out of an editor; the configuration can still set it." }
        }
      }
    },
    "samples": {
      "type": "array",
      "description": "Pictures of the background. The deck never reads them.",
      "items": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "type": { "enum": ["image", "video"], "description": "video is accepted and never played." },
          "file": { "type": "string", "description": "A file inside the folder." },
          "order": { "type": "integer", "description": "Where the picture comes in a list of samples." },
          "caption": { "type": "string", "description": "Text to show with the picture." },
          "settings": {
            "type": "object",
            "description": "How the sample was made. A record for people and tools; the deck never uses it.",
            "additionalProperties": true,
            "properties": {
              "size": { "type": "string", "description": "WIDTHxHEIGHT in pixels." },
              "time": { "type": "number", "description": "The shader's time in seconds." },
              "theme": { "type": "string", "description": "The name of a theme." },
              "colors": { "type": "array", "items": { "type": "string" }, "description": "Colours, as the configuration's colors." },
              "parameters": { "type": "object", "description": "Parameter values, as the configuration sets them." }
            }
          }
        }
      }
    }
  }
}
