@inappstory/react-sdk 0.4.3 → 0.5.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.
Files changed (30) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +18 -18
  3. package/dist/index.js +27 -31
  4. package/dist/types/appearance-manager/appearanceCommon.d.ts +29 -29
  5. package/dist/types/appearance-manager/gameReader.d.ts +31 -31
  6. package/dist/types/appearance-manager/goodsWidget.d.ts +45 -45
  7. package/dist/types/appearance-manager/index.d.ts +5 -5
  8. package/dist/types/appearance-manager/sharePanel.d.ts +43 -43
  9. package/dist/types/appearance-manager/storiesList.d.ts +156 -156
  10. package/dist/types/appearance-manager/storyReader.ts +73 -73
  11. package/dist/types/global.d.ts +10 -10
  12. package/dist/types/ias-container/IasContainer.d.ts +10 -10
  13. package/dist/types/ias-container/appearanceOptionsProps.d.ts +13 -13
  14. package/dist/types/ias-container/index.d.ts +1 -1
  15. package/dist/types/ias-container/publicEvents.d.ts +86 -86
  16. package/dist/types/ias-container/storyManagerEventsProps.d.ts +31 -31
  17. package/dist/types/index.d.ts +5 -5
  18. package/dist/types/share-page/sharePage.d.ts +9 -9
  19. package/dist/types/story-list/FavoriteStoryList.d.ts +11 -11
  20. package/dist/types/story-list/StoryList.d.ts +24 -24
  21. package/dist/types/story-list/UGCStoryList.d.ts +21 -21
  22. package/dist/types/story-list/favoriteCardCompositeViewModel.ts +5 -5
  23. package/dist/types/story-list/favoriteStoryCardViewModel.d.ts +3 -3
  24. package/dist/types/story-list/index.d.ts +8 -8
  25. package/dist/types/story-list/navigationViewModel.d.ts +12 -12
  26. package/dist/types/story-list/storyCardViewModel.d.ts +32 -32
  27. package/dist/types/story-list/storyListApi.d.ts +2 -2
  28. package/dist/types/story-list/storyListLoadStatus.ts +11 -11
  29. package/dist/types/storyManager.d.ts +41 -41
  30. package/package.json +3 -3
