common.ts

 1import {
 2    ThemeLicenseType,
 3    ThemeFamilyMeta,
 4    ThemeConfigInputSyntax,
 5} from "../../common"
 6
 7export interface Variant {
 8    colors: {
 9        base00: string
10        base01: string
11        base02: string
12        base03: string
13        base04: string
14        base05: string
15        base06: string
16        base07: string
17        base08: string
18        base09: string
19        base0A: string
20        base0B: string
21        base0C: string
22        base0D: string
23        base0E: string
24        base0F: string
25    }
26}
27
28export const meta: ThemeFamilyMeta = {
29    name: "Atelier",
30    author: "Bram de Haan (http://atelierbramdehaan.nl)",
31    license_type: ThemeLicenseType.MIT,
32    license_url:
33        "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/",
34}
35
36export const build_syntax = (variant: Variant): ThemeConfigInputSyntax => {
37    const { colors } = variant
38    return {
39        primary: { color: colors.base06 },
40        comment: { color: colors.base03 },
41        "punctuation.delimiter": { color: colors.base05 },
42        "punctuation.bracket": { color: colors.base05 },
43        "punctuation.special": { color: colors.base0F },
44        "string.special.symbol": { color: colors.base0B },
45        operator: { color: colors.base05 },
46        function: { color: colors.base0D },
47        "function.method": { color: colors.base0D },
48        "function.special.definition": { color: colors.base0A },
49        string: { color: colors.base0B },
50        "string.special": { color: colors.base0F },
51        "string.regex": { color: colors.base0C },
52        type: { color: colors.base0A },
53        number: { color: colors.base09 },
54        property: { color: colors.base08 },
55        variable: { color: colors.base06 },
56        "variable.special": { color: colors.base0E },
57        keyword: { color: colors.base0E },
58    }
59}