react-native-bluebreeze 0.0.12 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/README.md +97 -13
  2. package/android/build.gradle +9 -3
  3. package/android/generated/jni/CMakeLists.txt +1 -9
  4. package/android/generated/jni/RNBlueBreezeSpec-generated.cpp +1 -1
  5. package/android/generated/jni/react/renderer/components/RNBlueBreezeSpec/RNBlueBreezeSpecJSI.h +234 -279
  6. package/android/src/main/java/com/bluebreeze/BlueBreezeModule.kt +140 -120
  7. package/ios/BlueBreezeImpl.swift +30 -24
  8. package/ios/Bluebreeze.h +1 -1
  9. package/ios/Bluebreeze.mm +2 -7
  10. package/ios/generated/{RNBlueBreezeSpecJSI.h → ReactCodegen/RNBlueBreezeSpecJSI.h} +234 -279
  11. package/lib/commonjs/implementation/bluebreeze_characteristic.js +42 -11
  12. package/lib/commonjs/implementation/bluebreeze_characteristic.js.map +1 -1
  13. package/lib/commonjs/implementation/bluebreeze_connection_status.js +2 -0
  14. package/lib/commonjs/implementation/bluebreeze_connection_status.js.map +1 -0
  15. package/lib/commonjs/implementation/bluebreeze_device.js +53 -13
  16. package/lib/commonjs/implementation/bluebreeze_device.js.map +1 -1
  17. package/lib/commonjs/implementation/bluebreeze_scan_result.js +19 -0
  18. package/lib/commonjs/implementation/bluebreeze_scan_result.js.map +1 -1
  19. package/lib/commonjs/implementation/bluebreeze_service.js +9 -0
  20. package/lib/commonjs/implementation/bluebreeze_service.js.map +1 -1
  21. package/lib/commonjs/implementation/native_bridge.js +108 -0
  22. package/lib/commonjs/implementation/native_bridge.js.map +1 -0
  23. package/lib/commonjs/index.js +29 -100
  24. package/lib/commonjs/index.js.map +1 -1
  25. package/lib/commonjs/package.json +1 -0
  26. package/lib/module/implementation/bluebreeze_characteristic.js +43 -10
  27. package/lib/module/implementation/bluebreeze_characteristic.js.map +1 -1
  28. package/lib/module/implementation/bluebreeze_connection_status.js +2 -0
  29. package/lib/module/implementation/bluebreeze_connection_status.js.map +1 -0
  30. package/lib/module/implementation/bluebreeze_device.js +54 -12
  31. package/lib/module/implementation/bluebreeze_device.js.map +1 -1
  32. package/lib/module/implementation/bluebreeze_scan_result.js +19 -0
  33. package/lib/module/implementation/bluebreeze_scan_result.js.map +1 -1
  34. package/lib/module/implementation/bluebreeze_service.js +9 -0
  35. package/lib/module/implementation/bluebreeze_service.js.map +1 -1
  36. package/lib/module/implementation/native_bridge.js +99 -0
  37. package/lib/module/implementation/native_bridge.js.map +1 -0
  38. package/lib/module/index.js +29 -100
  39. package/lib/module/index.js.map +1 -1
  40. package/lib/module/package.json +1 -0
  41. package/lib/typescript/commonjs/src/NativeBlueBreeze.d.ts +1 -1
  42. package/lib/typescript/commonjs/src/NativeBlueBreeze.d.ts.map +1 -1
  43. package/lib/typescript/commonjs/src/implementation/bluebreeze_authorization.d.ts +10 -1
  44. package/lib/typescript/commonjs/src/implementation/bluebreeze_authorization.d.ts.map +1 -1
  45. package/lib/typescript/commonjs/src/implementation/bluebreeze_characteristic.d.ts +29 -0
  46. package/lib/typescript/commonjs/src/implementation/bluebreeze_characteristic.d.ts.map +1 -1
  47. package/lib/typescript/commonjs/src/implementation/bluebreeze_connection_status.d.ts +7 -0
  48. package/lib/typescript/commonjs/src/implementation/bluebreeze_connection_status.d.ts.map +1 -0
  49. package/lib/typescript/commonjs/src/implementation/bluebreeze_device.d.ts +42 -1
  50. package/lib/typescript/commonjs/src/implementation/bluebreeze_device.d.ts.map +1 -1
  51. package/lib/typescript/commonjs/src/implementation/bluebreeze_scan_result.d.ts +11 -0
  52. package/lib/typescript/commonjs/src/implementation/bluebreeze_scan_result.d.ts.map +1 -1
  53. package/lib/typescript/commonjs/src/implementation/bluebreeze_service.d.ts +6 -0
  54. package/lib/typescript/commonjs/src/implementation/bluebreeze_service.d.ts.map +1 -1
  55. package/lib/typescript/commonjs/src/implementation/bluebreeze_state.d.ts +16 -1
  56. package/lib/typescript/commonjs/src/implementation/bluebreeze_state.d.ts.map +1 -1
  57. package/lib/typescript/commonjs/src/implementation/native_bridge.d.ts +17 -0
  58. package/lib/typescript/commonjs/src/implementation/native_bridge.d.ts.map +1 -0
  59. package/lib/typescript/commonjs/src/index.d.ts +0 -13
  60. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  61. package/lib/typescript/module/src/NativeBlueBreeze.d.ts +1 -1
  62. package/lib/typescript/module/src/NativeBlueBreeze.d.ts.map +1 -1
  63. package/lib/typescript/module/src/implementation/bluebreeze_authorization.d.ts +10 -1
  64. package/lib/typescript/module/src/implementation/bluebreeze_authorization.d.ts.map +1 -1
  65. package/lib/typescript/module/src/implementation/bluebreeze_characteristic.d.ts +29 -0
  66. package/lib/typescript/module/src/implementation/bluebreeze_characteristic.d.ts.map +1 -1
  67. package/lib/typescript/module/src/implementation/bluebreeze_connection_status.d.ts +7 -0
  68. package/lib/typescript/module/src/implementation/bluebreeze_connection_status.d.ts.map +1 -0
  69. package/lib/typescript/module/src/implementation/bluebreeze_device.d.ts +43 -2
  70. package/lib/typescript/module/src/implementation/bluebreeze_device.d.ts.map +1 -1
  71. package/lib/typescript/module/src/implementation/bluebreeze_scan_result.d.ts +12 -1
  72. package/lib/typescript/module/src/implementation/bluebreeze_scan_result.d.ts.map +1 -1
  73. package/lib/typescript/module/src/implementation/bluebreeze_service.d.ts +7 -1
  74. package/lib/typescript/module/src/implementation/bluebreeze_service.d.ts.map +1 -1
  75. package/lib/typescript/module/src/implementation/bluebreeze_state.d.ts +16 -1
  76. package/lib/typescript/module/src/implementation/bluebreeze_state.d.ts.map +1 -1
  77. package/lib/typescript/module/src/implementation/native_bridge.d.ts +17 -0
  78. package/lib/typescript/module/src/implementation/native_bridge.d.ts.map +1 -0
  79. package/lib/typescript/module/src/index.d.ts +6 -19
  80. package/lib/typescript/module/src/index.d.ts.map +1 -1
  81. package/package.json +13 -23
  82. package/react-native-bluebreeze.podspec +1 -1
  83. package/src/NativeBlueBreeze.ts +1 -1
  84. package/src/implementation/bluebreeze_authorization.ts +10 -1
  85. package/src/implementation/bluebreeze_characteristic.ts +48 -10
  86. package/src/implementation/bluebreeze_connection_status.ts +6 -0
  87. package/src/implementation/bluebreeze_device.ts +62 -13
  88. package/src/implementation/bluebreeze_scan_result.ts +18 -0
  89. package/src/implementation/bluebreeze_service.ts +8 -0
  90. package/src/implementation/bluebreeze_state.ts +16 -1
  91. package/src/implementation/native_bridge.ts +196 -0
  92. package/src/index.tsx +24 -202
  93. package/android/generated/jni/react/renderer/components/RNBlueBreezeSpec/RNBlueBreezeSpecJSI-generated.cpp +0 -179
  94. package/ios/generated/RNBlueBreezeSpecJSI-generated.cpp +0 -179
  95. /package/ios/generated/{RNBlueBreezeSpec → ReactCodegen/RNBlueBreezeSpec}/RNBlueBreezeSpec-generated.mm +0 -0
  96. /package/ios/generated/{RNBlueBreezeSpec → ReactCodegen/RNBlueBreezeSpec}/RNBlueBreezeSpec.h +0 -0
