@vvedantb/native-ui 0.38.0 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (373) hide show
  1. package/dist/Avatar.jsx +22 -19
  2. package/dist/BottomSheetContainer.jsx +0 -6
  3. package/dist/BulkActionBar.jsx +0 -24
  4. package/dist/Button.jsx +92 -116
  5. package/dist/Card.jsx +56 -50
  6. package/dist/ColorSwatches.jsx +0 -6
  7. package/dist/Dialog.jsx +0 -12
  8. package/dist/DropdownMenu.jsx +0 -10
  9. package/dist/EmptyState.jsx +0 -3
  10. package/dist/ExpoWebRoot.jsx +0 -6
  11. package/dist/Field.jsx +0 -17
  12. package/dist/FloatingSurface.jsx +95 -80
  13. package/dist/FloatingTabBar.jsx +0 -23
  14. package/dist/IconButton.jsx +0 -1
  15. package/dist/LoadingState.jsx +0 -6
  16. package/dist/PasswordInput.jsx +0 -15
  17. package/dist/PillTabs.jsx +39 -36
  18. package/dist/SearchInput.jsx +0 -13
  19. package/dist/SectionLabel.jsx +0 -1
  20. package/dist/SharedTransition.jsx +0 -3
  21. package/dist/Skeleton.jsx +0 -2
  22. package/dist/Spinner.jsx +0 -2
  23. package/dist/StatusDot.jsx +0 -5
  24. package/dist/Switch.jsx +32 -22
  25. package/dist/Tabs.jsx +27 -26
  26. package/dist/Textarea.jsx +0 -1
  27. package/dist/ThemeToggle.jsx +0 -1
  28. package/dist/Toast.jsx +80 -91
  29. package/dist/UpdateChecker.jsx +0 -1
  30. package/dist/ai/activity-question.jsx +0 -6
  31. package/dist/ai/activity-step-label.js +0 -6
  32. package/dist/ai/activity-step-types.js +0 -4
  33. package/dist/ai/activity-tasks-utils.js +0 -17
  34. package/dist/ai/activity-timeline.js +0 -8
  35. package/dist/ai/attachments.jsx +0 -2
  36. package/dist/ai/chain-of-thought.jsx +0 -3
  37. package/dist/ai/chat-text.js +2 -3
  38. package/dist/ai/chat-thread.jsx +0 -1
  39. package/dist/ai/choice-question.jsx +0 -10
  40. package/dist/ai/code-block.jsx +0 -31
  41. package/dist/ai/collapsible.jsx +0 -14
  42. package/dist/ai/conversation-context.js +0 -3
  43. package/dist/ai/conversation.jsx +2 -48
  44. package/dist/ai/file-chip.jsx +0 -2
  45. package/dist/ai/icon-button.jsx +10 -18
  46. package/dist/ai/index.js +0 -5
  47. package/dist/ai/message-context-menu.jsx +0 -7
  48. package/dist/ai/message.jsx +0 -21
  49. package/dist/ai/prompt-input-menu.jsx +0 -3
  50. package/dist/ai/prompt-input.jsx +2 -29
  51. package/dist/ai/response-text.jsx +0 -6
  52. package/dist/ai/sources.jsx +0 -1
  53. package/dist/ai/suggestion.jsx +0 -1
  54. package/dist/ai/trace.jsx +0 -11
  55. package/dist/ai/unified-diff.jsx +0 -4
  56. package/dist/auth/AuthScreen.jsx +0 -5
  57. package/dist/auth/GoogleSignInButton.jsx +0 -3
  58. package/dist/auth/SecondFactorScreen.jsx +0 -2
  59. package/dist/auth/SignInScreen.jsx +0 -17
  60. package/dist/auth/authErrors.js +0 -4
  61. package/dist/auth/clerkCore3.js +0 -7
  62. package/dist/auth/index.js +0 -4
  63. package/dist/auth/totp.js +0 -2
  64. package/dist/brand/GoogleMark.jsx +0 -1
  65. package/dist/brand/ProviderIcon.jsx +0 -2
  66. package/dist/brand/index.js +0 -3
  67. package/dist/brand/svg.js +0 -6
  68. package/dist/configureTheme.js +0 -9
  69. package/dist/controlStyles.js +0 -14
  70. package/dist/crash/lastCrash.js +3 -24
  71. package/dist/entries/ai.js +0 -3
  72. package/dist/entries/ambient.js +0 -2
  73. package/dist/entries/app-root.js +0 -5
  74. package/dist/entries/auth.js +0 -4
  75. package/dist/entries/bottom-sheet.js +0 -2
  76. package/dist/entries/brand.js +0 -1
  77. package/dist/entries/button.js +0 -1
  78. package/dist/entries/crash.js +0 -3
  79. package/dist/entries/date-time.js +0 -2
  80. package/dist/entries/expo-router.js +0 -3
  81. package/dist/entries/expo-web-root.js +0 -2
  82. package/dist/entries/floating.js +0 -2
  83. package/dist/entries/generative-ui.js +0 -4
  84. package/dist/entries/gesture-handler.js +0 -3
  85. package/dist/entries/keyboard-controller.js +0 -3
  86. package/dist/entries/layout.js +0 -2
  87. package/dist/entries/markdown.js +0 -3
  88. package/dist/entries/marketing.js +0 -1
  89. package/dist/entries/page-title.js +0 -5
  90. package/dist/entries/password-input.js +0 -2
  91. package/dist/entries/paste-input.js +0 -3
  92. package/dist/entries/primitives.js +0 -6
  93. package/dist/entries/search-input.js +0 -2
  94. package/dist/entries/tab-bar.js +0 -2
  95. package/dist/entries/theme.js +1 -2
  96. package/dist/entries/toast.js +0 -3
  97. package/dist/entries/video.js +0 -2
  98. package/dist/entries/webview.js +0 -2
  99. package/dist/examples/AiChatGallery.jsx +0 -11
  100. package/dist/examples/ParityGallery.jsx +0 -12
  101. package/dist/floating.js +0 -8
  102. package/dist/generative-ui/GenerativeUiPanel.jsx +0 -2
  103. package/dist/generative-ui/components.jsx +0 -8
  104. package/dist/glass.js +55 -0
  105. package/dist/glassBlur.jsx +0 -12
  106. package/dist/highlight.js +0 -26
  107. package/dist/index.js +1 -2
  108. package/dist/loadingGrid.js +0 -13
  109. package/dist/markdown/Markdown.jsx +0 -59
  110. package/dist/markdown/MarkdownTable.jsx +0 -18
  111. package/dist/markdown/tableText.js +0 -5
  112. package/dist/marketing/UpgradeToProCard.jsx +0 -5
  113. package/dist/marketing/pricing.js +0 -3
  114. package/dist/media/ImageGallery.jsx +0 -16
  115. package/dist/media/imageZoom.js +0 -4
  116. package/dist/media/zoom-image-gesture.jsx +0 -8
  117. package/dist/media/zoomImage.js +0 -3
  118. package/dist/motion.js +0 -3
  119. package/dist/neutralTheme.js +0 -5
  120. package/dist/pagerSwipe.js +0 -16
  121. package/dist/palette.js +0 -10
  122. package/dist/primitives/button.jsx +0 -5
  123. package/dist/primitives/keyboard-controller.jsx +0 -27
  124. package/dist/primitives/native-only-animated-view.jsx +0 -5
  125. package/dist/primitives/overlay.jsx +0 -2
  126. package/dist/primitives/pager-gesture.jsx +3 -29
  127. package/dist/primitives/paste-input.jsx +0 -5
  128. package/dist/primitives/select.jsx +0 -8
  129. package/dist/primitives/sheet-drag.jsx +0 -3
  130. package/dist/primitives/sheet-gesture.jsx +0 -8
  131. package/dist/primitives/swipe-row-gesture.jsx +3 -45
  132. package/dist/primitives/text.jsx +0 -5
  133. package/dist/primitives/toast-drag-gesture.jsx +4 -24
  134. package/dist/primitives/web-click-guard.js +0 -3
  135. package/dist/primitives/window-layer.jsx +0 -14
  136. package/dist/push.js +0 -6
  137. package/dist/relativeTime.js +0 -13
  138. package/dist/settings/MoreFromProjectV.jsx +0 -5
  139. package/dist/settings/ThemeModePicker.jsx +0 -4
  140. package/dist/settings/projectVMobileApps.js +1 -6
  141. package/dist/sheetDrag.js +0 -10
  142. package/dist/swipeRow.js +0 -15
  143. package/dist/tabBarRoutes.js +0 -4
  144. package/dist/tabIndicator.js +0 -4
  145. package/dist/tailwind-preset.cjs +0 -54
  146. package/dist/tailwind-preset.d.cts +0 -8
  147. package/dist/theme.jsx +29 -21
  148. package/dist/themeModeStore.js +0 -5
  149. package/dist/toastChrome.js +0 -6
  150. package/dist/toastDrag.js +0 -14
  151. package/dist/toastStore.js +0 -4
  152. package/dist/updateCheck.js +0 -7
  153. package/dist/video/InlineVideo.jsx +0 -2
  154. package/dist/webview/htmlView.js +0 -5
  155. package/package.json +3 -3
  156. package/src/ArtifactList.tsx +0 -2
  157. package/src/Avatar.tsx +3 -3
  158. package/src/Badge.tsx +0 -1
  159. package/src/BottomSheetContainer.tsx +0 -11
  160. package/src/BulkActionBar.tsx +0 -66
  161. package/src/Button.tsx +4 -40
  162. package/src/CaptureButton.tsx +0 -1
  163. package/src/Card.tsx +3 -15
  164. package/src/Checkbox.tsx +0 -2
  165. package/src/ColorSwatches.tsx +0 -9
  166. package/src/ConfirmDialog.tsx +0 -7
  167. package/src/DateTimeField.tsx +0 -5
  168. package/src/Dialog.tsx +0 -27
  169. package/src/DividedList.tsx +0 -1
  170. package/src/DropdownMenu.tsx +0 -51
  171. package/src/EmptyState.tsx +0 -5
  172. package/src/ExpoWebRoot.tsx +0 -10
  173. package/src/Field.tsx +0 -14
  174. package/src/FloatingFAB.tsx +0 -3
  175. package/src/FloatingSurface.tsx +11 -8
  176. package/src/FloatingTabBar.tsx +0 -25
  177. package/src/IconButton.tsx +0 -5
  178. package/src/Input.tsx +0 -1
  179. package/src/Label.tsx +0 -1
  180. package/src/LabeledSwitchRow.tsx +0 -2
  181. package/src/ListRow.tsx +0 -12
  182. package/src/LoadingState.tsx +0 -12
  183. package/src/MenuSheet.tsx +0 -2
  184. package/src/PageIndicator.tsx +0 -2
  185. package/src/PageTitle.tsx +0 -15
  186. package/src/Pager.tsx +0 -9
  187. package/src/PasswordInput.tsx +0 -24
  188. package/src/PillTabs.tsx +3 -11
  189. package/src/PinnedBotTile.tsx +0 -6
  190. package/src/Progress.tsx +0 -3
  191. package/src/ReactionRow.tsx +0 -8
  192. package/src/ScreenContainer.tsx +0 -4
  193. package/src/SearchInput.tsx +0 -25
  194. package/src/SectionLabel.tsx +0 -2
  195. package/src/Select.tsx +0 -6
  196. package/src/Separator.tsx +0 -2
  197. package/src/SharedTransition.tsx +0 -7
  198. package/src/Sheet.tsx +0 -3
  199. package/src/SheetRow.tsx +0 -12
  200. package/src/Skeleton.tsx +0 -10
  201. package/src/Spinner.tsx +0 -6
  202. package/src/StackPageHeader.tsx +0 -16
  203. package/src/StatGrid.tsx +0 -1
  204. package/src/StatusDot.tsx +0 -6
  205. package/src/SurfaceRow.tsx +0 -12
  206. package/src/SwipeableRow.tsx +0 -4
  207. package/src/Switch.tsx +3 -4
  208. package/src/Tabs.tsx +3 -27
  209. package/src/Textarea.tsx +0 -2
  210. package/src/ThemeToggle.tsx +0 -1
  211. package/src/Toast.tsx +3 -19
  212. package/src/UpdateChecker.tsx +0 -46
  213. package/src/ai/activity-question.tsx +0 -8
  214. package/src/ai/activity-step-detail.tsx +0 -5
  215. package/src/ai/activity-step-label.ts +0 -5
  216. package/src/ai/activity-step-types.ts +0 -24
  217. package/src/ai/activity-step.tsx +0 -4
  218. package/src/ai/activity-tasks-utils.ts +0 -13
  219. package/src/ai/activity-timeline.ts +0 -6
  220. package/src/ai/attachments.tsx +0 -13
  221. package/src/ai/chain-of-thought.tsx +0 -5
  222. package/src/ai/chat-jump-rail.tsx +0 -2
  223. package/src/ai/chat-text.ts +2 -3
  224. package/src/ai/chat-thread.tsx +0 -9
  225. package/src/ai/choice-question.tsx +0 -36
  226. package/src/ai/code-block.tsx +0 -52
  227. package/src/ai/collapsible.tsx +0 -12
  228. package/src/ai/conversation-context.ts +0 -14
  229. package/src/ai/conversation.tsx +0 -58
  230. package/src/ai/file-chip.tsx +0 -1
  231. package/src/ai/icon-button.tsx +5 -22
  232. package/src/ai/index.ts +0 -5
  233. package/src/ai/message-action-sheet.tsx +0 -8
  234. package/src/ai/message-context-menu.tsx +0 -22
  235. package/src/ai/message-quote.tsx +0 -4
  236. package/src/ai/message.tsx +0 -66
  237. package/src/ai/prompt-input-menu.tsx +0 -19
  238. package/src/ai/prompt-input.tsx +1 -98
  239. package/src/ai/reasoning.tsx +0 -6
  240. package/src/ai/reply-quote-chip.tsx +0 -5
  241. package/src/ai/response-text.tsx +0 -8
  242. package/src/ai/shimmer.tsx +0 -2
  243. package/src/ai/sources.tsx +0 -3
  244. package/src/ai/subagent-cards.tsx +0 -13
  245. package/src/ai/suggestion.tsx +0 -4
  246. package/src/ai/tool-approval-card.tsx +0 -14
  247. package/src/ai/trace.tsx +0 -23
  248. package/src/ai/unified-diff.tsx +0 -16
  249. package/src/ai/use-streaming-disclosure.ts +0 -4
  250. package/src/app-root/AuthGroupGate.tsx +0 -8
  251. package/src/app-root/SsoCallbackScreen.tsx +0 -10
  252. package/src/app-root/fonts.ts +0 -2
  253. package/src/auth/AccountScreens.tsx +0 -16
  254. package/src/auth/AuthProviders.tsx +0 -13
  255. package/src/auth/AuthScreen.tsx +0 -12
  256. package/src/auth/GoogleSignInButton.tsx +0 -12
  257. package/src/auth/SecondFactorScreen.tsx +0 -16
  258. package/src/auth/SignInScreen.tsx +0 -68
  259. package/src/auth/authErrors.ts +0 -6
  260. package/src/auth/clerkCore3.ts +0 -6
  261. package/src/auth/index.ts +0 -4
  262. package/src/auth/totp.ts +0 -13
  263. package/src/brand/AppIcons.tsx +0 -6
  264. package/src/brand/AppMark.tsx +0 -5
  265. package/src/brand/AppWordmark.tsx +0 -7
  266. package/src/brand/GoogleMark.tsx +0 -4
  267. package/src/brand/ProviderIcon.tsx +0 -6
  268. package/src/brand/familyApps.ts +0 -2
  269. package/src/brand/index.ts +0 -3
  270. package/src/brand/svg.ts +0 -9
  271. package/src/configureTheme.ts +0 -10
  272. package/src/controlStyles.ts +0 -12
  273. package/src/crash/LastCrashDialog.tsx +0 -6
  274. package/src/crash/lastCrash.ts +0 -21
  275. package/src/entries/ai.ts +0 -3
  276. package/src/entries/ambient.ts +0 -2
  277. package/src/entries/app-root.ts +0 -5
  278. package/src/entries/auth.ts +0 -4
  279. package/src/entries/bottom-sheet.ts +0 -2
  280. package/src/entries/brand.ts +0 -1
  281. package/src/entries/button.ts +0 -1
  282. package/src/entries/crash.ts +0 -3
  283. package/src/entries/date-time.ts +0 -2
  284. package/src/entries/expo-router.ts +0 -3
  285. package/src/entries/expo-web-root.ts +0 -2
  286. package/src/entries/floating.ts +0 -2
  287. package/src/entries/generative-ui.ts +0 -4
  288. package/src/entries/gesture-handler.ts +0 -3
  289. package/src/entries/keyboard-controller.ts +0 -3
  290. package/src/entries/layout.ts +0 -2
  291. package/src/entries/markdown.ts +0 -3
  292. package/src/entries/marketing.ts +0 -1
  293. package/src/entries/page-title.ts +0 -5
  294. package/src/entries/password-input.ts +0 -2
  295. package/src/entries/paste-input.ts +0 -3
  296. package/src/entries/primitives.ts +0 -6
  297. package/src/entries/search-input.ts +0 -2
  298. package/src/entries/tab-bar.ts +0 -2
  299. package/src/entries/theme.ts +2 -2
  300. package/src/entries/toast.ts +0 -3
  301. package/src/entries/video.ts +0 -2
  302. package/src/entries/webview.ts +0 -2
  303. package/src/examples/AiChatGallery.tsx +0 -11
  304. package/src/examples/ParityGallery.tsx +0 -25
  305. package/src/floating.ts +0 -6
  306. package/src/generative-ui/GenerativeUiPanel.tsx +0 -15
  307. package/src/generative-ui/components.tsx +0 -9
  308. package/src/generative-ui/context.ts +0 -2
  309. package/src/glass.ts +31 -0
  310. package/src/glassBlur.tsx +0 -15
  311. package/src/highlight.ts +0 -20
  312. package/src/index.ts +2 -2
  313. package/src/loadingGrid.ts +0 -12
  314. package/src/markdown/Markdown.tsx +0 -71
  315. package/src/markdown/MarkdownTable.tsx +0 -23
  316. package/src/markdown/tableText.ts +0 -3
  317. package/src/marketing/PricingModal.tsx +0 -13
  318. package/src/marketing/UpgradeToProCard.tsx +0 -14
  319. package/src/marketing/pricing.ts +0 -12
  320. package/src/media/ImageGallery.tsx +0 -18
  321. package/src/media/MediaCard.tsx +0 -8
  322. package/src/media/imageZoom.ts +0 -4
  323. package/src/media/zoom-image-gesture.tsx +0 -9
  324. package/src/media/zoomImage.ts +0 -5
  325. package/src/motion.ts +0 -3
  326. package/src/neutralTheme.ts +0 -3
  327. package/src/pagerSwipe.ts +0 -13
  328. package/src/palette.ts +0 -10
  329. package/src/pressScale.ts +0 -7
  330. package/src/primitives/button.tsx +0 -4
  331. package/src/primitives/card.tsx +0 -1
  332. package/src/primitives/input.tsx +0 -4
  333. package/src/primitives/keyboard-controller.tsx +0 -25
  334. package/src/primitives/keyboard-parts.tsx +0 -27
  335. package/src/primitives/native-only-animated-view.tsx +0 -5
  336. package/src/primitives/overlay.tsx +0 -25
  337. package/src/primitives/pager-gesture.tsx +0 -20
  338. package/src/primitives/paste-input.tsx +0 -4
  339. package/src/primitives/paste-parts.tsx +0 -1
  340. package/src/primitives/select.tsx +0 -16
  341. package/src/primitives/sheet-drag.tsx +0 -19
  342. package/src/primitives/sheet-gesture.tsx +0 -22
  343. package/src/primitives/swipe-row-gesture.tsx +0 -33
  344. package/src/primitives/switch.tsx +0 -4
  345. package/src/primitives/text.tsx +0 -4
  346. package/src/primitives/toast-drag-gesture.tsx +0 -13
  347. package/src/primitives/web-click-guard.ts +0 -2
  348. package/src/primitives/window-layer.tsx +0 -18
  349. package/src/push.ts +0 -15
  350. package/src/relativeTime.ts +0 -21
  351. package/src/router/RouterStackPageHeader.tsx +0 -1
  352. package/src/settings/MoreFromProjectV.tsx +0 -8
  353. package/src/settings/SettingsEmptyState.tsx +0 -2
  354. package/src/settings/SettingsSection.tsx +0 -3
  355. package/src/settings/SettingsToggleRow.tsx +0 -4
  356. package/src/settings/ThemeModePicker.tsx +0 -11
  357. package/src/settings/projectVMobileApps.ts +0 -8
  358. package/src/sheetDrag.ts +0 -9
  359. package/src/swipeRow.ts +0 -23
  360. package/src/tabBarRoutes.ts +0 -13
  361. package/src/tabIndicator.ts +0 -5
  362. package/src/tailwind-preset.cjs +0 -54
  363. package/src/tailwind-preset.d.cts +0 -8
  364. package/src/theme.tsx +11 -2
  365. package/src/themeModeStore.ts +0 -9
  366. package/src/toastChrome.ts +0 -6
  367. package/src/toastDrag.ts +0 -13
  368. package/src/toastStore.ts +0 -7
  369. package/src/updateCheck.ts +0 -15
  370. package/src/video/InlineVideo.tsx +0 -5
  371. package/src/webview/HtmlView.tsx +0 -23
  372. package/src/webview/HtmlView.web.tsx +0 -1
  373. package/src/webview/htmlView.ts +0 -5
