@thi.ng/hdom 9.4.95 → 9.4.97
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/README.md +1 -1
- package/dom.js +5 -5
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 211 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
package/dom.js
CHANGED
|
@@ -42,7 +42,7 @@ const createTree = (opts, impl, parent, tree, insert, init = true) => {
|
|
|
42
42
|
}
|
|
43
43
|
if (isNotStringAndIterable(tree)) {
|
|
44
44
|
const res = [];
|
|
45
|
-
for (
|
|
45
|
+
for (const t of tree) {
|
|
46
46
|
res.push(createTree(opts, impl, parent, t, insert, init));
|
|
47
47
|
}
|
|
48
48
|
return res;
|
|
@@ -74,14 +74,14 @@ const hydrateTree = (opts, impl, parent, tree, index = 0) => {
|
|
|
74
74
|
);
|
|
75
75
|
}
|
|
76
76
|
__maybeInitElement(el, tree);
|
|
77
|
-
for (
|
|
77
|
+
for (const a in attribs) {
|
|
78
78
|
a[0] === "o" && a[1] === "n" && impl.setAttrib(el, a, attribs[a]);
|
|
79
79
|
}
|
|
80
80
|
for (let n = tree.length, i = 2; i < n; i++) {
|
|
81
81
|
hydrateTree(opts, impl, el, tree[i], i - 2);
|
|
82
82
|
}
|
|
83
83
|
} else if (isNotStringAndIterable(tree)) {
|
|
84
|
-
for (
|
|
84
|
+
for (const t of tree) {
|
|
85
85
|
hydrateTree(opts, impl, parent, t, index);
|
|
86
86
|
index++;
|
|
87
87
|
}
|
|
@@ -104,7 +104,7 @@ const cloneWithNewAttribs = (el, attribs) => {
|
|
|
104
104
|
};
|
|
105
105
|
const setContent = (el, body) => el.textContent = body;
|
|
106
106
|
const setAttribs = (el, attribs) => {
|
|
107
|
-
for (
|
|
107
|
+
for (const k in attribs) {
|
|
108
108
|
setAttrib(el, k, attribs[k], attribs);
|
|
109
109
|
}
|
|
110
110
|
return el;
|
|
@@ -208,7 +208,7 @@ const removeAttribs = (el, attribs, prev) => {
|
|
|
208
208
|
};
|
|
209
209
|
const setStyle = (el, rules) => {
|
|
210
210
|
let v;
|
|
211
|
-
for (
|
|
211
|
+
for (const r in rules) {
|
|
212
212
|
v = deref(rules[r]);
|
|
213
213
|
if (isFunction(v)) v = v(rules);
|
|
214
214
|
if (v != null) el.style.setProperty(r, v);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/hdom",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.97",
|
|
4
4
|
"description": "Lightweight vanilla ES6 UI component trees with customizable branch-local behaviors",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -42,17 +42,17 @@
|
|
|
42
42
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@thi.ng/api": "^8.12.
|
|
46
|
-
"@thi.ng/checks": "^3.
|
|
47
|
-
"@thi.ng/diff": "^5.1.
|
|
48
|
-
"@thi.ng/equiv": "^2.1.
|
|
49
|
-
"@thi.ng/errors": "^2.5.
|
|
50
|
-
"@thi.ng/hiccup": "^5.3.
|
|
51
|
-
"@thi.ng/logger": "^3.2.
|
|
52
|
-
"@thi.ng/prefixes": "^2.3.
|
|
45
|
+
"@thi.ng/api": "^8.12.10",
|
|
46
|
+
"@thi.ng/checks": "^3.8.0",
|
|
47
|
+
"@thi.ng/diff": "^5.1.111",
|
|
48
|
+
"@thi.ng/equiv": "^2.1.100",
|
|
49
|
+
"@thi.ng/errors": "^2.5.50",
|
|
50
|
+
"@thi.ng/hiccup": "^5.3.33",
|
|
51
|
+
"@thi.ng/logger": "^3.2.9",
|
|
52
|
+
"@thi.ng/prefixes": "^2.3.61"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@thi.ng/atom": "^5.3.
|
|
55
|
+
"@thi.ng/atom": "^5.3.51",
|
|
56
56
|
"esbuild": "^0.27.0",
|
|
57
57
|
"typedoc": "^0.28.14",
|
|
58
58
|
"typescript": "^5.9.3"
|
|
@@ -133,5 +133,5 @@
|
|
|
133
133
|
"status": "completed",
|
|
134
134
|
"year": 2015
|
|
135
135
|
},
|
|
136
|
-
"gitHead": "
|
|
136
|
+
"gitHead": "824bf9047b5a10f777c5c5b4aeecf0c750a22c75\n"
|
|
137
137
|
}
|