@design-edito/tools 0.1.27 → 0.1.29

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 (69) hide show
  1. package/agnostic/css/bem/index.js +2 -2
  2. package/agnostic/css/index.js +12 -9
  3. package/agnostic/html/hyper-json/cast/index.js +2 -2
  4. package/agnostic/html/hyper-json/index.js +3 -3
  5. package/agnostic/html/hyper-json/transformers/append/index.js +2 -2
  6. package/agnostic/html/hyper-json/transformers/classList/index.js +2 -2
  7. package/agnostic/html/hyper-json/transformers/index.js +2 -2
  8. package/agnostic/html/hyper-json/transformers/join/index.js +2 -2
  9. package/agnostic/html/hyper-json/transformers/length/index.js +2 -2
  10. package/agnostic/html/hyper-json/transformers/print/index.js +2 -2
  11. package/agnostic/html/hyper-json/transformers/push/index.js +2 -2
  12. package/agnostic/html/hyper-json/transformers/querySelector/index.js +2 -2
  13. package/agnostic/html/hyper-json/transformers/ref/index.js +2 -2
  14. package/agnostic/html/hyper-json/transformers/replace/index.js +2 -2
  15. package/agnostic/html/hyper-json/transformers/split/index.js +2 -2
  16. package/agnostic/html/hyper-json/transformers/toArray/index.js +2 -2
  17. package/agnostic/html/hyper-json/transformers/toBoolean/index.js +2 -2
  18. package/agnostic/html/hyper-json/transformers/toElement/index.js +2 -2
  19. package/agnostic/html/hyper-json/transformers/toNodeList/index.js +2 -2
  20. package/agnostic/html/hyper-json/transformers/toNull/index.js +2 -2
  21. package/agnostic/html/hyper-json/transformers/toNumber/index.js +2 -2
  22. package/agnostic/html/hyper-json/transformers/toRecord/index.js +2 -2
  23. package/agnostic/html/hyper-json/transformers/toRef/index.js +2 -2
  24. package/agnostic/html/hyper-json/transformers/toString/index.js +2 -2
  25. package/agnostic/html/hyper-json/transformers/toText/index.js +2 -2
  26. package/agnostic/html/hyper-json/transformers/toTransformer/index.js +2 -2
  27. package/agnostic/html/hyper-json/transformers/transformSelected/index.js +2 -2
  28. package/agnostic/html/hyper-json/transformers/trim/index.js +2 -2
  29. package/agnostic/html/hyper-json/tree/index.js +2 -2
  30. package/agnostic/html/hyper-json/utils/index.js +2 -2
  31. package/agnostic/html/index.js +12 -12
  32. package/agnostic/misc/index.js +20 -14
  33. package/agnostic/misc/logs/index.d.ts +5 -44
  34. package/agnostic/misc/logs/index.js +4 -1
  35. package/agnostic/misc/logs/logger/index.d.ts +42 -0
  36. package/agnostic/misc/logs/logger/index.js +6 -0
  37. package/agnostic/misc/logs/make-text-block/index.d.ts +1 -0
  38. package/agnostic/misc/logs/make-text-block/index.js +6 -0
  39. package/agnostic/misc/logs/styles/index.d.ts +11 -0
  40. package/agnostic/misc/logs/styles/index.js +7 -0
  41. package/agnostic/misc/lorem-ipsum/index.js +7 -4
  42. package/agnostic/numbers/index.js +3 -3
  43. package/agnostic/objects/index.js +10 -10
  44. package/agnostic/optim/index.js +3 -3
  45. package/agnostic/random/hex-char/index.d.ts +2 -0
  46. package/agnostic/random/hex-char/index.js +8 -0
  47. package/agnostic/random/index.d.ts +9 -7
  48. package/agnostic/random/index.js +4 -1
  49. package/agnostic/random/random/index.d.ts +3 -0
  50. package/agnostic/random/random/index.js +8 -0
  51. package/agnostic/random/uuid/index.d.ts +3 -0
  52. package/agnostic/random/uuid/index.js +11 -0
  53. package/agnostic/strings/index.js +7 -7
  54. package/agnostic/time/index.js +3 -3
  55. package/chunks/chunk-75BICI4L.js +20 -0
  56. package/chunks/chunk-B2O7PFSF.js +1108 -0
  57. package/chunks/chunk-BEJSITDG.js +31 -0
  58. package/chunks/chunk-D3ERTRDW.js +17 -0
  59. package/chunks/chunk-H4PP6AHP.js +15 -0
  60. package/chunks/chunk-JWKI6G6E.js +102 -0
  61. package/chunks/chunk-L3OCRR3V.js +25 -0
  62. package/chunks/chunk-LFUY5AWK.js +1108 -0
  63. package/chunks/chunk-OGBUSUE6.js +12 -0
  64. package/chunks/chunk-PXB7U2DH.js +31 -0
  65. package/chunks/chunk-S32K7POB.js +29 -0
  66. package/chunks/chunk-S7MJLTCR.js +211 -0
  67. package/chunks/chunk-TEB7KZWB.js +21 -0
  68. package/node/files/index.js +3 -3
  69. package/package.json +1 -1
