open-index/open-npm huggingface dataset:
npm package: @newbanker/react-native-ijkplayer
Description: IJKPlayer for React Native.
Author: suetming
Latest version: 0.4.9

# React Native Component for ijkplayer


Install

```sh
npm install @newbanker/react-native-ijkplayer --save
```

### iOS

iOS build need IJKMediaFramework.framework first,
which can be build following instructions on https://github.com/Bilibili/ijkplayer,
and generate IJKMediaFramework.framework

```
cd /Users/cong/Library/Developer/Xcode/DerivedData/IJKMediaDemo-ffgcszbckhcejffronccjzcppdbz/Build/Products/
lipo -create Release-iphoneos/IJKMediaFramework.framework/IJKMediaFramework Release-iphonesimulator/IJKMediaFramework.framework/IJKMediaFramework -output IJKMediaFramework
cp IJKMediaFramework Release-iphoneos/IJKMediaFramework.framework/
cp -R Release-iphoneos/IJKMediaFramework.framework react-native-ijkplayer/ios/
```

After IJKMediaFramework.framework placed under react-native-ijkplayer/ios/ , Example is ready to build.
```
cd react-native-ijkplayer/Example/ios
open Example.xcodeproj
```

### Android

ijk dependencies is satisfied using gradle for Android

```
cd react-native-ijkplayer/Example/android
./gradlew installDebug
```
npm package: @newbanker/react-native-measure-text
Description: https://github.com/Damoness
Author: Damoness
Latest version: 0.2.0

# @newbanker/react-native-measure-text

https://github.com/Damoness

## Installation

```sh
npm install @newbanker/react-native-measure-text
```

## Usage

```javascript
import MeasureText from 'react-native-measure-text';

const texts = [
  'This is an example',
  'This is the second line'
];
const width = 100;
const fontSize = 15;
const fontFamily = 'Arvo';

class Test extends Component {
  state = {
    heights: [],
  }
  async componentDidMount() {
    const heights = await MeasureText.heights({(
      texts, /* texts to measure */
      width, /* container width */
      fontSize,
      fontFamily /* fontFamily is optional! */
    );
    this.setState({ heights });
  }
  render() {
    const { heights } = this.state;
    return (
      <View>
        {texts.map((text, i) => (
          <Text
            key={`text-${i}`}
            style={{
              width,
              fontSize,
              fontFamily,
              height: heights[i],
            }}
          >
            {text}
          </Text>
        ))}
    </View>
  }
}
```

## API

`MeasureText.heights(options)`

Returns a promise that resolves to all the heights of the texts passed in options.

`MeasureText.widths(options)`

Returns a promise that resolves to all the widths of the texts passed in options.

Measure options:

* `texts`: An array of texts to measure.
* `width`: Container width when you want to measure the height.
* `height`: Container height when you want to measure the width.
* `fontSize`: The size of the font.
* `fontFamily`: The name of a _custom_ font or a _preinstalled_ font. This is optional.
* `fontWeight`: Specifies font weight. The values are the same that React Native allows: `enum('normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900')`



## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT
npm package: @newbanker/react-native-simple-toast
Description: Simple Toast for react-native. In Android it's just native toast, in iOS it's https://github.com/scalessec/Toast
Author: Vojtech Novak
Latest version: 1.1.7

# react-native-simple-toast [![npm version](https://badge.fury.io/js/react-native-simple-toast.svg)](https://badge.fury.io/js/react-native-simple-toast)

