UNPKG

@atlaskit/editor-plugin-type-ahead

Version:

Type-ahead plugin for @atlaskit/editor-core

37 lines (36 loc) 1.45 kB
/** * @jsxRuntime classic * @jsx jsx */ import React from 'react'; import { jsx } from '@emotion/react'; import type { SelectItemMode } from '@atlaskit/editor-common/type-ahead'; import type { ExtractInjectionAPI, TypeAheadHandler, TypeAheadItem } from '@atlaskit/editor-common/types'; import type { DecorationSet, EditorView } from '@atlaskit/editor-prosemirror/view'; import { CloseSelectionOptions } from '../pm-plugins/constants'; import type { TypeAheadPlugin } from '../typeAheadPluginType'; import type { OnSelectItem, TypeAheadErrorInfo } from '../types'; type TypeAheadPopupProps = { anchorElement: HTMLElement; api: ExtractInjectionAPI<TypeAheadPlugin> | undefined; cancel: (params: { addPrefixTrigger: boolean; forceFocusOnEditor: boolean; setSelectionAt: CloseSelectionOptions; }) => void; decorationSet: DecorationSet; editorView: EditorView; errorInfo: TypeAheadErrorInfo; isEmptyQuery: boolean; items: Array<TypeAheadItem>; onItemInsert: (mode: SelectItemMode, index: number) => void; popupsBoundariesElement?: HTMLElement; popupsMountPoint?: HTMLElement; popupsScrollableElement?: HTMLElement; selectedIndex: number; setSelectedItem: OnSelectItem; showMoreOptionsButton?: boolean; triggerHandler: TypeAheadHandler; }; export declare const TypeAheadPopup: React.MemoExoticComponent<(props: TypeAheadPopupProps) => jsx.JSX.Element>; export {};