@@ -1,14 +1,43 @@
1
1
  import type { StateValueEmitter } from "react-native-value-emitter";
2
+ /**
3
+ * A GATT characteristic belonging to a {@link BBService}.
4
+ *
5
+ * Rediscovered (and replaced with a new instance) every time services are discovered.
6
+ * Do not hold onto a `BBCharacteristic` reference across a disconnect/reconnect cycle.
7
+ */
2
8
  export declare class BBCharacteristic {
3
9
  constructor(deviceId: string, serviceId: string, id: string, name: string | undefined, properties: string[]);
10
+ /** The characteristic's UUID. */
4
11
  id: string;
12
+ /** A human-readable name for well-known (Bluetooth SIG assigned-number) characteristics, if recognized. */
5
13
  name?: string;
14
+ /** The GATT properties this characteristic declares. */
6
15
  properties: string[];
16
+ /** The last value read or notified for this characteristic. Empty until first populated. */
7
17
  data: StateValueEmitter<number[]>;
18
+ /** Whether this app is currently subscribed to notifications for this characteristic. */
8
19
  notifyEnabled: StateValueEmitter<boolean>;
20
+ /**
21
+ * Reads this characteristic's current value, also updating {@link data}.
22
+ * @throws if the read fails or times out.
23
+ */
9
24
  read: () => Promise<number[]>;
25
+ /**
26
+ * Writes a value to this characteristic.
27
+ * @param data The bytes to write.
28
+ * @param withResponse Whether to wait for the peripheral's write acknowledgment.
29
+ * @throws if the write fails or times out.
30
+ */
10
31
  write: (data: number[], withResponse: boolean) => Promise<void>;
32
+ /**
33
+ * Subscribes to notifications.
34
+ * @throws if the subscribe request fails or times out.
35
+ */
11
36
  subscribe: () => Promise<void>;
37
+ /**
38
+ * Unsubscribes from notifications.
39
+ * @throws if the unsubscribe request fails or times out.
40
+ */
12
41
  unsubscribe: () => Promise<void>;
13
42
  }
14
43
  //# sourceMappingURL=bluebreeze_characteristic.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bluebreeze_characteristic.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_characteristic.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAEnE,qBAAa,gBAAgB;gBAErB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,UAAU,EAAE,MAAM,EAAE;IAexB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,EAAE,CAAA;IAGpB,IAAI,EAAE,iBAAiB,CAAC,MAAM,EAAE,CAAC,CAAA;IAGjC,aAAa,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAA;IAGzC,IAAI,EAAE,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAC7B,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/D,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9B,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CACnC"}
1
+ {"version":3,"file":"bluebreeze_characteristic.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_characteristic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAUnE;;;;;GAKG;AACH,qBAAa,gBAAgB;gBAErB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,UAAU,EAAE,MAAM,EAAE;IAexB,iCAAiC;IACjC,EAAE,EAAE,MAAM,CAAA;IAEV,2GAA2G;IAC3G,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,wDAAwD;IACxD,UAAU,EAAE,MAAM,EAAE,CAAA;IAEpB,4FAA4F;IAC5F,IAAI,EAAE,iBAAiB,CAAC,MAAM,EAAE,CAAC,CAAA;IAEjC,yFAAyF;IACzF,aAAa,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAA;IAEzC;;;OAGG;IACH,IAAI,EAAE,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAE7B;;;;;OAKG;IACH,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAE/D;;;OAGG;IACH,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAE9B;;;OAGG;IACH,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CACnC"}
@@ -0,0 +1,7 @@
1
+ /** Connection status of a {@link BBDevice}. */
2
+ export type BBDeviceConnectionStatus =
3
+ /** Not connected. */
4
+ 'disconnected'
5
+ /** Connected and ready for operations. */
6
+ | 'connected';
7
+ //# sourceMappingURL=bluebreeze_connection_status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bluebreeze_connection_status.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_connection_status.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,MAAM,MAAM,wBAAwB;AAChC,qBAAqB;AACnB,cAAc;AAChB,0CAA0C;GACxC,WAAW,CAAA"}
@@ -1,15 +1,56 @@
1
1
  import type { StateValueEmitter } from "react-native-value-emitter";
2
+ import type { BBDeviceConnectionStatus } from "./bluebreeze_connection_status";
2
3
  import type { BBService } from "./bluebreeze_service";
