@ovok/native 1.16.1-dev.2141 → 1.16.1-dev.2145

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 (127) hide show
  1. package/lib/commonjs/modules/next/background-sync/index.js +11 -0
  2. package/lib/commonjs/modules/next/background-sync/index.js.map +1 -1
  3. package/lib/commonjs/modules/next/background-sync/offline-measurement-background-sync.js +63 -0
  4. package/lib/commonjs/modules/next/background-sync/offline-measurement-background-sync.js.map +1 -0
  5. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-peripheral.js +35 -0
  6. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-peripheral.js.map +1 -0
  7. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-scanner.js +3 -30
  8. package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-scanner.js.map +1 -1
  9. package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js +2 -2
  10. package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -1
  11. package/lib/commonjs/modules/next/bluetooth/react-native/ovok-sink.js.map +1 -1
  12. package/lib/commonjs/modules/next/bluetooth/web/create-web-bluetooth-runtime.js +28 -0
  13. package/lib/commonjs/modules/next/bluetooth/web/create-web-bluetooth-runtime.js.map +1 -0
  14. package/lib/commonjs/modules/next/bluetooth/web/index.js +208 -0
  15. package/lib/commonjs/modules/next/bluetooth/web/index.js.map +1 -0
  16. package/lib/commonjs/modules/next/bluetooth/web/web-ble-device.js +143 -0
  17. package/lib/commonjs/modules/next/bluetooth/web/web-ble-device.js.map +1 -0
  18. package/lib/commonjs/modules/next/bluetooth/web/web-ble-shapes.js +43 -0
  19. package/lib/commonjs/modules/next/bluetooth/web/web-ble-shapes.js.map +1 -0
  20. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-permissions.js +21 -0
  21. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-permissions.js.map +1 -0
  22. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-scanner.js +133 -0
  23. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-scanner.js.map +1 -0
  24. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-services.js +28 -0
  25. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-services.js.map +1 -0
  26. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-values.js +37 -0
  27. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-values.js.map +1 -0
  28. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth.types.js +2 -0
  29. package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth.types.js.map +1 -0
  30. package/lib/commonjs/modules/next/bluetooth/web/web-gatt.js +83 -0
  31. package/lib/commonjs/modules/next/bluetooth/web/web-gatt.js.map +1 -0
  32. package/lib/module/modules/next/background-sync/index.js +1 -0
  33. package/lib/module/modules/next/background-sync/index.js.map +1 -1
  34. package/lib/module/modules/next/background-sync/offline-measurement-background-sync.js +55 -0
  35. package/lib/module/modules/next/background-sync/offline-measurement-background-sync.js.map +1 -0
  36. package/lib/module/modules/next/bluetooth/ble-plx/ble-peripheral.js +30 -0
  37. package/lib/module/modules/next/bluetooth/ble-plx/ble-peripheral.js.map +1 -0
  38. package/lib/module/modules/next/bluetooth/ble-plx/ble-scanner.js +2 -27
  39. package/lib/module/modules/next/bluetooth/ble-plx/ble-scanner.js.map +1 -1
  40. package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js +1 -1
  41. package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -1
  42. package/lib/module/modules/next/bluetooth/react-native/ovok-sink.js.map +1 -1
  43. package/lib/module/modules/next/bluetooth/web/create-web-bluetooth-runtime.js +25 -0
  44. package/lib/module/modules/next/bluetooth/web/create-web-bluetooth-runtime.js.map +1 -0
  45. package/lib/module/modules/next/bluetooth/web/index.js +28 -0
  46. package/lib/module/modules/next/bluetooth/web/index.js.map +1 -0
  47. package/lib/module/modules/next/bluetooth/web/web-ble-device.js +140 -0
  48. package/lib/module/modules/next/bluetooth/web/web-ble-device.js.map +1 -0
  49. package/lib/module/modules/next/bluetooth/web/web-ble-shapes.js +39 -0
  50. package/lib/module/modules/next/bluetooth/web/web-ble-shapes.js.map +1 -0
  51. package/lib/module/modules/next/bluetooth/web/web-bluetooth-permissions.js +18 -0
  52. package/lib/module/modules/next/bluetooth/web/web-bluetooth-permissions.js.map +1 -0
  53. package/lib/module/modules/next/bluetooth/web/web-bluetooth-scanner.js +128 -0
  54. package/lib/module/modules/next/bluetooth/web/web-bluetooth-scanner.js.map +1 -0
  55. package/lib/module/modules/next/bluetooth/web/web-bluetooth-services.js +25 -0
  56. package/lib/module/modules/next/bluetooth/web/web-bluetooth-services.js.map +1 -0
  57. package/lib/module/modules/next/bluetooth/web/web-bluetooth-values.js +29 -0
  58. package/lib/module/modules/next/bluetooth/web/web-bluetooth-values.js.map +1 -0
  59. package/lib/module/modules/next/bluetooth/web/web-bluetooth.types.js +2 -0
  60. package/lib/module/modules/next/bluetooth/web/web-bluetooth.types.js.map +1 -0
  61. package/lib/module/modules/next/bluetooth/web/web-gatt.js +79 -0
  62. package/lib/module/modules/next/bluetooth/web/web-gatt.js.map +1 -0
  63. package/lib/typescript/commonjs/src/modules/next/background-sync/index.d.ts +1 -0
  64. package/lib/typescript/commonjs/src/modules/next/background-sync/index.d.ts.map +1 -1
  65. package/lib/typescript/commonjs/src/modules/next/background-sync/offline-measurement-background-sync.d.ts +22 -0
  66. package/lib/typescript/commonjs/src/modules/next/background-sync/offline-measurement-background-sync.d.ts.map +1 -0
  67. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-link.d.ts +1 -1
  68. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-link.d.ts.map +1 -1
  69. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts +8 -0
  70. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts.map +1 -0
  71. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts +3 -7
  72. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts.map +1 -1
  73. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/ovok-sink.d.ts +2 -2
  74. package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/ovok-sink.d.ts.map +1 -1
  75. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts +23 -0
  76. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts.map +1 -0
  77. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts +41 -0
  78. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts.map +1 -0
  79. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-device.d.ts +53 -0
  80. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-device.d.ts.map +1 -0
  81. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-shapes.d.ts +27 -0
  82. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-shapes.d.ts.map +1 -0
  83. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts +8 -0
  84. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts.map +1 -0
  85. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts +29 -0
  86. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts.map +1 -0
  87. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts +10 -0
  88. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts.map +1 -0
  89. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts +9 -0
  90. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts.map +1 -0
  91. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts +56 -0
  92. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts.map +1 -0
  93. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-gatt.d.ts +27 -0
  94. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-gatt.d.ts.map +1 -0
  95. package/lib/typescript/module/src/modules/next/background-sync/index.d.ts +1 -0
  96. package/lib/typescript/module/src/modules/next/background-sync/index.d.ts.map +1 -1
  97. package/lib/typescript/module/src/modules/next/background-sync/offline-measurement-background-sync.d.ts +22 -0
  98. package/lib/typescript/module/src/modules/next/background-sync/offline-measurement-background-sync.d.ts.map +1 -0
  99. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-link.d.ts +1 -1
  100. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-link.d.ts.map +1 -1
  101. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts +8 -0
  102. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts.map +1 -0
  103. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts +3 -7
  104. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts.map +1 -1
  105. package/lib/typescript/module/src/modules/next/bluetooth/react-native/ovok-sink.d.ts +2 -2
  106. package/lib/typescript/module/src/modules/next/bluetooth/react-native/ovok-sink.d.ts.map +1 -1
  107. package/lib/typescript/module/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts +23 -0
  108. package/lib/typescript/module/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts.map +1 -0
  109. package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts +41 -0
  110. package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts.map +1 -0
  111. package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-device.d.ts +53 -0
  112. package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-device.d.ts.map +1 -0
  113. package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-shapes.d.ts +27 -0
  114. package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-shapes.d.ts.map +1 -0
  115. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts +8 -0
  116. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts.map +1 -0
  117. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts +29 -0
  118. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts.map +1 -0
  119. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts +10 -0
  120. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts.map +1 -0
  121. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts +9 -0
  122. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts.map +1 -0
  123. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts +56 -0
  124. package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts.map +1 -0
  125. package/lib/typescript/module/src/modules/next/bluetooth/web/web-gatt.d.ts +27 -0
  126. package/lib/typescript/module/src/modules/next/bluetooth/web/web-gatt.d.ts.map +1 -0
  127. package/package.json +11 -1
