@fusion.dev/helix-headless 0.215.3 → 0.216.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 (113) hide show
  1. package/api.json +1 -1
  2. package/custom-elements.json +1 -1
  3. package/dist/area-chart/root/area-chart-root.d.ts +1 -0
  4. package/dist/area-chart/root/area-chart-root.js +1 -1
  5. package/dist/bar-chart/root/bar-chart-root.d.ts +1 -0
  6. package/dist/bar-chart/root/bar-chart-root.js +1 -1
  7. package/dist/button/root/button-root.d.ts +3 -1
  8. package/dist/button/root/button-root.js +2 -1
  9. package/dist/chat/composer/chat-composer.d.ts +18 -1
  10. package/dist/chat/composer/chat-composer.js +8 -3
  11. package/dist/checkbox/root/checkbox-root.d.ts +3 -1
  12. package/dist/checkbox/root/checkbox-root.js +2 -1
  13. package/dist/code-block/highlight.d.ts +9 -0
  14. package/dist/code-block/highlight.js +39 -0
  15. package/dist/code-block/highlighter.d.ts +44 -0
  16. package/dist/code-block/highlighter.js +44 -0
  17. package/dist/code-block/index.d.ts +1 -0
  18. package/dist/code-block/index.js +1 -0
  19. package/dist/code-block/keyed-lines.d.ts +23 -0
  20. package/dist/code-block/keyed-lines.js +75 -0
  21. package/dist/code-block/root/code-block-root.d.ts +6 -23
  22. package/dist/code-block/root/code-block-root.js +8 -25
  23. package/dist/code-editor/index.d.ts +1 -0
  24. package/dist/code-editor/index.js +1 -0
  25. package/dist/code-editor/root/code-editor-root.d.ts +367 -0
  26. package/dist/code-editor/root/code-editor-root.js +746 -0
  27. package/dist/code-input/index.d.ts +1 -0
  28. package/dist/code-input/index.js +1 -0
  29. package/dist/code-input/root/code-input-root.d.ts +119 -0
  30. package/dist/code-input/root/code-input-root.js +142 -0
  31. package/dist/combobox/root/combobox-root.d.ts +6 -1
  32. package/dist/combobox/root/combobox-root.js +4 -2
  33. package/dist/command/root/command-root.d.ts +61 -11
  34. package/dist/command/root/command-root.js +88 -3
  35. package/dist/donut-chart/root/donut-chart-root.d.ts +1 -0
  36. package/dist/donut-chart/root/donut-chart-root.js +1 -1
  37. package/dist/element-events.generated.js +36 -3
  38. package/dist/filter-input/root/filter-input-root.d.ts +9 -1
  39. package/dist/filter-input/root/filter-input-root.js +7 -3
  40. package/dist/heatmap/root/heatmap-root.d.ts +1 -0
  41. package/dist/heatmap/root/heatmap-root.js +1 -1
  42. package/dist/index.d.ts +4 -0
  43. package/dist/index.js +4 -0
  44. package/dist/input/root/input-root.d.ts +14 -2
  45. package/dist/input/root/input-root.js +11 -3
  46. package/dist/kbd/root/kbd-root.js +9 -2
  47. package/dist/line-chart/root/line-chart-root.d.ts +1 -0
  48. package/dist/line-chart/root/line-chart-root.js +1 -1
  49. package/dist/listbox/root/listbox-root.d.ts +8 -1
  50. package/dist/listbox/root/listbox-root.js +7 -4
  51. package/dist/markdown/blocks.d.ts +66 -0
  52. package/dist/markdown/blocks.js +326 -0
  53. package/dist/markdown/index.d.ts +6 -0
  54. package/dist/markdown/index.js +5 -0
  55. package/dist/markdown/inline.d.ts +57 -0
  56. package/dist/markdown/inline.js +483 -0
  57. package/dist/markdown/root/markdown-root.d.ts +99 -0
  58. package/dist/markdown/root/markdown-root.js +93 -0
  59. package/dist/markdown/stream.d.ts +47 -0
  60. package/dist/markdown/stream.js +62 -0
  61. package/dist/markdown/tree.d.ts +57 -0
  62. package/dist/markdown/tree.js +144 -0
  63. package/dist/markdown/writer.d.ts +33 -0
  64. package/dist/markdown/writer.js +139 -0
  65. package/dist/menu/root/menu-root.d.ts +53 -0
  66. package/dist/menu/root/menu-root.js +92 -15
  67. package/dist/pagination/size/pagination-size.d.ts +3 -0
  68. package/dist/pagination/size/pagination-size.js +2 -1
  69. package/dist/scatter-chart/root/scatter-chart-root.d.ts +1 -0
  70. package/dist/scatter-chart/root/scatter-chart-root.js +1 -1
  71. package/dist/select/root/select-root.d.ts +6 -1
  72. package/dist/select/root/select-root.js +4 -2
  73. package/dist/shortcut-overlay/index.d.ts +1 -0
  74. package/dist/shortcut-overlay/index.js +1 -0
  75. package/dist/shortcut-overlay/root/shortcut-overlay-root.d.ts +128 -0
  76. package/dist/shortcut-overlay/root/shortcut-overlay-root.js +275 -0
  77. package/dist/slider/root/slider-root.d.ts +3 -1
  78. package/dist/slider/root/slider-root.js +2 -1
  79. package/dist/spatial-bar-chart/root/spatial-bar-chart-root.d.ts +1 -0
  80. package/dist/spatial-bar-chart/root/spatial-bar-chart-root.js +1 -1
  81. package/dist/spatial-heatmap/root/spatial-heatmap-root.d.ts +1 -0
  82. package/dist/spatial-heatmap/root/spatial-heatmap-root.js +1 -1
  83. package/dist/spatial-ribbon-chart/root/spatial-ribbon-chart-root.d.ts +1 -0
  84. package/dist/spatial-ribbon-chart/root/spatial-ribbon-chart-root.js +1 -1
  85. package/dist/spatial-scatter-chart/root/spatial-scatter-chart-root.d.ts +1 -0
  86. package/dist/spatial-scatter-chart/root/spatial-scatter-chart-root.js +1 -1
  87. package/dist/spatial-surface-chart/root/spatial-surface-chart-root.d.ts +1 -0
  88. package/dist/spatial-surface-chart/root/spatial-surface-chart-root.js +1 -1
  89. package/dist/spatial-treemap/root/spatial-treemap-root.d.ts +1 -0
  90. package/dist/spatial-treemap/root/spatial-treemap-root.js +1 -1
  91. package/dist/switch/root/switch-root.d.ts +3 -1
  92. package/dist/switch/root/switch-root.js +2 -1
  93. package/dist/tabs/tab/tab.d.ts +3 -1
  94. package/dist/tabs/tab/tab.js +2 -1
  95. package/dist/textarea/root/textarea-root.d.ts +20 -4
  96. package/dist/textarea/root/textarea-root.js +31 -23
  97. package/dist/time-input/root/time-input-root.d.ts +6 -0
  98. package/dist/time-input/root/time-input-root.js +4 -2
  99. package/dist/time-picker/root/time-picker-root.d.ts +6 -0
  100. package/dist/time-picker/root/time-picker-root.js +4 -2
  101. package/dist/toast/root/toast-root.d.ts +64 -0
  102. package/dist/toast/root/toast-root.js +128 -3
  103. package/dist/toggle/root/toggle-root.d.ts +3 -1
  104. package/dist/toggle/root/toggle-root.js +2 -1
  105. package/dist/virtual-list/root/virtual-list-root.d.ts +18 -2
  106. package/dist/virtual-list/root/virtual-list-root.js +103 -5
  107. package/examples.json +1 -1
  108. package/lint.json +1 -1
  109. package/package.json +6 -6
  110. package/types/jsx.d.ts +5315 -596
  111. package/types/svelte.d.ts +4 -0
  112. package/types/vue.d.ts +1085 -4
  113. package/types/words.d.ts +491 -0
