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

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 (597) 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-scanner.js +75 -0
  85. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-scanner.js.map +1 -0
  86. package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js +34 -0
  87. package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -0
  88. package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js +67 -0
  89. package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -0
  90. package/lib/commonjs/modules/next/bluetooth/connections.js +114 -0
  91. package/lib/commonjs/modules/next/bluetooth/connections.js.map +1 -0
  92. package/lib/commonjs/modules/next/bluetooth/daily-total-day.js.map +1 -0
  93. package/lib/commonjs/modules/next/bluetooth/devices.js +41 -0
  94. package/lib/commonjs/modules/next/bluetooth/devices.js.map +1 -0
  95. package/lib/commonjs/modules/next/bluetooth/driver.js +30 -20
  96. package/lib/commonjs/modules/next/bluetooth/driver.js.map +1 -1
  97. package/lib/commonjs/modules/next/bluetooth/errors.js +26 -0
  98. package/lib/commonjs/modules/next/bluetooth/errors.js.map +1 -0
  99. package/lib/commonjs/modules/next/bluetooth/index.js +122 -11
  100. package/lib/commonjs/modules/next/bluetooth/index.js.map +1 -1
  101. package/lib/commonjs/modules/next/bluetooth/link.js +0 -103
  102. package/lib/commonjs/modules/next/bluetooth/link.js.map +1 -1
  103. package/lib/commonjs/modules/next/bluetooth/paired.js +50 -0
  104. package/lib/commonjs/modules/next/bluetooth/paired.js.map +1 -0
  105. package/lib/commonjs/modules/next/bluetooth/permissions.js +2 -0
  106. package/lib/commonjs/modules/next/bluetooth/permissions.js.map +1 -0
  107. package/lib/commonjs/modules/next/bluetooth/react/bluetooth-device-picker.js +44 -0
  108. package/lib/commonjs/modules/next/bluetooth/react/bluetooth-device-picker.js.map +1 -0
  109. package/lib/commonjs/modules/next/bluetooth/react/context.js +54 -0
  110. package/lib/commonjs/modules/next/bluetooth/react/context.js.map +1 -0
  111. package/lib/commonjs/modules/next/bluetooth/react/hooks.js +86 -0
  112. package/lib/commonjs/modules/next/bluetooth/react/hooks.js.map +1 -0
  113. package/lib/commonjs/modules/next/bluetooth/react-native/create-bluetooth-runtime.js +28 -0
  114. package/lib/commonjs/modules/next/bluetooth/react-native/create-bluetooth-runtime.js.map +1 -0
  115. package/lib/commonjs/modules/next/bluetooth/react-native/os-permissions.js +32 -0
  116. package/lib/commonjs/modules/next/bluetooth/react-native/os-permissions.js.map +1 -0
  117. package/lib/commonjs/modules/next/bluetooth/react-native/ovok-sink.js +43 -0
  118. package/lib/commonjs/modules/next/bluetooth/react-native/ovok-sink.js.map +1 -0
  119. package/lib/commonjs/modules/next/bluetooth/readings.js +93 -0
  120. package/lib/commonjs/modules/next/bluetooth/readings.js.map +1 -0
  121. package/lib/commonjs/modules/next/bluetooth/result-policy.js +15 -2
  122. package/lib/commonjs/modules/next/bluetooth/result-policy.js.map +1 -1
  123. package/lib/commonjs/modules/next/bluetooth/runtime.js +223 -0
  124. package/lib/commonjs/modules/next/bluetooth/runtime.js.map +1 -0
  125. package/lib/commonjs/modules/next/bluetooth/scan-loop.js +82 -0
  126. package/lib/commonjs/modules/next/bluetooth/scan-loop.js.map +1 -0
  127. package/lib/commonjs/modules/next/bluetooth/sig-profiles.js +46 -13
  128. package/lib/commonjs/modules/next/bluetooth/sig-profiles.js.map +1 -1
  129. package/lib/commonjs/modules/next/bluetooth/sink.js +6 -0
  130. package/lib/commonjs/modules/next/bluetooth/sink.js.map +1 -0
  131. package/lib/commonjs/modules/next/bluetooth/snapshot.js +6 -0
  132. package/lib/commonjs/modules/next/bluetooth/snapshot.js.map +1 -0
  133. package/lib/commonjs/modules/next/bluetooth/stable-hash.js +42 -0
  134. package/lib/commonjs/modules/next/bluetooth/stable-hash.js.map +1 -0
  135. package/lib/commonjs/modules/next/bluetooth/store.js +61 -0
  136. package/lib/commonjs/modules/next/bluetooth/store.js.map +1 -0
  137. package/lib/commonjs/modules/next/bluetooth/transport.js +6 -0
  138. package/lib/commonjs/modules/next/bluetooth/transport.js.map +1 -0
  139. package/lib/commonjs/modules/next/data-sync/index.js +17 -0
  140. package/lib/commonjs/modules/next/data-sync/index.js.map +1 -0
  141. package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js +3 -1
  142. package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -1
  143. package/lib/module/modules/bt-management/components/bluetooth-device-picker.js +9 -141
  144. package/lib/module/modules/bt-management/components/bluetooth-device-picker.js.map +1 -1
  145. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +1 -0
  146. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  147. package/lib/module/modules/bt-management/components/device-picker-sheet.js +154 -0
  148. package/lib/module/modules/bt-management/components/device-picker-sheet.js.map +1 -0
  149. package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -1
  150. package/lib/module/modules/bt-management/hooks/use-bluetooth-permission.js +4 -3
  151. package/lib/module/modules/bt-management/hooks/use-bluetooth-permission.js.map +1 -1
  152. package/lib/module/modules/bt-management/hooks/use-measurements.js +1 -1
  153. package/lib/module/modules/bt-management/hooks/use-measurements.js.map +1 -1
  154. package/lib/module/modules/bt-management/index.js +1 -0
  155. package/lib/module/modules/bt-management/index.js.map +1 -1
  156. package/lib/module/modules/bt-management/services/bt-manager.js +50 -0
  157. package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
  158. package/lib/module/modules/bt-management/services/custom/define-custom-device.js +3 -0
  159. package/lib/module/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
  160. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js +4 -2
  161. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
  162. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +97 -28
  163. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  164. package/lib/module/modules/bt-management/services/devices/bt-current-time.js +55 -0
  165. package/lib/module/modules/bt-management/services/devices/bt-current-time.js.map +1 -0
  166. package/lib/module/modules/bt-management/services/devices/bt-device-information.js +18 -37
  167. package/lib/module/modules/bt-management/services/devices/bt-device-information.js.map +1 -1
  168. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +33 -5
  169. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  170. package/lib/module/modules/bt-management/services/devices/bt-notification-readiness.js +65 -0
  171. package/lib/module/modules/bt-management/services/devices/bt-notification-readiness.js.map +1 -0
  172. package/lib/module/modules/bt-management/services/devices/bt-pairing-retry.js +65 -0
  173. package/lib/module/modules/bt-management/services/devices/bt-pairing-retry.js.map +1 -0
  174. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +14 -0
  175. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  176. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.js +1 -4
  177. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.js.map +1 -1
  178. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.js +99 -0
  179. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.js.map +1 -0
  180. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +38 -31
  181. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -1
  182. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.js +35 -0
  183. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.js.map +1 -0
  184. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.js +72 -0
  185. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.js.map +1 -0
  186. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.js +40 -0
  187. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.js.map +1 -0
  188. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.js +85 -0
  189. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.js.map +1 -0
  190. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js +25 -32
  191. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js.map +1 -1
  192. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +18 -20
  193. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
  194. package/lib/module/modules/bt-management/services/record-cursor.js +66 -0
  195. package/lib/module/modules/bt-management/services/record-cursor.js.map +1 -0
  196. package/lib/module/modules/bt-management/testing/fake-ble-manager.js +8 -0
  197. package/lib/module/modules/bt-management/testing/fake-ble-manager.js.map +1 -1
  198. package/lib/module/modules/bt-management/types/custom-device-definition.js +4 -0
  199. package/lib/module/modules/bt-management/types/custom-device-definition.js.map +1 -1
  200. package/lib/module/modules/bt-management/types/glucose-record-details.js +2 -0
  201. package/lib/module/modules/bt-management/types/glucose-record-details.js.map +1 -0
  202. package/lib/module/modules/bt-management/utils/bluetooth-permission-list.js +14 -0
  203. package/lib/module/modules/bt-management/utils/bluetooth-permission-list.js.map +1 -0
  204. package/lib/module/modules/bt-management/utils/device-user.js +17 -0
  205. package/lib/module/modules/bt-management/utils/device-user.js.map +1 -0
  206. package/lib/module/modules/bt-management/utils/kpa-to-mmhg.js +6 -0
  207. package/lib/module/modules/bt-management/utils/kpa-to-mmhg.js.map +1 -0
  208. package/lib/module/modules/bt-management/utils/result-identity.js +23 -33
  209. package/lib/module/modules/bt-management/utils/result-identity.js.map +1 -1
  210. package/lib/module/modules/bt-management/utils/rr-interval.js +12 -0
  211. package/lib/module/modules/bt-management/utils/rr-interval.js.map +1 -0
  212. package/lib/module/modules/bt-management/utils/temperature-type.js +11 -0
  213. package/lib/module/modules/bt-management/utils/temperature-type.js.map +1 -0
  214. package/lib/module/modules/bt-management/utils/wait.js +5 -0
  215. package/lib/module/modules/bt-management/utils/wait.js.map +1 -0
  216. package/lib/module/modules/next/background-sync/index.js +12 -0
  217. package/lib/module/modules/next/background-sync/index.js.map +1 -0
  218. package/lib/module/modules/next/background-sync/offline-measurement-background-sync.js +55 -0
  219. package/lib/module/modules/next/background-sync/offline-measurement-background-sync.js.map +1 -0
  220. package/lib/module/modules/next/bluetooth/auto-connect.js +28 -0
  221. package/lib/module/modules/next/bluetooth/auto-connect.js.map +1 -0
  222. package/lib/module/modules/next/bluetooth/ble-plx/ble-errors.js +28 -0
  223. package/lib/module/modules/next/bluetooth/ble-plx/ble-errors.js.map +1 -0
  224. package/lib/module/modules/next/bluetooth/ble-plx/ble-link.js +159 -0
  225. package/lib/module/modules/next/bluetooth/ble-plx/ble-link.js.map +1 -0
  226. package/lib/module/modules/next/bluetooth/ble-plx/ble-scanner.js +69 -0
  227. package/lib/module/modules/next/bluetooth/ble-plx/ble-scanner.js.map +1 -0
  228. package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js +31 -0
  229. package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -0
  230. package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js +63 -0
  231. package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -0
  232. package/lib/module/modules/next/bluetooth/connections.js +110 -0
  233. package/lib/module/modules/next/bluetooth/connections.js.map +1 -0
  234. package/lib/module/modules/next/bluetooth/daily-total-day.js.map +1 -0
  235. package/lib/module/modules/next/bluetooth/devices.js +37 -0
  236. package/lib/module/modules/next/bluetooth/devices.js.map +1 -0
  237. package/lib/module/modules/next/bluetooth/driver.js +29 -20
  238. package/lib/module/modules/next/bluetooth/driver.js.map +1 -1
  239. package/lib/module/modules/next/bluetooth/errors.js +21 -0
  240. package/lib/module/modules/next/bluetooth/errors.js.map +1 -0
  241. package/lib/module/modules/next/bluetooth/index.js +22 -4
  242. package/lib/module/modules/next/bluetooth/index.js.map +1 -1
  243. package/lib/module/modules/next/bluetooth/link.js +0 -101
  244. package/lib/module/modules/next/bluetooth/link.js.map +1 -1
  245. package/lib/module/modules/next/bluetooth/paired.js +46 -0
  246. package/lib/module/modules/next/bluetooth/paired.js.map +1 -0
  247. package/lib/module/modules/next/bluetooth/permissions.js +2 -0
  248. package/lib/module/modules/next/bluetooth/permissions.js.map +1 -0
  249. package/lib/module/modules/next/bluetooth/react/bluetooth-device-picker.js +39 -0
  250. package/lib/module/modules/next/bluetooth/react/bluetooth-device-picker.js.map +1 -0
  251. package/lib/module/modules/next/bluetooth/react/context.js +48 -0
  252. package/lib/module/modules/next/bluetooth/react/context.js.map +1 -0
  253. package/lib/module/modules/next/bluetooth/react/hooks.js +76 -0
  254. package/lib/module/modules/next/bluetooth/react/hooks.js.map +1 -0
  255. package/lib/module/modules/next/bluetooth/react-native/create-bluetooth-runtime.js +25 -0
  256. package/lib/module/modules/next/bluetooth/react-native/create-bluetooth-runtime.js.map +1 -0
  257. package/lib/module/modules/next/bluetooth/react-native/os-permissions.js +28 -0
  258. package/lib/module/modules/next/bluetooth/react-native/os-permissions.js.map +1 -0
  259. package/lib/module/modules/next/bluetooth/react-native/ovok-sink.js +39 -0
  260. package/lib/module/modules/next/bluetooth/react-native/ovok-sink.js.map +1 -0
  261. package/lib/module/modules/next/bluetooth/readings.js +89 -0
  262. package/lib/module/modules/next/bluetooth/readings.js.map +1 -0
  263. package/lib/module/modules/next/bluetooth/result-policy.js +14 -2
  264. package/lib/module/modules/next/bluetooth/result-policy.js.map +1 -1
  265. package/lib/module/modules/next/bluetooth/runtime.js +220 -0
  266. package/lib/module/modules/next/bluetooth/runtime.js.map +1 -0
  267. package/lib/module/modules/next/bluetooth/scan-loop.js +78 -0
  268. package/lib/module/modules/next/bluetooth/scan-loop.js.map +1 -0
  269. package/lib/module/modules/next/bluetooth/sig-profiles.js +44 -11
  270. package/lib/module/modules/next/bluetooth/sig-profiles.js.map +1 -1
  271. package/lib/module/modules/next/bluetooth/sink.js +4 -0
  272. package/lib/module/modules/next/bluetooth/sink.js.map +1 -0
  273. package/lib/module/modules/next/bluetooth/snapshot.js +4 -0
  274. package/lib/module/modules/next/bluetooth/snapshot.js.map +1 -0
  275. package/lib/module/modules/next/bluetooth/stable-hash.js +37 -0
  276. package/lib/module/modules/next/bluetooth/stable-hash.js.map +1 -0
  277. package/lib/module/modules/next/bluetooth/store.js +57 -0
  278. package/lib/module/modules/next/bluetooth/store.js.map +1 -0
  279. package/lib/module/modules/next/bluetooth/transport.js +4 -0
  280. package/lib/module/modules/next/bluetooth/transport.js.map +1 -0
  281. package/lib/module/modules/next/data-sync/index.js +11 -0
  282. package/lib/module/modules/next/data-sync/index.js.map +1 -0
  283. package/lib/typescript/commonjs/src/modules/auth/hooks/use-sign-in.d.ts +1 -1
  284. package/lib/typescript/commonjs/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -1
  285. package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts +1 -1
  286. package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -1
  287. package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  288. package/lib/typescript/commonjs/src/modules/bt-management/components/device-picker-sheet.d.ts +25 -0
  289. package/lib/typescript/commonjs/src/modules/bt-management/components/device-picker-sheet.d.ts.map +1 -0
  290. package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +1 -1
  291. package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
  292. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-permission.d.ts.map +1 -1
  293. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -1
  294. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +1 -0
  295. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
  296. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +20 -0
  297. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  298. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.d.ts +2 -1
  299. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
  300. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts +3 -1
  301. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
  302. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +14 -1
  303. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  304. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-current-time.d.ts +11 -0
  305. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-current-time.d.ts.map +1 -0
  306. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-device-information.d.ts +2 -1
  307. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-device-information.d.ts.map +1 -1
  308. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +11 -1
  309. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  310. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-notification-readiness.d.ts +15 -0
  311. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-notification-readiness.d.ts.map +1 -0
  312. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-pairing-retry.d.ts +21 -0
  313. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-pairing-retry.d.ts.map +1 -0
  314. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +2 -0
  315. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  316. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.d.ts.map +1 -1
  317. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.d.ts +11 -0
  318. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.d.ts.map +1 -0
  319. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +5 -2
  320. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -1
  321. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.d.ts +10 -0
  322. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.d.ts.map +1 -0
  323. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.d.ts +7 -0
  324. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.d.ts.map +1 -0
  325. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.d.ts +16 -0
  326. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.d.ts.map +1 -0
  327. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.d.ts +8 -0
  328. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.d.ts.map +1 -0
  329. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts.map +1 -1
  330. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +2 -0
  331. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -1
  332. package/lib/typescript/commonjs/src/modules/bt-management/services/record-cursor.d.ts +21 -0
  333. package/lib/typescript/commonjs/src/modules/bt-management/services/record-cursor.d.ts.map +1 -0
  334. package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -1
  335. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts +6 -2
  336. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
  337. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts +3 -0
  338. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  339. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts +14 -1
  340. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
  341. package/lib/typescript/commonjs/src/modules/bt-management/types/glucose-record-details.d.ts +33 -0
  342. package/lib/typescript/commonjs/src/modules/bt-management/types/glucose-record-details.d.ts.map +1 -0
  343. package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts +2 -0
  344. package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
  345. package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts +6 -0
  346. package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts.map +1 -1
  347. package/lib/typescript/commonjs/src/modules/bt-management/utils/bluetooth-permission-list.d.ts +4 -0
  348. package/lib/typescript/commonjs/src/modules/bt-management/utils/bluetooth-permission-list.d.ts.map +1 -0
  349. package/lib/typescript/commonjs/src/modules/bt-management/utils/device-user.d.ts +6 -0
  350. package/lib/typescript/commonjs/src/modules/bt-management/utils/device-user.d.ts.map +1 -0
  351. package/lib/typescript/commonjs/src/modules/bt-management/utils/kpa-to-mmhg.d.ts +4 -0
  352. package/lib/typescript/commonjs/src/modules/bt-management/utils/kpa-to-mmhg.d.ts.map +1 -0
  353. package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts +5 -4
  354. package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts.map +1 -1
  355. package/lib/typescript/commonjs/src/modules/bt-management/utils/rr-interval.d.ts +4 -0
  356. package/lib/typescript/commonjs/src/modules/bt-management/utils/rr-interval.d.ts.map +1 -0
  357. package/lib/typescript/commonjs/src/modules/bt-management/utils/temperature-type.d.ts +7 -0
  358. package/lib/typescript/commonjs/src/modules/bt-management/utils/temperature-type.d.ts.map +1 -0
  359. package/lib/typescript/commonjs/src/modules/bt-management/utils/wait.d.ts +3 -0
  360. package/lib/typescript/commonjs/src/modules/bt-management/utils/wait.d.ts.map +1 -0
  361. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
  362. package/lib/typescript/commonjs/src/modules/next/background-sync/index.d.ts +10 -0
  363. package/lib/typescript/commonjs/src/modules/next/background-sync/index.d.ts.map +1 -0
  364. package/lib/typescript/commonjs/src/modules/next/background-sync/offline-measurement-background-sync.d.ts +22 -0
  365. package/lib/typescript/commonjs/src/modules/next/background-sync/offline-measurement-background-sync.d.ts.map +1 -0
  366. package/lib/typescript/commonjs/src/modules/next/bluetooth/auto-connect.d.ts +10 -0
  367. package/lib/typescript/commonjs/src/modules/next/bluetooth/auto-connect.d.ts.map +1 -0
  368. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts +4 -0
  369. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts.map +1 -0
  370. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-link.d.ts +6 -0
  371. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-link.d.ts.map +1 -0
  372. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts +10 -0
  373. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts.map +1 -0
  374. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +6 -0
  375. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -0
  376. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +8 -0
  377. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -0
  378. package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts +25 -0
  379. package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts.map +1 -0
  380. package/lib/typescript/commonjs/src/modules/next/bluetooth/daily-total-day.d.ts.map +1 -0
  381. package/lib/typescript/commonjs/src/modules/next/bluetooth/devices.d.ts +30 -0
  382. package/lib/typescript/commonjs/src/modules/next/bluetooth/devices.d.ts.map +1 -0
  383. package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts +27 -20
  384. package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts.map +1 -1
  385. package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts +17 -0
  386. package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts.map +1 -0
  387. package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts +34 -5
  388. package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts.map +1 -1
  389. package/lib/typescript/commonjs/src/modules/next/bluetooth/link.d.ts +14 -5
  390. package/lib/typescript/commonjs/src/modules/next/bluetooth/link.d.ts.map +1 -1
  391. package/lib/typescript/commonjs/src/modules/next/bluetooth/paired.d.ts +18 -0
  392. package/lib/typescript/commonjs/src/modules/next/bluetooth/paired.d.ts.map +1 -0
  393. package/lib/typescript/commonjs/src/modules/next/bluetooth/permissions.d.ts +13 -0
  394. package/lib/typescript/commonjs/src/modules/next/bluetooth/permissions.d.ts.map +1 -0
  395. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts +35 -0
  396. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts.map +1 -0
  397. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/context.d.ts +30 -0
  398. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/context.d.ts.map +1 -0
  399. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/hooks.d.ts +47 -0
  400. package/lib/typescript/commonjs/src/modules/next/bluetooth/react/hooks.d.ts.map +1 -0
  401. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts +21 -0
  402. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts.map +1 -0
  403. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/os-permissions.d.ts +5 -0
  404. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/os-permissions.d.ts.map +1 -0
  405. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/ovok-sink.d.ts +6 -0
  406. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/ovok-sink.d.ts.map +1 -0
  407. package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts +21 -0
  408. package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts.map +1 -0
  409. package/lib/typescript/commonjs/src/modules/next/bluetooth/result-policy.d.ts +9 -1
  410. package/lib/typescript/commonjs/src/modules/next/bluetooth/result-policy.d.ts.map +1 -1
  411. package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts +87 -0
  412. package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts.map +1 -0
  413. package/lib/typescript/commonjs/src/modules/next/bluetooth/scan-loop.d.ts +23 -0
  414. package/lib/typescript/commonjs/src/modules/next/bluetooth/scan-loop.d.ts.map +1 -0
  415. package/lib/typescript/commonjs/src/modules/next/bluetooth/sig-profiles.d.ts.map +1 -1
  416. package/lib/typescript/commonjs/src/modules/next/bluetooth/sink.d.ts +20 -0
  417. package/lib/typescript/commonjs/src/modules/next/bluetooth/sink.d.ts.map +1 -0
  418. package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts +72 -0
  419. package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts.map +1 -0
  420. package/lib/typescript/commonjs/src/modules/next/bluetooth/stable-hash.d.ts +6 -0
  421. package/lib/typescript/commonjs/src/modules/next/bluetooth/stable-hash.d.ts.map +1 -0
  422. package/lib/typescript/commonjs/src/modules/next/bluetooth/store.d.ts +16 -0
  423. package/lib/typescript/commonjs/src/modules/next/bluetooth/store.d.ts.map +1 -0
  424. package/lib/typescript/commonjs/src/modules/next/bluetooth/transport.d.ts +31 -0
  425. package/lib/typescript/commonjs/src/modules/next/bluetooth/transport.d.ts.map +1 -0
  426. package/lib/typescript/commonjs/src/modules/next/data-sync/index.d.ts +9 -0
  427. package/lib/typescript/commonjs/src/modules/next/data-sync/index.d.ts.map +1 -0
  428. package/lib/typescript/module/src/modules/auth/hooks/use-sign-in.d.ts +1 -1
  429. package/lib/typescript/module/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -1
  430. package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts +1 -1
  431. package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -1
  432. package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  433. package/lib/typescript/module/src/modules/bt-management/components/device-picker-sheet.d.ts +25 -0
  434. package/lib/typescript/module/src/modules/bt-management/components/device-picker-sheet.d.ts.map +1 -0
  435. package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +1 -1
  436. package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
  437. package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-permission.d.ts.map +1 -1
  438. package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -1
  439. package/lib/typescript/module/src/modules/bt-management/index.d.ts +1 -0
  440. package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
  441. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +20 -0
  442. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  443. package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.d.ts +2 -1
  444. package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
  445. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts +3 -1
  446. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
  447. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +14 -1
  448. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  449. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-current-time.d.ts +11 -0
  450. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-current-time.d.ts.map +1 -0
  451. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-device-information.d.ts +2 -1
  452. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-device-information.d.ts.map +1 -1
  453. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +11 -1
  454. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  455. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-notification-readiness.d.ts +15 -0
  456. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-notification-readiness.d.ts.map +1 -0
  457. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-pairing-retry.d.ts +21 -0
  458. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-pairing-retry.d.ts.map +1 -0
  459. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +2 -0
  460. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  461. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.blood-pressure-status.d.ts.map +1 -1
  462. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.d.ts +11 -0
  463. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.decorators.d.ts.map +1 -0
  464. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +5 -2
  465. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -1
  466. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.d.ts +10 -0
  467. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.frame.d.ts.map +1 -0
  468. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.d.ts +7 -0
  469. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-details.d.ts.map +1 -0
  470. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.d.ts +16 -0
  471. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-frame.d.ts.map +1 -0
  472. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.d.ts +8 -0
  473. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose-racp.d.ts.map +1 -0
  474. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts.map +1 -1
  475. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +2 -0
  476. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -1
  477. package/lib/typescript/module/src/modules/bt-management/services/record-cursor.d.ts +21 -0
  478. package/lib/typescript/module/src/modules/bt-management/services/record-cursor.d.ts.map +1 -0
  479. package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -1
  480. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts +6 -2
  481. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
  482. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts +3 -0
  483. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  484. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts +14 -1
  485. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
  486. package/lib/typescript/module/src/modules/bt-management/types/glucose-record-details.d.ts +33 -0
  487. package/lib/typescript/module/src/modules/bt-management/types/glucose-record-details.d.ts.map +1 -0
  488. package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts +2 -0
  489. package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
  490. package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts +6 -0
  491. package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts.map +1 -1
  492. package/lib/typescript/module/src/modules/bt-management/utils/bluetooth-permission-list.d.ts +4 -0
  493. package/lib/typescript/module/src/modules/bt-management/utils/bluetooth-permission-list.d.ts.map +1 -0
  494. package/lib/typescript/module/src/modules/bt-management/utils/device-user.d.ts +6 -0
  495. package/lib/typescript/module/src/modules/bt-management/utils/device-user.d.ts.map +1 -0
  496. package/lib/typescript/module/src/modules/bt-management/utils/kpa-to-mmhg.d.ts +4 -0
  497. package/lib/typescript/module/src/modules/bt-management/utils/kpa-to-mmhg.d.ts.map +1 -0
  498. package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts +5 -4
  499. package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts.map +1 -1
  500. package/lib/typescript/module/src/modules/bt-management/utils/rr-interval.d.ts +4 -0
  501. package/lib/typescript/module/src/modules/bt-management/utils/rr-interval.d.ts.map +1 -0
  502. package/lib/typescript/module/src/modules/bt-management/utils/temperature-type.d.ts +7 -0
  503. package/lib/typescript/module/src/modules/bt-management/utils/temperature-type.d.ts.map +1 -0
  504. package/lib/typescript/module/src/modules/bt-management/utils/wait.d.ts +3 -0
  505. package/lib/typescript/module/src/modules/bt-management/utils/wait.d.ts.map +1 -0
  506. package/lib/typescript/module/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
  507. package/lib/typescript/module/src/modules/next/background-sync/index.d.ts +10 -0
  508. package/lib/typescript/module/src/modules/next/background-sync/index.d.ts.map +1 -0
  509. package/lib/typescript/module/src/modules/next/background-sync/offline-measurement-background-sync.d.ts +22 -0
  510. package/lib/typescript/module/src/modules/next/background-sync/offline-measurement-background-sync.d.ts.map +1 -0
  511. package/lib/typescript/module/src/modules/next/bluetooth/auto-connect.d.ts +10 -0
  512. package/lib/typescript/module/src/modules/next/bluetooth/auto-connect.d.ts.map +1 -0
  513. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts +4 -0
  514. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts.map +1 -0
  515. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-link.d.ts +6 -0
  516. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-link.d.ts.map +1 -0
  517. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts +10 -0
  518. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts.map +1 -0
  519. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +6 -0
  520. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -0
  521. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +8 -0
  522. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -0
  523. package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts +25 -0
  524. package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts.map +1 -0
  525. package/lib/typescript/module/src/modules/next/bluetooth/daily-total-day.d.ts.map +1 -0
  526. package/lib/typescript/module/src/modules/next/bluetooth/devices.d.ts +30 -0
  527. package/lib/typescript/module/src/modules/next/bluetooth/devices.d.ts.map +1 -0
  528. package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts +27 -20
  529. package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts.map +1 -1
  530. package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts +17 -0
  531. package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts.map +1 -0
  532. package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts +34 -5
  533. package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts.map +1 -1
  534. package/lib/typescript/module/src/modules/next/bluetooth/link.d.ts +14 -5
  535. package/lib/typescript/module/src/modules/next/bluetooth/link.d.ts.map +1 -1
  536. package/lib/typescript/module/src/modules/next/bluetooth/paired.d.ts +18 -0
  537. package/lib/typescript/module/src/modules/next/bluetooth/paired.d.ts.map +1 -0
  538. package/lib/typescript/module/src/modules/next/bluetooth/permissions.d.ts +13 -0
  539. package/lib/typescript/module/src/modules/next/bluetooth/permissions.d.ts.map +1 -0
  540. package/lib/typescript/module/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts +35 -0
  541. package/lib/typescript/module/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts.map +1 -0
  542. package/lib/typescript/module/src/modules/next/bluetooth/react/context.d.ts +30 -0
  543. package/lib/typescript/module/src/modules/next/bluetooth/react/context.d.ts.map +1 -0
  544. package/lib/typescript/module/src/modules/next/bluetooth/react/hooks.d.ts +47 -0
  545. package/lib/typescript/module/src/modules/next/bluetooth/react/hooks.d.ts.map +1 -0
  546. package/lib/typescript/module/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts +21 -0
  547. package/lib/typescript/module/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts.map +1 -0
  548. package/lib/typescript/module/src/modules/next/bluetooth/react-native/os-permissions.d.ts +5 -0
  549. package/lib/typescript/module/src/modules/next/bluetooth/react-native/os-permissions.d.ts.map +1 -0
  550. package/lib/typescript/module/src/modules/next/bluetooth/react-native/ovok-sink.d.ts +6 -0
  551. package/lib/typescript/module/src/modules/next/bluetooth/react-native/ovok-sink.d.ts.map +1 -0
  552. package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts +21 -0
  553. package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts.map +1 -0
  554. package/lib/typescript/module/src/modules/next/bluetooth/result-policy.d.ts +9 -1
  555. package/lib/typescript/module/src/modules/next/bluetooth/result-policy.d.ts.map +1 -1
  556. package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts +87 -0
  557. package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts.map +1 -0
  558. package/lib/typescript/module/src/modules/next/bluetooth/scan-loop.d.ts +23 -0
  559. package/lib/typescript/module/src/modules/next/bluetooth/scan-loop.d.ts.map +1 -0
  560. package/lib/typescript/module/src/modules/next/bluetooth/sig-profiles.d.ts.map +1 -1
  561. package/lib/typescript/module/src/modules/next/bluetooth/sink.d.ts +20 -0
  562. package/lib/typescript/module/src/modules/next/bluetooth/sink.d.ts.map +1 -0
  563. package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts +72 -0
  564. package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts.map +1 -0
  565. package/lib/typescript/module/src/modules/next/bluetooth/stable-hash.d.ts +6 -0
  566. package/lib/typescript/module/src/modules/next/bluetooth/stable-hash.d.ts.map +1 -0
  567. package/lib/typescript/module/src/modules/next/bluetooth/store.d.ts +16 -0
  568. package/lib/typescript/module/src/modules/next/bluetooth/store.d.ts.map +1 -0
  569. package/lib/typescript/module/src/modules/next/bluetooth/transport.d.ts +31 -0
  570. package/lib/typescript/module/src/modules/next/bluetooth/transport.d.ts.map +1 -0
  571. package/lib/typescript/module/src/modules/next/data-sync/index.d.ts +9 -0
  572. package/lib/typescript/module/src/modules/next/data-sync/index.d.ts.map +1 -0
  573. package/package.json +12 -2
  574. package/lib/commonjs/modules/bt-management/utils/daily-total-day.js.map +0 -1
  575. package/lib/commonjs/modules/next/bluetooth/drivers.js +0 -20
  576. package/lib/commonjs/modules/next/bluetooth/drivers.js.map +0 -1
  577. package/lib/commonjs/modules/next/bluetooth/legacy-driver.js +0 -55
  578. package/lib/commonjs/modules/next/bluetooth/legacy-driver.js.map +0 -1
  579. package/lib/module/modules/bt-management/utils/daily-total-day.js.map +0 -1
  580. package/lib/module/modules/next/bluetooth/drivers.js +0 -17
  581. package/lib/module/modules/next/bluetooth/drivers.js.map +0 -1
  582. package/lib/module/modules/next/bluetooth/legacy-driver.js +0 -51
  583. package/lib/module/modules/next/bluetooth/legacy-driver.js.map +0 -1
  584. package/lib/typescript/commonjs/src/modules/bt-management/utils/daily-total-day.d.ts.map +0 -1
  585. package/lib/typescript/commonjs/src/modules/next/bluetooth/drivers.d.ts +0 -7
  586. package/lib/typescript/commonjs/src/modules/next/bluetooth/drivers.d.ts.map +0 -1
  587. package/lib/typescript/commonjs/src/modules/next/bluetooth/legacy-driver.d.ts +0 -8
  588. package/lib/typescript/commonjs/src/modules/next/bluetooth/legacy-driver.d.ts.map +0 -1
  589. package/lib/typescript/module/src/modules/bt-management/utils/daily-total-day.d.ts.map +0 -1
  590. package/lib/typescript/module/src/modules/next/bluetooth/drivers.d.ts +0 -7
  591. package/lib/typescript/module/src/modules/next/bluetooth/drivers.d.ts.map +0 -1
  592. package/lib/typescript/module/src/modules/next/bluetooth/legacy-driver.d.ts +0 -8
  593. package/lib/typescript/module/src/modules/next/bluetooth/legacy-driver.d.ts.map +0 -1
  594. /package/lib/commonjs/modules/{bt-management/utils → next/bluetooth}/daily-total-day.js +0 -0
  595. /package/lib/module/modules/{bt-management/utils → next/bluetooth}/daily-total-day.js +0 -0
  596. /package/lib/typescript/commonjs/src/modules/{bt-management/utils → next/bluetooth}/daily-total-day.d.ts +0 -0
  597. /package/lib/typescript/module/src/modules/{bt-management/utils → next/bluetooth}/daily-total-day.d.ts +0 -0
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ScanLoop = void 0;
7
+ const SCAN_RETRY_DELAY_MS = 1_000;
8
+
9
+ /** Runs the scanner while a scan is requested and the adapter is on, retrying after a scan error. */
10
+ class ScanLoop {
11
+ closed = false;
12
+ constructor(scanner, store, onFound) {
13
+ this.scanner = scanner;
14
+ this.store = store;
15
+ this.onFound = onFound;
16
+ }
17
+ get running() {
18
+ return this.stop !== undefined;
19
+ }
20
+
21
+ /** Starts or stops the scanner to match the snapshot. */
22
+ sync() {
23
+ const {
24
+ scanning,
25
+ adapter
26
+ } = this.store.get();
27
+ const shouldScan = scanning && adapter === "on" && !this.closed;
28
+ if (shouldScan && !this.stop && !this.retry) {
29
+ this.start();
30
+ } else if (!shouldScan) {
31
+ this.halt();
32
+ }
33
+ }
34
+ restart() {
35
+ this.halt();
36
+ this.sync();
37
+ }
38
+ close() {
39
+ this.closed = true;
40
+ this.halt();
41
+ }
42
+
43
+ /** A scan can fail before `scan` returns its stop, so the stop is only kept for a scan still running. */
44
+ start() {
45
+ const scan = {
46
+ failed: false
47
+ };
48
+ const stop = this.scanner.scan(this.onFound, error => {
49
+ if (scan.stop === this.stop) {
50
+ scan.failed = true;
51
+ this.failed(error);
52
+ }
53
+ });
54
+ if (scan.failed) {
55
+ stop();
56
+ return;
57
+ }
58
+ scan.stop = stop;
59
+ this.stop = stop;
60
+ this.store.set({
61
+ scanError: null
62
+ });
63
+ }
64
+ failed(error) {
65
+ this.store.set({
66
+ scanError: error
67
+ });
68
+ this.halt();
69
+ this.retry = setTimeout(() => {
70
+ this.retry = undefined;
71
+ this.sync();
72
+ }, SCAN_RETRY_DELAY_MS);
73
+ }
74
+ halt() {
75
+ clearTimeout(this.retry);
76
+ this.retry = undefined;
77
+ this.stop?.();
78
+ this.stop = undefined;
79
+ }
80
+ }
81
+ exports.ScanLoop = ScanLoop;
82
+ //# sourceMappingURL=scan-loop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SCAN_RETRY_DELAY_MS","ScanLoop","closed","constructor","scanner","store","onFound","running","stop","undefined","sync","scanning","adapter","get","shouldScan","retry","start","halt","restart","close","scan","failed","error","set","scanError","setTimeout","clearTimeout","exports"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/scan-loop.ts"],"mappings":";;;;;;AAIA,MAAMA,mBAAmB,GAAG,KAAK;;AAEjC;AACA,MAAMC,QAAQ,CAAC;EAGLC,MAAM,GAAG,KAAK;EAEfC,WAAWA,CACCC,OAAyB,EACzBC,KAAoB,EACpBC,OAAyC,EAC1D;IAAA,KAHiBF,OAAyB,GAAzBA,OAAyB;IAAA,KACzBC,KAAoB,GAApBA,KAAoB;IAAA,KACpBC,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CAACA,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACH,KAAK,CAACkB,GAAG,CAAC;MAAEC,SAAS,EAAE;IAAK,CAAC,CAAC;EACrC;EAEQH,MAAMA,CAACC,KAAqB,EAAQ;IAC1C,IAAI,CAACjB,KAAK,CAACkB,GAAG,CAAC;MAAEC,SAAS,EAAEF;IAAM,CAAC,CAAC;IACpC,IAAI,CAACL,IAAI,CAAC,CAAC;IACX,IAAI,CAACF,KAAK,GAAGU,UAAU,CAAC,MAAM;MAC5B,IAAI,CAACV,KAAK,GAAGN,SAAS;MACtB,IAAI,CAACC,IAAI,CAAC,CAAC;IACb,CAAC,EAAEV,mBAAmB,CAAC;EACzB;EAEQiB,IAAIA,CAAA,EAAS;IACnBS,YAAY,CAAC,IAAI,CAACX,KAAK,CAAC;IACxB,IAAI,CAACA,KAAK,GAAGN,SAAS;IACtB,IAAI,CAACD,IAAI,GAAG,CAAC;IACb,IAAI,CAACA,IAAI,GAAGC,SAAS;EACvB;AACF;AAACkB,OAAA,CAAA1B,QAAA,GAAAA,QAAA","ignoreList":[]}
@@ -6,9 +6,12 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.temperature = exports.pulseOximetry = exports.heartRate = exports.bodyWeight = exports.bloodPressure = exports.SIG_PROTOCOLS = void 0;
7
7
  var _next = require("@ovok/core/next");
