@design-edito/tools 0.1.18 → 0.1.19
Sign up to get free protection for your applications and to get access to all the features.
- package/agnostic/async/index.js +3 -3
- package/agnostic/css/index.js +14 -13
- package/agnostic/errors/index.d.ts +2 -0
- package/agnostic/errors/index.js +3 -2
- package/agnostic/errors/register/index.d.ts +21 -31
- package/agnostic/errors/register/index.js +1 -1
- package/agnostic/errors/unknown-to-string/index.d.ts +1 -0
- package/agnostic/errors/unknown-to-string/index.js +6 -0
- package/agnostic/html/index.js +16 -15
- package/agnostic/html/sanitize/index.js +5 -4
- package/agnostic/html/selector-to-element/index.js +5 -4
- package/agnostic/html/string-to-nodes/index.js +6 -5
- package/agnostic/misc/index.js +6 -6
- package/agnostic/numbers/index.js +5 -5
- package/agnostic/strings/index.js +6 -6
- package/chunks/{chunk-WQI4RK2W.js → chunk-2H4QYFEP.js} +1 -1
- package/chunks/{chunk-BC22JVVY.js → chunk-2KT7AKRW.js} +5 -1
- package/chunks/{chunk-FMGKTQK4.js → chunk-6ETCY4VK.js} +2 -2
- package/chunks/{chunk-BG6HX6CQ.js → chunk-C5WKMLKU.js} +1 -1
- package/chunks/chunk-FENXVJYO.js +11 -0
- package/chunks/{chunk-2ZQYNOGG.js → chunk-FYHRUYTU.js} +1 -1
- package/chunks/{chunk-WRS4WCFS.js → chunk-QHLQVR3E.js} +4 -0
- package/node/files/index.js +3 -3
- package/package.json +1 -1
package/agnostic/async/index.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
+
import {
|
2
|
+
timeoutCall
|
3
|
+
} from "../../chunks/chunk-4VC5PT5T.js";
|
1
4
|
import {
|
2
5
|
Transitions
|
3
6
|
} from "../../chunks/chunk-4GDNHUCZ.js";
|
4
7
|
import {
|
5
8
|
wait
|
6
9
|
} from "../../chunks/chunk-DQNJQBC6.js";
|
7
|
-
import {
|
8
|
-
timeoutCall
|
9
|
-
} from "../../chunks/chunk-4VC5PT5T.js";
|
10
10
|
|
11
11
|
// src/agnostic/async/index.ts
|
12
12
|
var Async;
|
package/agnostic/css/index.js
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
register
|
3
|
+
} from "../../chunks/chunk-C5WKMLKU.js";
|
4
|
+
import {
|
5
|
+
Random
|
6
|
+
} from "../../chunks/chunk-WLL3FNVL.js";
|
7
|
+
import {
|
8
|
+
Crossenv
|
9
|
+
} from "../../chunks/chunk-GJOU3UAL.js";
|
5
10
|
import {
|
6
11
|
Bem
|
7
12
|
} from "../../chunks/chunk-KIONYWA7.js";
|
@@ -10,16 +15,12 @@ import {
|
|
10
15
|
isValidClassName
|
11
16
|
} from "../../chunks/chunk-W5A2TON3.js";
|
12
17
|
import {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
import
|
19
|
-
Crossenv
|
20
|
-
} from "../../chunks/chunk-GJOU3UAL.js";
|
21
|
-
import "../../chunks/chunk-BC22JVVY.js";
|
22
|
-
import "../../chunks/chunk-WRS4WCFS.js";
|
18
|
+
generateNiceColor,
|
19
|
+
niceColors
|
20
|
+
} from "../../chunks/chunk-EDVNAV3G.js";
|
21
|
+
import "../../chunks/chunk-2KT7AKRW.js";
|
22
|
+
import "../../chunks/chunk-FENXVJYO.js";
|
23
|
+
import "../../chunks/chunk-QHLQVR3E.js";
|
23
24
|
import "../../chunks/chunk-QXAJXTXV.js";
|
24
25
|
import "../../chunks/chunk-HC6ZOHCS.js";
|
25
26
|
|
@@ -1,4 +1,6 @@
|
|
1
1
|
import { Register as RegisterNamespace } from './register';
|
2
|
+
import { unknownToString as unknownToStringFunc } from './unknown-to-string';
|
2
3
|
export declare namespace Errors {
|
3
4
|
export import Register = RegisterNamespace;
|
5
|
+
const unknownToString: typeof unknownToStringFunc;
|
4
6
|
}
|
package/agnostic/errors/index.js
CHANGED
@@ -1,44 +1,34 @@
|
|
1
1
|
export declare namespace Register {
|
2
2
|
type RegisterEntry = {
|
3
3
|
message: string;
|
4
|
-
detailsMaker: (...
|
4
|
+
detailsMaker: (...p: any[]) => any;
|
5
5
|
};
|
6
|
-
type
|
7
|
-
[
|
8
|
-
}
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
type DetailsMaker<Source extends
|
13
|
-
|
14
|
-
|
15
|
-
type
|
16
|
-
[k: string]: RegisterEntry;
|
17
|
-
}, Code extends RegisterKeys<Source>> = Parameters<DetailsMaker<Source, Code>>;
|
18
|
-
type Details<Source extends {
|
19
|
-
[k: string]: RegisterEntry;
|
20
|
-
}, Code extends RegisterKeys<Source>> = ReturnType<DetailsMaker<Source, Code>>;
|
21
|
-
type ErrorData<Source extends {
|
22
|
-
[k: string]: RegisterEntry;
|
23
|
-
}, Code extends RegisterKeys<Source>> = {
|
6
|
+
type Source<C extends string> = {
|
7
|
+
[K in C]: RegisterEntry;
|
8
|
+
};
|
9
|
+
function makeSource<S extends Source<string>>(s: S): S;
|
10
|
+
type RegisterKeys<S extends Source<string>> = keyof S;
|
11
|
+
type Message<S extends Source<string>, Code extends RegisterKeys<S>> = S[Code]['message'];
|
12
|
+
type DetailsMaker<S extends Source<string>, Code extends RegisterKeys<S>> = S[Code]['detailsMaker'];
|
13
|
+
type DetailsMakerParams<S extends Source<string>, Code extends RegisterKeys<S>> = Parameters<DetailsMaker<S, Code>>;
|
14
|
+
type Details<S extends Source<string>, Code extends RegisterKeys<S>> = ReturnType<DetailsMaker<S, Code>>;
|
15
|
+
type ErrorData<S extends Source<string>, Code extends RegisterKeys<S>> = {
|
24
16
|
code: Code;
|
25
|
-
message: Message<
|
26
|
-
details: Details<
|
17
|
+
message: Message<S, Code>;
|
18
|
+
details: Details<S, Code>;
|
27
19
|
};
|
28
|
-
function from<
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
getErrorData: <Code extends RegisterKeys<Source>>(code: Code, ...params: DetailsMakerParams<Source, Code>) => ErrorData<Source, Code>;
|
35
|
-
getError: <Code extends RegisterKeys<Source>>(code: Code, ...params: DetailsMakerParams<Source, Code>) => {
|
20
|
+
function from<S extends Source<string>>(source: S): {
|
21
|
+
getMessage: <Code extends RegisterKeys<S>>(code: Code) => Message<S, Code>;
|
22
|
+
getDetailsMaker: <Code extends RegisterKeys<S>>(code: Code) => DetailsMaker<S, Code>;
|
23
|
+
getDetails: <Code extends RegisterKeys<S>>(code: Code, ...params: DetailsMakerParams<S, Code>) => Details<S, Code>;
|
24
|
+
getErrorData: <Code extends RegisterKeys<S>>(code: Code, ...params: DetailsMakerParams<S, Code>) => ErrorData<S, Code>;
|
25
|
+
getError: <Code extends RegisterKeys<S>>(code: Code, ...params: DetailsMakerParams<S, Code>) => {
|
36
26
|
code: Code;
|
37
|
-
details: ReturnType<DetailsMaker<
|
27
|
+
details: ReturnType<DetailsMaker<S, Code>>;
|
38
28
|
name: string;
|
39
29
|
message: string;
|
40
30
|
stack?: string;
|
41
31
|
};
|
42
|
-
source:
|
32
|
+
source: S;
|
43
33
|
};
|
44
34
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function unknownToString(err: unknown): string;
|
package/agnostic/html/index.js
CHANGED
@@ -1,28 +1,29 @@
|
|
1
|
-
import {
|
2
|
-
stringToNodes
|
3
|
-
} from "../../chunks/chunk-FMGKTQK4.js";
|
4
|
-
import {
|
5
|
-
Sanitize
|
6
|
-
} from "../../chunks/chunk-WQI4RK2W.js";
|
7
1
|
import {
|
8
2
|
getNodeAncestors
|
9
3
|
} from "../../chunks/chunk-SQZGZ3VT.js";
|
4
|
+
import {
|
5
|
+
Placeholders
|
6
|
+
} from "../../chunks/chunk-VYW4IADX.js";
|
10
7
|
import {
|
11
8
|
getPositionInsideParent
|
12
9
|
} from "../../chunks/chunk-VTPRO4NJ.js";
|
13
|
-
import {
|
14
|
-
selectorToElement
|
15
|
-
} from "../../chunks/chunk-2ZQYNOGG.js";
|
16
|
-
import "../../chunks/chunk-BG6HX6CQ.js";
|
17
|
-
import "../../chunks/chunk-GJOU3UAL.js";
|
18
|
-
import "../../chunks/chunk-BC22JVVY.js";
|
19
|
-
import "../../chunks/chunk-WRS4WCFS.js";
|
20
10
|
import {
|
21
11
|
insertNode
|
22
12
|
} from "../../chunks/chunk-XA4HVHJ4.js";
|
23
13
|
import {
|
24
|
-
|
25
|
-
} from "../../chunks/chunk-
|
14
|
+
selectorToElement
|
15
|
+
} from "../../chunks/chunk-FYHRUYTU.js";
|
16
|
+
import {
|
17
|
+
stringToNodes
|
18
|
+
} from "../../chunks/chunk-6ETCY4VK.js";
|
19
|
+
import {
|
20
|
+
Sanitize
|
21
|
+
} from "../../chunks/chunk-2H4QYFEP.js";
|
22
|
+
import "../../chunks/chunk-C5WKMLKU.js";
|
23
|
+
import "../../chunks/chunk-GJOU3UAL.js";
|
24
|
+
import "../../chunks/chunk-2KT7AKRW.js";
|
25
|
+
import "../../chunks/chunk-FENXVJYO.js";
|
26
|
+
import "../../chunks/chunk-QHLQVR3E.js";
|
26
27
|
|
27
28
|
// src/agnostic/html/index.ts
|
28
29
|
var Html;
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import {
|
2
2
|
Sanitize
|
3
|
-
} from "../../../chunks/chunk-
|
4
|
-
import "../../../chunks/chunk-
|
3
|
+
} from "../../../chunks/chunk-2H4QYFEP.js";
|
4
|
+
import "../../../chunks/chunk-C5WKMLKU.js";
|
5
5
|
import "../../../chunks/chunk-GJOU3UAL.js";
|
6
|
-
import "../../../chunks/chunk-
|
7
|
-
import "../../../chunks/chunk-
|
6
|
+
import "../../../chunks/chunk-2KT7AKRW.js";
|
7
|
+
import "../../../chunks/chunk-FENXVJYO.js";
|
8
|
+
import "../../../chunks/chunk-QHLQVR3E.js";
|
8
9
|
export {
|
9
10
|
Sanitize
|
10
11
|
};
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import {
|
2
2
|
selectorToElement
|
3
|
-
} from "../../../chunks/chunk-
|
4
|
-
import "../../../chunks/chunk-
|
3
|
+
} from "../../../chunks/chunk-FYHRUYTU.js";
|
4
|
+
import "../../../chunks/chunk-C5WKMLKU.js";
|
5
5
|
import "../../../chunks/chunk-GJOU3UAL.js";
|
6
|
-
import "../../../chunks/chunk-
|
7
|
-
import "../../../chunks/chunk-
|
6
|
+
import "../../../chunks/chunk-2KT7AKRW.js";
|
7
|
+
import "../../../chunks/chunk-FENXVJYO.js";
|
8
|
+
import "../../../chunks/chunk-QHLQVR3E.js";
|
8
9
|
export {
|
9
10
|
selectorToElement
|
10
11
|
};
|
@@ -1,11 +1,12 @@
|
|
1
1
|
import {
|
2
2
|
stringToNodes
|
3
|
-
} from "../../../chunks/chunk-
|
4
|
-
import "../../../chunks/chunk-
|
5
|
-
import "../../../chunks/chunk-
|
3
|
+
} from "../../../chunks/chunk-6ETCY4VK.js";
|
4
|
+
import "../../../chunks/chunk-2H4QYFEP.js";
|
5
|
+
import "../../../chunks/chunk-C5WKMLKU.js";
|
6
6
|
import "../../../chunks/chunk-GJOU3UAL.js";
|
7
|
-
import "../../../chunks/chunk-
|
8
|
-
import "../../../chunks/chunk-
|
7
|
+
import "../../../chunks/chunk-2KT7AKRW.js";
|
8
|
+
import "../../../chunks/chunk-FENXVJYO.js";
|
9
|
+
import "../../../chunks/chunk-QHLQVR3E.js";
|
9
10
|
export {
|
10
11
|
stringToNodes
|
11
12
|
};
|
package/agnostic/misc/index.js
CHANGED
@@ -1,18 +1,18 @@
|
|
1
|
-
import {
|
2
|
-
Assert
|
3
|
-
} from "../../chunks/chunk-W7YBGJ4H.js";
|
4
1
|
import {
|
5
2
|
getCurrentDownlink
|
6
3
|
} from "../../chunks/chunk-7AWTHZLY.js";
|
4
|
+
import {
|
5
|
+
Assert
|
6
|
+
} from "../../chunks/chunk-W7YBGJ4H.js";
|
7
7
|
import {
|
8
8
|
Logs
|
9
9
|
} from "../../chunks/chunk-HEJV6JIO.js";
|
10
|
-
import {
|
11
|
-
Random
|
12
|
-
} from "../../chunks/chunk-WLL3FNVL.js";
|
13
10
|
import {
|
14
11
|
Cast
|
15
12
|
} from "../../chunks/chunk-4QQBKBYH.js";
|
13
|
+
import {
|
14
|
+
Random
|
15
|
+
} from "../../chunks/chunk-WLL3FNVL.js";
|
16
16
|
import {
|
17
17
|
Crossenv
|
18
18
|
} from "../../chunks/chunk-GJOU3UAL.js";
|
@@ -1,9 +1,12 @@
|
|
1
|
+
import {
|
2
|
+
absoluteModulo
|
3
|
+
} from "../../chunks/chunk-DNIOWD7K.js";
|
1
4
|
import {
|
2
5
|
clamp
|
3
6
|
} from "../../chunks/chunk-OSAXBA7G.js";
|
4
7
|
import {
|
5
|
-
|
6
|
-
} from "../../chunks/chunk-
|
8
|
+
interpolate
|
9
|
+
} from "../../chunks/chunk-EW46EXFB.js";
|
7
10
|
import {
|
8
11
|
createScale,
|
9
12
|
getHarmonic
|
@@ -11,9 +14,6 @@ import {
|
|
11
14
|
import {
|
12
15
|
round
|
13
16
|
} from "../../chunks/chunk-32IRF4OP.js";
|
14
|
-
import {
|
15
|
-
interpolate
|
16
|
-
} from "../../chunks/chunk-EW46EXFB.js";
|
17
17
|
|
18
18
|
// src/agnostic/numbers/index.ts
|
19
19
|
var Numbers;
|
@@ -1,12 +1,6 @@
|
|
1
1
|
import {
|
2
2
|
CharCodes
|
3
3
|
} from "../../chunks/chunk-34U4HX4V.js";
|
4
|
-
import {
|
5
|
-
normalizeIndent
|
6
|
-
} from "../../chunks/chunk-JQXNEJAP.js";
|
7
|
-
import {
|
8
|
-
toAlphanum
|
9
|
-
} from "../../chunks/chunk-COVPTTAD.js";
|
10
4
|
import {
|
11
5
|
matches,
|
12
6
|
matchesEvery,
|
@@ -15,6 +9,12 @@ import {
|
|
15
9
|
import {
|
16
10
|
replaceAll
|
17
11
|
} from "../../chunks/chunk-MF56TTC5.js";
|
12
|
+
import {
|
13
|
+
normalizeIndent
|
14
|
+
} from "../../chunks/chunk-JQXNEJAP.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,11 +1,15 @@
|
|
1
|
+
import {
|
2
|
+
unknownToString
|
3
|
+
} from "./chunk-FENXVJYO.js";
|
1
4
|
import {
|
2
5
|
Register
|
3
|
-
} from "./chunk-
|
6
|
+
} from "./chunk-QHLQVR3E.js";
|
4
7
|
|
5
8
|
// src/agnostic/errors/index.ts
|
6
9
|
var Errors;
|
7
10
|
((Errors2) => {
|
8
11
|
Errors2.Register = Register;
|
12
|
+
Errors2.unknownToString = unknownToString;
|
9
13
|
})(Errors || (Errors = {}));
|
10
14
|
|
11
15
|
export {
|
@@ -0,0 +1,11 @@
|
|
1
|
+
// src/agnostic/errors/unknown-to-string/index.ts
|
2
|
+
function unknownToString(err) {
|
3
|
+
if (err instanceof Error) return err.message;
|
4
|
+
if (typeof err === "string") return err;
|
5
|
+
if (typeof err === "object" && err !== null) return JSON.stringify(err);
|
6
|
+
return `${err}`;
|
7
|
+
}
|
8
|
+
|
9
|
+
export {
|
10
|
+
unknownToString
|
11
|
+
};
|
package/node/files/index.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
import {
|
2
2
|
isInDirectory
|
3
3
|
} from "../../chunks/chunk-NRITRUZW.js";
|
4
|
-
import {
|
5
|
-
readWrite
|
6
|
-
} from "../../chunks/chunk-7DBNMU6N.js";
|
7
4
|
import {
|
8
5
|
Subpaths
|
9
6
|
} from "../../chunks/chunk-HGCG2J77.js";
|
7
|
+
import {
|
8
|
+
readWrite
|
9
|
+
} from "../../chunks/chunk-7DBNMU6N.js";
|
10
10
|
import "../../chunks/chunk-LQFKUNVQ.js";
|
11
11
|
|
12
12
|
// src/node/files/index.ts
|