@streamlayer/react 1.11.3-rc.3 → 1.11.3-rc.5

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 (61) hide show
  1. package/lib/advertisement.d.ts +146 -0
  2. package/lib/{classic/app/auth.d.ts → auth.d.ts} +13 -4
  3. package/lib/cjs/advertisement.js +1 -1
  4. package/lib/cjs/auth.js +1 -1
  5. package/lib/cjs/insight.js +1 -1
  6. package/lib/cjs/notification.js +1 -1
  7. package/lib/cjs/points.js +1 -1
  8. package/lib/cjs/provider.js +58 -59
  9. package/lib/cjs/useStreamLayerApp2.js +15 -17
  10. package/lib/classic/advertisement.d.ts +146 -0
  11. package/lib/{app → classic}/auth.d.ts +13 -4
  12. package/lib/classic/cjs/advertisement.js +1 -1
  13. package/lib/classic/cjs/auth.js +1 -1
  14. package/lib/classic/cjs/insight.js +1 -1
  15. package/lib/classic/cjs/notification.js +1 -1
  16. package/lib/classic/cjs/points.js +1 -1
  17. package/lib/classic/cjs/provider.js +58 -59
  18. package/lib/classic/cjs/useStreamLayerApp2.js +15 -17
  19. package/lib/classic/es/advertisement.js +94 -93
  20. package/lib/classic/es/auth.js +5 -2
  21. package/lib/classic/es/insight.js +22 -21
  22. package/lib/classic/es/notification.js +5 -4
  23. package/lib/classic/es/points.js +8 -6
  24. package/lib/classic/es/provider.js +10672 -11282
  25. package/lib/classic/es/useStreamLayerApp2.js +4697 -8424
  26. package/lib/classic/index.d.ts +218 -5
  27. package/lib/classic/insight.d.ts +136 -0
  28. package/lib/classic/notification.d.ts +120 -0
  29. package/lib/classic/points.d.ts +12 -0
  30. package/lib/classic/style.css +1 -1
  31. package/lib/classic/useStreamLayerApp.d.ts +167 -0
  32. package/lib/es/advertisement.js +94 -93
  33. package/lib/es/auth.js +5 -2
  34. package/lib/es/insight.js +22 -21
  35. package/lib/es/notification.js +5 -4
  36. package/lib/es/points.js +8 -6
  37. package/lib/es/provider.js +10709 -11327
  38. package/lib/es/useStreamLayerApp2.js +4697 -8424
  39. package/lib/index.d.ts +218 -5
  40. package/lib/insight.d.ts +136 -0
  41. package/lib/notification.d.ts +120 -0
  42. package/lib/points.d.ts +12 -0
  43. package/lib/style.css +1 -1
  44. package/lib/useStreamLayerApp.d.ts +167 -0
  45. package/package.json +3 -51
  46. package/lib/app/advertisement.d.ts +0 -18
  47. package/lib/app/app.d.ts +0 -19
  48. package/lib/app/event.d.ts +0 -4
  49. package/lib/app/insight.d.ts +0 -13
  50. package/lib/app/notification.d.ts +0 -5
  51. package/lib/app/points.d.ts +0 -3
  52. package/lib/app/provider.d.ts +0 -43
  53. package/lib/app/useStreamLayerApp.d.ts +0 -19
  54. package/lib/classic/app/advertisement.d.ts +0 -18
  55. package/lib/classic/app/app.d.ts +0 -19
  56. package/lib/classic/app/event.d.ts +0 -4
  57. package/lib/classic/app/insight.d.ts +0 -13
  58. package/lib/classic/app/notification.d.ts +0 -5
  59. package/lib/classic/app/points.d.ts +0 -3
  60. package/lib/classic/app/provider.d.ts +0 -43
  61. package/lib/classic/app/useStreamLayerApp.d.ts +0 -19
