@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.
Files changed (134) hide show
  1. package/.eslintrc.json +46 -0
  2. package/jest.config.ts +21 -0
  3. package/ng-package.json +15 -0
  4. package/package.json +7 -22
  5. package/project.json +36 -0
  6. package/src/lib/components/tgo-typing-replay-input/tgo-typing-replay-input.component.html +30 -0
  7. package/src/lib/components/tgo-typing-replay-input/tgo-typing-replay-input.component.spec.ts +250 -0
  8. package/src/lib/components/tgo-typing-replay-input/tgo-typing-replay-input.component.ts +47 -0
  9. package/src/lib/components/tgo-typing-test/tgo-typing-test.component.html +72 -0
  10. package/src/lib/components/tgo-typing-test/tgo-typing-test.component.spec.ts +699 -0
  11. package/src/lib/components/tgo-typing-test/tgo-typing-test.component.ts +287 -0
  12. package/src/lib/helpers/config.ts +28 -0
  13. package/src/lib/helpers/constants/default-config.ts +103 -0
  14. package/src/lib/helpers/controllers/input-controller.ts +710 -0
  15. package/src/lib/helpers/controllers/quotes-controller.ts +183 -0
  16. package/src/lib/helpers/observables/banner-event.ts +18 -0
  17. package/src/lib/helpers/observables/config-event.ts +31 -0
  18. package/src/lib/helpers/observables/timer-event.ts +18 -0
  19. package/src/lib/helpers/states/active-page.ts +9 -0
  20. package/src/lib/helpers/states/composition.ts +29 -0
  21. package/src/lib/helpers/states/page-transition.ts +9 -0
  22. package/src/lib/helpers/states/slow-timer.ts +16 -0
  23. package/src/lib/helpers/states/test-active.ts +9 -0
  24. package/src/lib/helpers/states/time.ts +13 -0
  25. package/src/lib/helpers/test/caps-warning.ts +50 -0
  26. package/src/lib/helpers/test/caret.ts +92 -0
  27. package/src/lib/helpers/test/custom-text.ts +73 -0
  28. package/src/lib/helpers/test/english-punctuation.ts +38 -0
  29. package/src/lib/helpers/test/focus.ts +39 -0
  30. package/src/lib/helpers/test/manual-restart-tracker.ts +13 -0
  31. package/src/lib/helpers/test/out-of-focus.ts +19 -0
  32. package/src/lib/helpers/test/replay.ts +265 -0
  33. package/src/lib/helpers/test/test-input.ts +320 -0
  34. package/src/lib/helpers/test/test-logic.ts +1039 -0
  35. package/src/lib/helpers/test/test-state.ts +17 -0
  36. package/src/lib/helpers/test/test-stats.ts +442 -0
  37. package/src/lib/helpers/test/test-timer.ts +209 -0
  38. package/src/lib/helpers/test/test-ui.ts +370 -0
  39. package/src/lib/helpers/test/test-words.ts +72 -0
  40. package/src/lib/helpers/test/timer-progress.ts +16 -0
  41. package/src/lib/helpers/test/tts.ts +42 -0
  42. package/src/lib/helpers/test/weak-spot.ts +74 -0
  43. package/src/lib/helpers/test/wordset.ts +109 -0
  44. package/src/lib/styles/animations.scss +101 -0
  45. package/src/lib/styles/caret.scss +108 -0
  46. package/src/lib/styles/core.scss +498 -0
  47. package/src/lib/styles/index.scss +19 -0
  48. package/src/lib/styles/inputs.scss +290 -0
  49. package/src/lib/styles/popups.scss +1311 -0
  50. package/src/lib/styles/test.scss +1008 -0
  51. package/src/lib/styles/z_media-queries.scss +848 -0
  52. package/src/lib/types/types.d.ts +731 -0
  53. package/src/lib/utils/misc.ts +776 -0
  54. package/src/test-setup.ts +20 -0
  55. package/tsconfig.json +16 -0
  56. package/tsconfig.lib.json +14 -0
  57. package/tsconfig.lib.prod.json +9 -0
  58. package/tsconfig.spec.json +11 -0
  59. package/esm2022/index.mjs +0 -3
  60. package/esm2022/lib/components/tgo-typing-replay-input/tgo-typing-replay-input.component.mjs +0 -45
  61. package/esm2022/lib/components/tgo-typing-test/tgo-typing-test.component.mjs +0 -299
  62. package/esm2022/lib/helpers/config.mjs +0 -24
  63. package/esm2022/lib/helpers/constants/default-config.mjs +0 -103
  64. package/esm2022/lib/helpers/controllers/input-controller.mjs +0 -586
  65. package/esm2022/lib/helpers/controllers/quotes-controller.mjs +0 -118
  66. package/esm2022/lib/helpers/observables/config-event.mjs +0 -16
  67. package/esm2022/lib/helpers/observables/timer-event.mjs +0 -16
  68. package/esm2022/lib/helpers/states/active-page.mjs +0 -8
  69. package/esm2022/lib/helpers/states/composition.mjs +0 -20
  70. package/esm2022/lib/helpers/states/page-transition.mjs +0 -8
  71. package/esm2022/lib/helpers/states/slow-timer.mjs +0 -15
  72. package/esm2022/lib/helpers/states/test-active.mjs +0 -8
  73. package/esm2022/lib/helpers/states/time.mjs +0 -11
  74. package/esm2022/lib/helpers/test/caps-warning.mjs +0 -50
  75. package/esm2022/lib/helpers/test/caret.mjs +0 -80
  76. package/esm2022/lib/helpers/test/custom-text.mjs +0 -59
  77. package/esm2022/lib/helpers/test/english-punctuation.mjs +0 -29
  78. package/esm2022/lib/helpers/test/focus.mjs +0 -35
  79. package/esm2022/lib/helpers/test/manual-restart-tracker.mjs +0 -11
  80. package/esm2022/lib/helpers/test/out-of-focus.mjs +0 -14
  81. package/esm2022/lib/helpers/test/replay.mjs +0 -217
  82. package/esm2022/lib/helpers/test/test-input.mjs +0 -264
  83. package/esm2022/lib/helpers/test/test-logic.mjs +0 -927
  84. package/esm2022/lib/helpers/test/test-state.mjs +0 -13
  85. package/esm2022/lib/helpers/test/test-stats.mjs +0 -342
  86. package/esm2022/lib/helpers/test/test-timer.mjs +0 -207
  87. package/esm2022/lib/helpers/test/test-ui.mjs +0 -341
  88. package/esm2022/lib/helpers/test/test-words.mjs +0 -69
  89. package/esm2022/lib/helpers/test/timer-progress.mjs +0 -15
  90. package/esm2022/lib/helpers/test/weak-spot.mjs +0 -65
  91. package/esm2022/lib/helpers/test/wordset.mjs +0 -100
  92. package/esm2022/lib/utils/misc.mjs +0 -673
  93. package/esm2022/testgorilla-tgo-typing-test.mjs +0 -5
  94. package/fesm2022/testgorilla-tgo-typing-test.mjs +0 -4707
  95. package/fesm2022/testgorilla-tgo-typing-test.mjs.map +0 -1
  96. package/lib/components/tgo-typing-replay-input/tgo-typing-replay-input.component.d.ts +0 -14
  97. package/lib/components/tgo-typing-test/tgo-typing-test.component.d.ts +0 -54
  98. package/lib/helpers/config.d.ts +0 -98
  99. package/lib/helpers/constants/default-config.d.ts +0 -3
  100. package/lib/helpers/controllers/input-controller.d.ts +0 -16
  101. package/lib/helpers/controllers/quotes-controller.d.ts +0 -20
  102. package/lib/helpers/observables/config-event.d.ts +0 -5
  103. package/lib/helpers/observables/timer-event.d.ts +0 -4
  104. package/lib/helpers/states/active-page.d.ts +0 -2
  105. package/lib/helpers/states/composition.d.ts +0 -10
  106. package/lib/helpers/states/page-transition.d.ts +0 -2
  107. package/lib/helpers/states/slow-timer.d.ts +0 -3
  108. package/lib/helpers/states/test-active.d.ts +0 -2
  109. package/lib/helpers/states/time.d.ts +0 -3
  110. package/lib/helpers/test/caps-warning.d.ts +0 -5
  111. package/lib/helpers/test/caret.d.ts +0 -11
  112. package/lib/helpers/test/custom-text.d.ts +0 -16
  113. package/lib/helpers/test/english-punctuation.d.ts +0 -3
  114. package/lib/helpers/test/focus.d.ts +0 -7
  115. package/lib/helpers/test/manual-restart-tracker.d.ts +0 -3
  116. package/lib/helpers/test/out-of-focus.d.ts +0 -4
  117. package/lib/helpers/test/replay.d.ts +0 -20
  118. package/lib/helpers/test/test-input.d.ts +0 -86
  119. package/lib/helpers/test/test-logic.d.ts +0 -25
  120. package/lib/helpers/test/test-state.d.ts +0 -7
  121. package/lib/helpers/test/test-stats.d.ts +0 -92
  122. package/lib/helpers/test/test-timer.d.ts +0 -6
  123. package/lib/helpers/test/test-ui.d.ts +0 -27
  124. package/lib/helpers/test/test-words.d.ts +0 -23
  125. package/lib/helpers/test/timer-progress.d.ts +0 -3
  126. package/lib/helpers/test/weak-spot.d.ts +0 -3
  127. package/lib/helpers/test/wordset.d.ts +0 -7
  128. package/lib/utils/misc.d.ts +0 -81
  129. /package/{assets → src/assets}/typing-test-languages/english.json +0 -0
  130. /package/{assets → src/assets}/typing-test-languages/english_punctuation.json +0 -0
  131. /package/{assets → src/assets}/typing-test-languages/quotes/english_version_1.json +0 -0
  132. /package/{assets → src/assets}/typing-test-languages/quotes/english_version_2.json +0 -0
  133. /package/{assets → src/assets}/typing-test-languages/quotes/filtered_sources.json +0 -0
  134. /package/{index.d.ts → src/index.ts} +0 -0
