Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest Expo version and fix project warnings associated wit… #423

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
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
5 changes: 5 additions & 0 deletions .changeset/metal-cougars-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"victory-native": patch
---

Fix warnings associated with newer versions of Reanimated
10 changes: 3 additions & 7 deletions example/app.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"expo": {
"name": "Victory",
"newArchEnabled": true,
"slug": "victory-native-xl-demo",
"version": "1.0.0",
"orientation": "portrait",
Expand All @@ -12,9 +13,7 @@
"resizeMode": "cover",
"backgroundColor": "#000000"
},
"assetBundlePatterns": [
"**/*"
],
"assetBundlePatterns": ["**/*"],
"platforms": ["android", "ios", "web"],
"ios": {
"supportsTablet": true,
Expand All @@ -25,10 +24,7 @@
"userInterfaceStyle": "automatic",
"package": "com.formidable.victorynativexldemo"
},
"plugins": [
"expo-router",
"expo-asset"
],
"plugins": ["expo-router", "expo-asset"],
"extra": {
"router": {
"origin": false
Expand Down
2 changes: 1 addition & 1 deletion example/app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Platform, StyleSheet, Text, View } from "react-native";
import { useAssets } from "expo-asset";
import { Image, type ImageSource } from "expo-image";
import { useDarkMode } from "react-native-dark";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";

const titleCaseName = (name: string) =>
name
Expand Down
4 changes: 2 additions & 2 deletions example/app/axis-configuration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import {
import { InputColor } from "example/components/InputColor";
import { InputText } from "example/components/InputText";
import inter from "../assets/inter-medium.ttf";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";
import { InfoCard } from "../components/InfoCard";
import { descriptionForRoute } from "./consts/routes";
import { descriptionForRoute } from "../consts/routes";

const parseTickValues = (tickString?: string) =>
tickString
Expand Down
4 changes: 2 additions & 2 deletions example/app/bar-chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ import {
withTiming,
} from "react-native-reanimated";
import inter from "../assets/inter-medium.ttf";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";
import { InputSwitch } from "../components/InputSwitch";
import { InputSlider } from "../components/InputSlider";
import { Button } from "../components/Button";
import { InfoCard } from "../components/InfoCard";
import { descriptionForRoute } from "./consts/routes";
import { descriptionForRoute } from "../consts/routes";
import { InputSegment } from "../components/InputSegment";
import { InputColor } from "../components/InputColor";

Expand Down
2 changes: 1 addition & 1 deletion example/app/bar-charts-custom-bars.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Bar, CartesianChart, useChartPressState } from "victory-native";
import { useDarkMode } from "react-native-dark";
import { Text } from "example/components/Text";
import inter from "../assets/inter-medium.ttf";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";

const DATA = (length: number = 10) =>
Array.from({ length }, (_, index) => ({
Expand Down
4 changes: 2 additions & 2 deletions example/app/bar-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { SafeAreaView, ScrollView, StyleSheet, View } from "react-native";
import { BarGroup, CartesianChart } from "victory-native";
import { LinearGradient, useFont, vec } from "@shopify/react-native-skia";
import { useDarkMode } from "react-native-dark";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";
import inter from "../assets/inter-medium.ttf";
import { Button } from "../components/Button";
import { InputSlider } from "../components/InputSlider";
import { InfoCard } from "../components/InfoCard";
import { descriptionForRoute } from "./consts/routes";
import { descriptionForRoute } from "../consts/routes";

const DATA = (length: number = 10) =>
Array.from({ length }, (_, index) => ({
Expand Down
4 changes: 2 additions & 2 deletions example/app/bar-with-tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import {
import { BarGroup, CartesianChart, useChartPressState } from "victory-native";
import inter from "../assets/inter-medium.ttf";
import { InfoCard } from "../components/InfoCard";
import { appColors } from "./consts/colors";
import { descriptionForRoute } from "./consts/routes";
import { appColors } from "../consts/colors";
import { descriptionForRoute } from "../consts/routes";

const DATA = Array.from({ length: 6 }, (_, index) => {
const low = Math.round(20 + 20 * Math.random());
Expand Down
2 changes: 1 addition & 1 deletion example/app/constant-line-chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
optionsReducer,
} from "example/hooks/useOptionsReducer";
import inter from "../assets/inter-medium.ttf";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";

const randomNumber = () => Math.floor(Math.random() * (50 - 25 + 1)) + 25;

Expand Down
4 changes: 2 additions & 2 deletions example/app/custom-drawing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { CartesianChart } from "victory-native";
import { useDarkMode } from "react-native-dark";
import { useState } from "react";
import inter from "../assets/inter-medium.ttf";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";
import { InputSlider } from "../components/InputSlider";
import { InputColor } from "../components/InputColor";
import { InfoCard } from "../components/InfoCard";
import { descriptionForRoute } from "./consts/routes";
import { descriptionForRoute } from "../consts/routes";

const DATA = Array.from({ length: 13 }, (_, index) => ({
day: index + 1,
Expand Down
2 changes: 1 addition & 1 deletion example/app/custom-gesture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import { Gesture } from "react-native-gesture-handler";
import { useRef } from "react";
import { InfoCard } from "example/components/InfoCard";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";
import inter from "../assets/inter-medium.ttf";

export default function CustomGestureScreen() {
Expand All @@ -21,7 +21,7 @@

const tapGesture = Gesture.Tap().onStart((e) => {
state.isActive.value = true;
ref.current?.handleTouch(state, e.x, e.y);

Check failure on line 24 in example/app/custom-gesture.tsx

View workflow job for this annotation

GitHub Actions / build

Property 'handleTouch' does not exist on type 'object'.
});
const composed = Gesture.Race(tapGesture);

Expand Down
6 changes: 3 additions & 3 deletions example/app/custom-shaders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import {
withTiming,
} from "react-native-reanimated";
import inter from "../assets/inter-medium.ttf";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";
import { InfoCard } from "../components/InfoCard";
import { descriptionForRoute } from "./consts/routes";
import { descriptionForRoute } from "../consts/routes";
import { Button } from "../components/Button";

const generateData = () =>
Expand Down Expand Up @@ -135,7 +135,7 @@ float f(vec3 p) {
return .1 - length(cos(p.xy) + sin(p.yz));
}

vec4 main(vec2 FC) {
vec4 main(vec2 FC) {
vec3 d = .5 - FC.xy1 / resH;
vec3 p=vec3(0);
for (int i = 0; i < 32; i++) {
Expand Down
4 changes: 2 additions & 2 deletions example/app/dashed-axes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import * as React from "react";
import { SafeAreaView, ScrollView, StyleSheet, View } from "react-native";
import { Area, CartesianChart, Line } from "victory-native";
import inter from "../assets/inter-medium.ttf";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";
import { InfoCard } from "../components/InfoCard";
import { descriptionForRoute } from "./consts/routes";
import { descriptionForRoute } from "../consts/routes";
import { Button } from "../components/Button";

const generateData = () =>
Expand Down
4 changes: 2 additions & 2 deletions example/app/donut-chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { LinearGradient, vec } from "@shopify/react-native-skia";
import { Pie, PolarChart } from "victory-native";
import { InfoCard } from "example/components/InfoCard";
import { Button } from "example/components/Button";
import { appColors } from "./consts/colors";
import { descriptionForRoute } from "./consts/routes";
import { appColors } from "../consts/colors";
import { descriptionForRoute } from "../consts/routes";

function calculateGradientPoints(
radius: number,
Expand Down
4 changes: 2 additions & 2 deletions example/app/guides/getting-started.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { CartesianChart, Line, useChartPressState } from "victory-native";
import { Circle, useFont } from "@shopify/react-native-skia";
import type { SharedValue } from "react-native-reanimated";
import { Button } from "example/components/Button";
import { appColors } from "../consts/colors";
import { appColors } from "../../consts/colors";
import inter from "../../assets/inter-medium.ttf";
import { urlForRoute } from "../consts/routes";
import { urlForRoute } from "../../consts/routes";

export default function GettingStartedScreen(props: { segment: string }) {
const font = useFont(inter, 12);
Expand Down
6 changes: 3 additions & 3 deletions example/app/guides/multi-press.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { CartesianChart, Line, useChartPressState } from "victory-native";
import { Circle, useFont } from "@shopify/react-native-skia";
import type { SharedValue } from "react-native-reanimated";
import { Button } from "example/components/Button";
import { appColors } from "../consts/colors";
import { appColors } from "../../consts/colors";
import inter from "../../assets/inter-medium.ttf";
import { urlForRoute } from "../consts/routes";
import { urlForRoute } from "../../consts/routes";

const initChartPressState = { x: 0, y: { highTmp: 0 } } as const;
const initChartPressState = { x: 0, y: { highTmp: 0 } };

export default function GettingStartedScreen(props: { segment: string }) {
const font = useFont(inter, 12);
Expand Down
4 changes: 2 additions & 2 deletions example/app/horizontal-bands-line.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import {
import { useEffect } from "react";
import { useDarkMode } from "react-native-dark";
import inter from "../assets/inter-medium.ttf";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";
import { InfoCard } from "../components/InfoCard";
import { AnimatedText } from "../components/AnimatedText";
import { Text } from "../components/Text";
import { descriptionForRoute } from "./consts/routes";
import { descriptionForRoute } from "../consts/routes";

interface HorizontalBandsShaderProps {
yScale: Scale;
Expand Down
6 changes: 3 additions & 3 deletions example/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import {
Linking,
} from "react-native";
import { ChartCard } from "../components/ChartCard";
import { appColors } from "./consts/colors";
import { ChartRoutes } from "./consts/routes";
import { appColors } from "../consts/colors";
import { ChartRoutes } from "../consts/routes";
import { InfoCard } from "../components/InfoCard";
import { Button } from "../components/Button";
import { VICTORY_OSS_URL } from "./consts/urls";
import { VICTORY_OSS_URL } from "../consts/urls";
import { Text } from "../components/Text";

export default function LandingPage() {
Expand Down
4 changes: 2 additions & 2 deletions example/app/line-chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import {
import { InputColor } from "example/components/InputColor";
import { InputText } from "example/components/InputText";
import inter from "../assets/inter-medium.ttf";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";
import { Button } from "../components/Button";
import { InfoCard } from "../components/InfoCard";
import { descriptionForRoute } from "./consts/routes";
import { descriptionForRoute } from "../consts/routes";

const randomNumber = () => Math.floor(Math.random() * (50 - 25 + 1)) + 25;

Expand Down
2 changes: 1 addition & 1 deletion example/app/missing-data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
useChartPressState,
} from "victory-native";
import { Circle, useFont } from "@shopify/react-native-skia";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";
import inter from "../assets/inter-medium.ttf";
import { Button } from "../components/Button";
import { InputSegment } from "../components/InputSegment";
Expand Down
2 changes: 1 addition & 1 deletion example/app/multiple-y-axes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
withTiming,
} from "react-native-reanimated";
import inter from "../assets/inter-medium.ttf";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";
import { InputSlider } from "../components/InputSlider";
import { InfoCard } from "../components/InfoCard";

Expand Down
4 changes: 2 additions & 2 deletions example/app/negative-bar-charts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { SafeAreaView, ScrollView, StyleSheet, View } from "react-native";
import { Bar, BarGroup, CartesianChart, StackedBar } from "victory-native";
import { useDarkMode } from "react-native-dark";
import inter from "../assets/inter-medium.ttf";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";
import { Button } from "../components/Button";
import { InfoCard } from "../components/InfoCard";
import { Text } from "../components/Text";
import { descriptionForRoute } from "./consts/routes";
import { descriptionForRoute } from "../consts/routes";
import { Checkbox } from "../components/Checkbox";

const STACKED_DATA = (length: number = 5) =>
Expand Down
4 changes: 2 additions & 2 deletions example/app/ordinal-data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import {
import { useEffect } from "react";
import { useDarkMode } from "react-native-dark";
import inter from "../assets/inter-medium.ttf";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";
import { InfoCard } from "../components/InfoCard";
import { AnimatedText } from "../components/AnimatedText";
import { Text } from "../components/Text";
import { descriptionForRoute } from "./consts/routes";
import { descriptionForRoute } from "../consts/routes";

const colors = [appColors.tint, "#818cf8"];

Expand Down
2 changes: 1 addition & 1 deletion example/app/pan-zoom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
useFont,
} from "@shopify/react-native-skia";
import { useState } from "react";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";
import inter from "../assets/inter-medium.ttf";

import { Button } from "../components/Button";
Expand Down
4 changes: 2 additions & 2 deletions example/app/pie-and-donut-charts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
import { Pie, PolarChart } from "victory-native";
import { InfoCard } from "example/components/InfoCard";
import { Text } from "example/components/Text";
import { appColors } from "./consts/colors";
import { descriptionForRoute } from "./consts/routes";
import { appColors } from "../consts/colors";
import { descriptionForRoute } from "../consts/routes";

function calculateGradientPoints(
radius: number,
Expand Down
6 changes: 3 additions & 3 deletions example/app/pie-chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import { Button } from "example/components/Button";
import { InputSlider } from "example/components/InputSlider";
import { InputColor } from "example/components/InputColor";
import { InputSegment } from "example/components/InputSegment";
import { appColors } from "./consts/colors";
import { descriptionForRoute } from "./consts/routes";
import { appColors } from "../consts/colors";
import { descriptionForRoute } from "../consts/routes";
import inter from "../assets/inter-medium.ttf";
import { PieChartCustomLabel } from "./pie-chart-custom-label";
import { PieChartCustomLabel } from "../components/pie-chart-custom-label";

const randomNumber = () => Math.floor(Math.random() * (50 - 25 + 1)) + 125;
function generateRandomColor(): string {
Expand Down
4 changes: 2 additions & 2 deletions example/app/scatter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import {
} from "victory-native";
import { useDarkMode } from "react-native-dark";
import inter from "../assets/inter-medium.ttf";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";
import { InputSlider } from "../components/InputSlider";
import { Button } from "../components/Button";
import { InfoCard } from "../components/InfoCard";
import { descriptionForRoute } from "./consts/routes";
import { descriptionForRoute } from "../consts/routes";
import { InputSegment } from "../components/InputSegment";

const DATA = (length: number = 10) =>
Expand Down
2 changes: 1 addition & 1 deletion example/app/scrollview-charts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Circle, useFont } from "@shopify/react-native-skia";
import type { SharedValue } from "react-native-reanimated";
import { InfoCard } from "example/components/InfoCard";
import inter from "../assets/inter-medium.ttf";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";

const DATA = Array.from({ length: 31 }, (_, i) => ({
day: i,
Expand Down
4 changes: 2 additions & 2 deletions example/app/stacked-area-complex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import { SafeAreaView, ScrollView, StyleSheet, View } from "react-native";
import { CartesianChart, StackedArea } from "victory-native";
import { Text } from "example/components/Text";
import inter from "../assets/inter-medium.ttf";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";
import { InfoCard } from "../components/InfoCard";
import { descriptionForRoute } from "./consts/routes";
import { descriptionForRoute } from "../consts/routes";
import { Button } from "../components/Button";

const generateData = () =>
Expand Down
4 changes: 2 additions & 2 deletions example/app/stacked-area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { SafeAreaView, ScrollView, StyleSheet, View } from "react-native";
import { CartesianChart, StackedArea } from "victory-native";
import { Text } from "example/components/Text";
import inter from "../assets/inter-medium.ttf";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";
import { InfoCard } from "../components/InfoCard";
import { descriptionForRoute } from "./consts/routes";
import { descriptionForRoute } from "../consts/routes";

const d = [
{ high: 5, low: 3, med: 4, month: "Jan" },
Expand Down
2 changes: 1 addition & 1 deletion example/app/stacked-bar-charts-complex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { StackedBar, CartesianChart, useChartPressState } from "victory-native";
import { useDarkMode } from "react-native-dark";
import { Text } from "example/components/Text";
import inter from "../assets/inter-medium.ttf";
import { appColors } from "./consts/colors";
import { appColors } from "../consts/colors";

const DATA = (length: number = 10) =>
Array.from({ length }, (_, index) => ({
Expand Down
Loading
Loading