@@ -0,0 +1,22 @@
1
+ import type { Ovok } from "../ovok";
2
+ /** Core client surface used by the background queue flush. */
3
+ type OfflineMeasurementBackgroundSyncClient = Pick<Ovok, "measurements">;
4
+ /** Options for recurring offline measurement sync. */
5
+ type OfflineMeasurementBackgroundSyncOptions = {
6
+ /** Minimum repeat interval in minutes (15 or higher); defaults to 15. */
7
+ minimumIntervalMinutes?: number;
8
+ };
9
+ /** Flushes the Core offline measurement queue for a restored client. */
10
+ declare const runOfflineMeasurementBackgroundSync: (client: OfflineMeasurementBackgroundSyncClient) => Promise<import("@ovok/core/next").OfflineMeasurementFlushResult>;
11
+ /**
12
+ * Defines the task at app entry-point load so it exists after process restart.
13
+ * The callback must restore the app-owned client and its secure session.
14
+ */
15
+ declare const registerOfflineMeasurementBackgroundTask: (restoreClient: () => Promise<OfflineMeasurementBackgroundSyncClient>) => void;
16
+ /** Schedules recurring offline measurement sync through WorkManager or BGTaskScheduler. */
17
+ declare const scheduleOfflineMeasurementBackgroundSync: (options?: OfflineMeasurementBackgroundSyncOptions) => Promise<void>;
18
+ /** Cancels recurring offline measurement sync. */
19
+ declare const cancelOfflineMeasurementBackgroundSync: () => Promise<void>;
20
+ export { cancelOfflineMeasurementBackgroundSync, registerOfflineMeasurementBackgroundTask, runOfflineMeasurementBackgroundSync, scheduleOfflineMeasurementBackgroundSync, };
21
+ export type { OfflineMeasurementBackgroundSyncClient, OfflineMeasurementBackgroundSyncOptions, };
22
+ //# sourceMappingURL=offline-measurement-background-sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offline-measurement-background-sync.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/background-sync/offline-measurement-background-sync.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AASpC,8DAA8D;AAC9D,KAAK,sCAAsC,GAAG,IAAI,CAChD,IAAI,EACJ,cAAc,CACf,CAAC;AAEF,sDAAsD;AACtD,KAAK,uCAAuC,GAAG;IAE7C,yEAAyE;IACzE,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF,wEAAwE;AACxE,QAAA,MAAM,mCAAmC,GACvC,QAAQ,sCAAsC,qEACH,CAAC;AAE9C;;;GAGG;AACH,QAAA,MAAM,wCAAwC,GAC5C,eAAe,MAAM,OAAO,CAAC,sCAAsC,CAAC,KACnE,IAuBF,CAAC;AAEF,2FAA2F;AAC3F,QAAA,MAAM,wCAAwC,GAC5C,UAAS,uCAA4C,KACpD,OAAO,CAAC,IAAI,CAuBd,CAAC;AAEF,kDAAkD;AAClD,QAAA,MAAM,sCAAsC,QAAO,OAAO,CAAC,IAAI,CAG5D,CAAC;AAEJ,OAAO,EACL,sCAAsC,EACtC,wCAAwC,EACxC,mCAAmC,EACnC,wCAAwC,GACzC,CAAC;AACF,YAAY,EACV,sCAAsC,EACtC,uCAAuC,GACxC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Device } from "react-native-ble-plx";
1
+ import type { Device } from "react-native-ble-plx";
2
2
  import { Link } from "../link";
3
3
  /** Connects (retrying with backoff), discovers services and reads Device Information; aborting `signal` closes the link. */
4
4
  declare function openBleLink(device: Device, signal: AbortSignal): Promise<Link>;
@@ -1 +1 @@
1
- {"version":3,"file":"ble-link.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/ble-plx/ble-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,MAAM,EAAgB,MAAM,sBAAsB,CAAC;AAOtE,OAAO,EAAqB,IAAI,EAAE,MAAM,SAAS,CAAC;AAyJlD,4HAA4H;AAC5H,iBAAe,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB7E;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"ble-link.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/ble-plx/ble-link.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,MAAM,EAAgB,MAAM,sBAAsB,CAAC;AAO3E,OAAO,EAAqB,IAAI,EAAE,MAAM,SAAS,CAAC;AAyJlD,4HAA4H;AAC5H,iBAAe,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB7E;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Device } from "react-native-ble-plx";
2
+ import { Peripheral } from "../transport";
3
+ /** The `react-native-ble-plx` device behind a peripheral that `blePeripheral` made. */
4
+ declare const bleDeviceOf: (peripheral: Peripheral) => Device;
5
+ /** A `react-native-ble-plx` device, or a device with the same API such as a Web Bluetooth one, as a peripheral. */
6
+ declare const blePeripheral: (device: Device) => Peripheral;
7
+ export { bleDeviceOf, blePeripheral };
8
+ //# sourceMappingURL=ble-peripheral.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ble-peripheral.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/ble-plx/ble-peripheral.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,uFAAuF;AACvF,QAAA,MAAM,WAAW,GAAI,YAAY,UAAU,KAAG,MAQ7C,CAAC;AAEF,mHAAmH;AACnH,QAAA,MAAM,aAAa,GAAI,QAAQ,MAAM,KAAG,UAcvC,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC"}
@@ -1,10 +1,6 @@
1
- import { BleManager, Device } from "react-native-ble-plx";
2
- import { BluetoothScanner, Peripheral } from "../transport";
3
- /** The `react-native-ble-plx` device behind a peripheral this adapter reported. */
4
- declare const bleDeviceOf: (peripheral: Peripheral) => Device;
5
- /** A `react-native-ble-plx` device as a peripheral. */
6
- declare const blePeripheral: (device: Device) => Peripheral;
1
+ import { BleManager } from "react-native-ble-plx";
2
+ import { BluetoothScanner } from "../transport";
7
3
  /** A scanner over a `react-native-ble-plx` `BleManager`. */
