@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.
- package/dist/classnames.d.ts +11 -0
- package/dist/classnames.test.d.ts +1 -0
- package/dist/css-escape.d.ts +25 -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 +568 -147
- 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 -37
- 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 +144 -7
- package/dist/index.d.ts +1 -0
- 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/log.d.ts +2 -0
- package/dist/internal/type-assert.d.ts +39 -0
- package/dist/jsx-dev-runtime.cjs +3 -2
- package/dist/jsx-dev-runtime.mjs +2 -3
- package/dist/{jsx-runtime-DpEMYmD9.js → jsx-runtime-BQPDXeiv.js} +675 -32
- package/dist/{jsx-runtime-CsQM2fQb.js → jsx-runtime-DlHYwToA.js} +672 -33
- package/dist/jsx-runtime.cjs +3 -1
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/jsx-types.d.ts +6 -24
- package/dist/jsx.d.ts +3 -2
- package/dist/jsx.test.d.ts +1 -0
- package/dist/template-strings.d.ts +12 -0
- package/dist/template-strings.test.d.ts +6 -0
- package/package.json +93 -82
- package/dist/htmlspec/AnchorElement.d.ts +0 -83
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
import type { Numeric } from '../attributes/StandardGlobalAttributes';
|
|
4
|
+
export interface IframeAttributes extends CommonAttributes<ElementForTag<'iframe'>> {
|
|
5
|
+
/**
|
|
6
|
+
* Specifies a Permissions Policy for the `<iframe `. The policy defines what features are available to the `<iframe ` (for example, access to the microphone, camera, battery, web-share, etc.) based on the origin of the request. See iframes in the `Permissions-Policy` topic for examples.
|
|
7
|
+
*/
|
|
8
|
+
allow?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Set to `true` if the `<iframe ` can activate fullscreen mode by calling the requestFullscreen() method.
|
|
11
|
+
*/
|
|
12
|
+
allowfullscreen?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Set to `true` to make the `<iframe ` credentialless, meaning that its content will be loaded in a new, ephemeral context. It doesn't have access to the network, cookies, and storage data associated with its origin. It uses a new context local to the top-level document lifetime. In return, the Cross-Origin-Embedder-Policy (COEP) embedding rules can be lifted, so documents with COEP set can embed third-party documents that do not. See IFrame credentialless for more details.
|
|
15
|
+
* @experimental
|
|
16
|
+
*/
|
|
17
|
+
credentialless?: string;
|
|
18
|
+
/**
|
|
19
|
+
* A Content Security Policy enforced for the embedded resource. See HTMLIFrameElement.csp for details.
|
|
20
|
+
* @experimental
|
|
21
|
+
*/
|
|
22
|
+
csp?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The height of the frame in CSS pixels. Default is `150`.
|
|
25
|
+
*/
|
|
26
|
+
height?: Numeric;
|
|
27
|
+
/**
|
|
28
|
+
* Indicates when the browser should load the iframe: Load the iframe immediately on page load (this is the default value). Defer loading of the iframe until it reaches a calculated distance from the visual viewport, as defined by the browser. The intent is to avoid using the network and storage bandwidth required to fetch the frame until the browser is reasonably certain that it will be needed. This improves the performance and cost in most typical use cases, in particular by reducing initial page load times.
|
|
29
|
+
*
|
|
30
|
+
* Possible values:
|
|
31
|
+
* - eager
|
|
32
|
+
* - lazy
|
|
33
|
+
*/
|
|
34
|
+
loading?: 'eager' | 'lazy';
|
|
35
|
+
/**
|
|
36
|
+
* A targetable name for the embedded browsing context. This can be used in the `target` attribute of the a, form, or base elements; the `formtarget` attribute of the input or button elements; or the `windowName` parameter in the window.open() method. In addition, the name becomes a property of the Window and Document objects, containing a reference to the embedded window or the element itself.
|
|
37
|
+
*/
|
|
38
|
+
name?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Contains a string representation of an options object representing a private state token operation; this object has the same structure as the `RequestInit` dictionary's `privateToken` property. IFrames containing this attribute can initiate operations such as issuing or redeeming tokens when their embedded content is loaded.
|
|
41
|
+
* @experimental
|
|
42
|
+
*/
|
|
43
|
+
privateToken?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Indicates which referrer to send when fetching the frame's resource: The Referer header will not be sent. The Referer header will not be sent to origins without TLS (HTTPS). The sent referrer will be limited to the origin of the referring page: its scheme, host, and port. The referrer sent to other origins will be limited to the scheme, the host, and the port. Navigations on the same origin will still include the path. A referrer will be sent for same origin, but cross-origin requests will contain no referrer information. Only send the origin of the document as the referrer when the protocol security level stays the same (HTTPS→HTTPS), but don't send it to a less secure destination (HTTPS→HTTP). Send a full URL when performing a same-origin request, only send the origin when the protocol security level stays the same (HTTPS→HTTPS), and send no header to a less secure destination (HTTPS→HTTP). The referrer will include the origin _and_ the path (but not the fragment, password, or username). **This value is unsafe**, because it leaks origins and paths from TLS-protected resources to insecure origins.
|
|
46
|
+
*
|
|
47
|
+
* Possible values:
|
|
48
|
+
* - no-referrer
|
|
49
|
+
* - no-referrer-when-downgrade
|
|
50
|
+
* - origin
|
|
51
|
+
* - origin-when-cross-origin
|
|
52
|
+
* - same-origin
|
|
53
|
+
* - strict-origin
|
|
54
|
+
* - strict-origin-when-cross-origin
|
|
55
|
+
* - unsafe-url
|
|
56
|
+
*/
|
|
57
|
+
referrerpolicy?: 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
|
|
58
|
+
/**
|
|
59
|
+
* Controls the restrictions applied to the content embedded in the `<iframe `. The value of the attribute can either be empty to apply all restrictions, or space-separated tokens to lift particular restrictions: Allows downloading files through an a or area element with the download attribute, as well as through the navigation that leads to a download of a file. This works regardless of whether the user clicked on the link, or JS code initiated it without user interaction. Allows the page to submit forms. If this keyword is not used, a form will be displayed as normal, but submitting it will not trigger input validation, send data to a web server, or close a dialog. Allows the page to open modal windows by Window.alert(), Window.confirm(), Window.print() and Window.prompt(), while opening a dialog is allowed regardless of this keyword. It also allows the page to receive BeforeUnloadEvent event. Lets the resource lock the screen orientation. Allows the page to use the Pointer Lock API. Allows popups (created, for example, by Window.open() or `target="_blank"`). If this keyword is not used, such functionality will silently fail. Allows a sandboxed document to open a new browsing context without forcing the sandboxing flags upon it. This will allow, for example, a third-party advertisement to be safely sandboxed without forcing the same restrictions upon the page the ad links to. If this flag is not included, a redirected page, popup window, or new tab will be subject to the same sandbox restrictions as the originating `<iframe `. Allows embedders to have control over whether an iframe can start a presentation session. If this token is not used, the resource is treated as being from a special origin that always fails the same-origin policy (potentially preventing access to data storage/cookies and some JavaScript APIs). Allows the page to run scripts (but not create pop-up windows). If this keyword is not used, this operation is not allowed. Allows a document loaded in the `<iframe ` to use the Storage Access API to request access to unpartitioned cookies. Lets the resource navigate the top-level browsing context (the one named `_top`). Lets the resource navigate the top-level browsing context, but only if initiated by a user gesture. Allows navigations to non-`http` protocols built into browser or registered by a website. This feature is also activated by `allow-popups` or `allow-top-navigation` keyword.
|
|
60
|
+
*/
|
|
61
|
+
sandbox?: string;
|
|
62
|
+
/**
|
|
63
|
+
* The URL of the page to embed. Use a value of `about:blank` to embed an empty page that conforms to the same-origin policy. Also note that programmatically removing an `<iframe `'s src attribute (e.g., via Element.removeAttribute()) causes `about:blank` to be loaded in the frame in Firefox (from version 65), Chromium-based browsers, and Safari/iOS.
|
|
64
|
+
*/
|
|
65
|
+
src?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Inline HTML to embed, overriding the `src` attribute. Its content should follow the syntax of a full HTML document, which includes the doctype directive, `<html `, `<body ` tags, etc., although most of them can be omitted, leaving only the body content. This doc will have `about:srcdoc` as its location. If a browser does not support the `srcdoc` attribute, it will fall back to the URL in the `src` attribute.
|
|
68
|
+
*/
|
|
69
|
+
srcdoc?: string;
|
|
70
|
+
/**
|
|
71
|
+
* The width of the frame in CSS pixels. Default is `300`. These attributes are deprecated and may no longer be supported by all user agents. You should not use them in new content, and try to remove them from existing content.
|
|
72
|
+
*/
|
|
73
|
+
width?: Numeric;
|
|
74
|
+
/**
|
|
75
|
+
* Only when the frame's content is larger than its dimensions. Always show a scrollbar. Never show a scrollbar.
|
|
76
|
+
*
|
|
77
|
+
* Possible values:
|
|
78
|
+
* - yes
|
|
79
|
+
* - no
|
|
80
|
+
*/
|
|
81
|
+
auto?: 'yes' | 'no';
|
|
82
|
+
}
|