@vvedantb/native-ui 0.38.0 → 0.39.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 +0 -1
  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 +0 -8
  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 +0 -27
  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 +0 -1
  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 +0 -17
  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 +0 -97
  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
package/src/Tabs.tsx CHANGED
@@ -15,6 +15,7 @@ import {
15
15
  import { selectionHaptic } from "./haptics";
16
16
  import { useControllableState } from "./primitives/use-controllable-state";
17
17
  import { useTabIndicator, useTabLabelStyle } from "./tabIndicator";
18
+ import { useGlass } from "./glass";
18
19
  import { useLargerText } from "./theme";
19
20
  import { useScheme } from "./useScheme";
20
21
 
@@ -33,7 +34,6 @@ const TabsListContext = createContext<{
33
34
  indicator?: ReturnType<typeof useTabIndicator>;
34
35
  }>({ variant: "pills", size: "default" });
35
36
 
36
- /** A trigger's place in its list, for the linked indicator and label colour. */
37
37
  const TabIndexContext = createContext(0);
38
38
 
39
39
  function useTabs(part: string) {
@@ -43,9 +43,7 @@ function useTabs(part: string) {
43
43
  }
44
44
 
45
45
  export type TabsProps = ViewProps & {
46
- /** Active tab when the parent controls it. */
47
46
  value?: string;
48
- /** Initial tab when `value` is not set. */
49
47
  defaultValue?: string;
50
48
  onValueChange?: (value: string) => void;
51
49
  className?: string;
@@ -73,14 +71,7 @@ export function Tabs({
73
71
 
74
72
  export type TabsListProps = ViewProps & {
75
73
  variant?: TabsListVariant;
76
- /** `sm` makes the triggers smaller. */
77
74
  size?: TabsSize;
78
- /**
79
- * Where a linked `Pager` is, in pages: the first trigger is page 0. With it,
80
- * as in `PillTabs`, the selected fill is one indicator that slides with the
81
- * pages and each label blends to the selected colour with it. The triggers
82
- * are the list's direct children, in page order.
83
- */
84
75
  progress?: SharedValue<number>;
85
76
  className?: string;
86
77
  };
@@ -95,6 +86,7 @@ export function TabsList({
95
86
  ...props
96
87
  }: TabsListProps) {
97
88
  const scheme = useScheme();
89
+ const glass = useGlass("control");
98
90
  const triggers = Children.toArray(children);
99
91
  const indicator = useTabIndicator(progress, triggers.length);
100
92
  return (
@@ -103,10 +95,6 @@ export function TabsList({
103
95
  accessibilityRole="tablist"
104
96
  className={cn(
105
97
  "flex-row",
106
- // The web lists: `segmented` and `pills` are `inline-flex` (as wide
107
- // as their tabs), `soft` a full-width row of centred, wrapping pills.
108
- // Pills wrap rather than run off a phone screen, except under a
109
- // linked indicator, which slides along one line.
110
98
  variant === "segmented"
111
99
  ? "max-w-full gap-[3px] self-start rounded-full p-[3px]"
112
100
  : variant === "soft"
@@ -120,12 +108,12 @@ export function TabsList({
120
108
  {...props}
121
109
  >
122
110
  {indicator.measured ? (
123
- // The selected fill under the triggers, as `PillTabs`.
124
111
  <Animated.View
125
112
  pointerEvents="none"
126
113
  style={[
127
114
  { position: "absolute", left: 0, borderRadius: 9999 },
128
115
  { backgroundColor: tabColors(variant, true, scheme).backgroundColor },
116
+ glass,
129
117
  indicator.style,
130
118
  ]}
131
119
  />
@@ -145,11 +133,6 @@ export type TabsTriggerProps = {
145
133
  children: ReactNode;
146
134
  disabled?: boolean;
147
135
  className?: string;
148
- /**
149
- * The trigger height on screen, for an app whose web call site sizes its
150
- * list (a `h-8` list with `p-1` has 24-high triggers). Default: the web
151
- * `.t-tab` 30, or the larger-text size. The hit slop still reaches 44.
152
- */
153
136
  minHeight?: number;
154
137
  testID?: string;
155
138
  accessibilityLabel?: string;
@@ -170,8 +153,6 @@ export function TabsTrigger({
170
153
  const largerText = useLargerText();
171
154
  const scheme = useScheme();
172
155
  const selected = current === value;
173
- // Fill and label are styles from `tabColors`: apps' `bg-secondary` and
174
- // `bg-surface` can stay light in dark mode, under a light label.
175
156
  const colors = tabColors(variant, selected, scheme);
176
157
  const labelStyle = useTabLabelStyle(
177
158
  progress,
@@ -181,7 +162,6 @@ export function TabsTrigger({
181
162
  );
182
163
  const trigger = tabTriggerSize(variant, size, largerText);
183
164
  const height = minHeight ?? trigger.minHeight;
184
- // The web `.t-tab` is `font-medium`; the soft trigger is regular.
185
165
  const medium = variant !== "soft";
186
166
 
187
167
  return (
@@ -192,7 +172,6 @@ export function TabsTrigger({
192
172
  accessibilityLabel ?? (typeof children === "string" ? children : undefined)
193
173
  }
194
174
  accessibilityState={{ selected, disabled: Boolean(disabled) }}
195
- // The trigger height on screen (the web 30 by default), a 44 target to touch.
196
175
  hitSlop={touchSlop(MIN_TOUCH_TARGET, height)}
197
176
  disabled={disabled}
198
177
  onPress={() => {
@@ -207,9 +186,6 @@ export function TabsTrigger({
207
186
  disabled ? "opacity-50" : "active:opacity-70",
208
187
  className,
209
188
  )}
210
- // A plain object: NativeWind puts the class styles and `style` in an
211
- // array, where a `({ pressed }) => ...` style is dropped.
212
- // When linked and measured, the list's indicator draws the selected fill.
213
189
  style={{ backgroundColor: indicator?.measured ? "transparent" : colors.backgroundColor, minHeight: height }}
214
190
  onLayout={progress ? indicator?.onLayout(index) : undefined}
215
191
  >
package/src/Textarea.tsx CHANGED
@@ -10,7 +10,6 @@ type TextareaProps = React.ComponentPropsWithoutRef<typeof PrimitiveInput> & {
10
10
  className?: string;
11
11
  };
12
12
 
13
- /** Multiline `Input`: same fill, border, radius and type. Grows from 4 lines. */
14
13
  const Textarea = React.forwardRef<
15
14
  React.ElementRef<typeof PrimitiveInput>,
16
15
  TextareaProps
@@ -25,7 +24,6 @@ const Textarea = React.forwardRef<
25
24
  textAlignVertical="top"
26
25
  placeholderTextColor={placeholderTextColor ?? palette.fieldPlaceholder[scheme]}
27
26
  className={cn(
28
- // The web textarea: min-h-20 px-3.5 py-2.5, 16 px type.
29
27
  "min-h-20 border px-3.5 py-2.5 text-base font-instrument-sans",
30
28
  largerText && "min-h-32 px-4 py-3 text-xl font-instrument-sans-medium",
31
29
  className,
@@ -9,7 +9,6 @@ export type ThemeToggleProps = {
9
9
  testID?: string;
10
10
  };
11
11
 
12
- /** Logged when NativeWind's `setColorScheme` throws. */
13
12
  const DARK_MODE_CLASS_HINT =
14
13
  'ThemeToggle could not set the colour scheme. NativeWind throws while Tailwind darkMode is "media" (the default): set darkMode: "class" in tailwind.config.js. See the @vvedantb/native-ui README, Theme.';
15
14
 
package/src/Toast.tsx CHANGED
@@ -24,20 +24,17 @@ import {
24
24
  toastSurfaceStyle,
25
25
  } from "./toastChrome";
26
26
  import { tokens } from "./tokens";
27
+ import { useGlass } from "./glass";
27
28
  import { useLargerText } from "./theme";
28
29
  import { useScheme } from "./useScheme";
29
30
  import { NativeOnlyAnimatedView } from "./primitives/native-only-animated-view";
30
31
  import { ToastDragContext } from "./toastDrag";
31
32
  import { getToasts, subscribeToasts, toast, type ToastItem } from "./toastStore";
32
33
 
33
- // On iOS the overlay draws above RN `Modal`s, so toasts show over dialogs (as
34
- // sonner does on the web). On Android a `Modal` still covers them.
35
34
  const FullWindowOverlay = Platform.OS === "ios" ? RNFullWindowOverlay : Fragment;
36
35
 
37
36
  const toastShadow = toastShadowStyle(Platform.OS);
38
37
 
39
- // Down from the top edge and back up the way it came, the exit 20% quicker:
40
- // the reader is done with it.
41
38
  const TOAST_ENTER = FadeInUp.duration(200).easing(EASE_OUT);
42
39
  const TOAST_EXIT = FadeOutUp.duration(160).easing(EASE_OUT);
43
40
 
@@ -70,7 +67,6 @@ export function Toaster({ offset = 8 }: { offset?: number }) {
70
67
  );
71
68
  }
72
69
 
73
- /** The web filled 24 icons (`toastChrome`), or a spinner while loading. */
74
70
  function ToastIcon({ item }: { item: ToastItem }) {
75
71
  const scheme = useScheme();
76
72
  if (item.variant === "loading") {
@@ -91,13 +87,7 @@ function ToastIcon({ item }: { item: ToastItem }) {
91
87
  );
92
88
  }
93
89
 
94
- /**
95
- * Closes `item` after its `duration`, counting only while it is not `held`:
96
- * a finger on the toast pauses the time left, and lifting it resumes. A
97
- * toast replaced in place (same id, new item) starts its own time afresh.
98
- */
99
90
  function useToastTimer(item: ToastItem, held: boolean) {
100
- // The time left, and the item it counts for. Only the effect reads and writes it.
101
91
  const left = useRef({ item, ms: item.duration });
102
92
  useEffect(() => {
103
93
  if (left.current.item !== item) left.current = { item, ms: item.duration };
@@ -114,13 +104,11 @@ function useToastTimer(item: ToastItem, held: boolean) {
114
104
  function ToastCard({ item }: { item: ToastItem }) {
115
105
  const largerText = useLargerText();
116
106
  const scheme = useScheme();
117
- // The swipe up to dismiss, under `GestureHandlerProvider`.
107
+ const glass = useGlass("surface");
118
108
  const Drag = useContext(ToastDragContext);
119
109
  const [held, setHeld] = useState(false);
120
110
  useToastTimer(item, held);
121
111
 
122
- // A success or error toast reports an operation the user started: one
123
- // notification haptic as it shows (or turns from loading into a result).
124
112
  useEffect(() => {
125
113
  if (item.variant === "success" || item.variant === "error") notificationHaptic(item.variant);
126
114
  }, [item.id, item.variant]);
@@ -132,12 +120,9 @@ function ToastCard({ item }: { item: ToastItem }) {
132
120
  }, [item.title, item.description]);
133
121
 
134
122
  const surface = (
135
- // The web toast: flat overlay fill, radius 16, ring and a light shadow.
136
- <View style={[toastSurfaceStyle(scheme), toastShadow]}>
123
+ <View style={[toastSurfaceStyle(scheme), toastShadow, glass]}>
137
124
  <Pressable
138
125
  testID={`toast-${item.id}`}
139
- // With an action, the text and the action button stay separate
140
- // elements for VoiceOver and TalkBack instead of one grouped button.
141
126
  accessible={!item.action}
142
127
  accessibilityRole="button"
143
128
  accessibilityHint="Closes the message"
@@ -146,7 +131,6 @@ function ToastCard({ item }: { item: ToastItem }) {
146
131
  >
147
132
  <ToastIcon item={item} />
148
133
  <View className="min-w-0 flex-1">
149
- {/* Web `text-sm font-medium leading-snug` (14 / 19.25, 500); `text-lg` with larger text. */}
150
134
  <Text
151
135
  className={cn(
152
136
  "font-instrument-sans-medium",
@@ -24,42 +24,22 @@ export const V_STORE_UPDATES_URL = "vstore://updates";
24
24
  type UpdateText = ReactNode | ((update: AvailableUpdate) => ReactNode);
25
25
 
26
26
  export type UpdatePromptProps = {
27
- /** The update to offer. The prompt is open while this is set. */
28
27
  update: AvailableUpdate | null;
29
- /** The app's display name, used in the default description. */
30
28
  appName: string;
31
- /** Default "Update available". */
32
29
  title?: ReactNode;
33
- /** Default "`<appName> <version>` is ready to install.". A function receives the update. */
34
30
  description?: UpdateText;
35
- /** Default "Later". */
36
31
  laterLabel?: ReactNode;
37
- /** Default "Download". */
38
32
  downloadLabel?: ReactNode;
39
- /** Default "Install from V Store". */
40
33
  vStoreLabel?: ReactNode;
41
- /** Shown once V Store could not be opened. Default "V Store is not installed on this device.". */
42
34
  vStoreMissingText?: ReactNode;
43
- /** Show Download, which opens `update.url` (the APK or its release page). Default `true`. */
44
35
  showDownload?: boolean;
45
- /** Show "Install from V Store", which only opens V Store. Default `true`. */
46
36
  showVStore?: boolean;
47
- /**
48
- * The link that opens V Store. Default `V_STORE_UPDATES_URL`, its Updates
49
- * tab. Pass the app's own page there when the app knows its link.
50
- */
51
37
  vStoreUrl?: string;
52
- /** Later, Android back and the VoiceOver escape. */
53
38
  onLater?: (update: AvailableUpdate) => void;
54
- /** After Download opened `update.url`. Close the prompt here. */
55
39
  onDownload?: (update: AvailableUpdate) => void;
56
- /** After V Store opened. Close the prompt here. */
57
40
  onOpenVStore?: (update: AvailableUpdate) => void;
58
- /** V Store could not be opened (not installed). The prompt stays open, without the V Store button. */
59
41
  onVStoreMissing?: (update: AvailableUpdate) => void;
60
- /** Opens a link. Default `Linking.openURL`, which rejects when no app handles it. */
61
42
  openUrl?: (url: string) => Promise<unknown>;
62
- /** The buttons get `<testID>-later`, `-download` and `-vstore`; the notice `-vstore-missing`. */
63
43
  testID?: string;
64
44
  };
65
45
 
@@ -98,9 +78,7 @@ export function UpdatePrompt({
98
78
  openUrl = Linking.openURL,
99
79
  testID,
100
80
  }: UpdatePromptProps) {
101
- // The version V Store failed to open for, so the next version asks afresh.
102
81
  const [missingFor, setMissingFor] = useState<string | null>(null);
103
- // The last update, so the text stays while the dialog closes.
104
82
  const [shown, setShown] = useState(update);
105
83
  if (update && update !== shown) setShown(update);
106
84
 
@@ -133,7 +111,6 @@ export function UpdatePrompt({
133
111
  ) : null}
134
112
  </AlertDialogHeader>
135
113
  <AlertDialogFooter>
136
- {/* Closes the dialog, and so calls `onLater`. */}
137
114
  <AlertDialogCancel size="lg" testID={testID ? `${testID}-later` : undefined}>
138
115
  {laterLabel}
139
116
  </AlertDialogCancel>
@@ -162,7 +139,6 @@ export function UpdatePrompt({
162
139
  testID={testID ? `${testID}-download` : undefined}
163
140
  onPress={() => {
164
141
  if (!update) return;
165
- // A link that does not open leaves nothing to do here.
166
142
  openUrl(update.url).catch(() => undefined);
167
143
  onDownload?.(update);
168
144
  }}
@@ -182,7 +158,6 @@ export type UpdateDismissStorage = {
182
158
  setItem: (key: string, value: string) => Promise<unknown> | unknown;
183
159
  };
184
160
 
185
- /** The version Later hid. An unreadable store means nothing was dismissed. */
186
161
  async function readDismissed(storage: UpdateDismissStorage, key: string): Promise<string | null> {
187
162
  try {
188
163
  return await storage.getItem(key);
@@ -195,29 +170,12 @@ export type UpdateCheckerProps = Omit<
195
170
  UpdatePromptProps,
196
171
  "update" | "onLater" | "onDownload" | "onOpenVStore"
197
172
  > & {
198
- /**
199
- * The installed version, "1.2.3". `null` or `undefined` skips the check, for
200
- * a local or preview build that has no release to compare with.
201
- */
202
173
  currentVersion: string | null | undefined;
203
- /** GitHub releases to read: the repository and the tag prefix before the version. Public repositories only. */
204
174
  source?: GitHubReleaseSource;
205
- /**
206
- * Ask V Store for the newest version, used instead of `source`. It works
207
- * for a private repository too. Without `vStore.downloadUrl`, Download is
208
- * hidden unless `showDownload` says otherwise.
209
- */
210
175
  vStore?: VStoreSource;
211
- /** Your own check, used instead of `source` and `vStore`. Returns the update to offer, or null. */
212
176
  check?: (currentVersion: string) => Promise<AvailableUpdate | null>;
213
- /** `false` skips the check. Default `true`. */
214
177
  enabled?: boolean;
215
- /**
216
- * Remembers the version "Later" hid, so it is not offered again until a
217
- * newer one is out. Without it, Later hides the prompt until the next start.
218
- */
219
178
  storage?: UpdateDismissStorage;
220
- /** Key in `storage`. Default `"updateDismissed"`. */
221
179
  storageKey?: string;
222
180
  onLater?: (update: AvailableUpdate) => void;
223
181
  onDownload?: (update: AvailableUpdate) => void;
@@ -251,7 +209,6 @@ export function UpdateChecker({
251
209
  ...prompt
252
210
  }: UpdateCheckerProps) {
253
211
  const [update, setUpdate] = useState<AvailableUpdate | null>(null);
254
- // The latest callbacks, so a new function each render does not check again.
255
212
  const latest = useRef({ check, vStore, storage, storageKey });
256
213
  useEffect(() => {
257
214
  latest.current = { check, vStore, storage, storageKey };
@@ -262,7 +219,6 @@ export function UpdateChecker({
262
219
  const hasCheck = check !== undefined;
263
220
  const vStorePackage = vStore?.packageName;
264
221
  const vStoreSite = vStore?.siteUrl;
265
- // Without a download link, the update's link is the one that opens V Store.
266
222
  const vStoreUrl = prompt.vStoreUrl ?? V_STORE_UPDATES_URL;
267
223
  useEffect(() => {
268
224
  if (!enabled || !currentVersion) return;
@@ -280,7 +236,6 @@ export function UpdateChecker({
280
236
  const dismissed = store ? await readDismissed(store, key) : null;
281
237
  if (!cancelled && dismissed !== found.version) setUpdate(found);
282
238
  };
283
- // A failed check must never get in the way of the app.
284
239
  run().catch(() => undefined);
285
240
  return () => {
286
241
  cancelled = true;
@@ -296,7 +251,6 @@ export function UpdateChecker({
296
251
  setUpdate(null);
297
252
  const { storage: store, storageKey: key } = latest.current;
298
253
  if (store) {
299
- // A failed write only means the prompt returns at the next start.
300
254
  Promise.resolve()
301
255
  .then(() => store.setItem(key, current.version))
302
256
  .catch(() => undefined);
@@ -31,9 +31,7 @@ export function freeTextAnswer(answer: string | undefined, chosen: readonly stri
31
31
  }
32
32
 
33
33
  export type ActivityQuestionCardProps = {
34
- /** The prompt's questions, as the agent asked them. */
35
34
  questions: ActivityQuestion[];
36
- /** The answers, keyed by question text (`ChoiceQuestion`'s `onSubmit` shape). */
37
35
  answers?: Record<string, string>;
38
36
  };
39
37
 
@@ -103,11 +101,6 @@ export function ActivityQuestionCard({ questions, answers }: ActivityQuestionCar
103
101
  );
104
102
  }
105
103
 
106
- /**
107
- * One option as recorded (web `OptionRow`): a 20 rounded mark (the letter, a
108
- * check when picked, a pencil for "Other"), the label and its description.
109
- * Picked: the row on the tertiary fill, the mark on primary, the label medium.
110
- */
111
104
  function RecordRow({
112
105
  mark,
113
106
  label,
@@ -144,7 +137,6 @@ function RecordRow({
144
137
  width: markSize,
145
138
  height: markSize,
146
139
  marginTop: 2,
147
- // A small rounded square, as the web `rounded-md` mark.
148
140
  borderRadius: 6,
149
141
  alignItems: "center",
150
142
  justifyContent: "center",
@@ -13,21 +13,16 @@ import { CodeBlock } from "./code-block";
13
13
  export type ActivityStepDetailStep = {
14
14
  type: string;
15
15
  detail?: string;
16
- /** Bash command, fuller than `detail`. */
17
16
  command?: string;
18
17
  output?: { text: string; exitCode?: number; truncated?: boolean };
19
18
  edits?: ReadonlyArray<{ oldText: string; newText: string }>;
20
- /** A written file's preview. */
21
19
  contentPreview?: string;
22
- /** The transcript copy dropped the output, edits or preview; the full step is still loading. */
23
20
  hasHiddenDetail?: boolean;
24
21
  };
25
22
 
26
23
  export type ActivityStepDetailProps = {
27
24
  step: ActivityStepDetailStep;
28
- /** Copy button on the transcript and preview blocks (native-ui adds no clipboard). */
29
25
  onCopy?: (text: string) => void | Promise<void>;
30
- /** Default "Loading output...". */
31
26
  loadingLabel?: string;
32
27
  };
33
28
 
@@ -810,10 +810,6 @@ function joinCommandText(verb: string, target: string): string {
810
810
  return `${verb} ${target}`;
811
811
  }
812
812
 
813
- /**
814
- * Past-tense phrase used when a step type is folded into a group summary line.
815
- * Deliberately plural/vague — the exact call is one click away in the fold.
816
- */
817
813
  const GROUP_PHRASES: Record<ActivityStep["type"], string> = {
818
814
  read: "read files",
819
815
  edit: "edited files",
@@ -841,7 +837,6 @@ function groupPhraseForStep(step: ActivityStep): string {
841
837
  if (step.type !== "tool") {
842
838
  return GROUP_PHRASES[step.type];
843
839
  }
844
- // Codex reports edits as a `file_change` tool call, not an edit step.
845
840
  if (isFileChangeTool(step)) {
846
841
  return GROUP_PHRASES.edit;
847
842
  }
@@ -1,7 +1,3 @@
1
- // Pure step types for the activity timeline: no React, so `@vvedantb/native-ui`
2
- // keeps a byte-identical copy (`src/ai/activity-step-types.ts`), with the step
3
- // labels and grouping that read them.
4
-
5
1
  /** One item in a todo checklist step (type "todos"). */
6
2
  export interface ActivityTodoItem {
7
3
  content: string;
@@ -54,43 +50,23 @@ export interface ActivityStep {
54
50
  | "notice"
55
51
  | "hook"
56
52
  | "status"
57
- /** A queued user message the agent took into this live turn (Steer). */
58
53
  | "steer";
59
54
  label: string;
60
55
  detail?: string;
61
- /** Full, unshortened path for file-type steps. Powers the chat File Viewer. */
62
56
  path?: string;
63
- /** `pending`: a planned step that has not started (sandbox startup stages). */
64
57
  status: "complete" | "active" | "pending";
65
- /** The tool_use id that produced this step (Claude only). */
66
58
  toolUseId?: string;
67
- /** Parent `Agent` tool_use id — set on steps that ran inside a subagent. */
68
59
  parentToolUseId?: string;
69
- /** Todo checklist snapshot (type "todos" only). */
70
60
  todos?: ActivityTodoItem[];
71
- /** Bash command (fuller than detail, capped). */
72
61
  command?: string;
73
- /** Tool result transcript (tail-capped). */
74
62
  output?: ActivityStepOutput;
75
- /** Edit before/after snippets. */
76
63
  edits?: ActivityStepEdit[];
77
- /** Codex file_change paths. */
78
64
  files?: string[];
79
- /** Write tool content head preview. */
80
65
  contentPreview?: string;
81
- /** True when the tool failed or exited non-zero. */
82
66
  isError?: boolean;
83
- /** Wall time from push → complete (ms). */
84
67
  durationMs?: number;
85
- /** AskUserQuestion prompt (type "question" only): the questions and options shown to the user. */
86
68
  questions?: ActivityQuestion[];
87
- /** AskUserQuestion answers keyed by question text. Absent when the turn ended without a structured answer. */
88
69
  answers?: Record<string, string>;
89
- /**
90
- * The transcript query stripped this step's expanded-only fields (`output`,
91
- * `edits`, `contentPreview`) to keep the chat subscription small. The row
92
- * still opens; the body fills in once the full payload is fetched.
93
- */
94
70
  hasHiddenDetail?: boolean;
95
71
  }
96
72
 
@@ -7,13 +7,9 @@ import { AgentTraceDescription, AgentTraceIcon, AgentTraceLine, AgentTraceTitle
7
7
  export type ActivityStepStatus = "running" | "complete" | "error";
8
8
 
9
9
  export type ActivityStepProps = {
10
- /** What the AI is doing, such as "Searching the web" or "Reading 3 files". */
11
10
  label: string;
12
- /** The tool's icon. Without one, the line shows the status icon only. */
13
11
  icon?: ComponentType<IconProps>;
14
- /** `running` pulses the label and shows a spinner; `complete` a check; `error` a warning in the danger colour. Default `complete`. */
15
12
  status?: ActivityStepStatus;
16
- /** Faded detail after the label, such as "Worked for 12s" (see `formatElapsed`). */
17
13
  description?: string;
18
14
  testID?: string;
19
15
  };
@@ -9,11 +9,6 @@ export interface ActivityRow {
9
9
  children?: ActivityRow[];
10
10
  }
11
11
 
12
- /**
13
- * Status-filler thinking labels emitted by older callback versions (and by
14
- * prod until the current callback deploys). The response/reasoning text is
15
- * shown directly, so these narration rows are pure noise — hide them.
16
- */
17
12
  const LEGACY_NOISE_LABELS = new Set([
18
13
  "Generating response...",
19
14
  "Generated response",
@@ -22,10 +17,8 @@ const LEGACY_NOISE_LABELS = new Set([
22
17
  "Finalizing response...",
23
18
  ]);
24
19
 
25
- /** Thinking labels that mark model reasoning rather than status narration. */
26
20
  const REASONING_LABELS = new Set(["Thinking...", "Thought"]);
27
21
 
28
- /** Placeholder details older callbacks attached to reasoning-label steps. */
29
22
  const FILLER_DETAILS = new Set([
30
23
  "Claude is reasoning...",
31
24
  "Codex is reasoning...",
@@ -51,7 +44,6 @@ export function normalizeStep(step: ActivityStep): ActivityStep | null {
51
44
  return step;
52
45
  }
53
46
 
54
- /** Builds one row per normalized step (no consecutive-type merging). */
55
47
  function stepsToRows(steps: ActivityStep[]): ActivityRow[] {
56
48
  const rows: ActivityRow[] = [];
57
49
  for (const raw of steps) {
@@ -62,10 +54,6 @@ function stepsToRows(steps: ActivityStep[]): ActivityRow[] {
62
54
  return rows;
63
55
  }
64
56
 
65
- /**
66
- * Row types that read as narration rather than work: they already summarise
67
- * themselves, so folding them into an action group would hide their only text.
68
- */
69
57
  const STANDALONE_TYPES = new Set<ActivityStep["type"]>([
70
58
  "todos",
71
59
  "notice",
@@ -95,7 +83,6 @@ export function groupActivityRows(rows: ActivityRow[]): ActivitySegment[] {
95
83
  segments.push({ kind: "reasoning", step: row.step });
96
84
  continue;
97
85
  }
98
- // Mid-turn reply text: it ends the tool run before it, like reasoning.
99
86
  if (row.step.type === "response") {
100
87
  segments.push({ kind: "response", step: row.step });
101
88
  continue;
@@ -1,8 +1,3 @@
1
- // The folded (Codex-style) rules of the web `ActivityTasks`
2
- // (`@vvedantb/ui` `activity-tasks.tsx`), as pure logic for an app that draws
3
- // the rows with the `AgentTrace` parts. The row text, the grouping and the
4
- // step types are byte-identical copies of the web files
5
- // (`activity-step-label.ts`, `activity-tasks-utils.ts`, `activity-step-types.ts`).
6
1
  import type { ActivityRow, ActivitySegment } from "./activity-tasks-utils";
7
2
  import { buildActivityRows, groupActivityRows } from "./activity-tasks-utils";
8
3
  import type { ActivityStep } from "./activity-step-types";
@@ -13,7 +8,6 @@ export const ACTIVITY_MAX_VISIBLE_BLOCKS = 8;
13
8
  /** Child rows a subagent step shows before "+N more" (web `MAX_VISIBLE_CHILDREN`). */
14
9
  export const ACTIVITY_MAX_VISIBLE_CHILDREN = 8;
15
10
 
16
- /** Step types the folded layout hides: the reply text and the status thinking lines. */
17
11
  const HIDDEN_TYPES = new Set<ActivityStep["type"]>(["thinking", "response"]);
18
12
 
19
13
  /**
@@ -23,14 +23,10 @@ import { ResponseText } from "./response-text";
23
23
  */
24
24
  export type AttachmentData = {
25
25
  id: string;
26
- /** `"source-document"` for a referenced source. Default a file. */
27
26
  type?: "file" | "source-document";
28
27
  filename?: string;
29
- /** MIME type, such as `image/png`. */
30
28
  mediaType?: string;
31
- /** A local or remote URI. An image with one shows a thumbnail. */
32
29
  url?: string;
33
- /** A source document's title. */
34
30
  title?: string;
35
31
  };
36
32
 
@@ -86,14 +82,8 @@ export function Attachments({ variant = "inline", className, ...props }: Attachm
86
82
 
87
83
  export type AttachmentProps = {
88
84
  data: AttachmentData;
89
- /** Shows a remove button, labelled "Remove" and the attachment name. */
90
85
  onRemove?: () => void;
91
- /**
92
- * Makes the chip a button, such as to open the file. The remove button stays a
93
- * separate target and does not call this. Without it the chip is not pressable.
94
- */
95
86
  onPress?: () => void;
96
- /** Names the chip button, with `onPress`. Default the attachment name (`getAttachmentLabel`). */
97
87
  accessibilityLabel?: string;
98
88
  testID?: string;
99
89
  };
@@ -101,7 +91,6 @@ export type AttachmentProps = {
101
91
  /** The hit target of a pressable chip, in points, on each axis. */
102
92
  export const ATTACHMENT_PRESS_TARGET = 48;
103
93
 
104
- /** A remove cross of 20 in a 32 row: the slop brings it to 44. */
105
94
  const REMOVE_SIZE = 20;
106
95
 
107
96
  /**
@@ -175,8 +164,6 @@ export function Attachment({ data, onRemove, onPress, accessibilityLabel, testID
175
164
  <Pressable
176
165
  accessibilityRole="button"
177
166
  accessibilityLabel={`Remove ${label}`}
178
- // A pressable label sits 6 before it, and the next chip 8 past this
179
- // chip's edge: the slop stops short of both, so neither steals a tap.
180
167
  hitSlop={{ ...touchSlop(REMOVE_SIZE), left: onPress ? 3 : touchSlop(REMOVE_SIZE).left, right: 8 }}
181
168
  onPress={onRemove}
182
169
  className="items-center justify-center rounded-full active:opacity-70"
@@ -19,16 +19,12 @@ import {
19
19
  } from "./collapsible";
20
20
  import { ResponseText } from "./response-text";
21
21
 
22
- // The web `ChainOfThought`, simplified: a fold of steps with search-result
23
- // chips. `ChainOfThoughtImage` and the step enter animation are not ported.
24
-
25
22
  /** Holds its open state (default closed), or takes `open` and `onOpenChange`. */
26
23
  export function ChainOfThought({ className, ...props }: CollapsibleProps) {
27
24
  return <Collapsible className={cn("w-full gap-4", className)} {...props} />;
28
25
  }
29
26
 
30
27
  export type ChainOfThoughtHeaderProps = Omit<CollapsibleTriggerProps, "children"> & {
31
- /** Default "Chain of Thought". A string, as it is also the accessibility label. */
32
28
  children?: string;
33
29
  icon?: ComponentType<IconProps>;
34
30
  };
@@ -71,7 +67,6 @@ export type ChainOfThoughtStepProps = ViewProps & {
71
67
  icon?: ComponentType<IconProps>;
72
68
  label: string;
73
69
  description?: string;
74
- /** `active` is the foreground, `complete` muted, `pending` muted at half opacity, as on the web. Default `complete`. */
75
70
  status?: ChainOfThoughtStepStatus;
76
71
  className?: string;
77
72
  children?: ReactNode;
@@ -5,9 +5,7 @@ import { cn } from "../cn";
5
5
  export type ChatJumpRailItem = { id: string; label: string };
6
6
 
7
7
  export type ChatJumpRailProps = {
8
- /** The messages to jump between, such as the user messages of a long thread. */
9
8
  items: ChatJumpRailItem[];
10
- /** Called with the `id` of the pressed item. */
11
9
  onJump: (id: string) => void;
12
10
  className?: string;
13
11
  testID?: string;
@@ -1,4 +1,3 @@
1
- /** Type and copy shared by the AI chat parts. */
2
1
  import { Platform } from "react-native";
3
2
  import type { TextSize } from "../controlStyles";
4
3