@codemirror/view 0.19.6 → 0.19.10
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 +50 -0
- package/dist/index.cjs +327 -120
- package/dist/index.d.ts +17 -8
- package/dist/index.js +328 -121
- package/package.json +2 -2
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
|
|
@@ -982,12 +991,12 @@ declare class EditorView {
|
|
|
982
991
|
*/
|
|
983
992
|
static updateListener: _codemirror_state.Facet<(update: ViewUpdate) => void, readonly ((update: ViewUpdate) => void)[]>;
|
|
984
993
|
/**
|
|
985
|
-
Facet that controls whether the editor content is editable.
|
|
986
|
-
its highest-precedence value is `false`,
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
994
|
+
Facet that controls whether the editor content DOM is editable.
|
|
995
|
+
When its highest-precedence value is `false`, the element will
|
|
996
|
+
not longer have its `contenteditable` attribute set. (Note that
|
|
997
|
+
this doesn't affect API calls that change the editor content,
|
|
998
|
+
even when those are bound to keys or buttons. See the
|
|
999
|
+
[`readOnly`](https://codemirror.net/6/docs/ref/#state.EditorState.readOnly) facet for that.)
|
|
991
1000
|
*/
|
|
992
1001
|
static editable: _codemirror_state.Facet<boolean, boolean>;
|
|
993
1002
|
/**
|