@ovok/native 1.16.1-rc.4 → 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 (263) hide show
  1. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-peripheral.js +35 -0
  2. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-peripheral.js.map +1 -0
  3. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-scanner.js +3 -30
  4. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-scanner.js.map +1 -1
  5. package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js +2 -2
  6. package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -1
  7. package/lib/commonjs/modules/next/bluetooth/react-native/ovok-sink.js.map +1 -1
  8. package/lib/commonjs/modules/next/bluetooth/web/create-web-bluetooth-runtime.js +28 -0
  9. package/lib/commonjs/modules/next/bluetooth/web/create-web-bluetooth-runtime.js.map +1 -0
  10. package/lib/commonjs/modules/next/bluetooth/web/index.js +208 -0
  11. package/lib/commonjs/modules/next/bluetooth/web/index.js.map +1 -0
  12. package/lib/commonjs/modules/next/bluetooth/web/web-ble-device.js +143 -0
  13. package/lib/commonjs/modules/next/bluetooth/web/web-ble-device.js.map +1 -0
  14. package/lib/commonjs/modules/next/bluetooth/web/web-ble-shapes.js +43 -0
  15. package/lib/commonjs/modules/next/bluetooth/web/web-ble-shapes.js.map +1 -0
  16. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-permissions.js +21 -0
  17. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-permissions.js.map +1 -0
  18. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-scanner.js +133 -0
  19. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-scanner.js.map +1 -0
  20. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-services.js +28 -0
  21. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-services.js.map +1 -0
  22. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-values.js +37 -0
  23. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-values.js.map +1 -0
  24. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth.types.js +2 -0
  25. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth.types.js.map +1 -0
  26. package/lib/commonjs/modules/next/bluetooth/web/web-gatt.js +83 -0
  27. package/lib/commonjs/modules/next/bluetooth/web/web-gatt.js.map +1 -0
  28. package/lib/commonjs/modules/next/breathing-exercise/index.js +17 -0
  29. package/lib/commonjs/modules/next/breathing-exercise/index.js.map +1 -0
  30. package/lib/commonjs/modules/next/cms/index.js +17 -0
  31. package/lib/commonjs/modules/next/cms/index.js.map +1 -0
  32. package/lib/commonjs/modules/next/content/index.js +17 -0
  33. package/lib/commonjs/modules/next/content/index.js.map +1 -0
  34. package/lib/commonjs/modules/next/diary/index.js +17 -0
  35. package/lib/commonjs/modules/next/diary/index.js.map +1 -0
  36. package/lib/commonjs/modules/next/image/index.js +17 -0
  37. package/lib/commonjs/modules/next/image/index.js.map +1 -0
  38. package/lib/commonjs/modules/next/journal/index.js +17 -0
  39. package/lib/commonjs/modules/next/journal/index.js.map +1 -0
  40. package/lib/commonjs/modules/next/language-switcher/index.js +17 -0
  41. package/lib/commonjs/modules/next/language-switcher/index.js.map +1 -0
  42. package/lib/commonjs/modules/next/measurement/index.js +17 -0
  43. package/lib/commonjs/modules/next/measurement/index.js.map +1 -0
  44. package/lib/commonjs/modules/next/observation-detail/index.js +17 -0
  45. package/lib/commonjs/modules/next/observation-detail/index.js.map +1 -0
  46. package/lib/commonjs/modules/next/patient/index.js +17 -0
  47. package/lib/commonjs/modules/next/patient/index.js.map +1 -0
  48. package/lib/commonjs/modules/next/pdf/index.js +17 -0
  49. package/lib/commonjs/modules/next/pdf/index.js.map +1 -0
  50. package/lib/commonjs/modules/next/picker-sheet/index.js +17 -0
  51. package/lib/commonjs/modules/next/picker-sheet/index.js.map +1 -0
  52. package/lib/commonjs/modules/next/progress-bar/index.js +17 -0
  53. package/lib/commonjs/modules/next/progress-bar/index.js.map +1 -0
  54. package/lib/commonjs/modules/next/progress-ring/index.js +17 -0
  55. package/lib/commonjs/modules/next/progress-ring/index.js.map +1 -0
  56. package/lib/commonjs/modules/next/setting/index.js +17 -0
  57. package/lib/commonjs/modules/next/setting/index.js.map +1 -0
  58. package/lib/commonjs/modules/next/tab/index.js +17 -0
  59. package/lib/commonjs/modules/next/tab/index.js.map +1 -0
  60. package/lib/commonjs/modules/next/theme/index.js +17 -0
  61. package/lib/commonjs/modules/next/theme/index.js.map +1 -0
  62. package/lib/commonjs/modules/next/tile/index.js +17 -0
  63. package/lib/commonjs/modules/next/tile/index.js.map +1 -0
  64. package/lib/commonjs/modules/next/ui/index.js +17 -0
  65. package/lib/commonjs/modules/next/ui/index.js.map +1 -0
  66. package/lib/module/modules/next/bluetooth/ble-plx/ble-peripheral.js +30 -0
  67. package/lib/module/modules/next/bluetooth/ble-plx/ble-peripheral.js.map +1 -0
  68. package/lib/module/modules/next/bluetooth/ble-plx/ble-scanner.js +2 -27
  69. package/lib/module/modules/next/bluetooth/ble-plx/ble-scanner.js.map +1 -1
  70. package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js +1 -1
  71. package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -1
  72. package/lib/module/modules/next/bluetooth/react-native/ovok-sink.js.map +1 -1
  73. package/lib/module/modules/next/bluetooth/web/create-web-bluetooth-runtime.js +25 -0
  74. package/lib/module/modules/next/bluetooth/web/create-web-bluetooth-runtime.js.map +1 -0
  75. package/lib/module/modules/next/bluetooth/web/index.js +28 -0
  76. package/lib/module/modules/next/bluetooth/web/index.js.map +1 -0
  77. package/lib/module/modules/next/bluetooth/web/web-ble-device.js +140 -0
  78. package/lib/module/modules/next/bluetooth/web/web-ble-device.js.map +1 -0
  79. package/lib/module/modules/next/bluetooth/web/web-ble-shapes.js +39 -0
  80. package/lib/module/modules/next/bluetooth/web/web-ble-shapes.js.map +1 -0
  81. package/lib/module/modules/next/bluetooth/web/web-bluetooth-permissions.js +18 -0
  82. package/lib/module/modules/next/bluetooth/web/web-bluetooth-permissions.js.map +1 -0
  83. package/lib/module/modules/next/bluetooth/web/web-bluetooth-scanner.js +128 -0
  84. package/lib/module/modules/next/bluetooth/web/web-bluetooth-scanner.js.map +1 -0
  85. package/lib/module/modules/next/bluetooth/web/web-bluetooth-services.js +25 -0
  86. package/lib/module/modules/next/bluetooth/web/web-bluetooth-services.js.map +1 -0
  87. package/lib/module/modules/next/bluetooth/web/web-bluetooth-values.js +29 -0
  88. package/lib/module/modules/next/bluetooth/web/web-bluetooth-values.js.map +1 -0
  89. package/lib/module/modules/next/bluetooth/web/web-bluetooth.types.js +2 -0
  90. package/lib/module/modules/next/bluetooth/web/web-bluetooth.types.js.map +1 -0
  91. package/lib/module/modules/next/bluetooth/web/web-gatt.js +79 -0
  92. package/lib/module/modules/next/bluetooth/web/web-gatt.js.map +1 -0
  93. package/lib/module/modules/next/breathing-exercise/index.js +5 -0
  94. package/lib/module/modules/next/breathing-exercise/index.js.map +1 -0
  95. package/lib/module/modules/next/cms/index.js +5 -0
  96. package/lib/module/modules/next/cms/index.js.map +1 -0
  97. package/lib/module/modules/next/content/index.js +5 -0
  98. package/lib/module/modules/next/content/index.js.map +1 -0
  99. package/lib/module/modules/next/diary/index.js +5 -0
  100. package/lib/module/modules/next/diary/index.js.map +1 -0
  101. package/lib/module/modules/next/image/index.js +5 -0
  102. package/lib/module/modules/next/image/index.js.map +1 -0
  103. package/lib/module/modules/next/journal/index.js +5 -0
  104. package/lib/module/modules/next/journal/index.js.map +1 -0
  105. package/lib/module/modules/next/language-switcher/index.js +5 -0
  106. package/lib/module/modules/next/language-switcher/index.js.map +1 -0
  107. package/lib/module/modules/next/measurement/index.js +5 -0
  108. package/lib/module/modules/next/measurement/index.js.map +1 -0
  109. package/lib/module/modules/next/observation-detail/index.js +5 -0
  110. package/lib/module/modules/next/observation-detail/index.js.map +1 -0
  111. package/lib/module/modules/next/patient/index.js +5 -0
  112. package/lib/module/modules/next/patient/index.js.map +1 -0
  113. package/lib/module/modules/next/pdf/index.js +5 -0
  114. package/lib/module/modules/next/pdf/index.js.map +1 -0
  115. package/lib/module/modules/next/picker-sheet/index.js +5 -0
  116. package/lib/module/modules/next/picker-sheet/index.js.map +1 -0
  117. package/lib/module/modules/next/progress-bar/index.js +5 -0
  118. package/lib/module/modules/next/progress-bar/index.js.map +1 -0
  119. package/lib/module/modules/next/progress-ring/index.js +5 -0
  120. package/lib/module/modules/next/progress-ring/index.js.map +1 -0
  121. package/lib/module/modules/next/setting/index.js +5 -0
  122. package/lib/module/modules/next/setting/index.js.map +1 -0
  123. package/lib/module/modules/next/tab/index.js +5 -0
  124. package/lib/module/modules/next/tab/index.js.map +1 -0
  125. package/lib/module/modules/next/theme/index.js +5 -0
  126. package/lib/module/modules/next/theme/index.js.map +1 -0
  127. package/lib/module/modules/next/tile/index.js +5 -0
  128. package/lib/module/modules/next/tile/index.js.map +1 -0
  129. package/lib/module/modules/next/ui/index.js +5 -0
  130. package/lib/module/modules/next/ui/index.js.map +1 -0
  131. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-link.d.ts +1 -1
  132. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-link.d.ts.map +1 -1
  133. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts +8 -0
  134. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts.map +1 -0
  135. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts +3 -7
  136. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts.map +1 -1
  137. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/ovok-sink.d.ts +2 -2
  138. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/ovok-sink.d.ts.map +1 -1
  139. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts +23 -0
  140. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts.map +1 -0
  141. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts +41 -0
  142. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts.map +1 -0
  143. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-device.d.ts +53 -0
  144. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-device.d.ts.map +1 -0
  145. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-shapes.d.ts +27 -0
  146. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-shapes.d.ts.map +1 -0
  147. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts +8 -0
  148. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts.map +1 -0
  149. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts +29 -0
  150. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts.map +1 -0
  151. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts +10 -0
  152. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts.map +1 -0
  153. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts +9 -0
  154. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts.map +1 -0
  155. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts +56 -0
  156. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts.map +1 -0
  157. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-gatt.d.ts +27 -0
  158. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-gatt.d.ts.map +1 -0
  159. package/lib/typescript/commonjs/src/modules/next/breathing-exercise/index.d.ts +3 -0
  160. package/lib/typescript/commonjs/src/modules/next/breathing-exercise/index.d.ts.map +1 -0
  161. package/lib/typescript/commonjs/src/modules/next/cms/index.d.ts +3 -0
  162. package/lib/typescript/commonjs/src/modules/next/cms/index.d.ts.map +1 -0
  163. package/lib/typescript/commonjs/src/modules/next/content/index.d.ts +3 -0
  164. package/lib/typescript/commonjs/src/modules/next/content/index.d.ts.map +1 -0
  165. package/lib/typescript/commonjs/src/modules/next/diary/index.d.ts +3 -0
  166. package/lib/typescript/commonjs/src/modules/next/diary/index.d.ts.map +1 -0
  167. package/lib/typescript/commonjs/src/modules/next/image/index.d.ts +3 -0
  168. package/lib/typescript/commonjs/src/modules/next/image/index.d.ts.map +1 -0
  169. package/lib/typescript/commonjs/src/modules/next/journal/index.d.ts +3 -0
  170. package/lib/typescript/commonjs/src/modules/next/journal/index.d.ts.map +1 -0
  171. package/lib/typescript/commonjs/src/modules/next/language-switcher/index.d.ts +3 -0
  172. package/lib/typescript/commonjs/src/modules/next/language-switcher/index.d.ts.map +1 -0
  173. package/lib/typescript/commonjs/src/modules/next/measurement/index.d.ts +3 -0
  174. package/lib/typescript/commonjs/src/modules/next/measurement/index.d.ts.map +1 -0
  175. package/lib/typescript/commonjs/src/modules/next/observation-detail/index.d.ts +3 -0
  176. package/lib/typescript/commonjs/src/modules/next/observation-detail/index.d.ts.map +1 -0
  177. package/lib/typescript/commonjs/src/modules/next/patient/index.d.ts +3 -0
  178. package/lib/typescript/commonjs/src/modules/next/patient/index.d.ts.map +1 -0
  179. package/lib/typescript/commonjs/src/modules/next/pdf/index.d.ts +3 -0
  180. package/lib/typescript/commonjs/src/modules/next/pdf/index.d.ts.map +1 -0
  181. package/lib/typescript/commonjs/src/modules/next/picker-sheet/index.d.ts +3 -0
  182. package/lib/typescript/commonjs/src/modules/next/picker-sheet/index.d.ts.map +1 -0
  183. package/lib/typescript/commonjs/src/modules/next/progress-bar/index.d.ts +3 -0
  184. package/lib/typescript/commonjs/src/modules/next/progress-bar/index.d.ts.map +1 -0
  185. package/lib/typescript/commonjs/src/modules/next/progress-ring/index.d.ts +3 -0
  186. package/lib/typescript/commonjs/src/modules/next/progress-ring/index.d.ts.map +1 -0
  187. package/lib/typescript/commonjs/src/modules/next/setting/index.d.ts +3 -0
  188. package/lib/typescript/commonjs/src/modules/next/setting/index.d.ts.map +1 -0
  189. package/lib/typescript/commonjs/src/modules/next/tab/index.d.ts +3 -0
  190. package/lib/typescript/commonjs/src/modules/next/tab/index.d.ts.map +1 -0
  191. package/lib/typescript/commonjs/src/modules/next/theme/index.d.ts +3 -0
  192. package/lib/typescript/commonjs/src/modules/next/theme/index.d.ts.map +1 -0
  193. package/lib/typescript/commonjs/src/modules/next/tile/index.d.ts +3 -0
  194. package/lib/typescript/commonjs/src/modules/next/tile/index.d.ts.map +1 -0
  195. package/lib/typescript/commonjs/src/modules/next/ui/index.d.ts +3 -0
  196. package/lib/typescript/commonjs/src/modules/next/ui/index.d.ts.map +1 -0
  197. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-link.d.ts +1 -1
  198. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-link.d.ts.map +1 -1
  199. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts +8 -0
  200. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts.map +1 -0
  201. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts +3 -7
  202. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts.map +1 -1
  203. package/lib/typescript/module/src/modules/next/bluetooth/react-native/ovok-sink.d.ts +2 -2
  204. package/lib/typescript/module/src/modules/next/bluetooth/react-native/ovok-sink.d.ts.map +1 -1
  205. package/lib/typescript/module/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts +23 -0
  206. package/lib/typescript/module/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts.map +1 -0
  207. package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts +41 -0
  208. package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts.map +1 -0
  209. package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-device.d.ts +53 -0
  210. package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-device.d.ts.map +1 -0
  211. package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-shapes.d.ts +27 -0
  212. package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-shapes.d.ts.map +1 -0
  213. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts +8 -0
  214. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts.map +1 -0
  215. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts +29 -0
  216. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts.map +1 -0
  217. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts +10 -0
  218. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts.map +1 -0
  219. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts +9 -0
  220. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts.map +1 -0
  221. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts +56 -0
  222. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts.map +1 -0
  223. package/lib/typescript/module/src/modules/next/bluetooth/web/web-gatt.d.ts +27 -0
  224. package/lib/typescript/module/src/modules/next/bluetooth/web/web-gatt.d.ts.map +1 -0
  225. package/lib/typescript/module/src/modules/next/breathing-exercise/index.d.ts +3 -0
  226. package/lib/typescript/module/src/modules/next/breathing-exercise/index.d.ts.map +1 -0
  227. package/lib/typescript/module/src/modules/next/cms/index.d.ts +3 -0
  228. package/lib/typescript/module/src/modules/next/cms/index.d.ts.map +1 -0
  229. package/lib/typescript/module/src/modules/next/content/index.d.ts +3 -0
  230. package/lib/typescript/module/src/modules/next/content/index.d.ts.map +1 -0
  231. package/lib/typescript/module/src/modules/next/diary/index.d.ts +3 -0
  232. package/lib/typescript/module/src/modules/next/diary/index.d.ts.map +1 -0
  233. package/lib/typescript/module/src/modules/next/image/index.d.ts +3 -0
  234. package/lib/typescript/module/src/modules/next/image/index.d.ts.map +1 -0
  235. package/lib/typescript/module/src/modules/next/journal/index.d.ts +3 -0
  236. package/lib/typescript/module/src/modules/next/journal/index.d.ts.map +1 -0
  237. package/lib/typescript/module/src/modules/next/language-switcher/index.d.ts +3 -0
  238. package/lib/typescript/module/src/modules/next/language-switcher/index.d.ts.map +1 -0
  239. package/lib/typescript/module/src/modules/next/measurement/index.d.ts +3 -0
  240. package/lib/typescript/module/src/modules/next/measurement/index.d.ts.map +1 -0
  241. package/lib/typescript/module/src/modules/next/observation-detail/index.d.ts +3 -0
  242. package/lib/typescript/module/src/modules/next/observation-detail/index.d.ts.map +1 -0
  243. package/lib/typescript/module/src/modules/next/patient/index.d.ts +3 -0
  244. package/lib/typescript/module/src/modules/next/patient/index.d.ts.map +1 -0
  245. package/lib/typescript/module/src/modules/next/pdf/index.d.ts +3 -0
  246. package/lib/typescript/module/src/modules/next/pdf/index.d.ts.map +1 -0
  247. package/lib/typescript/module/src/modules/next/picker-sheet/index.d.ts +3 -0
  248. package/lib/typescript/module/src/modules/next/picker-sheet/index.d.ts.map +1 -0
  249. package/lib/typescript/module/src/modules/next/progress-bar/index.d.ts +3 -0
  250. package/lib/typescript/module/src/modules/next/progress-bar/index.d.ts.map +1 -0
  251. package/lib/typescript/module/src/modules/next/progress-ring/index.d.ts +3 -0
  252. package/lib/typescript/module/src/modules/next/progress-ring/index.d.ts.map +1 -0
  253. package/lib/typescript/module/src/modules/next/setting/index.d.ts +3 -0
  254. package/lib/typescript/module/src/modules/next/setting/index.d.ts.map +1 -0
  255. package/lib/typescript/module/src/modules/next/tab/index.d.ts +3 -0
  256. package/lib/typescript/module/src/modules/next/tab/index.d.ts.map +1 -0
  257. package/lib/typescript/module/src/modules/next/theme/index.d.ts +3 -0
  258. package/lib/typescript/module/src/modules/next/theme/index.d.ts.map +1 -0
  259. package/lib/typescript/module/src/modules/next/tile/index.d.ts +3 -0
  260. package/lib/typescript/module/src/modules/next/tile/index.d.ts.map +1 -0
  261. package/lib/typescript/module/src/modules/next/ui/index.d.ts +3 -0
  262. package/lib/typescript/module/src/modules/next/ui/index.d.ts.map +1 -0
  263. package/package.json +1 -1
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.blePeripheral = exports.bleDeviceOf = void 0;
7
+ var _bleLink = require("./ble-link.js");
8
+ const bleDevices = new WeakMap();
9
+
10
+ /** The `react-native-ble-plx` device behind a peripheral that `blePeripheral` made. */
11
+ const bleDeviceOf = peripheral => {
12
+ const device = bleDevices.get(peripheral);
13
+ if (!device) {
14
+ throw new Error("The peripheral was not made by blePeripheral");
15
+ }
16
+ return device;
17
+ };
18
+
19
+ /** A `react-native-ble-plx` device, or a device with the same API such as a Web Bluetooth one, as a peripheral. */
20
+ exports.bleDeviceOf = bleDeviceOf;
21
+ const blePeripheral = device => {
22
+ const peripheral = {
23
+ id: device.id,
24
+ advertisement: {
25
+ name: device.name?.trim() || device.localName?.trim() || "",
26
+ serviceUUIDs: device.serviceUUIDs ?? [],
27
+ manufacturerData: device.manufacturerData ?? null
28
+ },
29
+ openLink: signal => (0, _bleLink.openBleLink)(device, signal)
30
+ };
31
+ bleDevices.set(peripheral, device);
32
+ return peripheral;
33
+ };
34
+ exports.blePeripheral = blePeripheral;
35
+ //# sourceMappingURL=ble-peripheral.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_bleLink","require","bleDevices","WeakMap","bleDeviceOf","peripheral","device","get","Error","exports","blePeripheral","id","advertisement","name","trim","localName","serviceUUIDs","manufacturerData","openLink","signal","openBleLink","set"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/ble-peripheral.ts"],"mappings":";;;;;;AAIA,IAAAA,QAAA,GAAAC,OAAA;AAEA,MAAMC,UAAU,GAAG,IAAIC,OAAO,CAAqB,CAAC;;AAEpD;AACA,MAAMC,WAAW,GAAIC,UAAsB,IAAa;EACtD,MAAMC,MAAM,GAAGJ,UAAU,CAACK,GAAG,CAACF,UAAU,CAAC;EAEzC,IAAI,CAACC,MAAM,EAAE;IACX,MAAM,IAAIE,KAAK,CAAC,8CAA8C,CAAC;EACjE;EAEA,OAAOF,MAAM;AACf,CAAC;;AAED;AAAAG,OAAA,CAAAL,WAAA,GAAAA,WAAA;AACA,MAAMM,aAAa,GAAIJ,MAAc,IAAiB;EACpD,MAAMD,UAAsB,GAAG;IAC7BM,EAAE,EAAEL,MAAM,CAACK,EAAE;IACbC,aAAa,EAAE;MACbC,IAAI,EAAEP,MAAM,CAACO,IAAI,EAAEC,IAAI,CAAC,CAAC,IAAIR,MAAM,CAACS,SAAS,EAAED,IAAI,CAAC,CAAC,IAAI,EAAE;MAC3DE,YAAY,EAAEV,MAAM,CAACU,YAAY,IAAI,EAAE;MACvCC,gBAAgB,EAAEX,MAAM,CAACW,gBAAgB,IAAI;IAC/C,CAAC;IACDC,QAAQ,EAAGC,MAAM,IAAK,IAAAC,oBAAW,EAACd,MAAM,EAAEa,MAAM;EAClD,CAAC;EAEDjB,UAAU,CAACmB,GAAG,CAAChB,UAAU,EAAEC,MAAM,CAAC;EAElC,OAAOD,UAAU;AACnB,CAAC;AAACI,OAAA,CAAAC,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -3,45 +3,18 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.blePeripheral = exports.bleManagerScanner = exports.bleDeviceOf = void 0;
6
+ exports.bleManagerScanner = void 0;
7
7
  var _reactNativeBlePlx = require("react-native-ble-plx");
