@difizen/ai-flow
Version:
Scalable, out-of-the-box, agent-oriented flow
16 lines (15 loc) • 830 B
TypeScript
import type { EntityMatch } from '@lexical/text';
import type { Klass, LexicalEditor, TextNode } from 'lexical';
import type { CustomTextNode } from './plugins/custom-text/node';
export declare function useLexicalTextEntity<T extends TextNode>(getMatch: (text: string) => null | EntityMatch, targetNode: Klass<T>, createNode: (textNode: CustomTextNode) => T): void;
export type MenuTextMatch = {
leadOffset: number;
matchingString: string;
replaceableString: string;
};
export type TriggerFn = (text: string, editor: LexicalEditor) => MenuTextMatch | null;
export declare const PUNCTUATION = "\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;";
export declare function useBasicTypeaheadTriggerMatch(trigger: string, { minLength, maxLength }: {
minLength?: number;
maxLength?: number;
}): TriggerFn;