@thednp/shorty 2.0.0-alpha16 → 2.0.0-alpha18

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 (260) hide show
  1. package/.eslintrc.cjs +0 -0
  2. package/.lgtm.yml +0 -0
  3. package/.prettierrc.json +0 -0
  4. package/LICENSE +0 -0
  5. package/README.md +4 -4
  6. package/cypress/e2e/att.cy.ts +0 -0
  7. package/cypress/e2e/boolean.cy.ts +0 -0
  8. package/cypress/e2e/class.cy.ts +0 -0
  9. package/cypress/e2e/event.cy.ts +0 -0
  10. package/cypress/e2e/get.cy.ts +0 -0
  11. package/cypress/e2e/is.cy.ts +0 -0
  12. package/cypress/e2e/misc.cy.ts +0 -0
  13. package/cypress/e2e/selectors.cy.ts +0 -0
  14. package/cypress/fixtures/custom-elem.js +0 -0
  15. package/cypress/plugins/esbuild-istanbul.ts +0 -0
  16. package/cypress/plugins/tsCompile.ts +0 -0
  17. package/cypress/support/commands.ts +0 -0
  18. package/cypress/support/e2e.ts +0 -0
  19. package/cypress/support/index.js +0 -0
  20. package/cypress/test.html +0 -0
  21. package/cypress.config.ts +0 -0
  22. package/dist/shorty.cjs +1 -1
  23. package/dist/shorty.cjs.map +1 -1
  24. package/dist/shorty.d.ts +200 -4
  25. package/dist/shorty.js +1 -1
  26. package/dist/shorty.js.map +1 -1
  27. package/dist/shorty.mjs +191 -179
  28. package/dist/shorty.mjs.map +1 -1
  29. package/dts.config.ts +0 -0
  30. package/package.json +71 -66
  31. package/src/attr/getAttribute.ts +0 -0
  32. package/src/attr/getAttributeNS.ts +0 -0
  33. package/src/attr/hasAttribute.ts +0 -0
  34. package/src/attr/hasAttributeNS.ts +0 -0
  35. package/src/attr/removeAttribute.ts +0 -0
  36. package/src/attr/removeAttributeNS.ts +0 -0
  37. package/src/attr/setAttribute.ts +0 -0
  38. package/src/attr/setAttributeNS.ts +0 -0
  39. package/src/blocks/documentBody.ts +0 -0
  40. package/src/blocks/documentElement.ts +0 -0
  41. package/src/blocks/documentHead.ts +0 -0
  42. package/src/boolean/isApple.ts +0 -0
  43. package/src/boolean/isFirefox.ts +0 -0
  44. package/src/boolean/isMobile.ts +0 -0
  45. package/src/boolean/support3DTransform.ts +0 -0
  46. package/src/boolean/supportAnimation.ts +0 -0
  47. package/src/boolean/supportPassive.ts +0 -0
  48. package/src/boolean/supportTouch.ts +0 -0
  49. package/src/boolean/supportTransform.ts +0 -0
  50. package/src/boolean/supportTransition.ts +0 -0
  51. package/src/class/addClass.ts +0 -0
  52. package/src/class/hasClass.ts +0 -0
  53. package/src/class/removeClass.ts +0 -0
  54. package/src/event/off.ts +6 -4
  55. package/src/event/on.ts +6 -4
  56. package/src/event/one.ts +26 -8
  57. package/src/get/getBoundingClientRect.ts +0 -0
  58. package/src/get/getDocument.ts +0 -0
  59. package/src/get/getDocumentBody.ts +0 -0
  60. package/src/get/getDocumentElement.ts +0 -0
  61. package/src/get/getDocumentHead.ts +0 -0
  62. package/src/get/getElementAnimationDelay.ts +0 -0
  63. package/src/get/getElementAnimationDuration.ts +0 -0
  64. package/src/get/getElementStyle.ts +0 -0
  65. package/src/get/getElementTransitionDelay.ts +0 -0
  66. package/src/get/getElementTransitionDuration.ts +0 -0
  67. package/src/get/getNodeScroll.ts +0 -0
  68. package/src/get/getParentNode.ts +0 -0
  69. package/src/get/getRectRelativeToOffsetParent.ts +0 -0
  70. package/src/get/getUID.ts +0 -0
  71. package/src/get/getWindow.ts +0 -0
  72. package/src/index.ts +4 -0
  73. package/src/interface/boundingClientRect.d.ts +0 -0
  74. package/src/interface/css4Declaration.d.ts +0 -0
  75. package/src/interface/customElement.d.ts +0 -0
  76. package/src/interface/event.d.ts +337 -0
  77. package/src/interface/navigatorUA.d.ts +0 -0
  78. package/src/interface/offsetRect.d.ts +0 -0
  79. package/src/interface/originalEvent.d.ts +0 -0
  80. package/src/is/isArray.ts +0 -0
  81. package/src/is/isCanvas.ts +0 -0
  82. package/src/is/isCustomElement.ts +0 -0
  83. package/src/is/isDocument.ts +0 -0
  84. package/src/is/isElement.ts +0 -0
  85. package/src/is/isElementInScrollRange.ts +0 -0
  86. package/src/is/isElementInViewport.ts +0 -0
  87. package/src/is/isElementsArray.ts +0 -0
  88. package/src/is/isFunction.ts +0 -0
  89. package/src/is/isHTMLCollection.ts +0 -0
  90. package/src/is/isHTMLElement.ts +0 -0
  91. package/src/is/isHTMLImageElement.ts +0 -0
  92. package/src/is/isJSON.ts +0 -0
  93. package/src/is/isMap.ts +0 -0
  94. package/src/is/isMedia.ts +0 -0
  95. package/src/is/isNode.ts +0 -0
  96. package/src/is/isNodeList.ts +0 -0
  97. package/src/is/isNumber.ts +0 -0
  98. package/src/is/isObject.ts +0 -0
  99. package/src/is/isRTL.ts +0 -0
  100. package/src/is/isSVGElement.ts +0 -0
  101. package/src/is/isScaledElement.ts +0 -0
  102. package/src/is/isShadowRoot.ts +0 -0
  103. package/src/is/isString.ts +0 -0
  104. package/src/is/isTableElement.ts +0 -0
  105. package/src/is/isWeakMap.ts +0 -0
  106. package/src/is/isWindow.ts +0 -0
  107. package/src/misc/ArrayFrom.ts +0 -0
  108. package/src/misc/Float32ArrayFrom.ts +0 -0
  109. package/src/misc/Float64ArrayFrom.ts +0 -0
  110. package/src/misc/ObjectAssign.ts +0 -0
  111. package/src/misc/ObjectEntries.ts +0 -0
  112. package/src/misc/ObjectFromEntries.ts +11 -0
  113. package/src/misc/ObjectHasOwn.ts +0 -0
  114. package/src/misc/ObjectKeys.ts +0 -0
  115. package/src/misc/ObjectValues.ts +0 -0
  116. package/src/misc/createCustomEvent.ts +0 -0
  117. package/src/misc/createElement.ts +0 -0
  118. package/src/misc/createElementNS.ts +0 -0
  119. package/src/misc/data.ts +0 -0
  120. package/src/misc/dispatchEvent.ts +0 -0
  121. package/src/misc/distinct.ts +0 -0
  122. package/src/misc/emulateAnimationEnd.ts +0 -0
  123. package/src/misc/emulateTransitionEnd.ts +0 -0
  124. package/src/misc/focus.ts +0 -0
  125. package/src/misc/getInstance.ts +0 -0
  126. package/src/misc/noop.ts +0 -0
  127. package/src/misc/normalizeOptions.ts +0 -0
  128. package/src/misc/normalizeValue.ts +0 -0
  129. package/src/misc/passiveHandler.ts +0 -0
  130. package/src/misc/reflow.ts +0 -0
  131. package/src/misc/setElementStyle.ts +0 -0
  132. package/src/misc/timer.ts +0 -0
  133. package/src/misc/toLowerCase.ts +0 -0
  134. package/src/misc/toUpperCase.ts +0 -0
  135. package/src/selectors/closest.ts +0 -0
  136. package/src/selectors/getCustomElements.ts +0 -0
  137. package/src/selectors/getElementById.ts +0 -0
  138. package/src/selectors/getElementsByClassName.ts +0 -0
  139. package/src/selectors/getElementsByTagName.ts +0 -0
  140. package/src/selectors/matches.ts +0 -0
  141. package/src/selectors/querySelector.ts +0 -0
  142. package/src/selectors/querySelectorAll.ts +0 -0
  143. package/src/strings/DOMContentLoadedEvent.ts +0 -0
  144. package/src/strings/DOMMouseScrollEvent.ts +0 -0
  145. package/src/strings/abortEvent.ts +0 -0
  146. package/src/strings/addEventListener.ts +0 -0
  147. package/src/strings/animationDelay.ts +0 -0
  148. package/src/strings/animationDuration.ts +0 -0
  149. package/src/strings/animationEndEvent.ts +0 -0
  150. package/src/strings/animationName.ts +0 -0
  151. package/src/strings/ariaChecked.ts +0 -0
  152. package/src/strings/ariaDescribedBy.ts +0 -0
  153. package/src/strings/ariaDescription.ts +0 -0
  154. package/src/strings/ariaExpanded.ts +0 -0
  155. package/src/strings/ariaHasPopup.ts +0 -0
  156. package/src/strings/ariaHidden.ts +0 -0
  157. package/src/strings/ariaLabel.ts +0 -0
  158. package/src/strings/ariaLabelledBy.ts +0 -0
  159. package/src/strings/ariaModal.ts +0 -0
  160. package/src/strings/ariaPressed.ts +0 -0
  161. package/src/strings/ariaSelected.ts +0 -0
  162. package/src/strings/ariaValueMax.ts +0 -0
  163. package/src/strings/ariaValueMin.ts +0 -0
  164. package/src/strings/ariaValueNow.ts +0 -0
  165. package/src/strings/ariaValueText.ts +0 -0
  166. package/src/strings/beforeunloadEvent.ts +0 -0
  167. package/src/strings/bezierEasings.ts +0 -0
  168. package/src/strings/blurEvent.ts +0 -0
  169. package/src/strings/changeEvent.ts +0 -0
  170. package/src/strings/contextmenuEvent.ts +0 -0
  171. package/src/strings/dragEvent.ts +0 -0
  172. package/src/strings/dragendEvent.ts +0 -0
  173. package/src/strings/dragenterEvent.ts +0 -0
  174. package/src/strings/dragleaveEvent.ts +0 -0
  175. package/src/strings/dragoverEvent.ts +0 -0
  176. package/src/strings/dragstartEvent.ts +0 -0
  177. package/src/strings/errorEvent.ts +0 -0
  178. package/src/strings/focusEvent.ts +0 -0
  179. package/src/strings/focusEvents.ts +0 -0
  180. package/src/strings/focusinEvent.ts +0 -0
  181. package/src/strings/focusoutEvent.ts +0 -0
  182. package/src/strings/gesturechangeEvent.ts +0 -0
  183. package/src/strings/gestureendEvent.ts +0 -0
  184. package/src/strings/gesturestartEvent.ts +0 -0
  185. package/src/strings/keyAlt.ts +0 -0
  186. package/src/strings/keyArrowDown.ts +0 -0
  187. package/src/strings/keyArrowLeft.ts +0 -0
  188. package/src/strings/keyArrowRight.ts +0 -0
  189. package/src/strings/keyArrowUp.ts +0 -0
  190. package/src/strings/keyBackspace.ts +0 -0
  191. package/src/strings/keyCapsLock.ts +0 -0
  192. package/src/strings/keyControl.ts +0 -0
  193. package/src/strings/keyDelete.ts +0 -0
  194. package/src/strings/keyEnter.ts +0 -0
  195. package/src/strings/keyEscape.ts +0 -0
  196. package/src/strings/keyInsert.ts +0 -0
  197. package/src/strings/keyMeta.ts +0 -0
  198. package/src/strings/keyNumpadEnter.ts +7 -0
  199. package/src/strings/keyPause.ts +0 -0
  200. package/src/strings/keyScrollLock.ts +0 -0
  201. package/src/strings/keyShift.ts +0 -0
  202. package/src/strings/keySpace.ts +0 -0
  203. package/src/strings/keyTab.ts +0 -0
  204. package/src/strings/keyboardEventKeys.ts +0 -0
  205. package/src/strings/keydownEvent.ts +0 -0
  206. package/src/strings/keypressEvent.ts +0 -0
  207. package/src/strings/keyupEvent.ts +0 -0
  208. package/src/strings/loadEvent.ts +0 -0
  209. package/src/strings/loadstartEvent.ts +0 -0
  210. package/src/strings/mouseClickEvents.ts +0 -0
  211. package/src/strings/mouseHoverEvents.ts +0 -0
  212. package/src/strings/mouseSwipeEvents.ts +0 -0
  213. package/src/strings/mouseclickEvent.ts +0 -0
  214. package/src/strings/mousedblclickEvent.ts +0 -0
  215. package/src/strings/mousedownEvent.ts +0 -0
  216. package/src/strings/mouseenterEvent.ts +0 -0
  217. package/src/strings/mousehoverEvent.ts +0 -0
  218. package/src/strings/mouseinEvent.ts +0 -0
  219. package/src/strings/mouseleaveEvent.ts +0 -0
  220. package/src/strings/mousemoveEvent.ts +0 -0
  221. package/src/strings/mouseoutEvent.ts +0 -0
  222. package/src/strings/mouseoverEvent.ts +0 -0
  223. package/src/strings/mouseupEvent.ts +0 -0
  224. package/src/strings/mousewheelEvent.ts +0 -0
  225. package/src/strings/moveEvent.ts +0 -0
  226. package/src/strings/nativeEvents.ts +0 -0
  227. package/src/strings/offsetHeight.ts +0 -0
  228. package/src/strings/offsetWidth.ts +0 -0
  229. package/src/strings/orientationchangeEvent.ts +0 -0
  230. package/src/strings/pointercancelEvent.ts +0 -0
  231. package/src/strings/pointerdownEvent.ts +0 -0
  232. package/src/strings/pointerleaveEvent.ts +0 -0
  233. package/src/strings/pointermoveEvent.ts +0 -0
  234. package/src/strings/pointerupEvent.ts +0 -0
  235. package/src/strings/readystatechangeEvent.ts +0 -0
  236. package/src/strings/removeEventListener.ts +0 -0
  237. package/src/strings/resetEvent.ts +0 -0
  238. package/src/strings/resizeEvent.ts +0 -0
  239. package/src/strings/scrollEvent.ts +0 -0
  240. package/src/strings/scrollHeight.ts +0 -0
  241. package/src/strings/scrollWidth.ts +0 -0
  242. package/src/strings/selectEvent.ts +0 -0
  243. package/src/strings/selectendEvent.ts +0 -0
  244. package/src/strings/selectstartEvent.ts +0 -0
  245. package/src/strings/submitEvent.ts +0 -0
  246. package/src/strings/tabindex.ts +0 -0
  247. package/src/strings/touchEvents.ts +0 -0
  248. package/src/strings/touchcancelEvent.ts +0 -0
  249. package/src/strings/touchendEvent.ts +0 -0
  250. package/src/strings/touchmoveEvent.ts +0 -0
  251. package/src/strings/touchstartEvent.ts +0 -0
  252. package/src/strings/transitionDelay.ts +0 -0
  253. package/src/strings/transitionDuration.ts +0 -0
  254. package/src/strings/transitionEndEvent.ts +0 -0
  255. package/src/strings/transitionProperty.ts +0 -0
  256. package/src/strings/unloadEvent.ts +0 -0
  257. package/src/strings/userAgent.ts +0 -0
  258. package/src/strings/userAgentData.ts +0 -0
  259. package/tsconfig.json +1 -1
  260. package/vite.config.ts +0 -0
