Socket
Socket
Sign inDemoInstall

@codemirror/tooltip

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/tooltip - npm Package Compare versions

Comparing version 0.19.11 to 0.19.12

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 0.19.12 (2022-01-11)
### New features
The new `getTooltip` function can retrieve the active tooltip view from a tooltip object.
## 0.19.11 (2022-01-11)

@@ -2,0 +8,0 @@

6

dist/index.d.ts

@@ -136,2 +136,6 @@ import { EditorView, ViewUpdate } from '@codemirror/view';

/**
Get the active tooltip view for a given tooltip, if available.
*/
declare function getTooltip(view: EditorView, tooltip: Tooltip): TooltipView | null;
/**
Returns true if any hover tooltips are currently active.

@@ -152,2 +156,2 @@ */

export { Tooltip, TooltipView, closeHoverTooltips, hasHoverTooltips, hoverTooltip, repositionTooltips, showTooltip, tooltips };
export { Tooltip, TooltipView, closeHoverTooltips, getTooltip, hasHoverTooltips, hoverTooltip, repositionTooltips, showTooltip, tooltips };

@@ -526,2 +526,12 @@ import { ViewPlugin, Direction, EditorView, logException } from '@codemirror/view';

/**
Get the active tooltip view for a given tooltip, if available.
*/
function getTooltip(view, tooltip) {
let plugin = view.plugin(tooltipPlugin);
if (!plugin)
return null;
let found = plugin.manager.tooltips.indexOf(tooltip);
return found < 0 ? null : plugin.manager.tooltipViews[found];
}
/**
Returns true if any hover tooltips are currently active.

@@ -548,2 +558,2 @@ */

export { closeHoverTooltips, hasHoverTooltips, hoverTooltip, repositionTooltips, showTooltip, tooltips };
export { closeHoverTooltips, getTooltip, hasHoverTooltips, hoverTooltip, repositionTooltips, showTooltip, tooltips };

2

package.json
{
"name": "@codemirror/tooltip",
"version": "0.19.11",
"version": "0.19.12",
"description": "Tooltip support for the CodeMirror code editor",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc