Files
xiaomakuaiz 7c943b1994 fix(mobile): address review findings for math rendering and stream lifecycle
Review-driven batch on top of the math feature:

- Ask-card custom answer: scroll the card above the keyboard on input
  focus (inverted-list scrollToIndex, viewPosition 0).
- Inline math boundaries: closing-$ guard switched to a negated class so
  bold-wrapped/operator-adjacent formulas (**$E=mc^2$**, $a$-$b$) and
  han-adjacent Chinese phrasing render; CJK/full-width punctuation
  excluded from $-content to kill currency false positives.
- Clamp MathJax output size (rule-bomb guard), reject empty $$ blocks,
  clamp throttle elapsed against clock steps, and gate O(n^2) slicing in
  the inline tokenizer behind a first-char check.
- Streaming perf: stable body root key + content-hash node keys keep
  top-level formulas mounted across re-parses; TeX->SVG and parsed-AST
  LRU caches; memoized markdown style object.
- Android: scale inline formulas into the fixed line box and drop the
  baseline shift (CustomLineHeightSpan overlaps oversized inline views).
- handleSend snapshots the disconnect() return so throttled tail chunks
  are archived; effect cleanup also disconnects the newRound client;
  failPendingToolCalls replaces message objects so memoized tool cards
  observe the status flip.
- Swap @babel/plugin-transform-dynamic-import to the ^7 line (the ^8
  line is Babel-8/ESM-only and breaks installs and jest on older Node).
2026-08-30 17:52:36 +08:00

93 lines
2.7 KiB
JSON

{
"name": "monkeycode-mobile-expo",
"version": "1.0.0",
"description": "MonkeyCode 移动端(Expo / React Native 原生重构)",
"main": "expo-router/entry",
"scripts": {
"start": "expo start",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"lint": "expo lint",
"test": "jest"
},
"dependencies": {
"@expo/vector-icons": "^15.0.2",
"@noble/hashes": "^1.6.1",
"@react-native-async-storage/async-storage": "2.2.0",
"@shopify/flash-list": "2.0.2",
"expo": "^55.0.27",
"expo-apple-authentication": "~55.0.14",
"expo-asset": "~55.0.17",
"expo-blur": "~55.0.15",
"expo-build-properties": "~55.0.15",
"expo-clipboard": "~55.0.14",
"expo-constants": "~55.0.16",
"expo-document-picker": "~55.0.14",
"expo-file-system": "~55.0.23",
"expo-font": "~55.0.8",
"expo-glass-effect": "~55.0.11",
"expo-image-manipulator": "~55.0.18",
"expo-image-picker": "~55.0.21",
"expo-linking": "~55.0.16",
"expo-media-library": "~55.0.18",
"expo-router": "~55.0.16",
"expo-sharing": "~55.0.21",
"expo-splash-screen": "~55.0.22",
"expo-status-bar": "~55.0.6",
"expo-system-ui": "~55.0.19",
"expo-updates": "~55.0.25",
"jest": "~29.7.0",
"mathjax-full": "^3.2.1",
"punycode": "^2.3.1",
"react": "19.2.0",
"react-dom": "19.2.0",
"react-native": "0.83.6",
"react-native-gesture-handler": "~2.30.0",
"react-native-keyboard-controller": "1.20.7",
"react-native-live-audio-stream": "^1.1.1",
"react-native-markdown-display": "^7.0.2",
"react-native-nitro-modules": "^0.35.9",
"react-native-quick-crypto": "^1.1.5",
"react-native-reanimated": "4.2.1",
"react-native-safe-area-context": "~5.6.2",
"react-native-screens": "~4.23.0",
"react-native-svg": "15.15.3",
"react-native-web": "~0.21.0",
"react-native-webview": "13.16.0",
"react-native-worklets": "0.7.4",
"react-test-renderer": "19.2.0"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/plugin-transform-dynamic-import": "^7.29.7",
"@types/jest": "^29.5.14",
"@types/node": "^25.9.1",
"@types/react": "~19.2.0",
"eslint": "^9.0.0",
"eslint-config-expo": "~55.0.1",
"typescript": "~5.9.2"
},
"private": true,
"expo": {
"doctor": {
"reactNativeDirectoryCheck": {
"exclude": [
"react-native-markdown-display",
"@noble/hashes"
],
"listUnknownPackages": false
}
}
},
"jest": {
"testEnvironment": "node",
"transform": {
"^.+\\.[jt]sx?$": "babel-jest"
},
"moduleNameMapper": {
"^@/(.*)$": "<rootDir>/src/$1"
}
}
}