@@ -0,0 +1,337 @@
1
+ /**
2
+ * Type definitions addapted from React 18.2
3
+ * Project: https://react.dev/
4
+ */
5
+
6
+ type NativeAnimationEvent = AnimationEvent;
7
+ type NativeClipboardEvent = ClipboardEvent;
8
+ type NativeCompositionEvent = CompositionEvent;
9
+ type NativeDragEvent = DragEvent;
10
+ type NativeFocusEvent = FocusEvent;
11
+ type NativeKeyboardEvent = KeyboardEvent;
12
+ type NativeMouseEvent = MouseEvent;
13
+ type NativeTouchEvent = TouchEvent;
14
+ type NativePointerEvent = PointerEvent;
15
+ type NativeTransitionEvent = TransitionEvent;
16
+ type NativeUIEvent = UIEvent;
17
+ type NativeWheelEvent = WheelEvent;
18
+
19
+ interface AbstractView {
20
+ styleMedia: StyleMedia;
21
+ document: Document;
22
+ }
23
+
24
+ //
25
+ // Event System
26
+ // ----------------------------------------------------------------------
27
+ // E = EventObject, C = e.currentTarget, T = e.target
28
+ interface BaseEvent<E = unknown, C = unknown, T = unknown> {
29
+ nativeEvent: Event & E;
30
+ currentTarget: C & EventTarget;
31
+ target: T & EventTarget;
32
+ bubbles: boolean;
33
+ cancelable: boolean;
34
+ defaultPrevented: boolean;
35
+ eventPhase: number;
36
+ isTrusted: boolean;
37
+ preventDefault(): void;
38
+ isDefaultPrevented(): boolean;
39
+ stopPropagation(): void;
40
+ isPropagationStopped(): boolean;
41
+ persist(): void;
42
+ timeStamp: number;
43
+ type: string & NativeEventTypes;
44
+ }
45
+
46
+ /**
47
+ * currentTarget - a reference to the element on which the event listener is registered.
48
+ *
49
+ * target - a reference to the element from which the event was originally dispatched.
50
+ * This might be a child element to the element on which the event listener is registered.
51
+ * If you thought this should be `EventTarget & T`, see https://github.com/DefinitelyTyped/DefinitelyTyped/issues/11508#issuecomment-256045682
52
+ */
53
+ type NativeEvent<T = PossibleEventTarget, E = Event> = BaseEvent<E, EventTarget & T, EventTarget>;
54
+
55
+ interface ClipboardEvent<T = Element> extends NativeEvent<T, NativeClipboardEvent> {
56
+ clipboardData?: DataTransfer;
57
+ }
58
+
59
+ interface CompositionEvent<T = Element> extends NativeEvent<T, NativeCompositionEvent> {
60
+ data: string;
61
+ }
62
+
63
+ interface DragEvent<T = Element> extends MouseEvent<T, NativeDragEvent> {
64
+ dataTransfer: DataTransfer;
65
+ }
66
+
67
+ interface PointerEvent<T = Element> extends MouseEvent<T, NativePointerEvent> {
68
+ pointerId: number;
69
+ pressure: number;
70
+ tangentialPressure: number;
71
+ tiltX: number;
72
+ tiltY: number;
73
+ twist: number;
74
+ width: number;
75
+ height: number;
76
+ pointerType: 'mouse' | 'pen' | 'touch';
77
+ isPrimary: boolean;
78
+ }
79
+
80
+ interface FocusEvent<T = Element, R = Element> extends NativeEvent<T, NativeFocusEvent> {
81
+ relatedTarget: (EventTarget & R) | null;
82
+ target: EventTarget & T;
83
+ }
84
+
85
+ type FormControl = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
86
+ type FormEvent<T = FormControl> = NativeEvent<T>;
87
+
88
+ interface ChangeEvent<T = FormControl> extends FormEvent<T> {
89
+ target: EventTarget & T;
90
+ }
91
+
92
+ export type ModifierKey =
93
+ | 'Alt'
94
+ | 'AltGraph'
95
+ | 'CapsLock'
96
+ | 'Control'
97
+ | 'Fn'
98
+ | 'FnLock'
99
+ | 'Hyper'
100
+ | 'Meta'
101
+ | 'NumLock'
102
+ | 'ScrollLock'
103
+ | 'Shift'
104
+ | 'Super'
105
+ | 'Symbol'
106
+ | 'SymbolLock';
107
+
108
+ interface KeyboardEvent<T = Element> extends UIEvent<T, NativeKeyboardEvent> {
109
+ altKey: boolean;
110
+ /** @deprecated */
111
+ charCode: number;
112
+ ctrlKey: boolean;
113
+ code: string;
114
+ /**
115
+ * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method.
116
+ */
117
+ getModifierState(key: ModifierKey): boolean;
118
+ /**
119
+ * See the [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#named-key-attribute-values). for possible values
120
+ */
121
+ key: string;
122
+ /** @deprecated */
123
+ keyCode: number;
124
+ locale: string;
125
+ location: number;
126
+ metaKey: boolean;
127
+ repeat: boolean;
128
+ shiftKey: boolean;
129
+ /** @deprecated */
130
+ which: number;
131
+ }
132
+
133
+ interface MouseEvent<T = Element, E = NativeMouseEvent> extends UIEvent<T, E> {
134
+ altKey: boolean;
135
+ button: number;
136
+ buttons: number;
137
+ clientX: number;
138
+ clientY: number;
139
+ ctrlKey: boolean;
140
+ /**
141
+ * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method.
142
+ */
143
+ getModifierState(key: ModifierKey): boolean;
144
+ metaKey: boolean;
145
+ movementX: number;
146
+ movementY: number;
147
+ pageX: number;
148
+ pageY: number;
149
+ relatedTarget: EventTarget | null;
150
+ screenX: number;
151
+ screenY: number;
152
+ shiftKey: boolean;
153
+ }
154
+
155
+ interface TouchEvent<T = Element> extends UIEvent<T, NativeTouchEvent> {
156
+ altKey: boolean;
157
+ changedTouches: TouchList;
158
+ ctrlKey: boolean;
159
+ /**
160
+ * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method.
161
+ */
162
+ getModifierState(key: ModifierKey): boolean;
163
+ metaKey: boolean;
164
+ shiftKey: boolean;
165
+ targetTouches: TouchList;
166
+ touches: TouchList;
167
+ }
168
+
169
+ interface UIEvent<T = Element, E = NativeUIEvent> extends NativeEvent<T, E> {
170
+ detail: number;
171
+ view: AbstractView;
172
+ }
173
+
174
+ interface WheelEvent<T = Element> extends MouseEvent<T, NativeWheelEvent> {
175
+ deltaMode: number;
176
+ deltaX: number;
177
+ deltaY: number;
178
+ deltaZ: number;
179
+ }
180
+
181
+ interface AnimationEvent<T = Element> extends NativeEvent<T, NativeAnimationEvent> {
182
+ animationName: string;
183
+ elapsedTime: number;
184
+ pseudoElement: string;
185
+ }
186
+
187
+ interface TransitionEvent<T = Element> extends NativeEvent<T, NativeTransitionEvent> {
188
+ elapsedTime: number;
189
+ propertyName: string;
190
+ pseudoElement: string;
191
+ }
192
+
193
+ //
194
+ // Event Handler Types
195
+ // ----------------------------------------------------------------------
196
+ type EventHandler<E extends NativeEvent<unknown, unknown>> = // (this: unknown & EventTarget, event: E): void;
197
+ (event: E) => void;
198
+ type NativeEventHandler<T = Element> = EventHandler<NativeEvent<T>>;
199
+ type ClipboardEventHandler<T = Element> = EventHandler<ClipboardEvent<T>>;
200
+ type CompositionEventHandler<T = Element> = EventHandler<CompositionEvent<T>>;
201
+ type DragEventHandler<T = Element> = EventHandler<DragEvent<T>>;
202
+ type FocusEventHandler<T = Element> = EventHandler<FocusEvent<T>>;
203
+ type FormEventHandler<T = Element> = EventHandler<FormEvent<T>>;
204
+ type ChangeEventHandler<T = Element> = EventHandler<ChangeEvent<T>>;
205
+ type KeyboardEventHandler<T = Element> = EventHandler<KeyboardEvent<T>>;
206
+ type MouseEventHandler<T = Element> = EventHandler<MouseEvent<T>>;
207
+ type TouchEventHandler<T = Element> = EventHandler<TouchEvent<T>>;
208
+ type PointerEventHandler<T = Element> = EventHandler<PointerEvent<T>>;
209
+ type UIEventHandler<T = Element> = EventHandler<UIEvent<T>>;
210
+ type WheelEventHandler<T = Element> = EventHandler<WheelEvent<T>>;
211
+ type AnimationEventHandler<T = Element> = EventHandler<AnimationEvent<T>>;
212
+ type TransitionEventHandler<T = Element> = EventHandler<TransitionEvent<T>>;
213
+
214
+ type SupportedEventObject<T> =
215
+ | NativeEvent<T>
216
+ | ClipboardEvent<T>
217
+ | CompositionEvent<T>
218
+ | DragEvent<T>
219
+ | FocusEvent<T>
220
+ | FormEvent<T>
221
+ | ChangeEvent<T>
222
+ | KeyboardEvent<T>
223
+ | MouseEvent<T>
224
+ | TouchEvent<T>
225
+ | PointerEvent<T>
226
+ | UIEvent<T>
227
+ | WheelEvent<T>
228
+ | AnimationEvent<T>
229
+ | TransitionEvent<T>;
230
+
231
+ type SupportedEventHandler<T> =
232
+ | NativeEventHandler<T>
233
+ | ClipboardEventHandler<T>
234
+ | CompositionEventHandler<T>
235
+ | DragEventHandler<T>
236
+ | FocusEventHandler<T>
237
+ | FormEventHandler<T>
238
+ | ChangeEventHandler<T>
239
+ | KeyboardEventHandler<T>
240
+ | MouseEventHandler<T>
241
+ | TouchEventHandler<T>
242
+ | PointerEventHandler<T>
243
+ | UIEventHandler<T>
244
+ | WheelEventHandler<T>
245
+ | AnimationEventHandler<T>
246
+ | TransitionEventHandler<T>;
247
+
248
+ type NativeEventTypes =
249
+ | 'DOMContentLoaded'
250
+ | 'DOMMouseScroll'
251
+ | 'abort'
252
+ | 'beforeunload'
253
+ | 'blur'
254
+ | 'change'
255
+ | 'click'
256
+ | 'contextmenu'
257
+ | 'dblclick'
258
+ | 'error'
259
+ | 'focus'
260
+ | 'focusin'
261
+ | 'focusout'
262
+ | 'gesturechange'
263
+ | 'gestureend'
264
+ | 'gesturestart'
265
+ | 'hover'
266
+ | 'keydown'
267
+ | 'keypress'
268
+ | 'keyup'
269
+ | 'load'
270
+ | 'mousedown'
271
+ | 'mouseenter'
272
+ | 'mousein'
273
+ | 'mouseleave'
274
+ | 'mousemove'
275
+ | 'mouseout'
276
+ | 'mouseover'
277
+ | 'mouseup'
278
+ | 'mousewheel'
279
+ | 'move'
280
+ | 'orientationchange'
281
+ | 'pointercancel'
282
+ | 'pointerdown'
283
+ | 'pointerleave'
284
+ | 'pointermove'
285
+ | 'pointerup'
286
+ | 'readystatechange'
287
+ | 'reset'
288
+ | 'resize'
289
+ | 'scroll'
290
+ | 'select'
291
+ | 'selectend'
292
+ | 'selectstart'
293
+ | 'submit'
294
+ | 'touchcancel'
295
+ | 'touchend'
296
+ | 'touchmove'
297
+ | 'touchstart'
298
+ | 'unload';
299
+ type PossibleEventTarget = EventTarget & (Element | Document | Window);
300
+
301
+ export {
302
+ SupportedEventObject,
303
+ SupportedEventHandler,
304
+ EventHandler,
305
+ NativeEventTypes,
306
+ NativeEvent,
307
+ ClipboardEvent,
308
+ CompositionEvent,
309
+ DragEvent,
310
+ FocusEvent,
311
+ FormEvent,
312
+ ChangeEvent,
313
+ KeyboardEvent,
314
+ MouseEvent,
315
+ TouchEvent,
316
+ PointerEvent,
317
+ UIEvent,
318
+ WheelEvent,
319
+ AnimationEvent,
320
+ TransitionEvent,
321
+ NativeEventHandler,
322
+ ClipboardEventHandler,
323
+ CompositionEventHandler,
324
+ DragEventHandler,
325
+ FocusEventHandler,
326
+ FormEventHandler,
327
+ ChangeEventHandler,
328
+ KeyboardEventHandler,
329
+ MouseEventHandler,
330
+ TouchEventHandler,
331
+ PointerEventHandler,
332
+ UIEventHandler,
333
+ WheelEventHandler,
334
+ AnimationEventHandler,
335
+ TransitionEventHandler,
336
+ PossibleEventTarget,
337
+ };
File without changes
File without changes
File without changes
package/src/is/isArray.ts CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/src/is/isJSON.ts CHANGED
File without changes
package/src/is/isMap.ts CHANGED
File without changes
package/src/is/isMedia.ts CHANGED
File without changes
package/src/is/isNode.ts CHANGED
File without changes
File without changes
File without changes
File without changes
package/src/is/isRTL.ts CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Shortcut for `Object.fromEntries()` static method.
3
+ *
4
+ * @param entries a target entries object
5
+ * @returns a new Object created from the specified entries in array format [key, value][]
6
+ * @see https://github.com/devinrhode2/ObjectTyped/blob/master/src/index.ts
7
+ */
8
+ const ObjectFromEntries = <K extends string, V>(entries: [K, V][]) =>
9
+ Object.fromEntries(entries) as Record<K, V>;
10
+
11
+ export default ObjectFromEntries;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/src/misc/data.ts CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
package/src/misc/focus.ts CHANGED
File without changes
File without changes
package/src/misc/noop.ts CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/src/misc/timer.ts CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes