import { Extension, PlainExtension, Union } from "@prosekit/core"; import { CursorAwareness, CursorEphemeralStore, CursorPluginOptions, LoroDocType, LoroSyncPluginProps, LoroSyncPluginProps as LoroSyncPluginProps$1, LoroUndoPluginProps, LoroUndoPluginProps as LoroUndoPluginProps$1 } from "loro-prosemirror"; /** * @internal */ type LoroCommandsExtension = Extension<{ Commands: { undo: []; redo: []; }; }>; declare function defineLoroCommands(): LoroCommandsExtension; interface LoroCursorOptions extends CursorPluginOptions { awareness?: CursorAwareness; presence?: CursorEphemeralStore; } declare function defineLoroCursorPlugin(options: LoroCursorOptions): PlainExtension; declare function defineLoroKeymap(): PlainExtension; declare function defineLoroSyncPlugin(options: LoroSyncPluginProps$1): PlainExtension; declare function defineLoroUndoPlugin(options: LoroUndoPluginProps$1): PlainExtension; interface LoroOptions { /** * The Loro instance handles the state of shared data. */ doc: LoroDocType; /** * The (legacy) Awareness instance. One of `awareness` or `presence` must be provided. */ awareness?: CursorAwareness; /** * The CursorEphemeralStore instance. One of `awareness` or `presence` must be provided. */ presence?: CursorEphemeralStore; /** * Extra options for `LoroSyncPlugin`. */ sync?: Omit; /** * Extra options for the `LoroUndoPlugin`. */ undo?: Omit; /** * Extra options for `LoroCursorPlugin` or `LoroEphemeralCursorPlugin`. */ cursor?: CursorPluginOptions; } /** * @internal */ type LoroExtension = Union<[LoroCommandsExtension, PlainExtension]>; declare function defineLoro(options: LoroOptions): LoroExtension; export { type LoroCursorOptions, type LoroExtension, type LoroOptions, type LoroSyncPluginProps, type LoroUndoPluginProps, defineLoro, defineLoroCommands, defineLoroCursorPlugin, defineLoroKeymap, defineLoroSyncPlugin, defineLoroUndoPlugin }; //# sourceMappingURL=loro.d.ts.map