@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.
Files changed (255) hide show
  1. package/TODO.md +1 -0
  2. package/agnostic/@publisher/index.d.ts +47 -0
  3. package/agnostic/@publisher/index.js +361 -0
  4. package/agnostic/elo/index.d.ts +23 -0
  5. package/agnostic/elo/index.js +28 -0
  6. package/agnostic/elo/index.test.d.ts +1 -0
  7. package/agnostic/elo/index.test.js +67 -0
  8. package/agnostic/index.d.ts +5 -4
  9. package/agnostic/index.js +5 -0
  10. package/agnostic/poetry/generate-rhymes/index.d.ts +1 -0
  11. package/agnostic/poetry/generate-rhymes/index.js +125 -0
  12. package/agnostic/poetry/index.d.ts +1 -0
  13. package/agnostic/poetry/index.js +1 -0
  14. package/agnostic/scrapers/@meteociel/index.d.ts +36 -0
  15. package/agnostic/scrapers/@meteociel/index.js +248 -0
  16. package/agnostic/scrapers/@meteociel/index.test.d.ts +1 -0
  17. package/agnostic/scrapers/@meteociel/index.test.js +43 -0
  18. package/agnostic/scrapers/@meteociel/locations/index.d.ts +11 -0
  19. package/agnostic/scrapers/@meteociel/locations/index.js +10 -0
  20. package/agnostic/scrapers/@meteociel/types.d.ts +1 -0
  21. package/agnostic/scrapers/@meteociel/types.js +1 -0
  22. package/agnostic/scrapers/@tumblr/blogs/delabienbonnemusique/index.d.ts +22 -0
  23. package/agnostic/scrapers/@tumblr/blogs/delabienbonnemusique/index.js +124 -0
  24. package/agnostic/scrapers/@tumblr/blogs/delabienbonnemusique/index.test.d.ts +1 -0
  25. package/agnostic/scrapers/@tumblr/blogs/delabienbonnemusique/index.test.js +107 -0
  26. package/agnostic/scrapers/@tumblr/blogs/index.d.ts +8 -0
  27. package/agnostic/scrapers/@tumblr/blogs/index.js +23 -0
  28. package/agnostic/scrapers/@tumblr/index.d.ts +73 -0
  29. package/agnostic/scrapers/@tumblr/index.js +180 -0
  30. package/agnostic/scrapers/@tumblr/index.test.d.ts +1 -0
  31. package/agnostic/scrapers/@tumblr/index.test.js +319 -0
  32. package/agnostic/scrapers/@tumblr/types.d.ts +238 -0
  33. package/agnostic/scrapers/@tumblr/types.js +38 -0
  34. package/agnostic/scrapers/@tumblr/utils.d.ts +12 -0
  35. package/agnostic/scrapers/@tumblr/utils.js +407 -0
  36. package/agnostic/scrapers/index.d.ts +2 -0
  37. package/agnostic/scrapers/index.js +2 -0
  38. package/agnostic/weather/index.d.ts +1 -0
  39. package/agnostic/weather/index.js +1 -0
  40. package/agnostic/weather/types.d.ts +181 -0
  41. package/agnostic/weather/types.js +8 -0
  42. package/components/index.d.ts +1 -1
  43. package/components/index.js +1 -0
  44. package/components/public-classnames.d.ts +5 -0
  45. package/components/public-classnames.js +5 -0
  46. package/components/utils/index.d.ts +1 -0
  47. package/components/utils/index.js +12 -0
  48. package/components/utils/types.d.ts +3 -0
  49. package/components/utils/types.js +1 -0
  50. package/index.d.ts +3 -3
  51. package/index.js +3 -0
  52. package/node/headless-browser/index.d.ts +37 -0
  53. package/node/headless-browser/index.js +126 -0
  54. package/node/headless-browser/types.d.ts +47 -0
  55. package/node/headless-browser/types.js +5 -0
  56. package/node/index.d.ts +1 -2
  57. package/node/index.js +1 -0
  58. package/node/index.test.d.ts +1 -0
  59. package/node/index.test.js +6 -0
  60. package/node/scrapers/@tumblr/index.d.ts +61 -0
  61. package/node/scrapers/@tumblr/index.js +182 -0
  62. package/node/scrapers/@tumblr/index.test.d.ts +1 -0
  63. package/node/scrapers/@tumblr/index.test.js +185 -0
  64. package/node/scrapers/@tumblr/types.d.ts +91 -0
  65. package/node/scrapers/@tumblr/types.js +1 -0
  66. package/node/scrapers/@tumblr/utils.d.ts +23 -0
  67. package/node/scrapers/@tumblr/utils.js +328 -0
  68. package/node/scrapers/index.d.ts +1 -0
  69. package/node/scrapers/index.js +1 -0
  70. package/package.json +211 -14
  71. package/agnostic/_WIP_tennis/index.d.ts +0 -2
  72. package/agnostic/_WIP_tennis/index.js +0 -62
  73. package/agnostic/arrays/index.d.ts +0 -11
  74. package/agnostic/arrays/is-array-of/index.d.ts +0 -5
  75. package/agnostic/arrays/is-array-of/index.js +0 -23
  76. package/agnostic/async/index.d.ts +0 -8
  77. package/agnostic/async/index.js +0 -20
  78. package/agnostic/async/timeout-call/index.d.ts +0 -1
  79. package/agnostic/async/timeout-call/index.js +0 -6
  80. package/agnostic/async/transitions/index.d.ts +0 -41
  81. package/agnostic/async/transitions/index.js +0 -7
  82. package/agnostic/async/wait/index.d.ts +0 -1
  83. package/agnostic/async/wait/index.js +0 -6
  84. package/agnostic/booleans/index.d.ts +0 -8
  85. package/agnostic/booleans/index.js +0 -17
  86. package/agnostic/booleans/is-falsy/index.d.ts +0 -7
  87. package/agnostic/booleans/is-falsy/index.js +0 -11
  88. package/agnostic/css/bem/BEM.d.ts +0 -29
  89. package/agnostic/css/bem/getNamesArr.d.ts +0 -2
  90. package/agnostic/css/bem/index.d.ts +0 -7
  91. package/agnostic/css/bem/index.js +0 -9
  92. package/agnostic/css/generate-nice-color/index.d.ts +0 -2
  93. package/agnostic/css/generate-nice-color/index.js +0 -8
  94. package/agnostic/css/index.d.ts +0 -14
  95. package/agnostic/css/index.js +0 -177
  96. package/agnostic/css/is-valid-css-class-name/index.d.ts +0 -2
  97. package/agnostic/css/is-valid-css-class-name/index.js +0 -8
  98. package/agnostic/css/styles-set/index.d.ts +0 -37
  99. package/agnostic/errors/index.d.ts +0 -30
  100. package/agnostic/errors/index.js +0 -6
  101. package/agnostic/html/get-node-ancestors/index.d.ts +0 -1
  102. package/agnostic/html/get-node-ancestors/index.js +0 -6
  103. package/agnostic/html/get-position-inside-parent/index.d.ts +0 -1
  104. package/agnostic/html/get-position-inside-parent/index.js +0 -6
  105. package/agnostic/html/index.d.ts +0 -17
  106. package/agnostic/html/index.js +0 -39
  107. package/agnostic/html/insert-node/index.d.ts +0 -2
  108. package/agnostic/html/insert-node/index.js +0 -6
  109. package/agnostic/html/placeholders/index.d.ts +0 -9
  110. package/agnostic/html/placeholders/index.js +0 -6
  111. package/agnostic/html/sanitize/index.d.ts +0 -24
  112. package/agnostic/html/sanitize/index.js +0 -9
  113. package/agnostic/html/selector-to-element/index.d.ts +0 -1
  114. package/agnostic/html/selector-to-element/index.js +0 -9
  115. package/agnostic/html/string-to-nodes/index.d.ts +0 -7
  116. package/agnostic/html/string-to-nodes/index.js +0 -10
  117. package/agnostic/misc/assert/index.d.ts +0 -5
  118. package/agnostic/misc/assert/index.js +0 -6
  119. package/agnostic/misc/cast/index.d.ts +0 -9
  120. package/agnostic/misc/cast/index.js +0 -8
  121. package/agnostic/misc/crossenv/index.d.ts +0 -13
  122. package/agnostic/misc/crossenv/index.js +0 -6
  123. package/agnostic/misc/elo/index.d.ts +0 -31
  124. package/agnostic/misc/elo/index.js +0 -6
  125. package/agnostic/misc/get-current-downlink/index.d.ts +0 -1
  126. package/agnostic/misc/get-current-downlink/index.js +0 -6
  127. package/agnostic/misc/index.d.ts +0 -6
  128. package/agnostic/misc/index.js +0 -16
  129. package/agnostic/misc/is-constructor-function/index.d.ts +0 -2
  130. package/agnostic/misc/is-constructor-function/index.js +0 -6
  131. package/agnostic/misc/is-nullish/index.d.ts +0 -4
  132. package/agnostic/misc/is-nullish/index.js +0 -10
  133. package/agnostic/misc/logs/index.d.ts +0 -55
  134. package/agnostic/misc/logs/index.js +0 -6
  135. package/agnostic/misc/random/index.d.ts +0 -10
  136. package/agnostic/misc/random/index.js +0 -6
  137. package/agnostic/misc/tennis/index.d.ts +0 -60
  138. package/agnostic/misc/tennis/index.js +0 -6
  139. package/agnostic/numbers/absolute-modulo/index.d.ts +0 -1
  140. package/agnostic/numbers/absolute-modulo/index.js +0 -6
  141. package/agnostic/numbers/clamp/index.d.ts +0 -1
  142. package/agnostic/numbers/clamp/index.js +0 -6
  143. package/agnostic/numbers/index.d.ts +0 -13
  144. package/agnostic/numbers/index.js +0 -30
  145. package/agnostic/numbers/interpolate/index.d.ts +0 -1
  146. package/agnostic/numbers/interpolate/index.js +0 -6
  147. package/agnostic/numbers/responsive-harmonics/index.d.ts +0 -10
  148. package/agnostic/numbers/responsive-harmonics/index.js +0 -9
  149. package/agnostic/numbers/round/index.d.ts +0 -1
  150. package/agnostic/numbers/round/index.js +0 -6
  151. package/agnostic/objects/enums/index.d.ts +0 -4
  152. package/agnostic/objects/enums/index.js +0 -7
  153. package/agnostic/objects/enums/is-in-enum/index.d.ts +0 -1
  154. package/agnostic/objects/enums/is-in-enum/index.js +0 -6
  155. package/agnostic/objects/flatten-getters/index.d.ts +0 -1
  156. package/agnostic/objects/flatten-getters/index.js +0 -9
  157. package/agnostic/objects/index.d.ts +0 -12
  158. package/agnostic/objects/index.js +0 -32
  159. package/agnostic/objects/is-object/index.d.ts +0 -1
  160. package/agnostic/objects/is-object/index.js +0 -6
  161. package/agnostic/objects/is-record/index.d.ts +0 -1
  162. package/agnostic/objects/is-record/index.js +0 -6
  163. package/agnostic/objects/record-format/index.d.ts +0 -11
  164. package/agnostic/objects/record-format/index.js +0 -16
  165. package/agnostic/objects/validation/index.d.ts +0 -3
  166. package/agnostic/objects/validation/index.js +0 -6
  167. package/agnostic/optim/index.d.ts +0 -7
  168. package/agnostic/optim/index.js +0 -18
  169. package/agnostic/optim/memoize/index.d.ts +0 -3
  170. package/agnostic/optim/memoize/index.js +0 -6
  171. package/agnostic/optim/throttle-debounce/index.d.ts +0 -30
  172. package/agnostic/optim/throttle-debounce/index.js +0 -8
  173. package/agnostic/optim/throttle-debounce/types.d.ts +0 -2
  174. package/agnostic/regexps/index.d.ts +0 -23
  175. package/agnostic/regexps/index.js +0 -89
  176. package/agnostic/strings/char-codes/index.d.ts +0 -17
  177. package/agnostic/strings/char-codes/index.js +0 -6
  178. package/agnostic/strings/index.d.ts +0 -14
  179. package/agnostic/strings/index.js +0 -32
  180. package/agnostic/strings/matches/index.d.ts +0 -3
  181. package/agnostic/strings/matches/index.js +0 -10
  182. package/agnostic/strings/normalize-indent/index.d.ts +0 -1
  183. package/agnostic/strings/normalize-indent/index.js +0 -6
  184. package/agnostic/strings/replace-all/index.d.ts +0 -1
  185. package/agnostic/strings/replace-all/index.js +0 -6
  186. package/agnostic/strings/to-alphanum/index.d.ts +0 -1
  187. package/agnostic/strings/to-alphanum/index.js +0 -6
  188. package/chunks/chunk-32IRF4OP.js +0 -9
  189. package/chunks/chunk-34U4HX4V.js +0 -73
  190. package/chunks/chunk-4GDNHUCZ.js +0 -162
  191. package/chunks/chunk-4QQBKBYH.js +0 -59
  192. package/chunks/chunk-4VC5PT5T.js +0 -13
  193. package/chunks/chunk-5LNUCDQ6.js +0 -132
  194. package/chunks/chunk-7AWTHZLY.js +0 -12
  195. package/chunks/chunk-7DBNMU6N.js +0 -14
  196. package/chunks/chunk-COVPTTAD.js +0 -10
  197. package/chunks/chunk-DNIOWD7K.js +0 -8
  198. package/chunks/chunk-DQNJQBC6.js +0 -10
  199. package/chunks/chunk-E6MSDKON.js +0 -13
  200. package/chunks/chunk-EDVNAV3G.js +0 -72
  201. package/chunks/chunk-EW46EXFB.js +0 -8
  202. package/chunks/chunk-FPEW3A27.js +0 -14
  203. package/chunks/chunk-GJOU3UAL.js +0 -36
  204. package/chunks/chunk-HC6ZOHCS.js +0 -14
  205. package/chunks/chunk-HGCG2J77.js +0 -122
  206. package/chunks/chunk-IFD7GSGK.js +0 -130
  207. package/chunks/chunk-JQXNEJAP.js +0 -18
  208. package/chunks/chunk-JWBDZPQG.js +0 -18
  209. package/chunks/chunk-K37RALUX.js +0 -8
  210. package/chunks/chunk-KIONYWA7.js +0 -168
  211. package/chunks/chunk-KQT5CTGF.js +0 -21
  212. package/chunks/chunk-LEXQ6E6L.js +0 -31
  213. package/chunks/chunk-LQFKUNVQ.js +0 -19
  214. package/chunks/chunk-MF56TTC5.js +0 -15
  215. package/chunks/chunk-MT74WIQR.js +0 -41
  216. package/chunks/chunk-NRITRUZW.js +0 -10
  217. package/chunks/chunk-NRJQKVQV.js +0 -31
  218. package/chunks/chunk-OSAXBA7G.js +0 -10
  219. package/chunks/chunk-PO3V3I57.js +0 -23
  220. package/chunks/chunk-QXAJXTXV.js +0 -19
  221. package/chunks/chunk-RCO57B6F.js +0 -9
  222. package/chunks/chunk-SQZGZ3VT.js +0 -15
  223. package/chunks/chunk-TTZHPIH7.js +0 -237
  224. package/chunks/chunk-UYTXXUU7.js +0 -54
  225. package/chunks/chunk-VTPRO4NJ.js +0 -10
  226. package/chunks/chunk-VYW4IADX.js +0 -35
  227. package/chunks/chunk-VZDUZTW6.js +0 -113
  228. package/chunks/chunk-W5A2TON3.js +0 -10
  229. package/chunks/chunk-W7YBGJ4H.js +0 -28
  230. package/chunks/chunk-WLL3FNVL.js +0 -40
  231. package/chunks/chunk-WOAYU6LB.js +0 -13
  232. package/chunks/chunk-XA4HVHJ4.js +0 -18
  233. package/chunks/chunk-XN3PZIVL.js +0 -38
  234. package/chunks/chunk-Y3OZHZUF.js +0 -237
  235. package/chunks/chunk-YDIBNEGA.js +0 -9
  236. package/chunks/chunk-ZC5RZBNY.js +0 -33
  237. package/components/Comp/index.d.ts +0 -1
  238. package/node/files/index.d.ts +0 -9
  239. package/node/files/index.js +0 -21
  240. package/node/files/is-in-directory/index.d.ts +0 -1
  241. package/node/files/is-in-directory/index.js +0 -6
  242. package/node/files/read-write/index.d.ts +0 -9
  243. package/node/files/read-write/index.js +0 -6
  244. package/node/files/subpaths/index.d.ts +0 -34
  245. package/node/files/subpaths/index.js +0 -7
  246. package/node/image/index.d.ts +0 -9
  247. package/node/image/index.js +0 -74
  248. package/node/mxfb-cli-config/index.d.ts +0 -19
  249. package/node/mxfb-cli-config/index.js +0 -113
  250. package/node/process/index.d.ts +0 -8
  251. package/node/process/index.js +0 -20
  252. package/node/process/on-exit/index.d.ts +0 -5
  253. package/node/process/on-exit/index.js +0 -14
  254. package/shared/errors/index.d.ts +0 -138
  255. package/shared/index.d.ts +0 -0
