├── .github └── workflows │ └── codeql-analysis.yml ├── .gitignore ├── .prettierrc ├── .vscode ├── launch.json └── settings.json ├── App.tsx ├── Gemfile ├── LICENSE ├── README-DemoApp.md ├── README.md ├── RELEASE_PROCEDURE.md ├── android ├── app │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ ├── debug │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── rnstyledtextdemo │ │ │ └── ReactNativeFlipper.java │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── rnstyledtextdemo │ │ │ │ ├── MainActivity.java │ │ │ │ └── MainApplication.java │ │ └── res │ │ │ ├── drawable │ │ │ └── rn_edit_text_material.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── release │ │ └── java │ │ └── com │ │ └── rnstyledtextdemo │ │ └── ReactNativeFlipper.java ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── app.json ├── babel.config.js ├── docs ├── example-android.png ├── example-ios.png ├── example.png ├── happyStyling.png └── welcome.png ├── index.js ├── ios ├── .xcode.env ├── Podfile ├── Podfile.lock ├── RNStyledTextDemo.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── RNStyledTextDemo.xcscheme ├── RNStyledTextDemo.xcworkspace │ └── contents.xcworkspacedata ├── RNStyledTextDemo │ ├── AppDelegate.h │ ├── AppDelegate.mm │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Info.plist │ ├── LaunchScreen.storyboard │ └── main.m └── RNStyledTextDemoTests │ ├── Info.plist │ └── RNStyledTextDemoTests.m ├── jest.config.js ├── lib ├── CHANGELOG.md ├── StyledText │ ├── index.js │ ├── lexicalAnalyzer.js │ ├── parser.js │ ├── renderer.js │ └── utils.js ├── __tests__ │ ├── lexicalAnalyzer.spec.js │ ├── parser.spec.js │ └── utils.spec.js ├── index.d.ts ├── index.js └── package.json ├── metro.config.js ├── package.json └── tsconfig.json /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: 'CodeQL' 13 | 14 | on: 15 | push: 16 | branches: [develop] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [develop] 20 | schedule: 21 | - cron: '44 11 * * 4' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: ['javascript'] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] 37 | # Learn more about CodeQL language support at https://git.io/codeql-language-support 38 | 39 | steps: 40 | - name: Checkout repository 41 | uses: actions/checkout@v2 42 | 43 | # Initializes the CodeQL tools for scanning. 44 | - name: Initialize CodeQL 45 | uses: github/codeql-action/init@v1 46 | with: 47 | languages: ${{ matrix.language }} 48 | # If you wish to specify custom queries, you can do so here or in a config file. 49 | # By default, queries listed here will override any specified in a config file. 50 | # Prefix the list here with "+" to use these queries and those in the config file. 51 | # queries: ./path/to/local/query, your-org/your-repo/queries@main 52 | 53 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 54 | # If this step fails, then you should remove it and run the build manually (see below) 55 | - name: Autobuild 56 | uses: github/codeql-action/autobuild@v1 57 | 58 | # ℹ️ Command-line programs to run using the OS shell. 59 | # 📚 https://git.io/JvXDl 60 | 61 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 62 | # and modify them (or add more) to build your code if your project 63 | # uses a compiled language 64 | 65 | #- run: | 66 | # make bootstrap 67 | # make release 68 | 69 | - name: Perform CodeQL Analysis 70 | uses: github/codeql-action/analyze@v1 71 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Yarn 2 | yarn.lock 3 | 4 | # OSX 5 | # 6 | .DS_Store 7 | 8 | # Xcode 9 | # 10 | build/ 11 | *.pbxuser 12 | !default.pbxuser 13 | *.mode1v3 14 | !default.mode1v3 15 | *.mode2v3 16 | !default.mode2v3 17 | *.perspectivev3 18 | !default.perspectivev3 19 | xcuserdata 20 | *.xccheckout 21 | *.moved-aside 22 | DerivedData 23 | *.hmap 24 | *.ipa 25 | *.xcuserstate 26 | ios/.xcode.env.local 27 | ios/Pods/ 28 | 29 | # Android/IntelliJ 30 | # 31 | build/ 32 | .idea 33 | .gradle 34 | local.properties 35 | *.iml 36 | *.hprof 37 | .cxx/ 38 | *.keystore 39 | !debug.keystore 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 | *.keystore 51 | 52 | # fastlane 53 | # 54 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 55 | # screenshots whenever they are needed. 56 | # For more information about the recommended setup visit: 57 | # https://docs.fastlane.tools/best-practices/source-control/ 58 | 59 | */fastlane/report.xml 60 | */fastlane/Preview.html 61 | */fastlane/screenshots 62 | 63 | # Bundle artifact 64 | *.jsbundle 65 | /coverage 66 | /.vscode/.react 67 | /lib/LICENSE 68 | /lib/README.md 69 | 70 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 2, 3 | "useTabs": false, 4 | "singleQuote": true 5 | } 6 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "node", 9 | "request": "launch", 10 | "name": "Jest All", 11 | "program": "${workspaceRoot}/node_modules/jest/bin/jest", 12 | "args": ["--runInBand"], 13 | "console": "integratedTerminal", 14 | "internalConsoleOptions": "neverOpen" 15 | }, 16 | { 17 | "name": "Attach to packager", 18 | "program": "${workspaceRoot}/.vscode/launchReactNative.js", 19 | "type": "reactnative", 20 | "request": "attach", 21 | "sourceMaps": true, 22 | "outDir": "${workspaceRoot}/.vscode/.react" 23 | }, 24 | { 25 | "name": "Debug iOS", 26 | "program": "${workspaceRoot}/.vscode/launchReactNative.js", 27 | "type": "reactnative", 28 | "request": "launch", 29 | "platform": "ios", 30 | "sourceMaps": true, 31 | "outDir": "${workspaceRoot}/.vscode/.react" 32 | }, 33 | { 34 | "name": "Debug Android", 35 | "program": "${workspaceRoot}/.vscode/launchReactNative.js", 36 | "type": "reactnative", 37 | "request": "launch", 38 | "platform": "android", 39 | "sourceMaps": true, 40 | "outDir": "${workspaceRoot}/.vscode/.react" 41 | }, 42 | ] 43 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | // "eslint.enable": true, 3 | // "eslint.autoFixOnSave": true, 4 | // For flow 5 | "flow.runOnAllFiles": true, 6 | "flow.useNPMPackagedFlow": true, 7 | "javascript.validate.enable": false, 8 | "javascript.preferences.quoteStyle": "single", 9 | "typescript.preferences.quoteStyle": "single" 10 | } -------------------------------------------------------------------------------- /App.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | * @flow 7 | */ 8 | 9 | import React, { Component } from "react"; 10 | import { Platform, StyleSheet, Text, View } from "react-native"; 11 | 12 | import StyledText from "./lib"; 13 | 14 | const instructions = Platform.select({ 15 | ios: "Press Cmd+R to reload,\n" + "Cmd+D or shake for dev menu", 16 | android: 17 | "Double tap R on your keyboard to reload,\n" + 18 | "Shake or press menu button for dev menu", 19 | }); 20 | 21 | type Props = {}; 22 | export default class App extends Component { 23 | render() { 24 | return ( 25 | 26 | 27 | { 28 | "Welcome to React Native Styled Text demo!" 29 | } 30 | 31 | 32 | {"Run yarn add react-native-styled-text to install"} 33 | 34 | 35 | 36 | {"<StyledText"} 37 | 38 | 42 | {"style={styles.header}"} 43 | 44 | 45 | {">"} 46 | 47 | 51 | { 52 | '{"Ha<i>pp</i>y <b>Styling</b>!"}' 53 | } 54 | 55 | 56 | {"</StyledText>"} 57 | 58 | 59 | 60 | {"Happy Styling!"} 61 | 62 | 63 | ); 64 | } 65 | } 66 | 67 | const styles = StyleSheet.create({ 68 | container: { 69 | flex: 1, 70 | justifyContent: "center", 71 | backgroundColor: "#F5FCFF", 72 | }, 73 | welcome: { 74 | fontSize: 16, 75 | textAlign: "center", 76 | padding: 10, 77 | }, 78 | instruction: { 79 | fontSize: 14, 80 | textAlign: "left", 81 | color: "#333333", 82 | padding: 10, 83 | }, 84 | header: { 85 | fontSize: 20, 86 | color: "orange", 87 | textAlign: "center", 88 | padding: 10, 89 | }, 90 | jsxContainer: { 91 | backgroundColor: "#333", 92 | padding: 10, 93 | }, 94 | jsx: { 95 | textAlign: "left", 96 | paddingLeft: 10, 97 | paddingVertical: 0, 98 | fontWeight: "500", 99 | fontSize: 12, 100 | 101 | fontFamily: "courier", 102 | }, 103 | jsxProp: { 104 | paddingLeft: 25, 105 | color: "#8EDDFF", 106 | }, 107 | }); 108 | 109 | const textStyles = StyleSheet.create({ 110 | demo: { 111 | textShadowOffset: { width: 2, height: 2 }, 112 | textShadowColor: "#555555", 113 | textShadowRadius: 6, 114 | fontSize: 18, 115 | color: "#22AA44", 116 | }, 117 | code: { 118 | fontWeight: "bold", 119 | fontFamily: "courier", 120 | fontSize: 18, 121 | }, 122 | }); 123 | 124 | const jsxStyles = StyleSheet.create({ 125 | ltgt: { 126 | color: "#888", 127 | }, 128 | comp: { 129 | color: "#00CCB0", 130 | }, 131 | eq: { 132 | color: "white", 133 | }, 134 | brace: { 135 | color: "#4797D6", 136 | }, 137 | string: { 138 | color: "#D68E76", 139 | }, 140 | }); 141 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version 4 | ruby ">= 2.6.10" 5 | 6 | gem 'cocoapods', '~> 1.12' 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Fram X 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-DemoApp.md: -------------------------------------------------------------------------------- 1 | This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli). 2 | 3 | # Getting Started 4 | 5 | >**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding. 6 | 7 | ## Step 1: Start the Metro Server 8 | 9 | First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native. 10 | 11 | To start Metro, run the following command from the _root_ of your React Native project: 12 | 13 | ```bash 14 | # using npm 15 | npm start 16 | 17 | # OR using Yarn 18 | yarn start 19 | ``` 20 | 21 | ## Step 2: Start your Application 22 | 23 | Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app: 24 | 25 | ### For Android 26 | 27 | ```bash 28 | # using npm 29 | npm run android 30 | 31 | # OR using Yarn 32 | yarn android 33 | ``` 34 | 35 | ### For iOS 36 | 37 | ```bash 38 | # using npm 39 | npm run ios 40 | 41 | # OR using Yarn 42 | yarn ios 43 | ``` 44 | 45 | If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly. 46 | 47 | This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively. 48 | 49 | ## Step 3: Modifying your App 50 | 51 | Now that you have successfully run the app, let's modify it. 52 | 53 | 1. Open `App.tsx` in your text editor of choice and edit some lines. 54 | 2. For **Android**: Press the R key twice or select **"Reload"** from the **Developer Menu** (Ctrl + M (on Window and Linux) or Cmd ⌘ + M (on macOS)) to see your changes! 55 | 56 | For **iOS**: Hit Cmd ⌘ + R in your iOS Simulator to reload the app and see your changes! 57 | 58 | ## Congratulations! :tada: 59 | 60 | You've successfully run and modified your React Native App. :partying_face: 61 | 62 | ### Now what? 63 | 64 | - If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps). 65 | - If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started). 66 | 67 | # Troubleshooting 68 | 69 | If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page. 70 | 71 | # Learn More 72 | 73 | To learn more about React Native, take a look at the following resources: 74 | 75 | - [React Native Website](https://reactnative.dev) - learn more about React Native. 76 | - [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment. 77 | - [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**. 78 | - [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts. 79 | - [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native. 80 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Styled Text for React Native 2 | 3 | 4 | 5 | 6 | 7 | 8 | ## Introduction 9 | 10 | The purpose of this library is to support easy rendering of mixed text styles. 11 | 12 | 13 | 14 | 15 | The library implements a `StyledText` component taking an HTML-like string in the `children` property and an optional text styles property. 16 | 17 | ## Try it out 18 | 19 | Online demo on [expo.io](https://snack.expo.io/@bjorn.egil/styledtext-demo) 20 | 21 | ## Installation 22 | 23 | To install the library into your project, run yarn or npm: 24 | 25 | `yarn add react-native-styled-text` 26 | 27 | or 28 | 29 | `npm i react-native-styled-text` 30 | 31 | ## Examples 32 | 33 | ### Using default styles 34 | 35 | For simple styling `StyledText` supports some predefined styles: 36 | 37 | - b: **bold** 38 | - i: _italic_ 39 | - u: underline 40 | 41 | Example: 42 | 43 | ```javascript 44 | import { StyleSheet } from 'react-native'; 45 | import StyledText from 'react-native-styled-text'; 46 | 47 | ... 48 | 51 | {"Happy Styling!"} 52 | 53 | ... 54 | 55 | const styles = StyleSheet.create({ 56 | header: { 57 | fontSize: 24, 58 | color: 'orange', 59 | textAlign: 'center', 60 | padding: 30, 61 | }, 62 | }); 63 | 64 | ``` 65 | 66 | Renders as 67 | 68 | 69 | 70 | ### Using custom styles 71 | 72 | For richer styling, you set the `textStyles` property of `StyledText` to an object (e.g. `StyleSheet`) containing your custom text styles and apply these styles in the `text` property. 73 | 74 | Example: 75 | 76 | ```javascript 77 | import { StyleSheet } from 'react-native'; 78 | import StyledText from 'react-native-styled-text'; 79 | 80 | ... 81 | 85 | {"Welcome to React Native Styled Text demo!"} 86 | 87 | ... 88 | 89 | const styles = StyleSheet.create({ 90 | welcome: { 91 | fontSize: 20, 92 | textAlign: 'center', 93 | padding: 30, 94 | }, 95 | }); 96 | 97 | const textStyles = StyleSheet.create({ 98 | demo: { 99 | textShadowOffset: { width: 2, height: 2 }, 100 | textShadowColor: '#555555', 101 | textShadowRadius: 6, 102 | fontSize: 24, 103 | color: '#22AA44', 104 | }, 105 | }); 106 | 107 | ``` 108 | 109 | Renders as 110 | 111 | 112 | 113 | ## How it works 114 | 115 | Internally, the `render` function of `StyledText` parses the value of the `children` property, which must be a string, and returns a nested structure of React Native [`Text`](https://facebook.github.io/react-native/docs/text) components. 116 | 117 | From the example above: 118 | 119 | ```javascript 120 | {'Happy Styling!'} 121 | ``` 122 | 123 | would be transformed to: 124 | 125 | ```javascript 126 | 127 | Happy{' '} 128 | Styling! 129 | 130 | ``` 131 | 132 | So `StyledText` just provides a more compact, readable and flexible coding of nested `Text` components. 133 | 134 | ## API 135 | 136 | In addition to the React Native `Text` properties, `StyledText` supports the following properties, with a restriction on the `children` proerty: 137 | 138 | | Name | Description | 139 | | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 140 | | children | String with style tags for mixed styling of the text. Each style tag must match one of the styles provided in textStyles or one of the default styles, see below. (Optional) | 141 | | textStyles | Object (e.g. `StyleSheet`) containing definition of the styles used in the provided text. (Optional) | 142 | 143 | The following default styles are defined: 144 | 145 | | Name | Description | 146 | | ---- | ----------- | 147 | | b | **bold** | 148 | | i | _italic_ | 149 | | u | underline | 150 | 151 | ### Contributors 152 | 153 | Bjørn Egil Hansen (@bjornegil) 154 | 155 | ### Sponsors 156 | 157 | [Fram X](https://framx.no) - a cross platform app company from Norway. 158 | -------------------------------------------------------------------------------- /RELEASE_PROCEDURE.md: -------------------------------------------------------------------------------- 1 | ## Publish new release 2 | 3 | ### Make changes 4 | 5 | - Make neccessary changes, verify that tests run and not type issues 6 | - Update ./lib/CHANGELOG.md with changes for the to-be version 7 | - Commit changes and merge branch to develop 8 | 9 | ### Bump version and publish 10 | 11 | - git checkout develop & git pull 12 | - Copy REAMD.md and LICENSE to ./lib folder 13 | - Run one of: 14 | - cd ./lib && npm version patch && cd .. && npm version patch && npm publish ./lib 15 | - cd ./lib && npm version minor && cd .. && npm version minor && npm publish ./lib 16 | - cd ./lib && npm version major && cd .. && npm version major && npm publish ./lib 17 | 18 | npm version will update in package.json, create a corresponding tag and push changes and tags to github repository. A github action will trigger on new tag and publish the new version to npm and create a new release in the github repository. 19 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | apply plugin: "com.facebook.react" 3 | 4 | /** 5 | * This is the configuration block to customize your React Native Android app. 6 | * By default you don't need to apply any configuration, just uncomment the lines you need. 7 | */ 8 | react { 9 | /* Folders */ 10 | // The root of your project, i.e. where "package.json" lives. Default is '..' 11 | // root = file("../") 12 | // The folder where the react-native NPM package is. Default is ../node_modules/react-native 13 | // reactNativeDir = file("../node_modules/react-native") 14 | // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen 15 | // codegenDir = file("../node_modules/@react-native/codegen") 16 | // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js 17 | // cliFile = file("../node_modules/react-native/cli.js") 18 | 19 | /* Variants */ 20 | // The list of variants to that are debuggable. For those we're going to 21 | // skip the bundling of the JS bundle and the assets. By default is just 'debug'. 22 | // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. 23 | // debuggableVariants = ["liteDebug", "prodDebug"] 24 | 25 | /* Bundling */ 26 | // A list containing the node command and its flags. Default is just 'node'. 27 | // nodeExecutableAndArgs = ["node"] 28 | // 29 | // The command to run when bundling. By default is 'bundle' 30 | // bundleCommand = "ram-bundle" 31 | // 32 | // The path to the CLI configuration file. Default is empty. 33 | // bundleConfig = file(../rn-cli.config.js) 34 | // 35 | // The name of the generated asset file containing your JS bundle 36 | // bundleAssetName = "MyApplication.android.bundle" 37 | // 38 | // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' 39 | // entryFile = file("../js/MyApplication.android.js") 40 | // 41 | // A list of extra flags to pass to the 'bundle' commands. 42 | // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle 43 | // extraPackagerArgs = [] 44 | 45 | /* Hermes Commands */ 46 | // The hermes compiler command to run. By default it is 'hermesc' 47 | // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" 48 | // 49 | // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" 50 | // hermesFlags = ["-O", "-output-source-map"] 51 | } 52 | 53 | /** 54 | * Set this to true to Run Proguard on Release builds to minify the Java bytecode. 55 | */ 56 | def enableProguardInReleaseBuilds = false 57 | 58 | /** 59 | * The preferred build flavor of JavaScriptCore (JSC) 60 | * 61 | * For example, to use the international variant, you can use: 62 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` 63 | * 64 | * The international variant includes ICU i18n library and necessary data 65 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that 66 | * give correct results when using with locales other than en-US. Note that 67 | * this variant is about 6MiB larger per architecture than default. 68 | */ 69 | def jscFlavor = 'org.webkit:android-jsc:+' 70 | 71 | android { 72 | ndkVersion rootProject.ext.ndkVersion 73 | 74 | compileSdkVersion rootProject.ext.compileSdkVersion 75 | 76 | namespace "com.rnstyledtextdemo" 77 | defaultConfig { 78 | applicationId "com.rnstyledtextdemo" 79 | minSdkVersion rootProject.ext.minSdkVersion 80 | targetSdkVersion rootProject.ext.targetSdkVersion 81 | versionCode 1 82 | versionName "1.0" 83 | } 84 | signingConfigs { 85 | debug { 86 | storeFile file('debug.keystore') 87 | storePassword 'android' 88 | keyAlias 'androiddebugkey' 89 | keyPassword 'android' 90 | } 91 | } 92 | buildTypes { 93 | debug { 94 | signingConfig signingConfigs.debug 95 | } 96 | release { 97 | // Caution! In production, you need to generate your own keystore file. 98 | // see https://reactnative.dev/docs/signed-apk-android. 99 | signingConfig signingConfigs.debug 100 | minifyEnabled enableProguardInReleaseBuilds 101 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 102 | } 103 | } 104 | } 105 | 106 | dependencies { 107 | // The version of react-native is set by the React Native Gradle Plugin 108 | implementation("com.facebook.react:react-android") 109 | 110 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") 111 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { 112 | exclude group:'com.squareup.okhttp3', module:'okhttp' 113 | } 114 | 115 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") 116 | if (hermesEnabled.toBoolean()) { 117 | implementation("com.facebook.react:hermes-android") 118 | } else { 119 | implementation jscFlavor 120 | } 121 | } 122 | 123 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) 124 | -------------------------------------------------------------------------------- /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 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /android/app/src/debug/java/com/rnstyledtextdemo/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | *

