Skip to content
This repository was archived by the owner on Apr 7, 2024. It is now read-only.
Open
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
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ babel.config.js
babel.config.cjs.js
babel.config.esm.js
metro.config.js
tailwind.config.js
release.config.js
jest.config.js
jest.setup.js
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Global rule:
* @MatiPl01 @kacperklusek
1 change: 1 addition & 0 deletions .github/workflows/check_pr_title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ permissions: write-all
jobs:
validate_pr_title:
name: Validate PR title
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) [2023] [Mateusz Łopaciński]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
128 changes: 127 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,129 @@
<a name="readme-top"></a>

<!-- PROJECT LOGO AND TITLE -->
<div align="center">
<img src="docs/images/logo-banner.png" width="800" />

# React Native Smart Graph

[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
### Dynamic Graph Visualization for React Native

#### Effortlessly create and interact with graph structures in your apps

![npm](https://img.shields.io/npm/dw/react-native-smart-graph?color=ffd53e)
![GitHub issues](https://img.shields.io/github/issues/MatiPl01/react-native-smart-graph?color=ffd53e)
![GitHub contributors](https://img.shields.io/github/contributors/MatiPl01/react-native-smart-graph?color=ffd53e)
![GitHub Release Date](https://img.shields.io/github/release-date/MatiPl01/react-native-smart-graph?color=ffd53e)
![GitHub](https://img.shields.io/github/license/MatiPl01/react-native-smart-graph?color=ffd53e)

![GitHub forks](https://img.shields.io/github/forks/MatiPl01/react-native-smart-graph?style=social)
![GitHub Repo stars](https://img.shields.io/github/stars/MatiPl01/react-native-smart-graph?style=social)
![GitHub watchers](https://img.shields.io/github/watchers/MatiPl01/react-native-smart-graph?style=social)

</div>

<!-- TABLE OF CONTENTS -->
<h3>
<details>
<summary>
Table of Contents
</summary>
<h5>
<ol>
<li>
<p>
<a href="#getting-started">Getting Started</a>
</p>
<ul>
<li><a href="#prerequisites">Prerequisites</a></li>
<li><a href="#installation">Installation</a></li>
</ul>
</li>
<li>
<p>
<a href="#usage">Usage</a>
<ul>
<li><a href="#basic-usage">Basic usage</a></li>
<li><a href="#graph-models">Graph models</a></li>
<li><a href="#graph-components">Graph components</a></li>
<li><a href="#custom-renderers">Creating custom renderers</a></li>
<li><a href="#animations">Creating graph animations</a></li>
</ul>
</p>
</li>
</ol>
</h5>
</details>
</h3>

<!-- GETTING STARTED -->
<h2 id="getting-started">⚙ Getting Started</h2>

### Prerequisites

#### Peer dependencies installation

This library uses a few external libraries that you should install before installing the library. You will need these libraries to build custom graph components, create custom animations or handle events.

Run one of the following commands, depending on your package manager:

- yarn

```sh
yarn add @shopify/react-native-skia react-native-reanimated react-native-gesture-handler react-native-svg
```

- npm

```sh
npm i @shopify/react-native-skia react-native-reanimated react-native-gesture-handler react-native-svg
```

#### Adding Reanimated Babel plugin

You will also need to add the `'react-native-reanimated/plugin'` Babel plugin to make Reanimated. Your `babel.config.js` should look like this after change:

```js
module.exports = {
presets: ...,
plugins: [
...
'react-native-reanimated/plugin'
]
]
};
```

#### Pods installation (iOS only)

Before running the app on the iOS device, you will have to take one more step and install required Pods:

```sh
npx pod-install ios
```

<p align="right">(<a href="#readme-top">back to top</a>)</p>

### Installation

In order to install the library, you will need to run one of the following commands, depending on the package manager you use in your project. All required dependencies will be automatically installed.

- yarn

```sh
yarn add react-native-smart-graph
```

- npm

```sh
npm i react-native-smart-graph
```

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- BASIC USAGE -->
<!-- TODO -->
<h2 id="basic-usage">🤹 Basic Usage</h2>

<p align="right">(<a href="#readme-top">back to top</a>)</p>
Binary file added docs/images/logo-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-native-smart-graph",
"description": "React Native library for creating animated dynamic graphs",
"version": "0.0.0-development",
"version": "0.0.5-development",
"author": {
"name": "Mateusz Łopaciński",
"email": "lop.mateusz.2001@gmail.com"
Expand Down Expand Up @@ -63,6 +63,19 @@
"files": [
"dist"
],
"homepage": "https://github.com/MatiPl01/react-native-smart-graph#readme",
"keywords": [
"graph",
"react-native",
"react-native-animated-dynamic-graph",
"react-native-animated-graph",
"react-native-animated-smart-graph",
"react-native-dynamic-graph",
"react-native-graph",
"react-native-smart-graph",
"smart-graph"
],
"license": "MIT",
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"eslint --fix",
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": "@tsconfig/react-native/tsconfig.json",
"compilerOptions": {
"types": ["jest", "node"],
"module": "ESNext",
"allowUnreachableCode": false,
"allowUnusedLabels": false,
Expand Down