@@ -11,9 +11,6 @@ import { chatTextSize } from "./chat-text";
11
11
  import { Collapsible, CollapsibleChevron, CollapsibleContent, CollapsibleTrigger, useCollapsible } from "./collapsible";
12
12
  import { ResponseText } from "./response-text";
13
13
 
14
- // The web `ChainOfThought`, simplified: a fold of steps with search-result
15
- // chips. `ChainOfThoughtImage` and the step enter animation are not ported.
16
-
17
14
  /** Holds its open state (default closed), or takes `open` and `onOpenChange`. */
18
15
  export function ChainOfThought(t0) {
19
16
  const $ = _c(8);
@@ -1,14 +1,13 @@
1
- /** Type and copy shared by the AI chat parts. */
2
1
  import { Platform } from "react-native";
3
2
  /**
4
- * `body` is message text: `text-sm` (14 / 20), as the web `MessageContent`.
3
+ * `body` is message text: `text-base` (16 / 24), the phone body size.
5
4
  * `small` is the secondary text of triggers, trace lines and sources: also
6
5
  * `text-sm` (the web sources trigger is `text-xs`). `caption` is `text-xs`
7
6
  * (12 / 16): step descriptions, file chips and code headers. Larger text
8
7
  * steps each up, as `Textarea` does.
9
8
  */
10
9
  export function chatTextSize(kind, largerText) {
11
- if (kind === "body") return largerText ? "text-xl" : "text-sm";
10
+ if (kind === "body") return largerText ? "text-xl" : "text-base";
12
11
  if (kind === "small") return largerText ? "text-lg" : "text-sm";
13
12
  return largerText ? "text-base" : "text-xs";
14
13
  }
@@ -9,7 +9,6 @@ import { Conversation, ConversationContent, ConversationScrollButton } from "./c
9
9
  * `UIMessage` fits it, so the package takes no `ai` dependency.
10
10
  */
11
11
 
12
- /** Index of the last message with `role`, or -1. A loop, not `findLastIndex` (Hermes). */
13
12
  function lastIndexOfRole(messages, role) {
14
13
  for (let index = messages.length - 1; index >= 0; index -= 1) {
15
14
  if (messages[index].role === role) return index;
@@ -586,16 +586,12 @@ export function TopicBadge(t0) {
586
586
  }
587
587
  return t9;
588
588
  }
589
-
590
- /** The option card's `py-2 px-2.5`, which is also the slop of its press target. */
591
589
  const CARD_PADDING = {
592
590
  top: 8,
593
591
  bottom: 8,
594
592
  left: 10,
595
593
  right: 10
596
594
  };
597
-
598
- /** A whole card is at least a 44 target: the press target inside is this much less its slop. */
599
595
  const CARD_MIN_HEIGHT = 44;
600
596
 
601
597
  /** The card while pressed: the kit 3% press scale, or a dim with Reduce Motion. */
@@ -609,12 +605,6 @@ export function choicePressStyle(pressed, reduceMotion) {
609
605
  }]
610
606
  };
