@resk/core
Version:
An innovative TypeScript framework that empowers developers to build applications with a fully decorator-based architecture for efficient resource management. By combining the power of decorators with a resource-oriented design, DecorRes enhances code cla
1 lines • 1.04 kB
JavaScript
;var n=require('./isDOMElement');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var n__default=/*#__PURE__*/_interopDefault(n);function c(){let t=0;return t=Math.max(t,...Array.from(document.querySelectorAll("body *:not([data-highest]):not(.yetHigher)"),e=>parseFloat(getComputedStyle(e).zIndex)).filter(e=>!isNaN(e))),t}function o(t,e){return !n__default.default(t)||!e?false:new RegExp(" "+e+" ").test(" "+t.className+" ")}function l(t,...e){if(n__default.default(t))for(let a=0;a<e.length;a++){const s=e[a];s&&!o(t,s)&&(t.className+=" "+s);}}function f(t,...e){if(!(!t||!n__default.default(t)))for(let a=0;a<e.length;a++){const s=e[a];if(s&&t.className&&typeof t.className=="string"){const r=new RegExp("(\\s|^)"+s+"(\\s|$)");t.className=t.className.replace(r," "),t.className=t.className.replace(s,"");}}}Object.defineProperty(exports,"isDOMElement",{enumerable:true,get:function(){return n__default.default}});exports.addClassName=l;exports.getMaxZindex=c;exports.hasClassName=o;exports.removeClassName=f;