UNPKG

lexical-vue

Version:

An extensible Vue 3 web text-editor based on Lexical.

52 lines (51 loc) 2.37 kB
import * as __VLS_VINE from 'vue-vine/internals'; import type { CommandListenerPriority, LexicalCommand, LexicalEditor, TextNode } from 'lexical'; import type { MenuRenderProps, MenuResolution, MenuTextMatch, TriggerFn } from './shared/LexicalMenu.vine'; import { MenuOption } from './shared/LexicalMenu.vine'; export declare const PUNCTUATION = "\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;"; export declare function getScrollParent(element: HTMLElement, includeHidden: boolean): HTMLElement | HTMLBodyElement; export { useDynamicPositioning } from './shared/LexicalMenu.vine'; export declare const SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND: LexicalCommand<{ index: number; option: MenuOption; }>; export declare function useBasicTypeaheadTriggerMatch(trigger: string, { minLength, maxLength, punctuation, allowWhitespace }: { minLength?: number; maxLength?: number; punctuation?: string; allowWhitespace?: boolean; }): TriggerFn; export interface TypeaheadMenuPluginProps<TOption extends MenuOption> { options: Array<TOption>; triggerFn: (text: string, editor: LexicalEditor) => MenuTextMatch | null; anchorClassName?: string; commandPriority?: CommandListenerPriority; parent?: HTMLElement; preselectFirstItem?: boolean; ignoreEntityBoundary?: boolean; } export type { MenuResolution, MenuTextMatch, TriggerFn }; export { MenuOption }; type __VLS_VINE_TypeaheadMenuPlugin_emits__ = __VLS_NormalizeEmits<__VLS_VINE.VueDefineEmits<{ close?: []; open?: [payload: MenuResolution]; queryChange: [payload: string | null]; selectOption: [ payload: { option: TOption; textNodeContainingQuery: TextNode | null; closeMenu: () => void; matchingString: string; } ]; }>>; export declare function TypeaheadMenuPlugin<TOption extends MenuOption>(props: __VLS_VINE.VineComponentCommonProps & TypeaheadMenuPluginProps<TOption> & { onClose?: __VLS_VINE_TypeaheadMenuPlugin_emits__['close']; onOpen?: __VLS_VINE_TypeaheadMenuPlugin_emits__['open']; onQueryChange: __VLS_VINE_TypeaheadMenuPlugin_emits__['queryChange']; onSelectOption: __VLS_VINE_TypeaheadMenuPlugin_emits__['selectOption']; }, context: { slots: { default: (props: MenuRenderProps<TOption>) => any; }; }): __VLS_VINE.VueVineComponent;