@thi.ng/hdom 9.2.6 → 9.3.1

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**: 2023-02-10T14:03:10Z
3
+ - **Last updated**: 2023-03-02T18:09:03Z
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,14 @@ 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
+ ## [9.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hdom@9.3.0) (2023-02-27)
13
+
14
+ #### 🚀 Features
15
+
16
+ - update setAttrib() ([61aa627](https://github.com/thi-ng/umbrella/commit/61aa627))
17
+ - add IDeref support for individual attrib values (i.e. via `deref()` wrappers)
18
+ - update attribute removal/deletion logic
19
+
12
20
  ## [9.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hdom@9.2.0) (2022-12-16)
13
21
 
14
22
  #### 🚀 Features
package/README.md CHANGED
@@ -156,7 +156,7 @@ yarn install
156
156
  yarn start
157
157
  ```
158
158
 
159
- Package sizes (brotli'd, pre-treeshake): ESM: 3.40 KB
159
+ Package sizes (brotli'd, pre-treeshake): ESM: 3.42 KB
160
160
 
161
161
  ## Dependencies
162
162
 
package/dom.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { implementsFunction } from "@thi.ng/checks/implements-function";
1
2
  import { isArray as isa } from "@thi.ng/checks/is-array";
2
3
  import { isNotStringAndIterable as isi } from "@thi.ng/checks/is-not-string-iterable";
3
4
  import { isString as iss } from "@thi.ng/checks/is-string";
@@ -147,6 +148,7 @@ export const setAttribs = (el, attribs) => {
147
148
  * @param attribs - object of all attribs
148
149
  */
149
150
  export const setAttrib = (el, id, val, attribs) => {
151
+ implementsFunction(val, "deref") && (val = val.deref());
150
152
  if (id.startsWith("__"))
151
153
  return;
152
154
  const isListener = id[0] === "o" && id[1] === "n";
@@ -195,7 +197,9 @@ export const setAttrib = (el, id, val, attribs) => {
195
197
  }
196
198
  }
197
199
  else {
198
- el[id] != null ? (el[id] = null) : el.removeAttribute(id);
200
+ el.hasAttribute(id)
201
+ ? el.removeAttribute("title")
202
+ : el[id] && (el[id] = null);
199
203
  }
200
204
  return el;
201
205
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/hdom",
3
- "version": "9.2.6",
3
+ "version": "9.3.1",
4
4
  "description": "Lightweight vanilla ES6 UI component trees with customizable branch-local behaviors",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -37,18 +37,18 @@
37
37
  "test": "testament test"
38
38
  },
39
39
  "dependencies": {
40
- "@thi.ng/api": "^8.7.2",
40
+ "@thi.ng/api": "^8.7.3",
41
41
  "@thi.ng/checks": "^3.3.9",
42
- "@thi.ng/diff": "^5.1.25",
42
+ "@thi.ng/diff": "^5.1.26",
43
43
  "@thi.ng/equiv": "^2.1.19",
44
- "@thi.ng/errors": "^2.2.11",
45
- "@thi.ng/hiccup": "^4.2.32",
44
+ "@thi.ng/errors": "^2.2.12",
45
+ "@thi.ng/hiccup": "^4.2.34",
46
46
  "@thi.ng/logger": "^1.4.9",
47
47
  "@thi.ng/prefixes": "^2.1.19"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@microsoft/api-extractor": "^7.34.2",
51
- "@thi.ng/atom": "^5.1.31",
51
+ "@thi.ng/atom": "^5.1.32",
52
52
  "@thi.ng/testament": "^0.3.11",
53
53
  "rimraf": "^4.1.2",
54
54
  "tools": "^0.0.1",
@@ -131,5 +131,5 @@
131
131
  "status": "completed",
132
132
  "year": 2015
133
133
  },
134
- "gitHead": "cafa4ecea90fb681949dc3885a5bd6ddefa38b51\n"
134
+ "gitHead": "a2915dee637c1b8cd2e11a78a23bd035e4f750e7\n"
135
135
  }