@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-07-02T12:48:17Z
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
@@ -315,7 +315,7 @@ Browser ESM import:
315
315
 
316
316
  [JSDelivr documentation](https://www.jsdelivr.com/)
317
317
 
318
- Package sizes (brotli'd, pre-treeshake): ESM: 4.23 KB
318
+ Package sizes (brotli'd, pre-treeshake): ESM: 4.24 KB
319
319
 
320
320
  ## Dependencies
321
321
 
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.4.3",
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": "4a2f35b6e720cc4ad3e2ff2549b78beb3f80732e\n"
148
+ "gitHead": "4e1794f6c951adb73c27c3e6c08f7138d9445e8b\n"
149
149
  }