@midsummer-ai/sdk 0.1.0-staging.4477 → 0.1.0-staging.4483

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 (46) hide show
  1. package/auth/contract.d.mts +1 -1
  2. package/auth/contract.mjs +2 -2
  3. package/auth/index.d.mts +1 -1
  4. package/auth/index.mjs +1 -1
  5. package/auth/mail.d.mts +1 -1
  6. package/auth/password.mjs +1 -1
  7. package/auth/react.mjs +1 -1
  8. package/{auth-C7yU9QWZ.mjs → auth-BH2Lfguc.mjs} +49 -3
  9. package/calls/contract.d.mts +23 -0
  10. package/calls/contract.mjs +293 -0
  11. package/calls/index.d.mts +147 -0
  12. package/calls/index.mjs +1131 -0
  13. package/calls/protocol.d.mts +2 -0
  14. package/calls/protocol.mjs +33 -0
  15. package/calls/react.d.mts +56 -0
  16. package/calls/react.mjs +225 -0
  17. package/calls/stand-in.d.mts +22 -0
  18. package/calls/stand-in.mjs +390 -0
  19. package/calls/ui.d.mts +76 -0
  20. package/calls/ui.mjs +783 -0
  21. package/email/client.d.mts +1 -1
  22. package/email/contract.d.mts +1 -1
  23. package/email/inbox.d.mts +1 -1
  24. package/email/index.d.mts +1 -1
  25. package/email/smtp.d.mts +1 -1
  26. package/email/stand-in.d.mts +1 -1
  27. package/{engine-Be7yur9O.mjs → engine-CmTP59GT.mjs} +1 -1
  28. package/flows/contract.d.mts +1 -1
  29. package/flows/index.d.mts +1 -1
  30. package/{guard-Br3K8CVx.mjs → guard-VPI6xq4z.mjs} +1 -1
  31. package/here-C2jhTheQ.mjs +1 -1
  32. package/{index-CkyNDcba.d.mts → index-BmjcZfRb.d.mts} +8 -0
  33. package/{index-DI_L79Hc.d.mts → index-bperY8NN.d.mts} +2 -2
  34. package/index-c616Dbux.d.mts +343 -0
  35. package/kv/contract.d.mts +5 -0
  36. package/kv/contract.mjs +3 -0
  37. package/kv/wire.d.mts +77 -4
  38. package/kv/wire.mjs +492 -201
  39. package/package.json +43 -1
  40. package/protocol-BeBvbfKf.d.mts +185 -0
  41. package/queues/contract.d.mts +1 -1
  42. package/queues/index.d.mts +1 -342
  43. package/queues/stand-in.d.mts +1 -1
  44. package/queues/wire.d.mts +1 -1
  45. package/{style-BJzVvUKV.mjs → style-DXd-0Cxo.mjs} +1 -163
  46. package/tokens-BpV8U5E1.mjs +164 -0
