@xyo-network/react-error 10.0.2 → 10.0.4
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/components/ErrorBoundary/ThrownErrorBoundary.d.ts +2 -2
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.d.ts.map +1 -1
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundaryBase.d.ts +4 -4
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundaryBase.d.ts.map +1 -1
- package/dist/browser/components/ErrorBoundary.d.ts +3 -3
- package/dist/browser/components/ErrorBoundary.d.ts.map +1 -1
- package/dist/browser/components/ErrorRender/ErrorAlert.d.ts.map +1 -1
- package/dist/browser/components/ErrorRender/Props.d.ts +1 -1
- package/dist/browser/components/ErrorRender/Props.d.ts.map +1 -1
- package/dist/browser/contexts/ErrorReporter/Context.d.ts +1 -1
- package/dist/browser/contexts/ErrorReporter/Context.d.ts.map +1 -1
- package/dist/browser/contexts/ErrorReporter/Provider.d.ts +2 -2
- package/dist/browser/contexts/ErrorReporter/Provider.d.ts.map +1 -1
- package/dist/browser/contexts/ErrorReporter/State.d.ts +1 -1
- package/dist/browser/contexts/ErrorReporter/State.d.ts.map +1 -1
- package/dist/browser/contexts/ErrorReporter/useErrorReporter.d.ts +1 -1
- package/dist/browser/contexts/ErrorReporter/useErrorReporter.d.ts.map +1 -1
- package/dist/browser/index.mjs +4 -4
- package/dist/browser/index.mjs.map +2 -2
- package/package.json +49 -43
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ThrownErrorBoundaryProps } from '@
|
|
2
|
-
import type { ModuleError } from '@xyo-network/sdk
|
|
1
|
+
import type { ThrownErrorBoundaryProps } from '@ariestools/sdk-react/error';
|
|
2
|
+
import type { ModuleError } from '@xyo-network/sdk';
|
|
3
3
|
import type { FC } from 'react';
|
|
4
4
|
export declare const ThrownErrorBoundary: FC<ThrownErrorBoundaryProps<ModuleError>>;
|
|
5
5
|
//# sourceMappingURL=ThrownErrorBoundary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThrownErrorBoundary.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorBoundary/ThrownErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ThrownErrorBoundary.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorBoundary/ThrownErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAE3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAG/B,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAAC,WAAW,CAAC,CAEzE,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type Rollbar from 'rollbar';
|
|
4
|
-
/** @deprecated use from @
|
|
4
|
+
/** @deprecated use from @ariestools/sdk-react/error instead */
|
|
5
5
|
export type ErrorEx<T = void> = T extends void ? Error : T | Error;
|
|
6
|
-
/** @deprecated use from @
|
|
6
|
+
/** @deprecated use from @ariestools/sdk-react/error instead */
|
|
7
7
|
export interface ThrownErrorBoundaryProps<T = void> {
|
|
8
8
|
boundaryName?: string;
|
|
9
9
|
children: ReactNode;
|
|
@@ -13,10 +13,10 @@ export interface ThrownErrorBoundaryProps<T = void> {
|
|
|
13
13
|
scope?: string;
|
|
14
14
|
title?: string;
|
|
15
15
|
}
|
|
16
|
-
/** @deprecated use from @
|
|
16
|
+
/** @deprecated use from @ariestools/sdk-react/error instead */
|
|
17
17
|
export interface ThrownErrorBoundaryState<T = void> {
|
|
18
18
|
errorEx?: ErrorEx<T>;
|
|
19
19
|
}
|
|
20
|
-
/** @deprecated use from @
|
|
20
|
+
/** @deprecated use from @ariestools/sdk-react/error instead */
|
|
21
21
|
export declare function ThrownErrorBoundaryBase<T = void>({ rollbar, ...props }: Readonly<ThrownErrorBoundaryProps<T>>): React.JSX.Element;
|
|
22
22
|
//# sourceMappingURL=ThrownErrorBoundaryBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThrownErrorBoundaryBase.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorBoundary/ThrownErrorBoundaryBase.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAa,SAAS,EAAE,MAAM,OAAO,CAAA;AACjD,OAAO,KAAoB,MAAM,OAAO,CAAA;AACxC,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;AAKlC
|
|
1
|
+
{"version":3,"file":"ThrownErrorBoundaryBase.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorBoundary/ThrownErrorBoundaryBase.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAa,SAAS,EAAE,MAAM,OAAO,CAAA;AACjD,OAAO,KAAoB,MAAM,OAAO,CAAA;AACxC,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;AAKlC,+DAA+D;AAC/D,MAAM,MAAM,OAAO,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,SAAS,IAAI,GAAG,KAAK,GAAG,CAAC,GAAG,KAAK,CAAA;AAElE,+DAA+D;AAC/D,MAAM,WAAW,wBAAwB,CAAC,CAAC,GAAG,IAAI;IAChD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,SAAS,CAAA;IACnB,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,SAAS,CAAA;IACpE,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,+DAA+D;AAC/D,MAAM,WAAW,wBAAwB,CAAC,CAAC,GAAG,IAAI;IAChD,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;CACrB;AA0CD,+DAA+D;AAC/D,wBAAgB,uBAAuB,CAAC,CAAC,GAAG,IAAI,EAAE,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,QAAQ,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CASjI"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import type { ErrorInfo, ReactNode } from 'react';
|
|
2
2
|
import React, { Component } from 'react';
|
|
3
|
-
/** @deprecated use from @
|
|
3
|
+
/** @deprecated use from @ariestools/sdk-react/error instead */
|
|
4
4
|
export interface ErrorBoundaryProps {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
fallback?: ReactNode;
|
|
7
7
|
fallbackWithError?: (error: Error) => ReactNode;
|
|
8
8
|
scope?: string;
|
|
9
9
|
}
|
|
10
|
-
/** @deprecated use from @
|
|
10
|
+
/** @deprecated use from @ariestools/sdk-react/error instead */
|
|
11
11
|
export interface ErrorBoundaryState {
|
|
12
12
|
error?: Error;
|
|
13
13
|
}
|
|
14
|
-
/** @deprecated use from @
|
|
14
|
+
/** @deprecated use from @ariestools/sdk-react/error instead */
|
|
15
15
|
export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
16
16
|
constructor(props: ErrorBoundaryProps);
|
|
17
17
|
static getDerivedStateFromError(error: Error): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorBoundary.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAExC
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorBoundary.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAExC,+DAA+D;AAC/D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,SAAS,CAAA;IAEnB,QAAQ,CAAC,EAAE,SAAS,CAAA;IAEpB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,SAAS,CAAA;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,+DAA+D;AAC/D,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,KAAK,CAAA;CACd;AAED,+DAA+D;AAC/D,qBAAa,aAAc,SAAQ,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;gBACtE,KAAK,EAAE,kBAAkB;IAKrC,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK;;;IAInC,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS;IAIpD,MAAM;CA4BhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorRender/ErrorAlert.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorRender/ErrorAlert.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAI/C,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,IAAI,CAAE,SAAQ,UAAU;IAC3D,KAAK,CAAC,EAAE,CAAC,GAAG,KAAK,GAAG,MAAM,CAAA;IAC1B,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wBAAgB,UAAU,CAAC,CAAC,GAAG,IAAI,EAAE,EACnC,KAAsC,EACtC,QAAQ,EACR,KAAmC,EACnC,YAAY,EACZ,KAAK,EACL,GAAG,KAAK,EACT,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,qBAgD9B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FlexBoxProps } from '@
|
|
1
|
+
import type { FlexBoxProps } from '@ariestools/sdk-react/flexbox';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
import type { Location } from 'react-router-dom';
|
|
4
4
|
export type ErrorEx<T = void> = T extends void ? Error : T | Error;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Props.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorRender/Props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Props.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorRender/Props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEhD,MAAM,MAAM,OAAO,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,SAAS,IAAI,GAAG,KAAK,GAAG,CAAC,GAAG,KAAK,CAAA;AAElE,MAAM,WAAW,gBAAgB,CAAC,CAAC,GAAG,IAAI,CAAE,SAAQ,YAAY;IAC9D,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,QAAQ,CAAA;CAC7B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ErrorReporterContextState } from './State.ts';
|
|
2
|
-
/** @deprecated use from @
|
|
2
|
+
/** @deprecated use from @ariestools/sdk-react/error instead */
|
|
3
3
|
export declare const ErrorReporterContext: import("react").Context<ErrorReporterContextState>;
|
|
4
4
|
//# sourceMappingURL=Context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ErrorReporter/Context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA;AAE3D
|
|
1
|
+
{"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ErrorReporter/Context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA;AAE3D,+DAA+D;AAC/D,eAAO,MAAM,oBAAoB,oDAA+C,CAAA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type Rollbar from 'rollbar';
|
|
4
|
-
/** @deprecated use from @
|
|
4
|
+
/** @deprecated use from @ariestools/sdk-react/error instead */
|
|
5
5
|
export interface ErrorReporterProviderProps {
|
|
6
6
|
rollbar: Rollbar;
|
|
7
7
|
}
|
|
8
|
-
/** @deprecated use from @
|
|
8
|
+
/** @deprecated use from @ariestools/sdk-react/error instead */
|
|
9
9
|
export declare const ErrorReporterProvider: React.FC<PropsWithChildren<ErrorReporterProviderProps>>;
|
|
10
10
|
//# sourceMappingURL=Provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ErrorReporter/Provider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,KAAkB,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;AAIlC
|
|
1
|
+
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ErrorReporter/Provider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,KAAkB,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;AAIlC,+DAA+D;AAC/D,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,OAAO,CAAA;CACjB;AACD,+DAA+D;AAC/D,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,0BAA0B,CAAC,CAiBzF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ErrorReporter/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;AAElC
|
|
1
|
+
{"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ErrorReporter/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;AAElC,+DAA+D;AAC/D,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useErrorReporter.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ErrorReporter/useErrorReporter.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"useErrorReporter.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ErrorReporter/useErrorReporter.tsx"],"names":[],"mappings":"AAIA,+DAA+D;AAC/D,eAAO,MAAM,gBAAgB,sDAO5B,CAAA"}
|
package/dist/browser/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/components/ErrorBoundary.tsx
|
|
2
|
+
import { FlexCol } from "@ariestools/sdk-react/flexbox";
|
|
2
3
|
import { Typography } from "@mui/material";
|
|
3
|
-
import { FlexCol } from "@xylabs/react-flexbox";
|
|
4
4
|
import { Component } from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
var ErrorBoundary = class extends Component {
|
|
@@ -38,20 +38,20 @@ var ErrorBoundary = class extends Component {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
// src/components/ErrorBoundary/ThrownErrorBoundary.tsx
|
|
41
|
-
import { ThrownErrorBoundary as ThrownErrorBoundaryBase } from "@
|
|
41
|
+
import { ThrownErrorBoundary as ThrownErrorBoundaryBase } from "@ariestools/sdk-react/error";
|
|
42
42
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
43
43
|
var ThrownErrorBoundary = (props) => {
|
|
44
44
|
return /* @__PURE__ */ jsx2(ThrownErrorBoundaryBase, { ...props });
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
// src/components/ErrorRender/ErrorAlert.tsx
|
|
48
|
+
import { ButtonEx } from "@ariestools/sdk-react/button";
|
|
48
49
|
import { ExitToApp as ExitIcon } from "@mui/icons-material";
|
|
49
50
|
import {
|
|
50
51
|
Alert,
|
|
51
52
|
AlertTitle,
|
|
52
53
|
Typography as Typography2
|
|
53
54
|
} from "@mui/material";
|
|
54
|
-
import { ButtonEx } from "@xylabs/react-button";
|
|
55
55
|
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
56
56
|
function ErrorAlert({
|
|
57
57
|
title = "Whoops! Something went wrong",
|
|
@@ -107,7 +107,7 @@ function ErrorAlert({
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
// src/components/ErrorRender/Render.tsx
|
|
110
|
-
import { FlexCol as FlexCol2 } from "@
|
|
110
|
+
import { FlexCol as FlexCol2 } from "@ariestools/sdk-react/flexbox";
|
|
111
111
|
import { useEffect } from "react";
|
|
112
112
|
import { Fragment, jsx as jsx4 } from "react/jsx-runtime";
|
|
113
113
|
function ErrorRender({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/ErrorBoundary.tsx", "../../src/components/ErrorBoundary/ThrownErrorBoundary.tsx", "../../src/components/ErrorRender/ErrorAlert.tsx", "../../src/components/ErrorRender/Render.tsx", "../../src/contexts/ErrorReporter/Provider.tsx", "../../src/contexts/ErrorReporter/Context.ts", "../../src/contexts/ErrorReporter/useErrorReporter.tsx"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": ";AAAA,SAAS,
|
|
4
|
+
"sourcesContent": ["import { FlexCol } from '@ariestools/sdk-react/flexbox'\nimport { Typography } from '@mui/material'\nimport type { ErrorInfo, ReactNode } from 'react'\nimport React, { Component } from 'react'\n\n/** @deprecated use from @ariestools/sdk-react/error instead */\nexport interface ErrorBoundaryProps {\n children: ReactNode\n // fallback as a static ReactNode value\n fallback?: ReactNode\n // fallback element that can receive the error as a prop\n fallbackWithError?: (error: Error) => ReactNode\n scope?: string\n}\n\n/** @deprecated use from @ariestools/sdk-react/error instead */\nexport interface ErrorBoundaryState {\n error?: Error\n}\n\n/** @deprecated use from @ariestools/sdk-react/error instead */\nexport class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n constructor(props: ErrorBoundaryProps) {\n super(props)\n this.state = { error: undefined }\n }\n\n static getDerivedStateFromError(error: Error) {\n return { error }\n }\n\n override componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error(`${error}: ${errorInfo}`)\n }\n\n override render() {\n if (this.state.error) {\n if (this.props.fallbackWithError) {\n return this.props.fallbackWithError(this.state.error)\n }\n return (\n this.props.fallback ?? (\n <FlexCol>\n <Typography variant=\"h1\">Something went wrong.</Typography>\n {this.props.scope && (\n <Typography variant=\"h2\">\n [\n {this.props.scope}\n ]\n </Typography>\n )}\n <Typography variant=\"body1\">\n [\n {this.state.error?.message}\n ]\n </Typography>\n </FlexCol>\n )\n )\n }\n\n return this.props.children\n }\n}\n", "import type { ThrownErrorBoundaryProps } from '@ariestools/sdk-react/error'\nimport { ThrownErrorBoundary as ThrownErrorBoundaryBase } from '@ariestools/sdk-react/error'\nimport type { ModuleError } from '@xyo-network/sdk'\nimport type { FC } from 'react'\nimport React from 'react'\n\nexport const ThrownErrorBoundary: FC<ThrownErrorBoundaryProps<ModuleError>> = (props) => {\n return <ThrownErrorBoundaryBase<ModuleError> {...props} />\n}\n", "import { ButtonEx } from '@ariestools/sdk-react/button'\nimport { ExitToApp as ExitIcon } from '@mui/icons-material'\nimport type { AlertProps } from '@mui/material'\nimport {\n Alert, AlertTitle, Typography,\n} from '@mui/material'\nimport React from 'react'\n\nexport interface ErrorAlertProps<T = void> extends AlertProps {\n error?: T | Error | string\n /** @deprecated use scope instead */\n errorContext?: string\n onCancel?: () => void\n scope?: string\n}\n\nexport function ErrorAlert<T = void>({\n title = 'Whoops! Something went wrong',\n onCancel,\n error = 'An unknown error occurred',\n errorContext,\n scope,\n ...props\n}: Readonly<ErrorAlertProps<T>>) {\n const finalScope = scope ?? errorContext\n return (\n <Alert severity=\"error\" {...props}>\n <AlertTitle>{title}</AlertTitle>\n {finalScope\n ? (\n <div>\n <Typography\n variant=\"caption\"\n sx={{\n mr: 0.5,\n fontWeight: 'bold',\n }}\n >\n Scope:\n </Typography>\n <Typography variant=\"caption\">{finalScope}</Typography>\n </div>\n )\n : null}\n <div>\n <Typography\n variant=\"caption\"\n sx={{\n mr: 0.5,\n fontWeight: 'bold',\n }}\n >\n Error:\n </Typography>\n <Typography variant=\"caption\">{typeof error === 'string' ? error : (error as Error)?.message}</Typography>\n </div>\n {onCancel\n ? (\n <ButtonEx\n variant=\"outlined\"\n size=\"small\"\n onClick={onCancel}\n style={{ right: 8, top: 8 }}\n sx={{ position: 'absolute' }}\n >\n <ExitIcon fontSize=\"small\" />\n </ButtonEx>\n )\n : null}\n </Alert>\n )\n}\n", "import { FlexCol } from '@ariestools/sdk-react/flexbox'\nimport React, { useEffect } from 'react'\n\nimport { ErrorAlert } from './ErrorAlert.tsx'\nimport type { ErrorRenderProps } from './Props.ts'\n\nexport function ErrorRender<T = void>({\n onCancel,\n error,\n noErrorDisplay = false,\n customError = null,\n children,\n errorContext,\n scope,\n useLocation,\n ...props\n}: ErrorRenderProps<T>) {\n const location = useLocation?.()\n useEffect(() => {\n if (location) {\n // ensure we end up at the same place we are now after logging in\n // eslint-disable-next-line react-hooks/immutability\n location.state = { from: { pathname: globalThis.location.pathname } }\n }\n }, [location])\n\n useEffect(() => {\n if (error) {\n globalThis.rollbar?.error(error)\n }\n }, [error])\n\n return error\n ? (\n <FlexCol\n {...props}\n sx={[{ alignItems: 'stretch' }, ...(Array.isArray(props.sx) ? props.sx : [props.sx])]}\n >\n {noErrorDisplay\n ? customError\n : (\n <FlexCol\n {...props}\n sx={[{ alignItems: 'center' }, ...(Array.isArray(props.sx) ? props.sx : [props.sx])]}\n >\n <ErrorAlert error={error} errorContext={errorContext} onCancel={onCancel} scope={scope} />\n </FlexCol>\n )}\n </FlexCol>\n )\n : <>{children}</>\n}\n", "import { useRollbar } from '@rollbar/react'\nimport type { PropsWithChildren } from 'react'\nimport React, { useMemo } from 'react'\nimport type Rollbar from 'rollbar'\n\nimport { ErrorReporterContext } from './Context.ts'\n\n/** @deprecated use from @ariestools/sdk-react/error instead */\nexport interface ErrorReporterProviderProps {\n rollbar: Rollbar\n}\n/** @deprecated use from @ariestools/sdk-react/error instead */\nexport const ErrorReporterProvider: React.FC<PropsWithChildren<ErrorReporterProviderProps>> = ({ children, rollbar: rollbarProp }) => {\n let rollbarFromHook: Rollbar | undefined\n // safely call the hook\n try {\n // eslint-disable-next-line react-x/rules-of-hooks, react-hooks/rules-of-hooks\n rollbarFromHook = useRollbar()\n } catch { /* safely ignore if rollbar hook not available */ }\n\n const rollbar = rollbarProp ?? rollbarFromHook\n\n if (!rollbar) {\n throw new Error('ErrorReporterProvider unable to find a Rollbar instance either passed as prop or from Provider')\n }\n\n const value = useMemo(() => ({ rollbar }), [rollbar])\n\n return <ErrorReporterContext value={value}>{children}</ErrorReporterContext>\n}\n", "import { createContext } from 'react'\n\nimport type { ErrorReporterContextState } from './State.ts'\n\n/** @deprecated use from @ariestools/sdk-react/error instead */\nexport const ErrorReporterContext = createContext<ErrorReporterContextState>({})\n", "import { use } from 'react'\n\nimport { ErrorReporterContext } from './Context.ts'\n\n/** @deprecated use from @ariestools/sdk-react/error instead */\nexport const useErrorReporter = () => {\n const context = use(ErrorReporterContext)\n if (context === undefined) {\n console.warn('useErrorReporter must be used within a ErrorReporterContext')\n }\n\n return context ?? {}\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,eAAe;AACxB,SAAS,kBAAkB;AAE3B,SAAgB,iBAAiB;AAwCrB,cAEE,YAFF;AAtBL,IAAM,gBAAN,cAA4B,UAAkD;AAAA,EACnF,YAAY,OAA2B;AACrC,UAAM,KAAK;AACX,SAAK,QAAQ,EAAE,OAAO,OAAU;AAAA,EAClC;AAAA,EAEA,OAAO,yBAAyB,OAAc;AAC5C,WAAO,EAAE,MAAM;AAAA,EACjB;AAAA,EAES,kBAAkB,OAAc,WAAsB;AAC7D,YAAQ,MAAM,GAAG,KAAK,KAAK,SAAS,EAAE;AAAA,EACxC;AAAA,EAES,SAAS;AAChB,QAAI,KAAK,MAAM,OAAO;AACpB,UAAI,KAAK,MAAM,mBAAmB;AAChC,eAA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MAEnF,2BACG,cAEE,gBAAAD;AAAA,QAACC;AAAA,QAAA;AAAA,UACE,GAAG;AAAA,UACJ,IAAI,CAAC,EAAE,YAAY,SAAS,GAAG,GAAI,MAAM,QAAQ,MAAM,EAAE,IAAI,MAAM,KAAK,CAAC,MAAM,EAAE,CAAE;AAAA,UAEnF,0BAAAD,KAAC,cAAW,OAAc,cAA4B,UAAoB,OAAc;AAAA;AAAA,MAC1F;AAAA;AAAA,EAER,IAEF,gBAAAA,KAAA,YAAG,UAAS;AAClB;;;ACnDA,SAAS,kBAAkB;AAE3B,SAAgB,eAAe;;;ACF/B,SAAS,qBAAqB;AAKvB,IAAM,uBAAuB,cAAyC,CAAC,CAAC;;;ADuBtE,gBAAAE,YAAA;AAhBF,IAAM,wBAAiF,CAAC,EAAE,UAAU,SAAS,YAAY,MAAM;AACpI,MAAI;AAEJ,MAAI;AAEF,sBAAkB,WAAW;AAAA,EAC/B,QAAQ;AAAA,EAAoD;AAE5D,QAAM,UAAU,eAAe;AAE/B,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,gGAAgG;AAAA,EAClH;AAEA,QAAM,QAAQ,QAAQ,OAAO,EAAE,QAAQ,IAAI,CAAC,OAAO,CAAC;AAEpD,SAAO,gBAAAA,KAAC,wBAAqB,OAAe,UAAS;AACvD;;;AE7BA,SAAS,WAAW;AAKb,IAAM,mBAAmB,MAAM;AACpC,QAAM,UAAU,IAAI,oBAAoB;AACxC,MAAI,YAAY,QAAW;AACzB,YAAQ,KAAK,6DAA6D;AAAA,EAC5E;AAEA,SAAO,WAAW,CAAC;AACrB;",
|
|
6
6
|
"names": ["jsx", "Typography", "jsx", "jsxs", "FlexCol", "jsx", "FlexCol", "jsx"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/react-error",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.4",
|
|
4
4
|
"description": "Common React library for all XYO projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xyo",
|
|
@@ -41,88 +41,94 @@
|
|
|
41
41
|
"README.md"
|
|
42
42
|
],
|
|
43
43
|
"devDependencies": {
|
|
44
|
+
"@ariestools/sdk": "^7.0.5",
|
|
45
|
+
"@ariestools/sdk-react": "^10.0.2",
|
|
44
46
|
"@bitauth/libauth": "~3.0.0",
|
|
45
|
-
"@
|
|
46
|
-
"@mui/
|
|
47
|
-
"@mui/material": "^9.1.2",
|
|
47
|
+
"@mui/icons-material": "^9.2.0",
|
|
48
|
+
"@mui/material": "^9.2.0",
|
|
48
49
|
"@noble/post-quantum": "~0.6.1",
|
|
49
50
|
"@opentelemetry/api": "^1.9.1",
|
|
50
|
-
"@opentelemetry/sdk-trace-base": "^2.
|
|
51
|
+
"@opentelemetry/sdk-trace-base": "^2.9.0",
|
|
52
|
+
"@react-spring/web": "^10.1.2",
|
|
51
53
|
"@rollbar/react": "~1.0.0",
|
|
52
54
|
"@scure/base": "~2.2.0",
|
|
53
55
|
"@scure/bip39": "~2.2.0",
|
|
54
56
|
"@storybook/react-vite": "~10.4.6",
|
|
55
57
|
"@types/react": "^19.2.17",
|
|
56
|
-
"@xylabs/
|
|
57
|
-
"@xylabs/
|
|
58
|
-
"@xylabs/
|
|
59
|
-
"@xylabs/
|
|
60
|
-
"@xylabs/
|
|
61
|
-
"@xylabs/
|
|
62
|
-
"@xylabs/
|
|
63
|
-
"@xylabs/
|
|
64
|
-
"@
|
|
65
|
-
"@
|
|
66
|
-
"@xylabs/tsconfig-react": "~8.3.0",
|
|
67
|
-
"@xyo-network/sdk-js": "~7.0",
|
|
68
|
-
"@xyo-network/sdk-protocol-js": "~7.0",
|
|
58
|
+
"@xylabs/eth-address": "^7.0.5",
|
|
59
|
+
"@xylabs/geo": "^7.0.5",
|
|
60
|
+
"@xylabs/pixel": "^7.0.5",
|
|
61
|
+
"@xylabs/threads": "^7.0.5",
|
|
62
|
+
"@xylabs/toolchain": "~8.5.15",
|
|
63
|
+
"@xylabs/tsconfig": "^8.5.15",
|
|
64
|
+
"@xylabs/tsconfig-dom": "^8.5.15",
|
|
65
|
+
"@xylabs/tsconfig-react": "~8.5.15",
|
|
66
|
+
"@xyo-network/sdk": "^7.0.7",
|
|
67
|
+
"@xyo-network/sdk-protocol": "^7.0.12",
|
|
69
68
|
"ajv": "^8.20.0",
|
|
70
69
|
"async-mutex": "^0.5.0",
|
|
71
|
-
"
|
|
72
|
-
"
|
|
70
|
+
"clsx": "^2.1.1",
|
|
71
|
+
"debug": "^4.4.3",
|
|
72
|
+
"eslint": "^10.6.0",
|
|
73
73
|
"ethers": "^6.17.0",
|
|
74
74
|
"hash-wasm": "~4.12.0",
|
|
75
75
|
"idb": "^8.0.3",
|
|
76
76
|
"lru-cache": "^11.5.1",
|
|
77
|
-
"
|
|
77
|
+
"md5": "^2.3.0",
|
|
78
|
+
"numeral": "^2.0.6",
|
|
79
|
+
"observable-fns": "^0.6.1",
|
|
78
80
|
"prop-types": "^15.8.1",
|
|
79
|
-
"query-string": "
|
|
81
|
+
"query-string": "^9.4.1",
|
|
80
82
|
"react": "^19.2.7",
|
|
81
83
|
"react-dom": "^19.2.7",
|
|
82
|
-
"react-router-dom": "^7.18.
|
|
83
|
-
"rollbar": "
|
|
84
|
+
"react-router-dom": "^7.18.1",
|
|
85
|
+
"rollbar": "^3.1.0",
|
|
84
86
|
"storybook": "^10.4.6",
|
|
85
87
|
"typescript": "^6.0.3",
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"zod": "^4.4.3"
|
|
88
|
+
"viem": "^2.54.2",
|
|
89
|
+
"vite": "^8.1.3",
|
|
90
|
+
"zod": "^4.4.3",
|
|
91
|
+
"zustand": "^5.0.14"
|
|
89
92
|
},
|
|
90
93
|
"peerDependencies": {
|
|
94
|
+
"@ariestools/sdk": "^7.0",
|
|
95
|
+
"@ariestools/sdk-react": "^10.0",
|
|
91
96
|
"@bitauth/libauth": "~3.0",
|
|
92
|
-
"@metamask/providers": "^22.1",
|
|
93
97
|
"@mui/icons-material": "^9.0",
|
|
94
98
|
"@mui/material": "^9.0",
|
|
95
99
|
"@noble/post-quantum": "~0.6.1",
|
|
96
100
|
"@opentelemetry/api": "^1.9",
|
|
97
101
|
"@opentelemetry/sdk-trace-base": "^2.7",
|
|
102
|
+
"@react-spring/web": "^10.1",
|
|
98
103
|
"@rollbar/react": "~1.0",
|
|
99
104
|
"@scure/base": "~2.2",
|
|
100
105
|
"@scure/bip39": "~2.2",
|
|
101
|
-
"@xylabs/
|
|
102
|
-
"@xylabs/
|
|
103
|
-
"@xylabs/
|
|
104
|
-
"@xylabs/
|
|
105
|
-
"@
|
|
106
|
-
"@
|
|
107
|
-
"@xylabs/threads": "^6.0",
|
|
108
|
-
"@xyo-network/sdk-js": "^7.0",
|
|
109
|
-
"@xyo-network/sdk-protocol-js": "^7.0",
|
|
106
|
+
"@xylabs/eth-address": "^7.0",
|
|
107
|
+
"@xylabs/geo": "^7.0",
|
|
108
|
+
"@xylabs/pixel": "^7.0",
|
|
109
|
+
"@xylabs/threads": "^7.0",
|
|
110
|
+
"@xyo-network/sdk": "*",
|
|
111
|
+
"@xyo-network/sdk-protocol": "^7.0",
|
|
110
112
|
"ajv": "^8.20",
|
|
111
113
|
"async-mutex": "^0.5",
|
|
112
|
-
"
|
|
114
|
+
"clsx": "^2.1",
|
|
115
|
+
"debug": "^4.4",
|
|
113
116
|
"ethers": "^6.16",
|
|
114
117
|
"hash-wasm": "~4.12",
|
|
115
118
|
"idb": "^8.0",
|
|
116
119
|
"lru-cache": "^11.3",
|
|
117
|
-
"
|
|
120
|
+
"md5": "^2.3",
|
|
121
|
+
"numeral": "^2.0",
|
|
122
|
+
"observable-fns": "^0.6",
|
|
118
123
|
"prop-types": "^15.8",
|
|
119
|
-
"query-string": "
|
|
124
|
+
"query-string": "^9.4",
|
|
120
125
|
"react": "^19.2",
|
|
121
126
|
"react-dom": "^19.2",
|
|
122
127
|
"react-router-dom": "^7.15",
|
|
123
|
-
"rollbar": "
|
|
124
|
-
"
|
|
125
|
-
"zod": "^4.4"
|
|
128
|
+
"rollbar": "^3.1",
|
|
129
|
+
"viem": "^2.48",
|
|
130
|
+
"zod": "^4.4",
|
|
131
|
+
"zustand": "^5.0"
|
|
126
132
|
},
|
|
127
133
|
"peerDependenciesMeta": {
|
|
128
134
|
"rollbar": {
|