react-native-bug-reporter 1.0.0

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.
Files changed (152) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +217 -0
  3. package/android/build.gradle +49 -0
  4. package/android/src/main/AndroidManifest.xml +11 -0
  5. package/android/src/main/java/com/bugreporter/ScreenshotDetectorModule.kt +227 -0
  6. package/android/src/main/java/com/bugreporter/ScreenshotDetectorPackage.kt +20 -0
  7. package/ios/RNBugReporterScreenshot.m +11 -0
  8. package/ios/RNBugReporterScreenshot.swift +113 -0
  9. package/lib/commonjs/BugReporterProvider.js +139 -0
  10. package/lib/commonjs/BugReporterProvider.js.map +1 -0
  11. package/lib/commonjs/collectors/appInfo.js +21 -0
  12. package/lib/commonjs/collectors/appInfo.js.map +1 -0
  13. package/lib/commonjs/collectors/collectContext.js +45 -0
  14. package/lib/commonjs/collectors/collectContext.js.map +1 -0
  15. package/lib/commonjs/collectors/deviceInfo.js +41 -0
  16. package/lib/commonjs/collectors/deviceInfo.js.map +1 -0
  17. package/lib/commonjs/collectors/networkInfo.js +33 -0
  18. package/lib/commonjs/collectors/networkInfo.js.map +1 -0
  19. package/lib/commonjs/components/BugReportAdminScreen.js +225 -0
  20. package/lib/commonjs/components/BugReportAdminScreen.js.map +1 -0
  21. package/lib/commonjs/components/BugReportModal.js +341 -0
  22. package/lib/commonjs/components/BugReportModal.js.map +1 -0
  23. package/lib/commonjs/components/ScreenshotEditor.js +466 -0
  24. package/lib/commonjs/components/ScreenshotEditor.js.map +1 -0
  25. package/lib/commonjs/components/ScreenshotPreview.js +134 -0
  26. package/lib/commonjs/components/ScreenshotPreview.js.map +1 -0
  27. package/lib/commonjs/components/SeveritySelector.js +65 -0
  28. package/lib/commonjs/components/SeveritySelector.js.map +1 -0
  29. package/lib/commonjs/context/BugReporterContext.js +24 -0
  30. package/lib/commonjs/context/BugReporterContext.js.map +1 -0
  31. package/lib/commonjs/hooks/useScreenshotDetector.js +22 -0
  32. package/lib/commonjs/hooks/useScreenshotDetector.js.map +1 -0
  33. package/lib/commonjs/index.js +87 -0
  34. package/lib/commonjs/index.js.map +1 -0
  35. package/lib/commonjs/native/ScreenshotDetector.js +72 -0
  36. package/lib/commonjs/native/ScreenshotDetector.js.map +1 -0
  37. package/lib/commonjs/navigation/screenTracker.js +47 -0
  38. package/lib/commonjs/navigation/screenTracker.js.map +1 -0
  39. package/lib/commonjs/package.json +1 -0
  40. package/lib/commonjs/services/bugReportService.js +61 -0
  41. package/lib/commonjs/services/bugReportService.js.map +1 -0
  42. package/lib/commonjs/services/supabaseService.js +166 -0
  43. package/lib/commonjs/services/supabaseService.js.map +1 -0
  44. package/lib/commonjs/theme.js +28 -0
  45. package/lib/commonjs/theme.js.map +1 -0
  46. package/lib/commonjs/types.js +35 -0
  47. package/lib/commonjs/types.js.map +1 -0
  48. package/lib/commonjs/utils/logger.js +29 -0
  49. package/lib/commonjs/utils/logger.js.map +1 -0
  50. package/lib/module/BugReporterProvider.js +134 -0
  51. package/lib/module/BugReporterProvider.js.map +1 -0
  52. package/lib/module/collectors/appInfo.js +16 -0
  53. package/lib/module/collectors/appInfo.js.map +1 -0
  54. package/lib/module/collectors/collectContext.js +41 -0
  55. package/lib/module/collectors/collectContext.js.map +1 -0
  56. package/lib/module/collectors/deviceInfo.js +37 -0
  57. package/lib/module/collectors/deviceInfo.js.map +1 -0
  58. package/lib/module/collectors/networkInfo.js +29 -0
  59. package/lib/module/collectors/networkInfo.js.map +1 -0
  60. package/lib/module/components/BugReportAdminScreen.js +221 -0
  61. package/lib/module/components/BugReportAdminScreen.js.map +1 -0
  62. package/lib/module/components/BugReportModal.js +337 -0
  63. package/lib/module/components/BugReportModal.js.map +1 -0
  64. package/lib/module/components/ScreenshotEditor.js +461 -0
  65. package/lib/module/components/ScreenshotEditor.js.map +1 -0
  66. package/lib/module/components/ScreenshotPreview.js +130 -0
  67. package/lib/module/components/ScreenshotPreview.js.map +1 -0
  68. package/lib/module/components/SeveritySelector.js +61 -0
  69. package/lib/module/components/SeveritySelector.js.map +1 -0
  70. package/lib/module/context/BugReporterContext.js +19 -0
  71. package/lib/module/context/BugReporterContext.js.map +1 -0
  72. package/lib/module/hooks/useScreenshotDetector.js +18 -0
  73. package/lib/module/hooks/useScreenshotDetector.js.map +1 -0
  74. package/lib/module/index.js +32 -0
  75. package/lib/module/index.js.map +1 -0
  76. package/lib/module/native/ScreenshotDetector.js +68 -0
  77. package/lib/module/native/ScreenshotDetector.js.map +1 -0
  78. package/lib/module/navigation/screenTracker.js +41 -0
  79. package/lib/module/navigation/screenTracker.js.map +1 -0
  80. package/lib/module/services/bugReportService.js +57 -0
  81. package/lib/module/services/bugReportService.js.map +1 -0
  82. package/lib/module/services/supabaseService.js +159 -0
  83. package/lib/module/services/supabaseService.js.map +1 -0
  84. package/lib/module/theme.js +23 -0
  85. package/lib/module/theme.js.map +1 -0
  86. package/lib/module/types.js +31 -0
  87. package/lib/module/types.js.map +1 -0
  88. package/lib/module/utils/logger.js +25 -0
  89. package/lib/module/utils/logger.js.map +1 -0
  90. package/lib/typescript/src/BugReporterProvider.d.ts +18 -0
  91. package/lib/typescript/src/BugReporterProvider.d.ts.map +1 -0
  92. package/lib/typescript/src/collectors/appInfo.d.ts +6 -0
  93. package/lib/typescript/src/collectors/appInfo.d.ts.map +1 -0
  94. package/lib/typescript/src/collectors/collectContext.d.ts +7 -0
  95. package/lib/typescript/src/collectors/collectContext.d.ts.map +1 -0
  96. package/lib/typescript/src/collectors/deviceInfo.d.ts +7 -0
  97. package/lib/typescript/src/collectors/deviceInfo.d.ts.map +1 -0
  98. package/lib/typescript/src/collectors/networkInfo.d.ts +6 -0
  99. package/lib/typescript/src/collectors/networkInfo.d.ts.map +1 -0
  100. package/lib/typescript/src/components/BugReportAdminScreen.d.ts +11 -0
  101. package/lib/typescript/src/components/BugReportAdminScreen.d.ts.map +1 -0
  102. package/lib/typescript/src/components/BugReportModal.d.ts +20 -0
  103. package/lib/typescript/src/components/BugReportModal.d.ts.map +1 -0
  104. package/lib/typescript/src/components/ScreenshotEditor.d.ts +16 -0
  105. package/lib/typescript/src/components/ScreenshotEditor.d.ts.map +1 -0
  106. package/lib/typescript/src/components/ScreenshotPreview.d.ts +11 -0
  107. package/lib/typescript/src/components/ScreenshotPreview.d.ts.map +1 -0
  108. package/lib/typescript/src/components/SeveritySelector.d.ts +10 -0
  109. package/lib/typescript/src/components/SeveritySelector.d.ts.map +1 -0
  110. package/lib/typescript/src/context/BugReporterContext.d.ts +20 -0
  111. package/lib/typescript/src/context/BugReporterContext.d.ts.map +1 -0
  112. package/lib/typescript/src/hooks/useScreenshotDetector.d.ts +7 -0
  113. package/lib/typescript/src/hooks/useScreenshotDetector.d.ts.map +1 -0
  114. package/lib/typescript/src/index.d.ts +26 -0
  115. package/lib/typescript/src/index.d.ts.map +1 -0
  116. package/lib/typescript/src/native/ScreenshotDetector.d.ts +15 -0
  117. package/lib/typescript/src/native/ScreenshotDetector.d.ts.map +1 -0
  118. package/lib/typescript/src/navigation/screenTracker.d.ts +7 -0
  119. package/lib/typescript/src/navigation/screenTracker.d.ts.map +1 -0
  120. package/lib/typescript/src/services/bugReportService.d.ts +17 -0
  121. package/lib/typescript/src/services/bugReportService.d.ts.map +1 -0
  122. package/lib/typescript/src/services/supabaseService.d.ts +38 -0
  123. package/lib/typescript/src/services/supabaseService.d.ts.map +1 -0
  124. package/lib/typescript/src/theme.d.ts +7 -0
  125. package/lib/typescript/src/theme.d.ts.map +1 -0
  126. package/lib/typescript/src/types.d.ts +144 -0
  127. package/lib/typescript/src/types.d.ts.map +1 -0
  128. package/lib/typescript/src/utils/logger.d.ts +7 -0
  129. package/lib/typescript/src/utils/logger.d.ts.map +1 -0
  130. package/package.json +100 -0
  131. package/react-native-bug-reporter.podspec +22 -0
  132. package/react-native.config.js +18 -0
  133. package/src/BugReporterProvider.tsx +178 -0
  134. package/src/collectors/appInfo.ts +15 -0
  135. package/src/collectors/collectContext.ts +47 -0
  136. package/src/collectors/deviceInfo.ts +51 -0
  137. package/src/collectors/networkInfo.ts +31 -0
  138. package/src/components/BugReportAdminScreen.tsx +160 -0
  139. package/src/components/BugReportModal.tsx +315 -0
  140. package/src/components/ScreenshotEditor.tsx +410 -0
  141. package/src/components/ScreenshotPreview.tsx +98 -0
  142. package/src/components/SeveritySelector.tsx +59 -0
  143. package/src/context/BugReporterContext.ts +29 -0
  144. package/src/hooks/useScreenshotDetector.ts +20 -0
  145. package/src/index.ts +51 -0
  146. package/src/native/ScreenshotDetector.ts +87 -0
  147. package/src/navigation/screenTracker.ts +40 -0
  148. package/src/services/bugReportService.ts +81 -0
  149. package/src/services/supabaseService.ts +195 -0
  150. package/src/theme.ts +23 -0
  151. package/src/types.ts +156 -0
  152. package/src/utils/logger.ts +24 -0