8
8
  var _bleErrors = require("./ble-errors.js");
9
- var _bleLink = require("./ble-link.js");
9
+ var _blePeripheral = require("./ble-peripheral.js");
10
10
  const ADAPTER_STATES = {
11
11
  [_reactNativeBlePlx.State.PoweredOn]: "on",
12
12
  [_reactNativeBlePlx.State.PoweredOff]: "off",
13
13
  [_reactNativeBlePlx.State.Unauthorized]: "unauthorized",
14
14
  [_reactNativeBlePlx.State.Unsupported]: "unsupported"
15
15
  };
16
- const bleDevices = new WeakMap();
17
-
18
- /** The `react-native-ble-plx` device behind a peripheral this adapter reported. */
19
- const bleDeviceOf = peripheral => {
20
- const device = bleDevices.get(peripheral);
21
- if (!device) {
22
- throw new Error("The peripheral was not found by bleManagerScanner");
23
- }
24
- return device;
25
- };
26
-
27
- /** A `react-native-ble-plx` device as a peripheral. */
28
- exports.bleDeviceOf = bleDeviceOf;
29
- const blePeripheral = device => {
30
- const peripheral = {
31
- id: device.id,
32
- advertisement: {
33
- name: device.name?.trim() || device.localName?.trim() || "",
34
- serviceUUIDs: device.serviceUUIDs ?? [],
35
- manufacturerData: device.manufacturerData ?? null
36
- },
37
- openLink: signal => (0, _bleLink.openBleLink)(device, signal)
38
- };
39
- bleDevices.set(peripheral, device);
40
- return peripheral;
41
- };
42
16
 
