@testgorilla/tgo-typing-test 3.0.0 → 4.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 (37) hide show
  1. package/fesm2022/testgorilla-tgo-typing-test.mjs +9 -9
  2. package/fesm2022/testgorilla-tgo-typing-test.mjs.map +1 -1
  3. package/index.d.ts +70 -2
  4. package/package.json +4 -4
  5. package/lib/components/tgo-typing-replay-input/tgo-typing-replay-input.component.d.ts +0 -14
  6. package/lib/components/tgo-typing-test/tgo-typing-test.component.d.ts +0 -54
  7. package/lib/helpers/config.d.ts +0 -98
  8. package/lib/helpers/constants/default-config.d.ts +0 -3
  9. package/lib/helpers/controllers/input-controller.d.ts +0 -16
  10. package/lib/helpers/controllers/quotes-controller.d.ts +0 -20
  11. package/lib/helpers/observables/config-event.d.ts +0 -5
  12. package/lib/helpers/observables/timer-event.d.ts +0 -4
  13. package/lib/helpers/states/active-page.d.ts +0 -2
  14. package/lib/helpers/states/composition.d.ts +0 -10
  15. package/lib/helpers/states/page-transition.d.ts +0 -2
  16. package/lib/helpers/states/slow-timer.d.ts +0 -3
  17. package/lib/helpers/states/test-active.d.ts +0 -2
  18. package/lib/helpers/states/time.d.ts +0 -3
  19. package/lib/helpers/test/caps-warning.d.ts +0 -5
  20. package/lib/helpers/test/caret.d.ts +0 -11
  21. package/lib/helpers/test/custom-text.d.ts +0 -16
  22. package/lib/helpers/test/english-punctuation.d.ts +0 -3
  23. package/lib/helpers/test/focus.d.ts +0 -7
  24. package/lib/helpers/test/manual-restart-tracker.d.ts +0 -3
  25. package/lib/helpers/test/out-of-focus.d.ts +0 -4
  26. package/lib/helpers/test/replay.d.ts +0 -20
  27. package/lib/helpers/test/test-input.d.ts +0 -86
  28. package/lib/helpers/test/test-logic.d.ts +0 -25
  29. package/lib/helpers/test/test-state.d.ts +0 -7
  30. package/lib/helpers/test/test-stats.d.ts +0 -92
  31. package/lib/helpers/test/test-timer.d.ts +0 -6
  32. package/lib/helpers/test/test-ui.d.ts +0 -27
  33. package/lib/helpers/test/test-words.d.ts +0 -23
  34. package/lib/helpers/test/timer-progress.d.ts +0 -3
  35. package/lib/helpers/test/weak-spot.d.ts +0 -3
  36. package/lib/helpers/test/wordset.d.ts +0 -7
  37. package/lib/utils/misc.d.ts +0 -80