@@ -0,0 +1,167 @@
1
+ declare type CancelMountCb = () => void;
2
+
3
+ declare const DEEP_LINK_EVENT_ID = "sldl_eid";
4
+
5
+ declare const DEEP_LINK_EXTERNAL_EVENT_ID = "sldl_e_eid";
6
+
7
+ declare const DEEP_LINK_USER_ID = "sldl_uid";
8
+
9
+ declare type DeepLinkCallback = (deepLinkData: DeepLinkContextData['data']) => void;
10
+
11
+ declare type DeepLinkContextData = {
12
+ handled?: boolean;
13
+ parsed?: boolean;
14
+ used?: boolean;
15
+ data?: DeepLinkUrlParams;
16
+ };
17
+
18
+ declare type DeepLinkUrlParams = {
19
+ [DEEP_LINK_USER_ID]?: string;
20
+ [DEEP_LINK_EVENT_ID]?: string;
21
+ [DEEP_LINK_EXTERNAL_EVENT_ID]?: string;
22
+ };
23
+
24
+ declare type DoneFn = Function;
25
+
26
+ declare type OnContentActivateCallback = (renderData: UIData) => void;
27
+
28
+ declare type OnMountCb = () => CancelMountCb;
29
+
30
+ /**
31
+ * @generated from enum streamlayer.sdkSettings.SdkOverlayType
32
+ */
33
+ declare enum SdkOverlayType {
34
+ /**
35
+ * @generated from enum value: SDK_OVERLAY_TYPE_UNSET = 0;
36
+ */
37
+ UNSET = 0,
38
+
39
+ /**
40
+ * betting legacy
41
+ *
42
+ * @generated from enum value: SDK_OVERLAY_TYPE_INPLAY = 1;
43
+ */
44
+ INPLAY = 1,
45
+
46
+ /**
47
+ * @generated from enum value: SDK_OVERLAY_TYPE_MESSAGING = 2;
48
+ */
49
+ MESSAGING = 2,
50
+
51
+ /**
52
+ * @generated from enum value: SDK_OVERLAY_TYPE_STATISTICS = 3;
53
+ */
54
+ STATISTICS = 3,
55
+
56
+ /**
57
+ * betting
58
+ *
59
+ * @generated from enum value: SDK_OVERLAY_TYPE_BETTING = 4;
60
+ */
61
+ BETTING = 4,
62
+
63
+ /**
64
+ * @generated from enum value: SDK_OVERLAY_TYPE_TWITTER = 5;
65
+ */
66
+ TWITTER = 5,
67
+
68
+ /**
69
+ * @generated from enum value: SDK_OVERLAY_TYPE_MERCHANDISE = 6;
70
+ */
71
+ MERCHANDISE = 6,
72
+
73
+ /**
74
+ * @generated from enum value: SDK_OVERLAY_TYPE_CONTESTS = 7;
75
+ */
76
+ CONTESTS = 7,
77
+
78
+ /**
79
+ * WatchParty
80
+ *
81
+ * @generated from enum value: SDK_OVERLAY_TYPE_VOICE_CHAT = 8;
82
+ */
83
+ VOICE_CHAT = 8,
84
+
85
+ /**
86
+ * @generated from enum value: SDK_OVERLAY_TYPE_TICKETS = 9;
87
+ */
88
+ TICKETS = 9,
89
+
90
+ /**
91
+ * @generated from enum value: SDK_OVERLAY_TYPE_WHOIS_WATCHING = 10;
92
+ */
93
+ WHOIS_WATCHING = 10,
94
+
95
+ /**
96
+ * @generated from enum value: SDK_OVERLAY_TYPE_PROFILE = 11;
97
+ */
98
+ PROFILE = 11,
99
+
100
+ /**
101
+ * @generated from enum value: SDK_OVERLAY_TYPE_GAMES = 12;
102
+ */
103
+ GAMES = 12,
104
+
105
+ /**
106
+ * @generated from enum value: SDK_OVERLAY_TYPE_GOLF_STATISTICS = 13;
107
+ */
108
+ GOLF_STATISTICS = 13,
109
+
110
+ /**
111
+ * @generated from enum value: SDK_OVERLAY_TYPE_HIGHLIGHTS = 14;
112
+ */
113
+ HIGHLIGHTS = 14,
114
+
115
+ /**
116
+ * @generated from enum value: SDK_OVERLAY_TYPE_PUBLIC_CHAT = 15;
117
+ */
118
+ PUBLIC_CHAT = 15,
119
+ }
120
+
121
+ declare type StreamLayerPlugin<T = unknown> = (instance: StreamLayerContext, opts: T, done: DoneFn) => void;
122
+
123
+ declare interface StreamLayerSDK {
124
+ onMount: (opts: {
125
+ name: string;
126
+ clear?: boolean;
127
+ }, cb: OnMountCb) => void;
128
+ closeFeature: (destroy?: boolean) => void;
129
+ openFeature: (featureType: SdkOverlayType) => void;
130
+ }
131
+
132
+ declare type UIData = {
133
+ stage: 'activate' | 'deactivate';
134
+ id: string;
135
+ isViewed?: boolean;
136
+ hasNotification?: boolean;
137
+ type: 'advertisement' | 'insight' | 'poll' | 'trivia' | 'prediction' | 'tweet' | 'question';
138
+ hasBanner?: boolean;
139
+ };
140
+
141
+ export declare const useStreamLayerApp: ({ sdkKey, plugins, production, autoEnable, onDeepLinkHandled, videoPlayerController, onContentActivate, withAdNotification, withAd, friendsTab, }: {
142
+ sdkKey: string;
143
+ plugins?: Set<StreamLayerPlugin>;
144
+ production?: boolean;
145
+ autoEnable?: boolean;
146
+ onDeepLinkHandled?: DeepLinkCallback;
147
+ videoPlayerController?: VideoPlayerCallback;
148
+ onContentActivate?: OnContentActivateCallback;
149
+ withAdNotification?: boolean;
150
+ withAd?: boolean;
151
+ friendsTab: "enabled" | "disabled" | "activatedGame";
152
+ }) => StreamLayerSDK | null;
153
+
154
+ declare type VideoPlayerCallback = (videoPlayerData: VideoPlayerData) => void;
155
+
156
+ declare type VideoPlayerData = {
157
+ muted: boolean;
158
+ };
159
+
160
+ export { }
161
+
162
+
163
+ declare global {
164
+ interface Window {
165
+ sl: unknown;
166
+ }
167
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react",
3
- "version": "1.11.3-rc.3",
3
+ "version": "1.11.3-rc.5",
4
4
  "type": "module",
5
5
  "author": "StreamLayer, Inc (https://streamlayer.io)",
6
6
  "maintainers": [
@@ -118,19 +118,6 @@
118
118
  }
119
119
  ],
