@nathanclaire/edge-telemetry-sdk 3.0.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +985 -185
  3. package/dist/appLifecycle-DS_fEclk.cjs +2 -0
  4. package/dist/appLifecycle-DS_fEclk.cjs.map +1 -0
  5. package/dist/appLifecycle-PffQ4vC1.js +24 -0
  6. package/dist/appLifecycle-PffQ4vC1.js.map +1 -0
  7. package/dist/autoTaps.native-By9I4Kr2.cjs +2 -0
  8. package/dist/autoTaps.native-By9I4Kr2.cjs.map +1 -0
  9. package/dist/autoTaps.native-DQCXevD7.js +66 -0
  10. package/dist/autoTaps.native-DQCXevD7.js.map +1 -0
  11. package/dist/crashHandler.web-6KvedEB-.cjs +2 -0
  12. package/dist/crashHandler.web-6KvedEB-.cjs.map +1 -0
  13. package/dist/crashHandler.web-BUlSXYoS.js +30 -0
  14. package/dist/crashHandler.web-BUlSXYoS.js.map +1 -0
  15. package/dist/crashHandlerNative.native-CFVQ5UcO.cjs +2 -0
  16. package/dist/crashHandlerNative.native-CFVQ5UcO.cjs.map +1 -0
  17. package/dist/crashHandlerNative.native-DsCRd-oN.js +39 -0
  18. package/dist/crashHandlerNative.native-DsCRd-oN.js.map +1 -0
  19. package/dist/deviceInfo.native-D5gNBG7m.cjs +2 -0
  20. package/dist/deviceInfo.native-D5gNBG7m.cjs.map +1 -0
  21. package/dist/deviceInfo.native-DiiHrnI3.js +53 -0
  22. package/dist/deviceInfo.native-DiiHrnI3.js.map +1 -0
  23. package/dist/deviceInfo.web-BHsjVveq.js +41 -0
  24. package/dist/deviceInfo.web-BHsjVveq.js.map +1 -0
  25. package/dist/deviceInfo.web-DGCUHAnv.cjs +2 -0
  26. package/dist/deviceInfo.web-DGCUHAnv.cjs.map +1 -0
  27. package/dist/deviceState.native-BEysbZ6O.js +58 -0
  28. package/dist/deviceState.native-BEysbZ6O.js.map +1 -0
  29. package/dist/deviceState.native-CrQMy11_.cjs +2 -0
  30. package/dist/deviceState.native-CrQMy11_.cjs.map +1 -0
  31. package/dist/deviceState.web-ByaQm9Ry.js +14 -0
  32. package/dist/deviceState.web-ByaQm9Ry.js.map +1 -0
  33. package/dist/deviceState.web-CSfUgHDU.cjs +2 -0
  34. package/dist/deviceState.web-CSfUgHDU.cjs.map +1 -0
  35. package/dist/frameTracker-9j0en6Zm.cjs +2 -0
  36. package/dist/frameTracker-9j0en6Zm.cjs.map +1 -0
  37. package/dist/frameTracker-BzXnxSkb.js +53 -0
  38. package/dist/frameTracker-BzXnxSkb.js.map +1 -0
  39. package/dist/httpAttributes-BWXOr4eP.js +70 -0
  40. package/dist/httpAttributes-BWXOr4eP.js.map +1 -0
  41. package/dist/httpAttributes-COY0_kiF.cjs +2 -0
  42. package/dist/httpAttributes-COY0_kiF.cjs.map +1 -0
  43. package/dist/index.native.cjs +1 -1
  44. package/dist/index.native.cjs.map +1 -1
  45. package/dist/index.native.d.ts +1 -1
  46. package/dist/index.native.js +173 -81
  47. package/dist/index.native.js.map +1 -1
  48. package/dist/index.web.cjs +1 -1
  49. package/dist/index.web.cjs.map +1 -1
  50. package/dist/index.web.d.ts +1 -1
  51. package/dist/index.web.js +107 -39
  52. package/dist/index.web.js.map +1 -1
  53. package/dist/interactionWeb.web-BWBjmovb.js +109 -0
  54. package/dist/interactionWeb.web-BWBjmovb.js.map +1 -0
  55. package/dist/interactionWeb.web-CKDJLD9r.cjs +2 -0
  56. package/dist/interactionWeb.web-CKDJLD9r.cjs.map +1 -0
  57. package/dist/interceptFetchWeb.web-DjSR_Rft.js +62 -0
  58. package/dist/interceptFetchWeb.web-DjSR_Rft.js.map +1 -0
  59. package/dist/interceptFetchWeb.web-ZHw6IQkU.cjs +2 -0
  60. package/dist/interceptFetchWeb.web-ZHw6IQkU.cjs.map +1 -0
  61. package/dist/interceptHttpNative.native-C5scIcgY.cjs +2 -0
  62. package/dist/interceptHttpNative.native-C5scIcgY.cjs.map +1 -0
  63. package/dist/interceptHttpNative.native-vF_Fksjk.js +18 -0
  64. package/dist/interceptHttpNative.native-vF_Fksjk.js.map +1 -0
  65. package/dist/loadingTime-Cj5Oh8lT.cjs +2 -0
  66. package/dist/loadingTime-Cj5Oh8lT.cjs.map +1 -0
  67. package/dist/loadingTime-DMc0zTY8.js +70 -0
  68. package/dist/loadingTime-DMc0zTY8.js.map +1 -0
  69. package/dist/memoryNative.native-CK3QFVjY.cjs +2 -0
  70. package/dist/memoryNative.native-CK3QFVjY.cjs.map +1 -0
  71. package/dist/memoryNative.native-DkA6f7id.js +54 -0
  72. package/dist/memoryNative.native-DkA6f7id.js.map +1 -0
  73. package/dist/nativeSender-Dt1HLaLi.js +37 -0
  74. package/dist/nativeSender-Dt1HLaLi.js.map +1 -0
  75. package/dist/nativeSender-hCgUa7Vz.cjs +2 -0
  76. package/dist/nativeSender-hCgUa7Vz.cjs.map +1 -0
  77. package/dist/navigationRef-CVIv0aIK.js +30 -0
  78. package/dist/navigationRef-CVIv0aIK.js.map +1 -0
  79. package/dist/navigationRef-CfIbeXX8.cjs +2 -0
  80. package/dist/navigationRef-CfIbeXX8.cjs.map +1 -0
  81. package/dist/navigationWeb.web-CRHpr5zl.js +51 -0
  82. package/dist/navigationWeb.web-CRHpr5zl.js.map +1 -0
  83. package/dist/navigationWeb.web-DwWjL80b.cjs +2 -0
  84. package/dist/navigationWeb.web-DwWjL80b.cjs.map +1 -0
  85. package/dist/{networkChange-CUO1hRLj.cjs → networkChange-2FGIQM-N.cjs} +2 -2
  86. package/dist/networkChange-2FGIQM-N.cjs.map +1 -0
  87. package/dist/{networkChange-D39hdSb0.js → networkChange-QA0893vW.js} +2 -2
  88. package/dist/networkChange-QA0893vW.js.map +1 -0
  89. package/dist/networkInfo.native-CcJ3JVRF.js +31 -0
  90. package/dist/networkInfo.native-CcJ3JVRF.js.map +1 -0
  91. package/dist/networkInfo.native-whB2wf6a.cjs +2 -0
  92. package/dist/networkInfo.native-whB2wf6a.cjs.map +1 -0
  93. package/dist/{networkInfo.web-twcNn_hc.js → networkInfo.web-CcUpXMUK.js} +4 -4
  94. package/dist/networkInfo.web-CcUpXMUK.js.map +1 -0
  95. package/dist/networkInfo.web-DfO-BUFx.cjs +2 -0
  96. package/dist/networkInfo.web-DfO-BUFx.cjs.map +1 -0
  97. package/dist/react-bqe7KPOf.cjs +4 -0
  98. package/dist/react-bqe7KPOf.cjs.map +1 -0
  99. package/dist/react-urNtDGTL.js +413 -0
  100. package/dist/react-urNtDGTL.js.map +1 -0
  101. package/dist/runtimeReady.native-CxFl1rQR.js +35 -0
  102. package/dist/runtimeReady.native-CxFl1rQR.js.map +1 -0
  103. package/dist/runtimeReady.native-zueSbsEv.cjs +2 -0
  104. package/dist/runtimeReady.native-zueSbsEv.cjs.map +1 -0
  105. package/dist/runtimeReady.web-JuE239Tg.js +25 -0
  106. package/dist/runtimeReady.web-JuE239Tg.js.map +1 -0
  107. package/dist/runtimeReady.web-vhAJFU61.cjs +2 -0
  108. package/dist/runtimeReady.web-vhAJFU61.cjs.map +1 -0
  109. package/dist/seedRuntimeReady-BlRdf3pR.js +10 -0
  110. package/dist/seedRuntimeReady-BlRdf3pR.js.map +1 -0
  111. package/dist/seedRuntimeReady-CbjqbWCd.cjs +2 -0
  112. package/dist/seedRuntimeReady-CbjqbWCd.cjs.map +1 -0
  113. package/dist/src/adapters/appLifecycle.d.ts +11 -4
  114. package/dist/src/adapters/batch.d.ts +46 -0
  115. package/dist/src/adapters/crashCapture.d.ts +42 -9
  116. package/dist/src/adapters/deviceState.d.ts +9 -0
  117. package/dist/src/adapters/failedEvents.d.ts +43 -0
  118. package/dist/src/adapters/frameAggregate.d.ts +19 -12
  119. package/dist/src/adapters/frameTracker.d.ts +30 -0
  120. package/dist/src/adapters/hangDetector.d.ts +41 -0
  121. package/dist/src/adapters/httpAttributes.d.ts +18 -0
  122. package/dist/src/adapters/loadingTime.d.ts +67 -0
  123. package/dist/src/adapters/manualSpans.d.ts +41 -0
  124. package/dist/src/adapters/native/autoTaps.native.d.ts +15 -0
  125. package/dist/src/adapters/native/deviceState.native.d.ts +15 -0
  126. package/dist/src/adapters/native/interceptHttpNative.native.d.ts +18 -0
  127. package/dist/src/adapters/native/memoryNative.native.d.ts +15 -11
  128. package/dist/src/adapters/native/networkInfo.native.d.ts +1 -1
  129. package/dist/src/adapters/native/runtimeReady.native.d.ts +17 -0
  130. package/dist/src/adapters/native/store.native.d.ts +10 -0
  131. package/dist/src/adapters/nativeSender.d.ts +2 -2
  132. package/dist/src/adapters/navigationRef.d.ts +29 -0
  133. package/dist/src/adapters/networkChange.d.ts +2 -2
  134. package/dist/src/adapters/seedRuntimeReady.d.ts +8 -0
  135. package/dist/src/adapters/traceHeader.d.ts +33 -0
  136. package/dist/src/adapters/traceManager.d.ts +144 -0
  137. package/dist/src/adapters/uiInteraction.d.ts +111 -0
  138. package/dist/src/adapters/viewManager.d.ts +177 -0
  139. package/dist/src/adapters/viewport.d.ts +15 -0
  140. package/dist/src/adapters/web/deviceState.web.d.ts +10 -0
  141. package/dist/src/adapters/web/interactionWeb.web.d.ts +36 -0
  142. package/dist/src/adapters/web/interceptFetchWeb.web.d.ts +3 -11
  143. package/dist/src/adapters/web/navigationWeb.web.d.ts +13 -7
  144. package/dist/src/adapters/web/runtimeReady.web.d.ts +5 -0
  145. package/dist/src/adapters/web/store.web.d.ts +12 -0
  146. package/dist/src/adapters/web/webVitals.web.d.ts +56 -0
  147. package/dist/src/adapters/webSender.d.ts +2 -2
  148. package/dist/src/adapters/webVitals.d.ts +25 -0
  149. package/dist/src/adapters/xhrIntercept.d.ts +55 -0
  150. package/dist/src/core/beforeSend.d.ts +20 -0
  151. package/dist/src/core/breadcrumbs.d.ts +10 -0
  152. package/dist/src/core/debug.d.ts +7 -0
  153. package/dist/src/core/memoryStore.d.ts +23 -0
  154. package/dist/src/core/store.d.ts +41 -0
  155. package/dist/src/core/telemetry.d.ts +422 -42
  156. package/dist/src/core/userProfile.d.ts +19 -0
  157. package/dist/src/core/utils/json.d.ts +7 -0
  158. package/dist/src/core/utils/uuid.d.ts +10 -1
  159. package/dist/src/createTelemetry.native.d.ts +10 -1
  160. package/dist/src/createTelemetry.web.d.ts +9 -1
  161. package/dist/src/golden.helper.d.ts +4 -0
  162. package/dist/src/index.base.d.ts +93 -3
  163. package/dist/src/index.native.d.ts +7 -27
  164. package/dist/src/index.web.d.ts +7 -23
  165. package/dist/src/react.d.ts +45 -0
  166. package/dist/src/telemetryNative.native.d.ts +79 -0
  167. package/dist/src/telemetryWeb.web.d.ts +59 -0
  168. package/dist/store.native-BbS76uWV.cjs +2 -0
  169. package/dist/store.native-BbS76uWV.cjs.map +1 -0
  170. package/dist/store.native-MlWyGgBp.js +32 -0
  171. package/dist/store.native-MlWyGgBp.js.map +1 -0
  172. package/dist/store.web-BzKaP57Z.cjs +2 -0
  173. package/dist/store.web-BzKaP57Z.cjs.map +1 -0
  174. package/dist/store.web-rhh0NOfs.js +31 -0
  175. package/dist/store.web-rhh0NOfs.js.map +1 -0
  176. package/dist/telemetry-60sfWkh0.js +1754 -0
  177. package/dist/telemetry-60sfWkh0.js.map +1 -0
  178. package/dist/telemetry-CW63glwb.cjs +2 -0
  179. package/dist/telemetry-CW63glwb.cjs.map +1 -0
  180. package/dist/uiInteraction-BIDOMcrL.js +109 -0
  181. package/dist/uiInteraction-BIDOMcrL.js.map +1 -0
  182. package/dist/uiInteraction-DxlwCVSn.cjs +2 -0
  183. package/dist/uiInteraction-DxlwCVSn.cjs.map +1 -0
  184. package/dist/viewport-9JcVIXYF.cjs +2 -0
  185. package/dist/viewport-9JcVIXYF.cjs.map +1 -0
  186. package/dist/viewport-GWTEBt2K.js +15 -0
  187. package/dist/viewport-GWTEBt2K.js.map +1 -0
  188. package/dist/web-vitals.attribution-DAvBvdng.cjs +2 -0
  189. package/dist/web-vitals.attribution-DAvBvdng.cjs.map +1 -0
  190. package/dist/web-vitals.attribution-DcoMtvlY.js +488 -0
  191. package/dist/web-vitals.attribution-DcoMtvlY.js.map +1 -0
  192. package/dist/webSender-DA087xb5.cjs +2 -0
  193. package/dist/webSender-DA087xb5.cjs.map +1 -0
  194. package/dist/webSender-g4rs5TIg.js +44 -0
  195. package/dist/webSender-g4rs5TIg.js.map +1 -0
  196. package/dist/webVitals.web-DRTDK6s5.js +100 -0
  197. package/dist/webVitals.web-DRTDK6s5.js.map +1 -0
  198. package/dist/webVitals.web-DvScDIjX.cjs +2 -0
  199. package/dist/webVitals.web-DvScDIjX.cjs.map +1 -0
  200. package/dist/xhrIntercept-9uAkQh3N.js +55 -0
  201. package/dist/xhrIntercept-9uAkQh3N.js.map +1 -0
  202. package/dist/xhrIntercept-xG1Yl5RI.cjs +2 -0
  203. package/dist/xhrIntercept-xG1Yl5RI.cjs.map +1 -0
  204. package/docs/migration-v4.md +190 -0
  205. package/docs/migration-v5.md +178 -0
  206. package/package.json +22 -6
  207. package/dist/appLifecycle-Cynw0kAv.js +0 -14
  208. package/dist/appLifecycle-Cynw0kAv.js.map +0 -1
  209. package/dist/appLifecycle-DvJIt7ym.cjs +0 -2
  210. package/dist/appLifecycle-DvJIt7ym.cjs.map +0 -1
  211. package/dist/batch-CLBFgYPC.cjs +0 -2
  212. package/dist/batch-CLBFgYPC.cjs.map +0 -1
  213. package/dist/batch-DLG_gtOm.js +0 -12
  214. package/dist/batch-DLG_gtOm.js.map +0 -1
  215. package/dist/crashCapture-BYTM4FLC.cjs +0 -2
  216. package/dist/crashCapture-BYTM4FLC.cjs.map +0 -1
  217. package/dist/crashCapture-D_rkkBVa.js +0 -31
  218. package/dist/crashCapture-D_rkkBVa.js.map +0 -1
  219. package/dist/crashHandler.web-BSxDpFTo.cjs +0 -2
  220. package/dist/crashHandler.web-BSxDpFTo.cjs.map +0 -1
  221. package/dist/crashHandler.web-D59bmhg9.js +0 -32
  222. package/dist/crashHandler.web-D59bmhg9.js.map +0 -1
  223. package/dist/crashHandlerNative.native-DeAFze4E.cjs +0 -2
  224. package/dist/crashHandlerNative.native-DeAFze4E.cjs.map +0 -1
  225. package/dist/crashHandlerNative.native-d7qJkzA6.js +0 -41
  226. package/dist/crashHandlerNative.native-d7qJkzA6.js.map +0 -1
  227. package/dist/debug-DsvQ9y3W.js +0 -68
  228. package/dist/debug-DsvQ9y3W.js.map +0 -1
  229. package/dist/debug-rnOOxFpN.cjs +0 -2
  230. package/dist/debug-rnOOxFpN.cjs.map +0 -1
  231. package/dist/deviceInfo.native-7hbRYixR.cjs +0 -2
  232. package/dist/deviceInfo.native-7hbRYixR.cjs.map +0 -1
  233. package/dist/deviceInfo.native-D2k0LDhI.js +0 -1171
  234. package/dist/deviceInfo.native-D2k0LDhI.js.map +0 -1
  235. package/dist/deviceInfo.web-ByNAlEJh.cjs +0 -2
  236. package/dist/deviceInfo.web-ByNAlEJh.cjs.map +0 -1
  237. package/dist/deviceInfo.web-DzQyEku6.js +0 -40
  238. package/dist/deviceInfo.web-DzQyEku6.js.map +0 -1
  239. package/dist/frameAggregate-C_HoVFcK.cjs +0 -2
  240. package/dist/frameAggregate-C_HoVFcK.cjs.map +0 -1
  241. package/dist/frameAggregate-Cwh1juw1.js +0 -17
  242. package/dist/frameAggregate-Cwh1juw1.js.map +0 -1
  243. package/dist/frameDropsNative.native-CP7zrXDf.js +0 -23
  244. package/dist/frameDropsNative.native-CP7zrXDf.js.map +0 -1
  245. package/dist/frameDropsNative.native-DKqEDqip.cjs +0 -2
  246. package/dist/frameDropsNative.native-DKqEDqip.cjs.map +0 -1
  247. package/dist/frameDropsWeb.web-C9Lt3Fuj.js +0 -22
  248. package/dist/frameDropsWeb.web-C9Lt3Fuj.js.map +0 -1
  249. package/dist/frameDropsWeb.web-azpwQCUz.cjs +0 -2
  250. package/dist/frameDropsWeb.web-azpwQCUz.cjs.map +0 -1
  251. package/dist/httpAttributes-BV50UKQU.js +0 -19
  252. package/dist/httpAttributes-BV50UKQU.js.map +0 -1
  253. package/dist/httpAttributes-xXOD9trQ.cjs +0 -2
  254. package/dist/httpAttributes-xXOD9trQ.cjs.map +0 -1
  255. package/dist/interaction-CH8yoY5-.js +0 -23
  256. package/dist/interaction-CH8yoY5-.js.map +0 -1
  257. package/dist/interaction-DcNFBW7a.cjs +0 -2
  258. package/dist/interaction-DcNFBW7a.cjs.map +0 -1
  259. package/dist/interceptFetchNative.native-VlhtMG-U.js +0 -49
  260. package/dist/interceptFetchNative.native-VlhtMG-U.js.map +0 -1
  261. package/dist/interceptFetchNative.native-jEAldH14.cjs +0 -2
  262. package/dist/interceptFetchNative.native-jEAldH14.cjs.map +0 -1
  263. package/dist/interceptFetchWeb.web-DFzZliik.cjs +0 -2
  264. package/dist/interceptFetchWeb.web-DFzZliik.cjs.map +0 -1
  265. package/dist/interceptFetchWeb.web-DfsMfoRP.js +0 -77
  266. package/dist/interceptFetchWeb.web-DfsMfoRP.js.map +0 -1
  267. package/dist/memoryNative.native-BWLh2S9L.js +0 -48
  268. package/dist/memoryNative.native-BWLh2S9L.js.map +0 -1
  269. package/dist/memoryNative.native-DCXSOd4Q.cjs +0 -2
  270. package/dist/memoryNative.native-DCXSOd4Q.cjs.map +0 -1
  271. package/dist/memoryWeb.web-B3YuV-cB.js +0 -48
  272. package/dist/memoryWeb.web-B3YuV-cB.js.map +0 -1
  273. package/dist/memoryWeb.web-CheXAcJn.cjs +0 -2
  274. package/dist/memoryWeb.web-CheXAcJn.cjs.map +0 -1
  275. package/dist/nativeSender-BE_mzw_S.js +0 -70
  276. package/dist/nativeSender-BE_mzw_S.js.map +0 -1
  277. package/dist/nativeSender-DyAUGY7c.cjs +0 -2
  278. package/dist/nativeSender-DyAUGY7c.cjs.map +0 -1
  279. package/dist/navigationNative.native-3tO5JxSd.cjs +0 -2
  280. package/dist/navigationNative.native-3tO5JxSd.cjs.map +0 -1
  281. package/dist/navigationNative.native-BUCGPQX2.js +0 -25
  282. package/dist/navigationNative.native-BUCGPQX2.js.map +0 -1
  283. package/dist/navigationTracker-B2GMwyKk.cjs +0 -2
  284. package/dist/navigationTracker-B2GMwyKk.cjs.map +0 -1
  285. package/dist/navigationTracker-Cts68dgG.js +0 -19
  286. package/dist/navigationTracker-Cts68dgG.js.map +0 -1
  287. package/dist/navigationWeb.web-B0necr5j.cjs +0 -2
  288. package/dist/navigationWeb.web-B0necr5j.cjs.map +0 -1
  289. package/dist/navigationWeb.web-CORzE_Id.js +0 -46
  290. package/dist/navigationWeb.web-CORzE_Id.js.map +0 -1
  291. package/dist/networkChange-CUO1hRLj.cjs.map +0 -1
  292. package/dist/networkChange-D39hdSb0.js.map +0 -1
  293. package/dist/networkInfo.native-BK5fpAOL.js +0 -343
  294. package/dist/networkInfo.native-BK5fpAOL.js.map +0 -1
  295. package/dist/networkInfo.native-cxuw93Uy.cjs +0 -2
  296. package/dist/networkInfo.native-cxuw93Uy.cjs.map +0 -1
  297. package/dist/networkInfo.web-DJmw1sNK.cjs +0 -2
  298. package/dist/networkInfo.web-DJmw1sNK.cjs.map +0 -1
  299. package/dist/networkInfo.web-twcNn_hc.js.map +0 -1
  300. package/dist/src/adapters/interaction.d.ts +0 -17
  301. package/dist/src/adapters/native/frameDropsNative.native.d.ts +0 -16
  302. package/dist/src/adapters/native/interceptFetchNative.native.d.ts +0 -23
  303. package/dist/src/adapters/native/navigationNative.native.d.ts +0 -12
  304. package/dist/src/adapters/navigationTracker.d.ts +0 -6
  305. package/dist/src/adapters/screenTiming.d.ts +0 -9
  306. package/dist/src/adapters/web/frameDropsWeb.web.d.ts +0 -16
  307. package/dist/src/adapters/web/memoryWeb.web.d.ts +0 -26
  308. package/dist/telemetry-Co4MYdwa.cjs +0 -2
  309. package/dist/telemetry-Co4MYdwa.cjs.map +0 -1
  310. package/dist/telemetry-KI0x4gzC.js +0 -389
  311. package/dist/telemetry-KI0x4gzC.js.map +0 -1
  312. package/dist/v4-BysszJq8.js +0 -31
  313. package/dist/v4-BysszJq8.js.map +0 -1
  314. package/dist/v4-CqdK_b8Y.cjs +0 -2
  315. package/dist/v4-CqdK_b8Y.cjs.map +0 -1
  316. package/dist/webSender-B27tmT1w.js +0 -42
  317. package/dist/webSender-B27tmT1w.js.map +0 -1
  318. package/dist/webSender-BWi4x1df.cjs +0 -2
  319. package/dist/webSender-BWi4x1df.cjs.map +0 -1