@@ -1,29 +1,29 @@
1
- import { RecursivePartial } from "../global";
2
-
3
- export declare enum CloseButtonPosition {
4
- /** @deprecated */
5
- LEFT = "left",
6
- /** @deprecated */
7
- RIGHT = "right",
8
- START = "start",
9
- END = "end"
10
- }
11
-
12
- export type AppearanceCommonOptions = RecursivePartial<{
13
- hasFavorite: boolean;
14
- hasLike: boolean;
15
- hasShare: boolean;
16
- closeButtonPosition: CloseButtonPosition | "left" | "right" | "start" | "end";
17
- loader: {
18
- default: {
19
- color: string;
20
- accentColor: string;
21
- };
22
- custom: string;
23
- };
24
- closeButton: {
25
- svgSrc: {
26
- baseState: string;
27
- };
28
- };
29
- }>;
1
+ import { RecursivePartial } from "../global"
2
+
3
+ export declare enum CloseButtonPosition {
4
+ /** @deprecated */
5
+ LEFT = "left",
6
+ /** @deprecated */
7
+ RIGHT = "right",
8
+ START = "start",
9
+ END = "end"
10
+ }
11
+
12
+ export type AppearanceCommonOptions = RecursivePartial<{
13
+ hasFavorite: boolean;
14
+ hasLike: boolean;
15
+ hasShare: boolean;
16
+ closeButtonPosition: CloseButtonPosition | "left" | "right" | "start" | "end";
17
+ loader: {
18
+ default: {
19
+ color: string;
20
+ accentColor: string;
21
+ };
22
+ custom: string;
23
+ };
24
+ closeButton: {
25
+ svgSrc: {
26
+ baseState: string;
27
+ };
28
+ };
29
+ }>;
@@ -1,31 +1,31 @@
1
-
2
- import { CloseButtonPosition } from "./appearanceCommon";
3
- import { RecursivePartial } from "../global"
4
-
5
- export type GameReaderOptions = RecursivePartial<{
6
- loader: {
7
- default: {
8
- color: string;
9
- accentColor: string;
10
- };
11
- custom: string;
12
- };
13
-
14
- closeButtonPosition: CloseButtonPosition | "left" | "right";
15
-
16
- closeButton: {
17
- svgSrc: {
18
- baseState: string;
19
- };
20
- };
21
-
22
- backdropColor: string;
23
-
24
- game: {
25
- backdropColor: string;
26
- };
27
- }>;
28
-
29
- export type OpenGameOptions = Partial<{
30
- demoMode: boolean;
31
- }>;
1
+
2
+ import { CloseButtonPosition } from "./appearanceCommon";
3
+ import { RecursivePartial } from "../global"
4
+
5
+ export type GameReaderOptions = RecursivePartial<{
6
+ loader: {
7
+ default: {
8
+ color: string;
9
+ accentColor: string;
10
+ };
11
+ custom: string;
12
+ };
13
+
14
+ closeButtonPosition: CloseButtonPosition | "left" | "right";
15
+
16
+ closeButton: {
17
+ svgSrc: {
18
+ baseState: string;
19
+ };
20
+ };
21
+
22
+ backdropColor: string;
23
+
24
+ game: {
25
+ backdropColor: string;
26
+ };
27
+ }>;
28
+
29
+ export type OpenGameOptions = Partial<{
30
+ demoMode: boolean;
31
+ }>;
@@ -1,45 +1,45 @@
1
- import { RecursivePartial } from "../global"
2
-
3
- export type Goods = Partial<{
4
- imgSrc: string;
5
- title: string;
6
- subTitle: string;
7
- price: string;
8
- oldPrice: string;
9
- sku: string;
10
- rawData: any;
11
- }>;
12
-
13
- export type GoodsWidgetOptions = RecursivePartial<{
14
- goodsList: GoodsListOptions;
15
- goodsCard: GoodsCardOptions;
16
- loader: {
17
- default: {
18
- color: string;
19
- accentColor: string;
20
- };
21
- custom: string;
22
- };
23
- openGoodsWidgetHandler: (goodsList: Goods[]) => Promise<Goods[]>;
24
- getCardHtml?: (goods: Goods, index: number) => string;
25
- itemClickHandler?: (goods: Goods) => void;
26
- }>;
27
-
28
- export type GoodsCardOptions = Partial<{
29
- mainTextColor: string;
30
- oldPriceTextColor: string;
31
- imageBackgroundColor: string;
32
- imageCornerRadius: number;
33
- titleFont: string;
34
- subtitleFont: string;
35
- priceFont: string;
36
- oldPriceFont: string;
37
- }>;
38
-
39
- export type GoodsListOptions = Partial<{
40
- closeBackgroundColor: string;
41
- closeImage: string;
42
- substrateHeight: number;
43
- substrateColor: string;
44
- dimColor: string;
45
- }>;
1
+ import { RecursivePartial } from "../global"
2
+
3
+ export type Goods = Partial<{
4
+ imgSrc: string;
5
+ title: string;
6
+ subTitle: string;
7
+ price: string;
8
+ oldPrice: string;
9
+ sku: string;
10
+ rawData: any;
11
+ }>;
12
+
13
+ export type GoodsWidgetOptions = RecursivePartial<{
14
+ goodsList: GoodsListOptions;
15
+ goodsCard: GoodsCardOptions;
16
+ loader: {
17
+ default: {
18
+ color: string;
19
+ accentColor: string;
20
+ };
21
+ custom: string;
22
+ };
23
+ openGoodsWidgetHandler: (goodsList: Goods[]) => Promise<Goods[]>;
24
+ getCardHtml?: (goods: Goods, index: number) => string;
25
+ itemClickHandler?: (goods: Goods) => void;
26
+ }>;
27
+
28
+ export type GoodsCardOptions = Partial<{
29
+ mainTextColor: string;
30
+ oldPriceTextColor: string;
31
+ imageBackgroundColor: string;
32
+ imageCornerRadius: number;
33
+ titleFont: string;
34
+ subtitleFont: string;
35
+ priceFont: string;
36
+ oldPriceFont: string;
37
+ }>;
38
+
39
+ export type GoodsListOptions = Partial<{
40
+ closeBackgroundColor: string;
41
+ closeImage: string;
42
+ substrateHeight: number;
43
+ substrateColor: string;
44
+ dimColor: string;
45
+ }>;
@@ -1,6 +1,6 @@
1
- export * from "./appearanceCommon"
2
- export * from "./gameReader"
3
- export * from "./goodsWidget"
4
- export * from "./storiesList"
5
- export * from "./storyReader"
1
+ export * from "./appearanceCommon"
2
+ export * from "./gameReader"
3
+ export * from "./goodsWidget"
4
+ export * from "./storiesList"
5
+ export * from "./storyReader"
6
6
  export * from "./sharePanel"
