iii-browser-sdk 0.26.0-rc.5 → 0.26.0-rc.6
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/README.md +3 -11
- package/dist/helpers.d.cts +1 -1
- package/dist/helpers.d.mts +1 -1
- package/dist/index.cjs +378 -276
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +378 -276
- package/dist/index.mjs.map +1 -1
- package/dist/{types-BkZuClyZ.d.cts → types-B2KyHdl1.d.mts} +37 -41
- package/dist/types-B2KyHdl1.d.mts.map +1 -0
- package/dist/{types-LkiBp7wP.d.mts → types-e5dOpj8b.d.cts} +37 -41
- package/dist/types-e5dOpj8b.d.cts.map +1 -0
- package/package.json +1 -1
- package/dist/types-BkZuClyZ.d.cts.map +0 -1
- package/dist/types-LkiBp7wP.d.mts.map +0 -1
package/README.md
CHANGED
|
@@ -228,9 +228,8 @@ iii.onObservationDeliver('ui::on-command', async (call) => {
|
|
|
228
228
|
```
|
|
229
229
|
|
|
230
230
|
`obs.accepted()` resolves once the SDK acked the observer; a call made then
|
|
231
|
-
reaches it. A source sends a new observer its initial state
|
|
232
|
-
|
|
233
|
-
to that observer alone, so the target receives it in the shape of every call:
|
|
231
|
+
reaches it. A source sends a new observer its initial state by calling through
|
|
232
|
+
that observer, which runs its target alone with the payload as given:
|
|
234
233
|
|
|
235
234
|
```typescript
|
|
236
235
|
import { CallAction } from 'iii-browser-sdk'
|
|
@@ -240,9 +239,8 @@ iii.onObserverAdded('ui::on-click', (obs) => {
|
|
|
240
239
|
.accepted()
|
|
241
240
|
.then(() =>
|
|
242
241
|
iii.call({
|
|
243
|
-
|
|
242
|
+
observer: obs,
|
|
244
243
|
payload: lastClick(obs.args.selector as string),
|
|
245
|
-
metadata: { for_observer: obs.id },
|
|
246
244
|
action: CallAction.Void(),
|
|
247
245
|
}),
|
|
248
246
|
)
|
|
@@ -250,14 +248,8 @@ iii.onObserverAdded('ui::on-click', (obs) => {
|
|
|
250
248
|
// a rejected observer gets nothing
|
|
251
249
|
})
|
|
252
250
|
})
|
|
253
|
-
iii.onObservationMatch('ui::on-click', (obs, call) =>
|
|
254
|
-
call.metadata?.for_observer ? call.metadata.for_observer === obs.id : obs.args.selector === call.input.selector,
|
|
255
|
-
)
|
|
256
251
|
```
|
|
257
252
|
|
|
258
|
-
With keys, file each observer under `for_observer:<id>` as well, and give such
|
|
259
|
-
a call that one key.
|
|
260
|
-
|
|
261
253
|
A function that sets `args_format`, `private: true`, `observable: false`, an
|
|
262
254
|
`onObservationMatch` hook or an `onObservationDeliver` hook needs an engine that
|
|
263
255
|
advertises `observe.v2`; against an older engine it stays unregistered, and the
|
package/dist/helpers.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as StreamChannelRef, a as ISdk, r as Channel, v as ChannelDirection, y as ChannelItem } from "./types-
|
|
1
|
+
import { N as StreamChannelRef, a as ISdk, r as Channel, v as ChannelDirection, y as ChannelItem } from "./types-e5dOpj8b.cjs";
|
|
2
2
|
import { IStream } from "./stream.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/utils.d.ts
|
package/dist/helpers.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as StreamChannelRef, a as ISdk, r as Channel, v as ChannelDirection, y as ChannelItem } from "./types-
|
|
1
|
+
import { N as StreamChannelRef, a as ISdk, r as Channel, v as ChannelDirection, y as ChannelItem } from "./types-B2KyHdl1.mjs";
|
|
2
2
|
import { IStream } from "./stream.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/utils.d.ts
|