@thi.ng/hdom 9.4.33 → 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 +1 -1
- package/diff.js +1 -2
- package/dom.js +3 -6
- package/package.json +15 -15
- package/render-once.js +1 -2
package/CHANGELOG.md
CHANGED
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
|
-
|
|
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.
|
|
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.
|
|
43
|
-
"@thi.ng/checks": "^3.6.
|
|
44
|
-
"@thi.ng/diff": "^5.1.
|
|
45
|
-
"@thi.ng/equiv": "^2.1.
|
|
46
|
-
"@thi.ng/errors": "^2.5.
|
|
47
|
-
"@thi.ng/hiccup": "^5.2.
|
|
48
|
-
"@thi.ng/logger": "^3.0.
|
|
49
|
-
"@thi.ng/prefixes": "^2.3.
|
|
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.
|
|
53
|
-
"@thi.ng/atom": "^5.
|
|
54
|
-
"esbuild": "^0.
|
|
55
|
-
"typedoc": "^0.25.
|
|
56
|
-
"typescript": "^5.4.
|
|
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": "
|
|
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 {
|