@codemirror/autocomplete
Advanced tools
Comparing version 6.7.1 to 6.8.0
@@ -0,1 +1,7 @@ | ||
## 6.8.0 (2023-06-12) | ||
### New features | ||
The result of `Completion.info` may now include a `destroy` method that will be called when the tooltip is removed. | ||
## 6.7.1 (2023-05-13) | ||
@@ -2,0 +8,0 @@ |
@@ -26,3 +26,3 @@ import * as _codemirror_state from '@codemirror/state'; | ||
*/ | ||
info?: string | ((completion: Completion) => (Node | null | Promise<Node | null>)); | ||
info?: string | ((completion: Completion) => CompletionInfo | Promise<CompletionInfo>); | ||
/** | ||
@@ -67,2 +67,12 @@ How to apply the completion. The default is to replace it with | ||
/** | ||
The type returned from | ||
[`Completion.info`](https://codemirror.net/6/docs/ref/#autocomplete.Completion.info). May be a DOM | ||
node, null to indicate there is no info, or an object with an | ||
optional `destroy` method that cleans up the node. | ||
*/ | ||
declare type CompletionInfo = Node | null | { | ||
dom: Node; | ||
destroy?(): void; | ||
}; | ||
/** | ||
Object used to describe a completion | ||
@@ -549,2 +559,2 @@ [section](https://codemirror.net/6/docs/ref/#autocomplete.Completion.section). It is recommended to | ||
export { CloseBracketConfig, Completion, CompletionContext, CompletionResult, CompletionSection, CompletionSource, acceptCompletion, autocompletion, clearSnippet, closeBrackets, closeBracketsKeymap, closeCompletion, completeAnyWord, completeFromList, completionKeymap, completionStatus, currentCompletions, deleteBracketPair, hasNextSnippetField, hasPrevSnippetField, ifIn, ifNotIn, insertBracket, insertCompletionText, moveCompletionSelection, nextSnippetField, pickedCompletion, prevSnippetField, selectedCompletion, selectedCompletionIndex, setSelectedCompletion, snippet, snippetCompletion, snippetKeymap, startCompletion }; | ||
export { CloseBracketConfig, Completion, CompletionContext, CompletionInfo, CompletionResult, CompletionSection, CompletionSource, acceptCompletion, autocompletion, clearSnippet, closeBrackets, closeBracketsKeymap, closeCompletion, completeAnyWord, completeFromList, completionKeymap, completionStatus, currentCompletions, deleteBracketPair, hasNextSnippetField, hasPrevSnippetField, ifIn, ifNotIn, insertBracket, insertCompletionText, moveCompletionSelection, nextSnippetField, pickedCompletion, prevSnippetField, selectedCompletion, selectedCompletionIndex, setSelectedCompletion, snippet, snippetCompletion, snippetKeymap, startCompletion }; |
{ | ||
"name": "@codemirror/autocomplete", | ||
"version": "6.7.1", | ||
"version": "6.8.0", | ||
"description": "Autocompletion for the CodeMirror code editor", | ||
@@ -41,3 +41,3 @@ "scripts": { | ||
"devDependencies": { | ||
"@codemirror/buildhelper": "^0.1.5" | ||
"@codemirror/buildhelper": "^1.0.0" | ||
}, | ||
@@ -44,0 +44,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
224930
9
4455