@@ -0,0 +1,367 @@
1
+ import { AriaForwardController, HelixFormElement, ListedController } from '@fusion.dev/helix-core';
2
+ import { nothing, type PropertyValues, type TemplateResult } from 'lit';
3
+ import '../../button/index.js';
4
+ import '../../icon-button/index.js';
5
+ import '../../toolbar/index.js';
6
+ /** A problem in the text, from a linter or a language server, by where it is. */
7
+ export interface EditorDiagnostic {
8
+ /** Where it starts and ends, as offsets into the value. */
9
+ from: number;
10
+ message: string;
11
+ to: number;
12
+ /** How bad it is. `danger` by default. */
13
+ tone?: 'danger' | 'info' | 'warning';
14
+ }
15
+ /** What an editor shows, which an engine draws. */
16
+ export interface EditorEngineState {
17
+ diagnostics: readonly EditorDiagnostic[];
18
+ /** The editor's name, for the engine's text area. */
19
+ label: string;
20
+ /** The language to highlight, such as `ts`, `css`, `md` or `rust`. Empty is plain text. */
21
+ language: string;
22
+ lineNumbers: boolean;
23
+ placeholder: string;
24
+ readOnly: boolean;
25
+ value: string;
26
+ wrap: boolean;
27
+ }
28
+ /** What the editor tells the engine, which the engine calls as the reader works. */
29
+ export interface EditorEngineListeners {
30
+ /** The caret or selection moved, as offsets into the value. */
31
+ caret?(from: number, to: number): void;
32
+ /** The reader changed the text. Returns whether the change stands, so the engine can refuse one the page refused. */
33
+ change(value: string): boolean;
34
+ }
35
+ /** What the find bar asks an engine to look for. */
36
+ export interface EditorFindQuery {
37
+ caseSensitive: boolean;
38
+ regex: boolean;
39
+ /** What Replace puts in place of a match. */
40
+ replace: string;
41
+ search: string;
42
+ wholeWord: boolean;
43
+ }
44
+ /** Where a search stands: how many matches, and which is selected, counting from 0, or -1 for none. */
45
+ export interface EditorFindResult {
46
+ count: number;
47
+ index: number;
48
+ }
49
+ /** An engine drawing one editor, which the editor drives. */
50
+ export interface EditorEngineView {
51
+ /** Takes the engine out of the page. */
52
+ destroy(): void;
53
+ /**
54
+ * Finds `query` and selects a match: the first from the caret, or the next
55
+ * or previous from the selected one. Marks every match while the find bar
56
+ * is open.
57
+ */
58
+ find?(query: EditorFindQuery, direction: 'first' | 'next' | 'previous'): EditorFindResult;
59
+ /** Takes the marks a search drew away, as the find bar closes. */
60
+ findEnd?(): void;
61
+ /** Puts the caret in the engine's text area. */
62
+ focus?(): void;
63
+ /** Replaces the selected match, or every match, and returns where the search stands after. */
64
+ replace?(query: EditorFindQuery, all: boolean): EditorFindResult;
65
+ /** Selects a range, scrolls it into view and puts the caret there. */
66
+ select?(from: number, to: number): void;
67
+ /** Shows a new state: a value set from outside, a language, diagnostics. */
68
+ update(state: EditorEngineState): void;
69
+ }
70
+ /**
71
+ * Something that draws a code editor, such as CodeMirror through
72
+ * `@fusion.dev/helix-editor`. The editor hands it an element to draw in.
73
+ */
74
+ export interface EditorEngine {
75
+ mount(parent: HTMLElement, state: EditorEngineState, listeners: EditorEngineListeners): EditorEngineView;
76
+ }
77
+ /** Each diagnostic's line, counted from 1, by its start, from one pass over the value. */
78
+ export declare const diagnosticLines: (value: string, diagnostics: readonly EditorDiagnostic[]) => number[];
79
+ /** The line and column an offset is at, each counted from 1. */
80
+ export declare const positionOf: (value: string, at: number) => {
81
+ column: number;
82
+ line: number;
83
+ };
84
+ /** Where a query matches in a text, as `[from, to]` offsets, with no empty match. */
85
+ export declare const findRanges: (text: string, query: EditorFindQuery) => Array<[number, number]>;
86
+ declare const HelixHeadlessCodeEditor_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerValueInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinFieldInterface) & typeof HelixFormElement;
87
+ /**
88
+ * @summary An editor for a file of code, drawn by a code editor you connect.
89
+ *
90
+ * @description
91
+ * A pane for working on a file: a header with its name, its language and the
92
+ * page's own actions, the code, the problems in it, and a status line that
93
+ * says where the caret is. On its own the code is a `<textarea>` in the code
94
+ * face. Connect an engine and it draws the code instead: `connectEditor` from
95
+ * `@fusion.dev/helix-editor` connects CodeMirror, with highlighting in your
96
+ * theme's syntax colors, line numbers, folding, bracket matching and history.
97
+ * The value, the form, validation and the events stay the editor's, so a page
98
+ * reads and writes it the same either way.
99
+ *
100
+ * For a few lines in a form, such as a setting in JSON, use `Code Input`,
101
+ * which needs no engine.
102
+ *
103
+ * - `language` picks the highlighting, such as `ts`, `css`, `html`, `md`,
104
+ * `json`, `python`, `rust` or `sh`, and the header names it.
105
+ * - `diagnostics` marks problems, from a linter or a language server: each is
106
+ * underlined in the text, its line number is drawn in its tone, and it is
107
+ * listed under the code, where pressing it moves the caret to it.
108
+ * - The find bar finds, with the case, whole words or a regular expression,
109
+ * and replaces once its first button shows the replace field, in the
110
+ * engine or in the plain field alike.
111
+ * - Every change goes through `requestValue`, so a listener refusing
112
+ * `helix-before-change` refuses the keystroke, in the engine too.
113
+ *
114
+ * **Keyboard.** Command+F, or Control+F elsewhere, opens the find bar, Enter
115
+ * and Shift+Enter move between matches, and Escape closes it. In an engine,
116
+ * Tab indents and Escape then Tab leaves the editor, so the editor is never a
117
+ * trap for a reader without a pointer.
118
+ *
119
+ * @since 0.216.0
120
+ * @status experimental
121
+ * @category inputs
122
+ * @aliases Code editor, CodeMirror, File editor, IDE, Monaco
123
+ * @documentation https://fusion.dev/helix/components/code-editor
124
+ *
125
+ * @slot actions - The page's own controls in the header, such as Run or Format, before the built-in ones.
126
+ * @slot hint - Help under the editor, in place of `hint`.
127
+ * @slot label - The editor's name in the header, such as a file name, in place of `label`.
128
+ *
129
+ * @event {Event} change - The reader finished an edit and focus left the code, in the engine or the plain field.
130
+ * @event {HelixBeforeChangeEvent} helix-before-change - The text is about to change. Cancelable: cancel it to keep the current text.
131
+ * @event {Event} input - Fired after the text changes.
132
+ *
133
+ * @csspart body - The box the code is drawn in, between the header and the problems.
134
+ * @csspart control - The `<textarea>` the editor is without an engine, and that keeps its validity with one.
135
+ * @csspart controls - The toolbar in the header: the page's actions, then Find.
136
+ * @csspart controls-toolbar - The box inside the header's toolbar that lays its buttons out.
137
+ * @csspart diagnostic - One problem in the list, a button that moves the caret to it.
138
+ * @csspart diagnostic-danger - A problem whose tone is `danger`, beside `diagnostic`.
139
+ * @csspart diagnostic-icon - The mark of a problem's tone, before its words.
140
+ * @csspart diagnostic-info - A problem whose tone is `info`, beside `diagnostic`.
141
+ * @csspart diagnostic-warning - A problem whose tone is `warning`, beside `diagnostic`.
142
+ * @csspart diagnostics - The list of problems under the code, while there are any.
143
+ * @csspart feedback - The message that says what is wrong.
144
+ * @csspart field - The frame around the header, the code, the problems and the status line.
145
+ * @csspart find - The button in the header that opens the find bar.
146
+ * @csspart find-bar - The find bar under the header, while it is open.
147
+ * @csspart find-button - The Find button's inner button.
148
+ * @csspart find-close - The button that closes the find bar.
149
+ * @csspart find-close-button - The close button's inner button.
150
+ * @csspart find-close-live - The close button's live region, which speaks while the button is pending.
151
+ * @csspart find-close-spinner - The ring the close button turns while it is pending.
152
+ * @csspart find-close-text - The box the close button's icon sits in.
153
+ * @csspart find-controls - The find bar's toolbar of options and moves.
154
+ * @csspart find-controls-toolbar - The box inside the find bar's toolbar that lays its buttons out.
155
+ * @csspart find-count - Which match is selected, of how many.
156
+ * @csspart find-field - The field the search is typed in.
157
+ * @csspart find-live - The Find button's live region, which speaks while the button is pending.
158
+ * @csspart find-match-case - The option that finds only the same case. Pressed while it applies.
159
+ * @csspart find-match-case-button - The match case button's inner button.
160
+ * @csspart find-match-case-live - The match case button's live region, which speaks while the button is pending.
161
+ * @csspart find-match-case-spinner - The ring the match case button turns while it is pending.
162
+ * @csspart find-match-case-text - The box the match case button's icon sits in.
163
+ * @csspart find-next - The button that selects the next match.
164
+ * @csspart find-next-button - The next match button's inner button.
165
+ * @csspart find-next-live - The next match button's live region, which speaks while the button is pending.
166
+ * @csspart find-next-spinner - The ring the next match button turns while it is pending.
167
+ * @csspart find-next-text - The box the next match button's icon sits in.
168
+ * @csspart find-previous - The button that selects the previous match.
169
+ * @csspart find-previous-button - The previous match button's inner button.
170
+ * @csspart find-previous-live - The previous match button's live region, which speaks while the button is pending.
171
+ * @csspart find-previous-spinner - The ring the previous match button turns while it is pending.
172
+ * @csspart find-previous-text - The box the previous match button's icon sits in.
173
+ * @csspart find-regex - The option that reads the search as a regular expression. Pressed while it applies.
174
+ * @csspart find-regex-button - The regular expression button's inner button.
175
+ * @csspart find-regex-live - The regular expression button's live region, which speaks while the button is pending.
176
+ * @csspart find-regex-spinner - The ring the regular expression button turns while it is pending.
177
+ * @csspart find-regex-text - The box the regular expression button's icon sits in.
178
+ * @csspart find-replace - The button that shows the replace field under the find field. Expanded while it shows.
179
+ * @csspart find-replace-button - The find and replace button's inner button.
180
+ * @csspart find-replace-live - The find and replace button's live region, which speaks while the button is pending.
181
+ * @csspart find-replace-spinner - The ring the find and replace button turns while it is pending.
182
+ * @csspart find-replace-text - The box the find and replace button's icon sits in.
183
+ * @csspart find-spinner - The ring the Find button turns while it is pending.
184
+ * @csspart find-text - The box the Find button's icon sits in.
185
+ * @csspart find-whole-word - The option that finds only whole words. Pressed while it applies.
186
+ * @csspart find-whole-word-button - The whole word button's inner button.
187
+ * @csspart find-whole-word-live - The whole word button's live region, which speaks while the button is pending.
188
+ * @csspart find-whole-word-spinner - The ring the whole word button turns while it is pending.
189
+ * @csspart find-whole-word-text - The box the whole word button's icon sits in.
190
+ * @csspart header - The strip above the code: the name, the language, and the controls.
191
+ * @csspart hint - Help under the editor, while nothing is wrong.
192
+ * @csspart label - The editor's name in the header.
193
+ * @csspart language - The language's name in the header.
194
+ * @csspart position - The caret's line and column, in the status line.
195
+ * @csspart problem-count - How many problems there are, in the status line.
196
+ * @csspart replace - The button that replaces the selected match.
197
+ * @csspart replace-all - The button that replaces every match.
198
+ * @csspart replace-all-button - The Replace all button's inner button.
199
+ * @csspart replace-all-live - The Replace all button's live region, which speaks while the button is pending.
200
+ * @csspart replace-all-spinner - The ring the Replace all button turns while it is pending.
201
+ * @csspart replace-all-text - The box the Replace all button's words sit in.
202
+ * @csspart replace-button - The Replace button's inner button.
203
+ * @csspart replace-field - The field the replacement is typed in.
204
+ * @csspart replace-live - The Replace button's live region, which speaks while the button is pending.
205
+ * @csspart replace-spinner - The ring the Replace button turns while it is pending.
206
+ * @csspart replace-text - The box the Replace button's words sit in.
207
+ * @csspart status - The strip under the code.
208
+ * @csspart view - Where an engine draws, while one is connected.
209
+ *
210
+ * @cssstate connected - An engine draws the editor.
211
+ * @cssstate find-open - The find bar is open.
212
+ * @cssstate invalid - The editor has an error to show, from `required` or your `feedback`.
213
+ * @cssstate replace-open - The replace field shows under the find field.
214
+ */
215
+ export declare class HelixHeadlessCodeEditor extends HelixHeadlessCodeEditor_base {
216
+ protected static markRules: string[];
217
+ /**
218
+ * The key this family's words are registered under, its styled tag:
219
+ * `registerWords('de', { 'helix-code-editor': { findLabel: 'Suchen' } })`.
220
+ */
221
+ static words: string;
222
+ /** On the page's list of controls, where a command palette and a shortcut overlay find it. */
223
+ protected readonly listed: ListedController;
224
+ protected readonly aria: AriaForwardController;
225
+ /** Typed, so every edit is announced. */
226
+ protected readonly announcesInput = true;
227
+ /** The name of the header's toolbar, read by screen readers. */
228
+ controlsLabel: string;
229
+ /** How one problem in the list reads. `{line}` is its line and `{message}` what it says. */
230
+ diagnosticLabel: string;
231
+ /** The problems in the text, each underlined and listed under the editor. */
232
+ diagnostics: readonly EditorDiagnostic[];
233
+ /** The list of problems' name. */
234
+ diagnosticsLabel: string;
235
+ /**
236
+ * What draws the editor, such as `codeMirrorEngine()` from
237
+ * `@fusion.dev/helix-editor`. Absent, the editor is a plain text field.
238
+ */
239
+ engine: EditorEngine | undefined;
240
+ /** The name of the find bar's Close button. */
241
+ findCloseLabel: string;
242
+ /** The name of the find bar's toolbar, read by screen readers. */
243
+ findControlsLabel: string;
244
+ /** What the find bar says when its regular expression cannot be read. */
245
+ findInvalidLabel: string;
246
+ /** The name of the Find button and the find bar's field. */
247
+ findLabel: string;
248
+ /** The name of the option that finds only the same case. */
249
+ findMatchCaseLabel: string;
250
+ /** The name of the button that selects the next match. */
251
+ findNextLabel: string;
252
+ /** The name of the button that selects the previous match. */
253
+ findPreviousLabel: string;
254
+ /** The name of the option that reads the search as a regular expression. */
255
+ findRegexLabel: string;
256
+ /** The name of the button that shows the replace field under the find field. */
257
+ findReplaceLabel: string;
258
+ /** The name of the option that finds only whole words. */
259
+ findWholeWordLabel: string;
260
+ /** The language to highlight, such as `ts`, `css`, `md` or `rust`. Empty is plain text. */
261
+ language: string;
262
+ /** Draws each line's number beside it, in an engine. */
263
+ lineNumbers: boolean;
264
+ /**
265
+ * What the find bar says of its matches. `{index}` is the selected match,
266
+ * counting from 1, and `{count}` how many there are.
267
+ */
268
+ matchesLabel: string;
269
+ /** Shown while the editor is empty. */
270
+ placeholder: string;
271
+ /** Where the caret is, in the status line. `{line}` and `{column}` count from 1. */
272
+ positionLabel: string;
273
+ /** How many problems there are, in the status line. `{count}` is the number. */
274
+ problemsLabel: string;
275
+ /** Lets the reader select and copy, and not change, the text. */
276
+ readOnly: boolean;
277
+ /** The name of the button that replaces every match. */
278
+ replaceAllLabel: string;
279
+ /** The name of the button that replaces the selected match. */
280
+ replaceLabel: string;
281
+ /** The name of the field the replacement is typed in. */
282
+ replaceWithLabel: string;
283
+ /** How many lines tall the plain field is before it scrolls, without an engine. */
284
+ rows: number;
285
+ /** Wraps long lines to the editor's width, in place of scrolling sideways. */
286
+ wrap: boolean;
287
+ /** Where the caret is, as an offset into the value. */
288
+ private caret;
289
+ /** Whether the find bar is open. */
290
+ private findOpen;
291
+ /** Where the search stands, or nothing before one. */
292
+ private found;
293
+ /** Whether the replace field shows under the find field. */
294
+ private replaceOpen;
295
+ private query;
296
+ private view;
297
+ /** Whether Escape came just before, which lets Tab leave the plain field. */
298
+ private escaped;
299
+ /** The value the engine last reported, which it need not be handed back. */
300
+ private engineValue;
301
+ /** Whether the engine took an edit since focus last left it, which `change` reports. */
302
+ private engineEdited;
303
+ /** The textarea, which the form's validity is read from either way. */
304
+ private get control();
305
+ private get engineState();
306
+ /** Whether the search can be read, which a regular expression may not be. */
307
+ private get readable();
308
+ /** Puts the caret in the editor, as a label pointing at it would. */
309
+ focus(options?: FocusOptions): void;
310
+ /** Selects a range of the code and puts the caret there, in the engine or the plain field. */
311
+ select(from: number, to?: number): void;
312
+ connectedCallback(): void;
313
+ disconnectedCallback(): void;
314
+ protected firstUpdated(changed: PropertyValues): void;
315
+ protected updated(changed: PropertyValues): void;
316
+ /** An edit in the engine: through `requestValue`, and announced where it stands. */
317
+ private engineChanged;
318
+ /** Focus left the engine after an edit, which is when a field says `change`. */
319
+ private readonly handleViewFocusOut;
320
+ /** Opens the find bar, with the selection as the search where one is selected, and puts focus in its field. */
321
+ private openFind;
322
+ /** Closes the find bar, takes the marks away, and puts focus back in the code. */
323
+ private closeFind;
324
+ /** Finds the search and selects a match, in the engine or the plain field. */
325
+ private search;
326
+ /** Replaces the selected match, or every match, through `requestValue`. */
327
+ private replace;
328
+ /** Turns one of the find bar's options on or off, and searches again with it. */
329
+ private toggleOption;
330
+ /** The find key opens the find bar from anywhere in the editor, ahead of the browser's own. */
331
+ private readonly handleKeys;
332
+ private readonly handleFindInput;
333
+ private readonly handleReplaceInput;
334
+ private readonly handleFindKeys;
335
+ /** An edit in the textarea, which has taken the character already: put back where it is refused. */
336
+ private readonly handleInput;
337
+ /** Relayed, because `change` does not cross a shadow boundary on its own. */
338
+ private readonly handleChange;
339
+ /** The caret in the plain field moved, by a key or a press. */
340
+ private readonly handleCaret;
341
+ /**
342
+ * Tab in the textarea types two spaces, as it does in an engine, unless
343
+ * Escape came just before it, which lets the reader leave.
344
+ */
345
+ private readonly handleKeydown;
346
+ /** The words the find bar's count says, or its regular expression's fault. */
347
+ private get countText();
348
+ /** The header: the name, the language, and the toolbar of the page's actions and Find. */
349
+ protected renderHeader(): TemplateResult;
350
+ /**
351
+ * The find bar, kept in the tree while closed so its fields keep what was
352
+ * typed. The fields stand outside the toolbar, which leaves the arrows to a
353
+ * text field.
354
+ */
355
+ protected renderFind(): TemplateResult;
356
+ /** The problems, each a button that moves the caret to it, in its tone. */
357
+ protected renderDiagnostics(): TemplateResult | typeof nothing;
358
+ /** The status line: where the caret is, and how many problems there are. */
359
+ protected renderStatus(): TemplateResult;
360
+ protected render(): TemplateResult;
361
+ }
362
+ declare global {
363
+ interface HTMLElementTagNameMap {
364
+ 'helix-headless-code-editor': HelixHeadlessCodeEditor;
365
+ }
366
+ }
367
+ export {};