@thi.ng/rdom 1.7.18 → 1.7.20

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**: 2025-01-04T21:07:38Z
3
+ - **Last updated**: 2025-01-14T12:23:33Z
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,12 @@ 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.7.19](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@1.7.19) (2025-01-14)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - use optional chaining & nullish coalescing ([c5a0a13](https://github.com/thi-ng/umbrella/commit/c5a0a13))
17
+
12
18
  ### [1.7.13](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@1.7.13) (2024-11-24)
13
19
 
14
20
  #### ⏱ Performance improvements
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.30 KB
318
+ Package sizes (brotli'd, pre-treeshake): ESM: 4.29 KB
319
319
 
320
320
  ## Dependencies
321
321
 
package/compile.js CHANGED
@@ -56,7 +56,7 @@ const __complexComponent = (tree) => ({
56
56
  await c.unmount();
57
57
  }
58
58
  }
59
- this.subs && this.subs.forEach((s) => s.unsubscribe());
59
+ this.subs?.forEach((s) => s.unsubscribe());
60
60
  this.el && $remove(this.el);
61
61
  this.el = this.children = this.subs = void 0;
62
62
  },
package/dom.js CHANGED
@@ -37,8 +37,7 @@ const $treeTag = (tree, parent, idx) => {
37
37
  if (n === 3 && (isString(body) || isNumber(body))) {
38
38
  const tmp = /^\w+/.exec(tag);
39
39
  if (tmp && NO_SPANS[tmp[0]]) {
40
- parent = $el(tag, attribs, body, parent, idx);
41
- return parent;
40
+ return $el(tag, attribs, body, parent, idx);
42
41
  }
43
42
  }
44
43
  parent = $el(tag, attribs, null, parent, idx);
@@ -85,7 +84,7 @@ const $comment = (body, parent, idx = -1) => {
85
84
  const $addChild = (parent, child, idx = -1) => {
86
85
  isNumber(idx) ? idx < 0 || idx >= parent.children.length ? parent.appendChild(child) : parent.insertBefore(child, parent.children[idx]) : parent.insertBefore(child, idx);
87
86
  };
88
- const $remove = (el) => el && el.remove();
87
+ const $remove = (el) => el?.remove();
89
88
  const $moveTo = (newParent, el, idx = -1) => {
90
89
  $remove(el);
91
90
  $addChild(newParent, el, idx);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/rdom",
3
- "version": "1.7.18",
3
+ "version": "1.7.20",
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",
@@ -42,12 +42,12 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@thi.ng/api": "^8.11.16",
45
- "@thi.ng/checks": "^3.6.18",
45
+ "@thi.ng/checks": "^3.6.19",
46
46
  "@thi.ng/errors": "^2.5.22",
47
- "@thi.ng/hiccup": "^5.2.22",
48
- "@thi.ng/paths": "^5.1.96",
47
+ "@thi.ng/hiccup": "^5.2.23",
48
+ "@thi.ng/paths": "^5.1.97",
49
49
  "@thi.ng/prefixes": "^2.3.33",
50
- "@thi.ng/rstream": "^9.2.3",
50
+ "@thi.ng/rstream": "^9.2.5",
51
51
  "@thi.ng/strings": "^3.9.0"
52
52
  },
53
53
  "devDependencies": {
@@ -150,5 +150,5 @@
150
150
  ],
151
151
  "year": 2020
152
152
  },
153
- "gitHead": "56c1d57a96565bbcc8c06c73779a619bba0db368\n"
153
+ "gitHead": "d888087b36b086fd8c3e7dc98d35857266f78942\n"
154
154
  }