@streamlayer/react 1.11.3-rc.5 → 1.12.0

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 (106) hide show
  1. package/lib/app/advertisement.d.ts +18 -0
  2. package/lib/app/app.d.ts +19 -0
  3. package/lib/{auth.d.ts → app/auth.d.ts} +4 -13
  4. package/lib/app/bet-pack.d.ts +20 -0
  5. package/lib/app/event.d.ts +4 -0
  6. package/lib/app/insight.d.ts +13 -0
  7. package/lib/app/masters.d.ts +28 -0
  8. package/lib/app/notification.d.ts +5 -0
  9. package/lib/app/points.d.ts +3 -0
  10. package/lib/app/provider.d.ts +43 -0
  11. package/lib/app/useStreamLayerApp.d.ts +19 -0
  12. package/lib/cjs/advertisement.js +1 -1
  13. package/lib/cjs/auth.js +1 -1
  14. package/lib/cjs/bet-pack.js +1 -0
  15. package/lib/cjs/gamification-feature.js +1 -1
  16. package/lib/cjs/gamification-feature2.js +1 -0
  17. package/lib/cjs/index.js +1 -1
  18. package/lib/cjs/index2.js +5 -0
  19. package/lib/cjs/insight.js +1 -1
  20. package/lib/cjs/masters.js +1 -0
  21. package/lib/cjs/masters2.js +9 -0
  22. package/lib/cjs/notification.js +1 -1
  23. package/lib/cjs/points.js +1 -1
  24. package/lib/cjs/provider.js +98 -85
  25. package/lib/cjs/useStreamLayerApp2.js +17 -15
  26. package/lib/classic/app/advertisement.d.ts +18 -0
  27. package/lib/classic/app/app.d.ts +19 -0
  28. package/lib/classic/{auth.d.ts → app/auth.d.ts} +4 -13
  29. package/lib/classic/app/bet-pack.d.ts +20 -0
  30. package/lib/classic/app/event.d.ts +4 -0
  31. package/lib/classic/app/insight.d.ts +13 -0
  32. package/lib/classic/app/masters.d.ts +28 -0
  33. package/lib/classic/app/notification.d.ts +5 -0
  34. package/lib/classic/app/points.d.ts +3 -0
  35. package/lib/classic/app/provider.d.ts +43 -0
  36. package/lib/classic/app/useStreamLayerApp.d.ts +19 -0
  37. package/lib/classic/cjs/advertisement.js +1 -1
  38. package/lib/classic/cjs/auth.js +1 -1
  39. package/lib/classic/cjs/bet-pack.js +1 -0
  40. package/lib/classic/cjs/gamification-feature.js +1 -1
  41. package/lib/classic/cjs/gamification-feature2.js +1 -0
  42. package/lib/classic/cjs/index.js +1 -1
  43. package/lib/classic/cjs/index2.js +5 -0
  44. package/lib/classic/cjs/insight.js +1 -1
  45. package/lib/classic/cjs/masters.js +1 -0
  46. package/lib/classic/cjs/masters2.js +9 -0
  47. package/lib/classic/cjs/notification.js +1 -1
  48. package/lib/classic/cjs/points.js +1 -1
  49. package/lib/classic/cjs/provider.js +98 -85
  50. package/lib/classic/cjs/useStreamLayerApp2.js +17 -15
  51. package/lib/classic/es/advertisement.js +617 -717
  52. package/lib/classic/es/auth.js +2 -5
  53. package/lib/classic/es/bet-pack.js +14 -0
  54. package/lib/classic/es/gamification-feature.js +1 -1
  55. package/lib/classic/es/gamification-feature2.js +4 -0
  56. package/lib/classic/es/index.js +14 -11
  57. package/lib/classic/es/index2.js +2890 -0
  58. package/lib/classic/es/insight.js +33 -33
  59. package/lib/classic/es/masters.js +8 -0
  60. package/lib/classic/es/masters2.js +981 -0
  61. package/lib/classic/es/notification.js +378 -453
  62. package/lib/classic/es/points.js +39 -64
  63. package/lib/classic/es/provider.js +16443 -13824
  64. package/lib/classic/es/useStreamLayerApp2.js +8187 -4455
  65. package/lib/classic/index.d.ts +14 -218
  66. package/lib/classic/masters.d.ts +9 -0
  67. package/lib/classic/style.css +1 -455
  68. package/lib/dist/cjs/gamification-feature.js +1 -0
  69. package/lib/dist/cjs/gamification-feature2.js +1 -0
  70. package/lib/dist/cjs/index.js +1 -0
  71. package/lib/dist/cjs/masters.js +223 -0
  72. package/lib/dist/cjs/package.json +1 -0
  73. package/lib/dist/es/gamification-feature.js +4 -0
  74. package/lib/dist/es/gamification-feature2.js +123 -0
  75. package/lib/dist/es/index.js +11 -0
  76. package/lib/dist/es/masters.js +45904 -0
  77. package/lib/dist/es/package.json +1 -0
  78. package/lib/dist/style.css +1 -0
  79. package/lib/es/advertisement.js +617 -717
  80. package/lib/es/auth.js +2 -5
  81. package/lib/es/bet-pack.js +14 -0
  82. package/lib/es/gamification-feature.js +1 -1
  83. package/lib/es/gamification-feature2.js +4 -0
  84. package/lib/es/index.js +14 -11
  85. package/lib/es/index2.js +2890 -0
  86. package/lib/es/insight.js +33 -33
  87. package/lib/es/masters.js +8 -0
  88. package/lib/es/masters2.js +981 -0
  89. package/lib/es/notification.js +378 -453
  90. package/lib/es/points.js +39 -64
  91. package/lib/es/provider.js +16267 -13641
  92. package/lib/es/useStreamLayerApp2.js +8187 -4455
  93. package/lib/index.d.ts +14 -218
  94. package/lib/masters.d.ts +9 -0
  95. package/lib/style.css +1 -1
  96. package/package.json +57 -3
  97. package/lib/advertisement.d.ts +0 -146
  98. package/lib/classic/advertisement.d.ts +0 -146
  99. package/lib/classic/insight.d.ts +0 -136
  100. package/lib/classic/notification.d.ts +0 -120
  101. package/lib/classic/points.d.ts +0 -12
  102. package/lib/classic/useStreamLayerApp.d.ts +0 -167
  103. package/lib/insight.d.ts +0 -136
  104. package/lib/notification.d.ts +0 -120
  105. package/lib/points.d.ts +0 -12
  106. package/lib/useStreamLayerApp.d.ts +0 -167
@@ -1,218 +1,14 @@
1
- declare type CancelMountCb = () => void;
2
-
3
- export declare type ContentActivateParams = {
4
- stage: 'activate' | 'deactivate';
5
- id: string;
6
- isViewed?: boolean;
7
- hasNotification?: boolean;
8
- type: 'advertisement' | 'insight' | 'poll' | 'trivia' | 'prediction' | 'tweet' | 'question';
9
- };
10
-
11
- declare const DEEP_LINK_EVENT_ID = "sldl_eid";
12
-
13
- declare const DEEP_LINK_EXTERNAL_EVENT_ID = "sldl_e_eid";
14
-
15
- declare const DEEP_LINK_USER_ID = "sldl_uid";
16
-
17
- export declare type DeepLinkCallback = (deepLinkData: DeepLinkContextData['data']) => void;
18
-
19
- declare type DeepLinkContextData = {
20
- handled?: boolean;
21
- parsed?: boolean;
22
- used?: boolean;
23
- data?: DeepLinkUrlParams;
24
- };
25
-
26
- declare type DeepLinkUrlParams = {
27
- [DEEP_LINK_USER_ID]?: string;
28
- [DEEP_LINK_EVENT_ID]?: string;
29
- [DEEP_LINK_EXTERNAL_EVENT_ID]?: string;
30
- };
31
-
32
- declare type DoneFn = Function;
33
-
34
- export declare type OnContentActivateCallback = (renderData: ContentActivateParams) => void;
35
-
36
- declare type OnMountCb = () => CancelMountCb;
37
-
38
- /**
39
- * @generated from enum streamlayer.sdkSettings.SdkOverlayType
40
- */
41
- declare enum SdkOverlayType {
42
- /**
43
- * @generated from enum value: SDK_OVERLAY_TYPE_UNSET = 0;
44
- */
45
- UNSET = 0,
46
-
47
- /**
48
- * betting legacy
49
- *
50
- * @generated from enum value: SDK_OVERLAY_TYPE_INPLAY = 1;
51
- */
52
- INPLAY = 1,
53
-
54
- /**
55
- * @generated from enum value: SDK_OVERLAY_TYPE_MESSAGING = 2;
56
- */
57
- MESSAGING = 2,
58
-
59
- /**
60
- * @generated from enum value: SDK_OVERLAY_TYPE_STATISTICS = 3;
61
- */
62
- STATISTICS = 3,
63
-
64
- /**
65
- * betting
66
- *
67
- * @generated from enum value: SDK_OVERLAY_TYPE_BETTING = 4;
68
- */
69
- BETTING = 4,
70
-
71
- /**
72
- * @generated from enum value: SDK_OVERLAY_TYPE_TWITTER = 5;
73
- */
74
- TWITTER = 5,
75
-
76
- /**
77
- * @generated from enum value: SDK_OVERLAY_TYPE_MERCHANDISE = 6;
78
- */
79
- MERCHANDISE = 6,
80
-
81
- /**
82
- * @generated from enum value: SDK_OVERLAY_TYPE_CONTESTS = 7;
83
- */
84
- CONTESTS = 7,
85
-
86
- /**
87
- * WatchParty
88
- *
89
- * @generated from enum value: SDK_OVERLAY_TYPE_VOICE_CHAT = 8;
90
- */
91
- VOICE_CHAT = 8,
92
-
93
- /**
94
- * @generated from enum value: SDK_OVERLAY_TYPE_TICKETS = 9;
95
- */
96
- TICKETS = 9,
97
-
98
- /**
99
- * @generated from enum value: SDK_OVERLAY_TYPE_WHOIS_WATCHING = 10;
100
- */
101
- WHOIS_WATCHING = 10,
102
-
103
- /**
104
- * @generated from enum value: SDK_OVERLAY_TYPE_PROFILE = 11;
105
- */
106
- PROFILE = 11,
107
-
108
- /**
109
- * @generated from enum value: SDK_OVERLAY_TYPE_GAMES = 12;
110
- */
111
- GAMES = 12,
112
-
113
- /**
114
- * @generated from enum value: SDK_OVERLAY_TYPE_GOLF_STATISTICS = 13;
115
- */
116
- GOLF_STATISTICS = 13,
117
-
118
- /**
119
- * @generated from enum value: SDK_OVERLAY_TYPE_HIGHLIGHTS = 14;
120
- */
121
- HIGHLIGHTS = 14,
122
-
123
- /**
124
- * @generated from enum value: SDK_OVERLAY_TYPE_PUBLIC_CHAT = 15;
125
- */
126
- PUBLIC_CHAT = 15,
127
- }
128
-
129
- declare interface StreamLayerOptions {
130
- }
131
-
132
- declare type StreamLayerPlugin<T = unknown> = (instance: StreamLayerContext, opts: T, done: DoneFn) => void;
133
-
134
- declare type StreamLayerProps = {
135
- sdkKey: string;
136
- plugins?: Set<StreamLayerPlugin>;
137
- event?: string;
138
- production?: boolean;
139
- autoEnable?: boolean;
140
- onDeepLinkHandled?: DeepLinkCallback;
141
- videoPlayerController?: VideoPlayerCallback;
142
- onContentActivate?: OnContentActivateCallback;
143
- theme?: string;
144
- withAdNotification?: boolean;
145
- withAd?: boolean;
146
- friendsTab?: 'enabled' | 'disabled' | 'activatedGame';
147
- themeMode?: 'light' | 'dark';
148
- };
149
-
150
- export declare const StreamLayerProvider: React.FC<StreamLayerProps & {
151
- children: React.ReactNode;
152
- }>;
153
-
154
- declare interface StreamLayerSDK {
155
- onMount: (opts: {
156
- name: string;
157
- clear?: boolean;
158
- }, cb: OnMountCb) => void;
159
- closeFeature: (destroy?: boolean) => void;
160
- openFeature: (featureType: SdkOverlayType) => void;
161
- }
162
-
163
- export declare const StreamLayerSDKEvent: React.FC<StreamLayerSDKEventProps>;
164
-
165
- export declare type StreamLayerSDKEventProps = {
166
- event?: string;
167
- };
168
-
169
- export declare const StreamLayerSDKNotification: React.FC<{
170
- theme?: string;
171
- }>;
172
-
173
- export declare const StreamLayerSDKNotificationUI: React.FC<{
174
- sdk: StreamLayerSDK;
175
- }>;
176
-
177
- export declare const StreamLayerSDKReact: React.FC<{
178
- event?: string;
179
- topNavigation?: boolean;
180
- withSidebarNotification?: boolean;
181
- theme?: string;
182
- }>;
183
-
184
- export declare const StreamLayerThemeProvider: React.FC<{
185
- children: React.ReactNode;
186
- style?: React.CSSProperties;
187
- themeMode?: 'light' | 'dark';
188
- customTheme?: string;
189
- }>;
190
-
191
- export declare const useStreamLayer: () => StreamLayerSDK | null;
192
-
193
- export declare const useStreamLayerTheme: () => Pick<StreamLayerOptions, "theme" | "themeMode">;
194
-
195
- export declare const useStreamLayerUI: () => {
196
- promotionExternalAd?: boolean;
197
- promotionSidebar?: boolean;
198
- promotionOverlay?: boolean;
199
- promotionNotification?: boolean;
200
- promotionBanner?: boolean;
201
- app?: boolean;
202
- appNotification?: boolean;
203
- };
204
-
205
- export declare type VideoPlayerCallback = (videoPlayerData: VideoPlayerData) => void;
206
-
207
- declare type VideoPlayerData = {
208
- muted: boolean;
209
- };
210
-
211
- export { }
212
-
213
-
214
- declare global {
215
- interface Window {
216
- sl: unknown;
217
- }
218
- }
1
+ import '@streamlayer/sdk-web-api';
2
+ import '@streamlayer/sdk-web-core';
3
+ import '@streamlayer/sdk-web-types';
4
+ import '@streamlayer/sdk-web-logger';
5
+ import '@streamlayer/sdk-web-storage';
6
+ import '@streamlayer/sdk-web-features';
7
+ import '@streamlayer/sdk-web-interfaces';
8
+ import '@streamlayer/sdk-web-notifications';
9
+ import '@streamlayer/feature-gamification';
10
+ export { StreamLayerThemeProvider } from '@streamlayer/react-ui';
11
+ export { StreamLayerProvider, type DeepLinkCallback, type VideoPlayerCallback, type ContentActivateParams, type OnContentActivateCallback, } from './app/provider';
12
+ export { StreamLayerSDKEvent, type StreamLayerSDKEventProps } from './app/event';
13
+ export { StreamLayerSDKReact, useStreamLayer, useStreamLayerUI, useStreamLayerTheme } from './app/app';
14
+ export { StreamLayerSDKNotification, StreamLayerSDKNotificationUI } from './app/notification';
@@ -0,0 +1,9 @@
1
+ import { BetPackProps, BetPackOverlayProps } from './app/bet-pack';
2
+ export * from './app/masters';
3
+ export * from './app/auth';
4
+ export { type DeepLinkCallback, type VideoPlayerCallback } from './app/provider';
5
+ export declare const BetPack: React.FC<BetPackProps & BetPackOverlayProps>;
6
+ export declare const BetPackStandalone: React.FC<{
7
+ production?: boolean;
8
+ }>;
9
+ export declare const StreamLayerSDKPoints: () => import("react/jsx-runtime").JSX.Element | null;