@ai-matrx/meet 0.7.83 → 0.7.85
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/CHANGELOG.md +40 -0
- package/README.md +13 -7
- package/dist/collab-Bss-_Jfp.d.cts +805 -0
- package/dist/collab-Bss-_Jfp.d.ts +805 -0
- package/dist/components-BOUmOiPj.d.cts +240 -0
- package/dist/components-BmgstFx_.d.ts +240 -0
- package/dist/core.cjs +6737 -0
- package/dist/core.cjs.map +1 -0
- package/dist/core.d.cts +3048 -0
- package/dist/core.d.ts +3048 -0
- package/dist/core.js +6704 -0
- package/dist/core.js.map +1 -0
- package/dist/index.cjs +219 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -3720
- package/dist/index.d.ts +5 -3720
- package/dist/index.js +219 -0
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +1430 -1354
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +108 -365
- package/dist/react.d.ts +108 -365
- package/dist/react.js +1102 -1039
- package/dist/react.js.map +1 -1
- package/dist/skins/meet.cjs +4647 -0
- package/dist/skins/meet.cjs.map +1 -0
- package/dist/skins/meet.d.cts +113 -0
- package/dist/skins/meet.d.ts +113 -0
- package/dist/skins/meet.js +4628 -0
- package/dist/skins/meet.js.map +1 -0
- package/package.json +40 -6
package/dist/index.cjs
CHANGED
|
@@ -54,6 +54,7 @@ __export(src_exports, {
|
|
|
54
54
|
MEET_ANSWER_CONTEXT_EVENT: () => MEET_ANSWER_CONTEXT_EVENT,
|
|
55
55
|
MEET_ANSWER_EVENTS: () => MEET_ANSWER_EVENTS,
|
|
56
56
|
MEET_EVENTS: () => MEET_EVENTS,
|
|
57
|
+
MEET_REACTIONS: () => MEET_REACTIONS,
|
|
57
58
|
MEET_ROUTES: () => MEET_ROUTES,
|
|
58
59
|
MEET_SCHEMA: () => MEET_SCHEMA,
|
|
59
60
|
MODERATION_ACTIONS: () => MODERATION_ACTIONS,
|
|
@@ -76,6 +77,7 @@ __export(src_exports, {
|
|
|
76
77
|
TRANSCRIPTION_TOPIC: () => TRANSCRIPTION_TOPIC,
|
|
77
78
|
absenceSentence: () => absenceSentence,
|
|
78
79
|
activeWrapUpSummary: () => activeWrapUpSummary,
|
|
80
|
+
activityAttention: () => activityAttention,
|
|
79
81
|
announceMeeting: () => announceMeeting,
|
|
80
82
|
applyCollabPacket: () => applyCollabPacket,
|
|
81
83
|
applyRoomEvent: () => applyRoomEvent,
|
|
@@ -92,6 +94,7 @@ __export(src_exports, {
|
|
|
92
94
|
attendanceTotals: () => attendanceTotals,
|
|
93
95
|
attendeeKey: () => attendeeKey,
|
|
94
96
|
autoAssign: () => autoAssign,
|
|
97
|
+
availableActivities: () => availableActivities,
|
|
95
98
|
breakoutRemainingMs: () => breakoutRemainingMs,
|
|
96
99
|
callInviteAction: () => callInviteAction,
|
|
97
100
|
callInviteText: () => callInviteText,
|
|
@@ -162,6 +165,9 @@ __export(src_exports, {
|
|
|
162
165
|
meetingWhen: () => meetingWhen,
|
|
163
166
|
mergeCaption: () => mergeCaption,
|
|
164
167
|
mergeRecord: () => mergeRecord,
|
|
168
|
+
microphoneNoticeCode: () => microphoneNoticeCode,
|
|
169
|
+
moveToRoom: () => moveToRoom,
|
|
170
|
+
nextTranslationBatch: () => nextTranslationBatch,
|
|
165
171
|
normalizeDeviceError: () => normalizeDeviceError,
|
|
166
172
|
normalizeMeetError: () => normalizeMeetError,
|
|
167
173
|
normalizeSpoken: () => normalizeSpoken,
|
|
@@ -170,9 +176,15 @@ __export(src_exports, {
|
|
|
170
176
|
noteTakerParticipant: () => noteTakerParticipant,
|
|
171
177
|
noteTakerStatus: () => noteTakerStatus,
|
|
172
178
|
notesDocument: () => notesDocument,
|
|
179
|
+
observeMeeting: () => observe,
|
|
180
|
+
observedDevice: () => observedDevice,
|
|
181
|
+
observedPhase: () => observedPhase,
|
|
182
|
+
observedQuality: () => observedQuality,
|
|
173
183
|
orderParticipants: () => orderParticipants,
|
|
174
184
|
parseRoomToken: () => parseRoomToken,
|
|
185
|
+
participantAttributes: () => participantAttributes,
|
|
175
186
|
participantSummary: () => participantSummary,
|
|
187
|
+
performCollab: () => performCollab,
|
|
176
188
|
playableRecordingFileId: () => playableRecordingFileId,
|
|
177
189
|
projectInvitee: () => projectInvitee,
|
|
178
190
|
projectLibraryRecording: () => projectLibraryRecording,
|
|
@@ -192,16 +204,22 @@ __export(src_exports, {
|
|
|
192
204
|
recordingOffsetMs: () => recordingOffsetMs,
|
|
193
205
|
roleOf: () => roleOf,
|
|
194
206
|
roomTopic: () => roomTopic,
|
|
207
|
+
rootAttributes: () => rootAttributes,
|
|
195
208
|
searchTranscript: () => searchTranscript,
|
|
196
209
|
sendFollowUp: () => sendFollowUp,
|
|
210
|
+
setCaptionLanguage: () => setCaptionLanguage,
|
|
197
211
|
setGuestRecordAccess: () => setGuestRecordAccess,
|
|
198
212
|
settingsPatch: () => settingsPatch,
|
|
199
213
|
snapshotParticipant: () => snapshotParticipant,
|
|
200
214
|
snippetRuns: () => snippetRuns,
|
|
215
|
+
staticObservation: () => staticObservation,
|
|
201
216
|
summarizeMeetingRecordRestrictions: () => summarizeMeetingRecordRestrictions,
|
|
217
|
+
takeMoveRequest: () => takeMoveRequest,
|
|
218
|
+
takePanelRequest: () => takePanelRequest,
|
|
202
219
|
transcriptDocument: () => transcriptDocument,
|
|
203
220
|
unavailableFrom: () => unavailableFrom,
|
|
204
221
|
uniqueAttendees: () => uniqueAttendees,
|
|
222
|
+
untranslatedLines: () => untranslatedLines,
|
|
205
223
|
userTopic: () => userTopic,
|
|
206
224
|
wasRefused: () => wasRefused,
|
|
207
225
|
withItem: () => withItem,
|
|
@@ -6515,4 +6533,205 @@ function createMeetingRecordCache(options = {}) {
|
|
|
6515
6533
|
}
|
|
6516
6534
|
};
|
|
6517
6535
|
}
|
|
6536
|
+
|
|
6537
|
+
// src/core/reactions.ts
|
|
6538
|
+
var MEET_REACTIONS = ["\u{1F496}", "\u{1F44D}", "\u{1F389}", "\u{1F44F}", "\u{1F602}", "\u{1F62E}", "\u{1F622}", "\u{1F914}", "\u{1F44E}"];
|
|
6539
|
+
|
|
6540
|
+
// src/core/collab-state.ts
|
|
6541
|
+
function availableActivities(collab, isHost) {
|
|
6542
|
+
const settings = collab?.settings ?? null;
|
|
6543
|
+
if (settings === null) return [];
|
|
6544
|
+
const out = [];
|
|
6545
|
+
if (settings.whiteboardEnabled) out.push("whiteboard");
|
|
6546
|
+
if (settings.pollsEnabled && (isHost || (collab?.polls.length ?? 0) > 0)) out.push("polls");
|
|
6547
|
+
if (settings.qaEnabled) out.push("qa");
|
|
6548
|
+
if (settings.breakoutsEnabled && (isHost || collab?.breakout?.state === "open")) out.push("breakouts");
|
|
6549
|
+
return out;
|
|
6550
|
+
}
|
|
6551
|
+
function activityAttention(collab, isHost) {
|
|
6552
|
+
if (collab === null) return false;
|
|
6553
|
+
if (collab.polls.some((poll) => poll.state === "live" && poll.myVote.length === 0 && !isHost)) return true;
|
|
6554
|
+
if (isHost && collab.questions.some((q) => q.state === "open")) return true;
|
|
6555
|
+
return false;
|
|
6556
|
+
}
|
|
6557
|
+
async function performCollab(runtime, request) {
|
|
6558
|
+
if (runtime === null) return { ok: false, message: "This meeting is not connected." };
|
|
6559
|
+
try {
|
|
6560
|
+
const result = await runtime.inRoom.collab(request);
|
|
6561
|
+
return { ok: true, message: result.message, itemId: result.itemId };
|
|
6562
|
+
} catch (error) {
|
|
6563
|
+
return { ok: false, message: error.message ?? "That did not work." };
|
|
6564
|
+
}
|
|
6565
|
+
}
|
|
6566
|
+
async function moveToRoom(runtime, roomId) {
|
|
6567
|
+
if (runtime === null) return { ok: false, message: "This meeting is not connected." };
|
|
6568
|
+
try {
|
|
6569
|
+
await runtime.engine.moveToBreakout(roomId);
|
|
6570
|
+
return { ok: true, message: roomId === null ? "Back in the main room." : "Joined the breakout room." };
|
|
6571
|
+
} catch (error) {
|
|
6572
|
+
return { ok: false, message: error.message ?? "That room could not be joined." };
|
|
6573
|
+
}
|
|
6574
|
+
}
|
|
6575
|
+
function untranslatedLines(lines, translations) {
|
|
6576
|
+
return lines.filter((line) => line.final && translations[line.id] === void 0).map(({ id, text: text3 }) => ({ id, text: text3 }));
|
|
6577
|
+
}
|
|
6578
|
+
function nextTranslationBatch(pending, language, asked) {
|
|
6579
|
+
const batch = pending.filter((line) => !asked.has(`${language}:${line.id}`)).slice(-20);
|
|
6580
|
+
for (const line of batch) asked.add(`${language}:${line.id}`);
|
|
6581
|
+
return batch;
|
|
6582
|
+
}
|
|
6583
|
+
function setCaptionLanguage(store, next) {
|
|
6584
|
+
store.patch({
|
|
6585
|
+
collab: {
|
|
6586
|
+
...store.snapshot().collab,
|
|
6587
|
+
captionLanguage: next,
|
|
6588
|
+
captionTranslations: {},
|
|
6589
|
+
captionTranslationError: null
|
|
6590
|
+
}
|
|
6591
|
+
});
|
|
6592
|
+
}
|
|
6593
|
+
function takePanelRequest(store) {
|
|
6594
|
+
const request = store.snapshot().collab.panelRequest;
|
|
6595
|
+
if (request === null) return null;
|
|
6596
|
+
store.patch({ collab: { ...store.snapshot().collab, panelRequest: null } });
|
|
6597
|
+
return request.panel;
|
|
6598
|
+
}
|
|
6599
|
+
function takeMoveRequest(store) {
|
|
6600
|
+
const request = store.snapshot().collab.moveRequest;
|
|
6601
|
+
if (request === null) return null;
|
|
6602
|
+
store.patch({ collab: { ...store.snapshot().collab, moveRequest: null } });
|
|
6603
|
+
return { roomId: request.roomId };
|
|
6604
|
+
}
|
|
6605
|
+
|
|
6606
|
+
// src/core/observation.ts
|
|
6607
|
+
function observedDevice(track) {
|
|
6608
|
+
if (track.enabled) return "on";
|
|
6609
|
+
const refused = track.unavailable;
|
|
6610
|
+
if (refused === null) return "muted_by_me";
|
|
6611
|
+
switch (refused.code) {
|
|
6612
|
+
case "permission-denied":
|
|
6613
|
+
return "unavailable:denied";
|
|
6614
|
+
case "device-not-found":
|
|
6615
|
+
return "unavailable:none";
|
|
6616
|
+
case "device-in-use":
|
|
6617
|
+
return "unavailable:busy";
|
|
6618
|
+
case "insecure-context":
|
|
6619
|
+
return "unavailable:blocked_site";
|
|
6620
|
+
default:
|
|
6621
|
+
return "unavailable:failed";
|
|
6622
|
+
}
|
|
6623
|
+
}
|
|
6624
|
+
function endedRecord(snapshot, given) {
|
|
6625
|
+
const record = snapshot?.meeting ?? given;
|
|
6626
|
+
return record !== null && record.endedAt !== null;
|
|
6627
|
+
}
|
|
6628
|
+
function observedPhase(input) {
|
|
6629
|
+
const { snapshot } = input;
|
|
6630
|
+
if (snapshot === null) return "resolving";
|
|
6631
|
+
const raw = snapshot.phase;
|
|
6632
|
+
const live = raw === "connected" || raw === "reconnecting";
|
|
6633
|
+
if (endedRecord(snapshot, input.meeting ?? null) && !live) return "ended";
|
|
6634
|
+
switch (raw) {
|
|
6635
|
+
case "idle":
|
|
6636
|
+
case "failed":
|
|
6637
|
+
case "left":
|
|
6638
|
+
return "prejoin";
|
|
6639
|
+
case "lobby":
|
|
6640
|
+
return "waiting:knocking";
|
|
6641
|
+
case "requesting-token":
|
|
6642
|
+
case "connecting":
|
|
6643
|
+
return "joining";
|
|
6644
|
+
case "connected":
|
|
6645
|
+
case "reconnecting":
|
|
6646
|
+
return "in_call";
|
|
6647
|
+
}
|
|
6648
|
+
}
|
|
6649
|
+
var ADMITTER_ROLES = /* @__PURE__ */ new Set(["host", "cohost"]);
|
|
6650
|
+
function observe(input) {
|
|
6651
|
+
const { snapshot } = input;
|
|
6652
|
+
const phase = observedPhase(input);
|
|
6653
|
+
const inCall = phase === "in_call";
|
|
6654
|
+
const role = inCall && snapshot !== null ? effectiveRole(snapshot) : "none";
|
|
6655
|
+
const canAdmit = role !== "none" && ADMITTER_ROLES.has(role);
|
|
6656
|
+
const deviceInPlay = phase === "joining" || inCall;
|
|
6657
|
+
return {
|
|
6658
|
+
phase,
|
|
6659
|
+
reason: null,
|
|
6660
|
+
role,
|
|
6661
|
+
connection: snapshot?.phase === "reconnecting" ? "reconnecting" : "stable",
|
|
6662
|
+
hostPresent: inCall && snapshot !== null ? snapshot.participants.some((p) => ADMITTER_ROLES.has(p.role)) : null,
|
|
6663
|
+
lobbyCount: canAdmit && snapshot !== null ? snapshot.lobby.filter((entry) => entry.state === "knocking").length : 0,
|
|
6664
|
+
recording: snapshot?.recording === "recording" || snapshot?.recording === "stopping",
|
|
6665
|
+
audioBlocked: null,
|
|
6666
|
+
camera: deviceInPlay && snapshot !== null ? observedDevice(snapshot.media.camera) : null,
|
|
6667
|
+
microphone: deviceInPlay && snapshot !== null ? observedDevice(snapshot.media.microphone) : null
|
|
6668
|
+
};
|
|
6669
|
+
}
|
|
6670
|
+
function staticObservation(phase, reason = null) {
|
|
6671
|
+
return {
|
|
6672
|
+
phase,
|
|
6673
|
+
reason,
|
|
6674
|
+
role: "none",
|
|
6675
|
+
connection: phase === "disconnected" ? "server_unreachable" : "stable",
|
|
6676
|
+
hostPresent: null,
|
|
6677
|
+
lobbyCount: 0,
|
|
6678
|
+
recording: false,
|
|
6679
|
+
audioBlocked: null,
|
|
6680
|
+
camera: null,
|
|
6681
|
+
microphone: null
|
|
6682
|
+
};
|
|
6683
|
+
}
|
|
6684
|
+
function rootAttributes(o) {
|
|
6685
|
+
const attrs = {
|
|
6686
|
+
"data-meet-root": "",
|
|
6687
|
+
"data-meet-phase": o.phase,
|
|
6688
|
+
"data-meet-role": o.role,
|
|
6689
|
+
"data-meet-connection": o.connection,
|
|
6690
|
+
"data-meet-lobby-count": String(o.lobbyCount),
|
|
6691
|
+
"data-meet-recording": String(o.recording)
|
|
6692
|
+
};
|
|
6693
|
+
if (o.reason !== null) attrs["data-meet-reason"] = o.reason;
|
|
6694
|
+
if (o.hostPresent !== null) attrs["data-meet-host-present"] = String(o.hostPresent);
|
|
6695
|
+
if (o.audioBlocked !== null) attrs["data-meet-audio-blocked"] = String(o.audioBlocked);
|
|
6696
|
+
if (o.camera !== null) attrs["data-meet-camera"] = o.camera;
|
|
6697
|
+
if (o.microphone !== null) attrs["data-meet-microphone"] = o.microphone;
|
|
6698
|
+
attrs["data-meet-regions"] = JSON.stringify({
|
|
6699
|
+
connection: o.connection,
|
|
6700
|
+
camera: o.camera,
|
|
6701
|
+
mic: o.microphone,
|
|
6702
|
+
audio_output: o.audioBlocked === null ? null : o.audioBlocked ? "blocked" : "playing",
|
|
6703
|
+
recording: o.recording
|
|
6704
|
+
});
|
|
6705
|
+
return attrs;
|
|
6706
|
+
}
|
|
6707
|
+
function observedQuality(quality) {
|
|
6708
|
+
switch (quality) {
|
|
6709
|
+
case "excellent":
|
|
6710
|
+
case "good":
|
|
6711
|
+
return "good";
|
|
6712
|
+
case "poor":
|
|
6713
|
+
return "poor";
|
|
6714
|
+
case "lost":
|
|
6715
|
+
return "lost";
|
|
6716
|
+
default:
|
|
6717
|
+
return null;
|
|
6718
|
+
}
|
|
6719
|
+
}
|
|
6720
|
+
function participantAttributes(p) {
|
|
6721
|
+
const attrs = {
|
|
6722
|
+
"data-meet-participant": "",
|
|
6723
|
+
"data-meet-participant-identity": p.identity,
|
|
6724
|
+
"data-meet-participant-name": p.displayName,
|
|
6725
|
+
"data-meet-participant-role": p.role,
|
|
6726
|
+
"data-meet-participant-self": String(p.isLocal)
|
|
6727
|
+
};
|
|
6728
|
+
const quality = observedQuality(p.quality);
|
|
6729
|
+
if (quality !== null) attrs["data-meet-participant-connection"] = quality;
|
|
6730
|
+
return attrs;
|
|
6731
|
+
}
|
|
6732
|
+
function microphoneNoticeCode(track) {
|
|
6733
|
+
const refused = track.unavailable;
|
|
6734
|
+
if (refused === null) return null;
|
|
6735
|
+
return refused.code === "permission-denied" || refused.code === "insecure-context" ? "mic-blocked" : "device-lost";
|
|
6736
|
+
}
|
|
6518
6737
|
//# sourceMappingURL=index.cjs.map
|