UNPKG

@atlaskit/editor-plugin-type-ahead

Version:

Type-ahead plugin for @atlaskit/editor-core

11 lines (10 loc) 790 B
import { InsertTypeAheadStep } from '@atlaskit/adf-schema/steps'; import type { ReadonlyTransaction } from '@atlaskit/editor-prosemirror/state'; import type { CreateTypeAheadDecorations, PopupMountPointReference, RemoveTypeAheadDecorations, TypeAheadHandler, TypeAheadPluginState } from '../types'; export type ReducerOptions = { createDecorations: CreateTypeAheadDecorations; popupMountRef: PopupMountPointReference; removeDecorations: RemoveTypeAheadDecorations; typeAheadHandlers: Array<TypeAheadHandler>; }; export declare const createReducer: ({ typeAheadHandlers, removeDecorations, createDecorations, }: ReducerOptions) => (tr: ReadonlyTransaction, currentPluginState: TypeAheadPluginState, typeAheadStepOverride: InsertTypeAheadStep | null) => TypeAheadPluginState;