@codemirror/view
Advanced tools
Comparing version 0.18.3 to 0.18.4
@@ -0,1 +1,13 @@ | ||
## 0.18.4 (2021-04-07) | ||
### Bug fixes | ||
Fix an issue where the default focus ring gets obscured by the gutters and active line. | ||
Fix an issue where the editor believed Chrome Android didn't support the CSS `tab-size` style. | ||
Don't style active lines when there are non-empty selection ranges, so that the active line background doesn't obscure the selection. | ||
Make iOS autocapitalize update properly when you press Enter. | ||
## 0.18.3 (2021-03-19) | ||
@@ -2,0 +14,0 @@ |
@@ -323,7 +323,8 @@ import { RangeSet, RangeValue, Range } from '@codemirror/rangeset'; | ||
after the viewport is computed), decorations produced by plugins | ||
are _not_ taken into account when predicting the vertical | ||
layout structure of the editor. Thus, things like large widgets | ||
or big replacements (i.e. code folding) should be provided | ||
through the state-level [`decorations` | ||
facet](https://codemirror.net/6/docs/ref/#view.EditorView^decorations), not this plugin field. | ||
are _not_ taken into account when predicting the vertical layout | ||
structure of the editor. Thus, things like large widgets or big | ||
replacements (i.e. code folding) should be provided through the | ||
state-level [`decorations` facet](https://codemirror.net/6/docs/ref/#view.EditorView^decorations), | ||
not this plugin field. Specifically, replacing decorations that | ||
cross line boundaries will break if provided through a plugin. | ||
*/ | ||
@@ -734,8 +735,12 @@ static decorations: PluginField<DecorationSet>; | ||
Find the line or block widget at the given vertical position. | ||
`editorTop`, if given, provides the vertical position of the top | ||
of the editor. It defaults to the editor's screen position | ||
(which will force a DOM layout). You can explicitly pass 0 to | ||
use editor-relative offsets. | ||
By default, this position is interpreted as a screen position, | ||
meaning `docTop` is set to the DOM top position of the editor | ||
content (forcing a layout). You can pass a different `docTop` | ||
value—for example 0 to interpret `height` as a document-relative | ||
position, or a precomputed document top | ||
(`view.contentDOM.getBoundingClientRect().top`) to limit layout | ||
queries. | ||
*/ | ||
blockAtHeight(height: number, editorTop?: number): BlockInfo; | ||
blockAtHeight(height: number, docTop?: number): BlockInfo; | ||
/** | ||
@@ -748,12 +753,14 @@ Find information for the visual line (see | ||
Heights are interpreted relative to the given `editorTop` | ||
position. When not given, the top position of the editor's | ||
[content element](https://codemirror.net/6/docs/ref/#view.EditorView.contentDOM) is taken. | ||
Defaults to treating `height` as a screen position. See | ||
[`blockAtHeight`](https://codemirror.net/6/docs/ref/#view.EditorView.blockAtHeight) for the | ||
interpretation of the `docTop` parameter. | ||
*/ | ||
visualLineAtHeight(height: number, editorTop?: number): BlockInfo; | ||
visualLineAtHeight(height: number, docTop?: number): BlockInfo; | ||
/** | ||
Iterate over the height information of the visual lines in the | ||
viewport. | ||
viewport. The heights of lines are reported relative to the | ||
given document top, which defaults to the screen position of the | ||
document (forcing a layout). | ||
*/ | ||
viewportLines(f: (line: BlockInfo) => void, editorTop?: number): void; | ||
viewportLines(f: (line: BlockInfo) => void, docTop?: number): void; | ||
/** | ||
@@ -766,3 +773,3 @@ Find the extent and height of the visual line (the content shown | ||
Vertical positions are computed relative to the `editorTop` | ||
Vertical positions are computed relative to the `docTop` | ||
argument, which defaults to 0 for this method. You can pass | ||
@@ -772,3 +779,3 @@ `view.contentDOM.getBoundingClientRect().top` here to get screen | ||
*/ | ||
visualLineAt(pos: number, editorTop?: number): BlockInfo; | ||
visualLineAt(pos: number, docTop?: number): BlockInfo; | ||
/** | ||
@@ -775,0 +782,0 @@ The editor's total content height. |
{ | ||
"name": "@codemirror/view", | ||
"version": "0.18.3", | ||
"version": "0.18.4", | ||
"description": "DOM view component for the CodeMirror code editor", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
577884
14344