@ovok/native 1.5.6 → 1.6.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 (643) hide show
  1. package/README.md +27 -17
  2. package/app.plugin.js +104 -0
  3. package/lib/commonjs/index.js +11 -0
  4. package/lib/commonjs/index.js.map +1 -1
  5. package/lib/commonjs/modules/auth/delete-account-button/components/delete-account-button.js +2 -0
  6. package/lib/commonjs/modules/auth/delete-account-button/components/delete-account-button.js.map +1 -1
  7. package/lib/commonjs/modules/auth/hooks/use-rate-limit-cooldown.js +23 -0
  8. package/lib/commonjs/modules/auth/hooks/use-rate-limit-cooldown.js.map +1 -0
  9. package/lib/commonjs/modules/auth/hooks/use-session.js +91 -0
  10. package/lib/commonjs/modules/auth/hooks/use-session.js.map +1 -0
  11. package/lib/commonjs/modules/auth/index.js +44 -0
  12. package/lib/commonjs/modules/auth/index.js.map +1 -1
  13. package/lib/commonjs/modules/auth/logout-button/components/logout-button.js +3 -1
  14. package/lib/commonjs/modules/auth/logout-button/components/logout-button.js.map +1 -1
  15. package/lib/commonjs/modules/auth/register/components/form/inputs.js +48 -1
  16. package/lib/commonjs/modules/auth/register/components/form/inputs.js.map +1 -1
  17. package/lib/commonjs/modules/auth/register/components/form/register-button.js +4 -0
  18. package/lib/commonjs/modules/auth/register/components/form/register-button.js.map +1 -1
  19. package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js +6 -0
  20. package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js.map +1 -1
  21. package/lib/commonjs/modules/auth/reset-password/components/form/inputs.js +12 -0
  22. package/lib/commonjs/modules/auth/reset-password/components/form/inputs.js.map +1 -1
  23. package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-button.js +4 -0
  24. package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-button.js.map +1 -1
  25. package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js +7 -1
  26. package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
  27. package/lib/commonjs/modules/auth/session/components/session-list.js +82 -0
  28. package/lib/commonjs/modules/auth/session/components/session-list.js.map +1 -0
  29. package/lib/commonjs/modules/auth/session/events.js +19 -0
  30. package/lib/commonjs/modules/auth/session/events.js.map +1 -0
  31. package/lib/commonjs/modules/auth/session/index.js +13 -0
  32. package/lib/commonjs/modules/auth/session/index.js.map +1 -0
  33. package/lib/commonjs/modules/auth/session/types/session-list-props.js +6 -0
  34. package/lib/commonjs/modules/auth/session/types/session-list-props.js.map +1 -0
  35. package/lib/commonjs/modules/auth/sign-in/components/form/inputs.js +25 -0
  36. package/lib/commonjs/modules/auth/sign-in/components/form/inputs.js.map +1 -1
  37. package/lib/commonjs/modules/auth/sign-in/components/form/login-form-provider.js +48 -1
  38. package/lib/commonjs/modules/auth/sign-in/components/form/login-form-provider.js.map +1 -1
  39. package/lib/commonjs/modules/auth/sign-in/components/form/mfa-code-input.js +58 -0
  40. package/lib/commonjs/modules/auth/sign-in/components/form/mfa-code-input.js.map +1 -0
  41. package/lib/commonjs/modules/auth/sign-in/components/form/sign-in-with-email.js +2 -0
  42. package/lib/commonjs/modules/auth/sign-in/components/form/sign-in-with-email.js.map +1 -1
  43. package/lib/commonjs/modules/auth/sign-in/components/form/signin-button.js +13 -5
  44. package/lib/commonjs/modules/auth/sign-in/components/form/signin-button.js.map +1 -1
  45. package/lib/commonjs/modules/auth/types/session.js +2 -0
  46. package/lib/commonjs/modules/auth/types/session.js.map +1 -0
  47. package/lib/commonjs/modules/auth/utils/rate-limit.js +37 -0
  48. package/lib/commonjs/modules/auth/utils/rate-limit.js.map +1 -0
  49. package/lib/commonjs/modules/background-sync/android-bluetooth-foreground-service.js +3 -2
  50. package/lib/commonjs/modules/background-sync/android-bluetooth-foreground-service.js.map +1 -1
  51. package/lib/commonjs/modules/background-sync/background-safe-storage.js +79 -0
  52. package/lib/commonjs/modules/background-sync/background-safe-storage.js.map +1 -0
  53. package/lib/commonjs/modules/background-sync/index.js +11 -0
  54. package/lib/commonjs/modules/background-sync/index.js.map +1 -1
  55. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +123 -21
  56. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  57. package/lib/commonjs/modules/bt-management/hooks/runtime-context.js +91 -0
  58. package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -0
  59. package/lib/commonjs/modules/bt-management/hooks/use-background-sync.js +47 -0
  60. package/lib/commonjs/modules/bt-management/hooks/use-background-sync.js.map +1 -0
  61. package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-state.js +51 -0
  62. package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-state.js.map +1 -0
  63. package/lib/commonjs/modules/bt-management/hooks/use-device-connection.js +36 -0
  64. package/lib/commonjs/modules/bt-management/hooks/use-device-connection.js.map +1 -0
  65. package/lib/commonjs/modules/bt-management/hooks/use-health-import.js +46 -0
  66. package/lib/commonjs/modules/bt-management/hooks/use-health-import.js.map +1 -0
  67. package/lib/commonjs/modules/bt-management/hooks/use-measurements.js +57 -0
  68. package/lib/commonjs/modules/bt-management/hooks/use-measurements.js.map +1 -0
  69. package/lib/commonjs/modules/bt-management/hooks/use-nearby-devices.js +26 -0
  70. package/lib/commonjs/modules/bt-management/hooks/use-nearby-devices.js.map +1 -0
  71. package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js +49 -0
  72. package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js.map +1 -0
  73. package/lib/commonjs/modules/bt-management/index.js +143 -0
  74. package/lib/commonjs/modules/bt-management/index.js.map +1 -1
  75. package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js +41 -4
  76. package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
  77. package/lib/commonjs/modules/bt-management/services/bt-manager.js +75 -4
  78. package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
  79. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +57 -0
  80. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  81. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +111 -3
  82. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  83. package/lib/commonjs/modules/bt-management/services/devices/measurement-state-machine.js +5 -3
  84. package/lib/commonjs/modules/bt-management/services/devices/measurement-state-machine.js.map +1 -1
  85. package/lib/commonjs/modules/bt-management/services/devices/spo/spo2.main-services.js +12 -0
  86. package/lib/commonjs/modules/bt-management/services/devices/spo/spo2.main-services.js.map +1 -1
  87. package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js +52 -0
  88. package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js.map +1 -0
  89. package/lib/commonjs/modules/bt-management/testing/index.js +28 -0
  90. package/lib/commonjs/modules/bt-management/testing/index.js.map +1 -0
  91. package/lib/commonjs/modules/bt-management/testing/recorded-frames.js +23 -0
  92. package/lib/commonjs/modules/bt-management/testing/recorded-frames.js.map +1 -0
  93. package/lib/commonjs/modules/bt-management/types/bluetooth-error.js +80 -0
  94. package/lib/commonjs/modules/bt-management/types/bluetooth-error.js.map +1 -0
  95. package/lib/commonjs/modules/bt-management/types/device-connection-event.js +6 -0
  96. package/lib/commonjs/modules/bt-management/types/device-connection-event.js.map +1 -0
  97. package/lib/commonjs/modules/bt-management/types/result-policy.js +6 -0
  98. package/lib/commonjs/modules/bt-management/types/result-policy.js.map +1 -0
  99. package/lib/commonjs/modules/bt-management/utils/result-identity.js +63 -0
  100. package/lib/commonjs/modules/bt-management/utils/result-identity.js.map +1 -0
  101. package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js +8 -2
  102. package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
  103. package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js +23 -4
  104. package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js.map +1 -1
  105. package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +2 -2
  106. package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
  107. package/lib/commonjs/modules/data-sync/services/managers/sync-progress-manager.js +1 -1
  108. package/lib/commonjs/modules/data-sync/services/managers/sync-progress-manager.js.map +1 -1
  109. package/lib/commonjs/modules/data-sync/utils/retry-save.js +65 -0
  110. package/lib/commonjs/modules/data-sync/utils/retry-save.js.map +1 -0
  111. package/lib/commonjs/modules/helpers/form-items/form-field.js +2 -0
  112. package/lib/commonjs/modules/helpers/form-items/form-field.js.map +1 -1
  113. package/lib/commonjs/modules/helpers/index.js +12 -0
  114. package/lib/commonjs/modules/helpers/index.js.map +1 -1
  115. package/lib/commonjs/modules/helpers/utils/s-log.js +4 -13
  116. package/lib/commonjs/modules/helpers/utils/s-log.js.map +1 -1
  117. package/lib/commonjs/modules/helpers/utils/sentry-logger.js +28 -17
  118. package/lib/commonjs/modules/helpers/utils/sentry-logger.js.map +1 -1
  119. package/lib/commonjs/modules/helpers/utils/telemetry.js +143 -0
  120. package/lib/commonjs/modules/helpers/utils/telemetry.js.map +1 -0
  121. package/lib/commonjs/modules/image/components/optimized-image.js +24 -2
  122. package/lib/commonjs/modules/image/components/optimized-image.js.map +1 -1
  123. package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-error.js +18 -9
  124. package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-error.js.map +1 -1
  125. package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js +3 -2
  126. package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js.map +1 -1
  127. package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js +4 -2
  128. package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js.map +1 -1
  129. package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js +42 -17
  130. package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
  131. package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js +2 -1
  132. package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js.map +1 -1
  133. package/lib/commonjs/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.js.map +1 -1
  134. package/lib/commonjs/modules/tile/components/task-icon.js +2 -1
  135. package/lib/commonjs/modules/tile/components/task-icon.js.map +1 -1
  136. package/lib/commonjs/modules/ui/components/background-sync-setting.js +113 -0
  137. package/lib/commonjs/modules/ui/components/background-sync-setting.js.map +1 -0
  138. package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js +105 -0
  139. package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js.map +1 -0
  140. package/lib/commonjs/modules/ui/components/ecg-strip-viewer.js +165 -0
  141. package/lib/commonjs/modules/ui/components/ecg-strip-viewer.js.map +1 -0
  142. package/lib/commonjs/modules/ui/components/health-import-card.js +130 -0
  143. package/lib/commonjs/modules/ui/components/health-import-card.js.map +1 -0
  144. package/lib/commonjs/modules/ui/components/manual-entry-form.js +123 -0
  145. package/lib/commonjs/modules/ui/components/manual-entry-form.js.map +1 -0
  146. package/lib/commonjs/modules/ui/components/pairing-flow.js +222 -0
  147. package/lib/commonjs/modules/ui/components/pairing-flow.js.map +1 -0
  148. package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js +99 -0
  149. package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js.map +1 -0
  150. package/lib/commonjs/modules/ui/components/urine-test-result.js +94 -0
  151. package/lib/commonjs/modules/ui/components/urine-test-result.js.map +1 -0
  152. package/lib/commonjs/modules/ui/index.js +116 -0
  153. package/lib/commonjs/modules/ui/index.js.map +1 -0
  154. package/lib/commonjs/modules/ui/types.js +6 -0
  155. package/lib/commonjs/modules/ui/types.js.map +1 -0
  156. package/lib/commonjs/modules/ui/use-ovok-ui.js +51 -0
  157. package/lib/commonjs/modules/ui/use-ovok-ui.js.map +1 -0
  158. package/lib/module/index.js +1 -0
  159. package/lib/module/index.js.map +1 -1
  160. package/lib/module/modules/auth/delete-account-button/components/delete-account-button.js +2 -0
  161. package/lib/module/modules/auth/delete-account-button/components/delete-account-button.js.map +1 -1
  162. package/lib/module/modules/auth/hooks/use-rate-limit-cooldown.js +17 -0
  163. package/lib/module/modules/auth/hooks/use-rate-limit-cooldown.js.map +1 -0
  164. package/lib/module/modules/auth/hooks/use-session.js +85 -0
  165. package/lib/module/modules/auth/hooks/use-session.js.map +1 -0
  166. package/lib/module/modules/auth/index.js +4 -0
  167. package/lib/module/modules/auth/index.js.map +1 -1
  168. package/lib/module/modules/auth/logout-button/components/logout-button.js +3 -1
  169. package/lib/module/modules/auth/logout-button/components/logout-button.js.map +1 -1
  170. package/lib/module/modules/auth/register/components/form/inputs.js +48 -1
  171. package/lib/module/modules/auth/register/components/form/inputs.js.map +1 -1
  172. package/lib/module/modules/auth/register/components/form/register-button.js +4 -0
  173. package/lib/module/modules/auth/register/components/form/register-button.js.map +1 -1
  174. package/lib/module/modules/auth/register/components/form/register-form-provider.js +6 -0
  175. package/lib/module/modules/auth/register/components/form/register-form-provider.js.map +1 -1
  176. package/lib/module/modules/auth/reset-password/components/form/inputs.js +12 -0
  177. package/lib/module/modules/auth/reset-password/components/form/inputs.js.map +1 -1
  178. package/lib/module/modules/auth/reset-password/components/form/reset-password-button.js +4 -0
  179. package/lib/module/modules/auth/reset-password/components/form/reset-password-button.js.map +1 -1
  180. package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js +7 -1
  181. package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
  182. package/lib/module/modules/auth/session/components/session-list.js +76 -0
  183. package/lib/module/modules/auth/session/components/session-list.js.map +1 -0
  184. package/lib/module/modules/auth/session/events.js +13 -0
  185. package/lib/module/modules/auth/session/events.js.map +1 -0
  186. package/lib/module/modules/auth/session/index.js +4 -0
  187. package/lib/module/modules/auth/session/index.js.map +1 -0
  188. package/lib/module/modules/auth/session/types/session-list-props.js +4 -0
  189. package/lib/module/modules/auth/session/types/session-list-props.js.map +1 -0
  190. package/lib/module/modules/auth/sign-in/components/form/inputs.js +25 -0
  191. package/lib/module/modules/auth/sign-in/components/form/inputs.js.map +1 -1
  192. package/lib/module/modules/auth/sign-in/components/form/login-form-provider.js +48 -1
  193. package/lib/module/modules/auth/sign-in/components/form/login-form-provider.js.map +1 -1
  194. package/lib/module/modules/auth/sign-in/components/form/mfa-code-input.js +52 -0
  195. package/lib/module/modules/auth/sign-in/components/form/mfa-code-input.js.map +1 -0
  196. package/lib/module/modules/auth/sign-in/components/form/sign-in-with-email.js +2 -0
  197. package/lib/module/modules/auth/sign-in/components/form/sign-in-with-email.js.map +1 -1
  198. package/lib/module/modules/auth/sign-in/components/form/signin-button.js +13 -5
  199. package/lib/module/modules/auth/sign-in/components/form/signin-button.js.map +1 -1
  200. package/lib/module/modules/auth/types/session.js +2 -0
  201. package/lib/module/modules/auth/types/session.js.map +1 -0
  202. package/lib/module/modules/auth/utils/rate-limit.js +31 -0
  203. package/lib/module/modules/auth/utils/rate-limit.js.map +1 -0
  204. package/lib/module/modules/background-sync/android-bluetooth-foreground-service.js +3 -2
  205. package/lib/module/modules/background-sync/android-bluetooth-foreground-service.js.map +1 -1
  206. package/lib/module/modules/background-sync/background-safe-storage.js +74 -0
  207. package/lib/module/modules/background-sync/background-safe-storage.js.map +1 -0
  208. package/lib/module/modules/background-sync/index.js +1 -0
  209. package/lib/module/modules/background-sync/index.js.map +1 -1
  210. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +123 -21
  211. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  212. package/lib/module/modules/bt-management/hooks/runtime-context.js +82 -0
  213. package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -0
  214. package/lib/module/modules/bt-management/hooks/use-background-sync.js +41 -0
  215. package/lib/module/modules/bt-management/hooks/use-background-sync.js.map +1 -0
  216. package/lib/module/modules/bt-management/hooks/use-bluetooth-state.js +45 -0
  217. package/lib/module/modules/bt-management/hooks/use-bluetooth-state.js.map +1 -0
  218. package/lib/module/modules/bt-management/hooks/use-device-connection.js +30 -0
  219. package/lib/module/modules/bt-management/hooks/use-device-connection.js.map +1 -0
  220. package/lib/module/modules/bt-management/hooks/use-health-import.js +40 -0
  221. package/lib/module/modules/bt-management/hooks/use-health-import.js.map +1 -0
  222. package/lib/module/modules/bt-management/hooks/use-measurements.js +51 -0
  223. package/lib/module/modules/bt-management/hooks/use-measurements.js.map +1 -0
  224. package/lib/module/modules/bt-management/hooks/use-nearby-devices.js +20 -0
  225. package/lib/module/modules/bt-management/hooks/use-nearby-devices.js.map +1 -0
  226. package/lib/module/modules/bt-management/hooks/use-paired-devices.js +43 -0
  227. package/lib/module/modules/bt-management/hooks/use-paired-devices.js.map +1 -0
  228. package/lib/module/modules/bt-management/index.js +13 -0
  229. package/lib/module/modules/bt-management/index.js.map +1 -1
  230. package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js +41 -4
  231. package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
  232. package/lib/module/modules/bt-management/services/bt-manager.js +75 -4
  233. package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
  234. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +57 -0
  235. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  236. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +111 -3
  237. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  238. package/lib/module/modules/bt-management/services/devices/measurement-state-machine.js +5 -3
  239. package/lib/module/modules/bt-management/services/devices/measurement-state-machine.js.map +1 -1
  240. package/lib/module/modules/bt-management/services/devices/spo/spo2.main-services.js +12 -0
  241. package/lib/module/modules/bt-management/services/devices/spo/spo2.main-services.js.map +1 -1
  242. package/lib/module/modules/bt-management/testing/fake-ble-manager.js +48 -0
  243. package/lib/module/modules/bt-management/testing/fake-ble-manager.js.map +1 -0
  244. package/lib/module/modules/bt-management/testing/index.js +5 -0
  245. package/lib/module/modules/bt-management/testing/index.js.map +1 -0
  246. package/lib/module/modules/bt-management/testing/recorded-frames.js +17 -0
  247. package/lib/module/modules/bt-management/testing/recorded-frames.js.map +1 -0
  248. package/lib/module/modules/bt-management/types/bluetooth-error.js +74 -0
  249. package/lib/module/modules/bt-management/types/bluetooth-error.js.map +1 -0
  250. package/lib/module/modules/bt-management/types/device-connection-event.js +4 -0
  251. package/lib/module/modules/bt-management/types/device-connection-event.js.map +1 -0
  252. package/lib/module/modules/bt-management/types/result-policy.js +4 -0
  253. package/lib/module/modules/bt-management/types/result-policy.js.map +1 -0
  254. package/lib/module/modules/bt-management/utils/result-identity.js +57 -0
  255. package/lib/module/modules/bt-management/utils/result-identity.js.map +1 -0
  256. package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js +8 -2
  257. package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
  258. package/lib/module/modules/data-sync/services/base-health-sync-service.js +23 -4
  259. package/lib/module/modules/data-sync/services/base-health-sync-service.js.map +1 -1
  260. package/lib/module/modules/data-sync/services/managers/data-processor.js +2 -2
  261. package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
  262. package/lib/module/modules/data-sync/services/managers/sync-progress-manager.js +1 -1
  263. package/lib/module/modules/data-sync/services/managers/sync-progress-manager.js.map +1 -1
  264. package/lib/module/modules/data-sync/utils/retry-save.js +60 -0
  265. package/lib/module/modules/data-sync/utils/retry-save.js.map +1 -0
  266. package/lib/module/modules/helpers/form-items/form-field.js +2 -0
  267. package/lib/module/modules/helpers/form-items/form-field.js.map +1 -1
  268. package/lib/module/modules/helpers/index.js +1 -0
  269. package/lib/module/modules/helpers/index.js.map +1 -1
  270. package/lib/module/modules/helpers/utils/s-log.js +4 -12
  271. package/lib/module/modules/helpers/utils/s-log.js.map +1 -1
  272. package/lib/module/modules/helpers/utils/sentry-logger.js +26 -14
  273. package/lib/module/modules/helpers/utils/sentry-logger.js.map +1 -1
  274. package/lib/module/modules/helpers/utils/telemetry.js +131 -0
  275. package/lib/module/modules/helpers/utils/telemetry.js.map +1 -0
  276. package/lib/module/modules/image/components/optimized-image.js +25 -3
  277. package/lib/module/modules/image/components/optimized-image.js.map +1 -1
  278. package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-error.js +20 -11
  279. package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-error.js.map +1 -1
  280. package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js +3 -2
  281. package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js.map +1 -1
  282. package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js +4 -2
  283. package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js.map +1 -1
  284. package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js +42 -17
  285. package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
  286. package/lib/module/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js +2 -1
  287. package/lib/module/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js.map +1 -1
  288. package/lib/module/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.js.map +1 -1
  289. package/lib/module/modules/tile/components/task-icon.js +2 -1
  290. package/lib/module/modules/tile/components/task-icon.js.map +1 -1
  291. package/lib/module/modules/ui/components/background-sync-setting.js +107 -0
  292. package/lib/module/modules/ui/components/background-sync-setting.js.map +1 -0
  293. package/lib/module/modules/ui/components/bluetooth-state-notice.js +99 -0
  294. package/lib/module/modules/ui/components/bluetooth-state-notice.js.map +1 -0
  295. package/lib/module/modules/ui/components/ecg-strip-viewer.js +159 -0
  296. package/lib/module/modules/ui/components/ecg-strip-viewer.js.map +1 -0
  297. package/lib/module/modules/ui/components/health-import-card.js +124 -0
  298. package/lib/module/modules/ui/components/health-import-card.js.map +1 -0
  299. package/lib/module/modules/ui/components/manual-entry-form.js +117 -0
  300. package/lib/module/modules/ui/components/manual-entry-form.js.map +1 -0
  301. package/lib/module/modules/ui/components/pairing-flow.js +216 -0
  302. package/lib/module/modules/ui/components/pairing-flow.js.map +1 -0
  303. package/lib/module/modules/ui/components/supported-devices-catalog-list.js +93 -0
  304. package/lib/module/modules/ui/components/supported-devices-catalog-list.js.map +1 -0
  305. package/lib/module/modules/ui/components/urine-test-result.js +89 -0
  306. package/lib/module/modules/ui/components/urine-test-result.js.map +1 -0
  307. package/lib/module/modules/ui/index.js +13 -0
  308. package/lib/module/modules/ui/index.js.map +1 -0
  309. package/lib/module/modules/ui/types.js +4 -0
  310. package/lib/module/modules/ui/types.js.map +1 -0
  311. package/lib/module/modules/ui/use-ovok-ui.js +45 -0
  312. package/lib/module/modules/ui/use-ovok-ui.js.map +1 -0
  313. package/lib/typescript/commonjs/src/index.d.ts +1 -0
  314. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  315. package/lib/typescript/commonjs/src/modules/auth/delete-account-button/components/delete-account-button.d.ts.map +1 -1
  316. package/lib/typescript/commonjs/src/modules/auth/hooks/use-rate-limit-cooldown.d.ts +2 -0
  317. package/lib/typescript/commonjs/src/modules/auth/hooks/use-rate-limit-cooldown.d.ts.map +1 -0
  318. package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts +16 -0
  319. package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts.map +1 -0
  320. package/lib/typescript/commonjs/src/modules/auth/index.d.ts +4 -0
  321. package/lib/typescript/commonjs/src/modules/auth/index.d.ts.map +1 -1
  322. package/lib/typescript/commonjs/src/modules/auth/logout-button/components/logout-button.d.ts.map +1 -1
  323. package/lib/typescript/commonjs/src/modules/auth/register/components/form/inputs.d.ts.map +1 -1
  324. package/lib/typescript/commonjs/src/modules/auth/register/components/form/register-button.d.ts.map +1 -1
  325. package/lib/typescript/commonjs/src/modules/auth/register/components/form/register-form-provider.d.ts.map +1 -1
  326. package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/inputs.d.ts.map +1 -1
  327. package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-button.d.ts.map +1 -1
  328. package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts.map +1 -1
  329. package/lib/typescript/commonjs/src/modules/auth/session/components/session-list.d.ts +4 -0
  330. package/lib/typescript/commonjs/src/modules/auth/session/components/session-list.d.ts.map +1 -0
  331. package/lib/typescript/commonjs/src/modules/auth/session/events.d.ts +5 -0
  332. package/lib/typescript/commonjs/src/modules/auth/session/events.d.ts.map +1 -0
  333. package/lib/typescript/commonjs/src/modules/auth/session/index.d.ts +3 -0
  334. package/lib/typescript/commonjs/src/modules/auth/session/index.d.ts.map +1 -0
  335. package/lib/typescript/commonjs/src/modules/auth/session/types/session-list-props.d.ts +5 -0
  336. package/lib/typescript/commonjs/src/modules/auth/session/types/session-list-props.d.ts.map +1 -0
  337. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/inputs.d.ts.map +1 -1
  338. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/login-form-provider.d.ts.map +1 -1
  339. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts +9 -0
  340. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts.map +1 -0
  341. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts +4 -0
  342. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts.map +1 -1
  343. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/signin-button.d.ts.map +1 -1
  344. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/sign-in.d.ts +4 -0
  345. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/sign-in.d.ts.map +1 -1
  346. package/lib/typescript/commonjs/src/modules/auth/sign-in/contexts/login-form-context.d.ts +2 -46
  347. package/lib/typescript/commonjs/src/modules/auth/sign-in/contexts/login-form-context.d.ts.map +1 -1
  348. package/lib/typescript/commonjs/src/modules/auth/sign-in/hooks/use-login-form.d.ts +1 -47
  349. package/lib/typescript/commonjs/src/modules/auth/sign-in/hooks/use-login-form.d.ts.map +1 -1
  350. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/login-form-context-type.d.ts +11 -1
  351. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/login-form-context-type.d.ts.map +1 -1
  352. package/lib/typescript/commonjs/src/modules/auth/types/session.d.ts +13 -0
  353. package/lib/typescript/commonjs/src/modules/auth/types/session.d.ts.map +1 -0
  354. package/lib/typescript/commonjs/src/modules/auth/utils/rate-limit.d.ts +11 -0
  355. package/lib/typescript/commonjs/src/modules/auth/utils/rate-limit.d.ts.map +1 -0
  356. package/lib/typescript/commonjs/src/modules/background-sync/android-bluetooth-foreground-service.d.ts.map +1 -1
  357. package/lib/typescript/commonjs/src/modules/background-sync/background-safe-storage.d.ts +29 -0
  358. package/lib/typescript/commonjs/src/modules/background-sync/background-safe-storage.d.ts.map +1 -0
  359. package/lib/typescript/commonjs/src/modules/background-sync/index.d.ts +1 -0
  360. package/lib/typescript/commonjs/src/modules/background-sync/index.d.ts.map +1 -1
  361. package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  362. package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +46 -0
  363. package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -0
  364. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-background-sync.d.ts +14 -0
  365. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-background-sync.d.ts.map +1 -0
  366. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-state.d.ts +11 -0
  367. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-state.d.ts.map +1 -0
  368. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-device-connection.d.ts +7 -0
  369. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-device-connection.d.ts.map +1 -0
  370. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-health-import.d.ts +16 -0
  371. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-health-import.d.ts.map +1 -0
  372. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts +11 -0
  373. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -0
  374. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-devices.d.ts +8 -0
  375. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-devices.d.ts.map +1 -0
  376. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-paired-devices.d.ts +16 -0
  377. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-paired-devices.d.ts.map +1 -0
  378. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +13 -0
  379. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
  380. package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
  381. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +22 -0
  382. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  383. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +4 -0
  384. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  385. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +9 -1
  386. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  387. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/measurement-state-machine.d.ts +3 -2
  388. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/measurement-state-machine.d.ts.map +1 -1
  389. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/spo/spo2.main-services.d.ts.map +1 -1
  390. package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts +16 -0
  391. package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -0
  392. package/lib/typescript/commonjs/src/modules/bt-management/testing/index.d.ts +3 -0
  393. package/lib/typescript/commonjs/src/modules/bt-management/testing/index.d.ts.map +1 -0
  394. package/lib/typescript/commonjs/src/modules/bt-management/testing/recorded-frames.d.ts +12 -0
  395. package/lib/typescript/commonjs/src/modules/bt-management/testing/recorded-frames.d.ts.map +1 -0
  396. package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts +3 -1
  397. package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
  398. package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-error.d.ts +23 -0
  399. package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -0
  400. package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts +4 -0
  401. package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
  402. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts +4 -0
  403. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  404. package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts +16 -0
  405. package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -0
  406. package/lib/typescript/commonjs/src/modules/bt-management/types/error-callback.d.ts +5 -2
  407. package/lib/typescript/commonjs/src/modules/bt-management/types/error-callback.d.ts.map +1 -1
  408. package/lib/typescript/commonjs/src/modules/bt-management/types/i-bt-managed-device.d.ts +1 -0
  409. package/lib/typescript/commonjs/src/modules/bt-management/types/i-bt-managed-device.d.ts.map +1 -1
  410. package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts +2 -0
  411. package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
  412. package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts +8 -0
  413. package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts.map +1 -0
  414. package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts +10 -0
  415. package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts.map +1 -0
  416. package/lib/typescript/commonjs/src/modules/data-sync/components/android/android-health-connect-authorization-provider.d.ts.map +1 -1
  417. package/lib/typescript/commonjs/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
  418. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts +4 -0
  419. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
  420. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
  421. package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts +2 -0
  422. package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
  423. package/lib/typescript/commonjs/src/modules/data-sync/types/sync-progress.d.ts +1 -1
  424. package/lib/typescript/commonjs/src/modules/data-sync/types/sync-progress.d.ts.map +1 -1
  425. package/lib/typescript/commonjs/src/modules/data-sync/utils/retry-save.d.ts +5 -0
  426. package/lib/typescript/commonjs/src/modules/data-sync/utils/retry-save.d.ts.map +1 -0
  427. package/lib/typescript/commonjs/src/modules/helpers/form-items/form-field.d.ts +4 -1
  428. package/lib/typescript/commonjs/src/modules/helpers/form-items/form-field.d.ts.map +1 -1
  429. package/lib/typescript/commonjs/src/modules/helpers/index.d.ts +1 -0
  430. package/lib/typescript/commonjs/src/modules/helpers/index.d.ts.map +1 -1
  431. package/lib/typescript/commonjs/src/modules/helpers/utils/s-log.d.ts.map +1 -1
  432. package/lib/typescript/commonjs/src/modules/helpers/utils/sentry-logger.d.ts +7 -1
  433. package/lib/typescript/commonjs/src/modules/helpers/utils/sentry-logger.d.ts.map +1 -1
  434. package/lib/typescript/commonjs/src/modules/helpers/utils/telemetry.d.ts +68 -0
  435. package/lib/typescript/commonjs/src/modules/helpers/utils/telemetry.d.ts.map +1 -0
  436. package/lib/typescript/commonjs/src/modules/image/components/optimized-image.d.ts +1 -1
  437. package/lib/typescript/commonjs/src/modules/image/components/optimized-image.d.ts.map +1 -1
  438. package/lib/typescript/commonjs/src/modules/image/types/optimized-image-props.d.ts +4 -0
  439. package/lib/typescript/commonjs/src/modules/image/types/optimized-image-props.d.ts.map +1 -1
  440. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/content/questionnaire-content-error.d.ts.map +1 -1
  441. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.d.ts.map +1 -1
  442. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.d.ts.map +1 -1
  443. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts.map +1 -1
  444. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-navigation-provider.d.ts.map +1 -1
  445. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts +1 -0
  446. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts.map +1 -1
  447. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts +1 -0
  448. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts.map +1 -1
  449. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts +1 -0
  450. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts.map +1 -1
  451. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts +2 -0
  452. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts.map +1 -1
  453. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts +1 -0
  454. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts.map +1 -1
  455. package/lib/typescript/commonjs/src/modules/tile/components/task-icon.d.ts.map +1 -1
  456. package/lib/typescript/commonjs/src/modules/ui/components/background-sync-setting.d.ts +9 -0
  457. package/lib/typescript/commonjs/src/modules/ui/components/background-sync-setting.d.ts.map +1 -0
  458. package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts +12 -0
  459. package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -0
  460. package/lib/typescript/commonjs/src/modules/ui/components/ecg-strip-viewer.d.ts +17 -0
  461. package/lib/typescript/commonjs/src/modules/ui/components/ecg-strip-viewer.d.ts.map +1 -0
  462. package/lib/typescript/commonjs/src/modules/ui/components/health-import-card.d.ts +13 -0
  463. package/lib/typescript/commonjs/src/modules/ui/components/health-import-card.d.ts.map +1 -0
  464. package/lib/typescript/commonjs/src/modules/ui/components/manual-entry-form.d.ts +20 -0
  465. package/lib/typescript/commonjs/src/modules/ui/components/manual-entry-form.d.ts.map +1 -0
  466. package/lib/typescript/commonjs/src/modules/ui/components/pairing-flow.d.ts +15 -0
  467. package/lib/typescript/commonjs/src/modules/ui/components/pairing-flow.d.ts.map +1 -0
  468. package/lib/typescript/commonjs/src/modules/ui/components/supported-devices-catalog-list.d.ts +16 -0
  469. package/lib/typescript/commonjs/src/modules/ui/components/supported-devices-catalog-list.d.ts.map +1 -0
  470. package/lib/typescript/commonjs/src/modules/ui/components/urine-test-result.d.ts +10 -0
  471. package/lib/typescript/commonjs/src/modules/ui/components/urine-test-result.d.ts.map +1 -0
  472. package/lib/typescript/commonjs/src/modules/ui/index.d.ts +11 -0
  473. package/lib/typescript/commonjs/src/modules/ui/index.d.ts.map +1 -0
  474. package/lib/typescript/commonjs/src/modules/ui/types.d.ts +24 -0
  475. package/lib/typescript/commonjs/src/modules/ui/types.d.ts.map +1 -0
  476. package/lib/typescript/commonjs/src/modules/ui/use-ovok-ui.d.ts +7 -0
  477. package/lib/typescript/commonjs/src/modules/ui/use-ovok-ui.d.ts.map +1 -0
  478. package/lib/typescript/module/src/index.d.ts +1 -0
  479. package/lib/typescript/module/src/index.d.ts.map +1 -1
  480. package/lib/typescript/module/src/modules/auth/delete-account-button/components/delete-account-button.d.ts.map +1 -1
  481. package/lib/typescript/module/src/modules/auth/hooks/use-rate-limit-cooldown.d.ts +2 -0
  482. package/lib/typescript/module/src/modules/auth/hooks/use-rate-limit-cooldown.d.ts.map +1 -0
  483. package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts +16 -0
  484. package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts.map +1 -0
  485. package/lib/typescript/module/src/modules/auth/index.d.ts +4 -0
  486. package/lib/typescript/module/src/modules/auth/index.d.ts.map +1 -1
  487. package/lib/typescript/module/src/modules/auth/logout-button/components/logout-button.d.ts.map +1 -1
  488. package/lib/typescript/module/src/modules/auth/register/components/form/inputs.d.ts.map +1 -1
  489. package/lib/typescript/module/src/modules/auth/register/components/form/register-button.d.ts.map +1 -1
  490. package/lib/typescript/module/src/modules/auth/register/components/form/register-form-provider.d.ts.map +1 -1
  491. package/lib/typescript/module/src/modules/auth/reset-password/components/form/inputs.d.ts.map +1 -1
  492. package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-button.d.ts.map +1 -1
  493. package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts.map +1 -1
  494. package/lib/typescript/module/src/modules/auth/session/components/session-list.d.ts +4 -0
  495. package/lib/typescript/module/src/modules/auth/session/components/session-list.d.ts.map +1 -0
  496. package/lib/typescript/module/src/modules/auth/session/events.d.ts +5 -0
  497. package/lib/typescript/module/src/modules/auth/session/events.d.ts.map +1 -0
  498. package/lib/typescript/module/src/modules/auth/session/index.d.ts +3 -0
  499. package/lib/typescript/module/src/modules/auth/session/index.d.ts.map +1 -0
  500. package/lib/typescript/module/src/modules/auth/session/types/session-list-props.d.ts +5 -0
  501. package/lib/typescript/module/src/modules/auth/session/types/session-list-props.d.ts.map +1 -0
  502. package/lib/typescript/module/src/modules/auth/sign-in/components/form/inputs.d.ts.map +1 -1
  503. package/lib/typescript/module/src/modules/auth/sign-in/components/form/login-form-provider.d.ts.map +1 -1
  504. package/lib/typescript/module/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts +9 -0
  505. package/lib/typescript/module/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts.map +1 -0
  506. package/lib/typescript/module/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts +4 -0
  507. package/lib/typescript/module/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts.map +1 -1
  508. package/lib/typescript/module/src/modules/auth/sign-in/components/form/signin-button.d.ts.map +1 -1
  509. package/lib/typescript/module/src/modules/auth/sign-in/components/sign-in.d.ts +4 -0
  510. package/lib/typescript/module/src/modules/auth/sign-in/components/sign-in.d.ts.map +1 -1
  511. package/lib/typescript/module/src/modules/auth/sign-in/contexts/login-form-context.d.ts +2 -46
  512. package/lib/typescript/module/src/modules/auth/sign-in/contexts/login-form-context.d.ts.map +1 -1
  513. package/lib/typescript/module/src/modules/auth/sign-in/hooks/use-login-form.d.ts +1 -47
  514. package/lib/typescript/module/src/modules/auth/sign-in/hooks/use-login-form.d.ts.map +1 -1
  515. package/lib/typescript/module/src/modules/auth/sign-in/types/login-form-context-type.d.ts +11 -1
  516. package/lib/typescript/module/src/modules/auth/sign-in/types/login-form-context-type.d.ts.map +1 -1
  517. package/lib/typescript/module/src/modules/auth/types/session.d.ts +13 -0
  518. package/lib/typescript/module/src/modules/auth/types/session.d.ts.map +1 -0
  519. package/lib/typescript/module/src/modules/auth/utils/rate-limit.d.ts +11 -0
  520. package/lib/typescript/module/src/modules/auth/utils/rate-limit.d.ts.map +1 -0
  521. package/lib/typescript/module/src/modules/background-sync/android-bluetooth-foreground-service.d.ts.map +1 -1
  522. package/lib/typescript/module/src/modules/background-sync/background-safe-storage.d.ts +29 -0
  523. package/lib/typescript/module/src/modules/background-sync/background-safe-storage.d.ts.map +1 -0
  524. package/lib/typescript/module/src/modules/background-sync/index.d.ts +1 -0
  525. package/lib/typescript/module/src/modules/background-sync/index.d.ts.map +1 -1
  526. package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  527. package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +46 -0
  528. package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -0
  529. package/lib/typescript/module/src/modules/bt-management/hooks/use-background-sync.d.ts +14 -0
  530. package/lib/typescript/module/src/modules/bt-management/hooks/use-background-sync.d.ts.map +1 -0
  531. package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-state.d.ts +11 -0
  532. package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-state.d.ts.map +1 -0
  533. package/lib/typescript/module/src/modules/bt-management/hooks/use-device-connection.d.ts +7 -0
  534. package/lib/typescript/module/src/modules/bt-management/hooks/use-device-connection.d.ts.map +1 -0
  535. package/lib/typescript/module/src/modules/bt-management/hooks/use-health-import.d.ts +16 -0
  536. package/lib/typescript/module/src/modules/bt-management/hooks/use-health-import.d.ts.map +1 -0
  537. package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts +11 -0
  538. package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -0
  539. package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-devices.d.ts +8 -0
  540. package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-devices.d.ts.map +1 -0
  541. package/lib/typescript/module/src/modules/bt-management/hooks/use-paired-devices.d.ts +16 -0
  542. package/lib/typescript/module/src/modules/bt-management/hooks/use-paired-devices.d.ts.map +1 -0
  543. package/lib/typescript/module/src/modules/bt-management/index.d.ts +13 -0
  544. package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
  545. package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
  546. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +22 -0
  547. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  548. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +4 -0
  549. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  550. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +9 -1
  551. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  552. package/lib/typescript/module/src/modules/bt-management/services/devices/measurement-state-machine.d.ts +3 -2
  553. package/lib/typescript/module/src/modules/bt-management/services/devices/measurement-state-machine.d.ts.map +1 -1
  554. package/lib/typescript/module/src/modules/bt-management/services/devices/spo/spo2.main-services.d.ts.map +1 -1
  555. package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts +16 -0
  556. package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -0
  557. package/lib/typescript/module/src/modules/bt-management/testing/index.d.ts +3 -0
  558. package/lib/typescript/module/src/modules/bt-management/testing/index.d.ts.map +1 -0
  559. package/lib/typescript/module/src/modules/bt-management/testing/recorded-frames.d.ts +12 -0
  560. package/lib/typescript/module/src/modules/bt-management/testing/recorded-frames.d.ts.map +1 -0
  561. package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts +3 -1
  562. package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
  563. package/lib/typescript/module/src/modules/bt-management/types/bluetooth-error.d.ts +23 -0
  564. package/lib/typescript/module/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -0
  565. package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts +4 -0
  566. package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
  567. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts +4 -0
  568. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  569. package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts +16 -0
  570. package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -0
  571. package/lib/typescript/module/src/modules/bt-management/types/error-callback.d.ts +5 -2
  572. package/lib/typescript/module/src/modules/bt-management/types/error-callback.d.ts.map +1 -1
  573. package/lib/typescript/module/src/modules/bt-management/types/i-bt-managed-device.d.ts +1 -0
  574. package/lib/typescript/module/src/modules/bt-management/types/i-bt-managed-device.d.ts.map +1 -1
  575. package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts +2 -0
  576. package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
  577. package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts +8 -0
  578. package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts.map +1 -0
  579. package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts +10 -0
  580. package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts.map +1 -0
  581. package/lib/typescript/module/src/modules/data-sync/components/android/android-health-connect-authorization-provider.d.ts.map +1 -1
  582. package/lib/typescript/module/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
  583. package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts +4 -0
  584. package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
  585. package/lib/typescript/module/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
  586. package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts +2 -0
  587. package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
  588. package/lib/typescript/module/src/modules/data-sync/types/sync-progress.d.ts +1 -1
  589. package/lib/typescript/module/src/modules/data-sync/types/sync-progress.d.ts.map +1 -1
  590. package/lib/typescript/module/src/modules/data-sync/utils/retry-save.d.ts +5 -0
  591. package/lib/typescript/module/src/modules/data-sync/utils/retry-save.d.ts.map +1 -0
  592. package/lib/typescript/module/src/modules/helpers/form-items/form-field.d.ts +4 -1
  593. package/lib/typescript/module/src/modules/helpers/form-items/form-field.d.ts.map +1 -1
  594. package/lib/typescript/module/src/modules/helpers/index.d.ts +1 -0
  595. package/lib/typescript/module/src/modules/helpers/index.d.ts.map +1 -1
  596. package/lib/typescript/module/src/modules/helpers/utils/s-log.d.ts.map +1 -1
  597. package/lib/typescript/module/src/modules/helpers/utils/sentry-logger.d.ts +7 -1
  598. package/lib/typescript/module/src/modules/helpers/utils/sentry-logger.d.ts.map +1 -1
  599. package/lib/typescript/module/src/modules/helpers/utils/telemetry.d.ts +68 -0
  600. package/lib/typescript/module/src/modules/helpers/utils/telemetry.d.ts.map +1 -0
  601. package/lib/typescript/module/src/modules/image/components/optimized-image.d.ts +1 -1
  602. package/lib/typescript/module/src/modules/image/components/optimized-image.d.ts.map +1 -1
  603. package/lib/typescript/module/src/modules/image/types/optimized-image-props.d.ts +4 -0
  604. package/lib/typescript/module/src/modules/image/types/optimized-image-props.d.ts.map +1 -1
  605. package/lib/typescript/module/src/modules/questionnaire-response-form/components/content/questionnaire-content-error.d.ts.map +1 -1
  606. package/lib/typescript/module/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.d.ts.map +1 -1
  607. package/lib/typescript/module/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.d.ts.map +1 -1
  608. package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts.map +1 -1
  609. package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-navigation-provider.d.ts.map +1 -1
  610. package/lib/typescript/module/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts +1 -0
  611. package/lib/typescript/module/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts.map +1 -1
  612. package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts +1 -0
  613. package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts.map +1 -1
  614. package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts +1 -0
  615. package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts.map +1 -1
  616. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts +2 -0
  617. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts.map +1 -1
  618. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts +1 -0
  619. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts.map +1 -1
  620. package/lib/typescript/module/src/modules/tile/components/task-icon.d.ts.map +1 -1
  621. package/lib/typescript/module/src/modules/ui/components/background-sync-setting.d.ts +9 -0
  622. package/lib/typescript/module/src/modules/ui/components/background-sync-setting.d.ts.map +1 -0
  623. package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts +12 -0
  624. package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -0
  625. package/lib/typescript/module/src/modules/ui/components/ecg-strip-viewer.d.ts +17 -0
  626. package/lib/typescript/module/src/modules/ui/components/ecg-strip-viewer.d.ts.map +1 -0
  627. package/lib/typescript/module/src/modules/ui/components/health-import-card.d.ts +13 -0
  628. package/lib/typescript/module/src/modules/ui/components/health-import-card.d.ts.map +1 -0
  629. package/lib/typescript/module/src/modules/ui/components/manual-entry-form.d.ts +20 -0
  630. package/lib/typescript/module/src/modules/ui/components/manual-entry-form.d.ts.map +1 -0
  631. package/lib/typescript/module/src/modules/ui/components/pairing-flow.d.ts +15 -0
  632. package/lib/typescript/module/src/modules/ui/components/pairing-flow.d.ts.map +1 -0
  633. package/lib/typescript/module/src/modules/ui/components/supported-devices-catalog-list.d.ts +16 -0
  634. package/lib/typescript/module/src/modules/ui/components/supported-devices-catalog-list.d.ts.map +1 -0
  635. package/lib/typescript/module/src/modules/ui/components/urine-test-result.d.ts +10 -0
  636. package/lib/typescript/module/src/modules/ui/components/urine-test-result.d.ts.map +1 -0
  637. package/lib/typescript/module/src/modules/ui/index.d.ts +11 -0
  638. package/lib/typescript/module/src/modules/ui/index.d.ts.map +1 -0
  639. package/lib/typescript/module/src/modules/ui/types.d.ts +24 -0
  640. package/lib/typescript/module/src/modules/ui/types.d.ts.map +1 -0
  641. package/lib/typescript/module/src/modules/ui/use-ovok-ui.d.ts +7 -0
  642. package/lib/typescript/module/src/modules/ui/use-ovok-ui.d.ts.map +1 -0
  643. package/package.json +145 -6
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+
3
+ /* eslint-disable import/group-exports */
4
+
5
+ import * as React from "react";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ const RuntimeContext = /*#__PURE__*/React.createContext(null);
8
+ export const createBluetoothRuntime = bleManager => {
9
+ const listeners = new Map();
10
+ let currentManager;
11
+ let currentDevices = [];
12
+ const subscribers = new Set();
13
+ return {
14
+ bleManager,
15
+ get manager() {
16
+ return currentManager;
17
+ },
18
+ get devices() {
19
+ return currentDevices;
20
+ },
21
+ subscribe: (event, callback) => {
22
+ const eventListeners = listeners.get(event) ?? new Set();
23
+ eventListeners.add(callback);
24
+ listeners.set(event, eventListeners);
25
+ return () => eventListeners.delete(callback);
26
+ },
27
+ hasListeners: event => (listeners.get(event)?.size ?? 0) > 0,
28
+ emit: (event, value) => {
29
+ listeners.get(event)?.forEach(callback => callback(value));
30
+ subscribers.forEach(notify => notify());
31
+ },
32
+ setManager: manager => {
33
+ currentManager = manager;
34
+ subscribers.forEach(notify => notify());
35
+ },
36
+ upsertDevice: device => {
37
+ const existing = currentDevices.findIndex(item => item.id === device.id);
38
+ const next = {
39
+ id: device.id,
40
+ deviceData: device.deviceData,
41
+ device,
42
+ status: existing === -1 ? undefined : currentDevices[existing]?.status
43
+ };
44
+ currentDevices = existing === -1 ? [...currentDevices, next] : currentDevices.map((item, index) => index === existing ? next : item);
45
+ subscribers.forEach(notify => notify());
46
+ },
47
+ setDeviceStatus: ({
48
+ deviceData,
49
+ status
50
+ }) => {
51
+ currentDevices = currentDevices.map(item => item.id === deviceData.id ? {
52
+ ...item,
53
+ deviceData,
54
+ status
55
+ } : item);
56
+ subscribers.forEach(notify => notify());
57
+ }
58
+ };
59
+ };
60
+ export const BluetoothRuntimeProvider = ({
61
+ runtime,
62
+ children
63
+ }) => /*#__PURE__*/_jsx(RuntimeContext.Provider, {
64
+ value: runtime,
65
+ children: children
66
+ });
67
+ export const useBluetoothRuntime = () => {
68
+ const runtime = React.useContext(RuntimeContext);
69
+ if (!runtime) {
70
+ throw new Error("Bluetooth hooks must be rendered inside BTProvider");
71
+ }
72
+ return runtime;
73
+ };
74
+ export const useRuntimeEvent = (event, callback) => {
75
+ const runtime = useBluetoothRuntime();
76
+ const callbackRef = React.useRef(callback);
77
+ callbackRef.current = callback;
78
+ React.useEffect(() => runtime.subscribe(event, value => callbackRef.current(value)), [event, runtime]);
79
+ };
80
+
81
+ /** Typed union exposed when a host listens to every accepted device. */
82
+ //# sourceMappingURL=runtime-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","jsx","_jsx","RuntimeContext","createContext","createBluetoothRuntime","bleManager","listeners","Map","currentManager","currentDevices","subscribers","Set","manager","devices","subscribe","event","callback","eventListeners","get","add","set","delete","hasListeners","size","emit","value","forEach","notify","setManager","upsertDevice","device","existing","findIndex","item","id","next","deviceData","status","undefined","map","index","setDeviceStatus","BluetoothRuntimeProvider","runtime","children","Provider","useBluetoothRuntime","useContext","Error","useRuntimeEvent","callbackRef","useRef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;EACvCC,OAAO;EACPC;AACsD,CAAC,kBACvD3C,IAAA,CAACC,cAAc,CAAC2C,QAAQ;EAACpB,KAAK,EAAEkB,OAAQ;EAAAC,QAAA,EAAEA;AAAQ,CAA0B,CAC7E;AAED,OAAO,MAAME,mBAAmB,GAAGA,CAAA,KAAwB;EACzD,MAAMH,OAAO,GAAG5C,KAAK,CAACgD,UAAU,CAAC7C,cAAc,CAAC;EAEhD,IAAI,CAACyC,OAAO,EAAE;IACZ,MAAM,IAAIK,KAAK,CAAC,oDAAoD,CAAC;EACvE;EAEA,OAAOL,OAAO;AAChB,CAAC;AAED,OAAO,MAAMM,eAAe,GAAGA,CAC7BlC,KAAmB,EACnBC,QAA4B,KACnB;EACT,MAAM2B,OAAO,GAAGG,mBAAmB,CAAC,CAAC;EACrC,MAAMI,WAAW,GAAGnD,KAAK,CAACoD,MAAM,CAACnC,QAAQ,CAAC;EAE1CkC,WAAW,CAACE,OAAO,GAAGpC,QAAQ;EAE9BjB,KAAK,CAACsD,SAAS,CACb,MAAMV,OAAO,CAAC7B,SAAS,CAAIC,KAAK,EAAGU,KAAK,IAAKyB,WAAW,CAACE,OAAO,CAAC3B,KAAK,CAAC,CAAC,EACxE,CAACV,KAAK,EAAE4B,OAAO,CACjB,CAAC;AACH,CAAC;;AAED","ignoreList":[]}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ /* eslint-disable import/group-exports */
4
+
5
+ import * as React from "react";
6
+ import { useBluetoothRuntime } from "./runtime-context.js";
7
+ export const useBackgroundSync = ({
8
+ enabled: initialEnabled = false,
9
+ canEnable,
10
+ onEnabledChange
11
+ } = {}) => {
12
+ const runtime = useBluetoothRuntime();
13
+ const [enabled, setEnabledState] = React.useState(initialEnabled);
14
+ const [error, setError] = React.useState();
15
+ const [status, setStatus] = React.useState(initialEnabled ? "on" : "off");
16
+ const setEnabled = React.useCallback(async next => {
17
+ setError(undefined);
18
+ if (next && canEnable && !(await canEnable())) {
19
+ setStatus("restricted");
20
+ return;
21
+ }
22
+ try {
23
+ runtime.manager?.setBackgroundScanEnabled(next);
24
+ await onEnabledChange?.(next);
25
+ setEnabledState(next);
26
+ setStatus(next ? "on" : "off");
27
+ } catch (cause) {
28
+ const nextError = cause instanceof Error ? cause : new Error(String(cause));
29
+ setError(nextError);
30
+ setStatus("blocked");
31
+ }
32
+ }, [canEnable, onEnabledChange, runtime]);
33
+ return {
34
+ enabled,
35
+ setEnabled,
36
+ status,
37
+ error,
38
+ reason: status === "restricted" ? "background access is restricted" : undefined
39
+ };
40
+ };
41
+ //# sourceMappingURL=use-background-sync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useBluetoothRuntime","useBackgroundSync","enabled","initialEnabled","canEnable","onEnabledChange","runtime","setEnabledState","useState","error","setError","status","setStatus","setEnabled","useCallback","next","undefined","manager","setBackgroundScanEnabled","cause","nextError","Error","String","reason"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-background-sync.ts"],"mappings":";;AAAA;;AAEA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,mBAAmB,QAAQ,sBAAmB;AAUvD,OAAO,MAAMC,iBAAiB,GAAGA,CAAC;EAChCC,OAAO,EAAEC,cAAc,GAAG,KAAK;EAC/BC,SAAS;EACTC;AACwB,CAAC,GAAG,CAAC,CAAC,KAM3B;EACH,MAAMC,OAAO,GAAGN,mBAAmB,CAAC,CAAC;EACrC,MAAM,CAACE,OAAO,EAAEK,eAAe,CAAC,GAAGR,KAAK,CAACS,QAAQ,CAACL,cAAc,CAAC;EACjE,MAAM,CAACM,KAAK,EAAEC,QAAQ,CAAC,GAAGX,KAAK,CAACS,QAAQ,CAAQ,CAAC;EAEjD,MAAM,CAACG,MAAM,EAAEC,SAAS,CAAC,GAAGb,KAAK,CAACS,QAAQ,CACxCL,cAAc,GAAG,IAAI,GAAG,KAC1B,CAAC;EAED,MAAMU,UAAU,GAAGd,KAAK,CAACe,WAAW,CAAC,MAAOC,IAAa,IAAK;IAC5DL,QAAQ,CAACM,SAAS,CAAC;IACnB,IAAID,IAAI,IAAIX,SAAS,IAAI,EAAE,MAAMA,SAAS,CAAC,CAAC,CAAC,EAAE;MAC7CQ,SAAS,CAAC,YAAY,CAAC;MAEvB;IACF;IACA,IAAI;MACFN,OAAO,CAACW,OAAO,EAAEC,wBAAwB,CAACH,IAAI,CAAC;MAC/C,MAAMV,eAAe,GAAGU,IAAI,CAAC;MAC7BR,eAAe,CAACQ,IAAI,CAAC;MACrBH,SAAS,CAACG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IAChC,CAAC,CAAC,OAAOI,KAAK,EAAE;MACd,MAAMC,SAAS,GAAGD,KAAK,YAAYE,KAAK,GAAGF,KAAK,GAAG,IAAIE,KAAK,CAACC,MAAM,CAACH,KAAK,CAAC,CAAC;MAE3ET,QAAQ,CAACU,SAAS,CAAC;MACnBR,SAAS,CAAC,SAAS,CAAC;IACtB;EACF,CAAC,EAAE,CAACR,SAAS,EAAEC,eAAe,EAAEC,OAAO,CAAC,CAAC;EAEzC,OAAO;IAAEJ,OAAO;IAAEW,UAAU;IAAEF,MAAM;IAAEF,KAAK;IAAEc,MAAM,EAAEZ,MAAM,KAAK,YAAY,GAAG,iCAAiC,GAAGK;EAAU,CAAC;AAChI,CAAC","ignoreList":[]}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ /* eslint-disable import/group-exports */
4
+
5
+ import * as React from "react";
6
+ import { Platform } from "react-native";
7
+ import { State } from "react-native-ble-plx";
8
+ import { PERMISSIONS, requestMultiple } from "react-native-permissions";
9
+ const requestBluetoothPermission = async () => {
10
+ const permissions = Platform.select({
11
+ android: [PERMISSIONS.ANDROID.BLUETOOTH_SCAN, PERMISSIONS.ANDROID.BLUETOOTH_CONNECT],
12
+ ios: [PERMISSIONS.IOS.BLUETOOTH],
13
+ default: []
14
+ });
15
+ const result = await requestMultiple(permissions);
16
+ return Object.values(result).every(value => value === "granted");
17
+ };
18
+ export const useBluetoothState = ({
19
+ bleManager,
20
+ requestPermission = requestBluetoothPermission
21
+ } = {}) => {
22
+ const [state, setState] = React.useState(bleManager ? "off" : "unsupported");
23
+ React.useEffect(() => {
24
+ if (!bleManager) {
25
+ setState("unsupported");
26
+ return;
27
+ }
28
+ const subscription = bleManager.onStateChange(nextState => {
29
+ setState(nextState === State.PoweredOn ? "on" : nextState === State.Unsupported ? "unsupported" : nextState === State.Unauthorized ? "unauthorized" : "off");
30
+ }, true);
31
+ return () => subscription.remove();
32
+ }, [bleManager]);
33
+ const request = React.useCallback(async () => {
34
+ const granted = await requestPermission();
35
+ if (!granted) {
36
+ setState("unauthorized");
37
+ }
38
+ return granted;
39
+ }, [requestPermission]);
40
+ return {
41
+ state,
42
+ requestPermission: request
43
+ };
44
+ };
45
+ //# sourceMappingURL=use-bluetooth-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Platform","State","PERMISSIONS","requestMultiple","requestBluetoothPermission","permissions","select","android","ANDROID","BLUETOOTH_SCAN","BLUETOOTH_CONNECT","ios","IOS","BLUETOOTH","default","result","Object","values","every","value","useBluetoothState","bleManager","requestPermission","state","setState","useState","useEffect","subscription","onStateChange","nextState","PoweredOn","Unsupported","Unauthorized","remove","request","useCallback","granted"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-bluetooth-state.ts"],"mappings":";;AAAA;;AAEA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAAqBC,KAAK,QAAQ,sBAAsB;AACxD,SAASC,WAAW,EAAEC,eAAe,QAAQ,0BAA0B;AASvE,MAAMC,0BAA0B,GAAG,MAAAA,CAAA,KAA8B;EAC/D,MAAMC,WAAW,GAAGL,QAAQ,CAACM,MAAM,CAAC;IAClCC,OAAO,EAAE,CACPL,WAAW,CAACM,OAAO,CAACC,cAAc,EAClCP,WAAW,CAACM,OAAO,CAACE,iBAAiB,CACtC;IACDC,GAAG,EAAE,CAACT,WAAW,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KAAK;IAAED,iBAAiB,EAAEY;EAAQ,CAAC;AAC9C,CAAC","ignoreList":[]}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ import * as React from "react";
4
+ import { useBluetoothRuntime } from "./runtime-context.js";
5
+ export const useDeviceConnection = id => {
6
+ const runtime = useBluetoothRuntime();
7
+ const [status, setStatus] = React.useState(() => runtime.devices.find(device => device.id === id)?.status);
8
+ const [events, setEvents] = React.useState([]);
9
+ React.useEffect(() => {
10
+ const unsubStatus = runtime.subscribe("status", value => {
11
+ if (value.deviceData.id === id) {
12
+ setStatus(value.status);
13
+ }
14
+ });
15
+ const unsubEvent = runtime.subscribe("connection", event => {
16
+ if (event.deviceData.id === id) {
17
+ setEvents(current => [...current, event]);
18
+ }
19
+ });
20
+ return () => {
21
+ unsubStatus();
22
+ unsubEvent();
23
+ };
24
+ }, [id, runtime]);
25
+ return {
26
+ status,
27
+ events
28
+ };
29
+ };
30
+ //# sourceMappingURL=use-device-connection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useBluetoothRuntime","useDeviceConnection","id","runtime","status","setStatus","useState","devices","find","device","events","setEvents","useEffect","unsubStatus","subscribe","value","deviceData","unsubEvent","event","current"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-device-connection.ts"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAK9B,SAASC,mBAAmB,QAAQ,sBAAmB;AAEvD,OAAO,MAAMC,mBAAmB,GAC9BC,EAAW,IAC6D;EACxE,MAAMC,OAAO,GAAGH,mBAAmB,CAAC,CAAC;EAErC,MAAM,CAACI,MAAM,EAAEC,SAAS,CAAC,GAAGN,KAAK,CAACO,QAAQ,CACxC,MAAMH,OAAO,CAACI,OAAO,CAACC,IAAI,CAAEC,MAAM,IAAKA,MAAM,CAACP,EAAE,KAAKA,EAAE,CAAC,EAAEE,MAC5D,CAAC;EAED,MAAM,CAACM,MAAM,EAAEC,SAAS,CAAC,GAAGZ,KAAK,CAACO,QAAQ,CAAmC,EAAE,CAAC;EAEhFP,KAAK,CAACa,SAAS,CAAC,MAAM;IACpB,MAAMC,WAAW,GAAGV,OAAO,CAACW,SAAS,CACnC,QAAQ,EACPC,KAAK,IAAK;MACT,IAAIA,KAAK,CAACC,UAAU,CAACd,EAAE,KAAKA,EAAE,EAAE;QAACG,SAAS,CAACU,KAAK,CAACX,MAAM,CAAC;MAAC;IAC3D,CACF,CAAC;IAED,MAAMa,UAAU,GAAGd,OAAO,CAACW,SAAS,CAAwB,YAAY,EAAGI,KAAK,IAAK;MACnF,IAAIA,KAAK,CAACF,UAAU,CAACd,EAAE,KAAKA,EAAE,EAAE;QAACS,SAAS,CAAEQ,OAAO,IAAK,CAAC,GAAGA,OAAO,EAAED,KAAK,CAAC,CAAC;MAAC;IAC/E,CAAC,CAAC;IAEF,OAAO,MAAM;MACXL,WAAW,CAAC,CAAC;MACbI,UAAU,CAAC,CAAC;IACd,CAAC;EACH,CAAC,EAAE,CAACf,EAAE,EAAEC,OAAO,CAAC,CAAC;EAEjB,OAAO;IAAEC,MAAM;IAAEM;EAAO,CAAC;AAC3B,CAAC","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ import * as React from "react";
4
+ export const useHealthImport = ({
5
+ types,
6
+ background = false,
7
+ adapter
8
+ }) => {
9
+ const [enabled, setEnabled] = React.useState(false);
10
+ const [statusByType, setStatusByType] = React.useState({});
11
+ const [error, setError] = React.useState();
12
+ const refresh = React.useCallback(async () => {
13
+ try {
14
+ const entries = await Promise.all(types.map(async type => [type, await adapter.getStatus(type)]));
15
+ setStatusByType(Object.fromEntries(entries));
16
+ } catch (cause) {
17
+ setError(cause instanceof Error ? cause : new Error(String(cause)));
18
+ }
19
+ }, [adapter, types]);
20
+ React.useEffect(() => {
21
+ void refresh();
22
+ }, [refresh]);
23
+ const setEnabledForTypes = React.useCallback(async next => {
24
+ setError(undefined);
25
+ if (next) {
26
+ await adapter.request(types, background);
27
+ await refresh();
28
+ }
29
+ setEnabled(next);
30
+ }, [adapter, background, refresh, types]);
31
+ const notShared = types.filter(type => statusByType[type] === "refused");
32
+ return {
33
+ enabled,
34
+ setEnabled: setEnabledForTypes,
35
+ statusByType: statusByType,
36
+ notShared,
37
+ error
38
+ };
39
+ };
40
+ //# sourceMappingURL=use-health-import.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useHealthImport","types","background","adapter","enabled","setEnabled","useState","statusByType","setStatusByType","error","setError","refresh","useCallback","entries","Promise","all","map","type","getStatus","Object","fromEntries","cause","Error","String","useEffect","setEnabledForTypes","next","undefined","request","notShared","filter"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-health-import.ts"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAO9B,OAAO,MAAMC,eAAe,GAAGA,CAAuB;EACpDC,KAAK;EACLC,UAAU,GAAG,KAAK;EAClBC;AAKF,CAAC,KAMI;EACH,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGN,KAAK,CAACO,QAAQ,CAAC,KAAK,CAAC;EACnD,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGT,KAAK,CAACO,QAAQ,CAAyB,CAAC,CAAC,CAAC;EAClF,MAAM,CAACG,KAAK,EAAEC,QAAQ,CAAC,GAAGX,KAAK,CAACO,QAAQ,CAAQ,CAAC;EAEjD,MAAMK,OAAO,GAAGZ,KAAK,CAACa,WAAW,CAAC,YAAY;IAC5C,IAAI;MACF,MAAMC,OAAO,GAAG,MAAMC,OAAO,CAACC,GAAG,CAACd,KAAK,CAACe,GAAG,CAAC,MAAOC,IAAI,IAAK,CAACA,IAAI,EAAE,MAAMd,OAAO,CAACe,SAAS,CAACD,IAAI,CAAC,CAAU,CAAC,CAAC;MAE5GT,eAAe,CAACW,MAAM,CAACC,WAAW,CAACP,OAAO,CAAC,CAAC;IAC9C,CAAC,CAAC,OAAOQ,KAAK,EAAE;MACdX,QAAQ,CAACW,KAAK,YAAYC,KAAK,GAAGD,KAAK,GAAG,IAAIC,KAAK,CAACC,MAAM,CAACF,KAAK,CAAC,CAAC,CAAC;IACrE;EACF,CAAC,EAAE,CAAClB,OAAO,EAAEF,KAAK,CAAC,CAAC;EAEpBF,KAAK,CAACyB,SAAS,CAAC,MAAM;IAAE,KAAKb,OAAO,CAAC,CAAC;EAAE,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAErD,MAAMc,kBAAkB,GAAG1B,KAAK,CAACa,WAAW,CAAC,MAAOc,IAAa,IAAK;IACpEhB,QAAQ,CAACiB,SAAS,CAAC;IACnB,IAAID,IAAI,EAAE;MACR,MAAMvB,OAAO,CAACyB,OAAO,CAAC3B,KAAK,EAAEC,UAAU,CAAC;MACxC,MAAMS,OAAO,CAAC,CAAC;IACjB;IACAN,UAAU,CAACqB,IAAI,CAAC;EAClB,CAAC,EAAE,CAACvB,OAAO,EAAED,UAAU,EAAES,OAAO,EAAEV,KAAK,CAAC,CAAC;EAEzC,MAAM4B,SAAS,GAAG5B,KAAK,CAAC6B,MAAM,CAAEb,IAAI,IAAKV,YAAY,CAACU,IAAI,CAAC,KAAK,SAAS,CAAC;EAE1E,OAAO;IAAEb,OAAO;IAAEC,UAAU,EAAEoB,kBAAkB;IAAElB,YAAY,EAAEA,YAAqB;IAAEsB,SAAS;IAAEpB;EAAM,CAAC;AAC3G,CAAC","ignoreList":[]}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ import * as React from "react";
4
+ import { useBluetoothRuntime } from "./runtime-context.js";
5
+ export const useMeasurements = (onResult, {
6
+ policy = "all",
7
+ maxResults = 100
8
+ } = {}) => {
9
+ const runtime = useBluetoothRuntime();
10
+ const [measurements, setMeasurements] = React.useState([]);
11
+ const seen = React.useRef(new Set());
12
+ const onResultRef = React.useRef(onResult);
13
+ onResultRef.current = onResult;
14
+ React.useEffect(() => {
15
+ return runtime.subscribe("result", result => {
16
+ if (seen.current.has(result.id)) {
17
+ return;
18
+ }
19
+ seen.current.add(result.id);
20
+ setMeasurements(current => [...current, result].slice(-maxResults));
21
+ onResultRef.current?.(result);
22
+ });
23
+ }, [maxResults, runtime]);
24
+
25
+ // The manager applies device policies at source; this is a host-side guard for
26
+ // consumers that want a single stream policy without changing the scan config.
27
+ React.useEffect(() => {
28
+ if (policy === "all") {
29
+ return;
30
+ }
31
+ setMeasurements(current => {
32
+ const byKind = new Set();
33
+ return current.filter(result => {
34
+ const key = String(result.data.measurementTypeKey);
35
+ if (policy === "first-reading-per-kind-per-connection" && byKind.has(key)) {
36
+ return false;
37
+ }
38
+ byKind.add(key);
39
+ return true;
40
+ });
41
+ });
42
+ }, [policy]);
43
+ return {
44
+ measurements,
45
+ clear: () => {
46
+ seen.current.clear();
47
+ setMeasurements([]);
48
+ }
49
+ };
50
+ };
51
+ //# sourceMappingURL=use-measurements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useBluetoothRuntime","useMeasurements","onResult","policy","maxResults","runtime","measurements","setMeasurements","useState","seen","useRef","Set","onResultRef","current","useEffect","subscribe","result","has","id","add","slice","byKind","filter","key","String","data","measurementTypeKey","clear"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-measurements.ts"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAI9B,SAAwBC,mBAAmB,QAAQ,sBAAmB;AAOtE,OAAO,MAAMC,eAAe,GAAGA,CAC7BC,QAA0C,EAC1C;EAAEC,MAAM,GAAG,KAAK;EAAEC,UAAU,GAAG;AAA4B,CAAC,GAAG,CAAC,CAAC,KACC;EAClE,MAAMC,OAAO,GAAGL,mBAAmB,CAAC,CAAC;EACrC,MAAM,CAACM,YAAY,EAAEC,eAAe,CAAC,GAAGR,KAAK,CAACS,QAAQ,CAA2B,EAAE,CAAC;EACpF,MAAMC,IAAI,GAAGV,KAAK,CAACW,MAAM,CAAC,IAAIC,GAAG,CAAS,CAAC,CAAC;EAC5C,MAAMC,WAAW,GAAGb,KAAK,CAACW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AC,CAAC;MAAEpB,eAAe,CAAC,EAAE,CAAC;IAAE;EAAE,CAAC;AACtF,CAAC","ignoreList":[]}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ import * as React from "react";
4
+ import { useBluetoothRuntime } from "./runtime-context.js";
5
+ export const useNearbyDevices = () => {
6
+ const runtime = useBluetoothRuntime();
7
+ const [, redraw] = React.useReducer(value => value + 1, 0);
8
+ React.useEffect(() => runtime.subscribe("deviceFound", redraw), [runtime]);
9
+ return {
10
+ devices: runtime.devices,
11
+ pair: async id => {
12
+ const device = runtime.devices.find(item => item.id === id);
13
+ if (device) {
14
+ await device.device.connect();
15
+ }
16
+ return device;
17
+ }
18
+ };
19
+ };
20
+ //# sourceMappingURL=use-nearby-devices.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useBluetoothRuntime","useNearbyDevices","runtime","redraw","useReducer","value","useEffect","subscribe","devices","pair","id","device","find","item","connect"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-nearby-devices.ts"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAI9B,SAAwBC,mBAAmB,QAAQ,sBAAmB;AAEtE,OAAO,MAAMC,gBAAgB,GAAGA,CAAA,KAG3B;EACH,MAAMC,OAAO,GAAGF,mBAAmB,CAAC,CAAC;EACrC,MAAM,GAAGG,MAAM,CAAC,GAAGJ,KAAK,CAACK,UAAU,CAAEC,KAAK,IAAKA,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC;EAE5DN,KAAK,CAACO,SAAS,CAAC,MAAMJ,OAAO,CAACK,SAAS,CAAC,aAAa,EAAEJ,MAAM,CAAC,EAAE,CAACD,OAAO,CAAC,CAAC;EAE1E,OAAO;IACLM,OAAO,EAAEN,OAAO,CAACM,OAAO;IACxBC,IAAI,EAAE,MAAOC,EAAE,IAAK;MAClB,MAAMC,MAAM,GAAGT,OAAO,CAACM,OAAO,CAACI,IAAI,CAAEC,IAAI,IAAKA,IAAI,CAACH,EAAE,KAAKA,EAAE,CAAC;MAE7D,IAAIC,MAAM,EAAE;QAAC,MAAMA,MAAM,CAACA,MAAM,CAACG,OAAO,CAAC,CAAC;MAAC;MAE3C,OAAOH,MAAM;IACf;EACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ /* eslint-disable import/group-exports */
4
+
5
+ import * as React from "react";
6
+ import { useBluetoothRuntime } from "./runtime-context.js";
7
+ export const usePairedDevices = ({
8
+ storage,
9
+ storageKey = "@ovok/native/paired-devices",
10
+ autoPair = false
11
+ }) => {
12
+ const runtime = useBluetoothRuntime();
13
+ const [paired, setPaired] = React.useState([]);
14
+ const save = React.useCallback(async next => {
15
+ setPaired(next);
16
+ await storage.setItem(storageKey, JSON.stringify(next));
17
+ }, [storage, storageKey]);
18
+ React.useEffect(() => {
19
+ void storage.getItem(storageKey).then(value => {
20
+ try {
21
+ const parsed = value ? JSON.parse(value) : [];
22
+ setPaired(Array.isArray(parsed) ? parsed.filter(id => typeof id === "string") : []);
23
+ } catch {
24
+ setPaired([]);
25
+ }
26
+ });
27
+ }, [storage, storageKey]);
28
+ React.useEffect(() => {
29
+ if (!autoPair) {
30
+ return;
31
+ }
32
+ runtime.devices.filter(device => paired.includes(device.id)).forEach(device => void device.device.connect());
33
+ }, [autoPair, paired, runtime, runtime.devices]);
34
+ return {
35
+ paired,
36
+ pair: device => save([...new Set([...paired, device.id])]),
37
+ forget: async id => {
38
+ await runtime.manager?.forget(id);
39
+ await save(paired.filter(candidate => candidate !== id));
40
+ }
41
+ };
42
+ };
43
+ //# sourceMappingURL=use-paired-devices.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useBluetoothRuntime","usePairedDevices","storage","storageKey","autoPair","runtime","paired","setPaired","useState","save","useCallback","next","setItem","JSON","stringify","useEffect","getItem","then","value","parsed","parse","Array","isArray","filter","id","devices","device","includes","forEach","connect","pair","Set","forget","manager","candidate"],"sourceRoot":"../../../../../src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AAO,CAACoB,OAAO,CACZF,MAAM,CAAEG,MAAM,IAAKpB,MAAM,CAACqB,QAAQ,CAACD,MAAM,CAACF,EAAE,CAAC,CAAC,CAC9CI,OAAO,CAAEF,MAAM,IAAK,KAAKA,MAAM,CAACA,MAAM,CAACG,OAAO,CAAC,CAAC,CAAC;EACtD,CAAC,EAAE,CAACzB,QAAQ,EAAEE,MAAM,EAAED,OAAO,EAAEA,OAAO,CAACoB,OAAO,CAAC,CAAC;EAEhD,OAAO;IACLnB,MAAM;IACNwB,IAAI,EAAGJ,MAAM,IAAKjB,IAAI,CAAC,CAAC,GAAG,IAAIsB,GAAG,CAAC,CAAC,GAAGzB,MAAM,EAAEoB,MAAM,CAACF,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5DQ,MAAM,EAAE,MAAOR,EAAE,IAAK;MACpB,MAAMnB,OAAO,CAAC4B,OAAO,EAAED,MAAM,CAACR,EAAE,CAAC;MACjC,MAAMf,IAAI,CAACH,MAAM,CAACiB,MAAM,CAAEW,SAAS,IAAKA,SAAS,KAAKV,EAAE,CAAC,CAAC;IAC5D;EACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -31,7 +31,10 @@ export * from "./types/btprovider-children-props.js";
31
31
  export * from "./types/background-sync.js";
