@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.
Files changed (117) hide show
  1. package/README.md +166 -0
  2. package/block/article/article.ts +506 -0
  3. package/block/aside/aside.ts +522 -0
  4. package/block/audio/audio.ts +506 -0
  5. package/block/blockquote/blockquote.ts +522 -0
  6. package/block/body/body.ts +458 -0
  7. package/block/canvas/canvas.ts +538 -0
  8. package/block/caption/caption.ts +506 -0
  9. package/block/colgroup/colgroup.ts +154 -0
  10. package/block/datalist/datalist.ts +506 -0
  11. package/block/dd/dd.ts +506 -0
  12. package/block/del/del.ts +538 -0
  13. package/block/details/details.ts +586 -0
  14. package/block/dialog/dialog.ts +586 -0
  15. package/block/div/div.ts +586 -0
  16. package/block/dl/dl.ts +506 -0
  17. package/block/dt/dt.ts +506 -0
  18. package/block/embed/embed.ts +317 -0
  19. package/block/fieldset/fieldset.ts +570 -0
  20. package/block/figcaption/figcaption.ts +506 -0
  21. package/block/figure/figure.ts +506 -0
  22. package/block/footer/footer.ts +522 -0
  23. package/block/form/form.ts +490 -0
  24. package/block/h1/h1.ts +490 -0
  25. package/block/h2/h2.ts +490 -0
  26. package/block/h3/h3.ts +490 -0
  27. package/block/h4/h4.ts +490 -0
  28. package/block/h5/h5.ts +490 -0
  29. package/block/h6/h6.ts +490 -0
  30. package/block/header/header.ts +298 -0
  31. package/block/hgroup/hgroup.ts +506 -0
  32. package/block/hr/hr.ts +189 -0
  33. package/block/html/html.ts +106 -0
  34. package/block/iframe/iframe.ts +538 -0
  35. package/block/ins/ins.ts +538 -0
  36. package/block/legend/legend.ts +506 -0
  37. package/block/li/li.ts +602 -0
  38. package/block/main/main.ts +538 -0
  39. package/block/map/map.ts +522 -0
  40. package/block/menu/menu.ts +554 -0
  41. package/block/nav/nav.ts +554 -0
  42. package/block/noscript/noscript.ts +282 -0
  43. package/block/object/object.ts +618 -0
  44. package/block/ol/ol.ts +618 -0
  45. package/block/optgroup/optgroup.ts +522 -0
  46. package/block/option/option.ts +618 -0
  47. package/block/p/p.ts +506 -0
  48. package/block/picture/picture.ts +506 -0
  49. package/block/pre/pre.ts +506 -0
  50. package/block/section/section.ts +538 -0
  51. package/block/summary/summary.ts +570 -0
  52. package/block/table/table.ts +570 -0
  53. package/block/tbody/tbody.ts +506 -0
  54. package/block/td/td.ts +666 -0
  55. package/block/template/template.ts +506 -0
  56. package/block/tfoot/tfoot.ts +506 -0
  57. package/block/th/th.ts +682 -0
  58. package/block/thead/thead.ts +506 -0
  59. package/block/tr/tr.ts +682 -0
  60. package/block/ul/ul.ts +570 -0
  61. package/block/video/video.ts +666 -0
  62. package/index.ts +126 -0
  63. package/inline/a/a.ts +682 -0
  64. package/inline/abbr/abbr.ts +490 -0
  65. package/inline/address/address.ts +474 -0
  66. package/inline/b/b.ts +506 -0
  67. package/inline/bdi/bdi.ts +490 -0
  68. package/inline/bdo/bdo.ts +506 -0
  69. package/inline/button/button.ts +826 -0
  70. package/inline/cite/cite.ts +506 -0
  71. package/inline/code/code.ts +506 -0
  72. package/inline/data/data.ts +522 -0
  73. package/inline/dfn/dfn.ts +506 -0
  74. package/inline/em/em.ts +506 -0
  75. package/inline/i/i.ts +506 -0
  76. package/inline/img/img.ts +445 -0
  77. package/inline/input/input.ts +1197 -0
  78. package/inline/kbd/kbd.ts +506 -0
  79. package/inline/label/label.ts +538 -0
  80. package/inline/mark/mark.ts +506 -0
  81. package/inline/meter/meter.ts +554 -0
  82. package/inline/output/output.ts +426 -0
  83. package/inline/progress/progress.ts +490 -0
  84. package/inline/q/q.ts +522 -0
  85. package/inline/rp/rp.ts +506 -0
  86. package/inline/rt/rt.ts +506 -0
  87. package/inline/ruby/ruby.ts +506 -0
  88. package/inline/s/s.ts +506 -0
  89. package/inline/samp/samp.ts +506 -0
  90. package/inline/select/select.ts +810 -0
  91. package/inline/slot/slot.ts +522 -0
  92. package/inline/small/small.ts +506 -0
  93. package/inline/span/span.ts +506 -0
  94. package/inline/strong/strong.ts +506 -0
  95. package/inline/sub/sub.ts +506 -0
  96. package/inline/sup/sup.ts +506 -0
  97. package/inline/svg/svg.ts +618 -0
  98. package/inline/textarea/textarea.ts +874 -0
  99. package/inline/time/time.ts +522 -0
  100. package/inline/u/u.ts +506 -0
  101. package/inline/var/var.ts +506 -0
  102. package/package.json +32 -0
  103. package/tsconfig.json +26 -0
  104. package/void/area/area.ts +397 -0
  105. package/void/base/base.ts +61 -0
  106. package/void/br/br.ts +77 -0
  107. package/void/col/col.ts +77 -0
  108. package/void/head/head.ts +58 -0
  109. package/void/link/link.ts +253 -0
  110. package/void/meta/meta.ts +157 -0
  111. package/void/param/param.ts +93 -0
  112. package/void/script/script.ts +250 -0
  113. package/void/source/source.ts +125 -0
  114. package/void/style/style.ts +154 -0
  115. package/void/title/title.ts +58 -0
  116. package/void/track/track.ts +157 -0
  117. package/void/wbr/wbr.ts +61 -0
