@thi.ng/rstream-gestures 4.1.32 → 4.1.34

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**: 2022-11-30T22:27:38Z
3
+ - **Last updated**: 2022-12-20T16:33:11Z
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.
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  <!-- This file is generated - DO NOT EDIT! -->
2
2
 
3
- # ![rstream-gestures](https://media.thi.ng/umbrella/banners-20220914/thing-rstream-gestures.svg?cb215875)
3
+ # ![@thi.ng/rstream-gestures](https://media.thi.ng/umbrella/banners-20220914/thing-rstream-gestures.svg?cb215875)
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@thi.ng/rstream-gestures.svg)](https://www.npmjs.com/package/@thi.ng/rstream-gestures)
6
6
  ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/rstream-gestures.svg)
7
- [![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella)
7
+ [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  This project is part of the
10
10
  [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.
@@ -22,13 +22,11 @@ This project is part of the
22
22
  - [GestureStreamOpts](#gesturestreamopts)
23
23
  - [Basic usage](#basic-usage)
24
24
  - [Authors](#authors)
25
- - [Maintainer](#maintainer)
26
- - [Contributors](#contributors)
27
25
  - [License](#license)
28
26
 
29
27
  ## About
30
28
 
31
- Unified mouse, mouse wheel & multi-touch event stream abstraction. This is a support package for [@thi.ng/rstream](https://github.com/thi-ng/umbrella/tree/develop/packages/rstream).
29
+ Unified mouse, mouse wheel & multi-touch event stream abstraction
32
30
 
33
31
  ## Status
34
32
 
@@ -62,11 +60,8 @@ ES module import:
62
60
 
63
61
  For Node.js REPL:
64
62
 
65
- ```text
66
- # with flag only for < v16
67
- node --experimental-repl-await
68
-
69
- > const rstreamGestures = await import("@thi.ng/rstream-gestures");
63
+ ```js
64
+ const rstreamGestures = await import("@thi.ng/rstream-gestures");
70
65
  ```
71
66
 
72
67
  Package sizes (brotli'd, pre-treeshake): ESM: 1.07 KB
@@ -193,14 +188,9 @@ gestures.subscribe(
193
188
 
194
189
  ## Authors
195
190
 
196
- ### Maintainer
197
-
198
- - Karsten Schmidt ([@postspectacular](https://github.com/postspectacular))
199
-
200
- ### Contributors
201
-
202
- - Arthur Carabott ([@acarabott](https://github.com/acarabott))
203
- - Matei Adriel ([@Mateiadrielrafael](https://github.com/Mateiadrielrafael))
191
+ - [Karsten Schmidt](https://thi.ng) (Main author)
192
+ - [Arthur Carabott](https://github.com/acarabott)
193
+ - [Matei Adriel](https://github.com/Mateiadrielrafael)
204
194
 
205
195
  If this project contributes to an academic publication, please cite it as:
206
196
 
@@ -215,4 +205,4 @@ If this project contributes to an academic publication, please cite it as:
215
205
 
216
206
  ## License
217
207
 
218
- &copy; 2018 - 2022 Karsten Schmidt // Apache Software License 2.0
208
+ &copy; 2018 - 2022 Karsten Schmidt // Apache License 2.0
package/api.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import type { IID } from "@thi.ng/api";
2
2
  import type { StreamMerge } from "@thi.ng/rstream";
3
- export declare type GestureStream = StreamMerge<UIEvent, GestureEvent>;
4
- export declare type UIEvent = MouseEvent | TouchEvent | WheelEvent;
5
- export declare type UIEventID = "mousedown" | "mousemove" | "mouseup" | "touchstart" | "touchmove" | "touchend" | "touchcancel" | "wheel";
6
- export declare type GestureType = "move" | "start" | "drag" | "end" | "zoom";
3
+ export type GestureStream = StreamMerge<UIEvent, GestureEvent>;
4
+ export type UIEvent = MouseEvent | TouchEvent | WheelEvent;
5
+ export type UIEventID = "mousedown" | "mousemove" | "mouseup" | "touchstart" | "touchmove" | "touchend" | "touchcancel" | "wheel";
6
+ export type GestureType = "move" | "start" | "drag" | "end" | "zoom";
7
7
  export interface GestureInfo {
8
8
  /**
9
9
  * Touch/cursor ID. For mouse cursors this always is zero.
@@ -1,18 +1,16 @@
1
1
  import type { GestureStream, GestureStreamOpts } from "./api.js";
2
2
  /**
3
- * Attaches mouse & touch event listeners to given DOM element and
4
- * returns a stream of {@link GestureEvent}s and their
5
- * {@link GestureInfo} details.
3
+ * Attaches mouse & touch event listeners to given DOM element and returns a
4
+ * stream of {@link GestureEvent}s and their {@link GestureInfo} details.
6
5
  *
7
- * In multi-touch environments, a `GestureEvent` can contain multiple
8
- * such `GestureInfo` objects (one per active touch). In general, the
9
- * `click` and `delta` values are only present if the abstracted event
10
- * `type == "drag"`. Both (and `pos` too) are 2-element arrays
11
- * of `[x,y]` coordinates.
6
+ * In multi-touch environments, a `GestureEvent` can contain multiple such
7
+ * `GestureInfo` objects (one per active touch). In general, the `click` and
8
+ * `delta` values are only present if the abstracted event `type == "drag"`.
9
+ * Both (and `pos` too) are 2-element arrays of `[x,y]` coordinates.
12
10
  *
13
- * The `zoom` value is always present, but is only updated with wheel
14
- * events. The value will be constrained to `minZoom` ... `maxZoom`
15
- * interval (provided via options object).
11
+ * The `zoom` value is always present, but is only updated with wheel events.
12
+ * The value will be constrained to `minZoom` ... `maxZoom` interval (provided
13
+ * via options object).
16
14
  *
17
15
  * Note: If using `preventDefault` and attaching the event stream to
18
16
  * `document.body`, the following event listener options SHOULD be used:
@@ -22,7 +20,7 @@ import type { GestureStream, GestureStreamOpts } from "./api.js";
22
20
  * eventOpts: { passive: false }
23
21
  * ```
24
22
  *
25
- * {@link https://www.chromestatus.com/features/5093566007214080 }
23
+ * https://www.chromestatus.com/features/5093566007214080
26
24
  *
27
25
  * @param el -
28
26
  * @param opts -
package/gesture-stream.js CHANGED
@@ -21,19 +21,17 @@ const EVENT_GESTURETYPES = {
21
21
  wheel: "zoom",
22
22
  };
23
23
  /**
24
- * Attaches mouse & touch event listeners to given DOM element and
25
- * returns a stream of {@link GestureEvent}s and their
26
- * {@link GestureInfo} details.
24
+ * Attaches mouse & touch event listeners to given DOM element and returns a
25
+ * stream of {@link GestureEvent}s and their {@link GestureInfo} details.
27
26
  *
28
- * In multi-touch environments, a `GestureEvent` can contain multiple
29
- * such `GestureInfo` objects (one per active touch). In general, the
30
- * `click` and `delta` values are only present if the abstracted event
31
- * `type == "drag"`. Both (and `pos` too) are 2-element arrays
32
- * of `[x,y]` coordinates.
27
+ * In multi-touch environments, a `GestureEvent` can contain multiple such
28
+ * `GestureInfo` objects (one per active touch). In general, the `click` and
29
+ * `delta` values are only present if the abstracted event `type == "drag"`.
30
+ * Both (and `pos` too) are 2-element arrays of `[x,y]` coordinates.
33
31
  *
34
- * The `zoom` value is always present, but is only updated with wheel
35
- * events. The value will be constrained to `minZoom` ... `maxZoom`
36
- * interval (provided via options object).
32
+ * The `zoom` value is always present, but is only updated with wheel events.
33
+ * The value will be constrained to `minZoom` ... `maxZoom` interval (provided
34
+ * via options object).
37
35
  *
38
36
  * Note: If using `preventDefault` and attaching the event stream to
39
37
  * `document.body`, the following event listener options SHOULD be used:
@@ -43,7 +41,7 @@ const EVENT_GESTURETYPES = {
43
41
  * eventOpts: { passive: false }
44
42
  * ```
45
43
  *
46
- * {@link https://www.chromestatus.com/features/5093566007214080 }
44
+ * https://www.chromestatus.com/features/5093566007214080
47
45
  *
48
46
  * @param el -
49
47
  * @param opts -
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/rstream-gestures",
3
- "version": "4.1.32",
3
+ "version": "4.1.34",
4
4
  "description": "Unified mouse, mouse wheel & multi-touch event stream abstraction",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -21,7 +21,11 @@
21
21
  "url": "https://patreon.com/thing_umbrella"
22
22
  }
23
23
  ],
24
- "author": "Karsten Schmidt <k+npm@thi.ng>",
24
+ "author": "Karsten Schmidt (https://thi.ng)",
25
+ "contributors": [
26
+ "Arthur Carabott (https://github.com/acarabott)",
27
+ "Matei Adriel (https://github.com/Mateiadrielrafael)"
28
+ ],
25
29
  "license": "Apache-2.0",
26
30
  "scripts": {
27
31
  "build": "yarn clean && tsc --declaration",
@@ -34,19 +38,19 @@
34
38
  "test": "testament test"
35
39
  },
36
40
  "dependencies": {
37
- "@thi.ng/api": "^8.5.1",
38
- "@thi.ng/checks": "^3.3.4",
39
- "@thi.ng/math": "^5.3.15",
40
- "@thi.ng/rstream": "^7.2.30",
41
- "@thi.ng/transducers": "^8.3.25"
41
+ "@thi.ng/api": "^8.6.1",
42
+ "@thi.ng/checks": "^3.3.5",
43
+ "@thi.ng/math": "^5.3.17",
44
+ "@thi.ng/rstream": "^7.2.32",
45
+ "@thi.ng/transducers": "^8.3.27"
42
46
  },
43
47
  "devDependencies": {
44
- "@microsoft/api-extractor": "^7.33.5",
45
- "@thi.ng/testament": "^0.3.6",
48
+ "@microsoft/api-extractor": "^7.33.7",
49
+ "@thi.ng/testament": "^0.3.7",
46
50
  "rimraf": "^3.0.2",
47
51
  "tools": "^0.0.1",
48
- "typedoc": "^0.23.20",
49
- "typescript": "^4.8.4"
52
+ "typedoc": "^0.23.22",
53
+ "typescript": "^4.9.4"
50
54
  },
51
55
  "keywords": [
52
56
  "animation",
@@ -91,5 +95,5 @@
91
95
  ],
92
96
  "year": 2018
93
97
  },
94
- "gitHead": "1fe40da507070653f420156d91e6b27cf682004f\n"
98
+ "gitHead": "7b2af448da8a63fb21704a79cc4cdf1f3d7d7a64\n"
95
99
  }