Skip to content

Commit 8df71bd

Browse files
committed
Renamed project to shorter notation react-native-shared-element
1 parent ed78d14 commit 8df71bd

31 files changed

+70
-83
lines changed

CHANGELOG.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
# react-native-shared-element-transition
2-
3-
Shared element transition component that runs entirely natively for fast and perfect transitions without any flickering 💫
1+
# react-native-shared-element
42

3+
Native shared element transition primitives for react-native 💫
54

65
## [0.1.0] - 2019-05-29
76

Example/android/app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ dependencies {
147147
implementation project(':@react-native-community_blur')
148148
implementation project(':react-native-photo-view')
149149
implementation project(':react-native-gesture-handler')
150-
implementation project(':react-native-shared-element-transition')
150+
implementation project(':react-native-shared-element')
151151
implementation fileTree(dir: "libs", include: ["*.jar"])
152152
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
153153
implementation "com.facebook.react:react-native:+" // From node_modules

Example/android/settings.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ include ':react-native-photo-view'
1515
project(':react-native-photo-view').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-photo-view/android')
1616
include ':react-native-gesture-handler'
1717
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
18-
include ':react-native-shared-element-transition'
19-
project(':react-native-shared-element-transition').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-shared-element-transition/android')
18+
include ':react-native-shared-element'
19+
project(':react-native-shared-element').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-shared-element/android')
2020

2121
include ':app'

Example/ios/SharedElementExample.xcodeproj/project.pbxproj

+10-10
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@
498498
ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
499499
AF4C4D22C6A44BF7A4075594 /* libRNBlur.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNBlur.a; sourceTree = "<group>"; };
500500
B7567BC3A2D2460F9A062BB3 /* Octicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Octicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Octicons.ttf"; sourceTree = "<group>"; };
501-
B8BF2A41DEAF4F9BA13200BC /* RNSharedElement.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNSharedElement.xcodeproj; path = "../node_modules/react-native-shared-element-transition/ios/RNSharedElement.xcodeproj"; sourceTree = "<group>"; };
501+
B8BF2A41DEAF4F9BA13200BC /* RNSharedElement.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNSharedElement.xcodeproj; path = "../node_modules/react-native-shared-element/ios/RNSharedElement.xcodeproj"; sourceTree = "<group>"; };
502502
BA24A214F56E43D58E8007F2 /* RNGestureHandler.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNGestureHandler.xcodeproj; path = "../node_modules/react-native-gesture-handler/ios/RNGestureHandler.xcodeproj"; sourceTree = "<group>"; };
503503
C2423839FC1B44FBACDFBA79 /* BVLinearGradient.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = BVLinearGradient.xcodeproj; path = "../node_modules/react-native-linear-gradient/BVLinearGradient.xcodeproj"; sourceTree = "<group>"; };
504504
DAE4955F5DAC44D4BA752463 /* RNScreens.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNScreens.xcodeproj; path = "../node_modules/react-native-screens/ios/RNScreens.xcodeproj"; sourceTree = "<group>"; };
@@ -1545,7 +1545,7 @@
15451545
);
15461546
runOnlyForDeploymentPostprocessing = 0;
15471547
shellPath = /bin/sh;
1548-
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
1548+
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
15491549
};
15501550
2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
15511551
isa = PBXShellScriptBuildPhase;
@@ -1636,7 +1636,7 @@
16361636
);
16371637
HEADER_SEARCH_PATHS = (
16381638
"$(inherited)",
1639-
"$(SRCROOT)/../node_modules/react-native-shared-element-transition/ios",
1639+
"$(SRCROOT)/../node_modules/react-native-shared-element/ios",
16401640
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
16411641
"$(SRCROOT)/../node_modules/react-native-photo-view/ios/**",
16421642
"$(SRCROOT)/../node_modules/@react-native-community/blur/ios",
@@ -1681,7 +1681,7 @@
16811681
COPY_PHASE_STRIP = NO;
16821682
HEADER_SEARCH_PATHS = (
16831683
"$(inherited)",
1684-
"$(SRCROOT)/../node_modules/react-native-shared-element-transition/ios",
1684+
"$(SRCROOT)/../node_modules/react-native-shared-element/ios",
16851685
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
16861686
"$(SRCROOT)/../node_modules/react-native-photo-view/ios/**",
16871687
"$(SRCROOT)/../node_modules/@react-native-community/blur/ios",
@@ -1728,7 +1728,7 @@
17281728
DEVELOPMENT_TEAM = 8PLAR7Y58Z;
17291729
HEADER_SEARCH_PATHS = (
17301730
"$(inherited)",
1731-
"$(SRCROOT)/../node_modules/react-native-shared-element-transition/ios",
1731+
"$(SRCROOT)/../node_modules/react-native-shared-element/ios",
17321732
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
17331733
"$(SRCROOT)/../node_modules/react-native-photo-view/ios/**",
17341734
"$(SRCROOT)/../node_modules/@react-native-community/blur/ios",
@@ -1759,7 +1759,7 @@
17591759
DEVELOPMENT_TEAM = 8PLAR7Y58Z;
17601760
HEADER_SEARCH_PATHS = (
17611761
"$(inherited)",
1762-
"$(SRCROOT)/../node_modules/react-native-shared-element-transition/ios",
1762+
"$(SRCROOT)/../node_modules/react-native-shared-element/ios",
17631763
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
17641764
"$(SRCROOT)/../node_modules/react-native-photo-view/ios/**",
17651765
"$(SRCROOT)/../node_modules/@react-native-community/blur/ios",
@@ -1796,7 +1796,7 @@
17961796
GCC_NO_COMMON_BLOCKS = YES;
17971797
HEADER_SEARCH_PATHS = (
17981798
"$(inherited)",
1799-
"$(SRCROOT)/../node_modules/react-native-shared-element-transition/ios",
1799+
"$(SRCROOT)/../node_modules/react-native-shared-element/ios",
18001800
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
18011801
"$(SRCROOT)/../node_modules/react-native-photo-view/ios/**",
18021802
"$(SRCROOT)/../node_modules/@react-native-community/blur/ios",
@@ -1849,7 +1849,7 @@
18491849
GCC_NO_COMMON_BLOCKS = YES;
18501850
HEADER_SEARCH_PATHS = (
18511851
"$(inherited)",
1852-
"$(SRCROOT)/../node_modules/react-native-shared-element-transition/ios",
1852+
"$(SRCROOT)/../node_modules/react-native-shared-element/ios",
18531853
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
18541854
"$(SRCROOT)/../node_modules/react-native-photo-view/ios/**",
18551855
"$(SRCROOT)/../node_modules/@react-native-community/blur/ios",
@@ -1901,7 +1901,7 @@
19011901
GCC_NO_COMMON_BLOCKS = YES;
19021902
HEADER_SEARCH_PATHS = (
19031903
"$(inherited)",
1904-
"$(SRCROOT)/../node_modules/react-native-shared-element-transition/ios",
1904+
"$(SRCROOT)/../node_modules/react-native-shared-element/ios",
19051905
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
19061906
"$(SRCROOT)/../node_modules/react-native-photo-view/ios/**",
19071907
"$(SRCROOT)/../node_modules/@react-native-community/blur/ios",
@@ -1953,7 +1953,7 @@
19531953
GCC_NO_COMMON_BLOCKS = YES;
19541954
HEADER_SEARCH_PATHS = (
19551955
"$(inherited)",
1956-
"$(SRCROOT)/../node_modules/react-native-shared-element-transition/ios",
1956+
"$(SRCROOT)/../node_modules/react-native-shared-element/ios",
19571957
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
19581958
"$(SRCROOT)/../node_modules/react-native-photo-view/ios/**",
19591959
"$(SRCROOT)/../node_modules/@react-native-community/blur/ios",

Example/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"react-native-linear-gradient": "^2.5.4",
2424
"react-native-photo-view": "https://github.com/tomtom94/react-native-photo-view",
2525
"react-native-screens": "1.0.0-alpha.22",
26-
"react-native-shared-element-transition": "file:.yalc/react-native-shared-element-transition",
26+
"react-native-shared-element": "file:.yalc/react-native-shared-element",
2727
"react-native-touchable-scale": "^2.0.0",
2828
"react-native-vector-icons": "^6.5.0",
2929
"react-navigation": "^3.11.0",

Example/src/components/Router.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
BackHandler,
99
Platform
1010
} from "react-native";
11-
import { SharedElementTransition } from "react-native-shared-element-transition";
11+
import { SharedElementTransition } from "react-native-shared-element";
1212
import { ScreenTransitionContext } from "./ScreenTransitionContext";
1313
import type { ScreenTransitionContextOnSharedElementsUpdatedEvent } from "./ScreenTransitionContext";
1414
import { PanGestureHandler, State } from "react-native-gesture-handler";

Example/src/components/ScreenTransition.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @flow
22
import * as React from "react";
3-
import { SharedElement } from "react-native-shared-element-transition";
4-
import type { SharedElementNode } from "react-native-shared-element-transition";
3+
import { SharedElement } from "react-native-shared-element";
4+
import type { SharedElementNode } from "react-native-shared-element";
55
import {
66
ScreenTransitionContext,
77
withScreenTransitionContext

Example/src/components/ScreenTransitionContext.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// @flow
22
import React, { createContext } from "react";
33
import { View } from "react-native";
4-
import { nodeFromRef } from "react-native-shared-element-transition";
5-
import type { SharedElementNode } from "react-native-shared-element-transition";
4+
import { nodeFromRef } from "react-native-shared-element";
5+
import type { SharedElementNode } from "react-native-shared-element";
66

77
export type ScreenTransitionContextOnSharedElementsUpdatedEvent = {
88
children: any,

Example/src/screens/ListScreen.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
Heading2,
1616
Caption
1717
} from "../components";
18-
import type { SharedElementAnimation } from "react-native-shared-element-transition";
18+
import type { SharedElementAnimation } from "react-native-shared-element";
1919
import { Heroes } from "../assets";
2020
import type { Hero } from "../types";
2121
import { fadeIn } from "../transitions";

Example/src/screens/TilesScreen.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
Heading2,
2121
Body
2222
} from "../components";
23-
import type { SharedElementAnimation } from "react-native-shared-element-transition";
23+
import type { SharedElementAnimation } from "react-native-shared-element";
2424
import { Heroes } from "../assets";
2525
import { DetailScreen } from "./DetailScreen";
2626
import type { Hero } from "../types";

Example/src/types/Test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @flow
22
import * as React from "react";
3-
import type { SharedElementAnimation } from "react-native-shared-element-transition";
3+
import type { SharedElementAnimation } from "react-native-shared-element";
44

55
export type Position =
66
| "default"

README.md

+22-11
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,42 @@
11

2-
# react-native-shared-element-transition
2+
# react-native-shared-element
33

44
Native shared element transition primitives for react-native 💫
55

66
# WORK IN PROGRESS
77

88
## Index
99

10-
- [Installation](#installation)
11-
- [Basic usage](#basic-usage)
12-
- [How it works](#how-it-works)
13-
- [API Documentation](#api-documentation)
14-
- [Example app](#example-app)
10+
- [react-native-shared-element](#react-native-shared-element)
11+
- [WORK IN PROGRESS](#work-in-progress)
12+
- [Index](#index)
13+
- [Installation](#installation)
14+
- [Basic usage](#basic-usage)
15+
- [How it works](#how-it-works)
16+
- [API Documentation](#api-documentation)
17+
- [SharedElement](#sharedelement)
18+
- [Props](#props)
19+
- [SharedElementTransition](#sharedelementtransition)
20+
- [Props](#props-1)
21+
- [Animations](#animations)
22+
- [Example app](#example-app)
23+
- [Todo](#todo)
24+
- [License](#license)
25+
- [Credits](#credits)
1526

1627

1728
## Installation
1829

19-
`yarn add react-native-shared-element-transition`
30+
`yarn add react-native-shared-element`
2031

21-
Link the native code
32+
Link the native code (TODO: Update for auto-linking)
2233

23-
`react-native link react-native-shared-element-transition`
34+
`react-native link react-native-shared-element`
2435

2536
## Basic usage
2637

2738
```js
28-
import { SharedElement, SharedElementTransition } from 'react-native-shared-element-transition';
39+
import { SharedElement, SharedElementTransition } from 'react-native-shared-element';
2940

3041

3142
// Scene 1
@@ -61,7 +72,7 @@ const position = new Animated.Value(0);
6172

6273
## How it works
6374

64-
react-native-shared-element-transition is a *"primitive"* that runs shared element transitions
75+
react-native-shared-element is a *"primitive"* that runs shared element transitions
6576
entirely native without requiring any passes over the JavaScript bridge. It works by taking in a start- and end node, which are obtained using the `<SharedElement>` component.
6677

6778
Whenever a transition between screens occurs (e.g. performed by a router/navigator), a view in

react-native-shared-element-transition.podspec RNSharedElement.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ require 'json'
33
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
44

55
Pod::Spec.new do |s|
6-
s.name = package['name']
6+
s.name = "RNSharedElement"
77
s.version = package['version']
88
s.summary = package['description']
99
s.license = package['license']
@@ -12,7 +12,7 @@ Pod::Spec.new do |s|
1212
s.homepage = package['homepage']
1313
s.platform = :ios, "9.0"
1414

15-
s.source = { :git => "https://github.com/IjzerenHein/react-native-shared-element-transition.git", :tag => "#{s.version}" }
15+
s.source = { :git => "https://github.com/IjzerenHein/react-native-shared-element.git", :tag => "v#{s.version}" }
1616
s.source_files = "ios/**/*.{h,m}"
1717

1818
s.dependency 'React'

TODO.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Probably not:
3131

3232
## Motivation
3333

34-
react-native-shared-element-transition is a *"primitive"* that runs all essential steps (measure, hide, clone, interpolate, clip, etc..) of a shared element transition natively, for the best possible results. By doing so, it solves a range of problems which are impossible or very hard to solve in just JavaScript and the react-native APIs.
34+
react-native-shared-element is a *"primitive"* that runs all essential steps (measure, hide, clone, interpolate, clip, etc..) of a shared element transition natively, for the best possible results. By doing so, it solves a range of problems which are impossible or very hard to solve in just JavaScript and the react-native APIs.
3535

3636
One of the these problems is transitioning between images with different aspect-ratios and resize-modes. Using just the react-native API you are limited to performing scale-transforms on images, which will cause stretching arfefacts when your source and target image don't have the same aspect-ratio. Also when scaling images, some blurring will occur, which is noticable depending on the size change.
3737

ios/RNSharedElementContentType.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// RNSharedElementContentType.h
3-
// react-native-shared-element-transition
3+
// react-native-shared-element
44
//
55

66
#ifndef RNSharedElementContentType_h

ios/RNSharedElementDelegate.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// RNSharedElementDelegate.h
3-
// react-native-shared-element-transition
3+
// react-native-shared-element
44
//
55

66
#ifndef RNSharedElementDelegate_h

ios/RNSharedElementNode.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// RNSharedElementNode.h
3-
// react-native-shared-element-transition
3+
// react-native-shared-element
44
//
55

66
#ifndef RNSharedElementNode_h

ios/RNSharedElementNode.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// RNSharedElementNode.m
3-
// react-native-shared-element-transition
3+
// react-native-shared-element
44
//
55

66
#import <UIKit/UIKit.h>

ios/RNSharedElementNodeManager.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// RNSharedElementNodeManager.h
3-
// react-native-shared-element-transition
3+
// react-native-shared-element
44
//
55

66
#ifndef RNSharedElementNodeManager_h

ios/RNSharedElementNodeManager.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// RCTMagicMoveCloneDataManager.m
3-
// react-native-shared-element-transition
3+
// react-native-shared-element
44
//
55

66
#import <UIKit/UIKit.h>

ios/RNSharedElementStyle.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// RNSharedElementStyle_h
3-
// react-native-shared-element-transition
3+
// react-native-shared-element
44
//
55

66
#ifndef RNSharedElementStyle_h

ios/RNSharedElementStyle.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// RNSharedElementStyle.m
3-
// react-native-shared-element-transition
3+
// react-native-shared-element
44
//
55

66
#import "RNSharedElementStyle.h"

ios/RNSharedElementTransition.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// RNSharedElementTransition.h
3-
// react-native-shared-element-transition
3+
// react-native-shared-element
44
//
55

66
#ifndef RNSharedElementTransition_h

ios/RNSharedElementTransition.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// RNSharedElementTransition.m
3-
// react-native-shared-element-transition
3+
// react-native-shared-element
44
//
55

66
#import <Foundation/Foundation.h>

ios/RNSharedElementTransition.podspec

-24
This file was deleted.

ios/RNSharedElementTransitionItem.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// RNSharedElementTransition.h
3-
// react-native-shared-element-transition
3+
// react-native-shared-element
44
//
55

66
#ifndef RNSharedElementTransitionItem_h

ios/RNSharedElementTransitionItem.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// RNSharedElementTransitionItem.m
3-
// react-native-shared-element-transition
3+
// react-native-shared-element
44
//
55

66
#import <Foundation/Foundation.h>

0 commit comments

Comments
 (0)