@error-explorer/react 1.1.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.
package/dist/index.cjs ADDED
@@ -0,0 +1,424 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var src_exports = {};
32
+ __export(src_exports, {
33
+ ErrorBoundary: () => ErrorBoundary,
34
+ ErrorExplorer: () => import_browser4.ErrorExplorer,
35
+ ErrorExplorerContext: () => ErrorExplorerContext,
36
+ ErrorExplorerProvider: () => ErrorExplorerProvider,
37
+ default: () => src_default,
38
+ initErrorExplorer: () => initErrorExplorer,
39
+ useActionTracker: () => useActionTracker,
40
+ useComponentBreadcrumbs: () => useComponentBreadcrumbs,
41
+ useErrorBoundary: () => useErrorBoundary,
42
+ useErrorExplorer: () => useErrorExplorer,
43
+ useErrorHandler: () => useErrorHandler,
44
+ useUserContext: () => useUserContext,
45
+ withErrorBoundary: () => withErrorBoundary
46
+ });
47
+ module.exports = __toCommonJS(src_exports);
48
+
49
+ // src/context.tsx
50
+ var import_react = require("react");
51
+ var import_browser = require("@error-explorer/browser");
52
+ var import_jsx_runtime = require("react/jsx-runtime");
53
+ var ErrorExplorerContext = (0, import_react.createContext)(null);
54
+ function ErrorExplorerProvider({
55
+ options,
56
+ children
57
+ }) {
58
+ const [isInitialized, setIsInitialized] = (0, import_react.useState)(false);
59
+ (0, import_react.useEffect)(() => {
60
+ if (!import_browser.ErrorExplorer.isInitialized()) {
61
+ import_browser.ErrorExplorer.init(options);
62
+ setIsInitialized(true);
63
+ } else {
64
+ setIsInitialized(true);
65
+ }
66
+ return () => {
67
+ };
68
+ }, []);
69
+ const contextValue = (0, import_react.useMemo)(
70
+ () => ({
71
+ isInitialized,
72
+ captureException: (error, context) => import_browser.ErrorExplorer.captureException(error, context),
73
+ captureMessage: (message, level) => import_browser.ErrorExplorer.captureMessage(message, level),
74
+ addBreadcrumb: (breadcrumb) => import_browser.ErrorExplorer.addBreadcrumb(breadcrumb),
75
+ setUser: (user) => import_browser.ErrorExplorer.setUser(user),
76
+ clearUser: () => import_browser.ErrorExplorer.clearUser(),
77
+ setTag: (key, value) => import_browser.ErrorExplorer.setTag(key, value),
78
+ setTags: (tags) => import_browser.ErrorExplorer.setTags(tags),
79
+ setExtra: (extra) => import_browser.ErrorExplorer.setExtra(extra),
80
+ setContext: (name, context) => import_browser.ErrorExplorer.setContext(name, context),
81
+ flush: (timeout) => import_browser.ErrorExplorer.flush(timeout),
82
+ close: (timeout) => import_browser.ErrorExplorer.close(timeout)
83
+ }),
84
+ [isInitialized]
85
+ );
86
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorExplorerContext.Provider, { value: contextValue, children });
87
+ }
88
+ function initErrorExplorer(options) {
89
+ if (!import_browser.ErrorExplorer.isInitialized()) {
90
+ import_browser.ErrorExplorer.init(options);
91
+ }
92
+ }
93
+
94
+ // src/ErrorBoundary.tsx
95
+ var import_react2 = __toESM(require("react"), 1);
96
+ var import_browser2 = require("@error-explorer/browser");
97
+ var import_jsx_runtime2 = require("react/jsx-runtime");
98
+ var DefaultFallback = ({ error, resetErrorBoundary }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
99
+ "div",
100
+ {
101
+ role: "alert",
102
+ style: {
103
+ padding: "20px",
104
+ border: "1px solid #f5c6cb",
105
+ borderRadius: "4px",
106
+ backgroundColor: "#f8d7da",
107
+ color: "#721c24"
108
+ },
109
+ children: [
110
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h2", { style: { margin: "0 0 10px 0" }, children: "Something went wrong" }),
111
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("pre", { style: {
112
+ whiteSpace: "pre-wrap",
113
+ wordBreak: "break-word",
114
+ backgroundColor: "rgba(0,0,0,0.1)",
115
+ padding: "10px",
116
+ borderRadius: "4px",
117
+ fontSize: "14px"
118
+ }, children: error.message }),
119
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
120
+ "button",
121
+ {
122
+ onClick: resetErrorBoundary,
123
+ style: {
124
+ marginTop: "10px",
125
+ padding: "8px 16px",
126
+ backgroundColor: "#721c24",
127
+ color: "white",
128
+ border: "none",
129
+ borderRadius: "4px",
130
+ cursor: "pointer"
131
+ },
132
+ children: "Try again"
133
+ }
134
+ )
135
+ ]
136
+ }
137
+ );
138
+ var ErrorBoundary = class extends import_react2.Component {
139
+ constructor(props) {
140
+ super(props);
141
+ this.reset = () => {
142
+ const { onReset } = this.props;
143
+ this.setState({
144
+ hasError: false,
145
+ error: null,
146
+ errorInfo: null
147
+ });
148
+ if (onReset) {
149
+ onReset();
150
+ }
151
+ };
152
+ this.state = {
153
+ hasError: false,
154
+ error: null,
155
+ errorInfo: null
156
+ };
157
+ }
158
+ static getDerivedStateFromError(error) {
159
+ return {
160
+ hasError: true,
161
+ error
162
+ };
163
+ }
164
+ componentDidCatch(error, errorInfo) {
165
+ this.setState({ errorInfo });
166
+ const { capture = true, tags = {}, context = {}, onError } = this.props;
167
+ if (onError) {
168
+ onError(error, errorInfo);
169
+ }
170
+ if (capture) {
171
+ import_browser2.ErrorExplorer.captureException(error, {
172
+ tags: {
173
+ "react.errorBoundary": "true",
174
+ ...tags
175
+ },
176
+ extra: {
177
+ componentStack: errorInfo.componentStack,
178
+ ...context
179
+ }
180
+ });
181
+ }
182
+ }
183
+ componentDidUpdate(prevProps) {
184
+ const { resetKeys } = this.props;
185
+ const { hasError } = this.state;
186
+ if (hasError && resetKeys && prevProps.resetKeys) {
187
+ const hasResetKeyChanged = resetKeys.some(
188
+ (key, index) => key !== prevProps.resetKeys?.[index]
189
+ );
190
+ if (hasResetKeyChanged) {
191
+ this.reset();
192
+ }
193
+ }
194
+ }
195
+ render() {
196
+ const { hasError, error, errorInfo } = this.state;
197
+ const { children, fallback } = this.props;
198
+ if (hasError && error) {
199
+ const fallbackProps = {
200
+ error,
201
+ errorInfo,
202
+ resetErrorBoundary: this.reset
203
+ };
204
+ if (typeof fallback === "function") {
205
+ return fallback(fallbackProps);
206
+ }
207
+ if (fallback) {
208
+ return fallback;
209
+ }
210
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(DefaultFallback, { ...fallbackProps });
211
+ }
212
+ return children;
213
+ }
214
+ };
215
+ ErrorBoundary.defaultProps = {
216
+ capture: true,
217
+ tags: {},
218
+ context: {}
219
+ };
220
+ function withErrorBoundary(Component2, options = {}) {
221
+ const { fallback, onError, capture = true, tags = {}, context = {} } = options;
222
+ const Wrapped = (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
223
+ ErrorBoundary,
224
+ {
225
+ fallback,
226
+ onError,
227
+ capture,
228
+ tags,
229
+ context,
230
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Component2, { ...props })
231
+ }
232
+ );
233
+ const displayName = Component2.displayName || Component2.name || "Component";
234
+ Wrapped.displayName = `withErrorBoundary(${displayName})`;
235
+ return Wrapped;
236
+ }
237
+ function useErrorBoundary() {
238
+ const [error, setError] = import_react2.default.useState(null);
239
+ if (error) {
240
+ throw error;
241
+ }
242
+ return {
243
+ /**
244
+ * Trigger the nearest error boundary with the given error
245
+ */
246
+ showBoundary: (err) => setError(err),
247
+ /**
248
+ * Reset the error state
249
+ */
250
+ resetBoundary: () => setError(null)
251
+ };
252
+ }
253
+
254
+ // src/hooks.ts
255
+ var import_react3 = require("react");
256
+ var import_browser3 = require("@error-explorer/browser");
257
+ function useErrorExplorer() {
258
+ const contextValue = (0, import_react3.useContext)(ErrorExplorerContext);
259
+ if (contextValue?.isInitialized) {
260
+ return contextValue;
261
+ }
262
+ return {
263
+ isInitialized: import_browser3.ErrorExplorer.isInitialized(),
264
+ captureException: (error, context) => import_browser3.ErrorExplorer.captureException(error, context),
265
+ captureMessage: (message, level) => import_browser3.ErrorExplorer.captureMessage(message, level),
266
+ addBreadcrumb: (breadcrumb) => import_browser3.ErrorExplorer.addBreadcrumb(breadcrumb),
267
+ setUser: (user) => import_browser3.ErrorExplorer.setUser(user),
268
+ clearUser: () => import_browser3.ErrorExplorer.clearUser(),
269
+ setTag: (key, value) => import_browser3.ErrorExplorer.setTag(key, value),
270
+ setTags: (tags) => import_browser3.ErrorExplorer.setTags(tags),
271
+ setExtra: (extra) => import_browser3.ErrorExplorer.setExtra(extra),
272
+ setContext: (name, context) => import_browser3.ErrorExplorer.setContext(name, context),
273
+ flush: (timeout) => import_browser3.ErrorExplorer.flush(timeout),
274
+ close: (timeout) => import_browser3.ErrorExplorer.close(timeout)
275
+ };
276
+ }
277
+ function useErrorHandler(defaultContext) {
278
+ const { captureException } = useErrorExplorer();
279
+ const handleError = (0, import_react3.useCallback)(
280
+ (error, context) => {
281
+ const err = error instanceof Error ? error : new Error(String(error));
282
+ captureException(err, {
283
+ ...defaultContext,
284
+ ...context,
285
+ tags: {
286
+ ...defaultContext?.tags,
287
+ ...context?.tags
288
+ },
289
+ extra: {
290
+ ...defaultContext?.extra,
291
+ ...context?.extra
292
+ }
293
+ });
294
+ return err;
295
+ },
296
+ [captureException, defaultContext]
297
+ );
298
+ const wrapAsync = (0, import_react3.useCallback)(
299
+ (fn, context) => {
300
+ return async (...args) => {
301
+ try {
302
+ return await fn(...args);
303
+ } catch (error) {
304
+ handleError(error, context);
305
+ return void 0;
306
+ }
307
+ };
308
+ },
309
+ [handleError]
310
+ );
311
+ const tryCatch = (0, import_react3.useCallback)(
312
+ (fn, context) => {
313
+ try {
314
+ return fn();
315
+ } catch (error) {
316
+ handleError(error, context);
317
+ return void 0;
318
+ }
319
+ },
320
+ [handleError]
321
+ );
322
+ return {
323
+ handleError,
324
+ wrapAsync,
325
+ tryCatch
326
+ };
327
+ }
328
+ function useUserContext(user) {
329
+ const { setUser, clearUser } = useErrorExplorer();
330
+ const previousUser = (0, import_react3.useRef)(null);
331
+ (0, import_react3.useEffect)(() => {
332
+ if (JSON.stringify(user) !== JSON.stringify(previousUser.current)) {
333
+ if (user) {
334
+ setUser(user);
335
+ } else {
336
+ clearUser();
337
+ }
338
+ previousUser.current = user;
339
+ }
340
+ }, [user, setUser, clearUser]);
341
+ (0, import_react3.useEffect)(() => {
342
+ return () => {
343
+ clearUser();
344
+ };
345
+ }, [clearUser]);
346
+ return { setUser, clearUser };
347
+ }
348
+ function useActionTracker(componentName) {
349
+ const { addBreadcrumb } = useErrorExplorer();
350
+ const trackAction = (0, import_react3.useCallback)(
351
+ (action, data) => {
352
+ addBreadcrumb({
353
+ type: "user-action",
354
+ category: "action",
355
+ message: action,
356
+ level: "info",
357
+ data: {
358
+ component: componentName,
359
+ ...data
360
+ }
361
+ });
362
+ },
363
+ [addBreadcrumb, componentName]
364
+ );
365
+ const trackInteraction = (0, import_react3.useCallback)(
366
+ (element, action, data) => {
367
+ addBreadcrumb({
368
+ type: "user-action",
369
+ category: `ui.${action}`,
370
+ message: `${action} on ${element}`,
371
+ level: "info",
372
+ data: {
373
+ component: componentName,
374
+ element,
375
+ ...data
376
+ }
377
+ });
378
+ },
379
+ [addBreadcrumb, componentName]
380
+ );
381
+ return {
382
+ trackAction,
383
+ trackInteraction
384
+ };
385
+ }
386
+ function useComponentBreadcrumbs(componentName) {
387
+ const { addBreadcrumb } = useErrorExplorer();
388
+ (0, import_react3.useEffect)(() => {
389
+ addBreadcrumb({
390
+ type: "debug",
391
+ category: "react.lifecycle",
392
+ message: `${componentName} mounted`,
393
+ level: "debug"
394
+ });
395
+ return () => {
396
+ addBreadcrumb({
397
+ type: "debug",
398
+ category: "react.lifecycle",
399
+ message: `${componentName} unmounted`,
400
+ level: "debug"
401
+ });
402
+ };
403
+ }, [componentName, addBreadcrumb]);
404
+ }
405
+
406
+ // src/index.ts
407
+ var import_browser4 = require("@error-explorer/browser");
408
+ var src_default = ErrorExplorerProvider;
409
+ // Annotate the CommonJS export names for ESM import in node:
410
+ 0 && (module.exports = {
411
+ ErrorBoundary,
412
+ ErrorExplorer,
413
+ ErrorExplorerContext,
414
+ ErrorExplorerProvider,
415
+ initErrorExplorer,
416
+ useActionTracker,
417
+ useComponentBreadcrumbs,
418
+ useErrorBoundary,
419
+ useErrorExplorer,
420
+ useErrorHandler,
421
+ useUserContext,
422
+ withErrorBoundary
423
+ });
424
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/context.tsx","../src/ErrorBoundary.tsx","../src/hooks.ts"],"sourcesContent":["/**\n * @error-explorer/react\n * Error Explorer SDK for React - Automatic error tracking with React integration\n */\n\n// Import for default export\nimport { ErrorExplorerProvider as Provider } from './context';\n\n// Provider and initialization\nexport { ErrorExplorerProvider, ErrorExplorerContext, initErrorExplorer } from './context';\n\n// Error Boundary\nexport { ErrorBoundary, withErrorBoundary, useErrorBoundary } from './ErrorBoundary';\n\n// Hooks\nexport {\n useErrorExplorer,\n useErrorHandler,\n useUserContext,\n useActionTracker,\n useComponentBreadcrumbs,\n} from './hooks';\n\n// Types\nexport type {\n ReactErrorExplorerOptions,\n ReactComponentContext,\n ErrorBoundaryProps,\n ErrorBoundaryState,\n FallbackProps,\n ErrorExplorerProviderProps,\n ErrorExplorerContextValue,\n WithErrorBoundaryOptions,\n InitOptions,\n UserContext,\n Breadcrumb,\n CaptureContext,\n} from './types';\n\n// Re-export ErrorExplorer for direct access\nexport { ErrorExplorer } from '@error-explorer/browser';\n\n// Default export is the provider for convenience\nexport default Provider;\n","/**\n * React Context Provider for Error Explorer\n */\n\nimport React, { createContext, useEffect, useState, useMemo, type ReactNode } from 'react';\nimport { ErrorExplorer } from '@error-explorer/browser';\nimport type { Breadcrumb, CaptureContext, UserContext } from '@error-explorer/browser';\nimport type { ReactErrorExplorerOptions, ErrorExplorerContextValue } from './types';\n\n/**\n * React Context for Error Explorer\n */\nexport const ErrorExplorerContext = createContext<ErrorExplorerContextValue | null>(null);\n\n/**\n * Error Explorer Provider Component\n *\n * Initializes the Error Explorer SDK and provides context to child components.\n *\n * @example\n * ```tsx\n * function App() {\n * return (\n * <ErrorExplorerProvider\n * options={{\n * token: 'ee_your_token',\n * project: 'my-react-app',\n * environment: 'production',\n * }}\n * >\n * <MainContent />\n * </ErrorExplorerProvider>\n * );\n * }\n * ```\n */\nexport function ErrorExplorerProvider({\n options,\n children,\n}: {\n options: ReactErrorExplorerOptions;\n children: ReactNode;\n}) {\n const [isInitialized, setIsInitialized] = useState(false);\n\n // Initialize on mount\n useEffect(() => {\n if (!ErrorExplorer.isInitialized()) {\n ErrorExplorer.init(options);\n setIsInitialized(true);\n } else {\n setIsInitialized(true);\n }\n\n // Cleanup on unmount\n return () => {\n // Don't close on unmount as other components might still need it\n // ErrorExplorer.close();\n };\n }, []); // Only run once on mount\n\n // Create stable context value\n const contextValue = useMemo<ErrorExplorerContextValue>(\n () => ({\n isInitialized,\n captureException: (error: Error, context?: CaptureContext) =>\n ErrorExplorer.captureException(error, context),\n captureMessage: (message: string, level?: 'debug' | 'info' | 'warning' | 'error' | 'critical') =>\n ErrorExplorer.captureMessage(message, level),\n addBreadcrumb: (breadcrumb: Breadcrumb) => ErrorExplorer.addBreadcrumb(breadcrumb),\n setUser: (user: UserContext) => ErrorExplorer.setUser(user),\n clearUser: () => ErrorExplorer.clearUser(),\n setTag: (key: string, value: string) => ErrorExplorer.setTag(key, value),\n setTags: (tags: Record<string, string>) => ErrorExplorer.setTags(tags),\n setExtra: (extra: Record<string, unknown>) => ErrorExplorer.setExtra(extra),\n setContext: (name: string, context: Record<string, unknown>) =>\n ErrorExplorer.setContext(name, context),\n flush: (timeout?: number) => ErrorExplorer.flush(timeout),\n close: (timeout?: number) => ErrorExplorer.close(timeout),\n }),\n [isInitialized]\n );\n\n return (\n <ErrorExplorerContext.Provider value={contextValue}>\n {children}\n </ErrorExplorerContext.Provider>\n );\n}\n\n/**\n * Initialize Error Explorer directly (without provider)\n *\n * Use this if you don't need the React Context and just want to initialize\n * the SDK globally.\n *\n * @example\n * ```tsx\n * // In your entry file (main.tsx)\n * import { initErrorExplorer } from '@error-explorer/react';\n *\n * initErrorExplorer({\n * token: 'ee_your_token',\n * project: 'my-react-app',\n * environment: 'production',\n * });\n *\n * ReactDOM.createRoot(root).render(<App />);\n * ```\n */\nexport function initErrorExplorer(options: ReactErrorExplorerOptions): void {\n if (!ErrorExplorer.isInitialized()) {\n ErrorExplorer.init(options);\n }\n}\n","/**\n * ErrorBoundary component for React\n * Catches errors in child components and reports them to Error Explorer\n */\n\nimport React, { Component, type ReactNode, type ComponentType } from 'react';\nimport { ErrorExplorer } from '@error-explorer/browser';\nimport type {\n ErrorBoundaryProps,\n ErrorBoundaryState,\n FallbackProps,\n WithErrorBoundaryOptions,\n} from './types';\n\n/**\n * Default fallback component\n */\nconst DefaultFallback: React.FC<FallbackProps> = ({ error, resetErrorBoundary }) => (\n <div\n role=\"alert\"\n style={{\n padding: '20px',\n border: '1px solid #f5c6cb',\n borderRadius: '4px',\n backgroundColor: '#f8d7da',\n color: '#721c24',\n }}\n >\n <h2 style={{ margin: '0 0 10px 0' }}>Something went wrong</h2>\n <pre style={{\n whiteSpace: 'pre-wrap',\n wordBreak: 'break-word',\n backgroundColor: 'rgba(0,0,0,0.1)',\n padding: '10px',\n borderRadius: '4px',\n fontSize: '14px',\n }}>\n {error.message}\n </pre>\n <button\n onClick={resetErrorBoundary}\n style={{\n marginTop: '10px',\n padding: '8px 16px',\n backgroundColor: '#721c24',\n color: 'white',\n border: 'none',\n borderRadius: '4px',\n cursor: 'pointer',\n }}\n >\n Try again\n </button>\n </div>\n);\n\n/**\n * ErrorBoundary class component\n *\n * React Error Boundaries must be class components - there's no hook equivalent.\n *\n * @example\n * ```tsx\n * <ErrorBoundary fallback={<ErrorFallback />}>\n * <MyComponent />\n * </ErrorBoundary>\n * ```\n *\n * @example\n * With render prop fallback:\n * ```tsx\n * <ErrorBoundary\n * fallback={({ error, resetErrorBoundary }) => (\n * <div>\n * <p>Error: {error.message}</p>\n * <button onClick={resetErrorBoundary}>Retry</button>\n * </div>\n * )}\n * >\n * <MyComponent />\n * </ErrorBoundary>\n * ```\n */\nexport class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n static defaultProps = {\n capture: true,\n tags: {},\n context: {},\n };\n\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = {\n hasError: false,\n error: null,\n errorInfo: null,\n };\n }\n\n static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState> {\n return {\n hasError: true,\n error,\n };\n }\n\n componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void {\n this.setState({ errorInfo });\n\n const { capture = true, tags = {}, context = {}, onError } = this.props;\n\n // Call user's error handler\n if (onError) {\n onError(error, errorInfo);\n }\n\n // Capture to Error Explorer\n if (capture) {\n ErrorExplorer.captureException(error, {\n tags: {\n 'react.errorBoundary': 'true',\n ...tags,\n },\n extra: {\n componentStack: errorInfo.componentStack,\n ...context,\n },\n });\n }\n }\n\n componentDidUpdate(prevProps: ErrorBoundaryProps): void {\n const { resetKeys } = this.props;\n const { hasError } = this.state;\n\n // Reset if resetKeys changed\n if (hasError && resetKeys && prevProps.resetKeys) {\n const hasResetKeyChanged = resetKeys.some(\n (key, index) => key !== prevProps.resetKeys?.[index]\n );\n\n if (hasResetKeyChanged) {\n this.reset();\n }\n }\n }\n\n reset = (): void => {\n const { onReset } = this.props;\n\n this.setState({\n hasError: false,\n error: null,\n errorInfo: null,\n });\n\n if (onReset) {\n onReset();\n }\n };\n\n render(): ReactNode {\n const { hasError, error, errorInfo } = this.state;\n const { children, fallback } = this.props;\n\n if (hasError && error) {\n const fallbackProps: FallbackProps = {\n error,\n errorInfo,\n resetErrorBoundary: this.reset,\n };\n\n // Render function fallback\n if (typeof fallback === 'function') {\n return fallback(fallbackProps);\n }\n\n // Static fallback\n if (fallback) {\n return fallback;\n }\n\n // Default fallback\n return <DefaultFallback {...fallbackProps} />;\n }\n\n return children;\n }\n}\n\n/**\n * Higher-order component to wrap a component with ErrorBoundary\n *\n * @example\n * ```tsx\n * const SafeComponent = withErrorBoundary(MyComponent, {\n * fallback: <ErrorFallback />,\n * onError: (error) => console.error(error),\n * });\n * ```\n */\nexport function withErrorBoundary<P extends object>(\n Component: ComponentType<P>,\n options: WithErrorBoundaryOptions = {}\n): ComponentType<P> {\n const { fallback, onError, capture = true, tags = {}, context = {} } = options;\n\n const Wrapped: React.FC<P> = (props) => (\n <ErrorBoundary\n fallback={fallback}\n onError={onError}\n capture={capture}\n tags={tags}\n context={context}\n >\n <Component {...props} />\n </ErrorBoundary>\n );\n\n // Preserve display name for debugging\n const displayName = Component.displayName || Component.name || 'Component';\n Wrapped.displayName = `withErrorBoundary(${displayName})`;\n\n return Wrapped;\n}\n\n/**\n * useErrorBoundary hook for functional components\n *\n * Note: This doesn't create an error boundary - those must be class components.\n * Instead, this provides a way to show/trigger the nearest error boundary.\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * const { showBoundary } = useErrorBoundary();\n *\n * const handleClick = async () => {\n * try {\n * await riskyOperation();\n * } catch (error) {\n * showBoundary(error);\n * }\n * };\n * }\n * ```\n */\nexport function useErrorBoundary() {\n const [error, setError] = React.useState<Error | null>(null);\n\n // If there's an error, throw it to be caught by the nearest error boundary\n if (error) {\n throw error;\n }\n\n return {\n /**\n * Trigger the nearest error boundary with the given error\n */\n showBoundary: (err: Error) => setError(err),\n\n /**\n * Reset the error state\n */\n resetBoundary: () => setError(null),\n };\n}\n","/**\n * React Hooks for Error Explorer\n */\n\nimport { useContext, useEffect, useCallback, useRef } from 'react';\nimport { ErrorExplorer } from '@error-explorer/browser';\nimport type { Breadcrumb, CaptureContext, UserContext } from '@error-explorer/browser';\nimport { ErrorExplorerContext } from './context';\n\n/**\n * Use Error Explorer instance\n *\n * Returns the Error Explorer SDK methods for capturing errors and managing context.\n *\n * @example\n * ```tsx\n * const { captureException, addBreadcrumb, setUser } = useErrorExplorer();\n *\n * try {\n * await riskyOperation();\n * } catch (error) {\n * captureException(error);\n * }\n * ```\n */\nexport function useErrorExplorer() {\n // Try to get from context first (if using provider)\n const contextValue = useContext(ErrorExplorerContext);\n\n // If context is available and initialized, use it\n if (contextValue?.isInitialized) {\n return contextValue;\n }\n\n // Fall back to singleton\n return {\n isInitialized: ErrorExplorer.isInitialized(),\n captureException: (error: Error, context?: CaptureContext) =>\n ErrorExplorer.captureException(error, context),\n captureMessage: (message: string, level?: 'debug' | 'info' | 'warning' | 'error' | 'critical') =>\n ErrorExplorer.captureMessage(message, level),\n addBreadcrumb: (breadcrumb: Breadcrumb) => ErrorExplorer.addBreadcrumb(breadcrumb),\n setUser: (user: UserContext) => ErrorExplorer.setUser(user),\n clearUser: () => ErrorExplorer.clearUser(),\n setTag: (key: string, value: string) => ErrorExplorer.setTag(key, value),\n setTags: (tags: Record<string, string>) => ErrorExplorer.setTags(tags),\n setExtra: (extra: Record<string, unknown>) => ErrorExplorer.setExtra(extra),\n setContext: (name: string, context: Record<string, unknown>) =>\n ErrorExplorer.setContext(name, context),\n flush: (timeout?: number) => ErrorExplorer.flush(timeout),\n close: (timeout?: number) => ErrorExplorer.close(timeout),\n };\n}\n\n/**\n * Error handler hook for async operations\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * const { handleError, wrapAsync } = useErrorHandler();\n *\n * // Option 1: Wrap async function\n * const safeSubmit = wrapAsync(async () => {\n * await api.submit(data);\n * });\n *\n * // Option 2: Manual handling\n * const handleClick = async () => {\n * try {\n * await riskyOperation();\n * } catch (error) {\n * handleError(error, { tags: { operation: 'risky' } });\n * }\n * };\n * }\n * ```\n */\nexport function useErrorHandler(defaultContext?: CaptureContext) {\n const { captureException } = useErrorExplorer();\n\n /**\n * Handle an error with optional context\n */\n const handleError = useCallback(\n (error: unknown, context?: CaptureContext): Error => {\n const err = error instanceof Error ? error : new Error(String(error));\n\n captureException(err, {\n ...defaultContext,\n ...context,\n tags: {\n ...defaultContext?.tags,\n ...context?.tags,\n },\n extra: {\n ...defaultContext?.extra,\n ...context?.extra,\n },\n });\n\n return err;\n },\n [captureException, defaultContext]\n );\n\n /**\n * Wrap an async function with error handling\n */\n const wrapAsync = useCallback(\n <T extends (...args: any[]) => Promise<any>>(\n fn: T,\n context?: CaptureContext\n ): ((...args: Parameters<T>) => Promise<Awaited<ReturnType<T>> | undefined>) => {\n return async (...args: Parameters<T>) => {\n try {\n return await fn(...args);\n } catch (error) {\n handleError(error, context);\n return undefined;\n }\n };\n },\n [handleError]\n );\n\n /**\n * Create a try-catch wrapper that captures errors\n */\n const tryCatch = useCallback(\n <T>(fn: () => T, context?: CaptureContext): T | undefined => {\n try {\n return fn();\n } catch (error) {\n handleError(error, context);\n return undefined;\n }\n },\n [handleError]\n );\n\n return {\n handleError,\n wrapAsync,\n tryCatch,\n };\n}\n\n/**\n * User context hook\n *\n * Sets the user context and cleans up on unmount.\n *\n * @example\n * ```tsx\n * function App() {\n * const user = useCurrentUser();\n *\n * useUserContext(user ? {\n * id: user.id,\n * email: user.email,\n * name: user.name,\n * } : null);\n *\n * return <MainContent />;\n * }\n * ```\n */\nexport function useUserContext(user: UserContext | null) {\n const { setUser, clearUser } = useErrorExplorer();\n const previousUser = useRef<UserContext | null>(null);\n\n useEffect(() => {\n // Only update if user changed\n if (JSON.stringify(user) !== JSON.stringify(previousUser.current)) {\n if (user) {\n setUser(user);\n } else {\n clearUser();\n }\n previousUser.current = user;\n }\n }, [user, setUser, clearUser]);\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n clearUser();\n };\n }, [clearUser]);\n\n return { setUser, clearUser };\n}\n\n/**\n * Action tracker hook for user interactions\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * const { trackAction, trackInteraction } = useActionTracker();\n *\n * const handleSubmit = () => {\n * trackAction('form_submitted', { formId: 'contact' });\n * // ... actual submit logic\n * };\n *\n * return (\n * <button\n * onClick={() => {\n * trackInteraction('submit-button', 'click');\n * handleSubmit();\n * }}\n * >\n * Submit\n * </button>\n * );\n * }\n * ```\n */\nexport function useActionTracker(componentName?: string) {\n const { addBreadcrumb } = useErrorExplorer();\n\n /**\n * Track a user action\n */\n const trackAction = useCallback(\n (action: string, data?: Record<string, unknown>) => {\n addBreadcrumb({\n type: 'user-action',\n category: 'action',\n message: action,\n level: 'info',\n data: {\n component: componentName,\n ...data,\n },\n });\n },\n [addBreadcrumb, componentName]\n );\n\n /**\n * Track a UI interaction\n */\n const trackInteraction = useCallback(\n (\n element: string,\n action: 'click' | 'input' | 'focus' | 'blur' | 'submit',\n data?: Record<string, unknown>\n ) => {\n addBreadcrumb({\n type: 'user-action',\n category: `ui.${action}`,\n message: `${action} on ${element}`,\n level: 'info',\n data: {\n component: componentName,\n element,\n ...data,\n },\n });\n },\n [addBreadcrumb, componentName]\n );\n\n return {\n trackAction,\n trackInteraction,\n };\n}\n\n/**\n * Component lifecycle tracking hook\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * useComponentBreadcrumbs('MyComponent');\n *\n * return <div>...</div>;\n * }\n * ```\n */\nexport function useComponentBreadcrumbs(componentName: string) {\n const { addBreadcrumb } = useErrorExplorer();\n\n useEffect(() => {\n addBreadcrumb({\n type: 'debug',\n category: 'react.lifecycle',\n message: `${componentName} mounted`,\n level: 'debug',\n });\n\n return () => {\n addBreadcrumb({\n type: 'debug',\n category: 'react.lifecycle',\n message: `${componentName} unmounted`,\n level: 'debug',\n });\n };\n }, [componentName, addBreadcrumb]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACIA,mBAAmF;AACnF,qBAA8B;AA+E1B;AAxEG,IAAM,2BAAuB,4BAAgD,IAAI;AAwBjF,SAAS,sBAAsB;AAAA,EACpC;AAAA,EACA;AACF,GAGG;AACD,QAAM,CAAC,eAAe,gBAAgB,QAAI,uBAAS,KAAK;AAGxD,8BAAU,MAAM;AACd,QAAI,CAAC,6BAAc,cAAc,GAAG;AAClC,mCAAc,KAAK,OAAO;AAC1B,uBAAiB,IAAI;AAAA,IACvB,OAAO;AACL,uBAAiB,IAAI;AAAA,IACvB;AAGA,WAAO,MAAM;AAAA,IAGb;AAAA,EACF,GAAG,CAAC,CAAC;AAGL,QAAM,mBAAe;AAAA,IACnB,OAAO;AAAA,MACL;AAAA,MACA,kBAAkB,CAAC,OAAc,YAC/B,6BAAc,iBAAiB,OAAO,OAAO;AAAA,MAC/C,gBAAgB,CAAC,SAAiB,UAChC,6BAAc,eAAe,SAAS,KAAK;AAAA,MAC7C,eAAe,CAAC,eAA2B,6BAAc,cAAc,UAAU;AAAA,MACjF,SAAS,CAAC,SAAsB,6BAAc,QAAQ,IAAI;AAAA,MAC1D,WAAW,MAAM,6BAAc,UAAU;AAAA,MACzC,QAAQ,CAAC,KAAa,UAAkB,6BAAc,OAAO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AA,UACX,GAAG;AAAA,QACL;AAAA,MACF,CAAC;AAAA,IACH;AAAA,IACA,CAAC,eAAe,aAAa;AAAA,EAC/B;AAKA,QAAM,uBAAmB;AAAA,IACvB,CACE,SACA,QACA,SACG;AACH,oBAAc;AAAA,QACZ,MAAM;AAAA,QACN,UAAU,MAAM,MAAM;AAAA,QACtB,SAAS,GAAG,MAAM,OAAO,OAAO;AAAA,QAChC,OAAO;AAAA,QACP,MAAM;AAAA,UACJ,WAAW;AAAA,UACX;AAAA,UACA,GAAG;AAAA,QACL;AAAA,MACF,CAAC;AAAA,IACH;AAAA,IACA,CAAC,eAAe,aAAa;AAAA,EAC/B;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,EACF;AACF;AAcO,SAAS,wBAAwB,eAAuB;AAC7D,QAAM,EAAE,cAAc,IAAI,iBAAiB;AAE3C,+BAAU,MAAM;AACd,kBAAc;AAAA,MACZ,MAAM;AAAA,MACN,UAAU;AAAA,MACV,SAAS,GAAG,aAAa;AAAA,MACzB,OAAO;AAAA,IACT,CAAC;AAED,WAAO,MAAM;AACX,oBAAc;AAAA,QACZ,MAAM;AAAA,QACN,UAAU;AAAA,QACV,SAAS,GAAG,aAAa;AAAA,QACzB,OAAO;AAAA,MACT,CAAC;AAAA,IACH;AAAA,EACF,GAAG,CAAC,eAAe,aAAa,CAAC;AACnC;;;AHxQA,IAAAC,kBAA8B;AAG9B,IAAO,cAAQ;","names":["import_react","import_browser","import_jsx_runtime","Component","React","import_react","import_browser","import_browser"]}