@shubhamchavhan/react-smart-error-boundary 1.0.5 → 1.0.6

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/App.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ declare function App(): import("react/jsx-runtime").JSX.Element;
2
+ export default App;
3
+ //# sourceMappingURL=App.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AACA,iBAAS,GAAG,4CAMX;AAED,eAAe,GAAG,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { FallbackProps } from '../types';
3
+ export declare const DefaultFallback: React.FC<FallbackProps>;
4
+ //# sourceMappingURL=DefaultFallback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultFallback.d.ts","sourceRoot":"","sources":["../../src/core/DefaultFallback.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAuCnD,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ import { ErrorBoundaryProps } from '../types';
3
+ type State = {
4
+ hasError: boolean;
5
+ error: Error | null;
6
+ };
7
+ export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, State> {
8
+ state: State;
9
+ static getDerivedStateFromError(error: Error): State;
10
+ componentDidCatch(error: Error, info: React.ErrorInfo): void;
11
+ reset: () => void;
12
+ render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
13
+ }
14
+ export {};
15
+ //# sourceMappingURL=ErrorBoundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/core/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,KAAK,KAAK,GAAG;IACT,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,qBAAa,aAAc,SAAQ,KAAK,CAAC,SAAS,CAC9C,kBAAkB,EAClB,KAAK,CACR;IACG,KAAK,EAAE,KAAK,CAGV;IAEF,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK;IAIpD,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS;IAIrD,KAAK,aAGH;IAEF,MAAM;CA0BT"}
package/dist/index.d.ts CHANGED
@@ -1 +1,3 @@
1
- export {}
1
+ export { ErrorBoundary } from './core/ErrorBoundary';
2
+ export type { ErrorBoundaryProps } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
package/dist/main.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+ export type FallbackProps = {
3
+ error: Error | null;
4
+ resetError: () => void;
5
+ showReload?: boolean;
6
+ showHome?: boolean;
7
+ homePath?: string;
8
+ };
9
+ export type ErrorBoundaryProps = {
10
+ children: React.ReactNode;
11
+ fallback?: React.ComponentType<FallbackProps>;
12
+ onError?: (error: Error, info: React.ErrorInfo) => void;
13
+ onReset?: () => void;
14
+ showReload?: boolean;
15
+ showHome?: boolean;
16
+ homePath?: string;
17
+ };
18
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,aAAa,GAAG;IACxB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IAC9C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC;IACxD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shubhamchavhan/react-smart-error-boundary",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Smart React Error Boundary with fallback UI, reload and navigation support",
5
5
  "type": "module",
6
6
  "main": "dist/index.umd.js",