mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 08:02:28 +00:00
* fix(mobile): downscale oversized clipboard images so paste no longer fails Pasting a large clipboard image (high-res screenshot or photo) failed with 'Image too large to paste' because the re-encoded PNG exceeded the 24 MiB base64 upload cap, with nothing shrinking it first. Now an oversized image is downscaled to fit the budget before upload: - computeMobileClipboardImageDownscale() picks target dimensions by area (~sqrt(budget/actual)), with a bounded retry loop since PNG size is nonlinear. - prepareMobileClipboardImageBase64() drives the loop with an injected resizer, so the byte/dimension logic is unit-tested without native modules. - The resizer stages the image to a temp file and hands ImageManipulator a file:// URI; the iOS native loader (Data(contentsOf:)) cannot decode large base64 data URIs, so a data URI made renderAsync throw. Adds expo-image-manipulator and expo-file-system. * fix(mobile): fail fast when resized clipboard image has no base64 Empty base64 from saveAsync would pass the downstream base64 check and upload a corrupt image; throw instead so the paste surfaces an error. Addresses CodeRabbit review on #5601. * Fix mobile clipboard image resize cleanup Co-authored-by: Orca <help@stably.ai> --------- Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com> Co-authored-by: Orca <help@stably.ai>
71 lines
2.1 KiB
JSON
71 lines
2.1 KiB
JSON
{
|
|
"name": "orca-mobile",
|
|
"version": "0.0.1",
|
|
"private": true,
|
|
"main": "expo-router/entry",
|
|
"scripts": {
|
|
"start": "expo start",
|
|
"android": "expo run:android",
|
|
"ios": "expo run:ios",
|
|
"test": "vitest run",
|
|
"lint": "oxlint",
|
|
"format": "oxfmt --write .",
|
|
"format:check": "oxfmt --check .",
|
|
"mock-server": "npx tsx scripts/mock-server.ts",
|
|
"repro:workspace-picker-lag": "npx tsx scripts/repro-workspace-picker-lag.ts"
|
|
},
|
|
"dependencies": {
|
|
"@orca/expo-two-way-audio": "file:./packages/expo-two-way-audio",
|
|
"@react-native-async-storage/async-storage": "^2.2.0",
|
|
"buffer": "^6.0.3",
|
|
"expo": "^55.0.23",
|
|
"expo-build-properties": "^55.0.13",
|
|
"expo-camera": "^55.0.18",
|
|
"expo-clipboard": "^55.0.13",
|
|
"expo-constants": "^55.0.16",
|
|
"expo-crypto": "^55.0.14",
|
|
"expo-dev-client": "~55.0.35",
|
|
"expo-document-picker": "^55.0.13",
|
|
"expo-file-system": "55.0.19",
|
|
"expo-haptics": "^55.0.14",
|
|
"expo-image-manipulator": "^55.0.17",
|
|
"expo-image-picker": "^55.0.20",
|
|
"expo-linking": "^55.0.15",
|
|
"expo-modules-core": "~55.0.25",
|
|
"expo-network": "~55.0.14",
|
|
"expo-notifications": "^55.0.22",
|
|
"expo-router": "^55.0.14",
|
|
"expo-secure-store": "^55.0.13",
|
|
"expo-splash-screen": "^55.0.20",
|
|
"expo-status-bar": "^55.0.6",
|
|
"lowlight": "^3.3.0",
|
|
"lucide-react-native": "^1.14.0",
|
|
"react": "^19.2.6",
|
|
"react-dom": "19.2.6",
|
|
"react-native": "^0.83.9",
|
|
"react-native-gesture-handler": "^2.31.2",
|
|
"react-native-reanimated": "^4.3.0",
|
|
"react-native-safe-area-context": "^5.7.0",
|
|
"react-native-screens": "^4.24.0",
|
|
"react-native-svg": "^15.15.4",
|
|
"react-native-web": "^0.21.2",
|
|
"react-native-webview": "^13.16.1",
|
|
"react-native-worklets": "^0.8.3",
|
|
"tweetnacl": "^1.0.3",
|
|
"ws": "^8.20.1",
|
|
"zod": "~4.4.3",
|
|
"zustand": "^5.0.13"
|
|
},
|
|
"devDependencies": {
|
|
"@types/react": "^19.2.14",
|
|
"@types/react-native": "^0.73.0",
|
|
"@types/ws": "^8.18.1",
|
|
"expo-module-scripts": "^55.0.2",
|
|
"oxfmt": "^0.52.0",
|
|
"oxlint": "^1.67.0",
|
|
"tsx": "^4.21.0",
|
|
"typescript": "^5.9.3",
|
|
"vitest": "^4.1.5"
|
|
}
|
|
}
|