@cero-base/cero 1.11.0 → 1.11.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.
- package/package.json +2 -2
- package/src/bluetooth.js +6 -0
- package/types/bluetooth.d.ts +4 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cero-base/cero",
|
|
3
|
-
"version": "1.11.
|
|
4
|
-
"description": "The ideal p2p API
|
|
3
|
+
"version": "1.11.1",
|
|
4
|
+
"description": "The ideal p2p API \u2014 everything is a handle, handles contain refs, refs contain rows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"engines": {
|
package/src/bluetooth.js
CHANGED
|
@@ -71,11 +71,17 @@ export class Bluetooth extends ReadyResource {
|
|
|
71
71
|
* invite doesn't stay an ambient admission ticket. Auto-stops at the
|
|
72
72
|
* invite's expiry, on `bluetooth.stop()`, and on close.
|
|
73
73
|
*
|
|
74
|
+
* Only active while nearby sync is on: before `start()` (and after `stop()`)
|
|
75
|
+
* this is a no-op — the user controls the radio, and a join must not touch
|
|
76
|
+
* Bluetooth (OS permissions, GATT server) they never enabled.
|
|
77
|
+
*
|
|
74
78
|
* @param {string} invite Z32 invite string.
|
|
75
79
|
* @returns {() => void}
|
|
76
80
|
*/
|
|
77
81
|
announce(invite) {
|
|
78
82
|
if (!this._backend || this.state === 'unsupported') return () => {}
|
|
83
|
+
if (!this._transport || (this.state !== 'on' && this.state !== 'waiting' && this.state !== 'starting'))
|
|
84
|
+
return () => {}
|
|
79
85
|
const topic = Pairing.inviteTopic(invite)
|
|
80
86
|
if (!topic) return () => {}
|
|
81
87
|
|
package/types/bluetooth.d.ts
CHANGED
|
@@ -51,6 +51,10 @@ export class Bluetooth extends ReadyResource {
|
|
|
51
51
|
* invite doesn't stay an ambient admission ticket. Auto-stops at the
|
|
52
52
|
* invite's expiry, on `bluetooth.stop()`, and on close.
|
|
53
53
|
*
|
|
54
|
+
* Only active while nearby sync is on: before `start()` (and after `stop()`)
|
|
55
|
+
* this is a no-op — the user controls the radio, and a join must not touch
|
|
56
|
+
* Bluetooth (OS permissions, GATT server) they never enabled.
|
|
57
|
+
*
|
|
54
58
|
* @param {string} invite Z32 invite string.
|
|
55
59
|
* @returns {() => void}
|
|
56
60
|
*/
|