@codemirror/tooltip
Advanced tools
Comparing version 0.19.14 to 0.19.15
@@ -0,1 +1,11 @@ | ||
## 0.19.15 (2022-02-18) | ||
### Bug fixes | ||
The default hover time has been reduced from 600 to 300 milliseconds. | ||
### New features | ||
`hoverTooltip` now takes a `hoverTime` option, which can be used to control how long the user must hover to see the tooltip. | ||
## 0.19.14 (2022-02-14) | ||
@@ -2,0 +12,0 @@ |
@@ -139,3 +139,12 @@ import { EditorView, ViewUpdate } from '@codemirror/view'; | ||
declare function hoverTooltip(source: (view: EditorView, pos: number, side: -1 | 1) => Tooltip | null | Promise<Tooltip | null>, options?: { | ||
/** | ||
When enabled (this defaults to false), close the tooltip | ||
whenever the document changes. | ||
*/ | ||
hideOnChange?: boolean; | ||
/** | ||
Hover time after which the tooltip should appear, in | ||
milliseconds. Defaults to 300ms. | ||
*/ | ||
hoverTime?: number; | ||
}): Extension; | ||
@@ -142,0 +151,0 @@ /** |
@@ -520,6 +520,5 @@ import { ViewPlugin, Direction, EditorView, logException } from '@codemirror/view'; | ||
}); | ||
let hoverTime = options.hoverTime || 600 /* Time */; | ||
return [ | ||
hoverState, | ||
ViewPlugin.define(view => new HoverPlugin(view, source, hoverState, setHover, hoverTime)), | ||
ViewPlugin.define(view => new HoverPlugin(view, source, hoverState, setHover, options.hoverTime || 300 /* Time */)), | ||
showHoverTooltipHost | ||
@@ -526,0 +525,0 @@ ]; |
{ | ||
"name": "@codemirror/tooltip", | ||
"version": "0.19.14", | ||
"version": "0.19.15", | ||
"description": "Tooltip support for the CodeMirror code editor", | ||
@@ -5,0 +5,0 @@ "scripts": { |
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
58750
1284