@codemirror/autocomplete
Advanced tools
Comparing version 0.18.5 to 0.18.6
@@ -0,1 +1,11 @@ | ||
## 0.18.6 (2021-06-03) | ||
### Bug fixes | ||
Adding or reconfiguring completion sources will now cause them to be activated right away if a completion was active. | ||
### New features | ||
You can now specify multiple types in `Completion.type` by separating them by spaces. Small doc comment tweak for Completion.type | ||
## 0.18.5 (2021-04-23) | ||
@@ -2,0 +12,0 @@ |
@@ -69,2 +69,4 @@ import { EditorState, Transaction, StateCommand, Facet, Extension } from '@codemirror/state'; | ||
`property`, `text`, `type`, and `variable`. | ||
Multiple types can be provided by separating them with spaces. | ||
*/ | ||
@@ -71,0 +73,0 @@ type?: string; |
@@ -405,3 +405,3 @@ import { Facet, combineConfig, StateEffect, StateField, Transaction, Text, EditorSelection, Prec, CharCategory } from '@codemirror/state'; | ||
if (completion.type) | ||
icon.classList.add("cm-completionIcon-" + completion.type); | ||
icon.classList.add(...completion.type.split(/\s+/g).map(cls => "cm-completionIcon-" + cls)); | ||
icon.setAttribute("aria-hidden", "true"); | ||
@@ -659,3 +659,4 @@ let labelElt = li.appendChild(document.createElement("span")); | ||
let active = sources.map(source => { | ||
let value = this.active.find(s => s.source == source) || new ActiveSource(source, 0 /* Inactive */, false); | ||
let value = this.active.find(s => s.source == source) || | ||
new ActiveSource(source, this.active.some(a => a.state != 0 /* Inactive */) ? 1 /* Pending */ : 0 /* Inactive */, false); | ||
return value.update(tr, conf); | ||
@@ -662,0 +663,0 @@ }); |
{ | ||
"name": "@codemirror/autocomplete", | ||
"version": "0.18.5", | ||
"version": "0.18.6", | ||
"description": "Autocompletion for the CodeMirror code editor", | ||
"scripts": { | ||
"test": "echo 'Test runner in wrapper package'", | ||
"test": "cm-runtests", | ||
"prepare": "cm-buildhelper src/index.ts" | ||
@@ -37,6 +37,3 @@ }, | ||
"devDependencies": { | ||
"@codemirror/buildhelper": "^0.1.0", | ||
"@types/mocha": "^5.2.0", | ||
"ist": "^1.1.6", | ||
"mocha": "^7.1.1" | ||
"@codemirror/buildhelper": "^0.1.5" | ||
}, | ||
@@ -43,0 +40,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
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
124445
1
2892