esoftplay 0.0.131-a → 0.0.131-b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  // noPage
2
+ // withObject
2
3
  import { esp } from 'esoftplay';
3
4
  import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
4
5
  import { LibStyle } from 'esoftplay/cache/lib/style/import';
@@ -7,81 +8,75 @@ import useGlobalState from 'esoftplay/global';
7
8
  import AsyncStorage from '@react-native-async-storage/async-storage';
8
9
  const { colorPrimary, colorAccent } = LibStyle
9
10
 
10
- const state = useGlobalState({
11
- theme: 'light'
12
- }, { persistKey: 'lib_theme' })
11
+ const state = useGlobalState({ theme: 'light' }, { persistKey: 'lib_theme' })
13
12
 
14
- export default class m {
15
-
16
- static setTheme(themeName: string): void {
13
+ export default {
14
+ setTheme(themeName: string): void {
17
15
  state.set({ theme: themeName })
18
16
  LibNavigation.reset()
19
17
  AsyncStorage.setItem('theme', themeName)
20
- }
21
-
22
- static _barStyle(): string {
23
- return m.colors(['dark', 'light'])
24
- }
25
-
26
- static _colorPrimary(): string {
27
- return m.colors([colorPrimary, colorPrimary])
28
- }
29
- static _colorAccent(): string {
30
- return m.colors([colorAccent, colorAccent])
31
- }
32
- static _colorHeader(): string {
33
- return m.colors(['#3E50B4', '#292B37'])
34
- }
35
- static _colorHeaderText(): string {
36
- return m.colors(['white', 'white'])
37
- }
38
- static _colorButtonPrimary(): string {
39
- return m.colors(['#3E50B4', '#3E50B4'])
40
- }
41
- static _colorButtonTextPrimary(): string {
42
- return m.colors(['white', 'white'])
43
- }
44
- static _colorButtonSecondary(): string {
45
- return m.colors(['#3E50B4', '#3E50B4'])
46
- }
47
- static _colorButtonTextSecondary(): string {
48
- return m.colors(['white', 'white'])
49
- }
50
- static _colorButtonTertiary(): string {
51
- return m.colors(['#3E50B4', '#3E50B4'])
52
- }
53
- static _colorButtonTextTertiary(): string {
54
- return m.colors(['white', 'white'])
55
- }
56
- static _colorBackgroundPrimary(): string {
57
- return m.colors(['white', '#202529'])
58
- }
59
- static _colorBackgroundSecondary(): string {
60
- return m.colors(['white', '#202529'])
61
- }
62
- static _colorBackgroundTertiary(): string {
63
- return m.colors(['white', '#202529'])
64
- }
65
- static _colorBackgroundCardPrimary(): string {
66
- return m.colors(['white', '#2B2F38'])
67
- }
68
- static _colorBackgroundCardSecondary(): string {
69
- return m.colors(['white', '#2B2F38'])
70
- }
71
- static _colorBackgroundCardTertiary(): string {
72
- return m.colors(['white', '#2B2F38'])
73
- }
74
- static _colorTextPrimary(): string {
75
- return m.colors(['#353535', 'white'])
76
- }
77
- static _colorTextSecondary(): string {
78
- return m.colors(['#666666', 'white'])
79
- }
80
- static _colorTextTertiary(): string {
81
- return m.colors(['#999999', 'white'])
82
- }
83
-
84
- static colors(colors: string[]): string {
18
+ },
19
+ _barStyle(): string {
20
+ return this.colors(['dark', 'light'])
21
+ },
22
+ _colorPrimary(): string {
23
+ return this.colors([colorPrimary, colorPrimary])
24
+ },
25
+ _colorAccent(): string {
26
+ return this.colors([colorAccent, colorAccent])
27
+ },
28
+ _colorHeader(): string {
29
+ return this.colors(['#3E50B4', '#292B37'])
30
+ },
31
+ _colorHeaderText(): string {
32
+ return this.colors(['white', 'white'])
33
+ },
34
+ _colorButtonPrimary(): string {
35
+ return this.colors(['#3E50B4', '#3E50B4'])
36
+ },
37
+ _colorButtonTextPrimary(): string {
38
+ return this.colors(['white', 'white'])
39
+ },
40
+ _colorButtonSecondary(): string {
41
+ return this.colors(['#3E50B4', '#3E50B4'])
42
+ },
43
+ _colorButtonTextSecondary(): string {
44
+ return this.colors(['white', 'white'])
45
+ },
46
+ _colorButtonTertiary(): string {
47
+ return this.colors(['#3E50B4', '#3E50B4'])
48
+ },
49
+ _colorButtonTextTertiary(): string {
50
+ return this.colors(['white', 'white'])
51
+ },
52
+ _colorBackgroundPrimary(): string {
53
+ return this.colors(['white', '#202529'])
54
+ },
55
+ _colorBackgroundSecondary(): string {
56
+ return this.colors(['white', '#202529'])
57
+ },
58
+ _colorBackgroundTertiary(): string {
59
+ return this.colors(['white', '#202529'])
60
+ },
61
+ _colorBackgroundCardPrimary(): string {
62
+ return this.colors(['white', '#2B2F38'])
63
+ },
64
+ _colorBackgroundCardSecondary(): string {
65
+ return this.colors(['white', '#2B2F38'])
66
+ },
67
+ _colorBackgroundCardTertiary(): string {
68
+ return this.colors(['white', '#2B2F38'])
69
+ },
70
+ _colorTextPrimary(): string {
71
+ return this.colors(['#353535', 'white'])
72
+ },
73
+ _colorTextSecondary(): string {
74
+ return this.colors(['#666666', 'white'])
75
+ },
76
+ _colorTextTertiary(): string {
77
+ return this.colors(['#999999', 'white'])
78
+ },
79
+ colors(colors: string[]): string {
85
80
  const _themeName = state.get().theme
86
81
  const _themes: string[] = esp.config('theme');
87
82
  const _themeIndex = _themes.indexOf(_themeName);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay",
3
- "version": "0.0.131-a",
3
+ "version": "0.0.131-b",
4
4
  "description": "embedding data from esoftplay framework (web based) into mobile app",
5
5
  "main": "cache/index.js",
6
6
  "types": "../../index.d.ts",