Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@interactjs/utils

Package Overview
Dependencies
Maintainers
2
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@interactjs/utils - npm Package Compare versions

Comparing version 1.4.0-rc.3 to 1.4.0-rc.4

4

package.json
{
"name": "@interactjs/utils",
"version": "1.4.0-rc.3",
"version": "1.4.0-rc.4",
"devDependencies": {
"@interactjs/_dev": "1.4.0-rc.3"
"@interactjs/_dev": "1.4.0-rc.4"
},

@@ -7,0 +7,0 @@ "publishConfig": {

@@ -11,3 +11,3 @@ import pointerExtend from './pointerExtend';

getPointerId(pointer: any): any;
setCoords(targetObj: any, pointers: any[], timeStamp?: number): void;
setCoords(targetObj: any, pointers: any[], timeStamp: number): void;
pointerExtend: typeof pointerExtend;

@@ -48,136 +48,282 @@ getTouchPair(event: any): any[];

};
coordsToEvent({ page, client, timeStamp }: {
coordsToEvent(coords: {
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp?: number;
pointerId?: any;
target?: any;
}): ({
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp: number;
readonly pageX: number;
readonly pageY: number;
readonly clientX: number;
readonly clientY: number;
coords: {
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp?: number;
pointerId?: any;
target?: any;
};
readonly page: any;
readonly client: any;
readonly timeStamp: any;
readonly pageX: any;
readonly pageY: any;
readonly clientX: any;
readonly clientY: any;
readonly pointerId: any;
readonly target: any;
} & Touch & MouseEvent) | ({
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp: number;
readonly pageX: number;
readonly pageY: number;
readonly clientX: number;
readonly clientY: number;
coords: {
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp?: number;
pointerId?: any;
target?: any;
};
readonly page: any;
readonly client: any;
readonly timeStamp: any;
readonly pageX: any;
readonly pageY: any;
readonly clientX: any;
readonly clientY: any;
readonly pointerId: any;
readonly target: any;
} & Touch & PointerEvent) | ({
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp: number;
readonly pageX: number;
readonly pageY: number;
readonly clientX: number;
readonly clientY: number;
coords: {
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp?: number;
pointerId?: any;
target?: any;
};
readonly page: any;
readonly client: any;
readonly timeStamp: any;
readonly pageX: any;
readonly pageY: any;
readonly clientX: any;
readonly clientY: any;
readonly pointerId: any;
readonly target: any;
} & Touch & TouchEvent) | ({
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp: number;
readonly pageX: number;
readonly pageY: number;
readonly clientX: number;
readonly clientY: number;
coords: {
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp?: number;
pointerId?: any;
target?: any;
};
readonly page: any;
readonly client: any;
readonly timeStamp: any;
readonly pageX: any;
readonly pageY: any;
readonly clientX: any;
readonly clientY: any;
readonly pointerId: any;
readonly target: any;
} & Touch & import("@interactjs/core/InteractEvent").InteractEvent<any, any>) | ({
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp: number;
readonly pageX: number;
readonly pageY: number;
readonly clientX: number;
readonly clientY: number;
coords: {
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp?: number;
pointerId?: any;
target?: any;
};
readonly page: any;
readonly client: any;
readonly timeStamp: any;
readonly pageX: any;
readonly pageY: any;
readonly clientX: any;
readonly clientY: any;
readonly pointerId: any;
readonly target: any;
} & MouseEvent) | ({
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp: number;
readonly pageX: number;
readonly pageY: number;
readonly clientX: number;
readonly clientY: number;
coords: {
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp?: number;
pointerId?: any;
target?: any;
};
readonly page: any;
readonly client: any;
readonly timeStamp: any;
readonly pageX: any;
readonly pageY: any;
readonly clientX: any;
readonly clientY: any;
readonly pointerId: any;
readonly target: any;
} & MouseEvent & PointerEvent) | ({
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp: number;
readonly pageX: number;
readonly pageY: number;
readonly clientX: number;
readonly clientY: number;
coords: {
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp?: number;
pointerId?: any;
target?: any;
};
readonly page: any;
readonly client: any;
readonly timeStamp: any;
readonly pageX: any;
readonly pageY: any;
readonly clientX: any;
readonly clientY: any;
readonly pointerId: any;
readonly target: any;
} & MouseEvent & TouchEvent) | ({
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp: number;
readonly pageX: number;
readonly pageY: number;
readonly clientX: number;
readonly clientY: number;
coords: {
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp?: number;
pointerId?: any;
target?: any;
};
readonly page: any;
readonly client: any;
readonly timeStamp: any;
readonly pageX: any;
readonly pageY: any;
readonly clientX: any;
readonly clientY: any;
readonly pointerId: any;
readonly target: any;
} & MouseEvent & import("@interactjs/core/InteractEvent").InteractEvent<any, any>) | ({
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp: number;
readonly pageX: number;
readonly pageY: number;
readonly clientX: number;
readonly clientY: number;
coords: {
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp?: number;
pointerId?: any;
target?: any;
};
readonly page: any;
readonly client: any;
readonly timeStamp: any;
readonly pageX: any;
readonly pageY: any;
readonly clientX: any;
readonly clientY: any;
readonly pointerId: any;
readonly target: any;
} & PointerEvent & MouseEvent) | ({
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp: number;
readonly pageX: number;
readonly pageY: number;
readonly clientX: number;
readonly clientY: number;
coords: {
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp?: number;
pointerId?: any;
target?: any;
};
readonly page: any;
readonly client: any;
readonly timeStamp: any;
readonly pageX: any;
readonly pageY: any;
readonly clientX: any;
readonly clientY: any;
readonly pointerId: any;
readonly target: any;
} & PointerEvent) | ({
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp: number;
readonly pageX: number;
readonly pageY: number;
readonly clientX: number;
readonly clientY: number;
coords: {
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp?: number;
pointerId?: any;
target?: any;
};
readonly page: any;
readonly client: any;
readonly timeStamp: any;
readonly pageX: any;
readonly pageY: any;
readonly clientX: any;
readonly clientY: any;
readonly pointerId: any;
readonly target: any;
} & PointerEvent & TouchEvent) | ({
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp: number;
readonly pageX: number;
readonly pageY: number;
readonly clientX: number;
readonly clientY: number;
coords: {
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp?: number;
pointerId?: any;
target?: any;
};
readonly page: any;
readonly client: any;
readonly timeStamp: any;
readonly pageX: any;
readonly pageY: any;
readonly clientX: any;
readonly clientY: any;
readonly pointerId: any;
readonly target: any;
} & PointerEvent & import("@interactjs/core/InteractEvent").InteractEvent<any, any>) | ({
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp: number;
readonly pageX: number;
readonly pageY: number;
readonly clientX: number;
readonly clientY: number;
coords: {
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp?: number;
pointerId?: any;
target?: any;
};
readonly page: any;
readonly client: any;
readonly timeStamp: any;
readonly pageX: any;
readonly pageY: any;
readonly clientX: any;
readonly clientY: any;
readonly pointerId: any;
readonly target: any;
} & import("@interactjs/core/InteractEvent").InteractEvent<any, any> & MouseEvent) | ({
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp: number;
readonly pageX: number;
readonly pageY: number;
readonly clientX: number;
readonly clientY: number;
coords: {
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp?: number;
pointerId?: any;
target?: any;
};
readonly page: any;
readonly client: any;
readonly timeStamp: any;
readonly pageX: any;
readonly pageY: any;
readonly clientX: any;
readonly clientY: any;
readonly pointerId: any;
readonly target: any;
} & import("@interactjs/core/InteractEvent").InteractEvent<any, any> & PointerEvent) | ({
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp: number;
readonly pageX: number;
readonly pageY: number;
readonly clientX: number;
readonly clientY: number;
coords: {
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp?: number;
pointerId?: any;
target?: any;
};
readonly page: any;
readonly client: any;
readonly timeStamp: any;
readonly pageX: any;
readonly pageY: any;
readonly clientX: any;
readonly clientY: any;
readonly pointerId: any;
readonly target: any;
} & import("@interactjs/core/InteractEvent").InteractEvent<any, any> & TouchEvent) | ({
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp: number;
readonly pageX: number;
readonly pageY: number;
readonly clientX: number;
readonly clientY: number;
coords: {
page: import("../types/types").Point;
client: import("../types/types").Point;
timeStamp?: number;
pointerId?: any;
target?: any;
};
readonly page: any;
readonly client: any;
readonly timeStamp: any;
readonly pageX: any;
readonly pageY: any;
readonly clientX: any;
readonly clientY: any;
readonly pointerId: any;
readonly target: any;
} & import("@interactjs/core/InteractEvent").InteractEvent<any, any>);
};
export default pointerUtils;

@@ -81,3 +81,3 @@ import browser from './browser';

targetObj.client.y = tmpXY.y;
targetObj.timeStamp = is.number(timeStamp) ? timeStamp : new Date().getTime();
targetObj.timeStamp = timeStamp;
},

@@ -195,11 +195,14 @@ pointerExtend,

},
coordsToEvent({ page, client, timeStamp }) {
coordsToEvent(coords) {
const event = {
page,
client,
timeStamp,
get pageX() { return page.x; },
get pageY() { return page.y; },
get clientX() { return client.x; },
get clientY() { return client.y; },
coords,
get page() { return this.coords.page; },
get client() { return this.coords.client; },
get timeStamp() { return this.coords.timeStamp; },
get pageX() { return this.coords.page.x; },
get pageY() { return this.coords.page.y; },
get clientX() { return this.coords.client.x; },
get clientY() { return this.coords.client.y; },
get pointerId() { return this.coords.pointerId; },
get target() { return this.coords.target; },
};

@@ -210,2 +213,2 @@ return event;

export default pointerUtils;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9pbnRlclV0aWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsicG9pbnRlclV0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3M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C5wYXRoXG5cbiAgICByZXR1cm4gW1xuICAgICAgZG9tVXRpbHMuZ2V0QWN0dWFsRWxlbWVudChwYXRoID8gcGF0aFswXSA6IGV2ZW50LnRhcmdldCksXG4gICAgICBkb21VdGlscy5nZXRBY3R1YWxFbGVtZW50KGV2ZW50LmN1cnJlbnRUYXJnZXQpLFxuICAgIF1cbiAgfSxcblxuICBuZXdDb29yZHMgKCkge1xuICAgIHJldHVybiB7XG4gICAgICBwYWdlICAgICA6IHsgeDogMCwgeTogMCB9LFxuICAgICAgY2xpZW50ICAgOiB7IHg6IDAsIHk6IDAgfSxcbiAgICAgIHRpbWVTdGFtcDogMCxcbiAgICB9XG4gIH0sXG5cbiAgY29vcmRzVG9FdmVudCAoeyBwYWdlLCBjbGllbnQsIHRpbWVTdGFtcCB9OiB7IHBhZ2U6IEludGVyYWN0LlBvaW50LCBjbGllbnQ6IEludGVyYWN0LlBvaW50LCB0aW1lU3RhbXA/OiBudW1iZXIgfSkge1xuICAgIGNvbnN0IGV2ZW50ID0ge1xuICAgICAgcGFnZSxcbiAgICAgIGNsaWVudCxcbiAgICAgIHRpbWVTdGFtcCxcbiAgICAgIGdldCBwYWdlWCAoKSB7IHJldHVybiBwYWdlLnggfSxcbiAgICAgIGdldCBwYWdlWSAoKSB7IHJldHVybiBwYWdlLnkgfSxcbiAgICAgIGdldCBjbGllbnRYICgpIHsgcmV0dXJuIGNsaWVudC54IH0sXG4gICAgICBnZXQgY2xpZW50WSAoKSB7IHJldHVybiBjbGllbnQueSB9LFxuICAgIH1cblxuICAgIHJldHVybiBldmVudCBhcyB0eXBlb2YgZXZlbnQgJiBJbnRlcmFjdC5Qb2ludGVyVHlwZSAmIEludGVyYWN0LlBvaW50ZXJFdmVudFR5cGVcbiAgfSxcbn1cblxuZXhwb3J0IGRlZmF1bHQgcG9pbnRlclV0aWxzXG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9pbnRlclV0aWxzL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mV0dXJuIHRoaXMuY29vcmRzLmNsaWVudCB9LFxuICAgICAgZ2V0IHRpbWVTdGFtcCAoKSB7IHJldHVybiB0aGlzLmNvb3Jkcy50aW1lU3RhbXAgfSxcbiAgICAgIGdldCBwYWdlWCAoKSB7IHJldHVybiB0aGlzLmNvb3Jkcy5wYWdlLnggfSxcbiAgICAgIGdldCBwYWdlWSAoKSB7IHJldHVybiB0aGlzLmNvb3Jkcy5wYWdlLnkgfSxcbiAgICAgIGdldCBjbGllbnRYICgpIHsgcmV0dXJuIHRoaXMuY29vcmRzLmNsaWVudC54IH0sXG4gICAgICBnZXQgY2xpZW50WSAoKSB7IHJldHVybiB0aGlzLmNvb3Jkcy5jbGllbnQueSB9LFxuICAgICAgZ2V0IHBvaW50ZXJJZCAoKSB7IHJldHVybiB0aGlzLmNvb3Jkcy5wb2ludGVySWQgfSxcbiAgICAgIGdldCB0YXJnZXQgKCkgeyByZXR1cm4gdGhpcy5jb29yZHMudGFyZ2V0IH0sXG4gICAgfVxuXG4gICAgcmV0dXJuIGV2ZW50IGFzIHR5cGVvZiBldmVudCAmIEludGVyYWN0LlBvaW50ZXJUeXBlICYgSW50ZXJhY3QuUG9pbnRlckV2ZW50VHlwZVxuICB9LFxufVxuXG5leHBvcnQgZGVmYXVsdCBwb2ludGVyVXRpbHNcbiJdfQ==

@@ -16,3 +16,3 @@ let lastTime = 0;

request = (callback) => {
const currTime = new Date().getTime();
const currTime = Date.now();
const timeToCall = Math.max(0, 16 - (currTime - lastTime));

@@ -32,2 +32,2 @@ // eslint-disable-next-line standard/no-callback-literal

};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFmLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsicmFmLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLElBQUksUUFBUSxHQUFHLENBQUMsQ0FBQTtBQUNoQixJQUFJLE9BQU8sQ0FBQTtBQUNYLElBQ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aW1lb3V0KCgpID0+IHsgY2FsbGJhY2soY3VyclRpbWUgKyB0aW1lVG9DYWxsKSB9LFxuICAgICAgICB0aW1lVG9DYWxsKVxuXG4gICAgICBsYXN0VGltZSA9IGN1cnJUaW1lICsgdGltZVRvQ2FsbFxuICAgICAgcmV0dXJuIHRva2VuXG4gICAgfVxuXG4gICAgY2FuY2VsID0gKHRva2VuKSA9PiBjbGVhclRpbWVvdXQodG9rZW4pXG4gIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQge1xuICByZXF1ZXN0OiAoY2FsbGJhY2spID0+IHJlcXVlc3QoY2FsbGJhY2spLFxuICBjYW5jZWw6ICh0b2tlbikgPT4gY2FuY2VsKHRva2VuKSxcbiAgaW5pdCxcbn1cbiJdfQ==
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc