@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,208 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "BluetoothError", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _errors.BluetoothError;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "BluetoothProvider", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _context.BluetoothProvider;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "BluetoothRuntime", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _runtime.BluetoothRuntime;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "Devices", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _supportedDevices.Devices;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "IntegratedDevices", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _integratedDevices.IntegratedDevices;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "SIG_PROTOCOLS", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _sigProfiles.SIG_PROTOCOLS;
40
+ }
41
+ });
42
+ Object.defineProperty(exports, "SUPPORTED_DEVICES", {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _supportedDevices.SUPPORTED_DEVICES;
46
+ }
47
+ });
48
+ Object.defineProperty(exports, "WEB_BLUETOOTH_SERVICES", {
49
+ enumerable: true,
50
+ get: function () {
51
+ return _webBluetoothServices.WEB_BLUETOOTH_SERVICES;
52
+ }
53
+ });
54
+ Object.defineProperty(exports, "acceptedMemorySlots", {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _resultPolicy.acceptedMemorySlots;
58
+ }
59
+ });
60
+ Object.defineProperty(exports, "builtInDevices", {
61
+ enumerable: true,
62
+ get: function () {
63
+ return _builtInDevices.builtInDevices;
64
+ }
65
+ });
66
+ Object.defineProperty(exports, "createWebBluetoothRuntime", {
67
+ enumerable: true,
68
+ get: function () {
69
+ return _createWebBluetoothRuntime.createWebBluetoothRuntime;
70
+ }
71
+ });
72
+ Object.defineProperty(exports, "dailyTotalsOnly", {
73
+ enumerable: true,
74
+ get: function () {
75
+ return _resultPolicy.dailyTotalsOnly;
76
+ }
77
+ });
78
+ Object.defineProperty(exports, "defineDevice", {
79
+ enumerable: true,
80
+ get: function () {
81
+ return _devices.defineDevice;
82
+ }
83
+ });
84
+ Object.defineProperty(exports, "everyReading", {
85
+ enumerable: true,
86
+ get: function () {
87
+ return _resultPolicy.everyReading;
88
+ }
89
+ });
90
+ Object.defineProperty(exports, "firstReadingPerKind", {
91
+ enumerable: true,
92
+ get: function () {
93
+ return _resultPolicy.firstReadingPerKind;
94
+ }
95
+ });
96
+ Object.defineProperty(exports, "isWebBluetoothAvailable", {
97
+ enumerable: true,
98
+ get: function () {
99
+ return _webBluetoothScanner.isWebBluetoothAvailable;
100
+ }
101
+ });
102
+ Object.defineProperty(exports, "keepReadings", {
103
+ enumerable: true,
104
+ get: function () {
105
+ return _resultPolicy.keepReadings;
106
+ }
107
+ });
108
+ Object.defineProperty(exports, "ovokReadingSink", {
109
+ enumerable: true,
110
+ get: function () {
111
+ return _ovokSink.ovokReadingSink;
112
+ }
113
+ });
114
+ Object.defineProperty(exports, "policyByKind", {
115
+ enumerable: true,
116
+ get: function () {
117
+ return _resultPolicy.policyByKind;
118
+ }
119
+ });
120
+ Object.defineProperty(exports, "resultPoliciesFor", {
121
+ enumerable: true,
122
+ get: function () {
123
+ return _deviceQuery.resultPoliciesFor;
124
+ }
125
+ });
126
+ Object.defineProperty(exports, "useBluetooth", {
127
+ enumerable: true,
128
+ get: function () {
129
+ return _context.useBluetooth;
130
+ }
131
+ });
132
+ Object.defineProperty(exports, "useBluetoothPermission", {
133
+ enumerable: true,
134
+ get: function () {
135
+ return _hooks.useBluetoothPermission;
136
+ }
137
+ });
138
+ Object.defineProperty(exports, "useBluetoothState", {
139
+ enumerable: true,
140
+ get: function () {
141
+ return _hooks.useBluetoothState;
142
+ }
143
+ });
144
+ Object.defineProperty(exports, "useMeasurements", {
145
+ enumerable: true,
146
+ get: function () {
147
+ return _hooks.useMeasurements;
148
+ }
149
+ });
150
+ Object.defineProperty(exports, "useNearbyDevice", {
151
+ enumerable: true,
152
+ get: function () {
153
+ return _hooks.useNearbyDevice;
154
+ }
155
+ });
156
+ Object.defineProperty(exports, "useNearbyDevices", {
157
+ enumerable: true,
158
+ get: function () {
159
+ return _hooks.useNearbyDevices;
160
+ }
161
+ });
162
+ Object.defineProperty(exports, "usePairedDevices", {
163
+ enumerable: true,
164
+ get: function () {
165
+ return _hooks.usePairedDevices;
166
+ }
167
+ });
168
+ Object.defineProperty(exports, "useScanning", {
169
+ enumerable: true,
170
+ get: function () {
171
+ return _hooks.useScanning;
172
+ }
173
+ });
174
+ Object.defineProperty(exports, "webBluetoothPermissions", {
175
+ enumerable: true,
176
+ get: function () {
177
+ return _webBluetoothPermissions.webBluetoothPermissions;
178
+ }
179
+ });
180
+ Object.defineProperty(exports, "webBluetoothScanner", {
181
+ enumerable: true,
182
+ get: function () {
183
+ return _webBluetoothScanner.webBluetoothScanner;
184
+ }
185
+ });
186
+ Object.defineProperty(exports, "webBluetoothServicesFor", {
187
+ enumerable: true,
188
+ get: function () {
189
+ return _webBluetoothServices.webBluetoothServicesFor;
190
+ }
191
+ });
192
+ var _createWebBluetoothRuntime = require("./create-web-bluetooth-runtime.js");
193
+ var _webBluetoothScanner = require("./web-bluetooth-scanner.js");
194
+ var _webBluetoothPermissions = require("./web-bluetooth-permissions.js");
195
+ var _webBluetoothServices = require("./web-bluetooth-services.js");
196
+ var _runtime = require("../runtime.js");
197
+ var _errors = require("../errors.js");
198
+ var _devices = require("../devices.js");
199
+ var _resultPolicy = require("../result-policy.js");
200
+ var _sigProfiles = require("../sig-profiles.js");
201
+ var _builtInDevices = require("../ble-plx/built-in-devices.js");
202
+ var _integratedDevices = require("../../../bt-management/types/integrated-devices.js");
203
+ var _supportedDevices = require("../../../bt-device/constants/supported-devices.js");
204
+ var _deviceQuery = require("../../../bt-device/utils/device-query.js");
205
+ var _ovokSink = require("../react-native/ovok-sink.js");
206
+ var _context = require("../react/context.js");
207
+ var _hooks = require("../react/hooks.js");
208
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_createWebBluetoothRuntime","require","_webBluetoothScanner","_webBluetoothPermissions","_webBluetoothServices","_runtime","_errors","_devices","_resultPolicy","_sigProfiles","_builtInDevices","_integratedDevices","_supportedDevices","_deviceQuery","_ovokSink","_context","_hooks"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/web/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAAA,0BAAA,GAAAC,OAAA;AAEA,IAAAC,oBAAA,GAAAD,OAAA;AAEA,IAAAE,wBAAA,GAAAF,OAAA;AACA,IAAAG,qBAAA,GAAAH,OAAA;AAEA,IAAAI,QAAA,GAAAJ,OAAA;AAEA,IAAAK,OAAA,GAAAL,OAAA;AAMA,IAAAM,QAAA,GAAAN,OAAA;AAIA,IAAAO,aAAA,GAAAP,OAAA;AASA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,eAAA,GAAAT,OAAA;AACA,IAAAU,kBAAA,GAAAV,OAAA;AAEA,IAAAW,iBAAA,GAAAX,OAAA;AAEA,IAAAY,YAAA,GAAAZ,OAAA;AACA,IAAAa,SAAA,GAAAb,OAAA;AACA,IAAAc,QAAA,GAAAd,OAAA;AAEA,IAAAe,MAAA,GAAAf,OAAA","ignoreList":[]}
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.WebBleDevice = void 0;
7
+ var _webBleShapes = require("./web-ble-shapes.js");
8
+ var _webBluetoothValues = require("./web-bluetooth-values.js");
9
+ var _webGatt = require("./web-gatt.js");
10
+ /** The ATT default; browsers negotiate a larger MTU themselves and expose no way to ask for one. */
11
+ const DEFAULT_MTU = 23;
12
+ const VALUE_CHANGED = "characteristicvaluechanged";
13
+ const DISCONNECTED = "gattserverdisconnected";
14
+
15
+ /** Advertising data a browser saw for the device, when it let the page watch advertisements. */
16
+
17
+ /**
18
+ * A Web Bluetooth device behind the part of the `react-native-ble-plx` `Device` API the SDK's device classes use, so
19
+ * every integrated device and `defineCustomDevice` declaration runs unchanged in a browser. Operations queue (see
20
+ * `WebGatt`), so a write also waits for notifications still being started.
21
+ */
22
+ class WebBleDevice {
23
+ mtu = DEFAULT_MTU;
24
+ rssi = null;
25
+ monitors = new Set();
26
+ disconnectListeners = new Set();
27
+ constructor(device, advertisement) {
28
+ this.id = device.id;
29
+ this.name = device.name?.trim() || null;
30
+ this.localName = this.name;
31
+ this.manufacturerData = advertisement?.manufacturerData ?? null;
32
+ this.serviceUUIDs = advertisement?.serviceUUIDs ?? null;
33
+ this.gatt = new _webGatt.WebGatt(device);
34
+ device.addEventListener(DISCONNECTED, this.onDisconnect);
35
+ }
36
+ async connect() {
37
+ await this.gatt.server().connect();
38
+ return this;
39
+ }
40
+ async isConnected() {
41
+ return this.gatt.connected;
42
+ }
43
+ async cancelConnection() {
44
+ if (this.gatt.connected) {
45
+ this.gatt.server().disconnect();
46
+ }
47
+ return this;
48
+ }
49
+ async requestMTU() {
50
+ return this;
51
+ }
52
+
53
+ /** Discovers the services, and reports them as advertised when the browser showed none. */
54
+ async discoverAllServicesAndCharacteristics() {
55
+ const uuids = await this.gatt.queued(() => {
56
+ this.gatt.forget();
57
+ return this.gatt.serviceUuids();
58
+ });
59
+ if (!this.serviceUUIDs?.length) {
60
+ this.serviceUUIDs = uuids;
61
+ }
62
+ return this;
63
+ }
64
+ services() {
65
+ return this.gatt.queued(async () => (await this.gatt.serviceUuids()).map(uuid => ({
66
+ uuid,
67
+ deviceID: this.id,
68
+ isPrimary: true
69
+ })));
70
+ }
71
+ characteristicsForService(serviceUuid) {
72
+ return this.gatt.queued(async () => (await this.gatt.characteristicsOf(serviceUuid)).map(characteristic => (0, _webBleShapes.toBleCharacteristic)(this.id, (0, _webBluetoothValues.canonicalUuid)(serviceUuid), characteristic, null)));
73
+ }
74
+ readCharacteristicForService(serviceUuid, characteristicUuid) {
75
+ return this.gatt.queued(async () => {
76
+ const characteristic = await this.gatt.characteristic(serviceUuid, characteristicUuid);
77
+ const value = await characteristic.readValue();
78
+ return (0, _webBleShapes.toBleCharacteristic)(this.id, (0, _webBluetoothValues.canonicalUuid)(serviceUuid), characteristic, (0, _webBluetoothValues.toBase64)((0, _webBluetoothValues.bytesOf)(value)));
79
+ });
80
+ }
81
+ writeCharacteristicWithResponseForService(serviceUuid, characteristicUuid, base64) {
82
+ return this.write(serviceUuid, characteristicUuid, base64, true);
83
+ }
84
+ writeCharacteristicWithoutResponseForService(serviceUuid, characteristicUuid, base64) {
85
+ return this.write(serviceUuid, characteristicUuid, base64, false);
86
+ }
87
+
88
+ /** Starts notifications in the GATT queue; `listener` gets each value, then `DeviceDisconnected` if the link drops. */
89
+ monitorCharacteristicForService(serviceUuid, characteristicUuid, listener) {
90
+ let characteristic;
91
+ let active = true;
92
+ const onValue = event => {
93
+ const value = event.target?.value;
94
+ if (active && characteristic && value) {
95
+ const base64 = (0, _webBluetoothValues.toBase64)((0, _webBluetoothValues.bytesOf)(value));
96
+ listener(null, (0, _webBleShapes.toBleCharacteristic)(this.id, (0, _webBluetoothValues.canonicalUuid)(serviceUuid), characteristic, base64));
97
+ }
98
+ };
99
+ const stop = () => {
100
+ const started = characteristic;
101
+ started?.removeEventListener(VALUE_CHANGED, onValue);
102
+ void this.gatt.queued(async () => started?.stopNotifications()).catch(() => undefined);
103
+ };
104
+ this.monitors.add(listener);
105
+ this.gatt.queued(async () => {
106
+ characteristic = await this.gatt.characteristic(serviceUuid, characteristicUuid);
107
+ characteristic.addEventListener(VALUE_CHANGED, onValue);
108
+ await characteristic.startNotifications();
109
+ }).then(() => !active && stop(), error => active && listener(this.gatt.errorOf(error), null));
110
+ return {
111
+ remove: () => {
112
+ if (active) {
113
+ active = false;
114
+ this.monitors.delete(listener);
115
+ stop();
116
+ }
117
+ }
118
+ };
119
+ }
120
+ onDisconnected(listener) {
121
+ this.disconnectListeners.add(listener);
122
+ return {
123
+ remove: () => this.disconnectListeners.delete(listener)
124
+ };
125
+ }
126
+ onDisconnect = () => {
127
+ const error = new _webBleShapes.WebBleError(_webBleShapes.DEVICE_DISCONNECTED, `Device ${this.id} was disconnected`);
128
+ [...this.monitors].forEach(listener => listener(error, null));
129
+ this.monitors.clear();
130
+ this.gatt.forget();
131
+ [...this.disconnectListeners].forEach(listener => listener(null, this));
132
+ };
133
+ write(serviceUuid, characteristicUuid, base64, withResponse) {
134
+ return this.gatt.queued(async () => {
135
+ const characteristic = await this.gatt.characteristic(serviceUuid, characteristicUuid);
136
+ const writeValue = withResponse ? characteristic.writeValueWithResponse : characteristic.writeValueWithoutResponse;
137
+ await (writeValue ?? characteristic.writeValue).call(characteristic, (0, _webBluetoothValues.fromBase64)(base64));
138
+ return (0, _webBleShapes.toBleCharacteristic)(this.id, (0, _webBluetoothValues.canonicalUuid)(serviceUuid), characteristic, base64);
139
+ });
140
+ }
141
+ }
142
+ exports.WebBleDevice = WebBleDevice;
143
+ //# sourceMappingURL=web-ble-device.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_webBleShapes","require","_webBluetoothValues","_webGatt","DEFAULT_MTU","VALUE_CHANGED","DISCONNECTED","WebBleDevice","mtu","rssi","monitors","Set","disconnectListeners","constructor","device","advertisement","id","name","trim","localName","manufacturerData","serviceUUIDs","gatt","WebGatt","addEventListener","onDisconnect","connect","server","isConnected","connected","cancelConnection","disconnect","requestMTU","discoverAllServicesAndCharacteristics","uuids","queued","forget","serviceUuids","length","services","map","uuid","deviceID","isPrimary","characteristicsForService","serviceUuid","characteristicsOf","characteristic","toBleCharacteristic","canonicalUuid","readCharacteristicForService","characteristicUuid","value","readValue","toBase64","bytesOf","writeCharacteristicWithResponseForService","base64","write","writeCharacteristicWithoutResponseForService","monitorCharacteristicForService","listener","active","onValue","event","target","stop","started","removeEventListener","stopNotifications","catch","undefined","add","startNotifications","then","error","errorOf","remove","delete","onDisconnected","WebBleError","DEVICE_DISCONNECTED","forEach","clear","withResponse","writeValue","writeValueWithResponse","writeValueWithoutResponse","call","fromBase64","exports"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/web/web-ble-device.ts"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AAEA,IAAAE,QAAA,GAAAF,OAAA;AAEA;AACA,MAAMG,WAAW,GAAG,EAAE;AACtB,MAAMC,aAAa,GAAG,4BAA4B;AAClD,MAAMC,YAAY,GAAG,wBAAwB;;AAM7C;;AAGA;AACA;AACA;AACA;AACA;AACA,MAAMC,YAAY,CAAC;EAKDC,GAAG,GAAGJ,WAAW;EACjBK,IAAI,GAAG,IAAI;EAGVC,QAAQ,GAAG,IAAIC,GAAG,CAAkB,CAAC;EACrCC,mBAAmB,GAAG,IAAID,GAAG,CAAqB,CAAC;EAE7DE,WAAWA,CAACC,MAA0B,EAAEC,aAAmC,EAAE;IAClF,IAAI,CAACC,EAAE,GAAGF,MAAM,CAACE,EAAE;IACnB,IAAI,CAACC,IAAI,GAAGH,MAAM,CAACG,IAAI,EAAEC,IAAI,CAAC,CAAC,IAAI,IAAI;IACvC,IAAI,CAACC,SAAS,GAAG,IAAI,CAACF,IAAI;IAC1B,IAAI,CAACG,gBAAgB,GAAGL,aAAa,EAAEK,gBAAgB,IAAI,IAAI;IAC/D,IAAI,CAACC,YAAY,GAAGN,aAAa,EAAEM,YAAY,IAAI,IAAI;IACvD,IAAI,CAACC,IAAI,GAAG,IAAIC,gBAAO,CAACT,MAAM,CAAC;IAC/BA,MAAM,CAACU,gBAAgB,CAAClB,YAAY,EAAE,IAAI,CAACmB,YAAY,CAAC;EAC1D;EAEA,MAAaC,OAAOA,CAAA,EAAkB;IACpC,MAAM,IAAI,CAACJ,IAAI,CAACK,MAAM,CAAC,CAAC,CAACD,OAAO,CAAC,CAAC;IAElC,OAAO,IAAI;EACb;EAEA,MAAaE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ACF;AAACiC,OAAA,CAAAnF,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.toBleCharacteristic = exports.WebBleError = exports.UNKNOWN_ERROR = exports.DEVICE_DISCONNECTED = void 0;
7
+ var _webBluetoothValues = require("./web-bluetooth-values.js");
8
+ /** `react-native-ble-plx`'s BleErrorCode.DeviceDisconnected, which ends a link instead of failing it. */
9
+ const DEVICE_DISCONNECTED = exports.DEVICE_DISCONNECTED = 201;
10
+ const UNKNOWN_ERROR = exports.UNKNOWN_ERROR = 0;
11
+
12
+ /** A failed Web Bluetooth operation in the shape `react-native-ble-plx` reports errors. */
13
+ class WebBleError extends Error {
14
+ constructor(errorCode, message, reason) {
15
+ super(message);
16
+ this.errorCode = errorCode;
17
+ this.reason = reason;
18
+ this.name = "BleError";
19
+ }
20
+ }
21
+
22
+ /** A characteristic in the shape `react-native-ble-plx` returns one, with its value as base64. */
23
+ exports.WebBleError = WebBleError;
24
+ const toBleCharacteristic = (deviceID, serviceUUID, characteristic, value) => {
25
+ const {
26
+ properties
27
+ } = characteristic;
28
+ const uuid = (0, _webBluetoothValues.canonicalUuid)(characteristic.uuid);
29
+ return {
30
+ id: `${serviceUUID}/${uuid}`,
31
+ uuid,
32
+ serviceUUID,
33
+ deviceID,
34
+ value,
35
+ isReadable: properties.read,
36
+ isWritableWithResponse: properties.write,
37
+ isWritableWithoutResponse: properties.writeWithoutResponse,
38
+ isNotifiable: properties.notify,
39
+ isIndicatable: properties.indicate
40
+ };
41
+ };
42
+ exports.toBleCharacteristic = toBleCharacteristic;
43
+ //# sourceMappingURL=web-ble-shapes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_webBluetoothValues","require","DEVICE_DISCONNECTED","exports","UNKNOWN_ERROR","WebBleError","Error","constructor","errorCode","message","reason","name","toBleCharacteristic","deviceID","serviceUUID","characteristic","value","properties","uuid","canonicalUuid","id","isReadable","read","isWritableWithResponse","write","isWritableWithoutResponse","writeWithoutResponse","isNotifiable","notify","isIndicatable","indicate"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/web/web-ble-shapes.ts"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AAGA;AACA,MAAMC,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG,GAAG;AAC/B,MAAME,aAAa,GAAAD,OAAA,CAAAC,aAAA,GAAG,CAAC;;AAEvB;AACA,MAAMC,WAAW,SAASC,KAAK,CAAC;EACvBC,WAAWA,CAAiBC,SAAiB,EAAEC,OAAe,EAAkBC,MAAgB,EAAE;IACvG,KAAK,CAACD,OAAO,CAAC;IAAC,KADkBD,SAAiB,GAAjBA,SAAiB;IAAA,KAAmCE,MAAgB,GAAhBA,MAAgB;IAErG,IAAI,CAACC,IAAI,GAAG,UAAU;EACxB;AACF;;AAEA;AAAAR,OAAA,CAAAE,WAAA,GAAAA,WAAA;AAcA,MAAMO,mBAAmB,GAAGA,CAC1BC,QAAgB,EAChBC,WAAmB,EACnBC,cAA0C,EAC1CC,KAAoB,KACE;EACtB,MAAM;IAAEC;EAAW,CAAC,GAAGF,cAAc;EACrC,MAAMG,IAAI,GAAG,IAAAC,iCAAa,EAACJ,cAAc,CAACG,IAAI,CAAC;EAE/C,OAAO;IACLE,EAAE,EAAE,GAAGN,WAAW,IAAII,IAAI,EAAE;IAC5BA,IAAI;IACJJ,WAAW;IACXD,QAAQ;IACRG,KAAK;IACLK,UAAU,EAAEJ,UAAU,CAACK,IAAI;IAC3BC,sBAAsB,EAAEN,UAAU,CAACO,KAAK;IACxCC,yBAAyB,EAAER,UAAU,CAACS,oBAAoB;IAC1DC,YAAY,EAAEV,UAAU,CAACW,MAAM;IAC/BC,aAAa,EAAEZ,UAAU,CAACa;EAC5B,CAAC;AACH,CAAC;AAAC3B,OAAA,CAAAS,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.webBluetoothPermissions = void 0;
7
+ var _webBluetoothScanner = require("./web-bluetooth-scanner.js");
8
+ /**
9
+ * Browser permissions: the browser asks per device in its chooser, so there is no prompt to show first. Granted where
10
+ * the browser has Web Bluetooth, denied where it has none; no settings page can change that.
11
+ */
12
+ const webBluetoothPermissions = () => {
13
+ const permission = async () => (0, _webBluetoothScanner.isWebBluetoothAvailable)() ? "granted" : "denied";
14
+ return {
15
+ check: permission,
16
+ request: permission,
17
+ openSettings: async () => undefined
18
+ };
19
+ };
20
+ exports.webBluetoothPermissions = webBluetoothPermissions;
21
+ //# sourceMappingURL=web-bluetooth-permissions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_webBluetoothScanner","require","webBluetoothPermissions","permission","isWebBluetoothAvailable","check","request","openSettings","undefined","exports"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/web/web-bluetooth-permissions.ts"],"mappings":";;;;;;AAEA,IAAAA,oBAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,GAAGA,CAAA,KAA4B;EAC1D,MAAMC,UAAU,GAAG,MAAAA,CAAA,KAA2C,IAAAC,4CAAuB,EAAC,CAAC,GAAG,SAAS,GAAG,QAAS;EAE/G,OAAO;IAAEC,KAAK,EAAEF,UAAU;IAAEG,OAAO,EAAEH,UAAU;IAAEI,YAAY,EAAE,MAAAA,CAAA,KAAYC;EAAU,CAAC;AACxF,CAAC;AAACC,OAAA,CAAAP,uBAAA,GAAAA,uBAAA","ignoreList":[]}
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.webBluetoothScanner = exports.isWebBluetoothAvailable = void 0;
7
+ var _bleErrors = require("../ble-plx/ble-errors.js");
8
+ var _blePeripheral = require("../ble-plx/ble-peripheral.js");
9
+ var _errors = require("../errors.js");
10
+ var _webBleDevice = require("./web-ble-device.js");
11
+ var _webBluetoothServices = require("./web-bluetooth-services.js");
12
+ var _webBluetoothValues = require("./web-bluetooth-values.js");
13
+ /** How long a device gets to advertise, where the browser lets the page watch, before it is reported without. */
14
+ const ADVERTISEMENT_WAIT_MS = 1500;
15
+ const CHOOSER_CLOSED = "NotFoundError";
16
+
17
+ /** What `webBluetoothScanner` needs. */
18
+
19
+ /** A `BluetoothScanner` for browsers, where a page only reaches the devices the user picks in the browser's chooser. */
20
+
21
+ const navigatorBluetooth = () => globalThis.navigator?.bluetooth;
22
+
23
+ /** Whether this browser has Web Bluetooth, such as Chrome and Edge on desktop and Android, or Bluefy on iOS. */
24
+ const isWebBluetoothAvailable = () => navigatorBluetooth() !== undefined;
25
+ exports.isWebBluetoothAvailable = isWebBluetoothAvailable;
26
+ const unsupported = () => new _errors.BluetoothError("unsupported", "This browser has no Web Bluetooth");
27
+
28
+ /** The first advertisement the browser reports, when it lets the page watch them, so names alone need not match. */
29
+ const advertisementOf = device => {
30
+ if (typeof device.watchAdvertisements !== "function") {
31
+ return Promise.resolve(undefined);
32
+ }
33
+ return new Promise(resolve => {
34
+ const watching = new AbortController();
35
+ const done = advertisement => {
36
+ clearTimeout(timer);
37
+ device.removeEventListener("advertisementreceived", received);
38
+ watching.abort();
39
+ resolve(advertisement);
40
+ };
41
+ const received = event => {
42
+ const {
43
+ uuids,
44
+ manufacturerData
45
+ } = event;
46
+ done({
47
+ serviceUUIDs: uuids?.map(_webBluetoothValues.canonicalUuid) ?? null,
48
+ manufacturerData: (0, _webBluetoothValues.manufacturerDataOf)(manufacturerData)
49
+ });
50
+ };
51
+ const timer = setTimeout(() => done(), ADVERTISEMENT_WAIT_MS);
52
+ device.addEventListener("advertisementreceived", received);
53
+ device.watchAdvertisements?.({
54
+ signal: watching.signal
55
+ }).catch(() => done());
56
+ });
57
+ };
58
+
59
+ /**
60
+ * Finds devices through Web Bluetooth. A scan reports the devices this site may already use (`getDevices`, where the
61
+ * browser has it) and every device picked with `chooseDevice`; browsers can't scan in the background or without the
62
+ * user picking.
63
+ */
64
+ const webBluetoothScanner = ({
65
+ acceptedDevices,
66
+ bluetooth = navigatorBluetooth()
67
+ } = {}) => {
68
+ const optionalServices = (0, _webBluetoothServices.webBluetoothServicesFor)(acceptedDevices);
69
+ const scans = new Set();
70
+ const devices = new Map();
71
+ const peripheralOf = async device => {
72
+ let bleDevice = devices.get(device.id);
73
+ if (!bleDevice) {
74
+ bleDevice = new _webBleDevice.WebBleDevice(device, await advertisementOf(device));
75
+ devices.set(device.id, bleDevice);
76
+ }
77
+ if (!bleDevice.serviceUUIDs?.length) {
78
+ // Devices told apart by their services alone (the SIG profiles) need them, and only a connection reveals them.
79
+ await bleDevice.connect().then(connected => connected.discoverAllServicesAndCharacteristics()).catch(() => undefined);
80
+ }
81
+ return (0, _blePeripheral.blePeripheral)(bleDevice);
82
+ };
83
+ const report = async device => {
84
+ const peripheral = await peripheralOf(device);
85
+ scans.forEach(onFound => onFound(peripheral));
86
+ return peripheral;
87
+ };
88
+ return {
89
+ watchState: listener => {
90
+ if (!bluetooth) {
91
+ listener("unsupported");
92
+ return () => undefined;
93
+ }
94
+ let watching = true;
95
+ const changed = event => watching && listener(event.value ? "on" : "off");
96
+ bluetooth.addEventListener("availabilitychanged", changed);
97
+ bluetooth.getAvailability().then(available => watching && listener(available ? "on" : "off"), () => watching && listener("unknown"));
98
+ return () => {
99
+ watching = false;
100
+ bluetooth.removeEventListener("availabilitychanged", changed);
101
+ };
102
+ },
103
+ scan: (onFound, onError) => {
104
+ if (!bluetooth) {
105
+ onError(unsupported());
106
+ return () => undefined;
107
+ }
108
+ scans.add(onFound);
109
+ bluetooth.getDevices?.().then(allowed => allowed.forEach(device => void report(device)), error => onError((0, _bleErrors.fromBleError)(error)));
110
+ return () => {
111
+ scans.delete(onFound);
112
+ };
113
+ },
114
+ chooseDevice: async () => {
115
+ if (!bluetooth) {
116
+ throw unsupported();
117
+ }
118
+ try {
119
+ return await report(await bluetooth.requestDevice({
120
+ acceptAllDevices: true,
121
+ optionalServices
122
+ }));
123
+ } catch (error) {
124
+ if (error?.name === CHOOSER_CLOSED) {
125
+ return undefined;
126
+ }
127
+ throw (0, _bleErrors.fromBleError)(error);
128
+ }
129
+ }
130
+ };
131
+ };
132
+ exports.webBluetoothScanner = webBluetoothScanner;
133
+ //# sourceMappingURL=web-bluetooth-scanner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_bleErrors","require","_blePeripheral","_errors","_webBleDevice","_webBluetoothServices","_webBluetoothValues","ADVERTISEMENT_WAIT_MS","CHOOSER_CLOSED","navigatorBluetooth","globalThis","navigator","bluetooth","isWebBluetoothAvailable","undefined","exports","unsupported","BluetoothError","advertisementOf","device","watchAdvertisements","Promise","resolve","watching","AbortController","done","advertisement","clearTimeout","timer","removeEventListener","received","abort","event","uuids","manufacturerData","serviceUUIDs","map","canonicalUuid","manufacturerDataOf","setTimeout","addEventListener","signal","catch","webBluetoothScanner","acceptedDevices","optionalServices","webBluetoothServicesFor","scans","Set","devices","Map","peripheralOf","bleDevice","get","id","WebBleDevice","set","length","connect","then","connected","discoverAllServicesAndCharacteristics","blePeripheral","report","peripheral","forEach","onFound","watchState","listener","changed","value","getAvailability","available","scan","onError","add","getDevices","allowed","error","fromBleError","delete","chooseDevice","requestDevice","acceptAllDevices","name"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/web/web-bluetooth-scanner.ts"],"mappings":";;;;;;AAGA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAGA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,qBAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AAGA;AACA,MAAMM,qBAAqB,GAAG,IAAI;AAClC,MAAMC,cAAc,GAAG,eAAe;;AAEtC;;AAUA;;AAUA,MAAMC,kBA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CAAC;IACH,CAAC;IACDe,YAAY,EAAE,MAAAA,CAAA,KAAY;MACxB,IAAI,CAACrE,SAAS,EAAE;QACd,MAAMI,WAAW,CAAC,CAAC;MACrB;MAEA,IAAI;QACF,OAAO,MAAM+C,MAAM,CAAC,MAAMnD,SAAS,CAACsE,aAAa,CAAC;UAAEC,gBAAgB,EAAE,IAAI;UAAEtC;QAAiB,CAAC,CAAC,CAAC;MAClG,CAAC,CAAC,OAAOiC,KAAK,EAAE;QACd,IAAKA,KAAK,EAAoCM,IAAI,KAAK5E,cAAc,EAAE;UACrE,OAAOM,SAAS;QAClB;QACA,MAAM,IAAAiE,uBAAY,EAACD,KAAK,CAAC;MAC3B;IACF;EACF,CAAC;AACH,CAAC;AAAC/D,OAAA,CAAA4B,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.webBluetoothServicesFor = exports.WEB_BLUETOOTH_SERVICES = void 0;
7
+ var _backgroundServiceUuids = require("../../../bt-management/services/background-sync/background-service-uuids.js");
8
+ var _integratedDevices = require("../../../bt-management/types/integrated-devices.js");
9
+ var _webBluetoothValues = require("./web-bluetooth-values.js");
10
+ /** Services read on every connection, whatever the device. */
11
+ const SHARED_SERVICES = ["1800", "180a", "180f", "1805", "1804"];
12
+
13
+ /** Bluetooth SIG profiles: glucose, thermometer, heart rate, blood pressure, weight scale, pulse oximeter. */
14
+ const SIG_SERVICES = ["1808", "1809", "180d", "1810", "181d", "1822"];
15
+
16
+ /** Services the integrated devices' protocols use beyond their background-scan services. */
17
+ const PROTOCOL_SERVICES = ["1000", "18f0", "7801", "7802", "7809", "7889", "7892", "a000", "a500", "a602", "a610", "ae30", "f018", "fe60", "fee0", "ff00", "ff12", "ffb0", "ffe0", "ffe5", "fff0", "ffff", "14839ac4-7d7e-415c-9a42-167340cf2339", "e8fb0001-a14b-98f9-831b-4e2941d01248", "00002760-08c2-11e1-9073-0e8ac72e5450", "6e400001-b5a3-f393-e0a9-e50e24dcca9e", "cdeacb80-5235-4c07-8846-93a37ee6b86d", "cdeacd80-5235-4c07-8846-93a37ee6b86d", "49535343-fe7d-4ae5-8fa9-9fafd205e455", "81eea003-e735-49ec-8a11-7e32cae1e14e", "5d4b8aa6-a26a-4a1b-99f5-cd4473c786e3", "2610fc00-494d-494c-4544-55544954414c", "233bf000-5a34-1b6d-975c-000d5690abe4", "23434100-1fe4-1eff-80cb-00ff78297d8b", "00001523-1212-efde-1523-785feabcd123", "0003cdd0-0000-1000-8000-00805f9b0131", "00010203-0405-0607-0809-0a0b0c0d1910", "fb349b5f-8000-0080-0010-0000f0180000"];
18
+
19
+ /**
20
+ * Every GATT service an integrated device uses, as a browser must be told when the user picks a device: a page can
21
+ * only reach the services it named in `navigator.bluetooth.requestDevice`'s `optionalServices`.
22
+ */
23
+ const WEB_BLUETOOTH_SERVICES = exports.WEB_BLUETOOTH_SERVICES = [...new Set([...SHARED_SERVICES, ...SIG_SERVICES, ...PROTOCOL_SERVICES, ...(0, _backgroundServiceUuids.getBackgroundServiceUUIDs)(Object.values(_integratedDevices.IntegratedDevices))].map(_webBluetoothValues.canonicalUuid))];
24
+
25
+ /** `WEB_BLUETOOTH_SERVICES` and the services of the `defineCustomDevice` declarations among `acceptedDevices`. */
26
+ const webBluetoothServicesFor = (acceptedDevices = []) => [...new Set([...WEB_BLUETOOTH_SERVICES, ...(0, _backgroundServiceUuids.getBackgroundServiceUUIDs)(acceptedDevices).map(_webBluetoothValues.canonicalUuid)])];
27
+ exports.webBluetoothServicesFor = webBluetoothServicesFor;
28
+ //# sourceMappingURL=web-bluetooth-services.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_backgroundServiceUuids","require","_integratedDevices","_webBluetoothValues","SHARED_SERVICES","SIG_SERVICES","PROTOCOL_SERVICES","WEB_BLUETOOTH_SERVICES","exports","Set","getBackgroundServiceUUIDs","Object","values","IntegratedDevices","map","canonicalUuid","webBluetoothServicesFor","acceptedDevices"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/web/web-bluetooth-services.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AAEA,IAAAC,kBAAA,GAAAD,OAAA;AAEA,IAAAE,mBAAA,GAAAF,OAAA;AAEA;AACA,MAAMG,eAAe,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;;AAEhE;AACA,MAAMC,YAAY,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;;AAErE;AACA,MAAMC,iBAAiB,GAAG,CACxB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAC9G,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAC9D,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,CACvC;;AAED;AACA;AACA;AACA;AACA,MAAMC,sBAAyC,GAAAC,OAAA,CAAAD,sBAAA,GAAG,CAChD,GAAG,IAAIE,GAAG,CACR,CACE,GAAGL,eAAe,EAClB,GAAGC,YAAY,EACf,GAAGC,iBAAiB,EACpB,GAAG,IAAAI,iDAAyB,EAACC,MAAM,CAACC,MAAM,CAACC,oCAAiB,CAAC,CAAC,CAC/D,CAACC,GAAG,CAACC,iCAAa,CACrB,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