/** Fallback cursor/label colour when none is supplied or it fails validation. */ export declare const DEFAULT_COLOR = "#4c8bf5"; /** True when `roomId` is a safe 1-128 char alphanumeric/`-`/`_` token. */ export declare function isValidRoomId(roomId: unknown): roomId is string; /** Return `roomId` when valid, throw otherwise. */ export declare function validateRoomId(roomId: string): string; /** True for a non-empty string of at most `max` characters (session, client and batch ids). */ export declare function isValidId(value: unknown, max?: number): value is string; /** True for a non-negative safe integer (versions, sequence numbers, offsets). */ export declare function isNonNegativeSafeInteger(value: unknown): value is number; /** * Remove HTML tags in a single linear pass with no regex backtracking. Tracking open/closed tag * state while walking the string means nested or overlapping `<`/`>` sequences (`ipt>`) * can never leave a live tag behind, and there is no polynomial ReDoS on many unmatched `<`. */ export declare function stripHtmlTags(text: string): string; /** Strip HTML tags, trim, and clamp to 64 characters; falls back to `fallback`. */ export declare function sanitizeUserName(name: unknown, fallback?: string): string; /** * Strict profile-name check for hosts that prefer rejection over repair: 1 to 80 printable * characters. Returns the trimmed name or throws. */ export declare function validateDisplayName(name: string): string; /** Validate a 6-digit hex colour; returns `fallback` when invalid. */ export declare function sanitizeColor(color: unknown, fallback?: string): string; /** Allow only http(s)/data: avatar URLs; otherwise `undefined`. */ export declare function sanitizeAvatarUrl(url: unknown): string | undefined; /** Coerce to a non-negative integer index (slide, page, sheet). */ export declare function sanitizeIndex(value: unknown): number; /** Clamp a coordinate to `[min - margin, max + margin]`; non-finite input becomes 0. */ export declare function clampCoordinate(value: unknown, min: number, max: number, margin?: number): number; /** * True when connecting to `serverUrl` would be blocked as mixed content: an insecure `ws://` socket * opened from a secure `https:` page. Loopback hosts are exempt. `pageProtocol` defaults to the * ambient `location.protocol` when there is one (no DOM types are required). */ export declare function isMixedContentBlocked(serverUrl: string, pageProtocol?: string | undefined): boolean; //# sourceMappingURL=validation.d.ts.map