Skip to content

Commit

Permalink
docs(hiccup-html): update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Jul 8, 2024
1 parent f6a6bc3 commit 86e43da
Show file tree
Hide file tree
Showing 2 changed files with 284 additions and 82 deletions.
189 changes: 145 additions & 44 deletions packages/hiccup-html/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand Down Expand Up @@ -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

Expand Down
Loading

0 comments on commit 86e43da

Please sign in to comment.