8
4
  declare const bleManagerScanner: (bleManager: BleManager) => BluetoothScanner;
9
- export { bleDeviceOf, bleManagerScanner, blePeripheral };
5
+ export { bleManagerScanner };
10
6
  //# sourceMappingURL=ble-scanner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ble-scanner.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/ble-plx/ble-scanner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAmB,MAAM,sBAAsB,CAAC;AAE3E,OAAO,EAAgB,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAc1E,mFAAmF;AACnF,QAAA,MAAM,WAAW,GAAI,YAAY,UAAU,KAAG,MAQ7C,CAAC;AAEF,uDAAuD;AACvD,QAAA,MAAM,aAAa,GAAI,QAAQ,MAAM,KAAG,UAcvC,CAAC;AAEF,4DAA4D;AAC5D,QAAA,MAAM,iBAAiB,GAAI,YAAY,UAAU,KAAG,gBA6BlD,CAAC;AAEH,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"ble-scanner.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/ble-plx/ble-scanner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAgB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAY9D,4DAA4D;AAC5D,QAAA,MAAM,iBAAiB,GAAI,YAAY,UAAU,KAAG,gBA6BlD,CAAC;AAEH,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
- import type { Ovok } from "../../ovok";
1
+ import type { Ovok } from "@ovok/core/next";
2
2
  import { ReadingSink } from "../sink";
3
3
  /** Saves readings for the signed-in account through the `Ovok` measurements API. */
4
- declare const ovokReadingSink: (client: Ovok) => ReadingSink;
4
+ declare const ovokReadingSink: (client: Pick<Ovok, "measurements">) => ReadingSink;
5
5
  export { ovokReadingSink };
6
6
  //# sourceMappingURL=ovok-sink.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ovok-sink.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/react-native/ovok-sink.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAStC,oFAAoF;AACpF,QAAA,MAAM,eAAe,GAAI,QAAQ,IAAI,KAAG,WAoBtC,CAAC;AAEH,OAAO,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"ovok-sink.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/react-native/ovok-sink.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAStC,oFAAoF;AACpF,QAAA,MAAM,eAAe,GAAI,QAAQ,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,KAAG,WAoB5D,CAAC;AAEH,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { Ovok, OvokStorage } from "@ovok/core/next";
