@ovok/native 1.5.6 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (722) hide show
  1. package/README.md +35 -19
  2. package/android/src/main/AndroidManifest.xml +1 -20
  3. package/app.plugin.js +181 -0
  4. package/lib/commonjs/index.js +5 -104
  5. package/lib/commonjs/index.js.map +1 -1
  6. package/lib/commonjs/modules/auth/delete-account-button/components/delete-account-button.js +2 -0
  7. package/lib/commonjs/modules/auth/delete-account-button/components/delete-account-button.js.map +1 -1
  8. package/lib/commonjs/modules/auth/hooks/use-rate-limit-cooldown.js +23 -0
  9. package/lib/commonjs/modules/auth/hooks/use-rate-limit-cooldown.js.map +1 -0
  10. package/lib/commonjs/modules/auth/hooks/use-session.js +105 -0
  11. package/lib/commonjs/modules/auth/hooks/use-session.js.map +1 -0
  12. package/lib/commonjs/modules/auth/index.js +44 -0
  13. package/lib/commonjs/modules/auth/index.js.map +1 -1
  14. package/lib/commonjs/modules/auth/logout-button/components/logout-button.js +5 -2
  15. package/lib/commonjs/modules/auth/logout-button/components/logout-button.js.map +1 -1
  16. package/lib/commonjs/modules/auth/register/components/form/inputs.js +50 -1
  17. package/lib/commonjs/modules/auth/register/components/form/inputs.js.map +1 -1
  18. package/lib/commonjs/modules/auth/register/components/form/register-button.js +4 -0
  19. package/lib/commonjs/modules/auth/register/components/form/register-button.js.map +1 -1
  20. package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js +6 -0
  21. package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js.map +1 -1
  22. package/lib/commonjs/modules/auth/reset-password/components/form/inputs.js +12 -0
  23. package/lib/commonjs/modules/auth/reset-password/components/form/inputs.js.map +1 -1
  24. package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-button.js +4 -0
  25. package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-button.js.map +1 -1
  26. package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js +7 -1
  27. package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
  28. package/lib/commonjs/modules/auth/session/components/session-list.js +82 -0
  29. package/lib/commonjs/modules/auth/session/components/session-list.js.map +1 -0
  30. package/lib/commonjs/modules/auth/session/events.js +19 -0
  31. package/lib/commonjs/modules/auth/session/events.js.map +1 -0
  32. package/lib/commonjs/modules/auth/session/index.js +13 -0
  33. package/lib/commonjs/modules/auth/session/index.js.map +1 -0
  34. package/lib/commonjs/modules/auth/session/types/session-list-props.js +6 -0
  35. package/lib/commonjs/modules/auth/session/types/session-list-props.js.map +1 -0
  36. package/lib/commonjs/modules/auth/sign-in/components/form/inputs.js +26 -0
  37. package/lib/commonjs/modules/auth/sign-in/components/form/inputs.js.map +1 -1
  38. package/lib/commonjs/modules/auth/sign-in/components/form/login-form-provider.js +48 -1
  39. package/lib/commonjs/modules/auth/sign-in/components/form/login-form-provider.js.map +1 -1
  40. package/lib/commonjs/modules/auth/sign-in/components/form/mfa-code-input.js +58 -0
  41. package/lib/commonjs/modules/auth/sign-in/components/form/mfa-code-input.js.map +1 -0
  42. package/lib/commonjs/modules/auth/sign-in/components/form/sign-in-with-email.js +2 -0
  43. package/lib/commonjs/modules/auth/sign-in/components/form/sign-in-with-email.js.map +1 -1
  44. package/lib/commonjs/modules/auth/sign-in/components/form/signin-button.js +13 -5
  45. package/lib/commonjs/modules/auth/sign-in/components/form/signin-button.js.map +1 -1
  46. package/lib/commonjs/modules/auth/types/session.js +2 -0
  47. package/lib/commonjs/modules/auth/types/session.js.map +1 -0
  48. package/lib/commonjs/modules/auth/utils/rate-limit.js +37 -0
  49. package/lib/commonjs/modules/auth/utils/rate-limit.js.map +1 -0
  50. package/lib/commonjs/modules/background-sync/android-bluetooth-foreground-service.js +3 -2
  51. package/lib/commonjs/modules/background-sync/android-bluetooth-foreground-service.js.map +1 -1
  52. package/lib/commonjs/modules/background-sync/background-safe-storage.js +76 -0
  53. package/lib/commonjs/modules/background-sync/background-safe-storage.js.map +1 -0
  54. package/lib/commonjs/modules/background-sync/index.js +11 -0
  55. package/lib/commonjs/modules/background-sync/index.js.map +1 -1
  56. package/lib/commonjs/modules/bt-device/index.js +0 -22
  57. package/lib/commonjs/modules/bt-device/index.js.map +1 -1
  58. package/lib/commonjs/modules/bt-device-instructions/index.js +39 -0
  59. package/lib/commonjs/modules/bt-device-instructions/index.js.map +1 -0
  60. package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js +64 -0
  61. package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -0
  62. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +94 -26
  63. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  64. package/lib/commonjs/modules/bt-management/constants/measurement-field-catalog.js +1 -0
  65. package/lib/commonjs/modules/bt-management/constants/measurement-field-catalog.js.map +1 -1
  66. package/lib/commonjs/modules/bt-management/hooks/runtime-context.js +95 -0
  67. package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -0
  68. package/lib/commonjs/modules/bt-management/hooks/use-background-sync.js +51 -0
  69. package/lib/commonjs/modules/bt-management/hooks/use-background-sync.js.map +1 -0
  70. package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-state.js +51 -0
  71. package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-state.js.map +1 -0
  72. package/lib/commonjs/modules/bt-management/hooks/use-device-connection.js +40 -0
  73. package/lib/commonjs/modules/bt-management/hooks/use-device-connection.js.map +1 -0
  74. package/lib/commonjs/modules/bt-management/hooks/use-health-import.js +82 -0
  75. package/lib/commonjs/modules/bt-management/hooks/use-health-import.js.map +1 -0
  76. package/lib/commonjs/modules/bt-management/hooks/use-measurements.js +79 -0
  77. package/lib/commonjs/modules/bt-management/hooks/use-measurements.js.map +1 -0
  78. package/lib/commonjs/modules/bt-management/hooks/use-nearby-devices.js +33 -0
  79. package/lib/commonjs/modules/bt-management/hooks/use-nearby-devices.js.map +1 -0
  80. package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js +58 -0
  81. package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js.map +1 -0
  82. package/lib/commonjs/modules/bt-management/hooks/use-scan-control.js +21 -0
  83. package/lib/commonjs/modules/bt-management/hooks/use-scan-control.js.map +1 -0
  84. package/lib/commonjs/modules/bt-management/index.js +154 -0
  85. package/lib/commonjs/modules/bt-management/index.js.map +1 -1
  86. package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js +41 -5
  87. package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
  88. package/lib/commonjs/modules/bt-management/services/bt-manager.js +91 -22
  89. package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
  90. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +59 -0
  91. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  92. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +107 -4
  93. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  94. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +9 -1
  95. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  96. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +1 -0
  97. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
  98. package/lib/commonjs/modules/bt-management/services/devices/measurement-state-machine.js +5 -3
  99. package/lib/commonjs/modules/bt-management/services/devices/measurement-state-machine.js.map +1 -1
  100. package/lib/commonjs/modules/bt-management/services/devices/spo/spo2.main-services.js +12 -0
  101. package/lib/commonjs/modules/bt-management/services/devices/spo/spo2.main-services.js.map +1 -1
  102. package/lib/commonjs/modules/bt-management/services/push-notification.js +39 -0
  103. package/lib/commonjs/modules/bt-management/services/push-notification.js.map +1 -0
  104. package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js +132 -0
  105. package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js.map +1 -0
  106. package/lib/commonjs/modules/bt-management/testing/index.js +28 -0
  107. package/lib/commonjs/modules/bt-management/testing/index.js.map +1 -0
  108. package/lib/commonjs/modules/bt-management/testing/recorded-frames.js +23 -0
  109. package/lib/commonjs/modules/bt-management/testing/recorded-frames.js.map +1 -0
  110. package/lib/commonjs/modules/bt-management/types/bluetooth-error.js +82 -0
  111. package/lib/commonjs/modules/bt-management/types/bluetooth-error.js.map +1 -0
  112. package/lib/commonjs/modules/bt-management/types/device-connection-event.js +6 -0
  113. package/lib/commonjs/modules/bt-management/types/device-connection-event.js.map +1 -0
  114. package/lib/commonjs/modules/bt-management/types/result-policy.js +6 -0
  115. package/lib/commonjs/modules/bt-management/types/result-policy.js.map +1 -0
  116. package/lib/commonjs/modules/bt-management/utils/result-identity.js +63 -0
  117. package/lib/commonjs/modules/bt-management/utils/result-identity.js.map +1 -0
  118. package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js +20 -5
  119. package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
  120. package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js +29 -4
  121. package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js.map +1 -1
  122. package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +2 -2
  123. package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
  124. package/lib/commonjs/modules/data-sync/services/managers/sync-progress-manager.js +1 -1
  125. package/lib/commonjs/modules/data-sync/services/managers/sync-progress-manager.js.map +1 -1
  126. package/lib/commonjs/modules/data-sync/utils/generate-observation-entry.js +29 -21
  127. package/lib/commonjs/modules/data-sync/utils/generate-observation-entry.js.map +1 -1
  128. package/lib/commonjs/modules/data-sync/utils/retry-save.js +99 -0
  129. package/lib/commonjs/modules/data-sync/utils/retry-save.js.map +1 -0
  130. package/lib/commonjs/modules/helpers/form-items/form-field.js +2 -0
  131. package/lib/commonjs/modules/helpers/form-items/form-field.js.map +1 -1
  132. package/lib/commonjs/modules/helpers/index.js +23 -4
  133. package/lib/commonjs/modules/helpers/index.js.map +1 -1
  134. package/lib/commonjs/modules/helpers/utils/s-log.js +4 -13
  135. package/lib/commonjs/modules/helpers/utils/s-log.js.map +1 -1
  136. package/lib/commonjs/modules/helpers/utils/sentry-logger.js +27 -17
  137. package/lib/commonjs/modules/helpers/utils/sentry-logger.js.map +1 -1
  138. package/lib/commonjs/modules/helpers/utils/telemetry.js +230 -0
  139. package/lib/commonjs/modules/helpers/utils/telemetry.js.map +1 -0
  140. package/lib/commonjs/modules/image/components/optimized-image.js +31 -6
  141. package/lib/commonjs/modules/image/components/optimized-image.js.map +1 -1
  142. package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-error.js +18 -9
  143. package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-error.js.map +1 -1
  144. package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js +3 -2
  145. package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js.map +1 -1
  146. package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js +4 -2
  147. package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js.map +1 -1
  148. package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js +44 -17
  149. package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
  150. package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js +2 -1
  151. package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js.map +1 -1
  152. package/lib/commonjs/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.js.map +1 -1
  153. package/lib/commonjs/modules/tile/components/task-icon.js +2 -1
  154. package/lib/commonjs/modules/tile/components/task-icon.js.map +1 -1
  155. package/lib/commonjs/modules/tile/constants/measurement-icon-svg.js +4 -1
  156. package/lib/commonjs/modules/tile/constants/measurement-icon-svg.js.map +1 -1
  157. package/lib/commonjs/modules/ui/components/background-sync-setting.js +123 -0
  158. package/lib/commonjs/modules/ui/components/background-sync-setting.js.map +1 -0
  159. package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js +119 -0
  160. package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js.map +1 -0
  161. package/lib/commonjs/modules/ui/components/ecg-strip-viewer.js +175 -0
  162. package/lib/commonjs/modules/ui/components/ecg-strip-viewer.js.map +1 -0
  163. package/lib/commonjs/modules/ui/components/health-import-card.js +141 -0
  164. package/lib/commonjs/modules/ui/components/health-import-card.js.map +1 -0
  165. package/lib/commonjs/modules/ui/components/manual-entry-form.js +136 -0
  166. package/lib/commonjs/modules/ui/components/manual-entry-form.js.map +1 -0
  167. package/lib/commonjs/modules/ui/components/pairing-flow.js +247 -0
  168. package/lib/commonjs/modules/ui/components/pairing-flow.js.map +1 -0
  169. package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js +107 -0
  170. package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js.map +1 -0
  171. package/lib/commonjs/modules/ui/components/urine-test-result.js +99 -0
  172. package/lib/commonjs/modules/ui/components/urine-test-result.js.map +1 -0
  173. package/lib/commonjs/modules/ui/index.js +116 -0
  174. package/lib/commonjs/modules/ui/index.js.map +1 -0
  175. package/lib/commonjs/modules/ui/types.js +6 -0
  176. package/lib/commonjs/modules/ui/types.js.map +1 -0
  177. package/lib/commonjs/modules/ui/use-ovok-ui.js +51 -0
  178. package/lib/commonjs/modules/ui/use-ovok-ui.js.map +1 -0
  179. package/lib/module/index.js +3 -9
  180. package/lib/module/index.js.map +1 -1
  181. package/lib/module/modules/auth/delete-account-button/components/delete-account-button.js +2 -0
  182. package/lib/module/modules/auth/delete-account-button/components/delete-account-button.js.map +1 -1
  183. package/lib/module/modules/auth/hooks/use-rate-limit-cooldown.js +17 -0
  184. package/lib/module/modules/auth/hooks/use-rate-limit-cooldown.js.map +1 -0
  185. package/lib/module/modules/auth/hooks/use-session.js +99 -0
  186. package/lib/module/modules/auth/hooks/use-session.js.map +1 -0
  187. package/lib/module/modules/auth/index.js +4 -0
  188. package/lib/module/modules/auth/index.js.map +1 -1
  189. package/lib/module/modules/auth/logout-button/components/logout-button.js +5 -2
  190. package/lib/module/modules/auth/logout-button/components/logout-button.js.map +1 -1
  191. package/lib/module/modules/auth/register/components/form/inputs.js +50 -1
  192. package/lib/module/modules/auth/register/components/form/inputs.js.map +1 -1
  193. package/lib/module/modules/auth/register/components/form/register-button.js +4 -0
  194. package/lib/module/modules/auth/register/components/form/register-button.js.map +1 -1
  195. package/lib/module/modules/auth/register/components/form/register-form-provider.js +6 -0
  196. package/lib/module/modules/auth/register/components/form/register-form-provider.js.map +1 -1
  197. package/lib/module/modules/auth/reset-password/components/form/inputs.js +12 -0
  198. package/lib/module/modules/auth/reset-password/components/form/inputs.js.map +1 -1
  199. package/lib/module/modules/auth/reset-password/components/form/reset-password-button.js +4 -0
  200. package/lib/module/modules/auth/reset-password/components/form/reset-password-button.js.map +1 -1
  201. package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js +7 -1
  202. package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
  203. package/lib/module/modules/auth/session/components/session-list.js +76 -0
  204. package/lib/module/modules/auth/session/components/session-list.js.map +1 -0
  205. package/lib/module/modules/auth/session/events.js +13 -0
  206. package/lib/module/modules/auth/session/events.js.map +1 -0
  207. package/lib/module/modules/auth/session/index.js +4 -0
  208. package/lib/module/modules/auth/session/index.js.map +1 -0
  209. package/lib/module/modules/auth/session/types/session-list-props.js +4 -0
  210. package/lib/module/modules/auth/session/types/session-list-props.js.map +1 -0
  211. package/lib/module/modules/auth/sign-in/components/form/inputs.js +26 -0
  212. package/lib/module/modules/auth/sign-in/components/form/inputs.js.map +1 -1
  213. package/lib/module/modules/auth/sign-in/components/form/login-form-provider.js +48 -1
  214. package/lib/module/modules/auth/sign-in/components/form/login-form-provider.js.map +1 -1
  215. package/lib/module/modules/auth/sign-in/components/form/mfa-code-input.js +52 -0
  216. package/lib/module/modules/auth/sign-in/components/form/mfa-code-input.js.map +1 -0
  217. package/lib/module/modules/auth/sign-in/components/form/sign-in-with-email.js +2 -0
  218. package/lib/module/modules/auth/sign-in/components/form/sign-in-with-email.js.map +1 -1
  219. package/lib/module/modules/auth/sign-in/components/form/signin-button.js +13 -5
  220. package/lib/module/modules/auth/sign-in/components/form/signin-button.js.map +1 -1
  221. package/lib/module/modules/auth/types/session.js +2 -0
  222. package/lib/module/modules/auth/types/session.js.map +1 -0
  223. package/lib/module/modules/auth/utils/rate-limit.js +31 -0
  224. package/lib/module/modules/auth/utils/rate-limit.js.map +1 -0
  225. package/lib/module/modules/background-sync/android-bluetooth-foreground-service.js +3 -2
  226. package/lib/module/modules/background-sync/android-bluetooth-foreground-service.js.map +1 -1
  227. package/lib/module/modules/background-sync/background-safe-storage.js +71 -0
  228. package/lib/module/modules/background-sync/background-safe-storage.js.map +1 -0
  229. package/lib/module/modules/background-sync/index.js +1 -0
  230. package/lib/module/modules/background-sync/index.js.map +1 -1
  231. package/lib/module/modules/bt-device/index.js +0 -2
  232. package/lib/module/modules/bt-device/index.js.map +1 -1
  233. package/lib/module/modules/bt-device-instructions/index.js +6 -0
  234. package/lib/module/modules/bt-device-instructions/index.js.map +1 -0
  235. package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js +58 -0
  236. package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -0
  237. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +94 -26
  238. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  239. package/lib/module/modules/bt-management/constants/measurement-field-catalog.js +1 -0
  240. package/lib/module/modules/bt-management/constants/measurement-field-catalog.js.map +1 -1
  241. package/lib/module/modules/bt-management/hooks/runtime-context.js +86 -0
  242. package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -0
  243. package/lib/module/modules/bt-management/hooks/use-background-sync.js +45 -0
  244. package/lib/module/modules/bt-management/hooks/use-background-sync.js.map +1 -0
  245. package/lib/module/modules/bt-management/hooks/use-bluetooth-state.js +45 -0
  246. package/lib/module/modules/bt-management/hooks/use-bluetooth-state.js.map +1 -0
  247. package/lib/module/modules/bt-management/hooks/use-device-connection.js +34 -0
  248. package/lib/module/modules/bt-management/hooks/use-device-connection.js.map +1 -0
  249. package/lib/module/modules/bt-management/hooks/use-health-import.js +76 -0
  250. package/lib/module/modules/bt-management/hooks/use-health-import.js.map +1 -0
  251. package/lib/module/modules/bt-management/hooks/use-measurements.js +73 -0
  252. package/lib/module/modules/bt-management/hooks/use-measurements.js.map +1 -0
  253. package/lib/module/modules/bt-management/hooks/use-nearby-devices.js +27 -0
  254. package/lib/module/modules/bt-management/hooks/use-nearby-devices.js.map +1 -0
  255. package/lib/module/modules/bt-management/hooks/use-paired-devices.js +52 -0
  256. package/lib/module/modules/bt-management/hooks/use-paired-devices.js.map +1 -0
  257. package/lib/module/modules/bt-management/hooks/use-scan-control.js +16 -0
  258. package/lib/module/modules/bt-management/hooks/use-scan-control.js.map +1 -0
  259. package/lib/module/modules/bt-management/index.js +14 -0
  260. package/lib/module/modules/bt-management/index.js.map +1 -1
  261. package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js +41 -5
  262. package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
  263. package/lib/module/modules/bt-management/services/bt-manager.js +91 -22
  264. package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
  265. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +59 -0
  266. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  267. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +107 -4
  268. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  269. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +9 -1
  270. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  271. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +1 -0
  272. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
  273. package/lib/module/modules/bt-management/services/devices/measurement-state-machine.js +5 -3
  274. package/lib/module/modules/bt-management/services/devices/measurement-state-machine.js.map +1 -1
  275. package/lib/module/modules/bt-management/services/devices/spo/spo2.main-services.js +12 -0
  276. package/lib/module/modules/bt-management/services/devices/spo/spo2.main-services.js.map +1 -1
  277. package/lib/module/modules/bt-management/services/push-notification.js +34 -0
  278. package/lib/module/modules/bt-management/services/push-notification.js.map +1 -0
  279. package/lib/module/modules/bt-management/testing/fake-ble-manager.js +127 -0
  280. package/lib/module/modules/bt-management/testing/fake-ble-manager.js.map +1 -0
  281. package/lib/module/modules/bt-management/testing/index.js +5 -0
  282. package/lib/module/modules/bt-management/testing/index.js.map +1 -0
  283. package/lib/module/modules/bt-management/testing/recorded-frames.js +17 -0
  284. package/lib/module/modules/bt-management/testing/recorded-frames.js.map +1 -0
  285. package/lib/module/modules/bt-management/types/bluetooth-error.js +76 -0
  286. package/lib/module/modules/bt-management/types/bluetooth-error.js.map +1 -0
  287. package/lib/module/modules/bt-management/types/device-connection-event.js +4 -0
  288. package/lib/module/modules/bt-management/types/device-connection-event.js.map +1 -0
  289. package/lib/module/modules/bt-management/types/result-policy.js +4 -0
  290. package/lib/module/modules/bt-management/types/result-policy.js.map +1 -0
  291. package/lib/module/modules/bt-management/utils/result-identity.js +57 -0
  292. package/lib/module/modules/bt-management/utils/result-identity.js.map +1 -0
  293. package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js +20 -5
  294. package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
  295. package/lib/module/modules/data-sync/services/base-health-sync-service.js +29 -4
  296. package/lib/module/modules/data-sync/services/base-health-sync-service.js.map +1 -1
  297. package/lib/module/modules/data-sync/services/managers/data-processor.js +2 -2
  298. package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
  299. package/lib/module/modules/data-sync/services/managers/sync-progress-manager.js +1 -1
  300. package/lib/module/modules/data-sync/services/managers/sync-progress-manager.js.map +1 -1
  301. package/lib/module/modules/data-sync/utils/generate-observation-entry.js +29 -21
  302. package/lib/module/modules/data-sync/utils/generate-observation-entry.js.map +1 -1
  303. package/lib/module/modules/data-sync/utils/retry-save.js +92 -0
  304. package/lib/module/modules/data-sync/utils/retry-save.js.map +1 -0
  305. package/lib/module/modules/helpers/form-items/form-field.js +2 -0
  306. package/lib/module/modules/helpers/form-items/form-field.js.map +1 -1
  307. package/lib/module/modules/helpers/index.js +2 -1
  308. package/lib/module/modules/helpers/index.js.map +1 -1
  309. package/lib/module/modules/helpers/utils/s-log.js +4 -12
  310. package/lib/module/modules/helpers/utils/s-log.js.map +1 -1
  311. package/lib/module/modules/helpers/utils/sentry-logger.js +25 -14
  312. package/lib/module/modules/helpers/utils/sentry-logger.js.map +1 -1
  313. package/lib/module/modules/helpers/utils/telemetry.js +218 -0
  314. package/lib/module/modules/helpers/utils/telemetry.js.map +1 -0
  315. package/lib/module/modules/image/components/optimized-image.js +32 -7
  316. package/lib/module/modules/image/components/optimized-image.js.map +1 -1
  317. package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-error.js +20 -11
  318. package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-error.js.map +1 -1
  319. package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js +3 -2
  320. package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js.map +1 -1
  321. package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js +4 -2
  322. package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js.map +1 -1
  323. package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js +44 -17
  324. package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
  325. package/lib/module/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js +2 -1
  326. package/lib/module/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js.map +1 -1
  327. package/lib/module/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.js.map +1 -1
  328. package/lib/module/modules/tile/components/task-icon.js +2 -1
  329. package/lib/module/modules/tile/components/task-icon.js.map +1 -1
  330. package/lib/module/modules/tile/constants/measurement-icon-svg.js +4 -1
  331. package/lib/module/modules/tile/constants/measurement-icon-svg.js.map +1 -1
  332. package/lib/module/modules/ui/components/background-sync-setting.js +117 -0
  333. package/lib/module/modules/ui/components/background-sync-setting.js.map +1 -0
  334. package/lib/module/modules/ui/components/bluetooth-state-notice.js +113 -0
  335. package/lib/module/modules/ui/components/bluetooth-state-notice.js.map +1 -0
  336. package/lib/module/modules/ui/components/ecg-strip-viewer.js +169 -0
  337. package/lib/module/modules/ui/components/ecg-strip-viewer.js.map +1 -0
  338. package/lib/module/modules/ui/components/health-import-card.js +135 -0
  339. package/lib/module/modules/ui/components/health-import-card.js.map +1 -0
  340. package/lib/module/modules/ui/components/manual-entry-form.js +130 -0
  341. package/lib/module/modules/ui/components/manual-entry-form.js.map +1 -0
  342. package/lib/module/modules/ui/components/pairing-flow.js +241 -0
  343. package/lib/module/modules/ui/components/pairing-flow.js.map +1 -0
  344. package/lib/module/modules/ui/components/supported-devices-catalog-list.js +101 -0
  345. package/lib/module/modules/ui/components/supported-devices-catalog-list.js.map +1 -0
  346. package/lib/module/modules/ui/components/urine-test-result.js +94 -0
  347. package/lib/module/modules/ui/components/urine-test-result.js.map +1 -0
  348. package/lib/module/modules/ui/index.js +13 -0
  349. package/lib/module/modules/ui/index.js.map +1 -0
  350. package/lib/module/modules/ui/types.js +4 -0
  351. package/lib/module/modules/ui/types.js.map +1 -0
  352. package/lib/module/modules/ui/use-ovok-ui.js +45 -0
  353. package/lib/module/modules/ui/use-ovok-ui.js.map +1 -0
  354. package/lib/typescript/commonjs/src/index.d.ts +0 -9
  355. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  356. package/lib/typescript/commonjs/src/modules/auth/delete-account-button/components/delete-account-button.d.ts.map +1 -1
  357. package/lib/typescript/commonjs/src/modules/auth/hooks/use-rate-limit-cooldown.d.ts +2 -0
  358. package/lib/typescript/commonjs/src/modules/auth/hooks/use-rate-limit-cooldown.d.ts.map +1 -0
  359. package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts +16 -0
  360. package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts.map +1 -0
  361. package/lib/typescript/commonjs/src/modules/auth/index.d.ts +4 -0
  362. package/lib/typescript/commonjs/src/modules/auth/index.d.ts.map +1 -1
  363. package/lib/typescript/commonjs/src/modules/auth/logout-button/components/logout-button.d.ts.map +1 -1
  364. package/lib/typescript/commonjs/src/modules/auth/register/components/form/inputs.d.ts.map +1 -1
  365. package/lib/typescript/commonjs/src/modules/auth/register/components/form/register-button.d.ts.map +1 -1
  366. package/lib/typescript/commonjs/src/modules/auth/register/components/form/register-form-provider.d.ts.map +1 -1
  367. package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/inputs.d.ts.map +1 -1
  368. package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-button.d.ts.map +1 -1
  369. package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts.map +1 -1
  370. package/lib/typescript/commonjs/src/modules/auth/session/components/session-list.d.ts +4 -0
  371. package/lib/typescript/commonjs/src/modules/auth/session/components/session-list.d.ts.map +1 -0
  372. package/lib/typescript/commonjs/src/modules/auth/session/events.d.ts +5 -0
  373. package/lib/typescript/commonjs/src/modules/auth/session/events.d.ts.map +1 -0
  374. package/lib/typescript/commonjs/src/modules/auth/session/index.d.ts +3 -0
  375. package/lib/typescript/commonjs/src/modules/auth/session/index.d.ts.map +1 -0
  376. package/lib/typescript/commonjs/src/modules/auth/session/types/session-list-props.d.ts +5 -0
  377. package/lib/typescript/commonjs/src/modules/auth/session/types/session-list-props.d.ts.map +1 -0
  378. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/inputs.d.ts.map +1 -1
  379. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/login-form-provider.d.ts.map +1 -1
  380. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts +9 -0
  381. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts.map +1 -0
  382. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts +4 -0
  383. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts.map +1 -1
  384. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/signin-button.d.ts.map +1 -1
  385. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/sign-in.d.ts +4 -0
  386. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/sign-in.d.ts.map +1 -1
  387. package/lib/typescript/commonjs/src/modules/auth/sign-in/contexts/login-form-context.d.ts +2 -46
  388. package/lib/typescript/commonjs/src/modules/auth/sign-in/contexts/login-form-context.d.ts.map +1 -1
  389. package/lib/typescript/commonjs/src/modules/auth/sign-in/hooks/use-login-form.d.ts +1 -47
  390. package/lib/typescript/commonjs/src/modules/auth/sign-in/hooks/use-login-form.d.ts.map +1 -1
  391. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/login-form-context-type.d.ts +11 -1
  392. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/login-form-context-type.d.ts.map +1 -1
  393. package/lib/typescript/commonjs/src/modules/auth/types/session.d.ts +10 -0
  394. package/lib/typescript/commonjs/src/modules/auth/types/session.d.ts.map +1 -0
  395. package/lib/typescript/commonjs/src/modules/auth/utils/rate-limit.d.ts +11 -0
  396. package/lib/typescript/commonjs/src/modules/auth/utils/rate-limit.d.ts.map +1 -0
  397. package/lib/typescript/commonjs/src/modules/background-sync/android-bluetooth-foreground-service.d.ts.map +1 -1
  398. package/lib/typescript/commonjs/src/modules/background-sync/background-safe-storage.d.ts +31 -0
  399. package/lib/typescript/commonjs/src/modules/background-sync/background-safe-storage.d.ts.map +1 -0
  400. package/lib/typescript/commonjs/src/modules/background-sync/index.d.ts +1 -0
  401. package/lib/typescript/commonjs/src/modules/background-sync/index.d.ts.map +1 -1
  402. package/lib/typescript/commonjs/src/modules/bt-device/index.d.ts +0 -2
  403. package/lib/typescript/commonjs/src/modules/bt-device/index.d.ts.map +1 -1
  404. package/lib/typescript/commonjs/src/modules/bt-device-instructions/index.d.ts +4 -0
  405. package/lib/typescript/commonjs/src/modules/bt-device-instructions/index.d.ts.map +1 -0
  406. package/lib/typescript/commonjs/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts +14 -0
  407. package/lib/typescript/commonjs/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -0
  408. package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  409. package/lib/typescript/commonjs/src/modules/bt-management/constants/measurement-field-catalog.d.ts.map +1 -1
  410. package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +48 -0
  411. package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -0
  412. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-background-sync.d.ts +14 -0
  413. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-background-sync.d.ts.map +1 -0
  414. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-state.d.ts +11 -0
  415. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-state.d.ts.map +1 -0
  416. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-device-connection.d.ts +7 -0
  417. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-device-connection.d.ts.map +1 -0
  418. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-health-import.d.ts +16 -0
  419. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-health-import.d.ts.map +1 -0
  420. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts +11 -0
  421. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -0
  422. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-devices.d.ts +8 -0
  423. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-devices.d.ts.map +1 -0
  424. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-paired-devices.d.ts +16 -0
  425. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-paired-devices.d.ts.map +1 -0
  426. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-scan-control.d.ts +7 -0
  427. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-scan-control.d.ts.map +1 -0
  428. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +14 -0
  429. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
  430. package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
  431. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +22 -0
  432. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  433. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +4 -0
  434. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  435. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +10 -1
  436. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  437. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  438. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +1 -0
  439. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
  440. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/measurement-state-machine.d.ts +3 -2
  441. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/measurement-state-machine.d.ts.map +1 -1
  442. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/spo/spo2.main-services.d.ts.map +1 -1
  443. package/lib/typescript/commonjs/src/modules/bt-management/services/push-notification.d.ts +8 -0
  444. package/lib/typescript/commonjs/src/modules/bt-management/services/push-notification.d.ts.map +1 -0
  445. package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts +33 -0
  446. package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -0
  447. package/lib/typescript/commonjs/src/modules/bt-management/testing/index.d.ts +3 -0
  448. package/lib/typescript/commonjs/src/modules/bt-management/testing/index.d.ts.map +1 -0
  449. package/lib/typescript/commonjs/src/modules/bt-management/testing/recorded-frames.d.ts +12 -0
  450. package/lib/typescript/commonjs/src/modules/bt-management/testing/recorded-frames.d.ts.map +1 -0
  451. package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts +3 -1
  452. package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
  453. package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-error.d.ts +23 -0
  454. package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -0
  455. package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts +4 -0
  456. package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
  457. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts +2 -0
  458. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
  459. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts +4 -0
  460. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  461. package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts +16 -0
  462. package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -0
  463. package/lib/typescript/commonjs/src/modules/bt-management/types/error-callback.d.ts +5 -2
  464. package/lib/typescript/commonjs/src/modules/bt-management/types/error-callback.d.ts.map +1 -1
  465. package/lib/typescript/commonjs/src/modules/bt-management/types/i-bt-managed-device.d.ts +1 -0
  466. package/lib/typescript/commonjs/src/modules/bt-management/types/i-bt-managed-device.d.ts.map +1 -1
  467. package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts +2 -0
  468. package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
  469. package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts +8 -0
  470. package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts.map +1 -0
  471. package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts +10 -0
  472. package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts.map +1 -0
  473. package/lib/typescript/commonjs/src/modules/data-sync/components/android/android-health-connect-authorization-provider.d.ts.map +1 -1
  474. package/lib/typescript/commonjs/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
  475. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts +4 -0
  476. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
  477. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
  478. package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts +2 -0
  479. package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
  480. package/lib/typescript/commonjs/src/modules/data-sync/types/sync-progress.d.ts +1 -1
  481. package/lib/typescript/commonjs/src/modules/data-sync/types/sync-progress.d.ts.map +1 -1
  482. package/lib/typescript/commonjs/src/modules/data-sync/utils/generate-observation-entry.d.ts.map +1 -1
  483. package/lib/typescript/commonjs/src/modules/data-sync/utils/retry-save.d.ts +6 -0
  484. package/lib/typescript/commonjs/src/modules/data-sync/utils/retry-save.d.ts.map +1 -0
  485. package/lib/typescript/commonjs/src/modules/helpers/form-items/form-field.d.ts +4 -1
  486. package/lib/typescript/commonjs/src/modules/helpers/form-items/form-field.d.ts.map +1 -1
  487. package/lib/typescript/commonjs/src/modules/helpers/index.d.ts +2 -1
  488. package/lib/typescript/commonjs/src/modules/helpers/index.d.ts.map +1 -1
  489. package/lib/typescript/commonjs/src/modules/helpers/utils/s-log.d.ts.map +1 -1
  490. package/lib/typescript/commonjs/src/modules/helpers/utils/sentry-logger.d.ts +7 -1
  491. package/lib/typescript/commonjs/src/modules/helpers/utils/sentry-logger.d.ts.map +1 -1
  492. package/lib/typescript/commonjs/src/modules/helpers/utils/telemetry.d.ts +69 -0
  493. package/lib/typescript/commonjs/src/modules/helpers/utils/telemetry.d.ts.map +1 -0
  494. package/lib/typescript/commonjs/src/modules/image/components/optimized-image.d.ts +1 -1
  495. package/lib/typescript/commonjs/src/modules/image/components/optimized-image.d.ts.map +1 -1
  496. package/lib/typescript/commonjs/src/modules/image/types/optimized-image-props.d.ts +4 -0
  497. package/lib/typescript/commonjs/src/modules/image/types/optimized-image-props.d.ts.map +1 -1
  498. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/content/questionnaire-content-error.d.ts.map +1 -1
  499. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.d.ts.map +1 -1
  500. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.d.ts.map +1 -1
  501. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts.map +1 -1
  502. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-navigation-provider.d.ts.map +1 -1
  503. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts +1 -0
  504. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts.map +1 -1
  505. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts +1 -0
  506. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts.map +1 -1
  507. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts +1 -0
  508. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts.map +1 -1
  509. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts +2 -0
  510. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts.map +1 -1
  511. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts +1 -0
  512. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts.map +1 -1
  513. package/lib/typescript/commonjs/src/modules/tile/components/task-icon.d.ts.map +1 -1
  514. package/lib/typescript/commonjs/src/modules/tile/constants/measurement-icon-svg.d.ts +1 -0
  515. package/lib/typescript/commonjs/src/modules/tile/constants/measurement-icon-svg.d.ts.map +1 -1
  516. package/lib/typescript/commonjs/src/modules/ui/components/background-sync-setting.d.ts +9 -0
  517. package/lib/typescript/commonjs/src/modules/ui/components/background-sync-setting.d.ts.map +1 -0
  518. package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts +12 -0
  519. package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -0
  520. package/lib/typescript/commonjs/src/modules/ui/components/ecg-strip-viewer.d.ts +17 -0
  521. package/lib/typescript/commonjs/src/modules/ui/components/ecg-strip-viewer.d.ts.map +1 -0
  522. package/lib/typescript/commonjs/src/modules/ui/components/health-import-card.d.ts +13 -0
  523. package/lib/typescript/commonjs/src/modules/ui/components/health-import-card.d.ts.map +1 -0
  524. package/lib/typescript/commonjs/src/modules/ui/components/manual-entry-form.d.ts +21 -0
  525. package/lib/typescript/commonjs/src/modules/ui/components/manual-entry-form.d.ts.map +1 -0
  526. package/lib/typescript/commonjs/src/modules/ui/components/pairing-flow.d.ts +15 -0
  527. package/lib/typescript/commonjs/src/modules/ui/components/pairing-flow.d.ts.map +1 -0
  528. package/lib/typescript/commonjs/src/modules/ui/components/supported-devices-catalog-list.d.ts +16 -0
  529. package/lib/typescript/commonjs/src/modules/ui/components/supported-devices-catalog-list.d.ts.map +1 -0
  530. package/lib/typescript/commonjs/src/modules/ui/components/urine-test-result.d.ts +10 -0
  531. package/lib/typescript/commonjs/src/modules/ui/components/urine-test-result.d.ts.map +1 -0
  532. package/lib/typescript/commonjs/src/modules/ui/index.d.ts +11 -0
  533. package/lib/typescript/commonjs/src/modules/ui/index.d.ts.map +1 -0
  534. package/lib/typescript/commonjs/src/modules/ui/types.d.ts +24 -0
  535. package/lib/typescript/commonjs/src/modules/ui/types.d.ts.map +1 -0
  536. package/lib/typescript/commonjs/src/modules/ui/use-ovok-ui.d.ts +7 -0
  537. package/lib/typescript/commonjs/src/modules/ui/use-ovok-ui.d.ts.map +1 -0
  538. package/lib/typescript/module/src/index.d.ts +0 -9
  539. package/lib/typescript/module/src/index.d.ts.map +1 -1
  540. package/lib/typescript/module/src/modules/auth/delete-account-button/components/delete-account-button.d.ts.map +1 -1
  541. package/lib/typescript/module/src/modules/auth/hooks/use-rate-limit-cooldown.d.ts +2 -0
  542. package/lib/typescript/module/src/modules/auth/hooks/use-rate-limit-cooldown.d.ts.map +1 -0
  543. package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts +16 -0
  544. package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts.map +1 -0
  545. package/lib/typescript/module/src/modules/auth/index.d.ts +4 -0
  546. package/lib/typescript/module/src/modules/auth/index.d.ts.map +1 -1
  547. package/lib/typescript/module/src/modules/auth/logout-button/components/logout-button.d.ts.map +1 -1
  548. package/lib/typescript/module/src/modules/auth/register/components/form/inputs.d.ts.map +1 -1
  549. package/lib/typescript/module/src/modules/auth/register/components/form/register-button.d.ts.map +1 -1
  550. package/lib/typescript/module/src/modules/auth/register/components/form/register-form-provider.d.ts.map +1 -1
  551. package/lib/typescript/module/src/modules/auth/reset-password/components/form/inputs.d.ts.map +1 -1
  552. package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-button.d.ts.map +1 -1
  553. package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts.map +1 -1
  554. package/lib/typescript/module/src/modules/auth/session/components/session-list.d.ts +4 -0
  555. package/lib/typescript/module/src/modules/auth/session/components/session-list.d.ts.map +1 -0
  556. package/lib/typescript/module/src/modules/auth/session/events.d.ts +5 -0
  557. package/lib/typescript/module/src/modules/auth/session/events.d.ts.map +1 -0
  558. package/lib/typescript/module/src/modules/auth/session/index.d.ts +3 -0
  559. package/lib/typescript/module/src/modules/auth/session/index.d.ts.map +1 -0
  560. package/lib/typescript/module/src/modules/auth/session/types/session-list-props.d.ts +5 -0
  561. package/lib/typescript/module/src/modules/auth/session/types/session-list-props.d.ts.map +1 -0
  562. package/lib/typescript/module/src/modules/auth/sign-in/components/form/inputs.d.ts.map +1 -1
  563. package/lib/typescript/module/src/modules/auth/sign-in/components/form/login-form-provider.d.ts.map +1 -1
  564. package/lib/typescript/module/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts +9 -0
  565. package/lib/typescript/module/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts.map +1 -0
  566. package/lib/typescript/module/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts +4 -0
  567. package/lib/typescript/module/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts.map +1 -1
  568. package/lib/typescript/module/src/modules/auth/sign-in/components/form/signin-button.d.ts.map +1 -1
  569. package/lib/typescript/module/src/modules/auth/sign-in/components/sign-in.d.ts +4 -0
  570. package/lib/typescript/module/src/modules/auth/sign-in/components/sign-in.d.ts.map +1 -1
  571. package/lib/typescript/module/src/modules/auth/sign-in/contexts/login-form-context.d.ts +2 -46
  572. package/lib/typescript/module/src/modules/auth/sign-in/contexts/login-form-context.d.ts.map +1 -1
  573. package/lib/typescript/module/src/modules/auth/sign-in/hooks/use-login-form.d.ts +1 -47
  574. package/lib/typescript/module/src/modules/auth/sign-in/hooks/use-login-form.d.ts.map +1 -1
  575. package/lib/typescript/module/src/modules/auth/sign-in/types/login-form-context-type.d.ts +11 -1
  576. package/lib/typescript/module/src/modules/auth/sign-in/types/login-form-context-type.d.ts.map +1 -1
  577. package/lib/typescript/module/src/modules/auth/types/session.d.ts +10 -0
  578. package/lib/typescript/module/src/modules/auth/types/session.d.ts.map +1 -0
  579. package/lib/typescript/module/src/modules/auth/utils/rate-limit.d.ts +11 -0
  580. package/lib/typescript/module/src/modules/auth/utils/rate-limit.d.ts.map +1 -0
  581. package/lib/typescript/module/src/modules/background-sync/android-bluetooth-foreground-service.d.ts.map +1 -1
  582. package/lib/typescript/module/src/modules/background-sync/background-safe-storage.d.ts +31 -0
  583. package/lib/typescript/module/src/modules/background-sync/background-safe-storage.d.ts.map +1 -0
  584. package/lib/typescript/module/src/modules/background-sync/index.d.ts +1 -0
  585. package/lib/typescript/module/src/modules/background-sync/index.d.ts.map +1 -1
  586. package/lib/typescript/module/src/modules/bt-device/index.d.ts +0 -2
  587. package/lib/typescript/module/src/modules/bt-device/index.d.ts.map +1 -1
  588. package/lib/typescript/module/src/modules/bt-device-instructions/index.d.ts +4 -0
  589. package/lib/typescript/module/src/modules/bt-device-instructions/index.d.ts.map +1 -0
  590. package/lib/typescript/module/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts +14 -0
  591. package/lib/typescript/module/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -0
  592. package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  593. package/lib/typescript/module/src/modules/bt-management/constants/measurement-field-catalog.d.ts.map +1 -1
  594. package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +48 -0
  595. package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -0
  596. package/lib/typescript/module/src/modules/bt-management/hooks/use-background-sync.d.ts +14 -0
  597. package/lib/typescript/module/src/modules/bt-management/hooks/use-background-sync.d.ts.map +1 -0
  598. package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-state.d.ts +11 -0
  599. package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-state.d.ts.map +1 -0
  600. package/lib/typescript/module/src/modules/bt-management/hooks/use-device-connection.d.ts +7 -0
  601. package/lib/typescript/module/src/modules/bt-management/hooks/use-device-connection.d.ts.map +1 -0
  602. package/lib/typescript/module/src/modules/bt-management/hooks/use-health-import.d.ts +16 -0
  603. package/lib/typescript/module/src/modules/bt-management/hooks/use-health-import.d.ts.map +1 -0
  604. package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts +11 -0
  605. package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -0
  606. package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-devices.d.ts +8 -0
  607. package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-devices.d.ts.map +1 -0
  608. package/lib/typescript/module/src/modules/bt-management/hooks/use-paired-devices.d.ts +16 -0
  609. package/lib/typescript/module/src/modules/bt-management/hooks/use-paired-devices.d.ts.map +1 -0
  610. package/lib/typescript/module/src/modules/bt-management/hooks/use-scan-control.d.ts +7 -0
  611. package/lib/typescript/module/src/modules/bt-management/hooks/use-scan-control.d.ts.map +1 -0
  612. package/lib/typescript/module/src/modules/bt-management/index.d.ts +14 -0
  613. package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
  614. package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
  615. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +22 -0
  616. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  617. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +4 -0
  618. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  619. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +10 -1
  620. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  621. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  622. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +1 -0
  623. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
  624. package/lib/typescript/module/src/modules/bt-management/services/devices/measurement-state-machine.d.ts +3 -2
  625. package/lib/typescript/module/src/modules/bt-management/services/devices/measurement-state-machine.d.ts.map +1 -1
  626. package/lib/typescript/module/src/modules/bt-management/services/devices/spo/spo2.main-services.d.ts.map +1 -1
  627. package/lib/typescript/module/src/modules/bt-management/services/push-notification.d.ts +8 -0
  628. package/lib/typescript/module/src/modules/bt-management/services/push-notification.d.ts.map +1 -0
  629. package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts +33 -0
  630. package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -0
  631. package/lib/typescript/module/src/modules/bt-management/testing/index.d.ts +3 -0
  632. package/lib/typescript/module/src/modules/bt-management/testing/index.d.ts.map +1 -0
  633. package/lib/typescript/module/src/modules/bt-management/testing/recorded-frames.d.ts +12 -0
  634. package/lib/typescript/module/src/modules/bt-management/testing/recorded-frames.d.ts.map +1 -0
  635. package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts +3 -1
  636. package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
  637. package/lib/typescript/module/src/modules/bt-management/types/bluetooth-error.d.ts +23 -0
  638. package/lib/typescript/module/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -0
  639. package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts +4 -0
  640. package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
  641. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts +2 -0
  642. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
  643. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts +4 -0
  644. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  645. package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts +16 -0
  646. package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -0
  647. package/lib/typescript/module/src/modules/bt-management/types/error-callback.d.ts +5 -2
  648. package/lib/typescript/module/src/modules/bt-management/types/error-callback.d.ts.map +1 -1
  649. package/lib/typescript/module/src/modules/bt-management/types/i-bt-managed-device.d.ts +1 -0
  650. package/lib/typescript/module/src/modules/bt-management/types/i-bt-managed-device.d.ts.map +1 -1
  651. package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts +2 -0
  652. package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
  653. package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts +8 -0
  654. package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts.map +1 -0
  655. package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts +10 -0
  656. package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts.map +1 -0
  657. package/lib/typescript/module/src/modules/data-sync/components/android/android-health-connect-authorization-provider.d.ts.map +1 -1
  658. package/lib/typescript/module/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
  659. package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts +4 -0
  660. package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
  661. package/lib/typescript/module/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
  662. package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts +2 -0
  663. package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
  664. package/lib/typescript/module/src/modules/data-sync/types/sync-progress.d.ts +1 -1
  665. package/lib/typescript/module/src/modules/data-sync/types/sync-progress.d.ts.map +1 -1
  666. package/lib/typescript/module/src/modules/data-sync/utils/generate-observation-entry.d.ts.map +1 -1
  667. package/lib/typescript/module/src/modules/data-sync/utils/retry-save.d.ts +6 -0
  668. package/lib/typescript/module/src/modules/data-sync/utils/retry-save.d.ts.map +1 -0
  669. package/lib/typescript/module/src/modules/helpers/form-items/form-field.d.ts +4 -1
  670. package/lib/typescript/module/src/modules/helpers/form-items/form-field.d.ts.map +1 -1
  671. package/lib/typescript/module/src/modules/helpers/index.d.ts +2 -1
  672. package/lib/typescript/module/src/modules/helpers/index.d.ts.map +1 -1
  673. package/lib/typescript/module/src/modules/helpers/utils/s-log.d.ts.map +1 -1
  674. package/lib/typescript/module/src/modules/helpers/utils/sentry-logger.d.ts +7 -1
  675. package/lib/typescript/module/src/modules/helpers/utils/sentry-logger.d.ts.map +1 -1
  676. package/lib/typescript/module/src/modules/helpers/utils/telemetry.d.ts +69 -0
  677. package/lib/typescript/module/src/modules/helpers/utils/telemetry.d.ts.map +1 -0
  678. package/lib/typescript/module/src/modules/image/components/optimized-image.d.ts +1 -1
  679. package/lib/typescript/module/src/modules/image/components/optimized-image.d.ts.map +1 -1
  680. package/lib/typescript/module/src/modules/image/types/optimized-image-props.d.ts +4 -0
  681. package/lib/typescript/module/src/modules/image/types/optimized-image-props.d.ts.map +1 -1
  682. package/lib/typescript/module/src/modules/questionnaire-response-form/components/content/questionnaire-content-error.d.ts.map +1 -1
  683. package/lib/typescript/module/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.d.ts.map +1 -1
  684. package/lib/typescript/module/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.d.ts.map +1 -1
  685. package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts.map +1 -1
  686. package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-navigation-provider.d.ts.map +1 -1
  687. package/lib/typescript/module/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts +1 -0
  688. package/lib/typescript/module/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts.map +1 -1
  689. package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts +1 -0
  690. package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts.map +1 -1
  691. package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts +1 -0
  692. package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts.map +1 -1
  693. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts +2 -0
  694. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts.map +1 -1
  695. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts +1 -0
  696. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts.map +1 -1
  697. package/lib/typescript/module/src/modules/tile/components/task-icon.d.ts.map +1 -1
  698. package/lib/typescript/module/src/modules/tile/constants/measurement-icon-svg.d.ts +1 -0
  699. package/lib/typescript/module/src/modules/tile/constants/measurement-icon-svg.d.ts.map +1 -1
  700. package/lib/typescript/module/src/modules/ui/components/background-sync-setting.d.ts +9 -0
  701. package/lib/typescript/module/src/modules/ui/components/background-sync-setting.d.ts.map +1 -0
  702. package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts +12 -0
  703. package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -0
  704. package/lib/typescript/module/src/modules/ui/components/ecg-strip-viewer.d.ts +17 -0
  705. package/lib/typescript/module/src/modules/ui/components/ecg-strip-viewer.d.ts.map +1 -0
  706. package/lib/typescript/module/src/modules/ui/components/health-import-card.d.ts +13 -0
  707. package/lib/typescript/module/src/modules/ui/components/health-import-card.d.ts.map +1 -0
  708. package/lib/typescript/module/src/modules/ui/components/manual-entry-form.d.ts +21 -0
  709. package/lib/typescript/module/src/modules/ui/components/manual-entry-form.d.ts.map +1 -0
  710. package/lib/typescript/module/src/modules/ui/components/pairing-flow.d.ts +15 -0
  711. package/lib/typescript/module/src/modules/ui/components/pairing-flow.d.ts.map +1 -0
  712. package/lib/typescript/module/src/modules/ui/components/supported-devices-catalog-list.d.ts +16 -0
  713. package/lib/typescript/module/src/modules/ui/components/supported-devices-catalog-list.d.ts.map +1 -0
  714. package/lib/typescript/module/src/modules/ui/components/urine-test-result.d.ts +10 -0
  715. package/lib/typescript/module/src/modules/ui/components/urine-test-result.d.ts.map +1 -0
  716. package/lib/typescript/module/src/modules/ui/index.d.ts +11 -0
  717. package/lib/typescript/module/src/modules/ui/index.d.ts.map +1 -0
  718. package/lib/typescript/module/src/modules/ui/types.d.ts +24 -0
  719. package/lib/typescript/module/src/modules/ui/types.d.ts.map +1 -0
  720. package/lib/typescript/module/src/modules/ui/use-ovok-ui.d.ts +7 -0
  721. package/lib/typescript/module/src/modules/ui/use-ovok-ui.d.ts.map +1 -0
  722. package/package.json +146 -7
