File size: 2,011 Bytes
03d9a71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import { colors as colorScales } from '@lobehub/ui';
import { ThemeAppearance } from 'antd-style';

export const themeConfig: any = (isDarkMode: ThemeAppearance) => {
  const type = isDarkMode ? 'dark' : 'light';

  const colorTextTertiary = isDarkMode ? colorScales.gray[type][6] : colorScales.gray[type][7];
  const colorYellow = isDarkMode ? colorScales.yellow[type][9] : colorScales.yellow[type][10];
  const colorOrange = isDarkMode ? colorScales.gold[type][9] : colorScales.orange[type][9];
  const colorGreen = isDarkMode ? colorScales.lime[type][9] : colorScales.green[type][10];
  const colorBlue = isDarkMode ? colorScales.blue[type][9] : colorScales.geekblue[type][8];
  const colorPurple = isDarkMode ? colorScales.purple[type][10] : colorScales.purple[type][9];
  return {
    colors: {
      'editor.foreground': colorGreen,
    },
    name: type,
    tokenColors: [
      {
        scope: 'comma',
        settings: {
          foreground: colorTextTertiary,
        },
      },
      {
        scope: 'func',
        settings: {
          foreground: colorBlue,
        },
      },
      {
        scope: 'and',
        settings: {
          fontStyle: 'bold',
          foreground: colorBlue,
        },
      },
      {
        scope: 'bracket',
        settings: {
          foreground: colorBlue,
        },
      },
      {
        scope: 'model-type',
        settings: {
          fontStyle: 'italic',
          foreground: colorOrange,
        },
      },
      {
        scope: 'model-name',
        settings: {
          fontStyle: 'bold',
          foreground: colorOrange,
        },
      },
      {
        scope: 'model-bracket',
        settings: {
          foreground: colorOrange,
        },
      },
      {
        scope: 'number',
        settings: {
          foreground: colorPurple,
        },
      },
      {
        scope: 'wildcards',
        settings: {
          fontStyle: 'italic',
          foreground: colorYellow,
        },
      },
    ],
    type,
  };
};