promogame-player 0.0.22 → 0.0.24

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.
@@ -1,3 +1,4 @@
1
+ import { EventName } from '../../types.ts';
1
2
  import * as React from 'react';
2
3
  export interface PromogamePlayerProps extends React.RefAttributes<HTMLCanvasElement> {
3
4
  apiUrl: string;
@@ -14,7 +15,7 @@ export interface PromogamePlayerProps extends React.RefAttributes<HTMLCanvasElem
14
15
  userPhone?: string;
15
16
  userAvatar?: string;
16
17
  userDisplayName?: string;
17
- registerEvents?: string[];
18
- onEventReceived?: (eventName: string, params: unknown) => void;
18
+ registerEvents?: EventName[];
19
+ onEventReceived?: (eventName: EventName, params: unknown) => void;
19
20
  }
20
21
  export declare const PromogamePlayer: React.ForwardRefExoticComponent<Omit<PromogamePlayerProps, "ref"> & React.RefAttributes<HTMLCanvasElement>>;
@@ -1,3 +1,4 @@
1
+ import { EventName } from '../../types.ts';
1
2
  import * as React from 'react';
2
3
  export interface UnityGameProps extends React.RefAttributes<HTMLCanvasElement> {
3
4
  gameLink?: string;
@@ -5,7 +6,7 @@ export interface UnityGameProps extends React.RefAttributes<HTMLCanvasElement> {
5
6
  progress: number;
6
7
  }>;
7
8
  className?: string;
8
- registerEvents?: string[];
9
- onEventReceived?: (eventName: string, params: unknown) => void;
9
+ registerEvents?: EventName[];
10
+ onEventReceived?: (eventName: EventName, params: unknown) => void;
10
11
  }
11
12
  export declare const UnityGame: React.ForwardRefExoticComponent<Omit<UnityGameProps, "ref"> & React.RefAttributes<HTMLCanvasElement>>;
package/dist/types.d.ts CHANGED
@@ -9,3 +9,6 @@ declare global {
9
9
  unityInstance: UnityInstance;
10
10
  }
11
11
  }
12
+ export declare enum EventName {
13
+ OPEN_GIFT_LINK = "openGiftLink"
14
+ }
package/dist/types.js CHANGED
@@ -1 +1,4 @@
1
-
1
+ var e = /* @__PURE__ */ ((r) => (r.OPEN_GIFT_LINK = "openGiftLink", r))(e || {});
2
+ export {
3
+ e as EventName
4
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "promogame-player",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "type": "module",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",