@@ -1,6 +1,8 @@
1
+ import { Logger as LoggerClass } from './logger';
2
+ import { makeTextBlock as makeTextBlockFunc } from './make-text-block';
1
3
  export declare namespace Logs {
2
- export function makeTextBlock(text: string, vPadding?: number, hPadding?: number): string;
3
- export const styles: {
4
+ const makeTextBlock: typeof makeTextBlockFunc;
5
+ const styles: {
4
6
  regular: (text: string) => string;
5
7
  light: (text: string) => string;
6
8
  danger: (text: string) => string;
@@ -11,46 +13,5 @@ export declare namespace Logs {
11
13
  error: (text: string) => string;
12
14
  warning: (text: string) => string;
13
15
  };
14
- type ConsoleMethod = 'assert' | 'count' | 'countReset' | 'debug' | 'dir' | 'dirxml' | 'error' | 'group' | 'groupCollapsed' | 'groupEnd' | 'info' | 'log' | 'table' | 'time' | 'timeEnd' | 'trace' | 'warn';
15
- type ConsoleMethodsParams = {
16
- assert: Parameters<typeof console.assert>;
17
- count: Parameters<typeof console.count>;
18
- countReset: Parameters<typeof console.countReset>;
19
- debug: Parameters<typeof console.debug>;
20
- dir: Parameters<typeof console.dir>;
21
- dirxml: Parameters<typeof console.dirxml>;
22
- error: Parameters<typeof console.error>;
23
- group: Parameters<typeof console.group>;
24
- groupCollapsed: Parameters<typeof console.groupCollapsed>;
25
- groupEnd: Parameters<typeof console.groupEnd>;
26
- info: Parameters<typeof console.info>;
27
- log: Parameters<typeof console.log>;
28
- table: Parameters<typeof console.table>;
29
- time: Parameters<typeof console.time>;
30
- timeEnd: Parameters<typeof console.timeEnd>;
31
- trace: Parameters<typeof console.trace>;
32
- warn: Parameters<typeof console.warn>;
33
- };
34
- class Log<T extends ConsoleMethod = ConsoleMethod> {
35
- type: T;
36
- data: ConsoleMethodsParams[T];
37
- time: Date;
38
- stack: string;
39
- constructor(type: T, data: ConsoleMethodsParams[T]);
40
- get displayTime(): string;
41
- get elapsedTimeMs(): number;
42
- get displayStack(): string;
43
- }
44
- export class Logger {
45
- _private_threads: Map<string, Log[]>;
46
- constructor();
47
- dir(thread: string | undefined, ...args: ConsoleMethodsParams['dir']): void;
48
- error(thread?: string, ...args: ConsoleMethodsParams['error']): void;
49
- log(thread?: string, ...args: ConsoleMethodsParams['log']): void;
50
- warn(thread?: string, ...args: ConsoleMethodsParams['warn']): void;
51
- setLog<T extends ConsoleMethod>(threadName: string, type: T, data: ConsoleMethodsParams[T]): this;
52
- print(this: Logger, threadFilter?: string, withStack?: boolean): void;
53
- printThreads(this: Logger, withStack?: boolean): void;
54
- }
55
- export {};
16
+ const Logger: typeof LoggerClass;
56
17
  }
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  Logs
3
- } from "../../../chunks/chunk-HEJV6JIO.js";
3
+ } from "../../../chunks/chunk-TEB7KZWB.js";
4
+ import "../../../chunks/chunk-JWKI6G6E.js";
5
+ import "../../../chunks/chunk-L3OCRR3V.js";
6
+ import "../../../chunks/chunk-H4PP6AHP.js";
4
7
  export {
5
8
  Logs
6
9
  };
