@thednp/shorty 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +340 -0
  3. package/dist/shorty.esm.js +2540 -0
  4. package/dist/shorty.esm.min.js +2 -0
  5. package/dist/shorty.js +2563 -0
  6. package/dist/shorty.min.js +2 -0
  7. package/package.json +59 -0
  8. package/src/attr/getAttribute.js +9 -0
  9. package/src/attr/getAttributeNS.js +10 -0
  10. package/src/attr/hasAttribute.js +9 -0
  11. package/src/attr/hasAttributeNS.js +10 -0
  12. package/src/attr/removeAttribute.js +9 -0
  13. package/src/attr/removeAttributeNS.js +10 -0
  14. package/src/attr/setAttribute.js +10 -0
  15. package/src/attr/setAttributeNS.js +11 -0
  16. package/src/blocks/documentBody.js +5 -0
  17. package/src/blocks/documentElement.js +5 -0
  18. package/src/blocks/documentHead.js +5 -0
  19. package/src/boolean/isApple.js +13 -0
  20. package/src/boolean/isFirefox.js +9 -0
  21. package/src/boolean/isMobile.js +20 -0
  22. package/src/boolean/support3DTransform.js +8 -0
  23. package/src/boolean/supportAnimation.js +8 -0
  24. package/src/boolean/supportPassive.js +28 -0
  25. package/src/boolean/supportTouch.js +6 -0
  26. package/src/boolean/supportTransform.js +8 -0
  27. package/src/boolean/supportTransition.js +8 -0
  28. package/src/class/addClass.js +10 -0
  29. package/src/class/hasClass.js +10 -0
  30. package/src/class/removeClass.js +10 -0
  31. package/src/event/off.js +13 -0
  32. package/src/event/on.js +13 -0
  33. package/src/event/one.js +26 -0
  34. package/src/get/getBoundingClientRect.js +33 -0
  35. package/src/get/getDocument.js +11 -0
  36. package/src/get/getDocumentBody.js +10 -0
  37. package/src/get/getDocumentElement.js +11 -0
  38. package/src/get/getDocumentHead.js +10 -0
  39. package/src/get/getElementAnimationDelay.js +21 -0
  40. package/src/get/getElementAnimationDelayLegacy.js +21 -0
  41. package/src/get/getElementAnimationDuration.js +20 -0
  42. package/src/get/getElementAnimationDurationLegacy.js +21 -0
  43. package/src/get/getElementStyle.js +18 -0
  44. package/src/get/getElementTransitionDelay.js +21 -0
  45. package/src/get/getElementTransitionDelayLegacy.js +21 -0
  46. package/src/get/getElementTransitionDuration.js +20 -0
  47. package/src/get/getElementTransitionDurationLegacy.js +21 -0
  48. package/src/get/getNodeScroll.js +16 -0
  49. package/src/get/getParentNode.js +24 -0
  50. package/src/get/getRectRelativeToOffsetParent.js +30 -0
  51. package/src/get/getUID.js +34 -0
  52. package/src/get/getWindow.js +20 -0
  53. package/src/index.js +475 -0
  54. package/src/is/isArray.js +9 -0
  55. package/src/is/isCustomElement.js +8 -0
  56. package/src/is/isDocument.js +9 -0
  57. package/src/is/isElement.js +9 -0
  58. package/src/is/isElementInScrollRange.js +18 -0
  59. package/src/is/isElementInViewport.js +22 -0
  60. package/src/is/isElementsArray.js +10 -0
  61. package/src/is/isFunction.js +9 -0
  62. package/src/is/isHTMLCollection.js +8 -0
  63. package/src/is/isHTMLElement.js +8 -0
  64. package/src/is/isHTMLImageElement.js +8 -0
  65. package/src/is/isMedia.js +12 -0
  66. package/src/is/isNode.js +8 -0
  67. package/src/is/isNodeList.js +8 -0
  68. package/src/is/isRTL.js +9 -0
  69. package/src/is/isSVGElement.js +8 -0
  70. package/src/is/isScaledElement.js +15 -0
  71. package/src/is/isShadowRoot.js +12 -0
  72. package/src/is/isString.js +8 -0
  73. package/src/is/isTableElement.js +7 -0
  74. package/src/is/isWindow.js +9 -0
  75. package/src/misc/ArrayFrom.js +8 -0
  76. package/src/misc/Float32ArrayFrom.js +7 -0
  77. package/src/misc/Float64ArrayFrom.js +7 -0
  78. package/src/misc/ObjectAssign.js +7 -0
  79. package/src/misc/ObjectKeys.js +7 -0
  80. package/src/misc/ObjectValues.js +7 -0
  81. package/src/misc/OriginalEvent.js +18 -0
  82. package/src/misc/createElement.js +25 -0
  83. package/src/misc/createElementNS.js +26 -0
  84. package/src/misc/data.js +78 -0
  85. package/src/misc/dispatchEvent.js +8 -0
  86. package/src/misc/distinct.js +10 -0
  87. package/src/misc/emulateAnimationEnd.js +37 -0
  88. package/src/misc/emulateAnimationEndLegacy.js +38 -0
  89. package/src/misc/emulateTransitionEnd.js +37 -0
  90. package/src/misc/emulateTransitionEndLegacy.js +38 -0
  91. package/src/misc/focus.js +8 -0
  92. package/src/misc/noop.js +3 -0
  93. package/src/misc/normalizeOptions.js +49 -0
  94. package/src/misc/normalizeValue.js +32 -0
  95. package/src/misc/passiveHandler.js +7 -0
  96. package/src/misc/passiveHandlerLegacy.js +9 -0
  97. package/src/misc/reflow.js +9 -0
  98. package/src/misc/setElementStyle.js +10 -0
  99. package/src/misc/timer.js +78 -0
  100. package/src/misc/toLowerCase.js +8 -0
  101. package/src/misc/toUpperCase.js +8 -0
  102. package/src/misc/tryWrapper.js +11 -0
  103. package/src/misc/version.js +9 -0
  104. package/src/selectors/closest.js +16 -0
  105. package/src/selectors/documentAll.js +8 -0
  106. package/src/selectors/elementNodes.js +5 -0
  107. package/src/selectors/getCustomElements.js +18 -0
  108. package/src/selectors/getElementById.js +11 -0
  109. package/src/selectors/getElementsByClassName.js +15 -0
  110. package/src/selectors/getElementsByTagName.js +15 -0
  111. package/src/selectors/matches.js +10 -0
  112. package/src/selectors/matchesLegacy.js +23 -0
  113. package/src/selectors/parentNodes.js +5 -0
  114. package/src/selectors/querySelector.js +15 -0
  115. package/src/selectors/querySelectorAll.js +14 -0
  116. package/src/strings/DOMContentLoadedEvent.js +6 -0
  117. package/src/strings/DOMMouseScrollEvent.js +6 -0
  118. package/src/strings/abortEvent.js +6 -0
  119. package/src/strings/addEventListener.js +6 -0
  120. package/src/strings/animationDelay.js +6 -0
  121. package/src/strings/animationDelayLegacy.js +8 -0
  122. package/src/strings/animationDuration.js +6 -0
  123. package/src/strings/animationDurationLegacy.js +8 -0
  124. package/src/strings/animationEndEvent.js +6 -0
  125. package/src/strings/animationEndEventLegacy.js +8 -0
  126. package/src/strings/animationName.js +6 -0
  127. package/src/strings/animationNameLegacy.js +8 -0
  128. package/src/strings/ariaChecked.js +6 -0
  129. package/src/strings/ariaDescribedBy.js +6 -0
  130. package/src/strings/ariaDescription.js +6 -0
  131. package/src/strings/ariaExpanded.js +6 -0
  132. package/src/strings/ariaHasPopup.js +6 -0
  133. package/src/strings/ariaHidden.js +6 -0
  134. package/src/strings/ariaLabel.js +6 -0
  135. package/src/strings/ariaLabelledBy.js +6 -0
  136. package/src/strings/ariaModal.js +6 -0
  137. package/src/strings/ariaPressed.js +6 -0
  138. package/src/strings/ariaSelected.js +6 -0
  139. package/src/strings/ariaValueMax.js +6 -0
  140. package/src/strings/ariaValueMin.js +6 -0
  141. package/src/strings/ariaValueNow.js +6 -0
  142. package/src/strings/ariaValueText.js +6 -0
  143. package/src/strings/beforeunloadEvent.js +6 -0
  144. package/src/strings/bezierEasings.js +33 -0
  145. package/src/strings/blurEvent.js +6 -0
  146. package/src/strings/changeEvent.js +6 -0
  147. package/src/strings/contextmenuEvent.js +6 -0
  148. package/src/strings/errorEvent.js +6 -0
  149. package/src/strings/focusEvent.js +6 -0
  150. package/src/strings/focusEvents.js +6 -0
  151. package/src/strings/focusinEvent.js +6 -0
  152. package/src/strings/focusoutEvent.js +6 -0
  153. package/src/strings/gesturechangeEvent.js +6 -0
  154. package/src/strings/gestureendEvent.js +6 -0
  155. package/src/strings/gesturestartEvent.js +6 -0
  156. package/src/strings/keyAlt.js +7 -0
  157. package/src/strings/keyArrowDown.js +7 -0
  158. package/src/strings/keyArrowLeft.js +7 -0
  159. package/src/strings/keyArrowRight.js +7 -0
  160. package/src/strings/keyArrowUp.js +7 -0
  161. package/src/strings/keyBackspace.js +7 -0
  162. package/src/strings/keyCapsLock.js +7 -0
  163. package/src/strings/keyControl.js +7 -0
  164. package/src/strings/keyDelete.js +7 -0
  165. package/src/strings/keyEnter.js +7 -0
  166. package/src/strings/keyEscape.js +7 -0
  167. package/src/strings/keyInsert.js +7 -0
  168. package/src/strings/keyMeta.js +7 -0
  169. package/src/strings/keyPause.js +7 -0
  170. package/src/strings/keyScrollLock.js +7 -0
  171. package/src/strings/keyShift.js +7 -0
  172. package/src/strings/keySpace.js +7 -0
  173. package/src/strings/keyTab.js +7 -0
  174. package/src/strings/keyboardEventKeys.js +27 -0
  175. package/src/strings/keydownEvent.js +6 -0
  176. package/src/strings/keypressEvent.js +6 -0
  177. package/src/strings/keyupEvent.js +6 -0
  178. package/src/strings/loadEvent.js +6 -0
  179. package/src/strings/loadstartEvent.js +6 -0
  180. package/src/strings/mouseClickEvents.js +6 -0
  181. package/src/strings/mouseHoverEvents.js +6 -0
  182. package/src/strings/mouseSwipeEvents.js +8 -0
  183. package/src/strings/mouseclickEvent.js +6 -0
  184. package/src/strings/mousedblclickEvent.js +6 -0
  185. package/src/strings/mousedownEvent.js +6 -0
  186. package/src/strings/mouseenterEvent.js +6 -0
  187. package/src/strings/mousehoverEvent.js +6 -0
  188. package/src/strings/mouseinEvent.js +6 -0
  189. package/src/strings/mouseleaveEvent.js +6 -0
  190. package/src/strings/mousemoveEvent.js +6 -0
  191. package/src/strings/mouseoutEvent.js +6 -0
  192. package/src/strings/mouseoverEvent.js +6 -0
  193. package/src/strings/mouseupEvent.js +6 -0
  194. package/src/strings/mousewheelEvent.js +6 -0
  195. package/src/strings/moveEvent.js +6 -0
  196. package/src/strings/nativeEvents.js +108 -0
  197. package/src/strings/offsetHeight.js +6 -0
  198. package/src/strings/offsetWidth.js +6 -0
  199. package/src/strings/orientationchangeEvent.js +6 -0
  200. package/src/strings/pointercancelEvent.js +6 -0
  201. package/src/strings/pointerdownEvent.js +6 -0
  202. package/src/strings/pointerleaveEvent.js +6 -0
  203. package/src/strings/pointermoveEvent.js +6 -0
  204. package/src/strings/pointerupEvent.js +6 -0
  205. package/src/strings/readystatechangeEvent.js +6 -0
  206. package/src/strings/removeEventListener.js +6 -0
  207. package/src/strings/resetEvent.js +6 -0
  208. package/src/strings/resizeEvent.js +6 -0
  209. package/src/strings/scrollEvent.js +6 -0
  210. package/src/strings/scrollHeight.js +6 -0
  211. package/src/strings/scrollWidth.js +6 -0
  212. package/src/strings/selectEvent.js +6 -0
  213. package/src/strings/selectendEvent.js +6 -0
  214. package/src/strings/selectstartEvent.js +6 -0
  215. package/src/strings/submitEvent.js +6 -0
  216. package/src/strings/touchEvents.js +8 -0
  217. package/src/strings/touchcancelEvent.js +6 -0
  218. package/src/strings/touchendEvent.js +6 -0
  219. package/src/strings/touchmoveEvent.js +6 -0
  220. package/src/strings/touchstartEvent.js +6 -0
  221. package/src/strings/transitionDelay.js +6 -0
  222. package/src/strings/transitionDelayLegacy.js +8 -0
  223. package/src/strings/transitionDuration.js +6 -0
  224. package/src/strings/transitionDurationLegacy.js +8 -0
  225. package/src/strings/transitionEndEvent.js +6 -0
  226. package/src/strings/transitionEndEventLegacy.js +8 -0
  227. package/src/strings/transitionProperty.js +7 -0
  228. package/src/strings/transitionPropertyLegacy.js +12 -0
  229. package/src/strings/unloadEvent.js +6 -0
  230. package/src/strings/userAgent.js +7 -0
  231. package/src/strings/userAgentData.js +8 -0
  232. package/types/index.d.ts +252 -0
  233. package/types/module/shorty.ts +249 -0
  234. package/types/shorty.d.ts +2317 -0
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Utility to wrap a callback in a try() catch(e)
3
+ *
4
+ * @param {Function} fn callback
5
+ * @param {string} origin callback context description
6
+ */
7
+ export default function tryWrapper(fn, origin) {
8
+ try { fn(); } catch (e) {
9
+ throw TypeError(`${origin} ${e}`);
10
+ }
11
+ }
@@ -0,0 +1,9 @@
1
+ // @ts-ignore
2
+ import { version } from '../../package.json';
3
+
4
+ /**
5
+ * A global namespace for library version.
6
+ * @type {string}
7
+ */
8
+ const Version = version;
9
+ export default Version;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Shortcut for `HTMLElement.closest` method which also works
3
+ * with children of `ShadowRoot`. The order of the parameters
4
+ * is intentional since they're both required.
5
+ *
6
+ * @see https://stackoverflow.com/q/54520554/803358
7
+ *
8
+ * @param {HTMLElement | Element} element Element to look into
9
+ * @param {string} selector the selector name
10
+ * @return {(HTMLElement | Element)?} the query result
11
+ */
12
+ export default function closest(element, selector) {
13
+ return element ? (element.closest(selector)
14
+ // @ts-ignore -- break out of `ShadowRoot`
15
+ || closest(element.getRootNode().host, selector)) : null;
16
+ }
@@ -0,0 +1,8 @@
1
+ import getElementsByTagName from './getElementsByTagName';
2
+
3
+ /**
4
+ * An `HTMLCollection` with all document elements,
5
+ * which is the equivalent of `document.all`.
6
+ */
7
+ const documentAll = getElementsByTagName('*');
8
+ export default documentAll;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A global array with `Element` | `HTMLElement`.
3
+ */
4
+ const elementNodes = [Element, HTMLElement];
5
+ export default elementNodes;
@@ -0,0 +1,18 @@
1
+ import documentAll from './documentAll';
2
+ import isCustomElement from '../is/isCustomElement';
3
+ import parentNodes from './parentNodes';
4
+ import getElementsByTagName from './getElementsByTagName';
5
+
6
+ /**
7
+ * Returns an `Array` of `Node` elements that are registered as
8
+ * `CustomElement`.
9
+ * @see https://stackoverflow.com/questions/27334365/how-to-get-list-of-registered-custom-elements
10
+ *
11
+ * @param {(HTMLElement | Element | Node | Document)=} parent parent to look into
12
+ * @returns {Array<HTMLElement | Element>} the query result
13
+ */
14
+ export default function getCustomElements(parent) {
15
+ const collection = parent && parentNodes.some((x) => parent instanceof x)
16
+ ? getElementsByTagName('*', parent) : documentAll;
17
+ return [...collection].filter(isCustomElement);
18
+ }
@@ -0,0 +1,11 @@
1
+ import getDocument from '../get/getDocument';
2
+
3
+ /**
4
+ * Returns an `Element` that matches the id in the document.
5
+ *
6
+ * @param {string} id
7
+ * @returns {(HTMLElement | Element)?}
8
+ */
9
+ export default function getElementById(id) {
10
+ return getDocument().getElementById(id);
11
+ }
@@ -0,0 +1,15 @@
1
+ import getDocument from '../get/getDocument';
2
+
3
+ /**
4
+ * Shortcut for `HTMLElement.getElementsByClassName` method. Some `Node` elements
5
+ * like `ShadowRoot` do not support `getElementsByClassName`.
6
+ *
7
+ * @param {string} selector the class name
8
+ * @param {(HTMLElement | Element | Document)=} parent optional Element to look into
9
+ * @return {HTMLCollectionOf<HTMLElement | Element>} the 'HTMLCollection'
10
+ */
11
+ export default function getElementsByClassName(selector, parent) {
12
+ const method = 'getElementsByClassName';
13
+ const lookUp = parent && parent[method] ? parent : getDocument();
14
+ return lookUp[method](selector);
15
+ }
@@ -0,0 +1,15 @@
1
+ import getDocument from '../get/getDocument';
2
+
3
+ /**
4
+ * Shortcut for `HTMLElement.getElementsByTagName` method. Some `Node` elements
5
+ * like `ShadowRoot` do not support `getElementsByTagName`.
6
+ *
7
+ * @param {string} selector the tag name
8
+ * @param {(HTMLElement | Element | Document)=} parent optional Element to look into
9
+ * @return {HTMLCollectionOf<HTMLElement | Element>} the 'HTMLCollection'
10
+ */
11
+ export default function getElementsByTagName(selector, parent) {
12
+ const method = 'getElementsByTagName';
13
+ const lookUp = parent && parent[method] ? parent : getDocument();
14
+ return lookUp[method](selector);
15
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Check if element matches a CSS selector.
3
+ *
4
+ * @param {HTMLElement | Element} target
5
+ * @param {string} selector
6
+ * @returns {boolean}
7
+ */
8
+ export default function matches(target, selector) {
9
+ return target.matches(selector);
10
+ }
@@ -0,0 +1,23 @@
1
+ // @ts-nocheck
2
+ const ElementProto = Element.prototype;
3
+ const matchesFn = ElementProto.matches
4
+ || ElementProto.matchesSelector
5
+ || ElementProto.webkitMatchesSelector
6
+ || ElementProto.mozMatchesSelector
7
+ || ElementProto.msMatchesSelector
8
+ || ElementProto.oMatchesSelector
9
+ || function matchesNotSupported() {
10
+ return false;
11
+ };
12
+
13
+ /**
14
+ * Check if element matches a CSS selector,
15
+ * supporting a range of legacy browsers.
16
+ *
17
+ * @param {HTMLElement | Element} target
18
+ * @param {string} selector
19
+ * @returns {boolean}
20
+ */
21
+ export default function matches(target, selector) {
22
+ return matchesFn.call(target, selector);
23
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A global array of possible `ParentNode`.
3
+ */
4
+ const parentNodes = [Document, Element, HTMLElement];
5
+ export default parentNodes;
@@ -0,0 +1,15 @@
1
+ import getDocument from '../get/getDocument';
2
+
3
+ /**
4
+ * Utility to check if target is typeof `HTMLElement`, `Element`, `Node`
5
+ * or find one that matches a selector.
6
+ *
7
+ * @param {HTMLElement | Element | string} selector the input selector or target element
8
+ * @param {(HTMLElement | Element | Document)=} parent optional node to look into
9
+ * @return {(HTMLElement | Element)?} the `HTMLElement` or `querySelector` result
10
+ */
11
+ export default function querySelector(selector, parent) {
12
+ const method = 'querySelector';
13
+ const lookUp = parent && parent[method] ? parent : getDocument();
14
+ return selector[method] ? selector : lookUp[method](selector);
15
+ }
@@ -0,0 +1,14 @@
1
+ import getDocument from '../get/getDocument';
2
+
3
+ /**
4
+ * A shortcut for `(document|Element).querySelectorAll`.
5
+ *
6
+ * @param {string} selector the input selector
7
+ * @param {(HTMLElement | Element | Document | Node)=} parent optional node to look into
8
+ * @return {NodeListOf<HTMLElement | Element>} the query result
9
+ */
10
+ export default function querySelectorAll(selector, parent) {
11
+ const method = 'querySelectorAll';
12
+ const lookUp = parent && parent[method] ? parent : getDocument();
13
+ return lookUp[method](selector);
14
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for `DOMContentLoaded` event.
3
+ * @type {string}
4
+ */
5
+ const DOMContentLoadedEvent = 'DOMContentLoaded';
6
+ export default DOMContentLoadedEvent;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for `DOMMouseScroll` event.
3
+ * @type {string}
4
+ */
5
+ const DOMMouseScrollEvent = 'DOMMouseScroll';
6
+ export default DOMMouseScrollEvent;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for `abort` event.
3
+ * @type {string}
4
+ */
5
+ const abortEvent = 'abort';
6
+ export default abortEvent;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for 'addEventListener' string.
3
+ * @type {string}
4
+ */
5
+ const addEventListener = 'addEventListener';
6
+ export default addEventListener;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for 'animationDelay' string.
3
+ * @type {string}
4
+ */
5
+ const animationDelay = 'animationDelay';
6
+ export default animationDelay;
@@ -0,0 +1,8 @@
1
+ import documentHead from '../blocks/documentHead';
2
+
3
+ /**
4
+ * A global namespace for 'animationDelay' string.
5
+ * @type {string}
6
+ */
7
+ const animationDelay = 'webkitAnimation' in documentHead.style ? 'webkitAnimationDelay' : 'animationDelay';
8
+ export default animationDelay;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for 'animationDuration' string.
3
+ * @type {string}
4
+ */
5
+ const animationDuration = 'animationDuration';
6
+ export default animationDuration;
@@ -0,0 +1,8 @@
1
+ import documentHead from '../blocks/documentHead';
2
+
3
+ /**
4
+ * A global namespace for 'animationDuration' string.
5
+ * @type {string}
6
+ */
7
+ const animationDuration = 'webkitAnimation' in documentHead.style ? 'webkitAnimationDuration' : 'animationDuration';
8
+ export default animationDuration;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for 'animationend' string.
3
+ * @type {string}
4
+ */
5
+ const animationEndEvent = 'animationend';
6
+ export default animationEndEvent;
@@ -0,0 +1,8 @@
1
+ import documentHead from '../blocks/documentHead';
2
+
3
+ /**
4
+ * A global namespace for 'animationend' string.
5
+ * @type {string}
6
+ */
7
+ const animationEndEvent = 'webkitAnimation' in documentHead.style ? 'webkitAnimationEnd' : 'animationend';
8
+ export default animationEndEvent;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for 'animationName' string.
3
+ * @type {string}
4
+ */
5
+ const animationName = 'animationName';
6
+ export default animationName;
@@ -0,0 +1,8 @@
1
+ import documentHead from '../blocks/documentHead';
2
+
3
+ /**
4
+ * A global namespace for 'animationName' string.
5
+ * @type {string}
6
+ */
7
+ const animationName = 'webkitAnimation' in documentHead.style ? 'webkitAnimationName' : 'animationName';
8
+ export default animationName;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for aria-checked.
3
+ * @type {string}
4
+ */
5
+ const ariaChecked = 'aria-checked';
6
+ export default ariaChecked;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for aria-describedby.
3
+ * @type {string}
4
+ */
5
+ const ariaDescribedBy = 'aria-describedby';
6
+ export default ariaDescribedBy;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for aria-description.
3
+ * @type {string}
4
+ */
5
+ const ariaDescription = 'aria-description';
6
+ export default ariaDescription;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for aria-expanded.
3
+ * @type {string}
4
+ */
5
+ const ariaExpanded = 'aria-expanded';
6
+ export default ariaExpanded;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for aria-haspopup.
3
+ * @type {string}
4
+ */
5
+ const ariaHasPopup = 'aria-haspopup';
6
+ export default ariaHasPopup;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for aria-hidden.
3
+ * @type {string}
4
+ */
5
+ const ariaHidden = 'aria-hidden';
6
+ export default ariaHidden;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for aria-label.
3
+ * @type {string}
4
+ */
5
+ const ariaLabel = 'aria-label';
6
+ export default ariaLabel;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for aria-labelledby.
3
+ * @type {string}
4
+ */
5
+ const ariaLabelledBy = 'aria-labelledby';
6
+ export default ariaLabelledBy;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for aria-modal.
3
+ * @type {string}
4
+ */
5
+ const ariaModal = 'aria-modal';
6
+ export default ariaModal;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for aria-pressed.
3
+ * @type {string}
4
+ */
5
+ const ariaPressed = 'aria-pressed';
6
+ export default ariaPressed;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for aria-selected.
3
+ * @type {string}
4
+ */
5
+ const ariaSelected = 'aria-selected';
6
+ export default ariaSelected;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for aria-valuemax.
3
+ * @type {string}
4
+ */
5
+ const ariaValueMax = 'aria-valuemax';
6
+ export default ariaValueMax;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for aria-valuemin.
3
+ * @type {string}
4
+ */
5
+ const ariaValueMin = 'aria-valuemin';
6
+ export default ariaValueMin;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for aria-valuenow.
3
+ * @type {string}
4
+ */
5
+ const ariaValueNow = 'aria-valuenow';
6
+ export default ariaValueNow;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for aria-valuetext.
3
+ * @type {string}
4
+ */
5
+ const ariaValueText = 'aria-valuetext';
6
+ export default ariaValueText;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for `beforeunload` event.
3
+ * @type {string}
4
+ */
5
+ const beforeunloadEvent = 'beforeunload';
6
+ export default beforeunloadEvent;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * A global namespace for predefined
3
+ * CSS3 'cubic-bezier()' easing functions.
4
+ * @type {Record<string, string>}
5
+ */
6
+ const bezierEasings = {
7
+ linear: 'linear',
8
+ easingSinusoidalIn: 'cubic-bezier(0.47,0,0.745,0.715)',
9
+ easingSinusoidalOut: 'cubic-bezier(0.39,0.575,0.565,1)',
10
+ easingSinusoidalInOut: 'cubic-bezier(0.445,0.05,0.55,0.95)',
11
+ easingQuadraticIn: 'cubic-bezier(0.550,0.085,0.680,0.530)',
12
+ easingQuadraticOut: 'cubic-bezier(0.250,0.460,0.450,0.940)',
13
+ easingQuadraticInOut: 'cubic-bezier(0.455,0.030,0.515,0.955)',
14
+ easingCubicIn: 'cubic-bezier(0.55,0.055,0.675,0.19)',
15
+ easingCubicOut: 'cubic-bezier(0.215,0.61,0.355,1)',
16
+ easingCubicInOut: 'cubic-bezier(0.645,0.045,0.355,1)',
17
+ easingQuarticIn: 'cubic-bezier(0.895,0.03,0.685,0.22)',
18
+ easingQuarticOut: 'cubic-bezier(0.165,0.84,0.44,1)',
19
+ easingQuarticInOut: 'cubic-bezier(0.77,0,0.175,1)',
20
+ easingQuinticIn: 'cubic-bezier(0.755,0.05,0.855,0.06)',
21
+ easingQuinticOut: 'cubic-bezier(0.23,1,0.32,1)',
22
+ easingQuinticInOut: 'cubic-bezier(0.86,0,0.07,1)',
23
+ easingExponentialIn: 'cubic-bezier(0.95,0.05,0.795,0.035)',
24
+ easingExponentialOut: 'cubic-bezier(0.19,1,0.22,1)',
25
+ easingExponentialInOut: 'cubic-bezier(1,0,0,1)',
26
+ easingCircularIn: 'cubic-bezier(0.6,0.04,0.98,0.335)',
27
+ easingCircularOut: 'cubic-bezier(0.075,0.82,0.165,1)',
28
+ easingCircularInOut: 'cubic-bezier(0.785,0.135,0.15,0.86)',
29
+ easingBackIn: 'cubic-bezier(0.6,-0.28,0.735,0.045)',
30
+ easingBackOut: 'cubic-bezier(0.175,0.885,0.32,1.275)',
31
+ easingBackInOut: 'cubic-bezier(0.68,-0.55,0.265,1.55)',
32
+ };
33
+ export default bezierEasings;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for `blur` event.
3
+ * @type {string}
4
+ */
5
+ const blurEvent = 'blur';
6
+ export default blurEvent;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for `change` event.
3
+ * @type {string}
4
+ */
5
+ const changeEvent = 'change';
6
+ export default changeEvent;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for `contextmenu` event.
3
+ * @type {string}
4
+ */
5
+ const contextmenuEvent = 'contextmenu';
6
+ export default contextmenuEvent;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for `error` event.
3
+ * @type {string}
4
+ */
5
+ const errorEvent = 'error';
6
+ export default errorEvent;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for `focus` event.
3
+ * @type {string}
4
+ */
5
+ const focusEvent = 'focus';
6
+ export default focusEvent;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for focus event names.
3
+ * @type {{in: string, out: string}}
4
+ */
5
+ const focusEvents = { in: 'focusin', out: 'focusout' };
6
+ export default focusEvents;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for `focusin` event.
3
+ * @type {string}
4
+ */
5
+ const focusinEvent = 'focusin';
6
+ export default focusinEvent;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for `focusout` event.
3
+ * @type {string}
4
+ */
5
+ const focusoutEvent = 'focusout';
6
+ export default focusoutEvent;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for `gesturechange` event.
3
+ * @type {string}
4
+ */
5
+ const gesturechangeEvent = 'gesturechange';
6
+ export default gesturechangeEvent;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for `gestureend` event.
3
+ * @type {string}
4
+ */
5
+ const gestureendEvent = 'gestureend';
6
+ export default gestureendEvent;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A global namespace for `gesturestart` event.
3
+ * @type {string}
4
+ */
5
+ const gesturestartEvent = 'gesturestart';
6
+ export default gesturestartEvent;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * A global namespace for `Alt` key.
3
+ * @type {string} e.which = 18
4
+ */
5
+ const keyAlt = 'Alt';
6
+
7
+ export default keyAlt;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * A global namespace for `ArrowDown` key.
3
+ * @type {string} e.which = 40 equivalent
4
+ */
5
+ const keyArrowDown = 'ArrowDown';
6
+
7
+ export default keyArrowDown;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * A global namespace for `ArrowLeft` key.
3
+ * @type {string} e.which = 37 equivalent
4
+ */
5
+ const keyArrowLeft = 'ArrowLeft';
6
+
7
+ export default keyArrowLeft;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * A global namespace for `ArrowRight` key.
3
+ * @type {string} e.which = 39 equivalent
4
+ */
5
+ const keyArrowRight = 'ArrowRight';
6
+
7
+ export default keyArrowRight;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * A global namespace for `ArrowUp` key.
3
+ * @type {string} e.which = 38 equivalent
4
+ */
5
+ const keyArrowUp = 'ArrowUp';
6
+
7
+ export default keyArrowUp;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * A global namespace for `Backspace` key.
3
+ * @type {string} e.which === 8 equivalent
4
+ */
5
+ const keyBackspace = 'Backspace';
6
+
7
+ export default keyBackspace;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * A global namespace for `CapsLock` key.
3
+ * @type {string} e.which = 20 equivalent
4
+ */
5
+ const keyCapsLock = 'CapsLock';
6
+
7
+ export default keyCapsLock;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * A global namespace for `Control` key.
3
+ * @type {string} e.which = 17
4
+ */
5
+ const keyControl = 'Control';
6
+
7
+ export default keyControl;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * A global namespace for `Delete` key.
3
+ * @type {string} e.which = 46 equivalent
4
+ */
5
+ const keyDelete = 'Delete';
6
+
7
+ export default keyDelete;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * A global namespace for `Enter` key.
3
+ * @type {string} e.which = 13 equivalent
4
+ */
5
+ const keyEnter = 'Enter';
6
+
7
+ export default keyEnter;