4
+ /**
5
+ * A Bluetooth Low Energy peripheral, either seen while scanning or already connected from a
6
+ * prior session. Obtained via `BlueBreeze.devices` -- never constructed directly.
7
+ *
8
+ * A `BBDevice` stays valid for the app's lifetime once created: it isn't recreated across a
9
+ * connect/disconnect cycle, so its {@link connectionStatus}, {@link mtu}, and object identity
10
+ * all stay stable. Its {@link services} list, however, is rebuilt from scratch on every
11
+ * {@link discoverServices} call -- including one after a reconnect -- so a {@link BBService} or
12
+ * its {@link BBCharacteristic}s should not be held onto across a disconnect/reconnect; re-read
13
+ * `services` instead.
14
+ */
3
15
  export declare class BBDevice {
4
16
  constructor(id: string, name?: string);
17
+ /** The device's unique identifier. */
5
18
  id: string;
19
+ /** The device's advertised name, if any. */
6
20
  name?: string;
21
+ /** The device's services discovered so far. Empty until {@link discoverServices} has been called and completed. */
7
22
  services: StateValueEmitter<BBService[]>;
8
- connectionStatus: StateValueEmitter<string>;
23
+ /** Current connection status of the device. */
24
+ connectionStatus: StateValueEmitter<BBDeviceConnectionStatus>;
25
+ /**
26
+ * The negotiated ATT MTU in bytes. Stays at the platform default until {@link requestMTU}
27
+ * has been called and resolved.
28
+ */
9
29
  mtu: StateValueEmitter<number>;
30
+ /**
31
+ * Connects the device.
32
+ * @throws if the connection attempt fails or times out.
33
+ */
10
34
  connect: () => Promise<void>;
35
+ /**
36
+ * Disconnects the device.
37
+ * @throws if the disconnect attempt fails or times out.
38
+ */
11
39
  disconnect: () => Promise<void>;
40
+ /**
41
+ * Discovers all of the device's services and their characteristics, populating
42
+ * {@link services}. Requires an active connection.
43
+ * @throws if discovery fails or times out.
44
+ */
12
45
  discoverServices: () => Promise<void>;
46
+ /**
47
+ * Requests a larger MTU, updating {@link mtu} with whatever size the device actually
48
+ * negotiates. Requires an active connection.
49
+ *
50
+ * @param mtu The desired MTU size in bytes.
51
+ * @returns The negotiated MTU size.
52
+ * @throws if the request fails or times out.
53
+ */
13
54
  requestMTU: (mtu: number) => Promise<number>;
14
55
  }
15
56
  //# sourceMappingURL=bluebreeze_device.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bluebreeze_device.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_device.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAErD,qBAAa,QAAQ;gBAEb,EAAE,EAAE,MAAM,EACV,IAAI,CAAC,EAAE,MAAM;IAejB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IAGb,QAAQ,EAAE,iBAAiB,CAAC,SAAS,EAAE,CAAC,CAAA;IAGxC,gBAAgB,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAA;IAG3C,GAAG,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAA;IAG9B,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5B,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/B,gBAAgB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IACrC,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CAC/C"}
1
+ {"version":3,"file":"bluebreeze_device.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_device.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAA;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAWrD;;;;;;;;;;GAUG;AACH,qBAAa,QAAQ;gBAEb,EAAE,EAAE,MAAM,EACV,IAAI,CAAC,EAAE,MAAM;IAejB,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAA;IAEV,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,mHAAmH;IACnH,QAAQ,EAAE,iBAAiB,CAAC,SAAS,EAAE,CAAC,CAAA;IAExC,+CAA+C;IAC/C,gBAAgB,EAAE,iBAAiB,CAAC,wBAAwB,CAAC,CAAA;IAE7D;;;OAGG;IACH,GAAG,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAA;IAE9B;;;OAGG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAE5B;;;OAGG;IACH,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAE/B;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAErC;;;;;;;OAOG;IACH,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CAC/C"}
@@ -1,13 +1,24 @@
1
1
  import type { BBDevice } from "./bluebreeze_device";
2
+ /**
3
+ * A single BLE advertisement seen while scanning.
4
+ */
2
5
  export declare class BBScanResult {
3
6
  constructor(device: BBDevice, name: string | undefined, rssi: number, connectable: boolean, advertisedServices: string[], manufacturerId?: number, manufacturerName?: string, manufacturerData?: number[]);
7
+ /** The device that sent this advertisement. */
4
8
  device: BBDevice;
9
+ /** The advertised local name, if any. Falls back to {@link device}'s name. */
5
10
  name?: string;
11
+ /** Received signal strength, in dBm. */
6
12
  rssi: number;
13
+ /** Whether this advertisement indicates the device currently accepts connections. */
7
14
  connectable: boolean;
15
+ /** Service UUIDs included in this advertisement. */
8
16
  advertisedServices: string[];
17
+ /** The Bluetooth SIG-assigned company identifier for manufacturer-specific data, if present. */
9
18
  manufacturerId?: number;
19
+ /** A human-readable name for {@link manufacturerId}, if recognized. */
10
20
  manufacturerName?: string;
21
+ /** Raw manufacturer-specific advertisement data, if present. */
11
22
  manufacturerData?: number[];
12
23
  }
13
24
  //# sourceMappingURL=bluebreeze_scan_result.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bluebreeze_scan_result.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_scan_result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAEnD,qBAAa,YAAY;gBAEjB,MAAM,EAAE,QAAQ,EAChB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,OAAO,EACpB,kBAAkB,EAAE,MAAM,EAAE,EAC5B,cAAc,CAAC,EAAE,MAAM,EACvB,gBAAgB,CAAC,EAAE,MAAM,EACzB,gBAAgB,CAAC,EAAE,MAAM,EAAE;IAY/B,MAAM,EAAE,QAAQ,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,OAAO,CAAA;IACpB,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC9B"}
1
+ {"version":3,"file":"bluebreeze_scan_result.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_scan_result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAEnD;;GAEG;AACH,qBAAa,YAAY;gBAEjB,MAAM,EAAE,QAAQ,EAChB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,OAAO,EACpB,kBAAkB,EAAE,MAAM,EAAE,EAC5B,cAAc,CAAC,EAAE,MAAM,EACvB,gBAAgB,CAAC,EAAE,MAAM,EACzB,gBAAgB,CAAC,EAAE,MAAM,EAAE;IAY/B,+CAA+C;IAC/C,MAAM,EAAE,QAAQ,CAAA;IAEhB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAA;IAEZ,qFAAqF;IACrF,WAAW,EAAE,OAAO,CAAA;IAEpB,oDAAoD;IACpD,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAE5B,gGAAgG;IAChG,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB,gEAAgE;IAChE,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC9B"}
@@ -1,8 +1,14 @@
1
1
  import type { BBCharacteristic } from "./bluebreeze_characteristic";
