@testgorilla/tgo-typing-test 1.0.0 → 2.0.0
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.
- package/.eslintrc.json +46 -0
- package/jest.config.ts +21 -0
- package/ng-package.json +15 -0
- package/package.json +7 -22
- package/project.json +36 -0
- package/src/lib/components/tgo-typing-replay-input/tgo-typing-replay-input.component.html +30 -0
- package/src/lib/components/tgo-typing-replay-input/tgo-typing-replay-input.component.spec.ts +250 -0
- package/src/lib/components/tgo-typing-replay-input/tgo-typing-replay-input.component.ts +47 -0
- package/src/lib/components/tgo-typing-test/tgo-typing-test.component.html +72 -0
- package/src/lib/components/tgo-typing-test/tgo-typing-test.component.spec.ts +699 -0
- package/src/lib/components/tgo-typing-test/tgo-typing-test.component.ts +287 -0
- package/src/lib/helpers/config.ts +28 -0
- package/src/lib/helpers/constants/default-config.ts +103 -0
- package/src/lib/helpers/controllers/input-controller.ts +710 -0
- package/src/lib/helpers/controllers/quotes-controller.ts +183 -0
- package/src/lib/helpers/observables/banner-event.ts +18 -0
- package/src/lib/helpers/observables/config-event.ts +31 -0
- package/src/lib/helpers/observables/timer-event.ts +18 -0
- package/src/lib/helpers/states/active-page.ts +9 -0
- package/src/lib/helpers/states/composition.ts +29 -0
- package/src/lib/helpers/states/page-transition.ts +9 -0
- package/src/lib/helpers/states/slow-timer.ts +16 -0
- package/src/lib/helpers/states/test-active.ts +9 -0
- package/src/lib/helpers/states/time.ts +13 -0
- package/src/lib/helpers/test/caps-warning.ts +50 -0
- package/src/lib/helpers/test/caret.ts +92 -0
- package/src/lib/helpers/test/custom-text.ts +73 -0
- package/src/lib/helpers/test/english-punctuation.ts +38 -0
- package/src/lib/helpers/test/focus.ts +39 -0
- package/src/lib/helpers/test/manual-restart-tracker.ts +13 -0
- package/src/lib/helpers/test/out-of-focus.ts +19 -0
- package/src/lib/helpers/test/replay.ts +265 -0
- package/src/lib/helpers/test/test-input.ts +320 -0
- package/src/lib/helpers/test/test-logic.ts +1039 -0
- package/src/lib/helpers/test/test-state.ts +17 -0
- package/src/lib/helpers/test/test-stats.ts +442 -0
- package/src/lib/helpers/test/test-timer.ts +209 -0
- package/src/lib/helpers/test/test-ui.ts +370 -0
- package/src/lib/helpers/test/test-words.ts +72 -0
- package/src/lib/helpers/test/timer-progress.ts +16 -0
- package/src/lib/helpers/test/tts.ts +42 -0
- package/src/lib/helpers/test/weak-spot.ts +74 -0
- package/src/lib/helpers/test/wordset.ts +109 -0
- package/src/lib/styles/animations.scss +101 -0
- package/src/lib/styles/caret.scss +108 -0
- package/src/lib/styles/core.scss +498 -0
- package/src/lib/styles/index.scss +19 -0
- package/src/lib/styles/inputs.scss +290 -0
- package/src/lib/styles/popups.scss +1311 -0
- package/src/lib/styles/test.scss +1008 -0
- package/src/lib/styles/z_media-queries.scss +848 -0
- package/src/lib/types/types.d.ts +731 -0
- package/src/lib/utils/misc.ts +776 -0
- package/src/test-setup.ts +20 -0
- package/tsconfig.json +16 -0
- package/tsconfig.lib.json +14 -0
- package/tsconfig.lib.prod.json +9 -0
- package/tsconfig.spec.json +11 -0
- package/esm2022/index.mjs +0 -3
- package/esm2022/lib/components/tgo-typing-replay-input/tgo-typing-replay-input.component.mjs +0 -45
- package/esm2022/lib/components/tgo-typing-test/tgo-typing-test.component.mjs +0 -299
- package/esm2022/lib/helpers/config.mjs +0 -24
- package/esm2022/lib/helpers/constants/default-config.mjs +0 -103
- package/esm2022/lib/helpers/controllers/input-controller.mjs +0 -586
- package/esm2022/lib/helpers/controllers/quotes-controller.mjs +0 -118
- package/esm2022/lib/helpers/observables/config-event.mjs +0 -16
- package/esm2022/lib/helpers/observables/timer-event.mjs +0 -16
- package/esm2022/lib/helpers/states/active-page.mjs +0 -8
- package/esm2022/lib/helpers/states/composition.mjs +0 -20
- package/esm2022/lib/helpers/states/page-transition.mjs +0 -8
- package/esm2022/lib/helpers/states/slow-timer.mjs +0 -15
- package/esm2022/lib/helpers/states/test-active.mjs +0 -8
- package/esm2022/lib/helpers/states/time.mjs +0 -11
- package/esm2022/lib/helpers/test/caps-warning.mjs +0 -50
- package/esm2022/lib/helpers/test/caret.mjs +0 -80
- package/esm2022/lib/helpers/test/custom-text.mjs +0 -59
- package/esm2022/lib/helpers/test/english-punctuation.mjs +0 -29
- package/esm2022/lib/helpers/test/focus.mjs +0 -35
- package/esm2022/lib/helpers/test/manual-restart-tracker.mjs +0 -11
- package/esm2022/lib/helpers/test/out-of-focus.mjs +0 -14
- package/esm2022/lib/helpers/test/replay.mjs +0 -217
- package/esm2022/lib/helpers/test/test-input.mjs +0 -264
- package/esm2022/lib/helpers/test/test-logic.mjs +0 -927
- package/esm2022/lib/helpers/test/test-state.mjs +0 -13
- package/esm2022/lib/helpers/test/test-stats.mjs +0 -342
- package/esm2022/lib/helpers/test/test-timer.mjs +0 -207
- package/esm2022/lib/helpers/test/test-ui.mjs +0 -341
- package/esm2022/lib/helpers/test/test-words.mjs +0 -69
- package/esm2022/lib/helpers/test/timer-progress.mjs +0 -15
- package/esm2022/lib/helpers/test/weak-spot.mjs +0 -65
- package/esm2022/lib/helpers/test/wordset.mjs +0 -100
- package/esm2022/lib/utils/misc.mjs +0 -673
- package/esm2022/testgorilla-tgo-typing-test.mjs +0 -5
- package/fesm2022/testgorilla-tgo-typing-test.mjs +0 -4707
- package/fesm2022/testgorilla-tgo-typing-test.mjs.map +0 -1
- package/lib/components/tgo-typing-replay-input/tgo-typing-replay-input.component.d.ts +0 -14
- package/lib/components/tgo-typing-test/tgo-typing-test.component.d.ts +0 -54
- package/lib/helpers/config.d.ts +0 -98
- package/lib/helpers/constants/default-config.d.ts +0 -3
- package/lib/helpers/controllers/input-controller.d.ts +0 -16
- package/lib/helpers/controllers/quotes-controller.d.ts +0 -20
- package/lib/helpers/observables/config-event.d.ts +0 -5
- package/lib/helpers/observables/timer-event.d.ts +0 -4
- package/lib/helpers/states/active-page.d.ts +0 -2
- package/lib/helpers/states/composition.d.ts +0 -10
- package/lib/helpers/states/page-transition.d.ts +0 -2
- package/lib/helpers/states/slow-timer.d.ts +0 -3
- package/lib/helpers/states/test-active.d.ts +0 -2
- package/lib/helpers/states/time.d.ts +0 -3
- package/lib/helpers/test/caps-warning.d.ts +0 -5
- package/lib/helpers/test/caret.d.ts +0 -11
- package/lib/helpers/test/custom-text.d.ts +0 -16
- package/lib/helpers/test/english-punctuation.d.ts +0 -3
- package/lib/helpers/test/focus.d.ts +0 -7
- package/lib/helpers/test/manual-restart-tracker.d.ts +0 -3
- package/lib/helpers/test/out-of-focus.d.ts +0 -4
- package/lib/helpers/test/replay.d.ts +0 -20
- package/lib/helpers/test/test-input.d.ts +0 -86
- package/lib/helpers/test/test-logic.d.ts +0 -25
- package/lib/helpers/test/test-state.d.ts +0 -7
- package/lib/helpers/test/test-stats.d.ts +0 -92
- package/lib/helpers/test/test-timer.d.ts +0 -6
- package/lib/helpers/test/test-ui.d.ts +0 -27
- package/lib/helpers/test/test-words.d.ts +0 -23
- package/lib/helpers/test/timer-progress.d.ts +0 -3
- package/lib/helpers/test/weak-spot.d.ts +0 -3
- package/lib/helpers/test/wordset.d.ts +0 -7
- package/lib/utils/misc.d.ts +0 -81
- /package/{assets → src/assets}/typing-test-languages/english.json +0 -0
- /package/{assets → src/assets}/typing-test-languages/english_punctuation.json +0 -0
- /package/{assets → src/assets}/typing-test-languages/quotes/english_version_1.json +0 -0
- /package/{assets → src/assets}/typing-test-languages/quotes/english_version_2.json +0 -0
- /package/{assets → src/assets}/typing-test-languages/quotes/filtered_sources.json +0 -0
- /package/{index.d.ts → src/index.ts} +0 -0
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { animate, state, style, transition, trigger } from '@angular/animations';
|
|
2
|
+
import {
|
|
3
|
+
AfterViewInit,
|
|
4
|
+
Component,
|
|
5
|
+
ElementRef,
|
|
6
|
+
EventEmitter,
|
|
7
|
+
HostListener,
|
|
8
|
+
Input,
|
|
9
|
+
OnChanges,
|
|
10
|
+
OnDestroy,
|
|
11
|
+
OnInit,
|
|
12
|
+
Output,
|
|
13
|
+
SimpleChanges,
|
|
14
|
+
ViewChild,
|
|
15
|
+
} from '@angular/core';
|
|
16
|
+
import { BehaviorSubject, Observable, Subscription } from 'rxjs';
|
|
17
|
+
import {
|
|
18
|
+
setCustomTGQuotes,
|
|
19
|
+
setFunbox,
|
|
20
|
+
setNumbers,
|
|
21
|
+
setPunctuation,
|
|
22
|
+
setTestVersionForSentences,
|
|
23
|
+
setTime,
|
|
24
|
+
} from '../../helpers/config';
|
|
25
|
+
import {
|
|
26
|
+
inputKeydown,
|
|
27
|
+
setWordsInputElement,
|
|
28
|
+
wordsInputBeforeinput,
|
|
29
|
+
wordsInputCompositionend,
|
|
30
|
+
wordsInputCompositionstart,
|
|
31
|
+
wordsInputCopy,
|
|
32
|
+
wordsInputFocus,
|
|
33
|
+
wordsInputInput,
|
|
34
|
+
wordsInputKeyup,
|
|
35
|
+
wordsInputPaste,
|
|
36
|
+
} from '../../helpers/controllers/input-controller';
|
|
37
|
+
import { capsKeydown, capsKeyup, showCaps } from '../../helpers/test/caps-warning';
|
|
38
|
+
import { caretAnimation, caretLeft, caretShow, caretTop } from '../../helpers/test/caret';
|
|
39
|
+
import { mousemove, setCapsWarningElement, setMiddleElement } from '../../helpers/test/focus';
|
|
40
|
+
import { outOfFocusShow } from '../../helpers/test/out-of-focus';
|
|
41
|
+
import { getReplayExport } from '../../helpers/test/replay';
|
|
42
|
+
import * as TestLogic from '../../helpers/test/test-logic';
|
|
43
|
+
import * as TestUI from '../../helpers/test/test-ui';
|
|
44
|
+
import {
|
|
45
|
+
setWordsElement,
|
|
46
|
+
setWordsInputElementTestUI,
|
|
47
|
+
setWordsWrapperElement,
|
|
48
|
+
wordsInputFocusOut,
|
|
49
|
+
wordsInputFocusTestUI,
|
|
50
|
+
wordsWrapperClick,
|
|
51
|
+
} from '../../helpers/test/test-ui';
|
|
52
|
+
import { timeLeft } from '../../helpers/test/timer-progress';
|
|
53
|
+
import { QuoteNetworkError$ } from '../../utils/misc';
|
|
54
|
+
import * as TestActive from '../../helpers/states/test-active';
|
|
55
|
+
import quoteController from '../../helpers/controllers/quotes-controller';
|
|
56
|
+
import { disableCheckIfTimeIsUp } from '../../helpers/test/test-timer';
|
|
57
|
+
import { CommonModule } from '@angular/common';
|
|
58
|
+
|
|
59
|
+
@Component({
|
|
60
|
+
selector: 'tgo-typing-test',
|
|
61
|
+
imports: [CommonModule],
|
|
62
|
+
templateUrl: './tgo-typing-test.component.html',
|
|
63
|
+
styleUrl: '../../styles/index.scss',
|
|
64
|
+
animations: [
|
|
65
|
+
trigger('fadeIn', [
|
|
66
|
+
state('show', style({ opacity: 1 })),
|
|
67
|
+
state('hide', style({ opacity: 0 })),
|
|
68
|
+
transition('show => hide', [
|
|
69
|
+
animate('125ms')
|
|
70
|
+
]),
|
|
71
|
+
transition('hide => show', [
|
|
72
|
+
animate('125ms')
|
|
73
|
+
])
|
|
74
|
+
]),
|
|
75
|
+
trigger('updatePositionCaret', [
|
|
76
|
+
state('true', style({
|
|
77
|
+
top: '{{caretTopPos}}px',
|
|
78
|
+
left: '{{caretLeftPos}}px'
|
|
79
|
+
}), {
|
|
80
|
+
params: { caretTopPos: 0, caretLeftPos: 0 }
|
|
81
|
+
}),
|
|
82
|
+
state('false', style({
|
|
83
|
+
top: '{{caretTopPos}}px',
|
|
84
|
+
left: '{{caretLeftPos}}px'
|
|
85
|
+
}), {
|
|
86
|
+
params: { caretTopPos: 0, caretLeftPos: 0 }
|
|
87
|
+
}),
|
|
88
|
+
transition('true => false', [
|
|
89
|
+
animate('100ms')
|
|
90
|
+
]),
|
|
91
|
+
transition('false => true', [
|
|
92
|
+
animate('100ms')
|
|
93
|
+
])
|
|
94
|
+
])
|
|
95
|
+
]
|
|
96
|
+
})
|
|
97
|
+
export class TgoTypingTestComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {
|
|
98
|
+
showCaps$: BehaviorSubject<boolean>;
|
|
99
|
+
showCaret$: BehaviorSubject<boolean>;
|
|
100
|
+
caretAnimation$: BehaviorSubject<string>;
|
|
101
|
+
showTimer$: BehaviorSubject<boolean>;
|
|
102
|
+
timeLeft$: BehaviorSubject<string>;
|
|
103
|
+
caretLeft = 0;
|
|
104
|
+
caretTop = 0;
|
|
105
|
+
state = 'true';
|
|
106
|
+
outOfFocusShow$: BehaviorSubject<boolean>;
|
|
107
|
+
|
|
108
|
+
subscriptions: Subscription[] = [];
|
|
109
|
+
replayIntervalID: any;
|
|
110
|
+
|
|
111
|
+
@Output() resultEvent = new EventEmitter<any>();
|
|
112
|
+
@Output() replayExport = new EventEmitter<any>();
|
|
113
|
+
@Output() errorEvent = new EventEmitter<string>();
|
|
114
|
+
|
|
115
|
+
@Input() time = 180;
|
|
116
|
+
@Input() punctuation = false;
|
|
117
|
+
@Input() numbers = false;
|
|
118
|
+
@Input() funbox = 'none';
|
|
119
|
+
@Input() customTGQuotes = false;
|
|
120
|
+
@Input() showMiniTimerAndLiveWpm = true;
|
|
121
|
+
@Input() restartTest = false;
|
|
122
|
+
@Input() testVersion = 1;
|
|
123
|
+
@Input() testExpiration$?: Observable<void>;
|
|
124
|
+
|
|
125
|
+
constructor() {
|
|
126
|
+
this.showCaps$ = showCaps;
|
|
127
|
+
this.showCaret$ = caretShow;
|
|
128
|
+
this.caretAnimation$ = caretAnimation;
|
|
129
|
+
this.showTimer$ = TestLogic.startTestSubject;
|
|
130
|
+
this.outOfFocusShow$ = outOfFocusShow;
|
|
131
|
+
this.timeLeft$ = timeLeft;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@ViewChild('wordsInput') wordsInput!: ElementRef;
|
|
135
|
+
@ViewChild('wordsWrapper') wordsWrapper!: ElementRef;
|
|
136
|
+
@ViewChild('words') words!: ElementRef;
|
|
137
|
+
@ViewChild('middle') middle!: ElementRef;
|
|
138
|
+
@ViewChild('capsWarning') capsWarning!: ElementRef;
|
|
139
|
+
|
|
140
|
+
ngOnInit() {
|
|
141
|
+
TestUI.setResultCalculating(false);
|
|
142
|
+
TestUI.setResultVisible(false);
|
|
143
|
+
this.caretLeft = 0;
|
|
144
|
+
this.caretTop = 0;
|
|
145
|
+
setTime(this.time);
|
|
146
|
+
setPunctuation(this.punctuation);
|
|
147
|
+
setNumbers(this.numbers);
|
|
148
|
+
setFunbox(this.funbox);
|
|
149
|
+
setCustomTGQuotes(this.customTGQuotes);
|
|
150
|
+
setTestVersionForSentences(this.testVersion);
|
|
151
|
+
const caretLeftSub = caretLeft.subscribe(res => {
|
|
152
|
+
if (res !== this.caretLeft) {
|
|
153
|
+
this.caretLeft = res;
|
|
154
|
+
if (this.state == 'true') {
|
|
155
|
+
this.state = 'false';
|
|
156
|
+
} else {
|
|
157
|
+
this.state = 'true';
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
const caretTopSub = caretTop.subscribe(res => {
|
|
163
|
+
this.caretTop = res;
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
const testResultSub = TestLogic.resultSub.subscribe(res => {
|
|
167
|
+
this.replayExport.emit(getReplayExport());
|
|
168
|
+
this.resultEvent.emit(res);
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
const errorSub = QuoteNetworkError$.subscribe({
|
|
172
|
+
next: e => {
|
|
173
|
+
if (!e) return;
|
|
174
|
+
this.errorEvent.emit(e);
|
|
175
|
+
TestLogic.stopTest();
|
|
176
|
+
},
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
this.replayIntervalID = setInterval(() => {
|
|
180
|
+
this.replayExport.emit(getReplayExport());
|
|
181
|
+
}, 20000);
|
|
182
|
+
|
|
183
|
+
this.subscriptions.push(caretLeftSub, caretTopSub, testResultSub, errorSub);
|
|
184
|
+
|
|
185
|
+
if (this.testExpiration$) {
|
|
186
|
+
disableCheckIfTimeIsUp();
|
|
187
|
+
this.subscriptions.push(
|
|
188
|
+
this.testExpiration$.subscribe(() => {
|
|
189
|
+
TestLogic.finish();
|
|
190
|
+
})
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
ngOnChanges(changes: SimpleChanges) {
|
|
196
|
+
if (changes['restartTest']) {
|
|
197
|
+
if (!changes['restartTest'].isFirstChange()) {
|
|
198
|
+
this.restart();
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
wordsInputKeyup(event: any) {
|
|
204
|
+
wordsInputKeyup(event);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
wordsInputBeforeinput(event: any) {
|
|
208
|
+
wordsInputBeforeinput(event);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
wordsInputInput(event: any) {
|
|
212
|
+
wordsInputInput(event);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
wordsInputFocus(event: any) {
|
|
216
|
+
if (!TestActive.get()) return;
|
|
217
|
+
wordsInputFocus(event);
|
|
218
|
+
wordsInputFocusTestUI();
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
wordsInputFocusOut() {
|
|
222
|
+
if (!TestActive.get()) return;
|
|
223
|
+
wordsInputFocusOut();
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
wordsInputCopy(event: any) {
|
|
227
|
+
wordsInputCopy(event);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
wordsInputPaste(event: any) {
|
|
231
|
+
wordsInputPaste(event);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
wordsInputCompositionstart() {
|
|
235
|
+
wordsInputCompositionstart();
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
wordsInputCompositionend() {
|
|
239
|
+
wordsInputCompositionend();
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
wordsWrapperClick() {
|
|
243
|
+
wordsWrapperClick();
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
ngAfterViewInit() {
|
|
247
|
+
setWordsInputElement(this.wordsInput.nativeElement);
|
|
248
|
+
setWordsInputElementTestUI(this.wordsInput.nativeElement);
|
|
249
|
+
TestLogic.setWordsInputElementTestLogic(this.wordsInput.nativeElement);
|
|
250
|
+
setWordsWrapperElement(this.wordsWrapper.nativeElement);
|
|
251
|
+
setWordsElement(this.words.nativeElement);
|
|
252
|
+
setMiddleElement(this.middle.nativeElement);
|
|
253
|
+
setCapsWarningElement(this.capsWarning.nativeElement);
|
|
254
|
+
TestLogic.restart();
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
restart() {
|
|
258
|
+
TestUI.setResultCalculating(false);
|
|
259
|
+
TestUI.setResultVisible(false);
|
|
260
|
+
this.caretLeft = 0;
|
|
261
|
+
this.caretTop = 0;
|
|
262
|
+
TestLogic.restart();
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
@HostListener('document:keydown', ['$event'])
|
|
266
|
+
handleKeyboardDown(event: KeyboardEvent) {
|
|
267
|
+
capsKeydown(event);
|
|
268
|
+
inputKeydown(event, document.activeElement === this.wordsInput.nativeElement);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
@HostListener('document:keyup', ['$event'])
|
|
272
|
+
handleKeyboardUp(event: KeyboardEvent) {
|
|
273
|
+
capsKeyup(event);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
@HostListener('document:mousemove', ['$event'])
|
|
277
|
+
handleMouseMove(event: MouseEvent) {
|
|
278
|
+
mousemove(event);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
ngOnDestroy(): void {
|
|
282
|
+
TestLogic.stopTest();
|
|
283
|
+
quoteController.resetQuotes();
|
|
284
|
+
clearInterval(this.replayIntervalID);
|
|
285
|
+
this.subscriptions.forEach(sub => sub.unsubscribe());
|
|
286
|
+
}
|
|
287
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import DefaultConfig from "./constants/default-config";
|
|
2
|
+
const config = {
|
|
3
|
+
...DefaultConfig,
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
export function setNumbers(numb: boolean) {
|
|
7
|
+
config.numbers = numb;
|
|
8
|
+
}
|
|
9
|
+
export function setPunctuation(punc: boolean) {
|
|
10
|
+
config.punctuation = punc;
|
|
11
|
+
}
|
|
12
|
+
export function setTime(time: number) {
|
|
13
|
+
config.time = time;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function setFunbox(funbox: string) {
|
|
17
|
+
config.funbox = funbox;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function setCustomTGQuotes(customTGQuotes: boolean) {
|
|
21
|
+
config.customTGQuotes = customTGQuotes;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function setTestVersionForSentences(testVersion: number) {
|
|
25
|
+
config.testVersion = testVersion;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default config;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { MonkeyTypes } from '../../types/types';
|
|
2
|
+
export default <MonkeyTypes.Config>{
|
|
3
|
+
theme: 'serika_dark',
|
|
4
|
+
themeLight: 'serika',
|
|
5
|
+
themeDark: 'serika_dark',
|
|
6
|
+
autoSwitchTheme: false,
|
|
7
|
+
customTheme: false,
|
|
8
|
+
customThemeColors: [
|
|
9
|
+
'#323437',
|
|
10
|
+
'#e2b714',
|
|
11
|
+
'#e2b714',
|
|
12
|
+
'#646669',
|
|
13
|
+
'#2c2e31',
|
|
14
|
+
'#d1d0c5',
|
|
15
|
+
'#ca4754',
|
|
16
|
+
'#7e2a33',
|
|
17
|
+
'#ca4754',
|
|
18
|
+
'#7e2a33',
|
|
19
|
+
],
|
|
20
|
+
favThemes: [],
|
|
21
|
+
showKeyTips: true,
|
|
22
|
+
showLiveWpm: false,
|
|
23
|
+
showTimerProgress: true,
|
|
24
|
+
smoothCaret: true,
|
|
25
|
+
quickRestart: 'off',
|
|
26
|
+
punctuation: false,
|
|
27
|
+
numbers: false,
|
|
28
|
+
words: 50,
|
|
29
|
+
time: 15,
|
|
30
|
+
mode: 'time',
|
|
31
|
+
quoteLength: [2],
|
|
32
|
+
language: 'english',
|
|
33
|
+
fontSize: '15',
|
|
34
|
+
freedomMode: false,
|
|
35
|
+
resultFilters: null,
|
|
36
|
+
difficulty: 'normal',
|
|
37
|
+
blindMode: false,
|
|
38
|
+
quickEnd: false,
|
|
39
|
+
caretStyle: 'default',
|
|
40
|
+
paceCaretStyle: 'default',
|
|
41
|
+
flipTestColors: false,
|
|
42
|
+
layout: 'default',
|
|
43
|
+
funbox: 'none',
|
|
44
|
+
confidenceMode: 'on',
|
|
45
|
+
indicateTypos: 'below',
|
|
46
|
+
timerStyle: 'mini',
|
|
47
|
+
colorfulMode: false,
|
|
48
|
+
randomTheme: 'off',
|
|
49
|
+
timerColor: 'main',
|
|
50
|
+
timerOpacity: '1',
|
|
51
|
+
stopOnError: 'off',
|
|
52
|
+
showAllLines: false,
|
|
53
|
+
keymapMode: 'off',
|
|
54
|
+
keymapStyle: 'staggered',
|
|
55
|
+
keymapLegendStyle: 'lowercase',
|
|
56
|
+
keymapLayout: 'overrideSync',
|
|
57
|
+
keymapShowTopRow: 'layout',
|
|
58
|
+
fontFamily: 'Roboto_Mono',
|
|
59
|
+
smoothLineScroll: false,
|
|
60
|
+
alwaysShowDecimalPlaces: false,
|
|
61
|
+
alwaysShowWordsHistory: false,
|
|
62
|
+
singleListCommandLine: 'manual',
|
|
63
|
+
capsLockWarning: true,
|
|
64
|
+
playSoundOnError: false,
|
|
65
|
+
playSoundOnClick: 'off',
|
|
66
|
+
soundVolume: '0.5',
|
|
67
|
+
startGraphsAtZero: true,
|
|
68
|
+
showOutOfFocusWarning: true,
|
|
69
|
+
paceCaret: 'off',
|
|
70
|
+
paceCaretCustomSpeed: 100,
|
|
71
|
+
repeatedPace: true,
|
|
72
|
+
pageWidth: '125',
|
|
73
|
+
chartAccuracy: true,
|
|
74
|
+
chartStyle: 'line',
|
|
75
|
+
minWpm: 'off',
|
|
76
|
+
minWpmCustomSpeed: 100,
|
|
77
|
+
highlightMode: 'letter',
|
|
78
|
+
alwaysShowCPM: false,
|
|
79
|
+
ads: 'result',
|
|
80
|
+
hideExtraLetters: false,
|
|
81
|
+
strictSpace: false,
|
|
82
|
+
minAcc: 'off',
|
|
83
|
+
minAccCustom: 90,
|
|
84
|
+
showLiveAcc: false,
|
|
85
|
+
showLiveBurst: false,
|
|
86
|
+
monkey: false,
|
|
87
|
+
repeatQuotes: 'off',
|
|
88
|
+
oppositeShiftMode: 'off',
|
|
89
|
+
customBackground: '',
|
|
90
|
+
customBackgroundSize: 'cover',
|
|
91
|
+
customBackgroundFilter: [0, 1, 1, 1, 1],
|
|
92
|
+
customLayoutfluid: 'qwerty#dvorak#colemak',
|
|
93
|
+
monkeyPowerLevel: 'off',
|
|
94
|
+
minBurst: 'off',
|
|
95
|
+
minBurstCustomSpeed: 100,
|
|
96
|
+
burstHeatmap: false,
|
|
97
|
+
britishEnglish: false,
|
|
98
|
+
lazyMode: false,
|
|
99
|
+
showAverage: 'off',
|
|
100
|
+
tapeMode: 'off',
|
|
101
|
+
customTGQuotes: false,
|
|
102
|
+
testVersion: 1,
|
|
103
|
+
};
|