@flowplayer/spins 0.1.0-rc.7 → 0.1.0-rc.9
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.
- package/dist/index.js +28 -26
- package/dist/types.d.ts +9 -5
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -48,23 +48,27 @@ type SpinEventData = {
|
|
|
48
48
|
config: SpinItem;
|
|
49
49
|
spin: HTMLElement;
|
|
50
50
|
};
|
|
51
|
-
interface SpinsContainer extends
|
|
51
|
+
interface SpinsContainer extends HTMLElement {
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* Adds a listener for the SpinsEvents["SPIN_CREATED"] event
|
|
54
54
|
*/
|
|
55
55
|
on(e: typeof SPIN_CREATED, handler: (e: CustomEvent<SpinEventData>) => void, options?: boolean | AddEventListenerOptions): void;
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
57
|
+
* Adds a listener for the SpinsEvents["SPIN_IN_VIEWPORT"] event.
|
|
58
58
|
*/
|
|
59
59
|
on(e: typeof SPIN_IN_VIEWPORT, handler: (e: CustomEvent<SpinEventData>) => void, options?: boolean | AddEventListenerOptions): void;
|
|
60
60
|
/**
|
|
61
61
|
* Removes a listener for the SpinsEvents["SPIN_IN_VIEWPORT"] event
|
|
62
62
|
*/
|
|
63
|
-
off
|
|
63
|
+
off(e: typeof SPIN_IN_VIEWPORT, handler: (e?: CustomEvent<SpinEventData>) => void): void;
|
|
64
64
|
/**
|
|
65
65
|
* Removes a listener for the SpinsEvents["SPIN_CREATED"] event
|
|
66
66
|
*/
|
|
67
|
-
off
|
|
67
|
+
off(e: typeof SPIN_CREATED, handler: (e?: CustomEvent<SpinEventData>) => void): void;
|
|
68
|
+
/**
|
|
69
|
+
* Add more spins dynamically.
|
|
70
|
+
*/
|
|
71
|
+
addSpins(spins: SpinItem[]): void;
|
|
68
72
|
}
|
|
69
73
|
declare const events: {
|
|
70
74
|
SPIN_IN_VIEWPORT: typeof SPIN_IN_VIEWPORT;
|