@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,11 @@
1
+ export type ClassNamePrimitive = string | number | bigint;
2
+ export type ClassNameDictionary = Record<string, unknown>;
3
+ export type ClassNameValue = ClassNamePrimitive | ClassNameDictionary | ClassNameValue[] | null | undefined | boolean;
4
+ export type ClassNames = ClassNameValue;
5
+ /**
6
+ * Build a class string from strings, numbers, arrays, and objects.
7
+ *
8
+ * @param values Class name fragments.
9
+ * @returns Space-separated class string.
10
+ */
11
+ export declare function classCat(...values: ClassNameValue[]): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ /*! Adapted from https://github.com/mathiasbynens/CSS.escape/blob/4b25c283eaf4dd443f44a7096463e973d56dd1b2/css.escape.js */
2
+ /**
3
+ * Escapes a string for use as a CSS identifier.
4
+ *
5
+ * This function is an implementation of the CSS Object Model's `CSS.escape()`
6
+ * method. It can be used to safely escape strings for use in CSS selectors.
7
+ *
8
+ * @see https://drafts.csswg.org/cssom/#the-css.escape()-method
9
+ *
10
+ * @param value The string to be escaped. In the original spec, this is a `DOMString`.
11
+ * @returns The escaped string.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * import cssEscape from './css-escape';
16
+ *
17
+ * const id = 'foo.bar:baz';
18
+ * const escapedId = cssEscape(id); // 'foo\\.bar\\:baz'
19
+ * const selector = `#${escapedId}`; // '#foo\\.bar\\:baz'
20
+ *
21
+ * // This selector can now be used with document.querySelector
22
+ * // const element = document.querySelector(selector);
23
+ * ```
24
+ */
25
+ export default function cssEscape(value: string): string;
@@ -0,0 +1,6 @@
1
+ import { JsxComment } from '../jsx-elements';
2
+ import type { StringChildren } from '../jsx-types';
3
+ /**
4
+ * An HTML `<!-- comment -->`.
5
+ */
6
+ export declare function C({ children }: StringChildren): JsxComment | import("..").JsxEmpty;
@@ -0,0 +1,5 @@
1
+ import type { InputAttributes } from '../htmlspec/elements';
2
+ /**
3
+ * `<input type="checkbox">`.
4
+ */
5
+ export declare function Checkbox(props: Omit<InputAttributes, 'type'>): import("src/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { InputAttributes } from '../htmlspec/elements';
2
+ /**
3
+ * `<input type="color">`.
4
+ */
5
+ export declare function ColorInput(props: Omit<InputAttributes, 'type' | 'checked'>): import("src/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { InputAttributes } from '../htmlspec/elements';
2
+ /**
3
+ * `<input type="date">`.
4
+ */
5
+ export declare function DateInput(props: Omit<InputAttributes, 'type' | 'checked'>): import("src/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { DocTypeProps } from '../jsx-elements';
2
+ import { JsxDocType } from '../jsx-elements';
3
+ /**
4
+ * The `<!DOCTYPE>` node.
5
+ */
6
+ export declare function DocType(props: DocTypeProps): JsxDocType;
@@ -0,0 +1,5 @@
1
+ import type { InputAttributes } from '../htmlspec/elements';
2
+ /**
3
+ * `<input type="email">`.
4
+ */
5
+ export declare function EmailInput(props: Omit<InputAttributes, 'type' | 'checked'>): import("src/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * No output.
3
+ */
4
+ export declare function Empty(): import("..").JsxEmpty;
@@ -0,0 +1,5 @@
1
+ import type { InputAttributes } from '../htmlspec/elements';
2
+ /**
3
+ * `<input type="file">`.
4
+ */
5
+ export declare function FileInput(props: Omit<InputAttributes, 'type' | 'checked'>): import("src/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { AnyAttributes } from '../jsx-types';
2
+ /**
3
+ * `<!DOCTYPE html><html ...>{children}</html>`
4
+ */
5
+ export declare function HtmlDocument({ children, ...htmlAttrs }: AnyAttributes): import("src/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { InputAttributes } from '../htmlspec/elements';
2
+ /**
3
+ * `<input type="number">`.
4
+ */
5
+ export declare function NumberInput(props: Omit<InputAttributes, 'type' | 'checked'>): import("src/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { InputAttributes } from '../htmlspec/elements';
2
+ /**
3
+ * `<input type="password">`.
4
+ */
5
+ export declare function PasswordInput(props: Omit<InputAttributes, 'type' | 'checked'>): import("src/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { InputAttributes } from '../htmlspec/elements';
2
+ /**
3
+ * `<input type="radio">`.
4
+ */
5
+ export declare function RadioButton(props: Omit<InputAttributes, 'type' | 'checked'>): import("src/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { InputAttributes } from '../htmlspec/elements';
2
+ /**
3
+ * `<input type="range">`.
4
+ */
5
+ export declare function RangeInput(props: Omit<InputAttributes, 'type' | 'checked'>): import("src/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { JsxRawHtml } from '../jsx-elements';
2
+ import type { StringChildren } from '../jsx-types';
3
+ /**
4
+ * Unescaped HTML.
5
+ */
6
+ export declare function RawHtml({ children }: StringChildren): JsxRawHtml;
@@ -0,0 +1,5 @@
1
+ import type { InputAttributes } from '../htmlspec/elements';
2
+ /**
3
+ * `<input type="search">`.
4
+ */
5
+ export declare function SearchInput(props: Omit<InputAttributes, 'type' | 'checked'>): import("src/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { InputAttributes } from '../htmlspec/elements';
2
+ /**
3
+ * `<input type="tel">`.
4
+ */
5
+ export declare function TelephoneInput(props: Omit<InputAttributes, 'type' | 'checked'>): import("src/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { InputAttributes } from '../htmlspec/elements';
2
+ /**
3
+ * `<input type="text">`.
4
+ */
5
+ export declare function TextInput(props: Omit<InputAttributes, 'type' | 'checked'>): import("src/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { InputAttributes } from '../htmlspec/elements';
2
+ /**
3
+ * `<input type="time">`.
4
+ */
5
+ export declare function TimeInput(props: Omit<InputAttributes, 'type' | 'checked'>): import("src/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { InputAttributes } from '../htmlspec/elements';
2
+ /**
3
+ * `<input type="url">`.
4
+ */
5
+ export declare function UrlInput(props: Omit<InputAttributes, 'type' | 'checked'>): import("src/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { InputAttributes } from '../htmlspec/elements';
2
+ /**
3
+ * `<input type="week">`.
4
+ */
5
+ export declare function WeekInput(props: Omit<InputAttributes, 'type' | 'checked'>): import("src/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ export { C } from './C';
2
+ export { Checkbox } from './Checkbox';
3
+ export { ColorInput } from './ColorInput';
4
+ export { DateInput } from './DateInput';
5
+ export { DocType } from './DocType';
6
+ export { EmailInput } from './EmailInput';
7
+ export { Empty } from './Empty';
8
+ export { FileInput } from './FileInput';
9
+ export { HtmlDocument } from './HtmlDocument';
10
+ export { NumberInput } from './NumberInput';
11
+ export { PasswordInput } from './PasswordInput';
12
+ export { RadioButton } from './RadioButton';
13
+ export { RangeInput } from './RangeInput';
14
+ export { RawHtml } from './RawHtml';
15
+ export { SearchInput } from './SearchInput';
16
+ export { TelephoneInput } from './TelephoneInput';
17
+ export { TextInput } from './TextInput';
18
+ export { TimeInput } from './TimeInput';
19
+ export { UrlInput } from './UrlInput';
20
+ export { WeekInput } from './WeekInput';
@@ -1,23 +1 @@
1
- import type { DocTypeProps } from './jsx-elements';
2
- import { JsxComment, JsxDocType, JsxRawHtml } from './jsx-elements';
3
- import type { AnyAttributes, StringChildren } from './jsx-types';
4
- /**
5
- * Unescaped HTML.
6
- */
7
- export declare function RawHtml({ children }: StringChildren): JsxRawHtml;
8
- /**
9
- * An HTML `<!-- comment -->`
10
- */
11
- export declare function C({ children }: StringChildren): JsxComment | import("./jsx-elements").JsxEmpty;
12
- /**
13
- * The `<!DOCTYPE>` node.
14
- */
15
- export declare function DocType(props: DocTypeProps): JsxDocType;
16
- /**
17
- * `<!DOCTYPE html><html ...>{children}</html>`
18
- */
19
- export declare function HtmlDocument({ children, ...htmlAttrs }: AnyAttributes): import("./jsx").JSX.Element;
20
- /**
21
- * No output.
22
- */
23
- export declare function Empty(): import("./jsx-elements").JsxEmpty;
1
+ export * from './custom';