2
+ import { DeviceSupport } from "../devices";
3
+ import { ResultPolicy } from "../result-policy";
4
+ import { BluetoothRuntime } from "../runtime";
5
+ import { WebBluetoothScanner } from "./web-bluetooth-scanner";
6
+ /** What `createWebBluetoothRuntime` needs. */
7
+ type CreateWebBluetoothRuntimeOptions = {
8
+ /** Saves the readings. */
9
+ client: Pick<Ovok, "measurements">;
10
+ /** The browser's devices, from `webBluetoothScanner`; the app calls its `chooseDevice` from a tap. */
11
+ scanner: WebBluetoothScanner;
12
+ /** The devices to look for. */
13
+ devices: readonly DeviceSupport[];
14
+ /** Which readings of a connection to keep; defaults to every reading. */
15
+ resultPolicy?: ResultPolicy;
16
+ /** Where the paired device IDs persist; without it pairing lasts until the runtime is disposed. */
17
+ pairedStorage?: OvokStorage;
18
+ };
19
+ /** A `BluetoothRuntime` wired for browsers: Web Bluetooth through `scanner`, saving through `client`. */
20
+ declare const createWebBluetoothRuntime: ({ client, scanner, devices, resultPolicy, pairedStorage, }: CreateWebBluetoothRuntimeOptions) => BluetoothRuntime;
21
+ export { createWebBluetoothRuntime };
22
+ export type { CreateWebBluetoothRuntimeOptions };
23
+ //# sourceMappingURL=create-web-bluetooth-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-web-bluetooth-runtime.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/web/create-web-bluetooth-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAG9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,8CAA8C;AAC9C,KAAK,gCAAgC,GAAG;IAEtC,0BAA0B;IAC1B,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IAEnC,sGAAsG;IACtG,OAAO,EAAE,mBAAmB,CAAC;IAE7B,+BAA+B;IAC/B,OAAO,EAAE,SAAS,aAAa,EAAE,CAAC;IAElC,yEAAyE;IACzE,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B,mGAAmG;IACnG,aAAa,CAAC,EAAE,WAAW,CAAC;CAC7B,CAAC;AAEF,yGAAyG;AACzG,QAAA,MAAM,yBAAyB,GAAI,4DAMhC,gCAAgC,KAAG,gBAQlC,CAAC;AAEL,OAAO,EAAE,yBAAyB,EAAE,CAAC;AACrC,YAAY,EAAE,gCAAgC,EAAE,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Bluetooth for `@ovok/native/next` in browsers, over Web Bluetooth: the same `BluetoothRuntime`, devices, result
3
+ * policies and hooks as `@ovok/native/next/bluetooth`, with a Web Bluetooth scanner instead of `react-native-ble-plx`.
4
+ * Nothing here loads `react-native-ble-plx` or `react-native-permissions`, so a web bundle can import it.
5
+ *
6
+ * Import from `@ovok/native/next/bluetooth/web`.
7
+ *
8
+ * @module next/bluetooth/web
9
+ */
10
+ export { createWebBluetoothRuntime } from "./create-web-bluetooth-runtime";
11
+ export type { CreateWebBluetoothRuntimeOptions } from "./create-web-bluetooth-runtime";
12
+ export { isWebBluetoothAvailable, webBluetoothScanner } from "./web-bluetooth-scanner";
13
+ export type { WebBluetoothScanner, WebBluetoothScannerOptions } from "./web-bluetooth-scanner";
14
+ export { webBluetoothPermissions } from "./web-bluetooth-permissions";
15
+ export { WEB_BLUETOOTH_SERVICES, webBluetoothServicesFor } from "./web-bluetooth-services";
16
+ export { BluetoothRuntime } from "../runtime";
17
+ export type { BluetoothRuntimeOptions } from "../runtime";
18
+ export { BluetoothError } from "../errors";
19
+ export type { BluetoothErrorCode } from "../errors";
20
+ export type { BluetoothSnapshot, ConnectionState, DeviceReading, NearbyDevice, SaveState } from "../snapshot";
21
+ export type { AdapterState, Advertisement, BluetoothScanner, Peripheral } from "../transport";
22
+ export type { BluetoothPermission, BluetoothPermissions } from "../permissions";
23
+ export type { ReadingSink, SaveResult } from "../sink";
24
+ export { defineDevice } from "../devices";
25
+ export type { DeviceDefinition, DeviceMatch, DeviceSupport } from "../devices";
26
+ export type { DeviceEvent, DeviceProtocol, Driver } from "../driver";
27
+ export type { DeviceInformation, Link } from "../link";
28
+ export { acceptedMemorySlots, dailyTotalsOnly, everyReading, firstReadingPerKind, keepReadings, policyByKind, } from "../result-policy";
29
+ export type { ResultPolicy } from "../result-policy";
30
+ export { SIG_PROTOCOLS } from "../sig-profiles";
31
+ export { builtInDevices } from "../ble-plx/built-in-devices";
32
+ export { IntegratedDevices } from "../../../bt-management/types/integrated-devices";
33
+ export type { AcceptedDevice } from "../../../bt-management/types/accepted-device";
34
+ export { Devices, SUPPORTED_DEVICES } from "../../../bt-device/constants/supported-devices";
35
+ export type { SupportedDeviceDefinition } from "../../../bt-device/constants/supported-devices";
36
+ export { resultPoliciesFor } from "../../../bt-device/utils/device-query";
37
+ export { ovokReadingSink } from "../react-native/ovok-sink";
38
+ export { BluetoothProvider, useBluetooth } from "../react/context";
39
+ export type { BluetoothProviderProps } from "../react/context";
40
+ export { useBluetoothPermission, useBluetoothState, useMeasurements, useNearbyDevice, useNearbyDevices, usePairedDevices, useScanning, } from "../react/hooks";
41
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/web/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,YAAY,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AACvF,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACvF,YAAY,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC/F,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAE3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,YAAY,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,YAAY,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACpD,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC9G,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC9F,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAChF,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC/E,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACrE,YAAY,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,YAAY,GACb,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;AACpF,YAAY,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAC5F,YAAY,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAChG,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACnE,YAAY,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,GACZ,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,53 @@
1
+ import { BleCharacteristic, WebBleError } from "./web-ble-shapes";
2
+ import { WebBluetoothDevice } from "./web-bluetooth.types";
3
+ type MonitorListener = (error: WebBleError | null, characteristic: BleCharacteristic | null) => void;
4
+ type DisconnectListener = (error: WebBleError | null, device: WebBleDevice) => void;
5
+ type Subscription = {
6
+ remove: () => void;
7
+ };
8
+ /** Advertising data a browser saw for the device, when it let the page watch advertisements. */
9
+ type WebBleAdvertisement = {
10
+ serviceUUIDs: string[] | null;
11
+ manufacturerData: string | null;
12
+ };
13
+ /**
14
+ * A Web Bluetooth device behind the part of the `react-native-ble-plx` `Device` API the SDK's device classes use, so
15
+ * every integrated device and `defineCustomDevice` declaration runs unchanged in a browser. Operations queue (see
16
+ * `WebGatt`), so a write also waits for notifications still being started.
17
+ */
18
+ declare class WebBleDevice {
19
+ readonly id: string;
20
+ readonly name: string | null;
21
+ readonly localName: string | null;
22
+ readonly manufacturerData: string | null;
23
+ readonly mtu = 23;
24
+ readonly rssi: null;
25
+ serviceUUIDs: string[] | null;
26
+ private readonly gatt;
27
+ private readonly monitors;
28
+ private readonly disconnectListeners;
29
+ constructor(device: WebBluetoothDevice, advertisement?: WebBleAdvertisement);
30
+ connect(): Promise<this>;
31
+ isConnected(): Promise<boolean>;
32
+ cancelConnection(): Promise<this>;
33
+ requestMTU(): Promise<this>;
34
+ /** Discovers the services, and reports them as advertised when the browser showed none. */
35
+ discoverAllServicesAndCharacteristics(): Promise<this>;
36
+ services(): Promise<{
37
+ uuid: string;
38
+ deviceID: string;
39
+ isPrimary: boolean;
40
+ }[]>;
41
+ characteristicsForService(serviceUuid: string): Promise<BleCharacteristic[]>;
42
+ readCharacteristicForService(serviceUuid: string, characteristicUuid: string): Promise<BleCharacteristic>;
43
+ writeCharacteristicWithResponseForService(serviceUuid: string, characteristicUuid: string, base64: string): Promise<BleCharacteristic>;
44
+ writeCharacteristicWithoutResponseForService(serviceUuid: string, characteristicUuid: string, base64: string): Promise<BleCharacteristic>;
45
+ /** Starts notifications in the GATT queue; `listener` gets each value, then `DeviceDisconnected` if the link drops. */
46
+ monitorCharacteristicForService(serviceUuid: string, characteristicUuid: string, listener: MonitorListener): Subscription;
47
+ onDisconnected(listener: DisconnectListener): Subscription;
48
+ private readonly onDisconnect;
49
+ private write;
50
+ }
51
+ export { WebBleDevice };
52
+ export type { WebBleAdvertisement };
53
+ //# sourceMappingURL=web-ble-device.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-ble-device.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/web/web-ble-device.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA4C,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE5G,OAAO,EAA8B,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAQvF,KAAK,eAAe,GAAG,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,EAAE,cAAc,EAAE,iBAAiB,GAAG,IAAI,KAAK,IAAI,CAAC;AACrG,KAAK,kBAAkB,GAAG,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,EAAE,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;AACpF,KAAK,YAAY,GAAG;IAAE,MAAM,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;AAE3C,gGAAgG;AAChG,KAAK,mBAAmB,GAAG;IAAE,YAAY,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAE9F;;;;GAIG;AACH,cAAM,YAAY;IAChB,SAAgB,EAAE,EAAE,MAAM,CAAC;IAC3B,SAAgB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,SAAgB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,SAAgB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChD,SAAgB,GAAG,MAAe;IAClC,SAAgB,IAAI,OAAQ;IACrB,YAAY,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACrC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAU;IAC/B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA8B;IACvD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAiC;gBAElD,MAAM,EAAE,kBAAkB,EAAE,aAAa,CAAC,EAAE,mBAAmB;IAUrE,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAMxB,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAI/B,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAQjC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAIxC,2FAA2F;IAC9E,qCAAqC,IAAI,OAAO,CAAC,IAAI,CAAC;IAc5D,QAAQ,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;IAK7E,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAM5E,4BAA4B,CAAC,WAAW,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IASzG,yCAAyC,CAC9C,WAAW,EAAE,MAAM,EACnB,kBAAkB,EAAE,MAAM,EAC1B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC;IAItB,4CAA4C,CACjD,WAAW,EAAE,MAAM,EACnB,kBAAkB,EAAE,MAAM,EAC1B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC;IAI7B,uHAAuH;IAChH,+BAA+B,CACpC,WAAW,EAAE,MAAM,EACnB,kBAAkB,EAAE,MAAM,EAC1B,QAAQ,EAAE,eAAe,GACxB,YAAY;IA0CR,cAAc,CAAC,QAAQ,EAAE,kBAAkB,GAAG,YAAY;IAMjE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAO3B;IAEF,OAAO,CAAC,KAAK;CAed;AAED,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { WebBluetoothCharacteristic } from "./web-bluetooth.types";
2
+ /** `react-native-ble-plx`'s BleErrorCode.DeviceDisconnected, which ends a link instead of failing it. */
3
+ declare const DEVICE_DISCONNECTED = 201;
4
+ declare const UNKNOWN_ERROR = 0;
5
+ /** A failed Web Bluetooth operation in the shape `react-native-ble-plx` reports errors. */
6
+ declare class WebBleError extends Error {
7
+ readonly errorCode: number;
8
+ readonly reason?: unknown | undefined;
9
+ constructor(errorCode: number, message: string, reason?: unknown | undefined);
10
+ }
11
+ /** A characteristic in the shape `react-native-ble-plx` returns one, with its value as base64. */
12
+ type BleCharacteristic = {
13
+ id: string;
14
+ uuid: string;
15
+ serviceUUID: string;
16
+ deviceID: string;
17
+ value: string | null;
18
+ isReadable: boolean;
19
+ isWritableWithResponse: boolean;
20
+ isWritableWithoutResponse: boolean;
21
+ isNotifiable: boolean;
22
+ isIndicatable: boolean;
23
+ };
24
+ declare const toBleCharacteristic: (deviceID: string, serviceUUID: string, characteristic: WebBluetoothCharacteristic, value: string | null) => BleCharacteristic;
25
+ export { DEVICE_DISCONNECTED, toBleCharacteristic, UNKNOWN_ERROR, WebBleError };
26
+ export type { BleCharacteristic };
27
+ //# sourceMappingURL=web-ble-shapes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-ble-shapes.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/web/web-ble-shapes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEnE,yGAAyG;AACzG,QAAA,MAAM,mBAAmB,MAAM,CAAC;AAChC,QAAA,MAAM,aAAa,IAAI,CAAC;AAExB,2FAA2F;AAC3F,cAAM,WAAY,SAAQ,KAAK;aACM,SAAS,EAAE,MAAM;aAAmC,MAAM,CAAC,EAAE,OAAO;gBAApE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAkB,MAAM,CAAC,EAAE,OAAO,YAAA;CAIxG;AAED,kGAAkG;AAClG,KAAK,iBAAiB,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,sBAAsB,EAAE,OAAO,CAAC;IAChC,yBAAyB,EAAE,OAAO,CAAC;IACnC,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,QAAA,MAAM,mBAAmB,GACvB,UAAU,MAAM,EAChB,aAAa,MAAM,EACnB,gBAAgB,0BAA0B,EAC1C,OAAO,MAAM,GAAG,IAAI,KACnB,iBAgBF,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC;AAChF,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { BluetoothPermissions } from "../permissions";
2
+ /**
3
+ * Browser permissions: the browser asks per device in its chooser, so there is no prompt to show first. Granted where
4
+ * the browser has Web Bluetooth, denied where it has none; no settings page can change that.
5
+ */
6
+ declare const webBluetoothPermissions: () => BluetoothPermissions;
7
+ export { webBluetoothPermissions };
8
+ //# sourceMappingURL=web-bluetooth-permissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-bluetooth-permissions.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/web/web-bluetooth-permissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAI3E;;;GAGG;AACH,QAAA,MAAM,uBAAuB,QAAO,oBAInC,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { AcceptedDevice } from "../../../bt-management/types/accepted-device";
2
+ import { BluetoothScanner, Peripheral } from "../transport";
3
+ import { WebBluetooth } from "./web-bluetooth.types";
4
+ /** What `webBluetoothScanner` needs. */
5
+ type WebBluetoothScannerOptions = {
6
+ /** The accepted devices; the chooser also allows the services of their `defineCustomDevice` declarations. */
7
+ acceptedDevices?: readonly AcceptedDevice[];
8
+ /** The Web Bluetooth API; defaults to `navigator.bluetooth`. */
9
+ bluetooth?: WebBluetooth;
10
+ };
11
+ /** A `BluetoothScanner` for browsers, where a page only reaches the devices the user picks in the browser's chooser. */
12
+ interface WebBluetoothScanner extends BluetoothScanner {
13
+ /**
14
+ * Opens the browser's device chooser, so it must run from a user gesture such as a tap. Resolves to the picked device,
15
+ * which a running scan also reports, or to `undefined` when the user closes the chooser.
16
+ */
17
+ chooseDevice(): Promise<Peripheral | undefined>;
18
+ }
19
+ /** Whether this browser has Web Bluetooth, such as Chrome and Edge on desktop and Android, or Bluefy on iOS. */
20
+ declare const isWebBluetoothAvailable: () => boolean;
21
+ /**
22
+ * Finds devices through Web Bluetooth. A scan reports the devices this site may already use (`getDevices`, where the
23
+ * browser has it) and every device picked with `chooseDevice`; browsers can't scan in the background or without the
24
+ * user picking.
25
+ */
26
+ declare const webBluetoothScanner: ({ acceptedDevices, bluetooth, }?: WebBluetoothScannerOptions) => WebBluetoothScanner;
27
+ export { isWebBluetoothAvailable, webBluetoothScanner };
28
+ export type { WebBluetoothScanner, WebBluetoothScannerOptions };
29
+ //# sourceMappingURL=web-bluetooth-scanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-bluetooth-scanner.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/web/web-bluetooth-scanner.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAI9E,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK5D,OAAO,EAAE,YAAY,EAAiD,MAAM,uBAAuB,CAAC;AAMpG,wCAAwC;AACxC,KAAK,0BAA0B,GAAG;IAEhC,6GAA6G;IAC7G,eAAe,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IAE5C,gEAAgE;IAChE,SAAS,CAAC,EAAE,YAAY,CAAC;CAC1B,CAAC;AAEF,wHAAwH;AACxH,UAAU,mBAAoB,SAAQ,gBAAgB;IAEpD;;;OAGG;IACH,YAAY,IAAI,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;CACjD;AAKD,gHAAgH;AAChH,QAAA,MAAM,uBAAuB,QAAO,OAA6C,CAAC;AAiClF;;;;GAIG;AACH,QAAA,MAAM,mBAAmB,GAAI,kCAG1B,0BAA+B,KAAG,mBAkFpC,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,CAAC;AACxD,YAAY,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { AcceptedDevice } from "../../../bt-management/types/accepted-device";
2
+ /**
3
+ * Every GATT service an integrated device uses, as a browser must be told when the user picks a device: a page can
4
+ * only reach the services it named in `navigator.bluetooth.requestDevice`'s `optionalServices`.
5
+ */
6
+ declare const WEB_BLUETOOTH_SERVICES: readonly string[];
7
+ /** `WEB_BLUETOOTH_SERVICES` and the services of the `defineCustomDevice` declarations among `acceptedDevices`. */
8
+ declare const webBluetoothServicesFor: (acceptedDevices?: readonly AcceptedDevice[]) => string[];
9
+ export { WEB_BLUETOOTH_SERVICES, webBluetoothServicesFor };
10
+ //# sourceMappingURL=web-bluetooth-services.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-bluetooth-services.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/web/web-bluetooth-services.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAiC9E;;;GAGG;AACH,QAAA,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAS5C,CAAC;AAEF,kHAAkH;AAClH,QAAA,MAAM,uBAAuB,GAAI,kBAAiB,SAAS,cAAc,EAAO,KAAG,MAAM,EAExF,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ /** A UUID as Web Bluetooth accepts it: lower case, with a 16- or 32-bit alias expanded on the Bluetooth base UUID. */
2
+ declare const canonicalUuid: (uuid: string) => string;
3
+ declare const bytesOf: (view: DataView) => Uint8Array;
4
+ declare const toBase64: (bytes: Uint8Array) => string;
5
+ declare const fromBase64: (base64: string) => Uint8Array;
6
+ /** Manufacturer data the way `react-native-ble-plx` reports it: the company ID, little endian, then the payload. */
7
+ declare const manufacturerDataOf: (data: ReadonlyMap<number, DataView> | undefined) => string | null;
8
+ export { bytesOf, canonicalUuid, fromBase64, manufacturerDataOf, toBase64 };
9
+ //# sourceMappingURL=web-bluetooth-values.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-bluetooth-values.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/web/web-bluetooth-values.ts"],"names":[],"mappings":"AAIA,sHAAsH;AACtH,QAAA,MAAM,aAAa,GAAI,MAAM,MAAM,KAAG,MAQrC,CAAC;AAEF,QAAA,MAAM,OAAO,GAAI,MAAM,QAAQ,KAAG,UAA2E,CAAC;AAE9G,QAAA,MAAM,QAAQ,GAAI,OAAO,UAAU,KAAG,MAA+E,CAAC;AAEtH,QAAA,MAAM,UAAU,GAAI,QAAQ,MAAM,KAAG,UAAyE,CAAC;AAE/G,oHAAoH;AACpH,QAAA,MAAM,kBAAkB,GAAI,MAAM,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,SAAS,KAAG,MAAM,GAAG,IAUtF,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,kBAAkB,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,56 @@
1
+ /** The part of the Web Bluetooth API (`navigator.bluetooth`) the SDK uses; TypeScript's ESNext lib has none of it. */
2
+ type WebBluetoothListener = (event: unknown) => void;
3
+ interface WebBluetoothEventTarget {
4
+ addEventListener(type: string, listener: WebBluetoothListener): void;
5
+ removeEventListener(type: string, listener: WebBluetoothListener): void;
6
+ }
7
+ interface WebBluetoothCharacteristic extends WebBluetoothEventTarget {
8
+ readonly uuid: string;
9
+ readonly properties: {
10
+ readonly read: boolean;
11
+ readonly write: boolean;
12
+ readonly writeWithoutResponse: boolean;
13
+ readonly notify: boolean;
14
+ readonly indicate: boolean;
15
+ };
16
+ readonly value?: DataView;
17
+ readValue(): Promise<DataView>;
18
+ writeValue(value: Uint8Array): Promise<void>;
19
+ writeValueWithResponse?(value: Uint8Array): Promise<void>;
20
+ writeValueWithoutResponse?(value: Uint8Array): Promise<void>;
21
+ startNotifications(): Promise<unknown>;
22
+ stopNotifications(): Promise<unknown>;
23
+ }
24
+ interface WebBluetoothService {
25
+ readonly uuid: string;
26
+ getCharacteristics(): Promise<WebBluetoothCharacteristic[]>;
27
+ }
28
+ interface WebBluetoothServer {
29
+ readonly connected: boolean;
30
+ connect(): Promise<unknown>;
31
+ disconnect(): void;
32
+ getPrimaryServices(): Promise<WebBluetoothService[]>;
33
+ }
34
+ interface WebBluetoothDevice extends WebBluetoothEventTarget {
35
+ readonly id: string;
36
+ readonly name?: string | null;
37
+ readonly gatt?: WebBluetoothServer;
38
+ watchAdvertisements?(options?: {
39
+ signal?: AbortSignal;
40
+ }): Promise<void>;
41
+ }
42
+ /** What `advertisementreceived` carries. */
43
+ interface WebBluetoothAdvertisement {
44
+ readonly uuids?: readonly string[];
45
+ readonly manufacturerData?: ReadonlyMap<number, DataView>;
46
+ }
47
+ interface WebBluetooth extends WebBluetoothEventTarget {
48
+ getAvailability(): Promise<boolean>;
49
+ requestDevice(options: {
50
+ acceptAllDevices: true;
51
+ optionalServices: string[];
52
+ }): Promise<WebBluetoothDevice>;
53
+ getDevices?(): Promise<WebBluetoothDevice[]>;
54
+ }
55
+ export type { WebBluetooth, WebBluetoothAdvertisement, WebBluetoothCharacteristic, WebBluetoothDevice, WebBluetoothListener, WebBluetoothServer, WebBluetoothService, };
56
+ //# sourceMappingURL=web-bluetooth.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-bluetooth.types.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/web/web-bluetooth.types.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,KAAK,oBAAoB,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;AAErD,UAAU,uBAAuB;IAC/B,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACrE,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAAC;CACzE;AAED,UAAU,0BAA2B,SAAQ,uBAAuB;IAClE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE;QACnB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;QACvB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;QACxB,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC;QACvC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;QACzB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;KAC5B,CAAC;IACF,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC;IAC1B,SAAS,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC/B,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,sBAAsB,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,yBAAyB,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,kBAAkB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IACvC,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CACvC;AAED,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,kBAAkB,IAAI,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAAC;CAC7D;AAED,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5B,UAAU,IAAI,IAAI,CAAC;IACnB,kBAAkB,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC;CACtD;AAED,UAAU,kBAAmB,SAAQ,uBAAuB;IAC1D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,IAAI,CAAC,EAAE,kBAAkB,CAAC;IACnC,mBAAmB,CAAC,CAAC,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzE;AAED,4CAA4C;AAC5C,UAAU,yBAAyB;IACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;CAC3D;AAED,UAAU,YAAa,SAAQ,uBAAuB;IACpD,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IACpC,aAAa,CAAC,OAAO,EAAE;QAAE,gBAAgB,EAAE,IAAI,CAAC;QAAC,gBAAgB,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC5G,UAAU,CAAC,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;CAC9C;AAED,YAAY,EACV,YAAY,EACZ,yBAAyB,EACzB,0BAA0B,EAC1B,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,GACpB,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { WebBleError } from "./web-ble-shapes";
2
+ import { WebBluetoothCharacteristic, WebBluetoothDevice, WebBluetoothServer } from "./web-bluetooth.types";
3
+ /**
4
+ * A device's GATT server as one queue: browsers allow one GATT operation at a time, so each runs after the previous one
5
+ * settles, and its services are discovered once per connection.
6
+ */
7
+ declare class WebGatt {
8
+ private readonly device;
9
+ private readonly characteristics;
10
+ private operations;
11
+ private discovered?;
12
+ constructor(device: WebBluetoothDevice);
13
+ get connected(): boolean;
14
+ server(): WebBluetoothServer;
15
+ /** Runs `operation` after the previous one settles; a failure comes back as a `react-native-ble-plx` error. */
16
+ queued<T>(operation: () => Promise<T>): Promise<T>;
17
+ /** The discovered services' UUIDs; call it inside a queued operation, so discovery never queues behind itself. */
18
+ serviceUuids(): Promise<string[]>;
19
+ characteristicsOf(serviceUuid: string): Promise<WebBluetoothCharacteristic[]>;
20
+ characteristic(serviceUuid: string, characteristicUuid: string): Promise<WebBluetoothCharacteristic>;
21
+ /** Forgets the discovered services, as a new connection must discover them again. */
22
+ forget(): void;
23
+ errorOf(error: unknown): WebBleError;
24
+ private discover;
25
+ }
26
+ export { WebGatt };
27
+ //# sourceMappingURL=web-gatt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-gatt.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/web/web-gatt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEnF,OAAO,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAI3G;;;GAGG;AACH,cAAM,OAAO;IAKQ,OAAO,CAAC,QAAQ,CAAC,MAAM;IAJ1C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA8D;IAC9F,OAAO,CAAC,UAAU,CAAuC;IACzD,OAAO,CAAC,UAAU,CAAC,CAAgB;gBAEC,MAAM,EAAE,kBAAkB;IAE9D,IAAW,SAAS,IAAI,OAAO,CAE9B;IAEM,MAAM,IAAI,kBAAkB;IAQnC,+GAA+G;IACxG,MAAM,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAUzD,kHAAkH;IACrG,YAAY,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAMjC,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,0BAA0B,EAAE,CAAC;IAM7E,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAcjH,qFAAqF;IAC9E,MAAM,IAAI,IAAI;IAId,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW;IAQ3C,OAAO,CAAC,QAAQ;CAkBjB;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -6,4 +6,5 @@
6
6
  * @module next/background-sync
