@thi.ng/rdom 0.12.12 → 0.12.13
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 +7 -1
- package/README.md +2 -1
- package/dom.d.ts +3 -4
- package/dom.js +4 -11
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2023-10-
|
|
3
|
+
- **Last updated**: 2023-10-18T18:06:31Z
|
|
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,12 @@ 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
|
+
### [0.12.13](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@0.12.13) (2023-10-18)
|
|
13
|
+
|
|
14
|
+
#### 🩹 Bug fixes
|
|
15
|
+
|
|
16
|
+
- update $text() to set el.textContent, simplify ([7cd6cc0](https://github.com/thi-ng/umbrella/commit/7cd6cc0))
|
|
17
|
+
|
|
12
18
|
## [0.12.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@0.12.0) (2023-08-22)
|
|
13
19
|
|
|
14
20
|
#### 🚀 Features
|
package/README.md
CHANGED
|
@@ -278,7 +278,7 @@ For Node.js REPL:
|
|
|
278
278
|
const rdom = await import("@thi.ng/rdom");
|
|
279
279
|
```
|
|
280
280
|
|
|
281
|
-
Package sizes (brotli'd, pre-treeshake): ESM: 3.
|
|
281
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 3.88 KB
|
|
282
282
|
|
|
283
283
|
## Dependencies
|
|
284
284
|
|
|
@@ -320,6 +320,7 @@ A selection:
|
|
|
320
320
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/rdom-lissajous.png" width="240"/> | rdom & hiccup-canvas interop test | [Demo](https://demo.thi.ng/umbrella/rdom-lissajous/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rdom-lissajous) |
|
|
321
321
|
| | Full umbrella repo doc string search w/ paginated results | [Demo](https://demo.thi.ng/umbrella/rdom-search-docs/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rdom-search-docs) |
|
|
322
322
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/rdom-svg-nodes.png" width="240"/> | rdom powered SVG graph with draggable nodes | [Demo](https://demo.thi.ng/umbrella/rdom-svg-nodes/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rdom-svg-nodes) |
|
|
323
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/related-images.jpg" width="240"/> | Responsive image gallery with tag-based Jaccard similarity ranking | [Demo](https://demo.thi.ng/umbrella/related-images/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/related-images) |
|
|
323
324
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/render-audio.png" width="240"/> | Generative audio synth offline renderer and WAV file export | [Demo](https://demo.thi.ng/umbrella/render-audio/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/render-audio) |
|
|
324
325
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/rstream-sync.png" width="240"/> | Minimal rstream sync() example using rdom | [Demo](https://demo.thi.ng/umbrella/rstream-sync/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rstream-sync) |
|
|
325
326
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/stacked-layout.png" width="240"/> | Responsive & reactively computed stacked column layout | [Demo](https://demo.thi.ng/umbrella/stacked-layout/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/stacked-layout) |
|
package/dom.d.ts
CHANGED
|
@@ -96,11 +96,10 @@ export declare const $moveTo: (newParent: Element, el: Element | Comment, idx?:
|
|
|
96
96
|
*/
|
|
97
97
|
export declare const $clear: (el: Element) => Element;
|
|
98
98
|
/**
|
|
99
|
-
* Same as `el.
|
|
99
|
+
* Same as `el.textContent = body`, however if `body` is an
|
|
100
100
|
* [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html) it'll be
|
|
101
|
-
* automatically deref'd and coerced to a string. If `body === undefined`
|
|
102
|
-
* empty string will be used.
|
|
103
|
-
* created.
|
|
101
|
+
* first automatically deref'd and coerced to a string. If `body === undefined`
|
|
102
|
+
* an empty string will be used.
|
|
104
103
|
*
|
|
105
104
|
* @param el -
|
|
106
105
|
* @param body -
|
package/dom.js
CHANGED
|
@@ -195,24 +195,17 @@ export const $moveTo = (newParent, el, idx = -1) => {
|
|
|
195
195
|
*/
|
|
196
196
|
export const $clear = (el) => ((el.innerHTML = ""), el);
|
|
197
197
|
/**
|
|
198
|
-
* Same as `el.
|
|
198
|
+
* Same as `el.textContent = body`, however if `body` is an
|
|
199
199
|
* [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html) it'll be
|
|
200
|
-
* automatically deref'd and coerced to a string. If `body === undefined`
|
|
201
|
-
* empty string will be used.
|
|
202
|
-
* created.
|
|
200
|
+
* first automatically deref'd and coerced to a string. If `body === undefined`
|
|
201
|
+
* an empty string will be used.
|
|
203
202
|
*
|
|
204
203
|
* @param el -
|
|
205
204
|
* @param body -
|
|
206
205
|
*/
|
|
207
206
|
export const $text = (el, body) => {
|
|
208
207
|
body = deref(body);
|
|
209
|
-
|
|
210
|
-
if (el.namespaceURI === XML_SVG) {
|
|
211
|
-
$clear(el).appendChild(document.createTextNode(body));
|
|
212
|
-
}
|
|
213
|
-
else {
|
|
214
|
-
el.innerText = body;
|
|
215
|
-
}
|
|
208
|
+
el.textContent = body !== undefined ? String(body) : "";
|
|
216
209
|
};
|
|
217
210
|
/**
|
|
218
211
|
* Same as `el.innerHtml = body`, use with caution! If `body` is an
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/rdom",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.13",
|
|
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",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@thi.ng/hiccup": "^5.0.1",
|
|
42
42
|
"@thi.ng/paths": "^5.1.44",
|
|
43
43
|
"@thi.ng/prefixes": "^2.2.1",
|
|
44
|
-
"@thi.ng/rstream": "^8.
|
|
44
|
+
"@thi.ng/rstream": "^8.2.0",
|
|
45
45
|
"@thi.ng/strings": "^3.6.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
],
|
|
143
143
|
"year": 2020
|
|
144
144
|
},
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "46e445c09f2909d1aeaa9fdc8d8b3aa61c114db2\n"
|
|
146
146
|
}
|