@@ -0,0 +1,1008 @@
1
+ ::ng-deep {
2
+ #timerWrapper {
3
+ opacity: 0;
4
+ transition: 0.25s;
5
+ z-index: -1;
6
+ position: relative;
7
+ z-index: 99;
8
+ #timer {
9
+ position: fixed;
10
+ top: 0;
11
+ left: 0;
12
+ width: 100vw;
13
+ height: 0.5rem;
14
+ background: black;
15
+ z-index: -1;
16
+
17
+ &.timerMain {
18
+ background: $--main-color;
19
+ }
20
+
21
+ &.timerSub {
22
+ background: $--sub-color;
23
+ }
24
+
25
+ &.timerText {
26
+ background: $--text-color;
27
+ }
28
+ }
29
+ }
30
+
31
+ .pageTest {
32
+ position: relative;
33
+
34
+ .ssWatermark {
35
+ font-size: 1.25rem;
36
+ color: $--sub-color;
37
+ line-height: 1rem;
38
+ text-align: right;
39
+ }
40
+
41
+ #timerNumber {
42
+ pointer-events: none;
43
+ transition: 0.25s;
44
+ height: 0;
45
+ color: black;
46
+ line-height: 0;
47
+ z-index: -1;
48
+ text-align: center;
49
+ left: 0;
50
+ width: 100%;
51
+ position: relative;
52
+ font-size: 10rem;
53
+ opacity: 0;
54
+ width: 0;
55
+ height: 0;
56
+ margin: 0 auto;
57
+ display: grid;
58
+ justify-content: center;
59
+ bottom: 6rem;
60
+ transition: none;
61
+ }
62
+
63
+ #largeLiveWpmAndAcc {
64
+ font-size: 10rem;
65
+ color: black;
66
+ width: 100%;
67
+ left: 0;
68
+ text-align: center;
69
+ z-index: -1;
70
+ height: 0;
71
+ line-height: 0;
72
+ top: 5rem;
73
+ position: relative;
74
+ display: grid;
75
+ grid-auto-flow: column;
76
+ justify-content: center;
77
+ gap: 5rem;
78
+ width: 0;
79
+ margin: 0 auto;
80
+
81
+ #liveWpm {
82
+ opacity: 0;
83
+ }
84
+
85
+ #liveAcc {
86
+ opacity: 0;
87
+ }
88
+
89
+ #liveBurst {
90
+ opacity: 0;
91
+ }
92
+ }
93
+
94
+ #largeLiveWpmAndAcc.timerMain,
95
+ #timerNumber.timerMain {
96
+ color: $--main-color;
97
+ }
98
+
99
+ #timer.timerMain {
100
+ background: $--main-color;
101
+ }
102
+
103
+ #largeLiveWpmAndAcc.timerSub,
104
+ #timerNumber.timerSub {
105
+ color: $--sub-color;
106
+ }
107
+
108
+ #timer.timerSub {
109
+ background: $--sub-color;
110
+ }
111
+
112
+ #largeLiveWpmAndAcc.timerText,
113
+ #timerNumber.timerText {
114
+ color: $--text-color;
115
+ }
116
+
117
+ #timer.timerText {
118
+ background: $--text-color;
119
+ }
120
+ }
121
+
122
+ #words, .words {
123
+ height: fit-content;
124
+ height: -moz-fit-content;
125
+ display: flex;
126
+ flex-wrap: wrap;
127
+ width: 100%;
128
+ align-content: flex-start;
129
+ user-select: none;
130
+ padding-bottom: 1em;
131
+
132
+ .newline {
133
+ width: inherit;
134
+ }
135
+
136
+ letter {
137
+ border-bottom-style: solid;
138
+ border-bottom-width: 0.05em;
139
+ border-bottom-color: transparent;
140
+ &.dead {
141
+ border-bottom-width: 0.05em;
142
+ border-bottom-color: $--sub-color;
143
+ }
144
+ &.tabChar,
145
+ &.nlChar {
146
+ margin: 0 0.25rem;
147
+ opacity: 0.2;
148
+ }
149
+ }
150
+
151
+ /* a little hack for right-to-left languages */
152
+ &.rightToLeftTest {
153
+ direction: rtl;
154
+ .word {
155
+ direction: rtl;
156
+ }
157
+ }
158
+ &.withLigatures {
159
+ letter {
160
+ display: inline;
161
+ }
162
+ }
163
+ &.blurred {
164
+ opacity: 0.25;
165
+ filter: blur(4px);
166
+ -webkit-filter: blur(4px);
167
+ }
168
+
169
+ &.flipped {
170
+ .word {
171
+ color: $--text-color;
172
+
173
+ & letter.dead {
174
+ border-bottom-color: $--sub-color !important;
175
+ }
176
+
177
+ & letter.correct {
178
+ color: $--sub-color;
179
+ }
180
+
181
+ & letter.corrected {
182
+ color: $--sub-color;
183
+ border-bottom: 2px dotted $--main-color;
184
+ }
185
+
186
+ & letter.extraCorrected {
187
+ border-right: 2px dotted $--main-color;
188
+ }
189
+ }
190
+ }
191
+
192
+ &.colorfulMode {
193
+ .word {
194
+ & letter.dead {
195
+ border-bottom-color: $--main-color !important;
196
+ }
197
+
198
+ & letter.correct {
199
+ color: $--main-color;
200
+ }
201
+
202
+ & letter.corrected {
203
+ color: $--main-color;
204
+ border-bottom: 2px dotted $--text-color;
205
+ }
206
+
207
+ & letter.extraCorrected {
208
+ border-right: 2px dotted $--text-color;
209
+ }
210
+
211
+ & letter.incorrect {
212
+ color: $--colorful-error-color;
213
+ }
214
+
215
+ & letter.incorrect.extra {
216
+ color: $--colorful-error-extra-color;
217
+ }
218
+ }
219
+ }
220
+
221
+ &.flipped.colorfulMode {
222
+ .word {
223
+ color: $--main-color;
224
+
225
+ & letter.dead {
226
+ border-bottom-color: $--sub-color !important;
227
+ }
228
+
229
+ & letter.correct {
230
+ color: $--sub-color;
231
+ }
232
+
233
+ & letter.corrected {
234
+ color: $--sub-color;
235
+ border-bottom: 2px dotted $--main-color;
236
+ }
237
+
238
+ & letter.extraCorrected {
239
+ border-right: 2px dotted $--main-color;
240
+ }
241
+
242
+ & letter.incorrect {
243
+ color: $--colorful-error-color;
244
+ }
245
+
246
+ & letter.incorrect.extra {
247
+ color: $--colorful-error-extra-color;
248
+ }
249
+ }
250
+ }
251
+
252
+ &.tape {
253
+ &.size125 .word {
254
+ margin: 0.31rem 0.62rem 0.31rem 0;
255
+ }
256
+
257
+ &.size15 .word {
258
+ margin: 0.37rem 0.74rem 0.37rem 0;
259
+ }
260
+
261
+ &.size2 .word {
262
+ margin: 0.5rem 1rem 0.5rem 0;
263
+ }
264
+
265
+ &.size3 .word {
266
+ margin: 0.75rem 1.5rem 0.75rem 0;
267
+ }
268
+
269
+ &.size4 .word {
270
+ margin: 1rem 2rem 1rem 0;
271
+ }
272
+ }
273
+
274
+ &.tape.indicateTyposBelow {
275
+ &.size125 .word {
276
+ margin: 0.31rem 0.62rem 0.93rem 0;
277
+ }
278
+
279
+ &.size15 .word {
280
+ margin: 0.37rem 0.74rem 1.11rem 0;
281
+ }
282
+
283
+ &.size2 .word {
284
+ margin: 0.5rem 1rem 1.5rem 0;
285
+ }
286
+
287
+ &.size3 .word {
288
+ margin: 0.75rem 1.5rem 2.25rem 0;
289
+ }
290
+
291
+ &.size4 .word {
292
+ margin: 1rem 2rem 3rem 0;
293
+ }
294
+ }
295
+ }
296
+
297
+ .word {
298
+ margin: 0.25rem;
299
+ color: $--sub-color;
300
+ font-variant: no-common-ligatures;
301
+ border-bottom: 2px solid transparent;
302
+ line-height: 1rem;
303
+ letter {
304
+ display: inline-block;
305
+ }
306
+
307
+ &.lastbeforenewline::after {
308
+ font-family: "Font Awesome 5 Free";
309
+ font-weight: 600;
310
+ content: "\f107";
311
+ margin-left: 0.5rem;
312
+ opacity: 0.25;
313
+ }
314
+
315
+ .wordInputAfter {
316
+ opacity: 1;
317
+ position: absolute;
318
+ background: $--sub-color;
319
+ color: $--bg-color;
320
+ padding: 0.5rem;
321
+ margin-left: -0.5rem;
322
+ border-radius: $--roundness;
323
+ transition: 0.25s;
324
+ text-shadow: none;
325
+ top: -0.5rem;
326
+ z-index: 10;
327
+ cursor: text;
328
+ .speed {
329
+ font-size: 0.75rem;
330
+ }
331
+ }
332
+ }
333
+
334
+ #words.size125 .word {
335
+ line-height: 1.25rem;
336
+ font-size: max(1.25rem, 24px);
337
+ margin: 0.31rem;
338
+ }
339
+
340
+ #words.size15 .word {
341
+ line-height: 1.5rem;
342
+ font-size: max(1.5rem, 24px);
343
+ margin: 0.37rem;
344
+ }
345
+
346
+ #words.size2 .word {
347
+ line-height: 2rem;
348
+ font-size: max(2rem, 24px);
349
+ margin: 0.5rem;
350
+ }
351
+
352
+ #words.size3 .word {
353
+ line-height: 3rem;
354
+ font-size: max(3rem, 24px);
355
+ margin: 0.75rem;
356
+ }
357
+
358
+ #words.size4 .word {
359
+ line-height: 4rem;
360
+ font-size: max(4rem, 24px);
361
+ margin: 1rem;
362
+ }
363
+
364
+ #words.nospace {
365
+ .word {
366
+ margin: 0.5rem 0;
367
+ }
368
+ }
369
+
370
+ #words.arrows {
371
+ .word {
372
+ margin: 0.5rem 0;
373
+ letter {
374
+ margin: 0 0.25rem;
375
+ }
376
+ }
377
+ }
378
+
379
+ .word.error {
380
+ border-bottom: 2px solid $--error-color;
381
+ text-shadow: 1px 0px 0px $--bg-color,
382
+ -1px 0px 0px $--bg-color,
383
+ 0px 1px 0px $--bg-color,
384
+ 1px 1px 0px $--bg-color, -1px 1px 0px $--bg-color;
385
+ }
386
+
387
+ #words.noErrorBorder,
388
+ #resultWordsHistory.noErrorBorder {
389
+ .word.error {
390
+ text-shadow: none;
391
+ }
392
+ }
393
+
394
+ .word letter.correct {
395
+ color: $--text-color;
396
+ }
397
+
398
+ .word letter.corrected {
399
+ color: $--text-color;
400
+ border-bottom: 2px dotted $--main-color;
401
+ }
402
+
403
+ .word letter.extraCorrected {
404
+ border-right: 2px dotted $--main-color;
405
+ }
406
+
407
+ .word letter.incorrect {
408
+ color: $--error-color;
409
+ position: relative;
410
+ }
411
+
412
+ .word letter.incorrect hint {
413
+ position: absolute;
414
+ bottom: -1em;
415
+ color: $--text-color;
416
+ line-height: initial;
417
+ font-size: 0.75em;
418
+ text-shadow: none;
419
+ padding: 1px;
420
+ left: 0;
421
+ opacity: 0.5;
422
+ text-align: center;
423
+ width: 100%;
424
+ display: grid;
425
+ justify-content: center;
426
+ }
427
+
428
+ .word letter.incorrect.extra {
429
+ color: $--error-extra-color;
430
+ }
431
+
432
+ .word letter.missing {
433
+ opacity: 0.5;
434
+ }
435
+
436
+ #words.flipped.colorfulMode .word.error,
437
+ #words.colorfulMode .word.error {
438
+ border-bottom: 2px solid $--colorful-error-color;
439
+ }
440
+
441
+ #wordsInput {
442
+ opacity: 0;
443
+ padding: 0;
444
+ margin: 0;
445
+ border: none;
446
+ outline: none;
447
+ display: block;
448
+ resize: none;
449
+ position: fixed;
450
+ z-index: -1;
451
+ cursor: default;
452
+ pointer-events: none;
453
+ }
454
+
455
+ #capsWarning {
456
+ background: $--main-color;
457
+ color: $--bg-color;
458
+ display: table;
459
+ position: absolute;
460
+ left: 50%;
461
+ transform: translateX(-50%) translateY(-50%);
462
+ padding: 1rem;
463
+ border-radius: $--roundness;
464
+ transition: 0.125s;
465
+ z-index: 999;
466
+ pointer-events: none;
467
+ top: -2.5rem;
468
+
469
+ i {
470
+ margin-right: 0.5rem;
471
+ }
472
+ }
473
+
474
+ #result {
475
+ display: grid;
476
+ gap: 1rem;
477
+ align-items: center;
478
+ grid-template-columns: auto 1fr;
479
+ grid-template-areas:
480
+ "stats chart"
481
+ "morestats morestats";
482
+
483
+ &:focus {
484
+ outline: none;
485
+ }
486
+
487
+ .buttons {
488
+ display: grid;
489
+ grid-auto-flow: column;
490
+ gap: 1rem;
491
+ justify-content: center;
492
+ grid-column: 1/3;
493
+ }
494
+
495
+ .ssWatermark {
496
+ grid-column: 1/3;
497
+ }
498
+
499
+ #resultWordsHistory,
500
+ #resultReplay {
501
+ color: $--sub-color;
502
+ margin-bottom: 1rem;
503
+ .textButton {
504
+ padding: 0;
505
+ margin-left: 0.5rem;
506
+ }
507
+ .heatmapLegend {
508
+ margin-left: 0.5rem;
509
+ display: inline-grid;
510
+ grid-template-columns: auto auto auto;
511
+ gap: 1rem;
512
+ font-size: 0.75rem;
513
+ color: $--sub-color;
514
+ width: min-content;
515
+ .boxes {
516
+ display: grid;
517
+ grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
518
+ .box {
519
+ height: 1rem;
520
+ color: $--bg-color;
521
+ padding: 0.1rem 0.5rem;
522
+ white-space: nowrap;
523
+ line-height: 0.75rem;
524
+ display: grid;
525
+ place-content: center center;
526
+ }
527
+ .box:nth-child(1) {
528
+ background: $--colorful-error-color;
529
+ border-radius: $--roundness 0 0 $--roundness;
530
+ }
531
+ .box:nth-child(2) {
532
+ background: $--colorful-error-color;
533
+ filter: opacity(0.6);
534
+ }
535
+ .box:nth-child(3) {
536
+ background: $--sub-color;
537
+ }
538
+ .box:nth-child(4) {
539
+ background: $--main-color;
540
+ filter: opacity(0.6);
541
+ }
542
+ .box:nth-child(5) {
543
+ background: $--main-color;
544
+ border-radius: 0 $--roundness $--roundness 0;
545
+ }
546
+ }
547
+ }
548
+ .title {
549
+ user-select: none;
550
+ margin-bottom: 0.25rem;
551
+ }
552
+ .words {
553
+ display: flex;
554
+ flex-wrap: wrap;
555
+ width: 100%;
556
+ align-content: flex-start;
557
+ user-select: none;
558
+ .word {
559
+ position: relative;
560
+ margin: 0.18rem 0.6rem 0.15rem 0;
561
+ letter.correct {
562
+ color: $--text-color;
563
+ }
564
+ letter.incorrect {
565
+ color: $--error-color;
566
+ }
567
+ letter.incorrect.extra {
568
+ color: $--error-extra-color;
569
+ }
570
+ &.heatmap0 letter {
571
+ color: $--colorful-error-color;
572
+ }
573
+ &.heatmap1 letter {
574
+ color: $--colorful-error-color;
575
+ filter: opacity(0.6);
576
+ }
577
+ &.heatmap2 letter {
578
+ color: $--sub-color;
579
+ }
580
+ &.heatmap3 letter {
581
+ color: $--main-color;
582
+ filter: opacity(0.6);
583
+ }
584
+ &.heatmap4 letter {
585
+ color: $--main-color;
586
+ }
587
+ }
588
+ &.rightToLeftTest {
589
+ direction: rtl;
590
+ .word {
591
+ direction: rtl;
592
+ }
593
+ }
594
+ &.withLigatures {
595
+ letter {
596
+ display: inline;
597
+ }
598
+ }
599
+ }
600
+ }
601
+
602
+ .chart {
603
+ grid-area: chart;
604
+ width: 100%;
605
+
606
+ canvas {
607
+ width: 100% !important;
608
+ height: 100%;
609
+ }
610
+
611
+ max-height: 200px;
612
+ height: 200px;
613
+
614
+ .title {
615
+ color: $--sub-color;
616
+ margin-bottom: 1rem;
617
+ }
618
+ }
619
+
620
+ .loginTip {
621
+ grid-column: 1/3;
622
+ text-align: center;
623
+ color: $--sub-color;
624
+ .link {
625
+ text-decoration: underline;
626
+ display: inline-block;
627
+ cursor: pointer;
628
+ }
629
+ }
630
+
631
+ .stats {
632
+ grid-area: stats;
633
+ display: grid;
634
+ gap: 0.5rem;
635
+ justify-content: center;
636
+ align-items: center;
637
+ grid-template-areas:
638
+ "wpm"
639
+ "acc";
640
+
641
+ &.morestats {
642
+ display: grid;
643
+ grid-auto-flow: column;
644
+ grid-template-areas: none;
645
+ align-items: flex-start;
646
+ justify-content: space-between;
647
+ column-gap: 2rem;
648
+ grid-area: morestats;
649
+
650
+ .subgroup {
651
+ display: grid;
652
+ gap: 0.5rem;
653
+ }
654
+ }
655
+
656
+ .group {
657
+ .top {
658
+ color: $--sub-color;
659
+ font-size: 1rem;
660
+ line-height: 1rem;
661
+ margin-bottom: 0.25rem;
662
+ }
663
+
664
+ .bottom {
665
+ color: $--main-color;
666
+ font-size: 2rem;
667
+ line-height: 2rem;
668
+ }
669
+
670
+ &.time {
671
+ .afk,
672
+ .timeToday {
673
+ color: $--sub-color;
674
+ font-size: 0.75rem;
675
+ line-height: 0.75rem;
676
+ margin-left: 0.2rem;
677
+ }
678
+ }
679
+
680
+ &.source {
681
+ #rateQuoteButton,
682
+ #reportQuoteButton,
683
+ #favoriteQuoteButton {
684
+ padding: 0 0.25rem;
685
+ }
686
+ #rateQuoteButton {
687
+ display: inline-grid;
688
+ gap: 0.25rem;
689
+ }
690
+ }
691
+ }
692
+
693
+ .info,
694
+ .tags,
695
+ .source {
696
+ .top {
697
+ font-size: 1rem;
698
+ line-height: 1rem;
699
+ }
700
+
701
+ .bottom {
702
+ font-size: 1rem;
703
+ line-height: 1rem;
704
+ }
705
+ }
706
+
707
+ .source {
708
+ max-width: 30rem;
709
+ }
710
+
711
+ .tags .bottom .fas {
712
+ margin-left: 0.5rem;
713
+ }
714
+
715
+ .wpm {
716
+ grid-area: wpm;
717
+
718
+ .top {
719
+ font-size: 2rem;
720
+ line-height: 1.5rem;
721
+ display: flex;
722
+
723
+ .crown {
724
+ height: 1.7rem;
725
+ width: 1.7rem;
726
+ margin-left: 0.5rem;
727
+ margin-top: -0.2rem;
728
+ font-size: 0.7rem;
729
+ line-height: 1.7rem;
730
+ background: $--main-color;
731
+ color: $--bg-color;
732
+ border-radius: 0.6rem;
733
+ text-align: center;
734
+ align-self: center;
735
+ width: 1.7rem;
736
+ height: 1.7rem;
737
+ }
738
+ }
739
+
740
+ .bottom {
741
+ font-size: 4rem;
742
+ line-height: 4rem;
743
+ }
744
+ }
745
+
746
+ .testType,
747
+ .leaderboards {
748
+ .bottom {
749
+ font-size: 1rem;
750
+ line-height: 1rem;
751
+ .lbChange .fas {
752
+ margin-right: 0.15rem;
753
+ }
754
+ }
755
+ }
756
+
757
+ .acc {
758
+ grid-area: acc;
759
+
760
+ .top {
761
+ font-size: 2rem;
762
+ line-height: 1.5rem;
763
+ }
764
+
765
+ .bottom {
766
+ font-size: 4rem;
767
+ line-height: 4rem;
768
+ }
769
+ }
770
+
771
+ .burst {
772
+ grid-area: burst;
773
+
774
+ .top {
775
+ font-size: 2rem;
776
+ line-height: 1.5rem;
777
+ }
778
+
779
+ .bottom {
780
+ font-size: 4rem;
781
+ line-height: 4rem;
782
+ }
783
+ }
784
+ }
785
+ }
786
+
787
+ #restartTestButton,
788
+ #showWordHistoryButton,
789
+ #saveScreenshotButton,
790
+ #restartTestButtonWithSameWordset,
791
+ #nextTestButton,
792
+ #practiseWordsButton,
793
+ #watchReplayButton,
794
+ #watchVideoAdButton {
795
+ position: relative;
796
+ border-radius: $--roundness;
797
+ padding: 1rem 2rem;
798
+ width: min-content;
799
+ width: -moz-min-content;
800
+ color: $--sub-color;
801
+ transition: 0.125s;
802
+ cursor: pointer;
803
+
804
+ &:hover,
805
+ &:focus {
806
+ color: $--text-color;
807
+ outline: none;
808
+ }
809
+
810
+ &:focus {
811
+ background: $--text-color;
812
+ color: $--bg-color;
813
+ }
814
+ }
815
+
816
+ #retrySavingResultButton {
817
+ position: relative;
818
+ border-radius: $--roundness;
819
+ padding: 1rem 2rem;
820
+ color: $--error-color;
821
+ transition: 0.25s;
822
+ cursor: pointer;
823
+ width: max-content;
824
+ width: -moz-max-content;
825
+ background: $--colorful-error-color;
826
+ color: $--bg-color;
827
+ justify-self: center;
828
+ justify-content: center;
829
+ margin: 0 auto 1rem auto;
830
+ user-select: none;
831
+
832
+ &:hover,
833
+ &:focus {
834
+ background: $--text-color;
835
+ outline: none;
836
+ }
837
+
838
+ &:focus {
839
+ background: $--text-color;
840
+ }
841
+ }
842
+
843
+ #showWordHistoryButton {
844
+ opacity: 1;
845
+ }
846
+
847
+ #replayWords {
848
+ cursor: pointer;
849
+ }
850
+
851
+ #replayStopwatch {
852
+ color: $--main-color;
853
+ display: inline-block;
854
+ margin: 0;
855
+ margin-left: 0.5em;
856
+ }
857
+
858
+ #restartTestButton {
859
+ margin: 0 auto;
860
+ margin-top: 1rem;
861
+ }
862
+
863
+ .pageTest {
864
+ #wordsWrapper {
865
+ position: relative;
866
+ &.tape {
867
+ -webkit-mask-image: linear-gradient(
868
+ 90deg,
869
+ rgba(0, 0, 0, 0) 1%,
870
+ rgb(0, 0, 0) 10%,
871
+ rgb(0, 0, 0) 90%,
872
+ rgba(0, 0, 0, 0) 99%
873
+ );
874
+ mask-image: linear-gradient(
875
+ 90deg,
876
+ rgba(0, 0, 0, 0) 1%,
877
+ rgb(0, 0, 0) 10%,
878
+ rgb(0, 0, 0) 90%,
879
+ rgba(0, 0, 0, 0) 99%
880
+ );
881
+ }
882
+ }
883
+ #memoryTimer {
884
+ background: $--main-color;
885
+ color: $--bg-color;
886
+ padding: 1rem;
887
+ border-radius: $--roundness;
888
+ text-align: center;
889
+ width: max-content;
890
+ left: 50%;
891
+ position: absolute;
892
+ transform: translateX(-50%);
893
+ top: -6rem;
894
+ user-select: none;
895
+ pointer-events: none;
896
+ opacity: 0;
897
+ }
898
+ .outOfFocusWarning {
899
+ text-align: center;
900
+ height: 0;
901
+ line-height: 150px;
902
+ z-index: 999;
903
+ position: relative;
904
+ user-select: none;
905
+ pointer-events: none;
906
+ }
907
+
908
+ .errorWarning {
909
+ text-align: center;
910
+ height: 0;
911
+ line-height: 150px;
912
+ z-index: 999;
913
+ position: relative;
914
+ user-select: auto;
915
+ }
916
+
917
+ #testModesNotice {
918
+ display: flex;
919
+ flex-wrap: wrap;
920
+ color: $--sub-color;
921
+ text-align: center;
922
+ margin-bottom: 0.5rem;
923
+ transition: 0.125s;
924
+ justify-content: center;
925
+ user-select: none;
926
+
927
+ .textButton {
928
+ margin: 0 0.5rem;
929
+ }
930
+
931
+ .fas {
932
+ margin-right: 0.5rem;
933
+ }
934
+ }
935
+ #miniTimerAndLiveWpm {
936
+ height: 0;
937
+ margin-left: 0.37rem;
938
+ display: flex;
939
+ font-size: 1rem;
940
+ line-height: 1.13rem;
941
+ margin-top: -1.5rem;
942
+ position: absolute;
943
+ color: black;
944
+ font-weight: bold;
945
+
946
+ .time {
947
+ margin-right: 2rem;
948
+ margin-top: -2rem;
949
+ }
950
+
951
+ .wpm,
952
+ .acc {
953
+ margin-right: 2rem;
954
+ }
955
+
956
+ .time,
957
+ .wpm,
958
+ .acc,
959
+ .burst {
960
+ opacity: 0;
961
+ }
962
+
963
+ &.timerMain {
964
+ color: $--timer-color;
965
+ }
966
+
967
+ &.timerSub {
968
+ color: $--sub-color;
969
+ }
970
+
971
+ &.timerText {
972
+ color: $--text-color;
973
+ }
974
+
975
+ &.size125 {
976
+ margin-top: -1.75rem;
977
+ font-size: 1.38rem;
978
+ line-height: 1.25rem;
979
+ }
980
+ &.size15 {
981
+ margin-top: -2rem;
982
+ font-size: 1.63rem;
983
+ line-height: 1.5rem;
984
+ }
985
+ &.size2 {
986
+ margin-top: -2.5rem;
987
+ font-size: 2.13rem;
988
+ line-height: 2rem;
989
+ }
990
+ &.size3 {
991
+ margin-top: -3.5rem;
992
+ font-size: 3.13rem;
993
+ line-height: 3rem;
994
+ }
995
+ &.size4 {
996
+ margin-top: -4.5rem;
997
+ font-size: 4.13rem;
998
+ line-height: 4rem;
999
+ }
1000
+ }
1001
+ }
1002
+
1003
+ #middle.focus .pageTest {
1004
+ #testModesNotice {
1005
+ opacity: 0 !important;
1006
+ }
1007
+ }
1008
+ }