@interactjs/core
Advanced tools
Comparing version 1.9.8 to 1.9.9
@@ -20,3 +20,3 @@ /** @module interact */ | ||
this.dynamicDrop = void 0; | ||
this.version = "1.9.8"; | ||
this.version = "1.9.9"; | ||
this.interact = void 0; | ||
@@ -23,0 +23,0 @@ const { |
@@ -1,2 +0,2 @@ | ||
import t from"../utils/browser.min.js";import*as e from"../utils/index.min.js";import{isNonNativeEvent as s}from"./scope.min.js";export class InteractStatic{constructor(t){this.scope=t,this.getPointerAverage=e.pointer.pointerAverage,this.getTouchBBox=e.pointer.touchBBox,this.getTouchDistance=e.pointer.touchDistance,this.getTouchAngle=e.pointer.touchAngle,this.getElementRect=e.dom.getElementRect,this.getElementClientRect=e.dom.getElementClientRect,this.matchesSelector=e.dom.matchesSelector,this.closest=e.dom.closest,this.globalEvents={},this.dynamicDrop=void 0,this.version="1.9.8",this.interact=void 0;const{prototype:s}=this.constructor,o=(e,s)=>{let o=t.interactables.get(e,s);return o||(o=t.interactables.new(e,s),o.events.global=this.globalEvents),o};for(const t of Object.getOwnPropertyNames(this.constructor.prototype))o[t]=s[t];return e.extend(o,this),o.constructor=this.constructor,this.interact=o,o}use(t,e){return this.scope.usePlugin(t,e),this}isSet(t,e){return!!this.scope.interactables.get(t,e&&e.context)}on(t,o,i){if(e.is.string(t)&&-1!==t.search(" ")&&(t=t.trim().split(/ +/)),e.is.array(t)){for(const e of t)this.on(e,o,i);return this}if(e.is.object(t)){for(const e in t)this.on(e,t[e],o);return this}return s(t,this.scope.actions)?this.globalEvents[t]?this.globalEvents[t].push(o):this.globalEvents[t]=[o]:this.scope.events.add(this.scope.document,t,o,{options:i}),this}off(t,o,i){if(e.is.string(t)&&-1!==t.search(" ")&&(t=t.trim().split(/ +/)),e.is.array(t)){for(const e of t)this.off(e,o,i);return this}if(e.is.object(t)){for(const e in t)this.off(e,t[e],o);return this}if(s(t,this.scope.actions)){let e;t in this.globalEvents&&-1!==(e=this.globalEvents[t].indexOf(o))&&this.globalEvents[t].splice(e,1)}else this.scope.events.remove(this.scope.document,t,o,i);return this}debug(){return this.scope}supportsTouch(){return t.supportsTouch}supportsPointerEvent(){return t.supportsPointerEvent}stop(){for(const t of this.scope.interactions.list)t.stop();return this}pointerMoveTolerance(t){return e.is.number(t)?(this.scope.interactions.pointerMoveTolerance=t,this):this.scope.interactions.pointerMoveTolerance}addDocument(t,e){this.scope.addDocument(t,e)}removeDocument(t){this.scope.removeDocument(t)}}export default InteractStatic; | ||
import t from"../utils/browser.min.js";import*as e from"../utils/index.min.js";import{isNonNativeEvent as s}from"./scope.min.js";export class InteractStatic{constructor(t){this.scope=t,this.getPointerAverage=e.pointer.pointerAverage,this.getTouchBBox=e.pointer.touchBBox,this.getTouchDistance=e.pointer.touchDistance,this.getTouchAngle=e.pointer.touchAngle,this.getElementRect=e.dom.getElementRect,this.getElementClientRect=e.dom.getElementClientRect,this.matchesSelector=e.dom.matchesSelector,this.closest=e.dom.closest,this.globalEvents={},this.dynamicDrop=void 0,this.version="1.9.9",this.interact=void 0;const{prototype:s}=this.constructor,o=(e,s)=>{let o=t.interactables.get(e,s);return o||(o=t.interactables.new(e,s),o.events.global=this.globalEvents),o};for(const t of Object.getOwnPropertyNames(this.constructor.prototype))o[t]=s[t];return e.extend(o,this),o.constructor=this.constructor,this.interact=o,o}use(t,e){return this.scope.usePlugin(t,e),this}isSet(t,e){return!!this.scope.interactables.get(t,e&&e.context)}on(t,o,i){if(e.is.string(t)&&-1!==t.search(" ")&&(t=t.trim().split(/ +/)),e.is.array(t)){for(const e of t)this.on(e,o,i);return this}if(e.is.object(t)){for(const e in t)this.on(e,t[e],o);return this}return s(t,this.scope.actions)?this.globalEvents[t]?this.globalEvents[t].push(o):this.globalEvents[t]=[o]:this.scope.events.add(this.scope.document,t,o,{options:i}),this}off(t,o,i){if(e.is.string(t)&&-1!==t.search(" ")&&(t=t.trim().split(/ +/)),e.is.array(t)){for(const e of t)this.off(e,o,i);return this}if(e.is.object(t)){for(const e in t)this.off(e,t[e],o);return this}if(s(t,this.scope.actions)){let e;t in this.globalEvents&&-1!==(e=this.globalEvents[t].indexOf(o))&&this.globalEvents[t].splice(e,1)}else this.scope.events.remove(this.scope.document,t,o,i);return this}debug(){return this.scope}supportsTouch(){return t.supportsTouch}supportsPointerEvent(){return t.supportsPointerEvent}stop(){for(const t of this.scope.interactions.list)t.stop();return this}pointerMoveTolerance(t){return e.is.number(t)?(this.scope.interactions.pointerMoveTolerance=t,this):this.scope.interactions.pointerMoveTolerance}addDocument(t,e){this.scope.addDocument(t,e)}removeDocument(t){this.scope.removeDocument(t)}}export default InteractStatic; | ||
//# sourceMappingURL=InteractStatic.min.js.map |
{ | ||
"name": "@interactjs/core", | ||
"version": "1.9.8", | ||
"version": "1.9.9", | ||
"license": "MIT", | ||
"peerDependencies": { | ||
"@interactjs/dev-tools": "1.9.8", | ||
"@interactjs/utils": "1.9.8" | ||
"@interactjs/dev-tools": "1.9.9", | ||
"@interactjs/utils": "1.9.9" | ||
}, | ||
"devDependencies": { | ||
"@interactjs/_dev": "1.9.8", | ||
"@interactjs/actions": "1.9.8", | ||
"@interactjs/auto-start": "1.9.8" | ||
"@interactjs/_dev": "1.9.9", | ||
"@interactjs/actions": "1.9.9", | ||
"@interactjs/auto-start": "1.9.9" | ||
}, | ||
@@ -17,3 +17,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "701b6e73" | ||
"gitHead": "fa9935ec" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package