@thi.ng/hdom-components 4.0.47 → 5.0.3

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
@@ -3,7 +3,7 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [4.0.47](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@4.0.46...@thi.ng/hdom-components@4.0.47) (2021-08-19)
6
+ ## [5.0.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@5.0.2...@thi.ng/hdom-components@5.0.3) (2021-10-15)
7
7
 
8
8
  **Note:** Version bump only for package @thi.ng/hdom-components
9
9
 
@@ -11,7 +11,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
 
12
12
 
13
13
 
14
- ## [4.0.46](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@4.0.45...@thi.ng/hdom-components@4.0.46) (2021-08-19)
14
+ ## [5.0.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@5.0.1...@thi.ng/hdom-components@5.0.2) (2021-10-15)
15
15
 
16
16
  **Note:** Version bump only for package @thi.ng/hdom-components
17
17
 
@@ -19,7 +19,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
19
19
 
20
20
 
21
21
 
22
- ## [4.0.45](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@4.0.44...@thi.ng/hdom-components@4.0.45) (2021-08-17)
22
+ ## [5.0.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@5.0.0...@thi.ng/hdom-components@5.0.1) (2021-10-13)
23
23
 
24
24
  **Note:** Version bump only for package @thi.ng/hdom-components
25
25
 
@@ -27,210 +27,131 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
27
27
 
28
28
 
29
29
 
30
- ## [4.0.44](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@4.0.43...@thi.ng/hdom-components@4.0.44) (2021-08-08)
31
-
32
- **Note:** Version bump only for package @thi.ng/hdom-components
33
-
34
-
35
-
36
-
37
-
38
- ## [4.0.43](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@4.0.42...@thi.ng/hdom-components@4.0.43) (2021-08-08)
39
-
40
- **Note:** Version bump only for package @thi.ng/hdom-components
41
-
42
-
43
-
44
-
45
-
46
- ## [4.0.42](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@4.0.41...@thi.ng/hdom-components@4.0.42) (2021-08-04)
47
-
48
- **Note:** Version bump only for package @thi.ng/hdom-components
49
-
50
-
51
-
52
-
53
-
54
- ## [4.0.41](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@4.0.40...@thi.ng/hdom-components@4.0.41) (2021-08-04)
55
-
56
- **Note:** Version bump only for package @thi.ng/hdom-components
57
-
58
-
59
-
60
-
61
-
62
- ## [4.0.40](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@4.0.39...@thi.ng/hdom-components@4.0.40) (2021-07-27)
63
-
64
- **Note:** Version bump only for package @thi.ng/hdom-components
65
-
66
-
67
-
30
+ # [5.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@4.0.48...@thi.ng/hdom-components@5.0.0) (2021-10-12)
68
31
 
69
32
 
70
- ## [4.0.39](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@4.0.38...@thi.ng/hdom-components@4.0.39) (2021-07-01)
71
-
72
- **Note:** Version bump only for package @thi.ng/hdom-components
73
-
74
-
75
-
76
-
77
-
78
- ## [4.0.38](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@4.0.37...@thi.ng/hdom-components@4.0.38) (2021-06-08)
79
-
80
- **Note:** Version bump only for package @thi.ng/hdom-components
81
-
82
-
83
-
84
-
85
-
86
- # [4.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@3.2.12...@thi.ng/hdom-components@4.0.0) (2020-06-07)
87
-
88
-
89
- ### Code Refactoring
33
+ ### Build System
90
34
 
