cavalion-js 1.0.71 โ†’ 1.0.72

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/.md CHANGED
@@ -1,4 +1,5 @@
1
- * [CHANGELOG.md]() - [README.md]() - [package.json]() - [.js]()
1
+ * [CHANGELOG.md]() - [README.md]() - [package.json]()
2
+ * [.workspace](`(devtools/Workspace<${ws.getSpecializer()}>)`) - [.js]()
2
3
 
3
4
  # cavalion-js
4
5
 
@@ -45,15 +46,34 @@
45
46
  - [Scaffold.js](src/js/:)
46
47
  - [Type.js](src/js/:)
47
48
 
48
- # `0913`
49
+ # `2022/11/02`
49
50
 
50
- Working on [README.md]().
51
+ What about a shared _polyfill_-like file, loaded at startup in order to fill in the gaps of packages that are not updated/compiled just yet.
51
52
 
52
- # `0725`
53
+ if(!js.waitAll) {
54
+ js.waitAll = function(/* ... */) {
55
+ return Promise.all(js.copy_args(arguments).flat().map(p => {
56
+ if(typeof p === "string" && p.endsWith("ms")) { // for syntax/code that says it all
57
+ return new Promise(resolve => setTimeout(resolve, parseInt(p, 10)));
58
+ } else if(typeof p === "number") { // ok, we'll do this too ;-)
59
+ return new Promise(resolve => setTimeout(resolve, p));
60
+ } else if(!(p instanceof Promise)) {
61
+ throw new Error("Can not wait for", p);
62
+ }
63
+ return p;
64
+ }));
65
+ }
66
+ }
53
67
 
54
- Enhancing `js.groupBy` to accept multiple keys for grouping.
68
+ # `2022/09/13`
55
69
 
56
- # `0429`
70
+ * Working on [README.md]().
71
+
72
+ # `2022/07/25`
73
+
74
+ * Enhancing `js.groupBy` to accept multiple keys for grouping.
75
+
76
+ # `2022/04/29`
57
77
 
58
78
  I want to be able to activate these source files with [an overlay]([!prototypes/Hover]{}) of Markdown. Or... no, I want to overlay the source I guess. ๐Ÿ˜‡๐Ÿคจ๐Ÿค”
59
79
 
@@ -72,7 +92,7 @@ Still, it would be nice to just:
72
92
  * Press (**โ‡งโŒ˜.**) and overlay _the current context_ (whatever that might be anyways, probably a JavaScript module, rapportage-script) with _whatever_, starting with a _context-local_-[.md]()-file, sprouting in to whatever, but _mas-que-nada_ a starting point in order to...
73
93
  * ...overlay notes, bookmarks, links, scripts, photos, ...
74
94
 
75
- # `0424`
95
+ # `2022/04/24`
76
96
 
77
97
  * `js.args(arr)` - concats and filters `arr` for non-undefined values
78
98
 
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 2022/11/15 - 1.0.72
2
+
3
+ * DocumentHook: Adds the events onmouseover and onmouseout
4
+
5
+ ### 2022/11/07
6
+
7
+ * Adds `js.waitAll()`
8
+
1
9
  ### 2022/07/28 10/29 - 1.0.71
2
10
 
3
11
  * Adjusts/enhances `js.groupBy()` to use js.get(key,obj) in case obj doesn't have key
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Cavalion common JavaScript library. It consist of:
4
4
 
5
5
  * Constructor class registration
6
- * Console
6
+ * Console printing out vars
7
7
  * Data interfaces
8
8
  * Design(er) package (in development)
9
9
  * Utility Classes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cavalion-js",
3
- "version": "1.0.71",
3
+ "version": "1.0.72",
4
4
  "description": "Cavalion common JavaScript library",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/js/_js.js CHANGED
@@ -41,9 +41,6 @@ define(function(require) {
41
41
  nameOf: nameOf,
42
42
  defineClass: defineClass,
43
43
  mixIn: mixIn,
44
- // groupBy: (arr, key) => {
45
- // return arr.reduce((a, o) => ((a[js.get(key, o)] || (a[js.get(key, o)] = [])).push(o), a), {});
46
- // },
47
44
  groupBy: (arr, keys, mth) => {
48
45
  /*- groupBy: receives an array of objects and returns an object
49
46
  which keys hold reference to the resulting groups.
@@ -381,6 +378,17 @@ define(function(require) {
381
378
  * @returns
382
379
  */
383
380
  return window.clearTimeout(id);
384
- }
385
- });
381
+ },
382
+ waitAll: function(/* ... */) {
383
+ return Promise.all(js.copy_args(arguments).flat().map(p => {
384
+ if(typeof p === "string" && p.endsWith("ms")) { // for syntax/code that says it all
385
+ return new Promise(resolve => setTimeout(resolve, parseInt(p, 10)));
386
+ } else if(typeof p === "number") { // ok, we'll do this too ;-)
387
+ return new Promise(resolve => setTimeout(resolve, p));
388
+ } else if(!(p instanceof Promise)) {
389
+ throw new Error("Can not wait for", p);
390
+ }
391
+ return p;
392
+ }));
393
+ }, });
386
394
  });
@@ -18,7 +18,7 @@ define(function(require) {
18
18
  _events: [
19
19
  "ontransitionend",
20
20
  "ontouchstart", "ontouchend", "ontouchmove", "ontap", "ondbltap", "ongesture",
21
- "onclick", "ondblclick",
21
+ "onclick", "ondblclick", "onmouseout", "onmouseover",
22
22
  "onmousemove", "onmousedown", "onmouseup", "_onmousewheel", "onmouseenter", "onmouseleave",
23
23
  "onkeydown", "onkeyup", "onkeypress",
24
24
  "onfocus", "onblur",