@mpen/jsxhtml 0.2.2 → 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.
Files changed (169) hide show
  1. package/dist/classnames.d.ts +11 -0
  2. package/dist/classnames.test.d.ts +1 -0
  3. package/dist/css-escape.d.ts +25 -0
  4. package/dist/custom/C.d.ts +6 -0
  5. package/dist/custom/Checkbox.d.ts +5 -0
  6. package/dist/custom/ColorInput.d.ts +5 -0
  7. package/dist/custom/DateInput.d.ts +5 -0
  8. package/dist/custom/DocType.d.ts +6 -0
  9. package/dist/custom/EmailInput.d.ts +5 -0
  10. package/dist/custom/Empty.d.ts +4 -0
  11. package/dist/custom/FileInput.d.ts +5 -0
  12. package/dist/custom/HtmlDocument.d.ts +5 -0
  13. package/dist/custom/NumberInput.d.ts +5 -0
  14. package/dist/custom/PasswordInput.d.ts +5 -0
  15. package/dist/custom/RadioButton.d.ts +5 -0
  16. package/dist/custom/RangeInput.d.ts +5 -0
  17. package/dist/custom/RawHtml.d.ts +6 -0
  18. package/dist/custom/SearchInput.d.ts +5 -0
  19. package/dist/custom/TelephoneInput.d.ts +5 -0
  20. package/dist/custom/TextInput.d.ts +5 -0
  21. package/dist/custom/TimeInput.d.ts +5 -0
  22. package/dist/custom/UrlInput.d.ts +5 -0
  23. package/dist/custom/WeekInput.d.ts +5 -0
  24. package/dist/custom/index.d.ts +20 -0
  25. package/dist/custom-components.d.ts +1 -23
  26. package/dist/htmlspec/IntrinsicElements.d.ts +568 -147
  27. package/dist/htmlspec/attributes/AriaAttributes.d.ts +11 -0
  28. package/dist/htmlspec/attributes/ElementAttributes.d.ts +28 -0
  29. package/dist/htmlspec/attributes/EventHandlers.d.ts +102 -0
  30. package/dist/htmlspec/attributes/GlobalAttributes.d.ts +11 -0
  31. package/dist/htmlspec/{GlobalAttributes.d.ts → attributes/StandardGlobalAttributes.d.ts} +26 -37
  32. package/dist/htmlspec/attributes/index.d.ts +7 -0
  33. package/dist/htmlspec/elements/a.d.ts +71 -0
  34. package/dist/htmlspec/elements/abbr.d.ts +4 -0
  35. package/dist/htmlspec/elements/address.d.ts +4 -0
  36. package/dist/htmlspec/elements/area.d.ts +66 -0
  37. package/dist/htmlspec/elements/article.d.ts +4 -0
  38. package/dist/htmlspec/elements/aside.d.ts +4 -0
  39. package/dist/htmlspec/elements/audio.d.ts +45 -0
  40. package/dist/htmlspec/elements/b.d.ts +4 -0
  41. package/dist/htmlspec/elements/base.d.ts +18 -0
  42. package/dist/htmlspec/elements/bdi.d.ts +4 -0
  43. package/dist/htmlspec/elements/bdo.d.ts +4 -0
  44. package/dist/htmlspec/elements/blockquote.d.ts +8 -0
  45. package/dist/htmlspec/elements/body.d.ts +92 -0
  46. package/dist/htmlspec/elements/br.d.ts +4 -0
  47. package/dist/htmlspec/elements/button.d.ts +103 -0
  48. package/dist/htmlspec/elements/canvas.d.ts +13 -0
  49. package/dist/htmlspec/elements/caption.d.ts +4 -0
  50. package/dist/htmlspec/elements/cite.d.ts +4 -0
  51. package/dist/htmlspec/elements/code.d.ts +4 -0
  52. package/dist/htmlspec/elements/col.d.ts +9 -0
  53. package/dist/htmlspec/elements/colgroup.d.ts +9 -0
  54. package/dist/htmlspec/elements/data.d.ts +9 -0
  55. package/dist/htmlspec/elements/datalist.d.ts +4 -0
  56. package/dist/htmlspec/elements/dd.d.ts +4 -0
  57. package/dist/htmlspec/elements/del.d.ts +12 -0
  58. package/dist/htmlspec/elements/details.d.ts +12 -0
  59. package/dist/htmlspec/elements/dfn.d.ts +4 -0
  60. package/dist/htmlspec/elements/dialog.d.ts +17 -0
  61. package/dist/htmlspec/elements/div.d.ts +4 -0
  62. package/dist/htmlspec/elements/dl.d.ts +4 -0
  63. package/dist/htmlspec/elements/dt.d.ts +4 -0
  64. package/dist/htmlspec/elements/element-types.d.ts +1 -0
  65. package/dist/htmlspec/elements/em.d.ts +4 -0
  66. package/dist/htmlspec/elements/embed.d.ts +21 -0
  67. package/dist/htmlspec/elements/fencedframe.d.ts +23 -0
  68. package/dist/htmlspec/elements/fieldset.d.ts +16 -0
  69. package/dist/htmlspec/elements/figcaption.d.ts +4 -0
  70. package/dist/htmlspec/elements/figure.d.ts +4 -0
  71. package/dist/htmlspec/elements/footer.d.ts +4 -0
  72. package/dist/htmlspec/elements/form.d.ts +61 -0
  73. package/dist/htmlspec/elements/h1.d.ts +4 -0
  74. package/dist/htmlspec/elements/h2.d.ts +4 -0
  75. package/dist/htmlspec/elements/h3.d.ts +4 -0
  76. package/dist/htmlspec/elements/h4.d.ts +4 -0
  77. package/dist/htmlspec/elements/h5.d.ts +4 -0
  78. package/dist/htmlspec/elements/h6.d.ts +4 -0
  79. package/dist/htmlspec/elements/head.d.ts +4 -0
  80. package/dist/htmlspec/elements/header.d.ts +4 -0
  81. package/dist/htmlspec/elements/hgroup.d.ts +4 -0
  82. package/dist/htmlspec/elements/hr.d.ts +4 -0
  83. package/dist/htmlspec/elements/html.d.ts +8 -0
  84. package/dist/htmlspec/elements/i.d.ts +4 -0
  85. package/dist/htmlspec/elements/iframe.d.ts +82 -0
  86. package/dist/htmlspec/elements/img.d.ts +90 -0
  87. package/dist/htmlspec/elements/index.d.ts +114 -0
  88. package/dist/htmlspec/elements/input.d.ts +189 -0
  89. package/dist/htmlspec/elements/ins.d.ts +12 -0
  90. package/dist/htmlspec/elements/kbd.d.ts +4 -0
  91. package/dist/htmlspec/elements/label.d.ts +8 -0
  92. package/dist/htmlspec/elements/legend.d.ts +4 -0
  93. package/dist/htmlspec/elements/li.d.ts +19 -0
  94. package/dist/htmlspec/elements/link.d.ts +77 -0
  95. package/dist/htmlspec/elements/main.d.ts +4 -0
  96. package/dist/htmlspec/elements/map.d.ts +8 -0
  97. package/dist/htmlspec/elements/mark.d.ts +4 -0
  98. package/dist/htmlspec/elements/menu.d.ts +4 -0
  99. package/dist/htmlspec/elements/meta.d.ts +24 -0
  100. package/dist/htmlspec/elements/meter.d.ts +29 -0
  101. package/dist/htmlspec/elements/nav.d.ts +4 -0
  102. package/dist/htmlspec/elements/noscript.d.ts +4 -0
  103. package/dist/htmlspec/elements/object.d.ts +29 -0
  104. package/dist/htmlspec/elements/ol.d.ts +24 -0
  105. package/dist/htmlspec/elements/optgroup.d.ts +12 -0
  106. package/dist/htmlspec/elements/option.d.ts +21 -0
  107. package/dist/htmlspec/elements/output.d.ts +16 -0
  108. package/dist/htmlspec/elements/p.d.ts +4 -0
  109. package/dist/htmlspec/elements/picture.d.ts +4 -0
  110. package/dist/htmlspec/elements/pre.d.ts +4 -0
  111. package/dist/htmlspec/elements/progress.d.ts +13 -0
  112. package/dist/htmlspec/elements/q.d.ts +8 -0
  113. package/dist/htmlspec/elements/rp.d.ts +4 -0
  114. package/dist/htmlspec/elements/rt.d.ts +4 -0
  115. package/dist/htmlspec/elements/ruby.d.ts +4 -0
  116. package/dist/htmlspec/elements/s.d.ts +4 -0
  117. package/dist/htmlspec/elements/samp.d.ts +4 -0
  118. package/dist/htmlspec/elements/script.d.ts +57 -0
  119. package/dist/htmlspec/elements/search.d.ts +4 -0
  120. package/dist/htmlspec/elements/section.d.ts +4 -0
  121. package/dist/htmlspec/elements/select.d.ts +37 -0
  122. package/dist/htmlspec/elements/selectedcontent.d.ts +7 -0
  123. package/dist/htmlspec/elements/slot.d.ts +8 -0
  124. package/dist/htmlspec/elements/small.d.ts +4 -0
  125. package/dist/htmlspec/elements/source.d.ts +33 -0
  126. package/dist/htmlspec/elements/span.d.ts +4 -0
  127. package/dist/htmlspec/elements/strong.d.ts +4 -0
  128. package/dist/htmlspec/elements/style.d.ts +21 -0
  129. package/dist/htmlspec/elements/sub.d.ts +4 -0
  130. package/dist/htmlspec/elements/summary.d.ts +4 -0
  131. package/dist/htmlspec/elements/sup.d.ts +4 -0
  132. package/dist/htmlspec/elements/table.d.ts +4 -0
  133. package/dist/htmlspec/elements/tbody.d.ts +4 -0
  134. package/dist/htmlspec/elements/td.d.ts +17 -0
  135. package/dist/htmlspec/elements/template.d.ts +29 -0
  136. package/dist/htmlspec/elements/textarea.d.ts +66 -0
  137. package/dist/htmlspec/elements/tfoot.d.ts +4 -0
  138. package/dist/htmlspec/elements/th.d.ts +31 -0
  139. package/dist/htmlspec/elements/thead.d.ts +4 -0
  140. package/dist/htmlspec/elements/time.d.ts +8 -0
  141. package/dist/htmlspec/elements/title.d.ts +4 -0
  142. package/dist/htmlspec/elements/tr.d.ts +4 -0
  143. package/dist/htmlspec/elements/track.d.ts +31 -0
  144. package/dist/htmlspec/elements/u.d.ts +4 -0
  145. package/dist/htmlspec/elements/ul.d.ts +12 -0
  146. package/dist/htmlspec/elements/var.d.ts +4 -0
  147. package/dist/htmlspec/elements/video.d.ts +66 -0
  148. package/dist/htmlspec/elements/wbr.d.ts +4 -0
  149. package/dist/index.cjs +144 -7
  150. package/dist/index.d.ts +1 -0
  151. package/dist/index.mjs +114 -9
  152. package/dist/internal/dev.d.ts +1 -0
  153. package/dist/internal/kitchen-sink-dev.d.ts +7 -0
  154. package/dist/internal/kitchen-sink.d.ts +2 -0
  155. package/dist/internal/log.d.ts +2 -0
  156. package/dist/internal/type-assert.d.ts +39 -0
  157. package/dist/jsx-dev-runtime.cjs +3 -2
  158. package/dist/jsx-dev-runtime.mjs +2 -3
  159. package/dist/{jsx-runtime-DpEMYmD9.js → jsx-runtime-BQPDXeiv.js} +675 -32
  160. package/dist/{jsx-runtime-CsQM2fQb.js → jsx-runtime-DlHYwToA.js} +672 -33
  161. package/dist/jsx-runtime.cjs +3 -1
  162. package/dist/jsx-runtime.mjs +1 -1
  163. package/dist/jsx-types.d.ts +6 -24
  164. package/dist/jsx.d.ts +3 -2
  165. package/dist/jsx.test.d.ts +1 -0
  166. package/dist/template-strings.d.ts +12 -0
  167. package/dist/template-strings.test.d.ts +6 -0
  168. package/package.json +93 -82
  169. package/dist/htmlspec/AnchorElement.d.ts +0 -83