@@ -0,0 +1,42 @@
1
+ type ConsoleMethod = 'assert' | 'count' | 'countReset' | 'debug' | 'dir' | 'dirxml' | 'error' | 'group' | 'groupCollapsed' | 'groupEnd' | 'info' | 'log' | 'table' | 'time' | 'timeEnd' | 'trace' | 'warn';
2
+ type ConsoleMethodsParams = {
3
+ assert: Parameters<typeof console.assert>;
4
+ count: Parameters<typeof console.count>;
5
+ countReset: Parameters<typeof console.countReset>;
6
+ debug: Parameters<typeof console.debug>;
7
+ dir: Parameters<typeof console.dir>;
8
+ dirxml: Parameters<typeof console.dirxml>;
9
+ error: Parameters<typeof console.error>;
10
+ group: Parameters<typeof console.group>;
11
+ groupCollapsed: Parameters<typeof console.groupCollapsed>;
12
+ groupEnd: Parameters<typeof console.groupEnd>;
13
+ info: Parameters<typeof console.info>;
14
+ log: Parameters<typeof console.log>;
15
+ table: Parameters<typeof console.table>;
16
+ time: Parameters<typeof console.time>;
17
+ timeEnd: Parameters<typeof console.timeEnd>;
18
+ trace: Parameters<typeof console.trace>;
19
+ warn: Parameters<typeof console.warn>;
20
+ };
21
+ declare class Log<T extends ConsoleMethod = ConsoleMethod> {
22
+ type: T;
23
+ data: ConsoleMethodsParams[T];
24
+ time: Date;
25
+ stack: string;
26
+ constructor(type: T, data: ConsoleMethodsParams[T]);
27
+ get displayTime(): string;
28
+ get elapsedTimeMs(): number;
29
+ get displayStack(): string;
30
+ }
31
+ export declare class Logger {
32
+ _private_threads: Map<string, Log[]>;
33
+ constructor();
34
+ dir(thread: string | undefined, ...args: ConsoleMethodsParams['dir']): void;
35
+ error(thread?: string, ...args: ConsoleMethodsParams['error']): void;
36
+ log(thread?: string, ...args: ConsoleMethodsParams['log']): void;
37
+ warn(thread?: string, ...args: ConsoleMethodsParams['warn']): void;
38
+ setLog<T extends ConsoleMethod>(threadName: string, type: T, data: ConsoleMethodsParams[T]): this;
39
+ print(this: Logger, threadFilter?: string, withStack?: boolean): void;
40
+ printThreads(this: Logger, withStack?: boolean): void;
41
+ }
42
+ export {};
@@ -0,0 +1,6 @@
1
+ import {
2
+ Logger
3
+ } from "../../../../chunks/chunk-JWKI6G6E.js";
4
+ export {
5
+ Logger
6
+ };
@@ -0,0 +1 @@
1
+ export declare function makeTextBlock(text: string, vPadding?: number, hPadding?: number): string;
@@ -0,0 +1,6 @@
1
+ import {
2
+ makeTextBlock
3
+ } from "../../../../chunks/chunk-H4PP6AHP.js";
4
+ export {
5
+ makeTextBlock
6
+ };
@@ -0,0 +1,11 @@
1
+ export declare const styles: {
2
+ regular: (text: string) => string;
3
+ light: (text: string) => string;
4
+ danger: (text: string) => string;
5
+ important: (text: string) => string;
6
+ title: (text: string) => string;
7
+ info: (text: string) => string;
8
+ success: (text: string) => string;
9
+ error: (text: string) => string;
10
+ warning: (text: string) => string;
11
+ };
@@ -0,0 +1,7 @@
1
+ import {
2
+ styles
3
+ } from "../../../../chunks/chunk-L3OCRR3V.js";
4
+ import "../../../../chunks/chunk-H4PP6AHP.js";
5
+ export {
6
+ styles
7
+ };
@@ -1,12 +1,15 @@
1
1
  import {
2
2
  LoremIpsum
3
- } from "../../../chunks/chunk-SFV2NYY4.js";
4
- import "../../../chunks/chunk-YS6WMSWC.js";
3
+ } from "../../../chunks/chunk-S7MJLTCR.js";
4
+ import "../../../chunks/chunk-RLAZR3NL.js";
5
5
  import "../../../chunks/chunk-6RGDWX4A.js";
