@mpen/jsxhtml 0.3.0 → 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.
- package/dist/classnames.d.ts +11 -0
- package/dist/custom/C.d.ts +6 -0
- package/dist/custom/Checkbox.d.ts +5 -0
- package/dist/custom/ColorInput.d.ts +5 -0
- package/dist/custom/DateInput.d.ts +5 -0
- package/dist/custom/DocType.d.ts +6 -0
- package/dist/custom/EmailInput.d.ts +5 -0
- package/dist/custom/Empty.d.ts +4 -0
- package/dist/custom/FileInput.d.ts +5 -0
- package/dist/custom/HtmlDocument.d.ts +5 -0
- package/dist/custom/NumberInput.d.ts +5 -0
- package/dist/custom/PasswordInput.d.ts +5 -0
- package/dist/custom/RadioButton.d.ts +5 -0
- package/dist/custom/RangeInput.d.ts +5 -0
- package/dist/custom/RawHtml.d.ts +6 -0
- package/dist/custom/SearchInput.d.ts +5 -0
- package/dist/custom/TelephoneInput.d.ts +5 -0
- package/dist/custom/TextInput.d.ts +5 -0
- package/dist/custom/TimeInput.d.ts +5 -0
- package/dist/custom/UrlInput.d.ts +5 -0
- package/dist/custom/WeekInput.d.ts +5 -0
- package/dist/custom/index.d.ts +20 -0
- package/dist/custom-components.d.ts +1 -23
- package/dist/htmlspec/IntrinsicElements.d.ts +240 -398
- package/dist/htmlspec/attributes/AriaAttributes.d.ts +11 -0
- package/dist/htmlspec/attributes/ElementAttributes.d.ts +28 -0
- package/dist/htmlspec/attributes/EventHandlers.d.ts +102 -0
- package/dist/htmlspec/attributes/GlobalAttributes.d.ts +11 -0
- package/dist/htmlspec/{GlobalAttributes.d.ts → attributes/StandardGlobalAttributes.d.ts} +26 -107
- package/dist/htmlspec/attributes/index.d.ts +7 -0
- package/dist/htmlspec/elements/a.d.ts +71 -0
- package/dist/htmlspec/elements/abbr.d.ts +4 -0
- package/dist/htmlspec/elements/address.d.ts +4 -0
- package/dist/htmlspec/elements/area.d.ts +66 -0
- package/dist/htmlspec/elements/article.d.ts +4 -0
- package/dist/htmlspec/elements/aside.d.ts +4 -0
- package/dist/htmlspec/elements/audio.d.ts +45 -0
- package/dist/htmlspec/elements/b.d.ts +4 -0
- package/dist/htmlspec/elements/base.d.ts +18 -0
- package/dist/htmlspec/elements/bdi.d.ts +4 -0
- package/dist/htmlspec/elements/bdo.d.ts +4 -0
- package/dist/htmlspec/elements/blockquote.d.ts +8 -0
- package/dist/htmlspec/elements/body.d.ts +92 -0
- package/dist/htmlspec/elements/br.d.ts +4 -0
- package/dist/htmlspec/elements/button.d.ts +103 -0
- package/dist/htmlspec/elements/canvas.d.ts +13 -0
- package/dist/htmlspec/elements/caption.d.ts +4 -0
- package/dist/htmlspec/elements/cite.d.ts +4 -0
- package/dist/htmlspec/elements/code.d.ts +4 -0
- package/dist/htmlspec/elements/col.d.ts +9 -0
- package/dist/htmlspec/elements/colgroup.d.ts +9 -0
- package/dist/htmlspec/elements/data.d.ts +9 -0
- package/dist/htmlspec/elements/datalist.d.ts +4 -0
- package/dist/htmlspec/elements/dd.d.ts +4 -0
- package/dist/htmlspec/elements/del.d.ts +12 -0
- package/dist/htmlspec/elements/details.d.ts +12 -0
- package/dist/htmlspec/elements/dfn.d.ts +4 -0
- package/dist/htmlspec/elements/dialog.d.ts +17 -0
- package/dist/htmlspec/elements/div.d.ts +4 -0
- package/dist/htmlspec/elements/dl.d.ts +4 -0
- package/dist/htmlspec/elements/dt.d.ts +4 -0
- package/dist/htmlspec/elements/element-types.d.ts +1 -0
- package/dist/htmlspec/elements/em.d.ts +4 -0
- package/dist/htmlspec/elements/embed.d.ts +21 -0
- package/dist/htmlspec/elements/fencedframe.d.ts +23 -0
- package/dist/htmlspec/elements/fieldset.d.ts +16 -0
- package/dist/htmlspec/elements/figcaption.d.ts +4 -0
- package/dist/htmlspec/elements/figure.d.ts +4 -0
- package/dist/htmlspec/elements/footer.d.ts +4 -0
- package/dist/htmlspec/elements/form.d.ts +61 -0
- package/dist/htmlspec/elements/h1.d.ts +4 -0
- package/dist/htmlspec/elements/h2.d.ts +4 -0
- package/dist/htmlspec/elements/h3.d.ts +4 -0
- package/dist/htmlspec/elements/h4.d.ts +4 -0
- package/dist/htmlspec/elements/h5.d.ts +4 -0
- package/dist/htmlspec/elements/h6.d.ts +4 -0
- package/dist/htmlspec/elements/head.d.ts +4 -0
- package/dist/htmlspec/elements/header.d.ts +4 -0
- package/dist/htmlspec/elements/hgroup.d.ts +4 -0
- package/dist/htmlspec/elements/hr.d.ts +4 -0
- package/dist/htmlspec/elements/html.d.ts +8 -0
- package/dist/htmlspec/elements/i.d.ts +4 -0
- package/dist/htmlspec/elements/iframe.d.ts +82 -0
- package/dist/htmlspec/elements/img.d.ts +90 -0
- package/dist/htmlspec/elements/index.d.ts +114 -0
- package/dist/htmlspec/elements/input.d.ts +189 -0
- package/dist/htmlspec/elements/ins.d.ts +12 -0
- package/dist/htmlspec/elements/kbd.d.ts +4 -0
- package/dist/htmlspec/elements/label.d.ts +8 -0
- package/dist/htmlspec/elements/legend.d.ts +4 -0
- package/dist/htmlspec/elements/li.d.ts +19 -0
- package/dist/htmlspec/elements/link.d.ts +77 -0
- package/dist/htmlspec/elements/main.d.ts +4 -0
- package/dist/htmlspec/elements/map.d.ts +8 -0
- package/dist/htmlspec/elements/mark.d.ts +4 -0
- package/dist/htmlspec/elements/menu.d.ts +4 -0
- package/dist/htmlspec/elements/meta.d.ts +24 -0
- package/dist/htmlspec/elements/meter.d.ts +29 -0
- package/dist/htmlspec/elements/nav.d.ts +4 -0
- package/dist/htmlspec/elements/noscript.d.ts +4 -0
- package/dist/htmlspec/elements/object.d.ts +29 -0
- package/dist/htmlspec/elements/ol.d.ts +24 -0
- package/dist/htmlspec/elements/optgroup.d.ts +12 -0
- package/dist/htmlspec/elements/option.d.ts +21 -0
- package/dist/htmlspec/elements/output.d.ts +16 -0
- package/dist/htmlspec/elements/p.d.ts +4 -0
- package/dist/htmlspec/elements/picture.d.ts +4 -0
- package/dist/htmlspec/elements/pre.d.ts +4 -0
- package/dist/htmlspec/elements/progress.d.ts +13 -0
- package/dist/htmlspec/elements/q.d.ts +8 -0
- package/dist/htmlspec/elements/rp.d.ts +4 -0
- package/dist/htmlspec/elements/rt.d.ts +4 -0
- package/dist/htmlspec/elements/ruby.d.ts +4 -0
- package/dist/htmlspec/elements/s.d.ts +4 -0
- package/dist/htmlspec/elements/samp.d.ts +4 -0
- package/dist/htmlspec/elements/script.d.ts +57 -0
- package/dist/htmlspec/elements/search.d.ts +4 -0
- package/dist/htmlspec/elements/section.d.ts +4 -0
- package/dist/htmlspec/elements/select.d.ts +37 -0
- package/dist/htmlspec/elements/selectedcontent.d.ts +7 -0
- package/dist/htmlspec/elements/slot.d.ts +8 -0
- package/dist/htmlspec/elements/small.d.ts +4 -0
- package/dist/htmlspec/elements/source.d.ts +33 -0
- package/dist/htmlspec/elements/span.d.ts +4 -0
- package/dist/htmlspec/elements/strong.d.ts +4 -0
- package/dist/htmlspec/elements/style.d.ts +21 -0
- package/dist/htmlspec/elements/sub.d.ts +4 -0
- package/dist/htmlspec/elements/summary.d.ts +4 -0
- package/dist/htmlspec/elements/sup.d.ts +4 -0
- package/dist/htmlspec/elements/table.d.ts +4 -0
- package/dist/htmlspec/elements/tbody.d.ts +4 -0
- package/dist/htmlspec/elements/td.d.ts +17 -0
- package/dist/htmlspec/elements/template.d.ts +29 -0
- package/dist/htmlspec/elements/textarea.d.ts +66 -0
- package/dist/htmlspec/elements/tfoot.d.ts +4 -0
- package/dist/htmlspec/elements/th.d.ts +31 -0
- package/dist/htmlspec/elements/thead.d.ts +4 -0
- package/dist/htmlspec/elements/time.d.ts +8 -0
- package/dist/htmlspec/elements/title.d.ts +4 -0
- package/dist/htmlspec/elements/tr.d.ts +4 -0
- package/dist/htmlspec/elements/track.d.ts +31 -0
- package/dist/htmlspec/elements/u.d.ts +4 -0
- package/dist/htmlspec/elements/ul.d.ts +12 -0
- package/dist/htmlspec/elements/var.d.ts +4 -0
- package/dist/htmlspec/elements/video.d.ts +66 -0
- package/dist/htmlspec/elements/wbr.d.ts +4 -0
- package/dist/index.cjs +142 -7
- package/dist/index.mjs +114 -9
- package/dist/internal/dev.d.ts +1 -0
- package/dist/internal/kitchen-sink-dev.d.ts +7 -0
- package/dist/internal/kitchen-sink.d.ts +2 -0
- package/dist/internal/type-assert.d.ts +39 -0
- package/dist/jsx-dev-runtime.cjs +1 -2
- package/dist/jsx-dev-runtime.mjs +2 -3
- package/dist/{jsx-runtime-cimCxEOU.js → jsx-runtime-BQPDXeiv.js} +27 -13
- package/dist/{jsx-runtime-Dh9PxNQe.js → jsx-runtime-DlHYwToA.js} +28 -14
- package/dist/jsx-runtime.cjs +1 -1
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/jsx-types.d.ts +6 -26
- package/package.json +93 -86
- package/dist/htmlspec/AnchorElement.d.ts +0 -83
- package/dist/htmlspec/ButtonElement.d.ts +0 -55
- package/dist/htmlspec/InputAttributes.d.ts +0 -221
- package/dist/htmlspec/ScriptElement.d.ts +0 -38
- package/dist/htmlspec/StyleAttributes.d.ts +0 -19
- /package/dist/{dev.d.ts → classnames.test.d.ts} +0 -0
- /package/dist/{log.d.ts → internal/log.d.ts} +0 -0
|
@@ -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,103 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
import type { Numeric } from '../attributes/StandardGlobalAttributes';
|
|
4
|
+
/**
|
|
5
|
+
* All standard attributes for the `<button>` HTML element.
|
|
6
|
+
*/
|
|
7
|
+
export interface ButtonAttributes extends CommonAttributes<ElementForTag<'button'>> {
|
|
8
|
+
/**
|
|
9
|
+
* Specifies the action to be performed on an element being controlled by a control `<button ` specified via the `commandfor` attribute. The possible values are: The button will show a dialog as modal. If the dialog is already modal, no action will be taken. This is a declarative equivalent of calling the HTMLDialogElement.showModal() method on the `<dialog ` element. The button will close a dialog element. If the dialog is already closed, no action will be taken. This is a declarative equivalent of calling the HTMLDialogElement.close() method on the `<dialog ` element. The button will trigger a cancel event on a dialog element to request that the browser dismiss it, followed by a close event. This differs from the `close` command in that authors can call Event.preventDefault() on the `cancel` event to prevent the `<dialog ` from closing. If the dialog is already closed, no action will be taken. This is a declarative equivalent of calling the HTMLDialogElement.requestClose() method on the `<dialog ` element. The button will show a hidden popover. If you try to show an already showing popover, no action will be taken. See Popover API for more details. This is equivalent to setting a value of `show` for the `popovertargetaction` attribute, and also provides a declarative equivalent to calling the HTMLElement.showPopover() method on the popover element. The button will hide a showing popover. If you try to hide an already hidden popover, no action will be taken. See Popover API for more details. This is equivalent to setting a value of `hide` for the `popovertargetaction` attribute, and also provides a declarative equivalent to calling the HTMLElement.hidePopover() method on the popover element. The button will toggle a popover between showing and hidden. If the popover is hidden, it will be shown; if the popover is showing, it will be hidden. See Popover API for more details. This is equivalent to setting a value of `toggle` for the `popovertargetaction` attribute, and also provides a declarative equivalent to calling the HTMLElement.togglePopover() method on the popover element. This attribute can represent custom values that are prefixed with a two hyphen characters (`--`). Buttons with a custom value will dispatch the CommandEvent on the controlled element.
|
|
10
|
+
*
|
|
11
|
+
* Possible values:
|
|
12
|
+
* - "show-modal"
|
|
13
|
+
* - "close"
|
|
14
|
+
* - "request-close"
|
|
15
|
+
* - "show-popover"
|
|
16
|
+
* - "hide-popover"
|
|
17
|
+
* - "toggle-popover"
|
|
18
|
+
*/
|
|
19
|
+
command?: '"show-modal"' | '"close"' | '"request-close"' | '"show-popover"' | '"hide-popover"' | '"toggle-popover"';
|
|
20
|
+
/**
|
|
21
|
+
* Turns a `<button ` element into a command button, controlling a given interactive element by issuing the command specified in the button's `command` attribute. The `commandfor` attribute takes the ID of the element to control as its value. This is a more general version of `popovertarget`.
|
|
22
|
+
*/
|
|
23
|
+
commandfor?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The Boolean **`disabled`** attribute, when present, makes the element not mutable, focusable, or even submitted with the form. The user can neither edit nor focus on the control, nor its form control descendants.
|
|
26
|
+
*/
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The `form` HTML attribute associates a form-associated element with a form element within the same document. This attribute applies to the button, fieldset, input, object, output, select, and textarea elements.
|
|
30
|
+
*/
|
|
31
|
+
form?: string;
|
|
32
|
+
/**
|
|
33
|
+
* The URL that processes the information submitted by the button. Overrides the `action` attribute of the button's form owner. Does nothing if there is no form owner.
|
|
34
|
+
*/
|
|
35
|
+
formaction?: string;
|
|
36
|
+
/**
|
|
37
|
+
* If the button is a submit button (it's inside/associated with a `<form ` and doesn't have `type="button"`), specifies how to encode the form data that is submitted. Possible values: If this attribute is specified, it overrides the `enctype` attribute of the button's form owner.
|
|
38
|
+
*
|
|
39
|
+
* Possible values:
|
|
40
|
+
* - application/x-www-form-urlencoded
|
|
41
|
+
* - multipart/form-data
|
|
42
|
+
* - text/plain
|
|
43
|
+
*/
|
|
44
|
+
formenctype?: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain';
|
|
45
|
+
/**
|
|
46
|
+
* If the button is a submit button (it's inside/associated with a `<form ` and doesn't have `type="button"`), this attribute specifies the HTTP method used to submit the form. Possible values: If specified, this attribute overrides the `method` attribute of the button's form owner.
|
|
47
|
+
*
|
|
48
|
+
* Possible values:
|
|
49
|
+
* - post
|
|
50
|
+
* - get
|
|
51
|
+
* - dialog
|
|
52
|
+
*/
|
|
53
|
+
formmethod?: 'post' | 'get' | 'dialog';
|
|
54
|
+
/**
|
|
55
|
+
* If the button is a submit button, this Boolean attribute specifies that the form is not to be validated when it is submitted. If this attribute is specified, it overrides the `novalidate` attribute of the button's form owner. This attribute is also available on `<input type="image" ` and `<input type="submit" ` elements.
|
|
56
|
+
*/
|
|
57
|
+
formnovalidate?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* If the button is a submit button, this attribute is an author-defined name or standardized, underscore-prefixed keyword indicating where to display the response from submitting the form. This is the `name` of, or keyword for, a _browsing context_ (a tab, window, or iframe). If this attribute is specified, it overrides the `target` attribute of the button's form owner. The following keywords have special meanings:
|
|
60
|
+
*
|
|
61
|
+
* Possible values:
|
|
62
|
+
* - _self
|
|
63
|
+
* - _blank
|
|
64
|
+
* - _parent
|
|
65
|
+
* - _top
|
|
66
|
+
*/
|
|
67
|
+
formtarget?: '_self' | '_blank' | '_parent' | '_top';
|
|
68
|
+
/**
|
|
69
|
+
* Defines the `<button ` element as an **interest invoker**. Its value is the `id` of a 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.
|
|
70
|
+
* @experimental
|
|
71
|
+
*/
|
|
72
|
+
interestfor?: string;
|
|
73
|
+
/**
|
|
74
|
+
* The name of the button, submitted as a pair with the button's `value` as part of the form data, when that button is used to submit the form.
|
|
75
|
+
*/
|
|
76
|
+
name?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Turns a `<button ` element into a popover control button; takes the ID of the popover element to control as its value. Establishing a relationship between a popover and its invoker button using the `popovertarget` attribute has two additional useful effects:
|
|
79
|
+
*/
|
|
80
|
+
popovertarget?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Specifies the action to be performed on a popover element being controlled by a control `<button `. Possible values are: The button will hide a shown popover. If you try to hide an already hidden popover, no action will be taken. The button will show a hidden popover. If you try to show an already showing popover, no action will be taken. The button will toggle a popover between showing and hidden. If the popover is hidden, it will be shown; if the popover is showing, it will be hidden. If `popovertargetaction` is omitted, `"toggle"` is the default action that will be performed by the control button.
|
|
83
|
+
*
|
|
84
|
+
* Possible values:
|
|
85
|
+
* - "hide"
|
|
86
|
+
* - "show"
|
|
87
|
+
* - "toggle"
|
|
88
|
+
*/
|
|
89
|
+
popovertargetaction?: '"hide"' | '"show"' | '"toggle"';
|
|
90
|
+
/**
|
|
91
|
+
* The default behavior of the button. Possible values are:
|
|
92
|
+
*
|
|
93
|
+
* Possible values:
|
|
94
|
+
* - submit
|
|
95
|
+
* - reset
|
|
96
|
+
* - button
|
|
97
|
+
*/
|
|
98
|
+
type?: 'submit' | 'reset' | 'button';
|
|
99
|
+
/**
|
|
100
|
+
* Defines the value associated with the button's `name` when it's submitted with the form data. This value is passed to the server in params when the form is submitted using this button.
|
|
101
|
+
*/
|
|
102
|
+
value?: string | Numeric;
|
|
103
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
import type { Numeric } from '../attributes/StandardGlobalAttributes';
|
|
4
|
+
export interface CanvasAttributes extends CommonAttributes<ElementForTag<'canvas'>> {
|
|
5
|
+
/**
|
|
6
|
+
* The height of the coordinate space in CSS pixels. Defaults to 150.
|
|
7
|
+
*/
|
|
8
|
+
height?: Numeric;
|
|
9
|
+
/**
|
|
10
|
+
* The width of the coordinate space in CSS pixels. Defaults to 300.
|
|
11
|
+
*/
|
|
12
|
+
width?: Numeric;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
import type { Numeric } from '../attributes/StandardGlobalAttributes';
|
|
4
|
+
export interface ColAttributes extends CommonAttributes<ElementForTag<'col'>> {
|
|
5
|
+
/**
|
|
6
|
+
* Specifies the number of consecutive columns the `<col ` element spans. The value must be a positive integer greater than zero. If not present, its default value is `1`. The following attributes are deprecated and should not be used. They are documented below for reference when updating existing code and for historical interest only.
|
|
7
|
+
*/
|
|
8
|
+
span?: Numeric;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
import type { Numeric } from '../attributes/StandardGlobalAttributes';
|
|
4
|
+
export interface ColgroupAttributes extends CommonAttributes<ElementForTag<'colgroup'>> {
|
|
5
|
+
/**
|
|
6
|
+
* Specifies the number of consecutive columns the `<colgroup ` element spans. The value must be a positive integer greater than zero. If not present, its default value is `1`. The following attributes are deprecated and should not be used. They are documented below for reference when updating existing code and for historical interest only.
|
|
7
|
+
*/
|
|
8
|
+
span?: Numeric;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
import type { Numeric } from '../attributes/StandardGlobalAttributes';
|
|
4
|
+
export interface DataAttributes extends CommonAttributes<ElementForTag<'data'>> {
|
|
5
|
+
/**
|
|
6
|
+
* This attribute specifies the machine-readable translation of the content of the element.
|
|
7
|
+
*/
|
|
8
|
+
value?: string | Numeric;
|
|
9
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
export interface DelAttributes extends CommonAttributes<ElementForTag<'del'>> {
|
|
4
|
+
/**
|
|
5
|
+
* A URI for a resource that explains the change (for example, meeting minutes).
|
|
6
|
+
*/
|
|
7
|
+
cite?: string;
|
|
8
|
+
/**
|
|
9
|
+
* This attribute indicates the time and date of the change and must be a valid date string with an optional time. If the value cannot be parsed as a date with an optional time string, the element does not have an associated timestamp. For the format of the string without a time, see Date strings. The format of the string if it includes both date and time is covered in Local date and time strings.
|
|
10
|
+
*/
|
|
11
|
+
datetime?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
export interface DetailsAttributes extends CommonAttributes<ElementForTag<'details'>> {
|
|
4
|
+
/**
|
|
5
|
+
* This Boolean attribute indicates whether the details - that is, the contents of the `<details ` element - are currently visible. The details are shown when this attribute exists, or hidden when this attribute is absent. By default this attribute is absent which means the details are not visible.
|
|
6
|
+
*/
|
|
7
|
+
open?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* This attribute enables multiple `<details ` elements to be connected, with only one open at a time. This allows developers to easily create UI features such as accordions without scripting. The `name` attribute specifies a group name - give multiple `<details ` elements the same `name` value to group them. Only one of the grouped `<details ` elements can be open at a time - opening one will cause another to close. If multiple grouped `<details ` elements are given the `open` attribute, only the first one in the source order will be rendered open.
|
|
10
|
+
*/
|
|
11
|
+
name?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
export interface DialogAttributes extends CommonAttributes<ElementForTag<'dialog'>> {
|
|
4
|
+
/**
|
|
5
|
+
* Specifies the types of user actions that can be used to close the `<dialog ` element. This attribute distinguishes three methods by which a dialog might be closed: Possible values are: The dialog can be dismissed using any of the three methods. The dialog can be dismissed with a platform-specific user action or a developer-specified mechanism. The dialog can only be dismissed with a developer-specified mechanism. If the `<dialog ` element does not have a valid `closedby` value specified, then
|
|
6
|
+
*
|
|
7
|
+
* Possible values:
|
|
8
|
+
* - any
|
|
9
|
+
* - closerequest
|
|
10
|
+
* - none
|
|
11
|
+
*/
|
|
12
|
+
closedby?: 'any' | 'closerequest' | 'none';
|
|
13
|
+
/**
|
|
14
|
+
* Indicates that the dialog box is active and is available for interaction. If the `open` attribute is not set, the dialog box will not be visible to the user. It is recommended to use the `.show()` or `.showModal()` method to render dialogs, rather than the `open` attribute. If a `<dialog ` is opened using the `open` attribute, it is non-modal.
|
|
15
|
+
*/
|
|
16
|
+
open?: boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ElementForTag<T extends string> = T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : HTMLElement;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
import type { Numeric } from '../attributes/StandardGlobalAttributes';
|
|
4
|
+
export interface EmbedAttributes extends CommonAttributes<ElementForTag<'embed'>> {
|
|
5
|
+
/**
|
|
6
|
+
* The displayed height of the resource, in CSS pixels. This must be an absolute value; percentages are _not_ allowed.
|
|
7
|
+
*/
|
|
8
|
+
height?: Numeric;
|
|
9
|
+
/**
|
|
10
|
+
* The displayed width of the resource, in CSS pixels. This must be an absolute value; percentages are _not_ allowed.
|
|
11
|
+
*/
|
|
12
|
+
width?: Numeric;
|
|
13
|
+
/**
|
|
14
|
+
* The URL of the resource being embedded.
|
|
15
|
+
*/
|
|
16
|
+
src?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The MIME type to use to select the plug-in to instantiate.
|
|
19
|
+
*/
|
|
20
|
+
type?: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
import type { Numeric } from '../attributes/StandardGlobalAttributes';
|
|
4
|
+
/**
|
|
5
|
+
* @experimental
|
|
6
|
+
*/
|
|
7
|
+
export interface FencedframeAttributes extends CommonAttributes<ElementForTag<'fencedframe'>> {
|
|
8
|
+
/**
|
|
9
|
+
* Specifies a Permissions Policy for the `<fencedframe `, which defines what features are available to the `<fencedframe ` based on the origin of the request. See Permissions policies available to fenced frames for more details of which features can be controlled via a policy set on a fenced frame.
|
|
10
|
+
* @experimental
|
|
11
|
+
*/
|
|
12
|
+
allow?: string;
|
|
13
|
+
/**
|
|
14
|
+
* A unitless integer representing the height of the fenced frame in CSS pixels. The default is `150`.
|
|
15
|
+
* @experimental
|
|
16
|
+
*/
|
|
17
|
+
height?: Numeric;
|
|
18
|
+
/**
|
|
19
|
+
* A unitless integer representing the width of the fenced frame in CSS pixels. The default is `300`.
|
|
20
|
+
* @experimental
|
|
21
|
+
*/
|
|
22
|
+
width?: Numeric;
|
|
23
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
export interface FieldsetAttributes extends CommonAttributes<ElementForTag<'fieldset'>> {
|
|
4
|
+
/**
|
|
5
|
+
* The Boolean **`disabled`** attribute, when present, makes the element not mutable, focusable, or even submitted with the form. The user can neither edit nor focus on the control, nor its form control descendants.
|
|
6
|
+
*/
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The `form` HTML attribute associates a form-associated element with a form element within the same document. This attribute applies to the button, fieldset, input, object, output, select, and textarea elements.
|
|
10
|
+
*/
|
|
11
|
+
form?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The name associated with the group.
|
|
14
|
+
*/
|
|
15
|
+
name?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
export interface FormAttributes extends CommonAttributes<ElementForTag<'form'>> {
|
|
4
|
+
/**
|
|
5
|
+
* The character encoding accepted by the server. The specification allows a single case-insensitive value of `"UTF-8"`, reflecting the ubiquity of this encoding (historically multiple character encodings could be specified as a comma-separated or space-separated list).
|
|
6
|
+
*/
|
|
7
|
+
'accept-charset'?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Controls whether the browser may automatically complete the value and provides guidance about the type of information expected in the field.
|
|
10
|
+
*
|
|
11
|
+
* Possible values:
|
|
12
|
+
* - off
|
|
13
|
+
* - on
|
|
14
|
+
*/
|
|
15
|
+
autocomplete?: 'on' | 'off' | string;
|
|
16
|
+
/**
|
|
17
|
+
* The name of the form. The value must not be the empty string, and must be unique among the `form` elements in the forms collection that it is in, if any. The name becomes a property of the Window, Document, and document.forms objects, containing a reference to the form element.
|
|
18
|
+
*/
|
|
19
|
+
name?: string;
|
|
20
|
+
/**
|
|
21
|
+
* 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.
|
|
22
|
+
*/
|
|
23
|
+
rel?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The URL that processes the form submission. This value can be overridden by a `formaction` attribute on a button, `<input type="submit" `, or `<input type="image" ` element. This attribute is ignored when `method="dialog"` is set.
|
|
26
|
+
*/
|
|
27
|
+
action?: string;
|
|
28
|
+
/**
|
|
29
|
+
* If the value of the `method` attribute is `post`, `enctype` is the MIME type of the form submission. Possible values: This value can be overridden by `formenctype` attributes on button, `<input type="submit" `, or `<input type="image" ` elements.
|
|
30
|
+
*
|
|
31
|
+
* Possible values:
|
|
32
|
+
* - application/x-www-form-urlencoded
|
|
33
|
+
* - multipart/form-data
|
|
34
|
+
* - text/plain
|
|
35
|
+
*/
|
|
36
|
+
enctype?: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain';
|
|
37
|
+
/**
|
|
38
|
+
* The HTTP method to submit the form with. The only allowed methods/values are (case insensitive): This value is overridden by `formmethod` attributes on button, `<input type="submit" `, or `<input type="image" ` elements.
|
|
39
|
+
*
|
|
40
|
+
* Possible values:
|
|
41
|
+
* - post
|
|
42
|
+
* - get
|
|
43
|
+
* - dialog
|
|
44
|
+
*/
|
|
45
|
+
method?: 'post' | 'get' | 'dialog';
|
|
46
|
+
/**
|
|
47
|
+
* This Boolean attribute indicates that the form shouldn't be validated when submitted. If this attribute is not set (and therefore the form **_is_** validated), it can be overridden by a `formnovalidate` attribute on a button, `<input type="submit" `, or `<input type="image" ` element belonging to the form.
|
|
48
|
+
*/
|
|
49
|
+
novalidate?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Indicates where to display the response after submitting the form. It is a name/keyword for a _browsing context_ (for example, tab, window, or iframe). The following keywords have special meanings: This value can be overridden by a `formtarget` attribute on a button, `<input type="submit" `, or `<input type="image" ` element.
|
|
52
|
+
*
|
|
53
|
+
* Possible values:
|
|
54
|
+
* - _self
|
|
55
|
+
* - _blank
|
|
56
|
+
* - _parent
|
|
57
|
+
* - _top
|
|
58
|
+
* - _unfencedTop
|
|
59
|
+
*/
|
|
60
|
+
target?: '_self' | '_blank' | '_parent' | '_top' | '_unfencedTop';
|
|
61
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
export interface HtmlAttributes extends CommonAttributes<ElementForTag<'html'>> {
|
|
4
|
+
/**
|
|
5
|
+
* Specifies the XML Namespace of the document. Default value is `"http://www.w3.org/1999/xhtml"`. This is required in documents parsed with XML parsers, and optional in text/html documents.
|
|
6
|
+
*/
|
|
7
|
+
xmlns?: string;
|
|
8
|
+
}
|