@ovok/native 1.16.1-rc.3 → 1.16.1-rc.5

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 (837) hide show
  1. package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js +3 -1
  2. package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -1
  3. package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js +9 -141
  4. package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js.map +1 -1
  5. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +1 -0
  6. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  7. package/lib/commonjs/modules/bt-management/components/device-picker-sheet.js +160 -0
  8. package/lib/commonjs/modules/bt-management/components/device-picker-sheet.js.map +1 -0
  9. package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -1
  10. package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-permission.js +2 -1
  11. package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-permission.js.map +1 -1
  12. package/lib/commonjs/modules/bt-management/hooks/use-measurements.js +1 -1
  13. package/lib/commonjs/modules/bt-management/hooks/use-measurements.js.map +1 -1
  14. package/lib/commonjs/modules/bt-management/index.js +12 -0
  15. package/lib/commonjs/modules/bt-management/index.js.map +1 -1
  16. package/lib/commonjs/modules/bt-management/services/bt-manager.js +50 -0
  17. package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
  18. package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js +3 -0
  19. package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
  20. package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js +4 -2
  21. package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
  22. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +97 -28
  23. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  24. package/lib/commonjs/modules/bt-management/services/devices/bt-current-time.js +59 -0
  25. package/lib/commonjs/modules/bt-management/services/devices/bt-current-time.js.map +1 -0
  26. package/lib/commonjs/modules/bt-management/services/devices/bt-device-information.js +18 -37
  27. package/lib/commonjs/modules/bt-management/services/devices/bt-device-information.js.map +1 -1
  28. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +31 -3
  29. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  30. package/lib/commonjs/modules/bt-management/services/devices/bt-notification-readiness.js +68 -0
  31. package/lib/commonjs/modules/bt-management/services/devices/bt-notification-readiness.js.map +1 -0
  32. package/lib/commonjs/modules/bt-management/services/devices/bt-pairing-retry.js +70 -0
  33. package/lib/commonjs/modules/bt-management/services/devices/bt-pairing-retry.js.map +1 -0
  34. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +14 -0
  35. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  36. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.js +4 -7
  37. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.js.map +1 -1
  38. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.js +106 -0
  39. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.js.map +1 -0
  40. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +38 -31
  41. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -1
  42. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.js +41 -0
  43. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.js.map +1 -0
  44. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.js +77 -0
  45. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.js.map +1 -0
  46. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.js +49 -0
  47. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.js.map +1 -0
  48. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.js +89 -0
  49. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.js.map +1 -0
  50. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js +35 -42
  51. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js.map +1 -1
  52. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +22 -24
  53. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
  54. package/lib/commonjs/modules/bt-management/services/record-cursor.js +70 -0
  55. package/lib/commonjs/modules/bt-management/services/record-cursor.js.map +1 -0
  56. package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js +8 -0
  57. package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js.map +1 -1
  58. package/lib/commonjs/modules/bt-management/types/glucose-record-details.js +2 -0
  59. package/lib/commonjs/modules/bt-management/types/glucose-record-details.js.map +1 -0
  60. package/lib/commonjs/modules/bt-management/utils/bluetooth-permission-list.js +19 -0
  61. package/lib/commonjs/modules/bt-management/utils/bluetooth-permission-list.js.map +1 -0
  62. package/lib/commonjs/modules/bt-management/utils/device-user.js +22 -0
  63. package/lib/commonjs/modules/bt-management/utils/device-user.js.map +1 -0
  64. package/lib/commonjs/modules/bt-management/utils/kpa-to-mmhg.js +9 -0
  65. package/lib/commonjs/modules/bt-management/utils/kpa-to-mmhg.js.map +1 -0
  66. package/lib/commonjs/modules/bt-management/utils/result-identity.js +26 -35
  67. package/lib/commonjs/modules/bt-management/utils/result-identity.js.map +1 -1
  68. package/lib/commonjs/modules/bt-management/utils/rr-interval.js +16 -0
  69. package/lib/commonjs/modules/bt-management/utils/rr-interval.js.map +1 -0
  70. package/lib/commonjs/modules/bt-management/utils/temperature-type.js +15 -0
  71. package/lib/commonjs/modules/bt-management/utils/temperature-type.js.map +1 -0
  72. package/lib/commonjs/modules/bt-management/utils/wait.js +10 -0
  73. package/lib/commonjs/modules/bt-management/utils/wait.js.map +1 -0
  74. package/lib/commonjs/modules/next/background-sync/index.js +28 -0
  75. package/lib/commonjs/modules/next/background-sync/index.js.map +1 -0
  76. package/lib/commonjs/modules/next/background-sync/offline-measurement-background-sync.js +63 -0
  77. package/lib/commonjs/modules/next/background-sync/offline-measurement-background-sync.js.map +1 -0
  78. package/lib/commonjs/modules/next/bluetooth/auto-connect.js +32 -0
  79. package/lib/commonjs/modules/next/bluetooth/auto-connect.js.map +1 -0
  80. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-errors.js +33 -0
  81. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-errors.js.map +1 -0
  82. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-link.js +162 -0
  83. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-link.js.map +1 -0
  84. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-peripheral.js +35 -0
  85. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-peripheral.js.map +1 -0
  86. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-scanner.js +48 -0
  87. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-scanner.js.map +1 -0
  88. package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js +34 -0
  89. package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -0
  90. package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js +67 -0
  91. package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -0
  92. package/lib/commonjs/modules/next/bluetooth/connections.js +114 -0
  93. package/lib/commonjs/modules/next/bluetooth/connections.js.map +1 -0
  94. package/lib/commonjs/modules/next/bluetooth/daily-total-day.js.map +1 -0
  95. package/lib/commonjs/modules/next/bluetooth/devices.js +41 -0
  96. package/lib/commonjs/modules/next/bluetooth/devices.js.map +1 -0
  97. package/lib/commonjs/modules/next/bluetooth/driver.js +30 -20
  98. package/lib/commonjs/modules/next/bluetooth/driver.js.map +1 -1
  99. package/lib/commonjs/modules/next/bluetooth/errors.js +26 -0
  100. package/lib/commonjs/modules/next/bluetooth/errors.js.map +1 -0
  101. package/lib/commonjs/modules/next/bluetooth/index.js +122 -11
  102. package/lib/commonjs/modules/next/bluetooth/index.js.map +1 -1
  103. package/lib/commonjs/modules/next/bluetooth/link.js +0 -103
  104. package/lib/commonjs/modules/next/bluetooth/link.js.map +1 -1
  105. package/lib/commonjs/modules/next/bluetooth/paired.js +50 -0
  106. package/lib/commonjs/modules/next/bluetooth/paired.js.map +1 -0
  107. package/lib/commonjs/modules/next/bluetooth/permissions.js +2 -0
  108. package/lib/commonjs/modules/next/bluetooth/permissions.js.map +1 -0
  109. package/lib/commonjs/modules/next/bluetooth/react/bluetooth-device-picker.js +44 -0
  110. package/lib/commonjs/modules/next/bluetooth/react/bluetooth-device-picker.js.map +1 -0
  111. package/lib/commonjs/modules/next/bluetooth/react/context.js +54 -0
  112. package/lib/commonjs/modules/next/bluetooth/react/context.js.map +1 -0
  113. package/lib/commonjs/modules/next/bluetooth/react/hooks.js +86 -0
  114. package/lib/commonjs/modules/next/bluetooth/react/hooks.js.map +1 -0
  115. package/lib/commonjs/modules/next/bluetooth/react-native/create-bluetooth-runtime.js +28 -0
  116. package/lib/commonjs/modules/next/bluetooth/react-native/create-bluetooth-runtime.js.map +1 -0
  117. package/lib/commonjs/modules/next/bluetooth/react-native/os-permissions.js +32 -0
  118. package/lib/commonjs/modules/next/bluetooth/react-native/os-permissions.js.map +1 -0
  119. package/lib/commonjs/modules/next/bluetooth/react-native/ovok-sink.js +43 -0
  120. package/lib/commonjs/modules/next/bluetooth/react-native/ovok-sink.js.map +1 -0
  121. package/lib/commonjs/modules/next/bluetooth/readings.js +93 -0
  122. package/lib/commonjs/modules/next/bluetooth/readings.js.map +1 -0
  123. package/lib/commonjs/modules/next/bluetooth/result-policy.js +15 -2
  124. package/lib/commonjs/modules/next/bluetooth/result-policy.js.map +1 -1
  125. package/lib/commonjs/modules/next/bluetooth/runtime.js +223 -0
  126. package/lib/commonjs/modules/next/bluetooth/runtime.js.map +1 -0
  127. package/lib/commonjs/modules/next/bluetooth/scan-loop.js +82 -0
  128. package/lib/commonjs/modules/next/bluetooth/scan-loop.js.map +1 -0
  129. package/lib/commonjs/modules/next/bluetooth/sig-profiles.js +46 -13
  130. package/lib/commonjs/modules/next/bluetooth/sig-profiles.js.map +1 -1
  131. package/lib/commonjs/modules/next/bluetooth/sink.js +6 -0
  132. package/lib/commonjs/modules/next/bluetooth/sink.js.map +1 -0
  133. package/lib/commonjs/modules/next/bluetooth/snapshot.js +6 -0
  134. package/lib/commonjs/modules/next/bluetooth/snapshot.js.map +1 -0
  135. package/lib/commonjs/modules/next/bluetooth/stable-hash.js +42 -0
  136. package/lib/commonjs/modules/next/bluetooth/stable-hash.js.map +1 -0
  137. package/lib/commonjs/modules/next/bluetooth/store.js +61 -0
  138. package/lib/commonjs/modules/next/bluetooth/store.js.map +1 -0
  139. package/lib/commonjs/modules/next/bluetooth/transport.js +6 -0
  140. package/lib/commonjs/modules/next/bluetooth/transport.js.map +1 -0
  141. package/lib/commonjs/modules/next/bluetooth/web/create-web-bluetooth-runtime.js +28 -0
  142. package/lib/commonjs/modules/next/bluetooth/web/create-web-bluetooth-runtime.js.map +1 -0
  143. package/lib/commonjs/modules/next/bluetooth/web/index.js +208 -0
  144. package/lib/commonjs/modules/next/bluetooth/web/index.js.map +1 -0
  145. package/lib/commonjs/modules/next/bluetooth/web/web-ble-device.js +143 -0
  146. package/lib/commonjs/modules/next/bluetooth/web/web-ble-device.js.map +1 -0
  147. package/lib/commonjs/modules/next/bluetooth/web/web-ble-shapes.js +43 -0
  148. package/lib/commonjs/modules/next/bluetooth/web/web-ble-shapes.js.map +1 -0
  149. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-permissions.js +21 -0
  150. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-permissions.js.map +1 -0
  151. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-scanner.js +133 -0
  152. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-scanner.js.map +1 -0
  153. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-services.js +28 -0
  154. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-services.js.map +1 -0
  155. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-values.js +37 -0
  156. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-values.js.map +1 -0
  157. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth.types.js +2 -0
  158. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth.types.js.map +1 -0
  159. package/lib/commonjs/modules/next/bluetooth/web/web-gatt.js +83 -0
  160. package/lib/commonjs/modules/next/bluetooth/web/web-gatt.js.map +1 -0
  161. package/lib/commonjs/modules/next/breathing-exercise/index.js +17 -0
  162. package/lib/commonjs/modules/next/breathing-exercise/index.js.map +1 -0
  163. package/lib/commonjs/modules/next/cms/index.js +17 -0
  164. package/lib/commonjs/modules/next/cms/index.js.map +1 -0
  165. package/lib/commonjs/modules/next/content/index.js +17 -0
  166. package/lib/commonjs/modules/next/content/index.js.map +1 -0
  167. package/lib/commonjs/modules/next/data-sync/index.js +17 -0
  168. package/lib/commonjs/modules/next/data-sync/index.js.map +1 -0
  169. package/lib/commonjs/modules/next/diary/index.js +17 -0
  170. package/lib/commonjs/modules/next/diary/index.js.map +1 -0
  171. package/lib/commonjs/modules/next/image/index.js +17 -0
  172. package/lib/commonjs/modules/next/image/index.js.map +1 -0
  173. package/lib/commonjs/modules/next/journal/index.js +17 -0
  174. package/lib/commonjs/modules/next/journal/index.js.map +1 -0
  175. package/lib/commonjs/modules/next/language-switcher/index.js +17 -0
  176. package/lib/commonjs/modules/next/language-switcher/index.js.map +1 -0
  177. package/lib/commonjs/modules/next/measurement/index.js +17 -0
  178. package/lib/commonjs/modules/next/measurement/index.js.map +1 -0
  179. package/lib/commonjs/modules/next/observation-detail/index.js +17 -0
  180. package/lib/commonjs/modules/next/observation-detail/index.js.map +1 -0
  181. package/lib/commonjs/modules/next/patient/index.js +17 -0
  182. package/lib/commonjs/modules/next/patient/index.js.map +1 -0
  183. package/lib/commonjs/modules/next/pdf/index.js +17 -0
  184. package/lib/commonjs/modules/next/pdf/index.js.map +1 -0
  185. package/lib/commonjs/modules/next/picker-sheet/index.js +17 -0
  186. package/lib/commonjs/modules/next/picker-sheet/index.js.map +1 -0
  187. package/lib/commonjs/modules/next/progress-bar/index.js +17 -0
  188. package/lib/commonjs/modules/next/progress-bar/index.js.map +1 -0
  189. package/lib/commonjs/modules/next/progress-ring/index.js +17 -0
  190. package/lib/commonjs/modules/next/progress-ring/index.js.map +1 -0
  191. package/lib/commonjs/modules/next/setting/index.js +17 -0
  192. package/lib/commonjs/modules/next/setting/index.js.map +1 -0
  193. package/lib/commonjs/modules/next/tab/index.js +17 -0
  194. package/lib/commonjs/modules/next/tab/index.js.map +1 -0
  195. package/lib/commonjs/modules/next/theme/index.js +17 -0
  196. package/lib/commonjs/modules/next/theme/index.js.map +1 -0
  197. package/lib/commonjs/modules/next/tile/index.js +17 -0
  198. package/lib/commonjs/modules/next/tile/index.js.map +1 -0
  199. package/lib/commonjs/modules/next/ui/index.js +17 -0
  200. package/lib/commonjs/modules/next/ui/index.js.map +1 -0
  201. package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js +3 -1
  202. package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -1
  203. package/lib/module/modules/bt-management/components/bluetooth-device-picker.js +9 -141
  204. package/lib/module/modules/bt-management/components/bluetooth-device-picker.js.map +1 -1
  205. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +1 -0
  206. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  207. package/lib/module/modules/bt-management/components/device-picker-sheet.js +154 -0
  208. package/lib/module/modules/bt-management/components/device-picker-sheet.js.map +1 -0
  209. package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -1
  210. package/lib/module/modules/bt-management/hooks/use-bluetooth-permission.js +4 -3
  211. package/lib/module/modules/bt-management/hooks/use-bluetooth-permission.js.map +1 -1
  212. package/lib/module/modules/bt-management/hooks/use-measurements.js +1 -1
  213. package/lib/module/modules/bt-management/hooks/use-measurements.js.map +1 -1
  214. package/lib/module/modules/bt-management/index.js +1 -0
  215. package/lib/module/modules/bt-management/index.js.map +1 -1
  216. package/lib/module/modules/bt-management/services/bt-manager.js +50 -0
  217. package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
  218. package/lib/module/modules/bt-management/services/custom/define-custom-device.js +3 -0
  219. package/lib/module/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
  220. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js +4 -2
  221. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
  222. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +97 -28
  223. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  224. package/lib/module/modules/bt-management/services/devices/bt-current-time.js +55 -0
  225. package/lib/module/modules/bt-management/services/devices/bt-current-time.js.map +1 -0
  226. package/lib/module/modules/bt-management/services/devices/bt-device-information.js +18 -37
  227. package/lib/module/modules/bt-management/services/devices/bt-device-information.js.map +1 -1
  228. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +33 -5
  229. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  230. package/lib/module/modules/bt-management/services/devices/bt-notification-readiness.js +65 -0
  231. package/lib/module/modules/bt-management/services/devices/bt-notification-readiness.js.map +1 -0
  232. package/lib/module/modules/bt-management/services/devices/bt-pairing-retry.js +65 -0
  233. package/lib/module/modules/bt-management/services/devices/bt-pairing-retry.js.map +1 -0
  234. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +14 -0
  235. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  236. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.js +1 -4
  237. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.js.map +1 -1
  238. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.js +99 -0
  239. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.js.map +1 -0
  240. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +38 -31
  241. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -1
  242. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.js +35 -0
  243. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.js.map +1 -0
  244. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.js +72 -0
  245. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.js.map +1 -0
  246. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.js +40 -0
  247. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.js.map +1 -0
  248. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.js +85 -0
  249. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.js.map +1 -0
  250. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js +25 -32
  251. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js.map +1 -1
  252. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +18 -20
  253. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
  254. package/lib/module/modules/bt-management/services/record-cursor.js +66 -0
  255. package/lib/module/modules/bt-management/services/record-cursor.js.map +1 -0
  256. package/lib/module/modules/bt-management/testing/fake-ble-manager.js +8 -0
  257. package/lib/module/modules/bt-management/testing/fake-ble-manager.js.map +1 -1
  258. package/lib/module/modules/bt-management/types/custom-device-definition.js +4 -0
  259. package/lib/module/modules/bt-management/types/custom-device-definition.js.map +1 -1
  260. package/lib/module/modules/bt-management/types/glucose-record-details.js +2 -0
  261. package/lib/module/modules/bt-management/types/glucose-record-details.js.map +1 -0
  262. package/lib/module/modules/bt-management/utils/bluetooth-permission-list.js +14 -0
  263. package/lib/module/modules/bt-management/utils/bluetooth-permission-list.js.map +1 -0
  264. package/lib/module/modules/bt-management/utils/device-user.js +17 -0
  265. package/lib/module/modules/bt-management/utils/device-user.js.map +1 -0
  266. package/lib/module/modules/bt-management/utils/kpa-to-mmhg.js +6 -0
  267. package/lib/module/modules/bt-management/utils/kpa-to-mmhg.js.map +1 -0
  268. package/lib/module/modules/bt-management/utils/result-identity.js +23 -33
  269. package/lib/module/modules/bt-management/utils/result-identity.js.map +1 -1
  270. package/lib/module/modules/bt-management/utils/rr-interval.js +12 -0
  271. package/lib/module/modules/bt-management/utils/rr-interval.js.map +1 -0
  272. package/lib/module/modules/bt-management/utils/temperature-type.js +11 -0
  273. package/lib/module/modules/bt-management/utils/temperature-type.js.map +1 -0
  274. package/lib/module/modules/bt-management/utils/wait.js +5 -0
  275. package/lib/module/modules/bt-management/utils/wait.js.map +1 -0
  276. package/lib/module/modules/next/background-sync/index.js +12 -0
  277. package/lib/module/modules/next/background-sync/index.js.map +1 -0
  278. package/lib/module/modules/next/background-sync/offline-measurement-background-sync.js +55 -0
  279. package/lib/module/modules/next/background-sync/offline-measurement-background-sync.js.map +1 -0
  280. package/lib/module/modules/next/bluetooth/auto-connect.js +28 -0
  281. package/lib/module/modules/next/bluetooth/auto-connect.js.map +1 -0
  282. package/lib/module/modules/next/bluetooth/ble-plx/ble-errors.js +28 -0
  283. package/lib/module/modules/next/bluetooth/ble-plx/ble-errors.js.map +1 -0
  284. package/lib/module/modules/next/bluetooth/ble-plx/ble-link.js +159 -0
  285. package/lib/module/modules/next/bluetooth/ble-plx/ble-link.js.map +1 -0
  286. package/lib/module/modules/next/bluetooth/ble-plx/ble-peripheral.js +30 -0
  287. package/lib/module/modules/next/bluetooth/ble-plx/ble-peripheral.js.map +1 -0
  288. package/lib/module/modules/next/bluetooth/ble-plx/ble-scanner.js +44 -0
  289. package/lib/module/modules/next/bluetooth/ble-plx/ble-scanner.js.map +1 -0
  290. package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js +31 -0
  291. package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -0
  292. package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js +63 -0
  293. package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -0
  294. package/lib/module/modules/next/bluetooth/connections.js +110 -0
  295. package/lib/module/modules/next/bluetooth/connections.js.map +1 -0
  296. package/lib/module/modules/next/bluetooth/daily-total-day.js.map +1 -0
  297. package/lib/module/modules/next/bluetooth/devices.js +37 -0
  298. package/lib/module/modules/next/bluetooth/devices.js.map +1 -0
  299. package/lib/module/modules/next/bluetooth/driver.js +29 -20
  300. package/lib/module/modules/next/bluetooth/driver.js.map +1 -1
  301. package/lib/module/modules/next/bluetooth/errors.js +21 -0
  302. package/lib/module/modules/next/bluetooth/errors.js.map +1 -0
  303. package/lib/module/modules/next/bluetooth/index.js +22 -4
  304. package/lib/module/modules/next/bluetooth/index.js.map +1 -1
  305. package/lib/module/modules/next/bluetooth/link.js +0 -101
  306. package/lib/module/modules/next/bluetooth/link.js.map +1 -1
  307. package/lib/module/modules/next/bluetooth/paired.js +46 -0
  308. package/lib/module/modules/next/bluetooth/paired.js.map +1 -0
  309. package/lib/module/modules/next/bluetooth/permissions.js +2 -0
  310. package/lib/module/modules/next/bluetooth/permissions.js.map +1 -0
  311. package/lib/module/modules/next/bluetooth/react/bluetooth-device-picker.js +39 -0
  312. package/lib/module/modules/next/bluetooth/react/bluetooth-device-picker.js.map +1 -0
  313. package/lib/module/modules/next/bluetooth/react/context.js +48 -0
  314. package/lib/module/modules/next/bluetooth/react/context.js.map +1 -0
  315. package/lib/module/modules/next/bluetooth/react/hooks.js +76 -0
  316. package/lib/module/modules/next/bluetooth/react/hooks.js.map +1 -0
  317. package/lib/module/modules/next/bluetooth/react-native/create-bluetooth-runtime.js +25 -0
  318. package/lib/module/modules/next/bluetooth/react-native/create-bluetooth-runtime.js.map +1 -0
  319. package/lib/module/modules/next/bluetooth/react-native/os-permissions.js +28 -0
  320. package/lib/module/modules/next/bluetooth/react-native/os-permissions.js.map +1 -0
  321. package/lib/module/modules/next/bluetooth/react-native/ovok-sink.js +39 -0
  322. package/lib/module/modules/next/bluetooth/react-native/ovok-sink.js.map +1 -0
  323. package/lib/module/modules/next/bluetooth/readings.js +89 -0
  324. package/lib/module/modules/next/bluetooth/readings.js.map +1 -0
  325. package/lib/module/modules/next/bluetooth/result-policy.js +14 -2
  326. package/lib/module/modules/next/bluetooth/result-policy.js.map +1 -1
  327. package/lib/module/modules/next/bluetooth/runtime.js +220 -0
  328. package/lib/module/modules/next/bluetooth/runtime.js.map +1 -0
  329. package/lib/module/modules/next/bluetooth/scan-loop.js +78 -0
  330. package/lib/module/modules/next/bluetooth/scan-loop.js.map +1 -0
  331. package/lib/module/modules/next/bluetooth/sig-profiles.js +44 -11
  332. package/lib/module/modules/next/bluetooth/sig-profiles.js.map +1 -1
  333. package/lib/module/modules/next/bluetooth/sink.js +4 -0
  334. package/lib/module/modules/next/bluetooth/sink.js.map +1 -0
  335. package/lib/module/modules/next/bluetooth/snapshot.js +4 -0
  336. package/lib/module/modules/next/bluetooth/snapshot.js.map +1 -0
  337. package/lib/module/modules/next/bluetooth/stable-hash.js +37 -0
  338. package/lib/module/modules/next/bluetooth/stable-hash.js.map +1 -0
  339. package/lib/module/modules/next/bluetooth/store.js +57 -0
  340. package/lib/module/modules/next/bluetooth/store.js.map +1 -0
  341. package/lib/module/modules/next/bluetooth/transport.js +4 -0
  342. package/lib/module/modules/next/bluetooth/transport.js.map +1 -0
  343. package/lib/module/modules/next/bluetooth/web/create-web-bluetooth-runtime.js +25 -0
  344. package/lib/module/modules/next/bluetooth/web/create-web-bluetooth-runtime.js.map +1 -0
  345. package/lib/module/modules/next/bluetooth/web/index.js +28 -0
  346. package/lib/module/modules/next/bluetooth/web/index.js.map +1 -0
  347. package/lib/module/modules/next/bluetooth/web/web-ble-device.js +140 -0
  348. package/lib/module/modules/next/bluetooth/web/web-ble-device.js.map +1 -0
  349. package/lib/module/modules/next/bluetooth/web/web-ble-shapes.js +39 -0
  350. package/lib/module/modules/next/bluetooth/web/web-ble-shapes.js.map +1 -0
  351. package/lib/module/modules/next/bluetooth/web/web-bluetooth-permissions.js +18 -0
  352. package/lib/module/modules/next/bluetooth/web/web-bluetooth-permissions.js.map +1 -0
  353. package/lib/module/modules/next/bluetooth/web/web-bluetooth-scanner.js +128 -0
  354. package/lib/module/modules/next/bluetooth/web/web-bluetooth-scanner.js.map +1 -0
  355. package/lib/module/modules/next/bluetooth/web/web-bluetooth-services.js +25 -0
  356. package/lib/module/modules/next/bluetooth/web/web-bluetooth-services.js.map +1 -0
  357. package/lib/module/modules/next/bluetooth/web/web-bluetooth-values.js +29 -0
  358. package/lib/module/modules/next/bluetooth/web/web-bluetooth-values.js.map +1 -0
  359. package/lib/module/modules/next/bluetooth/web/web-bluetooth.types.js +2 -0
  360. package/lib/module/modules/next/bluetooth/web/web-bluetooth.types.js.map +1 -0
  361. package/lib/module/modules/next/bluetooth/web/web-gatt.js +79 -0
  362. package/lib/module/modules/next/bluetooth/web/web-gatt.js.map +1 -0
  363. package/lib/module/modules/next/breathing-exercise/index.js +5 -0
  364. package/lib/module/modules/next/breathing-exercise/index.js.map +1 -0
  365. package/lib/module/modules/next/cms/index.js +5 -0
  366. package/lib/module/modules/next/cms/index.js.map +1 -0
  367. package/lib/module/modules/next/content/index.js +5 -0
  368. package/lib/module/modules/next/content/index.js.map +1 -0
  369. package/lib/module/modules/next/data-sync/index.js +11 -0
  370. package/lib/module/modules/next/data-sync/index.js.map +1 -0
  371. package/lib/module/modules/next/diary/index.js +5 -0
  372. package/lib/module/modules/next/diary/index.js.map +1 -0
  373. package/lib/module/modules/next/image/index.js +5 -0
  374. package/lib/module/modules/next/image/index.js.map +1 -0
  375. package/lib/module/modules/next/journal/index.js +5 -0
  376. package/lib/module/modules/next/journal/index.js.map +1 -0
  377. package/lib/module/modules/next/language-switcher/index.js +5 -0
  378. package/lib/module/modules/next/language-switcher/index.js.map +1 -0
  379. package/lib/module/modules/next/measurement/index.js +5 -0
  380. package/lib/module/modules/next/measurement/index.js.map +1 -0
  381. package/lib/module/modules/next/observation-detail/index.js +5 -0
  382. package/lib/module/modules/next/observation-detail/index.js.map +1 -0
  383. package/lib/module/modules/next/patient/index.js +5 -0
  384. package/lib/module/modules/next/patient/index.js.map +1 -0
  385. package/lib/module/modules/next/pdf/index.js +5 -0
  386. package/lib/module/modules/next/pdf/index.js.map +1 -0
  387. package/lib/module/modules/next/picker-sheet/index.js +5 -0
  388. package/lib/module/modules/next/picker-sheet/index.js.map +1 -0
  389. package/lib/module/modules/next/progress-bar/index.js +5 -0
  390. package/lib/module/modules/next/progress-bar/index.js.map +1 -0
  391. package/lib/module/modules/next/progress-ring/index.js +5 -0
  392. package/lib/module/modules/next/progress-ring/index.js.map +1 -0
  393. package/lib/module/modules/next/setting/index.js +5 -0
  394. package/lib/module/modules/next/setting/index.js.map +1 -0
  395. package/lib/module/modules/next/tab/index.js +5 -0
  396. package/lib/module/modules/next/tab/index.js.map +1 -0
  397. package/lib/module/modules/next/theme/index.js +5 -0
  398. package/lib/module/modules/next/theme/index.js.map +1 -0
  399. package/lib/module/modules/next/tile/index.js +5 -0
  400. package/lib/module/modules/next/tile/index.js.map +1 -0
  401. package/lib/module/modules/next/ui/index.js +5 -0
  402. package/lib/module/modules/next/ui/index.js.map +1 -0
  403. package/lib/typescript/commonjs/src/modules/auth/hooks/use-sign-in.d.ts +1 -1
  404. package/lib/typescript/commonjs/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -1
  405. package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts +1 -1
  406. package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -1
  407. package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  408. package/lib/typescript/commonjs/src/modules/bt-management/components/device-picker-sheet.d.ts +25 -0
  409. package/lib/typescript/commonjs/src/modules/bt-management/components/device-picker-sheet.d.ts.map +1 -0
  410. package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +1 -1
  411. package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
  412. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-permission.d.ts.map +1 -1
  413. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -1
  414. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +1 -0
  415. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
  416. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +20 -0
  417. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  418. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.d.ts +2 -1
  419. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
  420. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts +3 -1
  421. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
  422. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +14 -1
  423. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  424. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-current-time.d.ts +11 -0
  425. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-current-time.d.ts.map +1 -0
  426. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-device-information.d.ts +2 -1
  427. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-device-information.d.ts.map +1 -1
  428. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +11 -1
  429. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  430. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-notification-readiness.d.ts +15 -0
  431. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-notification-readiness.d.ts.map +1 -0
  432. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-pairing-retry.d.ts +21 -0
  433. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-pairing-retry.d.ts.map +1 -0
  434. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +2 -0
  435. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  436. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.d.ts.map +1 -1
  437. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.d.ts +11 -0
  438. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.d.ts.map +1 -0
  439. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +5 -2
  440. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -1
  441. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.d.ts +10 -0
  442. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.d.ts.map +1 -0
  443. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.d.ts +7 -0
  444. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.d.ts.map +1 -0
  445. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.d.ts +16 -0
  446. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.d.ts.map +1 -0
  447. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.d.ts +8 -0
  448. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.d.ts.map +1 -0
  449. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts.map +1 -1
  450. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +2 -0
  451. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -1
  452. package/lib/typescript/commonjs/src/modules/bt-management/services/record-cursor.d.ts +21 -0
  453. package/lib/typescript/commonjs/src/modules/bt-management/services/record-cursor.d.ts.map +1 -0
  454. package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -1
  455. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts +6 -2
  456. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
  457. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts +3 -0
  458. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  459. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts +14 -1
  460. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
  461. package/lib/typescript/commonjs/src/modules/bt-management/types/glucose-record-details.d.ts +33 -0
  462. package/lib/typescript/commonjs/src/modules/bt-management/types/glucose-record-details.d.ts.map +1 -0
  463. package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts +2 -0
  464. package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
  465. package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts +6 -0
  466. package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts.map +1 -1
  467. package/lib/typescript/commonjs/src/modules/bt-management/utils/bluetooth-permission-list.d.ts +4 -0
  468. package/lib/typescript/commonjs/src/modules/bt-management/utils/bluetooth-permission-list.d.ts.map +1 -0
  469. package/lib/typescript/commonjs/src/modules/bt-management/utils/device-user.d.ts +6 -0
  470. package/lib/typescript/commonjs/src/modules/bt-management/utils/device-user.d.ts.map +1 -0
  471. package/lib/typescript/commonjs/src/modules/bt-management/utils/kpa-to-mmhg.d.ts +4 -0
  472. package/lib/typescript/commonjs/src/modules/bt-management/utils/kpa-to-mmhg.d.ts.map +1 -0
  473. package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts +5 -4
  474. package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts.map +1 -1
  475. package/lib/typescript/commonjs/src/modules/bt-management/utils/rr-interval.d.ts +4 -0
  476. package/lib/typescript/commonjs/src/modules/bt-management/utils/rr-interval.d.ts.map +1 -0
  477. package/lib/typescript/commonjs/src/modules/bt-management/utils/temperature-type.d.ts +7 -0
  478. package/lib/typescript/commonjs/src/modules/bt-management/utils/temperature-type.d.ts.map +1 -0
  479. package/lib/typescript/commonjs/src/modules/bt-management/utils/wait.d.ts +3 -0
  480. package/lib/typescript/commonjs/src/modules/bt-management/utils/wait.d.ts.map +1 -0
  481. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
  482. package/lib/typescript/commonjs/src/modules/next/background-sync/index.d.ts +10 -0
  483. package/lib/typescript/commonjs/src/modules/next/background-sync/index.d.ts.map +1 -0
  484. package/lib/typescript/commonjs/src/modules/next/background-sync/offline-measurement-background-sync.d.ts +22 -0
  485. package/lib/typescript/commonjs/src/modules/next/background-sync/offline-measurement-background-sync.d.ts.map +1 -0
  486. package/lib/typescript/commonjs/src/modules/next/bluetooth/auto-connect.d.ts +10 -0
  487. package/lib/typescript/commonjs/src/modules/next/bluetooth/auto-connect.d.ts.map +1 -0
  488. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts +4 -0
  489. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts.map +1 -0
  490. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-link.d.ts +6 -0
  491. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-link.d.ts.map +1 -0
  492. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts +8 -0
  493. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts.map +1 -0
  494. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts +6 -0
  495. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts.map +1 -0
  496. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +6 -0
  497. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -0
  498. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +8 -0
  499. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -0
  500. package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts +25 -0
  501. package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts.map +1 -0
  502. package/lib/typescript/commonjs/src/modules/next/bluetooth/daily-total-day.d.ts.map +1 -0
  503. package/lib/typescript/commonjs/src/modules/next/bluetooth/devices.d.ts +30 -0
  504. package/lib/typescript/commonjs/src/modules/next/bluetooth/devices.d.ts.map +1 -0
  505. package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts +27 -20
  506. package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts.map +1 -1
  507. package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts +17 -0
  508. package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts.map +1 -0
  509. package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts +34 -5
  510. package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts.map +1 -1
  511. package/lib/typescript/commonjs/src/modules/next/bluetooth/link.d.ts +14 -5
  512. package/lib/typescript/commonjs/src/modules/next/bluetooth/link.d.ts.map +1 -1
  513. package/lib/typescript/commonjs/src/modules/next/bluetooth/paired.d.ts +18 -0
  514. package/lib/typescript/commonjs/src/modules/next/bluetooth/paired.d.ts.map +1 -0
  515. package/lib/typescript/commonjs/src/modules/next/bluetooth/permissions.d.ts +13 -0
  516. package/lib/typescript/commonjs/src/modules/next/bluetooth/permissions.d.ts.map +1 -0
  517. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts +35 -0
  518. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts.map +1 -0
  519. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/context.d.ts +30 -0
  520. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/context.d.ts.map +1 -0
  521. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/hooks.d.ts +47 -0
  522. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/hooks.d.ts.map +1 -0
  523. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts +21 -0
  524. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts.map +1 -0
  525. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/os-permissions.d.ts +5 -0
  526. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/os-permissions.d.ts.map +1 -0
  527. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/ovok-sink.d.ts +6 -0
  528. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/ovok-sink.d.ts.map +1 -0
  529. package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts +21 -0
  530. package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts.map +1 -0
  531. package/lib/typescript/commonjs/src/modules/next/bluetooth/result-policy.d.ts +9 -1
  532. package/lib/typescript/commonjs/src/modules/next/bluetooth/result-policy.d.ts.map +1 -1
  533. package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts +87 -0
  534. package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts.map +1 -0
  535. package/lib/typescript/commonjs/src/modules/next/bluetooth/scan-loop.d.ts +23 -0
  536. package/lib/typescript/commonjs/src/modules/next/bluetooth/scan-loop.d.ts.map +1 -0
  537. package/lib/typescript/commonjs/src/modules/next/bluetooth/sig-profiles.d.ts.map +1 -1
  538. package/lib/typescript/commonjs/src/modules/next/bluetooth/sink.d.ts +20 -0
  539. package/lib/typescript/commonjs/src/modules/next/bluetooth/sink.d.ts.map +1 -0
  540. package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts +72 -0
  541. package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts.map +1 -0
  542. package/lib/typescript/commonjs/src/modules/next/bluetooth/stable-hash.d.ts +6 -0
  543. package/lib/typescript/commonjs/src/modules/next/bluetooth/stable-hash.d.ts.map +1 -0
  544. package/lib/typescript/commonjs/src/modules/next/bluetooth/store.d.ts +16 -0
  545. package/lib/typescript/commonjs/src/modules/next/bluetooth/store.d.ts.map +1 -0
  546. package/lib/typescript/commonjs/src/modules/next/bluetooth/transport.d.ts +31 -0
  547. package/lib/typescript/commonjs/src/modules/next/bluetooth/transport.d.ts.map +1 -0
  548. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts +23 -0
  549. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts.map +1 -0
  550. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts +41 -0
  551. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts.map +1 -0
  552. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-device.d.ts +53 -0
  553. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-device.d.ts.map +1 -0
  554. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-shapes.d.ts +27 -0
  555. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-shapes.d.ts.map +1 -0
  556. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts +8 -0
  557. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts.map +1 -0
  558. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts +29 -0
  559. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts.map +1 -0
  560. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts +10 -0
  561. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts.map +1 -0
  562. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts +9 -0
  563. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts.map +1 -0
  564. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts +56 -0
  565. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts.map +1 -0
  566. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-gatt.d.ts +27 -0
  567. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-gatt.d.ts.map +1 -0
  568. package/lib/typescript/commonjs/src/modules/next/breathing-exercise/index.d.ts +3 -0
  569. package/lib/typescript/commonjs/src/modules/next/breathing-exercise/index.d.ts.map +1 -0
  570. package/lib/typescript/commonjs/src/modules/next/cms/index.d.ts +3 -0
  571. package/lib/typescript/commonjs/src/modules/next/cms/index.d.ts.map +1 -0
  572. package/lib/typescript/commonjs/src/modules/next/content/index.d.ts +3 -0
  573. package/lib/typescript/commonjs/src/modules/next/content/index.d.ts.map +1 -0
  574. package/lib/typescript/commonjs/src/modules/next/data-sync/index.d.ts +9 -0
  575. package/lib/typescript/commonjs/src/modules/next/data-sync/index.d.ts.map +1 -0
  576. package/lib/typescript/commonjs/src/modules/next/diary/index.d.ts +3 -0
  577. package/lib/typescript/commonjs/src/modules/next/diary/index.d.ts.map +1 -0
  578. package/lib/typescript/commonjs/src/modules/next/image/index.d.ts +3 -0
  579. package/lib/typescript/commonjs/src/modules/next/image/index.d.ts.map +1 -0
  580. package/lib/typescript/commonjs/src/modules/next/journal/index.d.ts +3 -0
  581. package/lib/typescript/commonjs/src/modules/next/journal/index.d.ts.map +1 -0
  582. package/lib/typescript/commonjs/src/modules/next/language-switcher/index.d.ts +3 -0
  583. package/lib/typescript/commonjs/src/modules/next/language-switcher/index.d.ts.map +1 -0
  584. package/lib/typescript/commonjs/src/modules/next/measurement/index.d.ts +3 -0
  585. package/lib/typescript/commonjs/src/modules/next/measurement/index.d.ts.map +1 -0
  586. package/lib/typescript/commonjs/src/modules/next/observation-detail/index.d.ts +3 -0
  587. package/lib/typescript/commonjs/src/modules/next/observation-detail/index.d.ts.map +1 -0
  588. package/lib/typescript/commonjs/src/modules/next/patient/index.d.ts +3 -0
  589. package/lib/typescript/commonjs/src/modules/next/patient/index.d.ts.map +1 -0
  590. package/lib/typescript/commonjs/src/modules/next/pdf/index.d.ts +3 -0
  591. package/lib/typescript/commonjs/src/modules/next/pdf/index.d.ts.map +1 -0
  592. package/lib/typescript/commonjs/src/modules/next/picker-sheet/index.d.ts +3 -0
  593. package/lib/typescript/commonjs/src/modules/next/picker-sheet/index.d.ts.map +1 -0
  594. package/lib/typescript/commonjs/src/modules/next/progress-bar/index.d.ts +3 -0
  595. package/lib/typescript/commonjs/src/modules/next/progress-bar/index.d.ts.map +1 -0
  596. package/lib/typescript/commonjs/src/modules/next/progress-ring/index.d.ts +3 -0
  597. package/lib/typescript/commonjs/src/modules/next/progress-ring/index.d.ts.map +1 -0
  598. package/lib/typescript/commonjs/src/modules/next/setting/index.d.ts +3 -0
  599. package/lib/typescript/commonjs/src/modules/next/setting/index.d.ts.map +1 -0
  600. package/lib/typescript/commonjs/src/modules/next/tab/index.d.ts +3 -0
  601. package/lib/typescript/commonjs/src/modules/next/tab/index.d.ts.map +1 -0
  602. package/lib/typescript/commonjs/src/modules/next/theme/index.d.ts +3 -0
  603. package/lib/typescript/commonjs/src/modules/next/theme/index.d.ts.map +1 -0
  604. package/lib/typescript/commonjs/src/modules/next/tile/index.d.ts +3 -0
  605. package/lib/typescript/commonjs/src/modules/next/tile/index.d.ts.map +1 -0
  606. package/lib/typescript/commonjs/src/modules/next/ui/index.d.ts +3 -0
  607. package/lib/typescript/commonjs/src/modules/next/ui/index.d.ts.map +1 -0
  608. package/lib/typescript/module/src/modules/auth/hooks/use-sign-in.d.ts +1 -1
  609. package/lib/typescript/module/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -1
  610. package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts +1 -1
  611. package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -1
  612. package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  613. package/lib/typescript/module/src/modules/bt-management/components/device-picker-sheet.d.ts +25 -0
  614. package/lib/typescript/module/src/modules/bt-management/components/device-picker-sheet.d.ts.map +1 -0
  615. package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +1 -1
  616. package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
  617. package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-permission.d.ts.map +1 -1
  618. package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -1
  619. package/lib/typescript/module/src/modules/bt-management/index.d.ts +1 -0
  620. package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
  621. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +20 -0
  622. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  623. package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.d.ts +2 -1
  624. package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
  625. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts +3 -1
  626. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
  627. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +14 -1
  628. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  629. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-current-time.d.ts +11 -0
  630. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-current-time.d.ts.map +1 -0
  631. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-device-information.d.ts +2 -1
  632. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-device-information.d.ts.map +1 -1
  633. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +11 -1
  634. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  635. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-notification-readiness.d.ts +15 -0
  636. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-notification-readiness.d.ts.map +1 -0
  637. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-pairing-retry.d.ts +21 -0
  638. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-pairing-retry.d.ts.map +1 -0
  639. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +2 -0
  640. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  641. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.d.ts.map +1 -1
  642. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.d.ts +11 -0
  643. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.d.ts.map +1 -0
  644. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +5 -2
  645. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -1
  646. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.d.ts +10 -0
  647. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.d.ts.map +1 -0
  648. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.d.ts +7 -0
  649. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.d.ts.map +1 -0
  650. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.d.ts +16 -0
  651. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.d.ts.map +1 -0
  652. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.d.ts +8 -0
  653. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.d.ts.map +1 -0
  654. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts.map +1 -1
  655. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +2 -0
  656. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -1
  657. package/lib/typescript/module/src/modules/bt-management/services/record-cursor.d.ts +21 -0
  658. package/lib/typescript/module/src/modules/bt-management/services/record-cursor.d.ts.map +1 -0
  659. package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -1
  660. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts +6 -2
  661. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
  662. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts +3 -0
  663. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  664. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts +14 -1
  665. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
  666. package/lib/typescript/module/src/modules/bt-management/types/glucose-record-details.d.ts +33 -0
  667. package/lib/typescript/module/src/modules/bt-management/types/glucose-record-details.d.ts.map +1 -0
  668. package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts +2 -0
  669. package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
  670. package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts +6 -0
  671. package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts.map +1 -1
  672. package/lib/typescript/module/src/modules/bt-management/utils/bluetooth-permission-list.d.ts +4 -0
  673. package/lib/typescript/module/src/modules/bt-management/utils/bluetooth-permission-list.d.ts.map +1 -0
  674. package/lib/typescript/module/src/modules/bt-management/utils/device-user.d.ts +6 -0
  675. package/lib/typescript/module/src/modules/bt-management/utils/device-user.d.ts.map +1 -0
  676. package/lib/typescript/module/src/modules/bt-management/utils/kpa-to-mmhg.d.ts +4 -0
  677. package/lib/typescript/module/src/modules/bt-management/utils/kpa-to-mmhg.d.ts.map +1 -0
  678. package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts +5 -4
  679. package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts.map +1 -1
  680. package/lib/typescript/module/src/modules/bt-management/utils/rr-interval.d.ts +4 -0
  681. package/lib/typescript/module/src/modules/bt-management/utils/rr-interval.d.ts.map +1 -0
  682. package/lib/typescript/module/src/modules/bt-management/utils/temperature-type.d.ts +7 -0
  683. package/lib/typescript/module/src/modules/bt-management/utils/temperature-type.d.ts.map +1 -0
  684. package/lib/typescript/module/src/modules/bt-management/utils/wait.d.ts +3 -0
  685. package/lib/typescript/module/src/modules/bt-management/utils/wait.d.ts.map +1 -0
  686. package/lib/typescript/module/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
  687. package/lib/typescript/module/src/modules/next/background-sync/index.d.ts +10 -0
  688. package/lib/typescript/module/src/modules/next/background-sync/index.d.ts.map +1 -0
  689. package/lib/typescript/module/src/modules/next/background-sync/offline-measurement-background-sync.d.ts +22 -0
  690. package/lib/typescript/module/src/modules/next/background-sync/offline-measurement-background-sync.d.ts.map +1 -0
  691. package/lib/typescript/module/src/modules/next/bluetooth/auto-connect.d.ts +10 -0
  692. package/lib/typescript/module/src/modules/next/bluetooth/auto-connect.d.ts.map +1 -0
  693. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts +4 -0
  694. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts.map +1 -0
  695. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-link.d.ts +6 -0
  696. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-link.d.ts.map +1 -0
  697. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts +8 -0
  698. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts.map +1 -0
  699. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts +6 -0
  700. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts.map +1 -0
  701. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +6 -0
  702. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -0
  703. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +8 -0
  704. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -0
  705. package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts +25 -0
  706. package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts.map +1 -0
  707. package/lib/typescript/module/src/modules/next/bluetooth/daily-total-day.d.ts.map +1 -0
  708. package/lib/typescript/module/src/modules/next/bluetooth/devices.d.ts +30 -0
  709. package/lib/typescript/module/src/modules/next/bluetooth/devices.d.ts.map +1 -0
  710. package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts +27 -20
  711. package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts.map +1 -1
  712. package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts +17 -0
  713. package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts.map +1 -0
  714. package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts +34 -5
  715. package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts.map +1 -1
  716. package/lib/typescript/module/src/modules/next/bluetooth/link.d.ts +14 -5
  717. package/lib/typescript/module/src/modules/next/bluetooth/link.d.ts.map +1 -1
  718. package/lib/typescript/module/src/modules/next/bluetooth/paired.d.ts +18 -0
  719. package/lib/typescript/module/src/modules/next/bluetooth/paired.d.ts.map +1 -0
  720. package/lib/typescript/module/src/modules/next/bluetooth/permissions.d.ts +13 -0
  721. package/lib/typescript/module/src/modules/next/bluetooth/permissions.d.ts.map +1 -0
  722. package/lib/typescript/module/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts +35 -0
  723. package/lib/typescript/module/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts.map +1 -0
  724. package/lib/typescript/module/src/modules/next/bluetooth/react/context.d.ts +30 -0
  725. package/lib/typescript/module/src/modules/next/bluetooth/react/context.d.ts.map +1 -0
  726. package/lib/typescript/module/src/modules/next/bluetooth/react/hooks.d.ts +47 -0
  727. package/lib/typescript/module/src/modules/next/bluetooth/react/hooks.d.ts.map +1 -0
  728. package/lib/typescript/module/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts +21 -0
  729. package/lib/typescript/module/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts.map +1 -0
  730. package/lib/typescript/module/src/modules/next/bluetooth/react-native/os-permissions.d.ts +5 -0
  731. package/lib/typescript/module/src/modules/next/bluetooth/react-native/os-permissions.d.ts.map +1 -0
  732. package/lib/typescript/module/src/modules/next/bluetooth/react-native/ovok-sink.d.ts +6 -0
  733. package/lib/typescript/module/src/modules/next/bluetooth/react-native/ovok-sink.d.ts.map +1 -0
  734. package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts +21 -0
  735. package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts.map +1 -0
  736. package/lib/typescript/module/src/modules/next/bluetooth/result-policy.d.ts +9 -1
  737. package/lib/typescript/module/src/modules/next/bluetooth/result-policy.d.ts.map +1 -1
  738. package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts +87 -0
  739. package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts.map +1 -0
  740. package/lib/typescript/module/src/modules/next/bluetooth/scan-loop.d.ts +23 -0
  741. package/lib/typescript/module/src/modules/next/bluetooth/scan-loop.d.ts.map +1 -0
  742. package/lib/typescript/module/src/modules/next/bluetooth/sig-profiles.d.ts.map +1 -1
  743. package/lib/typescript/module/src/modules/next/bluetooth/sink.d.ts +20 -0
  744. package/lib/typescript/module/src/modules/next/bluetooth/sink.d.ts.map +1 -0
  745. package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts +72 -0
  746. package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts.map +1 -0
  747. package/lib/typescript/module/src/modules/next/bluetooth/stable-hash.d.ts +6 -0
  748. package/lib/typescript/module/src/modules/next/bluetooth/stable-hash.d.ts.map +1 -0
  749. package/lib/typescript/module/src/modules/next/bluetooth/store.d.ts +16 -0
  750. package/lib/typescript/module/src/modules/next/bluetooth/store.d.ts.map +1 -0
  751. package/lib/typescript/module/src/modules/next/bluetooth/transport.d.ts +31 -0
  752. package/lib/typescript/module/src/modules/next/bluetooth/transport.d.ts.map +1 -0
  753. package/lib/typescript/module/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts +23 -0
  754. package/lib/typescript/module/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts.map +1 -0
  755. package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts +41 -0
  756. package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts.map +1 -0
  757. package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-device.d.ts +53 -0
  758. package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-device.d.ts.map +1 -0
  759. package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-shapes.d.ts +27 -0
  760. package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-shapes.d.ts.map +1 -0
  761. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts +8 -0
  762. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts.map +1 -0
  763. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts +29 -0
  764. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts.map +1 -0
  765. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts +10 -0
  766. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts.map +1 -0
  767. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts +9 -0
  768. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts.map +1 -0
  769. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts +56 -0
  770. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts.map +1 -0
  771. package/lib/typescript/module/src/modules/next/bluetooth/web/web-gatt.d.ts +27 -0
  772. package/lib/typescript/module/src/modules/next/bluetooth/web/web-gatt.d.ts.map +1 -0
  773. package/lib/typescript/module/src/modules/next/breathing-exercise/index.d.ts +3 -0
  774. package/lib/typescript/module/src/modules/next/breathing-exercise/index.d.ts.map +1 -0
  775. package/lib/typescript/module/src/modules/next/cms/index.d.ts +3 -0
  776. package/lib/typescript/module/src/modules/next/cms/index.d.ts.map +1 -0
  777. package/lib/typescript/module/src/modules/next/content/index.d.ts +3 -0
  778. package/lib/typescript/module/src/modules/next/content/index.d.ts.map +1 -0
  779. package/lib/typescript/module/src/modules/next/data-sync/index.d.ts +9 -0
  780. package/lib/typescript/module/src/modules/next/data-sync/index.d.ts.map +1 -0
  781. package/lib/typescript/module/src/modules/next/diary/index.d.ts +3 -0
  782. package/lib/typescript/module/src/modules/next/diary/index.d.ts.map +1 -0
  783. package/lib/typescript/module/src/modules/next/image/index.d.ts +3 -0
  784. package/lib/typescript/module/src/modules/next/image/index.d.ts.map +1 -0
  785. package/lib/typescript/module/src/modules/next/journal/index.d.ts +3 -0
  786. package/lib/typescript/module/src/modules/next/journal/index.d.ts.map +1 -0
  787. package/lib/typescript/module/src/modules/next/language-switcher/index.d.ts +3 -0
  788. package/lib/typescript/module/src/modules/next/language-switcher/index.d.ts.map +1 -0
  789. package/lib/typescript/module/src/modules/next/measurement/index.d.ts +3 -0
  790. package/lib/typescript/module/src/modules/next/measurement/index.d.ts.map +1 -0
  791. package/lib/typescript/module/src/modules/next/observation-detail/index.d.ts +3 -0
  792. package/lib/typescript/module/src/modules/next/observation-detail/index.d.ts.map +1 -0
  793. package/lib/typescript/module/src/modules/next/patient/index.d.ts +3 -0
  794. package/lib/typescript/module/src/modules/next/patient/index.d.ts.map +1 -0
  795. package/lib/typescript/module/src/modules/next/pdf/index.d.ts +3 -0
  796. package/lib/typescript/module/src/modules/next/pdf/index.d.ts.map +1 -0
  797. package/lib/typescript/module/src/modules/next/picker-sheet/index.d.ts +3 -0
  798. package/lib/typescript/module/src/modules/next/picker-sheet/index.d.ts.map +1 -0
  799. package/lib/typescript/module/src/modules/next/progress-bar/index.d.ts +3 -0
  800. package/lib/typescript/module/src/modules/next/progress-bar/index.d.ts.map +1 -0
  801. package/lib/typescript/module/src/modules/next/progress-ring/index.d.ts +3 -0
  802. package/lib/typescript/module/src/modules/next/progress-ring/index.d.ts.map +1 -0
  803. package/lib/typescript/module/src/modules/next/setting/index.d.ts +3 -0
  804. package/lib/typescript/module/src/modules/next/setting/index.d.ts.map +1 -0
  805. package/lib/typescript/module/src/modules/next/tab/index.d.ts +3 -0
  806. package/lib/typescript/module/src/modules/next/tab/index.d.ts.map +1 -0
  807. package/lib/typescript/module/src/modules/next/theme/index.d.ts +3 -0
  808. package/lib/typescript/module/src/modules/next/theme/index.d.ts.map +1 -0
  809. package/lib/typescript/module/src/modules/next/tile/index.d.ts +3 -0
  810. package/lib/typescript/module/src/modules/next/tile/index.d.ts.map +1 -0
  811. package/lib/typescript/module/src/modules/next/ui/index.d.ts +3 -0
  812. package/lib/typescript/module/src/modules/next/ui/index.d.ts.map +1 -0
  813. package/package.json +12 -2
  814. package/lib/commonjs/modules/bt-management/utils/daily-total-day.js.map +0 -1
  815. package/lib/commonjs/modules/next/bluetooth/drivers.js +0 -20
  816. package/lib/commonjs/modules/next/bluetooth/drivers.js.map +0 -1
  817. package/lib/commonjs/modules/next/bluetooth/legacy-driver.js +0 -55
  818. package/lib/commonjs/modules/next/bluetooth/legacy-driver.js.map +0 -1
  819. package/lib/module/modules/bt-management/utils/daily-total-day.js.map +0 -1
  820. package/lib/module/modules/next/bluetooth/drivers.js +0 -17
  821. package/lib/module/modules/next/bluetooth/drivers.js.map +0 -1
  822. package/lib/module/modules/next/bluetooth/legacy-driver.js +0 -51
  823. package/lib/module/modules/next/bluetooth/legacy-driver.js.map +0 -1
  824. package/lib/typescript/commonjs/src/modules/bt-management/utils/daily-total-day.d.ts.map +0 -1
  825. package/lib/typescript/commonjs/src/modules/next/bluetooth/drivers.d.ts +0 -7
  826. package/lib/typescript/commonjs/src/modules/next/bluetooth/drivers.d.ts.map +0 -1
  827. package/lib/typescript/commonjs/src/modules/next/bluetooth/legacy-driver.d.ts +0 -8
  828. package/lib/typescript/commonjs/src/modules/next/bluetooth/legacy-driver.d.ts.map +0 -1
  829. package/lib/typescript/module/src/modules/bt-management/utils/daily-total-day.d.ts.map +0 -1
  830. package/lib/typescript/module/src/modules/next/bluetooth/drivers.d.ts +0 -7
  831. package/lib/typescript/module/src/modules/next/bluetooth/drivers.d.ts.map +0 -1
  832. package/lib/typescript/module/src/modules/next/bluetooth/legacy-driver.d.ts +0 -8
  833. package/lib/typescript/module/src/modules/next/bluetooth/legacy-driver.d.ts.map +0 -1
  834. /package/lib/commonjs/modules/{bt-management/utils → next/bluetooth}/daily-total-day.js +0 -0
  835. /package/lib/module/modules/{bt-management/utils → next/bluetooth}/daily-total-day.js +0 -0
  836. /package/lib/typescript/commonjs/src/modules/{bt-management/utils → next/bluetooth}/daily-total-day.d.ts +0 -0
  837. /package/lib/typescript/module/src/modules/{bt-management/utils → next/bluetooth}/daily-total-day.d.ts +0 -0
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ /** Where on the body a thermometer took its reading: the Bluetooth SIG Temperature Type. */
4
+
5
+ /** Indexed by the Temperature Type code, which starts at 1; code 0 is reserved. */
6
+ const TEMPERATURE_TYPES = ["armpit", "body", "ear", "finger", "gastrointestinal-tract", "mouth", "rectum", "toe", "tympanum"];
7
+
8
+ /** The body site for a Temperature Type code; undefined for a reserved or unknown code. */
9
+ const temperatureTypeFromCode = code => TEMPERATURE_TYPES[code - 1];
10
+ export { temperatureTypeFromCode };
11
+ //# sourceMappingURL=temperature-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TEMPERATURE_TYPES","temperatureTypeFromCode","code"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/temperature-type.ts"],"mappings":";;AAAA;;AAYA;AACA,MAAMA,iBAA6C,GAAG,CACpD,QAAQ,EACR,MAAM,EACN,KAAK,EACL,QAAQ,EACR,wBAAwB,EACxB,OAAO,EACP,QAAQ,EACR,KAAK,EACL,UAAU,CACX;;AAED;AACA,MAAMC,uBAAuB,GAAIC,IAAY,IAC3CF,iBAAiB,CAACE,IAAI,GAAG,CAAC,CAAC;AAE7B,SAASD,uBAAuB","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ /** Resolves after `milliseconds`. */
4
+ export const wait = milliseconds => new Promise(resolve => setTimeout(resolve, milliseconds));
5
+ //# sourceMappingURL=wait.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["wait","milliseconds","Promise","resolve","setTimeout"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/wait.ts"],"mappings":";;AAAA;AACA,OAAO,MAAMA,IAAI,GAAIC,YAAoB,IACvC,IAAIC,OAAO,CAAEC,OAAO,IAAKC,UAAU,CAACD,OAAO,EAAEF,YAAY,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Background sync helpers for `@ovok/native/next`.
5
+ *
6
+ * Import from `@ovok/native/next/background-sync`.
7
+ *
8
+ * @module next/background-sync
9
+ */
10
+ export * from "../../background-sync/index.js";
11
+ export * from "./offline-measurement-background-sync.js";
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/next/background-sync/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,gCAAuB;AACrC,cAAc,0CAAuC","ignoreList":[]}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ import * as BackgroundTask from "expo-background-task";
4
+ import * as TaskManager from "expo-task-manager";
5
+ import { sentryLogger } from "../../helpers/utils/sentry-logger.js";
6
+ const OFFLINE_MEASUREMENT_BACKGROUND_TASK_NAME = "OvokOfflineMeasurementBackgroundSync";
7
+ const MINIMUM_INTERVAL_MINUTES = 15;
8
+
9
+ /** Core client surface used by the background queue flush. */
10
+
11
+ /** Options for recurring offline measurement sync. */
12
+
13
+ /** Flushes the Core offline measurement queue for a restored client. */
14
+ const runOfflineMeasurementBackgroundSync = client => client.measurements.offlineQueue.flush();
15
+
16
+ /**
17
+ * Defines the task at app entry-point load so it exists after process restart.
18
+ * The callback must restore the app-owned client and its secure session.
19
+ */
20
+ const registerOfflineMeasurementBackgroundTask = restoreClient => {
21
+ TaskManager.defineTask(OFFLINE_MEASUREMENT_BACKGROUND_TASK_NAME, async () => {
22
+ try {
23
+ const client = await restoreClient();
24
+ const result = await runOfflineMeasurementBackgroundSync(client);
25
+ if (Object.keys(result.failures).length > 0) {
26
+ throw new Error("Offline measurement queue contains failed items.");
27
+ }
28
+ return BackgroundTask.BackgroundTaskResult.Success;
29
+ } catch {
30
+ sentryLogger("error", "Background measurement sync failed", {
31
+ errorCode: "offline_measurement_background_sync_failed"
32
+ });
33
+ return BackgroundTask.BackgroundTaskResult.Failed;
34
+ }
35
+ });
36
+ };
37
+
38
+ /** Schedules recurring offline measurement sync through WorkManager or BGTaskScheduler. */
39
+ const scheduleOfflineMeasurementBackgroundSync = async (options = {}) => {
40
+ const minimumIntervalMinutes = options.minimumIntervalMinutes ?? MINIMUM_INTERVAL_MINUTES;
41
+ if (!Number.isFinite(minimumIntervalMinutes) || minimumIntervalMinutes < MINIMUM_INTERVAL_MINUTES) {
42
+ throw new RangeError(`minimumIntervalMinutes must be at least ${MINIMUM_INTERVAL_MINUTES}.`);
43
+ }
44
+ if (!TaskManager.isTaskDefined(OFFLINE_MEASUREMENT_BACKGROUND_TASK_NAME)) {
45
+ throw new Error("Register the offline measurement background task from the app entry point before scheduling it.");
46
+ }
47
+ await BackgroundTask.registerTaskAsync(OFFLINE_MEASUREMENT_BACKGROUND_TASK_NAME, {
48
+ minimumInterval: minimumIntervalMinutes
49
+ });
50
+ };
51
+
52
+ /** Cancels recurring offline measurement sync. */
53
+ const cancelOfflineMeasurementBackgroundSync = () => BackgroundTask.unregisterTaskAsync(OFFLINE_MEASUREMENT_BACKGROUND_TASK_NAME);
54
+ export { cancelOfflineMeasurementBackgroundSync, registerOfflineMeasurementBackgroundTask, runOfflineMeasurementBackgroundSync, scheduleOfflineMeasurementBackgroundSync };
55
+ //# sourceMappingURL=offline-measurement-background-sync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BackgroundTask","TaskManager","sentryLogger","OFFLINE_MEASUREMENT_BACKGROUND_TASK_NAME","MINIMUM_INTERVAL_MINUTES","runOfflineMeasurementBackgroundSync","client","measurements","offlineQueue","flush","registerOfflineMeasurementBackgroundTask","restoreClient","defineTask","result","Object","keys","failures","length","Error","BackgroundTaskResult","Success","errorCode","Failed","scheduleOfflineMeasurementBackgroundSync","options","minimumIntervalMinutes","Number","isFinite","RangeError","isTaskDefined","registerTaskAsync","minimumInterval","cancelOfflineMeasurementBackgroundSync","unregisterTaskAsync"],"sourceRoot":"../../../../../src","sources":["modules/next/background-sync/offline-measurement-background-sync.ts"],"mappings":";;AAAA,OAAO,KAAKA,cAAc,MAAM,sBAAsB;AACtD,OAAO,KAAKC,WAAW,MAAM,mBAAmB;AAIhD,SAASC,YAAY,QAAQ,sCAAmC;AAEhE,MAAMC,wCAAwC,GAC5C,sCAAsC;AAExC,MAAMC,wBAAwB,GAAG,EAAE;;AAEnC;;AAMA;;AAOA;AACA,MAAMC,mCAAmC,GACvCC,MAA8C,IAC3CA,MAAM,CAACC,YAAY,CA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A,KAC7ChC,cAAc,CAACiC,mBAAmB,CAChC9B,wCACF,CAAC;AAEH,SACE6B,sCAAsC,EACtCtB,wCAAwC,EACxCL,mCAAmC,EACnCkB,wCAAwC","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ const FIRST_RETRY_DELAY_MS = 2_000;
4
+ const MAX_RETRY_DELAY_MS = 60_000;
5
+
6
+ /** When a paired device that keeps failing may be connected automatically again. */
7
+ class AutoConnectBackoff {
8
+ failures = new Map();
9
+ allows(id, now = Date.now()) {
10
+ return (this.failures.get(id)?.notBefore ?? 0) <= now;
11
+ }
12
+
13
+ /** Records a failure; returns how long until the next automatic attempt. */
14
+ failed(id, now = Date.now()) {
15
+ const count = (this.failures.get(id)?.count ?? 0) + 1;
16
+ const delay = Math.min(FIRST_RETRY_DELAY_MS * 2 ** (count - 1), MAX_RETRY_DELAY_MS);
17
+ this.failures.set(id, {
18
+ count,
19
+ notBefore: now + delay
20
+ });
21
+ return delay;
22
+ }
23
+ succeeded(id) {
24
+ this.failures.delete(id);
25
+ }
26
+ }
27
+ export { AutoConnectBackoff };
28
+ //# sourceMappingURL=auto-connect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["FIRST_RETRY_DELAY_MS","MAX_RETRY_DELAY_MS","AutoConnectBackoff","failures","Map","allows","id","now","Date","get","notBefore","failed","count","delay","Math","min","set","succeeded","delete"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/auto-connect.ts"],"mappings":";;AAAA,MAAMA,oBAAoB,GAAG,KAAK;AAClC,MAAMC,kBAAkB,GAAG,MAAM;;AAEjC;AACA,MAAMC,kBAAkB,CAAC;EACNC,QAAQ,GAAG,IAAIC,GAAG,CAA+C,CAAC;EAE5EC,MAAMA,CAACC,EAAU,EAAEC,GAAG,GAAGC,IAAI,CAACD,GAAG,CAAC,CAAC,EAAW;IACnD,OAAO,CAAC,IAAI,CAACJ,QAAQ,CAACM,GAAG,CAACH,EAAE,CAAC,EAAEI,SAAS,IAAI,CAAC,KAAKH,GAAG;EACvD;;EAEA;EACOI,MAAMA,CAACL,EAAU,EAAEC,GAAG,GAAGC,IAAI,CAACD,GAAG,CAAC,CAAC,EAAU;IAClD,MAAMK,KAAK,GAAG,CAAC,IAAI,CAACT,QAAQ,CAACM,GAAG,CAACH,EAAE,CAAC,EAAEM,KAAK,IAAI,CAAC,IAAI,CAAC;IACrD,MAAMC,KAAK,GAAGC,IAAI,CAACC,GAAG,CAACf,oBAAoB,GAAG,CAAC,KAAKY,KAAK,GAAG,CAAC,CAAC,EAAEX,kBAAkB,CAAC;IAEnF,IAAI,CAACE,QAAQ,CAACa,GAAG,CAACV,EAAE,EAAE;MAAEM,KAAK;MAAEF,SAAS,EAAEH,GAAG,GAAGM;IAAM,CAAC,CAAC;IAExD,OAAOA,KAAK;EACd;EAEOI,SAASA,CAACX,EAAU,EAAQ;IACjC,IAAI,CAACH,QAAQ,CAACe,MAAM,CAACZ,EAAE,CAAC;EAC1B;AACF;AAEA,SAASJ,kBAAkB","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ import { BluetoothErrorCode as LegacyCode, toBluetoothError } from "../../../bt-management/types/bluetooth-error.js";
4
+ import { BluetoothError } from "../errors.js";
5
+ const CODES = {
6
+ [LegacyCode.UNKNOWN]: "unknown",
7
+ [LegacyCode.PERMISSION_DENIED]: "permission-denied",
8
+ [LegacyCode.UNSUPPORTED]: "unsupported",
9
+ [LegacyCode.POWERED_OFF]: "powered-off",
10
+ [LegacyCode.SCAN_FAILED]: "scan-failed",
11
+ [LegacyCode.CONNECTION_FAILED]: "connection-failed",
12
+ [LegacyCode.PAIRING_REQUIRED]: "pairing-required",
13
+ [LegacyCode.DISCOVERY_FAILED]: "discovery-failed",
14
+ [LegacyCode.DEVICE_ERROR]: "device-error",
15
+ [LegacyCode.FRAME_INVALID]: "frame-invalid",
16
+ [LegacyCode.MEASUREMENT_FAILED]: "measurement-failed",
17
+ [LegacyCode.BACKGROUND_SYNC]: "unknown"
18
+ };
19
+
20
+ /** Classifies a `react-native-ble-plx` or legacy device error as a `BluetoothError`. */
21
+ export const fromBleError = error => {
22
+ if (error instanceof BluetoothError) {
23
+ return error;
24
+ }
25
+ const legacy = toBluetoothError(error);
26
+ return new BluetoothError(CODES[legacy.code], legacy.message, error);
27
+ };
28
+ //# sourceMappingURL=ble-errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BluetoothErrorCode","LegacyCode","toBluetoothError","BluetoothError","CODES","UNKNOWN","PERMISSION_DENIED","UNSUPPORTED","POWERED_OFF","SCAN_FAILED","CONNECTION_FAILED","PAIRING_REQUIRED","DISCOVERY_FAILED","DEVICE_ERROR","FRAME_INVALID","MEASUREMENT_FAILED","BACKGROUND_SYNC","fromBleError","error","legacy","code","message"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/ble-errors.ts"],"mappings":";;AAAA,SAASA,kBAAkB,IAAIC,UAAU,EAAEC,gBAAgB,QAAQ,iDAA8C;AACjH,SAASC,cAAc,QAA4B,cAAW;AAE9D,MAAMC,KAA6C,GAAG;EACpD,CAACH,UAAU,CAACI,OAAO,GAAG,SAAS;EAC/B,CAACJ,UAAU,CAACK,iBAAiB,GAAG,mBAAmB;EACnD,CAACL,UAAU,CAACM,WAAW,GAAG,aAAa;EACvC,CAACN,UAAU,CAACO,WAAW,GAAG,aAAa;EACvC,CAACP,UAAU,CAACQ,WAAW,GAAG,aAAa;EACvC,CAACR,UAAU,CAACS,iBAAiB,GAAG,mBAAmB;EACnD,CAACT,UAAU,CAACU,gBAAgB,GAAG,kBAAkB;EACjD,CAACV,UAAU,CAACW,gBAAgB,GAAG,kBAAkB;EACjD,CAACX,UAAU,CAACY,YAAY,GAAG,cAAc;EACzC,CAACZ,UAAU,CAACa,aAAa,GAAG,eAAe;EAC3C,CAACb,UAAU,CAACc,kBAAkB,GAAG,oBAAoB;EACrD,CAACd,UAAU,CAACe,eAAe,GAAG;AAChC,CAAC;;AAED;AACA,OAAO,MAAMC,YAAY,GAAIC,KAAc,IAAqB;EAC9D,IAAIA,KAAK,YAAYf,cAAc,EAAE;IACnC,OAAOe,KAAK;EACd;EAEA,MAAMC,MAAM,GAAGjB,gBAAgB,CAACgB,KAAK,CAAC;EAEtC,OAAO,IAAIf,cAAc,CAACC,KAAK,CAACe,MAAM,CAACC,IAAI,CAAC,EAAED,MAAM,CAACE,OAAO,EAAEH,KAAK,CAAC;AACtE,CAAC","ignoreList":[]}
@@ -0,0 +1,159 @@
1
+ "use strict";
2
+
3
+ import { readDeviceInformation } from "../../../bt-management/services/devices/bt-device-information.js";
4
+ import { awaitNotificationsEnabled } from "../../../bt-management/services/devices/bt-notification-readiness.js";
5
+ import { BTPairingRetry } from "../../../bt-management/services/devices/bt-pairing-retry.js";
6
+ import { sentryLogger } from "../../../helpers/utils/sentry-logger.js";
7
+ import { Channel } from "../channel.js";
8
+ import { fromBleError } from "./ble-errors.js";
9
+ const CONNECT_ATTEMPTS = 5;
10
+ const FIRST_RETRY_DELAY_MS = 1000;
11
+ const MAX_RETRY_DELAY_MS = 5000;
12
+
13
+ /** BleErrorCode.OperationCancelled and DeviceDisconnected; the enum is not available at runtime. */
14
+ const ENDS_THE_LINK = new Set([2, 201]);
15
+ const toBytes = base64 => Uint8Array.from(atob(base64), char => char.charCodeAt(0));
16
+ const toBase64 = bytes => btoa(String.fromCharCode(...bytes));
17
+ const retryDelay = attempt => Math.min(FIRST_RETRY_DELAY_MS * 2 ** (attempt - 1), MAX_RETRY_DELAY_MS);
18
+ const abortReason = signal => signal.reason ?? new Error("The Bluetooth connection was cancelled");
19
+
20
+ /** Waits `ms`, or rejects as soon as `signal` aborts so a cancelled retry does not linger. */
21
+ const wait = (ms, signal) => new Promise((resolve, reject) => {
22
+ const aborted = () => {
23
+ clearTimeout(timer);
24
+ reject(abortReason(signal));
25
+ };
26
+ const timer = setTimeout(() => {
27
+ signal.removeEventListener("abort", aborted);
28
+ resolve();
29
+ }, ms);
30
+ signal.addEventListener("abort", aborted, {
31
+ once: true
32
+ });
33
+ });
34
+ async function connectWithRetries(device, signal) {
35
+ for (let attempt = 1;; attempt += 1) {
36
+ if (signal.aborted) {
37
+ throw abortReason(signal);
38
+ }
39
+ try {
40
+ if (!(await device.isConnected())) {
41
+ await device.connect();
42
+ }
43
+ return;
44
+ } catch (error) {
45
+ if (attempt >= CONNECT_ATTEMPTS) {
46
+ sentryLogger("error", "BLUETOOTH: Connection failed", {
47
+ errorCode: fromBleError(error).code,
48
+ attempts: attempt
49
+ });
50
+ throw error;
51
+ }
52
+ await wait(retryDelay(attempt), signal);
53
+ }
54
+ }
55
+ }
56
+
57
+ /** Reads the standard Device Information strings; `undefined` when the device has none. */
58
+ async function readInformation(device, pairing) {
59
+ let information;
60
+ await readDeviceInformation(device, ({
61
+ manufacturerName,
62
+ model,
63
+ serialNumber
64
+ }) => {
65
+ information = {
66
+ manufacturerName,
67
+ model,
68
+ serialNumber
69
+ };
70
+ }, pairing.run);
71
+ return information;
72
+ }
73
+ class BleLink {
74
+ channels = new Set();
75
+ notificationsPending = new Set();
76
+ ended = false;
77
+ closeOnAbort = () => void this.close();
78
+ constructor(device, signal, pairing, deviceInformation) {
79
+ this.device = device;
80
+ this.signal = signal;
81
+ this.pairing = pairing;
82
+ this.deviceInformation = deviceInformation;
83
+ this.disconnected = device.onDisconnected(() => this.endAll());
84
+ signal.addEventListener("abort", this.closeOnAbort, {
85
+ once: true
86
+ });
87
+ }
88
+ subscribe(service, characteristic) {
89
+ const channel = new Channel(() => {
90
+ subscription.remove();
91
+ this.channels.delete(channel);
92
+ });
93
+ const subscription = this.device.monitorCharacteristicForService(service, characteristic, (error, value) => {
94
+ if (error) {
95
+ this.endOrFail(channel, error);
96
+ } else if (value?.value) {
97
+ channel.push(toBytes(value.value));
98
+ }
99
+ });
100
+ this.channels.add(channel);
101
+ this.awaitNotifications(service, characteristic);
102
+ if (this.ended) {
103
+ channel.end();
104
+ }
105
+ return channel;
106
+ }
107
+ async write(service, characteristic, bytes) {
108
+ await Promise.all(this.notificationsPending);
109
+ await this.pairing.run(() => this.device.writeCharacteristicWithResponseForService(service, characteristic, toBase64(bytes)));
110
+ }
111
+ async close() {
112
+ this.signal.removeEventListener("abort", this.closeOnAbort);
113
+ this.endAll();
114
+ this.disconnected.remove();
115
+ await this.device.cancelConnection().catch(() => undefined);
116
+ }
117
+
118
+ /** A write waits for these, because a device may refuse a command until its notifications are on. */
119
+ awaitNotifications(serviceUuid, characteristicUuid) {
120
+ const enabled = awaitNotificationsEnabled(this.device, [{
121
+ serviceUuid,
122
+ characteristicUuid
123
+ }]).finally(() => this.notificationsPending.delete(enabled));
124
+ this.notificationsPending.add(enabled);
125
+ }
126
+ endOrFail(channel, error) {
127
+ if (ENDS_THE_LINK.has(error.errorCode)) {
128
+ channel.end();
129
+ } else {
130
+ channel.fail(fromBleError(error));
131
+ }
132
+ }
133
+ endAll() {
134
+ this.ended = true;
135
+ [...this.channels].forEach(channel => channel.end());
136
+ }
137
+ }
138
+
139
+ /** Connects (retrying with backoff), discovers services and reads Device Information; aborting `signal` closes the link. */
140
+ async function openBleLink(device, signal) {
141
+ await connectWithRetries(device, signal).catch(error => {
142
+ throw fromBleError(error);
143
+ });
144
+ const pairing = new BTPairingRetry(device, () => sentryLogger("info", "BLUETOOTH: Waiting for the user to pair the device"));
145
+ let information;
146
+ try {
147
+ await device.discoverAllServicesAndCharacteristics();
148
+ information = await readInformation(device, pairing);
149
+ if (signal.aborted) {
150
+ throw abortReason(signal);
151
+ }
152
+ } catch (error) {
153
+ await device.cancelConnection().catch(() => undefined);
154
+ throw fromBleError(error);
155
+ }
156
+ return new BleLink(device, signal, pairing, information);
157
+ }
158
+ export { openBleLink };
159
+ //# sourceMappingURL=ble-link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["readDeviceInformation","awaitNotificationsEnabled","BTPairingRetry","sentryLogger","Channel","fromBleError","CONNECT_ATTEMPTS","FIRST_RETRY_DELAY_MS","MAX_RETRY_DELAY_MS","ENDS_THE_LINK","Set","toBytes","base64","Uint8Array","from","atob","char","charCodeAt","toBase64","bytes","btoa","String","fromCharCode","retryDelay","attempt","Math","min","abortReason","signal","reason","Error","wait","ms","Promise","resolve","reject","aborted","clearTimeout","timer","setTimeout","removeEventListener","addEventListener","once","connectWithRetries","device","isConnected","connect","error","errorCode","code","attempts","readInformation","pairing","information","manufacturerName","model","serialNumber","run","BleLink","channels","notificationsPending","ended","closeOnAbort","close","constructor","deviceInformation","disconnected","onDisconnected","endAll","subscribe","service","characteristic","channel","subscription","remove","delete","monitorCharacteristicForService","value","endOrFail","push","add","awaitNotifications","end","write","all","writeCharacteristicWithResponseForService","cancelConnection","catch","undefined","serviceUuid","characteristicUuid","enabled","finally","has","fail","forEach","openBleLink","discoverAllServicesAndCharacteristics"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/ble-link.ts"],"mappings":";;AAEA,SAASA,qBAAqB,QAAQ,kEAA+D;AACrG,SAASC,yBAAyB,QAAQ,sEAAmE;AAC7G,SAASC,cAAc,QAAQ,6DAA0D;AACzF,SAASC,YAAY,QAAQ,yCAAsC;AACnE,SAASC,OAAO,QAAQ,eAAY;AAGpC,SAASC,YAAY,QAAQ,iBAAc;AAE3C,MAAMC,gBAAgB,GAAG,CAAC;AAC1B,MAAMC,oBAAoB,GAAG,IAAI;AACjC,MAAMC,kBAAkB,GAAG,IAAI;;AAE/B;AACA,MAAMC,aAAkC,GAAG,IAAIC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAE5D,MAAMC,OAAO,GAAIC,MAAc,IAAiBC,UAAU,CAACC,IAAI,CAACC,IAAI,CAACH,MAAM,CAAC,EAAGI,IAAI,IAAKA,IAAI,CAACC,UAAU,CAAC,CAAC,CAAC,CAAC;AAE3G,MAAMC,QAAQ,GAAIC,KAAiB,IAAaC,IAAI,CAACC,MAAM,CAACC,YAAY,CAAC,GAAGH,KAAK,CAAC,CAAC;AA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,CAAC,CAAC;EAE7E,IAAIkD,WAA0C;EAE9C,IAAI;IACF,MAAMT,MAAM,CAACqD,qCAAqC,CAAC,CAAC;IACpD5C,WAAW,GAAG,MAAMF,eAAe,CAACP,MAAM,EAAEQ,OAAO,CAAC;IACpD,IAAIxB,MAAM,CAACQ,OAAO,EAAE;MAClB,MAAMT,WAAW,CAACC,MAAM,CAAC;IAC3B;EACF,CAAC,CAAC,OAAOmB,KAAK,EAAE;IACd,MAAMH,MAAM,CAAC0C,gBAAgB,CAAC,CAAC,CAACC,KAAK,CAAC,MAAMC,SAAS,CAAC;IACtD,MAAMnF,YAAY,CAAC0C,KAAK,CAAC;EAC3B;EAEA,OAAO,IAAIW,OAAO,CAACd,MAAM,EAAEhB,MAAM,EAAEwB,OAAO,EAAEC,WAAW,CAAC;AAC1D;AAEA,SAAS2C,WAAW","ignoreList":[]}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ import { openBleLink } from "./ble-link.js";
4
+ const bleDevices = new WeakMap();
5
+
6
+ /** The `react-native-ble-plx` device behind a peripheral that `blePeripheral` made. */
7
+ const bleDeviceOf = peripheral => {
8
+ const device = bleDevices.get(peripheral);
9
+ if (!device) {
10
+ throw new Error("The peripheral was not made by blePeripheral");
11
+ }
12
+ return device;
13
+ };
14
+
15
+ /** A `react-native-ble-plx` device, or a device with the same API such as a Web Bluetooth one, as a peripheral. */
16
+ const blePeripheral = device => {
17
+ const peripheral = {
18
+ id: device.id,
19
+ advertisement: {
20
+ name: device.name?.trim() || device.localName?.trim() || "",
21
+ serviceUUIDs: device.serviceUUIDs ?? [],
22
+ manufacturerData: device.manufacturerData ?? null
23
+ },
24
+ openLink: signal => openBleLink(device, signal)
25
+ };
26
+ bleDevices.set(peripheral, device);
27
+ return peripheral;
28
+ };
29
+ export { bleDeviceOf, blePeripheral };
30
+ //# sourceMappingURL=ble-peripheral.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["openBleLink","bleDevices","WeakMap","bleDeviceOf","peripheral","device","get","Error","blePeripheral","id","advertisement","name","trim","localName","serviceUUIDs","manufacturerData","openLink","signal","set"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/ble-peripheral.ts"],"mappings":";;AAIA,SAASA,WAAW,QAAQ,eAAY;AAExC,MAAMC,UAAU,GAAG,IAAIC,OAAO,CAAqB,CAAC;;AAEpD;AACA,MAAMC,WAAW,GAAIC,UAAsB,IAAa;EACtD,MAAMC,MAAM,GAAGJ,UAAU,CAACK,GAAG,CAACF,UAAU,CAAC;EAEzC,IAAI,CAACC,MAAM,EAAE;IACX,MAAM,IAAIE,KAAK,CAAC,8CAA8C,CAAC;EACjE;EAEA,OAAOF,MAAM;AACf,CAAC;;AAED;AACA,MAAMG,aAAa,GAAIH,MAAc,IAAiB;EACpD,MAAMD,UAAsB,GAAG;IAC7BK,EAAE,EAAEJ,MAAM,CAACI,EAAE;IACbC,aAAa,EAAE;MACbC,IAAI,EAAEN,MAAM,CAACM,IAAI,EAAEC,IAAI,CAAC,CAAC,IAAIP,MAAM,CAACQ,SAAS,EAAED,IAAI,CAAC,CAAC,IAAI,EAAE;MAC3DE,YAAY,EAAET,MAAM,CAACS,YAAY,IAAI,EAAE;MACvCC,gBAAgB,EAAEV,MAAM,CAACU,gBAAgB,IAAI;IAC/C,CAAC;IACDC,QAAQ,EAAGC,MAAM,IAAKjB,WAAW,CAACK,MAAM,EAAEY,MAAM;EAClD,CAAC;EAEDhB,UAAU,CAACiB,GAAG,CAACd,UAAU,EAAEC,MAAM,CAAC;EAElC,OAAOD,UAAU;AACnB,CAAC;AAED,SAASD,WAAW,EAAEK,aAAa","ignoreList":[]}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ import { ScanMode, State } from "react-native-ble-plx";
4
+ import { fromBleError } from "./ble-errors.js";
5
+ import { blePeripheral } from "./ble-peripheral.js";
6
+ const ADAPTER_STATES = {
7
+ [State.PoweredOn]: "on",
8
+ [State.PoweredOff]: "off",
9
+ [State.Unauthorized]: "unauthorized",
10
+ [State.Unsupported]: "unsupported"
11
+ };
12
+
13
+ /** A scanner over a `react-native-ble-plx` `BleManager`. */
14
+ const bleManagerScanner = bleManager => ({
15
+ watchState: listener => {
16
+ const subscription = bleManager.onStateChange(state => listener(ADAPTER_STATES[state] ?? "unknown"), true);
17
+ return () => subscription.remove();
18
+ },
19
+ scan: (onFound, onError) => {
20
+ let active = true;
21
+ try {
22
+ bleManager.startDeviceScan(null, {
23
+ scanMode: ScanMode.Balanced
24
+ }, (error, device) => {
25
+ if (!active) {
26
+ return;
27
+ }
28
+ if (error) {
29
+ onError(fromBleError(error));
30
+ } else if (device) {
31
+ onFound(blePeripheral(device));
32
+ }
33
+ });
34
+ } catch (error) {
35
+ onError(fromBleError(error));
36
+ }
37
+ return () => {
38
+ active = false;
39
+ bleManager.stopDeviceScan();
40
+ };
41
+ }
42
+ });
43
+ export { bleManagerScanner };
44
+ //# sourceMappingURL=ble-scanner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ScanMode","State","fromBleError","blePeripheral","ADAPTER_STATES","PoweredOn","PoweredOff","Unauthorized","Unsupported","bleManagerScanner","bleManager","watchState","listener","subscription","onStateChange","state","remove","scan","onFound","onError","active","startDeviceScan","scanMode","Balanced","error","device","stopDeviceScan"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/ble-scanner.ts"],"mappings":";;AAAA,SAAqBA,QAAQ,EAAEC,KAAK,QAAQ,sBAAsB;AAIlE,SAASC,YAAY,QAAQ,iBAAc;AAC3C,SAASC,aAAa,QAAQ,qBAAkB;AAEhD,MAAMC,cAAoD,GAAG;EAC3D,CAACH,KAAK,CAACI,SAAS,GAAG,IAAI;EACvB,CAACJ,KAAK,CAACK,UAAU,GAAG,KAAK;EACzB,CAACL,KAAK,CAACM,YAAY,GAAG,cAAc;EACpC,CAACN,KAAK,CAACO,WAAW,GAAG;AACvB,CAAC;;AAED;AACA,MAAMC,iBAAiB,GAAIC,UAAsB,KAAwB;EACvEC,UAAU,EAAGC,QAAQ,IAAK;IACxB,MAAMC,YAAY,GAAGH,UAAU,CAACI,aAAa,CAAEC,KAAK,IAAKH,QAAQ,CAACR,cAAc,CAACW,KAAK,CAAC,IAAI,SAAS,CAAC,EAAE,IAAI,CAAC;IAE5G,OAAO,MAAMF,YAAY,CAACG,MAAM,CAAC,CAAC;EACpC,CAAC;EACDC,IAAI,EAAEA,CAACC,OAAO,EAAEC,OAAO,KAAK;IAC1B,IAAIC,MAAM,GAAG,IAAI;IAEjB,IAAI;MACFV,UAAU,CAACW,eAAe,CAAC,IAAI,EAAE;QAAEC,QAAQ,EAAEtB,QAAQ,CAACuB;MAAS,CAAC,EAAE,CAACC,KAAK,EAAEC,MAAM,KAAK;QACnF,IAAI,CAACL,MAAM,EAAE;UACX;QACF;QACA,IAAII,KAAK,EAAE;UACTL,OAAO,CAACjB,YAAY,CAACsB,KAAK,CAAC,CAAC;QAC9B,CAAC,MAAM,IAAIC,MAAM,EAAE;UACjBP,OAAO,CAACf,aAAa,CAACsB,MAAM,CAAC,CAAC;QAChC;MACF,CAAC,CAAC;IACJ,CAAC,CAAC,OAAOD,KAAK,EAAE;MACdL,OAAO,CAACjB,YAAY,CAACsB,KAAK,CAAC,CAAC;IAC9B;IAEA,OAAO,MAAM;MACXJ,MAAM,GAAG,KAAK;MACdV,UAAU,CAACgB,cAAc,CAAC,CAAC;IAC7B,CAAC;EACH;AACF,CAAC,CAAC;AAEF,SAASjB,iBAAiB","ignoreList":[]}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ import { resolveDeviceKey } from "../../../bt-management/core/resolve-device-key.js";
4
+ import { DeviceCreator } from "../../../bt-management/services/device-creator.js";
5
+ import { gattDriver } from "../driver.js";
6
+ import { SIG_PROTOCOLS } from "../sig-profiles.js";
7
+ import { legacyDriver } from "./legacy-driver.js";
8
+
9
+ /** Support for the SDK's integrated devices and `defineCustomDevice` declarations, over `react-native-ble-plx`. */
10
+ const builtInDevices = accepted => {
11
+ const creator = new DeviceCreator(accepted);
12
+ return {
13
+ match: ({
14
+ name,
15
+ serviceUUIDs,
16
+ manufacturerData
17
+ }) => {
18
+ const key = resolveDeviceKey(accepted, name, serviceUUIDs, manufacturerData ?? undefined);
19
+ if (key === undefined) {
20
+ return undefined;
21
+ }
22
+ const protocol = SIG_PROTOCOLS.get(key);
23
+ return {
24
+ key,
25
+ driver: protocol ? gattDriver(key, protocol) : legacyDriver(creator, key)
26
+ };
27
+ }
28
+ };
29
+ };
30
+ export { builtInDevices };
31
+ //# sourceMappingURL=built-in-devices.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["resolveDeviceKey","DeviceCreator","gattDriver","SIG_PROTOCOLS","legacyDriver","builtInDevices","accepted","creator","match","name","serviceUUIDs","manufacturerData","key","undefined","protocol","get","driver"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/built-in-devices.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,mDAAgD;AACjF,SAASC,aAAa,QAAQ,mDAAgD;AAG9E,SAASC,UAAU,QAAQ,cAAW;AACtC,SAASC,aAAa,QAAQ,oBAAiB;AAE/C,SAASC,YAAY,QAAQ,oBAAiB;;AAE9C;AACA,MAAMC,cAAc,GAAIC,QAAmC,IAAoB;EAC7E,MAAMC,OAAO,GAAG,IAAIN,aAAa,CAACK,QAAQ,CAAC;EAE3C,OAAO;IACLE,KAAK,EAAEA,CAAC;MAAEC,IAAI;MAAEC,YAAY;MAAEC;IAAiB,CAAC,KAAK;MACnD,MAAMC,GAAG,GAAGZ,gBAAgB,CAACM,QAAQ,EAAEG,IAAI,EAAEC,YAAY,EAAEC,gBAAgB,IAAIE,SAAS,CAAC;MAEzF,IAAID,GAAG,KAAKC,SAAS,EAAE;QACrB,OAAOA,SAAS;MAClB;MAEA,MAAMC,QAAQ,GAAGX,aAAa,CAACY,GAAG,CAACH,GAAG,CAAC;MAEvC,OAAO;QAAEA,GAAG;QAAEI,MAAM,EAAEF,QAAQ,GAAGZ,UAAU,CAACU,GAAG,EAAEE,QAAQ,CAAC,GAAGV,YAAY,CAACG,OAAO,EAAEK,GAAG;MAAE,CAAC;IAC3F;EACF,CAAC;AACH,CAAC;AAED,SAASP,cAAc","ignoreList":[]}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+
3
+ import { DeviceStatus } from "../../../bt-management/types/device-status.js";
4
+ import { Channel } from "../channel.js";
5
+ import { isTimestamped } from "../driver.js";
6
+ import { fromBleError } from "./ble-errors.js";
7
+ import { bleDeviceOf } from "./ble-peripheral.js";
8
+ const STATUSES = {
9
+ [DeviceStatus.CONNECTED]: "connected",
10
+ [DeviceStatus.MEASURING]: "measuring",
11
+ [DeviceStatus.DISCONNECTED]: "disconnected"
12
+ };
13
+
14
+ /** Runs a device class from `@ovok/native/bt-management` until its protocol moves to a `DeviceProtocol`. */
15
+ const legacyDriver = (creator, deviceName) => (peripheral, signal) => {
16
+ const stop = () => events.end();
17
+ const events = new Channel(() => {
18
+ signal.removeEventListener("abort", stop);
19
+ void managed.disconnect();
20
+ });
21
+ const managed = creator.createDevice({
22
+ device: bleDeviceOf(peripheral),
23
+ deviceName,
24
+ onResult: ({
25
+ id,
26
+ data
27
+ }) => {
28
+ const reading = data;
29
+ events.push({
30
+ kind: "reading",
31
+ id: isTimestamped(reading) ? id : null,
32
+ reading
33
+ });
34
+ },
35
+ onDeviceStatusChanged: ({
36
+ status
37
+ }) => {
38
+ const mapped = STATUSES[status];
39
+ if (mapped) {
40
+ events.push({
41
+ kind: "status",
42
+ status: mapped
43
+ });
44
+ }
45
+ if (status === DeviceStatus.DISCONNECTED) {
46
+ events.end();
47
+ }
48
+ },
49
+ onError: ({
50
+ error
51
+ }) => events.push({
52
+ kind: "error",
53
+ error: fromBleError(error)
54
+ })
55
+ });
56
+ signal.addEventListener("abort", stop, {
57
+ once: true
58
+ });
59
+ managed.connect().catch(error => events.fail(fromBleError(error)));
60
+ return events;
61
+ };
62
+ export { legacyDriver };
63
+ //# sourceMappingURL=legacy-driver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DeviceStatus","Channel","isTimestamped","fromBleError","bleDeviceOf","STATUSES","CONNECTED","MEASURING","DISCONNECTED","legacyDriver","creator","deviceName","peripheral","signal","stop","events","end","removeEventListener","managed","disconnect","createDevice","device","onResult","id","data","reading","push","kind","onDeviceStatusChanged","status","mapped","onError","error","addEventListener","once","connect","catch","fail"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/legacy-driver.ts"],"mappings":";;AAKA,SAASA,YAAY,QAAQ,+CAA4C;AACzE,SAASC,OAAO,QAAQ,eAAY;AACpC,SAA8BC,aAAa,QAAQ,cAAW;AAE9D,SAASC,YAAY,QAAQ,iBAAc;AAC3C,SAASC,WAAW,QAAQ,qBAAkB;AAE9C,MAAMC,QAAmF,GAAG;EAC1F,CAACL,YAAY,CAACM,SAAS,GAAG,WAAW;EACrC,CAACN,YAAY,CAACO,SAAS,GAAG,WAAW;EACrC,CAACP,YAAY,CAACQ,YAAY,GAAG;AAC/B,CAAC;;AAED;AACA,MAAMC,YAAY,GAAGA,CAACC,OAAiD,EAAEC,UAAqB,KAC5F,CAACC,UAAU,EAAEC,MAAM,KAAK;EACtB,MAAMC,IAAI,GAAGA,CAAA,KAAMC,MAAM,CAACC,GAAG,CAAC,CAAC;EAE/B,MAAMD,MAAM,GAAG,IAAId,OAAO,CAAc,MAAM;IAC5CY,MAAM,CAACI,mBAAmB,CAAC,OAAO,EAAEH,IAAI,CAAC;IACzC,KAAKI,OAAO,CAACC,UAAU,CAAC,CAAC;EAC3B,CAAC,CAAC;EAEF,MAAMD,OAAO,GAAGR,OAAO,CAACU,YAAY,CAAC;IACnCC,MAAM,EAAEjB,WAAW,CAACQ,UAAU,CAAC;IAC/BD,UAAU;IACVW,QAAQ,EAAEA,CAAC;MAAEC,EAAE;MAAEC;IAAK,CAAC,KAAK;MAC1B,MAAMC,OAAO,GAAGD,IAAmB;MAEnCT,MAAM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