@interactjs/core
Advanced tools
Comparing version 1.10.0 to 1.10.1
@@ -55,3 +55,3 @@ /** @module interact */ | ||
interact.version = "1.10.0"; | ||
interact.version = "1.10.1"; | ||
interact.scope = scope; | ||
@@ -58,0 +58,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import t from"../utils/browser.prod.js";import*as e from"../utils/domUtils.prod.js";import o from"../utils/is.prod.js";import*as s from"../utils/pointerUtils.prod.js";import n from"./isNonNativeEvent.prod.js";export function createInteractStatic(i){const r=(t,e)=>{let o=i.interactables.get(t,e);return o||(o=i.interactables.new(t,e),o.events.global=r.globalEvents),o};return r.getPointerAverage=s.pointerAverage,r.getTouchBBox=s.touchBBox,r.getTouchDistance=s.touchDistance,r.getTouchAngle=s.touchAngle,r.getElementRect=e.getElementRect,r.getElementClientRect=e.getElementClientRect,r.matchesSelector=e.matchesSelector,r.closest=e.closest,r.globalEvents={},r.version="1.10.0",r.scope=i,r.use=function(t,e){return this.scope.usePlugin(t,e),this},r.isSet=function(t,e){return!!this.scope.interactables.get(t,e&&e.context)},r.on=function(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 o in t)this.on(o,t[o],e);return this}return n(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},r.off=function(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 o in t)this.off(o,t[o],e);return this}if(n(t,this.scope.actions)){let o;t in this.globalEvents&&-1!==(o=this.globalEvents[t].indexOf(e))&&this.globalEvents[t].splice(o,1)}else this.scope.events.remove(this.scope.document,t,e,s);return this},r.debug=function(){return this.scope},r.supportsTouch=()=>t.supportsTouch,r.supportsPointerEvent=()=>t.supportsPointerEvent,r.stop=function(){for(const t of this.scope.interactions.list)t.stop();return this},r.pointerMoveTolerance=function(t){return o.number(t)?(this.scope.interactions.pointerMoveTolerance=t,this):this.scope.interactions.pointerMoveTolerance},r.addDocument=function(t,e){this.scope.addDocument(t,e)},r.removeDocument=function(t){this.scope.removeDocument(t)},r} | ||
import t from"../utils/browser.prod.js";import*as e from"../utils/domUtils.prod.js";import o from"../utils/is.prod.js";import*as s from"../utils/pointerUtils.prod.js";import n from"./isNonNativeEvent.prod.js";export function createInteractStatic(i){const r=(t,e)=>{let o=i.interactables.get(t,e);return o||(o=i.interactables.new(t,e),o.events.global=r.globalEvents),o};return r.getPointerAverage=s.pointerAverage,r.getTouchBBox=s.touchBBox,r.getTouchDistance=s.touchDistance,r.getTouchAngle=s.touchAngle,r.getElementRect=e.getElementRect,r.getElementClientRect=e.getElementClientRect,r.matchesSelector=e.matchesSelector,r.closest=e.closest,r.globalEvents={},r.version="1.10.1",r.scope=i,r.use=function(t,e){return this.scope.usePlugin(t,e),this},r.isSet=function(t,e){return!!this.scope.interactables.get(t,e&&e.context)},r.on=function(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 o in t)this.on(o,t[o],e);return this}return n(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},r.off=function(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 o in t)this.off(o,t[o],e);return this}if(n(t,this.scope.actions)){let o;t in this.globalEvents&&-1!==(o=this.globalEvents[t].indexOf(e))&&this.globalEvents[t].splice(o,1)}else this.scope.events.remove(this.scope.document,t,e,s);return this},r.debug=function(){return this.scope},r.supportsTouch=()=>t.supportsTouch,r.supportsPointerEvent=()=>t.supportsPointerEvent,r.stop=function(){for(const t of this.scope.interactions.list)t.stop();return this},r.pointerMoveTolerance=function(t){return o.number(t)?(this.scope.interactions.pointerMoveTolerance=t,this):this.scope.interactions.pointerMoveTolerance},r.addDocument=function(t,e){this.scope.addDocument(t,e)},r.removeDocument=function(t){this.scope.removeDocument(t)},r} | ||
//# sourceMappingURL=interactStatic.prod.js.map |
{ | ||
"name": "@interactjs/core", | ||
"version": "1.10.0", | ||
"version": "1.10.1", | ||
"license": "MIT", | ||
"peerDependencies": { | ||
"@interactjs/utils": "1.10.0" | ||
"@interactjs/utils": "1.10.1" | ||
}, | ||
@@ -8,0 +8,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
411626