SPB Git

Repository Public MIT

theme.schema.json 7.6 KB 312 lines json

1{2  "$schema": "https://json-schema.org/draft/2020-12/schema",3  "$id": "https://glass.spboucher.ai/registry/schema/theme.schema.json",4  "title": "SP GlassKit theme",5  "type": "object",6  "additionalProperties": false,7  "required": [8    "id",9    "name"10  ],11  "properties": {12    "schemaVersion": {13      "const": 114    },15    "id": {16      "type": "string",17      "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",18      "maxLength": 6419    },20    "name": {21      "type": "string",22      "minLength": 1,23      "maxLength": 8024    },25    "summary": {26      "type": "string",27      "maxLength": 50028    },29    "appearance": {30      "enum": [31        "system",32        "light",33        "dark"34      ]35    },36    "light": {37      "type": "object",38      "additionalProperties": false,39      "properties": {40        "primary": {41          "type": "string",42          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"43        },44        "secondary": {45          "type": "string",46          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"47        },48        "accent": {49          "type": "string",50          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"51        },52        "destructive": {53          "type": "string",54          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"55        },56        "success": {57          "type": "string",58          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"59        },60        "warning": {61          "type": "string",62          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"63        },64        "background": {65          "type": "string",66          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"67        },68        "surface": {69          "type": "string",70          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"71        },72        "textPrimary": {73          "type": "string",74          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"75        },76        "textSecondary": {77          "type": "string",78          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"79        },80        "separator": {81          "type": "string",82          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"83        },84        "focusRing": {85          "type": "string",86          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"87        }88      },89      "description": "A role without a value follows the system colour."90    },91    "dark": {92      "type": "object",93      "additionalProperties": false,94      "properties": {95        "primary": {96          "type": "string",97          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"98        },99        "secondary": {100          "type": "string",101          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"102        },103        "accent": {104          "type": "string",105          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"106        },107        "destructive": {108          "type": "string",109          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"110        },111        "success": {112          "type": "string",113          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"114        },115        "warning": {116          "type": "string",117          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"118        },119        "background": {120          "type": "string",121          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"122        },123        "surface": {124          "type": "string",125          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"126        },127        "textPrimary": {128          "type": "string",129          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"130        },131        "textSecondary": {132          "type": "string",133          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"134        },135        "separator": {136          "type": "string",137          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"138        },139        "focusRing": {140          "type": "string",141          "pattern": "^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"142        }143      },144      "description": "A role without a value follows the system colour."145    },146    "typography": {147      "type": "object",148      "additionalProperties": false,149      "properties": {150        "design": {151          "enum": [152            "default",153            "rounded",154            "serif",155            "monospaced"156          ]157        },158        "headingWeight": {159          "enum": [160            "regular",161            "medium",162            "semibold",163            "bold"164          ]165        },166        "bodyWeight": {167          "enum": [168            "regular",169            "medium",170            "semibold",171            "bold"172          ]173        }174      }175    },176    "spacing": {177      "type": "object",178      "additionalProperties": false,179      "properties": {180        "xxs": {181          "type": "number",182          "minimum": 0,183          "maximum": 128184        },185        "xs": {186          "type": "number",187          "minimum": 0,188          "maximum": 128189        },190        "sm": {191          "type": "number",192          "minimum": 0,193          "maximum": 128194        },195        "md": {196          "type": "number",197          "minimum": 0,198          "maximum": 128199        },200        "lg": {201          "type": "number",202          "minimum": 0,203          "maximum": 128204        },205        "xl": {206          "type": "number",207          "minimum": 0,208          "maximum": 128209        },210        "xxl": {211          "type": "number",212          "minimum": 0,213          "maximum": 128214        }215      }216    },217    "radii": {218      "type": "object",219      "additionalProperties": false,220      "properties": {221        "small": {222          "type": "number",223          "minimum": 0,224          "maximum": 64225        },226        "medium": {227          "type": "number",228          "minimum": 0,229          "maximum": 64230        },231        "large": {232          "type": "number",233          "minimum": 0,234          "maximum": 64235        },236        "extraLarge": {237          "type": "number",238          "minimum": 0,239          "maximum": 64240        }241      }242    },243    "motion": {244      "type": "object",245      "additionalProperties": false,246      "properties": {247        "style": {248          "enum": [249            "smooth",250            "snappy",251            "bouncy"252          ]253        },254        "fast": {255          "type": "number",256          "minimum": 0,257          "maximum": 2258        },259        "standard": {260          "type": "number",261          "minimum": 0,262          "maximum": 2263        },264        "slow": {265          "type": "number",266          "minimum": 0,267          "maximum": 2268        }269      }270    },271    "density": {272      "enum": [273        "compact",274        "regular",275        "comfortable"276      ]277    },278    "glass": {279      "type": "object",280      "additionalProperties": false,281      "description": "Only what the Liquid Glass API exposes: the variant and an optional tint role. Blur, refraction and opacity belong to the system.",282      "properties": {283        "variant": {284          "enum": [285            "regular",286            "clear"287          ]288        },289        "tint": {290          "enum": [291            "primary",292            "secondary",293            "accent",294            "destructive",295            "success",296            "warning",297            "background",298            "surface",299            "textPrimary",300            "textSecondary",301            "separator",302            "focusRing"303          ]304        }305      }306    },307    "hapticsEnabled": {308      "type": "boolean"309    }310  }311}312
Files main
Menu

Theme