├── .editorconfig ├── .flowconfig ├── .gitignore ├── .nvmrc ├── .storybook ├── addons.js ├── config.js └── decorator-centered.js ├── .travis.yml ├── CHANGELOG.md ├── CHANGELOG.old.md ├── LICENSE ├── README.md ├── docs └── demo.gif ├── flow-typed └── npm │ ├── @storybook │ ├── addon-info_vx.x.x.js │ ├── addon-options_vx.x.x.js │ ├── addon-storyshots_vx.x.x.js │ └── react_vx.x.x.js │ ├── babel-cli_vx.x.x.js │ ├── babel-eslint_vx.x.x.js │ ├── babel-preset-env_vx.x.x.js │ ├── babel-preset-react-app_vx.x.x.js │ ├── codecov_vx.x.x.js │ ├── enzyme-adapter-react-16_vx.x.x.js │ ├── enzyme-to-json_vx.x.x.js │ ├── enzyme_v3.x.x.js │ ├── eslint-config-airbnb_vx.x.x.js │ ├── eslint-config-prettier_vx.x.x.js │ ├── eslint-plugin-flowtype_vx.x.x.js │ ├── eslint-plugin-import_vx.x.x.js │ ├── eslint-plugin-jest_vx.x.x.js │ ├── eslint-plugin-jsx-a11y_vx.x.x.js │ ├── eslint-plugin-prettier_vx.x.x.js │ ├── eslint-plugin-react_vx.x.x.js │ ├── eslint_vx.x.x.js │ ├── flow-bin_v0.x.x.js │ ├── github-changes_vx.x.x.js │ ├── husky_vx.x.x.js │ ├── jest-styled-components_vx.x.x.js │ ├── jest_v22.x.x.js │ ├── lint-staged_vx.x.x.js │ ├── normalize.css_v7.x.x.js │ ├── prettier_vx.x.x.js │ ├── prop-types_v15.x.x.js │ ├── ramda_v0.x.x.js │ ├── react-test-renderer_v16.x.x.js │ ├── recompose_v0.x.x.js │ ├── rxjs_v5.0.x.js │ └── styled-components_vx.x.x.js ├── images ├── image1.jpg ├── image1X60.jpg ├── image2.jpg └── image2X60.jpg ├── index.d.ts ├── package.json ├── renovate.json ├── setupTests.js ├── src ├── Img.js ├── ProgressiveImage.example.js ├── ProgressiveImage.js ├── __tests__ │ ├── Img.css.test.js │ ├── Img.test.js │ ├── ProgressiveImage.test.js │ ├── __snapshots__ │ │ ├── Img.css.test.js.snap │ │ ├── Img.test.js.snap │ │ └── ProgressiveImage.test.js.snap │ ├── index.test.js │ └── loadImage.test.js ├── index.js └── loadImage.js └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | 15 | [Makefile] 16 | indent_style = tab -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | 3 | [include] 4 | 5 | [libs] 6 | 7 | [lints] 8 | 9 | [options] 10 | 11 | [strict] 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /storybook-static 11 | /lib 12 | 13 | # misc 14 | .DS_Store 15 | npm-debug.log* 16 | yarn-debug.log* 17 | yarn-error.log* 18 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 9.4.0 2 | -------------------------------------------------------------------------------- /.storybook/addons.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import '@storybook/addon-actions/register'; 3 | import '@storybook/addon-links/register'; 4 | import '@storybook/addon-options/register'; 5 | -------------------------------------------------------------------------------- /.storybook/config.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { configure, addDecorator, setAddon } from '@storybook/react'; 3 | import infoAddon from '@storybook/addon-info'; 4 | import { setOptions } from '@storybook/addon-options'; 5 | import centered from './decorator-centered'; 6 | 7 | const context = (require: any).context('../src/', true, /\.example\.js$/); 8 | 9 | setAddon(infoAddon); 10 | addDecorator(centered); 11 | setOptions({ 12 | name: 'Rrogressive-bg-image', 13 | url: 'https://github.com/evenchange4/react-progressive-bg-image', 14 | goFullScreen: false, 15 | showLeftPanel: true, 16 | showDownPanel: false, 17 | showSearchBox: false, 18 | downPanelInRight: false, 19 | sortStoriesByKind: true, 20 | }); 21 | 22 | function loadStories() { 23 | context.keys().forEach(context); 24 | } 25 | 26 | configure(loadStories, module); 27 | -------------------------------------------------------------------------------- /.storybook/decorator-centered.js: -------------------------------------------------------------------------------- 1 | /* eslint no-unused-expressions:0 */ 2 | // @flow 3 | import React from 'react'; 4 | import { injectGlobal } from 'styled-components'; 5 | import 'normalize.css'; 6 | 7 | injectGlobal` 8 | body { 9 | padding: 30px; 10 | } 11 | `; 12 | 13 | export default function(renderStory: Function) { 14 | return renderStory(); 15 | } 16 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - 9 5 | env: 6 | global: 7 | - YARN_VERSION=1.3.2 8 | 9 | before_install: 10 | - export PATH="$HOME/.yarn/bin:$PATH" 11 | - | 12 | if [[ ! -e ~/.yarn/bin/yarn || $(yarn --version) != "${YARN_VERSION}" ]]; then 13 | curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION 14 | fi 15 | 16 | install: 17 | - yarn install --pure-lockfile 18 | 19 | script: 20 | - yarn run eslint 21 | - yarn run test 22 | - yarn run flow 23 | - yarn run build 24 | - yarn run build-storybook 25 | 26 | after_success: 27 | - ./node_modules/.bin/codecov 28 | 29 | deploy: 30 | - provider: npm 31 | email: evenchange4@gmail.com 32 | api_key: 33 | secure: ZcYdZrpERXxBN6TzXDQrH+orxppvKXaGj/JhWtZFu6K0eVvORntMluywOpYhkfU+akrn4NjHlX67MRgkCxCIKmIl+rp36CDRC/X+L4y4Bd4VItOa4CNqG79s+es4JkyXa64lRnWlMNHUIEjoemqsP3Em/RVrBcQeDLwpO9VD4207eHwqEIiTttCCSVH9RZa251MDB8l9ArwKC343rfWyKgzd/DLag0NwUUPRFb2Et+z+SgfkrlYYoFkmuQt2V2PMnJfcw8Xx5nGG29saRKgEulmDtMuVneu38bhekZW/MS2zdHanfzs5tbXwHTjMWqq/1mIrHgxnhDpXfJ8YtIJlerpLBsHX35uWWhmetHXFCetZ1guWWIVfzBTMt9PlahCsiB30YC3PWLpWFWgi/XLBgPipfmFJ3YIeY/i0e1koJlWqy6L/TzrEkP2mNYFAo3b75YMDnrPmsrpLs10/THLwCW2gPBpPTkyKWY105E5ijdJghYpuOjY15i0VQTrRs3koBCmVewO5c1v47IpNMi1hhfi1UCaR+GUUHVPt6GF6tTSIa/PA2yS8l92/DLKQ6xO75Yggw88TdVGB+H0IJjm/bR+M/rQOMNPP48tXL254igFpMHf0aAFZ5jXbrxWIiulIh1homZGEJMhcw/qx90I/BbxHw7zazd9S6Y6i7gOfJV0= 34 | skip_cleanup: true 35 | on: 36 | tags: true 37 | repo: evenchange4/react-progressive-bg-image 38 | 39 | cache: 40 | yarn: true 41 | directories: 42 | - "~/.yarn" 43 | - node_modules 44 | 45 | notifications: 46 | email: evenchange4@gmail.com 47 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## Change Log 2 | 3 | ### v3.0.0 (2018/01/30 14:06 +00:00) 4 | 5 | * [3a5d8c3](https://github.com/evenchange4/react-progressive-bg-image/commit/3a5d8c34eb4ce852b8a21bdc70acdd86fa668562) 3.0.0 (@evenchange4) 6 | * [#82](https://github.com/evenchange4/react-progressive-bg-image/pull/82) feat(npm): upgrade peer style-components to v3 [BREAKING CHANGES](#82) (@evenchange4) 7 | * [#78](https://github.com/evenchange4/react-progressive-bg-image/pull/78) chore(deps): update dependency lint-staged to v6.1.0 (#78) (@renovate[bot]) 8 | * [#77](https://github.com/evenchange4/react-progressive-bg-image/pull/77) chore(deps): update dependency eslint-plugin-react to v7.6.0 (#77) (@renovate[bot]) 9 | 10 | ### v2.1.3 (2018/01/25 15:36 +00:00) 11 | 12 | * [c8e0a0b](https://github.com/evenchange4/react-progressive-bg-image/commit/c8e0a0bcc237c0612e2e38f5e804f198bf75e1fe) 2.1.3 (@evenchange4) 13 | * [7c1ab82](https://github.com/evenchange4/react-progressive-bg-image/commit/7c1ab82cdb993ab3c039f01c54d7bf87378f5c1c) fix(dependency): pinOnlyDevDependencies (@evenchange4) 14 | * [#69](https://github.com/evenchange4/react-progressive-bg-image/pull/69) chore(deps): update dependency jest to v22.1.3 (#69) (@renovate[bot]) 15 | * [#67](https://github.com/evenchange4/react-progressive-bg-image/pull/67) chore(deps): update dependency jest to v22.1.2 (#67) (@renovate[bot]) 16 | * [#68](https://github.com/evenchange4/react-progressive-bg-image/pull/68) chore(deps): update dependency eslint-plugin-jest to v21.7.0 (#68) (@renovate[bot]) 17 | * [5346728](https://github.com/evenchange4/react-progressive-bg-image/commit/53467283a870ce35216adfdaa891339358396e9d) docs(LICENSE): update year (@evenchange4) 18 | 19 | ### v2.1.2 (2018/01/16 04:48 +00:00) 20 | 21 | * [cbc768e](https://github.com/evenchange4/react-progressive-bg-image/commit/cbc768eb09152b79fa5d0895371e24c8f9e8b49f) 2.1.2 (@evenchange4) 22 | * [10cdcd2](https://github.com/evenchange4/react-progressive-bg-image/commit/10cdcd2d863816ef4890d350bbb96dae723ff87c) docs(CHANGELOG): release 2.1.2 (@evenchange4) 23 | * [#66](https://github.com/evenchange4/react-progressive-bg-image/pull/66) chore(ncu): ncu update & use node 9 (#66) (@evenchange4) 24 | * [#62](https://github.com/evenchange4/react-progressive-bg-image/pull/62) chore(deps): pin dependencies (#62) (@renovate[bot]) 25 | * [#61](https://github.com/evenchange4/react-progressive-bg-image/pull/61) Configure Renovate (#61) (@renovate[bot]) 26 | 27 | ### v2.1.1 (2017/09/27 10:05 +00:00) 28 | 29 | * [a5a2e4e](https://github.com/evenchange4/react-progressive-bg-image/commit/a5a2e4eab7d7b3922139528e0df6045ef722ad43) 2.1.1 (@evenchange4) 30 | * [54b4efd](https://github.com/evenchange4/react-progressive-bg-image/commit/54b4efdff6f173e138c23b185794391cb63224b4) fx(travis): npm release bug (@evenchange4) 31 | * [770c828](https://github.com/evenchange4/react-progressive-bg-image/commit/770c82888fa6a629668a7a862243e981b0300acb) docs(CHANGELOG): release (@evenchange4) 32 | 33 | ### v2.1.0 (2017/09/27 10:00 +00:00) 34 | 35 | * [f28def4](https://github.com/evenchange4/react-progressive-bg-image/commit/f28def419dafcbb2bc5f3b625e167e02ccb9519a) 2.1.0 (@evenchange4) 36 | * [#51](https://github.com/evenchange4/react-progressive-bg-image/pull/51) chore(package): ncu update React 16 (#51) (@evenchange4) 37 | * [#39](https://github.com/evenchange4/react-progressive-bg-image/pull/39) chore(eslint): introduce airbnb & prettier eslint configs (#39) (@evenchange4) 38 | * [#38](https://github.com/evenchange4/react-progressive-bg-image/pull/38) chore(ncu): update jest-styled-components to 4 (#38) (@evenchange4) 39 | * [2df081d](https://github.com/evenchange4/react-progressive-bg-image/commit/2df081dac1da9b20ac7b9bc486e3a08788404e86) docs(README): add furthers readings (@evenchange4) 40 | 41 | ### v2.0.4 (2017/07/04 01:16 +00:00) 42 | 43 | * [b9803a9](https://github.com/evenchange4/react-progressive-bg-image/commit/b9803a9d054da4697825f6b1078efe10a9e3a5b7) 2.0.4 (@evenchange4) 44 | * [#35](https://github.com/evenchange4/react-progressive-bg-image/pull/35) fix(Image): remove useless props from BaseComponent. (#35) (@evenchange4) 45 | 46 | ### v2.0.3 (2017/07/03 09:31 +00:00) 47 | 48 | * [dd76e2e](https://github.com/evenchange4/react-progressive-bg-image/commit/dd76e2edf53176ea6b7768c706d81319a98dcdbb) 2.0.3 (@evenchange4) 49 | * [3f8ec6d](https://github.com/evenchange4/react-progressive-bg-image/commit/3f8ec6d36bf1d58e846ed614f0ab604f7987c4d3) fix(Image): `src` override priority issue. (@evenchange4) 50 | 51 | ### v2.0.2 (2017/07/03 08:54 +00:00) 52 | 53 | * [634ccb2](https://github.com/evenchange4/react-progressive-bg-image/commit/634ccb20d02bb0e8035afc1d10fcde5924a7e298) 2.0.2 (@evenchange4) 54 | * [a873e27](https://github.com/evenchange4/react-progressive-bg-image/commit/a873e278ece2144bc07d380f6edab5c1435870dd) update 2.0.1 publish fail (@evenchange4) 55 | * [#34](https://github.com/evenchange4/react-progressive-bg-image/pull/34) feat(Img): Support for other Component based with `component` props. (#34) (@evenchange4) 56 | * [aebbb44](https://github.com/evenchange4/react-progressive-bg-image/commit/aebbb44a12581863bfa2be45565e62b1bd70ce2b) update (@evenchange4) 57 | * [2ee7dc4](https://github.com/evenchange4/react-progressive-bg-image/commit/2ee7dc4f86b26b8a9e6d80b2dcb303d09f7e6436) docs(README): update 2.0 api (@evenchange4) 58 | 59 | ### v2.0.0 (2017/07/03 05:32 +00:00) 60 | 61 | * [d5a0b48](https://github.com/evenchange4/react-progressive-bg-image/commit/d5a0b485934ca971a35de5088d404c4b4fdaea6f) 2.0.0 (@evenchange4) 62 | * [#33](https://github.com/evenchange4/react-progressive-bg-image/pull/33) feat(cache): add new cache feature ([#24]) (#33) (@evenchange4) 63 | 64 | ### v1.1.4 (2017/07/01 07:01 +00:00) 65 | 66 | * [2de1520](https://github.com/evenchange4/react-progressive-bg-image/commit/2de1520a67189fd0ca56320410dd89ed14595379) 1.1.4 (@evenchange4) 67 | * [#32](https://github.com/evenchange4/react-progressive-bg-image/pull/32) fix(Image): missing close url `)`. (#32) (@evenchange4) 68 | 69 | ### v1.1.3 (2017/07/01 04:52 +00:00) 70 | 71 | * [f4eeb84](https://github.com/evenchange4/react-progressive-bg-image/commit/f4eeb84a678c54b14622ba6969786df370f02e46) 1.1.3 (@evenchange4) 72 | * [#31](https://github.com/evenchange4/react-progressive-bg-image/pull/31) feat(props): support for custom blur / opacity / scale props. (#31) (@evenchange4) 73 | * [#29](https://github.com/evenchange4/react-progressive-bg-image/pull/29) chore(ncu): bump dependencies (#29) (@evenchange4) 74 | 75 | ### v1.1.2 (2017/06/30 08:59 +00:00) 76 | 77 | * [e1d1e59](https://github.com/evenchange4/react-progressive-bg-image/commit/e1d1e597534bcb8343a9e151b140bfe8fdb87fc6) 1.1.2 (@evenchange4) 78 | * [#28](https://github.com/evenchange4/react-progressive-bg-image/pull/28) fix(SC): move dynamic props to style for safari flick issue (#28) (@evenchange4) 79 | * [250f8e8](https://github.com/evenchange4/react-progressive-bg-image/commit/250f8e837bbc7e6fc538d6f2cab1dd4dda56d7ae) docs(CHANGELOG): release (@evenchange4) 80 | 81 | ### v1.1.1 (2017/05/31 09:52 +00:00) 82 | 83 | * [1e4c408](https://github.com/evenchange4/react-progressive-bg-image/commit/1e4c4083bf39e30905fba25d9944f0d373c27eb2) 1.1.1 (@evenchange4) 84 | * [#22](https://github.com/evenchange4/react-progressive-bg-image/pull/22) chore(env): use node 8 / npm 5 / styled-components 2 / storybook 3 (#22) (@evenchange4) 85 | * [fe20209](https://github.com/evenchange4/react-progressive-bg-image/commit/fe202091920108ee1b8ed40dadb70dc62e7a21da) chore(storybook): use `alpha` git-tag. (@evenchange4) 86 | 87 | ### v1.1.0 (2017/05/23 04:52 +00:00) 88 | 89 | * [10e5df9](https://github.com/evenchange4/react-progressive-bg-image/commit/10e5df9998565615bd3a8b7912fd686e1b9a3ed9) 1.1.0 (@evenchange4) 90 | * [023c8e9](https://github.com/evenchange4/react-progressive-bg-image/commit/023c8e992869614ca6504b76abfd4f7a8bf959f4) docs(CHANGELOG): release (@evenchange4) 91 | * [#21](https://github.com/evenchange4/react-progressive-bg-image/pull/21) chore(storybook): upgrade to `3.0.0-alpha.4` (#21) (@evenchange4) 92 | * [#17](https://github.com/evenchange4/react-progressive-bg-image/pull/17) test(jest-styled-components): introduce css snapshot (#17) (@evenchange4) 93 | * [#15](https://github.com/evenchange4/react-progressive-bg-image/pull/15) chore(packages): yarn upgrade jest codecov prop-types rxjs 🚀 (#15) (@greenkeeper[bot]) 94 | * [2af1141](https://github.com/evenchange4/react-progressive-bg-image/commit/2af114171bc01510f752d746388234341ce63663) docs(README): add story link (@evenchange4) 95 | 96 | ### v1.0.7 (2017/05/06 06:28 +00:00) 97 | 98 | * [f3b6c38](https://github.com/evenchange4/react-progressive-bg-image/commit/f3b6c385f157074eb0cb137e74832e3215b14351) 1.0.7 (@evenchange4) 99 | * [9fd3491](https://github.com/evenchange4/react-progressive-bg-image/commit/9fd34918cebf9697cfec3407a110511261c40a3e) docs(CHANGELOG): release (@evenchange4) 100 | * [#14](https://github.com/evenchange4/react-progressive-bg-image/pull/14) chore(styled-components): update to rc (#14) (@evenchange4) 101 | * [#11](https://github.com/evenchange4/react-progressive-bg-image/pull/11) refactor(recompose): switch to `mapPropsStream`. (#11) (@evenchange4) 102 | 103 | ### v1.0.6 (2017/05/04 02:48 +00:00) 104 | 105 | * [4b28582](https://github.com/evenchange4/react-progressive-bg-image/commit/4b28582b6638906de49de3247a176481af65625c) 1.0.6 (@evenchange4) 106 | * [c1da8ca](https://github.com/evenchange4/react-progressive-bg-image/commit/c1da8cab30bf5c28d1883623bdd2f8d12f2443e3) docs(CHANGELOG): release (@evenchange4) 107 | * [#10](https://github.com/evenchange4/react-progressive-bg-image/pull/10) fix(rx): add test for loading the second image at same time. (#10) (@evenchange4) 108 | 109 | ### v1.0.5 (2017/05/03 06:53 +00:00) 110 | 111 | * [7e1aa7b](https://github.com/evenchange4/react-progressive-bg-image/commit/7e1aa7b7cad98b8cb527ab34b3541f1f3509610b) 1.0.5 (@evenchange4) 112 | * [a3915f4](https://github.com/evenchange4/react-progressive-bg-image/commit/a3915f4b1f687d050ab234a516e1334a97a4b64f) docs(CHANGELOG): release with inline style example (@evenchange4) 113 | * [#9](https://github.com/evenchange4/react-progressive-bg-image/pull/9) feat(style): add inline-style example. (#9) (@evenchange4) 114 | * [#8](https://github.com/evenchange4/react-progressive-bg-image/pull/8) test(rx): add marble testing (#8) (@evenchange4) 115 | * [#7](https://github.com/evenchange4/react-progressive-bg-image/pull/7) test(Img): add more tests (#7) (@evenchange4) 116 | 117 | ### v1.0.4 (2017/05/03 02:55 +00:00) 118 | 119 | * [2dc9082](https://github.com/evenchange4/react-progressive-bg-image/commit/2dc908234d5af9a0b454033244c17ace90a3968d) 1.0.4 (@evenchange4) 120 | * [a0da558](https://github.com/evenchange4/react-progressive-bg-image/commit/a0da5582fa372de0abee0f30ee3cbd2d75992e41) docs(CHANGELOG): release (@evenchange4) 121 | * [#6](https://github.com/evenchange4/react-progressive-bg-image/pull/6) chore(packages): yarn upgrade (#6) (@evenchange4) 122 | * [#5](https://github.com/evenchange4/react-progressive-bg-image/pull/5) Update dependencies to enable Greenkeeper 🌴 (#5) (@greenkeeper[bot]) 123 | * [a9ebcbf](https://github.com/evenchange4/react-progressive-bg-image/commit/a9ebcbf826f957e42991a55b55d042f68c3d6ae1) docs(README): update badges (@evenchange4) 124 | * [f5676d5](https://github.com/evenchange4/react-progressive-bg-image/commit/f5676d5cad54171c87e9e42f9bc57f1479363c7b) docs(test): add eslint script (@evenchange4) 125 | 126 | ### v1.0.3 (2017/05/02 14:19 +00:00) 127 | 128 | * [a04b6eb](https://github.com/evenchange4/react-progressive-bg-image/commit/a04b6eb23105572c72a0b2a9b77baa0b8d9885c6) 1.0.3 (@evenchange4) 129 | * [b505598](https://github.com/evenchange4/react-progressive-bg-image/commit/b505598412a22f3c4f279f5b4d8dceefe6b9df1b) docs(CHANGELOG): release (@evenchange4) 130 | * [e7ad634](https://github.com/evenchange4/react-progressive-bg-image/commit/e7ad634f51b82e0e0d13bd14a902191a23f98373) docs(README): compress gif (@evenchange4) 131 | * [981d3e3](https://github.com/evenchange4/react-progressive-bg-image/commit/981d3e3a4b1664d5f1c5f31d0db96c747b6d39c0) docs(DEMO): update story info & compress image (@evenchange4) 132 | * [c7871db](https://github.com/evenchange4/react-progressive-bg-image/commit/c7871dbcd4ec09f5d399b0ef6988e7814b697c5b) docs(README): update gif (@evenchange4) 133 | * [#4](https://github.com/evenchange4/react-progressive-bg-image/pull/4) feat(eslint): setup eslint. (#4) (@evenchange4) 134 | 135 | ### v1.0.2 (2017/05/02 11:15 +00:00) 136 | 137 | * [521ff91](https://github.com/evenchange4/react-progressive-bg-image/commit/521ff91ffde601d6d612f93d7270873d569788c1) 1.0.2 (@evenchange4) 138 | * [d0f6c1d](https://github.com/evenchange4/react-progressive-bg-image/commit/d0f6c1d0c51304250e0490acc14838c4ea02a829) docs(CHANGELOG): release (@evenchange4) 139 | * [#3](https://github.com/evenchange4/react-progressive-bg-image/pull/3) fix(Component): props name conflict (#3) (@evenchange4) 140 | 141 | ### v1.0.1 (2017/05/02 09:12 +00:00) 142 | 143 | * [38cac0d](https://github.com/evenchange4/react-progressive-bg-image/commit/38cac0d4205bb878fb50d97184f5c2a51ef4d853) 1.0.1 (@evenchange4) 144 | * [f0db516](https://github.com/evenchange4/react-progressive-bg-image/commit/f0db516b41de2b1593fd25f69c1e388ef4f090e3) docs(CHANGELOG): release (@evenchange4) 145 | * [#2](https://github.com/evenchange4/react-progressive-bg-image/pull/2) test(jest): setup (#2) (@evenchange4) 146 | * [7efffce](https://github.com/evenchange4/react-progressive-bg-image/commit/7efffceaae86e47521cdd5fcdd475f7ff5c8f463) docs(readme): update install peer dependency (@evenchange4) 147 | * [#1](https://github.com/evenchange4/react-progressive-bg-image/pull/1) feat(travis): enable (#1) (@evenchange4) 148 | * [4eae8b2](https://github.com/evenchange4/react-progressive-bg-image/commit/4eae8b2ab6fa3c4f562613e64d8e5b0b1e35ac68) feat(storybook): add example code (@evenchange4) 149 | * [02eeeca](https://github.com/evenchange4/react-progressive-bg-image/commit/02eeecaf2f75372036fbb8768c39f7ec3bfe883c) first commit (@evenchange4) 150 | -------------------------------------------------------------------------------- /CHANGELOG.old.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [HEAD] 4 | 5 | > Unreleased 6 | 7 | ## [v2.1.3] 8 | 9 | > Jan 25, 2018 10 | 11 | * fix(dependency): pinOnlyDevDependencies 12 | 13 | ## [v2.1.2] 14 | 15 | > Jan 16, 2018 16 | 17 | * chore(ncu): ncu update 18 | 19 | ## [v2.1.1] 20 | 21 | > Sep 27, 2017 22 | 23 | * fix(travis): npm release bug 24 | 25 | ## [v2.1.0] 26 | 27 | > Sep 27, 2017 28 | 29 | * chore(ncu): update jest-styled-components to 4 30 | * chore(eslint): introduce airbnb & prettier eslint configs 31 | 32 | * chore(travis): setup auto release 33 | * docs(LICENSE): add LICENSE file 34 | * chore(package): ncu update React 16 35 | * style: update prettier & extract prettier config 36 | * chore(env): use node 8.6.0 & yarn 1.1.0 & add nvmrc for netlify 37 | 38 | ## [v2.0.4] 39 | 40 | > Jul 04, 2017 41 | 42 | * fix(Image): remove useless props from BaseComponent. 43 | * chore(ncu): update styled-components to 2.1.1 44 | 45 | ## [v2.0.3] 46 | 47 | > Jul 03, 2017 48 | 49 | * fix(Image): `src` override priority issue. 50 | 51 | ## [v2.0.2] 52 | 53 | > Jul 03, 2017 54 | 55 | * feat(Img): Support for other Component based with `component` props. 56 | 57 | **BackgroundImage will cause flicking while changing at safari.** 58 | 59 | ## [v2.0.1] 60 | 61 | Publish fail. 62 | 63 | ## [v2.0.0] 64 | 65 | > Jul 03, 2017 66 | 67 | * feat(cache): add new cache feature ([#24]) 68 | 69 | ### BREAKING CHANGES 70 | 71 | ```diff 72 | , 85 | ``` 86 | 87 | ## [v1.1.4] 88 | 89 | > Jul 01, 2017 90 | 91 | * fix(Image): missing close url `)`. 92 | 93 | ## [v1.1.3] 94 | 95 | > Jul 01, 2017 96 | 97 | * chore(ncu): bump dependencies 98 | * feat(props): support for custom blur / opacity / scale props. 99 | 100 | ## [v1.1.2] 101 | 102 | > Jun 30, 2017 103 | 104 | * fix(SC): move dynamic props to style for safari flick issue 105 | 106 | ## [v1.1.1] 107 | 108 | > May 31, 2017 109 | 110 | * chore(env): use node 8 / npm 5 / styled-components 2 / storybook 3 111 | 112 | ## [v1.1.0] 113 | 114 | > May 23, 2017 115 | 116 | * chore(packages): yarn upgrade jest codecov prop-types rxjs 117 | * test(jest-styled-components): introduce css snapshot 118 | * chore(storybook): upgrade to `3.0.0-alpha.4` 119 | 120 | ## [v1.0.7] 121 | 122 | > May 06, 2017 123 | 124 | * refactor(recompose): switch to `mapPropsStream`. 125 | * chore(styled-components): update to rc. 126 | 127 | ## [v1.0.6] 128 | 129 | > May 04, 2017 130 | 131 | * fix(rx): add test for loading the second image at same time. 132 | 133 | ## [v1.0.5] 134 | 135 | > May 03, 2017 136 | 137 | * test(rx): add marble testing 138 | * feat(style): add inline-style example. 139 | 140 | ## [v1.0.4] 141 | 142 | > May 03, 2017 143 | 144 | * feat(normalize.css): upgrade to 7.0.0 145 | * chore(packages): yarn upgrade 146 | 147 | ## [v1.0.3] 148 | 149 | > May 02, 2017 150 | 151 | * feat(eslint): setup eslint. 152 | * docs(README): add gif demo. 153 | 154 | ## [v1.0.2] 155 | 156 | > May 02, 2017 157 | 158 | * fix(Component): props name conflict 159 | 160 | ## [v1.0.1] 161 | 162 | > May 02, 2017 163 | 164 | * Setup travis CI and netlify. 165 | * Update readme.md 166 | * Setup jest for testing. 167 | 168 | ## [v1.0.0] 169 | 170 | > May 02, 2017 171 | 172 | * first release 173 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Michael Hsu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-progressive-bg-image 2 | 3 | > Medium style progressive background image for React based on [Styled-components](https://github.com/styled-components/styled-components). 4 | 5 | [![Travis][build-badge]][build] 6 | [![Codecov Status][codecov-badge]][codecov] 7 | [![npm package][npm-badge]][npm] 8 | [![npm downloads][npm-downloads]][npm] 9 | 10 | [![Dependency Status][dependency-badge]][dependency] 11 | [![devDependency Status][devdependency-badge]][devdependency] 12 | [![peerDependency Status][peerdependency-badge]][peerdependency] 13 | 14 | [![prettier][prettier-badge]][prettier] 15 | [![license][license-badge]][license] 16 | 17 | ## Demo 18 | 19 | * https://react-progressive-bg-image.netlify.com/ 20 | * Responsive example: https://michaelhsu.tw/ [[Source code]](https://github.com/evenchange4/michaelhsu.tw/blob/master/src/components/CoverImage.js#L37-L44) 21 | * Img tag example: https://mcslite.netlify.com/ [[Source code]](https://github.com/MCS-Lite/mcs-lite/blob/master/packages/mcs-lite-landing-web/src/components/BackgroundImage/BackgroundImage.js) 22 | 23 | ![DEMO](./docs/demo.gif) 24 | 25 | ## Further Reading: 26 | 27 | * [[English] Reproducing Medium Style Progressive Image Loading for React](https://medium.com/@evenchange4/reproducing-medium-style-progressive-image-loading-for-react-2e83bba0c608). 28 | * [[中文] React Stack 開發體驗與優化策略](https://medium.com/@evenchange4/react-stack-%E9%96%8B%E7%99%BC%E9%AB%94%E9%A9%97%E8%88%87%E5%84%AA%E5%8C%96%E7%AD%96%E7%95%A5-b056da2fa0aa) 29 | 30 | ## Installation 31 | 32 | ```sh 33 | $ yarn add react-progressive-bg-image styled-components 34 | ``` 35 | 36 | ## Requirements 37 | 38 | * node >= 9.4.0 39 | * yarn >= 1.3.2 40 | 41 | * react `^16.0.0`, 42 | * styled-components `^3` 43 | 44 | ## Usage 45 | 46 | ### Case 1: Inline-style 47 | 48 | > Remind: May need to setup autoprefixer in your project. 49 | 50 | ```js 51 | import ProgressiveImage from 'react-progressive-bg-image'; 52 | 53 | ; 62 | ``` 63 | 64 | ### Case 2: With Styled-components 65 | 66 | ```js 67 | import styled from 'styled-components'; 68 | import ProgressiveImage from 'react-progressive-bg-image'; 69 | 70 | const StyledProgressiveImage = styled(ProgressiveImage)` 71 | height: 600px; 72 | background-size: contain; 73 | background-position: center center; 74 | `; 75 | 76 | ; 81 | ``` 82 | 83 | ## Property 84 | 85 | | **Prop** | **Type** | **Required** | **Description** | 86 | | ------------- | -------- | ------------ | ----------------------------------- | 87 | | `src` | string | yes | Origin image | 88 | | `placeholder` | string | yes | Small image (Suggest inline base64) | 89 | | `opacity` | number | | default: 0.5 | 90 | | `blur` | number | | default: 20 | 91 | | `scale` | number | | default: 1 | 92 | | `transition` | string | | default: 'opacity 0.3s linear' | 93 | | `component` | string | | default: 'div' | 94 | 95 | ## Test 96 | 97 | ``` 98 | $ yarn run format 99 | $ yarn run eslint 100 | $ yarn run test:watch 101 | ``` 102 | 103 | ## Github release / NPM release 104 | 105 | ``` 106 | $ npm version patch 107 | $ git push 108 | ``` 109 | 110 | --- 111 | 112 | ## Inspiration 113 | 114 | * https://github.com/FormidableLabs/react-progressive-image 115 | * [How Medium does progressive image loading](https://jmperezperez.com/medium-image-progressive-loading-placeholder/) 116 | 117 | ## CONTRIBUTING 118 | 119 | * ⇄ Pull requests and ★ Stars are always welcome. 120 | * For bugs and feature requests, please create an issue. 121 | * Pull requests must be accompanied by passing automated tests (`$ yarn run test`). 122 | 123 | ## [CHANGELOG](CHANGELOG.md) 124 | 125 | ## [LICENSE](LICENSE) 126 | 127 | MIT: [http://michaelhsu.mit-license.org](http://michaelhsu.mit-license.org) 128 | 129 | [build-badge]: https://img.shields.io/travis/evenchange4/react-progressive-bg-image/master.svg?style=flat-square 130 | [build]: https://travis-ci.org/evenchange4/react-progressive-bg-image 131 | [npm-badge]: https://img.shields.io/npm/v/react-progressive-bg-image.svg?style=flat-square 132 | [npm]: https://www.npmjs.org/package/react-progressive-bg-image 133 | [codecov-badge]: https://img.shields.io/codecov/c/github/evenchange4/react-progressive-bg-image.svg?style=flat-square 134 | [codecov]: https://codecov.io/github/evenchange4/react-progressive-bg-image?branch=master 135 | [npm-downloads]: https://img.shields.io/npm/dt/react-progressive-bg-image.svg?style=flat-square 136 | [license-badge]: https://img.shields.io/npm/l/react-progressive-bg-image.svg?style=flat-square 137 | [license]: http://michaelhsu.mit-license.org/ 138 | [dependency-badge]: https://david-dm.org/evenchange4/react-progressive-bg-image.svg?style=flat-square 139 | [dependency]: https://david-dm.org/evenchange4/react-progressive-bg-image 140 | [devdependency-badge]: https://david-dm.org/evenchange4/react-progressive-bg-image/dev-status.svg?style=flat-square 141 | [devdependency]: https://david-dm.org/evenchange4/react-progressive-bg-image#info=devDependencies 142 | [peerdependency-badge]: https://david-dm.org/evenchange4/react-progressive-bg-image/peer-status.svg?style=flat-square 143 | [peerdependency]: https://david-dm.org/evenchange4/react-progressive-bg-image#info=peerDependencies 144 | [prettier-badge]: https://img.shields.io/badge/styled_with-prettier-ff69b4.svg?style=flat-square 145 | [prettier]: https://github.com/prettier/prettier 146 | -------------------------------------------------------------------------------- /docs/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evenchange4/react-progressive-bg-image/aa84006da9c3c52a7e413eccc43f2d18bfcdfdbb/docs/demo.gif -------------------------------------------------------------------------------- /flow-typed/npm/@storybook/addon-info_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 11ce82c5f32ca8e623b6ec48fd405232 2 | // flow-typed version: <>/@storybook/addon-info_v3.3.11/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * '@storybook/addon-info' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module '@storybook/addon-info' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module '@storybook/addon-info/dist/components/makeTableComponent' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module '@storybook/addon-info/dist/components/markdown/code' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module '@storybook/addon-info/dist/components/markdown/htags' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module '@storybook/addon-info/dist/components/markdown/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module '@storybook/addon-info/dist/components/markdown/text' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module '@storybook/addon-info/dist/components/Node' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module '@storybook/addon-info/dist/components/Props' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module '@storybook/addon-info/dist/components/PropTable' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module '@storybook/addon-info/dist/components/PropVal' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module '@storybook/addon-info/dist/components/Story' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module '@storybook/addon-info/dist/components/types/ArrayOf' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module '@storybook/addon-info/dist/components/types/Enum' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module '@storybook/addon-info/dist/components/types/InstanceOf' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module '@storybook/addon-info/dist/components/types/Object' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module '@storybook/addon-info/dist/components/types/ObjectOf' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module '@storybook/addon-info/dist/components/types/ObjectType' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module '@storybook/addon-info/dist/components/types/OneOf' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module '@storybook/addon-info/dist/components/types/OneOfType' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module '@storybook/addon-info/dist/components/types/PrettyPropType' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module '@storybook/addon-info/dist/components/types/PropertyLabel' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module '@storybook/addon-info/dist/components/types/proptypes' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module '@storybook/addon-info/dist/components/types/Shape' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module '@storybook/addon-info/dist/components/types/Signature' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module '@storybook/addon-info/dist/index' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module '@storybook/addon-info/example/Button' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module '@storybook/addon-info/example/story' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module '@storybook/addon-info/src/components/makeTableComponent' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module '@storybook/addon-info/src/components/markdown/code' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module '@storybook/addon-info/src/components/markdown/htags' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module '@storybook/addon-info/src/components/markdown/index' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module '@storybook/addon-info/src/components/markdown/text' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module '@storybook/addon-info/src/components/Node' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module '@storybook/addon-info/src/components/Props' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module '@storybook/addon-info/src/components/PropTable' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module '@storybook/addon-info/src/components/PropTable.test' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module '@storybook/addon-info/src/components/PropVal' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module '@storybook/addon-info/src/components/Story' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module '@storybook/addon-info/src/components/types/ArrayOf' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module '@storybook/addon-info/src/components/types/Enum' { 178 | declare module.exports: any; 179 | } 180 | 181 | declare module '@storybook/addon-info/src/components/types/InstanceOf' { 182 | declare module.exports: any; 183 | } 184 | 185 | declare module '@storybook/addon-info/src/components/types/Object' { 186 | declare module.exports: any; 187 | } 188 | 189 | declare module '@storybook/addon-info/src/components/types/ObjectOf' { 190 | declare module.exports: any; 191 | } 192 | 193 | declare module '@storybook/addon-info/src/components/types/ObjectType' { 194 | declare module.exports: any; 195 | } 196 | 197 | declare module '@storybook/addon-info/src/components/types/OneOf' { 198 | declare module.exports: any; 199 | } 200 | 201 | declare module '@storybook/addon-info/src/components/types/OneOfType' { 202 | declare module.exports: any; 203 | } 204 | 205 | declare module '@storybook/addon-info/src/components/types/PrettyPropType' { 206 | declare module.exports: any; 207 | } 208 | 209 | declare module '@storybook/addon-info/src/components/types/PropertyLabel' { 210 | declare module.exports: any; 211 | } 212 | 213 | declare module '@storybook/addon-info/src/components/types/proptypes' { 214 | declare module.exports: any; 215 | } 216 | 217 | declare module '@storybook/addon-info/src/components/types/Shape' { 218 | declare module.exports: any; 219 | } 220 | 221 | declare module '@storybook/addon-info/src/components/types/Signature' { 222 | declare module.exports: any; 223 | } 224 | 225 | declare module '@storybook/addon-info/src/index' { 226 | declare module.exports: any; 227 | } 228 | 229 | declare module '@storybook/addon-info/src/index.test' { 230 | declare module.exports: any; 231 | } 232 | 233 | // Filename aliases 234 | declare module '@storybook/addon-info/dist/components/makeTableComponent.js' { 235 | declare module.exports: $Exports< 236 | '@storybook/addon-info/dist/components/makeTableComponent', 237 | >; 238 | } 239 | declare module '@storybook/addon-info/dist/components/markdown/code.js' { 240 | declare module.exports: $Exports< 241 | '@storybook/addon-info/dist/components/markdown/code', 242 | >; 243 | } 244 | declare module '@storybook/addon-info/dist/components/markdown/htags.js' { 245 | declare module.exports: $Exports< 246 | '@storybook/addon-info/dist/components/markdown/htags', 247 | >; 248 | } 249 | declare module '@storybook/addon-info/dist/components/markdown/index.js' { 250 | declare module.exports: $Exports< 251 | '@storybook/addon-info/dist/components/markdown/index', 252 | >; 253 | } 254 | declare module '@storybook/addon-info/dist/components/markdown/text.js' { 255 | declare module.exports: $Exports< 256 | '@storybook/addon-info/dist/components/markdown/text', 257 | >; 258 | } 259 | declare module '@storybook/addon-info/dist/components/Node.js' { 260 | declare module.exports: $Exports< 261 | '@storybook/addon-info/dist/components/Node', 262 | >; 263 | } 264 | declare module '@storybook/addon-info/dist/components/Props.js' { 265 | declare module.exports: $Exports< 266 | '@storybook/addon-info/dist/components/Props', 267 | >; 268 | } 269 | declare module '@storybook/addon-info/dist/components/PropTable.js' { 270 | declare module.exports: $Exports< 271 | '@storybook/addon-info/dist/components/PropTable', 272 | >; 273 | } 274 | declare module '@storybook/addon-info/dist/components/PropVal.js' { 275 | declare module.exports: $Exports< 276 | '@storybook/addon-info/dist/components/PropVal', 277 | >; 278 | } 279 | declare module '@storybook/addon-info/dist/components/Story.js' { 280 | declare module.exports: $Exports< 281 | '@storybook/addon-info/dist/components/Story', 282 | >; 283 | } 284 | declare module '@storybook/addon-info/dist/components/types/ArrayOf.js' { 285 | declare module.exports: $Exports< 286 | '@storybook/addon-info/dist/components/types/ArrayOf', 287 | >; 288 | } 289 | declare module '@storybook/addon-info/dist/components/types/Enum.js' { 290 | declare module.exports: $Exports< 291 | '@storybook/addon-info/dist/components/types/Enum', 292 | >; 293 | } 294 | declare module '@storybook/addon-info/dist/components/types/InstanceOf.js' { 295 | declare module.exports: $Exports< 296 | '@storybook/addon-info/dist/components/types/InstanceOf', 297 | >; 298 | } 299 | declare module '@storybook/addon-info/dist/components/types/Object.js' { 300 | declare module.exports: $Exports< 301 | '@storybook/addon-info/dist/components/types/Object', 302 | >; 303 | } 304 | declare module '@storybook/addon-info/dist/components/types/ObjectOf.js' { 305 | declare module.exports: $Exports< 306 | '@storybook/addon-info/dist/components/types/ObjectOf', 307 | >; 308 | } 309 | declare module '@storybook/addon-info/dist/components/types/ObjectType.js' { 310 | declare module.exports: $Exports< 311 | '@storybook/addon-info/dist/components/types/ObjectType', 312 | >; 313 | } 314 | declare module '@storybook/addon-info/dist/components/types/OneOf.js' { 315 | declare module.exports: $Exports< 316 | '@storybook/addon-info/dist/components/types/OneOf', 317 | >; 318 | } 319 | declare module '@storybook/addon-info/dist/components/types/OneOfType.js' { 320 | declare module.exports: $Exports< 321 | '@storybook/addon-info/dist/components/types/OneOfType', 322 | >; 323 | } 324 | declare module '@storybook/addon-info/dist/components/types/PrettyPropType.js' { 325 | declare module.exports: $Exports< 326 | '@storybook/addon-info/dist/components/types/PrettyPropType', 327 | >; 328 | } 329 | declare module '@storybook/addon-info/dist/components/types/PropertyLabel.js' { 330 | declare module.exports: $Exports< 331 | '@storybook/addon-info/dist/components/types/PropertyLabel', 332 | >; 333 | } 334 | declare module '@storybook/addon-info/dist/components/types/proptypes.js' { 335 | declare module.exports: $Exports< 336 | '@storybook/addon-info/dist/components/types/proptypes', 337 | >; 338 | } 339 | declare module '@storybook/addon-info/dist/components/types/Shape.js' { 340 | declare module.exports: $Exports< 341 | '@storybook/addon-info/dist/components/types/Shape', 342 | >; 343 | } 344 | declare module '@storybook/addon-info/dist/components/types/Signature.js' { 345 | declare module.exports: $Exports< 346 | '@storybook/addon-info/dist/components/types/Signature', 347 | >; 348 | } 349 | declare module '@storybook/addon-info/dist/index.js' { 350 | declare module.exports: $Exports<'@storybook/addon-info/dist/index'>; 351 | } 352 | declare module '@storybook/addon-info/example/Button.js' { 353 | declare module.exports: $Exports<'@storybook/addon-info/example/Button'>; 354 | } 355 | declare module '@storybook/addon-info/example/story.js' { 356 | declare module.exports: $Exports<'@storybook/addon-info/example/story'>; 357 | } 358 | declare module '@storybook/addon-info/src/components/makeTableComponent.js' { 359 | declare module.exports: $Exports< 360 | '@storybook/addon-info/src/components/makeTableComponent', 361 | >; 362 | } 363 | declare module '@storybook/addon-info/src/components/markdown/code.js' { 364 | declare module.exports: $Exports< 365 | '@storybook/addon-info/src/components/markdown/code', 366 | >; 367 | } 368 | declare module '@storybook/addon-info/src/components/markdown/htags.js' { 369 | declare module.exports: $Exports< 370 | '@storybook/addon-info/src/components/markdown/htags', 371 | >; 372 | } 373 | declare module '@storybook/addon-info/src/components/markdown/index.js' { 374 | declare module.exports: $Exports< 375 | '@storybook/addon-info/src/components/markdown/index', 376 | >; 377 | } 378 | declare module '@storybook/addon-info/src/components/markdown/text.js' { 379 | declare module.exports: $Exports< 380 | '@storybook/addon-info/src/components/markdown/text', 381 | >; 382 | } 383 | declare module '@storybook/addon-info/src/components/Node.js' { 384 | declare module.exports: $Exports<'@storybook/addon-info/src/components/Node'>; 385 | } 386 | declare module '@storybook/addon-info/src/components/Props.js' { 387 | declare module.exports: $Exports< 388 | '@storybook/addon-info/src/components/Props', 389 | >; 390 | } 391 | declare module '@storybook/addon-info/src/components/PropTable.js' { 392 | declare module.exports: $Exports< 393 | '@storybook/addon-info/src/components/PropTable', 394 | >; 395 | } 396 | declare module '@storybook/addon-info/src/components/PropTable.test.js' { 397 | declare module.exports: $Exports< 398 | '@storybook/addon-info/src/components/PropTable.test', 399 | >; 400 | } 401 | declare module '@storybook/addon-info/src/components/PropVal.js' { 402 | declare module.exports: $Exports< 403 | '@storybook/addon-info/src/components/PropVal', 404 | >; 405 | } 406 | declare module '@storybook/addon-info/src/components/Story.js' { 407 | declare module.exports: $Exports< 408 | '@storybook/addon-info/src/components/Story', 409 | >; 410 | } 411 | declare module '@storybook/addon-info/src/components/types/ArrayOf.js' { 412 | declare module.exports: $Exports< 413 | '@storybook/addon-info/src/components/types/ArrayOf', 414 | >; 415 | } 416 | declare module '@storybook/addon-info/src/components/types/Enum.js' { 417 | declare module.exports: $Exports< 418 | '@storybook/addon-info/src/components/types/Enum', 419 | >; 420 | } 421 | declare module '@storybook/addon-info/src/components/types/InstanceOf.js' { 422 | declare module.exports: $Exports< 423 | '@storybook/addon-info/src/components/types/InstanceOf', 424 | >; 425 | } 426 | declare module '@storybook/addon-info/src/components/types/Object.js' { 427 | declare module.exports: $Exports< 428 | '@storybook/addon-info/src/components/types/Object', 429 | >; 430 | } 431 | declare module '@storybook/addon-info/src/components/types/ObjectOf.js' { 432 | declare module.exports: $Exports< 433 | '@storybook/addon-info/src/components/types/ObjectOf', 434 | >; 435 | } 436 | declare module '@storybook/addon-info/src/components/types/ObjectType.js' { 437 | declare module.exports: $Exports< 438 | '@storybook/addon-info/src/components/types/ObjectType', 439 | >; 440 | } 441 | declare module '@storybook/addon-info/src/components/types/OneOf.js' { 442 | declare module.exports: $Exports< 443 | '@storybook/addon-info/src/components/types/OneOf', 444 | >; 445 | } 446 | declare module '@storybook/addon-info/src/components/types/OneOfType.js' { 447 | declare module.exports: $Exports< 448 | '@storybook/addon-info/src/components/types/OneOfType', 449 | >; 450 | } 451 | declare module '@storybook/addon-info/src/components/types/PrettyPropType.js' { 452 | declare module.exports: $Exports< 453 | '@storybook/addon-info/src/components/types/PrettyPropType', 454 | >; 455 | } 456 | declare module '@storybook/addon-info/src/components/types/PropertyLabel.js' { 457 | declare module.exports: $Exports< 458 | '@storybook/addon-info/src/components/types/PropertyLabel', 459 | >; 460 | } 461 | declare module '@storybook/addon-info/src/components/types/proptypes.js' { 462 | declare module.exports: $Exports< 463 | '@storybook/addon-info/src/components/types/proptypes', 464 | >; 465 | } 466 | declare module '@storybook/addon-info/src/components/types/Shape.js' { 467 | declare module.exports: $Exports< 468 | '@storybook/addon-info/src/components/types/Shape', 469 | >; 470 | } 471 | declare module '@storybook/addon-info/src/components/types/Signature.js' { 472 | declare module.exports: $Exports< 473 | '@storybook/addon-info/src/components/types/Signature', 474 | >; 475 | } 476 | declare module '@storybook/addon-info/src/index.js' { 477 | declare module.exports: $Exports<'@storybook/addon-info/src/index'>; 478 | } 479 | declare module '@storybook/addon-info/src/index.test.js' { 480 | declare module.exports: $Exports<'@storybook/addon-info/src/index.test'>; 481 | } 482 | -------------------------------------------------------------------------------- /flow-typed/npm/@storybook/addon-options_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: e1ef735722610cb040768e4f9f33d5d5 2 | // flow-typed version: <>/@storybook/addon-options_v3.3.11/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * '@storybook/addon-options' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module '@storybook/addon-options' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module '@storybook/addon-options/dist/manager/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module '@storybook/addon-options/dist/preview/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module '@storybook/addon-options/dist/shared/index' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module '@storybook/addon-options/manager' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module '@storybook/addon-options/preview' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module '@storybook/addon-options/register' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module '@storybook/addon-options/src/manager/index' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module '@storybook/addon-options/src/preview/index' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module '@storybook/addon-options/src/shared/index' { 58 | declare module.exports: any; 59 | } 60 | 61 | // Filename aliases 62 | declare module '@storybook/addon-options/dist/manager/index.js' { 63 | declare module.exports: $Exports< 64 | '@storybook/addon-options/dist/manager/index', 65 | >; 66 | } 67 | declare module '@storybook/addon-options/dist/preview/index.js' { 68 | declare module.exports: $Exports< 69 | '@storybook/addon-options/dist/preview/index', 70 | >; 71 | } 72 | declare module '@storybook/addon-options/dist/shared/index.js' { 73 | declare module.exports: $Exports< 74 | '@storybook/addon-options/dist/shared/index', 75 | >; 76 | } 77 | declare module '@storybook/addon-options/manager.js' { 78 | declare module.exports: $Exports<'@storybook/addon-options/manager'>; 79 | } 80 | declare module '@storybook/addon-options/preview.js' { 81 | declare module.exports: $Exports<'@storybook/addon-options/preview'>; 82 | } 83 | declare module '@storybook/addon-options/register.js' { 84 | declare module.exports: $Exports<'@storybook/addon-options/register'>; 85 | } 86 | declare module '@storybook/addon-options/src/manager/index.js' { 87 | declare module.exports: $Exports< 88 | '@storybook/addon-options/src/manager/index', 89 | >; 90 | } 91 | declare module '@storybook/addon-options/src/preview/index.js' { 92 | declare module.exports: $Exports< 93 | '@storybook/addon-options/src/preview/index', 94 | >; 95 | } 96 | declare module '@storybook/addon-options/src/shared/index.js' { 97 | declare module.exports: $Exports<'@storybook/addon-options/src/shared/index'>; 98 | } 99 | -------------------------------------------------------------------------------- /flow-typed/npm/@storybook/addon-storyshots_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 434015d07076a3d772881aa070f82a42 2 | // flow-typed version: <>/@storybook/addon-storyshots_v3.3.11/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * '@storybook/addon-storyshots' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module '@storybook/addon-storyshots' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module '@storybook/addon-storyshots/dist/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module '@storybook/addon-storyshots/dist/require_context' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module '@storybook/addon-storyshots/dist/storybook-channel-mock' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module '@storybook/addon-storyshots/dist/test-bodies' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module '@storybook/addon-storyshots/dist/utils' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module '@storybook/addon-storyshots/src/index' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module '@storybook/addon-storyshots/src/require_context' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module '@storybook/addon-storyshots/src/storybook-channel-mock' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module '@storybook/addon-storyshots/src/test-bodies' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module '@storybook/addon-storyshots/src/utils' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module '@storybook/addon-storyshots/stories/directly_required/index' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module '@storybook/addon-storyshots/stories/required_with_context/Button.stories' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module '@storybook/addon-storyshots/stories/required_with_context/Welcome.stories' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module '@storybook/addon-storyshots/stories/storyshot.enzyme.test' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module '@storybook/addon-storyshots/stories/storyshot.test' { 82 | declare module.exports: any; 83 | } 84 | 85 | // Filename aliases 86 | declare module '@storybook/addon-storyshots/dist/index.js' { 87 | declare module.exports: $Exports<'@storybook/addon-storyshots/dist/index'>; 88 | } 89 | declare module '@storybook/addon-storyshots/dist/require_context.js' { 90 | declare module.exports: $Exports< 91 | '@storybook/addon-storyshots/dist/require_context', 92 | >; 93 | } 94 | declare module '@storybook/addon-storyshots/dist/storybook-channel-mock.js' { 95 | declare module.exports: $Exports< 96 | '@storybook/addon-storyshots/dist/storybook-channel-mock', 97 | >; 98 | } 99 | declare module '@storybook/addon-storyshots/dist/test-bodies.js' { 100 | declare module.exports: $Exports< 101 | '@storybook/addon-storyshots/dist/test-bodies', 102 | >; 103 | } 104 | declare module '@storybook/addon-storyshots/dist/utils.js' { 105 | declare module.exports: $Exports<'@storybook/addon-storyshots/dist/utils'>; 106 | } 107 | declare module '@storybook/addon-storyshots/src/index.js' { 108 | declare module.exports: $Exports<'@storybook/addon-storyshots/src/index'>; 109 | } 110 | declare module '@storybook/addon-storyshots/src/require_context.js' { 111 | declare module.exports: $Exports< 112 | '@storybook/addon-storyshots/src/require_context', 113 | >; 114 | } 115 | declare module '@storybook/addon-storyshots/src/storybook-channel-mock.js' { 116 | declare module.exports: $Exports< 117 | '@storybook/addon-storyshots/src/storybook-channel-mock', 118 | >; 119 | } 120 | declare module '@storybook/addon-storyshots/src/test-bodies.js' { 121 | declare module.exports: $Exports< 122 | '@storybook/addon-storyshots/src/test-bodies', 123 | >; 124 | } 125 | declare module '@storybook/addon-storyshots/src/utils.js' { 126 | declare module.exports: $Exports<'@storybook/addon-storyshots/src/utils'>; 127 | } 128 | declare module '@storybook/addon-storyshots/stories/directly_required/index.js' { 129 | declare module.exports: $Exports< 130 | '@storybook/addon-storyshots/stories/directly_required/index', 131 | >; 132 | } 133 | declare module '@storybook/addon-storyshots/stories/required_with_context/Button.stories.js' { 134 | declare module.exports: $Exports< 135 | '@storybook/addon-storyshots/stories/required_with_context/Button.stories', 136 | >; 137 | } 138 | declare module '@storybook/addon-storyshots/stories/required_with_context/Welcome.stories.js' { 139 | declare module.exports: $Exports< 140 | '@storybook/addon-storyshots/stories/required_with_context/Welcome.stories', 141 | >; 142 | } 143 | declare module '@storybook/addon-storyshots/stories/storyshot.enzyme.test.js' { 144 | declare module.exports: $Exports< 145 | '@storybook/addon-storyshots/stories/storyshot.enzyme.test', 146 | >; 147 | } 148 | declare module '@storybook/addon-storyshots/stories/storyshot.test.js' { 149 | declare module.exports: $Exports< 150 | '@storybook/addon-storyshots/stories/storyshot.test', 151 | >; 152 | } 153 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-cli_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 32bc13c2532e5176403a945bcaa26dac 2 | // flow-typed version: <>/babel-cli_v6.26.0/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-cli' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-cli' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-cli/bin/babel-doctor' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-cli/bin/babel-external-helpers' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-cli/bin/babel-node' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-cli/bin/babel' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-cli/lib/_babel-node' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-cli/lib/babel-external-helpers' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-cli/lib/babel-node' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'babel-cli/lib/babel/dir' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'babel-cli/lib/babel/file' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'babel-cli/lib/babel/index' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'babel-cli/lib/babel/util' { 66 | declare module.exports: any; 67 | } 68 | 69 | // Filename aliases 70 | declare module 'babel-cli/bin/babel-doctor.js' { 71 | declare module.exports: $Exports<'babel-cli/bin/babel-doctor'>; 72 | } 73 | declare module 'babel-cli/bin/babel-external-helpers.js' { 74 | declare module.exports: $Exports<'babel-cli/bin/babel-external-helpers'>; 75 | } 76 | declare module 'babel-cli/bin/babel-node.js' { 77 | declare module.exports: $Exports<'babel-cli/bin/babel-node'>; 78 | } 79 | declare module 'babel-cli/bin/babel.js' { 80 | declare module.exports: $Exports<'babel-cli/bin/babel'>; 81 | } 82 | declare module 'babel-cli/index' { 83 | declare module.exports: $Exports<'babel-cli'>; 84 | } 85 | declare module 'babel-cli/index.js' { 86 | declare module.exports: $Exports<'babel-cli'>; 87 | } 88 | declare module 'babel-cli/lib/_babel-node.js' { 89 | declare module.exports: $Exports<'babel-cli/lib/_babel-node'>; 90 | } 91 | declare module 'babel-cli/lib/babel-external-helpers.js' { 92 | declare module.exports: $Exports<'babel-cli/lib/babel-external-helpers'>; 93 | } 94 | declare module 'babel-cli/lib/babel-node.js' { 95 | declare module.exports: $Exports<'babel-cli/lib/babel-node'>; 96 | } 97 | declare module 'babel-cli/lib/babel/dir.js' { 98 | declare module.exports: $Exports<'babel-cli/lib/babel/dir'>; 99 | } 100 | declare module 'babel-cli/lib/babel/file.js' { 101 | declare module.exports: $Exports<'babel-cli/lib/babel/file'>; 102 | } 103 | declare module 'babel-cli/lib/babel/index.js' { 104 | declare module.exports: $Exports<'babel-cli/lib/babel/index'>; 105 | } 106 | declare module 'babel-cli/lib/babel/util.js' { 107 | declare module.exports: $Exports<'babel-cli/lib/babel/util'>; 108 | } 109 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-eslint_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 903d0968e4b81ce1a17ea5187d25e7db 2 | // flow-typed version: <>/babel-eslint_v8.2.1/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-eslint' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-eslint' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-eslint/lib/analyze-scope' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-eslint/lib/babylon-to-espree/attachComments' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-eslint/lib/babylon-to-espree/convertComments' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-eslint/lib/babylon-to-espree/convertTemplateType' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-eslint/lib/babylon-to-espree/index' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-eslint/lib/babylon-to-espree/toAST' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-eslint/lib/babylon-to-espree/toToken' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'babel-eslint/lib/babylon-to-espree/toTokens' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'babel-eslint/lib/index' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'babel-eslint/lib/parse-with-patch' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'babel-eslint/lib/parse-with-scope' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'babel-eslint/lib/parse' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'babel-eslint/lib/patch-eslint-scope' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'babel-eslint/lib/visitor-keys' { 78 | declare module.exports: any; 79 | } 80 | 81 | // Filename aliases 82 | declare module 'babel-eslint/lib/analyze-scope.js' { 83 | declare module.exports: $Exports<'babel-eslint/lib/analyze-scope'>; 84 | } 85 | declare module 'babel-eslint/lib/babylon-to-espree/attachComments.js' { 86 | declare module.exports: $Exports< 87 | 'babel-eslint/lib/babylon-to-espree/attachComments', 88 | >; 89 | } 90 | declare module 'babel-eslint/lib/babylon-to-espree/convertComments.js' { 91 | declare module.exports: $Exports< 92 | 'babel-eslint/lib/babylon-to-espree/convertComments', 93 | >; 94 | } 95 | declare module 'babel-eslint/lib/babylon-to-espree/convertTemplateType.js' { 96 | declare module.exports: $Exports< 97 | 'babel-eslint/lib/babylon-to-espree/convertTemplateType', 98 | >; 99 | } 100 | declare module 'babel-eslint/lib/babylon-to-espree/index.js' { 101 | declare module.exports: $Exports<'babel-eslint/lib/babylon-to-espree/index'>; 102 | } 103 | declare module 'babel-eslint/lib/babylon-to-espree/toAST.js' { 104 | declare module.exports: $Exports<'babel-eslint/lib/babylon-to-espree/toAST'>; 105 | } 106 | declare module 'babel-eslint/lib/babylon-to-espree/toToken.js' { 107 | declare module.exports: $Exports< 108 | 'babel-eslint/lib/babylon-to-espree/toToken', 109 | >; 110 | } 111 | declare module 'babel-eslint/lib/babylon-to-espree/toTokens.js' { 112 | declare module.exports: $Exports< 113 | 'babel-eslint/lib/babylon-to-espree/toTokens', 114 | >; 115 | } 116 | declare module 'babel-eslint/lib/index.js' { 117 | declare module.exports: $Exports<'babel-eslint/lib/index'>; 118 | } 119 | declare module 'babel-eslint/lib/parse-with-patch.js' { 120 | declare module.exports: $Exports<'babel-eslint/lib/parse-with-patch'>; 121 | } 122 | declare module 'babel-eslint/lib/parse-with-scope.js' { 123 | declare module.exports: $Exports<'babel-eslint/lib/parse-with-scope'>; 124 | } 125 | declare module 'babel-eslint/lib/parse.js' { 126 | declare module.exports: $Exports<'babel-eslint/lib/parse'>; 127 | } 128 | declare module 'babel-eslint/lib/patch-eslint-scope.js' { 129 | declare module.exports: $Exports<'babel-eslint/lib/patch-eslint-scope'>; 130 | } 131 | declare module 'babel-eslint/lib/visitor-keys.js' { 132 | declare module.exports: $Exports<'babel-eslint/lib/visitor-keys'>; 133 | } 134 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-env_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: d3b8ba68d42739da0a2850c160fa621c 2 | // flow-typed version: <>/babel-preset-env_v1.6.1/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-env' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-env' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-env/data/built-in-features' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-preset-env/data/plugin-features' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-preset-env/lib/default-includes' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-preset-env/lib/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-preset-env/lib/module-transformations' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-preset-env/lib/normalize-options' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-preset-env/lib/targets-parser' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'babel-preset-env/lib/transform-polyfill-require-plugin' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'babel-preset-env/lib/utils' { 58 | declare module.exports: any; 59 | } 60 | 61 | // Filename aliases 62 | declare module 'babel-preset-env/data/built-in-features.js' { 63 | declare module.exports: $Exports<'babel-preset-env/data/built-in-features'>; 64 | } 65 | declare module 'babel-preset-env/data/plugin-features.js' { 66 | declare module.exports: $Exports<'babel-preset-env/data/plugin-features'>; 67 | } 68 | declare module 'babel-preset-env/lib/default-includes.js' { 69 | declare module.exports: $Exports<'babel-preset-env/lib/default-includes'>; 70 | } 71 | declare module 'babel-preset-env/lib/index.js' { 72 | declare module.exports: $Exports<'babel-preset-env/lib/index'>; 73 | } 74 | declare module 'babel-preset-env/lib/module-transformations.js' { 75 | declare module.exports: $Exports< 76 | 'babel-preset-env/lib/module-transformations', 77 | >; 78 | } 79 | declare module 'babel-preset-env/lib/normalize-options.js' { 80 | declare module.exports: $Exports<'babel-preset-env/lib/normalize-options'>; 81 | } 82 | declare module 'babel-preset-env/lib/targets-parser.js' { 83 | declare module.exports: $Exports<'babel-preset-env/lib/targets-parser'>; 84 | } 85 | declare module 'babel-preset-env/lib/transform-polyfill-require-plugin.js' { 86 | declare module.exports: $Exports< 87 | 'babel-preset-env/lib/transform-polyfill-require-plugin', 88 | >; 89 | } 90 | declare module 'babel-preset-env/lib/utils.js' { 91 | declare module.exports: $Exports<'babel-preset-env/lib/utils'>; 92 | } 93 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-react-app_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 642c38366412180ca62f7989ec27ba49 2 | // flow-typed version: <>/babel-preset-react-app_v3.1.1/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-react-app' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-react-app' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | // Filename aliases 27 | declare module 'babel-preset-react-app/index' { 28 | declare module.exports: $Exports<'babel-preset-react-app'>; 29 | } 30 | declare module 'babel-preset-react-app/index.js' { 31 | declare module.exports: $Exports<'babel-preset-react-app'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/codecov_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: a9540aded1eb88f6e581859198ef76e5 2 | // flow-typed version: <>/codecov_v3.0.0/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'codecov' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'codecov' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'codecov/lib/codecov' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'codecov/lib/detect' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'codecov/lib/git' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'codecov/lib/offline' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'codecov/lib/services/appveyor' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'codecov/lib/services/buildkite' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'codecov/lib/services/circle' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'codecov/lib/services/codeship' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'codecov/lib/services/drone' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'codecov/lib/services/gitlab' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'codecov/lib/services/jenkins' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'codecov/lib/services/localGit' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'codecov/lib/services/semaphore' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'codecov/lib/services/shippable' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'codecov/lib/services/snap' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'codecov/lib/services/travis' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'codecov/lib/services/wercker' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'codecov/test/detect' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'codecov/test/git' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'codecov/test/index' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'codecov/test/services/appveyor' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'codecov/test/services/buildkite' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'codecov/test/services/circle' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'codecov/test/services/codeship' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'codecov/test/services/drone' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'codecov/test/services/gitlab' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'codecov/test/services/jenkins' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'codecov/test/services/localGit' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'codecov/test/services/semaphore' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'codecov/test/services/shippable' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'codecov/test/services/snap' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'codecov/test/services/travis' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'codecov/test/services/wercker' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'codecov/test/upload' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module 'codecov/testinit' { 162 | declare module.exports: any; 163 | } 164 | 165 | // Filename aliases 166 | declare module 'codecov/index' { 167 | declare module.exports: $Exports<'codecov'>; 168 | } 169 | declare module 'codecov/index.js' { 170 | declare module.exports: $Exports<'codecov'>; 171 | } 172 | declare module 'codecov/lib/codecov.js' { 173 | declare module.exports: $Exports<'codecov/lib/codecov'>; 174 | } 175 | declare module 'codecov/lib/detect.js' { 176 | declare module.exports: $Exports<'codecov/lib/detect'>; 177 | } 178 | declare module 'codecov/lib/git.js' { 179 | declare module.exports: $Exports<'codecov/lib/git'>; 180 | } 181 | declare module 'codecov/lib/offline.js' { 182 | declare module.exports: $Exports<'codecov/lib/offline'>; 183 | } 184 | declare module 'codecov/lib/services/appveyor.js' { 185 | declare module.exports: $Exports<'codecov/lib/services/appveyor'>; 186 | } 187 | declare module 'codecov/lib/services/buildkite.js' { 188 | declare module.exports: $Exports<'codecov/lib/services/buildkite'>; 189 | } 190 | declare module 'codecov/lib/services/circle.js' { 191 | declare module.exports: $Exports<'codecov/lib/services/circle'>; 192 | } 193 | declare module 'codecov/lib/services/codeship.js' { 194 | declare module.exports: $Exports<'codecov/lib/services/codeship'>; 195 | } 196 | declare module 'codecov/lib/services/drone.js' { 197 | declare module.exports: $Exports<'codecov/lib/services/drone'>; 198 | } 199 | declare module 'codecov/lib/services/gitlab.js' { 200 | declare module.exports: $Exports<'codecov/lib/services/gitlab'>; 201 | } 202 | declare module 'codecov/lib/services/jenkins.js' { 203 | declare module.exports: $Exports<'codecov/lib/services/jenkins'>; 204 | } 205 | declare module 'codecov/lib/services/localGit.js' { 206 | declare module.exports: $Exports<'codecov/lib/services/localGit'>; 207 | } 208 | declare module 'codecov/lib/services/semaphore.js' { 209 | declare module.exports: $Exports<'codecov/lib/services/semaphore'>; 210 | } 211 | declare module 'codecov/lib/services/shippable.js' { 212 | declare module.exports: $Exports<'codecov/lib/services/shippable'>; 213 | } 214 | declare module 'codecov/lib/services/snap.js' { 215 | declare module.exports: $Exports<'codecov/lib/services/snap'>; 216 | } 217 | declare module 'codecov/lib/services/travis.js' { 218 | declare module.exports: $Exports<'codecov/lib/services/travis'>; 219 | } 220 | declare module 'codecov/lib/services/wercker.js' { 221 | declare module.exports: $Exports<'codecov/lib/services/wercker'>; 222 | } 223 | declare module 'codecov/test/detect.js' { 224 | declare module.exports: $Exports<'codecov/test/detect'>; 225 | } 226 | declare module 'codecov/test/git.js' { 227 | declare module.exports: $Exports<'codecov/test/git'>; 228 | } 229 | declare module 'codecov/test/index.js' { 230 | declare module.exports: $Exports<'codecov/test/index'>; 231 | } 232 | declare module 'codecov/test/services/appveyor.js' { 233 | declare module.exports: $Exports<'codecov/test/services/appveyor'>; 234 | } 235 | declare module 'codecov/test/services/buildkite.js' { 236 | declare module.exports: $Exports<'codecov/test/services/buildkite'>; 237 | } 238 | declare module 'codecov/test/services/circle.js' { 239 | declare module.exports: $Exports<'codecov/test/services/circle'>; 240 | } 241 | declare module 'codecov/test/services/codeship.js' { 242 | declare module.exports: $Exports<'codecov/test/services/codeship'>; 243 | } 244 | declare module 'codecov/test/services/drone.js' { 245 | declare module.exports: $Exports<'codecov/test/services/drone'>; 246 | } 247 | declare module 'codecov/test/services/gitlab.js' { 248 | declare module.exports: $Exports<'codecov/test/services/gitlab'>; 249 | } 250 | declare module 'codecov/test/services/jenkins.js' { 251 | declare module.exports: $Exports<'codecov/test/services/jenkins'>; 252 | } 253 | declare module 'codecov/test/services/localGit.js' { 254 | declare module.exports: $Exports<'codecov/test/services/localGit'>; 255 | } 256 | declare module 'codecov/test/services/semaphore.js' { 257 | declare module.exports: $Exports<'codecov/test/services/semaphore'>; 258 | } 259 | declare module 'codecov/test/services/shippable.js' { 260 | declare module.exports: $Exports<'codecov/test/services/shippable'>; 261 | } 262 | declare module 'codecov/test/services/snap.js' { 263 | declare module.exports: $Exports<'codecov/test/services/snap'>; 264 | } 265 | declare module 'codecov/test/services/travis.js' { 266 | declare module.exports: $Exports<'codecov/test/services/travis'>; 267 | } 268 | declare module 'codecov/test/services/wercker.js' { 269 | declare module.exports: $Exports<'codecov/test/services/wercker'>; 270 | } 271 | declare module 'codecov/test/upload.js' { 272 | declare module.exports: $Exports<'codecov/test/upload'>; 273 | } 274 | declare module 'codecov/testinit.js' { 275 | declare module.exports: $Exports<'codecov/testinit'>; 276 | } 277 | -------------------------------------------------------------------------------- /flow-typed/npm/enzyme-adapter-react-16_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 3d85e046fc4accba97eb98a8136d846c 2 | // flow-typed version: <>/enzyme-adapter-react-16_v1.1.1/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'enzyme-adapter-react-16' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'enzyme-adapter-react-16' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'enzyme-adapter-react-16/build/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'enzyme-adapter-react-16/build/ReactSixteenAdapter' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'enzyme-adapter-react-16/src/index' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'enzyme-adapter-react-16/src/ReactSixteenAdapter' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'enzyme-adapter-react-16/build/index.js' { 43 | declare module.exports: $Exports<'enzyme-adapter-react-16/build/index'>; 44 | } 45 | declare module 'enzyme-adapter-react-16/build/ReactSixteenAdapter.js' { 46 | declare module.exports: $Exports< 47 | 'enzyme-adapter-react-16/build/ReactSixteenAdapter', 48 | >; 49 | } 50 | declare module 'enzyme-adapter-react-16/src/index.js' { 51 | declare module.exports: $Exports<'enzyme-adapter-react-16/src/index'>; 52 | } 53 | declare module 'enzyme-adapter-react-16/src/ReactSixteenAdapter.js' { 54 | declare module.exports: $Exports< 55 | 'enzyme-adapter-react-16/src/ReactSixteenAdapter', 56 | >; 57 | } 58 | -------------------------------------------------------------------------------- /flow-typed/npm/enzyme-to-json_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: d5bfb95e091a49f05a916c44136b343b 2 | // flow-typed version: <>/enzyme-to-json_v3.3.1/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'enzyme-to-json' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'enzyme-to-json' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'enzyme-to-json/createSerializer' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'enzyme-to-json/mount' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'enzyme-to-json/render' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'enzyme-to-json/serializer' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'enzyme-to-json/shallow' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'enzyme-to-json/utils' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'enzyme-to-json/createSerializer.js' { 51 | declare module.exports: $Exports<'enzyme-to-json/createSerializer'>; 52 | } 53 | declare module 'enzyme-to-json/index' { 54 | declare module.exports: $Exports<'enzyme-to-json'>; 55 | } 56 | declare module 'enzyme-to-json/index.js' { 57 | declare module.exports: $Exports<'enzyme-to-json'>; 58 | } 59 | declare module 'enzyme-to-json/mount.js' { 60 | declare module.exports: $Exports<'enzyme-to-json/mount'>; 61 | } 62 | declare module 'enzyme-to-json/render.js' { 63 | declare module.exports: $Exports<'enzyme-to-json/render'>; 64 | } 65 | declare module 'enzyme-to-json/serializer.js' { 66 | declare module.exports: $Exports<'enzyme-to-json/serializer'>; 67 | } 68 | declare module 'enzyme-to-json/shallow.js' { 69 | declare module.exports: $Exports<'enzyme-to-json/shallow'>; 70 | } 71 | declare module 'enzyme-to-json/utils.js' { 72 | declare module.exports: $Exports<'enzyme-to-json/utils'>; 73 | } 74 | -------------------------------------------------------------------------------- /flow-typed/npm/enzyme_v3.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 02db3523747059d89e87d4dec6873edf 2 | // flow-typed version: 62a0c60689/enzyme_v3.x.x/flow_>=v0.53.x 3 | 4 | import * as React from 'react'; 5 | 6 | declare module 'enzyme' { 7 | declare type PredicateFunction = ( 8 | wrapper: T, 9 | index: number, 10 | ) => boolean; 11 | declare type NodeOrNodes = React.Node | Array; 12 | declare type EnzymeSelector = string | Class> | Object; 13 | 14 | // CheerioWrapper is a type alias for an actual cheerio instance 15 | // TODO: Reference correct type from cheerio's type declarations 16 | declare type CheerioWrapper = any; 17 | 18 | declare class Wrapper { 19 | find(selector: EnzymeSelector): this; 20 | findWhere(predicate: PredicateFunction): this; 21 | filter(selector: EnzymeSelector): this; 22 | filterWhere(predicate: PredicateFunction): this; 23 | hostNodes(): this; 24 | contains(nodeOrNodes: NodeOrNodes): boolean; 25 | containsMatchingElement(node: React.Node): boolean; 26 | containsAllMatchingElements(nodes: NodeOrNodes): boolean; 27 | containsAnyMatchingElements(nodes: NodeOrNodes): boolean; 28 | dive(option?: { context?: Object }): this; 29 | exists(): boolean; 30 | isEmptyRender(): boolean; 31 | matchesElement(node: React.Node): boolean; 32 | hasClass(className: string): boolean; 33 | is(selector: EnzymeSelector): boolean; 34 | isEmpty(): boolean; 35 | not(selector: EnzymeSelector): this; 36 | children(selector?: EnzymeSelector): this; 37 | childAt(index: number): this; 38 | parents(selector?: EnzymeSelector): this; 39 | parent(): this; 40 | closest(selector: EnzymeSelector): this; 41 | render(): CheerioWrapper; 42 | unmount(): this; 43 | text(): string; 44 | html(): string; 45 | get(index: number): React.Node; 46 | getNodes(): Array; 47 | getDOMNode(): HTMLElement | HTMLInputElement; 48 | at(index: number): this; 49 | first(): this; 50 | last(): this; 51 | state(key?: string): any; 52 | context(key?: string): any; 53 | props(): Object; 54 | prop(key: string): any; 55 | key(): string; 56 | simulate(event: string, ...args: Array): this; 57 | setState(state: {}, callback?: Function): this; 58 | setProps(props: {}): this; 59 | setContext(context: Object): this; 60 | instance(): React.Component<*, *>; 61 | update(): this; 62 | debug(): string; 63 | type(): string | Function | null; 64 | name(): string; 65 | forEach(fn: (node: this, index: number) => mixed): this; 66 | map(fn: (node: this, index: number) => T): Array; 67 | reduce( 68 | fn: (value: T, node: this, index: number) => T, 69 | initialValue?: T, 70 | ): Array; 71 | reduceRight( 72 | fn: (value: T, node: this, index: number) => T, 73 | initialValue?: T, 74 | ): Array; 75 | some(selector: EnzymeSelector): boolean; 76 | someWhere(predicate: PredicateFunction): boolean; 77 | every(selector: EnzymeSelector): boolean; 78 | everyWhere(predicate: PredicateFunction): boolean; 79 | length: number; 80 | } 81 | 82 | declare class ReactWrapper extends Wrapper { 83 | constructor(nodes: NodeOrNodes, root: any, options?: ?Object): ReactWrapper; 84 | mount(): this; 85 | ref(refName: string): this; 86 | detach(): void; 87 | } 88 | 89 | declare class ShallowWrapper extends Wrapper { 90 | constructor( 91 | nodes: NodeOrNodes, 92 | root: any, 93 | options?: ?Object, 94 | ): ShallowWrapper; 95 | equals(node: React.Node): boolean; 96 | shallow(options?: { context?: Object }): ShallowWrapper; 97 | } 98 | 99 | declare function shallow( 100 | node: React.Node, 101 | options?: { context?: Object, disableLifecycleMethods?: boolean }, 102 | ): ShallowWrapper; 103 | declare function mount( 104 | node: React.Node, 105 | options?: { 106 | context?: Object, 107 | attachTo?: HTMLElement, 108 | childContextTypes?: Object, 109 | }, 110 | ): ReactWrapper; 111 | declare function render( 112 | node: React.Node, 113 | options?: { context?: Object }, 114 | ): CheerioWrapper; 115 | 116 | declare module.exports: { 117 | configure(options: { 118 | Adapter?: any, 119 | disableLifecycleMethods?: boolean, 120 | }): void, 121 | render: typeof render, 122 | mount: typeof mount, 123 | shallow: typeof shallow, 124 | ShallowWrapper: typeof ShallowWrapper, 125 | ReactWrapper: typeof ReactWrapper, 126 | }; 127 | } 128 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-config-airbnb_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6777bcce35226eef6725ec4ea86778ed 2 | // flow-typed version: <>/eslint-config-airbnb_v16.1.0/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-config-airbnb' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-config-airbnb' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-config-airbnb/base' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-config-airbnb/legacy' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-config-airbnb/rules/react-a11y' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-config-airbnb/rules/react' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-config-airbnb/test/test-base' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-config-airbnb/test/test-react-order' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'eslint-config-airbnb/base.js' { 51 | declare module.exports: $Exports<'eslint-config-airbnb/base'>; 52 | } 53 | declare module 'eslint-config-airbnb/index' { 54 | declare module.exports: $Exports<'eslint-config-airbnb'>; 55 | } 56 | declare module 'eslint-config-airbnb/index.js' { 57 | declare module.exports: $Exports<'eslint-config-airbnb'>; 58 | } 59 | declare module 'eslint-config-airbnb/legacy.js' { 60 | declare module.exports: $Exports<'eslint-config-airbnb/legacy'>; 61 | } 62 | declare module 'eslint-config-airbnb/rules/react-a11y.js' { 63 | declare module.exports: $Exports<'eslint-config-airbnb/rules/react-a11y'>; 64 | } 65 | declare module 'eslint-config-airbnb/rules/react.js' { 66 | declare module.exports: $Exports<'eslint-config-airbnb/rules/react'>; 67 | } 68 | declare module 'eslint-config-airbnb/test/test-base.js' { 69 | declare module.exports: $Exports<'eslint-config-airbnb/test/test-base'>; 70 | } 71 | declare module 'eslint-config-airbnb/test/test-react-order.js' { 72 | declare module.exports: $Exports< 73 | 'eslint-config-airbnb/test/test-react-order', 74 | >; 75 | } 76 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-config-prettier_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 009cb15973b6de4533977fd2109d35c9 2 | // flow-typed version: <>/eslint-config-prettier_v2.9.0/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-config-prettier' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-config-prettier' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-config-prettier/bin/cli' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-config-prettier/bin/validators' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-config-prettier/flowtype' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-config-prettier/react' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-config-prettier/standard' { 42 | declare module.exports: any; 43 | } 44 | 45 | // Filename aliases 46 | declare module 'eslint-config-prettier/bin/cli.js' { 47 | declare module.exports: $Exports<'eslint-config-prettier/bin/cli'>; 48 | } 49 | declare module 'eslint-config-prettier/bin/validators.js' { 50 | declare module.exports: $Exports<'eslint-config-prettier/bin/validators'>; 51 | } 52 | declare module 'eslint-config-prettier/flowtype.js' { 53 | declare module.exports: $Exports<'eslint-config-prettier/flowtype'>; 54 | } 55 | declare module 'eslint-config-prettier/index' { 56 | declare module.exports: $Exports<'eslint-config-prettier'>; 57 | } 58 | declare module 'eslint-config-prettier/index.js' { 59 | declare module.exports: $Exports<'eslint-config-prettier'>; 60 | } 61 | declare module 'eslint-config-prettier/react.js' { 62 | declare module.exports: $Exports<'eslint-config-prettier/react'>; 63 | } 64 | declare module 'eslint-config-prettier/standard.js' { 65 | declare module.exports: $Exports<'eslint-config-prettier/standard'>; 66 | } 67 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-flowtype_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 9de11e2dc1fc9a676649af5820adeb78 2 | // flow-typed version: <>/eslint-plugin-flowtype_v2.42.0/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-flowtype' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-flowtype' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-flowtype/bin/readmeAssertions' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-plugin-flowtype/dist/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-plugin-flowtype/dist/rules/booleanStyle' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-plugin-flowtype/dist/rules/defineFlowType' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-plugin-flowtype/dist/rules/delimiterDangle' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-plugin-flowtype/dist/rules/genericSpacing' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'eslint-plugin-flowtype/dist/rules/noDupeKeys' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'eslint-plugin-flowtype/dist/rules/noFlowFixMeComments' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'eslint-plugin-flowtype/dist/rules/noMutableArray' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'eslint-plugin-flowtype/dist/rules/noPrimitiveConstructorTypes' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'eslint-plugin-flowtype/dist/rules/noTypesMissingFileAnnotation' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'eslint-plugin-flowtype/dist/rules/noUnusedExpressions' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'eslint-plugin-flowtype/dist/rules/noWeakTypes' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'eslint-plugin-flowtype/dist/rules/objectTypeDelimiter' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'eslint-plugin-flowtype/dist/rules/requireExactType' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'eslint-plugin-flowtype/dist/rules/requireParameterType' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'eslint-plugin-flowtype/dist/rules/requireReturnType' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'eslint-plugin-flowtype/dist/rules/requireValidFileAnnotation' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'eslint-plugin-flowtype/dist/rules/requireVariableType' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'eslint-plugin-flowtype/dist/rules/semi' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'eslint-plugin-flowtype/dist/rules/sortKeys' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'eslint-plugin-flowtype/dist/rules/spaceAfterTypeColon' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'eslint-plugin-flowtype/dist/rules/spaceBeforeGenericBracket' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'eslint-plugin-flowtype/dist/rules/spaceBeforeTypeColon' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateFunctions' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateObjectTypeIndexer' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateObjectTypeProperty' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateReturnType' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateTypeCastExpression' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateTypical' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/index' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/reporter' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'eslint-plugin-flowtype/dist/rules/typeIdMatch' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'eslint-plugin-flowtype/dist/rules/unionIntersectionSpacing' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module 'eslint-plugin-flowtype/dist/rules/useFlowType' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module 'eslint-plugin-flowtype/dist/rules/validSyntax' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module 'eslint-plugin-flowtype/dist/utilities/checkFlowFileAnnotation' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module 'eslint-plugin-flowtype/dist/utilities/fuzzyStringMatch' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module 'eslint-plugin-flowtype/dist/utilities/getParameterName' { 178 | declare module.exports: any; 179 | } 180 | 181 | declare module 'eslint-plugin-flowtype/dist/utilities/getTokenAfterParens' { 182 | declare module.exports: any; 183 | } 184 | 185 | declare module 'eslint-plugin-flowtype/dist/utilities/getTokenBeforeParens' { 186 | declare module.exports: any; 187 | } 188 | 189 | declare module 'eslint-plugin-flowtype/dist/utilities/index' { 190 | declare module.exports: any; 191 | } 192 | 193 | declare module 'eslint-plugin-flowtype/dist/utilities/isFlowFile' { 194 | declare module.exports: any; 195 | } 196 | 197 | declare module 'eslint-plugin-flowtype/dist/utilities/isFlowFileAnnotation' { 198 | declare module.exports: any; 199 | } 200 | 201 | declare module 'eslint-plugin-flowtype/dist/utilities/iterateFunctionNodes' { 202 | declare module.exports: any; 203 | } 204 | 205 | declare module 'eslint-plugin-flowtype/dist/utilities/quoteName' { 206 | declare module.exports: any; 207 | } 208 | 209 | declare module 'eslint-plugin-flowtype/dist/utilities/spacingFixers' { 210 | declare module.exports: any; 211 | } 212 | 213 | // Filename aliases 214 | declare module 'eslint-plugin-flowtype/bin/readmeAssertions.js' { 215 | declare module.exports: $Exports< 216 | 'eslint-plugin-flowtype/bin/readmeAssertions', 217 | >; 218 | } 219 | declare module 'eslint-plugin-flowtype/dist/index.js' { 220 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/index'>; 221 | } 222 | declare module 'eslint-plugin-flowtype/dist/rules/booleanStyle.js' { 223 | declare module.exports: $Exports< 224 | 'eslint-plugin-flowtype/dist/rules/booleanStyle', 225 | >; 226 | } 227 | declare module 'eslint-plugin-flowtype/dist/rules/defineFlowType.js' { 228 | declare module.exports: $Exports< 229 | 'eslint-plugin-flowtype/dist/rules/defineFlowType', 230 | >; 231 | } 232 | declare module 'eslint-plugin-flowtype/dist/rules/delimiterDangle.js' { 233 | declare module.exports: $Exports< 234 | 'eslint-plugin-flowtype/dist/rules/delimiterDangle', 235 | >; 236 | } 237 | declare module 'eslint-plugin-flowtype/dist/rules/genericSpacing.js' { 238 | declare module.exports: $Exports< 239 | 'eslint-plugin-flowtype/dist/rules/genericSpacing', 240 | >; 241 | } 242 | declare module 'eslint-plugin-flowtype/dist/rules/noDupeKeys.js' { 243 | declare module.exports: $Exports< 244 | 'eslint-plugin-flowtype/dist/rules/noDupeKeys', 245 | >; 246 | } 247 | declare module 'eslint-plugin-flowtype/dist/rules/noFlowFixMeComments.js' { 248 | declare module.exports: $Exports< 249 | 'eslint-plugin-flowtype/dist/rules/noFlowFixMeComments', 250 | >; 251 | } 252 | declare module 'eslint-plugin-flowtype/dist/rules/noMutableArray.js' { 253 | declare module.exports: $Exports< 254 | 'eslint-plugin-flowtype/dist/rules/noMutableArray', 255 | >; 256 | } 257 | declare module 'eslint-plugin-flowtype/dist/rules/noPrimitiveConstructorTypes.js' { 258 | declare module.exports: $Exports< 259 | 'eslint-plugin-flowtype/dist/rules/noPrimitiveConstructorTypes', 260 | >; 261 | } 262 | declare module 'eslint-plugin-flowtype/dist/rules/noTypesMissingFileAnnotation.js' { 263 | declare module.exports: $Exports< 264 | 'eslint-plugin-flowtype/dist/rules/noTypesMissingFileAnnotation', 265 | >; 266 | } 267 | declare module 'eslint-plugin-flowtype/dist/rules/noUnusedExpressions.js' { 268 | declare module.exports: $Exports< 269 | 'eslint-plugin-flowtype/dist/rules/noUnusedExpressions', 270 | >; 271 | } 272 | declare module 'eslint-plugin-flowtype/dist/rules/noWeakTypes.js' { 273 | declare module.exports: $Exports< 274 | 'eslint-plugin-flowtype/dist/rules/noWeakTypes', 275 | >; 276 | } 277 | declare module 'eslint-plugin-flowtype/dist/rules/objectTypeDelimiter.js' { 278 | declare module.exports: $Exports< 279 | 'eslint-plugin-flowtype/dist/rules/objectTypeDelimiter', 280 | >; 281 | } 282 | declare module 'eslint-plugin-flowtype/dist/rules/requireExactType.js' { 283 | declare module.exports: $Exports< 284 | 'eslint-plugin-flowtype/dist/rules/requireExactType', 285 | >; 286 | } 287 | declare module 'eslint-plugin-flowtype/dist/rules/requireParameterType.js' { 288 | declare module.exports: $Exports< 289 | 'eslint-plugin-flowtype/dist/rules/requireParameterType', 290 | >; 291 | } 292 | declare module 'eslint-plugin-flowtype/dist/rules/requireReturnType.js' { 293 | declare module.exports: $Exports< 294 | 'eslint-plugin-flowtype/dist/rules/requireReturnType', 295 | >; 296 | } 297 | declare module 'eslint-plugin-flowtype/dist/rules/requireValidFileAnnotation.js' { 298 | declare module.exports: $Exports< 299 | 'eslint-plugin-flowtype/dist/rules/requireValidFileAnnotation', 300 | >; 301 | } 302 | declare module 'eslint-plugin-flowtype/dist/rules/requireVariableType.js' { 303 | declare module.exports: $Exports< 304 | 'eslint-plugin-flowtype/dist/rules/requireVariableType', 305 | >; 306 | } 307 | declare module 'eslint-plugin-flowtype/dist/rules/semi.js' { 308 | declare module.exports: $Exports<'eslint-plugin-flowtype/dist/rules/semi'>; 309 | } 310 | declare module 'eslint-plugin-flowtype/dist/rules/sortKeys.js' { 311 | declare module.exports: $Exports< 312 | 'eslint-plugin-flowtype/dist/rules/sortKeys', 313 | >; 314 | } 315 | declare module 'eslint-plugin-flowtype/dist/rules/spaceAfterTypeColon.js' { 316 | declare module.exports: $Exports< 317 | 'eslint-plugin-flowtype/dist/rules/spaceAfterTypeColon', 318 | >; 319 | } 320 | declare module 'eslint-plugin-flowtype/dist/rules/spaceBeforeGenericBracket.js' { 321 | declare module.exports: $Exports< 322 | 'eslint-plugin-flowtype/dist/rules/spaceBeforeGenericBracket', 323 | >; 324 | } 325 | declare module 'eslint-plugin-flowtype/dist/rules/spaceBeforeTypeColon.js' { 326 | declare module.exports: $Exports< 327 | 'eslint-plugin-flowtype/dist/rules/spaceBeforeTypeColon', 328 | >; 329 | } 330 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateFunctions.js' { 331 | declare module.exports: $Exports< 332 | 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateFunctions', 333 | >; 334 | } 335 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateObjectTypeIndexer.js' { 336 | declare module.exports: $Exports< 337 | 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateObjectTypeIndexer', 338 | >; 339 | } 340 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateObjectTypeProperty.js' { 341 | declare module.exports: $Exports< 342 | 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateObjectTypeProperty', 343 | >; 344 | } 345 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateReturnType.js' { 346 | declare module.exports: $Exports< 347 | 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateReturnType', 348 | >; 349 | } 350 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateTypeCastExpression.js' { 351 | declare module.exports: $Exports< 352 | 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateTypeCastExpression', 353 | >; 354 | } 355 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateTypical.js' { 356 | declare module.exports: $Exports< 357 | 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/evaluateTypical', 358 | >; 359 | } 360 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/index.js' { 361 | declare module.exports: $Exports< 362 | 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/index', 363 | >; 364 | } 365 | declare module 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/reporter.js' { 366 | declare module.exports: $Exports< 367 | 'eslint-plugin-flowtype/dist/rules/typeColonSpacing/reporter', 368 | >; 369 | } 370 | declare module 'eslint-plugin-flowtype/dist/rules/typeIdMatch.js' { 371 | declare module.exports: $Exports< 372 | 'eslint-plugin-flowtype/dist/rules/typeIdMatch', 373 | >; 374 | } 375 | declare module 'eslint-plugin-flowtype/dist/rules/unionIntersectionSpacing.js' { 376 | declare module.exports: $Exports< 377 | 'eslint-plugin-flowtype/dist/rules/unionIntersectionSpacing', 378 | >; 379 | } 380 | declare module 'eslint-plugin-flowtype/dist/rules/useFlowType.js' { 381 | declare module.exports: $Exports< 382 | 'eslint-plugin-flowtype/dist/rules/useFlowType', 383 | >; 384 | } 385 | declare module 'eslint-plugin-flowtype/dist/rules/validSyntax.js' { 386 | declare module.exports: $Exports< 387 | 'eslint-plugin-flowtype/dist/rules/validSyntax', 388 | >; 389 | } 390 | declare module 'eslint-plugin-flowtype/dist/utilities/checkFlowFileAnnotation.js' { 391 | declare module.exports: $Exports< 392 | 'eslint-plugin-flowtype/dist/utilities/checkFlowFileAnnotation', 393 | >; 394 | } 395 | declare module 'eslint-plugin-flowtype/dist/utilities/fuzzyStringMatch.js' { 396 | declare module.exports: $Exports< 397 | 'eslint-plugin-flowtype/dist/utilities/fuzzyStringMatch', 398 | >; 399 | } 400 | declare module 'eslint-plugin-flowtype/dist/utilities/getParameterName.js' { 401 | declare module.exports: $Exports< 402 | 'eslint-plugin-flowtype/dist/utilities/getParameterName', 403 | >; 404 | } 405 | declare module 'eslint-plugin-flowtype/dist/utilities/getTokenAfterParens.js' { 406 | declare module.exports: $Exports< 407 | 'eslint-plugin-flowtype/dist/utilities/getTokenAfterParens', 408 | >; 409 | } 410 | declare module 'eslint-plugin-flowtype/dist/utilities/getTokenBeforeParens.js' { 411 | declare module.exports: $Exports< 412 | 'eslint-plugin-flowtype/dist/utilities/getTokenBeforeParens', 413 | >; 414 | } 415 | declare module 'eslint-plugin-flowtype/dist/utilities/index.js' { 416 | declare module.exports: $Exports< 417 | 'eslint-plugin-flowtype/dist/utilities/index', 418 | >; 419 | } 420 | declare module 'eslint-plugin-flowtype/dist/utilities/isFlowFile.js' { 421 | declare module.exports: $Exports< 422 | 'eslint-plugin-flowtype/dist/utilities/isFlowFile', 423 | >; 424 | } 425 | declare module 'eslint-plugin-flowtype/dist/utilities/isFlowFileAnnotation.js' { 426 | declare module.exports: $Exports< 427 | 'eslint-plugin-flowtype/dist/utilities/isFlowFileAnnotation', 428 | >; 429 | } 430 | declare module 'eslint-plugin-flowtype/dist/utilities/iterateFunctionNodes.js' { 431 | declare module.exports: $Exports< 432 | 'eslint-plugin-flowtype/dist/utilities/iterateFunctionNodes', 433 | >; 434 | } 435 | declare module 'eslint-plugin-flowtype/dist/utilities/quoteName.js' { 436 | declare module.exports: $Exports< 437 | 'eslint-plugin-flowtype/dist/utilities/quoteName', 438 | >; 439 | } 440 | declare module 'eslint-plugin-flowtype/dist/utilities/spacingFixers.js' { 441 | declare module.exports: $Exports< 442 | 'eslint-plugin-flowtype/dist/utilities/spacingFixers', 443 | >; 444 | } 445 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-import_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 15f83cdea44a87e6231f3668ab4cbc4d 2 | // flow-typed version: <>/eslint-plugin-import_v2.8.0/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-import' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-import' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-import/config/electron' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-plugin-import/config/errors' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-plugin-import/config/react-native' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-plugin-import/config/react' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-plugin-import/config/recommended' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-plugin-import/config/stage-0' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'eslint-plugin-import/config/warnings' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'eslint-plugin-import/lib/core/importType' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'eslint-plugin-import/lib/core/staticRequire' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'eslint-plugin-import/lib/ExportMap' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'eslint-plugin-import/lib/importDeclaration' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'eslint-plugin-import/lib/index' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'eslint-plugin-import/lib/rules/default' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'eslint-plugin-import/lib/rules/export' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'eslint-plugin-import/lib/rules/exports-last' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'eslint-plugin-import/lib/rules/extensions' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'eslint-plugin-import/lib/rules/first' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'eslint-plugin-import/lib/rules/imports-first' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'eslint-plugin-import/lib/rules/max-dependencies' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'eslint-plugin-import/lib/rules/named' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'eslint-plugin-import/lib/rules/namespace' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'eslint-plugin-import/lib/rules/newline-after-import' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'eslint-plugin-import/lib/rules/no-absolute-path' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'eslint-plugin-import/lib/rules/no-amd' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'eslint-plugin-import/lib/rules/no-anonymous-default-export' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'eslint-plugin-import/lib/rules/no-commonjs' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'eslint-plugin-import/lib/rules/no-deprecated' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'eslint-plugin-import/lib/rules/no-duplicates' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'eslint-plugin-import/lib/rules/no-dynamic-require' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'eslint-plugin-import/lib/rules/no-extraneous-dependencies' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'eslint-plugin-import/lib/rules/no-internal-modules' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'eslint-plugin-import/lib/rules/no-mutable-exports' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'eslint-plugin-import/lib/rules/no-named-as-default-member' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'eslint-plugin-import/lib/rules/no-named-as-default' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module 'eslint-plugin-import/lib/rules/no-named-default' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module 'eslint-plugin-import/lib/rules/no-namespace' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module 'eslint-plugin-import/lib/rules/no-nodejs-modules' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module 'eslint-plugin-import/lib/rules/no-restricted-paths' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module 'eslint-plugin-import/lib/rules/no-unassigned-import' { 178 | declare module.exports: any; 179 | } 180 | 181 | declare module 'eslint-plugin-import/lib/rules/no-unresolved' { 182 | declare module.exports: any; 183 | } 184 | 185 | declare module 'eslint-plugin-import/lib/rules/no-webpack-loader-syntax' { 186 | declare module.exports: any; 187 | } 188 | 189 | declare module 'eslint-plugin-import/lib/rules/order' { 190 | declare module.exports: any; 191 | } 192 | 193 | declare module 'eslint-plugin-import/lib/rules/prefer-default-export' { 194 | declare module.exports: any; 195 | } 196 | 197 | declare module 'eslint-plugin-import/lib/rules/unambiguous' { 198 | declare module.exports: any; 199 | } 200 | 201 | declare module 'eslint-plugin-import/memo-parser/index' { 202 | declare module.exports: any; 203 | } 204 | 205 | // Filename aliases 206 | declare module 'eslint-plugin-import/config/electron.js' { 207 | declare module.exports: $Exports<'eslint-plugin-import/config/electron'>; 208 | } 209 | declare module 'eslint-plugin-import/config/errors.js' { 210 | declare module.exports: $Exports<'eslint-plugin-import/config/errors'>; 211 | } 212 | declare module 'eslint-plugin-import/config/react-native.js' { 213 | declare module.exports: $Exports<'eslint-plugin-import/config/react-native'>; 214 | } 215 | declare module 'eslint-plugin-import/config/react.js' { 216 | declare module.exports: $Exports<'eslint-plugin-import/config/react'>; 217 | } 218 | declare module 'eslint-plugin-import/config/recommended.js' { 219 | declare module.exports: $Exports<'eslint-plugin-import/config/recommended'>; 220 | } 221 | declare module 'eslint-plugin-import/config/stage-0.js' { 222 | declare module.exports: $Exports<'eslint-plugin-import/config/stage-0'>; 223 | } 224 | declare module 'eslint-plugin-import/config/warnings.js' { 225 | declare module.exports: $Exports<'eslint-plugin-import/config/warnings'>; 226 | } 227 | declare module 'eslint-plugin-import/lib/core/importType.js' { 228 | declare module.exports: $Exports<'eslint-plugin-import/lib/core/importType'>; 229 | } 230 | declare module 'eslint-plugin-import/lib/core/staticRequire.js' { 231 | declare module.exports: $Exports< 232 | 'eslint-plugin-import/lib/core/staticRequire', 233 | >; 234 | } 235 | declare module 'eslint-plugin-import/lib/ExportMap.js' { 236 | declare module.exports: $Exports<'eslint-plugin-import/lib/ExportMap'>; 237 | } 238 | declare module 'eslint-plugin-import/lib/importDeclaration.js' { 239 | declare module.exports: $Exports< 240 | 'eslint-plugin-import/lib/importDeclaration', 241 | >; 242 | } 243 | declare module 'eslint-plugin-import/lib/index.js' { 244 | declare module.exports: $Exports<'eslint-plugin-import/lib/index'>; 245 | } 246 | declare module 'eslint-plugin-import/lib/rules/default.js' { 247 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/default'>; 248 | } 249 | declare module 'eslint-plugin-import/lib/rules/export.js' { 250 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/export'>; 251 | } 252 | declare module 'eslint-plugin-import/lib/rules/exports-last.js' { 253 | declare module.exports: $Exports< 254 | 'eslint-plugin-import/lib/rules/exports-last', 255 | >; 256 | } 257 | declare module 'eslint-plugin-import/lib/rules/extensions.js' { 258 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/extensions'>; 259 | } 260 | declare module 'eslint-plugin-import/lib/rules/first.js' { 261 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/first'>; 262 | } 263 | declare module 'eslint-plugin-import/lib/rules/imports-first.js' { 264 | declare module.exports: $Exports< 265 | 'eslint-plugin-import/lib/rules/imports-first', 266 | >; 267 | } 268 | declare module 'eslint-plugin-import/lib/rules/max-dependencies.js' { 269 | declare module.exports: $Exports< 270 | 'eslint-plugin-import/lib/rules/max-dependencies', 271 | >; 272 | } 273 | declare module 'eslint-plugin-import/lib/rules/named.js' { 274 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/named'>; 275 | } 276 | declare module 'eslint-plugin-import/lib/rules/namespace.js' { 277 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/namespace'>; 278 | } 279 | declare module 'eslint-plugin-import/lib/rules/newline-after-import.js' { 280 | declare module.exports: $Exports< 281 | 'eslint-plugin-import/lib/rules/newline-after-import', 282 | >; 283 | } 284 | declare module 'eslint-plugin-import/lib/rules/no-absolute-path.js' { 285 | declare module.exports: $Exports< 286 | 'eslint-plugin-import/lib/rules/no-absolute-path', 287 | >; 288 | } 289 | declare module 'eslint-plugin-import/lib/rules/no-amd.js' { 290 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-amd'>; 291 | } 292 | declare module 'eslint-plugin-import/lib/rules/no-anonymous-default-export.js' { 293 | declare module.exports: $Exports< 294 | 'eslint-plugin-import/lib/rules/no-anonymous-default-export', 295 | >; 296 | } 297 | declare module 'eslint-plugin-import/lib/rules/no-commonjs.js' { 298 | declare module.exports: $Exports< 299 | 'eslint-plugin-import/lib/rules/no-commonjs', 300 | >; 301 | } 302 | declare module 'eslint-plugin-import/lib/rules/no-deprecated.js' { 303 | declare module.exports: $Exports< 304 | 'eslint-plugin-import/lib/rules/no-deprecated', 305 | >; 306 | } 307 | declare module 'eslint-plugin-import/lib/rules/no-duplicates.js' { 308 | declare module.exports: $Exports< 309 | 'eslint-plugin-import/lib/rules/no-duplicates', 310 | >; 311 | } 312 | declare module 'eslint-plugin-import/lib/rules/no-dynamic-require.js' { 313 | declare module.exports: $Exports< 314 | 'eslint-plugin-import/lib/rules/no-dynamic-require', 315 | >; 316 | } 317 | declare module 'eslint-plugin-import/lib/rules/no-extraneous-dependencies.js' { 318 | declare module.exports: $Exports< 319 | 'eslint-plugin-import/lib/rules/no-extraneous-dependencies', 320 | >; 321 | } 322 | declare module 'eslint-plugin-import/lib/rules/no-internal-modules.js' { 323 | declare module.exports: $Exports< 324 | 'eslint-plugin-import/lib/rules/no-internal-modules', 325 | >; 326 | } 327 | declare module 'eslint-plugin-import/lib/rules/no-mutable-exports.js' { 328 | declare module.exports: $Exports< 329 | 'eslint-plugin-import/lib/rules/no-mutable-exports', 330 | >; 331 | } 332 | declare module 'eslint-plugin-import/lib/rules/no-named-as-default-member.js' { 333 | declare module.exports: $Exports< 334 | 'eslint-plugin-import/lib/rules/no-named-as-default-member', 335 | >; 336 | } 337 | declare module 'eslint-plugin-import/lib/rules/no-named-as-default.js' { 338 | declare module.exports: $Exports< 339 | 'eslint-plugin-import/lib/rules/no-named-as-default', 340 | >; 341 | } 342 | declare module 'eslint-plugin-import/lib/rules/no-named-default.js' { 343 | declare module.exports: $Exports< 344 | 'eslint-plugin-import/lib/rules/no-named-default', 345 | >; 346 | } 347 | declare module 'eslint-plugin-import/lib/rules/no-namespace.js' { 348 | declare module.exports: $Exports< 349 | 'eslint-plugin-import/lib/rules/no-namespace', 350 | >; 351 | } 352 | declare module 'eslint-plugin-import/lib/rules/no-nodejs-modules.js' { 353 | declare module.exports: $Exports< 354 | 'eslint-plugin-import/lib/rules/no-nodejs-modules', 355 | >; 356 | } 357 | declare module 'eslint-plugin-import/lib/rules/no-restricted-paths.js' { 358 | declare module.exports: $Exports< 359 | 'eslint-plugin-import/lib/rules/no-restricted-paths', 360 | >; 361 | } 362 | declare module 'eslint-plugin-import/lib/rules/no-unassigned-import.js' { 363 | declare module.exports: $Exports< 364 | 'eslint-plugin-import/lib/rules/no-unassigned-import', 365 | >; 366 | } 367 | declare module 'eslint-plugin-import/lib/rules/no-unresolved.js' { 368 | declare module.exports: $Exports< 369 | 'eslint-plugin-import/lib/rules/no-unresolved', 370 | >; 371 | } 372 | declare module 'eslint-plugin-import/lib/rules/no-webpack-loader-syntax.js' { 373 | declare module.exports: $Exports< 374 | 'eslint-plugin-import/lib/rules/no-webpack-loader-syntax', 375 | >; 376 | } 377 | declare module 'eslint-plugin-import/lib/rules/order.js' { 378 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/order'>; 379 | } 380 | declare module 'eslint-plugin-import/lib/rules/prefer-default-export.js' { 381 | declare module.exports: $Exports< 382 | 'eslint-plugin-import/lib/rules/prefer-default-export', 383 | >; 384 | } 385 | declare module 'eslint-plugin-import/lib/rules/unambiguous.js' { 386 | declare module.exports: $Exports< 387 | 'eslint-plugin-import/lib/rules/unambiguous', 388 | >; 389 | } 390 | declare module 'eslint-plugin-import/memo-parser/index.js' { 391 | declare module.exports: $Exports<'eslint-plugin-import/memo-parser/index'>; 392 | } 393 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-jest_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: a27a952b68f1ef3b49d523a3c565542a 2 | // flow-typed version: <>/eslint-plugin-jest_v21.7.0/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-jest' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-jest' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-jest/processors/__tests__/snapshot-processor.test' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-plugin-jest/processors/snapshot-processor' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-plugin-jest/rules/__tests__/no_focused_tests.test' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-plugin-jest/rules/__tests__/no_identical_title.test' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-plugin-jest/rules/__tests__/no_large_snapshots.test' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-plugin-jest/rules/__tests__/no_skipped_tests.test' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'eslint-plugin-jest/rules/__tests__/prefer_expect_assertions.test' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'eslint-plugin-jest/rules/__tests__/prefer_to_be_null.test' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'eslint-plugin-jest/rules/__tests__/prefer_to_be_undefined.test' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'eslint-plugin-jest/rules/__tests__/prefer_to_have_length.test' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'eslint-plugin-jest/rules/__tests__/valid_expect_in_promise.test' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'eslint-plugin-jest/rules/__tests__/valid_expect.test' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'eslint-plugin-jest/rules/no_disabled_tests' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'eslint-plugin-jest/rules/no_focused_tests' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'eslint-plugin-jest/rules/no_identical_title' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'eslint-plugin-jest/rules/no_large_snapshots' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'eslint-plugin-jest/rules/prefer_expect_assertions' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'eslint-plugin-jest/rules/prefer_to_be_null' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'eslint-plugin-jest/rules/prefer_to_be_undefined' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'eslint-plugin-jest/rules/prefer_to_have_length' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'eslint-plugin-jest/rules/util' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'eslint-plugin-jest/rules/valid_expect_in_promise' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'eslint-plugin-jest/rules/valid_expect' { 114 | declare module.exports: any; 115 | } 116 | 117 | // Filename aliases 118 | declare module 'eslint-plugin-jest/index' { 119 | declare module.exports: $Exports<'eslint-plugin-jest'>; 120 | } 121 | declare module 'eslint-plugin-jest/index.js' { 122 | declare module.exports: $Exports<'eslint-plugin-jest'>; 123 | } 124 | declare module 'eslint-plugin-jest/processors/__tests__/snapshot-processor.test.js' { 125 | declare module.exports: $Exports< 126 | 'eslint-plugin-jest/processors/__tests__/snapshot-processor.test', 127 | >; 128 | } 129 | declare module 'eslint-plugin-jest/processors/snapshot-processor.js' { 130 | declare module.exports: $Exports< 131 | 'eslint-plugin-jest/processors/snapshot-processor', 132 | >; 133 | } 134 | declare module 'eslint-plugin-jest/rules/__tests__/no_focused_tests.test.js' { 135 | declare module.exports: $Exports< 136 | 'eslint-plugin-jest/rules/__tests__/no_focused_tests.test', 137 | >; 138 | } 139 | declare module 'eslint-plugin-jest/rules/__tests__/no_identical_title.test.js' { 140 | declare module.exports: $Exports< 141 | 'eslint-plugin-jest/rules/__tests__/no_identical_title.test', 142 | >; 143 | } 144 | declare module 'eslint-plugin-jest/rules/__tests__/no_large_snapshots.test.js' { 145 | declare module.exports: $Exports< 146 | 'eslint-plugin-jest/rules/__tests__/no_large_snapshots.test', 147 | >; 148 | } 149 | declare module 'eslint-plugin-jest/rules/__tests__/no_skipped_tests.test.js' { 150 | declare module.exports: $Exports< 151 | 'eslint-plugin-jest/rules/__tests__/no_skipped_tests.test', 152 | >; 153 | } 154 | declare module 'eslint-plugin-jest/rules/__tests__/prefer_expect_assertions.test.js' { 155 | declare module.exports: $Exports< 156 | 'eslint-plugin-jest/rules/__tests__/prefer_expect_assertions.test', 157 | >; 158 | } 159 | declare module 'eslint-plugin-jest/rules/__tests__/prefer_to_be_null.test.js' { 160 | declare module.exports: $Exports< 161 | 'eslint-plugin-jest/rules/__tests__/prefer_to_be_null.test', 162 | >; 163 | } 164 | declare module 'eslint-plugin-jest/rules/__tests__/prefer_to_be_undefined.test.js' { 165 | declare module.exports: $Exports< 166 | 'eslint-plugin-jest/rules/__tests__/prefer_to_be_undefined.test', 167 | >; 168 | } 169 | declare module 'eslint-plugin-jest/rules/__tests__/prefer_to_have_length.test.js' { 170 | declare module.exports: $Exports< 171 | 'eslint-plugin-jest/rules/__tests__/prefer_to_have_length.test', 172 | >; 173 | } 174 | declare module 'eslint-plugin-jest/rules/__tests__/valid_expect_in_promise.test.js' { 175 | declare module.exports: $Exports< 176 | 'eslint-plugin-jest/rules/__tests__/valid_expect_in_promise.test', 177 | >; 178 | } 179 | declare module 'eslint-plugin-jest/rules/__tests__/valid_expect.test.js' { 180 | declare module.exports: $Exports< 181 | 'eslint-plugin-jest/rules/__tests__/valid_expect.test', 182 | >; 183 | } 184 | declare module 'eslint-plugin-jest/rules/no_disabled_tests.js' { 185 | declare module.exports: $Exports< 186 | 'eslint-plugin-jest/rules/no_disabled_tests', 187 | >; 188 | } 189 | declare module 'eslint-plugin-jest/rules/no_focused_tests.js' { 190 | declare module.exports: $Exports<'eslint-plugin-jest/rules/no_focused_tests'>; 191 | } 192 | declare module 'eslint-plugin-jest/rules/no_identical_title.js' { 193 | declare module.exports: $Exports< 194 | 'eslint-plugin-jest/rules/no_identical_title', 195 | >; 196 | } 197 | declare module 'eslint-plugin-jest/rules/no_large_snapshots.js' { 198 | declare module.exports: $Exports< 199 | 'eslint-plugin-jest/rules/no_large_snapshots', 200 | >; 201 | } 202 | declare module 'eslint-plugin-jest/rules/prefer_expect_assertions.js' { 203 | declare module.exports: $Exports< 204 | 'eslint-plugin-jest/rules/prefer_expect_assertions', 205 | >; 206 | } 207 | declare module 'eslint-plugin-jest/rules/prefer_to_be_null.js' { 208 | declare module.exports: $Exports< 209 | 'eslint-plugin-jest/rules/prefer_to_be_null', 210 | >; 211 | } 212 | declare module 'eslint-plugin-jest/rules/prefer_to_be_undefined.js' { 213 | declare module.exports: $Exports< 214 | 'eslint-plugin-jest/rules/prefer_to_be_undefined', 215 | >; 216 | } 217 | declare module 'eslint-plugin-jest/rules/prefer_to_have_length.js' { 218 | declare module.exports: $Exports< 219 | 'eslint-plugin-jest/rules/prefer_to_have_length', 220 | >; 221 | } 222 | declare module 'eslint-plugin-jest/rules/util.js' { 223 | declare module.exports: $Exports<'eslint-plugin-jest/rules/util'>; 224 | } 225 | declare module 'eslint-plugin-jest/rules/valid_expect_in_promise.js' { 226 | declare module.exports: $Exports< 227 | 'eslint-plugin-jest/rules/valid_expect_in_promise', 228 | >; 229 | } 230 | declare module 'eslint-plugin-jest/rules/valid_expect.js' { 231 | declare module.exports: $Exports<'eslint-plugin-jest/rules/valid_expect'>; 232 | } 233 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-prettier_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 75214ade55a2b8470ae7c15e7ea05c01 2 | // flow-typed version: <>/eslint-plugin-prettier_v2.5.0/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-prettier' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-prettier' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-prettier/eslint-plugin-prettier' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'eslint-plugin-prettier/eslint-plugin-prettier.js' { 31 | declare module.exports: $Exports< 32 | 'eslint-plugin-prettier/eslint-plugin-prettier', 33 | >; 34 | } 35 | -------------------------------------------------------------------------------- /flow-typed/npm/flow-bin_v0.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6a5610678d4b01e13bbfbbc62bdaf583 2 | // flow-typed version: 3817bc6980/flow-bin_v0.x.x/flow_>=v0.25.x 3 | 4 | declare module 'flow-bin' { 5 | declare module.exports: string; 6 | } 7 | -------------------------------------------------------------------------------- /flow-typed/npm/github-changes_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6c072e045f443fbfb99ea7bf3d5d8b5f 2 | // flow-typed version: <>/github-changes_v1.1.2/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'github-changes' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'github-changes' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'github-changes/bin/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'github-changes/bin/index.js' { 31 | declare module.exports: $Exports<'github-changes/bin/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/husky_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 4c16febf26ac80f486a3228942d731ec 2 | // flow-typed version: <>/husky_v0.14.3/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'husky' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'husky' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'husky/__tests__/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'husky/bin/install' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'husky/bin/uninstall' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'husky/src/install' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'husky/src/uninstall' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'husky/src/utils/find-hooks-dir' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'husky/src/utils/find-parent' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'husky/src/utils/get-hook-script' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'husky/src/utils/is-husky' { 58 | declare module.exports: any; 59 | } 60 | 61 | // Filename aliases 62 | declare module 'husky/__tests__/index.js' { 63 | declare module.exports: $Exports<'husky/__tests__/index'>; 64 | } 65 | declare module 'husky/bin/install.js' { 66 | declare module.exports: $Exports<'husky/bin/install'>; 67 | } 68 | declare module 'husky/bin/uninstall.js' { 69 | declare module.exports: $Exports<'husky/bin/uninstall'>; 70 | } 71 | declare module 'husky/src/install.js' { 72 | declare module.exports: $Exports<'husky/src/install'>; 73 | } 74 | declare module 'husky/src/uninstall.js' { 75 | declare module.exports: $Exports<'husky/src/uninstall'>; 76 | } 77 | declare module 'husky/src/utils/find-hooks-dir.js' { 78 | declare module.exports: $Exports<'husky/src/utils/find-hooks-dir'>; 79 | } 80 | declare module 'husky/src/utils/find-parent.js' { 81 | declare module.exports: $Exports<'husky/src/utils/find-parent'>; 82 | } 83 | declare module 'husky/src/utils/get-hook-script.js' { 84 | declare module.exports: $Exports<'husky/src/utils/get-hook-script'>; 85 | } 86 | declare module 'husky/src/utils/is-husky.js' { 87 | declare module.exports: $Exports<'husky/src/utils/is-husky'>; 88 | } 89 | -------------------------------------------------------------------------------- /flow-typed/npm/jest-styled-components_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 1c27e5abfdd6d674a147571608e2073a 2 | // flow-typed version: <>/jest-styled-components_vnext/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'jest-styled-components' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'jest-styled-components' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'jest-styled-components/native/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'jest-styled-components/src/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'jest-styled-components/src/native/toHaveStyleRule' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'jest-styled-components/src/styleSheetSerializer' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'jest-styled-components/src/toHaveStyleRule' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'jest-styled-components/src/utils' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'jest-styled-components/native/index.js' { 51 | declare module.exports: $Exports<'jest-styled-components/native/index'>; 52 | } 53 | declare module 'jest-styled-components/src/index.js' { 54 | declare module.exports: $Exports<'jest-styled-components/src/index'>; 55 | } 56 | declare module 'jest-styled-components/src/native/toHaveStyleRule.js' { 57 | declare module.exports: $Exports< 58 | 'jest-styled-components/src/native/toHaveStyleRule', 59 | >; 60 | } 61 | declare module 'jest-styled-components/src/styleSheetSerializer.js' { 62 | declare module.exports: $Exports< 63 | 'jest-styled-components/src/styleSheetSerializer', 64 | >; 65 | } 66 | declare module 'jest-styled-components/src/toHaveStyleRule.js' { 67 | declare module.exports: $Exports< 68 | 'jest-styled-components/src/toHaveStyleRule', 69 | >; 70 | } 71 | declare module 'jest-styled-components/src/utils.js' { 72 | declare module.exports: $Exports<'jest-styled-components/src/utils'>; 73 | } 74 | -------------------------------------------------------------------------------- /flow-typed/npm/jest_v22.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6e1fc0a644aa956f79029fec0709e597 2 | // flow-typed version: 07ebad4796/jest_v22.x.x/flow_>=v0.39.x 3 | 4 | type JestMockFn, TReturn> = { 5 | (...args: TArguments): TReturn, 6 | /** 7 | * An object for introspecting mock calls 8 | */ 9 | mock: { 10 | /** 11 | * An array that represents all calls that have been made into this mock 12 | * function. Each call is represented by an array of arguments that were 13 | * passed during the call. 14 | */ 15 | calls: Array, 16 | /** 17 | * An array that contains all the object instances that have been 18 | * instantiated from this mock function. 19 | */ 20 | instances: Array, 21 | }, 22 | /** 23 | * Resets all information stored in the mockFn.mock.calls and 24 | * mockFn.mock.instances arrays. Often this is useful when you want to clean 25 | * up a mock's usage data between two assertions. 26 | */ 27 | mockClear(): void, 28 | /** 29 | * Resets all information stored in the mock. This is useful when you want to 30 | * completely restore a mock back to its initial state. 31 | */ 32 | mockReset(): void, 33 | /** 34 | * Removes the mock and restores the initial implementation. This is useful 35 | * when you want to mock functions in certain test cases and restore the 36 | * original implementation in others. Beware that mockFn.mockRestore only 37 | * works when mock was created with jest.spyOn. Thus you have to take care of 38 | * restoration yourself when manually assigning jest.fn(). 39 | */ 40 | mockRestore(): void, 41 | /** 42 | * Accepts a function that should be used as the implementation of the mock. 43 | * The mock itself will still record all calls that go into and instances 44 | * that come from itself -- the only difference is that the implementation 45 | * will also be executed when the mock is called. 46 | */ 47 | mockImplementation( 48 | fn: (...args: TArguments) => TReturn, 49 | ): JestMockFn, 50 | /** 51 | * Accepts a function that will be used as an implementation of the mock for 52 | * one call to the mocked function. Can be chained so that multiple function 53 | * calls produce different results. 54 | */ 55 | mockImplementationOnce( 56 | fn: (...args: TArguments) => TReturn, 57 | ): JestMockFn, 58 | /** 59 | * Just a simple sugar function for returning `this` 60 | */ 61 | mockReturnThis(): void, 62 | /** 63 | * Deprecated: use jest.fn(() => value) instead 64 | */ 65 | mockReturnValue(value: TReturn): JestMockFn, 66 | /** 67 | * Sugar for only returning a value once inside your mock 68 | */ 69 | mockReturnValueOnce(value: TReturn): JestMockFn, 70 | }; 71 | 72 | type JestAsymmetricEqualityType = { 73 | /** 74 | * A custom Jasmine equality tester 75 | */ 76 | asymmetricMatch(value: mixed): boolean, 77 | }; 78 | 79 | type JestCallsType = { 80 | allArgs(): mixed, 81 | all(): mixed, 82 | any(): boolean, 83 | count(): number, 84 | first(): mixed, 85 | mostRecent(): mixed, 86 | reset(): void, 87 | }; 88 | 89 | type JestClockType = { 90 | install(): void, 91 | mockDate(date: Date): void, 92 | tick(milliseconds?: number): void, 93 | uninstall(): void, 94 | }; 95 | 96 | type JestMatcherResult = { 97 | message?: string | (() => string), 98 | pass: boolean, 99 | }; 100 | 101 | type JestMatcher = (actual: any, expected: any) => JestMatcherResult; 102 | 103 | type JestPromiseType = { 104 | /** 105 | * Use rejects to unwrap the reason of a rejected promise so any other 106 | * matcher can be chained. If the promise is fulfilled the assertion fails. 107 | */ 108 | rejects: JestExpectType, 109 | /** 110 | * Use resolves to unwrap the value of a fulfilled promise so any other 111 | * matcher can be chained. If the promise is rejected the assertion fails. 112 | */ 113 | resolves: JestExpectType, 114 | }; 115 | 116 | /** 117 | * Plugin: jest-enzyme 118 | */ 119 | type EnzymeMatchersType = { 120 | toBeChecked(): void, 121 | toBeDisabled(): void, 122 | toBeEmpty(): void, 123 | toBePresent(): void, 124 | toContainReact(element: React$Element): void, 125 | toHaveClassName(className: string): void, 126 | toHaveHTML(html: string): void, 127 | toHaveProp(propKey: string, propValue?: any): void, 128 | toHaveRef(refName: string): void, 129 | toHaveState(stateKey: string, stateValue?: any): void, 130 | toHaveStyle(styleKey: string, styleValue?: any): void, 131 | toHaveTagName(tagName: string): void, 132 | toHaveText(text: string): void, 133 | toIncludeText(text: string): void, 134 | toHaveValue(value: any): void, 135 | toMatchElement(element: React$Element): void, 136 | toMatchSelector(selector: string): void, 137 | }; 138 | 139 | type JestExpectType = { 140 | not: JestExpectType & EnzymeMatchersType, 141 | /** 142 | * If you have a mock function, you can use .lastCalledWith to test what 143 | * arguments it was last called with. 144 | */ 145 | lastCalledWith(...args: Array): void, 146 | /** 147 | * toBe just checks that a value is what you expect. It uses === to check 148 | * strict equality. 149 | */ 150 | toBe(value: any): void, 151 | /** 152 | * Use .toHaveBeenCalled to ensure that a mock function got called. 153 | */ 154 | toBeCalled(): void, 155 | /** 156 | * Use .toBeCalledWith to ensure that a mock function was called with 157 | * specific arguments. 158 | */ 159 | toBeCalledWith(...args: Array): void, 160 | /** 161 | * Using exact equality with floating point numbers is a bad idea. Rounding 162 | * means that intuitive things fail. 163 | */ 164 | toBeCloseTo(num: number, delta: any): void, 165 | /** 166 | * Use .toBeDefined to check that a variable is not undefined. 167 | */ 168 | toBeDefined(): void, 169 | /** 170 | * Use .toBeFalsy when you don't care what a value is, you just want to 171 | * ensure a value is false in a boolean context. 172 | */ 173 | toBeFalsy(): void, 174 | /** 175 | * To compare floating point numbers, you can use toBeGreaterThan. 176 | */ 177 | toBeGreaterThan(number: number): void, 178 | /** 179 | * To compare floating point numbers, you can use toBeGreaterThanOrEqual. 180 | */ 181 | toBeGreaterThanOrEqual(number: number): void, 182 | /** 183 | * To compare floating point numbers, you can use toBeLessThan. 184 | */ 185 | toBeLessThan(number: number): void, 186 | /** 187 | * To compare floating point numbers, you can use toBeLessThanOrEqual. 188 | */ 189 | toBeLessThanOrEqual(number: number): void, 190 | /** 191 | * Use .toBeInstanceOf(Class) to check that an object is an instance of a 192 | * class. 193 | */ 194 | toBeInstanceOf(cls: Class<*>): void, 195 | /** 196 | * .toBeNull() is the same as .toBe(null) but the error messages are a bit 197 | * nicer. 198 | */ 199 | toBeNull(): void, 200 | /** 201 | * Use .toBeTruthy when you don't care what a value is, you just want to 202 | * ensure a value is true in a boolean context. 203 | */ 204 | toBeTruthy(): void, 205 | /** 206 | * Use .toBeUndefined to check that a variable is undefined. 207 | */ 208 | toBeUndefined(): void, 209 | /** 210 | * Use .toContain when you want to check that an item is in a list. For 211 | * testing the items in the list, this uses ===, a strict equality check. 212 | */ 213 | toContain(item: any): void, 214 | /** 215 | * Use .toContainEqual when you want to check that an item is in a list. For 216 | * testing the items in the list, this matcher recursively checks the 217 | * equality of all fields, rather than checking for object identity. 218 | */ 219 | toContainEqual(item: any): void, 220 | /** 221 | * Use .toEqual when you want to check that two objects have the same value. 222 | * This matcher recursively checks the equality of all fields, rather than 223 | * checking for object identity. 224 | */ 225 | toEqual(value: any): void, 226 | /** 227 | * Use .toHaveBeenCalled to ensure that a mock function got called. 228 | */ 229 | toHaveBeenCalled(): void, 230 | /** 231 | * Use .toHaveBeenCalledTimes to ensure that a mock function got called exact 232 | * number of times. 233 | */ 234 | toHaveBeenCalledTimes(number: number): void, 235 | /** 236 | * Use .toHaveBeenCalledWith to ensure that a mock function was called with 237 | * specific arguments. 238 | */ 239 | toHaveBeenCalledWith(...args: Array): void, 240 | /** 241 | * Use .toHaveBeenLastCalledWith to ensure that a mock function was last called 242 | * with specific arguments. 243 | */ 244 | toHaveBeenLastCalledWith(...args: Array): void, 245 | /** 246 | * Check that an object has a .length property and it is set to a certain 247 | * numeric value. 248 | */ 249 | toHaveLength(number: number): void, 250 | /** 251 | * 252 | */ 253 | toHaveProperty(propPath: string, value?: any): void, 254 | /** 255 | * Use .toMatch to check that a string matches a regular expression or string. 256 | */ 257 | toMatch(regexpOrString: RegExp | string): void, 258 | /** 259 | * Use .toMatchObject to check that a javascript object matches a subset of the properties of an object. 260 | */ 261 | toMatchObject(object: Object | Array): void, 262 | /** 263 | * This ensures that a React component matches the most recent snapshot. 264 | */ 265 | toMatchSnapshot(name?: string): void, 266 | /** 267 | * Use .toThrow to test that a function throws when it is called. 268 | * If you want to test that a specific error gets thrown, you can provide an 269 | * argument to toThrow. The argument can be a string for the error message, 270 | * a class for the error, or a regex that should match the error. 271 | * 272 | * Alias: .toThrowError 273 | */ 274 | toThrow(message?: string | Error | Class | RegExp): void, 275 | toThrowError(message?: string | Error | Class | RegExp): void, 276 | /** 277 | * Use .toThrowErrorMatchingSnapshot to test that a function throws a error 278 | * matching the most recent snapshot when it is called. 279 | */ 280 | toThrowErrorMatchingSnapshot(): void, 281 | }; 282 | 283 | type JestObjectType = { 284 | /** 285 | * Disables automatic mocking in the module loader. 286 | * 287 | * After this method is called, all `require()`s will return the real 288 | * versions of each module (rather than a mocked version). 289 | */ 290 | disableAutomock(): JestObjectType, 291 | /** 292 | * An un-hoisted version of disableAutomock 293 | */ 294 | autoMockOff(): JestObjectType, 295 | /** 296 | * Enables automatic mocking in the module loader. 297 | */ 298 | enableAutomock(): JestObjectType, 299 | /** 300 | * An un-hoisted version of enableAutomock 301 | */ 302 | autoMockOn(): JestObjectType, 303 | /** 304 | * Clears the mock.calls and mock.instances properties of all mocks. 305 | * Equivalent to calling .mockClear() on every mocked function. 306 | */ 307 | clearAllMocks(): JestObjectType, 308 | /** 309 | * Resets the state of all mocks. Equivalent to calling .mockReset() on every 310 | * mocked function. 311 | */ 312 | resetAllMocks(): JestObjectType, 313 | /** 314 | * Restores all mocks back to their original value. 315 | */ 316 | restoreAllMocks(): JestObjectType, 317 | /** 318 | * Removes any pending timers from the timer system. 319 | */ 320 | clearAllTimers(): void, 321 | /** 322 | * The same as `mock` but not moved to the top of the expectation by 323 | * babel-jest. 324 | */ 325 | doMock(moduleName: string, moduleFactory?: any): JestObjectType, 326 | /** 327 | * The same as `unmock` but not moved to the top of the expectation by 328 | * babel-jest. 329 | */ 330 | dontMock(moduleName: string): JestObjectType, 331 | /** 332 | * Returns a new, unused mock function. Optionally takes a mock 333 | * implementation. 334 | */ 335 | fn, TReturn>( 336 | implementation?: (...args: TArguments) => TReturn, 337 | ): JestMockFn, 338 | /** 339 | * Determines if the given function is a mocked function. 340 | */ 341 | isMockFunction(fn: Function): boolean, 342 | /** 343 | * Given the name of a module, use the automatic mocking system to generate a 344 | * mocked version of the module for you. 345 | */ 346 | genMockFromModule(moduleName: string): any, 347 | /** 348 | * Mocks a module with an auto-mocked version when it is being required. 349 | * 350 | * The second argument can be used to specify an explicit module factory that 351 | * is being run instead of using Jest's automocking feature. 352 | * 353 | * The third argument can be used to create virtual mocks -- mocks of modules 354 | * that don't exist anywhere in the system. 355 | */ 356 | mock( 357 | moduleName: string, 358 | moduleFactory?: any, 359 | options?: Object, 360 | ): JestObjectType, 361 | /** 362 | * Returns the actual module instead of a mock, bypassing all checks on 363 | * whether the module should receive a mock implementation or not. 364 | */ 365 | requireActual(moduleName: string): any, 366 | /** 367 | * Returns a mock module instead of the actual module, bypassing all checks 368 | * on whether the module should be required normally or not. 369 | */ 370 | requireMock(moduleName: string): any, 371 | /** 372 | * Resets the module registry - the cache of all required modules. This is 373 | * useful to isolate modules where local state might conflict between tests. 374 | */ 375 | resetModules(): JestObjectType, 376 | /** 377 | * Exhausts the micro-task queue (usually interfaced in node via 378 | * process.nextTick). 379 | */ 380 | runAllTicks(): void, 381 | /** 382 | * Exhausts the macro-task queue (i.e., all tasks queued by setTimeout(), 383 | * setInterval(), and setImmediate()). 384 | */ 385 | runAllTimers(): void, 386 | /** 387 | * Exhausts all tasks queued by setImmediate(). 388 | */ 389 | runAllImmediates(): void, 390 | /** 391 | * Executes only the macro task queue (i.e. all tasks queued by setTimeout() 392 | * or setInterval() and setImmediate()). 393 | */ 394 | runTimersToTime(msToRun: number): void, 395 | /** 396 | * Executes only the macro-tasks that are currently pending (i.e., only the 397 | * tasks that have been queued by setTimeout() or setInterval() up to this 398 | * point) 399 | */ 400 | runOnlyPendingTimers(): void, 401 | /** 402 | * Explicitly supplies the mock object that the module system should return 403 | * for the specified module. Note: It is recommended to use jest.mock() 404 | * instead. 405 | */ 406 | setMock(moduleName: string, moduleExports: any): JestObjectType, 407 | /** 408 | * Indicates that the module system should never return a mocked version of 409 | * the specified module from require() (e.g. that it should always return the 410 | * real module). 411 | */ 412 | unmock(moduleName: string): JestObjectType, 413 | /** 414 | * Instructs Jest to use fake versions of the standard timer functions 415 | * (setTimeout, setInterval, clearTimeout, clearInterval, nextTick, 416 | * setImmediate and clearImmediate). 417 | */ 418 | useFakeTimers(): JestObjectType, 419 | /** 420 | * Instructs Jest to use the real versions of the standard timer functions. 421 | */ 422 | useRealTimers(): JestObjectType, 423 | /** 424 | * Creates a mock function similar to jest.fn but also tracks calls to 425 | * object[methodName]. 426 | */ 427 | spyOn(object: Object, methodName: string): JestMockFn, 428 | /** 429 | * Set the default timeout interval for tests and before/after hooks in milliseconds. 430 | * Note: The default timeout interval is 5 seconds if this method is not called. 431 | */ 432 | setTimeout(timeout: number): JestObjectType, 433 | }; 434 | 435 | type JestSpyType = { 436 | calls: JestCallsType, 437 | }; 438 | 439 | /** Runs this function after every test inside this context */ 440 | declare function afterEach( 441 | fn: (done: () => void) => ?Promise, 442 | timeout?: number, 443 | ): void; 444 | /** Runs this function before every test inside this context */ 445 | declare function beforeEach( 446 | fn: (done: () => void) => ?Promise, 447 | timeout?: number, 448 | ): void; 449 | /** Runs this function after all tests have finished inside this context */ 450 | declare function afterAll( 451 | fn: (done: () => void) => ?Promise, 452 | timeout?: number, 453 | ): void; 454 | /** Runs this function before any tests have started inside this context */ 455 | declare function beforeAll( 456 | fn: (done: () => void) => ?Promise, 457 | timeout?: number, 458 | ): void; 459 | 460 | /** A context for grouping tests together */ 461 | declare var describe: { 462 | /** 463 | * Creates a block that groups together several related tests in one "test suite" 464 | */ 465 | (name: string, fn: () => void): void, 466 | 467 | /** 468 | * Only run this describe block 469 | */ 470 | only(name: string, fn: () => void): void, 471 | 472 | /** 473 | * Skip running this describe block 474 | */ 475 | skip(name: string, fn: () => void): void, 476 | }; 477 | 478 | /** An individual test unit */ 479 | declare var it: { 480 | /** 481 | * An individual test unit 482 | * 483 | * @param {string} Name of Test 484 | * @param {Function} Test 485 | * @param {number} Timeout for the test, in milliseconds. 486 | */ 487 | ( 488 | name: string, 489 | fn?: (done: () => void) => ?Promise, 490 | timeout?: number, 491 | ): void, 492 | /** 493 | * Only run this test 494 | * 495 | * @param {string} Name of Test 496 | * @param {Function} Test 497 | * @param {number} Timeout for the test, in milliseconds. 498 | */ 499 | only( 500 | name: string, 501 | fn?: (done: () => void) => ?Promise, 502 | timeout?: number, 503 | ): void, 504 | /** 505 | * Skip running this test 506 | * 507 | * @param {string} Name of Test 508 | * @param {Function} Test 509 | * @param {number} Timeout for the test, in milliseconds. 510 | */ 511 | skip( 512 | name: string, 513 | fn?: (done: () => void) => ?Promise, 514 | timeout?: number, 515 | ): void, 516 | /** 517 | * Run the test concurrently 518 | * 519 | * @param {string} Name of Test 520 | * @param {Function} Test 521 | * @param {number} Timeout for the test, in milliseconds. 522 | */ 523 | concurrent( 524 | name: string, 525 | fn?: (done: () => void) => ?Promise, 526 | timeout?: number, 527 | ): void, 528 | }; 529 | declare function fit( 530 | name: string, 531 | fn: (done: () => void) => ?Promise, 532 | timeout?: number, 533 | ): void; 534 | /** An individual test unit */ 535 | declare var test: typeof it; 536 | /** A disabled group of tests */ 537 | declare var xdescribe: typeof describe; 538 | /** A focused group of tests */ 539 | declare var fdescribe: typeof describe; 540 | /** A disabled individual test */ 541 | declare var xit: typeof it; 542 | /** A disabled individual test */ 543 | declare var xtest: typeof it; 544 | 545 | /** The expect function is used every time you want to test a value */ 546 | declare var expect: { 547 | /** The object that you want to make assertions against */ 548 | (value: any): JestExpectType & JestPromiseType & EnzymeMatchersType, 549 | /** Add additional Jasmine matchers to Jest's roster */ 550 | extend(matchers: { [name: string]: JestMatcher }): void, 551 | /** Add a module that formats application-specific data structures. */ 552 | addSnapshotSerializer(serializer: (input: Object) => string): void, 553 | assertions(expectedAssertions: number): void, 554 | hasAssertions(): void, 555 | any(value: mixed): JestAsymmetricEqualityType, 556 | anything(): void, 557 | arrayContaining(value: Array): void, 558 | objectContaining(value: Object): void, 559 | /** Matches any received string that contains the exact expected string. */ 560 | stringContaining(value: string): void, 561 | stringMatching(value: string | RegExp): void, 562 | }; 563 | 564 | // TODO handle return type 565 | // http://jasmine.github.io/2.4/introduction.html#section-Spies 566 | declare function spyOn(value: mixed, method: string): Object; 567 | 568 | /** Holds all functions related to manipulating test runner */ 569 | declare var jest: JestObjectType; 570 | 571 | /** 572 | * The global Jasmine object, this is generally not exposed as the public API, 573 | * using features inside here could break in later versions of Jest. 574 | */ 575 | declare var jasmine: { 576 | DEFAULT_TIMEOUT_INTERVAL: number, 577 | any(value: mixed): JestAsymmetricEqualityType, 578 | anything(): void, 579 | arrayContaining(value: Array): void, 580 | clock(): JestClockType, 581 | createSpy(name: string): JestSpyType, 582 | createSpyObj( 583 | baseName: string, 584 | methodNames: Array, 585 | ): { [methodName: string]: JestSpyType }, 586 | objectContaining(value: Object): void, 587 | stringMatching(value: string): void, 588 | }; 589 | -------------------------------------------------------------------------------- /flow-typed/npm/lint-staged_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: e672f4682f3dbdf624c1879b2f15a8c2 2 | // flow-typed version: <>/lint-staged_v6.1.0/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'lint-staged' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'lint-staged' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'lint-staged/src/calcChunkSize' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'lint-staged/src/findBin' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'lint-staged/src/generateTasks' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'lint-staged/src/getConfig' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'lint-staged/src/index' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'lint-staged/src/printErrors' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'lint-staged/src/resolveGitDir' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'lint-staged/src/runAll' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'lint-staged/src/runScript' { 58 | declare module.exports: any; 59 | } 60 | 61 | // Filename aliases 62 | declare module 'lint-staged/index' { 63 | declare module.exports: $Exports<'lint-staged'>; 64 | } 65 | declare module 'lint-staged/index.js' { 66 | declare module.exports: $Exports<'lint-staged'>; 67 | } 68 | declare module 'lint-staged/src/calcChunkSize.js' { 69 | declare module.exports: $Exports<'lint-staged/src/calcChunkSize'>; 70 | } 71 | declare module 'lint-staged/src/findBin.js' { 72 | declare module.exports: $Exports<'lint-staged/src/findBin'>; 73 | } 74 | declare module 'lint-staged/src/generateTasks.js' { 75 | declare module.exports: $Exports<'lint-staged/src/generateTasks'>; 76 | } 77 | declare module 'lint-staged/src/getConfig.js' { 78 | declare module.exports: $Exports<'lint-staged/src/getConfig'>; 79 | } 80 | declare module 'lint-staged/src/index.js' { 81 | declare module.exports: $Exports<'lint-staged/src/index'>; 82 | } 83 | declare module 'lint-staged/src/printErrors.js' { 84 | declare module.exports: $Exports<'lint-staged/src/printErrors'>; 85 | } 86 | declare module 'lint-staged/src/resolveGitDir.js' { 87 | declare module.exports: $Exports<'lint-staged/src/resolveGitDir'>; 88 | } 89 | declare module 'lint-staged/src/runAll.js' { 90 | declare module.exports: $Exports<'lint-staged/src/runAll'>; 91 | } 92 | declare module 'lint-staged/src/runScript.js' { 93 | declare module.exports: $Exports<'lint-staged/src/runScript'>; 94 | } 95 | -------------------------------------------------------------------------------- /flow-typed/npm/normalize.css_v7.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b0a8c8851219a1c2a933509d842e0bc8 2 | // flow-typed version: 4a2d036a51/normalize.css_v7.x.x/flow_>=v0.34.x 3 | 4 | // normalize.css may be imported for side-effects, 5 | // e.g. to force webpack to bundle it alongside CSS modules 6 | 7 | declare module 'normalize.css' { 8 | declare export default empty 9 | } 10 | -------------------------------------------------------------------------------- /flow-typed/npm/prettier_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 5b16fd5de24edd7b49c40b083c12914d 2 | // flow-typed version: <>/prettier_v1.10.2/flow_v0.64.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'prettier' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'prettier' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'prettier/bin-prettier' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'prettier/parser-babylon' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'prettier/parser-flow' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'prettier/parser-glimmer' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'prettier/parser-graphql' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'prettier/parser-markdown' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'prettier/parser-parse5' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'prettier/parser-postcss' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'prettier/parser-typescript' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'prettier/parser-vue' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'prettier/third-party' { 66 | declare module.exports: any; 67 | } 68 | 69 | // Filename aliases 70 | declare module 'prettier/bin-prettier.js' { 71 | declare module.exports: $Exports<'prettier/bin-prettier'>; 72 | } 73 | declare module 'prettier/index' { 74 | declare module.exports: $Exports<'prettier'>; 75 | } 76 | declare module 'prettier/index.js' { 77 | declare module.exports: $Exports<'prettier'>; 78 | } 79 | declare module 'prettier/parser-babylon.js' { 80 | declare module.exports: $Exports<'prettier/parser-babylon'>; 81 | } 82 | declare module 'prettier/parser-flow.js' { 83 | declare module.exports: $Exports<'prettier/parser-flow'>; 84 | } 85 | declare module 'prettier/parser-glimmer.js' { 86 | declare module.exports: $Exports<'prettier/parser-glimmer'>; 87 | } 88 | declare module 'prettier/parser-graphql.js' { 89 | declare module.exports: $Exports<'prettier/parser-graphql'>; 90 | } 91 | declare module 'prettier/parser-markdown.js' { 92 | declare module.exports: $Exports<'prettier/parser-markdown'>; 93 | } 94 | declare module 'prettier/parser-parse5.js' { 95 | declare module.exports: $Exports<'prettier/parser-parse5'>; 96 | } 97 | declare module 'prettier/parser-postcss.js' { 98 | declare module.exports: $Exports<'prettier/parser-postcss'>; 99 | } 100 | declare module 'prettier/parser-typescript.js' { 101 | declare module.exports: $Exports<'prettier/parser-typescript'>; 102 | } 103 | declare module 'prettier/parser-vue.js' { 104 | declare module.exports: $Exports<'prettier/parser-vue'>; 105 | } 106 | declare module 'prettier/third-party.js' { 107 | declare module.exports: $Exports<'prettier/third-party'>; 108 | } 109 | -------------------------------------------------------------------------------- /flow-typed/npm/prop-types_v15.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 3eaa1f24c7397b78a7481992d2cddcb2 2 | // flow-typed version: a1a20d4928/prop-types_v15.x.x/flow_>=v0.41.x 3 | 4 | type $npm$propTypes$ReactPropsCheckType = ( 5 | props: any, 6 | propName: string, 7 | componentName: string, 8 | href?: string, 9 | ) => ?Error; 10 | 11 | declare module 'prop-types' { 12 | declare var array: React$PropType$Primitive>; 13 | declare var bool: React$PropType$Primitive; 14 | declare var func: React$PropType$Primitive; 15 | declare var number: React$PropType$Primitive; 16 | declare var object: React$PropType$Primitive; 17 | declare var string: React$PropType$Primitive; 18 | declare var any: React$PropType$Primitive; 19 | declare var arrayOf: React$PropType$ArrayOf; 20 | declare var element: React$PropType$Primitive; /* TODO */ 21 | declare var instanceOf: React$PropType$InstanceOf; 22 | declare var node: React$PropType$Primitive; /* TODO */ 23 | declare var objectOf: React$PropType$ObjectOf; 24 | declare var oneOf: React$PropType$OneOf; 25 | declare var oneOfType: React$PropType$OneOfType; 26 | declare var shape: React$PropType$Shape; 27 | 28 | declare function checkPropTypes( 29 | propTypes: $Subtype<{ [_: $Keys]: $npm$propTypes$ReactPropsCheckType }>, 30 | values: V, 31 | location: string, 32 | componentName: string, 33 | getStack: ?() => ?string, 34 | ): void; 35 | } 36 | -------------------------------------------------------------------------------- /flow-typed/npm/react-test-renderer_v16.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 2d946f2ec4aba5210b19d053c411a59d 2 | // flow-typed version: 95b3e05165/react-test-renderer_v16.x.x/flow_>=v0.47.x 3 | 4 | // Type definitions for react-test-renderer 16.x.x 5 | // Ported from: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-test-renderer 6 | 7 | type ReactTestRendererJSON = { 8 | type: string, 9 | props: { [propName: string]: any }, 10 | children: null | ReactTestRendererJSON[], 11 | }; 12 | 13 | type ReactTestRendererTree = ReactTestRendererJSON & { 14 | nodeType: 'component' | 'host', 15 | instance: any, 16 | rendered: null | ReactTestRendererTree, 17 | }; 18 | 19 | type ReactTestInstance = { 20 | instance: any, 21 | type: string, 22 | props: { [propName: string]: any }, 23 | parent: null | ReactTestInstance, 24 | children: Array, 25 | 26 | find(predicate: (node: ReactTestInstance) => boolean): ReactTestInstance, 27 | findByType(type: React$ElementType): ReactTestInstance, 28 | findByProps(props: { [propName: string]: any }): ReactTestInstance, 29 | 30 | findAll( 31 | predicate: (node: ReactTestInstance) => boolean, 32 | options?: { deep: boolean }, 33 | ): ReactTestInstance[], 34 | findAllByType( 35 | type: React$ElementType, 36 | options?: { deep: boolean }, 37 | ): ReactTestInstance[], 38 | findAllByProps( 39 | props: { [propName: string]: any }, 40 | options?: { deep: boolean }, 41 | ): ReactTestInstance[], 42 | }; 43 | 44 | type ReactTestRenderer = { 45 | toJSON(): null | ReactTestRendererJSON, 46 | toTree(): null | ReactTestRendererTree, 47 | unmount(nextElement?: React$Element): void, 48 | update(nextElement: React$Element): void, 49 | getInstance(): null | ReactTestInstance, 50 | root: ReactTestInstance, 51 | }; 52 | 53 | type TestRendererOptions = { 54 | createNodeMock(element: React$Element): any, 55 | }; 56 | 57 | declare module 'react-test-renderer' { 58 | declare function create( 59 | nextElement: React$Element, 60 | options?: TestRendererOptions, 61 | ): ReactTestRenderer; 62 | } 63 | -------------------------------------------------------------------------------- /flow-typed/npm/recompose_v0.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: ababb4f540ef52bbdbb2fdd0e473eb0d 2 | // flow-typed version: 245513abee/recompose_v0.x.x/flow_>=v0.57.x 3 | 4 | /** 5 | * 1) Types give additional constraint on a language, recompose was written on the untyped language 6 | * as a consequence of this fact 7 | * for some recompose HOCs is near impossible to add correct typings. 8 | * 2) flow sometimes does not work as expected. 9 | * 10 | * So any help and suggestions will be very appreciated. 11 | * 12 | * ----------------------------------------------------------------------------------- 13 | * Type definition of recompose HOCs are splitted into 2 parts, 14 | * "HOCs with good flow support" - in most cases you can use them without big issues, 15 | * see `test_${hocName}.js` for the idea. 16 | * Some known issues: 17 | * see test_mapProps.js - inference work but type errors are not detected in hocs 18 | * 19 | * SUPPORTED HOCs: 20 | * defaultProps, mapProps, withProps, withStateHandlers, withHandlers, pure, 21 | * onlyUpdateForKeys, shouldUpdate, renderNothing, renderComponent, branch, withPropsOnChange, 22 | * onlyUpdateForPropTypes, toClass, withContext, getContext, 23 | * setStatic, setPropTypes, setDisplayName, 24 | * ----------------------------------------------------------------------------------- 25 | * "TODO (UNSUPPORTED) HOCs" - you need to provide type information 26 | * (no automatic type inference), voodoo dancing etc 27 | * see `test_voodoo.js` for the idea 28 | * 29 | * remember that: 30 | * flattenProp,renameProp, renameProps can easily be replaced with withProps 31 | * withReducer, withState -> use withStateHandlers instead 32 | * lifecycle -> you don't need recompose if you need a lifecycle, just use React class instead 33 | * mapPropsStream -> see test_mapPropsStream.js 34 | * ----------------------------------------------------------------------------------- 35 | * 36 | * utils: 37 | * getDisplayName, wrapDisplayName, shallowEqual, 38 | * isClassComponent, createEagerElement, createEagerFactory, createSink, componentFromProp, 39 | * nest, hoistStatics, 40 | */ 41 | 42 | //------------------- 43 | 44 | declare module 'recompose' { 45 | // ----------------------------------------------------------------- 46 | // Private declarations 47 | // ----------------------------------------------------------------- 48 | 49 | declare type Void_ R> = ( 50 | A, 51 | B, 52 | C, 53 | D, 54 | ) => void; 55 | 56 | declare type Void = Void_<*, *, *, *, *, T>; 57 | 58 | declare type ExtractStateHandlersCodomain = ( 59 | v: (state: State, props: Enhanced) => V, 60 | ) => Void; 61 | 62 | declare type ExtractHandlersCodomain = ( 63 | v: (props: Enhanced) => V, 64 | ) => V; 65 | 66 | declare type UnaryFn = (a: A) => R; 67 | 68 | // ----------------------------------------------------------------- 69 | // Public declarations 70 | // ----------------------------------------------------------------- 71 | 72 | declare export type Component = React$ComponentType; 73 | 74 | declare export type HOC = UnaryFn< 75 | Component, 76 | Component, 77 | >; 78 | 79 | declare export var compose: $Compose; 80 | 81 | // --------------------------------------------------------------------------- 82 | // ----------------===<<>>===-------------------- 83 | // --------------------------------------------------------------------------- 84 | 85 | declare export function defaultProps( 86 | defProps: Default, 87 | ): HOC<{ ...$Exact, ...Default }, Enhanced>; 88 | 89 | declare export function mapProps( 90 | propsMapper: (ownerProps: Enhanced) => Base, 91 | ): HOC; 92 | 93 | declare export function withProps( 94 | propsMapper: ((ownerProps: Enhanced) => BaseAdd) | BaseAdd, 95 | ): HOC<{ ...$Exact, ...BaseAdd }, Enhanced>; 96 | 97 | declare export function withStateHandlers< 98 | State, 99 | Enhanced, 100 | StateHandlers: { 101 | [key: string]: ( 102 | state: State, 103 | props: Enhanced, 104 | ) => (...payload: any[]) => $Shape, 105 | }, 106 | >( 107 | initialState: ((props: Enhanced) => State) | State, 108 | stateUpdaters: StateHandlers, 109 | ): HOC< 110 | { 111 | ...$Exact, 112 | ...$Exact, 113 | ...$ObjMap, 114 | }, 115 | Enhanced, 116 | >; 117 | 118 | declare export function withHandlers< 119 | Enhanced, 120 | Handlers: 121 | | (( 122 | props: Enhanced, 123 | ) => { 124 | [key: string]: (props: Enhanced) => Function, 125 | }) 126 | | { 127 | [key: string]: (props: Enhanced) => Function, 128 | }, 129 | >( 130 | handlers: ((props: Enhanced) => Handlers) | Handlers, 131 | ): HOC< 132 | { 133 | ...$Exact, 134 | ...$ObjMap, 135 | }, 136 | Enhanced, 137 | >; 138 | 139 | declare export function pure(a: Component): Component; 140 | declare export function onlyUpdateForPropTypes( 141 | a: Component, 142 | ): Component; 143 | declare export function onlyUpdateForKeys(Array<$Keys>): HOC; 144 | declare export function shouldUpdate( 145 | (props: A, nextProps: A) => boolean, 146 | ): HOC; 147 | 148 | declare export function toClass(a: Component): Component; 149 | 150 | declare export function withContext( 151 | childContextTypes: ContextPropTypes, 152 | getChildContext: (props: A) => ContextObj, 153 | ): HOC; 154 | 155 | declare export function getContext( 156 | contextTypes: CtxTypes, 157 | ): HOC<{ ...$Exact, ...CtxTypes }, Enhanced>; 158 | 159 | /** 160 | * It's wrong declaration but having that renderNothing and renderComponent are somehow useless 161 | * outside branch enhancer, we just give it an id type 162 | * so common way of using branch like 163 | * `branch(testFn, renderNothing | renderComponent(Comp))` will work as expected. 164 | * Tests are placed at test_branch. 165 | */ 166 | declare export function renderNothing(C: Component): Component; 167 | declare export function renderComponent(a: Component): HOC; 168 | 169 | /** 170 | * We make an assumtion that left and right have the same type if exists 171 | */ 172 | declare export function branch( 173 | testFn: (props: Enhanced) => boolean, 174 | // not a HOC because of inference problems, this works but HOC is not 175 | left: (Component) => Component, 176 | // I never use right part and it can be a problem with inference as should be same type as left 177 | right?: (Component) => Component, 178 | ): HOC; 179 | 180 | // test_statics 181 | declare export function setStatic(key: string, value: any): HOC; 182 | declare export function setPropTypes(propTypes: Object): HOC; 183 | declare export function setDisplayName(displayName: string): HOC; 184 | 185 | declare export function withPropsOnChange( 186 | shouldMapOrKeys: | ((props: Enhanced, nextProps: Enhanced) => boolean) 187 | | Array<$Keys>, 188 | propsMapper: (ownerProps: Enhanced) => BaseAdd, 189 | ): HOC<{ ...$Exact, ...BaseAdd }, Enhanced>; 190 | 191 | // --------------------------------------------------------------------------- 192 | // ----------------===<<>>===------------------------ 193 | // --------------------------------------------------------------------------- 194 | 195 | // use withProps instead 196 | declare export function flattenProp( 197 | propName: $Keys, 198 | ): HOC; 199 | 200 | // use withProps instead 201 | declare export function renameProp( 202 | oldName: $Keys, 203 | newName: $Keys, 204 | ): HOC; 205 | 206 | // use withProps instead 207 | declare export function renameProps(nameMap: { 208 | [key: $Keys]: $Keys, 209 | }): HOC; 210 | 211 | // use withStateHandlers instead 212 | declare export function withState( 213 | stateName: string, 214 | stateUpdaterName: string, 215 | initialState: T | ((props: Enhanced) => T), 216 | ): HOC; 217 | 218 | // use withStateHandlers instead 219 | declare export function withReducer( 220 | stateName: string, 221 | dispatchName: string, 222 | reducer: (state: State, action: Action) => State, 223 | initialState: State, 224 | ): HOC; 225 | 226 | // lifecycle use React instead 227 | declare export function lifecycle(spec: Object): HOC; 228 | 229 | // Help needed, as explicitly providing the type 230 | // errors not detected, see TODO at test_mapPropsStream.js 231 | declare export function mapPropsStream( 232 | (props$: any) => any, 233 | ): HOC; 234 | 235 | // --------------------------------------------------------------------------- 236 | // -----------------------------===<<>>===----------------------------- 237 | // --------------------------------------------------------------------------- 238 | 239 | declare export function getDisplayName(C: Component): string; 240 | 241 | declare export function wrapDisplayName( 242 | C: Component, 243 | wrapperName: string, 244 | ): string; 245 | 246 | declare export function shallowEqual(objA: mixed, objB: mixed): boolean; 247 | 248 | declare export function isClassComponent(value: any): boolean; 249 | 250 | declare export function createEagerElement( 251 | type: Component | string, 252 | props: ?A, 253 | children?: ?React$Node, 254 | ): React$Element; 255 | 256 | declare export function createEagerFactory( 257 | type: Component | string, 258 | ): (props: ?A, children?: ?React$Node) => React$Element; 259 | 260 | declare export function createSink( 261 | callback: (props: A) => void, 262 | ): Component; 263 | 264 | declare export function componentFromProp(propName: string): Component; 265 | 266 | declare export function nest( 267 | ...Components: Array | string> 268 | ): Component; 269 | 270 | declare export function hoistStatics>(hoc: H): H; 271 | 272 | declare export function componentFromStream( 273 | (props$: any) => any, 274 | ): T => React$Element; 275 | 276 | declare export function createEventHandler(): { 277 | stream: any, 278 | handler: Function, 279 | }; 280 | } 281 | 282 | declare module 'recompose/defaultProps' { 283 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'defaultProps'>; 284 | } 285 | 286 | declare module 'recompose/mapProps' { 287 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'mapProps'>; 288 | } 289 | 290 | declare module 'recompose/withProps' { 291 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'withProps'>; 292 | } 293 | 294 | declare module 'recompose/withStateHandlers' { 295 | declare module.exports: $PropertyType< 296 | $Exports<'recompose'>, 297 | 'withStateHandlers', 298 | >; 299 | } 300 | 301 | declare module 'recompose/withHandlers' { 302 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'withHandlers'>; 303 | } 304 | 305 | declare module 'recompose/pure' { 306 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'pure'>; 307 | } 308 | 309 | declare module 'recompose/onlyUpdateForPropTypes' { 310 | declare module.exports: $PropertyType< 311 | $Exports<'recompose'>, 312 | 'onlyUpdateForPropTypes', 313 | >; 314 | } 315 | 316 | declare module 'recompose/onlyUpdateForKeys' { 317 | declare module.exports: $PropertyType< 318 | $Exports<'recompose'>, 319 | 'onlyUpdateForKeys', 320 | >; 321 | } 322 | 323 | declare module 'recompose/shouldUpdate' { 324 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'shouldUpdate'>; 325 | } 326 | 327 | declare module 'recompose/toClass' { 328 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'toClass'>; 329 | } 330 | 331 | declare module 'recompose/withContext' { 332 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'withContext'>; 333 | } 334 | 335 | declare module 'recompose/getContext' { 336 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'getContext'>; 337 | } 338 | 339 | declare module 'recompose/renderNothing' { 340 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'renderNothing'>; 341 | } 342 | 343 | declare module 'recompose/renderComponent' { 344 | declare module.exports: $PropertyType< 345 | $Exports<'recompose'>, 346 | 'renderComponent', 347 | >; 348 | } 349 | 350 | declare module 'recompose/branch' { 351 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'branch'>; 352 | } 353 | 354 | declare module 'recompose/setStatic' { 355 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'setStatic'>; 356 | } 357 | 358 | declare module 'recompose/setPropTypes' { 359 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'setPropTypes'>; 360 | } 361 | 362 | declare module 'recompose/setDisplayName' { 363 | declare module.exports: $PropertyType< 364 | $Exports<'recompose'>, 365 | 'setDisplayName', 366 | >; 367 | } 368 | 369 | declare module 'recompose/withPropsOnChange' { 370 | declare module.exports: $PropertyType< 371 | $Exports<'recompose'>, 372 | 'withPropsOnChange', 373 | >; 374 | } 375 | 376 | declare module 'recompose/flattenProp' { 377 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'flattenProp'>; 378 | } 379 | 380 | declare module 'recompose/renameProp' { 381 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'renameProp'>; 382 | } 383 | 384 | declare module 'recompose/renameProps' { 385 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'renameProps'>; 386 | } 387 | 388 | declare module 'recompose/withState' { 389 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'withState'>; 390 | } 391 | 392 | declare module 'recompose/withReducer' { 393 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'withReducer'>; 394 | } 395 | 396 | declare module 'recompose/lifecycle' { 397 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'lifecycle'>; 398 | } 399 | 400 | declare module 'recompose/mapPropsStream' { 401 | declare module.exports: $PropertyType< 402 | $Exports<'recompose'>, 403 | 'mapPropsStream', 404 | >; 405 | } 406 | 407 | declare module 'recompose/getDisplayName' { 408 | declare module.exports: $PropertyType< 409 | $Exports<'recompose'>, 410 | 'getDisplayName', 411 | >; 412 | } 413 | 414 | declare module 'recompose/wrapDisplayName' { 415 | declare module.exports: $PropertyType< 416 | $Exports<'recompose'>, 417 | 'wrapDisplayName', 418 | >; 419 | } 420 | 421 | declare module 'recompose/shallowEqual' { 422 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'shallowEqual'>; 423 | } 424 | 425 | declare module 'recompose/isClassComponent' { 426 | declare module.exports: $PropertyType< 427 | $Exports<'recompose'>, 428 | 'isClassComponent', 429 | >; 430 | } 431 | 432 | declare module 'recompose/createEagerElement' { 433 | declare module.exports: $PropertyType< 434 | $Exports<'recompose'>, 435 | 'createEagerElement', 436 | >; 437 | } 438 | 439 | declare module 'recompose/createEagerFactory' { 440 | declare module.exports: $PropertyType< 441 | $Exports<'recompose'>, 442 | 'createEagerFactory', 443 | >; 444 | } 445 | 446 | declare module 'recompose/createSink' { 447 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'createSink'>; 448 | } 449 | 450 | declare module 'recompose/componentFromProp' { 451 | declare module.exports: $PropertyType< 452 | $Exports<'recompose'>, 453 | 'componentFromProp', 454 | >; 455 | } 456 | 457 | declare module 'recompose/nest' { 458 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'nest'>; 459 | } 460 | 461 | declare module 'recompose/hoistStatics' { 462 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'hoistStatics'>; 463 | } 464 | 465 | declare module 'recompose/componentFromStream' { 466 | declare module.exports: $PropertyType< 467 | $Exports<'recompose'>, 468 | 'componentFromStream', 469 | >; 470 | } 471 | 472 | declare module 'recompose/createEventHandler' { 473 | declare module.exports: $PropertyType< 474 | $Exports<'recompose'>, 475 | 'createEventHandler', 476 | >; 477 | } 478 | 479 | declare module 'recompose/compose' { 480 | declare module.exports: $PropertyType<$Exports<'recompose'>, 'compose'>; 481 | } 482 | -------------------------------------------------------------------------------- /images/image1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evenchange4/react-progressive-bg-image/aa84006da9c3c52a7e413eccc43f2d18bfcdfdbb/images/image1.jpg -------------------------------------------------------------------------------- /images/image1X60.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evenchange4/react-progressive-bg-image/aa84006da9c3c52a7e413eccc43f2d18bfcdfdbb/images/image1X60.jpg -------------------------------------------------------------------------------- /images/image2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evenchange4/react-progressive-bg-image/aa84006da9c3c52a7e413eccc43f2d18bfcdfdbb/images/image2.jpg -------------------------------------------------------------------------------- /images/image2X60.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evenchange4/react-progressive-bg-image/aa84006da9c3c52a7e413eccc43f2d18bfcdfdbb/images/image2X60.jpg -------------------------------------------------------------------------------- /index.d.ts: -------------------------------------------------------------------------------- 1 | // PR welcome 2 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-progressive-bg-image", 3 | "version": "3.0.0", 4 | "description": "Medium style progressive background image for React", 5 | "author": "Michael Hsu ", 6 | "license": "MIT", 7 | "typings": "./index.d.ts", 8 | "main": "lib/index.js", 9 | "files": ["lib", "index.d.ts"], 10 | "scripts": { 11 | "clean": "rm -rf lib", 12 | "prebuild": "npm run clean", 13 | "build": 14 | "NODE_ENV=production babel src --out-dir lib --ignore '**/*.example.js,**/__tests__/*'", 15 | "test": "NODE_ENV='test' jest --coverage --runInBand", 16 | "test:watch": "npm run test -- --watch", 17 | "start": "start-storybook -p 6006", 18 | "build-storybook": "build-storybook", 19 | "eslint": "eslint ./", 20 | "flow": "flow", 21 | "precommit": "lint-staged", 22 | "format": "prettier --write 'src/**/*.js' '.storybook/*.js' '*.{md,json}'", 23 | "changelog": 24 | "github-changes -o evenchange4 -r react-progressive-bg-image -b master -f ./CHANGELOG.md --order-semver --use-commit-body" 25 | }, 26 | "dependencies": { 27 | "prop-types": "^15.6.0", 28 | "ramda": "^0.25.0", 29 | "recompose": "^0.26.0", 30 | "rxjs": "^5.5.6" 31 | }, 32 | "devDependencies": { 33 | "@storybook/addon-info": "3.3.12", 34 | "@storybook/addon-options": "3.3.12", 35 | "@storybook/addon-storyshots": "3.3.12", 36 | "@storybook/react": "3.3.12", 37 | "babel-cli": "6.26.0", 38 | "babel-eslint": "8.2.1", 39 | "babel-preset-env": "1.6.1", 40 | "babel-preset-react-app": "3.1.1", 41 | "codecov": "3.0.0", 42 | "enzyme": "3.3.0", 43 | "enzyme-adapter-react-16": "1.1.1", 44 | "enzyme-to-json": "3.3.1", 45 | "eslint": "4.17.0", 46 | "eslint-config-airbnb": "16.1.0", 47 | "eslint-config-prettier": "2.9.0", 48 | "eslint-plugin-flowtype": "2.42.0", 49 | "eslint-plugin-import": "2.8.0", 50 | "eslint-plugin-jest": "21.7.0", 51 | "eslint-plugin-jsx-a11y": "6.0.3", 52 | "eslint-plugin-prettier": "2.6.0", 53 | "eslint-plugin-react": "7.6.1", 54 | "flow-bin": "0.65.0", 55 | "github-changes": "1.1.2", 56 | "husky": "0.14.3", 57 | "jest": "22.1.4", 58 | "jest-styled-components": "next", 59 | "lint-staged": "6.1.0", 60 | "normalize.css": "8.0.0", 61 | "prettier": "1.10.2", 62 | "react": "16.2.0", 63 | "react-dom": "16.2.0", 64 | "react-test-renderer": "16.2.0", 65 | "styled-components": "3.1.4" 66 | }, 67 | "babel": { 68 | "presets": [ 69 | "react-app", 70 | [ 71 | "babel-preset-env", 72 | { 73 | "targets": { 74 | "node": "current" 75 | } 76 | } 77 | ] 78 | ] 79 | }, 80 | "jest": { 81 | "setupTestFrameworkScriptFile": "/setupTests.js", 82 | "collectCoverageFrom": [ 83 | "src/**/*.js", 84 | "!src/**/*.test.js", 85 | "!src/**/*.example.js" 86 | ], 87 | "testPathIgnorePatterns": ["/node_modules/", "/lib/"], 88 | "snapshotSerializers": ["enzyme-to-json/serializer"], 89 | "resetMocks": true, 90 | "resetModules": true 91 | }, 92 | "prettier": { 93 | "trailingComma": "all", 94 | "singleQuote": true 95 | }, 96 | "lint-staged": { 97 | "*.{js,json,md}": ["prettier --write", "git add"] 98 | }, 99 | "eslintConfig": { 100 | "parser": "babel-eslint", 101 | "extends": [ 102 | "airbnb", 103 | "plugin:flowtype/recommended", 104 | "plugin:jest/recommended", 105 | "prettier", 106 | "prettier/react", 107 | "prettier/flowtype" 108 | ], 109 | "plugins": ["prettier", "jest", "flowtype"], 110 | "env": { 111 | "jest/globals": true 112 | }, 113 | "rules": { 114 | "react/jsx-filename-extension": [ 115 | 1, 116 | { 117 | "extensions": [".js"] 118 | } 119 | ], 120 | "import/no-extraneous-dependencies": 0, 121 | "jsx-a11y/no-static-element-interactions": 0, 122 | "react/forbid-prop-types": 0, 123 | "react/require-default-props": 0, 124 | "prettier/prettier": "error" 125 | } 126 | }, 127 | "eslintIgnore": [ 128 | "node_modules", 129 | "coverage", 130 | "storybook-static", 131 | "lib", 132 | "flow-typed" 133 | ], 134 | "bugs": { 135 | "url": "https://github.com/evenchange4/react-progressive-bg-image/issues", 136 | "email": "evenchange4@gmail.com" 137 | }, 138 | "homepage": 139 | "https://github.com/evenchange4/react-progressive-bg-image#readme", 140 | "repository": { 141 | "type": "git", 142 | "url": "https://github.com/evenchange4/react-progressive-bg-image.git" 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["config:js-lib"] 3 | } 4 | -------------------------------------------------------------------------------- /setupTests.js: -------------------------------------------------------------------------------- 1 | import 'jest-styled-components'; 2 | import Enzyme from 'enzyme'; 3 | import Adapter from 'enzyme-adapter-react-16'; 4 | 5 | Enzyme.configure({ adapter: new Adapter() }); 6 | 7 | /** 8 | * Hint: mock for snapshot 9 | * ref: https://github.com/storybooks/storybook/issues/1011#issuecomment-322698049 10 | */ 11 | jest.mock('@storybook/addon-info', () => ({ 12 | withInfo: () => storyFn => storyFn, 13 | setDefaults: () => {}, 14 | })); 15 | -------------------------------------------------------------------------------- /src/Img.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import * as React from 'react'; 3 | import PropTypes from 'prop-types'; 4 | import omit from 'ramda/src/omit'; 5 | import styled from 'styled-components'; 6 | 7 | const omitProps = omit([ 8 | 'blur', 9 | 'transition', 10 | 'isCached', 11 | 'isLoaded', 12 | 'opacity', 13 | 'scale', 14 | 'placeholder', 15 | ]); 16 | 17 | const BaseComponent = ({ component, children, ...otherProps }) => 18 | React.createElement(component, omitProps(otherProps), children); 19 | BaseComponent.displayName = 'BaseComponent'; 20 | BaseComponent.propTypes = { 21 | component: PropTypes.oneOfType([PropTypes.func, PropTypes.string]).isRequired, 22 | children: PropTypes.node, // Remind: There is not a children for Input tag. 23 | }; 24 | const StyledImg = styled(BaseComponent)` 25 | height: 100%; 26 | background-repeat: no-repeat; 27 | transition: ${props => (props.isCached ? 'none' : props.transition)}; 28 | 29 | opacity: ${props => (props.isLoaded ? 1 : props.opacity)}; 30 | filter: ${props => (props.isLoaded ? 'none' : `blur(${props.blur}px)`)}; 31 | /* this is needed so Safari keeps sharp edges */ 32 | transform: ${props => (props.isLoaded ? 'none' : `scale(${props.scale})`)}; 33 | `; 34 | 35 | const Img = ({ 36 | component, 37 | image, 38 | style, 39 | ...otherProps 40 | }: { 41 | component: React.Node, 42 | image: string, 43 | style: Object, 44 | }) => ( 45 | 54 | ); 55 | 56 | Img.displayName = 'Img'; 57 | Img.propTypes = { 58 | // Internal 59 | image: PropTypes.string.isRequired, 60 | isLoaded: PropTypes.bool.isRequired, 61 | isCached: PropTypes.bool.isRequired, 62 | 63 | // props 64 | opacity: PropTypes.number.isRequired, 65 | blur: PropTypes.number.isRequired, 66 | scale: PropTypes.number.isRequired, 67 | className: PropTypes.string, 68 | transition: PropTypes.string, 69 | style: PropTypes.object, 70 | component: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), 71 | }; 72 | 73 | export default Img; 74 | -------------------------------------------------------------------------------- /src/ProgressiveImage.example.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import * as React from 'react'; 3 | import styled from 'styled-components'; 4 | import { storiesOf } from '@storybook/react'; 5 | import ProgressiveImage from '.'; 6 | import image1 from '../images/image1.jpg'; 7 | import image1X60 from '../images/image1X60.jpg'; 8 | import image2 from '../images/image2.jpg'; 9 | import image2X60 from '../images/image2X60.jpg'; 10 | 11 | storiesOf('ProgressiveImage', module) 12 | .addWithInfo( 13 | 'Inline-style', 14 | 'Based on styled-components.', 15 | () => ( 16 | 25 | ), 26 | { inline: true, propTables: [ProgressiveImage] }, 27 | ) 28 | .addWithInfo( 29 | 'With Styled-components', 30 | 'Overrided with `transition: filter 1s linear;`', 31 | () => { 32 | const CoverProgressiveImage = styled(ProgressiveImage)` 33 | height: 80vh; 34 | background-color: aliceblue; 35 | background-size: cover; 36 | background-attachment: fixed; 37 | background-position-y: 70%; 38 | background-position-x: center; 39 | `; 40 | return ; 41 | }, 42 | { inline: true, propTables: [ProgressiveImage] }, 43 | ) 44 | .addWithInfo( 45 | 'With other props', 46 | 'blur / opacity / scale / transition', 47 | () => ( 48 | 60 | ), 61 | { inline: true, propTables: [ProgressiveImage] }, 62 | ) 63 | .addWithInfo( 64 | 'With component props', 65 | 'Use tag with src', 66 | () => ( 67 | 77 | ), 78 | { inline: true, propTables: [ProgressiveImage] }, 79 | ); 80 | -------------------------------------------------------------------------------- /src/ProgressiveImage.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import PropTypes from 'prop-types'; 3 | import compose from 'recompose/compose'; 4 | import setDisplayName from 'recompose/setDisplayName'; 5 | import defaultProps from 'recompose/defaultProps'; 6 | import setPropTypes from 'recompose/setPropTypes'; 7 | import mapPropsStream from 'recompose/mapPropsStream'; 8 | import { Observable, type Observable as ObservableType } from 'rxjs/Observable'; 9 | import { async } from 'rxjs/scheduler/async'; 10 | import 'rxjs/add/operator/combineLatest'; 11 | import 'rxjs/add/operator/startWith'; 12 | import 'rxjs/add/operator/switchMapTo'; 13 | import 'rxjs/add/operator/delay'; 14 | import 'rxjs/add/operator/merge'; 15 | import 'rxjs/add/operator/filter'; 16 | import 'rxjs/add/operator/switchMap'; 17 | import 'rxjs/add/operator/mapTo'; 18 | import 'rxjs/add/operator/switch'; 19 | import 'rxjs/add/operator/map'; 20 | import 'rxjs/add/operator/distinctUntilChanged'; 21 | import 'rxjs/add/observable/from'; 22 | import 'rxjs/add/observable/of'; 23 | import 'rxjs/add/observable/merge'; 24 | import Img from './Img'; 25 | import loadImage, { type LoadImage } from './loadImage'; 26 | 27 | export const DELAY = 200; 28 | 29 | export function ownerPropsToChildProps( 30 | propStream: Observable<{ 31 | src: string, 32 | placeholder: string, 33 | opacity: number, 34 | blur: number, 35 | scale: number, 36 | component: React.Node, 37 | }>, // ownerProps 38 | load: LoadImage = loadImage, 39 | t: number = DELAY, // delay in milliseconds 40 | scheduler: any = async, // rx scheduler 41 | ): ObservableType<{ 42 | src: string, 43 | placeholder: string, 44 | opacity: number, 45 | blur: number, 46 | scale: number, 47 | component: React.Node, 48 | image: string, 49 | isCached: boolean, 50 | isLoaded: boolean, 51 | }> { 52 | const props$ = Observable.from(propStream); 53 | const placeholder$ = props$.map(e => e.placeholder); 54 | const imagePromise$ = props$ 55 | .map(e => e.src) 56 | .switchMap(load) 57 | .startWith({ src: '', isCached: false }); 58 | 59 | const src$ = imagePromise$.map(e => e.src).filter(src => !!src); 60 | const isCached$ = imagePromise$.map(e => e.isCached).distinctUntilChanged(); 61 | 62 | const isLoaded$ = Observable.merge( 63 | placeholder$.mapTo(Observable.of(false)), 64 | imagePromise$.map(({ isCached }) => 65 | Observable.of(true).delay(isCached ? 0 : t, scheduler), 66 | ), 67 | ) 68 | .switch() 69 | .startWith(false) 70 | .distinctUntilChanged(); 71 | 72 | const image$ = placeholder$.merge(src$).distinctUntilChanged(); 73 | 74 | return props$.combineLatest( 75 | image$, 76 | isCached$, 77 | isLoaded$, 78 | (props, image, isCached, isLoaded) => ({ 79 | ...props, 80 | image, 81 | isCached, 82 | isLoaded, 83 | }), 84 | ); 85 | } 86 | 87 | export default compose( 88 | setDisplayName('ProgressiveImage'), 89 | setPropTypes({ 90 | src: PropTypes.string.isRequired, 91 | placeholder: PropTypes.string.isRequired, 92 | opacity: PropTypes.number, 93 | blur: PropTypes.number, 94 | scale: PropTypes.number, 95 | component: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), 96 | }), 97 | defaultProps({ 98 | opacity: 0.5, 99 | blur: 20, 100 | scale: 1, 101 | transition: 'opacity 0.3s linear', 102 | component: 'div', 103 | }), 104 | mapPropsStream(ownerPropsToChildProps), 105 | )(Img); 106 | -------------------------------------------------------------------------------- /src/__tests__/Img.css.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { mount } from 'enzyme'; 3 | import Img from '../Img'; 4 | 5 | it('should render with isLoaded prop', () => { 6 | const component = ( 7 | 16 | ); 17 | 18 | expect(mount(component)).toMatchSnapshot(); 19 | }); 20 | 21 | it('should render without isLoaded prop', () => { 22 | const component = ( 23 | 32 | ); 33 | 34 | expect(mount(component)).toMatchSnapshot(); 35 | }); 36 | -------------------------------------------------------------------------------- /src/__tests__/Img.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { mount } from 'enzyme'; 3 | import Img from '../Img'; 4 | 5 | it('should render with isLoaded prop', () => { 6 | const component = ( 7 | 16 | ); 17 | 18 | expect(mount(component)).toMatchSnapshot(); 19 | }); 20 | 21 | it('should render without isLoaded prop', () => { 22 | const component = ( 23 | 32 | ); 33 | 34 | expect(mount(component)).toMatchSnapshot(); 35 | }); 36 | -------------------------------------------------------------------------------- /src/__tests__/ProgressiveImage.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Rx from 'rxjs'; 3 | import * as R from 'ramda'; 4 | import { mount } from 'enzyme'; 5 | import ProgressiveImage, { 6 | DELAY, 7 | ownerPropsToChildProps, 8 | } from '../ProgressiveImage'; 9 | 10 | const jestRxAssert = (actual, expected) => { 11 | const isEqual = R.equals(actual, expected); 12 | if (!isEqual) { 13 | console.error('Actual:', actual, '\n\n', 'Expected:', expected); // eslint-disable-line 14 | console.log(JSON.stringify(actual, null, 2)); // eslint-disable-line 15 | } 16 | expect(isEqual).toBe(true); 17 | }; 18 | 19 | it('should return DELAY constant', () => { 20 | expect(DELAY).toBe(200); 21 | }); 22 | 23 | it('should render ', done => { 24 | const wrapper = mount( 25 | , 26 | ); 27 | 28 | expect(wrapper).toMatchSnapshot('1. before resolving image'); 29 | 30 | setTimeout(() => { 31 | expect(wrapper).toMatchSnapshot('2. after resolving image'); 32 | done(); 33 | }, 250); 34 | }); 35 | 36 | it('should return correct props marble diagram without caching', () => { 37 | const scheduler = new Rx.TestScheduler(jestRxAssert); 38 | const sourceMarble = 'x---------|'; 39 | const resultMarble = '1----2--3-|'; 40 | const props = { placeholder: 'small.jpg', src: 'origin.jpg' }; 41 | const props$ = scheduler.createHotObservable(sourceMarble, { 42 | x: props, 43 | }); 44 | const mockImagePromise = src => 45 | Rx.Observable.of({ src, isCached: false }).delay(50, scheduler); 46 | const source = ownerPropsToChildProps( 47 | props$, 48 | mockImagePromise, 49 | 30, 50 | scheduler, 51 | ); 52 | const values = { 53 | 1: { ...props, image: 'small.jpg', isLoaded: false, isCached: false }, 54 | 2: { ...props, image: 'origin.jpg', isLoaded: false, isCached: false }, 55 | 3: { ...props, image: 'origin.jpg', isLoaded: true, isCached: false }, 56 | }; 57 | scheduler.expectObservable(source).toBe(resultMarble, values); 58 | scheduler.flush(); 59 | }); 60 | 61 | it('should return correct props marble diagram with caching', () => { 62 | const scheduler = new Rx.TestScheduler(jestRxAssert); 63 | const sourceMarble = 'x----------|'; 64 | const resultMarble = '1----(234)-|'; 65 | const props = { placeholder: 'small.jpg', src: 'origin.jpg' }; 66 | const props$ = scheduler.createHotObservable(sourceMarble, { 67 | x: props, 68 | }); 69 | const mockImagePromise = src => 70 | Rx.Observable.of({ src, isCached: true }).delay(50, scheduler); 71 | const source = ownerPropsToChildProps( 72 | props$, 73 | mockImagePromise, 74 | 30, 75 | scheduler, 76 | ); 77 | const values = { 78 | 1: { ...props, image: 'small.jpg', isLoaded: false, isCached: false }, 79 | 2: { ...props, image: 'origin.jpg', isLoaded: false, isCached: false }, 80 | 3: { ...props, image: 'origin.jpg', isLoaded: false, isCached: true }, 81 | 4: { ...props, image: 'origin.jpg', isLoaded: true, isCached: true }, 82 | }; 83 | scheduler.expectObservable(source).toBe(resultMarble, values); 84 | scheduler.flush(); 85 | }); 86 | 87 | it('should return correct props marble diagram with two image', () => { 88 | const scheduler = new Rx.TestScheduler(jestRxAssert); 89 | const sourceMarble = 'x--------y---------|'; 90 | const resultMarble = '1----2--3(abc)d--e-|'; 91 | const props1 = { placeholder: 'small.jpg', src: 'origin.jpg' }; 92 | const props2 = { placeholder: 'small2.jpg', src: 'origin2.jpg' }; 93 | const props$ = scheduler.createHotObservable(sourceMarble, { 94 | x: props1, 95 | y: props2, 96 | }); 97 | const mockImagePromise = src => 98 | Rx.Observable.of({ src, isCached: false }).delay(50, scheduler); 99 | const source = ownerPropsToChildProps( 100 | props$, 101 | mockImagePromise, 102 | 30, 103 | scheduler, 104 | ); 105 | const values = { 106 | 1: { ...props1, image: 'small.jpg', isLoaded: false, isCached: false }, 107 | 2: { ...props1, image: 'origin.jpg', isLoaded: false, isCached: false }, 108 | 3: { ...props1, image: 'origin.jpg', isLoaded: true, isCached: false }, 109 | a: { ...props2, image: 'origin.jpg', isLoaded: true, isCached: false }, 110 | b: { ...props2, image: 'small2.jpg', isLoaded: true, isCached: false }, 111 | c: { ...props2, image: 'small2.jpg', isLoaded: false, isCached: false }, 112 | d: { ...props2, image: 'origin2.jpg', isLoaded: false, isCached: false }, 113 | e: { ...props2, image: 'origin2.jpg', isLoaded: true, isCached: false }, 114 | }; 115 | scheduler.expectObservable(source).toBe(resultMarble, values); 116 | scheduler.flush(); 117 | }); 118 | 119 | it('should return correct props marble diagram with two image at loading time', () => { 120 | const scheduler = new Rx.TestScheduler(jestRxAssert); 121 | const sourceMarble = 'x-----y--------|'; 122 | const resultMarble = '1----2(ab)-c--d|'; 123 | const props1 = { placeholder: 'small.jpg', src: 'origin.jpg' }; 124 | const props2 = { placeholder: 'small2.jpg', src: 'origin2.jpg' }; 125 | const props$ = scheduler.createHotObservable(sourceMarble, { 126 | x: props1, 127 | y: props2, 128 | }); 129 | const mockImagePromise = src => 130 | Rx.Observable.of({ src, isCached: false }).delay(50, scheduler); 131 | const source = ownerPropsToChildProps( 132 | props$, 133 | mockImagePromise, 134 | 30, 135 | scheduler, 136 | ); 137 | const values = { 138 | 1: { ...props1, image: 'small.jpg', isLoaded: false, isCached: false }, 139 | 2: { ...props1, image: 'origin.jpg', isLoaded: false, isCached: false }, 140 | a: { ...props2, image: 'origin.jpg', isLoaded: false, isCached: false }, 141 | b: { ...props2, image: 'small2.jpg', isLoaded: false, isCached: false }, 142 | c: { ...props2, image: 'origin2.jpg', isLoaded: false, isCached: false }, 143 | d: { ...props2, image: 'origin2.jpg', isLoaded: true, isCached: false }, 144 | }; 145 | scheduler.expectObservable(source).toBe(resultMarble, values); 146 | scheduler.flush(); 147 | }); 148 | -------------------------------------------------------------------------------- /src/__tests__/__snapshots__/Img.css.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`should render with isLoaded prop 1`] = ` 4 | .c0 { 5 | height: 100%; 6 | background-repeat: no-repeat; 7 | -webkit-transition: none; 8 | transition: none; 9 | opacity: 1; 10 | -webkit-filter: none; 11 | filter: none; 12 | -webkit-transform: none; 13 | -ms-transform: none; 14 | transform: none; 15 | } 16 | 17 | 26 | 39 | 53 |
61 | 62 | 63 | 64 | `; 65 | 66 | exports[`should render without isLoaded prop 1`] = ` 67 | .c0 { 68 | height: 100%; 69 | background-repeat: no-repeat; 70 | opacity: 0.9; 71 | -webkit-filter: blur(2px); 72 | filter: blur(2px); 73 | -webkit-transform: scale(1); 74 | -ms-transform: scale(1); 75 | transform: scale(1); 76 | } 77 | 78 | 87 | 97 | 108 | 113 | 114 | 115 | 116 | `; 117 | -------------------------------------------------------------------------------- /src/__tests__/__snapshots__/Img.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`should render with isLoaded prop 1`] = ` 4 | .c0 { 5 | height: 100%; 6 | background-repeat: no-repeat; 7 | -webkit-transition: none; 8 | transition: none; 9 | opacity: 1; 10 | -webkit-filter: none; 11 | filter: none; 12 | -webkit-transform: none; 13 | -ms-transform: none; 14 | transform: none; 15 | } 16 | 17 | 26 | 39 | 53 |
61 | 62 | 63 | 64 | `; 65 | 66 | exports[`should render without isLoaded prop 1`] = ` 67 | .c0 { 68 | height: 100%; 69 | background-repeat: no-repeat; 70 | opacity: 0.9; 71 | -webkit-filter: blur(2px); 72 | filter: blur(2px); 73 | -webkit-transform: scale(1); 74 | -ms-transform: scale(1); 75 | transform: scale(1); 76 | } 77 | 78 | 87 | 97 | 108 | 113 | 114 | 115 | 116 | `; 117 | -------------------------------------------------------------------------------- /src/__tests__/__snapshots__/ProgressiveImage.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`should render : 1. before resolving image 1`] = ` 4 | .c0 { 5 | height: 100%; 6 | background-repeat: no-repeat; 7 | -webkit-transition: opacity 0.3s linear; 8 | transition: opacity 0.3s linear; 9 | opacity: 0.5; 10 | -webkit-filter: blur(20px); 11 | filter: blur(20px); 12 | -webkit-transform: scale(1); 13 | -ms-transform: scale(1); 14 | transform: scale(1); 15 | } 16 | 17 | 26 | 35 | 47 | 63 | 80 |
89 | 90 | 91 | 92 | 93 | 94 | `; 95 | 96 | exports[`should render : 2. after resolving image 1`] = ` 97 | .c0 { 98 | height: 100%; 99 | background-repeat: no-repeat; 100 | -webkit-transition: opacity 0.3s linear; 101 | transition: opacity 0.3s linear; 102 | opacity: 0.5; 103 | -webkit-filter: blur(20px); 104 | filter: blur(20px); 105 | -webkit-transform: scale(1); 106 | -ms-transform: scale(1); 107 | transform: scale(1); 108 | } 109 | 110 | 119 | 128 | 140 | 156 | 173 |
182 | 183 | 184 | 185 | 186 | 187 | `; 188 | -------------------------------------------------------------------------------- /src/__tests__/index.test.js: -------------------------------------------------------------------------------- 1 | import index from '../'; 2 | 3 | it('should return a function', () => { 4 | expect(typeof index).toBe('function'); 5 | }); 6 | -------------------------------------------------------------------------------- /src/__tests__/loadImage.test.js: -------------------------------------------------------------------------------- 1 | import loadImage from '../loadImage'; 2 | 3 | it('should return a function', () => { 4 | expect(typeof loadImage).toBe('function'); 5 | }); 6 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import ProgressiveImage from './ProgressiveImage'; 3 | 4 | export default ProgressiveImage; 5 | -------------------------------------------------------------------------------- /src/loadImage.js: -------------------------------------------------------------------------------- 1 | /* global Image */ 2 | /* eslint consistent-return: 0 */ 3 | // @flow 4 | 5 | const isCached = test => test.complete || test.width + test.height > 0; 6 | 7 | export type LoadImage = ( 8 | src: string, 9 | ) => Promise<{ src: string, isCached: boolean }>; 10 | 11 | const loadImage: LoadImage = src => 12 | new Promise((resolve, reject) => { 13 | const image = new Image(); 14 | image.src = src; 15 | // Remind: Check if cached 16 | if (isCached(image)) return resolve({ src, isCached: true }); 17 | 18 | image.onload = () => resolve({ src, isCached: false }); 19 | image.onerror = err => reject(err); 20 | }); 21 | 22 | export default loadImage; 23 | --------------------------------------------------------------------------------