@thi.ng/rdom 1.7.68 → 1.7.70
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/compile.js +1 -1
- package/dom.js +5 -5
- package/package.json +10 -10
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/compile.js
CHANGED
package/dom.js
CHANGED
|
@@ -47,7 +47,7 @@ const $treeTag = (tree, parent, idx) => {
|
|
|
47
47
|
return parent;
|
|
48
48
|
};
|
|
49
49
|
const $treeIter = (tree, parent) => {
|
|
50
|
-
for (
|
|
50
|
+
for (const t of tree) {
|
|
51
51
|
$tree(t, parent);
|
|
52
52
|
}
|
|
53
53
|
return null;
|
|
@@ -98,7 +98,7 @@ const $html = (el, body) => {
|
|
|
98
98
|
el.innerHTML = String(deref(body));
|
|
99
99
|
};
|
|
100
100
|
const $attribs = (el, attribs) => {
|
|
101
|
-
for (
|
|
101
|
+
for (const id in attribs) {
|
|
102
102
|
__setAttrib(el, id, attribs[id], attribs);
|
|
103
103
|
}
|
|
104
104
|
return el;
|
|
@@ -181,7 +181,7 @@ const __updateValueAttrib = (el, value) => {
|
|
|
181
181
|
};
|
|
182
182
|
const __updateDataAttribs = (el, attribs) => {
|
|
183
183
|
const data = el.dataset;
|
|
184
|
-
for (
|
|
184
|
+
for (const id in attribs) {
|
|
185
185
|
const v = deref(attribs[id]);
|
|
186
186
|
data[id] = isFunction(v) ? v(attribs) : v;
|
|
187
187
|
}
|
|
@@ -191,7 +191,7 @@ const $style = (el, rules) => {
|
|
|
191
191
|
el.setAttribute("style", rules);
|
|
192
192
|
} else {
|
|
193
193
|
const style = el.style;
|
|
194
|
-
for (
|
|
194
|
+
for (const id in rules) {
|
|
195
195
|
let v = deref(rules[id]);
|
|
196
196
|
isFunction(v) && (v = v(rules));
|
|
197
197
|
style.setProperty(id, v != null ? v : "");
|
|
@@ -200,7 +200,7 @@ const $style = (el, rules) => {
|
|
|
200
200
|
};
|
|
201
201
|
const $toggleClasses = (el, ...classes) => {
|
|
202
202
|
const list = el.classList;
|
|
203
|
-
for (
|
|
203
|
+
for (const c of classes) {
|
|
204
204
|
list.contains(c) ? list.remove(c) : list.add(c);
|
|
205
205
|
}
|
|
206
206
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/rdom",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.70",
|
|
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",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@thi.ng/api": "^8.12.
|
|
44
|
-
"@thi.ng/checks": "^3.
|
|
45
|
-
"@thi.ng/errors": "^2.5.
|
|
46
|
-
"@thi.ng/hiccup": "^5.3.
|
|
47
|
-
"@thi.ng/paths": "^5.2.
|
|
48
|
-
"@thi.ng/prefixes": "^2.3.
|
|
49
|
-
"@thi.ng/rstream": "^9.3.
|
|
50
|
-
"@thi.ng/strings": "^3.9.
|
|
43
|
+
"@thi.ng/api": "^8.12.10",
|
|
44
|
+
"@thi.ng/checks": "^3.8.0",
|
|
45
|
+
"@thi.ng/errors": "^2.5.50",
|
|
46
|
+
"@thi.ng/hiccup": "^5.3.33",
|
|
47
|
+
"@thi.ng/paths": "^5.2.29",
|
|
48
|
+
"@thi.ng/prefixes": "^2.3.61",
|
|
49
|
+
"@thi.ng/rstream": "^9.3.9",
|
|
50
|
+
"@thi.ng/strings": "^3.9.31"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"esbuild": "^0.27.0",
|
|
@@ -148,5 +148,5 @@
|
|
|
148
148
|
],
|
|
149
149
|
"year": 2020
|
|
150
150
|
},
|
|
151
|
-
"gitHead": "
|
|
151
|
+
"gitHead": "8625a1c6383737a8fdbe7a3f96ea3cbabc957fa6\n"
|
|
152
152
|
}
|