UNPKG

@yuntijs/ui

Version:

☁️ Yunti UI - an open-source UI component library for building Cloud Native web apps

23 lines (22 loc) 919 B
import type { LexicalNode, NodeKey, SerializedLexicalNode } from 'lexical'; import { DecoratorNode } from 'lexical'; import React from 'react'; export type SerializedNode = SerializedLexicalNode & { variable: string; }; export declare class MentionNode extends DecoratorNode<React.ReactElement> { __variable: string; static getType(): string; static clone(node: MentionNode): MentionNode; isInline(): boolean; constructor(variable: string, key?: NodeKey); createDOM(): HTMLElement; updateDOM(): false; decorate(): React.ReactElement; static importJSON(serializedNode: SerializedNode): MentionNode; exportJSON(): SerializedNode; getVariable(): string; getTextContent(): string; } export declare function $createMentionNode(variable: string): MentionNode; export declare function $isMentionNode(node: MentionNode | LexicalNode | null | undefined): node is MentionNode;