@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,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
+ }
@@ -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
+ }