@thi.ng/rdom 1.4.2 → 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-06-29T09:28:36Z
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
 
@@ -366,6 +366,7 @@ directory are using this package:
366
366
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/rdom-lazy-load.png" width="240"/> | Lazy loading components via @thi.ng/rdom | [Demo](https://demo.thi.ng/umbrella/rdom-lazy-load/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rdom-lazy-load) |
367
367
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/rdom-lissajous.png" width="240"/> | rdom & hiccup-canvas interop test | [Demo](https://demo.thi.ng/umbrella/rdom-lissajous/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rdom-lissajous) |
368
368
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/rdom-reactive-svg.jpg" width="240"/> | Animated SVG elements with reactive attributes | [Demo](https://demo.thi.ng/umbrella/rdom-reactive-svg/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rdom-reactive-svg) |
369
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/rdom-router.jpg" width="240"/> | Basic thi.ng/router usage with thi.ng/rdom components | [Demo](https://demo.thi.ng/umbrella/rdom-router/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rdom-router) |
369
370
  | | Full umbrella repo doc string search w/ paginated results | [Demo](https://demo.thi.ng/umbrella/rdom-search-docs/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rdom-search-docs) |
370
371
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/rdom-svg-nodes.png" width="240"/> | rdom powered SVG graph with draggable nodes | [Demo](https://demo.thi.ng/umbrella/rdom-svg-nodes/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rdom-svg-nodes) |
371
372
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/rdom-web-components.png" width="240"/> | Defining & using basic Web Components (with shadow DOM) via @thi.ng/rdom & @thi.ng/meta-css | [Demo](https://demo.thi.ng/umbrella/rdom-web-components/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rdom-web-components) |
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.2",
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",
@@ -43,7 +43,7 @@
43
43
  "@thi.ng/hiccup": "^5.2.3",
44
44
  "@thi.ng/paths": "^5.1.83",
45
45
  "@thi.ng/prefixes": "^2.3.21",
46
- "@thi.ng/rstream": "^8.5.2",
46
+ "@thi.ng/rstream": "^8.5.3",
47
47
  "@thi.ng/strings": "^3.7.35"
48
48
  },
49
49
  "devDependencies": {
@@ -145,5 +145,5 @@
145
145
  ],
146
146
  "year": 2020
147
147
  },
148
- "gitHead": "7b950c112fba0b2e7c450765b15624c3382f1354\n"
148
+ "gitHead": "4e1794f6c951adb73c27c3e6c08f7138d9445e8b\n"
149
149
  }