@thi.ng/hdom 9.4.19 → 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 +4 -0
- package/api.d.ts +2 -2
- package/normalize.d.ts +3 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -660,6 +660,8 @@ repo, but also any user defined custom types:
|
|
|
660
660
|
- [streams](https://github.com/thi-ng/umbrella/tree/develop/packages/rstream)
|
|
661
661
|
|
|
662
662
|
```ts
|
|
663
|
+
import { serialize } from "@thi.ng/hiccup";
|
|
664
|
+
|
|
663
665
|
class Foo {
|
|
664
666
|
constructor(val) {
|
|
665
667
|
this.value = val;
|
|
@@ -766,6 +768,8 @@ Any remaining arguments are sourced from the component call site as
|
|
|
766
768
|
this simple example demonstrates:
|
|
767
769
|
|
|
768
770
|
```ts
|
|
771
|
+
import { start } from "@thi.ng/hdom";
|
|
772
|
+
|
|
769
773
|
// wrap in closure to allow multiple instances
|
|
770
774
|
const canvas = () => {
|
|
771
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",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"@thi.ng/diff": "^5.1.60",
|
|
44
44
|
"@thi.ng/equiv": "^2.1.50",
|
|
45
45
|
"@thi.ng/errors": "^2.4.19",
|
|
46
|
-
"@thi.ng/hiccup": "^5.1.
|
|
46
|
+
"@thi.ng/hiccup": "^5.1.18",
|
|
47
47
|
"@thi.ng/logger": "^3.0.4",
|
|
48
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
|
}
|