@streamlayer/react 0.0.1-debug.1
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/README.md +6 -0
- package/lib/app/advertisement.d.ts +19 -0
- package/lib/app/app.d.ts +23 -0
- package/lib/app/auth.d.ts +4 -0
- package/lib/app/bet-pack.d.ts +10 -0
- package/lib/app/event.d.ts +6 -0
- package/lib/app/insight.d.ts +13 -0
- package/lib/app/masters.d.ts +23 -0
- package/lib/app/notification.d.ts +5 -0
- package/lib/app/pause-ad.d.ts +38 -0
- package/lib/app/points.d.ts +3 -0
- package/lib/app/provider.d.ts +49 -0
- package/lib/app/useStreamLayerApp.d.ts +23 -0
- package/lib/cjs/advertisement.js +219 -0
- package/lib/cjs/auth.js +1 -0
- package/lib/cjs/bet-pack.js +1 -0
- package/lib/cjs/gamification-feature.js +1 -0
- package/lib/cjs/gamification-feature2.js +1 -0
- package/lib/cjs/index-l-eyvmpL.js +5 -0
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/index2.js +5 -0
- package/lib/cjs/insight.js +1 -0
- package/lib/cjs/masters.js +1 -0
- package/lib/cjs/masters2.js +13 -0
- package/lib/cjs/notification.js +1 -0
- package/lib/cjs/pause-ad.js +1 -0
- package/lib/cjs/points.js +1 -0
- package/lib/cjs/provider.js +84 -0
- package/lib/cjs/useStreamLayerApp.js +1 -0
- package/lib/cjs/useStreamLayerApp2.js +16 -0
- package/lib/cjs/vast-client.min-B0NUra1B.js +1 -0
- package/lib/classic/app/advertisement.d.ts +19 -0
- package/lib/classic/app/app.d.ts +23 -0
- package/lib/classic/app/auth.d.ts +4 -0
- package/lib/classic/app/bet-pack.d.ts +10 -0
- package/lib/classic/app/event.d.ts +6 -0
- package/lib/classic/app/insight.d.ts +13 -0
- package/lib/classic/app/masters.d.ts +23 -0
- package/lib/classic/app/notification.d.ts +5 -0
- package/lib/classic/app/pause-ad.d.ts +38 -0
- package/lib/classic/app/points.d.ts +3 -0
- package/lib/classic/app/provider.d.ts +49 -0
- package/lib/classic/app/useStreamLayerApp.d.ts +23 -0
- package/lib/classic/cjs/advertisement.js +219 -0
- package/lib/classic/cjs/auth.js +1 -0
- package/lib/classic/cjs/bet-pack.js +5 -0
- package/lib/classic/cjs/gamification-feature.js +1 -0
- package/lib/classic/cjs/index-l-eyvmpL.js +5 -0
- package/lib/classic/cjs/index.js +1 -0
- package/lib/classic/cjs/insight.js +1 -0
- package/lib/classic/cjs/notification.js +1 -0
- package/lib/classic/cjs/pause-ad.js +1 -0
- package/lib/classic/cjs/points.js +1 -0
- package/lib/classic/cjs/provider.js +68 -0
- package/lib/classic/cjs/useStreamLayerApp.js +1 -0
- package/lib/classic/cjs/useStreamLayerApp2.js +16 -0
- package/lib/classic/cjs/vast-client.min-B0NUra1B.js +1 -0
- package/lib/classic/es/advertisement.js +34410 -0
- package/lib/classic/es/auth.js +11 -0
- package/lib/classic/es/bet-pack.js +3427 -0
- package/lib/classic/es/gamification-feature.js +4 -0
- package/lib/classic/es/index-l-eyvmpL.js +3758 -0
- package/lib/classic/es/index.js +19 -0
- package/lib/classic/es/insight.js +82 -0
- package/lib/classic/es/notification.js +1008 -0
- package/lib/classic/es/pause-ad.js +253 -0
- package/lib/classic/es/points.js +76 -0
- package/lib/classic/es/provider.js +7264 -0
- package/lib/classic/es/useStreamLayerApp.js +5 -0
- package/lib/classic/es/useStreamLayerApp2.js +8282 -0
- package/lib/classic/es/vast-client.min-B0NUra1B.js +1060 -0
- package/lib/classic/index.d.ts +5 -0
- package/lib/classic/masters.d.ts +8 -0
- package/lib/dist/cjs/gamification-feature.js +1 -0
- package/lib/dist/cjs/gamification-feature2.js +1 -0
- package/lib/dist/cjs/index.js +1 -0
- package/lib/dist/cjs/masters.js +76 -0
- package/lib/dist/cjs/package.json +1 -0
- package/lib/dist/es/gamification-feature.js +4 -0
- package/lib/dist/es/gamification-feature2.js +285 -0
- package/lib/dist/es/index.js +15 -0
- package/lib/dist/es/masters.js +18614 -0
- package/lib/dist/es/package.json +1 -0
- package/lib/dist/style.css +1 -0
- package/lib/es/advertisement.js +34410 -0
- package/lib/es/auth.js +11 -0
- package/lib/es/bet-pack.js +19 -0
- package/lib/es/gamification-feature.js +4 -0
- package/lib/es/gamification-feature2.js +4 -0
- package/lib/es/index-l-eyvmpL.js +3758 -0
- package/lib/es/index.js +19 -0
- package/lib/es/index2.js +3415 -0
- package/lib/es/insight.js +82 -0
- package/lib/es/masters.js +9 -0
- package/lib/es/masters2.js +873 -0
- package/lib/es/notification.js +1008 -0
- package/lib/es/pause-ad.js +253 -0
- package/lib/es/points.js +76 -0
- package/lib/es/provider.js +7685 -0
- package/lib/es/useStreamLayerApp.js +5 -0
- package/lib/es/useStreamLayerApp2.js +8282 -0
- package/lib/es/vast-client.min-B0NUra1B.js +1060 -0
- package/lib/index.d.ts +5 -0
- package/lib/masters.d.ts +8 -0
- package/lib/style.css +1 -0
- package/package.json +158 -0
package/README.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
muted?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export { StreamLayerSDKAdvertisementUI };
|
|
19
|
+
export declare const StreamLayerSDKAdvertisement: React.FC<StreamLayerSDKAdvertisementProps>;
|
package/lib/app/app.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
appSidebar?: boolean;
|
|
14
|
+
appBanner?: boolean;
|
|
15
|
+
onboardingNotification?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare const StreamLayerSDKReact: React.FC<{
|
|
18
|
+
event?: string;
|
|
19
|
+
topNavigation?: boolean;
|
|
20
|
+
withSidebarNotification?: boolean;
|
|
21
|
+
muted?: boolean;
|
|
22
|
+
theme?: string;
|
|
23
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type BetPackProps = {
|
|
2
|
+
event: string;
|
|
3
|
+
theme?: string;
|
|
4
|
+
token?: string;
|
|
5
|
+
deviceId?: string;
|
|
6
|
+
sdkKey: string;
|
|
7
|
+
themeMode?: 'light' | 'dark';
|
|
8
|
+
production?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const BetPackProvider: () => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
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>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Component, ErrorInfo } from 'react';
|
|
2
|
+
import { StreamLayerProps } from './provider';
|
|
3
|
+
import '@streamlayer/react-ui/style.css';
|
|
4
|
+
export { useStreamLayer } from './app';
|
|
5
|
+
export declare const MastersStreamLayerProvider: React.FC<Omit<StreamLayerProps, 'autoEnable' | 'friendsTab' | 'hideFriends'> & {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}>;
|
|
8
|
+
export declare class MastersStreamLayerSDKReact extends Component<{
|
|
9
|
+
betPack?: boolean;
|
|
10
|
+
useContainer?: boolean;
|
|
11
|
+
}, {
|
|
12
|
+
hasError: boolean;
|
|
13
|
+
}> {
|
|
14
|
+
constructor(props: {
|
|
15
|
+
betPack?: boolean;
|
|
16
|
+
useContainer?: boolean;
|
|
17
|
+
});
|
|
18
|
+
static getDerivedStateFromError(): {
|
|
19
|
+
hasError: boolean;
|
|
20
|
+
};
|
|
21
|
+
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
22
|
+
render(): import("react/jsx-runtime").JSX.Element | null;
|
|
23
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import { VideoPlayerCallback } from './provider';
|
|
3
|
+
import '@streamlayer/sdk-web-api';
|
|
4
|
+
import '@streamlayer/sdk-web-core';
|
|
5
|
+
import '@streamlayer/sdk-web-types';
|
|
6
|
+
import '@streamlayer/sdk-web-logger';
|
|
7
|
+
import '@streamlayer/sdk-web-storage';
|
|
8
|
+
import '@streamlayer/sdk-web-features';
|
|
9
|
+
import '@streamlayer/sdk-web-interfaces';
|
|
10
|
+
import '@streamlayer/sdk-web-notifications';
|
|
11
|
+
import '@streamlayer/feature-gamification';
|
|
12
|
+
export type StreamLayerPauseAdProps = {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
showPauseAd?: boolean;
|
|
15
|
+
pauseAdVastUrl?: Array<{
|
|
16
|
+
template?: 'default';
|
|
17
|
+
url: string;
|
|
18
|
+
}>;
|
|
19
|
+
onClosePauseAd?: () => void;
|
|
20
|
+
videoPlayerController?: VideoPlayerCallback;
|
|
21
|
+
onRenderPauseAd?: (params: {
|
|
22
|
+
rendered: boolean;
|
|
23
|
+
}) => void;
|
|
24
|
+
options?: {
|
|
25
|
+
showPauseButton?: boolean;
|
|
26
|
+
pauseAdDelay?: number;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export declare class StreamLayerPauseAd extends Component<StreamLayerPauseAdProps, {
|
|
30
|
+
hasError: boolean;
|
|
31
|
+
}> {
|
|
32
|
+
constructor(props: StreamLayerPauseAdProps);
|
|
33
|
+
static getDerivedStateFromError(): {
|
|
34
|
+
hasError: boolean;
|
|
35
|
+
};
|
|
36
|
+
componentDidCatch(error: Error, info: React.ErrorInfo): void;
|
|
37
|
+
render(): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import('react').ReactNode> | null | undefined;
|
|
38
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
play?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type VideoPlayerCallback = (videoPlayerData: VideoPlayerData) => void;
|
|
16
|
+
export type OnContentActivateCallback = (renderData: ContentActivateParams) => void;
|
|
17
|
+
export declare enum StreamLayerStatus {
|
|
18
|
+
UNSET = 0,
|
|
19
|
+
CONNECTED = 1,
|
|
20
|
+
READY = 2
|
|
21
|
+
}
|
|
22
|
+
export declare const StreamLayerContext: import('react').Context<{
|
|
23
|
+
status: StreamLayerStatus;
|
|
24
|
+
sdk: StreamLayerSDK | null;
|
|
25
|
+
event?: React.MutableRefObject<string>;
|
|
26
|
+
}>;
|
|
27
|
+
export type StreamLayerProps = {
|
|
28
|
+
sdkKey: string;
|
|
29
|
+
plugins?: Set<StreamLayerPlugin>;
|
|
30
|
+
event?: string;
|
|
31
|
+
production?: boolean;
|
|
32
|
+
autoEnable?: boolean;
|
|
33
|
+
onDeepLinkHandled?: DeepLinkCallback;
|
|
34
|
+
videoPlayerController?: VideoPlayerCallback;
|
|
35
|
+
onContentActivate?: OnContentActivateCallback;
|
|
36
|
+
theme?: string;
|
|
37
|
+
withAdNotification?: boolean;
|
|
38
|
+
withAd?: boolean;
|
|
39
|
+
hideFriends?: boolean;
|
|
40
|
+
friendsTab?: 'enabled' | 'disabled' | 'activatedGame';
|
|
41
|
+
themeMode?: 'light' | 'dark';
|
|
42
|
+
containerId?: string;
|
|
43
|
+
};
|
|
44
|
+
export declare const StreamLayerProvider: React.FC<StreamLayerProps & {
|
|
45
|
+
children: React.ReactNode;
|
|
46
|
+
skipOnboarding?: boolean;
|
|
47
|
+
betPack?: boolean;
|
|
48
|
+
webOS?: boolean;
|
|
49
|
+
}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
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, hideFriends, skipOnboarding, withAdNotification, withAd, friendsTab, betPack, webOS, }: {
|
|
9
|
+
sdkKey: string;
|
|
10
|
+
plugins?: Set<StreamLayerPlugin>;
|
|
11
|
+
production?: boolean;
|
|
12
|
+
autoEnable?: boolean;
|
|
13
|
+
onDeepLinkHandled?: DeepLinkCallback;
|
|
14
|
+
videoPlayerController?: VideoPlayerCallback;
|
|
15
|
+
onContentActivate?: OnContentActivateCallback;
|
|
16
|
+
skipOnboarding?: boolean;
|
|
17
|
+
withAdNotification?: boolean;
|
|
18
|
+
hideFriends?: boolean;
|
|
19
|
+
withAd?: boolean;
|
|
20
|
+
betPack?: boolean;
|
|
21
|
+
webOS?: boolean;
|
|
22
|
+
friendsTab: "enabled" | "disabled" | "activatedGame";
|
|
23
|
+
}) => StreamLayerSDK | null;
|