Skip to content

Commit e91adcd

Browse files
Merge upstream develop
2 parents 67d33a8 + 7fdb9e5 commit e91adcd

24 files changed

Lines changed: 3328 additions & 3654 deletions

File tree

apps/polycentric/app.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
6464
},
6565
],
6666
'expo-font',
67+
'expo-sqlite',
6768
'expo-web-browser',
6869
[
6970
'expo-dev-client',

apps/polycentric/package.json

Lines changed: 47 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -13,71 +13,69 @@
1313
"build:web": "expo export --platform web",
1414
"test": "jest",
1515
"lint": "expo lint",
16-
"prebuild": "APP_VARIANT=dev expo prebuild --clean"
16+
"prebuild": "APP_VARIANT=dev expo prebuild --clean",
17+
"typecheck": "tsc && tsc -p tsconfig.test.json"
1718
},
1819
"dependencies": {
1920
"@codeherence/react-native-header": "^1.0.1",
20-
"@expo/dom-webview": "~55.0.6",
21-
"@expo/metro-runtime": "~55.0.11",
21+
"@expo/metro-runtime": "~57.0.3",
2222
"@expo/vector-icons": "^15.1.1",
2323
"@gorhom/bottom-sheet": "^5.2.14",
2424
"@lodev09/react-native-true-sheet": "^3.10.1",
2525
"@noble/hashes": "catalog:",
2626
"@polycentric/react-native": "workspace:*",
2727
"@react-native-async-storage/async-storage": "^2.2.0",
28-
"@react-navigation/bottom-tabs": "^7.17.2",
29-
"@react-navigation/elements": "^2.9.22",
30-
"@react-navigation/native": "^7.3.0",
3128
"@rn-primitives/dropdown-menu": "^1.4.0",
3229
"@rn-primitives/hover-card": "^1.4.0",
3330
"@rn-primitives/popover": "^1.4.0",
3431
"@rn-primitives/portal": "^1.4.0",
3532
"@rn-primitives/radio-group": "^1.4.0",
3633
"@rn-primitives/toast": "^1.4.0",
37-
"@shopify/flash-list": "^2.3.1",
34+
"@shopify/flash-list": "^2.3.2",
3835
"@types/react-native-web": "^0.19.2",
3936
"better-sqlite3": "^12.10.0",
40-
"expo": "~55.0.26",
41-
"expo-blur": "~55.0.14",
42-
"expo-build-properties": "~55.0.14",
43-
"expo-clipboard": "~55.0.13",
44-
"expo-constants": "~55.0.16",
45-
"expo-dev-client": "~55.0.35",
46-
"expo-device": "~55.0.17",
47-
"expo-document-picker": "~55.0.13",
48-
"expo-file-system": "~55.0.22",
49-
"expo-font": "~55.0.8",
50-
"expo-haptics": "~55.0.14",
51-
"expo-image": "~55.0.11",
52-
"expo-image-manipulator": "~55.0.17",
53-
"expo-image-picker": "~55.0.20",
54-
"expo-linking": "~55.0.15",
55-
"expo-notifications": "~55.0.23",
56-
"expo-router": "~55.0.16",
57-
"expo-screen-orientation": "~55.0.16",
58-
"expo-server": "~55.0.11",
59-
"expo-splash-screen": "~55.0.21",
60-
"expo-sqlite": "~55.0.16",
61-
"expo-status-bar": "~55.0.6",
62-
"expo-symbols": "~55.0.9",
63-
"expo-system-ui": "~55.0.18",
64-
"expo-web-browser": "~55.0.16",
65-
"react": "19.2.7",
66-
"react-dom": "19.2.7",
67-
"react-native": "0.83.9",
37+
"expo": "~57.0.4",
38+
"expo-blur": "~57.0.0",
39+
"expo-build-properties": "~57.0.3",
40+
"expo-clipboard": "~57.0.0",
41+
"expo-constants": "~57.0.3",
42+
"expo-dev-client": "~57.0.5",
43+
"expo-device": "~57.0.0",
44+
"expo-document-picker": "~57.0.0",
45+
"expo-file-system": "~57.0.0",
46+
"expo-font": "~57.0.0",
47+
"expo-haptics": "~57.0.0",
48+
"expo-image": "~57.0.0",
49+
"expo-image-manipulator": "~57.0.2",
50+
"expo-image-picker": "~57.0.2",
51+
"expo-linking": "~57.0.2",
52+
"expo-notifications": "~57.0.3",
53+
"expo-router": "~57.0.4",
54+
"expo-screen-orientation": "~57.0.0",
55+
"expo-server": "~57.0.0",
56+
"expo-splash-screen": "~57.0.2",
57+
"expo-sqlite": "~57.0.0",
58+
"expo-status-bar": "~57.0.0",
59+
"expo-symbols": "~57.0.0",
60+
"expo-system-ui": "~57.0.0",
61+
"expo-web-browser": "~57.0.0",
62+
"react": "19.2.3",
63+
"react-dom": "19.2.3",
64+
"react-native": "0.86.0",
6865
"react-native-draggable-flatlist": "^4.0.3",
69-
"react-native-gesture-handler": "~2.30.1",
66+
"react-native-gesture-handler": "~2.32.0",
7067
"react-native-nitro-image": "^0.15.1",
7168
"react-native-nitro-modules": "^0.36.0",
7269
"react-native-qrcode-svg": "^6.3.21",
73-
"react-native-reanimated": "~4.2.3",
74-
"react-native-safe-area-context": "5.8.0",
75-
"react-native-screens": "~4.23.0",
70+
"react-native-reanimated": "~4.5.0",
71+
"react-native-safe-area-context": "5.7.0",
72+
"react-native-screens": "~4.25.2",
73+
"react-native-svg": "15.15.4",
7674
"react-native-toast-message": "^2.3.3",
7775
"react-native-vision-camera": "^5.0.0",
7876
"react-native-web": "~0.21.2",
7977
"react-native-webview": "13.16.1",
80-
"react-native-worklets": "0.7.2",
78+
"react-native-worklets": "0.10.0",
8179
"rn-emoji-picker": "^1.1.6",
8280
"zustand": "^5.0.14"
8381
},
@@ -88,12 +86,17 @@
8886
"@types/react": "~19.2.17",
8987
"@types/react-test-renderer": "^19.1.0",
9088
"eslint": "^10.0.0",
91-
"eslint-config-expo": "~55.0.1",
89+
"eslint-config-expo": "~57.0.0",
9290
"jest": "^29.7.0",
93-
"jest-expo": "~55.0.18",
91+
"jest-expo": "~57.0.1",
9492
"only-allow": "^1.2.2",
9593
"prettier": "^3.8.4",
96-
"react-test-renderer": "19.2.7",
97-
"typescript": "catalog:"
94+
"react-test-renderer": "19.2.3",
95+
"typescript": "~6.0.3"
96+
},
97+
"expo": {
98+
"install": {
99+
"exclude": ["@shopify/flash-list"]
100+
}
98101
}
99102
}

