@kontextso/sdk-react-native 0.1.1-rc.1 → 1.0.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.
package/dist/index.d.mts CHANGED
@@ -1,63 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import React from 'react';
3
- import { AdsProviderProps } from '@kontextso/sdk-common';
4
- export { useAd } from '@kontextso/sdk-common';
5
- import { StyleProp, TextStyle, ViewStyle, ImageStyle } from 'react-native';
2
+ import { FormatProps } from '@kontextso/sdk-react';
3
+ export { AdsProvider } from '@kontextso/sdk-react';
6
4
 
7
- interface AdProps {
8
- code: string;
9
- messageId?: string;
10
- wrapper?: (children: React.ReactNode) => JSX.Element;
11
- }
12
- declare const InlineAd: ({ code, messageId, wrapper }: AdProps) => react_jsx_runtime.JSX.Element | null;
5
+ declare const InlineAd: ({ code, messageId, wrapper, ...props }: FormatProps) => react_jsx_runtime.JSX.Element;
13
6
 
14
- type InlineAdStyles = {
15
- adBadgeContainer: StyleProp<TextStyle>;
16
- adBadgeText: StyleProp<TextStyle>;
17
- container: StyleProp<ViewStyle>;
18
- imageContainer: StyleProp<ViewStyle>;
19
- contentContainer: StyleProp<TextStyle>;
20
- image: StyleProp<ImageStyle>;
21
- adBadge: StyleProp<ViewStyle>;
22
- };
23
- type MarkdownStyles = {
24
- link: StyleProp<TextStyle>;
25
- em: StyleProp<TextStyle>;
26
- normal: StyleProp<TextStyle>;
27
- };
28
- type VideoPlayerStyles = {
29
- videoOuterContainerVertical: StyleProp<ViewStyle>;
30
- videoOuterContainerHorizontal: StyleProp<ViewStyle>;
31
- videoInnerContainerVertical: StyleProp<ViewStyle>;
32
- videoInnerContainerHorizontal: StyleProp<ViewStyle>;
33
- videoElementVertical: StyleProp<ViewStyle>;
34
- videoElementHorizontal: StyleProp<ViewStyle>;
35
- pauseOverlay: StyleProp<ViewStyle>;
36
- playOverlay: StyleProp<ViewStyle>;
37
- endOverlayTouch: StyleProp<ViewStyle>;
38
- videoBadgeText: StyleProp<TextStyle>;
39
- playButton: StyleProp<TextStyle>;
40
- videoBadge: StyleProp<ViewStyle>;
41
- endOverlay: StyleProp<ViewStyle>;
42
- endButton: StyleProp<TextStyle>;
43
- endText: StyleProp<TextStyle>;
44
- videoPlacementTop: StyleProp<ViewStyle>;
45
- videoPlacementBottom: StyleProp<ViewStyle>;
46
- videoProgress: {
47
- progressContainer: StyleProp<ViewStyle>;
48
- progressBar: StyleProp<ViewStyle>;
49
- };
50
- };
51
- type AdStyles = {
52
- inlineAd?: Partial<InlineAdStyles>;
53
- markdownText?: Partial<MarkdownStyles>;
54
- videoPlayer?: Partial<VideoPlayerStyles>;
55
- };
56
-
57
- declare const VISITOR_ID_KEY = "brain-visitor-id";
58
- type ReactNativeAdsProviderProps = Omit<AdsProviderProps, "customFetch" | "reactNativePropStyles" | "isReactNative"> & {
59
- styles: AdStyles;
60
- };
61
- declare const AdsProvider: ({ children, messages, publisherToken, isLoading, adserverUrl, isDisabled, character, conversationId, userId, logLevel, onAdView, onAdClick, styles, }: ReactNativeAdsProviderProps) => react_jsx_runtime.JSX.Element;
62
-
63
- export { type AdStyles, AdsProvider, InlineAd, VISITOR_ID_KEY };
7
+ export { InlineAd };
package/dist/index.d.ts CHANGED
@@ -1,63 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import React from 'react';
3
- import { AdsProviderProps } from '@kontextso/sdk-common';
4
- export { useAd } from '@kontextso/sdk-common';
5
- import { StyleProp, TextStyle, ViewStyle, ImageStyle } from 'react-native';
2
+ import { FormatProps } from '@kontextso/sdk-react';
3
+ export { AdsProvider } from '@kontextso/sdk-react';
6
4
 
