@mpen/jsxhtml 0.2.2 → 0.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 (169) hide show
  1. package/dist/classnames.d.ts +11 -0
  2. package/dist/classnames.test.d.ts +1 -0
  3. package/dist/css-escape.d.ts +25 -0
  4. package/dist/custom/C.d.ts +6 -0
  5. package/dist/custom/Checkbox.d.ts +5 -0
  6. package/dist/custom/ColorInput.d.ts +5 -0
  7. package/dist/custom/DateInput.d.ts +5 -0
  8. package/dist/custom/DocType.d.ts +6 -0
  9. package/dist/custom/EmailInput.d.ts +5 -0
  10. package/dist/custom/Empty.d.ts +4 -0
  11. package/dist/custom/FileInput.d.ts +5 -0
  12. package/dist/custom/HtmlDocument.d.ts +5 -0
  13. package/dist/custom/NumberInput.d.ts +5 -0
  14. package/dist/custom/PasswordInput.d.ts +5 -0
  15. package/dist/custom/RadioButton.d.ts +5 -0
  16. package/dist/custom/RangeInput.d.ts +5 -0
  17. package/dist/custom/RawHtml.d.ts +6 -0
  18. package/dist/custom/SearchInput.d.ts +5 -0
  19. package/dist/custom/TelephoneInput.d.ts +5 -0
  20. package/dist/custom/TextInput.d.ts +5 -0
  21. package/dist/custom/TimeInput.d.ts +5 -0
  22. package/dist/custom/UrlInput.d.ts +5 -0
  23. package/dist/custom/WeekInput.d.ts +5 -0
  24. package/dist/custom/index.d.ts +20 -0
  25. package/dist/custom-components.d.ts +1 -23
  26. package/dist/htmlspec/IntrinsicElements.d.ts +568 -147
  27. package/dist/htmlspec/attributes/AriaAttributes.d.ts +11 -0
  28. package/dist/htmlspec/attributes/ElementAttributes.d.ts +28 -0
  29. package/dist/htmlspec/attributes/EventHandlers.d.ts +102 -0
  30. package/dist/htmlspec/attributes/GlobalAttributes.d.ts +11 -0
  31. package/dist/htmlspec/{GlobalAttributes.d.ts → attributes/StandardGlobalAttributes.d.ts} +26 -37
  32. package/dist/htmlspec/attributes/index.d.ts +7 -0
  33. package/dist/htmlspec/elements/a.d.ts +71 -0
  34. package/dist/htmlspec/elements/abbr.d.ts +4 -0
  35. package/dist/htmlspec/elements/address.d.ts +4 -0
  36. package/dist/htmlspec/elements/area.d.ts +66 -0
  37. package/dist/htmlspec/elements/article.d.ts +4 -0
  38. package/dist/htmlspec/elements/aside.d.ts +4 -0
  39. package/dist/htmlspec/elements/audio.d.ts +45 -0
  40. package/dist/htmlspec/elements/b.d.ts +4 -0
  41. package/dist/htmlspec/elements/base.d.ts +18 -0
  42. package/dist/htmlspec/elements/bdi.d.ts +4 -0
  43. package/dist/htmlspec/elements/bdo.d.ts +4 -0
  44. package/dist/htmlspec/elements/blockquote.d.ts +8 -0
  45. package/dist/htmlspec/elements/body.d.ts +92 -0
  46. package/dist/htmlspec/elements/br.d.ts +4 -0
  47. package/dist/htmlspec/elements/button.d.ts +103 -0
  48. package/dist/htmlspec/elements/canvas.d.ts +13 -0
  49. package/dist/htmlspec/elements/caption.d.ts +4 -0
  50. package/dist/htmlspec/elements/cite.d.ts +4 -0
  51. package/dist/htmlspec/elements/code.d.ts +4 -0
  52. package/dist/htmlspec/elements/col.d.ts +9 -0
  53. package/dist/htmlspec/elements/colgroup.d.ts +9 -0
  54. package/dist/htmlspec/elements/data.d.ts +9 -0
  55. package/dist/htmlspec/elements/datalist.d.ts +4 -0
  56. package/dist/htmlspec/elements/dd.d.ts +4 -0
  57. package/dist/htmlspec/elements/del.d.ts +12 -0
  58. package/dist/htmlspec/elements/details.d.ts +12 -0
  59. package/dist/htmlspec/elements/dfn.d.ts +4 -0
  60. package/dist/htmlspec/elements/dialog.d.ts +17 -0
  61. package/dist/htmlspec/elements/div.d.ts +4 -0
  62. package/dist/htmlspec/elements/dl.d.ts +4 -0
  63. package/dist/htmlspec/elements/dt.d.ts +4 -0
  64. package/dist/htmlspec/elements/element-types.d.ts +1 -0
  65. package/dist/htmlspec/elements/em.d.ts +4 -0
  66. package/dist/htmlspec/elements/embed.d.ts +21 -0
  67. package/dist/htmlspec/elements/fencedframe.d.ts +23 -0
  68. package/dist/htmlspec/elements/fieldset.d.ts +16 -0
  69. package/dist/htmlspec/elements/figcaption.d.ts +4 -0
  70. package/dist/htmlspec/elements/figure.d.ts +4 -0
  71. package/dist/htmlspec/elements/footer.d.ts +4 -0
  72. package/dist/htmlspec/elements/form.d.ts +61 -0
  73. package/dist/htmlspec/elements/h1.d.ts +4 -0
  74. package/dist/htmlspec/elements/h2.d.ts +4 -0
  75. package/dist/htmlspec/elements/h3.d.ts +4 -0
  76. package/dist/htmlspec/elements/h4.d.ts +4 -0
  77. package/dist/htmlspec/elements/h5.d.ts +4 -0
  78. package/dist/htmlspec/elements/h6.d.ts +4 -0
  79. package/dist/htmlspec/elements/head.d.ts +4 -0
  80. package/dist/htmlspec/elements/header.d.ts +4 -0
  81. package/dist/htmlspec/elements/hgroup.d.ts +4 -0
  82. package/dist/htmlspec/elements/hr.d.ts +4 -0
  83. package/dist/htmlspec/elements/html.d.ts +8 -0
  84. package/dist/htmlspec/elements/i.d.ts +4 -0
  85. package/dist/htmlspec/elements/iframe.d.ts +82 -0
  86. package/dist/htmlspec/elements/img.d.ts +90 -0
  87. package/dist/htmlspec/elements/index.d.ts +114 -0
  88. package/dist/htmlspec/elements/input.d.ts +189 -0
  89. package/dist/htmlspec/elements/ins.d.ts +12 -0
  90. package/dist/htmlspec/elements/kbd.d.ts +4 -0
  91. package/dist/htmlspec/elements/label.d.ts +8 -0
  92. package/dist/htmlspec/elements/legend.d.ts +4 -0
  93. package/dist/htmlspec/elements/li.d.ts +19 -0
  94. package/dist/htmlspec/elements/link.d.ts +77 -0
  95. package/dist/htmlspec/elements/main.d.ts +4 -0
  96. package/dist/htmlspec/elements/map.d.ts +8 -0
  97. package/dist/htmlspec/elements/mark.d.ts +4 -0
  98. package/dist/htmlspec/elements/menu.d.ts +4 -0
  99. package/dist/htmlspec/elements/meta.d.ts +24 -0
  100. package/dist/htmlspec/elements/meter.d.ts +29 -0
  101. package/dist/htmlspec/elements/nav.d.ts +4 -0
  102. package/dist/htmlspec/elements/noscript.d.ts +4 -0
  103. package/dist/htmlspec/elements/object.d.ts +29 -0
  104. package/dist/htmlspec/elements/ol.d.ts +24 -0
  105. package/dist/htmlspec/elements/optgroup.d.ts +12 -0
  106. package/dist/htmlspec/elements/option.d.ts +21 -0
  107. package/dist/htmlspec/elements/output.d.ts +16 -0
  108. package/dist/htmlspec/elements/p.d.ts +4 -0
  109. package/dist/htmlspec/elements/picture.d.ts +4 -0
  110. package/dist/htmlspec/elements/pre.d.ts +4 -0
  111. package/dist/htmlspec/elements/progress.d.ts +13 -0
  112. package/dist/htmlspec/elements/q.d.ts +8 -0
  113. package/dist/htmlspec/elements/rp.d.ts +4 -0
  114. package/dist/htmlspec/elements/rt.d.ts +4 -0
  115. package/dist/htmlspec/elements/ruby.d.ts +4 -0
  116. package/dist/htmlspec/elements/s.d.ts +4 -0
  117. package/dist/htmlspec/elements/samp.d.ts +4 -0
  118. package/dist/htmlspec/elements/script.d.ts +57 -0
  119. package/dist/htmlspec/elements/search.d.ts +4 -0
  120. package/dist/htmlspec/elements/section.d.ts +4 -0
  121. package/dist/htmlspec/elements/select.d.ts +37 -0
  122. package/dist/htmlspec/elements/selectedcontent.d.ts +7 -0
  123. package/dist/htmlspec/elements/slot.d.ts +8 -0
  124. package/dist/htmlspec/elements/small.d.ts +4 -0
  125. package/dist/htmlspec/elements/source.d.ts +33 -0
  126. package/dist/htmlspec/elements/span.d.ts +4 -0
  127. package/dist/htmlspec/elements/strong.d.ts +4 -0
  128. package/dist/htmlspec/elements/style.d.ts +21 -0
  129. package/dist/htmlspec/elements/sub.d.ts +4 -0
  130. package/dist/htmlspec/elements/summary.d.ts +4 -0
  131. package/dist/htmlspec/elements/sup.d.ts +4 -0
  132. package/dist/htmlspec/elements/table.d.ts +4 -0
  133. package/dist/htmlspec/elements/tbody.d.ts +4 -0
  134. package/dist/htmlspec/elements/td.d.ts +17 -0
  135. package/dist/htmlspec/elements/template.d.ts +29 -0
  136. package/dist/htmlspec/elements/textarea.d.ts +66 -0
  137. package/dist/htmlspec/elements/tfoot.d.ts +4 -0
  138. package/dist/htmlspec/elements/th.d.ts +31 -0
  139. package/dist/htmlspec/elements/thead.d.ts +4 -0
  140. package/dist/htmlspec/elements/time.d.ts +8 -0
  141. package/dist/htmlspec/elements/title.d.ts +4 -0
  142. package/dist/htmlspec/elements/tr.d.ts +4 -0
  143. package/dist/htmlspec/elements/track.d.ts +31 -0
  144. package/dist/htmlspec/elements/u.d.ts +4 -0
  145. package/dist/htmlspec/elements/ul.d.ts +12 -0
  146. package/dist/htmlspec/elements/var.d.ts +4 -0
  147. package/dist/htmlspec/elements/video.d.ts +66 -0
  148. package/dist/htmlspec/elements/wbr.d.ts +4 -0
  149. package/dist/index.cjs +144 -7
  150. package/dist/index.d.ts +1 -0
  151. package/dist/index.mjs +114 -9
  152. package/dist/internal/dev.d.ts +1 -0
  153. package/dist/internal/kitchen-sink-dev.d.ts +7 -0
  154. package/dist/internal/kitchen-sink.d.ts +2 -0
  155. package/dist/internal/log.d.ts +2 -0
  156. package/dist/internal/type-assert.d.ts +39 -0
  157. package/dist/jsx-dev-runtime.cjs +3 -2
  158. package/dist/jsx-dev-runtime.mjs +2 -3
  159. package/dist/{jsx-runtime-DpEMYmD9.js → jsx-runtime-BQPDXeiv.js} +675 -32
  160. package/dist/{jsx-runtime-CsQM2fQb.js → jsx-runtime-DlHYwToA.js} +672 -33
  161. package/dist/jsx-runtime.cjs +3 -1
  162. package/dist/jsx-runtime.mjs +1 -1
  163. package/dist/jsx-types.d.ts +6 -24
  164. package/dist/jsx.d.ts +3 -2
  165. package/dist/jsx.test.d.ts +1 -0
  166. package/dist/template-strings.d.ts +12 -0
  167. package/dist/template-strings.test.d.ts +6 -0
  168. package/package.json +93 -82
  169. package/dist/htmlspec/AnchorElement.d.ts +0 -83
