@inappstory/react-sdk 0.2.4 → 0.3.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.js +184 -4
- package/dist/types/appearance-manager/appearanceCommon.d.ts +15 -13
- package/dist/types/appearance-manager/gameReader.d.ts +30 -0
- package/dist/types/appearance-manager/goodsWidget.d.ts +43 -0
- package/dist/types/appearance-manager/index.d.ts +0 -3
- package/dist/types/appearance-manager/overrideByMediaQuery.d.ts +18 -0
- package/dist/types/appearance-manager/storiesList.d.ts +103 -85
- package/dist/types/appearance-manager/storyReader.ts +72 -64
- package/dist/types/global.d.ts +11 -0
- package/dist/types/ias-container/IasContainer.d.ts +10 -0
- package/dist/types/ias-container/appearanceOptionsProps.d.ts +17 -0
- package/dist/types/ias-container/index.d.ts +1 -1
- package/dist/types/ias-container/publicEvents.d.ts +86 -0
- package/dist/types/ias-container/storyManagerEventsProps.d.ts +31 -0
- package/dist/types/index.d.ts +4 -10
- package/dist/types/share-page/index.d.ts +1 -0
- package/dist/types/share-page/sharePage.d.ts +9 -0
- package/dist/types/story-list/FavoriteStoryList.d.ts +5 -6
- package/dist/types/story-list/StoryList.d.ts +12 -11
- package/dist/types/story-list/UGCStoryList.d.ts +10 -8
- package/dist/types/story-list/favoriteCardCompositeViewModel.ts +3 -3
- package/dist/types/story-list/favoriteStoryCardViewModel.d.ts +1 -2
- package/dist/types/story-list/index.d.ts +8 -8
- package/dist/types/story-list/navigationViewModel.d.ts +1 -3
- package/dist/types/story-list/storyCardViewModel.d.ts +3 -3
- package/dist/types/storyManager.d.ts +43 -0
- package/package.json +2 -2
- package/dist/types/appearance-manager/AppearanceManager.d.ts +0 -38
- package/dist/types/appearance-manager/AppearanceManager.h.d.ts +0 -26
- package/dist/types/appearance-manager/gameReader.ts +0 -33
- package/dist/types/appearance-manager/goodsWidget.ts +0 -39
- package/dist/types/appearance-manager/storyFavoriteReader.ts +0 -20
- package/dist/types/appearance-manager/utils.d.ts +0 -7
- package/dist/types/ias-container/ias-container.d.ts +0 -8
- package/dist/types/story-list/storyListViewModel.d.ts +0 -21
- package/dist/types/story-list/viewModel.d.ts +0 -5
- package/dist/types/story-manager/StoryManager.d.ts +0 -45
- package/dist/types/story-manager/StoryManager.h.d.ts +0 -21
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare enum CloseButtonPosition {
|
|
2
|
+
LEFT = "left",
|
|
3
|
+
RIGHT = "right"
|
|
4
|
+
}
|
|
2
5
|
|
|
3
|
-
export type AppearanceCommonOptions = {
|
|
4
|
-
hasFavorite
|
|
5
|
-
hasLike
|
|
6
|
-
hasShare
|
|
7
|
-
closeButtonPosition
|
|
8
|
-
loader
|
|
6
|
+
export type AppearanceCommonOptions = RecursivePartial<{
|
|
7
|
+
hasFavorite: boolean;
|
|
8
|
+
hasLike: boolean;
|
|
9
|
+
hasShare: boolean;
|
|
10
|
+
closeButtonPosition: CloseButtonPosition | "left" | "right";
|
|
11
|
+
loader: {
|
|
9
12
|
default: {
|
|
10
|
-
color:
|
|
11
|
-
accentColor:
|
|
13
|
+
color: string;
|
|
14
|
+
accentColor: string;
|
|
12
15
|
};
|
|
13
|
-
custom:
|
|
16
|
+
custom: string;
|
|
14
17
|
};
|
|
15
|
-
closeButton
|
|
18
|
+
closeButton: {
|
|
16
19
|
svgSrc: {
|
|
17
20
|
baseState: string;
|
|
18
21
|
};
|
|
19
22
|
};
|
|
20
|
-
|
|
21
|
-
};
|
|
23
|
+
}>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
|
|
2
|
+
import { CloseButtonPosition } from "./appearanceCommon";
|
|
3
|
+
|
|
4
|
+
export type GameReaderOptions = RecursivePartial<{
|
|
5
|
+
loader: {
|
|
6
|
+
default: {
|
|
7
|
+
color: string;
|
|
8
|
+
accentColor: string;
|
|
9
|
+
};
|
|
10
|
+
custom: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
closeButtonPosition: CloseButtonPosition | "left" | "right";
|
|
14
|
+
|
|
15
|
+
closeButton: {
|
|
16
|
+
svgSrc: {
|
|
17
|
+
baseState: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
backdropColor: string;
|
|
22
|
+
|
|
23
|
+
game: {
|
|
24
|
+
backdropColor: string;
|
|
25
|
+
};
|
|
26
|
+
}>;
|
|
27
|
+
|
|
28
|
+
export type OpenGameOptions = Partial<{
|
|
29
|
+
demoMode: boolean;
|
|
30
|
+
}>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export type Goods = Partial<{
|
|
2
|
+
imgSrc: string;
|
|
3
|
+
title: string;
|
|
4
|
+
subTitle: string;
|
|
5
|
+
price: string;
|
|
6
|
+
oldPrice: string;
|
|
7
|
+
sku: string;
|
|
8
|
+
rawData: any;
|
|
9
|
+
}>;
|
|
10
|
+
|
|
11
|
+
export type GoodsWidgetOptions = RecursivePartial<{
|
|
12
|
+
goodsList: GoodsListOptions;
|
|
13
|
+
goodsCard: GoodsCardOptions;
|
|
14
|
+
loader: {
|
|
15
|
+
default: {
|
|
16
|
+
color: string;
|
|
17
|
+
accentColor: string;
|
|
18
|
+
};
|
|
19
|
+
custom: string;
|
|
20
|
+
};
|
|
21
|
+
openGoodsWidgetHandler: (goodsList: Goods[]) => Promise<Goods[]>;
|
|
22
|
+
getCardHtml?: (goods: Goods, index: number) => string;
|
|
23
|
+
itemClickHandler?: (goods: Goods) => void;
|
|
24
|
+
}>;
|
|
25
|
+
|
|
26
|
+
export type GoodsCardOptions = Partial<{
|
|
27
|
+
mainTextColor: string;
|
|
28
|
+
oldPriceTextColor: string;
|
|
29
|
+
imageBackgroundColor: string;
|
|
30
|
+
imageCornerRadius: number;
|
|
31
|
+
titleFont: string;
|
|
32
|
+
subtitleFont: string;
|
|
33
|
+
priceFont: string;
|
|
34
|
+
oldPriceFont: string;
|
|
35
|
+
}>;
|
|
36
|
+
|
|
37
|
+
export type GoodsListOptions = Partial<{
|
|
38
|
+
closeBackgroundColor: string;
|
|
39
|
+
closeImage: string;
|
|
40
|
+
substrateHeight: number;
|
|
41
|
+
substrateColor: string;
|
|
42
|
+
dimColor: string;
|
|
43
|
+
}>;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
export * from "./appearanceCommon"
|
|
2
|
-
export * from "./AppearanceManager"
|
|
3
|
-
export * from "./AppearanceManager.h"
|
|
4
2
|
export * from "./gameReader"
|
|
5
3
|
export * from "./goodsWidget"
|
|
6
4
|
export * from "./storiesList"
|
|
7
|
-
export * from "./storyFavoriteReader"
|
|
8
5
|
export * from "./storyReader"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AppearanceCommonOptions } from "./appearanceCommon";
|
|
2
|
+
export { GameReaderOptions } from "./gameReader";
|
|
3
|
+
export { GoodsWidgetOptions } from "./goodsWidget";
|
|
4
|
+
export { StoriesListOptions } from "./storiesList";
|
|
5
|
+
export { StoryReaderOptions } from "./storyReader";
|
|
6
|
+
|
|
7
|
+
export type OverrideByMediaQuery<
|
|
8
|
+
Options extends
|
|
9
|
+
| AppearanceCommonOptions
|
|
10
|
+
| StoriesListOptions
|
|
11
|
+
| StoryReaderOptions
|
|
12
|
+
| GoodsWidgetOptions
|
|
13
|
+
| GameReaderOptions = any
|
|
14
|
+
> = Partial<{
|
|
15
|
+
viewportMinSize: number | "sm" | "md" | "lg" | "xl";
|
|
16
|
+
mediaQuery: null | string;
|
|
17
|
+
options: Options;
|
|
18
|
+
}>;
|
|
@@ -1,128 +1,146 @@
|
|
|
1
|
-
|
|
1
|
+
export declare enum StoriesListSliderAlign {
|
|
2
|
+
CENTER = "center",
|
|
3
|
+
LEFT = "left",
|
|
4
|
+
RIGHT = "right"
|
|
5
|
+
}
|
|
2
6
|
|
|
3
|
-
export
|
|
7
|
+
export declare enum StoriesListCardViewVariant {
|
|
8
|
+
CIRCLE = "circle",
|
|
9
|
+
QUAD = "quad",
|
|
10
|
+
RECTANGLE = "rectangle"
|
|
11
|
+
}
|
|
4
12
|
|
|
5
|
-
export
|
|
6
|
-
|
|
13
|
+
export declare enum StoriesListCardTitleTextAlign {
|
|
14
|
+
LEFT = "left",
|
|
15
|
+
CENTER = "center",
|
|
16
|
+
RIGHT = "right"
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export declare enum StoriesListCardTitlePosition {
|
|
20
|
+
CARD_INSIDE_BOTTOM = "cardInsideBottom",
|
|
21
|
+
CARD_OUTSIDE_TOP = "cardOutsideTop",
|
|
22
|
+
CARD_OUTSIDE_BOTTOM = "cardOutsideBottom"
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export declare enum StoriesListCardCoverQuality {
|
|
26
|
+
Medium = "medium",
|
|
27
|
+
High = "high"
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export declare enum StoriesListDirection {
|
|
31
|
+
COLUMN = "vertical",
|
|
32
|
+
ROW = "horizontal"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type StoriesListOptions = RecursivePartial<{
|
|
36
|
+
direction: StoriesListDirection | "vertical" | "horizontal";
|
|
7
37
|
card: StoriesListCardOptions;
|
|
8
38
|
favoriteCard: StoriesListFavoriteCardOptions;
|
|
9
|
-
layout:
|
|
39
|
+
layout: {
|
|
10
40
|
height: number | string;
|
|
11
41
|
backgroundColor: string;
|
|
12
|
-
sliderAlign: StoriesListSliderAlign;
|
|
13
|
-
}
|
|
42
|
+
sliderAlign: StoriesListSliderAlign | "left" | "center" | "right";
|
|
43
|
+
};
|
|
14
44
|
sidePadding: number;
|
|
15
45
|
topPadding: number;
|
|
16
46
|
bottomPadding: number;
|
|
17
47
|
bottomMargin: number;
|
|
18
|
-
navigation:
|
|
48
|
+
navigation: {
|
|
19
49
|
speed: number;
|
|
20
50
|
showControls: boolean;
|
|
21
51
|
controlsSize: number;
|
|
22
52
|
controlsBackgroundColor: string;
|
|
23
53
|
controlsColor: string;
|
|
24
|
-
}
|
|
25
|
-
handleStoryLinkClick: (payload: StoriesListClickEvent) => void;
|
|
26
|
-
handleStartLoad: (loaderContainer: HTMLElement) => void;
|
|
27
|
-
handleStopLoad: (loaderContainer: HTMLElement) => void;
|
|
54
|
+
};
|
|
28
55
|
ugcCard: StoriesListUgcCardOptions;
|
|
29
56
|
}>;
|
|
30
|
-
export type StoriesListCardViewVariant = "circle" | "quad" | "rectangle"
|
|
31
|
-
|
|
32
|
-
export type StoriesListCardTitleTextAlign = "left" | "center" | "right"
|
|
33
57
|
|
|
34
|
-
export type
|
|
35
|
-
|
|
36
|
-
export type StoriesListCardCoverQuality = "medium" | "high"
|
|
37
|
-
|
|
38
|
-
export type StoriesListCardOptions = Partial<{
|
|
39
|
-
title: Partial<{
|
|
58
|
+
export type StoriesListCardOptions = RecursivePartial<{
|
|
59
|
+
title: {
|
|
40
60
|
color: string;
|
|
41
61
|
padding: string | number;
|
|
42
62
|
font: string;
|
|
43
63
|
display: boolean;
|
|
44
|
-
textAlign: StoriesListCardTitleTextAlign;
|
|
45
|
-
position: StoriesListCardTitlePosition;
|
|
64
|
+
textAlign: StoriesListCardTitleTextAlign | "left" | "center" | "right";
|
|
65
|
+
position: StoriesListCardTitlePosition | "cardInsideBottom" | "cardOutsideTop" | "cardOutsideBottom";
|
|
46
66
|
lineClamp: number;
|
|
47
|
-
}
|
|
67
|
+
};
|
|
48
68
|
gap: number;
|
|
49
69
|
height: number;
|
|
50
|
-
aspectRatio:
|
|
51
|
-
coverQuality: StoriesListCardCoverQuality;
|
|
70
|
+
aspectRatio: number;
|
|
71
|
+
coverQuality: StoriesListCardCoverQuality | "medium" | "high";
|
|
52
72
|
coverLazyLoading: boolean;
|
|
53
|
-
variant: StoriesListCardViewVariant;
|
|
54
|
-
border:
|
|
73
|
+
variant: StoriesListCardViewVariant | "circle" | "quad" | "rectangle";
|
|
74
|
+
border: {
|
|
55
75
|
radius: number;
|
|
56
76
|
color: string;
|
|
57
77
|
width: number;
|
|
58
78
|
gap: number;
|
|
59
|
-
gradient:
|
|
60
|
-
}
|
|
61
|
-
boxShadow:
|
|
62
|
-
dropShadow:
|
|
63
|
-
opacity:
|
|
64
|
-
mask:
|
|
65
|
-
color:
|
|
66
|
-
linearGradient
|
|
79
|
+
gradient: string;
|
|
80
|
+
};
|
|
81
|
+
boxShadow: string;
|
|
82
|
+
dropShadow: string;
|
|
83
|
+
opacity: number;
|
|
84
|
+
mask: {
|
|
85
|
+
color: string;
|
|
86
|
+
linearGradient: {
|
|
67
87
|
direction: string;
|
|
68
88
|
points: Array<string>;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
svgMask:
|
|
72
|
-
cardMask:
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
svgMask: {
|
|
92
|
+
cardMask: string;
|
|
73
93
|
overlayMask: Array<{
|
|
74
|
-
mask:
|
|
75
|
-
background:
|
|
76
|
-
}>;
|
|
77
|
-
}>>;
|
|
78
|
-
opened: Partial<{
|
|
79
|
-
border: Partial<{
|
|
80
|
-
radius: Optional<number>;
|
|
81
|
-
color: Optional<string>;
|
|
82
|
-
width: Optional<number>;
|
|
83
|
-
gap: Optional<number>;
|
|
84
|
-
gradient: Optional<string>;
|
|
94
|
+
mask: string;
|
|
95
|
+
background: string;
|
|
85
96
|
}>;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
97
|
+
};
|
|
98
|
+
opened: {
|
|
99
|
+
border: {
|
|
100
|
+
radius: number;
|
|
101
|
+
color: string;
|
|
102
|
+
width: number;
|
|
103
|
+
gap: number;
|
|
104
|
+
gradient: string;
|
|
105
|
+
};
|
|
106
|
+
boxShadow: string;
|
|
107
|
+
dropShadow: string;
|
|
108
|
+
opacity: number;
|
|
89
109
|
mask: {
|
|
90
|
-
color:
|
|
91
|
-
linearGradient:
|
|
110
|
+
color: string;
|
|
111
|
+
linearGradient: {
|
|
92
112
|
direction: string;
|
|
93
113
|
points: Array<string>;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
svgMask: {
|
|
117
|
+
cardMask: string;
|
|
118
|
+
overlayMask: Array<{
|
|
119
|
+
mask: string;
|
|
120
|
+
background: string;
|
|
94
121
|
}>;
|
|
95
122
|
};
|
|
96
|
-
svgMask: Optional<{
|
|
97
|
-
cardMask: Optional<string>;
|
|
98
|
-
overlayMask: Optional<Array<{
|
|
99
|
-
mask: Optional<string>;
|
|
100
|
-
background: Optional<string>;
|
|
101
|
-
}>>;
|
|
102
|
-
}>;
|
|
103
|
-
}>;
|
|
104
|
-
}>;
|
|
105
|
-
export type StoriesListFavoriteCardOptions = Partial<StoriesListCardOptions & {
|
|
106
|
-
title: StoriesListCardOptions["title"] & {
|
|
107
|
-
content: string;
|
|
108
123
|
};
|
|
109
124
|
}>;
|
|
110
125
|
|
|
111
|
-
export type
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
image: {
|
|
116
|
-
svgSrc: {
|
|
117
|
-
baseState: string;
|
|
126
|
+
export type StoriesListFavoriteCardOptions = RecursivePartial<
|
|
127
|
+
StoriesListCardOptions & {
|
|
128
|
+
title: StoriesListCardOptions["title"] & {
|
|
129
|
+
content: string;
|
|
118
130
|
};
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
export type
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
131
|
+
}
|
|
132
|
+
>;
|
|
133
|
+
|
|
134
|
+
export type StoriesListUgcCardOptions = RecursivePartial<
|
|
135
|
+
Omit<StoriesListCardOptions, "opened"> & {
|
|
136
|
+
title: StoriesListCardOptions["title"] & {
|
|
137
|
+
content: Option<string>;
|
|
138
|
+
};
|
|
139
|
+
image: {
|
|
140
|
+
svgSrc: {
|
|
141
|
+
baseState: string;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
backgroundColor: string;
|
|
145
|
+
}
|
|
146
|
+
>;
|
|
@@ -1,84 +1,92 @@
|
|
|
1
1
|
import { CloseButtonPosition } from "./appearanceCommon";
|
|
2
2
|
import { GameReaderOptions } from "./gameReader";
|
|
3
|
-
/// <reference path="../global.d.ts" />
|
|
4
3
|
|
|
5
|
-
export
|
|
4
|
+
export declare enum StoryReaderSwipeStyle {
|
|
5
|
+
FLAT = "flat",
|
|
6
|
+
COVER = "cover",
|
|
7
|
+
CUBE = "cube"
|
|
8
|
+
}
|
|
6
9
|
|
|
7
|
-
export
|
|
10
|
+
export declare enum SharePanelTargets {
|
|
11
|
+
VK = "vk",
|
|
12
|
+
OK = "ok",
|
|
13
|
+
FACEBOOK = "facebook",
|
|
14
|
+
X = "twitter",
|
|
15
|
+
LINKEDIN = "linkedin",
|
|
16
|
+
TELEGRAM = "telegram"
|
|
17
|
+
}
|
|
8
18
|
|
|
9
|
-
export type StoryReaderOptions = {
|
|
10
|
-
gameReaderOptions: GameReaderOptions
|
|
11
|
-
closeButtonPosition
|
|
12
|
-
scrollStyle: StoryReaderSwipeStyle
|
|
13
|
-
timelineBlockTopOffset: Nullable<number
|
|
14
|
-
actionPanelBottomOffset: Nullable<number
|
|
15
|
-
borderRadius:
|
|
16
|
-
loader
|
|
19
|
+
export type StoryReaderOptions = RecursivePartial<{
|
|
20
|
+
gameReaderOptions: GameReaderOptions;
|
|
21
|
+
closeButtonPosition: CloseButtonPosition | "left" | "right";
|
|
22
|
+
scrollStyle: StoryReaderSwipeStyle | "flat" | "cover" | "cube";
|
|
23
|
+
timelineBlockTopOffset: Nullable<number>;
|
|
24
|
+
actionPanelBottomOffset: Nullable<number>;
|
|
25
|
+
borderRadius: number;
|
|
26
|
+
loader: {
|
|
17
27
|
default: {
|
|
18
|
-
color:
|
|
19
|
-
accentColor:
|
|
20
|
-
}
|
|
21
|
-
custom:
|
|
22
|
-
}
|
|
23
|
-
recycleStoriesList
|
|
24
|
-
closeOnLastSlideByTimer
|
|
28
|
+
color: string;
|
|
29
|
+
accentColor: string;
|
|
30
|
+
};
|
|
31
|
+
custom: string;
|
|
32
|
+
};
|
|
33
|
+
recycleStoriesList: boolean;
|
|
34
|
+
closeOnLastSlideByTimer: boolean;
|
|
25
35
|
sharePanel: {
|
|
26
|
-
targets: Array<
|
|
27
|
-
copyButton
|
|
36
|
+
targets: SharePanelTargets[] | Array<"vk" | "ok" | "facebook" | "twitter" | "linkedin" | "telegram">;
|
|
37
|
+
copyButton: {
|
|
28
38
|
svgSrc: {
|
|
29
|
-
baseState: string
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
downloadButton
|
|
39
|
+
baseState: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
downloadButton: {
|
|
33
43
|
svgSrc: {
|
|
34
|
-
baseState: string
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
commonBackdrop
|
|
39
|
-
color:
|
|
40
|
-
backdropFilter:
|
|
41
|
-
}
|
|
42
|
-
slideBackdrop
|
|
43
|
-
opacity: number
|
|
44
|
-
blur: number
|
|
45
|
-
linearGradientOverlay:
|
|
46
|
-
}
|
|
47
|
-
faviconApiUrl: string
|
|
48
|
-
closeButton
|
|
44
|
+
baseState: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
commonBackdrop: {
|
|
49
|
+
color: string;
|
|
50
|
+
backdropFilter: string;
|
|
51
|
+
};
|
|
52
|
+
slideBackdrop: {
|
|
53
|
+
opacity: number;
|
|
54
|
+
blur: number;
|
|
55
|
+
linearGradientOverlay: string[];
|
|
56
|
+
};
|
|
57
|
+
faviconApiUrl: string;
|
|
58
|
+
closeButton: {
|
|
49
59
|
svgSrc: {
|
|
50
|
-
baseState: string
|
|
51
|
-
}
|
|
52
|
-
}
|
|
60
|
+
baseState: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
53
63
|
likeButton: {
|
|
54
64
|
svgSrc: {
|
|
55
|
-
baseState: string
|
|
56
|
-
activeState: string
|
|
57
|
-
}
|
|
58
|
-
}
|
|
65
|
+
baseState: string;
|
|
66
|
+
activeState: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
59
69
|
dislikeButton: {
|
|
60
70
|
svgSrc: {
|
|
61
|
-
baseState: string
|
|
62
|
-
activeState: string
|
|
63
|
-
}
|
|
64
|
-
}
|
|
71
|
+
baseState: string;
|
|
72
|
+
activeState: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
65
75
|
favoriteButton: {
|
|
66
76
|
svgSrc: {
|
|
67
|
-
baseState: string
|
|
68
|
-
activeState: string
|
|
69
|
-
}
|
|
70
|
-
}
|
|
77
|
+
baseState: string;
|
|
78
|
+
activeState: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
71
81
|
muteButton: {
|
|
72
82
|
svgSrc: {
|
|
73
|
-
baseState: string
|
|
74
|
-
activeState: string
|
|
75
|
-
}
|
|
76
|
-
}
|
|
83
|
+
baseState: string;
|
|
84
|
+
activeState: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
77
87
|
shareButton: {
|
|
78
88
|
svgSrc: {
|
|
79
|
-
baseState: string
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
};
|
|
89
|
+
baseState: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare type RecursivePartial<T> = {
|
|
2
|
+
[P in keyof T]?: T[P] extends object ? RecursivePartial<T[P]> | null : T[P] | null;
|
|
3
|
+
};
|
|
4
|
+
|
|
5
|
+
declare type Nullable<T> = T | null;
|
|
6
|
+
declare type Optional<T> = T | null;
|
|
7
|
+
declare type Option<T> = T | null;
|
|
8
|
+
|
|
9
|
+
declare type Dict<K extends string | number | symbol = string, T = any> = Record<K, T>
|
|
10
|
+
|
|
11
|
+
declare type Brand<T, B extends string> = T & { readonly __brand: B }
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StoryManager, StoryManagerConfig } from "..";
|
|
2
|
+
import { StoryManagerEventsProps } from "./storyManagerEventsProps";
|
|
3
|
+
import { AppearanceOptionsProps } from "./appearanceOptionsProps";
|
|
4
|
+
|
|
5
|
+
interface IASContainerProps extends StoryManagerEventsProps, AppearanceOptionsProps {
|
|
6
|
+
config: StoryManagerConfig;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export declare const IASContainer: (props: IASContainerProps) => JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AppearanceCommonOptions,
|
|
3
|
+
GameReaderOptions,
|
|
4
|
+
GoodsWidgetOptions,
|
|
5
|
+
StoryReaderOptions
|
|
6
|
+
} from "../appearance-manager";
|
|
7
|
+
|
|
8
|
+
export interface AppearanceOptionsProps {
|
|
9
|
+
commonOptions?: AppearanceCommonOptions;
|
|
10
|
+
storyReaderOptions?: StoryReaderOptions;
|
|
11
|
+
gameReaderOptions?: GameReaderOptions;
|
|
12
|
+
goodsWidgetOptions?: GoodsWidgetOptions;
|
|
13
|
+
commonOptionsOverrideByMediaQuery?: OverrideByMediaQuery<AppearanceCommonOptions>[];
|
|
14
|
+
storyReaderOptionsOverrideByMediaQuery?: OverrideByMediaQuery<StoryReaderOptions>[];
|
|
15
|
+
gameReaderOptionsOverrideByMediaQuery?: OverrideByMediaQuery<GameReaderOptions>[];
|
|
16
|
+
goodsWidgetOptionsOverrideByMediaQuery?: OverrideByMediaQuery<GoodsWidgetOptions>[];
|
|
17
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { IASContainer } from './
|
|
1
|
+
export { IASContainer } from './IasContainer';
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
interface BaseEvent {
|
|
2
|
+
id: number;
|
|
3
|
+
title?: string;
|
|
4
|
+
tags: Array<string>;
|
|
5
|
+
slidesCount?: number;
|
|
6
|
+
feed?: string;
|
|
7
|
+
source?: string;
|
|
8
|
+
filter: Record<string, unknown>;
|
|
9
|
+
ugcPayload: Record<string, unknown>;
|
|
10
|
+
defaultListLength: number;
|
|
11
|
+
favoriteListLength: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export declare enum CloseAction {
|
|
15
|
+
closeReaderByCloseBtn = "closeReaderByCloseBtn", // closed by btn with cross icon in StoryReader
|
|
16
|
+
closeReaderByEscBtn = "closeReaderByEscBtn", // closed by ESC on keyboard (desktop only)
|
|
17
|
+
swipeDown = "swipeDown", // closed by swipe down StoryReader (mobile only)
|
|
18
|
+
swipe = "swipe", // closed by swipe on next story (mobile only)
|
|
19
|
+
lastSlideClick = "lastSlideClick", // closed by first (move backward) or last (move forward) slide in story
|
|
20
|
+
auto = "auto", // closed by auto transition (by timer) on next story
|
|
21
|
+
externalCloseReader = "externalCloseReader" // closed by public API method StoryManager.closeStoryReader
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface ClickOnStoryEvent extends BaseEvent {
|
|
25
|
+
index: number;
|
|
26
|
+
isDeeplink: boolean;
|
|
27
|
+
url?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface ShowStoryEvent extends BaseEvent {}
|
|
31
|
+
|
|
32
|
+
export interface CloseStoryEvent extends BaseEvent {
|
|
33
|
+
action: CloseAction;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface ShowSlideEvent extends BaseEvent {
|
|
37
|
+
index: number;
|
|
38
|
+
payload: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface ClickOnButtonEvent extends BaseEvent {
|
|
42
|
+
index: number;
|
|
43
|
+
url: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface LikeStoryEvent extends BaseEvent {
|
|
47
|
+
value: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface DislikeStoryEvent extends BaseEvent {
|
|
51
|
+
value: boolean;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface FavoriteStoryEvent extends BaseEvent {
|
|
55
|
+
value: boolean;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface ShareStoryEvent extends BaseEvent {}
|
|
59
|
+
|
|
60
|
+
export interface ShareStoryWithPathEvent extends BaseEvent {
|
|
61
|
+
url: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface ClickOnFavoriteCellEvent {
|
|
65
|
+
feed: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface FeedLoadEvent {
|
|
69
|
+
feed: string;
|
|
70
|
+
stories: Array<{ id: number; title: string; tags: Array<string>; slidesCount: number }>;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface FeedImpressionEvent {
|
|
74
|
+
feed: string;
|
|
75
|
+
stories: Array<{ id: number; title: string; tags: Array<string>; slidesCount: number }>;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface VisibleAreaUpdatedEvent {
|
|
79
|
+
feed: string;
|
|
80
|
+
stories: Array<{ id: number; title: string; tags: Array<string>; slidesCount: number }>;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface WidgetEvent {
|
|
84
|
+
name: string;
|
|
85
|
+
data: any;
|
|
86
|
+
}
|