@sanity/runtime-cli 1.3.1 → 1.4.0

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.
Files changed (59) hide show
  1. package/README.md +11 -14
  2. package/dist/actions/blueprints/logs.d.ts +1 -0
  3. package/dist/actions/blueprints/logs.js +3 -2
  4. package/dist/actions/blueprints/operations.d.ts +1 -0
  5. package/dist/actions/blueprints/operations.js +3 -2
  6. package/dist/actions/blueprints/read-blueprint.d.ts +16 -7
  7. package/dist/actions/blueprints/read-blueprint.js +56 -10
  8. package/dist/actions/blueprints/stacks.d.ts +6 -6
  9. package/dist/actions/blueprints/stacks.js +10 -14
  10. package/dist/actions/blueprints/stash-asset.d.ts +1 -0
  11. package/dist/actions/blueprints/stash-asset.js +2 -5
  12. package/dist/actions/functions/invoke.d.ts +6 -2
  13. package/dist/actions/functions/invoke.js +9 -11
  14. package/dist/actions/functions/logs.d.ts +6 -1
  15. package/dist/actions/functions/logs.js +10 -10
  16. package/dist/commands/blueprints/deploy.js +19 -18
  17. package/dist/commands/blueprints/info.js +18 -38
  18. package/dist/commands/blueprints/logs.d.ts +0 -1
  19. package/dist/commands/blueprints/logs.js +12 -41
  20. package/dist/commands/blueprints/plan.js +14 -4
  21. package/dist/commands/functions/invoke.js +19 -2
  22. package/dist/commands/functions/logs.js +26 -2
  23. package/dist/config.js +6 -5
  24. package/dist/server/static/api.d.ts +10 -0
  25. package/dist/server/static/api.js +38 -43
  26. package/dist/server/static/components/api-base.d.ts +9 -0
  27. package/dist/server/static/components/api-base.js +6 -7
  28. package/dist/server/static/components/function-list.d.ts +1 -0
  29. package/dist/server/static/components/function-list.js +44 -48
  30. package/dist/server/static/components/network-spinner.d.ts +1 -0
  31. package/dist/server/static/components/network-spinner.js +6 -7
  32. package/dist/server/static/components/payload-panel.d.ts +1 -0
  33. package/dist/server/static/components/payload-panel.js +32 -36
  34. package/dist/server/static/components/response-panel.d.ts +1 -0
  35. package/dist/server/static/components/response-panel.js +50 -64
  36. package/dist/server/static/static/api.js +53 -0
  37. package/dist/server/static/static/components/api-base.js +10 -0
  38. package/dist/server/static/static/components/function-list.js +54 -0
  39. package/dist/server/static/static/components/network-spinner.js +71 -0
  40. package/dist/server/static/static/components/payload-panel.js +45 -0
  41. package/dist/server/static/static/components/response-panel.js +83 -0
  42. package/dist/server/static/static/vendor/vendor.bundle.js +26879 -0
  43. package/dist/server/static/vendor/vendor.bundle.d.ts +1815 -0
  44. package/dist/server/static/vendor/vendor.bundle.js +913 -1029
  45. package/dist/utils/child-process-wrapper.d.ts +1 -0
  46. package/dist/utils/display/blueprints-formatting.js +2 -2
  47. package/dist/utils/get-headers.d.ts +8 -0
  48. package/dist/utils/get-headers.js +9 -0
  49. package/dist/utils/get-token.d.ts +3 -1
  50. package/dist/utils/get-token.js +2 -2
  51. package/dist/utils/types.d.ts +44 -30
  52. package/dist/utils/types.js +8 -1
  53. package/dist/utils/vendor/parser-validator.d.ts +8 -0
  54. package/dist/utils/vendor/parser-validator.js +514 -0
  55. package/oclif.manifest.json +1 -11
  56. package/package.json +10 -11
  57. /package/dist/server/static/{components → static/components}/app.css +0 -0
  58. /package/dist/server/static/{index.html → static/index.html} +0 -0
  59. /package/dist/server/static/{sanity-logo-sm.svg → static/sanity-logo-sm.svg} +0 -0
