1- import React , { CSSProperties , HTMLAttributes } from 'react' ;
2- import { Editor } from '@tiptap/core' ;
3- import { EditorContentProps , UseEditorOptions } from '@tiptap/react' ;
1+ import React$1 , { CSSProperties , HTMLAttributes } from 'react' ;
2+ import { Editor , JSONContent } from '@tiptap/core' ;
3+ import { EditorContentProps , UseEditorOptions , NodeViewProps } from '@tiptap/react' ;
44
55interface Tag {
66 type : 'tag'
77 attrs : {
88 id ?: string
99 label ?: string
10- class ?: string | string [ ]
10+ className ?: string
1111 style ?: CSSProperties
12- [ key : string ] : string | string [ ] | CSSProperties | undefined
12+ [ key : string ] : string | CSSProperties | undefined
1313 }
1414}
1515
@@ -25,7 +25,7 @@ interface MixInputProps extends HTMLAttributes<HTMLDivElement>, Omit<EditorConte
2525 tagClassName ?: string
2626 editorOptions ?: UseEditorOptions
2727 tagAttrs ?: Record < string , string | undefined >
28- tagEventHandlers ?: Record < string , ( event : Event , view : Editor ) => void >
28+ tagView ?: ( props : NodeViewProps ) => React . ReactNode
2929 // multiline?: boolean
3030 // showTagDeleteBtn?: boolean
3131}
@@ -36,6 +36,9 @@ interface MixInputRef {
3636 insertContent : ( content : MixInputValue | MixInputValue [ ] ) => void
3737}
3838
39- declare const MixInput : React . ForwardRefExoticComponent < Omit < MixInputProps , "ref" > & React . RefAttributes < MixInputRef > > ;
39+ declare const MixInput : React$1 . ForwardRefExoticComponent < Omit < MixInputProps , "ref" > & React$1 . RefAttributes < MixInputRef > > ;
4040
41- export { type MixInputProps , type MixInputRef , type MixInputValue , type MixInputValues , type Tag , MixInput as default } ;
41+ declare function editorValueToMixInputValue ( value : JSONContent [ ] ) : MixInputValues ;
42+ declare function mixInputValueToEditorValue ( mixInputValues : MixInputValue [ ] | MixInputValue [ ] [ ] ) : JSONContent [ ] ;
43+
44+ export { type MixInputProps , type MixInputRef , type MixInputValue , type MixInputValues , type Tag , MixInput as default , editorValueToMixInputValue , mixInputValueToEditorValue } ;
0 commit comments