atelier-common.ts

 1import { License, Meta, ThemeSyntax } from "./colorScheme"
 2
 3export interface Variant {
 4    meta: Meta
 5    colors: {
 6        base00: string
 7        base01: string
 8        base02: string
 9        base03: string
10        base04: string
11        base05: string
12        base06: string
13        base07: string
14        base08: string
15        base09: string
16        base0A: string
17        base0B: string
18        base0C: string
19        base0D: string
20        base0E: string
21        base0F: string
22    }
23}
24
25export const metaCommon: {
26    author: string
27    license: License
28} = {
29    author: "Bram de Haan (http://atelierbramdehaan.nl)",
30    license: {
31        SPDX: "MIT",
32        license_text: {
33            https_url: "https://atelierbram.mit-license.org/license.txt",
34            license_checksum:
35                "f95ce526ef4e7eecf7a832bba0e3451cc1000f9ce63eb01ed6f64f8109f5d0a5",
36        },
37    },
38}
39
40export const buildSyntax = (variant: Variant): ThemeSyntax => {
41    const { colors } = variant
42    return {
43        primary: { color: colors.base06 },
44        comment: { color: colors.base03 },
45        "punctuation.delimiter": { color: colors.base05 },
46        "punctuation.bracket": { color: colors.base05 },
47        "punctuation.special": { color: colors.base0F },
48        "string.special.symbol": { color: colors.base0B },
49        operator: { color: colors.base05 },
50        function: { color: colors.base0D },
51        "function.method": { color: colors.base0D },
52        "function.special.definition": { color: colors.base0A },
53        string: { color: colors.base0B },
54        "string.special": { color: colors.base0F },
55        "string.regex": { color: colors.base0C },
56        type: { color: colors.base0A },
57        number: { color: colors.base09 },
58        property: { color: colors.base08 },
59        variable: { color: colors.base06 },
60        "variable.special": { color: colors.base0E },
61        variant: { color: colors.base0A },
62        keyword: { color: colors.base0E },
63    }
64}
65
66export const name = "Atelier"