@cero-base/cero 1.10.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cero-base/cero",
3
- "version": "1.10.1",
4
- "description": "The ideal p2p API everything is a handle, handles contain refs, refs contain rows.",
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": {
@@ -95,7 +95,7 @@
95
95
  "test:node": "ls test/*.test.js | xargs -P1 -n1 brittle-node"
96
96
  },
97
97
  "dependencies": {
98
- "@cero-base/core": "^1.10.1",
98
+ "@cero-base/core": "^1.11.0",
99
99
  "b4a": "^1.8.1",
100
100
  "bare-abort-controller": "^1.1.2",
101
101
  "bare-crypto": "^1.15.3",
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
 
@@ -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
  */