7
7
  */
8
8
  export * from "../../background-sync";
9
+ export * from "./offline-measurement-background-sync";
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/background-sync/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/background-sync/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,uBAAuB,CAAC;AACtC,cAAc,uCAAuC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { Ovok } from "../ovok";
2
+ /** Core client surface used by the background queue flush. */
3
+ type OfflineMeasurementBackgroundSyncClient = Pick<Ovok, "measurements">;
4
+ /** Options for recurring offline measurement sync. */
5
+ type OfflineMeasurementBackgroundSyncOptions = {
6
+ /** Minimum repeat interval in minutes (15 or higher); defaults to 15. */
7
+ minimumIntervalMinutes?: number;
8
+ };
9
+ /** Flushes the Core offline measurement queue for a restored client. */
10
+ declare const runOfflineMeasurementBackgroundSync: (client: OfflineMeasurementBackgroundSyncClient) => Promise<import("@ovok/core/next").OfflineMeasurementFlushResult>;
11
+ /**
12
+ * Defines the task at app entry-point load so it exists after process restart.
13
+ * The callback must restore the app-owned client and its secure session.
14
+ */
15
+ declare const registerOfflineMeasurementBackgroundTask: (restoreClient: () => Promise<OfflineMeasurementBackgroundSyncClient>) => void;
16
+ /** Schedules recurring offline measurement sync through WorkManager or BGTaskScheduler. */
17
+ declare const scheduleOfflineMeasurementBackgroundSync: (options?: OfflineMeasurementBackgroundSyncOptions) => Promise<void>;
18
+ /** Cancels recurring offline measurement sync. */
19
+ declare const cancelOfflineMeasurementBackgroundSync: () => Promise<void>;
20
+ export { cancelOfflineMeasurementBackgroundSync, registerOfflineMeasurementBackgroundTask, runOfflineMeasurementBackgroundSync, scheduleOfflineMeasurementBackgroundSync, };
21
+ export type { OfflineMeasurementBackgroundSyncClient, OfflineMeasurementBackgroundSyncOptions, };
22
+ //# sourceMappingURL=offline-measurement-background-sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offline-measurement-background-sync.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/background-sync/offline-measurement-background-sync.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AASpC,8DAA8D;AAC9D,KAAK,sCAAsC,GAAG,IAAI,CAChD,IAAI,EACJ,cAAc,CACf,CAAC;AAEF,sDAAsD;AACtD,KAAK,uCAAuC,GAAG;IAE7C,yEAAyE;IACzE,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF,wEAAwE;AACxE,QAAA,MAAM,mCAAmC,GACvC,QAAQ,sCAAsC,qEACH,CAAC;AAE9C;;;GAGG;AACH,QAAA,MAAM,wCAAwC,GAC5C,eAAe,MAAM,OAAO,CAAC,sCAAsC,CAAC,KACnE,IAuBF,CAAC;AAEF,2FAA2F;AAC3F,QAAA,MAAM,wCAAwC,GAC5C,UAAS,uCAA4C,KACpD,OAAO,CAAC,IAAI,CAuBd,CAAC;AAEF,kDAAkD;AAClD,QAAA,MAAM,sCAAsC,QAAO,OAAO,CAAC,IAAI,CAG5D,CAAC;AAEJ,OAAO,EACL,sCAAsC,EACtC,wCAAwC,EACxC,mCAAmC,EACnC,wCAAwC,GACzC,CAAC;AACF,YAAY,EACV,sCAAsC,EACtC,uCAAuC,GACxC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Device } from "react-native-ble-plx";
1
+ import type { Device } from "react-native-ble-plx";
2
2
  import { Link } from "../link";