32
32
  export * from "./types/result-callback.js";
33
33
  export * from "./types/error-callback.js";
34
+ export * from "./types/bluetooth-error.js";
34
35
  export * from "./types/device-status-change-callback.js";
36
+ export * from "./types/device-connection-event.js";
37
+ export * from "./types/result-policy.js";
35
38
  export * from "./services/devices/bt-managed-device.js";
36
39
  export * from "./services/devices/blood-glucose/blood-glucose.device.js";
37
40
  export * from "./services/devices/custom/custom.device.js";
@@ -39,6 +42,8 @@ export * from "./services/bt-manager.js";
39
42
  export * from "./services/background-sync/background-ble-manager.js";
40
43
  export * from "./services/background-sync/background-sync-coordinator.js";
41
44
  export * from "./services/background-sync/background-service-uuids.js";
45
+ export * from "./utils/result-identity.js";
46
+ export * from "./testing/index.js";
42
47
  export * from "./services/custom/define-custom-device.js";
43
48
  export * from "./services/devices/standard-gatt/standard-gatt.devices.js";
44
49
  export * from "./services/devices/boso/boso.medicus.js";
@@ -67,4 +72,12 @@ export * from "./components/bt-provider.js";
67
72
  export * from "./components/bluetooth-device-picker.js";