React Native Toast component for both Android and iOS. It just lets iOS users have the same toast experience as on Android. Using [scalessec/Toast](https://github.com/scalessec/Toast) on iOS and the standard [ToastAndroid](http://facebook.github.io/react-native/docs/toastandroid.html) on Android;

This is based on work at https://github.com/xgfe/react-native-simple-toast, but doesn't have much in common any more.

## Install

```bash
npm install react-native-simple-toast --save
react-native link react-native-simple-toast // only RN < 0.60
cd ios && pod install
```

then rebuild your project

## Usage

the module exposes the following functions:

```js
// duration Toast.SHORT is used by default
show: (message: string, duration?: number, viewControllerBlacklist?: Array<string>) => void,
```

```js
showWithGravity: (
message: string,
duration: number,
gravity: string,
viewControllerBlacklist?: Array<string>
) => void,
```

Note on `viewControllerBlacklist`: this is an iOS-only option, it is ignored on android.
When presenting the Toast, we need to find the presented ViewController (VC). The Toast will be presented in that VC. For Example, let's say you're showing a `ReactNative.Modal` in your app - in that case, the presented VC is a `RCTModalHostViewController`.

If you present a Toast while that `Modal` is shown, and then hide the `Modal`, the Toast will disappear together with the `Modal`.

`viewControllerBlacklist` allows to say what VCs should not be considered when Toast is shown. This is to allow to work around issues where Toast would be displayed weirdly in an `Alert` or would hide too quickly when shown in a `RCTModalHostViewController`.

The values `viewControllerBlacklist` has been tested with are:

```js
['RCTModalHostViewController', 'UIAlertController'];
```

## Examples

```js
import Toast from 'react-native-simple-toast';

Toast.show('This is a toast.');
Toast.show('This is a long toast.', Toast.LONG);

Toast.showWithGravity('This is a long toast at the top.', Toast.LONG, Toast.TOP);

Toast.show('This is nicely visible even if you call this when an Alert is shown', Toast.SHORT, [
  'UIAlertController',
]);
```

## License

MIT
npm package: @newbanker/react-native-static-safe-area-insets
Description: React Native package that exposed the Safe Area insets as constants
Author: Gaspard+Bruno
Latest version: 1.0.5

# React Native Static Safe Area Insets

React Native package that exposes the Safe Area insets as constants (iOS and Android notch are supported).

## Getting started

### React Native 0.60 or above
```sh
yarn add react-native-static-safe-area-insets
cd ios && pod install # for iOS
```

### React Native 0.59

```sh
yarn add react-native-static-safe-area-insets
react-native link react-native-static-safe-area-insets
```

## Usage

### Constants
```javascript
import StaticSafeAreaInsets from 'react-native-static-safe-area-insets';

console.log('SafeArea insets top:', StaticSafeAreaInsets.safeAreaInsetsTop)
// SafeArea insets top: 44

console.log('SafeArea insets bottom:', StaticSafeAreaInsets.safeAreaInsetsBottom)
// SafeArea insets bottom: 34

console.log('SafeArea insets left:', StaticSafeAreaInsets.safeAreaInsetsLeft)
// SafeArea insets left: 44

console.log('SafeArea insets right:', StaticSafeAreaInsets.safeAreaInsetsRight)
// SafeArea insets right: 44
```

### Current Insets
```javascript
import StaticSafeAreaInsets from 'react-native-static-safe-area-insets';

StaticSafeAreaInsets.getSafeAreaInsets((values) => {
  console.log('SafeArea insets top:', values.safeAreaInsetsTop)
  // SafeArea insets top: 44

  console.log('SafeArea insets bottom:', values.safeAreaInsetsBottom)
  // SafeArea insets bottom: 34

  console.log('SafeArea insets left:', values.safeAreaInsetsLeft)
  // SafeArea insets left: 44

  console.log('SafeArea insets right:', values.safeAreaInsetsRight)
  // SafeArea insets right: 44
})
```

This method is useful for cases when you want to get the new insets when the device orientation changes.
npm package: @newbeebox/adsdk
Description: 广告SDK
Author: 南宁新手村科技
Latest version: 1.0.4

# 广告SDK

```js
<script type="module">
    import createApi from "@newbeebox/adsdk";

    // 初始化接口
    const api = createApi({
        appId: "bda2b2db-0965-4e1a-9ecb-860248f28c9e",
        secret: "d0b20976fe32ab45143ab1b8d10b4aed",
    });

    (async () => {
    // 获取广告
    const { code, data } = await api.getAdListLoop({
        // mediaType: 1, // 指定类型：0图片 1视频 2文字（文字类型不需要指定尺寸）
        // sizeId: 4, // 指定尺寸
        // pageSize: 5, // 指定获取广告个数
    });
    console.log(data);

    // 记录访问量
    await api.visitTrace({
        adId: data.id,
        // device: "", 有用户id等唯一标识也可以填
    });

    // 记录点击量
    await api.ClickTrace({
        adId: data.id,
        // device: "", 有用户id等唯一标识也可以填
    });
    })();
</script>
```