@thi.ng/hdom 9.4.32 → 9.4.34

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-04-23T07:02:18Z
3
+ - **Last updated**: 2024-05-08T18:24:32Z
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.
package/diff.js CHANGED
@@ -79,8 +79,7 @@ const diffTree = (opts, impl, parent, prev, curr, child = 0) => {
79
79
  const offsets = buildIndex(prevLength + 1);
80
80
  for (i = 2, ii = 6; ii < numEdits; i++, ii += 3) {
81
81
  status = edits[ii];
82
- if (!status)
83
- continue;
82
+ if (!status) continue;
84
83
  if (status === -1) {
85
84
  diffDeleted(
86
85
  opts,
package/dom.js CHANGED
@@ -110,8 +110,7 @@ const setAttribs = (el, attribs) => {
110
110
  };
111
111
  const setAttrib = (el, id, val, attribs) => {
112
112
  implementsFunction(val, "deref") && (val = val.deref());
113
- if (id.startsWith("__"))
114
- return;
113
+ if (id.startsWith("__")) return;
115
114
  const isListener = id[0] === "o" && id[1] === "n";
116
115
  if (isListener) {
117
116
  if (isString(val)) {
@@ -122,10 +121,8 @@ const setAttrib = (el, id, val, attribs) => {
122
121
  }
123
122
  return el;
124
123
  }
125
- if (typeof val === "function")
126
- val = val(attribs);
127
- if (isArray(val))
128
- val = val.join(ATTRIB_JOIN_DELIMS[id] || " ");
124
+ if (typeof val === "function") val = val(attribs);
125
+ if (isArray(val)) val = val.join(ATTRIB_JOIN_DELIMS[id] || " ");
129
126
  switch (id) {
130
127
  case "style":
131
128
  setStyle(el, val);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/hdom",
3
- "version": "9.4.32",
3
+ "version": "9.4.34",
4
4
  "description": "Lightweight vanilla ES6 UI component trees with customizable branch-local behaviors",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -39,21 +39,21 @@
39
39
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@thi.ng/api": "^8.11.1",
43
- "@thi.ng/checks": "^3.6.3",
44
- "@thi.ng/diff": "^5.1.68",
45
- "@thi.ng/equiv": "^2.1.57",
46
- "@thi.ng/errors": "^2.5.6",
47
- "@thi.ng/hiccup": "^5.1.30",
48
- "@thi.ng/logger": "^3.0.11",
49
- "@thi.ng/prefixes": "^2.3.18"
42
+ "@thi.ng/api": "^8.11.2",
43
+ "@thi.ng/checks": "^3.6.4",
44
+ "@thi.ng/diff": "^5.1.69",
45
+ "@thi.ng/equiv": "^2.1.58",
46
+ "@thi.ng/errors": "^2.5.7",
47
+ "@thi.ng/hiccup": "^5.2.1",
48
+ "@thi.ng/logger": "^3.0.12",
49
+ "@thi.ng/prefixes": "^2.3.19"
50
50
  },
51
51
  "devDependencies": {
52
- "@microsoft/api-extractor": "^7.43.0",
53
- "@thi.ng/atom": "^5.2.45",
54
- "esbuild": "^0.20.2",
55
- "typedoc": "^0.25.12",
56
- "typescript": "^5.4.3"
52
+ "@microsoft/api-extractor": "^7.43.2",
53
+ "@thi.ng/atom": "^5.3.0",
54
+ "esbuild": "^0.21.1",
55
+ "typedoc": "^0.25.13",
56
+ "typescript": "^5.4.5"
57
57
  },
58
58
  "keywords": [
59
59
  "array",
@@ -131,5 +131,5 @@
131
131
  "status": "completed",
132
132
  "year": 2015
133
133
  },
134
- "gitHead": "5dd66c18a3862a3af69a5b2f49563f7cbdd960c2\n"
134
+ "gitHead": "df34b4a9e650cc7323575356de207d78933bdcf3\n"
135
135
  }
package/render-once.js CHANGED
@@ -6,8 +6,7 @@ const renderOnce = (tree, opts = {}, impl = DEFAULT_IMPL) => {
6
6
  opts.ctx = derefContext(opts.ctx, opts.autoDerefKeys);
7
7
  const root = resolveRoot(opts.root, impl);
8
8
  tree = impl.normalizeTree(opts, tree);
9
- if (!tree)
10
- return;
9
+ if (!tree) return;
11
10
  opts.hydrate ? impl.hydrateTree(opts, root, tree) : impl.createTree(opts, root, tree);
12
11
  };
13
12
  export {