apps/polycentric/src/common/components/primitives/IconButton.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,11 @@ const styles = StyleSheet.create({
138138
overflow: 'hidden',
139139
},
140140
surface: {
141-
...StyleSheet.absoluteFillObject,
141+
position: 'absolute',
142+
top: 0,
143+
right: 0,
144+
bottom: 0,
145+
left: 0,
142146
alignItems: 'center',
143147
justifyContent: 'center',
144148
},

apps/polycentric/src/common/components/sheet/Sheet.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
} from '@/src/common/theme';
88
import { isWeb } from '@/src/common/util/platform';
99
import { TrueSheet, type SheetDetent } from '@lodev09/react-native-true-sheet';
10-
import type { NavigationProp, ParamListBase } from '@react-navigation/native';
1110
import { Portal } from '@rn-primitives/portal';
1211
import { router, useNavigation } from 'expo-router';
1312
import {
@@ -59,7 +58,7 @@ export type SheetProps =
5958

6059
export function Sheet(props: SheetProps) {
6160
const portalId = useId();
62-
const navigation = useNavigation<NavigationProp<ParamListBase>>();
61+
const navigation = useSheetNavigation();
6362
if (props.open === false) return null;
6463
return (
6564
<Portal name={`sheet-${portalId}`}>
@@ -159,8 +158,13 @@ Sheet.Header = SheetHeader;
159158
Sheet.Content = SheetContent;
160159
Sheet.Footer = SheetFooter;
161160

161+
// `ReturnType` can't see a generic hook's default type; the non-generic
162+
// wrapper pins it down without importing react-navigation's types.
163+
const useSheetNavigation = () => useNavigation();
164+
type Navigation = ReturnType<typeof useSheetNavigation>;
165+
162166
type WithNavigation<T> = T & {
163-
navigation: NavigationProp<ParamListBase>;
167+
navigation: Navigation;
164168
};
165169
type NativeInternalProps = WithNavigation<SheetProps>;
166170
type WebInternalProps = WithNavigation<SheetProps>;

apps/polycentric/src/common/theme/provider.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { Fonts } from '@/src/common/assets';
2-
import * as ReactNavigation from '@react-navigation/native';
32
import { useFonts } from 'expo-font';
3+
import {
4+
DefaultTheme,
5+
ThemeProvider as NavigationThemeProvider,
6+
} from 'expo-router';
47
import {
58
createContext,
69
useCallback,
@@ -65,7 +68,7 @@ export function ThemeProvider({ children }: PropsWithChildren) {
6568
return null;
6669
}
6770

68-
const navTheme: ReactNavigation.Theme = {
71+
const navTheme: typeof DefaultTheme = {
6972
dark: theme.scheme === 'dark',
7073
colors: {
7174
primary: theme.palette.primary_500,
@@ -75,14 +78,14 @@ export function ThemeProvider({ children }: PropsWithChildren) {
7578
border: theme.palette.neutral_200,
7679
notification: theme.palette.negative_500,
7780
},
78-
fonts: ReactNavigation.DefaultTheme.fonts,
81+
fonts: DefaultTheme.fonts,
7982
};
8083

8184
return (
8285
<Context.Provider value={value}>
83-
<ReactNavigation.ThemeProvider value={navTheme}>
86+
<NavigationThemeProvider value={navTheme}>
8487
{children}
85-
</ReactNavigation.ThemeProvider>
88+
</NavigationThemeProvider>
8689
</Context.Provider>
8790
);
8891
}

apps/polycentric/src/common/theme/tokens.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export const Spacing = {
1010
xl: 20,
1111
'2xl': 24,
1212
'3xl': 32,
13+
'4xl': 40,
1314
} as const;
1415

1516
export type SpacingToken = keyof typeof Spacing;
@@ -63,7 +64,7 @@ export const Breakpoints = {
6364
'2xl': 1400,
6465
} as const;
6566

66-
export const Atoms = StyleSheet.create({
67+
const atomStyles = {
6768
/**
6869
* Position
6970
*/
@@ -676,4 +677,5 @@ export const Atoms = StyleSheet.create({
676677
outlineStyle: 'none',
677678
outlineWidth: 0,
678679
} as unknown as ViewStyle,
679-
});
680+
} satisfies Record<string, ViewStyle | TextStyle>;
681+
export const Atoms = StyleSheet.create(atomStyles);

apps/polycentric/src/features/composer/ComposerFields.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,11 @@ function AttachmentThumb({
276276
Atoms.items_center,
277277
Atoms.justify_center,
278278
{
279-
...StyleSheet.absoluteFillObject,
279+
position: 'absolute',
280+
top: 0,
281+
right: 0,
282+
bottom: 0,
283+
left: 0,
280284
backgroundColor: withHexOpacity(
281285
status === 'error'
282286
? theme.palette.negative_500

apps/polycentric/tsconfig.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
"compilerOptions": {
44
"strict": true,
55
"jsx": "react-jsx",
6-
"baseUrl": ".",
6+
"types": ["node", "react-native-web"],
77
"paths": { "@/*": ["./*"] }
88
},
9-
"include": ["**/*.ts", "**/*.tsx", ".expo/types/**/*.ts", "expo-env.d.ts"]
9+
"include": ["**/*.ts", "**/*.tsx", ".expo/types/**/*.ts", "expo-env.d.ts"],
10+
// Overriding `exclude` drops the base config's list, so restate it.
11+
"exclude": ["node_modules", "android", "ios", "**/*.test.ts", "**/*.test.tsx"]
1012
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// Test files only: brings in the jest globals the app config doesn't need.
3+
"extends": "./tsconfig.json",
4+
"compilerOptions": {
5+
"types": ["jest", "node", "react-native-web"]
6+
},
7+
"include": [
8+
"**/*.test.ts",
9+
"**/*.test.tsx",
10+
"src/types/**/*.d.ts",
11+
".expo/types/**/*.ts",
12+
"expo-env.d.ts"
13+
],
14+
"exclude": ["node_modules", "android", "ios"]
15+
}

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,5 @@
2929
"lint-staged": "^17.0.7",
3030
"turbo": "^2.9.14",
3131
"typescript-eslint": "^8.46.2"
32-
},
33-
"dependencies": {
34-
"expo": "^55.0.15"
3532
}
3633
}

0 commit comments

Comments
 (0)