@@ -1,27 +0,0 @@
1
- export declare let currentWordElementIndex: number;
2
- export declare let resultVisible: boolean;
3
- export declare let activeWordTop: number;
4
- export declare let testRestarting: boolean;
5
- export declare let testRestartingPromise: Promise<unknown>;
6
- export declare const lineTransition = false;
7
- export declare let currentTestLine: number;
8
- export declare let resultCalculating: boolean;
9
- export declare function setWordsWrapperElement(wordsWrapperElem: HTMLElement): void;
10
- export declare function setWordsInputElementTestUI(wordsElement: HTMLInputElement): void;
11
- export declare function setWordsElement(wordsElem: HTMLElement): void;
12
- export declare function setResultVisible(val: boolean): void;
13
- export declare function setCurrentWordElementIndex(val: number): void;
14
- export declare function setActiveWordTop(val: number): void;
15
- export declare function setTestRestarting(val: boolean): void;
16
- export declare function setResultCalculating(val: boolean): void;
17
- export declare function reset(): void;
18
- export declare function focusWords(): void;
19
- export declare function updateActiveElement(backspace?: boolean): void;
20
- export declare function showWords(): void;
21
- export declare function addWord(word: string): void;
22
- export declare function updateWordElement(showError?: boolean): void;
23
- export declare function lineJump(currentTop: number): void;
24
- export declare function highlightBadWord(index: number, showError: boolean): void;
25
- export declare function wordsInputFocusTestUI(): void;
26
- export declare function wordsInputFocusOut(): void;
27
- export declare function wordsWrapperClick(): void;
@@ -1,23 +0,0 @@
1
- import { MonkeyTypes } from '../../types/types';
2
- declare class Words {
3
- list: string[];
4
- length: number;
5
- currentIndex: number;
6
- constructor();
7
- get(i?: undefined, raw?: boolean): string[];
8
- get(i: number, raw?: boolean): string;
9
- getCurrent(): string;
10
- getLast(): string;
11
- push(word: string): void;
12
- reset(): void;
13
- resetCurrentIndex(): void;
14
- decreaseCurrentIndex(): void;
15
- increaseCurrentIndex(): void;
16
- clean(): void;
17
- }
18
- export declare const words: Words;
19
- export declare let hasTab: boolean;
20
- export declare let randomQuote: MonkeyTypes.Quote;
21
- export declare function setRandomQuote(rq: MonkeyTypes.Quote): void;
22
- export declare function setHasTab(tf: boolean): void;
23
- export {};
@@ -1,3 +0,0 @@
1
- import { BehaviorSubject } from 'rxjs';
2
- export declare const timeLeft: BehaviorSubject<string>;
3
- export declare function update(): void;
@@ -1,3 +0,0 @@
1
- import { Wordset } from './wordset';
2
- export declare function updateScore(char: string, isCorrect: boolean): void;
3
- export declare function getWord(wordset: Wordset): string;
@@ -1,7 +0,0 @@
1
- export declare class Wordset {
2
- words: string[];
3
- length: number;
4
- constructor(words: string[]);
5
- randomWord(): string;
6
- }
7
- export declare function withWords(words: string[], funbox: string): Wordset;
@@ -1,80 +0,0 @@
1
- import { MonkeyTypes, Timeout } from '../types/types';
2
- export declare const QuoteNetworkErrorMessage = "Text not loading.";
3
- export declare function emitQuoteNetworkError(): void;
4
- export declare const QuoteNetworkError$: import("rxjs").Observable<string>;
5
- export declare function isColorLight(hex: string): boolean;
6
- export declare function isColorDark(hex: string): boolean;
7
- export declare function getLanguage(lang: string): Promise<MonkeyTypes.LanguageObject>;
8
- export declare function getCurrentLanguage(languageName: string): Promise<MonkeyTypes.LanguageObject>;
9
- export declare function smooth(arr: number[], windowSize: number, getter?: (value: number) => number): number[];
10
- export declare function stdDev(array: number[]): number;
11
- export declare function mean(array: number[]): number;
12
- export declare function median(arr: number[]): number;
13
- export declare function getLastChar(word: string): string;
14
- export declare function capitalizeFirstLetterOfEachWord(str: string): string;
15
- export declare function isASCIILetter(c: string): boolean;
16
- export declare function kogasa(cov: number): number;
17
- export declare function whorf(speed: number, wordlen: number): number;
18
- export declare function roundTo2(num: number): number;
19
- export declare function findLineByLeastSquares(values_y: number[]): number[][];
20
- export declare function getGibberish(): string;
21
- export declare function secondsToString(sec: number, alwaysShowMinutes?: boolean, alwaysShowHours?: boolean, delimiter?: ':' | 'text', showSeconds?: boolean, showDays?: boolean): string;
22
- export declare function getNumbers(len: number, start?: number): string;
23
- export declare function convertNumberToArabicIndic(numString: string): string;
24
- export declare function getSpecials(): string;
25
- export declare function getASCII(): string;
26
- export declare function getArrows(): string;
27
- export declare function getPositionString(number: number): string;
28
- export declare function findGetParameter(parameterName: string, getOverride?: string): string | null;
29
- export declare function objectToQueryString<T extends string | number | boolean>(obj: Record<string, T | T[]>): string;
30
- declare global {
31
- interface Document {
32
- mozCancelFullScreen?: () => Promise<void>;
33
- msRequestFullscreen?: () => Promise<void>;
34
- msExitFullscreen?: () => Promise<void>;
35
- webkitExitFullscreen?: () => Promise<void>;
36
- mozFullScreenElement?: Element;
37
- msFullscreenElement?: Element;
38
- webkitFullscreenElement?: Element;
39
- }
40
- interface HTMLElement {
41
- msRequestFullscreen?: () => Promise<void>;
42
- mozRequestFullScreen?: () => Promise<void>;
43
- webkitRequestFullscreen?: () => Promise<void>;
44
- }
45
- }
46
- export declare function toggleFullscreen(): void;
47
- export declare function remove_non_ascii(str: string): string;
48
- export declare function escapeRegExp(str: string): string;
49
- export declare function escapeHTML(str: string): string;
50
- export declare function cleanTypographySymbols(textToClean: string): string;
51
- export declare function isUsernameValid(name: string): boolean;
52
- export declare function mapRange(x: number, in_min: number, in_max: number, out_min: number, out_max: number): number;
53
- export declare function canQuickRestart(mode: string, words: number, time: number, CustomText: MonkeyTypes.CustomText): boolean;
54
- export declare function clearTimeouts(timeouts: Timeout[]): void;
55
- export declare function setCharAt(str: string, index: number, chr: string): string;
56
- export declare function regexIndexOf(string: string, regex: RegExp, startpos: number): number;
57
- export declare function convertRGBtoHEX(rgb: string): string | undefined;
58
- export declare const trailingComposeChars: RegExp;
59
- export declare function convertRemToPixels(rem: number): number;
60
- export declare function getMode2(config: MonkeyTypes.Config, randomQuote: MonkeyTypes.Quote): string;
61
- /**
62
- * Gets an integer between min and max, both are inclusive.
63
- * @param min
64
- * @param max
65
- * @returns Random integer betwen min and max.
66
- */
67
- export declare function randomIntFromRange(min: number, max: number): number;
68
- /**
69
- * Shuffle an array of elements using the Fisher–Yates algorithm.
70
- * This function mutates the input array.
71
- * @param elements
72
- */
73
- export declare function shuffle<T>(elements: T[]): void;
74
- export declare function randomElementFromArray<T>(array: T[]): T;
75
- export declare function randomElementFromObject<T extends object>(object: T): T[keyof T];
76
- export declare function createErrorMessage(error: unknown, message: string): string;
77
- export declare function getDiscordAvatarUrl(discordId?: string, discordAvatar?: string, discordAvatarSize?: number): Promise<string | null>;
78
- export declare function getLevel(xp: number): number;
79
- export declare function getXpForLevel(level: number): number;
80
- export declare function abbreviateNumber(num: number): string;