Skip to content

Commit 7a12dfb

Browse files
[ci] release
1 parent b3b4f75 commit 7a12dfb

9 files changed

+57
-87
lines changed

.changeset/bright-garlics-destroy.md

-47
This file was deleted.

.changeset/eleven-dingos-study.md

-5
This file was deleted.

.changeset/pre.json

-14
This file was deleted.

.changeset/pretty-mangos-prove.md

-5
This file was deleted.

.changeset/short-ligers-occur.md

-5
This file was deleted.

.changeset/ten-feet-change.md

-5
This file was deleted.

.changeset/twelve-hornets-sin.md

-5
This file was deleted.

CHANGELOG.md

+56
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,61 @@
11
# ultrahtml
22

3+
## 1.0.0
4+
5+
### Major Changes
6+
7+
- 95c0f73: `ultrahtml` is a complete markup toolkit with a tiny footprint. Parse, transform, and render HTML on the server, in the browser, with or without a build step.
8+
9+
## Breaking Changes
10+
11+
The signature of `transform` has been updated. Rather than applying sanitization and component swapping by default, these have been split out to individual `ultrahtml/transformers` that can be applied modularly.
12+
13+
In `[email protected]`, `transform` accepted an options object with `sanitize` and `components`. Other transformations would need to be applied outside of this flow.
14+
15+
```js
16+
import { transform } from "ultrahtml";
17+
18+
await transform(markup, {
19+
components: { h1: "h2" },
20+
sanitize: { allowElements: ["h1", "h2", "h3"] }
21+
});
22+
```
23+
24+
In `[email protected]`, `transform` accepts an array of transformers to apply. The `sanitize` and `components` options can be handled with the built-in transformers named `sanitize` and `swap`.
25+
26+
```js
27+
import { transform } from "ultrahtml";
28+
import swap from "ultrahtml/transformers/swap";
29+
import sanitize from "ultrahtml/transformers/sanitize";
30+
31+
await transform(markup, [
32+
swap({ h1: "h2" }),
33+
sanitize({ allowElements: ["h1", "h2", "h3"] })
34+
]);
35+
```
36+
37+
## New Features
38+
39+
### JSX Runtime
40+
41+
`ultrahtml` now comes with `h` and `Fragment` functions for JSX, as well as a `jsx-runtime` export.
42+
43+
### Tranformers
44+
45+
Transformers are AST transformations that can be applied to any `ultrahtml` Node. Usually these are applied to entire documents.
46+
47+
**New** `inline` transformer inlines CSS from `<style>` blocks directly to matching elements.
48+
49+
**New** `scope` transformer scopes CSS from `<style>` blocks to the elements in a given document or component.
50+
51+
### Patch Changes
52+
53+
- 4699020: Update JSX runtime child handling
54+
- da119c1: Fix transformer definitions
55+
- d29a0e2: Add `resolveAsset` option to the `inline` transformer
56+
- 401b13a: Fix JSX runtime types
57+
- 44a771e: Update list of void HTML tags
58+
359
## 1.0.0-next.4
460

561
### Patch Changes

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ultrahtml",
33
"type": "module",
4-
"version": "1.0.0-next.4",
4+
"version": "1.0.0",
55
"types": "./dist/index.d.ts",
66
"repository": {
77
"type": "git",

0 commit comments

Comments
 (0)