@interactjs/core
Advanced tools
Comparing version 1.9.16 to 1.9.17
@@ -22,3 +22,3 @@ /** @module interact */ | ||
this.dynamicDrop = void 0; | ||
this.version = "1.9.16"; | ||
this.version = "1.9.17"; | ||
this.interact = void 0; | ||
@@ -25,0 +25,0 @@ this.scope = void 0; |
@@ -1,2 +0,2 @@ | ||
import t from"../utils/browser.min.js";import*as e from"../utils/domUtils.min.js";import s from"../utils/extend.min.js";import o from"../utils/is.min.js";import*as i from"../utils/pointerUtils.min.js";import r from"./isNonNativeEvent";export class InteractStatic{constructor(t){this.getPointerAverage=i.pointerAverage,this.getTouchBBox=i.touchBBox,this.getTouchDistance=i.touchDistance,this.getTouchAngle=i.touchAngle,this.getElementRect=e.getElementRect,this.getElementClientRect=e.getElementClientRect,this.matchesSelector=e.matchesSelector,this.closest=e.closest,this.globalEvents={},this.dynamicDrop=void 0,this.version="1.9.16",this.interact=void 0,this.scope=void 0,this.scope=t;const{prototype:o}=this.constructor,r=(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))r[t]=o[t];return s(r,this),r.constructor=this.constructor,this.interact=r,r}use(t,e){return this.scope.usePlugin(t,e),this}isSet(t,e){return!!this.scope.interactables.get(t,e&&e.context)}on(t,e,s){if(o.string(t)&&-1!==t.search(" ")&&(t=t.trim().split(/ +/)),o.array(t)){for(const o of t)this.on(o,e,s);return this}if(o.object(t)){for(const s in t)this.on(s,t[s],e);return this}return r(t,this.scope.actions)?this.globalEvents[t]?this.globalEvents[t].push(e):this.globalEvents[t]=[e]:this.scope.events.add(this.scope.document,t,e,{options:s}),this}off(t,e,s){if(o.string(t)&&-1!==t.search(" ")&&(t=t.trim().split(/ +/)),o.array(t)){for(const o of t)this.off(o,e,s);return this}if(o.object(t)){for(const s in t)this.off(s,t[s],e);return this}if(r(t,this.scope.actions)){let s;t in this.globalEvents&&-1!==(s=this.globalEvents[t].indexOf(e))&&this.globalEvents[t].splice(s,1)}else this.scope.events.remove(this.scope.document,t,e,s);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 o.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/domUtils.min.js";import s from"../utils/extend.min.js";import o from"../utils/is.min.js";import*as i from"../utils/pointerUtils.min.js";import r from"./isNonNativeEvent";export class InteractStatic{constructor(t){this.getPointerAverage=i.pointerAverage,this.getTouchBBox=i.touchBBox,this.getTouchDistance=i.touchDistance,this.getTouchAngle=i.touchAngle,this.getElementRect=e.getElementRect,this.getElementClientRect=e.getElementClientRect,this.matchesSelector=e.matchesSelector,this.closest=e.closest,this.globalEvents={},this.dynamicDrop=void 0,this.version="1.9.17",this.interact=void 0,this.scope=void 0,this.scope=t;const{prototype:o}=this.constructor,r=(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))r[t]=o[t];return s(r,this),r.constructor=this.constructor,this.interact=r,r}use(t,e){return this.scope.usePlugin(t,e),this}isSet(t,e){return!!this.scope.interactables.get(t,e&&e.context)}on(t,e,s){if(o.string(t)&&-1!==t.search(" ")&&(t=t.trim().split(/ +/)),o.array(t)){for(const o of t)this.on(o,e,s);return this}if(o.object(t)){for(const s in t)this.on(s,t[s],e);return this}return r(t,this.scope.actions)?this.globalEvents[t]?this.globalEvents[t].push(e):this.globalEvents[t]=[e]:this.scope.events.add(this.scope.document,t,e,{options:s}),this}off(t,e,s){if(o.string(t)&&-1!==t.search(" ")&&(t=t.trim().split(/ +/)),o.array(t)){for(const o of t)this.off(o,e,s);return this}if(o.object(t)){for(const s in t)this.off(s,t[s],e);return this}if(r(t,this.scope.actions)){let s;t in this.globalEvents&&-1!==(s=this.globalEvents[t].indexOf(e))&&this.globalEvents[t].splice(s,1)}else this.scope.events.remove(this.scope.document,t,e,s);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 o.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.16", | ||
"version": "1.9.17", | ||
"license": "MIT", | ||
"peerDependencies": { | ||
"@interactjs/utils": "1.9.16" | ||
"@interactjs/utils": "1.9.17" | ||
}, | ||
@@ -11,3 +11,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "3fbdc5f5" | ||
"gitHead": "1f894f19" | ||
} |
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