File tree Expand file tree Collapse file tree 2 files changed +52
-2
lines changed Expand file tree Collapse file tree 2 files changed +52
-2
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-scrollmagic" ,
3
- "version" : " 2.0 .0" ,
3
+ "version" : " 2.1 .0" ,
4
4
"description" : " React declarative component for ScrollMagic" ,
5
5
"author" : " bitworking" ,
6
6
"license" : " MIT" ,
7
7
"repository" : " bitworking/react-scrollmagic" ,
8
8
"main" : " dist/index.js" ,
9
9
"module" : " dist/index.es.js" ,
10
10
"jsnext:main" : " dist/index.es.js" ,
11
+ "types" : " dist/index.d.ts" ,
11
12
"engines" : {
12
13
"node" : " >=8" ,
13
14
"npm" : " >=5"
17
18
"test:watch" : " react-scripts test --env=jsdom" ,
18
19
"build" : " rollup -c" ,
19
20
"start" : " rollup -c -w" ,
20
- "prepare" : " yarn run build" ,
21
+ "copy" : " copy \" src\\ index.d.ts\" \" dist\\ index.d.ts\" " ,
22
+ "prepare" : " yarn run build && npm run copy" ,
21
23
"predeploy" : " cd example && yarn install && yarn run build" ,
22
24
"deploy" : " gh-pages -d example/build"
23
25
},
Original file line number Diff line number Diff line change
1
+ declare module 'react-scrollmagic' {
2
+ import * as React from 'react' ;
3
+
4
+ export type ControllerProps = {
5
+ children : React . ReactNode ,
6
+ container ?: any ,
7
+ vertical ?: boolean ,
8
+ globalSceneOptions ?: any ,
9
+ loglevel ?: number ,
10
+ refreshInterval ?: number ,
11
+
12
+ } ;
13
+
14
+ export type ControllerState = {
15
+ controller : any | null ,
16
+
17
+ } ;
18
+
19
+ export type PinSettings = {
20
+ pushFollowers ?: boolean ,
21
+ spacerClass ?: string ,
22
+
23
+ } ;
24
+
25
+ export type SceneProps = {
26
+ children : React . ReactNode | Function ,
27
+
28
+ // scene parameters
29
+ duration ?: number | string ,
30
+ offset ?: number | string ,
31
+ triggerElement ?: string | object ,
32
+ triggerHook ?: number | string ,
33
+ reverse ?: boolean ,
34
+ loglevel ?: number ,
35
+ indicators ?: boolean ,
36
+ enabled ?: boolean ,
37
+
38
+ /* setClassToggle */
39
+ classToggle ?: string | string [ ] ,
40
+
41
+ /* setPin */
42
+ pin ?: boolean | PinSettings ,
43
+
44
+ } ;
45
+
46
+ export class Controller extends React . Component < ControllerProps , ControllerState > { }
47
+ export class Scene extends React . PureComponent < SceneProps > { }
48
+ }
You can’t perform that action at this time.
0 commit comments