@thi.ng/rdom 0.7.8 → 0.8.2

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,96 +1,168 @@
1
1
  # Change Log
2
2
 
3
+ - **Last updated**: 2021-11-21T17:09:28Z
4
+ - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
+
3
6
  All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
+ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
8
+
9
+ **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
+ and/or version bumps of transitive dependencies.
11
+
12
+ ### [0.8.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@0.8.1) (2021-11-19)
13
+
14
+ #### 🩹 Bug fixes
15
+
16
+ - $text() handling for SVG ([631b5fb](https://github.com/thi-ng/umbrella/commit/631b5fb))
17
+
18
+ ## [0.8.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@0.8.0) (2021-11-17)
19
+
20
+ #### 🚀 Features
21
+
22
+ - Using workspaces for local tools ([bf7a404](https://github.com/thi-ng/umbrella/commit/bf7a404))
23
+ Improving the overall build ergonomics
24
+ - introduced a tools workspaces
25
+ - imported it in all needed packages/examples
26
+ - inclusive project root
27
+
28
+ #### ♻️ Refactoring
29
+
30
+ - testrunner to binary ([4ebbbb2](https://github.com/thi-ng/umbrella/commit/4ebbbb2))
31
+ this commit reverts (partly) changes made in:
32
+ ef346d7a8753590dc9094108a3d861a8dbd5dd2c
33
+ overall purpose is better testament ergonomics:
34
+ instead of having to pass NODE_OPTIONS with every invocation
35
+ having a binary to handle this for us.
36
+
37
+ ### [0.7.9](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@0.7.9) (2021-11-10)
5
38
 
6
- ## [0.7.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/rdom@0.7.7...@thi.ng/rdom@0.7.8) (2021-11-03)
39
+ #### ♻️ Refactoring
7
40
 
8
- **Note:** Version bump only for package @thi.ng/rdom
41
+ - update all countdown loops ([a5f374b](https://github.com/thi-ng/umbrella/commit/a5f374b))
9
42
 
43
+ ### [0.7.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@0.7.1) (2021-10-13)
10
44
 
45
+ #### ♻️ Refactoring
11
46
 
47
+ - update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
48
+ - update imports in all pkgs ([5fa2b6f](https://github.com/thi-ng/umbrella/commit/5fa2b6f))
49
+ - add .js suffix for all relative imports
12
50
 
51
+ ## [0.7.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@0.7.0) (2021-10-12)
13
52
 
14
- # [0.7.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/rdom@0.6.9...@thi.ng/rdom@0.7.0) (2021-10-12)
53
+ #### 🛑 Breaking changes
15
54
 
55
+ - major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea))
56
+ - BREAKING CHANGE: discontinue CommonJS & UMD versions
57
+ - only ESM modules will be published from now on
58
+ - CJS obsolete due to ESM support in recent versions of node:
59
+ - i.e. launch NodeJS via:
60
+ - `node --experimental-specifier-resolution=node --experimental-repl-await`
61
+ - in the node REPL use `await import(...)` instead of `require()`
62
+ - UMD obsolete due to widespread browser support for ESM
63
+ Also:
64
+ - normalize/restructure/reorg all package.json files
65
+ - cleanup all build scripts, remove obsolete
66
+ - switch from mocha to [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament) for all tests
16
67
 
17
- ### Build System
68
+ #### 🚀 Features
18
69
 
19
- * major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
70
+ - add $replace() control/wrapper ([6096357](https://github.com/thi-ng/umbrella/commit/6096357))
20
71
 
72
+ #### ♻️ Refactoring
21
73
 
22
- ### Features
74
+ - update imports in various pkgs (rstream) ([342cf54](https://github.com/thi-ng/umbrella/commit/342cf54))
75
+ - update deps & imports in various pkgs ([e1cf29e](https://github.com/thi-ng/umbrella/commit/e1cf29e))
76
+ - largely related to recent updates/restructuring of these packages:
77
+ - api
78
+ - defmulti
79
+ - errors
80
+ - logger
81
+ - update imports ([138571a](https://github.com/thi-ng/umbrella/commit/138571a))
82
+ - update all test stubs ([f2d6d53](https://github.com/thi-ng/umbrella/commit/f2d6d53))
83
+ - update all tests in _all_ pkgs ([8b582bc](https://github.com/thi-ng/umbrella/commit/8b582bc))
84
+ - update all to use [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament)
23
85
 
24
- * **rdom:** add $replace() control/wrapper ([6096357](https://github.com/thi-ng/umbrella/commit/609635729a7d92d087a59684e00d19e609c5927f))
86
+ ### [0.6.9](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@0.6.9) (2021-09-03)
25
87
 
88
+ #### ♻️ Refactoring
26
89
 
27
- ### BREAKING CHANGES
90
+ - fix up TS4.4 changes ([40caddc](https://github.com/thi-ng/umbrella/commit/40caddc))
28
91
 
29
- * discontinue CommonJS & UMD versions
92
+ ## [0.6.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@0.6.0) (2021-08-04)
30
93
 
31
- - only ESM modules will be published from now on
32
- - CJS obsolete due to ESM support in recent versions of node:
33
- - i.e. launch NodeJS via:
34
- - `node --experimental-specifier-resolution=node --experimental-repl-await`
35
- - in the node REPL use `await import(...)` instead of `require()`
36
- - UMD obsolete due to widespread browser support for ESM
94
+ #### 🚀 Features
37
95
 
38
- Also:
39
- - normalize/restructure/reorg all package.json files
40
- - cleanup all build scripts, remove obsolete
41
- - switch from mocha to @thi.ng/testament for all tests
96
+ - add $inputFile/Files() handlers ([7f8888b](https://github.com/thi-ng/umbrella/commit/7f8888b))
42
97
 
98
+ ## [0.5.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@0.5.0) (2021-07-27)
43
99
 
100
+ #### 🚀 Features
44
101
 
102
+ - relax return types for $switch() ([71c334b](https://github.com/thi-ng/umbrella/commit/71c334b))
103
+ - update return types for $switch/$refresh component factories (any)
104
+ - add/update docs
45
105
 
106
+ #### 🩹 Bug fixes
46
107
 
108
+ - fix [#304](https://github.com/thi-ng/umbrella/issues/304), update Switch.update() ([a2899c0](https://github.com/thi-ng/umbrella/commit/a2899c0))
109
+ - remove extraneous & wrong same-value check which was causing
110
+ component to unmount if same value is received in succession
47
111
 
48
- # [0.6.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/rdom@0.5.0...@thi.ng/rdom@0.6.0) (2021-08-04)
112
+ ### [0.4.5](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@0.4.5) (2021-03-12)
49
113
 
50
- ### Features
114
+ #### ♻️ Refactoring
51
115
 
52
- - **rdom:** add $inputFile/Files() handlers ([7f8888b](https://github.com/thi-ng/umbrella/commit/7f8888b0f0857aa9abde8ca6ea666a6f37bb64f2))
116
+ - simplify $sub() ([1f11cdf](https://github.com/thi-ng/umbrella/commit/1f11cdf))
53
117
 
54
- # [0.5.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/rdom@0.4.17...@thi.ng/rdom@0.5.0) (2021-07-27)
118
+ ## [0.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@0.4.0) (2021-02-24)
55
119
 
56
- ### Bug Fixes
120
+ #### 🚀 Features
57
121
 
58
- - **rdom:** fix [#304](https://github.com/thi-ng/umbrella/issues/304), update Switch.update() ([a2899c0](https://github.com/thi-ng/umbrella/commit/a2899c09b62458edd75dd785b64db0519b85eb6d))
122
+ - add $inputCheckbox, $inputTrigger ([99c569e](https://github.com/thi-ng/umbrella/commit/99c569e))
59
123
 
60
- ### Features
124
+ ### [0.3.9](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@0.3.9) (2021-02-22)
61
125
 
62
- - **rdom:** relax return types for $switch() ([71c334b](https://github.com/thi-ng/umbrella/commit/71c334bfc5715e58296750e9d118927dce53406a))
126
+ #### 🩹 Bug fixes
63
127
 
64
- # [0.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/rdom@0.3.9...@thi.ng/rdom@0.4.0) (2021-02-24)
128
+ - add stream IDs for $Sub/$SubA ([e8b8fd4](https://github.com/thi-ng/umbrella/commit/e8b8fd4))
65
129
 
66
- ### Features
130
+ ## [0.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@0.3.0) (2020-12-07)
67
131
 
68
- - **rdom:** add $inputCheckbox, $inputTrigger ([99c569e](https://github.com/thi-ng/umbrella/commit/99c569e629018d679bae0f9d07fbde8ddd4f16cc))
132
+ #### 🚀 Features
69
133
 
70
- ## [0.3.9](https://github.com/thi-ng/umbrella/compare/@thi.ng/rdom@0.3.8...@thi.ng/rdom@0.3.9) (2021-02-22)
134
+ - add $subObject() wrapper, add docs ([cd5cf08](https://github.com/thi-ng/umbrella/commit/cd5cf08))
71
135
 
72
- ### Bug Fixes
136
+ ### [0.2.12](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@0.2.12) (2020-09-22)
73
137
 
74
- - **rdom:** add stream IDs for $Sub/$SubA ([e8b8fd4](https://github.com/thi-ng/umbrella/commit/e8b8fd4785f9836f0270bbc01dc216c2c87d2e8d))
138
+ #### ♻️ Refactoring
75
139
 
76
- # [0.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/rdom@0.2.16...@thi.ng/rdom@0.3.0) (2020-12-07)
140
+ - split $compile() ([45156b2](https://github.com/thi-ng/umbrella/commit/45156b2))
141
+ - extract complexComponent(), basicComponent()
142
+ - split $tree() ([de159e0](https://github.com/thi-ng/umbrella/commit/de159e0))
143
+ - simplify $el() attrib handling ([b777cf1](https://github.com/thi-ng/umbrella/commit/b777cf1))
77
144
 
78
- ### Features
145
+ ## [0.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@0.2.0) (2020-07-08)
79
146
 
80
- - **rdom:** add $subObject() wrapper, add docs ([cd5cf08](https://github.com/thi-ng/umbrella/commit/cd5cf08d6ae0ffb5ff8a89a19918a563fb889cbd))
147
+ #### 🚀 Features
81
148
 
82
- # [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/rdom@0.1.2...@thi.ng/rdom@0.2.0) (2020-07-08)
149
+ - add $promise() wrapper ([53f9688](https://github.com/thi-ng/umbrella/commit/53f9688))
150
+ - add $input, $inputNum event listeners ([c29fb49](https://github.com/thi-ng/umbrella/commit/c29fb49))
83
151
 
84
- ### Features
152
+ ## [0.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@0.1.0) (2020-07-02)
85
153
 
86
- - **rdom:** add $input, $inputNum event listeners ([c29fb49](https://github.com/thi-ng/umbrella/commit/c29fb49824429ba1175deca30fbfe693d6fd689d))
87
- - **rdom:** add $promise() wrapper ([53f9688](https://github.com/thi-ng/umbrella/commit/53f96881094603b885a409b8965b491468a3c247))
154
+ #### 🚀 Features
88
155
 
89
- # 0.1.0 (2020-07-02)
156
+ - add RDFa `prefix` attrib support, update prefix handling ([b589da5](https://github.com/thi-ng/umbrella/commit/b589da5))
157
+ - add XML_XMLNS to default prefixes
158
+ - update `registerPrefixes()` to error if attempting to overwrite prefix
159
+ - add support for namespaced el/attribs ([9d16ef0](https://github.com/thi-ng/umbrella/commit/9d16ef0))
160
+ - add deps ([@thi.ng/prefixes](https://github.com/thi-ng/umbrella/tree/main/packages/prefixes))
161
+ - add `registerPrefix()` helper
162
+ - update `$el()` and `setAttrib()` to check for prefixed names
163
+ - update $tree() span handling, update $moveTo() ([6d90187](https://github.com/thi-ng/umbrella/commit/6d90187))
164
+ - rename hdom2020 => rdom, update pkg ([1224706](https://github.com/thi-ng/umbrella/commit/1224706))
90
165
 
91
- ### Features
166
+ #### ♻️ Refactoring
92
167
 
93
- - **rdom:** add RDFa `prefix` attrib support, update prefix handling ([b589da5](https://github.com/thi-ng/umbrella/commit/b589da51385957a5defffb66307bd3d750814e4c))
94
- - **rdom:** add support for namespaced el/attribs ([9d16ef0](https://github.com/thi-ng/umbrella/commit/9d16ef0a2f6d6a062bf164ca38813290d7660149))
95
- - **rdom:** rename hdom2020 => rdom, update pkg ([1224706](https://github.com/thi-ng/umbrella/commit/1224706fa2fbca82afb73afeda3c3075c9b35f91))
96
- - **rdom:** update $tree() span handling, update $moveTo() ([6d90187](https://github.com/thi-ng/umbrella/commit/6d9018763af7f0f2096cdc1d79889791193a01e0))
168
+ - update IMountWith, $SubA ([c93efad](https://github.com/thi-ng/umbrella/commit/c93efad))
package/README.md CHANGED
@@ -68,9 +68,9 @@ value is used as (text) body of an element (or an element/component itself),
68
68
  only that body/subtree in the target DOM will be impacted/updated directly...
69
69
 
70
70
  The package provides an interface
71
- [`IComponent`](https://docs.thi.ng/umbrella/rdom/interfaces/icomponent.html)
71
+ [`IComponent`](https://docs.thi.ng/umbrella/rdom/interfaces/IComponent.html)
72
72
  (with a super simple life cycle API), a base component class
73
- [`Component`](https://docs.thi.ng/umbrella/rdom/classes/component.html) for stubbing and a
73
+ [`Component`](https://docs.thi.ng/umbrella/rdom/classes/Component.html) for stubbing and a
74
74
  number of fundamental control constructs & component-wrappers for composing more
75
75
  complex components and to reduce boilerplate for various situations. Whilst
76
76
  targetting a standard JS DOM by default, each component can decide for itself
@@ -89,7 +89,7 @@ draw calls.
89
89
  Since there's no central coordination in _rdom_ (neither explicitly nor
90
90
  implicitly), each component can (and does) update whenever its state value has
91
91
  changed. Likewise, components are free to directly manipulate the DOM through
92
- other means, as hinted at earlier. Various _rdom_ control constructs are dispatching component updates via a central scheduler. By default this is only a dummy implementation which processes tasks immediately. However, as usual _rdom_ only relies on the [`IScheduler`](https://docs.thi.ng/umbrella/rdom/interfaces/ischeduler.html) interface and so supports other implementations, like [`RAFScheduler`](https://docs.thi.ng/umbrella/rdom/classes/rafscheduler.html).
92
+ other means, as hinted at earlier. Various _rdom_ control constructs are dispatching component updates via a central scheduler. By default this is only a dummy implementation which processes tasks immediately. However, as usual _rdom_ only relies on the [`IScheduler`](https://docs.thi.ng/umbrella/rdom/interfaces/IScheduler.html) interface and so supports other implementations, like [`RAFScheduler`](https://docs.thi.ng/umbrella/rdom/classes/RAFScheduler.html).
93
93
 
94
94
  The [`IComponent`](https://docs.thi.ng/umbrella/rdom/interfaces/icomponent.html)
95
95
  interface is at the heart of _rdom_. It defines three lifecycle methods to:
@@ -173,7 +173,7 @@ node --experimental-repl-await
173
173
  > const rdom = await import("@thi.ng/rdom");
174
174
  ```
175
175
 
176
- Package sizes (gzipped, pre-treeshake): ESM: 3.98 KB
176
+ Package sizes (gzipped, pre-treeshake): ESM: 4.05 KB
177
177
 
178
178
  ## Dependencies
179
179
 
package/dom.d.ts CHANGED
@@ -47,7 +47,8 @@ export declare const $moveTo: (newParent: Element, el: Element, idx?: NumOrEleme
47
47
  export declare const $clear: (el: Element) => Element;
48
48
  /**
49
49
  * Same as `el.innerText = body`, however if `body` is an
50
- * {@link @thi.ng/api#IDeref} it'll be automatically deref'd.
50
+ * {@link @thi.ng/api#IDeref} it'll be automatically deref'd. For SVG elements a
51
+ * new child text DOM node will be created.
51
52
  *
52
53
  * @param el
53
54
  * @param body
@@ -57,7 +58,7 @@ export declare const $text: (el: HTMLElement, body: any) => void;
57
58
  * Same as `el.innerHtml = body`, use with caution! If `body` is an
58
59
  * {@link @thi.ng/api#IDeref} it'll be automatically deref'd.
59
60
  *
60
- * @param elß
61
+ * @param el
61
62
  * @param body
62
63
  */
63
64
  export declare const $html: (el: HTMLElement, body: MaybeDeref<string>) => void;
package/dom.js CHANGED
@@ -136,19 +136,26 @@ export const $moveTo = (newParent, el, idx = -1) => {
136
136
  export const $clear = (el) => ((el.innerHTML = ""), el);
137
137
  /**
138
138
  * Same as `el.innerText = body`, however if `body` is an
139
- * {@link @thi.ng/api#IDeref} it'll be automatically deref'd.
139
+ * {@link @thi.ng/api#IDeref} it'll be automatically deref'd. For SVG elements a
140
+ * new child text DOM node will be created.
140
141
  *
141
142
  * @param el
142
143
  * @param body
143
144
  */
144
145
  export const $text = (el, body) => {
145
- el.innerText = String(deref(body));
146
+ body = String(deref(body));
147
+ if (el.namespaceURI === XML_SVG) {
148
+ $clear(el).appendChild(document.createTextNode(body));
149
+ }
150
+ else {
151
+ el.innerText = body;
152
+ }
146
153
  };
147
154
  /**
148
155
  * Same as `el.innerHtml = body`, use with caution! If `body` is an
149
156
  * {@link @thi.ng/api#IDeref} it'll be automatically deref'd.
150
157
  *
151
- * @param elß
158
+ * @param el
152
159
  * @param body
153
160
  */
154
161
  export const $html = (el, body) => {
package/klist.js CHANGED
@@ -73,10 +73,10 @@ export class KList extends Component {
73
73
  let numPrev = items.length;
74
74
  let numCurr = curr.length;
75
75
  let i;
76
- for (i = numPrev; --i >= 0;) {
76
+ for (i = numPrev; i-- > 0;) {
77
77
  offsets.set(items[i].k, i);
78
78
  }
79
- for (i = numCurr; --i >= 0;) {
79
+ for (i = numCurr; i-- > 0;) {
80
80
  const val = curr[i];
81
81
  const key = keyFn(val, i);
82
82
  let item = cache.get(key);
package/package.json CHANGED
@@ -1,139 +1,144 @@
1
1
  {
2
- "name": "@thi.ng/rdom",
3
- "version": "0.7.8",
4
- "description": "Lightweight, reactive, VDOM-less UI/DOM components with async lifecycle and @thi.ng/hiccup compatible",
5
- "type": "module",
6
- "module": "./index.js",
7
- "typings": "./index.d.ts",
8
- "sideEffects": false,
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/thi-ng/umbrella.git"
12
- },
13
- "homepage": "https://github.com/thi-ng/umbrella/tree/master/packages/rdom#readme",
14
- "funding": [
15
- {
16
- "type": "github",
17
- "url": "https://github.com/sponsors/postspectacular"
18
- },
19
- {
20
- "type": "patreon",
21
- "url": "https://patreon.com/thing_umbrella"
22
- }
23
- ],
24
- "author": "Karsten Schmidt <k+npm@thi.ng>",
25
- "license": "Apache-2.0",
26
- "scripts": {
27
- "build": "yarn clean && tsc --declaration",
28
- "clean": "rimraf *.js *.d.ts *.map doc",
29
- "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
- "doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose",
31
- "doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
32
- "doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
33
- "pub": "yarn build && yarn publish --access public",
34
- "pub:wip": "yarn publish --access public --no-git-tag-version",
35
- "test": "testament test"
36
- },
37
- "dependencies": {
38
- "@thi.ng/api": "^8.1.0",
39
- "@thi.ng/checks": "^3.0.6",
40
- "@thi.ng/errors": "^2.0.6",
41
- "@thi.ng/hiccup": "^4.1.3",
42
- "@thi.ng/paths": "^5.0.7",
43
- "@thi.ng/prefixes": "^2.0.6",
44
- "@thi.ng/rstream": "^7.0.8",
45
- "@thi.ng/strings": "^3.1.3"
46
- },
47
- "devDependencies": {
48
- "@thi.ng/testament": "^0.1.6"
49
- },
50
- "keywords": [
51
- "async",
52
- "browser",
53
- "compiler",
54
- "component",
55
- "css",
56
- "datastructure",
57
- "dom",
58
- "hiccup",
59
- "html",
60
- "reactive",
61
- "rstream",
62
- "svg",
63
- "tree",
64
- "typescript",
65
- "ui"
66
- ],
67
- "publishConfig": {
68
- "access": "public"
2
+ "name": "@thi.ng/rdom",
3
+ "version": "0.8.2",
4
+ "description": "Lightweight, reactive, VDOM-less UI/DOM components with async lifecycle and @thi.ng/hiccup compatible",
5
+ "type": "module",
6
+ "module": "./index.js",
7
+ "typings": "./index.d.ts",
8
+ "sideEffects": false,
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/thi-ng/umbrella.git"
12
+ },
13
+ "homepage": "https://github.com/thi-ng/umbrella/tree/master/packages/rdom#readme",
14
+ "funding": [
15
+ {
16
+ "type": "github",
17
+ "url": "https://github.com/sponsors/postspectacular"
18
+ },
19
+ {
20
+ "type": "patreon",
21
+ "url": "https://patreon.com/thing_umbrella"
22
+ }
23
+ ],
24
+ "author": "Karsten Schmidt <k+npm@thi.ng>",
25
+ "license": "Apache-2.0",
26
+ "scripts": {
27
+ "build": "yarn clean && tsc --declaration",
28
+ "clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
29
+ "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
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",
33
+ "pub": "yarn npm publish --access public",
34
+ "pub:wip": "yarn npm publish --access public --no-git-tag-version",
35
+ "test": "testament test"
36
+ },
37
+ "dependencies": {
38
+ "@thi.ng/api": "^8.3.2",
39
+ "@thi.ng/checks": "^3.1.2",
40
+ "@thi.ng/errors": "^2.1.2",
41
+ "@thi.ng/hiccup": "^4.2.2",
42
+ "@thi.ng/paths": "^5.1.2",
43
+ "@thi.ng/prefixes": "^2.1.2",
44
+ "@thi.ng/rstream": "^7.2.0",
45
+ "@thi.ng/strings": "^3.2.2"
46
+ },
47
+ "devDependencies": {
48
+ "@microsoft/api-extractor": "^7.18.19",
49
+ "@thi.ng/testament": "^0.2.2",
50
+ "rimraf": "^3.0.2",
51
+ "tools": "^0.0.1",
52
+ "typedoc": "^0.22.9",
53
+ "typescript": "^4.5.2"
54
+ },
55
+ "keywords": [
56
+ "async",
57
+ "browser",
58
+ "compiler",
59
+ "component",
60
+ "css",
61
+ "datastructure",
62
+ "dom",
63
+ "hiccup",
64
+ "html",
65
+ "reactive",
66
+ "rstream",
67
+ "svg",
68
+ "tree",
69
+ "typescript",
70
+ "ui"
71
+ ],
72
+ "publishConfig": {
73
+ "access": "public"
74
+ },
75
+ "engines": {
76
+ "node": ">=12.7"
77
+ },
78
+ "files": [
79
+ "*.js",
80
+ "*.d.ts"
81
+ ],
82
+ "exports": {
83
+ ".": {
84
+ "import": "./index.js"
85
+ },
86
+ "./api": {
87
+ "import": "./api.js"
88
+ },
89
+ "./checks": {
90
+ "import": "./checks.js"
91
+ },
92
+ "./compile": {
93
+ "import": "./compile.js"
94
+ },
95
+ "./component": {
96
+ "import": "./component.js"
97
+ },
98
+ "./dom": {
99
+ "import": "./dom.js"
100
+ },
101
+ "./event": {
102
+ "import": "./event.js"
103
+ },
104
+ "./klist": {
105
+ "import": "./klist.js"
106
+ },
107
+ "./list": {
108
+ "import": "./list.js"
109
+ },
110
+ "./object": {
111
+ "import": "./object.js"
112
+ },
113
+ "./promise": {
114
+ "import": "./promise.js"
115
+ },
116
+ "./replace": {
117
+ "import": "./replace.js"
118
+ },
119
+ "./scheduler": {
120
+ "import": "./scheduler.js"
121
+ },
122
+ "./sub": {
123
+ "import": "./sub.js"
69
124
  },
70
- "engines": {
71
- "node": ">=12.7"
125
+ "./switch": {
126
+ "import": "./switch.js"
72
127
  },
73
- "files": [
74
- "*.js",
75
- "*.d.ts"
128
+ "./wrap": {
129
+ "import": "./wrap.js"
130
+ }
131
+ },
132
+ "thi.ng": {
133
+ "related": [
134
+ "hdom",
135
+ "hiccup",
136
+ "hiccup-html",
137
+ "hiccup-svg",
138
+ "transducers"
76
139
  ],
77
- "exports": {
78
- ".": {
79
- "import": "./index.js"
80
- },
81
- "./api": {
82
- "import": "./api.js"
83
- },
84
- "./checks": {
85
- "import": "./checks.js"
86
- },
87
- "./compile": {
88
- "import": "./compile.js"
89
- },
90
- "./component": {
91
- "import": "./component.js"
92
- },
93
- "./dom": {
94
- "import": "./dom.js"
95
- },
96
- "./event": {
97
- "import": "./event.js"
98
- },
99
- "./klist": {
100
- "import": "./klist.js"
101
- },
102
- "./list": {
103
- "import": "./list.js"
104
- },
105
- "./object": {
106
- "import": "./object.js"
107
- },
108
- "./promise": {
109
- "import": "./promise.js"
110
- },
111
- "./replace": {
112
- "import": "./replace.js"
113
- },
114
- "./scheduler": {
115
- "import": "./scheduler.js"
116
- },
117
- "./sub": {
118
- "import": "./sub.js"
119
- },
120
- "./switch": {
121
- "import": "./switch.js"
122
- },
123
- "./wrap": {
124
- "import": "./wrap.js"
125
- }
126
- },
127
- "thi.ng": {
128
- "related": [
129
- "hdom",
130
- "hiccup",
131
- "hiccup-html",
132
- "hiccup-svg",
133
- "transducers"
134
- ],
135
- "status": "beta",
136
- "year": 2020
137
- },
138
- "gitHead": "852cd2450617c86d15d18477dc634f17f04202eb"
139
- }
140
+ "status": "beta",
141
+ "year": 2020
142
+ },
143
+ "gitHead": "e8a7c2a40191b391cef182c2978e5a6c85987a87\n"
144
+ }
package/scheduler.js CHANGED
@@ -22,7 +22,7 @@ export class RAFScheduler {
22
22
  }
23
23
  update() {
24
24
  for (let tasks of this.tasks.values()) {
25
- for (let i = tasks.length; --i >= 0; tasks[i]())
25
+ for (let i = tasks.length; i-- > 0; tasks[i]())
26
26
  ;
27
27
  }
28
28
  this.tasks.clear();