feat: added laravel reverb and websocket, also emote throwing added

This commit is contained in:
2026-08-16 17:10:42 +02:00
parent 50e9fbd0b0
commit 6f47ed0674
30 changed files with 2244 additions and 34 deletions
+34
View File
@@ -0,0 +1,34 @@
import type { Ref, CSSProperties } from 'vue';
export type PaperBallThrownPayload = {
id: string;
from_player_id: number;
target_player_id: number;
};
export type PaperBallFlightStyle = CSSProperties & {
'--travel-quarter-x': string;
'--travel-quarter-y': string;
'--travel-mid-x': string;
'--travel-mid-y': string;
'--travel-three-quarter-x': string;
'--travel-three-quarter-y': string;
'--travel-x': string;
'--travel-y': string;
};
export type PaperBallFlight = {
id: string;
style: PaperBallFlightStyle;
};
export type PaperBallTossOptions = {
roomId: () => string;
currentPlayerId: () => number;
board: Ref<HTMLElement | null>;
};
export type PaperBallThrowError = {
message?: string;
errors?: Record<string, string[]>;
};
+15
View File
@@ -13,6 +13,21 @@ export type RoomPlayer = {
vote: string | null;
};
export type RoomStateChange =
| 'player_joined'
| 'vote_changed'
| 'cards_revealed'
| 'votes_reset'
| 'next_round'
| 'room_reopened'
| 'room_closed'
| 'room_deleted';
export type RoomStateChangedPayload = {
version: number;
change: RoomStateChange;
};
export type SeatStyle = CSSProperties & {
'--card-x': string;
'--card-y': string;