@@ -0,0 +1,31 @@
1
+ import type { CommonAttributes } from '../attributes/ElementAttributes';
2
+ import type { ElementForTag } from './element-types';
3
+ export interface TrackAttributes extends CommonAttributes<ElementForTag<'track'>> {
4
+ /**
5
+ * This attribute indicates that the track should be enabled unless the user's preferences indicate that another track is more appropriate. This may only be used on one `track` element per media element.
6
+ */
7
+ default?: boolean;
8
+ /**
9
+ * How the text track is meant to be used. If omitted the default kind is `subtitles`. If the attribute contains an invalid value, it will use `metadata`. The following keywords are allowed: Subtitles provide transcription or translation of the dialog. They are suitable for when the sound is available but not understood, such as speech or text that is not English in an English language film. Subtitles may contain additional content, usually extra background information. For example the text at the beginning of the Star Wars films, or the date, time, and location of a scene. Subtitles' information complements the audio and video. It is often embedded in the video itself, but can also be provided separately, especially for whole-film translations. Closed captions provide transcription or translation of the dialog, sound effects, relevant musical cues, and other relevant audio information, such as the cue's source (e.g., character, environment). They are suitable for when sound is unavailable or not clearly audible (e.g., because it is muted, drowned-out by ambient noise, or because the user is deaf). Descriptions summarize the _video_ component of the media resource. They are intended to be synthesized as audio when the visual component is obscured, unavailable, or not usable (e.g., because the user is interacting with the application without a screen while driving, or because the user is blind). Chapter titles are intended to be used when the user is navigating the media resource. Tracks used by scripts. Not visible to the user.
10
+ *
11
+ * Possible values:
12
+ * - subtitles
13
+ * - captions
14
+ * - descriptions
15
+ * - chapters
16
+ * - metadata
17
+ */
18
+ kind?: 'subtitles' | 'captions' | 'descriptions' | 'chapters' | 'metadata';
19
+ /**
20
+ * A user-readable title of the text track which is used by the browser when listing available text tracks.
21
+ */
22
+ label?: string;
23
+ /**
24
+ * Address of the track (`.vtt` file). Must be a valid URL. This attribute must be specified and its URL value must have the same origin as the document - unless the audio or video parent element of the `track` element has a `crossorigin` attribute.
25
+ */
26
+ src?: string;
27
+ /**
28
+ * Language of the track text data. It must be a valid BCP 47 language tag. If the `kind` attribute is set to `subtitles`, then `srclang` must be defined.
29
+ */
30
+ srclang?: string;
31
+ }
@@ -0,0 +1,4 @@
1
+ import type { CommonAttributes } from '../attributes/ElementAttributes';
2
+ import type { ElementForTag } from './element-types';
3
+ export interface UAttributes extends CommonAttributes<ElementForTag<'u'>> {
4
+ }
@@ -0,0 +1,12 @@
1
+ import type { CommonAttributes } from '../attributes/ElementAttributes';
2
+ import type { ElementForTag } from './element-types';
3
+ export interface UlAttributes extends CommonAttributes<ElementForTag<'ul'>> {
4
+ /**
5
+ * A fourth bullet type has been defined in the WebTV interface, but not all browsers support it: `triangle`. If not present and if no CSS list-style-type property applies to the element, the user agent selects a bullet type depending on the nesting level of the list.
6
+ *
7
+ * Possible values:
8
+ * - disc
9
+ * - square
10
+ */
11
+ circle?: 'disc' | 'square';
12
+ }
@@ -0,0 +1,4 @@
1
+ import type { CommonAttributes } from '../attributes/ElementAttributes';
2
+ import type { ElementForTag } from './element-types';
3
+ export interface VarAttributes extends CommonAttributes<ElementForTag<'var'>> {
4
+ }
@@ -0,0 +1,66 @@
1
+ import type { CommonAttributes } from '../attributes/ElementAttributes';
2
+ import type { ElementForTag } from './element-types';
3
+ import type { Numeric } from '../attributes/StandardGlobalAttributes';
4
+ export interface VideoAttributes extends CommonAttributes<ElementForTag<'video'>> {
5
+ /**
6
+ * A Boolean attribute; if specified, the video automatically begins to play back as soon as it can without stopping to finish loading the data. To disable video autoplay, `autoplay="false"` will not work; the video will autoplay if the attribute is there in the `<video ` tag at all. To remove autoplay, the attribute needs to be removed altogether.
7
+ */
8
+ autoplay?: boolean;
9
+ /**
10
+ * If this attribute is present, the browser will offer controls to allow the user to control video playback, including volume, seeking, and pause/resume playback.
11
+ */
12
+ controls?: boolean;
13
+ /**
14
+ * The `controlslist` attribute, when specified, helps the browser select what controls to show for the `video` element whenever the browser shows its own set of controls (that is, when the `controls` attribute is specified). The allowed values are `nodownload`, `nofullscreen` and `noremoteplayback`. Use the `disablepictureinpicture` attribute if you want to disable the Picture-In-Picture mode (and the control).
15
+ */
16
+ controlslist?: 'anonymous' | 'use-credentials';
17
+ /**
18
+ * 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.
19
+ */
20
+ crossorigin?: 'anonymous' | 'use-credentials';
21
+ /**
22
+ * Prevents the browser from suggesting a Picture-in-Picture context menu or to request Picture-in-Picture automatically in some cases.
23
+ */
24
+ disablepictureinpicture?: string;
25
+ /**
26
+ * A Boolean attribute used to disable the capability of remote playback in devices that are attached using wired (HDMI, DVI, etc.) and wireless technologies (Miracast, Chromecast, DLNA, AirPlay, etc.). In Safari, you can use `x-webkit-airplay="deny"` as a fallback.
27
+ */
28
+ disableremoteplayback?: string;
29
+ /**
30
+ * The height of the video's display area, in CSS pixels (absolute values only; no percentages).
31
+ */
32
+ height?: Numeric;
33
+ /**
34
+ * A Boolean attribute; if specified, the browser will automatically seek back to the start upon reaching the end of the video.
35
+ */
36
+ loop?: boolean;
37
+ /**
38
+ * A Boolean attribute that indicates the default audio mute setting contained in the video. If set, the audio will be initially silenced. Its default value is `false`, meaning the audio will be played when the video is played.
39
+ */
40
+ muted?: boolean;
41
+ /**
42
+ * A Boolean attribute indicating that the video is to be played "inline", that is, within the element's playback area. Note that the absence of this attribute _does not_ imply that the video will always be played in fullscreen.
43
+ */
44
+ playsinline?: boolean;
45
+ /**
46
+ * A URL for an image to be shown while the video is downloading. If this attribute isn't specified, nothing is displayed until the first frame is available, then the first frame is shown as the poster frame.
47
+ */
48
+ poster?: string;
49
+ /**
50
+ * This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience regarding what content is loaded before the video is played. It may have one of the following values: The default value is different for each browser. The spec advises it to be set to `metadata`.
51
+ *
52
+ * Possible values:
53
+ * - none
54
+ * - metadata
55
+ * - auto
56
+ */
57
+ preload?: 'none' | 'metadata' | 'auto';
58
+ /**
59
+ * The width of the video's display area, in CSS pixels (absolute values only; no percentages).
60
+ */
61
+ width?: Numeric;
62
+ /**
63
+ * The URL of the video to embed. This is optional; you may instead use the source element within the video block to specify the video to embed.
64
+ */
65
+ src?: string;
66
+ }
@@ -0,0 +1,4 @@
1
+ import type { CommonAttributes } from '../attributes/ElementAttributes';
2
+ import type { ElementForTag } from './element-types';
3
+ export interface WbrAttributes extends CommonAttributes<ElementForTag<'wbr'>> {
4
+ }
package/dist/index.cjs CHANGED
@@ -4,11 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var jsxRuntime = require("./jsx-runtime-DpEMYmD9.js");
8
-
9
- function RawHtml({children}) {
10
- return new jsxRuntime.JsxRawHtml(jsxRuntime.flattenString(children));
11
- }
7
+ var jsxRuntime = require("./jsx-runtime-BQPDXeiv.js");
12
8
 