@@ -1,14 +0,0 @@
1
- import { CharCodes as CharCodesNamespace } from './char-codes';
2
- import { matches as matchesFunc, matchesSome as matchesSomeFunc, matchesEvery as matchesEveryFunc } from './matches';
3
- import { replaceAll as replaceAllFunc } from './replace-all';
4
- import { normalizeIndent as normalizeIndentFunc } from './normalize-indent';
5
- import { toAlphanum as toAlphanumFunc } from './to-alphanum';
6
- export declare namespace Strings {
7
- export import CharCodes = CharCodesNamespace;
8
- const matches: typeof matchesFunc;
9
- const matchesSome: typeof matchesSomeFunc;
10
- const matchesEvery: typeof matchesEveryFunc;
11
- const normalizeIndent: typeof normalizeIndentFunc;
12
- const replaceAll: typeof replaceAllFunc;
13
- const toAlphanum: typeof toAlphanumFunc;
14
- }
@@ -1,32 +0,0 @@
1
- import {
2
- normalizeIndent
3
- } from "../../chunks/chunk-JQXNEJAP.js";
4
- import {
5
- CharCodes
6
- } from "../../chunks/chunk-34U4HX4V.js";
7
- import {
8
- replaceAll
9
- } from "../../chunks/chunk-MF56TTC5.js";
10
- import {
11
- matches,
12
- matchesEvery,
13
- matchesSome
14
- } from "../../chunks/chunk-LQFKUNVQ.js";
15
- import {
16
- toAlphanum
17
- } from "../../chunks/chunk-COVPTTAD.js";
18
-
19
- // src/agnostic/strings/index.ts
20
- var Strings;
21
- ((Strings2) => {
22
- Strings2.CharCodes = CharCodes;
23
- Strings2.matches = matches;
24
- Strings2.matchesSome = matchesSome;
25
- Strings2.matchesEvery = matchesEvery;
26
- Strings2.normalizeIndent = normalizeIndent;
27
- Strings2.replaceAll = replaceAll;
28
- Strings2.toAlphanum = toAlphanum;
29
- })(Strings || (Strings = {}));
30
- export {
31
- Strings
32
- };
@@ -1,3 +0,0 @@
1
- export declare function matches(input: string, matcher: string | RegExp): boolean;
2
- export declare function matchesSome(input: string, matchers: string | RegExp | Array<string | RegExp>): boolean;
3
- export declare function matchesEvery(input: string, matchers: string | RegExp | Array<string | RegExp>): boolean;
@@ -1,10 +0,0 @@
1
- import {
2
- matches,
3
- matchesEvery,
4
- matchesSome
5
- } from "../../../chunks/chunk-LQFKUNVQ.js";
6
- export {
7
- matches,
8
- matchesEvery,
9
- matchesSome
10
- };
@@ -1 +0,0 @@
1
- export declare function normalizeIndent(input: string, indentLevel?: number): string;
@@ -1,6 +0,0 @@
1
- import {
2
- normalizeIndent
3
- } from "../../../chunks/chunk-JQXNEJAP.js";
4
- export {
5
- normalizeIndent
6
- };
@@ -1 +0,0 @@
1
- export declare function replaceAll(input: string, pattern: string | RegExp, replacer: string | ((substring: string, ...args: any[]) => string), maxOps?: number): string;
@@ -1,6 +0,0 @@
1
- import {
2
- replaceAll
3
- } from "../../../chunks/chunk-MF56TTC5.js";
4
- export {
5
- replaceAll
6
- };
@@ -1 +0,0 @@
1
- export declare function toAlphanum(string: string, replacer?: string): string;
@@ -1,6 +0,0 @@
1
- import {
2
- toAlphanum
3
- } from "../../../chunks/chunk-COVPTTAD.js";
4
- export {
5
- toAlphanum
6
- };
@@ -1,9 +0,0 @@
1
- // src/agnostic/numbers/round/index.ts
2
- function round(number, nbDecimals) {
3
- const multiplier = Math.pow(10, nbDecimals);
4
- return Math.round(number * multiplier) / multiplier;
5
- }
6
-
7
- export {
8
- round
9
- };
@@ -1,73 +0,0 @@
1
- // src/agnostic/strings/char-codes/index.ts
2
- var CharCodes;
3
- ((CharCodes2) => {
4
- function charCodeToB36(charCode) {
5
- if (charCode === null) return "\0";
6
- return charCode.toString(36);
7
- }
8
- CharCodes2.charCodeToB36 = charCodeToB36;
9
- function b36CharCodeToCharCode(b36CharCode) {
10
- if (b36CharCode === null) return 0;
11
- const charCode = parseInt(b36CharCode, 36);
12
- if (!Number.isInteger(charCode)) return 0;
13
- return charCode;
14
- }
15
- CharCodes2.b36CharCodeToCharCode = b36CharCodeToCharCode;
16
- function charToCharCode(char) {
17
- const charCode = char.charCodeAt(0);
18
- if (!Number.isInteger(charCode)) return 0;
19
- return charCode;
20
- }
21
- CharCodes2.charToCharCode = charToCharCode;
22
- function charToB36CharCode(char) {
23
- const charCode = charToCharCode(char);
24
- return charCodeToB36(charCode);
25
- }
26
- CharCodes2.charToB36CharCode = charToB36CharCode;
27
- function charFromCharCode(charCode) {
28
- return String.fromCharCode(charCode);
29
- }
30
- CharCodes2.charFromCharCode = charFromCharCode;
31
- function charFromB36CharCode(b36CharCode) {
32
- const charCode = parseInt(b36CharCode, 36);
33
- if (!Number.isInteger(charCode)) return "\0";
34
- return charFromCharCode(charCode);
35
- }
36
- CharCodes2.charFromB36CharCode = charFromB36CharCode;
37
- function toCharCodes(string) {
38
- const chars = string.split("");
39
- return chars.map(charToCharCode);
40
- }
41
- CharCodes2.toCharCodes = toCharCodes;
42
- function toB36CharCodes(string) {
43
- const chars = string.split("");
44
- return chars.map(charToB36CharCode);
45
- }
46
- CharCodes2.toB36CharCodes = toB36CharCodes;
47
- function fromCharCodes(charCodes) {
48
- return charCodes.map(charFromCharCode).map((char) => char === null ? "\0" : char).join("");
49
- }
50
- CharCodes2.fromCharCodes = fromCharCodes;
51
- function fromB36CharCodes(b36CharCodes) {
52
- return b36CharCodes.map(charFromB36CharCode).map((char) => char === null ? "\0" : char).join("");
53
- }
54
- CharCodes2.fromB36CharCodes = fromB36CharCodes;
55
- function serialize(charCodes) {
56
- return charCodes.map((c) => typeof c === "string" ? c : charCodeToB36(c)).join(",");
57
- }
58
- CharCodes2.serialize = serialize;
59
- function deserialize(serializedCharCodes) {
60
- const b36CharCodes = serializedCharCodes.split("");
61
- return b36CharCodes.map(b36CharCodeToCharCode);
62
- }
63
- CharCodes2.deserialize = deserialize;
64
- function fromSerialized(serializedCharCodes) {
65
- const charCodes = deserialize(serializedCharCodes);
66
- return fromCharCodes(charCodes);
67
- }
68
- CharCodes2.fromSerialized = fromSerialized;
69
- })(CharCodes || (CharCodes = {}));
70
-
71
- export {
72
- CharCodes
73
- };
@@ -1,162 +0,0 @@
1
- import {
2
- wait
3
- } from "./chunk-DQNJQBC6.js";
4
-
5
- // src/agnostic/async/transitions/index.ts
6
- var Transitions;
7
- ((Transitions2) => {
8
- let Ease;
9
- ((Ease2) => {
10
- Ease2["LINEAR"] = "linear";
11
- Ease2["EASE_IN_QUAD"] = "ease-in-quad";
12
- Ease2["EASE_OUT_QUAD"] = "ease-out-quad";
13
- Ease2["EASE_IN_OUT_QUAD"] = "ease-in-out-quad";
14
- Ease2["EASE_IN_CUBIC"] = "ease-in-cubic";
15
- Ease2["EASE_OUT_CUBIC"] = "ease-out-cubic";
16
- Ease2["EASE_IN_OUT_CUBIC"] = "ease-in-out-cubic";
17
- Ease2["EASE_IN_QUART"] = "ease-in-quart";
18
- Ease2["EASE_OUT_QUART"] = "ease-out-quart";
19
- Ease2["EASE_IN_OUT_QUART"] = "ease-in-out-quart";
20
- Ease2["EASE_IN_QUINT"] = "ease-in-quint";
21
- Ease2["EASE_OUT_QUINT"] = "ease-out-quint";
22
- Ease2["EASE_IN_OUT_QUINT"] = "ease-in-out-quint";
23
- Ease2["EASE_IN_SINE"] = "ease-in-sine";
24
- Ease2["EASE_OUT_SINE"] = "ease-out-sine";
25
- Ease2["EASE_IN_OUT_SINE"] = "ease-in-out-sine";
26
- Ease2["EASE_IN_EXPO"] = "ease-in-expo";
27
- Ease2["EASE_OUT_EXPO"] = "ease-out-expo";
28
- Ease2["EASE_IN_OUT_EXPO"] = "ease-in-out-expo";
29
- Ease2["EASE_IN_CIRC"] = "ease-in-circ";
30
- Ease2["EASE_OUT_CIRC"] = "ease-out-circ";
31
- Ease2["EASE_IN_OUT_CIRC"] = "ease-in-out-circ";
32
- Ease2["EASE_IN_BACK"] = "ease-in-back";
33
- Ease2["EASE_OUT_BACK"] = "ease-out-back";
34
- Ease2["EASE_IN_OUT_BACK"] = "ease-in-out-back";
35
- Ease2["EASE_IN_ELASTIC"] = "ease-in-elastic";
36
- Ease2["EASE_OUT_ELASTIC"] = "ease-out-elastic";
37
- Ease2["EASE_IN_OUT_ELASTIC"] = "ease-in-out-elastic";
38
- Ease2["EASE_IN_BOUNCE"] = "ease-in-bounce";
39
- Ease2["EASE_OUT_BOUNCE"] = "ease-out-bounce";
40
- Ease2["EASE_IN_OUT_BOUNCE"] = "ease-in-out-bounce";
41
- })(Ease = Transitions2.Ease || (Transitions2.Ease = {}));
42
- async function transition(to, durationMs, callbackOrEase, callback) {
43
- const ease = typeof callbackOrEase === "string" ? callbackOrEase : "linear" /* LINEAR */;
44
- const easing = Transitions2.easings[ease];
45
- if (easing === void 0) return;
46
- const actualCallback = callback ?? (typeof callbackOrEase === "function" ? callbackOrEase : void 0);
47
- if (actualCallback === void 0) return;
48
- const start = Date.now();
49
- const timeTable = new Array(to).fill(null).map((_, step) => {
50
- const progression = (step + 1) / to;
51
- const eased = easing(progression);
52
- const time = start + eased * durationMs;
53
- return { time, step: eased * to };
54
- });
55
- for (const { time, step } of timeTable) {
56
- const now = Date.now();
57
- const delay = time - now;
58
- if (delay <= 0) actualCallback(step, time);
59
- else {
60
- await wait(delay);
61
- actualCallback(step, time);
62
- }
63
- }
64
- }
65
- Transitions2.transition = transition;
66
- const pow = Math.pow;
67
- const sqrt = Math.sqrt;
68
- const sin = Math.sin;
69
- const cos = Math.cos;
70
- const PI = Math.PI;
71
- const c1 = 1.70158;
72
- const c2 = c1 * 1.525;
73
- const c3 = c1 + 1;
74
- const c4 = 2 * PI / 3;
75
- const c5 = 2 * PI / 4.5;
76
- const bounceOut = function(x) {
77
- const n1 = 7.5625;
78
- const d1 = 2.75;
79
- if (x < 1 / d1) return n1 * x * x;
80
- if (x < 2 / d1) return n1 * (x -= 1.5 / d1) * x + 0.75;
81
- if (x < 2.5 / d1) return n1 * (x -= 2.25 / d1) * x + 0.9375;
82
- return n1 * (x -= 2.625 / d1) * x + 0.984375;
83
- };
84
- Transitions2.easingFunctions = {
85
- linear: (x) => x,
86
- easeInQuad: (x) => x * x,
87
- easeOutQuad: (x) => 1 - (1 - x) * (1 - x),
88
- easeInOutQuad: (x) => x < 0.5 ? 2 * x * x : 1 - pow(-2 * x + 2, 2) / 2,
89
- easeInCubic: (x) => x * x * x,
90
- easeOutCubic: (x) => 1 - pow(1 - x, 3),
91
- easeInOutCubic: (x) => x < 0.5 ? 4 * x * x * x : 1 - pow(-2 * x + 2, 3) / 2,
92
- easeInQuart: (x) => x * x * x * x,
93
- easeOutQuart: (x) => 1 - pow(1 - x, 4),
94
- easeInOutQuart: (x) => x < 0.5 ? 8 * x * x * x * x : 1 - pow(-2 * x + 2, 4) / 2,
95
- easeInQuint: (x) => x * x * x * x * x,
96
- easeOutQuint: (x) => 1 - pow(1 - x, 5),
97
- easeInOutQuint: (x) => x < 0.5 ? 16 * x * x * x * x * x : 1 - pow(-2 * x + 2, 5) / 2,
98
- easeInSine: (x) => 1 - cos(x * PI / 2),
99
- easeOutSine: (x) => sin(x * PI / 2),
100
- easeInOutSine: (x) => -(cos(PI * x) - 1) / 2,
101
- easeInExpo: (x) => x === 0 ? 0 : pow(2, 10 * x - 10),
102
- easeOutExpo: (x) => x === 1 ? 1 : 1 - pow(2, -10 * x),
103
- easeInOutExpo: (x) => {
104
- return x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? pow(2, 20 * x - 10) / 2 : (2 - pow(2, -20 * x + 10)) / 2;
105
- },
106
- easeInCirc: (x) => 1 - sqrt(1 - pow(x, 2)),
107
- easeOutCirc: (x) => sqrt(1 - pow(x - 1, 2)),
108
- easeInOutCirc: (x) => x < 0.5 ? (1 - sqrt(1 - pow(2 * x, 2))) / 2 : (sqrt(1 - pow(-2 * x + 2, 2)) + 1) / 2,
109
- easeInBack: (x) => c3 * x * x * x - c1 * x * x,
110
- easeOutBack: (x) => 1 + c3 * pow(x - 1, 3) + c1 * pow(x - 1, 2),
111
- easeInOutBack: (x) => x < 0.5 ? pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 : (pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2,
112
- easeInElastic: (x) => {
113
- return x === 0 ? 0 : x === 1 ? 1 : -pow(2, 10 * x - 10) * sin((x * 10 - 10.75) * c4);
114
- },
115
- easeOutElastic: (x) => {
116
- return x === 0 ? 0 : x === 1 ? 1 : pow(2, -10 * x) * sin((x * 10 - 0.75) * c4) + 1;
117
- },
118
- easeInOutElastic: (x) => {
119
- return x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? -(pow(2, 20 * x - 10) * sin((20 * x - 11.125) * c5)) / 2 : pow(2, -20 * x + 10) * sin((20 * x - 11.125) * c5) / 2 + 1;
120
- },
121
- easeInBounce: (x) => 1 - bounceOut(1 - x),
122
- easeOutBounce: bounceOut,
123
- easeInOutBounce: (x) => x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2
124
- };
125
- Transitions2.easings = {
126
- ["linear" /* LINEAR */]: Transitions2.easingFunctions.linear,
127
- ["ease-in-quad" /* EASE_IN_QUAD */]: Transitions2.easingFunctions.easeInQuad,
128
- ["ease-out-quad" /* EASE_OUT_QUAD */]: Transitions2.easingFunctions.easeOutQuad,
129
- ["ease-in-out-quad" /* EASE_IN_OUT_QUAD */]: Transitions2.easingFunctions.easeInOutQuad,
130
- ["ease-in-cubic" /* EASE_IN_CUBIC */]: Transitions2.easingFunctions.easeInCubic,
131
- ["ease-out-cubic" /* EASE_OUT_CUBIC */]: Transitions2.easingFunctions.easeOutCubic,
132
- ["ease-in-out-cubic" /* EASE_IN_OUT_CUBIC */]: Transitions2.easingFunctions.easeInOutCubic,
133
- ["ease-in-quart" /* EASE_IN_QUART */]: Transitions2.easingFunctions.easeInQuart,
134
- ["ease-out-quart" /* EASE_OUT_QUART */]: Transitions2.easingFunctions.easeOutQuart,
135
- ["ease-in-out-quart" /* EASE_IN_OUT_QUART */]: Transitions2.easingFunctions.easeInOutQuart,
136
- ["ease-in-quint" /* EASE_IN_QUINT */]: Transitions2.easingFunctions.easeInQuint,
137
- ["ease-out-quint" /* EASE_OUT_QUINT */]: Transitions2.easingFunctions.easeOutQuint,
138
- ["ease-in-out-quint" /* EASE_IN_OUT_QUINT */]: Transitions2.easingFunctions.easeInOutQuint,
139
- ["ease-in-sine" /* EASE_IN_SINE */]: Transitions2.easingFunctions.easeInSine,
140
- ["ease-out-sine" /* EASE_OUT_SINE */]: Transitions2.easingFunctions.easeOutSine,
141
- ["ease-in-out-sine" /* EASE_IN_OUT_SINE */]: Transitions2.easingFunctions.easeInOutSine,
142
- ["ease-in-expo" /* EASE_IN_EXPO */]: Transitions2.easingFunctions.easeInExpo,
143
- ["ease-out-expo" /* EASE_OUT_EXPO */]: Transitions2.easingFunctions.easeOutExpo,
144
- ["ease-in-out-expo" /* EASE_IN_OUT_EXPO */]: Transitions2.easingFunctions.easeInOutExpo,
145
- ["ease-in-circ" /* EASE_IN_CIRC */]: Transitions2.easingFunctions.easeInCirc,
146
- ["ease-out-circ" /* EASE_OUT_CIRC */]: Transitions2.easingFunctions.easeOutCirc,
147
- ["ease-in-out-circ" /* EASE_IN_OUT_CIRC */]: Transitions2.easingFunctions.easeInOutCirc,
148
- ["ease-in-back" /* EASE_IN_BACK */]: Transitions2.easingFunctions.easeInBack,
149
- ["ease-out-back" /* EASE_OUT_BACK */]: Transitions2.easingFunctions.easeOutBack,
150
- ["ease-in-out-back" /* EASE_IN_OUT_BACK */]: Transitions2.easingFunctions.easeInOutBack,
151
- ["ease-in-elastic" /* EASE_IN_ELASTIC */]: Transitions2.easingFunctions.easeInElastic,
152
- ["ease-out-elastic" /* EASE_OUT_ELASTIC */]: Transitions2.easingFunctions.easeOutElastic,
153
- ["ease-in-out-elastic" /* EASE_IN_OUT_ELASTIC */]: Transitions2.easingFunctions.easeInOutElastic,
154
- ["ease-in-bounce" /* EASE_IN_BOUNCE */]: Transitions2.easingFunctions.easeInBounce,
155
- ["ease-out-bounce" /* EASE_OUT_BOUNCE */]: Transitions2.easingFunctions.easeOutBounce,
156
- ["ease-in-out-bounce" /* EASE_IN_OUT_BOUNCE */]: Transitions2.easingFunctions.easeInOutBounce
157
- };
158
- })(Transitions || (Transitions = {}));
159
-
160
- export {
161
- Transitions
162
- };
@@ -1,59 +0,0 @@
1
- import {
2
- isFalsy
3
- } from "./chunk-QXAJXTXV.js";
4
-
5
- // src/agnostic/misc/cast/index.ts
6
- var Cast;
7
- ((Cast2) => {
8
- function toBoolean(value) {
9
- if (typeof value === "boolean") return value;
10
- if (typeof value === "string") {
11
- if (value.toLowerCase().trim() === "true") return true;
12
- return false;
13
- }
14
- return !isFalsy(value);
15
- }
16
- Cast2.toBoolean = toBoolean;
17
- function toNumber(value) {
18
- if (typeof value === "number") return value;
19
- if (typeof value === "string") return parseFloat(value);
20
- return 0;
21
- }
22
- Cast2.toNumber = toNumber;
23
- function toString(value) {
24
- if (typeof value === "string") return value;
25
- return String(value);
26
- }
27
- Cast2.toString = toString;
28
- function toNull(_value) {
29
- return null;
30
- }
31
- Cast2.toNull = toNull;
32
- function toArray(value) {
33
- if (Array.isArray(value)) return value;
34
- if (typeof value === "object" && value !== null) return Object.entries(value).map((key, value2) => ({ key, value: value2 }));
35
- return [value];
36
- }
37
- Cast2.toArray = toArray;
38
- function toNumberArr(value) {
39
- const arrValue = toArray(value);
40
- return arrValue.map((val) => toNumber(val));
41
- }
42
- Cast2.toNumberArr = toNumberArr;
43
- function toRecord(value) {
44
- const record = {};
45
- try {
46
- Object.keys(value).forEach((key) => {
47
- record[key] = value[key];
48
- });
49
- } catch (err) {
50
- return record;
51
- }
52
- return record;
53
- }
54
- Cast2.toRecord = toRecord;
55
- })(Cast || (Cast = {}));
56
-
57
- export {
58
- Cast
59
- };
@@ -1,13 +0,0 @@
1
- // src/agnostic/async/timeout-call/index.ts
2
- function timeoutCall(callback, timeoutMs) {
3
- return new Promise(async (resolve, reject) => {
4
- const rejectTimeout = setTimeout(() => reject(false), timeoutMs);
5
- const callbackResult = await callback();
6
- clearTimeout(rejectTimeout);
7
- return resolve(callbackResult);
8
- });
9
- }
10
-
11
- export {
12
- timeoutCall
13
- };
@@ -1,132 +0,0 @@
1
- // src/agnostic/misc/logs/index.ts
2
- import chalk from "chalk";
3
- var Logs;
4
- ((Logs2) => {
5
- function makeTextBlock(text, vPadding = 1, hPadding = vPadding) {
6
- const lines = text.split("\n");
7
- const longestLine = Math.max(...lines.map((line) => line.length));
8
- const textBlockArr = new Array(lines.length + 2 * vPadding).fill(null).map(() => new Array(longestLine + hPadding * 2).fill(" "));
9
- lines.forEach((line, linePos) => {
10
- const chars = line.split("");
11
- textBlockArr[linePos + vPadding]?.splice(hPadding, chars.length, ...chars);
12
- });
13
- return textBlockArr.map((lineArr) => lineArr.join("")).join("\n");
14
- }
15
- Logs2.makeTextBlock = makeTextBlock;
16
- Logs2.styles = {
17
- regular: (text) => text,
18
- light: (text) => chalk.grey(text),
19
- danger: (text) => chalk.bold.bgRed.whiteBright(makeTextBlock(`/!\\
20
-
21
- ${text}
22
- `, 2, 6)),
23
- important: (text) => chalk.bold(text),
24
- title: (text) => `# ${chalk.bold.underline(`${text}
25
- `)}`,
26
- info: (text) => chalk.blueBright(text),
27
- error: (text) => chalk.red(text),
28
- warning: (text) => chalk.yellow(text)
29
- };
30
- const logsTimeOrigin = /* @__PURE__ */ new Date();
31
- class Log {
32
- type;
33
- data;
34
- time;
35
- stack;
36
- constructor(type, data) {
37
- this.type = type;
38
- this.data = data;
39
- this.time = /* @__PURE__ */ new Date();
40
- this.stack = new Error().stack ?? "";
41
- }
42
- get displayTime() {
43
- return this.time.toLocaleDateString("en-US", {
44
- year: "numeric",
45
- month: "short",
46
- day: "numeric",
47
- weekday: "short",
48
- hour: "numeric",
49
- minute: "numeric",
50
- second: "numeric"
51
- }) + `:${this.time.getMilliseconds()}`;
52
- }
53
- get elapsedTimeMs() {
54
- return (this.time.getTime() - logsTimeOrigin.getTime()) / 1e3;
55
- }
56
- get displayStack() {
57
- return this.stack.split("\n").map((line) => line.trim()).slice(4).join("\n");
58
- }
59
- }
60
- class Logger {
61
- _private_threads = /* @__PURE__ */ new Map();
62
- constructor() {
63
- this.dir = this.dir.bind(this);
64
- this.error = this.error.bind(this);
65
- this.log = this.log.bind(this);
66
- this.warn = this.warn.bind(this);
67
- this.setLog = this.setLog.bind(this);
68
- this.print = this.print.bind(this);
69
- this.printThreads = this.printThreads.bind(this);
70
- }
71
- // assert (thread: string = '', ...args: ConsoleMethodsParams['assert']) { this.setLog(thread, 'assert', args) }
72
- // count (thread: string = '', ...args: ConsoleMethodsParams['count']) { this.setLog(thread, 'count', args) }
73
- // countReset (thread: string = '', ...args: ConsoleMethodsParams['countReset']) { this.setLog(thread, 'countReset', args) }
74
- // debug (thread: string = '', ...args: ConsoleMethodsParams['debug']) { this.setLog(thread, 'debug', args) }
75
- dir(thread = "", ...args) {
76
- this.setLog(thread, "dir", args);
77
- }
78
- // dirxml (thread: string = '', ...args: ConsoleMethodsParams['dirxml']) { this.setLog(thread, 'dirxml', args) }
79
- error(thread = "", ...args) {
80
- this.setLog(thread, "error", args);
81
- }
82
- // group (thread: string = '', ...args: ConsoleMethodsParams['group']) { this.setLog(thread, 'group', args) }
83
- // groupCollapsed (thread: string = '', ...args: ConsoleMethodsParams['groupCollapsed']) { this.setLog(thread, 'groupCollapsed', args) }
84
- // groupEnd (thread: string = '', ...args: ConsoleMethodsParams['groupEnd']) { this.setLog(thread, 'groupEnd', args) }
85
- // info (thread: string = '', ...args: ConsoleMethodsParams['info']) { this.setLog(thread, 'info', args) }
86
- log(thread = "", ...args) {
87
- this.setLog(thread, "log", args);
88
- }
89
- // table (thread: string = '', ...args: ConsoleMethodsParams['table']) { this.setLog(thread, 'table', args) }
90
- // time (thread: string = '', ...args: ConsoleMethodsParams['time']) { this.setLog(thread, 'time', args) }
91
- // timeEnd (thread: string = '', ...args: ConsoleMethodsParams['timeEnd']) { this.setLog(thread, 'timeEnd', args) }
92
- // trace (thread: string = '', ...args: ConsoleMethodsParams['trace']) { this.setLog(thread, 'trace', args) }
93
- warn(thread = "", ...args) {
94
- this.setLog(thread, "warn", args);
95
- }
96
- setLog(threadName, type, data) {
97
- const log = new Log(type, data);
98
- const thread = this._private_threads.get(threadName) ?? [];
99
- this._private_threads.set(threadName, [...thread, log]);
100
- return this;
101
- }
102
- print(threadFilter, withStack) {
103
- const allLogs = Array.from(this._private_threads.entries()).map(([threadName, logs]) => logs.map((log) => ({ threadName, log }))).flat().sort((eltA, eltB) => eltA.log.time.getTime() - eltB.log.time.getTime()).filter(({ threadName }) => {
104
- if (threadFilter === void 0) return true;
105
- return threadName === threadFilter;
106
- });
107
- allLogs.forEach(({ threadName, log }) => {
108
- console.log(`%c${threadName}`, "font-weight: 800; color: white; background: black; padding: 4px;", `+${log.elapsedTimeMs}s \u2013`, log.displayTime);
109
- if (withStack === true) console.log(`%c${log.displayStack}`, "color: grey; font-size: inherit;");
110
- console[log.type](...log.data);
111
- console.log("");
112
- });
113
- }
114
- printThreads(withStack) {
115
- Array.from(this._private_threads.entries()).forEach(([threadName, logs]) => {
116
- console.group(`%c${threadName}`, "font-weight: 800; color: white; background: black; padding: 4px;");
117
- logs.forEach((log) => {
118
- console.log(`+${log.elapsedTimeMs}s \u2013`, log.displayTime);
119
- if (withStack === true) console.log(`%c${log.displayStack}`, "color: grey; font-size: inherit;");
120
- console[log.type](...log.data);
121
- console.log("");
122
- });
123
- console.groupEnd();
124
- });
125
- }
126
- }
127
- Logs2.Logger = Logger;
128
- })(Logs || (Logs = {}));
129
-
130
- export {
131
- Logs
132
- };
@@ -1,12 +0,0 @@
1
- // src/agnostic/misc/get-current-downlink/index.ts
2
- function getCurrentDownlink() {
3
- if (typeof window !== "object") return void 0;
4
- if (typeof window.navigator !== "object") return void 0;
5
- const navigator = window.navigator;
6
- const connection = navigator?.connection ?? navigator?.mozConnection ?? navigator?.webkitConnection;
7
- return connection?.downlink;
8
- }
9
-
10
- export {
11
- getCurrentDownlink
12
- };
@@ -1,14 +0,0 @@
1
- // src/node/files/read-write/index.ts
2
- import { promises as fs } from "node:fs";
3
- async function readWrite(path, editor, ...options) {
4
- const [readOptions, writeOptions] = options;
5
- const read = await fs.readFile(path, readOptions);
6
- const edited = editor(read);
7
- const actualWriteOptions = options.length === 2 ? writeOptions : readOptions;
8
- await fs.writeFile(path, edited, actualWriteOptions);
9
- return edited;
10
- }
11
-
12
- export {
13
- readWrite
14
- };
@@ -1,10 +0,0 @@
1
- // src/agnostic/strings/to-alphanum/index.ts
2
- function toAlphanum(string, replacer = "") {
3
- const replaced = string.replace(/[^a-z0-9]/igm, replacer);
4
- if (replacer.length === 0) return replaced;
5
- return replaced.replace(new RegExp(`${replacer}+`, "igm"), replacer);
6
- }
7
-
8
- export {
9
- toAlphanum
10
- };
@@ -1,8 +0,0 @@
1
- // src/agnostic/numbers/absolute-modulo/index.ts
2
- function absoluteModulo(nbr, modulo) {
3
- return (nbr % modulo + modulo) % modulo;
4
- }
5
-
6
- export {
7
- absoluteModulo
8
- };
@@ -1,10 +0,0 @@
1
- // src/agnostic/async/wait/index.ts
2
- async function wait(durationMs) {
3
- return new Promise((resolve) => {
4
- setTimeout(() => resolve(true), durationMs);
5
- });
6
- }
7
-
8
- export {
9
- wait
10
- };
@@ -1,13 +0,0 @@
1
- // src/agnostic/objects/enums/is-in-enum/index.ts
2
- function isInEnum(enumObj, value) {
3
- const keys = Object.keys(enumObj);
4
- const values = Object.values(enumObj);
5
- const numericValues = values.filter((val) => typeof val === "number");
6
- const cleanKeys = keys.filter((key) => !numericValues.includes(parseInt(key, 10)));
7
- const cleanValues = cleanKeys.map((cleanKey) => enumObj[cleanKey]);
8
- return cleanValues.includes(value);
9
- }
10
-
11
- export {
12
- isInEnum
13
- };