@design-edito/tools 0.1.14 → 0.1.15
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/index.js +12 -12
- package/agnostic/errors/register/index.d.ts +23 -8
- package/agnostic/html/index.js +14 -14
- package/agnostic/html/sanitize/index.js +3 -3
- package/agnostic/html/selector-to-element/index.js +3 -3
- package/agnostic/html/string-to-nodes/index.js +4 -4
- package/agnostic/misc/index.js +7 -7
- package/agnostic/numbers/index.js +5 -5
- package/agnostic/objects/index.js +3 -3
- package/agnostic/optim/index.js +3 -3
- package/agnostic/strings/index.js +4 -4
- package/chunks/{chunk-YJOEYNCI.js → chunk-5HYQHLDT.js} +2 -2
- package/chunks/{chunk-TSMHOSST.js → chunk-65DWG6N7.js} +1 -1
- package/chunks/{chunk-O2VE3J4K.js → chunk-WAWK26LM.js} +1 -1
- package/node/files/index.js +3 -3
- package/package.json +1 -1
- package/shared/errors/index.d.ts +20 -19
- package/chunks/{chunk-LBOQFB4H.js → chunk-6Z7QI756.js} +3 -3
package/agnostic/css/index.js
CHANGED
@@ -1,19 +1,7 @@
|
|
1
|
-
import {
|
2
|
-
Random
|
3
|
-
} from "../../chunks/chunk-WLL3FNVL.js";
|
4
1
|
import {
|
5
2
|
generateNiceColor,
|
6
3
|
niceColors
|
7
4
|
} from "../../chunks/chunk-EDVNAV3G.js";
|
8
|
-
import {
|
9
|
-
register
|
10
|
-
} from "../../chunks/chunk-LBOQFB4H.js";
|
11
|
-
import {
|
12
|
-
Crossenv
|
13
|
-
} from "../../chunks/chunk-GJOU3UAL.js";
|
14
|
-
import "../../chunks/chunk-4CMAH7Q4.js";
|
15
|
-
import "../../chunks/chunk-HEXR23CH.js";
|
16
|
-
import "../../chunks/chunk-HDPSQ7WY.js";
|
17
5
|
import {
|
18
6
|
Bem
|
19
7
|
} from "../../chunks/chunk-KIONYWA7.js";
|
@@ -21,6 +9,18 @@ import {
|
|
21
9
|
classNameRegex,
|
22
10
|
isValidClassName
|
23
11
|
} from "../../chunks/chunk-W5A2TON3.js";
|
12
|
+
import {
|
13
|
+
Random
|
14
|
+
} from "../../chunks/chunk-WLL3FNVL.js";
|
15
|
+
import {
|
16
|
+
register
|
17
|
+
} from "../../chunks/chunk-6Z7QI756.js";
|
18
|
+
import "../../chunks/chunk-4CMAH7Q4.js";
|
19
|
+
import "../../chunks/chunk-HEXR23CH.js";
|
20
|
+
import "../../chunks/chunk-HDPSQ7WY.js";
|
21
|
+
import {
|
22
|
+
Crossenv
|
23
|
+
} from "../../chunks/chunk-GJOU3UAL.js";
|
24
24
|
import "../../chunks/chunk-QXAJXTXV.js";
|
25
25
|
import "../../chunks/chunk-HC6ZOHCS.js";
|
26
26
|
|
@@ -4,24 +4,39 @@ export declare namespace Register {
|
|
4
4
|
message: string;
|
5
5
|
detailsMaker: (...params: any[]) => any;
|
6
6
|
};
|
7
|
+
type RegisterKeys<Source extends {
|
8
|
+
[k: string]: RegisterEntry;
|
9
|
+
}> = keyof Source;
|
10
|
+
type Message<Source extends {
|
11
|
+
[k: string]: RegisterEntry;
|
12
|
+
}, Code extends RegisterKeys<Source>> = Source[Code]['message'];
|
13
|
+
type DetailsMaker<Source extends {
|
14
|
+
[k: string]: RegisterEntry;
|
15
|
+
}, Code extends RegisterKeys<Source>> = Source[Code]['detailsMaker'];
|
16
|
+
type DetailsMakerParams<Source extends {
|
17
|
+
[k: string]: RegisterEntry;
|
18
|
+
}, Code extends RegisterKeys<Source>> = Parameters<DetailsMaker<Source, Code>>;
|
19
|
+
type Details<Source extends {
|
20
|
+
[k: string]: RegisterEntry;
|
21
|
+
}, Code extends RegisterKeys<Source>> = ReturnType<DetailsMaker<Source, Code>>;
|
7
22
|
function from<Source extends {
|
8
23
|
[k: string]: RegisterEntry;
|
9
24
|
}>(source: Source): {
|
10
|
-
getMessage: <Code extends
|
11
|
-
getDetailsMaker: <Code extends
|
12
|
-
getDetails: <Code extends
|
13
|
-
getError: <Code extends
|
25
|
+
getMessage: <Code extends RegisterKeys<Source>>(code: Code) => Message<Source, Code>;
|
26
|
+
getDetailsMaker: <Code extends RegisterKeys<Source>>(code: Code) => DetailsMaker<Source, Code>;
|
27
|
+
getDetails: <Code extends RegisterKeys<Source>>(code: Code, ...params: DetailsMakerParams<Source, Code>) => Details<Source, Code>;
|
28
|
+
getError: <Code extends RegisterKeys<Source>>(code: Code, ...params: DetailsMakerParams<Source, Code>) => {
|
14
29
|
code: Code;
|
15
|
-
details: ReturnType<Source
|
30
|
+
details: ReturnType<DetailsMaker<Source, Code>>;
|
16
31
|
name: string;
|
17
32
|
message: string;
|
18
33
|
stack?: string;
|
19
34
|
};
|
20
|
-
getFailureOutcome: <Code extends
|
35
|
+
getFailureOutcome: <Code extends RegisterKeys<Source>>(code: Code, ...params: DetailsMakerParams<Source, Code>) => Outcome.Failure<Code, Message<Source, Code>, Details<Source, Code>>;
|
21
36
|
CustomError: {
|
22
|
-
new <Code extends
|
37
|
+
new <Code extends RegisterKeys<Source>>(code: Code, ...params: DetailsMakerParams<Source, Code>): {
|
23
38
|
code: Code;
|
24
|
-
details:
|
39
|
+
details: Details<Source, Code>;
|
25
40
|
name: string;
|
26
41
|
message: string;
|
27
42
|
stack?: string;
|
package/agnostic/html/index.js
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
} from "../../chunks/chunk-
|
4
|
-
import {
|
5
|
-
stringToNodes
|
6
|
-
} from "../../chunks/chunk-YJOEYNCI.js";
|
2
|
+
getNodeAncestors
|
3
|
+
} from "../../chunks/chunk-SQZGZ3VT.js";
|
7
4
|
import {
|
8
5
|
insertNode
|
9
6
|
} from "../../chunks/chunk-XA4HVHJ4.js";
|
10
7
|
import {
|
11
|
-
|
12
|
-
} from "../../chunks/chunk-
|
13
|
-
import {
|
14
|
-
getNodeAncestors
|
15
|
-
} from "../../chunks/chunk-SQZGZ3VT.js";
|
8
|
+
getPositionInsideParent
|
9
|
+
} from "../../chunks/chunk-VTPRO4NJ.js";
|
16
10
|
import {
|
17
11
|
Placeholders
|
18
12
|
} from "../../chunks/chunk-VYW4IADX.js";
|
19
13
|
import {
|
20
|
-
|
21
|
-
} from "../../chunks/chunk-
|
22
|
-
import
|
23
|
-
|
14
|
+
selectorToElement
|
15
|
+
} from "../../chunks/chunk-65DWG6N7.js";
|
16
|
+
import {
|
17
|
+
stringToNodes
|
18
|
+
} from "../../chunks/chunk-5HYQHLDT.js";
|
19
|
+
import {
|
20
|
+
Sanitize
|
21
|
+
} from "../../chunks/chunk-WAWK26LM.js";
|
22
|
+
import "../../chunks/chunk-6Z7QI756.js";
|
24
23
|
import "../../chunks/chunk-4CMAH7Q4.js";
|
25
24
|
import "../../chunks/chunk-HEXR23CH.js";
|
26
25
|
import "../../chunks/chunk-HDPSQ7WY.js";
|
26
|
+
import "../../chunks/chunk-GJOU3UAL.js";
|
27
27
|
|
28
28
|
// src/agnostic/html/index.ts
|
29
29
|
var Html;
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import {
|
2
2
|
Sanitize
|
3
|
-
} from "../../../chunks/chunk-
|
4
|
-
import "../../../chunks/chunk-
|
5
|
-
import "../../../chunks/chunk-GJOU3UAL.js";
|
3
|
+
} from "../../../chunks/chunk-WAWK26LM.js";
|
4
|
+
import "../../../chunks/chunk-6Z7QI756.js";
|
6
5
|
import "../../../chunks/chunk-4CMAH7Q4.js";
|
7
6
|
import "../../../chunks/chunk-HEXR23CH.js";
|
8
7
|
import "../../../chunks/chunk-HDPSQ7WY.js";
|
8
|
+
import "../../../chunks/chunk-GJOU3UAL.js";
|
9
9
|
export {
|
10
10
|
Sanitize
|
11
11
|
};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import {
|
2
2
|
selectorToElement
|
3
|
-
} from "../../../chunks/chunk-
|
4
|
-
import "../../../chunks/chunk-
|
5
|
-
import "../../../chunks/chunk-GJOU3UAL.js";
|
3
|
+
} from "../../../chunks/chunk-65DWG6N7.js";
|
4
|
+
import "../../../chunks/chunk-6Z7QI756.js";
|
6
5
|
import "../../../chunks/chunk-4CMAH7Q4.js";
|
7
6
|
import "../../../chunks/chunk-HEXR23CH.js";
|
8
7
|
import "../../../chunks/chunk-HDPSQ7WY.js";
|
8
|
+
import "../../../chunks/chunk-GJOU3UAL.js";
|
9
9
|
export {
|
10
10
|
selectorToElement
|
11
11
|
};
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import {
|
2
2
|
stringToNodes
|
3
|
-
} from "../../../chunks/chunk-
|
4
|
-
import "../../../chunks/chunk-
|
5
|
-
import "../../../chunks/chunk-
|
6
|
-
import "../../../chunks/chunk-GJOU3UAL.js";
|
3
|
+
} from "../../../chunks/chunk-5HYQHLDT.js";
|
4
|
+
import "../../../chunks/chunk-WAWK26LM.js";
|
5
|
+
import "../../../chunks/chunk-6Z7QI756.js";
|
7
6
|
import "../../../chunks/chunk-4CMAH7Q4.js";
|
8
7
|
import "../../../chunks/chunk-HEXR23CH.js";
|
9
8
|
import "../../../chunks/chunk-HDPSQ7WY.js";
|
9
|
+
import "../../../chunks/chunk-GJOU3UAL.js";
|
10
10
|
export {
|
11
11
|
stringToNodes
|
12
12
|
};
|
package/agnostic/misc/index.js
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
} from "../../chunks/chunk-
|
2
|
+
getCurrentDownlink
|
3
|
+
} from "../../chunks/chunk-7AWTHZLY.js";
|
4
4
|
import {
|
5
5
|
Assert
|
6
6
|
} from "../../chunks/chunk-W7YBGJ4H.js";
|
7
|
-
import {
|
8
|
-
getCurrentDownlink
|
9
|
-
} from "../../chunks/chunk-7AWTHZLY.js";
|
10
7
|
import {
|
11
8
|
Cast
|
12
9
|
} from "../../chunks/chunk-4QQBKBYH.js";
|
13
10
|
import {
|
14
|
-
|
15
|
-
} from "../../chunks/chunk-
|
11
|
+
Logs
|
12
|
+
} from "../../chunks/chunk-HEJV6JIO.js";
|
16
13
|
import {
|
17
14
|
Random
|
18
15
|
} from "../../chunks/chunk-WLL3FNVL.js";
|
19
16
|
import {
|
20
17
|
Crossenv
|
21
18
|
} from "../../chunks/chunk-GJOU3UAL.js";
|
19
|
+
import {
|
20
|
+
isConstructorFunction
|
21
|
+
} from "../../chunks/chunk-RCO57B6F.js";
|
22
22
|
import "../../chunks/chunk-QXAJXTXV.js";
|
23
23
|
import {
|
24
24
|
isNotNullish,
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import {
|
2
|
-
absoluteModulo
|
3
|
-
} from "../../chunks/chunk-DNIOWD7K.js";
|
4
1
|
import {
|
5
2
|
clamp
|
6
3
|
} from "../../chunks/chunk-OSAXBA7G.js";
|
4
|
+
import {
|
5
|
+
interpolate
|
6
|
+
} from "../../chunks/chunk-EW46EXFB.js";
|
7
7
|
import {
|
8
8
|
createScale,
|
9
9
|
getHarmonic
|
@@ -12,8 +12,8 @@ import {
|
|
12
12
|
round
|
13
13
|
} from "../../chunks/chunk-32IRF4OP.js";
|
14
14
|
import {
|
15
|
-
|
16
|
-
} from "../../chunks/chunk-
|
15
|
+
absoluteModulo
|
16
|
+
} from "../../chunks/chunk-DNIOWD7K.js";
|
17
17
|
|
18
18
|
// src/agnostic/numbers/index.ts
|
19
19
|
var Numbers;
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import {
|
2
2
|
flattenGetters
|
3
3
|
} from "../../chunks/chunk-PO3V3I57.js";
|
4
|
-
import {
|
5
|
-
isRecord
|
6
|
-
} from "../../chunks/chunk-YDIBNEGA.js";
|
7
4
|
import {
|
8
5
|
isNonNullObject,
|
9
6
|
isObject
|
10
7
|
} from "../../chunks/chunk-HQLRJ7XW.js";
|
8
|
+
import {
|
9
|
+
isRecord
|
10
|
+
} from "../../chunks/chunk-YDIBNEGA.js";
|
11
11
|
import {
|
12
12
|
Validation
|
13
13
|
} from "../../chunks/chunk-FPEW3A27.js";
|
package/agnostic/optim/index.js
CHANGED
@@ -7,14 +7,14 @@ import {
|
|
7
7
|
matchesSome
|
8
8
|
} from "../../chunks/chunk-LQFKUNVQ.js";
|
9
9
|
import {
|
10
|
-
|
11
|
-
} from "../../chunks/chunk-
|
10
|
+
toAlphanum
|
11
|
+
} from "../../chunks/chunk-COVPTTAD.js";
|
12
12
|
import {
|
13
13
|
normalizeIndent
|
14
14
|
} from "../../chunks/chunk-JQXNEJAP.js";
|
15
15
|
import {
|
16
|
-
|
17
|
-
} from "../../chunks/chunk-
|
16
|
+
replaceAll
|
17
|
+
} from "../../chunks/chunk-MF56TTC5.js";
|
18
18
|
|
19
19
|
// src/agnostic/strings/index.ts
|
20
20
|
var Strings;
|
package/node/files/index.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
+
import {
|
2
|
+
Subpaths
|
3
|
+
} from "../../chunks/chunk-HGCG2J77.js";
|
1
4
|
import {
|
2
5
|
isInDirectory
|
3
6
|
} from "../../chunks/chunk-NRITRUZW.js";
|
4
7
|
import {
|
5
8
|
readWrite
|
6
9
|
} from "../../chunks/chunk-7DBNMU6N.js";
|
7
|
-
import {
|
8
|
-
Subpaths
|
9
|
-
} from "../../chunks/chunk-HGCG2J77.js";
|
10
10
|
import "../../chunks/chunk-LQFKUNVQ.js";
|
11
11
|
|
12
12
|
// src/node/files/index.ts
|
package/package.json
CHANGED
package/shared/errors/index.d.ts
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
+
import { Errors } from '~/agnostic/errors';
|
1
2
|
export declare enum Codes {
|
2
3
|
NO_DOCUMENT = "no-window-document-on-runtime",
|
3
4
|
NO_DOCUMENT_PLEASE_PROVIDE = "no-window-document-on-runtime-please-provide"
|
4
5
|
}
|
5
6
|
export declare const register: {
|
6
|
-
getMessage: <Code extends Codes>(code: Code) => {
|
7
|
+
getMessage: <Code extends Codes>(code: Code) => Errors.Register.Message<{
|
7
8
|
"no-window-document-on-runtime": {
|
8
9
|
message: string;
|
9
10
|
detailsMaker: () => undefined;
|
@@ -12,8 +13,8 @@ export declare const register: {
|
|
12
13
|
message: string;
|
13
14
|
detailsMaker: (tips?: string) => string | undefined;
|
14
15
|
};
|
15
|
-
}
|
16
|
-
getDetailsMaker: <Code extends Codes>(code: Code) => {
|
16
|
+
}, Code>;
|
17
|
+
getDetailsMaker: <Code extends Codes>(code: Code) => Errors.Register.DetailsMaker<{
|
17
18
|
"no-window-document-on-runtime": {
|
18
19
|
message: string;
|
19
20
|
detailsMaker: () => undefined;
|
@@ -22,8 +23,8 @@ export declare const register: {
|
|
22
23
|
message: string;
|
23
24
|
detailsMaker: (tips?: string) => string | undefined;
|
24
25
|
};
|
25
|
-
}
|
26
|
-
getDetails: <Code extends Codes>(code: Code, ...params: Parameters<{
|
26
|
+
}, Code>;
|
27
|
+
getDetails: <Code extends Codes>(code: Code, ...params: Parameters<Errors.Register.DetailsMaker<{
|
27
28
|
"no-window-document-on-runtime": {
|
28
29
|
message: string;
|
29
30
|
detailsMaker: () => undefined;
|
@@ -32,7 +33,7 @@ export declare const register: {
|
|
32
33
|
message: string;
|
33
34
|
detailsMaker: (tips?: string) => string | undefined;
|
34
35
|
};
|
35
|
-
}
|
36
|
+
}, Code>>) => ReturnType<Errors.Register.DetailsMaker<{
|
36
37
|
"no-window-document-on-runtime": {
|
37
38
|
message: string;
|
38
39
|
detailsMaker: () => undefined;
|
@@ -41,8 +42,8 @@ export declare const register: {
|
|
41
42
|
message: string;
|
42
43
|
detailsMaker: (tips?: string) => string | undefined;
|
43
44
|
};
|
44
|
-
}
|
45
|
-
getError: <Code extends Codes>(code: Code, ...params: Parameters<{
|
45
|
+
}, Code>>;
|
46
|
+
getError: <Code extends Codes>(code: Code, ...params: Parameters<Errors.Register.DetailsMaker<{
|
46
47
|
"no-window-document-on-runtime": {
|
47
48
|
message: string;
|
48
49
|
detailsMaker: () => undefined;
|
@@ -51,9 +52,9 @@ export declare const register: {
|
|
51
52
|
message: string;
|
52
53
|
detailsMaker: (tips?: string) => string | undefined;
|
53
54
|
};
|
54
|
-
}
|
55
|
+
}, Code>>) => {
|
55
56
|
code: Code;
|
56
|
-
details: ReturnType<{
|
57
|
+
details: ReturnType<Errors.Register.DetailsMaker<{
|
57
58
|
"no-window-document-on-runtime": {
|
58
59
|
message: string;
|
59
60
|
detailsMaker: () => undefined;
|
@@ -62,12 +63,12 @@ export declare const register: {
|
|
62
63
|
message: string;
|
63
64
|
detailsMaker: (tips?: string) => string | undefined;
|
64
65
|
};
|
65
|
-
}
|
66
|
+
}, Code>>;
|
66
67
|
name: string;
|
67
68
|
message: string;
|
68
69
|
stack?: string;
|
69
70
|
};
|
70
|
-
getFailureOutcome: <Code extends Codes>(code: Code, ...params: Parameters<{
|
71
|
+
getFailureOutcome: <Code extends Codes>(code: Code, ...params: Parameters<Errors.Register.DetailsMaker<{
|
71
72
|
"no-window-document-on-runtime": {
|
72
73
|
message: string;
|
73
74
|
detailsMaker: () => undefined;
|
@@ -76,7 +77,7 @@ export declare const register: {
|
|
76
77
|
message: string;
|
77
78
|
detailsMaker: (tips?: string) => string | undefined;
|
78
79
|
};
|
79
|
-
}
|
80
|
+
}, Code>>) => import("../../agnostic/misc/outcome").Outcome.Failure<Code, Errors.Register.Message<{
|
80
81
|
"no-window-document-on-runtime": {
|
81
82
|
message: string;
|
82
83
|
detailsMaker: () => undefined;
|
@@ -85,7 +86,7 @@ export declare const register: {
|
|
85
86
|
message: string;
|
86
87
|
detailsMaker: (tips?: string) => string | undefined;
|
87
88
|
};
|
88
|
-
}
|
89
|
+
}, Code>, ReturnType<Errors.Register.DetailsMaker<{
|
89
90
|
"no-window-document-on-runtime": {
|
90
91
|
message: string;
|
91
92
|
detailsMaker: () => undefined;
|
@@ -94,9 +95,9 @@ export declare const register: {
|
|
94
95
|
message: string;
|
95
96
|
detailsMaker: (tips?: string) => string | undefined;
|
96
97
|
};
|
97
|
-
}
|
98
|
+
}, Code>>>;
|
98
99
|
CustomError: {
|
99
|
-
new <Code extends Codes>(code: Code, ...params: Parameters<{
|
100
|
+
new <Code extends Codes>(code: Code, ...params: Parameters<Errors.Register.DetailsMaker<{
|
100
101
|
"no-window-document-on-runtime": {
|
101
102
|
message: string;
|
102
103
|
detailsMaker: () => undefined;
|
@@ -105,9 +106,9 @@ export declare const register: {
|
|
105
106
|
message: string;
|
106
107
|
detailsMaker: (tips?: string) => string | undefined;
|
107
108
|
};
|
108
|
-
}
|
109
|
+
}, Code>>): {
|
109
110
|
code: Code;
|
110
|
-
details: ReturnType<{
|
111
|
+
details: ReturnType<Errors.Register.DetailsMaker<{
|
111
112
|
"no-window-document-on-runtime": {
|
112
113
|
message: string;
|
113
114
|
detailsMaker: () => undefined;
|
@@ -116,7 +117,7 @@ export declare const register: {
|
|
116
117
|
message: string;
|
117
118
|
detailsMaker: (tips?: string) => string | undefined;
|
118
119
|
};
|
119
|
-
}
|
120
|
+
}, Code>>;
|
120
121
|
name: string;
|
121
122
|
message: string;
|
122
123
|
stack?: string;
|