theme.ts

  1import { colorRamp } from "./lib";
  2
  3export type Color = string;
  4export type Weight =
  5  | "thin"
  6  | "extra_light"
  7  | "light"
  8  | "normal"
  9  | "medium"
 10  | "semibold"
 11  | "bold"
 12  | "extra_bold"
 13  | "black";
 14
 15interface SyntaxHighlightStyle {
 16  color: { value: Color };
 17  weight: { value: Weight };
 18}
 19
 20interface Player {
 21  baseColor: {
 22    value: Color;
 23  };
 24  cursorColor: {
 25    value: Color;
 26  };
 27  selectionColor: {
 28    value: Color;
 29  };
 30  borderColor: {
 31    value: Color;
 32  };
 33}
 34
 35export interface BackgroundColor {
 36  base: {
 37    value: Color;
 38  };
 39  hover: {
 40    value: Color;
 41  };
 42  active: {
 43    value: Color;
 44  };
 45  focused: {
 46    value: Color;
 47  };
 48}
 49
 50export default interface Theme {
 51  backgroundColor: {
 52    100: BackgroundColor;
 53    300: BackgroundColor;
 54    500: BackgroundColor;
 55    ok: BackgroundColor;
 56    error: BackgroundColor;
 57    warning: BackgroundColor;
 58    info: BackgroundColor;
 59  };
 60  borderColor: {
 61    primary: {
 62      value: Color;
 63    };
 64    secondary: {
 65      value: Color;
 66    };
 67    muted: {
 68      value: Color;
 69    };
 70    focused: {
 71      value: Color;
 72    };
 73    active: {
 74      value: Color;
 75    };
 76  };
 77  textColor: {
 78    primary: {
 79      value: Color;
 80    };
 81    secondary: {
 82      value: Color;
 83    };
 84    muted: {
 85      value: Color;
 86    };
 87    placeholder: {
 88      value: Color;
 89    };
 90    active: {
 91      value: Color;
 92    };
 93    feature: {
 94      value: Color;
 95    };
 96    ok: {
 97      value: Color;
 98    };
 99    error: {
100      value: Color;
101    };
102    warning: {
103      value: Color;
104    };
105    info: {
106      value: Color;
107    };
108  };
109  iconColor: {
110    primary: {
111      value: Color;
112    };
113    secondary: {
114      value: Color;
115    };
116    muted: {
117      value: Color;
118    };
119    placeholder: {
120      value: Color;
121    };
122    active: {
123      value: Color;
124    };
125    feature: {
126      value: Color;
127    };
128    ok: {
129      value: Color;
130    };
131    error: {
132      value: Color;
133    };
134    warning: {
135      value: Color;
136    };
137    info: {
138      value: Color;
139    };
140  };
141  editor: {
142    background: {
143      value: Color;
144    };
145    indent_guide: {
146      value: Color;
147    };
148    indent_guide_active: {
149      value: Color;
150    };
151    line: {
152      active: {
153        value: Color;
154      };
155      highlighted: {
156        value: Color;
157      };
158      inserted: {
159        value: Color;
160      };
161      deleted: {
162        value: Color;
163      };
164      modified: {
165        value: Color;
166      };
167    };
168    highlight: {
169      selection: {
170        value: Color;
171      };
172      occurrence: {
173        value: Color;
174      };
175      activeOccurrence: {
176        value: Color;
177      };
178      matchingBracket: {
179        value: Color;
180      };
181      match: {
182        value: Color;
183      };
184      activeMatch: {
185        value: Color;
186      };
187      related: {
188        value: Color;
189      };
190    };
191    gutter: {
192      primary: {
193        value: Color;
194      };
195      active: {
196        value: Color;
197      };
198    };
199  };
200
201  syntax: {
202    primary: SyntaxHighlightStyle;
203    comment: SyntaxHighlightStyle;
204    punctuation: SyntaxHighlightStyle;
205    constant: SyntaxHighlightStyle;
206    keyword: SyntaxHighlightStyle;
207    function: SyntaxHighlightStyle;
208    type: SyntaxHighlightStyle;
209    variant: SyntaxHighlightStyle;
210    property: SyntaxHighlightStyle;
211    enum: SyntaxHighlightStyle;
212    operator: SyntaxHighlightStyle;
213    string: SyntaxHighlightStyle;
214    number: SyntaxHighlightStyle;
215    boolean: SyntaxHighlightStyle;
216    predictive: SyntaxHighlightStyle;
217  };
218
219  player: {
220    1: Player;
221    2: Player;
222    3: Player;
223    4: Player;
224    5: Player;
225    6: Player;
226    7: Player;
227    8: Player;
228  };
229  shadowAlpha: {
230    value: number;
231  };
232}