From c691240785d318e83c488b92599cb93190cc7a49 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Thu, 19 Sep 2024 12:52:12 -0700 Subject: [PATCH] native-stack -> stack --- apps/example/package.json | 3 +- apps/example/src/App.tsx | 4 +- apps/example/src/Home.tsx | 4 +- apps/example/src/ThreeJS/List.tsx | 5 +- apps/example/src/ThreeJS/index.tsx | 4 +- yarn.lock | 97 +++++++++++++++++------------- 6 files changed, 65 insertions(+), 52 deletions(-) diff --git a/apps/example/package.json b/apps/example/package.json index b8ea34132..686dd538d 100644 --- a/apps/example/package.json +++ b/apps/example/package.json @@ -16,7 +16,7 @@ "dependencies": { "@callstack/react-native-visionos": "^0.74.0", "@react-navigation/native": "^6.1.17", - "@react-navigation/native-stack": "^6.10.0", + "@react-navigation/stack": "^6.4.0", "@react-three/fiber": "^8.17.6", "fast-text-encoding": "^1.0.6", "react": "18.2.0", @@ -25,7 +25,6 @@ "react-native-macos": "^0.74.0", "react-native-reanimated": "^3.12.1", "react-native-safe-area-context": "^4.10.7", - "react-native-screens": "^3.32.0", "react-native-wgpu": "*", "teapot": "^1.0.0", "three": "0.168.0", diff --git a/apps/example/src/App.tsx b/apps/example/src/App.tsx index 5756d274f..458128f00 100644 --- a/apps/example/src/App.tsx +++ b/apps/example/src/App.tsx @@ -1,5 +1,5 @@ import { NavigationContainer } from "@react-navigation/native"; -import { createNativeStackNavigator } from "@react-navigation/native-stack"; +import { createStackNavigator } from "@react-navigation/stack"; import { GestureHandlerRootView } from "react-native-gesture-handler"; import type { Routes } from "./Route"; @@ -30,7 +30,7 @@ import { GradientTiles } from "./GradientTiles"; import "fast-text-encoding"; window.parent = window; -const Stack = createNativeStackNavigator(); +const Stack = createStackNavigator(); function App() { const assets = useAssets(); diff --git a/apps/example/src/Home.tsx b/apps/example/src/Home.tsx index 9fd278cb0..f386d4d67 100644 --- a/apps/example/src/Home.tsx +++ b/apps/example/src/Home.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import { Platform, ScrollView, StyleSheet, Text, View } from "react-native"; import { useNavigation } from "@react-navigation/native"; import { RectButton } from "react-native-gesture-handler"; -import type { NativeStackNavigationProp } from "@react-navigation/native-stack"; +import type { StackNavigationProp } from "@react-navigation/stack"; import type { Routes } from "./Route"; @@ -112,7 +112,7 @@ const styles = StyleSheet.create({ export const Home = () => { const { navigate } = - useNavigation>(); + useNavigation>(); return ( {examples.map((thumbnail) => ( diff --git a/apps/example/src/ThreeJS/List.tsx b/apps/example/src/ThreeJS/List.tsx index 83dfe9335..85477ac69 100644 --- a/apps/example/src/ThreeJS/List.tsx +++ b/apps/example/src/ThreeJS/List.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import { ScrollView, StyleSheet, Text, View } from "react-native"; import { useNavigation } from "@react-navigation/native"; import { RectButton } from "react-native-gesture-handler"; -import type { NativeStackNavigationProp } from "@react-navigation/native-stack"; +import type { StackNavigationProp } from "@react-navigation/stack"; import type { Routes } from "./Routes"; @@ -43,8 +43,7 @@ const styles = StyleSheet.create({ }); export const List = () => { - const { navigate } = - useNavigation>(); + const { navigate } = useNavigation>(); return ( {examples.map((thumbnail) => ( diff --git a/apps/example/src/ThreeJS/index.tsx b/apps/example/src/ThreeJS/index.tsx index e239de4ce..6bf288ae8 100644 --- a/apps/example/src/ThreeJS/index.tsx +++ b/apps/example/src/ThreeJS/index.tsx @@ -1,5 +1,5 @@ import React, { useEffect } from "react"; -import { createNativeStackNavigator } from "@react-navigation/native-stack"; +import { createStackNavigator } from "@react-navigation/stack"; import { warnIfNotHardwareAccelerated } from "react-native-wgpu"; import { Cube } from "./Cube"; @@ -10,7 +10,7 @@ import { Backdrop } from "./Backdrop"; import { InstancedMesh } from "./InstancedMesh"; import { Fiber } from "./Fiber"; -const Stack = createNativeStackNavigator(); +const Stack = createStackNavigator(); export const ThreeJS = () => { useEffect(() => { navigator.gpu.requestAdapter().then((adapter) => { diff --git a/yarn.lock b/yarn.lock index bbf9a92dc..e2318b57f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3144,22 +3144,6 @@ __metadata: languageName: node linkType: hard -"@react-navigation/native-stack@npm:^6.10.0": - version: 6.11.0 - resolution: "@react-navigation/native-stack@npm:6.11.0" - dependencies: - "@react-navigation/elements": ^1.3.31 - warn-once: ^0.1.0 - peerDependencies: - "@react-navigation/native": ^6.0.0 - react: "*" - react-native: "*" - react-native-safe-area-context: ">= 3.0.0" - react-native-screens: ">= 3.0.0" - checksum: d3dd57c216f5dbe53636bdb9aa48fe27831640f868cf5c68731943a49b68cb457d81182e7868f3e3033da0564e9f193f1b06b69085b8bc5b04ccfbe12ea2bbc0 - languageName: node - linkType: hard - "@react-navigation/native@npm:^6.1.17": version: 6.1.18 resolution: "@react-navigation/native@npm:6.1.18" @@ -3184,6 +3168,24 @@ __metadata: languageName: node linkType: hard +"@react-navigation/stack@npm:^6.4.0": + version: 6.4.1 + resolution: "@react-navigation/stack@npm:6.4.1" + dependencies: + "@react-navigation/elements": ^1.3.31 + color: ^4.2.3 + warn-once: ^0.1.0 + peerDependencies: + "@react-navigation/native": ^6.0.0 + react: "*" + react-native: "*" + react-native-gesture-handler: ">= 1.0.0" + react-native-safe-area-context: ">= 3.0.0" + react-native-screens: ">= 3.0.0" + checksum: 09bcfb001db0f411df881da9f2551b7015c4d5259a77fcb93196de308838035d016dc4dcb654d16d9cd4cc99f09f5e48add796aa903f9a253678947c35b18199 + languageName: node + linkType: hard + "@react-three/fiber@npm:8.17.6": version: 8.17.6 resolution: "@react-three/fiber@npm:8.17.6" @@ -4274,7 +4276,7 @@ __metadata: "@react-native/metro-config": 0.74.84 "@react-native/typescript-config": 0.74.84 "@react-navigation/native": ^6.1.17 - "@react-navigation/native-stack": ^6.10.0 + "@react-navigation/stack": ^6.4.0 "@react-three/fiber": ^8.17.6 "@rnx-kit/metro-config": ^1.3.17 "@types/node": ^20.14.7 @@ -4294,7 +4296,6 @@ __metadata: react-native-macos: ^0.74.0 react-native-reanimated: ^3.12.1 react-native-safe-area-context: ^4.10.7 - react-native-screens: ^3.32.0 react-native-test-app: ^3.10.8 react-native-wgpu: "*" react-test-renderer: 18.2.0 @@ -5313,13 +5314,33 @@ __metadata: languageName: node linkType: hard -"color-name@npm:~1.1.4": +"color-name@npm:^1.0.0, color-name@npm:~1.1.4": version: 1.1.4 resolution: "color-name@npm:1.1.4" checksum: b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 languageName: node linkType: hard +"color-string@npm:^1.9.0": + version: 1.9.1 + resolution: "color-string@npm:1.9.1" + dependencies: + color-name: ^1.0.0 + simple-swizzle: ^0.2.2 + checksum: c13fe7cff7885f603f49105827d621ce87f4571d78ba28ef4a3f1a104304748f620615e6bf065ecd2145d0d9dad83a3553f52bb25ede7239d18e9f81622f1cc5 + languageName: node + linkType: hard + +"color@npm:^4.2.3": + version: 4.2.3 + resolution: "color@npm:4.2.3" + dependencies: + color-convert: ^2.0.1 + color-string: ^1.9.0 + checksum: 0579629c02c631b426780038da929cca8e8d80a40158b09811a0112a107c62e10e4aad719843b791b1e658ab4e800558f2e87ca4522c8b32349d497ecb6adeb4 + languageName: node + linkType: hard + "colorette@npm:^1.0.7": version: 1.4.0 resolution: "colorette@npm:1.4.0" @@ -7527,6 +7548,13 @@ __metadata: languageName: node linkType: hard +"is-arrayish@npm:^0.3.1": + version: 0.3.2 + resolution: "is-arrayish@npm:0.3.2" + checksum: 977e64f54d91c8f169b59afcd80ff19227e9f5c791fa28fa2e5bce355cbaf6c2c356711b734656e80c9dd4a854dd7efcf7894402f1031dfc5de5d620775b4d5f + languageName: node + linkType: hard + "is-async-function@npm:^2.0.0": version: 2.0.0 resolution: "is-async-function@npm:2.0.0" @@ -10380,15 +10408,6 @@ __metadata: languageName: node linkType: hard -"react-freeze@npm:^1.0.0": - version: 1.0.4 - resolution: "react-freeze@npm:1.0.4" - peerDependencies: - react: ">=17.0.0" - checksum: 6b4d93209dff04a1f25d9f8e0c56a9a8a80e7889e8e8267299f34449c7e41a9ab90cad24569d03dd7173b56b7496576dba68f71f1d4e5c8be72f0633023668bc - languageName: node - linkType: hard - "react-is@npm:^16.12.0 || ^17.0.0 || ^18.0.0, react-is@npm:^18.0.0, react-is@npm:^18.2.0": version: 18.3.1 resolution: "react-is@npm:18.3.1" @@ -10540,19 +10559,6 @@ __metadata: languageName: node linkType: hard -"react-native-screens@npm:^3.32.0": - version: 3.34.0 - resolution: "react-native-screens@npm:3.34.0" - dependencies: - react-freeze: ^1.0.0 - warn-once: ^0.1.0 - peerDependencies: - react: "*" - react-native: "*" - checksum: 28c1f6e556c318ffcbd79d153b9612cc8a0b8d8b70f909d3cde2fd6d0586a7c151a449e57400d8996f4ee6c3b5140c5c4f643a427e974f6dc573b2bcd8eb7356 - languageName: node - linkType: hard - "react-native-test-app@npm:^3.10.8": version: 3.10.8 resolution: "react-native-test-app@npm:3.10.8" @@ -11357,6 +11363,15 @@ __metadata: languageName: node linkType: hard +"simple-swizzle@npm:^0.2.2": + version: 0.2.2 + resolution: "simple-swizzle@npm:0.2.2" + dependencies: + is-arrayish: ^0.3.1 + checksum: a7f3f2ab5c76c4472d5c578df892e857323e452d9f392e1b5cf74b74db66e6294a1e1b8b390b519fa1b96b5b613f2a37db6cffef52c3f1f8f3c5ea64eb2d54c0 + languageName: node + linkType: hard + "sisteransi@npm:^1.0.5": version: 1.0.5 resolution: "sisteransi@npm:1.0.5"