[
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Describe the bug**\nA clear and concise description of what the bug is.\n\n**To Reproduce**\nSteps to reproduce the behavior:\n1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'\n4. See error\n\n**Expected behavior**\nA clear and concise description of what you expected to happen.\n\n**Screenshots**\nIf applicable, add screenshots to help explain your problem.\n\n**Smartphone (please complete the following information):**\n - Device: [e.g. iPhone6]\n - OS: [e.g. iOS8.1]\n - Version [e.g. 22]\n\n**Additional context**\nAdd any other context about the problem here.\n"
  },
  {
    "path": ".gitignore",
    "content": "node_modules/\nlib\n\nyarn.*\nyarn.lock"
  },
  {
    "path": "CHANGE_LOG.md",
    "content": "## - 0.0.5\n  - Beta\n## - 0.0.1\n  - Work in progress\n## - 0.1.0\n  - Initial Release\n## - 0.2.0\n## BREAKING CHANGES\nChanged the default Title and Paragraph height.\n\n## FEATURES\n- Added FACEBOOK style.\n- Added INSTAGRAM style.\n- Added Bullet style.\n- Added List functionality.\n- Add support for hex colors.\n\n## - 0.2.3\n## BREAKING CHANGES\nNo breaking changes :)\n\n## FEATURES\n- Typescript support.\n- Fully typed.\n- Removed extra things from npm, will be more lighter weight now."
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to making participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, sex characteristics, gender identity and expression,\nlevel of experience, education, socio-economic status, nationality, personal\nappearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment\ninclude:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or\n advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic\n address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces\nwhen an individual is representing the project or its community. Examples of\nrepresenting a project or community include using an official project e-mail\naddress, posting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event. Representation of a project may be\nfurther defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported by contacting the project team at aijaz.sarmad@gmail.com. All\ncomplaints will be reviewed and investigated and will result in a response that\nis deemed necessary and appropriate to the circumstances. The project team is\nobligated to maintain confidentiality with regard to the reporter of an incident.\nFurther details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good\nfaith may face temporary or permanent repercussions as determined by other\nmembers of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,\navailable at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html\n\n[homepage]: https://www.contributor-covenant.org\n\nFor answers to common questions about this code of conduct, see\nhttps://www.contributor-covenant.org/faq\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2019 Sarmad Shah\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "[![NPM Version][npm-image]][npm-url]\n[![Downloads Stats][npm-downloads]][npm-url]\n\n<p align=\"center\">\n  <img width=\"400\" alt=\"Example's react-native-easycontent-loader\" src=\"https://user-images.githubusercontent.com/38377482/63653305-932a1880-c788-11e9-8f74-aeb758e11336.gif\" />\n</p>\n\nProvide a placeholder at the place which need waiting for loading,\nEasy to implement and fun to use, this package is highly customizable, Please go through docs to find info :).\n\n###\n\n### I tried to move this package to @sarmad1995/react-native-content-loader, but seems like people are using this version a lot, so I will be maintaining this version from now, @sarmad1995/react-native-content-loader also has all the features.\n\n## Features\n\n- :gear: **Customizable:** Feel free to change the colors, speed, sizes, paragraphs, title and much more.\n- ⚛️ **Lightweight:** Lightweight with only neccessory code.\n- :tada: **Typescript:** Fully typed\n\n## Index\n\n- [Getting Started](#getting-started)\n- [Usage](#usage)\n- [Options](#options)\n- [Examples](#examples)\n\n## Getting Started\n\n```sh\nnpm install react-native-easy-content-loader --save\nyarn add react-native-easy-content-loader\n```\n\n## Examples\n\n### Simple Example\n\n```jsx\n<ContentLoader active />\n```\n\n### With Avatar\n\n```jsx\n<ContentLoader active avatar />\n```\n\n### With Loading State\n\n```jsx\n<ContentLoader active avatar loading={this.state.loading}>\n  <Text>This would be rendered with loading is false</Text>\n</ContentLoader>\n```\n\n### Number of paragraphs\n\n```jsx\n<ContentLoader active avatar pRows={4} />\n```\n\n### Different Widths for differnt paragrahs lines\n\n```jsx\n<ContentLoader active avatar pRows={4} pWidth={[\"100%\", 200, \"25%\", 45]} />\n```\n\n### Facebook and Instagram Style\n\nThese are also flexible and customizable\n\n|                                                     Facebook loader                                                     |                                                     Instagram loader                                                     |\n| :---------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------: |\n| ![Facebook Style](https://user-images.githubusercontent.com/38377482/63653305-932a1880-c788-11e9-8f74-aeb758e11336.gif) | ![Instagram Style](https://user-images.githubusercontent.com/38377482/63653295-7a216780-c788-11e9-9f02-88e5f71cd5cd.gif) |\n\n```jsx\nimport { FacebookLoader, InstagramLoader } from 'react-native-easy-content-loader';\n\n<FacebookLoader active />\n\n<InstagramLoader active />\n```\n\n### Bullets Style\n\n```jsx\n<Bullets active listSize={10} />\n```\n\n![Bullets Style](https://user-images.githubusercontent.com/38377482/63653257-054e2d80-c788-11e9-8b15-eb8e1c39885e.gif)\n\n### Default Style\n\n## It is highly customizable, please refer the options sections.\n\n```jsx\nimport ContentLoader from \"react-native-easy-content-loader\";\n<ContentLoader\n  avatar\n  pRows={5}\n  pHeight={[100, 30, 20]}\n  pWidth={[100, 70, 100]}\n/>;\n```\n\n|                                                Added custom heights and widths                                                |                                                    Same with other loaders                                                    |\n| :---------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------: |\n| <img width=\"300\" src=\"https://user-images.githubusercontent.com/38377482/69658435-2fbec800-10a2-11ea-9641-b96a3183aca4.png\"/> | <img width=\"300\" src=\"https://user-images.githubusercontent.com/38377482/69658445-36e5d600-10a2-11ea-991e-e4833e1996a2.png\"/> |\n\nSome more examples,\n\n```jsx\n<FacebookLoader pHeight={[20, 10]} />\n<ContentLoader reverse avatar pRows={5} pHeight={[40, 30, 20]} />\n\n```\n\n```jsx\n<ContentLoader active listSize={10} />\n```\n\n|                                                        Default Loader                                                        |                                                           Colored                                                            |\n| :--------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------: |\n| ![ContentLoader Style](https://user-images.githubusercontent.com/38377482/63653286-5d852f80-c788-11e9-8093-2f428e7e3daf.gif) | ![ContentLoader Style](https://user-images.githubusercontent.com/38377482/63653283-434b5180-c788-11e9-84ee-f275a71334bc.gif) |\n\n## Usage\n\n```jsx\nimport ContentLoader, {\n  FacebookLoader,\n  InstagramLoader,\n  Bullets\n} from \"react-native-easy-content-loader\";\n```\n\n```jsx\n<ContentLoader active />\n```\n\n## Options\n\n## These Options are common with every component,\n\n#### **`primaryColor?: string, rgba/hex`**\n\nDefaults to `rgba(220, 220, 220, 1)`.\n\n#### **`secondaryColor? string, rgba/hex`**\n\nDefaults to `rgba(200, 200, 200, 1)`.\n\n#### **`animationDuration? number`**\n\nDefaults to `500`. The animation transition time from primaryColor to secondaryColor\n\n#### **`loading?: bool | null`**\n\nDefaults to `null`, If given a bool value, when false, it will return children (Works as a wrapper component)\n\n#### **`active? bool`**\n\nDefaults to `false`, `true` if you want to animate the compoennt.\n\n#### **`title? bool`**\n\nDefaults to `true`. If you want to show the title, **Works only with ContentLoader**.\n\n#### **`titleStyles? object`**\n\nAdd styles to title.\n\n#### **`listSize? number`**\n\nDefaults to `1`. If you want to render a list of loaders, **Works with all the loaders**.\n\n#### **`avatar? bool`**\n\nDefaults to `false`. If you want to render the avatar.\n\n#### **`aShape? string 'circle' | 'square'`**\n\nDefaults to `circle`. shape of the avatar, can be circle or square.\n\n#### **`aSize? string 'default' 'small' 'large' | number`**\n\nDefaults to `default`. can be a specific number.\n\n#### **`reverse? bool`**\n\nDefaults to `false`. if you want to reverse the view.\n\n#### **`containerStyles? object`**\n\nIf you want to add style to container.\n\n## Title specific options.\n\n#### **`tHeight? string | number`**\n\nUsed to change the title height.\n\n#### **`tWidth? stirng | number`**\n\nUsed to change the title width.\n\n#### **`sTHeight? string | number`**\n\nUsed to change the secondary title height **Works with only Facebook and Instagram**.\n\n#### **`sTWidth? string | number`**\n\nUsed to change the secondary title width **Works with only Facebook and Instagram**.\n\n#### **`titleStyles? object`**\n\nAdd styles to title.\n\n#### **`secondaryTitleStyles? object`**\n\nAdd styles to secondaryTitle. **Works with only Facebook and Instagram**.\n\n## Paragraph specific options.\n\n#### **`pHeight? string | number | array`**\n\nParagraph line height,\nCan specify same height with single value, Or could use array for different heights, eg ['100%', 200, 300], you can use pHeight and pWidth to achieve different shapes as well,\n\n#### **`pWidth? string | number | array`**\n\nParagraph line width,\nCan specify same width with single value, Or could use array for different widths, eg ['100%', 200, 300]\n\n#### **`paragraphStyles? objecct`**\n\nAdd paragraph styles\n\n## Instagram specific options.\n\n#### **`imageHeight? number`**\n\nChange the height of the image\n\n#### **`imageStyles? number`**\n\nAdd styles to image\n\n## Release History\n\nSee <a href=\"https://github.com/sarmad1995/react-native-content-loader/blob/master/CHANGE_LOG.md\"> CHANGE_LOG.md</a>.\n\n## Contributing\n\nFeel free to contribute, this is still in beta and I have plans to include more features in future :)\n\n<!-- Markdown link & img dfn's -->\n\n[npm-image]: https://img.shields.io/npm/v/react-native-easy-content-loader.svg\n[npm-url]: https://www.npmjs.com/package/react-native-easy-content-loader\n[npm-downloads]: https://img.shields.io/npm/dm/rn-placeholder.svg?style=flat-square\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"react-native-easy-content-loader\",\n  \"version\": \"0.3.2\",\n  \"description\": \"easy content loader for react-native apps\",\n  \"main\": \"lib/index.js\",\n  \"types\": \"lib/index.d.ts\",\n  \"scripts\": {\n    \"build\": \"tsc\"\n  },\n  \"files\": [\n    \"lib\"\n  ],\n  \"keywords\": [\n    \"react-native\",\n    \"react native skeleton\",\n    \"react native loader\",\n    \"react-native-content-loader\",\n    \"skeleton\",\n    \"react-native-loader\",\n    \"sarmad1995\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/sarmad1995/react-native-easy-content-loader\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/sarmad1995/react-native-easy-content-loader\"\n  },\n  \"homepage\": \"https://github.com/sarmad1995/react-native-easy-content-loader\",\n  \"author\": \"Sarmad\",\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"@types/react\": \"^16.0.40\",\n    \"@types/react-native\": \"^0.52.16\",\n    \"tslint\": \"^5.9.1\",\n    \"tslint-config-prettier\": \"^1.9.0\",\n    \"tslint-react\": \"^3.5.1\",\n    \"typescript\": \"^2.7.1\"\n  },\n  \"peerDependencies\": {\n    \"react\": \"*\",\n    \"react-native\": \"*\"\n  },\n  \"dependencies\": {\n    \"hex-to-rgba\": \"^2.0.1\"\n  }\n}\n"
  },
  {
    "path": "src/Bullets.tsx",
    "content": "import * as React from \"react\";\nimport { Animated, View, StyleSheet, ViewStyle } from 'react-native';\nimport {\n  getInterpolatedColor,\n  commonDefaultProps,\n  startAnimationHelper,\n  THeightType,\n  TWidthType,\n  CommonProps\n} from './shared';\n\nconst AVATAR_SIZE = {\n  default: 20,\n  large: 30,\n  small: 25\n};\ninterface Props extends CommonProps {\n  /**\n   * Used to determine the height of the main title\n   */\n  tHeight: THeightType,\n  /**\n   * Used to determine the width of the main title\n   */\n  tWidth: TWidthType,\n  /**\n   * add additinal avatarstyles or overwrite previous ones\n   */\n  avatarStyles?: ViewStyle\n}\nclass ContentLoader extends React.PureComponent<Props> {\n  static defaultProps: Props;\n  state = {\n      animation: new Animated.Value(0)\n  }\n\n  componentDidMount() {\n    const { active } = this.props;\n    if (active) {\n      this.startAnimation();\n    }\n  }\n\n  componentDidUpdate(prevProps) {\n    const { loading } = this.props;\n    if (prevProps.loading !== loading) {\n      if (loading) {\n        this.startAnimation();\n      }\n    }\n  }\n\n  startAnimation = () => {\n    const { animation } = this.state;\n    const { animationDuration } = this.props;\n    startAnimationHelper(animation, animationDuration);\n  };\n\n  render() {\n    const {\n      tHeight,\n      tWidth,\n      titleStyles,\n      aShape,\n      aSize,\n      avatarStyles,\n      reverse,\n      containerStyles,\n      loading,\n      listSize,\n      primaryColor,\n      secondaryColor,\n      children\n    } = this.props;\n    const { animation } = this.state;\n\n    const interpolatedBackground = getInterpolatedColor(animation, primaryColor, secondaryColor);\n\n    if (loading === false) {\n      return children || null;\n    }\n\n    const titleInitialStyles = {\n      height: tHeight,\n      width: tWidth\n    };\n    const avatarInitialStyles = {\n      height: AVATAR_SIZE[aSize] || aSize,\n      width: AVATAR_SIZE[aSize] || aSize,\n      borderRadius: aShape === 'circle' ? AVATAR_SIZE[aSize] / 2 || (aSize as any) / 2 : 3,\n      marginRight: reverse ? 0 : 5,\n      marginLeft: reverse ? 5 : 0\n    };\n    return [...Array(listSize)].map((_, index) => (\n      <View key={index} style={{ width: '100%', marginVertical: 8 }}>\n        <View\n          style={[\n            styles.container,\n            { flexDirection: reverse ? 'row-reverse' : 'row' },\n            containerStyles\n          ]}\n        >\n          <Animated.View\n            style={[\n              styles.avatar,\n              avatarInitialStyles,\n              avatarStyles,\n              { backgroundColor: interpolatedBackground }\n            ]}\n          />\n\n          <View style={styles.content}>\n            <Animated.View\n              style={[\n                styles.title,\n                titleInitialStyles,\n                titleStyles,\n                { backgroundColor: interpolatedBackground }\n              ]}\n            />\n          </View>\n        </View>\n      </View>\n    ));\n  }\n}\n\nContentLoader.defaultProps = {\n  ...commonDefaultProps,\n  tWidth: '80%',\n  tHeight: 10\n};\nconst styles = StyleSheet.create({\n  container: {\n    flexDirection: 'row',\n    width: '100%',\n    paddingHorizontal: 10,\n    alignItems: 'center'\n  },\n  content: {\n    flex: 1,\n    marginLeft: 10\n  },\n  avatar: {\n    borderRadius: 2\n  },\n  title: {\n    borderRadius: 3\n  },\n  paragraph: {\n    marginVertical: 5,\n    borderRadius: 3\n  }\n});\nexport default ContentLoader;\n"
  },
  {
    "path": "src/ContentLoader.tsx",
    "content": "import * as React from \"react\";\n\nimport { Animated, View, StyleSheet, ViewStyle } from 'react-native';\n\nimport {\n  getInterpolatedColor,\n  commonDefaultProps,\n  startAnimationHelper,\n  paragraphInitialStyles,\n  CommonProps,\n  PHeightType,\n  PWidthType,\n  TWidthType,\n  THeightType,\n} from './shared';\n/**\n * default content loader .\n *\n *\n * can be customized to the needs, .\n */\ninterface ContentLoaderAvatar {\n  default: string | number,\n  large: string | number ,\n  small: string | number\n}\nconst AVATAR_SIZE: ContentLoaderAvatar= {\n  default: 50,\n  large: 70,\n  small: 35\n}\ninterface Props extends CommonProps {\n  /**\n   * Enables or disables paragraph lines.\n   */\n  paragraph?: boolean,\n  /**\n   * Used to determine height of the paragraph line.\n   */\n  pHeight: PHeightType,\n  /**\n   * Duration of fade animation, default = 500ms\n   */\n  animationDuration: number,\n  /**\n   * Used to determine the width of the paragraph lines, If you want dymanic widths for each line, you can add an array \n   * [100,200,300] \n   */\n  pWidth: PWidthType\n  /**\n   * Used to determine how many paragraph rows should be rendered.\n   */\n  pRows: number,\n  /**\n   * Used to determine the width of the title.\n   */\n  tWidth: TWidthType,\n  /**\n   * Used to determine the height of the title\n   */\n  tHeight: THeightType,\n  /**\n   * If you want to add additional styles/overwrite styles of paragraph\n   */\n  paragraphStyles?: ViewStyle,\n  /**\n    * If you want to add additional styles/overwrite styles of avatar\n   */\n  avatarStyles?: ViewStyle\n}\n\nclass ContentLoader extends React.PureComponent<Props> {\n  static defaultProps: Props;\n  state = {\n    animation: new Animated.Value(0)\n  };\n  componentDidMount() {\n    const { active } = this.props;\n    if (active) {\n      this.startAnimation();\n    }\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    const { loading } = this.props;\n    if (prevProps.loading !== loading) {\n      if (loading) {\n        this.startAnimation();\n      }\n    }\n  }\n\n  private startAnimation= (): void=> {\n    const { animation } = this.state;\n    const { animationDuration } = this.props;\n    startAnimationHelper(animation, animationDuration);\n  };\n\n  render() {\n    const {\n      title,\n      paragraph,\n      pHeight,\n      pWidth,\n      pRows,\n      paragraphStyles,\n      tHeight,\n      tWidth,\n      titleStyles,\n      avatar,\n      aShape,\n      aSize,\n      avatarStyles,\n      reverse,\n      containerStyles,\n      loading,\n      listSize,\n      primaryColor,\n      secondaryColor,\n      children\n    } = this.props;\n    const { animation } = this.state;\n\n    const interpolatedBackground = getInterpolatedColor(animation, primaryColor, secondaryColor);\n\n    if (loading === false) {\n      return children || null;\n    }\n    const titleInitialStyles: ViewStyle = {\n      height: tHeight,\n      width: tWidth\n    };\n    const avatarInitialStyles: ViewStyle = {\n      height: (AVATAR_SIZE as any)[aSize] || aSize,\n      width: (AVATAR_SIZE as any)[aSize] || aSize,\n      borderRadius: aShape === 'circle' ? (AVATAR_SIZE as any)[aSize] / 2 || (aSize as any) / 2 : 3,\n      marginRight: reverse ? 0 : 10,\n      marginLeft: reverse ? 10 : 0\n    };\n    return [...Array(listSize)].map((_, index) => (\n      <View\n        key={index}\n        style={[\n          { paddingBottom: listSize > 1 ? 20 : 0 },\n          styles.container,\n          { flexDirection: reverse ? 'row-reverse' : 'row' },\n          containerStyles\n        ]}\n      >\n        {avatar && (\n          <Animated.View\n            style={[\n              styles.avatar,\n              avatarInitialStyles,\n              avatarStyles,\n              { backgroundColor: interpolatedBackground }\n            ]}\n          />\n        )}\n        <View style={styles.content}>\n          {title && (\n            <Animated.View\n              style={[\n                styles.title,\n                titleInitialStyles,\n                titleStyles,\n                { backgroundColor: interpolatedBackground }\n              ]}\n            />\n          )}\n          {paragraph && (\n            <View style={styles.paragraphContainer}>\n              {[...Array(pRows)].map((_, index) => (\n                <Animated.View\n                  key={index}\n                  style={[\n                    styles.paragraph,\n                    paragraphInitialStyles(index, pHeight, pWidth),\n                    paragraphStyles,\n                    { backgroundColor: interpolatedBackground }\n                  ]}\n                />\n              ))}\n            </View>\n          )}\n        </View>\n      </View>\n    ));\n  }\n}\nContentLoader.defaultProps = {\n  ...commonDefaultProps,\n  paragraph: true,\n  pHeight: 8,\n  pWidth: '80%',\n  pRows: 4,\n  tWidth: '60%',\n  tHeight: 15,\n  paragraphStyles: {}\n};\nconst styles = StyleSheet.create({\n  container: {\n    flexDirection: 'row',\n    width: '100%',\n    paddingHorizontal: 10\n  },\n  content: {\n    flex: 1\n  },\n  avatar: {\n    borderRadius: 2\n  },\n  title: {\n    marginBottom: 10,\n    borderRadius: 3\n  },\n  paragraph: {\n    marginVertical: 5,\n    borderRadius: 3\n  },\n  paragraphContainer: {}\n});\nexport default ContentLoader;\n"
  },
  {
    "path": "src/FacebookLoader.tsx",
    "content": "import * as React from \"react\";\nimport { Animated, View, StyleSheet, ViewStyle } from 'react-native';\nimport {\n  getInterpolatedColor,\n  startAnimationHelper,\n  commonDefaultProps,\n  paragraphInitialStyles,\n  CommonProps,\n  PHeightType,\n  PWidthType,\n  THeightType,\n  TWidthType\n} from './shared';\n\nconst AVATAR_SIZE = {\n  default: 70,\n  large: 30,\n  small: 25\n};\ninterface Props extends CommonProps {\n  /**\n   * Used to determine height of the paragraph line.\n   */\n  pHeight: PHeightType,\n  /**\n   * Used to determine the width of the paragraph lines, If you want dymanic widths for each line, you can add an array \n   * [100,200,300] \n   */\n  pWidth: PWidthType,\n  /**\n   * Used to determine how many paragraph rows should be rendered.\n   */\n  pRows: number,\n  /**\n   * Add additional styles or overwrite previous ones \n   */\n  paragraphStyles?: ViewStyle,\n  /**\n   * Used to determine the height of the main title\n   */\n  tHeight: THeightType,\n  /**\n   * Used to determine the width of the main title\n   */\n  tWidth: TWidthType,\n  /**\n   * Add additional styles or overwrite previous ones\n   */\n  secondaryTitleStyles?: ViewStyle,\n  /**\n   * Used to determine the height of the secondary title\n   */\n  sTWidth: string | number,\n  /**\n   * Used to determine the width of the secondary title\n   */\n  avatarStyles?: ViewStyle\n}\nclass ContentLoader extends React.PureComponent<Props> {\n  static defaultProps: Props;\n  state = {\n      animation: new Animated.Value(0)\n  };\n  \n\n  componentDidMount() {\n    const { active } = this.props;\n    if (active) {\n      this.startAnimation();\n    }\n  }\n\n  componentDidUpdate(prevProps) {\n    const { loading } = this.props;\n    if (prevProps.loading !== loading) {\n      if (loading) {\n        this.startAnimation();\n      }\n    }\n  }\n\n  startAnimation = () => {\n    const { animation } = this.state;\n    const { animationDuration } = this.props;\n    startAnimationHelper(animation, animationDuration);\n  };\n\n  render() {\n    const {\n      pHeight,\n      pWidth,\n      pRows,\n      paragraphStyles,\n      tHeight,\n      tWidth,\n      titleStyles,\n      secondaryTitleStyles,\n      aShape,\n      sTWidth,\n      aSize,\n      avatarStyles,\n      reverse,\n      containerStyles,\n      loading,\n      listSize,\n      primaryColor,\n      secondaryColor,\n      children\n    } = this.props;\n    const { animation } = this.state;\n\n    const interpolatedBackground = getInterpolatedColor(animation, primaryColor, secondaryColor);\n\n    if (loading === false) {\n      return children || null;\n    }\n\n    const titleInitialStyles = {\n      height: tHeight,\n      width: tWidth\n    };\n    const secondaryTitleInitialStyles = {\n      height: tHeight,\n      width: sTWidth\n    };\n    const avatarInitialStyles = {\n      height: AVATAR_SIZE[aSize] || aSize,\n      width: AVATAR_SIZE[aSize] || aSize,\n      borderRadius: aShape === 'circle' ? AVATAR_SIZE[aSize] / 2 || (aSize as any) / 2 : 3,\n      marginRight: reverse ? 0 : 10,\n      marginLeft: reverse ? 10 : 0\n    };\n    return [...Array(listSize)].map((_, index) => (\n      <View key={index} style={{ width: '100%', marginVertical: 8 }}>\n        <View\n          style={[\n            styles.container,\n            { flexDirection: reverse ? 'row-reverse' : 'row' },\n            containerStyles\n          ]}\n        >\n          <Animated.View\n            style={[\n              styles.avatar,\n              avatarInitialStyles,\n              avatarStyles,\n              { backgroundColor: interpolatedBackground }\n            ]}\n          />\n\n          <View style={styles.content}>\n            <Animated.View\n              style={[\n                styles.title,\n                titleInitialStyles,\n                titleStyles,\n                { backgroundColor: interpolatedBackground }\n              ]}\n            />\n            <Animated.View\n              style={[\n                styles.secondaryTitle,\n                secondaryTitleInitialStyles,\n                secondaryTitleStyles,\n                { backgroundColor: interpolatedBackground }\n              ]}\n            />\n          </View>\n        </View>\n        <View style={styles.paragraphContainer}>\n          {[...Array(pRows)].map((_, index) => (\n            <Animated.View\n              key={index}\n              style={[\n                styles.paragraph,\n                paragraphInitialStyles(index, pHeight, pWidth),\n                paragraphStyles,\n                { backgroundColor: interpolatedBackground }\n              ]}\n            />\n          ))}\n        </View>\n      </View>\n    ));\n  }\n}\n\nContentLoader.defaultProps = {\n  ...commonDefaultProps,\n  pHeight: 7,\n  pWidth: ['85%', '95%', '75%'],\n  pRows: 3,\n  tWidth: '50%',\n  tHeight: 7,\n  sTWidth: '30%',\n  paragraphStyles: {},\n  secondaryTitleStyles: {}\n};\nconst styles = StyleSheet.create({\n  container: {\n    flexDirection: 'row',\n    width: '100%',\n    paddingHorizontal: 10,\n    alignItems: 'center'\n  },\n\n  content: {\n    flex: 1,\n    marginLeft: 0\n  },\n  avatar: {\n    borderRadius: 2,\n    marginLeft: 10\n  },\n  title: {\n    marginBottom: 12,\n    borderRadius: 3\n  },\n  secondaryTitle: {\n    marginBottom: 10,\n    borderRadius: 3\n  },\n  paragraph: {\n    marginVertical: 7,\n    borderRadius: 3\n  },\n\n  paragraphContainer: {\n    paddingHorizontal: 12,\n    marginTop: 10\n  }\n});\nexport default ContentLoader;\n"
  },
  {
    "path": "src/InstagramLoader.tsx",
    "content": "import * as React from \"react\";\nimport { Animated, View, StyleSheet, ViewStyle } from 'react-native';\nimport {\n  getInterpolatedColor,\n  startAnimationHelper,\n  commonDefaultProps,\n  CommonProps, \n  THeightType,\n  TWidthType\n} from './shared';\n\nconst AVATAR_SIZE = {\n  default: 60,\n  large: 30,\n  small: 25\n};\ninterface Props extends CommonProps {\n  /**\n   * Used to determine the height of the main title.\n   */\n  tHeight: THeightType,\n  /**\n   * Used to determine the width of the main title.\n   */\n  tWidth: TWidthType,\n  /**\n   * Used to determine the height of secondary title.\n   */\n  sTHeight: string | number,\n  /**\n   * Used to determine the width of secondary title.\n   */\n  sTWidth: string | number,\n  /**\n   * add additinal imageStyles or overwrite previous ones.\n   */\n  imageStyles?: ViewStyle,\n  /**\n   * Used to determine height of the image\n   */\n  imageHeight: string | number,\n  /**\n   * add additional avatarStyles or overwrite them\n   */\n  avatarStyles?: ViewStyle\n  /**\n   * add additional secondary title styles or overwrite them.\n   */\n  secondaryTitleStyles?: ViewStyle\n}\nclass ContentLoader extends React.PureComponent<Props> {\n  static defaultProps: Props;\n  state = {\n      animation: new Animated.Value(0)\n  }\n  componentDidMount() {\n    const { active } = this.props;\n    if (active) {\n      this.startAnimation();\n    }\n  }\n\n  componentDidUpdate(prevProps) {\n    const { loading } = this.props;\n    if (prevProps.loading !== loading) {\n      if (loading) {\n        this.startAnimation();\n      }\n    }\n  }\n\n  startAnimation = () => {\n    const { animation } = this.state;\n    const { animationDuration } = this.props;\n    startAnimationHelper(animation, animationDuration);\n  };\n\n  render() {\n    const {\n      imageStyles,\n      sTHeight,\n      sTWidth,\n      tHeight,\n      tWidth,\n      titleStyles,\n      secondaryTitleStyles,\n      aShape,\n      aSize,\n      avatarStyles,\n      reverse,\n      containerStyles,\n      loading,\n      imageHeight,\n      listSize,\n      primaryColor,\n      secondaryColor,\n      children\n    } = this.props;\n    const { animation } = this.state;\n\n    const interpolatedBackground = getInterpolatedColor(animation, primaryColor, secondaryColor);\n    if (loading === false) {\n      return children || null;\n    }\n    const imageInitialStyles = {\n      height: imageHeight,\n      width: '100%'\n    };\n    const titleInitialStyles = {\n      height: tHeight,\n      width: tWidth\n    };\n    const secondaryTitleInitialStyles = {\n      height: sTHeight,\n      width: sTWidth\n    };\n    const avatarInitialStyles = {\n      height: AVATAR_SIZE[aSize] || aSize,\n      width: AVATAR_SIZE[aSize] || aSize,\n      borderRadius: aShape === 'circle' ? AVATAR_SIZE[aSize] / 2 || (aSize as any) / 2 : 3,\n      marginRight: reverse ? 0 : 5,\n      marginLeft: reverse ? 5 : 0\n    };\n\n    return [...Array(listSize)].map((_, index) => (\n      <View key={index} style={{ width: '100%', marginVertical: 8 }}>\n        <View\n          style={[\n            styles.container,\n            { flexDirection: reverse ? 'row-reverse' : 'row' },\n            containerStyles\n          ]}\n        >\n          <Animated.View\n            style={[\n              styles.avatar,\n              avatarInitialStyles,\n              avatarStyles,\n              { backgroundColor: interpolatedBackground }\n            ]}\n          />\n\n          <View style={styles.content}>\n            <Animated.View\n              style={[\n                styles.title,\n                titleInitialStyles,\n                titleStyles,\n                { backgroundColor: interpolatedBackground }\n              ]}\n            />\n            <Animated.View\n              style={[\n                styles.secondaryTitle,\n                secondaryTitleInitialStyles,\n                secondaryTitleStyles,\n                { backgroundColor: interpolatedBackground }\n              ]}\n            />\n          </View>\n        </View>\n        <View style={styles.ImageContainer}>\n          <Animated.View\n            style={[\n              styles.image,\n              imageInitialStyles,\n              imageStyles,\n              { backgroundColor: interpolatedBackground }\n            ]}\n          />\n        </View>\n      </View>\n    ));\n  }\n}\n\nContentLoader.defaultProps = {\n  ...commonDefaultProps,\n  sTWidth: '25%',\n  tWidth: '40%',\n  tHeight: 13,\n  imageHeight: 200,\n  imageStyles: {},\n  sTHeight: 7\n};\nconst styles = StyleSheet.create({\n  container: {\n    flexDirection: 'row',\n    width: '100%',\n    paddingHorizontal: 10,\n    alignItems: 'center'\n  },\n  content: {\n    flex: 1,\n    marginLeft: 10\n  },\n  avatar: {\n    borderRadius: 2\n  },\n  title: {\n    marginBottom: 10,\n    borderRadius: 3\n  },\n  secondaryTitle: {\n    borderRadius: 3\n  },\n  image: {\n    marginVertical: 5,\n    borderRadius: 5\n  },\n\n  ImageContainer: {\n    paddingHorizontal: 12,\n    marginTop: 10\n  }\n});\nexport default ContentLoader;"
  },
  {
    "path": "src/index.tsx",
    "content": "import ContentLoader from \"./ContentLoader\";\nimport FacebookLoader from \"./FacebookLoader\";\nimport InstagramLoader from \"./InstagramLoader\";\nimport BulletsLoader from \"./Bullets\";\nexport default ContentLoader;\nexport { FacebookLoader, BulletsLoader, InstagramLoader };\nexport const Facebook = FacebookLoader;\nexport const Instagram = InstagramLoader;\nexport const Bullets = BulletsLoader;\n"
  },
  {
    "path": "src/shared.tsx",
    "content": "import hexToRgba from 'hex-to-rgba';\nimport { Animated, ViewStyle } from 'react-native';\n\nexport type WidthArrayType = number | string;\nexport type AShapeType = 'circle'|'square';\nexport type ASizeType = string | number | 'small' | 'large' | 'default';\nexport type PHeightType = string | number | Array<string|number>;\nexport type PWidthType = string | number | Array<WidthArrayType>;\nexport type TWidthType = string | number;\nexport type THeightType = string | number;\nexport type AnimationType = Animated.Value | Animated.ValueXY\nexport type ColorType = string;\nexport const startAnimationHelper = (animation: AnimationType, duration: number) => {\n  Animated.loop(\n    Animated.sequence([\n      Animated.timing(animation, {\n        toValue: 1,\n        duration,\n        useNativeDriver: false\n      }),\n      Animated.timing(animation, {\n        toValue: 0,\n        duration,\n        useNativeDriver: false\n      })\n    ])\n  ).start();\n};\n\nexport const getInterpolatedColor = (animation: Animated.Value, primaryColor: ColorType, secondaryColor: ColorType) =>\n  animation.interpolate({\n    inputRange: [0, 1],\n    outputRange: [\n      primaryColor.includes('rgb') ? primaryColor : hexToRgba(primaryColor),\n      secondaryColor.includes('rgba') ? secondaryColor : hexToRgba(secondaryColor)\n    ]\n  });\n\nexport const paragraphInitialStyles = (index: number, pHeight: PHeightType, pWidth: PWidthType) => {\n  let height = pHeight;\n  let width = pWidth;\n  if ( pWidth.constructor === Array) {\n    width = pWidth[index] || '100%';\n  }\n  if (pHeight.constructor === Array) {\n    height = pHeight[index] || 8\n  }\n  return {\n    height,\n    width\n  };\n};\nexport interface CommonProps {\n  /**\n   * The color of primary shade of the loader, can be rgba or hex color.\n   */\n  primaryColor: string,\n  /**\n   * The color of secondary shade of the loader, can be rgba or hex color.\n   */\n  secondaryColor: string,\n  /**\n   * Animation duration of the fade, default is 500.\n   */\n  animationDuration: number,\n  /**\n   * If loading prop is used, it will render children when loading false.\n   * Usefull when you want to render something after loading finishes,\n   * just add something like loading={this.state.loading} and you can add your component as children.\n   */\n  loading?: boolean | null,\n  /**\n   * Used to toggle animation,\n   * True - Animation enabled\n   * False - Animation disabled\n   */\n  active?: boolean,\n  /**\n   * Enalbes or disables the title\n   */\n  title?: boolean,\n  /**\n   * If you want to render the loaders in list, default is 1.\n   * If you provide more than one, it will render the loaders in a list.\n   */\n  listSize: number,\n  /**\n   * Add addtional title styles.\n   */\n  titleStyles?: ViewStyle,\n  /**\n   * Used to determine if avatar should be visible or not\n   */\n  avatar?: boolean,\n  /**\n   * Used to determine the shape of avatar \n   * can be \n   * circle or square or if you want some kind of custamized shape, you can always overwrite avatarStyles \n   */\n  aShape?: AShapeType\n  /**\n   * The size of avatar, can be default, large, small or your custom number\n   */\n  aSize: ASizeType,\n  /**\n   * Can be used to reverse the flow, \n   */\n  reverse?: boolean,\n  /**\n   * If you want to add additional properties or overwrite the styles of the main container.\n   */\n  containerStyles?: ViewStyle\n}\nexport const commonDefaultProps: CommonProps= {\n  primaryColor: 'rgba(220, 220, 220, 1)',\n  secondaryColor: 'rgba(200, 200, 200, 1)',\n  animationDuration: 500,\n  loading: null,\n  active: false,\n  title: true,\n  listSize: 1,\n  titleStyles: {},\n  avatar: false,\n  aShape: 'circle',\n  aSize: 'default',\n  reverse: false,\n  containerStyles: {}\n};\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"es6\",\n    \"module\": \"commonjs\",\n    \"jsx\": \"react-native\",\n    \"removeComments\": false,\n    \"lib\": [\"dom\", \"es2015\", \"es2016\"],\n    \"declaration\": true,\n    \"sourceMap\": true,\n    \"outDir\": \"./lib\",\n    \"esModuleInterop\": true,\n    \"strict\": true,\n    \"noImplicitAny\": false,\n    \"strictNullChecks\": true,\n    \"strictFunctionTypes\": true,\n    \"strictPropertyInitialization\": true,\n    \"noImplicitThis\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"allowSyntheticDefaultImports\": true,\n    \"skipLibCheck\": true\n\n  },\n  \"exclude\": [\"node_modules\"],\n  \"include\": [\"./src/**/*.tsx\", \"./src/**/*.ts\"],\n  \n}\n  "
  },
  {
    "path": "tslint.json",
    "content": "{\n  \"defaultSeverity\": \"error\",\n  \"extends\": [\"tslint:latest\", \"tslint-react\", \"tslint-config-prettier\"],\n  \"jsRules\": {},\n  \"rules\": {\n    \"member-access\": false,\n    \"object-literal-sort-keys\": false,\n    \"ordered-imports\": false,\n    \"interface-name\": false\n  },\n  \"rulesDirectory\": []\n}\n"
  }
]