@vvedantb/native-ui 0.37.2 → 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 (385) hide show
  1. package/README.md +8 -7
  2. package/dist/Avatar.jsx +22 -19
  3. package/dist/BottomSheetContainer.jsx +0 -6
  4. package/dist/BulkActionBar.jsx +0 -24
  5. package/dist/Button.jsx +92 -116
  6. package/dist/Card.jsx +56 -50
  7. package/dist/ColorSwatches.jsx +0 -6
  8. package/dist/Dialog.jsx +0 -12
  9. package/dist/DropdownMenu.jsx +0 -10
  10. package/dist/EmptyState.jsx +0 -3
  11. package/dist/ExpoWebRoot.jsx +0 -6
  12. package/dist/Field.jsx +0 -17
  13. package/dist/FloatingSurface.jsx +95 -80
  14. package/dist/FloatingTabBar.jsx +0 -23
  15. package/dist/IconButton.jsx +0 -1
  16. package/dist/LoadingState.jsx +0 -6
  17. package/dist/PasswordInput.jsx +0 -15
  18. package/dist/PillTabs.jsx +39 -36
  19. package/dist/SearchInput.jsx +0 -13
  20. package/dist/SectionLabel.jsx +0 -1
  21. package/dist/SharedTransition.jsx +0 -3
  22. package/dist/Skeleton.jsx +0 -2
  23. package/dist/Spinner.jsx +0 -2
  24. package/dist/StatusDot.jsx +0 -5
  25. package/dist/Switch.jsx +32 -22
  26. package/dist/Tabs.jsx +27 -26
  27. package/dist/Textarea.jsx +0 -1
  28. package/dist/ThemeToggle.jsx +0 -1
  29. package/dist/Toast.jsx +80 -91
  30. package/dist/UpdateChecker.jsx +0 -1
  31. package/dist/ai/activity-question.jsx +0 -6
  32. package/dist/ai/activity-step-label.js +0 -6
  33. package/dist/ai/activity-step-types.js +0 -4
  34. package/dist/ai/activity-tasks-utils.js +0 -17
  35. package/dist/ai/activity-timeline.js +0 -8
  36. package/dist/ai/attachments.jsx +0 -2
  37. package/dist/ai/chain-of-thought.jsx +0 -3
  38. package/dist/ai/chat-text.js +0 -1
  39. package/dist/ai/chat-thread.jsx +0 -1
  40. package/dist/ai/choice-question.jsx +0 -10
  41. package/dist/ai/code-block.jsx +0 -31
  42. package/dist/ai/collapsible.jsx +0 -14
  43. package/dist/ai/conversation-context.js +0 -3
  44. package/dist/ai/conversation.jsx +2 -48
  45. package/dist/ai/file-chip.jsx +0 -2
  46. package/dist/ai/icon-button.jsx +0 -8
  47. package/dist/ai/index.js +0 -5
  48. package/dist/ai/message-context-menu.jsx +0 -7
  49. package/dist/ai/message.jsx +0 -21
  50. package/dist/ai/prompt-input-menu.jsx +0 -3
  51. package/dist/ai/prompt-input.jsx +0 -27
  52. package/dist/ai/response-text.jsx +0 -6
  53. package/dist/ai/sources.jsx +0 -1
  54. package/dist/ai/suggestion.jsx +0 -1
  55. package/dist/ai/trace.jsx +0 -11
  56. package/dist/ai/unified-diff.jsx +0 -4
  57. package/dist/app-root/AuthGroupGate.jsx +65 -0
  58. package/dist/app-root/SsoCallbackScreen.jsx +97 -0
  59. package/dist/app-root/fonts.js +88 -0
  60. package/dist/app-root/index.js +3 -0
  61. package/dist/auth/AuthScreen.jsx +250 -77
  62. package/dist/auth/GoogleSignInButton.jsx +0 -3
  63. package/dist/auth/SecondFactorScreen.jsx +18 -14
  64. package/dist/auth/SignInScreen.jsx +40 -34
  65. package/dist/auth/authErrors.js +0 -4
  66. package/dist/auth/clerkCore3.js +0 -7
  67. package/dist/auth/index.js +0 -4
  68. package/dist/auth/totp.js +0 -2
  69. package/dist/brand/GoogleMark.jsx +0 -1
  70. package/dist/brand/ProviderIcon.jsx +0 -2
  71. package/dist/brand/index.js +0 -3
  72. package/dist/brand/svg.js +0 -6
  73. package/dist/configureTheme.js +0 -9
  74. package/dist/controlStyles.js +0 -14
  75. package/dist/crash/LastCrashDialog.jsx +56 -0
  76. package/dist/crash/lastCrash.js +192 -0
  77. package/dist/entries/ai.js +0 -3
  78. package/dist/entries/ambient.js +0 -2
  79. package/dist/entries/app-root.js +1 -0
  80. package/dist/entries/auth.js +0 -4
  81. package/dist/entries/bottom-sheet.js +0 -2
  82. package/dist/entries/brand.js +0 -1
  83. package/dist/entries/button.js +0 -1
  84. package/dist/entries/crash.js +2 -0
  85. package/dist/entries/date-time.js +0 -2
  86. package/dist/entries/expo-router.js +0 -3
  87. package/dist/entries/expo-web-root.js +0 -2
  88. package/dist/entries/floating.js +0 -2
  89. package/dist/entries/generative-ui.js +0 -4
  90. package/dist/entries/gesture-handler.js +0 -3
  91. package/dist/entries/keyboard-controller.js +0 -3
  92. package/dist/entries/layout.js +0 -2
  93. package/dist/entries/markdown.js +0 -3
  94. package/dist/entries/marketing.js +0 -1
  95. package/dist/entries/page-title.js +0 -5
  96. package/dist/entries/password-input.js +0 -2
  97. package/dist/entries/paste-input.js +0 -3
  98. package/dist/entries/primitives.js +0 -6
  99. package/dist/entries/search-input.js +0 -2
  100. package/dist/entries/tab-bar.js +0 -2
  101. package/dist/entries/theme.js +4 -2
  102. package/dist/entries/toast.js +0 -3
  103. package/dist/entries/video.js +0 -2
  104. package/dist/entries/webview.js +0 -2
  105. package/dist/examples/AiChatGallery.jsx +0 -11
  106. package/dist/examples/ParityGallery.jsx +0 -12
  107. package/dist/floating.js +0 -8
  108. package/dist/generative-ui/GenerativeUiPanel.jsx +0 -2
  109. package/dist/generative-ui/components.jsx +0 -8
  110. package/dist/glass.js +55 -0
  111. package/dist/glassBlur.jsx +0 -12
  112. package/dist/highlight.js +0 -26
  113. package/dist/index.js +4 -2
  114. package/dist/loadingGrid.js +0 -13
  115. package/dist/markdown/Markdown.jsx +0 -59
  116. package/dist/markdown/MarkdownTable.jsx +0 -18
  117. package/dist/markdown/tableText.js +0 -5
  118. package/dist/marketing/UpgradeToProCard.jsx +0 -5
  119. package/dist/marketing/pricing.js +0 -3
  120. package/dist/media/ImageGallery.jsx +0 -16
  121. package/dist/media/imageZoom.js +0 -4
  122. package/dist/media/zoom-image-gesture.jsx +0 -8
  123. package/dist/media/zoomImage.js +0 -3
  124. package/dist/motion.js +0 -3
  125. package/dist/neutralTheme.js +158 -0
  126. package/dist/pagerSwipe.js +0 -16
  127. package/dist/palette.js +0 -10
  128. package/dist/primitives/button.jsx +0 -5
  129. package/dist/primitives/icon.jsx +0 -4
  130. package/dist/primitives/keyboard-controller.jsx +0 -27
  131. package/dist/primitives/native-only-animated-view.jsx +0 -5
  132. package/dist/primitives/overlay.jsx +0 -2
  133. package/dist/primitives/pager-gesture.jsx +3 -29
  134. package/dist/primitives/paste-input.jsx +0 -5
  135. package/dist/primitives/select.jsx +0 -10
  136. package/dist/primitives/sheet-drag.jsx +0 -3
  137. package/dist/primitives/sheet-gesture.jsx +0 -8
  138. package/dist/primitives/swipe-row-gesture.jsx +3 -45
  139. package/dist/primitives/text.jsx +0 -5
  140. package/dist/primitives/toast-drag-gesture.jsx +4 -24
  141. package/dist/primitives/web-click-guard.js +0 -3
  142. package/dist/primitives/window-layer.jsx +0 -14
  143. package/dist/push.js +0 -6
  144. package/dist/relativeTime.js +0 -13
  145. package/dist/settings/MoreFromProjectV.jsx +0 -5
  146. package/dist/settings/ThemeModePicker.jsx +2 -9
  147. package/dist/settings/projectVMobileApps.js +1 -6
  148. package/dist/sheetDrag.js +0 -10
  149. package/dist/swipeRow.js +0 -15
  150. package/dist/tabBarRoutes.js +0 -4
  151. package/dist/tabIndicator.js +0 -4
  152. package/dist/tailwind-preset.cjs +0 -54
  153. package/dist/tailwind-preset.d.cts +0 -8
  154. package/dist/theme.jsx +29 -21
  155. package/dist/themeModeStore.js +62 -0
  156. package/dist/themeModes.js +9 -0
  157. package/dist/toastChrome.js +0 -6
  158. package/dist/toastDrag.js +0 -14
  159. package/dist/toastStore.js +0 -4
  160. package/dist/updateCheck.js +0 -7
  161. package/dist/video/InlineVideo.jsx +0 -2
  162. package/dist/webview/htmlView.js +0 -5
  163. package/package.json +47 -19
  164. package/src/ArtifactList.tsx +0 -2
  165. package/src/Avatar.tsx +3 -3
  166. package/src/Badge.tsx +0 -1
  167. package/src/BottomSheetContainer.tsx +0 -11
  168. package/src/BulkActionBar.tsx +0 -66
  169. package/src/Button.tsx +4 -40
  170. package/src/CaptureButton.tsx +0 -1
  171. package/src/Card.tsx +3 -15
  172. package/src/Checkbox.tsx +0 -2
  173. package/src/ColorSwatches.tsx +0 -9
  174. package/src/ConfirmDialog.tsx +0 -7
  175. package/src/DateTimeField.tsx +0 -5
  176. package/src/Dialog.tsx +0 -27
  177. package/src/DividedList.tsx +0 -1
  178. package/src/DropdownMenu.tsx +0 -51
  179. package/src/EmptyState.tsx +0 -5
  180. package/src/ExpoWebRoot.tsx +0 -10
  181. package/src/Field.tsx +0 -14
  182. package/src/FloatingFAB.tsx +0 -3
  183. package/src/FloatingSurface.tsx +11 -8
  184. package/src/FloatingTabBar.tsx +0 -25
  185. package/src/IconButton.tsx +0 -5
  186. package/src/Input.tsx +0 -1
  187. package/src/Label.tsx +0 -1
  188. package/src/LabeledSwitchRow.tsx +0 -2
  189. package/src/ListRow.tsx +0 -12
  190. package/src/LoadingState.tsx +0 -12
  191. package/src/MenuSheet.tsx +0 -2
  192. package/src/PageIndicator.tsx +0 -2
  193. package/src/PageTitle.tsx +0 -15
  194. package/src/Pager.tsx +0 -9
  195. package/src/PasswordInput.tsx +0 -24
  196. package/src/PillTabs.tsx +3 -11
  197. package/src/PinnedBotTile.tsx +0 -6
  198. package/src/Progress.tsx +0 -3
  199. package/src/ReactionRow.tsx +0 -8
  200. package/src/ScreenContainer.tsx +0 -4
  201. package/src/SearchInput.tsx +0 -25
  202. package/src/SectionLabel.tsx +0 -2
  203. package/src/Select.tsx +0 -6
  204. package/src/Separator.tsx +0 -2
  205. package/src/SharedTransition.tsx +0 -7
  206. package/src/Sheet.tsx +0 -3
  207. package/src/SheetRow.tsx +0 -12
  208. package/src/Skeleton.tsx +0 -10
  209. package/src/Spinner.tsx +0 -6
  210. package/src/StackPageHeader.tsx +0 -16
  211. package/src/StatGrid.tsx +0 -1
  212. package/src/StatusDot.tsx +0 -6
  213. package/src/SurfaceRow.tsx +0 -12
  214. package/src/SwipeableRow.tsx +0 -4
  215. package/src/Switch.tsx +3 -4
  216. package/src/Tabs.tsx +3 -27
  217. package/src/Textarea.tsx +0 -2
  218. package/src/ThemeToggle.tsx +0 -1
  219. package/src/Toast.tsx +3 -19
  220. package/src/UpdateChecker.tsx +0 -46
  221. package/src/ai/activity-question.tsx +0 -8
  222. package/src/ai/activity-step-detail.tsx +0 -5
  223. package/src/ai/activity-step-label.ts +0 -5
  224. package/src/ai/activity-step-types.ts +0 -24
  225. package/src/ai/activity-step.tsx +0 -4
  226. package/src/ai/activity-tasks-utils.ts +0 -13
  227. package/src/ai/activity-timeline.ts +0 -6
  228. package/src/ai/attachments.tsx +0 -13
  229. package/src/ai/chain-of-thought.tsx +0 -5
  230. package/src/ai/chat-jump-rail.tsx +0 -2
  231. package/src/ai/chat-text.ts +0 -1
  232. package/src/ai/chat-thread.tsx +0 -9
  233. package/src/ai/choice-question.tsx +0 -36
  234. package/src/ai/code-block.tsx +0 -52
  235. package/src/ai/collapsible.tsx +0 -12
  236. package/src/ai/conversation-context.ts +0 -14
  237. package/src/ai/conversation.tsx +0 -58
  238. package/src/ai/file-chip.tsx +0 -1
  239. package/src/ai/icon-button.tsx +0 -17
  240. package/src/ai/index.ts +0 -5
  241. package/src/ai/message-action-sheet.tsx +0 -8
  242. package/src/ai/message-context-menu.tsx +0 -22
  243. package/src/ai/message-quote.tsx +0 -4
  244. package/src/ai/message.tsx +0 -66
  245. package/src/ai/prompt-input-menu.tsx +0 -19
  246. package/src/ai/prompt-input.tsx +0 -97
  247. package/src/ai/reasoning.tsx +0 -6
  248. package/src/ai/reply-quote-chip.tsx +0 -5
  249. package/src/ai/response-text.tsx +0 -8
  250. package/src/ai/shimmer.tsx +0 -2
  251. package/src/ai/sources.tsx +0 -3
  252. package/src/ai/subagent-cards.tsx +0 -13
  253. package/src/ai/suggestion.tsx +0 -4
  254. package/src/ai/tool-approval-card.tsx +0 -14
  255. package/src/ai/trace.tsx +0 -23
  256. package/src/ai/unified-diff.tsx +0 -16
  257. package/src/ai/use-streaming-disclosure.ts +0 -4
  258. package/src/app-root/AuthGroupGate.tsx +38 -0
  259. package/src/app-root/SsoCallbackScreen.tsx +52 -0
  260. package/src/app-root/fonts.ts +53 -0
  261. package/src/app-root/index.ts +6 -0
  262. package/src/auth/AccountScreens.tsx +0 -16
  263. package/src/auth/AuthProviders.tsx +0 -13
  264. package/src/auth/AuthScreen.tsx +95 -6
  265. package/src/auth/GoogleSignInButton.tsx +0 -12
  266. package/src/auth/SecondFactorScreen.tsx +17 -15
  267. package/src/auth/SignInScreen.tsx +103 -105
  268. package/src/auth/authErrors.ts +0 -6
  269. package/src/auth/clerkCore3.ts +0 -6
  270. package/src/auth/index.ts +0 -4
  271. package/src/auth/totp.ts +0 -13
  272. package/src/brand/AppIcons.tsx +0 -6
  273. package/src/brand/AppMark.tsx +0 -5
  274. package/src/brand/AppWordmark.tsx +0 -7
  275. package/src/brand/GoogleMark.tsx +0 -4
  276. package/src/brand/ProviderIcon.tsx +0 -6
  277. package/src/brand/familyApps.ts +0 -2
  278. package/src/brand/index.ts +0 -3
  279. package/src/brand/svg.ts +0 -9
  280. package/src/configureTheme.ts +0 -10
  281. package/src/controlStyles.ts +0 -12
  282. package/src/crash/LastCrashDialog.tsx +36 -0
  283. package/src/crash/lastCrash.ts +218 -0
  284. package/src/entries/ai.ts +0 -3
  285. package/src/entries/ambient.ts +0 -2
  286. package/src/entries/app-root.ts +1 -0
  287. package/src/entries/auth.ts +0 -4
  288. package/src/entries/bottom-sheet.ts +0 -2
  289. package/src/entries/brand.ts +0 -1
  290. package/src/entries/button.ts +0 -1
  291. package/src/entries/crash.ts +13 -0
  292. package/src/entries/date-time.ts +0 -2
  293. package/src/entries/expo-router.ts +0 -3
  294. package/src/entries/expo-web-root.ts +0 -2
  295. package/src/entries/floating.ts +0 -2
  296. package/src/entries/generative-ui.ts +0 -4
  297. package/src/entries/gesture-handler.ts +0 -3
  298. package/src/entries/keyboard-controller.ts +0 -3
  299. package/src/entries/layout.ts +0 -2
  300. package/src/entries/markdown.ts +0 -3
  301. package/src/entries/marketing.ts +0 -1
  302. package/src/entries/page-title.ts +0 -5
  303. package/src/entries/password-input.ts +0 -2
  304. package/src/entries/paste-input.ts +0 -3
  305. package/src/entries/primitives.ts +0 -6
  306. package/src/entries/search-input.ts +0 -2
  307. package/src/entries/tab-bar.ts +0 -2
  308. package/src/entries/theme.ts +8 -2
  309. package/src/entries/toast.ts +0 -3
  310. package/src/entries/video.ts +0 -2
  311. package/src/entries/webview.ts +0 -2
  312. package/src/examples/AiChatGallery.tsx +0 -11
  313. package/src/examples/ParityGallery.tsx +0 -25
  314. package/src/floating.ts +0 -6
  315. package/src/generative-ui/GenerativeUiPanel.tsx +0 -15
  316. package/src/generative-ui/components.tsx +0 -9
  317. package/src/generative-ui/context.ts +0 -2
  318. package/src/glass.ts +31 -0
  319. package/src/glassBlur.tsx +0 -15
  320. package/src/highlight.ts +1 -21
  321. package/src/index.ts +7 -2
  322. package/src/loadingGrid.ts +0 -12
  323. package/src/markdown/Markdown.tsx +0 -71
  324. package/src/markdown/MarkdownTable.tsx +0 -23
  325. package/src/markdown/tableText.ts +0 -3
  326. package/src/marketing/PricingModal.tsx +0 -13
  327. package/src/marketing/UpgradeToProCard.tsx +0 -14
  328. package/src/marketing/pricing.ts +0 -12
  329. package/src/media/ImageGallery.tsx +0 -18
  330. package/src/media/MediaCard.tsx +0 -8
  331. package/src/media/imageZoom.ts +0 -4
  332. package/src/media/zoom-image-gesture.tsx +0 -9
  333. package/src/media/zoomImage.ts +0 -5
  334. package/src/motion.ts +0 -3
  335. package/src/neutralTheme.ts +127 -0
  336. package/src/pagerSwipe.ts +0 -13
  337. package/src/palette.ts +0 -10
  338. package/src/pressScale.ts +0 -7
  339. package/src/primitives/button.tsx +0 -4
  340. package/src/primitives/card.tsx +0 -1
  341. package/src/primitives/icon.tsx +0 -2
  342. package/src/primitives/input.tsx +0 -4
  343. package/src/primitives/keyboard-controller.tsx +0 -25
  344. package/src/primitives/keyboard-parts.tsx +0 -27
  345. package/src/primitives/native-only-animated-view.tsx +0 -5
  346. package/src/primitives/overlay.tsx +0 -25
  347. package/src/primitives/pager-gesture.tsx +0 -20
  348. package/src/primitives/paste-input.tsx +0 -4
  349. package/src/primitives/paste-parts.tsx +0 -1
  350. package/src/primitives/select.tsx +0 -18
  351. package/src/primitives/sheet-drag.tsx +0 -19
  352. package/src/primitives/sheet-gesture.tsx +0 -22
  353. package/src/primitives/swipe-row-gesture.tsx +0 -33
  354. package/src/primitives/switch.tsx +0 -4
  355. package/src/primitives/text.tsx +0 -4
  356. package/src/primitives/toast-drag-gesture.tsx +0 -13
  357. package/src/primitives/web-click-guard.ts +0 -2
  358. package/src/primitives/window-layer.tsx +0 -18
  359. package/src/push.ts +0 -15
  360. package/src/relativeTime.ts +0 -21
  361. package/src/router/RouterStackPageHeader.tsx +0 -1
  362. package/src/settings/MoreFromProjectV.tsx +0 -8
  363. package/src/settings/SettingsEmptyState.tsx +0 -2
  364. package/src/settings/SettingsSection.tsx +0 -3
  365. package/src/settings/SettingsToggleRow.tsx +0 -4
  366. package/src/settings/ThemeModePicker.tsx +2 -16
  367. package/src/settings/projectVMobileApps.ts +0 -8
  368. package/src/sheetDrag.ts +0 -9
  369. package/src/swipeRow.ts +0 -23
  370. package/src/tabBarRoutes.ts +0 -13
  371. package/src/tabIndicator.ts +0 -5
  372. package/src/tailwind-preset.cjs +0 -54
  373. package/src/tailwind-preset.d.cts +0 -8
  374. package/src/theme.tsx +11 -2
  375. package/src/themeModeStore.ts +85 -0
  376. package/src/themeModes.ts +10 -0
  377. package/src/toastChrome.ts +0 -6
  378. package/src/toastDrag.ts +0 -13
  379. package/src/toastStore.ts +0 -7
  380. package/src/updateCheck.ts +0 -15
  381. package/src/video/InlineVideo.tsx +0 -5
  382. package/src/webview/HtmlView.tsx +0 -23
  383. package/src/webview/HtmlView.web.tsx +0 -1
  384. package/src/webview/htmlView.ts +0 -5
  385. package/types/prism-react-renderer.d.ts +22 -0
