├── .babelrc ├── .eslintrc.js ├── .gitignore ├── .prettierrc ├── README.md ├── components ├── App.js ├── Flex.js ├── Row.js └── parse-input.js ├── data-flow.png ├── example.gif ├── example ├── .buckconfig ├── .eslintrc.js ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .prettierrc.js ├── .watchmanconfig ├── App.js ├── __tests__ │ └── App-test.js ├── android │ ├── app │ │ ├── BUCK │ │ ├── build.gradle │ │ ├── build_defs.bzl │ │ ├── debug.keystore │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ ├── MainActivity.java │ │ │ │ └── MainApplication.java │ │ │ └── res │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── app.json ├── babel.config.js ├── index.js ├── ios │ ├── Podfile │ ├── Podfile.lock │ ├── example-tvOS │ │ └── Info.plist │ ├── example-tvOSTests │ │ └── Info.plist │ ├── example.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── example-tvOS.xcscheme │ │ │ └── example.xcscheme │ ├── example.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── example │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj │ │ │ └── LaunchScreen.xib │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── Info.plist │ │ └── main.m │ └── exampleTests │ │ ├── Info.plist │ │ └── exampleTests.m ├── metro.config.js ├── package-lock.json ├── package.json └── yarn.lock ├── example2.png ├── lib ├── README.md ├── bin │ ├── run │ └── run.cmd ├── package-lock.json ├── package.json ├── provider.js ├── src │ ├── commands │ │ └── get.js │ ├── index.js │ ├── out │ │ ├── 404.html │ │ ├── _next │ │ │ └── static │ │ │ │ ├── chunks │ │ │ │ ├── 0.js │ │ │ │ ├── 0.js.map │ │ │ │ ├── 1.js │ │ │ │ ├── 1.js.map │ │ │ │ ├── 7.2468c241937d6f6dad86.js │ │ │ │ ├── 7.4c893bd3b0f1f4d296a1.js │ │ │ │ ├── commons.0357b8d5badbe254cf4c.js │ │ │ │ ├── styles.047920665adbb91bf21b.js │ │ │ │ ├── styles.js │ │ │ │ └── styles.js.map │ │ │ │ ├── css │ │ │ │ ├── styles.575ca88f.chunk.css │ │ │ │ ├── styles.chunk.css │ │ │ │ └── styles.chunk.css.map │ │ │ │ ├── development │ │ │ │ ├── dll │ │ │ │ │ ├── dll_0b0bc16446b9b5ad32e8.js │ │ │ │ │ └── dll_0b0bc16446b9b5ad32e8.js.map │ │ │ │ └── pages │ │ │ │ │ ├── _app.js │ │ │ │ │ ├── _app.js.map │ │ │ │ │ ├── _error.js │ │ │ │ │ ├── _error.js.map │ │ │ │ │ ├── index.js │ │ │ │ │ └── index.js.map │ │ │ │ ├── faJo-xuBJVhNH3Kr2IaYs │ │ │ │ └── pages │ │ │ │ │ ├── _app.js │ │ │ │ │ ├── _error.js │ │ │ │ │ └── index.js │ │ │ │ ├── jFOPp7CnzUTdYIu6fy7jh │ │ │ │ └── pages │ │ │ │ │ ├── _app.js │ │ │ │ │ ├── _error.js │ │ │ │ │ └── index.js │ │ │ │ ├── otz7QlKl7wiY_2oXGkQ92 │ │ │ │ └── pages │ │ │ │ │ ├── _app.js │ │ │ │ │ ├── _error.js │ │ │ │ │ └── index.js │ │ │ │ ├── runtime │ │ │ │ ├── amp.js │ │ │ │ ├── amp.js.map │ │ │ │ ├── main-4f44046c163efd00d692.js │ │ │ │ ├── main.js │ │ │ │ ├── main.js.map │ │ │ │ ├── webpack-16e2a0cf47a7cc8e9de0.js │ │ │ │ ├── webpack-66dcf336b4d59ac9f64b.js │ │ │ │ ├── webpack.js │ │ │ │ └── webpack.js.map │ │ │ │ └── webpack │ │ │ │ ├── 02654a81564b96007b41.hot-update.json │ │ │ │ ├── 08fcba56993a699ce6f5.hot-update.json │ │ │ │ ├── 0b6f2e79370d5ff2a489.hot-update.json │ │ │ │ ├── 0f1826398b6d60e9b74c.hot-update.json │ │ │ │ ├── 1.02654a81564b96007b41.hot-update.js │ │ │ │ ├── 1.02654a81564b96007b41.hot-update.js.map │ │ │ │ ├── 1.0b6f2e79370d5ff2a489.hot-update.js │ │ │ │ ├── 1.0b6f2e79370d5ff2a489.hot-update.js.map │ │ │ │ ├── 1.1deffcce0c5afe6bef4b.hot-update.js │ │ │ │ ├── 1.1deffcce0c5afe6bef4b.hot-update.js.map │ │ │ │ ├── 1.1e52cdaa9a85d672500d.hot-update.js │ │ │ │ ├── 1.1e52cdaa9a85d672500d.hot-update.js.map │ │ │ │ ├── 1.21fed783fe759bf51d11.hot-update.js │ │ │ │ ├── 1.21fed783fe759bf51d11.hot-update.js.map │ │ │ │ ├── 1.23829e4e7eeb50cab2d6.hot-update.js │ │ │ │ ├── 1.23829e4e7eeb50cab2d6.hot-update.js.map │ │ │ │ ├── 1.3395b2ce497dd104a121.hot-update.js │ │ │ │ ├── 1.3395b2ce497dd104a121.hot-update.js.map │ │ │ │ ├── 1.33da84811c6939f7ac6c.hot-update.js │ │ │ │ ├── 1.33da84811c6939f7ac6c.hot-update.js.map │ │ │ │ ├── 1.42fe28cddaa9be39c351.hot-update.js │ │ │ │ ├── 1.42fe28cddaa9be39c351.hot-update.js.map │ │ │ │ ├── 1.568ede261edf8eafabd5.hot-update.js │ │ │ │ ├── 1.568ede261edf8eafabd5.hot-update.js.map │ │ │ │ ├── 1.5c436e9d59cff5e09766.hot-update.js │ │ │ │ ├── 1.5c436e9d59cff5e09766.hot-update.js.map │ │ │ │ ├── 1.616e5a121013bcde76ba.hot-update.js │ │ │ │ ├── 1.616e5a121013bcde76ba.hot-update.js.map │ │ │ │ ├── 1.65dea86f28985764f94b.hot-update.js │ │ │ │ ├── 1.65dea86f28985764f94b.hot-update.js.map │ │ │ │ ├── 1.6685b2d1cdb1d77a860f.hot-update.js │ │ │ │ ├── 1.6685b2d1cdb1d77a860f.hot-update.js.map │ │ │ │ ├── 1.6a6f1804fa284e636db5.hot-update.js │ │ │ │ ├── 1.6a6f1804fa284e636db5.hot-update.js.map │ │ │ │ ├── 1.7755ced386f8a6810890.hot-update.js │ │ │ │ ├── 1.7755ced386f8a6810890.hot-update.js.map │ │ │ │ ├── 1.780f8d1522f82f68cf94.hot-update.js │ │ │ │ ├── 1.780f8d1522f82f68cf94.hot-update.js.map │ │ │ │ ├── 1.7866967fb674034e2b06.hot-update.js │ │ │ │ ├── 1.7866967fb674034e2b06.hot-update.js.map │ │ │ │ ├── 1.85f3c4e271ad49abd12f.hot-update.js │ │ │ │ ├── 1.85f3c4e271ad49abd12f.hot-update.js.map │ │ │ │ ├── 1.95a6e8a591b119fbb637.hot-update.js │ │ │ │ ├── 1.95a6e8a591b119fbb637.hot-update.js.map │ │ │ │ ├── 1.9afab8942d831961cad9.hot-update.js │ │ │ │ ├── 1.9afab8942d831961cad9.hot-update.js.map │ │ │ │ ├── 1.9e89e0c63d9e16ead213.hot-update.js │ │ │ │ ├── 1.9e89e0c63d9e16ead213.hot-update.js.map │ │ │ │ ├── 1.a15415acd6976face82a.hot-update.js │ │ │ │ ├── 1.a15415acd6976face82a.hot-update.js.map │ │ │ │ ├── 1.a190b90158b135ad83b9.hot-update.js │ │ │ │ ├── 1.a190b90158b135ad83b9.hot-update.js.map │ │ │ │ ├── 1.a3a6baa7fa2e1b903021.hot-update.js │ │ │ │ ├── 1.a3a6baa7fa2e1b903021.hot-update.js.map │ │ │ │ ├── 1.a8f67ac1f285978e68f9.hot-update.js │ │ │ │ ├── 1.a8f67ac1f285978e68f9.hot-update.js.map │ │ │ │ ├── 1.aa12ca2134e979d64898.hot-update.js │ │ │ │ ├── 1.aa12ca2134e979d64898.hot-update.js.map │ │ │ │ ├── 1.ababb3263f694de5e6fe.hot-update.js │ │ │ │ ├── 1.ababb3263f694de5e6fe.hot-update.js.map │ │ │ │ ├── 1.b613f800872fed519876.hot-update.js │ │ │ │ ├── 1.b613f800872fed519876.hot-update.js.map │ │ │ │ ├── 1.b9b55e5b85ce34371374.hot-update.js │ │ │ │ ├── 1.b9b55e5b85ce34371374.hot-update.js.map │ │ │ │ ├── 1.bb577f19cd2d2d539529.hot-update.js │ │ │ │ ├── 1.bb577f19cd2d2d539529.hot-update.js.map │ │ │ │ ├── 1.c3628e0056f38df9e32b.hot-update.js │ │ │ │ ├── 1.c3628e0056f38df9e32b.hot-update.js.map │ │ │ │ ├── 1.c7c5aa72fd3f42bb5a54.hot-update.js │ │ │ │ ├── 1.c7c5aa72fd3f42bb5a54.hot-update.js.map │ │ │ │ ├── 1.cb3041fbb14d254b663c.hot-update.js │ │ │ │ ├── 1.cb3041fbb14d254b663c.hot-update.js.map │ │ │ │ ├── 1.cdf51446313f959f6a30.hot-update.js │ │ │ │ ├── 1.cdf51446313f959f6a30.hot-update.js.map │ │ │ │ ├── 1.ce7da9017a53d4e858b9.hot-update.js │ │ │ │ ├── 1.ce7da9017a53d4e858b9.hot-update.js.map │ │ │ │ ├── 1.cec2138c7f281f9e5271.hot-update.js │ │ │ │ ├── 1.cec2138c7f281f9e5271.hot-update.js.map │ │ │ │ ├── 1.db5039496243fbf355f5.hot-update.js │ │ │ │ ├── 1.db5039496243fbf355f5.hot-update.js.map │ │ │ │ ├── 1.df90ca6980e244fe59bc.hot-update.js │ │ │ │ ├── 1.df90ca6980e244fe59bc.hot-update.js.map │ │ │ │ ├── 1.e4bead25e40861bc0f3a.hot-update.js │ │ │ │ ├── 1.e4bead25e40861bc0f3a.hot-update.js.map │ │ │ │ ├── 1.e93bdf4d68b21dfba1a4.hot-update.js │ │ │ │ ├── 1.e93bdf4d68b21dfba1a4.hot-update.js.map │ │ │ │ ├── 1.ec717fb6969292dbd289.hot-update.js │ │ │ │ ├── 1.ec717fb6969292dbd289.hot-update.js.map │ │ │ │ ├── 1.f59105aeaf8fc8dd6e90.hot-update.js │ │ │ │ ├── 1.f59105aeaf8fc8dd6e90.hot-update.js.map │ │ │ │ ├── 1309a07e167cd90f16e2.hot-update.json │ │ │ │ ├── 1a028e58d02a1cbe8157.hot-update.json │ │ │ │ ├── 1deffcce0c5afe6bef4b.hot-update.json │ │ │ │ ├── 1e52cdaa9a85d672500d.hot-update.json │ │ │ │ ├── 21fed783fe759bf51d11.hot-update.json │ │ │ │ ├── 23829e4e7eeb50cab2d6.hot-update.json │ │ │ │ ├── 31b45cf8e50fee8a85d1.hot-update.json │ │ │ │ ├── 32642970c0399b0639d8.hot-update.json │ │ │ │ ├── 3395b2ce497dd104a121.hot-update.json │ │ │ │ ├── 33da84811c6939f7ac6c.hot-update.json │ │ │ │ ├── 39ba7e7518aa4766c230.hot-update.json │ │ │ │ ├── 3d5140a5a1a71cf12a6d.hot-update.json │ │ │ │ ├── 3fa16ba43acabb849d68.hot-update.json │ │ │ │ ├── 403e0939ec7300598fef.hot-update.json │ │ │ │ ├── 42fe28cddaa9be39c351.hot-update.json │ │ │ │ ├── 447a0338d5a663fb884e.hot-update.json │ │ │ │ ├── 555c28937e90eaa05854.hot-update.json │ │ │ │ ├── 568ede261edf8eafabd5.hot-update.json │ │ │ │ ├── 5c436e9d59cff5e09766.hot-update.json │ │ │ │ ├── 616e5a121013bcde76ba.hot-update.json │ │ │ │ ├── 65dea86f28985764f94b.hot-update.json │ │ │ │ ├── 6685b2d1cdb1d77a860f.hot-update.json │ │ │ │ ├── 6a6f1804fa284e636db5.hot-update.json │ │ │ │ ├── 7196ed18267d207e8355.hot-update.json │ │ │ │ ├── 7755ced386f8a6810890.hot-update.json │ │ │ │ ├── 780f8d1522f82f68cf94.hot-update.json │ │ │ │ ├── 7866967fb674034e2b06.hot-update.json │ │ │ │ ├── 7af78a5280f86a4532e8.hot-update.json │ │ │ │ ├── 827e5f13d4c98f2562cd.hot-update.json │ │ │ │ ├── 85f3c4e271ad49abd12f.hot-update.json │ │ │ │ ├── 88bd8fdfc58fdbb67ddf.hot-update.json │ │ │ │ ├── 893da24220ee44ad4d73.hot-update.json │ │ │ │ ├── 8d8ccd3d87dd205bcfb0.hot-update.json │ │ │ │ ├── 8e0604c61a829da4f782.hot-update.json │ │ │ │ ├── 95a6e8a591b119fbb637.hot-update.json │ │ │ │ ├── 9afab8942d831961cad9.hot-update.json │ │ │ │ ├── 9e89e0c63d9e16ead213.hot-update.json │ │ │ │ ├── 9e8a5e6cd11447efbd3c.hot-update.json │ │ │ │ ├── a092bf324d2adc3ef860.hot-update.json │ │ │ │ ├── a15415acd6976face82a.hot-update.json │ │ │ │ ├── a190b90158b135ad83b9.hot-update.json │ │ │ │ ├── a37eeb0f5ae590708f73.hot-update.json │ │ │ │ ├── a3a6baa7fa2e1b903021.hot-update.json │ │ │ │ ├── a8f67ac1f285978e68f9.hot-update.json │ │ │ │ ├── aa12ca2134e979d64898.hot-update.json │ │ │ │ ├── ababb3263f694de5e6fe.hot-update.json │ │ │ │ ├── af9b444eb7748826365d.hot-update.json │ │ │ │ ├── b613f800872fed519876.hot-update.json │ │ │ │ ├── b6b480a9d2692119befd.hot-update.json │ │ │ │ ├── b8c8468287f5a77004e2.hot-update.json │ │ │ │ ├── b9b55e5b85ce34371374.hot-update.json │ │ │ │ ├── bb577f19cd2d2d539529.hot-update.json │ │ │ │ ├── be53f6fc508de50bc4fc.hot-update.json │ │ │ │ ├── bebeb0c60940250d62f4.hot-update.json │ │ │ │ ├── c0c5103514ef8d180bc3.hot-update.json │ │ │ │ ├── c3628e0056f38df9e32b.hot-update.json │ │ │ │ ├── c42d6f5d7f5841f00fd6.hot-update.json │ │ │ │ ├── c7c5aa72fd3f42bb5a54.hot-update.json │ │ │ │ ├── cb3041fbb14d254b663c.hot-update.json │ │ │ │ ├── ccc4f1859c36d4d53f74.hot-update.json │ │ │ │ ├── cdf51446313f959f6a30.hot-update.json │ │ │ │ ├── ce7da9017a53d4e858b9.hot-update.json │ │ │ │ ├── cec2138c7f281f9e5271.hot-update.json │ │ │ │ ├── db5039496243fbf355f5.hot-update.json │ │ │ │ ├── df90ca6980e244fe59bc.hot-update.json │ │ │ │ ├── e4bead25e40861bc0f3a.hot-update.json │ │ │ │ ├── e93bdf4d68b21dfba1a4.hot-update.json │ │ │ │ ├── ec717fb6969292dbd289.hot-update.json │ │ │ │ ├── f59105aeaf8fc8dd6e90.hot-update.json │ │ │ │ ├── fdb4a33dc111461a2cd7.hot-update.json │ │ │ │ ├── styles.3d5140a5a1a71cf12a6d.hot-update.js │ │ │ │ ├── styles.3d5140a5a1a71cf12a6d.hot-update.js.map │ │ │ │ ├── styles.3fa16ba43acabb849d68.hot-update.js │ │ │ │ ├── styles.3fa16ba43acabb849d68.hot-update.js.map │ │ │ │ ├── styles.88bd8fdfc58fdbb67ddf.hot-update.js │ │ │ │ ├── styles.88bd8fdfc58fdbb67ddf.hot-update.js.map │ │ │ │ ├── styles.8e0604c61a829da4f782.hot-update.js │ │ │ │ ├── styles.8e0604c61a829da4f782.hot-update.js.map │ │ │ │ ├── styles.bebeb0c60940250d62f4.hot-update.js │ │ │ │ └── styles.bebeb0c60940250d62f4.hot-update.js.map │ │ ├── index.html │ │ └── static │ │ │ ├── add.svg │ │ │ ├── close.svg │ │ │ ├── menu.svg │ │ │ └── trash-bin.svg │ └── server.js └── start-server.js ├── next.config.js ├── package-lock.json ├── package.json ├── pages └── index.js ├── server.js ├── static ├── add.svg ├── close.svg ├── menu.svg └── trash-bin.svg ├── styles ├── 3rdParty │ ├── _bootstrap.scss │ └── _index.scss ├── _variables.scss └── styles.scss └── webpack ├── loaders.js ├── plugins.js ├── webpack.config.dev.js └── webpack.config.prod.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "development": { 4 | "presets": ["next/babel"] 5 | }, 6 | "production": { 7 | "presets": ["next/babel"] 8 | }, 9 | "test": { 10 | "presets": [["next/babel", { "preset-env": { "modules": "commonjs" } }]] 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'parser': 'babel-eslint', 3 | 'env': { 4 | 'browser': true, 5 | 'node': true, 6 | 'mocha': true 7 | }, 8 | 'extends': [ 9 | 'prettier', 10 | 'prettier/react', 11 | 'airbnb', 12 | 'plugin:react/recommended', 13 | ], 14 | 'plugins': [ 15 | 'import', 16 | 'prettier', 17 | 'react', 18 | ], 19 | 'rules': { 20 | 'linebreak-style': 0, 21 | 'react/sort-comp': 0, 22 | 'max-classes-per-file': 0, 23 | 'import/prefer-default-export': 0, 24 | 'consistent-return': 0, 25 | 'no-unused-expressions': 0, 26 | 'jsx-props-no-spreading': 0, 27 | 'class-methods-use-this': 0, 28 | 'eol-last': 0, 29 | 'react/prefer-stateless-function': 0, 30 | 'react/static-property-placement': 0, 31 | 'react/jsx-props-no-spreading': 0, 32 | 'no-use-before-define': 0, 33 | 'global-require': 0, 34 | 'arrow-body-style': 0, 35 | 'jsx-a11y/click-events-have-key-events': 0, // there are valid cases for this e.g. forms 36 | 'jsx-a11y/interactive-supports-focus': 0, // there are valid cases for this e.g. forms 37 | 'jsx-a11y/label-has-associated-control': 0, // rule seems buggy, doesn't understand some htmlFor cases 38 | 'jsx-a11y/label-has-for': 0, 39 | 'jsx-a11y/mouse-events-have-key-events': 0, 40 | 'jsx-a11y/no-noninteractive-element-interactions': 0, // rule seems buggy, doesn't understand some htmlFor cases 41 | 'max-len': 0, 42 | 'no-multi-assign': 0, 43 | 'no-nested-ternary': 0, 44 | 'no-param-reassign': 0, //Disabled to it not looking for global components 45 | 'no-plusplus': 0, 46 | 'no-restricted-globals': 'off', 47 | 'no-return-assign': 0, 48 | 'camelcase': 0, 49 | 'no-underscore-dangle': 0, 50 | 'object-curly-newline': 0, 51 | 'prefer-destructuring': 0, 52 | 'quote-props': 0, 53 | 'radix': 0, 54 | 'indent': [ 55 | "error", 4, 56 | { 57 | SwitchCase: 1, 58 | ignoredNodes: ['JSXElement', 'JSXElement > *', 'JSXAttribute', 'JSXIdentifier', 'JSXNamespacedName', 'JSXMemberExpression', 'JSXSpreadAttribute', 'JSXExpressionContainer', 'JSXOpeningElement', 'JSXClosingElement', 'JSXText', 'JSXEmptyExpression', 'JSXSpreadChild'], 59 | }, 60 | ], 61 | 'react/jsx-indent': ["error", 4], 62 | 'react/jsx-indent-props': ["error", 2], 63 | 'react/jsx-max-props-per-line': [1, 64 | { 65 | 'maximum': 3 66 | } 67 | ], 68 | 'jsx-a11y/anchor-is-valid': 0, 69 | 'react/destructuring-assignment': 0, 70 | 'react/forbid-prop-types': 0, 71 | 'react/jsx-filename-extension': 0, 72 | 'react/jsx-one-expression-per-line': 0, 73 | 'react/jsx-no-undef': 0, 74 | 'react/jsx-pascal-case': 0, 75 | 'react/jsx-tag-spacing': 0, //Disabled to it not looking for global components 76 | 'react/no-access-state-in-setstate': 0, 77 | 'react/no-array-index-key': 0, // there are valid cases for this where a key can not be determined 78 | 'react/no-direct-mutation-state': 0, 79 | 'react/no-find-dom-node': 0, 80 | 'react/no-multi-comp': 0, 81 | 'react/no-string-refs': 0, // todo: Disable for now, need to update probably for react 17 82 | 'react/no-unescaped-entities': 0, // there are valid cases for this where a key can not be determined 83 | 'react/require-default-props': 0, 84 | }, 85 | 'globals': { 86 | '_': true, 87 | '__DEV__': true, 88 | 'API': true, 89 | 'E2E': true, 90 | 'Utils': true, 91 | 'Constants': true, 92 | 'Strings': true, 93 | 'describe': true, 94 | 'Format': true, 95 | 'FormGroup': true, 96 | 'ga': true, 97 | 'Link': true, 98 | 'openAlert': true, 99 | 'openConfirm': true, 100 | 'mixpanel': true, 101 | 'Loader': true, 102 | 'Project': true, 103 | 'propTypes': true, 104 | 'Radio': true, 105 | 'React': true, 106 | 'ReactDOM': true, 107 | 'Row': true, 108 | 'pact': true, 109 | } 110 | }; 111 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .idea 3 | *.iml 4 | node_modules/ 5 | build/ 6 | *.log* 7 | npm-debug.log 8 | mobile/common-mobile/ 9 | e2e_screenshots 10 | reports/ 11 | reports/* 12 | reports/* 13 | tests/tokens.json 14 | .vscode 15 | mobile/fastlane/report.xml 16 | mobile/*.app.dSYM.zip 17 | pacts/* 18 | coverage/* 19 | .nyc_output/* 20 | .next 21 | dist 22 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "requirePragma": true, 4 | "printWidth": 120, 5 | "trailingComma": "all" 6 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # React Native Performance Monitor 4 | 5 | 6 | 7 | This project lets you see a realtime graph of render times within your React Native app. The purpose is for you to be able to create experiments (i.e. change markup and see how it affects render times). 8 | 9 | 10 | # Installation 11 | 12 | ``` 13 | npm i react-native-performance-monitor --save 14 | npx react-native-performance-monitor get 15 | ``` 16 | 17 | 18 | # Usage 19 | ``` 20 | import withPerformanceMonitor from 'react-native-performance-monitor/provider'; 21 | export default withPerformanceMonitor({WrappedComponent: YourScreen, id: 'Screen Name'}); 22 | ``` 23 | 24 | # An example 25 | 26 | Set your baseline at http://127.0.0.1:8125/ by clicking remount. Pause the recorder, and adjust your component with what you think will improve performance. 27 | 28 | 29 | Here's a before and after with this approach 30 | 31 | Baseline 32 | ``` 33 | 34 | {this.props.children} 35 | 36 | ``` 37 | 38 | Improved 39 | ``` 40 | 41 | {this.props.children} 42 | 43 | ``` 44 | 45 | With this before and after I observed the following within a large flat list. 46 | 47 | 48 | 49 | # Connecting to a real device 50 | 51 | In order to connect to a real device you will need to set the IP of your computer, for example: 52 | 53 | ``` 54 | export default withPerformanceMonitor({ WrappedComponent: AwesomeChat, id: 'AwesomeChat', ip: '192.168.1.10'}); 55 | ``` 56 | 57 | By default the server is listening on port 8125 for event updates and 8126 for websocket. 58 | If you need to configure the port, because you are tunneling your request or similar, and or disable the Websocket communication, you can do it like this: 59 | 60 | ``` 61 | export default withPerformanceMonitor({WrappedComponent: AwesomeChat, id: 'AwesomeChat', ip: '192.168.1.10', events: undefined, showLogs: undefined, port: 80, enableWS: false}); 62 | ``` 63 | 64 | # How it works 65 | 66 | The overall implementation is quite straight forward and simply involved passing the onRenderCallback values via a websocket server to finally render them in a fancy graph. 67 | 68 | There are 3 main components: 69 | 70 | - A [React Native component](https://github.com/BulletTrainHQ/react-native-performance-monitor/blob/master/lib/provider.js) that sends profile data to a server via REST and listens to messages (remount and forceUpdate) to trigger renders. 71 | - A [Web socket server](https://github.com/BulletTrainHQ/react-native-performance-monitor/blob/master/lib/src/server.js) responsible for passing messages between the graph and the react native component 72 | - A [Web application](https://github.com/BulletTrainHQ/react-native-performance-monitor/blob/master/components/App.js) that receives websocket values and renders them to a graph 73 | 74 | The following diagram is a brief explanation of the data flow: 75 | 76 | 77 | 78 | ## Contributing 79 | 80 | Please read [CONTRIBUTING.md](https://gist.github.com/kyle-ssg/c36a03aebe492e45cbd3eefb21cb0486) for details on our code of conduct, and the process for submitting pull requests to us. 81 | 82 | ## Useful links 83 | 84 | [Website](https://www.flagsmith.com/) 85 | 86 | [Documentation](https://docs.flagsmith.com/) 87 | 88 | -------------------------------------------------------------------------------- /components/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import FusionCharts from 'fusioncharts'; 3 | import Charts from 'fusioncharts/fusioncharts.charts'; 4 | import TimeSeries from 'fusioncharts/fusioncharts.overlappedcolumn2d'; 5 | import FusionTheme from 'fusioncharts/themes/fusioncharts.theme.fusion'; 6 | import ReactFC from 'react-fusioncharts/lib/ReactFC'; 7 | import _ from 'lodash'; 8 | import parseInput from './parse-input'; 9 | import Row from './Row'; 10 | 11 | document.addEventListener('click', function(e) { 12 | if (document.activeElement.toString() == '[object HTMLButtonElement]') { 13 | document.activeElement.blur(); 14 | } 15 | }); 16 | 17 | 18 | ReactFC.fcRoot(FusionCharts, Charts, TimeSeries, FusionTheme); 19 | const colors = [ 20 | '#5d62b5', '#29c3be', '#f2726f', 21 | '#4fb54f', '#c3bf39', '#f26394', 22 | '#5d62b5', '#29c3be', '#f2726f', 23 | '#4fb54f', '#c3bf39', '#f26394', 24 | '#5d62b5', '#29c3be', '#f2726f', 25 | '#4fb54f', '#c3bf39', '#f26394', 26 | '#5d62b5', '#29c3be', '#f2726f', 27 | '#4fb54f', '#c3bf39', '#f26394', 28 | ]; 29 | 30 | function ConvertToCSV(objArray) { 31 | var array = typeof objArray != 'object' ? JSON.parse(objArray) : objArray; 32 | var str = ''; 33 | 34 | for (var i = 0; i < array.length; i++) { 35 | var line = ''; 36 | for (var index in array[i]) { 37 | if (line != '') line += ',' 38 | 39 | line += array[i][index]; 40 | } 41 | 42 | str += line + '\r\n'; 43 | } 44 | 45 | return str; 46 | } 47 | 48 | const toCSV = function(state) { 49 | const datas = state.dataSource.dataset; 50 | let maxNum = 0; 51 | let maxIndex = -1; 52 | 53 | let arr = []; 54 | let rootObj = {}; 55 | 56 | _.each(datas,(d, i)=>{ 57 | rootObj[i] = d.seriesname; 58 | if (d.data.length > maxNum) { 59 | maxNum = d.data.length; 60 | maxIndex = i; 61 | } 62 | }) 63 | if (maxIndex === -1) return 64 | arr.push(rootObj) 65 | _.each(datas[maxIndex].data, (v, i)=>{ // row 66 | let obj = {}; 67 | _.each(datas,(data)=>{ // column 68 | obj[data.seriesname] = data.data[i] && data.data[i].value || ""; 69 | }) 70 | arr.push(obj); 71 | }) 72 | const csv = "data:text/csv;charset=utf-8," + ConvertToCSV(arr); 73 | var encodedUri = encodeURI(csv); 74 | var link = document.createElement("a"); 75 | link.setAttribute("href", encodedUri); 76 | link.setAttribute("download", "performance_tests.csv"); 77 | document.body.appendChild(link); // Required for FF 78 | link.click(); // This will download the data file named "my_data.csv". 79 | } 80 | 81 | const defaultState = { 82 | dataSource: { 83 | chart: { 84 | caption: 'React Native Render Times', 85 | subcaption: 'Performance experiments', 86 | yaxisname: 'Render time (ms)', 87 | drawcrossline: '1', 88 | theme: 'fusion', 89 | showvalues: '0', 90 | 'palettecolors': colors.map(c => c.replace('#', '')).join(','), 91 | }, 92 | categories: [ 93 | { 94 | category: [], 95 | }, 96 | ], 97 | dataset: [ 98 | { 99 | seriesname: 'Baseline test', 100 | data: [], 101 | }, 102 | ], 103 | }, 104 | }; 105 | export default class extends React.Component { 106 | constructor(props) { 107 | super(props); 108 | this.state = { 109 | ..._.cloneDeep(defaultState), 110 | type: 'overlappedcolumn2d', 111 | }; 112 | } 113 | 114 | componentDidMount() { 115 | this.socket = new WebSocket('ws://localhost:8126'); 116 | this.socket.onopen = function(event) { 117 | console.log('Connected'); 118 | }; 119 | 120 | this.socket.onmessage = (event) => { 121 | try { 122 | if (!this.state.paused) { 123 | this.addItem(JSON.parse(event.data).value); 124 | } 125 | } catch (e) { 126 | } 127 | }; 128 | } 129 | 130 | sendRemount = () => { 131 | this.socket.send('remount'); 132 | }; 133 | 134 | sendForceUpdate = () => { 135 | this.socket.send('forceUpdate'); 136 | }; 137 | 138 | addItem = (value = Math.random()) => { 139 | if (!this.state.dataSource.dataset.length) { 140 | this.addSeries(); 141 | } 142 | if (this.state.dataSource.categories[0].category.length === this.state.dataSource.dataset[this.state.dataSource.dataset.length - 1].data.length) { 143 | this.addCategory(); 144 | } 145 | this.state.dataSource.dataset[this.state.dataSource.dataset.length - 1].data.push({ 146 | value, 147 | }); 148 | const averages = []; 149 | _.each(this.state.dataSource.dataset, (dataSet) => { 150 | let total = 0; 151 | _.each(dataSet.data, (item) => { 152 | total += item.value; 153 | }); 154 | let avg = total / dataSet.data.length; 155 | if (isNaN(avg)) { 156 | avg = 0; 157 | } 158 | averages.push(avg); 159 | }); 160 | this.state.averages = averages; 161 | this.state.dataSource.trendlines = averages.map((v, i) => { 162 | return { 163 | 'line': [{ 164 | 'color': colors[i], 165 | 'thickness': '4', 166 | startValue: v, 167 | 'alpha': '50', 168 | }], 169 | }; 170 | }).concat([{ 171 | line: [{ 172 | 'color': '#ff0000', 173 | 'thickness': '2', 174 | startValue: 16.67, 175 | 'alpha': '100', 176 | }], 177 | }]); 178 | this.forceUpdate(); 179 | }; 180 | 181 | addCategory = () => { 182 | this.state.dataSource.categories[0].category.push({ 183 | label: `Test${this.state.dataSource.categories[0].category.length + 1}`, 184 | }); 185 | }; 186 | 187 | addSeries = () => { 188 | this.state.dataSource.dataset.push({ 189 | seriesname: `Variant ${this.state.dataSource.dataset.length + 1}`, 190 | data: [], 191 | }); 192 | this.forceUpdate(); 193 | }; 194 | 195 | setVariantName = (i, e) => { 196 | this.state.dataSource.dataset[i].seriesname = parseInput(e); 197 | this.forceUpdate(); 198 | }; 199 | 200 | removeSeries = (i) => { 201 | this.state.dataSource.dataset.splice(i, 1); 202 | this.forceUpdate(); 203 | }; 204 | 205 | clear = () => { 206 | this.setState(_.cloneDeep(defaultState)); 207 | }; 208 | 209 | toggle = () => this.setState({ hideMenu: !this.state.hideMenu }); 210 | 211 | pauseResume = () => this.setState({ paused: !this.state.paused }); 212 | 213 | 214 | repeat = (cb, times) => { 215 | const rep = function(e, currentTimes = 0) { 216 | if (currentTimes < times) { 217 | cb(); 218 | setTimeout(() => { 219 | rep(null, currentTimes + 1); 220 | }, 200); 221 | } 222 | }; 223 | return rep; 224 | }; 225 | 226 | download = () => { 227 | toCSV(this.state); 228 | } 229 | 230 | render() { 231 | const datasets = this.state.dataSource.dataset; 232 | return ( 233 |
234 |
235 |
236 |
237 | {datasets && datasets.map((d, i) => ( 238 |
239 | 240 | this.setVariantName(i, e)} type="text" 242 | value={d.seriesname} 243 | /> 244 | 245 | {(this.state.averages && this.state.averages[i] ? `~${this.state.averages[i]}ms` : "-")} 246 | 247 | 250 | 251 |
252 | ))} 253 |
254 | 257 |
258 |
259 | 262 |
263 |
264 |
265 | 270 | 275 | 280 |
281 |
282 | 287 | 292 | 297 |
298 |
299 | 300 |
301 |
302 | 303 |
304 | 305 |
306 |
307 |
308 | 309 | 310 | 311 |
312 |
313 | 320 |
321 |
322 |
323 |
324 | ); 325 | } 326 | } 327 | -------------------------------------------------------------------------------- /components/Flex.js: -------------------------------------------------------------------------------- 1 | // propTypes: value: OptionalNumber 2 | import React from 'react'; 3 | import propTypes from 'prop-types'; 4 | 5 | const cn = require('classnames'); 6 | 7 | const Flex = ({ className, children, value, ...rest }) => ( 8 |
14 | {children} 15 |
16 | ); 17 | 18 | Flex.displayName = 'Flex'; 19 | 20 | Flex.defaultProps = { 21 | value: 1, 22 | }; 23 | 24 | Flex.propTypes = { 25 | className: propTypes.string, 26 | value: propTypes.number, 27 | children: propTypes.node, 28 | style: propTypes.any, 29 | }; 30 | 31 | global.Flex = Flex; 32 | -------------------------------------------------------------------------------- /components/Row.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by kylejohnson on 24/07/2016. 3 | */ 4 | import cn from 'classnames'; 5 | import React from 'react'; 6 | import propTypes from 'prop-types'; 7 | 8 | const Row = ({ children, className, space, ...rest }) => ( 9 |
16 | {children} 17 |
18 | ); 19 | 20 | Row.displayName = 'Row'; 21 | 22 | Row.defaultProps = { 23 | children: null, 24 | className: '', 25 | space: false, 26 | style: null, 27 | }; 28 | 29 | Row.propTypes = { 30 | className: propTypes.string, 31 | space: propTypes.bool, 32 | children: propTypes.node, 33 | style: propTypes.any, 34 | }; 35 | 36 | global.Row = Row; 37 | export default Row; 38 | -------------------------------------------------------------------------------- /components/parse-input.js: -------------------------------------------------------------------------------- 1 | export default function (e) { // safe attempt to parse form value 2 | if (!e) { 3 | return e; 4 | } 5 | if (typeof e === 'string') { 6 | return e; 7 | } 8 | 9 | const target = e || e.target; 10 | 11 | if (target.getAttribute) { 12 | return target.type === 'checkbox' || target.type === 'radio' ? target.getAttribute('checked') 13 | : target.getAttribute('data-value') || target.getAttribute('value'); 14 | } 15 | 16 | if (e && e.target && (e.target.type === 'checkbox' || e.target.type === 'radio')) { 17 | return e.target.checked; 18 | } 19 | 20 | if (target.type && target.type === 'span' && e.target.textContent) { 21 | return e.target.textContent; 22 | } 23 | return e && e.target ? e.target.value : e; 24 | } 25 | -------------------------------------------------------------------------------- /data-flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flagsmith/react-native-performance-monitor/cc73c48ea82198f7b44cb651d650fb7c738b0e5f/data-flow.png -------------------------------------------------------------------------------- /example.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flagsmith/react-native-performance-monitor/cc73c48ea82198f7b44cb651d650fb7c738b0e5f/example.gif -------------------------------------------------------------------------------- /example/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /example/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | }; 5 | -------------------------------------------------------------------------------- /example/.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore polyfills 9 | node_modules/react-native/Libraries/polyfills/.* 10 | 11 | ; These should not be required directly 12 | ; require from fbjs/lib instead: require('fbjs/lib/warning') 13 | node_modules/warning/.* 14 | 15 | ; Flow doesn't support platforms 16 | .*/Libraries/Utilities/LoadingView.js 17 | 18 | [untyped] 19 | .*/node_modules/@react-native-community/cli/.*/.* 20 | 21 | [include] 22 | 23 | [libs] 24 | node_modules/react-native/Libraries/react-native/react-native-interface.js 25 | node_modules/react-native/flow/ 26 | 27 | [options] 28 | emoji=true 29 | 30 | esproposal.optional_chaining=enable 31 | esproposal.nullish_coalescing=enable 32 | 33 | module.file_ext=.js 34 | module.file_ext=.json 35 | module.file_ext=.ios.js 36 | 37 | munge_underscores=true 38 | 39 | module.name_mapper='^react-native$' -> '/node_modules/react-native/Libraries/react-native/react-native-implementation' 40 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1' 41 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub' 42 | 43 | suppress_type=$FlowIssue 44 | suppress_type=$FlowFixMe 45 | suppress_type=$FlowFixMeProps 46 | suppress_type=$FlowFixMeState 47 | 48 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\) 49 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+ 50 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 51 | 52 | [lints] 53 | sketchy-null-number=warn 54 | sketchy-null-mixed=warn 55 | sketchy-number=warn 56 | untyped-type-import=warn 57 | nonstrict-import=warn 58 | deprecated-type=warn 59 | unsafe-getters-setters=warn 60 | inexact-spread=warn 61 | unnecessary-invariant=warn 62 | signature-verification-failure=warn 63 | deprecated-utility=error 64 | 65 | [strict] 66 | deprecated-type 67 | nonstrict-import 68 | sketchy-null 69 | unclear-type 70 | unsafe-getters-setters 71 | untyped-import 72 | untyped-type-import 73 | 74 | [version] 75 | ^0.105.0 76 | -------------------------------------------------------------------------------- /example/.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | 24 | # Android/IntelliJ 25 | # 26 | build/ 27 | .idea 28 | .gradle 29 | local.properties 30 | *.iml 31 | 32 | # node.js 33 | # 34 | node_modules/ 35 | npm-debug.log 36 | yarn-error.log 37 | 38 | # BUCK 39 | buck-out/ 40 | \.buckd/ 41 | *.keystore 42 | !debug.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | 55 | # Bundle artifact 56 | *.jsbundle 57 | 58 | # CocoaPods 59 | /ios/Pods/ 60 | -------------------------------------------------------------------------------- /example/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: false, 3 | jsxBracketSameLine: true, 4 | singleQuote: true, 5 | trailingComma: 'all', 6 | }; 7 | -------------------------------------------------------------------------------- /example/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /example/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PureComponent } from 'react'; 2 | import propTypes from 'prop-types'; 3 | import withPerformance from 'react-native-performance-monitor/provider'; 4 | import { 5 | SafeAreaView, 6 | FlatList, 7 | View, 8 | Text, 9 | StyleSheet, 10 | } from 'react-native'; 11 | 12 | const data = Array.from(Array(10000).keys()) 13 | .map((key) => ({ key: key + '' })); 14 | 15 | class MyItem extends PureComponent { 16 | static displayName = 'Text'; 17 | 18 | static propTypes = { 19 | style: propTypes.any, 20 | children: propTypes.node, 21 | }; 22 | 23 | render() { 24 | const { 25 | props: { textStyle, children }, 26 | } = this; 27 | return ( 28 | 29 | 30 | {children} 31 | 32 | 33 | ); 34 | } 35 | } 36 | 37 | const renderItem = (res) => ( 38 | 41 | react-native-performance-monitor line {res.item.key} 42 | 43 | ); 44 | 45 | const App = () => { 46 | return ( 47 | <> 48 | 49 | 53 | 54 | 55 | ); 56 | }; 57 | 58 | const styles = StyleSheet.create({ 59 | container: { 60 | flex: 1, 61 | padding: 20, 62 | }, 63 | itemContainer: { 64 | height: 50, 65 | justifyContent: 'center', 66 | alignItems: 'center' 67 | }, 68 | text: { 69 | color:'#333' 70 | } 71 | }); 72 | 73 | export default withPerformance({WrappedComponent: App, _id: 'App'}); 74 | -------------------------------------------------------------------------------- /example/__tests__/App-test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../App'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /example/android/app/BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") 12 | 13 | lib_deps = [] 14 | 15 | create_aar_targets(glob(["libs/*.aar"])) 16 | 17 | create_jar_targets(glob(["libs/*.jar"])) 18 | 19 | android_library( 20 | name = "all-libs", 21 | exported_deps = lib_deps, 22 | ) 23 | 24 | android_library( 25 | name = "app-code", 26 | srcs = glob([ 27 | "src/main/java/**/*.java", 28 | ]), 29 | deps = [ 30 | ":all-libs", 31 | ":build_config", 32 | ":res", 33 | ], 34 | ) 35 | 36 | android_build_config( 37 | name = "build_config", 38 | package = "com.example", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "com.example", 44 | res = "src/main/res", 45 | ) 46 | 47 | android_binary( 48 | name = "app", 49 | keystore = "//android/keystores:debug", 50 | manifest = "src/main/AndroidManifest.xml", 51 | package_type = "debug", 52 | deps = [ 53 | ":app-code", 54 | ], 55 | ) 56 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | import com.android.build.OutputFile 4 | 5 | /** 6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 7 | * and bundleReleaseJsAndAssets). 8 | * These basically call `react-native bundle` with the correct arguments during the Android build 9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 10 | * bundle directly from the development server. Below you can see all the possible configurations 11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 12 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 13 | * 14 | * project.ext.react = [ 15 | * // the name of the generated asset file containing your JS bundle 16 | * bundleAssetName: "index.android.bundle", 17 | * 18 | * // the entry file for bundle generation 19 | * entryFile: "index.android.js", 20 | * 21 | * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format 22 | * bundleCommand: "ram-bundle", 23 | * 24 | * // whether to bundle JS and assets in debug mode 25 | * bundleInDebug: false, 26 | * 27 | * // whether to bundle JS and assets in release mode 28 | * bundleInRelease: true, 29 | * 30 | * // whether to bundle JS and assets in another build variant (if configured). 31 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 32 | * // The configuration property can be in the following formats 33 | * // 'bundleIn${productFlavor}${buildType}' 34 | * // 'bundleIn${buildType}' 35 | * // bundleInFreeDebug: true, 36 | * // bundleInPaidRelease: true, 37 | * // bundleInBeta: true, 38 | * 39 | * // whether to disable dev mode in custom build variants (by default only disabled in release) 40 | * // for example: to disable dev mode in the staging build type (if configured) 41 | * devDisabledInStaging: true, 42 | * // The configuration property can be in the following formats 43 | * // 'devDisabledIn${productFlavor}${buildType}' 44 | * // 'devDisabledIn${buildType}' 45 | * 46 | * // the root of your project, i.e. where "package.json" lives 47 | * root: "../../", 48 | * 49 | * // where to put the JS bundle asset in debug mode 50 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 51 | * 52 | * // where to put the JS bundle asset in release mode 53 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 54 | * 55 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 56 | * // require('./image.png')), in debug mode 57 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 58 | * 59 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 60 | * // require('./image.png')), in release mode 61 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 62 | * 63 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 64 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 65 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 66 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 67 | * // for example, you might want to remove it from here. 68 | * inputExcludes: ["android/**", "ios/**"], 69 | * 70 | * // override which node gets called and with what additional arguments 71 | * nodeExecutableAndArgs: ["node"], 72 | * 73 | * // supply additional arguments to the packager 74 | * extraPackagerArgs: [] 75 | * ] 76 | */ 77 | 78 | project.ext.react = [ 79 | entryFile: "index.js", 80 | enableHermes: false, // clean and rebuild if changing 81 | ] 82 | 83 | apply from: "../../node_modules/react-native/react.gradle" 84 | 85 | /** 86 | * Set this to true to create two separate APKs instead of one: 87 | * - An APK that only works on ARM devices 88 | * - An APK that only works on x86 devices 89 | * The advantage is the size of the APK is reduced by about 4MB. 90 | * Upload all the APKs to the Play Store and people will download 91 | * the correct one based on the CPU architecture of their device. 92 | */ 93 | def enableSeparateBuildPerCPUArchitecture = false 94 | 95 | /** 96 | * Run Proguard to shrink the Java bytecode in release builds. 97 | */ 98 | def enableProguardInReleaseBuilds = false 99 | 100 | /** 101 | * The preferred build flavor of JavaScriptCore. 102 | * 103 | * For example, to use the international variant, you can use: 104 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` 105 | * 106 | * The international variant includes ICU i18n library and necessary data 107 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that 108 | * give correct results when using with locales other than en-US. Note that 109 | * this variant is about 6MiB larger per architecture than default. 110 | */ 111 | def jscFlavor = 'org.webkit:android-jsc:+' 112 | 113 | /** 114 | * Whether to enable the Hermes VM. 115 | * 116 | * This should be set on project.ext.react and mirrored here. If it is not set 117 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode 118 | * and the benefits of using Hermes will therefore be sharply reduced. 119 | */ 120 | def enableHermes = project.ext.react.get("enableHermes", false); 121 | 122 | android { 123 | compileSdkVersion rootProject.ext.compileSdkVersion 124 | 125 | compileOptions { 126 | sourceCompatibility JavaVersion.VERSION_1_8 127 | targetCompatibility JavaVersion.VERSION_1_8 128 | } 129 | 130 | defaultConfig { 131 | applicationId "com.example" 132 | minSdkVersion rootProject.ext.minSdkVersion 133 | targetSdkVersion rootProject.ext.targetSdkVersion 134 | versionCode 1 135 | versionName "1.0" 136 | } 137 | splits { 138 | abi { 139 | reset() 140 | enable enableSeparateBuildPerCPUArchitecture 141 | universalApk false // If true, also generate a universal APK 142 | include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" 143 | } 144 | } 145 | signingConfigs { 146 | debug { 147 | storeFile file('debug.keystore') 148 | storePassword 'android' 149 | keyAlias 'androiddebugkey' 150 | keyPassword 'android' 151 | } 152 | } 153 | buildTypes { 154 | debug { 155 | signingConfig signingConfigs.debug 156 | } 157 | release { 158 | // Caution! In production, you need to generate your own keystore file. 159 | // see https://facebook.github.io/react-native/docs/signed-apk-android. 160 | signingConfig signingConfigs.debug 161 | minifyEnabled enableProguardInReleaseBuilds 162 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 163 | } 164 | } 165 | // applicationVariants are e.g. debug, release 166 | applicationVariants.all { variant -> 167 | variant.outputs.each { output -> 168 | // For each separate APK per architecture, set a unique version code as described here: 169 | // https://developer.android.com/studio/build/configure-apk-splits.html 170 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] 171 | def abi = output.getFilter(OutputFile.ABI) 172 | if (abi != null) { // null for the universal-debug, universal-release variants 173 | output.versionCodeOverride = 174 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 175 | } 176 | 177 | } 178 | } 179 | } 180 | 181 | dependencies { 182 | implementation fileTree(dir: "libs", include: ["*.jar"]) 183 | implementation "com.facebook.react:react-native:+" // From node_modules 184 | 185 | if (enableHermes) { 186 | def hermesPath = "../../node_modules/hermes-engine/android/"; 187 | debugImplementation files(hermesPath + "hermes-debug.aar") 188 | releaseImplementation files(hermesPath + "hermes-release.aar") 189 | } else { 190 | implementation jscFlavor 191 | } 192 | } 193 | 194 | // Run this once to be able to run the application with BUCK 195 | // puts all compile dependencies into folder libs for BUCK to use 196 | task copyDownloadableDepsToLibs(type: Copy) { 197 | from configurations.compile 198 | into 'libs' 199 | } 200 | 201 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) 202 | -------------------------------------------------------------------------------- /example/android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /example/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flagsmith/react-native-performance-monitor/cc73c48ea82198f7b44cb651d650fb7c738b0e5f/example/android/app/debug.keystore -------------------------------------------------------------------------------- /example/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/example/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. This is used to schedule 9 | * rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "example"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/example/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import com.facebook.react.PackageList; 6 | import com.facebook.react.ReactApplication; 7 | import com.facebook.react.ReactNativeHost; 8 | import com.facebook.react.ReactPackage; 9 | import com.facebook.soloader.SoLoader; 10 | import java.lang.reflect.InvocationTargetException; 11 | import java.util.List; 12 | 13 | public class MainApplication extends Application implements ReactApplication { 14 | 15 | private final ReactNativeHost mReactNativeHost = 16 | new ReactNativeHost(this) { 17 | @Override 18 | public boolean getUseDeveloperSupport() { 19 | return BuildConfig.DEBUG; 20 | } 21 | 22 | @Override 23 | protected List getPackages() { 24 | @SuppressWarnings("UnnecessaryLocalVariable") 25 | List packages = new PackageList(this).getPackages(); 26 | // Packages that cannot be autolinked yet can be added manually here, for example: 27 | // packages.add(new MyReactNativePackage()); 28 | return packages; 29 | } 30 | 31 | @Override 32 | protected String getJSMainModuleName() { 33 | return "index"; 34 | } 35 | }; 36 | 37 | @Override 38 | public ReactNativeHost getReactNativeHost() { 39 | return mReactNativeHost; 40 | } 41 | 42 | @Override 43 | public void onCreate() { 44 | super.onCreate(); 45 | SoLoader.init(this, /* native exopackage */ false); 46 | initializeFlipper(this); // Remove this line if you don't want Flipper enabled 47 | } 48 | 49 | /** 50 | * Loads Flipper in React Native templates. 51 | * 52 | * @param context 53 | */ 54 | private static void initializeFlipper(Context context) { 55 | if (BuildConfig.DEBUG) { 56 | try { 57 | /* 58 | We use reflection here to pick up the class that initializes Flipper, 59 | since Flipper library is not available in release mode 60 | */ 61 | Class aClass = Class.forName("com.facebook.flipper.ReactNativeFlipper"); 62 | aClass.getMethod("initializeFlipper", Context.class).invoke(null, context); 63 | } catch (ClassNotFoundException e) { 64 | e.printStackTrace(); 65 | } catch (NoSuchMethodException e) { 66 | e.printStackTrace(); 67 | } catch (IllegalAccessException e) { 68 | e.printStackTrace(); 69 | } catch (InvocationTargetException e) { 70 | e.printStackTrace(); 71 | } 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flagsmith/react-native-performance-monitor/cc73c48ea82198f7b44cb651d650fb7c738b0e5f/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flagsmith/react-native-performance-monitor/cc73c48ea82198f7b44cb651d650fb7c738b0e5f/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flagsmith/react-native-performance-monitor/cc73c48ea82198f7b44cb651d650fb7c738b0e5f/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flagsmith/react-native-performance-monitor/cc73c48ea82198f7b44cb651d650fb7c738b0e5f/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flagsmith/react-native-performance-monitor/cc73c48ea82198f7b44cb651d650fb7c738b0e5f/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flagsmith/react-native-performance-monitor/cc73c48ea82198f7b44cb651d650fb7c738b0e5f/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flagsmith/react-native-performance-monitor/cc73c48ea82198f7b44cb651d650fb7c738b0e5f/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flagsmith/react-native-performance-monitor/cc73c48ea82198f7b44cb651d650fb7c738b0e5f/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flagsmith/react-native-performance-monitor/cc73c48ea82198f7b44cb651d650fb7c738b0e5f/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flagsmith/react-native-performance-monitor/cc73c48ea82198f7b44cb651d650fb7c738b0e5f/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | example 3 | 4 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "28.0.3" 6 | minSdkVersion = 16 7 | compileSdkVersion = 28 8 | targetSdkVersion = 28 9 | } 10 | repositories { 11 | google() 12 | jcenter() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle:3.4.2") 16 | 17 | // NOTE: Do not place your application dependencies here; they belong 18 | // in the individual module build.gradle files 19 | } 20 | } 21 | 22 | allprojects { 23 | repositories { 24 | mavenLocal() 25 | maven { 26 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 27 | url("$rootDir/../node_modules/react-native/android") 28 | } 29 | maven { 30 | // Android JSC is installed from npm 31 | url("$rootDir/../node_modules/jsc-android/dist") 32 | } 33 | 34 | google() 35 | jcenter() 36 | maven { url 'https://jitpack.io' } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useAndroidX=true 21 | android.enableJetifier=true 22 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flagsmith/react-native-performance-monitor/cc73c48ea82198f7b44cb651d650fb7c738b0e5f/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /example/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 4 | # Copyright 2015 the original author or authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | ## 21 | ## Gradle start up script for UN*X 22 | ## 23 | ############################################################################## 24 | 25 | # Attempt to set APP_HOME 26 | # Resolve links: $0 may be a link 27 | PRG="$0" 28 | # Need this for relative symlinks. 29 | while [ -h "$PRG" ] ; do 30 | ls=`ls -ld "$PRG"` 31 | link=`expr "$ls" : '.*-> \(.*\)$'` 32 | if expr "$link" : '/.*' > /dev/null; then 33 | PRG="$link" 34 | else 35 | PRG=`dirname "$PRG"`"/$link" 36 | fi 37 | done 38 | SAVED="`pwd`" 39 | cd "`dirname \"$PRG\"`/" >/dev/null 40 | APP_HOME="`pwd -P`" 41 | cd "$SAVED" >/dev/null 42 | 43 | APP_NAME="Gradle" 44 | APP_BASE_NAME=`basename "$0"` 45 | 46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 48 | 49 | # Use the maximum available, or set MAX_FD != -1 to use that value. 50 | MAX_FD="maximum" 51 | 52 | warn () { 53 | echo "$*" 54 | } 55 | 56 | die () { 57 | echo 58 | echo "$*" 59 | echo 60 | exit 1 61 | } 62 | 63 | # OS specific support (must be 'true' or 'false'). 64 | cygwin=false 65 | msys=false 66 | darwin=false 67 | nonstop=false 68 | case "`uname`" in 69 | CYGWIN* ) 70 | cygwin=true 71 | ;; 72 | Darwin* ) 73 | darwin=true 74 | ;; 75 | MINGW* ) 76 | msys=true 77 | ;; 78 | NONSTOP* ) 79 | nonstop=true 80 | ;; 81 | esac 82 | 83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 84 | 85 | # Determine the Java command to use to start the JVM. 86 | if [ -n "$JAVA_HOME" ] ; then 87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 88 | # IBM's JDK on AIX uses strange locations for the executables 89 | JAVACMD="$JAVA_HOME/jre/sh/java" 90 | else 91 | JAVACMD="$JAVA_HOME/bin/java" 92 | fi 93 | if [ ! -x "$JAVACMD" ] ; then 94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 95 | 96 | Please set the JAVA_HOME variable in your environment to match the 97 | location of your Java installation." 98 | fi 99 | else 100 | JAVACMD="java" 101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 102 | 103 | Please set the JAVA_HOME variable in your environment to match the 104 | location of your Java installation." 105 | fi 106 | 107 | # Increase the maximum file descriptors if we can. 108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 109 | MAX_FD_LIMIT=`ulimit -H -n` 110 | if [ $? -eq 0 ] ; then 111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 112 | MAX_FD="$MAX_FD_LIMIT" 113 | fi 114 | ulimit -n $MAX_FD 115 | if [ $? -ne 0 ] ; then 116 | warn "Could not set maximum file descriptor limit: $MAX_FD" 117 | fi 118 | else 119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 120 | fi 121 | fi 122 | 123 | # For Darwin, add options to specify how the application appears in the dock 124 | if $darwin; then 125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 126 | fi 127 | 128 | # For Cygwin, switch paths to Windows format before running java 129 | if $cygwin ; then 130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 132 | JAVACMD=`cygpath --unix "$JAVACMD"` 133 | 134 | # We build the pattern for arguments to be converted via cygpath 135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 136 | SEP="" 137 | for dir in $ROOTDIRSRAW ; do 138 | ROOTDIRS="$ROOTDIRS$SEP$dir" 139 | SEP="|" 140 | done 141 | OURCYGPATTERN="(^($ROOTDIRS))" 142 | # Add a user-defined pattern to the cygpath arguments 143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 145 | fi 146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 147 | i=0 148 | for arg in "$@" ; do 149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 151 | 152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 154 | else 155 | eval `echo args$i`="\"$arg\"" 156 | fi 157 | i=$((i+1)) 158 | done 159 | case $i in 160 | (0) set -- ;; 161 | (1) set -- "$args0" ;; 162 | (2) set -- "$args0" "$args1" ;; 163 | (3) set -- "$args0" "$args1" "$args2" ;; 164 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 165 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 166 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 167 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 168 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 169 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 170 | esac 171 | fi 172 | 173 | # Escape application args 174 | save () { 175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 176 | echo " " 177 | } 178 | APP_ARGS=$(save "$@") 179 | 180 | # Collect all arguments for the java command, following the shell quoting and substitution rules 181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 182 | 183 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 184 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 185 | cd "$(dirname "$0")" 186 | fi 187 | 188 | exec "$JAVACMD" "$@" 189 | -------------------------------------------------------------------------------- /example/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem http://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 33 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 34 | 35 | @rem Find java.exe 36 | if defined JAVA_HOME goto findJavaFromJavaHome 37 | 38 | set JAVA_EXE=java.exe 39 | %JAVA_EXE% -version >NUL 2>&1 40 | if "%ERRORLEVEL%" == "0" goto init 41 | 42 | echo. 43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 44 | echo. 45 | echo Please set the JAVA_HOME variable in your environment to match the 46 | echo location of your Java installation. 47 | 48 | goto fail 49 | 50 | :findJavaFromJavaHome 51 | set JAVA_HOME=%JAVA_HOME:"=% 52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 53 | 54 | if exist "%JAVA_EXE%" goto init 55 | 56 | echo. 57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 58 | echo. 59 | echo Please set the JAVA_HOME variable in your environment to match the 60 | echo location of your Java installation. 61 | 62 | goto fail 63 | 64 | :init 65 | @rem Get command-line arguments, handling Windows variants 66 | 67 | if not "%OS%" == "Windows_NT" goto win9xME_args 68 | 69 | :win9xME_args 70 | @rem Slurp the command line arguments. 71 | set CMD_LINE_ARGS= 72 | set _SKIP=2 73 | 74 | :win9xME_args_slurp 75 | if "x%~1" == "x" goto execute 76 | 77 | set CMD_LINE_ARGS=%* 78 | 79 | :execute 80 | @rem Setup the command line 81 | 82 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 83 | 84 | @rem Execute Gradle 85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 86 | 87 | :end 88 | @rem End local scope for the variables with windows NT shell 89 | if "%ERRORLEVEL%"=="0" goto mainEnd 90 | 91 | :fail 92 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 93 | rem the _cmd.exe /c_ return code! 94 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 95 | exit /b 1 96 | 97 | :mainEnd 98 | if "%OS%"=="Windows_NT" endlocal 99 | 100 | :omega 101 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'example' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | -------------------------------------------------------------------------------- /example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "displayName": "example" 4 | } -------------------------------------------------------------------------------- /example/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /example/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | import App from './App'; 7 | import {name as appName} from './app.json'; 8 | 9 | AppRegistry.registerComponent(appName, () => App); 10 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '9.0' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | target 'example' do 5 | # Pods for example 6 | pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector" 7 | pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec" 8 | pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired" 9 | pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety" 10 | pod 'React', :path => '../node_modules/react-native/' 11 | pod 'React-Core', :path => '../node_modules/react-native/' 12 | pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules' 13 | pod 'React-Core/DevSupport', :path => '../node_modules/react-native/' 14 | pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS' 15 | pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation' 16 | pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob' 17 | pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image' 18 | pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS' 19 | pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network' 20 | pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings' 21 | pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text' 22 | pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration' 23 | pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/' 24 | 25 | pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact' 26 | pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi' 27 | pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor' 28 | pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector' 29 | pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon" 30 | pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon" 31 | pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga' 32 | 33 | pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' 34 | pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' 35 | pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec' 36 | 37 | target 'exampleTests' do 38 | inherit! :search_paths 39 | # Pods for testing 40 | end 41 | 42 | use_native_modules! 43 | end 44 | 45 | target 'example-tvOS' do 46 | # Pods for example-tvOS 47 | 48 | target 'example-tvOSTests' do 49 | inherit! :search_paths 50 | # Pods for testing 51 | end 52 | 53 | end 54 | -------------------------------------------------------------------------------- /example/ios/example-tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSExceptionDomains 28 | 29 | localhost 30 | 31 | NSExceptionAllowsInsecureHTTPLoads 32 | 33 | 34 | 35 | 36 | NSLocationWhenInUseUsageDescription 37 | 38 | UILaunchStoryboardName 39 | LaunchScreen 40 | UIRequiredDeviceCapabilities 41 | 42 | armv7 43 | 44 | UISupportedInterfaceOrientations 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | UIViewControllerBasedStatusBarAppearance 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /example/ios/example-tvOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /example/ios/example.xcodeproj/xcshareddata/xcschemes/example-tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 61 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 92 | 94 | 100 | 101 | 102 | 103 | 104 | 105 | 111 | 113 | 119 | 120 | 121 | 122 | 124 | 125 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 61 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 92 | 94 | 100 | 101 | 102 | 103 | 104 | 105 | 111 | 113 | 119 | 120 | 121 | 122 | 124 | 125 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /example/ios/example.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/example/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (nonatomic, strong) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /example/ios/example/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import "AppDelegate.h" 9 | 10 | #import 11 | #import 12 | #import 13 | 14 | @implementation AppDelegate 15 | 16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 17 | { 18 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; 19 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge 20 | moduleName:@"example" 21 | initialProperties:nil]; 22 | 23 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 24 | 25 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 26 | UIViewController *rootViewController = [UIViewController new]; 27 | rootViewController.view = rootView; 28 | self.window.rootViewController = rootViewController; 29 | [self.window makeKeyAndVisible]; 30 | return YES; 31 | } 32 | 33 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 34 | { 35 | #if DEBUG 36 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 37 | #else 38 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 39 | #endif 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /example/ios/example/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /example/ios/example/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/ios/example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | example 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSAllowsArbitraryLoads 30 | 31 | NSExceptionDomains 32 | 33 | localhost 34 | 35 | NSExceptionAllowsInsecureHTTPLoads 36 | 37 | 38 | 39 | 40 | NSLocationWhenInUseUsageDescription 41 | 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIRequiredDeviceCapabilities 45 | 46 | armv7 47 | 48 | UISupportedInterfaceOrientations 49 | 50 | UIInterfaceOrientationPortrait 51 | UIInterfaceOrientationLandscapeLeft 52 | UIInterfaceOrientationLandscapeRight 53 | 54 | UIViewControllerBasedStatusBarAppearance 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /example/ios/example/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example/ios/exampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /example/ios/exampleTests/exampleTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | #define TIMEOUT_SECONDS 600 15 | #define TEXT_TO_LOOK_FOR @"Welcome to React" 16 | 17 | @interface exampleTests : XCTestCase 18 | 19 | @end 20 | 21 | @implementation exampleTests 22 | 23 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 24 | { 25 | if (test(view)) { 26 | return YES; 27 | } 28 | for (UIView *subview in [view subviews]) { 29 | if ([self findSubviewInView:subview matching:test]) { 30 | return YES; 31 | } 32 | } 33 | return NO; 34 | } 35 | 36 | - (void)testRendersWelcomeScreen 37 | { 38 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 39 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 40 | BOOL foundElement = NO; 41 | 42 | __block NSString *redboxError = nil; 43 | #ifdef DEBUG 44 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 45 | if (level >= RCTLogLevelError) { 46 | redboxError = message; 47 | } 48 | }); 49 | #endif 50 | 51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 54 | 55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 57 | return YES; 58 | } 59 | return NO; 60 | }]; 61 | } 62 | 63 | #ifdef DEBUG 64 | RCTSetLogFunction(RCTDefaultLogFunction); 65 | #endif 66 | 67 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 68 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 69 | } 70 | 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /example/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * Overrides original to have local access to common 4 | * https://github.com/facebook/react-native 5 | * 6 | * @format 7 | */ 8 | const path = require('path'); 9 | 10 | module.exports = { 11 | projectRoot: path.resolve(__dirname, '.'), 12 | // watchFolders: [path.resolve(__dirname, './node_modules')], 13 | watchFolders: [path.resolve(__dirname, '../lib')], 14 | 15 | resolver: { 16 | // https://github.com/facebook/metro/issues/1#issuecomment-453450709 17 | extraNodeModules: new Proxy( 18 | {}, 19 | { 20 | get: (target, name) => path.join(process.cwd(), `node_modules/${name}`), 21 | }, 22 | ), 23 | }, 24 | 25 | transformer: { 26 | getTransformOptions: async () => ({ 27 | transform: { 28 | experimentalImportSupport: false, 29 | inlineRequires: false, 30 | }, 31 | }), 32 | }, 33 | }; 34 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "android": "react-native run-android", 7 | "ios": "react-native run-ios", 8 | "start": "react-native start", 9 | "test": "jest", 10 | "lint": "eslint ." 11 | }, 12 | "dependencies": { 13 | "react": "16.9.0", 14 | "react-native": "0.61.5", 15 | "react-native-performance-monitor": "^1.1.0" 16 | }, 17 | "devDependencies": { 18 | "@babel/core": "^7.8.4", 19 | "@babel/runtime": "^7.8.4", 20 | "@react-native-community/eslint-config": "^0.0.7", 21 | "babel-jest": "^25.1.0", 22 | "eslint": "^6.8.0", 23 | "jest": "^25.1.0", 24 | "metro-react-native-babel-preset": "^0.58.0", 25 | "react-test-renderer": "16.9.0" 26 | }, 27 | "jest": { 28 | "preset": "react-native" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /example2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flagsmith/react-native-performance-monitor/cc73c48ea82198f7b44cb651d650fb7c738b0e5f/example2.png -------------------------------------------------------------------------------- /lib/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | This project lets you see a realtime graph of render times within your React Native app. The purpose is for you to be able to create experiments (i.e. change markup and see how it affects render times). 4 | 5 | 6 | # Installation 7 | 8 | ``` 9 | npm i react-native-performance-monitor --save 10 | npx react-native-performance-monitor get 11 | ``` 12 | 13 | 14 | # Usage 15 | ``` 16 | import withPerformanceMonitor from 'react-native-performance-monitor/provider'; 17 | export default withPerformanceMonitor({WrappedComponent: YourScreen, id: 'Screen Name'}); 18 | ``` 19 | 20 | # An example 21 | 22 | Set your baseline at http://127.0.0.1:8125/ by clicking remount. Pause the recorder, and adjust your component with what you think will improve perormance. 23 | 24 | 25 | Here's a before and after with this approach 26 | 27 | Baseline 28 | ``` 29 | 30 | {this.props.children} 31 | 32 | ``` 33 | 34 | Improved 35 | ``` 36 | 37 | {this.props.children} 38 | 39 | ``` 40 | 41 | With this before and after I observed the following within a large flat list. 42 | 43 | 44 | -------------------------------------------------------------------------------- /lib/bin/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | require('@oclif/command').run() 4 | .then(require('@oclif/command/flush')) 5 | .catch(require('@oclif/errors/handle')) 6 | -------------------------------------------------------------------------------- /lib/bin/run.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | node "%~dp0\run" %* 4 | -------------------------------------------------------------------------------- /lib/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-performance-monitor", 3 | "description": "Monitor the performance of your React Native components in realtime", 4 | "version": "2.0.0", 5 | "author": "kyle @kyle-ssg", 6 | "bin": { 7 | "react-native-performance-monitor": "./bin/run" 8 | }, 9 | "dependencies": { 10 | "@oclif/command": "1", 11 | "@oclif/config": "1", 12 | "@oclif/plugin-help": "2", 13 | "cli-ux": "5.4.2", 14 | "hoist-non-react-statics": "^3.3.2", 15 | "http-server": "0.12.1", 16 | "lodash": "4.17.19", 17 | "socket.io": "2.4.0", 18 | "ws": "^7.2.3" 19 | }, 20 | "devDependencies": { 21 | "@oclif/dev-cli": "1", 22 | "eslint": "5.13", 23 | "eslint-config-oclif": "3.1", 24 | "globby": "10" 25 | }, 26 | "engines": { 27 | "node": ">=8.0.0" 28 | }, 29 | "files": [ 30 | "/bin", 31 | "/npm-shrinkwrap.json", 32 | "/oclif.manifest.json", 33 | "/src", 34 | "/provider.js", 35 | "/out" 36 | ], 37 | "keywords": [ 38 | "react-native", 39 | "react", 40 | "performance" 41 | ], 42 | "license": "MIT", 43 | "main": "src/index.js", 44 | "oclif": { 45 | "commands": "./src/commands", 46 | "bin": "react-native-performance-monitor", 47 | "plugins": [ 48 | "@oclif/plugin-help" 49 | ] 50 | }, 51 | "repository": { 52 | "type": "git", 53 | "url": "git@github.com:BulletTrainHQ/react-native-performance-monitor.git" 54 | }, 55 | "scripts": { 56 | "dev": "node start-server.js", 57 | "postpack": "rm -f oclif.manifest.json", 58 | "posttest": "eslint .", 59 | "prepack": "oclif-dev manifest && oclif-dev readme", 60 | "test": "echo NO TESTS", 61 | "version": "oclif-dev readme && git add README.md" 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /lib/provider.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/no-extraneous-dependencies 2 | import React, { Component } from 'react'; 3 | import hoistNonReactStatics from 'hoist-non-react-statics'; 4 | 5 | const Profiler = React.Profiler; 6 | export default ({ WrappedComponent, id, ip = '127.0.0.1', events = ['mount', 'update'], showLogs = false, port = 8125, enableWS = true }) => { 7 | const remote = `http://${ip}:${port}/value`; 8 | const log = (message) => { 9 | if (showLogs) { 10 | console.log(message); 11 | } 12 | }; 13 | class HOC extends Component { 14 | static displayName = 'withPerformance'; 15 | 16 | constructor(props) { 17 | super(props); 18 | this.state = {}; 19 | } 20 | 21 | componentDidMount() { 22 | if (!enableWS) return; 23 | this.socket = new WebSocket(`ws://${ip}:8126`); 24 | this.socket.onopen = function () { 25 | log('RNPM: connected'); 26 | }; 27 | 28 | this.socket.onmessage = (event) => { 29 | switch (event.data) { 30 | case 'remount': { 31 | log('RNPM: remount'); 32 | this.setState({ unmount: true }, () => { 33 | setTimeout(() => this.setState({ unmount: false }), 200); 34 | }); 35 | break; 36 | } 37 | case 'forceUpdate': { 38 | log('RNPM: force update'); 39 | this.forceUpdate(); 40 | break; 41 | } 42 | default: 43 | break; 44 | } 45 | }; 46 | } 47 | 48 | componentWillUnmount() { 49 | this.socket && this.socket.close(); 50 | } 51 | 52 | logMeasurement = async (id, phase, actualDuration) => { 53 | if (!events.includes(phase)) { 54 | return; 55 | } 56 | if (actualDuration < 0.1) { 57 | return; 58 | } 59 | 60 | if (remote) { 61 | fetch(remote, { 62 | method: 'POST', 63 | headers: { 64 | 'Content-Type': 'application/json', 65 | }, 66 | body: JSON.stringify({ value: actualDuration }), 67 | }); 68 | } 69 | } 70 | 71 | render() { 72 | return this.state.unmount ? null : ( 73 | 74 | 78 | 79 | 80 | ); 81 | } 82 | } 83 | 84 | return hoistNonReactStatics(HOC, WrappedComponent); 85 | }; 86 | -------------------------------------------------------------------------------- /lib/src/commands/get.js: -------------------------------------------------------------------------------- 1 | const { Command, flags } = require('@oclif/command'); 2 | var server = require('../server') 3 | class TheCommand extends Command { 4 | async run() { 5 | server(); 6 | } 7 | } 8 | TheCommand.args = [ 9 | { name: 'prefix' }, 10 | ]; 11 | 12 | TheCommand.description = `Writes the app actions, saga 13 | ... 14 | Extra documentation goes here 15 | `; 16 | 17 | TheCommand.flags = { 18 | name: flags.string({ char: 'n', description: 'name to print' }), 19 | }; 20 | 21 | module.exports = TheCommand; 22 | -------------------------------------------------------------------------------- /lib/src/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('@oclif/command') 2 | -------------------------------------------------------------------------------- /lib/src/out/404.html: -------------------------------------------------------------------------------- 1 | 404: This page could not be found

404

This page could not be found.

-------------------------------------------------------------------------------- /lib/src/out/_next/static/chunks/0.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"] = window["webpackJsonp"] || []).push([[0],{ 2 | 3 | /***/ "./node_modules/next/dist/client/dev/noop.js": 4 | /*!***************************************************!*\ 5 | !*** ./node_modules/next/dist/client/dev/noop.js ***! 6 | \***************************************************/ 7 | /*! no static exports found */ 8 | /***/ (function(module, exports, __webpack_require__) { 9 | 10 | "use strict"; 11 | 12 | 13 | /***/ }) 14 | 15 | }]); 16 | //# sourceMappingURL=0.js.map -------------------------------------------------------------------------------- /lib/src/out/_next/static/chunks/0.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"static/chunks/0.js","sources":[],"mappings":";;;;;;;;;;;;;;A","sourceRoot":""} -------------------------------------------------------------------------------- /lib/src/out/_next/static/chunks/styles.047920665adbb91bf21b.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[6],{"00et":function(n,w,o){}}]); -------------------------------------------------------------------------------- /lib/src/out/_next/static/chunks/styles.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"] = window["webpackJsonp"] || []).push([["styles"],{ 2 | 3 | /***/ "./styles/styles.scss": 4 | /*!****************************!*\ 5 | !*** ./styles/styles.scss ***! 6 | \****************************/ 7 | /*! no static exports found */ 8 | /***/ (function(module, exports, __webpack_require__) { 9 | 10 | // extracted by mini-css-extract-plugin; 11 | if (true) { 12 | var injectCss = function injectCss(prev, href) { 13 | var link = prev.cloneNode(); 14 | link.href = href; 15 | link.onload = function() { 16 | prev.parentNode.removeChild(prev); 17 | }; 18 | prev.stale = true; 19 | prev.parentNode.insertBefore(link, prev); 20 | }; 21 | module.hot.dispose(function() { 22 | window.__webpack_reload_css__ = true; 23 | }); 24 | if (window.__webpack_reload_css__) { 25 | module.hot.__webpack_reload_css__ = false; 26 | console.log("[HMR] Reloading stylesheets..."); 27 | var prefix = document.location.protocol + '//' + document.location.host; 28 | document 29 | .querySelectorAll("link[href][rel=stylesheet]") 30 | .forEach(function(link) { 31 | if (!link.href.match(prefix) || link.stale) return; 32 | injectCss(link, link.href.split("?")[0] + "?unix=1586294374521"); 33 | }); 34 | } 35 | } 36 | 37 | 38 | /***/ }) 39 | 40 | }]); 41 | //# sourceMappingURL=styles.js.map -------------------------------------------------------------------------------- /lib/src/out/_next/static/chunks/styles.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"static/chunks/styles.js","sources":["webpack:///./styles/styles.scss?8426"],"sourcesContent":["// extracted by mini-css-extract-plugin;\n if (module.hot) {\n var injectCss = function injectCss(prev, href) {\n var link = prev.cloneNode();\n link.href = href;\n link.onload = function() {\n prev.parentNode.removeChild(prev);\n };\n prev.stale = true;\n prev.parentNode.insertBefore(link, prev);\n };\n module.hot.dispose(function() {\n window.__webpack_reload_css__ = true;\n });\n if (window.__webpack_reload_css__) {\n module.hot.__webpack_reload_css__ = false;\n console.log(\"[HMR] Reloading stylesheets...\");\n var prefix = document.location.protocol + '//' + document.location.host;\n document\n .querySelectorAll(\"link[href][rel=stylesheet]\")\n .forEach(function(link) {\n if (!link.href.match(prefix) || link.stale) return;\n injectCss(link, link.href.split(\"?\")[0] + \"?unix=1586294374521\");\n });\n }\n }\n "],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""} -------------------------------------------------------------------------------- /lib/src/out/_next/static/faJo-xuBJVhNH3Kr2IaYs/pages/_app.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[2],{B5Ud:function(t,e,n){"use strict";var r=n("/HRN"),u=n("WaGi"),a=n("ZDA2"),o=n("/+P4"),i=n("N9n2"),p=n("ln6h"),c=n("KI45");e.__esModule=!0,e.Container=function(t){return t.children},e.createUrl=m,e.default=void 0;var s=c(n("htGi")),l=c(n("+oT+")),f=c(n("q1tI")),h=c(n("17x9")),d=n("Bu4q");e.AppInitialProps=d.AppInitialProps;var v=n("nOHt");function w(t){return P.apply(this,arguments)}function P(){return(P=(0,l.default)(p.mark(function t(e){var n,r,u;return p.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.Component,r=e.ctx,t.next=3,(0,d.loadGetInitialProps)(n,r);case 3:return u=t.sent,t.abrupt("return",{pageProps:u});case 5:case"end":return t.stop()}},t)}))).apply(this,arguments)}var g=function(t){function e(){return r(this,e),a(this,o(e).apply(this,arguments))}return i(e,t),u(e,[{key:"getChildContext",value:function(){return{router:(0,v.makePublicRouterInstance)(this.props.router)}}},{key:"componentDidCatch",value:function(t,e){throw t}},{key:"render",value:function(){var t=this.props,e=t.router,n=t.Component,r=t.pageProps,u=m(e);return f.default.createElement(n,(0,s.default)({},r,{url:u}))}}]),e}(f.default.Component);e.default=g,g.childContextTypes={router:h.default.object},g.origGetInitialProps=w,g.getInitialProps=w;var k=(0,d.execOnce)(function(){0});function m(t){var e=t.pathname,n=t.asPath,r=t.query;return{get query(){return k(),r},get pathname(){return k(),e},get asPath(){return k(),n},back:function(){k(),t.back()},push:function(e,n){return k(),t.push(e,n)},pushTo:function(e,n){k();var r=n?e:"",u=n||e;return t.push(r,u)},replace:function(e,n){return k(),t.replace(e,n)},replaceTo:function(e,n){k();var r=n?e:"",u=n||e;return t.replace(r,u)}}}},"e9+W":function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){var t=n("B5Ud");return{page:t.default||t}}])}},[["e9+W",1,0]]]); -------------------------------------------------------------------------------- /lib/src/out/_next/static/faJo-xuBJVhNH3Kr2IaYs/pages/_error.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"/a9y":function(e,t,n){"use strict";var r=n("/HRN"),a=n("WaGi"),l=n("ZDA2"),i=n("/+P4"),o=n("N9n2"),d=n("KI45");t.__esModule=!0,t.default=void 0;var s=d(n("q1tI")),u=d(n("PgRs")),c={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"},p=function(e){function t(){return r(this,t),l(this,i(t).apply(this,arguments))}return o(t,e),a(t,[{key:"render",value:function(){var e=this.props.statusCode,t=this.props.title||c[e]||"An unexpected error has occurred";return s.default.createElement("div",{style:f.error},s.default.createElement(u.default,null,s.default.createElement("title",null,e,": ",t)),s.default.createElement("div",null,s.default.createElement("style",{dangerouslySetInnerHTML:{__html:"body { margin: 0 }"}}),e?s.default.createElement("h1",{style:f.h1},e):null,s.default.createElement("div",{style:f.desc},s.default.createElement("h2",{style:f.h2},t,"."))))}}],[{key:"getInitialProps",value:function(e){var t=e.res,n=e.err;return{statusCode:t&&t.statusCode?t.statusCode:n?n.statusCode:404}}}]),t}(s.default.Component);t.default=p,p.displayName="ErrorPage";var f={error:{color:"#000",background:"#fff",fontFamily:'-apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", "Fira Sans", Avenir, "Helvetica Neue", "Lucida Grande", sans-serif',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{display:"inline-block",textAlign:"left",lineHeight:"49px",height:"49px",verticalAlign:"middle"},h1:{display:"inline-block",borderRight:"1px solid rgba(0, 0, 0,.3)",margin:0,marginRight:"20px",padding:"10px 23px 10px 0",fontSize:"24px",fontWeight:500,verticalAlign:"top"},h2:{fontSize:"14px",fontWeight:"normal",lineHeight:"inherit",margin:0,padding:0}}},"04ac":function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_error",function(){var e=n("/a9y");return{page:e.default||e}}])},PgRs:function(e,t,n){e.exports=n("m/Pd")}},[["04ac",1,0]]]); -------------------------------------------------------------------------------- /lib/src/out/_next/static/faJo-xuBJVhNH3Kr2IaYs/pages/index.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[4],{"0KLy":function(t,e,n){"use strict";var r=n("p0XB"),o=n("/HRN"),u=n("WaGi"),a=n("ZDA2"),i=n("/+P4"),l=n("N9n2"),c=n("XXOK"),f=n("UXZV"),d=n("eVuF"),s=n("pLtp"),p=n("hfKm"),h=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};p(e,"__esModule",{value:!0});var m=h(n("q1tI")),y=n("Q0KE"),v=[],_=[],b=!1;function g(t){var e=t(),n={loading:!0,loaded:null,error:null};return n.promise=e.then(function(t){return n.loading=!1,n.loaded=t,t}).catch(function(t){throw n.loading=!1,n.error=t,t}),n}function w(t){var e={loading:!1,loaded:{},error:null},n=[];try{s(t).forEach(function(r){var o=g(t[r]);o.loading?e.loading=!0:(e.loaded[r]=o.loaded,e.error=o.error),n.push(o.promise),o.promise.then(function(t){e.loaded[r]=t}).catch(function(t){e.error=t})})}catch(r){e.error=r}return e.promise=d.all(n).then(function(t){return e.loading=!1,t}).catch(function(t){throw e.loading=!1,t}),e}function T(t,e){return m.default.createElement((n=t)&&n.__esModule?n.default:n,e);var n}function M(t,e){var n,d=f({loader:null,loading:null,delay:200,timeout:null,render:T,webpack:null,modules:null},e),s=null;function p(){return s||(s=t(d.loader)),s.promise}if(!b&&"function"===typeof d.webpack){var h=d.webpack();_.push(function(t){var e=!0,n=!1,r=void 0;try{for(var o,u=c(h);!(e=(o=u.next()).done);e=!0){var a=o.value;if(-1!==t.indexOf(a))return p()}}catch(i){n=!0,r=i}finally{try{e||null==u.return||u.return()}finally{if(n)throw r}}})}return(n=function(e){function n(e){var r;return o(this,n),(r=a(this,i(n).call(this,e))).retry=function(){r.setState({error:null,loading:!0,timedOut:!1}),s=t(d.loader),r._loadModule()},p(),r.state={error:s.error,pastDelay:!1,timedOut:!1,loading:s.loading,loaded:s.loaded},r}return l(n,e),u(n,[{key:"UNSAFE_componentWillMount",value:function(){this._mounted=!0,this._loadModule()}},{key:"_loadModule",value:function(){var t=this;if(this.context&&r(d.modules)&&d.modules.forEach(function(e){t.context(e)}),s.loading){"number"===typeof d.delay&&(0===d.delay?this.setState({pastDelay:!0}):this._delay=setTimeout(function(){t.setState({pastDelay:!0})},d.delay)),"number"===typeof d.timeout&&(this._timeout=setTimeout(function(){t.setState({timedOut:!0})},d.timeout));var e=function(){t._mounted&&(t.setState({error:s.error,loaded:s.loaded,loading:s.loading}),t._clearTimeouts())};s.promise.then(function(){e()}).catch(function(t){e()})}}},{key:"componentWillUnmount",value:function(){this._mounted=!1,this._clearTimeouts()}},{key:"_clearTimeouts",value:function(){clearTimeout(this._delay),clearTimeout(this._timeout)}},{key:"render",value:function(){return this.state.loading||this.state.error?m.default.createElement(d.loading,{isLoading:this.state.loading,pastDelay:this.state.pastDelay,timedOut:this.state.timedOut,error:this.state.error,retry:this.retry}):this.state.loaded?d.render(this.state.loaded,this.props):null}}],[{key:"preload",value:function(){return p()}}]),n}(m.default.Component)).contextType=y.LoadableContext,n}function E(t){return M(g,t)}function O(t,e){for(var n=[];t.length;){var r=t.pop();n.push(r(e))}return d.all(n).then(function(){if(t.length)return O(t,e)})}E.Map=function(t){if("function"!==typeof t.render)throw new Error("LoadableMap requires a `render(loaded, props)` function");return M(w,t)},E.preloadAll=function(){return new d(function(t,e){O(v).then(t,e)})},E.preloadReady=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new d(function(e){var n=function(){return b=!0,e()};O(_,t).then(n,n)})},window.__NEXT_PRELOADREADY=E.preloadReady,e.default=E},"0iUn":function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",function(){return r})},"AT/M":function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",function(){return r})},MI3g:function(t,e,n){"use strict";var r=n("XVgq"),o=n.n(r),u=n("Z7t5"),a=n.n(u);function i(t){return(i="function"===typeof a.a&&"symbol"===typeof o.a?function(t){return typeof t}:function(t){return t&&"function"===typeof a.a&&t.constructor===a.a&&t!==a.a.prototype?"symbol":typeof t})(t)}function l(t){return(l="function"===typeof a.a&&"symbol"===i(o.a)?function(t){return i(t)}:function(t){return t&&"function"===typeof a.a&&t.constructor===a.a&&t!==a.a.prototype?"symbol":i(t)})(t)}var c=n("AT/M");function f(t,e){return!e||"object"!==l(e)&&"function"!==typeof e?Object(c.a)(t):e}n.d(e,"a",function(){return f})},Q0KE:function(t,e,n){"use strict";var r=n("hfKm"),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};r(e,"__esModule",{value:!0});var u=o(n("q1tI"));e.LoadableContext=u.createContext(null)},RNiq:function(t,e,n){"use strict";n.r(e);var r,o,u=n("0iUn"),a=n("MI3g"),i=n("a7VT"),l=n("AT/M"),c=n("Tit0"),f=n("vYYK"),d=(n("00et"),n("q1tI")),s=n.n(d),p=n("m/Pd"),h=n.n(p),m=n("UgXd"),y=n.n(m),v=s.a.createElement,_=y()(function(){return Promise.all([n.e(0),n.e(7)]).then(n.bind(null,"3aVm"))},{ssr:!1,loadableGenerated:{webpack:function(){return["3aVm"]},modules:["../components/App"]}}),b=(o=r=function(t){function e(t,n){var r;return Object(u.a)(this,e),r=Object(a.a)(this,Object(i.a)(e).call(this,t,n)),Object(f.a)(Object(l.a)(r),"render",function(){return v(s.a.Fragment,null,v(h.a,null,v("title",null,"React Native Performance Monitor"),v("link",{href:"https://fonts.googleapis.com/css?family=Roboto&display=swap",rel:"stylesheet"})),v(_||"div",null))}),r.state={},r}return Object(c.a)(e,t),e}(s.a.Component),Object(f.a)(r,"displayName","HomePage"),o);e.default=b},Tit0:function(t,e,n){"use strict";var r=n("SqZg"),o=n.n(r),u=n("TRZx"),a=n.n(u);function i(t,e){return(i=a.a||function(t,e){return t.__proto__=e,t})(t,e)}function l(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=o()(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}n.d(e,"a",function(){return l})},UgXd:function(t,e,n){"use strict";var r=n("pLtp"),o=n("UXZV"),u=n("eVuF"),a=n("hfKm"),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};a(e,"__esModule",{value:!0});var l=i(n("q1tI")),c=i(n("0KLy")),f=!1;function d(t,e){if(delete e.webpack,delete e.modules,!f)return t(e);var n=e.loading;return function(){return l.default.createElement(n,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}}e.noSSR=d,e.default=function(t,e){var n=c.default,a={loading:function(t){return t.error,t.isLoading,t.pastDelay,null}};if(t instanceof u?a.loader=function(){return t}:"function"===typeof t?a.loader=t:"object"===typeof t&&(a=o({},a,t)),a=o({},a,e),"object"===typeof t&&!(t instanceof u)&&(t.render&&(a.render=function(e,n){return t.render(n,e)}),t.modules)){n=c.default.Map;var i={},l=t.modules();r(l).forEach(function(t){var e=l[t];"function"!==typeof e.then?i[t]=e:i[t]=function(){return e.then(function(t){return t.default||t})}}),a.loader=i}if(a.loadableGenerated&&delete(a=o({},a,a.loadableGenerated)).loadableGenerated,"boolean"===typeof a.ssr){if(!a.ssr)return delete a.ssr,d(n,a);delete a.ssr}return n(a)}},a7VT:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("Bhuq"),o=n.n(r),u=n("TRZx"),a=n.n(u);function i(t){return(i=a.a?o.a:function(t){return t.__proto__||o()(t)})(t)}},vYYK:function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n("hfKm"),o=n.n(r);function u(t,e,n){return e in t?o()(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},vlRD:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){var t=n("RNiq");return{page:t.default||t}}])}},[["vlRD",1,0,6]]]); -------------------------------------------------------------------------------- /lib/src/out/_next/static/jFOPp7CnzUTdYIu6fy7jh/pages/_app.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[2],{B5Ud:function(t,e,n){"use strict";var r=n("/HRN"),u=n("WaGi"),a=n("ZDA2"),o=n("/+P4"),i=n("N9n2"),p=n("ln6h"),c=n("KI45");e.__esModule=!0,e.Container=function(t){return t.children},e.createUrl=m,e.default=void 0;var s=c(n("htGi")),l=c(n("+oT+")),f=c(n("q1tI")),h=c(n("17x9")),d=n("Bu4q");e.AppInitialProps=d.AppInitialProps;var v=n("nOHt");function w(t){return P.apply(this,arguments)}function P(){return(P=(0,l.default)(p.mark(function t(e){var n,r,u;return p.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.Component,r=e.ctx,t.next=3,(0,d.loadGetInitialProps)(n,r);case 3:return u=t.sent,t.abrupt("return",{pageProps:u});case 5:case"end":return t.stop()}},t)}))).apply(this,arguments)}var g=function(t){function e(){return r(this,e),a(this,o(e).apply(this,arguments))}return i(e,t),u(e,[{key:"getChildContext",value:function(){return{router:(0,v.makePublicRouterInstance)(this.props.router)}}},{key:"componentDidCatch",value:function(t,e){throw t}},{key:"render",value:function(){var t=this.props,e=t.router,n=t.Component,r=t.pageProps,u=m(e);return f.default.createElement(n,(0,s.default)({},r,{url:u}))}}]),e}(f.default.Component);e.default=g,g.childContextTypes={router:h.default.object},g.origGetInitialProps=w,g.getInitialProps=w;var k=(0,d.execOnce)(function(){0});function m(t){var e=t.pathname,n=t.asPath,r=t.query;return{get query(){return k(),r},get pathname(){return k(),e},get asPath(){return k(),n},back:function(){k(),t.back()},push:function(e,n){return k(),t.push(e,n)},pushTo:function(e,n){k();var r=n?e:"",u=n||e;return t.push(r,u)},replace:function(e,n){return k(),t.replace(e,n)},replaceTo:function(e,n){k();var r=n?e:"",u=n||e;return t.replace(r,u)}}}},"e9+W":function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){var t=n("B5Ud");return{page:t.default||t}}])}},[["e9+W",1,0]]]); -------------------------------------------------------------------------------- /lib/src/out/_next/static/jFOPp7CnzUTdYIu6fy7jh/pages/_error.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"/a9y":function(e,t,n){"use strict";var r=n("/HRN"),a=n("WaGi"),l=n("ZDA2"),i=n("/+P4"),o=n("N9n2"),d=n("KI45");t.__esModule=!0,t.default=void 0;var s=d(n("q1tI")),u=d(n("PgRs")),c={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"},p=function(e){function t(){return r(this,t),l(this,i(t).apply(this,arguments))}return o(t,e),a(t,[{key:"render",value:function(){var e=this.props.statusCode,t=this.props.title||c[e]||"An unexpected error has occurred";return s.default.createElement("div",{style:f.error},s.default.createElement(u.default,null,s.default.createElement("title",null,e,": ",t)),s.default.createElement("div",null,s.default.createElement("style",{dangerouslySetInnerHTML:{__html:"body { margin: 0 }"}}),e?s.default.createElement("h1",{style:f.h1},e):null,s.default.createElement("div",{style:f.desc},s.default.createElement("h2",{style:f.h2},t,"."))))}}],[{key:"getInitialProps",value:function(e){var t=e.res,n=e.err;return{statusCode:t&&t.statusCode?t.statusCode:n?n.statusCode:404}}}]),t}(s.default.Component);t.default=p,p.displayName="ErrorPage";var f={error:{color:"#000",background:"#fff",fontFamily:'-apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", "Fira Sans", Avenir, "Helvetica Neue", "Lucida Grande", sans-serif',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{display:"inline-block",textAlign:"left",lineHeight:"49px",height:"49px",verticalAlign:"middle"},h1:{display:"inline-block",borderRight:"1px solid rgba(0, 0, 0,.3)",margin:0,marginRight:"20px",padding:"10px 23px 10px 0",fontSize:"24px",fontWeight:500,verticalAlign:"top"},h2:{fontSize:"14px",fontWeight:"normal",lineHeight:"inherit",margin:0,padding:0}}},"04ac":function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_error",function(){var e=n("/a9y");return{page:e.default||e}}])},PgRs:function(e,t,n){e.exports=n("m/Pd")}},[["04ac",1,0]]]); -------------------------------------------------------------------------------- /lib/src/out/_next/static/jFOPp7CnzUTdYIu6fy7jh/pages/index.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[4],{"0KLy":function(t,e,n){"use strict";var r=n("p0XB"),o=n("/HRN"),u=n("WaGi"),a=n("ZDA2"),i=n("/+P4"),l=n("N9n2"),c=n("XXOK"),f=n("UXZV"),d=n("eVuF"),s=n("pLtp"),p=n("hfKm"),h=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};p(e,"__esModule",{value:!0});var m=h(n("q1tI")),y=n("Q0KE"),v=[],_=[],b=!1;function g(t){var e=t(),n={loading:!0,loaded:null,error:null};return n.promise=e.then(function(t){return n.loading=!1,n.loaded=t,t}).catch(function(t){throw n.loading=!1,n.error=t,t}),n}function w(t){var e={loading:!1,loaded:{},error:null},n=[];try{s(t).forEach(function(r){var o=g(t[r]);o.loading?e.loading=!0:(e.loaded[r]=o.loaded,e.error=o.error),n.push(o.promise),o.promise.then(function(t){e.loaded[r]=t}).catch(function(t){e.error=t})})}catch(r){e.error=r}return e.promise=d.all(n).then(function(t){return e.loading=!1,t}).catch(function(t){throw e.loading=!1,t}),e}function T(t,e){return m.default.createElement((n=t)&&n.__esModule?n.default:n,e);var n}function M(t,e){var n,d=f({loader:null,loading:null,delay:200,timeout:null,render:T,webpack:null,modules:null},e),s=null;function p(){return s||(s=t(d.loader)),s.promise}if(!b&&"function"===typeof d.webpack){var h=d.webpack();_.push(function(t){var e=!0,n=!1,r=void 0;try{for(var o,u=c(h);!(e=(o=u.next()).done);e=!0){var a=o.value;if(-1!==t.indexOf(a))return p()}}catch(i){n=!0,r=i}finally{try{e||null==u.return||u.return()}finally{if(n)throw r}}})}return(n=function(e){function n(e){var r;return o(this,n),(r=a(this,i(n).call(this,e))).retry=function(){r.setState({error:null,loading:!0,timedOut:!1}),s=t(d.loader),r._loadModule()},p(),r.state={error:s.error,pastDelay:!1,timedOut:!1,loading:s.loading,loaded:s.loaded},r}return l(n,e),u(n,[{key:"UNSAFE_componentWillMount",value:function(){this._mounted=!0,this._loadModule()}},{key:"_loadModule",value:function(){var t=this;if(this.context&&r(d.modules)&&d.modules.forEach(function(e){t.context(e)}),s.loading){"number"===typeof d.delay&&(0===d.delay?this.setState({pastDelay:!0}):this._delay=setTimeout(function(){t.setState({pastDelay:!0})},d.delay)),"number"===typeof d.timeout&&(this._timeout=setTimeout(function(){t.setState({timedOut:!0})},d.timeout));var e=function(){t._mounted&&(t.setState({error:s.error,loaded:s.loaded,loading:s.loading}),t._clearTimeouts())};s.promise.then(function(){e()}).catch(function(t){e()})}}},{key:"componentWillUnmount",value:function(){this._mounted=!1,this._clearTimeouts()}},{key:"_clearTimeouts",value:function(){clearTimeout(this._delay),clearTimeout(this._timeout)}},{key:"render",value:function(){return this.state.loading||this.state.error?m.default.createElement(d.loading,{isLoading:this.state.loading,pastDelay:this.state.pastDelay,timedOut:this.state.timedOut,error:this.state.error,retry:this.retry}):this.state.loaded?d.render(this.state.loaded,this.props):null}}],[{key:"preload",value:function(){return p()}}]),n}(m.default.Component)).contextType=y.LoadableContext,n}function E(t){return M(g,t)}function O(t,e){for(var n=[];t.length;){var r=t.pop();n.push(r(e))}return d.all(n).then(function(){if(t.length)return O(t,e)})}E.Map=function(t){if("function"!==typeof t.render)throw new Error("LoadableMap requires a `render(loaded, props)` function");return M(w,t)},E.preloadAll=function(){return new d(function(t,e){O(v).then(t,e)})},E.preloadReady=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new d(function(e){var n=function(){return b=!0,e()};O(_,t).then(n,n)})},window.__NEXT_PRELOADREADY=E.preloadReady,e.default=E},"0iUn":function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",function(){return r})},"AT/M":function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",function(){return r})},MI3g:function(t,e,n){"use strict";var r=n("XVgq"),o=n.n(r),u=n("Z7t5"),a=n.n(u);function i(t){return(i="function"===typeof a.a&&"symbol"===typeof o.a?function(t){return typeof t}:function(t){return t&&"function"===typeof a.a&&t.constructor===a.a&&t!==a.a.prototype?"symbol":typeof t})(t)}function l(t){return(l="function"===typeof a.a&&"symbol"===i(o.a)?function(t){return i(t)}:function(t){return t&&"function"===typeof a.a&&t.constructor===a.a&&t!==a.a.prototype?"symbol":i(t)})(t)}var c=n("AT/M");function f(t,e){return!e||"object"!==l(e)&&"function"!==typeof e?Object(c.a)(t):e}n.d(e,"a",function(){return f})},Q0KE:function(t,e,n){"use strict";var r=n("hfKm"),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};r(e,"__esModule",{value:!0});var u=o(n("q1tI"));e.LoadableContext=u.createContext(null)},RNiq:function(t,e,n){"use strict";n.r(e);var r,o,u=n("0iUn"),a=n("MI3g"),i=n("a7VT"),l=n("AT/M"),c=n("Tit0"),f=n("vYYK"),d=(n("00et"),n("q1tI")),s=n.n(d),p=n("m/Pd"),h=n.n(p),m=n("UgXd"),y=n.n(m),v=s.a.createElement,_=y()(function(){return Promise.all([n.e(0),n.e(7)]).then(n.bind(null,"3aVm"))},{ssr:!1,loadableGenerated:{webpack:function(){return["3aVm"]},modules:["../components/App"]}}),b=(o=r=function(t){function e(t,n){var r;return Object(u.a)(this,e),r=Object(a.a)(this,Object(i.a)(e).call(this,t,n)),Object(f.a)(Object(l.a)(r),"render",function(){return v(s.a.Fragment,null,v(h.a,null,v("title",null,"React Native Performance Monitor"),v("link",{href:"https://fonts.googleapis.com/css?family=Roboto&display=swap",rel:"stylesheet"})),v(_||"div",null))}),r.state={},r}return Object(c.a)(e,t),e}(s.a.Component),Object(f.a)(r,"displayName","HomePage"),o);e.default=b},Tit0:function(t,e,n){"use strict";var r=n("SqZg"),o=n.n(r),u=n("TRZx"),a=n.n(u);function i(t,e){return(i=a.a||function(t,e){return t.__proto__=e,t})(t,e)}function l(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=o()(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}n.d(e,"a",function(){return l})},UgXd:function(t,e,n){"use strict";var r=n("pLtp"),o=n("UXZV"),u=n("eVuF"),a=n("hfKm"),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};a(e,"__esModule",{value:!0});var l=i(n("q1tI")),c=i(n("0KLy")),f=!1;function d(t,e){if(delete e.webpack,delete e.modules,!f)return t(e);var n=e.loading;return function(){return l.default.createElement(n,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}}e.noSSR=d,e.default=function(t,e){var n=c.default,a={loading:function(t){return t.error,t.isLoading,t.pastDelay,null}};if(t instanceof u?a.loader=function(){return t}:"function"===typeof t?a.loader=t:"object"===typeof t&&(a=o({},a,t)),a=o({},a,e),"object"===typeof t&&!(t instanceof u)&&(t.render&&(a.render=function(e,n){return t.render(n,e)}),t.modules)){n=c.default.Map;var i={},l=t.modules();r(l).forEach(function(t){var e=l[t];"function"!==typeof e.then?i[t]=e:i[t]=function(){return e.then(function(t){return t.default||t})}}),a.loader=i}if(a.loadableGenerated&&delete(a=o({},a,a.loadableGenerated)).loadableGenerated,"boolean"===typeof a.ssr){if(!a.ssr)return delete a.ssr,d(n,a);delete a.ssr}return n(a)}},a7VT:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("Bhuq"),o=n.n(r),u=n("TRZx"),a=n.n(u);function i(t){return(i=a.a?o.a:function(t){return t.__proto__||o()(t)})(t)}},vYYK:function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n("hfKm"),o=n.n(r);function u(t,e,n){return e in t?o()(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},vlRD:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){var t=n("RNiq");return{page:t.default||t}}])}},[["vlRD",1,0,6]]]); -------------------------------------------------------------------------------- /lib/src/out/_next/static/otz7QlKl7wiY_2oXGkQ92/pages/_app.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[8],{B5Ud:function(t,e,n){"use strict";var r=n("/HRN"),u=n("WaGi"),a=n("ZDA2"),o=n("/+P4"),i=n("N9n2"),p=n("ln6h"),c=n("KI45");e.__esModule=!0,e.Container=function(t){return t.children},e.createUrl=m,e.default=void 0;var s=c(n("htGi")),l=c(n("+oT+")),f=c(n("q1tI")),h=c(n("17x9")),d=n("Bu4q");e.AppInitialProps=d.AppInitialProps;var v=n("nOHt");function w(t){return P.apply(this,arguments)}function P(){return(P=(0,l.default)(p.mark(function t(e){var n,r,u;return p.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.Component,r=e.ctx,t.next=3,(0,d.loadGetInitialProps)(n,r);case 3:return u=t.sent,t.abrupt("return",{pageProps:u});case 5:case"end":return t.stop()}},t)}))).apply(this,arguments)}var g=function(t){function e(){return r(this,e),a(this,o(e).apply(this,arguments))}return i(e,t),u(e,[{key:"getChildContext",value:function(){return{router:(0,v.makePublicRouterInstance)(this.props.router)}}},{key:"componentDidCatch",value:function(t,e){throw t}},{key:"render",value:function(){var t=this.props,e=t.router,n=t.Component,r=t.pageProps,u=m(e);return f.default.createElement(n,(0,s.default)({},r,{url:u}))}}]),e}(f.default.Component);e.default=g,g.childContextTypes={router:h.default.object},g.origGetInitialProps=w,g.getInitialProps=w;var k=(0,d.execOnce)(function(){0});function m(t){var e=t.pathname,n=t.asPath,r=t.query;return{get query(){return k(),r},get pathname(){return k(),e},get asPath(){return k(),n},back:function(){k(),t.back()},push:function(e,n){return k(),t.push(e,n)},pushTo:function(e,n){k();var r=n?e:"",u=n||e;return t.push(r,u)},replace:function(e,n){return k(),t.replace(e,n)},replaceTo:function(e,n){k();var r=n?e:"",u=n||e;return t.replace(r,u)}}}},"e9+W":function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){var t=n("B5Ud");return{page:t.default||t}}])}},[["e9+W",1,0]]]); -------------------------------------------------------------------------------- /lib/src/out/_next/static/otz7QlKl7wiY_2oXGkQ92/pages/_error.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[9],{"/a9y":function(e,t,n){"use strict";var r=n("/HRN"),a=n("WaGi"),l=n("ZDA2"),i=n("/+P4"),o=n("N9n2"),d=n("KI45");t.__esModule=!0,t.default=void 0;var s=d(n("q1tI")),u=d(n("PgRs")),c={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"},p=function(e){function t(){return r(this,t),l(this,i(t).apply(this,arguments))}return o(t,e),a(t,[{key:"render",value:function(){var e=this.props.statusCode,t=this.props.title||c[e]||"An unexpected error has occurred";return s.default.createElement("div",{style:f.error},s.default.createElement(u.default,null,s.default.createElement("title",null,e,": ",t)),s.default.createElement("div",null,s.default.createElement("style",{dangerouslySetInnerHTML:{__html:"body { margin: 0 }"}}),e?s.default.createElement("h1",{style:f.h1},e):null,s.default.createElement("div",{style:f.desc},s.default.createElement("h2",{style:f.h2},t,"."))))}}],[{key:"getInitialProps",value:function(e){var t=e.res,n=e.err;return{statusCode:t&&t.statusCode?t.statusCode:n?n.statusCode:404}}}]),t}(s.default.Component);t.default=p,p.displayName="ErrorPage";var f={error:{color:"#000",background:"#fff",fontFamily:'-apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", "Fira Sans", Avenir, "Helvetica Neue", "Lucida Grande", sans-serif',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{display:"inline-block",textAlign:"left",lineHeight:"49px",height:"49px",verticalAlign:"middle"},h1:{display:"inline-block",borderRight:"1px solid rgba(0, 0, 0,.3)",margin:0,marginRight:"20px",padding:"10px 23px 10px 0",fontSize:"24px",fontWeight:500,verticalAlign:"top"},h2:{fontSize:"14px",fontWeight:"normal",lineHeight:"inherit",margin:0,padding:0}}},"04ac":function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_error",function(){var e=n("/a9y");return{page:e.default||e}}])},PgRs:function(e,t,n){e.exports=n("m/Pd")}},[["04ac",1,0]]]); -------------------------------------------------------------------------------- /lib/src/out/_next/static/otz7QlKl7wiY_2oXGkQ92/pages/index.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[10],{"0KLy":function(t,e,n){"use strict";var r=n("p0XB"),o=n("/HRN"),u=n("WaGi"),a=n("ZDA2"),i=n("/+P4"),l=n("N9n2"),c=n("XXOK"),f=n("UXZV"),d=n("eVuF"),s=n("pLtp"),p=n("hfKm"),h=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};p(e,"__esModule",{value:!0});var m=h(n("q1tI")),y=n("Q0KE"),v=[],_=[],b=!1;function g(t){var e=t(),n={loading:!0,loaded:null,error:null};return n.promise=e.then(function(t){return n.loading=!1,n.loaded=t,t}).catch(function(t){throw n.loading=!1,n.error=t,t}),n}function w(t){var e={loading:!1,loaded:{},error:null},n=[];try{s(t).forEach(function(r){var o=g(t[r]);o.loading?e.loading=!0:(e.loaded[r]=o.loaded,e.error=o.error),n.push(o.promise),o.promise.then(function(t){e.loaded[r]=t}).catch(function(t){e.error=t})})}catch(r){e.error=r}return e.promise=d.all(n).then(function(t){return e.loading=!1,t}).catch(function(t){throw e.loading=!1,t}),e}function T(t,e){return m.default.createElement((n=t)&&n.__esModule?n.default:n,e);var n}function M(t,e){var n,d=f({loader:null,loading:null,delay:200,timeout:null,render:T,webpack:null,modules:null},e),s=null;function p(){return s||(s=t(d.loader)),s.promise}if(!b&&"function"===typeof d.webpack){var h=d.webpack();_.push(function(t){var e=!0,n=!1,r=void 0;try{for(var o,u=c(h);!(e=(o=u.next()).done);e=!0){var a=o.value;if(-1!==t.indexOf(a))return p()}}catch(i){n=!0,r=i}finally{try{e||null==u.return||u.return()}finally{if(n)throw r}}})}return(n=function(e){function n(e){var r;return o(this,n),(r=a(this,i(n).call(this,e))).retry=function(){r.setState({error:null,loading:!0,timedOut:!1}),s=t(d.loader),r._loadModule()},p(),r.state={error:s.error,pastDelay:!1,timedOut:!1,loading:s.loading,loaded:s.loaded},r}return l(n,e),u(n,[{key:"UNSAFE_componentWillMount",value:function(){this._mounted=!0,this._loadModule()}},{key:"_loadModule",value:function(){var t=this;if(this.context&&r(d.modules)&&d.modules.forEach(function(e){t.context(e)}),s.loading){"number"===typeof d.delay&&(0===d.delay?this.setState({pastDelay:!0}):this._delay=setTimeout(function(){t.setState({pastDelay:!0})},d.delay)),"number"===typeof d.timeout&&(this._timeout=setTimeout(function(){t.setState({timedOut:!0})},d.timeout));var e=function(){t._mounted&&(t.setState({error:s.error,loaded:s.loaded,loading:s.loading}),t._clearTimeouts())};s.promise.then(function(){e()}).catch(function(t){e()})}}},{key:"componentWillUnmount",value:function(){this._mounted=!1,this._clearTimeouts()}},{key:"_clearTimeouts",value:function(){clearTimeout(this._delay),clearTimeout(this._timeout)}},{key:"render",value:function(){return this.state.loading||this.state.error?m.default.createElement(d.loading,{isLoading:this.state.loading,pastDelay:this.state.pastDelay,timedOut:this.state.timedOut,error:this.state.error,retry:this.retry}):this.state.loaded?d.render(this.state.loaded,this.props):null}}],[{key:"preload",value:function(){return p()}}]),n}(m.default.Component)).contextType=y.LoadableContext,n}function E(t){return M(g,t)}function O(t,e){for(var n=[];t.length;){var r=t.pop();n.push(r(e))}return d.all(n).then(function(){if(t.length)return O(t,e)})}E.Map=function(t){if("function"!==typeof t.render)throw new Error("LoadableMap requires a `render(loaded, props)` function");return M(w,t)},E.preloadAll=function(){return new d(function(t,e){O(v).then(t,e)})},E.preloadReady=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new d(function(e){var n=function(){return b=!0,e()};O(_,t).then(n,n)})},window.__NEXT_PRELOADREADY=E.preloadReady,e.default=E},"0iUn":function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",function(){return r})},"AT/M":function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",function(){return r})},MI3g:function(t,e,n){"use strict";var r=n("XVgq"),o=n.n(r),u=n("Z7t5"),a=n.n(u);function i(t){return(i="function"===typeof a.a&&"symbol"===typeof o.a?function(t){return typeof t}:function(t){return t&&"function"===typeof a.a&&t.constructor===a.a&&t!==a.a.prototype?"symbol":typeof t})(t)}function l(t){return(l="function"===typeof a.a&&"symbol"===i(o.a)?function(t){return i(t)}:function(t){return t&&"function"===typeof a.a&&t.constructor===a.a&&t!==a.a.prototype?"symbol":i(t)})(t)}var c=n("AT/M");function f(t,e){return!e||"object"!==l(e)&&"function"!==typeof e?Object(c.a)(t):e}n.d(e,"a",function(){return f})},Q0KE:function(t,e,n){"use strict";var r=n("hfKm"),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};r(e,"__esModule",{value:!0});var u=o(n("q1tI"));e.LoadableContext=u.createContext(null)},RNiq:function(t,e,n){"use strict";n.r(e);var r,o,u=n("0iUn"),a=n("MI3g"),i=n("a7VT"),l=n("AT/M"),c=n("Tit0"),f=n("vYYK"),d=(n("00et"),n("q1tI")),s=n.n(d),p=n("m/Pd"),h=n.n(p),m=n("UgXd"),y=n.n(m),v=s.a.createElement,_=y()(function(){return Promise.all([n.e(0),n.e(7)]).then(n.bind(null,"3aVm"))},{ssr:!1,loadableGenerated:{webpack:function(){return["3aVm"]},modules:["../components/App"]}}),b=(o=r=function(t){function e(t,n){var r;return Object(u.a)(this,e),r=Object(a.a)(this,Object(i.a)(e).call(this,t,n)),Object(f.a)(Object(l.a)(r),"render",function(){return v(s.a.Fragment,null,v(h.a,null,v("title",null,"React Native Performance Monitor"),v("link",{href:"https://fonts.googleapis.com/css?family=Roboto&display=swap",rel:"stylesheet"})),v(_||"div",null))}),r.state={},r}return Object(c.a)(e,t),e}(s.a.Component),Object(f.a)(r,"displayName","HomePage"),o);e.default=b},Tit0:function(t,e,n){"use strict";var r=n("SqZg"),o=n.n(r),u=n("TRZx"),a=n.n(u);function i(t,e){return(i=a.a||function(t,e){return t.__proto__=e,t})(t,e)}function l(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=o()(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}n.d(e,"a",function(){return l})},UgXd:function(t,e,n){"use strict";var r=n("pLtp"),o=n("UXZV"),u=n("eVuF"),a=n("hfKm"),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};a(e,"__esModule",{value:!0});var l=i(n("q1tI")),c=i(n("0KLy")),f=!1;function d(t,e){if(delete e.webpack,delete e.modules,!f)return t(e);var n=e.loading;return function(){return l.default.createElement(n,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}}e.noSSR=d,e.default=function(t,e){var n=c.default,a={loading:function(t){return t.error,t.isLoading,t.pastDelay,null}};if(t instanceof u?a.loader=function(){return t}:"function"===typeof t?a.loader=t:"object"===typeof t&&(a=o({},a,t)),a=o({},a,e),"object"===typeof t&&!(t instanceof u)&&(t.render&&(a.render=function(e,n){return t.render(n,e)}),t.modules)){n=c.default.Map;var i={},l=t.modules();r(l).forEach(function(t){var e=l[t];"function"!==typeof e.then?i[t]=e:i[t]=function(){return e.then(function(t){return t.default||t})}}),a.loader=i}if(a.loadableGenerated&&delete(a=o({},a,a.loadableGenerated)).loadableGenerated,"boolean"===typeof a.ssr){if(!a.ssr)return delete a.ssr,d(n,a);delete a.ssr}return n(a)}},a7VT:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("Bhuq"),o=n.n(r),u=n("TRZx"),a=n.n(u);function i(t){return(i=a.a?o.a:function(t){return t.__proto__||o()(t)})(t)}},vYYK:function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n("hfKm"),o=n.n(r);function u(t,e,n){return e in t?o()(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},vlRD:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){var t=n("RNiq");return{page:t.default||t}}])}},[["vlRD",1,0,6]]]); -------------------------------------------------------------------------------- /lib/src/out/_next/static/runtime/webpack-16e2a0cf47a7cc8e9de0.js: -------------------------------------------------------------------------------- 1 | !function(e){function r(r){for(var n,a,i=r[0],c=r[1],l=r[2],p=0,s=[];p{\n if (d.data.length > maxNum) {\n maxNum = d.data.length;\n maxIndex = i;\n }\n })\n let arr = [];\n _.each(datas[maxIndex].data, (i)=>{ // row\n let obj = {};\n _.each(datas,(data)=>{ // column\n obj[data.seriesname] = data.data[i];\n })\n arr.push(obj);\n })\n console.log(arr)\n}\ntoCSV(exampleState)\nconst defaultState = {\n dataSource: {\n chart: {\n caption: 'React Native Render Times',\n subcaption: 'Performance experiments',\n yaxisname: 'Render time (ms)',\n drawcrossline: '1',\n theme: 'fusion',\n showvalues: '0',\n 'palettecolors': colors.map(c => c.replace('#', '')).join(','),\n },\n categories: [\n {\n category: [],\n },\n ],\n dataset: [\n {\n seriesname: 'Baseline test',\n data: [],\n },\n ],\n },\n};\nexport default class extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n ..._.cloneDeep(defaultState),\n type: 'overlappedcolumn2d',\n };\n }\n\n componentDidMount() {\n this.socket = new WebSocket('ws://localhost:8126');\n this.socket.onopen = function(event) {\n console.log('Connected');\n };\n\n this.socket.onmessage = (event) => {\n try {\n if (!this.state.paused) {\n this.addItem(JSON.parse(event.data).value);\n }\n } catch (e) {\n }\n };\n }\n\n sendRemount = () => {\n this.socket.send('remount');\n };\n\n sendForceUpdate = () => {\n this.socket.send('forceUpdate');\n };\n\n addItem = (value = Math.random()) => {\n if (!this.state.dataSource.dataset.length) {\n this.addSeries();\n }\n if (this.state.dataSource.categories[0].category.length === this.state.dataSource.dataset[this.state.dataSource.dataset.length - 1].data.length) {\n this.addCategory();\n }\n this.state.dataSource.dataset[this.state.dataSource.dataset.length - 1].data.push({\n value,\n });\n const averages = [];\n _.each(this.state.dataSource.dataset, (dataSet) => {\n let total = 0;\n _.each(dataSet.data, (item) => {\n total += item.value;\n });\n averages.push(total / dataSet.data.length);\n });\n this.state.dataSource.trendlines = averages.map((v, i) => {\n return {\n 'line': [{\n 'color': colors[i],\n 'thickness': '4',\n startValue: v,\n 'alpha': '50',\n }],\n };\n }).concat([{\n line: [{\n 'color': '#ff0000',\n 'thickness': '2',\n startValue: 16.67,\n 'alpha': '100',\n }],\n }]);\n this.forceUpdate();\n };\n\n addCategory = () => {\n this.state.dataSource.categories[0].category.push({\n label: `Test${this.state.dataSource.categories[0].category.length + 1}`,\n });\n };\n\n addSeries = () => {\n this.state.dataSource.dataset.push({\n seriesname: `Variant ${this.state.dataSource.dataset.length + 1}`,\n data: [],\n });\n this.forceUpdate();\n };\n\n setVariantName = (i, e) => {\n this.state.dataSource.dataset[i].seriesname = parseInput(e);\n this.forceUpdate();\n };\n\n removeSeries = (i) => {\n this.state.dataSource.dataset.splice(i, 1);\n this.forceUpdate();\n };\n\n clear = () => {\n this.setState(_.cloneDeep(defaultState));\n };\n\n toggle = () => this.setState({ hideMenu: !this.state.hideMenu });\n\n pauseResume = () => this.setState({ paused: !this.state.paused });\n\n\n repeat = (cb, times) => {\n const rep = function(e, currentTimes = 0) {\n if (currentTimes < times) {\n cb();\n setTimeout(() => {\n rep(null, currentTimes + 1);\n }, 200);\n }\n };\n return rep;\n };\n\n render() {\n const datasets = this.state.dataSource.dataset;\n return (\n
\n
\n
\n
\n {datasets && datasets.map((d, i) => (\n \n this.setVariantName(i, e)} type=\"text\"\n value={d.seriesname}\n />\n \n \n ))}\n
\n \n
\n
\n \n
\n
\n
\n Remount\n \n x5\n \n x10\n \n
\n
\n Force Update\n \n x5\n \n x10\n \n
\n
\n \n
\n\n
\n
\n
\n \n \n \n
\n
\n \n
\n
\n
\n
\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAGA;AACA;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA;AASA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAFA;AAIA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AADA;AAQA;AACA;AACA;AACA;AACA;AAJA;AADA;AAOA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA9BA;AA+BA;AAAA;AAhCA;AACA;AAkCA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAPA;AASA;AAEA;AADA;AAIA;AAEA;AACA;AAFA;AAhBA;AADA;AACA;;;;;;AAwBA;AAAA;AACA;AADA;AACA;AAAA;AACA;AAFA;AAyBA;AACA;AACA;AA3BA;AA6BA;AACA;AACA;AA/BA;AAgCA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AADA;AACA;AAEA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AADA;AAQA;AACA;AACA;AACA;AACA;AACA;AAJA;AADA;AACA;AAOA;AACA;AACA;AArEA;AAuEA;AACA;AADA;AAGA;AACA;AA3EA;AA6EA;AACA;AACA;AAFA;AACA;AAGA;AACA;AACA;AAnFA;AAqFA;AACA;AAAA;AACA;AACA;AAxFA;AA0FA;AACA;AAAA;AACA;AACA;AA7FA;AA+FA;AACA;AACA;AAjGA;AAkGA;AAAA;AAAA;AAAA;AACA;AAnGA;AAoGA;AAAA;AAAA;AAAA;AACA;AArGA;AAwGA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAhHA;AAEA;AAFA;AAFA;AAMA;AACA;;;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;;;AA6FA;AAAA;AACA;AAAA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AAFA;AAIA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAPA;AAWA;AAAA;AACA;AAAA;AAAA;AAAA;AAIA;AAAA;AACA;AAAA;AAAA;AAAA;AAKA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AAFA;AAMA;AAAA;AAAA;AAAA;AAAA;AACA;AAFA;AAMA;AAAA;AAAA;AAAA;AAAA;AACA;AAFA;AAMA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AAFA;AAMA;AAAA;AAAA;AAAA;AAAA;AACA;AAFA;AAMA;AAAA;AAAA;AAAA;AAAA;AACA;AAFA;AAMA;AAAA;AACA;AAAA;AAAA;AAAA;AAIA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AAAA;AAGA;AAAA;AAEA;AACA;AACA;AACA;AACA;AALA;AAYA;;;;AA3MA;AACA;;;;;A","sourceRoot":""} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/1309a07e167cd90f16e2.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"7755ced386f8a6810890","c":{"static/development/pages/next/dist/pages/_error.js":false}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/1a028e58d02a1cbe8157.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"c7c5aa72fd3f42bb5a54","c":{"static/development/pages/next/dist/pages/_error.js":false}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/1deffcce0c5afe6bef4b.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"ec717fb6969292dbd289","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/1e52cdaa9a85d672500d.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"447a0338d5a663fb884e","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/21fed783fe759bf51d11.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"bebeb0c60940250d62f4","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/23829e4e7eeb50cab2d6.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"bb577f19cd2d2d539529","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/31b45cf8e50fee8a85d1.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"fdb4a33dc111461a2cd7","c":{}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/32642970c0399b0639d8.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"780f8d1522f82f68cf94","c":{"static/development/pages/next/dist/pages/_error.js":false}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/3395b2ce497dd104a121.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"616e5a121013bcde76ba","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/33da84811c6939f7ac6c.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"c3628e0056f38df9e32b","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/39ba7e7518aa4766c230.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"a15415acd6976face82a","c":{}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/3d5140a5a1a71cf12a6d.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"88bd8fdfc58fdbb67ddf","c":{"styles":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/3fa16ba43acabb849d68.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"8e0604c61a829da4f782","c":{"styles":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/403e0939ec7300598fef.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"08fcba56993a699ce6f5","c":{}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/42fe28cddaa9be39c351.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"c0c5103514ef8d180bc3","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/447a0338d5a663fb884e.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"aa12ca2134e979d64898","c":{"static/development/pages/next/dist/pages/_error.js":false}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/555c28937e90eaa05854.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"568ede261edf8eafabd5","c":{"static/development/pages/next/dist/pages/_error.js":false}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/568ede261edf8eafabd5.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"c42d6f5d7f5841f00fd6","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/5c436e9d59cff5e09766.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"85f3c4e271ad49abd12f","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/616e5a121013bcde76ba.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"32642970c0399b0639d8","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/65dea86f28985764f94b.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"b6b480a9d2692119befd","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/6685b2d1cdb1d77a860f.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"39ba7e7518aa4766c230","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/6a6f1804fa284e636db5.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"cb3041fbb14d254b663c","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/7196ed18267d207e8355.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"8d8ccd3d87dd205bcfb0","c":{}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/7755ced386f8a6810890.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"23829e4e7eeb50cab2d6","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/780f8d1522f82f68cf94.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"7196ed18267d207e8355","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/7866967fb674034e2b06.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"df90ca6980e244fe59bc","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/7af78a5280f86a4532e8.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"a190b90158b135ad83b9","c":{}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/827e5f13d4c98f2562cd.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"1e52cdaa9a85d672500d","c":{}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/85f3c4e271ad49abd12f.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"21fed783fe759bf51d11","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/88bd8fdfc58fdbb67ddf.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"1309a07e167cd90f16e2","c":{"styles":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/893da24220ee44ad4d73.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"1a028e58d02a1cbe8157","c":{}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/8d8ccd3d87dd205bcfb0.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"db5039496243fbf355f5","c":{"static/development/pages/next/dist/pages/_error.js":false}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/8e0604c61a829da4f782.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"3d5140a5a1a71cf12a6d","c":{"styles":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/95a6e8a591b119fbb637.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"1deffcce0c5afe6bef4b","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/9afab8942d831961cad9.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"e93bdf4d68b21dfba1a4","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/9e89e0c63d9e16ead213.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"42fe28cddaa9be39c351","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/9e8a5e6cd11447efbd3c.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"ccc4f1859c36d4d53f74","c":{"mini-css-extract-plugin":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/a092bf324d2adc3ef860.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"46b6c1e862659c79d025","c":{}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/a15415acd6976face82a.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"555c28937e90eaa05854","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/a190b90158b135ad83b9.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"7866967fb674034e2b06","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/a37eeb0f5ae590708f73.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"893da24220ee44ad4d73","c":{}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/a3a6baa7fa2e1b903021.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"cec2138c7f281f9e5271","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/a8f67ac1f285978e68f9.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"5c436e9d59cff5e09766","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/aa12ca2134e979d64898.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"02654a81564b96007b41","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/ababb3263f694de5e6fe.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"403e0939ec7300598fef","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/af9b444eb7748826365d.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"be53f6fc508de50bc4fc","c":{"mini-css-extract-plugin":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/b613f800872fed519876.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"33da84811c6939f7ac6c","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/b6b480a9d2692119befd.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"cdf51446313f959f6a30","c":{"static/development/pages/next/dist/pages/_error.js":false}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/b8c8468287f5a77004e2.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"a3a6baa7fa2e1b903021","c":{}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/b9b55e5b85ce34371374.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"3fa16ba43acabb849d68","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/bb577f19cd2d2d539529.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"a092bf324d2adc3ef860","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/be53f6fc508de50bc4fc.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"0f1826398b6d60e9b74c","c":{"mini-css-extract-plugin":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/bebeb0c60940250d62f4.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"b9b55e5b85ce34371374","c":{"styles":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/c0c5103514ef8d180bc3.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"65dea86f28985764f94b","c":{}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/c3628e0056f38df9e32b.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"7af78a5280f86a4532e8","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/c42d6f5d7f5841f00fd6.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"a8f67ac1f285978e68f9","c":{}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/c7c5aa72fd3f42bb5a54.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"6a6f1804fa284e636db5","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/cb3041fbb14d254b663c.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"0b6f2e79370d5ff2a489","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/ccc4f1859c36d4d53f74.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"af9b444eb7748826365d","c":{"mini-css-extract-plugin":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/cdf51446313f959f6a30.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"9afab8942d831961cad9","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/ce7da9017a53d4e858b9.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"e4bead25e40861bc0f3a","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/cec2138c7f281f9e5271.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"6685b2d1cdb1d77a860f","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/db5039496243fbf355f5.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"31b45cf8e50fee8a85d1","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/df90ca6980e244fe59bc.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"95a6e8a591b119fbb637","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/e4bead25e40861bc0f3a.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"b8c8468287f5a77004e2","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/e93bdf4d68b21dfba1a4.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"827e5f13d4c98f2562cd","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/ec717fb6969292dbd289.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"3395b2ce497dd104a121","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/f59105aeaf8fc8dd6e90.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"b613f800872fed519876","c":{"1":true}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/fdb4a33dc111461a2cd7.hot-update.json: -------------------------------------------------------------------------------- 1 | {"h":"ababb3263f694de5e6fe","c":{"static/development/pages/next/dist/pages/_error.js":false}} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/styles.3d5140a5a1a71cf12a6d.hot-update.js: -------------------------------------------------------------------------------- 1 | webpackHotUpdate("styles",{ 2 | 3 | /***/ "./styles/styles.scss": 4 | /*!****************************!*\ 5 | !*** ./styles/styles.scss ***! 6 | \****************************/ 7 | /*! no static exports found */ 8 | /***/ (function(module, exports, __webpack_require__) { 9 | 10 | // extracted by mini-css-extract-plugin; 11 | if (true) { 12 | var injectCss = function injectCss(prev, href) { 13 | var link = prev.cloneNode(); 14 | link.href = href; 15 | link.onload = function() { 16 | prev.parentNode.removeChild(prev); 17 | }; 18 | prev.stale = true; 19 | prev.parentNode.insertBefore(link, prev); 20 | }; 21 | module.hot.dispose(function() { 22 | window.__webpack_reload_css__ = true; 23 | }); 24 | if (window.__webpack_reload_css__) { 25 | module.hot.__webpack_reload_css__ = false; 26 | console.log("[HMR] Reloading stylesheets..."); 27 | var prefix = document.location.protocol + '//' + document.location.host; 28 | document 29 | .querySelectorAll("link[href][rel=stylesheet]") 30 | .forEach(function(link) { 31 | if (!link.href.match(prefix) || link.stale) return; 32 | injectCss(link, link.href.split("?")[0] + "?unix=1586294319475"); 33 | }); 34 | } 35 | } 36 | 37 | 38 | /***/ }) 39 | 40 | }) 41 | //# sourceMappingURL=styles.3d5140a5a1a71cf12a6d.hot-update.js.map -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/styles.3d5140a5a1a71cf12a6d.hot-update.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"static/webpack/styles.3d5140a5a1a71cf12a6d.hot-update.js","sources":["webpack:///./styles/styles.scss?8426"],"sourcesContent":["// extracted by mini-css-extract-plugin;\n if (module.hot) {\n var injectCss = function injectCss(prev, href) {\n var link = prev.cloneNode();\n link.href = href;\n link.onload = function() {\n prev.parentNode.removeChild(prev);\n };\n prev.stale = true;\n prev.parentNode.insertBefore(link, prev);\n };\n module.hot.dispose(function() {\n window.__webpack_reload_css__ = true;\n });\n if (window.__webpack_reload_css__) {\n module.hot.__webpack_reload_css__ = false;\n console.log(\"[HMR] Reloading stylesheets...\");\n var prefix = document.location.protocol + '//' + document.location.host;\n document\n .querySelectorAll(\"link[href][rel=stylesheet]\")\n .forEach(function(link) {\n if (!link.href.match(prefix) || link.stale) return;\n injectCss(link, link.href.split(\"?\")[0] + \"?unix=1586294319475\");\n });\n }\n }\n "],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/styles.3fa16ba43acabb849d68.hot-update.js: -------------------------------------------------------------------------------- 1 | webpackHotUpdate("styles",{ 2 | 3 | /***/ "./styles/styles.scss": 4 | /*!****************************!*\ 5 | !*** ./styles/styles.scss ***! 6 | \****************************/ 7 | /*! no static exports found */ 8 | /***/ (function(module, exports, __webpack_require__) { 9 | 10 | // extracted by mini-css-extract-plugin; 11 | if (true) { 12 | var injectCss = function injectCss(prev, href) { 13 | var link = prev.cloneNode(); 14 | link.href = href; 15 | link.onload = function() { 16 | prev.parentNode.removeChild(prev); 17 | }; 18 | prev.stale = true; 19 | prev.parentNode.insertBefore(link, prev); 20 | }; 21 | module.hot.dispose(function() { 22 | window.__webpack_reload_css__ = true; 23 | }); 24 | if (window.__webpack_reload_css__) { 25 | module.hot.__webpack_reload_css__ = false; 26 | console.log("[HMR] Reloading stylesheets..."); 27 | var prefix = document.location.protocol + '//' + document.location.host; 28 | document 29 | .querySelectorAll("link[href][rel=stylesheet]") 30 | .forEach(function(link) { 31 | if (!link.href.match(prefix) || link.stale) return; 32 | injectCss(link, link.href.split("?")[0] + "?unix=1586294294128"); 33 | }); 34 | } 35 | } 36 | 37 | 38 | /***/ }) 39 | 40 | }) 41 | //# sourceMappingURL=styles.3fa16ba43acabb849d68.hot-update.js.map -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/styles.3fa16ba43acabb849d68.hot-update.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"static/webpack/styles.3fa16ba43acabb849d68.hot-update.js","sources":["webpack:///./styles/styles.scss?8426"],"sourcesContent":["// extracted by mini-css-extract-plugin;\n if (module.hot) {\n var injectCss = function injectCss(prev, href) {\n var link = prev.cloneNode();\n link.href = href;\n link.onload = function() {\n prev.parentNode.removeChild(prev);\n };\n prev.stale = true;\n prev.parentNode.insertBefore(link, prev);\n };\n module.hot.dispose(function() {\n window.__webpack_reload_css__ = true;\n });\n if (window.__webpack_reload_css__) {\n module.hot.__webpack_reload_css__ = false;\n console.log(\"[HMR] Reloading stylesheets...\");\n var prefix = document.location.protocol + '//' + document.location.host;\n document\n .querySelectorAll(\"link[href][rel=stylesheet]\")\n .forEach(function(link) {\n if (!link.href.match(prefix) || link.stale) return;\n injectCss(link, link.href.split(\"?\")[0] + \"?unix=1586294294128\");\n });\n }\n }\n "],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/styles.88bd8fdfc58fdbb67ddf.hot-update.js: -------------------------------------------------------------------------------- 1 | webpackHotUpdate("styles",{ 2 | 3 | /***/ "./styles/styles.scss": 4 | /*!****************************!*\ 5 | !*** ./styles/styles.scss ***! 6 | \****************************/ 7 | /*! no static exports found */ 8 | /***/ (function(module, exports, __webpack_require__) { 9 | 10 | // extracted by mini-css-extract-plugin; 11 | if (true) { 12 | var injectCss = function injectCss(prev, href) { 13 | var link = prev.cloneNode(); 14 | link.href = href; 15 | link.onload = function() { 16 | prev.parentNode.removeChild(prev); 17 | }; 18 | prev.stale = true; 19 | prev.parentNode.insertBefore(link, prev); 20 | }; 21 | module.hot.dispose(function() { 22 | window.__webpack_reload_css__ = true; 23 | }); 24 | if (window.__webpack_reload_css__) { 25 | module.hot.__webpack_reload_css__ = false; 26 | console.log("[HMR] Reloading stylesheets..."); 27 | var prefix = document.location.protocol + '//' + document.location.host; 28 | document 29 | .querySelectorAll("link[href][rel=stylesheet]") 30 | .forEach(function(link) { 31 | if (!link.href.match(prefix) || link.stale) return; 32 | injectCss(link, link.href.split("?")[0] + "?unix=1586294374521"); 33 | }); 34 | } 35 | } 36 | 37 | 38 | /***/ }) 39 | 40 | }) 41 | //# sourceMappingURL=styles.88bd8fdfc58fdbb67ddf.hot-update.js.map -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/styles.88bd8fdfc58fdbb67ddf.hot-update.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"static/webpack/styles.88bd8fdfc58fdbb67ddf.hot-update.js","sources":["webpack:///./styles/styles.scss?8426"],"sourcesContent":["// extracted by mini-css-extract-plugin;\n if (module.hot) {\n var injectCss = function injectCss(prev, href) {\n var link = prev.cloneNode();\n link.href = href;\n link.onload = function() {\n prev.parentNode.removeChild(prev);\n };\n prev.stale = true;\n prev.parentNode.insertBefore(link, prev);\n };\n module.hot.dispose(function() {\n window.__webpack_reload_css__ = true;\n });\n if (window.__webpack_reload_css__) {\n module.hot.__webpack_reload_css__ = false;\n console.log(\"[HMR] Reloading stylesheets...\");\n var prefix = document.location.protocol + '//' + document.location.host;\n document\n .querySelectorAll(\"link[href][rel=stylesheet]\")\n .forEach(function(link) {\n if (!link.href.match(prefix) || link.stale) return;\n injectCss(link, link.href.split(\"?\")[0] + \"?unix=1586294374521\");\n });\n }\n }\n "],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/styles.8e0604c61a829da4f782.hot-update.js: -------------------------------------------------------------------------------- 1 | webpackHotUpdate("styles",{ 2 | 3 | /***/ "./styles/styles.scss": 4 | /*!****************************!*\ 5 | !*** ./styles/styles.scss ***! 6 | \****************************/ 7 | /*! no static exports found */ 8 | /***/ (function(module, exports, __webpack_require__) { 9 | 10 | // extracted by mini-css-extract-plugin; 11 | if (true) { 12 | var injectCss = function injectCss(prev, href) { 13 | var link = prev.cloneNode(); 14 | link.href = href; 15 | link.onload = function() { 16 | prev.parentNode.removeChild(prev); 17 | }; 18 | prev.stale = true; 19 | prev.parentNode.insertBefore(link, prev); 20 | }; 21 | module.hot.dispose(function() { 22 | window.__webpack_reload_css__ = true; 23 | }); 24 | if (window.__webpack_reload_css__) { 25 | module.hot.__webpack_reload_css__ = false; 26 | console.log("[HMR] Reloading stylesheets..."); 27 | var prefix = document.location.protocol + '//' + document.location.host; 28 | document 29 | .querySelectorAll("link[href][rel=stylesheet]") 30 | .forEach(function(link) { 31 | if (!link.href.match(prefix) || link.stale) return; 32 | injectCss(link, link.href.split("?")[0] + "?unix=1586294314314"); 33 | }); 34 | } 35 | } 36 | 37 | 38 | /***/ }) 39 | 40 | }) 41 | //# sourceMappingURL=styles.8e0604c61a829da4f782.hot-update.js.map -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/styles.8e0604c61a829da4f782.hot-update.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"static/webpack/styles.8e0604c61a829da4f782.hot-update.js","sources":["webpack:///./styles/styles.scss?8426"],"sourcesContent":["// extracted by mini-css-extract-plugin;\n if (module.hot) {\n var injectCss = function injectCss(prev, href) {\n var link = prev.cloneNode();\n link.href = href;\n link.onload = function() {\n prev.parentNode.removeChild(prev);\n };\n prev.stale = true;\n prev.parentNode.insertBefore(link, prev);\n };\n module.hot.dispose(function() {\n window.__webpack_reload_css__ = true;\n });\n if (window.__webpack_reload_css__) {\n module.hot.__webpack_reload_css__ = false;\n console.log(\"[HMR] Reloading stylesheets...\");\n var prefix = document.location.protocol + '//' + document.location.host;\n document\n .querySelectorAll(\"link[href][rel=stylesheet]\")\n .forEach(function(link) {\n if (!link.href.match(prefix) || link.stale) return;\n injectCss(link, link.href.split(\"?\")[0] + \"?unix=1586294314314\");\n });\n }\n }\n "],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""} -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/styles.bebeb0c60940250d62f4.hot-update.js: -------------------------------------------------------------------------------- 1 | webpackHotUpdate("styles",{ 2 | 3 | /***/ "./styles/styles.scss": 4 | /*!****************************!*\ 5 | !*** ./styles/styles.scss ***! 6 | \****************************/ 7 | /*! no static exports found */ 8 | /***/ (function(module, exports, __webpack_require__) { 9 | 10 | // extracted by mini-css-extract-plugin; 11 | if (true) { 12 | var injectCss = function injectCss(prev, href) { 13 | var link = prev.cloneNode(); 14 | link.href = href; 15 | link.onload = function() { 16 | prev.parentNode.removeChild(prev); 17 | }; 18 | prev.stale = true; 19 | prev.parentNode.insertBefore(link, prev); 20 | }; 21 | module.hot.dispose(function() { 22 | window.__webpack_reload_css__ = true; 23 | }); 24 | if (window.__webpack_reload_css__) { 25 | module.hot.__webpack_reload_css__ = false; 26 | console.log("[HMR] Reloading stylesheets..."); 27 | var prefix = document.location.protocol + '//' + document.location.host; 28 | document 29 | .querySelectorAll("link[href][rel=stylesheet]") 30 | .forEach(function(link) { 31 | if (!link.href.match(prefix) || link.stale) return; 32 | injectCss(link, link.href.split("?")[0] + "?unix=1586294251024"); 33 | }); 34 | } 35 | } 36 | 37 | 38 | /***/ }) 39 | 40 | }) 41 | //# sourceMappingURL=styles.bebeb0c60940250d62f4.hot-update.js.map -------------------------------------------------------------------------------- /lib/src/out/_next/static/webpack/styles.bebeb0c60940250d62f4.hot-update.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"static/webpack/styles.bebeb0c60940250d62f4.hot-update.js","sources":["webpack:///./styles/styles.scss?8426"],"sourcesContent":["// extracted by mini-css-extract-plugin;\n if (module.hot) {\n var injectCss = function injectCss(prev, href) {\n var link = prev.cloneNode();\n link.href = href;\n link.onload = function() {\n prev.parentNode.removeChild(prev);\n };\n prev.stale = true;\n prev.parentNode.insertBefore(link, prev);\n };\n module.hot.dispose(function() {\n window.__webpack_reload_css__ = true;\n });\n if (window.__webpack_reload_css__) {\n module.hot.__webpack_reload_css__ = false;\n console.log(\"[HMR] Reloading stylesheets...\");\n var prefix = document.location.protocol + '//' + document.location.host;\n document\n .querySelectorAll(\"link[href][rel=stylesheet]\")\n .forEach(function(link) {\n if (!link.href.match(prefix) || link.stale) return;\n injectCss(link, link.href.split(\"?\")[0] + \"?unix=1586294251024\");\n });\n }\n }\n "],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""} -------------------------------------------------------------------------------- /lib/src/out/index.html: -------------------------------------------------------------------------------- 1 | React Native Performance Monitor
-------------------------------------------------------------------------------- /lib/src/out/static/add.svg: -------------------------------------------------------------------------------- 1 | 2 | ionicons-v5-a 3 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /lib/src/out/static/close.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-m 2 | -------------------------------------------------------------------------------- /lib/src/out/static/menu.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-j -------------------------------------------------------------------------------- /lib/src/out/static/trash-bin.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-k 2 | -------------------------------------------------------------------------------- /lib/src/server.js: -------------------------------------------------------------------------------- 1 | const http = require('http'); 2 | const fs = require('fs'); 3 | const path = require('path'); 4 | const WebSocket = require('ws'); 5 | 6 | module.exports = function () { 7 | const wss = new WebSocket.Server({ 8 | port: 8126, 9 | }); 10 | 11 | http.createServer((request, response) => { 12 | if (request.url === '/value') { 13 | let body = []; 14 | request.on('data', (chunk) => { 15 | body.push(chunk); 16 | }).on('end', () => { 17 | body = Buffer.concat(body).toString(); 18 | wss.clients.forEach((client) => { 19 | if (client.readyState === WebSocket.OPEN) { 20 | client.send(body); 21 | } 22 | }); 23 | }); 24 | 25 | response.end(); 26 | } 27 | let filePath = `./out${request.url}`; 28 | if (filePath == './out/') filePath = './out/index.html'; 29 | filePath = path.join(__dirname, filePath); 30 | 31 | const extname = path.extname(filePath); 32 | let contentType = 'text/html'; 33 | switch (extname) { 34 | case '.js': 35 | contentType = 'text/javascript'; 36 | break; 37 | case '.css': 38 | contentType = 'text/css'; 39 | break; 40 | case '.json': 41 | contentType = 'application/json'; 42 | break; 43 | case '.png': 44 | contentType = 'image/png'; 45 | break; 46 | case '.jpg': 47 | contentType = 'image/jpg'; 48 | break; 49 | case '.svg': 50 | contentType = 'image/svg+xml'; 51 | break; 52 | case '.wav': 53 | contentType = 'audio/wav'; 54 | break; 55 | } 56 | fs.readFile(filePath, (error, content) => { 57 | if (error) { 58 | if (error.code == 'ENOENT') { 59 | fs.readFile('./404.html', (error, content) => { 60 | response.writeHead(200, { 'Content-Type': contentType }); 61 | response.end(content, 'utf-8'); 62 | }); 63 | } else { 64 | response.writeHead(500); 65 | response.end(`Sorry, check with the site admin for error: ${error.code} ..\n`); 66 | response.end(); 67 | } 68 | } else { 69 | response.writeHead(200, { 'Content-Type': contentType }); 70 | response.end(content, 'utf-8'); 71 | } 72 | }); 73 | }).listen(8125); 74 | 75 | wss.on('connection', (ws) => { 76 | ws.on('message', (data) => { 77 | wss.clients.forEach((client) => { 78 | if (client.readyState === WebSocket.OPEN) { 79 | client.send(data); 80 | } 81 | }); 82 | }); 83 | }); 84 | 85 | console.log('Server running at http://127.0.0.1:8125/'); 86 | }; 87 | -------------------------------------------------------------------------------- /lib/start-server.js: -------------------------------------------------------------------------------- 1 | module.exports = require('@oclif/command'); 2 | const server = require('./src/server'); 3 | 4 | server(); 5 | -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | const withSass = require('@zeit/next-sass'); 2 | const withCSS = require('@zeit/next-css'); 3 | 4 | const nextConfig = { 5 | // next-offline options 6 | exportTrailingSlash: true, 7 | exportPathMap() { 8 | return { 9 | '/': { page: '/' }, 10 | }; 11 | }, 12 | webpack: (config, { dev }) => { 13 | const base = dev ? require('./webpack/webpack.config.dev') : require('./webpack/webpack.config.prod'); 14 | if (base.plugins) { 15 | config.plugins = config.plugins.concat(base.plugins); 16 | } 17 | 18 | config.module.rules.push({ 19 | test: /\.md$/, 20 | use: 'raw-loader', 21 | }); 22 | 23 | return config; 24 | }, 25 | }; 26 | 27 | module.exports = withSass( 28 | withCSS(nextConfig), 29 | ); 30 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-performance-monitor", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "analyze": "cross-env BUNDLE_ANALYZE=true next build ", 8 | "dev": "node server.js", 9 | "env": "node ./bin/env.js", 10 | "build": "next build", 11 | "export": "next export -o lib/src/out", 12 | "start": "cross-env NODE_ENV=production npm run build && cross-env NODE_ENV=production node server.js", 13 | "lint": "eslint ." 14 | }, 15 | "keywords": [], 16 | "author": "", 17 | "license": "ISC", 18 | "dependencies": { 19 | "@babel/core": "^7.0.1", 20 | "@babel/polyfill": "^7.8.3", 21 | "@babel/register": "^7.0.0", 22 | "@zeit/next-css": "^1.0.1", 23 | "@zeit/next-sass": "^1.0.1", 24 | "babel-eslint": "10.0.1", 25 | "bootstrap": "4.3.1", 26 | "cacheable-response": "^2.0.1", 27 | "classnames": "^2.2.6", 28 | "cookie": "0.4.0", 29 | "eslint": "6.2.2", 30 | "eslint-config-airbnb": "17.1.0", 31 | "eslint-config-airbnb-base": "13.1.0", 32 | "eslint-config-prettier": "3.6.0", 33 | "eslint-plugin-import": "2.14.0", 34 | "eslint-plugin-jsx-a11y": "6.1.2", 35 | "eslint-plugin-prettier": "^3.0.0", 36 | "eslint-plugin-react": "7.11.1", 37 | "eslint-watch": "4.0.2", 38 | "express": "^4.17.1", 39 | "fs-extra": "8.1.0", 40 | "fusioncharts": "^3.15.0-sr.1", 41 | "lodash": "4.17.19", 42 | "merge-deep": "^3.0.3", 43 | "moment": "^2.24.0", 44 | "next": "9.0.4", 45 | "node-sass": "4.12.0", 46 | "prettier": "1.15.2", 47 | "prop-types": "15.7.2", 48 | "raw-loader": "^4.0.0", 49 | "react": "^16.8.4", 50 | "react-dom": "^16.8.4", 51 | "react-fusioncharts": "^3.1.1", 52 | "socket.io": "^2.4.0", 53 | "socket.io-client": "^2.3.0", 54 | "webpack": "4.38.0" 55 | }, 56 | "devDependencies": { 57 | "body-parser": "^1.19.0", 58 | "cors": "^2.8.5", 59 | "nodemon": "^1.19.1" 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /pages/index.js: -------------------------------------------------------------------------------- 1 | import '../styles/styles.scss'; 2 | import React from 'react'; 3 | import Head from 'next/head'; 4 | import dynamic from 'next/dynamic'; 5 | // This component depends on the client-only PDF library 6 | const App = dynamic(import('../components/App'), { ssr: false }); 7 | 8 | const HomePage = class extends React.Component { 9 | static displayName = 'HomePage'; 10 | 11 | constructor(props, context) { 12 | super(props, context); 13 | this.state = {}; 14 | } 15 | 16 | render = () => { 17 | return <> 18 | 19 | React Native Performance Monitor 20 | 21 | 22 | {App ? ( 23 | 24 | ) :
} 25 | ; 26 | }; 27 | }; 28 | 29 | export default HomePage; 30 | 31 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | import { join } from 'path'; 2 | import cacheableResponse from 'cacheable-response'; 3 | import express from 'express'; 4 | import bodyParser from 'body-parser'; 5 | 6 | require('@babel/polyfill'); 7 | 8 | const next = require('next'); 9 | const port = parseInt(process.env.PORT, 10) || 3000; 10 | const dev = process.env.NODE_ENV !== 'production'; 11 | const app = next({ dev }); 12 | const handle = app.getRequestHandler(); 13 | 14 | const IS_SSR_CACHE_ENABLED = !dev; // TODO move to config 15 | 16 | // TODO: move to config 17 | // Default 1 hour ttl 18 | const ssrCache = (ttl) => { 19 | return cacheableResponse({ 20 | ttl, // 1hour 21 | get: async ({ req, res, pagePath, queryParams }) => { 22 | console.log('Caching', req.url); // eslint-disable-line no-console 23 | return ({ 24 | data: await app.renderToHTML(req, res, pagePath, queryParams), 25 | }); 26 | }, 27 | send: ({ data, res }) => res.send(data), 28 | }); 29 | }; 30 | 31 | Promise.all([ 32 | app.prepare(), 33 | ]).then(() => { 34 | const server = express(); 35 | 36 | const sw = join(__dirname, '.next/service-worker.js'); 37 | const favicon = join(__dirname, '/static/images/favicon.ico'); 38 | const sitemap = join(__dirname, '/static/sitemap.xml'); 39 | const robots = join(__dirname, '/static/robots.txt'); 40 | const apple = join(__dirname, '/static/apple-app-site-association'); 41 | 42 | server.get('/sitemap.xml', (req, res) => { 43 | app.serveStatic(req, res, sitemap); 44 | }); 45 | 46 | server.get('/robots.txt', (req, res) => { 47 | app.serveStatic(req, res, robots); 48 | }); 49 | 50 | 51 | server.get('/favicon.ico', (req, res) => { 52 | app.serveStatic(req, res, favicon); 53 | }); 54 | 55 | server.get('/service-worker.js', (req, res) => { 56 | app.serveStatic(req, res, sw); 57 | }); 58 | 59 | server.get('/apple-app-site-association', (req, res) => { 60 | // req.setHeader('Content-Type', 'application/json'); 61 | res.setHeader('Content-Type', 'application/json'); 62 | app.serveStatic(req, res, apple); 63 | }); 64 | 65 | if (IS_SSR_CACHE_ENABLED) { 66 | const homeCache = ssrCache(1000 * 60 * 60); 67 | server.get('/', (req, res) => { 68 | const queryParams = { id: req.params.id }; 69 | const pagePath = '/'; 70 | return homeCache({ req, res, pagePath, queryParams }); 71 | }); 72 | } 73 | 74 | server.post('/value', bodyParser.json(), (req, res) => { 75 | if (req?.body?.value) { 76 | io.emit('data', req.body.value); 77 | } 78 | res.send(''); 79 | }); 80 | 81 | server.get('*', (req, res) => handle(req, res)); 82 | 83 | const serverInstance = server.listen(port, (err) => { 84 | if (err) throw err; 85 | console.log(`> Ready on http://localhost:${port}`); // eslint-disable-line no-console 86 | }); 87 | 88 | const io = require('socket.io')(serverInstance); 89 | }); 90 | -------------------------------------------------------------------------------- /static/add.svg: -------------------------------------------------------------------------------- 1 | 2 | ionicons-v5-a 3 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /static/close.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-m 2 | -------------------------------------------------------------------------------- /static/menu.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-j -------------------------------------------------------------------------------- /static/trash-bin.svg: -------------------------------------------------------------------------------- 1 | ionicons-v5-k 2 | -------------------------------------------------------------------------------- /styles/3rdParty/_bootstrap.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v4.1.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 8 | //@import "~bootstrap/scss/functions"; 9 | @import "../variables"; 10 | @import "~bootstrap/scss/mixins"; 11 | @import "~bootstrap/scss/root"; 12 | @import "~bootstrap/scss/reboot"; 13 | @import "~bootstrap/scss/type"; 14 | @import "~bootstrap/scss/images"; 15 | //@import "~bootstrap/scss/code"; 16 | @import "~bootstrap/scss/grid"; 17 | //@import "~bootstrap/scss/tables"; 18 | @import "~bootstrap/scss/forms"; 19 | @import "~bootstrap/scss/buttons"; 20 | //@import "~bootstrap/scss/transitions"; 21 | //@import "~bootstrap/scss/dropdown"; 22 | //@import "~bootstrap/scss/button-group"; 23 | @import "~bootstrap/scss/input-group"; 24 | //@import "~bootstrap/scss/custom-forms"; 25 | //@import "~bootstrap/scss/nav"; 26 | //@import "~bootstrap/scss/navbar"; 27 | //@import "~bootstrap/scss/card"; 28 | //@import "~bootstrap/scss/breadcrumb"; 29 | //@import "~bootstrap/scss/pagination"; 30 | //@import "~bootstrap/scss/badge"; 31 | //@import "~bootstrap/scss/jumbotron"; 32 | //@import "~bootstrap/scss/alert"; 33 | //@import "~bootstrap/scss/progress"; 34 | @import "~bootstrap/scss/media"; 35 | //@import "~bootstrap/scss/list-group"; 36 | //@import "~bootstrap/scss/close"; 37 | //@import "~bootstrap/scss/modal"; 38 | //@import "~bootstrap/scss/tooltip"; 39 | //@import "~bootstrap/scss/popover"; 40 | //@import "~bootstrap/scss/carousel"; 41 | @import "~bootstrap/scss/utilities"; 42 | @import "~bootstrap/scss/print"; 43 | 44 | 45 | 46 | // Responsive visibility utilities 47 | 48 | @each $bp in map-keys($grid-breakpoints) { 49 | .hidden-#{$bp}-up { 50 | @include media-breakpoint-up($bp) { 51 | display: none !important; 52 | } 53 | } 54 | .hidden-#{$bp}-down { 55 | @include media-breakpoint-down($bp) { 56 | display: none !important; 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /styles/3rdParty/_index.scss: -------------------------------------------------------------------------------- 1 | @import "bootstrap"; 2 | -------------------------------------------------------------------------------- /styles/_variables.scss: -------------------------------------------------------------------------------- 1 | @import "~bootstrap/scss/functions"; 2 | @import "~bootstrap/scss/mixins"; 3 | @import "~bootstrap/scss/variables"; 4 | 5 | // Adding fonts 6 | //@font-face { 7 | // font-family: 'Proxima Nova'; 8 | // src: url('/static/fonts/Proxima-Nova-Regular.woff'); 9 | // font-display:swap; 10 | //} 11 | //@font-face { 12 | // font-family: 'Proxima Nova'; 13 | // src: url('/static/fonts/Proxima-Nova-Semibold.woff'); 14 | // font-weight:bold; 15 | // font-display:swap; 16 | //} 17 | //@font-face { 18 | // font-family: 'Proxima Nova Bold'; 19 | // src: url('/static/fonts/Proxima-Nova-Semibold.woff'); 20 | // font-display:swap; 21 | //} 22 | 23 | // COLORS 24 | $brand-primary: #0d65df; 25 | $danger: #b02c47; 26 | $link-color: #05499b; 27 | $body-bg: #f2f3f8; 28 | $body-bg-alt: #fff; 29 | //$sidebar-bg: #23414b; 30 | $sidebar-bg: #292f3a; 31 | $button-background: #37414b; 32 | $button-secondary-background: #414b64; 33 | $button-color: #ebf0f6; 34 | -------------------------------------------------------------------------------- /styles/styles.scss: -------------------------------------------------------------------------------- 1 | @import "variables"; 2 | @import "3rdParty/index"; 3 | $menu-width: 400px; 4 | 5 | @mixin transition($args...) { 6 | -webkit-transition: $args; 7 | -moz-transition: $args; 8 | -ms-transition: $args; 9 | -o-transition: $args; 10 | transition: $args; 11 | } 12 | 13 | html, body { 14 | background: $body-bg; 15 | font-family: Roboto, sans-serif; 16 | overflow: hidden; 17 | font-size: 18px; 18 | } 19 | .clickable { 20 | cursor: pointer; 21 | } 22 | .control-panel { 23 | height: 100vh; 24 | display: flex; 25 | flex-direction: column; 26 | 27 | width: $menu-width; 28 | @include transition(all 0.5s ease); 29 | overflow: hidden; 30 | &.hidden { 31 | margin-left: -($menu-width); 32 | } 33 | background: $sidebar-bg; 34 | } 35 | .nav { 36 | height: 64px; 37 | line-height: 64px; 38 | padding-left: 20px; 39 | width: 100%; 40 | align-self: stretch; 41 | background: $body-bg-alt; 42 | } 43 | .content { 44 | display: flex; 45 | flex-direction: column; 46 | flex:1; 47 | height: 100vh; 48 | overflow: hidden; 49 | .content-inner { 50 | margin: 20px; 51 | box-shadow: 0 0 6px 2px rgba(200,200,200,.2); 52 | border-radius: 4px; 53 | background: $body-bg-alt; 54 | } 55 | } 56 | #__next-build-watcher { 57 | display: none; 58 | } 59 | #__next-prerender-indicator { 60 | display: none; 61 | } 62 | $input-color: #b8bdc3; 63 | $input-color-active: #ebf0f6; 64 | .experiment-row { 65 | padding: 10px; 66 | .btn { 67 | float: right; 68 | } 69 | } 70 | input { 71 | width: $menu-width - 180; 72 | outline: none; 73 | background: transparent; 74 | border: 2px solid $input-color; 75 | &:focus{ 76 | border-color: $input-color-active; 77 | color: $input-color-active; 78 | } 79 | line-height: 34px; 80 | color: $input-color; 81 | border-radius: 4px; 82 | margin-right: 10px; 83 | text-indent: 5px; 84 | } 85 | .btn-primary, .btn-primary:hover, .btn-primary:active, .btn-primary:focus { 86 | background: $button-background !important; 87 | color: $button-color !important; 88 | border: 2px solid transparent; 89 | outline: none!important; 90 | } 91 | 92 | .btn-secondary, .btn-secondary:hover, .btn-secondary:active, .btn-secondary:focus { 93 | background: $button-secondary-background !important; 94 | border: 2px solid transparent; 95 | } 96 | 97 | .btn-danger { 98 | background-color: transparent; 99 | border-color: $danger; 100 | border-width: 2px; 101 | color: $button-color; 102 | } 103 | -------------------------------------------------------------------------------- /webpack/loaders.js: -------------------------------------------------------------------------------- 1 | // Define common loaders for different file types 2 | module.exports = [ 3 | { 4 | test: /\.(md|txt)$/, 5 | use: 'raw-loader', 6 | }, 7 | ]; 8 | -------------------------------------------------------------------------------- /webpack/plugins.js: -------------------------------------------------------------------------------- 1 | const webpack = require('webpack'); 2 | 3 | const props = { 4 | E2E: process.env.E2E, 5 | ENV_NAME: JSON.stringify(process.env.NAME), 6 | ENV_TYPE: JSON.stringify(process.env.ACCOUNT_TYPE), 7 | }; 8 | 9 | module.exports = [ 10 | 11 | new webpack.DefinePlugin(props), 12 | 13 | // Fixes warning in moment-with-locales.min.js 14 | // Module not found: Error: Can't resolve './locale' in ... 15 | new webpack.IgnorePlugin(/^\.\/locale$/, /moment\/min$/), 16 | 17 | ]; 18 | -------------------------------------------------------------------------------- /webpack/webpack.config.dev.js: -------------------------------------------------------------------------------- 1 | // webpack.config.dev.js 2 | const webpack = require('webpack'); 3 | 4 | module.exports = { 5 | plugins: require('./plugins').concat([ 6 | new webpack.DefinePlugin({ 7 | __DEV__: true, 8 | }), 9 | ]), 10 | module: { 11 | rules: require('./loaders') 12 | .concat([]), 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /webpack/webpack.config.prod.js: -------------------------------------------------------------------------------- 1 | // webpack.config.prod.js 2 | // Watches + deploys files minified + cachebusted 3 | const webpack = require('webpack'); 4 | 5 | module.exports = { 6 | plugins: require('./plugins').concat([ 7 | new webpack.DefinePlugin({ 8 | __DEV__: false, 9 | }), 10 | ]), 11 | module: { 12 | rules: require('./loaders') 13 | .concat([]), 14 | }, 15 | optimization: { 16 | splitChunks: { 17 | chunks: 'all', 18 | maxInitialRequests: Infinity, 19 | minSize: 60000, 20 | cacheGroups: { 21 | polyfill: { 22 | test: /[\\/]project[\\/]polyfill/, 23 | }, 24 | }, 25 | }, 26 | }, 27 | }; 28 | --------------------------------------------------------------------------------