react-native/Libraries
Brent Vatne 346858a552 Add StyleSheet.setStyleAttributePreprocessor
Summary:
**Motivation**

On Exponent we load fonts dynamically and assign their native names by appending a session id, so that fonts from one Exponent "experience" do not clash with each other. So, before sending the `fontFamily` to native, we want to change it to the Exponent-scoped `fontFamily`.

Example:

```js
// Before rendering your app
StyleSheet.setStyleAttributePreprocessor('fontFamily', _processFontFamily);

function _processFontFamily(name) {
  // Pass system fonts through
  if (!name || Constants.systemFonts.indexOf(name) >= 0) {
    return name;
  }

  if (!Font.isLoaded(name)) {
    if (__DEV__) {
      console.error(`${name} is not a system font and has not been loaded through Exponent.Font.loadAsync. If you intended to use a system font, make sure you typed the name correctly and that it is supported by the current operating system. If this is a custom font, be sure to load it with Exponent.Font.loadAsync`);
    } else {
      return 'system';
    }
  }

  return `ExponentFont-
Closes https://github.com/facebook/react-native/pull/11138

Differential Revision: D4245518

Pulled By: mkonicek

fbshipit-source-id: bd2452b1129d6675aa7b88e41351f8bb61fa20a3
2016-11-29 15:28:32 -08:00
..
ART RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
ActionSheetIOS Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
AdSupport Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
Alert fix typo in Alert.js 2016-10-14 08:13:55 -07:00
Animated Deploy v0.36.0 2016-11-28 10:13:31 -08:00
AppState Remove deprecated APIs and modules 2016-10-11 07:43:52 -07:00
BatchedBridge Deploy v0.35.0 2016-11-14 20:45:17 -08:00
BugReporting RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
CameraRoll Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
Components Fix invariant in scrollResponderZoomTo 2016-11-29 14:43:38 -08:00
Core Cannot assign to read only property 'product' of object '#<WorkerNavi… 2016-11-22 07:28:34 -08:00
CustomComponents Typo 2016-11-28 03:43:32 -08:00
DebugComponentHierarchy
EventEmitter RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00
Experimental enable variable size slideoutView with swipeableListView 2016-11-14 11:58:58 -08:00
Geolocation Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
Image Add `deprecated` flag for nativeImageSource 2016-11-28 15:58:36 -08:00
Inspector RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
Interaction RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
JSInspector Add Network agent 2016-11-02 12:29:15 -07:00
LayoutAnimation Mention that LayoutAnimation has to be explicitly enabled on A… 2016-11-25 15:28:28 -08:00
Linking
LinkingIOS Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
Modal make Modal pass rootTag to AppContainer 2016-11-18 01:43:26 -08:00
NativeAnimation Fix NativeAnimation invalidation & races on iOS 2016-11-28 11:13:31 -08:00
NavigationExperimental Fix animation in fast navigation between scenes 2016-11-23 09:58:42 -08:00
Network Deploy v0.36.0 2016-11-28 10:13:31 -08:00
Performance RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
PermissionsAndroid Handle "Never Ask Again" in permissions and add requestMultiplePermissions 2016-11-24 22:43:28 -08:00
PushNotificationIOS Remove deprecated push notification method info 2016-11-25 03:58:32 -08:00
RCTTest Fix imports in UIExplorerUnitTests 2016-11-24 09:58:31 -08:00
ReactNative Don't dismiss keyboard when tapping another text input 2016-11-25 05:43:30 -08:00
Renderer Add StyleSheet.setStyleAttributePreprocessor 2016-11-29 15:28:32 -08:00
Sample Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
Settings Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
Share Update Share.js. Fixed bad grammar 2016-11-23 11:28:29 -08:00
Storage
StyleSheet Add StyleSheet.setStyleAttributePreprocessor 2016-11-29 15:28:32 -08:00
Text iOS: Introduce spellCheck prop to TextInput 2016-11-25 04:28:28 -08:00
Utilities Workaround native module dependency in Jest environment 2016-11-22 23:58:30 -08:00
Vibration Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
WebSocket Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
react-native RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00
vendor RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00
Promise.js
promiseRejectionIsError.js RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00