@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.
- package/agnostic/css/bem/index.js +2 -2
- package/agnostic/css/index.js +12 -9
- package/agnostic/html/hyper-json/cast/index.js +2 -2
- package/agnostic/html/hyper-json/index.js +3 -3
- package/agnostic/html/hyper-json/transformers/append/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/classList/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/join/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/length/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/print/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/push/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/querySelector/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/ref/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/replace/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/split/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toArray/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toBoolean/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toElement/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toNodeList/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toNull/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toNumber/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toRecord/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toRef/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toString/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toText/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/toTransformer/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/transformSelected/index.js +2 -2
- package/agnostic/html/hyper-json/transformers/trim/index.js +2 -2
- package/agnostic/html/hyper-json/tree/index.js +2 -2
- package/agnostic/html/hyper-json/utils/index.js +2 -2
- package/agnostic/html/index.js +12 -12
- package/agnostic/misc/index.js +20 -14
- package/agnostic/misc/logs/index.d.ts +5 -44
- package/agnostic/misc/logs/index.js +4 -1
- package/agnostic/misc/logs/logger/index.d.ts +42 -0
- package/agnostic/misc/logs/logger/index.js +6 -0
- package/agnostic/misc/logs/make-text-block/index.d.ts +1 -0
- package/agnostic/misc/logs/make-text-block/index.js +6 -0
- package/agnostic/misc/logs/styles/index.d.ts +11 -0
- package/agnostic/misc/logs/styles/index.js +7 -0
- package/agnostic/misc/lorem-ipsum/index.js +7 -4
- package/agnostic/numbers/index.js +3 -3
- package/agnostic/objects/index.js +10 -10
- package/agnostic/optim/index.js +3 -3
- package/agnostic/random/hex-char/index.d.ts +2 -0
- package/agnostic/random/hex-char/index.js +8 -0
- package/agnostic/random/index.d.ts +9 -7
- package/agnostic/random/index.js +4 -1
- package/agnostic/random/random/index.d.ts +3 -0
- package/agnostic/random/random/index.js +8 -0
- package/agnostic/random/uuid/index.d.ts +3 -0
- package/agnostic/random/uuid/index.js +11 -0
- package/agnostic/strings/index.js +7 -7
- package/agnostic/time/index.js +3 -3
- package/chunks/chunk-75BICI4L.js +20 -0
- package/chunks/chunk-B2O7PFSF.js +1108 -0
- package/chunks/chunk-BEJSITDG.js +31 -0
- package/chunks/chunk-D3ERTRDW.js +17 -0
- package/chunks/chunk-H4PP6AHP.js +15 -0
- package/chunks/chunk-JWKI6G6E.js +102 -0
- package/chunks/chunk-L3OCRR3V.js +25 -0
- package/chunks/chunk-LFUY5AWK.js +1108 -0
- package/chunks/chunk-OGBUSUE6.js +12 -0
- package/chunks/chunk-PXB7U2DH.js +31 -0
- package/chunks/chunk-S32K7POB.js +29 -0
- package/chunks/chunk-S7MJLTCR.js +211 -0
- package/chunks/chunk-TEB7KZWB.js +21 -0
- package/node/files/index.js +3 -3
- 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
|
-
|
3
|
-
|
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
|
-
|
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-
|
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 @@
|
|
1
|
+
export declare function makeTextBlock(text: string, vPadding?: number, hPadding?: number): string;
|
@@ -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
|
+
};
|
@@ -1,12 +1,15 @@
|
|
1
1
|
import {
|
2
2
|
LoremIpsum
|
3
|
-
} from "../../../chunks/chunk-
|
4
|
-
import "../../../chunks/chunk-
|
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-
|
9
|
-
import "../../../chunks/chunk-
|
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
|
-
|
11
|
-
|
12
|
-
|
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
|
-
|
18
|
-
|
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
|
|
package/agnostic/optim/index.js
CHANGED
@@ -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
|
-
|
3
|
-
|
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
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
8
|
+
const randomHexChar: typeof randomHexCharFunc;
|
9
|
+
const randomHash: typeof randomHashFunc;
|
10
|
+
const randomHashPattern: typeof randomHashPatternFunc;
|
11
|
+
const randomUUID: typeof randomUUIDFunc;
|
10
12
|
}
|
package/agnostic/random/index.js
CHANGED
@@ -2,19 +2,19 @@ import {
|
|
2
2
|
normalizeIndent
|
3
3
|
} from "../../chunks/chunk-JQXNEJAP.js";
|
4
4
|
import {
|
5
|
-
|
6
|
-
} from "../../chunks/chunk-
|
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
|
-
|
17
|
-
} from "../../chunks/chunk-
|
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;
|
package/agnostic/time/index.js
CHANGED
@@ -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
|
+
};
|