From 15474fccad9b93029d6409eb9108c21aa295bbdd Mon Sep 17 00:00:00 2001 From: Ethan Davidson <31261035+EthanThatOneKid@users.noreply.github.com> Date: Fri, 5 Apr 2024 17:15:08 -0700 Subject: [PATCH] Update element props interface names (#5) * use consistent prop names across all elements * replace type aliases with interfaces --- a.ts | 44 +++++++++++++++++++++++++------- abbr.ts | 9 ++++++- acronym.ts | 10 +++++++- address.ts | 9 ++++++- area.ts | 25 ++++++++++++++---- article.ts | 9 ++++++- aside.ts | 12 ++++++++- audio.ts | 18 ++++++++++--- b.ts | 9 ++++++- base.ts | 8 +++--- bdi.ts | 9 ++++++- bdo.ts | 9 ++++++- big.ts | 10 +++++++- blockquote.ts | 7 ++--- body.ts | 56 ++++++++++++++++++++++++++++++---------- br.ts | 11 +++++--- button.ts | 21 ++++++++++++--- canvas.ts | 16 +++++++++--- caption.ts | 14 +++++++--- center.ts | 10 +++++++- cite.ts | 9 ++++++- cli/codegen.ts | 58 ++++++++++++++++++++---------------------- code.ts | 9 ++++++- col.ts | 32 +++++++++++++++++------ colgroup.ts | 35 +++++++++++++++++++------ data.ts | 7 ++--- datalist.ts | 9 ++++++- dd.ts | 9 ++++++- del.ts | 8 +++--- details.ts | 11 +++++--- dfn.ts | 9 ++++++- dialog.ts | 10 +++++--- dir.ts | 11 +++++--- div.ts | 11 +++++--- dl.ts | 9 ++++++- dt.ts | 9 ++++++- em.ts | 9 ++++++- embed.ts | 20 +++++++++++---- fencedframe.ts | 10 +++++++- fieldset.ts | 12 ++++++--- figcaption.ts | 9 ++++++- figure.ts | 9 ++++++- font.ts | 21 ++++++++++----- footer.ts | 9 ++++++- form.ts | 15 ++++++++--- frame.ts | 44 ++++++++++++++++++++++++-------- frameset.ts | 19 ++++++++++---- h1.ts | 9 ++++++- h2.ts | 9 ++++++- h3.ts | 9 ++++++- h4.ts | 9 ++++++- h5.ts | 9 ++++++- h6.ts | 9 ++++++- head.ts | 11 +++++--- header.ts | 9 ++++++- hgroup.ts | 9 ++++++- hr.ts | 31 +++++++++++++++++------ html.ts | 17 +++++++++---- i.ts | 9 ++++++- iframe.ts | 69 ++++++++++++++++++++++++++++++++++++++++---------- img.ts | 54 +++++++++++++++++++++++++++++++-------- input.ts | 52 ++++++++++++++++++++++++++++++++----- ins.ts | 8 +++--- kbd.ts | 9 ++++++- label.ts | 10 +++++--- legend.ts | 14 +++++++--- li.ts | 12 ++++++--- link.ts | 45 ++++++++++++++++++++++++++------ main.ts | 9 ++++++- map.ts | 7 ++--- mark.ts | 9 ++++++- marquee.ts | 64 ++++++++++++++++++++++++++++++++++++---------- menu.ts | 11 +++++--- meta.ts | 15 ++++++++--- meter.ts | 15 ++++++++--- nav.ts | 9 ++++++- nobr.ts | 10 +++++++- noembed.ts | 10 +++++++- noframes.ts | 10 +++++++- noscript.ts | 9 ++++++- object.ts | 60 ++++++++++++++++++++++++++++++++++--------- ol.ts | 14 +++++++--- optgroup.ts | 11 +++++--- option.ts | 13 +++++++--- output.ts | 12 ++++++--- p.ts | 9 ++++++- param.ts | 26 ++++++++++++++----- picture.ts | 9 ++++++- plaintext.ts | 10 +++++++- portal.ts | 10 +++++++- pre.ts | 21 ++++++++++----- progress.ts | 11 +++++--- q.ts | 7 ++--- rb.ts | 10 +++++++- rp.ts | 9 ++++++- rt.ts | 9 ++++++- rtc.ts | 10 +++++++- ruby.ts | 9 ++++++- s.ts | 9 ++++++- samp.ts | 9 ++++++- script.ts | 28 ++++++++++++++++---- search.ts | 9 ++++++- section.ts | 9 ++++++- select.ts | 15 ++++++++--- slot.ts | 7 ++--- small.ts | 12 ++++++++- source.ts | 13 +++++++--- span.ts | 9 ++++++- strike.ts | 10 +++++++- strong.ts | 9 ++++++- style.ts | 20 +++++++++++---- sub.ts | 9 ++++++- summary.ts | 9 ++++++- sup.ts | 9 ++++++- table.ts | 54 ++++++++++++++++++++++++++++++--------- tbody.ts | 34 +++++++++++++++++++------ td.ts | 54 ++++++++++++++++++++++++++++++--------- template.ts | 10 +++++--- textarea.ts | 23 ++++++++++++++--- tfoot.ts | 34 +++++++++++++++++++------ th.ts | 46 +++++++++++++++++++++++++-------- thead.ts | 34 +++++++++++++++++++------ time.ts | 7 ++--- title.ts | 12 ++++++++- tr.ts | 31 +++++++++++++++++------ track.ts | 11 +++++--- tt.ts | 10 +++++++- u.ts | 9 ++++++- ul.ts | 16 ++++++++---- var.ts | 9 ++++++- video.ts | 23 ++++++++++++++--- wbr.ts | 9 ++++++- xmp.ts | 10 +++++++- 133 files changed, 1752 insertions(+), 460 deletions(-) diff --git a/a.ts b/a.ts index b749a3e..45b3717 100644 --- a/a.ts +++ b/a.ts @@ -2,29 +2,55 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * AProps are the props for the [`a`](https://developer.mozilla.org/docs/Web/HTML/Element/a) element. + * AElementProps are the props for the [`a`](https://developer.mozilla.org/docs/Web/HTML/Element/a) element. * @see */ -export interface AProps extends GlobalAttributes { - /** @experimental */ +export interface AElementProps extends GlobalAttributes { + /** + * `attributionsrc` is an attribute of the [`a`](https://developer.mozilla.org/docs/Web/HTML/Element/a) element. + * @experimental + */ attributionsrc?: string | undefined; - /** @deprecated */ + /** + * `charset` is an attribute of the [`a`](https://developer.mozilla.org/docs/Web/HTML/Element/a) element. + * @deprecated + */ charset?: string | undefined; - /** @deprecated */ + /** + * `coords` is an attribute of the [`a`](https://developer.mozilla.org/docs/Web/HTML/Element/a) element. + * @deprecated + */ coords?: string | undefined; + /** `download` is an attribute of the [`a`](https://developer.mozilla.org/docs/Web/HTML/Element/a) element. */ download?: string | undefined; + /** `href` is an attribute of the [`a`](https://developer.mozilla.org/docs/Web/HTML/Element/a) element. */ href?: string | undefined; + /** `hreflang` is an attribute of the [`a`](https://developer.mozilla.org/docs/Web/HTML/Element/a) element. */ hreflang?: string | undefined; - /** @deprecated */ + /** + * `name` is an attribute of the [`a`](https://developer.mozilla.org/docs/Web/HTML/Element/a) element. + * @deprecated + */ name?: string | undefined; + /** `ping` is an attribute of the [`a`](https://developer.mozilla.org/docs/Web/HTML/Element/a) element. */ ping?: string | undefined; + /** `referrerpolicy` is an attribute of the [`a`](https://developer.mozilla.org/docs/Web/HTML/Element/a) element. */ referrerpolicy?: string | undefined; + /** `rel` is an attribute of the [`a`](https://developer.mozilla.org/docs/Web/HTML/Element/a) element. */ rel?: string | undefined; - /** @deprecated */ + /** + * `rev` is an attribute of the [`a`](https://developer.mozilla.org/docs/Web/HTML/Element/a) element. + * @deprecated + */ rev?: string | undefined; - /** @deprecated */ + /** + * `shape` is an attribute of the [`a`](https://developer.mozilla.org/docs/Web/HTML/Element/a) element. + * @deprecated + */ shape?: string | undefined; + /** `target` is an attribute of the [`a`](https://developer.mozilla.org/docs/Web/HTML/Element/a) element. */ target?: string | undefined; + /** `type` is an attribute of the [`a`](https://developer.mozilla.org/docs/Web/HTML/Element/a) element. */ type?: string | undefined; } @@ -32,6 +58,6 @@ export interface AProps extends GlobalAttributes { * a renders the [`a`](https://developer.mozilla.org/docs/Web/HTML/Element/a) element. * @see */ -export function a(props?: AProps, ...children: string[]): string { +export function a(props?: AElementProps, ...children: string[]): string { return renderElement("a", props as AnyProps, false, children); } diff --git a/abbr.ts b/abbr.ts index 0198f5a..0e284c7 100644 --- a/abbr.ts +++ b/abbr.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * AbbrElementProps are the props for the [`abbr`](https://developer.mozilla.org/docs/Web/HTML/Element/abbr) element. + * @see + */ +export interface AbbrElementProps extends GlobalAttributes { +} + /** * abbr renders the [`abbr`](https://developer.mozilla.org/docs/Web/HTML/Element/abbr) element. * @see */ -export function abbr(props?: GlobalAttributes, ...children: string[]): string { +export function abbr(props?: AbbrElementProps, ...children: string[]): string { return renderElement("abbr", props as AnyProps, false, children); } diff --git a/acronym.ts b/acronym.ts index 3a2b346..45578b4 100644 --- a/acronym.ts +++ b/acronym.ts @@ -1,13 +1,21 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * AcronymElementProps are the props for the [`acronym`](https://developer.mozilla.org/docs/Web/HTML/Element/acronym) element. + * @see + * @deprecated + */ +export interface AcronymElementProps extends GlobalAttributes { +} + /** * acronym renders the [`acronym`](https://developer.mozilla.org/docs/Web/HTML/Element/acronym) element. * @see * @deprecated */ export function acronym( - props?: GlobalAttributes, + props?: AcronymElementProps, ...children: string[] ): string { return renderElement("acronym", props as AnyProps, false, children); diff --git a/address.ts b/address.ts index 7953631..c8f69f5 100644 --- a/address.ts +++ b/address.ts @@ -1,12 +1,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * AddressElementProps are the props for the [`address`](https://developer.mozilla.org/docs/Web/HTML/Element/address) element. + * @see + */ +export interface AddressElementProps extends GlobalAttributes { +} + /** * address renders the [`address`](https://developer.mozilla.org/docs/Web/HTML/Element/address) element. * @see */ export function address( - props?: GlobalAttributes, + props?: AddressElementProps, ...children: string[] ): string { return renderElement("address", props as AnyProps, false, children); diff --git a/area.ts b/area.ts index 37ddc80..494b145 100644 --- a/area.ts +++ b/area.ts @@ -2,22 +2,37 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * AreaProps are the props for the [`area`](https://developer.mozilla.org/docs/Web/HTML/Element/area) element. + * AreaElementProps are the props for the [`area`](https://developer.mozilla.org/docs/Web/HTML/Element/area) element. * @see */ -export interface AreaProps extends GlobalAttributes { +export interface AreaElementProps extends GlobalAttributes { + /** `alt` is an attribute of the [`area`](https://developer.mozilla.org/docs/Web/HTML/Element/area) element. */ alt?: string | undefined; + /** `coords` is an attribute of the [`area`](https://developer.mozilla.org/docs/Web/HTML/Element/area) element. */ coords?: string | undefined; + /** `download` is an attribute of the [`area`](https://developer.mozilla.org/docs/Web/HTML/Element/area) element. */ download?: string | undefined; + /** `href` is an attribute of the [`area`](https://developer.mozilla.org/docs/Web/HTML/Element/area) element. */ href?: string | undefined; - /** @deprecated */ + /** + * `nohref` is an attribute of the [`area`](https://developer.mozilla.org/docs/Web/HTML/Element/area) element. + * @deprecated + */ nohref?: string | undefined; + /** `ping` is an attribute of the [`area`](https://developer.mozilla.org/docs/Web/HTML/Element/area) element. */ ping?: string | undefined; + /** `referrerpolicy` is an attribute of the [`area`](https://developer.mozilla.org/docs/Web/HTML/Element/area) element. */ referrerpolicy?: string | undefined; + /** `rel` is an attribute of the [`area`](https://developer.mozilla.org/docs/Web/HTML/Element/area) element. */ rel?: string | undefined; + /** `shape` is an attribute of the [`area`](https://developer.mozilla.org/docs/Web/HTML/Element/area) element. */ shape?: string | undefined; - /** @deprecated */ + /** + * `tabindex` is an attribute of the [`area`](https://developer.mozilla.org/docs/Web/HTML/Element/area) element. + * @deprecated + */ tabindex?: string | undefined; + /** `target` is an attribute of the [`area`](https://developer.mozilla.org/docs/Web/HTML/Element/area) element. */ target?: string | undefined; } @@ -25,6 +40,6 @@ export interface AreaProps extends GlobalAttributes { * area renders the [`area`](https://developer.mozilla.org/docs/Web/HTML/Element/area) element. * @see */ -export function area(props?: AreaProps): string { +export function area(props?: AreaElementProps): string { return renderElement("area", props as AnyProps, true); } diff --git a/article.ts b/article.ts index 7382a35..9511ec7 100644 --- a/article.ts +++ b/article.ts @@ -1,12 +1,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * ArticleElementProps are the props for the [`article`](https://developer.mozilla.org/docs/Web/HTML/Element/article) element. + * @see + */ +export interface ArticleElementProps extends GlobalAttributes { +} + /** * article renders the [`article`](https://developer.mozilla.org/docs/Web/HTML/Element/article) element. * @see */ export function article( - props?: GlobalAttributes, + props?: ArticleElementProps, ...children: string[] ): string { return renderElement("article", props as AnyProps, false, children); diff --git a/aside.ts b/aside.ts index 4656e8c..ccda55b 100644 --- a/aside.ts +++ b/aside.ts @@ -1,10 +1,20 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * AsideElementProps are the props for the [`aside`](https://developer.mozilla.org/docs/Web/HTML/Element/aside) element. + * @see + */ +export interface AsideElementProps extends GlobalAttributes { +} + /** * aside renders the [`aside`](https://developer.mozilla.org/docs/Web/HTML/Element/aside) element. * @see */ -export function aside(props?: GlobalAttributes, ...children: string[]): string { +export function aside( + props?: AsideElementProps, + ...children: string[] +): string { return renderElement("aside", props as AnyProps, false, children); } diff --git a/audio.ts b/audio.ts index 433f3c0..1d29956 100644 --- a/audio.ts +++ b/audio.ts @@ -2,18 +2,27 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * AudioProps are the props for the [`audio`](https://developer.mozilla.org/docs/Web/HTML/Element/audio) element. + * AudioElementProps are the props for the [`audio`](https://developer.mozilla.org/docs/Web/HTML/Element/audio) element. * @see */ -export interface AudioProps extends GlobalAttributes { +export interface AudioElementProps extends GlobalAttributes { + /** `autoplay` is an attribute of the [`audio`](https://developer.mozilla.org/docs/Web/HTML/Element/audio) element. */ autoplay?: string | undefined; + /** `controls` is an attribute of the [`audio`](https://developer.mozilla.org/docs/Web/HTML/Element/audio) element. */ controls?: string | undefined; + /** `controlslist` is an attribute of the [`audio`](https://developer.mozilla.org/docs/Web/HTML/Element/audio) element. */ controlslist?: string | undefined; + /** `crossorigin` is an attribute of the [`audio`](https://developer.mozilla.org/docs/Web/HTML/Element/audio) element. */ crossorigin?: string | undefined; + /** `disableremoteplayback` is an attribute of the [`audio`](https://developer.mozilla.org/docs/Web/HTML/Element/audio) element. */ disableremoteplayback?: string | undefined; + /** `loop` is an attribute of the [`audio`](https://developer.mozilla.org/docs/Web/HTML/Element/audio) element. */ loop?: string | undefined; + /** `muted` is an attribute of the [`audio`](https://developer.mozilla.org/docs/Web/HTML/Element/audio) element. */ muted?: string | undefined; + /** `preload` is an attribute of the [`audio`](https://developer.mozilla.org/docs/Web/HTML/Element/audio) element. */ preload?: string | undefined; + /** `src` is an attribute of the [`audio`](https://developer.mozilla.org/docs/Web/HTML/Element/audio) element. */ src?: string | undefined; } @@ -21,6 +30,9 @@ export interface AudioProps extends GlobalAttributes { * audio renders the [`audio`](https://developer.mozilla.org/docs/Web/HTML/Element/audio) element. * @see */ -export function audio(props?: AudioProps, ...children: string[]): string { +export function audio( + props?: AudioElementProps, + ...children: string[] +): string { return renderElement("audio", props as AnyProps, false, children); } diff --git a/b.ts b/b.ts index 5651153..7324a3f 100644 --- a/b.ts +++ b/b.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * BElementProps are the props for the [`b`](https://developer.mozilla.org/docs/Web/HTML/Element/b) element. + * @see + */ +export interface BElementProps extends GlobalAttributes { +} + /** * b renders the [`b`](https://developer.mozilla.org/docs/Web/HTML/Element/b) element. * @see */ -export function b(props?: GlobalAttributes, ...children: string[]): string { +export function b(props?: BElementProps, ...children: string[]): string { return renderElement("b", props as AnyProps, false, children); } diff --git a/base.ts b/base.ts index ce21f5c..398dea5 100644 --- a/base.ts +++ b/base.ts @@ -2,11 +2,13 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * BaseProps are the props for the [`base`](https://developer.mozilla.org/docs/Web/HTML/Element/base) element. + * BaseElementProps are the props for the [`base`](https://developer.mozilla.org/docs/Web/HTML/Element/base) element. * @see */ -export interface BaseProps extends GlobalAttributes { +export interface BaseElementProps extends GlobalAttributes { + /** `href` is an attribute of the [`base`](https://developer.mozilla.org/docs/Web/HTML/Element/base) element. */ href?: string | undefined; + /** `target` is an attribute of the [`base`](https://developer.mozilla.org/docs/Web/HTML/Element/base) element. */ target?: string | undefined; } @@ -14,6 +16,6 @@ export interface BaseProps extends GlobalAttributes { * base renders the [`base`](https://developer.mozilla.org/docs/Web/HTML/Element/base) element. * @see */ -export function base(props?: BaseProps): string { +export function base(props?: BaseElementProps): string { return renderElement("base", props as AnyProps, true); } diff --git a/bdi.ts b/bdi.ts index 30df22f..24195fd 100644 --- a/bdi.ts +++ b/bdi.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * BdiElementProps are the props for the [`bdi`](https://developer.mozilla.org/docs/Web/HTML/Element/bdi) element. + * @see + */ +export interface BdiElementProps extends GlobalAttributes { +} + /** * bdi renders the [`bdi`](https://developer.mozilla.org/docs/Web/HTML/Element/bdi) element. * @see */ -export function bdi(props?: GlobalAttributes, ...children: string[]): string { +export function bdi(props?: BdiElementProps, ...children: string[]): string { return renderElement("bdi", props as AnyProps, false, children); } diff --git a/bdo.ts b/bdo.ts index f054dc7..5bd3f25 100644 --- a/bdo.ts +++ b/bdo.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * BdoElementProps are the props for the [`bdo`](https://developer.mozilla.org/docs/Web/HTML/Element/bdo) element. + * @see + */ +export interface BdoElementProps extends GlobalAttributes { +} + /** * bdo renders the [`bdo`](https://developer.mozilla.org/docs/Web/HTML/Element/bdo) element. * @see */ -export function bdo(props?: GlobalAttributes, ...children: string[]): string { +export function bdo(props?: BdoElementProps, ...children: string[]): string { return renderElement("bdo", props as AnyProps, false, children); } diff --git a/big.ts b/big.ts index 11e143d..4acdeed 100644 --- a/big.ts +++ b/big.ts @@ -1,11 +1,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * BigElementProps are the props for the [`big`](https://developer.mozilla.org/docs/Web/HTML/Element/big) element. + * @see + * @deprecated + */ +export interface BigElementProps extends GlobalAttributes { +} + /** * big renders the [`big`](https://developer.mozilla.org/docs/Web/HTML/Element/big) element. * @see * @deprecated */ -export function big(props?: GlobalAttributes, ...children: string[]): string { +export function big(props?: BigElementProps, ...children: string[]): string { return renderElement("big", props as AnyProps, false, children); } diff --git a/blockquote.ts b/blockquote.ts index 8329872..1f6c544 100644 --- a/blockquote.ts +++ b/blockquote.ts @@ -2,10 +2,11 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * BlockquoteProps are the props for the [`blockquote`](https://developer.mozilla.org/docs/Web/HTML/Element/blockquote) element. + * BlockquoteElementProps are the props for the [`blockquote`](https://developer.mozilla.org/docs/Web/HTML/Element/blockquote) element. * @see */ -export interface BlockquoteProps extends GlobalAttributes { +export interface BlockquoteElementProps extends GlobalAttributes { + /** `cite` is an attribute of the [`blockquote`](https://developer.mozilla.org/docs/Web/HTML/Element/blockquote) element. */ cite?: string | undefined; } @@ -14,7 +15,7 @@ export interface BlockquoteProps extends GlobalAttributes { * @see */ export function blockquote( - props?: BlockquoteProps, + props?: BlockquoteElementProps, ...children: string[] ): string { return renderElement("blockquote", props as AnyProps, false, children); diff --git a/body.ts b/body.ts index 80efb14..5f5d519 100644 --- a/body.ts +++ b/body.ts @@ -2,29 +2,59 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * BodyProps are the props for the [`body`](https://developer.mozilla.org/docs/Web/HTML/Element/body) element. + * BodyElementProps are the props for the [`body`](https://developer.mozilla.org/docs/Web/HTML/Element/body) element. * @see */ -export interface BodyProps extends GlobalAttributes { - /** @deprecated */ +export interface BodyElementProps extends GlobalAttributes { + /** + * `alink` is an attribute of the [`body`](https://developer.mozilla.org/docs/Web/HTML/Element/body) element. + * @deprecated + */ alink?: string | undefined; - /** @deprecated */ + /** + * `background` is an attribute of the [`body`](https://developer.mozilla.org/docs/Web/HTML/Element/body) element. + * @deprecated + */ background?: string | undefined; - /** @deprecated */ + /** + * `bgcolor` is an attribute of the [`body`](https://developer.mozilla.org/docs/Web/HTML/Element/body) element. + * @deprecated + */ bgcolor?: string | undefined; - /** @deprecated */ + /** + * `bottommargin` is an attribute of the [`body`](https://developer.mozilla.org/docs/Web/HTML/Element/body) element. + * @deprecated + */ bottommargin?: string | undefined; - /** @deprecated */ + /** + * `leftmargin` is an attribute of the [`body`](https://developer.mozilla.org/docs/Web/HTML/Element/body) element. + * @deprecated + */ leftmargin?: string | undefined; - /** @deprecated */ + /** + * `link` is an attribute of the [`body`](https://developer.mozilla.org/docs/Web/HTML/Element/body) element. + * @deprecated + */ link?: string | undefined; - /** @deprecated */ + /** + * `rightmargin` is an attribute of the [`body`](https://developer.mozilla.org/docs/Web/HTML/Element/body) element. + * @deprecated + */ rightmargin?: string | undefined; - /** @deprecated */ + /** + * `text` is an attribute of the [`body`](https://developer.mozilla.org/docs/Web/HTML/Element/body) element. + * @deprecated + */ text?: string | undefined; - /** @deprecated */ + /** + * `topmargin` is an attribute of the [`body`](https://developer.mozilla.org/docs/Web/HTML/Element/body) element. + * @deprecated + */ topmargin?: string | undefined; - /** @deprecated */ + /** + * `vlink` is an attribute of the [`body`](https://developer.mozilla.org/docs/Web/HTML/Element/body) element. + * @deprecated + */ vlink?: string | undefined; } @@ -32,6 +62,6 @@ export interface BodyProps extends GlobalAttributes { * body renders the [`body`](https://developer.mozilla.org/docs/Web/HTML/Element/body) element. * @see */ -export function body(props?: BodyProps, ...children: string[]): string { +export function body(props?: BodyElementProps, ...children: string[]): string { return renderElement("body", props as AnyProps, false, children); } diff --git a/br.ts b/br.ts index f0a7547..1762502 100644 --- a/br.ts +++ b/br.ts @@ -2,11 +2,14 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * BrProps are the props for the [`br`](https://developer.mozilla.org/docs/Web/HTML/Element/br) element. + * BrElementProps are the props for the [`br`](https://developer.mozilla.org/docs/Web/HTML/Element/br) element. * @see */ -export interface BrProps extends GlobalAttributes { - /** @deprecated */ +export interface BrElementProps extends GlobalAttributes { + /** + * `clear` is an attribute of the [`br`](https://developer.mozilla.org/docs/Web/HTML/Element/br) element. + * @deprecated + */ clear?: string | undefined; } @@ -14,6 +17,6 @@ export interface BrProps extends GlobalAttributes { * br renders the [`br`](https://developer.mozilla.org/docs/Web/HTML/Element/br) element. * @see */ -export function br(props?: BrProps): string { +export function br(props?: BrElementProps): string { return renderElement("br", props as AnyProps, true); } diff --git a/button.ts b/button.ts index 0a48e6d..7d8070b 100644 --- a/button.ts +++ b/button.ts @@ -2,21 +2,33 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * ButtonProps are the props for the [`button`](https://developer.mozilla.org/docs/Web/HTML/Element/button) element. + * ButtonElementProps are the props for the [`button`](https://developer.mozilla.org/docs/Web/HTML/Element/button) element. * @see */ -export interface ButtonProps extends GlobalAttributes { +export interface ButtonElementProps extends GlobalAttributes { + /** `disabled` is an attribute of the [`button`](https://developer.mozilla.org/docs/Web/HTML/Element/button) element. */ disabled?: string | undefined; + /** `form` is an attribute of the [`button`](https://developer.mozilla.org/docs/Web/HTML/Element/button) element. */ form?: string | undefined; + /** `formaction` is an attribute of the [`button`](https://developer.mozilla.org/docs/Web/HTML/Element/button) element. */ formaction?: string | undefined; + /** `formenctype` is an attribute of the [`button`](https://developer.mozilla.org/docs/Web/HTML/Element/button) element. */ formenctype?: string | undefined; + /** `formmethod` is an attribute of the [`button`](https://developer.mozilla.org/docs/Web/HTML/Element/button) element. */ formmethod?: string | undefined; + /** `formnovalidate` is an attribute of the [`button`](https://developer.mozilla.org/docs/Web/HTML/Element/button) element. */ formnovalidate?: string | undefined; + /** `formtarget` is an attribute of the [`button`](https://developer.mozilla.org/docs/Web/HTML/Element/button) element. */ formtarget?: string | undefined; + /** `name` is an attribute of the [`button`](https://developer.mozilla.org/docs/Web/HTML/Element/button) element. */ name?: string | undefined; + /** `popovertarget` is an attribute of the [`button`](https://developer.mozilla.org/docs/Web/HTML/Element/button) element. */ popovertarget?: string | undefined; + /** `popovertargetaction` is an attribute of the [`button`](https://developer.mozilla.org/docs/Web/HTML/Element/button) element. */ popovertargetaction?: string | undefined; + /** `type` is an attribute of the [`button`](https://developer.mozilla.org/docs/Web/HTML/Element/button) element. */ type?: string | undefined; + /** `value` is an attribute of the [`button`](https://developer.mozilla.org/docs/Web/HTML/Element/button) element. */ value?: string | undefined; } @@ -24,6 +36,9 @@ export interface ButtonProps extends GlobalAttributes { * button renders the [`button`](https://developer.mozilla.org/docs/Web/HTML/Element/button) element. * @see */ -export function button(props?: ButtonProps, ...children: string[]): string { +export function button( + props?: ButtonElementProps, + ...children: string[] +): string { return renderElement("button", props as AnyProps, false, children); } diff --git a/canvas.ts b/canvas.ts index 60ab6e7..a6abdf4 100644 --- a/canvas.ts +++ b/canvas.ts @@ -2,13 +2,18 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * CanvasProps are the props for the [`canvas`](https://developer.mozilla.org/docs/Web/HTML/Element/canvas) element. + * CanvasElementProps are the props for the [`canvas`](https://developer.mozilla.org/docs/Web/HTML/Element/canvas) element. * @see */ -export interface CanvasProps extends GlobalAttributes { +export interface CanvasElementProps extends GlobalAttributes { + /** `height` is an attribute of the [`canvas`](https://developer.mozilla.org/docs/Web/HTML/Element/canvas) element. */ height?: string | undefined; - /** @deprecated */ + /** + * `moz-opaque` is an attribute of the [`canvas`](https://developer.mozilla.org/docs/Web/HTML/Element/canvas) element. + * @deprecated + */ "moz-opaque"?: string | undefined; + /** `width` is an attribute of the [`canvas`](https://developer.mozilla.org/docs/Web/HTML/Element/canvas) element. */ width?: string | undefined; } @@ -16,6 +21,9 @@ export interface CanvasProps extends GlobalAttributes { * canvas renders the [`canvas`](https://developer.mozilla.org/docs/Web/HTML/Element/canvas) element. * @see */ -export function canvas(props?: CanvasProps, ...children: string[]): string { +export function canvas( + props?: CanvasElementProps, + ...children: string[] +): string { return renderElement("canvas", props as AnyProps, false, children); } diff --git a/caption.ts b/caption.ts index bf25ac2..ea4655c 100644 --- a/caption.ts +++ b/caption.ts @@ -2,11 +2,14 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * CaptionProps are the props for the [`caption`](https://developer.mozilla.org/docs/Web/HTML/Element/caption) element. + * CaptionElementProps are the props for the [`caption`](https://developer.mozilla.org/docs/Web/HTML/Element/caption) element. * @see */ -export interface CaptionProps extends GlobalAttributes { - /** @deprecated */ +export interface CaptionElementProps extends GlobalAttributes { + /** + * `align` is an attribute of the [`caption`](https://developer.mozilla.org/docs/Web/HTML/Element/caption) element. + * @deprecated + */ align?: string | undefined; } @@ -14,6 +17,9 @@ export interface CaptionProps extends GlobalAttributes { * caption renders the [`caption`](https://developer.mozilla.org/docs/Web/HTML/Element/caption) element. * @see */ -export function caption(props?: CaptionProps, ...children: string[]): string { +export function caption( + props?: CaptionElementProps, + ...children: string[] +): string { return renderElement("caption", props as AnyProps, false, children); } diff --git a/center.ts b/center.ts index 6fc7233..b71e548 100644 --- a/center.ts +++ b/center.ts @@ -1,13 +1,21 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * CenterElementProps are the props for the [`center`](https://developer.mozilla.org/docs/Web/HTML/Element/center) element. + * @see + * @deprecated + */ +export interface CenterElementProps extends GlobalAttributes { +} + /** * center renders the [`center`](https://developer.mozilla.org/docs/Web/HTML/Element/center) element. * @see * @deprecated */ export function center( - props?: GlobalAttributes, + props?: CenterElementProps, ...children: string[] ): string { return renderElement("center", props as AnyProps, false, children); diff --git a/cite.ts b/cite.ts index 21c2c0b..2dca88d 100644 --- a/cite.ts +++ b/cite.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * CiteElementProps are the props for the [`cite`](https://developer.mozilla.org/docs/Web/HTML/Element/cite) element. + * @see + */ +export interface CiteElementProps extends GlobalAttributes { +} + /** * cite renders the [`cite`](https://developer.mozilla.org/docs/Web/HTML/Element/cite) element. * @see */ -export function cite(props?: GlobalAttributes, ...children: string[]): string { +export function cite(props?: CiteElementProps, ...children: string[]): string { return renderElement("cite", props as AnyProps, false, children); } diff --git a/cli/codegen.ts b/cli/codegen.ts index e31189c..a57c278 100644 --- a/cli/codegen.ts +++ b/cli/codegen.ts @@ -136,33 +136,33 @@ if (import.meta.main) { }); // Add an interface for the props. - if (descriptor.attrs.length > 0) { - sourceFile.addInterface({ - name: descriptor.propsInterfaceName, - isExported: true, - extends: ["GlobalAttributes"], - docs: toDocs({ - description: - `${descriptor.propsInterfaceName} are the props for the [\`${descriptor.tag}\`](${descriptor.see}) element.`, - see: descriptor.see, - isDeprecated: descriptor.isDeprecated, - isExperimental: descriptor.isExperimental, - }), - properties: descriptor.attrs.map((attr) => { - return { - name: attr.includes("-") ? `'${attr}'` : attr, - hasQuestionToken: true, - type: "string | undefined", - docs: toDocs({ - isExperimental: bcd.html.elements[descriptor.tag][attr].__compat - ?.status?.experimental, - isDeprecated: bcd.html.elements[descriptor.tag][attr].__compat - ?.status?.deprecated, - }), - }; - }), - }); - } + sourceFile.addInterface({ + name: descriptor.propsInterfaceName, + isExported: true, + extends: ["GlobalAttributes"], + docs: toDocs({ + description: + `${descriptor.propsInterfaceName} are the props for the [\`${descriptor.tag}\`](${descriptor.see}) element.`, + see: descriptor.see, + isDeprecated: descriptor.isDeprecated, + isExperimental: descriptor.isExperimental, + }), + properties: descriptor.attrs.map((attr) => { + return { + name: attr.includes("-") ? `'${attr}'` : attr, + hasQuestionToken: true, + type: "string | undefined", + docs: toDocs({ + description: + `\`${attr}\` is an attribute of the [\`${descriptor.tag}\`](${descriptor.see}) element.`, + isExperimental: bcd.html.elements[descriptor.tag][attr].__compat + ?.status?.experimental, + isDeprecated: bcd.html.elements[descriptor.tag][attr].__compat + ?.status?.deprecated, + }), + }; + }), + }); // Add the element render function. sourceFile.addFunction({ @@ -260,9 +260,7 @@ export function getDescriptors(): Descriptor[] { descriptors.push({ tag, functionName: toFunctionName(tag), - propsInterfaceName: attrs.length === 0 - ? "GlobalAttributes" - : `${capitalize(tag)}Props`, + propsInterfaceName: `${capitalize(tag)}ElementProps`, isVoid: isVoid(tag), attrs, see: bcd.html.elements[tag].__compat?.mdn_url, diff --git a/code.ts b/code.ts index 8975a4a..9b3f236 100644 --- a/code.ts +++ b/code.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * CodeElementProps are the props for the [`code`](https://developer.mozilla.org/docs/Web/HTML/Element/code) element. + * @see + */ +export interface CodeElementProps extends GlobalAttributes { +} + /** * code renders the [`code`](https://developer.mozilla.org/docs/Web/HTML/Element/code) element. * @see */ -export function code(props?: GlobalAttributes, ...children: string[]): string { +export function code(props?: CodeElementProps, ...children: string[]): string { return renderElement("code", props as AnyProps, false, children); } diff --git a/col.ts b/col.ts index 18da36c..6e5a038 100644 --- a/col.ts +++ b/col.ts @@ -2,20 +2,36 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * ColProps are the props for the [`col`](https://developer.mozilla.org/docs/Web/HTML/Element/col) element. + * ColElementProps are the props for the [`col`](https://developer.mozilla.org/docs/Web/HTML/Element/col) element. * @see */ -export interface ColProps extends GlobalAttributes { - /** @deprecated */ +export interface ColElementProps extends GlobalAttributes { + /** + * `align` is an attribute of the [`col`](https://developer.mozilla.org/docs/Web/HTML/Element/col) element. + * @deprecated + */ align?: string | undefined; - /** @deprecated */ + /** + * `char` is an attribute of the [`col`](https://developer.mozilla.org/docs/Web/HTML/Element/col) element. + * @deprecated + */ char?: string | undefined; - /** @deprecated */ + /** + * `charoff` is an attribute of the [`col`](https://developer.mozilla.org/docs/Web/HTML/Element/col) element. + * @deprecated + */ charoff?: string | undefined; + /** `span` is an attribute of the [`col`](https://developer.mozilla.org/docs/Web/HTML/Element/col) element. */ span?: string | undefined; - /** @deprecated */ + /** + * `valign` is an attribute of the [`col`](https://developer.mozilla.org/docs/Web/HTML/Element/col) element. + * @deprecated + */ valign?: string | undefined; - /** @deprecated */ + /** + * `width` is an attribute of the [`col`](https://developer.mozilla.org/docs/Web/HTML/Element/col) element. + * @deprecated + */ width?: string | undefined; } @@ -23,6 +39,6 @@ export interface ColProps extends GlobalAttributes { * col renders the [`col`](https://developer.mozilla.org/docs/Web/HTML/Element/col) element. * @see */ -export function col(props?: ColProps): string { +export function col(props?: ColElementProps): string { return renderElement("col", props as AnyProps, true); } diff --git a/colgroup.ts b/colgroup.ts index 33c3f56..1c04f55 100644 --- a/colgroup.ts +++ b/colgroup.ts @@ -2,20 +2,36 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * ColgroupProps are the props for the [`colgroup`](https://developer.mozilla.org/docs/Web/HTML/Element/colgroup) element. + * ColgroupElementProps are the props for the [`colgroup`](https://developer.mozilla.org/docs/Web/HTML/Element/colgroup) element. * @see */ -export interface ColgroupProps extends GlobalAttributes { - /** @deprecated */ +export interface ColgroupElementProps extends GlobalAttributes { + /** + * `align` is an attribute of the [`colgroup`](https://developer.mozilla.org/docs/Web/HTML/Element/colgroup) element. + * @deprecated + */ align?: string | undefined; - /** @deprecated */ + /** + * `char` is an attribute of the [`colgroup`](https://developer.mozilla.org/docs/Web/HTML/Element/colgroup) element. + * @deprecated + */ char?: string | undefined; - /** @deprecated */ + /** + * `charoff` is an attribute of the [`colgroup`](https://developer.mozilla.org/docs/Web/HTML/Element/colgroup) element. + * @deprecated + */ charoff?: string | undefined; + /** `span` is an attribute of the [`colgroup`](https://developer.mozilla.org/docs/Web/HTML/Element/colgroup) element. */ span?: string | undefined; - /** @deprecated */ + /** + * `valign` is an attribute of the [`colgroup`](https://developer.mozilla.org/docs/Web/HTML/Element/colgroup) element. + * @deprecated + */ valign?: string | undefined; - /** @deprecated */ + /** + * `width` is an attribute of the [`colgroup`](https://developer.mozilla.org/docs/Web/HTML/Element/colgroup) element. + * @deprecated + */ width?: string | undefined; } @@ -23,6 +39,9 @@ export interface ColgroupProps extends GlobalAttributes { * colgroup renders the [`colgroup`](https://developer.mozilla.org/docs/Web/HTML/Element/colgroup) element. * @see */ -export function colgroup(props?: ColgroupProps, ...children: string[]): string { +export function colgroup( + props?: ColgroupElementProps, + ...children: string[] +): string { return renderElement("colgroup", props as AnyProps, false, children); } diff --git a/data.ts b/data.ts index 95e2843..f055478 100644 --- a/data.ts +++ b/data.ts @@ -2,10 +2,11 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * DataProps are the props for the [`data`](https://developer.mozilla.org/docs/Web/HTML/Element/data) element. + * DataElementProps are the props for the [`data`](https://developer.mozilla.org/docs/Web/HTML/Element/data) element. * @see */ -export interface DataProps extends GlobalAttributes { +export interface DataElementProps extends GlobalAttributes { + /** `value` is an attribute of the [`data`](https://developer.mozilla.org/docs/Web/HTML/Element/data) element. */ value?: string | undefined; } @@ -13,6 +14,6 @@ export interface DataProps extends GlobalAttributes { * data renders the [`data`](https://developer.mozilla.org/docs/Web/HTML/Element/data) element. * @see */ -export function data(props?: DataProps, ...children: string[]): string { +export function data(props?: DataElementProps, ...children: string[]): string { return renderElement("data", props as AnyProps, false, children); } diff --git a/datalist.ts b/datalist.ts index a00a709..3637195 100644 --- a/datalist.ts +++ b/datalist.ts @@ -1,12 +1,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * DatalistElementProps are the props for the [`datalist`](https://developer.mozilla.org/docs/Web/HTML/Element/datalist) element. + * @see + */ +export interface DatalistElementProps extends GlobalAttributes { +} + /** * datalist renders the [`datalist`](https://developer.mozilla.org/docs/Web/HTML/Element/datalist) element. * @see */ export function datalist( - props?: GlobalAttributes, + props?: DatalistElementProps, ...children: string[] ): string { return renderElement("datalist", props as AnyProps, false, children); diff --git a/dd.ts b/dd.ts index e133bb5..8501341 100644 --- a/dd.ts +++ b/dd.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * DdElementProps are the props for the [`dd`](https://developer.mozilla.org/docs/Web/HTML/Element/dd) element. + * @see + */ +export interface DdElementProps extends GlobalAttributes { +} + /** * dd renders the [`dd`](https://developer.mozilla.org/docs/Web/HTML/Element/dd) element. * @see */ -export function dd(props?: GlobalAttributes, ...children: string[]): string { +export function dd(props?: DdElementProps, ...children: string[]): string { return renderElement("dd", props as AnyProps, false, children); } diff --git a/del.ts b/del.ts index 4a33162..69e615a 100644 --- a/del.ts +++ b/del.ts @@ -2,11 +2,13 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * DelProps are the props for the [`del`](https://developer.mozilla.org/docs/Web/HTML/Element/del) element. + * DelElementProps are the props for the [`del`](https://developer.mozilla.org/docs/Web/HTML/Element/del) element. * @see */ -export interface DelProps extends GlobalAttributes { +export interface DelElementProps extends GlobalAttributes { + /** `cite` is an attribute of the [`del`](https://developer.mozilla.org/docs/Web/HTML/Element/del) element. */ cite?: string | undefined; + /** `datetime` is an attribute of the [`del`](https://developer.mozilla.org/docs/Web/HTML/Element/del) element. */ datetime?: string | undefined; } @@ -14,6 +16,6 @@ export interface DelProps extends GlobalAttributes { * del renders the [`del`](https://developer.mozilla.org/docs/Web/HTML/Element/del) element. * @see */ -export function del(props?: DelProps, ...children: string[]): string { +export function del(props?: DelElementProps, ...children: string[]): string { return renderElement("del", props as AnyProps, false, children); } diff --git a/details.ts b/details.ts index 1c889f4..6f3ae3e 100644 --- a/details.ts +++ b/details.ts @@ -2,11 +2,13 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * DetailsProps are the props for the [`details`](https://developer.mozilla.org/docs/Web/HTML/Element/details) element. + * DetailsElementProps are the props for the [`details`](https://developer.mozilla.org/docs/Web/HTML/Element/details) element. * @see */ -export interface DetailsProps extends GlobalAttributes { +export interface DetailsElementProps extends GlobalAttributes { + /** `name` is an attribute of the [`details`](https://developer.mozilla.org/docs/Web/HTML/Element/details) element. */ name?: string | undefined; + /** `open` is an attribute of the [`details`](https://developer.mozilla.org/docs/Web/HTML/Element/details) element. */ open?: string | undefined; } @@ -14,6 +16,9 @@ export interface DetailsProps extends GlobalAttributes { * details renders the [`details`](https://developer.mozilla.org/docs/Web/HTML/Element/details) element. * @see */ -export function details(props?: DetailsProps, ...children: string[]): string { +export function details( + props?: DetailsElementProps, + ...children: string[] +): string { return renderElement("details", props as AnyProps, false, children); } diff --git a/dfn.ts b/dfn.ts index d416f78..47fcba2 100644 --- a/dfn.ts +++ b/dfn.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * DfnElementProps are the props for the [`dfn`](https://developer.mozilla.org/docs/Web/HTML/Element/dfn) element. + * @see + */ +export interface DfnElementProps extends GlobalAttributes { +} + /** * dfn renders the [`dfn`](https://developer.mozilla.org/docs/Web/HTML/Element/dfn) element. * @see */ -export function dfn(props?: GlobalAttributes, ...children: string[]): string { +export function dfn(props?: DfnElementProps, ...children: string[]): string { return renderElement("dfn", props as AnyProps, false, children); } diff --git a/dialog.ts b/dialog.ts index 3ec55ad..85d45c3 100644 --- a/dialog.ts +++ b/dialog.ts @@ -2,10 +2,11 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * DialogProps are the props for the [`dialog`](https://developer.mozilla.org/docs/Web/HTML/Element/dialog) element. + * DialogElementProps are the props for the [`dialog`](https://developer.mozilla.org/docs/Web/HTML/Element/dialog) element. * @see */ -export interface DialogProps extends GlobalAttributes { +export interface DialogElementProps extends GlobalAttributes { + /** `open` is an attribute of the [`dialog`](https://developer.mozilla.org/docs/Web/HTML/Element/dialog) element. */ open?: string | undefined; } @@ -13,6 +14,9 @@ export interface DialogProps extends GlobalAttributes { * dialog renders the [`dialog`](https://developer.mozilla.org/docs/Web/HTML/Element/dialog) element. * @see */ -export function dialog(props?: DialogProps, ...children: string[]): string { +export function dialog( + props?: DialogElementProps, + ...children: string[] +): string { return renderElement("dialog", props as AnyProps, false, children); } diff --git a/dir.ts b/dir.ts index 1e696e9..cc5280e 100644 --- a/dir.ts +++ b/dir.ts @@ -2,12 +2,15 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * DirProps are the props for the [`dir`](https://developer.mozilla.org/docs/Web/HTML/Element/dir) element. + * DirElementProps are the props for the [`dir`](https://developer.mozilla.org/docs/Web/HTML/Element/dir) element. * @see * @deprecated */ -export interface DirProps extends GlobalAttributes { - /** @deprecated */ +export interface DirElementProps extends GlobalAttributes { + /** + * `compact` is an attribute of the [`dir`](https://developer.mozilla.org/docs/Web/HTML/Element/dir) element. + * @deprecated + */ compact?: string | undefined; } @@ -16,6 +19,6 @@ export interface DirProps extends GlobalAttributes { * @see * @deprecated */ -export function dir(props?: DirProps, ...children: string[]): string { +export function dir(props?: DirElementProps, ...children: string[]): string { return renderElement("dir", props as AnyProps, false, children); } diff --git a/div.ts b/div.ts index 88ac066..5223ef5 100644 --- a/div.ts +++ b/div.ts @@ -2,11 +2,14 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * DivProps are the props for the [`div`](https://developer.mozilla.org/docs/Web/HTML/Element/div) element. + * DivElementProps are the props for the [`div`](https://developer.mozilla.org/docs/Web/HTML/Element/div) element. * @see */ -export interface DivProps extends GlobalAttributes { - /** @deprecated */ +export interface DivElementProps extends GlobalAttributes { + /** + * `align` is an attribute of the [`div`](https://developer.mozilla.org/docs/Web/HTML/Element/div) element. + * @deprecated + */ align?: string | undefined; } @@ -14,6 +17,6 @@ export interface DivProps extends GlobalAttributes { * div renders the [`div`](https://developer.mozilla.org/docs/Web/HTML/Element/div) element. * @see */ -export function div(props?: DivProps, ...children: string[]): string { +export function div(props?: DivElementProps, ...children: string[]): string { return renderElement("div", props as AnyProps, false, children); } diff --git a/dl.ts b/dl.ts index cae1409..fd10d76 100644 --- a/dl.ts +++ b/dl.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * DlElementProps are the props for the [`dl`](https://developer.mozilla.org/docs/Web/HTML/Element/dl) element. + * @see + */ +export interface DlElementProps extends GlobalAttributes { +} + /** * dl renders the [`dl`](https://developer.mozilla.org/docs/Web/HTML/Element/dl) element. * @see */ -export function dl(props?: GlobalAttributes, ...children: string[]): string { +export function dl(props?: DlElementProps, ...children: string[]): string { return renderElement("dl", props as AnyProps, false, children); } diff --git a/dt.ts b/dt.ts index 9fc5286..72b285f 100644 --- a/dt.ts +++ b/dt.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * DtElementProps are the props for the [`dt`](https://developer.mozilla.org/docs/Web/HTML/Element/dt) element. + * @see + */ +export interface DtElementProps extends GlobalAttributes { +} + /** * dt renders the [`dt`](https://developer.mozilla.org/docs/Web/HTML/Element/dt) element. * @see */ -export function dt(props?: GlobalAttributes, ...children: string[]): string { +export function dt(props?: DtElementProps, ...children: string[]): string { return renderElement("dt", props as AnyProps, false, children); } diff --git a/em.ts b/em.ts index 335709e..8dd26b7 100644 --- a/em.ts +++ b/em.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * EmElementProps are the props for the [`em`](https://developer.mozilla.org/docs/Web/HTML/Element/em) element. + * @see + */ +export interface EmElementProps extends GlobalAttributes { +} + /** * em renders the [`em`](https://developer.mozilla.org/docs/Web/HTML/Element/em) element. * @see */ -export function em(props?: GlobalAttributes, ...children: string[]): string { +export function em(props?: EmElementProps, ...children: string[]): string { return renderElement("em", props as AnyProps, false, children); } diff --git a/embed.ts b/embed.ts index 7096db3..216d856 100644 --- a/embed.ts +++ b/embed.ts @@ -2,17 +2,27 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * EmbedProps are the props for the [`embed`](https://developer.mozilla.org/docs/Web/HTML/Element/embed) element. + * EmbedElementProps are the props for the [`embed`](https://developer.mozilla.org/docs/Web/HTML/Element/embed) element. * @see */ -export interface EmbedProps extends GlobalAttributes { - /** @deprecated */ +export interface EmbedElementProps extends GlobalAttributes { + /** + * `align` is an attribute of the [`embed`](https://developer.mozilla.org/docs/Web/HTML/Element/embed) element. + * @deprecated + */ align?: string | undefined; + /** `height` is an attribute of the [`embed`](https://developer.mozilla.org/docs/Web/HTML/Element/embed) element. */ height?: string | undefined; - /** @deprecated */ + /** + * `name` is an attribute of the [`embed`](https://developer.mozilla.org/docs/Web/HTML/Element/embed) element. + * @deprecated + */ name?: string | undefined; + /** `src` is an attribute of the [`embed`](https://developer.mozilla.org/docs/Web/HTML/Element/embed) element. */ src?: string | undefined; + /** `type` is an attribute of the [`embed`](https://developer.mozilla.org/docs/Web/HTML/Element/embed) element. */ type?: string | undefined; + /** `width` is an attribute of the [`embed`](https://developer.mozilla.org/docs/Web/HTML/Element/embed) element. */ width?: string | undefined; } @@ -20,6 +30,6 @@ export interface EmbedProps extends GlobalAttributes { * embed renders the [`embed`](https://developer.mozilla.org/docs/Web/HTML/Element/embed) element. * @see */ -export function embed(props?: EmbedProps): string { +export function embed(props?: EmbedElementProps): string { return renderElement("embed", props as AnyProps, true); } diff --git a/fencedframe.ts b/fencedframe.ts index 6b1302b..9904f80 100644 --- a/fencedframe.ts +++ b/fencedframe.ts @@ -1,13 +1,21 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * FencedframeElementProps are the props for the [`fencedframe`](https://developer.mozilla.org/docs/Web/HTML/Element/fencedframe) element. + * @see + * @experimental + */ +export interface FencedframeElementProps extends GlobalAttributes { +} + /** * fencedframe renders the [`fencedframe`](https://developer.mozilla.org/docs/Web/HTML/Element/fencedframe) element. * @see * @experimental */ export function fencedframe( - props?: GlobalAttributes, + props?: FencedframeElementProps, ...children: string[] ): string { return renderElement("fencedframe", props as AnyProps, false, children); diff --git a/fieldset.ts b/fieldset.ts index 6f9d65e..65fd85f 100644 --- a/fieldset.ts +++ b/fieldset.ts @@ -2,12 +2,15 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * FieldsetProps are the props for the [`fieldset`](https://developer.mozilla.org/docs/Web/HTML/Element/fieldset) element. + * FieldsetElementProps are the props for the [`fieldset`](https://developer.mozilla.org/docs/Web/HTML/Element/fieldset) element. * @see */ -export interface FieldsetProps extends GlobalAttributes { +export interface FieldsetElementProps extends GlobalAttributes { + /** `disabled` is an attribute of the [`fieldset`](https://developer.mozilla.org/docs/Web/HTML/Element/fieldset) element. */ disabled?: string | undefined; + /** `form` is an attribute of the [`fieldset`](https://developer.mozilla.org/docs/Web/HTML/Element/fieldset) element. */ form?: string | undefined; + /** `name` is an attribute of the [`fieldset`](https://developer.mozilla.org/docs/Web/HTML/Element/fieldset) element. */ name?: string | undefined; } @@ -15,6 +18,9 @@ export interface FieldsetProps extends GlobalAttributes { * fieldset renders the [`fieldset`](https://developer.mozilla.org/docs/Web/HTML/Element/fieldset) element. * @see */ -export function fieldset(props?: FieldsetProps, ...children: string[]): string { +export function fieldset( + props?: FieldsetElementProps, + ...children: string[] +): string { return renderElement("fieldset", props as AnyProps, false, children); } diff --git a/figcaption.ts b/figcaption.ts index eadb69a..c836193 100644 --- a/figcaption.ts +++ b/figcaption.ts @@ -1,12 +1,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * FigcaptionElementProps are the props for the [`figcaption`](https://developer.mozilla.org/docs/Web/HTML/Element/figcaption) element. + * @see + */ +export interface FigcaptionElementProps extends GlobalAttributes { +} + /** * figcaption renders the [`figcaption`](https://developer.mozilla.org/docs/Web/HTML/Element/figcaption) element. * @see */ export function figcaption( - props?: GlobalAttributes, + props?: FigcaptionElementProps, ...children: string[] ): string { return renderElement("figcaption", props as AnyProps, false, children); diff --git a/figure.ts b/figure.ts index 060d1c1..fe4a253 100644 --- a/figure.ts +++ b/figure.ts @@ -1,12 +1,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * FigureElementProps are the props for the [`figure`](https://developer.mozilla.org/docs/Web/HTML/Element/figure) element. + * @see + */ +export interface FigureElementProps extends GlobalAttributes { +} + /** * figure renders the [`figure`](https://developer.mozilla.org/docs/Web/HTML/Element/figure) element. * @see */ export function figure( - props?: GlobalAttributes, + props?: FigureElementProps, ...children: string[] ): string { return renderElement("figure", props as AnyProps, false, children); diff --git a/font.ts b/font.ts index 3f44cfd..743624f 100644 --- a/font.ts +++ b/font.ts @@ -2,16 +2,25 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * FontProps are the props for the [`font`](https://developer.mozilla.org/docs/Web/HTML/Element/font) element. + * FontElementProps are the props for the [`font`](https://developer.mozilla.org/docs/Web/HTML/Element/font) element. * @see * @deprecated */ -export interface FontProps extends GlobalAttributes { - /** @deprecated */ +export interface FontElementProps extends GlobalAttributes { + /** + * `color` is an attribute of the [`font`](https://developer.mozilla.org/docs/Web/HTML/Element/font) element. + * @deprecated + */ color?: string | undefined; - /** @deprecated */ + /** + * `face` is an attribute of the [`font`](https://developer.mozilla.org/docs/Web/HTML/Element/font) element. + * @deprecated + */ face?: string | undefined; - /** @deprecated */ + /** + * `size` is an attribute of the [`font`](https://developer.mozilla.org/docs/Web/HTML/Element/font) element. + * @deprecated + */ size?: string | undefined; } @@ -20,6 +29,6 @@ export interface FontProps extends GlobalAttributes { * @see * @deprecated */ -export function font(props?: FontProps, ...children: string[]): string { +export function font(props?: FontElementProps, ...children: string[]): string { return renderElement("font", props as AnyProps, false, children); } diff --git a/footer.ts b/footer.ts index 0c6d87d..2244f25 100644 --- a/footer.ts +++ b/footer.ts @@ -1,12 +1,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * FooterElementProps are the props for the [`footer`](https://developer.mozilla.org/docs/Web/HTML/Element/footer) element. + * @see + */ +export interface FooterElementProps extends GlobalAttributes { +} + /** * footer renders the [`footer`](https://developer.mozilla.org/docs/Web/HTML/Element/footer) element. * @see */ export function footer( - props?: GlobalAttributes, + props?: FooterElementProps, ...children: string[] ): string { return renderElement("footer", props as AnyProps, false, children); diff --git a/form.ts b/form.ts index c3a8700..4b5ad97 100644 --- a/form.ts +++ b/form.ts @@ -2,18 +2,27 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * FormProps are the props for the [`form`](https://developer.mozilla.org/docs/Web/HTML/Element/form) element. + * FormElementProps are the props for the [`form`](https://developer.mozilla.org/docs/Web/HTML/Element/form) element. * @see */ -export interface FormProps extends GlobalAttributes { +export interface FormElementProps extends GlobalAttributes { + /** `accept-charset` is an attribute of the [`form`](https://developer.mozilla.org/docs/Web/HTML/Element/form) element. */ "accept-charset"?: string | undefined; + /** `action` is an attribute of the [`form`](https://developer.mozilla.org/docs/Web/HTML/Element/form) element. */ action?: string | undefined; + /** `autocomplete` is an attribute of the [`form`](https://developer.mozilla.org/docs/Web/HTML/Element/form) element. */ autocomplete?: string | undefined; + /** `enctype` is an attribute of the [`form`](https://developer.mozilla.org/docs/Web/HTML/Element/form) element. */ enctype?: string | undefined; + /** `method` is an attribute of the [`form`](https://developer.mozilla.org/docs/Web/HTML/Element/form) element. */ method?: string | undefined; + /** `name` is an attribute of the [`form`](https://developer.mozilla.org/docs/Web/HTML/Element/form) element. */ name?: string | undefined; + /** `novalidate` is an attribute of the [`form`](https://developer.mozilla.org/docs/Web/HTML/Element/form) element. */ novalidate?: string | undefined; + /** `rel` is an attribute of the [`form`](https://developer.mozilla.org/docs/Web/HTML/Element/form) element. */ rel?: string | undefined; + /** `target` is an attribute of the [`form`](https://developer.mozilla.org/docs/Web/HTML/Element/form) element. */ target?: string | undefined; } @@ -21,6 +30,6 @@ export interface FormProps extends GlobalAttributes { * form renders the [`form`](https://developer.mozilla.org/docs/Web/HTML/Element/form) element. * @see */ -export function form(props?: FormProps, ...children: string[]): string { +export function form(props?: FormElementProps, ...children: string[]): string { return renderElement("form", props as AnyProps, false, children); } diff --git a/frame.ts b/frame.ts index 28793ff..b116986 100644 --- a/frame.ts +++ b/frame.ts @@ -2,24 +2,45 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * FrameProps are the props for the [`frame`](https://developer.mozilla.org/docs/Web/HTML/Element/frame) element. + * FrameElementProps are the props for the [`frame`](https://developer.mozilla.org/docs/Web/HTML/Element/frame) element. * @see * @deprecated */ -export interface FrameProps extends GlobalAttributes { - /** @deprecated */ +export interface FrameElementProps extends GlobalAttributes { + /** + * `frameborder` is an attribute of the [`frame`](https://developer.mozilla.org/docs/Web/HTML/Element/frame) element. + * @deprecated + */ frameborder?: string | undefined; - /** @deprecated */ + /** + * `marginheight` is an attribute of the [`frame`](https://developer.mozilla.org/docs/Web/HTML/Element/frame) element. + * @deprecated + */ marginheight?: string | undefined; - /** @deprecated */ + /** + * `marginwidth` is an attribute of the [`frame`](https://developer.mozilla.org/docs/Web/HTML/Element/frame) element. + * @deprecated + */ marginwidth?: string | undefined; - /** @deprecated */ + /** + * `name` is an attribute of the [`frame`](https://developer.mozilla.org/docs/Web/HTML/Element/frame) element. + * @deprecated + */ name?: string | undefined; - /** @deprecated */ + /** + * `noresize` is an attribute of the [`frame`](https://developer.mozilla.org/docs/Web/HTML/Element/frame) element. + * @deprecated + */ noresize?: string | undefined; - /** @deprecated */ + /** + * `scrolling` is an attribute of the [`frame`](https://developer.mozilla.org/docs/Web/HTML/Element/frame) element. + * @deprecated + */ scrolling?: string | undefined; - /** @deprecated */ + /** + * `src` is an attribute of the [`frame`](https://developer.mozilla.org/docs/Web/HTML/Element/frame) element. + * @deprecated + */ src?: string | undefined; } @@ -28,6 +49,9 @@ export interface FrameProps extends GlobalAttributes { * @see * @deprecated */ -export function frame(props?: FrameProps, ...children: string[]): string { +export function frame( + props?: FrameElementProps, + ...children: string[] +): string { return renderElement("frame", props as AnyProps, false, children); } diff --git a/frameset.ts b/frameset.ts index 7e3cd8c..71ac484 100644 --- a/frameset.ts +++ b/frameset.ts @@ -2,14 +2,20 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * FramesetProps are the props for the [`frameset`](https://developer.mozilla.org/docs/Web/HTML/Element/frameset) element. + * FramesetElementProps are the props for the [`frameset`](https://developer.mozilla.org/docs/Web/HTML/Element/frameset) element. * @see * @deprecated */ -export interface FramesetProps extends GlobalAttributes { - /** @deprecated */ +export interface FramesetElementProps extends GlobalAttributes { + /** + * `cols` is an attribute of the [`frameset`](https://developer.mozilla.org/docs/Web/HTML/Element/frameset) element. + * @deprecated + */ cols?: string | undefined; - /** @deprecated */ + /** + * `rows` is an attribute of the [`frameset`](https://developer.mozilla.org/docs/Web/HTML/Element/frameset) element. + * @deprecated + */ rows?: string | undefined; } @@ -18,6 +24,9 @@ export interface FramesetProps extends GlobalAttributes { * @see * @deprecated */ -export function frameset(props?: FramesetProps, ...children: string[]): string { +export function frameset( + props?: FramesetElementProps, + ...children: string[] +): string { return renderElement("frameset", props as AnyProps, false, children); } diff --git a/h1.ts b/h1.ts index 1b2a4fa..8f173ca 100644 --- a/h1.ts +++ b/h1.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * H1ElementProps are the props for the [`h1`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element. + * @see + */ +export interface H1ElementProps extends GlobalAttributes { +} + /** * h1 renders the [`h1`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element. * @see */ -export function h1(props?: GlobalAttributes, ...children: string[]): string { +export function h1(props?: H1ElementProps, ...children: string[]): string { return renderElement("h1", props as AnyProps, false, children); } diff --git a/h2.ts b/h2.ts index 7c53f2e..918ff7c 100644 --- a/h2.ts +++ b/h2.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * H2ElementProps are the props for the [`h2`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element. + * @see + */ +export interface H2ElementProps extends GlobalAttributes { +} + /** * h2 renders the [`h2`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element. * @see */ -export function h2(props?: GlobalAttributes, ...children: string[]): string { +export function h2(props?: H2ElementProps, ...children: string[]): string { return renderElement("h2", props as AnyProps, false, children); } diff --git a/h3.ts b/h3.ts index 0398aa5..2915782 100644 --- a/h3.ts +++ b/h3.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * H3ElementProps are the props for the [`h3`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element. + * @see + */ +export interface H3ElementProps extends GlobalAttributes { +} + /** * h3 renders the [`h3`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element. * @see */ -export function h3(props?: GlobalAttributes, ...children: string[]): string { +export function h3(props?: H3ElementProps, ...children: string[]): string { return renderElement("h3", props as AnyProps, false, children); } diff --git a/h4.ts b/h4.ts index b8e390c..196e766 100644 --- a/h4.ts +++ b/h4.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * H4ElementProps are the props for the [`h4`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element. + * @see + */ +export interface H4ElementProps extends GlobalAttributes { +} + /** * h4 renders the [`h4`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element. * @see */ -export function h4(props?: GlobalAttributes, ...children: string[]): string { +export function h4(props?: H4ElementProps, ...children: string[]): string { return renderElement("h4", props as AnyProps, false, children); } diff --git a/h5.ts b/h5.ts index 60a4976..f99c25a 100644 --- a/h5.ts +++ b/h5.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * H5ElementProps are the props for the [`h5`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element. + * @see + */ +export interface H5ElementProps extends GlobalAttributes { +} + /** * h5 renders the [`h5`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element. * @see */ -export function h5(props?: GlobalAttributes, ...children: string[]): string { +export function h5(props?: H5ElementProps, ...children: string[]): string { return renderElement("h5", props as AnyProps, false, children); } diff --git a/h6.ts b/h6.ts index 751a587..ea54103 100644 --- a/h6.ts +++ b/h6.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * H6ElementProps are the props for the [`h6`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element. + * @see + */ +export interface H6ElementProps extends GlobalAttributes { +} + /** * h6 renders the [`h6`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element. * @see */ -export function h6(props?: GlobalAttributes, ...children: string[]): string { +export function h6(props?: H6ElementProps, ...children: string[]): string { return renderElement("h6", props as AnyProps, false, children); } diff --git a/head.ts b/head.ts index d609f96..93d050f 100644 --- a/head.ts +++ b/head.ts @@ -2,11 +2,14 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * HeadProps are the props for the [`head`](https://developer.mozilla.org/docs/Web/HTML/Element/head) element. + * HeadElementProps are the props for the [`head`](https://developer.mozilla.org/docs/Web/HTML/Element/head) element. * @see */ -export interface HeadProps extends GlobalAttributes { - /** @deprecated */ +export interface HeadElementProps extends GlobalAttributes { + /** + * `profile` is an attribute of the [`head`](https://developer.mozilla.org/docs/Web/HTML/Element/head) element. + * @deprecated + */ profile?: string | undefined; } @@ -14,6 +17,6 @@ export interface HeadProps extends GlobalAttributes { * head renders the [`head`](https://developer.mozilla.org/docs/Web/HTML/Element/head) element. * @see */ -export function head(props?: HeadProps, ...children: string[]): string { +export function head(props?: HeadElementProps, ...children: string[]): string { return renderElement("head", props as AnyProps, false, children); } diff --git a/header.ts b/header.ts index 4a9a107..f13b13c 100644 --- a/header.ts +++ b/header.ts @@ -1,12 +1,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * HeaderElementProps are the props for the [`header`](https://developer.mozilla.org/docs/Web/HTML/Element/header) element. + * @see + */ +export interface HeaderElementProps extends GlobalAttributes { +} + /** * header renders the [`header`](https://developer.mozilla.org/docs/Web/HTML/Element/header) element. * @see */ export function header( - props?: GlobalAttributes, + props?: HeaderElementProps, ...children: string[] ): string { return renderElement("header", props as AnyProps, false, children); diff --git a/hgroup.ts b/hgroup.ts index f90a35c..559cd5d 100644 --- a/hgroup.ts +++ b/hgroup.ts @@ -1,12 +1,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * HgroupElementProps are the props for the [`hgroup`](https://developer.mozilla.org/docs/Web/HTML/Element/hgroup) element. + * @see + */ +export interface HgroupElementProps extends GlobalAttributes { +} + /** * hgroup renders the [`hgroup`](https://developer.mozilla.org/docs/Web/HTML/Element/hgroup) element. * @see */ export function hgroup( - props?: GlobalAttributes, + props?: HgroupElementProps, ...children: string[] ): string { return renderElement("hgroup", props as AnyProps, false, children); diff --git a/hr.ts b/hr.ts index 77a4a95..cf29823 100644 --- a/hr.ts +++ b/hr.ts @@ -2,19 +2,34 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * HrProps are the props for the [`hr`](https://developer.mozilla.org/docs/Web/HTML/Element/hr) element. + * HrElementProps are the props for the [`hr`](https://developer.mozilla.org/docs/Web/HTML/Element/hr) element. * @see */ -export interface HrProps extends GlobalAttributes { - /** @deprecated */ +export interface HrElementProps extends GlobalAttributes { + /** + * `align` is an attribute of the [`hr`](https://developer.mozilla.org/docs/Web/HTML/Element/hr) element. + * @deprecated + */ align?: string | undefined; - /** @deprecated */ + /** + * `color` is an attribute of the [`hr`](https://developer.mozilla.org/docs/Web/HTML/Element/hr) element. + * @deprecated + */ color?: string | undefined; - /** @deprecated */ + /** + * `noshade` is an attribute of the [`hr`](https://developer.mozilla.org/docs/Web/HTML/Element/hr) element. + * @deprecated + */ noshade?: string | undefined; - /** @deprecated */ + /** + * `size` is an attribute of the [`hr`](https://developer.mozilla.org/docs/Web/HTML/Element/hr) element. + * @deprecated + */ size?: string | undefined; - /** @deprecated */ + /** + * `width` is an attribute of the [`hr`](https://developer.mozilla.org/docs/Web/HTML/Element/hr) element. + * @deprecated + */ width?: string | undefined; } @@ -22,6 +37,6 @@ export interface HrProps extends GlobalAttributes { * hr renders the [`hr`](https://developer.mozilla.org/docs/Web/HTML/Element/hr) element. * @see */ -export function hr(props?: HrProps): string { +export function hr(props?: HrElementProps): string { return renderElement("hr", props as AnyProps, true); } diff --git a/html.ts b/html.ts index ab43213..a618f04 100644 --- a/html.ts +++ b/html.ts @@ -2,14 +2,21 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * HtmlProps are the props for the [`html`](https://developer.mozilla.org/docs/Web/HTML/Element/html) element. + * HtmlElementProps are the props for the [`html`](https://developer.mozilla.org/docs/Web/HTML/Element/html) element. * @see */ -export interface HtmlProps extends GlobalAttributes { - /** @deprecated */ +export interface HtmlElementProps extends GlobalAttributes { + /** + * `manifest` is an attribute of the [`html`](https://developer.mozilla.org/docs/Web/HTML/Element/html) element. + * @deprecated + */ manifest?: string | undefined; - /** @deprecated */ + /** + * `version` is an attribute of the [`html`](https://developer.mozilla.org/docs/Web/HTML/Element/html) element. + * @deprecated + */ version?: string | undefined; + /** `xmlns` is an attribute of the [`html`](https://developer.mozilla.org/docs/Web/HTML/Element/html) element. */ xmlns?: string | undefined; } @@ -17,6 +24,6 @@ export interface HtmlProps extends GlobalAttributes { * html renders the [`html`](https://developer.mozilla.org/docs/Web/HTML/Element/html) element. * @see */ -export function html(props?: HtmlProps, ...children: string[]): string { +export function html(props?: HtmlElementProps, ...children: string[]): string { return renderElement("html", props as AnyProps, false, children); } diff --git a/i.ts b/i.ts index ab50930..cfa2882 100644 --- a/i.ts +++ b/i.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * IElementProps are the props for the [`i`](https://developer.mozilla.org/docs/Web/HTML/Element/i) element. + * @see + */ +export interface IElementProps extends GlobalAttributes { +} + /** * i renders the [`i`](https://developer.mozilla.org/docs/Web/HTML/Element/i) element. * @see */ -export function i(props?: GlobalAttributes, ...children: string[]): string { +export function i(props?: IElementProps, ...children: string[]): string { return renderElement("i", props as AnyProps, false, children); } diff --git a/iframe.ts b/iframe.ts index a5bac07..671ff91 100644 --- a/iframe.ts +++ b/iframe.ts @@ -2,39 +2,79 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * IframeProps are the props for the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. + * IframeElementProps are the props for the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. * @see */ -export interface IframeProps extends GlobalAttributes { - /** @deprecated */ +export interface IframeElementProps extends GlobalAttributes { + /** + * `align` is an attribute of the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. + * @deprecated + */ align?: string | undefined; + /** `allow` is an attribute of the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. */ allow?: string | undefined; + /** `allowfullscreen` is an attribute of the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. */ allowfullscreen?: string | undefined; - /** @deprecated */ + /** + * `allowpaymentrequest` is an attribute of the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. + * @deprecated + */ allowpaymentrequest?: string | undefined; - /** @experimental */ + /** + * `browsingtopics` is an attribute of the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. + * @experimental + */ browsingtopics?: string | undefined; - /** @experimental */ + /** + * `credentialless` is an attribute of the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. + * @experimental + */ credentialless?: string | undefined; - /** @experimental */ + /** + * `csp` is an attribute of the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. + * @experimental + */ csp?: string | undefined; - /** @deprecated */ + /** + * `frameborder` is an attribute of the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. + * @deprecated + */ frameborder?: string | undefined; + /** `height` is an attribute of the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. */ height?: string | undefined; + /** `loading` is an attribute of the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. */ loading?: string | undefined; - /** @deprecated */ + /** + * `longdesc` is an attribute of the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. + * @deprecated + */ longdesc?: string | undefined; - /** @deprecated */ + /** + * `marginheight` is an attribute of the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. + * @deprecated + */ marginheight?: string | undefined; - /** @deprecated */ + /** + * `marginwidth` is an attribute of the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. + * @deprecated + */ marginwidth?: string | undefined; + /** `name` is an attribute of the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. */ name?: string | undefined; + /** `referrerpolicy` is an attribute of the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. */ referrerpolicy?: string | undefined; + /** `sandbox` is an attribute of the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. */ sandbox?: string | undefined; - /** @deprecated */ + /** + * `scrolling` is an attribute of the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. + * @deprecated + */ scrolling?: string | undefined; + /** `src` is an attribute of the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. */ src?: string | undefined; + /** `srcdoc` is an attribute of the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. */ srcdoc?: string | undefined; + /** `width` is an attribute of the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. */ width?: string | undefined; } @@ -42,6 +82,9 @@ export interface IframeProps extends GlobalAttributes { * iframe renders the [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) element. * @see */ -export function iframe(props?: IframeProps, ...children: string[]): string { +export function iframe( + props?: IframeElementProps, + ...children: string[] +): string { return renderElement("iframe", props as AnyProps, false, children); } diff --git a/img.ts b/img.ts index fcc8bbe..5aa6a73 100644 --- a/img.ts +++ b/img.ts @@ -2,36 +2,70 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * ImgProps are the props for the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. + * ImgElementProps are the props for the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. * @see */ -export interface ImgProps extends GlobalAttributes { - /** @deprecated */ +export interface ImgElementProps extends GlobalAttributes { + /** + * `align` is an attribute of the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. + * @deprecated + */ align?: string | undefined; + /** `alt` is an attribute of the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. */ alt?: string | undefined; - /** @experimental */ + /** + * `attributionsrc` is an attribute of the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. + * @experimental + */ attributionsrc?: string | undefined; - /** @deprecated */ + /** + * `border` is an attribute of the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. + * @deprecated + */ border?: string | undefined; + /** `crossorigin` is an attribute of the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. */ crossorigin?: string | undefined; + /** `decoding` is an attribute of the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. */ decoding?: string | undefined; + /** `fetchpriority` is an attribute of the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. */ fetchpriority?: string | undefined; + /** `height` is an attribute of the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. */ height?: string | undefined; - /** @deprecated */ + /** + * `hspace` is an attribute of the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. + * @deprecated + */ hspace?: string | undefined; + /** `ismap` is an attribute of the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. */ ismap?: string | undefined; + /** `loading` is an attribute of the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. */ loading?: string | undefined; - /** @deprecated */ + /** + * `longdesc` is an attribute of the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. + * @deprecated + */ longdesc?: string | undefined; - /** @deprecated */ + /** + * `name` is an attribute of the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. + * @deprecated + */ name?: string | undefined; + /** `referrerpolicy` is an attribute of the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. */ referrerpolicy?: string | undefined; + /** `sizes` is an attribute of the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. */ sizes?: string | undefined; + /** `src` is an attribute of the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. */ src?: string | undefined; + /** `srcset` is an attribute of the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. */ srcset?: string | undefined; + /** `usemap` is an attribute of the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. */ usemap?: string | undefined; - /** @deprecated */ + /** + * `vspace` is an attribute of the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. + * @deprecated + */ vspace?: string | undefined; + /** `width` is an attribute of the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. */ width?: string | undefined; } @@ -39,6 +73,6 @@ export interface ImgProps extends GlobalAttributes { * img renders the [`img`](https://developer.mozilla.org/docs/Web/HTML/Element/img) element. * @see */ -export function img(props?: ImgProps): string { +export function img(props?: ImgElementProps): string { return renderElement("img", props as AnyProps, true); } diff --git a/input.ts b/input.ts index fb39c7b..ea372e8 100644 --- a/input.ts +++ b/input.ts @@ -2,43 +2,81 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * InputProps are the props for the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. + * InputElementProps are the props for the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. * @see */ -export interface InputProps extends GlobalAttributes { +export interface InputElementProps extends GlobalAttributes { + /** `accept` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ accept?: string | undefined; - /** @deprecated */ + /** + * `align` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. + * @deprecated + */ align?: string | undefined; + /** `alt` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ alt?: string | undefined; + /** `capture` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ capture?: string | undefined; + /** `checked` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ checked?: string | undefined; + /** `dirname` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ dirname?: string | undefined; + /** `disabled` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ disabled?: string | undefined; + /** `form` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ form?: string | undefined; + /** `formaction` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ formaction?: string | undefined; + /** `formenctype` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ formenctype?: string | undefined; + /** `formmethod` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ formmethod?: string | undefined; + /** `formnovalidate` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ formnovalidate?: string | undefined; + /** `formtarget` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ formtarget?: string | undefined; + /** `list` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ list?: string | undefined; + /** `max` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ max?: string | undefined; + /** `maxlength` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ maxlength?: string | undefined; + /** `min` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ min?: string | undefined; + /** `minlength` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ minlength?: string | undefined; - /** @deprecated */ + /** + * `mozactionhint` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. + * @deprecated + */ mozactionhint?: string | undefined; + /** `multiple` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ multiple?: string | undefined; + /** `name` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ name?: string | undefined; + /** `pattern` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ pattern?: string | undefined; + /** `placeholder` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ placeholder?: string | undefined; + /** `popovertarget` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ popovertarget?: string | undefined; + /** `popovertargetaction` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ popovertargetaction?: string | undefined; + /** `readonly` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ readonly?: string | undefined; + /** `src` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ src?: string | undefined; + /** `step` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. */ step?: string | undefined; - /** @deprecated */ + /** + * `usemap` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. + * @deprecated + */ usemap?: string | undefined; - /** @deprecated */ + /** + * `x-moz-errormessage` is an attribute of the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. + * @deprecated + */ "x-moz-errormessage"?: string | undefined; } @@ -46,6 +84,6 @@ export interface InputProps extends GlobalAttributes { * input renders the [`input`](https://developer.mozilla.org/docs/Web/HTML/Element/input) element. * @see */ -export function input(props?: InputProps): string { +export function input(props?: InputElementProps): string { return renderElement("input", props as AnyProps, true); } diff --git a/ins.ts b/ins.ts index 4ec3a70..563f59c 100644 --- a/ins.ts +++ b/ins.ts @@ -2,11 +2,13 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * InsProps are the props for the [`ins`](https://developer.mozilla.org/docs/Web/HTML/Element/ins) element. + * InsElementProps are the props for the [`ins`](https://developer.mozilla.org/docs/Web/HTML/Element/ins) element. * @see */ -export interface InsProps extends GlobalAttributes { +export interface InsElementProps extends GlobalAttributes { + /** `cite` is an attribute of the [`ins`](https://developer.mozilla.org/docs/Web/HTML/Element/ins) element. */ cite?: string | undefined; + /** `datetime` is an attribute of the [`ins`](https://developer.mozilla.org/docs/Web/HTML/Element/ins) element. */ datetime?: string | undefined; } @@ -14,6 +16,6 @@ export interface InsProps extends GlobalAttributes { * ins renders the [`ins`](https://developer.mozilla.org/docs/Web/HTML/Element/ins) element. * @see */ -export function ins(props?: InsProps, ...children: string[]): string { +export function ins(props?: InsElementProps, ...children: string[]): string { return renderElement("ins", props as AnyProps, false, children); } diff --git a/kbd.ts b/kbd.ts index b6f2b16..b7605de 100644 --- a/kbd.ts +++ b/kbd.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * KbdElementProps are the props for the [`kbd`](https://developer.mozilla.org/docs/Web/HTML/Element/kbd) element. + * @see + */ +export interface KbdElementProps extends GlobalAttributes { +} + /** * kbd renders the [`kbd`](https://developer.mozilla.org/docs/Web/HTML/Element/kbd) element. * @see */ -export function kbd(props?: GlobalAttributes, ...children: string[]): string { +export function kbd(props?: KbdElementProps, ...children: string[]): string { return renderElement("kbd", props as AnyProps, false, children); } diff --git a/label.ts b/label.ts index 7f79dc4..0b09a16 100644 --- a/label.ts +++ b/label.ts @@ -2,10 +2,11 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * LabelProps are the props for the [`label`](https://developer.mozilla.org/docs/Web/HTML/Element/label) element. + * LabelElementProps are the props for the [`label`](https://developer.mozilla.org/docs/Web/HTML/Element/label) element. * @see */ -export interface LabelProps extends GlobalAttributes { +export interface LabelElementProps extends GlobalAttributes { + /** `for` is an attribute of the [`label`](https://developer.mozilla.org/docs/Web/HTML/Element/label) element. */ for?: string | undefined; } @@ -13,6 +14,9 @@ export interface LabelProps extends GlobalAttributes { * label renders the [`label`](https://developer.mozilla.org/docs/Web/HTML/Element/label) element. * @see */ -export function label(props?: LabelProps, ...children: string[]): string { +export function label( + props?: LabelElementProps, + ...children: string[] +): string { return renderElement("label", props as AnyProps, false, children); } diff --git a/legend.ts b/legend.ts index 3d656d2..18820ed 100644 --- a/legend.ts +++ b/legend.ts @@ -2,11 +2,14 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * LegendProps are the props for the [`legend`](https://developer.mozilla.org/docs/Web/HTML/Element/legend) element. + * LegendElementProps are the props for the [`legend`](https://developer.mozilla.org/docs/Web/HTML/Element/legend) element. * @see */ -export interface LegendProps extends GlobalAttributes { - /** @deprecated */ +export interface LegendElementProps extends GlobalAttributes { + /** + * `align` is an attribute of the [`legend`](https://developer.mozilla.org/docs/Web/HTML/Element/legend) element. + * @deprecated + */ align?: string | undefined; } @@ -14,6 +17,9 @@ export interface LegendProps extends GlobalAttributes { * legend renders the [`legend`](https://developer.mozilla.org/docs/Web/HTML/Element/legend) element. * @see */ -export function legend(props?: LegendProps, ...children: string[]): string { +export function legend( + props?: LegendElementProps, + ...children: string[] +): string { return renderElement("legend", props as AnyProps, false, children); } diff --git a/li.ts b/li.ts index 144318b..50c7658 100644 --- a/li.ts +++ b/li.ts @@ -2,12 +2,16 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * LiProps are the props for the [`li`](https://developer.mozilla.org/docs/Web/HTML/Element/li) element. + * LiElementProps are the props for the [`li`](https://developer.mozilla.org/docs/Web/HTML/Element/li) element. * @see */ -export interface LiProps extends GlobalAttributes { - /** @deprecated */ +export interface LiElementProps extends GlobalAttributes { + /** + * `type` is an attribute of the [`li`](https://developer.mozilla.org/docs/Web/HTML/Element/li) element. + * @deprecated + */ type?: string | undefined; + /** `value` is an attribute of the [`li`](https://developer.mozilla.org/docs/Web/HTML/Element/li) element. */ value?: string | undefined; } @@ -15,6 +19,6 @@ export interface LiProps extends GlobalAttributes { * li renders the [`li`](https://developer.mozilla.org/docs/Web/HTML/Element/li) element. * @see */ -export function li(props?: LiProps, ...children: string[]): string { +export function li(props?: LiElementProps, ...children: string[]): string { return renderElement("li", props as AnyProps, false, children); } diff --git a/link.ts b/link.ts index bad0d1c..f77f5c2 100644 --- a/link.ts +++ b/link.ts @@ -2,33 +2,62 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * LinkProps are the props for the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. + * LinkElementProps are the props for the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. * @see */ -export interface LinkProps extends GlobalAttributes { +export interface LinkElementProps extends GlobalAttributes { + /** `as` is an attribute of the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. */ as?: string | undefined; - /** @experimental */ + /** + * `blocking` is an attribute of the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. + * @experimental + */ blocking?: string | undefined; - /** @deprecated */ + /** + * `charset` is an attribute of the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. + * @deprecated + */ charset?: string | undefined; + /** `crossorigin` is an attribute of the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. */ crossorigin?: string | undefined; + /** `disabled` is an attribute of the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. */ disabled?: string | undefined; + /** `fetchpriority` is an attribute of the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. */ fetchpriority?: string | undefined; + /** `href` is an attribute of the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. */ href?: string | undefined; + /** `hreflang` is an attribute of the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. */ hreflang?: string | undefined; + /** `imagesizes` is an attribute of the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. */ imagesizes?: string | undefined; + /** `imagesrcset` is an attribute of the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. */ imagesrcset?: string | undefined; + /** `integrity` is an attribute of the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. */ integrity?: string | undefined; + /** `media` is an attribute of the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. */ media?: string | undefined; - /** @deprecated */ + /** + * `methods` is an attribute of the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. + * @deprecated + */ methods?: string | undefined; + /** `referrerpolicy` is an attribute of the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. */ referrerpolicy?: string | undefined; + /** `rel` is an attribute of the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. */ rel?: string | undefined; - /** @deprecated */ + /** + * `rev` is an attribute of the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. + * @deprecated + */ rev?: string | undefined; + /** `sizes` is an attribute of the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. */ sizes?: string | undefined; - /** @deprecated */ + /** + * `target` is an attribute of the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. + * @deprecated + */ target?: string | undefined; + /** `type` is an attribute of the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. */ type?: string | undefined; } @@ -36,6 +65,6 @@ export interface LinkProps extends GlobalAttributes { * link renders the [`link`](https://developer.mozilla.org/docs/Web/HTML/Element/link) element. * @see */ -export function link(props?: LinkProps): string { +export function link(props?: LinkElementProps): string { return renderElement("link", props as AnyProps, true); } diff --git a/main.ts b/main.ts index e3f13b6..3a666e4 100644 --- a/main.ts +++ b/main.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * MainElementProps are the props for the [`main`](https://developer.mozilla.org/docs/Web/HTML/Element/main) element. + * @see + */ +export interface MainElementProps extends GlobalAttributes { +} + /** * main renders the [`main`](https://developer.mozilla.org/docs/Web/HTML/Element/main) element. * @see */ -export function main(props?: GlobalAttributes, ...children: string[]): string { +export function main(props?: MainElementProps, ...children: string[]): string { return renderElement("main", props as AnyProps, false, children); } diff --git a/map.ts b/map.ts index 1bfc092..d932e8e 100644 --- a/map.ts +++ b/map.ts @@ -2,10 +2,11 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * MapProps are the props for the [`map`](https://developer.mozilla.org/docs/Web/HTML/Element/map) element. + * MapElementProps are the props for the [`map`](https://developer.mozilla.org/docs/Web/HTML/Element/map) element. * @see */ -export interface MapProps extends GlobalAttributes { +export interface MapElementProps extends GlobalAttributes { + /** `name` is an attribute of the [`map`](https://developer.mozilla.org/docs/Web/HTML/Element/map) element. */ name?: string | undefined; } @@ -13,6 +14,6 @@ export interface MapProps extends GlobalAttributes { * map renders the [`map`](https://developer.mozilla.org/docs/Web/HTML/Element/map) element. * @see */ -export function map(props?: MapProps, ...children: string[]): string { +export function map(props?: MapElementProps, ...children: string[]): string { return renderElement("map", props as AnyProps, false, children); } diff --git a/mark.ts b/mark.ts index b5f231e..740f507 100644 --- a/mark.ts +++ b/mark.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * MarkElementProps are the props for the [`mark`](https://developer.mozilla.org/docs/Web/HTML/Element/mark) element. + * @see + */ +export interface MarkElementProps extends GlobalAttributes { +} + /** * mark renders the [`mark`](https://developer.mozilla.org/docs/Web/HTML/Element/mark) element. * @see */ -export function mark(props?: GlobalAttributes, ...children: string[]): string { +export function mark(props?: MarkElementProps, ...children: string[]): string { return renderElement("mark", props as AnyProps, false, children); } diff --git a/marquee.ts b/marquee.ts index 5d3dee8..fcf0a5a 100644 --- a/marquee.ts +++ b/marquee.ts @@ -2,32 +2,65 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * MarqueeProps are the props for the [`marquee`](https://developer.mozilla.org/docs/Web/HTML/Element/marquee) element. + * MarqueeElementProps are the props for the [`marquee`](https://developer.mozilla.org/docs/Web/HTML/Element/marquee) element. * @see * @deprecated */ -export interface MarqueeProps extends GlobalAttributes { - /** @deprecated */ +export interface MarqueeElementProps extends GlobalAttributes { + /** + * `behavior` is an attribute of the [`marquee`](https://developer.mozilla.org/docs/Web/HTML/Element/marquee) element. + * @deprecated + */ behavior?: string | undefined; - /** @deprecated */ + /** + * `bgcolor` is an attribute of the [`marquee`](https://developer.mozilla.org/docs/Web/HTML/Element/marquee) element. + * @deprecated + */ bgcolor?: string | undefined; - /** @deprecated */ + /** + * `direction` is an attribute of the [`marquee`](https://developer.mozilla.org/docs/Web/HTML/Element/marquee) element. + * @deprecated + */ direction?: string | undefined; - /** @deprecated */ + /** + * `height` is an attribute of the [`marquee`](https://developer.mozilla.org/docs/Web/HTML/Element/marquee) element. + * @deprecated + */ height?: string | undefined; - /** @deprecated */ + /** + * `hspace` is an attribute of the [`marquee`](https://developer.mozilla.org/docs/Web/HTML/Element/marquee) element. + * @deprecated + */ hspace?: string | undefined; - /** @deprecated */ + /** + * `loop` is an attribute of the [`marquee`](https://developer.mozilla.org/docs/Web/HTML/Element/marquee) element. + * @deprecated + */ loop?: string | undefined; - /** @deprecated */ + /** + * `scrollamount` is an attribute of the [`marquee`](https://developer.mozilla.org/docs/Web/HTML/Element/marquee) element. + * @deprecated + */ scrollamount?: string | undefined; - /** @deprecated */ + /** + * `scrolldelay` is an attribute of the [`marquee`](https://developer.mozilla.org/docs/Web/HTML/Element/marquee) element. + * @deprecated + */ scrolldelay?: string | undefined; - /** @deprecated */ + /** + * `truespeed` is an attribute of the [`marquee`](https://developer.mozilla.org/docs/Web/HTML/Element/marquee) element. + * @deprecated + */ truespeed?: string | undefined; - /** @deprecated */ + /** + * `vspace` is an attribute of the [`marquee`](https://developer.mozilla.org/docs/Web/HTML/Element/marquee) element. + * @deprecated + */ vspace?: string | undefined; - /** @deprecated */ + /** + * `width` is an attribute of the [`marquee`](https://developer.mozilla.org/docs/Web/HTML/Element/marquee) element. + * @deprecated + */ width?: string | undefined; } @@ -36,6 +69,9 @@ export interface MarqueeProps extends GlobalAttributes { * @see * @deprecated */ -export function marquee(props?: MarqueeProps, ...children: string[]): string { +export function marquee( + props?: MarqueeElementProps, + ...children: string[] +): string { return renderElement("marquee", props as AnyProps, false, children); } diff --git a/menu.ts b/menu.ts index 6eaa43f..b29da90 100644 --- a/menu.ts +++ b/menu.ts @@ -2,11 +2,14 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * MenuProps are the props for the [`menu`](https://developer.mozilla.org/docs/Web/HTML/Element/menu) element. + * MenuElementProps are the props for the [`menu`](https://developer.mozilla.org/docs/Web/HTML/Element/menu) element. * @see */ -export interface MenuProps extends GlobalAttributes { - /** @deprecated */ +export interface MenuElementProps extends GlobalAttributes { + /** + * `label` is an attribute of the [`menu`](https://developer.mozilla.org/docs/Web/HTML/Element/menu) element. + * @deprecated + */ label?: string | undefined; } @@ -14,6 +17,6 @@ export interface MenuProps extends GlobalAttributes { * menu renders the [`menu`](https://developer.mozilla.org/docs/Web/HTML/Element/menu) element. * @see */ -export function menu(props?: MenuProps, ...children: string[]): string { +export function menu(props?: MenuElementProps, ...children: string[]): string { return renderElement("menu", props as AnyProps, false, children); } diff --git a/meta.ts b/meta.ts index 39673d2..fbb511f 100644 --- a/meta.ts +++ b/meta.ts @@ -2,15 +2,22 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * MetaProps are the props for the [`meta`](https://developer.mozilla.org/docs/Web/HTML/Element/meta) element. + * MetaElementProps are the props for the [`meta`](https://developer.mozilla.org/docs/Web/HTML/Element/meta) element. * @see */ -export interface MetaProps extends GlobalAttributes { +export interface MetaElementProps extends GlobalAttributes { + /** `charset` is an attribute of the [`meta`](https://developer.mozilla.org/docs/Web/HTML/Element/meta) element. */ charset?: string | undefined; + /** `content` is an attribute of the [`meta`](https://developer.mozilla.org/docs/Web/HTML/Element/meta) element. */ content?: string | undefined; + /** `http-equiv` is an attribute of the [`meta`](https://developer.mozilla.org/docs/Web/HTML/Element/meta) element. */ "http-equiv"?: string | undefined; + /** `name` is an attribute of the [`meta`](https://developer.mozilla.org/docs/Web/HTML/Element/meta) element. */ name?: string | undefined; - /** @deprecated */ + /** + * `scheme` is an attribute of the [`meta`](https://developer.mozilla.org/docs/Web/HTML/Element/meta) element. + * @deprecated + */ scheme?: string | undefined; } @@ -18,6 +25,6 @@ export interface MetaProps extends GlobalAttributes { * meta renders the [`meta`](https://developer.mozilla.org/docs/Web/HTML/Element/meta) element. * @see */ -export function meta(props?: MetaProps): string { +export function meta(props?: MetaElementProps): string { return renderElement("meta", props as AnyProps, true); } diff --git a/meter.ts b/meter.ts index 51daac6..593a78d 100644 --- a/meter.ts +++ b/meter.ts @@ -2,15 +2,21 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * MeterProps are the props for the [`meter`](https://developer.mozilla.org/docs/Web/HTML/Element/meter) element. + * MeterElementProps are the props for the [`meter`](https://developer.mozilla.org/docs/Web/HTML/Element/meter) element. * @see */ -export interface MeterProps extends GlobalAttributes { +export interface MeterElementProps extends GlobalAttributes { + /** `high` is an attribute of the [`meter`](https://developer.mozilla.org/docs/Web/HTML/Element/meter) element. */ high?: string | undefined; + /** `low` is an attribute of the [`meter`](https://developer.mozilla.org/docs/Web/HTML/Element/meter) element. */ low?: string | undefined; + /** `max` is an attribute of the [`meter`](https://developer.mozilla.org/docs/Web/HTML/Element/meter) element. */ max?: string | undefined; + /** `min` is an attribute of the [`meter`](https://developer.mozilla.org/docs/Web/HTML/Element/meter) element. */ min?: string | undefined; + /** `optimum` is an attribute of the [`meter`](https://developer.mozilla.org/docs/Web/HTML/Element/meter) element. */ optimum?: string | undefined; + /** `value` is an attribute of the [`meter`](https://developer.mozilla.org/docs/Web/HTML/Element/meter) element. */ value?: string | undefined; } @@ -18,6 +24,9 @@ export interface MeterProps extends GlobalAttributes { * meter renders the [`meter`](https://developer.mozilla.org/docs/Web/HTML/Element/meter) element. * @see */ -export function meter(props?: MeterProps, ...children: string[]): string { +export function meter( + props?: MeterElementProps, + ...children: string[] +): string { return renderElement("meter", props as AnyProps, false, children); } diff --git a/nav.ts b/nav.ts index c155f2d..f9c0f74 100644 --- a/nav.ts +++ b/nav.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * NavElementProps are the props for the [`nav`](https://developer.mozilla.org/docs/Web/HTML/Element/nav) element. + * @see + */ +export interface NavElementProps extends GlobalAttributes { +} + /** * nav renders the [`nav`](https://developer.mozilla.org/docs/Web/HTML/Element/nav) element. * @see */ -export function nav(props?: GlobalAttributes, ...children: string[]): string { +export function nav(props?: NavElementProps, ...children: string[]): string { return renderElement("nav", props as AnyProps, false, children); } diff --git a/nobr.ts b/nobr.ts index 7bc33a8..9317669 100644 --- a/nobr.ts +++ b/nobr.ts @@ -1,11 +1,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * NobrElementProps are the props for the [`nobr`](https://developer.mozilla.org/docs/Web/HTML/Element/nobr) element. + * @see + * @deprecated + */ +export interface NobrElementProps extends GlobalAttributes { +} + /** * nobr renders the [`nobr`](https://developer.mozilla.org/docs/Web/HTML/Element/nobr) element. * @see * @deprecated */ -export function nobr(props?: GlobalAttributes, ...children: string[]): string { +export function nobr(props?: NobrElementProps, ...children: string[]): string { return renderElement("nobr", props as AnyProps, false, children); } diff --git a/noembed.ts b/noembed.ts index 8241f4d..00fa6c2 100644 --- a/noembed.ts +++ b/noembed.ts @@ -1,13 +1,21 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * NoembedElementProps are the props for the [`noembed`](https://developer.mozilla.org/docs/Web/HTML/Element/noembed) element. + * @see + * @deprecated + */ +export interface NoembedElementProps extends GlobalAttributes { +} + /** * noembed renders the [`noembed`](https://developer.mozilla.org/docs/Web/HTML/Element/noembed) element. * @see * @deprecated */ export function noembed( - props?: GlobalAttributes, + props?: NoembedElementProps, ...children: string[] ): string { return renderElement("noembed", props as AnyProps, false, children); diff --git a/noframes.ts b/noframes.ts index adab32c..5eb3a5d 100644 --- a/noframes.ts +++ b/noframes.ts @@ -1,13 +1,21 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * NoframesElementProps are the props for the [`noframes`](https://developer.mozilla.org/docs/Web/HTML/Element/noframes) element. + * @see + * @deprecated + */ +export interface NoframesElementProps extends GlobalAttributes { +} + /** * noframes renders the [`noframes`](https://developer.mozilla.org/docs/Web/HTML/Element/noframes) element. * @see * @deprecated */ export function noframes( - props?: GlobalAttributes, + props?: NoframesElementProps, ...children: string[] ): string { return renderElement("noframes", props as AnyProps, false, children); diff --git a/noscript.ts b/noscript.ts index 832da64..ba1a643 100644 --- a/noscript.ts +++ b/noscript.ts @@ -1,12 +1,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * NoscriptElementProps are the props for the [`noscript`](https://developer.mozilla.org/docs/Web/HTML/Element/noscript) element. + * @see + */ +export interface NoscriptElementProps extends GlobalAttributes { +} + /** * noscript renders the [`noscript`](https://developer.mozilla.org/docs/Web/HTML/Element/noscript) element. * @see */ export function noscript( - props?: GlobalAttributes, + props?: NoscriptElementProps, ...children: string[] ): string { return renderElement("noscript", props as AnyProps, false, children); diff --git a/object.ts b/object.ts index 15c0a42..daf2021 100644 --- a/object.ts +++ b/object.ts @@ -2,33 +2,66 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * ObjectProps are the props for the [`object`](https://developer.mozilla.org/docs/Web/HTML/Element/object) element. + * ObjectElementProps are the props for the [`object`](https://developer.mozilla.org/docs/Web/HTML/Element/object) element. * @see */ -export interface ObjectProps extends GlobalAttributes { - /** @deprecated */ +export interface ObjectElementProps extends GlobalAttributes { + /** + * `archive` is an attribute of the [`object`](https://developer.mozilla.org/docs/Web/HTML/Element/object) element. + * @deprecated + */ archive?: string | undefined; - /** @deprecated */ + /** + * `border` is an attribute of the [`object`](https://developer.mozilla.org/docs/Web/HTML/Element/object) element. + * @deprecated + */ border?: string | undefined; - /** @deprecated */ + /** + * `classid` is an attribute of the [`object`](https://developer.mozilla.org/docs/Web/HTML/Element/object) element. + * @deprecated + */ classid?: string | undefined; - /** @deprecated */ + /** + * `codebase` is an attribute of the [`object`](https://developer.mozilla.org/docs/Web/HTML/Element/object) element. + * @deprecated + */ codebase?: string | undefined; - /** @deprecated */ + /** + * `codetype` is an attribute of the [`object`](https://developer.mozilla.org/docs/Web/HTML/Element/object) element. + * @deprecated + */ codetype?: string | undefined; + /** `data` is an attribute of the [`object`](https://developer.mozilla.org/docs/Web/HTML/Element/object) element. */ data?: string | undefined; - /** @deprecated */ + /** + * `declare` is an attribute of the [`object`](https://developer.mozilla.org/docs/Web/HTML/Element/object) element. + * @deprecated + */ declare?: string | undefined; + /** `form` is an attribute of the [`object`](https://developer.mozilla.org/docs/Web/HTML/Element/object) element. */ form?: string | undefined; + /** `height` is an attribute of the [`object`](https://developer.mozilla.org/docs/Web/HTML/Element/object) element. */ height?: string | undefined; + /** `name` is an attribute of the [`object`](https://developer.mozilla.org/docs/Web/HTML/Element/object) element. */ name?: string | undefined; - /** @deprecated */ + /** + * `standby` is an attribute of the [`object`](https://developer.mozilla.org/docs/Web/HTML/Element/object) element. + * @deprecated + */ standby?: string | undefined; - /** @deprecated */ + /** + * `tabindex` is an attribute of the [`object`](https://developer.mozilla.org/docs/Web/HTML/Element/object) element. + * @deprecated + */ tabindex?: string | undefined; + /** `type` is an attribute of the [`object`](https://developer.mozilla.org/docs/Web/HTML/Element/object) element. */ type?: string | undefined; - /** @deprecated */ + /** + * `usemap` is an attribute of the [`object`](https://developer.mozilla.org/docs/Web/HTML/Element/object) element. + * @deprecated + */ usemap?: string | undefined; + /** `width` is an attribute of the [`object`](https://developer.mozilla.org/docs/Web/HTML/Element/object) element. */ width?: string | undefined; } @@ -36,6 +69,9 @@ export interface ObjectProps extends GlobalAttributes { * object renders the [`object`](https://developer.mozilla.org/docs/Web/HTML/Element/object) element. * @see */ -export function object(props?: ObjectProps, ...children: string[]): string { +export function object( + props?: ObjectElementProps, + ...children: string[] +): string { return renderElement("object", props as AnyProps, false, children); } diff --git a/ol.ts b/ol.ts index 284149a..71ef8a8 100644 --- a/ol.ts +++ b/ol.ts @@ -2,14 +2,20 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * OlProps are the props for the [`ol`](https://developer.mozilla.org/docs/Web/HTML/Element/ol) element. + * OlElementProps are the props for the [`ol`](https://developer.mozilla.org/docs/Web/HTML/Element/ol) element. * @see */ -export interface OlProps extends GlobalAttributes { - /** @deprecated */ +export interface OlElementProps extends GlobalAttributes { + /** + * `compact` is an attribute of the [`ol`](https://developer.mozilla.org/docs/Web/HTML/Element/ol) element. + * @deprecated + */ compact?: string | undefined; + /** `reversed` is an attribute of the [`ol`](https://developer.mozilla.org/docs/Web/HTML/Element/ol) element. */ reversed?: string | undefined; + /** `start` is an attribute of the [`ol`](https://developer.mozilla.org/docs/Web/HTML/Element/ol) element. */ start?: string | undefined; + /** `type` is an attribute of the [`ol`](https://developer.mozilla.org/docs/Web/HTML/Element/ol) element. */ type?: string | undefined; } @@ -17,6 +23,6 @@ export interface OlProps extends GlobalAttributes { * ol renders the [`ol`](https://developer.mozilla.org/docs/Web/HTML/Element/ol) element. * @see */ -export function ol(props?: OlProps, ...children: string[]): string { +export function ol(props?: OlElementProps, ...children: string[]): string { return renderElement("ol", props as AnyProps, false, children); } diff --git a/optgroup.ts b/optgroup.ts index 2775c28..95faa5f 100644 --- a/optgroup.ts +++ b/optgroup.ts @@ -2,11 +2,13 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * OptgroupProps are the props for the [`optgroup`](https://developer.mozilla.org/docs/Web/HTML/Element/optgroup) element. + * OptgroupElementProps are the props for the [`optgroup`](https://developer.mozilla.org/docs/Web/HTML/Element/optgroup) element. * @see */ -export interface OptgroupProps extends GlobalAttributes { +export interface OptgroupElementProps extends GlobalAttributes { + /** `disabled` is an attribute of the [`optgroup`](https://developer.mozilla.org/docs/Web/HTML/Element/optgroup) element. */ disabled?: string | undefined; + /** `label` is an attribute of the [`optgroup`](https://developer.mozilla.org/docs/Web/HTML/Element/optgroup) element. */ label?: string | undefined; } @@ -14,6 +16,9 @@ export interface OptgroupProps extends GlobalAttributes { * optgroup renders the [`optgroup`](https://developer.mozilla.org/docs/Web/HTML/Element/optgroup) element. * @see */ -export function optgroup(props?: OptgroupProps, ...children: string[]): string { +export function optgroup( + props?: OptgroupElementProps, + ...children: string[] +): string { return renderElement("optgroup", props as AnyProps, false, children); } diff --git a/option.ts b/option.ts index 9ec33f7..866ae54 100644 --- a/option.ts +++ b/option.ts @@ -2,13 +2,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * OptionProps are the props for the [`option`](https://developer.mozilla.org/docs/Web/HTML/Element/option) element. + * OptionElementProps are the props for the [`option`](https://developer.mozilla.org/docs/Web/HTML/Element/option) element. * @see */ -export interface OptionProps extends GlobalAttributes { +export interface OptionElementProps extends GlobalAttributes { + /** `disabled` is an attribute of the [`option`](https://developer.mozilla.org/docs/Web/HTML/Element/option) element. */ disabled?: string | undefined; + /** `label` is an attribute of the [`option`](https://developer.mozilla.org/docs/Web/HTML/Element/option) element. */ label?: string | undefined; + /** `selected` is an attribute of the [`option`](https://developer.mozilla.org/docs/Web/HTML/Element/option) element. */ selected?: string | undefined; + /** `value` is an attribute of the [`option`](https://developer.mozilla.org/docs/Web/HTML/Element/option) element. */ value?: string | undefined; } @@ -16,6 +20,9 @@ export interface OptionProps extends GlobalAttributes { * option renders the [`option`](https://developer.mozilla.org/docs/Web/HTML/Element/option) element. * @see */ -export function option(props?: OptionProps, ...children: string[]): string { +export function option( + props?: OptionElementProps, + ...children: string[] +): string { return renderElement("option", props as AnyProps, false, children); } diff --git a/output.ts b/output.ts index f64ab72..5d488aa 100644 --- a/output.ts +++ b/output.ts @@ -2,12 +2,15 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * OutputProps are the props for the [`output`](https://developer.mozilla.org/docs/Web/HTML/Element/output) element. + * OutputElementProps are the props for the [`output`](https://developer.mozilla.org/docs/Web/HTML/Element/output) element. * @see */ -export interface OutputProps extends GlobalAttributes { +export interface OutputElementProps extends GlobalAttributes { + /** `for` is an attribute of the [`output`](https://developer.mozilla.org/docs/Web/HTML/Element/output) element. */ for?: string | undefined; + /** `form` is an attribute of the [`output`](https://developer.mozilla.org/docs/Web/HTML/Element/output) element. */ form?: string | undefined; + /** `name` is an attribute of the [`output`](https://developer.mozilla.org/docs/Web/HTML/Element/output) element. */ name?: string | undefined; } @@ -15,6 +18,9 @@ export interface OutputProps extends GlobalAttributes { * output renders the [`output`](https://developer.mozilla.org/docs/Web/HTML/Element/output) element. * @see */ -export function output(props?: OutputProps, ...children: string[]): string { +export function output( + props?: OutputElementProps, + ...children: string[] +): string { return renderElement("output", props as AnyProps, false, children); } diff --git a/p.ts b/p.ts index cdb607b..6d1d623 100644 --- a/p.ts +++ b/p.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * PElementProps are the props for the [`p`](https://developer.mozilla.org/docs/Web/HTML/Element/p) element. + * @see + */ +export interface PElementProps extends GlobalAttributes { +} + /** * p renders the [`p`](https://developer.mozilla.org/docs/Web/HTML/Element/p) element. * @see */ -export function p(props?: GlobalAttributes, ...children: string[]): string { +export function p(props?: PElementProps, ...children: string[]): string { return renderElement("p", props as AnyProps, false, children); } diff --git a/param.ts b/param.ts index 78a1126..8c21f2a 100644 --- a/param.ts +++ b/param.ts @@ -2,18 +2,30 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * ParamProps are the props for the [`param`](https://developer.mozilla.org/docs/Web/HTML/Element/param) element. + * ParamElementProps are the props for the [`param`](https://developer.mozilla.org/docs/Web/HTML/Element/param) element. * @see * @deprecated */ -export interface ParamProps extends GlobalAttributes { - /** @deprecated */ +export interface ParamElementProps extends GlobalAttributes { + /** + * `name` is an attribute of the [`param`](https://developer.mozilla.org/docs/Web/HTML/Element/param) element. + * @deprecated + */ name?: string | undefined; - /** @deprecated */ + /** + * `type` is an attribute of the [`param`](https://developer.mozilla.org/docs/Web/HTML/Element/param) element. + * @deprecated + */ type?: string | undefined; - /** @deprecated */ + /** + * `value` is an attribute of the [`param`](https://developer.mozilla.org/docs/Web/HTML/Element/param) element. + * @deprecated + */ value?: string | undefined; - /** @deprecated */ + /** + * `valuetype` is an attribute of the [`param`](https://developer.mozilla.org/docs/Web/HTML/Element/param) element. + * @deprecated + */ valuetype?: string | undefined; } @@ -22,6 +34,6 @@ export interface ParamProps extends GlobalAttributes { * @see * @deprecated */ -export function param(props?: ParamProps): string { +export function param(props?: ParamElementProps): string { return renderElement("param", props as AnyProps, true); } diff --git a/picture.ts b/picture.ts index a4eed60..0a65da3 100644 --- a/picture.ts +++ b/picture.ts @@ -1,12 +1,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * PictureElementProps are the props for the [`picture`](https://developer.mozilla.org/docs/Web/HTML/Element/picture) element. + * @see + */ +export interface PictureElementProps extends GlobalAttributes { +} + /** * picture renders the [`picture`](https://developer.mozilla.org/docs/Web/HTML/Element/picture) element. * @see */ export function picture( - props?: GlobalAttributes, + props?: PictureElementProps, ...children: string[] ): string { return renderElement("picture", props as AnyProps, false, children); diff --git a/plaintext.ts b/plaintext.ts index bf73c11..a55b22e 100644 --- a/plaintext.ts +++ b/plaintext.ts @@ -1,13 +1,21 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * PlaintextElementProps are the props for the [`plaintext`](https://developer.mozilla.org/docs/Web/HTML/Element/plaintext) element. + * @see + * @deprecated + */ +export interface PlaintextElementProps extends GlobalAttributes { +} + /** * plaintext renders the [`plaintext`](https://developer.mozilla.org/docs/Web/HTML/Element/plaintext) element. * @see * @deprecated */ export function plaintext( - props?: GlobalAttributes, + props?: PlaintextElementProps, ...children: string[] ): string { return renderElement("plaintext", props as AnyProps, false, children); diff --git a/portal.ts b/portal.ts index fe9cf0f..7704fe5 100644 --- a/portal.ts +++ b/portal.ts @@ -1,13 +1,21 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * PortalElementProps are the props for the [`portal`](https://developer.mozilla.org/docs/Web/HTML/Element/portal) element. + * @see + * @experimental + */ +export interface PortalElementProps extends GlobalAttributes { +} + /** * portal renders the [`portal`](https://developer.mozilla.org/docs/Web/HTML/Element/portal) element. * @see * @experimental */ export function portal( - props?: GlobalAttributes, + props?: PortalElementProps, ...children: string[] ): string { return renderElement("portal", props as AnyProps, false, children); diff --git a/pre.ts b/pre.ts index 7d9eaf7..2434318 100644 --- a/pre.ts +++ b/pre.ts @@ -2,15 +2,24 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * PreProps are the props for the [`pre`](https://developer.mozilla.org/docs/Web/HTML/Element/pre) element. + * PreElementProps are the props for the [`pre`](https://developer.mozilla.org/docs/Web/HTML/Element/pre) element. * @see */ -export interface PreProps extends GlobalAttributes { - /** @deprecated */ +export interface PreElementProps extends GlobalAttributes { + /** + * `cols` is an attribute of the [`pre`](https://developer.mozilla.org/docs/Web/HTML/Element/pre) element. + * @deprecated + */ cols?: string | undefined; - /** @deprecated */ + /** + * `width` is an attribute of the [`pre`](https://developer.mozilla.org/docs/Web/HTML/Element/pre) element. + * @deprecated + */ width?: string | undefined; - /** @deprecated */ + /** + * `wrap` is an attribute of the [`pre`](https://developer.mozilla.org/docs/Web/HTML/Element/pre) element. + * @deprecated + */ wrap?: string | undefined; } @@ -18,6 +27,6 @@ export interface PreProps extends GlobalAttributes { * pre renders the [`pre`](https://developer.mozilla.org/docs/Web/HTML/Element/pre) element. * @see */ -export function pre(props?: PreProps, ...children: string[]): string { +export function pre(props?: PreElementProps, ...children: string[]): string { return renderElement("pre", props as AnyProps, false, children); } diff --git a/progress.ts b/progress.ts index 0e1d87b..0876452 100644 --- a/progress.ts +++ b/progress.ts @@ -2,11 +2,13 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * ProgressProps are the props for the [`progress`](https://developer.mozilla.org/docs/Web/HTML/Element/progress) element. + * ProgressElementProps are the props for the [`progress`](https://developer.mozilla.org/docs/Web/HTML/Element/progress) element. * @see */ -export interface ProgressProps extends GlobalAttributes { +export interface ProgressElementProps extends GlobalAttributes { + /** `max` is an attribute of the [`progress`](https://developer.mozilla.org/docs/Web/HTML/Element/progress) element. */ max?: string | undefined; + /** `value` is an attribute of the [`progress`](https://developer.mozilla.org/docs/Web/HTML/Element/progress) element. */ value?: string | undefined; } @@ -14,6 +16,9 @@ export interface ProgressProps extends GlobalAttributes { * progress renders the [`progress`](https://developer.mozilla.org/docs/Web/HTML/Element/progress) element. * @see */ -export function progress(props?: ProgressProps, ...children: string[]): string { +export function progress( + props?: ProgressElementProps, + ...children: string[] +): string { return renderElement("progress", props as AnyProps, false, children); } diff --git a/q.ts b/q.ts index 5171551..ca398c5 100644 --- a/q.ts +++ b/q.ts @@ -2,10 +2,11 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * QProps are the props for the [`q`](https://developer.mozilla.org/docs/Web/HTML/Element/q) element. + * QElementProps are the props for the [`q`](https://developer.mozilla.org/docs/Web/HTML/Element/q) element. * @see */ -export interface QProps extends GlobalAttributes { +export interface QElementProps extends GlobalAttributes { + /** `cite` is an attribute of the [`q`](https://developer.mozilla.org/docs/Web/HTML/Element/q) element. */ cite?: string | undefined; } @@ -13,6 +14,6 @@ export interface QProps extends GlobalAttributes { * q renders the [`q`](https://developer.mozilla.org/docs/Web/HTML/Element/q) element. * @see */ -export function q(props?: QProps, ...children: string[]): string { +export function q(props?: QElementProps, ...children: string[]): string { return renderElement("q", props as AnyProps, false, children); } diff --git a/rb.ts b/rb.ts index 08be56c..0df7439 100644 --- a/rb.ts +++ b/rb.ts @@ -1,11 +1,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * RbElementProps are the props for the [`rb`](https://developer.mozilla.org/docs/Web/HTML/Element/rb) element. + * @see + * @deprecated + */ +export interface RbElementProps extends GlobalAttributes { +} + /** * rb renders the [`rb`](https://developer.mozilla.org/docs/Web/HTML/Element/rb) element. * @see * @deprecated */ -export function rb(props?: GlobalAttributes, ...children: string[]): string { +export function rb(props?: RbElementProps, ...children: string[]): string { return renderElement("rb", props as AnyProps, false, children); } diff --git a/rp.ts b/rp.ts index f3e2cac..e70e03b 100644 --- a/rp.ts +++ b/rp.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * RpElementProps are the props for the [`rp`](https://developer.mozilla.org/docs/Web/HTML/Element/rp) element. + * @see + */ +export interface RpElementProps extends GlobalAttributes { +} + /** * rp renders the [`rp`](https://developer.mozilla.org/docs/Web/HTML/Element/rp) element. * @see */ -export function rp(props?: GlobalAttributes, ...children: string[]): string { +export function rp(props?: RpElementProps, ...children: string[]): string { return renderElement("rp", props as AnyProps, false, children); } diff --git a/rt.ts b/rt.ts index 8e54532..60a50b1 100644 --- a/rt.ts +++ b/rt.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * RtElementProps are the props for the [`rt`](https://developer.mozilla.org/docs/Web/HTML/Element/rt) element. + * @see + */ +export interface RtElementProps extends GlobalAttributes { +} + /** * rt renders the [`rt`](https://developer.mozilla.org/docs/Web/HTML/Element/rt) element. * @see */ -export function rt(props?: GlobalAttributes, ...children: string[]): string { +export function rt(props?: RtElementProps, ...children: string[]): string { return renderElement("rt", props as AnyProps, false, children); } diff --git a/rtc.ts b/rtc.ts index 4493482..8173722 100644 --- a/rtc.ts +++ b/rtc.ts @@ -1,11 +1,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * RtcElementProps are the props for the [`rtc`](https://developer.mozilla.org/docs/Web/HTML/Element/rtc) element. + * @see + * @deprecated + */ +export interface RtcElementProps extends GlobalAttributes { +} + /** * rtc renders the [`rtc`](https://developer.mozilla.org/docs/Web/HTML/Element/rtc) element. * @see * @deprecated */ -export function rtc(props?: GlobalAttributes, ...children: string[]): string { +export function rtc(props?: RtcElementProps, ...children: string[]): string { return renderElement("rtc", props as AnyProps, false, children); } diff --git a/ruby.ts b/ruby.ts index 8ba515e..b39f3bd 100644 --- a/ruby.ts +++ b/ruby.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * RubyElementProps are the props for the [`ruby`](https://developer.mozilla.org/docs/Web/HTML/Element/ruby) element. + * @see + */ +export interface RubyElementProps extends GlobalAttributes { +} + /** * ruby renders the [`ruby`](https://developer.mozilla.org/docs/Web/HTML/Element/ruby) element. * @see */ -export function ruby(props?: GlobalAttributes, ...children: string[]): string { +export function ruby(props?: RubyElementProps, ...children: string[]): string { return renderElement("ruby", props as AnyProps, false, children); } diff --git a/s.ts b/s.ts index 5f0112f..fb18b01 100644 --- a/s.ts +++ b/s.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * SElementProps are the props for the [`s`](https://developer.mozilla.org/docs/Web/HTML/Element/s) element. + * @see + */ +export interface SElementProps extends GlobalAttributes { +} + /** * s renders the [`s`](https://developer.mozilla.org/docs/Web/HTML/Element/s) element. * @see */ -export function s(props?: GlobalAttributes, ...children: string[]): string { +export function s(props?: SElementProps, ...children: string[]): string { return renderElement("s", props as AnyProps, false, children); } diff --git a/samp.ts b/samp.ts index 37aff26..6263197 100644 --- a/samp.ts +++ b/samp.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * SampElementProps are the props for the [`samp`](https://developer.mozilla.org/docs/Web/HTML/Element/samp) element. + * @see + */ +export interface SampElementProps extends GlobalAttributes { +} + /** * samp renders the [`samp`](https://developer.mozilla.org/docs/Web/HTML/Element/samp) element. * @see */ -export function samp(props?: GlobalAttributes, ...children: string[]): string { +export function samp(props?: SampElementProps, ...children: string[]): string { return renderElement("samp", props as AnyProps, false, children); } diff --git a/script.ts b/script.ts index 7ac5cd5..8041a48 100644 --- a/script.ts +++ b/script.ts @@ -2,22 +2,37 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * ScriptProps are the props for the [`script`](https://developer.mozilla.org/docs/Web/HTML/Element/script) element. + * ScriptElementProps are the props for the [`script`](https://developer.mozilla.org/docs/Web/HTML/Element/script) element. * @see */ -export interface ScriptProps extends GlobalAttributes { +export interface ScriptElementProps extends GlobalAttributes { + /** `async` is an attribute of the [`script`](https://developer.mozilla.org/docs/Web/HTML/Element/script) element. */ async?: string | undefined; - /** @experimental */ + /** + * `attributionsrc` is an attribute of the [`script`](https://developer.mozilla.org/docs/Web/HTML/Element/script) element. + * @experimental + */ attributionsrc?: string | undefined; - /** @experimental */ + /** + * `blocking` is an attribute of the [`script`](https://developer.mozilla.org/docs/Web/HTML/Element/script) element. + * @experimental + */ blocking?: string | undefined; + /** `crossorigin` is an attribute of the [`script`](https://developer.mozilla.org/docs/Web/HTML/Element/script) element. */ crossorigin?: string | undefined; + /** `defer` is an attribute of the [`script`](https://developer.mozilla.org/docs/Web/HTML/Element/script) element. */ defer?: string | undefined; + /** `fetchpriority` is an attribute of the [`script`](https://developer.mozilla.org/docs/Web/HTML/Element/script) element. */ fetchpriority?: string | undefined; + /** `integrity` is an attribute of the [`script`](https://developer.mozilla.org/docs/Web/HTML/Element/script) element. */ integrity?: string | undefined; + /** `nomodule` is an attribute of the [`script`](https://developer.mozilla.org/docs/Web/HTML/Element/script) element. */ nomodule?: string | undefined; + /** `referrerpolicy` is an attribute of the [`script`](https://developer.mozilla.org/docs/Web/HTML/Element/script) element. */ referrerpolicy?: string | undefined; + /** `src` is an attribute of the [`script`](https://developer.mozilla.org/docs/Web/HTML/Element/script) element. */ src?: string | undefined; + /** `type` is an attribute of the [`script`](https://developer.mozilla.org/docs/Web/HTML/Element/script) element. */ type?: string | undefined; } @@ -25,6 +40,9 @@ export interface ScriptProps extends GlobalAttributes { * script renders the [`script`](https://developer.mozilla.org/docs/Web/HTML/Element/script) element. * @see */ -export function script(props?: ScriptProps, ...children: string[]): string { +export function script( + props?: ScriptElementProps, + ...children: string[] +): string { return renderElement("script", props as AnyProps, false, children); } diff --git a/search.ts b/search.ts index 9677d84..4743977 100644 --- a/search.ts +++ b/search.ts @@ -1,12 +1,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * SearchElementProps are the props for the [`search`](https://developer.mozilla.org/docs/Web/HTML/Element/search) element. + * @see + */ +export interface SearchElementProps extends GlobalAttributes { +} + /** * search renders the [`search`](https://developer.mozilla.org/docs/Web/HTML/Element/search) element. * @see */ export function search( - props?: GlobalAttributes, + props?: SearchElementProps, ...children: string[] ): string { return renderElement("search", props as AnyProps, false, children); diff --git a/section.ts b/section.ts index 18b149d..19dcaac 100644 --- a/section.ts +++ b/section.ts @@ -1,12 +1,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * SectionElementProps are the props for the [`section`](https://developer.mozilla.org/docs/Web/HTML/Element/section) element. + * @see + */ +export interface SectionElementProps extends GlobalAttributes { +} + /** * section renders the [`section`](https://developer.mozilla.org/docs/Web/HTML/Element/section) element. * @see */ export function section( - props?: GlobalAttributes, + props?: SectionElementProps, ...children: string[] ): string { return renderElement("section", props as AnyProps, false, children); diff --git a/select.ts b/select.ts index 451a6ea..9617238 100644 --- a/select.ts +++ b/select.ts @@ -2,15 +2,21 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * SelectProps are the props for the [`select`](https://developer.mozilla.org/docs/Web/HTML/Element/select) element. + * SelectElementProps are the props for the [`select`](https://developer.mozilla.org/docs/Web/HTML/Element/select) element. * @see */ -export interface SelectProps extends GlobalAttributes { +export interface SelectElementProps extends GlobalAttributes { + /** `disabled` is an attribute of the [`select`](https://developer.mozilla.org/docs/Web/HTML/Element/select) element. */ disabled?: string | undefined; + /** `form` is an attribute of the [`select`](https://developer.mozilla.org/docs/Web/HTML/Element/select) element. */ form?: string | undefined; + /** `multiple` is an attribute of the [`select`](https://developer.mozilla.org/docs/Web/HTML/Element/select) element. */ multiple?: string | undefined; + /** `name` is an attribute of the [`select`](https://developer.mozilla.org/docs/Web/HTML/Element/select) element. */ name?: string | undefined; + /** `required` is an attribute of the [`select`](https://developer.mozilla.org/docs/Web/HTML/Element/select) element. */ required?: string | undefined; + /** `size` is an attribute of the [`select`](https://developer.mozilla.org/docs/Web/HTML/Element/select) element. */ size?: string | undefined; } @@ -18,6 +24,9 @@ export interface SelectProps extends GlobalAttributes { * select renders the [`select`](https://developer.mozilla.org/docs/Web/HTML/Element/select) element. * @see */ -export function select(props?: SelectProps, ...children: string[]): string { +export function select( + props?: SelectElementProps, + ...children: string[] +): string { return renderElement("select", props as AnyProps, false, children); } diff --git a/slot.ts b/slot.ts index e4004b3..633ae71 100644 --- a/slot.ts +++ b/slot.ts @@ -2,10 +2,11 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * SlotProps are the props for the [`slot`](https://developer.mozilla.org/docs/Web/HTML/Element/slot) element. + * SlotElementProps are the props for the [`slot`](https://developer.mozilla.org/docs/Web/HTML/Element/slot) element. * @see */ -export interface SlotProps extends GlobalAttributes { +export interface SlotElementProps extends GlobalAttributes { + /** `name` is an attribute of the [`slot`](https://developer.mozilla.org/docs/Web/HTML/Element/slot) element. */ name?: string | undefined; } @@ -13,6 +14,6 @@ export interface SlotProps extends GlobalAttributes { * slot renders the [`slot`](https://developer.mozilla.org/docs/Web/HTML/Element/slot) element. * @see */ -export function slot(props?: SlotProps, ...children: string[]): string { +export function slot(props?: SlotElementProps, ...children: string[]): string { return renderElement("slot", props as AnyProps, false, children); } diff --git a/small.ts b/small.ts index 8d88841..e803adf 100644 --- a/small.ts +++ b/small.ts @@ -1,10 +1,20 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * SmallElementProps are the props for the [`small`](https://developer.mozilla.org/docs/Web/HTML/Element/small) element. + * @see + */ +export interface SmallElementProps extends GlobalAttributes { +} + /** * small renders the [`small`](https://developer.mozilla.org/docs/Web/HTML/Element/small) element. * @see */ -export function small(props?: GlobalAttributes, ...children: string[]): string { +export function small( + props?: SmallElementProps, + ...children: string[] +): string { return renderElement("small", props as AnyProps, false, children); } diff --git a/source.ts b/source.ts index b73d431..d681064 100644 --- a/source.ts +++ b/source.ts @@ -2,16 +2,23 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * SourceProps are the props for the [`source`](https://developer.mozilla.org/docs/Web/HTML/Element/source) element. + * SourceElementProps are the props for the [`source`](https://developer.mozilla.org/docs/Web/HTML/Element/source) element. * @see */ -export interface SourceProps extends GlobalAttributes { +export interface SourceElementProps extends GlobalAttributes { + /** `height` is an attribute of the [`source`](https://developer.mozilla.org/docs/Web/HTML/Element/source) element. */ height?: string | undefined; + /** `media` is an attribute of the [`source`](https://developer.mozilla.org/docs/Web/HTML/Element/source) element. */ media?: string | undefined; + /** `sizes` is an attribute of the [`source`](https://developer.mozilla.org/docs/Web/HTML/Element/source) element. */ sizes?: string | undefined; + /** `src` is an attribute of the [`source`](https://developer.mozilla.org/docs/Web/HTML/Element/source) element. */ src?: string | undefined; + /** `srcset` is an attribute of the [`source`](https://developer.mozilla.org/docs/Web/HTML/Element/source) element. */ srcset?: string | undefined; + /** `type` is an attribute of the [`source`](https://developer.mozilla.org/docs/Web/HTML/Element/source) element. */ type?: string | undefined; + /** `width` is an attribute of the [`source`](https://developer.mozilla.org/docs/Web/HTML/Element/source) element. */ width?: string | undefined; } @@ -19,6 +26,6 @@ export interface SourceProps extends GlobalAttributes { * source renders the [`source`](https://developer.mozilla.org/docs/Web/HTML/Element/source) element. * @see */ -export function source(props?: SourceProps): string { +export function source(props?: SourceElementProps): string { return renderElement("source", props as AnyProps, true); } diff --git a/span.ts b/span.ts index 5e119ca..82dfc06 100644 --- a/span.ts +++ b/span.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * SpanElementProps are the props for the [`span`](https://developer.mozilla.org/docs/Web/HTML/Element/span) element. + * @see + */ +export interface SpanElementProps extends GlobalAttributes { +} + /** * span renders the [`span`](https://developer.mozilla.org/docs/Web/HTML/Element/span) element. * @see */ -export function span(props?: GlobalAttributes, ...children: string[]): string { +export function span(props?: SpanElementProps, ...children: string[]): string { return renderElement("span", props as AnyProps, false, children); } diff --git a/strike.ts b/strike.ts index 400d9ac..d6c3406 100644 --- a/strike.ts +++ b/strike.ts @@ -1,13 +1,21 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * StrikeElementProps are the props for the [`strike`](https://developer.mozilla.org/docs/Web/HTML/Element/strike) element. + * @see + * @deprecated + */ +export interface StrikeElementProps extends GlobalAttributes { +} + /** * strike renders the [`strike`](https://developer.mozilla.org/docs/Web/HTML/Element/strike) element. * @see * @deprecated */ export function strike( - props?: GlobalAttributes, + props?: StrikeElementProps, ...children: string[] ): string { return renderElement("strike", props as AnyProps, false, children); diff --git a/strong.ts b/strong.ts index 68767db..6b8ecce 100644 --- a/strong.ts +++ b/strong.ts @@ -1,12 +1,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * StrongElementProps are the props for the [`strong`](https://developer.mozilla.org/docs/Web/HTML/Element/strong) element. + * @see + */ +export interface StrongElementProps extends GlobalAttributes { +} + /** * strong renders the [`strong`](https://developer.mozilla.org/docs/Web/HTML/Element/strong) element. * @see */ export function strong( - props?: GlobalAttributes, + props?: StrongElementProps, ...children: string[] ): string { return renderElement("strong", props as AnyProps, false, children); diff --git a/style.ts b/style.ts index 7934de7..90640b1 100644 --- a/style.ts +++ b/style.ts @@ -2,14 +2,21 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * StyleProps are the props for the [`style`](https://developer.mozilla.org/docs/Web/HTML/Element/style) element. + * StyleElementProps are the props for the [`style`](https://developer.mozilla.org/docs/Web/HTML/Element/style) element. * @see */ -export interface StyleProps extends GlobalAttributes { - /** @experimental */ +export interface StyleElementProps extends GlobalAttributes { + /** + * `blocking` is an attribute of the [`style`](https://developer.mozilla.org/docs/Web/HTML/Element/style) element. + * @experimental + */ blocking?: string | undefined; + /** `media` is an attribute of the [`style`](https://developer.mozilla.org/docs/Web/HTML/Element/style) element. */ media?: string | undefined; - /** @deprecated */ + /** + * `type` is an attribute of the [`style`](https://developer.mozilla.org/docs/Web/HTML/Element/style) element. + * @deprecated + */ type?: string | undefined; } @@ -17,6 +24,9 @@ export interface StyleProps extends GlobalAttributes { * style renders the [`style`](https://developer.mozilla.org/docs/Web/HTML/Element/style) element. * @see */ -export function style(props?: StyleProps, ...children: string[]): string { +export function style( + props?: StyleElementProps, + ...children: string[] +): string { return renderElement("style", props as AnyProps, false, children); } diff --git a/sub.ts b/sub.ts index e81bb11..54914ed 100644 --- a/sub.ts +++ b/sub.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * SubElementProps are the props for the [`sub`](https://developer.mozilla.org/docs/Web/HTML/Element/sub) element. + * @see + */ +export interface SubElementProps extends GlobalAttributes { +} + /** * sub renders the [`sub`](https://developer.mozilla.org/docs/Web/HTML/Element/sub) element. * @see */ -export function sub(props?: GlobalAttributes, ...children: string[]): string { +export function sub(props?: SubElementProps, ...children: string[]): string { return renderElement("sub", props as AnyProps, false, children); } diff --git a/summary.ts b/summary.ts index bc135b0..4fef794 100644 --- a/summary.ts +++ b/summary.ts @@ -1,12 +1,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * SummaryElementProps are the props for the [`summary`](https://developer.mozilla.org/docs/Web/HTML/Element/summary) element. + * @see + */ +export interface SummaryElementProps extends GlobalAttributes { +} + /** * summary renders the [`summary`](https://developer.mozilla.org/docs/Web/HTML/Element/summary) element. * @see */ export function summary( - props?: GlobalAttributes, + props?: SummaryElementProps, ...children: string[] ): string { return renderElement("summary", props as AnyProps, false, children); diff --git a/sup.ts b/sup.ts index b43de79..d77b103 100644 --- a/sup.ts +++ b/sup.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * SupElementProps are the props for the [`sup`](https://developer.mozilla.org/docs/Web/HTML/Element/sup) element. + * @see + */ +export interface SupElementProps extends GlobalAttributes { +} + /** * sup renders the [`sup`](https://developer.mozilla.org/docs/Web/HTML/Element/sup) element. * @see */ -export function sup(props?: GlobalAttributes, ...children: string[]): string { +export function sup(props?: SupElementProps, ...children: string[]): string { return renderElement("sup", props as AnyProps, false, children); } diff --git a/table.ts b/table.ts index 557a9da..b173aa3 100644 --- a/table.ts +++ b/table.ts @@ -2,27 +2,54 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * TableProps are the props for the [`table`](https://developer.mozilla.org/docs/Web/HTML/Element/table) element. + * TableElementProps are the props for the [`table`](https://developer.mozilla.org/docs/Web/HTML/Element/table) element. * @see */ -export interface TableProps extends GlobalAttributes { - /** @deprecated */ +export interface TableElementProps extends GlobalAttributes { + /** + * `align` is an attribute of the [`table`](https://developer.mozilla.org/docs/Web/HTML/Element/table) element. + * @deprecated + */ align?: string | undefined; - /** @deprecated */ + /** + * `bgcolor` is an attribute of the [`table`](https://developer.mozilla.org/docs/Web/HTML/Element/table) element. + * @deprecated + */ bgcolor?: string | undefined; - /** @deprecated */ + /** + * `border` is an attribute of the [`table`](https://developer.mozilla.org/docs/Web/HTML/Element/table) element. + * @deprecated + */ border?: string | undefined; - /** @deprecated */ + /** + * `cellpadding` is an attribute of the [`table`](https://developer.mozilla.org/docs/Web/HTML/Element/table) element. + * @deprecated + */ cellpadding?: string | undefined; - /** @deprecated */ + /** + * `cellspacing` is an attribute of the [`table`](https://developer.mozilla.org/docs/Web/HTML/Element/table) element. + * @deprecated + */ cellspacing?: string | undefined; - /** @deprecated */ + /** + * `frame` is an attribute of the [`table`](https://developer.mozilla.org/docs/Web/HTML/Element/table) element. + * @deprecated + */ frame?: string | undefined; - /** @deprecated */ + /** + * `rules` is an attribute of the [`table`](https://developer.mozilla.org/docs/Web/HTML/Element/table) element. + * @deprecated + */ rules?: string | undefined; - /** @deprecated */ + /** + * `summary` is an attribute of the [`table`](https://developer.mozilla.org/docs/Web/HTML/Element/table) element. + * @deprecated + */ summary?: string | undefined; - /** @deprecated */ + /** + * `width` is an attribute of the [`table`](https://developer.mozilla.org/docs/Web/HTML/Element/table) element. + * @deprecated + */ width?: string | undefined; } @@ -30,6 +57,9 @@ export interface TableProps extends GlobalAttributes { * table renders the [`table`](https://developer.mozilla.org/docs/Web/HTML/Element/table) element. * @see */ -export function table(props?: TableProps, ...children: string[]): string { +export function table( + props?: TableElementProps, + ...children: string[] +): string { return renderElement("table", props as AnyProps, false, children); } diff --git a/tbody.ts b/tbody.ts index 5fef1b0..193c657 100644 --- a/tbody.ts +++ b/tbody.ts @@ -2,19 +2,34 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * TbodyProps are the props for the [`tbody`](https://developer.mozilla.org/docs/Web/HTML/Element/tbody) element. + * TbodyElementProps are the props for the [`tbody`](https://developer.mozilla.org/docs/Web/HTML/Element/tbody) element. * @see */ -export interface TbodyProps extends GlobalAttributes { - /** @deprecated */ +export interface TbodyElementProps extends GlobalAttributes { + /** + * `align` is an attribute of the [`tbody`](https://developer.mozilla.org/docs/Web/HTML/Element/tbody) element. + * @deprecated + */ align?: string | undefined; - /** @deprecated */ + /** + * `bgcolor` is an attribute of the [`tbody`](https://developer.mozilla.org/docs/Web/HTML/Element/tbody) element. + * @deprecated + */ bgcolor?: string | undefined; - /** @deprecated */ + /** + * `char` is an attribute of the [`tbody`](https://developer.mozilla.org/docs/Web/HTML/Element/tbody) element. + * @deprecated + */ char?: string | undefined; - /** @deprecated */ + /** + * `charoff` is an attribute of the [`tbody`](https://developer.mozilla.org/docs/Web/HTML/Element/tbody) element. + * @deprecated + */ charoff?: string | undefined; - /** @deprecated */ + /** + * `valign` is an attribute of the [`tbody`](https://developer.mozilla.org/docs/Web/HTML/Element/tbody) element. + * @deprecated + */ valign?: string | undefined; } @@ -22,6 +37,9 @@ export interface TbodyProps extends GlobalAttributes { * tbody renders the [`tbody`](https://developer.mozilla.org/docs/Web/HTML/Element/tbody) element. * @see */ -export function tbody(props?: TbodyProps, ...children: string[]): string { +export function tbody( + props?: TbodyElementProps, + ...children: string[] +): string { return renderElement("tbody", props as AnyProps, false, children); } diff --git a/td.ts b/td.ts index 857bfbf..e0edba7 100644 --- a/td.ts +++ b/td.ts @@ -2,30 +2,60 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * TdProps are the props for the [`td`](https://developer.mozilla.org/docs/Web/HTML/Element/td) element. + * TdElementProps are the props for the [`td`](https://developer.mozilla.org/docs/Web/HTML/Element/td) element. * @see */ -export interface TdProps extends GlobalAttributes { - /** @deprecated */ +export interface TdElementProps extends GlobalAttributes { + /** + * `abbr` is an attribute of the [`td`](https://developer.mozilla.org/docs/Web/HTML/Element/td) element. + * @deprecated + */ abbr?: string | undefined; - /** @deprecated */ + /** + * `align` is an attribute of the [`td`](https://developer.mozilla.org/docs/Web/HTML/Element/td) element. + * @deprecated + */ align?: string | undefined; - /** @deprecated */ + /** + * `axis` is an attribute of the [`td`](https://developer.mozilla.org/docs/Web/HTML/Element/td) element. + * @deprecated + */ axis?: string | undefined; - /** @deprecated */ + /** + * `bgcolor` is an attribute of the [`td`](https://developer.mozilla.org/docs/Web/HTML/Element/td) element. + * @deprecated + */ bgcolor?: string | undefined; - /** @deprecated */ + /** + * `char` is an attribute of the [`td`](https://developer.mozilla.org/docs/Web/HTML/Element/td) element. + * @deprecated + */ char?: string | undefined; - /** @deprecated */ + /** + * `charoff` is an attribute of the [`td`](https://developer.mozilla.org/docs/Web/HTML/Element/td) element. + * @deprecated + */ charoff?: string | undefined; + /** `colspan` is an attribute of the [`td`](https://developer.mozilla.org/docs/Web/HTML/Element/td) element. */ colspan?: string | undefined; + /** `headers` is an attribute of the [`td`](https://developer.mozilla.org/docs/Web/HTML/Element/td) element. */ headers?: string | undefined; + /** `rowspan` is an attribute of the [`td`](https://developer.mozilla.org/docs/Web/HTML/Element/td) element. */ rowspan?: string | undefined; - /** @deprecated */ + /** + * `scope` is an attribute of the [`td`](https://developer.mozilla.org/docs/Web/HTML/Element/td) element. + * @deprecated + */ scope?: string | undefined; - /** @deprecated */ + /** + * `valign` is an attribute of the [`td`](https://developer.mozilla.org/docs/Web/HTML/Element/td) element. + * @deprecated + */ valign?: string | undefined; - /** @deprecated */ + /** + * `width` is an attribute of the [`td`](https://developer.mozilla.org/docs/Web/HTML/Element/td) element. + * @deprecated + */ width?: string | undefined; } @@ -33,6 +63,6 @@ export interface TdProps extends GlobalAttributes { * td renders the [`td`](https://developer.mozilla.org/docs/Web/HTML/Element/td) element. * @see */ -export function td(props?: TdProps, ...children: string[]): string { +export function td(props?: TdElementProps, ...children: string[]): string { return renderElement("td", props as AnyProps, false, children); } diff --git a/template.ts b/template.ts index f187744..b27cd1a 100644 --- a/template.ts +++ b/template.ts @@ -2,10 +2,11 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * TemplateProps are the props for the [`template`](https://developer.mozilla.org/docs/Web/HTML/Element/template) element. + * TemplateElementProps are the props for the [`template`](https://developer.mozilla.org/docs/Web/HTML/Element/template) element. * @see */ -export interface TemplateProps extends GlobalAttributes { +export interface TemplateElementProps extends GlobalAttributes { + /** `shadowrootmode` is an attribute of the [`template`](https://developer.mozilla.org/docs/Web/HTML/Element/template) element. */ shadowrootmode?: string | undefined; } @@ -13,6 +14,9 @@ export interface TemplateProps extends GlobalAttributes { * template renders the [`template`](https://developer.mozilla.org/docs/Web/HTML/Element/template) element. * @see */ -export function template(props?: TemplateProps, ...children: string[]): string { +export function template( + props?: TemplateElementProps, + ...children: string[] +): string { return renderElement("template", props as AnyProps, false, children); } diff --git a/textarea.ts b/textarea.ts index f6c25d6..e1e72b0 100644 --- a/textarea.ts +++ b/textarea.ts @@ -2,23 +2,37 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * TextareaProps are the props for the [`textarea`](https://developer.mozilla.org/docs/Web/HTML/Element/textarea) element. + * TextareaElementProps are the props for the [`textarea`](https://developer.mozilla.org/docs/Web/HTML/Element/textarea) element. * @see */ -export interface TextareaProps extends GlobalAttributes { +export interface TextareaElementProps extends GlobalAttributes { + /** `autocomplete` is an attribute of the [`textarea`](https://developer.mozilla.org/docs/Web/HTML/Element/textarea) element. */ autocomplete?: string | undefined; + /** `cols` is an attribute of the [`textarea`](https://developer.mozilla.org/docs/Web/HTML/Element/textarea) element. */ cols?: string | undefined; + /** `dirname` is an attribute of the [`textarea`](https://developer.mozilla.org/docs/Web/HTML/Element/textarea) element. */ dirname?: string | undefined; + /** `disabled` is an attribute of the [`textarea`](https://developer.mozilla.org/docs/Web/HTML/Element/textarea) element. */ disabled?: string | undefined; + /** `form` is an attribute of the [`textarea`](https://developer.mozilla.org/docs/Web/HTML/Element/textarea) element. */ form?: string | undefined; + /** `maxlength` is an attribute of the [`textarea`](https://developer.mozilla.org/docs/Web/HTML/Element/textarea) element. */ maxlength?: string | undefined; + /** `minlength` is an attribute of the [`textarea`](https://developer.mozilla.org/docs/Web/HTML/Element/textarea) element. */ minlength?: string | undefined; + /** `name` is an attribute of the [`textarea`](https://developer.mozilla.org/docs/Web/HTML/Element/textarea) element. */ name?: string | undefined; + /** `placeholder` is an attribute of the [`textarea`](https://developer.mozilla.org/docs/Web/HTML/Element/textarea) element. */ placeholder?: string | undefined; + /** `readonly` is an attribute of the [`textarea`](https://developer.mozilla.org/docs/Web/HTML/Element/textarea) element. */ readonly?: string | undefined; + /** `required` is an attribute of the [`textarea`](https://developer.mozilla.org/docs/Web/HTML/Element/textarea) element. */ required?: string | undefined; + /** `rows` is an attribute of the [`textarea`](https://developer.mozilla.org/docs/Web/HTML/Element/textarea) element. */ rows?: string | undefined; + /** `spellcheck` is an attribute of the [`textarea`](https://developer.mozilla.org/docs/Web/HTML/Element/textarea) element. */ spellcheck?: string | undefined; + /** `wrap` is an attribute of the [`textarea`](https://developer.mozilla.org/docs/Web/HTML/Element/textarea) element. */ wrap?: string | undefined; } @@ -26,6 +40,9 @@ export interface TextareaProps extends GlobalAttributes { * textarea renders the [`textarea`](https://developer.mozilla.org/docs/Web/HTML/Element/textarea) element. * @see */ -export function textarea(props?: TextareaProps, ...children: string[]): string { +export function textarea( + props?: TextareaElementProps, + ...children: string[] +): string { return renderElement("textarea", props as AnyProps, false, children); } diff --git a/tfoot.ts b/tfoot.ts index 177da48..0373f29 100644 --- a/tfoot.ts +++ b/tfoot.ts @@ -2,19 +2,34 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * TfootProps are the props for the [`tfoot`](https://developer.mozilla.org/docs/Web/HTML/Element/tfoot) element. + * TfootElementProps are the props for the [`tfoot`](https://developer.mozilla.org/docs/Web/HTML/Element/tfoot) element. * @see */ -export interface TfootProps extends GlobalAttributes { - /** @deprecated */ +export interface TfootElementProps extends GlobalAttributes { + /** + * `align` is an attribute of the [`tfoot`](https://developer.mozilla.org/docs/Web/HTML/Element/tfoot) element. + * @deprecated + */ align?: string | undefined; - /** @deprecated */ + /** + * `bgcolor` is an attribute of the [`tfoot`](https://developer.mozilla.org/docs/Web/HTML/Element/tfoot) element. + * @deprecated + */ bgcolor?: string | undefined; - /** @deprecated */ + /** + * `char` is an attribute of the [`tfoot`](https://developer.mozilla.org/docs/Web/HTML/Element/tfoot) element. + * @deprecated + */ char?: string | undefined; - /** @deprecated */ + /** + * `charoff` is an attribute of the [`tfoot`](https://developer.mozilla.org/docs/Web/HTML/Element/tfoot) element. + * @deprecated + */ charoff?: string | undefined; - /** @deprecated */ + /** + * `valign` is an attribute of the [`tfoot`](https://developer.mozilla.org/docs/Web/HTML/Element/tfoot) element. + * @deprecated + */ valign?: string | undefined; } @@ -22,6 +37,9 @@ export interface TfootProps extends GlobalAttributes { * tfoot renders the [`tfoot`](https://developer.mozilla.org/docs/Web/HTML/Element/tfoot) element. * @see */ -export function tfoot(props?: TfootProps, ...children: string[]): string { +export function tfoot( + props?: TfootElementProps, + ...children: string[] +): string { return renderElement("tfoot", props as AnyProps, false, children); } diff --git a/th.ts b/th.ts index 20e0a11..01b60e6 100644 --- a/th.ts +++ b/th.ts @@ -2,28 +2,54 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * ThProps are the props for the [`th`](https://developer.mozilla.org/docs/Web/HTML/Element/th) element. + * ThElementProps are the props for the [`th`](https://developer.mozilla.org/docs/Web/HTML/Element/th) element. * @see */ -export interface ThProps extends GlobalAttributes { +export interface ThElementProps extends GlobalAttributes { + /** `abbr` is an attribute of the [`th`](https://developer.mozilla.org/docs/Web/HTML/Element/th) element. */ abbr?: string | undefined; - /** @deprecated */ + /** + * `align` is an attribute of the [`th`](https://developer.mozilla.org/docs/Web/HTML/Element/th) element. + * @deprecated + */ align?: string | undefined; - /** @deprecated */ + /** + * `axis` is an attribute of the [`th`](https://developer.mozilla.org/docs/Web/HTML/Element/th) element. + * @deprecated + */ axis?: string | undefined; - /** @deprecated */ + /** + * `bgcolor` is an attribute of the [`th`](https://developer.mozilla.org/docs/Web/HTML/Element/th) element. + * @deprecated + */ bgcolor?: string | undefined; - /** @deprecated */ + /** + * `char` is an attribute of the [`th`](https://developer.mozilla.org/docs/Web/HTML/Element/th) element. + * @deprecated + */ char?: string | undefined; - /** @deprecated */ + /** + * `charoff` is an attribute of the [`th`](https://developer.mozilla.org/docs/Web/HTML/Element/th) element. + * @deprecated + */ charoff?: string | undefined; + /** `colspan` is an attribute of the [`th`](https://developer.mozilla.org/docs/Web/HTML/Element/th) element. */ colspan?: string | undefined; + /** `headers` is an attribute of the [`th`](https://developer.mozilla.org/docs/Web/HTML/Element/th) element. */ headers?: string | undefined; + /** `rowspan` is an attribute of the [`th`](https://developer.mozilla.org/docs/Web/HTML/Element/th) element. */ rowspan?: string | undefined; + /** `scope` is an attribute of the [`th`](https://developer.mozilla.org/docs/Web/HTML/Element/th) element. */ scope?: string | undefined; - /** @deprecated */ + /** + * `valign` is an attribute of the [`th`](https://developer.mozilla.org/docs/Web/HTML/Element/th) element. + * @deprecated + */ valign?: string | undefined; - /** @deprecated */ + /** + * `width` is an attribute of the [`th`](https://developer.mozilla.org/docs/Web/HTML/Element/th) element. + * @deprecated + */ width?: string | undefined; } @@ -31,6 +57,6 @@ export interface ThProps extends GlobalAttributes { * th renders the [`th`](https://developer.mozilla.org/docs/Web/HTML/Element/th) element. * @see */ -export function th(props?: ThProps, ...children: string[]): string { +export function th(props?: ThElementProps, ...children: string[]): string { return renderElement("th", props as AnyProps, false, children); } diff --git a/thead.ts b/thead.ts index 2b8ae2f..24e6911 100644 --- a/thead.ts +++ b/thead.ts @@ -2,19 +2,34 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * TheadProps are the props for the [`thead`](https://developer.mozilla.org/docs/Web/HTML/Element/thead) element. + * TheadElementProps are the props for the [`thead`](https://developer.mozilla.org/docs/Web/HTML/Element/thead) element. * @see */ -export interface TheadProps extends GlobalAttributes { - /** @deprecated */ +export interface TheadElementProps extends GlobalAttributes { + /** + * `align` is an attribute of the [`thead`](https://developer.mozilla.org/docs/Web/HTML/Element/thead) element. + * @deprecated + */ align?: string | undefined; - /** @deprecated */ + /** + * `bgcolor` is an attribute of the [`thead`](https://developer.mozilla.org/docs/Web/HTML/Element/thead) element. + * @deprecated + */ bgcolor?: string | undefined; - /** @deprecated */ + /** + * `char` is an attribute of the [`thead`](https://developer.mozilla.org/docs/Web/HTML/Element/thead) element. + * @deprecated + */ char?: string | undefined; - /** @deprecated */ + /** + * `charoff` is an attribute of the [`thead`](https://developer.mozilla.org/docs/Web/HTML/Element/thead) element. + * @deprecated + */ charoff?: string | undefined; - /** @deprecated */ + /** + * `valign` is an attribute of the [`thead`](https://developer.mozilla.org/docs/Web/HTML/Element/thead) element. + * @deprecated + */ valign?: string | undefined; } @@ -22,6 +37,9 @@ export interface TheadProps extends GlobalAttributes { * thead renders the [`thead`](https://developer.mozilla.org/docs/Web/HTML/Element/thead) element. * @see */ -export function thead(props?: TheadProps, ...children: string[]): string { +export function thead( + props?: TheadElementProps, + ...children: string[] +): string { return renderElement("thead", props as AnyProps, false, children); } diff --git a/time.ts b/time.ts index a2e9441..1244776 100644 --- a/time.ts +++ b/time.ts @@ -2,10 +2,11 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * TimeProps are the props for the [`time`](https://developer.mozilla.org/docs/Web/HTML/Element/time) element. + * TimeElementProps are the props for the [`time`](https://developer.mozilla.org/docs/Web/HTML/Element/time) element. * @see */ -export interface TimeProps extends GlobalAttributes { +export interface TimeElementProps extends GlobalAttributes { + /** `datetime` is an attribute of the [`time`](https://developer.mozilla.org/docs/Web/HTML/Element/time) element. */ datetime?: string | undefined; } @@ -13,6 +14,6 @@ export interface TimeProps extends GlobalAttributes { * time renders the [`time`](https://developer.mozilla.org/docs/Web/HTML/Element/time) element. * @see */ -export function time(props?: TimeProps, ...children: string[]): string { +export function time(props?: TimeElementProps, ...children: string[]): string { return renderElement("time", props as AnyProps, false, children); } diff --git a/title.ts b/title.ts index 1eaf8a7..06e003f 100644 --- a/title.ts +++ b/title.ts @@ -1,10 +1,20 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * TitleElementProps are the props for the [`title`](https://developer.mozilla.org/docs/Web/HTML/Element/title) element. + * @see + */ +export interface TitleElementProps extends GlobalAttributes { +} + /** * title renders the [`title`](https://developer.mozilla.org/docs/Web/HTML/Element/title) element. * @see */ -export function title(props?: GlobalAttributes, ...children: string[]): string { +export function title( + props?: TitleElementProps, + ...children: string[] +): string { return renderElement("title", props as AnyProps, false, children); } diff --git a/tr.ts b/tr.ts index 6cb668e..2b812a6 100644 --- a/tr.ts +++ b/tr.ts @@ -2,19 +2,34 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * TrProps are the props for the [`tr`](https://developer.mozilla.org/docs/Web/HTML/Element/tr) element. + * TrElementProps are the props for the [`tr`](https://developer.mozilla.org/docs/Web/HTML/Element/tr) element. * @see */ -export interface TrProps extends GlobalAttributes { - /** @deprecated */ +export interface TrElementProps extends GlobalAttributes { + /** + * `align` is an attribute of the [`tr`](https://developer.mozilla.org/docs/Web/HTML/Element/tr) element. + * @deprecated + */ align?: string | undefined; - /** @deprecated */ + /** + * `bgcolor` is an attribute of the [`tr`](https://developer.mozilla.org/docs/Web/HTML/Element/tr) element. + * @deprecated + */ bgcolor?: string | undefined; - /** @deprecated */ + /** + * `char` is an attribute of the [`tr`](https://developer.mozilla.org/docs/Web/HTML/Element/tr) element. + * @deprecated + */ char?: string | undefined; - /** @deprecated */ + /** + * `charoff` is an attribute of the [`tr`](https://developer.mozilla.org/docs/Web/HTML/Element/tr) element. + * @deprecated + */ charoff?: string | undefined; - /** @deprecated */ + /** + * `valign` is an attribute of the [`tr`](https://developer.mozilla.org/docs/Web/HTML/Element/tr) element. + * @deprecated + */ valign?: string | undefined; } @@ -22,6 +37,6 @@ export interface TrProps extends GlobalAttributes { * tr renders the [`tr`](https://developer.mozilla.org/docs/Web/HTML/Element/tr) element. * @see */ -export function tr(props?: TrProps, ...children: string[]): string { +export function tr(props?: TrElementProps, ...children: string[]): string { return renderElement("tr", props as AnyProps, false, children); } diff --git a/track.ts b/track.ts index dd80dc9..9b3025d 100644 --- a/track.ts +++ b/track.ts @@ -2,14 +2,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * TrackProps are the props for the [`track`](https://developer.mozilla.org/docs/Web/HTML/Element/track) element. + * TrackElementProps are the props for the [`track`](https://developer.mozilla.org/docs/Web/HTML/Element/track) element. * @see */ -export interface TrackProps extends GlobalAttributes { +export interface TrackElementProps extends GlobalAttributes { + /** `default` is an attribute of the [`track`](https://developer.mozilla.org/docs/Web/HTML/Element/track) element. */ default?: string | undefined; + /** `kind` is an attribute of the [`track`](https://developer.mozilla.org/docs/Web/HTML/Element/track) element. */ kind?: string | undefined; + /** `label` is an attribute of the [`track`](https://developer.mozilla.org/docs/Web/HTML/Element/track) element. */ label?: string | undefined; + /** `src` is an attribute of the [`track`](https://developer.mozilla.org/docs/Web/HTML/Element/track) element. */ src?: string | undefined; + /** `srclang` is an attribute of the [`track`](https://developer.mozilla.org/docs/Web/HTML/Element/track) element. */ srclang?: string | undefined; } @@ -17,6 +22,6 @@ export interface TrackProps extends GlobalAttributes { * track renders the [`track`](https://developer.mozilla.org/docs/Web/HTML/Element/track) element. * @see */ -export function track(props?: TrackProps): string { +export function track(props?: TrackElementProps): string { return renderElement("track", props as AnyProps, true); } diff --git a/tt.ts b/tt.ts index db673e9..0637ce6 100644 --- a/tt.ts +++ b/tt.ts @@ -1,11 +1,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * TtElementProps are the props for the [`tt`](https://developer.mozilla.org/docs/Web/HTML/Element/tt) element. + * @see + * @deprecated + */ +export interface TtElementProps extends GlobalAttributes { +} + /** * tt renders the [`tt`](https://developer.mozilla.org/docs/Web/HTML/Element/tt) element. * @see * @deprecated */ -export function tt(props?: GlobalAttributes, ...children: string[]): string { +export function tt(props?: TtElementProps, ...children: string[]): string { return renderElement("tt", props as AnyProps, false, children); } diff --git a/u.ts b/u.ts index aeedf4b..4357e8e 100644 --- a/u.ts +++ b/u.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * UElementProps are the props for the [`u`](https://developer.mozilla.org/docs/Web/HTML/Element/u) element. + * @see + */ +export interface UElementProps extends GlobalAttributes { +} + /** * u renders the [`u`](https://developer.mozilla.org/docs/Web/HTML/Element/u) element. * @see */ -export function u(props?: GlobalAttributes, ...children: string[]): string { +export function u(props?: UElementProps, ...children: string[]): string { return renderElement("u", props as AnyProps, false, children); } diff --git a/ul.ts b/ul.ts index 342d247..bd4211e 100644 --- a/ul.ts +++ b/ul.ts @@ -2,13 +2,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * UlProps are the props for the [`ul`](https://developer.mozilla.org/docs/Web/HTML/Element/ul) element. + * UlElementProps are the props for the [`ul`](https://developer.mozilla.org/docs/Web/HTML/Element/ul) element. * @see */ -export interface UlProps extends GlobalAttributes { - /** @deprecated */ +export interface UlElementProps extends GlobalAttributes { + /** + * `compact` is an attribute of the [`ul`](https://developer.mozilla.org/docs/Web/HTML/Element/ul) element. + * @deprecated + */ compact?: string | undefined; - /** @deprecated */ + /** + * `type` is an attribute of the [`ul`](https://developer.mozilla.org/docs/Web/HTML/Element/ul) element. + * @deprecated + */ type?: string | undefined; } @@ -16,6 +22,6 @@ export interface UlProps extends GlobalAttributes { * ul renders the [`ul`](https://developer.mozilla.org/docs/Web/HTML/Element/ul) element. * @see */ -export function ul(props?: UlProps, ...children: string[]): string { +export function ul(props?: UlElementProps, ...children: string[]): string { return renderElement("ul", props as AnyProps, false, children); } diff --git a/var.ts b/var.ts index 88c4cbe..90ed3ae 100644 --- a/var.ts +++ b/var.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * VarElementProps are the props for the [`var`](https://developer.mozilla.org/docs/Web/HTML/Element/var) element. + * @see + */ +export interface VarElementProps extends GlobalAttributes { +} + /** * var_ renders the [`var`](https://developer.mozilla.org/docs/Web/HTML/Element/var) element. * @see */ -export function var_(props?: GlobalAttributes, ...children: string[]): string { +export function var_(props?: VarElementProps, ...children: string[]): string { return renderElement("var", props as AnyProps, false, children); } diff --git a/video.ts b/video.ts index f5575b1..4f48eec 100644 --- a/video.ts +++ b/video.ts @@ -2,23 +2,37 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; /** - * VideoProps are the props for the [`video`](https://developer.mozilla.org/docs/Web/HTML/Element/video) element. + * VideoElementProps are the props for the [`video`](https://developer.mozilla.org/docs/Web/HTML/Element/video) element. * @see */ -export interface VideoProps extends GlobalAttributes { +export interface VideoElementProps extends GlobalAttributes { + /** `autoplay` is an attribute of the [`video`](https://developer.mozilla.org/docs/Web/HTML/Element/video) element. */ autoplay?: string | undefined; + /** `controls` is an attribute of the [`video`](https://developer.mozilla.org/docs/Web/HTML/Element/video) element. */ controls?: string | undefined; + /** `controlslist` is an attribute of the [`video`](https://developer.mozilla.org/docs/Web/HTML/Element/video) element. */ controlslist?: string | undefined; + /** `crossorigin` is an attribute of the [`video`](https://developer.mozilla.org/docs/Web/HTML/Element/video) element. */ crossorigin?: string | undefined; + /** `disablepictureinpicture` is an attribute of the [`video`](https://developer.mozilla.org/docs/Web/HTML/Element/video) element. */ disablepictureinpicture?: string | undefined; + /** `disableremoteplayback` is an attribute of the [`video`](https://developer.mozilla.org/docs/Web/HTML/Element/video) element. */ disableremoteplayback?: string | undefined; + /** `height` is an attribute of the [`video`](https://developer.mozilla.org/docs/Web/HTML/Element/video) element. */ height?: string | undefined; + /** `loop` is an attribute of the [`video`](https://developer.mozilla.org/docs/Web/HTML/Element/video) element. */ loop?: string | undefined; + /** `muted` is an attribute of the [`video`](https://developer.mozilla.org/docs/Web/HTML/Element/video) element. */ muted?: string | undefined; + /** `playsinline` is an attribute of the [`video`](https://developer.mozilla.org/docs/Web/HTML/Element/video) element. */ playsinline?: string | undefined; + /** `poster` is an attribute of the [`video`](https://developer.mozilla.org/docs/Web/HTML/Element/video) element. */ poster?: string | undefined; + /** `preload` is an attribute of the [`video`](https://developer.mozilla.org/docs/Web/HTML/Element/video) element. */ preload?: string | undefined; + /** `src` is an attribute of the [`video`](https://developer.mozilla.org/docs/Web/HTML/Element/video) element. */ src?: string | undefined; + /** `width` is an attribute of the [`video`](https://developer.mozilla.org/docs/Web/HTML/Element/video) element. */ width?: string | undefined; } @@ -26,6 +40,9 @@ export interface VideoProps extends GlobalAttributes { * video renders the [`video`](https://developer.mozilla.org/docs/Web/HTML/Element/video) element. * @see */ -export function video(props?: VideoProps, ...children: string[]): string { +export function video( + props?: VideoElementProps, + ...children: string[] +): string { return renderElement("video", props as AnyProps, false, children); } diff --git a/wbr.ts b/wbr.ts index cf8a7f8..199c2ef 100644 --- a/wbr.ts +++ b/wbr.ts @@ -1,10 +1,17 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * WbrElementProps are the props for the [`wbr`](https://developer.mozilla.org/docs/Web/HTML/Element/wbr) element. + * @see + */ +export interface WbrElementProps extends GlobalAttributes { +} + /** * wbr renders the [`wbr`](https://developer.mozilla.org/docs/Web/HTML/Element/wbr) element. * @see */ -export function wbr(props?: GlobalAttributes): string { +export function wbr(props?: WbrElementProps): string { return renderElement("wbr", props as AnyProps, true); } diff --git a/xmp.ts b/xmp.ts index ede75a8..947b46e 100644 --- a/xmp.ts +++ b/xmp.ts @@ -1,11 +1,19 @@ import type { AnyProps, GlobalAttributes } from "./lib/mod.ts"; import { renderElement } from "./lib/mod.ts"; +/** + * XmpElementProps are the props for the [`xmp`](https://developer.mozilla.org/docs/Web/HTML/Element/xmp) element. + * @see + * @deprecated + */ +export interface XmpElementProps extends GlobalAttributes { +} + /** * xmp renders the [`xmp`](https://developer.mozilla.org/docs/Web/HTML/Element/xmp) element. * @see * @deprecated */ -export function xmp(props?: GlobalAttributes, ...children: string[]): string { +export function xmp(props?: XmpElementProps, ...children: string[]): string { return renderElement("xmp", props as AnyProps, false, children); }