/** Collaboration role within a session. */ export type CollaborationRole = 'owner' | 'collaborator' | 'viewer'; export declare const COLLABORATION_ROLES: readonly CollaborationRole[]; export declare function sanitizeRole(value: unknown): CollaborationRole | undefined; /** Whether a role may write to the shared document. */ export declare function canWrite(role: CollaborationRole | undefined): boolean; /** Default palette: distinct, legible hues with white-text contrast. */ export declare const CURSOR_PALETTE: readonly string[]; /** Maximum characters shown in a cursor label before truncation. */ export declare const MAX_LABEL_CHARS = 20; /** Deterministically pick a palette colour: the same seed always yields the same colour. */ export declare function assignUserColor(seed: number | string, palette?: readonly string[]): string; /** Truncate to exactly `maxChars` characters including a trailing `...` when too long. */ export declare function formatCursorLabel(userName: string, maxChars?: number): string; /** Up to two uppercase initials: first+last for multi-word names, otherwise the first two letters. */ export declare function getUserInitials(name: string): string; /** A random-enough client id for a session; `crypto.randomUUID` when present. */ export declare function createClientId(): string; /** * Generator of collision-resistant document ids that are unique per client session, so two peers * creating a paragraph/shape/row at the same time never mint the same id. `prefix` namespaces the * product (`dve` for Word, `pve` for PowerPoint). */ export declare function createIdGenerator(clientId: string, prefix?: string): (kind: string) => string; /** The fields a connected-users list needs from a collaborator. */ export interface RosterUserInput { clientId: number | string; userName: string; userColor: string; userAvatar?: string | undefined; } export interface RosterUser { /** `'local'` for the current user, otherwise `String(clientId)`. */ id: string; name: string; initials: string; color: string; avatarUrl?: string; isLocal: boolean; } /** Local user first, then remote users in their existing order. */ export declare function buildRoster(params: { localUserName: string; localUserInitials?: string; localUserColor?: string; remoteUsers: readonly RosterUserInput[]; }): RosterUser[]; //# sourceMappingURL=identity.d.ts.map