2
+ /**
3
+ * A GATT service belonging to a {@link BBDevice}.
4
+ */
2
5
  export declare class BBService {
3
6
  constructor(id: string, name: string | undefined, characteristics: BBCharacteristic[]);
7
+ /** The service's UUID. */
4
8
  id: string;
9
+ /** A human-readable name for well-known (Bluetooth SIG assigned-number) services, if recognized. */
5
10
  name?: string;
11
+ /** This service's characteristics. */
6
12
  characteristics: BBCharacteristic[];
7
13
  }
8
14
  //# sourceMappingURL=bluebreeze_service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bluebreeze_service.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE,qBAAa,SAAS;gBAEd,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,eAAe,EAAE,gBAAgB,EAAE;IAOvC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,eAAe,EAAE,gBAAgB,EAAE,CAAA;CACtC"}
1
+ {"version":3,"file":"bluebreeze_service.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE;;GAEG;AACH,qBAAa,SAAS;gBAEd,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,eAAe,EAAE,gBAAgB,EAAE;IAOvC,0BAA0B;IAC1B,EAAE,EAAE,MAAM,CAAA;IAEV,oGAAoG;IACpG,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,sCAAsC;IACtC,eAAe,EAAE,gBAAgB,EAAE,CAAA;CACtC"}
@@ -1,2 +1,17 @@
1
- export type BBState = 'unknown' | 'resetting' | 'unsupported' | 'unauthorized' | 'poweredOff' | 'poweredOn';
1
+ /**
2
+ * The power/availability state of the device's Bluetooth adapter.
3
+ */
4
+ export type BBState =
5
+ /** Not yet determined. */
6
+ 'unknown'
7
+ /** Bluetooth is turned off. */
8
+ | 'poweredOff'
9
+ /** Bluetooth is turned on and available for scanning and connecting. */
10
+ | 'poweredOn'
11
+ /** iOS only: Bluetooth access is restricted at the OS level (e.g. by an MDM profile). */
12
+ | 'unauthorized'
13
+ /** iOS only: this device's hardware doesn't support Bluetooth Low Energy. */
14
+ | 'unsupported'
15
+ /** iOS only: the Bluetooth stack is resetting; treat like a temporary `unknown`. */
16
+ | 'resetting';
2
17
  //# sourceMappingURL=bluebreeze_state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bluebreeze_state.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_state.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,GAAG,YAAY,GAAG,WAAW,CAAA"}
