@thi.ng/rdom 0.12.20 → 0.12.22

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-11-04T22:20:11Z
3
+ - **Last updated**: 2023-11-09T10:28:19Z
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.21](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@0.12.21) (2023-11-09)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - update all tests (packages A-S) ([e3085e4](https://github.com/thi-ng/umbrella/commit/e3085e4))
17
+
12
18
  ### [0.12.13](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@0.12.13) (2023-10-18)
13
19
 
14
20
  #### 🩹 Bug fixes
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.88 KB
281
+ Package sizes (brotli'd, pre-treeshake): ESM: 4.07 KB
282
282
 
283
283
  ## Dependencies
284
284
 
package/component.js CHANGED
@@ -6,6 +6,7 @@ import { $attribs, $clear, $comment, $el, $html, $moveTo, $remove, $style, $text
6
6
  * manipulation.
7
7
  */
8
8
  export class Component {
9
+ el;
9
10
  async unmount() {
10
11
  this.$remove();
11
12
  this.el = undefined;
package/klist.js CHANGED
@@ -57,13 +57,18 @@ import { $subWithID } from "./sub.js";
57
57
  */
58
58
  export const $klist = (src, tag, attribs, childCtor, keyFn) => $subWithID(src, new KList(tag, attribs, childCtor, keyFn), __nextID("klist", src));
59
59
  export class KList extends Component {
60
+ tag;
61
+ attribs;
62
+ ctor;
63
+ keyFn;
64
+ items = [];
65
+ cache;
60
66
  constructor(tag, attribs, ctor, keyFn = (_, i) => i) {
61
67
  super();
62
68
  this.tag = tag;
63
69
  this.attribs = attribs;
64
70
  this.ctor = ctor;
65
71
  this.keyFn = keyFn;
66
- this.items = [];
67
72
  }
68
73
  async mount(parent, index, state) {
69
74
  this.items = [];
package/list.js CHANGED
@@ -51,6 +51,12 @@ import { $subWithID } from "./sub.js";
51
51
  */
52
52
  export const $list = (src, tag, attribs, ctor, equiv) => $subWithID(src, new List(tag, attribs, ctor, equiv), __nextID("list", src));
53
53
  export class List extends Component {
54
+ tag;
55
+ attribs;
56
+ ctor;
57
+ equiv;
58
+ prev;
59
+ items;
54
60
  constructor(tag, attribs, ctor, equiv = (a, b) => a === b) {
55
61
  super();
56
62
  this.tag = tag;
package/object.js CHANGED
@@ -76,6 +76,9 @@ export const $object = (src, opts, inner) => new $Object(src, opts, inner);
76
76
  */
77
77
  export const $subObject = (src, opts, inner) => $subWithID(src, $object(src.deref() || {}, opts, inner), __nextID("obj", src));
78
78
  export class $Object extends Component {
79
+ ctor;
80
+ obj;
81
+ inner;
79
82
  constructor(src, opts, ctor) {
80
83
  super();
81
84
  this.ctor = ctor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/rdom",
3
- "version": "0.12.20",
3
+ "version": "0.12.22",
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",
@@ -28,28 +28,27 @@
28
28
  "clean": "rimraf --glob '*.js' '*.d.ts' '*.map' doc",
29
29
  "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
30
  "doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
31
- "doc:readme": "yarn doc:stats && tools:readme",
32
- "doc:stats": "tools:module-stats",
31
+ "doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
33
32
  "pub": "yarn npm publish --access public",
34
33
  "pub:wip": "yarn npm publish --access public --no-git-tag-version",
35
- "test": "testament test"
34
+ "test": "bun test"
36
35
  },
37
36
  "dependencies": {
38
- "@thi.ng/api": "^8.9.6",
39
- "@thi.ng/checks": "^3.4.6",
40
- "@thi.ng/errors": "^2.4.0",
41
- "@thi.ng/hiccup": "^5.0.5",
42
- "@thi.ng/paths": "^5.1.47",
43
- "@thi.ng/prefixes": "^2.2.2",
44
- "@thi.ng/rstream": "^8.2.7",
45
- "@thi.ng/strings": "^3.6.4"
37
+ "@thi.ng/api": "^8.9.8",
38
+ "@thi.ng/checks": "^3.4.8",
39
+ "@thi.ng/errors": "^2.4.2",
40
+ "@thi.ng/hiccup": "^5.0.7",
41
+ "@thi.ng/paths": "^5.1.49",
42
+ "@thi.ng/prefixes": "^2.2.4",
43
+ "@thi.ng/rstream": "^8.2.9",
44
+ "@thi.ng/strings": "^3.6.6"
46
45
  },
47
46
  "devDependencies": {
48
- "@microsoft/api-extractor": "^7.38.0",
49
- "@thi.ng/testament": "^0.3.24",
47
+ "@microsoft/api-extractor": "^7.38.2",
48
+ "@thi.ng/testament": "^0.4.1",
50
49
  "rimraf": "^5.0.5",
51
50
  "tools": "^0.0.1",
52
- "typedoc": "^0.25.2",
51
+ "typedoc": "^0.25.3",
53
52
  "typescript": "^5.2.2"
54
53
  },
55
54
  "keywords": [
@@ -142,5 +141,5 @@
142
141
  ],
143
142
  "year": 2020
144
143
  },
145
- "gitHead": "336bd1bf95825b3c318a3ab49c54451c94aaa883\n"
144
+ "gitHead": "669a3151e4302480244fe3e60eff5e732ea5b7a7\n"
146
145
  }
package/promise.js CHANGED
@@ -18,6 +18,9 @@ import { Component } from "./component.js";
18
18
  */
19
19
  export const $promise = (prom, error) => new $Promise(prom, error);
20
20
  export class $Promise extends Component {
21
+ promise;
22
+ error;
23
+ inner;
21
24
  constructor(promise, error = (e) => e) {
22
25
  super();
23
26
  this.promise = promise;
package/replace.js CHANGED
@@ -37,6 +37,9 @@ import { $wrapText } from "./wrap.js";
37
37
  */
38
38
  export const $replace = (src) => $subWithID(src, new Replace(), __nextID("replace", src));
39
39
  export class Replace extends Component {
40
+ parent;
41
+ inner;
42
+ index;
40
43
  async mount(parent, index, val) {
41
44
  this.parent = parent;
42
45
  this.index = index;
package/scheduler.js CHANGED
@@ -7,6 +7,8 @@
7
7
  * See {@link setScheduler} and {@link NullScheduler}.
8
8
  */
9
9
  export class RAFScheduler {
10
+ tasks;
11
+ raf;
10
12
  constructor() {
11
13
  this.tasks = new Map();
12
14
  this.raf = -1;
package/sub.js CHANGED
@@ -19,6 +19,8 @@ export function $sub(src, tag, attribs) {
19
19
  */
20
20
  export const $subWithID = (src, inner, id) => src.subscribe(new $Sub(inner, id));
21
21
  export class $Sub extends Subscription {
22
+ inner;
23
+ el;
22
24
  constructor(inner, id) {
23
25
  super(undefined, { id: id || `rdom$sub-${__nextID()}` });
24
26
  this.inner = inner;
@@ -40,10 +42,12 @@ export class $Sub extends Subscription {
40
42
  }
41
43
  }
42
44
  export class $SubA extends Subscription {
45
+ comp;
46
+ setter;
47
+ attr = {};
43
48
  constructor(comp, path, id) {
44
49
  super(undefined, { id: id || `rdom$attr-${__nextID()}` });
45
50
  this.comp = comp;
46
- this.attr = {};
47
51
  this.setter = defSetterUnsafe(path);
48
52
  }
49
53
  next(a) {
package/switch.js CHANGED
@@ -83,6 +83,14 @@ export const $switch = (src, keyFn, ctors, error, loader) => $subWithID(src, new
83
83
  */
84
84
  export const $refresh = (src, ctor, error, loader) => $subWithID(src, new Switch(() => 0, { 0: ctor }, error, loader), __nextID("refresh", src));
85
85
  export class Switch extends Component {
86
+ keyFn;
87
+ ctors;
88
+ error;
89
+ loader;
90
+ val;
91
+ parent;
92
+ inner;
93
+ index;
86
94
  constructor(keyFn, ctors, error = async (e) => $wrapText("span", {}, e), loader = async () => $wrapText("span", {
87
95
  hidden: true,
88
96
  })) {