@ovok/native 1.16.1-rc.4 → 1.16.1-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-peripheral.js +35 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-peripheral.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-scanner.js +3 -30
- package/lib/commonjs/modules/next/bluetooth/ble-plx/ble-scanner.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js +2 -2
- package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/react-native/ovok-sink.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/web/create-web-bluetooth-runtime.js +28 -0
- package/lib/commonjs/modules/next/bluetooth/web/create-web-bluetooth-runtime.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/web/index.js +208 -0
- package/lib/commonjs/modules/next/bluetooth/web/index.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-ble-device.js +143 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-ble-device.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-ble-shapes.js +43 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-ble-shapes.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-permissions.js +21 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-permissions.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-scanner.js +133 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-scanner.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-services.js +28 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-services.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-values.js +37 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth-values.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth.types.js +2 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-bluetooth.types.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-gatt.js +83 -0
- package/lib/commonjs/modules/next/bluetooth/web/web-gatt.js.map +1 -0
- package/lib/commonjs/modules/next/breathing-exercise/index.js +17 -0
- package/lib/commonjs/modules/next/breathing-exercise/index.js.map +1 -0
- package/lib/commonjs/modules/next/cms/index.js +17 -0
- package/lib/commonjs/modules/next/cms/index.js.map +1 -0
- package/lib/commonjs/modules/next/content/index.js +17 -0
- package/lib/commonjs/modules/next/content/index.js.map +1 -0
- package/lib/commonjs/modules/next/diary/index.js +17 -0
- package/lib/commonjs/modules/next/diary/index.js.map +1 -0
- package/lib/commonjs/modules/next/image/index.js +17 -0
- package/lib/commonjs/modules/next/image/index.js.map +1 -0
- package/lib/commonjs/modules/next/journal/index.js +17 -0
- package/lib/commonjs/modules/next/journal/index.js.map +1 -0
- package/lib/commonjs/modules/next/language-switcher/index.js +17 -0
- package/lib/commonjs/modules/next/language-switcher/index.js.map +1 -0
- package/lib/commonjs/modules/next/measurement/index.js +17 -0
- package/lib/commonjs/modules/next/measurement/index.js.map +1 -0
- package/lib/commonjs/modules/next/observation-detail/index.js +17 -0
- package/lib/commonjs/modules/next/observation-detail/index.js.map +1 -0
- package/lib/commonjs/modules/next/patient/index.js +17 -0
- package/lib/commonjs/modules/next/patient/index.js.map +1 -0
- package/lib/commonjs/modules/next/pdf/index.js +17 -0
- package/lib/commonjs/modules/next/pdf/index.js.map +1 -0
- package/lib/commonjs/modules/next/picker-sheet/index.js +17 -0
- package/lib/commonjs/modules/next/picker-sheet/index.js.map +1 -0
- package/lib/commonjs/modules/next/progress-bar/index.js +17 -0
- package/lib/commonjs/modules/next/progress-bar/index.js.map +1 -0
- package/lib/commonjs/modules/next/progress-ring/index.js +17 -0
- package/lib/commonjs/modules/next/progress-ring/index.js.map +1 -0
- package/lib/commonjs/modules/next/setting/index.js +17 -0
- package/lib/commonjs/modules/next/setting/index.js.map +1 -0
- package/lib/commonjs/modules/next/tab/index.js +17 -0
- package/lib/commonjs/modules/next/tab/index.js.map +1 -0
- package/lib/commonjs/modules/next/theme/index.js +17 -0
- package/lib/commonjs/modules/next/theme/index.js.map +1 -0
- package/lib/commonjs/modules/next/tile/index.js +17 -0
- package/lib/commonjs/modules/next/tile/index.js.map +1 -0
- package/lib/commonjs/modules/next/ui/index.js +17 -0
- package/lib/commonjs/modules/next/ui/index.js.map +1 -0
- package/lib/module/modules/next/bluetooth/ble-plx/ble-peripheral.js +30 -0
- package/lib/module/modules/next/bluetooth/ble-plx/ble-peripheral.js.map +1 -0
- package/lib/module/modules/next/bluetooth/ble-plx/ble-scanner.js +2 -27
- package/lib/module/modules/next/bluetooth/ble-plx/ble-scanner.js.map +1 -1
- package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js +1 -1
- package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -1
- package/lib/module/modules/next/bluetooth/react-native/ovok-sink.js.map +1 -1
- package/lib/module/modules/next/bluetooth/web/create-web-bluetooth-runtime.js +25 -0
- package/lib/module/modules/next/bluetooth/web/create-web-bluetooth-runtime.js.map +1 -0
- package/lib/module/modules/next/bluetooth/web/index.js +28 -0
- package/lib/module/modules/next/bluetooth/web/index.js.map +1 -0
- package/lib/module/modules/next/bluetooth/web/web-ble-device.js +140 -0
- package/lib/module/modules/next/bluetooth/web/web-ble-device.js.map +1 -0
- package/lib/module/modules/next/bluetooth/web/web-ble-shapes.js +39 -0
- package/lib/module/modules/next/bluetooth/web/web-ble-shapes.js.map +1 -0
- package/lib/module/modules/next/bluetooth/web/web-bluetooth-permissions.js +18 -0
- package/lib/module/modules/next/bluetooth/web/web-bluetooth-permissions.js.map +1 -0
- package/lib/module/modules/next/bluetooth/web/web-bluetooth-scanner.js +128 -0
- package/lib/module/modules/next/bluetooth/web/web-bluetooth-scanner.js.map +1 -0
- package/lib/module/modules/next/bluetooth/web/web-bluetooth-services.js +25 -0
- package/lib/module/modules/next/bluetooth/web/web-bluetooth-services.js.map +1 -0
- package/lib/module/modules/next/bluetooth/web/web-bluetooth-values.js +29 -0
- package/lib/module/modules/next/bluetooth/web/web-bluetooth-values.js.map +1 -0
- package/lib/module/modules/next/bluetooth/web/web-bluetooth.types.js +2 -0
- package/lib/module/modules/next/bluetooth/web/web-bluetooth.types.js.map +1 -0
- package/lib/module/modules/next/bluetooth/web/web-gatt.js +79 -0
- package/lib/module/modules/next/bluetooth/web/web-gatt.js.map +1 -0
- package/lib/module/modules/next/breathing-exercise/index.js +5 -0
- package/lib/module/modules/next/breathing-exercise/index.js.map +1 -0
- package/lib/module/modules/next/cms/index.js +5 -0
- package/lib/module/modules/next/cms/index.js.map +1 -0
- package/lib/module/modules/next/content/index.js +5 -0
- package/lib/module/modules/next/content/index.js.map +1 -0
- package/lib/module/modules/next/diary/index.js +5 -0
- package/lib/module/modules/next/diary/index.js.map +1 -0
- package/lib/module/modules/next/image/index.js +5 -0
- package/lib/module/modules/next/image/index.js.map +1 -0
- package/lib/module/modules/next/journal/index.js +5 -0
- package/lib/module/modules/next/journal/index.js.map +1 -0
- package/lib/module/modules/next/language-switcher/index.js +5 -0
- package/lib/module/modules/next/language-switcher/index.js.map +1 -0
- package/lib/module/modules/next/measurement/index.js +5 -0
- package/lib/module/modules/next/measurement/index.js.map +1 -0
- package/lib/module/modules/next/observation-detail/index.js +5 -0
- package/lib/module/modules/next/observation-detail/index.js.map +1 -0
- package/lib/module/modules/next/patient/index.js +5 -0
- package/lib/module/modules/next/patient/index.js.map +1 -0
- package/lib/module/modules/next/pdf/index.js +5 -0
- package/lib/module/modules/next/pdf/index.js.map +1 -0
- package/lib/module/modules/next/picker-sheet/index.js +5 -0
- package/lib/module/modules/next/picker-sheet/index.js.map +1 -0
- package/lib/module/modules/next/progress-bar/index.js +5 -0
- package/lib/module/modules/next/progress-bar/index.js.map +1 -0
- package/lib/module/modules/next/progress-ring/index.js +5 -0
- package/lib/module/modules/next/progress-ring/index.js.map +1 -0
- package/lib/module/modules/next/setting/index.js +5 -0
- package/lib/module/modules/next/setting/index.js.map +1 -0
- package/lib/module/modules/next/tab/index.js +5 -0
- package/lib/module/modules/next/tab/index.js.map +1 -0
- package/lib/module/modules/next/theme/index.js +5 -0
- package/lib/module/modules/next/theme/index.js.map +1 -0
- package/lib/module/modules/next/tile/index.js +5 -0
- package/lib/module/modules/next/tile/index.js.map +1 -0
- package/lib/module/modules/next/ui/index.js +5 -0
- package/lib/module/modules/next/ui/index.js.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-link.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-link.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts +3 -7
- package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/ovok-sink.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/next/bluetooth/react-native/ovok-sink.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts +23 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts +41 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-device.d.ts +53 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-shapes.d.ts +27 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-ble-shapes.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts +29 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts +56 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-gatt.d.ts +27 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/web-gatt.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/breathing-exercise/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/breathing-exercise/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/cms/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/cms/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/content/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/content/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/diary/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/diary/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/image/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/image/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/journal/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/journal/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/language-switcher/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/language-switcher/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/measurement/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/measurement/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/observation-detail/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/observation-detail/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/patient/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/patient/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/pdf/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/pdf/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/picker-sheet/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/picker-sheet/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/progress-bar/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/progress-bar/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/progress-ring/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/progress-ring/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/setting/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/setting/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/tab/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/tab/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/theme/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/theme/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/tile/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/tile/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/ui/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/ui/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-link.d.ts +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-link.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts +8 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-peripheral.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts +3 -7
- package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/ble-scanner.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/react-native/ovok-sink.d.ts +2 -2
- package/lib/typescript/module/src/modules/next/bluetooth/react-native/ovok-sink.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts +23 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/create-web-bluetooth-runtime.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts +41 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-device.d.ts +53 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-shapes.d.ts +27 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-ble-shapes.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts +8 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-permissions.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts +29 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-scanner.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts +10 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-services.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts +9 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth-values.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts +56 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-bluetooth.types.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-gatt.d.ts +27 -0
- package/lib/typescript/module/src/modules/next/bluetooth/web/web-gatt.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/breathing-exercise/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/breathing-exercise/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/cms/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/cms/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/content/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/content/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/diary/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/diary/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/image/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/image/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/journal/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/journal/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/language-switcher/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/language-switcher/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/measurement/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/measurement/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/observation-detail/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/observation-detail/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/patient/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/patient/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/pdf/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/pdf/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/picker-sheet/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/picker-sheet/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/progress-bar/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/progress-bar/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/progress-ring/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/progress-ring/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/setting/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/setting/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/tab/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/tab/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/theme/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/theme/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/tile/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/tile/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/ui/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/ui/index.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _index = require("../../progress-ring/index.js");
|
|
7
|
+
Object.keys(_index).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _index[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _index[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_index","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../../src","sources":["modules/next/progress-ring/index.ts"],"mappings":";;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _index = require("../../setting/index.js");
|
|
7
|
+
Object.keys(_index).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _index[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _index[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_index","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../../src","sources":["modules/next/setting/index.ts"],"mappings":";;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _index = require("../../tab/index.js");
|
|
7
|
+
Object.keys(_index).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _index[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _index[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_index","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../../src","sources":["modules/next/tab/index.ts"],"mappings":";;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _index = require("../../theme/index.js");
|
|
7
|
+
Object.keys(_index).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _index[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _index[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_index","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../../src","sources":["modules/next/theme/index.ts"],"mappings":";;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _index = require("../../tile/index.js");
|
|
7
|
+
Object.keys(_index).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _index[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _index[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_index","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../../src","sources":["modules/next/tile/index.ts"],"mappings":";;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _index = require("../../ui/index.js");
|
|
7
|
+
Object.keys(_index).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _index[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _index[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_index","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../../src","sources":["modules/next/ui/index.ts"],"mappings":";;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { openBleLink } from "./ble-link.js";
|
|
4
|
+
const bleDevices = new WeakMap();
|
|
5
|
+
|
|
6
|
+
/** The `react-native-ble-plx` device behind a peripheral that `blePeripheral` made. */
|
|
7
|
+
const bleDeviceOf = peripheral => {
|
|
8
|
+
const device = bleDevices.get(peripheral);
|
|
9
|
+
if (!device) {
|
|
10
|
+
throw new Error("The peripheral was not made by blePeripheral");
|
|
11
|
+
}
|
|
12
|
+
return device;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** A `react-native-ble-plx` device, or a device with the same API such as a Web Bluetooth one, as a peripheral. */
|
|
16
|
+
const blePeripheral = device => {
|
|
17
|
+
const peripheral = {
|
|
18
|
+
id: device.id,
|
|
19
|
+
advertisement: {
|
|
20
|
+
name: device.name?.trim() || device.localName?.trim() || "",
|
|
21
|
+
serviceUUIDs: device.serviceUUIDs ?? [],
|
|
22
|
+
manufacturerData: device.manufacturerData ?? null
|
|
23
|
+
},
|
|
24
|
+
openLink: signal => openBleLink(device, signal)
|
|
25
|
+
};
|
|
26
|
+
bleDevices.set(peripheral, device);
|
|
27
|
+
return peripheral;
|
|
28
|
+
};
|
|
29
|
+
export { bleDeviceOf, blePeripheral };
|
|
30
|
+
//# sourceMappingURL=ble-peripheral.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["openBleLink","bleDevices","WeakMap","bleDeviceOf","peripheral","device","get","Error","blePeripheral","id","advertisement","name","trim","localName","serviceUUIDs","manufacturerData","openLink","signal","set"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/ble-peripheral.ts"],"mappings":";;AAIA,SAASA,WAAW,QAAQ,eAAY;AAExC,MAAMC,UAAU,GAAG,IAAIC,OAAO,CAAqB,CAAC;;AAEpD;AACA,MAAMC,WAAW,GAAIC,UAAsB,IAAa;EACtD,MAAMC,MAAM,GAAGJ,UAAU,CAACK,GAAG,CAACF,UAAU,CAAC;EAEzC,IAAI,CAACC,MAAM,EAAE;IACX,MAAM,IAAIE,KAAK,CAAC,8CAA8C,CAAC;EACjE;EAEA,OAAOF,MAAM;AACf,CAAC;;AAED;AACA,MAAMG,aAAa,GAAIH,MAAc,IAAiB;EACpD,MAAMD,UAAsB,GAAG;IAC7BK,EAAE,EAAEJ,MAAM,CAACI,EAAE;IACbC,aAAa,EAAE;MACbC,IAAI,EAAEN,MAAM,CAACM,IAAI,EAAEC,IAAI,CAAC,CAAC,IAAIP,MAAM,CAACQ,SAAS,EAAED,IAAI,CAAC,CAAC,IAAI,EAAE;MAC3DE,YAAY,EAAET,MAAM,CAACS,YAAY,IAAI,EAAE;MACvCC,gBAAgB,EAAEV,MAAM,CAACU,gBAAgB,IAAI;IAC/C,CAAC;IACDC,QAAQ,EAAGC,MAAM,IAAKjB,WAAW,CAACK,MAAM,EAAEY,MAAM;EAClD,CAAC;EAEDhB,UAAU,CAACiB,GAAG,CAACd,UAAU,EAAEC,MAAM,CAAC;EAElC,OAAOD,UAAU;AACnB,CAAC;AAED,SAASD,WAAW,EAAEK,aAAa","ignoreList":[]}
|
|
@@ -2,38 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import { ScanMode, State } from "react-native-ble-plx";
|
|
4
4
|
import { fromBleError } from "./ble-errors.js";
|
|
5
|
-
import {
|
|
5
|
+
import { blePeripheral } from "./ble-peripheral.js";
|
|
6
6
|
const ADAPTER_STATES = {
|
|
7
7
|
[State.PoweredOn]: "on",
|
|
8
8
|
[State.PoweredOff]: "off",
|
|
9
9
|
[State.Unauthorized]: "unauthorized",
|
|
10
10
|
[State.Unsupported]: "unsupported"
|
|
11
11
|
};
|
|
12
|
-
const bleDevices = new WeakMap();
|
|
13
|
-
|
|
14
|
-
/** The `react-native-ble-plx` device behind a peripheral this adapter reported. */
|
|
15
|
-
const bleDeviceOf = peripheral => {
|
|
16
|
-
const device = bleDevices.get(peripheral);
|
|
17
|
-
if (!device) {
|
|
18
|
-
throw new Error("The peripheral was not found by bleManagerScanner");
|
|
19
|
-
}
|
|
20
|
-
return device;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
/** A `react-native-ble-plx` device as a peripheral. */
|
|
24
|
-
const blePeripheral = device => {
|
|
25
|
-
const peripheral = {
|
|
26
|
-
id: device.id,
|
|
27
|
-
advertisement: {
|
|
28
|
-
name: device.name?.trim() || device.localName?.trim() || "",
|
|
29
|
-
serviceUUIDs: device.serviceUUIDs ?? [],
|
|
30
|
-
manufacturerData: device.manufacturerData ?? null
|
|
31
|
-
},
|
|
32
|
-
openLink: signal => openBleLink(device, signal)
|
|
33
|
-
};
|
|
34
|
-
bleDevices.set(peripheral, device);
|
|
35
|
-
return peripheral;
|
|
36
|
-
};
|
|
37
12
|
|
|
38
13
|
/** A scanner over a `react-native-ble-plx` `BleManager`. */
|
|
39
14
|
const bleManagerScanner = bleManager => ({
|
|
@@ -65,5 +40,5 @@ const bleManagerScanner = bleManager => ({
|
|
|
65
40
|
};
|
|
66
41
|
}
|
|
67
42
|
});
|
|
68
|
-
export {
|
|
43
|
+
export { bleManagerScanner };
|
|
69
44
|
//# sourceMappingURL=ble-scanner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ScanMode","State","fromBleError","
|
|
1
|
+
{"version":3,"names":["ScanMode","State","fromBleError","blePeripheral","ADAPTER_STATES","PoweredOn","PoweredOff","Unauthorized","Unsupported","bleManagerScanner","bleManager","watchState","listener","subscription","onStateChange","state","remove","scan","onFound","onError","active","startDeviceScan","scanMode","Balanced","error","device","stopDeviceScan"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/ble-scanner.ts"],"mappings":";;AAAA,SAAqBA,QAAQ,EAAEC,KAAK,QAAQ,sBAAsB;AAIlE,SAASC,YAAY,QAAQ,iBAAc;AAC3C,SAASC,aAAa,QAAQ,qBAAkB;AAEhD,MAAMC,cAAoD,GAAG;EAC3D,CAACH,KAAK,CAACI,SAAS,GAAG,IAAI;EACvB,CAACJ,KAAK,CAACK,UAAU,GAAG,KAAK;EACzB,CAACL,KAAK,CAACM,YAAY,GAAG,cAAc;EACpC,CAACN,KAAK,CAACO,WAAW,GAAG;AACvB,CAAC;;AAED;AACA,MAAMC,iBAAiB,GAAIC,UAAsB,KAAwB;EACvEC,UAAU,EAAGC,QAAQ,IAAK;IACxB,MAAMC,YAAY,GAAGH,UAAU,CAACI,aAAa,CAAEC,KAAK,IAAKH,QAAQ,CAACR,cAAc,CAACW,KAAK,CAAC,IAAI,SAAS,CAAC,EAAE,IAAI,CAAC;IAE5G,OAAO,MAAMF,YAAY,CAACG,MAAM,CAAC,CAAC;EACpC,CAAC;EACDC,IAAI,EAAEA,CAACC,OAAO,EAAEC,OAAO,KAAK;IAC1B,IAAIC,MAAM,GAAG,IAAI;IAEjB,IAAI;MACFV,UAAU,CAACW,eAAe,CAAC,IAAI,EAAE;QAAEC,QAAQ,EAAEtB,QAAQ,CAACuB;MAAS,CAAC,EAAE,CAACC,KAAK,EAAEC,MAAM,KAAK;QACnF,IAAI,CAACL,MAAM,EAAE;UACX;QACF;QACA,IAAII,KAAK,EAAE;UACTL,OAAO,CAACjB,YAAY,CAACsB,KAAK,CAAC,CAAC;QAC9B,CAAC,MAAM,IAAIC,MAAM,EAAE;UACjBP,OAAO,CAACf,aAAa,CAACsB,MAAM,CAAC,CAAC;QAChC;MACF,CAAC,CAAC;IACJ,CAAC,CAAC,OAAOD,KAAK,EAAE;MACdL,OAAO,CAACjB,YAAY,CAACsB,KAAK,CAAC,CAAC;IAC9B;IAEA,OAAO,MAAM;MACXJ,MAAM,GAAG,KAAK;MACdV,UAAU,CAACgB,cAAc,CAAC,CAAC;IAC7B,CAAC;EACH;AACF,CAAC,CAAC;AAEF,SAASjB,iBAAiB","ignoreList":[]}
|
|
@@ -4,7 +4,7 @@ import { DeviceStatus } from "../../../bt-management/types/device-status.js";
|
|
|
4
4
|
import { Channel } from "../channel.js";
|
|
5
5
|
import { isTimestamped } from "../driver.js";
|
|
6
6
|
import { fromBleError } from "./ble-errors.js";
|
|
7
|
-
import { bleDeviceOf } from "./ble-
|
|
7
|
+
import { bleDeviceOf } from "./ble-peripheral.js";
|
|
8
8
|
const STATUSES = {
|
|
9
9
|
[DeviceStatus.CONNECTED]: "connected",
|
|
10
10
|
[DeviceStatus.MEASURING]: "measuring",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DeviceStatus","Channel","isTimestamped","fromBleError","bleDeviceOf","STATUSES","CONNECTED","MEASURING","DISCONNECTED","legacyDriver","creator","deviceName","peripheral","signal","stop","events","end","removeEventListener","managed","disconnect","createDevice","device","onResult","id","data","reading","push","kind","onDeviceStatusChanged","status","mapped","onError","error","addEventListener","once","connect","catch","fail"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/legacy-driver.ts"],"mappings":";;AAKA,SAASA,YAAY,QAAQ,+CAA4C;AACzE,SAASC,OAAO,QAAQ,eAAY;AACpC,SAA8BC,aAAa,QAAQ,cAAW;AAE9D,SAASC,YAAY,QAAQ,iBAAc;AAC3C,SAASC,WAAW,QAAQ,
|
|
1
|
+
{"version":3,"names":["DeviceStatus","Channel","isTimestamped","fromBleError","bleDeviceOf","STATUSES","CONNECTED","MEASURING","DISCONNECTED","legacyDriver","creator","deviceName","peripheral","signal","stop","events","end","removeEventListener","managed","disconnect","createDevice","device","onResult","id","data","reading","push","kind","onDeviceStatusChanged","status","mapped","onError","error","addEventListener","once","connect","catch","fail"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/legacy-driver.ts"],"mappings":";;AAKA,SAASA,YAAY,QAAQ,+CAA4C;AACzE,SAASC,OAAO,QAAQ,eAAY;AACpC,SAA8BC,aAAa,QAAQ,cAAW;AAE9D,SAASC,YAAY,QAAQ,iBAAc;AAC3C,SAASC,WAAW,QAAQ,qBAAkB;AAE9C,MAAMC,QAAmF,GAAG;EAC1F,CAACL,YAAY,CAACM,SAAS,GAAG,WAAW;EACrC,CAACN,YAAY,CAACO,SAAS,GAAG,WAAW;EACrC,CAACP,YAAY,CAACQ,YAAY,GAAG;AAC/B,CAAC;;AAED;AACA,MAAMC,YAAY,GAAGA,CAACC,OAAiD,EAAEC,UAAqB,KAC5F,CAACC,UAAU,EAAEC,MAAM,KAAK;EACtB,MAAMC,IAAI,GAAGA,CAAA,KAAMC,MAAM,CAACC,GAAG,CAAC,CAAC;EAE/B,MAAMD,MAAM,GAAG,IAAId,OAAO,CAAc,MAAM;IAC5CY,MAAM,CAACI,mBAAmB,CAAC,OAAO,EAAEH,IAAI,CAAC;IACzC,KAAKI,OAAO,CAACC,UAAU,CAAC,CAAC;EAC3B,CAAC,CAAC;EAEF,MAAMD,OAAO,GAAGR,OAAO,CAACU,YAAY,CAAC;IACnCC,MAAM,EAAEjB,WAAW,CAACQ,UAAU,CAAC;IAC/BD,UAAU;IACVW,QAAQ,EAAEA,CAAC;MAAEC,EAAE;MAAEC;IAAK,CAAC,KAAK;MAC1B,MAAMC,OAAO,GAAGD,IAAmB;MAEnCT,MAAM,CAACW,IAAI,CAAC;QAAEC,IAAI,EAAE,SAAS;QAAEJ,EAAE,EAAErB,aAAa,CAACuB,OAAO,CAAC,GAAGF,EAAE,GAAG,IAAI;QAAEE;MAAQ,CAAC,CAAC;IACnF,CAAC;IACDG,qBAAqB,EAAEA,CAAC;MAAEC;IAAO,CAAC,KAAK;MACrC,MAAMC,MAAM,GAAGzB,QAAQ,CAACwB,MAAM,CAAC;MAE/B,IAAIC,MAAM,EAAE;QACVf,MAAM,CAACW,IAAI,CAAC;UAAEC,IAAI,EAAE,QAAQ;UAAEE,MAAM,EAAEC;QAAO,CAAC,CAAC;MACjD;MACA,IAAID,MAAM,KAAK7B,YAAY,CAACQ,YAAY,EAAE;QACxCO,MAAM,CAACC,GAAG,CAAC,CAAC;MACd;IACF,CAAC;IACDe,OAAO,EAAEA,CAAC;MAAEC;IAAM,CAAC,KAAKjB,MAAM,CAACW,IAAI,CAAC;MAAEC,IAAI,EAAE,OAAO;MAAEK,KAAK,EAAE7B,YAAY,CAAC6B,KAAK;IAAE,CAAC;EACnF,CAAC,CAAC;EAEFnB,MAAM,CAACoB,gBAAgB,CAAC,OAAO,EAAEnB,IAAI,EAAE;IAAEoB,IAAI,EAAE;EAAK,CAAC,CAAC;EACtDhB,OAAO,CAACiB,OAAO,CAAC,CAAC,CAACC,KAAK,CAAEJ,KAAc,IAAKjB,MAAM,CAACsB,IAAI,CAAClC,YAAY,CAAC6B,KAAK,CAAC,CAAC,CAAC;EAE7E,OAAOjB,MAAM;AACf,CAAC;AAEH,SAASN,YAAY","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["recordedAtOf","measurement","recordedAt","Date","Number","isNaN","getTime","undefined","ovokReadingSink","client","save","id","device","result","measurements","sourceId","effectiveDateTime","name","key","localName","manufacturerData","manufacturerName","information","model","sn","serialNumber","status","flushQueued","Object","keys","offlineQueue","flush","responses"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/react-native/ovok-sink.ts"],"mappings":";;AAIA;AACA,MAAMA,YAAY,GAAIC,WAAmB,IAAuB;EAC9D,MAAM;IAAEC;EAAW,CAAC,GAAGD,WAAuC;EAE9D,OAAOC,UAAU,YAAYC,IAAI,IAAI,CAACC,MAAM,CAACC,KAAK,CAACH,UAAU,CAACI,OAAO,CAAC,CAAC,CAAC,GAAGJ,UAAU,GAAGK,SAAS;AACnG,CAAC;;AAED;AACA,MAAMC,eAAe,GAAIC,
|
|
1
|
+
{"version":3,"names":["recordedAtOf","measurement","recordedAt","Date","Number","isNaN","getTime","undefined","ovokReadingSink","client","save","id","device","result","measurements","sourceId","effectiveDateTime","name","key","localName","manufacturerData","manufacturerName","information","model","sn","serialNumber","status","flushQueued","Object","keys","offlineQueue","flush","responses"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/react-native/ovok-sink.ts"],"mappings":";;AAIA;AACA,MAAMA,YAAY,GAAIC,WAAmB,IAAuB;EAC9D,MAAM;IAAEC;EAAW,CAAC,GAAGD,WAAuC;EAE9D,OAAOC,UAAU,YAAYC,IAAI,IAAI,CAACC,MAAM,CAACC,KAAK,CAACH,UAAU,CAACI,OAAO,CAAC,CAAC,CAAC,GAAGJ,UAAU,GAAGK,SAAS;AACnG,CAAC;;AAED;AACA,MAAMC,eAAe,GAAIC,MAAkC,KAAmB;EAC5EC,IAAI,EAAE,MAAAA,CAAO;IAAEC,EAAE;IAAEC,MAAM;IAAEX;EAAY,CAAC,KAAK;IAC3C,MAAMY,MAAM,GAAG,MAAMJ,MAAM,CAACK,YAAY,CAACJ,IAAI,CAAC;MAC5CT,WAAW;MACXc,QAAQ,EAAEJ,EAAE;MACZK,iBAAiB,EAAEhB,YAAY,CAACC,WAAW,CAAC;MAC5CW,MAAM,EAAE;QACND,EAAE,EAAEC,MAAM,CAACD,EAAE;QACbM,IAAI,EAAEL,MAAM,CAACM,GAAG;QAChBC,SAAS,EAAEP,MAAM,CAACK,IAAI;QACtBG,gBAAgB,EAAE,EAAE;QACpBC,gBAAgB,EAAET,MAAM,CAACU,WAAW,EAAED,gBAAgB;QACtDE,KAAK,EAAEX,MAAM,CAACU,WAAW,EAAEC,KAAK;QAChCC,EAAE,EAAEZ,MAAM,CAACU,WAAW,EAAEG,YAAY,IAAI;MAC1C;IACF,CAAC,CAAC;IAEF,OAAOZ,MAAM,CAACa,MAAM,KAAK,OAAO,GAAG;MAAEA,MAAM,EAAE;IAAQ,CAAC,GAAGb,MAAM;EACjE,CAAC;EACDc,WAAW,EAAE,MAAAA,CAAA,KAAYC,MAAM,CAACC,IAAI,CAAC,CAAC,MAAMpB,MAAM,CAACK,YAAY,CAACgB,YAAY,CAACC,KAAK,CAAC,CAAC,EAAEC,SAAS;AACjG,CAAC,CAAC;AAEF,SAASxB,eAAe","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { ovokReadingSink } from "../react-native/ovok-sink.js";
|
|
4
|
+
import { BluetoothRuntime } from "../runtime.js";
|
|
5
|
+
import { webBluetoothPermissions } from "./web-bluetooth-permissions.js";
|
|
6
|
+
|
|
7
|
+
/** What `createWebBluetoothRuntime` needs. */
|
|
8
|
+
|
|
9
|
+
/** A `BluetoothRuntime` wired for browsers: Web Bluetooth through `scanner`, saving through `client`. */
|
|
10
|
+
const createWebBluetoothRuntime = ({
|
|
11
|
+
client,
|
|
12
|
+
scanner,
|
|
13
|
+
devices,
|
|
14
|
+
resultPolicy,
|
|
15
|
+
pairedStorage
|
|
16
|
+
}) => new BluetoothRuntime({
|
|
17
|
+
scanner,
|
|
18
|
+
permissions: webBluetoothPermissions(),
|
|
19
|
+
sink: ovokReadingSink(client),
|
|
20
|
+
devices,
|
|
21
|
+
resultPolicy,
|
|
22
|
+
pairedStorage
|
|
23
|
+
});
|
|
24
|
+
export { createWebBluetoothRuntime };
|
|
25
|
+
//# sourceMappingURL=create-web-bluetooth-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ovokReadingSink","BluetoothRuntime","webBluetoothPermissions","createWebBluetoothRuntime","client","scanner","devices","resultPolicy","pairedStorage","permissions","sink"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/web/create-web-bluetooth-runtime.ts"],"mappings":";;AAGA,SAASA,eAAe,QAAQ,8BAA2B;AAE3D,SAASC,gBAAgB,QAAQ,eAAY;AAE7C,SAASC,uBAAuB,QAAQ,gCAA6B;;AAGrE;;AAmBA;AACA,MAAMC,yBAAyB,GAAGA,CAAC;EACjCC,MAAM;EACNC,OAAO;EACPC,OAAO;EACPC,YAAY;EACZC;AACgC,CAAC,KACjC,IAAIP,gBAAgB,CAAC;EACnBI,OAAO;EACPI,WAAW,EAAEP,uBAAuB,CAAC,CAAC;EACtCQ,IAAI,EAAEV,eAAe,CAACI,MAAM,CAAC;EAC7BE,OAAO;EACPC,YAAY;EACZC;AACF,CAAC,CAAC;AAEJ,SAASL,yBAAyB","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Bluetooth for `@ovok/native/next` in browsers, over Web Bluetooth: the same `BluetoothRuntime`, devices, result
|
|
5
|
+
* policies and hooks as `@ovok/native/next/bluetooth`, with a Web Bluetooth scanner instead of `react-native-ble-plx`.
|
|
6
|
+
* Nothing here loads `react-native-ble-plx` or `react-native-permissions`, so a web bundle can import it.
|
|
7
|
+
*
|
|
8
|
+
* Import from `@ovok/native/next/bluetooth/web`.
|
|
9
|
+
*
|
|
10
|
+
* @module next/bluetooth/web
|
|
11
|
+
*/
|
|
12
|
+
export { createWebBluetoothRuntime } from "./create-web-bluetooth-runtime.js";
|
|
13
|
+
export { isWebBluetoothAvailable, webBluetoothScanner } from "./web-bluetooth-scanner.js";
|
|
14
|
+
export { webBluetoothPermissions } from "./web-bluetooth-permissions.js";
|
|
15
|
+
export { WEB_BLUETOOTH_SERVICES, webBluetoothServicesFor } from "./web-bluetooth-services.js";
|
|
16
|
+
export { BluetoothRuntime } from "../runtime.js";
|
|
17
|
+
export { BluetoothError } from "../errors.js";
|
|
18
|
+
export { defineDevice } from "../devices.js";
|
|
19
|
+
export { acceptedMemorySlots, dailyTotalsOnly, everyReading, firstReadingPerKind, keepReadings, policyByKind } from "../result-policy.js";
|
|
20
|
+
export { SIG_PROTOCOLS } from "../sig-profiles.js";
|
|
21
|
+
export { builtInDevices } from "../ble-plx/built-in-devices.js";
|
|
22
|
+
export { IntegratedDevices } from "../../../bt-management/types/integrated-devices.js";
|
|
23
|
+
export { Devices, SUPPORTED_DEVICES } from "../../../bt-device/constants/supported-devices.js";
|
|
24
|
+
export { resultPoliciesFor } from "../../../bt-device/utils/device-query.js";
|
|
25
|
+
export { ovokReadingSink } from "../react-native/ovok-sink.js";
|
|
26
|
+
export { BluetoothProvider, useBluetooth } from "../react/context.js";
|
|
27
|
+
export { useBluetoothPermission, useBluetoothState, useMeasurements, useNearbyDevice, useNearbyDevices, usePairedDevices, useScanning } from "../react/hooks.js";
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createWebBluetoothRuntime","isWebBluetoothAvailable","webBluetoothScanner","webBluetoothPermissions","WEB_BLUETOOTH_SERVICES","webBluetoothServicesFor","BluetoothRuntime","BluetoothError","defineDevice","acceptedMemorySlots","dailyTotalsOnly","everyReading","firstReadingPerKind","keepReadings","policyByKind","SIG_PROTOCOLS","builtInDevices","IntegratedDevices","Devices","SUPPORTED_DEVICES","resultPoliciesFor","ovokReadingSink","BluetoothProvider","useBluetooth","useBluetoothPermission","useBluetoothState","useMeasurements","useNearbyDevice","useNearbyDevices","usePairedDevices","useScanning"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/web/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,yBAAyB,QAAQ,mCAAgC;AAE1E,SAASC,uBAAuB,EAAEC,mBAAmB,QAAQ,4BAAyB;AAEtF,SAASC,uBAAuB,QAAQ,gCAA6B;AACrE,SAASC,sBAAsB,EAAEC,uBAAuB,QAAQ,6BAA0B;AAE1F,SAASC,gBAAgB,QAAQ,eAAY;AAE7C,SAASC,cAAc,QAAQ,cAAW;AAM1C,SAASC,YAAY,QAAQ,eAAY;AAIzC,SACEC,mBAAmB,EACnBC,eAAe,EACfC,YAAY,EACZC,mBAAmB,EACnBC,YAAY,EACZC,YAAY,QACP,qBAAkB;AAEzB,SAASC,aAAa,QAAQ,oBAAiB;AAC/C,SAASC,cAAc,QAAQ,gCAA6B;AAC5D,SAASC,iBAAiB,QAAQ,oDAAiD;AAEnF,SAASC,OAAO,EAAEC,iBAAiB,QAAQ,mDAAgD;AAE3F,SAASC,iBAAiB,QAAQ,0CAAuC;AACzE,SAASC,eAAe,QAAQ,8BAA2B;AAC3D,SAASC,iBAAiB,EAAEC,YAAY,QAAQ,qBAAkB;AAElE,SACEC,sBAAsB,EACtBC,iBAAiB,EACjBC,eAAe,EACfC,eAAe,EACfC,gBAAgB,EAChBC,gBAAgB,EAChBC,WAAW,QACN,mBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { DEVICE_DISCONNECTED, toBleCharacteristic, WebBleError } from "./web-ble-shapes.js";
|
|
4
|
+
import { bytesOf, canonicalUuid, fromBase64, toBase64 } from "./web-bluetooth-values.js";
|
|
5
|
+
import { WebGatt } from "./web-gatt.js";
|
|
6
|
+
|
|
7
|
+
/** The ATT default; browsers negotiate a larger MTU themselves and expose no way to ask for one. */
|
|
8
|
+
const DEFAULT_MTU = 23;
|
|
9
|
+
const VALUE_CHANGED = "characteristicvaluechanged";
|
|
10
|
+
const DISCONNECTED = "gattserverdisconnected";
|
|
11
|
+
|
|
12
|
+
/** Advertising data a browser saw for the device, when it let the page watch advertisements. */
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A Web Bluetooth device behind the part of the `react-native-ble-plx` `Device` API the SDK's device classes use, so
|
|
16
|
+
* every integrated device and `defineCustomDevice` declaration runs unchanged in a browser. Operations queue (see
|
|
17
|
+
* `WebGatt`), so a write also waits for notifications still being started.
|
|
18
|
+
*/
|
|
19
|
+
class WebBleDevice {
|
|
20
|
+
mtu = DEFAULT_MTU;
|
|
21
|
+
rssi = null;
|
|
22
|
+
monitors = new Set();
|
|
23
|
+
disconnectListeners = new Set();
|
|
24
|
+
constructor(device, advertisement) {
|
|
25
|
+
this.id = device.id;
|
|
26
|
+
this.name = device.name?.trim() || null;
|
|
27
|
+
this.localName = this.name;
|
|
28
|
+
this.manufacturerData = advertisement?.manufacturerData ?? null;
|
|
29
|
+
this.serviceUUIDs = advertisement?.serviceUUIDs ?? null;
|
|
30
|
+
this.gatt = new WebGatt(device);
|
|
31
|
+
device.addEventListener(DISCONNECTED, this.onDisconnect);
|
|
32
|
+
}
|
|
33
|
+
async connect() {
|
|
34
|
+
await this.gatt.server().connect();
|
|
35
|
+
return this;
|
|
36
|
+
}
|
|
37
|
+
async isConnected() {
|
|
38
|
+
return this.gatt.connected;
|
|
39
|
+
}
|
|
40
|
+
async cancelConnection() {
|
|
41
|
+
if (this.gatt.connected) {
|
|
42
|
+
this.gatt.server().disconnect();
|
|
43
|
+
}
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
|
+
async requestMTU() {
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** Discovers the services, and reports them as advertised when the browser showed none. */
|
|
51
|
+
async discoverAllServicesAndCharacteristics() {
|
|
52
|
+
const uuids = await this.gatt.queued(() => {
|
|
53
|
+
this.gatt.forget();
|
|
54
|
+
return this.gatt.serviceUuids();
|
|
55
|
+
});
|
|
56
|
+
if (!this.serviceUUIDs?.length) {
|
|
57
|
+
this.serviceUUIDs = uuids;
|
|
58
|
+
}
|
|
59
|
+
return this;
|
|
60
|
+
}
|
|
61
|
+
services() {
|
|
62
|
+
return this.gatt.queued(async () => (await this.gatt.serviceUuids()).map(uuid => ({
|
|
63
|
+
uuid,
|
|
64
|
+
deviceID: this.id,
|
|
65
|
+
isPrimary: true
|
|
66
|
+
})));
|
|
67
|
+
}
|
|
68
|
+
characteristicsForService(serviceUuid) {
|
|
69
|
+
return this.gatt.queued(async () => (await this.gatt.characteristicsOf(serviceUuid)).map(characteristic => toBleCharacteristic(this.id, canonicalUuid(serviceUuid), characteristic, null)));
|
|
70
|
+
}
|
|
71
|
+
readCharacteristicForService(serviceUuid, characteristicUuid) {
|
|
72
|
+
return this.gatt.queued(async () => {
|
|
73
|
+
const characteristic = await this.gatt.characteristic(serviceUuid, characteristicUuid);
|
|
74
|
+
const value = await characteristic.readValue();
|
|
75
|
+
return toBleCharacteristic(this.id, canonicalUuid(serviceUuid), characteristic, toBase64(bytesOf(value)));
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
writeCharacteristicWithResponseForService(serviceUuid, characteristicUuid, base64) {
|
|
79
|
+
return this.write(serviceUuid, characteristicUuid, base64, true);
|
|
80
|
+
}
|
|
81
|
+
writeCharacteristicWithoutResponseForService(serviceUuid, characteristicUuid, base64) {
|
|
82
|
+
return this.write(serviceUuid, characteristicUuid, base64, false);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** Starts notifications in the GATT queue; `listener` gets each value, then `DeviceDisconnected` if the link drops. */
|
|
86
|
+
monitorCharacteristicForService(serviceUuid, characteristicUuid, listener) {
|
|
87
|
+
let characteristic;
|
|
88
|
+
let active = true;
|
|
89
|
+
const onValue = event => {
|
|
90
|
+
const value = event.target?.value;
|
|
91
|
+
if (active && characteristic && value) {
|
|
92
|
+
const base64 = toBase64(bytesOf(value));
|
|
93
|
+
listener(null, toBleCharacteristic(this.id, canonicalUuid(serviceUuid), characteristic, base64));
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
const stop = () => {
|
|
97
|
+
const started = characteristic;
|
|
98
|
+
started?.removeEventListener(VALUE_CHANGED, onValue);
|
|
99
|
+
void this.gatt.queued(async () => started?.stopNotifications()).catch(() => undefined);
|
|
100
|
+
};
|
|
101
|
+
this.monitors.add(listener);
|
|
102
|
+
this.gatt.queued(async () => {
|
|
103
|
+
characteristic = await this.gatt.characteristic(serviceUuid, characteristicUuid);
|
|
104
|
+
characteristic.addEventListener(VALUE_CHANGED, onValue);
|
|
105
|
+
await characteristic.startNotifications();
|
|
106
|
+
}).then(() => !active && stop(), error => active && listener(this.gatt.errorOf(error), null));
|
|
107
|
+
return {
|
|
108
|
+
remove: () => {
|
|
109
|
+
if (active) {
|
|
110
|
+
active = false;
|
|
111
|
+
this.monitors.delete(listener);
|
|
112
|
+
stop();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
onDisconnected(listener) {
|
|
118
|
+
this.disconnectListeners.add(listener);
|
|
119
|
+
return {
|
|
120
|
+
remove: () => this.disconnectListeners.delete(listener)
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
onDisconnect = () => {
|
|
124
|
+
const error = new WebBleError(DEVICE_DISCONNECTED, `Device ${this.id} was disconnected`);
|
|
125
|
+
[...this.monitors].forEach(listener => listener(error, null));
|
|
126
|
+
this.monitors.clear();
|
|
127
|
+
this.gatt.forget();
|
|
128
|
+
[...this.disconnectListeners].forEach(listener => listener(null, this));
|
|
129
|
+
};
|
|
130
|
+
write(serviceUuid, characteristicUuid, base64, withResponse) {
|
|
131
|
+
return this.gatt.queued(async () => {
|
|
132
|
+
const characteristic = await this.gatt.characteristic(serviceUuid, characteristicUuid);
|
|
133
|
+
const writeValue = withResponse ? characteristic.writeValueWithResponse : characteristic.writeValueWithoutResponse;
|
|
134
|
+
await (writeValue ?? characteristic.writeValue).call(characteristic, fromBase64(base64));
|
|
135
|
+
return toBleCharacteristic(this.id, canonicalUuid(serviceUuid), characteristic, base64);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
export { WebBleDevice };
|
|
140
|
+
//# sourceMappingURL=web-ble-device.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DEVICE_DISCONNECTED","toBleCharacteristic","WebBleError","bytesOf","canonicalUuid","fromBase64","toBase64","WebGatt","DEFAULT_MTU","VALUE_CHANGED","DISCONNECTED","WebBleDevice","mtu","rssi","monitors","Set","disconnectListeners","constructor","device","advertisement","id","name","trim","localName","manufacturerData","serviceUUIDs","gatt","addEventListener","onDisconnect","connect","server","isConnected","connected","cancelConnection","disconnect","requestMTU","discoverAllServicesAndCharacteristics","uuids","queued","forget","serviceUuids","length","services","map","uuid","deviceID","isPrimary","characteristicsForService","serviceUuid","characteristicsOf","characteristic","readCharacteristicForService","characteristicUuid","value","readValue","writeCharacteristicWithResponseForService","base64","write","writeCharacteristicWithoutResponseForService","monitorCharacteristicForService","listener","active","onValue","event","target","stop","started","removeEventListener","stopNotifications","catch","undefined","add","startNotifications","then","error","errorOf","remove","delete","onDisconnected","forEach","clear","withResponse","writeValue","writeValueWithResponse","writeValueWithoutResponse","call"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/web/web-ble-device.ts"],"mappings":";;AAAA,SAA4BA,mBAAmB,EAAEC,mBAAmB,EAAEC,WAAW,QAAQ,qBAAkB;AAC3G,SAASC,OAAO,EAAEC,aAAa,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,2BAAwB;AAErF,SAASC,OAAO,QAAQ,eAAY;;AAEpC;AACA,MAAMC,WAAW,GAAG,EAAE;AACtB,MAAMC,aAAa,GAAG,4BAA4B;AAClD,MAAMC,YAAY,GAAG,wBAAwB;;AAM7C;;AAGA;AACA;AACA;AACA;AACA;AACA,MAAMC,YAAY,CAAC;EAKDC,GAAG,GAAGJ,WAAW;EACjBK,IAAI,GAAG,IAAI;EAGVC,QAAQ,GAAG,IAAIC,GAAG,CAAkB,CAAC;EACrCC,mBAAmB,GAAG,IAAID,GAAG,CAAqB,CAAC;E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EAEOH,KAAKA,CACXT,WAAmB,EACnBI,kBAA0B,EAC1BI,MAAc,EACdyB,YAAqB,EACO;IAC5B,OAAO,IAAI,CAACvD,IAAI,CAACY,MAAM,CAAC,YAAY;MAClC,MAAMY,cAAc,GAAG,MAAM,IAAI,CAACxB,IAAI,CAACwB,cAAc,CAACF,WAAW,EAAEI,kBAAkB,CAAC;MACtF,MAAM8B,UAAU,GAAGD,YAAY,GAAG/B,cAAc,CAACiC,sBAAsB,GAAGjC,cAAc,CAACkC,yBAAyB;MAElH,MAAM,CAACF,UAAU,IAAIhC,cAAc,CAACgC,UAAU,EAAEG,IAAI,CAACnC,cAAc,EAAE7C,UAAU,CAACmD,MAAM,CAAC,CAAC;MAExF,OAAOvD,mBAAmB,CAAC,IAAI,CAACmB,EAAE,EAAEhB,aAAa,CAAC4C,WAAW,CAAC,EAAEE,cAAc,EAAEM,MAAM,CAAC;IACzF,CAAC,CAAC;EACJ;AACF;AAEA,SAAS7C,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { canonicalUuid } from "./web-bluetooth-values.js";
|
|
4
|
+
/** `react-native-ble-plx`'s BleErrorCode.DeviceDisconnected, which ends a link instead of failing it. */
|
|
5
|
+
const DEVICE_DISCONNECTED = 201;
|
|
6
|
+
const UNKNOWN_ERROR = 0;
|
|
7
|
+
|
|
8
|
+
/** A failed Web Bluetooth operation in the shape `react-native-ble-plx` reports errors. */
|
|
9
|
+
class WebBleError extends Error {
|
|
10
|
+
constructor(errorCode, message, reason) {
|
|
11
|
+
super(message);
|
|
12
|
+
this.errorCode = errorCode;
|
|
13
|
+
this.reason = reason;
|
|
14
|
+
this.name = "BleError";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** A characteristic in the shape `react-native-ble-plx` returns one, with its value as base64. */
|
|
19
|
+
|
|
20
|
+
const toBleCharacteristic = (deviceID, serviceUUID, characteristic, value) => {
|
|
21
|
+
const {
|
|
22
|
+
properties
|
|
23
|
+
} = characteristic;
|
|
24
|
+
const uuid = canonicalUuid(characteristic.uuid);
|
|
25
|
+
return {
|
|
26
|
+
id: `${serviceUUID}/${uuid}`,
|
|
27
|
+
uuid,
|
|
28
|
+
serviceUUID,
|
|
29
|
+
deviceID,
|
|
30
|
+
value,
|
|
31
|
+
isReadable: properties.read,
|
|
32
|
+
isWritableWithResponse: properties.write,
|
|
33
|
+
isWritableWithoutResponse: properties.writeWithoutResponse,
|
|
34
|
+
isNotifiable: properties.notify,
|
|
35
|
+
isIndicatable: properties.indicate
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export { DEVICE_DISCONNECTED, toBleCharacteristic, UNKNOWN_ERROR, WebBleError };
|
|
39
|
+
//# sourceMappingURL=web-ble-shapes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["canonicalUuid","DEVICE_DISCONNECTED","UNKNOWN_ERROR","WebBleError","Error","constructor","errorCode","message","reason","name","toBleCharacteristic","deviceID","serviceUUID","characteristic","value","properties","uuid","id","isReadable","read","isWritableWithResponse","write","isWritableWithoutResponse","writeWithoutResponse","isNotifiable","notify","isIndicatable","indicate"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/web/web-ble-shapes.ts"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,2BAAwB;AAGtD;AACA,MAAMC,mBAAmB,GAAG,GAAG;AAC/B,MAAMC,aAAa,GAAG,CAAC;;AAEvB;AACA,MAAMC,WAAW,SAASC,KAAK,CAAC;EACvBC,WAAWA,CAAiBC,SAAiB,EAAEC,OAAe,EAAkBC,MAAgB,EAAE;IACvG,KAAK,CAACD,OAAO,CAAC;IAAC,KADkBD,SAAiB,GAAjBA,SAAiB;IAAA,KAAmCE,MAAgB,GAAhBA,MAAgB;IAErG,IAAI,CAACC,IAAI,GAAG,UAAU;EACxB;AACF;;AAEA;;AAcA,MAAMC,mBAAmB,GAAGA,CAC1BC,QAAgB,EAChBC,WAAmB,EACnBC,cAA0C,EAC1CC,KAAoB,KACE;EACtB,MAAM;IAAEC;EAAW,CAAC,GAAGF,cAAc;EACrC,MAAMG,IAAI,GAAGhB,aAAa,CAACa,cAAc,CAACG,IAAI,CAAC;EAE/C,OAAO;IACLC,EAAE,EAAE,GAAGL,WAAW,IAAII,IAAI,EAAE;IAC5BA,IAAI;IACJJ,WAAW;IACXD,QAAQ;IACRG,KAAK;IACLI,UAAU,EAAEH,UAAU,CAACI,IAAI;IAC3BC,sBAAsB,EAAEL,UAAU,CAACM,KAAK;IACxCC,yBAAyB,EAAEP,UAAU,CAACQ,oBAAoB;IAC1DC,YAAY,EAAET,UAAU,CAACU,MAAM;IAC/BC,aAAa,EAAEX,UAAU,CAACY;EAC5B,CAAC;AACH,CAAC;AAED,SAAS1B,mBAAmB,EAAES,mBAAmB,EAAER,aAAa,EAAEC,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { isWebBluetoothAvailable } from "./web-bluetooth-scanner.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Browser permissions: the browser asks per device in its chooser, so there is no prompt to show first. Granted where
|
|
7
|
+
* the browser has Web Bluetooth, denied where it has none; no settings page can change that.
|
|
8
|
+
*/
|
|
9
|
+
const webBluetoothPermissions = () => {
|
|
10
|
+
const permission = async () => isWebBluetoothAvailable() ? "granted" : "denied";
|
|
11
|
+
return {
|
|
12
|
+
check: permission,
|
|
13
|
+
request: permission,
|
|
14
|
+
openSettings: async () => undefined
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export { webBluetoothPermissions };
|
|
18
|
+
//# sourceMappingURL=web-bluetooth-permissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isWebBluetoothAvailable","webBluetoothPermissions","permission","check","request","openSettings","undefined"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/web/web-bluetooth-permissions.ts"],"mappings":";;AAEA,SAASA,uBAAuB,QAAQ,4BAAyB;;AAEjE;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,GAAGA,CAAA,KAA4B;EAC1D,MAAMC,UAAU,GAAG,MAAAA,CAAA,KAA2CF,uBAAuB,CAAC,CAAC,GAAG,SAAS,GAAG,QAAS;EAE/G,OAAO;IAAEG,KAAK,EAAED,UAAU;IAAEE,OAAO,EAAEF,UAAU;IAAEG,YAAY,EAAE,MAAAA,CAAA,KAAYC;EAAU,CAAC;AACxF,CAAC;AAED,SAASL,uBAAuB","ignoreList":[]}
|