1
+ {"version":3,"file":"bluebreeze_state.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_state.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,OAAO;AACf,0BAA0B;AACxB,SAAS;AACX,+BAA+B;GAC7B,YAAY;AACd,wEAAwE;GACtE,WAAW;AACb,yFAAyF;GACvF,cAAc;AAChB,6EAA6E;GAC3E,aAAa;AACf,oFAAoF;GAClF,WAAW,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { StateValueEmitter } from 'react-native-value-emitter';
2
+ import type { BBDeviceConnectionStatus } from './bluebreeze_connection_status';
3
+ import { BBService } from './bluebreeze_service';
4
+ export declare const deviceServices: (id: string) => StateValueEmitter<BBService[]>;
5
+ export declare const deviceConnectionStatus: (id: string) => StateValueEmitter<BBDeviceConnectionStatus>;
6
+ export declare const deviceMTU: (id: string) => StateValueEmitter<number>;
7
+ export declare const deviceConnect: (id: string) => Promise<void>;
8
+ export declare const deviceDisconnect: (id: string) => Promise<void>;
9
+ export declare const deviceDiscoverServices: (id: string) => Promise<void>;
10
+ export declare const deviceRequestMTU: (id: string, mtu: number) => Promise<number>;
11
+ export declare const deviceCharacteristicNotifyEnabled: (id: string, serviceId: string, characteristicId: string) => StateValueEmitter<boolean>;
12
+ export declare const deviceCharacteristicData: (id: string, serviceId: string, characteristicId: string) => StateValueEmitter<number[]>;
13
+ export declare const deviceCharacteristicRead: (id: string, serviceId: string, characteristicId: string) => Promise<number[]>;
14
+ export declare const deviceCharacteristicWrite: (id: string, serviceId: string, characteristicId: string, data: number[], withResponse: boolean) => Promise<void>;
15
+ export declare const deviceCharacteristicSubscribe: (id: string, serviceId: string, characteristicId: string) => Promise<void>;
16
+ export declare const deviceCharacteristicUnsubscribe: (id: string, serviceId: string, characteristicId: string) => Promise<void>;
17
+ //# sourceMappingURL=native_bridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native_bridge.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/native_bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAG9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAA;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAsBhD,eAAO,MAAM,cAAc,OAAQ,MAAM,KAAG,iBAAiB,CAAC,SAAS,EAAE,CAUxE,CAAA;AAYD,eAAO,MAAM,sBAAsB,OAAQ,MAAM,KAAG,iBAAiB,CAAC,wBAAwB,CAQ7F,CAAA;AAUD,eAAO,MAAM,SAAS,OAAQ,MAAM,KAAG,iBAAiB,CAAC,MAAM,CAQ9D,CAAA;AAQD,eAAO,MAAM,aAAa,+BAAiC,CAAA;AAE3D,eAAO,MAAM,gBAAgB,+BAAoC,CAAA;AAEjE,eAAO,MAAM,sBAAsB,+BAA0C,CAAA;AAE7E,eAAO,MAAM,gBAAgB,8CAAoC,CAAA;AAMjE,eAAO,MAAM,iCAAiC,OACtC,MAAM,aACC,MAAM,oBACC,MAAM,KACzB,iBAAiB,CAAC,OAAO,CAoB3B,CAAA;AAUD,eAAO,MAAM,wBAAwB,OAC7B,MAAM,aACC,MAAM,oBACC,MAAM,KACzB,iBAAiB,CAAC,MAAM,EAAE,CAoB5B,CAAA;AAQD,eAAO,MAAM,wBAAwB,gFAA4C,CAAA;AAEjF,eAAO,MAAM,yBAAyB,mHAA6C,CAAA;AAEnF,eAAO,MAAM,6BAA6B,4EAAiD,CAAA;AAE3F,eAAO,MAAM,+BAA+B,4EAAmD,CAAA"}
@@ -15,19 +15,6 @@ declare const _default: {
15
15
  scanStart: (ids?: string[] | undefined) => void;
16
16
  scanStop: () => void;
17
17
  devices: StateValueEmitter<Map<string, BBDevice>>;
18
- deviceServices: (id: string) => StateValueEmitter<BBService[]>;
19
- deviceConnectionStatus: (id: string) => StateValueEmitter<string>;
20
- deviceMTU: (id: string) => StateValueEmitter<number>;
21
- deviceConnect: (id: string) => Promise<void>;
22
- deviceDisconnect: (id: string) => Promise<void>;
23
- deviceDiscoverServices: (id: string) => Promise<void>;
24
- deviceRequestMTU: (id: string, mtu: number) => Promise<number>;
25
- deviceCharacteristicNotifyEnabled: (id: string, serviceId: string, characteristicId: string) => StateValueEmitter<boolean>;
26
- deviceCharacteristicData: (id: string, serviceId: string, characteristicId: string) => StateValueEmitter<number[]>;
27
- deviceCharacteristicRead: (id: string, serviceId: string, characteristicId: string) => Promise<number[]>;
28
- deviceCharacteristicWrite: (id: string, serviceId: string, characteristicId: string, data: number[], withResponse: boolean) => Promise<void>;
29
- deviceCharacteristicSubscribe: (id: string, serviceId: string, characteristicId: string) => Promise<void>;
30
- deviceCharacteristicUnsubscribe: (id: string, serviceId: string, characteristicId: string) => Promise<void>;
31
18
  };
32
19
  export default _default;
33
20
  export { BBCharacteristic, BBDevice, BBScanResult, BBService, type BBAuthorization, type BBState };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAA;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAA;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAA;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAA;;;;;;;;sBA2CxC,MAAM,EAAE,GAAG,SAAS;;;yBA8BhB,MAAM,KAAG,iBAAiB,CAAC,SAAS,EAAE,CAAC;iCAsB/B,MAAM,KAAG,iBAAiB,CAAC,MAAM,CAAC;oBAkB/C,MAAM,KAAG,iBAAiB,CAAC,MAAM,CAAC;;;;;4CA6BjD,MAAM,aACC,MAAM,oBACC,MAAM,KACzB,iBAAiB,CAAC,OAAO,CAAC;mCA+BrB,MAAM,aACC,MAAM,oBACC,MAAM,KACzB,iBAAiB,CAAC,MAAM,EAAE,CAAC;;;;;;AAoG9B,wBAuBC;AAED,OAAO,EACH,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,KAAK,eAAe,EACpB,KAAK,OAAO,EACf,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAA;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAA;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAA;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAA;;;;;;;;sBAwDxC,MAAM,EAAE,GAAG,SAAS;;;;AA2D5C,wBAUC;AAED,OAAO,EACH,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,KAAK,eAAe,EACpB,KAAK,OAAO,EACf,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import type { TurboModule } from 'react-native';
2
- import type { EventEmitter } from 'react-native/Libraries/Types/CodegenTypes';
2
+ import type { EventEmitter } from 'react-native/Libraries/Types/CodegenTypesNamespace';
3
3
  export interface SpecScanResult {
4
4
  id: string;
5
5
  name?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"NativeBlueBreeze.d.ts","sourceRoot":"","sources":["../../../../src/NativeBlueBreeze.ts"],"names":[],"mappings":"AAAA,OA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IAAI,CAAC,CAAA;CAC1G;;AAED,wBAAmE"}
@@ -1,2 +1,11 @@
1
- export type BBAuthorization = 'unknown' | 'showRationale' | 'restricted' | 'denied' | 'authorized';
1
+ /** Whether this app is currently allowed to use Bluetooth. */
2
+ export type BBAuthorization =
3
+ /** Not yet determined. */
4
+ 'unknown'
5
+ /** Permission has been denied once but not permanently. Android only. */
6
+ | 'showRationale'
7
+ /** Permission has been permanently denied. */
8
+ | 'denied'
9
+ /** Permission has been granted. */
10
+ | 'authorized';
2
11
  //# sourceMappingURL=bluebreeze_authorization.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bluebreeze_authorization.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_authorization.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,eAAe,GAAG,YAAY,GAAG,QAAQ,GAAG,YAAY,CAAA"}
1
+ {"version":3,"file":"bluebreeze_authorization.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_authorization.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,MAAM,MAAM,eAAe;AACvB,0BAA0B;AACxB,SAAS;AACX,yEAAyE;GACvE,eAAe;AACjB,8CAA8C;GAC5C,QAAQ;AACV,mCAAmC;GACjC,YAAY,CAAA"}
@@ -1,14 +1,43 @@
1
1
  import type { StateValueEmitter } from "react-native-value-emitter";
2
+ /**
3
+ * A GATT characteristic belonging to a {@link BBService}.
4
+ *
5
+ * Rediscovered (and replaced with a new instance) every time services are discovered.
6
+ * Do not hold onto a `BBCharacteristic` reference across a disconnect/reconnect cycle.
7
+ */
2
8
  export declare class BBCharacteristic {
3
9
  constructor(deviceId: string, serviceId: string, id: string, name: string | undefined, properties: string[]);
10
+ /** The characteristic's UUID. */
4
11
  id: string;
12
+ /** A human-readable name for well-known (Bluetooth SIG assigned-number) characteristics, if recognized. */
5
13
  name?: string;
14
+ /** The GATT properties this characteristic declares. */
6
15
  properties: string[];
16
+ /** The last value read or notified for this characteristic. Empty until first populated. */
7
17
  data: StateValueEmitter<number[]>;
18
+ /** Whether this app is currently subscribed to notifications for this characteristic. */
8
19
  notifyEnabled: StateValueEmitter<boolean>;
20
+ /**
21
+ * Reads this characteristic's current value, also updating {@link data}.
22
+ * @throws if the read fails or times out.
23
+ */
9
24
  read: () => Promise<number[]>;
25
+ /**
26
+ * Writes a value to this characteristic.
27
+ * @param data The bytes to write.
28
+ * @param withResponse Whether to wait for the peripheral's write acknowledgment.
29
+ * @throws if the write fails or times out.
30
+ */
10
31
  write: (data: number[], withResponse: boolean) => Promise<void>;
32
+ /**
33
+ * Subscribes to notifications.
34
+ * @throws if the subscribe request fails or times out.
35
+ */
11
36
  subscribe: () => Promise<void>;
37
+ /**
38
+ * Unsubscribes from notifications.
39
+ * @throws if the unsubscribe request fails or times out.
40
+ */
12
41
  unsubscribe: () => Promise<void>;
13
42
  }
14
43
  //# sourceMappingURL=bluebreeze_characteristic.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bluebreeze_characteristic.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_characteristic.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAEnE,qBAAa,gBAAgB;gBAErB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,UAAU,EAAE,MAAM,EAAE;IAexB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,EAAE,CAAA;IAGpB,IAAI,EAAE,iBAAiB,CAAC,MAAM,EAAE,CAAC,CAAA;IAGjC,aAAa,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAA;IAGzC,IAAI,EAAE,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAC7B,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/D,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9B,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CACnC"}
1
+ {"version":3,"file":"bluebreeze_characteristic.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_characteristic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAUnE;;;;;GAKG;AACH,qBAAa,gBAAgB;gBAErB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,UAAU,EAAE,MAAM,EAAE;IAexB,iCAAiC;IACjC,EAAE,EAAE,MAAM,CAAA;IAEV,2GAA2G;IAC3G,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,wDAAwD;IACxD,UAAU,EAAE,MAAM,EAAE,CAAA;IAEpB,4FAA4F;IAC5F,IAAI,EAAE,iBAAiB,CAAC,MAAM,EAAE,CAAC,CAAA;IAEjC,yFAAyF;IACzF,aAAa,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAA;IAEzC;;;OAGG;IACH,IAAI,EAAE,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAE7B;;;;;OAKG;IACH,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAE/D;;;OAGG;IACH,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAE9B;;;OAGG;IACH,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CACnC"}
@@ -0,0 +1,7 @@
1
+ /** Connection status of a {@link BBDevice}. */
2
+ export type BBDeviceConnectionStatus =
3
+ /** Not connected. */
4
+ 'disconnected'
5
+ /** Connected and ready for operations. */
6
+ | 'connected';
7
+ //# sourceMappingURL=bluebreeze_connection_status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bluebreeze_connection_status.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_connection_status.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,MAAM,MAAM,wBAAwB;AAChC,qBAAqB;AACnB,cAAc;AAChB,0CAA0C;GACxC,WAAW,CAAA"}
@@ -1,15 +1,56 @@
1
1
  import type { StateValueEmitter } from "react-native-value-emitter";
2
- import type { BBService } from "./bluebreeze_service";
2
+ import type { BBDeviceConnectionStatus } from "./bluebreeze_connection_status.js";
3
+ import type { BBService } from "./bluebreeze_service.js";
4
+ /**
5
+ * A Bluetooth Low Energy peripheral, either seen while scanning or already connected from a
6
+ * prior session. Obtained via `BlueBreeze.devices` -- never constructed directly.
7
+ *
8
+ * A `BBDevice` stays valid for the app's lifetime once created: it isn't recreated across a
9
+ * connect/disconnect cycle, so its {@link connectionStatus}, {@link mtu}, and object identity
10
+ * all stay stable. Its {@link services} list, however, is rebuilt from scratch on every
11
+ * {@link discoverServices} call -- including one after a reconnect -- so a {@link BBService} or
12
+ * its {@link BBCharacteristic}s should not be held onto across a disconnect/reconnect; re-read
13
+ * `services` instead.
14
+ */
3
15
  export declare class BBDevice {
4
16
  constructor(id: string, name?: string);
17
+ /** The device's unique identifier. */
5
18
  id: string;
19
+ /** The device's advertised name, if any. */
6
20
  name?: string;
21
+ /** The device's services discovered so far. Empty until {@link discoverServices} has been called and completed. */
7
22
  services: StateValueEmitter<BBService[]>;
8
- connectionStatus: StateValueEmitter<string>;
23
+ /** Current connection status of the device. */
24
+ connectionStatus: StateValueEmitter<BBDeviceConnectionStatus>;
25
+ /**
26
+ * The negotiated ATT MTU in bytes. Stays at the platform default until {@link requestMTU}
27
+ * has been called and resolved.
28
+ */
9
29
  mtu: StateValueEmitter<number>;
30
+ /**
31
+ * Connects the device.
32
+ * @throws if the connection attempt fails or times out.
33
+ */
10
34
  connect: () => Promise<void>;
35
+ /**
36
+ * Disconnects the device.
37
+ * @throws if the disconnect attempt fails or times out.
38
+ */
11
39
  disconnect: () => Promise<void>;
40
+ /**
41
+ * Discovers all of the device's services and their characteristics, populating
42
+ * {@link services}. Requires an active connection.
43
+ * @throws if discovery fails or times out.
44
+ */
12
45
  discoverServices: () => Promise<void>;
46
+ /**
47
+ * Requests a larger MTU, updating {@link mtu} with whatever size the device actually
48
+ * negotiates. Requires an active connection.
49
+ *
50
+ * @param mtu The desired MTU size in bytes.
51
+ * @returns The negotiated MTU size.
52
+ * @throws if the request fails or times out.
53
+ */
13
54
  requestMTU: (mtu: number) => Promise<number>;
14
55
  }
15
56
  //# sourceMappingURL=bluebreeze_device.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bluebreeze_device.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_device.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAErD,qBAAa,QAAQ;gBAEb,EAAE,EAAE,MAAM,EACV,IAAI,CAAC,EAAE,MAAM;IAejB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IAGb,QAAQ,EAAE,iBAAiB,CAAC,SAAS,EAAE,CAAC,CAAA;IAGxC,gBAAgB,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAA;IAG3C,GAAG,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAA;IAG9B,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5B,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/B,gBAAgB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IACrC,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CAC/C"}
1
+ {"version":3,"file":"bluebreeze_device.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_device.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAgC,CAAA;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAsB,CAAA;AAWrD;;;;;;;;;;GAUG;AACH,qBAAa,QAAQ;gBAEb,EAAE,EAAE,MAAM,EACV,IAAI,CAAC,EAAE,MAAM;IAejB,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAA;IAEV,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,mHAAmH;IACnH,QAAQ,EAAE,iBAAiB,CAAC,SAAS,EAAE,CAAC,CAAA;IAExC,+CAA+C;IAC/C,gBAAgB,EAAE,iBAAiB,CAAC,wBAAwB,CAAC,CAAA;IAE7D;;;OAGG;IACH,GAAG,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAA;IAE9B;;;OAGG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAE5B;;;OAGG;IACH,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAE/B;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAErC;;;;;;;OAOG;IACH,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CAC/C"}
@@ -1,13 +1,24 @@
1
- import type { BBDevice } from "./bluebreeze_device";
1
+ import type { BBDevice } from "./bluebreeze_device.js";
2
+ /**
3
+ * A single BLE advertisement seen while scanning.
4
+ */
2
5
  export declare class BBScanResult {
3
6
  constructor(device: BBDevice, name: string | undefined, rssi: number, connectable: boolean, advertisedServices: string[], manufacturerId?: number, manufacturerName?: string, manufacturerData?: number[]);
7
+ /** The device that sent this advertisement. */
4
8
  device: BBDevice;
9
+ /** The advertised local name, if any. Falls back to {@link device}'s name. */
5
10
  name?: string;
11
+ /** Received signal strength, in dBm. */
6
12
  rssi: number;
13
+ /** Whether this advertisement indicates the device currently accepts connections. */
7
14
  connectable: boolean;
15
+ /** Service UUIDs included in this advertisement. */
8
16
  advertisedServices: string[];
17
+ /** The Bluetooth SIG-assigned company identifier for manufacturer-specific data, if present. */
9
18
  manufacturerId?: number;
19
+ /** A human-readable name for {@link manufacturerId}, if recognized. */
10
20
  manufacturerName?: string;
21
+ /** Raw manufacturer-specific advertisement data, if present. */
11
22
  manufacturerData?: number[];
12
23
  }
13
24
  //# sourceMappingURL=bluebreeze_scan_result.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bluebreeze_scan_result.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_scan_result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAEnD,qBAAa,YAAY;gBAEjB,MAAM,EAAE,QAAQ,EAChB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,OAAO,EACpB,kBAAkB,EAAE,MAAM,EAAE,EAC5B,cAAc,CAAC,EAAE,MAAM,EACvB,gBAAgB,CAAC,EAAE,MAAM,EACzB,gBAAgB,CAAC,EAAE,MAAM,EAAE;IAY/B,MAAM,EAAE,QAAQ,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,OAAO,CAAA;IACpB,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC9B"}
1
+ {"version":3,"file":"bluebreeze_scan_result.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_scan_result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAqB,CAAA;AAEnD;;GAEG;AACH,qBAAa,YAAY;gBAEjB,MAAM,EAAE,QAAQ,EAChB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,OAAO,EACpB,kBAAkB,EAAE,MAAM,EAAE,EAC5B,cAAc,CAAC,EAAE,MAAM,EACvB,gBAAgB,CAAC,EAAE,MAAM,EACzB,gBAAgB,CAAC,EAAE,MAAM,EAAE;IAY/B,+CAA+C;IAC/C,MAAM,EAAE,QAAQ,CAAA;IAEhB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAA;IAEZ,qFAAqF;IACrF,WAAW,EAAE,OAAO,CAAA;IAEpB,oDAAoD;IACpD,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAE5B,gGAAgG;IAChG,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB,gEAAgE;IAChE,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC9B"}
@@ -1,8 +1,14 @@
1
- import type { BBCharacteristic } from "./bluebreeze_characteristic";
1
+ import type { BBCharacteristic } from "./bluebreeze_characteristic.js";
2
+ /**
3
+ * A GATT service belonging to a {@link BBDevice}.
4
+ */
2
5
  export declare class BBService {
3
6
  constructor(id: string, name: string | undefined, characteristics: BBCharacteristic[]);
7
+ /** The service's UUID. */
4
8
  id: string;
9
+ /** A human-readable name for well-known (Bluetooth SIG assigned-number) services, if recognized. */
5
10
  name?: string;
11
+ /** This service's characteristics. */
6
12
  characteristics: BBCharacteristic[];
7
13
  }
8
14
  //# sourceMappingURL=bluebreeze_service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bluebreeze_service.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE,qBAAa,SAAS;gBAEd,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,eAAe,EAAE,gBAAgB,EAAE;IAOvC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,eAAe,EAAE,gBAAgB,EAAE,CAAA;CACtC"}
1
+ {"version":3,"file":"bluebreeze_service.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAA6B,CAAA;AAEnE;;GAEG;AACH,qBAAa,SAAS;gBAEd,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,eAAe,EAAE,gBAAgB,EAAE;IAOvC,0BAA0B;IAC1B,EAAE,EAAE,MAAM,CAAA;IAEV,oGAAoG;IACpG,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,sCAAsC;IACtC,eAAe,EAAE,gBAAgB,EAAE,CAAA;CACtC"}
@@ -1,2 +1,17 @@
1
- export type BBState = 'unknown' | 'resetting' | 'unsupported' | 'unauthorized' | 'poweredOff' | 'poweredOn';
1
+ /**
2
+ * The power/availability state of the device's Bluetooth adapter.
3
+ */
4
+ export type BBState =
5
+ /** Not yet determined. */
6
+ 'unknown'
7
+ /** Bluetooth is turned off. */
8
+ | 'poweredOff'
9
+ /** Bluetooth is turned on and available for scanning and connecting. */
10
+ | 'poweredOn'
11
+ /** iOS only: Bluetooth access is restricted at the OS level (e.g. by an MDM profile). */
12
+ | 'unauthorized'
13
+ /** iOS only: this device's hardware doesn't support Bluetooth Low Energy. */
14
+ | 'unsupported'
15
+ /** iOS only: the Bluetooth stack is resetting; treat like a temporary `unknown`. */
16
+ | 'resetting';
2
17
  //# sourceMappingURL=bluebreeze_state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bluebreeze_state.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_state.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,GAAG,YAAY,GAAG,WAAW,CAAA"}
1
+ {"version":3,"file":"bluebreeze_state.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_state.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,OAAO;AACf,0BAA0B;AACxB,SAAS;AACX,+BAA+B;GAC7B,YAAY;AACd,wEAAwE;GACtE,WAAW;AACb,yFAAyF;GACvF,cAAc;AAChB,6EAA6E;GAC3E,aAAa;AACf,oFAAoF;GAClF,WAAW,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { StateValueEmitter } from 'react-native-value-emitter';
2
+ import type { BBDeviceConnectionStatus } from './bluebreeze_connection_status.js';
3
+ import { BBService } from './bluebreeze_service.js';
4
+ export declare const deviceServices: (id: string) => StateValueEmitter<BBService[]>;
5
+ export declare const deviceConnectionStatus: (id: string) => StateValueEmitter<BBDeviceConnectionStatus>;
6
+ export declare const deviceMTU: (id: string) => StateValueEmitter<number>;
7
+ export declare const deviceConnect: (id: string) => Promise<void>;
8
+ export declare const deviceDisconnect: (id: string) => Promise<void>;
9
+ export declare const deviceDiscoverServices: (id: string) => Promise<void>;
10
+ export declare const deviceRequestMTU: (id: string, mtu: number) => Promise<number>;
11
+ export declare const deviceCharacteristicNotifyEnabled: (id: string, serviceId: string, characteristicId: string) => StateValueEmitter<boolean>;
12
+ export declare const deviceCharacteristicData: (id: string, serviceId: string, characteristicId: string) => StateValueEmitter<number[]>;
13
+ export declare const deviceCharacteristicRead: (id: string, serviceId: string, characteristicId: string) => Promise<number[]>;
14
+ export declare const deviceCharacteristicWrite: (id: string, serviceId: string, characteristicId: string, data: number[], withResponse: boolean) => Promise<void>;
15
+ export declare const deviceCharacteristicSubscribe: (id: string, serviceId: string, characteristicId: string) => Promise<void>;
16
+ export declare const deviceCharacteristicUnsubscribe: (id: string, serviceId: string, characteristicId: string) => Promise<void>;
17
+ //# sourceMappingURL=native_bridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native_bridge.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/native_bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAG9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAgC,CAAA;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAsB,CAAA;AAsBhD,eAAO,MAAM,cAAc,OAAQ,MAAM,KAAG,iBAAiB,CAAC,SAAS,EAAE,CAUxE,CAAA;AAYD,eAAO,MAAM,sBAAsB,OAAQ,MAAM,KAAG,iBAAiB,CAAC,wBAAwB,CAQ7F,CAAA;AAUD,eAAO,MAAM,SAAS,OAAQ,MAAM,KAAG,iBAAiB,CAAC,MAAM,CAQ9D,CAAA;AAQD,eAAO,MAAM,aAAa,+BAAiC,CAAA;AAE3D,eAAO,MAAM,gBAAgB,+BAAoC,CAAA;AAEjE,eAAO,MAAM,sBAAsB,+BAA0C,CAAA;AAE7E,eAAO,MAAM,gBAAgB,8CAAoC,CAAA;AAMjE,eAAO,MAAM,iCAAiC,OACtC,MAAM,aACC,MAAM,oBACC,MAAM,KACzB,iBAAiB,CAAC,OAAO,CAoB3B,CAAA;AAUD,eAAO,MAAM,wBAAwB,OAC7B,MAAM,aACC,MAAM,oBACC,MAAM,KACzB,iBAAiB,CAAC,MAAM,EAAE,CAoB5B,CAAA;AAQD,eAAO,MAAM,wBAAwB,gFAA4C,CAAA;AAEjF,eAAO,MAAM,yBAAyB,mHAA6C,CAAA;AAEnF,eAAO,MAAM,6BAA6B,4EAAiD,CAAA;AAE3F,eAAO,MAAM,+BAA+B,4EAAmD,CAAA"}
@@ -1,10 +1,10 @@
1
1
  import { StateValueEmitter, ValueEmitter } from 'react-native-value-emitter';
2
- import type { BBAuthorization } from './implementation/bluebreeze_authorization';
3
- import { BBCharacteristic } from './implementation/bluebreeze_characteristic';
4
- import { BBDevice } from './implementation/bluebreeze_device';
5
- import { BBScanResult } from './implementation/bluebreeze_scan_result';
6
- import { BBService } from './implementation/bluebreeze_service';
7
- import type { BBState } from './implementation/bluebreeze_state';
2
+ import type { BBAuthorization } from './implementation/bluebreeze_authorization.js';
3
+ import { BBCharacteristic } from './implementation/bluebreeze_characteristic.js';
4
+ import { BBDevice } from './implementation/bluebreeze_device.js';
5
+ import { BBScanResult } from './implementation/bluebreeze_scan_result.js';
6
+ import { BBService } from './implementation/bluebreeze_service.js';
7
+ import type { BBState } from './implementation/bluebreeze_state.js';
8
8
  declare const _default: {
9
9
  state: StateValueEmitter<BBState>;
10
10
  authorizationStatus: StateValueEmitter<BBAuthorization>;
@@ -15,19 +15,6 @@ declare const _default: {
15
15
  scanStart: (ids?: string[] | undefined) => void;
16
16
  scanStop: () => void;
17
17
  devices: StateValueEmitter<Map<string, BBDevice>>;
18
- deviceServices: (id: string) => StateValueEmitter<BBService[]>;
19
- deviceConnectionStatus: (id: string) => StateValueEmitter<string>;
20
- deviceMTU: (id: string) => StateValueEmitter<number>;
21
- deviceConnect: (id: string) => Promise<void>;
22
- deviceDisconnect: (id: string) => Promise<void>;
23
- deviceDiscoverServices: (id: string) => Promise<void>;
24
- deviceRequestMTU: (id: string, mtu: number) => Promise<number>;
25
- deviceCharacteristicNotifyEnabled: (id: string, serviceId: string, characteristicId: string) => StateValueEmitter<boolean>;
26
- deviceCharacteristicData: (id: string, serviceId: string, characteristicId: string) => StateValueEmitter<number[]>;
27
- deviceCharacteristicRead: (id: string, serviceId: string, characteristicId: string) => Promise<number[]>;
28
- deviceCharacteristicWrite: (id: string, serviceId: string, characteristicId: string, data: number[], withResponse: boolean) => Promise<void>;
29
- deviceCharacteristicSubscribe: (id: string, serviceId: string, characteristicId: string) => Promise<void>;
30
- deviceCharacteristicUnsubscribe: (id: string, serviceId: string, characteristicId: string) => Promise<void>;
31
18
  };
32
19
  export default _default;
33
20
  export { BBCharacteristic, BBDevice, BBScanResult, BBService, type BBAuthorization, type BBState };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAA;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAA;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAA;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAA;;;;;;;;sBA2CxC,MAAM,EAAE,GAAG,SAAS;;;yBA8BhB,MAAM,KAAG,iBAAiB,CAAC,SAAS,EAAE,CAAC;iCAsB/B,MAAM,KAAG,iBAAiB,CAAC,MAAM,CAAC;oBAkB/C,MAAM,KAAG,iBAAiB,CAAC,MAAM,CAAC;;;;;4CA6BjD,MAAM,aACC,MAAM,oBACC,MAAM,KACzB,iBAAiB,CAAC,OAAO,CAAC;mCA+BrB,MAAM,aACC,MAAM,oBACC,MAAM,KACzB,iBAAiB,CAAC,MAAM,EAAE,CAAC;;;;;;AAoG9B,wBAuBC;AAED,OAAO,EACH,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,KAAK,eAAe,EACpB,KAAK,OAAO,EACf,CAAA"}
1
+ {"version":3,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