@@ -0,0 +1,390 @@
1
+ import { CALL_OPS, CALL_STATUS, TRACK_KINDS } from "./protocol.mjs";
2
+ import { identityProblem, roomProblem } from "./index.mjs";
3
+ //#region src/calls/stand-in.ts
4
+ /**
5
+ * The calls Stand-in: the whole call wire in memory, for tests and `midsummer dev`, with no media server. Browsers
6
+ * connect to each other (`media: "relay"`) with the offers and replies the room passes on (`signal`), so two tabs on
7
+ * one computer see and hear each other.
8
+ *
9
+ * import { standIn } from "@midsummer-ai/sdk/calls/stand-in"
10
+ *
11
+ * const calls = standIn({ url: "http://localhost:4100/call/app" })
12
+ * Bun.serve({ port: 4100, fetch: calls.fetch }) // POST <any path>/<op>, and POST <any path>/token to make a token
13
+ * const { token } = await calls.token({ room: "support-42", as: "ada" })
14
+ * await calls.end("support-42")
15
+ *
16
+ * It keeps the platform's rules where they apply: a room opens with its first join and takes 50 people; someone
17
+ * unheard for 15 seconds is away, and gone 30 seconds later; joining again within that time is the same participant;
18
+ * an ended room refuses every token made before its end. Its clock moves presence; a watch waits in real time, and
19
+ * returns at once when the room changes. Every room is in the `development` environment. It passes the cases in
20
+ * `./contract`.
21
+ */
22
+ const AWAY_AFTER_MS = 15e3;
23
+ const WATCH_MS = 25e3;
24
+ const MAX_PARTICIPANTS = 50;
25
+ const TOKEN_DEFAULT_SECONDS = 3600;
26
+ const TOKEN_MAX_SECONDS = 86400;
27
+ const ENVIRONMENT = "development";
28
+ var Refused = class extends Error {
29
+ code;
30
+ constructor(code, why) {
31
+ super(why);
32
+ this.code = code;
33
+ }
34
+ };
35
+ const CORS = { "access-control-allow-origin": "*" };
36
+ const PREFLIGHT = {
37
+ ...CORS,
38
+ "access-control-allow-methods": "POST, OPTIONS",
39
+ "access-control-allow-headers": "authorization, content-type, midsummer-client",
40
+ "access-control-max-age": "86400"
41
+ };
42
+ const hex = (bytes) => [...crypto.getRandomValues(new Uint8Array(bytes))].map((byte) => byte.toString(16).padStart(2, "0")).join("");
43
+ function standIn(options = {}) {
44
+ const clock = options.clock ?? Date.now;
45
+ const secret = options.secret ?? hex(32);
46
+ if (secret.length < 32) throw new Error("The calls stand-in signs tokens with a secret of 32 characters or more.");
47
+ const base = (options.url ?? "http://localhost/call/app").replace(/\/+$/u, "");
48
+ const rooms = /* @__PURE__ */ new Map();
49
+ const endedAt = /* @__PURE__ */ new Map();
50
+ const personView = (person) => ({
51
+ id: person.id,
52
+ as: person.as,
53
+ name: person.name,
54
+ kind: "person",
55
+ state: person.state,
56
+ joinedAt: person.joinedAt,
57
+ tracks: person.tracks.map((name) => ({
58
+ name,
59
+ kind: TRACK_KINDS[name]
60
+ }))
61
+ });
62
+ const view = (room) => ({
63
+ name: room.name,
64
+ environment: ENVIRONMENT,
65
+ state: "open",
66
+ changed: room.changed,
67
+ audioOnly: false,
68
+ participants: [...room.people.values()].filter((person) => person.state !== "left").map(personView)
69
+ });
70
+ const endedView = (name) => ({
71
+ room: {
72
+ name,
73
+ environment: ENVIRONMENT,
74
+ state: "ended",
75
+ changed: Number.MAX_SAFE_INTEGER,
76
+ audioOnly: false,
77
+ participants: []
78
+ },
79
+ signals: []
80
+ });
81
+ const present = (room) => [...room.people.values()].filter((person) => person.state !== "left");
82
+ /** Moves the room's `changed` on and wakes every watch waiting on it. */
83
+ function touched(room) {
84
+ room.changed += 1;
85
+ const woken = [...room.woken];
86
+ room.woken.clear();
87
+ for (const wake of woken) wake();
88
+ }
89
+ /** Moves those unheard to away, and those away long enough to gone. */
90
+ function settle(room) {
91
+ const now = clock();
92
+ let moved = false;
93
+ for (const person of room.people.values()) {
94
+ if (person.state === "left") continue;
95
+ const quiet = now - person.seenAt;
96
+ const next = quiet >= 45e3 ? "left" : quiet >= AWAY_AFTER_MS ? "away" : person.state;
97
+ if (next !== person.state) {
98
+ person.state = next;
99
+ moved = true;
100
+ }
101
+ }
102
+ if (moved) touched(room);
103
+ }
104
+ async function mint(input, url) {
105
+ const asked = input ?? {};
106
+ const problem = roomProblem(asked.room) ?? identityProblem(asked.as);
107
+ if (problem) throw new Refused("invalid", problem);
108
+ const ttl = asked.ttlSeconds ?? TOKEN_DEFAULT_SECONDS;
109
+ if (typeof ttl !== "number" || !Number.isInteger(ttl) || ttl < 60 || ttl > TOKEN_MAX_SECONDS) throw new Refused("invalid", `A token lasts from 60 to ${TOKEN_MAX_SECONDS} seconds; ${JSON.stringify(ttl)} isn't one of them.`);
110
+ const room = asked.room, as = asked.as;
111
+ const name = (typeof asked.name === "string" ? asked.name : as).trim().slice(0, 80) || as;
112
+ const now = clock();
113
+ const claims = {
114
+ project: "local",
115
+ team: "local",
116
+ environment: ENVIRONMENT,
117
+ room,
118
+ as,
119
+ name,
120
+ issuedAt: now,
121
+ expiresAt: now + ttl * 1e3
122
+ };
123
+ return {
124
+ token: await sign(secret, claims),
125
+ room,
126
+ environment: ENVIRONMENT,
127
+ as,
128
+ expiresAt: claims.expiresAt,
129
+ url
130
+ };
131
+ }
132
+ async function claimsOf(token) {
133
+ const claims = await verify(secret, token);
134
+ if ("refused" in claims) throw new Refused("forbidden", claims.refused);
135
+ return claims;
136
+ }
137
+ /** A token's claims, for a room whose last end came before the token was made. */
138
+ async function admitted(token) {
139
+ const claims = await claimsOf(token);
140
+ if (claims.expiresAt <= clock()) throw new Refused("forbidden", "Your call token ran out. Ask the app for a new one.");
141
+ const ended = endedAt.get(claims.room);
142
+ if (ended !== void 0 && claims.issuedAt <= ended) throw new Refused("ended", "This call has ended.");
143
+ return claims;
144
+ }
145
+ /** The token's participant, present in its open room. */
146
+ async function yours(token, participant) {
147
+ const claims = await admitted(token);
148
+ const room = rooms.get(claims.room);
149
+ if (!room) throw new Refused("ended", "This call has ended.");
150
+ const person = typeof participant === "string" ? room.people.get(participant) : void 0;
151
+ if (!person || person.as !== claims.as) throw new Refused("forbidden", "That participant isn't yours. Join with your own token.");
152
+ if (person.state === "left") throw new Refused("forbidden", "You left this call. Join again to come back.");
153
+ person.seenAt = clock();
154
+ return {
155
+ room,
156
+ person
157
+ };
158
+ }
159
+ const noMediaServer = () => new Refused("invalid", "This runs without a media server: connect to each participant with signal instead.");
160
+ const names = (value, what) => {
161
+ if (!Array.isArray(value) || value.some((each) => typeof each !== "string")) throw new Refused("invalid", `Send ${what} as a list of names.`);
162
+ return value;
163
+ };
164
+ const ops = {
165
+ async join(token) {
166
+ const claims = await admitted(token);
167
+ const room = rooms.get(claims.room) ?? {
168
+ name: claims.room,
169
+ changed: 0,
170
+ people: /* @__PURE__ */ new Map(),
171
+ woken: /* @__PURE__ */ new Set()
172
+ };
173
+ rooms.set(claims.room, room);
174
+ settle(room);
175
+ const now = clock();
176
+ const same = present(room).find((person) => person.as === claims.as);
177
+ if (!same && present(room).length >= MAX_PARTICIPANTS) throw new Refused("full", `${claims.room} is full: it takes ${MAX_PARTICIPANTS} people.`);
178
+ const person = same ?? {
179
+ id: `p_${hex(8)}`,
180
+ as: claims.as,
181
+ name: claims.name,
182
+ joinedAt: now,
183
+ state: "joined",
184
+ seenAt: now,
185
+ tracks: [],
186
+ signals: []
187
+ };
188
+ Object.assign(person, {
189
+ state: "joined",
190
+ seenAt: now,
191
+ tracks: [],
192
+ signals: []
193
+ });
194
+ room.people.set(person.id, person);
195
+ touched(room);
196
+ return {
197
+ participant: personView(person),
198
+ room: view(room),
199
+ iceServers: [],
200
+ media: "relay",
201
+ expiresAt: claims.expiresAt
202
+ };
203
+ },
204
+ async publish(token, body) {
205
+ const { room, person } = await yours(token, body.participant);
206
+ if (!Array.isArray(body.tracks) || body.tracks.some((track) => typeof track?.name !== "string")) throw new Refused("invalid", "Send the tracks to publish as a list of { name }.");
207
+ const asked = body.tracks.map((track) => track.name);
208
+ const problem = publishProblem(person.tracks, asked);
209
+ if (problem) throw new Refused("invalid", problem);
210
+ person.tracks.push(...asked);
211
+ touched(room);
212
+ return { room: view(room) };
213
+ },
214
+ async unpublish(token, body) {
215
+ const { room, person } = await yours(token, body.participant);
216
+ const stopping = names(body.names, "the tracks to stop");
217
+ person.tracks = person.tracks.filter((name) => !stopping.includes(name));
218
+ touched(room);
219
+ return { room: view(room) };
220
+ },
221
+ async pull() {
222
+ throw noMediaServer();
223
+ },
224
+ async answer(token, body) {
225
+ await yours(token, body.participant);
226
+ throw noMediaServer();
227
+ },
228
+ async layer(token, body) {
229
+ await yours(token, body.participant);
230
+ throw noMediaServer();
231
+ },
232
+ async unpull(token, body) {
233
+ await yours(token, body.participant);
234
+ return {};
235
+ },
236
+ async data(token, body) {
237
+ const { room, person } = await yours(token, body.participant);
238
+ for (const id of names(body.from, "whose data to receive")) {
239
+ const of = room.people.get(id);
240
+ if (!of || of.state === "left" || of.id === person.id) throw new Refused("not-found", `${id} isn't someone else in this call now.`);
241
+ }
242
+ return { from: [] };
243
+ },
244
+ async signal(token, body) {
245
+ const { room } = await yours(token, body.participant);
246
+ const sdp = body.sdp;
247
+ if (sdp?.type !== "offer" && sdp?.type !== "answer") throw new Refused("invalid", "A signal carries an offer or an answer: { type, sdp }.");
248
+ if (typeof sdp.sdp !== "string" || sdp.sdp.length > 65536) throw new Refused("invalid", "A signal's sdp is a string of at most 64 KiB.");
249
+ const target = typeof body.to === "string" ? room.people.get(body.to) : void 0;
250
+ if (!target || target.state === "left") throw new Refused("not-found", `${String(body.to)} isn't in this call now.`);
251
+ const seq = (target.signals.at(-1)?.seq ?? 0) + 1;
252
+ target.signals = [...target.signals, {
253
+ seq,
254
+ from: body.participant,
255
+ sdp: {
256
+ type: sdp.type,
257
+ sdp: sdp.sdp
258
+ }
259
+ }].slice(-64);
260
+ touched(room);
261
+ return {};
262
+ },
263
+ async watch(token, body) {
264
+ const claims = await claimsOf(token);
265
+ if (typeof body.after !== "number") throw new Refused("invalid", "Send after: the room's changed from the last answer, or -1.");
266
+ const after = body.after;
267
+ const ack = typeof body.ack === "number" ? body.ack : 0;
268
+ const until = Date.now() + Math.min(Math.max(typeof body.waitMs === "number" ? body.waitMs : WATCH_MS, 0), WATCH_MS);
269
+ for (;;) {
270
+ const room = rooms.get(claims.room);
271
+ if (!room) return endedView(claims.room);
272
+ const person = typeof body.participant === "string" ? room.people.get(body.participant) : void 0;
273
+ if (!person || person.as !== claims.as) throw new Refused("forbidden", "That participant isn't yours. Join with your own token.");
274
+ if (person.state === "left") return endedView(claims.room);
275
+ person.seenAt = clock();
276
+ if (person.state === "away") {
277
+ person.state = "joined";
278
+ touched(room);
279
+ }
280
+ if (ack) person.signals = person.signals.filter((signal) => signal.seq > ack);
281
+ settle(room);
282
+ if (room.changed > after || person.signals.length || Date.now() >= until) return {
283
+ room: view(room),
284
+ signals: [...person.signals]
285
+ };
286
+ await new Promise((resolve) => {
287
+ const done = () => {
288
+ clearTimeout(timer);
289
+ room.woken.delete(done);
290
+ resolve();
291
+ };
292
+ const timer = setTimeout(done, until - Date.now());
293
+ room.woken.add(done);
294
+ });
295
+ }
296
+ },
297
+ async leave(token, body) {
298
+ const claims = await claimsOf(token);
299
+ const room = rooms.get(claims.room);
300
+ if (!room) return {};
301
+ const person = typeof body.participant === "string" ? room.people.get(body.participant) : void 0;
302
+ if (!person || person.as !== claims.as) throw new Refused("forbidden", "That participant isn't yours. Join with your own token.");
303
+ if (person.state === "left") return {};
304
+ person.state = "left";
305
+ touched(room);
306
+ return {};
307
+ }
308
+ };
309
+ const answer = (status, body) => Response.json(body, {
310
+ status,
311
+ headers: CORS
312
+ });
313
+ return {
314
+ async fetch(request) {
315
+ if (request.method === "OPTIONS") return new Response(null, {
316
+ status: 204,
317
+ headers: PREFLIGHT
318
+ });
319
+ const { origin, pathname } = new URL(request.url);
320
+ const op = pathname.slice(pathname.lastIndexOf("/") + 1);
321
+ try {
322
+ if (request.method !== "POST") throw new Refused("not-found", "The call wire takes POST <url>/<op>.");
323
+ const body = await request.json().catch(() => void 0);
324
+ if (!body || typeof body !== "object" || Array.isArray(body)) throw new Refused("invalid", "Send a JSON object as the body.");
325
+ if (op === "token") return answer(200, await mint(body, `${origin}${pathname.slice(0, -6)}`));
326
+ if (!CALL_OPS.includes(op)) throw new Refused("not-found", `There's no call op named ${op}. The ops are ${CALL_OPS.join(", ")}.`);
327
+ const token = request.headers.get("authorization")?.match(/^Bearer (.+)$/u)?.[1];
328
+ if (!token) throw new Refused("forbidden", "Send the call token as authorization: Bearer <token>.");
329
+ if (op !== "join" && typeof body.participant !== "string") throw new Refused("invalid", "Say which participant you are: participant, from your join.");
330
+ return answer(200, await ops[op](token, body));
331
+ } catch (error) {
332
+ if (error instanceof Refused) return answer(CALL_STATUS[error.code], { error: {
333
+ code: error.code,
334
+ message: error.message
335
+ } });
336
+ throw error;
337
+ }
338
+ },
339
+ token: (input) => mint(input, base),
340
+ async end(name) {
341
+ const room = rooms.get(name);
342
+ if (!room) return;
343
+ endedAt.set(name, clock());
344
+ for (const person of room.people.values()) person.state = "left";
345
+ rooms.delete(name);
346
+ touched(room);
347
+ }
348
+ };
349
+ }
350
+ /** Why `names` can't all be published by a participant who already publishes `current`, or undefined. */
351
+ function publishProblem(current, names) {
352
+ for (const name of names) if (!Object.hasOwn(TRACK_KINDS, name)) return `${JSON.stringify(name)} isn't a track a participant publishes. Publish mic, camera, screen or screen-audio.`;
353
+ if (new Set(names).size !== names.length) return "Each track is published once.";
354
+ const taken = names.find((name) => current.includes(name));
355
+ if (taken) return `You already publish ${taken}. Stop it before publishing another.`;
356
+ }
357
+ const PREFIX = "mcall_";
358
+ const encoder = new TextEncoder();
359
+ const base64url = (bytes) => btoa(String.fromCharCode(...bytes)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/u, "");
360
+ const unbase64url = (text) => Uint8Array.from(atob(text.replace(/-/g, "+").replace(/_/g, "/")), (char) => char.charCodeAt(0));
361
+ async function hmac(secret, text) {
362
+ const key = await crypto.subtle.importKey("raw", encoder.encode(secret), {
363
+ name: "HMAC",
364
+ hash: "SHA-256"
365
+ }, false, ["sign"]);
366
+ return new Uint8Array(await crypto.subtle.sign("HMAC", key, encoder.encode(text)));
367
+ }
368
+ async function sign(secret, claims) {
369
+ const body = base64url(encoder.encode(JSON.stringify(claims)));
370
+ return `${PREFIX}${body}.${base64url(await hmac(secret, body))}`;
371
+ }
372
+ async function verify(secret, token) {
373
+ const bad = { refused: "That isn't a call token. Make one with callToken on your server, or midsummer call token create." };
374
+ if (typeof token !== "string" || !token.startsWith(PREFIX) || token.length > 4096) return bad;
375
+ const [body, signature] = token.slice(6).split(".");
376
+ if (!body || !signature) return bad;
377
+ const expected = base64url(await hmac(secret, body));
378
+ let differs = expected.length ^ signature.length;
379
+ for (let index = 0; index < expected.length; index++) differs |= expected.charCodeAt(index) ^ (signature.charCodeAt(index) || 0);
380
+ if (differs) return bad;
381
+ try {
382
+ const claims = JSON.parse(new TextDecoder().decode(unbase64url(body)));
383
+ if (typeof claims.room !== "string" || typeof claims.as !== "string" || typeof claims.expiresAt !== "number") return bad;
384
+ return claims;
385
+ } catch {
386
+ return bad;
387
+ }
388
+ }
389
+ //#endregion
390
+ export { standIn };
package/calls/ui.d.mts ADDED
@@ -0,0 +1,76 @@
1
+ import { Call as Call$1, Participant, TokenSource } from "./index.mjs";
2
+ import { ReactNode } from "react";
3
+ //#region src/calls/ui.d.ts
4
+ /** `light`, `dark`, or `system` for the person's system; unset, a call follows a `dark` or `light` class on a parent. */
5
+ type CallTheme = "light" | "dark" | "system";
6
+ /** A room for `<Call>` to join, with the token the app's server made for it. */
7
+ interface JoinCallProps {
8
+ readonly room: string;
9
+ readonly token: TokenSource;
10
+ /** Where the call wire is served, when it isn't the token's own address. */
11
+ readonly url?: string;
12
+ readonly theme?: CallTheme;
13
+ readonly className?: string;
14
+ readonly call?: never;
15
+ readonly onRejoin?: never;
16
+ }
17
+ /** A call joined elsewhere (or a stand-in for one), drawn as it is. */
18
+ interface ShowCallProps {
19
+ readonly call: Call$1;
20
+ /** What Rejoin and Try again do; without it they aren't shown, as the call isn't `<Call>`'s to join again. */
21
+ readonly onRejoin?: () => void;
22
+ readonly theme?: CallTheme;
23
+ readonly className?: string;
24
+ readonly room?: never;
25
+ readonly token?: never;
26
+ }
27
+ type CallProps = JoinCallProps | ShowCallProps;
28
+ /**
29
+ * A whole call: everyone's tiles, the controls, who is in it, and every state in words. Given `room` and `token` it
30
+ * joins, and Rejoin and Try again join anew; given a `call` it draws that one, and they do what `onRejoin` does.
31
+ */
32
+ declare function Call(props: CallProps): ReactNode;
33
+ /**
34
+ * Everyone in the call as tiles, screens first and full width, then you, then the others, those with a camera first;
35
+ * and everyone's sound. At most 16 people have a tile of their own, and a last tile shows how many more are in the call.
36
+ * At most 9 others' videos are received, each at the layer its tile's width needs and at most 2 at `f`; the rest show
37
+ * their initials.
38
+ */
39
+ declare function CallGrid({ className }: {
40
+ readonly className?: string;
41
+ }): ReactNode;
42
+ interface CallTileProps {
43
+ readonly participant: Participant;
44
+ /** Which of their videos: `camera` unless it is their shared screen. */
45
+ readonly video?: "camera" | "screen";
46
+ /** It is you: your own camera, mirrored, and your microphone. */
47
+ readonly self?: boolean;
48
+ readonly className?: string;
49
+ }
50
+ /** One person's tile: their video once it is received, else their initials; their name, a muted microphone, and a ring while they speak. */
51
+ declare function CallTile({ participant, video, self, className }: CallTileProps): ReactNode;
52
+ interface CallControlsProps {
53
+ /** Turns the microphone and camera on as the call joins: what `<Call>` does. */
54
+ readonly publish?: boolean;
55
+ /** Called as you leave, before the call ends. */
56
+ readonly onLeave?: () => void;
57
+ /** A button that opens and closes the participant list, with how many are in the call. */
58
+ readonly people?: {
59
+ readonly open: boolean;
60
+ readonly onToggle: () => void;
61
+ readonly controls?: string;
62
+ };
63
+ readonly className?: string;
64
+ }
65
+ /** The call's controls: the room's name, microphone, camera, screen sharing and Leave, and the participant list's button. */
66
+ declare function CallControls({ publish, onLeave, people, className }: CallControlsProps): ReactNode;
67
+ interface ParticipantListProps {
68
+ readonly id?: string;
69
+ /** A close button in its header, when the list is opened from somewhere. */
70
+ readonly onClose?: () => void;
71
+ readonly className?: string;
72
+ }
73
+ /** Who is in the call: you first, then the others as they joined, with who is away and whose microphone is off. */
74
+ declare function ParticipantList({ id, onClose, className }: ParticipantListProps): ReactNode;
75
+ //#endregion
76
+ export { Call, CallControls, CallControlsProps, CallGrid, CallProps, CallTheme, CallTile, CallTileProps, JoinCallProps, ParticipantList, ParticipantListProps, ShowCallProps };