@@ -0,0 +1,11 @@
1
+ export interface AriaAttributes {
2
+ /**
3
+ * Roles define the semantic meaning of content, allowing screen readers and other tools to present and support
4
+ * interaction with an object in a way that is consistent with user expectations of that type of object. roles are
5
+ * added to HTML elements using role="role_type", where role_type is the name of a role in the ARIA specification.
6
+ *
7
+ * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles
8
+ */
9
+ role?: string;
10
+ [aria: `aria-${string}`]: string;
11
+ }
@@ -0,0 +1,28 @@
1
+ import type { ClassNames } from '../../classnames';
2
+ import type { Properties, PropertiesHyphen } from 'csstype';
3
+ import type { AllGlobalAttributes } from './GlobalAttributes';
4
+ import type { Override } from '../../util-types';
5
+ export interface Stringable {
6
+ toString(): string;
7
+ }
8
+ export type { ClassNames };
9
+ export type StyleObject = Properties | PropertiesHyphen;
10
+ export type AttributeValue = Stringable | StyleObject | ClassNames;
11
+ export type AttrKvPair = [name: string, value: AttributeValue];
12
+ export type AttrArr = AttrKvPair[];
13
+ export type AttrObj = Record<string, AttributeValue>;
14
+ export type Attributes = AttrObj | AttrArr;
15
+ export type JsxRenderable = any;
16
+ export type JsxChildren = JsxRenderable | Iterable<JsxRenderable>;
17
+ export interface SpecialAttributes {
18
+ children?: JsxChildren;
19
+ style?: StyleObject | string;
20
+ /**
21
+ * CSS class.
22
+ */
23
+ class?: ClassNames;
24
+ }
25
+ export interface CommonAttributes<E = HTMLElement> extends Override<AllGlobalAttributes<E>, SpecialAttributes> {
26
+ }
27
+ export interface AnyAttributes<E = HTMLElement> extends Override<AttrObj, CommonAttributes<E>> {
28
+ }
@@ -0,0 +1,102 @@
1
+ export interface EventHandlerMap {
2
+ onauxclick: MouseEvent;
3
+ onbeforeinput: InputEvent;
4
+ onbeforematch: Event;
5
+ onbeforetoggle: Event;
6
+ onblur: FocusEvent;
7
+ oncancel: Event;
8
+ oncanplay: Event;
9
+ oncanplaythrough: Event;
10
+ onchange: Event;
11
+ onclick: MouseEvent;
12
+ onclose: Event;
13
+ oncontextlost: Event;
14
+ oncontextmenu: MouseEvent;
15
+ oncontextrestored: Event;
16
+ oncopy: ClipboardEvent;
17
+ oncuechange: Event;
18
+ oncut: ClipboardEvent;
19
+ ondblclick: MouseEvent;
20
+ ondrag: DragEvent;
21
+ ondragend: DragEvent;
22
+ ondragenter: DragEvent;
23
+ ondragleave: DragEvent;
24
+ ondragover: DragEvent;
25
+ ondragstart: DragEvent;
26
+ ondrop: DragEvent;
27
+ ondurationchange: Event;
28
+ onemptied: Event;
29
+ onended: Event;
30
+ onerror: ErrorEvent;
31
+ onfocus: FocusEvent;
32
+ onformdata: FormDataEvent;
33
+ /**
34
+ * @experimental
35
+ */
36
+ ongesturechange: Event;
37
+ /**
38
+ * @experimental
39
+ */
40
+ ongestureend: Event;
41
+ /**
42
+ * @experimental
43
+ */
44
+ ongesturestart: Event;
45
+ oninput: InputEvent;
46
+ oninvalid: Event;
47
+ onkeydown: KeyboardEvent;
48
+ onkeyup: KeyboardEvent;
49
+ onload: Event;
50
+ onloadeddata: Event;
51
+ onloadedmetadata: Event;
52
+ onloadstart: ProgressEvent;
53
+ onmousedown: MouseEvent;
54
+ onmouseenter: MouseEvent;
55
+ onmouseleave: MouseEvent;
56
+ onmousemove: MouseEvent;
57
+ onmouseout: MouseEvent;
58
+ onmouseover: MouseEvent;
59
+ onmouseup: MouseEvent;
60
+ onpaste: ClipboardEvent;
61
+ onpause: Event;
62
+ onplay: Event;
63
+ onplaying: Event;
64
+ onprogress: ProgressEvent;
65
+ onratechange: Event;
66
+ onreset: Event;
67
+ onresize: UIEvent;
68
+ onscroll: Event;
69
+ onscrollend: Event;
70
+ onsecuritypolicyviolation: SecurityPolicyViolationEvent;
71
+ onseeked: Event;
72
+ onseeking: Event;
73
+ onselect: Event;
74
+ onslotchange: Event;
75
+ onstalled: Event;
76
+ onsubmit: SubmitEvent;
77
+ onsuspend: Event;
78
+ ontimeupdate: Event;
79
+ ontoggle: Event;
80
+ onvolumechange: Event;
81
+ onwaiting: Event;
82
+ /**
83
+ * @experimental
84
+ */
85
+ onwebkitmouseforcechanged: Event;
86
+ /**
87
+ * @experimental
88
+ */
89
+ onwebkitmouseforcedown: Event;
90
+ /**
91
+ * @experimental
92
+ */
93
+ onwebkitmouseforceup: Event;
94
+ /**
95
+ * @experimental
96
+ */
97
+ onwebkitmouseforcewillbegin: Event;
98
+ onwheel: WheelEvent;
99
+ }
100
+ export type GlobalEventHandlers<E = HTMLElement> = {
101
+ [K in keyof EventHandlerMap]?: string | ((this: E, ev: EventHandlerMap[K]) => any);
102
+ };
@@ -0,0 +1,11 @@
1
+ import type { StandardGlobalAttributes } from './StandardGlobalAttributes';
2
+ import type { AriaAttributes } from './AriaAttributes';
3
+ import type { GlobalEventHandlers } from './EventHandlers';
4
+ export interface AllGlobalAttributes<E = HTMLElement> extends StandardGlobalAttributes, AriaAttributes, GlobalEventHandlers<E> {
5
+ }
6
+ export type { StandardGlobalAttributes } from './StandardGlobalAttributes';
7
+ export { InputMode } from './StandardGlobalAttributes';
8
+ export type { Numeric, NumericString } from './StandardGlobalAttributes';
9
+ export type { AriaAttributes } from './AriaAttributes';
10
+ export type { EventHandlerMap, GlobalEventHandlers } from './EventHandlers';
11
+ export type { AnyAttributes, Attributes, AttrArr, AttrKvPair, AttrObj, AttributeValue, ClassNames, CommonAttributes, JsxChildren, JsxRenderable, SpecialAttributes, Stringable, StyleObject, } from './ElementAttributes';
@@ -1,10 +1,17 @@
1
- export type StandardGlobalAttributes = {
1
+ export interface StandardGlobalAttributes {
2
2
  /**
3
3
  * Provides a hint for generating a keyboard shortcut for the current element. This attribute consists of a
4
4
  * space-separated list of characters. The browser should use the first one that exists on the computer keyboard
5
5
  * layout.
6
6
  */
7
7
  accesskey?: string;
8
+ /**
9
+ * Associates a positioned element with an anchor element via its id.
10
+ *
11
+ * @experimental
12
+ * @nonstandard
13
+ */
14
+ anchor?: string;
8
15
  /**
9
16
  * Controls whether and how text input is automatically capitalized as it is entered/edited by the user. It can
10
17
  * have the following values:
@@ -16,11 +23,15 @@ export type StandardGlobalAttributes = {
16
23
  * - `characters`, all letters should default to uppercase
17
24
  */
18
25
  autocapitalize?: string;
26
+ /**
27
+ * Controls whether autocorrection is enabled for editable text.
28
+ */
29
+ autocorrect?: true | 'on' | 'off';
19
30
  /**
20
31
  * Indicates that an element is to be focused on page load, or as soon as the <dialog> it is part of is displayed.
21
32
  * This attribute is a boolean, initially false.
22
33
  */
23
- autofocus?: string;
34
+ autofocus?: boolean;
24
35
  /**
25
36
  * A space-separated list of the classes of the element. Classes allow CSS and JavaScript to select and access
26
37
  * specific elements via the class selectors or functions like the method Document.getElementsByClassName().
@@ -34,12 +45,6 @@ export type StandardGlobalAttributes = {
34
45
  * - `false`, which indicates that the element must not be editable.
35
46
  */
36
47
  contenteditable?: string;
37
- /**
38
- * The id of a `<menu>` to use as the contextual menu for this element.
39
- *
40
- * @deprecated
41
- */
42
- contextmenu?: string;
43
48
  /**
44
49
  * Forms a class of attributes, called custom data attributes, that allow proprietary information to be exchanged
45
50
  * between the HTML and its DOM representation that may be used by scripts. All such custom data are available via
@@ -162,6 +167,10 @@ export type StandardGlobalAttributes = {
162
167
  * attribute) or a HTMLElement.showPopover() call.
163
168
  */
164
169
  popover?: string;
170
+ /**
171
+ * Assigns a slot in a shadow DOM tree to an element.
172
+ */
173
+ slot?: string;
165
174
  /**
166
175
  * An enumerated attribute defines whether the element may be checked for spelling errors. It may have the
167
176
  * following values:
@@ -211,10 +220,17 @@ export type StandardGlobalAttributes = {
211
220
  * - `auto` or an empty string, which automatically shows the virtual keyboard when the element is focused or
212
221
  * tapped.
213
222
  * - `manual`, which decouples focus and tap on the element from the virtual keyboard's state.
223
+ *
224
+ * @experimental
214
225
  */
215
226
  virtualkeyboardpolicy?: true | 'auto' | 'manual';
216
- };
217
- export type Numeric = number | `${number}`;
227
+ /**
228
+ * Controls whether browser-provided writing suggestions are enabled.
229
+ */
230
+ writingsuggestions?: boolean | 'true' | 'false';
231
+ }
232
+ export type NumericString = `${number}` | `${bigint}`;
233
+ export type Numeric = number | bigint | NumericString;
218
234
  export declare const enum InputMode {
219
235
  /**
220
236
  * No virtual keyboard. For when the page implements its own keyboard input control.
@@ -256,30 +272,3 @@ export declare const enum InputMode {
256
272
  */
257
273
  Url = "url"
258
274
  }
