/** * Presence kit — Liveblocks/collaboration-grade presence primitives. * * usePresence(awareness) returns: * - others: reactive array of remote participants (human + agent) * - setPresence(partial): merge fields into local awareness state * * The hook re-renders on every awareness change event and always includes * the agent participant (AGENT_CLIENT_ID) as isAgent: true. */ import type { NormalizedPoint, OtherPresence, PresencePayload } from "@agent-native/toolkit/collab-ui"; import type { Awareness } from "y-protocols/awareness"; export type { NormalizedPoint, OtherPresence, PresencePayload, } from "@agent-native/toolkit/collab-ui"; export interface UsePresenceResult { /** All remote participants (excludes local client). */ others: OtherPresence[]; /** * Merge fields into the local awareness state. These are broadcast to * peers by the fast-awareness path in useCollaborativeDoc. * Call this to publish cursor position, viewport, or selection. */ setPresence: (partial: PresencePayload) => void; } /** * Derive OtherPresence entries from an Awareness instance. * * @param awareness Awareness instance from useCollaborativeDoc. * @param localClientId The local Yjs client ID (to exclude self). */ export declare function usePresence(awareness: Awareness | null | undefined, localClientId: number | null | undefined): UsePresenceResult; /** Convert a pointer event offset to a normalized point. */ export declare function toNormalized(clientX: number, clientY: number, container: DOMRect): NormalizedPoint; /** Convert a normalized point back to absolute offset within a container. */ export declare function fromNormalized(point: NormalizedPoint, container: DOMRect): { x: number; y: number; }; //# sourceMappingURL=presence.d.ts.map