@tiptap/suggestion 3.0.0-next.0 → 3.0.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/dist/index.cjs +271 -233
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/{packages/suggestion/src/suggestion.d.ts → index.d.cts} +33 -10
  4. package/dist/index.d.ts +176 -0
  5. package/dist/index.js +244 -228
  6. package/dist/index.js.map +1 -1
  7. package/package.json +8 -10
  8. package/src/findSuggestionMatch.ts +7 -3
  9. package/src/suggestion.ts +11 -3
  10. package/dist/index.umd.js +0 -246
  11. package/dist/index.umd.js.map +0 -1
  12. package/dist/packages/core/src/CommandManager.d.ts +0 -20
  13. package/dist/packages/core/src/Editor.d.ts +0 -159
  14. package/dist/packages/core/src/EventEmitter.d.ts +0 -11
  15. package/dist/packages/core/src/Extension.d.ts +0 -343
  16. package/dist/packages/core/src/ExtensionManager.d.ts +0 -55
  17. package/dist/packages/core/src/InputRule.d.ts +0 -42
  18. package/dist/packages/core/src/Mark.d.ts +0 -451
  19. package/dist/packages/core/src/Node.d.ts +0 -611
  20. package/dist/packages/core/src/NodePos.d.ts +0 -44
  21. package/dist/packages/core/src/NodeView.d.ts +0 -31
  22. package/dist/packages/core/src/PasteRule.d.ts +0 -50
  23. package/dist/packages/core/src/Tracker.d.ts +0 -11
  24. package/dist/packages/core/src/commands/blur.d.ts +0 -13
  25. package/dist/packages/core/src/commands/clearContent.d.ts +0 -14
  26. package/dist/packages/core/src/commands/clearNodes.d.ts +0 -13
  27. package/dist/packages/core/src/commands/command.d.ts +0 -18
  28. package/dist/packages/core/src/commands/createParagraphNear.d.ts +0 -13
  29. package/dist/packages/core/src/commands/cut.d.ts +0 -20
  30. package/dist/packages/core/src/commands/deleteCurrentNode.d.ts +0 -13
  31. package/dist/packages/core/src/commands/deleteNode.d.ts +0 -15
  32. package/dist/packages/core/src/commands/deleteRange.d.ts +0 -14
  33. package/dist/packages/core/src/commands/deleteSelection.d.ts +0 -13
  34. package/dist/packages/core/src/commands/enter.d.ts +0 -13
  35. package/dist/packages/core/src/commands/exitCode.d.ts +0 -13
  36. package/dist/packages/core/src/commands/extendMarkRange.d.ts +0 -25
  37. package/dist/packages/core/src/commands/first.d.ts +0 -14
  38. package/dist/packages/core/src/commands/focus.d.ts +0 -27
  39. package/dist/packages/core/src/commands/forEach.d.ts +0 -14
  40. package/dist/packages/core/src/commands/index.d.ts +0 -55
  41. package/dist/packages/core/src/commands/insertContent.d.ts +0 -34
  42. package/dist/packages/core/src/commands/insertContentAt.d.ts +0 -47
  43. package/dist/packages/core/src/commands/join.d.ts +0 -41
  44. package/dist/packages/core/src/commands/joinItemBackward.d.ts +0 -13
  45. package/dist/packages/core/src/commands/joinItemForward.d.ts +0 -13
  46. package/dist/packages/core/src/commands/joinTextblockBackward.d.ts +0 -12
  47. package/dist/packages/core/src/commands/joinTextblockForward.d.ts +0 -12
  48. package/dist/packages/core/src/commands/keyboardShortcut.d.ts +0 -14
  49. package/dist/packages/core/src/commands/lift.d.ts +0 -17
  50. package/dist/packages/core/src/commands/liftEmptyBlock.d.ts +0 -13
  51. package/dist/packages/core/src/commands/liftListItem.d.ts +0 -15
  52. package/dist/packages/core/src/commands/newlineInCode.d.ts +0 -13
  53. package/dist/packages/core/src/commands/resetAttributes.d.ts +0 -16
  54. package/dist/packages/core/src/commands/scrollIntoView.d.ts +0 -13
  55. package/dist/packages/core/src/commands/selectAll.d.ts +0 -13
  56. package/dist/packages/core/src/commands/selectNodeBackward.d.ts +0 -13
  57. package/dist/packages/core/src/commands/selectNodeForward.d.ts +0 -13
  58. package/dist/packages/core/src/commands/selectParentNode.d.ts +0 -13
  59. package/dist/packages/core/src/commands/selectTextblockEnd.d.ts +0 -13
  60. package/dist/packages/core/src/commands/selectTextblockStart.d.ts +0 -13
  61. package/dist/packages/core/src/commands/setContent.d.ts +0 -40
  62. package/dist/packages/core/src/commands/setMark.d.ts +0 -15
  63. package/dist/packages/core/src/commands/setMeta.d.ts +0 -15
  64. package/dist/packages/core/src/commands/setNode.d.ts +0 -16
  65. package/dist/packages/core/src/commands/setNodeSelection.d.ts +0 -14
  66. package/dist/packages/core/src/commands/setTextSelection.d.ts +0 -14
  67. package/dist/packages/core/src/commands/sinkListItem.d.ts +0 -15
  68. package/dist/packages/core/src/commands/splitBlock.d.ts +0 -17
  69. package/dist/packages/core/src/commands/splitListItem.d.ts +0 -15
  70. package/dist/packages/core/src/commands/toggleList.d.ts +0 -18
  71. package/dist/packages/core/src/commands/toggleMark.d.ts +0 -30
  72. package/dist/packages/core/src/commands/toggleNode.d.ts +0 -17
  73. package/dist/packages/core/src/commands/toggleWrap.d.ts +0 -16
  74. package/dist/packages/core/src/commands/undoInputRule.d.ts +0 -13
  75. package/dist/packages/core/src/commands/unsetAllMarks.d.ts +0 -13
  76. package/dist/packages/core/src/commands/unsetMark.d.ts +0 -25
  77. package/dist/packages/core/src/commands/updateAttributes.d.ts +0 -24
  78. package/dist/packages/core/src/commands/wrapIn.d.ts +0 -16
  79. package/dist/packages/core/src/commands/wrapInList.d.ts +0 -16
  80. package/dist/packages/core/src/extensions/clipboardTextSerializer.d.ts +0 -5
  81. package/dist/packages/core/src/extensions/commands.d.ts +0 -3
  82. package/dist/packages/core/src/extensions/editable.d.ts +0 -2
  83. package/dist/packages/core/src/extensions/focusEvents.d.ts +0 -2
  84. package/dist/packages/core/src/extensions/index.d.ts +0 -6
  85. package/dist/packages/core/src/extensions/keymap.d.ts +0 -2
  86. package/dist/packages/core/src/extensions/tabindex.d.ts +0 -2
  87. package/dist/packages/core/src/helpers/combineTransactionSteps.d.ts +0 -10
  88. package/dist/packages/core/src/helpers/createChainableState.d.ts +0 -10
  89. package/dist/packages/core/src/helpers/createDocument.d.ts +0 -12
  90. package/dist/packages/core/src/helpers/createNodeFromContent.d.ts +0 -15
  91. package/dist/packages/core/src/helpers/defaultBlockAt.d.ts +0 -7
  92. package/dist/packages/core/src/helpers/findChildren.d.ts +0 -9
  93. package/dist/packages/core/src/helpers/findChildrenInRange.d.ts +0 -10
  94. package/dist/packages/core/src/helpers/findParentNode.d.ts +0 -16
  95. package/dist/packages/core/src/helpers/findParentNodeClosestToPos.d.ts +0 -17
  96. package/dist/packages/core/src/helpers/generateHTML.d.ts +0 -8
  97. package/dist/packages/core/src/helpers/generateJSON.d.ts +0 -8
  98. package/dist/packages/core/src/helpers/generateText.d.ts +0 -12
  99. package/dist/packages/core/src/helpers/getAttributes.d.ts +0 -9
  100. package/dist/packages/core/src/helpers/getAttributesFromExtensions.d.ts +0 -6
  101. package/dist/packages/core/src/helpers/getChangedRanges.d.ts +0 -11
  102. package/dist/packages/core/src/helpers/getDebugJSON.d.ts +0 -8
  103. package/dist/packages/core/src/helpers/getExtensionField.d.ts +0 -9
  104. package/dist/packages/core/src/helpers/getHTMLFromFragment.d.ts +0 -2
  105. package/dist/packages/core/src/helpers/getMarkAttributes.d.ts +0 -3
  106. package/dist/packages/core/src/helpers/getMarkRange.d.ts +0 -3
  107. package/dist/packages/core/src/helpers/getMarkType.d.ts +0 -2
  108. package/dist/packages/core/src/helpers/getMarksBetween.d.ts +0 -3
  109. package/dist/packages/core/src/helpers/getNodeAtPosition.d.ts +0 -11
  110. package/dist/packages/core/src/helpers/getNodeAttributes.d.ts +0 -3
  111. package/dist/packages/core/src/helpers/getNodeType.d.ts +0 -2
  112. package/dist/packages/core/src/helpers/getRenderedAttributes.d.ts +0 -3
  113. package/dist/packages/core/src/helpers/getSchema.d.ts +0 -4
  114. package/dist/packages/core/src/helpers/getSchemaByResolvedExtensions.d.ts +0 -10
  115. package/dist/packages/core/src/helpers/getSchemaTypeByName.d.ts +0 -8
  116. package/dist/packages/core/src/helpers/getSchemaTypeNameByName.d.ts +0 -8
  117. package/dist/packages/core/src/helpers/getSplittedAttributes.d.ts +0 -9
  118. package/dist/packages/core/src/helpers/getText.d.ts +0 -15
  119. package/dist/packages/core/src/helpers/getTextBetween.d.ts +0 -14
  120. package/dist/packages/core/src/helpers/getTextContentFromNodes.d.ts +0 -8
  121. package/dist/packages/core/src/helpers/getTextSerializersFromSchema.d.ts +0 -8
  122. package/dist/packages/core/src/helpers/index.d.ts +0 -50
  123. package/dist/packages/core/src/helpers/injectExtensionAttributesToParseRule.d.ts +0 -9
  124. package/dist/packages/core/src/helpers/isActive.d.ts +0 -2
  125. package/dist/packages/core/src/helpers/isAtEndOfNode.d.ts +0 -2
  126. package/dist/packages/core/src/helpers/isAtStartOfNode.d.ts +0 -2
  127. package/dist/packages/core/src/helpers/isExtensionRulesEnabled.d.ts +0 -2
  128. package/dist/packages/core/src/helpers/isList.d.ts +0 -2
  129. package/dist/packages/core/src/helpers/isMarkActive.d.ts +0 -3
  130. package/dist/packages/core/src/helpers/isNodeActive.d.ts +0 -3
  131. package/dist/packages/core/src/helpers/isNodeEmpty.d.ts +0 -8
  132. package/dist/packages/core/src/helpers/isNodeSelection.d.ts +0 -2
  133. package/dist/packages/core/src/helpers/isTextSelection.d.ts +0 -2
  134. package/dist/packages/core/src/helpers/posToDOMRect.d.ts +0 -2
  135. package/dist/packages/core/src/helpers/resolveFocusPosition.d.ts +0 -4
  136. package/dist/packages/core/src/helpers/selectionToInsertionEnd.d.ts +0 -2
  137. package/dist/packages/core/src/helpers/splitExtensions.d.ts +0 -9
  138. package/dist/packages/core/src/index.d.ts +0 -24
  139. package/dist/packages/core/src/inputRules/index.d.ts +0 -5
  140. package/dist/packages/core/src/inputRules/markInputRule.d.ts +0 -13
  141. package/dist/packages/core/src/inputRules/nodeInputRule.d.ts +0 -23
  142. package/dist/packages/core/src/inputRules/textInputRule.d.ts +0 -10
  143. package/dist/packages/core/src/inputRules/textblockTypeInputRule.d.ts +0 -15
  144. package/dist/packages/core/src/inputRules/wrappingInputRule.d.ts +0 -28
  145. package/dist/packages/core/src/pasteRules/index.d.ts +0 -3
  146. package/dist/packages/core/src/pasteRules/markPasteRule.d.ts +0 -13
  147. package/dist/packages/core/src/pasteRules/nodePasteRule.d.ts +0 -13
  148. package/dist/packages/core/src/pasteRules/textPasteRule.d.ts +0 -10
  149. package/dist/packages/core/src/style.d.ts +0 -1
  150. package/dist/packages/core/src/types.d.ts +0 -253
  151. package/dist/packages/core/src/utilities/callOrReturn.d.ts +0 -9
  152. package/dist/packages/core/src/utilities/createStyleTag.d.ts +0 -1
  153. package/dist/packages/core/src/utilities/deleteProps.d.ts +0 -6
  154. package/dist/packages/core/src/utilities/elementFromString.d.ts +0 -1
  155. package/dist/packages/core/src/utilities/escapeForRegEx.d.ts +0 -1
  156. package/dist/packages/core/src/utilities/findDuplicates.d.ts +0 -1
  157. package/dist/packages/core/src/utilities/fromString.d.ts +0 -1
  158. package/dist/packages/core/src/utilities/index.d.ts +0 -20
  159. package/dist/packages/core/src/utilities/isAndroid.d.ts +0 -1
  160. package/dist/packages/core/src/utilities/isEmptyObject.d.ts +0 -1
  161. package/dist/packages/core/src/utilities/isFunction.d.ts +0 -1
  162. package/dist/packages/core/src/utilities/isMacOS.d.ts +0 -1
  163. package/dist/packages/core/src/utilities/isNumber.d.ts +0 -1
  164. package/dist/packages/core/src/utilities/isPlainObject.d.ts +0 -1
  165. package/dist/packages/core/src/utilities/isRegExp.d.ts +0 -1
  166. package/dist/packages/core/src/utilities/isString.d.ts +0 -1
  167. package/dist/packages/core/src/utilities/isiOS.d.ts +0 -1
  168. package/dist/packages/core/src/utilities/mergeAttributes.d.ts +0 -1
  169. package/dist/packages/core/src/utilities/mergeDeep.d.ts +0 -1
  170. package/dist/packages/core/src/utilities/minMax.d.ts +0 -1
  171. package/dist/packages/core/src/utilities/objectIncludes.d.ts +0 -8
  172. package/dist/packages/core/src/utilities/removeDuplicates.d.ts +0 -8
  173. package/dist/packages/suggestion/src/findSuggestionMatch.d.ts +0 -15
  174. package/dist/packages/suggestion/src/index.d.ts +0 -4