@@ -0,0 +1,4 @@
1
+ import { TelemetryEvent } from './core/telemetry';
2
+ export declare const RAW_DIR = "test/raw";
3
+ /** Writes `batch<suffix>-<i>.json` per batch, after removing this build's files from a prior run. */
4
+ export declare function dumpRaw(batches: TelemetryEvent[][], suffix?: string): void;
@@ -1,23 +1,112 @@
1
+ import { Telemetry } from './core/telemetry';
2
+ import { TaskOutcome } from './adapters/manualSpans';
3
+ /** What `startSpan()` returns. `end()` is idempotent, never throws, and returns nothing to await. */
4
+ export type SpanHandle = {
5
+ /** `reason` becomes `task.failure_reason` on a `failed` end, and is ignored otherwise (#179). */
6
+ end(opts?: {
7
+ outcome?: TaskOutcome;
8
+ reason?: string;
9
+ attributes?: Record<string, unknown>;
10
+ }): void;
11
+ };
1
12
  type ProfileInput = {
2
13
  userId?: string;
14
+ /** @deprecated Removed in v6 — use `identify({ name })`. */
3
15
  fullName?: string;
16
+ /** @deprecated Removed in v6 — never reaches the wire (§3.4). */
4
17
  firstName?: string;
18
+ /** @deprecated Removed in v6 — never reaches the wire (§3.4). */
5
19
  lastName?: string;
6
20
  email?: string;
7
21
  phone?: string;
22
+ /** @deprecated Removed in v6 — never reaches the wire (§3.4). */
8
23
  avatar?: string;
9
24
  customAttributes?: Record<string, any>;
10
25
  };
11
26
  export declare abstract class TelemetryBase {
12
27
  protected instancePromise: Promise<any>;
28
+ /**
29
+ * The resolved core, once `instancePromise` settles — set by each entry. The synchronous
30
+ * methods (`startSpan`, native `trackTap`) cannot afford an `await` before they read the
31
+ * world: the host navigates on the very next line (§4.6's mint/emit split). Before it is
32
+ * set they fall back to emit-time identity.
33
+ */
34
+ protected resolved?: Telemetry;
35
+ /** Run `fn` against the core now if it is resolved, else once it is. Never throws or rejects. */
36
+ private now;
37
+ /**
38
+ * "This screen is usable now" (#171). Synchronous, no arguments: it marks the **current**
39
+ * view, so your name and the SDK's cannot disagree. The time is taken now; the view is
40
+ * chosen one macrotask later, so a mark from a new screen's mount effect lands on that
41
+ * screen even though the navigation that opened it settles behind it. The `view` row then
42
+ * carries `view.ready_time` and `view.ready_outcome`. First mark per view wins. Before init
43
+ * the mark is buffered and lands on the initial view.
44
+ */
45
+ markScreenReady(): void;
46
+ /**
47
+ * Stop collecting, and keep nothing: the queue, the offline store and the session record
48
+ * are dropped, every timer stops, and the network patches pass through untouched. The flag
49
+ * is off before this returns. Survives only this process — persist the user's choice
50
+ * yourself and construct with `enabled: false` next launch.
51
+ */
52
+ disable(): void;
53
+ /** Resume collection. A session that expired while disabled rotates. */
54
+ enable(): void;
55
+ /** Ship your own number. `unit` → `metric.unit`. The SDK's metric names are reserved; a non-finite value is dropped. */
56
+ recordMetric(name: string, value: number, attributes?: Record<string, any>, opts?: {
57
+ unit?: string;
58
+ }): Promise<any>;
59
+ /** Add a step to the trail of 20 that rides `app.crash` and `app.hang`. Name ≤64, ≤8 data keys, values ≤255. */
60
+ addBreadcrumb(name: string, data?: Record<string, unknown>): Promise<void>;
61
+ /** End the current session and start a fresh one — e.g. on logout. `session.reason: manual`. */
62
+ startNewSession(): Promise<any>;
63
+ /**
64
+ * Time a journey: one `task.complete` row when the handle is ended. Synchronous — the
65
+ * trace keys, `view.id` and `session.id` freeze here. A span joins the live action's
66
+ * root, else mints a `custom` one; requests inside it parent to that root, not the span.
67
+ * Starting a name that is already open supersedes it. Blank names and a 33rd open span
68
+ * are inert. Misuse never throws.
69
+ */
70
+ startSpan(name: string, attributes?: Record<string, unknown>): SpanHandle;
71
+ /**
72
+ * `startSpan` + `end` around `fn`, sync or async. A throw (or rejection) ends the span
73
+ * `failed` and is rethrown untouched — no `app.error` is emitted; your catch decides.
74
+ */
75
+ withSpan<T>(name: string, fn: () => T, attributes?: Record<string, unknown>): T;
76
+ /**
77
+ * Close an open span by name — for a journey that ends in a different component. `reason`
78
+ * becomes `task.failure_reason` on a `failed` end (#179).
79
+ */
80
+ endSpan(name: string, outcome?: TaskOutcome, attributes?: Record<string, unknown>, reason?: string): void;
13
81
  log(event: string, data?: Record<string, any>): Promise<any>;
14
82
  flush(): Promise<any>;
15
83
  shutdown(): Promise<any>;
16
- trackErrors(options?: {
84
+ /**
85
+ * React Navigation → rung 2 of the name ladder, on **both** builds (§4.5.1, #96).
86
+ * `getCurrentRoute()` is a navigation-tree API that works identically on RN-Web, so a
87
+ * consumer wires navigation once and gets the same `view.name` on web and native.
88
+ */
89
+ attachNavigation(navigationRef: any): Promise<void>;
90
+ /**
91
+ * §4.7 — report a handled error as `app.error`. Accepts `unknown`, so a `catch` block
92
+ * that received a string or an axios rejection object needs no narrowing first.
93
+ * There is no public path to `app.crash`, by design (#100).
94
+ */
95
+ captureError(error: unknown, context?: Record<string, any>): Promise<any>;
96
+ /**
97
+ * `<EdgeErrorBoundary>`'s path (#166) — `app.error` with `error.source: boundary` and the
98
+ * component stack. Not for host code: `captureError()` is the public way to report.
99
+ * @internal
100
+ */
101
+ captureBoundaryError(error: unknown, componentStack?: string | null): Promise<any>;
102
+ /**
103
+ * Wired per entry (#160): each build imports its own crash handler. Shared code importing
104
+ * the native one is what made the web build resolve it at runtime and reject.
105
+ */
106
+ abstract trackErrors(options?: {
17
107
  captureConsole?: boolean;
18
- }): Promise<any>;
108
+ }): Promise<void>;
19
109
  setUserId(id: string): Promise<void>;
20
- generateUserId(): Promise<any>;
21
110
  setUserProfile(profile: ProfileInput): Promise<void>;
22
111
  setUserDetails(details: ProfileInput): Promise<void>;
23
112
  updateUserProfile(updates: ProfileInput): Promise<void>;
@@ -26,6 +115,7 @@ export declare abstract class TelemetryBase {
26
115
  setUserName(fullName: string, firstName?: string, lastName?: string): Promise<void>;
27
116
  setUserContact(email?: string, phone?: string): Promise<void>;
28
117
  identify(profile: {
118
+ userId?: string;
29
119
  name?: string;
30
120
  email?: string;
31
121
  phone?: string;
@@ -1,28 +1,8 @@
1
- import { TelemetryBase } from './index.base';
2
1
  export { createTelemetry, type TelemetryOpts } from './createTelemetry.native';
3
- export declare class TelemetryNative extends TelemetryBase {
4
- constructor(opts?: {
5
- apiKey?: string;
6
- sender?: any;
7
- batchSize?: number;
8
- flushIntervalMs?: number;
9
- endpoint?: string;
10
- captureConsole?: boolean;
11
- debug?: boolean;
12
- });
13
- private startSessionOnInit;
14
- private attachAppState;
15
- attachAppLifecycle(): Promise<void>;
16
- getDeviceInfo(): Promise<any>;
17
- getNetworkInfo(): Promise<any>;
18
- trackFrameDrops(): Promise<any>;
19
- trackNetworkRequests(): Promise<any>;
20
- trackMemoryUsage(): Promise<any>;
21
- screenStart(name: string): Promise<void>;
22
- screenEnd(name: string): Promise<void>;
23
- trackRoute(from: string, to: string): Promise<void>;
24
- interactionProps(): Promise<{
25
- onStartShouldSetResponderCapture: () => boolean;
26
- }>;
27
- attachNavigation(navigationRef: any): Promise<void>;
28
- }
2
+ export type { TelemetryNative } from './telemetryNative.native';
3
+ export type { Store, SyncStore, AsyncStore, StoreRead, StoreWrite } from './core/store';
4
+ export { memoryStore, type MemoryStoreOpts } from './core/memoryStore';
5
+ export type { BeforeSend } from './core/beforeSend';
6
+ export type { SpanHandle } from './index.base';
7
+ export type { TaskOutcome } from './adapters/manualSpans';
8
+ export { EdgeErrorBoundary, useScreenReady, type EdgeErrorBoundaryProps } from './react';
@@ -1,24 +1,8 @@
1
- import { TelemetryBase } from './index.base';
2
1
  export { createTelemetry, type TelemetryOpts } from './createTelemetry.web';
3
- export declare class TelemetryWeb extends TelemetryBase {
4
- constructor(opts?: {
5
- apiKey?: string;
6
- sender?: any;
7
- batchSize?: number;
8
- flushIntervalMs?: number;
9
- endpoint?: string;
10
- captureConsole?: boolean;
11
- debug?: boolean;
12
- });
13
- attachAppLifecycle(): Promise<void>;
14
- trackErrors(options?: {
15
- captureConsole?: boolean;
16
- }): Promise<any>;
17
- private startSessionOnInit;
18
- trackFrameDrops(): Promise<any>;
19
- trackNetworkRequests(): Promise<any>;
20
- trackMemoryUsage(): Promise<any>;
21
- autoTrackNavigation(): Promise<any>;
22
- getDeviceInfo(): Promise<any>;
23
- getNetworkInfo(): Promise<any>;
24
- }
2
+ export type { TelemetryWeb } from './telemetryWeb.web';
3
+ export type { Store, SyncStore, AsyncStore, StoreRead, StoreWrite } from './core/store';
4
+ export { memoryStore, type MemoryStoreOpts } from './core/memoryStore';
5
+ export type { BeforeSend } from './core/beforeSend';
6
+ export type { SpanHandle } from './index.base';
7
+ export type { TaskOutcome } from './adapters/manualSpans';
8
+ export { EdgeErrorBoundary, useScreenReady, type EdgeErrorBoundaryProps } from './react';
@@ -0,0 +1,45 @@
1
+ import { Component, ErrorInfo, ReactNode } from 'react';
2
+ type BoundaryTelemetry = {
3
+ captureBoundaryError(error: unknown, componentStack?: string | null): Promise<unknown>;
4
+ };
5
+ export type EdgeErrorBoundaryProps = {
6
+ telemetry: BoundaryTelemetry;
7
+ children?: ReactNode;
8
+ /** Rendered in place of the failed subtree: a node, or a render function given the error and a reset. */
9
+ fallback?: ReactNode | ((props: {
10
+ error: unknown;
11
+ resetError: () => void;
12
+ }) => ReactNode);
13
+ /** Runs after the SDK's emit. A throw here is swallowed — your handler cannot break the boundary. */
14
+ onError?: (error: unknown, info: ErrorInfo) => void;
15
+ };
16
+ /**
17
+ * Reports a caught render error as `app.error`, `error.source: boundary` — **never**
18
+ * `app.crash`: the boundary handled it — exactly once. The error is marked in
19
+ * `getDerivedStateFromError`, before React's own reporting, so `captureConsole` and the
20
+ * global handlers skip it.
21
+ */
22
+ export declare class EdgeErrorBoundary extends Component<EdgeErrorBoundaryProps, {
23
+ error?: unknown;
24
+ failed: boolean;
25
+ }> {
26
+ state: {
27
+ error: unknown;
28
+ failed: boolean;
29
+ };
30
+ static getDerivedStateFromError(error: unknown): {
31
+ error: unknown;
32
+ failed: boolean;
33
+ };
34
+ componentDidCatch(error: unknown, info: ErrorInfo): void;
35
+ resetError: () => void;
36
+ render(): ReactNode;
37
+ }
38
+ /**
39
+ * Marks the current screen ready (#171) once `ready` is truthy — `useScreenReady(telemetry,
40
+ * !loading)`. First mark per view wins, so re-renders and a `ready` that flips back are harmless.
41
+ */
42
+ export declare function useScreenReady(telemetry: {
43
+ markScreenReady(): void;
44
+ }, ready?: unknown): void;
45
+ export {};
@@ -0,0 +1,79 @@
1
+ import { TelemetryBase } from './index.base';
2
+ import { Store } from './core/store';
3
+ import { BeforeSend } from './core/beforeSend';
4
+ export declare class TelemetryNative extends TelemetryBase {
5
+ /** ≥3 named taps in a 1000 ms window, keyed on the name — see `trackTap`. */
6
+ private readonly tapRage;
7
+ /** Explicit `trackTap()` calls so far — an auto row is skipped when one fired inside its handler. */
8
+ private explicitTaps;
9
+ constructor(opts?: {
10
+ apiKey?: string;
11
+ sender?: any;
12
+ batchSize?: number;
13
+ flushIntervalMs?: number;
14
+ endpoint?: string;
15
+ captureConsole?: boolean;
16
+ debug?: boolean;
17
+ store?: Store;
18
+ beforeSend?: BeforeSend;
19
+ sessionSampleRate?: number;
20
+ traceHostAllowlist?: string[];
21
+ buildId?: string;
22
+ enabled?: boolean;
23
+ autoTrackTaps?: boolean;
24
+ });
25
+ attachAppLifecycle(): Promise<void>;
26
+ trackErrors(options?: {
27
+ captureConsole?: boolean;
28
+ }): Promise<any>;
29
+ getDeviceInfo(): Promise<any>;
30
+ getNetworkInfo(): Promise<any>;
31
+ trackFrameDrops(): Promise<any>;
32
+ trackNetworkRequests(): Promise<any>;
33
+ trackMemoryUsage(): Promise<any>;
34
+ /**
35
+ * Rung 1 of the name ladder (§4.5.1) — `explicit`, and never normalized: a host naming a
36
+ * screen "Step 2 of 3" must not receive "Step {id} of {id}". Emits no `navigation` (#163).
37
+ */
38
+ screenStart(name: string): Promise<any>;
39
+ /** @deprecated No-op since v5 (#163) — `screen.duration` is gone; `view.time_spent` replaces it. Deleted in v6. */
40
+ screenEnd(_name: string): Promise<void>;
41
+ /** @deprecated No-op since v5 (#163) — use `attachNavigation(ref)` or `screenStart(name)`. Deleted in v6. */
42
+ trackRoute(_from: string, _to: string): Promise<void>;
43
+ /**
44
+ * §4.6's native producer, explicit-only (#103). `interactionProps()` is gone with
45
+ * `user.interaction` (#102): it sat on the consumer's **root** `<View>`, where
46
+ * `PressEvent.nativeEvent.target` is a node tag number with no public API resolving it,
47
+ * so it could not tell a tap on a button from a tap on padding and every row it emitted
48
+ * was un-nameable. There is no role model to gate on and no DOM to derive from, so
49
+ * anything auto-derived here would be either wrong or a PII leak.
50
+ *
51
+ * `name` is web's rung 1 — explicit author intent — so it ships **unnormalized and
52
+ * uncapped**, and `ui.name_source` has exactly **two** values: `edge_action`, or `none`
53
+ * for a blank name, whose `ui.target` is `unnamed`. **`surface` never appears**: it only
54
+ * means something where role-less elements exist.
55
+ *
56
+ * ⚠ **The mint/emit split.** The row's `timestamp`, `view.id`, `view.name` and
57
+ * `session.id` are snapshotted **here, synchronously**, because the host's press handler
58
+ * navigates on the next line and the emit rides a promise. Stamping emit time would
59
+ * attribute a navigating tap to **the view it opened**, inverting every "which screen
60
+ * frustrates users" query. Before `instancePromise` settles there is no core to snapshot
61
+ * from, so a tap that early falls back to emit-time identity — the launch view either
62
+ * way.
63
+ *
64
+ * ⚠ **`ui.dead` is absent on every native row**, never `false`: with no DOM there is no
65
+ * mutation signal, so any dead-click *rate* must filter to the web build.
66
+ */
67
+ trackTap(name: string): Promise<any>;
68
+ /**
69
+ * #174's hook. Patches `react/jsx-runtime`, `react/jsx-dev-runtime` and `React.createElement`
70
+ * — the module exports objects, which is what Babel's `(0, _jsxRuntime.jsx)` reads — so an
71
+ * element with a function `onPress`/`onLongPress` gets a wrapper that emits on activation.
72
+ *
73
+ * Names never come from text or accessibility labels (`"Pay John Kamau KES 5,000"`):
74
+ * `trackTap(name)` > `testID` (normalized like web rung 2, cap 64) > `unnamed`. Identity is
75
+ * snapshotted and the interaction root minted **before** the handler runs; the row is emitted
76
+ * after it, and skipped if the handler called `trackTap` itself.
77
+ */
78
+ private autoTrackTaps;
79
+ }
@@ -0,0 +1,59 @@
1
+ import { TelemetryBase } from './index.base';
2
+ import { SyncStore } from './core/store';
3
+ import { BeforeSend } from './core/beforeSend';
4
+ export declare class TelemetryWeb extends TelemetryBase {
5
+ constructor(opts?: {
6
+ apiKey?: string;
7
+ sender?: any;
8
+ batchSize?: number;
9
+ flushIntervalMs?: number;
10
+ endpoint?: string;
11
+ captureConsole?: boolean;
12
+ debug?: boolean;
13
+ store?: SyncStore;
14
+ beforeSend?: BeforeSend;
15
+ sessionSampleRate?: number;
16
+ traceHostAllowlist?: string[];
17
+ buildId?: string;
18
+ enabled?: boolean;
19
+ });
20
+ /**
21
+ * #161 — the session record is `localStorage`, shared by every tab, but each tab keeps its
22
+ * own in-memory `lastActivity`. The `storage` event fires in every *other* tab on a write,
23
+ * so this tab adopts the sibling's progress — or its rotation — instead of diverging and
24
+ * finalizing the same `session.id` a second time. Native has no sibling and no listener.
25
+ */
26
+ private attachCrossTabSync;
27
+ /**
28
+ * A bfcache restore resumes a frozen JS context, so the in-memory session survives on its
29
+ * own — but the freeze can have outlasted the idle window, and a sibling tab may have
30
+ * rotated the shared localStorage record while this one was suspended. Re-running the
31
+ * init decision against the Store is what reconciles both (#92, §4.2).
32
+ */
33
+ private attachBfcacheRestore;
34
+ attachAppLifecycle(): Promise<void>;
35
+ trackErrors(options?: {
36
+ captureConsole?: boolean;
37
+ }): Promise<any>;
38
+ trackFrameDrops(): Promise<any>;
39
+ trackNetworkRequests(): Promise<any>;
40
+ /**
41
+ * §4.6/#102 — one capture-phase `click` listener on `document`. Auto-started, like every
42
+ * other capture: `ui.interaction` is what §6.2's interaction root hangs off, so a
43
+ * consumer forgetting to call it would leave every tap-driven request unattributed.
44
+ */
45
+ trackInteractions(): Promise<void>;
46
+ /**
47
+ * §5.3/#106 — the five Core Web Vitals on the metric path, web only. Auto-started and
48
+ * deliberately not public API: there is nothing for a consumer to configure, and a vital
49
+ * that only fires if someone remembered to call a method is a vital nobody has.
50
+ *
51
+ * `web-vitals/attribution` is bundled, so this is the only import of it in the tree and
52
+ * `index.native` never reaches it. A failed chunk load is caught by the caller and costs
53
+ * the vitals, nothing else.
54
+ */
55
+ private trackWebVitals;
56
+ autoTrackNavigation(): Promise<any>;
57
+ getDeviceInfo(): Promise<any>;
58
+ getNetworkInfo(): Promise<any>;
59
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@react-native-async-storage/async-storage");function r(){return{sync:!1,async get(t){try{const e=await a.getItem(t);return e==null?{status:"miss"}:{status:"hit",value:e}}catch{return{status:"unavailable"}}},async set(t,e){try{return await a.setItem(t,e),{status:"ok"}}catch{return{status:"unavailable"}}},async remove(t){try{return await a.removeItem(t),{status:"ok"}}catch{return{status:"unavailable"}}}}}exports.nativeStore=r;
2
+ //# sourceMappingURL=store.native-BbS76uWV.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.native-BbS76uWV.cjs","sources":["../src/adapters/native/store.native.ts"],"sourcesContent":["import AsyncStorage from \"@react-native-async-storage/async-storage\";\nimport type { AsyncStore, StoreRead, StoreWrite } from \"../../core/store\";\n\n/**\n * AsyncStorage-backed Store for the native build (#89). Reads settle later, so a\n * caller cannot assume a write has landed before the process dies — the crash-loss\n * window narrows here, it does not close. The port keeps that visible.\n *\n * A rejected AsyncStorage call — no native module linked, SQLite/disk full — is\n * `unavailable`, distinct from a key that simply isn't there.\n */\nexport function nativeStore(): AsyncStore {\n return {\n sync: false,\n async get(key: string): Promise<StoreRead> {\n try {\n const value = await AsyncStorage.getItem(key);\n return value === null || value === undefined\n ? { status: \"miss\" }\n : { status: \"hit\", value };\n } catch {\n return { status: \"unavailable\" };\n }\n },\n async set(key: string, value: string): Promise<StoreWrite> {\n try {\n await AsyncStorage.setItem(key, value);\n return { status: \"ok\" };\n } catch {\n return { status: \"unavailable\" };\n }\n },\n async remove(key: string): Promise<StoreWrite> {\n try {\n await AsyncStorage.removeItem(key);\n return { status: \"ok\" };\n } catch {\n return { status: \"unavailable\" };\n }\n },\n };\n}\n"],"names":["nativeStore","key","value","AsyncStorage"],"mappings":"6IAWO,SAASA,GAA0B,CACtC,MAAO,CACH,KAAM,GACN,MAAM,IAAIC,EAAiC,CACvC,GAAI,CACA,MAAMC,EAAQ,MAAMC,EAAa,QAAQF,CAAG,EAC5C,OAAOC,GAAU,KACX,CAAE,OAAQ,QACV,CAAE,OAAQ,MAAO,MAAAA,CAAA,CAC3B,MAAQ,CACJ,MAAO,CAAE,OAAQ,aAAA,CACrB,CACJ,EACA,MAAM,IAAID,EAAaC,EAAoC,CACvD,GAAI,CACA,aAAMC,EAAa,QAAQF,EAAKC,CAAK,EAC9B,CAAE,OAAQ,IAAA,CACrB,MAAQ,CACJ,MAAO,CAAE,OAAQ,aAAA,CACrB,CACJ,EACA,MAAM,OAAOD,EAAkC,CAC3C,GAAI,CACA,aAAME,EAAa,WAAWF,CAAG,EAC1B,CAAE,OAAQ,IAAA,CACrB,MAAQ,CACJ,MAAO,CAAE,OAAQ,aAAA,CACrB,CACJ,CAAA,CAER"}
@@ -0,0 +1,32 @@
1
+ import e from "@react-native-async-storage/async-storage";
2
+ function r() {
3
+ return {
4
+ sync: !1,
5
+ async get(t) {
6
+ try {
7
+ const a = await e.getItem(t);
8
+ return a == null ? { status: "miss" } : { status: "hit", value: a };
9
+ } catch {
10
+ return { status: "unavailable" };
11
+ }
12
+ },
13
+ async set(t, a) {
14
+ try {
15
+ return await e.setItem(t, a), { status: "ok" };
16
+ } catch {
17
+ return { status: "unavailable" };
18
+ }
19
+ },
20
+ async remove(t) {
21
+ try {
22
+ return await e.removeItem(t), { status: "ok" };
23
+ } catch {
24
+ return { status: "unavailable" };
25
+ }
26
+ }
27
+ };
28
+ }
29
+ export {
30
+ r as nativeStore
31
+ };
32
+ //# sourceMappingURL=store.native-MlWyGgBp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.native-MlWyGgBp.js","sources":["../src/adapters/native/store.native.ts"],"sourcesContent":["import AsyncStorage from \"@react-native-async-storage/async-storage\";\nimport type { AsyncStore, StoreRead, StoreWrite } from \"../../core/store\";\n\n/**\n * AsyncStorage-backed Store for the native build (#89). Reads settle later, so a\n * caller cannot assume a write has landed before the process dies — the crash-loss\n * window narrows here, it does not close. The port keeps that visible.\n *\n * A rejected AsyncStorage call — no native module linked, SQLite/disk full — is\n * `unavailable`, distinct from a key that simply isn't there.\n */\nexport function nativeStore(): AsyncStore {\n return {\n sync: false,\n async get(key: string): Promise<StoreRead> {\n try {\n const value = await AsyncStorage.getItem(key);\n return value === null || value === undefined\n ? { status: \"miss\" }\n : { status: \"hit\", value };\n } catch {\n return { status: \"unavailable\" };\n }\n },\n async set(key: string, value: string): Promise<StoreWrite> {\n try {\n await AsyncStorage.setItem(key, value);\n return { status: \"ok\" };\n } catch {\n return { status: \"unavailable\" };\n }\n },\n async remove(key: string): Promise<StoreWrite> {\n try {\n await AsyncStorage.removeItem(key);\n return { status: \"ok\" };\n } catch {\n return { status: \"unavailable\" };\n }\n },\n };\n}\n"],"names":["nativeStore","key","value","AsyncStorage"],"mappings":";AAWO,SAASA,IAA0B;AACtC,SAAO;AAAA,IACH,MAAM;AAAA,IACN,MAAM,IAAIC,GAAiC;AACvC,UAAI;AACA,cAAMC,IAAQ,MAAMC,EAAa,QAAQF,CAAG;AAC5C,eAAOC,KAAU,OACX,EAAE,QAAQ,WACV,EAAE,QAAQ,OAAO,OAAAA,EAAA;AAAA,MAC3B,QAAQ;AACJ,eAAO,EAAE,QAAQ,cAAA;AAAA,MACrB;AAAA,IACJ;AAAA,IACA,MAAM,IAAID,GAAaC,GAAoC;AACvD,UAAI;AACA,qBAAMC,EAAa,QAAQF,GAAKC,CAAK,GAC9B,EAAE,QAAQ,KAAA;AAAA,MACrB,QAAQ;AACJ,eAAO,EAAE,QAAQ,cAAA;AAAA,MACrB;AAAA,IACJ;AAAA,IACA,MAAM,OAAOD,GAAkC;AAC3C,UAAI;AACA,qBAAME,EAAa,WAAWF,CAAG,GAC1B,EAAE,QAAQ,KAAA;AAAA,MACrB,QAAQ;AACJ,eAAO,EAAE,QAAQ,cAAA;AAAA,MACrB;AAAA,IACJ;AAAA,EAAA;AAER;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function r(){return{sync:!0,get(t){try{const e=localStorage.getItem(t);return e===null?{status:"miss"}:{status:"hit",value:e}}catch{return{status:"unavailable"}}},set(t,e){try{return localStorage.setItem(t,e),{status:"ok"}}catch{return{status:"unavailable"}}},remove(t){try{return localStorage.removeItem(t),{status:"ok"}}catch{return{status:"unavailable"}}}}}exports.webStore=r;
2
+ //# sourceMappingURL=store.web-BzKaP57Z.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.web-BzKaP57Z.cjs","sources":["../src/adapters/web/store.web.ts"],"sourcesContent":["import type { StoreRead, StoreWrite, SyncStore } from \"../../core/store\";\n\n/**\n * localStorage-backed Store for the web build (#89). Reads are synchronous, and\n * that is the point: state written here is durable before the next line runs, so\n * the crash-loss window closes rather than narrows.\n *\n * Every access is guarded. Touching `localStorage` throws — not returns null — in\n * incognito with cookies blocked, in a partitioned third-party iframe, and once\n * quota is exhausted; and the identifier isn't declared at all outside a browser.\n * All of those are `unavailable`, never an exception out of the SDK.\n */\nexport function webStore(): SyncStore {\n return {\n sync: true,\n get(key: string): StoreRead {\n try {\n const value = localStorage.getItem(key);\n return value === null ? { status: \"miss\" } : { status: \"hit\", value };\n } catch {\n return { status: \"unavailable\" };\n }\n },\n set(key: string, value: string): StoreWrite {\n try {\n localStorage.setItem(key, value);\n return { status: \"ok\" };\n } catch {\n return { status: \"unavailable\" };\n }\n },\n remove(key: string): StoreWrite {\n try {\n localStorage.removeItem(key);\n return { status: \"ok\" };\n } catch {\n return { status: \"unavailable\" };\n }\n },\n };\n}\n"],"names":["webStore","key","value"],"mappings":"gFAYO,SAASA,GAAsB,CAClC,MAAO,CACH,KAAM,GACN,IAAIC,EAAwB,CACxB,GAAI,CACA,MAAMC,EAAQ,aAAa,QAAQD,CAAG,EACtC,OAAOC,IAAU,KAAO,CAAE,OAAQ,QAAW,CAAE,OAAQ,MAAO,MAAAA,CAAA,CAClE,MAAQ,CACJ,MAAO,CAAE,OAAQ,aAAA,CACrB,CACJ,EACA,IAAID,EAAaC,EAA2B,CACxC,GAAI,CACA,oBAAa,QAAQD,EAAKC,CAAK,EACxB,CAAE,OAAQ,IAAA,CACrB,MAAQ,CACJ,MAAO,CAAE,OAAQ,aAAA,CACrB,CACJ,EACA,OAAOD,EAAyB,CAC5B,GAAI,CACA,oBAAa,WAAWA,CAAG,EACpB,CAAE,OAAQ,IAAA,CACrB,MAAQ,CACJ,MAAO,CAAE,OAAQ,aAAA,CACrB,CACJ,CAAA,CAER"}
@@ -0,0 +1,31 @@
1
+ function a() {
2
+ return {
3
+ sync: !0,
4
+ get(t) {
5
+ try {
6
+ const e = localStorage.getItem(t);
7
+ return e === null ? { status: "miss" } : { status: "hit", value: e };
8
+ } catch {
9
+ return { status: "unavailable" };
10
+ }
11
+ },
12
+ set(t, e) {
13
+ try {
14
+ return localStorage.setItem(t, e), { status: "ok" };
15
+ } catch {
16
+ return { status: "unavailable" };
17
+ }
18
+ },
19
+ remove(t) {
20
+ try {
21
+ return localStorage.removeItem(t), { status: "ok" };
22
+ } catch {
23
+ return { status: "unavailable" };
24
+ }
25
+ }
26
+ };
27
+ }
28
+ export {
29
+ a as webStore
30
+ };
31
+ //# sourceMappingURL=store.web-rhh0NOfs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.web-rhh0NOfs.js","sources":["../src/adapters/web/store.web.ts"],"sourcesContent":["import type { StoreRead, StoreWrite, SyncStore } from \"../../core/store\";\n\n/**\n * localStorage-backed Store for the web build (#89). Reads are synchronous, and\n * that is the point: state written here is durable before the next line runs, so\n * the crash-loss window closes rather than narrows.\n *\n * Every access is guarded. Touching `localStorage` throws — not returns null — in\n * incognito with cookies blocked, in a partitioned third-party iframe, and once\n * quota is exhausted; and the identifier isn't declared at all outside a browser.\n * All of those are `unavailable`, never an exception out of the SDK.\n */\nexport function webStore(): SyncStore {\n return {\n sync: true,\n get(key: string): StoreRead {\n try {\n const value = localStorage.getItem(key);\n return value === null ? { status: \"miss\" } : { status: \"hit\", value };\n } catch {\n return { status: \"unavailable\" };\n }\n },\n set(key: string, value: string): StoreWrite {\n try {\n localStorage.setItem(key, value);\n return { status: \"ok\" };\n } catch {\n return { status: \"unavailable\" };\n }\n },\n remove(key: string): StoreWrite {\n try {\n localStorage.removeItem(key);\n return { status: \"ok\" };\n } catch {\n return { status: \"unavailable\" };\n }\n },\n };\n}\n"],"names":["webStore","key","value"],"mappings":"AAYO,SAASA,IAAsB;AAClC,SAAO;AAAA,IACH,MAAM;AAAA,IACN,IAAIC,GAAwB;AACxB,UAAI;AACA,cAAMC,IAAQ,aAAa,QAAQD,CAAG;AACtC,eAAOC,MAAU,OAAO,EAAE,QAAQ,WAAW,EAAE,QAAQ,OAAO,OAAAA,EAAA;AAAA,MAClE,QAAQ;AACJ,eAAO,EAAE,QAAQ,cAAA;AAAA,MACrB;AAAA,IACJ;AAAA,IACA,IAAID,GAAaC,GAA2B;AACxC,UAAI;AACA,4BAAa,QAAQD,GAAKC,CAAK,GACxB,EAAE,QAAQ,KAAA;AAAA,MACrB,QAAQ;AACJ,eAAO,EAAE,QAAQ,cAAA;AAAA,MACrB;AAAA,IACJ;AAAA,IACA,OAAOD,GAAyB;AAC5B,UAAI;AACA,4BAAa,WAAWA,CAAG,GACpB,EAAE,QAAQ,KAAA;AAAA,MACrB,QAAQ;AACJ,eAAO,EAAE,QAAQ,cAAA;AAAA,MACrB;AAAA,IACJ;AAAA,EAAA;AAER;"}