@typesafe-html5/typescript 0.2.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +166 -0
- package/block/article/article.ts +506 -0
- package/block/aside/aside.ts +522 -0
- package/block/audio/audio.ts +506 -0
- package/block/blockquote/blockquote.ts +522 -0
- package/block/body/body.ts +458 -0
- package/block/canvas/canvas.ts +538 -0
- package/block/caption/caption.ts +506 -0
- package/block/colgroup/colgroup.ts +154 -0
- package/block/datalist/datalist.ts +506 -0
- package/block/dd/dd.ts +506 -0
- package/block/del/del.ts +538 -0
- package/block/details/details.ts +586 -0
- package/block/dialog/dialog.ts +586 -0
- package/block/div/div.ts +586 -0
- package/block/dl/dl.ts +506 -0
- package/block/dt/dt.ts +506 -0
- package/block/embed/embed.ts +317 -0
- package/block/fieldset/fieldset.ts +570 -0
- package/block/figcaption/figcaption.ts +506 -0
- package/block/figure/figure.ts +506 -0
- package/block/footer/footer.ts +522 -0
- package/block/form/form.ts +490 -0
- package/block/h1/h1.ts +490 -0
- package/block/h2/h2.ts +490 -0
- package/block/h3/h3.ts +490 -0
- package/block/h4/h4.ts +490 -0
- package/block/h5/h5.ts +490 -0
- package/block/h6/h6.ts +490 -0
- package/block/header/header.ts +298 -0
- package/block/hgroup/hgroup.ts +506 -0
- package/block/hr/hr.ts +189 -0
- package/block/html/html.ts +106 -0
- package/block/iframe/iframe.ts +538 -0
- package/block/ins/ins.ts +538 -0
- package/block/legend/legend.ts +506 -0
- package/block/li/li.ts +602 -0
- package/block/main/main.ts +538 -0
- package/block/map/map.ts +522 -0
- package/block/menu/menu.ts +554 -0
- package/block/nav/nav.ts +554 -0
- package/block/noscript/noscript.ts +282 -0
- package/block/object/object.ts +618 -0
- package/block/ol/ol.ts +618 -0
- package/block/optgroup/optgroup.ts +522 -0
- package/block/option/option.ts +618 -0
- package/block/p/p.ts +506 -0
- package/block/picture/picture.ts +506 -0
- package/block/pre/pre.ts +506 -0
- package/block/section/section.ts +538 -0
- package/block/summary/summary.ts +570 -0
- package/block/table/table.ts +570 -0
- package/block/tbody/tbody.ts +506 -0
- package/block/td/td.ts +666 -0
- package/block/template/template.ts +506 -0
- package/block/tfoot/tfoot.ts +506 -0
- package/block/th/th.ts +682 -0
- package/block/thead/thead.ts +506 -0
- package/block/tr/tr.ts +682 -0
- package/block/ul/ul.ts +570 -0
- package/block/video/video.ts +666 -0
- package/index.ts +126 -0
- package/inline/a/a.ts +682 -0
- package/inline/abbr/abbr.ts +490 -0
- package/inline/address/address.ts +474 -0
- package/inline/b/b.ts +506 -0
- package/inline/bdi/bdi.ts +490 -0
- package/inline/bdo/bdo.ts +506 -0
- package/inline/button/button.ts +826 -0
- package/inline/cite/cite.ts +506 -0
- package/inline/code/code.ts +506 -0
- package/inline/data/data.ts +522 -0
- package/inline/dfn/dfn.ts +506 -0
- package/inline/em/em.ts +506 -0
- package/inline/i/i.ts +506 -0
- package/inline/img/img.ts +445 -0
- package/inline/input/input.ts +1197 -0
- package/inline/kbd/kbd.ts +506 -0
- package/inline/label/label.ts +538 -0
- package/inline/mark/mark.ts +506 -0
- package/inline/meter/meter.ts +554 -0
- package/inline/output/output.ts +426 -0
- package/inline/progress/progress.ts +490 -0
- package/inline/q/q.ts +522 -0
- package/inline/rp/rp.ts +506 -0
- package/inline/rt/rt.ts +506 -0
- package/inline/ruby/ruby.ts +506 -0
- package/inline/s/s.ts +506 -0
- package/inline/samp/samp.ts +506 -0
- package/inline/select/select.ts +810 -0
- package/inline/slot/slot.ts +522 -0
- package/inline/small/small.ts +506 -0
- package/inline/span/span.ts +506 -0
- package/inline/strong/strong.ts +506 -0
- package/inline/sub/sub.ts +506 -0
- package/inline/sup/sup.ts +506 -0
- package/inline/svg/svg.ts +618 -0
- package/inline/textarea/textarea.ts +874 -0
- package/inline/time/time.ts +522 -0
- package/inline/u/u.ts +506 -0
- package/inline/var/var.ts +506 -0
- package/package.json +32 -0
- package/tsconfig.json +26 -0
- package/void/area/area.ts +397 -0
- package/void/base/base.ts +61 -0
- package/void/br/br.ts +77 -0
- package/void/col/col.ts +77 -0
- package/void/head/head.ts +58 -0
- package/void/link/link.ts +253 -0
- package/void/meta/meta.ts +157 -0
- package/void/param/param.ts +93 -0
- package/void/script/script.ts +250 -0
- package/void/source/source.ts +125 -0
- package/void/style/style.ts +154 -0
- package/void/title/title.ts +58 -0
- package/void/track/track.ts +157 -0
- package/void/wbr/wbr.ts +61 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE IS AUTOGENERATED. DO NOT EDIT IT.
|
|
3
|
+
*
|
|
4
|
+
* @generated December 28, 2025 12:26:31
|
|
5
|
+
* @component Track
|
|
6
|
+
* @description
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export interface TrackProps {
|
|
10
|
+
/**
|
|
11
|
+
* Specifies that the track should be enabled by default when the page loads.
|
|
12
|
+
*/
|
|
13
|
+
default?: boolean | null | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Indicates whether the element is hidden
|
|
16
|
+
*/
|
|
17
|
+
hidden?: boolean | null | undefined;
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
kind?: 'captions' | 'chapters' | 'descriptions' | 'metadata' | 'subtitles' | null | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Specifies a label for the associated form control, option group, or option.
|
|
24
|
+
*/
|
|
25
|
+
label?: string | null | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Specifies the primary language for the element's content
|
|
28
|
+
*/
|
|
29
|
+
lang?: string | null | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Specifies the URL of the external resource to be embedded or referenced.
|
|
32
|
+
*/
|
|
33
|
+
src?: string | null | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Specifies the language of the track text data.
|
|
36
|
+
*/
|
|
37
|
+
srclang?: string | null | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Represents the CSS inline style of the element
|
|
40
|
+
*/
|
|
41
|
+
style?: string | null | undefined;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Track -
|
|
46
|
+
*/
|
|
47
|
+
export class Track {
|
|
48
|
+
private element: HTMLElement;
|
|
49
|
+
|
|
50
|
+
constructor(props: TrackProps = {}) {
|
|
51
|
+
this.element = document.createElement('track');
|
|
52
|
+
this.applyProps(props);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
private applyProps(props: TrackProps): void {
|
|
56
|
+
if (props.default !== undefined) {
|
|
57
|
+
this.element.setAttribute('default', String(props.default));
|
|
58
|
+
}
|
|
59
|
+
if (props.hidden !== undefined) {
|
|
60
|
+
this.element.setAttribute('hidden', String(props.hidden));
|
|
61
|
+
}
|
|
62
|
+
if (props.kind !== undefined) {
|
|
63
|
+
this.setKind(props.kind);
|
|
64
|
+
}
|
|
65
|
+
if (props.label !== undefined) {
|
|
66
|
+
this.element.setAttribute('label', String(props.label));
|
|
67
|
+
}
|
|
68
|
+
if (props.lang !== undefined) {
|
|
69
|
+
this.element.setAttribute('lang', String(props.lang));
|
|
70
|
+
}
|
|
71
|
+
if (props.src !== undefined) {
|
|
72
|
+
this.element.setAttribute('src', String(props.src));
|
|
73
|
+
}
|
|
74
|
+
if (props.srclang !== undefined) {
|
|
75
|
+
this.element.setAttribute('srclang', String(props.srclang));
|
|
76
|
+
}
|
|
77
|
+
if (props.style !== undefined) {
|
|
78
|
+
this.element.setAttribute('style', String(props.style));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
setDefault(value: boolean | null | undefined): this {
|
|
83
|
+
if (value === true) {
|
|
84
|
+
this.element.setAttribute('default', '');
|
|
85
|
+
} else {
|
|
86
|
+
this.element.removeAttribute('default');
|
|
87
|
+
}
|
|
88
|
+
return this;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
setHidden(value: boolean | null | undefined): this {
|
|
92
|
+
if (value === true) {
|
|
93
|
+
this.element.setAttribute('hidden', '');
|
|
94
|
+
} else {
|
|
95
|
+
this.element.removeAttribute('hidden');
|
|
96
|
+
}
|
|
97
|
+
return this;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
setKind(value: 'captions' | 'chapters' | 'descriptions' | 'metadata' | 'subtitles' | null | undefined): this {
|
|
101
|
+
if (value === null || value === undefined) {
|
|
102
|
+
this.element.removeAttribute('kind');
|
|
103
|
+
} else {
|
|
104
|
+
this.element.setAttribute('kind', String(value));
|
|
105
|
+
}
|
|
106
|
+
return this;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
setLabel(value: string | null | undefined): this {
|
|
110
|
+
if (value === null || value === undefined) {
|
|
111
|
+
this.element.removeAttribute('label');
|
|
112
|
+
} else {
|
|
113
|
+
this.element.setAttribute('label', String(value));
|
|
114
|
+
}
|
|
115
|
+
return this;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
setLang(value: string | null | undefined): this {
|
|
119
|
+
if (value === null || value === undefined) {
|
|
120
|
+
this.element.removeAttribute('lang');
|
|
121
|
+
} else {
|
|
122
|
+
this.element.setAttribute('lang', String(value));
|
|
123
|
+
}
|
|
124
|
+
return this;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
setSrc(value: string | null | undefined): this {
|
|
128
|
+
if (value === null || value === undefined) {
|
|
129
|
+
this.element.removeAttribute('src');
|
|
130
|
+
} else {
|
|
131
|
+
this.element.setAttribute('src', String(value));
|
|
132
|
+
}
|
|
133
|
+
return this;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
setSrclang(value: string | null | undefined): this {
|
|
137
|
+
if (value === null || value === undefined) {
|
|
138
|
+
this.element.removeAttribute('srclang');
|
|
139
|
+
} else {
|
|
140
|
+
this.element.setAttribute('srclang', String(value));
|
|
141
|
+
}
|
|
142
|
+
return this;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
setStyle(value: string | null | undefined): this {
|
|
146
|
+
if (value === null || value === undefined) {
|
|
147
|
+
this.element.removeAttribute('style');
|
|
148
|
+
} else {
|
|
149
|
+
this.element.setAttribute('style', String(value));
|
|
150
|
+
}
|
|
151
|
+
return this;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
getElement(): HTMLElement {
|
|
155
|
+
return this.element;
|
|
156
|
+
}
|
|
157
|
+
}
|
package/void/wbr/wbr.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE IS AUTOGENERATED. DO NOT EDIT IT.
|
|
3
|
+
*
|
|
4
|
+
* @generated December 28, 2025 12:26:31
|
|
5
|
+
* @component Wbr
|
|
6
|
+
* @description
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export interface WbrProps {
|
|
10
|
+
/**
|
|
11
|
+
* Represents the text direction of the element
|
|
12
|
+
*/
|
|
13
|
+
dir?: 'ltr' | 'rtl' | 'auto' | null | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Indicates whether the element is hidden
|
|
16
|
+
*/
|
|
17
|
+
hidden?: boolean | null | undefined;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Wbr -
|
|
22
|
+
*/
|
|
23
|
+
export class Wbr {
|
|
24
|
+
private element: HTMLElement;
|
|
25
|
+
|
|
26
|
+
constructor(props: WbrProps = {}) {
|
|
27
|
+
this.element = document.createElement('wbr');
|
|
28
|
+
this.applyProps(props);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
private applyProps(props: WbrProps): void {
|
|
32
|
+
if (props.dir !== undefined) {
|
|
33
|
+
this.setDir(props.dir);
|
|
34
|
+
}
|
|
35
|
+
if (props.hidden !== undefined) {
|
|
36
|
+
this.element.setAttribute('hidden', String(props.hidden));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
setDir(value: 'ltr' | 'rtl' | 'auto' | null | undefined): this {
|
|
41
|
+
if (value === null || value === undefined) {
|
|
42
|
+
this.element.removeAttribute('dir');
|
|
43
|
+
} else {
|
|
44
|
+
this.element.setAttribute('dir', String(value));
|
|
45
|
+
}
|
|
46
|
+
return this;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
setHidden(value: boolean | null | undefined): this {
|
|
50
|
+
if (value === true) {
|
|
51
|
+
this.element.setAttribute('hidden', '');
|
|
52
|
+
} else {
|
|
53
|
+
this.element.removeAttribute('hidden');
|
|
54
|
+
}
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
getElement(): HTMLElement {
|
|
59
|
+
return this.element;
|
|
60
|
+
}
|
|
61
|
+
}
|