package/dist/Toast.jsx CHANGED
@@ -12,19 +12,14 @@ import { sizeStyle, textStyle, typeStyle } from "./controlStyles";
12
12
  import { FLOATING_INSET } from "./floating";
13
13
  import { TOAST_ICON_SIZE, TOAST_ICONS, toastIconColor, toastShadowStyle, toastSurfaceStyle } from "./toastChrome";
14
14
  import { tokens } from "./tokens";
15
+ import { useGlass } from "./glass";
15
16
  import { useLargerText } from "./theme";
16
17
  import { useScheme } from "./useScheme";
17
18
  import { NativeOnlyAnimatedView } from "./primitives/native-only-animated-view";
18
19
  import { ToastDragContext } from "./toastDrag";
19
20
  import { getToasts, subscribeToasts, toast } from "./toastStore";
20
-
21
- // On iOS the overlay draws above RN `Modal`s, so toasts show over dialogs (as
22
- // sonner does on the web). On Android a `Modal` still covers them.
23
21
  const FullWindowOverlay = Platform.OS === "ios" ? RNFullWindowOverlay : Fragment;
24
22
  const toastShadow = toastShadowStyle(Platform.OS);
25
-
26
- // Down from the top edge and back up the way it came, the exit 20% quicker:
27
- // the reader is done with it.
28
23
  const TOAST_ENTER = FadeInUp.duration(200).easing(EASE_OUT);