@@ -0,0 +1,253 @@
1
+ /**
2
+ * THIS FILE IS AUTOGENERATED. DO NOT EDIT IT.
3
+ *
4
+ * @generated December 28, 2025 12:26:31
5
+ * @component Link
6
+ * @description
7
+ */
8
+
9
+ export interface LinkProps {
10
+ /**
11
+ *
12
+ */
13
+ crossorigin?: 'anonymous' | 'use-credentials' | null | undefined;
14
+ /**
15
+ * Represents the text direction of the element
16
+ */
17
+ dir?: 'ltr' | 'rtl' | 'auto' | null | undefined;
18
+ /**
19
+ * Indicates whether the element is hidden
20
+ */
21
+ hidden?: boolean | null | undefined;
22
+ /**
23
+ * Specifies the URL of the linked resource. Special protocols such as mailto: or tel: can be used.
24
+ */
25
+ href?: string | null | undefined;
26
+ /**
27
+ * Specifies the language of the linked resource.
28
+ */
29
+ hreflang?: string | null | undefined;
30
+ /**
31
+ * Specifies the integrity value of a resource.
32
+ */
33
+ integrity?: string | null | undefined;
34
+ /**
35
+ * Specifies the primary language for the element's content
36
+ */
37
+ lang?: string | null | undefined;
38
+ /**
39
+ * Specifies the media type for which the linked resource or style sheet is intended.
40
+ */
41
+ media?: string | null | undefined;
42
+ /**
43
+ * Specifies the referrer policy for fetches initiated by the element.
44
+ */
45
+ referrerpolicy?: 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url' | null | undefined;
46
+ /**
47
+ * Specifies the relationship between the current document and the linked document.
48
+ */
49
+ rel?: 'alternate' | 'author' | 'bookmark' | 'canonical' | 'help' | 'icon' | 'license' | 'manifest' | 'next' | 'nofollow' | 'noreferrer' | 'prefetch' | 'prev' | 'search' | 'stylesheet' | 'tag' | null | undefined;
50
+ /**
51
+ * Specifies the sizes of the images or icons for different display/window sizes.
52
+ */
53
+ sizes?: string | null | undefined;
54
+ /**
55
+ * Represents the CSS inline style of the element
56
+ */
57
+ style?: string | null | undefined;
58
+ /**
59
+ * Represents a title or tooltip for the element
60
+ */
61
+ title?: string | null | undefined;
62
+ /**
63
+ * Specifies the media type of the linked resource.
64
+ */
65
+ type?: string | null | undefined;
66
+ }
67
+
68
+ /**
69
+ * Link -
70
+ */
71
+ export class Link {
72
+ private element: HTMLElement;
73
+
74
+ constructor(props: LinkProps = {}) {
75
+ this.element = document.createElement('link');
76
+ this.applyProps(props);
77
+ }
78
+
79
+ private applyProps(props: LinkProps): void {
80
+ if (props.crossorigin !== undefined) {
81
+ this.setCrossorigin(props.crossorigin);
82
+ }
83
+ if (props.dir !== undefined) {
84
+ this.setDir(props.dir);
85
+ }
86
+ if (props.hidden !== undefined) {
87
+ this.element.setAttribute('hidden', String(props.hidden));
88
+ }
89
+ if (props.href !== undefined) {
90
+ this.element.setAttribute('href', String(props.href));
91
+ }
92
+ if (props.hreflang !== undefined) {
93
+ this.element.setAttribute('hreflang', String(props.hreflang));
94
+ }
95
+ if (props.integrity !== undefined) {
96
+ this.element.setAttribute('integrity', String(props.integrity));
97
+ }
98
+ if (props.lang !== undefined) {
99
+ this.element.setAttribute('lang', String(props.lang));
100
+ }
101
+ if (props.media !== undefined) {
102
+ this.element.setAttribute('media', String(props.media));
103
+ }
104
+ if (props.referrerpolicy !== undefined) {
105
+ this.setReferrerpolicy(props.referrerpolicy);
106
+ }
107
+ if (props.rel !== undefined) {
108
+ this.setRel(props.rel);
109
+ }
110
+ if (props.sizes !== undefined) {
111
+ this.element.setAttribute('sizes', String(props.sizes));
112
+ }
113
+ if (props.style !== undefined) {
114
+ this.element.setAttribute('style', String(props.style));
115
+ }
116
+ if (props.title !== undefined) {
117
+ this.element.setAttribute('title', String(props.title));
118
+ }
119
+ if (props.type !== undefined) {
120
+ this.element.setAttribute('type', String(props.type));
121
+ }
122
+ }
123
+
124
+ setCrossorigin(value: 'anonymous' | 'use-credentials' | null | undefined): this {
125
+ if (value === null || value === undefined) {
126
+ this.element.removeAttribute('crossorigin');
127
+ } else {
128
+ this.element.setAttribute('crossorigin', String(value));
129
+ }
130
+ return this;
131
+ }
132
+
133
+ setDir(value: 'ltr' | 'rtl' | 'auto' | null | undefined): this {
134
+ if (value === null || value === undefined) {
135
+ this.element.removeAttribute('dir');
136
+ } else {
137
+ this.element.setAttribute('dir', String(value));
138
+ }
139
+ return this;
140
+ }
141
+
142
+ setHidden(value: boolean | null | undefined): this {
143
+ if (value === true) {
144
+ this.element.setAttribute('hidden', '');
145
+ } else {
146
+ this.element.removeAttribute('hidden');
147
+ }
148
+ return this;
149
+ }
150
+
151
+ setHref(value: string | null | undefined): this {
152
+ if (value === null || value === undefined) {
153
+ this.element.removeAttribute('href');
154
+ } else {
155
+ this.element.setAttribute('href', String(value));
156
+ }
157
+ return this;
158
+ }
159
+
160
+ setHreflang(value: string | null | undefined): this {
161
+ if (value === null || value === undefined) {
162
+ this.element.removeAttribute('hreflang');
163
+ } else {
164
+ this.element.setAttribute('hreflang', String(value));
165
+ }
166
+ return this;
167
+ }
168
+
169
+ setIntegrity(value: string | null | undefined): this {
170
+ if (value === null || value === undefined) {
171
+ this.element.removeAttribute('integrity');
172
+ } else {
173
+ this.element.setAttribute('integrity', String(value));
174
+ }
175
+ return this;
176
+ }
177
+
178
+ setLang(value: string | null | undefined): this {
179
+ if (value === null || value === undefined) {
180
+ this.element.removeAttribute('lang');
181
+ } else {
182
+ this.element.setAttribute('lang', String(value));
183
+ }
184
+ return this;
185
+ }
186
+
187
+ setMedia(value: string | null | undefined): this {
188
+ if (value === null || value === undefined) {
189
+ this.element.removeAttribute('media');
190
+ } else {
191
+ this.element.setAttribute('media', String(value));
192
+ }
193
+ return this;
194
+ }
195
+
196
+ setReferrerpolicy(value: 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url' | null | undefined): this {
197
+ if (value === null || value === undefined) {
198
+ this.element.removeAttribute('referrerpolicy');
199
+ } else {
200
+ this.element.setAttribute('referrerpolicy', String(value));
201
+ }
202
+ return this;
203
+ }
204
+
205
+ setRel(value: 'alternate' | 'author' | 'bookmark' | 'canonical' | 'help' | 'icon' | 'license' | 'manifest' | 'next' | 'nofollow' | 'noreferrer' | 'prefetch' | 'prev' | 'search' | 'stylesheet' | 'tag' | null | undefined): this {
206
+ if (value === null || value === undefined) {
207
+ this.element.removeAttribute('rel');
208
+ } else {
209
+ this.element.setAttribute('rel', String(value));
210
+ }
211
+ return this;
212
+ }
213
+
214
+ setSizes(value: string | null | undefined): this {
215
+ if (value === null || value === undefined) {
216
+ this.element.removeAttribute('sizes');
217
+ } else {
218
+ this.element.setAttribute('sizes', String(value));
219
+ }
220
+ return this;
221
+ }
222
+
223
+ setStyle(value: string | null | undefined): this {
224
+ if (value === null || value === undefined) {
225
+ this.element.removeAttribute('style');
226
+ } else {
227
+ this.element.setAttribute('style', String(value));
228
+ }
229
+ return this;
230
+ }
231
+
232
+ setTitle(value: string | null | undefined): this {
233
+ if (value === null || value === undefined) {
234
+ this.element.removeAttribute('title');
235
+ } else {
236
+ this.element.setAttribute('title', String(value));
237
+ }
238
+ return this;
239
+ }
240
+
241
+ setType(value: string | null | undefined): this {
242
+ if (value === null || value === undefined) {
243
+ this.element.removeAttribute('type');
244
+ } else {
245
+ this.element.setAttribute('type', String(value));
246
+ }
247
+ return this;
248
+ }
249
+
250
+ getElement(): HTMLElement {
251
+ return this.element;
252
+ }
253
+ }
@@ -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 Meta
6
+ * @description
7
+ */
8
+
9
+ export interface MetaProps {
10
+ /**
11
+ * Specifies the character encoding for the resource.
12
+ */
13
+ charset?: string | null | undefined;
14
+ /**
15
+ * Specifies the value associated with the http-equiv or name attribute.
16
+ */
17
+ content?: string | null | undefined;
18
+ /**
19
+ * Indicates whether the element is hidden
20
+ */
21
+ hidden?: boolean | null | undefined;
22
+ /**
23
+ * Provides an HTTP header for the information/value of the content attribute.
24
+ */
25
+ 'http-equiv'?: 'content-language' | 'content-type' | 'default-style' | 'refresh' | null | undefined;
26
+ /**
27
+ * Specifies the primary language for the element's content
28
+ */
29
+ lang?: string | null | undefined;
30
+ /**
31
+ * Specifies the name associated with the element. The meaning may vary depending on the context.
32
+ */
33
+ name?: string | null | undefined;
34
+ /**
35
+ * Specifies the content type of the value attribute when the http-equiv attribute is used.
36
+ */
37
+ scheme?: string | null | undefined;
38
+ /**
39
+ * Represents a title or tooltip for the element
40
+ */
41
+ title?: string | null | undefined;
42
+ }
43
+
44
+ /**
45
+ * Meta -
46
+ */
47
+ export class Meta {
48
+ private element: HTMLElement;
49
+
50
+ constructor(props: MetaProps = {}) {
51
+ this.element = document.createElement('meta');
52
+ this.applyProps(props);
53
+ }
54
+
55
+ private applyProps(props: MetaProps): void {
56
+ if (props.charset !== undefined) {
57
+ this.element.setAttribute('charset', String(props.charset));
58
+ }
59
+ if (props.content !== undefined) {
60
+ this.element.setAttribute('content', String(props.content));
61
+ }
62
+ if (props.hidden !== undefined) {
63
+ this.element.setAttribute('hidden', String(props.hidden));
64
+ }
65
+ if (props['http-equiv'] !== undefined) {
66
+ this.setHttpEquiv(props['http-equiv']);
67
+ }
68
+ if (props.lang !== undefined) {
69
+ this.element.setAttribute('lang', String(props.lang));
70
+ }
71
+ if (props.name !== undefined) {
72
+ this.element.setAttribute('name', String(props.name));
73
+ }
74
+ if (props.scheme !== undefined) {
75
+ this.element.setAttribute('scheme', String(props.scheme));
76
+ }
77
+ if (props.title !== undefined) {
78
+ this.element.setAttribute('title', String(props.title));
79
+ }
80
+ }
81
+
82
+ setCharset(value: string | null | undefined): this {
83
+ if (value === null || value === undefined) {
84
+ this.element.removeAttribute('charset');
85
+ } else {
86
+ this.element.setAttribute('charset', String(value));
87
+ }
88
+ return this;
89
+ }
90
+
91
+ setContent(value: string | null | undefined): this {
92
+ if (value === null || value === undefined) {
93
+ this.element.removeAttribute('content');
94
+ } else {
95
+ this.element.setAttribute('content', String(value));
96
+ }
97
+ return this;
98
+ }
99
+
100
+ setHidden(value: boolean | null | undefined): this {
101
+ if (value === true) {
102
+ this.element.setAttribute('hidden', '');
103
+ } else {
104
+ this.element.removeAttribute('hidden');
105
+ }
106
+ return this;
107
+ }
108
+
109
+ setHttpEquiv(value: 'content-language' | 'content-type' | 'default-style' | 'refresh' | null | undefined): this {
110
+ if (value === null || value === undefined) {
111
+ this.element.removeAttribute('http-equiv');
112
+ } else {
113
+ this.element.setAttribute('http-equiv', 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
+ setName(value: string | null | undefined): this {
128
+ if (value === null || value === undefined) {
129
+ this.element.removeAttribute('name');
130
+ } else {
131
+ this.element.setAttribute('name', String(value));
132
+ }
133
+ return this;
134
+ }
135
+
136
+ setScheme(value: string | null | undefined): this {
137
+ if (value === null || value === undefined) {
138
+ this.element.removeAttribute('scheme');
139
+ } else {
140
+ this.element.setAttribute('scheme', String(value));
141
+ }
142
+ return this;
143
+ }
144
+
145
+ setTitle(value: string | null | undefined): this {
146
+ if (value === null || value === undefined) {
147
+ this.element.removeAttribute('title');
148
+ } else {
149
+ this.element.setAttribute('title', String(value));
150
+ }
151
+ return this;
152
+ }
153
+
154
+ getElement(): HTMLElement {
155
+ return this.element;
156
+ }
157
+ }
@@ -0,0 +1,93 @@
1
+ /**
2
+ * THIS FILE IS AUTOGENERATED. DO NOT EDIT IT.
3
+ *
4
+ * @generated December 28, 2025 12:26:31
5
+ * @component Param
6
+ * @description
7
+ */
8
+
9
+ export interface ParamProps {
10
+ /**
11
+ * Indicates whether the element is hidden
12
+ */
13
+ hidden?: boolean | null | undefined;
14
+ /**
15
+ * Specifies the name associated with the element. The meaning may vary depending on the context.
16
+ */
17
+ name?: string | null | undefined;
18
+ /**
19
+ * Represents the CSS inline style of the element
20
+ */
21
+ style?: string | null | undefined;
22
+ /**
23
+ * Specifies the value associated with the element. The meaning and usage may vary depending on the element type.
24
+ */
25
+ value?: string | null | undefined;
26
+ }
27
+
28
+ /**
29
+ * Param -
30
+ */
31
+ export class Param {
32
+ private element: HTMLElement;
33
+
34
+ constructor(props: ParamProps = {}) {
35
+ this.element = document.createElement('param');
36
+ this.applyProps(props);
37
+ }
38
+
39
+ private applyProps(props: ParamProps): void {
40
+ if (props.hidden !== undefined) {
41
+ this.element.setAttribute('hidden', String(props.hidden));
42
+ }
43
+ if (props.name !== undefined) {
44
+ this.element.setAttribute('name', String(props.name));
45
+ }
46
+ if (props.style !== undefined) {
47
+ this.element.setAttribute('style', String(props.style));
48
+ }
49
+ if (props.value !== undefined) {
50
+ this.element.setAttribute('value', String(props.value));
51
+ }
52
+ }
53
+
54
+ setHidden(value: boolean | null | undefined): this {
55
+ if (value === true) {
56
+ this.element.setAttribute('hidden', '');
57
+ } else {
58
+ this.element.removeAttribute('hidden');
59
+ }
60
+ return this;
61
+ }
62
+
63
+ setName(value: string | null | undefined): this {
64
+ if (value === null || value === undefined) {
65
+ this.element.removeAttribute('name');
66
+ } else {
67
+ this.element.setAttribute('name', String(value));
68
+ }
69
+ return this;
70
+ }
71
+
72
+ setStyle(value: string | null | undefined): this {
73
+ if (value === null || value === undefined) {
74
+ this.element.removeAttribute('style');
75
+ } else {
76
+ this.element.setAttribute('style', String(value));
77
+ }
78
+ return this;
79
+ }
80
+
81
+ setValue(value: string | null | undefined): this {
82
+ if (value === null || value === undefined) {
83
+ this.element.removeAttribute('value');
84
+ } else {
85
+ this.element.setAttribute('value', String(value));
86
+ }
87
+ return this;
88
+ }
89
+
90
+ getElement(): HTMLElement {
91
+ return this.element;
92
+ }
93
+ }