/**
 * 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 { JSX } from 'react';
import { ExcludedProperties, Provider, SyncCursorPositionsFn } from '@lexical/yjs';
import { Doc } from 'yjs';
import { InitialEditorStateType } from './LexicalComposer';
import { CursorsContainerRef } from './shared/useYjsCollaboration';
type ProviderFactory = (id: string, yjsDocMap: Map<string, Doc>) => Provider;
type CollaborationPluginProps = {
    id: string;
    providerFactory: ProviderFactory;
    shouldBootstrap: boolean;
    username?: string;
    cursorColor?: string;
    cursorsContainerRef?: CursorsContainerRef;
    initialEditorState?: InitialEditorStateType;
    excludedProperties?: ExcludedProperties;
    awarenessData?: object;
    syncCursorPositionsFn?: SyncCursorPositionsFn;
    /** Opt in to the new CSS Highlights-based selection rendering (if supported by the browser).
     * Fallback to legacy method if not enabled or not supported.
     */
    selectionHighlight?: boolean;
};
/**
 * Connects the editor to a Yjs document for real-time collaboration, syncing
 * editor state and rendering remote users' cursors and selections. Provide a
 * `providerFactory` that creates the Yjs {@link Provider} for the given
 * document `id`. Must be used within a {@link LexicalCollaboration} provider.
 *
 * @returns The element that renders collaborators' cursors (or an empty
 * fragment until the provider and binding are initialized).
 */
export declare function CollaborationPlugin({ id, providerFactory, shouldBootstrap, username, cursorColor, cursorsContainerRef, initialEditorState, excludedProperties, awarenessData, syncCursorPositionsFn, selectionHighlight, }: CollaborationPluginProps): JSX.Element;
type CollaborationPluginV2Props = {
    id: string;
    doc: Doc;
    provider: Provider;
    __shouldBootstrapUnsafe?: boolean;
    username?: string;
    cursorColor?: string;
    cursorsContainerRef?: CursorsContainerRef;
    excludedProperties?: ExcludedProperties;
    awarenessData?: object;
    /** Opt in to the new CSS Highlights-based selection rendering (if supported by the browser).
     * Fallback to legacy method if not enabled or not supported.
     */
    selectionHighlight?: boolean;
};
/**
 * A variant of {@link CollaborationPlugin} that takes an already-created Yjs
 * `doc` and {@link Provider} directly instead of a provider factory, giving the
 * application full control over their lifecycle. Must be used within a
 * {@link LexicalCollaboration} provider.
 *
 * @experimental The API may change in a future release.
 * @returns The element that renders collaborators' cursors.
 */
export declare function CollaborationPluginV2__EXPERIMENTAL({ id, doc, provider, __shouldBootstrapUnsafe, username, cursorColor, cursorsContainerRef, excludedProperties, awarenessData, selectionHighlight, }: CollaborationPluginV2Props): JSX.Element;
export {};
