Comparing version 2.0.2 to 2.0.3
@@ -0,1 +1,5 @@ | ||
/** | ||
* Source code reference from: | ||
* https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/dom/DOMMouseMoveTracker.js | ||
*/ | ||
declare class DOMMouseMoveTracker { | ||
@@ -18,3 +22,3 @@ isDraggingStatus: boolean; | ||
*/ | ||
constructor(onMove: (x: number, y: number, e: Event) => void, onMoveEnd: (e: Event) => void, domNode: Element); | ||
constructor(onMove: (x: number, y: number, e: any) => void, onMoveEnd: (e: any) => void, domNode: Element); | ||
/** | ||
@@ -26,3 +30,3 @@ * This is to set up the listeners for listening to mouse move | ||
*/ | ||
captureMouseMoves(event: MouseEvent): void; | ||
captureMouseMoves(event: any): void; | ||
/** | ||
@@ -39,3 +43,3 @@ * These releases all of the listeners on document.body. | ||
*/ | ||
onMouseMove: (event: Event) => void; | ||
onMouseMove: (event: any) => void; | ||
didMouseMove: () => void; | ||
@@ -45,4 +49,4 @@ /** | ||
*/ | ||
onMouseUp: (event: Event) => void; | ||
onMouseUp: (event: any) => void; | ||
} | ||
export default DOMMouseMoveTracker; |
@@ -0,1 +1,5 @@ | ||
/** | ||
* Source code reference from: | ||
* https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/dom/DOMMouseMoveTracker.js | ||
*/ | ||
import on from './events/on'; | ||
@@ -2,0 +6,0 @@ import cancelAnimationFramePolyfill from './animation/cancelAnimationFramePolyfill'; |
@@ -0,4 +1,7 @@ | ||
export interface CustomEventListener<T = any> { | ||
(evt: T): void; | ||
} | ||
/** | ||
* Unbind `target` event `eventName`'s callback `listener`. | ||
*/ | ||
export default function on<K extends keyof DocumentEventMap>(target: Element | Window | Document, eventName: K, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; | ||
export default function on<K extends keyof DocumentEventMap>(target: Element | Window | Document | EventTarget, eventName: K, listener: EventListenerOrEventListenerObject | CustomEventListener, options?: boolean | AddEventListenerOptions): void; |
/** | ||
* Bind `target` event `eventName`'s callback `listener`. | ||
*/ | ||
export default function on<K extends keyof DocumentEventMap>(target: Element | Window | Document, eventType: K, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): { | ||
export interface CustomEventListener<T = any> { | ||
(evt: T): void; | ||
} | ||
export default function on<K extends keyof DocumentEventMap>(target: Element | Window | Document | EventTarget, eventType: K, listener: EventListenerOrEventListenerObject | CustomEventListener, options?: boolean | AddEventListenerOptions): { | ||
off: () => void; | ||
}; |
@@ -1,2 +0,2 @@ | ||
declare const _default: (node: Element, client?: Element) => number; | ||
declare const _default: (node: Element | Window, client?: Element) => number; | ||
export default _default; |
@@ -1,2 +0,2 @@ | ||
declare const _default: (node: Element, client?: Element) => number; | ||
declare const _default: (node: Element | Window, client?: Element) => number; | ||
export default _default; |
@@ -0,1 +1,5 @@ | ||
/** | ||
* Source code reference from: | ||
* https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/dom/DOMMouseMoveTracker.js | ||
*/ | ||
declare class DOMMouseMoveTracker { | ||
@@ -18,3 +22,3 @@ isDraggingStatus: boolean; | ||
*/ | ||
constructor(onMove: (x: number, y: number, e: Event) => void, onMoveEnd: (e: Event) => void, domNode: Element); | ||
constructor(onMove: (x: number, y: number, e: any) => void, onMoveEnd: (e: any) => void, domNode: Element); | ||
/** | ||
@@ -26,3 +30,3 @@ * This is to set up the listeners for listening to mouse move | ||
*/ | ||
captureMouseMoves(event: MouseEvent): void; | ||
captureMouseMoves(event: any): void; | ||
/** | ||
@@ -39,3 +43,3 @@ * These releases all of the listeners on document.body. | ||
*/ | ||
onMouseMove: (event: Event) => void; | ||
onMouseMove: (event: any) => void; | ||
didMouseMove: () => void; | ||
@@ -45,4 +49,4 @@ /** | ||
*/ | ||
onMouseUp: (event: Event) => void; | ||
onMouseUp: (event: any) => void; | ||
} | ||
export default DOMMouseMoveTracker; |
@@ -14,2 +14,6 @@ "use strict"; | ||
/** | ||
* Source code reference from: | ||
* https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/dom/DOMMouseMoveTracker.js | ||
*/ | ||
var DOMMouseMoveTracker = /*#__PURE__*/function () { | ||
@@ -16,0 +20,0 @@ /** |
@@ -0,4 +1,7 @@ | ||
export interface CustomEventListener<T = any> { | ||
(evt: T): void; | ||
} | ||
/** | ||
* Unbind `target` event `eventName`'s callback `listener`. | ||
*/ | ||
export default function on<K extends keyof DocumentEventMap>(target: Element | Window | Document, eventName: K, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; | ||
export default function on<K extends keyof DocumentEventMap>(target: Element | Window | Document | EventTarget, eventName: K, listener: EventListenerOrEventListenerObject | CustomEventListener, options?: boolean | AddEventListenerOptions): void; |
/** | ||
* Bind `target` event `eventName`'s callback `listener`. | ||
*/ | ||
export default function on<K extends keyof DocumentEventMap>(target: Element | Window | Document, eventType: K, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): { | ||
export interface CustomEventListener<T = any> { | ||
(evt: T): void; | ||
} | ||
export default function on<K extends keyof DocumentEventMap>(target: Element | Window | Document | EventTarget, eventType: K, listener: EventListenerOrEventListenerObject | CustomEventListener, options?: boolean | AddEventListenerOptions): { | ||
off: () => void; | ||
}; |
@@ -1,2 +0,2 @@ | ||
declare const _default: (node: Element, client?: Element) => number; | ||
declare const _default: (node: Element | Window, client?: Element) => number; | ||
export default _default; |
@@ -1,2 +0,2 @@ | ||
declare const _default: (node: Element, client?: Element) => number; | ||
declare const _default: (node: Element | Window, client?: Element) => number; | ||
export default _default; |
{ | ||
"name": "dom-lib", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "DOM helper library", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -5,3 +5,3 @@ # dom-lib [![npm][npm-badge]][npm] | ||
## 安装 | ||
## Install | ||
@@ -12,3 +12,3 @@ ``` | ||
## 示例 | ||
## Usage | ||
@@ -15,0 +15,0 @@ ```js |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
136463
3738