6
6
  import "../../../chunks/chunk-RCO57B6F.js";
7
+ import "../../../chunks/chunk-YS6WMSWC.js";
7
8
  import "../../../chunks/chunk-FCU6IHKD.js";
8
- import "../../../chunks/chunk-RLAZR3NL.js";
9
- import "../../../chunks/chunk-R6KCN6CK.js";
9
+ import "../../../chunks/chunk-S32K7POB.js";
10
+ import "../../../chunks/chunk-D3ERTRDW.js";
11
+ import "../../../chunks/chunk-75BICI4L.js";
12
+ import "../../../chunks/chunk-OGBUSUE6.js";
10
13
  export {
11
14
  LoremIpsum
12
15
  };
@@ -8,12 +8,12 @@ import {
8
8
  createScale,
9
9
  getHarmonic
10
10
  } from "../../chunks/chunk-UYTXXUU7.js";
11
- import {
12
- clamp
13
- } from "../../chunks/chunk-OSAXBA7G.js";
14
11
  import {
15
12
  round
16
13
  } from "../../chunks/chunk-32IRF4OP.js";
14
+ import {
15
+ clamp
16
+ } from "../../chunks/chunk-OSAXBA7G.js";
17
17
 
18
18
  // src/agnostic/numbers/index.ts
19
19
  var Numbers;
@@ -1,21 +1,21 @@
1
- import {
2
- Enums
3
- } from "../../chunks/chunk-WOAYU6LB.js";
4
- import "../../chunks/chunk-E6MSDKON.js";
5
1
  import {
6
2
  flattenGetters
7
3
  } from "../../chunks/chunk-PO3V3I57.js";
8
- import "../../chunks/chunk-4QQBKBYH.js";
9
4
  import {
10
- isNonNullObject,
11
- isObject
12
- } from "../../chunks/chunk-HQLRJ7XW.js";
5
+ Validation
6
+ } from "../../chunks/chunk-FPEW3A27.js";
7
+ import {
8
+ Enums
9
+ } from "../../chunks/chunk-WOAYU6LB.js";
13
10
  import {
14
11
  isRecord
15
12
  } from "../../chunks/chunk-YDIBNEGA.js";
13
+ import "../../chunks/chunk-E6MSDKON.js";
16
14
  import {
17
- Validation
18
- } from "../../chunks/chunk-FPEW3A27.js";
15
+ isNonNullObject,
16
+ isObject
17
+ } from "../../chunks/chunk-HQLRJ7XW.js";
18
+ import "../../chunks/chunk-4QQBKBYH.js";
19
19
  import "../../chunks/chunk-QXAJXTXV.js";
20
20
  import "../../chunks/chunk-HC6ZOHCS.js";
21
21
 
@@ -1,10 +1,10 @@
1
- import {
2
- memoize
3
- } from "../../chunks/chunk-JWBDZPQG.js";
4
1
  import {
5
2
  debounce,
6
3
  throttle
7
4
  } from "../../chunks/chunk-VZDUZTW6.js";
5
+ import {
6
+ memoize
7
+ } from "../../chunks/chunk-JWBDZPQG.js";
8
8
 
9
9
  // src/agnostic/optim/index.ts
10
10
  var Optim;
@@ -0,0 +1,2 @@
1
+ export declare const hexChars: string[];
2
+ export declare function randomHexChar(): string;
@@ -0,0 +1,8 @@
1
+ import {
2
+ hexChars,
3
+ randomHexChar
4
+ } from "../../../chunks/chunk-OGBUSUE6.js";
5
+ export {
6
+ hexChars,
7
+ randomHexChar
8
+ };
@@ -1,10 +1,12 @@
1
+ import { random as randomFunc, randomInt as randomIntFunc } from './random';
2
+ import { randomHexChar as randomHexCharFunc } from './hex-char';
3
+ import { randomHash as randomHashFunc, randomHashPattern as randomHashPatternFunc, randomUUID as randomUUIDFunc } from './uuid';
1
4
  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 random: typeof randomFunc;