8
8
  var _bloodPressureStates = require("../../bt-management/types/blood-pressure-states.js");
9
+ var _deviceUser = require("../../bt-management/utils/device-user.js");
10
+ var _kpaToMmhg = require("../../bt-management/utils/kpa-to-mmhg.js");
11
+ var _rrInterval = require("../../bt-management/utils/rr-interval.js");
9
12
  var _sigUuid = require("../../bt-management/utils/sig-uuid.js");
13
+ var _temperatureType = require("../../bt-management/utils/temperature-type.js");
10
14
  var _sigValues = require("./sig-values.js");
11
- const KPA_TO_MMHG = 7.50062;
12
15
  const KG_PER_SI_COUNT = 0.005;
13
16
  const KG_PER_IMPERIAL_COUNT = 0.01 * 0.45359237;
14
17
  const WEIGHT_UNSUCCESSFUL = 0xffff;
@@ -23,15 +26,29 @@ const BP_LOOSE_CUFF = 0x02;
23
26
  const BP_IRREGULAR_PULSE = 0x04;
24
27
  const TEMPERATURE_FAHRENHEIT = 0x01;
25
28
  const TEMPERATURE_TIMESTAMP = 0x02;
29
+ const TEMPERATURE_TYPE = 0x04;
30
+ const TEMPERATURE_TIMESTAMP_OFFSET = 5;
26
31
  const WEIGHT_IMPERIAL = 0x01;
