@mxfb/tools 0.1.1 → 0.2.3

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 (184) hide show
  1. package/agnostic/index.d.ts +1 -23
  2. package/agnostic/misc/elo/index.d.ts +31 -0
  3. package/agnostic/misc/elo/index.js +6 -0
  4. package/agnostic/misc/index.d.ts +4 -20
  5. package/agnostic/misc/index.js +6 -35
  6. package/agnostic/misc/tennis/index.d.ts +60 -0
  7. package/agnostic/misc/tennis/index.js +6 -0
  8. package/chunks/chunk-TTZHPIH7.js +237 -0
  9. package/chunks/chunk-ZC5RZBNY.js +33 -0
  10. package/components/index.d.ts +1 -4
  11. package/node/index.d.ts +2 -6
  12. package/package.json +15 -15
  13. package/shared/errors/index.d.ts +132 -8
  14. package/agnostic/arrays/index.d.ts +0 -11
  15. package/agnostic/arrays/is-array-of/index.d.ts +0 -5
  16. package/agnostic/arrays/is-array-of/index.js +0 -23
  17. package/agnostic/async/index.d.ts +0 -8
  18. package/agnostic/async/index.js +0 -20
  19. package/agnostic/async/timeout-call/index.d.ts +0 -1
  20. package/agnostic/async/timeout-call/index.js +0 -6
  21. package/agnostic/async/transitions/index.d.ts +0 -41
  22. package/agnostic/async/transitions/index.js +0 -7
  23. package/agnostic/async/wait/index.d.ts +0 -1
  24. package/agnostic/async/wait/index.js +0 -6
  25. package/agnostic/booleans/index.d.ts +0 -8
  26. package/agnostic/booleans/index.js +0 -17
  27. package/agnostic/booleans/is-falsy/index.d.ts +0 -7
  28. package/agnostic/booleans/is-falsy/index.js +0 -11
  29. package/agnostic/css/bem/BEM.d.ts +0 -29
  30. package/agnostic/css/bem/getNamesArr.d.ts +0 -2
  31. package/agnostic/css/bem/index.d.ts +0 -7
  32. package/agnostic/css/bem/index.js +0 -9
  33. package/agnostic/css/generate-nice-color/index.d.ts +0 -2
  34. package/agnostic/css/generate-nice-color/index.js +0 -8
  35. package/agnostic/css/index.d.ts +0 -14
  36. package/agnostic/css/index.js +0 -177
  37. package/agnostic/css/is-valid-css-class-name/index.d.ts +0 -2
  38. package/agnostic/css/is-valid-css-class-name/index.js +0 -8
  39. package/agnostic/css/styles-set/index.d.ts +0 -37
  40. package/agnostic/errors/index.d.ts +0 -30
  41. package/agnostic/errors/index.js +0 -6
  42. package/agnostic/html/get-node-ancestors/index.d.ts +0 -1
  43. package/agnostic/html/get-node-ancestors/index.js +0 -6
  44. package/agnostic/html/get-position-inside-parent/index.d.ts +0 -1
  45. package/agnostic/html/get-position-inside-parent/index.js +0 -6
  46. package/agnostic/html/index.d.ts +0 -17
  47. package/agnostic/html/index.js +0 -39
  48. package/agnostic/html/insert-node/index.d.ts +0 -2
  49. package/agnostic/html/insert-node/index.js +0 -6
  50. package/agnostic/html/placeholders/index.d.ts +0 -9
  51. package/agnostic/html/placeholders/index.js +0 -6
  52. package/agnostic/html/sanitize/index.d.ts +0 -24
  53. package/agnostic/html/sanitize/index.js +0 -9
  54. package/agnostic/html/selector-to-element/index.d.ts +0 -1
  55. package/agnostic/html/selector-to-element/index.js +0 -9
  56. package/agnostic/html/string-to-nodes/index.d.ts +0 -7
  57. package/agnostic/html/string-to-nodes/index.js +0 -10
  58. package/agnostic/misc/assert/index.d.ts +0 -5
  59. package/agnostic/misc/assert/index.js +0 -6
  60. package/agnostic/misc/cast/index.d.ts +0 -9
  61. package/agnostic/misc/cast/index.js +0 -8
  62. package/agnostic/misc/crossenv/index.d.ts +0 -13
  63. package/agnostic/misc/crossenv/index.js +0 -6
  64. package/agnostic/misc/get-current-downlink/index.d.ts +0 -1
  65. package/agnostic/misc/get-current-downlink/index.js +0 -6
  66. package/agnostic/misc/is-constructor-function/index.d.ts +0 -2
  67. package/agnostic/misc/is-constructor-function/index.js +0 -6
  68. package/agnostic/misc/is-nullish/index.d.ts +0 -4
  69. package/agnostic/misc/is-nullish/index.js +0 -10
  70. package/agnostic/misc/logs/index.d.ts +0 -55
  71. package/agnostic/misc/logs/index.js +0 -6
  72. package/agnostic/misc/random/index.d.ts +0 -10
  73. package/agnostic/misc/random/index.js +0 -6
  74. package/agnostic/numbers/absolute-modulo/index.d.ts +0 -1
  75. package/agnostic/numbers/absolute-modulo/index.js +0 -6
  76. package/agnostic/numbers/clamp/index.d.ts +0 -1
  77. package/agnostic/numbers/clamp/index.js +0 -6
  78. package/agnostic/numbers/index.d.ts +0 -13
  79. package/agnostic/numbers/index.js +0 -30
  80. package/agnostic/numbers/interpolate/index.d.ts +0 -1
  81. package/agnostic/numbers/interpolate/index.js +0 -6
  82. package/agnostic/numbers/responsive-harmonics/index.d.ts +0 -10
  83. package/agnostic/numbers/responsive-harmonics/index.js +0 -9
  84. package/agnostic/numbers/round/index.d.ts +0 -1
  85. package/agnostic/numbers/round/index.js +0 -6
  86. package/agnostic/objects/enums/index.d.ts +0 -4
  87. package/agnostic/objects/enums/index.js +0 -7
  88. package/agnostic/objects/enums/is-in-enum/index.d.ts +0 -1
  89. package/agnostic/objects/enums/is-in-enum/index.js +0 -6
  90. package/agnostic/objects/flatten-getters/index.d.ts +0 -1
  91. package/agnostic/objects/flatten-getters/index.js +0 -9
  92. package/agnostic/objects/index.d.ts +0 -12
  93. package/agnostic/objects/index.js +0 -32
  94. package/agnostic/objects/is-object/index.d.ts +0 -1
  95. package/agnostic/objects/is-object/index.js +0 -6
  96. package/agnostic/objects/is-record/index.d.ts +0 -1
  97. package/agnostic/objects/is-record/index.js +0 -6
  98. package/agnostic/objects/record-format/index.d.ts +0 -11
  99. package/agnostic/objects/record-format/index.js +0 -16
  100. package/agnostic/objects/validation/index.d.ts +0 -3
  101. package/agnostic/objects/validation/index.js +0 -6
  102. package/agnostic/optim/index.d.ts +0 -7
  103. package/agnostic/optim/index.js +0 -18
  104. package/agnostic/optim/memoize/index.d.ts +0 -3
  105. package/agnostic/optim/memoize/index.js +0 -6
  106. package/agnostic/optim/throttle-debounce/index.d.ts +0 -30
  107. package/agnostic/optim/throttle-debounce/index.js +0 -8
  108. package/agnostic/optim/throttle-debounce/types.d.ts +0 -2
  109. package/agnostic/regexps/index.d.ts +0 -23
  110. package/agnostic/regexps/index.js +0 -89
  111. package/agnostic/strings/char-codes/index.d.ts +0 -17
  112. package/agnostic/strings/char-codes/index.js +0 -6
  113. package/agnostic/strings/index.d.ts +0 -14
  114. package/agnostic/strings/index.js +0 -32
  115. package/agnostic/strings/matches/index.d.ts +0 -3
  116. package/agnostic/strings/matches/index.js +0 -10
  117. package/agnostic/strings/normalize-indent/index.d.ts +0 -1
  118. package/agnostic/strings/normalize-indent/index.js +0 -6
  119. package/agnostic/strings/replace-all/index.d.ts +0 -1
  120. package/agnostic/strings/replace-all/index.js +0 -6
  121. package/agnostic/strings/to-alphanum/index.d.ts +0 -1
  122. package/agnostic/strings/to-alphanum/index.js +0 -6
  123. package/chunks/chunk-32IRF4OP.js +0 -9
  124. package/chunks/chunk-34U4HX4V.js +0 -73
  125. package/chunks/chunk-4GDNHUCZ.js +0 -162
  126. package/chunks/chunk-4QQBKBYH.js +0 -59
  127. package/chunks/chunk-4VC5PT5T.js +0 -13
  128. package/chunks/chunk-5LNUCDQ6.js +0 -132
  129. package/chunks/chunk-7AWTHZLY.js +0 -12
  130. package/chunks/chunk-7DBNMU6N.js +0 -14
  131. package/chunks/chunk-7YW5HL6N.js +0 -168
  132. package/chunks/chunk-COVPTTAD.js +0 -10
  133. package/chunks/chunk-DNIOWD7K.js +0 -8
  134. package/chunks/chunk-DQNJQBC6.js +0 -10
  135. package/chunks/chunk-E6MSDKON.js +0 -13
  136. package/chunks/chunk-EDVNAV3G.js +0 -72
  137. package/chunks/chunk-EW46EXFB.js +0 -8
  138. package/chunks/chunk-FPEW3A27.js +0 -14
  139. package/chunks/chunk-GJOU3UAL.js +0 -36
  140. package/chunks/chunk-HC6ZOHCS.js +0 -14
  141. package/chunks/chunk-HGCG2J77.js +0 -122
  142. package/chunks/chunk-IFD7GSGK.js +0 -130
  143. package/chunks/chunk-JQXNEJAP.js +0 -18
  144. package/chunks/chunk-JWBDZPQG.js +0 -18
  145. package/chunks/chunk-K37RALUX.js +0 -8
  146. package/chunks/chunk-KQT5CTGF.js +0 -21
  147. package/chunks/chunk-LEXQ6E6L.js +0 -31
  148. package/chunks/chunk-LQFKUNVQ.js +0 -19
  149. package/chunks/chunk-MF56TTC5.js +0 -15
  150. package/chunks/chunk-MT74WIQR.js +0 -41
  151. package/chunks/chunk-NRITRUZW.js +0 -10
  152. package/chunks/chunk-NRJQKVQV.js +0 -31
  153. package/chunks/chunk-OSAXBA7G.js +0 -10
  154. package/chunks/chunk-PO3V3I57.js +0 -23
  155. package/chunks/chunk-QXAJXTXV.js +0 -19
  156. package/chunks/chunk-RCO57B6F.js +0 -9
  157. package/chunks/chunk-SQZGZ3VT.js +0 -15
  158. package/chunks/chunk-UYTXXUU7.js +0 -54
  159. package/chunks/chunk-VTPRO4NJ.js +0 -10
  160. package/chunks/chunk-VYW4IADX.js +0 -35
  161. package/chunks/chunk-VZDUZTW6.js +0 -113
  162. package/chunks/chunk-W5A2TON3.js +0 -10
  163. package/chunks/chunk-W7YBGJ4H.js +0 -28
  164. package/chunks/chunk-WLL3FNVL.js +0 -40
  165. package/chunks/chunk-WOAYU6LB.js +0 -13
  166. package/chunks/chunk-XA4HVHJ4.js +0 -18
  167. package/chunks/chunk-XN3PZIVL.js +0 -38
  168. package/chunks/chunk-YDIBNEGA.js +0 -9
  169. package/components/Comp/index.d.ts +0 -1
  170. package/index.d.ts +0 -3
  171. package/node/files/index.d.ts +0 -9
  172. package/node/files/index.js +0 -21
  173. package/node/files/is-in-directory/index.d.ts +0 -1
  174. package/node/files/is-in-directory/index.js +0 -6
  175. package/node/files/read-write/index.d.ts +0 -9
  176. package/node/files/read-write/index.js +0 -6
  177. package/node/files/subpaths/index.d.ts +0 -34
  178. package/node/files/subpaths/index.js +0 -7
  179. package/node/image/index.d.ts +0 -9
  180. package/node/image/index.js +0 -74
  181. package/node/process/index.d.ts +0 -8
  182. package/node/process/index.js +0 -20
  183. package/node/process/on-exit/index.d.ts +0 -5
  184. package/node/process/on-exit/index.js +0 -14