3
3
  /** Connects (retrying with backoff), discovers services and reads Device Information; aborting `signal` closes the link. */
4
4
  declare function openBleLink(device: Device, signal: AbortSignal): Promise<Link>;
@@ -1 +1 @@
1
- {"version":3,"file":"ble-link.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/ble-plx/ble-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,MAAM,EAAgB,MAAM,sBAAsB,CAAC;AAOtE,OAAO,EAAqB,IAAI,EAAE,MAAM,SAAS,CAAC;AAyJlD,4HAA4H;AAC5H,iBAAe,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB7E;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"ble-link.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/ble-plx/ble-link.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,MAAM,EAAgB,MAAM,sBAAsB,CAAC;AAO3E,OAAO,EAAqB,IAAI,EAAE,MAAM,SAAS,CAAC;AAyJlD,4HAA4H;AAC5H,iBAAe,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB7E;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Device } from "react-native-ble-plx";
2
+ import { Peripheral } from "../transport";
3
+ /** The `react-native-ble-plx` device behind a peripheral that `blePeripheral` made. */
4
+ declare const bleDeviceOf: (peripheral: Peripheral) => Device;
5
+ /** A `react-native-ble-plx` device, or a device with the same API such as a Web Bluetooth one, as a peripheral. */
6
+ declare const blePeripheral: (device: Device) => Peripheral;
7
+ export { bleDeviceOf, blePeripheral };
8
+ //# sourceMappingURL=ble-peripheral.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ble-peripheral.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/ble-plx/ble-peripheral.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,uFAAuF;AACvF,QAAA,MAAM,WAAW,GAAI,YAAY,UAAU,KAAG,MAQ7C,CAAC;AAEF,mHAAmH;AACnH,QAAA,MAAM,aAAa,GAAI,QAAQ,MAAM,KAAG,UAcvC,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC"}
@@ -1,10 +1,6 @@
1
- import { BleManager, Device } from "react-native-ble-plx";
2
- import { BluetoothScanner, Peripheral } from "../transport";
3
- /** The `react-native-ble-plx` device behind a peripheral this adapter reported. */
4
- declare const bleDeviceOf: (peripheral: Peripheral) => Device;
5
- /** A `react-native-ble-plx` device as a peripheral. */
6
- declare const blePeripheral: (device: Device) => Peripheral;
1
+ import { BleManager } from "react-native-ble-plx";
2
+ import { BluetoothScanner } from "../transport";
7
3
  /** A scanner over a `react-native-ble-plx` `BleManager`. */
