@design-edito/tools 0.1.14 → 0.1.16
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 +9 -9
- package/agnostic/errors/register/index.d.ts +26 -8
- package/agnostic/html/index.js +13 -13
- package/agnostic/misc/index.js +9 -9
- package/agnostic/numbers/index.js +6 -6
- package/agnostic/objects/index.js +4 -4
- package/agnostic/strings/index.js +7 -7
- package/package.json +1 -1
- package/shared/errors/index.d.ts +19 -27
package/agnostic/css/index.js
CHANGED
@@ -5,15 +5,6 @@ import {
|
|
5
5
|
generateNiceColor,
|
6
6
|
niceColors
|
7
7
|
} 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
8
|
import {
|
18
9
|
Bem
|
19
10
|
} from "../../chunks/chunk-KIONYWA7.js";
|
@@ -23,6 +14,15 @@ import {
|
|
23
14
|
} from "../../chunks/chunk-W5A2TON3.js";
|
24
15
|
import "../../chunks/chunk-QXAJXTXV.js";
|
25
16
|
import "../../chunks/chunk-HC6ZOHCS.js";
|
17
|
+
import {
|
18
|
+
register
|
19
|
+
} from "../../chunks/chunk-LBOQFB4H.js";
|
20
|
+
import {
|
21
|
+
Crossenv
|
22
|
+
} from "../../chunks/chunk-GJOU3UAL.js";
|
23
|
+
import "../../chunks/chunk-4CMAH7Q4.js";
|
24
|
+
import "../../chunks/chunk-HEXR23CH.js";
|
25
|
+
import "../../chunks/chunk-HDPSQ7WY.js";
|
26
26
|
|
27
27
|
// src/agnostic/css/styles-set/index.tsx
|
28
28
|
import { Component } from "react";
|
@@ -4,24 +4,42 @@ 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>>;
|
22
|
+
type FailureOutcome<Source extends {
|
23
|
+
[k: string]: RegisterEntry;
|
24
|
+
}, Code extends RegisterKeys<Source>> = Outcome.Failure<Code, Message<Source, Code>, Details<Source, Code>>;
|
7
25
|
function from<Source extends {
|
8
26
|
[k: string]: RegisterEntry;
|
9
27
|
}>(source: Source): {
|
10
|
-
getMessage: <Code extends
|
11
|
-
getDetailsMaker: <Code extends
|
12
|
-
getDetails: <Code extends
|
13
|
-
getError: <Code extends
|
28
|
+
getMessage: <Code extends RegisterKeys<Source>>(code: Code) => Message<Source, Code>;
|
29
|
+
getDetailsMaker: <Code extends RegisterKeys<Source>>(code: Code) => DetailsMaker<Source, Code>;
|
30
|
+
getDetails: <Code extends RegisterKeys<Source>>(code: Code, ...params: DetailsMakerParams<Source, Code>) => Details<Source, Code>;
|
31
|
+
getError: <Code extends RegisterKeys<Source>>(code: Code, ...params: DetailsMakerParams<Source, Code>) => {
|
14
32
|
code: Code;
|
15
|
-
details: ReturnType<Source
|
33
|
+
details: ReturnType<DetailsMaker<Source, Code>>;
|
16
34
|
name: string;
|
17
35
|
message: string;
|
18
36
|
stack?: string;
|
19
37
|
};
|
20
|
-
getFailureOutcome: <Code extends
|
38
|
+
getFailureOutcome: <Code extends RegisterKeys<Source>>(code: Code, ...params: DetailsMakerParams<Source, Code>) => FailureOutcome<Source, Code>;
|
21
39
|
CustomError: {
|
22
|
-
new <Code extends
|
40
|
+
new <Code extends RegisterKeys<Source>>(code: Code, ...params: DetailsMakerParams<Source, Code>): {
|
23
41
|
code: Code;
|
24
|
-
details:
|
42
|
+
details: Details<Source, Code>;
|
25
43
|
name: string;
|
26
44
|
message: string;
|
27
45
|
stack?: string;
|
package/agnostic/html/index.js
CHANGED
@@ -1,26 +1,26 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
} from "../../chunks/chunk-
|
2
|
+
getPositionInsideParent
|
3
|
+
} from "../../chunks/chunk-VTPRO4NJ.js";
|
4
|
+
import {
|
5
|
+
Placeholders
|
6
|
+
} from "../../chunks/chunk-VYW4IADX.js";
|
7
|
+
import {
|
8
|
+
getNodeAncestors
|
9
|
+
} from "../../chunks/chunk-SQZGZ3VT.js";
|
4
10
|
import {
|
5
11
|
stringToNodes
|
6
12
|
} from "../../chunks/chunk-YJOEYNCI.js";
|
7
|
-
import {
|
8
|
-
insertNode
|
9
|
-
} from "../../chunks/chunk-XA4HVHJ4.js";
|
10
13
|
import {
|
11
14
|
Sanitize
|
12
15
|
} from "../../chunks/chunk-O2VE3J4K.js";
|
13
16
|
import {
|
14
|
-
|
15
|
-
} from "../../chunks/chunk-
|
16
|
-
import {
|
17
|
-
Placeholders
|
18
|
-
} from "../../chunks/chunk-VYW4IADX.js";
|
19
|
-
import {
|
20
|
-
getPositionInsideParent
|
21
|
-
} from "../../chunks/chunk-VTPRO4NJ.js";
|
17
|
+
selectorToElement
|
18
|
+
} from "../../chunks/chunk-TSMHOSST.js";
|
22
19
|
import "../../chunks/chunk-LBOQFB4H.js";
|
23
20
|
import "../../chunks/chunk-GJOU3UAL.js";
|
21
|
+
import {
|
22
|
+
insertNode
|
23
|
+
} from "../../chunks/chunk-XA4HVHJ4.js";
|
24
24
|
import "../../chunks/chunk-4CMAH7Q4.js";
|
25
25
|
import "../../chunks/chunk-HEXR23CH.js";
|
26
26
|
import "../../chunks/chunk-HDPSQ7WY.js";
|
package/agnostic/misc/index.js
CHANGED
@@ -1,30 +1,30 @@
|
|
1
|
-
import {
|
2
|
-
Logs
|
3
|
-
} from "../../chunks/chunk-HEJV6JIO.js";
|
4
1
|
import {
|
5
2
|
Assert
|
6
3
|
} from "../../chunks/chunk-W7YBGJ4H.js";
|
7
4
|
import {
|
8
5
|
getCurrentDownlink
|
9
6
|
} from "../../chunks/chunk-7AWTHZLY.js";
|
7
|
+
import {
|
8
|
+
Logs
|
9
|
+
} from "../../chunks/chunk-HEJV6JIO.js";
|
10
10
|
import {
|
11
11
|
Cast
|
12
12
|
} from "../../chunks/chunk-4QQBKBYH.js";
|
13
|
-
import {
|
14
|
-
isConstructorFunction
|
15
|
-
} from "../../chunks/chunk-RCO57B6F.js";
|
16
13
|
import {
|
17
14
|
Random
|
18
15
|
} from "../../chunks/chunk-WLL3FNVL.js";
|
19
|
-
import {
|
20
|
-
Crossenv
|
21
|
-
} from "../../chunks/chunk-GJOU3UAL.js";
|
22
16
|
import "../../chunks/chunk-QXAJXTXV.js";
|
23
17
|
import {
|
24
18
|
isNotNullish,
|
25
19
|
isNullish,
|
26
20
|
nullishValues
|
27
21
|
} from "../../chunks/chunk-HC6ZOHCS.js";
|
22
|
+
import {
|
23
|
+
Crossenv
|
24
|
+
} from "../../chunks/chunk-GJOU3UAL.js";
|
25
|
+
import {
|
26
|
+
isConstructorFunction
|
27
|
+
} from "../../chunks/chunk-RCO57B6F.js";
|
28
28
|
|
29
29
|
// src/agnostic/misc/index.ts
|
30
30
|
var Misc;
|
@@ -1,19 +1,19 @@
|
|
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
|
10
10
|
} from "../../chunks/chunk-UYTXXUU7.js";
|
11
|
+
import {
|
12
|
+
absoluteModulo
|
13
|
+
} from "../../chunks/chunk-DNIOWD7K.js";
|
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,13 +1,13 @@
|
|
1
|
+
import {
|
2
|
+
isNonNullObject,
|
3
|
+
isObject
|
4
|
+
} from "../../chunks/chunk-HQLRJ7XW.js";
|
1
5
|
import {
|
2
6
|
flattenGetters
|
3
7
|
} from "../../chunks/chunk-PO3V3I57.js";
|
4
8
|
import {
|
5
9
|
isRecord
|
6
10
|
} from "../../chunks/chunk-YDIBNEGA.js";
|
7
|
-
import {
|
8
|
-
isNonNullObject,
|
9
|
-
isObject
|
10
|
-
} from "../../chunks/chunk-HQLRJ7XW.js";
|
11
11
|
import {
|
12
12
|
Validation
|
13
13
|
} from "../../chunks/chunk-FPEW3A27.js";
|
@@ -2,19 +2,19 @@ import {
|
|
2
2
|
CharCodes
|
3
3
|
} from "../../chunks/chunk-34U4HX4V.js";
|
4
4
|
import {
|
5
|
-
|
6
|
-
|
7
|
-
matchesSome
|
8
|
-
} from "../../chunks/chunk-LQFKUNVQ.js";
|
5
|
+
normalizeIndent
|
6
|
+
} from "../../chunks/chunk-JQXNEJAP.js";
|
9
7
|
import {
|
10
8
|
replaceAll
|
11
9
|
} from "../../chunks/chunk-MF56TTC5.js";
|
12
|
-
import {
|
13
|
-
normalizeIndent
|
14
|
-
} from "../../chunks/chunk-JQXNEJAP.js";
|
15
10
|
import {
|
16
11
|
toAlphanum
|
17
12
|
} from "../../chunks/chunk-COVPTTAD.js";
|
13
|
+
import {
|
14
|
+
matches,
|
15
|
+
matchesEvery,
|
16
|
+
matchesSome
|
17
|
+
} from "../../chunks/chunk-LQFKUNVQ.js";
|
18
18
|
|
19
19
|
// src/agnostic/strings/index.ts
|
20
20
|
var Strings;
|
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>>) => Errors.Register.FailureOutcome<{
|
80
81
|
"no-window-document-on-runtime": {
|
81
82
|
message: string;
|
82
83
|
detailsMaker: () => undefined;
|
@@ -85,18 +86,9 @@ export declare const register: {
|
|
85
86
|
message: string;
|
86
87
|
detailsMaker: (tips?: string) => string | undefined;
|
87
88
|
};
|
88
|
-
}
|
89
|
-
"no-window-document-on-runtime": {
|
90
|
-
message: string;
|
91
|
-
detailsMaker: () => undefined;
|
92
|
-
};
|
93
|
-
"no-window-document-on-runtime-please-provide": {
|
94
|
-
message: string;
|
95
|
-
detailsMaker: (tips?: string) => string | undefined;
|
96
|
-
};
|
97
|
-
}[Code]["detailsMaker"]>>;
|
89
|
+
}, Code>;
|
98
90
|
CustomError: {
|
99
|
-
new <Code extends Codes>(code: Code, ...params: Parameters<{
|
91
|
+
new <Code extends Codes>(code: Code, ...params: Parameters<Errors.Register.DetailsMaker<{
|
100
92
|
"no-window-document-on-runtime": {
|
101
93
|
message: string;
|
102
94
|
detailsMaker: () => undefined;
|
@@ -105,9 +97,9 @@ export declare const register: {
|
|
105
97
|
message: string;
|
106
98
|
detailsMaker: (tips?: string) => string | undefined;
|
107
99
|
};
|
108
|
-
}
|
100
|
+
}, Code>>): {
|
109
101
|
code: Code;
|
110
|
-
details: ReturnType<{
|
102
|
+
details: ReturnType<Errors.Register.DetailsMaker<{
|
111
103
|
"no-window-document-on-runtime": {
|
112
104
|
message: string;
|
113
105
|
detailsMaker: () => undefined;
|
@@ -116,7 +108,7 @@ export declare const register: {
|
|
116
108
|
message: string;
|
117
109
|
detailsMaker: (tips?: string) => string | undefined;
|
118
110
|
};
|
119
|
-
}
|
111
|
+
}, Code>>;
|
120
112
|
name: string;
|
121
113
|
message: string;
|
122
114
|
stack?: string;
|