@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,8 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
export interface MapAttributes extends CommonAttributes<ElementForTag<'map'>> {
|
|
4
|
+
/**
|
|
5
|
+
* The `name` attribute gives the map a name so that it can be referenced. The attribute must be present and must have a non-empty value with no space characters. The value of the `name` attribute must not be equal to the value of the `name` attribute of another `<map ` element in the same document. If the `id` attribute is also specified, both attributes must have the same value.
|
|
6
|
+
*/
|
|
7
|
+
name?: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
export interface MetaAttributes extends CommonAttributes<ElementForTag<'meta'>> {
|
|
4
|
+
/**
|
|
5
|
+
* This attribute declares the document's character encoding. If the attribute is present, its value must be an ASCII case-insensitive match for the string `"utf-8"`, because UTF-8 is the only valid encoding for HTML5 documents. `<meta ` elements which declare a character encoding must be located entirely within the first 1024 bytes of the document.
|
|
6
|
+
*/
|
|
7
|
+
charset?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The **`content`** attribute specifies the value of a metadata name defined by the `<meta ` `name` attribute. It takes a string as its value, and the expected syntax varies depending on the `name` value used.
|
|
10
|
+
*/
|
|
11
|
+
content?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The `name` and `content` attributes can be used together to provide document metadata in terms of name-value pairs, with the `name` attribute giving the metadata name, and the `content` attribute giving the value.
|
|
14
|
+
*/
|
|
15
|
+
name?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Defines a pragma directive, which are instructions for the browser for processing the document. The attribute's name is short for `http-equivalent` because the allowed values are names of equivalent HTTP headers.
|
|
18
|
+
*/
|
|
19
|
+
'http-equiv'?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The `media` attribute defines which media the theme color defined in the `content` attribute should be applied to. Its value is a media query, which defaults to `all` if the attribute is missing. This attribute is only relevant when the element's `name` attribute is set to `theme-color`. Otherwise, it has no effect, and should not be included.
|
|
22
|
+
*/
|
|
23
|
+
media?: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
import type { Numeric } from '../attributes/StandardGlobalAttributes';
|
|
4
|
+
export interface MeterAttributes extends CommonAttributes<ElementForTag<'meter'>> {
|
|
5
|
+
/**
|
|
6
|
+
* The current numeric value. This must be between the minimum and maximum values (`min` attribute and `max` attribute) if they are specified. If unspecified or malformed, the value is `0`. If specified, but not within the range given by the `min` attribute and `max` attribute, the value is equal to the nearest end of the range.
|
|
7
|
+
*/
|
|
8
|
+
value?: string | Numeric;
|
|
9
|
+
/**
|
|
10
|
+
* The **`min`** attribute defines the minimum value that is acceptable and valid for the input containing the attribute. If the `value` of the element is less than this, the element fails validation. This value must be less than or equal to the value of the `max` attribute.
|
|
11
|
+
*/
|
|
12
|
+
min?: string | Numeric;
|
|
13
|
+
/**
|
|
14
|
+
* The **`max`** attribute defines the maximum value that is acceptable and valid for the input containing the attribute. If the `value` of the element is greater than this, the element fails validation. This value must be greater than or equal to the value of the `min` attribute. If the `max` attribute is present but is not specified or is invalid, no `max` value is applied. If the `max` attribute is valid and a non-empty value is greater than the maximum allowed by the `max` attribute, constraint validation will prevent form submission.
|
|
15
|
+
*/
|
|
16
|
+
max?: string | Numeric;
|
|
17
|
+
/**
|
|
18
|
+
* The upper numeric bound of the low end of the measured range. This must be greater than the minimum value (`min` attribute), and it also must be less than the high value and maximum value (`high` attribute and `max` attribute, respectively), if any are specified. If unspecified, or if less than the minimum value, the `low` value is equal to the minimum value.
|
|
19
|
+
*/
|
|
20
|
+
low?: Numeric;
|
|
21
|
+
/**
|
|
22
|
+
* The lower numeric bound of the high end of the measured range. This must be less than the maximum value (`max` attribute), and it also must be greater than the low value and minimum value (`low` attribute and `min` attribute, respectively), if any are specified. If unspecified, or if greater than the maximum value, the `high` value is equal to the maximum value.
|
|
23
|
+
*/
|
|
24
|
+
high?: Numeric;
|
|
25
|
+
/**
|
|
26
|
+
* This attribute indicates the optimal numeric value. It must be within the range (as defined by the `min` attribute and `max` attribute). When used with the `low` attribute and `high` attribute, it gives an indication where along the range is considered preferable. For example, if it is between the `min` attribute and the `low` attribute, then the lower range is considered preferred. The browser may color the meter's bar differently depending on whether the value is less than or equal to the optimum value.
|
|
27
|
+
*/
|
|
28
|
+
optimum?: Numeric;
|
|
29
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
import type { Numeric } from '../attributes/StandardGlobalAttributes';
|
|
4
|
+
export interface ObjectAttributes extends CommonAttributes<ElementForTag<'object'>> {
|
|
5
|
+
/**
|
|
6
|
+
* The address of the resource as a valid URL. At least one of **data** and **type** must be defined.
|
|
7
|
+
*/
|
|
8
|
+
data?: string;
|
|
9
|
+
/**
|
|
10
|
+
* 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.
|
|
11
|
+
*/
|
|
12
|
+
form?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The height of the displayed resource, as in <integer> in CSS pixels.
|
|
15
|
+
*/
|
|
16
|
+
height?: Numeric;
|
|
17
|
+
/**
|
|
18
|
+
* The name of valid browsing context (HTML5), or the name of the control (HTML 4). The name becomes a property of the Window and Document objects, containing a reference to the embedded window or the element itself.
|
|
19
|
+
*/
|
|
20
|
+
name?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The content type of the resource specified by **data**. At least one of **data** and **type** must be defined.
|
|
23
|
+
*/
|
|
24
|
+
type?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The width of the display resource, as in <integer> in CSS pixels.
|
|
27
|
+
*/
|
|
28
|
+
width?: Numeric;
|
|
29
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
import type { Numeric } from '../attributes/StandardGlobalAttributes';
|
|
4
|
+
export interface OlAttributes extends CommonAttributes<ElementForTag<'ol'>> {
|
|
5
|
+
/**
|
|
6
|
+
* This Boolean attribute specifies that the list's items are in reverse order. Items will be numbered from high to low.
|
|
7
|
+
*/
|
|
8
|
+
reversed?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* An integer to start counting from for the list items. Always an Arabic numeral (1, 2, 3, etc.), even when the numbering `type` is letters or Roman numerals. For example, to start numbering elements from the letter "d" or the Roman numeral "iv," use `start="4"`.
|
|
11
|
+
*/
|
|
12
|
+
start?: Numeric;
|
|
13
|
+
/**
|
|
14
|
+
* Sets the numbering type: The specified type is used for the entire list unless a different `type` attribute is used on an enclosed li element.
|
|
15
|
+
*
|
|
16
|
+
* Possible values:
|
|
17
|
+
* - a
|
|
18
|
+
* - A
|
|
19
|
+
* - i
|
|
20
|
+
* - I
|
|
21
|
+
* - 1
|
|
22
|
+
*/
|
|
23
|
+
type?: 'a' | 'A' | 'i' | 'I' | '1';
|
|
24
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
export interface OptgroupAttributes extends CommonAttributes<ElementForTag<'optgroup'>> {
|
|
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 name of the group of options, which the browser can use when labeling the options in the user interface. This attribute is mandatory if this element is used.
|
|
10
|
+
*/
|
|
11
|
+
label?: string;
|
|
12
|
+
}
|
|
@@ -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 OptionAttributes extends CommonAttributes<ElementForTag<'option'>> {
|
|
5
|
+
/**
|
|
6
|
+
* 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.
|
|
7
|
+
*/
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* This attribute is text for the label indicating the meaning of the option. If the `label` attribute isn't defined, its value is that of the element text content.
|
|
11
|
+
*/
|
|
12
|
+
label?: string;
|
|
13
|
+
/**
|
|
14
|
+
* If present, this Boolean attribute indicates that the option is initially selected. If the `<option ` element is the descendant of a select element whose `multiple` attribute is not set, only one single `<option ` of this select element may have the `selected` attribute.
|
|
15
|
+
*/
|
|
16
|
+
selected?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The content of this attribute represents the value to be submitted with the form, should this option be selected. If this attribute is omitted, the value is taken from the text content of the option element.
|
|
19
|
+
*/
|
|
20
|
+
value?: string | Numeric;
|
|
21
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
export interface OutputAttributes extends CommonAttributes<ElementForTag<'output'>> {
|
|
4
|
+
/**
|
|
5
|
+
* The **`for`** attribute is an allowed attribute for label and output. When used on a `<label ` element it indicates the form element that this label describes. When used on an `<output ` element it allows for an explicit relationship between the elements that represent values which are used in the output.
|
|
6
|
+
*/
|
|
7
|
+
for?: string;
|
|
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 element's name. Used in the form.elements API. The `<output ` value, name, and contents are NOT submitted during form submission.
|
|
14
|
+
*/
|
|
15
|
+
name?: string;
|
|
16
|
+
}
|
|
@@ -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 ProgressAttributes extends CommonAttributes<ElementForTag<'progress'>> {
|
|
5
|
+
/**
|
|
6
|
+
* The **`max`** attribute defines the maximum value that is acceptable and valid for the input containing the attribute. If the `value` of the element is greater than this, the element fails validation. This value must be greater than or equal to the value of the `min` attribute. If the `max` attribute is present but is not specified or is invalid, no `max` value is applied. If the `max` attribute is valid and a non-empty value is greater than the maximum allowed by the `max` attribute, constraint validation will prevent form submission.
|
|
7
|
+
*/
|
|
8
|
+
max?: string | Numeric;
|
|
9
|
+
/**
|
|
10
|
+
* This attribute specifies how much of the task that has been completed. It must be a valid floating point number between `0` and `max`, or between `0` and `1` if `max` is omitted. If there is no `value` attribute, the progress bar is indeterminate; this indicates that an activity is ongoing with no indication of how long it is expected to take.
|
|
11
|
+
*/
|
|
12
|
+
value?: string | Numeric;
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
export interface QAttributes extends CommonAttributes<ElementForTag<'q'>> {
|
|
4
|
+
/**
|
|
5
|
+
* The value of this attribute is 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,57 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
/**
|
|
4
|
+
* All valid properties for a <script> HTML element.
|
|
5
|
+
*/
|
|
6
|
+
export interface ScriptAttributes extends CommonAttributes<ElementForTag<'script'>> {
|
|
7
|
+
/**
|
|
8
|
+
* For classic scripts, if the `async` attribute is present, then the classic script will be fetched in parallel to parsing and evaluated as soon as it is available. For module scripts, if the `async` attribute is present then the scripts and all their dependencies will be fetched in parallel to parsing and evaluated as soon as they are available. This attribute allows the elimination of **parser-blocking JavaScript** where the browser would have to load and evaluate scripts before continuing to parse. `defer` has a similar effect in this case. If the attribute is specified with the `defer` attribute, the element will act as if only the `async` attribute is specified. This is a boolean attribute: the presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value. See Browser compatibility for notes on browser support. See also Async scripts for asm.js.
|
|
9
|
+
*/
|
|
10
|
+
async?: boolean;
|
|
11
|
+
/** Specifies one or more URLs for Attribution Reporting. Can also be a boolean attribute. */
|
|
12
|
+
attributionsrc?: string | boolean;
|
|
13
|
+
/**
|
|
14
|
+
* This attribute explicitly indicates that certain operations should be blocked until the script has executed. The operations that are to be blocked must be a space-separated list of blocking tokens. Currently there is only one token:
|
|
15
|
+
*
|
|
16
|
+
* Possible values:
|
|
17
|
+
* - render
|
|
18
|
+
*/
|
|
19
|
+
blocking?: 'render';
|
|
20
|
+
/**
|
|
21
|
+
* 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.
|
|
22
|
+
*/
|
|
23
|
+
crossorigin?: '' | 'anonymous' | 'use-credentials';
|
|
24
|
+
/**
|
|
25
|
+
* This Boolean attribute is set to indicate to a browser that the script is meant to be executed after the document has been parsed, but before firing DOMContentLoaded event. Scripts with the `defer` attribute will prevent the `DOMContentLoaded` event from firing until the script has loaded and finished evaluating. Scripts with the `defer` attribute will execute in the order in which they appear in the document. This attribute allows the elimination of **parser-blocking JavaScript** where the browser would have to load and evaluate scripts before continuing to parse. `async` has a similar effect in this case. If the attribute is specified with the `async` attribute, the element will act as if only the `async` attribute is specified.
|
|
26
|
+
*/
|
|
27
|
+
defer?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The **`fetchpriority`** attribute allows a developer to signal that fetching a particular image early in the loading process has more or less impact on user experience than a browser can reasonably infer when assigning an internal priority. This in turn allows the browser to increase or decrease the priority, and potentially load the image earlier or later than it would otherwise.
|
|
30
|
+
*/
|
|
31
|
+
fetchpriority?: 'high' | 'low' | 'auto';
|
|
32
|
+
/**
|
|
33
|
+
* This attribute contains inline metadata that a user agent can use to verify that a fetched resource has been delivered without unexpected manipulation. The attribute must not be specified when the `src` attribute is absent. See Subresource Integrity.
|
|
34
|
+
*/
|
|
35
|
+
integrity?: string;
|
|
36
|
+
/**
|
|
37
|
+
* This Boolean attribute is set to indicate that the script should not be executed in browsers that support ES modules - in effect, this can be used to serve fallback scripts to older browsers that do not support modular JavaScript code.
|
|
38
|
+
*/
|
|
39
|
+
nomodule?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Indicates which [referrer](/en-US/docs/Web/API/Document/referrer) to send when fetching the script, or resources fetched by the script:
|
|
42
|
+
*/
|
|
43
|
+
referrerpolicy?: '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
|
|
44
|
+
/**
|
|
45
|
+
* This attribute specifies the URI of an external script; this can be used as an alternative to embedding a script directly within a document.
|
|
46
|
+
*/
|
|
47
|
+
src?: string;
|
|
48
|
+
/**
|
|
49
|
+
* This attribute indicates the type of script represented. The value of this attribute will be one of the following: Indicates that the script is a "classic script", containing JavaScript code. Authors are encouraged to omit the attribute if the script refers to JavaScript code rather than specify a MIME type. JavaScript MIME types are listed in the IANA media types specification. This value indicates that the body of the element contains an import map. The import map is a JSON object that developers can use to control how the browser resolves module specifiers when importing JavaScript modules. This value causes the code to be treated as a JavaScript module. The processing of the script contents is deferred. The `charset` and `defer` attributes have no effect. For information on using `module`, see our JavaScript modules guide. Unlike classic scripts, module scripts require the use of the CORS protocol for cross-origin fetching. This value indicates that the body of the element contains speculation rules. Speculation rules take the form of a JSON object that determine what resources should be prefetched or prerendered by the browser. This is part of the Speculation Rules API. The embedded content is treated as a data block, and won't be processed by the browser. Developers must use a valid MIME type that is not a JavaScript MIME type to denote data blocks. All of the other attributes will be ignored, including the `src` attribute.
|
|
50
|
+
*
|
|
51
|
+
* Possible values:
|
|
52
|
+
* - importmap
|
|
53
|
+
* - module
|
|
54
|
+
* - speculationrules
|
|
55
|
+
*/
|
|
56
|
+
type?: 'importmap' | 'module' | 'speculationrules';
|
|
57
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
import type { Numeric } from '../attributes/StandardGlobalAttributes';
|
|
4
|
+
export interface SelectAttributes extends CommonAttributes<ElementForTag<'select'>> {
|
|
5
|
+
/**
|
|
6
|
+
* Controls whether the browser may automatically complete the value and provides guidance about the type of information expected in the field.
|
|
7
|
+
*
|
|
8
|
+
* Possible values:
|
|
9
|
+
* - off
|
|
10
|
+
* - on
|
|
11
|
+
*/
|
|
12
|
+
autocomplete?: 'off' | 'on';
|
|
13
|
+
/**
|
|
14
|
+
* 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.
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* 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.
|
|
19
|
+
*/
|
|
20
|
+
form?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The Boolean **`multiple`** attribute, if set, means the form control accepts one or more values. The attribute is valid for the email and file input types and the select. The manner by which the user opts for multiple values depends on the form control.
|
|
23
|
+
*/
|
|
24
|
+
multiple?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* This attribute is used to specify the name of the control.
|
|
27
|
+
*/
|
|
28
|
+
name?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The Boolean **`required`** attribute, if present, indicates that the user must specify a value for the input before the owning form can be submitted.
|
|
31
|
+
*/
|
|
32
|
+
required?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The **`size`** attribute defines the width of the input and the height of the select element. For an `input` element, it defines the number of characters that the user agent allows the user to see when editing the value. For a `select` element, it defines the number of options that should be shown to the user. This must be a valid non-negative integer greater than zero.
|
|
35
|
+
*/
|
|
36
|
+
size?: Numeric;
|
|
37
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
export interface SlotAttributes extends CommonAttributes<ElementForTag<'slot'>> {
|
|
4
|
+
/**
|
|
5
|
+
* The slot's name. When the slot's containing component gets rendered, the slot is rendered with the custom element's child that has a matching `slot` attribute. A _named slot_ is a `<slot ` element with a `name` attribute. Unnamed slots have the name default to the empty string. Names should be unique per shadow root: if you have two slots with the same name, all of the elements with a matching `slot` attribute will be assigned to the first slot with that name.
|
|
6
|
+
*/
|
|
7
|
+
name?: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
import type { Numeric } from '../attributes/StandardGlobalAttributes';
|
|
4
|
+
export interface SourceAttributes extends CommonAttributes<ElementForTag<'source'>> {
|
|
5
|
+
/**
|
|
6
|
+
* Specifies the MIME media type of the image or other media type, optionally including a `codecs` parameter.
|
|
7
|
+
*/
|
|
8
|
+
type?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Specifies a comma-separated list of one or more image URLs and their descriptors. Required if the parent of `<source ` is picture. Not allowed if the parent is audio or video. The list consists of strings separated by commas, indicating a set of possible images for the browser to use. Each string is composed of: Each string in the list must have either a width descriptor or a pixel density descriptor to be valid. These two descriptors should not be used together; only one should be used consistently throughout the list. The value of each descriptor in the list must be unique. The browser chooses the most adequate image to display at a given point of time based on these descriptors. If the descriptors are not specified, the default value used is `1x`. If the `sizes` attribute is also present, then each string must include a width descriptor. If the browser does not support `srcset`, then `src` will be used for the default image source.
|
|
11
|
+
*/
|
|
12
|
+
srcset?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Specifies the URL of the media resource. Required if the parent of `<source ` is audio or video. Not allowed if the parent is picture.
|
|
15
|
+
*/
|
|
16
|
+
src?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Specifies a list of source sizes that describe the final rendered width of the image. Allowed if the parent of `<source ` is picture. Not allowed if the parent is audio or video. The list consists of source sizes separated by commas. Each source size is media condition-length pair. Before laying the page out, the browser uses this information to determine which image defined in `srcset` to display. Note that `sizes` will take effect only if width descriptors are provided with `srcset`, not pixel density descriptors (i.e., `200w` should be used instead of `2x`).
|
|
19
|
+
*/
|
|
20
|
+
sizes?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Specifies the media query for the resource's intended media.
|
|
23
|
+
*/
|
|
24
|
+
media?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Specifies the intrinsic height of the image in pixels. Allowed if the parent of `<source ` is a picture. Not allowed if the parent is audio or video. The height value must be an integer without any units.
|
|
27
|
+
*/
|
|
28
|
+
height?: Numeric;
|
|
29
|
+
/**
|
|
30
|
+
* Specifies the intrinsic width of the image in pixels. Allowed if the parent of `<source ` is a picture. Not allowed if the parent is audio or video. The width value must be an integer without any units.
|
|
31
|
+
*/
|
|
32
|
+
width?: Numeric;
|
|
33
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
import type { CssFrag } from '../../template-strings';
|
|
4
|
+
/**
|
|
5
|
+
* Represents the attributes of a <style> HTML element.
|
|
6
|
+
*/
|
|
7
|
+
export interface StyleAttributes extends CommonAttributes<ElementForTag<'style'>> {
|
|
8
|
+
/**
|
|
9
|
+
* This attribute explicitly indicates that certain operations should be blocked on the fetching of critical subresources and the application of the stylesheet to the document. @import-ed stylesheets are generally considered as critical subresources, whereas background-image and fonts are not. The operations that are to be blocked must be a space-separated list of blocking tokens listed below. Currently there is only one token:
|
|
10
|
+
*
|
|
11
|
+
* Possible values:
|
|
12
|
+
* - render
|
|
13
|
+
*/
|
|
14
|
+
blocking?: 'render';
|
|
15
|
+
/**
|
|
16
|
+
* This attribute defines which media the style should be applied to. Its value is a media query, which defaults to `all` if the attribute is missing.
|
|
17
|
+
*/
|
|
18
|
+
media?: string;
|
|
19
|
+
/** children attribute. */
|
|
20
|
+
children?: CssFrag;
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
import type { Numeric } from '../attributes/StandardGlobalAttributes';
|
|
4
|
+
export interface TdAttributes extends CommonAttributes<ElementForTag<'td'>> {
|
|
5
|
+
/**
|
|
6
|
+
* Contains a non-negative integer value that indicates how many columns the data cell spans or extends. The default value is `1`. User agents dismiss values higher than 1000 as incorrect, setting to the default value (`1`).
|
|
7
|
+
*/
|
|
8
|
+
colspan?: Numeric;
|
|
9
|
+
/**
|
|
10
|
+
* Contains a list of space-separated strings, each corresponding to the `id` attribute of the th elements that provide headings for this table cell.
|
|
11
|
+
*/
|
|
12
|
+
headers?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Contains a non-negative integer value that indicates for how many rows the data cell spans or extends. The default value is `1`; if its value is set to `0`, it extends until the end of the table grouping section (thead, tbody, tfoot, even if implicitly defined), that the cell belongs to. Values higher than `65534` are clipped to `65534`. 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.
|
|
15
|
+
*/
|
|
16
|
+
rowspan?: Numeric;
|
|
17
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { CommonAttributes } from '../attributes/ElementAttributes';
|
|
2
|
+
import type { ElementForTag } from './element-types';
|
|
3
|
+
export interface TemplateAttributes extends CommonAttributes<ElementForTag<'template'>> {
|
|
4
|
+
/**
|
|
5
|
+
* Creates a shadow root for the parent element. It is a declarative version of the Element.attachShadow() method and accepts the same enumerated values. Exposes the internal shadow root DOM for JavaScript (recommended for most use cases). Hides the internal shadow root DOM from JavaScript.
|
|
6
|
+
*
|
|
7
|
+
* Possible values:
|
|
8
|
+
* - open
|
|
9
|
+
* - closed
|
|
10
|
+
*/
|
|
11
|
+
shadowrootmode?: 'open' | 'closed';
|
|
12
|
+
/**
|
|
13
|
+
* Sets the value of the `clonable` property of a `ShadowRoot` created using this element to `true`. If set, a clone of the shadow host (the parent element of this `<template `) created with Node.cloneNode() or Document.importNode() will include a shadow root in the copy.
|
|
14
|
+
*/
|
|
15
|
+
shadowrootclonable?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Sets the value of the `delegatesFocus` property of a `ShadowRoot` created using this element to `true`. If this is set and a non-focusable element in the shadow tree is selected, then focus is delegated to the first focusable element in the tree. The value defaults to `false`.
|
|
18
|
+
*/
|
|
19
|
+
shadowrootdelegatesfocus?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Sets the value of the `referenceTarget` property of a `ShadowRoot` created using this element. The value should be the ID of an element inside the shadow DOM. If set, target references to the host element from outside the shadow DOM will cause the referenced target element to become the effective target of the reference to the host element.
|
|
22
|
+
* @experimental
|
|
23
|
+
*/
|
|
24
|
+
shadowrootreferencetarget?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Sets the value of the `serializable` property of a `ShadowRoot` created using this element to `true`. If set, the shadow root may be serialized by calling the Element.getHTML() or ShadowRoot.getHTML() methods with the `options.serializableShadowRoots` parameter set `true`. The value defaults to `false`.
|
|
27
|
+
*/
|
|
28
|
+
shadowrootserializable?: string;
|
|
29
|
+
}
|