wenay-react2 1.0.48 → 1.0.50

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 (58) hide show
  1. package/README.md +14 -14
  2. package/doc/EXAMPLE_USAGE.md +48 -0
  3. package/doc/PROJECT_FUNCTIONALITY.md +9 -0
  4. package/doc/PROJECT_RULES.md +27 -27
  5. package/doc/WENAY_REACT2_RENAMES.md +170 -170
  6. package/doc/changes/v1.0.41.md +35 -35
  7. package/doc/changes/v1.0.42.md +26 -26
  8. package/doc/changes/v1.0.43.md +10 -10
  9. package/doc/changes/v1.0.44.md +14 -14
  10. package/doc/changes/v1.0.45.md +8 -8
  11. package/doc/changes/v1.0.46.md +11 -11
  12. package/doc/changes/v1.0.47.md +9 -9
  13. package/doc/changes/v1.0.48.md +8 -8
  14. package/doc/changes/v1.0.49.md +7 -0
  15. package/doc/changes/v1.0.50.md +7 -0
  16. package/doc/examples/README.md +1 -0
  17. package/doc/examples/conference-client.html +34 -0
  18. package/doc/examples/conference-client.ts +212 -0
  19. package/doc/examples/conference-server.mjs +150 -0
  20. package/doc/examples/peer-call-media.tsx +7 -7
  21. package/doc/examples/stand.tsx +5 -5
  22. package/doc/native.md +37 -37
  23. package/doc/progress/README.md +13 -13
  24. package/doc/progress/architecture-fix-queue.md +74 -74
  25. package/doc/progress/column-state-present-gate.md +28 -28
  26. package/doc/progress/common2-adoption-1.0.73.md +28 -28
  27. package/doc/progress/common2-adoption-1.0.74.md +24 -24
  28. package/doc/progress/hook-controller-opportunities.md +363 -363
  29. package/doc/progress/hook-extraction-audit.md +195 -195
  30. package/doc/progress/public-surface-normalization.md +351 -351
  31. package/doc/progress/qa-stand-walkthrough-2026-07-12.md +62 -62
  32. package/doc/progress/stand-as-examples-audit.md +20 -20
  33. package/doc/progress/style-system-normalization.md +121 -121
  34. package/doc/target/README.md +32 -32
  35. package/doc/target/my.md +11 -1
  36. package/doc/wenay-react2-rare.md +3 -0
  37. package/doc/wenay-react2.md +3 -1
  38. package/lib/common/demo/fakeRtcLoopback.d.ts +17 -0
  39. package/lib/common/demo/fakeRtcLoopback.js +108 -0
  40. package/lib/common/demo/peerConference.d.ts +449 -0
  41. package/lib/common/demo/peerConference.js +372 -0
  42. package/lib/common/src/hooks/index.d.ts +1 -0
  43. package/lib/common/src/hooks/index.js +1 -0
  44. package/lib/common/src/hooks/useReplay.js +6 -2
  45. package/lib/common/src/hooks/useRoute.d.ts +28 -0
  46. package/lib/common/src/hooks/useRoute.js +30 -0
  47. package/lib/common/testUseReact/qa.js +3 -2
  48. package/lib/common/testUseReact/replayVideo.d.ts +5 -0
  49. package/lib/common/testUseReact/replayVideo.js +98 -1
  50. package/lib/style/menuRight.css +19 -19
  51. package/lib/style/style.css +23 -23
  52. package/lib/style/tokens.css +184 -184
  53. package/package.json +54 -53
  54. package/doc/changes/v1.0.35.md +0 -26
  55. package/doc/changes/v1.0.37.md +0 -13
  56. package/doc/changes/v1.0.38.md +0 -48
  57. package/doc/changes/v1.0.39.md +0 -35
  58. package/doc/changes/v1.0.40.md +0 -15
