@xyo-network/react-error 6.1.4 → 7.0.0
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/dist/browser/index.d.ts +3 -72
- package/package.json +16 -12
- package/typedoc.json +0 -5
- package/xy.config.ts +0 -10
package/dist/browser/index.d.ts
CHANGED
@@ -1,72 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
import { ModuleError } from '@xyo-network/payload-model';
|
5
|
-
import { AlertProps } from '@mui/material';
|
6
|
-
import { FlexBoxProps } from '@xylabs/react-flexbox';
|
7
|
-
import { Location } from 'react-router-dom';
|
8
|
-
import Rollbar from 'rollbar';
|
9
|
-
|
10
|
-
/** @deprecated use from @xylabs/react-error instead */
|
11
|
-
interface ErrorBoundaryProps {
|
12
|
-
children: ReactNode;
|
13
|
-
fallback?: ReactNode;
|
14
|
-
fallbackWithError?: (error: Error) => ReactNode;
|
15
|
-
scope?: string;
|
16
|
-
}
|
17
|
-
/** @deprecated use from @xylabs/react-error instead */
|
18
|
-
interface ErrorBoundaryState {
|
19
|
-
error?: Error;
|
20
|
-
}
|
21
|
-
/** @deprecated use from @xylabs/react-error instead */
|
22
|
-
declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
23
|
-
constructor(props: ErrorBoundaryProps);
|
24
|
-
static getDerivedStateFromError(error: Error): {
|
25
|
-
error: Error;
|
26
|
-
};
|
27
|
-
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
28
|
-
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
|
29
|
-
}
|
30
|
-
|
31
|
-
declare const ThrownErrorBoundary: FC<ThrownErrorBoundaryProps<ModuleError>>;
|
32
|
-
|
33
|
-
interface ErrorAlertProps<T = void> extends AlertProps {
|
34
|
-
error?: T | Error | string;
|
35
|
-
/** @deprecated use scope instead */
|
36
|
-
errorContext?: string;
|
37
|
-
onCancel?: () => void;
|
38
|
-
scope?: string;
|
39
|
-
}
|
40
|
-
declare function ErrorAlert<T = void>({ title, onCancel, error, errorContext, scope, ...props }: Readonly<ErrorAlertProps<T>>): react_jsx_runtime.JSX.Element;
|
41
|
-
|
42
|
-
type ErrorEx<T = void> = T extends void ? Error : T | Error;
|
43
|
-
interface ErrorRenderProps<T = void> extends FlexBoxProps {
|
44
|
-
customError?: ReactNode;
|
45
|
-
error?: ErrorEx<T>;
|
46
|
-
errorContext?: string;
|
47
|
-
noErrorDisplay?: boolean;
|
48
|
-
noReAuth?: boolean;
|
49
|
-
onCancel?: () => void;
|
50
|
-
scope?: string;
|
51
|
-
useLocation?: () => Location;
|
52
|
-
}
|
53
|
-
|
54
|
-
declare function ErrorRender<T = void>({ onCancel, error, noErrorDisplay, customError, children, errorContext, scope, useLocation, ...props }: ErrorRenderProps<T>): react_jsx_runtime.JSX.Element;
|
55
|
-
|
56
|
-
/** @deprecated use from @xylabs/react-error instead */
|
57
|
-
interface ErrorReporterProviderProps {
|
58
|
-
rollbar: Rollbar;
|
59
|
-
}
|
60
|
-
/** @deprecated use from @xylabs/react-error instead */
|
61
|
-
declare const ErrorReporterProvider: React.FC<PropsWithChildren<ErrorReporterProviderProps>>;
|
62
|
-
|
63
|
-
/** @deprecated use from @xylabs/react-error instead */
|
64
|
-
interface ErrorReporterContextState {
|
65
|
-
rollbar?: Rollbar;
|
66
|
-
}
|
67
|
-
|
68
|
-
/** @deprecated use from @xylabs/react-error instead */
|
69
|
-
declare const useErrorReporter: () => ErrorReporterContextState;
|
70
|
-
|
71
|
-
export { ErrorAlert, ErrorBoundary, ErrorRender, ErrorReporterProvider, ThrownErrorBoundary, useErrorReporter };
|
72
|
-
export type { ErrorAlertProps, ErrorBoundaryProps, ErrorBoundaryState, ErrorEx, ErrorRenderProps, ErrorReporterContextState, ErrorReporterProviderProps };
|
1
|
+
export * from './components/index.ts';
|
2
|
+
export * from './contexts/index.ts';
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@xyo-network/react-error",
|
3
|
-
"version": "
|
3
|
+
"version": "7.0.0",
|
4
4
|
"description": "Common React library for all XYO projects that use React",
|
5
5
|
"keywords": [
|
6
6
|
"xyo",
|
@@ -38,24 +38,28 @@
|
|
38
38
|
},
|
39
39
|
"module": "dist/browser/index.mjs",
|
40
40
|
"types": "dist/browser/index.d.ts",
|
41
|
+
"files": [
|
42
|
+
"dist",
|
43
|
+
"src"
|
44
|
+
],
|
41
45
|
"dependencies": {
|
42
|
-
"@rollbar/react": "^0.
|
43
|
-
"@xylabs/react-button": "^
|
44
|
-
"@xylabs/react-error": "^
|
45
|
-
"@xylabs/react-flexbox": "^
|
46
|
-
"@xyo-network/payload-model": "^
|
47
|
-
"react-router-dom": "^7.7.
|
46
|
+
"@rollbar/react": "^1.0.0",
|
47
|
+
"@xylabs/react-button": "^7.0.0",
|
48
|
+
"@xylabs/react-error": "^7.0.0",
|
49
|
+
"@xylabs/react-flexbox": "^7.0.0",
|
50
|
+
"@xyo-network/payload-model": "^5.0.0",
|
51
|
+
"react-router-dom": "^7.7.1"
|
48
52
|
},
|
49
53
|
"devDependencies": {
|
50
54
|
"@mui/icons-material": "^7.2.0",
|
51
55
|
"@mui/material": "^7.2.0",
|
52
56
|
"@storybook/react-vite": "^9.0.18",
|
53
|
-
"@types/react": "^19.1.
|
54
|
-
"@xylabs/ts-scripts-yarn3": "
|
55
|
-
"@xylabs/tsconfig-react": "
|
57
|
+
"@types/react": "^19.1.9",
|
58
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.2",
|
59
|
+
"@xylabs/tsconfig-react": "^7.0.2",
|
56
60
|
"prop-types": "^15.8.1",
|
57
|
-
"react": "^19.1.
|
58
|
-
"react-dom": "^19.1.
|
61
|
+
"react": "^19.1.1",
|
62
|
+
"react-dom": "^19.1.1",
|
59
63
|
"rollbar": "^2.26.4",
|
60
64
|
"storybook": "^9.0.18",
|
61
65
|
"typescript": "^5.8.3"
|
package/typedoc.json
DELETED