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

@interactjs/core

Package Overview
Dependencies
Maintainers
2
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@interactjs/core - npm Package Compare versions

Comparing version 1.4.0-alpha.28 to 1.4.0-alpha.29

Eventable.spec.d.ts

8

interactablePreventDefault.js

@@ -48,4 +48,4 @@ import { matchesSelector, nodeContains } from '@interactjs/utils/domUtils';

function onInteractionEvent({ interaction, event }) {
if (interaction.target) {
interaction.target.checkAndPreventDefault(event);
if (interaction.interactable) {
interaction.interactable.checkAndPreventDefault(event);
}

@@ -81,3 +81,3 @@ }

nodeContains(interaction.element, event.target))) {
interaction.target.checkAndPreventDefault(event);
interaction.interactable.checkAndPreventDefault(event);
return;

@@ -89,2 +89,2 @@ }

export default { install };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJhY3RhYmxlUHJldmVudERlZmF1bHQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbnRlcmFjdGFibGVQcmV2ZW50RGVmYXVsdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsZUFBZSxFQUFFLFlBQVksRUFBRSxNQUFNLDRCQUE0QixDQUFBO0FBQzFFLE9BQU8sTUFBTSxNQUFNLDBCQUEwQixDQUFBO0FBQzdDLE9BQU8sS0FBSyxFQUFFLE1BQU0sc0JBQXNCLENBQUE7QUFDMUMsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLDBCQUEwQixDQUFBO0FBRXBELFNBQVMsY0FBYyxDQUFFLFlBQVksRUFBRSxRQUFRO0lBQzdDLElBQUksdUJBQXVCLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxFQUFFO1FBQzFDLFlBQVksQ0FBQyxPQUFPLENBQUMsY0FBYyxHQUFHLFFBQVEsQ0F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0dXJuIGNoZWNrQW5kUHJldmVudERlZmF1bHQodGhpcywgc2NvcGUsIGV2ZW50KVxuICB9XG5cbiAgZm9yIChjb25zdCBldmVudFNpZ25hbCBvZiBbJ2Rvd24nLCAnbW92ZScsICd1cCcsICdjYW5jZWwnXSkge1xuICAgIHNjb3BlLmludGVyYWN0aW9ucy5zaWduYWxzLm9uKGV2ZW50U2lnbmFsLCBvbkludGVyYWN0aW9uRXZlbnQpXG4gIH1cblxuICAvLyBwcmV2ZW50IG5hdGl2ZSBIVE1MNSBkcmFnIG9uIGludGVyYWN0LmpzIHRhcmdldCBlbGVtZW50c1xuICBzY29wZS5pbnRlcmFjdGlvbnMuZXZlbnRNYXAuZHJhZ3N0YXJ0ID0gZnVuY3Rpb24gcHJldmVudE5hdGl2ZURyYWcgKGV2ZW50KSB7XG4gICAgZm9yIChjb25zdCBpbnRlcmFjdGlvbiBvZiBzY29wZS5pbnRlcmFjdGlvbnMubGlzdCkge1xuICAgICAgaWYgKGludGVyYWN0aW9uLmVsZW1lbnQgJiZcbiAgICAgICAgKGludGVyYWN0aW9uLmVsZW1lbnQgPT09IGV2ZW50LnRhcmdldCB8fFxuICAgICAgICAgIG5vZGVDb250YWlucyhpbnRlcmFjdGlvbi5lbGVtZW50LCBldmVudC50YXJnZXQpKSkge1xuICAgICAgICBpbnRlcmFjdGlvbi50YXJnZXQuY2hlY2tBbmRQcmV2ZW50RGVmYXVsdChldmVudClcbiAgICAgICAgcmV0dXJuXG4gICAgICB9XG4gICAgfVxuICB9XG59XG5cbmV4cG9ydCB0eXBlIEluc3RhbGwgPSB0eXBlb2YgaW5zdGFsbFxuXG5leHBvcnQgZGVmYXVsdCB7IGluc3RhbGwgfVxuIl19
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJhY3RhYmxlUHJldmVudERlZmF1bHQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbnRlcmFjdGFibGVQcmV2ZW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ZW50LnRhcmdldCB8fFxuICAgICAgICAgIG5vZGVDb250YWlucyhpbnRlcmFjdGlvbi5lbGVtZW50LCBldmVudC50YXJnZXQpKSkge1xuICAgICAgICBpbnRlcmFjdGlvbi5pbnRlcmFjdGFibGUuY2hlY2tBbmRQcmV2ZW50RGVmYXVsdChldmVudClcbiAgICAgICAgcmV0dXJuXG4gICAgICB9XG4gICAgfVxuICB9XG59XG5cbmV4cG9ydCB0eXBlIEluc3RhbGwgPSB0eXBlb2YgaW5zdGFsbFxuXG5leHBvcnQgZGVmYXVsdCB7IGluc3RhbGwgfVxuIl19

