@atomic-class/action
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -1,2 +0,2 @@ | ||
var e=function(e){var t=e.status;if(t.states.indexOf("disable")>-1)return t;switch(e.event.type){case"mouseenter":t.setState("hover");break;case"mouseleave":t.unsetState("hover");break;case"mousedown":t.setState("active");break;case"mouseup":t.unsetState("active")}return t},t=function(e){var t=e.status;if(t.states.indexOf("disable")>-1)return t;if(e.event.keyCode!==e.keycode)return t;switch(e.event.type){case"keydown":t.setState("active");break;case"keyup":t.unsetState("active")}return t};export{t as keyboard,e as mouse}; | ||
"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var e,t=(function(e,t){!function(e){function t(e){return 0===e.length?[]:e.split(/\s+/)}function n(e,n){var r=t(e);return-1===r.indexOf(n)?(r.push(n),r.join(" ")):e}function r(e,n){var r=t(e),o=t(n);return(r=r.filter((function(e){return-1==o.indexOf(e)}))).join(" ")}function o(e,n){return t(e).indexOf(n)>-1}var a=Object.freeze({__proto__:null,split:t,add:n,remove:r,has:o});e.add=n,e.has=o,e.remove=r,e.split=t,e.state=a,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(e={exports:{}},e.exports),e.exports),n=function(e,n){if(t.has(n,"disabled"))return n;switch(e.type){case"mouseenter":n=t.remove(n,"default hover"),n=t.add(n,"hover");break;case"mouseleave":n=t.remove(n,"default hover"),n=t.add(n,"default");break;case"mousedown":n=t.add(n,"active");break;case"mouseup":n=t.remove(n,"active")}return n},r=function(e,n,r){if(t.has(n,"disabled"))return n;if(e.keyCode!==r)return n;switch(e.type){case"keydown":n=t.add(n,"active");break;case"keyup":n=t.remove(n,"active")}return n};export{r as keyboard,n as mouse}; | ||
//# sourceMappingURL=es.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).core={})}(this,(function(e){"use strict";e.keyboard=function(e){var t=e.status;if(t.states.indexOf("disable")>-1)return t;if(e.event.keyCode!==e.keycode)return t;switch(e.event.type){case"keydown":t.setState("active");break;case"keyup":t.unsetState("active")}return t},e.mouse=function(e){var t=e.status;if(t.states.indexOf("disable")>-1)return t;switch(e.event.type){case"mouseenter":t.setState("hover");break;case"mouseleave":t.unsetState("hover");break;case"mousedown":t.setState("active");break;case"mouseup":t.unsetState("active")}return t},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).core={})}(this,(function(e){"use strict";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var n=function(e){var n={exports:{}};return e(n,n.exports),n.exports}((function(e,n){!function(e){function n(e){return 0===e.length?[]:e.split(/\s+/)}function t(e,t){var o=n(e);return-1===o.indexOf(t)?(o.push(t),o.join(" ")):e}function o(e,t){var o=n(e),r=n(t);return(o=o.filter((function(e){return-1==r.indexOf(e)}))).join(" ")}function r(e,t){return n(e).indexOf(t)>-1}var i=Object.freeze({__proto__:null,split:n,add:t,remove:o,has:r});e.add=t,e.has=r,e.remove=o,e.split=n,e.state=i,Object.defineProperty(e,"__esModule",{value:!0})}(n)})),t="default hover";e.keyboard=function(e,t,o){if(n.has(t,"disabled"))return t;if(e.keyCode!==o)return t;switch(e.type){case"keydown":t=n.add(t,"active");break;case"keyup":t=n.remove(t,"active")}return t},e.mouse=function(e,o){if(n.has(o,"disabled"))return o;switch(e.type){case"mouseenter":o=n.remove(o,t),o=n.add(o,"hover");break;case"mouseleave":o=n.remove(o,t),o=n.add(o,"default");break;case"mousedown":o=n.add(o,"active");break;case"mouseup":o=n.remove(o,"active")}return o},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=umd.js.map |
{ | ||
"name": "@atomic-class/action", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "event handlers for atomic-class", | ||
@@ -9,4 +9,2 @@ "main": "dist/umd.js", | ||
"scripts": { | ||
"preinstall": "npx only-allow pnpm", | ||
"preinstall:all": "npx only-allow pnpm", | ||
"build": "npm run build:umd && npm run build:es", | ||
@@ -13,0 +11,0 @@ "build:umd": "rollup -c ../rollup.config.js --environment format:umd", |
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
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
10885
13
0
0