68
73
  export * from "./components/default-permission-fallback.js";
69
74
  export * from "./hooks/use-request-permissions.js";
75
+ export * from "./hooks/runtime-context.js";
76
+ export * from "./hooks/use-bluetooth-state.js";
77
+ export * from "./hooks/use-nearby-devices.js";
78
+ export * from "./hooks/use-paired-devices.js";
79
+ export * from "./hooks/use-device-connection.js";
80
+ export * from "./hooks/use-measurements.js";
81
+ export * from "./hooks/use-background-sync.js";
82
+ export * from "./hooks/use-health-import.js";
70
83
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/bt-management/index.ts"],"mappings":";;AAAA,cAAc,gCAA6B;AAC3C,cAAc,4BAAyB;AACvC,cAAc,kCAA+B;AAC7C,cAAc,8BAA2B;AACzC,cAAc,6BAA0B;AACxC,cAAc,6BAA0B;AACxC,cAAc,qCAAkC;AAChD,cAAc,6BAA0B;AACxC,cAAc,+BAA4B;AAC1C,cAAc,kCAA+B;AAC7C,cAAc,8BAA2B;AACzC,cAAc,8BAA2B;AACzC,cAAc,6BAA0B;AACxC,cAAc,+BAA4B;AAC1C,cAAc,gCAA6B;AAC3C,cAAc,gCAA6B;AAC3C,cAAc,8BAA2B;AACzC,cAAc,2BAAwB;AACtC,cAAc,uBAAoB;AAClC,cAAc,0BAAuB;AACrC,cAAc,wBAAqB;AACnC,cAAc,0BAAuB;AACrC,cAAc,+BAA4B;AAC1C,cAAc,6BAA0B;AACxC,cAAc,yBAAsB;AACpC,cAAc,0BAAuB;AACrC,cAAc,6BAA0B;AACxC,cAAc,sCAAmC;AACjD,cAAc,4BAAyB;AACvC,cAAc,4BAAyB;AACvC,cAAc,2BAAwB;AACtC,cAAc,0CAAuC;AAErD,cAAc,yCAAsC;AACpD,cAAc,0DAAuD;AACrE,cAAc,4CAAyC;AACvD,cAAc,0BAAuB;AACrC,cAAc,sDAAmD;AACjE,cAAc,2DAAwD;AACtE,cAAc,wDAAqD;AACnE,cAAc,2CAAwC;AACtD,cAAc,2DAAwD;AACtE,cAAc,yCAAsC;AACpD,cAAc,oDAAiD;AAC/D,cAAc,mDAAgD;AAC9D,cAAc,0DAAuD;AACrE,cAAc,kDAA+C;AAC7D,cAAc,uDAAoD;AAClE,cAAc,0DAAuD;AACrE,cAAc,mDAAgD;AAC9D,cAAc,4CAAyC;AACvD,cAAc,4CAAyC;AACvD,cAAc,iDAA8C;AAC5D,cAAc,+CAA4C;AAC1D,cAAc,mDAAgD;AAC9D,cAAc,+CAA4C;AAC1D,cAAc,2CAAwC;AACtD,cAAc,8CAA2C;AACzD,cAAc,4CAAyC;AACvD,cAAc,0CAAuC;AACrD,cAAc,6CAA0C;AACxD,cAAc,+CAA4C;AAC1D,cAAc,+CAA4C;AAE1D,cAAc,0CAAuC;AAErD,cAAc,6BAA0B;AACxC,cAAc,yCAAsC;AACpD,cAAc,6CAA0C;AACxD,cAAc,oCAAiC","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/bt-management/index.ts"],"mappings":";;AAAA,cAAc,gCAA6B;AAC3C,cAAc,4BAAyB;AACvC,cAAc,kCAA+B;AAC7C,cAAc,8BAA2B;AACzC,cAAc,6BAA0B;AACxC,cAAc,6BAA0B;AACxC,cAAc,qCAAkC;AAChD,cAAc,6BAA0B;AACxC,cAAc,+BAA4B;AAC1C,cAAc,kCAA+B;AAC7C,cAAc,8BAA2B;AACzC,cAAc,8BAA2B;AACzC,cAAc,6BAA0B;AACxC,cAAc,+BAA4B;AAC1C,cAAc,gCAA6B;AAC3C,cAAc,gCAA6B;AAC3C,cAAc,8BAA2B;AACzC,cAAc,2BAAwB;AACtC,cAAc,uBAAoB;AAClC,cAAc,0BAAuB;AACrC,cAAc,wBAAqB;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List":[]}
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ import { recordOvokMetric } from "../../../helpers/utils/telemetry.js";
4
+ import { reviveResultDates } from "../../utils/result-identity.js";
3
5
  const DEFAULT_QUEUE_KEY = "@ovok/native/background-sync/results";
4
6
  const DEFAULT_MAX_RETRIES = 3;
5
7
  const DEFAULT_RETRY_BACKOFF_MS = 30_000;
@@ -8,6 +10,10 @@ const createResultId = () => {
8
10
  resultSequence += 1;
9
11
  return `${Date.now()}-${resultSequence}-${Math.random().toString(36).slice(2, 10)}`;
10
12
  };
13
+ const createQueueId = () => {
14
+ resultSequence += 1;
15
+ return `${Date.now()}-queue-${resultSequence}-${Math.random().toString(36).slice(2, 10)}`;
16
+ };
11
17
 
12
18
  /**
13
19
  * A small durable, at-least-once queue. The result is written before delivery and removed only
@@ -24,14 +30,19 @@ class BackgroundSyncCoordinator {
24
30
  }
25
31
  enqueue = result => this.runExclusive(async () => {
26
32
  const queue = await this.readQueue();
33
+ const stableId = result.id ?? createResultId();
27
34
  queue.push({
28
- id: createResultId(),
35
+ queueId: createQueueId(),
29
36
  queuedAt: new Date().toISOString(),
30
37
  attempt: 0,
31
38
  nextAttemptAt: 0,
32
- result
39
+ result: {
40
+ ...result,
41
+ id: stableId
42
+ }
33
43
  });
34
44
  await this.writeQueue(queue);
45
+ recordOvokMetric("ovok.queue.depth", queue.length);
35
46
  await this.flushQueue(queue);
36
47
  });
37
48
  flush = (options = {}) => this.runExclusive(async () => {
@@ -52,7 +63,18 @@ class BackgroundSyncCoordinator {
52
63
  if (!Array.isArray(parsed)) {
53
64
  throw new Error("Background sync queue is not an array");
54
65
  }
55
- return parsed;
66
+ return parsed.map(item => {
67
+ const typed = item;
68
+ const result = reviveResultDates(typed.result);
69
+ return {
70
+ ...typed,
71
+ queueId: typed.queueId ?? typed.id ?? createQueueId(),
72
+ result: {
73
+ ...result,
74
+ id: result.id ?? typed.id ?? createResultId()
75
+ }
76
+ };
77
+ });
56
78
  } catch (error) {
57
79
  await this.options.storage.setItem(this.storageKey, "[]");
58
80
  throw new Error(`Background sync queue could not be read: ${error instanceof Error ? error.message : String(error)}`);
@@ -78,21 +100,36 @@ class BackgroundSyncCoordinator {
78
100
  try {
79
101
  await this.options.onResult({
80
102
  ...item.result,
81
- id: item.id,
103
+ id: item.result.id,
104
+ queueId: item.queueId,
82
105
  queuedAt: item.queuedAt,
83
106
  attempt
84
107
  });
85
108
  queue.splice(queue.indexOf(item), 1);
109
+ recordOvokMetric("ovok.queue.delivered", 1, {
110
+ attempt,
111
+ measurementTypeKey: item.result.data.measurementTypeKey
112
+ });
86
113
  changed = true;
87
114
  } catch {
88
115
  item.attempt = attempt;
89
116
  item.exhausted = attempt >= this.maxRetries;
90
117
  item.nextAttemptAt = item.exhausted ? Number.MAX_SAFE_INTEGER : Date.now() + this.retryBackoffMs * 2 ** (attempt - 1);
118
+ recordOvokMetric("ovok.queue.retries", 1, {
119
+ attempt
120
+ });
121
+ if (item.exhausted) {
122
+ recordOvokMetric("ovok.queue.exhausted", 1, {
123
+ attempt,
124
+ exhausted: true
125
+ });
126
+ }
91
127
  changed = true;
92
128
  }
93
129
  }
94
130
  if (changed) {
95
131
  await this.writeQueue(queue);
132
+ recordOvokMetric("ovok.queue.depth", queue.length);
96
133
  }
97
134
  };
98
135
  }
@@ -1 +1 @@
1
- {"version":3,"names":["DEFAULT_QUEUE_KEY","DEFAULT_MAX_RETRIES","DEFAULT_RETRY_BACKOFF_MS","resultSequence","createResultId","Date","now","Math","random","toString","slice","BackgroundSyncCoordinator","operation","Promise","resolve","constructor","options","storageKey","maxRetries","max","retryBackoffMs","enqueue","result","runExclusive","queue","readQueue","push","id","queuedAt","toISOString","attempt","nextAttemptAt","writeQueue","flushQueue","flush","next","then","catch","undefined","serialized","storage","getItem","parsed","JSON","parse","Array","isArray","Error","error","setItem","message","String","stringify","changed","item","exhausted","resetExhausted","includeExhausted","onResult","splice","indexOf","Number","MAX_SAFE_INTEGER"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/background-sync/background-sync-coordinator.ts"],"mappings":";;AAkBA,MAAMA,iBAAiB,GAAG,sCAAsC;AAChE,MAAMC,mBAAmB,GAAG,CAAC;AAC7B,MAAMC,wBAAwB,GAAG,MAAM;AAEvC,IAAIC,cAAc,GAAG,CAAC;AAEtB,MAAMC,cAAc,GAAGA,CAAA,KAAc;EACnCD,cAAc,IAAI,CAAC;EAEnB,OAAO,GAAGE,IAAI,CAACC,GAAG,CAAC,CAAC,IAAIH,cAAc,IAAII,IAAI,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE;AACrF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAMC,yBAAyB,CAAsB;EAI3CC,SAAS,GAAkBC,OAAO,CAACC,OAAO,CAAC,CAAC;EAE7CC,WAAWA,CAAkBC,OAAiC,EAAE;IAAA,KAAnCA,OAAiC,GAAjCA,OAAiC;IACnE,IAAI,CAACC,UAAU,GAAGD,OAAO,CAACC,UAAU,IAAIjB,iBAAiB;IACzD,IAAI,CAACkB,UAAU,GAAGX,IAAI,CAACY,GAAG,CAAC,CAAC,EAAEH,OAAO,CAACE,UAAU,IAAIjB,mBAAmB,CAAC;IACxE,IAAI,CAACmB,cAAc,GAAGb,IAAI,CAACY,GAAG,CAC5B,CAAC,EACDH,OAAO,CAACI,cAAc,IAAIlB,wBAC5B,CAAC;EACH;EAEOmB,OAAO,GAAIC,MAAyB,IACzC,IAAI,CAACC,YAAY,CAAC,YAAY;IAC5B,MAAMC,KAAK,GAAG,MAAM,IAAI,CAACC,SAAS,CAAC,CAAC;IAEpCD,KAAK,CAACE,IAAI,CAAC;MACTC,EAAE,EAAEvB,cAAc,CAAC,CAAC;MACpBwB,QAAQ,EAAE,IAAIvB,IAAI,CAAC,CAAC,CAACwB,WAAW,CAAC,CAAC;MAClCC,OAAO,EAAE,CAAC;MACVC,aAAa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,OAAO,GAAGA,OAAO;QACtBwB,IAAI,CAACC,SAAS,GAAGzB,OAAO,IAAI,IAAI,CAACZ,UAAU;QAC3CoC,IAAI,CAACvB,aAAa,GAAGuB,IAAI,CAACC,SAAS,GAC/BM,MAAM,CAACC,gBAAgB,GACvBzD,IAAI,CAACC,GAAG,CAAC,CAAC,GAAG,IAAI,CAACc,cAAc,GAAG,CAAC,KAAKU,OAAO,GAAG,CAAC,CAAC;QACzDuB,OAAO,GAAG,IAAI;MAChB;IACF;IAEA,IAAIA,OAAO,EAAE;MACX,MAAM,IAAI,CAACrB,UAAU,CAACR,KAAK,CAAC;IAC9B;EACF,CAAC;AACH;AAEA,SAASb,yBAAyB,EAAEX,iBAAiB","ignoreList":[]}
1
+ {"version":3,"names":["recordOvokMetric","reviveResultDates","DEFAULT_QUEUE_KEY","DEFAULT_MAX_RETRIES","DEFAULT_RETRY_BACKOFF_MS","resultSequence","createResultId","Date","now","Math","random","toString","slice","createQueueId","BackgroundSyncCoordinator","operation","Promise","resolve","constructor","options","storageKey","maxRetries","max","retryBackoffMs","enqueue","result","runExclusive","queue","readQueue","stableId","id","push","queueId","queuedAt","toISOString","attempt","nextAttemptAt","writeQueue","length","flushQueue","flush","next","then","catch","undefined","serialized","storage","getItem","parsed","JSON","parse","Array","isArray","Error","map","item","typed","error","setItem","message","String","stringify","changed","exhausted","resetExhausted","includeExhausted","onResult","splice","indexOf","measurementTypeKey","data","Number","MAX_SAFE_INTEGER"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/background-sync/background-sync-coordinator.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,qCAAkC;AAInE,SAASC,iBAAiB,QAAQ,gCAA6B;AAiB/D,MAAMC,iBAAiB,GAAG,sCAAsC;AAChE,MAAMC,mBAAmB,GAAG,CAAC;AAC7B,MAAMC,wBAAwB,GAAG,MAAM;AAEvC,IAAIC,cAAc,GAAG,CAAC;AAEtB,MAAMC,cAAc,GAAGA,CAAA,KAAc;EAC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