@ouroboros/react-errors 1.0.0 → 1.0.2
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/LICENSE +2 -2
- package/index.d.ts +0 -3
- package/index.js +1 -5
- package/package.json +8 -9
- package/{index.tsx → src/index.tsx} +1 -8
- package/style.css +1 -1
- package/tsconfig.json +7 -5
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2026 Ouroboros Coding Inc.
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
21
|
+
SOFTWARE.
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -38,7 +38,7 @@ export function addError(error) {
|
|
|
38
38
|
* @param Object props Properties passed to the component
|
|
39
39
|
* @returns React.Component
|
|
40
40
|
*/
|
|
41
|
-
export default function Errors({ position }) {
|
|
41
|
+
export default function Errors({ position = 'bottom' }) {
|
|
42
42
|
// State
|
|
43
43
|
const [errors, errorsSet] = useState([]);
|
|
44
44
|
// Load effect
|
|
@@ -98,7 +98,3 @@ export default function Errors({ position }) {
|
|
|
98
98
|
Errors.propTypes = {
|
|
99
99
|
position: PropTypes.oneOf(['bottom', 'top'])
|
|
100
100
|
};
|
|
101
|
-
// Default props
|
|
102
|
-
Errors.defaultProps = {
|
|
103
|
-
position: 'bottom'
|
|
104
|
-
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ouroboros/react-errors",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Errors Component. Shows error messages sent to it.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -26,21 +26,20 @@
|
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^18.14.0",
|
|
28
28
|
"@types/react": "^18.0.28",
|
|
29
|
-
"@types/uuid": "^10.0.0",
|
|
30
29
|
"tslint": "^6.1.3",
|
|
31
30
|
"tslint-config-prettier": "^1.18.0",
|
|
32
|
-
"typescript": "^
|
|
31
|
+
"typescript": "^5.9.2"
|
|
33
32
|
},
|
|
34
33
|
"dependencies": {
|
|
35
|
-
"@ouroboros/events": "^1.0
|
|
36
|
-
"@ouroboros/tools": "^0.
|
|
34
|
+
"@ouroboros/events": "^1.1.0",
|
|
35
|
+
"@ouroboros/tools": "^0.6.1",
|
|
37
36
|
"prop-types": "^15.8.1",
|
|
38
|
-
"uuid": "^
|
|
37
|
+
"uuid": "^14.0.0"
|
|
39
38
|
},
|
|
40
39
|
"peerDependencies": {
|
|
41
40
|
"@emotion/react": "^11.10.6",
|
|
42
41
|
"@emotion/styled": "^11.10.6",
|
|
43
|
-
"react": "^17.0.0 || ^18.0.0",
|
|
44
|
-
"react-dom": "^17.0.0 || ^18.0.0"
|
|
42
|
+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
43
|
+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
45
44
|
}
|
|
46
|
-
}
|
|
45
|
+
}
|
|
@@ -54,9 +54,7 @@ export function addError(error: string | object): void {
|
|
|
54
54
|
* @param Object props Properties passed to the component
|
|
55
55
|
* @returns React.Component
|
|
56
56
|
*/
|
|
57
|
-
export default function Errors({
|
|
58
|
-
position
|
|
59
|
-
}: ErrorsProps) {
|
|
57
|
+
export default function Errors({ position = 'bottom' }: ErrorsProps) {
|
|
60
58
|
|
|
61
59
|
// State
|
|
62
60
|
const [ errors, errorsSet ] = useState<ErrorMessageType[]>([]);
|
|
@@ -141,9 +139,4 @@ export default function Errors({
|
|
|
141
139
|
// Valid props
|
|
142
140
|
Errors.propTypes = {
|
|
143
141
|
position: PropTypes.oneOf([ 'bottom', 'top' ])
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// Default props
|
|
147
|
-
Errors.defaultProps = {
|
|
148
|
-
position: 'bottom'
|
|
149
142
|
}
|
package/style.css
CHANGED
package/tsconfig.json
CHANGED
|
@@ -6,15 +6,17 @@
|
|
|
6
6
|
"esModuleInterop": true,
|
|
7
7
|
"isolatedModules": true,
|
|
8
8
|
"jsx": "react",
|
|
9
|
-
"lib": ["
|
|
10
|
-
"
|
|
11
|
-
"moduleResolution": "
|
|
9
|
+
"lib": ["es2020", "dom"],
|
|
10
|
+
"module": "ESNext",
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
12
|
"noEmit": false,
|
|
13
|
+
"outDir": ".",
|
|
13
14
|
"resolveJsonModule": true,
|
|
14
15
|
"strict": true,
|
|
15
16
|
"strictPropertyInitialization": false,
|
|
16
|
-
"target": "esnext"
|
|
17
|
+
"target": "esnext",
|
|
18
|
+
"types": ["react", "node"]
|
|
17
19
|
},
|
|
18
|
-
"include": ["./"],
|
|
20
|
+
"include": ["./src"],
|
|
19
21
|
"exclude": []
|
|
20
22
|
}
|