@inappstory/react-sdk 0.3.6 → 0.4.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.
@@ -3,5 +3,4 @@ export * from "./gameReader"
3
3
  export * from "./goodsWidget"
4
4
  export * from "./storiesList"
5
5
  export * from "./storyReader"
6
- export * from "./overrideByMediaQuery"
7
6
  export * from "./sharePanel"
@@ -3,7 +3,6 @@ import {
3
3
  GameReaderOptions,
4
4
  GoodsWidgetOptions,
5
5
  StoryReaderOptions,
6
- OverrideByMediaQuery
7
6
  } from "../appearance-manager";
8
7
 
9
8
  export interface AppearanceOptionsProps {
@@ -11,8 +10,4 @@ export interface AppearanceOptionsProps {
11
10
  storyReaderOptions?: StoryReaderOptions;
12
11
  gameReaderOptions?: GameReaderOptions;
13
12
  goodsWidgetOptions?: GoodsWidgetOptions;
14
- commonOptionsOverrideByMediaQuery?: OverrideByMediaQuery<AppearanceCommonOptions>[];
15
- storyReaderOptionsOverrideByMediaQuery?: OverrideByMediaQuery<StoryReaderOptions>[];
16
- gameReaderOptionsOverrideByMediaQuery?: OverrideByMediaQuery<GameReaderOptions>[];
17
- goodsWidgetOptionsOverrideByMediaQuery?: OverrideByMediaQuery<GoodsWidgetOptions>[];
18
13
  }
@@ -1,13 +1,14 @@
1
- import { StoriesListOptions } from "..";
1
+ import React from "react";
2
2
  import { NavigationViewModel } from "./navigationViewModel";
3
3
  import { StoryCardViewModel } from "./storyCardViewModel";
4
4
  import { StoryListLoadStatus } from "./storyListLoadStatus";
5
5
  import { FavoriteCardCompositeViewModel } from "./favoriteCardCompositeViewModel";
6
- import { OverrideByMediaQuery } from "../appearance-manager/overrideByMediaQuery";
6
+ import { StoryListApi } from "./storyListApi";
7
+ import { StoriesListOptions } from "../appearance-manager";
7
8
 
8
9
  interface StoryListProps {
10
+ ref?: React.Ref<StoryListApi | null>;
9
11
  options: StoriesListOptions;
10
- optionsOverrideByMediaQuery?: OverrideByMediaQuery<StoriesListOptions>[]
11
12
  feedSlug: string;
12
13
  testKey?: string;
13
14
  onUgcCardClick?: () => void;
@@ -1,12 +1,13 @@
1
- import { StoriesListOptions } from "..";
1
+ import React from "react";
2
+ import { StoriesListOptions } from "../appearance-manager";
2
3
  import { NavigationViewModel } from "./navigationViewModel";
3
4
  import { StoryCardViewModel } from "./storyCardViewModel";
5
+ import { StoryListApi } from "./storyListApi";
4
6
  import { StoryListLoadStatus } from "./storyListLoadStatus";
5
- import { OverrideByMediaQuery } from "../appearance-manager";
6
7
 
7
8
  interface UGCStoryListProps {
9
+ ref?: React.Ref<StoryListApi | null>;
8
10
  options?: StoriesListOptions;
9
- optionsOverrideByMediaQuery?: OverrideByMediaQuery<StoriesListOptions>[]
10
11
  testKey?: string;
11
12
  onUgcCardClick?: () => void;
12
13
  useUgcCard?: boolean;
@@ -6,3 +6,4 @@ export * from './storyCardViewModel.d';
6
6
  export * from './StoryList.d';
7
7
  export * from './storyListLoadStatus';
8
8
  export * from './UGCStoryList.d';
9
+ export * from "./storyListApi"
@@ -0,0 +1,3 @@
1
+ export interface StoryListApi {
2
+ reload(): void
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inappstory/react-sdk",
3
- "version": "0.3.6",
3
+ "version": "0.4.0",
4
4
  "description": "React SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -27,17 +27,18 @@
27
27
  },
28
28
  "bugs": "https://github.com/inappstory/react-web-sdk/issues",
29
29
  "dependencies": {
30
- "@inappstory/slide-api": "^0.0.8",
31
30
  "@emotion/cache": "^11.11.0",
32
31
  "@emotion/react": "^11.11.1",
33
32
  "@emotion/styled": "^11.11.0",
33
+ "@inappstory/slide-api": "^0.0.8",
34
+ "@inappstory/video-player": "^1.0.1",
34
35
  "bowser": "^2.4.0",
35
36
  "classnames": "^2.5.1",
37
+ "effector": "^23.2.2",
36
38
  "lodash": "^4.17.21",
37
39
  "parse-css-sides": "^3.0.1",
38
40
  "react-input-mask": "^2.0.4",
39
- "uuid": "^8.1.0",
40
- "effector": "^23.2.2"
41
+ "uuid": "^8.1.0"
41
42
  },
42
43
  "peerDependencies": {
43
44
  "react": ">=17.0.2",
@@ -1,18 +0,0 @@
1
- import { AppearanceCommonOptions } from "./appearanceCommon";
2
- import { GameReaderOptions } from "./gameReader";
3
- import { GoodsWidgetOptions } from "./goodsWidget";
4
- import { StoriesListOptions } from "./storiesList";
5
- import { 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
- }>;