@caisual/kit 0.5.0 → 0.10.0
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/dist/kit.d.ts +2 -175
- package/dist/kit.js +1808 -76
- package/dist/node.d.ts +1 -88
- package/dist/node.js +354 -96
- package/dist/overlay.d.ts +1 -0
- package/dist/overlay.js +2074 -0
- package/dist/runtime.d.ts +1 -111
- package/dist/runtime.js +335 -67
- package/dist/server.d.ts +1 -71
- package/dist/server.js +3 -0
- package/dist/types/api.d.ts +25 -0
- package/dist/types/contracts/biglietto.d.ts +24 -0
- package/dist/types/contracts/device.d.ts +66 -0
- package/dist/types/contracts/firma.d.ts +21 -0
- package/dist/types/contracts/i18n.d.ts +12 -0
- package/dist/types/contracts/index.d.ts +13 -0
- package/dist/types/contracts/keys.d.ts +59 -0
- package/dist/types/contracts/manifest.d.ts +123 -0
- package/dist/types/contracts/overlay-boards.d.ts +3 -0
- package/dist/types/contracts/overlay.d.ts +223 -0
- package/dist/types/contracts/player.d.ts +1 -0
- package/dist/types/contracts/room-limits.d.ts +13 -0
- package/dist/types/contracts/runtime.d.ts +70 -0
- package/dist/types/contracts/server-js.d.ts +11 -0
- package/dist/types/contracts/slug.d.ts +5 -0
- package/dist/types/contracts/token-crew.d.ts +21 -0
- package/dist/types/daily.d.ts +3 -0
- package/dist/types/errors.d.ts +6 -0
- package/dist/types/handshake.d.ts +30 -0
- package/dist/types/http.d.ts +3 -0
- package/dist/types/index.d.ts +231 -0
- package/dist/types/kit.d.ts +28 -0
- package/dist/types/node/index.d.ts +97 -0
- package/dist/types/node/websocket.d.ts +29 -0
- package/dist/types/overlay/boards.d.ts +48 -0
- package/dist/types/overlay/bridge.d.ts +3 -0
- package/dist/types/overlay/host-bridge.d.ts +74 -0
- package/dist/types/overlay/i18n.d.ts +128 -0
- package/dist/types/overlay/index.d.ts +10 -0
- package/dist/types/overlay/shortcut.d.ts +4 -0
- package/dist/types/overlay/styles.d.ts +1 -0
- package/dist/types/overlay/ui-model.d.ts +45 -0
- package/dist/types/overlay/ui.d.ts +80 -0
- package/dist/types/overlay/voice-panel.d.ts +13 -0
- package/dist/types/protocollo.d.ts +262 -0
- package/dist/types/runtime/index.d.ts +128 -0
- package/dist/types/server/index.d.ts +76 -0
- package/dist/types/session/index.d.ts +49 -0
- package/dist/types/session/resume.d.ts +13 -0
- package/dist/types/standalone.d.ts +14 -0
- package/dist/types/stanza/index.d.ts +3 -0
- package/dist/types/stanza/json.d.ts +18 -0
- package/dist/types/stanza/nucleo.d.ts +100 -0
- package/dist/types/stanza/tipi.d.ts +136 -0
- package/dist/types/stanza-client/index.d.ts +24 -0
- package/dist/types/text.d.ts +2 -0
- package/dist/types/voce/index.d.ts +124 -0
- package/package.json +10 -2
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
export declare const languages: readonly ['en', 'it', 'es', 'fr', 'de', 'pt'];
|
|
2
|
+
export type OverlayLanguage = typeof languages[number];
|
|
3
|
+
declare const words: {
|
|
4
|
+
readonly gameLanguages: readonly ["Game languages", "Lingue del gioco", "Idiomas del juego", "Langues du jeu", "Spielsprachen", "Idiomas do jogo"];
|
|
5
|
+
readonly loading: readonly ["Loading game...", "Caricamento...", "Cargando...", "Chargement...", "Spiel wird geladen...", "Carregando..."];
|
|
6
|
+
readonly loadingSlow: readonly ["This game is taking longer than expected. You can wait a little longer or try again.", "Il gioco ci sta mettendo più del previsto. Puoi aspettare ancora un po’ o riprovare.", "El juego está tardando más de lo esperado. Puedes esperar un poco más o volver a intentarlo.", "Le jeu met plus de temps que prévu. Vous pouvez patienter encore un peu ou réessayer.", "Das Spiel braucht länger als erwartet. Du kannst noch etwas warten oder es erneut versuchen.", "O jogo está demorando mais do que o esperado. Você pode esperar mais um pouco ou tentar novamente."];
|
|
7
|
+
readonly home: readonly ["Play", "Gioca", "Jugar", "Jouer", "Spielen", "Jogar"];
|
|
8
|
+
readonly homeMenu: readonly ["Menu", "Menu", "Menú", "Menu", "Menü", "Menu"];
|
|
9
|
+
readonly mode: readonly ["Mode", "Modalità", "Modo", "Mode", "Modus", "Modo"];
|
|
10
|
+
readonly play: readonly ["Play", "Gioca", "Jugar", "Jouer", "Spielen", "Jogar"];
|
|
11
|
+
readonly friendsPlay: readonly ["Play with friends", "Gioca con amici", "Jugar con amigos", "Jouer entre amis", "Mit Freunden spielen", "Jogar com amigos"];
|
|
12
|
+
readonly find: readonly ["Find players", "Trova giocatori", "Buscar jugadores", "Trouver des joueurs", "Spieler finden", "Buscar jogadores"];
|
|
13
|
+
readonly join: readonly ["Join with code", "Entra con codice", "Entrar con código", "Rejoindre avec un code", "Mit Code beitreten", "Entrar com código"];
|
|
14
|
+
readonly joinInvite: readonly ["Join this room", "Entra in questa stanza", "Entrar en está sala", "Rejoindre cette salle", "Diesem Raum beitreten", "Entrar nestá sala"];
|
|
15
|
+
readonly watch: readonly ["Watch a room", "Guarda una stanza", "Observar una sala", "Regarder une salle", "Raum ansehen", "Assistir a uma sala"];
|
|
16
|
+
readonly resume: readonly ["Resume", "Riprendi", "Continuar", "Reprendre", "Fortsetzen", "Continuar"];
|
|
17
|
+
readonly room: readonly ["Room", "Stanza", "Sala", "Salle", "Raum", "Sala"];
|
|
18
|
+
readonly code: readonly ["Room code", "Codice stanza", "Código de sala", "Code de salle", "Raumcode", "Código da sala"];
|
|
19
|
+
readonly copy: readonly ["Copy invite", "Copia invito", "Copiar invitación", "Copier le lien", "Einladung kopieren", "Copiar convite"];
|
|
20
|
+
readonly copied: readonly ["Invite copied", "Invito copiato", "Invitacion copiada", "Lien copié", "Einladung kopiert", "Convite copiado"];
|
|
21
|
+
readonly copyFailed: readonly ["Copy this link:", "Copia questo link:", "Copia este enlace:", "Copiez ce lien :", "Diesen Link kopieren:", "Copie este link:"];
|
|
22
|
+
readonly joining: readonly ["Joining room...", "Ingresso nella stanza...", "Entrando en la sala...", "Connexion à la salle...", "Raum wird betreten...", "Entrando na sala..."];
|
|
23
|
+
readonly matching: readonly ["Finding your people...", "Ricerca giocatori...", "Buscando jugadores...", "Recherche de joueurs...", "Spieler werden gesucht...", "Buscando jogadores..."];
|
|
24
|
+
readonly queue: readonly ["{n} / {max} players", "{n} / {max} giocatori", "{n} / {max} jugadores", "{n} / {max} joueurs", "{n} / {max} Spieler", "{n} / {max} jogadores"];
|
|
25
|
+
readonly cancel: readonly ["Cancel", "Annulla", "Cancelar", "Annuler", "Abbrechen", "Cancelar"];
|
|
26
|
+
readonly close: readonly ["Close", "Chiudi", "Cerrar", "Fermer", "Schließen", "Fechar"];
|
|
27
|
+
readonly back: readonly ["Back", "Indietro", "Volver", "Retour", "Zurück", "Voltar"];
|
|
28
|
+
readonly ready: readonly ["Ready", "Pronto", "Listo", "Prêt", "Bereit", "Pronto"];
|
|
29
|
+
readonly unready: readonly ["Not ready", "Non pronto", "No listo", "Pas prêt", "Nicht bereit", "Não pronto"];
|
|
30
|
+
readonly start: readonly ["Start", "Inizia", "Empezar", "Commencer", "Starten", "Começar"];
|
|
31
|
+
readonly role: readonly ["Role", "Ruolo", "Rol", "Rôle", "Rolle", "Função"];
|
|
32
|
+
readonly team: readonly ["Team", "Squadra", "Equipo", "Équipe", "Team", "Equipe"];
|
|
33
|
+
readonly host: readonly ["Host", "Host", "Anfitrion", "Hôte", "Host", "Anfitrião"];
|
|
34
|
+
readonly you: readonly ["You", "Tu", "Tú", "Vous", "Du", "Você"];
|
|
35
|
+
readonly away: readonly ["Away", "Assente", "Ausente", "Absent", "Abwesend", "Ausente"];
|
|
36
|
+
readonly needPlayers: readonly ["Waiting for more players", "In attesa di giocatori", "Esperando más jugadores", "En attente de joueurs", "Weitere Spieler fehlen", "Esperando mais jogadores"];
|
|
37
|
+
readonly needReady: readonly ["Everyone needs to be ready", "Tutti devono essere pronti", "Todos deben estar listos", "Tout le monde doit être prêt", "Alle müssen bereit sein", "Todos precisam estar prontos"];
|
|
38
|
+
readonly needRoles: readonly ["Fill the required roles", "Completa i ruoli richiesti", "Completa los roles", "Complétez les rôles", "Benötigte Rollen besetzen", "Complete as funções"];
|
|
39
|
+
readonly needTeams: readonly ["Choose the required teams", "Scegli le squadre richieste", "Elige los equipos", "Choisissez les équipes", "Teams auswahlen", "Escolha as equipes"];
|
|
40
|
+
readonly waitHost: readonly ["Waiting for the host", "In attesa dell'host", "Esperando al anfitrion", "En attente de l’hôte", "Warten auf den Host", "Esperando o anfitrião"];
|
|
41
|
+
readonly starting: readonly ["Starting in", "Si inizia tra", "Empieza en", "Début dans", "Start in", "Começa em"];
|
|
42
|
+
readonly playing: readonly ["Playing", "In partita", "Jugando", "En jeu", "Im Spiel", "Jogando"];
|
|
43
|
+
readonly ended: readonly ["Game finished", "Partita conclusa", "Partida terminada", "Partie terminée", "Spiel beendet", "Partida encerrada"];
|
|
44
|
+
readonly rematchReady: readonly ["{n}/{max} ready", "{n}/{max} pronti", "{n}/{max} listos", "{n}/{max} prêts", "{n}/{max} bereit", "{n}/{max} prontos"];
|
|
45
|
+
readonly rematchStart: readonly ["Start rematch", "Avvia rivincita", "Iniciar revancha", "Lancer la revanche", "Revanche starten", "Iniciar revanche"];
|
|
46
|
+
readonly again: readonly ["Play again", "Gioca ancora", "Jugar de nuevo", "Rejouer", "Erneut spielen", "Jogar novamente"];
|
|
47
|
+
readonly newRoom: readonly ["New room. Share the new invite.", "Nuova stanza. Condividi il nuovo invito.", "Nueva sala. Comparte la invitación.", "Nouvelle salle. Partagez le lien.", "Neuer Raum. Neue Einladung teilen.", "Nova sala. Compartilhe o convite."];
|
|
48
|
+
readonly watching: readonly ["Watching", "In osservazione", "Observando", "Spectateur", "Zuschauen", "Assistindo"];
|
|
49
|
+
readonly delay: readonly ["{n}s delay", "Ritardo {n}s", "Retraso de {n}s", "Retard de {n}s", "{n}s Verzögerung", "Atraso de {n}s"];
|
|
50
|
+
readonly exit: readonly ["Exit", "Esci", "Salir", "Quitter", "Verlassen", "Sair"];
|
|
51
|
+
readonly leaveNow: readonly ["Leave for now", "Esci per ora", "Salir por ahora", "Quitter pour le moment", "Vorübergehend verlassen", "Sair por enquanto"];
|
|
52
|
+
readonly leaveRoom: readonly ["Leave room", "Lascia la stanza", "Abandonar sala", "Abandonner la salle", "Raum verlassen", "Deixar a sala"];
|
|
53
|
+
readonly leaveHint: readonly ["Your room stays available for Resume.", "La stanza resta disponibile con Riprendi.", "Podrás volver a está sala.", "Vous pourrez reprendre cette salle.", "Du kannst den Raum fortsetzen.", "Você pode voltar a está sala."];
|
|
54
|
+
readonly temporaryHint: readonly ["The game continues. Rejoining may only be possible briefly.", "La partita continua. Il rientro può essere disponibile solo per poco.", "La partida continua. Volver puede ser posible solo por poco tiempo.", "La partie continue. Le retour peut être limité.", "Das Spiel läuft weiter. Rückkehr nur kurz möglich.", "A partida continua. O retorno pode ser limitado."];
|
|
55
|
+
readonly abandonHint: readonly ["Leave room gives up your place.", "Lascia la stanza libera il tuo posto.", "Abandonar libera tu plaza.", "Abandonner libère votre place.", "Raum verlassen gibt deinen Platz frei.", "Deixar a sala libera sua vaga."];
|
|
56
|
+
readonly reconnecting: readonly ["Reconnecting...", "Riconnessione...", "Reconectando...", "Reconnexion...", "Verbindung wird erneuert...", "Reconectando..."];
|
|
57
|
+
readonly replaced: readonly ["Opened in another tab", "Aperta in un’altra scheda", "Abierta en otra pestána", "Ouverte dans un autre onglet", "In anderem Tab geöffnet", "Aberta em outra aba"];
|
|
58
|
+
readonly error: readonly ["Something went wrong. Try again.", "Qualcosa non va. Riprova.", "Algo salió mal. Reintenta.", "Une erreur est survenue. Réessayez.", "Etwas ist schiefgelaufen. Erneut versuchen.", "Algo deu errado. Tente novamente."];
|
|
59
|
+
readonly noRoom: readonly ["This room is no longer available.", "Questa stanza non è più disponibile.", "Esta sala ya no está disponible.", "Cette salle n'est plus disponible.", "Dieser Raum ist nicht mehr verfügbar.", "Esta sala não está mais disponivel."];
|
|
60
|
+
readonly full: readonly ["This room is full.", "La stanza è piena.", "La sala está llena.", "Cette salle est pleine.", "Dieser Raum ist voll.", "Esta sala está cheia."];
|
|
61
|
+
readonly noMatch: readonly ["No match this time. Try again.", "Nessun gruppo trovato. Riprova.", "No hay grupo. Reintenta.", "Aucun groupe trouvé. Réessayez.", "Keine Gruppe gefunden. Erneut versuchen.", "Nenhum grupo encontrado. Tente novamente."];
|
|
62
|
+
readonly invalidCode: readonly ["Enter a six-character room code.", "Inserisci un codice di sei caratteri.", "Escribe un código de seis caracteres.", "Entrez un code de six caracteres.", "Sechsstelligen Raumcode eingeben.", "Digite um código de seis caracteres."];
|
|
63
|
+
readonly refused: readonly ["The room did not accept that change.", "La stanza ha rifiutato la modifica.", "La sala rechazó el cambio.", "La salle a refusé ce changement.", "Der Raum hat die Änderung abgelehnt.", "A sala recusou a alteração."];
|
|
64
|
+
readonly unavailable: readonly ["Unavailable right now", "Non disponibile ora", "No disponible ahora", "Indisponible pour le moment", "Derzeit nicht verfügbar", "Indisponivel agora"];
|
|
65
|
+
readonly offline: readonly ["Connection unavailable. Try again.", "Connessione non disponibile. Riprova.", "Sin conexión. Reintenta.", "Connexion indisponible. Réessayez.", "Keine Verbindung. Erneut versuchen.", "Sem conexão. Tente novamente."];
|
|
66
|
+
readonly saveFailed: readonly ["Keep the room code. Resume could not be saved.", "Conserva il codice. Riprendi non è stato salvato.", "Guarda el código. No se pudo guardar el regreso.", "Gardez le code. La reprise ne peut pas être enregistrée.", "Raumcode aufbewahren. Fortsetzen nicht gespeichert.", "Guarde o código. O retorno não foi salvo."];
|
|
67
|
+
readonly boards: readonly ["Leaderboard", "Classifica", "Clasificación", "Classement", "Bestenliste", "Classificação"];
|
|
68
|
+
readonly board: readonly ["Board", "Classifica", "Tabla", "Classement", "Bestenliste", "Tabela"];
|
|
69
|
+
readonly daily: readonly ["Daily", "Giornaliera", "Diaria", "Du jour", "Täglich", "Diária"];
|
|
70
|
+
readonly allTime: readonly ["All time", "Di sempre", "Histórica", "Tous les temps", "Gesamt", "Geral"];
|
|
71
|
+
readonly accounts: readonly ["Accounts", "Account", "Cuentas", "Comptes", "Konten", "Contas"];
|
|
72
|
+
readonly guests: readonly ["Guests", "Ospiti", "Invitados", "Invités", "Gäste", "Visitantes"];
|
|
73
|
+
readonly category: readonly ["Category", "Categoria", "Categoria", "Catégorie", "Kategorie", "Categoria"];
|
|
74
|
+
readonly period: readonly ["Period", "Periodo", "Período", "Période", "Zeitraum", "Período"];
|
|
75
|
+
readonly rank: readonly ["Rank", "Posizione", "Puesto", "Rang", "Platz", "Posicao"];
|
|
76
|
+
readonly score: readonly ["Score", "Punteggio", "Puntos", "Score", "Punkte", "Pontos"];
|
|
77
|
+
readonly verified: readonly ["Verified", "Verificato", "Verificado", "Vérifié", "Verifiziert", "Verificado"];
|
|
78
|
+
readonly own: readonly ["Your best", "Il tuo record", "Tu record", "Votre record", "Dein Rekord", "Seu recorde"];
|
|
79
|
+
readonly empty: readonly ["No scores yet", "Nessun punteggio", "Aún no hay puntos", "Aucun score", "Noch keine Punkte", "Ainda sem pontos"];
|
|
80
|
+
readonly saving: readonly ["Saving score...", "Salvataggio punteggio...", "Guardando puntos...", "Enregistrement du score...", "Punkte werden gespeichert...", "Salvando pontos..."];
|
|
81
|
+
readonly saved: readonly ["Your best is on the board", "Il tuo record è in classifica", "Tu record está en la tabla", "Votre record est au classement", "Dein Rekord ist eingetragen", "Seu recorde está na tabela"];
|
|
82
|
+
readonly bestAlready: readonly ["Your best is already on the board", "Il tuo record era già in classifica", "Tu record ya estaba en la tabla", "Votre record est déjà au classement", "Dein Rekord ist bereits eingetragen", "Seu recorde já está na tabela"];
|
|
83
|
+
readonly refresh: readonly ["Refresh", "Aggiorna", "Actualizar", "Actualiser", "Aktualisieren", "Atualizar"];
|
|
84
|
+
readonly refreshHint: readonly ["Score not visible yet. Refresh to check.", "Punteggio non ancora visibile. Aggiorna per controllare.", "Puntos aún no visibles. Actualiza.", "Score pas encore visible. Actualisez.", "Punkte noch nicht sichtbar. Aktualisieren.", "Pontos ainda não visiveis. Atualize."];
|
|
85
|
+
readonly friends: readonly ["Friends & party", "Amici e gruppo", "Amigos y grupo", "Amis et groupe", "Freunde & Gruppe", "Amigos e grupo"];
|
|
86
|
+
readonly localCrew: readonly ["Friends and party are unavailable in local preview.", "Amici e gruppo non disponibili in anteprima locale.", "Amigos y grupo no disponibles en la vista local.", "Amis et groupe indisponibles en aperçu local.", "Freunde und Gruppe in lokaler Vorschau nicht verfügbar.", "Amigos e grupo indisponíveis na prévia local."];
|
|
87
|
+
readonly loginCrew: readonly ["Sign in on Caisual to use friends and party.", "Accedi a Caisual per amici e gruppo.", "Inicia sesion para amigos y grupo.", "Connectez-vous pour utiliser amis et groupe.", "Für Freunde und Gruppe bei Caisual anmelden.", "Entre no Caisual para amigos e grupo."];
|
|
88
|
+
readonly online: readonly ["Online", "Online", "En linea", "En ligne", "Online", "Online"];
|
|
89
|
+
readonly noFriends: readonly ["No friends online", "Nessun amico online", "Sin amigos en linea", "Aucun ami en ligne", "Keine Freunde online", "Nenhum amigo online"];
|
|
90
|
+
readonly createParty: readonly ["Create party", "Crea gruppo", "Crear grupo", "Créer un groupe", "Gruppe erstellen", "Criar grupo"];
|
|
91
|
+
readonly inviteParty: readonly ["Invite to party", "Invita nel gruppo", "Invitar al grupo", "Inviter au groupe", "In Gruppe einladen", "Convidar para o grupo"];
|
|
92
|
+
readonly leaveParty: readonly ["Leave party", "Lascia gruppo", "Salir del grupo", "Quitter le groupe", "Gruppe verlassen", "Sair do grupo"];
|
|
93
|
+
readonly accept: readonly ["Accept", "Accetta", "Aceptar", "Accepter", "Annehmen", "Aceitar"];
|
|
94
|
+
readonly decline: readonly ["Decline", "Rifiuta", "Rechazar", "Refuser", "Ablehnen", "Recusar"];
|
|
95
|
+
readonly follow: readonly ["Join them", "Raggiungi", "Unirse", "Rejoindre", "Beitreten", "Juntar-se"];
|
|
96
|
+
readonly voice: readonly ["Voice", "Voce", "Voz", "Voix", "Sprache", "Voz"];
|
|
97
|
+
readonly voiceJoin: readonly ["Join voice", "Entra in voce", "Unirse a voz", "Activer la voix", "Sprachchat beitreten", "Entrar na voz"];
|
|
98
|
+
readonly voiceLeave: readonly ["Leave voice", "Esci dalla voce", "Salir de voz", "Quitter la voix", "Sprachchat verlassen", "Sair da voz"];
|
|
99
|
+
readonly voiceMute: readonly ["Mute", "Disattiva microfono", "Silenciar", "Couper le micro", "Stummschalten", "Silenciar"];
|
|
100
|
+
readonly voiceUnmute: readonly ["Unmute", "Attiva microfono", "Activar micrófono", "Activer le micro", "Mikrofon aktivieren", "Ativar microfone"];
|
|
101
|
+
readonly voiceOff: readonly ["Voice off", "Voce disattivata", "Voz desactivada", "Voix désactivée", "Sprachchat aus", "Voz desativada"];
|
|
102
|
+
readonly voiceJoining: readonly ["Joining voice...", "Connessione voce...", "Conectando voz...", "Connexion vocale...", "Sprachchat verbindet...", "Conectando voz..."];
|
|
103
|
+
readonly voiceOn: readonly ["Voice connected", "Voce connessa", "Voz conectada", "Voix connectée", "Sprachchat verbunden", "Voz conectada"];
|
|
104
|
+
readonly voiceMuted: readonly ["Muted", "Microfono disattivato", "Silenciado", "Micro coupé", "Stumm", "Silenciado"];
|
|
105
|
+
readonly voiceMic: readonly ["Mic on", "Microfono attivo", "Micrófono activo", "Micro actif", "Mikrofon an", "Microfone ativo"];
|
|
106
|
+
readonly voiceListening: readonly ["Listening only", "Solo ascolto", "Solo escucha", "Écoute seule", "Nur zuhören", "Somente ouvindo"];
|
|
107
|
+
readonly voiceSpeaking: readonly ["Speaking", "Sta parlando", "Hablando", "Parle", "Spricht", "Falando"];
|
|
108
|
+
readonly voicePeers: readonly ["Voice participants", "Partecipanti in voce", "Participantes de voz", "Participants vocaux", "Sprachteilnehmer", "Participantes de voz"];
|
|
109
|
+
readonly voiceEmpty: readonly ["No one else in voice yet.", "Nessun altro in voce per ora.", "Aún no hay nadie más en voz.", "Personne d’autre en voix pour le moment.", "Noch niemand im Sprachchat.", "Ninguém mais na voz ainda."];
|
|
110
|
+
readonly voiceVolume: readonly ["Volume for {name}", "Volume di {name}", "Volumen de {name}", "Volume de {name}", "Lautstärke für {name}", "Volume de {name}"];
|
|
111
|
+
readonly voiceUnavailable: readonly ["Join a room with voice to use these controls.", "Entra in una stanza con voce per usare questi controlli.", "Entra en una sala con voz para usar estos controles.", "Rejoignez une salle vocale pour utiliser ces commandes.", "Diese Steuerung braucht einen Raum mit Sprachchat.", "Entre em uma sala com voz para usar estes controles."];
|
|
112
|
+
readonly voiceWatch: readonly ["Voice is unavailable while watching.", "La voce non e' disponibile in osservazione.", "La voz no está disponible al observar.", "La voix est indisponible en observation.", "Beim Zuschauen ist kein Sprachchat verfügbar.", "A voz não está disponível ao assistir."];
|
|
113
|
+
readonly voiceDenied: readonly ["Microphone permission denied. Allow it in your browser, then try again.", "Permesso microfono negato. Consenti l'accesso nel browser e riprova.", "Permiso de micrófono denegado. Actívalo en el navegador e inténtalo de nuevo.", "Accès au micro refusé. Autorisez-le dans le navigateur, puis réessayez.", "Mikrofonzugriff verweigert. Im Browser erlauben und erneut versuchen.", "Permissão do microfone negada. Permita no navegador e tente novamente."];
|
|
114
|
+
readonly voiceUnsupported: readonly ["Voice is not supported in this browser.", "Questo browser non supporta la voce.", "Este navegador no admite voz.", "Ce navigateur ne prend pas en charge la voix.", "Dieser Browser unterstützt keinen Sprachchat.", "Este navegador não oferece suporte a voz."];
|
|
115
|
+
readonly voiceFailed: readonly ["Voice could not connect. Try again.", "Connessione voce non riuscita. Riprova.", "No se pudo conectar la voz. Inténtalo de nuevo.", "Connexion vocale impossible. Réessayez.", "Sprachverbindung fehlgeschlagen. Erneut versuchen.", "Não foi possível conectar a voz. Tente novamente."];
|
|
116
|
+
readonly voicePeerGone: readonly ["This participant has left voice.", "Questo partecipante e' uscito dalla voce.", "Este participante salió de voz.", "Ce participant a quitté la voix.", "Diese Person hat den Sprachchat verlassen.", "Este participante saiu da voz."];
|
|
117
|
+
readonly shortcut: readonly ["Shift+Tab shortcut", "Scorciatoia Shift+Tab", "Atajo Shift+Tab", "Raccourci Maj+Tab", "Umschalt+Tab-Kurzbefehl", "Atalho Shift+Tab"];
|
|
118
|
+
readonly menu: readonly ["Caisual menu", "Menu Caisual", "Menu Caisual", "Menu Caisual", "Caisual-Menu", "Menu Caisual"];
|
|
119
|
+
readonly retry: readonly ["Retry", "Riprova", "Reintentar", "Réessayer", "Erneut versuchen", "Tentar novamente"];
|
|
120
|
+
};
|
|
121
|
+
export type TextKey = keyof typeof words;
|
|
122
|
+
export type Dictionary = Record<TextKey, string>;
|
|
123
|
+
export declare const dictionaries: Record<OverlayLanguage, Dictionary>;
|
|
124
|
+
export declare function overlayLanguage(raw: string | null | undefined): OverlayLanguage;
|
|
125
|
+
export declare function overlayLocale(raw: string | null | undefined): string;
|
|
126
|
+
export declare function translator(language: string): (key: TextKey, values?: Record<string, string | number>) => string;
|
|
127
|
+
export declare function errorText(code: string): TextKey;
|
|
128
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { creaPonteOspite, avviaHandshake, eMessaggioReady, eRichiestaBiglietto, stanzaDaMessaggio } from './host-bridge.js';
|
|
2
|
+
export type { HostBridge, HostBridgeInput, FinestraHandshake, FrameHandshake } from './host-bridge.js';
|
|
3
|
+
export { overlayConfiguration } from '../contracts/index.js';
|
|
4
|
+
export type { OverlayConfiguration, OverlayOperations, OverlaySessionState, OverlayCapabilities, OverlayPanel, OverlayView, OverlayVoice, OverlayVoicePeer } from '../contracts/index.js';
|
|
5
|
+
export { mountOverlay } from './ui.js';
|
|
6
|
+
export type { MountOverlayInput, OverlayCrew, CrewSnapshot } from './ui.js';
|
|
7
|
+
export type { BoardReader, BoardQuery, BoardData } from './boards.js';
|
|
8
|
+
export { overlayLanguage } from './i18n.js';
|
|
9
|
+
export { styles as overlayStyles } from './styles.js';
|
|
10
|
+
export { overlayLocale } from './i18n.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { OverlayView } from '../contracts/index.js';
|
|
2
|
+
export declare function bindOverlayShortcut(target: Pick<Window, 'addEventListener' | 'removeEventListener'>, overlay: {
|
|
3
|
+
onChange(listener: (view: OverlayView) => void): () => void;
|
|
4
|
+
}, open: () => void): () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles = "\n.safe-area-probe{position:fixed;visibility:hidden;pointer-events:none;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}\n:host{all:initial;position:fixed;inset:0;z-index:10000;pointer-events:none;font:15px/1.45 system-ui,sans-serif;color:#f4f4f1;color-scheme:dark;--accent:#a8efc5}\n[data-layout],[data-surface],.sr{pointer-events:none}*{box-sizing:border-box}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button,select,input{border:1px solid #ffffff30;background:#25292b;color:inherit;border-radius:12px;min-height:44px;padding:10px 14px}button{cursor:pointer}button:disabled{opacity:.45;cursor:default}button:hover:not(:disabled){background:#343b3a}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--accent);outline-offset:3px}a{color:var(--accent)}.primary{background:var(--accent);color:var(--accent-ink,#11221b);border-color:transparent;font-weight:700}.primary:hover:not(:disabled){filter:brightness(1.1);background:var(--accent)}.quiet{background:transparent}label{display:grid;gap:6px;text-align:left}select,input{width:100%;min-width:0}h1,h2,p{margin:0}h1{font-size:clamp(26px,5vw,42px);line-height:1.1;letter-spacing:-.035em}h2{font-size:20px}small,.muted{color:#bdc5c1}.stack{display:grid;gap:16px}.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.row>*{flex:0 1 auto}.row .grow,.grow{flex:1}.split{display:grid;grid-template-columns:1fr 1fr;gap:10px}.pill{position:absolute;top:max(10px,env(safe-area-inset-top));right:max(10px,env(safe-area-inset-right));display:flex;height:44px;border:1px solid #ffffff35;border-radius:24px;background:#171e20eF;box-shadow:0 4px 20px #0004;pointer-events:auto;overflow:hidden}.pill button{border:0;border-radius:0;padding:8px 13px;background:transparent}.pill button:focus-visible{outline-offset:-4px}.pill small{margin-left:8px}.backdrop{position:absolute;inset:0;background:#0b151ce8;backdrop-filter:blur(10px);pointer-events:auto;display:grid;place-items:center;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));overflow:auto}.backdrop.home{background-color:#142127;background-size:cover;background-position:center}.dialog{position:relative;width:min(100%,540px);max-height:100%;overflow:auto;overscroll-behavior:contain;background:#141b1df5;border:1px solid #ffffff25;border-radius:22px;padding:24px;box-shadow:0 20px 80px #0005}.dialog.wide{width:min(100%,700px)}.top{display:flex;align-items:center;gap:12px;margin-bottom:18px}.top h2{flex:1}.tabs{display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid #ffffff25;padding-bottom:12px}.tabs button{min-height:36px;padding:6px 10px}.tabs [aria-current=true]{border-color:var(--accent)}.roster{list-style:none;padding:0;margin:0;display:grid;gap:8px;max-height:32dvh;overflow:auto}.roster li{display:flex;align-items:center;gap:8px;padding:10px;background:#ffffff08;border-radius:10px}.roster .name{flex:1;overflow-wrap:anywhere}.badge{border:1px solid #ffffff30;border-radius:6px;padding:2px 6px;font-size:12px}.code{font-size:24px;letter-spacing:.13em;font-variant-numeric:tabular-nums}.notice,.error{border-radius:10px;padding:10px;background:#a8efc514;overflow-wrap:anywhere}.error{background:#ff8b7720;color:#ffd2c9}.countdown{font-size:88px;line-height:1;text-align:center;font-variant-numeric:tabular-nums}.ended{position:absolute;bottom:max(12px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);max-width:calc(100% - 24px);width:max-content;background:#171e20f5;pointer-events:auto;border:1px solid #ffffff30;border-radius:16px;padding:10px;display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap}.ended [data-rematch-players]{max-width:100%;max-height:3.2em;overflow:auto;overflow-wrap:anywhere}.ended strong{padding:0 8px}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.table-wrap{overflow:auto;max-height:38dvh}table{width:100%;border-collapse:collapse;text-align:left}th,td{padding:9px 6px;border-bottom:1px solid #ffffff20}td:nth-child(3){text-align:right}td small{display:block}.self{background:#ffffff0a}.checkbox{display:flex;align-items:center;gap:8px;font-size:13px}.checkbox input{width:18px;min-height:18px}.full{width:100%}\n[hidden]{display:none!important}.voice-peers{list-style:none;margin:0;padding:0;display:grid;gap:10px}.voice-peers li{border:1px solid #ffffff25;border-radius:12px;padding:12px;display:grid;gap:8px}.voice-peers [data-speaking=true]{border-color:var(--accent)}.voice-peers input{width:100%;accent-color:var(--accent);padding:0}.voice-peers label{font-size:13px}.pill .voice-toggle{width:44px;padding:8px}.voice-toggle[data-voice-state=on][data-muted=false]{color:var(--accent)}\n.boot{position:absolute;inset:0;z-index:2;isolation:isolate;display:grid;place-items:center;overflow:auto;overscroll-behavior:contain;padding:max(100px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) max(48px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));background:#0b151c;opacity:1;transition:opacity .4s ease;pointer-events:auto;outline:none}\n.boot::before,.boot::after{content:\"\";position:fixed;inset:0;pointer-events:none;z-index:-1}.boot::before{background:radial-gradient(ellipse at 50% 38%,color-mix(in srgb,var(--accent),transparent 80%),transparent 65%)}.boot::after{background:radial-gradient(ellipse at 50% 38%,#0b151c20,#0b151cd9 85%),linear-gradient(#0b151c66,#0b151cbf)}\n.boot-cover{position:fixed;inset:0;z-index:-2;width:100%;height:100%;object-fit:cover;filter:blur(20px);transform:scale(1.08);opacity:.65;pointer-events:none}\n.boot-brand{position:absolute;top:max(28px,env(safe-area-inset-top));left:max(32px,env(safe-area-inset-left));display:flex;align-items:center;gap:10px;font-size:14px;font-weight:650;letter-spacing:.02em;color:#f4f4f1b3}.boot-brand span{display:grid;place-items:center;width:36px;height:36px;border:1px solid #ffffff25;border-radius:12px;background:#171e20af;box-shadow:0 4px 20px #0004;color:var(--boot-accent);font-size:20px;font-weight:800}\n.boot-content{width:min(100%,900px);text-align:center;display:grid;justify-items:center;gap:24px}.boot h1{max-width:16ch;font-size:clamp(44px,8vw,108px);font-weight:800;line-height:1.04;letter-spacing:-.05em;overflow-wrap:anywhere;text-wrap:balance;color:var(--boot-accent);text-shadow:0 20px 80px #0005}\n.boot-progress{width:112px;height:3px;border-radius:12px;background:#ffffff20;overflow:hidden;margin-top:12px}.boot-progress span{display:block;width:44%;height:100%;border-radius:inherit;background:var(--boot-accent);animation:boot-progress 1.8s ease-in-out infinite}.boot-status{max-width:42ch;min-height:3em;font-size:14px;line-height:1.5;color:#d3dad6;text-wrap:balance}.boot-recovery{min-height:44px}.boot-recovery .row{justify-content:center}.boot-leaving{opacity:0;pointer-events:none}\n@keyframes boot-progress{0%{transform:translateX(-110%)}100%{transform:translateX(340%)}}\n@media(max-width:480px){.dialog{padding:18px;border-radius:18px}.split{grid-template-columns:1fr 1fr;gap:8px}.tabs{gap:4px}.tabs button{font-size:13px;padding:6px 8px}.pill button:focus-visible{outline-offset:-4px}.pill small{display:none}.ended{gap:6px}.ended strong{font-size:13px}.ended button{padding:8px 10px;font-size:13px}.roster{max-height:28dvh}}\n@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}.boot{transition:none}.boot-progress span{animation:none;transform:translateX(65%)}}\n";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type Manifest, type OverlayPanel, type OverlaySessionState } from '../contracts/index.js';
|
|
2
|
+
export type Phase = 'boot' | 'home' | 'attaching' | 'matching' | 'lobby' | 'countdown' | 'playing' | 'ended' | 'watching' | 'error';
|
|
3
|
+
export type Panel = OverlayPanel | 'join' | 'watch' | 'exit';
|
|
4
|
+
export interface UiModel {
|
|
5
|
+
session: OverlaySessionState | null;
|
|
6
|
+
panel: Panel | 'auto' | null;
|
|
7
|
+
mode: string;
|
|
8
|
+
busy: boolean;
|
|
9
|
+
error: string | null;
|
|
10
|
+
notice: string | null;
|
|
11
|
+
shortcutEnabled: boolean;
|
|
12
|
+
}
|
|
13
|
+
export type UiAction = {
|
|
14
|
+
type: 'session';
|
|
15
|
+
session: OverlaySessionState | null;
|
|
16
|
+
} | {
|
|
17
|
+
type: 'panel';
|
|
18
|
+
panel: Panel | null;
|
|
19
|
+
} | {
|
|
20
|
+
type: 'mode';
|
|
21
|
+
mode: string;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'busy';
|
|
24
|
+
busy: boolean;
|
|
25
|
+
} | {
|
|
26
|
+
type: 'error';
|
|
27
|
+
code: string | null;
|
|
28
|
+
} | {
|
|
29
|
+
type: 'notice';
|
|
30
|
+
notice: string | null;
|
|
31
|
+
} | {
|
|
32
|
+
type: 'shortcut';
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
};
|
|
35
|
+
export declare function phase(session: OverlaySessionState | null): Phase;
|
|
36
|
+
export declare function initialUi(manifest: Manifest): UiModel;
|
|
37
|
+
export declare function reduceUi(model: UiModel, action: UiAction): UiModel;
|
|
38
|
+
export declare function visiblePanel(model: UiModel): Panel | 'boot' | 'attaching' | 'matching' | 'countdown' | 'error' | null;
|
|
39
|
+
export declare function primaryAction(manifest: Manifest, mode: string): {
|
|
40
|
+
op: "local.start" | "room.create";
|
|
41
|
+
friends: boolean;
|
|
42
|
+
} | null;
|
|
43
|
+
export declare function startReason(manifest: Manifest, session: OverlaySessionState | null): string | null;
|
|
44
|
+
export declare function canPlayAgain(session: OverlaySessionState | null): boolean;
|
|
45
|
+
export declare function normalizeInvite(code: string): string | null;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type OverlayConfiguration } from '../contracts/index.js';
|
|
2
|
+
import { type HostBridge } from './host-bridge.js';
|
|
3
|
+
import { type BoardReader } from './boards.js';
|
|
4
|
+
export interface CrewPerson {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
online: boolean;
|
|
8
|
+
game: {
|
|
9
|
+
slug: string;
|
|
10
|
+
name: string;
|
|
11
|
+
} | null;
|
|
12
|
+
room: {
|
|
13
|
+
code: string;
|
|
14
|
+
} | null;
|
|
15
|
+
}
|
|
16
|
+
export interface CrewSnapshot {
|
|
17
|
+
connected: boolean;
|
|
18
|
+
you: {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
} | null;
|
|
22
|
+
friends: CrewPerson[];
|
|
23
|
+
party: {
|
|
24
|
+
id: string;
|
|
25
|
+
leader: string;
|
|
26
|
+
members: CrewPerson[];
|
|
27
|
+
} | null;
|
|
28
|
+
invites: {
|
|
29
|
+
party: string;
|
|
30
|
+
from: {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
};
|
|
34
|
+
at: number;
|
|
35
|
+
}[];
|
|
36
|
+
follow: {
|
|
37
|
+
from: {
|
|
38
|
+
id: string;
|
|
39
|
+
name: string;
|
|
40
|
+
};
|
|
41
|
+
game: {
|
|
42
|
+
slug: string;
|
|
43
|
+
name: string;
|
|
44
|
+
};
|
|
45
|
+
code: string;
|
|
46
|
+
} | null;
|
|
47
|
+
}
|
|
48
|
+
export interface OverlayCrew {
|
|
49
|
+
unavailable?: 'local' | 'login';
|
|
50
|
+
getSnapshot(): CrewSnapshot;
|
|
51
|
+
subscribe(listener: () => void): () => void;
|
|
52
|
+
party: {
|
|
53
|
+
create(): void;
|
|
54
|
+
invite(player: string): void;
|
|
55
|
+
accept(party: string): void;
|
|
56
|
+
decline(party: string): void;
|
|
57
|
+
leave(): void;
|
|
58
|
+
};
|
|
59
|
+
follow(game: string, code: string): void;
|
|
60
|
+
}
|
|
61
|
+
export interface MountOverlayInput {
|
|
62
|
+
container: HTMLElement;
|
|
63
|
+
frame: HTMLIFrameElement;
|
|
64
|
+
bridge: HostBridge;
|
|
65
|
+
configuration: OverlayConfiguration;
|
|
66
|
+
language: string;
|
|
67
|
+
player: {
|
|
68
|
+
id: string;
|
|
69
|
+
guest: boolean;
|
|
70
|
+
};
|
|
71
|
+
exit(): void;
|
|
72
|
+
inviteUrl(code: string): string;
|
|
73
|
+
boards?: BoardReader;
|
|
74
|
+
crew?: OverlayCrew;
|
|
75
|
+
}
|
|
76
|
+
export declare function mountOverlay(input: MountOverlayInput): {
|
|
77
|
+
element: HTMLDivElement;
|
|
78
|
+
root: ShadowRoot;
|
|
79
|
+
dispose(): void;
|
|
80
|
+
} | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Manifest, OverlaySessionState, OverlayVoice } from '../contracts/index.js';
|
|
2
|
+
import { type translator } from './i18n.js';
|
|
3
|
+
type Translate = ReturnType<typeof translator>;
|
|
4
|
+
export declare function voiceEligible(manifest: Manifest, session: OverlaySessionState | null): boolean;
|
|
5
|
+
export declare function voiceStatus(voice: OverlayVoice, t: Translate): string;
|
|
6
|
+
export declare function updateVoicePanel(container: HTMLElement, input: {
|
|
7
|
+
manifest: Manifest;
|
|
8
|
+
session: OverlaySessionState | null;
|
|
9
|
+
t: Translate;
|
|
10
|
+
error: string | null;
|
|
11
|
+
pending: string | null;
|
|
12
|
+
}): void;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import type { QueuedScore } from './contracts/index.js';
|
|
2
|
+
import type { JsonValue, RoomStatus } from './server/index.js';
|
|
3
|
+
export type PercorsoDiff = Array<string | number>;
|
|
4
|
+
export type OperazioneDiff = {
|
|
5
|
+
op: 'set';
|
|
6
|
+
path: PercorsoDiff;
|
|
7
|
+
value: JsonValue;
|
|
8
|
+
} | {
|
|
9
|
+
op: 'del';
|
|
10
|
+
path: PercorsoDiff;
|
|
11
|
+
};
|
|
12
|
+
export interface GiocatoreProtocollo {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
guest: boolean;
|
|
16
|
+
role: string | null;
|
|
17
|
+
team: number | null;
|
|
18
|
+
ready: boolean;
|
|
19
|
+
connected: boolean;
|
|
20
|
+
}
|
|
21
|
+
export type VoiceMode = 'none' | 'room' | 'team' | 'proximity';
|
|
22
|
+
/** Un giocatore che sta pubblicando la voce: `session` e' la sessione SFU (o `mesh` in locale). */
|
|
23
|
+
export interface VocePeerProtocollo {
|
|
24
|
+
id: string;
|
|
25
|
+
session: string;
|
|
26
|
+
track: string;
|
|
27
|
+
muted: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface IceServerProtocollo {
|
|
30
|
+
urls: string | string[];
|
|
31
|
+
username?: string;
|
|
32
|
+
credential?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface RoomConfiguration {
|
|
35
|
+
players: {
|
|
36
|
+
min: number;
|
|
37
|
+
max: number;
|
|
38
|
+
};
|
|
39
|
+
lobby: boolean;
|
|
40
|
+
persistent: boolean;
|
|
41
|
+
requestRole: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface StanzaProtocollo {
|
|
44
|
+
result?: JsonValue;
|
|
45
|
+
countdownAt?: number | null;
|
|
46
|
+
configuration?: RoomConfiguration;
|
|
47
|
+
id: string;
|
|
48
|
+
seed: number;
|
|
49
|
+
status: RoomStatus;
|
|
50
|
+
mode: string | null;
|
|
51
|
+
tick: number;
|
|
52
|
+
tickRate: number;
|
|
53
|
+
serverTime: number;
|
|
54
|
+
host: string | null;
|
|
55
|
+
}
|
|
56
|
+
export interface FotografiaStanza {
|
|
57
|
+
room: StanzaProtocollo;
|
|
58
|
+
players: GiocatoreProtocollo[];
|
|
59
|
+
state: JsonValue;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Operazioni voce del client. Ogni richiesta porta `r`, un intero crescente per
|
|
63
|
+
* connessione: la risposta del server ripete lo stesso `r`. Gli op `session`,
|
|
64
|
+
* `subscribe`, `answer` e `close` esistono solo con trasporto `sfu`; `publish` e
|
|
65
|
+
* `signal` solo con trasporto `mesh` (sviluppo locale).
|
|
66
|
+
*/
|
|
67
|
+
export type MessaggioClientVoce = {
|
|
68
|
+
t: 'voice';
|
|
69
|
+
op: 'ice';
|
|
70
|
+
r: number;
|
|
71
|
+
} | {
|
|
72
|
+
t: 'voice';
|
|
73
|
+
op: 'session';
|
|
74
|
+
r: number;
|
|
75
|
+
sdp?: string;
|
|
76
|
+
mid?: string;
|
|
77
|
+
} | {
|
|
78
|
+
t: 'voice';
|
|
79
|
+
op: 'subscribe';
|
|
80
|
+
r: number;
|
|
81
|
+
session: string;
|
|
82
|
+
tracks: Array<{
|
|
83
|
+
session: string;
|
|
84
|
+
track: string;
|
|
85
|
+
}>;
|
|
86
|
+
} | {
|
|
87
|
+
t: 'voice';
|
|
88
|
+
op: 'answer';
|
|
89
|
+
r: number;
|
|
90
|
+
session: string;
|
|
91
|
+
sdp: string;
|
|
92
|
+
} | {
|
|
93
|
+
t: 'voice';
|
|
94
|
+
op: 'close';
|
|
95
|
+
r: number;
|
|
96
|
+
session: string;
|
|
97
|
+
mids: string[];
|
|
98
|
+
} | {
|
|
99
|
+
t: 'voice';
|
|
100
|
+
op: 'publish';
|
|
101
|
+
r: number;
|
|
102
|
+
mic?: boolean;
|
|
103
|
+
} | {
|
|
104
|
+
t: 'voice';
|
|
105
|
+
op: 'signal';
|
|
106
|
+
r: number;
|
|
107
|
+
to: string;
|
|
108
|
+
data: JsonValue;
|
|
109
|
+
} | {
|
|
110
|
+
t: 'voice';
|
|
111
|
+
op: 'mute';
|
|
112
|
+
r: number;
|
|
113
|
+
muted: boolean;
|
|
114
|
+
} | {
|
|
115
|
+
t: 'voice';
|
|
116
|
+
op: 'stop';
|
|
117
|
+
r: number;
|
|
118
|
+
};
|
|
119
|
+
export type OpVoce = MessaggioClientVoce['op'];
|
|
120
|
+
export type MessaggioServerVoce = {
|
|
121
|
+
t: 'voice';
|
|
122
|
+
op: 'ice';
|
|
123
|
+
r: number;
|
|
124
|
+
transport: 'sfu' | 'mesh';
|
|
125
|
+
mode: VoiceMode;
|
|
126
|
+
iceServers: IceServerProtocollo[];
|
|
127
|
+
} | {
|
|
128
|
+
t: 'voice';
|
|
129
|
+
op: 'session';
|
|
130
|
+
r: number;
|
|
131
|
+
session: string;
|
|
132
|
+
sdp: string | null;
|
|
133
|
+
} | {
|
|
134
|
+
t: 'voice';
|
|
135
|
+
op: 'subscribe';
|
|
136
|
+
r: number;
|
|
137
|
+
sdp: string;
|
|
138
|
+
tracks: Array<{
|
|
139
|
+
mid: string | null;
|
|
140
|
+
session: string;
|
|
141
|
+
track: string;
|
|
142
|
+
error: string | null;
|
|
143
|
+
}>;
|
|
144
|
+
} | {
|
|
145
|
+
t: 'voice';
|
|
146
|
+
op: 'answer' | 'close' | 'publish' | 'signal' | 'mute' | 'stop';
|
|
147
|
+
r: number;
|
|
148
|
+
} | {
|
|
149
|
+
t: 'voice';
|
|
150
|
+
op: 'closed';
|
|
151
|
+
mids: string[];
|
|
152
|
+
} | {
|
|
153
|
+
t: 'voice';
|
|
154
|
+
op: OpVoce;
|
|
155
|
+
r: number;
|
|
156
|
+
error: {
|
|
157
|
+
code: string;
|
|
158
|
+
message: string;
|
|
159
|
+
};
|
|
160
|
+
} | {
|
|
161
|
+
t: 'voice';
|
|
162
|
+
op: 'roster';
|
|
163
|
+
mode: VoiceMode;
|
|
164
|
+
peers: VocePeerProtocollo[];
|
|
165
|
+
listeners: string[];
|
|
166
|
+
} | {
|
|
167
|
+
t: 'voice';
|
|
168
|
+
op: 'gain';
|
|
169
|
+
gains: Record<string, number>;
|
|
170
|
+
} | {
|
|
171
|
+
t: 'voice';
|
|
172
|
+
op: 'signal';
|
|
173
|
+
from: string;
|
|
174
|
+
data: JsonValue;
|
|
175
|
+
};
|
|
176
|
+
export type MessaggioClientStanza = MessaggioClientVoce | {
|
|
177
|
+
t: 'ready';
|
|
178
|
+
ready: boolean;
|
|
179
|
+
} | {
|
|
180
|
+
t: 'role';
|
|
181
|
+
role: string;
|
|
182
|
+
} | {
|
|
183
|
+
t: 'request-role';
|
|
184
|
+
role: string;
|
|
185
|
+
r: number;
|
|
186
|
+
} | {
|
|
187
|
+
t: 'team';
|
|
188
|
+
team: number;
|
|
189
|
+
} | {
|
|
190
|
+
t: 'start';
|
|
191
|
+
} | {
|
|
192
|
+
t: 'restart';
|
|
193
|
+
} | {
|
|
194
|
+
t: 'msg';
|
|
195
|
+
seq: number;
|
|
196
|
+
m: JsonValue;
|
|
197
|
+
} | {
|
|
198
|
+
t: 'ping';
|
|
199
|
+
c: number;
|
|
200
|
+
} | {
|
|
201
|
+
t: 'resync';
|
|
202
|
+
} | {
|
|
203
|
+
t: 'leave';
|
|
204
|
+
};
|
|
205
|
+
export type MessaggioServerStanza = {
|
|
206
|
+
t: 'welcome';
|
|
207
|
+
you: string;
|
|
208
|
+
room: StanzaProtocollo;
|
|
209
|
+
players: GiocatoreProtocollo[];
|
|
210
|
+
state: JsonValue;
|
|
211
|
+
} | {
|
|
212
|
+
t: 'players';
|
|
213
|
+
players: GiocatoreProtocollo[];
|
|
214
|
+
host?: string | null;
|
|
215
|
+
} | {
|
|
216
|
+
t: 'role-result';
|
|
217
|
+
r: number;
|
|
218
|
+
ok: boolean;
|
|
219
|
+
code: string | null;
|
|
220
|
+
} | {
|
|
221
|
+
t: 'score-queued';
|
|
222
|
+
score: QueuedScore;
|
|
223
|
+
} | {
|
|
224
|
+
t: 'status';
|
|
225
|
+
status: RoomStatus;
|
|
226
|
+
at: number;
|
|
227
|
+
result: JsonValue;
|
|
228
|
+
countdownAt?: number | null;
|
|
229
|
+
host?: string | null;
|
|
230
|
+
} | {
|
|
231
|
+
t: 'state';
|
|
232
|
+
tickRate?: number;
|
|
233
|
+
tick: number;
|
|
234
|
+
serverTime: number;
|
|
235
|
+
base: number;
|
|
236
|
+
patch: OperazioneDiff[];
|
|
237
|
+
} | {
|
|
238
|
+
t: 'snapshot';
|
|
239
|
+
tickRate?: number;
|
|
240
|
+
tick: number;
|
|
241
|
+
serverTime: number;
|
|
242
|
+
state: JsonValue;
|
|
243
|
+
} | {
|
|
244
|
+
t: 'msg';
|
|
245
|
+
m: JsonValue;
|
|
246
|
+
} | {
|
|
247
|
+
t: 'error';
|
|
248
|
+
code: string;
|
|
249
|
+
message: string;
|
|
250
|
+
} | {
|
|
251
|
+
t: 'pong';
|
|
252
|
+
c: number;
|
|
253
|
+
s: number;
|
|
254
|
+
} | {
|
|
255
|
+
t: 'flush';
|
|
256
|
+
} | MessaggioServerVoce;
|
|
257
|
+
export type MessaggioServerSpettatore = ({
|
|
258
|
+
t: 'watching';
|
|
259
|
+
delayMs: number;
|
|
260
|
+
} & FotografiaStanza) | Extract<MessaggioServerStanza, {
|
|
261
|
+
t: 'players' | 'status' | 'state' | 'snapshot' | 'msg' | 'error' | 'pong';
|
|
262
|
+
}>;
|