8
4
  declare const bleManagerScanner: (bleManager: BleManager) => BluetoothScanner;
9
- export { bleDeviceOf, bleManagerScanner, blePeripheral };
5
+ export { bleManagerScanner };
10
6
  //# sourceMappingURL=ble-scanner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ble-scanner.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/ble-plx/ble-scanner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAmB,MAAM,sBAAsB,CAAC;AAE3E,OAAO,EAAgB,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAc1E,mFAAmF;AACnF,QAAA,MAAM,WAAW,GAAI,YAAY,UAAU,KAAG,MAQ7C,CAAC;AAEF,uDAAuD;AACvD,QAAA,MAAM,aAAa,GAAI,QAAQ,MAAM,KAAG,UAcvC,CAAC;AAEF,4DAA4D;AAC5D,QAAA,MAAM,iBAAiB,GAAI,YAAY,UAAU,KAAG,gBA6BlD,CAAC;AAEH,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"ble-scanner.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/ble-plx/ble-scanner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAgB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAY9D,4DAA4D;AAC5D,QAAA,MAAM,iBAAiB,GAAI,YAAY,UAAU,KAAG,gBA6BlD,CAAC;AAEH,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
- import type { Ovok } from "../../ovok";
1
+ import type { Ovok } from "@ovok/core/next";
2
2
  import { ReadingSink } from "../sink";