@@ -1,8 +1,24 @@
1
- import { Editor, Range } from '@tiptap/core';
2
- import { EditorState, Plugin, PluginKey } from '@tiptap/pm/state';
1
+ import { Range, Editor } from '@tiptap/core';
2
+ import { PluginKey, EditorState, Plugin } from '@tiptap/pm/state';
3
3
  import { EditorView } from '@tiptap/pm/view';
4
- import { findSuggestionMatch as defaultFindSuggestionMatch } from './findSuggestionMatch.js';
5
- export interface SuggestionOptions<I = any, TSelected = any> {
4
+ import { ResolvedPos } from '@tiptap/pm/model';
5
+
6
+ interface Trigger {
7
+ char: string;
8
+ allowSpaces: boolean;
9
+ allowToIncludeChar: boolean;
10
+ allowedPrefixes: string[] | null;
11
+ startOfLine: boolean;
12
+ $position: ResolvedPos;
13
+ }
14
+ type SuggestionMatch = {
15
+ range: Range;
16
+ query: string;
17
+ text: string;
18
+ } | null;
19
+ declare function findSuggestionMatch(config: Trigger): SuggestionMatch;
20
+
21
+ interface SuggestionOptions<I = any, TSelected = any> {
6
22
  /**
7
23
  * The plugin key for the suggestion plugin.
8
24
  * @default 'suggestion'
@@ -21,11 +37,16 @@ export interface SuggestionOptions<I = any, TSelected = any> {
21
37
  */
22
38
  char?: string;
23
39
  /**
24
- * Allow spaces in the suggestion query.
40
+ * Allow spaces in the suggestion query. Not compatible with `allowToIncludeChar`. Will be disabled if `allowToIncludeChar` is set to `true`.
25
41
  * @default false
26
42
  * @example true
27
43
  */
28
44
  allowSpaces?: boolean;
45
+ /**
46
+ * Allow the character to be included in the suggestion query. Not compatible with `allowSpaces`.
47
+ * @default false
48
+ */
49
+ allowToIncludeChar?: boolean;
29
50
  /**
30
51
  * Allow prefixes in the suggestion query.
31
52
  * @default [' ']
@@ -99,9 +120,9 @@ export interface SuggestionOptions<I = any, TSelected = any> {
99
120
  range: Range;
100
121
  isActive?: boolean;
101
122
  }) => boolean;
102
- findSuggestionMatch?: typeof defaultFindSuggestionMatch;
123
+ findSuggestionMatch?: typeof findSuggestionMatch;
103
124
  }
104
- export interface SuggestionProps<I = any, TSelected = any> {
125
+ interface SuggestionProps<I = any, TSelected = any> {
105
126
  /**
106
127
  * The editor instance.
107
128
  */
@@ -140,14 +161,16 @@ export interface SuggestionProps<I = any, TSelected = any> {
140
161
  */
141
162
  clientRect?: (() => DOMRect | null) | null;
142
163
  }
143
- export interface SuggestionKeyDownProps {
164
+ interface SuggestionKeyDownProps {
144
165
  view: EditorView;
145
166
  event: KeyboardEvent;
146
167
  range: Range;
147
168
  }
148
- export declare const SuggestionPluginKey: PluginKey<any>;
169
+ declare const SuggestionPluginKey: PluginKey<any>;
149
170
  /**
150
171
  * This utility allows you to create suggestions.
151
172
  * @see https://tiptap.dev/api/utilities/suggestion
152
173
  */
153
- export declare function Suggestion<I = any, TSelected = any>({ pluginKey, editor, char, allowSpaces, allowedPrefixes, startOfLine, decorationTag, decorationClass, command, items, render, allow, findSuggestionMatch, }: SuggestionOptions<I, TSelected>): Plugin<any>;
174
+ declare function Suggestion<I = any, TSelected = any>({ pluginKey, editor, char, allowSpaces, allowToIncludeChar, allowedPrefixes, startOfLine, decorationTag, decorationClass, command, items, render, allow, findSuggestionMatch, }: SuggestionOptions<I, TSelected>): Plugin<any>;
175
+
176
+ export { Suggestion, type SuggestionKeyDownProps, type SuggestionMatch, type SuggestionOptions, SuggestionPluginKey, type SuggestionProps, type Trigger, Suggestion as default, findSuggestionMatch };
@@ -0,0 +1,176 @@
1
+ import { Range, Editor } from '@tiptap/core';
2
+ import { PluginKey, EditorState, Plugin } from '@tiptap/pm/state';
3
+ import { EditorView } from '@tiptap/pm/view';
4
+ import { ResolvedPos } from '@tiptap/pm/model';
5
+
6
+ interface Trigger {
7
+ char: string;
8
+ allowSpaces: boolean;
9
+ allowToIncludeChar: boolean;
10
+ allowedPrefixes: string[] | null;
11
+ startOfLine: boolean;
12
+ $position: ResolvedPos;
13
+ }
14
+ type SuggestionMatch = {
15
+ range: Range;
16
+ query: string;
17
+ text: string;
18
+ } | null;
19
+ declare function findSuggestionMatch(config: Trigger): SuggestionMatch;
20
+
21
+ interface SuggestionOptions<I = any, TSelected = any> {
22
+ /**
23
+ * The plugin key for the suggestion plugin.
24
+ * @default 'suggestion'
25
+ * @example 'mention'
26
+ */
27
+ pluginKey?: PluginKey;
28
+ /**
29
+ * The editor instance.
30
+ * @default null
31
+ */
32
+ editor: Editor;
33
+ /**
34
+ * The character that triggers the suggestion.
35
+ * @default '@'
36
+ * @example '#'
37
+ */
38
+ char?: string;
39
+ /**
40
+ * Allow spaces in the suggestion query. Not compatible with `allowToIncludeChar`. Will be disabled if `allowToIncludeChar` is set to `true`.
41
+ * @default false
42
+ * @example true
43
+ */
44
+ allowSpaces?: boolean;
45
+ /**
46
+ * Allow the character to be included in the suggestion query. Not compatible with `allowSpaces`.
47
+ * @default false
48
+ */
49
+ allowToIncludeChar?: boolean;
50
+ /**
51
+ * Allow prefixes in the suggestion query.
52
+ * @default [' ']
53
+ * @example [' ', '@']
54
+ */
55
+ allowedPrefixes?: string[] | null;
56
+ /**
57
+ * Only match suggestions at the start of the line.
58
+ * @default false
59
+ * @example true
60
+ */
61
+ startOfLine?: boolean;
62
+ /**
63
+ * The tag name of the decoration node.
64
+ * @default 'span'
65
+ * @example 'div'
66
+ */
67
+ decorationTag?: string;
68
+ /**
69
+ * The class name of the decoration node.
70
+ * @default 'suggestion'
71
+ * @example 'mention'
72
+ */
73
+ decorationClass?: string;
74
+ /**
75
+ * A function that is called when a suggestion is selected.
76
+ * @param props The props object.
77
+ * @param props.editor The editor instance.
78
+ * @param props.range The range of the suggestion.
79
+ * @param props.props The props of the selected suggestion.
80
+ * @returns void
81
+ * @example ({ editor, range, props }) => { props.command(props.props) }
82
+ */
83
+ command?: (props: {
84
+ editor: Editor;
85
+ range: Range;
86
+ props: TSelected;
87
+ }) => void;
88
+ /**
89
+ * A function that returns the suggestion items in form of an array.
90
+ * @param props The props object.
91
+ * @param props.editor The editor instance.
92
+ * @param props.query The current suggestion query.
93
+ * @returns An array of suggestion items.
94
+ * @example ({ editor, query }) => [{ id: 1, label: 'John Doe' }]
95
+ */
96
+ items?: (props: {
97
+ query: string;
98
+ editor: Editor;
99
+ }) => I[] | Promise<I[]>;
100
+ /**
101
+ * The render function for the suggestion.
102
+ * @returns An object with render functions.
103
+ */
104
+ render?: () => {
105
+ onBeforeStart?: (props: SuggestionProps<I, TSelected>) => void;
106
+ onStart?: (props: SuggestionProps<I, TSelected>) => void;
107
+ onBeforeUpdate?: (props: SuggestionProps<I, TSelected>) => void;
108
+ onUpdate?: (props: SuggestionProps<I, TSelected>) => void;
109
+ onExit?: (props: SuggestionProps<I, TSelected>) => void;
110
+ onKeyDown?: (props: SuggestionKeyDownProps) => boolean;
111
+ };
112
+ /**
113
+ * A function that returns a boolean to indicate if the suggestion should be active.
114
+ * @param props The props object.
115
+ * @returns {boolean}
116
+ */
117
+ allow?: (props: {
118
+ editor: Editor;
119
+ state: EditorState;
120
+ range: Range;
121
+ isActive?: boolean;
122
+ }) => boolean;
123
+ findSuggestionMatch?: typeof findSuggestionMatch;
124
+ }
125
+ interface SuggestionProps<I = any, TSelected = any> {
126
+ /**
127
+ * The editor instance.
128
+ */
129
+ editor: Editor;
130
+ /**
131
+ * The range of the suggestion.
132
+ */
133
+ range: Range;
134
+ /**
135
+ * The current suggestion query.
136
+ */
137
+ query: string;
138
+ /**
139
+ * The current suggestion text.
140
+ */
141
+ text: string;
142
+ /**
143
+ * The suggestion items array.
144
+ */
145
+ items: I[];
146
+ /**
147
+ * A function that is called when a suggestion is selected.
148
+ * @param props The props object.
149
+ * @returns void
150
+ */
151
+ command: (props: TSelected) => void;
152
+ /**
153
+ * The decoration node HTML element
154
+ * @default null
155
+ */
156
+ decorationNode: Element | null;
157
+ /**
158
+ * The function that returns the client rect
159
+ * @default null
160
+ * @example () => new DOMRect(0, 0, 0, 0)
161
+ */
162
+ clientRect?: (() => DOMRect | null) | null;
163
+ }
164
+ interface SuggestionKeyDownProps {
165
+ view: EditorView;
166
+ event: KeyboardEvent;
167
+ range: Range;
168
+ }
169
+ declare const SuggestionPluginKey: PluginKey<any>;
170
+ /**
171
+ * This utility allows you to create suggestions.
172
+ * @see https://tiptap.dev/api/utilities/suggestion
173
+ */
174
+ declare function Suggestion<I = any, TSelected = any>({ pluginKey, editor, char, allowSpaces, allowToIncludeChar, allowedPrefixes, startOfLine, decorationTag, decorationClass, command, items, render, allow, findSuggestionMatch, }: SuggestionOptions<I, TSelected>): Plugin<any>;
175
+
176
+ export { Suggestion, type SuggestionKeyDownProps, type SuggestionMatch, type SuggestionOptions, SuggestionPluginKey, type SuggestionProps, type Trigger, Suggestion as default, findSuggestionMatch };