6
+ const randomInt: typeof randomIntFunc;
5
7
  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;
8
+ const randomHexChar: typeof randomHexCharFunc;
9
+ const randomHash: typeof randomHashFunc;
10
+ const randomHashPattern: typeof randomHashPatternFunc;
11
+ const randomUUID: typeof randomUUIDFunc;
10
12
  }
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  Random
3
- } from "../../chunks/chunk-R6KCN6CK.js";
3
+ } from "../../chunks/chunk-S32K7POB.js";
4
+ import "../../chunks/chunk-D3ERTRDW.js";
5
+ import "../../chunks/chunk-75BICI4L.js";
6
+ import "../../chunks/chunk-OGBUSUE6.js";
4
7
  export {
5
8
  Random
6
9
  };
@@ -0,0 +1,3 @@
1
+ export declare function random(bound1?: number): number | undefined;
2
+ export declare function random(bound1?: number, bound2?: number | undefined): number | undefined;
3
+ export declare function randomInt(...args: Parameters<typeof random>): number | undefined;
@@ -0,0 +1,8 @@
1
+ import {
2
+ random,
3
+ randomInt
4
+ } from "../../../chunks/chunk-D3ERTRDW.js";
5
+ export {
6
+ random,
7
+ randomInt
8
+ };
@@ -0,0 +1,3 @@
1
+ export declare function randomHash(length?: number): string;
2
+ export declare function randomHashPattern(pattern: number[], joiner?: string): string;
3
+ export declare function randomUUID(): string;
@@ -0,0 +1,11 @@
1
+ import {
2
+ randomHash,
3
+ randomHashPattern,
4
+ randomUUID
5
+ } from "../../../chunks/chunk-75BICI4L.js";
6
+ import "../../../chunks/chunk-OGBUSUE6.js";
7
+ export {
8
+ randomHash,
9
+ randomHashPattern,
10
+ randomUUID
11
+ };
@@ -2,19 +2,19 @@ import {
2
2
  normalizeIndent
3
3
  } from "../../chunks/chunk-JQXNEJAP.js";
4
4
  import {
5
- replaceAll
6
- } from "../../chunks/chunk-MF56TTC5.js";
7
- import {
8
- toAlphanum
9
- } from "../../chunks/chunk-COVPTTAD.js";
5
+ CharCodes
6
+ } from "../../chunks/chunk-34U4HX4V.js";
10
7
  import {
11
8
  matches,
12
9
  matchesEvery,
13
10
  matchesSome
14
11
  } from "../../chunks/chunk-LQFKUNVQ.js";
15
12
  import {
16
- CharCodes
17
- } from "../../chunks/chunk-34U4HX4V.js";
13
+ replaceAll
14
+ } from "../../chunks/chunk-MF56TTC5.js";
15
+ import {
16
+ toAlphanum
17
+ } from "../../chunks/chunk-COVPTTAD.js";
18
18
 
19
19
  // src/agnostic/strings/index.ts
20
20
  var Strings;
@@ -1,12 +1,12 @@
1
+ import {
2
+ timeout
3
+ } from "../../chunks/chunk-Z7ZDDBV5.js";
1
4
  import {
2
5
  Duration
3
6
  } from "../../chunks/chunk-6NYUQXJT.js";
4
7
  import {
5
8
  Transitions
6
9
  } from "../../chunks/chunk-ENMBK6H7.js";
7
- import {
8
- timeout
9
- } from "../../chunks/chunk-Z7ZDDBV5.js";
10
10
  import {
11
11
  wait
12
12
  } from "../../chunks/chunk-4CIS3R7T.js";
@@ -0,0 +1,20 @@
1
+ import {
2
+ randomHexChar
3
+ } from "./chunk-OGBUSUE6.js";
4
+
5
+ // src/agnostic/random/uuid/index.ts
6
+ function randomHash(length = 4) {
7
+ return new Array(length).fill(null).map(randomHexChar).join("");
8
+ }
9
+ function randomHashPattern(pattern, joiner = "-") {
10
+ return pattern.map(randomHash).join(joiner);
11
+ }
12
+ function randomUUID() {
13
+ return randomHashPattern([8, 4, 4, 4, 12]);
14
+ }
15
+
16
+ export {
17
+ randomHash,
18
+ randomHashPattern,
19
+ randomUUID
20
+ };