@@ -0,0 +1,1815 @@
1
+ /**
2
+ The editor state class is a persistent (immutable) data structure.
3
+ To update a state, you [create](https://codemirror.net/6/docs/ref/#state.EditorState.update) a
4
+ [transaction](https://codemirror.net/6/docs/ref/#state.Transaction), which produces a _new_ state
5
+ instance, without modifying the original object.
6
+
7
+ As such, _never_ mutate properties of a state directly. That'll
8
+ just break things.
9
+ */
10
+ export class EditorState {
11
+ /**
12
+ Deserialize a state from its JSON representation. When custom
13
+ fields should be deserialized, pass the same object you passed
14
+ to [`toJSON`](https://codemirror.net/6/docs/ref/#state.EditorState.toJSON) when serializing as
15
+ third argument.
16
+ */
17
+ static fromJSON(json: any, config: {} | undefined, fields: any): EditorState;
18
+ /**
19
+ Create a new state. You'll usually only need this when
20
+ initializing an editor—updated states are created by applying
21
+ transactions.
22
+ */
23
+ static create(config?: {}): EditorState;
24
+ constructor(config: any, doc: any, selection: any, values: any, computeSlot: any, tr: any);
25
+ config: any;
26
+ doc: any;
27
+ selection: any;
28
+ values: any;
29
+ status: any;
30
+ computeSlot: any;
31
+ field(field: any, require?: boolean): any;
32
+ /**
33
+ Create a [transaction](https://codemirror.net/6/docs/ref/#state.Transaction) that updates this
34
+ state. Any number of [transaction specs](https://codemirror.net/6/docs/ref/#state.TransactionSpec)
35
+ can be passed. Unless
36
+ [`sequential`](https://codemirror.net/6/docs/ref/#state.TransactionSpec.sequential) is set, the
37
+ [changes](https://codemirror.net/6/docs/ref/#state.TransactionSpec.changes) (if any) of each spec
38
+ are assumed to start in the _current_ document (not the document
39
+ produced by previous specs), and its
40
+ [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection) and
41
+ [effects](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) are assumed to refer
42
+ to the document created by its _own_ changes. The resulting
43
+ transaction contains the combined effect of all the different
44
+ specs. For [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection), later
45
+ specs take precedence over earlier ones.
46
+ */
47
+ update(...specs: any[]): any;
48
+ /**
49
+ @internal
50
+ */
51
+ applyTransaction(tr: any): void;
52
+ /**
53
+ Create a [transaction spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec) that
54
+ replaces every selection range with the given content.
55
+ */
56
+ replaceSelection(text: any): {
57
+ changes: (any[] & ChangeSet) | null;
58
+ selection: EditorSelection;
59
+ effects: any[];
60
+ };
61
+ /**
62
+ Create a set of changes and a new selection by running the given
63
+ function for each range in the active selection. The function
64
+ can return an optional set of changes (in the coordinate space
65
+ of the start document), plus an updated range (in the coordinate
66
+ space of the document produced by the call's own changes). This
67
+ method will merge all the changes and ranges into a single
68
+ changeset and selection, and return it as a [transaction
69
+ spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec), which can be passed to
70
+ [`update`](https://codemirror.net/6/docs/ref/#state.EditorState.update).
71
+ */
72
+ changeByRange(f: any): {
73
+ changes: (any[] & ChangeSet) | null;
74
+ selection: EditorSelection;
75
+ effects: any[];
76
+ };
77
+ /**
78
+ Create a [change set](https://codemirror.net/6/docs/ref/#state.ChangeSet) from the given change
79
+ description, taking the state's document length and line
80
+ separator into account.
81
+ */
82
+ changes(spec?: any[]): (any[] & ChangeSet) | null;
83
+ /**
84
+ Using the state's [line
85
+ separator](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator), create a
86
+ [`Text`](https://codemirror.net/6/docs/ref/#state.Text) instance from the given string.
87
+ */
88
+ toText(string: any): any;
89
+ /**
90
+ Return the given range of the document as a string.
91
+ */
92
+ sliceDoc(from?: number, to?: any): any;
93
+ /**
94
+ Get the value of a state [facet](https://codemirror.net/6/docs/ref/#state.Facet).
95
+ */
96
+ facet(facet: any): any;
97
+ /**
98
+ Convert this state to a JSON-serializable object. When custom
99
+ fields should be serialized, you can pass them in as an object
100
+ mapping property names (in the resulting object, which should
101
+ not use `doc` or `selection`) to fields.
102
+ */
103
+ toJSON(fields: any): {
104
+ doc: any;
105
+ selection: any;
106
+ };
107
+ /**
108
+ The size (in columns) of a tab in the document, determined by
109
+ the [`tabSize`](https://codemirror.net/6/docs/ref/#state.EditorState^tabSize) facet.
110
+ */
111
+ get tabSize(): any;
112
+ /**
113
+ Get the proper [line-break](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator)
114
+ string for this state.
115
+ */
116
+ get lineBreak(): any;
117
+ /**
118
+ Returns true when the editor is
119
+ [configured](https://codemirror.net/6/docs/ref/#state.EditorState^readOnly) to be read-only.
120
+ */
121
+ get readOnly(): any;
122
+ /**
123
+ Look up a translation for the given phrase (via the
124
+ [`phrases`](https://codemirror.net/6/docs/ref/#state.EditorState^phrases) facet), or return the
125
+ original string if no translation is found.
126
+
127
+ If additional arguments are passed, they will be inserted in
128
+ place of markers like `$1` (for the first value) and `$2`, etc.
129
+ A single `$` is equivalent to `$1`, and `$$` will produce a
130
+ literal dollar sign.
131
+ */
132
+ phrase(phrase: any, ...insert: any[]): any;
133
+ /**
134
+ Find the values for a given language data field, provided by the
135
+ the [`languageData`](https://codemirror.net/6/docs/ref/#state.EditorState^languageData) facet.
136
+
137
+ Examples of language data fields are...
138
+
139
+ - [`"commentTokens"`](https://codemirror.net/6/docs/ref/#commands.CommentTokens) for specifying
140
+ comment syntax.
141
+ - [`"autocomplete"`](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion^config.override)
142
+ for providing language-specific completion sources.
143
+ - [`"wordChars"`](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) for adding
144
+ characters that should be considered part of words in this
145
+ language.
146
+ - [`"closeBrackets"`](https://codemirror.net/6/docs/ref/#autocomplete.CloseBracketConfig) controls
147
+ bracket closing behavior.
148
+ */
149
+ languageDataAt(name: any, pos: any, side?: number): any[];
150
+ /**
151
+ Return a function that can categorize strings (expected to
152
+ represent a single [grapheme cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak))
153
+ into one of:
154
+
155
+ - Word (contains an alphanumeric character or a character
156
+ explicitly listed in the local language's `"wordChars"`
157
+ language data, which should be a string)
158
+ - Space (contains only whitespace)
159
+ - Other (anything else)
160
+ */
161
+ charCategorizer(at: any): (char: any) => any;
162
+ /**
163
+ Find the word at the given position, meaning the range
164
+ containing all [word](https://codemirror.net/6/docs/ref/#state.CharCategory.Word) characters
165
+ around it. If no word characters are adjacent to the position,
166
+ this returns null.
167
+ */
168
+ wordAt(pos: any): SelectionRange | null;
169
+ }
170
+ export namespace EditorState {
171
+ export { allowMultipleSelections };
172
+ export let tabSize: Facet;
173
+ export { lineSeparator };
174
+ export { readOnly };
175
+ export let phrases: Facet;
176
+ export { languageData };
177
+ export { changeFilter };
178
+ export { transactionFilter };
179
+ export { transactionExtender };
180
+ }
181
+ /**
182
+ An editor view represents the editor's user interface. It holds
183
+ the editable DOM surface, and possibly other elements such as the
184
+ line number gutter. It handles events and dispatches state
185
+ transactions for editing actions.
186
+ */
187
+ export class EditorView {
188
+ /**
189
+ Returns an effect that can be
190
+ [added](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) to a transaction to
191
+ cause it to scroll the given position or range into view.
192
+ */
193
+ static scrollIntoView(pos: any, options?: {}): StateEffect;
194
+ /**
195
+ Returns an extension that can be used to add DOM event handlers.
196
+ The value should be an object mapping event names to handler
197
+ functions. For any given event, such functions are ordered by
198
+ extension precedence, and the first handler to return true will
199
+ be assumed to have handled that event, and no other handlers or
200
+ built-in behavior will be activated for it. These are registered
201
+ on the [content element](https://codemirror.net/6/docs/ref/#view.EditorView.contentDOM), except
202
+ for `scroll` handlers, which will be called any time the
203
+ editor's [scroll element](https://codemirror.net/6/docs/ref/#view.EditorView.scrollDOM) or one of
204
+ its parent nodes is scrolled.
205
+ */
206
+ static domEventHandlers(handlers: any): ViewPlugin;
207
+ /**
208
+ Create an extension that registers DOM event observers. Contrary
209
+ to event [handlers](https://codemirror.net/6/docs/ref/#view.EditorView^domEventHandlers),
210
+ observers can't be prevented from running by a higher-precedence
211
+ handler returning true. They also don't prevent other handlers
212
+ and observers from running when they return true, and should not
213
+ call `preventDefault`.
214
+ */
215
+ static domEventObservers(observers: any): ViewPlugin;
216
+ /**
217
+ Create a theme extension. The first argument can be a
218
+ [`style-mod`](https://github.com/marijnh/style-mod#documentation)
219
+ style spec providing the styles for the theme. These will be
220
+ prefixed with a generated class for the style.
221
+
222
+ Because the selectors will be prefixed with a scope class, rule
223
+ that directly match the editor's [wrapper
224
+ element](https://codemirror.net/6/docs/ref/#view.EditorView.dom)—to which the scope class will be
225
+ added—need to be explicitly differentiated by adding an `&` to
226
+ the selector for that element—for example
227
+ `&.cm-focused`.
228
+
229
+ When `dark` is set to true, the theme will be marked as dark,
230
+ which will cause the `&dark` rules from [base
231
+ themes](https://codemirror.net/6/docs/ref/#view.EditorView^baseTheme) to be used (as opposed to
232
+ `&light` when a light theme is active).
233
+ */
234
+ static theme(spec: any, options: any): FacetProvider[];
235
+ /**
236
+ Create an extension that adds styles to the base theme. Like
237
+ with [`theme`](https://codemirror.net/6/docs/ref/#view.EditorView^theme), use `&` to indicate the
238
+ place of the editor wrapper element when directly targeting
239
+ that. You can also use `&dark` or `&light` instead to only
240
+ target editors with a dark or light theme.
241
+ */
242
+ static baseTheme(spec: any): PrecExtension;
243
+ /**
244
+ Retrieve an editor view instance from the view's DOM
245
+ representation.
246
+ */
247
+ static findFromDOM(dom: any): any;
248
+ /**
249
+ Construct a new view. You'll want to either provide a `parent`
250
+ option, or put `view.dom` into your document after creating a
251
+ view, so that the user can see the editor.
252
+ */
253
+ constructor(config?: {});
254
+ /**
255
+ The current editor state.
256
+ */
257
+ get state(): any;
258
+ /**
259
+ To be able to display large documents without consuming too much
260
+ memory or overloading the browser, CodeMirror only draws the
261
+ code that is visible (plus a margin around it) to the DOM. This
262
+ property tells you the extent of the current drawn viewport, in
263
+ document positions.
264
+ */
265
+ get viewport(): Viewport | undefined;
266
+ /**
267
+ When there are, for example, large collapsed ranges in the
268
+ viewport, its size can be a lot bigger than the actual visible
269
+ content. Thus, if you are doing something like styling the
270
+ content in the viewport, it is preferable to only do so for
271
+ these ranges, which are the subset of the viewport that is
272
+ actually drawn.
273
+ */
274
+ get visibleRanges(): any[];
275
+ /**
276
+ Returns false when the editor is entirely scrolled out of view
277
+ or otherwise hidden.
278
+ */
279
+ get inView(): boolean;
280
+ /**
281
+ Indicates whether the user is currently composing text via
282
+ [IME](https://en.wikipedia.org/wiki/Input_method), and at least
283
+ one change has been made in the current composition.
284
+ */
285
+ get composing(): boolean;
286
+ /**
287
+ Indicates whether the user is currently in composing state. Note
288
+ that on some platforms, like Android, this will be the case a
289
+ lot, since just putting the cursor on a word starts a
290
+ composition there.
291
+ */
292
+ get compositionStarted(): boolean;
293
+ /**
294
+ The document or shadow root that the view lives in.
295
+ */
296
+ get root(): any;
297
+ /**
298
+ @internal
299
+ */
300
+ get win(): Window & typeof globalThis;
301
+ plugins: any;
302
+ pluginMap: Map<any, any>;
303
+ editorAttrs: {};
304
+ contentAttrs: {};
305
+ bidiCache: any[];
306
+ destroyed: boolean;
307
+ /**
308
+ @internal
309
+ */
310
+ updateState: number;
311
+ /**
312
+ @internal
313
+ */
314
+ measureScheduled: number;
315
+ /**
316
+ @internal
317
+ */
318
+ measureRequests: any[];
319
+ contentDOM: HTMLDivElement;
320
+ scrollDOM: HTMLDivElement;
321
+ announceDOM: HTMLDivElement;
322
+ dom: HTMLDivElement;
323
+ dispatchTransactions: any;
324
+ dispatch(...input: any[]): void;
325
+ _root: any;
326
+ viewState: ViewState;
327
+ observer: DOMObserver;
328
+ inputState: InputState;
329
+ docView: DocView;
330
+ /**
331
+ Update the view for the given array of transactions. This will
332
+ update the visible document and selection to match the state
333
+ produced by the transactions, and notify view plugins of the
334
+ change. You should usually call
335
+ [`dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch) instead, which uses this
336
+ as a primitive.
337
+ */
338
+ update(transactions: any): void;
339
+ /**
340
+ Reset the view to the given state. (This will cause the entire
341
+ document to be redrawn and all view plugins to be reinitialized,
342
+ so you should probably only use it when the new state isn't
343
+ derived from the old state. Otherwise, use
344
+ [`dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch) instead.)
345
+ */
346
+ setState(newState: any): void;
347
+ updatePlugins(update: any): void;
348
+ docViewUpdate(): void;
349
+ /**
350
+ @internal
351
+ */
352
+ measure(flush?: boolean): void;
353
+ /**
354
+ Get the CSS classes for the currently active editor themes.
355
+ */
356
+ get themeClasses(): string;
357
+ updateAttrs(): any;
358
+ showAnnouncements(trs: any): void;
359
+ mountStyles(): void;
360
+ styleModules: any;
361
+ readMeasured(): void;
362
+ /**
363
+ Schedule a layout measurement, optionally providing callbacks to
364
+ do custom DOM measuring followed by a DOM write phase. Using
365
+ this is preferable reading DOM layout directly from, for
366
+ example, an event handler, because it'll make sure measuring and
367
+ drawing done by other components is synchronized, avoiding
368
+ unnecessary DOM layout computations.
369
+ */
370
+ requestMeasure(request: any): void;
371
+ /**
372
+ Get the value of a specific plugin, if present. Note that
373
+ plugins that crash can be dropped from a view, so even when you
374
+ know you registered a given plugin, it is recommended to check
375
+ the return value of this method.
376
+ */
377
+ plugin(plugin: any): any;
378
+ /**
379
+ The top position of the document, in screen coordinates. This
380
+ may be negative when the editor is scrolled down. Points
381
+ directly to the top of the first line, not above the padding.
382
+ */
383
+ get documentTop(): number;
384
+ /**
385
+ Reports the padding above and below the document.
386
+ */
387
+ get documentPadding(): {
388
+ top: number;
389
+ bottom: number;
390
+ };
391
+ /**
392
+ If the editor is transformed with CSS, this provides the scale
393
+ along the X axis. Otherwise, it will just be 1. Note that
394
+ transforms other than translation and scaling are not supported.
395
+ */
396
+ get scaleX(): number;
397
+ /**
398
+ Provide the CSS transformed scale along the Y axis.
399
+ */
400
+ get scaleY(): number;
401
+ /**
402
+ Find the text line or block widget at the given vertical
403
+ position (which is interpreted as relative to the [top of the
404
+ document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop)).
405
+ */
406
+ elementAtHeight(height: any): any;
407
+ /**
408
+ Find the line block (see
409
+ [`lineBlockAt`](https://codemirror.net/6/docs/ref/#view.EditorView.lineBlockAt) at the given
410
+ height, again interpreted relative to the [top of the
411
+ document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop).
412
+ */
413
+ lineBlockAtHeight(height: any): any;
414
+ /**
415
+ Get the extent and vertical position of all [line
416
+ blocks](https://codemirror.net/6/docs/ref/#view.EditorView.lineBlockAt) in the viewport. Positions
417
+ are relative to the [top of the
418
+ document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop);
419
+ */
420
+ get viewportLineBlocks(): any[] | undefined;
421
+ /**
422
+ Find the line block around the given document position. A line
423
+ block is a range delimited on both sides by either a
424
+ non-[hidden](https://codemirror.net/6/docs/ref/#view.Decoration^replace) line break, or the
425
+ start/end of the document. It will usually just hold a line of
426
+ text, but may be broken into multiple textblocks by block
427
+ widgets.
428
+ */
429
+ lineBlockAt(pos: any): any;
430
+ /**
431
+ The editor's total content height.
432
+ */
433
+ get contentHeight(): any;
434
+ /**
435
+ Move a cursor position by [grapheme
436
+ cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak). `forward` determines whether
437
+ the motion is away from the line start, or towards it. In
438
+ bidirectional text, the line is traversed in visual order, using
439
+ the editor's [text direction](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection).
440
+ When the start position was the last one on the line, the
441
+ returned position will be across the line break. If there is no
442
+ further line, the original position is returned.
443
+
444
+ By default, this method moves over a single cluster. The
445
+ optional `by` argument can be used to move across more. It will
446
+ be called with the first cluster as argument, and should return
447
+ a predicate that determines, for each subsequent cluster,
448
+ whether it should also be moved over.
449
+ */
450
+ moveByChar(start: any, forward: any, by: any): any;
451
+ /**
452
+ Move a cursor position across the next group of either
453
+ [letters](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) or non-letter
454
+ non-whitespace characters.
455
+ */
456
+ moveByGroup(start: any, forward: any): any;
457
+ /**
458
+ Get the cursor position visually at the start or end of a line.
459
+ Note that this may differ from the _logical_ position at its
460
+ start or end (which is simply at `line.from`/`line.to`) if text
461
+ at the start or end goes against the line's base text direction.
462
+ */
463
+ visualLineSide(line: any, end: any): SelectionRange;
464
+ /**
465
+ Move to the next line boundary in the given direction. If
466
+ `includeWrap` is true, line wrapping is on, and there is a
467
+ further wrap point on the current line, the wrap point will be
468
+ returned. Otherwise this function will return the start or end
469
+ of the line.
470
+ */
471
+ moveToLineBoundary(start: any, forward: any, includeWrap?: boolean): SelectionRange;
472
+ /**
473
+ Move a cursor position vertically. When `distance` isn't given,
474
+ it defaults to moving to the next line (including wrapped
475
+ lines). Otherwise, `distance` should provide a positive distance
476
+ in pixels.
477
+
478
+ When `start` has a
479
+ [`goalColumn`](https://codemirror.net/6/docs/ref/#state.SelectionRange.goalColumn), the vertical
480
+ motion will use that as a target horizontal position. Otherwise,
481
+ the cursor's own horizontal position is used. The returned
482
+ cursor will have its goal column set to whichever column was
483
+ used.
484
+ */
485
+ moveVertically(start: any, forward: any, distance: any): any;
486
+ /**
487
+ Find the DOM parent node and offset (child offset if `node` is
488
+ an element, character offset when it is a text node) at the
489
+ given document position.
490
+
491
+ Note that for positions that aren't currently in
492
+ `visibleRanges`, the resulting DOM position isn't necessarily
493
+ meaningful (it may just point before or after a placeholder
494
+ element).
495
+ */
496
+ domAtPos(pos: any): any;
497
+ /**
498
+ Find the document position at the given DOM node. Can be useful
499
+ for associating positions with DOM events. Will raise an error
500
+ when `node` isn't part of the editor content.
501
+ */
502
+ posAtDOM(node: any, offset?: number): any;
503
+ posAtCoords(coords: any, precise?: boolean): any;
504
+ /**
505
+ Get the screen coordinates at the given document position.
506
+ `side` determines whether the coordinates are based on the
507
+ element before (-1) or after (1) the position (if no element is
508
+ available on the given side, the method will transparently use
509
+ another strategy to get reasonable coordinates).
510
+ */
511
+ coordsAtPos(pos: any, side?: number): any;
512
+ /**
513
+ Return the rectangle around a given character. If `pos` does not
514
+ point in front of a character that is in the viewport and
515
+ rendered (i.e. not replaced, not a line break), this will return
516
+ null. For space characters that are a line wrap point, this will
517
+ return the position before the line break.
518
+ */
519
+ coordsForChar(pos: any): any;
520
+ /**
521
+ The default width of a character in the editor. May not
522
+ accurately reflect the width of all characters (given variable
523
+ width fonts or styling of invididual ranges).
524
+ */
525
+ get defaultCharacterWidth(): number;
526
+ /**
527
+ The default height of a line in the editor. May not be accurate
528
+ for all lines.
529
+ */
530
+ get defaultLineHeight(): number;
531
+ /**
532
+ The text direction
533
+ ([`direction`](https://developer.mozilla.org/en-US/docs/Web/CSS/direction)
534
+ CSS property) of the editor's content element.
535
+ */
536
+ get textDirection(): any;
537
+ /**
538
+ Find the text direction of the block at the given position, as
539
+ assigned by CSS. If
540
+ [`perLineTextDirection`](https://codemirror.net/6/docs/ref/#view.EditorView^perLineTextDirection)
541
+ isn't enabled, or the given position is outside of the viewport,
542
+ this will always return the same as
543
+ [`textDirection`](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection). Note that
544
+ this may trigger a DOM layout.
545
+ */
546
+ textDirectionAt(pos: any): any;
547
+ /**
548
+ Whether this editor [wraps lines](https://codemirror.net/6/docs/ref/#view.EditorView.lineWrapping)
549
+ (as determined by the
550
+ [`white-space`](https://developer.mozilla.org/en-US/docs/Web/CSS/white-space)
551
+ CSS property of its content element).
552
+ */
553
+ get lineWrapping(): any;
554
+ /**
555
+ Returns the bidirectional text structure of the given line
556
+ (which should be in the current document) as an array of span
557
+ objects. The order of these spans matches the [text
558
+ direction](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection)—if that is
559
+ left-to-right, the leftmost spans come first, otherwise the
560
+ rightmost spans come first.
561
+ */
562
+ bidiSpans(line: any): any;
563
+ /**
564
+ Check whether the editor has focus.
565
+ */
566
+ get hasFocus(): boolean;
567
+ /**
568
+ Put focus on the editor.
569
+ */
570
+ focus(): void;
571
+ /**
572
+ Update the [root](https://codemirror.net/6/docs/ref/##view.EditorViewConfig.root) in which the editor lives. This is only
573
+ necessary when moving the editor's existing DOM to a new window or shadow root.
574
+ */
575
+ setRoot(root: any): void;
576
+ /**
577
+ Clean up this editor view, removing its element from the
578
+ document, unregistering event handlers, and notifying
579
+ plugins. The view instance can no longer be used after
580
+ calling this.
581
+ */
582
+ destroy(): void;
583
+ /**
584
+ Return an effect that resets the editor to its current (at the
585
+ time this method was called) scroll position. Note that this
586
+ only affects the editor's own scrollable element, not parents.
587
+ See also
588
+ [`EditorViewConfig.scrollTo`](https://codemirror.net/6/docs/ref/#view.EditorViewConfig.scrollTo).
589
+
590
+ The effect should be used with a document identical to the one
591
+ it was created for. Failing to do so is not an error, but may
592
+ not scroll to the expected position. You can
593
+ [map](https://codemirror.net/6/docs/ref/#state.StateEffect.map) the effect to account for changes.
594
+ */
595
+ scrollSnapshot(): StateEffect;
596
+ /**
597
+ Enable or disable tab-focus mode, which disables key bindings
598
+ for Tab and Shift-Tab, letting the browser's default
599
+ focus-changing behavior go through instead. This is useful to
600
+ prevent trapping keyboard users in your editor.
601
+
602
+ Without argument, this toggles the mode. With a boolean, it
603
+ enables (true) or disables it (false). Given a number, it
604
+ temporarily enables the mode until that number of milliseconds
605
+ have passed or another non-Tab key is pressed.
606
+ */
607
+ setTabFocusMode(to: any): void;
608
+ }
609
+ export namespace EditorView {
610
+ export { styleModule };
611
+ export { inputHandler$1 as inputHandler };
612
+ export { clipboardInputFilter };
613
+ export { clipboardOutputFilter };
614
+ export { scrollHandler };
615
+ export { focusChangeEffect };
616
+ export { perLineTextDirection };
617
+ export { exceptionSink };
618
+ export { updateListener };
619
+ export { editable };
620
+ export { mouseSelectionStyle };
621
+ export { dragMovesSelection$1 as dragMovesSelection };
622
+ export { clickAddsSelectionRange };
623
+ export { decorations };
624
+ export { outerDecorations };
625
+ export { atomicRanges };
626
+ export { bidiIsolatedRanges };
627
+ export { scrollMargins };
628
+ export { darkTheme };
629
+ export let cspNonce: Facet;
630
+ export { contentAttributes };
631
+ export { editorAttributes };
632
+ export let lineWrapping: FacetProvider;
633
+ export let announce: StateEffectType;
634
+ }
635
+ export function Store(initialState: any): any;
636
+ /**
637
+ This is an extension value that just pulls together a number of
638
+ extensions that you might want in a basic editor. It is meant as a
639
+ convenient helper to quickly set up CodeMirror without installing
640
+ and importing a lot of separate packages.
641
+
642
+ Specifically, it includes...
643
+
644
+ - [the default command bindings](https://codemirror.net/6/docs/ref/#commands.defaultKeymap)
645
+ - [line numbers](https://codemirror.net/6/docs/ref/#view.lineNumbers)
646
+ - [special character highlighting](https://codemirror.net/6/docs/ref/#view.highlightSpecialChars)
647
+ - [the undo history](https://codemirror.net/6/docs/ref/#commands.history)
648
+ - [a fold gutter](https://codemirror.net/6/docs/ref/#language.foldGutter)
649
+ - [custom selection drawing](https://codemirror.net/6/docs/ref/#view.drawSelection)
650
+ - [drop cursor](https://codemirror.net/6/docs/ref/#view.dropCursor)
651
+ - [multiple selections](https://codemirror.net/6/docs/ref/#state.EditorState^allowMultipleSelections)
652
+ - [reindentation on input](https://codemirror.net/6/docs/ref/#language.indentOnInput)
653
+ - [the default highlight style](https://codemirror.net/6/docs/ref/#language.defaultHighlightStyle) (as fallback)
654
+ - [bracket matching](https://codemirror.net/6/docs/ref/#language.bracketMatching)
655
+ - [bracket closing](https://codemirror.net/6/docs/ref/#autocomplete.closeBrackets)
656
+ - [autocompletion](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion)
657
+ - [rectangular selection](https://codemirror.net/6/docs/ref/#view.rectangularSelection) and [crosshair cursor](https://codemirror.net/6/docs/ref/#view.crosshairCursor)
658
+ - [active line highlighting](https://codemirror.net/6/docs/ref/#view.highlightActiveLine)
659
+ - [active line gutter highlighting](https://codemirror.net/6/docs/ref/#view.highlightActiveLineGutter)
660
+ - [selection match highlighting](https://codemirror.net/6/docs/ref/#search.highlightSelectionMatches)
661
+ - [search](https://codemirror.net/6/docs/ref/#search.searchKeymap)
662
+ - [linting](https://codemirror.net/6/docs/ref/#lint.lintKeymap)
663
+
664
+ (You'll probably want to add some language package to your setup
665
+ too.)
666
+
667
+ This extension does not allow customization. The idea is that,
668
+ once you decide you want to configure your editor more precisely,
669
+ you take this package's source (which is just a bunch of imports
670
+ and an array literal), copy it into your own code, and adjust it
671
+ as desired.
672
+ */
673
+ export const basicSetup: (any[] | FacetProvider | ViewPlugin)[];
674
+ /**
675
+ JSON language support.
676
+ */
677
+ export function json(): LanguageSupport;
678
+ export function prettyBytes(number: any, options: any): string;
679
+ export function prettyMilliseconds(milliseconds: any, options: any): string;
680
+ /**
681
+ A change set represents a group of modifications to a document. It
682
+ stores the document length, and can only be applied to documents
683
+ with exactly that length.
684
+ */
685
+ declare class ChangeSet extends ChangeDesc {
686
+ /**
687
+ Create a change set for the given changes, for a document of the
688
+ given length, using `lineSep` as line separator.
689
+ */
690
+ static of(changes: any, length: any, lineSep: any): null;
691
+ /**
692
+ Create an empty changeset of the given length.
693
+ */
694
+ static empty(length: any): ChangeSet;
695
+ /**
696
+ Create a changeset from its JSON representation (as produced by
697
+ [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeSet.toJSON).
698
+ */
699
+ static fromJSON(json: any): ChangeSet;
700
+ /**
701
+ @internal
702
+ */
703
+ static createSet(sections: any, inserted: any): ChangeSet;
704
+ constructor(sections: any, inserted: any);
705
+ inserted: any;
706
+ /**
707
+ Apply the changes to a document, returning the modified
708
+ document.
709
+ */
710
+ apply(doc: any): any;
711
+ /**
712
+ Given the document as it existed _before_ the changes, return a
713
+ change set that represents the inverse of this set, which could
714
+ be used to go from the document created by the changes back to
715
+ the document as it existed before the changes.
716
+ */
717
+ invert(doc: any): ChangeSet;
718
+ /**
719
+ Combine two subsequent change sets into a single set. `other`
720
+ must start in the document produced by `this`. If `this` goes
721
+ `docA` → `docB` and `other` represents `docB` → `docC`, the
722
+ returned value will represent the change `docA` → `docC`.
723
+ */
724
+ compose(other: any): any;
725
+ /**
726
+ Given another change set starting in the same document, maps this
727
+ change set over the other, producing a new change set that can be
728
+ applied to the document produced by applying `other`. When
729
+ `before` is `true`, order changes as if `this` comes before
730
+ `other`, otherwise (the default) treat `other` as coming first.
731
+
732
+ Given two changes `A` and `B`, `A.compose(B.map(A))` and
733
+ `B.compose(A.map(B, true))` will produce the same document. This
734
+ provides a basic form of [operational
735
+ transformation](https://en.wikipedia.org/wiki/Operational_transformation),
736
+ and can be used for collaborative editing.
737
+ */
738
+ map(other: any, before?: boolean): ChangeDesc;
739
+ /**
740
+ Iterate over the changed ranges in the document, calling `f` for
741
+ each, with the range in the original document (`fromA`-`toA`)
742
+ and the range that replaces it in the new document
743
+ (`fromB`-`toB`).
744
+
745
+ When `individual` is true, adjacent changes are reported
746
+ separately.
747
+ */
748
+ iterChanges(f: any, individual?: boolean): void;
749
+ /**
750
+ Get a [change description](https://codemirror.net/6/docs/ref/#state.ChangeDesc) for this change
751
+ set.
752
+ */
753
+ get desc(): ChangeDesc;
754
+ /**
755
+ @internal
756
+ */
757
+ filter(ranges: any): {
758
+ changes: ChangeSet;
759
+ filtered: ChangeDesc;
760
+ };
761
+ /**
762
+ Serialize this change set to a JSON-representable value.
763
+ */
764
+ toJSON(): any[];
765
+ }
766
+ /**
767
+ An editor selection holds one or more selection ranges.
768
+ */
769
+ declare class EditorSelection {
770
+ /**
771
+ Create a selection from a JSON representation.
772
+ */
773
+ static fromJSON(json: any): EditorSelection;
774
+ /**
775
+ Create a selection holding a single range.
776
+ */
777
+ static single(anchor: any, head?: any): EditorSelection;
778
+ /**
779
+ Sort and merge the given set of ranges, creating a valid
780
+ selection.
781
+ */
782
+ static create(ranges: any, mainIndex?: number): EditorSelection;
783
+ /**
784
+ Create a cursor selection range at the given position. You can
785
+ safely ignore the optional arguments in most situations.
786
+ */
787
+ static cursor(pos: any, assoc: number | undefined, bidiLevel: any, goalColumn: any): SelectionRange;
788
+ /**
789
+ Create a selection range.
790
+ */
791
+ static range(anchor: any, head: any, goalColumn: any, bidiLevel: any): SelectionRange;
792
+ /**
793
+ @internal
794
+ */
795
+ static normalized(ranges: any, mainIndex?: number): EditorSelection;
796
+ constructor(ranges: any, mainIndex: any);
797
+ ranges: any;
798
+ mainIndex: any;
799
+ /**
800
+ Map a selection through a change. Used to adjust the selection
801
+ position for changes.
802
+ */
803
+ map(change: any, assoc?: number): EditorSelection;
804
+ /**
805
+ Compare this selection to another selection. By default, ranges
806
+ are compared only by position. When `includeAssoc` is true,
807
+ cursor ranges must also have the same
808
+ [`assoc`](https://codemirror.net/6/docs/ref/#state.SelectionRange.assoc) value.
809
+ */
810
+ eq(other: any, includeAssoc?: boolean): boolean;
811
+ /**
812
+ Get the primary selection range. Usually, you should make sure
813
+ your code applies to _all_ ranges, by using methods like
814
+ [`changeByRange`](https://codemirror.net/6/docs/ref/#state.EditorState.changeByRange).
815
+ */
816
+ get main(): any;
817
+ /**
818
+ Make sure the selection only has one range. Returns a selection
819
+ holding only the main range from this selection.
820
+ */
821
+ asSingle(): EditorSelection;
822
+ /**
823
+ Extend this selection with an extra range.
824
+ */
825
+ addRange(range: any, main?: boolean): EditorSelection;
826
+ /**
827
+ Replace a given range with another range, and then normalize the
828
+ selection to merge and sort ranges if necessary.
829
+ */
830
+ replaceRange(range: any, which?: any): EditorSelection;
831
+ /**
832
+ Convert this selection to an object that can be serialized to
833
+ JSON.
834
+ */
835
+ toJSON(): {
836
+ ranges: any;
837
+ main: any;
838
+ };
839
+ }
840
+ /**
841
+ A single selection range. When
842
+ [`allowMultipleSelections`](https://codemirror.net/6/docs/ref/#state.EditorState^allowMultipleSelections)
843
+ is enabled, a [selection](https://codemirror.net/6/docs/ref/#state.EditorSelection) may hold
844
+ multiple ranges. By default, selections hold exactly one range.
845
+ */
846
+ declare class SelectionRange {
847
+ /**
848
+ Convert a JSON representation of a range to a `SelectionRange`
849
+ instance.
850
+ */
851
+ static fromJSON(json: any): SelectionRange;
852
+ /**
853
+ @internal
854
+ */
855
+ static create(from: any, to: any, flags: any): SelectionRange;
856
+ constructor(from: any, to: any, flags: any);
857
+ from: any;
858
+ to: any;
859
+ flags: any;
860
+ /**
861
+ The anchor of the range—the side that doesn't move when you
862
+ extend it.
863
+ */
864
+ get anchor(): any;
865
+ /**
866
+ The head of the range, which is moved when the range is
867
+ [extended](https://codemirror.net/6/docs/ref/#state.SelectionRange.extend).
868
+ */
869
+ get head(): any;
870
+ /**
871
+ True when `anchor` and `head` are at the same position.
872
+ */
873
+ get empty(): boolean;
874
+ /**
875
+ If this is a cursor that is explicitly associated with the
876
+ character on one of its sides, this returns the side. -1 means
877
+ the character before its position, 1 the character after, and 0
878
+ means no association.
879
+ */
880
+ get assoc(): 1 | 0 | -1;
881
+ /**
882
+ The bidirectional text level associated with this cursor, if
883
+ any.
884
+ */
885
+ get bidiLevel(): number | null;
886
+ /**
887
+ The goal column (stored vertical offset) associated with a
888
+ cursor. This is used to preserve the vertical position when
889
+ [moving](https://codemirror.net/6/docs/ref/#view.EditorView.moveVertically) across
890
+ lines of different length.
891
+ */
892
+ get goalColumn(): number | undefined;
893
+ /**
894
+ Map this range through a change, producing a valid range in the
895
+ updated document.
896
+ */
897
+ map(change: any, assoc?: number): SelectionRange;
898
+ /**
899
+ Extend this range to cover at least `from` to `to`.
900
+ */
901
+ extend(from: any, to?: any): SelectionRange;
902
+ /**
903
+ Compare this range to another range.
904
+ */
905
+ eq(other: any, includeAssoc?: boolean): boolean;
906
+ /**
907
+ Return a JSON-serializable object representing the range.
908
+ */
909
+ toJSON(): {
910
+ anchor: any;
911
+ head: any;
912
+ };
913
+ }
914
+ declare const allowMultipleSelections: Facet;
915
+ /**
916
+ A facet is a labeled value that is associated with an editor
917
+ state. It takes inputs from any number of extensions, and combines
918
+ those into a single output value.
919
+
920
+ Examples of uses of facets are the [tab
921
+ size](https://codemirror.net/6/docs/ref/#state.EditorState^tabSize), [editor
922
+ attributes](https://codemirror.net/6/docs/ref/#view.EditorView^editorAttributes), and [update
923
+ listeners](https://codemirror.net/6/docs/ref/#view.EditorView^updateListener).
924
+
925
+ Note that `Facet` instances can be used anywhere where
926
+ [`FacetReader`](https://codemirror.net/6/docs/ref/#state.FacetReader) is expected.
927
+ */
928
+ declare class Facet {
929
+ /**
930
+ Define a new facet.
931
+ */
932
+ static define(config?: {}): Facet;
933
+ constructor(combine: any, compareInput: any, compare: any, isStatic: any, enables: any);
934
+ combine: any;
935
+ compareInput: any;
936
+ compare: any;
937
+ isStatic: any;
938
+ /**
939
+ @internal
940
+ */
941
+ id: number;
942
+ default: any;
943
+ extensions: any;
944
+ /**
945
+ Returns a facet reader for this facet, which can be used to
946
+ [read](https://codemirror.net/6/docs/ref/#state.EditorState.facet) it but not to define values for it.
947
+ */
948
+ get reader(): this;
949
+ /**
950
+ Returns an extension that adds the given value to this facet.
951
+ */
952
+ of(value: any): FacetProvider;
953
+ /**
954
+ Create an extension that computes a value for the facet from a
955
+ state. You must take care to declare the parts of the state that
956
+ this value depends on, since your function is only called again
957
+ for a new state when one of those parts changed.
958
+
959
+ In cases where your value depends only on a single field, you'll
960
+ want to use the [`from`](https://codemirror.net/6/docs/ref/#state.Facet.from) method instead.
961
+ */
962
+ compute(deps: any, get: any): FacetProvider;
963
+ /**
964
+ Create an extension that computes zero or more values for this
965
+ facet from a state.
966
+ */
967
+ computeN(deps: any, get: any): FacetProvider;
968
+ from(field: any, get: any): FacetProvider;
969
+ }
970
+ declare const lineSeparator: Facet;
971
+ declare const readOnly: Facet;
972
+ declare const languageData: Facet;
973
+ declare const changeFilter: Facet;
974
+ declare const transactionFilter: Facet;
975
+ declare const transactionExtender: Facet;
976
+ declare class Viewport {
977
+ constructor(from: any, to: any);
978
+ from: any;
979
+ to: any;
980
+ }
981
+ declare class ViewState {
982
+ constructor(state: any);
983
+ state: any;
984
+ pixelViewport: {
985
+ left: number;
986
+ right: number;
987
+ top: number;
988
+ bottom: number;
989
+ };
990
+ inView: boolean;
991
+ paddingTop: number;
992
+ paddingBottom: number;
993
+ contentDOMWidth: number;
994
+ contentDOMHeight: number;
995
+ editorHeight: number;
996
+ editorWidth: number;
997
+ scrollTop: number;
998
+ scrolledToBottom: boolean;
999
+ scaleX: number;
1000
+ scaleY: number;
1001
+ scrollAnchorPos: number;
1002
+ scrollAnchorHeight: number;
1003
+ scaler: {
1004
+ toDOM(n: any): any;
1005
+ fromDOM(n: any): any;
1006
+ scale: number;
1007
+ eq(other: any): boolean;
1008
+ };
1009
+ scrollTarget: any;
1010
+ printing: boolean;
1011
+ mustMeasureContent: boolean;
1012
+ defaultTextDirection: any;
1013
+ visibleRanges: any[];
1014
+ mustEnforceCursorAssoc: boolean;
1015
+ heightOracle: HeightOracle;
1016
+ stateDeco: any;
1017
+ heightMap: any;
1018
+ viewport: Viewport | undefined;
1019
+ lineGaps: any[];
1020
+ lineGapDeco: any;
1021
+ updateForViewport(): 0 | 2;
1022
+ viewports: (Viewport | undefined)[] | undefined;
1023
+ updateScaler(): 0 | 2;
1024
+ updateViewportLines(): void;
1025
+ viewportLines: any[] | undefined;
1026
+ update(update: any, scrollTarget?: null): void;
1027
+ measure(view: any): number;
1028
+ get visibleTop(): any;
1029
+ get visibleBottom(): any;
1030
+ getViewport(bias: any, scrollTarget: any): Viewport;
1031
+ mapViewport(viewport: any, changes: any): Viewport;
1032
+ viewportIsAppropriate({ from, to }: {
1033
+ from: any;
1034
+ to: any;
1035
+ }, bias?: number): boolean;
1036
+ mapLineGaps(gaps: any, changes: any): any;
1037
+ ensureLineGaps(current: any, mayMeasure: any): any[];
1038
+ gapSize(line: any, from: any, to: any, structure: any): number;
1039
+ updateLineGaps(gaps: any): void;
1040
+ computeVisibleRanges(changes: any): number;
1041
+ lineBlockAt(pos: any): any;
1042
+ lineBlockAtHeight(height: any): any;
1043
+ scrollAnchorAt(scrollTop: any): any;
1044
+ elementAtHeight(height: any): any;
1045
+ get docHeight(): any;
1046
+ get contentHeight(): any;
1047
+ }
1048
+ declare class DOMObserver {
1049
+ constructor(view: any);
1050
+ view: any;
1051
+ active: boolean;
1052
+ editContext: EditContextManager | null;
1053
+ selectionRange: DOMSelectionState;
1054
+ selectionChanged: boolean;
1055
+ delayedFlush: number;
1056
+ resizeTimeout: number;
1057
+ queue: any[];
1058
+ delayedAndroidKey: any;
1059
+ flushingAndroidKey: number;
1060
+ lastChange: number;
1061
+ scrollTargets: any[];
1062
+ intersection: IntersectionObserver | null;
1063
+ resizeScroll: ResizeObserver | null;
1064
+ intersecting: boolean;
1065
+ gapIntersection: IntersectionObserver | null;
1066
+ gaps: any[];
1067
+ printQuery: MediaQueryList | null;
1068
+ parentCheck: number;
1069
+ dom: any;
1070
+ observer: MutationObserver;
1071
+ onCharData: ((event: any) => void) | undefined;
1072
+ onSelectionChange(event: any): void;
1073
+ onResize(): void;
1074
+ onPrint(event: any): void;
1075
+ onScroll(e: any): void;
1076
+ win: any;
1077
+ onScrollChanged(e: any): void;
1078
+ updateGaps(gaps: any): void;
1079
+ readSelectionRange(): boolean;
1080
+ setSelectionRange(anchor: any, head: any): void;
1081
+ clearSelectionRange(): void;
1082
+ listenForScroll(): void;
1083
+ ignore(f: any): any;
1084
+ start(): void;
1085
+ stop(): void;
1086
+ clear(): void;
1087
+ delayAndroidKey(key: any, keyCode: any): void;
1088
+ clearDelayedAndroidKey(): void;
1089
+ flushSoon(): void;
1090
+ forceFlush(): void;
1091
+ pendingRecords(): any[];
1092
+ processRecords(): {
1093
+ from: number;
1094
+ to: number;
1095
+ typeOver: boolean;
1096
+ };
1097
+ readChange(): DOMChange | null;
1098
+ flush(readSelection?: boolean): boolean;
1099
+ readMutation(rec: any): {
1100
+ from: any;
1101
+ to: any;
1102
+ typeOver: boolean;
1103
+ } | null;
1104
+ setWindow(win: any): void;
1105
+ addWindowListeners(win: any): void;
1106
+ removeWindowListeners(win: any): void;
1107
+ update(update: any): void;
1108
+ destroy(): void;
1109
+ }
1110
+ declare class InputState {
1111
+ constructor(view: any);
1112
+ setSelectionOrigin(origin: any): void;
1113
+ lastSelectionOrigin: any;
1114
+ lastSelectionTime: number;
1115
+ view: any;
1116
+ lastKeyCode: number;
1117
+ lastKeyTime: number;
1118
+ lastTouchTime: number;
1119
+ lastFocusTime: number;
1120
+ lastScrollTop: number;
1121
+ lastScrollLeft: number;
1122
+ pendingIOSKey: any;
1123
+ /**
1124
+ When enabled (>-1), tab presses are not given to key handlers,
1125
+ leaving the browser's default behavior. If >0, the mode expires
1126
+ at that timestamp, and any other keypress clears it.
1127
+ Esc enables temporary tab focus mode for two seconds when not
1128
+ otherwise handled.
1129
+ */
1130
+ tabFocusMode: number;
1131
+ lastContextMenu: number;
1132
+ scrollHandlers: any[];
1133
+ handlers: any;
1134
+ composing: number;
1135
+ compositionFirstChange: any;
1136
+ compositionEndedAt: number;
1137
+ compositionPendingKey: boolean;
1138
+ compositionPendingChange: boolean;
1139
+ mouseSelection: any;
1140
+ draggedContent: any;
1141
+ handleEvent(event: any): void;
1142
+ notifiedFocused: any;
1143
+ runHandlers(type: any, event: any): void;
1144
+ ensureHandlers(plugins: any): void;
1145
+ keydown(event: any): boolean;
1146
+ flushIOSKey(change: any): boolean;
1147
+ ignoreDuringComposition(event: any): boolean;
1148
+ startMouseSelection(mouseSelection: any): void;
1149
+ update(update: any): void;
1150
+ destroy(): void;
1151
+ }
1152
+ declare class DocView extends ContentView {
1153
+ constructor(view: any);
1154
+ get length(): any;
1155
+ view: any;
1156
+ decorations: any[];
1157
+ dynamicDecorationMap: boolean[];
1158
+ domChanged: any;
1159
+ hasComposition: {
1160
+ from: any;
1161
+ to: any;
1162
+ } | null;
1163
+ markedForComposition: Set<any>;
1164
+ editContextFormatting: RangeSet;
1165
+ lastCompositionAfterCursor: boolean;
1166
+ minWidth: number;
1167
+ minWidthFrom: number;
1168
+ minWidthTo: number;
1169
+ impreciseAnchor: DOMPos | null;
1170
+ impreciseHead: DOMPos | null;
1171
+ forceSelection: boolean;
1172
+ lastUpdate: number;
1173
+ children: LineView[];
1174
+ update(update: any): boolean;
1175
+ updateInner(changes: any, oldLength: any, composition: any): void;
1176
+ updateChildren(changes: any, oldLength: any, composition: any): void;
1177
+ updateEditContextFormatting(update: any): void;
1178
+ compositionView(composition: any): LineView;
1179
+ fixCompositionDOM(composition: any): void;
1180
+ updateSelection(mustRead?: boolean, fromPointer?: boolean): void;
1181
+ suppressWidgetCursorChange(sel: any, cursor: any): any;
1182
+ enforceCursorAssoc(): void;
1183
+ moveToLine(pos: any): any;
1184
+ nearest(dom: any): any;
1185
+ posFromDOM(node: any, offset: any): any;
1186
+ domAtPos(pos: any): any;
1187
+ coordsAt(pos: any, side: any): any;
1188
+ coordsForChar(pos: any): any;
1189
+ measureVisibleLineHeights(viewport: any): any[];
1190
+ textDirectionAt(pos: any): any;
1191
+ measureTextSize(): {
1192
+ lineHeight: any;
1193
+ charWidth: number;
1194
+ textHeight: any;
1195
+ } | {
1196
+ lineHeight: undefined;
1197
+ charWidth: undefined;
1198
+ textHeight: undefined;
1199
+ };
1200
+ computeBlockGapDeco(): any;
1201
+ updateDeco(): any[];
1202
+ scrollIntoView(target: any): true | undefined;
1203
+ }
1204
+ /**
1205
+ State effects can be used to represent additional effects
1206
+ associated with a [transaction](https://codemirror.net/6/docs/ref/#state.Transaction.effects). They
1207
+ are often useful to model changes to custom [state
1208
+ fields](https://codemirror.net/6/docs/ref/#state.StateField), when those changes aren't implicit in
1209
+ document or selection changes.
1210
+ */
1211
+ declare class StateEffect {
1212
+ /**
1213
+ Define a new effect type. The type parameter indicates the type
1214
+ of values that his effect holds. It should be a type that
1215
+ doesn't include `undefined`, since that is used in
1216
+ [mapping](https://codemirror.net/6/docs/ref/#state.StateEffect.map) to indicate that an effect is
1217
+ removed.
1218
+ */
1219
+ static define(spec?: {}): StateEffectType;
1220
+ /**
1221
+ Map an array of effects through a change set.
1222
+ */
1223
+ static mapEffects(effects: any, mapping: any): any;
1224
+ /**
1225
+ @internal
1226
+ */
1227
+ constructor(type: any, value: any);
1228
+ type: any;
1229
+ value: any;
1230
+ /**
1231
+ Map this effect through a position mapping. Will return
1232
+ `undefined` when that ends up deleting the effect.
1233
+ */
1234
+ map(mapping: any): StateEffect | undefined;
1235
+ /**
1236
+ Tells you whether this effect object is of a given
1237
+ [type](https://codemirror.net/6/docs/ref/#state.StateEffectType).
1238
+ */
1239
+ is(type: any): boolean;
1240
+ }
1241
+ declare namespace StateEffect {
1242
+ let reconfigure: StateEffectType;
1243
+ let appendConfig: StateEffectType;
1244
+ }
1245
+ /**
1246
+ View plugins associate stateful values with a view. They can
1247
+ influence the way the content is drawn, and are notified of things
1248
+ that happen in the view.
1249
+ */
1250
+ declare class ViewPlugin {
1251
+ /**
1252
+ Define a plugin from a constructor function that creates the
1253
+ plugin's value, given an editor view.
1254
+ */
1255
+ static define(create: any, spec: any): ViewPlugin;
1256
+ /**
1257
+ Create a plugin for a class whose constructor takes a single
1258
+ editor view as argument.
1259
+ */
1260
+ static fromClass(cls: any, spec: any): ViewPlugin;
1261
+ constructor(id: any, create: any, domEventHandlers: any, domEventObservers: any, buildExtensions: any);
1262
+ id: any;
1263
+ create: any;
1264
+ domEventHandlers: any;
1265
+ domEventObservers: any;
1266
+ extension: any;
1267
+ }
1268
+ declare class FacetProvider {
1269
+ constructor(dependencies: any, facet: any, type: any, value: any);
1270
+ dependencies: any;
1271
+ facet: any;
1272
+ type: any;
1273
+ value: any;
1274
+ id: number;
1275
+ dynamicSlot(addresses: any): {
1276
+ create(state: any): number;
1277
+ update(state: any, tr: any): 1 | 0;
1278
+ reconfigure: (state: any, oldState: any) => 1 | 0;
1279
+ };
1280
+ }
1281
+ declare class PrecExtension {
1282
+ constructor(inner: any, prec: any);
1283
+ inner: any;
1284
+ prec: any;
1285
+ }
1286
+ declare const styleModule: Facet;
1287
+ declare const inputHandler$1: Facet;
1288
+ declare const clipboardInputFilter: Facet;
1289
+ declare const clipboardOutputFilter: Facet;
1290
+ declare const scrollHandler: Facet;
1291
+ declare const focusChangeEffect: Facet;
1292
+ declare const perLineTextDirection: Facet;
1293
+ declare const exceptionSink: Facet;
1294
+ declare const updateListener: Facet;
1295
+ declare const editable: Facet;
1296
+ declare const mouseSelectionStyle: Facet;
1297
+ declare const dragMovesSelection$1: Facet;
1298
+ declare const clickAddsSelectionRange: Facet;
1299
+ declare const decorations: Facet;
1300
+ declare const outerDecorations: Facet;
1301
+ declare const atomicRanges: Facet;
1302
+ declare const bidiIsolatedRanges: Facet;
1303
+ declare const scrollMargins: Facet;
1304
+ declare const darkTheme: Facet;
1305
+ declare const contentAttributes: Facet;
1306
+ declare const editorAttributes: Facet;
1307
+ /**
1308
+ Representation of a type of state effect. Defined with
1309
+ [`StateEffect.define`](https://codemirror.net/6/docs/ref/#state.StateEffect^define).
1310
+ */
1311
+ declare class StateEffectType {
1312
+ /**
1313
+ @internal
1314
+ */
1315
+ constructor(map: any);
1316
+ map: any;
1317
+ /**
1318
+ Create a [state effect](https://codemirror.net/6/docs/ref/#state.StateEffect) instance of this
1319
+ type.
1320
+ */
1321
+ of(value: any): StateEffect;
1322
+ }
1323
+ /**
1324
+ This class bundles a [language](https://codemirror.net/6/docs/ref/#language.Language) with an
1325
+ optional set of supporting extensions. Language packages are
1326
+ encouraged to export a function that optionally takes a
1327
+ configuration object and returns a `LanguageSupport` instance, as
1328
+ the main way for client code to use the package.
1329
+ */
1330
+ declare class LanguageSupport {
1331
+ /**
1332
+ Create a language support object.
1333
+ */
1334
+ constructor(language: any, support?: any[]);
1335
+ language: any;
1336
+ support: any[];
1337
+ extension: any[];
1338
+ }
1339
+ /**
1340
+ A change description is a variant of [change set](https://codemirror.net/6/docs/ref/#state.ChangeSet)
1341
+ that doesn't store the inserted text. As such, it can't be
1342
+ applied, but is cheaper to store and manipulate.
1343
+ */
1344
+ declare class ChangeDesc {
1345
+ /**
1346
+ Create a change desc from its JSON representation (as produced
1347
+ by [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeDesc.toJSON).
1348
+ */
1349
+ static fromJSON(json: any): ChangeDesc;
1350
+ /**
1351
+ @internal
1352
+ */
1353
+ static create(sections: any): ChangeDesc;
1354
+ /**
1355
+ @internal
1356
+ */
1357
+ constructor(sections: any);
1358
+ sections: any;
1359
+ /**
1360
+ The length of the document before the change.
1361
+ */
1362
+ get length(): number;
1363
+ /**
1364
+ The length of the document after the change.
1365
+ */
1366
+ get newLength(): number;
1367
+ /**
1368
+ False when there are actual changes in this set.
1369
+ */
1370
+ get empty(): boolean;
1371
+ /**
1372
+ Iterate over the unchanged parts left by these changes. `posA`
1373
+ provides the position of the range in the old document, `posB`
1374
+ the new position in the changed document.
1375
+ */
1376
+ iterGaps(f: any): void;
1377
+ /**
1378
+ Iterate over the ranges changed by these changes. (See
1379
+ [`ChangeSet.iterChanges`](https://codemirror.net/6/docs/ref/#state.ChangeSet.iterChanges) for a
1380
+ variant that also provides you with the inserted text.)
1381
+ `fromA`/`toA` provides the extent of the change in the starting
1382
+ document, `fromB`/`toB` the extent of the replacement in the
1383
+ changed document.
1384
+
1385
+ When `individual` is true, adjacent changes (which are kept
1386
+ separate for [position mapping](https://codemirror.net/6/docs/ref/#state.ChangeDesc.mapPos)) are
1387
+ reported separately.
1388
+ */
1389
+ iterChangedRanges(f: any, individual?: boolean): void;
1390
+ /**
1391
+ Get a description of the inverted form of these changes.
1392
+ */
1393
+ get invertedDesc(): ChangeDesc;
1394
+ /**
1395
+ Compute the combined effect of applying another set of changes
1396
+ after this one. The length of the document after this set should
1397
+ match the length before `other`.
1398
+ */
1399
+ composeDesc(other: any): any;
1400
+ /**
1401
+ Map this description, which should start with the same document
1402
+ as `other`, over another set of changes, so that it can be
1403
+ applied after it. When `before` is true, map as if the changes
1404
+ in `this` happened before the ones in `other`.
1405
+ */
1406
+ mapDesc(other: any, before?: boolean): ChangeDesc;
1407
+ mapPos(pos: any, assoc?: number, mode?: any): any;
1408
+ /**
1409
+ Check whether these changes touch a given range. When one of the
1410
+ changes entirely covers the range, the string `"cover"` is
1411
+ returned.
1412
+ */
1413
+ touchesRange(from: any, to?: any): boolean | "cover";
1414
+ /**
1415
+ @internal
1416
+ */
1417
+ toString(): string;
1418
+ /**
1419
+ Serialize this change desc to a JSON-representable value.
1420
+ */
1421
+ toJSON(): any;
1422
+ }
1423
+ declare class HeightOracle {
1424
+ constructor(lineWrapping: any);
1425
+ lineWrapping: any;
1426
+ doc: TextLeaf;
1427
+ heightSamples: {};
1428
+ lineHeight: number;
1429
+ charWidth: number;
1430
+ textHeight: number;
1431
+ lineLength: number;
1432
+ heightForGap(from: any, to: any): number;
1433
+ heightForLine(length: any): number;
1434
+ setDoc(doc: any): this;
1435
+ mustRefreshForWrapping(whiteSpace: any): boolean;
1436
+ mustRefreshForHeights(lineHeights: any): boolean;
1437
+ refresh(whiteSpace: any, lineHeight: any, charWidth: any, textHeight: any, lineLength: any, knownHeights: any): boolean;
1438
+ }
1439
+ declare class EditContextManager {
1440
+ constructor(view: any);
1441
+ from: number;
1442
+ to: number;
1443
+ pendingContextChange: {
1444
+ from: any;
1445
+ to: any;
1446
+ insert: any;
1447
+ } | null;
1448
+ handlers: any;
1449
+ composing: any;
1450
+ editContext: any;
1451
+ measureReq: {
1452
+ read: (view: any) => void;
1453
+ };
1454
+ applyEdits(update: any): boolean;
1455
+ update(update: any): void;
1456
+ resetRange(state: any): void;
1457
+ reset(state: any): void;
1458
+ revertPending(state: any): void;
1459
+ setSelection(state: any): void;
1460
+ rangeIsValid(state: any): boolean;
1461
+ toEditorPos(contextPos: any, clipLen?: number): any;
1462
+ toContextPos(editorPos: any): any;
1463
+ destroy(): void;
1464
+ }
1465
+ declare class DOMSelectionState {
1466
+ anchorNode: any;
1467
+ anchorOffset: number;
1468
+ focusNode: any;
1469
+ focusOffset: number;
1470
+ eq(domSel: any): boolean;
1471
+ setRange(range: any): void;
1472
+ set(anchorNode: any, anchorOffset: any, focusNode: any, focusOffset: any): void;
1473
+ }
1474
+ declare class DOMChange {
1475
+ constructor(view: any, start: any, end: any, typeOver: any);
1476
+ typeOver: any;
1477
+ bounds: any;
1478
+ text: string;
1479
+ domChanged: boolean;
1480
+ newSel: EditorSelection | null;
1481
+ }
1482
+ declare class ContentView {
1483
+ static get(node: any): any;
1484
+ parent: any;
1485
+ dom: any;
1486
+ flags: number;
1487
+ get overrideDOMText(): null;
1488
+ get posAtStart(): any;
1489
+ get posAtEnd(): any;
1490
+ posBefore(view: any): any;
1491
+ posAfter(view: any): any;
1492
+ sync(view: any, track: any): void;
1493
+ reuseDOM(_dom: any): void;
1494
+ localPosFromDOM(node: any, offset: any): any;
1495
+ domBoundsAround(from: any, to: any, offset?: number): any;
1496
+ markDirty(andParent?: boolean): void;
1497
+ markParentsDirty(childList: any): void;
1498
+ setParent(parent: any): void;
1499
+ setDOM(dom: any): void;
1500
+ get rootView(): this;
1501
+ replaceChildren(from: any, to: any, children?: any[]): void;
1502
+ children: any;
1503
+ ignoreMutation(_rec: any): boolean;
1504
+ ignoreEvent(_event: any): boolean;
1505
+ childCursor(pos?: any): ChildCursor;
1506
+ childPos(pos: any, bias?: number): ChildCursor;
1507
+ toString(): string;
1508
+ get isEditable(): boolean;
1509
+ get isWidget(): boolean;
1510
+ get isHidden(): boolean;
1511
+ merge(from: any, to: any, source: any, hasStart: any, openStart: any, openEnd: any): boolean;
1512
+ become(other: any): boolean;
1513
+ canReuseDOM(other: any): boolean;
1514
+ getSide(): number;
1515
+ destroy(): void;
1516
+ breakAfter: number;
1517
+ }
1518
+ /**
1519
+ A range set stores a collection of [ranges](https://codemirror.net/6/docs/ref/#state.Range) in a
1520
+ way that makes them efficient to [map](https://codemirror.net/6/docs/ref/#state.RangeSet.map) and
1521
+ [update](https://codemirror.net/6/docs/ref/#state.RangeSet.update). This is an immutable data
1522
+ structure.
1523
+ */
1524
+ declare class RangeSet {
1525
+ /**
1526
+ @internal
1527
+ */
1528
+ static create(chunkPos: any, chunk: any, nextLayer: any, maxPoint: any): RangeSet;
1529
+ /**
1530
+ Iterate over the ranges in a collection of sets, in order,
1531
+ starting from `from`.
1532
+ */
1533
+ static iter(sets: any, from?: number): LayerCursor | HeapCursor;
1534
+ /**
1535
+ Iterate over two groups of sets, calling methods on `comparator`
1536
+ to notify it of possible differences.
1537
+ */
1538
+ static compare(oldSets: any, newSets: any, textDiff: any, comparator: any, minPointSize?: number): void;
1539
+ /**
1540
+ Compare the contents of two groups of range sets, returning true
1541
+ if they are equivalent in the given range.
1542
+ */
1543
+ static eq(oldSets: any, newSets: any, from: number | undefined, to: any): boolean;
1544
+ /**
1545
+ Iterate over a group of range sets at the same time, notifying
1546
+ the iterator about the ranges covering every given piece of
1547
+ content. Returns the open count (see
1548
+ [`SpanIterator.span`](https://codemirror.net/6/docs/ref/#state.SpanIterator.span)) at the end
1549
+ of the iteration.
1550
+ */
1551
+ static spans(sets: any, from: any, to: any, iterator: any, minPointSize?: number): number;
1552
+ /**
1553
+ Create a range set for the given range or array of ranges. By
1554
+ default, this expects the ranges to be _sorted_ (by start
1555
+ position and, if two start at the same position,
1556
+ `value.startSide`). You can pass `true` as second argument to
1557
+ cause the method to sort them.
1558
+ */
1559
+ static of(ranges: any, sort?: boolean): any;
1560
+ /**
1561
+ Join an array of range sets into a single set.
1562
+ */
1563
+ static join(sets: any): any;
1564
+ constructor(chunkPos: any, chunk: any, nextLayer: any, maxPoint: any);
1565
+ chunkPos: any;
1566
+ chunk: any;
1567
+ nextLayer: any;
1568
+ maxPoint: any;
1569
+ /**
1570
+ @internal
1571
+ */
1572
+ get length(): number;
1573
+ /**
1574
+ The number of ranges in the set.
1575
+ */
1576
+ get size(): any;
1577
+ /**
1578
+ @internal
1579
+ */
1580
+ chunkEnd(index: any): any;
1581
+ /**
1582
+ Update the range set, optionally adding new ranges or filtering
1583
+ out existing ones.
1584
+
1585
+ (Note: The type parameter is just there as a kludge to work
1586
+ around TypeScript variance issues that prevented `RangeSet<X>`
1587
+ from being a subtype of `RangeSet<Y>` when `X` is a subtype of
1588
+ `Y`.)
1589
+ */
1590
+ update(updateSpec: any): any;
1591
+ /**
1592
+ Map this range set through a set of changes, return the new set.
1593
+ */
1594
+ map(changes: any): any;
1595
+ /**
1596
+ Iterate over the ranges that touch the region `from` to `to`,
1597
+ calling `f` for each. There is no guarantee that the ranges will
1598
+ be reported in any specific order. When the callback returns
1599
+ `false`, iteration stops.
1600
+ */
1601
+ between(from: any, to: any, f: any): void;
1602
+ /**
1603
+ Iterate over the ranges in this set, in order, including all
1604
+ ranges that end at or after `from`.
1605
+ */
1606
+ iter(from?: number): LayerCursor | HeapCursor;
1607
+ /**
1608
+ @internal
1609
+ */
1610
+ get isEmpty(): boolean;
1611
+ }
1612
+ declare namespace RangeSet {
1613
+ let empty: RangeSet;
1614
+ }
1615
+ declare class DOMPos {
1616
+ static before(dom: any, precise: any): DOMPos;
1617
+ static after(dom: any, precise: any): DOMPos;
1618
+ constructor(node: any, offset: any, precise?: boolean);
1619
+ node: any;
1620
+ offset: any;
1621
+ precise: boolean;
1622
+ }
1623
+ declare class LineView extends ContentView {
1624
+ static find(docView: any, pos: any): LineView | null;
1625
+ constructor(...args: any[]);
1626
+ children: any[];
1627
+ length: number;
1628
+ prevAttrs: any;
1629
+ attrs: any;
1630
+ split(at: any): LineView;
1631
+ transferDOM(other: any): void;
1632
+ setDeco(attrs: any): void;
1633
+ append(child: any, openStart: any): void;
1634
+ addLineDeco(deco: any): void;
1635
+ domAtPos(pos: any): any;
1636
+ measureTextSize(): {
1637
+ lineHeight: any;
1638
+ charWidth: number;
1639
+ textHeight: any;
1640
+ } | null;
1641
+ coordsAt(pos: any, side: any): any;
1642
+ covers(): boolean;
1643
+ }
1644
+ declare class TextLeaf extends Text {
1645
+ static split(text: any, target: any): any;
1646
+ constructor(text: any, length?: number);
1647
+ text: any;
1648
+ length: number;
1649
+ get lines(): any;
1650
+ get children(): null;
1651
+ lineInner(target: any, isLine: any, line: any, offset: any): Line;
1652
+ decompose(from: any, to: any, target: any, open: any): void;
1653
+ sliceString(from: any, to?: number, lineSep?: string): string;
1654
+ flatten(target: any): void;
1655
+ scanIdentical(): number;
1656
+ }
1657
+ declare class ChildCursor {
1658
+ constructor(children: any, pos: any, i: any);
1659
+ children: any;
1660
+ pos: any;
1661
+ i: any;
1662
+ off: number;
1663
+ findPos(pos: any, bias?: number): this;
1664
+ }
1665
+ declare class LayerCursor {
1666
+ constructor(layer: any, skip: any, minPoint: any, rank?: number);
1667
+ layer: any;
1668
+ skip: any;
1669
+ minPoint: any;
1670
+ rank: number;
1671
+ get startSide(): any;
1672
+ get endSide(): any;
1673
+ goto(pos: any, side?: number): this;
1674
+ chunkIndex: number | undefined;
1675
+ rangeIndex: any;
1676
+ gotoInner(pos: any, side: any, forward: any): void;
1677
+ forward(pos: any, side: any): void;
1678
+ next(): void;
1679
+ from: any;
1680
+ to: any;
1681
+ value: any;
1682
+ setRangeIndex(index: any): void;
1683
+ nextChunk(): void;
1684
+ compare(other: any): number;
1685
+ }
1686
+ declare class HeapCursor {
1687
+ static from(sets: any, skip?: null, minPoint?: number): LayerCursor | HeapCursor;
1688
+ constructor(heap: any);
1689
+ heap: any;
1690
+ get startSide(): any;
1691
+ goto(pos: any, side?: number): this;
1692
+ forward(pos: any, side: any): void;
1693
+ next(): void;
1694
+ from: any;
1695
+ to: any;
1696
+ value: any;
1697
+ rank: any;
1698
+ }
1699
+ /**
1700
+ The data structure for documents. @nonabstract
1701
+ */
1702
+ declare class Text {
1703
+ /**
1704
+ Create a `Text` instance for the given array of lines.
1705
+ */
1706
+ static of(text: any): any;
1707
+ /**
1708
+ Get the line description around the given position.
1709
+ */
1710
+ lineAt(pos: any): any;
1711
+ /**
1712
+ Get the description for the given (1-based) line number.
1713
+ */
1714
+ line(n: any): any;
1715
+ /**
1716
+ Replace a range of the text with the given content.
1717
+ */
1718
+ replace(from: any, to: any, text: any): any;
1719
+ /**
1720
+ Append another document to this one.
1721
+ */
1722
+ append(other: any): any;
1723
+ /**
1724
+ Retrieve the text between the given points.
1725
+ */
1726
+ slice(from: any, to?: any): any;
1727
+ /**
1728
+ Test whether this text is equal to another instance.
1729
+ */
1730
+ eq(other: any): boolean;
1731
+ /**
1732
+ Iterate over the text. When `dir` is `-1`, iteration happens
1733
+ from end to start. This will return lines and the breaks between
1734
+ them as separate strings.
1735
+ */
1736
+ iter(dir?: number): RawTextCursor;
1737
+ /**
1738
+ Iterate over a range of the text. When `from` > `to`, the
1739
+ iterator will run in reverse.
1740
+ */
1741
+ iterRange(from: any, to?: any): PartialTextCursor;
1742
+ /**
1743
+ Return a cursor that iterates over the given range of lines,
1744
+ _without_ returning the line breaks between, and yielding empty
1745
+ strings for empty lines.
1746
+
1747
+ When `from` and `to` are given, they should be 1-based line numbers.
1748
+ */
1749
+ iterLines(from: any, to: any): LineCursor;
1750
+ /**
1751
+ Return the document as a string, using newline characters to
1752
+ separate lines.
1753
+ */
1754
+ toString(): any;
1755
+ /**
1756
+ Convert the document to an array of lines (which can be
1757
+ deserialized again via [`Text.of`](https://codemirror.net/6/docs/ref/#state.Text^of)).
1758
+ */
1759
+ toJSON(): any[];
1760
+ }
1761
+ declare namespace Text {
1762
+ let empty_1: TextLeaf;
1763
+ export { empty_1 as empty };
1764
+ }
1765
+ /**
1766
+ This type describes a line in the document. It is created
1767
+ on-demand when lines are [queried](https://codemirror.net/6/docs/ref/#state.Text.lineAt).
1768
+ */
1769
+ declare class Line {
1770
+ /**
1771
+ @internal
1772
+ */
1773
+ constructor(from: any, to: any, number: any, text: any);
1774
+ from: any;
1775
+ to: any;
1776
+ number: any;
1777
+ text: any;
1778
+ /**
1779
+ The length of the line (not including any line break after it).
1780
+ */
1781
+ get length(): number;
1782
+ }
1783
+ declare class RawTextCursor {
1784
+ constructor(text: any, dir?: number);
1785
+ dir: number;
1786
+ done: boolean;
1787
+ lineBreak: boolean;
1788
+ value: string;
1789
+ nodes: any[];
1790
+ offsets: number[];
1791
+ nextInner(skip: any, dir: any): this;
1792
+ next(skip?: number): this;
1793
+ }
1794
+ declare class PartialTextCursor {
1795
+ constructor(text: any, start: any, end: any);
1796
+ value: string;
1797
+ done: boolean;
1798
+ cursor: RawTextCursor;
1799
+ pos: any;
1800
+ from: number;
1801
+ to: number;
1802
+ nextInner(skip: any, dir: any): this;
1803
+ next(skip?: number): this;
1804
+ get lineBreak(): boolean;
1805
+ }
1806
+ declare class LineCursor {
1807
+ constructor(inner: any);
1808
+ inner: any;
1809
+ afterBreak: boolean;
1810
+ value: string;
1811
+ done: boolean;
1812
+ next(skip?: number): this;
1813
+ get lineBreak(): boolean;
1814
+ }
1815
+ export {};