@ovok/native 1.16.1-dev.2118 → 1.16.1-dev.2129
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.
- package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js +3 -1
- package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js +9 -141
- package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/device-picker-sheet.js +160 -0
- package/lib/commonjs/modules/bt-management/components/device-picker-sheet.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-permission.js +2 -1
- package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-permission.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-measurements.js +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-measurements.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/bluetooth-permission-list.js +19 -0
- package/lib/commonjs/modules/bt-management/utils/bluetooth-permission-list.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/result-identity.js +3 -25
- package/lib/commonjs/modules/bt-management/utils/result-identity.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/auto-connect.js +32 -0
- package/lib/commonjs/modules/next/bluetooth/auto-connect.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-errors.js +33 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-errors.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-link.js +125 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-link.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-scanner.js +75 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-scanner.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js +34 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js +67 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/connections.js +110 -0
- package/lib/commonjs/modules/next/bluetooth/connections.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/daily-total-day.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/devices.js +41 -0
- package/lib/commonjs/modules/next/bluetooth/devices.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/driver.js +24 -20
- package/lib/commonjs/modules/next/bluetooth/driver.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/errors.js +26 -0
- package/lib/commonjs/modules/next/bluetooth/errors.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/index.js +116 -11
- package/lib/commonjs/modules/next/bluetooth/index.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/link.js +0 -103
- package/lib/commonjs/modules/next/bluetooth/link.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/paired.js +50 -0
- package/lib/commonjs/modules/next/bluetooth/paired.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/permissions.js +2 -0
- package/lib/commonjs/modules/next/bluetooth/permissions.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/react/bluetooth-device-picker.js +44 -0
- package/lib/commonjs/modules/next/bluetooth/react/bluetooth-device-picker.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/react/context.js +54 -0
- package/lib/commonjs/modules/next/bluetooth/react/context.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/react/hooks.js +86 -0
- package/lib/commonjs/modules/next/bluetooth/react/hooks.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/react-native/create-bluetooth-runtime.js +28 -0
- package/lib/commonjs/modules/next/bluetooth/react-native/create-bluetooth-runtime.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/react-native/os-permissions.js +32 -0
- package/lib/commonjs/modules/next/bluetooth/react-native/os-permissions.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/react-native/ovok-sink.js +32 -0
- package/lib/commonjs/modules/next/bluetooth/react-native/ovok-sink.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/readings.js +92 -0
- package/lib/commonjs/modules/next/bluetooth/readings.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/result-policy.js +6 -1
- package/lib/commonjs/modules/next/bluetooth/result-policy.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/runtime.js +223 -0
- package/lib/commonjs/modules/next/bluetooth/runtime.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/scan-loop.js +82 -0
- package/lib/commonjs/modules/next/bluetooth/scan-loop.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/sink.js +6 -0
- package/lib/commonjs/modules/next/bluetooth/sink.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/snapshot.js +6 -0
- package/lib/commonjs/modules/next/bluetooth/snapshot.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/stable-hash.js +33 -0
- package/lib/commonjs/modules/next/bluetooth/stable-hash.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/store.js +61 -0
- package/lib/commonjs/modules/next/bluetooth/store.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/transport.js +6 -0
- package/lib/commonjs/modules/next/bluetooth/transport.js.map +1 -0
- package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js +3 -1
- package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -1
- package/lib/module/modules/bt-management/components/bluetooth-device-picker.js +9 -141
- package/lib/module/modules/bt-management/components/bluetooth-device-picker.js.map +1 -1
- package/lib/module/modules/bt-management/components/device-picker-sheet.js +154 -0
- package/lib/module/modules/bt-management/components/device-picker-sheet.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-bluetooth-permission.js +4 -3
- package/lib/module/modules/bt-management/hooks/use-bluetooth-permission.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-measurements.js +1 -1
- package/lib/module/modules/bt-management/hooks/use-measurements.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/module/modules/bt-management/utils/bluetooth-permission-list.js +14 -0
- package/lib/module/modules/bt-management/utils/bluetooth-permission-list.js.map +1 -0
- package/lib/module/modules/bt-management/utils/result-identity.js +3 -25
- package/lib/module/modules/bt-management/utils/result-identity.js.map +1 -1
- package/lib/module/modules/next/bluetooth/auto-connect.js +28 -0
- package/lib/module/modules/next/bluetooth/auto-connect.js.map +1 -0
- package/lib/module/modules/next/bluetooth/ble-plx/ble-errors.js +28 -0
- package/lib/module/modules/next/bluetooth/ble-plx/ble-errors.js.map +1 -0
- package/lib/module/modules/next/bluetooth/ble-plx/ble-link.js +122 -0
- package/lib/module/modules/next/bluetooth/ble-plx/ble-link.js.map +1 -0
- package/lib/module/modules/next/bluetooth/ble-plx/ble-scanner.js +69 -0
- package/lib/module/modules/next/bluetooth/ble-plx/ble-scanner.js.map +1 -0
- package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js +31 -0
- package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -0
- package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js +63 -0
- package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -0
- package/lib/module/modules/next/bluetooth/connections.js +106 -0
- package/lib/module/modules/next/bluetooth/connections.js.map +1 -0
- package/lib/module/modules/next/bluetooth/daily-total-day.js.map +1 -0
- package/lib/module/modules/next/bluetooth/devices.js +37 -0
- package/lib/module/modules/next/bluetooth/devices.js.map +1 -0
- package/lib/module/modules/next/bluetooth/driver.js +23 -20
- package/lib/module/modules/next/bluetooth/driver.js.map +1 -1
- package/lib/module/modules/next/bluetooth/errors.js +21 -0
- package/lib/module/modules/next/bluetooth/errors.js.map +1 -0
- package/lib/module/modules/next/bluetooth/index.js +21 -3
- package/lib/module/modules/next/bluetooth/index.js.map +1 -1
- package/lib/module/modules/next/bluetooth/link.js +0 -101
- package/lib/module/modules/next/bluetooth/link.js.map +1 -1
- package/lib/module/modules/next/bluetooth/paired.js +46 -0
- package/lib/module/modules/next/bluetooth/paired.js.map +1 -0
- package/lib/module/modules/next/bluetooth/permissions.js +2 -0
- package/lib/module/modules/next/bluetooth/permissions.js.map +1 -0
- package/lib/module/modules/next/bluetooth/react/bluetooth-device-picker.js +39 -0
- package/lib/module/modules/next/bluetooth/react/bluetooth-device-picker.js.map +1 -0
- package/lib/module/modules/next/bluetooth/react/context.js +48 -0
- package/lib/module/modules/next/bluetooth/react/context.js.map +1 -0
- package/lib/module/modules/next/bluetooth/react/hooks.js +76 -0
- package/lib/module/modules/next/bluetooth/react/hooks.js.map +1 -0
- package/lib/module/modules/next/bluetooth/react-native/create-bluetooth-runtime.js +25 -0
- package/lib/module/modules/next/bluetooth/react-native/create-bluetooth-runtime.js.map +1 -0
- package/lib/module/modules/next/bluetooth/react-native/os-permissions.js +28 -0
- package/lib/module/modules/next/bluetooth/react-native/os-permissions.js.map +1 -0
- package/lib/module/modules/next/bluetooth/react-native/ovok-sink.js +28 -0
- package/lib/module/modules/next/bluetooth/react-native/ovok-sink.js.map +1 -0
- package/lib/module/modules/next/bluetooth/readings.js +88 -0
- package/lib/module/modules/next/bluetooth/readings.js.map +1 -0
- package/lib/module/modules/next/bluetooth/result-policy.js +6 -1
- package/lib/module/modules/next/bluetooth/result-policy.js.map +1 -1
- package/lib/module/modules/next/bluetooth/runtime.js +220 -0
- package/lib/module/modules/next/bluetooth/runtime.js.map +1 -0
- package/lib/module/modules/next/bluetooth/scan-loop.js +78 -0
- package/lib/module/modules/next/bluetooth/scan-loop.js.map +1 -0
- package/lib/module/modules/next/bluetooth/sink.js +4 -0
- package/lib/module/modules/next/bluetooth/sink.js.map +1 -0
- package/lib/module/modules/next/bluetooth/snapshot.js +4 -0
- package/lib/module/modules/next/bluetooth/snapshot.js.map +1 -0
- package/lib/module/modules/next/bluetooth/stable-hash.js +28 -0
- package/lib/module/modules/next/bluetooth/stable-hash.js.map +1 -0
- package/lib/module/modules/next/bluetooth/store.js +57 -0
- package/lib/module/modules/next/bluetooth/store.js.map +1 -0
- package/lib/module/modules/next/bluetooth/transport.js +4 -0
- package/lib/module/modules/next/bluetooth/transport.js.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/device-picker-sheet.d.ts +25 -0
- package/lib/typescript/commonjs/src/modules/bt-management/components/device-picker-sheet.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-permission.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/bluetooth-permission-list.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/bluetooth-permission-list.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/auto-connect.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/auto-connect.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-link.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-link.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts +25 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/daily-total-day.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/devices.d.ts +30 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/devices.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts +21 -19
- package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts +32 -3
- package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/link.d.ts +2 -4
- package/lib/typescript/commonjs/src/modules/next/bluetooth/link.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/paired.d.ts +18 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/paired.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/permissions.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/permissions.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts +35 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react/context.d.ts +30 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react/context.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react/hooks.d.ts +47 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react/hooks.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts +21 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/os-permissions.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/os-permissions.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/ovok-sink.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/ovok-sink.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts +21 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/result-policy.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/result-policy.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts +87 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/scan-loop.d.ts +23 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/scan-loop.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/sink.d.ts +20 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/sink.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts +69 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/stable-hash.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/stable-hash.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/store.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/store.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/transport.d.ts +31 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/transport.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/device-picker-sheet.d.ts +25 -0
- package/lib/typescript/module/src/modules/bt-management/components/device-picker-sheet.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-permission.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/bluetooth-permission-list.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/utils/bluetooth-permission-list.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/auto-connect.d.ts +10 -0
- package/lib/typescript/module/src/modules/next/bluetooth/auto-connect.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts +4 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-errors.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-link.d.ts +6 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-link.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts +10 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +6 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +8 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts +25 -0
- package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/daily-total-day.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/devices.d.ts +30 -0
- package/lib/typescript/module/src/modules/next/bluetooth/devices.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts +21 -19
- package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts +17 -0
- package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts +32 -3
- package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/link.d.ts +2 -4
- package/lib/typescript/module/src/modules/next/bluetooth/link.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/paired.d.ts +18 -0
- package/lib/typescript/module/src/modules/next/bluetooth/paired.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/permissions.d.ts +13 -0
- package/lib/typescript/module/src/modules/next/bluetooth/permissions.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts +35 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react/bluetooth-device-picker.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react/context.d.ts +30 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react/context.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react/hooks.d.ts +47 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react/hooks.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts +21 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react-native/create-bluetooth-runtime.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react-native/os-permissions.d.ts +5 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react-native/os-permissions.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react-native/ovok-sink.d.ts +6 -0
- package/lib/typescript/module/src/modules/next/bluetooth/react-native/ovok-sink.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts +21 -0
- package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/result-policy.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/bluetooth/result-policy.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts +87 -0
- package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/scan-loop.d.ts +23 -0
- package/lib/typescript/module/src/modules/next/bluetooth/scan-loop.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/sink.d.ts +20 -0
- package/lib/typescript/module/src/modules/next/bluetooth/sink.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts +69 -0
- package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/stable-hash.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/bluetooth/stable-hash.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/store.d.ts +16 -0
- package/lib/typescript/module/src/modules/next/bluetooth/store.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/transport.d.ts +31 -0
- package/lib/typescript/module/src/modules/next/bluetooth/transport.d.ts.map +1 -0
- package/package.json +1 -1
- package/lib/commonjs/modules/bt-management/utils/daily-total-day.js.map +0 -1
- package/lib/commonjs/modules/next/bluetooth/drivers.js +0 -20
- package/lib/commonjs/modules/next/bluetooth/drivers.js.map +0 -1
- package/lib/commonjs/modules/next/bluetooth/legacy-driver.js +0 -55
- package/lib/commonjs/modules/next/bluetooth/legacy-driver.js.map +0 -1
- package/lib/module/modules/bt-management/utils/daily-total-day.js.map +0 -1
- package/lib/module/modules/next/bluetooth/drivers.js +0 -17
- package/lib/module/modules/next/bluetooth/drivers.js.map +0 -1
- package/lib/module/modules/next/bluetooth/legacy-driver.js +0 -51
- package/lib/module/modules/next/bluetooth/legacy-driver.js.map +0 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/daily-total-day.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/drivers.d.ts +0 -7
- package/lib/typescript/commonjs/src/modules/next/bluetooth/drivers.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/legacy-driver.d.ts +0 -8
- package/lib/typescript/commonjs/src/modules/next/bluetooth/legacy-driver.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/bt-management/utils/daily-total-day.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/next/bluetooth/drivers.d.ts +0 -7
- package/lib/typescript/module/src/modules/next/bluetooth/drivers.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/next/bluetooth/legacy-driver.d.ts +0 -8
- package/lib/typescript/module/src/modules/next/bluetooth/legacy-driver.d.ts.map +0 -1
- /package/lib/commonjs/modules/{bt-management/utils → next/bluetooth}/daily-total-day.js +0 -0
- /package/lib/module/modules/{bt-management/utils → next/bluetooth}/daily-total-day.js +0 -0
- /package/lib/typescript/commonjs/src/modules/{bt-management/utils → next/bluetooth}/daily-total-day.d.ts +0 -0
- /package/lib/typescript/module/src/modules/{bt-management/utils → next/bluetooth}/daily-total-day.d.ts +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const canonicalize = value => {
|
|
4
|
+
if (value instanceof Date) {
|
|
5
|
+
return value.toISOString();
|
|
6
|
+
}
|
|
7
|
+
if (Array.isArray(value)) {
|
|
8
|
+
return value.map(canonicalize);
|
|
9
|
+
}
|
|
10
|
+
if (value && typeof value === "object") {
|
|
11
|
+
return Object.fromEntries(Object.entries(value).sort(([left], [right]) => left.localeCompare(right)).map(([key, nested]) => [key, canonicalize(nested)]));
|
|
12
|
+
}
|
|
13
|
+
return value;
|
|
14
|
+
};
|
|
15
|
+
const hash = value => {
|
|
16
|
+
let first = 0x811c9dc5;
|
|
17
|
+
let second = 0x01000193;
|
|
18
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
19
|
+
const code = value.charCodeAt(index);
|
|
20
|
+
first = Math.imul(first ^ code, 0x01000193);
|
|
21
|
+
second = Math.imul(second ^ code + index, 0x811c9dc5);
|
|
22
|
+
}
|
|
23
|
+
return `${(first >>> 0).toString(16).padStart(8, "0")}${(second >>> 0).toString(16).padStart(8, "0")}`;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** A short hash of `value` that ignores key order and is the same on every run. */
|
|
27
|
+
export const stableHash = value => hash(JSON.stringify(canonicalize(value)));
|
|
28
|
+
//# sourceMappingURL=stable-hash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["canonicalize","value","Date","toISOString","Array","isArray","map","Object","fromEntries","entries","sort","left","right","localeCompare","key","nested","hash","first","second","index","length","code","charCodeAt","Math","imul","toString","padStart","stableHash","JSON","stringify"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/stable-hash.ts"],"mappings":";;AAAA,MAAMA,YAAY,GAAIC,KAAc,IAAc;EAChD,IAAIA,KAAK,YAAYC,IAAI,EAAE;IACzB,OAAOD,KAAK,CAACE,WAAW,CAAC,CAAC;EAC5B;EAEA,IAAIC,KAAK,CAACC,OAAO,CAACJ,KAAK,CAAC,EAAE;IACxB,OAAOA,KAAK,CAACK,GAAG,CAACN,YAAY,CAAC;EAChC;EAEA,IAAIC,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IACtC,OAAOM,MAAM,CAACC,WAAW,CACvBD,MAAM,CAACE,OAAO,CAACR,KAAK,CAAC,CAClBS,IAAI,CAAC,CAAC,CAACC,IAAI,CAAC,EAAE,CAACC,KAAK,CAAC,KAAKD,IAAI,CAACE,aAAa,CAACD,KAAK,CAAC,CAAC,CACpDN,GAAG,CAAC,CAAC,CAACQ,GAAG,EAAEC,MAAM,CAAC,KAAK,CAACD,GAAG,EAAEd,YAAY,CAACe,MAAM,CAAC,CAAC,CACvD,CAAC;EACH;EAEA,OAAOd,KAAK;AACd,CAAC;AAED,MAAMe,IAAI,GAAIf,KAAa,IAAa;EACtC,IAAIgB,KAAK,GAAG,UAAU;EACtB,IAAIC,MAAM,GAAG,UAAU;EAEvB,KAAK,IAAIC,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAGlB,KAAK,CAACmB,MAAM,EAAED,KAAK,IAAI,CAAC,EAAE;IACpD,MAAME,IAAI,GAAGpB,KAAK,CAACqB,UAAU,CAACH,KAAK,CAAC;IAEpCF,KAAK,GAAGM,IAAI,CAACC,IAAI,CAACP,KAAK,GAAGI,IAAI,EAAE,UAAU,CAAC;IAC3CH,MAAM,GAAGK,IAAI,CAACC,IAAI,CAACN,MAAM,GAAIG,IAAI,GAAGF,KAAM,EAAE,UAAU,CAAC;EACzD;EAEA,OAAO,GAAG,CAACF,KAAK,KAAK,CAAC,EAAEQ,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CACtDR,MAAM,KAAK,CAAC,EACZO,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE;AACnC,CAAC;;AAED;AACA,OAAO,MAAMC,UAAU,GAAI1B,KAAc,IAAae,IAAI,CAACY,IAAI,CAACC,SAAS,CAAC7B,YAAY,CAACC,KAAK,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const INITIAL = {
|
|
4
|
+
adapter: "unknown",
|
|
5
|
+
permission: "unknown",
|
|
6
|
+
scanning: false,
|
|
7
|
+
scanError: null,
|
|
8
|
+
devices: [],
|
|
9
|
+
paired: [],
|
|
10
|
+
readings: []
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/** The runtime's snapshot and its listeners; once closed, it no longer changes. */
|
|
14
|
+
class SnapshotStore {
|
|
15
|
+
snapshot = INITIAL;
|
|
16
|
+
listeners = new Set();
|
|
17
|
+
closed = false;
|
|
18
|
+
get() {
|
|
19
|
+
return this.snapshot;
|
|
20
|
+
}
|
|
21
|
+
subscribe(listener) {
|
|
22
|
+
this.listeners.add(listener);
|
|
23
|
+
return () => this.listeners.delete(listener);
|
|
24
|
+
}
|
|
25
|
+
set(patch) {
|
|
26
|
+
if (this.closed) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
this.snapshot = {
|
|
30
|
+
...this.snapshot,
|
|
31
|
+
...patch
|
|
32
|
+
};
|
|
33
|
+
this.listeners.forEach(listener => listener());
|
|
34
|
+
}
|
|
35
|
+
device(id) {
|
|
36
|
+
return this.snapshot.devices.find(device => device.id === id);
|
|
37
|
+
}
|
|
38
|
+
updateDevice(id, patch) {
|
|
39
|
+
this.set({
|
|
40
|
+
devices: this.snapshot.devices.map(device => device.id === id ? {
|
|
41
|
+
...device,
|
|
42
|
+
...patch
|
|
43
|
+
} : device)
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
updateReadings(update) {
|
|
47
|
+
this.set({
|
|
48
|
+
readings: this.snapshot.readings.map(update)
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
close() {
|
|
52
|
+
this.closed = true;
|
|
53
|
+
this.listeners.clear();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export { SnapshotStore };
|
|
57
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["INITIAL","adapter","permission","scanning","scanError","devices","paired","readings","SnapshotStore","snapshot","listeners","Set","closed","get","subscribe","listener","add","delete","set","patch","forEach","device","id","find","updateDevice","map","updateReadings","update","close","clear"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/store.ts"],"mappings":";;AAEA,MAAMA,OAA0B,GAAG;EACjCC,OAAO,EAAE,SAAS;EAClBC,UAAU,EAAE,SAAS;EACrBC,QAAQ,EAAE,KAAK;EACfC,SAAS,EAAE,IAAI;EACfC,OAAO,EAAE,EAAE;EACXC,MAAM,EAAE,EAAE;EACVC,QAAQ,EAAE;AACZ,CAAC;;AAED;AACA,MAAMC,aAAa,CAAC;EACVC,QAAQ,GAAGT,OAAO;EACTU,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;EAC1CC,MAAM,GAAG,KAAK;EAEfC,GAAGA,CAAA,EAAsB;IAC9B,OAAO,IAAI,CAACJ,QAAQ;EACtB;EAEOK,SAASA,CAACC,QAAoB,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["modules/next/bluetooth/transport.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android-bluetooth-foreground-service.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/components/android-bluetooth-foreground-service.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAI7D,UAAU,wCAAwC;IAChD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mCAAmC,CAAC,EAAE,OAAO,CAAC;CAC/C;AAuBD,eAAO,MAAM,iCAAiC,GAAI,0CAK/C,KAAK,CAAC,iBAAiB,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,wCAAwC,CAAC;IACnD,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;CACzC,CAAC,
|
|
1
|
+
{"version":3,"file":"android-bluetooth-foreground-service.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/components/android-bluetooth-foreground-service.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAI7D,UAAU,wCAAwC;IAChD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mCAAmC,CAAC,EAAE,OAAO,CAAC;CAC/C;AAuBD,eAAO,MAAM,iCAAiC,GAAI,0CAK/C,KAAK,CAAC,iBAAiB,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,wCAAwC,CAAC;IACnD,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;CACzC,CAAC,sBAiFD,CAAC"}
|
package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts
CHANGED
|
@@ -31,5 +31,5 @@ export interface BluetoothDevicePickerProps extends OvokUiProps {
|
|
|
31
31
|
*
|
|
32
32
|
* @group Components
|
|
33
33
|
*/
|
|
34
|
-
export declare const BluetoothDevicePicker: ({
|
|
34
|
+
export declare const BluetoothDevicePicker: ({ title, dismissLabel, labelForDevice, ...props }: BluetoothDevicePickerProps) => React.JSX.Element;
|
|
35
35
|
//# sourceMappingURL=bluetooth-device-picker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bluetooth-device-picker.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/components/bluetooth-device-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"bluetooth-device-picker.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/components/bluetooth-device-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAMhE,8CAA8C;AAC9C,MAAM,WAAW,0BAA2B,SAAQ,WAAW;IAE7D,8BAA8B;IAC9B,OAAO,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAEtC,mCAAmC;IACnC,OAAO,EAAE,OAAO,CAAC;IAEjB,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,6CAA6C;IAC7C,QAAQ,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAE9C,gGAAgG;IAChG,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IAEvB,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,mEAAmE;IACnE,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,MAAM,GAAG,SAAS,CAAC;IAEnE,kFAAkF;IAClF,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,MAAM,CAAC;IAEvD,gFAAgF;IAChF,SAAS,CAAC,EAAE,CACV,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,IAAI,CAAA;KAAE,KAC5B,KAAK,CAAC,SAAS,CAAC;IAErB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,mDAKnC,0BAA0B,sBAQ5B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { OvokUiProps } from "../../ui/types";
|
|
3
|
+
/** Props of the bottom-sheet device list both Bluetooth pickers render. */
|
|
4
|
+
export interface DevicePickerSheetProps<Device extends {
|
|
5
|
+
id: string;
|
|
6
|
+
}> extends OvokUiProps {
|
|
7
|
+
devices: readonly Device[];
|
|
8
|
+
visible: boolean;
|
|
9
|
+
title: string;
|
|
10
|
+
onSelect: (device: Device) => void;
|
|
11
|
+
onDismiss?: () => void;
|
|
12
|
+
dismissLabel: string;
|
|
13
|
+
getDeviceImage?: (device: Device) => string | undefined;
|
|
14
|
+
labelForDevice: (device: Device) => string;
|
|
15
|
+
modelForDevice: (device: Device) => string | undefined;
|
|
16
|
+
renderRow?: (device: Device, actions: {
|
|
17
|
+
select: () => void;
|
|
18
|
+
}) => React.ReactNode;
|
|
19
|
+
testID?: string;
|
|
20
|
+
}
|
|
21
|
+
/** A theme-aware bottom sheet listing devices to pick from. */
|
|
22
|
+
export declare const DevicePickerSheet: <Device extends {
|
|
23
|
+
id: string;
|
|
24
|
+
}>({ devices, visible, title, onSelect, onDismiss, dismissLabel, getDeviceImage, labelForDevice, modelForDevice, renderRow, testID, ...uiProps }: DevicePickerSheetProps<Device>) => React.JSX.Element;
|
|
25
|
+
//# sourceMappingURL=device-picker-sheet.d.ts.map
|
package/lib/typescript/commonjs/src/modules/bt-management/components/device-picker-sheet.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device-picker-sheet.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/components/device-picker-sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,2EAA2E;AAC3E,MAAM,WAAW,sBAAsB,CAAC,MAAM,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAE,SAAQ,WAAW;IACxF,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACxD,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACvD,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC;IACjF,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,+DAA+D;AAC/D,eAAO,MAAM,iBAAiB,GAAI,MAAM,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,+IAa9D,sBAAsB,CAAC,MAAM,CAAC,sBAuEhC,CAAC"}
|
package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-permission.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-bluetooth-permission.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/hooks/use-bluetooth-permission.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"use-bluetooth-permission.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/hooks/use-bluetooth-permission.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAGjF,4CAA4C;AAC5C,UAAU,6BAA6B;IAErC,qDAAqD;IACrD,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,+CAA+C;IAC/C,iBAAiB,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAE3C,oEAAoE;IACpE,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAEjD,+CAA+C;IAC/C,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAC3C;AAuCD,0GAA0G;AAC1G,QAAA,MAAM,0BAA0B,QAAa,OAAO,CAAC,OAAO,CACR,CAAC;AAErD;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,GAAI,8EAK7B,6BAAkC;IAyEjC,iCAAiC;;IAGjC,8CAA8C;mBAhEV,OAAO,CAAC,OAAO,CAAC;IAmEpD,0BAA0B;6BAnEU,OAAO,CAAC,OAAO,CAAC;IAsEpD,6CAA6C;;IAG7C,8DAA8D;;CAGjE,CAAC;AAEF,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,6BAA6B,EAC7B,sBAAsB,GACvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-measurements.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/hooks/use-measurements.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-measurements.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/hooks/use-measurements.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EACL,aAAa,EAGd,MAAM,mBAAmB,CAAC;AAE3B,qCAAqC;AACrC,MAAM,WAAW,sBAAsB;IAErC,kDAAkD;IAClD,MAAM,CAAC,EAAE,YAAY,CAAC;IAEtB,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AA6DD;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,WAAW,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,EAC1C,yBAAsC,sBAA2B,KAChE;IAED,kCAAkC;IAClC,YAAY,EAAE,SAAS,aAAa,EAAE,CAAC;IAEvC,oCAAoC;IACpC,KAAK,EAAE,MAAM,IAAI,CAAC;CAkCnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bt-managed-device.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/bt-management/services/devices/bt-managed-device.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"bt-managed-device.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/bt-management/services/devices/bt-managed-device.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AASxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,C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":"","sources":["../../../../../../../src/modules/bt-management/utils/bluetooth-permission-list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAe,MAAM,0BAA0B,CAAC;AAInE,kFAAkF;AAClF,eAAO,MAAM,uBAAuB,QAAO,UAAU,EAQpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-identity.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/utils/result-identity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"result-identity.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/utils/result-identity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAC/B,YAAY,UAAU,EACtB,MAAM,WAAW,KAChB,MAaF,CAAC;AAEF,4GAA4G;AAC5G,eAAO,MAAM,iBAAiB,GAAI,CAAC,EAAE,OAAO,CAAC,KAAG,CA4B/C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** When a paired device that keeps failing may be connected automatically again. */
|
|
2
|
+
declare class AutoConnectBackoff {
|
|
3
|
+
private readonly failures;
|
|
4
|
+
allows(id: string, now?: number): boolean;
|
|
5
|
+
/** Records a failure; returns how long until the next automatic attempt. */
|
|
6
|
+
failed(id: string, now?: number): number;
|
|
7
|
+
succeeded(id: string): void;
|
|
8
|
+
}
|
|
9
|
+
export { AutoConnectBackoff };
|
|
10
|
+
//# sourceMappingURL=auto-connect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-connect.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/auto-connect.ts"],"names":[],"mappings":"AAGA,oFAAoF;AACpF,cAAM,kBAAkB;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2D;IAE7E,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,SAAa,GAAG,OAAO;IAIpD,4EAA4E;IACrE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,SAAa,GAAG,MAAM;IAS5C,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;CAGnC;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ble-errors.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/ble-plx/ble-errors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAsB,MAAM,WAAW,CAAC;AAiB/D,wFAAwF;AACxF,eAAO,MAAM,YAAY,GAAI,OAAO,OAAO,KAAG,cAQ7C,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Device } from "react-native-ble-plx";
|
|
2
|
+
import { Link } from "../link";
|
|
3
|
+
/** Connects (retrying with backoff) and discovers services; aborting `signal` closes the link. */
|
|
4
|
+
declare function openBleLink(device: Device, signal: AbortSignal): Promise<Link>;
|
|
5
|
+
export { openBleLink };
|
|
6
|
+
//# sourceMappingURL=ble-link.d.ts.map
|
|
@@ -0,0 +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;AAItE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAyH/B,kGAAkG;AAClG,iBAAe,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB7E;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
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;
|
|
7
|
+
/** A scanner over a `react-native-ble-plx` `BleManager`. */
|
|
8
|
+
declare const bleManagerScanner: (bleManager: BleManager) => BluetoothScanner;
|
|
9
|
+
export { bleDeviceOf, bleManagerScanner, blePeripheral };
|
|
10
|
+
//# sourceMappingURL=ble-scanner.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AcceptedDevice } from "../../../bt-management/types/accepted-device";
|
|
2
|
+
import { DeviceSupport } from "../devices";
|
|
3
|
+
/** Support for the SDK's integrated devices and `defineCustomDevice` declarations, over `react-native-ble-plx`. */
|
|
4
|
+
declare const builtInDevices: (accepted: readonly AcceptedDevice[]) => DeviceSupport;
|
|
5
|
+
export { builtInDevices };
|
|
6
|
+
//# sourceMappingURL=built-in-devices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"built-in-devices.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/ble-plx/built-in-devices.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAM3C,mHAAmH;AACnH,QAAA,MAAM,cAAc,GAAI,UAAU,SAAS,cAAc,EAAE,KAAG,aAgB7D,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DeviceCreator } from "../../../bt-management/services/device-creator";
|
|
2
|
+
import { AcceptedDevice } from "../../../bt-management/types/accepted-device";
|
|
3
|
+
import { DeviceKey } from "../../../bt-management/types/device-key";
|
|
4
|
+
import { Driver } from "../driver";
|
|
5
|
+
/** Runs a device class from `@ovok/native/bt-management` until its protocol moves to a `DeviceProtocol`. */
|
|
6
|
+
declare const legacyDriver: (creator: DeviceCreator<readonly AcceptedDevice[]>, deviceName: DeviceKey) => Driver;
|
|
7
|
+
export { legacyDriver };
|
|
8
|
+
//# sourceMappingURL=legacy-driver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy-driver.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/ble-plx/legacy-driver.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,OAAO,EAAe,MAAM,EAAiB,MAAM,WAAW,CAAC;AAW/D,4GAA4G;AAC5G,QAAA,MAAM,YAAY,GAAI,SAAS,aAAa,CAAC,SAAS,cAAc,EAAE,CAAC,EAAE,YAAY,SAAS,KAAG,MAkC9F,CAAC;AAEJ,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Driver } from "./driver";
|
|
2
|
+
import { ReadingLog } from "./readings";
|
|
3
|
+
import { ResultPolicy } from "./result-policy";
|
|
4
|
+
import { SnapshotStore } from "./store";
|
|
5
|
+
import { Peripheral } from "./transport";
|
|
6
|
+
/** One driver run per connected device, its events folded into the snapshot. */
|
|
7
|
+
declare class Connections {
|
|
8
|
+
private readonly store;
|
|
9
|
+
private readonly readings;
|
|
10
|
+
private readonly policy;
|
|
11
|
+
private readonly onEnded;
|
|
12
|
+
private readonly sessions;
|
|
13
|
+
constructor(store: SnapshotStore, readings: ReadingLog, policy: ResultPolicy, onEnded: (id: string) => void);
|
|
14
|
+
isActive(id: string): boolean;
|
|
15
|
+
/** Resolves once connected; joins a connection still opening or open, and waits out one being closed. */
|
|
16
|
+
connect(peripheral: Peripheral, driver: Driver): Promise<void>;
|
|
17
|
+
disconnect(id: string): Promise<void>;
|
|
18
|
+
/** Disconnects every device; resolves once every connection has ended. */
|
|
19
|
+
disconnectAll(): Promise<void>;
|
|
20
|
+
private start;
|
|
21
|
+
private run;
|
|
22
|
+
private apply;
|
|
23
|
+
}
|
|
24
|
+
export { Connections };
|
|
25
|
+
//# sourceMappingURL=connections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connections.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/connections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,MAAM,EAAE,MAAM,UAAU,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAgB,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAOzC,gFAAgF;AAChF,cAAM,WAAW;IAIb,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAN1B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA8B;gBAGpC,KAAK,EAAE,aAAa,EACpB,QAAQ,EAAE,UAAU,EACpB,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI;IAGzC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAIpC,yGAAyG;IAC5F,OAAO,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAY9D,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOlD,0EAA0E;IAC7D,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3C,OAAO,CAAC,KAAK;YAsCC,GAAG;IAMjB,OAAO,CAAC,KAAK;CAgBd;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daily-total-day.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/daily-total-day.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,aAAa,GACxB,MAAM,MAAM,EACZ,KAAK,MAAM,KACV,MAAM,GAAG,SAUX,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DeviceProtocol, Driver } from "./driver";
|
|
2
|
+
import { Advertisement } from "./transport";
|
|
3
|
+
/** A peripheral a support recognised: the device key its readings carry and the driver that runs it. */
|
|
4
|
+
type DeviceMatch = {
|
|
5
|
+
/** Device key reported on its readings. */
|
|
6
|
+
key: string;
|
|
7
|
+
/** The driver that talks to it. */
|
|
8
|
+
driver: Driver;
|
|
9
|
+
};
|
|
10
|
+
/** Recognises peripherals by their advertisement. */
|
|
11
|
+
interface DeviceSupport {
|
|
12
|
+
/** The match for a peripheral this support handles, or `undefined`. */
|
|
13
|
+
match(advertisement: Advertisement): DeviceMatch | undefined;
|
|
14
|
+
}
|
|
15
|
+
/** A device a third party adds: how to recognise it and the protocol that reads it. */
|
|
16
|
+
type DeviceDefinition = {
|
|
17
|
+
/** Device key reported on its readings; unique among the devices a runtime supports. */
|
|
18
|
+
key: string;
|
|
19
|
+
/** Whether an advertisement is this device. */
|
|
20
|
+
matches: (advertisement: Advertisement) => boolean;
|
|
21
|
+
/** The conversation that turns the device's bytes into readings; give each stored reading its `recordedAt`. */
|
|
22
|
+
protocol: DeviceProtocol;
|
|
23
|
+
};
|
|
24
|
+
/** Support for one device a third party defines with its own protocol. */
|
|
25
|
+
declare const defineDevice: ({ key, matches, protocol }: DeviceDefinition) => DeviceSupport;
|
|
26
|
+
/** The first support's match for an advertisement. */
|
|
27
|
+
declare const matchDevice: (devices: readonly DeviceSupport[], advertisement: Advertisement) => DeviceMatch | undefined;
|
|
28
|
+
export { defineDevice, matchDevice };
|
|
29
|
+
export type { DeviceDefinition, DeviceMatch, DeviceSupport };
|
|
30
|
+
//# sourceMappingURL=devices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devices.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/devices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAc,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,wGAAwG;AACxG,KAAK,WAAW,GAAG;IAEjB,2CAA2C;IAC3C,GAAG,EAAE,MAAM,CAAC;IAEZ,mCAAmC;IACnC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,qDAAqD;AACrD,UAAU,aAAa;IAErB,uEAAuE;IACvE,KAAK,CAAC,aAAa,EAAE,aAAa,GAAG,WAAW,GAAG,SAAS,CAAC;CAC9D;AAED,uFAAuF;AACvF,KAAK,gBAAgB,GAAG;IAEtB,wFAAwF;IACxF,GAAG,EAAE,MAAM,CAAC;IAEZ,+CAA+C;IAC/C,OAAO,EAAE,CAAC,aAAa,EAAE,aAAa,KAAK,OAAO,CAAC;IAEnD,+GAA+G;IAC/G,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,0EAA0E;AAC1E,QAAA,MAAM,YAAY,GAAI,4BAA4B,gBAAgB,KAAG,aAIpE,CAAC;AAEF,sDAAsD;AACtD,QAAA,MAAM,WAAW,GAAI,SAAS,SAAS,aAAa,EAAE,EAAE,eAAe,aAAa,KAAG,WAAW,GAAG,SAUpG,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;AACrC,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
import { Measurement } from "@ovok/core/next";
|
|
2
|
-
import {
|
|
3
|
-
import { BluetoothError } from "../../bt-management/types/bluetooth-error";
|
|
4
|
-
import { DeviceConnectionEvent } from "../../bt-management/types/device-connection-event";
|
|
5
|
-
import { DeviceKey } from "../../bt-management/types/device-key";
|
|
6
|
-
import { DeviceStatus } from "../../bt-management/types/device-status";
|
|
2
|
+
import { BluetoothError } from "./errors";
|
|
7
3
|
import { Link } from "./link";
|
|
4
|
+
import { Peripheral } from "./transport";
|
|
5
|
+
/** What a driver reports while it runs. */
|
|
8
6
|
type DeviceEvent = {
|
|
7
|
+
/** The connection moved on. */
|
|
9
8
|
kind: "status";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
/** Where it stands now. */
|
|
10
|
+
status: "connected" | "measuring" | "disconnected";
|
|
11
|
+
} | {
|
|
12
|
+
/** The device sent a reading. */
|
|
14
13
|
kind: "reading";
|
|
15
|
-
|
|
14
|
+
/** Names the reading so a resend is recognised; `null` when it has none, and then it is never deduplicated. */
|
|
15
|
+
id: string | null;
|
|
16
|
+
/** The decoded reading. */
|
|
16
17
|
reading: Measurement;
|
|
17
18
|
} | {
|
|
18
|
-
|
|
19
|
-
event: Omit<DeviceConnectionEvent, "deviceData">;
|
|
20
|
-
} | {
|
|
19
|
+
/** The device or its protocol reported an error; the connection may continue. */
|
|
21
20
|
kind: "error";
|
|
22
|
-
|
|
21
|
+
/** The error. */
|
|
22
|
+
error: BluetoothError;
|
|
23
23
|
};
|
|
24
|
-
/** Connects to a
|
|
25
|
-
type Driver = (
|
|
24
|
+
/** Connects to a peripheral and reports what happens until it disconnects or `signal` aborts. */
|
|
25
|
+
type Driver = (peripheral: Peripheral, signal: AbortSignal) => AsyncIterable<DeviceEvent>;
|
|
26
26
|
/** One device's conversation over a link, as the readings it produces. */
|
|
27
27
|
type DeviceProtocol = (link: Link) => AsyncIterable<Measurement>;
|
|
28
|
-
/**
|
|
29
|
-
declare const
|
|
30
|
-
|
|
28
|
+
/** Whether a reading carries the time it was taken, which makes a stored reading recognisable when resent. */
|
|
29
|
+
declare const isTimestamped: (reading: Measurement) => boolean;
|
|
30
|
+
/** Runs a protocol over a fresh link. */
|
|
31
|
+
declare const gattDriver: (key: string, protocol: DeviceProtocol) => Driver;
|
|
32
|
+
export { gattDriver, isTimestamped };
|
|
31
33
|
export type { DeviceEvent, DeviceProtocol, Driver };
|
|
32
34
|
//# sourceMappingURL=driver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/driver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/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BluetoothErrorCode = "permission-denied" | "powered-off" | "unsupported" | "scan-failed" | "connection-failed" | "pairing-required" | "discovery-failed" | "device-error" | "frame-invalid" | "measurement-failed" | "device-not-found" | "runtime-disposed" | "save-failed" | "unknown";
|
|
3
|
+
/** Every failure the Bluetooth runtime reports; `cause` holds the underlying error, when any. */
|
|
4
|
+
declare class BluetoothError extends Error {
|
|
5
|
+
/** Why it failed. */
|
|
6
|
+
readonly code: BluetoothErrorCode;
|
|
7
|
+
/** Always `"BluetoothError"`. */
|
|
8
|
+
readonly name = "BluetoothError";
|
|
9
|
+
constructor(
|
|
10
|
+
/** Why it failed. */
|
|
11
|
+
code: BluetoothErrorCode, message: string, cause?: unknown);
|
|
12
|
+
}
|
|
13
|
+
/** `error` as a `BluetoothError`, classified as `code` unless it already is one. */
|
|
14
|
+
declare const asBluetoothError: (error: unknown, code: BluetoothErrorCode) => BluetoothError;
|
|
15
|
+
export { asBluetoothError, BluetoothError };
|
|
16
|
+
export type { BluetoothErrorCode };
|
|
17
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/errors.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,KAAK,kBAAkB,GACnB,mBAAmB,GACnB,aAAa,GACb,aAAa,GACb,aAAa,GACb,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,GACf,oBAAoB,GACpB,kBAAkB,GAClB,kBAAkB,GAClB,aAAa,GACb,SAAS,CAAC;AAEd,iGAAiG;AACjG,cAAM,cAAe,SAAQ,KAAK;IAM9B,qBAAqB;aACL,IAAI,EAAE,kBAAkB;IAN1C,iCAAiC;IACjC,SAAgB,IAAI,oBAAoB;;IAItC,qBAAqB;IACL,IAAI,EAAE,kBAAkB,EACxC,OAAO,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,OAAO;CAIlB;AAED,oFAAoF;AACpF,QAAA,MAAM,gBAAgB,GAAI,OAAO,OAAO,EAAE,MAAM,kBAAkB,KAAG,cAGwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAC;AAC5C,YAAY,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,9 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Bluetooth for `@ovok/native/next`, in layers: the framework-free `BluetoothRuntime` and its ports, device drivers,
|
|
3
|
+
* the `react-native-ble-plx` and React Native adapters, React hooks over the runtime, and optional UI built only from
|
|
4
|
+
* those hooks.
|
|
5
|
+
*
|
|
6
|
+
* Import from `@ovok/native/next/bluetooth`.
|
|
7
|
+
*
|
|
8
|
+
* @module next/bluetooth
|
|
9
|
+
*/
|
|
10
|
+
export { BluetoothRuntime } from "./runtime";
|
|
11
|
+
export type { BluetoothRuntimeOptions } from "./runtime";
|
|
12
|
+
export { BluetoothError } from "./errors";
|
|
13
|
+
export type { BluetoothErrorCode } from "./errors";
|
|
14
|
+
export type { BluetoothSnapshot, ConnectionState, DeviceReading, NearbyDevice, SaveState } from "./snapshot";
|
|
15
|
+
export type { AdapterState, Advertisement, BluetoothScanner, Peripheral } from "./transport";
|
|
16
|
+
export type { BluetoothPermission, BluetoothPermissions } from "./permissions";
|
|
17
|
+
export type { ReadingSink, SaveResult } from "./sink";
|
|
18
|
+
export { defineDevice } from "./devices";
|
|
19
|
+
export type { DeviceDefinition, DeviceMatch, DeviceSupport } from "./devices";
|
|
2
20
|
export type { DeviceEvent, DeviceProtocol, Driver } from "./driver";
|
|
3
|
-
export { createDrivers } from "./drivers";
|
|
4
|
-
export { openBleLink } from "./link";
|
|
5
21
|
export type { Link } from "./link";
|
|
6
22
|
export { dailyTotalsOnly, everyReading, firstReadingPerKind, keepReadings, policyByKind } from "./result-policy";
|
|
7
23
|
export type { ResultPolicy } from "./result-policy";
|
|
8
24
|
export { SIG_PROTOCOLS } from "./sig-profiles";
|
|
25
|
+
export { bleManagerScanner } from "./ble-plx/ble-scanner";
|
|
26
|
+
export { builtInDevices } from "./ble-plx/built-in-devices";
|
|
27
|
+
export { IntegratedDevices } from "../../bt-management/types/integrated-devices";
|
|
28
|
+
export type { AcceptedDevice } from "../../bt-management/types/accepted-device";
|
|
29
|
+
export { osBluetoothPermissions } from "./react-native/os-permissions";
|
|
30
|
+
export { ovokReadingSink } from "./react-native/ovok-sink";
|
|
31
|
+
export { createBluetoothRuntime } from "./react-native/create-bluetooth-runtime";
|
|
32
|
+
export type { CreateBluetoothRuntimeOptions } from "./react-native/create-bluetooth-runtime";
|
|
33
|
+
export { BluetoothProvider, useBluetooth } from "./react/context";
|
|
34
|
+
export type { BluetoothProviderProps } from "./react/context";
|
|
35
|
+
export { useBluetoothPermission, useBluetoothState, useMeasurements, useNearbyDevice, useNearbyDevices, usePairedDevices, useScanning, } from "./react/hooks";
|
|
36
|
+
export { BluetoothDevicePicker } from "./react/bluetooth-device-picker";
|
|
37
|
+
export type { BluetoothDevicePickerProps } from "./react/bluetooth-device-picker";
|
|
9
38
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,YAAY,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACnD,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE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OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,YAAY,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { Device } from "react-native-ble-plx";
|
|
2
1
|
/** An open GATT connection: bytes in, bytes out, no knowledge of any device. */
|
|
3
2
|
type Link = {
|
|
4
3
|
/** Notified or indicated values until the connection drops. */
|
|
5
4
|
subscribe(service: string, characteristic: string): AsyncIterable<Uint8Array>;
|
|
5
|
+
/** Writes bytes to a characteristic, with response. */
|
|
6
6
|
write(service: string, characteristic: string, bytes: Uint8Array): Promise<void>;
|
|
7
|
+
/** Ends every subscription and disconnects. */
|
|
7
8
|
close(): Promise<void>;
|
|
8
9
|
};
|
|
9
|
-
/** Connects (retrying with backoff) and discovers services; aborting `signal` closes the link. */
|
|
10
|
-
declare function openBleLink(device: Device, signal: AbortSignal): Promise<Link>;
|
|
11
|
-
export { openBleLink };
|
|
12
10
|
export type { Link };
|
|
13
11
|
//# sourceMappingURL=link.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/link.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/link.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,KAAK,IAAI,GAAG;IAEV,+DAA+D;IAC/D,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;IAE9E,uDAAuD;IACvD,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjF,+CAA+C;IAC/C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB,CAAC;AAEF,YAAY,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { OvokStorage } from "@ovok/core/next";
|
|
2
|
+
/** The paired device IDs, persisted when storage is given. */
|
|
3
|
+
declare class PairedDevices {
|
|
4
|
+
private readonly onChange;
|
|
5
|
+
private readonly storage?;
|
|
6
|
+
private readonly key;
|
|
7
|
+
private ids;
|
|
8
|
+
private readonly loaded;
|
|
9
|
+
constructor(onChange: (ids: readonly string[]) => void, storage?: OvokStorage | undefined, key?: string);
|
|
10
|
+
has(id: string): boolean;
|
|
11
|
+
add(id: string): Promise<void>;
|
|
12
|
+
remove(id: string): Promise<void>;
|
|
13
|
+
/** Waits for the stored list, so a change never overwrites IDs not read yet. */
|
|
14
|
+
private change;
|
|
15
|
+
private load;
|
|
16
|
+
}
|
|
17
|
+
export { PairedDevices };
|
|
18
|
+
//# sourceMappingURL=paired.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paired.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/paired.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAc9C,8DAA8D;AAC9D,cAAM,aAAa;IAKf,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;IACzB,OAAO,CAAC,QAAQ,CAAC,GAAG;IANtB,OAAO,CAAC,GAAG,CAAyB;IACpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;gBAGpB,QAAQ,EAAE,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,KAAK,IAAI,EAC1C,OAAO,CAAC,EAAE,WAAW,YAAA,EACrB,GAAG,SAAqB;IAKpC,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAIlB,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9B,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9C,gFAAgF;YAClE,MAAM;YAON,IAAI;CAMnB;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Whether the app may use Bluetooth; `blocked` means only the system settings can grant it. */
|
|
2
|
+
type BluetoothPermission = "granted" | "denied" | "blocked";
|
|
3
|
+
/** The OS permission prompts Bluetooth needs. */
|
|
4
|
+
interface BluetoothPermissions {
|
|
5
|
+
/** The current permission, without prompting. */
|
|
6
|
+
check(): Promise<BluetoothPermission>;
|
|
7
|
+
/** Prompts for the permission when the OS still can, and resolves to the outcome. */
|
|
8
|
+
request(): Promise<BluetoothPermission>;
|
|
9
|
+
/** Opens the app's system settings, where a blocked permission can be granted. */
|
|
10
|
+
openSettings(): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export type { BluetoothPermission, BluetoothPermissions };
|
|
13
|
+
//# sourceMappingURL=permissions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/permissions.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,KAAK,mBAAmB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE5D,iDAAiD;AACjD,UAAU,oBAAoB;IAE5B,iDAAiD;IACjD,KAAK,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAEtC,qFAAqF;IACrF,OAAO,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAExC,kFAAkF;IAClF,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,CAAC"}
|