@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,317 @@
1
+ /**
2
+ * THIS FILE IS AUTOGENERATED. DO NOT EDIT IT.
3
+ *
4
+ * @generated December 28, 2025 12:26:31
5
+ * @component Embed
6
+ * @description
7
+ */
8
+
9
+ export interface EmbedProps {
10
+ /**
11
+ * specifies a shortcut key (or keys) to activate or focus an element
12
+ */
13
+ accesskey?: string | null | undefined;
14
+ /**
15
+ * Represents the autocapitalize behavior of the element
16
+ */
17
+ autocapitalize?: 'none' | 'sentences' | 'words' | 'characters' | null | undefined;
18
+ /**
19
+ * Indicates whether the element is hidden
20
+ */
21
+ autofocus?: boolean | null | undefined;
22
+ /**
23
+ * Indicates whether the element can be edited in place
24
+ */
25
+ contenteditable?: 'true' | 'false' | 'inherit' | boolean | null | undefined;
26
+ /**
27
+ * Represents the text direction of the element
28
+ */
29
+ dir?: 'ltr' | 'rtl' | 'auto' | null | undefined;
30
+ /**
31
+ * Indicates whether the element is draggable
32
+ */
33
+ draggable?: boolean | null | undefined;
34
+ /**
35
+ * Specifies the height of the element. The meaning may vary depending on the element type. Accepts integers, pixels (px), and percentages (%).
36
+ */
37
+ height?: string | null | undefined;
38
+ /**
39
+ * Indicates whether the element is hidden
40
+ */
41
+ hidden?: boolean | null | undefined;
42
+ /**
43
+ * used to specify the data entry mode for an input. It helps guide on-screen keyboards (especially on mobile devices) to show the appropriate layout for the expected input type
44
+ */
45
+ inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'email' | 'tel' | 'url' | 'search' | null | undefined;
46
+ /**
47
+ * Specifies the primary language for the element's content
48
+ */
49
+ lang?: string | null | undefined;
50
+ /**
51
+ * Represents the spellchecking behavior of the element
52
+ */
53
+ spellcheck?: 'true' | 'false' | boolean | null | undefined;
54
+ /**
55
+ * Specifies the URL of the external resource to be embedded or referenced.
56
+ */
57
+ src?: string | null | undefined;
58
+ /**
59
+ * Represents the CSS inline style of the element
60
+ */
61
+ style?: string | null | undefined;
62
+ /**
63
+ * Represents a tab order of the element
64
+ */
65
+ tabindex?: number | null | undefined;
66
+ /**
67
+ * Represents a title or tooltip for the element
68
+ */
69
+ title?: string | null | undefined;
70
+ /**
71
+ * used to tell user agents whether the content should be translated.
72
+ */
73
+ translate?: 'yes' | 'no' | null | undefined;
74
+ /**
75
+ * Specifies the media type of the linked resource.
76
+ */
77
+ type?: string | null | undefined;
78
+ /**
79
+ * Specifies the width of the element. The meaning may vary depending on the element type. Accepts integers, pixels (px), and percentages (%).
80
+ */
81
+ width?: string | null | undefined;
82
+ }
83
+
84
+ /**
85
+ * Embed -
86
+ */
87
+ export class Embed {
88
+ private element: HTMLElement;
89
+
90
+ constructor(props: EmbedProps = {}) {
91
+ this.element = document.createElement('embed');
92
+ this.applyProps(props);
93
+ }
94
+
95
+ private applyProps(props: EmbedProps): void {
96
+ if (props.accesskey !== undefined) {
97
+ this.element.setAttribute('accesskey', String(props.accesskey));
98
+ }
99
+ if (props.autocapitalize !== undefined) {
100
+ this.setAutocapitalize(props.autocapitalize);
101
+ }
102
+ if (props.autofocus !== undefined) {
103
+ this.element.setAttribute('autofocus', String(props.autofocus));
104
+ }
105
+ if (props.contenteditable !== undefined) {
106
+ this.setContenteditable(props.contenteditable);
107
+ }
108
+ if (props.dir !== undefined) {
109
+ this.setDir(props.dir);
110
+ }
111
+ if (props.draggable !== undefined) {
112
+ this.element.setAttribute('draggable', String(props.draggable));
113
+ }
114
+ if (props.height !== undefined) {
115
+ this.element.setAttribute('height', String(props.height));
116
+ }
117
+ if (props.hidden !== undefined) {
118
+ this.element.setAttribute('hidden', String(props.hidden));
119
+ }
120
+ if (props.inputmode !== undefined) {
121
+ this.setInputmode(props.inputmode);
122
+ }
123
+ if (props.lang !== undefined) {
124
+ this.element.setAttribute('lang', String(props.lang));
125
+ }
126
+ if (props.spellcheck !== undefined) {
127
+ this.setSpellcheck(props.spellcheck);
128
+ }
129
+ if (props.src !== undefined) {
130
+ this.element.setAttribute('src', String(props.src));
131
+ }
132
+ if (props.style !== undefined) {
133
+ this.element.setAttribute('style', String(props.style));
134
+ }
135
+ if (props.tabindex !== undefined) {
136
+ this.element.setAttribute('tabindex', String(props.tabindex));
137
+ }
138
+ if (props.title !== undefined) {
139
+ this.element.setAttribute('title', String(props.title));
140
+ }
141
+ if (props.translate !== undefined) {
142
+ this.setTranslate(props.translate);
143
+ }
144
+ if (props.type !== undefined) {
145
+ this.element.setAttribute('type', String(props.type));
146
+ }
147
+ if (props.width !== undefined) {
148
+ this.element.setAttribute('width', String(props.width));
149
+ }
150
+ }
151
+
152
+ setAccesskey(value: string | null | undefined): this {
153
+ if (value === null || value === undefined) {
154
+ this.element.removeAttribute('accesskey');
155
+ } else {
156
+ this.element.setAttribute('accesskey', String(value));
157
+ }
158
+ return this;
159
+ }
160
+
161
+ setAutocapitalize(value: 'none' | 'sentences' | 'words' | 'characters' | null | undefined): this {
162
+ if (value === null || value === undefined) {
163
+ this.element.removeAttribute('autocapitalize');
164
+ } else {
165
+ this.element.setAttribute('autocapitalize', String(value));
166
+ }
167
+ return this;
168
+ }
169
+
170
+ setAutofocus(value: boolean | null | undefined): this {
171
+ if (value === true) {
172
+ this.element.setAttribute('autofocus', '');
173
+ } else {
174
+ this.element.removeAttribute('autofocus');
175
+ }
176
+ return this;
177
+ }
178
+
179
+ setContenteditable(value: 'true' | 'false' | 'inherit' | boolean | null | undefined): this {
180
+ if (value === null || value === undefined) {
181
+ this.element.removeAttribute('contenteditable');
182
+ } else {
183
+ this.element.setAttribute('contenteditable', String(value));
184
+ }
185
+ return this;
186
+ }
187
+
188
+ setDir(value: 'ltr' | 'rtl' | 'auto' | null | undefined): this {
189
+ if (value === null || value === undefined) {
190
+ this.element.removeAttribute('dir');
191
+ } else {
192
+ this.element.setAttribute('dir', String(value));
193
+ }
194
+ return this;
195
+ }
196
+
197
+ setDraggable(value: boolean | null | undefined): this {
198
+ if (value === true) {
199
+ this.element.setAttribute('draggable', '');
200
+ } else {
201
+ this.element.removeAttribute('draggable');
202
+ }
203
+ return this;
204
+ }
205
+
206
+ setHeight(value: string | null | undefined): this {
207
+ if (value === null || value === undefined) {
208
+ this.element.removeAttribute('height');
209
+ } else {
210
+ this.element.setAttribute('height', String(value));
211
+ }
212
+ return this;
213
+ }
214
+
215
+ setHidden(value: boolean | null | undefined): this {
216
+ if (value === true) {
217
+ this.element.setAttribute('hidden', '');
218
+ } else {
219
+ this.element.removeAttribute('hidden');
220
+ }
221
+ return this;
222
+ }
223
+
224
+ setInputmode(value: 'none' | 'text' | 'decimal' | 'numeric' | 'email' | 'tel' | 'url' | 'search' | null | undefined): this {
225
+ if (value === null || value === undefined) {
226
+ this.element.removeAttribute('inputmode');
227
+ } else {
228
+ this.element.setAttribute('inputmode', String(value));
229
+ }
230
+ return this;
231
+ }
232
+
233
+ setLang(value: string | null | undefined): this {
234
+ if (value === null || value === undefined) {
235
+ this.element.removeAttribute('lang');
236
+ } else {
237
+ this.element.setAttribute('lang', String(value));
238
+ }
239
+ return this;
240
+ }
241
+
242
+ setSpellcheck(value: 'true' | 'false' | boolean | null | undefined): this {
243
+ if (value === null || value === undefined) {
244
+ this.element.removeAttribute('spellcheck');
245
+ } else {
246
+ this.element.setAttribute('spellcheck', String(value));
247
+ }
248
+ return this;
249
+ }
250
+
251
+ setSrc(value: string | null | undefined): this {
252
+ if (value === null || value === undefined) {
253
+ this.element.removeAttribute('src');
254
+ } else {
255
+ this.element.setAttribute('src', String(value));
256
+ }
257
+ return this;
258
+ }
259
+
260
+ setStyle(value: string | null | undefined): this {
261
+ if (value === null || value === undefined) {
262
+ this.element.removeAttribute('style');
263
+ } else {
264
+ this.element.setAttribute('style', String(value));
265
+ }
266
+ return this;
267
+ }
268
+
269
+ setTabindex(value: number | null | undefined): this {
270
+ if (value === null || value === undefined) {
271
+ this.element.removeAttribute('tabindex');
272
+ } else {
273
+ this.element.setAttribute('tabindex', String(value));
274
+ }
275
+ return this;
276
+ }
277
+
278
+ setTitle(value: string | null | undefined): this {
279
+ if (value === null || value === undefined) {
280
+ this.element.removeAttribute('title');
281
+ } else {
282
+ this.element.setAttribute('title', String(value));
283
+ }
284
+ return this;
285
+ }
286
+
287
+ setTranslate(value: 'yes' | 'no' | null | undefined): this {
288
+ if (value === null || value === undefined) {
289
+ this.element.removeAttribute('translate');
290
+ } else {
291
+ this.element.setAttribute('translate', String(value));
292
+ }
293
+ return this;
294
+ }
295
+
296
+ setType(value: string | null | undefined): this {
297
+ if (value === null || value === undefined) {
298
+ this.element.removeAttribute('type');
299
+ } else {
300
+ this.element.setAttribute('type', String(value));
301
+ }
302
+ return this;
303
+ }
304
+
305
+ setWidth(value: string | null | undefined): this {
306
+ if (value === null || value === undefined) {
307
+ this.element.removeAttribute('width');
308
+ } else {
309
+ this.element.setAttribute('width', String(value));
310
+ }
311
+ return this;
312
+ }
313
+
314
+ getElement(): HTMLElement {
315
+ return this.element;
316
+ }
317
+ }