120
120
  "peerDependencies": {
121
- "@streamlayer/feature-gamification": "^1.13.4",
122
- "@streamlayer/sdk-web": "^1.7.4",
123
- "@streamlayer/sdk-web-analytics": "^1.5.8",
124
- "@streamlayer/sdk-web-api": "^1.6.21",
125
- "@streamlayer/sdk-web-core": "^1.9.4",
126
- "@streamlayer/sdk-web-features": "^1.0.42",
127
- "@streamlayer/sdk-web-interfaces": "^1.4.8",
128
- "@streamlayer/sdk-web-logger": "^1.0.42",
129
- "@streamlayer/sdk-web-notifications": "^1.3.4",
130
- "@streamlayer/sdk-web-storage": "^1.0.42",
131
- "@streamlayer/react-ui": "^1.17.0",
132
- "@streamlayer/react-polyfills": "^0.1.2",
133
- "@streamlayer/sdk-web-types": "^1.9.4",
134
121
  "@bufbuild/protobuf": "^1.10.0",
135
122
  "@connectrpc/connect": "^1.6.1",
136
123
  "@connectrpc/connect-web": "^1.6.1",
@@ -143,49 +130,14 @@
143
130
  "nanoid": "3.3.7",
144
131
  "nanostores": "^0.10.3",
145
132
  "pino": "^9.4.0",
133
+ "react": "18.3.1",
146
134
  "react-auth-code-input": "^3.2.1",
147
135
  "react-countdown-circle-timer": "^3.2.1",
148
136
  "react-countup": "^6.5.3",
137
+ "react-dom": "18.3.1",
149
138
  "react-infinite-scroller": "^1.2.6",
150
139
  "react-phone-number-input": "^3.4.8"
151
140
  },
