@codemirror/tooltip
Advanced tools
Comparing version 0.19.1 to 0.19.2
@@ -0,1 +1,7 @@ | ||
## 0.19.2 (2021-09-01) | ||
### Bug fixes | ||
Fix accidental assignment to const. | ||
## 0.19.1 (2021-08-30) | ||
@@ -2,0 +8,0 @@ |
@@ -17,4 +17,4 @@ import { ViewPlugin, Direction, EditorView, logException } from '@codemirror/view'; | ||
update(update) { | ||
const input = update.state.facet(this.facet); | ||
const tooltips = input.filter(x => x); | ||
let input = update.state.facet(this.facet); | ||
let tooltips = input.filter(x => x); | ||
if (input === this.input) { | ||
@@ -72,3 +72,3 @@ for (let t of this.tooltipViews) | ||
update(update) { | ||
const { shouldMeasure } = this.manager.update(update); | ||
let { shouldMeasure } = this.manager.update(update); | ||
let newPosition = update.state.facet(tooltipPositioning); | ||
@@ -197,3 +197,3 @@ if (newPosition != this.position) { | ||
createHostedView(tooltip) { | ||
const hostedView = tooltip.create(this.view); | ||
let hostedView = tooltip.create(this.view); | ||
hostedView.dom.classList.add("cm-tooltip-section"); | ||
@@ -206,3 +206,3 @@ this.dom.appendChild(hostedView.dom); | ||
mount(view) { | ||
for (const hostedView of this.manager.tooltipViews) { | ||
for (let hostedView of this.manager.tooltipViews) { | ||
if (hostedView.mount) | ||
@@ -214,3 +214,3 @@ hostedView.mount(view); | ||
positioned() { | ||
for (const hostedView of this.manager.tooltipViews) { | ||
for (let hostedView of this.manager.tooltipViews) { | ||
if (hostedView.positioned) | ||
@@ -225,3 +225,3 @@ hostedView.positioned(); | ||
const showHoverTooltipHost = /*@__PURE__*/showTooltip.compute([showHoverTooltip], state => { | ||
const tooltips = state.facet(showHoverTooltip).filter(t => t); | ||
let tooltips = state.facet(showHoverTooltip).filter(t => t); | ||
if (tooltips.length === 0) | ||
@@ -366,4 +366,4 @@ return null; | ||
function hoverTooltip(source, options = {}) { | ||
const setHover = StateEffect.define(); | ||
const hoverState = StateField.define({ | ||
let setHover = StateEffect.define(); | ||
let hoverState = StateField.define({ | ||
create() { return null; }, | ||
@@ -370,0 +370,0 @@ update(value, tr) { |
{ | ||
"name": "@codemirror/tooltip", | ||
"version": "0.19.1", | ||
"version": "0.19.2", | ||
"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
39673