Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# react-native-rive
# @rive-app/react-native

Rive React Native 2.0

Expand Down Expand Up @@ -31,7 +31,7 @@ npm install rive-app/rive-nitro-react-native react-native-nitro-modules
## Usage

```js
import { Fit, RiveView, useRiveFile } from 'react-native-rive';
import { Fit, RiveView, useRiveFile } from '@rive-app/react-native';

function App() {
const { riveFile } = useRiveFile({
Expand All @@ -56,9 +56,9 @@ function App() {

## Native SDK Version Customization

> **⚠️ Advanced Usage:** Customizing native SDK versions is intended for advanced users only. Using non-default versions may cause build-time errors, or compatibility issues. Always review and update custom versions when upgrading react-native-rive.
> **⚠️ Advanced Usage:** Customizing native SDK versions is intended for advanced users only. Using non-default versions may cause build-time errors, or compatibility issues. Always review and update custom versions when upgrading @rive-app/react-native.

By default, react-native-rive uses specific versions of the Rive native SDKs defined in the library's `package.json` (`runtimeVersions.ios` and `runtimeVersions.android`). You can customize these versions if needed.
By default, @rive-app/react-native uses specific versions of the Rive native SDKs defined in the library's `package.json` (`runtimeVersions.ios` and `runtimeVersions.android`). You can customize these versions if needed.

### Vanilla React Native

Expand Down Expand Up @@ -162,7 +162,7 @@ The following error types can occur during view operations:
You can use these error types to provide specific error handling:

```js
import { RiveView, RiveErrorType } from 'react-native-rive';
import { RiveView, RiveErrorType } from '@rive-app/react-native';

<RiveView
file={riveFile}
Expand Down Expand Up @@ -193,7 +193,7 @@ import { RiveView, RiveErrorType } from 'react-native-rive';

## Feature Support

This section provides a comprehensive overview of feature availability in `react-native-rive`, comparing it with the [previous Rive React Native runtime](https://github.com/rive-app/rive-react-native) and outlining the development roadmap.
This section provides a comprehensive overview of feature availability in `@rive-app/react-native`, comparing it with the [previous Rive React Native runtime](https://github.com/rive-app/rive-react-native) and outlining the development roadmap.

### Runtime Feature Comparison

Expand Down
2 changes: 1 addition & 1 deletion RNRive.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if !rive_ios_version
raise "Internal Error: Failed to determine Rive iOS SDK version. Please ensure package.json contains 'runtimeVersions.ios'"
end

Pod::UI.puts "react-native-rive: Rive iOS SDK #{rive_ios_version}"
Pod::UI.puts "@rive-app/react-native: Rive iOS SDK #{rive_ios_version}"

Pod::Spec.new do |s|
s.name = "RNRive"
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def getRiveAndroidVersion() {
}

def riveAndroidVersion = getRiveAndroidVersion()
println "react-native-rive: Rive Android SDK ${riveAndroidVersion}"
println "@rive-app/react-native: Rive Android SDK ${riveAndroidVersion}"

dependencies {
implementation "com.facebook.react:react-android"
Expand Down
2 changes: 1 addition & 1 deletion example/src/pages/ManyViewModels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
RiveView,
useRiveFile,
type ViewModelInstance,
} from 'react-native-rive';
} from '@rive-app/react-native';

type BindModeOption =
| 'none'
Expand Down
2 changes: 1 addition & 1 deletion example/src/pages/OutOfBandAssets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
/*Rive, */ Fit,
/*RNRiveError,*/ useRiveFile,
RiveView,
} from 'react-native-rive';
} from '@rive-app/react-native';
import { Picker } from '@react-native-picker/picker';
import { type Metadata } from '../helpers/metadata';

Expand Down
2 changes: 1 addition & 1 deletion example/src/pages/ResponsiveLayouts.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { View, Text, StyleSheet, ActivityIndicator } from 'react-native';
import { Fit, RiveView, useRiveFile } from 'react-native-rive';
import { Fit, RiveView, useRiveFile } from '@rive-app/react-native';
import { type Metadata } from '../helpers/metadata';

/**
Expand Down
2 changes: 1 addition & 1 deletion example/src/pages/RiveDataBindingExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
useRiveColor,
useRiveTrigger,
useRiveFile,
} from 'react-native-rive';
} from '@rive-app/react-native';
import { type Metadata } from '../helpers/metadata';

export default function WithRiveFile() {
Expand Down
2 changes: 1 addition & 1 deletion example/src/pages/RiveEventsExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
useRiveFile,
type RiveEvent,
RiveEventType,
} from 'react-native-rive';
} from '@rive-app/react-native';
import { type Metadata } from '../helpers/metadata';

/**
Expand Down
2 changes: 1 addition & 1 deletion example/src/pages/RiveFileLoadingExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
useRive,
useRiveFile,
type RiveFileInput,
} from 'react-native-rive';
} from '@rive-app/react-native';
import { useState, useEffect } from 'react';
import { downloadFileAsArrayBuffer } from '../helpers/fileHelpers';
import { type Metadata } from '../helpers/metadata';
Expand Down
2 changes: 1 addition & 1 deletion example/src/pages/RiveStateMachineInputsExample.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { View, Text, StyleSheet, ActivityIndicator } from 'react-native';
import { useEffect } from 'react';
import { Fit, RiveView, useRive, useRiveFile } from 'react-native-rive';
import { Fit, RiveView, useRive, useRiveFile } from '@rive-app/react-native';
import { type Metadata } from '../helpers/metadata';

/**
Expand Down
2 changes: 1 addition & 1 deletion example/src/pages/RiveTextRunExample.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { View, Text, StyleSheet, ActivityIndicator } from 'react-native';
import { useEffect } from 'react';
import { Fit, RiveView, useRive, useRiveFile } from 'react-native-rive';
import { Fit, RiveView, useRive, useRiveFile } from '@rive-app/react-native';
import { type Metadata } from '../helpers/metadata';

/**
Expand Down
2 changes: 1 addition & 1 deletion expo-example/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"paths": {
"@/*": ["./*"],
"@example/*": ["../example/src/*"],
"react-native-rive": ["../src/index"]
"@rive-app/react-native": ["../src/index"]
}
},
"include": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "react-native-rive",
"name": "@rive-app/react-native",
"version": "0.1.0",
"description": "Rive React Native",
"main": "./lib/module/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useRive.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useRef, useCallback, useState } from 'react';
import type { RiveViewRef } from 'react-native-rive';
import type { RiveViewRef } from '@rive-app/react-native';

export function useRive() {
const riveRef = useRef<RiveViewRef>(null);
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"rootDir": ".",
"paths": {
"react-native-rive": ["./src/index"]
"@rive-app/react-native": ["./src/index"]
},
"allowUnreachableCode": false,
"allowUnusedLabels": false,
Expand Down
82 changes: 41 additions & 41 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4195,6 +4195,47 @@ __metadata:
languageName: node
linkType: hard

"@rive-app/react-native@workspace:.":
version: 0.0.0-use.local
resolution: "@rive-app/react-native@workspace:."
dependencies:
"@commitlint/config-conventional": ^19.6.0
"@eslint/compat": ^1.2.7
"@eslint/eslintrc": ^3.3.0
"@eslint/js": ^9.22.0
"@react-native/babel-preset": 0.79.2
"@react-native/eslint-config": ^0.78.0
"@release-it/conventional-changelog": ^9.0.2
"@testing-library/react-hooks": ^8.0.1
"@testing-library/react-native": ^13.3.3
"@types/jest": ^29.5.5
"@types/react": ^19.0.0
"@typescript-eslint/eslint-plugin": ^8.46.4
"@typescript-eslint/parser": ^8.46.4
commitlint: ^19.6.1
del-cli: ^5.1.0
eslint: ^9.22.0
eslint-config-prettier: ^10.1.1
eslint-plugin-jest: ^29.1.0
eslint-plugin-prettier: ^5.2.3
jest: ^29.7.0
nitrogen: ^0.31.6
prettier: ^3.0.3
react: 19.0.0
react-native: 0.79.2
react-native-builder-bob: ^0.40.10
react-native-nitro-modules: ^0.31.8
react-test-renderer: 19.0.0
release-it: ^17.10.0
turbo: ^1.10.7
typescript: ^5.2.2
peerDependencies:
react: "*"
react-native: "*"
react-native-nitro-modules: ">=0.31.8"
languageName: unknown
linkType: soft

"@rtsao/scc@npm:^1.1.0":
version: 1.1.0
resolution: "@rtsao/scc@npm:1.1.0"
Expand Down Expand Up @@ -13910,47 +13951,6 @@ __metadata:
languageName: unknown
linkType: soft

"react-native-rive@workspace:.":
version: 0.0.0-use.local
resolution: "react-native-rive@workspace:."
dependencies:
"@commitlint/config-conventional": ^19.6.0
"@eslint/compat": ^1.2.7
"@eslint/eslintrc": ^3.3.0
"@eslint/js": ^9.22.0
"@react-native/babel-preset": 0.79.2
"@react-native/eslint-config": ^0.78.0
"@release-it/conventional-changelog": ^9.0.2
"@testing-library/react-hooks": ^8.0.1
"@testing-library/react-native": ^13.3.3
"@types/jest": ^29.5.5
"@types/react": ^19.0.0
"@typescript-eslint/eslint-plugin": ^8.46.4
"@typescript-eslint/parser": ^8.46.4
commitlint: ^19.6.1
del-cli: ^5.1.0
eslint: ^9.22.0
eslint-config-prettier: ^10.1.1
eslint-plugin-jest: ^29.1.0
eslint-plugin-prettier: ^5.2.3
jest: ^29.7.0
nitrogen: ^0.31.6
prettier: ^3.0.3
react: 19.0.0
react-native: 0.79.2
react-native-builder-bob: ^0.40.10
react-native-nitro-modules: ^0.31.8
react-test-renderer: 19.0.0
release-it: ^17.10.0
turbo: ^1.10.7
typescript: ^5.2.2
peerDependencies:
react: "*"
react-native: "*"
react-native-nitro-modules: ">=0.31.8"
languageName: unknown
linkType: soft

"react-native-safe-area-context@npm:^5.4.0, react-native-safe-area-context@npm:~5.6.0":
version: 5.6.2
resolution: "react-native-safe-area-context@npm:5.6.2"
Expand Down
Loading