@@ -18,3 +18,3 @@ import extend from '@interactjs/utils/extend';

element = element || interaction.element;
const target = interaction.target;
const target = interaction.interactable;
// FIXME: add deltaSource to defaults

@@ -135,2 +135,2 @@ const deltaSource = ((target && target.options) || defaults).deltaSource;

export default InteractEvent;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW50ZXJhY3RFdmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIkludGVyYWN0RXZlbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxNQUFNLE1BQU0sMEJBQTBCLENBQUE7QUFDN0MsT0FBTyxXQUFXLE1BQU0sK0JBQStCLENBQUE7QUFDdkQsT0FBTyxLQUFLLE1BQU0seUJBQXlCLENBQUE7QUFDM0MsT0FBTyxRQUFRLE1BQU0sa0JBQWtCLENBQUE7QUFLdkMsTUFBTSxDQUFOLElBQVksVUFLWDtBQUxELFdBQVksVUFBVTtJQUNwQiw2QkFBZSxDQUFBO0lBQ2YsMkJBQWEsQ0FBQTtJQUNiLHlCQUFXLENBQUE7SUFDWCx3QkFBVSxDQUFBO0FBQ1osQ0FBQyxFQUxXLFVBQVUsS0FBVixVQUFVLFFBS3JCO0FBRUQsTUFBTSxPQUFPLGFBQWE7SUEwQ3hCLE1BQU07SUFDTixZQUNFLFdBQXdCLE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ID0gIXVwICAgJiYgICA0NSAtIG92ZXJsYXAgPD0gYW5nbGUgJiYgYW5nbGUgPCAxMzUgKyBvdmVybGFwXG5cbiAgICByZXR1cm4ge1xuICAgICAgdXAsXG4gICAgICBkb3duLFxuICAgICAgbGVmdCxcbiAgICAgIHJpZ2h0LFxuICAgICAgYW5nbGUsXG4gICAgICBzcGVlZDogaW50ZXJhY3Rpb24ucHJldkV2ZW50LnNwZWVkLFxuICAgICAgdmVsb2NpdHk6IHtcbiAgICAgICAgeDogaW50ZXJhY3Rpb24ucHJldkV2ZW50LnZlbG9jaXR5WCxcbiAgICAgICAgeTogaW50ZXJhY3Rpb24ucHJldkV2ZW50LnZlbG9jaXR5WSxcbiAgICAgIH0sXG4gICAgfVxuICB9XG5cbiAgcHJldmVudERlZmF1bHQgKCkge31cblxuICAvKipcbiAgICogRG9uJ3QgY2FsbCBsaXN0ZW5lcnMgb24gdGhlIHJlbWFpbmluZyB0YXJnZXRzXG4gICAqL1xuICBzdG9wSW1tZWRpYXRlUHJvcGFnYXRpb24gKCkge1xuICAgIHRoaXMuaW1tZWRpYXRlUHJvcGFnYXRpb25TdG9wcGVkID0gdGhpcy5wcm9wYWdhdGlvblN0b3BwZWQgPSB0cnVlXG4gIH1cblxuICAvKipcbiAgICogRG9uJ3QgY2FsbCBhbnkgb3RoZXIgbGlzdGVuZXJzIChldmVuIG9uIHRoZSBjdXJyZW50IHRhcmdldClcbiAgICovXG4gIHN0b3BQcm9wYWdhdGlvbiAoKSB7XG4gICAgdGhpcy5wcm9wYWdhdGlvblN0b3BwZWQgPSB0cnVlXG4gIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgSW50ZXJhY3RFdmVudFxuIl19