152
- "devDependencies": {
153
- "@babel/preset-react": "^7.24.7",
154
- "@babel/preset-typescript": "^7.24.7",
155
- "@esbuild-plugins/node-globals-polyfill": "^0.2.3",
156
- "@esbuild-plugins/node-modules-polyfill": "^0.2.2",
157
- "@linaria/babel-preset": "^5.0.4",
158
- "@nrwl/esbuild": "19.8.4",
159
- "@size-limit/esbuild": "^11.1.6",
160
- "@size-limit/esbuild-why": "^11.1.6",
161
- "@size-limit/file": "^11.1.6",
162
- "@testing-library/react": "16.0.1",
163
- "@types/react": "18.3.11",
164
- "@types/react-dom": "18.3.0",
165
- "@types/react-infinite-scroller": "^1.2.5",
166
- "@wyw-in-js/vite": "^0.5.3",
167
- "cssnano": "^7.0.6",
168
- "esbuild-plugin-external-global": "^1.0.1",
169
- "esbuild-plugin-polyfill-node": "^0.3.0",
170
- "esbuild-plugin-svgr": "^2.1.0",
171
- "eslint-plugin-jsx-a11y": "6.9.0",
172
- "eslint-plugin-react": "7.34.3",
173
- "eslint-plugin-react-hooks": "4.6.2",
174
- "nx-gcs": "^1.0.6",
175
- "postcss": "^8.4.47",
176
- "postcss-cli": "^11.0.0",
177
- "postcss-nested": "^6.2.0",
178
- "postcss-prefix-selector": "^1.16.1",
179
- "postcss-scss": "^4.0.9",
180
- "react": "18.3.1",
181
- "react-dom": "18.3.1",
182
- "react-refresh": "^0.14.2",
183
- "rollup-plugin-visualizer": "^5.12.0",
184
- "size-limit": "^11.1.6",
185
- "url-loader": "^4.1.1",
186
- "vite-plugin-dts": "^4.5.0",
187
- "@streamlayer/react-ui": "^1.17.0"
188
- },
189
141
  "scripts": {
190
142
  "size-limit": "size-limit"
191
143
  }
