Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

shorter-js

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shorter-js - npm Package Compare versions

Comparing version 0.2.19 to 0.2.20

src/misc/getAttribute.js

168

dist/shorter-js.esm.js
/*!
* shorter-js v0.2.19 (https://github.com/thednp/shorter-js)
* shorter-js v0.2.20 (https://github.com/thednp/shorter-js)
* Copyright 2019-2021 © dnp_theme

@@ -859,3 +859,3 @@ * Licensed under MIT (https://github.com/thednp/shorter-js/blob/master/LICENSE)

*/
function queryElement(selector, parent) {
function querySelector(selector, parent) {
const lookUp = parent && isElement(parent) ? parent : document;

@@ -879,3 +879,3 @@ // @ts-ignore -- `isElement` is just as good

set: (element, component, instance) => {
const ELEMENT = queryElement(element);
const ELEMENT = querySelector(element);
if (!isElement(ELEMENT)) return;

@@ -910,3 +910,3 @@

get: (element, component) => {
const ELEMENT = queryElement(element);
const ELEMENT = querySelector(element);

@@ -1116,12 +1116,2 @@ const allForC = Data.getAllFor(component);

/**
* Checks if an element is an `HTMLElement`.
*
* @param {any} element the target object
* @returns {boolean} the query result
*/
function isHTMLElement(element) {
return element instanceof HTMLElement;
}
/**
* Checks if an element is an `<svg>`, `<img>` or `<video>`.

@@ -1251,3 +1241,4 @@ * *Tooltip* / *Popover* works different with media elements.

* Shortcut for `Array.from()` static method.
* @param {any[]} arr iterable object value
*
* @param {any[] | HTMLCollection | NodeList} arr array-like iterable object
* @returns {Array}

@@ -1259,13 +1250,19 @@ */

* Shortcut for `Float32Array.from()` static method.
* @param {any[]} arr iterable object value
* @param {any[] | HTMLCollection | NodeList} arr array-like iterable object
* @returns {Float32Array}
*/
const Float32ArrayFrom = (arr) => Float32Array.from(arr);
const Float32ArrayFrom = (arr) => {
const array = Array.from(arr);
return Float32Array.from(array);
};
/**
* Shortcut for `Float64Array.from()` static method.
* @param {any[]} arr iterable object value
* @param {any[] | HTMLCollection | NodeList} arr array-like iterable object
* @returns {Float64Array}
*/
const Float64ArrayFrom = (arr) => Float64Array.from(arr);
const Float64ArrayFrom = (arr) => {
const array = Array.from(arr);
return Float64Array.from(array);
};

@@ -1313,4 +1310,124 @@ /**

var version = "0.2.19";
/**
* Shortcut for `Element.getAttribute()` method.
* @param {Element} element target element
* @param {string} attribute attribute name
*/
const getAttribute = (element, attribute) => element.getAttribute(attribute);
/**
* Shortcut for `Element.setAttribute()` method.
* @param {Element} element target element
* @param {string} attribute attribute name
* @param {string} value attribute value
*/
const setAttribute = (element, attribute, value) => element.setAttribute(attribute, value);
/**
* Shortcut for `Element.removeAttribute()` method.
* @param {Element} element target element
* @param {string} attribute attribute name
*/
const removeAttribute = (element, attribute) => element.removeAttribute(attribute);
/**
* Shortcut for `Array.isArray()` static method.
*
* @param {any} arr array-like iterable object
* @returns {boolean} the query result
*/
const isArray = (arr) => Array.isArray(arr);
/**
* Checks if an element is an `HTMLElement`.
*
* @param {any} element the target object
* @returns {boolean} the query result
*/
function isHTMLElement(element) {
return element instanceof HTMLElement;
}
/**
* Checks if an object is an `HTMLCollection`.
*
* @param {any} object the target object
* @returns {boolean} the query result
*/
function isHTMLCollection(object) {
return object instanceof HTMLCollection;
}
/**
* Checks if an object is a `NodeList`.
*
* @param {any} object the target object
* @returns {boolean} the query result
*/
function isNodeList(object) {
return object instanceof NodeList;
}
/**
* Checks if an object is an `Array` in which all items are `Element`.
*
* @param {any} object the target object
* @returns {boolean} the query result
*/
function isElementsArray(object) {
return Array.isArray(object) && object.every((el) => isElement(el));
}
/**
* Utility to check if target is typeof `Element`
* or find one that matches a selector.
*
* @deprecated
*
* @param {Element | string} selector the input selector or target element
* @param {Element=} parent optional Element to look into
* @return {Element?} the Element or `querySelector` result
*/
function queryElement(selector, parent) {
return querySelector(selector, parent);
}
/**
* A shortcut for `(document|Element).querySelectorAll`.
*
* @param {string} selector the input selector
* @param {ParentNode=} parent optional Element to look into
* @return {NodeList} the query result
*/
function querySelectorAll(selector, parent) {
const lookUp = parent && isElement(parent) ? parent : document;
return lookUp.querySelectorAll(selector);
}
/**
* Shortcut for `Element.getElementsByTagName` method.
*
* @param {string} selector the tag name
* @param {Element=} parent optional Element to look into
* @return {HTMLCollection} the 'HTMLCollection'
*/
function getElementsByTagName(selector, parent) {
const lookUp = parent && isElement(parent) ? parent : document;
return lookUp.getElementsByTagName(selector);
}
/**
* Shortcut for `Element.getElementsByClassName` method.
*
* @param {string} selector the class name
* @param {Element=} parent optional Element to look into
* @return {HTMLCollection} the 'HTMLCollection'
*/
function getElementsByClassName(selector, parent) {
const lookUp = parent && isElement(parent) ? parent : document;
return lookUp.getElementsByClassName(selector);
}
var version = "0.2.20";
// @ts-ignore

@@ -1448,7 +1565,15 @@

getElementTransitionDelay,
isArray,
isElement,
isHTMLElement,
isNodeList,
isHTMLCollection,
isElementsArray,
isMedia,
isRTL,
queryElement,
querySelector,
querySelectorAll,
getElementsByClassName,
getElementsByTagName,
normalizeValue,

@@ -1465,2 +1590,5 @@ normalizeOptions,

getElementStyle,
getAttribute,
setAttribute,
removeAttribute,
Version,

@@ -1467,0 +1595,0 @@ };

4

dist/shorter-js.esm.min.js

@@ -1,2 +0,2 @@

// shorter-js v0.2.19 | dnp_theme © 2021 | MIT-License
const e="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],t="webkitAnimation"in document.head.style?"webkitAnimationDuration":"animationDuration",n="webkitAnimation"in document.head.style?"webkitAnimationDelay":"animationDelay",o="webkitAnimation"in document.head.style?"webkitAnimationName":"animationName",i="webkitAnimation"in document.head.style?"webkitAnimationEnd":"animationend",a="webkitTransition"in document.head.style?"webkitTransitionDuration":"transitionDuration",r="webkitTransition"in document.head.style?"webkitTransitionDelay":"transitionDelay",s="webkitTransition"in document.head.style?"webkitTransitionEnd":"transitionend",c="webkitTransition"in document.head.style?"webkitTransitionProperty":"transitionProperty",u=/iPhone|iPad|iPod|Android/i;let l=!1;l=navigator.userAgentData?navigator.userAgentData.brands.some(e=>u.test(e.brand)):u.test(navigator.userAgent);const d=l,{userAgentData:m}=navigator,b=/(iPhone|iPod|iPad)/,v=m?m.brands.some(e=>b.test(e.brand)):b.test(navigator.userAgent),p="webkitPerspective"in document.head.style||"perspective"in document.head.style,E=(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(e=!0,e)});document.addEventListener("DOMContentLoaded",(function e(){document.removeEventListener("DOMContentLoaded",e,t)}),t)}catch(e){throw Error("Passive events are not supported")}return e})(),g="webkitTransform"in document.head.style||"transform"in document.head.style,h="ontouchstart"in window||"msMaxTouchPoints"in navigator,y="webkitAnimation"in document.head.style||"animation"in document.head.style,f="webkitTransition"in document.head.style||"transition"in document.head.style;function k(e,t,n,o){const i=o||!1;e.addEventListener(t,n,i)}function w(e,t,n,o){const i=o||!1;e.removeEventListener(t,n,i)}function A(e){return e instanceof Element}function L(e,t){const n=t&&A(t)?t:document;return A(e)?e:n.querySelector(e)}const D=new Map,O={set:(e,t,n)=>{const o=L(e);if(!A(o))return;D.has(t)||D.set(t,new Map);D.get(t).set(o,n)},getAllFor:e=>D.has(e)?D.get(e):null,get:(e,t)=>{const n=L(e),o=O.getAllFor(t);return o&&A(n)&&o.has(n)?o.get(n):null},remove:(e,t)=>{if(!D.has(t))return;const n=D.get(t);n.delete(e),0===n.size&&D.delete(t)}};function C(e){const t=getComputedStyle(e),i=t[o],a=t[n],r=a.includes("ms")?1:1e3,s=y&&i&&"none"!==i?parseFloat(a)*r:0;return Number.isNaN(s)?0:s}function z(e){const n=getComputedStyle(e),i=n[o],a=n[t],r=a.includes("ms")?1:1e3,s=y&&i&&"none"!==i?parseFloat(a)*r:0;return Number.isNaN(s)?0:s}function T(e){const t=getComputedStyle(e),n=t[c],o=t[r],i=o.includes("ms")?1:1e3,a=f&&n&&"none"!==n?parseFloat(o)*i:0;return Number.isNaN(a)?0:a}function S(e){const t=getComputedStyle(e),n=t[c],o=t[a],i=o.includes("ms")?1:1e3,r=f&&n&&"none"!==n?parseFloat(o)*i:0;return Number.isNaN(r)?0:r}function M(e){return"true"===e||"false"!==e&&(Number.isNaN(+e)?""===e||"null"===e?null:e:+e)}const I={ariaChecked:"aria-checked",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",nativeEvents:["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointercancel","pointerdown","pointerleave","pointermove","pointerup","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"],abortEvent:"abort",blurEvent:"blur",moveEvent:"move",changeEvent:"change",errorEvent:"error",resetEvent:"reset",resizeEvent:"resize",scrollEvent:"scroll",submitEvent:"submit",loadEvent:"load",unloadEvent:"unload",readystatechangeEvent:"readystatechange",beforeunloadEvent:"beforeunload",orientationchangeEvent:"orientationchange",contextmenuEvent:"contextmenu",DOMContentLoadedEvent:"DOMContentLoaded",DOMMouseScrollEvent:"DOMMouseScroll",selectEvent:"select",selectendEvent:"selectend",selectstartEvent:"selectstart",mouseClickEvents:{down:"mousedown",up:"mouseup"},mouseclickEvent:"click",mousedblclickEvent:"dblclick",mousedownEvent:"mousedown",mouseupEvent:"mouseup",mouseHoverEvents:e,mouseenterEvent:"mouseenter",mouseleaveEvent:"mouseleave",mouseinEvent:"mousein",mouseoutEvent:"mouseout",mousewheelEvent:"mousewheel",mouseSwipeEvents:{start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"},touchEvents:{start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},touchstartEvent:"touchstart",touchmoveEvent:"touchmove",touchcancelEvent:"touchcancel",touchendEvent:"touchend",pointercancelEvent:"pointercancel",pointerdownEvent:"pointerdown",pointerleaveEvent:"pointerleave",pointermoveEvent:"pointermove",pointerupEvent:"pointerup",focusEvents:{in:"focusin",out:"focusout"},focusEvent:"focus",focusinEvent:"focusin",focusoutEvent:"focusout",gesturechangeEvent:"gesturechange",gestureendEvent:"gestureend",gesturestartEvent:"gesturestart",bezierEasings:{linear:"linear",easingSinusoidalIn:"cubic-bezier(0.47,0,0.745,0.715)",easingSinusoidalOut:"cubic-bezier(0.39,0.575,0.565,1)",easingSinusoidalInOut:"cubic-bezier(0.445,0.05,0.55,0.95)",easingQuadraticIn:"cubic-bezier(0.550,0.085,0.680,0.530)",easingQuadraticOut:"cubic-bezier(0.250,0.460,0.450,0.940)",easingQuadraticInOut:"cubic-bezier(0.455,0.030,0.515,0.955)",easingCubicIn:"cubic-bezier(0.55,0.055,0.675,0.19)",easingCubicOut:"cubic-bezier(0.215,0.61,0.355,1)",easingCubicInOut:"cubic-bezier(0.645,0.045,0.355,1)",easingQuarticIn:"cubic-bezier(0.895,0.03,0.685,0.22)",easingQuarticOut:"cubic-bezier(0.165,0.84,0.44,1)",easingQuarticInOut:"cubic-bezier(0.77,0,0.175,1)",easingQuinticIn:"cubic-bezier(0.755,0.05,0.855,0.06)",easingQuinticOut:"cubic-bezier(0.23,1,0.32,1)",easingQuinticInOut:"cubic-bezier(0.86,0,0.07,1)",easingExponentialIn:"cubic-bezier(0.95,0.05,0.795,0.035)",easingExponentialOut:"cubic-bezier(0.19,1,0.22,1)",easingExponentialInOut:"cubic-bezier(1,0,0,1)",easingCircularIn:"cubic-bezier(0.6,0.04,0.98,0.335)",easingCircularOut:"cubic-bezier(0.075,0.82,0.165,1)",easingCircularInOut:"cubic-bezier(0.785,0.135,0.15,0.86)",easingBackIn:"cubic-bezier(0.6,-0.28,0.735,0.045)",easingBackOut:"cubic-bezier(0.175,0.885,0.32,1.275)",easingBackInOut:"cubic-bezier(0.68,-0.55,0.265,1.55)"},animationDuration:t,animationDelay:n,animationName:o,animationEndEvent:i,transitionDuration:a,transitionDelay:r,transitionEndEvent:s,transitionProperty:c,isMobile:d,isApple:v,support3DTransform:p,supportPassive:E,supportTransform:g,supportTouch:h,supportAnimation:y,supportTransition:f,addEventListener:"addEventListener",removeEventListener:"removeEventListener",keyboardEventKeys:{Backspace:"Backspace",Tab:"Tab",Enter:"Enter",Shift:"Shift",Control:"Control",Alt:"Alt",Pause:"Pause",CapsLock:"CapsLock",Escape:"Escape",Scape:"Space",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Insert:"Insert",Delete:"Delete",Meta:"Meta",ContextMenu:"ContextMenu",ScrollLock:"ScrollLock"},keydownEvent:"keydown",keypressEvent:"keypress",keyupEvent:"keyup",keyAlt:"Alt",keyArrowDown:"ArrowDown",keyArrowLeft:"ArrowLeft",keyArrowRight:"ArrowRight",keyArrowUp:"ArrowUp",keyBackspace:"Backspace",keyCapsLock:"CapsLock",keyControl:"Control",keyDelete:"Delete",keyEnter:"Enter",keyEscape:"Escape",keyInsert:"Insert",keyMeta:"Meta",keyPause:"Pause",keyScrollLock:"ScrollLock",keyShift:"Shift",keySpace:"Space",keyTab:"Tab",offsetHeight:"offsetHeight",offsetWidth:"offsetWidth",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",addClass:function(e,t){e.classList.add(t)},removeClass:function(e,t){e.classList.remove(t)},hasClass:function(e,t){return e.classList.contains(t)},on:k,off:w,one:function(e,t,n,o){k(e,t,(function i(a){a.target===e&&(n.apply(e,[a]),w(e,t,i,o))}),o)},Data:O,getInstance:(e,t)=>O.get(e,t),emulateAnimationEnd:function(e,t){let n=0;const o=new Event(i),a=z(e),r=C(e);if(a){const s=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener(i,s),n=1)};e.addEventListener(i,s),setTimeout(()=>{n||e.dispatchEvent(o)},a+r+17)}else t.apply(e,[o])},emulateTransitionEnd:function(e,t){let n=0;const o=new Event(s),i=S(e),a=T(e);if(i){const r=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener(s,r),n=1)};e.addEventListener(s,r),setTimeout(()=>{n||e.dispatchEvent(o)},i+a+17)}else t.apply(e,[o])},isElementInScrollRange:function(e){const t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;return t.top<=n&&t.bottom>=0},isElementInViewport:function(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},passiveHandler:!!E&&{passive:!0},getElementAnimationDuration:z,getElementAnimationDelay:C,getElementTransitionDuration:S,getElementTransitionDelay:T,isElement:A,isHTMLElement:function(e){return e instanceof HTMLElement},isMedia:function(e){return[SVGElement,HTMLImageElement,HTMLVideoElement].some(t=>e instanceof t)},isRTL:()=>"rtl"===document.documentElement.dir,queryElement:L,normalizeValue:M,normalizeOptions:function(e,t,n,o){const i={...e.dataset},a={},r={};return Object.keys(i).forEach(e=>{const t=o&&e.includes(o)?e.replace(o,"").replace(/[A-Z]/,e=>e.toLowerCase()):e;r[t]=M(i[e])}),Object.keys(n).forEach(e=>{n[e]=M(n[e])}),Object.keys(t).forEach(e=>{a[e]=e in n?n[e]:e in r?r[e]:t[e]}),a},tryWrapper:function(e,t){try{e()}catch(e){throw TypeError(`${t} ${e}`)}},reflow:function(e){return e.offsetHeight},ArrayFrom:e=>Array.from(e),Float32ArrayFrom:e=>Float32Array.from(e),Float64ArrayFrom:e=>Float64Array.from(e),ObjectAssign:(e,t)=>Object.assign(e,t),ObjectKeys:e=>Object.keys(e),ObjectValues:e=>Object.values(e),getElementStyle:function(e,t){const n=getComputedStyle(e);return t&&t in n?n[t]:n},Version:"0.2.19"};export default I;
// shorter-js v0.2.20 | dnp_theme © 2021 | MIT-License
const e="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],t="webkitAnimation"in document.head.style?"webkitAnimationDuration":"animationDuration",n="webkitAnimation"in document.head.style?"webkitAnimationDelay":"animationDelay",o="webkitAnimation"in document.head.style?"webkitAnimationName":"animationName",i="webkitAnimation"in document.head.style?"webkitAnimationEnd":"animationend",r="webkitTransition"in document.head.style?"webkitTransitionDuration":"transitionDuration",a="webkitTransition"in document.head.style?"webkitTransitionDelay":"transitionDelay",s="webkitTransition"in document.head.style?"webkitTransitionEnd":"transitionend",c="webkitTransition"in document.head.style?"webkitTransitionProperty":"transitionProperty",u=/iPhone|iPad|iPod|Android/i;let l=!1;l=navigator.userAgentData?navigator.userAgentData.brands.some(e=>u.test(e.brand)):u.test(navigator.userAgent);const d=l,{userAgentData:m}=navigator,b=/(iPhone|iPod|iPad)/,v=m?m.brands.some(e=>b.test(e.brand)):b.test(navigator.userAgent),E="webkitPerspective"in document.head.style||"perspective"in document.head.style,p=(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(e=!0,e)});document.addEventListener("DOMContentLoaded",(function e(){document.removeEventListener("DOMContentLoaded",e,t)}),t)}catch(e){throw Error("Passive events are not supported")}return e})(),g="webkitTransform"in document.head.style||"transform"in document.head.style,y="ontouchstart"in window||"msMaxTouchPoints"in navigator,h="webkitAnimation"in document.head.style||"animation"in document.head.style,f="webkitTransition"in document.head.style||"transition"in document.head.style;function k(e,t,n,o){const i=o||!1;e.addEventListener(t,n,i)}function w(e,t,n,o){const i=o||!1;e.removeEventListener(t,n,i)}function A(e){return e instanceof Element}function L(e,t){const n=t&&A(t)?t:document;return A(e)?e:n.querySelector(e)}const C=new Map,D={set:(e,t,n)=>{const o=L(e);if(!A(o))return;C.has(t)||C.set(t,new Map);C.get(t).set(o,n)},getAllFor:e=>C.has(e)?C.get(e):null,get:(e,t)=>{const n=L(e),o=D.getAllFor(t);return o&&A(n)&&o.has(n)?o.get(n):null},remove:(e,t)=>{if(!C.has(t))return;const n=C.get(t);n.delete(e),0===n.size&&C.delete(t)}};function O(e){const t=getComputedStyle(e),i=t[o],r=t[n],a=r.includes("ms")?1:1e3,s=h&&i&&"none"!==i?parseFloat(r)*a:0;return Number.isNaN(s)?0:s}function T(e){const n=getComputedStyle(e),i=n[o],r=n[t],a=r.includes("ms")?1:1e3,s=h&&i&&"none"!==i?parseFloat(r)*a:0;return Number.isNaN(s)?0:s}function S(e){const t=getComputedStyle(e),n=t[c],o=t[a],i=o.includes("ms")?1:1e3,r=f&&n&&"none"!==n?parseFloat(o)*i:0;return Number.isNaN(r)?0:r}function z(e){const t=getComputedStyle(e),n=t[c],o=t[r],i=o.includes("ms")?1:1e3,a=f&&n&&"none"!==n?parseFloat(o)*i:0;return Number.isNaN(a)?0:a}function M(e){return"true"===e||"false"!==e&&(Number.isNaN(+e)?""===e||"null"===e?null:e:+e)}const I={ariaChecked:"aria-checked",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",nativeEvents:["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointercancel","pointerdown","pointerleave","pointermove","pointerup","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"],abortEvent:"abort",blurEvent:"blur",moveEvent:"move",changeEvent:"change",errorEvent:"error",resetEvent:"reset",resizeEvent:"resize",scrollEvent:"scroll",submitEvent:"submit",loadEvent:"load",unloadEvent:"unload",readystatechangeEvent:"readystatechange",beforeunloadEvent:"beforeunload",orientationchangeEvent:"orientationchange",contextmenuEvent:"contextmenu",DOMContentLoadedEvent:"DOMContentLoaded",DOMMouseScrollEvent:"DOMMouseScroll",selectEvent:"select",selectendEvent:"selectend",selectstartEvent:"selectstart",mouseClickEvents:{down:"mousedown",up:"mouseup"},mouseclickEvent:"click",mousedblclickEvent:"dblclick",mousedownEvent:"mousedown",mouseupEvent:"mouseup",mouseHoverEvents:e,mouseenterEvent:"mouseenter",mouseleaveEvent:"mouseleave",mouseinEvent:"mousein",mouseoutEvent:"mouseout",mousewheelEvent:"mousewheel",mouseSwipeEvents:{start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"},touchEvents:{start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},touchstartEvent:"touchstart",touchmoveEvent:"touchmove",touchcancelEvent:"touchcancel",touchendEvent:"touchend",pointercancelEvent:"pointercancel",pointerdownEvent:"pointerdown",pointerleaveEvent:"pointerleave",pointermoveEvent:"pointermove",pointerupEvent:"pointerup",focusEvents:{in:"focusin",out:"focusout"},focusEvent:"focus",focusinEvent:"focusin",focusoutEvent:"focusout",gesturechangeEvent:"gesturechange",gestureendEvent:"gestureend",gesturestartEvent:"gesturestart",bezierEasings:{linear:"linear",easingSinusoidalIn:"cubic-bezier(0.47,0,0.745,0.715)",easingSinusoidalOut:"cubic-bezier(0.39,0.575,0.565,1)",easingSinusoidalInOut:"cubic-bezier(0.445,0.05,0.55,0.95)",easingQuadraticIn:"cubic-bezier(0.550,0.085,0.680,0.530)",easingQuadraticOut:"cubic-bezier(0.250,0.460,0.450,0.940)",easingQuadraticInOut:"cubic-bezier(0.455,0.030,0.515,0.955)",easingCubicIn:"cubic-bezier(0.55,0.055,0.675,0.19)",easingCubicOut:"cubic-bezier(0.215,0.61,0.355,1)",easingCubicInOut:"cubic-bezier(0.645,0.045,0.355,1)",easingQuarticIn:"cubic-bezier(0.895,0.03,0.685,0.22)",easingQuarticOut:"cubic-bezier(0.165,0.84,0.44,1)",easingQuarticInOut:"cubic-bezier(0.77,0,0.175,1)",easingQuinticIn:"cubic-bezier(0.755,0.05,0.855,0.06)",easingQuinticOut:"cubic-bezier(0.23,1,0.32,1)",easingQuinticInOut:"cubic-bezier(0.86,0,0.07,1)",easingExponentialIn:"cubic-bezier(0.95,0.05,0.795,0.035)",easingExponentialOut:"cubic-bezier(0.19,1,0.22,1)",easingExponentialInOut:"cubic-bezier(1,0,0,1)",easingCircularIn:"cubic-bezier(0.6,0.04,0.98,0.335)",easingCircularOut:"cubic-bezier(0.075,0.82,0.165,1)",easingCircularInOut:"cubic-bezier(0.785,0.135,0.15,0.86)",easingBackIn:"cubic-bezier(0.6,-0.28,0.735,0.045)",easingBackOut:"cubic-bezier(0.175,0.885,0.32,1.275)",easingBackInOut:"cubic-bezier(0.68,-0.55,0.265,1.55)"},animationDuration:t,animationDelay:n,animationName:o,animationEndEvent:i,transitionDuration:r,transitionDelay:a,transitionEndEvent:s,transitionProperty:c,isMobile:d,isApple:v,support3DTransform:E,supportPassive:p,supportTransform:g,supportTouch:y,supportAnimation:h,supportTransition:f,addEventListener:"addEventListener",removeEventListener:"removeEventListener",keyboardEventKeys:{Backspace:"Backspace",Tab:"Tab",Enter:"Enter",Shift:"Shift",Control:"Control",Alt:"Alt",Pause:"Pause",CapsLock:"CapsLock",Escape:"Escape",Scape:"Space",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Insert:"Insert",Delete:"Delete",Meta:"Meta",ContextMenu:"ContextMenu",ScrollLock:"ScrollLock"},keydownEvent:"keydown",keypressEvent:"keypress",keyupEvent:"keyup",keyAlt:"Alt",keyArrowDown:"ArrowDown",keyArrowLeft:"ArrowLeft",keyArrowRight:"ArrowRight",keyArrowUp:"ArrowUp",keyBackspace:"Backspace",keyCapsLock:"CapsLock",keyControl:"Control",keyDelete:"Delete",keyEnter:"Enter",keyEscape:"Escape",keyInsert:"Insert",keyMeta:"Meta",keyPause:"Pause",keyScrollLock:"ScrollLock",keyShift:"Shift",keySpace:"Space",keyTab:"Tab",offsetHeight:"offsetHeight",offsetWidth:"offsetWidth",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",addClass:function(e,t){e.classList.add(t)},removeClass:function(e,t){e.classList.remove(t)},hasClass:function(e,t){return e.classList.contains(t)},on:k,off:w,one:function(e,t,n,o){k(e,t,(function i(r){r.target===e&&(n.apply(e,[r]),w(e,t,i,o))}),o)},Data:D,getInstance:(e,t)=>D.get(e,t),emulateAnimationEnd:function(e,t){let n=0;const o=new Event(i),r=T(e),a=O(e);if(r){const s=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener(i,s),n=1)};e.addEventListener(i,s),setTimeout(()=>{n||e.dispatchEvent(o)},r+a+17)}else t.apply(e,[o])},emulateTransitionEnd:function(e,t){let n=0;const o=new Event(s),i=z(e),r=S(e);if(i){const a=o=>{o.target===e&&(t.apply(e,[o]),e.removeEventListener(s,a),n=1)};e.addEventListener(s,a),setTimeout(()=>{n||e.dispatchEvent(o)},i+r+17)}else t.apply(e,[o])},isElementInScrollRange:function(e){const t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;return t.top<=n&&t.bottom>=0},isElementInViewport:function(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},passiveHandler:!!p&&{passive:!0},getElementAnimationDuration:T,getElementAnimationDelay:O,getElementTransitionDuration:z,getElementTransitionDelay:S,isArray:e=>Array.isArray(e),isElement:A,isHTMLElement:function(e){return e instanceof HTMLElement},isNodeList:function(e){return e instanceof NodeList},isHTMLCollection:function(e){return e instanceof HTMLCollection},isElementsArray:function(e){return Array.isArray(e)&&e.every(e=>A(e))},isMedia:function(e){return[SVGElement,HTMLImageElement,HTMLVideoElement].some(t=>e instanceof t)},isRTL:()=>"rtl"===document.documentElement.dir,queryElement:function(e,t){return L(e,t)},querySelector:L,querySelectorAll:function(e,t){return(t&&A(t)?t:document).querySelectorAll(e)},getElementsByClassName:function(e,t){return(t&&A(t)?t:document).getElementsByClassName(e)},getElementsByTagName:function(e,t){return(t&&A(t)?t:document).getElementsByTagName(e)},normalizeValue:M,normalizeOptions:function(e,t,n,o){const i={...e.dataset},r={},a={};return Object.keys(i).forEach(e=>{const t=o&&e.includes(o)?e.replace(o,"").replace(/[A-Z]/,e=>e.toLowerCase()):e;a[t]=M(i[e])}),Object.keys(n).forEach(e=>{n[e]=M(n[e])}),Object.keys(t).forEach(e=>{r[e]=e in n?n[e]:e in a?a[e]:t[e]}),r},tryWrapper:function(e,t){try{e()}catch(e){throw TypeError(`${t} ${e}`)}},reflow:function(e){return e.offsetHeight},ArrayFrom:e=>Array.from(e),Float32ArrayFrom:e=>{const t=Array.from(e);return Float32Array.from(t)},Float64ArrayFrom:e=>{const t=Array.from(e);return Float64Array.from(t)},ObjectAssign:(e,t)=>Object.assign(e,t),ObjectKeys:e=>Object.keys(e),ObjectValues:e=>Object.values(e),getElementStyle:function(e,t){const n=getComputedStyle(e);return t&&t in n?n[t]:n},getAttribute:(e,t)=>e.getAttribute(t),setAttribute:(e,t,n)=>e.setAttribute(t,n),removeAttribute:(e,t)=>e.removeAttribute(t),Version:"0.2.20"};export default I;
/*!
* shorter-js v0.2.19 (https://github.com/thednp/shorter-js)
* shorter-js v0.2.20 (https://github.com/thednp/shorter-js)
* Copyright 2019-2021 © dnp_theme

@@ -864,3 +864,3 @@ * Licensed under MIT (https://github.com/thednp/shorter-js/blob/master/LICENSE)

*/
function queryElement(selector, parent) {
function querySelector(selector, parent) {
var lookUp = parent && isElement(parent) ? parent : document;

@@ -884,3 +884,3 @@ // @ts-ignore -- `isElement` is just as good

set: function (element, component, instance) {
var ELEMENT = queryElement(element);
var ELEMENT = querySelector(element);
if (!isElement(ELEMENT)) { return; }

@@ -915,3 +915,3 @@

get: function (element, component) {
var ELEMENT = queryElement(element);
var ELEMENT = querySelector(element);

@@ -1121,12 +1121,2 @@ var allForC = Data.getAllFor(component);

/**
* Checks if an element is an `HTMLElement`.
*
* @param {any} element the target object
* @returns {boolean} the query result
*/
function isHTMLElement(element) {
return element instanceof HTMLElement;
}
/**
* Checks if an element is an `<svg>`, `<img>` or `<video>`.

@@ -1256,3 +1246,4 @@ * *Tooltip* / *Popover* works different with media elements.

* Shortcut for `Array.from()` static method.
* @param {any[]} arr iterable object value
*
* @param {any[] | HTMLCollection | NodeList} arr array-like iterable object
* @returns {Array}

@@ -1264,13 +1255,19 @@ */

* Shortcut for `Float32Array.from()` static method.
* @param {any[]} arr iterable object value
* @param {any[] | HTMLCollection | NodeList} arr array-like iterable object
* @returns {Float32Array}
*/
var Float32ArrayFrom = function (arr) { return Float32Array.from(arr); };
var Float32ArrayFrom = function (arr) {
var array = Array.from(arr);
return Float32Array.from(array);
};
/**
* Shortcut for `Float64Array.from()` static method.
* @param {any[]} arr iterable object value
* @param {any[] | HTMLCollection | NodeList} arr array-like iterable object
* @returns {Float64Array}
*/
var Float64ArrayFrom = function (arr) { return Float64Array.from(arr); };
var Float64ArrayFrom = function (arr) {
var array = Array.from(arr);
return Float64Array.from(array);
};

@@ -1318,4 +1315,124 @@ /**

var version = "0.2.19";
/**
* Shortcut for `Element.getAttribute()` method.
* @param {Element} element target element
* @param {string} attribute attribute name
*/
var getAttribute = function (element, attribute) { return element.getAttribute(attribute); };
/**
* Shortcut for `Element.setAttribute()` method.
* @param {Element} element target element
* @param {string} attribute attribute name
* @param {string} value attribute value
*/
var setAttribute = function (element, attribute, value) { return element.setAttribute(attribute, value); };
/**
* Shortcut for `Element.removeAttribute()` method.
* @param {Element} element target element
* @param {string} attribute attribute name
*/
var removeAttribute = function (element, attribute) { return element.removeAttribute(attribute); };
/**
* Shortcut for `Array.isArray()` static method.
*
* @param {any} arr array-like iterable object
* @returns {boolean} the query result
*/
var isArray = function (arr) { return Array.isArray(arr); };
/**
* Checks if an element is an `HTMLElement`.
*
* @param {any} element the target object
* @returns {boolean} the query result
*/
function isHTMLElement(element) {
return element instanceof HTMLElement;
}
/**
* Checks if an object is an `HTMLCollection`.
*
* @param {any} object the target object
* @returns {boolean} the query result
*/
function isHTMLCollection(object) {
return object instanceof HTMLCollection;
}
/**
* Checks if an object is a `NodeList`.
*
* @param {any} object the target object
* @returns {boolean} the query result
*/
function isNodeList(object) {
return object instanceof NodeList;
}
/**
* Checks if an object is an `Array` in which all items are `Element`.
*
* @param {any} object the target object
* @returns {boolean} the query result
*/
function isElementsArray(object) {
return Array.isArray(object) && object.every(function (el) { return isElement(el); });
}
/**
* Utility to check if target is typeof `Element`
* or find one that matches a selector.
*
* @deprecated
*
* @param {Element | string} selector the input selector or target element
* @param {Element=} parent optional Element to look into
* @return {Element?} the Element or `querySelector` result
*/
function queryElement(selector, parent) {
return querySelector(selector, parent);
}
/**
* A shortcut for `(document|Element).querySelectorAll`.
*
* @param {string} selector the input selector
* @param {ParentNode=} parent optional Element to look into
* @return {NodeList} the query result
*/
function querySelectorAll(selector, parent) {
var lookUp = parent && isElement(parent) ? parent : document;
return lookUp.querySelectorAll(selector);
}
/**
* Shortcut for `Element.getElementsByTagName` method.
*
* @param {string} selector the tag name
* @param {Element=} parent optional Element to look into
* @return {HTMLCollection} the 'HTMLCollection'
*/
function getElementsByTagName(selector, parent) {
var lookUp = parent && isElement(parent) ? parent : document;
return lookUp.getElementsByTagName(selector);
}
/**
* Shortcut for `Element.getElementsByClassName` method.
*
* @param {string} selector the class name
* @param {Element=} parent optional Element to look into
* @return {HTMLCollection} the 'HTMLCollection'
*/
function getElementsByClassName(selector, parent) {
var lookUp = parent && isElement(parent) ? parent : document;
return lookUp.getElementsByClassName(selector);
}
var version = "0.2.20";
// @ts-ignore

@@ -1453,7 +1570,15 @@

getElementTransitionDelay: getElementTransitionDelay,
isArray: isArray,
isElement: isElement,
isHTMLElement: isHTMLElement,
isNodeList: isNodeList,
isHTMLCollection: isHTMLCollection,
isElementsArray: isElementsArray,
isMedia: isMedia,
isRTL: isRTL,
queryElement: queryElement,
querySelector: querySelector,
querySelectorAll: querySelectorAll,
getElementsByClassName: getElementsByClassName,
getElementsByTagName: getElementsByTagName,
normalizeValue: normalizeValue,

@@ -1470,2 +1595,5 @@ normalizeOptions: normalizeOptions,

getElementStyle: getElementStyle,
getAttribute: getAttribute,
setAttribute: setAttribute,
removeAttribute: removeAttribute,
Version: Version,

@@ -1472,0 +1600,0 @@ };

@@ -1,2 +0,2 @@

// shorter-js v0.2.19 | dnp_theme © 2021 | MIT-License
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).SHORTER=t()}(this,(function(){"use strict";var e="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],t="webkitAnimation"in document.head.style?"webkitAnimationDuration":"animationDuration",n="webkitAnimation"in document.head.style?"webkitAnimationDelay":"animationDelay",i="webkitAnimation"in document.head.style?"webkitAnimationName":"animationName",o="webkitAnimation"in document.head.style?"webkitAnimationEnd":"animationend",r="webkitTransition"in document.head.style?"webkitTransitionDuration":"transitionDuration",a="webkitTransition"in document.head.style?"webkitTransitionDelay":"transitionDelay",s="webkitTransition"in document.head.style?"webkitTransitionEnd":"transitionend",u="webkitTransition"in document.head.style?"webkitTransitionProperty":"transitionProperty",c=/iPhone|iPad|iPod|Android/i,l=navigator.userAgentData?navigator.userAgentData.brands.some((function(e){return c.test(e.brand)})):c.test(navigator.userAgent),d=navigator.userAgentData,m=/(iPhone|iPod|iPad)/,v=d?d.brands.some((function(e){return m.test(e.brand)})):m.test(navigator.userAgent),b="webkitPerspective"in document.head.style||"perspective"in document.head.style,p=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0}});document.addEventListener("DOMContentLoaded",(function e(){document.removeEventListener("DOMContentLoaded",e,t)}),t)}catch(e){throw Error("Passive events are not supported")}return e}(),f="webkitTransform"in document.head.style||"transform"in document.head.style,E="ontouchstart"in window||"msMaxTouchPoints"in navigator,g="webkitAnimation"in document.head.style||"animation"in document.head.style,h="webkitTransition"in document.head.style||"transition"in document.head.style;function y(e,t,n,i){var o=i||!1;e.addEventListener(t,n,o)}function k(e,t,n,i){var o=i||!1;e.removeEventListener(t,n,o)}function w(e){return e instanceof Element}function A(e,t){var n=t&&w(t)?t:document;return w(e)?e:n.querySelector(e)}var L=new Map,D={set:function(e,t,n){var i=A(e);w(i)&&(L.has(t)||L.set(t,new Map),L.get(t).set(i,n))},getAllFor:function(e){return L.has(e)?L.get(e):null},get:function(e,t){var n=A(e),i=D.getAllFor(t);return i&&w(n)&&i.has(n)?i.get(n):null},remove:function(e,t){if(L.has(t)){var n=L.get(t);n.delete(e),0===n.size&&L.delete(t)}}};function O(e){var t=getComputedStyle(e),o=t[i],r=t[n],a=r.includes("ms")?1:1e3,s=g&&o&&"none"!==o?parseFloat(r)*a:0;return Number.isNaN(s)?0:s}function C(e){var n=getComputedStyle(e),o=n[i],r=n[t],a=r.includes("ms")?1:1e3,s=g&&o&&"none"!==o?parseFloat(r)*a:0;return Number.isNaN(s)?0:s}function z(e){var t=getComputedStyle(e),n=t[u],i=t[a],o=i.includes("ms")?1:1e3,r=h&&n&&"none"!==n?parseFloat(i)*o:0;return Number.isNaN(r)?0:r}function T(e){var t=getComputedStyle(e),n=t[u],i=t[r],o=i.includes("ms")?1:1e3,a=h&&n&&"none"!==n?parseFloat(i)*o:0;return Number.isNaN(a)?0:a}function S(e){return"true"===e||"false"!==e&&(Number.isNaN(+e)?""===e||"null"===e?null:e:+e)}return{ariaChecked:"aria-checked",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",nativeEvents:["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointercancel","pointerdown","pointerleave","pointermove","pointerup","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"],abortEvent:"abort",blurEvent:"blur",moveEvent:"move",changeEvent:"change",errorEvent:"error",resetEvent:"reset",resizeEvent:"resize",scrollEvent:"scroll",submitEvent:"submit",loadEvent:"load",unloadEvent:"unload",readystatechangeEvent:"readystatechange",beforeunloadEvent:"beforeunload",orientationchangeEvent:"orientationchange",contextmenuEvent:"contextmenu",DOMContentLoadedEvent:"DOMContentLoaded",DOMMouseScrollEvent:"DOMMouseScroll",selectEvent:"select",selectendEvent:"selectend",selectstartEvent:"selectstart",mouseClickEvents:{down:"mousedown",up:"mouseup"},mouseclickEvent:"click",mousedblclickEvent:"dblclick",mousedownEvent:"mousedown",mouseupEvent:"mouseup",mouseHoverEvents:e,mouseenterEvent:"mouseenter",mouseleaveEvent:"mouseleave",mouseinEvent:"mousein",mouseoutEvent:"mouseout",mousewheelEvent:"mousewheel",mouseSwipeEvents:{start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"},touchEvents:{start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},touchstartEvent:"touchstart",touchmoveEvent:"touchmove",touchcancelEvent:"touchcancel",touchendEvent:"touchend",pointercancelEvent:"pointercancel",pointerdownEvent:"pointerdown",pointerleaveEvent:"pointerleave",pointermoveEvent:"pointermove",pointerupEvent:"pointerup",focusEvents:{in:"focusin",out:"focusout"},focusEvent:"focus",focusinEvent:"focusin",focusoutEvent:"focusout",gesturechangeEvent:"gesturechange",gestureendEvent:"gestureend",gesturestartEvent:"gesturestart",bezierEasings:{linear:"linear",easingSinusoidalIn:"cubic-bezier(0.47,0,0.745,0.715)",easingSinusoidalOut:"cubic-bezier(0.39,0.575,0.565,1)",easingSinusoidalInOut:"cubic-bezier(0.445,0.05,0.55,0.95)",easingQuadraticIn:"cubic-bezier(0.550,0.085,0.680,0.530)",easingQuadraticOut:"cubic-bezier(0.250,0.460,0.450,0.940)",easingQuadraticInOut:"cubic-bezier(0.455,0.030,0.515,0.955)",easingCubicIn:"cubic-bezier(0.55,0.055,0.675,0.19)",easingCubicOut:"cubic-bezier(0.215,0.61,0.355,1)",easingCubicInOut:"cubic-bezier(0.645,0.045,0.355,1)",easingQuarticIn:"cubic-bezier(0.895,0.03,0.685,0.22)",easingQuarticOut:"cubic-bezier(0.165,0.84,0.44,1)",easingQuarticInOut:"cubic-bezier(0.77,0,0.175,1)",easingQuinticIn:"cubic-bezier(0.755,0.05,0.855,0.06)",easingQuinticOut:"cubic-bezier(0.23,1,0.32,1)",easingQuinticInOut:"cubic-bezier(0.86,0,0.07,1)",easingExponentialIn:"cubic-bezier(0.95,0.05,0.795,0.035)",easingExponentialOut:"cubic-bezier(0.19,1,0.22,1)",easingExponentialInOut:"cubic-bezier(1,0,0,1)",easingCircularIn:"cubic-bezier(0.6,0.04,0.98,0.335)",easingCircularOut:"cubic-bezier(0.075,0.82,0.165,1)",easingCircularInOut:"cubic-bezier(0.785,0.135,0.15,0.86)",easingBackIn:"cubic-bezier(0.6,-0.28,0.735,0.045)",easingBackOut:"cubic-bezier(0.175,0.885,0.32,1.275)",easingBackInOut:"cubic-bezier(0.68,-0.55,0.265,1.55)"},animationDuration:t,animationDelay:n,animationName:i,animationEndEvent:o,transitionDuration:r,transitionDelay:a,transitionEndEvent:s,transitionProperty:u,isMobile:l,isApple:v,support3DTransform:b,supportPassive:p,supportTransform:f,supportTouch:E,supportAnimation:g,supportTransition:h,addEventListener:"addEventListener",removeEventListener:"removeEventListener",keyboardEventKeys:{Backspace:"Backspace",Tab:"Tab",Enter:"Enter",Shift:"Shift",Control:"Control",Alt:"Alt",Pause:"Pause",CapsLock:"CapsLock",Escape:"Escape",Scape:"Space",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Insert:"Insert",Delete:"Delete",Meta:"Meta",ContextMenu:"ContextMenu",ScrollLock:"ScrollLock"},keydownEvent:"keydown",keypressEvent:"keypress",keyupEvent:"keyup",keyAlt:"Alt",keyArrowDown:"ArrowDown",keyArrowLeft:"ArrowLeft",keyArrowRight:"ArrowRight",keyArrowUp:"ArrowUp",keyBackspace:"Backspace",keyCapsLock:"CapsLock",keyControl:"Control",keyDelete:"Delete",keyEnter:"Enter",keyEscape:"Escape",keyInsert:"Insert",keyMeta:"Meta",keyPause:"Pause",keyScrollLock:"ScrollLock",keyShift:"Shift",keySpace:"Space",keyTab:"Tab",offsetHeight:"offsetHeight",offsetWidth:"offsetWidth",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",addClass:function(e,t){e.classList.add(t)},removeClass:function(e,t){e.classList.remove(t)},hasClass:function(e,t){return e.classList.contains(t)},on:y,off:k,one:function(e,t,n,i){y(e,t,(function o(r){r.target===e&&(n.apply(e,[r]),k(e,t,o,i))}),i)},Data:D,getInstance:function(e,t){return D.get(e,t)},emulateAnimationEnd:function(e,t){var n=0,i=new Event(o),r=C(e),a=O(e);if(r){var s=function(i){i.target===e&&(t.apply(e,[i]),e.removeEventListener(o,s),n=1)};e.addEventListener(o,s),setTimeout((function(){n||e.dispatchEvent(i)}),r+a+17)}else t.apply(e,[i])},emulateTransitionEnd:function(e,t){var n=0,i=new Event(s),o=T(e),r=z(e);if(o){var a=function(i){i.target===e&&(t.apply(e,[i]),e.removeEventListener(s,a),n=1)};e.addEventListener(s,a),setTimeout((function(){n||e.dispatchEvent(i)}),o+r+17)}else t.apply(e,[i])},isElementInScrollRange:function(e){var t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;return t.top<=n&&t.bottom>=0},isElementInViewport:function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},passiveHandler:!!p&&{passive:!0},getElementAnimationDuration:C,getElementAnimationDelay:O,getElementTransitionDuration:T,getElementTransitionDelay:z,isElement:w,isHTMLElement:function(e){return e instanceof HTMLElement},isMedia:function(e){return[SVGElement,HTMLImageElement,HTMLVideoElement].some((function(t){return e instanceof t}))},isRTL:function(){return"rtl"===document.documentElement.dir},queryElement:A,normalizeValue:S,normalizeOptions:function(e,t,n,i){var o=Object.assign({},e.dataset),r={},a={};return Object.keys(o).forEach((function(e){var t=i&&e.includes(i)?e.replace(i,"").replace(/[A-Z]/,(function(e){return e.toLowerCase()})):e;a[t]=S(o[e])})),Object.keys(n).forEach((function(e){n[e]=S(n[e])})),Object.keys(t).forEach((function(e){r[e]=e in n?n[e]:e in a?a[e]:t[e]})),r},tryWrapper:function(e,t){try{e()}catch(e){throw TypeError(t+" "+e)}},reflow:function(e){return e.offsetHeight},ArrayFrom:function(e){return Array.from(e)},Float32ArrayFrom:function(e){return Float32Array.from(e)},Float64ArrayFrom:function(e){return Float64Array.from(e)},ObjectAssign:function(e,t){return Object.assign(e,t)},ObjectKeys:function(e){return Object.keys(e)},ObjectValues:function(e){return Object.values(e)},getElementStyle:function(e,t){var n=getComputedStyle(e);return t&&t in n?n[t]:n},Version:"0.2.19"}}));
// shorter-js v0.2.20 | dnp_theme © 2021 | MIT-License
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).SHORTER=t()}(this,(function(){"use strict";var e="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],t="webkitAnimation"in document.head.style?"webkitAnimationDuration":"animationDuration",n="webkitAnimation"in document.head.style?"webkitAnimationDelay":"animationDelay",i="webkitAnimation"in document.head.style?"webkitAnimationName":"animationName",r="webkitAnimation"in document.head.style?"webkitAnimationEnd":"animationend",o="webkitTransition"in document.head.style?"webkitTransitionDuration":"transitionDuration",a="webkitTransition"in document.head.style?"webkitTransitionDelay":"transitionDelay",u="webkitTransition"in document.head.style?"webkitTransitionEnd":"transitionend",s="webkitTransition"in document.head.style?"webkitTransitionProperty":"transitionProperty",c=/iPhone|iPad|iPod|Android/i,l=navigator.userAgentData?navigator.userAgentData.brands.some((function(e){return c.test(e.brand)})):c.test(navigator.userAgent),d=navigator.userAgentData,m=/(iPhone|iPod|iPad)/,v=d?d.brands.some((function(e){return m.test(e.brand)})):m.test(navigator.userAgent),f="webkitPerspective"in document.head.style||"perspective"in document.head.style,b=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0}});document.addEventListener("DOMContentLoaded",(function e(){document.removeEventListener("DOMContentLoaded",e,t)}),t)}catch(e){throw Error("Passive events are not supported")}return e}(),E="webkitTransform"in document.head.style||"transform"in document.head.style,p="ontouchstart"in window||"msMaxTouchPoints"in navigator,g="webkitAnimation"in document.head.style||"animation"in document.head.style,y="webkitTransition"in document.head.style||"transition"in document.head.style;function h(e,t,n,i){var r=i||!1;e.addEventListener(t,n,r)}function k(e,t,n,i){var r=i||!1;e.removeEventListener(t,n,r)}function w(e){return e instanceof Element}function A(e,t){var n=t&&w(t)?t:document;return w(e)?e:n.querySelector(e)}var L=new Map,C={set:function(e,t,n){var i=A(e);w(i)&&(L.has(t)||L.set(t,new Map),L.get(t).set(i,n))},getAllFor:function(e){return L.has(e)?L.get(e):null},get:function(e,t){var n=A(e),i=C.getAllFor(t);return i&&w(n)&&i.has(n)?i.get(n):null},remove:function(e,t){if(L.has(t)){var n=L.get(t);n.delete(e),0===n.size&&L.delete(t)}}};function D(e){var t=getComputedStyle(e),r=t[i],o=t[n],a=o.includes("ms")?1:1e3,u=g&&r&&"none"!==r?parseFloat(o)*a:0;return Number.isNaN(u)?0:u}function O(e){var n=getComputedStyle(e),r=n[i],o=n[t],a=o.includes("ms")?1:1e3,u=g&&r&&"none"!==r?parseFloat(o)*a:0;return Number.isNaN(u)?0:u}function T(e){var t=getComputedStyle(e),n=t[s],i=t[a],r=i.includes("ms")?1:1e3,o=y&&n&&"none"!==n?parseFloat(i)*r:0;return Number.isNaN(o)?0:o}function S(e){var t=getComputedStyle(e),n=t[s],i=t[o],r=i.includes("ms")?1:1e3,a=y&&n&&"none"!==n?parseFloat(i)*r:0;return Number.isNaN(a)?0:a}function z(e){return"true"===e||"false"!==e&&(Number.isNaN(+e)?""===e||"null"===e?null:e:+e)}return{ariaChecked:"aria-checked",ariaDescribedBy:"aria-describedby",ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",ariaModal:"aria-modal",ariaPressed:"aria-pressed",ariaSelected:"aria-selected",nativeEvents:["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointercancel","pointerdown","pointerleave","pointermove","pointerup","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"],abortEvent:"abort",blurEvent:"blur",moveEvent:"move",changeEvent:"change",errorEvent:"error",resetEvent:"reset",resizeEvent:"resize",scrollEvent:"scroll",submitEvent:"submit",loadEvent:"load",unloadEvent:"unload",readystatechangeEvent:"readystatechange",beforeunloadEvent:"beforeunload",orientationchangeEvent:"orientationchange",contextmenuEvent:"contextmenu",DOMContentLoadedEvent:"DOMContentLoaded",DOMMouseScrollEvent:"DOMMouseScroll",selectEvent:"select",selectendEvent:"selectend",selectstartEvent:"selectstart",mouseClickEvents:{down:"mousedown",up:"mouseup"},mouseclickEvent:"click",mousedblclickEvent:"dblclick",mousedownEvent:"mousedown",mouseupEvent:"mouseup",mouseHoverEvents:e,mouseenterEvent:"mouseenter",mouseleaveEvent:"mouseleave",mouseinEvent:"mousein",mouseoutEvent:"mouseout",mousewheelEvent:"mousewheel",mouseSwipeEvents:{start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"},touchEvents:{start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},touchstartEvent:"touchstart",touchmoveEvent:"touchmove",touchcancelEvent:"touchcancel",touchendEvent:"touchend",pointercancelEvent:"pointercancel",pointerdownEvent:"pointerdown",pointerleaveEvent:"pointerleave",pointermoveEvent:"pointermove",pointerupEvent:"pointerup",focusEvents:{in:"focusin",out:"focusout"},focusEvent:"focus",focusinEvent:"focusin",focusoutEvent:"focusout",gesturechangeEvent:"gesturechange",gestureendEvent:"gestureend",gesturestartEvent:"gesturestart",bezierEasings:{linear:"linear",easingSinusoidalIn:"cubic-bezier(0.47,0,0.745,0.715)",easingSinusoidalOut:"cubic-bezier(0.39,0.575,0.565,1)",easingSinusoidalInOut:"cubic-bezier(0.445,0.05,0.55,0.95)",easingQuadraticIn:"cubic-bezier(0.550,0.085,0.680,0.530)",easingQuadraticOut:"cubic-bezier(0.250,0.460,0.450,0.940)",easingQuadraticInOut:"cubic-bezier(0.455,0.030,0.515,0.955)",easingCubicIn:"cubic-bezier(0.55,0.055,0.675,0.19)",easingCubicOut:"cubic-bezier(0.215,0.61,0.355,1)",easingCubicInOut:"cubic-bezier(0.645,0.045,0.355,1)",easingQuarticIn:"cubic-bezier(0.895,0.03,0.685,0.22)",easingQuarticOut:"cubic-bezier(0.165,0.84,0.44,1)",easingQuarticInOut:"cubic-bezier(0.77,0,0.175,1)",easingQuinticIn:"cubic-bezier(0.755,0.05,0.855,0.06)",easingQuinticOut:"cubic-bezier(0.23,1,0.32,1)",easingQuinticInOut:"cubic-bezier(0.86,0,0.07,1)",easingExponentialIn:"cubic-bezier(0.95,0.05,0.795,0.035)",easingExponentialOut:"cubic-bezier(0.19,1,0.22,1)",easingExponentialInOut:"cubic-bezier(1,0,0,1)",easingCircularIn:"cubic-bezier(0.6,0.04,0.98,0.335)",easingCircularOut:"cubic-bezier(0.075,0.82,0.165,1)",easingCircularInOut:"cubic-bezier(0.785,0.135,0.15,0.86)",easingBackIn:"cubic-bezier(0.6,-0.28,0.735,0.045)",easingBackOut:"cubic-bezier(0.175,0.885,0.32,1.275)",easingBackInOut:"cubic-bezier(0.68,-0.55,0.265,1.55)"},animationDuration:t,animationDelay:n,animationName:i,animationEndEvent:r,transitionDuration:o,transitionDelay:a,transitionEndEvent:u,transitionProperty:s,isMobile:l,isApple:v,support3DTransform:f,supportPassive:b,supportTransform:E,supportTouch:p,supportAnimation:g,supportTransition:y,addEventListener:"addEventListener",removeEventListener:"removeEventListener",keyboardEventKeys:{Backspace:"Backspace",Tab:"Tab",Enter:"Enter",Shift:"Shift",Control:"Control",Alt:"Alt",Pause:"Pause",CapsLock:"CapsLock",Escape:"Escape",Scape:"Space",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Insert:"Insert",Delete:"Delete",Meta:"Meta",ContextMenu:"ContextMenu",ScrollLock:"ScrollLock"},keydownEvent:"keydown",keypressEvent:"keypress",keyupEvent:"keyup",keyAlt:"Alt",keyArrowDown:"ArrowDown",keyArrowLeft:"ArrowLeft",keyArrowRight:"ArrowRight",keyArrowUp:"ArrowUp",keyBackspace:"Backspace",keyCapsLock:"CapsLock",keyControl:"Control",keyDelete:"Delete",keyEnter:"Enter",keyEscape:"Escape",keyInsert:"Insert",keyMeta:"Meta",keyPause:"Pause",keyScrollLock:"ScrollLock",keyShift:"Shift",keySpace:"Space",keyTab:"Tab",offsetHeight:"offsetHeight",offsetWidth:"offsetWidth",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",addClass:function(e,t){e.classList.add(t)},removeClass:function(e,t){e.classList.remove(t)},hasClass:function(e,t){return e.classList.contains(t)},on:h,off:k,one:function(e,t,n,i){h(e,t,(function r(o){o.target===e&&(n.apply(e,[o]),k(e,t,r,i))}),i)},Data:C,getInstance:function(e,t){return C.get(e,t)},emulateAnimationEnd:function(e,t){var n=0,i=new Event(r),o=O(e),a=D(e);if(o){var u=function(i){i.target===e&&(t.apply(e,[i]),e.removeEventListener(r,u),n=1)};e.addEventListener(r,u),setTimeout((function(){n||e.dispatchEvent(i)}),o+a+17)}else t.apply(e,[i])},emulateTransitionEnd:function(e,t){var n=0,i=new Event(u),r=S(e),o=T(e);if(r){var a=function(i){i.target===e&&(t.apply(e,[i]),e.removeEventListener(u,a),n=1)};e.addEventListener(u,a),setTimeout((function(){n||e.dispatchEvent(i)}),r+o+17)}else t.apply(e,[i])},isElementInScrollRange:function(e){var t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;return t.top<=n&&t.bottom>=0},isElementInViewport:function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},passiveHandler:!!b&&{passive:!0},getElementAnimationDuration:O,getElementAnimationDelay:D,getElementTransitionDuration:S,getElementTransitionDelay:T,isArray:function(e){return Array.isArray(e)},isElement:w,isHTMLElement:function(e){return e instanceof HTMLElement},isNodeList:function(e){return e instanceof NodeList},isHTMLCollection:function(e){return e instanceof HTMLCollection},isElementsArray:function(e){return Array.isArray(e)&&e.every((function(e){return w(e)}))},isMedia:function(e){return[SVGElement,HTMLImageElement,HTMLVideoElement].some((function(t){return e instanceof t}))},isRTL:function(){return"rtl"===document.documentElement.dir},queryElement:function(e,t){return A(e,t)},querySelector:A,querySelectorAll:function(e,t){return(t&&w(t)?t:document).querySelectorAll(e)},getElementsByClassName:function(e,t){return(t&&w(t)?t:document).getElementsByClassName(e)},getElementsByTagName:function(e,t){return(t&&w(t)?t:document).getElementsByTagName(e)},normalizeValue:z,normalizeOptions:function(e,t,n,i){var r=Object.assign({},e.dataset),o={},a={};return Object.keys(r).forEach((function(e){var t=i&&e.includes(i)?e.replace(i,"").replace(/[A-Z]/,(function(e){return e.toLowerCase()})):e;a[t]=z(r[e])})),Object.keys(n).forEach((function(e){n[e]=z(n[e])})),Object.keys(t).forEach((function(e){o[e]=e in n?n[e]:e in a?a[e]:t[e]})),o},tryWrapper:function(e,t){try{e()}catch(e){throw TypeError(t+" "+e)}},reflow:function(e){return e.offsetHeight},ArrayFrom:function(e){return Array.from(e)},Float32ArrayFrom:function(e){var t=Array.from(e);return Float32Array.from(t)},Float64ArrayFrom:function(e){var t=Array.from(e);return Float64Array.from(t)},ObjectAssign:function(e,t){return Object.assign(e,t)},ObjectKeys:function(e){return Object.keys(e)},ObjectValues:function(e){return Object.values(e)},getElementStyle:function(e,t){var n=getComputedStyle(e);return t&&t in n?n[t]:n},getAttribute:function(e,t){return e.getAttribute(t)},setAttribute:function(e,t,n){return e.setAttribute(t,n)},removeAttribute:function(e,t){return e.removeAttribute(t)},Version:"0.2.20"}}));
{
"name": "shorter-js",
"version": "0.2.19",
"version": "0.2.20",
"description": "A small ES6+ library with various JavaScript tools useful for creating light libraries.",

@@ -5,0 +5,0 @@ "main": "dist/shorter-js.min.js",

@@ -134,6 +134,4 @@ // strings

import emulateTransitionEnd from './misc/emulateTransitionEnd';
import isElement from './misc/isElement';
import isElementInScrollRange from './misc/isElementInScrollRange';
import isElementInViewport from './misc/isElementInViewport';
import isHTMLElement from './misc/isHTMLElement';
import isMedia from './misc/isMedia';

@@ -146,3 +144,2 @@ import isRTL from './misc/isRTL';

import getElementTransitionDelay from './misc/getElementTransitionDelay';
import queryElement from './misc/queryElement';
import normalizeValue from './misc/normalizeValue';

@@ -161,2 +158,19 @@ import normalizeOptions from './misc/normalizeOptions';

import getAttribute from './misc/getAttribute';
import setAttribute from './misc/setAttribute';
import removeAttribute from './misc/removeAttribute';
import isArray from './misc/isArray';
import isElement from './misc/isElement';
import isHTMLElement from './misc/isHTMLElement';
import isHTMLCollection from './misc/isHTMLCollection';
import isNodeList from './misc/isNodeList';
import isElementsArray from './misc/isElementsArray';
import queryElement from './misc/queryElement';
import querySelector from './misc/querySelector';
import querySelectorAll from './misc/querySelectorAll';
import getElementsByTagName from './misc/getElementsByTagName';
import getElementsByClassName from './misc/getElementsByClassName';
import Version from './misc/version';

@@ -286,7 +300,15 @@

getElementTransitionDelay,
isArray,
isElement,
isHTMLElement,
isNodeList,
isHTMLCollection,
isElementsArray,
isMedia,
isRTL,
queryElement,
querySelector,
querySelectorAll,
getElementsByClassName,
getElementsByTagName,
normalizeValue,

@@ -303,2 +325,5 @@ normalizeOptions,

getElementStyle,
getAttribute,
setAttribute,
removeAttribute,
Version,

@@ -305,0 +330,0 @@ };

