js.foresight 3.0.1 → 3.1.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/README.md +120 -5
- package/dist/{src/types/types.d.ts → index.d.mts} +156 -67
- package/dist/index.d.ts +61 -47
- package/dist/index.js +2 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -12
- package/dist/Manager/ForesightManager.d.ts +0 -89
- package/dist/Manager/ForesightManager.d.ts.map +0 -1
- package/dist/Manager/ForesightManager.js +0 -639
- package/dist/Manager/ForesightManager.js.map +0 -1
- package/dist/Manager/constants.d.ts +0 -23
- package/dist/Manager/constants.d.ts.map +0 -1
- package/dist/Manager/constants.js +0 -24
- package/dist/Manager/constants.js.map +0 -1
- package/dist/Manager/helpers/clampNumber.d.ts +0 -2
- package/dist/Manager/helpers/clampNumber.d.ts.map +0 -1
- package/dist/Manager/helpers/clampNumber.js +0 -10
- package/dist/Manager/helpers/clampNumber.js.map +0 -1
- package/dist/Manager/helpers/getFocusedElementIndex.d.ts +0 -15
- package/dist/Manager/helpers/getFocusedElementIndex.d.ts.map +0 -1
- package/dist/Manager/helpers/getFocusedElementIndex.js +0 -27
- package/dist/Manager/helpers/getFocusedElementIndex.js.map +0 -1
- package/dist/Manager/helpers/getScrollDirection.d.ts +0 -3
- package/dist/Manager/helpers/getScrollDirection.d.ts.map +0 -1
- package/dist/Manager/helpers/getScrollDirection.js +0 -21
- package/dist/Manager/helpers/getScrollDirection.js.map +0 -1
- package/dist/Manager/helpers/lineSigmentIntersectsRect.d.ts +0 -12
- package/dist/Manager/helpers/lineSigmentIntersectsRect.d.ts.map +0 -1
- package/dist/Manager/helpers/lineSigmentIntersectsRect.js +0 -52
- package/dist/Manager/helpers/lineSigmentIntersectsRect.js.map +0 -1
- package/dist/Manager/helpers/predictNextMousePosition.d.ts +0 -19
- package/dist/Manager/helpers/predictNextMousePosition.d.ts.map +0 -1
- package/dist/Manager/helpers/predictNextMousePosition.js +0 -43
- package/dist/Manager/helpers/predictNextMousePosition.js.map +0 -1
- package/dist/Manager/helpers/predictNextScrollPosition.d.ts +0 -6
- package/dist/Manager/helpers/predictNextScrollPosition.d.ts.map +0 -1
- package/dist/Manager/helpers/predictNextScrollPosition.js +0 -20
- package/dist/Manager/helpers/predictNextScrollPosition.js.map +0 -1
- package/dist/Manager/helpers/rectAndHitSlop.d.ts +0 -33
- package/dist/Manager/helpers/rectAndHitSlop.d.ts.map +0 -1
- package/dist/Manager/helpers/rectAndHitSlop.js +0 -66
- package/dist/Manager/helpers/rectAndHitSlop.js.map +0 -1
- package/dist/Manager/helpers/shouldUpdateSetting.d.ts +0 -11
- package/dist/Manager/helpers/shouldUpdateSetting.d.ts.map +0 -1
- package/dist/Manager/helpers/shouldUpdateSetting.js +0 -16
- package/dist/Manager/helpers/shouldUpdateSetting.js.map +0 -1
- package/dist/helpers/shouldRegister.d.ts +0 -8
- package/dist/helpers/shouldRegister.d.ts.map +0 -1
- package/dist/helpers/shouldRegister.js +0 -31
- package/dist/helpers/shouldRegister.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/src/Manager/ForesightManager.d.ts +0 -89
- package/dist/src/Manager/ForesightManager.d.ts.map +0 -1
- package/dist/src/Manager/ForesightManager.test.d.ts +0 -2
- package/dist/src/Manager/ForesightManager.test.d.ts.map +0 -1
- package/dist/src/Manager/constants.d.ts +0 -23
- package/dist/src/Manager/constants.d.ts.map +0 -1
- package/dist/src/Manager/helpers/clampNumber.d.ts +0 -2
- package/dist/src/Manager/helpers/clampNumber.d.ts.map +0 -1
- package/dist/src/Manager/helpers/clampNumber.test.d.ts +0 -2
- package/dist/src/Manager/helpers/clampNumber.test.d.ts.map +0 -1
- package/dist/src/Manager/helpers/getFocusedElementIndex.d.ts +0 -15
- package/dist/src/Manager/helpers/getFocusedElementIndex.d.ts.map +0 -1
- package/dist/src/Manager/helpers/getFocusedElementIndex.test.d.ts +0 -2
- package/dist/src/Manager/helpers/getFocusedElementIndex.test.d.ts.map +0 -1
- package/dist/src/Manager/helpers/getScrollDirection.d.ts +0 -3
- package/dist/src/Manager/helpers/getScrollDirection.d.ts.map +0 -1
- package/dist/src/Manager/helpers/lineSegmentIntersectsRect.test.d.ts +0 -2
- package/dist/src/Manager/helpers/lineSegmentIntersectsRect.test.d.ts.map +0 -1
- package/dist/src/Manager/helpers/lineSigmentIntersectsRect.d.ts +0 -12
- package/dist/src/Manager/helpers/lineSigmentIntersectsRect.d.ts.map +0 -1
- package/dist/src/Manager/helpers/predictNextMousePosition.d.ts +0 -19
- package/dist/src/Manager/helpers/predictNextMousePosition.d.ts.map +0 -1
- package/dist/src/Manager/helpers/predictNextMousePosition.test.d.ts +0 -2
- package/dist/src/Manager/helpers/predictNextMousePosition.test.d.ts.map +0 -1
- package/dist/src/Manager/helpers/predictNextScrollPosition.d.ts +0 -6
- package/dist/src/Manager/helpers/predictNextScrollPosition.d.ts.map +0 -1
- package/dist/src/Manager/helpers/rectAndHitSlop.d.ts +0 -33
- package/dist/src/Manager/helpers/rectAndHitSlop.d.ts.map +0 -1
- package/dist/src/Manager/helpers/rectAndHitSlop.test.d.ts +0 -2
- package/dist/src/Manager/helpers/rectAndHitSlop.test.d.ts.map +0 -1
- package/dist/src/Manager/helpers/shouldUpdateSetting.d.ts +0 -11
- package/dist/src/Manager/helpers/shouldUpdateSetting.d.ts.map +0 -1
- package/dist/src/helpers/shouldRegister.d.ts +0 -8
- package/dist/src/helpers/shouldRegister.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -3
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/types/types.d.ts.map +0 -1
- package/dist/test-setup.d.ts +0 -17
- package/dist/test-setup.d.ts.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types/types.d.ts +0 -312
- package/dist/types/types.d.ts.map +0 -1
- package/dist/types/types.js +0 -2
- package/dist/types/types.js.map +0 -1
package/dist/types/types.d.ts
DELETED
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
export type Rect = {
|
|
2
|
-
top: number;
|
|
3
|
-
left: number;
|
|
4
|
-
right: number;
|
|
5
|
-
bottom: number;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* A callback function that is executed when a foresight interaction
|
|
9
|
-
* (e.g., hover, trajectory hit) occurs on a registered element.
|
|
10
|
-
*/
|
|
11
|
-
export type ForesightCallback = () => void;
|
|
12
|
-
/**
|
|
13
|
-
* Represents the HTML element that is being tracked by the ForesightManager.
|
|
14
|
-
* This is typically a standard DOM `Element`.
|
|
15
|
-
*/
|
|
16
|
-
export type ForesightElement = Element;
|
|
17
|
-
/**
|
|
18
|
-
* Represents a mouse position captured at a specific point in time.
|
|
19
|
-
* Used for tracking mouse movement history.
|
|
20
|
-
*/
|
|
21
|
-
export type MousePosition = {
|
|
22
|
-
/** The (x, y) coordinates of the mouse. */
|
|
23
|
-
point: Point;
|
|
24
|
-
/** The timestamp (e.g., from `performance.now()`) when this position was recorded. */
|
|
25
|
-
time: number;
|
|
26
|
-
};
|
|
27
|
-
export type Point = {
|
|
28
|
-
x: number;
|
|
29
|
-
y: number;
|
|
30
|
-
};
|
|
31
|
-
export type TrajectoryPositions = {
|
|
32
|
-
positions: MousePosition[];
|
|
33
|
-
currentPoint: Point;
|
|
34
|
-
predictedPoint: Point;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Internal type representing the calculated boundaries of a foresight element,
|
|
38
|
-
* including its original dimensions and the expanded hit area.
|
|
39
|
-
*/
|
|
40
|
-
export type ElementBounds = {
|
|
41
|
-
/** The expanded rectangle, including hitSlop, used for interaction detection. */
|
|
42
|
-
expandedRect: Rect;
|
|
43
|
-
/** The original bounding rectangle of the element, as returned by `getBoundingClientRect()`. */
|
|
44
|
-
originalRect?: DOMRectReadOnly | undefined;
|
|
45
|
-
/** The hit slop values applied to this element. */
|
|
46
|
-
hitSlop: Exclude<HitSlop, number>;
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* Represents trajectory hit related data for a foresight element.
|
|
50
|
-
*/
|
|
51
|
-
export type TrajectoryHitData = {
|
|
52
|
-
/** True if the predicted mouse trajectory has intersected the element's expanded bounds. */
|
|
53
|
-
isTrajectoryHit: boolean;
|
|
54
|
-
/** The timestamp when the last trajectory hit occurred. */
|
|
55
|
-
trajectoryHitTime: number;
|
|
56
|
-
/** Timeout ID for expiring the trajectory hit state. */
|
|
57
|
-
trajectoryHitExpirationTimeoutId?: ReturnType<typeof setTimeout>;
|
|
58
|
-
};
|
|
59
|
-
export type ForesightRegisterResult = {
|
|
60
|
-
/** Whether the current device is a touch device. This is important as ForesightJS only works based on cursor movement. If the user is using a touch device you should handle prefetching differently */
|
|
61
|
-
isTouchDevice: boolean;
|
|
62
|
-
/** Whether the user has connection limitations (slow network (2g) or data saver enabled) that should prevent prefetching */
|
|
63
|
-
isLimitedConnection: boolean;
|
|
64
|
-
/** Whether ForesightJS will actively track this element. False if touch device or limited connection, true otherwise */
|
|
65
|
-
isRegistered: boolean;
|
|
66
|
-
/** Function to unregister the element */
|
|
67
|
-
unregister: () => void;
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* Represents the data associated with a registered foresight element.
|
|
71
|
-
*/
|
|
72
|
-
export type ForesightElementData = Required<Pick<ForesightRegisterOptions, "callback" | "name">> & {
|
|
73
|
-
/** The boundary information for the element. */
|
|
74
|
-
elementBounds: ElementBounds;
|
|
75
|
-
/** True if the mouse cursor is currently hovering over the element's expanded bounds. */
|
|
76
|
-
isHovering: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Represents trajectory hit related data for a foresight element. Only used for the manager
|
|
79
|
-
*/
|
|
80
|
-
trajectoryHitData: TrajectoryHitData;
|
|
81
|
-
/**
|
|
82
|
-
* Is the element intersecting with the viewport, usefull to track which element we should observe or not
|
|
83
|
-
*/
|
|
84
|
-
isIntersectingWithViewport: boolean;
|
|
85
|
-
/**
|
|
86
|
-
* Amount of times this callback has been hit
|
|
87
|
-
*/
|
|
88
|
-
callbackHits: CallbackHits;
|
|
89
|
-
/**
|
|
90
|
-
* The element you registered
|
|
91
|
-
*/
|
|
92
|
-
element: ForesightElement;
|
|
93
|
-
};
|
|
94
|
-
export type MouseCallbackCounts = {
|
|
95
|
-
hover: number;
|
|
96
|
-
trajectory: number;
|
|
97
|
-
};
|
|
98
|
-
export type TabCallbackCounts = {
|
|
99
|
-
reverse: number;
|
|
100
|
-
forwards: number;
|
|
101
|
-
};
|
|
102
|
-
export type ScrollDirection = "down" | "up" | "left" | "right" | "none";
|
|
103
|
-
export type ScrollCallbackCounts = Record<`${Exclude<ScrollDirection, "none">}`, number>;
|
|
104
|
-
export type CallbackHits = {
|
|
105
|
-
total: number;
|
|
106
|
-
mouse: MouseCallbackCounts;
|
|
107
|
-
tab: TabCallbackCounts;
|
|
108
|
-
scroll: ScrollCallbackCounts;
|
|
109
|
-
};
|
|
110
|
-
export type HitType = {
|
|
111
|
-
kind: "mouse";
|
|
112
|
-
subType: keyof MouseCallbackCounts;
|
|
113
|
-
} | {
|
|
114
|
-
kind: "tab";
|
|
115
|
-
subType: keyof TabCallbackCounts;
|
|
116
|
-
} | {
|
|
117
|
-
kind: "scroll";
|
|
118
|
-
subType: keyof ScrollCallbackCounts;
|
|
119
|
-
};
|
|
120
|
-
/**
|
|
121
|
-
* Snapshot of the current ForesightManager state
|
|
122
|
-
*/
|
|
123
|
-
export type ForesightManagerData = {
|
|
124
|
-
registeredElements: ReadonlyMap<ForesightElement, ForesightElementData>;
|
|
125
|
-
globalSettings: Readonly<ForesightManagerSettings>;
|
|
126
|
-
globalCallbackHits: Readonly<CallbackHits>;
|
|
127
|
-
};
|
|
128
|
-
type BaseForesightManagerSettings = {
|
|
129
|
-
/**
|
|
130
|
-
* Number of mouse positions to keep in history for trajectory calculation.
|
|
131
|
-
* A higher number might lead to smoother but slightly delayed predictions.
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
* @link https://foresightjs.com/docs/getting_started/config#available-global-settings
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* **This value is clamped between 2 and 30.**
|
|
138
|
-
* @default 8
|
|
139
|
-
*/
|
|
140
|
-
positionHistorySize: number;
|
|
141
|
-
/**
|
|
142
|
-
*
|
|
143
|
-
* @deprecated will be removed from v4.0
|
|
144
|
-
* ForesightJS now have its stand-alone devtools library with the debugger built-in
|
|
145
|
-
* @link https://github.com/spaansba/ForesightJS-DevTools
|
|
146
|
-
*/
|
|
147
|
-
debug: boolean;
|
|
148
|
-
/**
|
|
149
|
-
* How far ahead (in milliseconds) to predict the mouse trajectory.
|
|
150
|
-
* A larger value means the prediction extends further into the future. (meaning it will trigger callbacks sooner)
|
|
151
|
-
*
|
|
152
|
-
* @link https://foresightjs.com/docs/getting_started/config#available-global-settings
|
|
153
|
-
*
|
|
154
|
-
* **This value is clamped between 10 and 200.**
|
|
155
|
-
* @default 120
|
|
156
|
-
*/
|
|
157
|
-
trajectoryPredictionTime: number;
|
|
158
|
-
/**
|
|
159
|
-
* Whether to enable mouse trajectory prediction.
|
|
160
|
-
* If false, only direct hover/interaction is considered.
|
|
161
|
-
* @link https://foresightjs.com/docs/getting_started/config#available-global-settings
|
|
162
|
-
* @default true
|
|
163
|
-
*/
|
|
164
|
-
enableMousePrediction: boolean;
|
|
165
|
-
/**
|
|
166
|
-
* Toggles whether keyboard prediction is on
|
|
167
|
-
*
|
|
168
|
-
* @link https://foresightjs.com/docs/getting_started/config#available-global-settings
|
|
169
|
-
* @default true
|
|
170
|
-
*/
|
|
171
|
-
enableTabPrediction: boolean;
|
|
172
|
-
/**
|
|
173
|
-
* Sets the pixel distance to check from the mouse position in the scroll direction.
|
|
174
|
-
*
|
|
175
|
-
* @link https://foresightjs.com/docs/getting_started/config#available-global-settings
|
|
176
|
-
*
|
|
177
|
-
* **This value is clamped between 30 and 300.**
|
|
178
|
-
* @default 150
|
|
179
|
-
*/
|
|
180
|
-
scrollMargin: number;
|
|
181
|
-
/**
|
|
182
|
-
* Toggles whether scroll prediction is on
|
|
183
|
-
* @link https://foresightjs.com/docs/getting_started/config#available-global-settings
|
|
184
|
-
* @default true
|
|
185
|
-
*/
|
|
186
|
-
enableScrollPrediction: boolean;
|
|
187
|
-
/**
|
|
188
|
-
* Tab stops away from an element to trigger callback. Only works when @argument enableTabPrediction is true
|
|
189
|
-
*
|
|
190
|
-
* **This value is clamped between 0 and 20.**
|
|
191
|
-
* @default 2
|
|
192
|
-
*/
|
|
193
|
-
tabOffset: number;
|
|
194
|
-
/**
|
|
195
|
-
* A global callback that runs whenever a callback is fired for any
|
|
196
|
-
* registered element, just after the element's specific callback is fired.
|
|
197
|
-
*
|
|
198
|
-
* @param elementData - The ForesightTarget object for the element that triggered the event.
|
|
199
|
-
* @param managerData - Data about the ForesightManager
|
|
200
|
-
*/
|
|
201
|
-
onAnyCallbackFired: (elementData: ForesightElementData, managerData: ForesightManagerData) => void;
|
|
202
|
-
};
|
|
203
|
-
/**
|
|
204
|
-
* Configuration options for the ForesightManager
|
|
205
|
-
* @link https://foresightjs.com/docs/getting_started/config#available-global-settings
|
|
206
|
-
*/
|
|
207
|
-
export type ForesightManagerSettings = BaseForesightManagerSettings & {
|
|
208
|
-
defaultHitSlop: Exclude<HitSlop, number>;
|
|
209
|
-
};
|
|
210
|
-
/**
|
|
211
|
-
* Update options for the ForesightManager
|
|
212
|
-
* @link https://foresightjs.com/docs/getting_started/config#available-global-settings
|
|
213
|
-
*/
|
|
214
|
-
export type UpdateForsightManagerSettings = BaseForesightManagerSettings & {
|
|
215
|
-
defaultHitSlop: HitSlop;
|
|
216
|
-
};
|
|
217
|
-
/**
|
|
218
|
-
* Type used to register elements to the foresight manager
|
|
219
|
-
*/
|
|
220
|
-
export type ForesightRegisterOptions = {
|
|
221
|
-
element: ForesightElement;
|
|
222
|
-
callback: ForesightCallback;
|
|
223
|
-
hitSlop?: HitSlop;
|
|
224
|
-
/**
|
|
225
|
-
* @deprecated will be removed in V4.0
|
|
226
|
-
*/
|
|
227
|
-
unregisterOnCallback?: boolean;
|
|
228
|
-
name?: string;
|
|
229
|
-
};
|
|
230
|
-
/**
|
|
231
|
-
* Usefull for if you want to create a custom button component in a modern framework (for example React).
|
|
232
|
-
* And you want to have the ForesightRegisterOptions used in ForesightManager.instance.register({})
|
|
233
|
-
* without the element as the element will be the ref of the component.
|
|
234
|
-
*
|
|
235
|
-
* @link https://foresightjs.com/docs/getting_started/typescript#foresightregisteroptionswithoutelement
|
|
236
|
-
*/
|
|
237
|
-
export type ForesightRegisterOptionsWithoutElement = Omit<ForesightRegisterOptions, "element">;
|
|
238
|
-
/**
|
|
239
|
-
* Fully invisible "slop" around the element.
|
|
240
|
-
* Basically increases the hover hitbox
|
|
241
|
-
*/
|
|
242
|
-
export type HitSlop = Rect | number;
|
|
243
|
-
/**
|
|
244
|
-
* Get all keys in UpdateForsightManagerSettings that are numeric
|
|
245
|
-
*/
|
|
246
|
-
export type NumericSettingKeys = {
|
|
247
|
-
[K in keyof UpdateForsightManagerSettings]: UpdateForsightManagerSettings[K] extends number ? K : never;
|
|
248
|
-
}[keyof UpdateForsightManagerSettings];
|
|
249
|
-
/**
|
|
250
|
-
* Get all keys in UpdateForsightManagerSettings that are boolean
|
|
251
|
-
*/
|
|
252
|
-
export type ManagerBooleanSettingKeys = {
|
|
253
|
-
[K in keyof UpdateForsightManagerSettings]: UpdateForsightManagerSettings[K] extends boolean ? K : never;
|
|
254
|
-
}[keyof UpdateForsightManagerSettings];
|
|
255
|
-
export interface ForesightEventMap {
|
|
256
|
-
elementRegistered: ElementRegisteredEvent;
|
|
257
|
-
elementUnregistered: ElementUnregisteredEvent;
|
|
258
|
-
elementDataUpdated: ElementDataUpdatedEvent;
|
|
259
|
-
callbackFired: CallbackFiredEvent;
|
|
260
|
-
mouseTrajectoryUpdate: MouseTrajectoryUpdateEvent;
|
|
261
|
-
scrollTrajectoryUpdate: ScrollTrajectoryUpdateEvent;
|
|
262
|
-
managerSettingsChanged: ManagerSettingsChangedEvent;
|
|
263
|
-
}
|
|
264
|
-
export type ForesightEventType = keyof ForesightEventMap;
|
|
265
|
-
export interface ForesightEvent {
|
|
266
|
-
type: ForesightEventType;
|
|
267
|
-
timestamp: number;
|
|
268
|
-
}
|
|
269
|
-
export interface ElementRegisteredEvent extends ForesightEvent {
|
|
270
|
-
type: "elementRegistered";
|
|
271
|
-
elementData: ForesightElementData;
|
|
272
|
-
}
|
|
273
|
-
export interface ElementUnregisteredEvent extends ForesightEvent {
|
|
274
|
-
type: "elementUnregistered";
|
|
275
|
-
elementData: ForesightElementData;
|
|
276
|
-
unregisterReason: ElementUnregisteredReason;
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* The reason an element was unregistered from ForesightManager's tracking.
|
|
280
|
-
* - `callbackHit`: The element was automatically unregistered after its callback fired.
|
|
281
|
-
* - `disconnected`: The element was automatically unregistered because it was removed from the DOM.
|
|
282
|
-
* - `apiCall`: The developer manually called the `unregister()` function for the element.
|
|
283
|
-
*/
|
|
284
|
-
export type ElementUnregisteredReason = "callbackHit" | "disconnected" | "apiCall";
|
|
285
|
-
export interface ElementDataUpdatedEvent extends ForesightEvent {
|
|
286
|
-
type: "elementDataUpdated";
|
|
287
|
-
elementData: ForesightElementData;
|
|
288
|
-
updatedProp: "bounds" | "visibility";
|
|
289
|
-
}
|
|
290
|
-
export interface CallbackFiredEvent extends ForesightEvent {
|
|
291
|
-
type: "callbackFired";
|
|
292
|
-
elementData: ForesightElementData;
|
|
293
|
-
hitType: HitType;
|
|
294
|
-
}
|
|
295
|
-
export interface MouseTrajectoryUpdateEvent extends ForesightEvent {
|
|
296
|
-
type: "mouseTrajectoryUpdate";
|
|
297
|
-
trajectoryPositions: TrajectoryPositions;
|
|
298
|
-
predictionEnabled: boolean;
|
|
299
|
-
}
|
|
300
|
-
export interface ScrollTrajectoryUpdateEvent extends ForesightEvent {
|
|
301
|
-
type: "scrollTrajectoryUpdate";
|
|
302
|
-
currentPoint: Point;
|
|
303
|
-
predictedPoint: Point;
|
|
304
|
-
}
|
|
305
|
-
export interface ManagerSettingsChangedEvent extends ForesightEvent {
|
|
306
|
-
type: "managerSettingsChanged";
|
|
307
|
-
newSettings: ForesightManagerSettings;
|
|
308
|
-
}
|
|
309
|
-
export type ForesightEventData = ElementRegisteredEvent | ElementUnregisteredEvent | ElementDataUpdatedEvent | CallbackFiredEvent | MouseTrajectoryUpdateEvent | ScrollTrajectoryUpdateEvent | ManagerSettingsChangedEvent;
|
|
310
|
-
export type ForesightEventListener = (event: ForesightEventData) => void;
|
|
311
|
-
export {};
|
|
312
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAA;AAE1C;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAA;AAEtC;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,2CAA2C;IAC3C,KAAK,EAAE,KAAK,CAAA;IACZ,sFAAsF;IACtF,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,KAAK,GAAG;IAClB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,aAAa,EAAE,CAAA;IAC1B,YAAY,EAAE,KAAK,CAAA;IACnB,cAAc,EAAE,KAAK,CAAA;CACtB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,iFAAi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,IAAI,EAAE,wBAAwB,CAAA;IAC9B,YAAY,EAAE,KAAK,CAAA;IACnB,cAAc,EAAE,KAAK,CAAA;CACtB;AAED,MAAM,WAAW,2BAA4B,SAAQ,cAAc;IACjE,IAAI,EAAE,wBAAwB,CAAA;IAC9B,WAAW,EAAE,wBAAwB,CAAA;CACtC;AAED,MAAM,MAAM,kBAAkB,GAC1B,sBAAsB,GACtB,wBAAwB,GACxB,uBAAuB,GACvB,kBAAkB,GAClB,0BAA0B,GAC1B,2BAA2B,GAC3B,2BAA2B,CAAA;AAG/B,MAAM,MAAM,sBAAsB,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAA"}
|
package/dist/types/types.js
DELETED
package/dist/types/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":""}
|