{
  "openapi": "3.1.0",
  "info": {
    "title": "astro-dither API",
    "description": "Read-only metadata for the astro-dither package: the six Astro components, the 19 registry effects with their params and ranges, the docs search index, and the Markdown mirrors served for content negotiation. Send `Accept: text/markdown` to any page for its Markdown mirror.",
    "version": "0.1.0",
    "license": {
      "name": "MIT",
      "url": "https://github.com/screen-gd/astro-dither/blob/main/LICENSE"
    },
    "contact": {
      "url": "https://github.com/screen-gd/astro-dither/issues"
    }
  },
  "servers": [
    {
      "url": "https://astro-dither.vercel.app"
    }
  ],
  "paths": {
    "/api/effects.json": {
      "get": {
        "operationId": "listEffects",
        "summary": "List all effects",
        "description": "Every registry effect with its title, group, description, usage snippet, docs links and typed params with defaults and ranges.",
        "responses": {
          "200": {
            "description": "All 19 registry effects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EffectList"
                }
              }
            }
          }
        }
      }
    },
    "/api/effects/{slug}.json": {
      "get": {
        "operationId": "getEffect",
        "summary": "Get one effect",
        "description": "A single registry effect by slug, with params, defaults and ranges.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The effect slug, as in `<DitherEffect effect=\"...\">`.",
            "schema": {
              "type": "string",
              "enum": [
                "gradient",
                "glow",
                "mesh",
                "beams",
                "noise",
                "plasma",
                "silk",
                "smoke",
                "waves",
                "contours",
                "ripples",
                "metaballs",
                "tunnel",
                "retro-grid",
                "aurora",
                "starfield",
                "eclipse",
                "globe",
                "rise"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The effect.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Effect"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/components.json": {
      "get": {
        "operationId": "listComponents",
        "summary": "List all components",
        "description": "Every Astro component in the package with its description, usage snippet, docs links and full prop table.",
        "responses": {
          "200": {
            "description": "All six components.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComponentList"
                }
              }
            }
          }
        }
      }
    },
    "/api/components/{slug}.json": {
      "get": {
        "operationId": "getComponent",
        "summary": "Get one component",
        "description": "A single component by slug, with its prop table.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The component slug, kebab-case.",
            "schema": {
              "type": "string",
              "enum": [
                "dither",
                "dither-image",
                "dither-gradient",
                "dither-aurora",
                "dither-effect",
                "dither-globe"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The component.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Component"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/search.json": {
      "get": {
        "operationId": "searchDocs",
        "summary": "Docs search index",
        "description": "The flat index the site search uses: every docs page, component and effect with title, section, description and href.",
        "responses": {
          "200": {
            "description": "The search index.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SearchItem"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/index.md": {
      "get": {
        "operationId": "getHomeMarkdown",
        "summary": "Homepage as Markdown",
        "description": "Markdown mirror of the homepage: what the package is, install commands, and links into the docs.",
        "responses": {
          "200": {
            "description": "The homepage mirror.",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "getLlmsTxt",
        "summary": "LLM guidance file",
        "description": "Curated entry points for agents: what astro-dither is for, how to install and use it, and links to every Markdown docs page.",
        "responses": {
          "200": {
            "description": "The llms.txt file.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/docs.md": {
      "get": {
        "operationId": "getDocsIndexMarkdown",
        "summary": "Docs introduction as Markdown",
        "description": "Markdown mirror of the docs landing page.",
        "responses": {
          "200": {
            "description": "The introduction page.",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/docs/{path}.md": {
      "get": {
        "operationId": "getDocMarkdown",
        "summary": "Any docs page as Markdown",
        "description": "Markdown mirror of a docs page: guides, engine pages, the effect catalog, every effect and every component.",
        "parameters": [
          {
            "name": "path",
            "in": "path",
            "required": true,
            "description": "The docs path without the .md suffix.",
            "schema": {
              "type": "string",
              "enum": [
                "copy-the-source",
                "engine/accessibility",
                "engine/how-it-works",
                "engine/matrices",
                "engine/performance",
                "engine/write-your-own",
                "installation",
                "theming",
                "effects",
                "effects/gradient",
                "effects/glow",
                "effects/mesh",
                "effects/beams",
                "effects/noise",
                "effects/plasma",
                "effects/silk",
                "effects/smoke",
                "effects/waves",
                "effects/contours",
                "effects/ripples",
                "effects/metaballs",
                "effects/tunnel",
                "effects/retro-grid",
                "effects/aurora",
                "effects/starfield",
                "effects/eclipse",
                "effects/globe",
                "effects/rise",
                "components/dither",
                "components/dither-image",
                "components/dither-gradient",
                "components/dither-aurora",
                "components/dither-effect",
                "components/dither-globe"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The docs page.",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiParam": {
        "type": "object",
        "required": [
          "name",
          "default"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "default": {
            "type": "number"
          },
          "min": {
            "type": "number"
          },
          "max": {
            "type": "number"
          },
          "step": {
            "type": "number"
          }
        }
      },
      "Effect": {
        "type": "object",
        "required": [
          "slug",
          "title",
          "group",
          "description",
          "usage",
          "docs",
          "markdown",
          "params"
        ],
        "properties": {
          "slug": {
            "type": "string",
            "enum": [
              "gradient",
              "glow",
              "mesh",
              "beams",
              "noise",
              "plasma",
              "silk",
              "smoke",
              "waves",
              "contours",
              "ripples",
              "metaballs",
              "tunnel",
              "retro-grid",
              "aurora",
              "starfield",
              "eclipse",
              "globe",
              "rise"
            ]
          },
          "title": {
            "type": "string"
          },
          "group": {
            "type": "string",
            "enum": [
              "Gradients and glows",
              "Textures",
              "Patterns",
              "Scenes"
            ]
          },
          "description": {
            "type": "string"
          },
          "usage": {
            "type": "string",
            "description": "A ready-to-paste Astro component snippet."
          },
          "docs": {
            "type": "string",
            "format": "uri"
          },
          "markdown": {
            "type": "string",
            "format": "uri"
          },
          "params": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiParam"
            }
          }
        }
      },
      "EffectList": {
        "type": "object",
        "required": [
          "effects"
        ],
        "properties": {
          "effects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Effect"
            }
          }
        }
      },
      "ApiProp": {
        "type": "object",
        "required": [
          "name",
          "type",
          "default",
          "description"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "default": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "Component": {
        "type": "object",
        "required": [
          "slug",
          "title",
          "component",
          "description",
          "usage",
          "docs",
          "markdown",
          "props"
        ],
        "properties": {
          "slug": {
            "type": "string",
            "enum": [
              "dither",
              "dither-image",
              "dither-gradient",
              "dither-aurora",
              "dither-effect",
              "dither-globe"
            ]
          },
          "title": {
            "type": "string"
          },
          "component": {
            "type": "string",
            "description": "The import name, e.g. DitherAurora."
          },
          "description": {
            "type": "string"
          },
          "usage": {
            "type": "string"
          },
          "docs": {
            "type": "string",
            "format": "uri"
          },
          "markdown": {
            "type": "string",
            "format": "uri"
          },
          "props": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiProp"
            }
          }
        }
      },
      "ComponentList": {
        "type": "object",
        "required": [
          "components"
        ],
        "properties": {
          "components": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Component"
            }
          }
        }
      },
      "SearchItem": {
        "type": "object",
        "required": [
          "title",
          "section",
          "desc",
          "href"
        ],
        "properties": {
          "title": {
            "type": "string"
          },
          "section": {
            "type": "string"
          },
          "desc": {
            "type": "string"
          },
          "href": {
            "type": "string"
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "status",
              "message",
              "hint",
              "docs"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "not_found",
                  "method_not_allowed"
                ]
              },
              "status": {
                "type": "integer"
              },
              "message": {
                "type": "string"
              },
              "hint": {
                "type": "string"
              },
              "docs": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    }
  }
}