@@ -0,0 +1,241 @@
1
+ "use strict";
2
+
3
+ /* eslint-disable import/group-exports */
4
+
5
+ import * as React from "react";
6
+ import { FlatList, Image, Pressable, StyleSheet, View } from "react-native";
7
+ import { Button as PaperButton, Card as PaperCard, Text as PaperText, TextInput } from "react-native-paper";
8
+ import { useNearbyDevices, usePairedDevices, useRuntimeEvent } from "../../bt-management/index.js";
9
+ import { useOvokUi } from "../use-ovok-ui.js";
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ const deviceLabel = device => device.deviceData.model || device.deviceData.localName || String(device.deviceData.name);
12
+ export const PairingFlow = ({
13
+ storage,
14
+ storageKey,
15
+ getDeviceImage,
16
+ onPaired,
17
+ onPairingCode,
18
+ onError,
19
+ testID,
20
+ theme: themeOverride,
21
+ slots
22
+ }) => {
23
+ const {
24
+ theme,
25
+ slots: uiSlots
26
+ } = useOvokUi({
27
+ theme: themeOverride,
28
+ slots
29
+ });
30
+ const {
31
+ devices,
32
+ pair: pairNearby
33
+ } = useNearbyDevices();
34
+ const {
35
+ paired,
36
+ pair: remember
37
+ } = usePairedDevices({
38
+ storage,
39
+ storageKey
40
+ });
41
+ const [selected, setSelected] = React.useState();
42
+ const [status, setStatus] = React.useState("idle");
43
+ const [code, setCode] = React.useState("");
44
+ const [error, setError] = React.useState();
45
+ const bondedRef = React.useRef(false);
46
+ const pairingCodeRequiredRef = React.useRef(false);
47
+ const Text = uiSlots.Text ?? PaperText;
48
+ const Button = uiSlots.Button ?? PaperButton;
49
+ const Card = uiSlots.Card ?? PaperCard;
50
+ useRuntimeEvent("connection", event => {
51
+ if (!selected || event.deviceData.id !== selected.id) {
52
+ return;
53
+ }
54
+ if (event.kind === "pairing" && event.pairingCodeRequired) {
55
+ pairingCodeRequiredRef.current = true;
56
+ setStatus("code-required");
57
+ } else if (event.kind === "bonded") {
58
+ bondedRef.current = true;
59
+ setStatus("paired");
60
+ }
61
+ });
62
+ const startPairing = async device => {
63
+ setSelected(device);
64
+ setError(undefined);
65
+ setStatus("pairing");
66
+ bondedRef.current = false;
67
+ pairingCodeRequiredRef.current = false;
68
+ try {
69
+ await pairNearby(device.id);
70
+ if (bondedRef.current) {
71
+ await remember(device);
72
+ setStatus("paired");
73
+ onPaired?.(device);
74
+ }
75
+ } catch (cause) {
76
+ const nextError = cause instanceof Error ? cause : new Error(String(cause));
77
+ if (!pairingCodeRequiredRef.current) {
78
+ setStatus("error");
79
+ setError(nextError.message);
80
+ }
81
+ onError?.(nextError, device);
82
+ }
83
+ };
84
+ const submitCode = async () => {
85
+ if (!selected || !code.trim()) {
86
+ return;
87
+ }
88
+ try {
89
+ await onPairingCode?.(code.trim(), selected);
90
+ setCode("");
91
+ setStatus("pairing");
92
+ } catch (cause) {
93
+ const nextError = cause instanceof Error ? cause : new Error(String(cause));
94
+ setStatus("error");
95
+ setError(nextError.message);
96
+ onError?.(nextError, selected);
97
+ }
98
+ };
99
+ const renderDevice = ({
100
+ item
101
+ }) => {
102
+ const image = getDeviceImage?.(item);
103
+ return /*#__PURE__*/_jsxs(Pressable, {
104
+ accessible: false,
105
+ onPress: () => void startPairing(item),
106
+ style: ({
107
+ pressed
108
+ }) => [styles.deviceRow, {
109
+ borderColor: theme.colors.outlineVariant
110
+ }, pressed && styles.pressed],
111
+ children: [image ? /*#__PURE__*/_jsx(Image, {
112
+ source: {
113
+ uri: image
114
+ },
115
+ style: styles.image
116
+ }) : null, /*#__PURE__*/_jsxs(View, {
117
+ style: styles.deviceCopy,
118
+ children: [Text ? /*#__PURE__*/_jsx(Text, {
119
+ theme: theme,
120
+ variant: "titleMedium",
121
+ children: deviceLabel(item)
122
+ }) : null, Text ? /*#__PURE__*/_jsx(Text, {
123
+ theme: theme,
124
+ variant: "bodySmall",
125
+ children: item.deviceData.manufacturerName || "Bluetooth device"
126
+ }) : null]
127
+ }), Button ? /*#__PURE__*/_jsx(Button, {
128
+ theme: theme,
129
+ mode: "outlined",
130
+ compact: true,
131
+ onPress: () => void startPairing(item),
132
+ children: "Pair"
133
+ }) : null]
134
+ });
135
+ };
136
+ const content = /*#__PURE__*/_jsxs(View, {
137
+ testID: testID,
138
+ style: styles.container,
139
+ children: [Text ? /*#__PURE__*/_jsx(Text, {
140
+ theme: theme,
141
+ variant: "headlineSmall",
142
+ children: "Add a device"
143
+ }) : null, Text ? /*#__PURE__*/_jsx(Text, {
144
+ theme: theme,
145
+ variant: "bodyMedium",
146
+ children: "Wake your monitor and choose it when it appears nearby."
147
+ }) : null, /*#__PURE__*/_jsx(FlatList, {
148
+ data: devices,
149
+ keyExtractor: item => item.id,
150
+ renderItem: renderDevice,
151
+ ListEmptyComponent: Text ? /*#__PURE__*/_jsx(Text, {
152
+ theme: theme,
153
+ variant: "bodyMedium",
154
+ children: "No supported devices found yet."
155
+ }) : null,
156
+ contentContainerStyle: styles.list
157
+ }), selected && status === "code-required" ? /*#__PURE__*/_jsxs(View, {
158
+ style: styles.codePrompt,
159
+ children: [Text ? /*#__PURE__*/_jsx(Text, {
160
+ theme: theme,
161
+ variant: "titleMedium",
162
+ children: "Type the code your monitor shows"
163
+ }) : null, /*#__PURE__*/_jsx(TextInput, {
164
+ theme: theme,
165
+ label: "Pairing code",
166
+ value: code,
167
+ onChangeText: setCode,
168
+ keyboardType: "number-pad",
169
+ autoFocus: true,
170
+ testID: testID ? `${testID}-code` : undefined
171
+ }), Button ? /*#__PURE__*/_jsx(Button, {
172
+ theme: theme,
173
+ mode: "contained",
174
+ onPress: () => void submitCode(),
175
+ children: "Continue"
176
+ }) : null]
177
+ }) : null, selected && status === "pairing" && Text ? /*#__PURE__*/_jsxs(Text, {
178
+ theme: theme,
179
+ variant: "bodyMedium",
180
+ children: ["Pairing ", deviceLabel(selected), "\u2026"]
181
+ }) : null, selected && status === "paired" && Text ? /*#__PURE__*/_jsxs(Text, {
182
+ theme: theme,
183
+ variant: "bodyMedium",
184
+ children: [deviceLabel(selected), " is ready."]
185
+ }) : null, error && Text ? /*#__PURE__*/_jsx(Text, {
186
+ theme: theme,
187
+ variant: "bodyMedium",
188
+ style: {
189
+ color: theme.colors.error
190
+ },
191
+ children: error
192
+ }) : null, selected && status === "error" && Button ? /*#__PURE__*/_jsx(Button, {
193
+ theme: theme,
194
+ mode: "outlined",
195
+ onPress: () => void startPairing(selected),
196
+ children: "Try again"
197
+ }) : null, Text && paired.length > 0 ? /*#__PURE__*/_jsxs(Text, {
198
+ theme: theme,
199
+ variant: "bodySmall",
200
+ children: [paired.length, " device", paired.length === 1 ? "" : "s", " remembered"]
201
+ }) : null]
202
+ });
203
+ return Card ? /*#__PURE__*/_jsx(Card, {
204
+ theme: theme,
205
+ mode: "contained",
206
+ children: content
207
+ }) : content;
208
+ };
209
+ const styles = StyleSheet.create({
210
+ container: {
211
+ gap: 12,
212
+ padding: 16
213
+ },
214
+ list: {
215
+ gap: 8
216
+ },
217
+ deviceRow: {
218
+ alignItems: "center",
219
+ borderWidth: StyleSheet.hairlineWidth,
220
+ borderRadius: 12,
221
+ flexDirection: "row",
222
+ gap: 12,
223
+ padding: 12
224
+ },
225
+ deviceCopy: {
226
+ flex: 1,
227
+ gap: 2
228
+ },
229
+ image: {
230
+ borderRadius: 8,
231
+ height: 48,
232
+ width: 48
233
+ },
234
+ pressed: {
235
+ opacity: 0.65
236
+ },
237
+ codePrompt: {
238
+ gap: 10
239
+ }
240
+ });
241
+ //# sourceMappingURL=pairing-flow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","FlatList","Image","Pressable","StyleSheet","View","Button","PaperButton","Card","PaperCard","Text","PaperText","TextInput","useNearbyDevices","usePairedDevices","useRuntimeEvent","useOvokUi","jsx","_jsx","jsxs","_jsxs","deviceLabel","device","deviceData","model","localName","String","name","PairingFlow","storage","storageKey","getDeviceImage","onPaired","onPairingCode","onError","testID","theme","themeOverride","slots","uiSlots","devices","pair","pairNearby","paired","remember","selected","setSelected","useState","status","setStatus","code","setCode","error","setError","bondedRef","useRef","pairingCodeRequiredRef","event","id","kind","pairingCodeRequired","current","startPairing","undefined","cause","nextError","Error","message","submitCode","trim","renderDevice","item","image","accessible","onPress","style","pressed","styles","deviceRow","borderColor","colors","outlineVariant","children","source","uri","deviceCopy","variant","manufacturerName","mode","compact","content","container","data","keyExtractor","renderItem","ListEmptyComponent","contentContainerStyle","list","codePrompt","label","value","onChangeText","keyboardType","autoFocus","color","length","create","gap","padding","alignItems","borderWidth","hairlineWidth","borderRadius","flexDirection","flex","height","width","opacity"],"sourceRoot":"../../../../../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+1,101 @@
1
+ "use strict";
2
+
3
+ import * as React from "react";
4
+ import { FlatList, Image, Linking, StyleSheet, View } from "react-native";
5
+ import { Button as PaperButton, Card as PaperCard, Text as PaperText } from "react-native-paper";
6
+ import { SUPPORTED_DEVICES } from "../../bt-device/index.js";
7
+ import { useOvokUi } from "../use-ovok-ui.js";
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ export const SupportedDevicesCatalogList = ({
10
+ devices = SUPPORTED_DEVICES,
11
+ onSelect,
12
+ renderPhoto,
13
+ renderCredit,
14
+ renderMeasurementTypes,
15
+ renderManual,
16
+ renderPairingTips,
17
+ labelForMeasurementType = type => type,
18
+ testID,
19
+ ...uiProps
20
+ }) => {
21
+ const {
22
+ theme,
23
+ slots
24
+ } = useOvokUi(uiProps);
25
+ const Button = slots.Button ?? PaperButton;
26
+ const Card = slots.Card ?? PaperCard;
27
+ const Text = slots.Text ?? PaperText;
28
+ const renderItem = ({
29
+ item
30
+ }) => /*#__PURE__*/_jsx(Card, {
31
+ theme: theme,
32
+ testID: testID ? `${testID}-${item.id}` : undefined,
33
+ style: {
34
+ borderRadius: theme.borderRadius(2)
35
+ },
36
+ children: /*#__PURE__*/_jsxs(View, {
37
+ style: styles.content,
38
+ children: [renderPhoto?.(item) ?? /*#__PURE__*/_jsx(Image, {
39
+ accessibilityLabel: item.name,
40
+ source: {
41
+ uri: item.logo
42
+ },
43
+ style: styles.image
44
+ }), /*#__PURE__*/_jsx(Text, {
45
+ theme: theme,
46
+ variant: "titleMedium",
47
+ children: item.name
48
+ }), /*#__PURE__*/_jsx(Text, {
49
+ theme: theme,
50
+ children: item.manufacturer
51
+ }), renderMeasurementTypes?.(item) ?? /*#__PURE__*/_jsxs(Text, {
52
+ theme: theme,
53
+ children: ["Measures: ", item.measurementTypes.map(labelForMeasurementType).join(", ") || "Not specified"]
54
+ }), renderPairingTips?.(item) ?? /*#__PURE__*/_jsx(Text, {
55
+ theme: theme,
56
+ children: "Follow the device instructions before pairing."
57
+ }), renderCredit?.(item) ?? /*#__PURE__*/_jsxs(Text, {
58
+ theme: theme,
59
+ selectable: true,
60
+ style: {
61
+ color: theme.colors.onSurfaceVariant
62
+ },
63
+ children: ["Image credit: ", item.creditsForImage]
64
+ }), item.manualUrl && (renderManual?.(item) ?? /*#__PURE__*/_jsx(Button, {
65
+ theme: theme,
66
+ mode: "text",
67
+ onPress: () => void Linking.openURL(item.manualUrl),
68
+ children: "Open device manual"
69
+ })), onSelect && /*#__PURE__*/_jsx(Button, {
70
+ theme: theme,
71
+ mode: "outlined",
72
+ onPress: () => onSelect(item),
73
+ children: "Select device"
74
+ })]
75
+ })
76
+ });
77
+ return /*#__PURE__*/_jsx(FlatList, {
78
+ testID: testID,
79
+ data: devices,
80
+ keyExtractor: item => item.id,
81
+ renderItem: renderItem,
82
+ contentContainerStyle: [styles.list, {
83
+ gap: theme.spacing(2)
84
+ }]
85
+ });
86
+ };
87
+ const styles = StyleSheet.create({
88
+ content: {
89
+ gap: 8,
90
+ padding: 16
91
+ },
92
+ image: {
93
+ alignSelf: "center",
94
+ height: 140,
95
+ width: 140
96
+ },
97
+ list: {
98
+ padding: 16
99
+ }
100
+ });
101
+ //# sourceMappingURL=supported-devices-catalog-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","FlatList","Image","Linking","StyleSheet","View","Button","PaperButton","Card","PaperCard","Text","PaperText","SUPPORTED_DEVICES","useOvokUi","jsx","_jsx","jsxs","_jsxs","SupportedDevicesCatalogList","devices","onSelect","renderPhoto","renderCredit","renderMeasurementTypes","renderManual","renderPairingTips","labelForMeasurementType","type","testID","uiProps","theme","slots","renderItem","item","id","undefined","style","borderRadius","children","styles","content","accessibilityLabel","name","source","uri","logo","image","variant","manufacturer","measurementTypes","map","join","selectable","color","colors","onSurfaceVariant","creditsForImage","manualUrl","mode","onPress","openURL","data","keyExtractor","contentContainerStyle","list","gap","spacing","create","padding","alignSelf","height","width"],"sourceRoot":"../../../../../src","sources":["mod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IAAI,EAAC,MAAM;QAACC,OAAO,EAAEA,CAAA,KAAM,KAAKxD,OAAO,CAACyD,OAAO,CAAC3B,IAAI,CAACwB,SAAmB,CAAE;QAAAnB,QAAA,EAAC;MAEjG,CAAQ,CACT,CAAC,EACDlB,QAAQ,iBAAIL,IAAA,CAACT,MAAM;QAACwB,KAAK,EAAEA,KAAM;QAAC4B,IAAI,EAAC,UAAU;QAACC,OAAO,EAAEA,CAAA,KAAMvC,QAAQ,CAACa,IAAI,CAAE;QAAAK,QAAA,EAAC;MAAa,CAAQ,CAAC;IAAA,CACpG;EAAC,CACH,CACP;EAED,oBACEvB,IAAA,CAACd,QAAQ;IACP2B,MAAM,EAAEA,MAAO;IACfiC,IAAI,EAAE1C,OAAQ;IACd2C,YAAY,EAAG7B,IAAI,IAAKA,IAAI,CAACC,EAAG;IAChCF,UAAU,EAAEA,UAAW;IACvB+B,qBAAqB,EAAE,CAACxB,MAAM,CAACyB,IAAI,EAAE;MAAEC,GAAG,EAAEnC,KAAK,CAACoC,OAAO,CAAC,CAAC;IAAE,CAAC;EAAE,CACjE,CAAC;AAEN,CAAC;AAED,MAAM3B,MAAM,GAAGnC,UAAU,CAAC+D,MAAM,CAAC;EAC/B3B,OAAO,EAAE;IAAEyB,GAAG,EAAE,CAAC;IAAEG,OAAO,EAAE;EAAG,CAAC;EAChCtB,KAAK,EAAE;IAAEuB,SAAS,EAAE,QAAQ;IAAEC,MAAM,EAAE,GAAG;IAAEC,KAAK,EAAE;EAAI,CAAC;EACvDP,IAAI,EAAE;IAAEI,OAAO,EAAE;EAAG;AACtB,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+
3
+ import { MeasurementTypeKey, URINE_ANALYTE_DEFINITIONS } from "@ovok/core";
4
+ import { StyleSheet, View } from "react-native";
5
+ import { Card as PaperCard, Text as PaperText } from "react-native-paper";
6
+ import { measurementFieldCatalog } from "../../bt-management/index.js";
7
+ import { useOvokUi } from "../use-ovok-ui.js";
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ const qualitativeKeys = new Set(["nit"]);
10
+ const formatValue = (key, value, unit) => {
11
+ if (qualitativeKeys.has(key)) {
12
+ return value === 0 ? "Negative" : "Positive";
13
+ }
14
+ return `${value}${unit ? ` ${unit}` : ""}`;
15
+ };
16
+ export const UrineTestResult = ({
17
+ measurement,
18
+ showOnlyMeasured = false,
19
+ labelForAnalyte = (_key, fallback) => fallback,
20
+ testID,
21
+ ...uiProps
22
+ }) => {
23
+ const {
24
+ theme,
25
+ slots
26
+ } = useOvokUi(uiProps);
27
+ const Card = slots.Card ?? PaperCard;
28
+ const Text = slots.Text ?? PaperText;
29
+ const catalog = measurementFieldCatalog[MeasurementTypeKey.urineAnalysis] ?? measurementFieldCatalog[MeasurementTypeKey.uricAcid] ?? {};
30
+ const rows = URINE_ANALYTE_DEFINITIONS.filter(({
31
+ key
32
+ }) => {
33
+ const value = measurement[key];
34
+ return !showOnlyMeasured || typeof value === "number";
35
+ });
36
+ return /*#__PURE__*/_jsx(Card, {
37
+ theme: theme,
38
+ testID: testID,
39
+ style: {
40
+ borderRadius: theme.borderRadius(2)
41
+ },
42
+ children: /*#__PURE__*/_jsxs(View, {
43
+ style: styles.content,
44
+ children: [/*#__PURE__*/_jsx(Text, {
45
+ theme: theme,
46
+ variant: "titleMedium",
47
+ children: "Urine test result"
48
+ }), rows.map(({
49
+ key,
50
+ display,
51
+ unit
52
+ }) => {
53
+ const value = measurement[key];
54
+ const definition = catalog[key];
55
+ const measured = typeof value === "number";
56
+ const inUsualRange = measured && definition?.normalMin !== undefined && definition.normalMax !== undefined ? value >= definition.normalMin && value <= definition.normalMax : undefined;
57
+ return /*#__PURE__*/_jsxs(View, {
58
+ style: styles.row,
59
+ children: [/*#__PURE__*/_jsxs(View, {
60
+ style: styles.grow,
61
+ children: [/*#__PURE__*/_jsx(Text, {
62
+ theme: theme,
63
+ children: labelForAnalyte(key, display)
64
+ }), inUsualRange !== undefined && /*#__PURE__*/_jsx(Text, {
65
+ theme: theme,
66
+ style: {
67
+ color: inUsualRange ? theme.colors.primary : theme.colors.error
68
+ },
69
+ children: inUsualRange ? "Within usual range" : "Outside usual range"
70
+ })]
71
+ }), /*#__PURE__*/_jsx(Text, {
72
+ theme: theme,
73
+ children: measured ? formatValue(key, value, unit) : "Not measured"
74
+ })]
75
+ }, key);
76
+ })]
77
+ })
78
+ });
79
+ };
80
+ const styles = StyleSheet.create({
81
+ content: {
82
+ gap: 10,
83
+ padding: 16
84
+ },
85
+ grow: {
86
+ flex: 1
87
+ },
88
+ row: {
89
+ alignItems: "flex-start",
90
+ flexDirection: "row",
91
+ gap: 8
92
+ }
93
+ });
94
+ //# sourceMappingURL=urine-test-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["MeasurementTypeKey","URINE_ANALYTE_DEFINITIONS","StyleSheet","View","Card","PaperCard","Text","PaperText","measurementFieldCatalog","useOvokUi","jsx","_jsx","jsxs","_jsxs","qualitativeKeys","Set","formatValue","key","value","unit","has","UrineTestResult","measurement","showOnlyMeasured","labelForAnalyte","_key","fallback","testID","uiProps","theme","slots","catalog","urineAnalysis","uricAcid","rows","filter","style","borderRadius","children","styles","content","variant","map","display","definition","measured","inUsualRange","normalMin","undefined","normalMax","row","grow","color","colors","primary","error","create","gap","padding","flex","alignItems","flexDirection"],"sourceRoot":"../../../../../src","sources":["modules/ui/components/urine-test-result.tsx"],"mappings":";;AAAA,SACEA,kBAAkB,EAClBC,yBAAyB,QAEpB,YAAY;AACnB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,IAAI,IAAIC,SAAS,EAAEC,IAAI,IAAIC,SAAS,QAAQ,oBAAoB;AAEzE,SAASC,uBAAuB,QAAQ,8BAAqB;AAE7D,SAASC,SAAS,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAS3C,MAAMC,eAAe,GAAG,IAA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qB,CACxD,CACP;UAAA,CACG,CAAC,eACPnC,IAAA,CAACL,IAAI;YAACuB,KAAK,EAAEA,KAAM;YAAAS,QAAA,EAAEO,QAAQ,GAAG7B,WAAW,CAACC,GAAG,EAAEC,KAAK,EAAEC,IAAI,CAAC,GAAG;UAAc,CAAO,CAAC;QAAA,GAT7EF,GAUL,CAAC;MAEX,CAAC,CAAC;IAAA,CACE;EAAC,CACH,CAAC;AAEX,CAAC;AAED,MAAMsB,MAAM,GAAGrC,UAAU,CAACsD,MAAM,CAAC;EAC/BhB,OAAO,EAAE;IAAEiB,GAAG,EAAE,EAAE;IAAEC,OAAO,EAAE;EAAG,CAAC;EACjCP,IAAI,EAAE;IAAEQ,IAAI,EAAE;EAAE,CAAC;EACjBT,GAAG,EAAE;IAAEU,UAAU,EAAE,YAAY;IAAEC,aAAa,EAAE,KAAK;IAAEJ,GAAG,EAAE;EAAE;AAChE,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ export * from "./types.js";
4
+ export * from "./use-ovok-ui.js";
5
+ export * from "./components/ecg-strip-viewer.js";
6
+ export * from "./components/manual-entry-form.js";
7
+ export * from "./components/supported-devices-catalog-list.js";
8
+ export * from "./components/bluetooth-state-notice.js";
9
+ export * from "./components/pairing-flow.js";
10
+ export * from "./components/urine-test-result.js";
11
+ export * from "./components/health-import-card.js";
12
+ export * from "./components/background-sync-setting.js";
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/ui/index.ts"],"mappings":";;AAAA,cAAc,YAAS;AACvB,cAAc,kBAAe;AAC7B,cAAc,kCAA+B;AAC7C,cAAc,mCAAgC;AAC9C,cAAc,gDAA6C;AAC3D,cAAc,wCAAqC;AACnD,cAAc,8BAA2B;AACzC,cAAc,mCAAgC;AAC9C,cAAc,oCAAiC;AAC/C,cAAc,yCAAsC","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/ui/types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ /* eslint-disable import/group-exports */
4
+
5
+ import { Button as PaperButton, Card as PaperCard, MD3LightTheme, Text as PaperText, useTheme } from "react-native-paper";
6
+ const defaultTheme = {
7
+ ...MD3LightTheme,
8
+ spacing: value => value * 4,
9
+ borderRadius: value => value * 4
10
+ };
11
+ export const mergeOvokTheme = (base, override) => ({
12
+ ...base,
13
+ ...override,
14
+ colors: {
15
+ ...base.colors,
16
+ ...override?.colors
17
+ },
18
+ fonts: {
19
+ ...base.fonts,
20
+ ...override?.fonts
21
+ }
22
+ });
23
+ export const useOvokUi = ({
24
+ theme: override,
25
+ slots
26
+ } = {}) => {
27
+ const paperTheme = useTheme();
28
+ const appTheme = paperTheme;
29
+ const base = {
30
+ ...defaultTheme,
31
+ ...paperTheme,
32
+ spacing: typeof appTheme.spacing === "function" ? appTheme.spacing : defaultTheme.spacing,
33
+ borderRadius: typeof appTheme.borderRadius === "function" ? appTheme.borderRadius : defaultTheme.borderRadius
34
+ };
35
+ return {
36
+ theme: mergeOvokTheme(base, override),
37
+ slots: {
38
+ Button: PaperButton,
39
+ Card: PaperCard,
40
+ Text: PaperText,
41
+ ...slots
42
+ }
43
+ };
44
+ };
45
+ //# sourceMappingURL=use-ovok-ui.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Button","PaperButton","Card","PaperCard","MD3LightTheme","Text","PaperText","useTheme","defaultTheme","spacing","value","borderRadius","mergeOvokTheme","base","override","colors","fonts","useOvokUi","theme","slots","paperTheme","appTheme"],"sourceRoot":"../../../../src","sources":["modules/ui/use-ovok-ui.ts"],"mappings":";;AAAA;;AAEA,SACEA,MAAM,IAAIC,WAAW,EACrBC,IAAI,IAAIC,SAAS,EACjBC,aAAa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ules/observation-detail";
10
10
  export * from "./modules/content";
