@neurosity/sdk 6.4.1 → 6.5.0
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/dist/browser/neurosity.iife.js +2579 -102
- package/dist/browser/neurosity.js +129 -113
- package/dist/browser/neurosity.js.map +1 -1
- package/dist/cjs/api/bluetooth/BluetoothClient.d.ts +1 -1
- package/dist/cjs/api/bluetooth/BluetoothClient.js +10 -8
- package/dist/cjs/api/bluetooth/react-native/ReactNativeTransport.d.ts +3 -1
- package/dist/cjs/api/bluetooth/react-native/ReactNativeTransport.js +17 -17
- package/dist/cjs/api/bluetooth/types/index.d.ts +1 -0
- package/dist/cjs/api/bluetooth/utils/binaryBufferToEpoch.d.ts +51 -0
- package/dist/cjs/api/bluetooth/utils/binaryBufferToEpoch.js +116 -0
- package/dist/cjs/api/bluetooth/utils/decodeJSONChunks.d.ts +15 -0
- package/dist/cjs/api/bluetooth/utils/decodeJSONChunks.js +25 -0
- package/dist/cjs/api/bluetooth/utils/textCodec.d.ts +17 -0
- package/dist/cjs/api/bluetooth/utils/textCodec.js +40 -0
- package/dist/cjs/api/bluetooth/web/WebBluetoothTransport.d.ts +3 -1
- package/dist/cjs/api/bluetooth/web/WebBluetoothTransport.js +19 -34
- package/dist/electron/index.js +15 -13
- package/dist/electron/index.js.map +1 -1
- package/dist/esm/api/bluetooth/BluetoothClient.d.ts +1 -1
- package/dist/esm/api/bluetooth/BluetoothClient.js +10 -8
- package/dist/esm/api/bluetooth/react-native/ReactNativeTransport.d.ts +3 -1
- package/dist/esm/api/bluetooth/react-native/ReactNativeTransport.js +18 -18
- package/dist/esm/api/bluetooth/types/index.d.ts +1 -0
- package/dist/esm/api/bluetooth/utils/binaryBufferToEpoch.d.ts +51 -0
- package/dist/esm/api/bluetooth/utils/binaryBufferToEpoch.js +109 -0
- package/dist/esm/api/bluetooth/utils/decodeJSONChunks.d.ts +15 -0
- package/dist/esm/api/bluetooth/utils/decodeJSONChunks.js +21 -0
- package/dist/esm/api/bluetooth/utils/textCodec.d.ts +17 -0
- package/dist/esm/api/bluetooth/utils/textCodec.js +36 -0
- package/dist/esm/api/bluetooth/web/WebBluetoothTransport.d.ts +3 -1
- package/dist/esm/api/bluetooth/web/WebBluetoothTransport.js +20 -35
- package/dist/esm/neurosity.mjs +2579 -102
- package/dist/examples/neurosity.iife.js +2579 -102
- package/dist/examples/neurosity.js +129 -113
- package/dist/examples/neurosity.mjs +2579 -102
- package/package.json +2 -1
- package/dist/cjs/api/bluetooth/utils/encoding.d.ts +0 -3
- package/dist/cjs/api/bluetooth/utils/encoding.js +0 -22
- package/dist/esm/api/bluetooth/utils/encoding.d.ts +0 -3
- package/dist/esm/api/bluetooth/utils/encoding.js +0 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neurosity/sdk",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.0",
|
|
4
4
|
"description": "Neurosity SDK",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@neurosity/ipk": "^2.12.0",
|
|
52
52
|
"axios": "^0.25.0",
|
|
53
|
+
"buffer": "^6.0.3",
|
|
53
54
|
"fast-deep-equal": "^3.1.3",
|
|
54
55
|
"firebase": "^8.10.0",
|
|
55
56
|
"outliers": "0.0.3",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decode = exports.encode = void 0;
|
|
4
|
-
const types_1 = require("../types");
|
|
5
|
-
const encoder = new TextEncoder();
|
|
6
|
-
const decoder = new TextDecoder("utf-8");
|
|
7
|
-
function encode(transportType, data) {
|
|
8
|
-
if (transportType === types_1.TRANSPORT_TYPE.REACT_NATIVE) {
|
|
9
|
-
// React Native expects a plain array of numbers and not a Uint8Array
|
|
10
|
-
return [...encoder.encode(data)];
|
|
11
|
-
}
|
|
12
|
-
return encoder.encode(data);
|
|
13
|
-
}
|
|
14
|
-
exports.encode = encode;
|
|
15
|
-
function decode(transportType, data) {
|
|
16
|
-
if (transportType === types_1.TRANSPORT_TYPE.REACT_NATIVE) {
|
|
17
|
-
// React Native outpouts a plain array of numbers and not a Uint8Array
|
|
18
|
-
return decoder.decode(new Uint8Array(data));
|
|
19
|
-
}
|
|
20
|
-
return decoder.decode(data);
|
|
21
|
-
}
|
|
22
|
-
exports.decode = decode;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { TRANSPORT_TYPE } from "../types";
|
|
2
|
-
const encoder = new TextEncoder();
|
|
3
|
-
const decoder = new TextDecoder("utf-8");
|
|
4
|
-
export function encode(transportType, data) {
|
|
5
|
-
if (transportType === TRANSPORT_TYPE.REACT_NATIVE) {
|
|
6
|
-
// React Native expects a plain array of numbers and not a Uint8Array
|
|
7
|
-
return [...encoder.encode(data)];
|
|
8
|
-
}
|
|
9
|
-
return encoder.encode(data);
|
|
10
|
-
}
|
|
11
|
-
export function decode(transportType, data) {
|
|
12
|
-
if (transportType === TRANSPORT_TYPE.REACT_NATIVE) {
|
|
13
|
-
// React Native outpouts a plain array of numbers and not a Uint8Array
|
|
14
|
-
return decoder.decode(new Uint8Array(data));
|
|
15
|
-
}
|
|
16
|
-
return decoder.decode(data);
|
|
17
|
-
}
|