3
3
  /** Saves readings for the signed-in account through the `Ovok` measurements API. */
4
- declare const ovokReadingSink: (client: Ovok) => ReadingSink;
4
+ declare const ovokReadingSink: (client: Pick<Ovok, "measurements">) => ReadingSink;
5
5
  export { ovokReadingSink };
6
6
  //# sourceMappingURL=ovok-sink.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ovok-sink.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/react-native/ovok-sink.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAStC,oFAAoF;AACpF,QAAA,MAAM,eAAe,GAAI,QAAQ,IAAI,KAAG,WAoBtC,CAAC;AAEH,OAAO,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"ovok-sink.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/react-native/ovok-sink.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAStC,oFAAoF;AACpF,QAAA,MAAM,eAAe,GAAI,QAAQ,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,KAAG,WAoB5D,CAAC;AAEH,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { Ovok, OvokStorage } from "@ovok/core/next";
2
+ import { DeviceSupport } from "../devices";
3
+ import { ResultPolicy } from "../result-policy";
4
+ import { BluetoothRuntime } from "../runtime";
5
+ import { WebBluetoothScanner } from "./web-bluetooth-scanner";
6
+ /** What `createWebBluetoothRuntime` needs. */
7
+ type CreateWebBluetoothRuntimeOptions = {
8
+ /** Saves the readings. */
9
+ client: Pick<Ovok, "measurements">;
10
+ /** The browser's devices, from `webBluetoothScanner`; the app calls its `chooseDevice` from a tap. */
11
+ scanner: WebBluetoothScanner;
12
+ /** The devices to look for. */
13
+ devices: readonly DeviceSupport[];
14
+ /** Which readings of a connection to keep; defaults to every reading. */
15
+ resultPolicy?: ResultPolicy;
16
+ /** Where the paired device IDs persist; without it pairing lasts until the runtime is disposed. */
17
+ pairedStorage?: OvokStorage;
18
+ };
19
+ /** A `BluetoothRuntime` wired for browsers: Web Bluetooth through `scanner`, saving through `client`. */
20
+ declare const createWebBluetoothRuntime: ({ client, scanner, devices, resultPolicy, pairedStorage, }: CreateWebBluetoothRuntimeOptions) => BluetoothRuntime;
21
+ export { createWebBluetoothRuntime };
22
+ export type { CreateWebBluetoothRuntimeOptions };
23
+ //# sourceMappingURL=create-web-bluetooth-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-web-bluetooth-runtime.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/web/create-web-bluetooth-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAG9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,8CAA8C;AAC9C,KAAK,gCAAgC,GAAG;IAEtC,0BAA0B;IAC1B,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IAEnC,sGAAsG;IACtG,OAAO,EAAE,mBAAmB,CAAC;IAE7B,+BAA+B;IAC/B,OAAO,EAAE,SAAS,aAAa,EAAE,CAAC;IAElC,yEAAyE;IACzE,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B,mGAAmG;IACnG,aAAa,CAAC,EAAE,WAAW,CAAC;CAC7B,CAAC;AAEF,yGAAyG;AACzG,QAAA,MAAM,yBAAyB,GAAI,4DAMhC,gCAAgC,KAAG,gBAQlC,CAAC;AAEL,OAAO,EAAE,yBAAyB,EAAE,CAAC;AACrC,YAAY,EAAE,gCAAgC,EAAE,CAAC"}