@codemirror/view 0.19.8 → 0.19.12

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/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;
@@ -599,7 +603,9 @@ interface EditorConfig {
599
603
  /**
600
604
  If the view is going to be mounted in a shadow root or document
601
605
  other than the one held by the global variable `document` (the
602
- 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.
603
609
  */
604
610
  root?: Document | ShadowRoot;
605
611
  /**
@@ -850,9 +856,6 @@ declare class EditorView {
850
856
  used.
851
857
  */
852
858
  moveVertically(start: SelectionRange, forward: boolean, distance?: number): SelectionRange;
853
- /**
854
- Scroll the given document position into view.
855
- */
856
859
  scrollPosIntoView(pos: number): void;
857
860
  /**
858
861
  Find the DOM parent node and offset (child offset if `node` is
@@ -943,6 +946,11 @@ declare class EditorView {
943
946
  */
944
947
  static scrollTo: _codemirror_state.StateEffectType<SelectionRange>;
945
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
+ /**
946
954
  Facet to add a [style
947
955
  module](https://github.com/marijnh/style-mod#documentation) to
948
956
  an editor view. The view will ensure that the module is