@codemirror/view 0.19.28 → 0.19.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/dist/index.cjs +302 -162
- package/dist/index.d.ts +21 -1
- package/dist/index.js +303 -164
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -919,6 +919,11 @@ declare class EditorView {
|
|
|
919
919
|
Find the DOM parent node and offset (child offset if `node` is
|
|
920
920
|
an element, character offset when it is a text node) at the
|
|
921
921
|
given document position.
|
|
922
|
+
|
|
923
|
+
Note that for positions that aren't currently in
|
|
924
|
+
`visibleRanges`, the resulting DOM position isn't necessarily
|
|
925
|
+
meaningful (it may just point before or after a placeholder
|
|
926
|
+
element).
|
|
922
927
|
*/
|
|
923
928
|
domAtPos(pos: number): {
|
|
924
929
|
node: Node;
|
|
@@ -1286,6 +1291,12 @@ content).
|
|
|
1286
1291
|
*/
|
|
1287
1292
|
declare function drawSelection(config?: SelectionConfig): Extension;
|
|
1288
1293
|
|
|
1294
|
+
/**
|
|
1295
|
+
Draws a cursor at the current drop position when something is
|
|
1296
|
+
dragged over the editor.
|
|
1297
|
+
*/
|
|
1298
|
+
declare function dropCursor(): Extension;
|
|
1299
|
+
|
|
1289
1300
|
interface SpecialCharConfig {
|
|
1290
1301
|
/**
|
|
1291
1302
|
An optional function that renders the placeholder elements.
|
|
@@ -1357,6 +1368,7 @@ declare class MatchDecorator {
|
|
|
1357
1368
|
private regexp;
|
|
1358
1369
|
private getDeco;
|
|
1359
1370
|
private boundary;
|
|
1371
|
+
private maxLength;
|
|
1360
1372
|
/**
|
|
1361
1373
|
Create a decorator.
|
|
1362
1374
|
*/
|
|
@@ -1379,6 +1391,14 @@ declare class MatchDecorator {
|
|
|
1379
1391
|
the amount of re-matching.
|
|
1380
1392
|
*/
|
|
1381
1393
|
boundary?: RegExp;
|
|
1394
|
+
/**
|
|
1395
|
+
Matching happens by line, by default, but when lines are
|
|
1396
|
+
folded or very long lines are only partially drawn, the
|
|
1397
|
+
decorator may avoid matching part of them for speed. This
|
|
1398
|
+
controls how much additional invisible content it should
|
|
1399
|
+
include in its matches. Defaults to 1000.
|
|
1400
|
+
*/
|
|
1401
|
+
maxLength?: number;
|
|
1382
1402
|
});
|
|
1383
1403
|
/**
|
|
1384
1404
|
Compute the full set of decorations for matches in the given
|
|
@@ -1395,4 +1415,4 @@ declare class MatchDecorator {
|
|
|
1395
1415
|
private updateRange;
|
|
1396
1416
|
}
|
|
1397
1417
|
|
|
1398
|
-
export { BidiSpan, BlockInfo, BlockType, Command, DOMEventHandlers, DOMEventMap, Decoration, DecorationSet, Direction, EditorView, KeyBinding, MatchDecorator, MouseSelectionStyle, PluginField, PluginFieldProvider, PluginSpec, PluginValue, Rect, ViewPlugin, ViewUpdate, WidgetType, drawSelection, highlightActiveLine, highlightSpecialChars, keymap, logException, placeholder, runScopeHandlers, scrollPastEnd };
|
|
1418
|
+
export { BidiSpan, BlockInfo, BlockType, Command, DOMEventHandlers, DOMEventMap, Decoration, DecorationSet, Direction, EditorView, KeyBinding, MatchDecorator, MouseSelectionStyle, PluginField, PluginFieldProvider, PluginSpec, PluginValue, Rect, ViewPlugin, ViewUpdate, WidgetType, drawSelection, dropCursor, highlightActiveLine, highlightSpecialChars, keymap, logException, placeholder, runScopeHandlers, scrollPastEnd };
|