13
9
  function C({children}) {
14
10
  {
@@ -16,10 +12,49 @@ function C({children}) {
16
12
  }
17
13
  }
18
14
 
15
+ function Checkbox(props) {
16
+ return jsxRuntime.jsx("input", {
17
+ ...props,
18
+ type: "checkbox"
19
+ });
20
+ }
21
+
22
+ function ColorInput(props) {
23
+ return jsxRuntime.jsx("input", {
24
+ ...props,
25
+ type: "color"
26
+ });
27
+ }
28
+
29
+ function DateInput(props) {
30
+ return jsxRuntime.jsx("input", {
31
+ ...props,
32
+ type: "date"
33
+ });
34
+ }
35
+
19
36
  function DocType(props) {
20
37
  return new jsxRuntime.JsxDocType(props);
21
38
  }
22
39
 
40
+ function EmailInput(props) {
41
+ return jsxRuntime.jsx("input", {
42
+ ...props,
43
+ type: "email"
44
+ });
45
+ }
46
+
47
+ function Empty() {
48
+ return jsxRuntime.EMPTY;
49
+ }
50
+
51
+ function FileInput(props) {
52
+ return jsxRuntime.jsx("input", {
53
+ ...props,
54
+ type: "file"
55
+ });
56
+ }
57
+
23
58
  function HtmlDocument({children, ...htmlAttrs}) {
24
59
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
25
60
  children: [ jsxRuntime.jsx(DocType, {
@@ -31,8 +66,78 @@ function HtmlDocument({children, ...htmlAttrs}) {
31
66
  });
32
67
  }
33
68
 
34
- function Empty() {
35
- return jsxRuntime.EMPTY;
69
+ function NumberInput(props) {
70
+ return jsxRuntime.jsx("input", {
71
+ ...props,
72
+ type: "number"
73
+ });
74
+ }
75
+
76
+ function PasswordInput(props) {
77
+ return jsxRuntime.jsx("input", {
78
+ ...props,
79
+ type: "password"
80
+ });
81
+ }
82
+
83
+ function RadioButton(props) {
84
+ return jsxRuntime.jsx("input", {
85
+ ...props,
86
+ type: "radio"
87
+ });
88
+ }
89
+
90
+ function RangeInput(props) {
91
+ return jsxRuntime.jsx("input", {
92
+ ...props,
93
+ type: "range"
94
+ });
95
+ }
96
+
97
+ function RawHtml({children}) {
98
+ return new jsxRuntime.JsxRawHtml(jsxRuntime.flattenString(children));
99
+ }
100
+
101
+ function SearchInput(props) {
102
+ return jsxRuntime.jsx("input", {
103
+ ...props,
104
+ type: "search"
105
+ });
106
+ }
107
+
108
+ function TelephoneInput(props) {
109
+ return jsxRuntime.jsx("input", {
110
+ ...props,
111
+ type: "tel"
112
+ });
113
+ }
114
+
115
+ function TextInput(props) {
116
+ return jsxRuntime.jsx("input", {
117
+ ...props,
118
+ type: "text"
119
+ });
120
+ }
121
+
122
+ function TimeInput(props) {
123
+ return jsxRuntime.jsx("input", {
124
+ ...props,
125
+ type: "time"
126
+ });
127
+ }
128
+
129
+ function UrlInput(props) {
130
+ return jsxRuntime.jsx("input", {
131
+ ...props,
132
+ type: "url"
133
+ });
134
+ }
135
+
136
+ function WeekInput(props) {
137
+ return jsxRuntime.jsx("input", {
138
+ ...props,
139
+ type: "week"
140
+ });
36
141
  }
37
142
 
38
143
  function elysiaJsx() {
@@ -81,16 +186,48 @@ exports.JsxRawHtml = jsxRuntime.JsxRawHtml;
81
186
 
82
187
  exports.isJsxNode = jsxRuntime.isJsxNode;
83
188
 
189
+ exports.js = jsxRuntime.js;
190
+
84
191
  exports.C = C;
85
192
 
193
+ exports.Checkbox = Checkbox;
194
+
195
+ exports.ColorInput = ColorInput;
196
+
197
+ exports.DateInput = DateInput;
198
+
86
199
  exports.DocType = DocType;
87
200
 
201
+ exports.EmailInput = EmailInput;
202
+
88
203
  exports.Empty = Empty;
89
204
 
205
+ exports.FileInput = FileInput;
206
+
90
207
  exports.HtmlDocument = HtmlDocument;
91
208
 
209
+ exports.NumberInput = NumberInput;
210
+
211
+ exports.PasswordInput = PasswordInput;
212
+
213
+ exports.RadioButton = RadioButton;
214
+
215
+ exports.RangeInput = RangeInput;
216
+
92
217
  exports.RawHtml = RawHtml;
93
218
 
219
+ exports.SearchInput = SearchInput;
220
+
221
+ exports.TelephoneInput = TelephoneInput;
222
+
223
+ exports.TextInput = TextInput;
224
+
225
+ exports.TimeInput = TimeInput;
226
+
227
+ exports.UrlInput = UrlInput;
228
+
229
+ exports.WeekInput = WeekInput;
230
+
94
231
  exports.default = React$1;
95
232
 
96
233
  exports.elysiaJsx = elysiaJsx;
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from './jsx-elements';
2
2
  export * from './custom-components';
3
3
  export * from './elysia-plugin';
4
4
  export * from './jsx-node';
5
+ export { js } from './template-strings';
5
6
  import type { AnyAttributes, JsxComponent, JsxRenderable } from './jsx-types';
6
7
  import { Fragment as _Fragment } from './jsx-runtime';
7
8
  declare namespace React {
package/dist/index.mjs CHANGED
@@ -1,10 +1,6 @@
1
- import { J as JsxRawHtml, f as flattenString, E as EMPTY, a as JsxDocType, j as jsxs, b as jsx, F as Fragment, i as isJsxNode } from "./jsx-runtime-CsQM2fQb.js";
1
+ import { E as EMPTY, j as jsx, J as JsxDocType, a as jsxs, F as Fragment, b as JsxRawHtml, f as flattenString, i as isJsxNode } from "./jsx-runtime-DlHYwToA.js";
2
2
 
3
- export { d as JsxComment, c as JsxElement, e as JsxEmpty, g as JsxFragment, h as JsxNode } from "./jsx-runtime-CsQM2fQb.js";
4
-
5
- function RawHtml({children}) {
6
- return new JsxRawHtml(flattenString(children));
7
- }
3
+ export { e as JsxComment, d as JsxElement, g as JsxEmpty, h as JsxFragment, k as JsxNode, c as js } from "./jsx-runtime-DlHYwToA.js";
8
4
 
9
5
  function C({children}) {
10
6
  {
@@ -12,10 +8,49 @@ function C({children}) {
12
8
  }
13
9
  }
14
10
 
11
+ function Checkbox(props) {
12
+ return jsx("input", {
13
+ ...props,
14
+ type: "checkbox"
15
+ });
16
+ }
17
+
18
+ function ColorInput(props) {
19
+ return jsx("input", {
20
+ ...props,
21
+ type: "color"
22
+ });
23
+ }
24
+
25
+ function DateInput(props) {
26
+ return jsx("input", {
27
+ ...props,
28
+ type: "date"
29
+ });
30
+ }
31
+
15
32
  function DocType(props) {
16
33
  return new JsxDocType(props);
17
34
  }
18
35
 
36
+ function EmailInput(props) {
37
+ return jsx("input", {
38
+ ...props,
39
+ type: "email"
40
+ });
41
+ }
42
+
43
+ function Empty() {
44
+ return EMPTY;
45
+ }
46
+
47
+ function FileInput(props) {
48
+ return jsx("input", {
49
+ ...props,
50
+ type: "file"
51
+ });
52
+ }
53
+
19
54
  function HtmlDocument({children, ...htmlAttrs}) {
20
55
  return jsxs(Fragment, {
21
56
  children: [ jsx(DocType, {
@@ -27,8 +62,78 @@ function HtmlDocument({children, ...htmlAttrs}) {
27
62
  });
28
63
  }
29
64
 
30
- function Empty() {
31
- return EMPTY;
65
+ function NumberInput(props) {
66
+ return jsx("input", {
67
+ ...props,
68
+ type: "number"
69
+ });
70
+ }
71
+
72
+ function PasswordInput(props) {
73
+ return jsx("input", {
74
+ ...props,
75
+ type: "password"
76
+ });
77
+ }
78
+
79
+ function RadioButton(props) {
80
+ return jsx("input", {
81
+ ...props,
82
+ type: "radio"
83
+ });
84
+ }
85
+
86
+ function RangeInput(props) {
87
+ return jsx("input", {
88
+ ...props,
89
+ type: "range"
90
+ });
91
+ }
92
+
93
+ function RawHtml({children}) {
94
+ return new JsxRawHtml(flattenString(children));
95
+ }
96
+
97
+ function SearchInput(props) {
98
+ return jsx("input", {
99
+ ...props,
100
+ type: "search"
101
+ });
102
+ }
103
+
104
+ function TelephoneInput(props) {
105
+ return jsx("input", {
106
+ ...props,
107
+ type: "tel"
108
+ });
109
+ }
110
+
111
+ function TextInput(props) {
112
+ return jsx("input", {
113
+ ...props,
114
+ type: "text"
115
+ });
116
+ }
117
+
118
+ function TimeInput(props) {
119
+ return jsx("input", {
120
+ ...props,
121
+ type: "time"
122
+ });
123
+ }
124
+
125
+ function UrlInput(props) {
126
+ return jsx("input", {
127
+ ...props,
128
+ type: "url"
129
+ });
130
+ }
131
+
132
+ function WeekInput(props) {
133
+ return jsx("input", {
134
+ ...props,
135
+ type: "week"
136
+ });
32
137
  }
33
138
 
34
139
  function elysiaJsx() {
@@ -59,4 +164,4 @@ var React;
59
164
 
60
165
  var React$1 = React;
61
166
 
62
- export { C, DocType, EMPTY, Empty, HtmlDocument, JsxDocType, JsxRawHtml, RawHtml, React$1 as default, elysiaJsx, isJsxNode };
167
+ export { C, Checkbox, ColorInput, DateInput, DocType, EMPTY, EmailInput, Empty, FileInput, HtmlDocument, JsxDocType, JsxRawHtml, NumberInput, PasswordInput, RadioButton, RangeInput, RawHtml, SearchInput, TelephoneInput, TextInput, TimeInput, UrlInput, WeekInput, React$1 as default, elysiaJsx, isJsxNode };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env -S bun --hot
2
+ import { type ServerWebSocket } from "bun";
3
+ type WSData = {};
4
+ declare global {
5
+ var _clients: Set<ServerWebSocket<WSData>> | undefined;
6
+ }
7
+ export {};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env -S bun
2
+ export declare const kitchenSink: import("src/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare function devLog(...vars: any[]): void;
2
+ export declare function logFull(...vars: any[]): void;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Checks that `Value` is assignable to `Target`.
3
+ *
4
+ * ```ts
5
+ * expectType<TypeOf<number, 123>>(true);
6
+ * expectType<TypeOf<123, number>>(false);
7
+ * ```
8
+ */
9
+ export type TypeOf<Target, Value> = Exclude<Value, Target> extends never ? true : false;
10
+ /**
11
+ * Checks that `Value` is equal to the same type as `Target`.
12
+ *
13
+ * ```ts
14
+ * expectType<TypeEqual<123, 123>>(true);
15
+ * expectType<TypeEqual<123, number>>(false);
16
+ * expectType<TypeEqual<number, 123>>(false);
17
+ * expectType<TypeEqual<number, number>>(true);
18
+ * ```
19
+ */
20
+ export type TypeEqual<Target, Value> = (<T>() => T extends Target ? 1 : 2) extends <T>() => T extends Value ? 1 : 2 ? true : false;
21
+ /**
22
+ * Asserts the `value` type is assignable to the generic `Type`.
23
+ *
24
+ * ```ts
25
+ * expectType<number>(123);
26
+ * expectType<boolean>(true);
27
+ * ```
28
+ */
29
+ export declare const expectType: <Type>(_: Type) => void;
30
+ /**
31
+ * Asserts the `value` type is `never`, i.e. this function should never be called.
32
+ * If it is called at runtime, it will throw a `TypeError`. The return type is
33
+ * `never` to support returning in exhaustive type checks.
34
+ *
35
+ * ```ts
36
+ * return expectNever(value);
37
+ * ```
38
+ */
39
+ export declare const expectNever: (value: never) => never;
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
 
3
- var jsxRuntime = require("./jsx-runtime-DpEMYmD9.js");
3
+ var jsxRuntime = require("./jsx-runtime-BQPDXeiv.js");
4
4
 
5
5
  function jsxDEV(tag, props, key, isStaticChildren, source, self) {
6
6
  let node = jsxRuntime.jsx(...arguments);
7
- if (process.env.JSXHTML_DEV) return node;
8
7
  if (jsxRuntime.isJsxComponent(tag) && !(node instanceof jsxRuntime.JsxComment)) {
9
8
  const name = tag.displayName ?? tag.name ?? "Unknown";
10
9
  node = new jsxRuntime.JsxFragment([ new jsxRuntime.JsxComment(`<${name}>`), node, new jsxRuntime.JsxComment(`</${name}>`) ]);
@@ -14,6 +13,8 @@ function jsxDEV(tag, props, key, isStaticChildren, source, self) {
14
13
 
15
14
  exports.Fragment = jsxRuntime.Fragment;
16
15
 
16
+ exports.JSX = jsxRuntime.JSX;
17
+
17
18
  exports.jsx = jsxRuntime.jsx;
18
19
 
19
20
  exports.jsxDEV = jsxDEV;
@@ -1,10 +1,9 @@
1
- import { b as jsx, k as isJsxComponent, d as JsxComment, g as JsxFragment } from "./jsx-runtime-CsQM2fQb.js";
1
+ import { j as jsx, l as isJsxComponent, e as JsxComment, h as JsxFragment } from "./jsx-runtime-DlHYwToA.js";
2
2
 
3
- export { F as Fragment } from "./jsx-runtime-CsQM2fQb.js";
3
+ export { F as Fragment, m as JSX } from "./jsx-runtime-DlHYwToA.js";
4
4
 
5
5
  function jsxDEV(tag, props, key, isStaticChildren, source, self) {
6
6
  let node = jsx(...arguments);
7
- if (process.env.JSXHTML_DEV) return node;
8
7
  if (isJsxComponent(tag) && !(node instanceof JsxComment)) {
9
8
  const name = tag.displayName ?? tag.name ?? "Unknown";
10
9
  node = new JsxFragment([ new JsxComment(`<${name}>`), node, new JsxComment(`</${name}>`) ]);