27
32
  const WEIGHT_TIMESTAMP = 0x02;
33
+ const WEIGHT_USER = 0x04;
34
+ const WEIGHT_TIMESTAMP_OFFSET = 3;
28
35
  const PLX_TIMESTAMP = 0x01;
29
36
  const HEART_RATE_UINT16 = 0x01;
30
37
  const HEART_RATE_CONTACT_BITS = 0x06;
31
38
  const HEART_RATE_NO_CONTACT = 0x04;
39
+ const HEART_RATE_ENERGY_EXPENDED = 0x08;
40
+ const HEART_RATE_RR_INTERVALS = 0x10;
41
+ const UINT8_BYTES = 1;
42
+ const UINT16_BYTES = 2;
32
43
 
33
44
  /** Core does not export its status enum; this one has the same values. */
34
45
 
46
+ /** Core's temperature has no body site, so it rides along on the reading as `memorySlot` does on blood pressure. */
47
+
48
+ /** The device user, carried the way blood pressure carries it. */
49
+
50
+ /** Core's heart rate has no RR intervals, so they ride along on the reading, in milliseconds. */
51
+
35
52
  const bloodPressureStatus = status => {
36
53
  if (status & BP_BODY_MOVEMENT) {
37
54
  return _bloodPressureStates.BloodPressureStates.DISTURB_DETECTED;
@@ -52,8 +69,7 @@ const bloodPressureExtras = (view, flags) => {
52
69
  offset += 2;
53
70
  }
54
71
  if (flags & BP_USER) {
55
- const user = view.getUint8(offset);
56
- extras.memorySlot = user < 2 ? user + 1 : undefined;
72
+ extras.memorySlot = (0, _deviceUser.memorySlotForDeviceUser)(view.getUint8(offset));
57
73
  offset += 1;
58
74
  }
59
75
  if (flags & BP_STATUS) {
@@ -67,7 +83,7 @@ const bloodPressureExtras = (view, flags) => {
67
83
  /** Blood Pressure Measurement 0x2A35, in mmHg. */
68
84
  const bloodPressure = view => {
69
85
  const flags = view.getUint8(0);
70
- const pressure = value => flags & BP_KPA ? (0, _sigValues.roundTo)(value * KPA_TO_MMHG, 0) : value;
86
+ const pressure = value => flags & BP_KPA ? (0, _sigValues.roundTo)(value * _kpaToMmhg.KPA_TO_MMHG, 0) : value;
71
87
  const [systolic, diastolic, mean] = [1, 3, 5].map(offset => (0, _sigValues.sfloatAt)(view, offset));
72
88
  if (systolic === undefined || diastolic === undefined) {
73
89
  return undefined;
@@ -91,13 +107,16 @@ const temperature = view => {
91
107
  if (value === undefined) {
92
108
  return undefined;
93
109
  }
110
+ const hasTimestamp = Boolean(flags & TEMPERATURE_TIMESTAMP);
111
+ const typeOffset = TEMPERATURE_TIMESTAMP_OFFSET + (hasTimestamp ? DATE_TIME_BYTES : 0);
94
112
  const reading = {
95
113
  measurementTypeKey: _next.MeasurementTypeKey.temperature,
96
114
  bodyTemp: flags & TEMPERATURE_FAHRENHEIT ? (0, _sigValues.roundTo)((value - 32) * 5 / 9, 2) : value
97
115
  };
98
- return flags & TEMPERATURE_TIMESTAMP ? (0, _sigValues.withDefined)(reading, {
99
- recordedAt: (0, _sigValues.dateTimeAt)(view, 5)
100
- }) : reading;
116
+ return (0, _sigValues.withDefined)(reading, {
117
+ recordedAt: hasTimestamp ? (0, _sigValues.dateTimeAt)(view, TEMPERATURE_TIMESTAMP_OFFSET) : undefined,
118
+ temperatureType: flags & TEMPERATURE_TYPE ? (0, _temperatureType.temperatureTypeFromCode)(view.getUint8(typeOffset)) : undefined
119
+ });
101
120
  };
102
121
 
103
122
  /** Weight Measurement 0x2A9D, in kilograms. */
@@ -108,13 +127,16 @@ const bodyWeight = view => {
108
127
  if (counts === WEIGHT_UNSUCCESSFUL) {
109
128
  return undefined;
110
129
  }
130
+ const hasTimestamp = Boolean(flags & WEIGHT_TIMESTAMP);
131
+ const userOffset = WEIGHT_TIMESTAMP_OFFSET + (hasTimestamp ? DATE_TIME_BYTES : 0);
111
132
  const reading = {
112
133
  measurementTypeKey: _next.MeasurementTypeKey.bodyWeight,
113
134
  bodyWeight: (0, _sigValues.roundTo)(counts * (flags & WEIGHT_IMPERIAL ? KG_PER_IMPERIAL_COUNT : KG_PER_SI_COUNT), 3)
114
135
  };
115
- return flags & WEIGHT_TIMESTAMP ? (0, _sigValues.withDefined)(reading, {
116
- recordedAt: (0, _sigValues.dateTimeAt)(view, 3)
117
- }) : reading;
136
+ return (0, _sigValues.withDefined)(reading, {
137
+ recordedAt: hasTimestamp ? (0, _sigValues.dateTimeAt)(view, WEIGHT_TIMESTAMP_OFFSET) : undefined,
138
+ memorySlot: flags & WEIGHT_USER ? (0, _deviceUser.memorySlotForDeviceUser)(view.getUint8(userOffset)) : undefined
139
+ });
118
140
  };
119
141
 
120
142
  /** PLX Spot-Check Measurement 0x2A5E. */
@@ -136,18 +158,29 @@ const pulseOximetry = view => {
136
158
  }) : reading;
137
159
  };
138
160
 
139
- /** Heart Rate Measurement 0x2A37; a strap reporting no skin contact has no reading. */
161
+ /** The RR intervals from `offset` to the end of the frame, in milliseconds. */
140
162
  exports.pulseOximetry = pulseOximetry;
163
+ const rrIntervalsFrom = (view, offset) => Array.from({
164
+ length: Math.floor((view.byteLength - offset) / UINT16_BYTES)
165
+ }, (_, index) => (0, _rrInterval.rrIntervalMilliseconds)(view.getUint16(offset + index * UINT16_BYTES, true)));
166
+
167
+ /** Heart Rate Measurement 0x2A37; a strap reporting no skin contact has no reading. */
141
168
  const heartRate = view => {
142
169
  const flags = view.getUint8(0);
143
170
  if ((flags & HEART_RATE_CONTACT_BITS) === HEART_RATE_NO_CONTACT) {
144
171
  return undefined;
145
172
  }
173
+ const hasUint16 = Boolean(flags & HEART_RATE_UINT16);
174
+ const rrOffset = 1 + (hasUint16 ? UINT16_BYTES : UINT8_BYTES) + (flags & HEART_RATE_ENERGY_EXPENDED ? UINT16_BYTES : 0);
175
+ const rrIntervals = flags & HEART_RATE_RR_INTERVALS ? rrIntervalsFrom(view, rrOffset) : [];
146
176
  const reading = {
147
177
  measurementTypeKey: _next.MeasurementTypeKey.heartRate,
148
- heartRate: flags & HEART_RATE_UINT16 ? view.getUint16(1, true) : view.getUint8(1)
178
+ heartRate: hasUint16 ? view.getUint16(1, true) : view.getUint8(1)
149
179
  };
150
- return reading;
180
+ return rrIntervals.length > 0 ? {
181
+ ...reading,
182
+ rrIntervals
183
+ } : reading;
151
184
  };
152
185
  exports.heartRate = heartRate;
153
186
  const subscribed = (service, characteristic, decode) => async function* (link) {
@@ -1 +1 @@
1
- {"version":3,"names":["_next","require","_bloodPressureStates","_sigUuid","_sigValues","KPA_TO_MMHG","KG_PER_SI_COUNT","KG_PER_IMPERIAL_COUNT","WEIGHT_UNSUCCESSFUL","DATE_TIME_BYTES","BP_KPA","BP_TIMESTAMP","BP_PULSE","BP_USER","BP_STATUS","BP_BODY_MOVEMENT","BP_LOOSE_CUFF","BP_IRREGULAR_PULSE","TEMPERATURE_FAHRENHEIT","TEMPERATURE_TIMESTAMP","WEIGHT_IMPERIAL","WEIGHT_TIMESTAMP","PLX_TIMESTAMP","HEART_RATE_UINT16","HEART_RATE_CONTACT_BITS","HEART_RATE_NO_CONTACT","bloodPressureStatus","status","BloodPressureStates","DISTURB_DETECTED","LOOSE_SLEEVE","REGULAR","bloodPressureExtras","view","flags","offset","extras","recordedAt","dateTimeAt","heartRate","sfloatAt","user","getUint8","memorySlot","undefined","getUint16","irregularHeartbeat","bloodPressure","pressure","value","roundTo","systolic","diastolic","mean","map","reading","measurementTypeKey","MeasurementTypeKey","withDefined","meanArterialPressure","exports","temperature","floatAt","bodyTemp","bodyWeight","counts","pulseOximetry","bloodOxygen","pulseRate","bloodOxygenPulseRate","subscribed","service","characteristic","decode","link","frame","subscribe","sigUuid","decodeFrame","SIG_PROTOCOLS","Map"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/sig-profiles.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AASA,IAAAC,oB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N,UAAU,CAAC,CAAC,EAChE,CAAC,kCAAkC,EAAEM,UAAU,CAAC,MAAM,EAAE,MAAM,EAAEJ,aAAa,CAAC,CAAC,EAC/E,CAAC,qBAAqB,EAAEI,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE/B,SAAS,CAAC,CAAC,CAC/D,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_next","require","_bloodPressureStates","_deviceUser","_kpaToMmhg","_rrInterval","_sigUuid","_temperatureType","_sigValues","KG_PER_SI_COUNT","KG_PER_IMPERIAL_COUNT","WEIGHT_UNSUCCESSFUL","DATE_TIME_BYTES","BP_KPA","BP_TIMESTAMP","BP_PULSE","BP_USER","BP_STATUS","BP_BODY_MOVEMENT","BP_LOOSE_CUFF","BP_IRREGULAR_PULSE","TEMPERATURE_FAHRENHEIT","TEMPERATURE_TIMESTAMP","TEMPERATURE_TYPE","TEMPERATURE_TIMESTAMP_OFFSET","WEIGHT_IMPERIAL","WEIGHT_TIMESTAMP","WEIGHT_USER","WEIGHT_TIMESTAMP_OFFSET","PLX_TIMESTAMP","HEART_RATE_UINT16","HEART_RATE_CONTACT_BITS","HEART_RATE_NO_CONTACT","HEART_RATE_ENERGY_EXPENDED","HEART_RATE_RR_INTERVALS","UINT8_BYTES","UINT16_BYTES","bloodPressureStatus","status","BloodPressureStates","DISTURB_DETECTED","LOOSE_SLEEVE","REGULAR","bloodPressureExtras","view","flags","offset","extras","recordedAt","dateTimeAt","heartRate","sfloatAt","memorySlot","memorySlotForDeviceUser","getUint8","getUint16","irregularHeartbeat","undefined","bloodPressure","pressure","value","roundTo","KPA_TO_MMHG","systolic","diastolic","mean","map","reading","measurementTypeKey","MeasurementTypeKey","withDefined","meanArterialPressure","exports","temperature","floatAt","hasTimestamp","Boolean","typeOffset","bodyTemp","temperatureType","temperatureTypeFromCode","bodyWeight","counts","userOffset","pulseOximetry","bloodOxygen","pulseRate","bloodOxygenPulseRate","rrIntervalsFrom","Array","from","length","Math","floor","byteLength","_","index","rrIntervalMilliseconds","hasUint16","rrOffset","rrIntervals","subscribed","service","characteristic","decode","link","frame","subscribe","sigUuid","decodeFrame","SIG_PROTOCOLS","Map"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/sig-profiles.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AASA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AAGA,IAAAO,UAAA,GAAAP,OAAA;AAEA,MAAMQ,eAAe,GAAG,KAAK;AAC7B,MAAMC,qBAAqB,GAAG,IAAI,GAAG,UAAU;AAC/C,MAAMC,mBAAmB,GAAG,MAAM;AAClC,MAAMC,eAAe,GAAG,CAAC;AAEzB,MAAMC,MAAM,GAAG,IAAI;AACnB,MAAMC,YAAY,GAAG,IAAI;AACzB,MAAMC,QAAQ,GAAG,IAAI;AACrB,MAAMC,OAAO,GAAG,IAAI;AACpB,MAAMC,SAAS,GAAG,IAAI;AACtB,MAAMC,gBAAgB,GAAG,IAAI;AAC7B,MAAMC,aAAa,GAAG,IAAI;AAC1B,MAAMC,kBAAkB,GAAG,IAAI;AAE/B,MAAMC,sBAAsB,GAAG,IAAI;AACnC,MAAMC,qBAAqB,GAAG,IAAI;AAClC,MAAMC,gBAAgB,GAAG,IAAI;AAC7B,MAAMC,4BAA4B,GAAG,CAAC;AACtC,MAAMC,eAAe,GAAG,IAAI;AAC5B,MAAMC,gBAAgB,GAAG,IAAI;AAC7B,MAAMC,WAAW,GAAG,IAAI;AACxB,MAAMC,uBAAuB,GAAG,CAAC;AACjC,MAAMC,aAAa,GAAG,IAAI;AAC1B,MAAMC,iBAAiB,GAAG,IAAI;AAC9B,MAAMC,uBAAuB,GAAG,IAAI;AACpC,MAAMC,qBAAqB,GAAG,IAAI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C,cAAsB,EAAEC,MAAe,KAC1E,iBAAiBC,IAAI,EAAE;EACrB,WAAW,MAAMC,KAAK,IAAID,IAAI,CAACE,SAAS,CAAC,IAAAC,gBAAO,EAACN,OAAO,CAAC,EAAE,IAAAM,gBAAO,EAACL,cAAc,CAAC,CAAC,EAAE;IACnF,MAAMpC,OAAO,GAAG,IAAA0C,sBAAW,EAACL,MAAM,EAAEE,KAAK,CAAC;IAE1C,IAAIvC,OAAO,EAAE;MACX,MAAMA,OAAO;IACf;EACF;AACF,CAAC;;AAEH;AACA,MAAM2C,aAAkD,GAAAtC,OAAA,CAAAsC,aAAA,GAAG,IAAIC,GAAG,CAAC,CACjE,CAAC,yBAAyB,EAAEV,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE3C,aAAa,CAAC,CAAC,EACtE,CAAC,2BAA2B,EAAE2C,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE5B,WAAW,CAAC,CAAC,EACtE,CAAC,sBAAsB,EAAE4B,UAAU,CAAC,MAAM,EAAE,MAAM,EAAEpB,UAAU,CAAC,CAAC,EAChE,CAAC,kCAAkC,EAAEoB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAEjB,aAAa,CAAC,CAAC,EAC/E,CAAC,qBAAqB,EAAEiB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAEnD,SAAS,CAAC,CAAC,CAC/D,CAAC","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=sink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/sink.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=snapshot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/snapshot.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.stableHash = exports.instantStableHash = void 0;
7
+ const padded = (value, digits = 2) => String(value).padStart(digits, "0");
8
+
9
+ /** The date as a clock on the wall reads it, which a device's stored record keeps in every time zone. */
10
+ const wallClock = date => `${date.getFullYear()}-${padded(date.getMonth() + 1)}-${padded(date.getDate())}T${padded(date.getHours())}:${padded(date.getMinutes())}:${padded(date.getSeconds())}.${padded(date.getMilliseconds(), 3)}`;
11
+ const instant = date => date.toISOString();
12
+ const canonicalize = (value, formatDate) => {
13
+ if (value instanceof Date) {
14
+ return formatDate(value);
15
+ }
16
+ if (Array.isArray(value)) {
17
+ return value.map(item => canonicalize(item, formatDate));
18
+ }
19
+ if (value && typeof value === "object") {
20
+ return Object.fromEntries(Object.entries(value).sort(([left], [right]) => left.localeCompare(right)).map(([key, nested]) => [key, canonicalize(nested, formatDate)]));
21
+ }
22
+ return value;
23
+ };
24
+ const hash = value => {
25
+ let first = 0x811c9dc5;
26
+ let second = 0x01000193;
27
+ for (let index = 0; index < value.length; index += 1) {
28
+ const code = value.charCodeAt(index);
29
+ first = Math.imul(first ^ code, 0x01000193);
30
+ second = Math.imul(second ^ code + index, 0x811c9dc5);
31
+ }
32
+ return `${(first >>> 0).toString(16).padStart(8, "0")}${(second >>> 0).toString(16).padStart(8, "0")}`;
33
+ };
34
+
35
+ /** A short hash of `value` that ignores key order, is the same on every run and reads dates by their wall clock. */
36
+ const stableHash = value => hash(JSON.stringify(canonicalize(value, wallClock)));
37
+
38
+ /** `stableHash` as SDKs before 1.16.1 computed it, reading dates as instants; for finding what they saved. */
39
+ exports.stableHash = stableHash;
40
+ const instantStableHash = value => hash(JSON.stringify(canonicalize(value, instant)));
41
+ exports.instantStableHash = instantStableHash;
42
+ //# sourceMappingURL=stable-hash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["padded","value","digits","String","padStart","wallClock","date","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","getMilliseconds","instant","toISOString","canonicalize","formatDate","Date","Array","isArray","map","item","Object","fromEntries","entries","sort","left","right","localeCompare","key","nested","hash","first","second","index","length","code","charCodeAt","Math","imul","toString","stableHash","JSON","stringify","exports","instantStableHash"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/stable-hash.ts"],"mappings":";;;;;;AAEA,MAAMA,MAAM,GAAGA,CAACC,KAAa,EAAEC,MAAM,GAAG,CAAC,KAAaC,MAAM,CAACF,KAAK,CAAC,CAACG,QAAQ,CAACF,MAAM,EAAE,GAAG,CAAC;;AAEzF;AACA,MAAMG,SAAqB,GAAIC,IAAI,IACjC,GAAGA,IAAI,CAACC,WAAW,CAAC,CAAC,IAAIP,MAAM,CAACM,IAAI,CAACE,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,IAAIR,MAAM,CAACM,IAAI,CAACG,OAAO,CAAC,CAAC,CAAC,IAAIT,MAAM,CAACM,IAAI,CAACI,QAAQ,CAAC,CAAC,CAAC,IAAIV,MAAM,CAACM,IAAI,CAACK,UAAU,CAAC,CAAC,CAAC,IAAIX,MAAM,CAACM,IAAI,CAACM,UAAU,CAAC,CAAC,CAAC,IAAIZ,MAAM,CAACM,IAAI,CAACO,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;AAE5M,MAAMC,OAAmB,GAAIR,IAAI,IAAKA,IAAI,CAACS,WAAW,CAAC,CAAC;AAExD,MAAMC,YAAY,GAAGA,CAACf,KAAc,EAAEgB,UAAsB,KAAc;EACxE,IAAIhB,KAAK,YAAYiB,IAAI,EAAE;IACzB,OAAOD,UAAU,CAAChB,KAAK,CAAC;EAC1B;EAEA,IAAIkB,KAAK,CAACC,OAAO,CAACnB,KAAK,CAAC,EAAE;IACxB,OAAOA,KAAK,CAACoB,GAAG,CAAEC,IAAI,IAAKN,YAAY,CAACM,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,IAAI,CAACC,SAAS,CAAC5B,YAAY,CAACf,KAAK,EAAEI,SAAS,CAAC,CAAC,CAAC;;AAEnG;AAAAwC,OAAA,CAAAH,UAAA,GAAAA,UAAA;AACA,MAAMI,iBAAiB,GAAI7C,KAAc,IAAa+B,IAAI,CAACW,IAAI,CAACC,SAAS,CAAC5B,YAAY,CAACf,KAAK,EAAEa,OAAO,CAAC,CAAC,CAAC;AAAC+B,OAAA,CAAAC,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SnapshotStore = void 0;
7
+ const INITIAL = {
8
+ adapter: "unknown",
9
+ permission: "unknown",
10
+ scanning: false,
11
+ scanError: null,
12
+ devices: [],
13
+ paired: [],
14
+ readings: []
15
+ };
16
+
17
+ /** The runtime's snapshot and its listeners; once closed, it no longer changes. */
18
+ class SnapshotStore {
19
+ snapshot = INITIAL;
20
+ listeners = new Set();
21
+ closed = false;
22
+ get() {
23
+ return this.snapshot;
24
+ }
25
+ subscribe(listener) {
26
+ this.listeners.add(listener);
27
+ return () => this.listeners.delete(listener);
28
+ }
29
+ set(patch) {
30
+ if (this.closed) {
31
+ return;
32
+ }
33
+ this.snapshot = {
34
+ ...this.snapshot,
35
+ ...patch
36
+ };
37
+ this.listeners.forEach(listener => listener());
38
+ }
39
+ device(id) {
40
+ return this.snapshot.devices.find(device => device.id === id);
41
+ }
42
+ updateDevice(id, patch) {
43
+ this.set({
44
+ devices: this.snapshot.devices.map(device => device.id === id ? {
45
+ ...device,
46
+ ...patch
47
+ } : device)
48
+ });
49
+ }
50
+ updateReadings(update) {
51
+ this.set({
52
+ readings: this.snapshot.readings.map(update)
53
+ });
54
+ }
55
+ close() {
56
+ this.closed = true;
57
+ this.listeners.clear();
58
+ }
59
+ }
60
+ exports.SnapshotStore = SnapshotStore;
61
+ //# sourceMappingURL=store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["INITIAL","adapter","permission","scanning","scanError","devices","paired","readings","SnapshotStore","snapshot","listeners","Set","closed","get","subscribe","listener","add","delete","set","patch","forEach","device","id","find","updateDevice","map","updateReadings","update","close","clear","exports"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/store.ts"],"mappings":";;;;;;AAEA,MAAMA,OAA0B,GAAG;EACjCC,OAAO,EAAE,SAAS;EAClBC,UAAU,EAAE,SAAS;EACrBC,QAAQ,EAAE,KAAK;EACfC,SAAS,EAAE,IAAI;EACfC,OAAO,EAAE,EAAE;EACXC,MAAM,EAAE,EAAE;EACVC,QAAQ,EAAE;AACZ,CAAC;;AAED;AACA,MAAMC,aAAa,CAAC;EACVC,QAAQ,GAAGT,OAAO;EACTU,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;EAC1CC,MAAM,GAAG,KAAK;EAEfC,GAAGA,CAAA,EAAsB;IAC9B,OAAO,IAAI,CAACJ,QAAQ;EACtB;EAEOK,SAASA,CAACC,QAAoB,EAAc;IACjD,IAAI,CAACL,SAAS,CAACM,GAAG,CAACD,QAAQ,CAAC;IAE5B,OAAO,MAAM,IAAI,CAACL,SAAS,CAACO,MAAM,CAACF,QAAQ,CAAC;EAC9C;EAEOG,GAAGA,CAACC,KAAiC,EAAQ;IAClD,IAAI,IAAI,CAACP,MAAM,EAAE;MACf;IACF;IAEA,IAAI,CAACH,QAAQ,GAAG;MAAE,GAAG,IAAI,CAACA,QAAQ;MAAE,GAAGU;IAAM,CAAC;IAC9C,IAAI,CAACT,SAAS,CAACU,OAAO,CAAEL,QAAQ,IAAKA,QAAQ,CAAC,CAAC,CAAC;EAClD;EAEOM,MAAMA,CAACC,EAAU,EAA4B;IAClD,OAAO,IAAI,CAACb,QAAQ,CAACJ,OAAO,CAACkB,IAAI,CAAEF,MAAM,IAAKA,MAAM,CAACC,EAAE,KAAKA,EAAE,CAAC;EACjE;EAEOE,YAAYA,CAACF,EAAU,EAAEH,KAA4B,EAAQ;IAClE,IAAI,CAACD,GAAG,CAAC;MAAEb,OAAO,EAAE,IAAI,CAACI,QAAQ,CAACJ,OAAO,CAACoB,GAAG,CAAEJ,MAAM,IAAMA,MAAM,CAACC,EAAE,KAAKA,EAAE,GAAG;QAAE,GAAGD,MAAM;QAAE,GAAGF;MAAM,CAAC,GAAGE,MAAO;IAAE,CAAC,CAAC;EACrH;EAEOK,cAAcA,CAACC,MAAiD,EAAQ;IAC7E,IAAI,CAACT,GAAG,CAAC;MAAEX,QAAQ,EAAE,IAAI,CAACE,QAAQ,CAACF,QAAQ,CAACkB,GAAG,CAACE,MAAM;IAAE,CAAC,CAAC;EAC5D;EAEOC,KAAKA,CAAA,EAAS;IACnB,IAAI,CAAChB,MAAM,GAAG,IAAI;IAClB,IAAI,CAACF,SAAS,CAACmB,KAAK,CAAC,CAAC;EACxB;AACF;AAACC,OAAA,CAAAtB,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=transport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/transport.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _index = require("../../data-sync/index.js");
7
+ Object.keys(_index).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _index[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _index[key];
14
+ }
15
+ });
16
+ });
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_index","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../../src","sources":["modules/next/data-sync/index.ts"],"mappings":";;;;;AAOA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -71,7 +71,9 @@ export const AndroidBluetoothForegroundService = ({
71
71
  return () => {
72
72
  cancelled = true;
73
73
  foregroundSubscription?.remove();
74
- void getNativeModule().stopBluetoothForegroundService().catch(error => {
74
+
75
+ // Deferred so a missing native module reports through onError instead of throwing in cleanup.
76
+ void Promise.resolve().then(() => getNativeModule().stopBluetoothForegroundService()).catch(error => {
75
77
  onErrorRef.current?.({
76
78
  error: toBluetoothError(error)
77
79
  });
@@ -1 +1 @@
1
- {"version":3,"names":["React","AppState","NativeModules","Platform","toBluetoothError","Fragment","_Fragment","jsx","_jsx","getNativeModule","nativeModule","OvokBackgroundSync","Error","AndroidBluetoothForegroundService","enabled","children","options","onError","onErrorRef","useRef","current","notificationBody","notificationTitle","requestBatteryOptimizationExemption","useEffect","OS","cancelled","requestExemption","currentState","requestIgnoreBatteryOptimizations","error","start","startBluetoothForegroundService","undefined","foregroundSubscription","addEventListener","state","catch","remove","stopBluetoothForegroundService"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/components/android-bluetooth-foreground-service.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAIhE,SAASC,gBAAgB,QAAQ,6BAA0B;AAAC,SAAAC,QAAA,IAAAC,SAAA,EAAAC,GAAA,IAAAC,IAAA;AAgB5D,MA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sx","_jsx","getNativeModule","nativeModule","OvokBackgroundSync","Error","AndroidBluetoothForegroundService","enabled","children","options","onError","onErrorRef","useRef","current","notificationBody","notificationTitle","requestBatteryOptimizationExemption","useEffect","OS","cancelled","requestExemption","currentState","requestIgnoreBatteryOptimizations","error","start","startBluetoothForegroundService","undefined","foregroundSubscription","addEventListener","state","catch","remove","Promise","resolve","then","stopBluetoothForegroundService"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/components/android-bluetooth-foreground-service.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAIhE,SAASC,gBAAgB,QAAQ,6BAA0B;AAAC,SAAAC,QAAA,IAAAC,SAAA,EAAAC,GAAA,IAAAC,IAAA;AAgB5D,MAAMC,eAAe,GAAGA,CAAA,KAAkC;EACxD,MAAMC,YAAY,GAAGR,aAAa,CAACS,kBACK;EAExC,IAAI,CAACD,YAAY,EAAE;IACjB,MAAM,IAAIE,KAAK,CACb,8GACF,CAAC;EACH;EAEA,OAAOF,YAAY;AACrB,CAAC;AAED,OAAO,MAAMG,iCAAiC,GAAGA,CAAC;EAChDC,OAAO;EACPC,QAAQ;EACRC,OAAO;EACPC;AAKD,CAAC,KAAK;EACL,MAAMC,UAAU,GAAGlB,KAAK,CAACmB,MAAM,CAACF,OAAO,CAAC;EAExCC,UAAU,CAACE,OAAO,GAAGH,OAAO;EAE5B,MAAMI,gBAAgB,GAAGL,OAAO,EAAEK,gBAAgB;EAClD,MAAMC,iBAAiB,GAAGN,OAAO,EAAEM,iBAAiB;EAEpD,MAAMC,mCAAmC,GACvCP,OAAO,EAAEO,mCAAmC,KAAK,IAAI;EAEvDvB,KAAK,CAACwB,SAAS,CAAC,MAAM;IACpB,IAAIrB,QAAQ,CAACsB,EAAE,KAAK,SAAS,IAAI,CAACX,OAAO,EAAE;MACzC;IACF;IAEA,IAAIY,SAAS,GAAG,KAAK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SAAS,GAAG,IAAI;MAChBQ,sBAAsB,EAAEI,MAAM,CAAC,CAAC;;MAEhC;MACA,KAAKC,OAAO,CAACC,OAAO,CAAC,CAAC,CACnBC,IAAI,CAAC,MAAMhC,eAAe,CAAC,CAAC,CAACiC,8BAA8B,CAAC,CAAC,CAAC,CAC9DL,KAAK,CAAEP,KAAc,IAAK;QACzBZ,UAAU,CAACE,OAAO,GAAG;UAAEU,KAAK,EAAE1B,gBAAgB,CAAC0B,KAAK;QAAE,CAAC,CAAC;MAC1D,CAAC,CAAC;IACN,CAAC;EACH,CAAC,EAAE,CACDhB,OAAO,EACPO,gBAAgB,EAChBC,iBAAiB,EACjBC,mCAAmC,CACpC,CAAC;EAEF,oBAAOf,IAAA,CAAAF,SAAA;IAAAS,QAAA,EAAGA;EAAQ,CAAG,CAAC;AACxB,CAAC","ignoreList":[]}
@@ -1,158 +1,26 @@
1
1
  "use strict";
2
2
 
3
3
  import * as React from "react";
4
- import { FlatList, Image, Modal, Pressable, SafeAreaView, StyleSheet, View } from "react-native";
5
- import { Button as PaperButton, Text as PaperText } from "react-native-paper";
6
- import { useOvokUi } from "../../ui/use-ovok-ui.js";
7
4
  import { deviceTitle } from "../utils/device-title.js";
5
+ import { DevicePickerSheet } from "./device-picker-sheet.js";
8
6
 
9
7
  /** Props of {@link BluetoothDevicePicker}. */
10
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
8
+ import { jsx as _jsx } from "react/jsx-runtime";
11
9
  /**
12
10
  * A theme-aware picker for BTManager's multi-device auto-connect callback.
13
11
  *
14
12
  * @group Components
15
13
  */
16
14
  export const BluetoothDevicePicker = ({
17
- devices,
18
- visible,
19
15
  title = "Choose a device",
20
- onSelect,
21
- onDismiss,
22
16
  dismissLabel = "Not now",
23
- getDeviceImage,
24
17
  labelForDevice = device => deviceTitle(device.deviceData),
25
- renderRow,
26
- testID,
27
- ...uiProps
28
- }) => {
29
- const {
30
- theme,
31
- slots
32
- } = useOvokUi(uiProps);
33
- const Button = slots.Button ?? PaperButton;
34
- const Text = slots.Text ?? PaperText;
35
- const renderDefaultRow = item => {
36
- const image = getDeviceImage?.(item);
37
- const name = labelForDevice(item);
38
- const model = item.deviceData.model;
39
- return /*#__PURE__*/_jsxs(Pressable, {
40
- accessibilityRole: "button",
41
- onPress: () => onSelect(item),
42
- style: ({
43
- pressed
44
- }) => [styles.row, pressed && styles.pressed],
45
- children: [image ? /*#__PURE__*/_jsx(Image, {
46
- accessibilityLabel: name,
47
- source: {
48
- uri: image
49
- },
50
- style: styles.image
51
- }) : null, /*#__PURE__*/_jsxs(View, {
52
- style: styles.deviceCopy,
53
- children: [/*#__PURE__*/_jsx(Text, {
54
- theme: theme,
55
- children: name
56
- }), model && model !== name ? /*#__PURE__*/_jsx(Text, {
57
- theme: theme,
58
- variant: "bodySmall",
59
- children: model
60
- }) : null]
61
- })]
62
- });
63
- };
64
- const renderItem = ({
65
- item
66
- }) => {
67
- const row = renderRow?.(item, {
68
- select: () => onSelect(item)
69
- });
70
- return row === undefined ? renderDefaultRow(item) : /*#__PURE__*/_jsx(_Fragment, {
71
- children: row
72
- });
73
- };
74
- return /*#__PURE__*/_jsx(Modal, {
75
- visible: visible,
76
- transparent: true,
77
- animationType: "slide",
78
- onRequestClose: onDismiss,
79
- testID: testID,
80
- children: /*#__PURE__*/_jsx(Pressable, {
81
- style: styles.overlay,
82
- onPress: onDismiss,
83
- testID: testID ? `${testID}-backdrop` : undefined,
84
- children: /*#__PURE__*/_jsx(SafeAreaView, {
85
- style: styles.safeArea,
86
- onStartShouldSetResponder: () => true,
87
- children: /*#__PURE__*/_jsxs(View, {
88
- style: [styles.card, {
89
- backgroundColor: theme.colors.background
90
- }],
91
- children: [/*#__PURE__*/_jsxs(View, {
92
- style: styles.header,
93
- children: [/*#__PURE__*/_jsx(Text, {
94
- theme: theme,
95
- variant: "titleMedium",
96
- style: {
97
- color: theme.colors.onBackground
98
- },
99
- children: title
100
- }), onDismiss && /*#__PURE__*/_jsx(Button, {
101
- theme: theme,
102
- mode: "text",
103
- onPress: onDismiss,
104
- accessibilityLabel: dismissLabel,
105
- children: dismissLabel
106
- })]
107
- }), /*#__PURE__*/_jsx(FlatList, {
108
- data: devices,
109
- keyExtractor: device => device.id,
110
- renderItem: renderItem
111
- })]
112
- })
113
- })
114
- })
115
- });
116
- };
117
- const styles = StyleSheet.create({
118
- overlay: {
119
- flex: 1,
120
- justifyContent: "flex-end",
121
- backgroundColor: "#0008"
122
- },
123
- safeArea: {
124
- maxHeight: "70%"
125
- },
126
- card: {
127
- padding: 20,
128
- borderTopLeftRadius: 18,
129
- borderTopRightRadius: 18
130
- },
131
- header: {
132
- alignItems: "center",
133
- flexDirection: "row",
134
- justifyContent: "space-between",
135
- marginBottom: 12
136
- },
137
- row: {
138
- alignItems: "center",
139
- flexDirection: "row",
140
- gap: 12,
141
- paddingVertical: 16,
142
- borderBottomWidth: StyleSheet.hairlineWidth,
143
- borderBottomColor: "#8888"
144
- },
145
- image: {
146
- borderRadius: 8,
147
- height: 48,
148
- width: 48
149
- },
150
- deviceCopy: {
151
- flex: 1,
152
- gap: 2
153
- },
154
- pressed: {
155
- opacity: 0.6
156
- }
18
+ ...props
19
+ }) => /*#__PURE__*/_jsx(DevicePickerSheet, {
20
+ ...props,
21
+ title: title,
22
+ dismissLabel: dismissLabel,
23
+ labelForDevice: labelForDevice,
24
+ modelForDevice: device => device.deviceData.model
157
25
  });
158
26
  //# sourceMappingURL=bluetooth-device-picker.js.map