iii-browser-sdk 0.26.0-rc.4 → 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 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 as a call of the
232
- function with `metadata: { for_observer: obs.id }`, which the match hook gives
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
- function_id: 'ui::on-click',
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
@@ -1,4 +1,4 @@
1
- import { N as StreamChannelRef, a as ISdk, r as Channel, v as ChannelDirection, y as ChannelItem } from "./types-BkZuClyZ.cjs";
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
@@ -1,4 +1,4 @@
1
- import { N as StreamChannelRef, a as ISdk, r as Channel, v as ChannelDirection, y as ChannelItem } from "./types-LkiBp7wP.mjs";
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