611
607
  }
612
-
613
- /**
614
- * One option row (web `Card` with `bg-secondary`, `py-2 px-2.5`, radius 16): a round 24 mark
615
- * (30 with larger text; letter, or a pencil for "Other"; a check on the primary fill when picked),
616
- * the label and the description. Picked: a 1-wide primary ring outside, on the accent.
617
- */
618
608
  function ChoiceRow(t0) {
619
609
  const $ = _c(99);
620
610
  const {
@@ -107,21 +107,6 @@ export function CodeBlockCopyButton(t0) {
107
107
  }
108
108
  return t9;
109
109
  }
110
- /**
111
- * Code on the flat panel at radius 16, selectable, long lines scrolling
112
- * sideways. With `prism-react-renderer` installed and a `language`, tokens
113
- * take the GitHub colours of the scheme.
114
- *
115
- * `default` is the web `CodeBlock` (`ai-elements/code-block.tsx`): `text-sm`
116
- * code in `p-4`, and a `px-3` header with the language and a copy button when
117
- * either is given. `markdown` is the web `MarkdownCodeBlock`, which `Markdown`
118
- * draws for fenced code: 13 / 20.15 code, a 32 header with `icon-xs` actions,
119
- * a wrap toggle ("Wrap long lines", foreground while on) and then copy.
120
- */
121
- /**
122
- * Android fades the code at a side with more to scroll (there is no scroll
123
- * bar), so a cut line reads as "scroll sideways". iOS ignores it.
124
- */
125
110
  const CODE_FADING_EDGE = 24;
126
111
  export function CodeBlock(t0) {
127
112
  const $ = _c(21);
@@ -194,8 +179,6 @@ export function CodeBlock(t0) {
194
179
  }
195
180
  return t7;
196
181
  }
197
-
198
- /** The web `MarkdownCodeBlock`: `CodeBlock` with `variant="markdown"`. A component of its own for the wrap state. */
199
182
  function MarkdownCodeBlock(t0) {
200
183
  const $ = _c(21);
201
184
  const {
@@ -281,8 +264,6 @@ function MarkdownCodeBlock(t0) {
281
264
  }
282
265
  return t5;
283
266
  }
284
-
285
- /** The panel style, the language label and the code text both code blocks draw. */
286
267
  function useCodeParts(code, language, highlight, markdown) {
287
268
  const $ = _c(42);
288
269
  const scheme = useScheme();
@@ -429,11 +410,6 @@ function useCodeParts(code, language, highlight, markdown) {
429
410
  }
430
411
  return t10;
431
412
  }
432
-
433
- /**
434
- * Coloured runs as nested `Text` spans, lines joined by newlines. They
435
- * inherit the size and font of the code `Text` around them.
436
- */
437
413
  function CodeRuns(t0) {
438
414
  const $ = _c(7);
439
415
  const {
@@ -469,13 +445,6 @@ function CodeRuns(t0) {
469
445
  }
470
446
  return t2;
471
447
  }
472
-
473
- /**
474
- * The code in the web's Shiki colours: shell blocks through `shellTokens`
475
- * (no peer needed), other languages through Prism, the JavaScript family
476
- * recoloured where Prism and Shiki disagree (`scriptTokens`). Without
477
- * `prism-react-renderer` a non-shell block is the plain code.
478
- */
479
448
  function HighlightedCode(t0) {
480
449
  const $ = _c(19);
481
450
  const {
@@ -7,18 +7,6 @@ import { cn } from "../cn";
7
7
  import { MIN_TOUCH_TARGET, touchSlop } from "../controlStyles";
8
8
  import { useControllableState } from "../primitives/use-controllable-state";
9
9
  import { useReduceMotion } from "../useReduceMotion";
10
-
11
- // A small fold for the AI parts: native-ui has no `Collapsible`. A `Pressable`
12
- // trigger and content that mounts only while open. The content appears at
13
- // once: a fade would also run each time a list mounts an open fold (a chat
14
- // opening, a virtualised row scrolled back). The chevron turns in 150 ms; with
15
- // Reduce Motion it changes in place.
16
-
17
- /**
18
- * The web chevron: `transition-transform duration-150`. The curve is the
19
- * predefined `ease-out`: a `cubicBezier(...)` value in an `Animated.View`
20
- * style does not typecheck against `react-native-reanimated` 4.3.
21
- */
22
10
  const CHEVRON_TURN = {
23
11
  transitionProperty: "transform",
24
12
  transitionDuration: 150,
@@ -106,8 +94,6 @@ export function Collapsible(t0) {
106
94
  }
107
95
  return t5;
108
96
  }
109
-
110
- /** A `text-sm` line with the web `py-1`: 28 high. The slop brings it to 44. */
111
97
  const TRIGGER_ROW_HEIGHT = 28;
112
98
  /** Toggles the fold. A button with `expanded` state for VoiceOver and TalkBack. */
113
99
  export function CollapsibleTrigger(t0) {
@@ -1,8 +1,5 @@
1
1
  import { createContext, useContext } from "react";
2
2
 
3
- // The `Conversation` context on its own, so a message can reach it without the
4
- // thread's components (`message.tsx` sets `overlay`).
5
-
6
3
  /**
7
4
  * What the thread scrolls with: the `ScrollView` of `ConversationContent` or
8
5
  * the `FlatList` of `ConversationList`. `scrollToEnd` goes to the newest
@@ -192,32 +192,14 @@ export function Conversation(t0) {
192
192
  }
193
193
  return t12;
194
194
  }
195
-
196
- /** The scroll handlers a thread's scroller passes on, as `ScrollView` and `FlatList` both take them. */
197
195
  function _temp(current) {
198
196
  return current === "closing" ? "none" : current;
199
197
  }
200
- /**
201
- * Taps reach rows while the keyboard is up; a drag lowers it (interactively
202
- * on iOS, and on Android 11+ with `KeyboardControllerProvider`, in
203
- * `ConversationList`); scroll events at 60 Hz.
204
- */
205
198
  const SCROLL_DEFAULTS = {
206
199
  keyboardShouldPersistTaps: "handled",
207
200
  keyboardDismissMode: Platform.OS === "ios" ? "interactive" : "on-drag",
208
201
  scrollEventThrottle: 16
209
202
  };
210
-
211
- /**
212
- * The wiring `ConversationContent` and `ConversationList` share: the ref the
213
- * scroll button and the follow use, taps that reach rows while the keyboard is
214
- * up, and the handlers that track the bottom and follow new content. The
215
- * defaults come first so `props` can override them; the handlers come last
216
- * and call the app's own after the thread's. An inverted list needs no
217
- * follow: its newest message is at offset 0, so it stays in view as the
218
- * content and the view change. While `paused` is true the bottom is not
219
- * tracked: something other than the reader scrolls the list.
220
- */
221
203
  function useConversationScroll({
222
204
  onScroll,
223
205
  onScrollBeginDrag,
@@ -245,12 +227,10 @@ function useConversationScroll({
245
227
  conversation.settleOverlay();
246
228
  onScrollBeginDrag?.(event_0);
247
229
  },
248
- // The app's handler first, so a scroller that measures itself (`ConversationList`) has the new size to follow.
249
230
  onContentSizeChange: (width, height) => {
250
231
  onContentSizeChange?.(width, height);
251
232
  if (!inverted) conversation.followContent();
252
233
  },
253
- // The keyboard or composer resizing the view keeps the end in view too.
254
234
  onLayout: event_1 => {
255
235
  onLayout?.(event_1);
256
236
  if (!inverted) conversation.followContent();
@@ -356,21 +336,14 @@ export function ConversationList({
356
336
  const keyboard = useKeyboardParts();
357
337
  const insets = useSafeAreaInsets();
358
338
  const inverted = props.inverted === true;
359
- // Sizes from the list's own events, for the scroll offset; no render reads
360
- // them. `inset` is the keyboard's space past the content (before offset 0
361
- // when inverted); `keyboardMoving` is true while the keyboard scrolls the
362
- // list, which is not the reader leaving the bottom.
363
339
  const size = useRef({
364
340
  content: 0,
365
341
  view: 0,
366
342
  inset: 0,
367
343
  keyboardMoving: false
368
344
  });
369
- // The list, and the row `scrollToIndex` last asked for, for its retry when that row was not drawn.
370
345
  const listRef = useRef(null);
371
346
  const indexTarget = useRef(null);
372
- // Not inverted: hidden until the first jump to the end (see above). An
373
- // empty list (a spinner, an empty state) shows at once.
374
347
  const hasRows = (props.data?.length ?? 0) > 0;
375
348
  const [placed, setPlaced] = useState(false);
376
349
  const placeOnce = () => {
@@ -395,30 +368,17 @@ export function ConversationList({
395
368
  inverted,
396
369
  paused: () => size.current.keyboardMoving
397
370
  });
398
- // An inverted list would draw its empty state at the bottom, flipped back
399
- // only if the element takes a `style`: draw it the right way up instead.
400
371
  if (inverted && !hasRows) {
401
372
  const Empty = props.ListEmptyComponent;
402
373
  return <View style={styles.fill}>{isValidElement(Empty) ? Empty : typeof Empty === "function" ? <Empty /> : null}</View>;
403
374
  }
404
- // The newest message's offset: inverted, 0 less the space before it.
405
375
  const end = () => inverted ? size.current.inset > 0 ? -size.current.inset : 0 : Math.max(0, size.current.content + size.current.inset - size.current.view);
406
- const list_1 = <FlatList className={cn("flex-1", className)}
407
- // Inverted, the column's end is the top: a short thread sits there.
408
- contentContainerClassName={cn("px-3 py-3", inverted && "grow justify-end", contentContainerClassName)} {...wired} style={[wired.style, !inverted && hasRows && !placed ? styles.hidden : null]}
409
- // At the bottom, a new message shows at offset 0; scrolled up, it must not move what the reader sees.
410
- maintainVisibleContentPosition={props.maintainVisibleContentPosition ?? (inverted && !conversation.isAtBottom ? KEEP_VISIBLE : undefined)} keyboardDismissMode={props.keyboardDismissMode ?? (keyboard?.interactive ? "interactive" : SCROLL_DEFAULTS.keyboardDismissMode)} renderScrollComponent={keyboard ? scrollProps => <keyboard.ChatScrollView {...scrollProps} inverted={inverted} freeze={conversation.overlay !== "none"}
411
- // The composer pads the bottom inset, which the keyboard covers: the content rises by the rest.
412
- bottomOffset={insets.bottom} onInsetChange={inset => {
376
+ const list_1 = <FlatList className={cn("flex-1", className)} contentContainerClassName={cn("px-3 py-3", inverted && "grow justify-end", contentContainerClassName)} {...wired} style={[wired.style, !inverted && hasRows && !placed ? styles.hidden : null]} maintainVisibleContentPosition={props.maintainVisibleContentPosition ?? (inverted && !conversation.isAtBottom ? KEEP_VISIBLE : undefined)} keyboardDismissMode={props.keyboardDismissMode ?? (keyboard?.interactive ? "interactive" : SCROLL_DEFAULTS.keyboardDismissMode)} renderScrollComponent={keyboard ? scrollProps => <keyboard.ChatScrollView {...scrollProps} inverted={inverted} freeze={conversation.overlay !== "none"} bottomOffset={insets.bottom} onInsetChange={inset => {
413
377
  size.current.inset = inset;
414
378
  }} onKeyboardMove={moving => {
415
379
  size.current.keyboardMoving = moving;
416
- // The closing menu's window hands the focus back with a keyboard event: frozen until it ends.
417
380
  if (!moving) conversation.settleOverlay();
418
- }} /> : props.renderScrollComponent}
419
- // A row the list has not drawn yet (it draws only those near the view):
420
- // go to its estimated offset, which draws it, then to the row itself.
421
- onScrollToIndexFailed={props.onScrollToIndexFailed ?? (info => {
381
+ }} /> : props.renderScrollComponent} onScrollToIndexFailed={props.onScrollToIndexFailed ?? (info => {
422
382
  const list = listRef.current;
423
383
  const target = indexTarget.current;
424
384
  if (!list || !target || target.index !== info.index || target.tries >= 3) return;
@@ -445,13 +405,10 @@ export function ConversationList({
445
405
  };
446
406
  }} />;
447
407
  if (!keyboard) return list_1;
448
- // The keyboard follows the finger from the composer's top: the dock less the inset it pads.
449
408
  return <keyboard.GestureArea offset={Math.max(0, conversation.dockHeight - insets.bottom)} style={styles.fill}>
450
409
  {list_1}
451
410
  </keyboard.GestureArea>;
452
411
  }
453
-
454
- /** Scrolled up in an inverted list: the first drawn row in view keeps its place as rows are added or grow. */
455
412
  const KEEP_VISIBLE = {
456
413
  minIndexForVisible: 0
457
414
  };
@@ -618,11 +575,8 @@ export function ConversationDock(t0) {
618
575
  }
619
576
  return t4;
620
577
  }
621
- /** The scroll button fades in and out on the strong ease-out. */
622
578
  const SCROLL_BUTTON_ENTER = FadeIn.duration(150).easing(EASE_OUT);
623
579
  const SCROLL_BUTTON_EXIT = FadeOut.duration(120).easing(EASE_OUT);
624
-
625
- /** The labelled pill's height (web `h-7`). */
626
580
  const SCROLL_PILL_HEIGHT = 28;
627
581
 
628
582
  /**
@@ -9,8 +9,6 @@ import { useLargerText } from "../theme";
9
9
  import { tokens } from "../tokens";
10
10
  import { useScheme } from "../useScheme";
11
11
  import { MONO_FONT, chatTextSize } from "./chat-text";
12
-
13
- /** A `text-xs` line with the web `py-0.5` and border: 22 high. The slop brings it to 44. */
14
12
  const CHIP_HEIGHT = 22;
15
13
  function FileChipLabel(t0) {
16
14
  const $ = _c(36);
@@ -7,31 +7,23 @@ import { useLargerText } from "../theme";
7
7
  import { tokens } from "../tokens";
8
8
  import { useScheme } from "../useScheme";
9
9
 
10
- /** The web `icon-sm` button: 32 square with a 16 icon. */
11
- export const CHAT_ICON_BUTTON_SIZE = 32;
12
-
13
- /**
14
- * Side and icon per size: `sm` is the web `icon-sm` (32, 16 icon), `xs` the
15
- * web `icon-xs` (28, 14 icon) and `md` the web `size-9` (36, 16 icon), Eva's
16
- * composer send button. `touch` has no web twin: a 44 square with a 16 icon,
17
- * for a row of ghost buttons a thumb taps (the message actions), where the
18
- * web 28 squares 2 apart are a mouse's density.
19
- */
10
+ /** The phone chat icon button: 40 square with an 18 icon (hit slop reaches 44). */
11
+ export const CHAT_ICON_BUTTON_SIZE = 40;
20
12
  const CHAT_ICON_BUTTON = {
21
13
  xs: {
22
- side: 28,
23
- icon: 14,
24
- className: "h-7 w-7"
14
+ side: 36,
15
+ icon: 16,
16
+ className: "h-9 w-9"
25
17
  },
26
18
  sm: {
27
19
  side: CHAT_ICON_BUTTON_SIZE,
28
- icon: 16,
29
- className: "h-8 w-8"
20
+ icon: 18,
21
+ className: "h-10 w-10"
30
22
  },
31
23
  md: {
32
- side: 36,
33
- icon: 16,
34
- className: "h-9 w-9"
24
+ side: 40,
25
+ icon: 18,
26
+ className: "h-10 w-10"
35
27
  },
36
28
  touch: {
37
29
  side: MIN_TOUCH_TARGET,
package/dist/ai/index.js CHANGED
@@ -1,6 +1,3 @@
1
- // AI chat parts, ported from the `@vvedantb/ui` AI elements for touch. On the
2
- // `@vvedantb/native-ui/ai` entry only, so apps without a chat do not bundle
3
- // them. Generic: no model names and no app logic.
4
1
  export { useStreamingDisclosure } from "./use-streaming-disclosure";
5
2
  export { chatTextSize, formatElapsed, META_TEXT_STYLE, MONO_FONT } from "./chat-text";
6
3
  export { Shimmer, SHIMMER_LOW_OPACITY } from "./shimmer";
@@ -16,8 +13,6 @@ export { Reasoning, ReasoningTrigger, ReasoningContent, useReasoning, reasoningM
16
13
  export { AgentTrace, AgentTraceLine, AgentTraceIcon, AgentTraceTitle, AgentTraceDescription, AgentTraceCollapsible, AgentTraceCollapsibleTrigger, AgentTraceCollapsibleContent, AgentTraceFold, traceLineColor } from "./trace";
17
14
  export { ChainOfThought, ChainOfThoughtHeader, ChainOfThoughtContent, ChainOfThoughtStep, ChainOfThoughtSearchResults, ChainOfThoughtSearchResult } from "./chain-of-thought";
18
15
  export { ActivityStep } from "./activity-step";
19
- // The web timeline's pure logic (byte-identical copies) and its folded rules.
20
- // The step type is `ActivityTimelineStep` here: `ActivityStep` is the line above.
21
16
  export { activityStepHasRichDetail } from "./activity-step-types";
22
17
  export { deriveActionGroupSummary, deriveReadableCommandDisplay, deriveStepRowPresentation, resolveCommandVisualKind } from "./activity-step-label";
23
18
  export { activityRowKey, activitySegmentKey, buildActivityRows, groupActivityRows } from "./activity-tasks-utils";
@@ -13,8 +13,6 @@ import { useScheme } from "../useScheme";
13
13
  import { chatTextSize } from "./chat-text";
14
14
  import { MESSAGE_MENU, messageContextMenuLayout } from "./message-menu-layout";
15
15
  import { usePressed } from "../usePressed";
16
-
17
- /** How far the held message lifts as the menu opens: a little, so a tall one stays in its room. */
18
16
  const LIFT_SCALE = 1.02;
19
17
 
20
18
  /**
@@ -371,11 +369,6 @@ export function MessageContextMenu(t0) {
371
369
  }
372
370
  return t30;
373
371
  }
374
-
375
- /**
376
- * One card row: label first, icon last. While pressed it takes the
377
- * `SheetRow` pressed fill, so the finger sees which row it is on.
378
- */
379
372
  function MenuCardRow(t0) {
380
373
  const $ = _c(41);
381
374
  const {
@@ -24,8 +24,6 @@ const MessageContext = createContext("assistant");
24
24
 
25
25
  /** How long the highlight wash takes to fade, in milliseconds. */
26
26
  export const MESSAGE_HIGHLIGHT_MS = 1400;
27
-
28
- /** Peak opacity of the highlight wash (the primary colour). */
29
27
  const HIGHLIGHT_WASH = 0.18;
30
28
  function MessageHighlight() {
31
29
  const $ = _c(14);
@@ -101,26 +99,7 @@ function MessageHighlight() {
101
99
  }
102
100
  return t7;
103
101
  }
104
-
105
- /**
106
- * One message: the web `w-full max-w-[95%] flex-col gap-2`. A user message
107
- * sits at the end of the row with its parts at the end; an assistant message
108
- * at the start, its parts full width.
109
- *
110
- * With `onLongPress` or `actions` the message is a `Pressable` (same layout,
111
- * `className`, `style` and view props): a 350 ms hold dims it a little,
112
- * fires a medium haptic, runs `onLongPress` and opens the
113
- * `MessageActionSheet`; TalkBack reaches it as the `longpress` action. It stays
114
- * a non-accessible container so its buttons and links keep their own focus:
115
- * also offer the actions in a `MessageActionsBar` for screen reader users. `highlighted` draws the quote-jump highlight.
116
- */
117
- /** How long a hold takes, in ms: shorter than React Native's 500, as iMessage. */
118
102
  const HOLD_DELAY_MS = 350;
119
- /**
120
- * A held message dims a little. It does not shrink: the hold menu measures the
121
- * message while it is held, and a scaled box would draw the lifted copy smaller
122
- * (and could wrap its text differently).
123
- */
124
103
  const HELD_STYLE = {
125
104
  opacity: 0.9
126
105
  };
@@ -125,13 +125,10 @@ export function PromptInputMenu(t0) {
125
125
  }
126
126
  return t10;
127
127
  }
128
-
129
- /** Web badge chip: `rounded-md bg-muted px-1.5 py-0.5 text-3xs font-medium` (10). */
130
128
  const BADGE_TEXT = {
131
129
  fontSize: 10,
132
130
  lineHeight: 12
133
131
  };
134
- /** A description longer than this is cut with "…", as the web `previewOneLine`. */
135
132
  const DESCRIPTION_MAX = 72;
136
133
  function oneLine(text) {
137
134
  const line = text.replace(/\s+/g, " ").trim();
@@ -22,11 +22,6 @@ import { ChatIconButton } from "./icon-button";
22
22
  export function isGenerating(status) {
23
23
  return status === "submitted" || status === "streaming";
24
24
  }
25
- // The web `PromptInputSubmit` and `PromptInputButton` keep `shape="rounded"`
26
- // (`rounded-lg`, 16) as field addons. At the 32 `icon-sm` size 16 is half the
27
- // side, so the web draws a circle. These stay pills: the same circle at 32, and
28
- // still a circle at 44 with larger text, where 16 would draw a rounded square.
29
-
30
25
  /**
31
26
  * Send, or stop while the AI answers: the web `default` `icon-sm` button
32
27
  * (32, round, slop to 44). Send is an up arrow on the primary fill, faded by
@@ -104,9 +99,7 @@ export const PROMPT_INPUT_CHIP = {
104
99
  chevronSize: 12,
105
100
  chevronOpacity: 0.6,
106
101
  suffixOpacity: 0.7,
107
- /** The narrowest label worth drawing: about two characters and the ellipsis at `text-sm` (2em). */
108
102
  labelMinWidth: 28,
109
- /** `size="touch"`: 36 on screen, 4 slop above and below, so a 44 bar holds its whole target. */
110
103
  touchHeight: 36
111
104
  };
112
105
  /**
@@ -342,15 +335,7 @@ export function PromptInputChip(t0) {
342
335
  function _temp(part) {
343
336
  return part !== undefined;
344
337
  }
345
- /** The web `Composer` inline radius, `rounded-[1.25rem]`. */
346
338
  const INLINE_RADIUS = 20;
347
-
348
- /**
349
- * Eva's `pill` composer: 48 high on one line (border 1, then 5 around a 36
350
- * field: the web `h-12 py-1` centres the 36 field and send button in 38),
351
- * `pl-1.5` / `pr-1.5`, and radius 24 (`rounded-full` at 48). Its placeholder
352
- * is the muted colour at 90% (`data-empty:before:text-muted-foreground/90`).
353
- */
354
339
  const PILL = {
355
340
  radius: 24,
356
341
  paddingY: 5,
@@ -358,18 +343,10 @@ const PILL = {
358
343
  lineHeight: 36,
359
344
  placeholderAlpha: 0.9
360
345
  };
361
-
362
- /** The field grows to this height, then scrolls: about 6 lines of 24 (with `py-2.5`), and about 8 of `text-xl` with larger text. */
363
346
  const MAX_FIELD_HEIGHT = {
364
347
  regular: 160,
365
348
  larger: 240
366
349
  };
367
-
368
- /**
369
- * React Native Web draws a multiline field as a `textarea` with the HTML
370
- * default of 2 rows, and the auto-grow keeps that height. One row there; on
371
- * native, `numberOfLines` would lock the line count on Android, so none.
372
- */
373
350
  const ONE_ROW = Platform.OS === "web" ? 1 : undefined;
374
351
 
375
352
  /**
@@ -477,8 +454,8 @@ export function PromptInput(t0) {
477
454
  let t13;
478
455
  if ($[13] !== largerText || $[14] !== layout || $[15] !== pill) {
479
456
  t13 = largerText ? sizeStyle("text-xl") : layout === "inline" ? {
480
- fontSize: 14,
481
- lineHeight: pill ? 20 : 24
457
+ fontSize: 16,
458
+ lineHeight: pill ? 22 : 24
482
459
  } : sizeStyle("text-base");
483
460
  $[13] = largerText;
484
461
  $[14] = layout;
@@ -631,14 +608,10 @@ export function PromptInput(t0) {
631
608
  }
632
609
  return t25;
633
610
  }
634
-
635
- /** In the inline row the paste target takes the field's place: it grows across, and the field fills it. */
636
611
  const PASTE_TARGET_INLINE = {
637
612
  flex: 1,
638
613
  minWidth: 0
639
614
  };
640
-
641
- /** The field inside the app's paste target (`PasteInputProvider`), or the field alone. */
642
615
  function PasteTarget(t0) {
643
616
  const $ = _c(5);
644
617
  const {
@@ -7,12 +7,6 @@ import { useLargerText } from "../theme";
7
7
  import { useScheme } from "../useScheme";
8
8
  import { chatTextSize } from "./chat-text";
9
9
 
10
- // Markdown stub. The web renders replies with Streamdown; native-ui has no
11
- // markdown peer, so `ResponseText` draws the text as it is, newlines kept.
12
- // An app that wants markdown can render one of these in its place:
13
- // `react-native-markdown-display`, `@ronradtke/react-native-markdown-display`
14
- // (a maintained fork) or `react-native-marked`.
15
-
16
10
  /**
17
11
  * The text colour `MessageContent` hands down: React Native text does not
18
12
  * inherit a colour from its parent view, as web text does from `color`.
@@ -175,7 +175,6 @@ export function SourcesContent(t0) {
175
175
  }
176
176
  return t2;
177
177
  }
178
- /** A `text-sm` line with the web `py-2`: 36 high. The slop brings it to 44. */
179
178
  const ROW_HEIGHT = 36;
180
179
 
181
180
  /**
@@ -69,7 +69,6 @@ export function Suggestions(t0) {
69
69
  }
70
70
  return t4;
71
71
  }
72
- /** A `text-sm` line with the web `py-1.5`: 32 high. The slop brings it to 44. */
73
72
  const CHIP_HEIGHT = 32;
74
73
 
75
74
  /**
package/dist/ai/trace.jsx CHANGED
@@ -11,18 +11,10 @@ import { chatTextSize, formatElapsed } from "./chat-text";
11
11
  import { Collapsible, CollapsibleChevron, CollapsibleContent, CollapsibleTrigger, useCollapsible } from "./collapsible";
12
12
  import { ResponseText } from "./response-text";
13
13
  import { Shimmer } from "./shimmer";
14
-
15
- // One agent step as one line: icon, title, optional faded description and an
16
- // optional fold. Reasoning, tool calls, grouped calls and to-dos can all
17
- // render through these parts, as on the web (`trace.tsx`). The web icon
18
- // crossfade (`iconKey`) is not ported: the icon swaps at once.
19
-
20
14
  /** Text and icon colour of a line: muted, or the danger colour for an error (web `text-destructive`). */
21
15
  export function traceLineColor(status, scheme) {
22
16
  return status === "error" ? palette.danger[scheme] : tokens.color.muted[scheme];
23
17
  }
24
-
25
- // Native text and icons do not inherit a colour, so the line hands its own down.
26
18
  const TraceLineColorContext = createContext(undefined);
27
19
  function useTraceColor() {
28
20
  const scheme = useScheme();
@@ -394,15 +386,12 @@ export function AgentTraceCollapsible(t0) {
394
386
  }
395
387
  return t2;
396
388
  }
397
- /** No slop: the 28 high line is the whole target, as trace lines stack with no gap. */
398
389
  const LINE_SLOP = {
399
390
  top: 0,
400
391
  bottom: 0,
401
392
  left: 0,
402
393
  right: 0
403
394
  };
404
-
405
- /** The chevron's slop: 4 back toward the line, 14 on past it (a 34 wide target), none above or below. */
406
395
  const CHEVRON_SLOP = {
407
396
  top: 0,
408
397
  bottom: 0,
@@ -19,8 +19,6 @@ export const UNIFIED_DIFF = {
19
19
  gutterPadding: 8,
20
20
  digitWidth: 8.5
21
21
  };
22
-
23
- /** Larger text steps the code up as `chatTextSize("small")` does (`text-lg`), keeping the 22/14 leading. */
24
22
  const LARGER_FONT_SIZE = 18;
25
23
 
26
24
  /** Web `bg-emerald-500/10` and `text-emerald-700` (dark `text-emerald-300`): edit and diff added lines. */
@@ -29,8 +27,6 @@ export const EMERALD = {
29
27
  light: "#047857",
30
28
  dark: "#6ee7b7"
31
29
  };
32
-
33
- /** Web `text-emerald-600` (dark `text-emerald-400`), the `+n` of a diff stat. */
34
30
  const ADDED_TEXT = {
35
31
  light: "#059669",
36
32
  dark: "#34d399"
@@ -10,11 +10,7 @@ import { tokens } from "../tokens";
10
10
  import { useScheme } from "../useScheme";
11
11
  const DEFAULT_HERO_COLOR = "#db2777";
12
12
  const DEFAULT_HERO_FOREGROUND = "#ffffff";
13
-
14
- /** Space under the form while the keyboard is open, on top of its height. */
15
13
  const KEYBOARD_EXTRA = 24;
16
-
17
- /** The height of the open soft keyboard, or 0. Edge-to-edge Android ignores `adjustResize`, so the screen pads itself. */
18
14
  function useKeyboardHeight() {
19
15
  const $ = _c(2);
20
16
  const [height, setHeight] = useState(0);
@@ -218,7 +214,6 @@ export function AuthScreen(t0) {
218
214
  }
219
215
  return t17;
220
216
  }
221
- /** The `variant="hero"` frame. Separate so only the hero reads the safe-area insets. */
222
217
  function HeroAuthScreen(t0) {
223
218
  const $ = _c(38);
224
219
  const {
@@ -9,8 +9,6 @@ import { GoogleMark } from "../brand/GoogleMark";
9
9
  import { Button } from "../Button";
10
10
  import { toast } from "../toastStore";
11
11
  import { authErrorMessage } from "./authErrors";
12
-
13
- // Completes the Google browser session when the app reopens on the redirect.
14
12
  WebBrowser.maybeCompleteAuthSession();
15
13
  export const GOOGLE_ERROR_MESSAGE = "Could not continue with Google";
16
14
  /** Warms the Android custom tab while the screen is up, as the Expo guide suggests. */
@@ -66,7 +64,6 @@ export function useGoogleSignIn({
66
64
  path: redirectPath
67
65
  })
68
66
  });
69
- // No session: the user closed the browser, or more steps are needed.
70
67
  if (createdSessionId && setActive) {
71
68
  await setActive({
72
69
  session: createdSessionId
@@ -1,6 +1,4 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- // Clerk-free: a one-time code step. The caller owns the verification call and
3
- // its errors (`useSecondFactor` does both for Clerk).
4
2
  import { useState } from "react";
5
3
  import { Button } from "../Button";
6
4
  import { Input } from "../Input";