@@ -1,18 +0,0 @@
1
- import { StreamLayerSDKAdvertisement as StreamLayerSDKAdvertisementUI } from '@streamlayer/react-ui/advertisement';
2
- export type StreamLayerSDKAdvertisementProps = {
3
- /**
4
- * @deprecated Pass event to StreamLayerProvider or StreamLayerSDKEvent component instead, see docs for more info
5
- */
6
- event?: string;
7
- theme?: string;
8
- sidebar?: 'left' | 'right';
9
- banner?: 'top' | 'bottom';
10
- isMobileScreen?: boolean;
11
- persistent?: boolean;
12
- notification?: boolean;
13
- skipAutoClose?: boolean;
14
- skipTypeCheck?: boolean;
15
- externalAd?: boolean;
16
- };
17
- export { StreamLayerSDKAdvertisementUI };
18
- export declare const StreamLayerSDKAdvertisement: React.FC<StreamLayerSDKAdvertisementProps>;
package/lib/app/app.d.ts DELETED
@@ -1,19 +0,0 @@
1
- import { StreamLayerOptions, StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
2
- export declare const useStreamLayer: () => StreamLayerSDK | null;
3
- export declare const useStreamLayerEvent: () => import('react').MutableRefObject<string> | undefined;
4
- export declare const useStreamLayerTheme: () => Pick<StreamLayerOptions, "theme" | "themeMode">;
5
- export declare const useStreamLayerUI: () => {
6
- promotionExternalAd?: boolean;
7
- promotionSidebar?: boolean;
8
- promotionOverlay?: boolean;
9
- promotionNotification?: boolean;
10
- promotionBanner?: boolean;
11
- app?: boolean;
12
- appNotification?: boolean;
13
- };
14
- export declare const StreamLayerSDKReact: React.FC<{
15
- event?: string;
16
- topNavigation?: boolean;
17
- withSidebarNotification?: boolean;
18
- theme?: string;
19
- }>;
@@ -1,4 +0,0 @@
1
- export type StreamLayerSDKEventProps = {
2
- event?: string;
3
- };
4
- export declare const StreamLayerSDKEvent: React.FC<StreamLayerSDKEventProps>;
@@ -1,13 +0,0 @@
1
- import { StreamLayerSDKInsight as StreamLayerSDKInsightUI } from '@streamlayer/react-ui/insight';
2
- export type StreamLayerSDKInsightProps = {
3
- /**
4
- * @deprecated Pass event to StreamLayerProvider or StreamLayerSDKEvent component instead, see docs for more info
5
- */
6
- event?: string;
7
- theme?: string;
8
- hideHeader?: boolean;
9
- persistent?: boolean;
10
- skipAutoClose?: boolean;
11
- };
12
- export { StreamLayerSDKInsightUI };
13
- export declare const StreamLayerSDKInsight: React.FC<StreamLayerSDKInsightProps>;
@@ -1,5 +0,0 @@
1
- import { StreamLayerSDKNotification as StreamLayerSDKNotificationUI } from '@streamlayer/react-ui/notification';
2
- export { StreamLayerSDKNotificationUI };
3
- export declare const StreamLayerSDKNotification: React.FC<{
4
- theme?: string;
5
- }>;
@@ -1,3 +0,0 @@
1
- export declare const StreamLayerSDKPoints: React.FC<{
2
- theme?: string;
3
- }>;
@@ -1,43 +0,0 @@
1
- import { StreamLayerSDK, StreamLayerPlugin } from '@streamlayer/sdk-web-interfaces';
2
- import { DeepLinkCallback } from '@streamlayer/sdk-web-core';
3
- export type { DeepLinkCallback } from '@streamlayer/sdk-web-core';
4
- export type ContentActivateParams = {
5
- stage: 'activate' | 'deactivate';
6
- id: string;
7
- isViewed?: boolean;
8
- hasNotification?: boolean;
9
- type: 'advertisement' | 'insight' | 'poll' | 'trivia' | 'prediction' | 'tweet' | 'question';
10
- };
11
- export type VideoPlayerData = {
12
- muted: boolean;
13
- };
14
- export type VideoPlayerCallback = (videoPlayerData: VideoPlayerData) => void;
15
- export type OnContentActivateCallback = (renderData: ContentActivateParams) => void;
16
- export declare enum StreamLayerStatus {
17
- UNSET = 0,
18
- CONNECTED = 1,
19
- READY = 2
20
- }
21
- export declare const StreamLayerContext: import('react').Context<{
22
- status: StreamLayerStatus;
23
- sdk: StreamLayerSDK | null;
24
- event?: React.MutableRefObject<string>;
25
- }>;
26
- export type StreamLayerProps = {
27
- sdkKey: string;
28
- plugins?: Set<StreamLayerPlugin>;
29
- event?: string;
30
- production?: boolean;
31
- autoEnable?: boolean;
32
- onDeepLinkHandled?: DeepLinkCallback;
33
- videoPlayerController?: VideoPlayerCallback;
34
- onContentActivate?: OnContentActivateCallback;
35
- theme?: string;
36
- withAdNotification?: boolean;
37
- withAd?: boolean;
38
- friendsTab?: 'enabled' | 'disabled' | 'activatedGame';
39
- themeMode?: 'light' | 'dark';
40
- };
41
- export declare const StreamLayerProvider: React.FC<StreamLayerProps & {
42
- children: React.ReactNode;
43
- }>;
@@ -1,19 +0,0 @@
1
- import { StreamLayerSDK, StreamLayerPlugin } from '@streamlayer/sdk-web-interfaces';
2
- import { DeepLinkCallback, VideoPlayerCallback, OnContentActivateCallback } from '@streamlayer/sdk-web-core';
3
- declare global {
4
- interface Window {
5
- sl: unknown;
6
- }
7
- }
8
- export declare const useStreamLayerApp: ({ sdkKey, plugins, production, autoEnable, onDeepLinkHandled, videoPlayerController, onContentActivate, withAdNotification, withAd, friendsTab, }: {
9
- sdkKey: string;
10
- plugins?: Set<StreamLayerPlugin>;
11
- production?: boolean;
12
- autoEnable?: boolean;
13
- onDeepLinkHandled?: DeepLinkCallback;
14
- videoPlayerController?: VideoPlayerCallback;
15
- onContentActivate?: OnContentActivateCallback;
16
- withAdNotification?: boolean;
17
- withAd?: boolean;
18
- friendsTab: "enabled" | "disabled" | "activatedGame";
19
- }) => StreamLayerSDK | null;
@@ -1,18 +0,0 @@
1
- import { StreamLayerSDKAdvertisement as StreamLayerSDKAdvertisementUI } from '@streamlayer/react-ui/advertisement';
2
- export type StreamLayerSDKAdvertisementProps = {
3
- /**
4
- * @deprecated Pass event to StreamLayerProvider or StreamLayerSDKEvent component instead, see docs for more info
5
- */
6
- event?: string;
7
- theme?: string;
8
- sidebar?: 'left' | 'right';
9
- banner?: 'top' | 'bottom';
10
- isMobileScreen?: boolean;
11
- persistent?: boolean;
12
- notification?: boolean;
13
- skipAutoClose?: boolean;
14
- skipTypeCheck?: boolean;
15
- externalAd?: boolean;
16
- };
17
- export { StreamLayerSDKAdvertisementUI };
18
- export declare const StreamLayerSDKAdvertisement: React.FC<StreamLayerSDKAdvertisementProps>;
@@ -1,19 +0,0 @@
1
- import { StreamLayerOptions, StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
2
- export declare const useStreamLayer: () => StreamLayerSDK | null;
3
- export declare const useStreamLayerEvent: () => import('react').MutableRefObject<string> | undefined;
4
- export declare const useStreamLayerTheme: () => Pick<StreamLayerOptions, "theme" | "themeMode">;
5
- export declare const useStreamLayerUI: () => {
6
- promotionExternalAd?: boolean;
7
- promotionSidebar?: boolean;
8
- promotionOverlay?: boolean;
9
- promotionNotification?: boolean;
10
- promotionBanner?: boolean;
11
- app?: boolean;
12
- appNotification?: boolean;
13
- };
14
- export declare const StreamLayerSDKReact: React.FC<{
15
- event?: string;
16
- topNavigation?: boolean;
17
- withSidebarNotification?: boolean;
18
- theme?: string;
19
- }>;
@@ -1,4 +0,0 @@
1
- export type StreamLayerSDKEventProps = {
2
- event?: string;
3
- };
4
- export declare const StreamLayerSDKEvent: React.FC<StreamLayerSDKEventProps>;
@@ -1,13 +0,0 @@
1
- import { StreamLayerSDKInsight as StreamLayerSDKInsightUI } from '@streamlayer/react-ui/insight';
2
- export type StreamLayerSDKInsightProps = {
3
- /**
4
- * @deprecated Pass event to StreamLayerProvider or StreamLayerSDKEvent component instead, see docs for more info
5
- */
6
- event?: string;
7
- theme?: string;
8
- hideHeader?: boolean;
9
- persistent?: boolean;
10
- skipAutoClose?: boolean;
11
- };
12
- export { StreamLayerSDKInsightUI };
13
- export declare const StreamLayerSDKInsight: React.FC<StreamLayerSDKInsightProps>;
@@ -1,5 +0,0 @@
1
- import { StreamLayerSDKNotification as StreamLayerSDKNotificationUI } from '@streamlayer/react-ui/notification';
2
- export { StreamLayerSDKNotificationUI };
3
- export declare const StreamLayerSDKNotification: React.FC<{
4
- theme?: string;
5
- }>;
@@ -1,3 +0,0 @@
1
- export declare const StreamLayerSDKPoints: React.FC<{
2
- theme?: string;
3
- }>;
@@ -1,43 +0,0 @@
1
- import { StreamLayerSDK, StreamLayerPlugin } from '@streamlayer/sdk-web-interfaces';
2
- import { DeepLinkCallback } from '@streamlayer/sdk-web-core';
3
- export type { DeepLinkCallback } from '@streamlayer/sdk-web-core';
4
- export type ContentActivateParams = {
5
- stage: 'activate' | 'deactivate';
6
- id: string;
7
- isViewed?: boolean;
8
- hasNotification?: boolean;
9
- type: 'advertisement' | 'insight' | 'poll' | 'trivia' | 'prediction' | 'tweet' | 'question';
10
- };
11
- export type VideoPlayerData = {
12
- muted: boolean;
13
- };
14
- export type VideoPlayerCallback = (videoPlayerData: VideoPlayerData) => void;
15
- export type OnContentActivateCallback = (renderData: ContentActivateParams) => void;
16
- export declare enum StreamLayerStatus {
17
- UNSET = 0,
18
- CONNECTED = 1,
19
- READY = 2
20
- }
21
- export declare const StreamLayerContext: import('react').Context<{
22
- status: StreamLayerStatus;
23
- sdk: StreamLayerSDK | null;
24
- event?: React.MutableRefObject<string>;
25
- }>;
26
- export type StreamLayerProps = {
27
- sdkKey: string;
28
- plugins?: Set<StreamLayerPlugin>;
29
- event?: string;
30
- production?: boolean;
31
- autoEnable?: boolean;
32
- onDeepLinkHandled?: DeepLinkCallback;
33
- videoPlayerController?: VideoPlayerCallback;
34
- onContentActivate?: OnContentActivateCallback;
35
- theme?: string;
36
- withAdNotification?: boolean;
37
- withAd?: boolean;
38
- friendsTab?: 'enabled' | 'disabled' | 'activatedGame';
39
- themeMode?: 'light' | 'dark';
40
- };
41
- export declare const StreamLayerProvider: React.FC<StreamLayerProps & {
42
- children: React.ReactNode;
43
- }>;
@@ -1,19 +0,0 @@
1
- import { StreamLayerSDK, StreamLayerPlugin } from '@streamlayer/sdk-web-interfaces';
2
- import { DeepLinkCallback, VideoPlayerCallback, OnContentActivateCallback } from '@streamlayer/sdk-web-core';
3
- declare global {
4
- interface Window {
5
- sl: unknown;
6
- }
7
- }
8
- export declare const useStreamLayerApp: ({ sdkKey, plugins, production, autoEnable, onDeepLinkHandled, videoPlayerController, onContentActivate, withAdNotification, withAd, friendsTab, }: {
9
- sdkKey: string;
10
- plugins?: Set<StreamLayerPlugin>;
11
- production?: boolean;
12
- autoEnable?: boolean;
13
- onDeepLinkHandled?: DeepLinkCallback;
14
- videoPlayerController?: VideoPlayerCallback;
15
- onContentActivate?: OnContentActivateCallback;
16
- withAdNotification?: boolean;
17
- withAd?: boolean;
18
- friendsTab: "enabled" | "disabled" | "activatedGame";
19
- }) => StreamLayerSDK | null;