This source code is licensed under the MIT license found in the LICENSE file in the root 5 | * directory of this source tree. 6 | */ 7 | package com.rnstyledtextdemo; 8 | 9 | import android.content.Context; 10 | import com.facebook.flipper.android.AndroidFlipperClient; 11 | import com.facebook.flipper.android.utils.FlipperUtils; 12 | import com.facebook.flipper.core.FlipperClient; 13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; 14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; 15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; 16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping; 17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; 18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; 19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; 20 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; 21 | import com.facebook.react.ReactInstanceEventListener; 22 | import com.facebook.react.ReactInstanceManager; 23 | import com.facebook.react.bridge.ReactContext; 24 | import com.facebook.react.modules.network.NetworkingModule; 25 | import okhttp3.OkHttpClient; 26 | 27 | /** 28 | * Class responsible of loading Flipper inside your React Native application. This is the debug 29 | * flavor of it. Here you can add your own plugins and customize the Flipper setup. 30 | */ 31 | public class ReactNativeFlipper { 32 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 33 | if (FlipperUtils.shouldEnableFlipper(context)) { 34 | final FlipperClient client = AndroidFlipperClient.getInstance(context); 35 | 36 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); 37 | client.addPlugin(new DatabasesFlipperPlugin(context)); 38 | client.addPlugin(new SharedPreferencesFlipperPlugin(context)); 39 | client.addPlugin(CrashReporterPlugin.getInstance()); 40 | 41 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); 42 | NetworkingModule.setCustomClientBuilder( 43 | new NetworkingModule.CustomClientBuilder() { 44 | @Override 45 | public void apply(OkHttpClient.Builder builder) { 46 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); 47 | } 48 | }); 49 | client.addPlugin(networkFlipperPlugin); 50 | client.start(); 51 | 52 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized 53 | // Hence we run if after all native modules have been initialized 54 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); 55 | if (reactContext == null) { 56 | reactInstanceManager.addReactInstanceEventListener( 57 | new ReactInstanceEventListener() { 58 | @Override 59 | public void onReactContextInitialized(ReactContext reactContext) { 60 | reactInstanceManager.removeReactInstanceEventListener(this); 61 | reactContext.runOnNativeModulesQueueThread( 62 | new Runnable() { 63 | @Override 64 | public void run() { 65 | client.addPlugin(new FrescoFlipperPlugin()); 66 | } 67 | }); 68 | } 69 | }); 70 | } else { 71 | client.addPlugin(new FrescoFlipperPlugin()); 72 | } 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/rnstyledtextdemo/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.rnstyledtextdemo; 2 | 3 | import com.facebook.react.ReactActivity; 4 | import com.facebook.react.ReactActivityDelegate; 5 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint; 6 | import com.facebook.react.defaults.DefaultReactActivityDelegate; 7 | 8 | public class MainActivity extends ReactActivity { 9 | 10 | /** 11 | * Returns the name of the main component registered from JavaScript. This is used to schedule 12 | * rendering of the component. 13 | */ 14 | @Override 15 | protected String getMainComponentName() { 16 | return "RNStyledTextDemo"; 17 | } 18 | 19 | /** 20 | * Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link 21 | * DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React 22 | * (aka React 18) with two boolean flags. 23 | */ 24 | @Override 25 | protected ReactActivityDelegate createReactActivityDelegate() { 26 | return new DefaultReactActivityDelegate( 27 | this, 28 | getMainComponentName(), 29 | // If you opted-in for the New Architecture, we enable the Fabric Renderer. 30 | DefaultNewArchitectureEntryPoint.getFabricEnabled()); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/rnstyledtextdemo/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.rnstyledtextdemo; 2 | 3 | import android.app.Application; 4 | import com.facebook.react.PackageList; 5 | import com.facebook.react.ReactApplication; 6 | import com.facebook.react.ReactNativeHost; 7 | import com.facebook.react.ReactPackage; 8 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint; 9 | import com.facebook.react.defaults.DefaultReactNativeHost; 10 | import com.facebook.soloader.SoLoader; 11 | import java.util.List; 12 | 13 | public class MainApplication extends Application implements ReactApplication { 14 | 15 | private final ReactNativeHost mReactNativeHost = 16 | new DefaultReactNativeHost(this) { 17 | @Override 18 | public boolean getUseDeveloperSupport() { 19 | return BuildConfig.DEBUG; 20 | } 21 | 22 | @Override 23 | protected List getPackages() { 24 | @SuppressWarnings("UnnecessaryLocalVariable") 25 | List packages = new PackageList(this).getPackages(); 26 | // Packages that cannot be autolinked yet can be added manually here, for example: 27 | // packages.add(new MyReactNativePackage()); 28 | return packages; 29 | } 30 | 31 | @Override 32 | protected String getJSMainModuleName() { 33 | return "index"; 34 | } 35 | 36 | @Override 37 | protected boolean isNewArchEnabled() { 38 | return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; 39 | } 40 | 41 | @Override 42 | protected Boolean isHermesEnabled() { 43 | return BuildConfig.IS_HERMES_ENABLED; 44 | } 45 | }; 46 | 47 | @Override 48 | public ReactNativeHost getReactNativeHost() { 49 | return mReactNativeHost; 50 | } 51 | 52 | @Override 53 | public void onCreate() { 54 | super.onCreate(); 55 | SoLoader.init(this, /* native exopackage */ false); 56 | if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { 57 | // If you opted-in for the New Architecture, we load the native entry point for this app. 58 | DefaultNewArchitectureEntryPoint.load(); 59 | } 60 | ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/rn_edit_text_material.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 21 | 22 | 23 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fram-x/react-native-styled-text/13f041eed0c986b9f1fa2eed65d01172ec986b2a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fram-x/react-native-styled-text/13f041eed0c986b9f1fa2eed65d01172ec986b2a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fram-x/react-native-styled-text/13f041eed0c986b9f1fa2eed65d01172ec986b2a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fram-x/react-native-styled-text/13f041eed0c986b9f1fa2eed65d01172ec986b2a/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/fram-x/react-native-styled-text/13f041eed0c986b9f1fa2eed65d01172ec986b2a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fram-x/react-native-styled-text/13f041eed0c986b9f1fa2eed65d01172ec986b2a/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/fram-x/react-native-styled-text/13f041eed0c986b9f1fa2eed65d01172ec986b2a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fram-x/react-native-styled-text/13f041eed0c986b9f1fa2eed65d01172ec986b2a/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/fram-x/react-native-styled-text/13f041eed0c986b9f1fa2eed65d01172ec986b2a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fram-x/react-native-styled-text/13f041eed0c986b9f1fa2eed65d01172ec986b2a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | RNStyledTextDemo 3 | 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /android/app/src/release/java/com/rnstyledtextdemo/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | *

This source code is licensed under the MIT license found in the LICENSE file in the root 5 | * directory of this source tree. 6 | */ 7 | package com.rnstyledtextdemo; 8 | 9 | import android.content.Context; 10 | import com.facebook.react.ReactInstanceManager; 11 | 12 | /** 13 | * Class responsible of loading Flipper inside your React Native application. This is the release 14 | * flavor of it so it's empty as we don't want to load Flipper. 15 | */ 16 | public class ReactNativeFlipper { 17 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 18 | // Do nothing as we don't want to initialize Flipper on Release. 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /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 = "33.0.0" 6 | minSdkVersion = 21 7 | compileSdkVersion = 33 8 | targetSdkVersion = 33 9 | 10 | // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. 11 | ndkVersion = "23.1.7779620" 12 | } 13 | repositories { 14 | google() 15 | mavenCentral() 16 | } 17 | dependencies { 18 | classpath("com.android.tools.build:gradle") 19 | classpath("com.facebook.react:react-native-gradle-plugin") 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /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: -Xmx512m -XX:MaxMetaspaceSize=256m 13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m 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 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | # Automatically convert third-party libraries to use AndroidX 25 | android.enableJetifier=true 26 | 27 | # Version of flipper SDK to use with React Native 28 | FLIPPER_VERSION=0.182.0 29 | 30 | # Use this property to specify which architecture you want to build. 31 | # You can also override it from the CLI using 32 | # ./gradlew -PreactNativeArchitectures=x86_64 33 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 34 | 35 | # Use this property to enable support to the new architecture. 36 | # This will allow you to use TurboModules and the Fabric render in 37 | # your application. You should enable this flag either if you want 38 | # to write custom TurboModules/Fabric components OR use libraries that 39 | # are providing them. 40 | newArchEnabled=false 41 | 42 | # Use this property to enable or disable the Hermes JS engine. 43 | # If set to false, you will be using JSC instead. 44 | hermesEnabled=true 45 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fram-x/react-native-styled-text/13f041eed0c986b9f1fa2eed65d01172ec986b2a/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-8.0.1-all.zip 4 | networkTimeout=10000 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original 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 | # https://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 POSIX generated by Gradle. 22 | # 23 | # Important for running: 24 | # 25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 26 | # noncompliant, but you have some other compliant shell such as ksh or 27 | # bash, then to run this script, type that shell name before the whole 28 | # command line, like: 29 | # 30 | # ksh Gradle 31 | # 32 | # Busybox and similar reduced shells will NOT work, because this script 33 | # requires all of these POSIX shell features: 34 | # * functions; 35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 37 | # * compound commands having a testable exit status, especially «case»; 38 | # * various built-in commands including «command», «set», and «ulimit». 39 | # 40 | # Important for patching: 41 | # 42 | # (2) This script targets any POSIX shell, so it avoids extensions provided 43 | # by Bash, Ksh, etc; in particular arrays are avoided. 44 | # 45 | # The "traditional" practice of packing multiple parameters into a 46 | # space-separated string is a well documented source of bugs and security 47 | # problems, so this is (mostly) avoided, by progressively accumulating 48 | # options in "$@", and eventually passing that to Java. 49 | # 50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 52 | # see the in-line comments for details. 53 | # 54 | # There are tweaks for specific operating systems such as AIX, CygWin, 55 | # Darwin, MinGW, and NonStop. 56 | # 57 | # (3) This script is generated from the Groovy template 58 | # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 59 | # within the Gradle project. 60 | # 61 | # You can find Gradle at https://github.com/gradle/gradle/. 62 | # 63 | ############################################################################## 64 | 65 | # Attempt to set APP_HOME 66 | 67 | # Resolve links: $0 may be a link 68 | app_path=$0 69 | 70 | # Need this for daisy-chained symlinks. 71 | while 72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 73 | [ -h "$app_path" ] 74 | do 75 | ls=$( ls -ld "$app_path" ) 76 | link=${ls#*' -> '} 77 | case $link in #( 78 | /*) app_path=$link ;; #( 79 | *) app_path=$APP_HOME$link ;; 80 | esac 81 | done 82 | 83 | # This is normally unused 84 | # shellcheck disable=SC2034 85 | APP_BASE_NAME=${0##*/} 86 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit 87 | 88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 90 | 91 | # Use the maximum available, or set MAX_FD != -1 to use that value. 92 | MAX_FD=maximum 93 | 94 | warn () { 95 | echo "$*" 96 | } >&2 97 | 98 | die () { 99 | echo 100 | echo "$*" 101 | echo 102 | exit 1 103 | } >&2 104 | 105 | # OS specific support (must be 'true' or 'false'). 106 | cygwin=false 107 | msys=false 108 | darwin=false 109 | nonstop=false 110 | case "$( uname )" in #( 111 | CYGWIN* ) cygwin=true ;; #( 112 | Darwin* ) darwin=true ;; #( 113 | MSYS* | MINGW* ) msys=true ;; #( 114 | NONSTOP* ) nonstop=true ;; 115 | esac 116 | 117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 118 | 119 | 120 | # Determine the Java command to use to start the JVM. 121 | if [ -n "$JAVA_HOME" ] ; then 122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 123 | # IBM's JDK on AIX uses strange locations for the executables 124 | JAVACMD=$JAVA_HOME/jre/sh/java 125 | else 126 | JAVACMD=$JAVA_HOME/bin/java 127 | fi 128 | if [ ! -x "$JAVACMD" ] ; then 129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 130 | 131 | Please set the JAVA_HOME variable in your environment to match the 132 | location of your Java installation." 133 | fi 134 | else 135 | JAVACMD=java 136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 137 | 138 | Please set the JAVA_HOME variable in your environment to match the 139 | location of your Java installation." 140 | fi 141 | 142 | # Increase the maximum file descriptors if we can. 143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 144 | case $MAX_FD in #( 145 | max*) 146 | # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. 147 | # shellcheck disable=SC3045 148 | MAX_FD=$( ulimit -H -n ) || 149 | warn "Could not query maximum file descriptor limit" 150 | esac 151 | case $MAX_FD in #( 152 | '' | soft) :;; #( 153 | *) 154 | # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. 155 | # shellcheck disable=SC3045 156 | ulimit -n "$MAX_FD" || 157 | warn "Could not set maximum file descriptor limit to $MAX_FD" 158 | esac 159 | fi 160 | 161 | # Collect all arguments for the java command, stacking in reverse order: 162 | # * args from the command line 163 | # * the main class name 164 | # * -classpath 165 | # * -D...appname settings 166 | # * --module-path (only if needed) 167 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 168 | 169 | # For Cygwin or MSYS, switch paths to Windows format before running java 170 | if "$cygwin" || "$msys" ; then 171 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 172 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 173 | 174 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 175 | 176 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 177 | for arg do 178 | if 179 | case $arg in #( 180 | -*) false ;; # don't mess with options #( 181 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 182 | [ -e "$t" ] ;; #( 183 | *) false ;; 184 | esac 185 | then 186 | arg=$( cygpath --path --ignore --mixed "$arg" ) 187 | fi 188 | # Roll the args list around exactly as many times as the number of 189 | # args, so each arg winds up back in the position where it started, but 190 | # possibly modified. 191 | # 192 | # NB: a `for` loop captures its iteration list before it begins, so 193 | # changing the positional parameters here affects neither the number of 194 | # iterations, nor the values presented in `arg`. 195 | shift # remove old arg 196 | set -- "$@" "$arg" # push replacement arg 197 | done 198 | fi 199 | 200 | # Collect all arguments for the java command; 201 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of 202 | # shell script including quotes and variable substitutions, so put them in 203 | # double quotes to make sure that they get re-expanded; and 204 | # * put everything else in single quotes, so that it's not re-expanded. 205 | 206 | set -- \ 207 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 208 | -classpath "$CLASSPATH" \ 209 | org.gradle.wrapper.GradleWrapperMain \ 210 | "$@" 211 | 212 | # Stop when "xargs" is not available. 213 | if ! command -v xargs >/dev/null 2>&1 214 | then 215 | die "xargs is not available" 216 | fi 217 | 218 | # Use "xargs" to parse quoted args. 219 | # 220 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 221 | # 222 | # In Bash we could simply go: 223 | # 224 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 225 | # set -- "${ARGS[@]}" "$@" 226 | # 227 | # but POSIX shell has neither arrays nor command substitution, so instead we 228 | # post-process each arg (as a line of input to sed) to backslash-escape any 229 | # character that might be a shell metacharacter, then use eval to reverse 230 | # that process (while maintaining the separation between arguments), and wrap 231 | # the whole thing up as a single "set" statement. 232 | # 233 | # This will of course break if any of these variables contains a newline or 234 | # an unmatched quote. 235 | # 236 | 237 | eval "set -- $( 238 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 239 | xargs -n1 | 240 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 241 | tr '\n' ' ' 242 | )" '"$@"' 243 | 244 | exec "$JAVACMD" "$@" 245 | -------------------------------------------------------------------------------- /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 https://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 | @rem This is normally unused 30 | set APP_BASE_NAME=%~n0 31 | set APP_HOME=%DIRNAME% 32 | 33 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 34 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 35 | 36 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 37 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 38 | 39 | @rem Find java.exe 40 | if defined JAVA_HOME goto findJavaFromJavaHome 41 | 42 | set JAVA_EXE=java.exe 43 | %JAVA_EXE% -version >NUL 2>&1 44 | if %ERRORLEVEL% equ 0 goto execute 45 | 46 | echo. 47 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 48 | echo. 49 | echo Please set the JAVA_HOME variable in your environment to match the 50 | echo location of your Java installation. 51 | 52 | goto fail 53 | 54 | :findJavaFromJavaHome 55 | set JAVA_HOME=%JAVA_HOME:"=% 56 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 57 | 58 | if exist "%JAVA_EXE%" goto execute 59 | 60 | echo. 61 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 62 | echo. 63 | echo Please set the JAVA_HOME variable in your environment to match the 64 | echo location of your Java installation. 65 | 66 | goto fail 67 | 68 | :execute 69 | @rem Setup the command line 70 | 71 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 72 | 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if %ERRORLEVEL% equ 0 goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | set EXIT_CODE=%ERRORLEVEL% 85 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 86 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 87 | exit /b %EXIT_CODE% 88 | 89 | :mainEnd 90 | if "%OS%"=="Windows_NT" endlocal 91 | 92 | :omega 93 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'RNStyledTextDemo' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | includeBuild('../node_modules/@react-native/gradle-plugin') 5 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RNStyledTextDemo", 3 | "displayName": "RNStyledTextDemo" 4 | } 5 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /docs/example-android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fram-x/react-native-styled-text/13f041eed0c986b9f1fa2eed65d01172ec986b2a/docs/example-android.png -------------------------------------------------------------------------------- /docs/example-ios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fram-x/react-native-styled-text/13f041eed0c986b9f1fa2eed65d01172ec986b2a/docs/example-ios.png -------------------------------------------------------------------------------- /docs/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fram-x/react-native-styled-text/13f041eed0c986b9f1fa2eed65d01172ec986b2a/docs/example.png -------------------------------------------------------------------------------- /docs/happyStyling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fram-x/react-native-styled-text/13f041eed0c986b9f1fa2eed65d01172ec986b2a/docs/happyStyling.png -------------------------------------------------------------------------------- /docs/welcome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fram-x/react-native-styled-text/13f041eed0c986b9f1fa2eed65d01172ec986b2a/docs/welcome.png -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | import App from './App'; 7 | import {name as appName} from './app.json'; 8 | 9 | AppRegistry.registerComponent(appName, () => App); 10 | -------------------------------------------------------------------------------- /ios/.xcode.env: -------------------------------------------------------------------------------- 1 | # This `.xcode.env` file is versioned and is used to source the environment 2 | # used when running script phases inside Xcode. 3 | # To customize your local environment, you can create an `.xcode.env.local` 4 | # file that is not versioned. 5 | 6 | # NODE_BINARY variable contains the PATH to the node executable. 7 | # 8 | # Customize the NODE_BINARY variable here. 9 | # For example, to use nvm with brew, add the following line 10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use 11 | export NODE_BINARY=$(command -v node) 12 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Resolve react_native_pods.rb with node to allow for hoisting 2 | require Pod::Executable.execute_command('node', ['-p', 3 | 'require.resolve( 4 | "react-native/scripts/react_native_pods.rb", 5 | {paths: [process.argv[1]]}, 6 | )', __dir__]).strip 7 | 8 | platform :ios, min_ios_version_supported 9 | prepare_react_native_project! 10 | 11 | # If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set. 12 | # because `react-native-flipper` depends on (FlipperKit,...) that will be excluded 13 | # 14 | # To fix this you can also exclude `react-native-flipper` using a `react-native.config.js` 15 | # ```js 16 | # module.exports = { 17 | # dependencies: { 18 | # ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}), 19 | # ``` 20 | flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled 21 | 22 | linkage = ENV['USE_FRAMEWORKS'] 23 | if linkage != nil 24 | Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green 25 | use_frameworks! :linkage => linkage.to_sym 26 | end 27 | 28 | target 'RNStyledTextDemo' do 29 | config = use_native_modules! 30 | 31 | # Flags change depending on the env values. 32 | flags = get_default_flags() 33 | 34 | use_react_native!( 35 | :path => config[:reactNativePath], 36 | # Hermes is now enabled by default. Disable by setting this flag to false. 37 | :hermes_enabled => flags[:hermes_enabled], 38 | :fabric_enabled => flags[:fabric_enabled], 39 | # Enables Flipper. 40 | # 41 | # Note that if you have use_frameworks! enabled, Flipper will not work and 42 | # you should disable the next line. 43 | :flipper_configuration => flipper_config, 44 | # An absolute path to your application root. 45 | :app_path => "#{Pod::Config.instance.installation_root}/.." 46 | ) 47 | 48 | target 'RNStyledTextDemoTests' do 49 | inherit! :complete 50 | # Pods for testing 51 | end 52 | 53 | post_install do |installer| 54 | # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 55 | react_native_post_install( 56 | installer, 57 | config[:reactNativePath], 58 | :mac_catalyst_enabled => false 59 | ) 60 | __apply_Xcode_12_5_M1_post_install_workaround(installer) 61 | end 62 | end 63 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - boost (1.76.0) 3 | - CocoaAsyncSocket (7.6.5) 4 | - DoubleConversion (1.1.6) 5 | - FBLazyVector (0.72.3) 6 | - FBReactNativeSpec (0.72.3): 7 | - RCT-Folly (= 2021.07.22.00) 8 | - RCTRequired (= 0.72.3) 9 | - RCTTypeSafety (= 0.72.3) 10 | - React-Core (= 0.72.3) 11 | - React-jsi (= 0.72.3) 12 | - ReactCommon/turbomodule/core (= 0.72.3) 13 | - Flipper (0.182.0): 14 | - Flipper-Folly (~> 2.6) 15 | - Flipper-Boost-iOSX (1.76.0.1.11) 16 | - Flipper-DoubleConversion (3.2.0.1) 17 | - Flipper-Fmt (7.1.7) 18 | - Flipper-Folly (2.6.10): 19 | - Flipper-Boost-iOSX 20 | - Flipper-DoubleConversion 21 | - Flipper-Fmt (= 7.1.7) 22 | - Flipper-Glog 23 | - libevent (~> 2.1.12) 24 | - OpenSSL-Universal (= 1.1.1100) 25 | - Flipper-Glog (0.5.0.5) 26 | - Flipper-PeerTalk (0.0.4) 27 | - FlipperKit (0.182.0): 28 | - FlipperKit/Core (= 0.182.0) 29 | - FlipperKit/Core (0.182.0): 30 | - Flipper (~> 0.182.0) 31 | - FlipperKit/CppBridge 32 | - FlipperKit/FBCxxFollyDynamicConvert 33 | - FlipperKit/FBDefines 34 | - FlipperKit/FKPortForwarding 35 | - SocketRocket (~> 0.6.0) 36 | - FlipperKit/CppBridge (0.182.0): 37 | - Flipper (~> 0.182.0) 38 | - FlipperKit/FBCxxFollyDynamicConvert (0.182.0): 39 | - Flipper-Folly (~> 2.6) 40 | - FlipperKit/FBDefines (0.182.0) 41 | - FlipperKit/FKPortForwarding (0.182.0): 42 | - CocoaAsyncSocket (~> 7.6) 43 | - Flipper-PeerTalk (~> 0.0.4) 44 | - FlipperKit/FlipperKitHighlightOverlay (0.182.0) 45 | - FlipperKit/FlipperKitLayoutHelpers (0.182.0): 46 | - FlipperKit/Core 47 | - FlipperKit/FlipperKitHighlightOverlay 48 | - FlipperKit/FlipperKitLayoutTextSearchable 49 | - FlipperKit/FlipperKitLayoutIOSDescriptors (0.182.0): 50 | - FlipperKit/Core 51 | - FlipperKit/FlipperKitHighlightOverlay 52 | - FlipperKit/FlipperKitLayoutHelpers 53 | - YogaKit (~> 1.18) 54 | - FlipperKit/FlipperKitLayoutPlugin (0.182.0): 55 | - FlipperKit/Core 56 | - FlipperKit/FlipperKitHighlightOverlay 57 | - FlipperKit/FlipperKitLayoutHelpers 58 | - FlipperKit/FlipperKitLayoutIOSDescriptors 59 | - FlipperKit/FlipperKitLayoutTextSearchable 60 | - YogaKit (~> 1.18) 61 | - FlipperKit/FlipperKitLayoutTextSearchable (0.182.0) 62 | - FlipperKit/FlipperKitNetworkPlugin (0.182.0): 63 | - FlipperKit/Core 64 | - FlipperKit/FlipperKitReactPlugin (0.182.0): 65 | - FlipperKit/Core 66 | - FlipperKit/FlipperKitUserDefaultsPlugin (0.182.0): 67 | - FlipperKit/Core 68 | - FlipperKit/SKIOSNetworkPlugin (0.182.0): 69 | - FlipperKit/Core 70 | - FlipperKit/FlipperKitNetworkPlugin 71 | - fmt (6.2.1) 72 | - glog (0.3.5) 73 | - hermes-engine (0.72.3): 74 | - hermes-engine/Pre-built (= 0.72.3) 75 | - hermes-engine/Pre-built (0.72.3) 76 | - libevent (2.1.12) 77 | - OpenSSL-Universal (1.1.1100) 78 | - RCT-Folly (2021.07.22.00): 79 | - boost 80 | - DoubleConversion 81 | - fmt (~> 6.2.1) 82 | - glog 83 | - RCT-Folly/Default (= 2021.07.22.00) 84 | - RCT-Folly/Default (2021.07.22.00): 85 | - boost 86 | - DoubleConversion 87 | - fmt (~> 6.2.1) 88 | - glog 89 | - RCT-Folly/Futures (2021.07.22.00): 90 | - boost 91 | - DoubleConversion 92 | - fmt (~> 6.2.1) 93 | - glog 94 | - libevent 95 | - RCTRequired (0.72.3) 96 | - RCTTypeSafety (0.72.3): 97 | - FBLazyVector (= 0.72.3) 98 | - RCTRequired (= 0.72.3) 99 | - React-Core (= 0.72.3) 100 | - React (0.72.3): 101 | - React-Core (= 0.72.3) 102 | - React-Core/DevSupport (= 0.72.3) 103 | - React-Core/RCTWebSocket (= 0.72.3) 104 | - React-RCTActionSheet (= 0.72.3) 105 | - React-RCTAnimation (= 0.72.3) 106 | - React-RCTBlob (= 0.72.3) 107 | - React-RCTImage (= 0.72.3) 108 | - React-RCTLinking (= 0.72.3) 109 | - React-RCTNetwork (= 0.72.3) 110 | - React-RCTSettings (= 0.72.3) 111 | - React-RCTText (= 0.72.3) 112 | - React-RCTVibration (= 0.72.3) 113 | - React-callinvoker (0.72.3) 114 | - React-Codegen (0.72.3): 115 | - DoubleConversion 116 | - FBReactNativeSpec 117 | - glog 118 | - hermes-engine 119 | - RCT-Folly 120 | - RCTRequired 121 | - RCTTypeSafety 122 | - React-Core 123 | - React-jsi 124 | - React-jsiexecutor 125 | - React-NativeModulesApple 126 | - React-rncore 127 | - ReactCommon/turbomodule/bridging 128 | - ReactCommon/turbomodule/core 129 | - React-Core (0.72.3): 130 | - glog 131 | - hermes-engine 132 | - RCT-Folly (= 2021.07.22.00) 133 | - React-Core/Default (= 0.72.3) 134 | - React-cxxreact 135 | - React-hermes 136 | - React-jsi 137 | - React-jsiexecutor 138 | - React-perflogger 139 | - React-runtimeexecutor 140 | - React-utils 141 | - SocketRocket (= 0.6.1) 142 | - Yoga 143 | - React-Core/CoreModulesHeaders (0.72.3): 144 | - glog 145 | - hermes-engine 146 | - RCT-Folly (= 2021.07.22.00) 147 | - React-Core/Default 148 | - React-cxxreact 149 | - React-hermes 150 | - React-jsi 151 | - React-jsiexecutor 152 | - React-perflogger 153 | - React-runtimeexecutor 154 | - React-utils 155 | - SocketRocket (= 0.6.1) 156 | - Yoga 157 | - React-Core/Default (0.72.3): 158 | - glog 159 | - hermes-engine 160 | - RCT-Folly (= 2021.07.22.00) 161 | - React-cxxreact 162 | - React-hermes 163 | - React-jsi 164 | - React-jsiexecutor 165 | - React-perflogger 166 | - React-runtimeexecutor 167 | - React-utils 168 | - SocketRocket (= 0.6.1) 169 | - Yoga 170 | - React-Core/DevSupport (0.72.3): 171 | - glog 172 | - hermes-engine 173 | - RCT-Folly (= 2021.07.22.00) 174 | - React-Core/Default (= 0.72.3) 175 | - React-Core/RCTWebSocket (= 0.72.3) 176 | - React-cxxreact 177 | - React-hermes 178 | - React-jsi 179 | - React-jsiexecutor 180 | - React-jsinspector (= 0.72.3) 181 | - React-perflogger 182 | - React-runtimeexecutor 183 | - React-utils 184 | - SocketRocket (= 0.6.1) 185 | - Yoga 186 | - React-Core/RCTActionSheetHeaders (0.72.3): 187 | - glog 188 | - hermes-engine 189 | - RCT-Folly (= 2021.07.22.00) 190 | - React-Core/Default 191 | - React-cxxreact 192 | - React-hermes 193 | - React-jsi 194 | - React-jsiexecutor 195 | - React-perflogger 196 | - React-runtimeexecutor 197 | - React-utils 198 | - SocketRocket (= 0.6.1) 199 | - Yoga 200 | - React-Core/RCTAnimationHeaders (0.72.3): 201 | - glog 202 | - hermes-engine 203 | - RCT-Folly (= 2021.07.22.00) 204 | - React-Core/Default 205 | - React-cxxreact 206 | - React-hermes 207 | - React-jsi 208 | - React-jsiexecutor 209 | - React-perflogger 210 | - React-runtimeexecutor 211 | - React-utils 212 | - SocketRocket (= 0.6.1) 213 | - Yoga 214 | - React-Core/RCTBlobHeaders (0.72.3): 215 | - glog 216 | - hermes-engine 217 | - RCT-Folly (= 2021.07.22.00) 218 | - React-Core/Default 219 | - React-cxxreact 220 | - React-hermes 221 | - React-jsi 222 | - React-jsiexecutor 223 | - React-perflogger 224 | - React-runtimeexecutor 225 | - React-utils 226 | - SocketRocket (= 0.6.1) 227 | - Yoga 228 | - React-Core/RCTImageHeaders (0.72.3): 229 | - glog 230 | - hermes-engine 231 | - RCT-Folly (= 2021.07.22.00) 232 | - React-Core/Default 233 | - React-cxxreact 234 | - React-hermes 235 | - React-jsi 236 | - React-jsiexecutor 237 | - React-perflogger 238 | - React-runtimeexecutor 239 | - React-utils 240 | - SocketRocket (= 0.6.1) 241 | - Yoga 242 | - React-Core/RCTLinkingHeaders (0.72.3): 243 | - glog 244 | - hermes-engine 245 | - RCT-Folly (= 2021.07.22.00) 246 | - React-Core/Default 247 | - React-cxxreact 248 | - React-hermes 249 | - React-jsi 250 | - React-jsiexecutor 251 | - React-perflogger 252 | - React-runtimeexecutor 253 | - React-utils 254 | - SocketRocket (= 0.6.1) 255 | - Yoga 256 | - React-Core/RCTNetworkHeaders (0.72.3): 257 | - glog 258 | - hermes-engine 259 | - RCT-Folly (= 2021.07.22.00) 260 | - React-Core/Default 261 | - React-cxxreact 262 | - React-hermes 263 | - React-jsi 264 | - React-jsiexecutor 265 | - React-perflogger 266 | - React-runtimeexecutor 267 | - React-utils 268 | - SocketRocket (= 0.6.1) 269 | - Yoga 270 | - React-Core/RCTSettingsHeaders (0.72.3): 271 | - glog 272 | - hermes-engine 273 | - RCT-Folly (= 2021.07.22.00) 274 | - React-Core/Default 275 | - React-cxxreact 276 | - React-hermes 277 | - React-jsi 278 | - React-jsiexecutor 279 | - React-perflogger 280 | - React-runtimeexecutor 281 | - React-utils 282 | - SocketRocket (= 0.6.1) 283 | - Yoga 284 | - React-Core/RCTTextHeaders (0.72.3): 285 | - glog 286 | - hermes-engine 287 | - RCT-Folly (= 2021.07.22.00) 288 | - React-Core/Default 289 | - React-cxxreact 290 | - React-hermes 291 | - React-jsi 292 | - React-jsiexecutor 293 | - React-perflogger 294 | - React-runtimeexecutor 295 | - React-utils 296 | - SocketRocket (= 0.6.1) 297 | - Yoga 298 | - React-Core/RCTVibrationHeaders (0.72.3): 299 | - glog 300 | - hermes-engine 301 | - RCT-Folly (= 2021.07.22.00) 302 | - React-Core/Default 303 | - React-cxxreact 304 | - React-hermes 305 | - React-jsi 306 | - React-jsiexecutor 307 | - React-perflogger 308 | - React-runtimeexecutor 309 | - React-utils 310 | - SocketRocket (= 0.6.1) 311 | - Yoga 312 | - React-Core/RCTWebSocket (0.72.3): 313 | - glog 314 | - hermes-engine 315 | - RCT-Folly (= 2021.07.22.00) 316 | - React-Core/Default (= 0.72.3) 317 | - React-cxxreact 318 | - React-hermes 319 | - React-jsi 320 | - React-jsiexecutor 321 | - React-perflogger 322 | - React-runtimeexecutor 323 | - React-utils 324 | - SocketRocket (= 0.6.1) 325 | - Yoga 326 | - React-CoreModules (0.72.3): 327 | - RCT-Folly (= 2021.07.22.00) 328 | - RCTTypeSafety (= 0.72.3) 329 | - React-Codegen (= 0.72.3) 330 | - React-Core/CoreModulesHeaders (= 0.72.3) 331 | - React-jsi (= 0.72.3) 332 | - React-RCTBlob 333 | - React-RCTImage (= 0.72.3) 334 | - ReactCommon/turbomodule/core (= 0.72.3) 335 | - SocketRocket (= 0.6.1) 336 | - React-cxxreact (0.72.3): 337 | - boost (= 1.76.0) 338 | - DoubleConversion 339 | - glog 340 | - hermes-engine 341 | - RCT-Folly (= 2021.07.22.00) 342 | - React-callinvoker (= 0.72.3) 343 | - React-debug (= 0.72.3) 344 | - React-jsi (= 0.72.3) 345 | - React-jsinspector (= 0.72.3) 346 | - React-logger (= 0.72.3) 347 | - React-perflogger (= 0.72.3) 348 | - React-runtimeexecutor (= 0.72.3) 349 | - React-debug (0.72.3) 350 | - React-hermes (0.72.3): 351 | - DoubleConversion 352 | - glog 353 | - hermes-engine 354 | - RCT-Folly (= 2021.07.22.00) 355 | - RCT-Folly/Futures (= 2021.07.22.00) 356 | - React-cxxreact (= 0.72.3) 357 | - React-jsi 358 | - React-jsiexecutor (= 0.72.3) 359 | - React-jsinspector (= 0.72.3) 360 | - React-perflogger (= 0.72.3) 361 | - React-jsi (0.72.3): 362 | - boost (= 1.76.0) 363 | - DoubleConversion 364 | - glog 365 | - hermes-engine 366 | - RCT-Folly (= 2021.07.22.00) 367 | - React-jsiexecutor (0.72.3): 368 | - DoubleConversion 369 | - glog 370 | - hermes-engine 371 | - RCT-Folly (= 2021.07.22.00) 372 | - React-cxxreact (= 0.72.3) 373 | - React-jsi (= 0.72.3) 374 | - React-perflogger (= 0.72.3) 375 | - React-jsinspector (0.72.3) 376 | - React-logger (0.72.3): 377 | - glog 378 | - React-NativeModulesApple (0.72.3): 379 | - hermes-engine 380 | - React-callinvoker 381 | - React-Core 382 | - React-cxxreact 383 | - React-jsi 384 | - React-runtimeexecutor 385 | - ReactCommon/turbomodule/bridging 386 | - ReactCommon/turbomodule/core 387 | - React-perflogger (0.72.3) 388 | - React-RCTActionSheet (0.72.3): 389 | - React-Core/RCTActionSheetHeaders (= 0.72.3) 390 | - React-RCTAnimation (0.72.3): 391 | - RCT-Folly (= 2021.07.22.00) 392 | - RCTTypeSafety (= 0.72.3) 393 | - React-Codegen (= 0.72.3) 394 | - React-Core/RCTAnimationHeaders (= 0.72.3) 395 | - React-jsi (= 0.72.3) 396 | - ReactCommon/turbomodule/core (= 0.72.3) 397 | - React-RCTAppDelegate (0.72.3): 398 | - RCT-Folly 399 | - RCTRequired 400 | - RCTTypeSafety 401 | - React-Core 402 | - React-CoreModules 403 | - React-hermes 404 | - React-NativeModulesApple 405 | - React-RCTImage 406 | - React-RCTNetwork 407 | - React-runtimescheduler 408 | - ReactCommon/turbomodule/core 409 | - React-RCTBlob (0.72.3): 410 | - hermes-engine 411 | - RCT-Folly (= 2021.07.22.00) 412 | - React-Codegen (= 0.72.3) 413 | - React-Core/RCTBlobHeaders (= 0.72.3) 414 | - React-Core/RCTWebSocket (= 0.72.3) 415 | - React-jsi (= 0.72.3) 416 | - React-RCTNetwork (= 0.72.3) 417 | - ReactCommon/turbomodule/core (= 0.72.3) 418 | - React-RCTImage (0.72.3): 419 | - RCT-Folly (= 2021.07.22.00) 420 | - RCTTypeSafety (= 0.72.3) 421 | - React-Codegen (= 0.72.3) 422 | - React-Core/RCTImageHeaders (= 0.72.3) 423 | - React-jsi (= 0.72.3) 424 | - React-RCTNetwork (= 0.72.3) 425 | - ReactCommon/turbomodule/core (= 0.72.3) 426 | - React-RCTLinking (0.72.3): 427 | - React-Codegen (= 0.72.3) 428 | - React-Core/RCTLinkingHeaders (= 0.72.3) 429 | - React-jsi (= 0.72.3) 430 | - ReactCommon/turbomodule/core (= 0.72.3) 431 | - React-RCTNetwork (0.72.3): 432 | - RCT-Folly (= 2021.07.22.00) 433 | - RCTTypeSafety (= 0.72.3) 434 | - React-Codegen (= 0.72.3) 435 | - React-Core/RCTNetworkHeaders (= 0.72.3) 436 | - React-jsi (= 0.72.3) 437 | - ReactCommon/turbomodule/core (= 0.72.3) 438 | - React-RCTSettings (0.72.3): 439 | - RCT-Folly (= 2021.07.22.00) 440 | - RCTTypeSafety (= 0.72.3) 441 | - React-Codegen (= 0.72.3) 442 | - React-Core/RCTSettingsHeaders (= 0.72.3) 443 | - React-jsi (= 0.72.3) 444 | - ReactCommon/turbomodule/core (= 0.72.3) 445 | - React-RCTText (0.72.3): 446 | - React-Core/RCTTextHeaders (= 0.72.3) 447 | - React-RCTVibration (0.72.3): 448 | - RCT-Folly (= 2021.07.22.00) 449 | - React-Codegen (= 0.72.3) 450 | - React-Core/RCTVibrationHeaders (= 0.72.3) 451 | - React-jsi (= 0.72.3) 452 | - ReactCommon/turbomodule/core (= 0.72.3) 453 | - React-rncore (0.72.3) 454 | - React-runtimeexecutor (0.72.3): 455 | - React-jsi (= 0.72.3) 456 | - React-runtimescheduler (0.72.3): 457 | - glog 458 | - hermes-engine 459 | - RCT-Folly (= 2021.07.22.00) 460 | - React-callinvoker 461 | - React-debug 462 | - React-jsi 463 | - React-runtimeexecutor 464 | - React-utils (0.72.3): 465 | - glog 466 | - RCT-Folly (= 2021.07.22.00) 467 | - React-debug 468 | - ReactCommon/turbomodule/bridging (0.72.3): 469 | - DoubleConversion 470 | - glog 471 | - hermes-engine 472 | - RCT-Folly (= 2021.07.22.00) 473 | - React-callinvoker (= 0.72.3) 474 | - React-cxxreact (= 0.72.3) 475 | - React-jsi (= 0.72.3) 476 | - React-logger (= 0.72.3) 477 | - React-perflogger (= 0.72.3) 478 | - ReactCommon/turbomodule/core (0.72.3): 479 | - DoubleConversion 480 | - glog 481 | - hermes-engine 482 | - RCT-Folly (= 2021.07.22.00) 483 | - React-callinvoker (= 0.72.3) 484 | - React-cxxreact (= 0.72.3) 485 | - React-jsi (= 0.72.3) 486 | - React-logger (= 0.72.3) 487 | - React-perflogger (= 0.72.3) 488 | - SocketRocket (0.6.1) 489 | - Yoga (1.14.0) 490 | - YogaKit (1.18.1): 491 | - Yoga (~> 1.14) 492 | 493 | DEPENDENCIES: 494 | - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) 495 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) 496 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) 497 | - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) 498 | - Flipper (= 0.182.0) 499 | - Flipper-Boost-iOSX (= 1.76.0.1.11) 500 | - Flipper-DoubleConversion (= 3.2.0.1) 501 | - Flipper-Fmt (= 7.1.7) 502 | - Flipper-Folly (= 2.6.10) 503 | - Flipper-Glog (= 0.5.0.5) 504 | - Flipper-PeerTalk (= 0.0.4) 505 | - FlipperKit (= 0.182.0) 506 | - FlipperKit/Core (= 0.182.0) 507 | - FlipperKit/CppBridge (= 0.182.0) 508 | - FlipperKit/FBCxxFollyDynamicConvert (= 0.182.0) 509 | - FlipperKit/FBDefines (= 0.182.0) 510 | - FlipperKit/FKPortForwarding (= 0.182.0) 511 | - FlipperKit/FlipperKitHighlightOverlay (= 0.182.0) 512 | - FlipperKit/FlipperKitLayoutPlugin (= 0.182.0) 513 | - FlipperKit/FlipperKitLayoutTextSearchable (= 0.182.0) 514 | - FlipperKit/FlipperKitNetworkPlugin (= 0.182.0) 515 | - FlipperKit/FlipperKitReactPlugin (= 0.182.0) 516 | - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.182.0) 517 | - FlipperKit/SKIOSNetworkPlugin (= 0.182.0) 518 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) 519 | - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) 520 | - libevent (~> 2.1.12) 521 | - OpenSSL-Universal (= 1.1.1100) 522 | - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) 523 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) 524 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) 525 | - React (from `../node_modules/react-native/`) 526 | - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) 527 | - React-Codegen (from `build/generated/ios`) 528 | - React-Core (from `../node_modules/react-native/`) 529 | - React-Core/DevSupport (from `../node_modules/react-native/`) 530 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`) 531 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) 532 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) 533 | - React-debug (from `../node_modules/react-native/ReactCommon/react/debug`) 534 | - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`) 535 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) 536 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) 537 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) 538 | - React-logger (from `../node_modules/react-native/ReactCommon/logger`) 539 | - React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`) 540 | - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) 541 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) 542 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) 543 | - React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`) 544 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) 545 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) 546 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) 547 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) 548 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) 549 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`) 550 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) 551 | - React-rncore (from `../node_modules/react-native/ReactCommon`) 552 | - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) 553 | - React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`) 554 | - React-utils (from `../node_modules/react-native/ReactCommon/react/utils`) 555 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) 556 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) 557 | 558 | SPEC REPOS: 559 | trunk: 560 | - CocoaAsyncSocket 561 | - Flipper 562 | - Flipper-Boost-iOSX 563 | - Flipper-DoubleConversion 564 | - Flipper-Fmt 565 | - Flipper-Folly 566 | - Flipper-Glog 567 | - Flipper-PeerTalk 568 | - FlipperKit 569 | - fmt 570 | - libevent 571 | - OpenSSL-Universal 572 | - SocketRocket 573 | - YogaKit 574 | 575 | EXTERNAL SOURCES: 576 | boost: 577 | :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec" 578 | DoubleConversion: 579 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" 580 | FBLazyVector: 581 | :path: "../node_modules/react-native/Libraries/FBLazyVector" 582 | FBReactNativeSpec: 583 | :path: "../node_modules/react-native/React/FBReactNativeSpec" 584 | glog: 585 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" 586 | hermes-engine: 587 | :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" 588 | :tag: hermes-2023-03-20-RNv0.72.0-49794cfc7c81fb8f69fd60c3bbf85a7480cc5a77 589 | RCT-Folly: 590 | :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" 591 | RCTRequired: 592 | :path: "../node_modules/react-native/Libraries/RCTRequired" 593 | RCTTypeSafety: 594 | :path: "../node_modules/react-native/Libraries/TypeSafety" 595 | React: 596 | :path: "../node_modules/react-native/" 597 | React-callinvoker: 598 | :path: "../node_modules/react-native/ReactCommon/callinvoker" 599 | React-Codegen: 600 | :path: build/generated/ios 601 | React-Core: 602 | :path: "../node_modules/react-native/" 603 | React-CoreModules: 604 | :path: "../node_modules/react-native/React/CoreModules" 605 | React-cxxreact: 606 | :path: "../node_modules/react-native/ReactCommon/cxxreact" 607 | React-debug: 608 | :path: "../node_modules/react-native/ReactCommon/react/debug" 609 | React-hermes: 610 | :path: "../node_modules/react-native/ReactCommon/hermes" 611 | React-jsi: 612 | :path: "../node_modules/react-native/ReactCommon/jsi" 613 | React-jsiexecutor: 614 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor" 615 | React-jsinspector: 616 | :path: "../node_modules/react-native/ReactCommon/jsinspector" 617 | React-logger: 618 | :path: "../node_modules/react-native/ReactCommon/logger" 619 | React-NativeModulesApple: 620 | :path: "../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios" 621 | React-perflogger: 622 | :path: "../node_modules/react-native/ReactCommon/reactperflogger" 623 | React-RCTActionSheet: 624 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS" 625 | React-RCTAnimation: 626 | :path: "../node_modules/react-native/Libraries/NativeAnimation" 627 | React-RCTAppDelegate: 628 | :path: "../node_modules/react-native/Libraries/AppDelegate" 629 | React-RCTBlob: 630 | :path: "../node_modules/react-native/Libraries/Blob" 631 | React-RCTImage: 632 | :path: "../node_modules/react-native/Libraries/Image" 633 | React-RCTLinking: 634 | :path: "../node_modules/react-native/Libraries/LinkingIOS" 635 | React-RCTNetwork: 636 | :path: "../node_modules/react-native/Libraries/Network" 637 | React-RCTSettings: 638 | :path: "../node_modules/react-native/Libraries/Settings" 639 | React-RCTText: 640 | :path: "../node_modules/react-native/Libraries/Text" 641 | React-RCTVibration: 642 | :path: "../node_modules/react-native/Libraries/Vibration" 643 | React-rncore: 644 | :path: "../node_modules/react-native/ReactCommon" 645 | React-runtimeexecutor: 646 | :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" 647 | React-runtimescheduler: 648 | :path: "../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler" 649 | React-utils: 650 | :path: "../node_modules/react-native/ReactCommon/react/utils" 651 | ReactCommon: 652 | :path: "../node_modules/react-native/ReactCommon" 653 | Yoga: 654 | :path: "../node_modules/react-native/ReactCommon/yoga" 655 | 656 | SPEC CHECKSUMS: 657 | boost: 57d2868c099736d80fcd648bf211b4431e51a558 658 | CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 659 | DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 660 | FBLazyVector: 4cce221dd782d3ff7c4172167bba09d58af67ccb 661 | FBReactNativeSpec: c6bd9e179757b3c0ecf815864fae8032377903ef 662 | Flipper: 6edb735e6c3e332975d1b17956bcc584eccf5818 663 | Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c 664 | Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 665 | Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b 666 | Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3 667 | Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446 668 | Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 669 | FlipperKit: 2efad7007d6745a3f95e4034d547be637f89d3f6 670 | fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 671 | glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b 672 | hermes-engine: 10fbd3f62405c41ea07e71973ea61e1878d07322 673 | libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 674 | OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c 675 | RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 676 | RCTRequired: a2faf4bad4e438ca37b2040cb8f7799baa065c18 677 | RCTTypeSafety: cb09f3e4747b6d18331a15eb05271de7441ca0b3 678 | React: 13109005b5353095c052f26af37413340ccf7a5d 679 | React-callinvoker: c8c87bce983aa499c13cb06d4447c025a35274d6 680 | React-Codegen: 712d523524d89d71f1cf7cc624854941be983c4d 681 | React-Core: 688f88b7f3a3d30b4848036223f8b07102c687e5 682 | React-CoreModules: 63c063a3ade8fb3b1bec5fd9a50f17b0421558c6 683 | React-cxxreact: 37765b4975541105b2a3322a4b473417c158c869 684 | React-debug: 51f11ef8db14b47f24e71c42a4916d4192972156 685 | React-hermes: 935ae71fb3d7654e947beba8498835cd5e479707 686 | React-jsi: ec628dc7a15ffea969f237b0ea6d2fde212b19dd 687 | React-jsiexecutor: 59d1eb03af7d30b7d66589c410f13151271e8006 688 | React-jsinspector: b511447170f561157547bc0bef3f169663860be7 689 | React-logger: c5b527272d5f22eaa09bb3c3a690fee8f237ae95 690 | React-NativeModulesApple: c57f3efe0df288a6532b726ad2d0322a9bf38472 691 | React-perflogger: 6bd153e776e6beed54c56b0847e1220a3ff92ba5 692 | React-RCTActionSheet: c0b62af44e610e69d9a2049a682f5dba4e9dff17 693 | React-RCTAnimation: f9bf9719258926aea9ecb8a2aa2595d3ff9a6022 694 | React-RCTAppDelegate: e5ac35d4dbd1fae7df3a62b47db04b6a8d151592 695 | React-RCTBlob: c4f1e69a6ef739aa42586b876d637dab4e3b5bed 696 | React-RCTImage: e5798f01aba248416c02a506cf5e6dfcba827638 697 | React-RCTLinking: f5b6227c879e33206f34e68924c458f57bbb96d9 698 | React-RCTNetwork: d5554fbfac1c618da3c8fa29933108ea22837788 699 | React-RCTSettings: 189c71e3e6146ba59f4f7e2cbeb494cf2ad42afa 700 | React-RCTText: 19425aea9d8b6ccae55a27916355b17ab577e56e 701 | React-RCTVibration: 388ac0e1455420895d1ca2548401eed964b038a6 702 | React-rncore: 755a331dd67b74662108f2d66a384454bf8dc1a1 703 | React-runtimeexecutor: 369ae9bb3f83b65201c0c8f7d50b72280b5a1dbc 704 | React-runtimescheduler: 837c1bebd2f84572db17698cd702ceaf585b0d9a 705 | React-utils: bcb57da67eec2711f8b353f6e3d33bd8e4b2efa3 706 | ReactCommon: 3ccb8fb14e6b3277e38c73b0ff5e4a1b8db017a9 707 | SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 708 | Yoga: 8796b55dba14d7004f980b54bcc9833ee45b28ce 709 | YogaKit: f782866e155069a2cca2517aafea43200b01fd5a 710 | 711 | PODFILE CHECKSUM: 86d0db56149b3fc82e52d03d1b9100f924e14a6d 712 | 713 | COCOAPODS: 1.12.1 714 | -------------------------------------------------------------------------------- /ios/RNStyledTextDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 54; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 00E356F31AD99517003FC87E /* RNStyledTextDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* RNStyledTextDemoTests.m */; }; 11 | 0C80B921A6F3F58F76C31292 /* libPods-RNStyledTextDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-RNStyledTextDemo.a */; }; 12 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 14 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 15 | 7699B88040F8A987B510C191 /* libPods-RNStyledTextDemo-RNStyledTextDemoTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-RNStyledTextDemo-RNStyledTextDemoTests.a */; }; 16 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXContainerItemProxy section */ 20 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 21 | isa = PBXContainerItemProxy; 22 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 23 | proxyType = 1; 24 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 25 | remoteInfo = RNStyledTextDemo; 26 | }; 27 | /* End PBXContainerItemProxy section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 00E356EE1AD99517003FC87E /* RNStyledTextDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RNStyledTextDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | 00E356F21AD99517003FC87E /* RNStyledTextDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNStyledTextDemoTests.m; sourceTree = ""; }; 33 | 13B07F961A680F5B00A75B9A /* RNStyledTextDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RNStyledTextDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = RNStyledTextDemo/AppDelegate.h; sourceTree = ""; }; 35 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = RNStyledTextDemo/AppDelegate.mm; sourceTree = ""; }; 36 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = RNStyledTextDemo/Images.xcassets; sourceTree = ""; }; 37 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = RNStyledTextDemo/Info.plist; sourceTree = ""; }; 38 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = RNStyledTextDemo/main.m; sourceTree = ""; }; 39 | 19F6CBCC0A4E27FBF8BF4A61 /* libPods-RNStyledTextDemo-RNStyledTextDemoTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNStyledTextDemo-RNStyledTextDemoTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 3B4392A12AC88292D35C810B /* Pods-RNStyledTextDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNStyledTextDemo.debug.xcconfig"; path = "Target Support Files/Pods-RNStyledTextDemo/Pods-RNStyledTextDemo.debug.xcconfig"; sourceTree = ""; }; 41 | 5709B34CF0A7D63546082F79 /* Pods-RNStyledTextDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNStyledTextDemo.release.xcconfig"; path = "Target Support Files/Pods-RNStyledTextDemo/Pods-RNStyledTextDemo.release.xcconfig"; sourceTree = ""; }; 42 | 5B7EB9410499542E8C5724F5 /* Pods-RNStyledTextDemo-RNStyledTextDemoTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNStyledTextDemo-RNStyledTextDemoTests.debug.xcconfig"; path = "Target Support Files/Pods-RNStyledTextDemo-RNStyledTextDemoTests/Pods-RNStyledTextDemo-RNStyledTextDemoTests.debug.xcconfig"; sourceTree = ""; }; 43 | 5DCACB8F33CDC322A6C60F78 /* libPods-RNStyledTextDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNStyledTextDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = RNStyledTextDemo/LaunchScreen.storyboard; sourceTree = ""; }; 45 | 89C6BE57DB24E9ADA2F236DE /* Pods-RNStyledTextDemo-RNStyledTextDemoTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNStyledTextDemo-RNStyledTextDemoTests.release.xcconfig"; path = "Target Support Files/Pods-RNStyledTextDemo-RNStyledTextDemoTests/Pods-RNStyledTextDemo-RNStyledTextDemoTests.release.xcconfig"; sourceTree = ""; }; 46 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; 47 | /* End PBXFileReference section */ 48 | 49 | /* Begin PBXFrameworksBuildPhase section */ 50 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 51 | isa = PBXFrameworksBuildPhase; 52 | buildActionMask = 2147483647; 53 | files = ( 54 | 7699B88040F8A987B510C191 /* libPods-RNStyledTextDemo-RNStyledTextDemoTests.a in Frameworks */, 55 | ); 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 59 | isa = PBXFrameworksBuildPhase; 60 | buildActionMask = 2147483647; 61 | files = ( 62 | 0C80B921A6F3F58F76C31292 /* libPods-RNStyledTextDemo.a in Frameworks */, 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 00E356EF1AD99517003FC87E /* RNStyledTextDemoTests */ = { 70 | isa = PBXGroup; 71 | children = ( 72 | 00E356F21AD99517003FC87E /* RNStyledTextDemoTests.m */, 73 | 00E356F01AD99517003FC87E /* Supporting Files */, 74 | ); 75 | path = RNStyledTextDemoTests; 76 | sourceTree = ""; 77 | }; 78 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 00E356F11AD99517003FC87E /* Info.plist */, 82 | ); 83 | name = "Supporting Files"; 84 | sourceTree = ""; 85 | }; 86 | 13B07FAE1A68108700A75B9A /* RNStyledTextDemo */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 90 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */, 91 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 92 | 13B07FB61A68108700A75B9A /* Info.plist */, 93 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, 94 | 13B07FB71A68108700A75B9A /* main.m */, 95 | ); 96 | name = RNStyledTextDemo; 97 | sourceTree = ""; 98 | }; 99 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 103 | 5DCACB8F33CDC322A6C60F78 /* libPods-RNStyledTextDemo.a */, 104 | 19F6CBCC0A4E27FBF8BF4A61 /* libPods-RNStyledTextDemo-RNStyledTextDemoTests.a */, 105 | ); 106 | name = Frameworks; 107 | sourceTree = ""; 108 | }; 109 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | ); 113 | name = Libraries; 114 | sourceTree = ""; 115 | }; 116 | 83CBB9F61A601CBA00E9B192 = { 117 | isa = PBXGroup; 118 | children = ( 119 | 13B07FAE1A68108700A75B9A /* RNStyledTextDemo */, 120 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 121 | 00E356EF1AD99517003FC87E /* RNStyledTextDemoTests */, 122 | 83CBBA001A601CBA00E9B192 /* Products */, 123 | 2D16E6871FA4F8E400B85C8A /* Frameworks */, 124 | BBD78D7AC51CEA395F1C20DB /* Pods */, 125 | ); 126 | indentWidth = 2; 127 | sourceTree = ""; 128 | tabWidth = 2; 129 | usesTabs = 0; 130 | }; 131 | 83CBBA001A601CBA00E9B192 /* Products */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | 13B07F961A680F5B00A75B9A /* RNStyledTextDemo.app */, 135 | 00E356EE1AD99517003FC87E /* RNStyledTextDemoTests.xctest */, 136 | ); 137 | name = Products; 138 | sourceTree = ""; 139 | }; 140 | BBD78D7AC51CEA395F1C20DB /* Pods */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | 3B4392A12AC88292D35C810B /* Pods-RNStyledTextDemo.debug.xcconfig */, 144 | 5709B34CF0A7D63546082F79 /* Pods-RNStyledTextDemo.release.xcconfig */, 145 | 5B7EB9410499542E8C5724F5 /* Pods-RNStyledTextDemo-RNStyledTextDemoTests.debug.xcconfig */, 146 | 89C6BE57DB24E9ADA2F236DE /* Pods-RNStyledTextDemo-RNStyledTextDemoTests.release.xcconfig */, 147 | ); 148 | path = Pods; 149 | sourceTree = ""; 150 | }; 151 | /* End PBXGroup section */ 152 | 153 | /* Begin PBXNativeTarget section */ 154 | 00E356ED1AD99517003FC87E /* RNStyledTextDemoTests */ = { 155 | isa = PBXNativeTarget; 156 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "RNStyledTextDemoTests" */; 157 | buildPhases = ( 158 | A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */, 159 | 00E356EA1AD99517003FC87E /* Sources */, 160 | 00E356EB1AD99517003FC87E /* Frameworks */, 161 | 00E356EC1AD99517003FC87E /* Resources */, 162 | C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */, 163 | F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */, 164 | ); 165 | buildRules = ( 166 | ); 167 | dependencies = ( 168 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 169 | ); 170 | name = RNStyledTextDemoTests; 171 | productName = RNStyledTextDemoTests; 172 | productReference = 00E356EE1AD99517003FC87E /* RNStyledTextDemoTests.xctest */; 173 | productType = "com.apple.product-type.bundle.unit-test"; 174 | }; 175 | 13B07F861A680F5B00A75B9A /* RNStyledTextDemo */ = { 176 | isa = PBXNativeTarget; 177 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "RNStyledTextDemo" */; 178 | buildPhases = ( 179 | C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, 180 | FD10A7F022414F080027D42C /* Start Packager */, 181 | 13B07F871A680F5B00A75B9A /* Sources */, 182 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 183 | 13B07F8E1A680F5B00A75B9A /* Resources */, 184 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 185 | 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, 186 | E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, 187 | ); 188 | buildRules = ( 189 | ); 190 | dependencies = ( 191 | ); 192 | name = RNStyledTextDemo; 193 | productName = RNStyledTextDemo; 194 | productReference = 13B07F961A680F5B00A75B9A /* RNStyledTextDemo.app */; 195 | productType = "com.apple.product-type.application"; 196 | }; 197 | /* End PBXNativeTarget section */ 198 | 199 | /* Begin PBXProject section */ 200 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 201 | isa = PBXProject; 202 | attributes = { 203 | LastUpgradeCheck = 1210; 204 | TargetAttributes = { 205 | 00E356ED1AD99517003FC87E = { 206 | CreatedOnToolsVersion = 6.2; 207 | TestTargetID = 13B07F861A680F5B00A75B9A; 208 | }; 209 | 13B07F861A680F5B00A75B9A = { 210 | LastSwiftMigration = 1120; 211 | }; 212 | }; 213 | }; 214 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "RNStyledTextDemo" */; 215 | compatibilityVersion = "Xcode 12.0"; 216 | developmentRegion = en; 217 | hasScannedForEncodings = 0; 218 | knownRegions = ( 219 | en, 220 | Base, 221 | ); 222 | mainGroup = 83CBB9F61A601CBA00E9B192; 223 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 224 | projectDirPath = ""; 225 | projectRoot = ""; 226 | targets = ( 227 | 13B07F861A680F5B00A75B9A /* RNStyledTextDemo */, 228 | 00E356ED1AD99517003FC87E /* RNStyledTextDemoTests */, 229 | ); 230 | }; 231 | /* End PBXProject section */ 232 | 233 | /* Begin PBXResourcesBuildPhase section */ 234 | 00E356EC1AD99517003FC87E /* Resources */ = { 235 | isa = PBXResourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | ); 239 | runOnlyForDeploymentPostprocessing = 0; 240 | }; 241 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 242 | isa = PBXResourcesBuildPhase; 243 | buildActionMask = 2147483647; 244 | files = ( 245 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, 246 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 247 | ); 248 | runOnlyForDeploymentPostprocessing = 0; 249 | }; 250 | /* End PBXResourcesBuildPhase section */ 251 | 252 | /* Begin PBXShellScriptBuildPhase section */ 253 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 254 | isa = PBXShellScriptBuildPhase; 255 | buildActionMask = 2147483647; 256 | files = ( 257 | ); 258 | inputPaths = ( 259 | "$(SRCROOT)/.xcode.env.local", 260 | "$(SRCROOT)/.xcode.env", 261 | ); 262 | name = "Bundle React Native code and images"; 263 | outputPaths = ( 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | shellPath = /bin/sh; 267 | shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; 268 | }; 269 | 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { 270 | isa = PBXShellScriptBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | ); 274 | inputFileListPaths = ( 275 | "${PODS_ROOT}/Target Support Files/Pods-RNStyledTextDemo/Pods-RNStyledTextDemo-frameworks-${CONFIGURATION}-input-files.xcfilelist", 276 | ); 277 | name = "[CP] Embed Pods Frameworks"; 278 | outputFileListPaths = ( 279 | "${PODS_ROOT}/Target Support Files/Pods-RNStyledTextDemo/Pods-RNStyledTextDemo-frameworks-${CONFIGURATION}-output-files.xcfilelist", 280 | ); 281 | runOnlyForDeploymentPostprocessing = 0; 282 | shellPath = /bin/sh; 283 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNStyledTextDemo/Pods-RNStyledTextDemo-frameworks.sh\"\n"; 284 | showEnvVarsInLog = 0; 285 | }; 286 | A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = { 287 | isa = PBXShellScriptBuildPhase; 288 | buildActionMask = 2147483647; 289 | files = ( 290 | ); 291 | inputFileListPaths = ( 292 | ); 293 | inputPaths = ( 294 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 295 | "${PODS_ROOT}/Manifest.lock", 296 | ); 297 | name = "[CP] Check Pods Manifest.lock"; 298 | outputFileListPaths = ( 299 | ); 300 | outputPaths = ( 301 | "$(DERIVED_FILE_DIR)/Pods-RNStyledTextDemo-RNStyledTextDemoTests-checkManifestLockResult.txt", 302 | ); 303 | runOnlyForDeploymentPostprocessing = 0; 304 | shellPath = /bin/sh; 305 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 306 | showEnvVarsInLog = 0; 307 | }; 308 | C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { 309 | isa = PBXShellScriptBuildPhase; 310 | buildActionMask = 2147483647; 311 | files = ( 312 | ); 313 | inputFileListPaths = ( 314 | ); 315 | inputPaths = ( 316 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 317 | "${PODS_ROOT}/Manifest.lock", 318 | ); 319 | name = "[CP] Check Pods Manifest.lock"; 320 | outputFileListPaths = ( 321 | ); 322 | outputPaths = ( 323 | "$(DERIVED_FILE_DIR)/Pods-RNStyledTextDemo-checkManifestLockResult.txt", 324 | ); 325 | runOnlyForDeploymentPostprocessing = 0; 326 | shellPath = /bin/sh; 327 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 328 | showEnvVarsInLog = 0; 329 | }; 330 | C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = { 331 | isa = PBXShellScriptBuildPhase; 332 | buildActionMask = 2147483647; 333 | files = ( 334 | ); 335 | inputFileListPaths = ( 336 | "${PODS_ROOT}/Target Support Files/Pods-RNStyledTextDemo-RNStyledTextDemoTests/Pods-RNStyledTextDemo-RNStyledTextDemoTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", 337 | ); 338 | name = "[CP] Embed Pods Frameworks"; 339 | outputFileListPaths = ( 340 | "${PODS_ROOT}/Target Support Files/Pods-RNStyledTextDemo-RNStyledTextDemoTests/Pods-RNStyledTextDemo-RNStyledTextDemoTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", 341 | ); 342 | runOnlyForDeploymentPostprocessing = 0; 343 | shellPath = /bin/sh; 344 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNStyledTextDemo-RNStyledTextDemoTests/Pods-RNStyledTextDemo-RNStyledTextDemoTests-frameworks.sh\"\n"; 345 | showEnvVarsInLog = 0; 346 | }; 347 | E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { 348 | isa = PBXShellScriptBuildPhase; 349 | buildActionMask = 2147483647; 350 | files = ( 351 | ); 352 | inputFileListPaths = ( 353 | "${PODS_ROOT}/Target Support Files/Pods-RNStyledTextDemo/Pods-RNStyledTextDemo-resources-${CONFIGURATION}-input-files.xcfilelist", 354 | ); 355 | name = "[CP] Copy Pods Resources"; 356 | outputFileListPaths = ( 357 | "${PODS_ROOT}/Target Support Files/Pods-RNStyledTextDemo/Pods-RNStyledTextDemo-resources-${CONFIGURATION}-output-files.xcfilelist", 358 | ); 359 | runOnlyForDeploymentPostprocessing = 0; 360 | shellPath = /bin/sh; 361 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNStyledTextDemo/Pods-RNStyledTextDemo-resources.sh\"\n"; 362 | showEnvVarsInLog = 0; 363 | }; 364 | F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = { 365 | isa = PBXShellScriptBuildPhase; 366 | buildActionMask = 2147483647; 367 | files = ( 368 | ); 369 | inputFileListPaths = ( 370 | "${PODS_ROOT}/Target Support Files/Pods-RNStyledTextDemo-RNStyledTextDemoTests/Pods-RNStyledTextDemo-RNStyledTextDemoTests-resources-${CONFIGURATION}-input-files.xcfilelist", 371 | ); 372 | name = "[CP] Copy Pods Resources"; 373 | outputFileListPaths = ( 374 | "${PODS_ROOT}/Target Support Files/Pods-RNStyledTextDemo-RNStyledTextDemoTests/Pods-RNStyledTextDemo-RNStyledTextDemoTests-resources-${CONFIGURATION}-output-files.xcfilelist", 375 | ); 376 | runOnlyForDeploymentPostprocessing = 0; 377 | shellPath = /bin/sh; 378 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNStyledTextDemo-RNStyledTextDemoTests/Pods-RNStyledTextDemo-RNStyledTextDemoTests-resources.sh\"\n"; 379 | showEnvVarsInLog = 0; 380 | }; 381 | FD10A7F022414F080027D42C /* Start Packager */ = { 382 | isa = PBXShellScriptBuildPhase; 383 | buildActionMask = 2147483647; 384 | files = ( 385 | ); 386 | inputFileListPaths = ( 387 | ); 388 | inputPaths = ( 389 | ); 390 | name = "Start Packager"; 391 | outputFileListPaths = ( 392 | ); 393 | outputPaths = ( 394 | ); 395 | runOnlyForDeploymentPostprocessing = 0; 396 | shellPath = /bin/sh; 397 | 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"; 398 | showEnvVarsInLog = 0; 399 | }; 400 | /* End PBXShellScriptBuildPhase section */ 401 | 402 | /* Begin PBXSourcesBuildPhase section */ 403 | 00E356EA1AD99517003FC87E /* Sources */ = { 404 | isa = PBXSourcesBuildPhase; 405 | buildActionMask = 2147483647; 406 | files = ( 407 | 00E356F31AD99517003FC87E /* RNStyledTextDemoTests.m in Sources */, 408 | ); 409 | runOnlyForDeploymentPostprocessing = 0; 410 | }; 411 | 13B07F871A680F5B00A75B9A /* Sources */ = { 412 | isa = PBXSourcesBuildPhase; 413 | buildActionMask = 2147483647; 414 | files = ( 415 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, 416 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 417 | ); 418 | runOnlyForDeploymentPostprocessing = 0; 419 | }; 420 | /* End PBXSourcesBuildPhase section */ 421 | 422 | /* Begin PBXTargetDependency section */ 423 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 424 | isa = PBXTargetDependency; 425 | target = 13B07F861A680F5B00A75B9A /* RNStyledTextDemo */; 426 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 427 | }; 428 | /* End PBXTargetDependency section */ 429 | 430 | /* Begin XCBuildConfiguration section */ 431 | 00E356F61AD99517003FC87E /* Debug */ = { 432 | isa = XCBuildConfiguration; 433 | baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-RNStyledTextDemo-RNStyledTextDemoTests.debug.xcconfig */; 434 | buildSettings = { 435 | BUNDLE_LOADER = "$(TEST_HOST)"; 436 | GCC_PREPROCESSOR_DEFINITIONS = ( 437 | "DEBUG=1", 438 | "$(inherited)", 439 | ); 440 | INFOPLIST_FILE = RNStyledTextDemoTests/Info.plist; 441 | IPHONEOS_DEPLOYMENT_TARGET = 12.4; 442 | LD_RUNPATH_SEARCH_PATHS = ( 443 | "$(inherited)", 444 | "@executable_path/Frameworks", 445 | "@loader_path/Frameworks", 446 | ); 447 | OTHER_LDFLAGS = ( 448 | "-ObjC", 449 | "-lc++", 450 | "$(inherited)", 451 | ); 452 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 453 | PRODUCT_NAME = "$(TARGET_NAME)"; 454 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RNStyledTextDemo.app/RNStyledTextDemo"; 455 | }; 456 | name = Debug; 457 | }; 458 | 00E356F71AD99517003FC87E /* Release */ = { 459 | isa = XCBuildConfiguration; 460 | baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-RNStyledTextDemo-RNStyledTextDemoTests.release.xcconfig */; 461 | buildSettings = { 462 | BUNDLE_LOADER = "$(TEST_HOST)"; 463 | COPY_PHASE_STRIP = NO; 464 | INFOPLIST_FILE = RNStyledTextDemoTests/Info.plist; 465 | IPHONEOS_DEPLOYMENT_TARGET = 12.4; 466 | LD_RUNPATH_SEARCH_PATHS = ( 467 | "$(inherited)", 468 | "@executable_path/Frameworks", 469 | "@loader_path/Frameworks", 470 | ); 471 | OTHER_LDFLAGS = ( 472 | "-ObjC", 473 | "-lc++", 474 | "$(inherited)", 475 | ); 476 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 477 | PRODUCT_NAME = "$(TARGET_NAME)"; 478 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RNStyledTextDemo.app/RNStyledTextDemo"; 479 | }; 480 | name = Release; 481 | }; 482 | 13B07F941A680F5B00A75B9A /* Debug */ = { 483 | isa = XCBuildConfiguration; 484 | baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-RNStyledTextDemo.debug.xcconfig */; 485 | buildSettings = { 486 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 487 | CLANG_ENABLE_MODULES = YES; 488 | CURRENT_PROJECT_VERSION = 1; 489 | ENABLE_BITCODE = NO; 490 | INFOPLIST_FILE = RNStyledTextDemo/Info.plist; 491 | LD_RUNPATH_SEARCH_PATHS = ( 492 | "$(inherited)", 493 | "@executable_path/Frameworks", 494 | ); 495 | MARKETING_VERSION = 1.0; 496 | OTHER_LDFLAGS = ( 497 | "$(inherited)", 498 | "-ObjC", 499 | "-lc++", 500 | ); 501 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 502 | PRODUCT_NAME = RNStyledTextDemo; 503 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 504 | SWIFT_VERSION = 5.0; 505 | VERSIONING_SYSTEM = "apple-generic"; 506 | }; 507 | name = Debug; 508 | }; 509 | 13B07F951A680F5B00A75B9A /* Release */ = { 510 | isa = XCBuildConfiguration; 511 | baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-RNStyledTextDemo.release.xcconfig */; 512 | buildSettings = { 513 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 514 | CLANG_ENABLE_MODULES = YES; 515 | CURRENT_PROJECT_VERSION = 1; 516 | INFOPLIST_FILE = RNStyledTextDemo/Info.plist; 517 | LD_RUNPATH_SEARCH_PATHS = ( 518 | "$(inherited)", 519 | "@executable_path/Frameworks", 520 | ); 521 | MARKETING_VERSION = 1.0; 522 | OTHER_LDFLAGS = ( 523 | "$(inherited)", 524 | "-ObjC", 525 | "-lc++", 526 | ); 527 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 528 | PRODUCT_NAME = RNStyledTextDemo; 529 | SWIFT_VERSION = 5.0; 530 | VERSIONING_SYSTEM = "apple-generic"; 531 | }; 532 | name = Release; 533 | }; 534 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 535 | isa = XCBuildConfiguration; 536 | buildSettings = { 537 | ALWAYS_SEARCH_USER_PATHS = NO; 538 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 539 | CLANG_CXX_LANGUAGE_STANDARD = "c++17"; 540 | CLANG_CXX_LIBRARY = "libc++"; 541 | CLANG_ENABLE_MODULES = YES; 542 | CLANG_ENABLE_OBJC_ARC = YES; 543 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 544 | CLANG_WARN_BOOL_CONVERSION = YES; 545 | CLANG_WARN_COMMA = YES; 546 | CLANG_WARN_CONSTANT_CONVERSION = YES; 547 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 548 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 549 | CLANG_WARN_EMPTY_BODY = YES; 550 | CLANG_WARN_ENUM_CONVERSION = YES; 551 | CLANG_WARN_INFINITE_RECURSION = YES; 552 | CLANG_WARN_INT_CONVERSION = YES; 553 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 554 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 555 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 556 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 557 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 558 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 559 | CLANG_WARN_STRICT_PROTOTYPES = YES; 560 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 561 | CLANG_WARN_UNREACHABLE_CODE = YES; 562 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 563 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 564 | COPY_PHASE_STRIP = NO; 565 | ENABLE_STRICT_OBJC_MSGSEND = YES; 566 | ENABLE_TESTABILITY = YES; 567 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; 568 | GCC_C_LANGUAGE_STANDARD = gnu99; 569 | GCC_DYNAMIC_NO_PIC = NO; 570 | GCC_NO_COMMON_BLOCKS = YES; 571 | GCC_OPTIMIZATION_LEVEL = 0; 572 | GCC_PREPROCESSOR_DEFINITIONS = ( 573 | "DEBUG=1", 574 | "$(inherited)", 575 | ); 576 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 577 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 578 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 579 | GCC_WARN_UNDECLARED_SELECTOR = YES; 580 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 581 | GCC_WARN_UNUSED_FUNCTION = YES; 582 | GCC_WARN_UNUSED_VARIABLE = YES; 583 | IPHONEOS_DEPLOYMENT_TARGET = 12.4; 584 | LD_RUNPATH_SEARCH_PATHS = ( 585 | /usr/lib/swift, 586 | "$(inherited)", 587 | ); 588 | LIBRARY_SEARCH_PATHS = ( 589 | "\"$(SDKROOT)/usr/lib/swift\"", 590 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 591 | "\"$(inherited)\"", 592 | ); 593 | MTL_ENABLE_DEBUG_INFO = YES; 594 | ONLY_ACTIVE_ARCH = YES; 595 | OTHER_CFLAGS = "$(inherited)"; 596 | OTHER_CPLUSPLUSFLAGS = ( 597 | "$(OTHER_CFLAGS)", 598 | "-DFOLLY_NO_CONFIG", 599 | "-DFOLLY_MOBILE=1", 600 | "-DFOLLY_USE_LIBCPP=1", 601 | ); 602 | REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; 603 | SDKROOT = iphoneos; 604 | }; 605 | name = Debug; 606 | }; 607 | 83CBBA211A601CBA00E9B192 /* Release */ = { 608 | isa = XCBuildConfiguration; 609 | buildSettings = { 610 | ALWAYS_SEARCH_USER_PATHS = NO; 611 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 612 | CLANG_CXX_LANGUAGE_STANDARD = "c++17"; 613 | CLANG_CXX_LIBRARY = "libc++"; 614 | CLANG_ENABLE_MODULES = YES; 615 | CLANG_ENABLE_OBJC_ARC = YES; 616 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 617 | CLANG_WARN_BOOL_CONVERSION = YES; 618 | CLANG_WARN_COMMA = YES; 619 | CLANG_WARN_CONSTANT_CONVERSION = YES; 620 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 621 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 622 | CLANG_WARN_EMPTY_BODY = YES; 623 | CLANG_WARN_ENUM_CONVERSION = YES; 624 | CLANG_WARN_INFINITE_RECURSION = YES; 625 | CLANG_WARN_INT_CONVERSION = YES; 626 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 627 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 628 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 629 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 630 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 631 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 632 | CLANG_WARN_STRICT_PROTOTYPES = YES; 633 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 634 | CLANG_WARN_UNREACHABLE_CODE = YES; 635 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 636 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 637 | COPY_PHASE_STRIP = YES; 638 | ENABLE_NS_ASSERTIONS = NO; 639 | ENABLE_STRICT_OBJC_MSGSEND = YES; 640 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; 641 | GCC_C_LANGUAGE_STANDARD = gnu99; 642 | GCC_NO_COMMON_BLOCKS = YES; 643 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 644 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 645 | GCC_WARN_UNDECLARED_SELECTOR = YES; 646 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 647 | GCC_WARN_UNUSED_FUNCTION = YES; 648 | GCC_WARN_UNUSED_VARIABLE = YES; 649 | IPHONEOS_DEPLOYMENT_TARGET = 12.4; 650 | LD_RUNPATH_SEARCH_PATHS = ( 651 | /usr/lib/swift, 652 | "$(inherited)", 653 | ); 654 | LIBRARY_SEARCH_PATHS = ( 655 | "\"$(SDKROOT)/usr/lib/swift\"", 656 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 657 | "\"$(inherited)\"", 658 | ); 659 | MTL_ENABLE_DEBUG_INFO = NO; 660 | OTHER_CFLAGS = "$(inherited)"; 661 | OTHER_CPLUSPLUSFLAGS = ( 662 | "$(OTHER_CFLAGS)", 663 | "-DFOLLY_NO_CONFIG", 664 | "-DFOLLY_MOBILE=1", 665 | "-DFOLLY_USE_LIBCPP=1", 666 | ); 667 | REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; 668 | SDKROOT = iphoneos; 669 | VALIDATE_PRODUCT = YES; 670 | }; 671 | name = Release; 672 | }; 673 | /* End XCBuildConfiguration section */ 674 | 675 | /* Begin XCConfigurationList section */ 676 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "RNStyledTextDemoTests" */ = { 677 | isa = XCConfigurationList; 678 | buildConfigurations = ( 679 | 00E356F61AD99517003FC87E /* Debug */, 680 | 00E356F71AD99517003FC87E /* Release */, 681 | ); 682 | defaultConfigurationIsVisible = 0; 683 | defaultConfigurationName = Release; 684 | }; 685 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "RNStyledTextDemo" */ = { 686 | isa = XCConfigurationList; 687 | buildConfigurations = ( 688 | 13B07F941A680F5B00A75B9A /* Debug */, 689 | 13B07F951A680F5B00A75B9A /* Release */, 690 | ); 691 | defaultConfigurationIsVisible = 0; 692 | defaultConfigurationName = Release; 693 | }; 694 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "RNStyledTextDemo" */ = { 695 | isa = XCConfigurationList; 696 | buildConfigurations = ( 697 | 83CBBA201A601CBA00E9B192 /* Debug */, 698 | 83CBBA211A601CBA00E9B192 /* Release */, 699 | ); 700 | defaultConfigurationIsVisible = 0; 701 | defaultConfigurationName = Release; 702 | }; 703 | /* End XCConfigurationList section */ 704 | }; 705 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 706 | } 707 | -------------------------------------------------------------------------------- /ios/RNStyledTextDemo.xcodeproj/xcshareddata/xcschemes/RNStyledTextDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /ios/RNStyledTextDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/RNStyledTextDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : RCTAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /ios/RNStyledTextDemo/AppDelegate.mm: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | #import 4 | 5 | @implementation AppDelegate 6 | 7 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 8 | { 9 | self.moduleName = @"RNStyledTextDemo"; 10 | // You can add your custom initial props in the dictionary below. 11 | // They will be passed down to the ViewController used by React Native. 12 | self.initialProps = @{}; 13 | 14 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 15 | } 16 | 17 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 18 | { 19 | #if DEBUG 20 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; 21 | #else 22 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 23 | #endif 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /ios/RNStyledTextDemo/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "scale" : "1x", 46 | "size" : "1024x1024" 47 | } 48 | ], 49 | "info" : { 50 | "author" : "xcode", 51 | "version" : 1 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /ios/RNStyledTextDemo/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ios/RNStyledTextDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | RNStyledTextDemo 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 | $(MARKETING_VERSION) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(CURRENT_PROJECT_VERSION) 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSExceptionDomains 30 | 31 | localhost 32 | 33 | NSExceptionAllowsInsecureHTTPLoads 34 | 35 | 36 | 37 | 38 | NSLocationWhenInUseUsageDescription 39 | 40 | UILaunchStoryboardName 41 | LaunchScreen 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UIViewControllerBasedStatusBarAppearance 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /ios/RNStyledTextDemo/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /ios/RNStyledTextDemo/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | @autoreleasepool { 8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /ios/RNStyledTextDemoTests/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/RNStyledTextDemoTests/RNStyledTextDemoTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import 5 | #import 6 | 7 | #define TIMEOUT_SECONDS 600 8 | #define TEXT_TO_LOOK_FOR @"Welcome to React" 9 | 10 | @interface RNStyledTextDemoTests : XCTestCase 11 | 12 | @end 13 | 14 | @implementation RNStyledTextDemoTests 15 | 16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test 17 | { 18 | if (test(view)) { 19 | return YES; 20 | } 21 | for (UIView *subview in [view subviews]) { 22 | if ([self findSubviewInView:subview matching:test]) { 23 | return YES; 24 | } 25 | } 26 | return NO; 27 | } 28 | 29 | - (void)testRendersWelcomeScreen 30 | { 31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 33 | BOOL foundElement = NO; 34 | 35 | __block NSString *redboxError = nil; 36 | #ifdef DEBUG 37 | RCTSetLogFunction( 38 | ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 39 | if (level >= RCTLogLevelError) { 40 | redboxError = message; 41 | } 42 | }); 43 | #endif 44 | 45 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 46 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 47 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 48 | 49 | foundElement = [self findSubviewInView:vc.view 50 | matching:^BOOL(UIView *view) { 51 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 52 | return YES; 53 | } 54 | return NO; 55 | }]; 56 | } 57 | 58 | #ifdef DEBUG 59 | RCTSetLogFunction(RCTDefaultLogFunction); 60 | #endif 61 | 62 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 63 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'react-native', 3 | }; 4 | -------------------------------------------------------------------------------- /lib/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 2.0.0 2 | 3 | - Converted to functional component and optimized to avoid unnecessary re-rendering 4 | - Hence, peer dependency on React 16.7.0 or newer 5 | 6 | ## 1.1.2 7 | 8 | - Fixed unnecessary version locks, i.e. removed yarn.lock from repository 9 | 10 | ## 1.1.1 11 | 12 | - Fixed version/release tag mismatch 13 | 14 | ## 1.1.0 15 | 16 | - Automated pull request fixing a security vulnerabilities. 17 | - Upgraded packages 18 | 19 | ## 1.0.6 20 | 21 | - Automated pull request fixing a security vulnerability. 22 | 23 | ## 1.0.5 24 | 25 | - Automated pull request fixing a security vulnerability. 26 | 27 | ## 1.0.4 28 | 29 | - Improved release procedure 30 | 31 | ## 1.0.3 32 | 33 | - Improved release procedure 34 | 35 | ## 1.0.2 36 | 37 | - Automated pull request fixing a security vulnerability. 38 | 39 | ## 1.0.1 40 | 41 | - Added online demo to doc 42 | 43 | ## 1.0.0 44 | 45 | - Changed from using text property to "standard" children property. 46 | - Updated demo project to react 16.8.3 and react-native 0.59.9 47 | 48 | ## v0.3.0 49 | 50 | - Made StyledText default export, allowing import StyledText from 'react-native-styled-text'; 51 | - Added TypeScript definitions 52 | 53 | ## v0.2.0 54 | 55 | Feature 56 | 57 | - Support RN Text properties 58 | 59 | Updated docs 60 | 61 | ## v0.1.4 62 | 63 | - Handle undefined/null 'text' 64 | - Documentation: improved examples 65 | 66 | ## v0.1.3 67 | 68 | - Added underline style in predefined styles 69 | - Added screenshot of example for android 70 | 71 | ## v0.1.2 72 | 73 | - Fix doc publishing 74 | 75 | ## v0.1.1 76 | 77 | - Fix doc publishing 78 | 79 | ## v0.1.0 80 | 81 | Features 82 | 83 | - Default style definitions for bold and italic 84 | - Supports HTML-codes for < > and " 85 | 86 | Fixes 87 | 88 | - Warning on tag mismatch 89 | - Warning on unexpected end tags 90 | -------------------------------------------------------------------------------- /lib/StyledText/index.js: -------------------------------------------------------------------------------- 1 | import React, {useMemo} from 'react'; 2 | import { Text } from 'react-native'; 3 | 4 | import { renderInnerStyledText } from './renderer'; 5 | 6 | const StyledText = (props) => { 7 | const { 8 | children, 9 | textStyles, 10 | ...textProps 11 | } = props; 12 | 13 | const innerTextElements = useMemo(() => renderInnerStyledText(children, textStyles), 14 | [children, textStyles] 15 | ); 16 | 17 | return React.createElement( 18 | Text, 19 | textProps, 20 | innerTextElements, 21 | ); 22 | } 23 | 24 | export default StyledText; 25 | -------------------------------------------------------------------------------- /lib/StyledText/lexicalAnalyzer.js: -------------------------------------------------------------------------------- 1 | export type Token = { 2 | type: string, 3 | lexeme: string, 4 | } 5 | 6 | export const TOKEN_BEGIN_TAG = 'begin tag'; 7 | export const TOKEN_END_TAG = 'end tag'; 8 | export const TOKEN_TEXT = 'text'; 9 | 10 | const replaceCodes = (text: string) => { 11 | return text 12 | .replace(/"/g, '"') 13 | .replace(/</g, '<') 14 | .replace(/>/g, '>') 15 | } 16 | 17 | export const scan = (text: string): Array => { 18 | if (text === undefined || text === null || text === '') { 19 | return [{ type: TOKEN_TEXT, lexeme: text }]; 20 | } 21 | 22 | const tagRegex = /<([\w-]+)>|<\/([\w-]*)>/; 23 | const tokens = []; 24 | 25 | let remainingText = text; 26 | while (remainingText.length > 0) { 27 | const tag = tagRegex.exec(remainingText); 28 | 29 | if (!tag) { 30 | const lexeme = replaceCodes(remainingText); 31 | tokens.push({ type: TOKEN_TEXT, lexeme }); 32 | remainingText = ''; 33 | break; 34 | } 35 | 36 | if (tag.index > 0) { 37 | const headText = remainingText.substring(0, tag.index); 38 | const lexeme = replaceCodes(headText); 39 | tokens.push({ type: TOKEN_TEXT, lexeme }); 40 | remainingText = remainingText.substring(tag.index); 41 | } 42 | 43 | const styleName = tag[1] || tag[2]; 44 | if (tag[0].startsWith(' 11 | // endStyle ::= | 12 | // plainText ::= .* 13 | // styledText ::= beginStyle mixedText [endStyle] 14 | // mixedText ::= (plainText | styledText)* 15 | 16 | export type Styled = { 17 | styleName: string, 18 | mixedText: Mixed, 19 | }; 20 | 21 | export type Mixed = Array 22 | 23 | const parseStyledText = (tokens: Array, startIndex: number) 24 | : { styledText: Styled, length: number } => { 25 | const styleName = tokens[startIndex].lexeme; 26 | let index = startIndex + 1; 27 | const { mixedText, length } = parseMixedText(tokens, index); 28 | index += length; 29 | if (index < tokens.length && tokens[index].type === TOKEN_END_TAG) { 30 | // Check proper nesting of styles, if style name used on end tag 31 | if (tokens[index].lexeme && tokens[index].lexeme !== styleName) { 32 | console.warn('react-native-styled-text: style name mismatch <' + styleName + '>...'); 33 | } 34 | index++; 35 | } 36 | 37 | return { 38 | styledText: { 39 | styleName, 40 | mixedText, 41 | }, 42 | length: index - startIndex, 43 | }; 44 | }; 45 | 46 | const parseMixedText = (tokens: Array, startIndex: number) 47 | : { mixedText: Mixed, length: number } => { 48 | const mixedText = []; 49 | let index = startIndex; 50 | while (index < tokens.length && tokens[index].type !== TOKEN_END_TAG) { 51 | const token = tokens[index]; 52 | switch (token.type) { 53 | case TOKEN_BEGIN_TAG: { 54 | const { styledText, length } = parseStyledText(tokens, index); 55 | mixedText.push(styledText); 56 | index += length; 57 | break; 58 | } 59 | case TOKEN_TEXT: 60 | mixedText.push(token.lexeme); 61 | index++; 62 | break; 63 | default: 64 | console.warn('Unexpected ' + token.type + ': ' + token.lexeme); 65 | index++; 66 | break; 67 | } 68 | } 69 | 70 | return { 71 | mixedText, 72 | length: index - startIndex, 73 | }; 74 | }; 75 | 76 | export const parse = (text: string): Mixed => { 77 | const tokens = scan(text); 78 | const { mixedText, length } = parseMixedText(tokens, 0); 79 | 80 | if (length < tokens.length) { 81 | const unexpectedToken = tokens[length]; 82 | console.warn('Unexpected ' + unexpectedToken.type + ': ' + unexpectedToken.lexeme); 83 | } 84 | 85 | return mixedText; 86 | }; 87 | -------------------------------------------------------------------------------- /lib/StyledText/renderer.js: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { Text } from 'react-native'; 3 | 4 | import { parse, Mixed } from './parser'; 5 | import { verifyChildrenProp, verifyTextStylesProp, verifyTextStyles } from './utils'; 6 | 7 | const defaultStyles = { 8 | b: { 9 | fontWeight: 'bold', 10 | }, 11 | i: { 12 | fontStyle: 'italic', 13 | }, 14 | u: { 15 | textDecorationLine: 'underline', 16 | } 17 | }; 18 | 19 | const renderMixedText = (mixedText: Mixed, textStyles: Object) => mixedText.map((element, index) => ( 20 | typeof element === 'string' || element === undefined || element === null 21 | ? element 22 | : React.createElement( 23 | Text, 24 | { 25 | style: textStyles[element.styleName] || defaultStyles[element.styleName], 26 | key: index 27 | }, 28 | renderMixedText(element.mixedText, textStyles), 29 | ) 30 | )); 31 | 32 | export const renderInnerStyledText = (children, textStyles) => { 33 | const text = verifyChildrenProp(children) ? children : undefined; 34 | const styles = verifyTextStylesProp(textStyles) ? (textStyles || {}) : {} 35 | 36 | const mixedText = parse(text); 37 | verifyTextStyles(mixedText, styles, defaultStyles); 38 | 39 | return renderMixedText(mixedText, styles); 40 | }; 41 | -------------------------------------------------------------------------------- /lib/StyledText/utils.js: -------------------------------------------------------------------------------- 1 | import { Mixed } from './parser'; 2 | 3 | const findAllTextStyles = ( 4 | mixedText: Mixed, 5 | accStyleNames: Array = [] 6 | ) : Array => { 7 | mixedText.map(element => { 8 | if (!(typeof element === 'string' || element === undefined || element === null)) { 9 | const index = accStyleNames.indexOf(element.styleName); 10 | if (index < 0) { 11 | accStyleNames.push(element.styleName); 12 | } 13 | 14 | accStyleNames = findAllTextStyles(element.mixedText, accStyleNames); 15 | } 16 | }); 17 | 18 | return accStyleNames; 19 | } 20 | 21 | const verifyChildrenProp = ( 22 | children: string, 23 | textStyles: Object 24 | ) => { 25 | if (typeof children !== "string" && children !== undefined && children !== null) { 26 | console.warn(`react-native-styled-text: children must a string, undefined or null (${JSON.stringify(children)})`); 27 | return false; 28 | } 29 | 30 | return true; 31 | } 32 | 33 | const verifyTextStylesProp = ( 34 | textStyles: Object 35 | ) => { 36 | if (typeof textStyles !== "object" && textStyles !== undefined && textStyles !== null) { 37 | console.warn(`react-native-styled-text: textStyles must an object, undefined or null (${JSON.stringify(textStyles)})`); 38 | return false; 39 | } 40 | 41 | return true; 42 | } 43 | 44 | const verifyTextStyles = ( 45 | mixedText: Mixed, 46 | textStyles: Object, 47 | defaultStyles: Object 48 | ) => { 49 | const styleNames = findAllTextStyles(mixedText); 50 | 51 | styleNames.forEach((styleName) => { 52 | if (!textStyles[styleName] && !defaultStyles[styleName]) { 53 | console.warn('react-native-styled-text: style "' + styleName + '" is not defined'); 54 | } 55 | }); 56 | } 57 | 58 | export { verifyChildrenProp, verifyTextStylesProp, verifyTextStyles }; -------------------------------------------------------------------------------- /lib/__tests__/lexicalAnalyzer.spec.js: -------------------------------------------------------------------------------- 1 | import { 2 | scan, 3 | Token, 4 | TOKEN_BEGIN_TAG, 5 | TOKEN_END_TAG, 6 | TOKEN_TEXT, 7 | } from '../StyledText/lexicalAnalyzer'; 8 | 9 | describe('StyledText/lexicalAnalyzer', () => { 10 | describe('scan', () => { 11 | it('should return text if plain text', () => { 12 | const text = 'Testing { 20 | const text = ''; 21 | const tokens = scan(text); 22 | expect(tokens.length).toBe(1); 23 | expect(tokens[0].type).toBe(TOKEN_BEGIN_TAG); 24 | expect(tokens[0].lexeme).toBe('style1'); 25 | }); 26 | 27 | it('should recognize named end tag', () => { 28 | const text = ''; 29 | const tokens = scan(text); 30 | expect(tokens.length).toBe(1); 31 | expect(tokens[0].type).toBe(TOKEN_END_TAG); 32 | expect(tokens[0].lexeme).toBe('style1'); 33 | }); 34 | 35 | it('should recognize empty end tag', () => { 36 | const text = ''; 37 | const tokens = scan(text); 38 | expect(tokens.length).toBe(1); 39 | expect(tokens[0].type).toBe(TOKEN_END_TAG); 40 | expect(tokens[0].lexeme).toBe(''); 41 | }); 42 | 43 | it('should handle mixed text', () => { 44 | const text = 'Testing adsftext2234'; 45 | const tokens = scan(text); 46 | expect(tokens.length).toBe(7); 47 | expect(tokens[0].type).toBe(TOKEN_TEXT); 48 | expect(tokens[0].lexeme).toBe('Testing '); 49 | expect(tokens[1].type).toBe(TOKEN_BEGIN_TAG); 50 | expect(tokens[1].lexeme).toBe('style1'); 51 | expect(tokens[2].type).toBe(TOKEN_TEXT); 52 | expect(tokens[2].lexeme).toBe('adsf'); 53 | expect(tokens[3].type).toBe(TOKEN_BEGIN_TAG); 54 | expect(tokens[3].lexeme).toBe('style2'); 55 | expect(tokens[4].type).toBe(TOKEN_TEXT); 56 | expect(tokens[4].lexeme).toBe('text2'); 57 | expect(tokens[5].type).toBe(TOKEN_END_TAG); 58 | expect(tokens[5].lexeme).toBe('style2'); 59 | expect(tokens[6].type).toBe(TOKEN_TEXT); 60 | expect(tokens[6].lexeme).toBe('234'); 61 | }); 62 | 63 | it('should translate > < "', () => { 64 | const text = '<">'; 65 | const tokens = scan(text); 66 | expect(tokens.length).toBe(2); 67 | expect(tokens[0].type).toBe(TOKEN_BEGIN_TAG); 68 | expect(tokens[0].lexeme).toBe('style1'); 69 | expect(tokens[1].type).toBe(TOKEN_TEXT); 70 | expect(tokens[1].lexeme).toBe('<">'); 71 | }); 72 | }); 73 | }); 74 | -------------------------------------------------------------------------------- /lib/__tests__/parser.spec.js: -------------------------------------------------------------------------------- 1 | import { parse } from '../StyledText/parser'; 2 | 3 | let mockWarnings = []; 4 | const mockWarn = (msg) => mockWarnings.push(msg); 5 | 6 | describe('StyledText/parser', () => { 7 | beforeAll(() => { 8 | console['warn'] = mockWarn; 9 | }); 10 | beforeEach(() => { 11 | mockWarnings = []; 12 | }); 13 | 14 | describe('parseText', () => { 15 | it('should return text if not formatted', () => { 16 | const text = 'Testing { 23 | const text = undefined; 24 | const mixedText = parse(text); 25 | expect(mixedText.length).toBe(1); 26 | expect(mixedText[0]).toBe(text); 27 | }); 28 | 29 | it('should return null if null', () => { 30 | const text = undefined; 31 | const mixedText = parse(text); 32 | expect(mixedText.length).toBe(1); 33 | expect(mixedText[0]).toBe(text); 34 | }); 35 | 36 | it('should return "" if ""', () => { 37 | const text = ''; 38 | const mixedText = parse(text); 39 | expect(mixedText.length).toBe(1); 40 | expect(mixedText[0]).toBe(text); 41 | }); 42 | 43 | it('should handle text if enclosed in tags', () => { 44 | const text = 'Testing adsf'; 45 | const mixedText = parse(text); 46 | expect(mixedText.length).toBe(1); 47 | expect(mixedText[0].styleName).toBe('style1'); 48 | expect(mixedText[0].mixedText.length).toBe(1); 49 | expect(mixedText[0].mixedText[0]).toBe('Testing adsf'); 50 | }); 51 | 52 | it('should handle mixed text', () => { 53 | const text = 'Testing adsf234'; 54 | const mixedText = parse(text); 55 | expect(mixedText.length).toBe(3); 56 | expect(mixedText[0]).toBe('Testing '); 57 | expect(mixedText[1].styleName).toBe('style1'); 58 | expect(mixedText[1].mixedText.length).toBe(1); 59 | expect(mixedText[1].mixedText[0]).toBe('adsf'); 60 | expect(mixedText[2]).toBe('234'); 61 | }); 62 | 63 | it('should handle nested mixed text', () => { 64 | const text = 'Testing adsftext2234'; 65 | const mixedText = parse(text); 66 | expect(mixedText.length).toBe(3); 67 | expect(mixedText[0]).toBe('Testing '); 68 | expect(mixedText[1].styleName).toBe('style1'); 69 | expect(mixedText[1].mixedText.length).toBe(2); 70 | expect(mixedText[1].mixedText[0]).toBe('adsf'); 71 | expect(mixedText[1].mixedText[1].styleName).toBe('style2'); 72 | expect(mixedText[1].mixedText[1].mixedText.length).toBe(1); 73 | expect(mixedText[1].mixedText[1].mixedText[0]).toBe('text2'); 74 | expect(mixedText[2]).toBe('234'); 75 | }); 76 | 77 | it('should handle missing end tags', () => { 78 | const text = 'Testing adsftext2234'; 79 | const mixedText = parse(text); 80 | expect(mixedText.length).toBe(2); 81 | expect(mixedText[0]).toBe('Testing '); 82 | expect(mixedText[1].styleName).toBe('style1'); 83 | expect(mixedText[1].mixedText.length).toBe(3); 84 | expect(mixedText[1].mixedText[0]).toBe('adsf'); 85 | expect(mixedText[1].mixedText[1].styleName).toBe('style2'); 86 | expect(mixedText[1].mixedText[1].mixedText.length).toBe(1); 87 | expect(mixedText[1].mixedText[1].mixedText[0]).toBe('text2'); 88 | expect(mixedText[1].mixedText[2]).toBe('234'); 89 | }); 90 | 91 | it('should handle named end tags', () => { 92 | const text = 'Testing adsftext2234'; 93 | const mixedText = parse(text); 94 | expect(mixedText.length).toBe(2); 95 | expect(mixedText[0]).toBe('Testing '); 96 | expect(mixedText[1].styleName).toBe('style1'); 97 | expect(mixedText[1].mixedText.length).toBe(3); 98 | expect(mixedText[1].mixedText[0]).toBe('adsf'); 99 | expect(mixedText[1].mixedText[1].styleName).toBe('style2'); 100 | expect(mixedText[1].mixedText[1].mixedText.length).toBe(1); 101 | expect(mixedText[1].mixedText[1].mixedText[0]).toBe('text2'); 102 | expect(mixedText[1].mixedText[2]).toBe('234'); 103 | }); 104 | 105 | it('should give warning on tag name mismatch', () => { 106 | const text = 'adsf'; 107 | parse(text); 108 | expect(mockWarnings.length).toBe(1); 109 | expect(mockWarnings[0]).toContain('style name mismatch'); 110 | expect(mockWarnings[0]).toContain('style1'); 111 | expect(mockWarnings[0]).toContain('style2'); 112 | }); 113 | 114 | it('should give warning on unexpected end tag', () => { 115 | const text = 'adsf'; 116 | parse(text); 117 | expect(mockWarnings.length).toBe(1); 118 | expect(mockWarnings[0].toLowerCase()).toContain('unexpected end tag'); 119 | expect(mockWarnings[0]).toContain('style1'); 120 | }); 121 | }); 122 | }); 123 | -------------------------------------------------------------------------------- /lib/__tests__/utils.spec.js: -------------------------------------------------------------------------------- 1 | import { verifyChildrenProp, verifyTextStylesProp, verifyTextStyles } from '../StyledText/utils'; 2 | 3 | let warnings = []; 4 | const warn = msg => warnings.push(msg); 5 | const textStyles = { 6 | style1: {}, 7 | style2: {}, 8 | }; 9 | const defaultStyles = { 10 | b: {}, 11 | i: {}, 12 | u: {} 13 | }; 14 | 15 | describe('StyledText/utils', () => { 16 | beforeAll(() => { 17 | console['warn'] = warn; 18 | }); 19 | beforeEach(() => { 20 | warnings = []; 21 | }); 22 | 23 | describe('verifyChildrenProp', () => { 24 | it('should not give warning on children undefined', () => { 25 | const children = undefined; 26 | verifyChildrenProp(children); 27 | expect(warnings.length).toBe(0); 28 | }); 29 | 30 | it('should not give warning on children null', () => { 31 | const children = null; 32 | verifyChildrenProp(children); 33 | expect(warnings.length).toBe(0); 34 | }); 35 | 36 | it('should not give warning on children ""', () => { 37 | const children = ""; 38 | verifyChildrenProp(children); 39 | expect(warnings.length).toBe(0); 40 | }); 41 | 42 | it('should not give warning on children "test"', () => { 43 | const children = "test"; 44 | verifyChildrenProp(children); 45 | expect(warnings.length).toBe(0); 46 | }); 47 | 48 | it('should give warning on children object', () => { 49 | const children = {}; 50 | verifyChildrenProp(children); 51 | expect(warnings.length).toBe(1); 52 | }); 53 | 54 | it('should not give warning on textStyles undefined', () => { 55 | const textStyles = undefined; 56 | verifyTextStylesProp(textStyles); 57 | expect(warnings.length).toBe(0); 58 | }); 59 | 60 | it('should not give warning on textStyles null', () => { 61 | const textStyles = null; 62 | verifyTextStylesProp(textStyles); 63 | expect(warnings.length).toBe(0); 64 | }); 65 | 66 | it('should not give warning on textStyles {}', () => { 67 | const textStyles = {}; 68 | verifyTextStylesProp(textStyles); 69 | expect(warnings.length).toBe(0); 70 | }); 71 | 72 | it('should not give warning on textStyles { test: {}}', () => { 73 | const textStyles = { test: {}}; 74 | verifyTextStylesProp(textStyles); 75 | expect(warnings.length).toBe(0); 76 | }); 77 | 78 | it('should give warning on textStyles string', () => { 79 | const textStyles = "test"; 80 | verifyTextStylesProp(textStyles); 81 | expect(warnings.length).toBe(1); 82 | }); 83 | }); 84 | 85 | describe('verifyTextStyles', () => { 86 | it('should not give warning on undefined', () => { 87 | const mixedText = [undefined]; 88 | verifyTextStyles(mixedText, textStyles, defaultStyles); 89 | expect(warnings.length).toBe(0); 90 | }); 91 | 92 | it('should not give warning on null', () => { 93 | const mixedText = [null]; 94 | verifyTextStyles(mixedText, textStyles, defaultStyles); 95 | expect(warnings.length).toBe(0); 96 | }); 97 | 98 | it('should not give warning on ""', () => { 99 | const mixedText = ['']; 100 | verifyTextStyles(mixedText, textStyles, defaultStyles); 101 | expect(warnings.length).toBe(0); 102 | }); 103 | 104 | it('should not give warning on "test"', () => { 105 | const mixedText = ['test']; 106 | verifyTextStyles(mixedText, textStyles, defaultStyles); 107 | expect(warnings.length).toBe(0); 108 | }); 109 | 110 | it('should not give warning on defined styles', () => { 111 | const mixedText = [ 112 | 'test', 113 | { 114 | styleName: 'style1', 115 | mixedText: [ 116 | 'test2', 117 | { 118 | styleName: 'b', 119 | mixedText: ['test3'] 120 | } 121 | ] 122 | } 123 | ]; 124 | verifyTextStyles(mixedText, textStyles, defaultStyles); 125 | expect(warnings.length).toBe(0); 126 | }); 127 | 128 | it('should not give warning on undefined styles', () => { 129 | const mixedText = [ 130 | 'test', 131 | { 132 | styleName: 'style3', 133 | mixedText: [ 134 | 'test2', 135 | { 136 | styleName: 'e', 137 | mixedText: ['test3'] 138 | } 139 | ] 140 | } 141 | ]; 142 | verifyTextStyles(mixedText, textStyles, defaultStyles); 143 | expect(warnings.length).toBe(2); 144 | expect(warnings[0]).toContain('"style3"'); 145 | expect(warnings[1]).toContain('"e"'); 146 | }); 147 | }); 148 | }); 149 | -------------------------------------------------------------------------------- /lib/index.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { StyleSheet, TextProps, TextStyle } from 'react-native'; 3 | 4 | export interface Props extends TextProps { 5 | /** 6 | * HTML-like text containing style tags 7 | * e.g., `Welcome to React Native Styled Text demo!` 8 | * where the style tags must be either one of the predefined tags: ``, `` or `` 9 | * or refer to custom styles defined in the textStyles property, e.g. `` 10 | */ 11 | children?: string; 12 | /** 13 | * Custom styles which may be used as style tags in the text property 14 | */ 15 | textStyles?: object; 16 | } 17 | 18 | /** 19 | * Use StyledText for shorthand mixing of text styles with an HTML-like notation. 20 | * 21 | * children should be an HTML-like text containing style tags 22 | * e.g., `Welcome to React Native Styled Text demo!` 23 | * where the style tags must be either one of the predefined tags: ``, `` or `` 24 | * or refer to custom styles defined in the textStyles property, e.g. `` 25 | */ 26 | declare const StyledText: (props: Props) => React.ReactElement | null; 27 | 28 | export default StyledText; 29 | -------------------------------------------------------------------------------- /lib/index.js: -------------------------------------------------------------------------------- 1 | import StyledText from './StyledText'; 2 | 3 | export default StyledText; 4 | -------------------------------------------------------------------------------- /lib/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-styled-text", 3 | "version": "2.0.0", 4 | "description": "A React Native component for easy rendering of styled text.", 5 | "main": "./index.js", 6 | "scripts": { 7 | "test": "jest --watchAll", 8 | "version": "git add -A . && git commit -m 'Version update'" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/fram-x/react-native-styled-text.git" 13 | }, 14 | "keywords": [ 15 | "react-native", 16 | "style", 17 | "styling", 18 | "format", 19 | "formatting", 20 | "text", 21 | "mixed", 22 | "font", 23 | "bold", 24 | "italic", 25 | "color", 26 | "html", 27 | "css", 28 | "nested" 29 | ], 30 | "author": "Bjørn Egil Hansen", 31 | "license": "MIT", 32 | "bugs": { 33 | "url": "https://github.com/fram-x/react-native-styled-text/issues" 34 | }, 35 | "homepage": "https://github.com/fram-x/react-native-styled-text#readme", 36 | "dependencies": { 37 | "prop-types": "*" 38 | }, 39 | "peerDependencies": { 40 | "react": ">=16.7.0", 41 | "react-native": "*" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /metro.config.js: -------------------------------------------------------------------------------- 1 | const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config'); 2 | 3 | /** 4 | * Metro configuration 5 | * https://facebook.github.io/metro/docs/configuration 6 | * 7 | * @type {import('metro-config').MetroConfig} 8 | */ 9 | const config = {}; 10 | 11 | module.exports = mergeConfig(getDefaultConfig(__dirname), config); 12 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-styled-text-ex", 3 | "version": "2.0.0", 4 | "author": "Bjørn Egil Hansen", 5 | "license": "MIT", 6 | "private": true, 7 | "scripts": { 8 | "android": "react-native run-android", 9 | "ios": "react-native run-ios", 10 | "lint": "eslint .", 11 | "start": "react-native start", 12 | "test": "jest" 13 | }, 14 | "dependencies": { 15 | "react": "18.2.0", 16 | "react-native": "0.72.3" 17 | }, 18 | "devDependencies": { 19 | "@babel/core": "^7.20.0", 20 | "@babel/preset-env": "^7.20.0", 21 | "@babel/runtime": "^7.20.0", 22 | "@react-native/eslint-config": "^0.72.2", 23 | "@react-native/metro-config": "^0.72.9", 24 | "@tsconfig/react-native": "^3.0.0", 25 | "@types/react": "^18.0.24", 26 | "@types/react-test-renderer": "^18.0.0", 27 | "babel-jest": "^29.2.1", 28 | "eslint": "^8.19.0", 29 | "jest": "^29.2.1", 30 | "metro-react-native-babel-preset": "0.76.7", 31 | "prettier": "^2.4.1", 32 | "react-test-renderer": "18.2.0", 33 | "typescript": "4.8.4" 34 | }, 35 | "engines": { 36 | "node": ">=16" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/react-native/tsconfig.json" 3 | } 4 | --------------------------------------------------------------------------------