@djangocfg/layouts 2.1.492 → 2.1.496
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/layouts",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.496",
|
|
4
4
|
"description": "Simple, straightforward layout components for Next.js - import and use with props",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"layouts",
|
|
@@ -89,12 +89,12 @@
|
|
|
89
89
|
"check": "tsc --noEmit"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
|
-
"@djangocfg/analytics": "^2.1.
|
|
93
|
-
"@djangocfg/api": "^2.1.
|
|
94
|
-
"@djangocfg/centrifugo": "^2.1.
|
|
95
|
-
"@djangocfg/devtools": "^2.1.
|
|
96
|
-
"@djangocfg/i18n": "^2.1.
|
|
97
|
-
"@djangocfg/ui-core": "^2.1.
|
|
92
|
+
"@djangocfg/analytics": "^2.1.496",
|
|
93
|
+
"@djangocfg/api": "^2.1.496",
|
|
94
|
+
"@djangocfg/centrifugo": "^2.1.496",
|
|
95
|
+
"@djangocfg/devtools": "^2.1.496",
|
|
96
|
+
"@djangocfg/i18n": "^2.1.496",
|
|
97
|
+
"@djangocfg/ui-core": "^2.1.496",
|
|
98
98
|
"@hookform/resolvers": "^5.2.2",
|
|
99
99
|
"consola": "^3.4.2",
|
|
100
100
|
"lucide-react": "^0.545.0",
|
|
@@ -124,14 +124,14 @@
|
|
|
124
124
|
"uuid": "^11.1.1"
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|
|
127
|
-
"@djangocfg/analytics": "^2.1.
|
|
128
|
-
"@djangocfg/api": "^2.1.
|
|
129
|
-
"@djangocfg/centrifugo": "^2.1.
|
|
130
|
-
"@djangocfg/devtools": "^2.1.
|
|
131
|
-
"@djangocfg/i18n": "^2.1.
|
|
132
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
133
|
-
"@djangocfg/ui-core": "^2.1.
|
|
134
|
-
"@djangocfg/ui-tools": "^2.1.
|
|
127
|
+
"@djangocfg/analytics": "^2.1.496",
|
|
128
|
+
"@djangocfg/api": "^2.1.496",
|
|
129
|
+
"@djangocfg/centrifugo": "^2.1.496",
|
|
130
|
+
"@djangocfg/devtools": "^2.1.496",
|
|
131
|
+
"@djangocfg/i18n": "^2.1.496",
|
|
132
|
+
"@djangocfg/typescript-config": "^2.1.496",
|
|
133
|
+
"@djangocfg/ui-core": "^2.1.496",
|
|
134
|
+
"@djangocfg/ui-tools": "^2.1.496",
|
|
135
135
|
"@types/node": "^25.9.5",
|
|
136
136
|
"@types/react": "19.2.15",
|
|
137
137
|
"@types/react-dom": "19.2.3",
|
|
@@ -58,6 +58,7 @@ import type {
|
|
|
58
58
|
CentrifugoErrorDetail,
|
|
59
59
|
RuntimeErrorDetail,
|
|
60
60
|
ErrorTrackingContextValue,
|
|
61
|
+
TrackedErrorType,
|
|
61
62
|
} from '../types';
|
|
62
63
|
const ErrorTrackingContext = createContext<ErrorTrackingContextValue | undefined>(undefined);
|
|
63
64
|
|
|
@@ -229,7 +230,7 @@ export function ErrorTrackingProvider({
|
|
|
229
230
|
/**
|
|
230
231
|
* Clear errors by type
|
|
231
232
|
*/
|
|
232
|
-
const clearErrorsByType = useCallback((type:
|
|
233
|
+
const clearErrorsByType = useCallback((type: TrackedErrorType) => {
|
|
233
234
|
setErrors((prev) => prev.filter((error) => error.type !== type));
|
|
234
235
|
}, []);
|
|
235
236
|
|
|
@@ -80,6 +80,23 @@ export interface CentrifugoErrorDetail extends BaseErrorDetail {
|
|
|
80
80
|
data?: any;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
/**
|
|
84
|
+
* Every error category the tracker stores.
|
|
85
|
+
*
|
|
86
|
+
* Named rather than repeated inline: this union was written out twice — once
|
|
87
|
+
* in `ErrorTrackingContextValue.clearErrorsByType` and once in the provider's
|
|
88
|
+
* implementation of it — and the two drifted. `'runtime'` was added to the
|
|
89
|
+
* interface but not to the implementation, so calling the documented API with
|
|
90
|
+
* the documented argument failed to type-check, and consumers carried a patch
|
|
91
|
+
* to paper over it. One definition means that cannot recur.
|
|
92
|
+
*/
|
|
93
|
+
export type TrackedErrorType =
|
|
94
|
+
| 'validation'
|
|
95
|
+
| 'cors'
|
|
96
|
+
| 'network'
|
|
97
|
+
| 'centrifugo'
|
|
98
|
+
| 'runtime';
|
|
99
|
+
|
|
83
100
|
/**
|
|
84
101
|
* Runtime/generic error detail (from runtime-error event)
|
|
85
102
|
* Used for any JS errors that need to be shown to user (e.g., Tour selector errors)
|
|
@@ -297,7 +314,7 @@ export interface ErrorTrackingContextValue {
|
|
|
297
314
|
clearErrors: () => void;
|
|
298
315
|
|
|
299
316
|
/** Clear errors by type */
|
|
300
|
-
clearErrorsByType: (type:
|
|
317
|
+
clearErrorsByType: (type: TrackedErrorType) => void;
|
|
301
318
|
|
|
302
319
|
/** Clear specific error by ID */
|
|
303
320
|
clearError: (id: string) => void;
|