@@ -0,0 +1,108 @@
1
+ export function createFakeRtcNet() {
2
+ let n = 0;
3
+ const pcs = new Map();
4
+ const stats = { ice: 0, channels: 0 };
5
+ const liveChannels = new Set();
6
+ function makeDcPair() {
7
+ let closed = false;
8
+ function side(other) {
9
+ const me = { onopen: null, onmessage: null, onclose: null, onerror: null };
10
+ me.send = (data) => {
11
+ if (closed)
12
+ return;
13
+ setTimeout(function deliverDc() { if (!closed)
14
+ other().onmessage?.({ data }); }, 0);
15
+ };
16
+ me.close = () => {
17
+ if (closed)
18
+ return;
19
+ closed = true;
20
+ liveChannels.delete(me);
21
+ setTimeout(function closeDc() { me.onclose?.(); other().onclose?.(); }, 0);
22
+ };
23
+ return me;
24
+ }
25
+ let a, b;
26
+ a = side(() => b);
27
+ b = side(() => a);
28
+ liveChannels.add(a);
29
+ return [a, b];
30
+ }
31
+ function tryConnect(me) {
32
+ if (!me.local || !me.remote)
33
+ return;
34
+ const other = pcs.get(me.remote.sdp ?? "");
35
+ if (!other || !other.local || !other.remote || other.remote.sdp !== me.id)
36
+ return;
37
+ const initiator = me.pendingDcs.length ? me : other;
38
+ const responder = initiator === me ? other : me;
39
+ if (!initiator.pendingDcs.length || initiator.linked)
40
+ return;
41
+ initiator.linked = responder.linked = true;
42
+ for (const dc of initiator.pendingDcs) {
43
+ const [a, b] = makeDcPair();
44
+ // the pre-created local end is linked to its newborn twin
45
+ dc.attach(a);
46
+ stats.channels++;
47
+ setTimeout(function announceChannel() {
48
+ responder.pc.ondatachannel?.({ channel: b });
49
+ dc.fireOpen();
50
+ }, 0);
51
+ }
52
+ initiator.pendingDcs = [];
53
+ }
54
+ function pc() {
55
+ const id = "sdp-" + (++n);
56
+ const me = { id, local: null, remote: null, pendingDcs: [], linked: false, pc: null };
57
+ const api = {
58
+ createDataChannel() {
59
+ // the local end exists BEFORE the connection: methods delegate after attach
60
+ let real = null;
61
+ const shell = { onopen: null, onmessage: null, onclose: null, onerror: null };
62
+ shell.send = (data) => real?.send(data);
63
+ shell.close = () => real?.close();
64
+ me.pendingDcs.push({
65
+ attach(a) {
66
+ real = a;
67
+ if (!a)
68
+ return;
69
+ a.onmessage = (ev) => shell.onmessage?.(ev);
70
+ a.onclose = () => shell.onclose?.();
71
+ },
72
+ fireOpen() { shell.onopen?.(); },
73
+ });
74
+ return shell;
75
+ },
76
+ createOffer: async () => ({ type: "offer", sdp: id }),
77
+ createAnswer: async () => ({ type: "answer", sdp: id }),
78
+ setLocalDescription(d) {
79
+ me.local = d;
80
+ setTimeout(function trickleIce() { api.onicecandidate?.({ candidate: { via: id } }); }, 0);
81
+ },
82
+ setRemoteDescription(d) {
83
+ me.remote = d;
84
+ tryConnect(me);
85
+ },
86
+ addIceCandidate() { stats.ice++; },
87
+ close() {
88
+ for (const dc of me.pendingDcs)
89
+ dc.attach(null);
90
+ me.pendingDcs = [];
91
+ },
92
+ onicecandidate: null,
93
+ ondatachannel: null,
94
+ };
95
+ me.pc = api;
96
+ pcs.set(id, me);
97
+ return api;
98
+ }
99
+ /** The "kill direct transport" drill: closing a live end fires onclose on both
100
+ * sides, which the webrtc connector reports as a transport failure. */
101
+ function killLiveChannels() {
102
+ const doomed = [...liveChannels];
103
+ for (const dc of doomed)
104
+ dc.close();
105
+ return doomed.length;
106
+ }
107
+ return { pc, stats, killLiveChannels };
108
+ }
@@ -0,0 +1,449 @@
1
+ import { Peer, Replay } from "wenay-common2";
2
+ export type ConfFrame = {
3
+ n: number;
4
+ at: number;
5
+ image: string;
6
+ };
7
+ export type ConfLine = [ConfFrame, number];
8
+ export type ConferenceWorldOptions = {
9
+ /** Seat accounts; the FIRST one is the room host (places the star calls) and the focus viewer. */
10
+ accounts?: string[];
11
+ /** Injected WebRTC runtime, `() => new RTCPeerConnection(cfg)` in a browser. */
12
+ rtc?: () => Replay.RtcPeerConnection;
13
+ /** Transport-death drill; defaults to closing every RTCPeerConnection this world created. */
14
+ killTransport?: () => void;
15
+ /** Synthetic painter fps; 0 disables timers (drive frames via tick() in tests). */
16
+ fps?: number;
17
+ /** Frame factory override for environments without DOM/canvas semantics. */
18
+ frame?: (account: string, n: number) => ConfFrame;
19
+ room?: string;
20
+ };
21
+ export declare function createConferenceWorld(options?: ConferenceWorldOptions): {
22
+ accounts: string[];
23
+ hostAccount: string;
24
+ viewer: string;
25
+ room: string;
26
+ managers: Map<string, {
27
+ ready: Promise<void>;
28
+ call: (other: string, meta?: unknown) => {
29
+ id: string;
30
+ peer: string;
31
+ direction: "out" | "in";
32
+ meta: unknown;
33
+ state: () => Peer.tCallState;
34
+ reason: () => Peer.tCallEnd | null;
35
+ changed: import("wenay-common2").ListenApi<[Peer.tCallState]>;
36
+ ended: Promise<Peer.tCallEnd>;
37
+ accept(): void;
38
+ decline(why?: Peer.tCallEnd): void;
39
+ hangup(): void;
40
+ };
41
+ rings: import("wenay-common2").ListenApi<[{
42
+ id: string;
43
+ peer: string;
44
+ direction: "out" | "in";
45
+ meta: unknown;
46
+ state: () => Peer.tCallState;
47
+ reason: () => Peer.tCallEnd | null;
48
+ changed: import("wenay-common2").ListenApi<[Peer.tCallState]>;
49
+ ended: Promise<Peer.tCallEnd>;
50
+ accept(): void;
51
+ decline(why?: Peer.tCallEnd): void;
52
+ hangup(): void;
53
+ }]>;
54
+ active: () => {
55
+ id: string;
56
+ peer: string;
57
+ direction: "out" | "in";
58
+ meta: unknown;
59
+ state: () => Peer.tCallState;
60
+ reason: () => Peer.tCallEnd | null;
61
+ changed: import("wenay-common2").ListenApi<[Peer.tCallState]>;
62
+ ended: Promise<Peer.tCallEnd>;
63
+ accept(): void;
64
+ decline(why?: Peer.tCallEnd): void;
65
+ hangup(): void;
66
+ } | null;
67
+ close(): void;
68
+ }>;
69
+ relay: {
70
+ publishOf: (account: string) => (line: string, frame: unknown, sentAt: number) => void;
71
+ watch: Record<string, Record<string, {
72
+ emit: import("wenay-common2").Listener<[unknown, number]>;
73
+ head: () => number;
74
+ isStale: () => boolean;
75
+ lastTs: () => number;
76
+ close: () => void;
77
+ getSince: (seq: number) => Replay.ReplayEvent<[unknown, number]>[] | undefined;
78
+ line: import("wenay-common2").ListenApi<[Replay.ReplayEvent<[unknown, number]>]>;
79
+ hasKeyframe: boolean;
80
+ keyframe: () => Replay.ReplayEvent<[unknown, number]> | undefined;
81
+ frame: (sinceSeq: number, hint?: unknown) => Replay.ReplayEvent<[unknown, number]>[];
82
+ on: Replay.ListenOnReplay<[unknown, number]>;
83
+ once: (cb: import("wenay-common2").Listener<[unknown, number]>, opts?: {
84
+ key?: string | symbol;
85
+ current?: import("wenay-common2").ListenCurrent<[unknown, number]> | undefined;
86
+ } | undefined) => () => void;
87
+ has(key: import("wenay-common2").ListenKey): boolean;
88
+ off(keyOrCallback: import("wenay-common2").ListenKey | import("wenay-common2").Listener<[unknown, number]> | null): void;
89
+ count(): number;
90
+ keys(): import("wenay-common2").ListenKey[];
91
+ isRunning(): boolean;
92
+ run(): void;
93
+ onClose(cb: () => void): import("wenay-common2").ListenOff;
94
+ }>>;
95
+ watchOf: (watcher: string) => Record<string, Record<string, {
96
+ emit: import("wenay-common2").Listener<[unknown, number]>;
97
+ head: () => number;
98
+ isStale: () => boolean;
99
+ lastTs: () => number;
100
+ close: () => void;
101
+ getSince: (seq: number) => Replay.ReplayEvent<[unknown, number]>[] | undefined;
102
+ line: import("wenay-common2").ListenApi<[Replay.ReplayEvent<[unknown, number]>]>;
103
+ hasKeyframe: boolean;
104
+ keyframe: () => Replay.ReplayEvent<[unknown, number]> | undefined;
105
+ frame: (sinceSeq: number, hint?: unknown) => Replay.ReplayEvent<[unknown, number]>[];
106
+ on: Replay.ListenOnReplay<[unknown, number]>;
107
+ once: (cb: import("wenay-common2").Listener<[unknown, number]>, opts?: {
108
+ key?: string | symbol;
109
+ current?: import("wenay-common2").ListenCurrent<[unknown, number]> | undefined;
110
+ } | undefined) => () => void;
111
+ has(key: import("wenay-common2").ListenKey): boolean;
112
+ off(keyOrCallback: import("wenay-common2").ListenKey | import("wenay-common2").Listener<[unknown, number]> | null): void;
113
+ count(): number;
114
+ keys(): import("wenay-common2").ListenKey[];
115
+ isRunning(): boolean;
116
+ run(): void;
117
+ onClose(cb: () => void): import("wenay-common2").ListenOff;
118
+ }>>;
119
+ lines: (account: string) => Record<string, {
120
+ emit: import("wenay-common2").Listener<[unknown, number]>;
121
+ head: () => number;
122
+ isStale: () => boolean;
123
+ lastTs: () => number;
124
+ close: () => void;
125
+ getSince: (seq: number) => Replay.ReplayEvent<[unknown, number]>[] | undefined;
126
+ line: import("wenay-common2").ListenApi<[Replay.ReplayEvent<[unknown, number]>]>;
127
+ hasKeyframe: boolean;
128
+ keyframe: () => Replay.ReplayEvent<[unknown, number]> | undefined;
129
+ frame: (sinceSeq: number, hint?: unknown) => Replay.ReplayEvent<[unknown, number]>[];
130
+ on: Replay.ListenOnReplay<[unknown, number]>;
131
+ once: (cb: import("wenay-common2").Listener<[unknown, number]>, opts?: {
132
+ key?: string | symbol;
133
+ current?: import("wenay-common2").ListenCurrent<[unknown, number]> | undefined;
134
+ } | undefined) => () => void;
135
+ has(key: import("wenay-common2").ListenKey): boolean;
136
+ off(keyOrCallback: import("wenay-common2").ListenKey | import("wenay-common2").Listener<[unknown, number]> | null): void;
137
+ count(): number;
138
+ keys(): import("wenay-common2").ListenKey[];
139
+ isRunning(): boolean;
140
+ run(): void;
141
+ onClose(cb: () => void): import("wenay-common2").ListenOff;
142
+ }>;
143
+ accounts: () => string[];
144
+ dropAccount: (account: string) => void;
145
+ close(): void;
146
+ };
147
+ coordinator: {
148
+ pair(a: string, b: string): {
149
+ ref: Replay.RoutePairRef;
150
+ state: () => Replay.tRouteState;
151
+ reason: () => unknown;
152
+ label: () => string;
153
+ metrics: () => {
154
+ relay: {
155
+ rtt?: number;
156
+ pending?: number;
157
+ state: Replay.tConnectorState;
158
+ } | null;
159
+ direct: {
160
+ rtt?: number;
161
+ pending?: number;
162
+ state: Replay.tConnectorState;
163
+ } | null;
164
+ };
165
+ subscribe: (cb: import("wenay-common2").Listener<ConfLine>, opts?: Omit<Replay.ReplayRouteSubscribeOpts, "label">) => (() => void) & {
166
+ ready: Promise<void>;
167
+ seq: () => number;
168
+ label: () => string | undefined;
169
+ active: () => boolean;
170
+ };
171
+ promoteDirect: (opts?: Replay.PromoteDirectOpts) => Promise<Replay.RouteOpResult>;
172
+ reinterposeRelay: (reason?: unknown) => Promise<Replay.RouteOpResult>;
173
+ fallback: (reason?: unknown) => Promise<Replay.RouteOpResult>;
174
+ block: (reason?: unknown) => Promise<Replay.RouteOpResult>;
175
+ close: () => void;
176
+ };
177
+ state: (pairOrKey: string | Replay.RoutePairRef | {
178
+ ref: Replay.RoutePairRef;
179
+ state: () => Replay.tRouteState;
180
+ reason: () => unknown;
181
+ label: () => string;
182
+ metrics: () => {
183
+ relay: {
184
+ rtt?: number;
185
+ pending?: number;
186
+ state: Replay.tConnectorState;
187
+ } | null;
188
+ direct: {
189
+ rtt?: number;
190
+ pending?: number;
191
+ state: Replay.tConnectorState;
192
+ } | null;
193
+ };
194
+ subscribe: (cb: import("wenay-common2").Listener<ConfLine>, opts?: Omit<Replay.ReplayRouteSubscribeOpts, "label">) => (() => void) & {
195
+ ready: Promise<void>;
196
+ seq: () => number;
197
+ label: () => string | undefined;
198
+ active: () => boolean;
199
+ };
200
+ promoteDirect: (opts?: Replay.PromoteDirectOpts) => Promise<Replay.RouteOpResult>;
201
+ reinterposeRelay: (reason?: unknown) => Promise<Replay.RouteOpResult>;
202
+ fallback: (reason?: unknown) => Promise<Replay.RouteOpResult>;
203
+ block: (reason?: unknown) => Promise<Replay.RouteOpResult>;
204
+ close: () => void;
205
+ }) => Replay.tRouteState;
206
+ promoteDirect: (pairOrKey: string | Replay.RoutePairRef | {
207
+ ref: Replay.RoutePairRef;
208
+ state: () => Replay.tRouteState;
209
+ reason: () => unknown;
210
+ label: () => string;
211
+ metrics: () => {
212
+ relay: {
213
+ rtt?: number;
214
+ pending?: number;
215
+ state: Replay.tConnectorState;
216
+ } | null;
217
+ direct: {
218
+ rtt?: number;
219
+ pending?: number;
220
+ state: Replay.tConnectorState;
221
+ } | null;
222
+ };
223
+ subscribe: (cb: import("wenay-common2").Listener<ConfLine>, opts?: Omit<Replay.ReplayRouteSubscribeOpts, "label">) => (() => void) & {
224
+ ready: Promise<void>;
225
+ seq: () => number;
226
+ label: () => string | undefined;
227
+ active: () => boolean;
228
+ };
229
+ promoteDirect: (opts?: Replay.PromoteDirectOpts) => Promise<Replay.RouteOpResult>;
230
+ reinterposeRelay: (reason?: unknown) => Promise<Replay.RouteOpResult>;
231
+ fallback: (reason?: unknown) => Promise<Replay.RouteOpResult>;
232
+ block: (reason?: unknown) => Promise<Replay.RouteOpResult>;
233
+ close: () => void;
234
+ }, opts?: Replay.PromoteDirectOpts) => Promise<Replay.RouteOpResult>;
235
+ reinterposeRelay: (pairOrKey: string | Replay.RoutePairRef | {
236
+ ref: Replay.RoutePairRef;
237
+ state: () => Replay.tRouteState;
238
+ reason: () => unknown;
239
+ label: () => string;
240
+ metrics: () => {
241
+ relay: {
242
+ rtt?: number;
243
+ pending?: number;
244
+ state: Replay.tConnectorState;
245
+ } | null;
246
+ direct: {
247
+ rtt?: number;
248
+ pending?: number;
249
+ state: Replay.tConnectorState;
250
+ } | null;
251
+ };
252
+ subscribe: (cb: import("wenay-common2").Listener<ConfLine>, opts?: Omit<Replay.ReplayRouteSubscribeOpts, "label">) => (() => void) & {
253
+ ready: Promise<void>;
254
+ seq: () => number;
255
+ label: () => string | undefined;
256
+ active: () => boolean;
257
+ };
258
+ promoteDirect: (opts?: Replay.PromoteDirectOpts) => Promise<Replay.RouteOpResult>;
259
+ reinterposeRelay: (reason?: unknown) => Promise<Replay.RouteOpResult>;
260
+ fallback: (reason?: unknown) => Promise<Replay.RouteOpResult>;
261
+ block: (reason?: unknown) => Promise<Replay.RouteOpResult>;
262
+ close: () => void;
263
+ }, reason?: unknown) => Promise<Replay.RouteOpResult>;
264
+ fallback: (pairOrKey: string | Replay.RoutePairRef | {
265
+ ref: Replay.RoutePairRef;
266
+ state: () => Replay.tRouteState;
267
+ reason: () => unknown;
268
+ label: () => string;
269
+ metrics: () => {
270
+ relay: {
271
+ rtt?: number;
272
+ pending?: number;
273
+ state: Replay.tConnectorState;
274
+ } | null;
275
+ direct: {
276
+ rtt?: number;
277
+ pending?: number;
278
+ state: Replay.tConnectorState;
279
+ } | null;
280
+ };
281
+ subscribe: (cb: import("wenay-common2").Listener<ConfLine>, opts?: Omit<Replay.ReplayRouteSubscribeOpts, "label">) => (() => void) & {
282
+ ready: Promise<void>;
283
+ seq: () => number;
284
+ label: () => string | undefined;
285
+ active: () => boolean;
286
+ };
287
+ promoteDirect: (opts?: Replay.PromoteDirectOpts) => Promise<Replay.RouteOpResult>;
288
+ reinterposeRelay: (reason?: unknown) => Promise<Replay.RouteOpResult>;
289
+ fallback: (reason?: unknown) => Promise<Replay.RouteOpResult>;
290
+ block: (reason?: unknown) => Promise<Replay.RouteOpResult>;
291
+ close: () => void;
292
+ }, reason?: unknown) => Promise<Replay.RouteOpResult>;
293
+ block: (pairOrKey: string | Replay.RoutePairRef | {
294
+ ref: Replay.RoutePairRef;
295
+ state: () => Replay.tRouteState;
296
+ reason: () => unknown;
297
+ label: () => string;
298
+ metrics: () => {
299
+ relay: {
300
+ rtt?: number;
301
+ pending?: number;
302
+ state: Replay.tConnectorState;
303
+ } | null;
304
+ direct: {
305
+ rtt?: number;
306
+ pending?: number;
307
+ state: Replay.tConnectorState;
308
+ } | null;
309
+ };
310
+ subscribe: (cb: import("wenay-common2").Listener<ConfLine>, opts?: Omit<Replay.ReplayRouteSubscribeOpts, "label">) => (() => void) & {
311
+ ready: Promise<void>;
312
+ seq: () => number;
313
+ label: () => string | undefined;
314
+ active: () => boolean;
315
+ };
316
+ promoteDirect: (opts?: Replay.PromoteDirectOpts) => Promise<Replay.RouteOpResult>;
317
+ reinterposeRelay: (reason?: unknown) => Promise<Replay.RouteOpResult>;
318
+ fallback: (reason?: unknown) => Promise<Replay.RouteOpResult>;
319
+ block: (reason?: unknown) => Promise<Replay.RouteOpResult>;
320
+ close: () => void;
321
+ }, reason?: unknown) => Promise<Replay.RouteOpResult>;
322
+ onRoute: (cb: (ev: Replay.RouteChangeEvent) => void) => import("wenay-common2").ListenOff;
323
+ pairs: () => {
324
+ ref: Replay.RoutePairRef;
325
+ state: () => Replay.tRouteState;
326
+ reason: () => unknown;
327
+ label: () => string;
328
+ metrics: () => {
329
+ relay: {
330
+ rtt?: number;
331
+ pending?: number;
332
+ state: Replay.tConnectorState;
333
+ } | null;
334
+ direct: {
335
+ rtt?: number;
336
+ pending?: number;
337
+ state: Replay.tConnectorState;
338
+ } | null;
339
+ };
340
+ subscribe: (cb: import("wenay-common2").Listener<ConfLine>, opts?: Omit<Replay.ReplayRouteSubscribeOpts, "label">) => (() => void) & {
341
+ ready: Promise<void>;
342
+ seq: () => number;
343
+ label: () => string | undefined;
344
+ active: () => boolean;
345
+ };
346
+ promoteDirect: (opts?: Replay.PromoteDirectOpts) => Promise<Replay.RouteOpResult>;
347
+ reinterposeRelay: (reason?: unknown) => Promise<Replay.RouteOpResult>;
348
+ fallback: (reason?: unknown) => Promise<Replay.RouteOpResult>;
349
+ block: (reason?: unknown) => Promise<Replay.RouteOpResult>;
350
+ close: () => void;
351
+ }[];
352
+ close(): void;
353
+ };
354
+ focus: (owner: string) => {
355
+ ref: Replay.RoutePairRef;
356
+ state: () => Replay.tRouteState;
357
+ reason: () => unknown;
358
+ label: () => string;
359
+ metrics: () => {
360
+ relay: {
361
+ rtt?: number;
362
+ pending?: number;
363
+ state: Replay.tConnectorState;
364
+ } | null;
365
+ direct: {
366
+ rtt?: number;
367
+ pending?: number;
368
+ state: Replay.tConnectorState;
369
+ } | null;
370
+ };
371
+ subscribe: (cb: import("wenay-common2").Listener<ConfLine>, opts?: Omit<Replay.ReplayRouteSubscribeOpts, "label">) => (() => void) & {
372
+ ready: Promise<void>;
373
+ seq: () => number;
374
+ label: () => string | undefined;
375
+ active: () => boolean;
376
+ };
377
+ promoteDirect: (opts?: Replay.PromoteDirectOpts) => Promise<Replay.RouteOpResult>;
378
+ reinterposeRelay: (reason?: unknown) => Promise<Replay.RouteOpResult>;
379
+ fallback: (reason?: unknown) => Promise<Replay.RouteOpResult>;
380
+ block: (reason?: unknown) => Promise<Replay.RouteOpResult>;
381
+ close: () => void;
382
+ };
383
+ ring: (member: string) => {
384
+ id: string;
385
+ peer: string;
386
+ direction: "out" | "in";
387
+ meta: unknown;
388
+ state: () => Peer.tCallState;
389
+ reason: () => Peer.tCallEnd | null;
390
+ changed: import("wenay-common2").ListenApi<[Peer.tCallState]>;
391
+ ended: Promise<Peer.tCallEnd>;
392
+ accept(): void;
393
+ decline(why?: Peer.tCallEnd): void;
394
+ hangup(): void;
395
+ };
396
+ hostCalls: Map<string, {
397
+ id: string;
398
+ peer: string;
399
+ direction: "out" | "in";
400
+ meta: unknown;
401
+ state: () => Peer.tCallState;
402
+ reason: () => Peer.tCallEnd | null;
403
+ changed: import("wenay-common2").ListenApi<[Peer.tCallState]>;
404
+ ended: Promise<Peer.tCallEnd>;
405
+ accept(): void;
406
+ decline(why?: Peer.tCallEnd): void;
407
+ hangup(): void;
408
+ }>;
409
+ roster: () => string[];
410
+ inRoster: (account: string) => boolean;
411
+ changed: import("wenay-common2").ListenApi<[]>;
412
+ lineOf: (account: string) => {
413
+ emit: import("wenay-common2").Listener<ConfLine>;
414
+ head: () => number;
415
+ isStale: () => boolean;
416
+ lastTs: () => number;
417
+ close: () => void;
418
+ getSince: (seq: number) => Replay.ReplayEvent<ConfLine>[] | undefined;
419
+ line: import("wenay-common2").ListenApi<[Replay.ReplayEvent<ConfLine>]>;
420
+ hasKeyframe: boolean;
421
+ keyframe: () => Replay.ReplayEvent<ConfLine> | undefined;
422
+ frame: (sinceSeq: number, hint?: unknown) => Replay.ReplayEvent<ConfLine>[];
423
+ on: Replay.ListenOnReplay<ConfLine>;
424
+ once: (cb: import("wenay-common2").Listener<ConfLine>, opts?: {
425
+ key?: string | symbol;
426
+ current?: import("wenay-common2").ListenCurrent<ConfLine> | undefined;
427
+ } | undefined) => () => void;
428
+ has(key: import("wenay-common2").ListenKey): boolean;
429
+ off(keyOrCallback: import("wenay-common2").ListenKey | import("wenay-common2").Listener<ConfLine> | null): void;
430
+ count(): number;
431
+ keys(): import("wenay-common2").ListenKey[];
432
+ isRunning(): boolean;
433
+ run(): void;
434
+ onClose(cb: () => void): import("wenay-common2").ListenOff;
435
+ };
436
+ frameNumber: (account: string) => number;
437
+ tick: (only?: string) => void;
438
+ setForceRelay(on: boolean): void;
439
+ setAllowEndpoint(on: boolean): void;
440
+ getPolicy: () => {
441
+ forceRelay: boolean;
442
+ allowEndpoint: boolean;
443
+ };
444
+ revokeDirect: (owner: string) => void;
445
+ killDirect: () => void;
446
+ close: () => void;
447
+ };
448
+ export type ConferenceWorld = ReturnType<typeof createConferenceWorld>;
449
+ export declare const ConferenceCallDemo: () => import("react/jsx-runtime").JSX.Element;