Skip to content

Releases: pveyes/htmr

v1.0.2

11 Aug 09:34
1be37c7
Compare
Choose a tag to compare
  • Fix peer dependencies for react 18
  • Fix react-native imports
  • Fix item* attributes

v1.0.1

06 Aug 06:00
4d660d5
Compare
Choose a tag to compare

Fix non-boolean attribute treatment #138

Previously these HTML trigger react warning because it satisfies boolean attribute value requirement (value equals to attribute name, or empty string).

<img alt="alt" />
<div class=""></div>

It's rendered into

// jsx equivalent
<img alt={true} />
<div className={true}></div>

Now htmr will validate whether the attribute is boolean attribute before using boolean value. If not, the attribute will simply be forwarded as is

Example above now rendered as

// jsx equivalent
<img alt="alt" />
<div className=""></div>

v1.0.0

10 May 06:07
Compare
Choose a tag to compare

First stable release! 🚀

  • React 17 support
  • Reduced client bundle by relying more on DOM #127
  • major update for server dependencies (html-entities
  • CSS custom properties support in style attribute

v0.10.0

18 Feb 13:00
Compare
Choose a tag to compare
  • update htmlparser2 to v6

v0.9.2

18 Feb 13:01
9982b03
Compare
Choose a tag to compare
  • Empty child for dangerouslySetChildren is now allowed

Previously, these don't work

htmr('<style></style>');
htmr('<script></script>', { dangerouslySetChildren: ['script'] });

v0.9.1

18 Feb 13:04
3994728
Compare
Choose a tag to compare
  • Fixed type definition where ref conflict

v0.9.0

06 Oct 03:41
95d3e44
Compare
Choose a tag to compare
  • exported HtmrOptions as top-level named export
import { HtmrOptions } from 'htmr'
  • Better props type annotation for transform
const transform: HtmrOptions = {
  a: props => {
    // props is now automatically inferred
    if (props.href.startsWith('http') {
    }
  }
}
  • SVG tags support
const transform: HtmrOptions = {
  svg: props => {
    return <>{props.viewBox}</>
  }
}
  • Fixed type definition for default transform return value
  • Fixed viewBox warning when rendering svg element

v0.8.8

16 Aug 07:53
Compare
Choose a tag to compare

fix server-side parser for script tag (#115)

v0.8.7

01 Feb 03:11
Compare
Choose a tag to compare

Fixed XSS issue in DOM based parser

v0.8.6

09 Sep 13:17
Compare
Choose a tag to compare

Fixed transform doesn't get applied when using dangerouslySetChildren