@inappstory/react-sdk 1.1.0-rc.1 → 1.1.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.
- package/dist/index.esm.mjs +2 -2
- package/dist/index.umd.js +2 -2
- package/dist/types/appearance-manager/storiesList.d.ts +1 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/storyManager.d.ts +8 -1
- package/package.json +5 -1
- package/plugins/dotLottie/dotLottie.d.ts +28 -0
- package/plugins/dotLottie/dotLottie.umd.js +1 -0
- package/plugins/dotLottie/package.json +5 -0
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "./appearance-manager";
|
|
2
2
|
export * from "./story-list";
|
|
3
3
|
export * from "./share-page";
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export * from "./storyManager";
|
|
5
|
+
export * from "./ias-container";
|
|
@@ -33,7 +33,13 @@ export type StoryLinkClickHandler = (payload: {
|
|
|
33
33
|
src: LinkSource;
|
|
34
34
|
}) => void;
|
|
35
35
|
|
|
36
|
-
interface
|
|
36
|
+
export interface Plugin {
|
|
37
|
+
name: string;
|
|
38
|
+
install(storyManager: StoryManager, options?: any): void;
|
|
39
|
+
uninstall(storyManager: StoryManager, options?: any): void;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export declare class StoryManager {
|
|
37
43
|
get sdkVersionName(): string;
|
|
38
44
|
get sdkVersionCode(): number;
|
|
39
45
|
set storyLinkClickHandler(value: StoryLinkClickHandler);
|
|
@@ -49,6 +55,7 @@ interface StoryManager {
|
|
|
49
55
|
on<Event extends keyof PublicEvents>(eventName: Event, listener: PublicEventHandler<Event>): this;
|
|
50
56
|
once<Event extends keyof PublicEvents>(eventName: Event, listener: PublicEventHandler<Event>): this;
|
|
51
57
|
off<Event extends keyof PublicEvents>(eventName: Event, listener: PublicEventHandler<Event>): this;
|
|
58
|
+
static use(plugin: any, options?: any): void;
|
|
52
59
|
}
|
|
53
60
|
|
|
54
61
|
export declare const storyManager: StoryManager;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inappstory/react-sdk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "React SDK",
|
|
5
5
|
"main": "dist/index.umd.js",
|
|
6
6
|
"module": "dist/index.esm.mjs",
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
"require": "./dist/index.umd.js",
|
|
12
12
|
"import": "./dist/index.esm.mjs",
|
|
13
13
|
"default": "./dist/index.umd.js"
|
|
14
|
+
},
|
|
15
|
+
"./plugins/dotLottie": {
|
|
16
|
+
"types": "./plugins/dotLottie/dotLottie.d.ts",
|
|
17
|
+
"default": "./plugins/dotLottie/dotLottie.umd.js"
|
|
14
18
|
}
|
|
15
19
|
},
|
|
16
20
|
"files": [
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type LottiePlayerEventName = "play" | "complete" | "beforeLoad" | "load" | "minPlayingTimeExpired" | "error";
|
|
2
|
+
|
|
3
|
+
export interface LottiePlayer {
|
|
4
|
+
get frameRate(): number;
|
|
5
|
+
get loop(): boolean;
|
|
6
|
+
|
|
7
|
+
destroy(): void;
|
|
8
|
+
play(): void;
|
|
9
|
+
stop(): void;
|
|
10
|
+
setSpeed(speed: number): void;
|
|
11
|
+
setTimer(duration: number): void;
|
|
12
|
+
clearTimer(): void;
|
|
13
|
+
on(eventName: LottiePlayerEventName, listener: (...args: any[]) => void): this;
|
|
14
|
+
once(eventName: LottiePlayerEventName, listener: (...args: any[]) => void): this;
|
|
15
|
+
off(eventName: LottiePlayerEventName, listener: (...args: any[]) => void): this;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare class DotLottie {
|
|
19
|
+
createLottiePlayer(
|
|
20
|
+
canvas: HTMLCanvasElement,
|
|
21
|
+
config: {
|
|
22
|
+
url?: string;
|
|
23
|
+
size: number;
|
|
24
|
+
sha1: string;
|
|
25
|
+
durationMinimalMs: number;
|
|
26
|
+
}
|
|
27
|
+
): LottiePlayer;
|
|
28
|
+
}
|