@thi.ng/hdom 9.4.18 → 9.4.20
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/README.md +5 -12
- package/api.d.ts +2 -2
- package/normalize.d.ts +3 -3
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
<!-- This file is generated - DO NOT EDIT! -->
|
|
2
2
|
<!-- Please see: https://github.com/thi-ng/umbrella/blob/develop/CONTRIBUTING.md#changes-to-readme-files -->
|
|
3
|
-
> [!IMPORTANT]
|
|
4
|
-
> ‼️ Announcing the thi.ng user survey 2024 📋
|
|
5
|
-
>
|
|
6
|
-
> [Please participate in the survey here!](https://forms.gle/XacbSDEmQMPZg8197)\
|
|
7
|
-
> (open until end of February)
|
|
8
|
-
>
|
|
9
|
-
> **To achieve a better sample size, I'd highly appreciate if you could
|
|
10
|
-
> circulate the link to this survey in your own networks.**
|
|
11
|
-
>
|
|
12
|
-
> [Discussion](https://github.com/thi-ng/umbrella/discussions/447)
|
|
13
|
-
|
|
14
3
|
# 
|
|
15
4
|
|
|
16
5
|
[](https://www.npmjs.com/package/@thi.ng/hdom)
|
|
@@ -22,7 +11,7 @@
|
|
|
22
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
23
12
|
> and anti-framework.
|
|
24
13
|
>
|
|
25
|
-
> 🚀
|
|
14
|
+
> 🚀 Please help me to work full-time on these projects by [sponsoring me on
|
|
26
15
|
> GitHub](https://github.com/sponsors/postspectacular). Thank you! ❤️
|
|
27
16
|
|
|
28
17
|
**Update 12/2022: This package is considered completed and no longer being
|
|
@@ -671,6 +660,8 @@ repo, but also any user defined custom types:
|
|
|
671
660
|
- [streams](https://github.com/thi-ng/umbrella/tree/develop/packages/rstream)
|
|
672
661
|
|
|
673
662
|
```ts
|
|
663
|
+
import { serialize } from "@thi.ng/hiccup";
|
|
664
|
+
|
|
674
665
|
class Foo {
|
|
675
666
|
constructor(val) {
|
|
676
667
|
this.value = val;
|
|
@@ -777,6 +768,8 @@ Any remaining arguments are sourced from the component call site as
|
|
|
777
768
|
this simple example demonstrates:
|
|
778
769
|
|
|
779
770
|
```ts
|
|
771
|
+
import { start } from "@thi.ng/hdom";
|
|
772
|
+
|
|
780
773
|
// wrap in closure to allow multiple instances
|
|
781
774
|
const canvas = () => {
|
|
782
775
|
return {
|
package/api.d.ts
CHANGED
|
@@ -181,7 +181,7 @@ export interface HDOMImplementation<T> {
|
|
|
181
181
|
* to `diffTree()`. Recursively expands given hiccup component tree into its
|
|
182
182
|
* canonical form:
|
|
183
183
|
*
|
|
184
|
-
* ```
|
|
184
|
+
* ```ts
|
|
185
185
|
* ["tag", { attribs }, ...body]
|
|
186
186
|
* ```
|
|
187
187
|
*
|
|
@@ -344,7 +344,7 @@ export interface HDOMImplementation<T> {
|
|
|
344
344
|
/**
|
|
345
345
|
* A (potentially) optimized version of these 2 operations in sequence:
|
|
346
346
|
*
|
|
347
|
-
* ```
|
|
347
|
+
* ```ts
|
|
348
348
|
* impl.removeChild(parent, child);
|
|
349
349
|
* impl.createTree(parent, child, newTree);
|
|
350
350
|
* ```
|
package/normalize.d.ts
CHANGED
|
@@ -2,21 +2,21 @@ import type { HDOMOpts } from "./api.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* Expands single hiccup element/component into its canonical form:
|
|
4
4
|
*
|
|
5
|
-
* ```
|
|
5
|
+
* ```ts
|
|
6
6
|
* [tagname, {attribs}, ...children]
|
|
7
7
|
* ```
|
|
8
8
|
*
|
|
9
9
|
* Emmet-style ID and class names in the original tagname are moved into
|
|
10
10
|
* the attribs object, e.g.:
|
|
11
11
|
*
|
|
12
|
-
* ```
|
|
12
|
+
* ```ts
|
|
13
13
|
* ["div#foo.bar.baz"] => ["div", {id: "foo", class: "bar baz"}]
|
|
14
14
|
* ```
|
|
15
15
|
*
|
|
16
16
|
* If both Emmet-style classes AND a `class` attrib exists, the former
|
|
17
17
|
* are appended to the latter:
|
|
18
18
|
*
|
|
19
|
-
* ```
|
|
19
|
+
* ```ts
|
|
20
20
|
* ["div.bar.baz", {class: "foo"}] => ["div", {class: "foo bar baz"}]
|
|
21
21
|
* ```
|
|
22
22
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/hdom",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.20",
|
|
4
4
|
"description": "Lightweight vanilla ES6 UI component trees with customizable branch-local behaviors",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -38,18 +38,18 @@
|
|
|
38
38
|
"test": "bun test"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@thi.ng/api": "^8.9.
|
|
42
|
-
"@thi.ng/checks": "^3.5.
|
|
43
|
-
"@thi.ng/diff": "^5.1.
|
|
44
|
-
"@thi.ng/equiv": "^2.1.
|
|
45
|
-
"@thi.ng/errors": "^2.4.
|
|
46
|
-
"@thi.ng/hiccup": "^5.1.
|
|
47
|
-
"@thi.ng/logger": "^3.0.
|
|
48
|
-
"@thi.ng/prefixes": "^2.3.
|
|
41
|
+
"@thi.ng/api": "^8.9.27",
|
|
42
|
+
"@thi.ng/checks": "^3.5.1",
|
|
43
|
+
"@thi.ng/diff": "^5.1.60",
|
|
44
|
+
"@thi.ng/equiv": "^2.1.50",
|
|
45
|
+
"@thi.ng/errors": "^2.4.19",
|
|
46
|
+
"@thi.ng/hiccup": "^5.1.18",
|
|
47
|
+
"@thi.ng/logger": "^3.0.4",
|
|
48
|
+
"@thi.ng/prefixes": "^2.3.11"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@microsoft/api-extractor": "^7.40.1",
|
|
52
|
-
"@thi.ng/atom": "^5.2.
|
|
52
|
+
"@thi.ng/atom": "^5.2.35",
|
|
53
53
|
"esbuild": "^0.20.0",
|
|
54
54
|
"rimraf": "^5.0.5",
|
|
55
55
|
"typedoc": "^0.25.7",
|
|
@@ -131,5 +131,5 @@
|
|
|
131
131
|
"status": "completed",
|
|
132
132
|
"year": 2015
|
|
133
133
|
},
|
|
134
|
-
"gitHead": "
|
|
134
|
+
"gitHead": "df9e312af741d87e6b450afcfea6a6e381662b1e\n"
|
|
135
135
|
}
|