@streamlayer/react 1.11.3-rc.4 → 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.
- package/lib/advertisement.d.ts +146 -0
- package/lib/{classic/app/auth.d.ts → auth.d.ts} +13 -4
- package/lib/cjs/advertisement.js +1 -1
- package/lib/cjs/auth.js +1 -1
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/provider.js +58 -59
- package/lib/cjs/useStreamLayerApp2.js +15 -17
- package/lib/classic/advertisement.d.ts +146 -0
- package/lib/{app → classic}/auth.d.ts +13 -4
- package/lib/classic/cjs/advertisement.js +1 -1
- package/lib/classic/cjs/auth.js +1 -1
- package/lib/classic/cjs/insight.js +1 -1
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/provider.js +58 -59
- package/lib/classic/cjs/useStreamLayerApp2.js +15 -17
- package/lib/classic/es/advertisement.js +94 -93
- package/lib/classic/es/auth.js +5 -2
- package/lib/classic/es/insight.js +22 -21
- package/lib/classic/es/notification.js +5 -4
- package/lib/classic/es/points.js +8 -6
- package/lib/classic/es/provider.js +10672 -11282
- package/lib/classic/es/useStreamLayerApp2.js +4697 -8424
- package/lib/classic/index.d.ts +218 -5
- package/lib/classic/insight.d.ts +136 -0
- package/lib/classic/notification.d.ts +120 -0
- package/lib/classic/points.d.ts +12 -0
- package/lib/classic/style.css +1 -1
- package/lib/classic/useStreamLayerApp.d.ts +167 -0
- package/lib/es/advertisement.js +94 -93
- package/lib/es/auth.js +5 -2
- package/lib/es/insight.js +22 -21
- package/lib/es/notification.js +5 -4
- package/lib/es/points.js +8 -6
- package/lib/es/provider.js +10709 -11327
- package/lib/es/useStreamLayerApp2.js +4697 -8424
- package/lib/index.d.ts +218 -5
- package/lib/insight.d.ts +136 -0
- package/lib/notification.d.ts +120 -0
- package/lib/points.d.ts +12 -0
- package/lib/style.css +1 -1
- package/lib/useStreamLayerApp.d.ts +167 -0
- package/package.json +22 -1
- package/lib/app/advertisement.d.ts +0 -18
- package/lib/app/app.d.ts +0 -19
- package/lib/app/event.d.ts +0 -4
- package/lib/app/insight.d.ts +0 -13
- package/lib/app/notification.d.ts +0 -5
- package/lib/app/points.d.ts +0 -3
- package/lib/app/provider.d.ts +0 -43
- package/lib/app/useStreamLayerApp.d.ts +0 -19
- package/lib/classic/app/advertisement.d.ts +0 -18
- package/lib/classic/app/app.d.ts +0 -19
- package/lib/classic/app/event.d.ts +0 -4
- package/lib/classic/app/insight.d.ts +0 -13
- package/lib/classic/app/notification.d.ts +0 -5
- package/lib/classic/app/points.d.ts +0 -3
- package/lib/classic/app/provider.d.ts +0 -43
- 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
|
+
"version": "1.11.3-rc.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "StreamLayer, Inc (https://streamlayer.io)",
|
|
6
6
|
"maintainers": [
|
|
@@ -117,6 +117,27 @@
|
|
|
117
117
|
"limit": "300 kB"
|
|
118
118
|
}
|
|
119
119
|
],
|
|
120
|
+
"peerDependencies": {
|
|
121
|
+
"@bufbuild/protobuf": "^1.10.0",
|
|
122
|
+
"@connectrpc/connect": "^1.6.1",
|
|
123
|
+
"@connectrpc/connect-web": "^1.6.1",
|
|
124
|
+
"@fastify/deepmerge": "^2.0.0",
|
|
125
|
+
"@lottiefiles/react-lottie-player": "^3.5.4",
|
|
126
|
+
"@nanostores/query": "^0.2.10",
|
|
127
|
+
"@nanostores/react": "^0.7.2",
|
|
128
|
+
"@types/lodash.throttle": "^4.1.9",
|
|
129
|
+
"lodash.throttle": "^4.1.1",
|
|
130
|
+
"nanoid": "3.3.7",
|
|
131
|
+
"nanostores": "^0.10.3",
|
|
132
|
+
"pino": "^9.4.0",
|
|
133
|
+
"react": "18.3.1",
|
|
134
|
+
"react-auth-code-input": "^3.2.1",
|
|
135
|
+
"react-countdown-circle-timer": "^3.2.1",
|
|
136
|
+
"react-countup": "^6.5.3",
|
|
137
|
+
"react-dom": "18.3.1",
|
|
138
|
+
"react-infinite-scroller": "^1.2.6",
|
|
139
|
+
"react-phone-number-input": "^3.4.8"
|
|
140
|
+
},
|
|
120
141
|
"scripts": {
|
|
121
142
|
"size-limit": "size-limit"
|
|
122
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
|
-
}>;
|
package/lib/app/event.d.ts
DELETED
package/lib/app/insight.d.ts
DELETED
|
@@ -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>;
|
package/lib/app/points.d.ts
DELETED
package/lib/app/provider.d.ts
DELETED
|
@@ -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>;
|
package/lib/classic/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,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,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;
|