11
11
  export * from "./modules/bt-management";
12
12
  export * from "./polyfills";
13
- export * from "./modules/pdf";
14
- export * from "./modules/picker-sheet";
15
- export * from "./modules/bt-device";
16
13
  export * from "./modules/language-switcher";
17
14
  export * from "./modules/journal";
18
- export * from "./modules/breathing-exercise";
19
15
  export * from "./modules/progress-bar";
20
16
  export * from "./modules/patient";
21
- export * from "./modules/bt-management/components/bt-provider";
22
- export * from "./modules/socket";
23
17
  export * from "./modules/questionnaire-response-form";
24
- export * from "./modules/image";
25
- export * from "./modules/data-sync";
26
- export * from "./modules/background-sync";
27
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gDAAgD,CAAC;AAC/D,cAAc,kBAAkB,CAAC;AACjC,cAAc,uCAAuC,CAAC;AACtD,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uCAAuC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"delete-account-button.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/delete-account-button/components/delete-account-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAEhF,eAAO,MAAM,mBAAmB,GAAI,kDAMjC,wBAAwB,sBAoG1B,CAAC"}
1
+ {"version":3,"file":"delete-account-button.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/delete-account-button/components/delete-account-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAEhF,eAAO,MAAM,mBAAmB,GAAI,kDAMjC,wBAAwB,sBAqG1B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const useRateLimitCooldown: (until?: number) => number;
2
+ //# sourceMappingURL=use-rate-limit-cooldown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-rate-limit-cooldown.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/hooks/use-rate-limit-cooldown.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,GAAI,QAAQ,MAAM,KAAG,MAgBrD,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { useClient } from "@ovok/core";
2
+ import { OvokNativeSession, SessionRevokeOption, SessionStatus } from "../types/session";
3
+ export interface UseSessionResult {
4
+ status: SessionStatus;
5
+ isAuthenticated: boolean;
6
+ profile: Awaited<ReturnType<ReturnType<typeof useClient>["getProfileAsync"]>>;
7
+ sessions: OvokNativeSession[];
8
+ loading: boolean;
9
+ error?: Error;
10
+ refresh: () => Promise<void>;
11
+ logout: () => Promise<void>;
12
+ revokeSessions: (option: SessionRevokeOption) => Promise<void>;
13
+ }
14
+ /** Reads and manages the server-side sessions exposed by @ovok/core. */
15
+ export declare const useSession: () => UseSessionResult;
16
+ //# sourceMappingURL=use-session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-session.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/hooks/use-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAKvC,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACd,MAAM,kBAAkB,CAAC;AAuB1B,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,aAAa,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC9E,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,cAAc,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE;AAED,wEAAwE;AACxE,eAAO,MAAM,UAAU,QAAO,gBAwG7B,CAAC"}
@@ -4,4 +4,8 @@ export * from "./profile";
4
4
  export * from "./delete-account-button";
5
5
  export * from "./logout-button";
6
6
  export * from "./reset-password";
7
+ export * from "./hooks/use-rate-limit-cooldown";
8
+ export * from "./utils/rate-limit";
9
+ export * from "./hooks/use-session";
10
+ export * from "./session";
7
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/index.tsx"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/index.tsx"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"logout-button.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/logout-button/components/logout-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,eAAO,MAAM,YAAY,GAAI,kDAM1B,iBAAiB,sBAsBnB,CAAC"}
1
+ {"version":3,"file":"logout-button.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/logout-button/components/logout-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,eAAO,MAAM,YAAY,GAAI,kDAM1B,iBAAiB,sBAwBnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/register/components/form/inputs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,eAAO,MAAM,MAAM,GAAI,+BAA+B,eAAe,sBAkGpE,CAAC"}
1
+ {"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/register/components/form/inputs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,eAAO,MAAM,MAAM,GAAI,+BAA+B,eAAe,sBA4KpE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"register-button.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/register/components/form/register-button.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExE,eAAO,MAAM,cAAc,GAAI,mEAK5B,mBAAmB,gCAiCrB,CAAC"}
1
+ {"version":3,"file":"register-button.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/register/components/form/register-button.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExE,eAAO,MAAM,cAAc,GAAI,mEAK5B,mBAAmB,gCAsCrB,CAAC"}