@codemirror/tooltip
Advanced tools
Comparing version 0.17.2 to 0.18.0
@@ -0,1 +1,7 @@ | ||
## 0.18.0 (2021-03-03) | ||
### Breaking changes | ||
Extra CSS classes for tooltips must now be specified with the `class` option. The `style` option no longer exists. | ||
## 0.17.2 (2021-01-14) | ||
@@ -2,0 +8,0 @@ |
@@ -9,3 +9,3 @@ import { EditorView, ViewUpdate } from '@codemirror/view'; | ||
create(view: EditorView): TooltipView; | ||
style?: string; | ||
class?: string; | ||
above?: boolean; | ||
@@ -12,0 +12,0 @@ strictSide?: boolean; |
@@ -1,2 +0,2 @@ | ||
import { ViewPlugin, themeClass, Direction, EditorView } from '@codemirror/view'; | ||
import { ViewPlugin, Direction, EditorView } from '@codemirror/view'; | ||
import { Facet, StateEffect, StateField, MapMode } from '@codemirror/state'; | ||
@@ -49,3 +49,5 @@ | ||
let tooltipView = tooltip.create(this.view); | ||
tooltipView.dom.className = themeClass("tooltip" + (tooltip.style ? "." + tooltip.style : "")); | ||
tooltipView.dom.classList.add("cm-tooltip"); | ||
if (tooltip.class) | ||
tooltipView.dom.classList.add(tooltip.class); | ||
this.view.dom.appendChild(tooltipView.dom); | ||
@@ -114,3 +116,3 @@ if (tooltipView.mount) | ||
const baseTheme = EditorView.baseTheme({ | ||
$tooltip: { | ||
".cm-tooltip": { | ||
position: "fixed", | ||
@@ -117,0 +119,0 @@ border: "1px solid #ddd", |
{ | ||
"name": "@codemirror/tooltip", | ||
"version": "0.17.2", | ||
"version": "0.18.0", | ||
"description": "Tooltip support for the CodeMirror code editor", | ||
@@ -29,4 +29,4 @@ "scripts": { | ||
"dependencies": { | ||
"@codemirror/state": "^0.17.0", | ||
"@codemirror/view": "^0.17.0" | ||
"@codemirror/state": "^0.18.0", | ||
"@codemirror/view": "^0.18.0" | ||
}, | ||
@@ -33,0 +33,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
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
49620
551
+ Added@codemirror/rangeset@0.18.5(transitive)
+ Added@codemirror/state@0.18.7(transitive)
+ Added@codemirror/text@0.18.1(transitive)
+ Added@codemirror/view@0.18.19(transitive)
+ Addedstyle-mod@4.1.2(transitive)
- Removed@codemirror/rangeset@0.17.1(transitive)
- Removed@codemirror/state@0.17.2(transitive)
- Removed@codemirror/text@0.17.2(transitive)
- Removed@codemirror/view@0.17.13(transitive)
- Removedstyle-mod@3.2.2(transitive)
Updated@codemirror/state@^0.18.0
Updated@codemirror/view@^0.18.0