7
- interface AdProps {
8
- code: string;
9
- messageId?: string;
10
- wrapper?: (children: React.ReactNode) => JSX.Element;
11
- }
12
- declare const InlineAd: ({ code, messageId, wrapper }: AdProps) => react_jsx_runtime.JSX.Element | null;
5
+ declare const InlineAd: ({ code, messageId, wrapper, ...props }: FormatProps) => react_jsx_runtime.JSX.Element;
13
6
 
14
- type InlineAdStyles = {
15
- adBadgeContainer: StyleProp<TextStyle>;
16
- adBadgeText: StyleProp<TextStyle>;
17
- container: StyleProp<ViewStyle>;
18
- imageContainer: StyleProp<ViewStyle>;
19
- contentContainer: StyleProp<TextStyle>;
20
- image: StyleProp<ImageStyle>;
21
- adBadge: StyleProp<ViewStyle>;
22
- };
23
- type MarkdownStyles = {
24
- link: StyleProp<TextStyle>;
25
- em: StyleProp<TextStyle>;
26
- normal: StyleProp<TextStyle>;
27
- };
28
- type VideoPlayerStyles = {
29
- videoOuterContainerVertical: StyleProp<ViewStyle>;
30
- videoOuterContainerHorizontal: StyleProp<ViewStyle>;
31
- videoInnerContainerVertical: StyleProp<ViewStyle>;
32
- videoInnerContainerHorizontal: StyleProp<ViewStyle>;
33
- videoElementVertical: StyleProp<ViewStyle>;
34
- videoElementHorizontal: StyleProp<ViewStyle>;
35
- pauseOverlay: StyleProp<ViewStyle>;
36
- playOverlay: StyleProp<ViewStyle>;
37
- endOverlayTouch: StyleProp<ViewStyle>;
38
- videoBadgeText: StyleProp<TextStyle>;
39
- playButton: StyleProp<TextStyle>;
40
- videoBadge: StyleProp<ViewStyle>;
41
- endOverlay: StyleProp<ViewStyle>;
42
- endButton: StyleProp<TextStyle>;
43
- endText: StyleProp<TextStyle>;
44
- videoPlacementTop: StyleProp<ViewStyle>;
45
- videoPlacementBottom: StyleProp<ViewStyle>;
46
- videoProgress: {
47
- progressContainer: StyleProp<ViewStyle>;
48
- progressBar: StyleProp<ViewStyle>;
49
- };
50
- };
51
- type AdStyles = {
52
- inlineAd?: Partial<InlineAdStyles>;
53
- markdownText?: Partial<MarkdownStyles>;
54
- videoPlayer?: Partial<VideoPlayerStyles>;
55
- };
56
-
57
- declare const VISITOR_ID_KEY = "brain-visitor-id";
58
- type ReactNativeAdsProviderProps = Omit<AdsProviderProps, "customFetch" | "reactNativePropStyles" | "isReactNative"> & {
59
- styles: AdStyles;
60
- };
61
- declare const AdsProvider: ({ children, messages, publisherToken, isLoading, adserverUrl, isDisabled, character, conversationId, userId, logLevel, onAdView, onAdClick, styles, }: ReactNativeAdsProviderProps) => react_jsx_runtime.JSX.Element;
62
-
63
- export { type AdStyles, AdsProvider, InlineAd, VISITOR_ID_KEY };
7
+ export { InlineAd };