@@ -1,44 +1,44 @@
1
- type BaseShareTarget = "vk" | "ok" | "facebook" | "x" | "linkedin" | "telegram" | "twitter";
2
- export type ShareTarget<CustomTargets extends string = never> = BaseShareTarget | CustomTargets;
3
-
4
- export type ShareTargetParams = {
5
- label?: string;
6
- icon?: {
7
- svgSrc: {
8
- baseState: string;
9
- };
10
- };
11
- getUrl?: (config: { url: string; text: string }) => string;
12
- };
13
-
14
- export type SharePanel<CustomTargets extends string = never> = Partial<{
15
- background: React.CSSProperties["background"];
16
- borderRadius: number;
17
- divider: {
18
- background: React.CSSProperties["background"];
19
- };
20
- text: {
21
- color: React.CSSProperties["color"];
22
- font: React.CSSProperties["font"];
23
- };
24
- targets: ShareTarget<CustomTargets>[];
25
- targetParams: Partial<Record<ShareTarget<CustomTargets>, ShareTargetParams>>;
26
- copyButton: {
27
- label: string;
28
- svgSrc: {
29
- baseState: string;
30
- };
31
- };
32
- downloadButton: {
33
- svgSrc: {
34
- baseState: string;
35
- };
36
- };
37
- title: {
38
- favicon: {
39
- background: React.CSSProperties["background"];
40
- display: boolean;
41
- };
42
- getValue: (config: { url: string; text: string }) => string;
43
- };
1
+ type BaseShareTarget = "vk" | "ok" | "facebook" | "x" | "linkedin" | "telegram" | "twitter";
2
+ export type ShareTarget<CustomTargets extends string = never> = BaseShareTarget | CustomTargets;
3
+
4
+ export type ShareTargetParams = {
5
+ label?: string;
6
+ icon?: {
7
+ svgSrc: {
8
+ baseState: string;
9
+ };
10
+ };
11
+ getUrl?: (config: { url: string; text: string }) => string;
12
+ };
13
+
14
+ export type SharePanel<CustomTargets extends string = never> = Partial<{
15
+ background: React.CSSProperties["background"];
16
+ borderRadius: number;
17
+ divider: {
18
+ background: React.CSSProperties["background"];
19
+ };
20
+ text: {
21
+ color: React.CSSProperties["color"];
22
+ font: React.CSSProperties["font"];
23
+ };
24
+ targets: ShareTarget<CustomTargets>[];
25
+ targetParams: Partial<Record<ShareTarget<CustomTargets>, ShareTargetParams>>;
26
+ copyButton: {
27
+ label: string;
28
+ svgSrc: {
29
+ baseState: string;
30
+ };
31
+ };
32
+ downloadButton: {
33
+ svgSrc: {
34
+ baseState: string;
35
+ };
36
+ };
37
+ title: {
38
+ favicon: {
39
+ background: React.CSSProperties["background"];
40
+ display: boolean;
41
+ };
42
+ getValue: (config: { url: string; text: string }) => string;
43
+ };
44
44
  }>;
@@ -1,156 +1,156 @@
1
- import { Option, RecursivePartial } from "../global";
2
-
3
- export declare enum StoriesListSliderAlign {
4
- CENTER = "center",
5
- /** @deprecated */
6
- LEFT = "left",
7
- /** @deprecated */
8
- RIGHT = "right",
9
- START = "start",
10
- END = "end"
11
- }
12
-
13
- export declare enum StoriesListCardViewVariant {
14
- CIRCLE = "circle",
15
- QUAD = "quad",
16
- RECTANGLE = "rectangle"
17
- }
18
-
19
- export declare enum StoriesListCardTitleTextAlign {
20
- CENTER = "center",
21
- /** @deprecated */
22
- LEFT = "left",
23
- /** @deprecated */
24
- RIGHT = "right",
25
- START = "start",
26
- END = "end"
27
- }
28
-
29
- export declare enum StoriesListCardTitlePosition {
30
- CARD_INSIDE_BOTTOM = "cardInsideBottom",
31
- CARD_OUTSIDE_TOP = "cardOutsideTop",
32
- CARD_OUTSIDE_BOTTOM = "cardOutsideBottom"
33
- }
34
-
35
- export declare enum StoriesListCardCoverQuality {
36
- Medium = "medium",
37
- High = "high"
38
- }
39
-
40
- export declare enum StoriesListDirection {
41
- COLUMN = "vertical",
42
- ROW = "horizontal"
43
- }
44
-
45
- export type StoriesListOptions = RecursivePartial<{
46
- direction: StoriesListDirection | "vertical" | "horizontal";
47
- card: StoriesListCardOptions;
48
- favoriteCard: StoriesListFavoriteCardOptions;
49
- layout: {
50
- height: number | string;
51
- backgroundColor: string;
52
- sliderAlign: StoriesListSliderAlign | "left" | "center" | "right" | "start" | "end";
53
- };
54
- sidePadding: number;
55
- topPadding: number;
56
- bottomPadding: number;
57
- bottomMargin: number;
58
- navigation: {
59
- speed: number;
60
- showControls: boolean;
61
- controlsSize: number;
62
- controlsBackgroundColor: string;
63
- controlsColor: string;
64
- };
65
- ugcCard: StoriesListUgcCardOptions;
66
- }>;
67
-
68
- export type StoriesListCardOptions = RecursivePartial<{
69
- title: {
70
- color: string;
71
- padding: string | number;
72
- font: string;
73
- display: boolean;
74
- textAlign: StoriesListCardTitleTextAlign | "left" | "center" | "right" | "start" | "end";
75
- position: StoriesListCardTitlePosition | "cardInsideBottom" | "cardOutsideTop" | "cardOutsideBottom";
76
- lineClamp: number;
77
- };
78
- gap: number;
79
- height: number;
80
- aspectRatio: number;
81
- coverQuality: StoriesListCardCoverQuality | "medium" | "high";
82
- coverLazyLoading: boolean;
83
- variant: StoriesListCardViewVariant | "circle" | "quad" | "rectangle";
84
- border: {
85
- radius: number;
86
- color: string;
87
- width: number;
88
- gap: number;
89
- gradient: string;
90
- };
91
- boxShadow: string;
92
- dropShadow: string;
93
- opacity: number;
94
- mask: {
95
- color: string;
96
- linearGradient: {
97
- direction: string;
98
- points: Array<string>;
99
- };
100
- };
101
- svgMask: {
102
- cardMask: string;
103
- overlayMask: Array<{
104
- mask: string;
105
- background: string;
106
- }>;
107
- };
108
- opened: {
109
- border: {
110
- radius: number;
111
- color: string;
112
- width: number;
113
- gap: number;
114
- gradient: string;
115
- };
116
- boxShadow: string;
117
- dropShadow: string;
118
- opacity: number;
119
- mask: {
120
- color: string;
121
- linearGradient: {
122
- direction: string;
123
- points: Array<string>;
124
- };
125
- };
126
- svgMask: {
127
- cardMask: string;
128
- overlayMask: Array<{
129
- mask: string;
130
- background: string;
131
- }>;
132
- };
133
- };
134
- }>;
135
-
136
- export type StoriesListFavoriteCardOptions = RecursivePartial<
137
- StoriesListCardOptions & {
138
- title: StoriesListCardOptions["title"] & {
139
- content: string;
140
- };
141
- }
142
- >;
143
-
144
- export type StoriesListUgcCardOptions = RecursivePartial<
145
- Omit<StoriesListCardOptions, "opened"> & {
146
- title: StoriesListCardOptions["title"] & {
147
- content: Option<string>;
148
- };
149
- image: {
150
- svgSrc: {
151
- baseState: string;
152
- };
153
- };
154
- backgroundColor: string;
155
- }
156
- >;
1
+ import { Option, RecursivePartial } from "../global";
2
+
3
+ export declare enum StoriesListSliderAlign {
4
+ CENTER = "center",
5
+ /** @deprecated */
6
+ LEFT = "left",
7
+ /** @deprecated */
8
+ RIGHT = "right",
9
+ START = "start",
10
+ END = "end"
11
+ }
12
+
13
+ export declare enum StoriesListCardViewVariant {
14
+ CIRCLE = "circle",
15
+ QUAD = "quad",
16
+ RECTANGLE = "rectangle"
17
+ }
18
+
19
+ export declare enum StoriesListCardTitleTextAlign {
20
+ /** @deprecated */
21
+ LEFT = "left",
22
+ /** @deprecated */
23
+ RIGHT = "right",
24
+ CENTER = "center",
25
+ START = "start",
26
+ END = "end"
27
+ }
28
+
29
+ export declare enum StoriesListCardTitlePosition {
30
+ CARD_INSIDE_BOTTOM = "cardInsideBottom",
31
+ CARD_OUTSIDE_TOP = "cardOutsideTop",
32
+ CARD_OUTSIDE_BOTTOM = "cardOutsideBottom"
33
+ }
34
+
35
+ export declare enum StoriesListCardCoverQuality {
36
+ Medium = "medium",
37
+ High = "high"
38
+ }
39
+
40
+ export declare enum StoriesListDirection {
41
+ COLUMN = "vertical",
42
+ ROW = "horizontal"
43
+ }
44
+
45
+ export type StoriesListOptions = RecursivePartial<{
46
+ direction: StoriesListDirection | "vertical" | "horizontal";
47
+ card: StoriesListCardOptions;
48
+ favoriteCard: StoriesListFavoriteCardOptions;
49
+ layout: {
50
+ height: number | string;
51
+ backgroundColor: string;
52
+ sliderAlign: StoriesListSliderAlign | "left" | "center" | "right" | "start" | "end";
53
+ };
54
+ sidePadding: number;
55
+ topPadding: number;
56
+ bottomPadding: number;
57
+ bottomMargin: number;
58
+ navigation: {
59
+ speed: number;
60
+ showControls: boolean;
61
+ controlsSize: number;
62
+ controlsBackgroundColor: string;
63
+ controlsColor: string;
64
+ };
65
+ ugcCard: StoriesListUgcCardOptions;
66
+ }>;
67
+
68
+ export type StoriesListCardOptions = RecursivePartial<{
69
+ title: {
70
+ color: string;
71
+ padding: string | number;
72
+ font: string;
73
+ display: boolean;
74
+ textAlign: StoriesListCardTitleTextAlign | "left" | "center" | "right" | "start" | "end";
75
+ position: StoriesListCardTitlePosition | "cardInsideBottom" | "cardOutsideTop" | "cardOutsideBottom";
76
+ lineClamp: number;
77
+ };
78
+ gap: number;
79
+ height: number;
80
+ aspectRatio: number;
81
+ coverQuality: StoriesListCardCoverQuality | "medium" | "high";
82
+ coverLazyLoading: boolean;
83
+ variant: StoriesListCardViewVariant | "circle" | "quad" | "rectangle";
84
+ border: {
85
+ radius: number;
86
+ color: string;
87
+ width: number;
88
+ gap: number;
89
+ gradient: string;
90
+ };
91
+ boxShadow: string;
92
+ dropShadow: string;
93
+ opacity: number;
94
+ mask: {
95
+ color: string;
96
+ linearGradient: {
97
+ direction: string;
98
+ points: Array<string>;
99
+ };
100
+ };
101
+ svgMask: {
102
+ cardMask: string;
103
+ overlayMask: Array<{
104
+ mask: string;
105
+ background: string;
106
+ }>;
107
+ };
108
+ opened: {
109
+ border: {
110
+ radius: number;
111
+ color: string;
112
+ width: number;
113
+ gap: number;
114
+ gradient: string;
115
+ };
116
+ boxShadow: string;
117
+ dropShadow: string;
118
+ opacity: number;
119
+ mask: {
120
+ color: string;
121
+ linearGradient: {
122
+ direction: string;
123
+ points: Array<string>;
124
+ };
125
+ };
126
+ svgMask: {
127
+ cardMask: string;
128
+ overlayMask: Array<{
129
+ mask: string;
130
+ background: string;
131
+ }>;
132
+ };
133
+ };
134
+ }>;
135
+
136
+ export type StoriesListFavoriteCardOptions = RecursivePartial<
137
+ StoriesListCardOptions & {
138
+ title: StoriesListCardOptions["title"] & {
139
+ content: string;
140
+ };
141
+ }
142
+ >;
143
+
144
+ export type StoriesListUgcCardOptions = RecursivePartial<
145
+ Omit<StoriesListCardOptions, "opened"> & {
146
+ title: StoriesListCardOptions["title"] & {
147
+ content: Option<string>;
148
+ };
149
+ image: {
150
+ svgSrc: {
151
+ baseState: string;
152
+ };
153
+ };
154
+ backgroundColor: string;
155
+ }
156
+ >;