@thi.ng/rdom 1.4.3 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -1
- package/README.md +1 -1
- package/dom.d.ts +1 -0
- package/dom.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2024-07-
|
|
3
|
+
- **Last updated**: 2024-07-03T08:50:04Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
@@ -9,6 +9,13 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
9
9
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
10
|
and/or version bumps of transitive dependencies.
|
|
11
11
|
|
|
12
|
+
## [1.5.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@1.5.0) (2024-07-03)
|
|
13
|
+
|
|
14
|
+
#### 🚀 Features
|
|
15
|
+
|
|
16
|
+
- add support for no-arg fns in child positions ([6327fd3](https://github.com/thi-ng/umbrella/commit/6327fd3))
|
|
17
|
+
- update `$tree()` to support no-arg functions in child positions
|
|
18
|
+
|
|
12
19
|
### [1.4.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@1.4.1) (2024-06-21)
|
|
13
20
|
|
|
14
21
|
#### 🩹 Bug fixes
|
package/README.md
CHANGED
package/dom.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import type { NumOrElement } from "./api.js";
|
|
|
14
14
|
* - `[COMMENT, "foo", "bar"...]` (DOM comment node)
|
|
15
15
|
* - `[IComponent, ...mountargs]`
|
|
16
16
|
* - `[function, ...args]`
|
|
17
|
+
* - `["tag", {...attribs}, noArgFunction, "other"]`
|
|
17
18
|
* - ES6 iterable of the above (for child values only!)
|
|
18
19
|
*
|
|
19
20
|
* Any other values will be cast to strings and added as spans to current
|
package/dom.js
CHANGED
|
@@ -17,7 +17,7 @@ import { mergeClasses, mergeEmmetAttribs } from "@thi.ng/hiccup/attribs";
|
|
|
17
17
|
import { formatPrefixes } from "@thi.ng/hiccup/prefix";
|
|
18
18
|
import { XML_SVG, XML_XLINK, XML_XMLNS } from "@thi.ng/prefixes/xml";
|
|
19
19
|
import { isComment, isComponent } from "./checks.js";
|
|
20
|
-
const $tree = async (tree, parent, idx = -1) => isArray(tree) ? isComment(tree) ? $comment(tree.slice(1), parent, idx) : $treeElem(tree, parent, idx) : isComponent(tree) ? tree.mount(parent, idx) : isDeref(tree) ? $tree(tree.deref(), parent) : isNotStringAndIterable(tree) ? $treeIter(tree, parent) : tree != null ? $el("span", null, tree, parent, idx) : null;
|
|
20
|
+
const $tree = async (tree, parent, idx = -1) => isArray(tree) ? isComment(tree) ? $comment(tree.slice(1), parent, idx) : $treeElem(tree, parent, idx) : isComponent(tree) ? tree.mount(parent, idx) : isDeref(tree) ? $tree(tree.deref(), parent) : isFunction(tree) ? $tree(tree(), parent, idx) : isNotStringAndIterable(tree) ? $treeIter(tree, parent) : tree != null ? $el("span", null, tree, parent, idx) : null;
|
|
21
21
|
const $treeElem = (tree, parent, idx) => {
|
|
22
22
|
const tag = tree[0];
|
|
23
23
|
return isString(tag) ? $treeTag(tree, parent, idx) : (
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/rdom",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Lightweight, reactive, VDOM-less UI/DOM components with async lifecycle and @thi.ng/hiccup compatible",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -145,5 +145,5 @@
|
|
|
145
145
|
],
|
|
146
146
|
"year": 2020
|
|
147
147
|
},
|
|
148
|
-
"gitHead": "
|
|
148
|
+
"gitHead": "4e1794f6c951adb73c27c3e6c08f7138d9445e8b\n"
|
|
149
149
|
}
|