/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
import type { Doc } from 'yjs';
/**
 * The value stored in the {@link CollaborationContext}: the local user's
 * display `name` and cursor `color`, whether collaboration is currently active,
 * and the map of Yjs documents shared by the editors under this provider.
 */
export type CollaborationContextType = {
    color: string;
    isCollabActive: boolean;
    name: string;
    yjsDocMap: Map<string, Doc>;
};
/**
 * The React context that holds the shared {@link CollaborationContextType} for
 * collaborative editors. Provide it with {@link LexicalCollaboration} and read
 * it with {@link useCollaborationContext}.
 */
export declare const CollaborationContext: import("react").Context<CollaborationContextType | null>;
/**
 * A provider component that creates a fresh {@link CollaborationContextType}
 * and makes it available to descendant editors via {@link CollaborationContext}.
 * Wrap a group of editors that should share collaboration state in this
 * component.
 *
 * @returns A context provider wrapping `children`.
 */
export declare function LexicalCollaboration({ children }: {
    children: React.ReactNode;
}): import("react/jsx-runtime").JSX.Element;
/**
 * Reads the current {@link CollaborationContextType} from the nearest
 * {@link LexicalCollaboration} provider. Optionally pass `username` and `color`
 * to set the local user's display name and cursor color.
 *
 * @returns The active collaboration context.
 */
export declare function useCollaborationContext(username?: string, color?: string): CollaborationContextType;
