acode-plugin-types 1.11.7-patch.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/index.d.ts +91 -0
- package/package.json +26 -0
- package/src/ace/index.d.ts +1 -0
- package/src/ace/modelist.d.ts +22 -0
- package/src/acode.d.ts +437 -0
- package/src/components/collapsibleList.d.ts +11 -0
- package/src/components/contextMenu.d.ts +66 -0
- package/src/components/index.d.ts +10 -0
- package/src/components/inputhints.d.ts +45 -0
- package/src/components/page.d.ts +22 -0
- package/src/components/palette.d.ts +21 -0
- package/src/components/sideButton.d.ts +35 -0
- package/src/components/terminal/index.d.ts +1 -0
- package/src/components/terminal/terminalManager.d.ts +113 -0
- package/src/components/toast.d.ts +20 -0
- package/src/components/tutorial.d.ts +13 -0
- package/src/components/webComponents/index.d.ts +1 -0
- package/src/components/webComponents/wcPage.d.ts +85 -0
- package/src/dialogs/alert.d.ts +15 -0
- package/src/dialogs/box.d.ts +45 -0
- package/src/dialogs/color.d.ts +15 -0
- package/src/dialogs/confirm.d.ts +16 -0
- package/src/dialogs/index.d.ts +8 -0
- package/src/dialogs/loader.d.ts +44 -0
- package/src/dialogs/multiPrompt.d.ts +16 -0
- package/src/dialogs/prompt.d.ts +47 -0
- package/src/dialogs/select.d.ts +66 -0
- package/src/fileSystem.d.ts +113 -0
- package/src/handlers/index.d.ts +3 -0
- package/src/handlers/intent.d.ts +47 -0
- package/src/handlers/keyboard.d.ts +30 -0
- package/src/handlers/windowResize.d.ts +13 -0
- package/src/index.d.ts +12 -0
- package/src/lib/actionStack.d.ts +60 -0
- package/src/lib/editorFile.d.ts +344 -0
- package/src/lib/editorManager.d.ts +127 -0
- package/src/lib/fileList.d.ts +70 -0
- package/src/lib/fonts.d.ts +29 -0
- package/src/lib/index.d.ts +9 -0
- package/src/lib/openFolder.d.ts +102 -0
- package/src/lib/projects.d.ts +28 -0
- package/src/lib/selectionMenu.d.ts +19 -0
- package/src/lib/settings.d.ts +155 -0
- package/src/pages/fileBrowser/fileBrowser.d.ts +65 -0
- package/src/pages/fileBrowser/index.d.ts +1 -0
- package/src/pages/index.d.ts +1 -0
- package/src/plugins/customtabs/CustomTabs.d.ts +57 -0
- package/src/plugins/customtabs/index.d.ts +1 -0
- package/src/plugins/index.d.ts +4 -0
- package/src/plugins/system/System.d.ts +550 -0
- package/src/plugins/system/index.d.ts +1 -0
- package/src/plugins/terminal/Executor.d.ts +155 -0
- package/src/plugins/terminal/Terminal.d.ts +123 -0
- package/src/plugins/terminal/index.d.ts +2 -0
- package/src/plugins/websocket/WebSocket.d.ts +224 -0
- package/src/plugins/websocket/index.d.ts +1 -0
- package/src/sideBarApps.d.ts +39 -0
- package/src/test.ts +517 -0
- package/src/theme/builder.d.ts +188 -0
- package/src/theme/index.d.ts +2 -0
- package/src/theme/list.d.ts +29 -0
- package/src/utils/KeyboardEvent.d.ts +19 -0
- package/src/utils/Url.d.ts +65 -0
- package/src/utils/color.d.ts +51 -0
- package/src/utils/encodings.d.ts +24 -0
- package/src/utils/helpers.d.ts +102 -0
- package/src/utils/index.d.ts +5 -0
- package/types/ace/VERSION +1 -0
- package/types/ace/ace-modes.d.ts +1724 -0
- package/types/ace/index.d.ts +1176 -0
- package/types/ace/types/ace-ext.d.ts +720 -0
- package/types/ace/types/ace-lib.d.ts +302 -0
- package/types/ace/types/ace-modules.d.ts +5293 -0
- package/types/ace/types/ace-snippets.d.ts +406 -0
- package/types/ace/types/ace-theme.d.ts +437 -0
- package/types/html-tag-js.d.ts +680 -0
- package/types/require.d.ts +412 -0
- package/types/xterm.d.ts +1908 -0
|
@@ -0,0 +1,680 @@
|
|
|
1
|
+
type HTMLTagNames = keyof HTMLElementTagNameMap & string;
|
|
2
|
+
|
|
3
|
+
interface HTMLElement {
|
|
4
|
+
/**
|
|
5
|
+
* Returns the first element that is a descendant of node that matches selectors.
|
|
6
|
+
*/
|
|
7
|
+
get<K extends keyof HTMLElementTagNameMap>(
|
|
8
|
+
selectors: K,
|
|
9
|
+
): HTMLElementTagNameMap[K] | null;
|
|
10
|
+
get<K extends keyof SVGElementTagNameMap>(
|
|
11
|
+
selectors: K,
|
|
12
|
+
): SVGElementTagNameMap[K] | null;
|
|
13
|
+
get<K extends keyof MathMLElementTagNameMap>(
|
|
14
|
+
selectors: K,
|
|
15
|
+
): MathMLElementTagNameMap[K] | null;
|
|
16
|
+
get<E extends Element = Element>(selectors: string): E | null;
|
|
17
|
+
/**
|
|
18
|
+
* Returns all element descendants of node that match selectors.
|
|
19
|
+
*/
|
|
20
|
+
getAll<K extends keyof HTMLElementTagNameMap>(
|
|
21
|
+
selectors: K,
|
|
22
|
+
): NodeListOf<HTMLElementTagNameMap[K]>;
|
|
23
|
+
getAll<K extends keyof SVGElementTagNameMap>(
|
|
24
|
+
selectors: K,
|
|
25
|
+
): NodeListOf<SVGElementTagNameMap[K]>;
|
|
26
|
+
getAll<K extends keyof MathMLElementTagNameMap>(
|
|
27
|
+
selectors: K,
|
|
28
|
+
): NodeListOf<MathMLElementTagNameMap[K]>;
|
|
29
|
+
getAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
|
|
30
|
+
/**
|
|
31
|
+
* Sets or gets the content of the element.
|
|
32
|
+
*/
|
|
33
|
+
content: HTMLElement & Array<HTMLElement>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
type StyleList = {
|
|
37
|
+
[key in keyof CSSStyleDeclaration]?: CSSStyleDeclaration[key];
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
type Dataset = {
|
|
41
|
+
[key: string]: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
type EnterKeyHint =
|
|
45
|
+
| "enter"
|
|
46
|
+
| "done"
|
|
47
|
+
| "go"
|
|
48
|
+
| "next"
|
|
49
|
+
| "previous"
|
|
50
|
+
| "search"
|
|
51
|
+
| "send";
|
|
52
|
+
|
|
53
|
+
interface HTMLElementAttributes {
|
|
54
|
+
/**
|
|
55
|
+
* The id of the element.
|
|
56
|
+
*/
|
|
57
|
+
id?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Sets content of the element.
|
|
60
|
+
* @example $div.content = tag('span', 'Hello World!');
|
|
61
|
+
*/
|
|
62
|
+
content?: HTMLElement & Array<HTMLElement>;
|
|
63
|
+
/**
|
|
64
|
+
* css class name
|
|
65
|
+
*/
|
|
66
|
+
className?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Sets attributes of element.
|
|
69
|
+
*/
|
|
70
|
+
attr?: { string: string };
|
|
71
|
+
/**
|
|
72
|
+
* child of this element.
|
|
73
|
+
*/
|
|
74
|
+
child?: Node;
|
|
75
|
+
/**
|
|
76
|
+
* children of the this element.
|
|
77
|
+
*/
|
|
78
|
+
children?: Array<Node>;
|
|
79
|
+
/**
|
|
80
|
+
* style of the HTMLElement
|
|
81
|
+
*/
|
|
82
|
+
style?: StyleList;
|
|
83
|
+
/**
|
|
84
|
+
* Forms a class of attributes, called custom data attributes, that allow proprietary information to be exchanged between the HTML and its DOM representation that may be used by scripts. All such custom data are available via the HTMLElement interface of the element the attribute is set on. The HTMLElement.dataset property gives access to them.
|
|
85
|
+
*/
|
|
86
|
+
dataset?: Dataset;
|
|
87
|
+
/**
|
|
88
|
+
* A string representing the access key assigned to the element.
|
|
89
|
+
*/
|
|
90
|
+
accessKey?: string;
|
|
91
|
+
/**
|
|
92
|
+
* A string reflecting the aria-atomic attribute, which indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.
|
|
93
|
+
*/
|
|
94
|
+
ariaAtomic?: "true" | "false";
|
|
95
|
+
/**
|
|
96
|
+
* A string reflecting the aria-autocomplete attribute, which indicates whether inputting text could trigger display of one or more predictions of the user's intended value for a combobox, searchbox, or textbox and specifies how predictions would be presented if they were made.
|
|
97
|
+
*/
|
|
98
|
+
ariaAutoComplete?: "inline" | "list" | "both" | "none";
|
|
99
|
+
/**
|
|
100
|
+
*The ariaBusy property of the Element interface reflects the value of the aria-busy attribute, which indicates whether an element is being modified, as assistive technologies may want to wait until the modifications are complete before exposing them to the user.
|
|
101
|
+
*/
|
|
102
|
+
ariaBusy?: "true" | "false";
|
|
103
|
+
/**
|
|
104
|
+
* A string reflecting the aria-checked attribute, which indicates the current "checked" state of checkboxes, radio buttons, and other widgets that have a checked state.
|
|
105
|
+
*/
|
|
106
|
+
ariaChecked?: "true" | "false" | "mixed";
|
|
107
|
+
/**
|
|
108
|
+
* A number reflecting the aria-colcount attribute, which defines the number of columns in a table, grid, or treegrid.
|
|
109
|
+
*/
|
|
110
|
+
ariaColCount?: number;
|
|
111
|
+
/**
|
|
112
|
+
* A number reflecting the aria-colindex attribute, which defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
|
|
113
|
+
*/
|
|
114
|
+
ariaColIndex?: number;
|
|
115
|
+
/**
|
|
116
|
+
* A string reflecting the aria-colindextext attribute, which defines a human readable text alternative of aria-colindex.
|
|
117
|
+
*/
|
|
118
|
+
ariaColIndexText?: string;
|
|
119
|
+
/**
|
|
120
|
+
* A number reflecting the aria-colspan attribute, which defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
|
|
121
|
+
*/
|
|
122
|
+
ariaColSpan?: number;
|
|
123
|
+
/**
|
|
124
|
+
* A string reflecting the aria-current attribute, which indicates the element that represents the current item within a container or set of related elements.
|
|
125
|
+
*/
|
|
126
|
+
ariaCurrent?:
|
|
127
|
+
| "page"
|
|
128
|
+
| "step"
|
|
129
|
+
| "location"
|
|
130
|
+
| "date"
|
|
131
|
+
| "time"
|
|
132
|
+
| "true"
|
|
133
|
+
| "false";
|
|
134
|
+
/**
|
|
135
|
+
* A string reflecting the aria-description attribute, which defines a string value that describes or annotates the current element.
|
|
136
|
+
*/
|
|
137
|
+
ariaDescription?: string;
|
|
138
|
+
/**
|
|
139
|
+
* A string reflecting the aria-disabled attribute, which indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
|
|
140
|
+
*/
|
|
141
|
+
ariaDisabled?: "true" | "false";
|
|
142
|
+
/**
|
|
143
|
+
* A string reflecting the aria-expanded attribute, which indicates whether a grouping element owned or controlled by this element is expanded or collapsed.
|
|
144
|
+
*/
|
|
145
|
+
ariaExpanded?: "true" | "false" | "undefined";
|
|
146
|
+
/**
|
|
147
|
+
* A string reflecting the aria-haspopup attribute, which indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.
|
|
148
|
+
*/
|
|
149
|
+
ariaHasPopup?:
|
|
150
|
+
| "true"
|
|
151
|
+
| "false"
|
|
152
|
+
| "menu"
|
|
153
|
+
| "listbox"
|
|
154
|
+
| "tree"
|
|
155
|
+
| "grid"
|
|
156
|
+
| "dialog";
|
|
157
|
+
/**
|
|
158
|
+
* A string reflecting the aria-hidden attribute, which indicates whether the element is exposed to an accessibility API.
|
|
159
|
+
*/
|
|
160
|
+
ariaHidden?: "true" | "false" | "undefined";
|
|
161
|
+
/**
|
|
162
|
+
* A string reflecting the aria-keyshortcuts attribute, which indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
|
|
163
|
+
*/
|
|
164
|
+
ariaKeyShortCuts?: string;
|
|
165
|
+
/**
|
|
166
|
+
* A string reflecting the aria-label attribute, which defines a string value that labels the current element.
|
|
167
|
+
*/
|
|
168
|
+
ariaLabel?: string;
|
|
169
|
+
/**
|
|
170
|
+
* A number reflecting the aria-level attribute, which defines the hierarchical level of an element within a structure.
|
|
171
|
+
*/
|
|
172
|
+
ariaLevel?: number;
|
|
173
|
+
/**
|
|
174
|
+
* A string reflecting the aria-live attribute, which indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.
|
|
175
|
+
*/
|
|
176
|
+
ariaLive?: "assertive" | "off" | "polite";
|
|
177
|
+
/**
|
|
178
|
+
* A string reflecting the aria-modal attribute, which indicates whether an element is modal when displayed.
|
|
179
|
+
*/
|
|
180
|
+
ariaModal?: "true" | "false";
|
|
181
|
+
/**
|
|
182
|
+
* A string reflecting the aria-multiline attribute, which indicates whether a text box accepts multiple lines of input or only a single line.
|
|
183
|
+
*/
|
|
184
|
+
ariaMultiline?: "true" | "false";
|
|
185
|
+
/**
|
|
186
|
+
* A string reflecting the aria-multiselectable attribute, which indicates that the user may select more than one item from the current selectable descendants.
|
|
187
|
+
*/
|
|
188
|
+
ariaMultiSelectable?: "true" | "false";
|
|
189
|
+
/**
|
|
190
|
+
* A string reflecting the aria-orientation attribute, which indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.
|
|
191
|
+
*/
|
|
192
|
+
ariaOrientation?: "horizontal" | "vertical" | "undefined";
|
|
193
|
+
/**
|
|
194
|
+
* A string reflecting the aria-placeholder attribute, which defines a short hint intended to aid the user with data entry when the control has no value.
|
|
195
|
+
*/
|
|
196
|
+
ariaPlaceholder?: string;
|
|
197
|
+
/**
|
|
198
|
+
* A number reflecting the aria-posinset attribute, which defines an element's number or position in the current set of listitems or treeitems.
|
|
199
|
+
*/
|
|
200
|
+
ariaPosInSet?: number;
|
|
201
|
+
/**
|
|
202
|
+
* A string reflecting the aria-pressed attribute, which indicates the current "pressed" state of toggle buttons.
|
|
203
|
+
*/
|
|
204
|
+
ariaPressed?: "true" | "false" | "mixed" | "undefined";
|
|
205
|
+
/**
|
|
206
|
+
* A string reflecting the aria-readonly attribute, which indicates that the element is not editable, but is otherwise operable.
|
|
207
|
+
*/
|
|
208
|
+
ariaReadOnly?: "true" | "false";
|
|
209
|
+
/**
|
|
210
|
+
* A string reflecting the aria-relevant attribute, which indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. This is used to describe what changes in an aria-live region are relevant and should be announced.
|
|
211
|
+
*/
|
|
212
|
+
ariaRelevant?: "additions" | "removals" | "text" | "all";
|
|
213
|
+
/**
|
|
214
|
+
* A string reflecting the aria-required attribute, which indicates that user input is required on the element before a form may be submitted.
|
|
215
|
+
*/
|
|
216
|
+
ariaRequired?: "true" | "false";
|
|
217
|
+
/**
|
|
218
|
+
* A string reflecting the aria-roledescription attribute, which defines a human-readable, author-localized description for the role of an element.
|
|
219
|
+
*/
|
|
220
|
+
ariaRoleDescription?: string;
|
|
221
|
+
/**
|
|
222
|
+
* A string reflecting the aria-rowcount attribute, which defines the total number of rows in a table, grid, or treegrid.
|
|
223
|
+
*/
|
|
224
|
+
ariaRowCount?: number;
|
|
225
|
+
/**
|
|
226
|
+
* A string reflecting the aria-rowindex attribute, which defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
|
|
227
|
+
*/
|
|
228
|
+
ariaRowIndex?: number;
|
|
229
|
+
/**
|
|
230
|
+
* A string reflecting the aria-rowindextext attribute, which defines a human readable text alternative of aria-rowindex.
|
|
231
|
+
*/
|
|
232
|
+
ariaRowIndexText?: string;
|
|
233
|
+
/**
|
|
234
|
+
* A number reflecting the aria-rowspan attribute, which defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
|
|
235
|
+
*/
|
|
236
|
+
ariaRowSpan?: number;
|
|
237
|
+
/**
|
|
238
|
+
* A string reflecting the aria-selected attribute, which indicates the current "selected" state of elements that have a selected state.
|
|
239
|
+
*/
|
|
240
|
+
ariaSelected?: "true" | "false" | "undefined";
|
|
241
|
+
/**
|
|
242
|
+
* A number reflecting the aria-setsize attribute, which defines the number of items in the current set of listitems or treeitems.
|
|
243
|
+
*/
|
|
244
|
+
ariaSetSize?: number;
|
|
245
|
+
/**
|
|
246
|
+
* A string reflecting the aria-sort attribute, which indicates if items in a table or grid are sorted in ascending or descending order.
|
|
247
|
+
*/
|
|
248
|
+
ariaSort?: "ascending" | "descending" | "none" | "other";
|
|
249
|
+
/**
|
|
250
|
+
* A number reflecting the aria-valueMax attribute, which defines the maximum allowed value for a range widget.
|
|
251
|
+
*/
|
|
252
|
+
ariaValueMax?: number;
|
|
253
|
+
/**
|
|
254
|
+
* A number reflecting the aria-valueMin attribute, which defines the minimum allowed value for a range widget.
|
|
255
|
+
*/
|
|
256
|
+
ariaValueMin?: number;
|
|
257
|
+
/**
|
|
258
|
+
* A number reflecting the aria-valueNow attribute, which defines the current value for a range widget.
|
|
259
|
+
*/
|
|
260
|
+
ariaValueNow?: number;
|
|
261
|
+
/**
|
|
262
|
+
* A string reflecting the aria-valuetext attribute, which defines the human readable text alternative of aria-valuenow for a range widget.
|
|
263
|
+
*/
|
|
264
|
+
ariaValueText?: string;
|
|
265
|
+
/**
|
|
266
|
+
* Controls whether and how text input is automatically capitalized as it is entered/edited by the user. It can have the following values:
|
|
267
|
+
* - `off` or `none`, no autocapitalization is applied (all letters default to lowercase)
|
|
268
|
+
* - `on` or `sentences`, the first letter of each sentence defaults to a capital letter; all other letters default to lowercase
|
|
269
|
+
* - `words`, the first letter of each word defaults to a capital letter; all other letters default to lowercase
|
|
270
|
+
* - `characters`, all letters should default to uppercase
|
|
271
|
+
*/
|
|
272
|
+
autocapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters";
|
|
273
|
+
/**
|
|
274
|
+
* Indicates that an element is to be focused on page load, or as soon as the <dialog> it is part of is displayed. This attribute is a boolean, initially false.
|
|
275
|
+
*/
|
|
276
|
+
autofocus?: boolean;
|
|
277
|
+
/**
|
|
278
|
+
* An enumerated attribute indicating if the element should be editable by the user. If so, the browser modifies its widget to allow editing. The attribute must take one of the following values:
|
|
279
|
+
* - `true` or the empty string, which indicates that the element must be editable;
|
|
280
|
+
* - `false`, which indicates that the element must not be editable.
|
|
281
|
+
*/
|
|
282
|
+
contentEditable?: boolean;
|
|
283
|
+
/**
|
|
284
|
+
* A string, reflecting the dir global attribute, representing the directionality of the element. Possible values are "ltr", "rtl", and "auto".
|
|
285
|
+
*/
|
|
286
|
+
dir?: "ltr" | "rtl" | "auto";
|
|
287
|
+
/**
|
|
288
|
+
* A boolean value indicating if the element can be dragged.
|
|
289
|
+
*/
|
|
290
|
+
draggable?: boolean;
|
|
291
|
+
/**
|
|
292
|
+
* A string defining what action label (or icon) to present for the enter key on virtual keyboards.
|
|
293
|
+
*/
|
|
294
|
+
enterKeyHint?: EnterKeyHint;
|
|
295
|
+
/**
|
|
296
|
+
* A boolean value indicating if the element is hidden or not.
|
|
297
|
+
*/
|
|
298
|
+
hidden?: boolean;
|
|
299
|
+
/**
|
|
300
|
+
* Provides a hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents. Used primarily on `<input>` elements, but is usable on any element while in contenteditable mode.
|
|
301
|
+
*/
|
|
302
|
+
inputMode?:
|
|
303
|
+
| "none"
|
|
304
|
+
| "text"
|
|
305
|
+
| "decimal"
|
|
306
|
+
| "numeric"
|
|
307
|
+
| "tel"
|
|
308
|
+
| "search"
|
|
309
|
+
| "email"
|
|
310
|
+
| "url";
|
|
311
|
+
/**
|
|
312
|
+
* Allows you to specify that a standard HTML element should behave like a registered custom built-in element (see Using custom elements for more details).
|
|
313
|
+
*/
|
|
314
|
+
is?: string;
|
|
315
|
+
/**
|
|
316
|
+
* A boolean value indicating whether the user agent must act as though the given node is absent for the purposes of user interaction events, in-page text searches ("find in page"), and text selection.
|
|
317
|
+
*/
|
|
318
|
+
inert?: boolean;
|
|
319
|
+
/**
|
|
320
|
+
* Represents the rendered text content of a node and its descendants. As a getter, it approximates the text the user would get if they highlighted the contents of the element with the cursor and then copied it to the clipboard. As a setter, it replaces the content inside the selected element, converting any line breaks into `<br>` elements.
|
|
321
|
+
*/
|
|
322
|
+
innerText?: string;
|
|
323
|
+
/**
|
|
324
|
+
* A string representing the markup of the element's content.
|
|
325
|
+
*/
|
|
326
|
+
innerHTML?: string;
|
|
327
|
+
/**
|
|
328
|
+
* A string representing the language of an element's attributes, text, and element contents.
|
|
329
|
+
*/
|
|
330
|
+
lang?: string;
|
|
331
|
+
/**
|
|
332
|
+
* A cryptographic nonce ("number used once") which can be used by Content Security Policy to determine whether or not a given fetch will be allowed to proceed.
|
|
333
|
+
*/
|
|
334
|
+
nonce?: string;
|
|
335
|
+
/**
|
|
336
|
+
* Represents the rendered text content of a node and its descendants. As a getter, it is the same as HTMLElement.innerText (it represents the rendered text content of an element and its descendants). As a setter, it replaces the selected node and its contents with the given value, converting any line breaks into `<br>` elements.
|
|
337
|
+
*/
|
|
338
|
+
outerText?: string;
|
|
339
|
+
/**
|
|
340
|
+
* A string representing the markup of the element including its content. When used as a setter, replaces the element with nodes parsed from the given string.
|
|
341
|
+
*/
|
|
342
|
+
outerHTML?: string;
|
|
343
|
+
/**
|
|
344
|
+
* Represents the part identifier(s) of the element (i.e. set using the `part` attribute), returned as a DOMTokenList.
|
|
345
|
+
*/
|
|
346
|
+
part?: string;
|
|
347
|
+
/**
|
|
348
|
+
* A number representing the left scroll offset of the element.
|
|
349
|
+
*/
|
|
350
|
+
scrollLeft?: number;
|
|
351
|
+
/**
|
|
352
|
+
* A number representing number of pixels the top of the element is scrolled vertically.
|
|
353
|
+
*/
|
|
354
|
+
scrollTop?: number;
|
|
355
|
+
/**
|
|
356
|
+
* Returns the name of the shadow DOM slot the element is inserted in.
|
|
357
|
+
*/
|
|
358
|
+
slot?: string;
|
|
359
|
+
/**
|
|
360
|
+
* An enumerated attribute defines whether the element may be checked for spelling errors. It may have the following values:
|
|
361
|
+
* - `true`, which indicates that the element should be, if possible, checked for spelling errors;
|
|
362
|
+
* - `false`, which indicates that the element should not be checked for spelling errors.
|
|
363
|
+
*/
|
|
364
|
+
spellcheck?: boolean;
|
|
365
|
+
/**
|
|
366
|
+
* A `long` representing the position of the element in the tabbing order.
|
|
367
|
+
*/
|
|
368
|
+
tabIndex?: number;
|
|
369
|
+
/**
|
|
370
|
+
* A string containing the text that appears in a popup box when mouse is over the element.
|
|
371
|
+
*/
|
|
372
|
+
title?: string;
|
|
373
|
+
/**
|
|
374
|
+
* A boolean value representing the translation.
|
|
375
|
+
*/
|
|
376
|
+
translate?: boolean;
|
|
377
|
+
/**
|
|
378
|
+
* The `abort` event is fired when the resource was not fully loaded, but not as the result of an error.
|
|
379
|
+
* This event is not cancelable and does not bubble.
|
|
380
|
+
*/
|
|
381
|
+
onabort?: (this: HTMLElement, event: Event) => void;
|
|
382
|
+
/**
|
|
383
|
+
* Fired when a non-primary pointing device button (e.g., any mouse button other than the left button) has been pressed and released on an element. Also available via the onauxclick property.
|
|
384
|
+
*/
|
|
385
|
+
onuxclick?: (this: HTMLElement, event: MouseEvent) => void;
|
|
386
|
+
/**
|
|
387
|
+
* The `contextmenu` event fires when the user attempts to open a context menu. This event is typically triggered by clicking the right mouse button, or by pressing the context menu key.
|
|
388
|
+
* In the latter case, the context menu is displayed at the bottom left of the focused element, unless the element is a tree, in which case the context menu is displayed at the bottom left of the current row.
|
|
389
|
+
* Any right-click event that is not disabled (by calling the event's
|
|
390
|
+
* ```js
|
|
391
|
+
* preventDefault()
|
|
392
|
+
* ```
|
|
393
|
+
* method) will result in a `contextmenu` event being fired at the targeted element.
|
|
394
|
+
*/
|
|
395
|
+
oncontextmenu?: (this: Node, event: MouseEvent) => void;
|
|
396
|
+
/**
|
|
397
|
+
* Fired when the user initiates a copy action through the browser's user interface. Also available via the oncopy property.
|
|
398
|
+
*/
|
|
399
|
+
oncopy?: (this: HTMLElement, event: ClipboardEvent) => void;
|
|
400
|
+
/**
|
|
401
|
+
* Fired when a pointing device button (e.g., a mouse's primary button) is pressed and released on a single element. Also available via the onclick property.
|
|
402
|
+
*/
|
|
403
|
+
onclick?: (this: HTMLElement, event: MouseEvent) => void;
|
|
404
|
+
/**
|
|
405
|
+
* Fired when the user initiates a cut action through the browser's user interface. Also available via the oncut property.
|
|
406
|
+
*/
|
|
407
|
+
oncut?: (this: HTMLElement, event: ClipboardEvent) => void;
|
|
408
|
+
/**
|
|
409
|
+
* Fired when a pointing device button (e.g., a mouse's primary button) is clicked twice on a single element. Also available via the ondblclick property.
|
|
410
|
+
*/
|
|
411
|
+
ondblclick?: (this: HTMLElement, event: MouseEvent) => void;
|
|
412
|
+
/**
|
|
413
|
+
* The `formdata` event fires after the entry list representing the form's data is constructed. This happens when the form is submitted, but can also be triggered by the invocation of a `FormData()` constructor.
|
|
414
|
+
*/
|
|
415
|
+
onformdata?: (this: Node, event: FormDataEvent) => void;
|
|
416
|
+
/**
|
|
417
|
+
* Fired when a pointing device button is pressed on an element. Also available via the onmousedown property.
|
|
418
|
+
*/
|
|
419
|
+
onmousedown?: (this: HTMLElement, event: MouseEvent) => void;
|
|
420
|
+
/**
|
|
421
|
+
* Fired when a pointing device (usually a mouse) is moved over the element that has the listener attached. Also available via the onmouseenter property.
|
|
422
|
+
*/
|
|
423
|
+
onmouseenter?: (this: HTMLElement, event: MouseEvent) => void;
|
|
424
|
+
/**
|
|
425
|
+
* Fired when the pointer of a pointing device (usually a mouse) is moved out of an element that has the listener attached to it. Also available via the onmouseleave property.
|
|
426
|
+
*/
|
|
427
|
+
onmouseleave?: (this: HTMLElement, event: MouseEvent) => void;
|
|
428
|
+
/**
|
|
429
|
+
* Fired when a pointing device (usually a mouse) is moved while over an element. Also available via the onmousemove property.
|
|
430
|
+
*/
|
|
431
|
+
onmousemove?: (this: HTMLElement, event: MouseEvent) => void;
|
|
432
|
+
/**
|
|
433
|
+
* Fired when a pointing device (usually a mouse) is moved off the element to which the listener is attached or off one of its children. Also available via the onmouseout property.
|
|
434
|
+
*/
|
|
435
|
+
onmouseout?: (this: HTMLElement, event: MouseEvent) => void;
|
|
436
|
+
/**
|
|
437
|
+
* Fired when a pointing device is moved onto the element to which the listener is attached or onto one of its children. Also available via the onmouseover property.
|
|
438
|
+
*/
|
|
439
|
+
onmouseover?: (this: HTMLElement, event: MouseEvent) => void;
|
|
440
|
+
/**
|
|
441
|
+
* Fired when a pointing device button is released on an element. Also available via the onmouseup property.
|
|
442
|
+
*/
|
|
443
|
+
onmouseup?: (this: HTMLElement, event: MouseEvent) => void;
|
|
444
|
+
/**
|
|
445
|
+
* Fired when the user initiates a paste action through the browser's user interface. Also available via the onpaste property.
|
|
446
|
+
*/
|
|
447
|
+
onpaste?: (this: HTMLElement, event: ClipboardEvent) => void;
|
|
448
|
+
/**
|
|
449
|
+
* An event handler representing the code to be called when the `progress` event is raised.
|
|
450
|
+
*/
|
|
451
|
+
onprogress?: (this: Node, event: Event) => void;
|
|
452
|
+
/**
|
|
453
|
+
* An event handler representing the code to be called when the `ratechange` event is raised.
|
|
454
|
+
*/
|
|
455
|
+
onratechange?: (this: Node, event: Event) => void;
|
|
456
|
+
/**
|
|
457
|
+
* An event handler representing the code to be called when the `seeked` event is raised.
|
|
458
|
+
*/
|
|
459
|
+
onseeked?: (this: Node, event: Event) => void;
|
|
460
|
+
/**
|
|
461
|
+
* An event handler representing the code to be called when the `seeking` event is raised.
|
|
462
|
+
*/
|
|
463
|
+
onseeking?: (this: Node, event: Event) => void;
|
|
464
|
+
/**
|
|
465
|
+
* An event handler representing the code to be called when the `stalled` event is raised.
|
|
466
|
+
*/
|
|
467
|
+
onstalled?: (this: Node, event: Event) => void;
|
|
468
|
+
/**
|
|
469
|
+
* An event handler representing the code to be called when the `suspend` event is raised.
|
|
470
|
+
*/
|
|
471
|
+
onsuspend?: (this: Node, event: Event) => void;
|
|
472
|
+
/**
|
|
473
|
+
* An event handler representing the code to be called when the `timeupdate` event is raised.
|
|
474
|
+
*/
|
|
475
|
+
ontimeupdate?: (this: Node, event: Event) => void;
|
|
476
|
+
/**
|
|
477
|
+
* An event handler representing the code to be called when the `volumechange` event is raised.
|
|
478
|
+
*/
|
|
479
|
+
onvolumechange?: (this: Node, event: Event) => void;
|
|
480
|
+
/**
|
|
481
|
+
* An event handler representing the code to be called when the `waiting` event is raised.
|
|
482
|
+
*/
|
|
483
|
+
onwaiting?: (this: Node, event: Event) => void;
|
|
484
|
+
/**
|
|
485
|
+
* An event handler executed on touch start.
|
|
486
|
+
*/
|
|
487
|
+
ontouchstart?: (this: Node, event: TouchEvent) => void;
|
|
488
|
+
/**
|
|
489
|
+
* An event handler executed on touch move.
|
|
490
|
+
*/
|
|
491
|
+
ontouchmove?: (this: Node, event: TouchEvent) => void;
|
|
492
|
+
/**
|
|
493
|
+
* An event handler executed on touch end.
|
|
494
|
+
*/
|
|
495
|
+
ontouchend?: (this: Node, event: TouchEvent) => void;
|
|
496
|
+
/**
|
|
497
|
+
* An event handler executed on touch cancel.
|
|
498
|
+
*/
|
|
499
|
+
ontouchcancel?: (this: Node, event: TouchEvent) => void;
|
|
500
|
+
/**
|
|
501
|
+
* attributes of the HTMLElement
|
|
502
|
+
*/
|
|
503
|
+
[key: string]: any;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
interface UseText extends Text {
|
|
507
|
+
value: string | number;
|
|
508
|
+
onChange: (this: UseText, value: string | number) => void;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
interface Tag {
|
|
512
|
+
<K extends HTMLTagNames>(
|
|
513
|
+
tagName: K,
|
|
514
|
+
options?: HTMLElementAttributes & object,
|
|
515
|
+
): HTMLElementTagNameMap[K];
|
|
516
|
+
<K extends HTMLTagNames>(
|
|
517
|
+
tagName: K,
|
|
518
|
+
innerHTML: string,
|
|
519
|
+
): HTMLElementTagNameMap[K];
|
|
520
|
+
(tagName: string, options?: HTMLElementAttributes & object): HTMLElement;
|
|
521
|
+
(tagName: string, innerHTML: string): HTMLElement;
|
|
522
|
+
/**
|
|
523
|
+
* Returns the first element that is a descendant of node that matches selectors.
|
|
524
|
+
*/
|
|
525
|
+
get<K extends keyof HTMLElementTagNameMap>(
|
|
526
|
+
selectors: K,
|
|
527
|
+
): HTMLElementTagNameMap[K] | null;
|
|
528
|
+
get<K extends keyof SVGElementTagNameMap>(
|
|
529
|
+
selectors: K,
|
|
530
|
+
): SVGElementTagNameMap[K] | null;
|
|
531
|
+
get<K extends keyof MathMLElementTagNameMap>(
|
|
532
|
+
selectors: K,
|
|
533
|
+
): MathMLElementTagNameMap[K] | null;
|
|
534
|
+
get<E extends Element = Element>(selectors: string): E | null;
|
|
535
|
+
/**
|
|
536
|
+
* Returns all element descendants of node that match selectors.
|
|
537
|
+
*/
|
|
538
|
+
getAll<K extends keyof HTMLElementTagNameMap>(
|
|
539
|
+
selectors: K,
|
|
540
|
+
): NodeListOf<HTMLElementTagNameMap[K]>;
|
|
541
|
+
getAll<K extends keyof SVGElementTagNameMap>(
|
|
542
|
+
selectors: K,
|
|
543
|
+
): NodeListOf<SVGElementTagNameMap[K]>;
|
|
544
|
+
getAll<K extends keyof MathMLElementTagNameMap>(
|
|
545
|
+
selectors: K,
|
|
546
|
+
): NodeListOf<MathMLElementTagNameMap[K]>;
|
|
547
|
+
getAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
|
|
548
|
+
text(text: string): Text;
|
|
549
|
+
use(text: string | number): UseText;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
declare module "html-tag-js" {
|
|
553
|
+
const tag: Tag;
|
|
554
|
+
|
|
555
|
+
export default tag;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
declare const tag: typeof import("html-tag-js").default;
|
|
559
|
+
|
|
560
|
+
declare module "html-tag-js/ref" {
|
|
561
|
+
export default class Ref {
|
|
562
|
+
/**
|
|
563
|
+
* Element reference
|
|
564
|
+
*/
|
|
565
|
+
el: HTMLElement;
|
|
566
|
+
/**
|
|
567
|
+
* Get element by query selector
|
|
568
|
+
* @param selector
|
|
569
|
+
*/
|
|
570
|
+
get(selector: string): HTMLElement;
|
|
571
|
+
/**
|
|
572
|
+
* Get all elements by query selector
|
|
573
|
+
* @param selector
|
|
574
|
+
*/
|
|
575
|
+
getAll(selector: string): Array<HTMLElement>;
|
|
576
|
+
/**
|
|
577
|
+
* Parse html string to HTMLElement
|
|
578
|
+
* @param name name of the attribute
|
|
579
|
+
* @param value value of the attribute
|
|
580
|
+
*/
|
|
581
|
+
attr(name: string, value: string): void;
|
|
582
|
+
/**
|
|
583
|
+
* Get attribute value
|
|
584
|
+
* @param name name of the attribute
|
|
585
|
+
* @returns value of the attribute
|
|
586
|
+
*/
|
|
587
|
+
attr(name: string): string;
|
|
588
|
+
/**
|
|
589
|
+
* Append child to the element
|
|
590
|
+
* @param els child element
|
|
591
|
+
*/
|
|
592
|
+
append(...els: Node[]): void;
|
|
593
|
+
/**
|
|
594
|
+
* Attach event listener
|
|
595
|
+
* @param event event name
|
|
596
|
+
* @param cb callback function
|
|
597
|
+
*/
|
|
598
|
+
on(event: "ref", cb: (this: Ref, ref: HTMLElement) => void): void;
|
|
599
|
+
/**
|
|
600
|
+
* Remove event listener
|
|
601
|
+
* @param event event name
|
|
602
|
+
* @param cb callback function
|
|
603
|
+
*/
|
|
604
|
+
off(event: "ref", cb: (this: Ref, ref: HTMLElement) => void): void;
|
|
605
|
+
/**
|
|
606
|
+
* Called when reference is set
|
|
607
|
+
*/
|
|
608
|
+
onref: (this: Ref, ref: HTMLElement) => void;
|
|
609
|
+
/**
|
|
610
|
+
* Get the classList
|
|
611
|
+
* If the element is not yet created
|
|
612
|
+
* `Setter` will store the value and apply it when the element is created
|
|
613
|
+
* `Getter` will return a similar object to DOMTokenList which will store the value and apply it when the element is created
|
|
614
|
+
*/
|
|
615
|
+
classList: DOMTokenList;
|
|
616
|
+
/**
|
|
617
|
+
* Get the id
|
|
618
|
+
* If the element is not yet created
|
|
619
|
+
* `Setter` will store the value and apply it when the element is created
|
|
620
|
+
* `Getter` will return the stored value
|
|
621
|
+
*/
|
|
622
|
+
id: string;
|
|
623
|
+
/**
|
|
624
|
+
* Get the class name
|
|
625
|
+
* If the element is not yet created
|
|
626
|
+
* `Setter` will store the value and apply it when the element is created
|
|
627
|
+
* `Getter` will return the stored value
|
|
628
|
+
*/
|
|
629
|
+
className: string;
|
|
630
|
+
/**
|
|
631
|
+
* Get the textContent
|
|
632
|
+
* If the element is not yet created
|
|
633
|
+
* `Setter` will store the value and apply it when the element is created
|
|
634
|
+
* `Getter` will return the stored value
|
|
635
|
+
*/
|
|
636
|
+
textContent: string;
|
|
637
|
+
/**
|
|
638
|
+
* Get the innerText
|
|
639
|
+
* If the element is not yet created
|
|
640
|
+
* `Setter` will store the value and apply it when the element is created
|
|
641
|
+
* `Getter` will return the stored value
|
|
642
|
+
*/
|
|
643
|
+
innerText: string;
|
|
644
|
+
/**
|
|
645
|
+
* Get the innerHTML
|
|
646
|
+
* If the element is not yet created
|
|
647
|
+
* `Setter` will store the value and apply it when the element is created
|
|
648
|
+
* `Getter` will return the stored value
|
|
649
|
+
*/
|
|
650
|
+
innerHTML: string;
|
|
651
|
+
/**
|
|
652
|
+
* Get the value
|
|
653
|
+
* If the element is not yet created
|
|
654
|
+
* `Setter` will store the value and apply it when the element is created
|
|
655
|
+
*/
|
|
656
|
+
value: string;
|
|
657
|
+
/**
|
|
658
|
+
* Get the value
|
|
659
|
+
* If the element is not yet created
|
|
660
|
+
* `Setter` will store the value and apply it when the element is created
|
|
661
|
+
* `Getter` will return proxy object similar to CSSStyleDeclaration
|
|
662
|
+
*/
|
|
663
|
+
style: CSSStyleDeclaration;
|
|
664
|
+
/**
|
|
665
|
+
* Get the value
|
|
666
|
+
* If the element is not yet created
|
|
667
|
+
* `Setter` will store the value and apply it when the element is created
|
|
668
|
+
* `Getter` will return proxy object
|
|
669
|
+
*/
|
|
670
|
+
dataset: DOMStringMap;
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
declare namespace JSX {
|
|
675
|
+
interface IntrinsicElements {
|
|
676
|
+
[name: string]: HTMLElementAttributes & object;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
type Element = HTMLElement;
|
|
680
|
+
}
|