259
- export type AriaAttributes = {
260
- /**
261
- * Roles define the semantic meaning of content, allowing screen readers and other tools to present and support
262
- * interaction with an object in a way that is consistent with user expectations of that type of object. roles are
263
- * added to HTML elements using role="role_type", where role_type is the name of a role in the ARIA specification.
264
- *
265
- * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles
266
- */
267
- role?: string;
268
- [aria: `aria-${string}`]: string;
269
- };
270
- export type XmlAttributes = {
271
- /**
272
- * @deprecated
273
- */
274
- 'xml:lang': string;
275
- /**
276
- * @deprecated
277
- */
278
- 'xml:base': string;
279
- };
280
- export type GlobalEventHandlers = {
281
- [evt in EventHandlerNames]?: string | ((this: HTMLElement) => void);
282
- };
283
- export type AllGlobalAttributes = StandardGlobalAttributes | AriaAttributes | GlobalEventHandlers;
284
- type EventHandlerNames = 'onauxclick' | 'onbeforeinput' | 'onbeforematch' | 'onbeforetoggle' | 'onblur' | 'oncancel' | 'oncanplay' | 'oncanplaythrough' | 'onchange' | 'onclick' | 'onclose' | 'oncontextlost' | 'oncontextmenu' | 'oncontextrestored' | 'oncopy' | 'oncuechange' | 'oncut' | 'ondblclick' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'ondurationchange' | 'onemptied' | 'onended' | 'onerror' | 'onfocus' | 'onformdata' | 'oninput' | 'oninvalid' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onload' | 'onloadeddata' | 'onloadedmetadata' | 'onloadstart' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onpaste' | 'onpause' | 'onplay' | 'onplaying' | 'onprogress' | 'onratechange' | 'onreset' | 'onresize' | 'onscroll' | 'onscrollend' | 'onsecuritypolicyviolation' | 'onseeked' | 'onseeking' | 'onselect' | 'onslotchange' | 'onstalled' | 'onsubmit' | 'onsuspend' | 'ontimeupdate' | 'ontoggle' | 'onvolumechange' | 'onwaiting' | 'onwheel';
285
- export {};
@@ -0,0 +1,7 @@
1
+ export type { StandardGlobalAttributes } from './StandardGlobalAttributes';
2
+ export { InputMode } from './StandardGlobalAttributes';
3
+ export type { Numeric, NumericString } from './StandardGlobalAttributes';
4
+ export type { AriaAttributes } from './AriaAttributes';
5
+ export type { EventHandlerMap, GlobalEventHandlers } from './EventHandlers';
6
+ export type { AllGlobalAttributes } from './GlobalAttributes';
7
+ export type { AnyAttributes, Attributes, AttrArr, AttrKvPair, AttrObj, AttributeValue, ClassNames, CommonAttributes, JsxChildren, JsxRenderable, SpecialAttributes, Stringable, StyleObject, } from './ElementAttributes';
@@ -0,0 +1,71 @@
1
+ import type { CommonAttributes } from '../attributes/ElementAttributes';
2
+ import type { ElementForTag } from './element-types';
3
+ export interface AAttributes extends CommonAttributes<ElementForTag<'a'>> {
4
+ /**
5
+ * Causes the browser to treat the linked URL as a download. Can be used with or without a `filename` value:
6
+ *
7
+ * Possible values:
8
+ * - filename
9
+ */
10
+ download?: true | string;
11
+ /**
12
+ * The URL that the hyperlink points to. Links are not restricted to HTTP-based URLs - they can use any URL scheme supported by browsers: Moreover other URL features can locate specific parts of the resource, including:
13
+ */
14
+ href?: string;
15
+ /**
16
+ * Hints at the human language of the linked URL. No built-in functionality. Allowed values are the same as the global `lang` attribute.
17
+ */
18
+ hreflang?: string;
19
+ /**
20
+ * Defines the `<a ` element as an **interest invoker**. Its value is the `id` of the target element, which will be affected in some way (normally shown or hidden) when interest is shown or lost on the invoker element (for example, by hovering/unhovering or focusing/blurring it). See Using interest invokers for more details and examples.
21
+ * @experimental
22
+ */
23
+ interestfor?: string;
24
+ /**
25
+ * A space-separated list of URLs. When the link is followed, the browser will send POST requests with the body `PING` to the URLs. Typically for tracking.
26
+ */
27
+ ping?: string;
28
+ /**
29
+ * How much of the referrer to send when following the link.
30
+ *
31
+ * Possible values:
32
+ * - no-referrer
33
+ * - no-referrer-when-downgrade
34
+ * - origin
35
+ * - origin-when-cross-origin
36
+ * - same-origin
37
+ * - strict-origin
38
+ * - strict-origin-when-cross-origin
39
+ * - unsafe-url
40
+ */
41
+ referrerpolicy?: ReferrerPolicy | string;
42
+ /**
43
+ * The **`rel`** attribute defines the relationship between a linked resource and the current document. Valid on link, a, area, and form, the supported values depend on the element on which the attribute is found.
44
+ */
45
+ rel?: string;
46
+ /**
47
+ * Where to display the linked URL, as the name for a _browsing context_ (a tab, window, or iframe). The following keywords have special meanings for where to load the URL:
48
+ *
49
+ * Possible values:
50
+ * - _self
51
+ * - _blank
52
+ * - _parent
53
+ * - _top
54
+ * - _unfencedTop
55
+ */
56
+ target?: '_self' | '_blank' | '_parent' | '_top' | '_unfencedTop' | string;
57
+ /**
58
+ * Hints at the linked URL's format with a MIME type. No built-in functionality.
59
+ */
60
+ type?: string;
61
+ }
62
+ export declare const enum ReferrerPolicy {
63
+ NoReferrer = "no-referrer",
64
+ NoReferrerWhenDowngrade = "no-referrer-when-downgrade",
65
+ Origin = "origin",
66
+ OriginWhenCrossOrigin = "origin-when-cross-origin",
67
+ SameOrigin = "same-origin",
68
+ StrictOrigin = "strict-origin",
69
+ StrictOriginWhenCrossOrigin = "strict-origin-when-cross-origin",
70
+ UnsafeUrl = "unsafe-url"
71
+ }
@@ -0,0 +1,4 @@
1
+ import type { CommonAttributes } from '../attributes/ElementAttributes';
2
+ import type { ElementForTag } from './element-types';
3
+ export interface AbbrAttributes extends CommonAttributes<ElementForTag<'abbr'>> {
4
+ }
@@ -0,0 +1,4 @@
1
+ import type { CommonAttributes } from '../attributes/ElementAttributes';
2
+ import type { ElementForTag } from './element-types';
3
+ export interface AddressAttributes extends CommonAttributes<ElementForTag<'address'>> {
4
+ }
@@ -0,0 +1,66 @@
1
+ import type { CommonAttributes } from '../attributes/ElementAttributes';
2
+ import type { ElementForTag } from './element-types';
3
+ export interface AreaAttributes extends CommonAttributes<ElementForTag<'area'>> {
4
+ /**
5
+ * A text string alternative to display on browsers that do not display images. The text should be phrased so that it presents the user with the same kind of choice as the image would offer when displayed without the alternative text. This attribute is required only if the `href` attribute is used.
6
+ */
7
+ alt?: string;
8
+ /**
9
+ * The `coords` attribute details the coordinates of the `shape` attribute in size, shape, and placement of an `<area `. This attribute must not be used if `shape` is set to `default`. The value specifies the coordinates of the top-left and bottom-right corner of the rectangle. For example, in `<area shape="rect" coords="0,0,253,27" href="#" target="_blank" alt="Mozilla" ` the coordinates are `0,0` and `253,27`, indicating the top-left and bottom-right corners of the rectangle, respectively. For example: `<area shape="circle" coords="130,136,60" href="#" target="_blank" alt="MDN" ` If the first and last coordinate pairs are not the same, the browser will add the last coordinate pair to close the polygon The values are numbers of CSS pixels. Our shape generator can help you generate the `coords` syntax by selecting points on an image you upload.
10
+ *
11
+ * Possible values:
12
+ * - rect
13
+ * - circle
14
+ * - poly
15
+ */
16
+ coords?: 'rect' | 'circle' | 'poly';
17
+ /**
18
+ * This attribute, if present, indicates that the linked resource is intended to be downloaded rather than displayed in the browser. See a for a full description of the `download` attribute.
19
+ */
20
+ download?: string;
21
+ /**
22
+ * The hyperlink target for the area. Its value is a valid URL. This attribute may be omitted; if so, the `<area ` element does not represent a hyperlink.
23
+ */
24
+ href?: string;
25
+ /**
26
+ * Defines the `<area ` element as an **interest invoker**. Its value is the `id` of the target element, which will be affected in some way (normally shown or hidden) when interest is shown or lost on the invoker element (for example, by hovering/unhovering or focusing/blurring it). See Using interest invokers for more details and examples.
27
+ * @experimental
28
+ */
29
+ interestfor?: string;
30
+ /**
31
+ * Contains a space-separated list of URLs to which, when the hyperlink is followed, POST requests with the body `PING` will be sent by the browser (in the background). Typically used for tracking.
32
+ */
33
+ ping?: string;
34
+ /**
35
+ * A string indicating which referrer to use when fetching the resource: **This value is unsafe**, because it leaks origins and paths from TLS-protected resources to insecure origins.
36
+ *
37
+ * Possible values:
38
+ * - no-referrer
39
+ * - no-referrer-when-downgrade
40
+ * - origin
41
+ * - origin-when-cross-origin
42
+ * - same-origin
43
+ * - strict-origin
44
+ * - strict-origin-when-cross-origin
45
+ * - unsafe-url
46
+ */
47
+ referrerpolicy?: 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
48
+ /**
49
+ * The **`rel`** attribute defines the relationship between a linked resource and the current document. Valid on link, a, area, and form, the supported values depend on the element on which the attribute is found.
50
+ */
51
+ rel?: string;
52
+ /**
53
+ * The shape of the associated hot spot. The specifications for HTML defines the values `rect`, which defines a rectangular region; `circle`, which defines a circular region; `poly`, which defines a polygon; and `default`, which indicates the entire region beyond any defined shapes.
54
+ */
55
+ shape?: string;
56
+ /**
57
+ * A keyword or author-defined name of the browsing context to display the linked resource. The following keywords have special meanings: If there is no parent, acts the same as `_self`. If there is no parent, acts the same as `_self`. Use this attribute only if the `href` attribute is present.
58
+ *
59
+ * Possible values:
60
+ * - _self
61
+ * - _blank
62
+ * - _parent
63
+ * - _top
64
+ */
65
+ target?: '_self' | '_blank' | '_parent' | '_top';
66
+ }
@@ -0,0 +1,4 @@
1
+ import type { CommonAttributes } from '../attributes/ElementAttributes';
2
+ import type { ElementForTag } from './element-types';
3
+ export interface ArticleAttributes extends CommonAttributes<ElementForTag<'article'>> {
4
+ }
@@ -0,0 +1,4 @@
1
+ import type { CommonAttributes } from '../attributes/ElementAttributes';
2
+ import type { ElementForTag } from './element-types';
3
+ export interface AsideAttributes extends CommonAttributes<ElementForTag<'aside'>> {
4
+ }
@@ -0,0 +1,45 @@
1
+ import type { CommonAttributes } from '../attributes/ElementAttributes';
2
+ import type { ElementForTag } from './element-types';
3
+ export interface AudioAttributes extends CommonAttributes<ElementForTag<'audio'>> {
4
+ /**
5
+ * A Boolean attribute: if specified, the audio will automatically begin playback as soon as it can do so, without waiting for the entire audio file to finish downloading.
6
+ */
7
+ autoplay?: boolean;
8
+ /**
9
+ * If this attribute is present, the browser will offer controls to allow the user to control audio playback, including volume, seeking, and pause/resume playback.
10
+ */
11
+ controls?: boolean;
12
+ /**
13
+ * The `controlslist` attribute, when specified, helps the browser select what controls to show for the `audio` element whenever the browser shows its own set of controls (that is, when the `controls` attribute is specified). The allowed values are `nodownload`, `nofullscreen` and `noremoteplayback`.
14
+ */
15
+ controlslist?: 'anonymous' | 'use-credentials';
16
+ /**
17
+ * The **`crossorigin`** attribute, valid on the audio, img, link, script, and video elements, provides support for CORS, defining how the element handles cross-origin requests, thereby enabling the configuration of the CORS requests for the element's fetched data. Depending on the element, the attribute can be a CORS settings attribute.
18
+ */
19
+ crossorigin?: 'anonymous' | 'use-credentials';
20
+ /**
21
+ * A Boolean attribute used to disable the capability of remote playback in devices that are attached using wired (HDMI, DVI, etc.) and wireless technologies (Miracast, Chromecast, DLNA, AirPlay, etc.). See the proposed Remote Playback API specification for more information. In Safari, you can use `x-webkit-airplay="deny"` as a fallback.
22
+ */
23
+ disableremoteplayback?: string;
24
+ /**
25
+ * A Boolean attribute: if specified, the audio player will automatically seek back to the start upon reaching the end of the audio.
26
+ */
27
+ loop?: boolean;
28
+ /**
29
+ * A Boolean attribute that indicates whether the audio will be initially silenced. Its default value is `false`.
30
+ */
31
+ muted?: boolean;
32
+ /**
33
+ * This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience. It may have one of the following values: The default value is different for each browser. The spec advises it to be set to `metadata`.
34
+ *
35
+ * Possible values:
36
+ * - none
37
+ * - metadata
38
+ * - auto
39
+ */
40
+ preload?: 'none' | 'metadata' | 'auto';
41
+ /**
42
+ * The URL of the audio to embed. This is subject to HTTP access controls. This is optional; you may instead use the source element within the audio block to specify the audio to embed.
43
+ */
44
+ src?: string;
45
+ }
@@ -0,0 +1,4 @@
1
+ import type { CommonAttributes } from '../attributes/ElementAttributes';
2
+ import type { ElementForTag } from './element-types';
3
+ export interface BAttributes extends CommonAttributes<ElementForTag<'b'>> {
4
+ }
@@ -0,0 +1,18 @@
1
+ import type { CommonAttributes } from '../attributes/ElementAttributes';
2
+ import type { ElementForTag } from './element-types';
3
+ export interface BaseAttributes extends CommonAttributes<ElementForTag<'base'>> {
4
+ /**
5
+ * The base URL to be used throughout the document for relative URLs. Absolute and relative URLs are allowed. `data:` and `javascript:` URLs are not allowed.
6
+ */
7
+ href?: string;
8
+ /**
9
+ * A **keyword** or **author-defined name** of the default browsing context to show the results of navigation from a, area, or form elements without explicit `target` attributes. The following keywords have special meanings:
10
+ *
11
+ * Possible values:
12
+ * - _self
13
+ * - _blank
14
+ * - _parent
15
+ * - _top
16
+ */
17
+ target?: '_self' | '_blank' | '_parent' | '_top';
18
+ }
@@ -0,0 +1,4 @@
1
+ import type { CommonAttributes } from '../attributes/ElementAttributes';
2
+ import type { ElementForTag } from './element-types';
3
+ export interface BdiAttributes extends CommonAttributes<ElementForTag<'bdi'>> {
4
+ }
@@ -0,0 +1,4 @@
1
+ import type { CommonAttributes } from '../attributes/ElementAttributes';
2
+ import type { ElementForTag } from './element-types';
3
+ export interface BdoAttributes extends CommonAttributes<ElementForTag<'bdo'>> {
4
+ }
@@ -0,0 +1,8 @@
1
+ import type { CommonAttributes } from '../attributes/ElementAttributes';
2
+ import type { ElementForTag } from './element-types';
3
+ export interface BlockquoteAttributes extends CommonAttributes<ElementForTag<'blockquote'>> {
4
+ /**
5
+ * A URL that designates a source document or message for the information quoted. This attribute is intended to point to information explaining the context or the reference for the quote.
6
+ */
7
+ cite?: string;
8
+ }
@@ -0,0 +1,92 @@
1
+ import type { CommonAttributes } from '../attributes/ElementAttributes';
2
+ import type { ElementForTag } from './element-types';
3
+ export interface BodyAttributes extends CommonAttributes<ElementForTag<'body'>> {
4
+ /**
5
+ * Function to call after the user has printed the document.
6
+ */
7
+ onafterprint?: string;
8
+ /**
9
+ * Function to call when the user requests printing of the document.
10
+ */
11
+ onbeforeprint?: string;
12
+ /**
13
+ * Function to call when the document is about to be unloaded.
14
+ */
15
+ onbeforeunload?: string;
16
+ /**
17
+ * Function to call when the document loses focus.
18
+ */
19
+ onblur?: string;
20
+ /**
21
+ * Function to call when the document fails to load properly.
22
+ */
23
+ onerror?: string;
24
+ /**
25
+ * Function to call when the document receives focus.
26
+ */
27
+ onfocus?: string;
28
+ /**
29
+ * Function to call when the fragment identifier part (starting with the hash (`'#'`) character) of the document's current address has changed.
30
+ */
31
+ onhashchange?: string;
32
+ /**
33
+ * Function to call when the preferred languages changed.
34
+ */
35
+ onlanguagechange?: string;
36
+ /**
37
+ * Function to call when the document has finished loading.
38
+ */
39
+ onload?: string;
40
+ /**
41
+ * Function to call when the document has received a message.
42
+ */
43
+ onmessage?: string;
44
+ /**
45
+ * Function to call when the document has received a message that cannot be deserialized.
46
+ */
47
+ onmessageerror?: string;
48
+ /**
49
+ * Function to call when network communication has failed.
50
+ */
51
+ onoffline?: string;
52
+ /**
53
+ * Function to call when network communication has been restored.
54
+ */
55
+ ononline?: string;
56
+ /**
57
+ * Function to call when you navigate across documents, when the previous document is about to unload.
58
+ */
59
+ onpageswap?: string;
60
+ /**
61
+ * Function to call when the browser hides the current page in the process of presenting a different page from the session's history.
62
+ */
63
+ onpagehide?: string;
64
+ /**
65
+ * Function to call when a document is first rendered, either when loading a fresh document from the network or activating a document.
66
+ */
67
+ onpagereveal?: string;
68
+ /**
69
+ * Function to call when the browser displays the window's document due to navigation.
70
+ */
71
+ onpageshow?: string;
72
+ /**
73
+ * Function to call when the user has navigated session history.
74
+ */
75
+ onpopstate?: string;
76
+ /**
77
+ * Function to call when the document has been resized.
78
+ */
79
+ onresize?: string;
80
+ /**
81
+ * Function to call when a JavaScript Promise is handled late.
82
+ */
83
+ onrejectionhandled?: string;
84
+ /**
85
+ * Function to call when the storage area has changed.
86
+ */
87
+ onstorage?: string;
88
+ /**
89
+ * Function to call when a JavaScript Promise that has no rejection handler is rejected.
90
+ */
91
+ onunhandledrejection?: string;
92
+ }
@@ -0,0 +1,4 @@
1
+ import type { CommonAttributes } from '../attributes/ElementAttributes';
2
+ import type { ElementForTag } from './element-types';
3
+ export interface BrAttributes extends CommonAttributes<ElementForTag<'br'>> {
4
+ }