@xyo-network/react-error 7.0.0 → 7.0.1

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.
@@ -1,7 +1,7 @@
1
1
  import type { Meta } from '@storybook/react-vite';
2
2
  declare const StorybookEntry: Meta;
3
- declare const Default: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import("@xylabs/react-error").ThrownErrorBoundaryProps<import("@xyo-network/payload-model").ModuleError>>;
4
- declare const CustomErrorComponent: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import("@xylabs/react-error").ThrownErrorBoundaryProps<import("@xyo-network/payload-model").ModuleError>>;
3
+ declare const Default: import(".store/storybook-virtual-997ab3c959/package/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import("@xylabs/react-error").ThrownErrorBoundaryProps<import("@xyo-network/payload-model").ModuleError>>;
4
+ declare const CustomErrorComponent: import(".store/storybook-virtual-997ab3c959/package/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import("@xylabs/react-error").ThrownErrorBoundaryProps<import("@xyo-network/payload-model").ModuleError>>;
5
5
  export { CustomErrorComponent, Default };
6
6
  export default StorybookEntry;
7
7
  //# sourceMappingURL=ThrownErrorBoundary.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThrownErrorBoundary.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorBoundary/ThrownErrorBoundary.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAA;AAK1D,QAAA,MAAM,cAAc,EAAE,IAGrB,CAAA;AA0BD,QAAA,MAAM,OAAO,4MAAoB,CAAA;AAGjC,QAAA,MAAM,oBAAoB,4MAAoB,CAAA;AAU9C,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,CAAA;AAExC,eAAe,cAAc,CAAA"}
1
+ {"version":3,"file":"ThrownErrorBoundary.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorBoundary/ThrownErrorBoundary.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAA;AAK1D,QAAA,MAAM,cAAc,EAAE,IAGrB,CAAA;AA0BD,QAAA,MAAM,OAAO,8OAAoB,CAAA;AAGjC,QAAA,MAAM,oBAAoB,8OAAoB,CAAA;AAU9C,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,CAAA;AAExC,eAAe,cAAc,CAAA"}
@@ -1,11 +1,11 @@
1
1
  import type { Meta } from '@storybook/react-vite';
2
2
  declare const StorybookEntry: Meta;
3
- declare const Default: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, Readonly<import("./ErrorAlert.tsx").ErrorAlertProps<unknown>>>;
4
- declare const WithTitle: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, Readonly<import("./ErrorAlert.tsx").ErrorAlertProps<unknown>>>;
5
- declare const WithError: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, Readonly<import("./ErrorAlert.tsx").ErrorAlertProps<unknown>>>;
6
- declare const WithScope: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, Readonly<import("./ErrorAlert.tsx").ErrorAlertProps<unknown>>>;
7
- declare const WithErrorAndScope: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, Readonly<import("./ErrorAlert.tsx").ErrorAlertProps<unknown>>>;
8
- declare const WithErrorAndScopeAndTitle: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, Readonly<import("./ErrorAlert.tsx").ErrorAlertProps<unknown>>>;
3
+ declare const Default: import(".store/storybook-virtual-997ab3c959/package/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, Readonly<import("./ErrorAlert.tsx").ErrorAlertProps<unknown>>>;
4
+ declare const WithTitle: import(".store/storybook-virtual-997ab3c959/package/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, Readonly<import("./ErrorAlert.tsx").ErrorAlertProps<unknown>>>;
5
+ declare const WithError: import(".store/storybook-virtual-997ab3c959/package/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, Readonly<import("./ErrorAlert.tsx").ErrorAlertProps<unknown>>>;
6
+ declare const WithScope: import(".store/storybook-virtual-997ab3c959/package/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, Readonly<import("./ErrorAlert.tsx").ErrorAlertProps<unknown>>>;
7
+ declare const WithErrorAndScope: import(".store/storybook-virtual-997ab3c959/package/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, Readonly<import("./ErrorAlert.tsx").ErrorAlertProps<unknown>>>;
8
+ declare const WithErrorAndScopeAndTitle: import(".store/storybook-virtual-997ab3c959/package/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, Readonly<import("./ErrorAlert.tsx").ErrorAlertProps<unknown>>>;
9
9
  export { Default, WithError, WithErrorAndScope, WithErrorAndScopeAndTitle, WithScope, WithTitle, };
10
10
  export default StorybookEntry;
11
11
  //# sourceMappingURL=ErrorAlert.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorAlert.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorRender/ErrorAlert.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAA;AAK1D,QAAA,MAAM,cAAc,EAAE,IAKrB,CAAA;AAMD,QAAA,MAAM,OAAO,iKAAoB,CAAA;AAGjC,QAAA,MAAM,SAAS,iKAAoB,CAAA;AAGnC,QAAA,MAAM,SAAS,iKAAoB,CAAA;AAGnC,QAAA,MAAM,SAAS,iKAAoB,CAAA;AAGnC,QAAA,MAAM,iBAAiB,iKAAoB,CAAA;AAG3C,QAAA,MAAM,yBAAyB,iKAAoB,CAAA;AAKnD,OAAO,EACL,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,SAAS,EAAE,SAAS,GACvF,CAAA;AAED,eAAe,cAAc,CAAA"}
1
+ {"version":3,"file":"ErrorAlert.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorRender/ErrorAlert.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAA;AAK1D,QAAA,MAAM,cAAc,EAAE,IAKrB,CAAA;AAMD,QAAA,MAAM,OAAO,mMAAoB,CAAA;AAGjC,QAAA,MAAM,SAAS,mMAAoB,CAAA;AAGnC,QAAA,MAAM,SAAS,mMAAoB,CAAA;AAGnC,QAAA,MAAM,SAAS,mMAAoB,CAAA;AAGnC,QAAA,MAAM,iBAAiB,mMAAoB,CAAA;AAG3C,QAAA,MAAM,yBAAyB,mMAAoB,CAAA;AAKnD,OAAO,EACL,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,SAAS,EAAE,SAAS,GACvF,CAAA;AAED,eAAe,cAAc,CAAA"}
@@ -2,7 +2,7 @@ import type { Meta } from '@storybook/react-vite';
2
2
  import React from 'react';
3
3
  import { ErrorReporterProvider } from './Provider.tsx';
4
4
  declare const StorybookEntry: Meta<typeof ErrorReporterProvider>;
5
- declare const Default: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import("./Provider.tsx").ErrorReporterProviderProps & {
5
+ declare const Default: import(".store/storybook-virtual-997ab3c959/package/internal/csf").AnnotatedStoryFn<import("@storybook/react-vite").ReactRenderer, import("./Provider.tsx").ErrorReporterProviderProps & {
6
6
  children?: React.ReactNode | undefined;
7
7
  }>;
8
8
  export { Default };
@@ -1,24 +1,15 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
1
  // src/components/ErrorBoundary.tsx
5
2
  import { Typography } from "@mui/material";
6
3
  import { FlexCol } from "@xylabs/react-flexbox";
7
- import React, { Component } from "react";
4
+ import { Component } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
8
6
  var ErrorBoundary = class extends Component {
9
- static {
10
- __name(this, "ErrorBoundary");
11
- }
12
7
  constructor(props) {
13
8
  super(props);
14
- this.state = {
15
- error: void 0
16
- };
9
+ this.state = { error: void 0 };
17
10
  }
18
11
  static getDerivedStateFromError(error) {
19
- return {
20
- error
21
- };
12
+ return { error };
22
13
  }
23
14
  componentDidCatch(error, errorInfo) {
24
15
  console.error(`${error}: ${errorInfo}`);
@@ -28,13 +19,19 @@ var ErrorBoundary = class extends Component {
28
19
  if (this.props.fallbackWithError) {
29
20
  return this.props.fallbackWithError(this.state.error);
30
21
  }
31
- return this.props.fallback ?? /* @__PURE__ */ React.createElement(FlexCol, null, /* @__PURE__ */ React.createElement(Typography, {
32
- variant: "h1"
33
- }, "Something went wrong."), this.props.scope && /* @__PURE__ */ React.createElement(Typography, {
34
- variant: "h2"
35
- }, "[", this.props.scope, "]"), /* @__PURE__ */ React.createElement(Typography, {
36
- variant: "body1"
37
- }, "[", this.state.error?.message, "]"));
22
+ return this.props.fallback ?? /* @__PURE__ */ jsxs(FlexCol, { children: [
23
+ /* @__PURE__ */ jsx(Typography, { variant: "h1", children: "Something went wrong." }),
24
+ this.props.scope && /* @__PURE__ */ jsxs(Typography, { variant: "h2", children: [
25
+ "[",
26
+ this.props.scope,
27
+ "]"
28
+ ] }),
29
+ /* @__PURE__ */ jsxs(Typography, { variant: "body1", children: [
30
+ "[",
31
+ this.state.error?.message,
32
+ "]"
33
+ ] })
34
+ ] });
38
35
  }
39
36
  return this.props.children;
40
37
  }
@@ -42,96 +39,92 @@ var ErrorBoundary = class extends Component {
42
39
 
43
40
  // src/components/ErrorBoundary/ThrownErrorBoundary.tsx
44
41
  import { ThrownErrorBoundary as ThrownErrorBoundaryBase } from "@xylabs/react-error";
45
- import React2 from "react";
46
- var ThrownErrorBoundary = /* @__PURE__ */ __name((props) => {
47
- return /* @__PURE__ */ React2.createElement(ThrownErrorBoundaryBase, props);
48
- }, "ThrownErrorBoundary");
42
+ import { jsx as jsx2 } from "react/jsx-runtime";
43
+ var ThrownErrorBoundary = (props) => {
44
+ return /* @__PURE__ */ jsx2(ThrownErrorBoundaryBase, { ...props });
45
+ };
49
46
 
50
47
  // src/components/ErrorRender/ErrorAlert.tsx
51
48
  import { ExitToApp as ExitIcon } from "@mui/icons-material";
52
- import { Alert, AlertTitle, Typography as Typography2 } from "@mui/material";
49
+ import {
50
+ Alert,
51
+ AlertTitle,
52
+ Typography as Typography2
53
+ } from "@mui/material";
53
54
  import { ButtonEx } from "@xylabs/react-button";
54
- import React3 from "react";
55
- function ErrorAlert({ title = "Whoops! Something went wrong", onCancel, error = "An unknown error occurred", errorContext, scope, ...props }) {
55
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
56
+ function ErrorAlert({
57
+ title = "Whoops! Something went wrong",
58
+ onCancel,
59
+ error = "An unknown error occurred",
60
+ errorContext,
61
+ scope,
62
+ ...props
63
+ }) {
56
64
  const finalScope = scope ?? errorContext;
57
- return /* @__PURE__ */ React3.createElement(Alert, {
58
- severity: "error",
59
- ...props
60
- }, /* @__PURE__ */ React3.createElement(AlertTitle, null, title), finalScope ? /* @__PURE__ */ React3.createElement("div", null, /* @__PURE__ */ React3.createElement(Typography2, {
61
- variant: "caption",
62
- mr: 0.5,
63
- fontWeight: "bold"
64
- }, "Scope:"), /* @__PURE__ */ React3.createElement(Typography2, {
65
- variant: "caption"
66
- }, finalScope)) : null, /* @__PURE__ */ React3.createElement("div", null, /* @__PURE__ */ React3.createElement(Typography2, {
67
- variant: "caption",
68
- mr: 0.5,
69
- fontWeight: "bold"
70
- }, "Error:"), /* @__PURE__ */ React3.createElement(Typography2, {
71
- variant: "caption"
72
- }, typeof error === "string" ? error : error?.message)), onCancel ? /* @__PURE__ */ React3.createElement(ButtonEx, {
73
- variant: "outlined",
74
- size: "small",
75
- onClick: onCancel,
76
- position: "absolute",
77
- style: {
78
- right: 8,
79
- top: 8
80
- }
81
- }, /* @__PURE__ */ React3.createElement(ExitIcon, {
82
- fontSize: "small"
83
- })) : null);
65
+ return /* @__PURE__ */ jsxs2(Alert, { severity: "error", ...props, children: [
66
+ /* @__PURE__ */ jsx3(AlertTitle, { children: title }),
67
+ finalScope ? /* @__PURE__ */ jsxs2("div", { children: [
68
+ /* @__PURE__ */ jsx3(Typography2, { variant: "caption", mr: 0.5, fontWeight: "bold", children: "Scope:" }),
69
+ /* @__PURE__ */ jsx3(Typography2, { variant: "caption", children: finalScope })
70
+ ] }) : null,
71
+ /* @__PURE__ */ jsxs2("div", { children: [
72
+ /* @__PURE__ */ jsx3(Typography2, { variant: "caption", mr: 0.5, fontWeight: "bold", children: "Error:" }),
73
+ /* @__PURE__ */ jsx3(Typography2, { variant: "caption", children: typeof error === "string" ? error : error?.message })
74
+ ] }),
75
+ onCancel ? /* @__PURE__ */ jsx3(
76
+ ButtonEx,
77
+ {
78
+ variant: "outlined",
79
+ size: "small",
80
+ onClick: onCancel,
81
+ position: "absolute",
82
+ style: { right: 8, top: 8 },
83
+ children: /* @__PURE__ */ jsx3(ExitIcon, { fontSize: "small" })
84
+ }
85
+ ) : null
86
+ ] });
84
87
  }
85
- __name(ErrorAlert, "ErrorAlert");
86
88
 
87
89
  // src/components/ErrorRender/Render.tsx
88
90
  import { FlexCol as FlexCol2 } from "@xylabs/react-flexbox";
89
- import React4, { useEffect } from "react";
90
- function ErrorRender({ onCancel, error, noErrorDisplay = false, customError = null, children, errorContext, scope, useLocation, ...props }) {
91
+ import { useEffect } from "react";
92
+ import { Fragment, jsx as jsx4 } from "react/jsx-runtime";
93
+ function ErrorRender({
94
+ onCancel,
95
+ error,
96
+ noErrorDisplay = false,
97
+ customError = null,
98
+ children,
99
+ errorContext,
100
+ scope,
101
+ useLocation,
102
+ ...props
103
+ }) {
91
104
  const location = useLocation?.();
92
105
  useEffect(() => {
93
106
  if (location) {
94
- location.state = {
95
- from: {
96
- pathname: globalThis.location.pathname
97
- }
98
- };
107
+ location.state = { from: { pathname: globalThis.location.pathname } };
99
108
  }
100
- }, [
101
- location
102
- ]);
109
+ }, [location]);
103
110
  useEffect(() => {
104
111
  if (error) {
105
112
  globalThis.rollbar?.error(error);
106
113
  }
107
- }, [
108
- error
109
- ]);
110
- return error ? /* @__PURE__ */ React4.createElement(FlexCol2, {
111
- alignItems: "stretch",
112
- ...props
113
- }, noErrorDisplay ? customError : /* @__PURE__ */ React4.createElement(FlexCol2, {
114
- alignItems: "center",
115
- ...props
116
- }, /* @__PURE__ */ React4.createElement(ErrorAlert, {
117
- error,
118
- errorContext,
119
- onCancel,
120
- scope
121
- }))) : /* @__PURE__ */ React4.createElement(React4.Fragment, null, children);
114
+ }, [error]);
115
+ return error ? /* @__PURE__ */ jsx4(FlexCol2, { alignItems: "stretch", ...props, children: noErrorDisplay ? customError : /* @__PURE__ */ jsx4(FlexCol2, { alignItems: "center", ...props, children: /* @__PURE__ */ jsx4(ErrorAlert, { error, errorContext, onCancel, scope }) }) }) : /* @__PURE__ */ jsx4(Fragment, { children });
122
116
  }
123
- __name(ErrorRender, "ErrorRender");
124
117
 
125
118
  // src/contexts/ErrorReporter/Provider.tsx
126
119
  import { useRollbar } from "@rollbar/react";
127
- import React5 from "react";
128
120
 
129
121
  // src/contexts/ErrorReporter/Context.ts
130
122
  import { createContext } from "react";
131
123
  var ErrorReporterContext = createContext({});
132
124
 
133
125
  // src/contexts/ErrorReporter/Provider.tsx
134
- var ErrorReporterProvider = /* @__PURE__ */ __name(({ children, rollbar: rollbarProp }) => {
126
+ import { jsx as jsx5 } from "react/jsx-runtime";
127
+ var ErrorReporterProvider = ({ children, rollbar: rollbarProp }) => {
135
128
  let rollbarFromHook;
136
129
  try {
137
130
  rollbarFromHook = useRollbar();
@@ -141,22 +134,18 @@ var ErrorReporterProvider = /* @__PURE__ */ __name(({ children, rollbar: rollbar
141
134
  if (!rollbar) {
142
135
  throw new Error("ErrorReporterProvider unable to find a Rollbar instance either passed as prop or from Provider");
143
136
  }
144
- return /* @__PURE__ */ React5.createElement(ErrorReporterContext, {
145
- value: {
146
- rollbar
147
- }
148
- }, children);
149
- }, "ErrorReporterProvider");
137
+ return /* @__PURE__ */ jsx5(ErrorReporterContext, { value: { rollbar }, children });
138
+ };
150
139
 
151
140
  // src/contexts/ErrorReporter/useErrorReporter.tsx
152
141
  import { use } from "react";
153
- var useErrorReporter = /* @__PURE__ */ __name(() => {
142
+ var useErrorReporter = () => {
154
143
  const context = use(ErrorReporterContext);
155
144
  if (context === void 0) {
156
145
  console.warn("useErrorReporter must be used within a ErrorReporterContext");
157
146
  }
158
147
  return context ?? {};
159
- }, "useErrorReporter");
148
+ };
160
149
  export {
161
150
  ErrorAlert,
162
151
  ErrorBoundary,
@@ -1 +1 @@
1
- {"version":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"],"sourcesContent":["import { Typography } from '@mui/material'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport type { ErrorInfo, ReactNode } from 'react'\nimport React, { Component } from 'react'\n\n/** @deprecated use from @xylabs/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 @xylabs/react-error instead */\nexport interface ErrorBoundaryState {\n error?: Error\n}\n\n/** @deprecated use from @xylabs/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 '@xylabs/react-error'\nimport { ThrownErrorBoundary as ThrownErrorBoundaryBase } from '@xylabs/react-error'\nimport type { ModuleError } from '@xyo-network/payload-model'\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 { ExitToApp as ExitIcon } from '@mui/icons-material'\nimport type { AlertProps } from '@mui/material'\nimport {\n Alert, AlertTitle, Typography,\n} from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\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 variant=\"caption\" mr={0.5} fontWeight=\"bold\">\n Scope:\n </Typography>\n <Typography variant=\"caption\">{finalScope}</Typography>\n </div>\n )\n : null}\n <div>\n <Typography variant=\"caption\" mr={0.5} fontWeight=\"bold\">\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 position=\"absolute\"\n style={{ right: 8, top: 8 }}\n >\n <ExitIcon fontSize=\"small\" />\n </ButtonEx>\n )\n : null}\n </Alert>\n )\n}\n","import { FlexCol } from '@xylabs/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 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 alignItems=\"stretch\" {...props}>\n {noErrorDisplay\n ? customError\n : (\n <FlexCol alignItems=\"center\" {...props}>\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 from 'react'\nimport type Rollbar from 'rollbar'\n\nimport { ErrorReporterContext } from './Context.ts'\n\n/** @deprecated use from @xylabs/react-error instead */\nexport interface ErrorReporterProviderProps {\n rollbar: Rollbar\n}\n/** @deprecated use from @xylabs/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 rollbarFromHook = useRollbar()\n } catch {}\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 // eslint-disable-next-line @eslint-react/no-unstable-context-value\n return <ErrorReporterContext value={{ rollbar }}>{children}</ErrorReporterContext>\n}\n","import { createContext } from 'react'\n\nimport type { ErrorReporterContextState } from './State.ts'\n\n/** @deprecated use from @xylabs/react-error instead */\nexport const ErrorReporterContext = createContext<ErrorReporterContextState>({})\n","import { use } from 'react'\n\nimport { ErrorReporterContext } from './Context.ts'\n\n/** @deprecated use from @xylabs/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"],"mappings":";;;;AAAA,SAASA,kBAAkB;AAC3B,SAASC,eAAe;AAExB,OAAOC,SAASC,iBAAiB;AAkB1B,IAAMC,gBAAN,cAA4BC,UAAAA;EArBnC,OAqBmCA;;;EACjC,YAAYC,OAA2B;AACrC,UAAMA,KAAAA;AACN,SAAKC,QAAQ;MAAEC,OAAOC;IAAU;EAClC;EAEA,OAAOC,yBAAyBF,OAAc;AAC5C,WAAO;MAAEA;IAAM;EACjB;EAESG,kBAAkBH,OAAcI,WAAsB;AAC7DC,YAAQL,MAAM,GAAGA,KAAAA,KAAUI,SAAAA,EAAW;EACxC;EAESE,SAAS;AAChB,QAAI,KAAKP,MAAMC,OAAO;AACpB,UAAI,KAAKF,MAAMS,mBAAmB;AAChC,eAAO,KAAKT,MAAMS,kBAAkB,KAAKR,MAAMC,KAAK;MACtD;AACA,aACE,KAAKF,MAAMU,YACT,sBAAA,cAACC,SAAAA,MACC,sBAAA,cAACC,YAAAA;QAAWC,SAAQ;SAAK,uBAAA,GACxB,KAAKb,MAAMc,SACV,sBAAA,cAACF,YAAAA;QAAWC,SAAQ;SAAK,KAEtB,KAAKb,MAAMc,OAAM,GAAA,GAItB,sBAAA,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AAKb,IAAMC,mBAAmB,6BAAA;AAC9B,QAAMC,UAAUC,IAAIC,oBAAAA;AACpB,MAAIF,YAAYG,QAAW;AACzBC,YAAQC,KAAK,6DAAA;EACf;AAEA,SAAOL,WAAW,CAAC;AACrB,GAPgC;","names":["Typography","FlexCol","React","Component","ErrorBoundary","Component","props","state","error","undefined","getDerivedStateFromError","componentDidCatch","errorInfo","console","render","fallbackWithError","fallback","FlexCol","Typography","variant","scope","message","children","ThrownErrorBoundary","ThrownErrorBoundaryBase","React","ThrownErrorBoundary","props","React","ThrownErrorBoundaryBase","ExitToApp","ExitIcon","Alert","AlertTitle","Typography","ButtonEx","React","ErrorAlert","title","onCancel","error","errorContext","scope","props","finalScope","React","Alert","severity","AlertTitle","div","Typography","variant","mr","fontWeight","message","ButtonEx","size","onClick","position","style","right","top","ExitIcon","fontSize","FlexCol","React","useEffect","ErrorRender","onCancel","error","noErrorDisplay","customError","children","errorContext","scope","useLocation","props","location","useEffect","state","from","pathname","globalThis","rollbar","React","FlexCol","alignItems","ErrorAlert","useRollbar","React","createContext","ErrorReporterContext","ErrorReporterProvider","children","rollbar","rollbarProp","rollbarFromHook","useRollbar","Error","React","ErrorReporterContext","value","use","useErrorReporter","context","use","ErrorReporterContext","undefined","console","warn"]}
1
+ {"version":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"],"sourcesContent":["import { Typography } from '@mui/material'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport type { ErrorInfo, ReactNode } from 'react'\nimport React, { Component } from 'react'\n\n/** @deprecated use from @xylabs/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 @xylabs/react-error instead */\nexport interface ErrorBoundaryState {\n error?: Error\n}\n\n/** @deprecated use from @xylabs/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 '@xylabs/react-error'\nimport { ThrownErrorBoundary as ThrownErrorBoundaryBase } from '@xylabs/react-error'\nimport type { ModuleError } from '@xyo-network/payload-model'\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 { ExitToApp as ExitIcon } from '@mui/icons-material'\nimport type { AlertProps } from '@mui/material'\nimport {\n Alert, AlertTitle, Typography,\n} from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\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 variant=\"caption\" mr={0.5} fontWeight=\"bold\">\n Scope:\n </Typography>\n <Typography variant=\"caption\">{finalScope}</Typography>\n </div>\n )\n : null}\n <div>\n <Typography variant=\"caption\" mr={0.5} fontWeight=\"bold\">\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 position=\"absolute\"\n style={{ right: 8, top: 8 }}\n >\n <ExitIcon fontSize=\"small\" />\n </ButtonEx>\n )\n : null}\n </Alert>\n )\n}\n","import { FlexCol } from '@xylabs/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 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 alignItems=\"stretch\" {...props}>\n {noErrorDisplay\n ? customError\n : (\n <FlexCol alignItems=\"center\" {...props}>\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 from 'react'\nimport type Rollbar from 'rollbar'\n\nimport { ErrorReporterContext } from './Context.ts'\n\n/** @deprecated use from @xylabs/react-error instead */\nexport interface ErrorReporterProviderProps {\n rollbar: Rollbar\n}\n/** @deprecated use from @xylabs/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 rollbarFromHook = useRollbar()\n } catch {}\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 // eslint-disable-next-line @eslint-react/no-unstable-context-value\n return <ErrorReporterContext value={{ rollbar }}>{children}</ErrorReporterContext>\n}\n","import { createContext } from 'react'\n\nimport type { ErrorReporterContextState } from './State.ts'\n\n/** @deprecated use from @xylabs/react-error instead */\nexport const ErrorReporterContext = createContext<ErrorReporterContextState>({})\n","import { use } from 'react'\n\nimport { ErrorReporterContext } from './Context.ts'\n\n/** @deprecated use from @xylabs/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"],"mappings":";AAAA,SAAS,kBAAkB;AAC3B,SAAS,eAAe;AAExB,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,eAAO,KAAK,MAAM,kBAAkB,KAAK,MAAM,KAAK;AAAA,MACtD;AACA,aACE,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AAEJ,MAAI;AACF,sBAAkB,WAAW;AAAA,EAC/B,QAAQ;AAAA,EAAC;AAET,QAAM,UAAU,eAAe;AAE/B,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,gGAAgG;AAAA,EAClH;AAGA,SAAO,gBAAAA,KAAC,wBAAqB,OAAO,EAAE,QAAQ,GAAI,UAAS;AAC7D;;;AE3BA,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;","names":["jsx","Typography","jsx","jsxs","FlexCol","jsx","FlexCol","jsx"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/react-error",
3
- "version": "7.0.0",
3
+ "version": "7.0.1",
4
4
  "description": "Common React library for all XYO projects that use React",
5
5
  "keywords": [
6
6
  "xyo",
@@ -43,33 +43,36 @@
43
43
  "src"
44
44
  ],
45
45
  "dependencies": {
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"
46
+ "@rollbar/react": "~1.0.0",
47
+ "@xylabs/react-button": "~7.0.1",
48
+ "@xylabs/react-error": "~7.0.1",
49
+ "@xylabs/react-flexbox": "~7.0.1",
50
+ "@xyo-network/payload-model": "~5.0.5",
51
+ "react-router-dom": "~7.8.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@mui/icons-material": "^7.2.0",
55
- "@mui/material": "^7.2.0",
56
- "@storybook/react-vite": "^9.0.18",
57
- "@types/react": "^19.1.9",
58
- "@xylabs/ts-scripts-yarn3": "^7.0.2",
59
- "@xylabs/tsconfig-react": "^7.0.2",
60
- "prop-types": "^15.8.1",
61
- "react": "^19.1.1",
62
- "react-dom": "^19.1.1",
63
- "rollbar": "^2.26.4",
64
- "storybook": "^9.0.18",
65
- "typescript": "^5.8.3"
54
+ "@mui/icons-material": "~7.3.1",
55
+ "@mui/material": "~7.3.1",
56
+ "@storybook/react-vite": "~9.1.2",
57
+ "@types/react": "~19.1.10",
58
+ "@xylabs/ts-scripts-yarn3": "~7.1.1",
59
+ "@xylabs/tsconfig": "~7.1.1",
60
+ "@xylabs/tsconfig-dom": "~7.1.1",
61
+ "@xylabs/tsconfig-react": "~7.1.1",
62
+ "prop-types": "~15.8.1",
63
+ "react": "~19.1.1",
64
+ "react-dom": "~19.1.1",
65
+ "rollbar": "~2.26.4",
66
+ "storybook": "~9.1.2",
67
+ "typescript": "~5.9.2",
68
+ "vite": "~7.1.2"
66
69
  },
67
70
  "peerDependencies": {
68
71
  "@mui/icons-material": ">=6 <8",
69
72
  "@mui/material": ">=6 <8",
70
- "react": "^19",
71
- "react-dom": "^19",
72
- "rollbar": "^2"
73
+ "react": "~19",
74
+ "react-dom": "~19",
75
+ "rollbar": "~2"
73
76
  },
74
77
  "peerDependenciesMeta": {
75
78
  "rollbar": {