91
- * **hdom-components:** remove adaptDPI() ([2b89ad4](https://github.com/thi-ng/umbrella/commit/2b89ad4135b9c765436fd4a496eecb080a9f59fa))
35
+ * major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
92
36
 
93
37
 
94
38
  ### BREAKING CHANGES
95
39
 
96
- * **hdom-components:** re-use adaptDPI() from new @thi.ng/adapt-dpi pkg
40
+ * discontinue CommonJS & UMD versions
97
41
 
98
- - update deps
42
+ - only ESM modules will be published from now on
43
+ - CJS obsolete due to ESM support in recent versions of node:
44
+ - i.e. launch NodeJS via:
45
+ - `node --experimental-specifier-resolution=node --experimental-repl-await`
46
+ - in the node REPL use `await import(...)` instead of `require()`
47
+ - UMD obsolete due to widespread browser support for ESM
99
48
 
49
+ Also:
50
+ - normalize/restructure/reorg all package.json files
51
+ - cleanup all build scripts, remove obsolete
52
+ - switch from mocha to @thi.ng/testament for all tests
100
53
 
101
54
 
102
55
 
103
56
 
104
- # [3.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@3.1.13...@thi.ng/hdom-components@3.2.0) (2020-03-06)
105
57
 
106
58
 
107
- ### Bug Fixes
59
+ # [4.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@3.2.12...@thi.ng/hdom-components@4.0.0) (2020-06-07)
108
60
 
109
- * **hdom-components:** fix total size calc in slideToggleRect() ([8f58b09](https://github.com/thi-ng/umbrella/commit/8f58b0992396357f4e06a7c2d835a751ef848dfd))
61
+ ### Code Refactoring
110
62
 
63
+ - **hdom-components:** remove adaptDPI() ([2b89ad4](https://github.com/thi-ng/umbrella/commit/2b89ad4135b9c765436fd4a496eecb080a9f59fa))
111
64
 
112
- ### Features
65
+ ### BREAKING CHANGES
113
66
 
114
- * **hdom-components:** import slideToggleDot/Rect() components ([a2d0158](https://github.com/thi-ng/umbrella/commit/a2d015863ddea9e7a883dc9e0ce0e2e9a38497ae))
67
+ - **hdom-components:** re-use adaptDPI() from new @thi.ng/adapt-dpi pkg
68
+ - update deps
115
69
 
70
+ # [3.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@3.1.13...@thi.ng/hdom-components@3.2.0) (2020-03-06)
116
71
 
72
+ ### Bug Fixes
117
73
 
74
+ - **hdom-components:** fix total size calc in slideToggleRect() ([8f58b09](https://github.com/thi-ng/umbrella/commit/8f58b0992396357f4e06a7c2d835a751ef848dfd))
118
75
 
76
+ ### Features
119
77
 
120
- # [3.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@3.0.20...@thi.ng/hdom-components@3.1.0) (2019-07-07)
78
+ - **hdom-components:** import slideToggleDot/Rect() components ([a2d0158](https://github.com/thi-ng/umbrella/commit/a2d015863ddea9e7a883dc9e0ce0e2e9a38497ae))
121
79
 
122
- ### Bug Fixes
80
+ # [3.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@3.0.20...@thi.ng/hdom-components@3.1.0) (2019-07-07)
123
81
 
124
- * **hdom-components:** update CanvasHandler args ([080411f](https://github.com/thi-ng/umbrella/commit/080411f))
82
+ ### Bug Fixes
125
83
 
126
- ### Features
84
+ - **hdom-components:** update CanvasHandler args ([080411f](https://github.com/thi-ng/umbrella/commit/080411f))
127
85
 
128
- * **hdom-components:** enable TS strict compiler flags (refactor) ([6233ba2](https://github.com/thi-ng/umbrella/commit/6233ba2))
86
+ ### Features
129
87
 
130
- ## [3.0.17](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@3.0.16...@thi.ng/hdom-components@3.0.17) (2019-04-16)
88
+ - **hdom-components:** enable TS strict compiler flags (refactor) ([6233ba2](https://github.com/thi-ng/umbrella/commit/6233ba2))
131
89
 
132
- ### Bug Fixes
90
+ ## [3.0.17](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@3.0.16...@thi.ng/hdom-components@3.0.17) (2019-04-16)
133
91
 
134
- * **hdom-components:** `this` handling in CanvasHandlers ([f104b64](https://github.com/thi-ng/umbrella/commit/f104b64))
92
+ ### Bug Fixes
135
93
 
136
- # [3.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@2.4.6...@thi.ng/hdom-components@3.0.0) (2019-01-21)
94
+ - **hdom-components:** `this` handling in CanvasHandlers ([f104b64](https://github.com/thi-ng/umbrella/commit/f104b64))
137
95
 
138
- ### Build System
139
-
140
- * update package scripts, outputs, imports in remaining packages ([f912a84](https://github.com/thi-ng/umbrella/commit/f912a84))
141
-
142
- ### BREAKING CHANGES
143
-
144
- * enable multi-outputs (ES6 modules, CJS, UMD)
145
-
146
- - build scripts now first build ES6 modules in package root, then call
147
- `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
148
- - all imports MUST be updated to only refer to package level
149
- (not individual files anymore). tree shaking in user land will get rid of
150
- all unused imported symbols
151
-
152
- # [2.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@2.3.0...@thi.ng/hdom-components@2.4.0) (2018-12-14)
153
-
154
- ### Features
96
+ # [3.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@2.4.6...@thi.ng/hdom-components@3.0.0) (2019-01-21)
155
97
 
156
- * **hdom-components:** merge button & button group attribs ([da441c1](https://github.com/thi-ng/umbrella/commit/da441c1))
98
+ ### Build System
157
99
 
158
- # [2.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@2.2.15...@thi.ng/hdom-components@2.3.0) (2018-12-13)
100
+ - update package scripts, outputs, imports in remaining packages ([f912a84](https://github.com/thi-ng/umbrella/commit/f912a84))
159
101
 
160
- ### Features
102
+ ### BREAKING CHANGES
161
103
 
162
- * **hdom-components:** add FPS counter & sparkline components, update deps ([ebd3380](https://github.com/thi-ng/umbrella/commit/ebd3380))
104
+ - enable multi-outputs (ES6 modules, CJS, UMD)
105
+ - build scripts now first build ES6 modules in package root, then call `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
106
+ - all imports MUST be updated to only refer to package level (not individual files anymore). tree shaking in user land will get rid of all unused imported symbols
163
107
 
164
- ## [2.2.11](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@2.2.10...@thi.ng/hdom-components@2.2.11) (2018-10-17)
108
+ # [2.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@2.3.0...@thi.ng/hdom-components@2.4.0) (2018-12-14)
165
109
 
166
- ### Bug Fixes
110
+ ### Features
167
111
 
168
- * **hdom-components:** add Canvas2DContextAttributes (removed in TS3.1) ([775cc8a](https://github.com/thi-ng/umbrella/commit/775cc8a))
112
+ - **hdom-components:** merge button & button group attribs ([da441c1](https://github.com/thi-ng/umbrella/commit/da441c1))
169
113
 
170
- <a name="2.2.0"></a>
171
- # [2.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@2.1.13...@thi.ng/hdom-components@2.2.0) (2018-08-27)
114
+ # [2.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@2.2.15...@thi.ng/hdom-components@2.3.0) (2018-12-13)
172
115
 
173
- ### Bug Fixes
116
+ ### Features
174
117
 
175
- * **hdom-components:** call canvas update from init() ([b25edbe](https://github.com/thi-ng/umbrella/commit/b25edbe))
118
+ - **hdom-components:** add FPS counter & sparkline components, update deps ([ebd3380](https://github.com/thi-ng/umbrella/commit/ebd3380))
176
119
 
177
- ### Features
120
+ ## [2.2.11](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@2.2.10...@thi.ng/hdom-components@2.2.11) (2018-10-17)
178
121
 
179
- * **hdom-components:** add HDPI adaptation helper for canvas comps ([135d6f1](https://github.com/thi-ng/umbrella/commit/135d6f1))
122
+ ### Bug Fixes
180
123
 
181
- <a name="2.1.0"></a>
182
- # [2.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@2.0.3...@thi.ng/hdom-components@2.1.0) (2018-05-09)
124
+ - **hdom-components:** add Canvas2DContextAttributes (removed in TS3.1) ([775cc8a](https://github.com/thi-ng/umbrella/commit/775cc8a))
183
125
 
184
- ### Features
126
+ # [2.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@2.1.13...@thi.ng/hdom-components@2.2.0) (2018-08-27)
185
127
 
186
- * **hdom-components:** add button component ([cef3c6a](https://github.com/thi-ng/umbrella/commit/cef3c6a))
187
- * **hdom-components:** add buttonGroup ([c0950d6](https://github.com/thi-ng/umbrella/commit/c0950d6))
188
- * **hdom-components:** add notification component ([a11803c](https://github.com/thi-ng/umbrella/commit/a11803c))
189
- * **hdom-components:** add pager component, add [@thi](https://github.com/thi).ng/iterators dep ([efb288d](https://github.com/thi-ng/umbrella/commit/efb288d))
190
- * **hdom-components:** add title component ([f9a2daf](https://github.com/thi-ng/umbrella/commit/f9a2daf))
128
+ ### Bug Fixes
191
129
 
192
- <a name="2.0.0"></a>
193
- # [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@1.1.2...@thi.ng/hdom-components@2.0.0) (2018-04-08)
130
+ - **hdom-components:** call canvas update from init() ([b25edbe](https://github.com/thi-ng/umbrella/commit/b25edbe))
194
131
 
195
- ### Code Refactoring
132
+ ### Features
196
133
 
197
- * **hdom-components:** remove svg, update canvas (hdom context support) ([86d1f0d](https://github.com/thi-ng/umbrella/commit/86d1f0d))
198
- * **hdom-components:** update dropdown components ([0873832](https://github.com/thi-ng/umbrella/commit/0873832))
134
+ - **hdom-components:** add HDPI adaptation helper for canvas comps ([135d6f1](https://github.com/thi-ng/umbrella/commit/135d6f1))
199
135
 
200
- ### Features
136
+ # [2.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@2.0.3...@thi.ng/hdom-components@2.1.0) (2018-05-09)
201
137
 
202
- * **hdom-components:** update canvas handlers, add webgl2 version ([7c88a3f](https://github.com/thi-ng/umbrella/commit/7c88a3f))
138
+ ### Features
203
139
 
204
- ### BREAKING CHANGES
205
-
206
- * **hdom-components:** add hdom context arg as first arg to `dropdown` and
207
- `groupedDropdown`
208
- * **hdom-components:** canvas user handlers passed as object and taking
209
- different / more args
210
- * **hdom-components:** SVG functionality has been moved to new
211
- @thi.ng/hiccup-svg package. Canvas component user fns have new args
212
-
213
- <a name="1.1.0"></a>
214
- # [1.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@1.0.9...@thi.ng/hdom-components@1.1.0) (2018-03-29)
215
-
216
- ### Features
140
+ - **hdom-components:** add button component ([cef3c6a](https://github.com/thi-ng/umbrella/commit/cef3c6a))
141
+ - **hdom-components:** add buttonGroup ([c0950d6](https://github.com/thi-ng/umbrella/commit/c0950d6))
142
+ - **hdom-components:** add notification component ([a11803c](https://github.com/thi-ng/umbrella/commit/a11803c))
143
+ - **hdom-components:** add pager component, add [@thi](https://github.com/thi).ng/iterators dep ([efb288d](https://github.com/thi-ng/umbrella/commit/efb288d))
144
+ - **hdom-components:** add title component ([f9a2daf](https://github.com/thi-ng/umbrella/commit/f9a2daf))
217
145
 
218
- * **hdom-components:** add svg line() ([6cbacec](https://github.com/thi-ng/umbrella/commit/6cbacec))
146
+ # [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom-components@1.1.2...@thi.ng/hdom-components@2.0.0) (2018-04-08)
219
147
 
220
- <a name="1.0.0"></a>
221
- # 1.0.0 (2018-03-03)
222
-
223
- ### Features
224
-
225
- * **hdom-components:** rename package hiccup-dom-component => hdom-components ([752a78b](https://github.com/thi-ng/umbrella/commit/752a78b))
226
-
227
- ### BREAKING CHANGES
148
+ ### Code Refactoring
228
149
 
229
- * **hdom-components:** rename package hiccup-dom-component => hdom-components
150
+ - **hdom-components:** remove svg, update canvas (hdom context support) ([86d1f0d](https://github.com/thi-ng/umbrella/commit/86d1f0d))
151
+ - **hdom-components:** update dropdown components ([0873832](https://github.com/thi-ng/umbrella/commit/0873832))
230
152
 
231
- <a name="0.2.0"></a>
232
- # [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-dom-components@0.1.0...@thi.ng/hiccup-dom-components@0.2.0) (2018-02-24)
153
+ ### Features
233
154
 
234
- ### Features
155
+ - **hdom-components:** update canvas handlers, add webgl2 version ([7c88a3f](https://github.com/thi-ng/umbrella/commit/7c88a3f))
235
156
 
236
- * **hiccup-dom-components:** add gradient, group, path SVG funcs ([214fe4d](https://github.com/thi-ng/umbrella/commit/214fe4d))
157
+ ### BREAKING CHANGES
package/README.md CHANGED
@@ -49,15 +49,24 @@ components**. Feedback welcome!
49
49
  yarn add @thi.ng/hdom-components
50
50
  ```
51
51
 
52
+ ES module import:
53
+
52
54
  ```html
53
- // ES module
54
- <script type="module" src="https://unpkg.com/@thi.ng/hdom-components?module" crossorigin></script>
55
+ <script type="module" src="https://cdn.skypack.dev/@thi.ng/hdom-components"></script>
56
+ ```
57
+
58
+ [Skypack documentation](https://docs.skypack.dev/)
59
+
60
+ For Node.js REPL:
61
+
62
+ ```text
63
+ # with flag only for < v16
64
+ node --experimental-repl-await
55
65
 
56
- // UMD
57
- <script src="https://unpkg.com/@thi.ng/hdom-components/lib/index.umd.js" crossorigin></script>
66
+ > const hdomComponents = await import("@thi.ng/hdom-components");
58
67
  ```
59
68
 
60
- Package sizes (gzipped, pre-treeshake): ESM: 2.20 KB / CJS: 2.32 KB / UMD: 2.35 KB
69
+ Package sizes (gzipped, pre-treeshake): ESM: 2.21 KB
61
70
 
62
71
  ## Dependencies
63
72
 
@@ -77,15 +86,19 @@ directory are using this package.
77
86
  A selection:
78
87
 
79
88
  | Screenshot | Description | Live demo | Source |
80
- | ------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------- | --------------------------------------------------------- | -------------------------------------------------------------------------------------- |
89
+ |:-------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------|:----------------------------------------------------------|:---------------------------------------------------------------------------------------|
90
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/bitmap-font.gif" width="240"/> | Figlet-style bitmap font creation with transducers | [Demo](https://demo.thi.ng/umbrella/bitmap-font/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/bitmap-font) |
81
91
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/canvas-dial.png" width="240"/> | Canvas based dial widget | [Demo](https://demo.thi.ng/umbrella/canvas-dial/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/canvas-dial) |
92
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/cellular-automata.png" width="240"/> | 2D transducer based cellular automata | [Demo](https://demo.thi.ng/umbrella/cellular-automata/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/cellular-automata) |
82
93
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/crypto-chart.png" width="240"/> | Basic crypto-currency candle chart with multiple moving averages plots | [Demo](https://demo.thi.ng/umbrella/crypto-chart/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/crypto-chart) |
83
94
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/hdom-benchmark2.png" width="240"/> | hdom update performance benchmark w/ config options | [Demo](https://demo.thi.ng/umbrella/hdom-benchmark2/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/hdom-benchmark2) |
84
95
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/hdom-canvas/hdom-canvas-shapes-results.png" width="240"/> | Various hdom-canvas shape drawing examples & SVG conversion / export | [Demo](https://demo.thi.ng/umbrella/hdom-canvas-shapes/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/hdom-canvas-shapes) |
96
+ | | Custom dropdown UI component for hdom | [Demo](https://demo.thi.ng/umbrella/hdom-dropdown/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/hdom-dropdown) |
85
97
  | | Custom dropdown UI component w/ fuzzy search | [Demo](https://demo.thi.ng/umbrella/hdom-dropdown-fuzzy/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/hdom-dropdown-fuzzy) |
86
98
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/hdom-toggle.png" width="240"/> | Customizable slide toggle component demo | [Demo](https://demo.thi.ng/umbrella/hdom-toggle/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/hdom-toggle) |
87
99
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/mandelbrot.jpg" width="240"/> | Worker based, interactive Mandelbrot visualization | [Demo](https://demo.thi.ng/umbrella/mandelbrot/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/mandelbrot) |
88
100
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/triple-query.png" width="240"/> | Triple store query results & sortable table | [Demo](https://demo.thi.ng/umbrella/triple-query/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/triple-query) |
101
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/webgl-cubemap.jpg" width="240"/> | WebGL cube maps with async texture loading | [Demo](https://demo.thi.ng/umbrella/webgl-cubemap/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/webgl-cubemap) |
89
102
 
90
103
  ## API
91
104
 
package/button-group.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { IObjectOf } from "@thi.ng/api";
2
- import type { Button, ButtonArgs } from "./button";
2
+ import type { Button, ButtonArgs } from "./button.js";
3
3
  /**
4
4
  * Button group component config options.
5
5
  */
package/button-group.js CHANGED
@@ -1,4 +1,4 @@
1
- import { mergeAttribs } from "./utils/merge-attribs";
1
+ import { mergeAttribs } from "./utils/merge-attribs.js";
2
2
  /**
3
3
  * Higher order function to create a new stateless button group
4
4
  * component, pre-configured via user supplied options. The returned
@@ -44,4 +44,4 @@ const groupBody = (opts, disabled, buttons) => {
44
44
  }
45
45
  }
46
46
  };
47
- const bt = (el, disabled, bt) => disabled ? [el, Object.assign(Object.assign({}, bt[0]), { disabled: true }), ...bt.slice(1)] : [el, ...bt];
47
+ const bt = (el, disabled, bt) => disabled ? [el, { ...bt[0], disabled: true }, ...bt.slice(1)] : [el, ...bt];
package/button.js CHANGED
@@ -1,4 +1,4 @@
1
- import { mergeAttribs } from "./utils/merge-attribs";
1
+ import { mergeAttribs } from "./utils/merge-attribs.js";
2
2
  /**
3
3
  * Higher order function to create a new stateless button component,
4
4
  * pre-configured via user supplied options. The returned component
@@ -15,19 +15,31 @@ import { mergeAttribs } from "./utils/merge-attribs";
15
15
  */
16
16
  export const button = (opts) => {
17
17
  // init with defaults
18
- opts = Object.assign({ tag: "a", tagDisabled: "span", preventDefault: true, attribs: {} }, opts);
18
+ opts = {
19
+ tag: "a",
20
+ tagDisabled: "span",
21
+ preventDefault: true,
22
+ attribs: {},
23
+ ...opts,
24
+ };
19
25
  !opts.attribs.role && (opts.attribs.role = "button");
20
26
  return (_, args, ...body) => args.disabled
21
27
  ? [
22
28
  opts.tagDisabled,
23
- Object.assign(Object.assign({}, mergeAttribs(opts.attribsDisabled, args.attribs)), { disabled: true }),
29
+ {
30
+ ...mergeAttribs(opts.attribsDisabled, args.attribs),
31
+ disabled: true,
32
+ },
24
33
  ...body,
25
34
  ]
26
35
  : [
27
36
  opts.tag,
28
- Object.assign(Object.assign({}, mergeAttribs(opts.attribs, args.attribs)), { onclick: opts.preventDefault
37
+ {
38
+ ...mergeAttribs(opts.attribs, args.attribs),
39
+ onclick: opts.preventDefault
29
40
  ? (e) => (e.preventDefault(), args.onclick(e))
30
- : args.onclick }),
41
+ : args.onclick,
42
+ },
31
43
  ...body,
32
44
  ];
33
45
  };
package/dropdown.js CHANGED
@@ -5,7 +5,7 @@ export const option = ([value, label, disabled], sel) => [
5
5
  ];
6
6
  export const optgroup = (attribs, options, sel) => [
7
7
  "optgroup",
8
- Object.assign(Object.assign({}, attribs), { label: attribs.label || "--" }),
8
+ { ...attribs, label: attribs.label || "--" },
9
9
  ...options.map((o) => option(o, sel)),
10
10
  ];
11
11
  export const dropdown = (_, attribs, options, sel) => ["select", attribs, ...options.map((o) => option(o, sel))];
package/fps-counter.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { SparklineOpts } from "./sparkline";
1
+ import { SparklineOpts } from "./sparkline.js";
2
2
  export interface FpsCounterOpts {
3
3
  /**
4
4
  * Number of recorded samples.
package/fps-counter.js CHANGED
@@ -1,6 +1,6 @@
1
- import { step } from "@thi.ng/transducers";
2
- import { sma } from "@thi.ng/transducers-stats";
3
- import { sparkline } from "./sparkline";
1
+ import { step } from "@thi.ng/transducers/step";
2
+ import { sma } from "@thi.ng/transducers-stats/sma";
3
+ import { sparkline } from "./sparkline.js";
4
4
  /**
5
5
  * Customizable FPS counter with sparkline visualization of N previous
6
6
  * frames.
@@ -8,7 +8,13 @@ import { sparkline } from "./sparkline";
8
8
  * @param opts -
9
9
  */
10
10
  export const fpsCounter = (_opts) => {
11
- const opts = Object.assign({ history: 25, smooth: 5, labelPeriod: 250, sparkline: {} }, _opts);
11
+ const opts = {
12
+ history: 25,
13
+ smooth: 5,
14
+ labelPeriod: 250,
15
+ sparkline: {},
16
+ ..._opts,
17
+ };
12
18
  return {
13
19
  init() {
14
20
  this.last = Date.now();
@@ -33,7 +39,7 @@ export const fpsCounter = (_opts) => {
33
39
  "div",
34
40
  [
35
41
  sparkline,
36
- Object.assign({ min: 0, max: 65 }, opts.sparkline),
42
+ { min: 0, max: 65, ...opts.sparkline },
37
43
  this.buffer,
38
44
  ],
39
45
  [
package/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- export * from "./button";
2
- export * from "./button-group";
3
- export * from "./canvas";
4
- export * from "./dropdown";
5
- export * from "./fps-counter";
6
- export * from "./link";
7
- export * from "./notification";
8
- export * from "./pager";
9
- export * from "./sparkline";
10
- export * from "./title";
11
- export * from "./toggle";
12
- export * from "./utils/merge-attribs";
1
+ export * from "./button.js";
2
+ export * from "./button-group.js";
3
+ export * from "./canvas.js";
4
+ export * from "./dropdown.js";
5
+ export * from "./fps-counter.js";
6
+ export * from "./link.js";
7
+ export * from "./notification.js";
8
+ export * from "./pager.js";
9
+ export * from "./sparkline.js";
10
+ export * from "./title.js";
11
+ export * from "./toggle.js";
12
+ export * from "./utils/merge-attribs.js";
13
13
  //# sourceMappingURL=index.d.ts.map
package/index.js CHANGED
@@ -1,12 +1,12 @@
1
- export * from "./button";
2
- export * from "./button-group";
3
- export * from "./canvas";
4
- export * from "./dropdown";
5
- export * from "./fps-counter";
6
- export * from "./link";
7
- export * from "./notification";
8
- export * from "./pager";
9
- export * from "./sparkline";
10
- export * from "./title";
11
- export * from "./toggle";
12
- export * from "./utils/merge-attribs";
1
+ export * from "./button.js";
2
+ export * from "./button-group.js";
3
+ export * from "./canvas.js";
4
+ export * from "./dropdown.js";
5
+ export * from "./fps-counter.js";
6
+ export * from "./link.js";
7
+ export * from "./notification.js";
8
+ export * from "./pager.js";
9
+ export * from "./sparkline.js";
10
+ export * from "./title.js";
11
+ export * from "./toggle.js";
12
+ export * from "./utils/merge-attribs.js";
package/link.js CHANGED
@@ -1,4 +1,4 @@
1
- import { isString } from "@thi.ng/checks";
1
+ import { isString } from "@thi.ng/checks/is-string";
2
2
  export const link = (attribs, body) => [
3
3
  "a",
4
4
  isString(attribs) ? { href: attribs } : attribs,
@@ -6,9 +6,13 @@ export const link = (attribs, body) => [
6
6
  ];
7
7
  export const appLink = (_, attribs, onclick, body) => [
8
8
  "a",
9
- Object.assign({ href: "#", onclick: (e) => {
9
+ {
10
+ href: "#",
11
+ onclick: (e) => {
10
12
  e.preventDefault();
11
13
  onclick(e);
12
- } }, attribs),
14
+ },
15
+ ...attribs,
16
+ },
13
17
  body,
14
18
  ];
package/notification.js CHANGED
@@ -1,4 +1,4 @@
1
- import { appLink } from "./link";
1
+ import { appLink } from "./link.js";
2
2
  /**
3
3
  * Higher order function to create a new stateless notification
4
4
  * component, pre-configured via user supplied options. The returned
@@ -18,7 +18,7 @@ import { appLink } from "./link";
18
18
  export const notification = (opts = {}) => {
19
19
  return (_, args, body) => [
20
20
  "div",
21
- Object.assign(Object.assign({}, opts.attribs), args.attribs),
21
+ { ...opts.attribs, ...args.attribs },
22
22
  opts.icon,
23
23
  body,
24
24
  opts.close && args.onclose