@codemirror/view
Advanced tools
Comparing version 0.19.24 to 0.19.25
@@ -0,1 +1,15 @@ | ||
## 0.19.25 (2021-12-02) | ||
### Bug fixes | ||
Widgets around replaced ranges are now visible when their side does not point towards the replaced range. | ||
A replaced line with a line decoration no longer creates an extra empty line block in the editor. | ||
The `scrollPastEnd` extension will now over-reserve space at the bottom of the editor on startup, to prevent restored scroll positions from being clipped. | ||
### New features | ||
`EditorView.editorAttributes` and `contentAttributes` may now hold functions that produce the attributes. | ||
## 0.19.24 (2021-12-01) | ||
@@ -2,0 +16,0 @@ |
@@ -434,2 +434,3 @@ import * as _codemirror_rangeset from '@codemirror/rangeset'; | ||
} | ||
declare type AttrSource = Attrs | ((view: EditorView) => Attrs | null); | ||
/** | ||
@@ -698,2 +699,3 @@ View [plugins](https://codemirror.net/6/docs/ref/#view.ViewPlugin) are given instances of this | ||
private plugins; | ||
private pluginMap; | ||
private editorAttrs; | ||
@@ -1013,3 +1015,3 @@ private contentAttrs; | ||
*/ | ||
static styleModule: _codemirror_state.Facet<StyleModule, readonly StyleModule[]>; | ||
static styleModule: Facet<StyleModule, readonly StyleModule[]>; | ||
/** | ||
@@ -1035,3 +1037,3 @@ Facet that can be used to add DOM event handlers. The value | ||
*/ | ||
static inputHandler: _codemirror_state.Facet<(view: EditorView, from: number, to: number, text: string) => boolean, readonly ((view: EditorView, from: number, to: number, text: string) => boolean)[]>; | ||
static inputHandler: Facet<(view: EditorView, from: number, to: number, text: string) => boolean, readonly ((view: EditorView, from: number, to: number, text: string) => boolean)[]>; | ||
/** | ||
@@ -1044,3 +1046,3 @@ Allows you to provide a function that should be called when the | ||
*/ | ||
static exceptionSink: _codemirror_state.Facet<(exception: any) => void, readonly ((exception: any) => void)[]>; | ||
static exceptionSink: Facet<(exception: any) => void, readonly ((exception: any) => void)[]>; | ||
/** | ||
@@ -1050,3 +1052,3 @@ A facet that can be used to register a function to be called | ||
*/ | ||
static updateListener: _codemirror_state.Facet<(update: ViewUpdate) => void, readonly ((update: ViewUpdate) => void)[]>; | ||
static updateListener: Facet<(update: ViewUpdate) => void, readonly ((update: ViewUpdate) => void)[]>; | ||
/** | ||
@@ -1060,3 +1062,3 @@ Facet that controls whether the editor content DOM is editable. | ||
*/ | ||
static editable: _codemirror_state.Facet<boolean, boolean>; | ||
static editable: Facet<boolean, boolean>; | ||
/** | ||
@@ -1068,3 +1070,3 @@ Allows you to influence the way mouse selection happens. The | ||
*/ | ||
static mouseSelectionStyle: _codemirror_state.Facet<MakeSelectionStyle, readonly MakeSelectionStyle[]>; | ||
static mouseSelectionStyle: Facet<MakeSelectionStyle, readonly MakeSelectionStyle[]>; | ||
/** | ||
@@ -1076,3 +1078,3 @@ Facet used to configure whether a given selection drag event | ||
*/ | ||
static dragMovesSelection: _codemirror_state.Facet<(event: MouseEvent) => boolean, readonly ((event: MouseEvent) => boolean)[]>; | ||
static dragMovesSelection: Facet<(event: MouseEvent) => boolean, readonly ((event: MouseEvent) => boolean)[]>; | ||
/** | ||
@@ -1082,3 +1084,3 @@ Facet used to configure whether a given selecting click adds | ||
*/ | ||
static clickAddsSelectionRange: _codemirror_state.Facet<(event: MouseEvent) => boolean, readonly ((event: MouseEvent) => boolean)[]>; | ||
static clickAddsSelectionRange: Facet<(event: MouseEvent) => boolean, readonly ((event: MouseEvent) => boolean)[]>; | ||
/** | ||
@@ -1090,3 +1092,3 @@ A facet that determines which [decorations](https://codemirror.net/6/docs/ref/#view.Decoration) | ||
*/ | ||
static decorations: _codemirror_state.Facet<DecorationSet, readonly DecorationSet[]>; | ||
static decorations: Facet<DecorationSet, readonly DecorationSet[]>; | ||
/** | ||
@@ -1129,3 +1131,3 @@ Create a theme extension. The first argument can be a | ||
*/ | ||
static contentAttributes: _codemirror_state.Facet<Attrs, Attrs>; | ||
static contentAttributes: Facet<AttrSource, readonly AttrSource[]>; | ||
/** | ||
@@ -1135,3 +1137,3 @@ Facet that provides DOM attributes for the editor's outer | ||
*/ | ||
static editorAttributes: _codemirror_state.Facet<Attrs, Attrs>; | ||
static editorAttributes: Facet<AttrSource, readonly AttrSource[]>; | ||
/** | ||
@@ -1334,6 +1336,6 @@ An extension that enables line wrapping in the editor (by | ||
/** | ||
Returns a plugin that makes sure the content has a bottom margin | ||
equivalent to the height of the editor, minus one line height, so | ||
that every line in the document can be scrolled to the top of the | ||
editor. | ||
Returns an extension that makes sure the content has a bottom | ||
margin equivalent to the height of the editor, minus one line | ||
height, so that every line in the document can be scrolled to the | ||
top of the editor. | ||
@@ -1340,0 +1342,0 @@ This is only meaningful when the editor is scrollable, and should |
{ | ||
"name": "@codemirror/view", | ||
"version": "0.19.24", | ||
"version": "0.19.25", | ||
"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
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
660601
15905