@@ -13,4 +13,7 @@ import * as utils from '@interactjs/utils';

}
export interface StartAction extends ActionProps {
name: ActionName | string;
}
export declare class Interaction<T extends ActionName = any> {
target: Interactable;
interactable: Interactable;
element: Element;

@@ -101,3 +104,3 @@ _signals: utils.Signals;

});
pointerDown(pointer: any, event: any, eventTarget: any): void;
pointerDown(pointer: Interact.PointerType, event: Interact.PointerEventType, eventTarget: EventTarget): void;
/**

@@ -134,4 +137,4 @@ * ```js

*/
start(action: any, target: any, element: any): void;
pointerMove(pointer: any, event: any, eventTarget: any): void;
start(action: StartAction, target: Interactable, element: Element): void;
pointerMove(pointer: Interact.PointerType, event: Interact.PointerEventType, eventTarget: EventTarget): void;
/**

@@ -156,3 +159,3 @@ * ```js

move(signalArg?: any): void;
pointerUp(pointer: any, event: any, eventTarget: any, curEventTarget: any): void;
pointerUp(pointer: Interact.PointerType, event: Interact.PointerEventType, eventTarget: EventTarget, curEventTarget: EventTarget): void;
documentBlur(event: any): void;

@@ -182,3 +185,3 @@ /**

getPointerInfo(pointer: any): PointerInfo;
updatePointer(pointer: Interact.PointerType, event: Interact.PointerEventType, eventTarget: Window | Document | Element, down?: boolean): number;
updatePointer(pointer: Interact.PointerType, event: Interact.PointerEventType, eventTarget: EventTarget, down?: boolean): number;
removePointer(pointer: any, event: any): void;

@@ -185,0 +188,0 @@ _updateLatestPointer(pointer: any, event: any, eventTarget: any): void;

import * as utils from '@interactjs/utils';
import InteractEvent, { EventPhase } from './InteractEvent';
import PointerInfo from './PointerInfo';
import { ActionName } from './scope';
export class Interaction {

@@ -8,3 +9,3 @@ /** */

// current interactable being interacted with
this.target = null;
this.interactable = null;
// the target element of the interactable

@@ -104,7 +105,7 @@ this.element = null;

!this.pointerIsDown ||
this.pointers.length < (action.name === 'gesture' ? 2 : 1)) {
this.pointers.length < (action.name === ActionName.Gesture ? 2 : 1)) {
return;
}
utils.copyAction(this.prepared, action);
this.target = target;
this.interactable = target;
this.element = element;

