From 86e43da88d87fa291f32ce4d3ee2ca06ae0723a4 Mon Sep 17 00:00:00 2001 From: Karsten Schmidt Date: Mon, 8 Jul 2024 22:51:27 +0200 Subject: [PATCH] docs(hiccup-html): update readme --- packages/hiccup-html/README.md | 189 ++++++++++++++++++++++------- packages/hiccup-html/tpl.readme.md | 177 +++++++++++++++++++++------ 2 files changed, 284 insertions(+), 82 deletions(-) diff --git a/packages/hiccup-html/README.md b/packages/hiccup-html/README.md index 173c2a4ae7..c395c226d2 100644 --- a/packages/hiccup-html/README.md +++ b/packages/hiccup-html/README.md @@ -16,14 +16,14 @@ - [About](#about) - [Supported elements](#supported-elements) + - [Block content](#block-content) + - [Forms / inputs](#forms--inputs) - [Head / metadata](#head--metadata) - - [Sections](#sections) - - [Text content](#text-content) - - [Lists](#lists) - - [Tables](#tables) - [Inline](#inline) - - [Forms / inputs](#forms--inputs) + - [Lists](#lists) - [Media](#media) + - [Sections](#sections) + - [Tables](#tables) - [Compatibility](#compatibility) - [Status](#status) - [Support packages](#support-packages) @@ -41,72 +41,173 @@ 100+ type-checked HTML5 element functions for [@thi.ng/hiccup](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup) related infrastructure. -The following type-checked factory functions are provided **so far** and -in most cases include specialized type definitions for element-specific -attributes, incl. enumerated attrib values (where applicable/useful) and -all 420+ CSS property names (for use with the `style` attrib). See type -definitions in +The following type-checked factory functions are provided **so far** and in most +cases include specialized type definitions for element-specific attributes, +incl. enumerated attrib values (where applicable/useful) and 420+ CSS property +names (for use with the `style` attrib). See type definitions in [api.ts](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/api.ts) and [`defElement()`](#defelement) below for more details. ### Supported elements -#### Head / metadata +#### Block content -[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/head.ts) +[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/blocks.ts) -`base`, `head`, `link`, `linkCSS`, `meta`, `metaReferrer`, -`metaRefresh`, `metaRobots`, `metaUTF8`, `metaViewport`, `metaXUA`, -`script`, `style`, `title` +- `blockquote` +- `details` +- `dialog` +- `div` +- `figcaption` +- `figure` +- `hr` +- `iframe` +- `para` +- `pre` +- `slot` +- `summary` +- `template` -#### Sections +#### Forms / inputs -[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/sections.ts) +[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/forms.ts) -`address`, `article`, `aside`, `body`, `footer`, `h1`..`h6`, `header`, -`hgroup`, `html`, `main`, `nav`, `noscript`, `section` +- `button` +- `checkbox` +- `fieldset` +- `form` +- `inputColor` +- `inputFile` +- `inputNumber` +- `inputPass` +- `inputRange` +- `inputReset` +- `inputSearch` +- `inputSubmit` +- `inputText` +- `label` +- `legend` +- `meter` +- `optGroup` +- `option` +- `output` +- `progress` +- `radio` +- `select` +- `textArea` -#### Text content +#### Head / metadata -[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/blocks.ts) +[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/head.ts) -`blockquote`, `div`, `figure`, `figcaption`, `hr`, `iframe`, `para`, -`pre` +- `base` +- `head` +- `link` +- `linkCSS` +- `meta` +- `metaReferrer` +- `metaRefresh` +- `metaRobots` +- `metaUTF8` +- `metaViewport` +- `metaXUA` +- `script` +- `style` +- `title` -#### Lists +#### Inline -[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/lists.ts) +[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/inline.ts) -`datalist`, `dd`, `dl`, `dt`, `li`, `ol`, `ul` +- `abbr` +- `anchor` +- `br` +- `cite` +- `code` +- `data` +- `del` +- `dfn` +- `em` +- `i` +- `ins` +- `kbd` +- `mark` +- `quote` +- `small` +- `span` +- `strikethrough` +- `strong` +- `sub` +- `sup` +- `time` +- `variable` +- `wbr` -#### Tables +#### Lists -[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/table.ts) +[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/lists.ts) -`caption`, `col`, `colgroup`, `table`, `tbody`, `td`, `tfoot`, `th`, -`thead`, `tr` +- `datalist` +- `dd` +- `dl` +- `dt` +- `li` +- `menu` +- `ol` +- `ul` -#### Inline +#### Media -[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/inline.ts) +[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/media.ts) -`abbr`, `anchor`, `br`, `cite`, `code`, `data`, `del`, `em`, `i`, `ins`, -`kbd`, `mark`, `quote`, `small`, `span`, `strong`, `sub`, `sup`, `time` +- `audio` +- `canvas` +- `img` +- `object` +- `picture` +- `source` +- `track` +- `video` -#### Forms / inputs +#### Sections -[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/forms.ts) +[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/sections.ts) -`button`, `checkbox`, `fieldset`, `form`, `inputColor`, `inputFile`, -`inputNumber`, `inputPass`, `inputRange`, `inputSearch`, `inputText`, -`label`, `legend`, `meter`, `option`, `optGroup`, `progress`, `radio`, -`select`, `textArea` +- `address` +- `article` +- `aside` +- `body` +- `comment` +- `footer` +- `h1` +- `h2` +- `h3` +- `h4` +- `h5` +- `h6` +- `header` +- `hgroup` +- `html` +- `main` +- `nav` +- `noscript` +- `search` +- `section` -#### Media +#### Tables -[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/media.ts) +[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/table.ts) -`audio`, `canvas`, `img`, `picture`, `source`, `video` +- `caption` +- `col` +- `colgroup` +- `table` +- `tbody` +- `td` +- `tfoot` +- `th` +- `thead` +- `tr` ### Compatibility @@ -196,7 +297,7 @@ Browser ESM import: [JSDelivr documentation](https://www.jsdelivr.com/) -Package sizes (brotli'd, pre-treeshake): ESM: 1.51 KB +Package sizes (brotli'd, pre-treeshake): ESM: 1.63 KB ## Dependencies diff --git a/packages/hiccup-html/tpl.readme.md b/packages/hiccup-html/tpl.readme.md index afce3469cf..ad64f90bfc 100644 --- a/packages/hiccup-html/tpl.readme.md +++ b/packages/hiccup-html/tpl.readme.md @@ -6,72 +6,173 @@ {{pkg.description}} -The following type-checked factory functions are provided **so far** and -in most cases include specialized type definitions for element-specific -attributes, incl. enumerated attrib values (where applicable/useful) and -all 420+ CSS property names (for use with the `style` attrib). See type -definitions in +The following type-checked factory functions are provided **so far** and in most +cases include specialized type definitions for element-specific attributes, +incl. enumerated attrib values (where applicable/useful) and 420+ CSS property +names (for use with the `style` attrib). See type definitions in [api.ts](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/api.ts) and [`defElement()`](#defelement) below for more details. ### Supported elements -#### Head / metadata +#### Block content -[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/head.ts) +[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/blocks.ts) -`base`, `head`, `link`, `linkCSS`, `meta`, `metaReferrer`, -`metaRefresh`, `metaRobots`, `metaUTF8`, `metaViewport`, `metaXUA`, -`script`, `style`, `title` +- `blockquote` +- `details` +- `dialog` +- `div` +- `figcaption` +- `figure` +- `hr` +- `iframe` +- `para` +- `pre` +- `slot` +- `summary` +- `template` -#### Sections +#### Forms / inputs -[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/sections.ts) +[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/forms.ts) -`address`, `article`, `aside`, `body`, `footer`, `h1`..`h6`, `header`, -`hgroup`, `html`, `main`, `nav`, `noscript`, `section` +- `button` +- `checkbox` +- `fieldset` +- `form` +- `inputColor` +- `inputFile` +- `inputNumber` +- `inputPass` +- `inputRange` +- `inputReset` +- `inputSearch` +- `inputSubmit` +- `inputText` +- `label` +- `legend` +- `meter` +- `optGroup` +- `option` +- `output` +- `progress` +- `radio` +- `select` +- `textArea` -#### Text content +#### Head / metadata -[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/blocks.ts) +[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/head.ts) -`blockquote`, `div`, `figure`, `figcaption`, `hr`, `iframe`, `para`, -`pre` +- `base` +- `head` +- `link` +- `linkCSS` +- `meta` +- `metaReferrer` +- `metaRefresh` +- `metaRobots` +- `metaUTF8` +- `metaViewport` +- `metaXUA` +- `script` +- `style` +- `title` -#### Lists +#### Inline -[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/lists.ts) +[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/inline.ts) -`datalist`, `dd`, `dl`, `dt`, `li`, `ol`, `ul` +- `abbr` +- `anchor` +- `br` +- `cite` +- `code` +- `data` +- `del` +- `dfn` +- `em` +- `i` +- `ins` +- `kbd` +- `mark` +- `quote` +- `small` +- `span` +- `strikethrough` +- `strong` +- `sub` +- `sup` +- `time` +- `variable` +- `wbr` -#### Tables +#### Lists -[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/table.ts) +[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/lists.ts) -`caption`, `col`, `colgroup`, `table`, `tbody`, `td`, `tfoot`, `th`, -`thead`, `tr` +- `datalist` +- `dd` +- `dl` +- `dt` +- `li` +- `menu` +- `ol` +- `ul` -#### Inline +#### Media -[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/inline.ts) +[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/media.ts) -`abbr`, `anchor`, `br`, `cite`, `code`, `data`, `del`, `em`, `i`, `ins`, -`kbd`, `mark`, `quote`, `small`, `span`, `strong`, `sub`, `sup`, `time` +- `audio` +- `canvas` +- `img` +- `object` +- `picture` +- `source` +- `track` +- `video` -#### Forms / inputs +#### Sections -[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/forms.ts) +[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/sections.ts) -`button`, `checkbox`, `fieldset`, `form`, `inputColor`, `inputFile`, -`inputNumber`, `inputPass`, `inputRange`, `inputSearch`, `inputText`, -`label`, `legend`, `meter`, `option`, `optGroup`, `progress`, `radio`, -`select`, `textArea` +- `address` +- `article` +- `aside` +- `body` +- `comment` +- `footer` +- `h1` +- `h2` +- `h3` +- `h4` +- `h5` +- `h6` +- `header` +- `hgroup` +- `html` +- `main` +- `nav` +- `noscript` +- `search` +- `section` -#### Media +#### Tables -[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/media.ts) +[Source](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html/src/table.ts) -`audio`, `canvas`, `img`, `picture`, `source`, `video` +- `caption` +- `col` +- `colgroup` +- `table` +- `tbody` +- `td` +- `tfoot` +- `th` +- `thead` +- `tr` ### Compatibility