29
24
  const TOAST_EXIT = FadeOutUp.duration(160).easing(EASE_OUT);
30
25
 
@@ -81,8 +76,6 @@ export function Toaster(t0) {
81
76
  }
82
77
  return t7;
83
78
  }
84
-
85
- /** The web filled 24 icons (`toastChrome`), or a spinner while loading. */
86
79
  function _temp(item) {
87
80
  return <ToastCard key={item.id} item={item} />;
88
81
  }
@@ -143,12 +136,6 @@ function ToastIcon(t0) {
143
136
  }
144
137
  return t3;
145
138
  }
146
-
147
- /**
148
- * Closes `item` after its `duration`, counting only while it is not `held`:
149
- * a finger on the toast pauses the time left, and lifting it resumes. A
150
- * toast replaced in place (same id, new item) starts its own time afresh.
151
- */
152
139
  function useToastTimer(item, held) {
153
140
  const $ = _c(6);
154
141
  let t0;
@@ -195,12 +182,13 @@ function useToastTimer(item, held) {
195
182
  useEffect(t1, t2);
196
183
  }
197
184
  function ToastCard(t0) {
198
- const $ = _c(56);
185
+ const $ = _c(57);
199
186
  const {
200
187
  item
201
188
  } = t0;
202
189
  const largerText = useLargerText();
203
190
  const scheme = useScheme();
191
+ const glass = useGlass("surface");
204
192
  const Drag = useContext(ToastDragContext);
205
193
  const [held, setHeld] = useState(false);
206
194
  useToastTimer(item, held);
@@ -251,146 +239,147 @@ function ToastCard(t0) {
251
239
  t5 = $[10];
252
240
  }
253
241
  let t6;
254
- if ($[11] !== t5) {
255
- t6 = [t5, toastShadow];
256
- $[11] = t5;
257
- $[12] = t6;
242
+ if ($[11] !== glass || $[12] !== t5) {
243
+ t6 = [t5, toastShadow, glass];
244
+ $[11] = glass;
245
+ $[12] = t5;
246
+ $[13] = t6;
258
247
  } else {
259
- t6 = $[12];
248
+ t6 = $[13];
260
249
  }
261
250
  const t7 = `toast-${item.id}`;
262
251
  const t8 = !item.action;
263
252
  let t9;
264
- if ($[13] !== item.id) {
253
+ if ($[14] !== item.id) {
265
254
  t9 = () => toast.dismiss(item.id);
266
- $[13] = item.id;
267
- $[14] = t9;
255
+ $[14] = item.id;
256
+ $[15] = t9;
268
257
  } else {
269
- t9 = $[14];
258
+ t9 = $[15];
270
259
  }
271
260
  let t10;
272
- if ($[15] !== item) {
261
+ if ($[16] !== item) {
273
262
  t10 = <ToastIcon item={item} />;
274
- $[15] = item;
275
- $[16] = t10;
263
+ $[16] = item;
264
+ $[17] = t10;
276
265
  } else {
277
- t10 = $[16];
266
+ t10 = $[17];
278
267
  }
279
268
  const t11 = largerText ? "text-lg" : "text-sm";
280
269
  let t12;
281
- if ($[17] !== t11) {
270
+ if ($[18] !== t11) {
282
271
  t12 = cn("font-instrument-sans-medium", t11);
283
- $[17] = t11;
284
- $[18] = t12;
272
+ $[18] = t11;
273
+ $[19] = t12;
285
274
  } else {
286
- t12 = $[18];
275
+ t12 = $[19];
287
276
  }
288
277
  let t13;
289
- if ($[19] !== scheme) {
278
+ if ($[20] !== scheme) {
290
279
  t13 = textStyle("foreground", scheme);
291
- $[19] = scheme;
292
- $[20] = t13;
280
+ $[20] = scheme;
281
+ $[21] = t13;
293
282
  } else {
294
- t13 = $[20];
283
+ t13 = $[21];
295
284
  }
296
285
  let t14;
297
- if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
286
+ if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
298
287
  t14 = typeStyle("medium");
299
- $[21] = t14;
288
+ $[22] = t14;
300
289
  } else {
301
- t14 = $[21];
290
+ t14 = $[22];
302
291
  }
303
292
  let t15;
304
- if ($[22] !== largerText) {
293
+ if ($[23] !== largerText) {
305
294
  t15 = largerText ? sizeStyle("text-lg") : sizeStyle("text-sm", "snug");
306
- $[22] = largerText;
307
- $[23] = t15;
295
+ $[23] = largerText;
296
+ $[24] = t15;
308
297
  } else {
309
- t15 = $[23];
298
+ t15 = $[24];
310
299
  }
311
300
  let t16;
312
- if ($[24] !== t13 || $[25] !== t15) {
301
+ if ($[25] !== t13 || $[26] !== t15) {
313
302
  t16 = [t13, t14, t15];
314
- $[24] = t13;
315
- $[25] = t15;
316
- $[26] = t16;
303
+ $[25] = t13;
304
+ $[26] = t15;
305
+ $[27] = t16;
317
306
  } else {
318
- t16 = $[26];
307
+ t16 = $[27];
319
308
  }
320
309
  let t17;
321
- if ($[27] !== item.title || $[28] !== t12 || $[29] !== t16) {
310
+ if ($[28] !== item.title || $[29] !== t12 || $[30] !== t16) {
322
311
  t17 = <Text className={t12} style={t16}>{item.title}</Text>;
323
- $[27] = item.title;
324
- $[28] = t12;
325
- $[29] = t16;
326
- $[30] = t17;
312
+ $[28] = item.title;
313
+ $[29] = t12;
314
+ $[30] = t16;
315
+ $[31] = t17;
327
316
  } else {
328
- t17 = $[30];
317
+ t17 = $[31];
329
318
  }
330
319
  let t18;
331
- if ($[31] !== item.description || $[32] !== largerText || $[33] !== scheme) {
320
+ if ($[32] !== item.description || $[33] !== largerText || $[34] !== scheme) {
332
321
  t18 = item.description ? <Text className={cn("font-instrument-sans", largerText ? "text-base" : "text-sm")} style={textStyle("muted", scheme)}>{item.description}</Text> : null;
333
- $[31] = item.description;
334
- $[32] = largerText;
335
- $[33] = scheme;
336
- $[34] = t18;
322
+ $[32] = item.description;
323
+ $[33] = largerText;
324
+ $[34] = scheme;
325
+ $[35] = t18;
337
326
  } else {
338
- t18 = $[34];
327
+ t18 = $[35];
339
328
  }
340
329
  let t19;
341
- if ($[35] !== t17 || $[36] !== t18) {
330
+ if ($[36] !== t17 || $[37] !== t18) {
342
331
  t19 = <View className="min-w-0 flex-1">{t17}{t18}</View>;
343
- $[35] = t17;
344
- $[36] = t18;
345
- $[37] = t19;
332
+ $[36] = t17;
333
+ $[37] = t18;
334
+ $[38] = t19;
346
335
  } else {
347
- t19 = $[37];
336
+ t19 = $[38];
348
337
  }
349
338
  let t20;
350
- if ($[38] !== item.action || $[39] !== item.id || $[40] !== scheme) {
339
+ if ($[39] !== item.action || $[40] !== item.id || $[41] !== scheme) {
351
340
  t20 = item.action ? <Pressable accessibilityRole="button" hitSlop={8} onPress={() => {
352
341
  item.action?.onPress();
353
342
  toast.dismiss(item.id);
354
343
  }} className="rounded-full bg-secondary px-3 py-1.5 active:opacity-70"><Text className="font-instrument-sans-medium text-sm" style={[textStyle("foreground", scheme), typeStyle("medium")]}>{item.action.label}</Text></Pressable> : null;
355
- $[38] = item.action;
356
- $[39] = item.id;
357
- $[40] = scheme;
358
- $[41] = t20;
344
+ $[39] = item.action;
345
+ $[40] = item.id;
346
+ $[41] = scheme;
347
+ $[42] = t20;
359
348
  } else {
360
- t20 = $[41];
349
+ t20 = $[42];
361
350
  }
362
351
  let t21;
363
- if ($[42] !== t10 || $[43] !== t19 || $[44] !== t20 || $[45] !== t7 || $[46] !== t8 || $[47] !== t9) {
352
+ if ($[43] !== t10 || $[44] !== t19 || $[45] !== t20 || $[46] !== t7 || $[47] !== t8 || $[48] !== t9) {
364
353
  t21 = <Pressable testID={t7} accessible={t8} accessibilityRole="button" accessibilityHint="Closes the message" onPress={t9} className="flex-row items-center gap-3 px-4 py-3">{t10}{t19}{t20}</Pressable>;
365
- $[42] = t10;
366
- $[43] = t19;
367
- $[44] = t20;
368
- $[45] = t7;
369
- $[46] = t8;
370
- $[47] = t9;
371
- $[48] = t21;
354
+ $[43] = t10;
355
+ $[44] = t19;
356
+ $[45] = t20;
357
+ $[46] = t7;
358
+ $[47] = t8;
359
+ $[48] = t9;
360
+ $[49] = t21;
372
361
  } else {
373
- t21 = $[48];
362
+ t21 = $[49];
374
363
  }
375
364
  let t22;
376
- if ($[49] !== t21 || $[50] !== t6) {
365
+ if ($[50] !== t21 || $[51] !== t6) {
377
366
  t22 = <View style={t6}>{t21}</View>;
378
- $[49] = t21;
379
- $[50] = t6;
380
- $[51] = t22;
367
+ $[50] = t21;
368
+ $[51] = t6;
369
+ $[52] = t22;
381
370
  } else {
382
- t22 = $[51];
371
+ t22 = $[52];
383
372
  }
384
373
  const surface = t22;
385
374
  let t23;
386
- if ($[52] !== Drag || $[53] !== item.id || $[54] !== surface) {
375
+ if ($[53] !== Drag || $[54] !== item.id || $[55] !== surface) {
387
376
  t23 = <NativeOnlyAnimatedView entering={TOAST_ENTER} exiting={TOAST_EXIT} layout={LinearTransition}>{Drag ? <Drag onDismiss={() => toast.dismiss(item.id)} onHoldChange={setHeld}>{surface}</Drag> : surface}</NativeOnlyAnimatedView>;
388
- $[52] = Drag;
389
- $[53] = item.id;
390
- $[54] = surface;
391
- $[55] = t23;
377
+ $[53] = Drag;
378
+ $[54] = item.id;
379
+ $[55] = surface;
380
+ $[56] = t23;
392
381
  } else {
393
- t23 = $[55];
382
+ t23 = $[56];
394
383
  }
395
384
  return t23;
396
385
  }
@@ -209,7 +209,6 @@ export function UpdatePrompt(t0) {
209
209
 
210
210
  /** Where "Later" is remembered, for example `expo-secure-store` or AsyncStorage. */
211
211
  function _temp() {}
212
- /** The version Later hid. An unreadable store means nothing was dismissed. */
213
212
  async function readDismissed(storage, key) {
214
213
  try {
215
214
  return await storage.getItem(key);
@@ -109,12 +109,6 @@ export function ActivityQuestionCard(t0) {
109
109
  }
110
110
  return t1;
111
111
  }
112
-
113
- /**
114
- * One option as recorded (web `OptionRow`): a 20 rounded mark (the letter, a
115
- * check when picked, a pencil for "Other"), the label and its description.
116
- * Picked: the row on the tertiary fill, the mark on primary, the label medium.
117
- */
118
112
  function RecordRow(t0) {
119
113
  const $ = _c(56);
120
114
  const {
@@ -636,11 +636,6 @@ function joinCommandText(verb, target) {
636
636
  }
637
637
  return `${verb} ${target}`;
638
638
  }
639
-
640
- /**
641
- * Past-tense phrase used when a step type is folded into a group summary line.
642
- * Deliberately plural/vague — the exact call is one click away in the fold.
643
- */
644
639
  const GROUP_PHRASES = {
645
640
  read: "read files",
646
641
  edit: "edited files",
@@ -667,7 +662,6 @@ function groupPhraseForStep(step) {
667
662
  if (step.type !== "tool") {
668
663
  return GROUP_PHRASES[step.type];
669
664
  }
670
- // Codex reports edits as a `file_change` tool call, not an edit step.
671
665
  if (isFileChangeTool(step)) {
672
666
  return GROUP_PHRASES.edit;
673
667
  }
@@ -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
 
7
3
  /** One choice offered by an AskUserQuestion prompt. */
@@ -3,17 +3,8 @@
3
3
  * inside that agent (keyed by parentToolUseId → toolUseId).
4
4
  */
5
5
 
6
- /**
7
- * Status-filler thinking labels emitted by older callback versions (and by
8
- * prod until the current callback deploys). The response/reasoning text is
9
- * shown directly, so these narration rows are pure noise — hide them.
10
- */
11
6
  const LEGACY_NOISE_LABELS = new Set(["Generating response...", "Generated response", "Streaming response...", "Streamed response", "Finalizing response..."]);
12
-
13
- /** Thinking labels that mark model reasoning rather than status narration. */
14
7
  const REASONING_LABELS = new Set(["Thinking...", "Thought"]);
15
-
16
- /** Placeholder details older callbacks attached to reasoning-label steps. */
17
8
  const FILLER_DETAILS = new Set(["Claude is reasoning...", "Codex is reasoning...", "Opencode is reasoning...", "Cursor is reasoning...", "Receiving reply..."]);
18
9
 
19
10
  /**
@@ -35,8 +26,6 @@ export function normalizeStep(step) {
35
26
  }
36
27
  return step;
37
28
  }
38
-
39
- /** Builds one row per normalized step (no consecutive-type merging). */
40
29
  function stepsToRows(steps) {
41
30
  const rows = [];
42
31
  for (const raw of steps) {
@@ -48,11 +37,6 @@ function stepsToRows(steps) {
48
37
  }
49
38
  return rows;
50
39
  }
51
-
52
- /**
53
- * Row types that read as narration rather than work: they already summarise
54
- * themselves, so folding them into an action group would hide their only text.
55
- */
56
40
  const STANDALONE_TYPES = new Set(["todos", "notice", "status", "question", "steer"]);
57
41
 
58
42
  /** One block in the activity timeline: prose, a lone row, or a folded run. */
@@ -73,7 +57,6 @@ export function groupActivityRows(rows) {
73
57
  });
74
58
  continue;
75
59
  }
76
- // Mid-turn reply text: it ends the tool run before it, like reasoning.
77
60
  if (row.step.type === "response") {
78
61
  segments.push({
79
62
  kind: "response",
@@ -1,17 +1,9 @@
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
-
7
1
  import { buildActivityRows, groupActivityRows } from "./activity-tasks-utils";
8
2
  /** Blocks a settled timeline shows before "Show N more" (web `MAX_VISIBLE_ROWS`). */
9
3
  export const ACTIVITY_MAX_VISIBLE_BLOCKS = 8;
10
4
 
11
5
  /** Child rows a subagent step shows before "+N more" (web `MAX_VISIBLE_CHILDREN`). */
12
6
  export const ACTIVITY_MAX_VISIBLE_CHILDREN = 8;
13
-
14
- /** Step types the folded layout hides: the reply text and the status thinking lines. */
15
7
  const HIDDEN_TYPES = new Set(["thinking", "response"]);
16
8
 
17
9
  /**
@@ -97,8 +97,6 @@ export function Attachments(t0) {
97
97
  }
98
98
  /** The hit target of a pressable chip, in points, on each axis. */
99
99
  export const ATTACHMENT_PRESS_TARGET = 48;
100
-
101
- /** A remove cross of 20 in a 32 row: the slop brings it to 44. */
102
100
  const REMOVE_SIZE = 20;
103
101
 
104
102
  /**
@@ -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,4 +1,3 @@
1
- /** Type and copy shared by the AI chat parts. */
2
1
  import { Platform } from "react-native";
3
2
  /**
4
3
  * `body` is message text: `text-sm` (14 / 20), as the web `MessageContent`.
@@ -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