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
2 changes: 1 addition & 1 deletion apps/expo/app/(app)/(tabs)/(home)/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use client';

import { assertIsString } from '@packrat/guards';
import type { LargeTitleSearchBarMethods, ListDataItem } from '@packrat/ui/nativewindui';
import {
LargeTitleHeader,
Expand Down Expand Up @@ -33,7 +34,6 @@ import { cn } from 'expo-app/lib/cn';
import { useColorScheme } from 'expo-app/lib/hooks/useColorScheme';
import { useTranslation } from 'expo-app/lib/hooks/useTranslation';
import { asNonNullableRef } from 'expo-app/lib/utils/asNonNullableRef';
import { assertIsString } from 'expo-app/utils/typeAssertions';
import { Link } from 'expo-router';
import { useMemo, useRef, useState } from 'react';
import { FlatList, Platform, Pressable, Text, View } from 'react-native';
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/app/(app)/gear-inventory.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { assertDefined } from '@packrat/guards';
import { LargeTitleHeader, Text } from '@packrat/ui/nativewindui';
import { PackItemCard } from 'expo-app/features/packs/components/PackItemCard';
import { useUserPackItems } from 'expo-app/features/packs/hooks/useUserPackItems';
import type { PackItem } from 'expo-app/features/packs/types';
import { cn } from 'expo-app/lib/cn';
import { useTranslation } from 'expo-app/lib/hooks/useTranslation';
import { assertDefined } from 'expo-app/utils/typeAssertions';
import { useState } from 'react';
import { Pressable, ScrollView, View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/app/(app)/messages/chat.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { assertDefined } from '@packrat/guards';
import type { ContextMenuMethods } from '@packrat/ui/nativewindui';
import {
Avatar,
Expand All @@ -11,7 +12,6 @@ import { Icon } from '@roninoss/icons';
import { FlashList } from '@shopify/flash-list';
import { cn } from 'expo-app/lib/cn';
import { useColorScheme } from 'expo-app/lib/hooks/useColorScheme';
import { assertDefined } from 'expo-app/utils/typeAssertions';
import { BlurView } from 'expo-blur';
import { router, Stack } from 'expo-router';
import * as React from 'react';
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/app/(app)/messages/conversations.android.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { assertDefined } from '@packrat/guards';
import {
AdaptiveSearchHeader,
Avatar,
Expand All @@ -18,7 +19,6 @@ import { Portal } from '@rn-primitives/portal';
import { Icon } from '@roninoss/icons';
import { cn } from 'expo-app/lib/cn';
import { useColorScheme } from 'expo-app/lib/hooks/useColorScheme';
import { assertDefined } from 'expo-app/utils/typeAssertions';
import * as Haptics from 'expo-haptics';
import { router } from 'expo-router';
import * as React from 'react';
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/app/(app)/messages/conversations.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { assertDefined } from '@packrat/guards';
import {
Avatar,
AvatarFallback,
Expand All @@ -17,7 +18,6 @@ import {
import { Icon } from '@roninoss/icons';
import { cn } from 'expo-app/lib/cn';
import { useColorScheme } from 'expo-app/lib/hooks/useColorScheme';
import { assertDefined } from 'expo-app/utils/typeAssertions';
import * as Haptics from 'expo-haptics';
import { router } from 'expo-router';
import * as React from 'react';
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/app/(app)/season-suggestions.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { assertDefined } from '@packrat/guards';
import { Button, LargeTitleHeader, Text, useColorScheme } from '@packrat/ui/nativewindui';
import { Icon } from '@roninoss/icons';
import { useCreatePackWithItems } from 'expo-app/features/packs/hooks/useCreatePackWithItems';
Expand All @@ -8,7 +9,6 @@ import {
import { LocationPicker } from 'expo-app/features/weather/components';
import type { WeatherLocation } from 'expo-app/features/weather/types';
import { useTranslation } from 'expo-app/lib/hooks/useTranslation';
import { assertDefined } from 'expo-app/utils/typeAssertions';
import { useRouter } from 'expo-router';
import { useState } from 'react';
import { ActivityIndicator, ScrollView, View } from 'react-native';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { assertDefined } from '@packrat/guards';
import { Button, Text } from '@packrat/ui/nativewindui';
import { Icon } from '@roninoss/icons';
import { useQueryClient } from '@tanstack/react-query';
Expand All @@ -7,7 +8,6 @@ import { useColorScheme } from 'expo-app/lib/hooks/useColorScheme';
import { useTranslation } from 'expo-app/lib/hooks/useTranslation';
import { ErrorScreen } from 'expo-app/screens/ErrorScreen';
import type { WeightUnit } from 'expo-app/types';
import { assertDefined } from 'expo-app/utils/typeAssertions';
import { useLocalSearchParams, useRouter } from 'expo-router';
import { useEffect, useState } from 'react';
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useActionSheet } from '@expo/react-native-action-sheet';
import { assertNonNull } from '@packrat/guards';
import { ActivityIndicator, Button, Text } from '@packrat/ui/nativewindui';
import { Icon } from '@roninoss/icons';
import * as Burnt from 'burnt';
Expand All @@ -9,7 +10,6 @@ import { useImageDetection } from 'expo-app/features/packs/hooks/useImageDetecti
import { type SelectedImage, useImagePicker } from 'expo-app/features/packs/hooks/useImagePicker';
import { useColorScheme } from 'expo-app/lib/hooks/useColorScheme';
import { useTranslation } from 'expo-app/lib/hooks/useTranslation';
import { assertNonNull } from 'expo-app/utils/typeAssertions';
import { Stack, useLocalSearchParams, useRouter } from 'expo-router';
import { useCallback, useEffect, useState } from 'react';
import { Image, ScrollView, View } from 'react-native';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { assertDefined } from '@packrat/guards';
import { Button, Text, useColorScheme } from '@packrat/ui/nativewindui';
import { Icon } from '@roninoss/icons';
import { Chip } from 'expo-app/components/initial/Chip';
Expand All @@ -13,7 +14,6 @@ import {
isWorn,
shouldShowQuantity,
} from 'expo-app/lib/utils/itemCalculations';
import { assertDefined } from 'expo-app/utils/typeAssertions';
import { router, useLocalSearchParams } from 'expo-router';
import { ScrollView, View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { assertDefined } from '@packrat/guards';
import { Alert, Button, useColorScheme } from '@packrat-ai/nativewindui';
import { Icon } from '@roninoss/icons';
import { useTranslation } from 'expo-app/lib/hooks/useTranslation';
import { t } from 'expo-app/lib/i18n';
import { assertDefined } from 'expo-app/utils/typeAssertions';
import { useRouter } from 'expo-router';
import { View } from 'react-native';
import { useDeletePackTemplateItem, usePackTemplateItem } from '../hooks';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { assertDefined } from '@packrat/guards';
import { ActivityIndicator, Button, cn, Text } from '@packrat/ui/nativewindui';
import { Icon } from '@roninoss/icons';
import type { CatalogItem } from 'expo-app/features/catalog/types';
import { useColorScheme } from 'expo-app/lib/hooks/useColorScheme';
import { assertDefined } from 'expo-app/utils/typeAssertions';
import { useState } from 'react';
import { Modal, ScrollView, TouchableOpacity, View } from 'react-native';
import type { GapAnalysisItem } from '../hooks/usePackGapAnalysis';
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/features/packs/components/PackItemCard.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useActionSheet } from '@expo/react-native-action-sheet';
import { assertDefined } from '@packrat/guards';
import { Text } from '@packrat/ui/nativewindui';
import { Icon } from '@roninoss/icons';
import { cn } from 'expo-app/lib/cn';
import { useColorScheme } from 'expo-app/lib/hooks/useColorScheme';
import { assertDefined } from 'expo-app/utils/typeAssertions';
import { useRouter } from 'expo-router';
import { Alert, Pressable, TouchableWithoutFeedback, View } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/features/packs/hooks/useImagePicker.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertDefined } from '@packrat/guards';
import ImageCacheManager from 'expo-app/lib/utils/ImageCacheManager';
import { assertDefined } from 'expo-app/utils/typeAssertions';
import * as ImagePicker from 'expo-image-picker';
import { nanoid } from 'nanoid/non-secure';
import { useState } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/features/packs/hooks/usePackWeightHistory.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { use$ } from '@legendapp/state/react';
import { assertDefined } from 'expo-app/utils/typeAssertions';
import { assertDefined } from '@packrat/guards';
import { packWeigthHistoryStore } from '../store/packWeightHistory';
import type { PackWeightHistoryEntry } from '../types';

Expand Down
2 changes: 1 addition & 1 deletion apps/expo/features/packs/screens/EditPackScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { assertDefined } from '@packrat/guards';
import { usePackDetailsFromStore } from 'expo-app/features/packs';
import { PackForm } from 'expo-app/features/packs/components/PackForm';
import { assertDefined } from 'expo-app/utils/typeAssertions';
import { useLocalSearchParams } from 'expo-router';

export function EditPackScreen() {
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/features/packs/screens/ItemsScanScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useActionSheet } from '@expo/react-native-action-sheet';
import { assertNonNull } from '@packrat/guards';
import { ActivityIndicator, Button, Text } from '@packrat/ui/nativewindui';
import { Icon } from '@roninoss/icons';
import * as Burnt from 'burnt';
Expand All @@ -7,7 +8,6 @@ import { ErrorState } from 'expo-app/components/ErrorState';
import { type SelectedImage, useImagePicker } from 'expo-app/features/packs/hooks/useImagePicker';
import { useColorScheme } from 'expo-app/lib/hooks/useColorScheme';
import { useTranslation } from 'expo-app/lib/hooks/useTranslation';
import { assertNonNull } from 'expo-app/utils/typeAssertions';
import { Stack, useLocalSearchParams, useRouter } from 'expo-router';
import { useCallback, useEffect, useState } from 'react';
import { Image, ScrollView, View } from 'react-native';
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/features/packs/utils/computeCategories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertDefined } from '@packrat/guards';
import { userStore } from 'expo-app/features/auth/store';
import { assertDefined } from 'expo-app/utils/typeAssertions';
import type { Pack } from '../types';
import { convertFromGrams } from './convertFromGrams';
import { convertToGrams } from './convertToGrams';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { assertDefined } from '@packrat/guards';
import { Alert, Button, useColorScheme } from '@packrat-ai/nativewindui';
import { Icon } from '@roninoss/icons';
import { t } from 'expo-app/lib/i18n';
import { assertDefined } from 'expo-app/utils/typeAssertions';
import { useRouter } from 'expo-router';
import { View } from 'react-native';
import {
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/features/trips/components/TripForm.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { assertDefined } from '@packrat/guards';
import { Form, FormItem, FormSection, TextField } from '@packrat/ui/nativewindui';
import DateTimePicker from '@react-native-community/datetimepicker';
import { Picker } from '@react-native-picker/picker';
Expand All @@ -7,7 +8,6 @@ import { usePacks } from 'expo-app/features/packs/hooks/usePacks';
import { useColorScheme } from 'expo-app/lib/hooks/useColorScheme';
import { useTranslation } from 'expo-app/lib/hooks/useTranslation';
import { TestIds } from 'expo-app/lib/testIds';
import { assertDefined } from 'expo-app/utils/typeAssertions';
import { Stack, useRouter } from 'expo-router';
import { useMemo, useState } from 'react';
import { Alert, Modal, Pressable, Text, View } from 'react-native';
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/features/trips/screens/EditTripScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertDefined } from '@packrat/guards';
import { useTripDetailsFromStore } from 'expo-app/features/trips/hooks/useTripDetailsFromStore';
import { assertDefined } from 'expo-app/utils/typeAssertions';
import { useLocalSearchParams } from 'expo-router';
import { TripForm } from '../components/TripForm';

Expand Down
2 changes: 1 addition & 1 deletion apps/expo/features/trips/screens/TripDetailScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { assertDefined } from '@packrat/guards';
import { ActivityIndicator, Button, Card, Text } from '@packrat/ui/nativewindui';
import { Icon } from '@roninoss/icons';
import { appAlert } from 'expo-app/app/_layout';
import { useLocations } from 'expo-app/features/weather/hooks';
import { useColorScheme } from 'expo-app/lib/hooks/useColorScheme';
import { useTranslation } from 'expo-app/lib/hooks/useTranslation';
import { assertDefined } from 'expo-app/utils/typeAssertions';
import { useLocalSearchParams, useRouter } from 'expo-router';
import { ScrollView, Share, View } from 'react-native';
import MapView, { Marker, PROVIDER_GOOGLE } from 'react-native-maps';
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/features/weather/components/LocationPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { assertNonNull } from '@packrat/guards';
import { Button, Text } from '@packrat/ui/nativewindui';
import { Icon } from '@roninoss/icons';
import { cn } from 'expo-app/lib/cn';
import { useColorScheme } from 'expo-app/lib/hooks/useColorScheme';
import { useTranslation } from 'expo-app/lib/hooks/useTranslation';
import { assertNonNull } from 'expo-app/utils/typeAssertions';
import { useRouter } from 'expo-router';
import { useState } from 'react';
import { Modal, Pressable, ScrollView, TouchableOpacity, View } from 'react-native';
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/features/weather/lib/weatherService.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { assertDefined } from '@packrat/guards';
import type {
LocationSearchResult,
WeatherApiForecastResponse,
} from 'expo-app/features/weather/types';
import axiosInstance, { handleApiError } from 'expo-app/lib/api/client';
import { assertDefined } from 'expo-app/utils/typeAssertions';
import { getWeatherIconName as getIconNameFromCode } from './weatherIcons';

/**
Expand Down
1 change: 1 addition & 0 deletions apps/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"@expo/vector-icons": "^15.0.3",
"@gorhom/bottom-sheet": "^5.1.2",
"@legendapp/state": "^3.0.0-beta.30",
"@packrat/guards": "workspace:*",
"@react-native-ai/apple": "~0.10.0",
"@react-native-ai/llama": "~0.10.0",
"@react-native-async-storage/async-storage": "2.2.0",
Expand Down
43 changes: 0 additions & 43 deletions apps/expo/utils/__tests__/typeAssertions.test.ts

This file was deleted.

13 changes: 0 additions & 13 deletions apps/expo/utils/typeAssertions.ts

This file was deleted.

Loading
Loading