@inappstory/react-sdk 0.3.0 → 0.3.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.
@@ -0,0 +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
+ };
44
+ }>;
@@ -1,5 +1,6 @@
1
1
  import { CloseButtonPosition } from "./appearanceCommon";
2
2
  import { GameReaderOptions } from "./gameReader";
3
+ import { SharePanel } from "./sharePanel"
3
4
 
4
5
  export declare enum StoryReaderSwipeStyle {
5
6
  FLAT = "flat",
@@ -32,19 +33,7 @@ export type StoryReaderOptions = RecursivePartial<{
32
33
  };
33
34
  recycleStoriesList: boolean;
34
35
  closeOnLastSlideByTimer: boolean;
35
- sharePanel: {
36
- targets: SharePanelTargets[] | Array<"vk" | "ok" | "facebook" | "twitter" | "linkedin" | "telegram">;
37
- copyButton: {
38
- svgSrc: {
39
- baseState: string;
40
- };
41
- };
42
- downloadButton: {
43
- svgSrc: {
44
- baseState: string;
45
- };
46
- };
47
- };
36
+ sharePanel: SharePanel<string>;
48
37
  commonBackdrop: {
49
38
  color: string;
50
39
  backdropFilter: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inappstory/react-sdk",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "React SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/types/index.d.ts",