├── .buckconfig ├── .eslintrc.js ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .prettierrc.js ├── .watchmanconfig ├── LICENSE ├── README.md ├── android ├── app │ ├── BUCK │ ├── build.gradle │ ├── build_defs.bzl │ ├── debug.keystore │ ├── proguard-rules.pro │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── github │ │ │ └── nidorx │ │ │ ├── MainActivity.java │ │ │ └── MainApplication.java │ │ └── res │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-ldpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── ic_launcher_background.xml │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── app.json ├── app ├── App.tsx ├── Utils.tsx └── assets │ ├── wireframe-1.png │ └── wireframe-2.png ├── babel.config.js ├── docs ├── features.png ├── features.psd ├── ghost-2.png ├── ghost-2.psd ├── ghost-3.png ├── ghost-3.psd ├── ghost-4.png ├── ghost-4.psd ├── ghost-slider.gif ├── ghost.gif ├── ghost.png ├── ghost.psd ├── grid.png ├── grid.psd ├── guide.png ├── guide.psd ├── logo-sm.png ├── logo.png ├── logo.psd ├── ruler.gif ├── ruler.png ├── ruler.psd ├── wireframe.psd ├── zoom.gif ├── zoom.png └── zoom.psd ├── index.js ├── ios ├── BlueprintApp-tvOS │ └── Info.plist ├── BlueprintApp-tvOSTests │ └── Info.plist ├── BlueprintApp.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── StorybookApp-tvOS.xcscheme │ │ └── StorybookApp.xcscheme ├── BlueprintApp │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── ItunesArtwork@2x.png │ │ └── Contents.json │ ├── Info.plist │ └── main.m ├── BlueprintAppTests │ ├── Info.plist │ └── StorybookAppTests.m └── Podfile ├── lib.ts ├── metro.config.js ├── package-lock.json ├── package.json ├── publish.js ├── server ├── .gitignore ├── README.md ├── index.js ├── package-lock.json ├── package.json └── public │ └── index.html ├── src ├── assets │ ├── logo.png │ ├── logo@2x.png │ ├── logo@3x.png │ ├── move.png │ ├── move@2x.png │ ├── move@3x.png │ ├── reset.png │ ├── reset@2x.png │ ├── reset@3x.png │ └── shadow.png └── lib │ ├── Blueprint.tsx │ ├── Grid.tsx │ ├── ImageSelect.tsx │ ├── Ruler.tsx │ └── Utils.tsx ├── src_img ├── build.js ├── images.js └── img │ ├── logo.png │ ├── move.svg │ ├── reset.svg │ ├── wireframe-1.svg │ └── wireframe-2.svg ├── tsconfig-lib.json ├── tsconfig.json ├── v-release.js └── v-snapshot.js /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | }; 5 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore unexpected extra "@providesModule" 9 | .*/node_modules/.*/node_modules/fbjs/.* 10 | 11 | ; Ignore duplicate module providers 12 | ; For RN Apps installed via npm, "Libraries" folder is inside 13 | ; "node_modules/react-native" but in the source repo it is in the root 14 | node_modules/react-native/Libraries/react-native/React.js 15 | 16 | ; Ignore polyfills 17 | node_modules/react-native/Libraries/polyfills/.* 18 | 19 | ; These should not be required directly 20 | ; require from fbjs/lib instead: require('fbjs/lib/warning') 21 | node_modules/warning/.* 22 | 23 | ; Flow doesn't support platforms 24 | .*/Libraries/Utilities/HMRLoadingView.js 25 | 26 | [untyped] 27 | .*/node_modules/@react-native-community/cli/.*/.* 28 | 29 | [include] 30 | 31 | [libs] 32 | node_modules/react-native/Libraries/react-native/react-native-interface.js 33 | node_modules/react-native/flow/ 34 | 35 | [options] 36 | emoji=true 37 | 38 | esproposal.optional_chaining=enable 39 | esproposal.nullish_coalescing=enable 40 | 41 | module.file_ext=.js 42 | module.file_ext=.json 43 | module.file_ext=.ios.js 44 | 45 | module.system=haste 46 | module.system.haste.use_name_reducers=true 47 | # get basename 48 | module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1' 49 | # strip .js or .js.flow suffix 50 | module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1' 51 | # strip .ios suffix 52 | module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1' 53 | module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1' 54 | module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1' 55 | module.system.haste.paths.blacklist=.*/__tests__/.* 56 | module.system.haste.paths.blacklist=.*/__mocks__/.* 57 | module.system.haste.paths.whitelist=/node_modules/react-native/Libraries/.* 58 | module.system.haste.paths.whitelist=/node_modules/react-native/RNTester/.* 59 | module.system.haste.paths.whitelist=/node_modules/react-native/IntegrationTests/.* 60 | module.system.haste.paths.blacklist=/node_modules/react-native/Libraries/react-native/react-native-implementation.js 61 | module.system.haste.paths.blacklist=/node_modules/react-native/Libraries/Animated/src/polyfills/.* 62 | 63 | munge_underscores=true 64 | 65 | 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\)$' -> 'RelativeImageStub' 66 | 67 | suppress_type=$FlowIssue 68 | suppress_type=$FlowFixMe 69 | suppress_type=$FlowFixMeProps 70 | suppress_type=$FlowFixMeState 71 | 72 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\) 73 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+ 74 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 75 | 76 | [lints] 77 | sketchy-null-number=warn 78 | sketchy-null-mixed=warn 79 | sketchy-number=warn 80 | untyped-type-import=warn 81 | nonstrict-import=warn 82 | deprecated-type=warn 83 | unsafe-getters-setters=warn 84 | inexact-spread=warn 85 | unnecessary-invariant=warn 86 | signature-verification-failure=warn 87 | deprecated-utility=error 88 | 89 | [strict] 90 | deprecated-type 91 | nonstrict-import 92 | sketchy-null 93 | unclear-type 94 | unsafe-getters-setters 95 | untyped-import 96 | untyped-type-import 97 | 98 | [version] 99 | ^0.98.0 100 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /dist/ 2 | /node_modules/ 3 | .idea 4 | 5 | # OSX 6 | # 7 | .DS_Store 8 | 9 | # Xcode 10 | # 11 | build/ 12 | *.pbxuser 13 | !default.pbxuser 14 | *.mode1v3 15 | !default.mode1v3 16 | *.mode2v3 17 | !default.mode2v3 18 | *.perspectivev3 19 | !default.perspectivev3 20 | xcuserdata 21 | *.xccheckout 22 | *.moved-aside 23 | DerivedData 24 | *.hmap 25 | *.ipa 26 | *.xcuserstate 27 | project.xcworkspace 28 | 29 | # Android/IntelliJ 30 | # 31 | build/ 32 | .idea 33 | .gradle 34 | local.properties 35 | *.iml 36 | 37 | # Visual Studio Code 38 | # 39 | .vscode/ 40 | 41 | # node.js 42 | # 43 | node_modules/ 44 | npm-debug.log 45 | yarn-error.log 46 | 47 | # BUCK 48 | buck-out/ 49 | \.buckd/ 50 | 51 | # fastlane 52 | # 53 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 54 | # screenshots whenever they are needed. 55 | # For more information about the recommended setup visit: 56 | # https://docs.fastlane.tools/best-practices/source-control/ 57 | 58 | */fastlane/report.xml 59 | */fastlane/Preview.html 60 | */fastlane/screenshots 61 | 62 | # Bundle artifact 63 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: false, 3 | jsxBracketSameLine: true, 4 | singleQuote: true, 5 | trailingComma: 'all', 6 | }; 7 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Alex Rodin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |

React Native UI Blueprint

3 | 4 |

5 | To develop pixel perfect apps 6 |

7 |

8 | 9 | npm version 10 | 11 |