/**
* Shortcut for `Array.from()` static method.
* @param {any[]} arr iterable object value
*
* @param {any[] | HTMLCollection | NodeList} arr array-like iterable object
* @returns {Array}

@@ -5,0 +6,0 @@ */

@@ -1,2 +0,2 @@

import queryElement from './queryElement';
import querySelector from './querySelector';
import isElement from './isElement';

@@ -17,3 +17,3 @@

set: (element, component, instance) => {
const ELEMENT = queryElement(element);
const ELEMENT = querySelector(element);
if (!isElement(ELEMENT)) return;

@@ -48,3 +48,3 @@

get: (element, component) => {
const ELEMENT = queryElement(element);
const ELEMENT = querySelector(element);

@@ -51,0 +51,0 @@ const allForC = Data.getAllFor(component);

/**
* Shortcut for `Float32Array.from()` static method.
* @param {any[]} arr iterable object value
* @param {any[] | HTMLCollection | NodeList} arr array-like iterable object
* @returns {Float32Array}
*/
const Float32ArrayFrom = (arr) => Float32Array.from(arr);
const Float32ArrayFrom = (arr) => {
const array = Array.from(arr);
return Float32Array.from(array);
};
export default Float32ArrayFrom;
/**
* Shortcut for `Float64Array.from()` static method.
* @param {any[]} arr iterable object value
* @param {any[] | HTMLCollection | NodeList} arr array-like iterable object
* @returns {Float64Array}
*/
const Float64ArrayFrom = (arr) => Float64Array.from(arr);
const Float64ArrayFrom = (arr) => {
const array = Array.from(arr);
return Float64Array.from(array);
};
export default Float64ArrayFrom;

@@ -1,2 +0,2 @@

import isElement from './isElement';
import querySelector from './querySelector';

@@ -7,2 +7,4 @@ /**

*
* @deprecated
*
* @param {Element | string} selector the input selector or target element

@@ -13,5 +15,3 @@ * @param {Element=} parent optional Element to look into

export default function queryElement(selector, parent) {
const lookUp = parent && isElement(parent) ? parent : document;
// @ts-ignore -- `isElement` is just as good
return isElement(selector) ? selector : lookUp.querySelector(selector);
return querySelector(selector, parent);
}

@@ -117,7 +117,4 @@ export as namespace SHORTER;

export { default as emulateTransitionEnd } from "shorter-js/src/misc/emulateTransitionEnd";
export { default as isElement } from "shorter-js/src/misc/isElement";
export { default as isElementInScrollRange } from "shorter-js/src/misc/isElementInScrollRange";
export { default as isElementInViewport } from "shorter-js/src/misc/isElementInViewport";
export { default as isHTMLElement } from "shorter-js/src/misc/isHTMLElement";
export { default as isMedia } from "shorter-js/src/misc/isMedia";
export { default as isRTL } from "shorter-js/src/misc/isRTL";

@@ -129,3 +126,2 @@ export { default as passiveHandler } from "shorter-js/src/misc/passiveHandler";

export { default as getElementTransitionDelay } from "shorter-js/src/misc/getElementTransitionDelay";
export { default as queryElement } from "shorter-js/src/misc/queryElement";
export { default as normalizeValue } from "shorter-js/src/misc/normalizeValue";

@@ -142,2 +138,17 @@ export { default as normalizeOptions } from "shorter-js/src/misc/normalizeOptions";

export { default as getElementStyle } from "shorter-js/src/misc/getElementStyle";
export { default as getAttribute } from "shorter-js/src/misc/getAttribute";
export { default as setAttribute } from "shorter-js/src/misc/setAttribute";
export { default as removeAttribute } from "shorter-js/src/misc/removeAttribute";
export { default as isHTMLElement } from "shorter-js/src/misc/isHTMLElement";
export { default as isMedia } from "shorter-js/src/misc/isMedia";
export { default as isArray } from "shorter-js/src/misc/isArray";
export { default as isElement } from "shorter-js/src/misc/isElement";
export { default as isNodeList } from "shorter-js/src/misc/isNodeList";
export { default as isHTMLCollection } from "shorter-js/src/misc/isHTMLCollection";
export { default as isElementsArray } from "shorter-js/src/misc/isElementsArray";
export { default as queryElement } from "shorter-js/src/misc/queryElement";
export { default as querySelector } from "shorter-js/src/misc/querySelector";
export { default as querySelectorAll } from "shorter-js/src/misc/querySelectorAll";
export { default as getElementsByTagName } from "shorter-js/src/misc/getElementsByTagName";
export { default as getElementsByClassName } from "shorter-js/src/misc/getElementsByClassName";
export { default as Version } from "shorter-js/src/misc/version";

@@ -134,6 +134,4 @@ // strings

export { default as emulateTransitionEnd } from "../../src/misc/emulateTransitionEnd";
export { default as isElement } from "../../src/misc/isElement";
export { default as isElementInScrollRange } from "../../src/misc/isElementInScrollRange";
export { default as isElementInViewport } from "../../src/misc/isElementInViewport";
export { default as isHTMLElement } from "../../src/misc/isHTMLElement";
export { default as isMedia } from "../../src/misc/isMedia";

@@ -146,3 +144,2 @@ export { default as isRTL } from "../../src/misc/isRTL";

export { default as getElementTransitionDelay } from "../../src/misc/getElementTransitionDelay";
export { default as queryElement } from "../../src/misc/queryElement";
export { default as normalizeValue } from "../../src/misc/normalizeValue";

@@ -160,3 +157,19 @@ export { default as normalizeOptions } from "../../src/misc/normalizeOptions";

export { default as getElementStyle } from '../../src/misc/getElementStyle';
export { default as getAttribute } from '../../src/misc/getAttribute';
export { default as setAttribute } from '../../src/misc/setAttribute';
export { default as removeAttribute } from '../../src/misc/removeAttribute';
export { default as isHTMLElement } from "../../src/misc/isHTMLElement";
export { default as isArray } from "../../src/misc/isArray";
export { default as isElement } from "../../src/misc/isElement";
export { default as isNodeList } from "../../src/misc/isNodeList";
export { default as isHTMLCollection } from "../../src/misc/isHTMLCollection";
export { default as isElementsArray } from "../../src/misc/isElementsArray";
export { default as queryElement } from "../../src/misc/queryElement";
export { default as querySelector } from "../../src/misc/querySelector";
export { default as querySelectorAll } from "../../src/misc/querySelectorAll";
export { default as getElementsByTagName } from "../../src/misc/getElementsByTagName";
export { default as getElementsByClassName } from "../../src/misc/getElementsByClassName";
export { default as Version } from "../../src/misc/version";

@@ -908,3 +908,3 @@ declare module "shorter-js/src/strings/ariaChecked" {

}
declare module "shorter-js/src/misc/queryElement" {
declare module "shorter-js/src/misc/querySelector" {
/**

@@ -918,3 +918,3 @@ * Utility to check if target is typeof `Element`

*/
export default function queryElement(selector: Element | string, parent?: Element | undefined): Element | null;
export default function querySelector(selector: Element | string, parent?: Element | undefined): Element | null;
}

@@ -1011,11 +1011,2 @@ declare module "shorter-js/src/misc/data" {

}
declare module "shorter-js/src/misc/isHTMLElement" {
/**
* Checks if an element is an `HTMLElement`.
*
* @param {any} element the target object
* @returns {boolean} the query result
*/
export default function isHTMLElement(element: any): boolean;
}
declare module "shorter-js/src/misc/isMedia" {

@@ -1099,6 +1090,7 @@ /**

* Shortcut for `Array.from()` static method.
* @param {any[]} arr iterable object value
*
* @param {any[] | HTMLCollection | NodeList} arr array-like iterable object
* @returns {Array}
*/
function ArrayFrom(arr: any[]): any[];
function ArrayFrom(arr: any[] | HTMLCollection | NodeList): any[];
}

@@ -1109,6 +1101,6 @@ declare module "shorter-js/src/misc/Float32ArrayFrom" {

* Shortcut for `Float32Array.from()` static method.
* @param {any[]} arr iterable object value
* @param {any[] | HTMLCollection | NodeList} arr array-like iterable object
* @returns {Float32Array}
*/
function Float32ArrayFrom(arr: any[]): Float32Array;
function Float32ArrayFrom(arr: any[] | HTMLCollection | NodeList): Float32Array;
}

@@ -1119,6 +1111,6 @@ declare module "shorter-js/src/misc/Float64ArrayFrom" {

* Shortcut for `Float64Array.from()` static method.
* @param {any[]} arr iterable object value
* @param {any[] | HTMLCollection | NodeList} arr array-like iterable object
* @returns {Float64Array}
*/
function Float64ArrayFrom(arr: any[]): Float64Array;
function Float64ArrayFrom(arr: any[] | HTMLCollection | NodeList): Float64Array;
}

@@ -1167,2 +1159,119 @@ declare module "shorter-js/src/misc/ObjectKeys" {

}
declare module "shorter-js/src/misc/getAttribute" {
export default getAttribute;
/**
* Shortcut for `Element.getAttribute()` method.
* @param {Element} element target element
* @param {string} attribute attribute name
*/
function getAttribute(element: Element, attribute: string): string | null;
}
declare module "shorter-js/src/misc/setAttribute" {
export default setAttribute;
/**
* Shortcut for `Element.setAttribute()` method.
* @param {Element} element target element
* @param {string} attribute attribute name
* @param {string} value attribute value
*/
function setAttribute(element: Element, attribute: string, value: string): void;
}
declare module "shorter-js/src/misc/removeAttribute" {
export default removeAttribute;
/**
* Shortcut for `Element.removeAttribute()` method.
* @param {Element} element target element
* @param {string} attribute attribute name
*/
function removeAttribute(element: Element, attribute: string): void;
}
declare module "shorter-js/src/misc/isHTMLElement" {
/**
* Checks if an element is an `HTMLElement`.
*
* @param {any} element the target object
* @returns {boolean} the query result
*/
export default function isHTMLElement(element: any): boolean;
}
declare module "shorter-js/src/misc/isArray" {
export default isArray;
/**
* Shortcut for `Array.isArray()` static method.
*
* @param {any} arr array-like iterable object
* @returns {boolean} the query result
*/
function isArray(arr: any): boolean;
}
declare module "shorter-js/src/misc/isNodeList" {
/**
* Checks if an object is a `NodeList`.
*
* @param {any} object the target object
* @returns {boolean} the query result
*/
export default function isNodeList(object: any): boolean;
}
declare module "shorter-js/src/misc/isHTMLCollection" {
/**
* Checks if an object is an `HTMLCollection`.
*
* @param {any} object the target object
* @returns {boolean} the query result
*/
export default function isHTMLCollection(object: any): boolean;
}
declare module "shorter-js/src/misc/isElementsArray" {
/**
* Checks if an object is an `Array` in which all items are `Element`.
*
* @param {any} object the target object
* @returns {boolean} the query result
*/
export default function isElementsArray(object: any): boolean;
}
declare module "shorter-js/src/misc/queryElement" {
/**
* Utility to check if target is typeof `Element`
* or find one that matches a selector.
*
* @deprecated
*
* @param {Element | string} selector the input selector or target element
* @param {Element=} parent optional Element to look into
* @return {Element?} the Element or `querySelector` result
*/
export default function queryElement(selector: Element | string, parent?: Element | undefined): Element | null;
}
declare module "shorter-js/src/misc/querySelectorAll" {
/**
* A shortcut for `(document|Element).querySelectorAll`.
*
* @param {string} selector the input selector
* @param {ParentNode=} parent optional Element to look into
* @return {NodeList} the query result
*/
export default function querySelectorAll(selector: string, parent?: ParentNode | undefined): NodeList;
}
declare module "shorter-js/src/misc/getElementsByTagName" {
/**
* Shortcut for `Element.getElementsByTagName` method.
*
* @param {string} selector the tag name
* @param {Element=} parent optional Element to look into
* @return {HTMLCollection} the 'HTMLCollection'
*/
export default function getElementsByTagName(selector: string, parent?: Element | undefined): HTMLCollection;
}
declare module "shorter-js/src/misc/getElementsByClassName" {
/**
* Shortcut for `Element.getElementsByClassName` method.
*
* @param {string} selector the class name
* @param {Element=} parent optional Element to look into
* @return {HTMLCollection} the 'HTMLCollection'
*/
export default function getElementsByClassName(selector: string, parent?: Element | undefined): HTMLCollection;
}
declare module "shorter-js/src/misc/version" {

@@ -1290,7 +1399,4 @@ export default Version;

export { default as emulateTransitionEnd } from "shorter-js/src/misc/emulateTransitionEnd";
export { default as isElement } from "shorter-js/src/misc/isElement";
export { default as isElementInScrollRange } from "shorter-js/src/misc/isElementInScrollRange";
export { default as isElementInViewport } from "shorter-js/src/misc/isElementInViewport";
export { default as isHTMLElement } from "shorter-js/src/misc/isHTMLElement";
export { default as isMedia } from "shorter-js/src/misc/isMedia";
export { default as isRTL } from "shorter-js/src/misc/isRTL";

@@ -1302,3 +1408,2 @@ export { default as passiveHandler } from "shorter-js/src/misc/passiveHandler";

export { default as getElementTransitionDelay } from "shorter-js/src/misc/getElementTransitionDelay";
export { default as queryElement } from "shorter-js/src/misc/queryElement";
export { default as normalizeValue } from "shorter-js/src/misc/normalizeValue";

@@ -1315,3 +1420,18 @@ export { default as normalizeOptions } from "shorter-js/src/misc/normalizeOptions";

export { default as getElementStyle } from "shorter-js/src/misc/getElementStyle";
export { default as getAttribute } from "shorter-js/src/misc/getAttribute";
export { default as setAttribute } from "shorter-js/src/misc/setAttribute";
export { default as removeAttribute } from "shorter-js/src/misc/removeAttribute";
export { default as isHTMLElement } from "shorter-js/src/misc/isHTMLElement";
export { default as isArray } from "shorter-js/src/misc/isArray";
export { default as isMedia } from "shorter-js/src/misc/isMedia";
export { default as isElement } from "shorter-js/src/misc/isElement";
export { default as isNodeList } from "shorter-js/src/misc/isNodeList";
export { default as isHTMLCollection } from "shorter-js/src/misc/isHTMLCollection";
export { default as isElementsArray } from "shorter-js/src/misc/isElementsArray";
export { default as queryElement } from "shorter-js/src/misc/queryElement";
export { default as querySelector } from "shorter-js/src/misc/querySelector";
export { default as querySelectorAll } from "shorter-js/src/misc/querySelectorAll";
export { default as getElementsByTagName } from "shorter-js/src/misc/getElementsByTagName";
export { default as getElementsByClassName } from "shorter-js/src/misc/getElementsByClassName";
export { default as Version } from "shorter-js/src/misc/version";
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc