@codemirror/autocomplete
Advanced tools
Comparing version 0.20.1 to 0.20.2
@@ -0,1 +1,7 @@ | ||
## 0.20.2 (2022-05-24) | ||
### New features | ||
The package now exports an `insertCompletionText` helper that implements the default behavior for applying a completion. | ||
## 0.20.1 (2022-05-16) | ||
@@ -2,0 +8,0 @@ |
import * as _codemirror_state from '@codemirror/state'; | ||
import { EditorState, Transaction, StateCommand, Facet, Extension, StateEffect } from '@codemirror/state'; | ||
import { EditorState, TransactionSpec, Transaction, StateCommand, Facet, Extension, StateEffect } from '@codemirror/state'; | ||
import { EditorView, KeyBinding, Command } from '@codemirror/view'; | ||
@@ -273,2 +273,8 @@ import * as _lezer_common from '@lezer/common'; | ||
declare const pickedCompletion: _codemirror_state.AnnotationType<Completion>; | ||
/** | ||
Helper function that returns a transaction spec which inserts a | ||
completion's text in the main selection range, and any other | ||
selection range that has the same text in front of it. | ||
*/ | ||
declare function insertCompletionText(state: EditorState, text: string, from: number, to: number): TransactionSpec; | ||
@@ -449,2 +455,2 @@ /** | ||
export { CloseBracketConfig, Completion, CompletionContext, CompletionResult, CompletionSource, acceptCompletion, autocompletion, clearSnippet, closeBrackets, closeBracketsKeymap, closeCompletion, completeAnyWord, completeFromList, completionKeymap, completionStatus, currentCompletions, deleteBracketPair, ifIn, ifNotIn, insertBracket, moveCompletionSelection, nextSnippetField, pickedCompletion, prevSnippetField, selectedCompletion, selectedCompletionIndex, setSelectedCompletion, snippet, snippetCompletion, snippetKeymap, startCompletion }; | ||
export { CloseBracketConfig, Completion, CompletionContext, CompletionResult, CompletionSource, acceptCompletion, autocompletion, clearSnippet, closeBrackets, closeBracketsKeymap, closeCompletion, completeAnyWord, completeFromList, completionKeymap, completionStatus, currentCompletions, deleteBracketPair, ifIn, ifNotIn, insertBracket, insertCompletionText, moveCompletionSelection, nextSnippetField, pickedCompletion, prevSnippetField, selectedCompletion, selectedCompletionIndex, setSelectedCompletion, snippet, snippetCompletion, snippetKeymap, startCompletion }; |
{ | ||
"name": "@codemirror/autocomplete", | ||
"version": "0.20.1", | ||
"version": "0.20.2", | ||
"description": "Autocompletion for the CodeMirror code editor", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
172474
3913