@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/types.d.ts CHANGED
@@ -48,23 +48,27 @@ type SpinEventData = {
48
48
  config: SpinItem;
49
49
  spin: HTMLElement;
50
50
  };
51
- interface SpinsContainer extends HTMLDivElement {
51
+ interface SpinsContainer extends HTMLElement {
52
52
  /**
53
- * Ads a listener for the SpinsEvents["SPIN_CREATED"] event
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
- * Ads a listener for the SpinsEvents["SPIN_IN_VIEWPORT"] event.
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<T>(e: typeof SPIN_IN_VIEWPORT, handler: (e: CustomEvent<T>) => void): void;
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<T>(e: typeof SPIN_CREATED, handler: (e: CustomEvent<T>) => void): void;
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;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@flowplayer/spins",
3
3
  "module": "dist/index.js",
4
- "version": "0.1.0-rc.7",
4
+ "version": "0.1.0-rc.9",
5
5
  "type": "module",
6
6
  "types": "./dist/types.d.ts",
7
7
  "exports": {