@codemirror/view 0.19.7 → 0.19.11
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 +54 -0
- package/dist/index.cjs +382 -145
- package/dist/index.d.ts +16 -5
- package/dist/index.js +383 -146
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -119,6 +119,10 @@ interface LineDecorationSpec {
|
|
|
119
119
|
[key: string]: string;
|
|
120
120
|
};
|
|
121
121
|
/**
|
|
122
|
+
Shorthand for `{attributes: {class: value}}`.
|
|
123
|
+
*/
|
|
124
|
+
class?: string;
|
|
125
|
+
/**
|
|
122
126
|
Other properties are allowed.
|
|
123
127
|
*/
|
|
124
128
|
[other: string]: any;
|
|
@@ -452,7 +456,9 @@ declare class ViewUpdate {
|
|
|
452
456
|
*/
|
|
453
457
|
readonly startState: EditorState;
|
|
454
458
|
/**
|
|
455
|
-
Tells you whether the viewport
|
|
459
|
+
Tells you whether the [viewport](https://codemirror.net/6/docs/ref/#view.EditorView.viewport) or
|
|
460
|
+
[visible ranges](https://codemirror.net/6/docs/ref/#view.EditorView.visibleRanges) changed in this
|
|
461
|
+
update.
|
|
456
462
|
*/
|
|
457
463
|
get viewportChanged(): boolean;
|
|
458
464
|
/**
|
|
@@ -597,7 +603,9 @@ interface EditorConfig {
|
|
|
597
603
|
/**
|
|
598
604
|
If the view is going to be mounted in a shadow root or document
|
|
599
605
|
other than the one held by the global variable `document` (the
|
|
600
|
-
default), you should pass it here.
|
|
606
|
+
default), you should pass it here. If you provide `parent`, but
|
|
607
|
+
not this option, the editor will automatically look up a root
|
|
608
|
+
from the parent.
|
|
601
609
|
*/
|
|
602
610
|
root?: Document | ShadowRoot;
|
|
603
611
|
/**
|
|
@@ -688,6 +696,7 @@ declare class EditorView {
|
|
|
688
696
|
private contentAttrs;
|
|
689
697
|
private styleModules;
|
|
690
698
|
private bidiCache;
|
|
699
|
+
private destroyed;
|
|
691
700
|
/**
|
|
692
701
|
Construct a new view. You'll usually want to put `view.dom` into
|
|
693
702
|
your document after creating a view, so that the user can see
|
|
@@ -847,9 +856,6 @@ declare class EditorView {
|
|
|
847
856
|
used.
|
|
848
857
|
*/
|
|
849
858
|
moveVertically(start: SelectionRange, forward: boolean, distance?: number): SelectionRange;
|
|
850
|
-
/**
|
|
851
|
-
Scroll the given document position into view.
|
|
852
|
-
*/
|
|
853
859
|
scrollPosIntoView(pos: number): void;
|
|
854
860
|
/**
|
|
855
861
|
Find the DOM parent node and offset (child offset if `node` is
|
|
@@ -940,6 +946,11 @@ declare class EditorView {
|
|
|
940
946
|
*/
|
|
941
947
|
static scrollTo: _codemirror_state.StateEffectType<SelectionRange>;
|
|
942
948
|
/**
|
|
949
|
+
Effect that makes the editor scroll the given range to the
|
|
950
|
+
center of the visible view.
|
|
951
|
+
*/
|
|
952
|
+
static centerOn: _codemirror_state.StateEffectType<SelectionRange>;
|
|
953
|
+
/**
|
|
943
954
|
Facet to add a [style
|
|
944
955
|
module](https://github.com/marijnh/style-mod#documentation) to
|
|
945
956
|
an editor view. The view will ensure that the module is
|