gesturx 1.6.0 → 1.7.1
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/dist/index.d.ts +19 -17
- package/dist/index.js +337 -312
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -12,11 +12,7 @@ declare type PanConfig = {
|
|
|
12
12
|
numInputs?: number;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
type: "panStart" | "panMove" | "panEnd";
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
declare interface PanEvent_2 extends RecognizerEvent {
|
|
15
|
+
declare interface PanEvent extends RecognizerEvent {
|
|
20
16
|
type: "panStart" | "panMove" | "panEnd";
|
|
21
17
|
}
|
|
22
18
|
|
|
@@ -28,8 +24,8 @@ export declare class PanRecognizer extends Recognizer<PanRecognizerOptions, PanE
|
|
|
28
24
|
update(config: RecognizerConfig<PanRecognizerOptions>): void;
|
|
29
25
|
}
|
|
30
26
|
|
|
31
|
-
declare interface PanRecognizerInterface extends Recognizer<PanRecognizerOptions,
|
|
32
|
-
events$: Observable<
|
|
27
|
+
declare interface PanRecognizerInterface extends Recognizer<PanRecognizerOptions, PanEvent> {
|
|
28
|
+
events$: Observable<PanEvent>;
|
|
33
29
|
update(options: RecognizerConfig<PanRecognizerOptions>): void;
|
|
34
30
|
}
|
|
35
31
|
|
|
@@ -77,16 +73,14 @@ declare interface PinchRecognizerOptions {
|
|
|
77
73
|
export declare class Recognizable<T extends Recognizer<any, any>[]> implements RecognizableInterface<T> {
|
|
78
74
|
protected options: {
|
|
79
75
|
recognizers: T;
|
|
80
|
-
|
|
81
|
-
};
|
|
76
|
+
} & RecognizerConfig<unknown>;
|
|
82
77
|
events$: Observable<ObservedValueOf<T[number]["events$"]>>;
|
|
83
78
|
recognizers: T;
|
|
84
79
|
state$: Observable<RecognizableState>;
|
|
85
80
|
constructor(options: {
|
|
86
81
|
recognizers: T;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
initialize(container: HTMLElement): void;
|
|
82
|
+
} & RecognizerConfig<unknown>);
|
|
83
|
+
update(options: RecognizerConfig<unknown>): void;
|
|
90
84
|
}
|
|
91
85
|
|
|
92
86
|
declare interface RecognizableInterface<T extends Recognizer<any, any>[]> {
|
|
@@ -108,12 +102,13 @@ declare interface RecognizableInterface<T extends Recognizer<any, any>[]> {
|
|
|
108
102
|
*/
|
|
109
103
|
readonly state$: Observable<RecognizableState>;
|
|
110
104
|
/**
|
|
111
|
-
*
|
|
105
|
+
* Update the recognizable with given options.
|
|
112
106
|
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
107
|
+
* The options are in fact passed down to all of the recognizers.
|
|
108
|
+
* Use it to initialize the container when you want to start
|
|
109
|
+
* listenin to gesture events.
|
|
115
110
|
*/
|
|
116
|
-
|
|
111
|
+
update(options: RecognizerConfig<unknown>): void;
|
|
117
112
|
}
|
|
118
113
|
|
|
119
114
|
declare type RecognizableState = {
|
|
@@ -132,7 +127,10 @@ export declare abstract class Recognizer<Options extends Record<any, any>, Event
|
|
|
132
127
|
protected configSubject: BehaviorSubject<RecognizerConfig<Options> & {
|
|
133
128
|
panConfig?: PanConfig | undefined;
|
|
134
129
|
}>;
|
|
135
|
-
protected
|
|
130
|
+
protected pan$: Observable<RecognizerPanEvent>;
|
|
131
|
+
protected panStart$: Observable<RecognizerEvent>;
|
|
132
|
+
protected panMove$: Observable<RecognizerEvent>;
|
|
133
|
+
protected panEnd$: Observable<RecognizerEvent>;
|
|
136
134
|
protected pointerEvent$: Observable<PointerEvent>;
|
|
137
135
|
protected pointerDown$: Observable<PointerEvent>;
|
|
138
136
|
protected pointerUp$: Observable<PointerEvent>;
|
|
@@ -204,6 +202,10 @@ declare interface RecognizerEvent {
|
|
|
204
202
|
pointersAverageDistance: number;
|
|
205
203
|
}
|
|
206
204
|
|
|
205
|
+
export declare interface RecognizerPanEvent extends RecognizerEvent {
|
|
206
|
+
type: "start" | "move" | "end";
|
|
207
|
+
}
|
|
208
|
+
|
|
207
209
|
declare interface RotateEvent extends RecognizerEvent {
|
|
208
210
|
type: "rotateMove" | "rotateStart" | "rotateEnd";
|
|
209
211
|
/**
|