all repos — gomponents @ v1.4.0

HTML components in pure Go

85fff9eb v1.4.0
Add MapIter to map over iterators
Alan Pearce alan@alanpearce.eu
Fri, 21 Mar 2025 21:52:31 +0100
7ada5cf0
Add tests for MapWithIndex and MapMap
Alan Pearce alan@alanpearce.eu
Fri, 21 Mar 2025 21:44:08 +0100
dce03353 v1.3.0
add helper for <search> element

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/search
Alan Pearce alan@alanpearce.eu
Wed, 19 Mar 2025 22:28:44 +0100
3a9a1fd2 v1.2.0
Rename and document fork
Alan Pearce alan@alanpearce.eu
Wed, 19 Mar 2025 12:20:24 +0100
5eae1eef
Add else part to If/Iff
Alan Pearce alan@alanpearce.eu
Wed, 19 Mar 2025 11:50:50 +0100
6aea6d09
add MapWithIndex and MapMap helpers
Alan Pearce alan@alanpearce.eu
Wed, 19 Mar 2025 01:26:01 +0100
7ae7b677
Fix indentation in code in readme
Markus Wüstenberg markus@maragu.dk
Wed, 19 Mar 2025 11:13:01 +0100
bb1c545d
Add FAQ entry on feature addition to readme
Markus Wüstenberg markus@maragu.dk
Wed, 19 Mar 2025 11:10:06 +0100
ba5a9893
Add `Scope` attribute (#249)

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#scope
Alan Pearce alan@alanpearce.eu
Wed, 19 Mar 2025 10:04:13 +0100
1e222b67
Benchmark large document and run in CI (#246)

Fixes #229
Markus Wüstenberg markus@maragu.dk
Wed, 05 Mar 2025 12:00:11 +0100
ea676e9a
Add architecture and FAQ section to readme
Markus Wüstenberg markus@maragu.dk
Wed, 05 Mar 2025 11:14:06 +0100
774363ce
Bump codecov/codecov-action from 4 to 5 (#245)

Bumps
[codecov/codecov-action](https://github.com/codecov/codecov-action) from
4 to 5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/codecov/codecov-action/releases">codecov/codecov-action's
releases</a>.</em></p>
<blockquote>
<h2>v5.0.0</h2>
<h2>v5 Release</h2>
<p><code>v5</code> of the Codecov GitHub Action will use the <a
href="https://github.com/codecov/wrapper">Codecov Wrapper</a> to
encapsulate the <a
href="https://github.com/codecov/codecov-cli">CLI</a>. This will help
ensure that the Action gets updates quicker.</p>
<h3>Migration Guide</h3>
<p>The <code>v5</code> release also coincides with the opt-out feature
for tokens for public repositories. In the <code>Global Upload
Token</code> section of the settings page of an organization in
codecov.io, you can set the ability for Codecov to receive a coverage
reports from any source. This will allow contributors or other members
of a repository to upload without needing access to the Codecov token.
For more details see <a
href="https://docs.codecov.com/docs/codecov-tokens#uploading-without-a-token">how
to upload without a token</a>.</p>
<blockquote>
<p>[!WARNING]<br />
<strong>The following arguments have been changed</strong></p>
<ul>
<li><code>file</code> (this has been deprecated in favor of
<code>files</code>)</li>
<li><code>plugin</code> (this has been deprecated in favor of
<code>plugins</code>)</li>
</ul>
</blockquote>
<p>The following arguments have been added:</p>
<ul>
<li><code>binary</code></li>
<li><code>gcov_args</code></li>
<li><code>gcov_executable</code></li>
<li><code>gcov_ignore</code></li>
<li><code>gcov_include</code></li>
<li><code>report_type</code></li>
<li><code>skip_validation</code></li>
<li><code>swift_project</code></li>
</ul>
<p>You can see their usage in the <code>action.yml</code> <a
href="https://github.com/codecov/codecov-action/blob/main/action.yml">file</a>.</p>
<h2>What's Changed</h2>
<ul>
<li>chore(deps): bump to eslint9+ and remove eslint-config-google by <a
href="https://github.com/thomasrockhu-codecov"><code>@​thomasrockhu-codecov</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1591">codecov/codecov-action#1591</a></li>
<li>build(deps-dev): bump <code>@​octokit/webhooks-types</code> from
7.5.1 to 7.6.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1595">codecov/codecov-action#1595</a></li>
<li>build(deps-dev): bump typescript from 5.6.2 to 5.6.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1604">codecov/codecov-action#1604</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/parser</code> from
8.8.0 to 8.8.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1601">codecov/codecov-action#1601</a></li>
<li>build(deps): bump <code>@​actions/core</code> from 1.11.0 to 1.11.1
by <a href="https://github.com/dependabot"><code>@​dependabot</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1597">codecov/codecov-action#1597</a></li>
<li>build(deps): bump github/codeql-action from 3.26.9 to 3.26.11 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1596">codecov/codecov-action#1596</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 8.8.0 to 8.8.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1600">codecov/codecov-action#1600</a></li>
<li>build(deps-dev): bump eslint from 9.11.1 to 9.12.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1598">codecov/codecov-action#1598</a></li>
<li>build(deps): bump github/codeql-action from 3.26.11 to 3.26.12 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1609">codecov/codecov-action#1609</a></li>
<li>build(deps): bump actions/checkout from 4.2.0 to 4.2.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1608">codecov/codecov-action#1608</a></li>
<li>build(deps): bump actions/upload-artifact from 4.4.0 to 4.4.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1607">codecov/codecov-action#1607</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/parser</code> from
8.8.1 to 8.9.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1612">codecov/codecov-action#1612</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 8.8.1 to 8.9.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1611">codecov/codecov-action#1611</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 8.9.0 to 8.10.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1615">codecov/codecov-action#1615</a></li>
<li>build(deps-dev): bump eslint from 9.12.0 to 9.13.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1618">codecov/codecov-action#1618</a></li>
<li>build(deps): bump github/codeql-action from 3.26.12 to 3.26.13 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1617">codecov/codecov-action#1617</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/parser</code> from
8.9.0 to 8.10.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1614">codecov/codecov-action#1614</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 8.10.0 to 8.11.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1620">codecov/codecov-action#1620</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/parser</code> from
8.10.0 to 8.11.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1619">codecov/codecov-action#1619</a></li>
<li>build(deps-dev): bump <code>@​types/jest</code> from 29.5.13 to
29.5.14 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1622">codecov/codecov-action#1622</a></li>
<li>build(deps): bump actions/checkout from 4.2.1 to 4.2.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1625">codecov/codecov-action#1625</a></li>
<li>build(deps): bump github/codeql-action from 3.26.13 to 3.27.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1624">codecov/codecov-action#1624</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 8.11.0 to 8.12.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1626">codecov/codecov-action#1626</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 8.12.1 to 8.12.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1629">codecov/codecov-action#1629</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md">codecov/codecov-action's
changelog</a>.</em></p>
<blockquote>
<h3>v5 Release</h3>
<p><code>v5</code> of the Codecov GitHub Action will use the <a
href="https://github.com/codecov/wrapper">Codecov Wrapper</a> to
encapsulate the <a
href="https://github.com/codecov/codecov-cli">CLI</a>. This will help
ensure that the Action gets updates quicker.</p>
<h3>Migration Guide</h3>
<p>The <code>v5</code> release also coincides with the opt-out feature
for tokens for public repositories. In the <code>Global Upload
Token</code> section of the settings page of an organization in
codecov.io, you can set the ability for Codecov to receive a coverage
reports from any source. This will allow contributors or other members
of a repository to upload without needing access to the Codecov token.
For more details see <a
href="https://docs.codecov.com/docs/codecov-tokens#uploading-without-a-token">how
to upload without a token</a>.</p>
<blockquote>
<p>[!WARNING]
<strong>The following arguments have been changed</strong></p>
<ul>
<li><code>file</code> (this has been deprecated in favor of
<code>files</code>)</li>
<li><code>plugin</code> (this has been deprecated in favor of
<code>plugins</code>)</li>
</ul>
</blockquote>
<p>The following arguments have been added:</p>
<ul>
<li><code>binary</code></li>
<li><code>gcov_args</code></li>
<li><code>gcov_executable</code></li>
<li><code>gcov_ignore</code></li>
<li><code>gcov_include</code></li>
<li><code>report_type</code></li>
<li><code>skip_validation</code></li>
<li><code>swift_project</code></li>
</ul>
<p>You can see their usage in the <code>action.yml</code> <a
href="https://github.com/codecov/codecov-action/blob/main/action.yml">file</a>.</p>
<h2>What's Changed</h2>
<ul>
<li>chore(deps): bump to eslint9+ and remove eslint-config-google by <a
href="https://github.com/thomasrockhu-codecov"><code>@​thomasrockhu-codecov</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1591">codecov/codecov-action#1591</a></li>
<li>build(deps-dev): bump <code>@​octokit/webhooks-types</code> from
7.5.1 to 7.6.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1595">codecov/codecov-action#1595</a></li>
<li>build(deps-dev): bump typescript from 5.6.2 to 5.6.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1604">codecov/codecov-action#1604</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/parser</code> from
8.8.0 to 8.8.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1601">codecov/codecov-action#1601</a></li>
<li>build(deps): bump <code>@​actions/core</code> from 1.11.0 to 1.11.1
by <a href="https://github.com/dependabot"><code>@​dependabot</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1597">codecov/codecov-action#1597</a></li>
<li>build(deps): bump github/codeql-action from 3.26.9 to 3.26.11 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1596">codecov/codecov-action#1596</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 8.8.0 to 8.8.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1600">codecov/codecov-action#1600</a></li>
<li>build(deps-dev): bump eslint from 9.11.1 to 9.12.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1598">codecov/codecov-action#1598</a></li>
<li>build(deps): bump github/codeql-action from 3.26.11 to 3.26.12 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1609">codecov/codecov-action#1609</a></li>
<li>build(deps): bump actions/checkout from 4.2.0 to 4.2.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1608">codecov/codecov-action#1608</a></li>
<li>build(deps): bump actions/upload-artifact from 4.4.0 to 4.4.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1607">codecov/codecov-action#1607</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/parser</code> from
8.8.1 to 8.9.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1612">codecov/codecov-action#1612</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 8.8.1 to 8.9.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1611">codecov/codecov-action#1611</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 8.9.0 to 8.10.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1615">codecov/codecov-action#1615</a></li>
<li>build(deps-dev): bump eslint from 9.12.0 to 9.13.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1618">codecov/codecov-action#1618</a></li>
<li>build(deps): bump github/codeql-action from 3.26.12 to 3.26.13 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1617">codecov/codecov-action#1617</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/parser</code> from
8.9.0 to 8.10.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1614">codecov/codecov-action#1614</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 8.10.0 to 8.11.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1620">codecov/codecov-action#1620</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/parser</code> from
8.10.0 to 8.11.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1619">codecov/codecov-action#1619</a></li>
<li>build(deps-dev): bump <code>@​types/jest</code> from 29.5.13 to
29.5.14 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1622">codecov/codecov-action#1622</a></li>
<li>build(deps): bump actions/checkout from 4.2.1 to 4.2.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1625">codecov/codecov-action#1625</a></li>
<li>build(deps): bump github/codeql-action from 3.26.13 to 3.27.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1624">codecov/codecov-action#1624</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 8.11.0 to 8.12.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1626">codecov/codecov-action#1626</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 8.12.1 to 8.12.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1629">codecov/codecov-action#1629</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/parser</code> from
8.11.0 to 8.12.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1628">codecov/codecov-action#1628</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/codecov/codecov-action/commit/0565863a31f2c772f9f0395002a31e3f06189574"><code>0565863</code></a>
chore(release): 5.4.0 (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1781">#1781</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/c545d7bd451c5545ff63f9fda37b34bde3259a5d"><code>c545d7b</code></a>
update wrapper submodule to 0.2.0, add recurse_submodules arg (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1780">#1780</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/2488e996fab00fd35d4bfea876db7531c9fa1ea3"><code>2488e99</code></a>
build(deps): bump actions/upload-artifact from 4.6.0 to 4.6.1 (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1775">#1775</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/a46c158416052ffd00ef9c3fc11ff1bbec4ec700"><code>a46c158</code></a>
build(deps): bump ossf/scorecard-action from 2.4.0 to 2.4.1 (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1776">#1776</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/062ee7e02eae2193bf3772a3d8b4b7529204e133"><code>062ee7e</code></a>
build(deps): bump github/codeql-action from 3.28.9 to 3.28.10 (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1777">#1777</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/1fecca8ce3a22284e70b371077fb5219f54095b8"><code>1fecca8</code></a>
Clarify in README that <code>use_pypi</code> bypasses integrity checks
too (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1773">#1773</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/2e6e9c5a74ec004831b6d17edfb76c53a54d4d55"><code>2e6e9c5</code></a>
Fix use of safe.directory inside containers (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1768">#1768</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/a5dc5a573e8953ff2a96046d39d03621989c794b"><code>a5dc5a5</code></a>
Fix description for report_type input (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1770">#1770</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/4898080f15c09ae860fcec6796854d10a2e23de8"><code>4898080</code></a>
build(deps): bump github/codeql-action from 3.28.8 to 3.28.9 (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1765">#1765</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/5efa07bc177542802086d6a447e0ba274759c103"><code>5efa07b</code></a>
Fix a typo in the example (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1758">#1758</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/codecov/codecov-action/compare/v4...v5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=codecov/codecov-action&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
dependabot[bot] 49699333+dependabot[bot]@users.noreply.github.com
Mon, 03 Mar 2025 12:58:02 +0100
d1bcb7b6
Add dependabot config
Markus Wüstenberg markus@maragu.dk
Mon, 03 Mar 2025 11:50:44 +0100
523f5914
Test with Go 1.24 (#244)

Markus Wüstenberg markus@maragu.dk
Mon, 03 Mar 2025 11:49:17 +0100
ac5c6154
Set slice capacity based on input in `Map` and `Classes.Render` (#243)

Hey! I just discovered this repo and I love being able to write
templates while still having compile-time checks.

I was looking through the code and noticed slices aren't currently
preallocated in `Map()` and `Classes.Render()`. Preallocating will
improve performance since the resulting slice won't have to be grown
dynamically during the append loop.
Gabe Cook gabe565@gmail.com
Mon, 03 Mar 2025 04:48:16 -0600
0368e39c
Add 'download' and 'referrerpolicy' attributes for anchor <a> element (#242)

Hello,

A patch to add
[`download`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#download)
and
[`referrerpolicy`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#referrerpolicy)
for the anchor `<a>` element.
Stéphane Legrand slegrand45@gmail.com
Thu, 06 Feb 2025 10:32:15 +0100
ceb0e8e2
Add formxxx attributes (for <input type="submit"> element) (#241)

Hello,

A small patch to add the following attributes:

- formaction
- formenctype
- formmethod
- formnovalidate
- formtarget

These attributes are useful in `<input type="submit">` element: [MDN
documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/submit#additional_attributes)
Stéphane Legrand slegrand45@gmail.com
Mon, 03 Feb 2025 14:43:40 +0100
c366cfc3
Add support for additional HTML attributes in HTML5 template (#238)

This PR updates the HTML5 function to accept and render additional HTML
attributes. An additional test case to validate this enhancement has
been added as well.
Winni Neessen wn@neessen.dev
Wed, 06 Nov 2024 12:30:51 +0100
d4a299fe
Upgrade codecov Github action in CI workflow (#231)

Markus Wüstenberg markus@maragu.dk
Wed, 30 Oct 2024 15:38:15 +0100
900ef87a
Add popover attributes (#236)

This PR adds popover attributes as detailed here:
https://developer.mozilla.org/en-US/docs/Web/API/Popover_API/Using

---------

Co-authored-by: Markus Wüstenberg <markus@maragu.dk>
Ken Powers ken@kenpowers.net
Wed, 30 Oct 2024 10:06:20 -0400
2e44d495
Add web component elements and slot attribute (#235)

The slot attribute is a standard attribute for use with web components:
https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots
Ken Powers ken@kenpowers.net
Fri, 25 Oct 2024 14:34:35 -0400
87bb2f37
Add gomponents-starter-kit link to readme
Markus Wüstenberg markus@maragu.dk
Tue, 15 Oct 2024 11:11:53 +0200
e53dba6a
Release v1 (#226)

v1.0.0-beta1 gave no problems with my other gomponents libraries, that
of others, and some of my large projects, so releasing v1!

No more breaking changes! 😁
Markus Wüstenberg markus@maragu.dk
Fri, 11 Oct 2024 10:47:37 +0200
85304472
Add test for dot imports (#225)

So we can be sure all dot imports work at the same time.
Markus Wüstenberg markus@maragu.dk
Fri, 11 Oct 2024 10:37:23 +0200
05d56605
Add missing 'hidden' attribute (#224)

Guy-Laurent Subri glsubri@users.noreply.github.com
Thu, 10 Oct 2024 13:31:17 +0200
73373c8a
Upgrade CI workflow (#223)

Mainly the linter action is easier to use.
Markus Wüstenberg markus@maragu.dk
Wed, 09 Oct 2024 11:19:01 +0200
0b203e94
Add version to go get command in readme

Until we're out of beta.
Markus Wüstenberg markus@maragu.dk
Wed, 09 Oct 2024 10:49:34 +0200
f316a0a1
Fix attr panic test (#222)

It didn't actually work the way it was written.
Markus Wüstenberg markus@maragu.dk
Wed, 09 Oct 2024 10:48:52 +0200
52357fc5
Remove mention of SVG package in doc comments
Markus Wüstenberg markus@maragu.dk
Thu, 03 Oct 2024 11:36:45 +0200
c094266c
Fix example app to use maragu.dev/gomponents module path (#216)

Markus Wüstenberg markus@maragu.dk
Thu, 03 Oct 2024 11:32:52 +0200
fe24f057
Move module to maragu.dev/gomponents namespace (#215)

This is a breaking change to move gomponents to my own import namespace.

I will obviously be careful with this, test it out in all kinds of
scenarios, release betas, etc. But otherwise, because the `Node`
interface is so simple and has basically never changed, I don't think
this will break much. 🤞

Fixes #200
Markus Wüstenberg markus@maragu.dk
Thu, 03 Oct 2024 11:26:44 +0200
a58043d5
Remove SVG package (#214)

Because the added value of having this was very small, and I don't want
to confuse people about what's properly supported, I've removed the SVG
package. As #196 showed, there can easily be conflicts between HTML and
SVG, and the rendering isn't really set up for anything else than HTML.

It's still easy to create SVG elements: `html.SVG` exists in this repo,
and the rest is often just a string that can be included using `g.Raw`.

Fixes #206
Markus Wüstenberg markus@maragu.dk
Thu, 03 Oct 2024 10:55:52 +0200
b7a00582
Fix `mailto:` in FUNDING.yml not working
Markus Wüstenberg markus@maragu.dk
Thu, 03 Oct 2024 09:46:38 +0200
e3a9a4c5
Add invoicing contact option to readme
Markus Wüstenberg markus@maragu.dk
Thu, 03 Oct 2024 09:45:44 +0200
1b2211f8
Add ExampleMap_index

For getting the slice index using a counter outside the closure.
Markus Wüstenberg markus@maragu.dk
Thu, 26 Sep 2024 11:13:11 +0200
3fa5e676
Fix links in package documentation

Apparently, [Node]s doesn't link in Godoc, while [Node]-s does.
Markus Wüstenberg markus@maragu.dk
Tue, 24 Sep 2024 10:43:37 +0200
04640fcc
Use go workspace in example app (#211)

Markus Wüstenberg markus@maragu.dk
Tue, 24 Sep 2024 10:33:54 +0200
fae592d3
Fix doc comments regarding `Group`
Markus Wüstenberg markus@maragu.dk
Tue, 24 Sep 2024 09:59:35 +0200
f58a0660
Make `Group` a type (#202)

This changes `Group` to be a type instead of a function, which means it
can support both grouping `[]Node` as well as doing variadic-ish slice things
like `Group{n1, n2}`.

This also means that `Map` can just return a `Group`.

Special thanks to @deitrix for this simple and elegant solution that,
for some reason or another, has had me perplexed for a long time.

Fixes #201.
Markus Wüstenberg markus@maragu.dk
Tue, 24 Sep 2024 09:46:45 +0200
3a3de293
Revert "Add Github Pages website deployment workflow (#207)"

This reverts commit a4327a0fb6bd02a3d8fb7677ba118b3b5dd1b3e8.
Markus Wüstenberg markus@maragu.dk
Mon, 23 Sep 2024 20:22:00 +0200
a4327a0f
Add Github Pages website deployment workflow (#207)

Markus Wüstenberg markus@maragu.dk
Fri, 20 Sep 2024 10:13:34 +0200
a8bd2b5e
Remove redundant sentence from readme
Markus Wüstenberg markus@maragu.dk
Thu, 19 Sep 2024 21:50:24 +0200
5d8f3975
Reword readme slightly
Markus Wüstenberg markus@maragu.dk
Thu, 19 Sep 2024 21:49:20 +0200
12acb804
Add full example app (#204)

Also, remove the other examples and simplify the readme.
Markus Wüstenberg markus@maragu.dk
Thu, 19 Sep 2024 21:45:31 +0200
69b0da41
Drop support for Go 1.16 and Go 1.17 (#203)

Fixes #184
Markus Wüstenberg markus@maragu.dk
Thu, 19 Sep 2024 19:33:58 +0200
c97605ac
Make Groups renderable (#181)

This change makes the result of `Group` renderable directly, instead of
panicking, with the important caveat that root-level attributes are
_ignored_. I don't think this will give problems in practice, as the
main use case for rendering `Group` is basically to return root-level
elements to the client using something like HTMX.

I tried adding a `Fragment`, but it was weird and confusing having two
functions (`Group` and `Fragment`) do essentially the same thing, the
only difference being whether the argument was a slice of `Node`s or
varargs.

Fixes #162
Markus Wüstenberg markus@maragu.dk
Thu, 19 Sep 2024 17:03:08 +0200
9c29bfcc
Reduce code duplication by reusing the correct function in deprecated functions (#194)

Yarden Shoham git@yardenshoham.com
Tue, 20 Aug 2024 13:08:37 +0300
935a6019
Fix `cite` name clash example in readme
Markus Wüstenberg markus@maragu.dk
Mon, 19 Aug 2024 12:06:49 +0200
aade7728
Add `cite` attribute (#192)

It can appear in a `<blockquote>`.

- Closes https://github.com/maragudk/gomponents/issues/189

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Yarden Shoham git@yardenshoham.com
Mon, 19 Aug 2024 13:01:33 +0300
033f6ac3
Test on Go 1.23 in CI (#193)

Yarden Shoham git@yardenshoham.com
Sun, 18 Aug 2024 10:12:07 +0300
b2475a76
Add draggable attribute (#185)

Leonardo Silveira sombriks@gmail.com
Mon, 08 Jul 2024 14:52:42 -0300
8b43a908
Add links to godoc (#183)

Also add an example for `http.Adapt`.

Fixes #182
Markus Wüstenberg markus@maragu.dk
Wed, 26 Jun 2024 10:32:46 +0200
a79e6d9d
Add LabelEl (#180)

For consistency with the other name clashes. Also, adjust the readme.

I know it's a bit weird to add a pre-deprecated function, but know it's
the same as the other functions.
Markus Wüstenberg markus@maragu.dk
Tue, 25 Jun 2024 14:47:01 +0200
1c0ceb44
Adjust documentation on Iff (#179)

Markus Wüstenberg markus@maragu.dk
Tue, 25 Jun 2024 13:46:24 +0200
d9708f92
Add datetime attribute (#177)

`<time>`, `<del>` and `<ins>` can receive a
[`datetime`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTimeElement/dateTime)
attribute
Julien Tant 785518+JulienTant@users.noreply.github.com
Fri, 21 Jun 2024 00:24:11 -0700
dafb3daa
Add an `Iff` helper (#172)

I ran into some situation where I want to conditionally render a node if
some variable is not nil and obviously I got a panic

```go
// package viewmodels
type SomePage struct {
	s *string
}

// package views
func SomePage (vm viewmodels.SomePage) g,Node {
	return Div(
		If(vm.s == nil, Text("s is nil"),
		If(vm.s !- nil, Text("s is " + vm.s), // this will panic when `s` is nil
	)
}
```

In this situation, go will interpret the code of the second `if`
regardless of the condition because the code itself is not in a
condition.

This PR introduces a new `Iff` helper that accepts a callback. The
callback content is only interpreted when it's called, making the code
safe:

```go
// package viewmodels
type SomePage struct {
	s *string
}

// package views
func SomePage (vm viewmodels.SomePage) g,Node {
	return Div(
		Iff(vm.s == nil, func () g.Node { return Text("s is nil") },
		Iff(vm.s !- nil, func () g.Node { return Text("s is " + vm.s) },
	)
}
```

I'm aware of the `Lazy` effort on the side, but I guess this is no a
breaking change and can still exist in addition to the `Lazy` effort.

Co-authored-by: Markus Wüstenberg <markus@maragu.dk>
Julien Tant 785518+JulienTant@users.noreply.github.com
Wed, 19 Jun 2024 01:43:52 -0700
a75b2533
Add dir (#176)

`dir` is a global attribute that lets you specify whether text is RTL or
LTR or if it should be determined by the browser.

Documentation:
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir
Amr Ojjeh amrojjeh@outlook.com
Wed, 19 Jun 2024 03:40:13 -0500
b950ec2c
Add LabelAttr and List attributes (#175)

Fixes #168 and fixes #169.
Markus Wüstenberg markus@maragu.dk
Thu, 06 Jun 2024 12:49:01 +0200
81b2d6a9
Deprecate DataAttr, StyleAttr, TitleAttr, FormEl (#174)

This change addresses #170 by deprecating some HTML helpers in favor of
using one of the styles as a main one, selected based on what I think is
the main use case.

- For `Data`, it's the attribute. I don't see much use of the `<data>`
element in the wild.
- For `Style`, it's the attribute. The `style` attribute is everywhere,
the `<style>` element is perhaps less so (but not much). This was the
hardest one to decide.
- For `Title`, it's the attribute. The `<title>` element only shows up
once per document.
- For `Form`, it's the element. I haven't seen much use of the `form`
attribute in the wild.

I know this is arguably not a "consistent" approach, but I think it
makes for a much nicer API, simply because the most-used option will not
be a suffixed version.
Markus Wüstenberg markus@maragu.dk
Thu, 06 Jun 2024 12:43:15 +0200
d944acd3
Add script's `integrity` and `crossorigin` attributes (#173)

When using `<script>` to pull a library from a CDN, it's usually a good
idea to attach an integrity check so that if they get hacked and someone
changes all the script, malicious scripts don't get executed on your
website.

To achieve this, you need to attach `integrity` and `crossorigin` to
your `<script/>` tag

```go
Script(
	Scr("https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js"),
	Integrity("sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW"),
	CrossOrigin("anonymous"),
)
```
Turns into
```html
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js" 
    integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" 
    crossorigin="anonymous"></script>
```

Hint for whoever likes unpkg.com, adding `?meta` at the end of any
script you import form them will give you the current `integrity` for
the file. Example: https://unpkg.com/three@0.165.0/build/three.cjs?meta
Markus Wüstenberg markus@maragu.dk
Thu, 06 Jun 2024 09:23:55 +0200
5fa128bc
Revert "Add Marquee element promotion to readme"

This reverts commit b33f84310916b238af0006fb151a4b980721bc33.
Markus Wüstenberg markus@maragu.dk
Mon, 29 Apr 2024 11:16:22 +0200
b33f8431
Add Marquee element promotion to readme
Markus Wüstenberg markus@maragu.dk
Wed, 13 Mar 2024 09:06:47 +0100
90b1f2d7
Just call it HTML components in readme
Markus Wüstenberg markus@maragu.dk
Tue, 12 Mar 2024 17:34:55 +0100
4e1554d6
Fix wrong codecov (#166)

We don't need coverage for the example code and internal testing
helpers.
Markus Wüstenberg markus@maragu.dk
Fri, 09 Feb 2024 10:38:07 +0100
42fbfd40
Test on Go 1.22 in CI (#165)

Markus Wüstenberg markus@maragu.dk
Fri, 09 Feb 2024 10:32:46 +0100
1f0bb2a2
Move logo in readme
Markus Wüstenberg markus@maragu.dk
Fri, 12 Jan 2024 09:55:05 +0100
8f2d9685
Create FUNDING.yml
Markus Wüstenberg markus@maragu.dk
Fri, 12 Jan 2024 09:23:37 +0100
e4512050
Fix logo size in readme
Markus Wüstenberg markus@maragu.dk
Fri, 12 Jan 2024 09:15:57 +0100
a017fc91
Add logo to readme
Markus Wüstenberg markus@maragu.dk
Fri, 12 Jan 2024 09:12:16 +0100
d81de831
Test Go 1.21 in CI (#147)

Markus Wüstenberg markus@maragu.dk
Fri, 08 Sep 2023 11:03:47 +0200
a9890f53
Add "checked" bool attribute (#136)

Fixes #127.
Markus Wüstenberg markus@maragu.dk
Thu, 11 May 2023 11:23:18 +0200
4f9709af
Document Text/Textf helpers better (#135)

Both in the readme and package doc.

Fixes #133.
Markus Wüstenberg markus@maragu.dk
Thu, 11 May 2023 10:08:27 +0200
b638b8b0
Test with Go 1.20 in CI (#134)

Fixes #129.
Markus Wüstenberg markus@maragu.dk
Thu, 04 May 2023 09:49:50 +0200
8e4b1319
Add Step attribute (#126)

See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step

Fixes #120.
Markus Wüstenberg markus@maragu.dk
Tue, 17 Jan 2023 13:05:47 +0100
e11dcad5
Add ColSpan and RowSpan attributes (#125)

Markus Wüstenberg markus@maragu.dk
Tue, 17 Jan 2023 13:00:16 +0100
866b767b
Remove year from LICENSE (#121)

Markus Wüstenberg markus@maragu.dk
Tue, 03 Jan 2023 10:26:51 +0100
c1095faa
Upgrade codecov-action to v3 in CI (#119)

Markus Wüstenberg markus@maragu.dk
Tue, 15 Nov 2022 22:33:33 +0100
c6152042
Put .PHONY in front of each target in Makefile (#118)

Markus Wüstenberg markus@maragu.dk
Tue, 15 Nov 2022 22:32:01 +0100
868a5252
Rename master branch to main (#117)

Markus Wüstenberg markus@maragu.dk
Tue, 15 Nov 2022 22:19:09 +0100
a5a7242a
Add stroke-width SVG attribute (#116)

Markus Wüstenberg markus@maragu.dk
Tue, 15 Nov 2022 14:48:01 +0100
b12942fb
Delete low-value helper components (#115)

I'd rather reserve the package for components that have proven
repeatedly useful, like `Classes` and `HTML5`.
Markus Wüstenberg markus@maragu.dk
Thu, 03 Nov 2022 11:32:16 +0100
3bb4e3ef
Add Rawf (#114)

Like `Raw`, but interpolates like `Textf`.
Markus Wüstenberg markus@maragu.dk
Thu, 03 Nov 2022 11:24:26 +0100
34df17d3
Add Go report card to readme (#111)

Also fix godoc badge to point to pkg.go.dev.
Markus Wüstenberg markus@maragu.dk
Mon, 17 Oct 2022 14:09:37 +0200
0e52e944
Fix small typo occured -> occurred (#110)

Markus Wüstenberg markus@maragu.dk
Mon, 17 Oct 2022 14:04:24 +0200
32ad318c
Add EncType html attribute (#109)

Markus Wüstenberg markus@maragu.dk
Thu, 29 Sep 2022 12:46:36 +0200
f387a712
Add generic Map implementation (#108)

Instead of waiting for a good time to switch the `Map` implementation,
I've decided to just offer two implementations: one for Go versions
before 1.18, and one for 1.18 and onwards. This is achieved using build
tags in the source files.

This is obviously a breaking change for consumers of this library that
use Go 1.18 and onwards.

See #88
Markus Wüstenberg markus@maragu.dk
Thu, 22 Sep 2022 09:41:06 +0200
3334d6c7
Add Go 1.19 to test matrix (#107)

Markus Wüstenberg markus@maragu.dk
Wed, 21 Sep 2022 10:42:07 +0200
3e992ed6
Use output of strings.Builder in assert.Equal (#106)

Markus Wüstenberg markus@maragu.dk
Wed, 21 Sep 2022 10:37:44 +0200
f4da48fb
Make void elements a map (#103)

Makes it easier to lookup by name.

Also, fixed some doc comments.
Markus Wüstenberg markus@maragu.dk
Fri, 27 May 2022 14:16:19 +0200
c868c525
Update package doc to reflect new content (#102)

It hadn't been updated in a while.
Markus Wüstenberg markus@maragu.dk
Wed, 25 May 2022 14:36:26 +0200
97698614
Fix CI badge in Readme (#100)

Markus Wüstenberg markus@maragu.dk
Wed, 25 May 2022 11:01:53 +0200
b016f271
Update CI config (#98)

- Drop current test workflows if a new one has come in
- Use newer checkout and setup actions
- Delete CodeQL workflow
Markus Wüstenberg markus@maragu.dk
Wed, 25 May 2022 10:21:27 +0200
565c60a8
Update copyright year in license
Markus Wüstenberg markus@maragu.dk
Mon, 21 Mar 2022 12:22:32 +0100
540b2a34
Use a test matrix with the last three stable Go versions (#96)

Markus Wüstenberg markus@maragu.dk
Mon, 21 Mar 2022 12:05:17 +0100
0001b1d6
Add http.Adapt function (#92)

In the new package `http`, an `Adapt` function converts a `Handler` into a `http.HandlerFunc` from the `http` stdlib package.
Markus Wüstenberg markus@maragu.dk
Fri, 08 Oct 2021 15:00:20 +0200
44c27448
Test using Go 1.17 (#91)

Also set the new `-shuffle` flag when testing.
Markus Wüstenberg markus@maragu.dk
Wed, 06 Oct 2021 20:51:31 +0200
4858e5d4
Mark the assert test helpers as such (#90)

Using `t.Helper()`.

Also move the assert package to be internal.
Markus Wüstenberg markus@maragu.dk
Wed, 06 Oct 2021 20:49:43 +0200
33524d68
Add loading and srcset HTML attributes (#86)

Useful for `img` and `picture` elements.

Fixes #85.

Co-authored-by: Josep Jesus Bigorra Algaba <josep@prowarehouse.nl>
Josep Jesus Bigorra Algaba 42377845+averageflow@users.noreply.github.com
Tue, 07 Sep 2021 12:09:57 +0200
bd722def
Add link to maragu.dk and golang.dk in readme
Markus Wüstenberg markus@maragu.dk
Fri, 18 Jun 2021 10:35:58 +0200
aca5cdfe
Add Github action status badge to readme
Markus Wüstenberg markus@maragu.dk
Fri, 18 Jun 2021 10:10:55 +0200
1ed5851e
Add contributors file
Markus Wüstenberg markus@maragu.dk
Fri, 18 Jun 2021 10:09:00 +0200
ec86ca5c
Add video element and related attributes (#84)

Adds the `video` element and `loop`, `muted`, `playsinline`, `poster` attributes.
Markus Wüstenberg markus@maragu.dk
Fri, 18 Jun 2021 09:39:47 +0200
0efc71d6
Add javascript alert onclick handler to Raw example (#82)

Makes for fun XSS testing.
Markus Wüstenberg markus@maragu.dk
Wed, 09 Jun 2021 10:56:22 +0200
ba0d83f4
Add examples in test files (#80)

These show up in godoc.
Markus Wüstenberg markus@maragu.dk
Tue, 08 Jun 2021 18:12:04 +0200
7c0f2e4c
Add LinkStylesheet and LinkPreload components (#79)

These are often used in the `<head>` part of the HTML.
Markus Wüstenberg markus@maragu.dk
Tue, 08 Jun 2021 16:52:57 +0200
3e9e00ca
Escape Attr values (#77)

Because this can be a place of injection if untrusted data is passed, escape all attribute values.

Fixes #74.
Markus Wüstenberg markus@maragu.dk
Tue, 18 May 2021 14:21:53 +0200
ac7471aa
Fix TailwindCSS CDN URL in example (#76)

The CSS style URLs from unpkg.com redirected to a different page, but the first request set a `Content-Type` header of `text/plain`. Using the direct URLs fixes this.

Fixes #75. Thanks to @gedw99 for reporting.
Markus Wüstenberg markus@maragu.dk
Tue, 11 May 2021 16:39:04 +0200
1072ec9b
Update readme with content from website (#73)

Markus Wüstenberg markus@maragu.dk
Fri, 07 May 2021 14:40:55 +0200
d34b28be
Bump Go version to 1.16 in CI (#72)

Markus Wüstenberg markus@maragu.dk
Fri, 07 May 2021 14:35:47 +0200
e6538392
Add more complex example using TailwindCSS (#71)

Markus Wüstenberg markus@maragu.dk
Fri, 07 May 2021 14:12:23 +0200
6f7752c2
Add svg package and a few helpers (#67)

Introducing SVG, to inline vector graphics in your HTML! 🥳
Markus Wüstenberg markus@maragu.dk
Wed, 05 May 2021 12:53:32 +0200
eb1d1f22
Fix code in readme (#69)

Broken in #66.
Markus Wüstenberg markus@maragu.dk
Wed, 05 May 2021 09:53:19 +0200
6f3eea40
Update license year (#68)

Markus Wüstenberg markus@maragu.dk
Wed, 05 May 2021 09:51:42 +0200
3b7dceab
Streamline HTML element API (#66)

There were a lot of elements previously, like `Em`, `H1`, and a lot more, that took a string as the first argument previously. This was weird when you wanted to mix elements to output html like `<strong><em>…</em></strong>` or `<h1>Something <em>something</em> something</h1>`. gomponents is not an HTML validator, so I want people to be able to use elements however they please, also without text content.

This also means that all elements now have the same API.
Markus Wüstenberg markus@maragu.dk
Wed, 05 May 2021 09:03:16 +0200
5d2f0f1b
Use g.If in HTML5 helper (#65)

Inlining looks much nicer.
Markus Wüstenberg markus@maragu.dk
Wed, 28 Apr 2021 10:42:49 +0200
c899a050
Return Node from all helpers instead of NodeFunc (#62)

This makes it clearer that the helpers return a `Node` of any kind, and that the type is not important.

This also streamlines the API, as attribute helpers already return just `Node`.
Markus Wüstenberg markus@maragu.dk
Thu, 07 Jan 2021 10:20:03 +0100
d41c4e5a
Add data- attribute helper (#61)

Fixes #49.
Markus Wüstenberg markus@maragu.dk
Tue, 22 Dec 2020 11:46:49 +0100
b4918d5a
Add test for InputHidden (#60)

Markus Wüstenberg markus@maragu.dk
Tue, 22 Dec 2020 11:12:45 +0100
6efec217
Add aria-* and role attributes (#59)

Fixes #50.
Markus Wüstenberg markus@maragu.dk
Tue, 22 Dec 2020 11:07:33 +0100
f22ce3fb
Add If helper function (#57)

Used to inline conditional nodes.
Markus Wüstenberg markus@maragu.dk
Tue, 22 Dec 2020 10:53:22 +0100
428a2519
Change main example to be the dot-import version (#56)

Markus Wüstenberg markus@maragu.dk
Thu, 10 Dec 2020 14:27:10 +0100
febffb60
Simplify available elements (#55)

`a`, `form`, `img`, `input`, `label`, `option`, `progress`, `select`, and `textarea` are now just regular elements (without helper parameters), because:
- Sometimes the use case doesn't fit (`a` as anchor without href, for example)
- There's no reason these are special among the others, so streamlining them makes sense

Also added new attributes `action`, `alt`, `for`, `method` that I had somehow missed.
Markus Wüstenberg markus@maragu.dk
Thu, 10 Dec 2020 14:20:33 +0100
100ae9e8
Rename Document to Doctype (#54)

Markus Wüstenberg markus@maragu.dk
Thu, 10 Dec 2020 13:13:10 +0100
a7626265
Move elements and attributes into html package (#52)

This makes it easier to use dot-imports.

Also updated the readme and examples with new usage, and move the `Classes` helper into the `components` package.
Markus Wüstenberg markus@maragu.dk
Thu, 10 Dec 2020 13:00:23 +0100
a7e24c6c
Minor refactoring and comment changes (#51)

Markus Wüstenberg markus@maragu.dk
Tue, 08 Dec 2020 21:59:47 +0100
44b18894
Add example with dot imports (#47)

Markus Wüstenberg markus@maragu.dk
Tue, 17 Nov 2020 14:50:42 +0100
633b000d
Add svg element (#46)

Also add `cols` and `rows` attributes.

Fixes #43.
Markus Wüstenberg markus@maragu.dk
Mon, 16 Nov 2020 13:03:54 +0100
108f8d9b
Add NodeType which replaces the Placer interface (#45)

The `Placer` interface was a weird interface that tried to abstract away nodes being elements or attributes, but it doesn't really make sense. Now `Nodes` just have a `NodeType`.
Markus Wüstenberg markus@maragu.dk
Mon, 16 Nov 2020 12:58:42 +0100
794c3b26
Render correct HTML5 (#44)

Previously, elements of kind void and empty elements generally would be rendered auto-closing (with a final `/` character in the start tag), which is allowed sometimes but arguably wrong. See https://dev.w3.org/html5/spec-LC/syntax.html#end-tags

This created problems with for example `textarea` and `script`, which cannot be auto-closing, or the browser renders it wrong.

Also clarified in the docs that this library outputs HTML5.

Fixes #42.
Markus Wüstenberg markus@maragu.dk
Mon, 16 Nov 2020 12:38:24 +0100
87d09c38
Add package docs (#41)

Also update readme with features.
Markus Wüstenberg markus@maragu.dk
Mon, 02 Nov 2020 11:05:23 +0100
267d40bb
Add Map function (#40)

`Map` makes it easier to build lists of elements without having to iterate.
Markus Wüstenberg markus@maragu.dk
Mon, 02 Nov 2020 10:59:16 +0100
6c8f0c23
Render to Writer instead of string (#39)

The Render function has been changed to take a `Writer` instead of returning a string. This makes it possible to generate documents without having the whole content in memory.

This also removes the `gomponents.Write` function, which is now redundant.

Furthermore, the `el.Document` function has been changed to only take one child, as multiple children never make sense for it. (It's not even a child, more a sibling.)
Markus Wüstenberg markus@maragu.dk
Mon, 02 Nov 2020 10:03:05 +0100
92ba5904
Remove fmt.Sprintf call in attribute Render (#38)

Just concatenating the strings is much faster.

Before:

```
make benchmark
go test -bench=.
goos: darwin
goarch: amd64
pkg: github.com/maragudk/gomponents
BenchmarkAttr/boolean_attributes-8         	 8194791	       139 ns/op
BenchmarkAttr/name-value_attributes-8      	 5143292	       229 ns/op
PASS
ok  	github.com/maragudk/gomponents	2.841s
```

After:

```
make benchmark
go test -bench=.
goos: darwin
goarch: amd64
pkg: github.com/maragudk/gomponents
BenchmarkAttr/boolean_attributes-8         	16755404	        67.0 ns/op
BenchmarkAttr/name-value_attributes-8      	10208625	       116 ns/op
PASS
ok  	github.com/maragudk/gomponents	2.702s
```
Markus Wüstenberg markus@maragu.dk
Thu, 29 Oct 2020 15:40:14 +0100
f277d194
Pass attributes as pointers (#37)

Markus Wüstenberg markus@maragu.dk
Thu, 29 Oct 2020 13:07:22 +0100
3df42084
Add HTML5 document template (#36)

Markus Wüstenberg markus@maragu.dk
Thu, 29 Oct 2020 12:03:43 +0100
13701c4f
Add attribute helpers (#35)

Also refactor tests to be table-driven, for readability.
Markus Wüstenberg markus@maragu.dk
Wed, 28 Oct 2020 16:59:04 +0100
18e90339
Add element helpers and refactor (#34)

This change adds a lot of element helpers, and refactors:
- helpers into simple, text, and other helpers
- most tests into table-driven tests, so they're easier to read

Thanks to @oderwat for pushing me to improve the tests. 😉
Markus Wüstenberg markus@maragu.dk
Wed, 28 Oct 2020 16:16:18 +0100
8f17dba6
Add contributing instructions (#33)

Markus Wüstenberg markus@maragu.dk
Fri, 23 Oct 2020 14:32:55 +0200
c6c5fbd0
Add br and hr element helpers (#30)

Hans Raaf hara@oderwat.de
Fri, 23 Oct 2020 14:12:47 +0200
c99025e6
Remove "fmt" import in readme example (#31)

Also style menu in simple example slightly.
Hans Raaf hara@oderwat.de
Fri, 23 Oct 2020 12:32:47 +0200
3198b254
Don't render or error on nil children (#32)

This makes it easier to e.g. conditionally skip a component for rendering.
Markus Wüstenberg markus@maragu.dk
Fri, 23 Oct 2020 12:14:23 +0200
6d2fb0ee
Add Group function to group Nodes (#29)

Markus Wüstenberg markus@maragu.dk
Thu, 22 Oct 2020 09:07:57 +0200
f2a2b949
Update package doc for gomponents (#28)

Markus Wüstenberg markus@maragu.dk
Wed, 21 Oct 2020 22:17:27 +0200
42433a4a
Use HTMLEscapeString in Textf (#27)

Markus Wüstenberg markus@maragu.dk
Wed, 21 Oct 2020 21:59:52 +0200
4448a48d
Add remaining sectioning elements as helpers (#25)

Fixes #22.
Markus Wüstenberg markus@maragu.dk
Fri, 25 Sep 2020 17:36:21 +0200
83faa4ca
Use HTMLEscapeString (#24)

HTMLEscaper is not needed with strings.
Markus Wüstenberg markus@maragu.dk
Fri, 25 Sep 2020 13:39:55 +0200
5d593389
Update readme with blog post link (#23)

Markus Wüstenberg markus@maragu.dk
Fri, 25 Sep 2020 12:32:50 +0200
5da578cf
Group element helpers in different files (#21)

According to the section at https://developer.mozilla.org/en-US/docs/Web/HTML/Element
Markus Wüstenberg markus@maragu.dk
Fri, 25 Sep 2020 09:57:47 +0200
77b64b13
Add space before auto-closing element (#20)

Markus Wüstenberg markus@maragu.dk
Thu, 24 Sep 2020 21:55:11 +0200
5929ba8c
Add convenience helpers for form elements (#19)

Markus Wüstenberg markus@maragu.dk
Thu, 24 Sep 2020 21:17:15 +0200
4c109f9f
Introduce Placer interface (#18)

When implemented, the `Place` method of the `Placer` interface tells `Render` in `El` where to put a Node. This is relevant for helpers that want to be rendered like attributes, inside the parent element.

Fixes the bug where `attr.Classes` was rendered outside the element.
Markus Wüstenberg markus@maragu.dk
Thu, 24 Sep 2020 13:19:52 +0200
f27cb0c0
Add Textf function (#17)

Like Text, but calls fmt.Sprintf before rendering.
Markus Wüstenberg markus@maragu.dk
Wed, 23 Sep 2020 22:10:35 +0200
3de9270f
Add better example in readme (#16)

Markus Wüstenberg markus@maragu.dk
Wed, 23 Sep 2020 22:05:59 +0200
eb2cfa10
Add children varargs to h1-6, b, strong, i, em, img helpers (#15)

This makes it possible to add attributes.
Markus Wüstenberg markus@maragu.dk
Wed, 23 Sep 2020 20:35:16 +0200
05c31515
Make attr.Classes a map type (#14)

This makes the usage syntax prettier. Instead of `attr.Classes(map[string]bool{})`, we can just use `attr.Classes{}`.
Markus Wüstenberg markus@maragu.dk
Wed, 23 Sep 2020 20:30:14 +0200
c832941e
Add simple example (#13)

Markus Wüstenberg markus@maragu.dk
Mon, 21 Sep 2020 16:30:29 +0200
18b52ffd
Add a test for attr.String (#12)

Markus Wüstenberg markus@maragu.dk
Mon, 21 Sep 2020 16:07:39 +0200
d78ed7ef
Add a Write function (#11)

Markus Wüstenberg markus@maragu.dk
Mon, 21 Sep 2020 11:27:37 +0200
8de5a685
Add a lot of common elements (#10)

Especially add elements that are either used in every document, that nearly always have text content, or that are almost always used with certain attributes.
Markus Wüstenberg markus@maragu.dk
Mon, 21 Sep 2020 11:23:47 +0200
02d963de
Don't render twice with children (#9)

Markus Wüstenberg markus@maragu.dk
Mon, 21 Sep 2020 11:14:37 +0200
4d9f1c2a
Add package el with element helpers (#8)

Markus Wüstenberg markus@maragu.dk
Fri, 18 Sep 2020 15:01:10 +0200
f7812a9f
Add package attr with attribute helpers (#7)

Markus Wüstenberg markus@maragu.dk
Fri, 18 Sep 2020 14:44:47 +0200
f9d584c9
Make NodeFunc and attr implement fmt.Stringer (#6)

Markus Wüstenberg markus@maragu.dk
Fri, 18 Sep 2020 14:38:09 +0200
e8faab52
Try out codecov.io (#5)

Markus Wüstenberg markus@maragu.dk
Fri, 18 Sep 2020 14:05:53 +0200
15d2cc93
Add Makefile (#4)

Markus Wüstenberg markus@maragu.dk
Fri, 18 Sep 2020 13:57:04 +0200
a564fd6c
Create codeql-analysis.yml (#3)

Markus Wüstenberg markus@maragu.dk
Tue, 15 Sep 2020 09:40:58 +0200
ad47ed56
Add godoc link to readme (#2)

Markus Wüstenberg markus@maragu.dk
Mon, 14 Sep 2020 10:51:29 +0200
ca80dce0
Add package documentation (#1)

Markus Wüstenberg markus@maragu.dk
Mon, 14 Sep 2020 10:47:14 +0200
fc3cc0f0
Add first implementation of Node, El, Attr, Text
Markus Wüstenberg markus@wustenberg.dk
Sun, 13 Sep 2020 22:50:19 +0200
f26f56cc
Make version numbers strings in yaml
Markus Wüstenberg markus@maragu.dk
Thu, 04 May 2023 09:48:27 +0200
b1f7754c
Test with Go 1.20 in CI
Markus Wüstenberg markus@maragu.dk
Thu, 04 May 2023 09:46:20 +0200
c129ae8d
Document Text/Textf helpers better

Both in the readme and package doc.

Fixes #133.
Markus Wüstenberg markus@maragu.dk
Thu, 11 May 2023 10:06:23 +0200
4248e85d
Add "checked" bool attribute

Fixes #127.
Markus Wüstenberg markus@maragu.dk
Thu, 11 May 2023 11:22:01 +0200
21413864
Test Go 1.21 in CI
Markus Wüstenberg markus@maragu.dk
Fri, 08 Sep 2023 11:01:06 +0200
079fcc99
Test on Go 1.22 in CI
Markus Wüstenberg markus@maragu.dk
Fri, 09 Feb 2024 10:29:34 +0100
2c55418b
Fix wrong codecov

We don't need coverage for the example code and internal testing helpers.
Markus Wüstenberg markus@maragu.dk
Fri, 09 Feb 2024 10:36:03 +0100
600b6c34
add script's integrity and crossorigin attributes
Julien Tant julien@craftyx.fr
Wed, 05 Jun 2024 16:54:52 -0700
0b85f722
Fix readme
Markus Wüstenberg markus@maragu.dk
Thu, 06 Jun 2024 12:01:16 +0200
d55a223e
Deprecate DataAttr, StyleAttr, TitleAttr, FormEl

This change addresses #170 by deprecating some HTML helpers in favor of using one of the styles as a main one,
selected based on what I think is the main use case.

- For `Data`, it's the attribute. I don't see much use of the `<data>` element in the wild.
- For `Style`, it's the attribute. The `style` attribute is everywhere, the `<style>` element is perhaps less so (but not much). This was the hardest one to decide.
- For `Title`, it's the attribute. The `<title>` element only shows up once per document.
- For `Form`, it's the element. I haven't seen much use of the `data` attribute in the wild.

I know this is arguably not a "consistent" approach, but I think it makes for a much nicer API, simply because the most-used option will not be a suffixed version.
Markus Wüstenberg markus@maragu.dk
Thu, 06 Jun 2024 11:56:27 +0200