Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
bitworking committed Dec 13, 2018
2 parents 205e90e + a23696a commit 872a09b
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 2 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "react-scrollmagic",
"version": "2.0.0",
"version": "2.1.0",
"description": "React declarative component for ScrollMagic",
"author": "bitworking",
"license": "MIT",
"repository": "bitworking/react-scrollmagic",
"main": "dist/index.js",
"module": "dist/index.es.js",
"jsnext:main": "dist/index.es.js",
"types": "dist/index.d.ts",
"engines": {
"node": ">=8",
"npm": ">=5"
Expand All @@ -17,7 +18,8 @@
"test:watch": "react-scripts test --env=jsdom",
"build": "rollup -c",
"start": "rollup -c -w",
"prepare": "yarn run build",
"copy": "copy \"src\\index.d.ts\" \"dist\\index.d.ts\"",
"prepare": "yarn run build && npm run copy",
"predeploy": "cd example && yarn install && yarn run build",
"deploy": "gh-pages -d example/build"
},
Expand Down
48 changes: 48 additions & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
declare module 'react-scrollmagic' {
import * as React from 'react';

export type ControllerProps = {
children: React.ReactNode,
container?: any,
vertical?: boolean,
globalSceneOptions?: any,
loglevel?: number,
refreshInterval?: number,

};

export type ControllerState = {
controller: any | null,

};

export type PinSettings = {
pushFollowers?: boolean,
spacerClass?: string,

};

export type SceneProps = {
children: React.ReactNode | Function,

// scene parameters
duration?: number | string,
offset?: number | string,
triggerElement?: string | object,
triggerHook?: number | string,
reverse?: boolean,
loglevel?: number,
indicators?: boolean,
enabled?: boolean,

/* setClassToggle */
classToggle?: string | string[],

/* setPin */
pin?: boolean | PinSettings,

};

export class Controller extends React.Component<ControllerProps, ControllerState> {}
export class Scene extends React.PureComponent<SceneProps> {}
}

0 comments on commit 872a09b

Please sign in to comment.