@@ -254,3 +255,3 @@ this._interacting = this._doPhase({

this._signals.fire('stop', { interaction: this });
this.target = this.element = null;
this.interactable = this.element = null;
this._interacting = false;

@@ -334,3 +335,3 @@ this.prepared.name = this.prevEvent = null;

_fireEvent(iEvent) {
this.target.fire(iEvent);
this.interactable.fire(iEvent);
if (!this.prevEvent || iEvent.timeStamp >= this.prevEvent.timeStamp) {

@@ -357,2 +358,2 @@ this.prevEvent = iEvent;

export { PointerInfo };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW50ZXJhY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJJbnRlcmFjdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLG1CQUFtQixDQUFBO0FBRTFDLE9BQU8sYUFBYSxFQUFFLEVBQUUsVUFBVSxFQUFFLE1BQU0saUJBQWlCLENBQUE7QUFDM0QsT0FBTyxXQUFXLE1BQU0sZUFBZSxDQUFBO0FBV3ZDLE1BQU0sT0FBTyxXQUFXO0lBd0V0QixNQUFNO0lBQ04sWUFBYSxFQUFFLFdBQVcsRUFBRSxPQUFPLEVBQW9EO1FBeEV2Riw2Q0FBNkM7UUFDN0MsV0FBTSxHQUFpQixJQUFJLENBQUE7UUFFM0IseUNBQXlDO1FBQ3pDLFlBQU8sR0FBWSxJQUFJLENBQUE7UUFJdkIscURBQXFEO1FBQ3JELGFBQVEsR0FBbUI7WUFDekIsSUFBSSxFQUFHLElBQUk7WUFDWCxJQUFJLEVBQUcsSUFBSTtZQUNYLEtBQUssRUFBRSxJQUFJO1NBQ1osQ0FBQTtRQUlELCtCQUErQjtRQUMvQixhQUFRLEdBQWtCLEVBQUUsQ0FBQTtRQUU1Qix5Q0FBeUM7UUFDekMsY0FBUyxHQUE4QixJQUFJLENBQUE7UUFFM0MsZ0JBQVcsR0FBeUIsRUFBMEIsQ0FBQTtRQUU5RCxtQkFBYyxHQUlWO1lBQ0YsT0FBTyxFQUFFLElBQUk7WUFDYixLQUFLLEVBQUUsSUFBSTtZQUNYLFdBQVcsRUFBRSxJQUFJO1NBQ2xCLENBQUE7UUFFRCx3QkFBd0I7UUFDeEIsY0FBUyxHQUFxQixJQUFJLENBQUE7UUFFbEMsa0JBQ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yB8fCB0aGlzLnBvaW50ZXJUeXBlID09PSAncGVuJylcbiAgICAgID8gdGhpcy5wb2ludGVycy5sZW5ndGggLSAxXG4gICAgICA6IHV0aWxzLmFyci5maW5kSW5kZXgodGhpcy5wb2ludGVycywgKGN1clBvaW50ZXIpID0+IGN1clBvaW50ZXIuaWQgPT09IHBvaW50ZXJJZClcbiAgfVxuXG4gIGdldFBvaW50ZXJJbmZvIChwb2ludGVyKSB7XG4gICAgcmV0dXJuIHRoaXMucG9pbnRlcnNbdGhpcy5nZXRQb2ludGVySW5kZXgocG9pbnRlcildXG4gIH1cblxuICB1cGRhdGVQb2ludGVyIChwb2ludGVyOiBJbnRlcmFjdC5Qb2ludGVyVHlwZSwgZXZlbnQ6IEludGVyYWN0LlBvaW50ZXJFdmVudFR5cGUsIGV2ZW50VGFyZ2V0OiBXaW5kb3cgfCBEb2N1bWVudCB8IEVsZW1lbnQsIGRvd24/OiBib29sZWFuKSB7XG4gICAgY29uc3QgaWQgPSB1dGlscy5wb2ludGVyLmdldFBvaW50ZXJJZChwb2ludGVyKVxuICAgIGxldCBwb2ludGVySW5kZXggPSB0aGlzLmdldFBvaW50ZXJJbmRleChwb2ludGVyKVxuICAgIGxldCBwb2ludGVySW5mbyA9IHRoaXMucG9pbnRlcnNbcG9pbnRlckluZGV4XVxuXG4gICAgZG93biA9IGRvd24gPT09IGZhbHNlXG4gICAgICA/IGZhbHNlXG4gICAgICA6IGRvd24gfHwgLyhkb3dufHN0YXJ0KSQvaS50ZXN0KGV2ZW50LnR5cGUpXG5cbiAgICBpZiAoIXBvaW50ZXJJbmZvKSB7XG4gICAgICBwb2ludGVySW5mbyA9IG5ldyBQb2ludGVySW5mbyhcbiAgICAgICAgaWQsXG4gICAgICAgIHBvaW50ZXIsXG4gICAgICAgIGV2ZW50LFxuICAgICAgICBudWxsLFxuICAgICAgICBudWxsLFxuICAgICAgKVxuXG4gICAgICBwb2ludGVySW5kZXggPSB0aGlzLnBvaW50ZXJzLmxlbmd0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mVudDogSW50ZXJhY3QuUG9pbnRlckV2ZW50VHlwZSwgZXZlbnRUYXJnZXQ6IEV2ZW50VGFyZ2V0LCBkb3duPzogYm9vbGVhbikge1xuICAgIGNvbnN0IGlkID0gdXRpbHMucG9pbnRlci5nZXRQb2ludGVySWQocG9pbnRlcilcbiAgICBsZXQgcG9pbnRlckluZGV4ID0gdGhpcy5nZXRQb2ludGVySW5kZXgocG9pbnRlcilcbiAgICBsZXQgcG9pbnRlckluZm8gPSB0aGlzLnBvaW50ZXJzW3BvaW50ZXJJbmRleF1cblxuICAgIGRvd24gPSBkb3duID09PSBmYWxzZVxuICAgICAgPyBmYWxzZVxuICAgICAgOiBkb3duIHx8IC8oZG93bnxzdGFydCkkL2kudGVzdChldmVudC50eXBlKVxuXG4gICAgaWYgKCFwb2ludGVySW5mbykge1xuICAgICAgcG9pbnRlckluZm8gPSBuZXcgUG9pbnRlckluZm8oXG4gICAgICAgIGlkLFxuICAgICAgICBwb2ludGVyLFxuICAgICAgICBldmVudCxcbiAgICAgICAgbnVsbCxcbiAgICAgICAgbnVsbCxcbiAgICAgIClcblxuICAgICAgcG9pbnRlckluZGV4ID0gdGhpcy5wb2ludGVycy5sZW5ndGhcbiAgICAgIHRoaXMucG9pbnRlcnMucHVzaChwb2ludGVySW5mbylcbiAgICB9XG4gICAgZWxzZSB7XG4gICAgICBwb2ludGVySW5mby5wb2ludGVyID0gcG9pbnRlclxuICAgIH1cblxuICAgIGlmIChkb3duKSB7XG4gICAgICB0aGlzLnBvaW50ZXJJc0Rvd24gPSB0cnVlXG5cbiAgICAgIGlmICghdGhpcy5pbnRlcmFjdGluZygpKSB7XG4gICAgICAgIHV0aWxzLnBvaW50ZXIuc2V0Q29vcmRzKHRoaXMuY29vcmRzLnN0YXJ0LCB0aGlzLnBvaW50ZXJzLm1hcCgocCkgPT4gcC5wb2ludGVyKSlcblxuICAgICAgICB1dGlscy5wb2ludGVyLmNvcHlDb29yZHModGhpcy5jb29yZHMuY3VyLCB0a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biAgX2RvUGhhc2UgKHNpZ25hbEFyZzogUGFydGlhbDxJbnRlcmFjdC5TaWduYWxBcmc+KSB7XG4gICAgY29uc3QgeyBldmVudCwgcGhhc2UsIHByZUVuZCwgdHlwZSB9ID0gc2lnbmFsQXJnXG5cbiAgICBpZiAoIXNpZ25hbEFyZy5ub0JlZm9yZSkge1xuICAgICAgY29uc3QgYmVmb3JlUmVzdWx0ID0gdGhpcy5fc2lnbmFscy5maXJlKGBiZWZvcmUtYWN0aW9uLSR7cGhhc2V9YCwgc2lnbmFsQXJnKVxuXG4gICAgICBpZiAoYmVmb3JlUmVzdWx0ID09PSBmYWxzZSkge1xuICAgICAgICByZXR1cm4gZmFsc2VcbiAgICAgIH1cbiAgICB9XG5cbiAgICBjb25zdCBpRXZlbnQgPSBzaWduYWxBcmcuaUV2ZW50ID0gdGhpcy5fY3JlYXRlUHJlcGFyZWRFdmVudChldmVudCwgcGhhc2UsIHByZUVuZCwgdHlwZSlcblxuICAgIHRoaXMuX3NpZ25hbHMuZmlyZShgYWN0aW9uLSR7cGhhc2V9YCwgc2lnbmFsQXJnKVxuXG4gICAgdGhpcy5fZmlyZUV2ZW50KGlFdmVudClcblxuICAgIHRoaXMuX3NpZ25hbHMuZmlyZShgYWZ0ZXItYWN0aW9uLSR7cGhhc2V9YCwgc2lnbmFsQXJnKVxuXG4gICAgcmV0dXJuIHRydWVcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBJbnRlcmFjdGlvblxuZXhwb3J0IHsgUG9pbnRlckluZm8gfVxuIl19

@@ -169,2 +169,2 @@ import browser from '@interactjs/utils/browser';

};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJhY3Rpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiaW50ZXJhY3Rpb25zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sT0FBTyxNQUFNLDJCQUEy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RhaWxzID0ge1xuICAgICAgICAgIHBvaW50ZXIsXG4gICAgICAgICAgcG9pbnRlcklkLFxuICAgICAgICAgIHBvaW50ZXJUeXBlLFxuICAgICAgICAgIGV2ZW50VHlwZTogZXZlbnQudHlwZSxcbiAgICAgICAgICBldmVudFRhcmdldCxcbiAgICAgICAgICBjdXJFdmVudFRhcmdldCxcbiAgICAgICAgICBzY29wZSxcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBpbnRlcmFjdGlvbiA9IGdldEludGVyYWN0aW9uKHNlYXJjaERldGFpbHMpXG5cbiAgICAgICAgbWF0Y2hlcy5wdXNoKFtcbiAgICAgICAgICBzZWFyY2hEZXRhaWxzLnBvaW50ZXIsXG4gICAgICAgICAgc2VhcmNoRGV0YWlscy5ldmVudFRhcmdldCxcbiAgICAgICAgICBzZWFyY2hEZXRhaWxzLmN1ckV2ZW50VGFyZ2V0LFxuICAgICAgICAgIGludGVyYWN0aW9uLFxuICAgICAgICBdKVxuICAgICAgfVxuICAgIH1cbiAgICBlbHNlIHtcbiAgICAgIGxldCBpbnZhbGlkUG9pbnRlciA9IGZhbHNlXG5cbiAgICAgIGlmICghYnJvd3Nlci5zdXBwb3J0c1BvaW50ZXJFdmVudCAmJiAvbW91c2UvLnRlc3QoZXZlbnQudHlwZSkpIHtcbiAgICAgICAgLy8gaWdub3JlIG1vdXNlIGV2ZW50cyB3aGlsZSB0b3VjaCBpbnRlcmFjdGlvbnMgYXJlIGFjdGl2ZVxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGludGVyYWN0aW9ucy5sZW5ndGggJiYgIWludmFsaWRQb2ludGVyOyBpKyspIHtcbiAgICAgICAgICBpbnZhbGlkUG9pbnRlciA9IGludGVyYWN0aW9uc1tpXS5wb2ludGVyVHlwZSAhPT0gJ21vdXNlJyAmJiBpbnRlcmFjdGlvbnNbaV0ucG9pbnRlcklzRG93blxuICAgICAgICB9XG5cbiAgICAgICAgLy8gdHJ5IHRvIGlnbm9yZSBtb3VzZSBldmVudHMgdGhhdCBhcmUgc2ltdWxhdGVkIGJ5IHRoZSBicm93c2VyXG4gICAgICAgIC8vIGFmdGVyIGEgdG91Y2ggZXZlbnRcbiAgICAgICAgaW52YWxpZFBvaW50ZXIgPSBpbnZhbGlkUG9pbnRlciB8fFxuICAgICAgICAgIChuZXcgRGF0ZSgpLmdldFRpbWUoKSAtIHNjb3BlLnByZXZUb3VjaFRpbWUgPCA1MDApIHx8XG4gICAgICAgICAgLy8gb24gaU9TIGFuZCBGaXJlZm94IE1vYmlsZSwgTW91c2VFdmVudC50aW1lU3RhbXAgaXMgemVybyBpZiBzaW11bGF0ZWRcbiAgICAgICAgICBldmVudC50aW1lU3RhbXAgPT09IDBcbiAgICAgIH1cblxuICAgICAgaWYgKCFpbnZhbGlkUG9pbnRlcikge1xuICAgICAgICBjb25zdCBzZWFyY2hEZXRhaWxzID0ge1xuICAgICAgICAgIHBvaW50ZXI6IGV2ZW50LFxuICAgICAgICAgIHBvaW50ZXJJZDogcG9pbnRlclV0aWxzLmdldFBvaW50ZXJJZChldmVudCksXG4gICAgICAgICAgcG9pbnRlclR5cGUsXG4gICAgICAgICAgZXZlbnRUeXBlOiBldmVudC50eXBlLFxuICAgICAgICAgIGN1ckV2ZW50VGFyZ2V0LFxuICAgICAgICAgIGV2ZW50VGFyZ2V0LFxuICAgICAgICAgIHNjb3BlLFxuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgaW50ZXJhY3Rpb24gPSBnZXRJbnRlcmFjdGlvbihzZWFyY2hEZXRhaWxzKVxuXG4gICAgICAgIG1hdGNoZXMucHVzaChbXG4gICAgICAgICAgc2VhcmNoRGV0YWlscy5wb2ludGVyLFxuICAgICAgICAgIHNlYXJjaERldGFpbHMuZXZlbnRUYXJnZXQsXG4gICAgICAgICAgc2VhcmNoRGV0YWlscy5jdXJFdmVudFRhcmdldCxcbiAgICAgICAgICBpbnRlcmFjdGlvbixcbiAgICAgICAgXSlcbiAgICAgIH1cbiAgICB9X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4cG9ydCBkZWZhdWx0IHtcbiAgaW5zdGFsbCxcbiAgb25Eb2NTaWduYWwsXG4gIGRvT25JbnRlcmFjdGlvbnMsXG4gIG5ld0ludGVyYWN0aW9uLFxuICBtZXRob2ROYW1lcyxcbn1cbiJdfQ==
{
"name": "@interactjs/core",
"version": "1.4.0-alpha.28+sha.e624c4d",
"version": "1.4.0-alpha.29+sha.7c21d3d",
"peerDependencies": {
"@interactjs/utils": "1.4.0-alpha.28+sha.e624c4d"
"@interactjs/utils": "1.4.0-alpha.29+sha.7c21d3d"
},
"devDependencies": {
"@interactjs/_dev": "1.4.0-alpha.28+sha.e624c4d",
"@interactjs/utils": "1.4.0-alpha.28+sha.e624c4d"
"@interactjs/_dev": "1.4.0-alpha.29+sha.7c21d3d",
"@interactjs/utils": "1.4.0-alpha.29+sha.7c21d3d"
},

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

@@ -73,2 +73,3 @@ import * as utils from '@interactjs/utils';

document: Document;
window: Window;
documents: Array<{

@@ -75,0 +76,0 @@ doc: Document;

@@ -157,4 +157,5 @@ import * as utils from '@interactjs/utils';

scope.document = window.document;
scope.window = window;
return scope;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NvcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzY29wZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssS0FBSyxNQUFNLG1CQUFtQixDQUFBO0FBQzFDLE9BQU8sVUFBVSxNQUFNLDhCQUE4QixDQUFBO0FBQ3JELE9BQU8sUUFBUSxNQUFNLGtCQUFrQixDQUFBO0FBQ3ZDLE9BQU8sU0FBUyxNQUFNLGFBQWEsQ0FBQTtBQUNuQyxPQUFPLGdCQUFnQixNQUFNLGdCQUFnQixDQUFBO0FBQzdDLE9BQU8sYUFBYSxNQUFNLGlCQUFpQixDQUFBO0FBQzNDLE9BQU8sWUFBWSxNQUFNLGd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LmRvbS5tYXRjaGVzU2VsZWN0b3IoZWxlbWVudCwgaW50ZXJhY3RhYmxlLnRhcmdldCkpXG4gICAgICAgIC8vIHRhcmdldCBpcyB0aGUgZWxlbWVudFxuICAgICAgICA6IGVsZW1lbnQgPT09IGludGVyYWN0YWJsZS50YXJnZXQpICYmXG4gICAgICAgIC8vIHRoZSBlbGVtZW50IGlzIGluIGNvbnRleHRcbiAgICAgICAgKGludGVyYWN0YWJsZS5pbkNvbnRleHQoZWxlbWVudCkpKSB7XG4gICAgICAgIHJldCA9IGNhbGxiYWNrKGludGVyYWN0YWJsZSlcbiAgICAgIH1cblxuICAgICAgaWYgKHJldCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIHJldHVybiByZXRcbiAgICAgIH1cbiAgICB9XG4gIH1cbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGluaXRTY29wZSAoc2NvcGU6IFNjb3BlLCB3aW5kb3c6IFdpbmRvdykge1xuICB3aW4uaW5pdCh3aW5kb3cpXG4gIGRvbU9iamVjdHMuaW5pdCh3aW5kb3cpXG4gIGJyb3dzZXIuaW5pdCh3aW5kb3cpXG4gIHJhZi5pbml0KHdpbmRvdylcbiAgZXZlbnRzLmluaXQod2luZG93KVxuXG4gIGludGVyYWN0aW9ucy5pbnN0YWxsKHNjb3BlKVxuICBzY29wZS5kb2N1bWVudCA9IHdpbmRvdy5kb2N1bWVudFxuICBzY29wZS53aW5kb3cgPSB3aW5kb3dcblxuICByZXR1cm4gc2NvcGVcbn1cbiJdfQ==
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