gesturx 1.8.2 → 1.8.4

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 CHANGED
@@ -73,16 +73,12 @@ declare interface PinchRecognizerOptions {
73
73
  }
74
74
 
75
75
  export declare class Recognizable<T extends Recognizer<any, any>[]> implements RecognizableInterface<T> {
76
- protected options: {
77
- recognizers: T;
78
- } & RecognizerConfig<unknown>;
76
+ protected options: RecognizableOptions<T>;
79
77
  events$: Observable<ObservedValueOf<T[number]["events$"]>>;
80
78
  recognizers: T;
81
79
  state$: Observable<RecognizableState>;
82
- constructor(options: {
83
- recognizers: T;
84
- } & RecognizerConfig<unknown>);
85
- update(options: RecognizerConfig<unknown>): void;
80
+ constructor(options: RecognizableOptions<T>);
81
+ update({ disableTextSelection, ...rest }: Partial<RecognizableOptions<T>>): void;
86
82
  }
87
83
 
88
84
  declare interface RecognizableInterface<T extends Recognizer<any, any>[]> {
@@ -113,6 +109,16 @@ declare interface RecognizableInterface<T extends Recognizer<any, any>[]> {
113
109
  update(options: RecognizerConfig<unknown>): void;
114
110
  }
115
111
 
112
+ declare type RecognizableOptions<T extends Recognizer<any, any>[]> = {
113
+ recognizers: T;
114
+ /**
115
+ * If you don't need to have text selection, set this to true
116
+ * to improve dragging gesture. This will prevent accidental
117
+ * text selection on your component.
118
+ */
119
+ disableTextSelection?: boolean;
120
+ } & RecognizerConfig<unknown>;
121
+
116
122
  declare type RecognizableState = {
117
123
  /**
118
124
  * Number of maximum simultaneous fingers currently registered
@@ -127,7 +133,7 @@ declare type RecognizableState = {
127
133
 
128
134
  export declare abstract class Recognizer<Options extends object = never, Event extends RecognizerEvent = RecognizerEvent> {
129
135
  protected configSubject: BehaviorSubject<RecognizerConfig<Options> & {
130
- panConfig?: PanConfig | undefined;
136
+ panConfig?: PanConfig;
131
137
  }>;
132
138
  protected pan$: Observable<RecognizerPanEvent>;
133
139
  protected panStart$: Observable<RecognizerEvent>;
@@ -141,7 +147,7 @@ export declare abstract class Recognizer<Options extends object = never, Event e
141
147
  protected pointerOff$: Observable<PointerEvent>;
142
148
  state$: Observable<State>;
143
149
  config$: Observable<RecognizerConfig<Options> & {
144
- panConfig?: PanConfig | undefined;
150
+ panConfig?: PanConfig;
145
151
  } & {
146
152
  container: HTMLElement;
147
153
  }>;