aboutsummaryrefslogtreecommitdiff
path: root/src/services/theme_data/theme2_to_theme3.js
blob: 5ac87bebbd51acc51ddae6672620357c75f0b5cc (plain)
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
import allKeys from './theme2_keys'

// keys that are meant to be used globally, i.e. what's the rest of the theme is based upon.
const basePaletteKeys = new Set([
  'bg',
  'fg',
  'text',
  'link',
  'accent',

  'cBlue',
  'cRed',
  'cGreen',
  'cOrange'
])

// Keys that are not available in editor and never meant to be edited
const hiddenKeys = new Set([
  'profileBg',
  'profileTint'
])

const extendedBasePrefixes = [
  'border',
  'icon',
  'highlight',
  'lightText',

  'popover',

  'panel',
  'topBar',
  'tab',
  'btn',
  'input',
  'selectedMenu',

  'alert',
  'badge',

  'post',
  'selectedPost', // wrong nomenclature
  'poll',

  'chatBg',
  'chatMessageIncoming',
  'chatMessageOutgoing'
]

const extendedBaseKeys = Object.fromEntries(extendedBasePrefixes.map(prefix => [prefix, allKeys.filter(k => k.startsWith(prefix))]))

// Keysets that are only really used intermideately, i.e. to generate other colors
const temporary = new Set([
  'border',
  'highlight'
])

const temporaryColors = {}