{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://brand.aampere.io/brand.schema.json",
  "title": "Aampere brand data",
  "description": "All Aampere brand guidelines data: logos, colors, typography, motion and downloads.",
  "$defs": {
    "bi": {
      "type": "object",
      "required": [
        "de",
        "en"
      ],
      "properties": {
        "de": {
          "type": "string"
        },
        "en": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "fileRef": {
      "type": "object",
      "required": [
        "url",
        "available"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "available": {
          "type": "boolean"
        }
      },
      "description": "A file on the site. Only use it when available is true."
    },
    "color": {
      "type": "object",
      "required": [
        "name",
        "hex",
        "rgb",
        "cmyk",
        "pantone",
        "role",
        "webflowVariable"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "hex": {
          "type": "string",
          "pattern": "^#[0-9A-F]{6}$"
        },
        "rgb": {
          "type": "string"
        },
        "cmyk": {
          "type": [
            "string",
            "null"
          ]
        },
        "pantone": {
          "type": [
            "string",
            "null"
          ]
        },
        "role": {
          "type": "string"
        },
        "webflowVariable": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "colorway": {
      "enum": [
        "green-light",
        "green-dark",
        "black",
        "white"
      ]
    }
  },
  "type": "object",
  "required": [
    "$schema",
    "name",
    "title",
    "version",
    "updated",
    "url",
    "contact",
    "notes",
    "guidelines",
    "logos",
    "colors",
    "typography",
    "motion",
    "photography",
    "downloads"
  ],
  "properties": {
    "$schema": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "version": {
      "type": "string",
      "pattern": "^\\d+\\.\\d+\\.\\d+$"
    },
    "updated": {
      "type": "string",
      "format": "date"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "contact": {
      "type": "string"
    },
    "notes": {
      "type": "object",
      "required": [
        "placeholder",
        "access"
      ],
      "properties": {
        "placeholder": {
          "type": "string"
        },
        "access": {
          "type": "string"
        }
      }
    },
    "guidelines": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "slug",
          "title",
          "summary",
          "html",
          "markdown"
        ],
        "properties": {
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "html": {
            "type": "string"
          },
          "markdown": {
            "type": "string"
          }
        }
      }
    },
    "logos": {
      "type": "object",
      "required": [
        "variants",
        "socialAvatar",
        "colorways",
        "formats",
        "choosing",
        "clearspace",
        "animations",
        "donts"
      ],
      "properties": {
        "variants": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id",
              "name",
              "useWhen",
              "minSize",
              "files"
            ],
            "properties": {
              "id": {
                "enum": [
                  "primary",
                  "symbol",
                  "stacked"
                ]
              },
              "name": {
                "type": "string"
              },
              "useWhen": {
                "type": "string"
              },
              "minSize": {
                "type": "object",
                "required": [
                  "px",
                  "mm",
                  "measuredOn"
                ],
                "properties": {
                  "px": {
                    "type": "number"
                  },
                  "mm": {
                    "type": "number"
                  },
                  "measuredOn": {
                    "type": "string"
                  }
                }
              },
              "files": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "colorway",
                    "svg",
                    "png",
                    "pdf",
                    "eps",
                    "pngWidths"
                  ],
                  "properties": {
                    "colorway": {
                      "$ref": "#/$defs/colorway"
                    },
                    "svg": {
                      "$ref": "#/$defs/fileRef"
                    },
                    "png": {
                      "$ref": "#/$defs/fileRef"
                    },
                    "pdf": {
                      "$ref": "#/$defs/fileRef"
                    },
                    "eps": {
                      "$ref": "#/$defs/fileRef"
                    },
                    "pngWidths": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/$defs/fileRef"
                          }
                        ],
                        "type": "object",
                        "required": [
                          "width"
                        ],
                        "properties": {
                          "width": {
                            "type": "number"
                          }
                        }
                      }
                    },
                    "squareIcons": {
                      "type": "array"
                    }
                  }
                }
              }
            }
          }
        },
        "socialAvatar": {
          "type": "object",
          "required": [
            "name",
            "useWhen",
            "svg",
            "png"
          ],
          "properties": {
            "name": {
              "type": "string"
            },
            "useWhen": {
              "type": "string"
            },
            "svg": {
              "$ref": "#/$defs/fileRef"
            },
            "png": {
              "type": "array",
              "items": {
                "allOf": [
                  {
                    "$ref": "#/$defs/fileRef"
                  }
                ],
                "type": "object",
                "required": [
                  "size"
                ],
                "properties": {
                  "size": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "colorways": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id",
              "name",
              "hex",
              "useOn",
              "note"
            ],
            "properties": {
              "id": {
                "$ref": "#/$defs/colorway"
              },
              "name": {
                "type": "string"
              },
              "hex": {
                "type": "string"
              },
              "useOn": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "note": {
                "type": "string"
              }
            }
          }
        },
        "formats": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "ext",
              "use"
            ],
            "properties": {
              "ext": {
                "type": "string"
              },
              "use": {
                "type": "string"
              }
            }
          }
        },
        "choosing": {
          "type": "object",
          "required": [
            "rule",
            "minWhitenessPercent",
            "minBlacknessPercent",
            "onBrandColors"
          ],
          "properties": {
            "rule": {
              "type": "string"
            },
            "minWhitenessPercent": {
              "type": "number"
            },
            "minBlacknessPercent": {
              "type": "number"
            },
            "onBrandColors": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "background",
                  "hex",
                  "colorway",
                  "contrast"
                ],
                "properties": {
                  "background": {
                    "type": "string"
                  },
                  "hex": {
                    "type": "string"
                  },
                  "colorway": {
                    "$ref": "#/$defs/colorway"
                  },
                  "contrast": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "clearspace": {
          "type": "string"
        },
        "animations": {
          "type": "array",
          "items": {
            "allOf": [
              {
                "$ref": "#/$defs/fileRef"
              }
            ],
            "type": "object",
            "required": [
              "name",
              "use"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "use": {
                "type": "string"
              }
            }
          }
        },
        "donts": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "colors": {
      "type": "object",
      "required": [
        "primary",
        "secondary",
        "modes",
        "pairings",
        "donts"
      ],
      "properties": {
        "primary": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/color"
          }
        },
        "secondary": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/color"
          }
        },
        "modes": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "pairings": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "foreground",
              "background",
              "rule",
              "contrast",
              "note"
            ],
            "properties": {
              "foreground": {
                "type": "string"
              },
              "background": {
                "type": "string"
              },
              "rule": {
                "enum": [
                  "bold-only",
                  "never"
                ]
              },
              "contrast": {
                "type": "number"
              },
              "note": {
                "type": "string"
              }
            }
          }
        },
        "donts": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "typography": {
      "type": "object",
      "required": [
        "typefaces",
        "scale",
        "headingMinSizePx",
        "specimens",
        "specimenNote",
        "principles",
        "donts"
      ],
      "properties": {
        "typefaces": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "name",
              "use",
              "role",
              "cssFamily",
              "fallback",
              "description",
              "weights",
              "license",
              "webFonts"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "use": {
                "enum": [
                  "heading",
                  "body"
                ]
              },
              "role": {
                "type": "string"
              },
              "cssFamily": {
                "type": "string"
              },
              "fallback": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "weights": {
                "type": "array"
              },
              "license": {
                "type": "string"
              },
              "webFonts": {
                "type": "array"
              }
            }
          }
        },
        "scale": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "name",
              "tag",
              "use",
              "cut",
              "size",
              "lineHeight",
              "letterSpacing",
              "weight",
              "usage"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "tag": {
                "type": "string"
              },
              "use": {
                "enum": [
                  "heading",
                  "body"
                ]
              },
              "cut": {
                "type": "string"
              },
              "size": {
                "type": "object",
                "required": [
                  "desktop",
                  "tablet",
                  "mobile"
                ],
                "properties": {
                  "desktop": {
                    "type": "number"
                  },
                  "tablet": {
                    "type": "number"
                  },
                  "mobile": {
                    "type": "number"
                  }
                }
              },
              "lineHeight": {
                "type": "number"
              },
              "letterSpacing": {
                "type": "string"
              },
              "weight": {
                "type": "number"
              },
              "usage": {
                "type": "string"
              },
              "webflowVar": {
                "type": "string"
              }
            }
          }
        },
        "headingMinSizePx": {
          "type": "number"
        },
        "specimens": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "role",
              "style",
              "text"
            ],
            "properties": {
              "role": {
                "type": "string"
              },
              "style": {
                "type": "string"
              },
              "text": {
                "type": "string"
              },
              "note": {
                "type": "boolean"
              }
            }
          }
        },
        "specimenNote": {
          "type": "string"
        },
        "principles": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id",
              "title",
              "text"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "text": {
                "type": "string"
              }
            }
          }
        },
        "donts": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "motion": {
      "type": "object",
      "required": [
        "principles",
        "easings",
        "durations",
        "reducedMotion",
        "donts"
      ],
      "properties": {
        "principles": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "title",
              "text"
            ],
            "properties": {
              "title": {
                "type": "string"
              },
              "text": {
                "type": "string"
              }
            }
          }
        },
        "easings": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "name",
              "token",
              "value",
              "curve",
              "usage"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "token": {
                "type": "string"
              },
              "value": {
                "type": "string"
              },
              "curve": {
                "type": "array"
              },
              "usage": {
                "type": "string"
              }
            }
          }
        },
        "durations": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "name",
              "token",
              "ms",
              "usage"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "token": {
                "type": "string"
              },
              "ms": {
                "type": "number"
              },
              "usage": {
                "type": "string"
              }
            }
          }
        },
        "reducedMotion": {
          "type": "string"
        },
        "donts": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "photography": {
      "type": "object",
      "required": [
        "donts"
      ],
      "properties": {
        "donts": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "downloads": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "label",
          "access",
          "url",
          "available"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "access": {
            "enum": [
              "public",
              "internal"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "available": {
            "type": "boolean"
          }
        }
      }
    }
  }
}