@mxfb/tools 0.3.0 → 1.0.2
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/TODO.md +1 -0
- package/agnostic/@publisher/index.d.ts +47 -0
- package/agnostic/@publisher/index.js +361 -0
- package/agnostic/elo/index.d.ts +23 -0
- package/agnostic/elo/index.js +28 -0
- package/agnostic/elo/index.test.d.ts +1 -0
- package/agnostic/elo/index.test.js +67 -0
- package/agnostic/index.d.ts +5 -4
- package/agnostic/index.js +5 -0
- package/agnostic/poetry/generate-rhymes/index.d.ts +1 -0
- package/agnostic/poetry/generate-rhymes/index.js +125 -0
- package/agnostic/poetry/index.d.ts +1 -0
- package/agnostic/poetry/index.js +1 -0
- package/agnostic/scrapers/@meteociel/index.d.ts +36 -0
- package/agnostic/scrapers/@meteociel/index.js +248 -0
- package/agnostic/scrapers/@meteociel/index.test.d.ts +1 -0
- package/agnostic/scrapers/@meteociel/index.test.js +43 -0
- package/agnostic/scrapers/@meteociel/locations/index.d.ts +11 -0
- package/agnostic/scrapers/@meteociel/locations/index.js +10 -0
- package/agnostic/scrapers/@meteociel/types.d.ts +1 -0
- package/agnostic/scrapers/@meteociel/types.js +1 -0
- package/agnostic/scrapers/@tumblr/blogs/delabienbonnemusique/index.d.ts +22 -0
- package/agnostic/scrapers/@tumblr/blogs/delabienbonnemusique/index.js +124 -0
- package/agnostic/scrapers/@tumblr/blogs/delabienbonnemusique/index.test.d.ts +1 -0
- package/agnostic/scrapers/@tumblr/blogs/delabienbonnemusique/index.test.js +107 -0
- package/agnostic/scrapers/@tumblr/blogs/index.d.ts +8 -0
- package/agnostic/scrapers/@tumblr/blogs/index.js +23 -0
- package/agnostic/scrapers/@tumblr/index.d.ts +73 -0
- package/agnostic/scrapers/@tumblr/index.js +180 -0
- package/agnostic/scrapers/@tumblr/index.test.d.ts +1 -0
- package/agnostic/scrapers/@tumblr/index.test.js +319 -0
- package/agnostic/scrapers/@tumblr/types.d.ts +238 -0
- package/agnostic/scrapers/@tumblr/types.js +38 -0
- package/agnostic/scrapers/@tumblr/utils.d.ts +12 -0
- package/agnostic/scrapers/@tumblr/utils.js +407 -0
- package/agnostic/scrapers/index.d.ts +2 -0
- package/agnostic/scrapers/index.js +2 -0
- package/agnostic/weather/index.d.ts +1 -0
- package/agnostic/weather/index.js +1 -0
- package/agnostic/weather/types.d.ts +181 -0
- package/agnostic/weather/types.js +8 -0
- package/components/index.d.ts +1 -1
- package/components/index.js +1 -0
- package/components/public-classnames.d.ts +5 -0
- package/components/public-classnames.js +5 -0
- package/components/utils/index.d.ts +1 -0
- package/components/utils/index.js +12 -0
- package/components/utils/types.d.ts +3 -0
- package/components/utils/types.js +1 -0
- package/index.d.ts +3 -3
- package/index.js +3 -0
- package/node/headless-browser/index.d.ts +37 -0
- package/node/headless-browser/index.js +126 -0
- package/node/headless-browser/types.d.ts +47 -0
- package/node/headless-browser/types.js +5 -0
- package/node/index.d.ts +1 -2
- package/node/index.js +1 -0
- package/node/index.test.d.ts +1 -0
- package/node/index.test.js +6 -0
- package/node/scrapers/@tumblr/index.d.ts +61 -0
- package/node/scrapers/@tumblr/index.js +182 -0
- package/node/scrapers/@tumblr/index.test.d.ts +1 -0
- package/node/scrapers/@tumblr/index.test.js +185 -0
- package/node/scrapers/@tumblr/types.d.ts +91 -0
- package/node/scrapers/@tumblr/types.js +1 -0
- package/node/scrapers/@tumblr/utils.d.ts +23 -0
- package/node/scrapers/@tumblr/utils.js +328 -0
- package/node/scrapers/index.d.ts +1 -0
- package/node/scrapers/index.js +1 -0
- package/package.json +211 -14
- package/agnostic/_WIP_tennis/index.d.ts +0 -2
- package/agnostic/_WIP_tennis/index.js +0 -62
- package/agnostic/arrays/index.d.ts +0 -11
- package/agnostic/arrays/is-array-of/index.d.ts +0 -5
- package/agnostic/arrays/is-array-of/index.js +0 -23
- package/agnostic/async/index.d.ts +0 -8
- package/agnostic/async/index.js +0 -20
- package/agnostic/async/timeout-call/index.d.ts +0 -1
- package/agnostic/async/timeout-call/index.js +0 -6
- package/agnostic/async/transitions/index.d.ts +0 -41
- package/agnostic/async/transitions/index.js +0 -7
- package/agnostic/async/wait/index.d.ts +0 -1
- package/agnostic/async/wait/index.js +0 -6
- package/agnostic/booleans/index.d.ts +0 -8
- package/agnostic/booleans/index.js +0 -17
- package/agnostic/booleans/is-falsy/index.d.ts +0 -7
- package/agnostic/booleans/is-falsy/index.js +0 -11
- package/agnostic/css/bem/BEM.d.ts +0 -29
- package/agnostic/css/bem/getNamesArr.d.ts +0 -2
- package/agnostic/css/bem/index.d.ts +0 -7
- package/agnostic/css/bem/index.js +0 -9
- package/agnostic/css/generate-nice-color/index.d.ts +0 -2
- package/agnostic/css/generate-nice-color/index.js +0 -8
- package/agnostic/css/index.d.ts +0 -14
- package/agnostic/css/index.js +0 -177
- package/agnostic/css/is-valid-css-class-name/index.d.ts +0 -2
- package/agnostic/css/is-valid-css-class-name/index.js +0 -8
- package/agnostic/css/styles-set/index.d.ts +0 -37
- package/agnostic/errors/index.d.ts +0 -30
- package/agnostic/errors/index.js +0 -6
- package/agnostic/html/get-node-ancestors/index.d.ts +0 -1
- package/agnostic/html/get-node-ancestors/index.js +0 -6
- package/agnostic/html/get-position-inside-parent/index.d.ts +0 -1
- package/agnostic/html/get-position-inside-parent/index.js +0 -6
- package/agnostic/html/index.d.ts +0 -17
- package/agnostic/html/index.js +0 -39
- package/agnostic/html/insert-node/index.d.ts +0 -2
- package/agnostic/html/insert-node/index.js +0 -6
- package/agnostic/html/placeholders/index.d.ts +0 -9
- package/agnostic/html/placeholders/index.js +0 -6
- package/agnostic/html/sanitize/index.d.ts +0 -24
- package/agnostic/html/sanitize/index.js +0 -9
- package/agnostic/html/selector-to-element/index.d.ts +0 -1
- package/agnostic/html/selector-to-element/index.js +0 -9
- package/agnostic/html/string-to-nodes/index.d.ts +0 -7
- package/agnostic/html/string-to-nodes/index.js +0 -10
- package/agnostic/misc/assert/index.d.ts +0 -5
- package/agnostic/misc/assert/index.js +0 -6
- package/agnostic/misc/cast/index.d.ts +0 -9
- package/agnostic/misc/cast/index.js +0 -8
- package/agnostic/misc/crossenv/index.d.ts +0 -13
- package/agnostic/misc/crossenv/index.js +0 -6
- package/agnostic/misc/elo/index.d.ts +0 -31
- package/agnostic/misc/elo/index.js +0 -6
- package/agnostic/misc/get-current-downlink/index.d.ts +0 -1
- package/agnostic/misc/get-current-downlink/index.js +0 -6
- package/agnostic/misc/index.d.ts +0 -6
- package/agnostic/misc/index.js +0 -16
- package/agnostic/misc/is-constructor-function/index.d.ts +0 -2
- package/agnostic/misc/is-constructor-function/index.js +0 -6
- package/agnostic/misc/is-nullish/index.d.ts +0 -4
- package/agnostic/misc/is-nullish/index.js +0 -10
- package/agnostic/misc/logs/index.d.ts +0 -55
- package/agnostic/misc/logs/index.js +0 -6
- package/agnostic/misc/random/index.d.ts +0 -10
- package/agnostic/misc/random/index.js +0 -6
- package/agnostic/misc/tennis/index.d.ts +0 -60
- package/agnostic/misc/tennis/index.js +0 -6
- package/agnostic/numbers/absolute-modulo/index.d.ts +0 -1
- package/agnostic/numbers/absolute-modulo/index.js +0 -6
- package/agnostic/numbers/clamp/index.d.ts +0 -1
- package/agnostic/numbers/clamp/index.js +0 -6
- package/agnostic/numbers/index.d.ts +0 -13
- package/agnostic/numbers/index.js +0 -30
- package/agnostic/numbers/interpolate/index.d.ts +0 -1
- package/agnostic/numbers/interpolate/index.js +0 -6
- package/agnostic/numbers/responsive-harmonics/index.d.ts +0 -10
- package/agnostic/numbers/responsive-harmonics/index.js +0 -9
- package/agnostic/numbers/round/index.d.ts +0 -1
- package/agnostic/numbers/round/index.js +0 -6
- package/agnostic/objects/enums/index.d.ts +0 -4
- package/agnostic/objects/enums/index.js +0 -7
- package/agnostic/objects/enums/is-in-enum/index.d.ts +0 -1
- package/agnostic/objects/enums/is-in-enum/index.js +0 -6
- package/agnostic/objects/flatten-getters/index.d.ts +0 -1
- package/agnostic/objects/flatten-getters/index.js +0 -9
- package/agnostic/objects/index.d.ts +0 -12
- package/agnostic/objects/index.js +0 -32
- package/agnostic/objects/is-object/index.d.ts +0 -1
- package/agnostic/objects/is-object/index.js +0 -6
- package/agnostic/objects/is-record/index.d.ts +0 -1
- package/agnostic/objects/is-record/index.js +0 -6
- package/agnostic/objects/record-format/index.d.ts +0 -11
- package/agnostic/objects/record-format/index.js +0 -16
- package/agnostic/objects/validation/index.d.ts +0 -3
- package/agnostic/objects/validation/index.js +0 -6
- package/agnostic/optim/index.d.ts +0 -7
- package/agnostic/optim/index.js +0 -18
- package/agnostic/optim/memoize/index.d.ts +0 -3
- package/agnostic/optim/memoize/index.js +0 -6
- package/agnostic/optim/throttle-debounce/index.d.ts +0 -30
- package/agnostic/optim/throttle-debounce/index.js +0 -8
- package/agnostic/optim/throttle-debounce/types.d.ts +0 -2
- package/agnostic/regexps/index.d.ts +0 -23
- package/agnostic/regexps/index.js +0 -89
- package/agnostic/strings/char-codes/index.d.ts +0 -17
- package/agnostic/strings/char-codes/index.js +0 -6
- package/agnostic/strings/index.d.ts +0 -14
- package/agnostic/strings/index.js +0 -32
- package/agnostic/strings/matches/index.d.ts +0 -3
- package/agnostic/strings/matches/index.js +0 -10
- package/agnostic/strings/normalize-indent/index.d.ts +0 -1
- package/agnostic/strings/normalize-indent/index.js +0 -6
- package/agnostic/strings/replace-all/index.d.ts +0 -1
- package/agnostic/strings/replace-all/index.js +0 -6
- package/agnostic/strings/to-alphanum/index.d.ts +0 -1
- package/agnostic/strings/to-alphanum/index.js +0 -6
- package/chunks/chunk-32IRF4OP.js +0 -9
- package/chunks/chunk-34U4HX4V.js +0 -73
- package/chunks/chunk-4GDNHUCZ.js +0 -162
- package/chunks/chunk-4QQBKBYH.js +0 -59
- package/chunks/chunk-4VC5PT5T.js +0 -13
- package/chunks/chunk-5LNUCDQ6.js +0 -132
- package/chunks/chunk-7AWTHZLY.js +0 -12
- package/chunks/chunk-7DBNMU6N.js +0 -14
- package/chunks/chunk-COVPTTAD.js +0 -10
- package/chunks/chunk-DNIOWD7K.js +0 -8
- package/chunks/chunk-DQNJQBC6.js +0 -10
- package/chunks/chunk-E6MSDKON.js +0 -13
- package/chunks/chunk-EDVNAV3G.js +0 -72
- package/chunks/chunk-EW46EXFB.js +0 -8
- package/chunks/chunk-FPEW3A27.js +0 -14
- package/chunks/chunk-GJOU3UAL.js +0 -36
- package/chunks/chunk-HC6ZOHCS.js +0 -14
- package/chunks/chunk-HGCG2J77.js +0 -122
- package/chunks/chunk-IFD7GSGK.js +0 -130
- package/chunks/chunk-JQXNEJAP.js +0 -18
- package/chunks/chunk-JWBDZPQG.js +0 -18
- package/chunks/chunk-K37RALUX.js +0 -8
- package/chunks/chunk-KIONYWA7.js +0 -168
- package/chunks/chunk-KQT5CTGF.js +0 -21
- package/chunks/chunk-LEXQ6E6L.js +0 -31
- package/chunks/chunk-LQFKUNVQ.js +0 -19
- package/chunks/chunk-MF56TTC5.js +0 -15
- package/chunks/chunk-MT74WIQR.js +0 -41
- package/chunks/chunk-NRITRUZW.js +0 -10
- package/chunks/chunk-NRJQKVQV.js +0 -31
- package/chunks/chunk-OSAXBA7G.js +0 -10
- package/chunks/chunk-PO3V3I57.js +0 -23
- package/chunks/chunk-QXAJXTXV.js +0 -19
- package/chunks/chunk-RCO57B6F.js +0 -9
- package/chunks/chunk-SQZGZ3VT.js +0 -15
- package/chunks/chunk-TTZHPIH7.js +0 -237
- package/chunks/chunk-UYTXXUU7.js +0 -54
- package/chunks/chunk-VTPRO4NJ.js +0 -10
- package/chunks/chunk-VYW4IADX.js +0 -35
- package/chunks/chunk-VZDUZTW6.js +0 -113
- package/chunks/chunk-W5A2TON3.js +0 -10
- package/chunks/chunk-W7YBGJ4H.js +0 -28
- package/chunks/chunk-WLL3FNVL.js +0 -40
- package/chunks/chunk-WOAYU6LB.js +0 -13
- package/chunks/chunk-XA4HVHJ4.js +0 -18
- package/chunks/chunk-XN3PZIVL.js +0 -38
- package/chunks/chunk-Y3OZHZUF.js +0 -237
- package/chunks/chunk-YDIBNEGA.js +0 -9
- package/chunks/chunk-ZC5RZBNY.js +0 -33
- package/components/Comp/index.d.ts +0 -1
- package/node/files/index.d.ts +0 -9
- package/node/files/index.js +0 -21
- package/node/files/is-in-directory/index.d.ts +0 -1
- package/node/files/is-in-directory/index.js +0 -6
- package/node/files/read-write/index.d.ts +0 -9
- package/node/files/read-write/index.js +0 -6
- package/node/files/subpaths/index.d.ts +0 -34
- package/node/files/subpaths/index.js +0 -7
- package/node/image/index.d.ts +0 -9
- package/node/image/index.js +0 -74
- package/node/mxfb-cli-config/index.d.ts +0 -19
- package/node/mxfb-cli-config/index.js +0 -113
- package/node/process/index.d.ts +0 -8
- package/node/process/index.js +0 -20
- package/node/process/on-exit/index.d.ts +0 -5
- package/node/process/on-exit/index.js +0 -14
- package/shared/errors/index.d.ts +0 -138
- package/shared/index.d.ts +0 -0
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
export declare namespace Logs {
|
|
2
|
-
export function makeTextBlock(text: string, vPadding?: number, hPadding?: number): string;
|
|
3
|
-
export const styles: {
|
|
4
|
-
regular: (text: string) => string;
|
|
5
|
-
light: (text: string) => string;
|
|
6
|
-
danger: (text: string) => string;
|
|
7
|
-
important: (text: string) => string;
|
|
8
|
-
title: (text: string) => string;
|
|
9
|
-
info: (text: string) => string;
|
|
10
|
-
error: (text: string) => string;
|
|
11
|
-
warning: (text: string) => string;
|
|
12
|
-
};
|
|
13
|
-
type ConsoleMethod = 'assert' | 'count' | 'countReset' | 'debug' | 'dir' | 'dirxml' | 'error' | 'group' | 'groupCollapsed' | 'groupEnd' | 'info' | 'log' | 'table' | 'time' | 'timeEnd' | 'trace' | 'warn';
|
|
14
|
-
type ConsoleMethodsParams = {
|
|
15
|
-
assert: Parameters<typeof console.assert>;
|
|
16
|
-
count: Parameters<typeof console.count>;
|
|
17
|
-
countReset: Parameters<typeof console.countReset>;
|
|
18
|
-
debug: Parameters<typeof console.debug>;
|
|
19
|
-
dir: Parameters<typeof console.dir>;
|
|
20
|
-
dirxml: Parameters<typeof console.dirxml>;
|
|
21
|
-
error: Parameters<typeof console.error>;
|
|
22
|
-
group: Parameters<typeof console.group>;
|
|
23
|
-
groupCollapsed: Parameters<typeof console.groupCollapsed>;
|
|
24
|
-
groupEnd: Parameters<typeof console.groupEnd>;
|
|
25
|
-
info: Parameters<typeof console.info>;
|
|
26
|
-
log: Parameters<typeof console.log>;
|
|
27
|
-
table: Parameters<typeof console.table>;
|
|
28
|
-
time: Parameters<typeof console.time>;
|
|
29
|
-
timeEnd: Parameters<typeof console.timeEnd>;
|
|
30
|
-
trace: Parameters<typeof console.trace>;
|
|
31
|
-
warn: Parameters<typeof console.warn>;
|
|
32
|
-
};
|
|
33
|
-
class Log<T extends ConsoleMethod = ConsoleMethod> {
|
|
34
|
-
type: T;
|
|
35
|
-
data: ConsoleMethodsParams[T];
|
|
36
|
-
time: Date;
|
|
37
|
-
stack: string;
|
|
38
|
-
constructor(type: T, data: ConsoleMethodsParams[T]);
|
|
39
|
-
get displayTime(): string;
|
|
40
|
-
get elapsedTimeMs(): number;
|
|
41
|
-
get displayStack(): string;
|
|
42
|
-
}
|
|
43
|
-
export class Logger {
|
|
44
|
-
_private_threads: Map<string, Log[]>;
|
|
45
|
-
constructor();
|
|
46
|
-
dir(thread: string | undefined, ...args: ConsoleMethodsParams['dir']): void;
|
|
47
|
-
error(thread?: string, ...args: ConsoleMethodsParams['error']): void;
|
|
48
|
-
log(thread?: string, ...args: ConsoleMethodsParams['log']): void;
|
|
49
|
-
warn(thread?: string, ...args: ConsoleMethodsParams['warn']): void;
|
|
50
|
-
setLog<T extends ConsoleMethod>(threadName: string, type: T, data: ConsoleMethodsParams[T]): this;
|
|
51
|
-
print(this: Logger, threadFilter?: string, withStack?: boolean): void;
|
|
52
|
-
printThreads(this: Logger, withStack?: boolean): void;
|
|
53
|
-
}
|
|
54
|
-
export {};
|
|
55
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare namespace Random {
|
|
2
|
-
function random(bound1?: number): number | undefined;
|
|
3
|
-
function random(bound1?: number, bound2?: number | undefined): number | undefined;
|
|
4
|
-
function randomInt(...args: Parameters<typeof random>): number | undefined;
|
|
5
|
-
const hexChars: string[];
|
|
6
|
-
function randomHexChar(): string;
|
|
7
|
-
function randomHash(length?: number): string;
|
|
8
|
-
function randomHashPattern(pattern: number[], joiner?: string): string;
|
|
9
|
-
function randomUUID(): string;
|
|
10
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
export declare namespace Tennis {
|
|
2
|
-
namespace Score {
|
|
3
|
-
type PointDescriptor = boolean;
|
|
4
|
-
type GameFormat = {
|
|
5
|
-
upTo: number;
|
|
6
|
-
diffToWin: number;
|
|
7
|
-
};
|
|
8
|
-
class Game {
|
|
9
|
-
private format;
|
|
10
|
-
private pointsSequence;
|
|
11
|
-
constructor(format: GameFormat);
|
|
12
|
-
add(point: PointDescriptor): this;
|
|
13
|
-
getNumericScore(): [number, number];
|
|
14
|
-
static numericToStringScoreValue(numScore: [number, number]): string;
|
|
15
|
-
getScore(): string;
|
|
16
|
-
isFinished(): boolean;
|
|
17
|
-
getWinner(): boolean | null;
|
|
18
|
-
}
|
|
19
|
-
type SetFormat = {
|
|
20
|
-
upTo: number;
|
|
21
|
-
diffToWin: number;
|
|
22
|
-
gamesFormat: GameFormat;
|
|
23
|
-
tieBreakAt: number | null;
|
|
24
|
-
tieBreakFormat: GameFormat;
|
|
25
|
-
};
|
|
26
|
-
class Set {
|
|
27
|
-
private format;
|
|
28
|
-
private pointsSequence;
|
|
29
|
-
constructor(format: SetFormat);
|
|
30
|
-
add(point: PointDescriptor): void;
|
|
31
|
-
getGames(): Game[];
|
|
32
|
-
getNumericScore(): {
|
|
33
|
-
games: [number, number];
|
|
34
|
-
currentGame?: [number, number];
|
|
35
|
-
};
|
|
36
|
-
getScore(): string;
|
|
37
|
-
isFinished(): boolean;
|
|
38
|
-
getWinner(): boolean | null;
|
|
39
|
-
}
|
|
40
|
-
type MatchFormat = {
|
|
41
|
-
upTo: number;
|
|
42
|
-
setsFormat: SetFormat;
|
|
43
|
-
lastSetFormat: SetFormat;
|
|
44
|
-
};
|
|
45
|
-
class Match {
|
|
46
|
-
private format;
|
|
47
|
-
private pointsSequence;
|
|
48
|
-
constructor(format: MatchFormat);
|
|
49
|
-
add(point: PointDescriptor): void;
|
|
50
|
-
getSets(): Set[];
|
|
51
|
-
getNumericScore(): {
|
|
52
|
-
sets: [number, number][];
|
|
53
|
-
currentGame?: [number, number];
|
|
54
|
-
};
|
|
55
|
-
getScore(): string;
|
|
56
|
-
isFinished(): boolean;
|
|
57
|
-
getWinner(): boolean | null;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function absoluteModulo(nbr: number, modulo: number): number;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function clamp(num: number, bound1: number, bound2: number): number;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { absoluteModulo as absoluteModuloFunc } from './absolute-modulo';
|
|
2
|
-
import { clamp as clampFunc } from './clamp';
|
|
3
|
-
import { interpolate as interpolateFunc } from './interpolate';
|
|
4
|
-
import { getHarmonic as getHarmonicFunc, createScale as createScaleFunc } from './responsive-harmonics';
|
|
5
|
-
import { round as roundFunc } from './round';
|
|
6
|
-
export declare namespace Numbers {
|
|
7
|
-
const absoluteModulo: typeof absoluteModuloFunc;
|
|
8
|
-
const clamp: typeof clampFunc;
|
|
9
|
-
const interpolate: typeof interpolateFunc;
|
|
10
|
-
const getHarmonic: typeof getHarmonicFunc;
|
|
11
|
-
const createScale: typeof createScaleFunc;
|
|
12
|
-
const round: typeof roundFunc;
|
|
13
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
absoluteModulo
|
|
3
|
-
} from "../../chunks/chunk-DNIOWD7K.js";
|
|
4
|
-
import {
|
|
5
|
-
interpolate
|
|
6
|
-
} from "../../chunks/chunk-EW46EXFB.js";
|
|
7
|
-
import {
|
|
8
|
-
createScale,
|
|
9
|
-
getHarmonic
|
|
10
|
-
} from "../../chunks/chunk-UYTXXUU7.js";
|
|
11
|
-
import {
|
|
12
|
-
round
|
|
13
|
-
} from "../../chunks/chunk-32IRF4OP.js";
|
|
14
|
-
import {
|
|
15
|
-
clamp
|
|
16
|
-
} from "../../chunks/chunk-OSAXBA7G.js";
|
|
17
|
-
|
|
18
|
-
// src/agnostic/numbers/index.ts
|
|
19
|
-
var Numbers;
|
|
20
|
-
((Numbers2) => {
|
|
21
|
-
Numbers2.absoluteModulo = absoluteModulo;
|
|
22
|
-
Numbers2.clamp = clamp;
|
|
23
|
-
Numbers2.interpolate = interpolate;
|
|
24
|
-
Numbers2.getHarmonic = getHarmonic;
|
|
25
|
-
Numbers2.createScale = createScale;
|
|
26
|
-
Numbers2.round = round;
|
|
27
|
-
})(Numbers || (Numbers = {}));
|
|
28
|
-
export {
|
|
29
|
-
Numbers
|
|
30
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function interpolate(ratio: number, bound1: number, bound2: number): number;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare function getHarmonic(min: number, max: number, level: number, steps: number): number;
|
|
2
|
-
type ScaleDescriptor = {
|
|
3
|
-
screenBounds: [number, number];
|
|
4
|
-
lowLevel: [number, number];
|
|
5
|
-
highLevel: [number, number];
|
|
6
|
-
steps: number;
|
|
7
|
-
clamp?: boolean;
|
|
8
|
-
};
|
|
9
|
-
export declare function createScale(descriptor: ScaleDescriptor): (level: number) => string | undefined;
|
|
10
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function round(number: number, nbDecimals: number): number;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isInEnum<E extends Record<string, string | number>>(enumObj: E, value: string | number): value is E[keyof E];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function flattenGetters(obj: unknown): Record<string, unknown>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Enums as EnumsNamespace } from './enums';
|
|
2
|
-
import { flattenGetters as flattenGettersFunc } from './flatten-getters';
|
|
3
|
-
import { isObject as isObjectFunc } from './is-object';
|
|
4
|
-
import { isRecord as isRecordFunc } from './is-record';
|
|
5
|
-
import { Validation as ValidationNamespace } from './validation';
|
|
6
|
-
export declare namespace Objects {
|
|
7
|
-
export import Enums = EnumsNamespace;
|
|
8
|
-
const flattenGetters: typeof flattenGettersFunc;
|
|
9
|
-
const isObject: typeof isObjectFunc;
|
|
10
|
-
const isRecord: typeof isRecordFunc;
|
|
11
|
-
export import Validation = ValidationNamespace;
|
|
12
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
flattenGetters
|
|
3
|
-
} from "../../chunks/chunk-PO3V3I57.js";
|
|
4
|
-
import {
|
|
5
|
-
isRecord
|
|
6
|
-
} from "../../chunks/chunk-YDIBNEGA.js";
|
|
7
|
-
import {
|
|
8
|
-
isObject
|
|
9
|
-
} from "../../chunks/chunk-K37RALUX.js";
|
|
10
|
-
import {
|
|
11
|
-
Validation
|
|
12
|
-
} from "../../chunks/chunk-FPEW3A27.js";
|
|
13
|
-
import {
|
|
14
|
-
Enums
|
|
15
|
-
} from "../../chunks/chunk-WOAYU6LB.js";
|
|
16
|
-
import "../../chunks/chunk-E6MSDKON.js";
|
|
17
|
-
import "../../chunks/chunk-4QQBKBYH.js";
|
|
18
|
-
import "../../chunks/chunk-QXAJXTXV.js";
|
|
19
|
-
import "../../chunks/chunk-HC6ZOHCS.js";
|
|
20
|
-
|
|
21
|
-
// src/agnostic/objects/index.ts
|
|
22
|
-
var Objects;
|
|
23
|
-
((Objects2) => {
|
|
24
|
-
Objects2.Enums = Enums;
|
|
25
|
-
Objects2.flattenGetters = flattenGetters;
|
|
26
|
-
Objects2.isObject = isObject;
|
|
27
|
-
Objects2.isRecord = isRecord;
|
|
28
|
-
Objects2.Validation = Validation;
|
|
29
|
-
})(Objects || (Objects = {}));
|
|
30
|
-
export {
|
|
31
|
-
Objects
|
|
32
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isObject(unk: unknown): unk is object;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isRecord(input: unknown): input is Record<string, unknown>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export type FormatKey<Input extends {} = any> = keyof Input | string;
|
|
2
|
-
export type InputValue<Input extends {}, Key extends FormatKey<Input>> = Input extends Record<Key, infer V> ? V : undefined;
|
|
3
|
-
export type FormatterFunc<I, O> = (val: I) => O | Promise<O>;
|
|
4
|
-
export type Format<Input extends {} = any> = {
|
|
5
|
-
[Key in FormatKey<Input>]: FormatterFunc<InputValue<Input, Key>, any>;
|
|
6
|
-
};
|
|
7
|
-
export type UnwrapPromise<PromiseOrNot> = PromiseOrNot extends Promise<infer Resolved> ? Resolved : PromiseOrNot;
|
|
8
|
-
export type Formatted<F extends Format<{}>> = {
|
|
9
|
-
[Key in keyof F]: UnwrapPromise<ReturnType<F[Key]>>;
|
|
10
|
-
};
|
|
11
|
-
export default function recordFormat<I extends {}, F extends Format<I>>(input: I, format: F): Promise<Formatted<F>>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// src/agnostic/objects/record-format/index.ts
|
|
2
|
-
async function recordFormat(input, format) {
|
|
3
|
-
const result = {};
|
|
4
|
-
for (const key in format) {
|
|
5
|
-
const formatter = format[key];
|
|
6
|
-
if (typeof formatter === "function") {
|
|
7
|
-
result[key] = await formatter(input[key]);
|
|
8
|
-
} else {
|
|
9
|
-
result[key] = formatter;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
return result;
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
15
|
-
recordFormat as default
|
|
16
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { memoize as memoizeFunc } from './memoize';
|
|
2
|
-
import { throttle as throttleFunc, debounce as debounceFunc } from './throttle-debounce';
|
|
3
|
-
export declare namespace Optim {
|
|
4
|
-
const memoize: typeof memoizeFunc;
|
|
5
|
-
const throttle: typeof throttleFunc;
|
|
6
|
-
const debounce: typeof debounceFunc;
|
|
7
|
-
}
|
package/agnostic/optim/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
debounce,
|
|
3
|
-
throttle
|
|
4
|
-
} from "../../chunks/chunk-VZDUZTW6.js";
|
|
5
|
-
import {
|
|
6
|
-
memoize
|
|
7
|
-
} from "../../chunks/chunk-JWBDZPQG.js";
|
|
8
|
-
|
|
9
|
-
// src/agnostic/optim/index.ts
|
|
10
|
-
var Optim;
|
|
11
|
-
((Optim2) => {
|
|
12
|
-
Optim2.memoize = memoize;
|
|
13
|
-
Optim2.throttle = throttle;
|
|
14
|
-
Optim2.debounce = debounce;
|
|
15
|
-
})(Optim || (Optim = {}));
|
|
16
|
-
export {
|
|
17
|
-
Optim
|
|
18
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
type BasicFunction = (...args: any[]) => any;
|
|
2
|
-
/**
|
|
3
|
-
* Returns a throttled version of the function passed as an argument
|
|
4
|
-
* @param toThrottleFunc - The function that has to be throttled
|
|
5
|
-
* @param delayMs - The throttle delay in ms
|
|
6
|
-
*/
|
|
7
|
-
export declare function throttle<T extends BasicFunction = BasicFunction>(toThrottleFunc: T, delayMs: number): {
|
|
8
|
-
throttled: (...args: any[]) => {
|
|
9
|
-
returnValue: ReturnType<T> | undefined;
|
|
10
|
-
lastExecutedOn: number;
|
|
11
|
-
delayMs: number;
|
|
12
|
-
isCached: boolean;
|
|
13
|
-
};
|
|
14
|
-
setDelay: (delayMs: number) => void;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Returns a debounced version of the function passed as an argument
|
|
18
|
-
* @param toDebounceFunc - The function that has to be debounced
|
|
19
|
-
* @param delayMs - The debounce delay in ms
|
|
20
|
-
*/
|
|
21
|
-
export declare function debounce<T extends BasicFunction = BasicFunction>(toDebounceFunc: T, delayMs: number): {
|
|
22
|
-
debounced: (...args: any[]) => {
|
|
23
|
-
returnValue: ReturnType<T> | undefined;
|
|
24
|
-
lastExecutedOn: number;
|
|
25
|
-
delayMs: number;
|
|
26
|
-
isCached: boolean;
|
|
27
|
-
};
|
|
28
|
-
setDelay: (delayMs: number) => void;
|
|
29
|
-
};
|
|
30
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export declare namespace Regexps {
|
|
2
|
-
function mergeFlags(...flagStrs: string[]): string;
|
|
3
|
-
function setFlags(regexp: RegExp, _flags: string): RegExp;
|
|
4
|
-
function fromStart(regexp: RegExp, _flags?: string): RegExp;
|
|
5
|
-
function toEnd(regexp: RegExp, _flags?: string): RegExp;
|
|
6
|
-
function fromStartToEnd(regexp: RegExp, _flags?: string): RegExp;
|
|
7
|
-
function stringStartsWith(string: string, _regexp: RegExp): boolean;
|
|
8
|
-
function stringStartsWith(string: string, _regexp: RegExp, returnMatches: true): RegExpMatchArray | null;
|
|
9
|
-
function stringStartsWith(string: string, _regexp: RegExp, returnMatches: false): boolean;
|
|
10
|
-
function stringStartsWith(string: string, _regexp: RegExp, returnMatches: false, _flags: string): boolean;
|
|
11
|
-
function stringStartsWith(string: string, _regexp: RegExp, returnMatches: true, _flags: string): RegExpMatchArray | null;
|
|
12
|
-
function stringEndsWith(string: string, _regexp: RegExp): boolean;
|
|
13
|
-
function stringEndsWith(string: string, _regexp: RegExp, returnMatches: true): RegExpMatchArray | null;
|
|
14
|
-
function stringEndsWith(string: string, _regexp: RegExp, returnMatches: false): boolean;
|
|
15
|
-
function stringEndsWith(string: string, _regexp: RegExp, returnMatches: false, _flags: string): boolean;
|
|
16
|
-
function stringEndsWith(string: string, _regexp: RegExp, returnMatches: true, _flags: string): RegExpMatchArray | null;
|
|
17
|
-
function stringIs(string: string, _regexp: RegExp): boolean;
|
|
18
|
-
function stringIs(string: string, _regexp: RegExp, returnMatches: true): RegExpMatchArray | null;
|
|
19
|
-
function stringIs(string: string, _regexp: RegExp, returnMatches: false): boolean;
|
|
20
|
-
function stringIs(string: string, _regexp: RegExp, returnMatches: false, _flags: string): boolean;
|
|
21
|
-
function stringIs(string: string, _regexp: RegExp, returnMatches: true, _flags: string): RegExpMatchArray | null;
|
|
22
|
-
function fromStrings(strings: string[]): RegExp;
|
|
23
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
// src/agnostic/regexps/index.ts
|
|
2
|
-
var Regexps;
|
|
3
|
-
((Regexps2) => {
|
|
4
|
-
function mergeFlags(...flagStrs) {
|
|
5
|
-
const flagsSet = /* @__PURE__ */ new Set();
|
|
6
|
-
flagStrs.forEach(
|
|
7
|
-
(flagStr) => flagStr.split("").forEach((char) => flagsSet.add(char))
|
|
8
|
-
);
|
|
9
|
-
return Array.from(flagsSet.values()).join("");
|
|
10
|
-
}
|
|
11
|
-
Regexps2.mergeFlags = mergeFlags;
|
|
12
|
-
function setFlags(regexp, _flags) {
|
|
13
|
-
const flags = mergeFlags(regexp.flags, _flags);
|
|
14
|
-
return new RegExp(`${regexp.source}`, flags);
|
|
15
|
-
}
|
|
16
|
-
Regexps2.setFlags = setFlags;
|
|
17
|
-
function fromStart(regexp, _flags = "g") {
|
|
18
|
-
const flags = mergeFlags(regexp.flags, _flags);
|
|
19
|
-
return new RegExp(`^(${regexp.source})`, flags);
|
|
20
|
-
}
|
|
21
|
-
Regexps2.fromStart = fromStart;
|
|
22
|
-
function toEnd(regexp, _flags = "g") {
|
|
23
|
-
const flags = mergeFlags(regexp.flags, _flags);
|
|
24
|
-
return new RegExp(`(${regexp.source})$`, flags);
|
|
25
|
-
}
|
|
26
|
-
Regexps2.toEnd = toEnd;
|
|
27
|
-
function fromStartToEnd(regexp, _flags = "g") {
|
|
28
|
-
const flags = mergeFlags(regexp.flags, _flags);
|
|
29
|
-
return fromStart(toEnd(regexp, flags), flags);
|
|
30
|
-
}
|
|
31
|
-
Regexps2.fromStartToEnd = fromStartToEnd;
|
|
32
|
-
function stringStartsWith(string, _regexp, returnMatches = true, _flags = "g") {
|
|
33
|
-
const regexp = fromStart(_regexp, _flags);
|
|
34
|
-
return returnMatches ? string.match(regexp) : regexp.test(string);
|
|
35
|
-
}
|
|
36
|
-
Regexps2.stringStartsWith = stringStartsWith;
|
|
37
|
-
function stringEndsWith(string, _regexp, returnMatches = true, _flags = "g") {
|
|
38
|
-
const regexp = toEnd(_regexp, _flags);
|
|
39
|
-
return returnMatches ? string.match(regexp) : regexp.test(string);
|
|
40
|
-
}
|
|
41
|
-
Regexps2.stringEndsWith = stringEndsWith;
|
|
42
|
-
function stringIs(string, _regexp, returnMatches = false, _flags = "g") {
|
|
43
|
-
const regexp = fromStartToEnd(_regexp, _flags);
|
|
44
|
-
return returnMatches ? string.match(regexp) : regexp.test(string);
|
|
45
|
-
}
|
|
46
|
-
Regexps2.stringIs = stringIs;
|
|
47
|
-
function fromStrings(strings) {
|
|
48
|
-
const rootsMap = stringsToRootsMap(strings);
|
|
49
|
-
const source = sourceFromRootsMap(rootsMap, false);
|
|
50
|
-
const regexp = new RegExp(source);
|
|
51
|
-
return regexp;
|
|
52
|
-
}
|
|
53
|
-
Regexps2.fromStrings = fromStrings;
|
|
54
|
-
function escape(string) {
|
|
55
|
-
return string.replace(/\s/igm, "\\s").replace(/\n/igm, "\\n").replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
56
|
-
}
|
|
57
|
-
function stringsToRootsMap(strings, rootsMap = /* @__PURE__ */ new Map()) {
|
|
58
|
-
const lengthSorted = strings.sort((strA, strB) => strA.length - strB.length);
|
|
59
|
-
lengthSorted.forEach((string) => {
|
|
60
|
-
const [firstChar, ...lastChars] = string.split("");
|
|
61
|
-
const isWordEnd = lastChars.length === 0;
|
|
62
|
-
if (firstChar === void 0) return;
|
|
63
|
-
const roots = Array.from(rootsMap.keys());
|
|
64
|
-
const foundRoot = roots.find((root) => new RegExp(`^(${escape(root)})`).test(string));
|
|
65
|
-
const subRootsMap = foundRoot !== void 0 ? rootsMap.get(foundRoot)?.subRootsMap : void 0;
|
|
66
|
-
if (foundRoot === void 0 || subRootsMap === void 0) {
|
|
67
|
-
const subRootsMap2 = /* @__PURE__ */ new Map();
|
|
68
|
-
stringsToRootsMap([lastChars.join("")], subRootsMap2);
|
|
69
|
-
return rootsMap.set(firstChar, { subRootsMap: subRootsMap2, isWordEnd });
|
|
70
|
-
}
|
|
71
|
-
stringsToRootsMap([lastChars.join("")], subRootsMap);
|
|
72
|
-
});
|
|
73
|
-
return rootsMap;
|
|
74
|
-
}
|
|
75
|
-
function sourceFromRootsMap(rootsMap, isOptional) {
|
|
76
|
-
const rootsMapEntries = Array.from(rootsMap.entries());
|
|
77
|
-
if (rootsMapEntries.length === 0) return "";
|
|
78
|
-
const regexpBody = rootsMapEntries.map(([root, rootData]) => {
|
|
79
|
-
return `${escape(root)}${sourceFromRootsMap(
|
|
80
|
-
rootData.subRootsMap,
|
|
81
|
-
rootData.isWordEnd
|
|
82
|
-
)}`;
|
|
83
|
-
}).join("|");
|
|
84
|
-
return isOptional ? `(${regexpBody})?` : `(${regexpBody})`;
|
|
85
|
-
}
|
|
86
|
-
})(Regexps || (Regexps = {}));
|
|
87
|
-
export {
|
|
88
|
-
Regexps
|
|
89
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare namespace CharCodes {
|
|
2
|
-
type CharCode = number;
|
|
3
|
-
type B36CharCode = string;
|
|
4
|
-
function charCodeToB36(charCode: CharCode): B36CharCode;
|
|
5
|
-
function b36CharCodeToCharCode(b36CharCode: B36CharCode): CharCode;
|
|
6
|
-
function charToCharCode(char: string): CharCode;
|
|
7
|
-
function charToB36CharCode(char: string): B36CharCode;
|
|
8
|
-
function charFromCharCode(charCode: CharCode): string;
|
|
9
|
-
function charFromB36CharCode(b36CharCode: B36CharCode): string;
|
|
10
|
-
function toCharCodes(string: string): Array<CharCode>;
|
|
11
|
-
function toB36CharCodes(string: string): Array<B36CharCode>;
|
|
12
|
-
function fromCharCodes(charCodes: Array<CharCode>): string;
|
|
13
|
-
function fromB36CharCodes(b36CharCodes: Array<B36CharCode>): string;
|
|
14
|
-
function serialize(charCodes: Array<CharCode | B36CharCode>): string;
|
|
15
|
-
function deserialize(serializedCharCodes: string): Array<CharCode>;
|
|
16
|
-
function fromSerialized(serializedCharCodes: string): string;
|
|
17
|
-
}
|