/**
 * Shared types for the real-time collaboration system.
 */
export interface PeerInfo {
    peerId: string;
    displayName: string;
    sheets?: SheetInfo[];
}
export interface SheetInfo {
    id: string;
    name: string;
    usedRange: string | null;
    cellCount: number;
}
export interface CollabState {
    roomId: string | null;
    peerId: string | null;
    peers: Map<string, PeerInfo>;
    connected: boolean;
}
export type ClientMessage = {
    type: 'create';
} | {
    type: 'join';
    roomId: string;
    displayName: string;
} | {
    type: 'chat';
    text: string;
} | {
    type: 'awareness';
    sheets: SheetInfo[];
} | {
    type: 'leave';
};
export type ServerMessage = {
    type: 'room_created';
    roomId: string;
} | {
    type: 'joined';
    roomId: string;
    peerId: string;
    peers: PeerInfo[];
    docIds?: string[];
} | {
    type: 'peer_joined';
    peerId: string;
    displayName: string;
} | {
    type: 'peer_left';
    peerId: string;
} | {
    type: 'chat';
    peerId: string;
    displayName: string;
    text: string;
} | {
    type: 'awareness';
    peerId: string;
    displayName: string;
    sheets: SheetInfo[];
} | {
    type: 'error';
    message: string;
};
export interface CollabCallbacks {
    onPeerJoined?: (peer: PeerInfo) => void;
    onPeerLeft?: (peerId: string, displayName?: string) => void;
    onChat?: (peerId: string, displayName: string, text: string) => void;
    onAwareness?: (peerId: string, displayName: string, sheets: SheetInfo[]) => void;
    onSyncData?: (docId: string, data: Uint8Array) => void;
    onDisconnect?: () => void;
    onError?: (message: string) => void;
}
//# sourceMappingURL=types.d.ts.map