import { StoreDefinition, PiniaCustomStateProperties } from 'pinia'; export const useCollabStore: StoreDefinition<"CollabStore", { enabled: boolean; loaded: boolean; activeSession: any; activeNodeId: any; connectedPeers: any[]; connectionState: string; myColor: any; lastError: any; maxPeers: number; }, { /** * Returns the number of connected peers (excluding self) */ peerCount: (state: { enabled: boolean; loaded: boolean; activeSession: any; activeNodeId: any; connectedPeers: any[]; connectionState: string; myColor: any; lastError: any; maxPeers: number; } & PiniaCustomStateProperties<{ enabled: boolean; loaded: boolean; activeSession: any; activeNodeId: any; connectedPeers: any[]; connectionState: string; myColor: any; lastError: any; maxPeers: number; }>) => number; /** * Returns true if there are other peers connected */ hasActivePeers: (state: { enabled: boolean; loaded: boolean; activeSession: any; activeNodeId: any; connectedPeers: any[]; connectionState: string; myColor: any; lastError: any; maxPeers: number; } & PiniaCustomStateProperties<{ enabled: boolean; loaded: boolean; activeSession: any; activeNodeId: any; connectedPeers: any[]; connectionState: string; myColor: any; lastError: any; maxPeers: number; }>) => boolean; /** * Returns true if collaborative editing is currently active */ isCollabActive: (state: { enabled: boolean; loaded: boolean; activeSession: any; activeNodeId: any; connectedPeers: any[]; connectionState: string; myColor: any; lastError: any; maxPeers: number; } & PiniaCustomStateProperties<{ enabled: boolean; loaded: boolean; activeSession: any; activeNodeId: any; connectedPeers: any[]; connectionState: string; myColor: any; lastError: any; maxPeers: number; }>) => boolean; /** * Returns true if connected to the collaboration server */ isConnected: (state: { enabled: boolean; loaded: boolean; activeSession: any; activeNodeId: any; connectedPeers: any[]; connectionState: string; myColor: any; lastError: any; maxPeers: number; } & PiniaCustomStateProperties<{ enabled: boolean; loaded: boolean; activeSession: any; activeNodeId: any; connectedPeers: any[]; connectionState: string; myColor: any; lastError: any; maxPeers: number; }>) => boolean; /** * Returns true if currently reconnecting */ isReconnecting: (state: { enabled: boolean; loaded: boolean; activeSession: any; activeNodeId: any; connectedPeers: any[]; connectionState: string; myColor: any; lastError: any; maxPeers: number; } & PiniaCustomStateProperties<{ enabled: boolean; loaded: boolean; activeSession: any; activeNodeId: any; connectedPeers: any[]; connectionState: string; myColor: any; lastError: any; maxPeers: number; }>) => boolean; /** * Returns true if collab feature is available for use */ isAvailable: (state: { enabled: boolean; loaded: boolean; activeSession: any; activeNodeId: any; connectedPeers: any[]; connectionState: string; myColor: any; lastError: any; maxPeers: number; } & PiniaCustomStateProperties<{ enabled: boolean; loaded: boolean; activeSession: any; activeNodeId: any; connectedPeers: any[]; connectionState: string; myColor: any; lastError: any; maxPeers: number; }>) => boolean; }, { /** * Initializes the collaborative editing store. * Checks if the feature is enabled in configuration. */ init(): Promise; /** * Checks if collaborative editing is available for a specific node. * * @param {string} nodeId - The node ID to check * @returns {Promise} Availability info */ checkAvailability(nodeId: string): Promise; /** * Updates the active session information * * @param {Object} session - Session info from server */ setActiveSession(session: any): void; /** * Updates the list of connected peers * * @param {Array} peers - List of peer objects */ updatePeers(peers: any[]): void; /** * Updates the connection state * * @param {string} state - Connection state */ setConnectionState(state: string): void; /** * Sets the last error * * @param {Error} error - Error object */ setError(error: Error): void; /** * Clears the current session */ clearSession(): void; /** * Adds a peer to the connected peers list * * @param {Object} peer - Peer object */ addPeer(peer: any): void; /** * Removes a peer from the connected peers list * * @param {string} clientId - Client ID to remove */ removePeer(clientId: string): void; /** * Updates a peer's cursor position * * @param {string} clientId - Client ID * @param {number} position - Cursor position * @param {number} anchor - Selection anchor */ updatePeerCursor(clientId: string, position: number, anchor: number): void; }>; //# sourceMappingURL=collab.d.ts.map