12 |
13 | 14 |
15 | 16 | No more wrong margins, text sizes and many other silly visual mistakes. **React Native UI Blueprint** allow to you implements a pixel-perfect design. 17 | 18 |
19 | 20 |
21 | 22 | 23 | ## Installation 24 | 25 | You can install React Native UI Blueprint via Yarn or NPM. 26 | 27 | ```bash 28 | # Yarn 29 | yarn add react-native-ui-blueprint 30 | 31 | # NPM 32 | npm i react-native-ui-blueprint --save 33 | ``` 34 | 35 | After that, simply encapsulate your application with Blueprint and finally tap the bottom left of the device to show Blueprint. 36 | 37 | ```jsx 38 | import Blueprint from 'react-native-ui-blueprint'; 39 | 40 | 41 | export default class App extends React.PureComponent { 42 | render() { 43 | return ( 44 | 45 | 46 | 47 | 48 | {'My App'} 49 | 50 | 51 | 52 | ); 53 | } 54 | } 55 | ``` 56 | 57 | ## Reload 58 | 59 | For those who are too lazy to shake the phone, when running Packager (on port 8081), lets you reload the application. 60 | 61 | ## Grid 62 | 63 |
64 | 65 |
66 | 67 | Displays grids on your application, allowing the development of interfaces with regular and homogeneous spacing. 68 | 69 | When working in teams, designers often use grid, use this tool to verify design implementation. 70 | 71 | ```jsx 72 | 82 | ... 83 | 84 | ``` 85 | 86 | By default, Blueprint already defines two grids with 8 and 24 [dp] spacing. 87 | 88 | You can completely remove the grid by passing `false` as parameter. 89 | 90 | ```jsx 91 | 94 | ... 95 | 96 | ``` 97 | 98 | ### Alignment 99 | 100 | There are 4 horizontal alignment options: 101 | 102 | #### Side 103 | 104 | The grid is created from the side, respecting the defined spacing. Useful for validating component spacings and side positions. 105 | 106 | #### Center 107 | 108 | The grid is created from the center of the screen, respecting the defined spacing. Used to check centralized alignment of components. 109 | 110 | #### Left and Right 111 | 112 | The grid is created from the defined side. 113 | 114 | ### Grid Properties 115 | 116 | | name | type | default | Description | 117 | |---|---|---|---| 118 | | `spacing` | `number` | -- | The spacing between grid lines. In [dp] | 119 | | `color` | `string` | `GRAY:#828282`, `MAGENTA:#ff4aff` or `BLUE:#18A0FB`| Allows you to set the line color. If not informed, the system will switch between GRAY, BLUE and MAGENTA | 120 | | `opacity` | `number` | `0.2 + $index * 0.1` | Allows you to set opacity. If not entered, the system automatically calculates a value starting with `0.2` and increasing by `0.1` | 121 | | `width` | `number` | `StyleSheet.hairlineWidth` (1 pixel) | Lets you set the line width | 122 | 123 | ## Guides 124 | 125 |
126 | 127 |
128 | 129 | Displays vertical or horizontal guide lines with specific placement. Unlike the grid, the guides does not repeat and allows you to work with three units of measurement: pixel, [dp] and percent. 130 | 131 | ```jsx 132 | 153 | ... 154 | 155 | ``` 156 | 157 | By default Blueprint displays one vertical and one horizontal line, both on 50% of the screen. 158 | 159 | You can completely remove the guides by passing false as parameter. 160 | 161 | ```jsx 162 | 165 | ... 166 | 167 | ``` 168 | 169 | ### Guides Properties 170 | 171 | 172 | | name | type | default | Description | 173 | |---|---|---|---| 174 | | `position` | `number` | -- | The positioning of the guide. When the unit is pixel, expect an integer. | 175 | | `orientation` | `horizontal` or `vertical` | --| Sets the orientation of the guide | 176 | | `unit` | `%`, `dp` or`px` | `dp` | The unit of measurement used to set the guide position | 177 | | `color` | `string` | `BLUE:#18A0FB`| Allows you to set the line color. | 178 | | `opacity` | `number` | `0.2 + $index * 0.1` | Allows you to set opacity. If not entered, the system automatically calculates a value starting with `0.2` and increasing by `0.1` | 179 | | `width` | `number` | `StyleSheet.hairlineWidth` (1 pixel) | Lets you set the line width | 180 | 181 | 182 | ## Ruler 183 | 184 |
185 | 186 | 187 |
188 | 189 | Adds a scalable ruler to the screen. The ruler is useful for checking component size and distance from the edges of the screen. 190 | 191 | Allows you to change the unit of measurement to pixel, [dp], or percent. 192 | 193 | The ruler also allows you to change the sensitivity to work more accurately. The values are toggled by `1`, `0.5` and `0.1`. 194 | 195 | ## Ghost 196 | 197 |
198 | 199 | 200 |
201 | 202 | Allows developers and designers put a semi-transparent image overlay over the top of the developed App and perform pixel perfect comparison between them. 203 | 204 | 205 | You can add local files or configure remote calls asynchronously. With remote calling, you can implement integrations with any Wireframe system that provides an API. 206 | 207 | 208 | ### Local files 209 | 210 |
211 | 212 |
213 | 214 | ```jsx 215 | 221 | ... 222 | 223 | ``` 224 | 225 | ### Remote files 226 | 227 |
228 | 229 |
230 | 231 | If you know the full path of the screen images, just tell uri. Blueprint looks for information about the height and width of the images. 232 | 233 | 234 | ```jsx 235 | 244 | ... 245 | 246 | ``` 247 | 248 | ### Custom Server 249 | 250 |
251 | 252 | 253 |
254 | 255 | 256 | You can also use some private image server. An example implementation, with node.js, is available in the "server" folder. 257 | 258 | External integration allows the use of any image service that provides an API for listing and viewing images. 259 | 260 | You can look for documentation from services like [Zeplin](https://zeplin.io/) or [Figma](https://www.figma.com/) to do your integrations. 261 | 262 | 263 | For integration, simply implement an asynchronous function in the `imagesAsync` property. 264 | 265 | **Type** 266 | ```jsx 267 | type ImageInfoAsync = { 268 | thumb?: { 269 | uri: string; 270 | width?: number; 271 | height?: number; 272 | }; 273 | uri: string; 274 | width?: number; 275 | height?: number; 276 | title?: string; 277 | }; 278 | 279 | const imagesAsynck: () => Promise>; 280 | ``` 281 | 282 | **Sample** 283 | ```jsx 284 | { 286 | const server = 'http://localhost:3000'; 287 | return fetch(`${server}/images.json`) 288 | .then(resp => resp.json()) 289 | .then(images => { 290 | images.forEach((image: any) => { 291 | image.uri = `${server}/${image.uri}`; 292 | image.thumb.uri = `${server}/${image.thumb.uri}`; 293 | }); 294 | return images; 295 | }); 296 | }} 297 | > 298 | ... 299 | 300 | ``` 301 | 302 | ### Image Properties 303 | 304 | **Type**: `Array` 305 | 306 | | name | type | Description | 307 | |---|---|---| 308 | | `uri` | `string` | `uri` is a string representing the resource identifier for the image, which could be an http address. | 309 | | `width` | `number` | `width` and `height` can be specified if known at build time. | 310 | | `height` | `number` | `width` and `height` can be specified if known at build time. | 311 | 312 | 313 | 314 | ## Zoom 315 | 316 |
317 | 318 | 319 |
320 | 321 | 322 | One of the most powerful tools in the Blueprint suite, zooming is applied to your application and all other functionality. 323 | 324 | This allows you to work pixel by pixel on your screen, impressing everyone with the quality of your application. 325 | 326 | 327 | 328 | 329 | ## Feedback, Requests and Roadmap 330 | 331 | Please use [GitHub issues] for feedback, questions or comments. 332 | 333 | If you have specific feature requests or would like to vote on what others are recommending, please go to the [GitHub issues] section as well. I would love to see what you are thinking. 334 | 335 | ## Contributing 336 | 337 | You can contribute in many ways to this project. 338 | 339 | ### Translating and documenting 340 | 341 | I'm not a native speaker of the English language, so you may have noticed a lot of grammar errors in this documentation. 342 | 343 | You can FORK this project and suggest improvements to this document (https://github.com/nidorx/react-native-ui-blueprint/edit/master/README.md). 344 | 345 | If you find it more convenient, report a issue with the details on [GitHub issues]. 346 | 347 | ### Reporting Issues 348 | 349 | If you have encountered a problem with this component please file a defect on [GitHub issues]. 350 | 351 | Describe as much detail as possible to get the problem reproduced and eventually corrected. 352 | 353 | ### Fixing defects and adding improvements 354 | 355 | 1. Fork it () 356 | 2. Create your feature branch (`git checkout -b feature/fooBar`) 357 | 3. Commit your changes (`git commit -am 'Add some fooBar'`) 358 | 4. Push to the branch (`git push origin feature/fooBar`) 359 | 5. Create a new Pull Request 360 | 361 | ## License 362 | 363 | This code is distributed under the terms and conditions of the [MIT license](LICENSE). 364 | 365 | 366 | [dp]: https://en.wikipedia.org/wiki/Device-independent_pixel 367 | [GitHub issues]: https://github.com/nidorx/react-native-ui-blueprint/issues 368 | -------------------------------------------------------------------------------- /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.github.nidorx", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "com.github.nidorx", 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 | -------------------------------------------------------------------------------- /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.github.nidorx" 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 | packagingOptions { 181 | pickFirst '**/armeabi-v7a/libc++_shared.so' 182 | pickFirst '**/x86/libc++_shared.so' 183 | pickFirst '**/arm64-v8a/libc++_shared.so' 184 | pickFirst '**/x86_64/libc++_shared.so' 185 | pickFirst '**/x86/libjsc.so' 186 | pickFirst '**/armeabi-v7a/libjsc.so' 187 | } 188 | } 189 | 190 | dependencies { 191 | implementation fileTree(dir: "libs", include: ["*.jar"]) 192 | implementation "com.facebook.react:react-native:+" // From node_modules 193 | 194 | if (enableHermes) { 195 | def hermesPath = "../../node_modules/hermesvm/android/"; 196 | debugImplementation files(hermesPath + "hermes-debug.aar") 197 | releaseImplementation files(hermesPath + "hermes-release.aar") 198 | } else { 199 | implementation jscFlavor 200 | } 201 | } 202 | 203 | // Run this once to be able to run the application with BUCK 204 | // puts all compile dependencies into folder libs for BUCK to use 205 | task copyDownloadableDepsToLibs(type: Copy) { 206 | from configurations.compile 207 | into 'libs' 208 | } 209 | 210 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) 211 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/android/app/debug.keystore -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 14 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/github/nidorx/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.github.nidorx; 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. 9 | * This is used to schedule rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "BlueprintApp"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/github/nidorx/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.github.nidorx; 2 | 3 | import android.app.Application; 4 | import android.util.Log; 5 | 6 | import com.facebook.react.PackageList; 7 | import com.facebook.hermes.reactexecutor.HermesExecutorFactory; 8 | import com.facebook.react.bridge.JavaScriptExecutorFactory; 9 | import com.facebook.react.ReactApplication; 10 | import com.facebook.react.ReactNativeHost; 11 | import com.facebook.react.ReactPackage; 12 | import com.facebook.soloader.SoLoader; 13 | 14 | import java.util.List; 15 | 16 | public class MainApplication extends Application implements ReactApplication { 17 | 18 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 19 | @Override 20 | public boolean getUseDeveloperSupport() { 21 | return BuildConfig.DEBUG; 22 | } 23 | 24 | @Override 25 | protected List getPackages() { 26 | @SuppressWarnings("UnnecessaryLocalVariable") 27 | List packages = new PackageList(this).getPackages(); 28 | // Packages that cannot be autolinked yet can be added manually here, for example: 29 | // packages.add(new MyReactNativePackage()); 30 | return packages; 31 | } 32 | 33 | @Override 34 | protected String getJSMainModuleName() { 35 | return "index"; 36 | } 37 | }; 38 | 39 | @Override 40 | public ReactNativeHost getReactNativeHost() { 41 | return mReactNativeHost; 42 | } 43 | 44 | @Override 45 | public void onCreate() { 46 | super.onCreate(); 47 | SoLoader.init(this, /* native exopackage */ false); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/android/app/src/main/res/mipmap-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ffffff 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | BlueprintApp 3 | 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /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 | supportLibVersion = "28.0.0" 10 | } 11 | repositories { 12 | google() 13 | jcenter() 14 | } 15 | dependencies { 16 | classpath("com.android.tools.build:gradle:3.4.1") 17 | 18 | // NOTE: Do not place your application dependencies here; they belong 19 | // in the individual module build.gradle files 20 | } 21 | } 22 | 23 | allprojects { 24 | repositories { 25 | mavenLocal() 26 | maven { 27 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 28 | url("$rootDir/../node_modules/react-native/android") 29 | } 30 | maven { 31 | // Android JSC is installed from npm 32 | url("$rootDir/../node_modules/jsc-android/dist") 33 | } 34 | 35 | google() 36 | jcenter() 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'BlueprintApp' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BlueprintApp", 3 | "displayName": "BlueprintApp" 4 | } 5 | -------------------------------------------------------------------------------- /app/App.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {StatusBar, StyleSheet, Text, View} from 'react-native'; 3 | import Blueprint from "../src/lib/Blueprint"; 4 | 5 | 6 | export default class App extends React.PureComponent { 7 | render() { 8 | return ( 9 | 15 | 16 | 17 | 18 | {'React Native UI Blueprint'} 19 | 20 | 21 | 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Utils.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | -------------------------------------------------------------------------------- /app/assets/wireframe-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/app/assets/wireframe-1.png -------------------------------------------------------------------------------- /app/assets/wireframe-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/app/assets/wireframe-2.png -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /docs/features.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/features.png -------------------------------------------------------------------------------- /docs/features.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/features.psd -------------------------------------------------------------------------------- /docs/ghost-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/ghost-2.png -------------------------------------------------------------------------------- /docs/ghost-2.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/ghost-2.psd -------------------------------------------------------------------------------- /docs/ghost-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/ghost-3.png -------------------------------------------------------------------------------- /docs/ghost-3.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/ghost-3.psd -------------------------------------------------------------------------------- /docs/ghost-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/ghost-4.png -------------------------------------------------------------------------------- /docs/ghost-4.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/ghost-4.psd -------------------------------------------------------------------------------- /docs/ghost-slider.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/ghost-slider.gif -------------------------------------------------------------------------------- /docs/ghost.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/ghost.gif -------------------------------------------------------------------------------- /docs/ghost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/ghost.png -------------------------------------------------------------------------------- /docs/ghost.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/ghost.psd -------------------------------------------------------------------------------- /docs/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/grid.png -------------------------------------------------------------------------------- /docs/grid.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/grid.psd -------------------------------------------------------------------------------- /docs/guide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/guide.png -------------------------------------------------------------------------------- /docs/guide.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/guide.psd -------------------------------------------------------------------------------- /docs/logo-sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/logo-sm.png -------------------------------------------------------------------------------- /docs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/logo.png -------------------------------------------------------------------------------- /docs/logo.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/logo.psd -------------------------------------------------------------------------------- /docs/ruler.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/ruler.gif -------------------------------------------------------------------------------- /docs/ruler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/ruler.png -------------------------------------------------------------------------------- /docs/ruler.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/ruler.psd -------------------------------------------------------------------------------- /docs/wireframe.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/wireframe.psd -------------------------------------------------------------------------------- /docs/zoom.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/zoom.gif -------------------------------------------------------------------------------- /docs/zoom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/zoom.png -------------------------------------------------------------------------------- /docs/zoom.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/docs/zoom.psd -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | import {AppRegistry} from 'react-native'; 2 | import {name as appName} from './app.json'; 3 | import App from "./app/App"; 4 | 5 | AppRegistry.registerComponent(appName, () => App); 6 | -------------------------------------------------------------------------------- /ios/BlueprintApp-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 | -------------------------------------------------------------------------------- /ios/BlueprintApp-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 | -------------------------------------------------------------------------------- /ios/BlueprintApp.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | /* Begin PBXBuildFile section */ 9 | 00E356F31AD99517003FC87E /* BlueprintAppTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* BlueprintAppTests.m */; }; 10 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 11 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 12 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 14 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 15 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 16 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 17 | 2DCD954D1E0B4F2C00145EB5 /* BlueprintAppTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* BlueprintAppTests.m */; }; 18 | 0E0A96A3062F4172A75D0679 /* Roboto-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 12649DCE55FB450D8BAE2010 /* Roboto-Bold.ttf */; }; 19 | 573CECC083B4428D9CFDB360 /* Roboto-BoldItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D10CDBDA83654F558903FDBB /* Roboto-BoldItalic.ttf */; }; 20 | 0AA71DB121FD4CBB8F210071 /* Roboto-Light.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 17527CF79EF1424B8F00B136 /* Roboto-Light.ttf */; }; 21 | D75699B35B89437A8215B9A0 /* Roboto-LightItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = C92FB2C9BBAC450281E8033B /* Roboto-LightItalic.ttf */; }; 22 | 6252EE147D56450E87458CF6 /* Roboto-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 616BE25246834DFBB27708E1 /* Roboto-Medium.ttf */; }; 23 | 32459010120343B5806373E0 /* Roboto-MediumItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6CF27A4B42DA410E9640BD96 /* Roboto-MediumItalic.ttf */; }; 24 | 5A1ED31B05434263803E9E9D /* Roboto-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 9C4CBE1DD99847DE9962D944 /* Roboto-Regular.ttf */; }; 25 | 62729488AF64405E9FD1473D /* Roboto-RegularItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A1E1FD0F625840CF94E5E698 /* Roboto-RegularItalic.ttf */; }; 26 | E4858409612C495883F8611F /* Roboto-Thin.ttf in Resources */ = {isa = PBXBuildFile; fileRef = F30A74BA2C9C4A10B8EAF780 /* Roboto-Thin.ttf */; }; 27 | 243EC4D90BB14E20B403C102 /* Roboto-ThinItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B982FE130CC34C509401A1CD /* Roboto-ThinItalic.ttf */; }; 28 | /* End PBXBuildFile section */ 29 | 30 | /* Begin PBXContainerItemProxy section */ 31 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 36 | remoteInfo = BlueprintApp; 37 | }; 38 | 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = { 39 | isa = PBXContainerItemProxy; 40 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 41 | proxyType = 1; 42 | remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7; 43 | remoteInfo = "BlueprintApp-tvOS"; 44 | }; 45 | /* End PBXContainerItemProxy section */ 46 | 47 | /* Begin PBXFileReference section */ 48 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 49 | 00E356EE1AD99517003FC87E /* BlueprintAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BlueprintAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | 00E356F21AD99517003FC87E /* BlueprintAppTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BlueprintAppTests.m; sourceTree = ""; }; 52 | 13B07F961A680F5B00A75B9A /* BlueprintApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BlueprintApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = BlueprintApp/AppDelegate.h; sourceTree = ""; }; 54 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = BlueprintApp/AppDelegate.m; sourceTree = ""; }; 55 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 56 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = BlueprintApp/Images.xcassets; sourceTree = ""; }; 57 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = BlueprintApp/Info.plist; sourceTree = ""; }; 58 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = BlueprintApp/main.m; sourceTree = ""; }; 59 | 2D02E47B1E0B4A5D006451C7 /* BlueprintApp-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "BlueprintApp-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | 2D02E4901E0B4A5D006451C7 /* BlueprintApp-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "BlueprintApp-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 61 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; 62 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; }; 63 | 12649DCE55FB450D8BAE2010 /* Roboto-Bold.ttf */ = {isa = PBXFileReference; name = "Roboto-Bold.ttf"; path = "../src/assets/fonts/Roboto/Roboto-Bold.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; 64 | D10CDBDA83654F558903FDBB /* Roboto-BoldItalic.ttf */ = {isa = PBXFileReference; name = "Roboto-BoldItalic.ttf"; path = "../src/assets/fonts/Roboto/Roboto-BoldItalic.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; 65 | 17527CF79EF1424B8F00B136 /* Roboto-Light.ttf */ = {isa = PBXFileReference; name = "Roboto-Light.ttf"; path = "../src/assets/fonts/Roboto/Roboto-Light.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; 66 | C92FB2C9BBAC450281E8033B /* Roboto-LightItalic.ttf */ = {isa = PBXFileReference; name = "Roboto-LightItalic.ttf"; path = "../src/assets/fonts/Roboto/Roboto-LightItalic.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; 67 | 616BE25246834DFBB27708E1 /* Roboto-Medium.ttf */ = {isa = PBXFileReference; name = "Roboto-Medium.ttf"; path = "../src/assets/fonts/Roboto/Roboto-Medium.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; 68 | 6CF27A4B42DA410E9640BD96 /* Roboto-MediumItalic.ttf */ = {isa = PBXFileReference; name = "Roboto-MediumItalic.ttf"; path = "../src/assets/fonts/Roboto/Roboto-MediumItalic.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; 69 | 9C4CBE1DD99847DE9962D944 /* Roboto-Regular.ttf */ = {isa = PBXFileReference; name = "Roboto-Regular.ttf"; path = "../src/assets/fonts/Roboto/Roboto-Regular.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; 70 | A1E1FD0F625840CF94E5E698 /* Roboto-RegularItalic.ttf */ = {isa = PBXFileReference; name = "Roboto-RegularItalic.ttf"; path = "../src/assets/fonts/Roboto/Roboto-RegularItalic.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; 71 | F30A74BA2C9C4A10B8EAF780 /* Roboto-Thin.ttf */ = {isa = PBXFileReference; name = "Roboto-Thin.ttf"; path = "../src/assets/fonts/Roboto/Roboto-Thin.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; 72 | B982FE130CC34C509401A1CD /* Roboto-ThinItalic.ttf */ = {isa = PBXFileReference; name = "Roboto-ThinItalic.ttf"; path = "../src/assets/fonts/Roboto/Roboto-ThinItalic.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; 73 | /* End PBXFileReference section */ 74 | 75 | /* Begin PBXFrameworksBuildPhase section */ 76 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 77 | isa = PBXFrameworksBuildPhase; 78 | buildActionMask = 2147483647; 79 | files = ( 80 | ); 81 | runOnlyForDeploymentPostprocessing = 0; 82 | }; 83 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 84 | isa = PBXFrameworksBuildPhase; 85 | buildActionMask = 2147483647; 86 | files = ( 87 | ); 88 | runOnlyForDeploymentPostprocessing = 0; 89 | }; 90 | 2D02E4781E0B4A5D006451C7 /* Frameworks */ = { 91 | isa = PBXFrameworksBuildPhase; 92 | buildActionMask = 2147483647; 93 | files = ( 94 | ); 95 | runOnlyForDeploymentPostprocessing = 0; 96 | }; 97 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = { 98 | isa = PBXFrameworksBuildPhase; 99 | buildActionMask = 2147483647; 100 | files = ( 101 | ); 102 | runOnlyForDeploymentPostprocessing = 0; 103 | }; 104 | /* End PBXFrameworksBuildPhase section */ 105 | 106 | /* Begin PBXGroup section */ 107 | 00E356EF1AD99517003FC87E /* BlueprintAppTests */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 00E356F21AD99517003FC87E /* BlueprintAppTests.m */, 111 | 00E356F01AD99517003FC87E /* Supporting Files */, 112 | ); 113 | path = BlueprintAppTests; 114 | sourceTree = ""; 115 | }; 116 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 00E356F11AD99517003FC87E /* Info.plist */, 120 | ); 121 | name = "Supporting Files"; 122 | sourceTree = ""; 123 | }; 124 | 13B07FAE1A68108700A75B9A /* BlueprintApp */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 128 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 129 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 130 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 131 | 13B07FB61A68108700A75B9A /* Info.plist */, 132 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 133 | 13B07FB71A68108700A75B9A /* main.m */, 134 | ); 135 | name = BlueprintApp; 136 | sourceTree = ""; 137 | }; 138 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 142 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */, 143 | ); 144 | name = Frameworks; 145 | sourceTree = ""; 146 | }; 147 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | ); 151 | name = Libraries; 152 | sourceTree = ""; 153 | }; 154 | 83CBB9F61A601CBA00E9B192 = { 155 | isa = PBXGroup; 156 | children = ( 157 | 13B07FAE1A68108700A75B9A /* BlueprintApp */, 158 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 159 | 00E356EF1AD99517003FC87E /* BlueprintAppTests */, 160 | 83CBBA001A601CBA00E9B192 /* Products */, 161 | 2D16E6871FA4F8E400B85C8A /* Frameworks */, 162 | 2D9A8FB813984E51833691C4 /* Resources */, 163 | ); 164 | indentWidth = 2; 165 | sourceTree = ""; 166 | tabWidth = 2; 167 | usesTabs = 0; 168 | }; 169 | 83CBBA001A601CBA00E9B192 /* Products */ = { 170 | isa = PBXGroup; 171 | children = ( 172 | 13B07F961A680F5B00A75B9A /* BlueprintApp.app */, 173 | 00E356EE1AD99517003FC87E /* BlueprintAppTests.xctest */, 174 | 2D02E47B1E0B4A5D006451C7 /* BlueprintApp-tvOS.app */, 175 | 2D02E4901E0B4A5D006451C7 /* BlueprintApp-tvOSTests.xctest */, 176 | ); 177 | name = Products; 178 | sourceTree = ""; 179 | }; 180 | 2D9A8FB813984E51833691C4 /* Resources */ = { 181 | isa = "PBXGroup"; 182 | children = ( 183 | 12649DCE55FB450D8BAE2010 /* Roboto-Bold.ttf */, 184 | D10CDBDA83654F558903FDBB /* Roboto-BoldItalic.ttf */, 185 | 17527CF79EF1424B8F00B136 /* Roboto-Light.ttf */, 186 | C92FB2C9BBAC450281E8033B /* Roboto-LightItalic.ttf */, 187 | 616BE25246834DFBB27708E1 /* Roboto-Medium.ttf */, 188 | 6CF27A4B42DA410E9640BD96 /* Roboto-MediumItalic.ttf */, 189 | 9C4CBE1DD99847DE9962D944 /* Roboto-Regular.ttf */, 190 | A1E1FD0F625840CF94E5E698 /* Roboto-RegularItalic.ttf */, 191 | F30A74BA2C9C4A10B8EAF780 /* Roboto-Thin.ttf */, 192 | B982FE130CC34C509401A1CD /* Roboto-ThinItalic.ttf */, 193 | ); 194 | name = Resources; 195 | sourceTree = ""; 196 | path = ""; 197 | }; 198 | /* End PBXGroup section */ 199 | 200 | /* Begin PBXNativeTarget section */ 201 | 00E356ED1AD99517003FC87E /* BlueprintAppTests */ = { 202 | isa = PBXNativeTarget; 203 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "BlueprintAppTests" */; 204 | buildPhases = ( 205 | 00E356EA1AD99517003FC87E /* Sources */, 206 | 00E356EB1AD99517003FC87E /* Frameworks */, 207 | 00E356EC1AD99517003FC87E /* Resources */, 208 | ); 209 | buildRules = ( 210 | ); 211 | dependencies = ( 212 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 213 | ); 214 | name = BlueprintAppTests; 215 | productName = BlueprintAppTests; 216 | productReference = 00E356EE1AD99517003FC87E /* BlueprintAppTests.xctest */; 217 | productType = "com.apple.product-type.bundle.unit-test"; 218 | }; 219 | 13B07F861A680F5B00A75B9A /* BlueprintApp */ = { 220 | isa = PBXNativeTarget; 221 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "BlueprintApp" */; 222 | buildPhases = ( 223 | FD10A7F022414F080027D42C /* Start Packager */, 224 | 13B07F871A680F5B00A75B9A /* Sources */, 225 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 226 | 13B07F8E1A680F5B00A75B9A /* Resources */, 227 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 228 | ); 229 | buildRules = ( 230 | ); 231 | dependencies = ( 232 | ); 233 | name = BlueprintApp; 234 | productName = "BlueprintApp"; 235 | productReference = 13B07F961A680F5B00A75B9A /* BlueprintApp.app */; 236 | productType = "com.apple.product-type.application"; 237 | }; 238 | 2D02E47A1E0B4A5D006451C7 /* BlueprintApp-tvOS */ = { 239 | isa = PBXNativeTarget; 240 | buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "BlueprintApp-tvOS" */; 241 | buildPhases = ( 242 | FD10A7F122414F3F0027D42C /* Start Packager */, 243 | 2D02E4771E0B4A5D006451C7 /* Sources */, 244 | 2D02E4781E0B4A5D006451C7 /* Frameworks */, 245 | 2D02E4791E0B4A5D006451C7 /* Resources */, 246 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */, 247 | ); 248 | buildRules = ( 249 | ); 250 | dependencies = ( 251 | ); 252 | name = "BlueprintApp-tvOS"; 253 | productName = "BlueprintApp-tvOS"; 254 | productReference = 2D02E47B1E0B4A5D006451C7 /* BlueprintApp-tvOS.app */; 255 | productType = "com.apple.product-type.application"; 256 | }; 257 | 2D02E48F1E0B4A5D006451C7 /* BlueprintApp-tvOSTests */ = { 258 | isa = PBXNativeTarget; 259 | buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "BlueprintApp-tvOSTests" */; 260 | buildPhases = ( 261 | 2D02E48C1E0B4A5D006451C7 /* Sources */, 262 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */, 263 | 2D02E48E1E0B4A5D006451C7 /* Resources */, 264 | ); 265 | buildRules = ( 266 | ); 267 | dependencies = ( 268 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */, 269 | ); 270 | name = "BlueprintApp-tvOSTests"; 271 | productName = "BlueprintApp-tvOSTests"; 272 | productReference = 2D02E4901E0B4A5D006451C7 /* BlueprintApp-tvOSTests.xctest */; 273 | productType = "com.apple.product-type.bundle.unit-test"; 274 | }; 275 | /* End PBXNativeTarget section */ 276 | 277 | /* Begin PBXProject section */ 278 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 279 | isa = PBXProject; 280 | attributes = { 281 | LastUpgradeCheck = 940; 282 | ORGANIZATIONNAME = Facebook; 283 | TargetAttributes = { 284 | 00E356ED1AD99517003FC87E = { 285 | CreatedOnToolsVersion = 6.2; 286 | TestTargetID = 13B07F861A680F5B00A75B9A; 287 | }; 288 | 2D02E47A1E0B4A5D006451C7 = { 289 | CreatedOnToolsVersion = 8.2.1; 290 | ProvisioningStyle = Automatic; 291 | }; 292 | 2D02E48F1E0B4A5D006451C7 = { 293 | CreatedOnToolsVersion = 8.2.1; 294 | ProvisioningStyle = Automatic; 295 | TestTargetID = 2D02E47A1E0B4A5D006451C7; 296 | }; 297 | }; 298 | }; 299 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "BlueprintApp" */; 300 | compatibilityVersion = "Xcode 3.2"; 301 | developmentRegion = English; 302 | hasScannedForEncodings = 0; 303 | knownRegions = ( 304 | en, 305 | Base, 306 | ); 307 | mainGroup = 83CBB9F61A601CBA00E9B192; 308 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 309 | projectDirPath = ""; 310 | projectRoot = ""; 311 | targets = ( 312 | 13B07F861A680F5B00A75B9A /* BlueprintApp */, 313 | 00E356ED1AD99517003FC87E /* BlueprintAppTests */, 314 | 2D02E47A1E0B4A5D006451C7 /* BlueprintApp-tvOS */, 315 | 2D02E48F1E0B4A5D006451C7 /* BlueprintApp-tvOSTests */, 316 | ); 317 | }; 318 | /* End PBXProject section */ 319 | 320 | /* Begin PBXResourcesBuildPhase section */ 321 | 00E356EC1AD99517003FC87E /* Resources */ = { 322 | isa = PBXResourcesBuildPhase; 323 | buildActionMask = 2147483647; 324 | files = ( 325 | ); 326 | runOnlyForDeploymentPostprocessing = 0; 327 | }; 328 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 329 | isa = PBXResourcesBuildPhase; 330 | buildActionMask = 2147483647; 331 | files = ( 332 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 333 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 334 | 0E0A96A3062F4172A75D0679 /* Roboto-Bold.ttf in Resources */, 335 | 573CECC083B4428D9CFDB360 /* Roboto-BoldItalic.ttf in Resources */, 336 | 0AA71DB121FD4CBB8F210071 /* Roboto-Light.ttf in Resources */, 337 | D75699B35B89437A8215B9A0 /* Roboto-LightItalic.ttf in Resources */, 338 | 6252EE147D56450E87458CF6 /* Roboto-Medium.ttf in Resources */, 339 | 32459010120343B5806373E0 /* Roboto-MediumItalic.ttf in Resources */, 340 | 5A1ED31B05434263803E9E9D /* Roboto-Regular.ttf in Resources */, 341 | 62729488AF64405E9FD1473D /* Roboto-RegularItalic.ttf in Resources */, 342 | E4858409612C495883F8611F /* Roboto-Thin.ttf in Resources */, 343 | 243EC4D90BB14E20B403C102 /* Roboto-ThinItalic.ttf in Resources */, 344 | ); 345 | runOnlyForDeploymentPostprocessing = 0; 346 | }; 347 | 2D02E4791E0B4A5D006451C7 /* Resources */ = { 348 | isa = PBXResourcesBuildPhase; 349 | buildActionMask = 2147483647; 350 | files = ( 351 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */, 352 | ); 353 | runOnlyForDeploymentPostprocessing = 0; 354 | }; 355 | 2D02E48E1E0B4A5D006451C7 /* Resources */ = { 356 | isa = PBXResourcesBuildPhase; 357 | buildActionMask = 2147483647; 358 | files = ( 359 | ); 360 | runOnlyForDeploymentPostprocessing = 0; 361 | }; 362 | /* End PBXResourcesBuildPhase section */ 363 | 364 | /* Begin PBXShellScriptBuildPhase section */ 365 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 366 | isa = PBXShellScriptBuildPhase; 367 | buildActionMask = 2147483647; 368 | files = ( 369 | ); 370 | inputPaths = ( 371 | ); 372 | name = "Bundle React Native code and images"; 373 | outputPaths = ( 374 | ); 375 | runOnlyForDeploymentPostprocessing = 0; 376 | shellPath = /bin/sh; 377 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; 378 | }; 379 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { 380 | isa = PBXShellScriptBuildPhase; 381 | buildActionMask = 2147483647; 382 | files = ( 383 | ); 384 | inputPaths = ( 385 | ); 386 | name = "Bundle React Native Code And Images"; 387 | outputPaths = ( 388 | ); 389 | runOnlyForDeploymentPostprocessing = 0; 390 | shellPath = /bin/sh; 391 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; 392 | }; 393 | FD10A7F022414F080027D42C /* Start Packager */ = { 394 | isa = PBXShellScriptBuildPhase; 395 | buildActionMask = 2147483647; 396 | files = ( 397 | ); 398 | inputFileListPaths = ( 399 | ); 400 | inputPaths = ( 401 | ); 402 | name = "Start Packager"; 403 | outputFileListPaths = ( 404 | ); 405 | outputPaths = ( 406 | ); 407 | runOnlyForDeploymentPostprocessing = 0; 408 | shellPath = /bin/sh; 409 | shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; 410 | showEnvVarsInLog = 0; 411 | }; 412 | FD10A7F122414F3F0027D42C /* Start Packager */ = { 413 | isa = PBXShellScriptBuildPhase; 414 | buildActionMask = 2147483647; 415 | files = ( 416 | ); 417 | inputFileListPaths = ( 418 | ); 419 | inputPaths = ( 420 | ); 421 | name = "Start Packager"; 422 | outputFileListPaths = ( 423 | ); 424 | outputPaths = ( 425 | ); 426 | runOnlyForDeploymentPostprocessing = 0; 427 | shellPath = /bin/sh; 428 | shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; 429 | showEnvVarsInLog = 0; 430 | }; 431 | /* End PBXShellScriptBuildPhase section */ 432 | 433 | /* Begin PBXSourcesBuildPhase section */ 434 | 00E356EA1AD99517003FC87E /* Sources */ = { 435 | isa = PBXSourcesBuildPhase; 436 | buildActionMask = 2147483647; 437 | files = ( 438 | 00E356F31AD99517003FC87E /* BlueprintAppTests.m in Sources */, 439 | ); 440 | runOnlyForDeploymentPostprocessing = 0; 441 | }; 442 | 13B07F871A680F5B00A75B9A /* Sources */ = { 443 | isa = PBXSourcesBuildPhase; 444 | buildActionMask = 2147483647; 445 | files = ( 446 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 447 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 448 | ); 449 | runOnlyForDeploymentPostprocessing = 0; 450 | }; 451 | 2D02E4771E0B4A5D006451C7 /* Sources */ = { 452 | isa = PBXSourcesBuildPhase; 453 | buildActionMask = 2147483647; 454 | files = ( 455 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */, 456 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */, 457 | ); 458 | runOnlyForDeploymentPostprocessing = 0; 459 | }; 460 | 2D02E48C1E0B4A5D006451C7 /* Sources */ = { 461 | isa = PBXSourcesBuildPhase; 462 | buildActionMask = 2147483647; 463 | files = ( 464 | 2DCD954D1E0B4F2C00145EB5 /* BlueprintAppTests.m in Sources */, 465 | ); 466 | runOnlyForDeploymentPostprocessing = 0; 467 | }; 468 | /* End PBXSourcesBuildPhase section */ 469 | 470 | /* Begin PBXTargetDependency section */ 471 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 472 | isa = PBXTargetDependency; 473 | target = 13B07F861A680F5B00A75B9A /* BlueprintApp */; 474 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 475 | }; 476 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = { 477 | isa = PBXTargetDependency; 478 | target = 2D02E47A1E0B4A5D006451C7 /* BlueprintApp-tvOS */; 479 | targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */; 480 | }; 481 | /* End PBXTargetDependency section */ 482 | 483 | /* Begin PBXVariantGroup section */ 484 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 485 | isa = PBXVariantGroup; 486 | children = ( 487 | 13B07FB21A68108700A75B9A /* Base */, 488 | ); 489 | name = LaunchScreen.xib; 490 | path = BlueprintApp; 491 | sourceTree = ""; 492 | }; 493 | /* End PBXVariantGroup section */ 494 | 495 | /* Begin XCBuildConfiguration section */ 496 | 00E356F61AD99517003FC87E /* Debug */ = { 497 | isa = XCBuildConfiguration; 498 | buildSettings = { 499 | BUNDLE_LOADER = "$(TEST_HOST)"; 500 | GCC_PREPROCESSOR_DEFINITIONS = ( 501 | "DEBUG=1", 502 | "$(inherited)", 503 | ); 504 | INFOPLIST_FILE = BlueprintAppTests/Info.plist; 505 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 506 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 507 | OTHER_LDFLAGS = ( 508 | "-ObjC", 509 | "-lc++", 510 | "$(inherited)", 511 | ); 512 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 513 | PRODUCT_NAME = "$(TARGET_NAME)"; 514 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BlueprintApp.app/BlueprintApp"; 515 | }; 516 | name = Debug; 517 | }; 518 | 00E356F71AD99517003FC87E /* Release */ = { 519 | isa = XCBuildConfiguration; 520 | buildSettings = { 521 | BUNDLE_LOADER = "$(TEST_HOST)"; 522 | COPY_PHASE_STRIP = NO; 523 | INFOPLIST_FILE = BlueprintAppTests/Info.plist; 524 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 525 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 526 | OTHER_LDFLAGS = ( 527 | "-ObjC", 528 | "-lc++", 529 | "$(inherited)", 530 | ); 531 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 532 | PRODUCT_NAME = "$(TARGET_NAME)"; 533 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BlueprintApp.app/BlueprintApp"; 534 | }; 535 | name = Release; 536 | }; 537 | 13B07F941A680F5B00A75B9A /* Debug */ = { 538 | isa = XCBuildConfiguration; 539 | buildSettings = { 540 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 541 | CURRENT_PROJECT_VERSION = 1; 542 | DEAD_CODE_STRIPPING = NO; 543 | INFOPLIST_FILE = BlueprintApp/Info.plist; 544 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 545 | OTHER_LDFLAGS = ( 546 | "$(inherited)", 547 | "-ObjC", 548 | "-lc++", 549 | ); 550 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 551 | PRODUCT_NAME = BlueprintApp; 552 | VERSIONING_SYSTEM = "apple-generic"; 553 | }; 554 | name = Debug; 555 | }; 556 | 13B07F951A680F5B00A75B9A /* Release */ = { 557 | isa = XCBuildConfiguration; 558 | buildSettings = { 559 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 560 | CURRENT_PROJECT_VERSION = 1; 561 | INFOPLIST_FILE = BlueprintApp/Info.plist; 562 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 563 | OTHER_LDFLAGS = ( 564 | "$(inherited)", 565 | "-ObjC", 566 | "-lc++", 567 | ); 568 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 569 | PRODUCT_NAME = BlueprintApp; 570 | VERSIONING_SYSTEM = "apple-generic"; 571 | }; 572 | name = Release; 573 | }; 574 | 2D02E4971E0B4A5E006451C7 /* Debug */ = { 575 | isa = XCBuildConfiguration; 576 | buildSettings = { 577 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 578 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 579 | CLANG_ANALYZER_NONNULL = YES; 580 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 581 | CLANG_WARN_INFINITE_RECURSION = YES; 582 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 583 | DEBUG_INFORMATION_FORMAT = dwarf; 584 | ENABLE_TESTABILITY = YES; 585 | GCC_NO_COMMON_BLOCKS = YES; 586 | INFOPLIST_FILE = "BlueprintApp-tvOS/Info.plist"; 587 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 588 | OTHER_LDFLAGS = ( 589 | "$(inherited)", 590 | "-ObjC", 591 | "-lc++", 592 | ); 593 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.BlueprintApp-tvOS"; 594 | PRODUCT_NAME = "$(TARGET_NAME)"; 595 | SDKROOT = appletvos; 596 | TARGETED_DEVICE_FAMILY = 3; 597 | TVOS_DEPLOYMENT_TARGET = 9.2; 598 | }; 599 | name = Debug; 600 | }; 601 | 2D02E4981E0B4A5E006451C7 /* Release */ = { 602 | isa = XCBuildConfiguration; 603 | buildSettings = { 604 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 605 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 606 | CLANG_ANALYZER_NONNULL = YES; 607 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 608 | CLANG_WARN_INFINITE_RECURSION = YES; 609 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 610 | COPY_PHASE_STRIP = NO; 611 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 612 | GCC_NO_COMMON_BLOCKS = YES; 613 | INFOPLIST_FILE = "BlueprintApp-tvOS/Info.plist"; 614 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 615 | OTHER_LDFLAGS = ( 616 | "$(inherited)", 617 | "-ObjC", 618 | "-lc++", 619 | ); 620 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.BlueprintApp-tvOS"; 621 | PRODUCT_NAME = "$(TARGET_NAME)"; 622 | SDKROOT = appletvos; 623 | TARGETED_DEVICE_FAMILY = 3; 624 | TVOS_DEPLOYMENT_TARGET = 9.2; 625 | }; 626 | name = Release; 627 | }; 628 | 2D02E4991E0B4A5E006451C7 /* Debug */ = { 629 | isa = XCBuildConfiguration; 630 | buildSettings = { 631 | BUNDLE_LOADER = "$(TEST_HOST)"; 632 | CLANG_ANALYZER_NONNULL = YES; 633 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 634 | CLANG_WARN_INFINITE_RECURSION = YES; 635 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 636 | DEBUG_INFORMATION_FORMAT = dwarf; 637 | ENABLE_TESTABILITY = YES; 638 | GCC_NO_COMMON_BLOCKS = YES; 639 | INFOPLIST_FILE = "BlueprintApp-tvOSTests/Info.plist"; 640 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 641 | OTHER_LDFLAGS = ( 642 | "$(inherited)", 643 | "-ObjC", 644 | "-lc++", 645 | ); 646 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.BlueprintApp-tvOSTests"; 647 | PRODUCT_NAME = "$(TARGET_NAME)"; 648 | SDKROOT = appletvos; 649 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BlueprintApp-tvOS.app/BlueprintApp-tvOS"; 650 | TVOS_DEPLOYMENT_TARGET = 10.1; 651 | }; 652 | name = Debug; 653 | }; 654 | 2D02E49A1E0B4A5E006451C7 /* Release */ = { 655 | isa = XCBuildConfiguration; 656 | buildSettings = { 657 | BUNDLE_LOADER = "$(TEST_HOST)"; 658 | CLANG_ANALYZER_NONNULL = YES; 659 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 660 | CLANG_WARN_INFINITE_RECURSION = YES; 661 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 662 | COPY_PHASE_STRIP = NO; 663 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 664 | GCC_NO_COMMON_BLOCKS = YES; 665 | INFOPLIST_FILE = "BlueprintApp-tvOSTests/Info.plist"; 666 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 667 | OTHER_LDFLAGS = ( 668 | "$(inherited)", 669 | "-ObjC", 670 | "-lc++", 671 | ); 672 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.BlueprintApp-tvOSTests"; 673 | PRODUCT_NAME = "$(TARGET_NAME)"; 674 | SDKROOT = appletvos; 675 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BlueprintApp-tvOS.app/BlueprintApp-tvOS"; 676 | TVOS_DEPLOYMENT_TARGET = 10.1; 677 | }; 678 | name = Release; 679 | }; 680 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 681 | isa = XCBuildConfiguration; 682 | buildSettings = { 683 | ALWAYS_SEARCH_USER_PATHS = NO; 684 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 685 | CLANG_CXX_LIBRARY = "libc++"; 686 | CLANG_ENABLE_MODULES = YES; 687 | CLANG_ENABLE_OBJC_ARC = YES; 688 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 689 | CLANG_WARN_BOOL_CONVERSION = YES; 690 | CLANG_WARN_COMMA = YES; 691 | CLANG_WARN_CONSTANT_CONVERSION = YES; 692 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 693 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 694 | CLANG_WARN_EMPTY_BODY = YES; 695 | CLANG_WARN_ENUM_CONVERSION = YES; 696 | CLANG_WARN_INFINITE_RECURSION = YES; 697 | CLANG_WARN_INT_CONVERSION = YES; 698 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 699 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 700 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 701 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 702 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 703 | CLANG_WARN_STRICT_PROTOTYPES = YES; 704 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 705 | CLANG_WARN_UNREACHABLE_CODE = YES; 706 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 707 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 708 | COPY_PHASE_STRIP = NO; 709 | ENABLE_STRICT_OBJC_MSGSEND = YES; 710 | ENABLE_TESTABILITY = YES; 711 | GCC_C_LANGUAGE_STANDARD = gnu99; 712 | GCC_DYNAMIC_NO_PIC = NO; 713 | GCC_NO_COMMON_BLOCKS = YES; 714 | GCC_OPTIMIZATION_LEVEL = 0; 715 | GCC_PREPROCESSOR_DEFINITIONS = ( 716 | "DEBUG=1", 717 | "$(inherited)", 718 | ); 719 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 720 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 721 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 722 | GCC_WARN_UNDECLARED_SELECTOR = YES; 723 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 724 | GCC_WARN_UNUSED_FUNCTION = YES; 725 | GCC_WARN_UNUSED_VARIABLE = YES; 726 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 727 | MTL_ENABLE_DEBUG_INFO = YES; 728 | ONLY_ACTIVE_ARCH = YES; 729 | SDKROOT = iphoneos; 730 | }; 731 | name = Debug; 732 | }; 733 | 83CBBA211A601CBA00E9B192 /* Release */ = { 734 | isa = XCBuildConfiguration; 735 | buildSettings = { 736 | ALWAYS_SEARCH_USER_PATHS = NO; 737 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 738 | CLANG_CXX_LIBRARY = "libc++"; 739 | CLANG_ENABLE_MODULES = YES; 740 | CLANG_ENABLE_OBJC_ARC = YES; 741 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 742 | CLANG_WARN_BOOL_CONVERSION = YES; 743 | CLANG_WARN_COMMA = YES; 744 | CLANG_WARN_CONSTANT_CONVERSION = YES; 745 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 746 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 747 | CLANG_WARN_EMPTY_BODY = YES; 748 | CLANG_WARN_ENUM_CONVERSION = YES; 749 | CLANG_WARN_INFINITE_RECURSION = YES; 750 | CLANG_WARN_INT_CONVERSION = YES; 751 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 752 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 753 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 754 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 755 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 756 | CLANG_WARN_STRICT_PROTOTYPES = YES; 757 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 758 | CLANG_WARN_UNREACHABLE_CODE = YES; 759 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 760 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 761 | COPY_PHASE_STRIP = YES; 762 | ENABLE_NS_ASSERTIONS = NO; 763 | ENABLE_STRICT_OBJC_MSGSEND = YES; 764 | GCC_C_LANGUAGE_STANDARD = gnu99; 765 | GCC_NO_COMMON_BLOCKS = YES; 766 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 767 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 768 | GCC_WARN_UNDECLARED_SELECTOR = YES; 769 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 770 | GCC_WARN_UNUSED_FUNCTION = YES; 771 | GCC_WARN_UNUSED_VARIABLE = YES; 772 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 773 | MTL_ENABLE_DEBUG_INFO = NO; 774 | SDKROOT = iphoneos; 775 | VALIDATE_PRODUCT = YES; 776 | }; 777 | name = Release; 778 | }; 779 | /* End XCBuildConfiguration section */ 780 | 781 | /* Begin XCConfigurationList section */ 782 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "BlueprintAppTests" */ = { 783 | isa = XCConfigurationList; 784 | buildConfigurations = ( 785 | 00E356F61AD99517003FC87E /* Debug */, 786 | 00E356F71AD99517003FC87E /* Release */, 787 | ); 788 | defaultConfigurationIsVisible = 0; 789 | defaultConfigurationName = Release; 790 | }; 791 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "BlueprintApp" */ = { 792 | isa = XCConfigurationList; 793 | buildConfigurations = ( 794 | 13B07F941A680F5B00A75B9A /* Debug */, 795 | 13B07F951A680F5B00A75B9A /* Release */, 796 | ); 797 | defaultConfigurationIsVisible = 0; 798 | defaultConfigurationName = Release; 799 | }; 800 | 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "BlueprintApp-tvOS" */ = { 801 | isa = XCConfigurationList; 802 | buildConfigurations = ( 803 | 2D02E4971E0B4A5E006451C7 /* Debug */, 804 | 2D02E4981E0B4A5E006451C7 /* Release */, 805 | ); 806 | defaultConfigurationIsVisible = 0; 807 | defaultConfigurationName = Release; 808 | }; 809 | 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "BlueprintApp-tvOSTests" */ = { 810 | isa = XCConfigurationList; 811 | buildConfigurations = ( 812 | 2D02E4991E0B4A5E006451C7 /* Debug */, 813 | 2D02E49A1E0B4A5E006451C7 /* Release */, 814 | ); 815 | defaultConfigurationIsVisible = 0; 816 | defaultConfigurationName = Release; 817 | }; 818 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "BlueprintApp" */ = { 819 | isa = XCConfigurationList; 820 | buildConfigurations = ( 821 | 83CBBA201A601CBA00E9B192 /* Debug */, 822 | 83CBBA211A601CBA00E9B192 /* Release */, 823 | ); 824 | defaultConfigurationIsVisible = 0; 825 | defaultConfigurationName = Release; 826 | }; 827 | /* End XCConfigurationList section */ 828 | }; 829 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 830 | } 831 | -------------------------------------------------------------------------------- /ios/BlueprintApp.xcodeproj/xcshareddata/xcschemes/StorybookApp-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 | -------------------------------------------------------------------------------- /ios/BlueprintApp.xcodeproj/xcshareddata/xcschemes/StorybookApp.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 | -------------------------------------------------------------------------------- /ios/BlueprintApp/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 | -------------------------------------------------------------------------------- /ios/BlueprintApp/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:@"BlueprintApp" 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 | -------------------------------------------------------------------------------- /ios/BlueprintApp/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 | -------------------------------------------------------------------------------- /ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images":[ 3 | { 4 | "idiom":"iphone", 5 | "size":"20x20", 6 | "scale":"2x", 7 | "filename":"Icon-App-20x20@2x.png" 8 | }, 9 | { 10 | "idiom":"iphone", 11 | "size":"20x20", 12 | "scale":"3x", 13 | "filename":"Icon-App-20x20@3x.png" 14 | }, 15 | { 16 | "idiom":"iphone", 17 | "size":"29x29", 18 | "scale":"1x", 19 | "filename":"Icon-App-29x29@1x.png" 20 | }, 21 | { 22 | "idiom":"iphone", 23 | "size":"29x29", 24 | "scale":"2x", 25 | "filename":"Icon-App-29x29@2x.png" 26 | }, 27 | { 28 | "idiom":"iphone", 29 | "size":"29x29", 30 | "scale":"3x", 31 | "filename":"Icon-App-29x29@3x.png" 32 | }, 33 | { 34 | "idiom":"iphone", 35 | "size":"40x40", 36 | "scale":"2x", 37 | "filename":"Icon-App-40x40@2x.png" 38 | }, 39 | { 40 | "idiom":"iphone", 41 | "size":"40x40", 42 | "scale":"3x", 43 | "filename":"Icon-App-40x40@3x.png" 44 | }, 45 | { 46 | "idiom":"iphone", 47 | "size":"60x60", 48 | "scale":"2x", 49 | "filename":"Icon-App-60x60@2x.png" 50 | }, 51 | { 52 | "idiom":"iphone", 53 | "size":"60x60", 54 | "scale":"3x", 55 | "filename":"Icon-App-60x60@3x.png" 56 | }, 57 | { 58 | "idiom":"iphone", 59 | "size":"76x76", 60 | "scale":"2x", 61 | "filename":"Icon-App-76x76@2x.png" 62 | }, 63 | { 64 | "idiom":"ipad", 65 | "size":"20x20", 66 | "scale":"1x", 67 | "filename":"Icon-App-20x20@1x.png" 68 | }, 69 | { 70 | "idiom":"ipad", 71 | "size":"20x20", 72 | "scale":"2x", 73 | "filename":"Icon-App-20x20@2x.png" 74 | }, 75 | { 76 | "idiom":"ipad", 77 | "size":"29x29", 78 | "scale":"1x", 79 | "filename":"Icon-App-29x29@1x.png" 80 | }, 81 | { 82 | "idiom":"ipad", 83 | "size":"29x29", 84 | "scale":"2x", 85 | "filename":"Icon-App-29x29@2x.png" 86 | }, 87 | { 88 | "idiom":"ipad", 89 | "size":"40x40", 90 | "scale":"1x", 91 | "filename":"Icon-App-40x40@1x.png" 92 | }, 93 | { 94 | "idiom":"ipad", 95 | "size":"40x40", 96 | "scale":"2x", 97 | "filename":"Icon-App-40x40@2x.png" 98 | }, 99 | { 100 | "idiom":"ipad", 101 | "size":"76x76", 102 | "scale":"1x", 103 | "filename":"Icon-App-76x76@1x.png" 104 | }, 105 | { 106 | "idiom":"ipad", 107 | "size":"76x76", 108 | "scale":"2x", 109 | "filename":"Icon-App-76x76@2x.png" 110 | }, 111 | { 112 | "idiom":"ipad", 113 | "size":"83.5x83.5", 114 | "scale":"2x", 115 | "filename":"Icon-App-83.5x83.5@2x.png" 116 | }, 117 | { 118 | "size" : "1024x1024", 119 | "idiom" : "ios-marketing", 120 | "scale" : "1x", 121 | "filename" : "ItunesArtwork@2x.png" 122 | } 123 | ], 124 | "info":{ 125 | "version":1, 126 | "author":"easyappicon" 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/ios/BlueprintApp/Images.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png -------------------------------------------------------------------------------- /ios/BlueprintApp/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ios/BlueprintApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | BlueprintApp 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 | UIAppFonts 57 | 58 | Roboto-Bold.ttf 59 | Roboto-BoldItalic.ttf 60 | Roboto-Light.ttf 61 | Roboto-LightItalic.ttf 62 | Roboto-Medium.ttf 63 | Roboto-MediumItalic.ttf 64 | Roboto-Regular.ttf 65 | Roboto-RegularItalic.ttf 66 | Roboto-Thin.ttf 67 | Roboto-ThinItalic.ttf 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /ios/BlueprintApp/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 | -------------------------------------------------------------------------------- /ios/BlueprintAppTests/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 | -------------------------------------------------------------------------------- /ios/BlueprintAppTests/StorybookAppTests.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 Native!" 16 | 17 | @interface BlueprintAppTests : XCTestCase 18 | 19 | @end 20 | 21 | @implementation BlueprintAppTests 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 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 44 | if (level >= RCTLogLevelError) { 45 | redboxError = message; 46 | } 47 | }); 48 | 49 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 50 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 51 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 52 | 53 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 54 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 55 | return YES; 56 | } 57 | return NO; 58 | }]; 59 | } 60 | 61 | RCTSetLogFunction(RCTDefaultLogFunction); 62 | 63 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 64 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 65 | } 66 | 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '9.0' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | target 'BlueprintApp' do 5 | # Pods for BlueprintApp 6 | pod 'React', :path => '../node_modules/react-native/' 7 | pod 'React-Core', :path => '../node_modules/react-native/React' 8 | pod 'React-DevSupport', :path => '../node_modules/react-native/React' 9 | pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS' 10 | pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation' 11 | pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob' 12 | pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image' 13 | pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS' 14 | pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network' 15 | pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings' 16 | pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text' 17 | pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration' 18 | pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket' 19 | 20 | pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact' 21 | pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi' 22 | pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor' 23 | pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector' 24 | pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga' 25 | 26 | pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' 27 | pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' 28 | pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec' 29 | 30 | target 'BlueprintAppTests' do 31 | inherit! :search_paths 32 | # Pods for testing 33 | end 34 | 35 | use_native_modules! 36 | end 37 | 38 | target 'BlueprintApp-tvOS' do 39 | # Pods for BlueprintApp-tvOS 40 | 41 | target 'BlueprintApp-tvOSTests' do 42 | inherit! :search_paths 43 | # Pods for testing 44 | end 45 | 46 | end 47 | -------------------------------------------------------------------------------- /lib.ts: -------------------------------------------------------------------------------- 1 | import Blueprint from './src/lib/Blueprint'; 2 | 3 | export default Blueprint; 4 | 5 | export {BlueprintProps} from './src/lib/Blueprint'; 6 | 7 | export {Guides, GridLines} from './src/lib/Grid'; 8 | 9 | export {ImageInfoAsync} from './src/lib/ImageSelect'; 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: false, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-ui-blueprint", 3 | "version": "0.1.0", 4 | "description": "To develop pixel perfect apps.", 5 | "main": "lib.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/nidorx/react-native-blueprint.git" 9 | }, 10 | "scripts": { 11 | "build-ts": "tsc -p tsconfig-lib.json", 12 | "publish-lib": "node v-release.js && node publish.js", 13 | "publish-lib-snapshot": "node v-snapshot.js && node publish.js", 14 | "lint": "eslint ." 15 | }, 16 | "author": "Alex Rodin ", 17 | "license": "MIT", 18 | "devDependencies": { 19 | "@babel/core": "7.6.0", 20 | "@babel/runtime": "7.6.0", 21 | "@react-native-community/eslint-config": "0.0.5", 22 | "eslint": "6.3.0", 23 | "metro-react-native-babel-preset": "0.54.1", 24 | "ncp": "^2.0.0", 25 | "react": "16.8.6", 26 | "react-native": "0.60.5", 27 | "rimraf": "^3.0.0", 28 | "semver": "^6.0.0", 29 | "typescript": "3.6.2", 30 | "@types/react": "16.9.2", 31 | "@types/react-native": "0.60.12" 32 | }, 33 | "peerDependencies": { 34 | "react": "^16.8.3", 35 | "react-native": "^0.60.0" 36 | }, 37 | "keywords": [ 38 | "ruler", 39 | "pixel perfect", 40 | "pixel-perfect", 41 | "grid", 42 | "guides", 43 | "designer", 44 | "mobile", 45 | "ui", 46 | "ux", 47 | "dev tools", 48 | "developer tools", 49 | "react native", 50 | "react native pixel", 51 | "react native pixel perfect", 52 | "react native pixel-perfect", 53 | "react native grid", 54 | "react native guides", 55 | "react native dev tools", 56 | "react native developer tools", 57 | "react native ui", 58 | "react native ux" 59 | ], 60 | "dependencies": { 61 | "tslib": "^1.10.0" 62 | } 63 | } -------------------------------------------------------------------------------- /publish.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Faz o build publicação no repositorio e tag do github. 3 | * 4 | * O versionamento do package.json não é feito automaticamente, afim de permitir um maior controle sobre o deploy. 5 | * 6 | * Os passos para usar esses script são: 7 | * 8 | * 1 - Após fazer alterações de código, conduzir normalmente com os commits no git 9 | * 2 - No momento de fazer a publicação de uma versão, no terminal: 10 | * a) git add --all 11 | * b) git commit -m "Mensagem das alterações feitas" 12 | * c) node ./publish.js 13 | */ 14 | 15 | const fs = require('fs'); 16 | const rimraf = require('rimraf'); 17 | const ncp = require('ncp').ncp; 18 | const cpExec = require('child_process').exec; 19 | 20 | function cp(source, dest) { 21 | return new Promise(function (accept, reject) { 22 | ncp(source, dest, function (err) { 23 | if (err) { 24 | return reject(err); 25 | } else { 26 | accept(); 27 | } 28 | }); 29 | }); 30 | } 31 | 32 | function exec(command, cwd) { 33 | 34 | return new Promise(function (accept, reject) { 35 | console.log('[' + command + ']'); 36 | const com = cpExec(command, {cwd: cwd}); 37 | 38 | com.stdout.on('data', function (data) { 39 | console.log(data.toString()); 40 | }); 41 | 42 | com.stderr.on('data', function (data) { 43 | console.error(data.toString()); 44 | }); 45 | 46 | com.on('exit', function (code, signal) { 47 | if (signal) { 48 | reject({ 49 | code: code, 50 | signal: signal, 51 | }); 52 | } else { 53 | accept({ 54 | code: code, 55 | signal: signal, 56 | }); 57 | } 58 | }); 59 | }); 60 | } 61 | 62 | rimraf('./dist', {}, function (err) { 63 | if (err) { 64 | throw err; 65 | } 66 | 67 | var package = JSON.parse(fs.readFileSync(__dirname + '/package.json')); 68 | 69 | exec('npm run build-ts') 70 | .then(cp.bind(undefined, './package.json', './dist/package.json')) 71 | .then(cp.bind(undefined, './README.md', './dist/README.md')) 72 | .then(cp.bind(undefined, './LICENSE', './dist/LICENSE')) 73 | .then(cp.bind(undefined, './src/assets/', './dist/src/assets/')) 74 | .then(exec.bind(undefined, 'npm publish', './dist')) 75 | .then(exec.bind(undefined, 'git add --all', null)) 76 | .then(exec.bind(undefined, 'git commit -m "Release of version v' + package.version + '"', null)) 77 | .then(exec.bind(undefined, 'git push', null)) 78 | .then(exec.bind(undefined, 'git tag v' + package.version, null)) 79 | .then(exec.bind(undefined, 'git push --tags', null)) 80 | .catch(err => { 81 | console.error(err); 82 | }); 83 | ; 84 | 85 | 86 | }); 87 | 88 | 89 | -------------------------------------------------------------------------------- /server/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /server/README.md: -------------------------------------------------------------------------------- 1 | # Simple Server 2 | 3 | ``` 4 | npm start 5 | ``` 6 | 7 | ## Web 8 | 9 | ``` 10 | http://localhost:3000 11 | ``` 12 | 13 | ## Android 14 | ``` 15 | adb reverse tcp:3000 tcp:3000 16 | ``` 17 | 18 | ## iOS 19 | You need to find the IP address of your mac and use that instead of localhost. Network preferences will show you your Mac's IP address 20 | 21 | ## Using on app 22 | 23 | ```jsx 24 | { 26 | const server = 'http://localhost:3000'; // IP address for iOS 27 | return fetch(`${server}/images.json`) 28 | .then(resp => resp.json()) 29 | .then(images => { 30 | images.forEach((image: any) => { 31 | image.uri = `${server}/${image.uri}`; 32 | image.thumb.uri = `${server}/${image.thumb.uri}`; 33 | }); 34 | return images; 35 | }); 36 | }} 37 | > 38 | ... 39 | 40 | ``` 41 | -------------------------------------------------------------------------------- /server/index.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const cors = require('cors'); 3 | const path = require('path'); 4 | const multer = require('multer'); 5 | const express = require('express'); 6 | 7 | const app = express(); 8 | const PORT = process.env.PORT || 3000; 9 | 10 | app.use(cors()); 11 | app.use(express.static('public')); 12 | 13 | if (!fs.existsSync('./public/images/')) { 14 | fs.mkdirSync('./public/images/'); 15 | } 16 | 17 | if (!fs.existsSync('./public/images.json')) { 18 | fs.writeFileSync('./public/images.json', JSON.stringify([])); 19 | } 20 | 21 | const imagesJson = require('./public/images.json'); 22 | 23 | app.post('/upload', multer().single('image'), (req, res) => { 24 | if (req.file) { 25 | const ext = path.extname(req.file.originalname); 26 | 27 | const imageName = 'i-' + (+new Date()) + ext; 28 | 29 | let imageInfo = { 30 | thumb: { 31 | uri: 'images/' + imageName, 32 | width: undefined, 33 | height: undefined 34 | }, 35 | width: undefined, 36 | height: undefined, 37 | uri: 'images/' + imageName, 38 | title: req.file.originalname.replace(ext, '') 39 | }; 40 | 41 | fs.writeFileSync('./public/images/' + imageName, req.file.buffer); 42 | 43 | imagesJson.push(imageInfo); 44 | 45 | fs.writeFileSync('./public/images.json', JSON.stringify(imagesJson)); 46 | } 47 | 48 | res.redirect('/'); 49 | }); 50 | 51 | app.listen(PORT, () => { 52 | console.log('Listening at ' + PORT); 53 | }); 54 | -------------------------------------------------------------------------------- /server/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "server", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "accepts": { 8 | "version": "1.3.7", 9 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", 10 | "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", 11 | "requires": { 12 | "mime-types": "~2.1.24", 13 | "negotiator": "0.6.2" 14 | } 15 | }, 16 | "append-field": { 17 | "version": "1.0.0", 18 | "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz", 19 | "integrity": "sha1-HjRA6RXwsSA9I3SOeO3XubW0PlY=" 20 | }, 21 | "array-flatten": { 22 | "version": "1.1.1", 23 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 24 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" 25 | }, 26 | "body-parser": { 27 | "version": "1.19.0", 28 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", 29 | "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", 30 | "requires": { 31 | "bytes": "3.1.0", 32 | "content-type": "~1.0.4", 33 | "debug": "2.6.9", 34 | "depd": "~1.1.2", 35 | "http-errors": "1.7.2", 36 | "iconv-lite": "0.4.24", 37 | "on-finished": "~2.3.0", 38 | "qs": "6.7.0", 39 | "raw-body": "2.4.0", 40 | "type-is": "~1.6.17" 41 | } 42 | }, 43 | "buffer-from": { 44 | "version": "1.1.1", 45 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", 46 | "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" 47 | }, 48 | "busboy": { 49 | "version": "0.2.14", 50 | "resolved": "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz", 51 | "integrity": "sha1-bCpiLvz0fFe7vh4qnDetNseSVFM=", 52 | "requires": { 53 | "dicer": "0.2.5", 54 | "readable-stream": "1.1.x" 55 | } 56 | }, 57 | "bytes": { 58 | "version": "3.1.0", 59 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", 60 | "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" 61 | }, 62 | "concat-stream": { 63 | "version": "1.6.2", 64 | "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", 65 | "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", 66 | "requires": { 67 | "buffer-from": "^1.0.0", 68 | "inherits": "^2.0.3", 69 | "readable-stream": "^2.2.2", 70 | "typedarray": "^0.0.6" 71 | }, 72 | "dependencies": { 73 | "isarray": { 74 | "version": "1.0.0", 75 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 76 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" 77 | }, 78 | "readable-stream": { 79 | "version": "2.3.6", 80 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", 81 | "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", 82 | "requires": { 83 | "core-util-is": "~1.0.0", 84 | "inherits": "~2.0.3", 85 | "isarray": "~1.0.0", 86 | "process-nextick-args": "~2.0.0", 87 | "safe-buffer": "~5.1.1", 88 | "string_decoder": "~1.1.1", 89 | "util-deprecate": "~1.0.1" 90 | } 91 | }, 92 | "string_decoder": { 93 | "version": "1.1.1", 94 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 95 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 96 | "requires": { 97 | "safe-buffer": "~5.1.0" 98 | } 99 | } 100 | } 101 | }, 102 | "content-disposition": { 103 | "version": "0.5.3", 104 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", 105 | "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", 106 | "requires": { 107 | "safe-buffer": "5.1.2" 108 | } 109 | }, 110 | "content-type": { 111 | "version": "1.0.4", 112 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", 113 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" 114 | }, 115 | "cookie": { 116 | "version": "0.4.0", 117 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", 118 | "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" 119 | }, 120 | "cookie-signature": { 121 | "version": "1.0.6", 122 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 123 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" 124 | }, 125 | "core-util-is": { 126 | "version": "1.0.2", 127 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 128 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" 129 | }, 130 | "cors": { 131 | "version": "2.8.5", 132 | "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", 133 | "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", 134 | "requires": { 135 | "object-assign": "^4", 136 | "vary": "^1" 137 | } 138 | }, 139 | "debug": { 140 | "version": "2.6.9", 141 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 142 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 143 | "requires": { 144 | "ms": "2.0.0" 145 | } 146 | }, 147 | "depd": { 148 | "version": "1.1.2", 149 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", 150 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" 151 | }, 152 | "destroy": { 153 | "version": "1.0.4", 154 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", 155 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" 156 | }, 157 | "dicer": { 158 | "version": "0.2.5", 159 | "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz", 160 | "integrity": "sha1-WZbAhrszIYyBLAkL3cCc0S+stw8=", 161 | "requires": { 162 | "readable-stream": "1.1.x", 163 | "streamsearch": "0.1.2" 164 | } 165 | }, 166 | "ee-first": { 167 | "version": "1.1.1", 168 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 169 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" 170 | }, 171 | "encodeurl": { 172 | "version": "1.0.2", 173 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 174 | "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" 175 | }, 176 | "escape-html": { 177 | "version": "1.0.3", 178 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 179 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" 180 | }, 181 | "etag": { 182 | "version": "1.8.1", 183 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 184 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" 185 | }, 186 | "express": { 187 | "version": "4.17.1", 188 | "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", 189 | "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", 190 | "requires": { 191 | "accepts": "~1.3.7", 192 | "array-flatten": "1.1.1", 193 | "body-parser": "1.19.0", 194 | "content-disposition": "0.5.3", 195 | "content-type": "~1.0.4", 196 | "cookie": "0.4.0", 197 | "cookie-signature": "1.0.6", 198 | "debug": "2.6.9", 199 | "depd": "~1.1.2", 200 | "encodeurl": "~1.0.2", 201 | "escape-html": "~1.0.3", 202 | "etag": "~1.8.1", 203 | "finalhandler": "~1.1.2", 204 | "fresh": "0.5.2", 205 | "merge-descriptors": "1.0.1", 206 | "methods": "~1.1.2", 207 | "on-finished": "~2.3.0", 208 | "parseurl": "~1.3.3", 209 | "path-to-regexp": "0.1.7", 210 | "proxy-addr": "~2.0.5", 211 | "qs": "6.7.0", 212 | "range-parser": "~1.2.1", 213 | "safe-buffer": "5.1.2", 214 | "send": "0.17.1", 215 | "serve-static": "1.14.1", 216 | "setprototypeof": "1.1.1", 217 | "statuses": "~1.5.0", 218 | "type-is": "~1.6.18", 219 | "utils-merge": "1.0.1", 220 | "vary": "~1.1.2" 221 | } 222 | }, 223 | "finalhandler": { 224 | "version": "1.1.2", 225 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", 226 | "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", 227 | "requires": { 228 | "debug": "2.6.9", 229 | "encodeurl": "~1.0.2", 230 | "escape-html": "~1.0.3", 231 | "on-finished": "~2.3.0", 232 | "parseurl": "~1.3.3", 233 | "statuses": "~1.5.0", 234 | "unpipe": "~1.0.0" 235 | } 236 | }, 237 | "forwarded": { 238 | "version": "0.1.2", 239 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", 240 | "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" 241 | }, 242 | "fresh": { 243 | "version": "0.5.2", 244 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 245 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" 246 | }, 247 | "http-errors": { 248 | "version": "1.7.2", 249 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", 250 | "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", 251 | "requires": { 252 | "depd": "~1.1.2", 253 | "inherits": "2.0.3", 254 | "setprototypeof": "1.1.1", 255 | "statuses": ">= 1.5.0 < 2", 256 | "toidentifier": "1.0.0" 257 | } 258 | }, 259 | "iconv-lite": { 260 | "version": "0.4.24", 261 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 262 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 263 | "requires": { 264 | "safer-buffer": ">= 2.1.2 < 3" 265 | } 266 | }, 267 | "inherits": { 268 | "version": "2.0.3", 269 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 270 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 271 | }, 272 | "ipaddr.js": { 273 | "version": "1.9.0", 274 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", 275 | "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" 276 | }, 277 | "isarray": { 278 | "version": "0.0.1", 279 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", 280 | "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" 281 | }, 282 | "media-typer": { 283 | "version": "0.3.0", 284 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 285 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" 286 | }, 287 | "merge-descriptors": { 288 | "version": "1.0.1", 289 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 290 | "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" 291 | }, 292 | "methods": { 293 | "version": "1.1.2", 294 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 295 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" 296 | }, 297 | "mime": { 298 | "version": "1.6.0", 299 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 300 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" 301 | }, 302 | "mime-db": { 303 | "version": "1.40.0", 304 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", 305 | "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==" 306 | }, 307 | "mime-types": { 308 | "version": "2.1.24", 309 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", 310 | "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", 311 | "requires": { 312 | "mime-db": "1.40.0" 313 | } 314 | }, 315 | "minimist": { 316 | "version": "0.0.8", 317 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", 318 | "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" 319 | }, 320 | "mkdirp": { 321 | "version": "0.5.1", 322 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", 323 | "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", 324 | "requires": { 325 | "minimist": "0.0.8" 326 | } 327 | }, 328 | "ms": { 329 | "version": "2.0.0", 330 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 331 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 332 | }, 333 | "multer": { 334 | "version": "1.4.2", 335 | "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.2.tgz", 336 | "integrity": "sha512-xY8pX7V+ybyUpbYMxtjM9KAiD9ixtg5/JkeKUTD6xilfDv0vzzOFcCp4Ljb1UU3tSOM3VTZtKo63OmzOrGi3Cg==", 337 | "requires": { 338 | "append-field": "^1.0.0", 339 | "busboy": "^0.2.11", 340 | "concat-stream": "^1.5.2", 341 | "mkdirp": "^0.5.1", 342 | "object-assign": "^4.1.1", 343 | "on-finished": "^2.3.0", 344 | "type-is": "^1.6.4", 345 | "xtend": "^4.0.0" 346 | } 347 | }, 348 | "negotiator": { 349 | "version": "0.6.2", 350 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", 351 | "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" 352 | }, 353 | "object-assign": { 354 | "version": "4.1.1", 355 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 356 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" 357 | }, 358 | "on-finished": { 359 | "version": "2.3.0", 360 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", 361 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", 362 | "requires": { 363 | "ee-first": "1.1.1" 364 | } 365 | }, 366 | "parseurl": { 367 | "version": "1.3.3", 368 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 369 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" 370 | }, 371 | "path-to-regexp": { 372 | "version": "0.1.7", 373 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 374 | "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" 375 | }, 376 | "process-nextick-args": { 377 | "version": "2.0.1", 378 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", 379 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" 380 | }, 381 | "proxy-addr": { 382 | "version": "2.0.5", 383 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", 384 | "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", 385 | "requires": { 386 | "forwarded": "~0.1.2", 387 | "ipaddr.js": "1.9.0" 388 | } 389 | }, 390 | "qs": { 391 | "version": "6.7.0", 392 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", 393 | "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" 394 | }, 395 | "range-parser": { 396 | "version": "1.2.1", 397 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 398 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" 399 | }, 400 | "raw-body": { 401 | "version": "2.4.0", 402 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", 403 | "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", 404 | "requires": { 405 | "bytes": "3.1.0", 406 | "http-errors": "1.7.2", 407 | "iconv-lite": "0.4.24", 408 | "unpipe": "1.0.0" 409 | } 410 | }, 411 | "readable-stream": { 412 | "version": "1.1.14", 413 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", 414 | "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", 415 | "requires": { 416 | "core-util-is": "~1.0.0", 417 | "inherits": "~2.0.1", 418 | "isarray": "0.0.1", 419 | "string_decoder": "~0.10.x" 420 | } 421 | }, 422 | "safe-buffer": { 423 | "version": "5.1.2", 424 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 425 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 426 | }, 427 | "safer-buffer": { 428 | "version": "2.1.2", 429 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 430 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 431 | }, 432 | "send": { 433 | "version": "0.17.1", 434 | "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", 435 | "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", 436 | "requires": { 437 | "debug": "2.6.9", 438 | "depd": "~1.1.2", 439 | "destroy": "~1.0.4", 440 | "encodeurl": "~1.0.2", 441 | "escape-html": "~1.0.3", 442 | "etag": "~1.8.1", 443 | "fresh": "0.5.2", 444 | "http-errors": "~1.7.2", 445 | "mime": "1.6.0", 446 | "ms": "2.1.1", 447 | "on-finished": "~2.3.0", 448 | "range-parser": "~1.2.1", 449 | "statuses": "~1.5.0" 450 | }, 451 | "dependencies": { 452 | "ms": { 453 | "version": "2.1.1", 454 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", 455 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" 456 | } 457 | } 458 | }, 459 | "serve-static": { 460 | "version": "1.14.1", 461 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", 462 | "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", 463 | "requires": { 464 | "encodeurl": "~1.0.2", 465 | "escape-html": "~1.0.3", 466 | "parseurl": "~1.3.3", 467 | "send": "0.17.1" 468 | } 469 | }, 470 | "setprototypeof": { 471 | "version": "1.1.1", 472 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", 473 | "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" 474 | }, 475 | "statuses": { 476 | "version": "1.5.0", 477 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", 478 | "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" 479 | }, 480 | "streamsearch": { 481 | "version": "0.1.2", 482 | "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz", 483 | "integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo=" 484 | }, 485 | "string_decoder": { 486 | "version": "0.10.31", 487 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", 488 | "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" 489 | }, 490 | "toidentifier": { 491 | "version": "1.0.0", 492 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", 493 | "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" 494 | }, 495 | "type-is": { 496 | "version": "1.6.18", 497 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 498 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 499 | "requires": { 500 | "media-typer": "0.3.0", 501 | "mime-types": "~2.1.24" 502 | } 503 | }, 504 | "typedarray": { 505 | "version": "0.0.6", 506 | "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", 507 | "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" 508 | }, 509 | "unpipe": { 510 | "version": "1.0.0", 511 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 512 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" 513 | }, 514 | "util-deprecate": { 515 | "version": "1.0.2", 516 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 517 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" 518 | }, 519 | "utils-merge": { 520 | "version": "1.0.1", 521 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 522 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" 523 | }, 524 | "vary": { 525 | "version": "1.1.2", 526 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 527 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" 528 | }, 529 | "xtend": { 530 | "version": "4.0.2", 531 | "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", 532 | "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" 533 | } 534 | } 535 | } 536 | -------------------------------------------------------------------------------- /server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "server", 3 | "version": "1.0.0", 4 | "description": "react-native-ui-blueprint Server", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "author": "Alex Rodin ", 10 | "license": "MIT", 11 | "dependencies": { 12 | "cors": "^2.8.5", 13 | "express": "^4.17.1", 14 | "multer": "^1.4.2" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /server/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React Native UI Blueprint - Server 6 | 108 | 109 | 110 | 111 |
112 | 113 |
114 | 115 |
116 |
117 | 118 | 119 |
120 |
121 | 122 |
123 |
124 |
125 |
126 | 127 | 128 |
129 |
130 | 131 | 155 | 156 | 157 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/src/assets/logo.png -------------------------------------------------------------------------------- /src/assets/logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/src/assets/logo@2x.png -------------------------------------------------------------------------------- /src/assets/logo@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/src/assets/logo@3x.png -------------------------------------------------------------------------------- /src/assets/move.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/src/assets/move.png -------------------------------------------------------------------------------- /src/assets/move@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/src/assets/move@2x.png -------------------------------------------------------------------------------- /src/assets/move@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/src/assets/move@3x.png -------------------------------------------------------------------------------- /src/assets/reset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/src/assets/reset.png -------------------------------------------------------------------------------- /src/assets/reset@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/src/assets/reset@2x.png -------------------------------------------------------------------------------- /src/assets/reset@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/src/assets/reset@3x.png -------------------------------------------------------------------------------- /src/assets/shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/src/assets/shadow.png -------------------------------------------------------------------------------- /src/lib/Grid.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | Animated, 4 | Dimensions, 5 | Image, 6 | ImageRequireSource, 7 | ImageURISource, 8 | PixelRatio, 9 | StyleSheet, 10 | Text, 11 | TouchableOpacity, 12 | View 13 | } from 'react-native' 14 | import {animateGenericNative} from "./Utils"; 15 | import Ruler from "./Ruler"; 16 | 17 | const GRAY = '#828282'; 18 | const MAGENTA = '#ff4aff'; 19 | const BLUE = '#18A0FB'; 20 | 21 | const pixelRatio = PixelRatio.get(); 22 | 23 | function pointToPixel(points: number) { 24 | return points * pixelRatio; 25 | } 26 | 27 | function pixelToPoint(pixels: number) { 28 | return pixels / pixelRatio; 29 | } 30 | 31 | export type Guides = Array<{ 32 | position: number; 33 | orientation: 'horizontal' | 'vertical'; 34 | unit?: '%' | 'dp' | 'px'; 35 | color?: string; 36 | opacity?: number; 37 | width?: number; 38 | }>; 39 | 40 | /** 41 | * Allows you to add regularly spaced marker lines on the screen 42 | */ 43 | export type GridLines = Array<{ 44 | spacing: number; 45 | color?: string; 46 | opacity?: number; 47 | width?: number; 48 | }> 49 | 50 | export type GridProps = { 51 | 52 | /** 53 | * Add guides on screen. Percentual, points or pixel. Ex. v50%, h50%, v10px, v10p 54 | */ 55 | guides?: Guides | false; 56 | 57 | /** 58 | * Allows you to add regularly spaced marker lines on the screen 59 | */ 60 | grid?: GridLines | false; 61 | 62 | /** 63 | * Sets grid alignment 64 | */ 65 | align: 'side' | 'center' | 'left' | 'right'; 66 | } 67 | 68 | /** 69 | * Add guidelines on screen 70 | */ 71 | export default class Grid extends React.PureComponent { 72 | 73 | render() { 74 | 75 | const {width, height} = Dimensions.get('screen'); 76 | 77 | const tiny = 8; 78 | const small = 16; 79 | const base = 24; 80 | const large = 48; 81 | const extra = 64; 82 | 83 | let guides: Guides = []; 84 | 85 | if (this.props.guides && this.props.guides.length > 0) { 86 | guides = guides.concat(this.props.guides); 87 | } else if (this.props.guides !== false) { 88 | // Default guides 89 | guides = [ 90 | { 91 | position: 50, 92 | orientation: 'horizontal', 93 | unit: '%' 94 | 95 | }, 96 | { 97 | position: 50, 98 | orientation: 'vertical', 99 | unit: '%' 100 | } 101 | ]; 102 | } 103 | 104 | const addGuides = ( 105 | maxPx: number, 106 | spacingPx: number, 107 | orientation: 'horizontal' | 'vertical', 108 | color: string, 109 | opacity: number, 110 | width?: number 111 | ) => { 112 | if (orientation === 'vertical') { 113 | let midle = maxPx / 2; 114 | if (this.props.align === 'left') { 115 | for (let a = spacingPx; a <= maxPx; a += spacingPx) { 116 | guides.push({ 117 | position: pixelToPoint(a), 118 | orientation: orientation, 119 | unit: 'dp', 120 | color: color, 121 | opacity: opacity, 122 | width: width 123 | }); 124 | } 125 | } else if (this.props.align === 'right') { 126 | for (let a = maxPx - spacingPx; a > 0; a -= spacingPx) { 127 | guides.push({ 128 | position: pixelToPoint(a), 129 | orientation: orientation, 130 | unit: 'dp', 131 | color: color, 132 | opacity: opacity, 133 | width: width 134 | }); 135 | } 136 | } else if (this.props.align === 'center') { 137 | for (let a = midle - spacingPx; a >= 0; a -= spacingPx) { 138 | guides.push({ 139 | position: pixelToPoint(a), 140 | orientation: orientation, 141 | unit: 'dp', 142 | color: color, 143 | opacity: opacity, 144 | width: width 145 | }); 146 | } 147 | for (let a = midle - spacingPx; a <= maxPx; a += spacingPx) { 148 | guides.push({ 149 | position: pixelToPoint(a), 150 | orientation: orientation, 151 | unit: 'dp', 152 | color: color, 153 | opacity: opacity, 154 | width: width 155 | }); 156 | } 157 | } else if (this.props.align === 'side') { 158 | for (let a = spacingPx; a < midle; a += spacingPx) { 159 | guides.push({ 160 | position: pixelToPoint(a), 161 | orientation: orientation, 162 | unit: 'dp', 163 | color: color, 164 | opacity: opacity, 165 | width: width 166 | }); 167 | } 168 | for (let a = maxPx - spacingPx; a > midle; a -= spacingPx) { 169 | guides.push({ 170 | position: pixelToPoint(a), 171 | orientation: orientation, 172 | unit: 'dp', 173 | color: color, 174 | opacity: opacity, 175 | width: width 176 | }); 177 | } 178 | } 179 | } else { 180 | for (let a = spacingPx; a <= maxPx; a += spacingPx) { 181 | guides.push({ 182 | position: pixelToPoint(a), 183 | orientation: orientation, 184 | unit: 'dp', 185 | color: color, 186 | opacity: opacity, 187 | width: width 188 | }); 189 | } 190 | } 191 | }; 192 | 193 | if (this.props.grid && this.props.grid.length > 0) { 194 | this.props.grid.forEach((value, index) => { 195 | let color = value.color || [GRAY, MAGENTA, BLUE][index % 3]; 196 | let opacity = value.opacity || (index * 0.1 + 0.2); 197 | addGuides(pointToPixel(width), pointToPixel(value.spacing), 'vertical', color, opacity, value.width); 198 | addGuides(pointToPixel(height), pointToPixel(value.spacing), 'horizontal', color, opacity, value.width); 199 | }); 200 | } else if (this.props.grid !== false) { 201 | addGuides(pointToPixel(width), pointToPixel(tiny), 'vertical', GRAY, 0.2); 202 | addGuides(pointToPixel(height), pointToPixel(tiny), 'horizontal', GRAY, 0.2); 203 | addGuides(pointToPixel(width), pointToPixel(base), 'vertical', MAGENTA, 0.3); 204 | addGuides(pointToPixel(height), pointToPixel(base), 'horizontal', MAGENTA, 0.3); 205 | } 206 | 207 | return ( 208 | 209 | { 210 | guides.map((guide, index) => { 211 | const pos = guide.position; 212 | const position = guide.unit === 'dp' 213 | ? pos 214 | : guide.unit === '%' 215 | ? `${pos}%` 216 | : pixelToPoint(pos); 217 | 218 | return ( 219 | 250 | ) 251 | }) 252 | } 253 | 254 | ) 255 | } 256 | } 257 | -------------------------------------------------------------------------------- /src/lib/ImageSelect.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | ActivityIndicator, 4 | Animated, 5 | FlatList, 6 | Image, 7 | ImageRequireSource, 8 | ImageURISource, 9 | StyleSheet, 10 | Text, 11 | TouchableOpacity, 12 | View 13 | } from 'react-native' 14 | import {animateGenericNative} from "./Utils"; 15 | 16 | export type ImageInfo = { 17 | thumb: { 18 | uri: string; 19 | width: number; 20 | height: number; 21 | }; 22 | width: number; 23 | height: number; 24 | uri: string; 25 | title?: string; 26 | } 27 | 28 | export type ImageInfoAsync = { 29 | thumb?: { 30 | uri: string; 31 | width?: number; 32 | height?: number; 33 | }; 34 | width?: number; 35 | height?: number; 36 | uri: string; 37 | title?: string; 38 | }; 39 | 40 | export type ImageSelectProps = { 41 | left: number; 42 | bottom: number; 43 | width: number; 44 | height: number; 45 | /** 46 | * Server images 47 | */ 48 | imagesAsync?: () => Promise>; 49 | /** 50 | * Add image to pixel-perfect 51 | */ 52 | images?: Array; 53 | 54 | onSelect: (info: ImageInfo) => void; 55 | } 56 | 57 | type ImageSelectState = { 58 | loading: boolean; 59 | images?: Array; 60 | } 61 | 62 | /** 63 | * Add guidelines on screen 64 | */ 65 | export default class ImageSelect extends React.PureComponent { 66 | 67 | state: ImageSelectState = { 68 | loading: true 69 | }; 70 | 71 | private animatedLoading = new Animated.Value(1); 72 | 73 | private animatedValue = new Animated.Value(0); 74 | 75 | async getImageSize(image: ImageURISource | ImageRequireSource): Promise { 76 | if (typeof image === "number") { 77 | let asset = Image.resolveAssetSource(image); 78 | return { 79 | uri: asset.uri, 80 | width: asset.width, 81 | height: asset.height, 82 | thumb: { 83 | uri: asset.uri, 84 | width: asset.width, 85 | height: asset.height 86 | } 87 | } 88 | } 89 | 90 | const uri = image.uri as string; 91 | 92 | return new Promise((resolve, reject) => { 93 | Image.getSize(uri, (width: number, height: number) => { 94 | resolve({ 95 | uri: uri, 96 | width: width, 97 | height: height, 98 | thumb: { 99 | uri: uri, 100 | width: width, 101 | height: height 102 | } 103 | }) 104 | }, reject); 105 | }); 106 | } 107 | 108 | private getImages = async () => { 109 | let images: Array = []; 110 | 111 | if (Array.isArray(this.props.images) && this.props.images.length > 0) { 112 | let localImages = await Promise.all(this.props.images.map(this.getImageSize)); 113 | images = images.concat(localImages); 114 | } else if (this.props.imagesAsync) { 115 | let asyncImages = await this.props.imagesAsync(); 116 | let imagesAsync = await Promise.all(asyncImages.map(async (image) => { 117 | if (!image.thumb) { 118 | image.thumb = { 119 | uri: image.uri 120 | }; 121 | 122 | let size = await this.getImageSize({ 123 | uri: image.uri 124 | }); 125 | 126 | image.width = image.thumb.width = size.width; 127 | image.height = image.thumb.height = size.height; 128 | } else if (!image.thumb.width || !image.thumb.height) { 129 | 130 | let size = await this.getImageSize({ 131 | uri: image.uri 132 | }); 133 | 134 | image.thumb.width = size.width; 135 | image.thumb.height = size.height; 136 | } 137 | 138 | return image; 139 | })) as Array; 140 | images = images.concat(imagesAsync); 141 | } 142 | 143 | this.setState({ 144 | images: images 145 | }, () => { 146 | animateGenericNative(this.animatedLoading, 0, result => { 147 | 148 | }); 149 | }) 150 | }; 151 | 152 | async componentDidMount() { 153 | animateGenericNative(this.animatedValue, 1); 154 | this.getImages(); 155 | } 156 | 157 | render() { 158 | const width = this.props.width * 0.35; 159 | return ( 160 | 188 | 189 | 198 | { 202 | return ( 203 | 210 | 217 | {"There are no images to display"} 218 | 219 | 220 | ) 221 | }} 222 | contentContainerStyle={{ 223 | flex: (this.state.images && this.state.images.length > 0) ? undefined : 1, 224 | paddingLeft: (this.state.images && this.state.images.length > 0) ? width + 5 : 0 225 | }} 226 | renderItem={({item}) => { 227 | return ( 228 | { 230 | if (!item.width || !item.height) { 231 | animateGenericNative(this.animatedLoading, 1); 232 | 233 | let size = await this.getImageSize({ 234 | uri: item.uri 235 | }); 236 | 237 | item.width = size.width; 238 | item.height = size.height; 239 | } 240 | animateGenericNative(this.animatedValue, 2, result => { 241 | this.props.onSelect(item); 242 | }); 243 | }} 244 | > 245 | 253 | 265 | 266 | { 267 | item.title 268 | ? ( 269 | 278 | {item.title} 279 | 280 | ) 281 | : null 282 | } 283 | 284 | 285 | 286 | ) 287 | }} 288 | horizontal={true} 289 | keyExtractor={(item, index) => `${index}`} 290 | refreshing={this.state.loading} 291 | /> 292 | 293 | 294 | 295 | 308 | 312 | 313 | 314 | 325 | 326 | ) 327 | } 328 | } 329 | -------------------------------------------------------------------------------- /src/lib/Utils.tsx: -------------------------------------------------------------------------------- 1 | import {Animated, Easing} from "react-native"; 2 | 3 | 4 | export const tiny = 6; 5 | export const small = 12; 6 | export const base = 18; 7 | export const large = 36; 8 | export const extra = 48; 9 | 10 | /** 11 | * Efeito de animação genérica usada nos componentes 12 | * 13 | * https://easings.net/#easeOutQuint 14 | * https://developers.google.com/web/fundamentals/design-and-ux/animations/choosing-the-right-easing 15 | * https://codepen.io/radialglo/post/understanding-the-intuition-of-easing 16 | */ 17 | export const QuinticEaseOut = Easing.bezier(0.23, 1, 0.32, 1); 18 | 19 | /** 20 | * Animação genérica usada nos componentes 21 | * 22 | * @param value 23 | * @param toValue 24 | * @param callback 25 | */ 26 | export function animateGeneric( 27 | value: Animated.Value | Animated.ValueXY, 28 | toValue: number, 29 | callback?: Animated.EndCallback, 30 | native?: boolean, 31 | start?: boolean, 32 | duration?: number 33 | ): Animated.CompositeAnimation { 34 | 35 | const animation = Animated.timing(value, { 36 | toValue: toValue, 37 | duration: duration || 250, 38 | easing: QuinticEaseOut, 39 | useNativeDriver: !!native 40 | }); 41 | 42 | if (start === undefined || start === true) { 43 | animation.start(callback); 44 | } 45 | 46 | return animation; 47 | } 48 | 49 | export function animateGenericNative( 50 | value: Animated.Value | Animated.ValueXY, 51 | toValue: number, 52 | callback?: Animated.EndCallback, 53 | start?: boolean, 54 | duration?: number 55 | ): Animated.CompositeAnimation { 56 | return animateGeneric(value, toValue, callback, true, start, duration); 57 | } 58 | -------------------------------------------------------------------------------- /src_img/build.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Faz a conversão de SVG para PNG (node.js + Inkscape + pngquant), 3 | * permitindo a geração de ícones para dispositivos com diferents densidades. 4 | * 5 | * Permite o redimensionamento de PNG puros também 6 | * 7 | * https://inkscape.org/en/doc/inkscape-man.html 8 | * https://www.imagemagick.org/script/download.php#windows 9 | * https://mijingo.com/blog/exporting-svg-from-the-command-line-with-inkscape 10 | * 11 | * - Instalar Inkscape e adicionar no PATH (C:\Program Files\Inkscape) 12 | * - Baixar o pngquant.exe e copiar para o PATH (C:\windows) https://pngquant.org 13 | * - Instalar ImageMagick 14 | * - Configurar SVG_PATH_INPUT, PNG_PATH_OUTPUT, BASE_RESOLUTION e DENSITIES 15 | * - Executar no terminal `node build.js` 16 | * 17 | * ps. A qualidade de conversão de SVG -> PNG pelo inkscape é muito superior ao do Imagemagick 18 | */ 19 | 20 | const fs = require('fs'); 21 | const path = require('path'); 22 | const child_process = require('child_process'); 23 | 24 | /** 25 | * Força a recriação do PNG? 26 | */ 27 | const FORCE = false; 28 | 29 | // Diretório de entrada, onde os arquivos .svg estão 30 | const PATH_INPUT = path.normalize(__dirname + '/img/'); 31 | 32 | // Diretório de saída, dos arquivos png 33 | const PATH_OUTPUT = path.normalize(__dirname + './../src/assets/'); 34 | 35 | // Densidades das imagens geradas, usadas para aplicações Mobile (Ex. edit.png, edit@2x.png, edit@3x.png) 36 | const DENSITIES = [1, 2, 3]; 37 | 38 | const images = require('./images.js'); 39 | 40 | for (var name in images) { 41 | if (!images.hasOwnProperty(name)) { 42 | continue; 43 | } 44 | 45 | let config = images[name]; 46 | if (Number.isInteger(config) || Array.isArray(config)) { 47 | config = { 48 | size: config 49 | }; 50 | } 51 | 52 | var baseSize = config.size; 53 | if (!Array.isArray(baseSize)) { 54 | baseSize = [baseSize, baseSize]; 55 | } 56 | 57 | 58 | let pathInput = path.join(PATH_INPUT, name); 59 | let pathOutput = pathInput.replace(PATH_INPUT, PATH_OUTPUT); 60 | 61 | let inputType = ''; 62 | let outputExt = ''; 63 | if (name.endsWith('.svg')) { 64 | outputExt = '.svg'; 65 | } else if (name.endsWith('.png')) { 66 | outputExt = '.png'; 67 | } else if (name.endsWith('.jpg')) { 68 | outputExt = '.jpg'; 69 | } 70 | 71 | if (fs.existsSync(pathInput.replace(outputExt, '.svg'))) { 72 | inputType = 'SVG'; 73 | pathInput = pathInput.replace(outputExt, '.svg'); 74 | } else if (fs.existsSync(pathInput.replace(outputExt, '.png'))) { 75 | inputType = 'PNG'; 76 | pathInput = pathInput.replace(outputExt, '.png'); 77 | } else if (fs.existsSync(pathInput.replace(outputExt, '.jpg'))) { 78 | inputType = 'JPG'; 79 | pathInput = pathInput.replace(outputExt, '.jpg'); 80 | } 81 | 82 | let parsedViewBox = false; 83 | 84 | DENSITIES.forEach((density) => { 85 | 86 | const suffix = (density > 1 ? ('@' + (density) + 'x') : ''); 87 | const outPath = pathOutput.replace(outputExt, suffix + outputExt); 88 | if (fs.existsSync(outPath) && !FORCE) { 89 | return; 90 | } 91 | 92 | if (inputType === 'SVG' && !parsedViewBox) { 93 | parsedViewBox = true; 94 | // Faz parsing do viewBox="0 0 90 32" do svg 95 | var svg = fs.readFileSync(pathInput) + ''; 96 | var viewBox = svg.match(/viewBox="\d+ \d+ ([\d.]+) ([\d.]+)"/); 97 | if (viewBox) { 98 | var vbW = Number.parseFloat(viewBox[1]); 99 | var vbH = Number.parseFloat(viewBox[2]); 100 | if (vbW !== vbH && baseSize[0] === baseSize[1]) { 101 | // Svg não é quadrado e foi iformado um valor único para renderizar o svg 102 | var baseRes = baseSize[0]; 103 | if (vbW > vbH) { 104 | let ratio = vbW / vbH; 105 | baseSize = [baseRes, Math.round(baseRes / ratio)]; 106 | } else { 107 | let ratio = vbH / vbW; 108 | baseSize = [Math.round(baseRes / ratio), baseRes]; 109 | } 110 | } 111 | } 112 | } 113 | 114 | const resW = baseSize[0] === 1 ? 1 : density * baseSize[0]; 115 | const resH = baseSize[1] === 1 ? 1 : density * baseSize[1]; 116 | 117 | console.log('Salvando arquivo: ', outPath); 118 | 119 | if (inputType === 'SVG') { 120 | // Converte SVG to PNG, unsando inkscape (qualidade melhor na conversão) 121 | child_process.execSync(`"inkscape" -z -e "${outPath}" -w ${resW} -h ${resH} "${pathInput}"`, {stdio: [0, 1, 2]}); 122 | } else { 123 | // Redimensiona png ou jpg 124 | child_process.execSync(`"magick" "${pathInput}" -resize ${resW}x${resH}\\! "${outPath}"`, {stdio: [0, 1, 2]}); 125 | } 126 | 127 | let tamInicial = getFilesizeInBytes(outPath); 128 | let tamFinal, tamAnterior = tamInicial; 129 | 130 | console.log(' - Arquivo criado { tamanho:', tamInicial, '}'); 131 | 132 | // Compressão de imagens 133 | if (outputExt === '.png') { 134 | try { 135 | child_process.execSync(`pngquant -f --strip --speed 2 --skip-if-larger --quality=65-85 -o "${outPath}" "${outPath}"`, {stdio: [0, 1, 2]}); 136 | tamFinal = getFilesizeInBytes(outPath); 137 | console.log(' - Compactacao 1 { tamanho:', tamFinal, ', percentual:', percentual(tamAnterior, tamFinal), '}'); 138 | tamAnterior = tamFinal; 139 | 140 | console.log(' - Compactacao total { percentual:', percentual(tamInicial, tamFinal), '}'); 141 | } catch (error) { 142 | console.error('Erro na compactação'); 143 | } 144 | } else if (outputExt === '.jpg') { 145 | try { 146 | child_process.execSync(`"magick" "${outPath}" -sampling-factor 4:2:0 -strip -quality 80 -interlace JPEG -colorspace RGB "${outPath}"`, {stdio: [0, 1, 2]}); 147 | tamFinal = getFilesizeInBytes(outPath); 148 | console.log(' - Compactacao 1 { tamanho:', tamFinal, ', percentual:', percentual(tamAnterior, tamFinal), '}'); 149 | tamAnterior = tamFinal; 150 | 151 | console.log(' - Compactacao total { percentual:', percentual(tamInicial, tamFinal), '}'); 152 | } catch (error) { 153 | console.error('Erro na compactação'); 154 | } 155 | } 156 | 157 | }); 158 | } 159 | 160 | function percentual(tamInicial, tamFinal) { 161 | return (100 - (100 * tamFinal / tamInicial)).toFixed(2) + '%'; 162 | } 163 | 164 | function getFilesizeInBytes(filename) { 165 | const stats = fs.statSync(filename) 166 | const fileSizeInBytes = stats.size 167 | return fileSizeInBytes 168 | } 169 | -------------------------------------------------------------------------------- /src_img/images.js: -------------------------------------------------------------------------------- 1 | // Guideline sizes are based on standard ~5" screen mobile device 2 | // const W = 350; 3 | // const H = 680; 4 | module.exports = { 5 | "logo.png": 80, 6 | "move.png": 50, 7 | "reset.png": 50, 8 | }; 9 | -------------------------------------------------------------------------------- /src_img/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidorx/react-native-ui-blueprint/5fedf7df309cc646ffde71711a7378b7dd9d1084/src_img/img/logo.png -------------------------------------------------------------------------------- /src_img/img/move.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src_img/img/reset.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tsconfig-lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "es6", 5 | "outDir": "./dist", 6 | "sourceMap": true, 7 | "experimentalDecorators": true, 8 | "jsx": "react-native", 9 | "lib": [ 10 | "es6" 11 | ], 12 | "allowSyntheticDefaultImports": true, 13 | "moduleResolution": "node", 14 | "noEmitHelpers": true, 15 | "importHelpers": true, 16 | "strict": true, 17 | "noImplicitReturns": true, 18 | "rootDir": ".", 19 | "allowJs": false, 20 | "isolatedModules": false, 21 | "declaration": true, 22 | "baseUrl": "./", 23 | "noImplicitAny": true, 24 | "skipLibCheck": true, 25 | "paths": { 26 | "*": [ 27 | "node_modules/*", 28 | "src/types/*" 29 | ] 30 | } 31 | }, 32 | "files": [ 33 | "lib.ts" 34 | ], 35 | "exclude": [ 36 | "*.js", 37 | "node_modules", 38 | "__tests__", 39 | "tests", 40 | "dist", 41 | "example", 42 | "doc", 43 | "babel.config.js", 44 | "metro.config.js" 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowJs": true, 4 | "isolatedModules": false, 5 | "jsx": "react", 6 | "lib": [ 7 | "es6" 8 | ], 9 | "esModuleInterop": true, 10 | "noEmit": true, 11 | "target": "esnext", 12 | "module": "es6", 13 | "outDir": "./dist", 14 | "sourceMap": true, 15 | "experimentalDecorators": true, 16 | "allowSyntheticDefaultImports": true, 17 | "moduleResolution": "node", 18 | "noEmitHelpers": true, 19 | "importHelpers": true, 20 | "strict": true, 21 | "noImplicitReturns": true, 22 | "rootDir": ".", 23 | "declaration": true, 24 | "baseUrl": "./", 25 | "noImplicitAny": true, 26 | "skipLibCheck": true, 27 | "paths": { 28 | "*": [ 29 | "node_modules/*", 30 | "src/types/*" 31 | ] 32 | } 33 | }, 34 | "exclude": [ 35 | "*.js", 36 | "node_modules", 37 | "__tests__", 38 | "tests", 39 | "dist", 40 | "example", 41 | "doc", 42 | "babel.config.js", 43 | "metro.config.js" 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /v-release.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Altera a versão para RELEASE antes do build 3 | */ 4 | const fs = require('fs'); 5 | const http = require('http'); 6 | const semver = require('semver'); 7 | 8 | var options = { 9 | hostname: 'registry.npmjs.org', 10 | port: 80, 11 | path: '/react-native-ui-blueprint', 12 | method: 'GET', 13 | headers: { 14 | 'Accept': 'application/json' 15 | } 16 | }; 17 | 18 | var req = http.request(options, function (res) { 19 | var json = ''; 20 | res.setEncoding('utf8'); 21 | res.on('data', function (data) { 22 | json += data; 23 | 24 | }); 25 | 26 | res.on('end', function () { 27 | let info = JSON.parse(json); 28 | 29 | // No formato '0.1.0', '0.2.0' 30 | var release = '0.0.0'; 31 | 32 | var version = ''; 33 | for (var v in info.versions) { 34 | if (semver.prerelease(v)) { 35 | continue; 36 | } else if (semver.gt(v, release)) { 37 | release = v; 38 | } 39 | } 40 | 41 | // Numero da nova versão SNAPHSOT (pre) 42 | var version = semver.inc(release, 'minor'); 43 | console.log('Incrementing react-native-ui-blueprint version to: "' + version + '"'); 44 | 45 | var packageJson = require('./package.json'); 46 | 47 | packageJson.version = version; 48 | 49 | fs.writeFileSync('./package.json', JSON.stringify(packageJson, null, 4)); 50 | }); 51 | }); 52 | 53 | req.on('error', function (e) { 54 | throw e; 55 | }); 56 | 57 | req.end(); 58 | -------------------------------------------------------------------------------- /v-snapshot.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Altera a versão para SNAPSHOT antes do build 3 | */ 4 | const fs = require('fs'); 5 | const http = require('http'); 6 | const semver = require('semver'); 7 | 8 | var options = { 9 | hostname: 'registry.npmjs.org', 10 | port: 80, 11 | path: '/react-native-ui-blueprint', 12 | method: 'GET', 13 | headers: { 14 | 'Accept': 'application/json' 15 | } 16 | }; 17 | 18 | var req = http.request(options, function (res) { 19 | var json = ''; 20 | res.setEncoding('utf8'); 21 | res.on('data', function (data) { 22 | json += data; 23 | 24 | }); 25 | 26 | res.on('end', function () { 27 | let info = JSON.parse(json); 28 | 29 | // No formato '0.1.0', '0.2.0' 30 | var release = '0.0.0'; 31 | 32 | // No formato '0.1.0-pre.0', '0.1.0-pre.1', '0.1.0-pre.2' 33 | var snapshot = '0.0.0'; 34 | var version = ''; 35 | for (var v in info.versions) { 36 | if (semver.prerelease(v)) { 37 | // Pre-release 38 | if (semver.gt(v, snapshot)) { 39 | snapshot = v; 40 | } 41 | } else if (semver.gt(v, release)) { 42 | release = v; 43 | } 44 | } 45 | 46 | // Se não possui snapshot da versão atual, zera para garantir o uso do preminor 47 | if (semver.gt(release, snapshot)) { 48 | snapshot = '0.0.0'; 49 | } 50 | 51 | // Numero da nova versão SNAPHSOT (pre) 52 | // Se já possui um prerelease, apenas incrementa a versão do snapshot 53 | // Ex. Se existir '0.1.0-pre.0', a proxima será '0.1.0-pre.1' 54 | if (snapshot != '0.0.0') { 55 | version = semver.inc(snapshot, 'prerelease', 'pre'); 56 | } else { 57 | version = semver.inc(release, 'preminor', 'pre'); 58 | } 59 | 60 | console.log('Incrementing react-native-ui-blueprint version to: "' + version + '"'); 61 | 62 | var packageJson = require('./package.json'); 63 | 64 | packageJson.version = version; 65 | 66 | fs.writeFileSync('./package.json', JSON.stringify(packageJson, null, 4)); 67 | }); 68 | }); 69 | 70 | req.on('error', function (e) { 71 | throw e; 72 | }); 73 | 74 | req.end(); 75 | --------------------------------------------------------------------------------