@xyo-network/react-error 2.64.0-rc.7 → 2.64.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.cjs +106 -0
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.cjs.map +1 -0
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.d.cts +21 -0
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.d.cts.map +1 -0
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.js +52 -6
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.js.map +1 -1
- package/dist/browser/components/ErrorBoundary/index.cjs +108 -0
- package/dist/browser/components/ErrorBoundary/index.cjs.map +1 -0
- package/dist/browser/components/ErrorBoundary/index.d.cts +2 -0
- package/dist/browser/components/ErrorBoundary/index.d.cts.map +1 -0
- package/dist/browser/components/ErrorBoundary/index.js +84 -1
- package/dist/browser/components/ErrorBoundary/index.js.map +1 -1
- package/dist/browser/components/ErrorRender/ErrorAlert.cjs +39 -0
- package/dist/{node/components/ErrorRender/ErrorAlert.mjs.map → browser/components/ErrorRender/ErrorAlert.cjs.map} +1 -1
- package/dist/browser/components/ErrorRender/ErrorAlert.d.cts +10 -0
- package/dist/browser/components/ErrorRender/ErrorAlert.d.cts.map +1 -0
- package/dist/browser/components/ErrorRender/ErrorAlert.js +3 -2
- package/dist/browser/components/ErrorRender/ErrorAlert.js.map +1 -1
- package/dist/browser/components/ErrorRender/Props.cjs +19 -0
- package/dist/browser/components/ErrorRender/Props.cjs.map +1 -0
- package/dist/browser/components/ErrorRender/Props.d.cts +12 -0
- package/dist/browser/components/ErrorRender/Props.d.cts.map +1 -0
- package/dist/browser/components/ErrorRender/Render.cjs +70 -0
- package/dist/browser/components/ErrorRender/Render.cjs.map +1 -0
- package/dist/browser/components/ErrorRender/Render.d.cts +4 -0
- package/dist/browser/components/ErrorRender/Render.d.cts.map +1 -0
- package/dist/browser/components/ErrorRender/Render.js +22 -5
- package/dist/browser/components/ErrorRender/Render.js.map +1 -1
- package/dist/browser/components/ErrorRender/index.cjs +71 -0
- package/dist/browser/components/ErrorRender/index.cjs.map +1 -0
- package/dist/browser/components/ErrorRender/index.d.cts +4 -0
- package/dist/browser/components/ErrorRender/index.d.cts.map +1 -0
- package/dist/browser/components/ErrorRender/index.js +47 -3
- package/dist/browser/components/ErrorRender/index.js.map +1 -1
- package/dist/browser/components/index.cjs +110 -0
- package/dist/browser/components/index.cjs.map +1 -0
- package/dist/browser/components/index.d.cts +3 -0
- package/dist/browser/components/index.d.cts.map +1 -0
- package/dist/browser/components/index.js +86 -2
- package/dist/browser/components/index.js.map +1 -1
- package/dist/browser/contexts/ErrorReporter/Context.cjs +28 -0
- package/dist/{node/contexts/ErrorReporter/Context.mjs.map → browser/contexts/ErrorReporter/Context.cjs.map} +1 -1
- package/dist/browser/contexts/ErrorReporter/Context.d.cts +4 -0
- package/dist/browser/contexts/ErrorReporter/Context.d.cts.map +1 -0
- package/dist/browser/contexts/ErrorReporter/Context.js +2 -1
- package/dist/browser/contexts/ErrorReporter/Context.js.map +1 -1
- package/dist/browser/contexts/ErrorReporter/Provider.cjs +43 -0
- package/dist/browser/contexts/ErrorReporter/Provider.cjs.map +1 -0
- package/dist/browser/contexts/ErrorReporter/Provider.d.cts +9 -0
- package/dist/browser/contexts/ErrorReporter/Provider.d.cts.map +1 -0
- package/dist/browser/contexts/ErrorReporter/Provider.js +9 -3
- package/dist/browser/contexts/ErrorReporter/Provider.js.map +1 -1
- package/dist/browser/contexts/ErrorReporter/State.cjs +19 -0
- package/dist/browser/contexts/ErrorReporter/State.cjs.map +1 -0
- package/dist/browser/contexts/ErrorReporter/State.d.cts +5 -0
- package/dist/browser/contexts/ErrorReporter/State.d.cts.map +1 -0
- package/dist/browser/contexts/ErrorReporter/index.cjs +56 -0
- package/dist/browser/contexts/ErrorReporter/index.cjs.map +1 -0
- package/dist/browser/contexts/ErrorReporter/index.d.cts +4 -0
- package/dist/browser/contexts/ErrorReporter/index.d.cts.map +1 -0
- package/dist/browser/contexts/ErrorReporter/index.js +32 -3
- package/dist/browser/contexts/ErrorReporter/index.js.map +1 -1
- package/dist/browser/contexts/ErrorReporter/useRollbar.cjs +40 -0
- package/dist/browser/contexts/ErrorReporter/useRollbar.cjs.map +1 -0
- package/dist/browser/contexts/ErrorReporter/useRollbar.d.cts +3 -0
- package/dist/browser/contexts/ErrorReporter/useRollbar.d.cts.map +1 -0
- package/dist/browser/contexts/ErrorReporter/useRollbar.js +8 -2
- package/dist/browser/contexts/ErrorReporter/useRollbar.js.map +1 -1
- package/dist/browser/contexts/index.cjs +56 -0
- package/dist/browser/contexts/index.cjs.map +1 -0
- package/dist/browser/contexts/index.d.cts +2 -0
- package/dist/browser/contexts/index.d.cts.map +1 -0
- package/dist/browser/contexts/index.js +32 -1
- package/dist/browser/contexts/index.js.map +1 -1
- package/dist/browser/index.cjs +141 -0
- package/dist/browser/index.cjs.map +1 -0
- package/dist/browser/index.d.cts +3 -0
- package/dist/browser/index.d.cts.map +1 -0
- package/dist/browser/index.js +117 -2
- package/dist/browser/index.js.map +1 -1
- package/dist/docs.json +25215 -0
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.cjs +110 -0
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.cjs.map +1 -0
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.d.cts +21 -0
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.d.cts.map +1 -0
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.js +55 -33
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.js.map +1 -1
- package/dist/node/components/ErrorBoundary/index.cjs +112 -0
- package/dist/node/components/ErrorBoundary/index.cjs.map +1 -0
- package/dist/node/components/ErrorBoundary/index.d.cts +2 -0
- package/dist/node/components/ErrorBoundary/index.d.cts.map +1 -0
- package/dist/node/components/ErrorBoundary/index.js +82 -20
- package/dist/node/components/ErrorBoundary/index.js.map +1 -1
- package/dist/node/components/ErrorRender/ErrorAlert.cjs +43 -0
- package/dist/node/components/ErrorRender/ErrorAlert.cjs.map +1 -0
- package/dist/node/components/ErrorRender/ErrorAlert.d.cts +10 -0
- package/dist/node/components/ErrorRender/ErrorAlert.d.cts.map +1 -0
- package/dist/node/components/ErrorRender/ErrorAlert.js +14 -37
- package/dist/node/components/ErrorRender/ErrorAlert.js.map +1 -1
- package/dist/node/components/ErrorRender/Props.cjs +19 -0
- package/dist/node/components/ErrorRender/Props.cjs.map +1 -0
- package/dist/node/components/ErrorRender/Props.d.cts +12 -0
- package/dist/node/components/ErrorRender/Props.d.cts.map +1 -0
- package/dist/node/components/ErrorRender/Props.js +0 -16
- package/dist/node/components/ErrorRender/Props.js.map +1 -1
- package/dist/node/components/ErrorRender/Render.cjs +74 -0
- package/dist/node/components/ErrorRender/Render.cjs.map +1 -0
- package/dist/node/components/ErrorRender/Render.d.cts +4 -0
- package/dist/node/components/ErrorRender/Render.d.cts.map +1 -0
- package/dist/node/components/ErrorRender/Render.js +28 -35
- package/dist/node/components/ErrorRender/Render.js.map +1 -1
- package/dist/node/components/ErrorRender/index.cjs +76 -0
- package/dist/node/components/ErrorRender/index.cjs.map +1 -0
- package/dist/node/components/ErrorRender/index.d.cts +4 -0
- package/dist/node/components/ErrorRender/index.d.cts.map +1 -0
- package/dist/node/components/ErrorRender/index.js +45 -24
- package/dist/node/components/ErrorRender/index.js.map +1 -1
- package/dist/node/components/index.cjs +116 -0
- package/dist/node/components/index.cjs.map +1 -0
- package/dist/node/components/index.d.cts +3 -0
- package/dist/node/components/index.d.cts.map +1 -0
- package/dist/node/components/index.js +84 -22
- package/dist/node/components/index.js.map +1 -1
- package/dist/node/contexts/ErrorReporter/Context.cjs +32 -0
- package/dist/node/contexts/ErrorReporter/Context.cjs.map +1 -0
- package/dist/node/contexts/ErrorReporter/Context.d.cts +4 -0
- package/dist/node/contexts/ErrorReporter/Context.d.cts.map +1 -0
- package/dist/node/contexts/ErrorReporter/Context.js +5 -28
- package/dist/node/contexts/ErrorReporter/Context.js.map +1 -1
- package/dist/node/contexts/ErrorReporter/Provider.cjs +47 -0
- package/dist/node/contexts/ErrorReporter/Provider.cjs.map +1 -0
- package/dist/node/contexts/ErrorReporter/Provider.d.cts +9 -0
- package/dist/node/contexts/ErrorReporter/Provider.d.cts.map +1 -0
- package/dist/node/contexts/ErrorReporter/Provider.js +15 -33
- package/dist/node/contexts/ErrorReporter/Provider.js.map +1 -1
- package/dist/node/contexts/ErrorReporter/State.cjs +19 -0
- package/dist/node/contexts/ErrorReporter/State.cjs.map +1 -0
- package/dist/node/contexts/ErrorReporter/State.d.cts +5 -0
- package/dist/node/contexts/ErrorReporter/State.d.cts.map +1 -0
- package/dist/node/contexts/ErrorReporter/State.js +0 -16
- package/dist/node/contexts/ErrorReporter/State.js.map +1 -1
- package/dist/node/contexts/ErrorReporter/index.cjs +61 -0
- package/dist/node/contexts/ErrorReporter/index.cjs.map +1 -0
- package/dist/node/contexts/ErrorReporter/index.d.cts +4 -0
- package/dist/node/contexts/ErrorReporter/index.d.cts.map +1 -0
- package/dist/node/contexts/ErrorReporter/index.js +30 -24
- package/dist/node/contexts/ErrorReporter/index.js.map +1 -1
- package/dist/node/contexts/ErrorReporter/useRollbar.cjs +44 -0
- package/dist/node/contexts/ErrorReporter/useRollbar.cjs.map +1 -0
- package/dist/node/contexts/ErrorReporter/useRollbar.d.cts +3 -0
- package/dist/node/contexts/ErrorReporter/useRollbar.d.cts.map +1 -0
- package/dist/node/contexts/ErrorReporter/useRollbar.js +12 -30
- package/dist/node/contexts/ErrorReporter/useRollbar.js.map +1 -1
- package/dist/node/contexts/index.cjs +61 -0
- package/dist/node/contexts/index.cjs.map +1 -0
- package/dist/node/contexts/index.d.cts +2 -0
- package/dist/node/contexts/index.d.cts.map +1 -0
- package/dist/node/contexts/index.js +30 -20
- package/dist/node/contexts/index.js.map +1 -1
- package/dist/node/index.cjs +149 -0
- package/dist/node/index.cjs.map +1 -0
- package/dist/node/index.d.cts +3 -0
- package/dist/node/index.d.cts.map +1 -0
- package/dist/node/index.js +115 -22
- package/dist/node/index.js.map +1 -1
- package/package.json +17 -17
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.stories.js +0 -26
- package/dist/browser/components/ErrorBoundary/ThrownErrorBoundary.stories.js.map +0 -1
- package/dist/browser/contexts/ErrorReporter/Provider.stories.js +0 -35
- package/dist/browser/contexts/ErrorReporter/Provider.stories.js.map +0 -1
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.mjs +0 -39
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.mjs.map +0 -1
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.stories.js +0 -51
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.stories.js.map +0 -1
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.stories.mjs +0 -26
- package/dist/node/components/ErrorBoundary/ThrownErrorBoundary.stories.mjs.map +0 -1
- package/dist/node/components/ErrorBoundary/index.mjs +0 -2
- package/dist/node/components/ErrorBoundary/index.mjs.map +0 -1
- package/dist/node/components/ErrorRender/ErrorAlert.mjs +0 -17
- package/dist/node/components/ErrorRender/Props.mjs +0 -1
- package/dist/node/components/ErrorRender/Props.mjs.map +0 -1
- package/dist/node/components/ErrorRender/Render.mjs +0 -32
- package/dist/node/components/ErrorRender/Render.mjs.map +0 -1
- package/dist/node/components/ErrorRender/index.mjs +0 -4
- package/dist/node/components/ErrorRender/index.mjs.map +0 -1
- package/dist/node/components/index.mjs +0 -3
- package/dist/node/components/index.mjs.map +0 -1
- package/dist/node/contexts/ErrorReporter/Context.mjs +0 -6
- package/dist/node/contexts/ErrorReporter/Provider.mjs +0 -16
- package/dist/node/contexts/ErrorReporter/Provider.mjs.map +0 -1
- package/dist/node/contexts/ErrorReporter/Provider.stories.js +0 -69
- package/dist/node/contexts/ErrorReporter/Provider.stories.js.map +0 -1
- package/dist/node/contexts/ErrorReporter/Provider.stories.mjs +0 -35
- package/dist/node/contexts/ErrorReporter/Provider.stories.mjs.map +0 -1
- package/dist/node/contexts/ErrorReporter/State.mjs +0 -1
- package/dist/node/contexts/ErrorReporter/State.mjs.map +0 -1
- package/dist/node/contexts/ErrorReporter/index.mjs +0 -4
- package/dist/node/contexts/ErrorReporter/index.mjs.map +0 -1
- package/dist/node/contexts/ErrorReporter/useRollbar.mjs +0 -13
- package/dist/node/contexts/ErrorReporter/useRollbar.mjs.map +0 -1
- package/dist/node/contexts/index.mjs +0 -2
- package/dist/node/contexts/index.mjs.map +0 -1
- package/dist/node/index.mjs +0 -3
- package/dist/node/index.mjs.map +0 -1
@@ -0,0 +1,43 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __export = (target, all) => {
|
7
|
+
for (var name in all)
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
+
};
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
12
|
+
for (let key of __getOwnPropNames(from))
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
15
|
+
}
|
16
|
+
return to;
|
17
|
+
};
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
+
|
20
|
+
// src/contexts/ErrorReporter/Provider.tsx
|
21
|
+
var Provider_exports = {};
|
22
|
+
__export(Provider_exports, {
|
23
|
+
ErrorReporterProvider: () => ErrorReporterProvider
|
24
|
+
});
|
25
|
+
module.exports = __toCommonJS(Provider_exports);
|
26
|
+
var import_react2 = require("react");
|
27
|
+
|
28
|
+
// src/contexts/ErrorReporter/Context.ts
|
29
|
+
var import_react = require("react");
|
30
|
+
var ErrorReporterContext = (0, import_react.createContext)({});
|
31
|
+
|
32
|
+
// src/contexts/ErrorReporter/Provider.tsx
|
33
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
34
|
+
var ErrorReporterProvider = ({ children, rollbar }) => {
|
35
|
+
const [rollbarInstance, setRollBarInstance] = (0, import_react2.useState)();
|
36
|
+
(0, import_react2.useEffect)(() => {
|
37
|
+
if (rollbarInstance) {
|
38
|
+
setRollBarInstance(rollbarInstance);
|
39
|
+
}
|
40
|
+
}, [rollbar, rollbarInstance]);
|
41
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorReporterContext.Provider, { value: { rollbar }, children });
|
42
|
+
};
|
43
|
+
//# sourceMappingURL=Provider.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/contexts/ErrorReporter/Provider.tsx","../../../../src/contexts/ErrorReporter/Context.ts"],"sourcesContent":["import { WithChildren } from '@xylabs/react-shared'\nimport { useEffect, useState } from 'react'\nimport Rollbar from 'rollbar'\n\nimport { ErrorReporterContext } from './Context'\n\nexport interface ErrorReporterProviderProps {\n rollbar: Rollbar\n}\n\nconst ErrorReporterProvider: React.FC<WithChildren<ErrorReporterProviderProps>> = ({ children, rollbar }) => {\n const [rollbarInstance, setRollBarInstance] = useState<Rollbar>()\n\n useEffect(() => {\n if (rollbarInstance) {\n setRollBarInstance(rollbarInstance)\n }\n }, [rollbar, rollbarInstance])\n\n return <ErrorReporterContext.Provider value={{ rollbar }}>{children}</ErrorReporterContext.Provider>\n}\n\nexport { ErrorReporterProvider }\n","import { createContext } from 'react'\n\nimport { ErrorReporterContextState } from './State'\n\nexport const ErrorReporterContext = createContext<ErrorReporterContextState>({})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,IAAAA,gBAAoC;;;ACDpC,mBAA8B;AAIvB,IAAM,2BAAuB,4BAAyC,CAAC,CAAC;;;ADetE;AATT,IAAM,wBAA4E,CAAC,EAAE,UAAU,QAAQ,MAAM;AAC3G,QAAM,CAAC,iBAAiB,kBAAkB,QAAI,wBAAkB;AAEhE,+BAAU,MAAM;AACd,QAAI,iBAAiB;AACnB,yBAAmB,eAAe;AAAA,IACpC;AAAA,EACF,GAAG,CAAC,SAAS,eAAe,CAAC;AAE7B,SAAO,4CAAC,qBAAqB,UAArB,EAA8B,OAAO,EAAE,QAAQ,GAAI,UAAS;AACtE;","names":["import_react"]}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { WithChildren } from '@xylabs/react-shared';
|
3
|
+
import Rollbar from 'rollbar';
|
4
|
+
export interface ErrorReporterProviderProps {
|
5
|
+
rollbar: Rollbar;
|
6
|
+
}
|
7
|
+
declare const ErrorReporterProvider: React.FC<WithChildren<ErrorReporterProviderProps>>;
|
8
|
+
export { ErrorReporterProvider };
|
9
|
+
//# sourceMappingURL=Provider.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ErrorReporter/Provider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD,OAAO,OAAO,MAAM,SAAS,CAAA;AAI7B,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,QAAA,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,0BAA0B,CAAC,CAU7E,CAAA;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
|
@@ -1,7 +1,13 @@
|
|
1
|
-
|
1
|
+
// src/contexts/ErrorReporter/Provider.tsx
|
2
2
|
import { useEffect, useState } from "react";
|
3
|
-
|
4
|
-
|
3
|
+
|
4
|
+
// src/contexts/ErrorReporter/Context.ts
|
5
|
+
import { createContext } from "react";
|
6
|
+
var ErrorReporterContext = createContext({});
|
7
|
+
|
8
|
+
// src/contexts/ErrorReporter/Provider.tsx
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
10
|
+
var ErrorReporterProvider = ({ children, rollbar }) => {
|
5
11
|
const [rollbarInstance, setRollBarInstance] = useState();
|
6
12
|
useEffect(() => {
|
7
13
|
if (rollbarInstance) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/contexts/ErrorReporter/Provider.tsx"],"sourcesContent":["import { WithChildren } from '@xylabs/react-shared'\nimport { useEffect, useState } from 'react'\nimport Rollbar from 'rollbar'\n\nimport { ErrorReporterContext } from './Context'\n\nexport interface ErrorReporterProviderProps {\n rollbar: Rollbar\n}\n\nconst ErrorReporterProvider: React.FC<WithChildren<ErrorReporterProviderProps>> = ({ children, rollbar }) => {\n const [rollbarInstance, setRollBarInstance] = useState<Rollbar>()\n\n useEffect(() => {\n if (rollbarInstance) {\n setRollBarInstance(rollbarInstance)\n }\n }, [rollbar, rollbarInstance])\n\n return <ErrorReporterContext.Provider value={{ rollbar }}>{children}</ErrorReporterContext.Provider>\n}\n\nexport { ErrorReporterProvider }\n"],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../../src/contexts/ErrorReporter/Provider.tsx","../../../../src/contexts/ErrorReporter/Context.ts"],"sourcesContent":["import { WithChildren } from '@xylabs/react-shared'\nimport { useEffect, useState } from 'react'\nimport Rollbar from 'rollbar'\n\nimport { ErrorReporterContext } from './Context'\n\nexport interface ErrorReporterProviderProps {\n rollbar: Rollbar\n}\n\nconst ErrorReporterProvider: React.FC<WithChildren<ErrorReporterProviderProps>> = ({ children, rollbar }) => {\n const [rollbarInstance, setRollBarInstance] = useState<Rollbar>()\n\n useEffect(() => {\n if (rollbarInstance) {\n setRollBarInstance(rollbarInstance)\n }\n }, [rollbar, rollbarInstance])\n\n return <ErrorReporterContext.Provider value={{ rollbar }}>{children}</ErrorReporterContext.Provider>\n}\n\nexport { ErrorReporterProvider }\n","import { createContext } from 'react'\n\nimport { ErrorReporterContextState } from './State'\n\nexport const ErrorReporterContext = createContext<ErrorReporterContextState>({})\n"],"mappings":";AACA,SAAS,WAAW,gBAAgB;;;ACDpC,SAAS,qBAAqB;AAIvB,IAAM,uBAAuB,cAAyC,CAAC,CAAC;;;ADetE;AATT,IAAM,wBAA4E,CAAC,EAAE,UAAU,QAAQ,MAAM;AAC3G,QAAM,CAAC,iBAAiB,kBAAkB,IAAI,SAAkB;AAEhE,YAAU,MAAM;AACd,QAAI,iBAAiB;AACnB,yBAAmB,eAAe;AAAA,IACpC;AAAA,EACF,GAAG,CAAC,SAAS,eAAe,CAAC;AAE7B,SAAO,oBAAC,qBAAqB,UAArB,EAA8B,OAAO,EAAE,QAAQ,GAAI,UAAS;AACtE;","names":[]}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
8
|
+
for (let key of __getOwnPropNames(from))
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
11
|
+
}
|
12
|
+
return to;
|
13
|
+
};
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
15
|
+
|
16
|
+
// src/contexts/ErrorReporter/State.ts
|
17
|
+
var State_exports = {};
|
18
|
+
module.exports = __toCommonJS(State_exports);
|
19
|
+
//# sourceMappingURL=State.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/contexts/ErrorReporter/State.ts"],"sourcesContent":["import Rollbar from 'rollbar'\n\nexport interface ErrorReporterContextState {\n rollbar?: Rollbar\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ErrorReporter/State.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAE7B,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB"}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __export = (target, all) => {
|
7
|
+
for (var name in all)
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
+
};
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
12
|
+
for (let key of __getOwnPropNames(from))
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
15
|
+
}
|
16
|
+
return to;
|
17
|
+
};
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
+
|
20
|
+
// src/contexts/ErrorReporter/index.ts
|
21
|
+
var ErrorReporter_exports = {};
|
22
|
+
__export(ErrorReporter_exports, {
|
23
|
+
ErrorReporterProvider: () => ErrorReporterProvider,
|
24
|
+
useRollbar: () => useRollbar
|
25
|
+
});
|
26
|
+
module.exports = __toCommonJS(ErrorReporter_exports);
|
27
|
+
|
28
|
+
// src/contexts/ErrorReporter/Provider.tsx
|
29
|
+
var import_react2 = require("react");
|
30
|
+
|
31
|
+
// src/contexts/ErrorReporter/Context.ts
|
32
|
+
var import_react = require("react");
|
33
|
+
var ErrorReporterContext = (0, import_react.createContext)({});
|
34
|
+
|
35
|
+
// src/contexts/ErrorReporter/Provider.tsx
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
37
|
+
var ErrorReporterProvider = ({ children, rollbar }) => {
|
38
|
+
const [rollbarInstance, setRollBarInstance] = (0, import_react2.useState)();
|
39
|
+
(0, import_react2.useEffect)(() => {
|
40
|
+
if (rollbarInstance) {
|
41
|
+
setRollBarInstance(rollbarInstance);
|
42
|
+
}
|
43
|
+
}, [rollbar, rollbarInstance]);
|
44
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorReporterContext.Provider, { value: { rollbar }, children });
|
45
|
+
};
|
46
|
+
|
47
|
+
// src/contexts/ErrorReporter/useRollbar.tsx
|
48
|
+
var import_react3 = require("react");
|
49
|
+
var useRollbar = () => {
|
50
|
+
const context = (0, import_react3.useContext)(ErrorReporterContext);
|
51
|
+
if (context === void 0) {
|
52
|
+
console.warn("useRollbar must be used within a ErrorReporterContext");
|
53
|
+
}
|
54
|
+
return context ?? {};
|
55
|
+
};
|
56
|
+
//# sourceMappingURL=index.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/contexts/ErrorReporter/index.ts","../../../../src/contexts/ErrorReporter/Provider.tsx","../../../../src/contexts/ErrorReporter/Context.ts","../../../../src/contexts/ErrorReporter/useRollbar.tsx"],"sourcesContent":["export * from './Provider'\nexport * from './State'\nexport * from './useRollbar'\n","import { WithChildren } from '@xylabs/react-shared'\nimport { useEffect, useState } from 'react'\nimport Rollbar from 'rollbar'\n\nimport { ErrorReporterContext } from './Context'\n\nexport interface ErrorReporterProviderProps {\n rollbar: Rollbar\n}\n\nconst ErrorReporterProvider: React.FC<WithChildren<ErrorReporterProviderProps>> = ({ children, rollbar }) => {\n const [rollbarInstance, setRollBarInstance] = useState<Rollbar>()\n\n useEffect(() => {\n if (rollbarInstance) {\n setRollBarInstance(rollbarInstance)\n }\n }, [rollbar, rollbarInstance])\n\n return <ErrorReporterContext.Provider value={{ rollbar }}>{children}</ErrorReporterContext.Provider>\n}\n\nexport { ErrorReporterProvider }\n","import { createContext } from 'react'\n\nimport { ErrorReporterContextState } from './State'\n\nexport const ErrorReporterContext = createContext<ErrorReporterContextState>({})\n","import { useContext } from 'react'\n\nimport { ErrorReporterContext } from './Context'\n\nconst useRollbar = () => {\n const context = useContext(ErrorReporterContext)\n if (context === undefined) {\n console.warn('useRollbar must be used within a ErrorReporterContext')\n }\n\n return context ?? {}\n}\n\nexport { useRollbar }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,IAAAA,gBAAoC;;;ACDpC,mBAA8B;AAIvB,IAAM,2BAAuB,4BAAyC,CAAC,CAAC;;;ADetE;AATT,IAAM,wBAA4E,CAAC,EAAE,UAAU,QAAQ,MAAM;AAC3G,QAAM,CAAC,iBAAiB,kBAAkB,QAAI,wBAAkB;AAEhE,+BAAU,MAAM;AACd,QAAI,iBAAiB;AACnB,yBAAmB,eAAe;AAAA,IACpC;AAAA,EACF,GAAG,CAAC,SAAS,eAAe,CAAC;AAE7B,SAAO,4CAAC,qBAAqB,UAArB,EAA8B,OAAO,EAAE,QAAQ,GAAI,UAAS;AACtE;;;AEpBA,IAAAC,gBAA2B;AAI3B,IAAM,aAAa,MAAM;AACvB,QAAM,cAAU,0BAAW,oBAAoB;AAC/C,MAAI,YAAY,QAAW;AACzB,YAAQ,KAAK,uDAAuD;AAAA,EACtE;AAEA,SAAO,WAAW,CAAC;AACrB;","names":["import_react","import_react"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ErrorReporter/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA"}
|
@@ -1,4 +1,33 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
// src/contexts/ErrorReporter/Provider.tsx
|
2
|
+
import { useEffect, useState } from "react";
|
3
|
+
|
4
|
+
// src/contexts/ErrorReporter/Context.ts
|
5
|
+
import { createContext } from "react";
|
6
|
+
var ErrorReporterContext = createContext({});
|
7
|
+
|
8
|
+
// src/contexts/ErrorReporter/Provider.tsx
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
10
|
+
var ErrorReporterProvider = ({ children, rollbar }) => {
|
11
|
+
const [rollbarInstance, setRollBarInstance] = useState();
|
12
|
+
useEffect(() => {
|
13
|
+
if (rollbarInstance) {
|
14
|
+
setRollBarInstance(rollbarInstance);
|
15
|
+
}
|
16
|
+
}, [rollbar, rollbarInstance]);
|
17
|
+
return /* @__PURE__ */ jsx(ErrorReporterContext.Provider, { value: { rollbar }, children });
|
18
|
+
};
|
19
|
+
|
20
|
+
// src/contexts/ErrorReporter/useRollbar.tsx
|
21
|
+
import { useContext } from "react";
|
22
|
+
var useRollbar = () => {
|
23
|
+
const context = useContext(ErrorReporterContext);
|
24
|
+
if (context === void 0) {
|
25
|
+
console.warn("useRollbar must be used within a ErrorReporterContext");
|
26
|
+
}
|
27
|
+
return context ?? {};
|
28
|
+
};
|
29
|
+
export {
|
30
|
+
ErrorReporterProvider,
|
31
|
+
useRollbar
|
32
|
+
};
|
4
33
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/contexts/ErrorReporter/
|
1
|
+
{"version":3,"sources":["../../../../src/contexts/ErrorReporter/Provider.tsx","../../../../src/contexts/ErrorReporter/Context.ts","../../../../src/contexts/ErrorReporter/useRollbar.tsx"],"sourcesContent":["import { WithChildren } from '@xylabs/react-shared'\nimport { useEffect, useState } from 'react'\nimport Rollbar from 'rollbar'\n\nimport { ErrorReporterContext } from './Context'\n\nexport interface ErrorReporterProviderProps {\n rollbar: Rollbar\n}\n\nconst ErrorReporterProvider: React.FC<WithChildren<ErrorReporterProviderProps>> = ({ children, rollbar }) => {\n const [rollbarInstance, setRollBarInstance] = useState<Rollbar>()\n\n useEffect(() => {\n if (rollbarInstance) {\n setRollBarInstance(rollbarInstance)\n }\n }, [rollbar, rollbarInstance])\n\n return <ErrorReporterContext.Provider value={{ rollbar }}>{children}</ErrorReporterContext.Provider>\n}\n\nexport { ErrorReporterProvider }\n","import { createContext } from 'react'\n\nimport { ErrorReporterContextState } from './State'\n\nexport const ErrorReporterContext = createContext<ErrorReporterContextState>({})\n","import { useContext } from 'react'\n\nimport { ErrorReporterContext } from './Context'\n\nconst useRollbar = () => {\n const context = useContext(ErrorReporterContext)\n if (context === undefined) {\n console.warn('useRollbar must be used within a ErrorReporterContext')\n }\n\n return context ?? {}\n}\n\nexport { useRollbar }\n"],"mappings":";AACA,SAAS,WAAW,gBAAgB;;;ACDpC,SAAS,qBAAqB;AAIvB,IAAM,uBAAuB,cAAyC,CAAC,CAAC;;;ADetE;AATT,IAAM,wBAA4E,CAAC,EAAE,UAAU,QAAQ,MAAM;AAC3G,QAAM,CAAC,iBAAiB,kBAAkB,IAAI,SAAkB;AAEhE,YAAU,MAAM;AACd,QAAI,iBAAiB;AACnB,yBAAmB,eAAe;AAAA,IACpC;AAAA,EACF,GAAG,CAAC,SAAS,eAAe,CAAC;AAE7B,SAAO,oBAAC,qBAAqB,UAArB,EAA8B,OAAO,EAAE,QAAQ,GAAI,UAAS;AACtE;;;AEpBA,SAAS,kBAAkB;AAI3B,IAAM,aAAa,MAAM;AACvB,QAAM,UAAU,WAAW,oBAAoB;AAC/C,MAAI,YAAY,QAAW;AACzB,YAAQ,KAAK,uDAAuD;AAAA,EACtE;AAEA,SAAO,WAAW,CAAC;AACrB;","names":[]}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __export = (target, all) => {
|
7
|
+
for (var name in all)
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
+
};
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
12
|
+
for (let key of __getOwnPropNames(from))
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
15
|
+
}
|
16
|
+
return to;
|
17
|
+
};
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
+
|
20
|
+
// src/contexts/ErrorReporter/useRollbar.tsx
|
21
|
+
var useRollbar_exports = {};
|
22
|
+
__export(useRollbar_exports, {
|
23
|
+
useRollbar: () => useRollbar
|
24
|
+
});
|
25
|
+
module.exports = __toCommonJS(useRollbar_exports);
|
26
|
+
var import_react2 = require("react");
|
27
|
+
|
28
|
+
// src/contexts/ErrorReporter/Context.ts
|
29
|
+
var import_react = require("react");
|
30
|
+
var ErrorReporterContext = (0, import_react.createContext)({});
|
31
|
+
|
32
|
+
// src/contexts/ErrorReporter/useRollbar.tsx
|
33
|
+
var useRollbar = () => {
|
34
|
+
const context = (0, import_react2.useContext)(ErrorReporterContext);
|
35
|
+
if (context === void 0) {
|
36
|
+
console.warn("useRollbar must be used within a ErrorReporterContext");
|
37
|
+
}
|
38
|
+
return context ?? {};
|
39
|
+
};
|
40
|
+
//# sourceMappingURL=useRollbar.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/contexts/ErrorReporter/useRollbar.tsx","../../../../src/contexts/ErrorReporter/Context.ts"],"sourcesContent":["import { useContext } from 'react'\n\nimport { ErrorReporterContext } from './Context'\n\nconst useRollbar = () => {\n const context = useContext(ErrorReporterContext)\n if (context === undefined) {\n console.warn('useRollbar must be used within a ErrorReporterContext')\n }\n\n return context ?? {}\n}\n\nexport { useRollbar }\n","import { createContext } from 'react'\n\nimport { ErrorReporterContextState } from './State'\n\nexport const ErrorReporterContext = createContext<ErrorReporterContextState>({})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,gBAA2B;;;ACA3B,mBAA8B;AAIvB,IAAM,2BAAuB,4BAAyC,CAAC,CAAC;;;ADA/E,IAAM,aAAa,MAAM;AACvB,QAAM,cAAU,0BAAW,oBAAoB;AAC/C,MAAI,YAAY,QAAW;AACzB,YAAQ,KAAK,uDAAuD;AAAA,EACtE;AAEA,SAAO,WAAW,CAAC;AACrB;","names":["import_react"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useRollbar.d.ts","sourceRoot":"","sources":["../../../../src/contexts/ErrorReporter/useRollbar.tsx"],"names":[],"mappings":"AAIA,QAAA,MAAM,UAAU,mDAOf,CAAA;AAED,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
@@ -1,6 +1,12 @@
|
|
1
|
+
// src/contexts/ErrorReporter/useRollbar.tsx
|
1
2
|
import { useContext } from "react";
|
2
|
-
|
3
|
-
|
3
|
+
|
4
|
+
// src/contexts/ErrorReporter/Context.ts
|
5
|
+
import { createContext } from "react";
|
6
|
+
var ErrorReporterContext = createContext({});
|
7
|
+
|
8
|
+
// src/contexts/ErrorReporter/useRollbar.tsx
|
9
|
+
var useRollbar = () => {
|
4
10
|
const context = useContext(ErrorReporterContext);
|
5
11
|
if (context === void 0) {
|
6
12
|
console.warn("useRollbar must be used within a ErrorReporterContext");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/contexts/ErrorReporter/useRollbar.tsx"],"sourcesContent":["import { useContext } from 'react'\n\nimport { ErrorReporterContext } from './Context'\n\nconst useRollbar = () => {\n const context = useContext(ErrorReporterContext)\n if (context === undefined) {\n console.warn('useRollbar must be used within a ErrorReporterContext')\n }\n\n return context ?? {}\n}\n\nexport { useRollbar }\n"],"mappings":"AAAA,SAAS,kBAAkB
|
1
|
+
{"version":3,"sources":["../../../../src/contexts/ErrorReporter/useRollbar.tsx","../../../../src/contexts/ErrorReporter/Context.ts"],"sourcesContent":["import { useContext } from 'react'\n\nimport { ErrorReporterContext } from './Context'\n\nconst useRollbar = () => {\n const context = useContext(ErrorReporterContext)\n if (context === undefined) {\n console.warn('useRollbar must be used within a ErrorReporterContext')\n }\n\n return context ?? {}\n}\n\nexport { useRollbar }\n","import { createContext } from 'react'\n\nimport { ErrorReporterContextState } from './State'\n\nexport const ErrorReporterContext = createContext<ErrorReporterContextState>({})\n"],"mappings":";AAAA,SAAS,kBAAkB;;;ACA3B,SAAS,qBAAqB;AAIvB,IAAM,uBAAuB,cAAyC,CAAC,CAAC;;;ADA/E,IAAM,aAAa,MAAM;AACvB,QAAM,UAAU,WAAW,oBAAoB;AAC/C,MAAI,YAAY,QAAW;AACzB,YAAQ,KAAK,uDAAuD;AAAA,EACtE;AAEA,SAAO,WAAW,CAAC;AACrB;","names":[]}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __export = (target, all) => {
|
7
|
+
for (var name in all)
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
+
};
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
12
|
+
for (let key of __getOwnPropNames(from))
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
15
|
+
}
|
16
|
+
return to;
|
17
|
+
};
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
+
|
20
|
+
// src/contexts/index.ts
|
21
|
+
var contexts_exports = {};
|
22
|
+
__export(contexts_exports, {
|
23
|
+
ErrorReporterProvider: () => ErrorReporterProvider,
|
24
|
+
useRollbar: () => useRollbar
|
25
|
+
});
|
26
|
+
module.exports = __toCommonJS(contexts_exports);
|
27
|
+
|
28
|
+
// src/contexts/ErrorReporter/Provider.tsx
|
29
|
+
var import_react2 = require("react");
|
30
|
+
|
31
|
+
// src/contexts/ErrorReporter/Context.ts
|
32
|
+
var import_react = require("react");
|
33
|
+
var ErrorReporterContext = (0, import_react.createContext)({});
|
34
|
+
|
35
|
+
// src/contexts/ErrorReporter/Provider.tsx
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
37
|
+
var ErrorReporterProvider = ({ children, rollbar }) => {
|
38
|
+
const [rollbarInstance, setRollBarInstance] = (0, import_react2.useState)();
|
39
|
+
(0, import_react2.useEffect)(() => {
|
40
|
+
if (rollbarInstance) {
|
41
|
+
setRollBarInstance(rollbarInstance);
|
42
|
+
}
|
43
|
+
}, [rollbar, rollbarInstance]);
|
44
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorReporterContext.Provider, { value: { rollbar }, children });
|
45
|
+
};
|
46
|
+
|
47
|
+
// src/contexts/ErrorReporter/useRollbar.tsx
|
48
|
+
var import_react3 = require("react");
|
49
|
+
var useRollbar = () => {
|
50
|
+
const context = (0, import_react3.useContext)(ErrorReporterContext);
|
51
|
+
if (context === void 0) {
|
52
|
+
console.warn("useRollbar must be used within a ErrorReporterContext");
|
53
|
+
}
|
54
|
+
return context ?? {};
|
55
|
+
};
|
56
|
+
//# sourceMappingURL=index.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/contexts/index.ts","../../../src/contexts/ErrorReporter/Provider.tsx","../../../src/contexts/ErrorReporter/Context.ts","../../../src/contexts/ErrorReporter/useRollbar.tsx"],"sourcesContent":["export * from './ErrorReporter'\n","import { WithChildren } from '@xylabs/react-shared'\nimport { useEffect, useState } from 'react'\nimport Rollbar from 'rollbar'\n\nimport { ErrorReporterContext } from './Context'\n\nexport interface ErrorReporterProviderProps {\n rollbar: Rollbar\n}\n\nconst ErrorReporterProvider: React.FC<WithChildren<ErrorReporterProviderProps>> = ({ children, rollbar }) => {\n const [rollbarInstance, setRollBarInstance] = useState<Rollbar>()\n\n useEffect(() => {\n if (rollbarInstance) {\n setRollBarInstance(rollbarInstance)\n }\n }, [rollbar, rollbarInstance])\n\n return <ErrorReporterContext.Provider value={{ rollbar }}>{children}</ErrorReporterContext.Provider>\n}\n\nexport { ErrorReporterProvider }\n","import { createContext } from 'react'\n\nimport { ErrorReporterContextState } from './State'\n\nexport const ErrorReporterContext = createContext<ErrorReporterContextState>({})\n","import { useContext } from 'react'\n\nimport { ErrorReporterContext } from './Context'\n\nconst useRollbar = () => {\n const context = useContext(ErrorReporterContext)\n if (context === undefined) {\n console.warn('useRollbar must be used within a ErrorReporterContext')\n }\n\n return context ?? {}\n}\n\nexport { useRollbar }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,IAAAA,gBAAoC;;;ACDpC,mBAA8B;AAIvB,IAAM,2BAAuB,4BAAyC,CAAC,CAAC;;;ADetE;AATT,IAAM,wBAA4E,CAAC,EAAE,UAAU,QAAQ,MAAM;AAC3G,QAAM,CAAC,iBAAiB,kBAAkB,QAAI,wBAAkB;AAEhE,+BAAU,MAAM;AACd,QAAI,iBAAiB;AACnB,yBAAmB,eAAe;AAAA,IACpC;AAAA,EACF,GAAG,CAAC,SAAS,eAAe,CAAC;AAE7B,SAAO,4CAAC,qBAAqB,UAArB,EAA8B,OAAO,EAAE,QAAQ,GAAI,UAAS;AACtE;;;AEpBA,IAAAC,gBAA2B;AAI3B,IAAM,aAAa,MAAM;AACvB,QAAM,cAAU,0BAAW,oBAAoB;AAC/C,MAAI,YAAY,QAAW;AACzB,YAAQ,KAAK,uDAAuD;AAAA,EACtE;AAEA,SAAO,WAAW,CAAC;AACrB;","names":["import_react","import_react"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contexts/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
|
@@ -1,2 +1,33 @@
|
|
1
|
-
|
1
|
+
// src/contexts/ErrorReporter/Provider.tsx
|
2
|
+
import { useEffect, useState } from "react";
|
3
|
+
|
4
|
+
// src/contexts/ErrorReporter/Context.ts
|
5
|
+
import { createContext } from "react";
|
6
|
+
var ErrorReporterContext = createContext({});
|
7
|
+
|
8
|
+
// src/contexts/ErrorReporter/Provider.tsx
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
10
|
+
var ErrorReporterProvider = ({ children, rollbar }) => {
|
11
|
+
const [rollbarInstance, setRollBarInstance] = useState();
|
12
|
+
useEffect(() => {
|
13
|
+
if (rollbarInstance) {
|
14
|
+
setRollBarInstance(rollbarInstance);
|
15
|
+
}
|
16
|
+
}, [rollbar, rollbarInstance]);
|
17
|
+
return /* @__PURE__ */ jsx(ErrorReporterContext.Provider, { value: { rollbar }, children });
|
18
|
+
};
|
19
|
+
|
20
|
+
// src/contexts/ErrorReporter/useRollbar.tsx
|
21
|
+
import { useContext } from "react";
|
22
|
+
var useRollbar = () => {
|
23
|
+
const context = useContext(ErrorReporterContext);
|
24
|
+
if (context === void 0) {
|
25
|
+
console.warn("useRollbar must be used within a ErrorReporterContext");
|
26
|
+
}
|
27
|
+
return context ?? {};
|
28
|
+
};
|
29
|
+
export {
|
30
|
+
ErrorReporterProvider,
|
31
|
+
useRollbar
|
32
|
+
};
|
2
33
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/contexts/
|
1
|
+
{"version":3,"sources":["../../../src/contexts/ErrorReporter/Provider.tsx","../../../src/contexts/ErrorReporter/Context.ts","../../../src/contexts/ErrorReporter/useRollbar.tsx"],"sourcesContent":["import { WithChildren } from '@xylabs/react-shared'\nimport { useEffect, useState } from 'react'\nimport Rollbar from 'rollbar'\n\nimport { ErrorReporterContext } from './Context'\n\nexport interface ErrorReporterProviderProps {\n rollbar: Rollbar\n}\n\nconst ErrorReporterProvider: React.FC<WithChildren<ErrorReporterProviderProps>> = ({ children, rollbar }) => {\n const [rollbarInstance, setRollBarInstance] = useState<Rollbar>()\n\n useEffect(() => {\n if (rollbarInstance) {\n setRollBarInstance(rollbarInstance)\n }\n }, [rollbar, rollbarInstance])\n\n return <ErrorReporterContext.Provider value={{ rollbar }}>{children}</ErrorReporterContext.Provider>\n}\n\nexport { ErrorReporterProvider }\n","import { createContext } from 'react'\n\nimport { ErrorReporterContextState } from './State'\n\nexport const ErrorReporterContext = createContext<ErrorReporterContextState>({})\n","import { useContext } from 'react'\n\nimport { ErrorReporterContext } from './Context'\n\nconst useRollbar = () => {\n const context = useContext(ErrorReporterContext)\n if (context === undefined) {\n console.warn('useRollbar must be used within a ErrorReporterContext')\n }\n\n return context ?? {}\n}\n\nexport { useRollbar }\n"],"mappings":";AACA,SAAS,WAAW,gBAAgB;;;ACDpC,SAAS,qBAAqB;AAIvB,IAAM,uBAAuB,cAAyC,CAAC,CAAC;;;ADetE;AATT,IAAM,wBAA4E,CAAC,EAAE,UAAU,QAAQ,MAAM;AAC3G,QAAM,CAAC,iBAAiB,kBAAkB,IAAI,SAAkB;AAEhE,YAAU,MAAM;AACd,QAAI,iBAAiB;AACnB,yBAAmB,eAAe;AAAA,IACpC;AAAA,EACF,GAAG,CAAC,SAAS,eAAe,CAAC;AAE7B,SAAO,oBAAC,qBAAqB,UAArB,EAA8B,OAAO,EAAE,QAAQ,GAAI,UAAS;AACtE;;;AEpBA,SAAS,kBAAkB;AAI3B,IAAM,aAAa,MAAM;AACvB,QAAM,UAAU,WAAW,oBAAoB;AAC/C,MAAI,YAAY,QAAW;AACzB,YAAQ,KAAK,uDAAuD;AAAA,EACtE;AAEA,SAAO,WAAW,CAAC;AACrB;","names":[]}
|
@@ -0,0 +1,141 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __export = (target, all) => {
|
7
|
+
for (var name in all)
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
+
};
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
12
|
+
for (let key of __getOwnPropNames(from))
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
15
|
+
}
|
16
|
+
return to;
|
17
|
+
};
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
+
|
20
|
+
// src/index.ts
|
21
|
+
var src_exports = {};
|
22
|
+
__export(src_exports, {
|
23
|
+
ErrorAlert: () => ErrorAlert,
|
24
|
+
ErrorRender: () => ErrorRender,
|
25
|
+
ErrorReporterProvider: () => ErrorReporterProvider,
|
26
|
+
ThrownErrorBoundary: () => ThrownErrorBoundary,
|
27
|
+
useRollbar: () => useRollbar
|
28
|
+
});
|
29
|
+
module.exports = __toCommonJS(src_exports);
|
30
|
+
|
31
|
+
// src/components/ErrorBoundary/ThrownErrorBoundary.tsx
|
32
|
+
var import_payload_model = require("@xyo-network/payload-model");
|
33
|
+
var import_react2 = require("react");
|
34
|
+
|
35
|
+
// src/components/ErrorRender/ErrorAlert.tsx
|
36
|
+
var import_icons_material = require("@mui/icons-material");
|
37
|
+
var import_material = require("@mui/material");
|
38
|
+
var import_react_button = require("@xylabs/react-button");
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
40
|
+
var ErrorAlert = ({ onCancel, error, errorContext, ...props }) => {
|
41
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Alert, { severity: "error", ...props, children: [
|
42
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.AlertTitle, { children: "Whoops! Something went wrong" }),
|
43
|
+
errorContext ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "caption", my: 0.5, lineHeight: "1", display: "block", children: errorContext }) : null,
|
44
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "caption", mr: 0.5, fontWeight: "bold", children: "Error:" }),
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "caption", children: error?.message }),
|
46
|
+
onCancel ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_button.ButtonEx, { variant: "outlined", size: "small", onClick: onCancel, position: "absolute", style: { right: 8, top: 8 }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons_material.ExitToApp, { fontSize: "small" }) }) : null
|
47
|
+
] });
|
48
|
+
};
|
49
|
+
|
50
|
+
// src/components/ErrorRender/Render.tsx
|
51
|
+
var import_react_flexbox = require("@xylabs/react-flexbox");
|
52
|
+
var import_react = require("react");
|
53
|
+
var import_react_router_dom = require("react-router-dom");
|
54
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
55
|
+
var ErrorRender = ({
|
56
|
+
onCancel,
|
57
|
+
error,
|
58
|
+
noErrorDisplay = false,
|
59
|
+
customError = null,
|
60
|
+
children,
|
61
|
+
errorContext,
|
62
|
+
...props
|
63
|
+
}) => {
|
64
|
+
const location = (0, import_react_router_dom.useLocation)();
|
65
|
+
(0, import_react.useEffect)(() => {
|
66
|
+
location.state = {
|
67
|
+
from: {
|
68
|
+
pathname: window.location.pathname
|
69
|
+
}
|
70
|
+
};
|
71
|
+
}, [location]);
|
72
|
+
if (error) {
|
73
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_flexbox.FlexCol, { alignItems: "stretch", ...props, children: noErrorDisplay ? customError : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_flexbox.FlexCol, { alignItems: "center", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ErrorAlert, { error, errorContext, onCancel }) }) });
|
74
|
+
} else {
|
75
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children }) ?? null;
|
76
|
+
}
|
77
|
+
};
|
78
|
+
|
79
|
+
// src/components/ErrorBoundary/ThrownErrorBoundary.tsx
|
80
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
81
|
+
var ThrownErrorBoundary = class _ThrownErrorBoundary extends import_react2.Component {
|
82
|
+
state = {
|
83
|
+
xyoError: void 0
|
84
|
+
};
|
85
|
+
static getDerivedStateFromError(error) {
|
86
|
+
return { hasError: true, xyoError: _ThrownErrorBoundary.normalizeError(error) };
|
87
|
+
}
|
88
|
+
static normalizeError(error) {
|
89
|
+
return error.schema === import_payload_model.ModuleErrorSchema ? error : { message: error.message, schema: import_payload_model.ModuleErrorSchema, sources: [] };
|
90
|
+
}
|
91
|
+
componentDidCatch(error, errorInfo) {
|
92
|
+
const { rethrow, rollbar } = this.props;
|
93
|
+
const { xyoError } = this.state;
|
94
|
+
rollbar?.error(error);
|
95
|
+
console.error("Error:", xyoError, errorInfo);
|
96
|
+
if (rethrow) {
|
97
|
+
throw error;
|
98
|
+
}
|
99
|
+
}
|
100
|
+
render() {
|
101
|
+
const { xyoError } = this.state;
|
102
|
+
const { children, boundaryName, errorComponent } = this.props;
|
103
|
+
if (xyoError) {
|
104
|
+
if (errorComponent) {
|
105
|
+
return errorComponent(xyoError);
|
106
|
+
}
|
107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ErrorRender, { error: xyoError, errorContext: `${boundaryName} Boundary` });
|
108
|
+
}
|
109
|
+
return children;
|
110
|
+
}
|
111
|
+
};
|
112
|
+
|
113
|
+
// src/contexts/ErrorReporter/Provider.tsx
|
114
|
+
var import_react4 = require("react");
|
115
|
+
|
116
|
+
// src/contexts/ErrorReporter/Context.ts
|
117
|
+
var import_react3 = require("react");
|
118
|
+
var ErrorReporterContext = (0, import_react3.createContext)({});
|
119
|
+
|
120
|
+
// src/contexts/ErrorReporter/Provider.tsx
|
121
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
122
|
+
var ErrorReporterProvider = ({ children, rollbar }) => {
|
123
|
+
const [rollbarInstance, setRollBarInstance] = (0, import_react4.useState)();
|
124
|
+
(0, import_react4.useEffect)(() => {
|
125
|
+
if (rollbarInstance) {
|
126
|
+
setRollBarInstance(rollbarInstance);
|
127
|
+
}
|
128
|
+
}, [rollbar, rollbarInstance]);
|
129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ErrorReporterContext.Provider, { value: { rollbar }, children });
|
130
|
+
};
|
131
|
+
|
132
|
+
// src/contexts/ErrorReporter/useRollbar.tsx
|
133
|
+
var import_react5 = require("react");
|
134
|
+
var useRollbar = () => {
|
135
|
+
const context = (0, import_react5.useContext)(ErrorReporterContext);
|
136
|
+
if (context === void 0) {
|
137
|
+
console.warn("useRollbar must be used within a ErrorReporterContext");
|
138
|
+
}
|
139
|
+
return context ?? {};
|
140
|
+
};
|
141
|
+
//# sourceMappingURL=index.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../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/useRollbar.tsx"],"sourcesContent":["export * from './components'\nexport * from './contexts'\n","import { ModuleError, ModuleErrorSchema } from '@xyo-network/payload-model'\nimport { Component, ErrorInfo, ReactNode } from 'react'\nimport Rollbar from 'rollbar'\n\nimport { ErrorRender } from '../ErrorRender'\n\nexport interface ThrownErrorBoundaryProps {\n boundaryName?: string\n children: ReactNode\n errorComponent?: (e: ModuleError, boundaryName?: string) => ReactNode\n rethrow?: boolean\n rollbar?: Rollbar\n}\n\nexport interface ThrownErrorBoundaryState {\n xyoError?: ModuleError\n}\n\nexport class ThrownErrorBoundary extends Component<ThrownErrorBoundaryProps, ThrownErrorBoundaryState> {\n public override state: ThrownErrorBoundaryState = {\n xyoError: undefined,\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, xyoError: ThrownErrorBoundary.normalizeError(error) } as ThrownErrorBoundaryState\n }\n\n public static normalizeError(error: Error | ModuleError): ModuleError {\n return (\n (error as ModuleError).schema === ModuleErrorSchema ? error : { message: error.message, schema: ModuleErrorSchema, sources: [] }\n ) as ModuleError\n }\n\n public override componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n const { rethrow, rollbar } = this.props\n const { xyoError } = this.state\n\n rollbar?.error(error)\n\n console.error('Error:', xyoError, errorInfo)\n if (rethrow) {\n throw error\n }\n }\n\n public override render() {\n const { xyoError } = this.state\n const { children, boundaryName, errorComponent } = this.props\n if (xyoError) {\n if (errorComponent) {\n return errorComponent(xyoError)\n }\n return <ErrorRender error={xyoError} errorContext={`${boundaryName} Boundary`} />\n }\n\n return children\n }\n}\n","import { ExitToApp as ExitIcon } from '@mui/icons-material'\nimport { Alert, AlertProps, AlertTitle, Typography } from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { ModuleError } from '@xyo-network/payload-model'\n\nexport interface ErrorAlertProps extends AlertProps {\n error?: ModuleError | Error\n errorContext?: string\n onCancel?: () => void\n}\n\nexport const ErrorAlert: React.FC<ErrorAlertProps> = ({ onCancel, error, errorContext, ...props }) => {\n return (\n <Alert severity=\"error\" {...props}>\n <AlertTitle>Whoops! Something went wrong</AlertTitle>\n {errorContext ? (\n <Typography variant=\"caption\" my={0.5} lineHeight=\"1\" display=\"block\">\n {errorContext}\n </Typography>\n ) : null}\n <Typography variant=\"caption\" mr={0.5} fontWeight=\"bold\">\n Error:\n </Typography>\n <Typography variant=\"caption\">{error?.message}</Typography>\n {onCancel ? (\n <ButtonEx variant=\"outlined\" size=\"small\" onClick={onCancel} position=\"absolute\" style={{ right: 8, top: 8 }}>\n <ExitIcon fontSize=\"small\" />\n </ButtonEx>\n ) : null}\n </Alert>\n )\n}\n","import { FlexCol } from '@xylabs/react-flexbox'\nimport { useEffect } from 'react'\nimport { useLocation } from 'react-router-dom'\n\nimport { ErrorAlert } from './ErrorAlert'\nimport { ErrorRenderProps } from './Props'\n\nexport const ErrorRender: React.FC<ErrorRenderProps> = ({\n onCancel,\n error,\n noErrorDisplay = false,\n customError = null,\n children,\n errorContext,\n ...props\n}) => {\n const location = useLocation()\n useEffect(() => {\n // ensure we end up at the same place we are now after logging in\n location.state = {\n from: {\n pathname: window.location.pathname,\n },\n }\n }, [location])\n\n if (error) {\n return (\n <FlexCol alignItems=\"stretch\" {...props}>\n {noErrorDisplay ? (\n customError\n ) : (\n <FlexCol alignItems=\"center\" {...props}>\n <ErrorAlert error={error} errorContext={errorContext} onCancel={onCancel} />\n </FlexCol>\n )}\n </FlexCol>\n )\n } else {\n return <>{children}</> ?? null\n }\n}\n","import { WithChildren } from '@xylabs/react-shared'\nimport { useEffect, useState } from 'react'\nimport Rollbar from 'rollbar'\n\nimport { ErrorReporterContext } from './Context'\n\nexport interface ErrorReporterProviderProps {\n rollbar: Rollbar\n}\n\nconst ErrorReporterProvider: React.FC<WithChildren<ErrorReporterProviderProps>> = ({ children, rollbar }) => {\n const [rollbarInstance, setRollBarInstance] = useState<Rollbar>()\n\n useEffect(() => {\n if (rollbarInstance) {\n setRollBarInstance(rollbarInstance)\n }\n }, [rollbar, rollbarInstance])\n\n return <ErrorReporterContext.Provider value={{ rollbar }}>{children}</ErrorReporterContext.Provider>\n}\n\nexport { ErrorReporterProvider }\n","import { createContext } from 'react'\n\nimport { ErrorReporterContextState } from './State'\n\nexport const ErrorReporterContext = createContext<ErrorReporterContextState>({})\n","import { useContext } from 'react'\n\nimport { ErrorReporterContext } from './Context'\n\nconst useRollbar = () => {\n const context = useContext(ErrorReporterContext)\n if (context === undefined) {\n console.warn('useRollbar must be used within a ErrorReporterContext')\n }\n\n return context ?? {}\n}\n\nexport { useRollbar }\n"],"mappings":"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","names":["import_react","ExitIcon","import_jsx_runtime","import_jsx_runtime","import_react","import_react","import_jsx_runtime","import_react"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA"}
|