@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,12 +1,12 @@
1
- export interface NavigationViewModel {
2
- defaultStyles: Record<string, string>;
3
- reachStart: boolean;
4
- reachEnd: boolean;
5
- onPrev(): void;
6
- onNext(): void;
7
- slider: {
8
- currentPosition: number;
9
- direction: "horizontal" | "vertical";
10
- viewport: DOMRect;
11
- };
12
- }
1
+ export interface NavigationViewModel {
2
+ defaultStyles: Record<string, string>;
3
+ reachStart: boolean;
4
+ reachEnd: boolean;
5
+ onPrev(): void;
6
+ onNext(): void;
7
+ slider: {
8
+ currentPosition: number;
9
+ direction: "horizontal" | "vertical";
10
+ viewport: DOMRect;
11
+ };
12
+ }
@@ -1,32 +1,32 @@
1
- import { StoriesListCardOptions } from "../appearance-manager";
2
-
3
- export interface StoryCardViewModel {
4
- id: number;
5
- title: string;
6
- titleColor: string;
7
- magazineName: string;
8
- backgroundColor: string;
9
- background: {
10
- color: string;
11
- gradient: boolean;
12
- };
13
- favorite: boolean;
14
- like: number;
15
- deeplink: string | null;
16
- hideInReader: boolean | null;
17
- gameInstance?: { id?: string };
18
- hasAudio: boolean | null;
19
- isFavoriteCard: boolean;
20
- isUgcCard: boolean;
21
- isOpened: boolean;
22
- videoCoverSrc: string | null;
23
-
24
- get options(): StoriesListCardOptions;
25
- get isTitleCardInner(): boolean;
26
- get isTitleCardOutsideTop(): boolean;
27
- get isTitleCardOutsideBottom(): boolean;
28
- get aspectRatio(): number;
29
-
30
- getImageSrc(): string | undefined;
31
- onClick(index?: number): void;
32
- }
1
+ import { StoriesListCardOptions } from "../appearance-manager";
2
+
3
+ export interface StoryCardViewModel {
4
+ id: number;
5
+ title: string;
6
+ titleColor: string;
7
+ magazineName: string;
8
+ backgroundColor: string;
9
+ background: {
10
+ color: string;
11
+ gradient: boolean;
12
+ };
13
+ favorite: boolean;
14
+ like: number;
15
+ deeplink: string | null;
16
+ hideInReader: boolean | null;
17
+ gameInstance?: { id?: string };
18
+ hasAudio: boolean | null;
19
+ isFavoriteCard: boolean;
20
+ isUgcCard: boolean;
21
+ isOpened: boolean;
22
+ videoCoverSrc: string | null;
23
+
24
+ get options(): StoriesListCardOptions;
25
+ get isTitleCardInner(): boolean;
26
+ get isTitleCardOutsideTop(): boolean;
27
+ get isTitleCardOutsideBottom(): boolean;
28
+ get aspectRatio(): number;
29
+
30
+ getImageSrc(): string | undefined;
31
+ onClick(index?: number): void;
32
+ }
@@ -1,3 +1,3 @@
1
- export interface StoryListApi {
2
- reload(): void
1
+ export interface StoryListApi {
2
+ reload(): void
3
3
  }
@@ -1,12 +1,12 @@
1
- export interface StoryListLoadStatus {
2
- feed: string | number,
3
- filter: Record<string, any> | null,
4
- defaultListLength: number,
5
- favoriteListLength: number,
6
- success: boolean,
7
- error: {
8
- name: string,
9
- networkStatus: number,
10
- networkMessage: string
11
- } | null
1
+ export interface StoryListLoadStatus {
2
+ feed: string | number,
3
+ filter: Record<string, any> | null,
4
+ defaultListLength: number,
5
+ favoriteListLength: number,
6
+ success: boolean,
7
+ error: {
8
+ name: string,
9
+ networkStatus: number,
10
+ networkMessage: string
11
+ } | null
12
12
  }
@@ -1,41 +1,41 @@
1
- import { SharePage, SharePageOptions } from "./share-page";
2
-
3
- export type StoryManagerConfig = {
4
- apiKey: string;
5
- userId?: string | number;
6
- tags?: Array<string>;
7
- placeholders?: Record<string, string>;
8
- imagePlaceholders?: Record<string, string>;
9
- lang?: string;
10
- disableDeviceId?: boolean;
11
- };
12
-
13
- export type UgcEditorConfig = {
14
- sessionId: string;
15
- apiKey: string;
16
- editor: Record<any, any>;
17
- sdkVersion: string;
18
- appPackageId?: string;
19
- deviceId: string;
20
- userId?: string;
21
- lang: string;
22
- };
23
-
24
- interface StoryManager {
25
- get sdkVersionName(): string;
26
- get sdkVersionCode(): number;
27
- set storyLinkClickHandler(callback: Function);
28
- showOnboardingStories(options?: { feed?: string; customTags?: Array<string>; limit?: number }): Promise<boolean>;
29
- showSharePage(storyId: number, options?: SharePageOptions): SharePage;
30
- showStory(id: number | string): Promise<boolean>;
31
- openGame(gameInstanceId: string, gameOptions?: { demoMode?: boolean }): Promise<void>;
32
- closeGame(): Promise<boolean>;
33
- closeStoryReader(): Promise<boolean | undefined>;
34
- closeGoodsWidget(): void
35
- getUgcEditorConfig(): Promise<UgcEditorConfig>
36
- on(eventName: string | symbol, listener: (...args: any[]) => void): this;
37
- once(eventName: string | symbol, listener: (...args: any[]) => void): this;
38
- off(eventName: string | symbol, listener: (...args: any[]) => void): this;
39
- }
40
-
41
- export declare const storyManager: StoryManager;
1
+ import { SharePage, SharePageOptions } from "./share-page";
2
+
3
+ export type StoryManagerConfig = {
4
+ apiKey: string;
5
+ userId?: string | number;
6
+ tags?: Array<string>;
7
+ placeholders?: Record<string, string>;
8
+ imagePlaceholders?: Record<string, string>;
9
+ lang?: string;
10
+ disableDeviceId?: boolean;
11
+ };
12
+
13
+ export type UgcEditorConfig = {
14
+ sessionId: string;
15
+ apiKey: string;
16
+ editor: Record<any, any>;
17
+ sdkVersion: string;
18
+ appPackageId?: string;
19
+ deviceId: string;
20
+ userId?: string;
21
+ lang: string;
22
+ };
23
+
24
+ interface StoryManager {
25
+ get sdkVersionName(): string;
26
+ get sdkVersionCode(): number;
27
+ set storyLinkClickHandler(callback: Function);
28
+ showOnboardingStories(options?: { feed?: string; customTags?: Array<string>; limit?: number }): Promise<boolean>;
29
+ showSharePage(storyId: number, options?: SharePageOptions): SharePage;
30
+ showStory(id: number | string): Promise<boolean>;
31
+ openGame(gameInstanceId: string, gameOptions?: { demoMode?: boolean }): Promise<void>;
32
+ closeGame(): Promise<boolean>;
33
+ closeStoryReader(): Promise<boolean | undefined>;
34
+ closeGoodsWidget(): void
35
+ getUgcEditorConfig(): Promise<UgcEditorConfig>
36
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
37
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
38
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
39
+ }
40
+
41
+ export declare const storyManager: StoryManager;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inappstory/react-sdk",
3
- "version": "0.4.3",
3
+ "version": "0.5.1",
4
4
  "description": "React SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -30,7 +30,7 @@
30
30
  "@emotion/cache": "^11.11.0",
31
31
  "@emotion/react": "^11.11.1",
32
32
  "@emotion/styled": "^11.11.0",
33
- "@inappstory/slide-api": "^0.0.8",
33
+ "@inappstory/slide-api": "0.0.10",
34
34
  "@inappstory/video-player": "^1.0.1",
35
35
  "bowser": "^2.4.0",
36
36
  "classnames": "^2.5.1",
@@ -38,7 +38,7 @@
38
38
  "lodash": "^4.17.21",
39
39
  "parse-css-sides": "^3.0.1",
40
40
  "react-input-mask": "^2.0.4",
41
- "uuid": "^8.1.0"
41
+ "uuid": "^10.0.0"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "react": ">=17.0.2",