@@ -1,30 +0,0 @@
1
- type AnyFunc = (...args: any[]) => any;
2
- type ParamsOfNullableFunc<F extends AnyFunc | undefined | null> = F extends AnyFunc ? Parameters<F> : [];
3
- type ReturnTypeOfNullableFunc<F extends AnyFunc | undefined | null> = F extends AnyFunc ? ReturnType<F> : undefined;
4
- export declare namespace Errors {
5
- type ErrFactory<Params extends any[] = any[], Details = any> = {
6
- message: string;
7
- makeDetails?: (...params: Params) => Details;
8
- };
9
- type ErrData<RS extends RegisterSource, C extends keyof RS> = {
10
- code: C;
11
- message: RS[C]['message'];
12
- details: ReturnTypeOfNullableFunc<RS[C]['makeDetails']>;
13
- };
14
- type RegisterSource<P extends any[] = any[], D = any> = {
15
- [code: string]: ErrFactory<P, D>;
16
- };
17
- class CustomError<RS extends RegisterSource, C extends keyof RS> extends Error {
18
- code: ErrData<RS, C>['code'];
19
- details: ErrData<RS, C>['details'];
20
- constructor(data: ErrData<RS, C>);
21
- }
22
- class Register<RS extends RegisterSource> {
23
- private _source;
24
- constructor(source: RS);
25
- getFactory<C extends keyof RS>(code: C): RS[C];
26
- getData<C extends keyof RS>(code: C, ...params: ParamsOfNullableFunc<RS[C]['makeDetails']>): ErrData<RS, C>;
27
- getError<C extends keyof RS>(code: C, ...params: ParamsOfNullableFunc<RS[C]['makeDetails']>): CustomError<RS, C>;
28
- }
29
- }
30
- export {};
@@ -1,6 +0,0 @@
1
- import {
2
- Errors
3
- } from "../../chunks/chunk-MT74WIQR.js";
4
- export {
5
- Errors
6
- };
@@ -1 +0,0 @@
1
- export declare function getNodeAncestors(node: Node): Element[];
@@ -1,6 +0,0 @@
1
- import {
2
- getNodeAncestors
3
- } from "../../../chunks/chunk-SQZGZ3VT.js";
4
- export {
5
- getNodeAncestors
6
- };
@@ -1 +0,0 @@
1
- export declare function getPositionInsideParent(node: Node): number | null;
@@ -1,6 +0,0 @@
1
- import {
2
- getPositionInsideParent
3
- } from "../../../chunks/chunk-VTPRO4NJ.js";
4
- export {
5
- getPositionInsideParent
6
- };
@@ -1,17 +0,0 @@
1
- import { getNodeAncestors as getNodeAncestorsFunc } from './get-node-ancestors';
2
- import { getPositionInsideParent as getPositionInsideParentFunc } from './get-position-inside-parent';
3
- import { InsertNodePosition as InsertNodePositionType, insertNode as insertNodeFunc } from './insert-node';
4
- import { Placeholders as PlaceholdersNamespace } from './placeholders';
5
- import { Sanitize as SanitizeNamespace } from './sanitize';
6
- import { selectorToElement as selectorToElementFunc } from './selector-to-element';
7
- import { stringToNodes as stringToNodesFunc } from './string-to-nodes';
8
- export declare namespace Html {
9
- const getNodeAncestors: typeof getNodeAncestorsFunc;
10
- const getPositionInsideParent: typeof getPositionInsideParentFunc;
11
- type InsertNodePosition = InsertNodePositionType;
12
- const insertNode: typeof insertNodeFunc;
13
- export import Placeholders = PlaceholdersNamespace;
14
- export import Sanitize = SanitizeNamespace;
15
- const selectorToElement: typeof selectorToElementFunc;
16
- const stringToNodes: typeof stringToNodesFunc;
17
- }
@@ -1,39 +0,0 @@
1
- import {
2
- insertNode
3
- } from "../../chunks/chunk-XA4HVHJ4.js";
4
- import {
5
- Placeholders
6
- } from "../../chunks/chunk-VYW4IADX.js";
7
- import {
8
- getPositionInsideParent
9
- } from "../../chunks/chunk-VTPRO4NJ.js";
10
- import {
11
- selectorToElement
12
- } from "../../chunks/chunk-XN3PZIVL.js";
13
- import {
14
- stringToNodes
15
- } from "../../chunks/chunk-NRJQKVQV.js";
16
- import {
17
- Sanitize
18
- } from "../../chunks/chunk-IFD7GSGK.js";
19
- import "../../chunks/chunk-KQT5CTGF.js";
20
- import "../../chunks/chunk-GJOU3UAL.js";
21
- import {
22
- getNodeAncestors
23
- } from "../../chunks/chunk-SQZGZ3VT.js";
24
- import "../../chunks/chunk-MT74WIQR.js";
25
-
26
- // src/agnostic/html/index.ts
27
- var Html;
28
- ((Html2) => {
29
- Html2.getNodeAncestors = getNodeAncestors;
30
- Html2.getPositionInsideParent = getPositionInsideParent;
31
- Html2.insertNode = insertNode;
32
- Html2.Placeholders = Placeholders;
33
- Html2.Sanitize = Sanitize;
34
- Html2.selectorToElement = selectorToElement;
35
- Html2.stringToNodes = stringToNodes;
36
- })(Html || (Html = {}));
37
- export {
38
- Html
39
- };
@@ -1,2 +0,0 @@
1
- export type InsertNodePosition = 'after' | 'before' | 'startof' | 'endof';
2
- export declare function insertNode(node: Node, position: InsertNodePosition, reference: Node): void;
@@ -1,6 +0,0 @@
1
- import {
2
- insertNode
3
- } from "../../../chunks/chunk-XA4HVHJ4.js";
4
- export {
5
- insertNode
6
- };
@@ -1,9 +0,0 @@
1
- export declare namespace Placeholders {
2
- const EightKiloByteOfLoremIpsumSentences: string[];
3
- const generateSentence: () => string | undefined;
4
- const generateSentences: (amount?: number) => (string | undefined)[];
5
- const generateTitle: () => string;
6
- const generateIntertitle: () => string;
7
- const generateParagraph: () => string;
8
- const generateContentPage: (len?: number) => string;
9
- }
@@ -1,6 +0,0 @@
1
- import {
2
- Placeholders
3
- } from "../../../chunks/chunk-VYW4IADX.js";
4
- export {
5
- Placeholders
6
- };
@@ -1,24 +0,0 @@
1
- export declare namespace Sanitize {
2
- type AttributeNameValPair = {
3
- attributeName: string | RegExp;
4
- attributeValues?: Array<string | RegExp>;
5
- };
6
- type Options = {
7
- inputFreeTransform?: (input: string) => string;
8
- keepComments?: boolean;
9
- allowedTags?: string[];
10
- forbiddenTags?: string[];
11
- allowedAttributes?: {
12
- [tagName: string]: AttributeNameValPair[];
13
- };
14
- forbiddenAttributes?: {
15
- [tagName: string]: AttributeNameValPair[];
16
- };
17
- depth?: number;
18
- verbose?: boolean;
19
- documentObj?: Document;
20
- };
21
- const defaultOptions: Options;
22
- function sanitize(inputStr: string, options?: Options): string;
23
- function sanitizeElement(element: Element, options?: Options): Element | null;
24
- }
@@ -1,9 +0,0 @@
1
- import {
2
- Sanitize
3
- } from "../../../chunks/chunk-IFD7GSGK.js";
4
- import "../../../chunks/chunk-KQT5CTGF.js";
5
- import "../../../chunks/chunk-GJOU3UAL.js";
6
- import "../../../chunks/chunk-MT74WIQR.js";
7
- export {
8
- Sanitize
9
- };
@@ -1 +0,0 @@
1
- export declare function selectorToElement(selector: string, documentObj?: Document): HTMLElement;
@@ -1,9 +0,0 @@
1
- import {
2
- selectorToElement
3
- } from "../../../chunks/chunk-XN3PZIVL.js";
4
- import "../../../chunks/chunk-KQT5CTGF.js";
5
- import "../../../chunks/chunk-GJOU3UAL.js";
6
- import "../../../chunks/chunk-MT74WIQR.js";
7
- export {
8
- selectorToElement
9
- };
@@ -1,7 +0,0 @@
1
- import { Sanitize } from '~/agnostic/html/sanitize';
2
- type Options = {
3
- sanitize?: Sanitize.Options;
4
- documentObj?: Document;
5
- };
6
- export declare function stringToNodes(dirtyStr: string, options?: Options): Node[];
7
- export {};
@@ -1,10 +0,0 @@
1
- import {
2
- stringToNodes
3
- } from "../../../chunks/chunk-NRJQKVQV.js";
4
- import "../../../chunks/chunk-IFD7GSGK.js";
5
- import "../../../chunks/chunk-KQT5CTGF.js";
6
- import "../../../chunks/chunk-GJOU3UAL.js";
7
- import "../../../chunks/chunk-MT74WIQR.js";
8
- export {
9
- stringToNodes
10
- };
@@ -1,5 +0,0 @@
1
- export declare namespace Assert {
2
- type Assertion = (() => boolean) | boolean;
3
- export function assert(label: string, assertion: Assertion | Array<Assertion>): void;
4
- export {};
5
- }
@@ -1,6 +0,0 @@
1
- import {
2
- Assert
3
- } from "../../../chunks/chunk-W7YBGJ4H.js";
4
- export {
5
- Assert
6
- };
@@ -1,9 +0,0 @@
1
- export declare namespace Cast {
2
- function toBoolean(value: unknown): boolean;
3
- function toNumber(value: unknown): number;
4
- function toString(value: unknown): string;
5
- function toNull(_value: unknown): null;
6
- function toArray(value: unknown): any[];
7
- function toNumberArr(value: unknown): number[];
8
- function toRecord(value: unknown): Record<string, unknown>;
9
- }
@@ -1,8 +0,0 @@
1
- import {
2
- Cast
3
- } from "../../../chunks/chunk-4QQBKBYH.js";
4
- import "../../../chunks/chunk-QXAJXTXV.js";
5
- import "../../../chunks/chunk-HC6ZOHCS.js";
6
- export {
7
- Cast
8
- };
@@ -1,13 +0,0 @@
1
- export declare namespace Crossenv {
2
- enum RuntimeName {
3
- NODE = "Node.js",
4
- BROWSER = "Browser",
5
- DENO = "Deno",
6
- REACT_NATIVE = "React Native",
7
- ELECTRON = "Electron",
8
- CLOUDFLARE = "Cloudflare Workers",
9
- AWS_LAMBDA = "AWS Lambda"
10
- }
11
- function detectRuntime(): RuntimeName | null;
12
- function getDocument(): Document | null;
13
- }
@@ -1,6 +0,0 @@
1
- import {
2
- Crossenv
3
- } from "../../../chunks/chunk-GJOU3UAL.js";
4
- export {
5
- Crossenv
6
- };
@@ -1 +0,0 @@
1
- export declare function getCurrentDownlink(): number | undefined;
@@ -1,6 +0,0 @@
1
- import {
2
- getCurrentDownlink
3
- } from "../../../chunks/chunk-7AWTHZLY.js";
4
- export {
5
- getCurrentDownlink
6
- };
@@ -1,2 +0,0 @@
1
- export type ConstructorFunction = new (...args: any[]) => any;
2
- export declare function isConstructorFunction(input: unknown): input is ConstructorFunction;
@@ -1,6 +0,0 @@
1
- import {
2
- isConstructorFunction
3
- } from "../../../chunks/chunk-RCO57B6F.js";
4
- export {
5
- isConstructorFunction
6
- };
@@ -1,4 +0,0 @@
1
- export declare const nullishValues: (null | undefined)[];
2
- export type Nullish = null | undefined;
3
- export declare function isNullish<T>(val: T | Nullish): val is Nullish;
4
- export declare function isNotNullish<T>(val: T): val is Exclude<T, Nullish>;
@@ -1,10 +0,0 @@
1
- import {
2
- isNotNullish,
3
- isNullish,
4
- nullishValues
5
- } from "../../../chunks/chunk-HC6ZOHCS.js";
6
- export {
7
- isNotNullish,
8
- isNullish,
9
- nullishValues
10
- };
@@ -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,6 +0,0 @@
1
- import {
2
- Logs
3
- } from "../../../chunks/chunk-5LNUCDQ6.js";
4
- export {
5
- Logs
6
- };
@@ -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,6 +0,0 @@
1
- import {
2
- Random
3
- } from "../../../chunks/chunk-WLL3FNVL.js";
4
- export {
5
- Random
6
- };
@@ -1 +0,0 @@
1
- export declare function absoluteModulo(nbr: number, modulo: number): number;
@@ -1,6 +0,0 @@
1
- import {
2
- absoluteModulo
3
- } from "../../../chunks/chunk-DNIOWD7K.js";
4
- export {
5
- absoluteModulo
6
- };
@@ -1 +0,0 @@
1
- export declare function clamp(num: number, bound1: number, bound2: number): number;
@@ -1,6 +0,0 @@
1
- import {
2
- clamp
3
- } from "../../../chunks/chunk-OSAXBA7G.js";
4
- export {
5
- clamp
6
- };
@@ -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
- clamp
6
- } from "../../chunks/chunk-OSAXBA7G.js";
7
- import {
8
- createScale,
9
- getHarmonic
10
- } from "../../chunks/chunk-UYTXXUU7.js";
11
- import {
12
- interpolate
13
- } from "../../chunks/chunk-EW46EXFB.js";
14
- import {
15
- round
16
- } from "../../chunks/chunk-32IRF4OP.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,6 +0,0 @@
1
- import {
2
- interpolate
3
- } from "../../../chunks/chunk-EW46EXFB.js";
4
- export {
5
- interpolate
6
- };
@@ -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,9 +0,0 @@
1
- import {
2
- createScale,
3
- getHarmonic
4
- } from "../../../chunks/chunk-UYTXXUU7.js";
5
- import "../../../chunks/chunk-32IRF4OP.js";
6
- export {
7
- createScale,
8
- getHarmonic
9
- };
@@ -1 +0,0 @@
1
- export declare function round(number: number, nbDecimals: number): number;
@@ -1,6 +0,0 @@
1
- import {
2
- round
3
- } from "../../../chunks/chunk-32IRF4OP.js";
4
- export {
5
- round
6
- };
@@ -1,4 +0,0 @@
1
- import { isInEnum as isInEnumFunc } from './is-in-enum';
2
- export declare namespace Enums {
3
- const isInEnum: typeof isInEnumFunc;
4
- }
@@ -1,7 +0,0 @@
1
- import {
2
- Enums
3
- } from "../../../chunks/chunk-WOAYU6LB.js";
4
- import "../../../chunks/chunk-E6MSDKON.js";
5
- export {
6
- Enums
7
- };
@@ -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,6 +0,0 @@
1
- import {
2
- isInEnum
3
- } from "../../../../chunks/chunk-E6MSDKON.js";
4
- export {
5
- isInEnum
6
- };
@@ -1 +0,0 @@
1
- export declare function flattenGetters(obj: unknown): Record<string, unknown>;
@@ -1,9 +0,0 @@
1
- import {
2
- flattenGetters
3
- } from "../../../chunks/chunk-PO3V3I57.js";
4
- import "../../../chunks/chunk-4QQBKBYH.js";
5
- import "../../../chunks/chunk-QXAJXTXV.js";
6
- import "../../../chunks/chunk-HC6ZOHCS.js";
7
- export {
8
- flattenGetters
9
- };
@@ -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
- isObject
3
- } from "../../chunks/chunk-K37RALUX.js";
4
- import {
5
- isRecord
6
- } from "../../chunks/chunk-YDIBNEGA.js";
7
- import {
8
- Validation
9
- } from "../../chunks/chunk-FPEW3A27.js";
10
- import {
11
- Enums
12
- } from "../../chunks/chunk-WOAYU6LB.js";
13
- import "../../chunks/chunk-E6MSDKON.js";
14
- import {
15
- flattenGetters
16
- } from "../../chunks/chunk-PO3V3I57.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,6 +0,0 @@
1
- import {
2
- isObject
3
- } from "../../../chunks/chunk-K37RALUX.js";
4
- export {
5
- isObject
6
- };
@@ -1 +0,0 @@
1
- export declare function isRecord(input: unknown): input is Record<string, unknown>;
@@ -1,6 +0,0 @@
1
- import {
2
- isRecord
3
- } from "../../../chunks/chunk-YDIBNEGA.js";
4
- export {
5
- isRecord
6
- };
@@ -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>>;