43
17
  /** A scanner over a `react-native-ble-plx` `BleManager`. */
44
- exports.blePeripheral = blePeripheral;
45
18
  const bleManagerScanner = bleManager => ({
46
19
  watchState: listener => {
47
20
  const subscription = bleManager.onStateChange(state => listener(ADAPTER_STATES[state] ?? "unknown"), true);
@@ -59,7 +32,7 @@ const bleManagerScanner = bleManager => ({
59
32
  if (error) {
60
33
  onError((0, _bleErrors.fromBleError)(error));
61
34
  } else if (device) {
62
- onFound(blePeripheral(device));
35
+ onFound((0, _blePeripheral.blePeripheral)(device));
63
36
  }
64
37
  });
65
38
  } catch (error) {
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeBlePlx","require","_bleErrors","_bleLink","ADAPTER_STATES","State","PoweredOn","PoweredOff","Unauthorized","Unsupported","bleDevices","WeakMap","bleDeviceOf","peripheral","device","get","Error","exports","blePeripheral","id","advertisement","name","trim","localName","serviceUUIDs","manufacturerData","openLink","signal","openBleLink","set","bleManagerScanner","bleManager","watchState","listener","subscription","onStateChange","state","remove","scan","onFound","onError","active","startDeviceScan","scanMode","ScanMode","Balanced","error","fromBleError","stopDeviceScan"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/ble-scanner.ts"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAIA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAEA,MAAMG,cAAoD,GAAG;EAC3D,CAACC,wBAAK,CAACC,SAAS,GAAG,IAAI;EACvB,CAACD,wBAAK,CAACE,UAAU,GAAG,KAAK;EACzB,CAACF,wBAAK,CAACG,YAAY,GAAG,cAAc;EACpC,CAACH,wBAAK,CAACI,WAAW,GAAG;AACvB,CAAC;AAED,MAAMC,UAAU,GAAG,IAAIC,OAAO,CAAqB,CAAC;;AAEpD;AACA,MAAMC,WAAW,GAAIC,UAAsB,IAAa;EACtD,MAAMC,MAAM,GAAGJ,UAAU,CAACK,GAAG,CAACF,UAAU,CAAC;EAEzC,IAAI,CAACC,MAAM,EAAE;IACX,MAAM,IAAIE,KAAK,CAAC,mDAAmD,CAAC;EACtE;EAEA,OAAOF,MAAM;AACf,CAAC;;AAED;AAAAG,OAAA,CAAAL,WAAA,GAAAA,WAAA;AACA,MAAMM,aAAa,GAAIJ,MAAc,IAAiB;EACpD,MAAMD,UAAsB,GAAG;IAC7BM,EAAE,EAAEL,MAAM,CAACK,EAAE;IACbC,aAAa,EAAE;MACbC,IAAI,EAAEP,MAAM,CAACO,IAAI,EAAEC,IAAI,CAAC,CAAC,IAAIR,MAAM,CAACS,SAAS,EAAED,IAAI,CAAC,CAAC,IAAI,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V,UAAU,CAACiB,cAAc,CAAC,CAAC;IAC7B,CAAC;EACH;AACF,CAAC,CAAC;AAAC/B,OAAA,CAAAa,iBAAA,GAAAA,iBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_reactNativeBlePlx","require","_bleErrors","_blePeripheral","ADAPTER_STATES","State","PoweredOn","PoweredOff","Unauthorized","Unsupported","bleManagerScanner","bleManager","watchState","listener","subscription","onStateChange","state","remove","scan","onFound","onError","active","startDeviceScan","scanMode","ScanMode","Balanced","error","device","fromBleError","blePeripheral","stopDeviceScan","exports"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/ble-scanner.ts"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAIA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAEA,MAAMG,cAAoD,GAAG;EAC3D,CAACC,wBAAK,CAACC,SAAS,GAAG,IAAI;EACvB,CAACD,wBAAK,CAACE,UAAU,GAAG,KAAK;EACzB,CAACF,wBAAK,CAACG,YAAY,GAAG,cAAc;EACpC,CAACH,wBAAK,CAACI,WAAW,GAAG;AACvB,CAAC;;AAED;AACA,MAAMC,iBAAiB,GAAIC,UAAsB,KAAwB;EACvEC,UAAU,EAAGC,QAAQ,IAAK;IACxB,MAAMC,YAAY,GAAGH,UAAU,CAACI,aAAa,CAAEC,KAAK,IAAKH,QAAQ,CAACT,cAAc,CAACY,KAAK,CAAC,IAAI,SAAS,CAAC,EAAE,IAAI,CAAC;IAE5G,OAAO,MAAMF,YAAY,CAACG,MAAM,CAAC,CAAC;EACpC,CAAC;EACDC,IAAI,EAAEA,CAACC,OAAO,EAAEC,OAAO,KAAK;IAC1B,IAAIC,MAAM,GAAG,IAAI;IAEjB,IAAI;MACFV,UAAU,CAACW,eAAe,CAAC,IAAI,EAAE;QAAEC,QAAQ,EAAEC,2BAAQ,CAACC;MAAS,CAAC,EAAE,CAACC,KAAK,EAAEC,MAAM,KAAK;QACnF,IAAI,CAACN,MAAM,EAAE;UACX;QACF;QACA,IAAIK,KAAK,EAAE;UACTN,OAAO,CAAC,IAAAQ,uBAAY,EAACF,KAAK,CAAC,CAAC;QAC9B,CAAC,MAAM,IAAIC,MAAM,EAAE;UACjBR,OAAO,CAAC,IAAAU,4BAAa,EAACF,MAAM,CAAC,CAAC;QAChC;MACF,CAAC,CAAC;IACJ,CAAC,CAAC,OAAOD,KAAK,EAAE;MACdN,OAAO,CAAC,IAAAQ,uBAAY,EAACF,KAAK,CAAC,CAAC;IAC9B;IAEA,OAAO,MAAM;MACXL,MAAM,GAAG,KAAK;MACdV,UAAU,CAACmB,cAAc,CAAC,CAAC;IAC7B,CAAC;EACH;AACF,CAAC,CAAC;AAACC,OAAA,CAAArB,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -8,7 +8,7 @@ var _deviceStatus = require("../../../bt-management/types/device-status.js");
8
8
  var _channel = require("../channel.js");
9
9
  var _driver = require("../driver.js");
10
10
  var _bleErrors = require("./ble-errors.js");
11
- var _bleScanner = require("./ble-scanner.js");
11
+ var _blePeripheral = require("./ble-peripheral.js");
12
12
  const STATUSES = {
13
13
  [_deviceStatus.DeviceStatus.CONNECTED]: "connected",
14
14
  [_deviceStatus.DeviceStatus.MEASURING]: "measuring",
@@ -23,7 +23,7 @@ const legacyDriver = (creator, deviceName) => (peripheral, signal) => {
23
23
  void managed.disconnect();
24
24
  });
25
25
  const managed = creator.createDevice({
26
- device: (0, _bleScanner.bleDeviceOf)(peripheral),
26
+ device: (0, _blePeripheral.bleDeviceOf)(peripheral),
27
27
  deviceName,
28
28
  onResult: ({
29
29
  id,
@@ -1 +1 @@
1
- {"version":3,"names":["_deviceStatus","require","_channel","_driver","_bleErrors","_bleScanner","STATUSES","DeviceStatus","CONNECTED","MEASURING","DISCONNECTED","legacyDriver","creator","deviceName","peripheral","signal","stop","events","end","Channel","removeEventListener","managed","disconnect","createDevice","device","bleDeviceOf","onResult","id","data","reading","push","kind","isTimestamped","onDeviceStatusChanged","status","mapped","onError","error","fromBleError","addEventListener","once","connect","catch","fail","exports"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/legacy-driver.ts"],"mappings":";;;;;;AAKA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAEA,MAAMK,QAAmF,GAAG;EAC1F,CAACC,0BAAY,CAACC,SAAS,GAAG,WAAW;EACrC,CAACD,0BAAY,CAACE,SAAS,GAAG,WAAW;EACrC,CAACF,0BAAY,CAACG,YAAY,GAAG;AAC/B,CAAC;;AAED;AACA,MAAMC,YAAY,GAAGA,CAACC,OAAiD,EAAEC,UAAqB,KAC5F,CAACC,UAAU,EAAEC,MAAM,KAAK;EACtB,MAAMC,IAAI,GAAGA,CAAA,KAAMC,MAAM,CAACC,GAAG,CAAC,CAAC;EAE/B,MAAMD,MAAM,GAAG,IAAIE,gBAAO,CAAc,MAAM;IAC5CJ,MAAM,CAACK,mBAAmB,CAAC,OAAO,EAAEJ,IAAI,CAAC;IACzC,KAAKK,OAAO,CAACC,UAAU,CAAC,CAAC;EAC3B,CAAC,CAAC;EAEF,MAAMD,OAAO,GAAGT,OAAO,CAACW,YAAY,CAAC;IACnCC,MAAM,EAAE,IAAAC,uBAAW,EAACX,UAAU,CAAC;IAC/BD,UAAU;IACVa,QAAQ,EAAEA,CAAC;MAAEC,EAAE;MAAEC;IAAK,CAAC,KAAK;MAC1B,MAAMC,OAAO,GAAGD,IAAmB;MAEnCX,MAAM,CAACa,IAAI,CAAC;QAAEC,IAAI,EAAE,SAAS;QAAEJ,EAAE,EAAE,IAAAK,qBAAa,EAACH,OAAO,CAAC,GAAGF,EAAE,GAAG,IAAI;QAAEE;MAAQ,CAAC,CAAC;IACnF,CAAC;IACDI,qBAAqB,EAAEA,CAAC;MAAEC;IAAO,CAAC,KAAK;MACrC,MAAMC,MAAM,GAAG7B,QAAQ,CAAC4B,MAAM,CAAC;MAE/B,IAAIC,MAAM,EAAE;QACVlB,MAAM,CAACa,IAAI,CAAC;UAAEC,IAAI,EAAE,QAAQ;UAAEG,MAAM,EAAEC;QAAO,CAAC,CAAC;MACjD;MACA,IAAID,MAAM,KAAK3B,0BAAY,CAACG,YAAY,EAAE;QACxCO,MAAM,CAACC,GAAG,CAAC,CAAC;MACd;IACF,CAAC;IACDkB,OAAO,EAAEA,CAAC;MAAEC;IAAM,CAAC,KAAKpB,MAAM,CAACa,IAAI,CAAC;MAAEC,IAAI,EAAE,OAAO;MAAEM,KAAK,EAAE,IAAAC,uBAAY,EAACD,KAAK;IAAE,CAAC;EACnF,CAAC,CAAC;EAEFtB,MAAM,CAACwB,gBAAgB,CAAC,OAAO,EAAEvB,IAAI,EAAE;IAAEwB,IAAI,EAAE;EAAK,CAAC,CAAC;EACtDnB,OAAO,CAACoB,OAAO,CAAC,CAAC,CAACC,KAAK,CAAEL,KAAc,IAAKpB,MAAM,CAAC0B,IAAI,CAAC,IAAAL,uBAAY,EAACD,KAAK,CAAC,CAAC,CAAC;EAE7E,OAAOpB,MAAM;AACf,CAAC;AAAC2B,OAAA,CAAAjC,YAAA,GAAAA,YAAA","ignoreList":[]}
1
+ {"version":3,"names":["_deviceStatus","require","_channel","_driver","_bleErrors","_blePeripheral","STATUSES","DeviceStatus","CONNECTED","MEASURING","DISCONNECTED","legacyDriver","creator","deviceName","peripheral","signal","stop","events","end","Channel","removeEventListener","managed","disconnect","createDevice","device","bleDeviceOf","onResult","id","data","reading","push","kind","isTimestamped","onDeviceStatusChanged","status","mapped","onError","error","fromBleError","addEventListener","once","connect","catch","fail","exports"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/legacy-driver.ts"],"mappings":";;;;;;AAKA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,OA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AAM,KAAK3B,0BAAY,CAACG,YAAY,EAAE;QACxCO,MAAM,CAACC,GAAG,CAAC,CAAC;MACd;IACF,CAAC;IACDkB,OAAO,EAAEA,CAAC;MAAEC;IAAM,CAAC,KAAKpB,MAAM,CAACa,IAAI,CAAC;MAAEC,IAAI,EAAE,OAAO;MAAEM,KAAK,EAAE,IAAAC,uBAAY,EAACD,KAAK;IAAE,CAAC;EACnF,CAAC,CAAC;EAEFtB,MAAM,CAACwB,gBAAgB,CAAC,OAAO,EAAEvB,IAAI,EAAE;IAAEwB,IAAI,EAAE;EAAK,CAAC,CAAC;EACtDnB,OAAO,CAACoB,OAAO,CAAC,CAAC,CAACC,KAAK,CAAEL,KAAc,IAAKpB,MAAM,CAAC0B,IAAI,CAAC,IAAAL,uBAAY,EAACD,KAAK,CAAC,CAAC,CAAC;EAE7E,OAAOpB,MAAM;AACf,CAAC;AAAC2B,OAAA,CAAAjC,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["recordedAtOf","measurement","recordedAt","Date","Number","isNaN","getTime","undefined","ovokReadingSink","client","save","id","device","result","measurements","sourceId","effectiveDateTime","name","key","localName","manufacturerData","manufacturerName","information","model","sn","serialNumber","status","flushQueued","Object","keys","offlineQueue","flush","responses","exports"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/react-native/ovok-sink.ts"],"mappings":";;;;;;AAIA;AACA,MAAMA,YAAY,GAAIC,WAAmB,IAAuB;EAC9D,MAAM;IAAEC;EAAW,CAAC,GAAGD,WAAuC;EAE9D,OAAOC,UAAU,YAAYC,IAAI,IAAI,CAACC,MAAM,CAACC,KAAK,CAACH,UAAU,CAACI,OAAO,CAAC,CAAC,CAAC,GAAGJ,UAAU,GAAGK,SAAS;AACnG,CAAC;;AAED;AACA,MAAMC,eAAe,GAAIC,MAAY,KAAmB;EACtDC,IAAI,EAAE,MAAAA,CAAO;IAAEC,EAAE;IAAEC,MAAM;IAAEX;EAAY,CAAC,KAAK;IAC3C,MAAMY,MAAM,GAAG,MAAMJ,MAAM,CAACK,YAAY,CAACJ,IAAI,CAAC;MAC5CT,WAAW;MACXc,QAAQ,EAAEJ,EAAE;MACZK,iBAAiB,EAAEhB,YAAY,CAACC,WAAW,CAAC;MAC5CW,MAAM,EAAE;QACND,EAAE,EAAEC,MAAM,CAACD,EAAE;QACbM,IAAI,EAAEL,MAAM,CAACM,GAAG;QAChBC,SAAS,EAAEP,MAAM,CAACK,IAAI;QACtBG,gBAAgB,EAAE,EAAE;QACpBC,gBAAgB,EAAET,MAAM,CAACU,WAAW,EAAED,gBAAgB;QACtDE,KAAK,EAAEX,MAAM,CAACU,WAAW,EAAEC,KAAK;QAChCC,EAAE,EAAEZ,MAAM,CAACU,WAAW,EAAEG,YAAY,IAAI;MAC1C;IACF,CAAC,CAAC;IAEF,OAAOZ,MAAM,CAACa,MAAM,KAAK,OAAO,GAAG;MAAEA,MAAM,EAAE;IAAQ,CAAC,GAAGb,MAAM;EACjE,CAAC;EACDc,WAAW,EAAE,MAAAA,CAAA,KAAYC,MAAM,CAACC,IAAI,CAAC,CAAC,MAAMpB,MAAM,CAACK,YAAY,CAACgB,YAAY,CAACC,KAAK,CAAC,CAAC,EAAEC,SAAS;AACjG,CAAC,CAAC;AAACC,OAAA,CAAAzB,eAAA,GAAAA,eAAA","ignoreList":[]}
1
+ {"version":3,"names":["recordedAtOf","measurement","recordedAt","Date","Number","isNaN","getTime","undefined","ovokReadingSink","client","save","id","device","result","measurements","sourceId","effectiveDateTime","name","key","localName","manufacturerData","manufacturerName","information","model","sn","serialNumber","status","flushQueued","Object","keys","offlineQueue","flush","responses","exports"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/react-native/ovok-sink.ts"],"mappings":";;;;;;AAIA;AACA,MAAMA,YAAY,GAAIC,WAAmB,IAAuB;EAC9D,MAAM;IAAEC;EAAW,CAAC,GAAGD,WAAuC;EAE9D,OAAOC,UAAU,YAAYC,IAAI,IAAI,CAACC,MAAM,CAACC,KAAK,CAACH,UAAU,CAACI,OAAO,CAAC,CAAC,CAAC,GAAGJ,UAAU,GAAGK,SAAS;AACnG,CAAC;;AAED;AACA,MAAMC,eAAe,GAAIC,MAAkC,KAAmB;EAC5EC,IAAI,EAAE,MAAAA,CAAO;IAAEC,EAAE;IAAEC,MAAM;IAAEX;EAAY,CAAC,KAAK;IAC3C,MAAMY,MAAM,GAAG,MAAMJ,MAAM,CAACK,YAAY,CAACJ,IAAI,CAAC;MAC5CT,WAAW;MACXc,QAAQ,EAAEJ,EAAE;MACZK,iBAAiB,EAAEhB,YAAY,CAACC,WAAW,CAAC;MAC5CW,MAAM,EAAE;QACND,EAAE,EAAEC,MAAM,CAACD,EAAE;QACbM,IAAI,EAAEL,MAAM,CAACM,GAAG;QAChBC,SAAS,EAAEP,MAAM,CAACK,IAAI;QACtBG,gBAAgB,EAAE,EAAE;QACpBC,gBAAgB,EAAET,MAAM,CAACU,WAAW,EAAED,gBAAgB;QACtDE,KAAK,EAAEX,MAAM,CAACU,WAAW,EAAEC,KAAK;QAChCC,EAAE,EAAEZ,MAAM,CAACU,WAAW,EAAEG,YAAY,IAAI;MAC1C;IACF,CAAC,CAAC;IAEF,OAAOZ,MAAM,CAACa,MAAM,KAAK,OAAO,GAAG;MAAEA,MAAM,EAAE;IAAQ,CAAC,GAAGb,MAAM;EACjE,CAAC;EACDc,WAAW,EAAE,MAAAA,CAAA,KAAYC,MAAM,CAACC,IAAI,CAAC,CAAC,MAAMpB,MAAM,CAACK,YAAY,CAACgB,YAAY,CAACC,KAAK,CAAC,CAAC,EAAEC,SAAS;AACjG,CAAC,CAAC;AAACC,OAAA,CAAAzB,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createWebBluetoothRuntime = void 0;
7
+ var _ovokSink = require("../react-native/ovok-sink.js");
8
+ var _runtime = require("../runtime.js");
9
+ var _webBluetoothPermissions = require("./web-bluetooth-permissions.js");
10
+ /** What `createWebBluetoothRuntime` needs. */
11
+
12
+ /** A `BluetoothRuntime` wired for browsers: Web Bluetooth through `scanner`, saving through `client`. */
13
+ const createWebBluetoothRuntime = ({
14
+ client,
15
+ scanner,
16
+ devices,
17
+ resultPolicy,
18
+ pairedStorage
19
+ }) => new _runtime.BluetoothRuntime({
20
+ scanner,
21
+ permissions: (0, _webBluetoothPermissions.webBluetoothPermissions)(),
22
+ sink: (0, _ovokSink.ovokReadingSink)(client),
23
+ devices,
24
+ resultPolicy,
25
+ pairedStorage
26
+ });
27
+ exports.createWebBluetoothRuntime = createWebBluetoothRuntime;
28
+ //# sourceMappingURL=create-web-bluetooth-runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_ovokSink","require","_runtime","_webBluetoothPermissions","createWebBluetoothRuntime","client","scanner","devices","resultPolicy","pairedStorage","BluetoothRuntime","permissions","webBluetoothPermissions","sink","ovokReadingSink","exports"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/web/create-web-bluetooth-runtime.ts"],"mappings":";;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAEA,IAAAE,wBAAA,GAAAF,OAAA;AAGA;;AAmBA;AACA,MAAMG,yBAAyB,GAAGA,CAAC;EACjCC,MAAM;EACNC,OAAO;EACPC,OAAO;EACPC,YAAY;EACZC;AACgC,CAAC,KACjC,IAAIC,yBAAgB,CAAC;EACnBJ,OAAO;EACPK,WAAW,EAAE,IAAAC,gDAAuB,EAAC,CAAC;EACtCC,IAAI,EAAE,IAAAC,yBAAe,EAACT,MAAM,CAAC;EAC7BE,OAAO;EACPC,YAAY;EACZC;AACF,CAAC,CAAC;AAACM,OAAA,CAAAX,yBAAA,GAAAA,yBAAA","ignoreList":[]}
@@ -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,C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C,CAAC;MAExF,OAAO,IAAAT,iCAAmB,EAAC,IAAI,CAAChC,EAAE,EAAE,IAAAiC,iCAAa,EAACJ,WAAW,CAAC,EAAEE,cAAc,EAAEU,MAAM,CAAC;IACzF,CAAC,CAAC;EACJ;AACF;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":[]}