/*! * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the Microsoft Live Share SDK License. */ import { PresenceState, UserMeetingRole } from "@microsoft/live-share"; import { IUseLivePresenceResults } from "../types"; /** * React hook for using a Live Share `LivePresence`. * * @remarks * Use this hook if you want to track presence for who is currently using this component, such as * who is online or who is viewing a specific document. With presence, you can sent along any custom * user data. This is useful for rendering a list of users, profile pictures, cursor positions, and more. * This hook can only be used in a child component of `` or ``. * * @template TData Optional typing for the custom user presence data object. Default is `object` type. * @param uniqueKey The unique key for `LivePresence`. If one does not yet exist, a new one will be created. * @param initialData Optional. Initial presence data object for the user. Can be value or a function to get the value. * @param initialPresenceState Optional. Initial status of the user's presence. Default is online. * @param allowedRoles Optional. the user roles that are allowed to mutate the synchronized state * will be created, otherwise it will use the existing one. Default value is ":" * @returns stateful `localUser`, `otherUsers` list, and `allUsers` list. Also returns a callback method * to update the local user's presence and the `LivePresence` Fluid object. */ export declare function useLivePresence(uniqueKey: string, initialData?: TData | (() => TData) | undefined, initialPresenceState?: PresenceState, allowedRoles?: UserMeetingRole[]): IUseLivePresenceResults; //# sourceMappingURL=useLivePresence.d.ts.map