@@ -0,0 +1,20 @@
1
+ import type { BugReportInput, CollectedContext, ScreenshotData, SubmitState } from '../types';
2
+ import type { ResolvedTheme } from '../theme';
3
+ interface Props {
4
+ visible: boolean;
5
+ screenshot: ScreenshotData | null;
6
+ context: CollectedContext | null;
7
+ /** Show the "Automatically attached" summary. Defaults to true. */
8
+ showContext?: boolean;
9
+ submitState: SubmitState;
10
+ errorMessage?: string | null;
11
+ theme: ResolvedTheme;
12
+ onRemoveScreenshot: () => void;
13
+ /** Open the (top-level) screenshot annotation editor. */
14
+ onRequestEdit: () => void;
15
+ onSubmit: (input: BugReportInput) => void;
16
+ onClose: () => void;
17
+ }
18
+ export declare function BugReportModal({ visible, screenshot, context, showContext, submitState, errorMessage, theme, onRemoveScreenshot, onRequestEdit, onSubmit, onClose, }: Props): import("react").JSX.Element;
19
+ export {};
20
+ //# sourceMappingURL=BugReportModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BugReportModal.d.ts","sourceRoot":"","sources":["../../../../src/components/BugReportModal.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,cAAc,EAEd,gBAAgB,EAChB,cAAc,EACd,WAAW,EACZ,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAI9C,UAAU,KAAK;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,cAAc,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjC,mEAAmE;IACnE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,EAAE,aAAa,CAAC;IACrB,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,yDAAyD;IACzD,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAQD,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,UAAU,EACV,OAAO,EACP,WAAkB,EAClB,WAAW,EACX,YAAY,EACZ,KAAK,EACL,kBAAkB,EAClB,aAAa,EACb,QAAQ,EACR,OAAO,GACR,EAAE,KAAK,+BAsKP"}
@@ -0,0 +1,16 @@
1
+ import type { ScreenshotData } from '../types';
2
+ import type { ResolvedTheme } from '../theme';
3
+ interface Props {
4
+ screenshot: ScreenshotData;
5
+ theme: ResolvedTheme;
6
+ onCancel: () => void;
7
+ onSave: (uri: string) => void;
8
+ }
9
+ /**
10
+ * Full-screen screenshot annotation editor. Lets the reporter draw on the
11
+ * captured screenshot to point at the bug — freehand pen, arrows, points, and
12
+ * text labels — then flattens everything into a single PNG via view-shot.
13
+ */
14
+ export declare function ScreenshotEditor({ screenshot, theme, onCancel, onSave }: Props): import("react").JSX.Element;
15
+ export {};
16
+ //# sourceMappingURL=ScreenshotEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScreenshotEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/ScreenshotEditor.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAmC9C,UAAU,KAAK;IACb,UAAU,EAAE,cAAc,CAAC;IAC3B,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B;AAOD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,KAAK,+BAyL9E"}
@@ -0,0 +1,11 @@
1
+ import type { ScreenshotData } from '../types';
2
+ import type { ResolvedTheme } from '../theme';
3
+ interface Props {
4
+ screenshot: ScreenshotData | null;
5
+ onRemove: () => void;
6
+ onEdit?: () => void;
7
+ theme: ResolvedTheme;
8
+ }
9
+ export declare function ScreenshotPreview({ screenshot, onRemove, onEdit, theme }: Props): import("react").JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=ScreenshotPreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScreenshotPreview.d.ts","sourceRoot":"","sources":["../../../../src/components/ScreenshotPreview.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,KAAK;IACb,UAAU,EAAE,cAAc,GAAG,IAAI,CAAC;IAClC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,aAAa,CAAC;CACtB;AAED,wBAAgB,iBAAiB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,KAAK,+BAmC/E"}
@@ -0,0 +1,10 @@
1
+ import { type BugSeverity } from '../types';
2
+ import { type ResolvedTheme } from '../theme';
3
+ interface Props {
4
+ value: BugSeverity;
5
+ onChange: (value: BugSeverity) => void;
6
+ theme: ResolvedTheme;
7
+ }
8
+ export declare function SeveritySelector({ value, onChange, theme }: Props): import("react").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=SeveritySelector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SeveritySelector.d.ts","sourceRoot":"","sources":["../../../../src/components/SeveritySelector.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAE/D,UAAU,KAAK;IACb,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IACvC,KAAK,EAAE,aAAa,CAAC;CACtB;AASD,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,KAAK,+BA6BjE"}
@@ -0,0 +1,20 @@
1
+ import type { ScreenshotData } from '../types';
2
+ export interface BugReporterContextValue {
3
+ /** Whether automatic screenshot detection is currently active. */
4
+ isAutoDetectEnabled: boolean;
5
+ /** Open the report modal manually, optionally pre-attaching a screenshot. */
6
+ openReporter: (screenshot?: ScreenshotData | null) => void;
7
+ /** Close the report modal. */
8
+ closeReporter: () => void;
9
+ /** True while the modal is visible. */
10
+ isOpen: boolean;
11
+ }
12
+ export declare const BugReporterContext: import("react").Context<BugReporterContextValue | null>;
13
+ /**
14
+ * Access the bug reporter imperatively, e.g. to wire a "Report a bug" button:
15
+ *
16
+ * const { openReporter } = useBugReporter();
17
+ * <Button title="Report a bug" onPress={() => openReporter()} />
18
+ */
19
+ export declare function useBugReporter(): BugReporterContextValue;
20
+ //# sourceMappingURL=BugReporterContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BugReporterContext.d.ts","sourceRoot":"","sources":["../../../../src/context/BugReporterContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,MAAM,WAAW,uBAAuB;IACtC,kEAAkE;IAClE,mBAAmB,EAAE,OAAO,CAAC;IAC7B,6EAA6E;IAC7E,YAAY,EAAE,CAAC,UAAU,CAAC,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC;IAC3D,8BAA8B;IAC9B,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,uCAAuC;IACvC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,kBAAkB,yDAAsD,CAAC;AAEtF;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,uBAAuB,CAMxD"}
@@ -0,0 +1,7 @@
1
+ import type { ScreenshotData } from '../types';
2
+ /**
3
+ * Subscribes to native screenshot detection while `enabled` is true.
4
+ * Calls `onScreenshot` with the captured image whenever the user takes one.
5
+ */
6
+ export declare function useScreenshotDetector(enabled: boolean, onScreenshot: (screenshot: ScreenshotData) => void): void;
7
+ //# sourceMappingURL=useScreenshotDetector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScreenshotDetector.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useScreenshotDetector.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,CAAC,UAAU,EAAE,cAAc,KAAK,IAAI,QASnD"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * React Native Universal Bug Reporter SDK
3
+ * ---------------------------------------
4
+ * Drop-in bug reporting: detect screenshots, collect device/app/user context,
5
+ * and ship everything to Supabase (Postgres + Storage). A Database Webhook →
6
+ * Edge Function sends the notification email.
7
+ *
8
+ * Quick start:
9
+ *
10
+ * import { BugReporterProvider } from 'react-native-bug-reporter';
11
+ *
12
+ * <BugReporterProvider config={{ supabaseUrl: '...', supabaseAnonKey: '...' }}>
13
+ * <App />
14
+ * </BugReporterProvider>
15
+ */
16
+ export { BugReporterProvider } from './BugReporterProvider';
17
+ export { useBugReporter } from './context/BugReporterContext';
18
+ export { BugReportAdminScreen } from './components/BugReportAdminScreen';
19
+ export { setCurrentScreen, getCurrentScreen, getActiveRouteName, } from './navigation/screenTracker';
20
+ export { collectContext } from './collectors/collectContext';
21
+ export { submitBugReport } from './services/bugReportService';
22
+ export { subscribeToReports, updateReportStatus, } from './services/supabaseService';
23
+ export { screenshotDetector } from './native/ScreenshotDetector';
24
+ export type { BugReporterConfig, BugReporterTheme, BugReport, BugReportInput, BugSeverity, CollectedContext, DeviceInfo, AppInfo, NetworkInfo, UserInfo, ScreenshotData, SubmitState, } from './types';
25
+ export { SEVERITIES } from './types';
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAGzE,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,OAAO,EACP,WAAW,EACX,QAAQ,EACR,cAAc,EACd,WAAW,GACZ,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { ScreenshotData } from '../types';
2
+ export type ScreenshotListener = (screenshot: ScreenshotData) => void;
3
+ /**
4
+ * Thin wrapper around the native screenshot detector. Exposes a single
5
+ * `subscribe` method that starts detection and returns an unsubscribe fn.
6
+ */
7
+ declare class ScreenshotDetector {
8
+ private emitter;
9
+ private listenerCount;
10
+ isAvailable(): boolean;
11
+ subscribe(listener: ScreenshotListener): () => void;
12
+ }
13
+ export declare const screenshotDetector: ScreenshotDetector;
14
+ export {};
15
+ //# sourceMappingURL=ScreenshotDetector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScreenshotDetector.d.ts","sourceRoot":"","sources":["../../../../src/native/ScreenshotDetector.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAqB/C,MAAM,MAAM,kBAAkB,GAAG,CAAC,UAAU,EAAE,cAAc,KAAK,IAAI,CAAC;AAEtE;;;GAGG;AACH,cAAM,kBAAkB;IACtB,OAAO,CAAC,OAAO,CAAmC;IAClD,OAAO,CAAC,aAAa,CAAK;IAE1B,WAAW,IAAI,OAAO;IAItB,SAAS,CAAC,QAAQ,EAAE,kBAAkB,GAAG,MAAM,IAAI;CAgDpD;AAED,eAAO,MAAM,kBAAkB,oBAA2B,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare function setCurrentScreen(name: string | null): void;
2
+ export declare function getCurrentScreen(): string | null;
3
+ /**
4
+ * Walks a React Navigation state object to find the deepest active route name.
5
+ */
6
+ export declare function getActiveRouteName(state: any): string | null;
7
+ //# sourceMappingURL=screenTracker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screenTracker.d.ts","sourceRoot":"","sources":["../../../../src/navigation/screenTracker.ts"],"names":[],"mappings":"AAmBA,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAE1D;AAED,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAEhD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,GAAG,IAAI,CAS5D"}
@@ -0,0 +1,17 @@
1
+ import type { BugReport, BugReportInput, BugReporterConfig, CollectedContext, ScreenshotData, SubmitState } from '../types';
2
+ export interface SubmitArgs {
3
+ input: BugReportInput;
4
+ context: CollectedContext;
5
+ screenshot: ScreenshotData | null;
6
+ config: BugReporterConfig;
7
+ onState?: (state: SubmitState) => void;
8
+ }
9
+ /**
10
+ * End-to-end submission pipeline (Supabase):
11
+ * 1. upload the screenshot to Supabase Storage (if present)
12
+ * 2. insert the report row into Postgres
13
+ *
14
+ * A Database Webhook → Edge Function then sends the notification email.
15
+ */
16
+ export declare function submitBugReport({ input, context, screenshot, config, onState, }: SubmitArgs): Promise<BugReport>;
17
+ //# sourceMappingURL=bugReportService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bugReportService.d.ts","sourceRoot":"","sources":["../../../../src/services/bugReportService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,WAAW,EACZ,MAAM,UAAU,CAAC;AAIlB,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,cAAc,CAAC;IACtB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,UAAU,EAAE,cAAc,GAAG,IAAI,CAAC;IAClC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;CACxC;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,EACpC,KAAK,EACL,OAAO,EACP,UAAU,EACV,MAAM,EACN,OAAO,GACR,EAAE,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,CAgDjC"}
@@ -0,0 +1,38 @@
1
+ import 'react-native-url-polyfill/auto';
2
+ import type { BugReport } from '../types';
3
+ export interface SupabaseTarget {
4
+ supabaseUrl: string;
5
+ supabaseAnonKey: string;
6
+ tableName: string;
7
+ storageBucket: string;
8
+ }
9
+ export interface UploadResult {
10
+ publicUrl: string;
11
+ storagePath: string;
12
+ }
13
+ /**
14
+ * Uploads a local screenshot file to Supabase Storage; returns its public URL.
15
+ *
16
+ * Uses a multipart FormData POST to the Storage REST endpoint. React Native's
17
+ * networking streams `file://` / `content://` uris natively this way, which is
18
+ * reliable on real devices — unlike `fetch(fileUri).arrayBuffer()`, which throws
19
+ * "Network request failed" on Android.
20
+ */
21
+ export declare function uploadScreenshot(target: SupabaseTarget, localUri: string): Promise<UploadResult>;
22
+ /** Inserts a bug report row and returns the saved report. */
23
+ export declare function insertReport(target: SupabaseTarget, report: Omit<BugReport, 'id'>): Promise<BugReport>;
24
+ /**
25
+ * Subscribes to the reports table (newest first). Does an initial fetch, then
26
+ * refetches on any realtime change. Returns an unsubscribe function.
27
+ */
28
+ export declare function subscribeToReports(target: SupabaseTarget, onData: (reports: BugReport[]) => void, onError?: (error: Error) => void): () => void;
29
+ /** Updates a report's status (admin). */
30
+ export declare function updateReportStatus(target: SupabaseTarget, reportId: string, status: BugReport['status']): Promise<void>;
31
+ /** Builds a SupabaseTarget from the SDK config (with defaults). */
32
+ export declare function targetFromConfig(config: {
33
+ supabaseUrl: string;
34
+ supabaseAnonKey: string;
35
+ tableName?: string;
36
+ storageBucket?: string;
37
+ }): SupabaseTarget;
38
+ //# sourceMappingURL=supabaseService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supabaseService.d.ts","sourceRoot":"","sources":["../../../../src/services/supabaseService.ts"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAA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extends Required<BugReporterTheme> {
3
+ }
4
+ export declare const defaultTheme: ResolvedTheme;
5
+ export declare function resolveTheme(theme?: BugReporterTheme): ResolvedTheme;
6
+ export declare const SEVERITY_COLORS: Record<string, string>;
7
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,WAAW,aAAc,SAAQ,QAAQ,CAAC,gBAAgB,CAAC;CAAG;AAEpE,eAAO,MAAM,YAAY,EAAE,aAO1B,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,CAAC,EAAE,gBAAgB,GAAG,aAAa,CAEpE;AAED,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAKlD,CAAC"}
@@ -0,0 +1,144 @@
1
+ /**
2
+ * Core type definitions for the Universal Bug Reporter SDK.
3
+ */
4
+ export type BugSeverity = 'low' | 'medium' | 'high' | 'critical';
5
+ export declare const SEVERITIES: BugSeverity[];
6
+ /**
7
+ * Information about the signed-in user, supplied by the host app.
8
+ * Everything is optional so the SDK works in apps without auth.
9
+ */
10
+ export interface UserInfo {
11
+ id?: string | null;
12
+ name?: string | null;
13
+ email?: string | null;
14
+ /** Any extra attributes the host app wants to attach. */
15
+ [key: string]: unknown;
16
+ }
17
+ /** Device metadata collected automatically at report time. */
18
+ export interface DeviceInfo {
19
+ brand: string;
20
+ manufacturer: string;
21
+ model: string;
22
+ deviceId: string;
23
+ systemName: string;
24
+ systemVersion: string;
25
+ isTablet: boolean;
26
+ isEmulator: boolean;
27
+ /** Unique, anonymous, install-scoped id. */
28
+ uniqueId: string;
29
+ totalMemory?: number;
30
+ usedMemory?: number;
31
+ batteryLevel?: number;
32
+ /** Free disk space in bytes. */
33
+ freeDisk?: number;
34
+ }
35
+ /** Host application metadata collected automatically. */
36
+ export interface AppInfo {
37
+ appName: string;
38
+ bundleId: string;
39
+ version: string;
40
+ buildNumber: string;
41
+ /** Build channel/environment, e.g. "production". */
42
+ environment?: string;
43
+ }
44
+ /** Network connectivity snapshot. */
45
+ export interface NetworkInfo {
46
+ isConnected: boolean | null;
47
+ isInternetReachable: boolean | null;
48
+ /** wifi | cellular | none | unknown | ... */
49
+ type: string;
50
+ /** Cellular generation when applicable, e.g. "4g". */
51
+ cellularGeneration?: string | null;
52
+ }
53
+ /** Everything the SDK auto-collects when a report is opened. */
54
+ export interface CollectedContext {
55
+ user: UserInfo;
56
+ device: DeviceInfo;
57
+ app: AppInfo;
58
+ network: NetworkInfo;
59
+ currentScreen: string | null;
60
+ /** ISO-8601 timestamp. */
61
+ timestamp: string;
62
+ }
63
+ /** User-entered fields from the report modal. */
64
+ export interface BugReportInput {
65
+ title: string;
66
+ description: string;
67
+ severity: BugSeverity;
68
+ }
69
+ /** The full bug report persisted on the backend. */
70
+ export interface BugReport extends BugReportInput {
71
+ id?: string;
72
+ screenshotUrl: string | null;
73
+ screenshotPath: string | null;
74
+ context: CollectedContext;
75
+ status: 'open' | 'in_progress' | 'resolved' | 'closed';
76
+ createdAt: string;
77
+ /** Recipient address(es) for the notification email (from config). */
78
+ notifyEmails?: string[];
79
+ }
80
+ /** A screenshot captured / detected on device. */
81
+ export interface ScreenshotData {
82
+ /** Local file URI (file:// or content:// or ph://). */
83
+ uri: string;
84
+ /** Optional base64 payload when a uri is unavailable. */
85
+ base64?: string | null;
86
+ width?: number;
87
+ height?: number;
88
+ }
89
+ export type SubmitState = 'idle' | 'collecting' | 'uploading' | 'saving' | 'done' | 'error';
90
+ /** Theme overrides for the modal UI. */
91
+ export interface BugReporterTheme {
92
+ primaryColor?: string;
93
+ backgroundColor?: string;
94
+ textColor?: string;
95
+ mutedColor?: string;
96
+ borderColor?: string;
97
+ errorColor?: string;
98
+ }
99
+ /** Configuration passed to BugReporterProvider. */
100
+ export interface BugReporterConfig {
101
+ /** Supabase project URL, e.g. "https://xxxx.supabase.co". */
102
+ supabaseUrl: string;
103
+ /** Supabase anon (public) API key. */
104
+ supabaseAnonKey: string;
105
+ /** Postgres table reports are inserted into. Defaults to "bug_reports". */
106
+ tableName?: string;
107
+ /** Supabase Storage bucket for screenshots. Defaults to "bug-reports". */
108
+ storageBucket?: string;
109
+ /**
110
+ * Returns the current signed-in user. Called lazily each time a report
111
+ * is opened, so it always reflects the latest auth state.
112
+ */
113
+ getUser?: () => UserInfo | Promise<UserInfo>;
114
+ /**
115
+ * Returns the current screen/route name. Wire this to your navigation
116
+ * library (see `screenTracker`).
117
+ */
118
+ getCurrentScreen?: () => string | null;
119
+ /**
120
+ * Email address(es) the notification should be sent to. Stored on the report
121
+ * row; the Supabase Edge Function reads it and emails these recipients.
122
+ * Accepts a single address or an array.
123
+ */
124
+ notifyEmails?: string | string[];
125
+ /** Build channel/environment label attached to every report. */
126
+ environment?: string;
127
+ /** Disable automatic screenshot detection (manual trigger only). */
128
+ disableAutoDetect?: boolean;
129
+ /**
130
+ * Show the "Automatically attached" context summary (screen, user, app,
131
+ * device, network) inside the report modal. Defaults to true. Set false to
132
+ * hide it from the user — the data is still collected and sent to the backend.
133
+ */
134
+ showContextSummary?: boolean;
135
+ /** Theme overrides. */
136
+ theme?: BugReporterTheme;
137
+ /** Called after a report is successfully submitted. */
138
+ onSubmitted?: (report: BugReport) => void;
139
+ /** Called when submission fails. */
140
+ onError?: (error: unknown) => void;
141
+ /** Enable verbose console logging. */
142
+ debug?: boolean;
143
+ }
144
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AAEjE,eAAO,MAAM,UAAU,EAAE,WAAW,EAA0C,CAAC;AAE/E;;;GAGG;AACH,MAAM,WAA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E,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,mDAAmD;AACnD,MAAM,WAAW,iBAAiB;IAChC,6DAA6D;IAC7D,WAAW,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,eAAe,EAAE,MAAM,CAAC;IACxB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7C;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IACvC;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACjC,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,uBAAuB;IACvB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,uDAAuD;IACvD,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,CAAC;IAC1C,oCAAoC;IACpC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,sCAAsC;IACtC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB"}
@@ -0,0 +1,7 @@
1
+ export declare const logger: {
2
+ setEnabled(value: boolean): void;
3
+ log(...args: unknown[]): void;
4
+ warn(...args: unknown[]): void;
5
+ error(...args: unknown[]): void;
6
+ };
7
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../src/utils/logger.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,MAAM;sBACC,OAAO;iBAGZ,OAAO,EAAE;kBAKR,OAAO,EAAE;mBAIR,OAAO,EAAE;CAGzB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,100 @@
1
+ {
2
+ "name": "react-native-bug-reporter",
3
+ "version": "1.0.0",
4
+ "description": "Universal React Native bug reporter: auto-detect screenshots, annotate, collect device/app/user context, and ship to Supabase (Postgres + Storage) with Edge Function email.",
5
+ "main": "lib/commonjs/index.js",
6
+ "module": "lib/module/index.js",
7
+ "types": "lib/typescript/src/index.d.ts",
8
+ "react-native": "lib/module/index.js",
9
+ "source": "src/index.ts",
10
+ "files": [
11
+ "src",
12
+ "lib",
13
+ "android",
14
+ "ios",
15
+ "react-native-bug-reporter.podspec",
16
+ "react-native.config.js",
17
+ "!android/build",
18
+ "!android/.gradle",
19
+ "!**/build",
20
+ "!**/__tests__",
21
+ "!**/__fixtures__",
22
+ "!**/__mocks__",
23
+ "!**/.*"
24
+ ],
25
+ "scripts": {
26
+ "prepare": "bob build",
27
+ "clean": "del-cli lib",
28
+ "typecheck": "tsc --noEmit"
29
+ },
30
+ "keywords": [
31
+ "react-native",
32
+ "ios",
33
+ "android",
34
+ "bug-report",
35
+ "bug-reporter",
36
+ "screenshot",
37
+ "screenshot-detection",
38
+ "annotation",
39
+ "feedback",
40
+ "crash-report",
41
+ "supabase",
42
+ "qa",
43
+ "testing"
44
+ ],
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/sanjay20242020/react-native-bug-reporter.git"
48
+ },
49
+ "homepage": "https://github.com/sanjay20242020/react-native-bug-reporter#readme",
50
+ "bugs": {
51
+ "url": "https://github.com/sanjay20242020/react-native-bug-reporter/issues"
52
+ },
53
+ "author": {
54
+ "name": "Sanjay",
55
+ "email": "sanjay20242020@gmail.com",
56
+ "url": "https://github.com/sanjay20242020"
57
+ },
58
+ "license": "MIT",
59
+ "publishConfig": {
60
+ "access": "public"
61
+ },
62
+ "peerDependencies": {
63
+ "react": "*",
64
+ "react-native": "*"
65
+ },
66
+ "dependencies": {
67
+ "@react-native-community/netinfo": ">=9.0.0",
68
+ "@supabase/supabase-js": "^2.45.0",
69
+ "react-native-device-info": ">=10.0.0",
70
+ "react-native-svg": ">=13.0.0",
71
+ "react-native-url-polyfill": "^2.0.0",
72
+ "react-native-view-shot": ">=3.5.0"
73
+ },
74
+ "devDependencies": {
75
+ "@supabase/supabase-js": "^2.45.0",
76
+ "@types/react": "^19.0.0",
77
+ "del-cli": "^5.1.0",
78
+ "react": "19.2.3",
79
+ "react-native": "0.86.0",
80
+ "react-native-builder-bob": "^0.40.13",
81
+ "react-native-svg": "^15.8.0",
82
+ "react-native-url-polyfill": "^2.0.0",
83
+ "react-native-view-shot": "^4.0.3",
84
+ "typescript": "^5.8.3"
85
+ },
86
+ "react-native-builder-bob": {
87
+ "source": "src",
88
+ "output": "lib",
89
+ "targets": [
90
+ "commonjs",
91
+ "module",
92
+ [
93
+ "typescript",
94
+ {
95
+ "project": "tsconfig.build.json"
96
+ }
97
+ ]
98
+ ]
99
+ }
100
+ }
@@ -0,0 +1,22 @@
1
+ require "json"
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = "react-native-bug-reporter"
7
+ s.version = package["version"]
8
+ s.summary = package["description"]
9
+ s.homepage = package["repository"]["url"]
10
+ s.license = package["license"]
11
+ s.authors = package["author"]
12
+
13
+ s.platforms = { :ios => "13.4" }
14
+ s.source = { :git => package["repository"]["url"], :tag => "#{s.version}" }
15
+
16
+ s.source_files = "ios/**/*.{h,m,mm,swift}"
17
+ s.swift_version = "5.0"
18
+
19
+ # Sets up the React-Core dependency and new-architecture flags automatically.
20
+ # Provided by react-native's native_modules.rb (RN 0.71+).
21
+ install_modules_dependencies(s)
22
+ end
@@ -0,0 +1,18 @@
1
+ /**
2
+ * React Native autolinking metadata. Lets the RN CLI register the Android
3
+ * native package and locate the iOS podspec automatically — host apps don't
4
+ * edit MainApplication or the Podfile.
5
+ */
6
+ module.exports = {
7
+ dependency: {
8
+ platforms: {
9
+ android: {
10
+ packageImportPath: 'import com.bugreporter.ScreenshotDetectorPackage;',
11
+ packageInstance: 'new ScreenshotDetectorPackage()',
12
+ },
13
+ ios: {
14
+ podspecPath: __dirname + '/react-native-bug-reporter.podspec',
15
+ },
16
+ },
17
+ },
18
+ };