@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/src/Sheet.tsx CHANGED
@@ -38,11 +38,8 @@ export function SheetClose(props: OverlayPressableProps) {
38
38
 
39
39
  export type SheetContentProps = ViewProps & {
40
40
  className?: string;
41
- /** Close on a backdrop tap. Default `true`. */
42
41
  dismissible?: boolean;
43
- /** Grab handle above the content. Default `true`. */
44
42
  showHandle?: boolean;
45
- /** Called once the sheet is on screen: focus its field here, as `DialogContent`'s `onShow`. */
46
43
  onShow?: () => void;
47
44
  };
48
45
 
package/src/SheetRow.tsx CHANGED
@@ -10,25 +10,13 @@ import { useScheme } from "./useScheme";
10
10
  import { usePressed } from "./usePressed";
11
11
 
12
12
  export type SheetRowProps = {
13
- /** A Tabler icon at the start. */
14
13
  icon?: ComponentType<IconProps>;
15
- /** At the start in place of `icon`: a mark that is not a Tabler icon, such as `ProviderIcon`. */
16
14
  leading?: ReactNode;
17
15
  title: string;
18
- /** Muted line under the title, also the accessibility hint. */
19
16
  detail?: string;
20
- /**
21
- * Makes the row one choice of a picker: `true` draws a check at the end.
22
- * Set (`true` or `false`) on every row of the picker, so assistive tech
23
- * reads each as a `radio` (a `checkbox` with `multiple`) with `checked`.
24
- * Leave it out on an action row.
25
- */
26
17
  active?: boolean;
27
- /** A picker where several rows can be on at once (or a single on/off row): `checkbox`, not `radio`. */
28
18
  multiple?: boolean;
29
- /** A destructive action: title and icon in `palette.danger`. */
30
19
  danger?: boolean;
31
- /** The web `text-warning` item (such as Archive): title and icon in `palette.warning`. */
32
20
  warning?: boolean;
33
21
  disabled?: boolean;
34
22
  onPress?: () => void;
package/src/Skeleton.tsx CHANGED
@@ -67,19 +67,13 @@ export function CardSkeleton() {
67
67
  );
68
68
  }
69
69
 
70
- /** Title widths, row by row, so a list of placeholders does not read as one block. */
71
70
  const TITLE_WIDTHS: readonly `${number}%`[] = ["72%", "54%", "84%", "62%", "46%", "78%"];
72
71
 
73
72
  export type SkeletonRowProps = {
74
- /** The row's place in its list: the title width varies with it. */
75
73
  index?: number;
76
- /** A round mark before the text, this wide (a status dot, an avatar). */
77
74
  leading?: number;
78
- /** A title only, or a title over a shorter detail line. */
79
75
  lines?: 1 | 2;
80
- /** A short block at the end, where the real row shows its age. Default on. */
81
76
  trailing?: boolean;
82
- /** The real row's height, so nothing moves when it loads. Default 56. */
83
77
  minHeight?: number;
84
78
  className?: string;
85
79
  };
@@ -103,13 +97,9 @@ export function SkeletonRow({ index = 0, leading, lines = 1, trailing = true, mi
103
97
  }
104
98
 
105
99
  export type SkeletonListProps = {
106
- /** What is loading, for assistive tech ("Loading sessions"). */
107
100
  label: string;
108
- /** Rows to draw. Default 6. */
109
101
  count?: number;
110
- /** A `ListDivider` between rows, as a `DividedList`. Default on. */
111
102
  divided?: boolean;
112
- /** One placeholder row, such as a `SkeletonRow` with this `index`. */
113
103
  renderRow: (index: number) => ReactNode;
114
104
  className?: string;
115
105
  };
package/src/Spinner.tsx CHANGED
@@ -10,19 +10,13 @@ import { tokens } from "./tokens";
10
10
  import { useScheme } from "./useScheme";
11
11
 
12
12
  export type SpinnerProps = Omit<ActivityIndicatorProps, "size" | "color"> & {
13
- /** `sm` is 16, the web `sm` and the `Button` loading ring. `md` is the small system spinner (20), `lg` the large one. `default` is an alias of `md`. A number sets the size on Android; iOS picks small below 30. Default `"md"`. */
14
13
  size?: "sm" | "md" | "default" | "lg" | number;
15
- /** `"muted"` (default) uses the muted text colour, `"inherit"` the foreground. Native has no `currentColor`. */
16
14
  tone?: "muted" | "inherit";
17
- /** Overrides `tone`. */
18
15
  color?: string;
19
- /** Hide from assistive tech, for example inside a labelled button. Default `false`. */
20
16
  decorative?: boolean;
21
17
  };
22
18
 
23
- /** The system `"small"` spinner box on iOS, Android and React Native Web. */
24
19
  const SYSTEM_SMALL = 20;
25
- /** Web `size-4`. No platform has a 16 spinner, so `sm` is the small one scaled down in a 16 box. */
26
20
  const SM = 16;
27
21
 
28
22
  function systemSize(size: NonNullable<SpinnerProps["size"]>) {
@@ -11,28 +11,13 @@ import { tokens } from "./tokens";
11
11
  import { useScheme } from "./useScheme";
12
12
 
13
13
  export type StackPageHeaderProps = {
14
- /** The accessible name of the header, and the centre text when `centre` is not set. */
15
14
  title: string;
16
- /**
17
- * Custom content for the centre, such as a 20 px avatar beside a name. It
18
- * replaces the `PageTitle`. `title` stays the accessible name. Wrap long
19
- * text in a `PageTitle` (or `Text` with `numberOfLines`) so it can truncate:
20
- * the centre shrinks (`min-w-0`) and clips what does not fit.
21
- */
22
15
  centre?: ReactNode;
23
- /** Muted line under the title, up to two lines. */
24
16
  description?: string;
25
- /** Shows a back `HeaderIconButton` at the start that calls this. No button without it. */
26
17
  onBack?: () => void;
27
- /** Names the back button. Default "Back". */
28
18
  backLabel?: string;
29
- /** Actions at the end, such as a `HeaderIconButton`. */
30
19
  headerRight?: ReactNode;
31
20
  backTestID?: string;
32
- /**
33
- * Pad the top by the safe-area inset. Default `true`. Pass `false` under a
34
- * native header or inside a view that already pads the inset.
35
- */
36
21
  safeTop?: boolean;
37
22
  testID?: string;
38
23
  className?: string;
@@ -66,7 +51,6 @@ export function StackPageHeader({
66
51
  const largerText = useLargerText();
67
52
  const [rightWidth, setRightWidth] = useState(0);
68
53
  const top = safeTop ? insets.top : 0;
69
- // `HeaderIconButton` is 48 across (56 with larger text).
70
54
  const backWidth = onBack ? (largerText ? 56 : 48) : 0;
71
55
  const side = { minWidth: Math.max(backWidth, headerRight != null ? rightWidth : 0) };
72
56
  const descriptionSize = largerText ? "text-base" : "text-sm";
package/src/StatGrid.tsx CHANGED
@@ -8,7 +8,6 @@ export type StatGridItem = { label: string; value: string; testID?: string };
8
8
 
9
9
  export type StatGridProps = {
10
10
  items: StatGridItem[];
11
- /** Tiles per row. Default 2. */
12
11
  columns?: 2 | 3;
13
12
  testID?: string;
14
13
  };
package/src/StatusDot.tsx CHANGED
@@ -21,16 +21,10 @@ export type StatusTone =
21
21
 
22
22
  export type StatusDotProps = ViewProps & {
23
23
  tone: StatusTone;
24
- /** `"sm"` (6) or `"md"` (8). Default `"sm"`. */
25
24
  size?: "sm" | "md";
26
25
  className?: string;
27
26
  };
28
27
 
29
- /**
30
- * The `info` blue: Tailwind `blue-500` in light and the lighter `blue-400` in
31
- * dark. Local to the dot: `tokens.css` has no `--info`, so it is not a
32
- * `palette` key.
33
- */
34
28
  const INFO = { light: "#3b82f6", dark: "#60a5fa" } as const;
35
29
 
36
30
  function toneColor(tone: StatusTone, scheme: "light" | "dark") {
@@ -13,26 +13,14 @@ export const SURFACE_ROW = {
13
13
 
14
14
  export type SurfaceRowProps = {
15
15
  children: ReactNode;
16
- /** Colour of the stripe down the leading edge: the row's status. Omit for a row with no status. */
17
16
  accentColor?: string;
18
- /** Fill. Default `tokens.color.surface`, the web `bg-card`. */
19
17
  backgroundColor?: string;
20
- /** A 1 wide hairline in this colour, such as an error row's tinted border. */
21
18
  borderColor?: string;
22
- /** Names the row for VoiceOver and TalkBack; the row is one button. */
23
19
  accessibilityLabel: string;
24
- /** Read after the label, such as the status and age. */
25
20
  accessibilityHint?: string;
26
21
  onPress: () => void;
27
- /**
28
- * A long press, such as the row menu (the web right-click), with a light
29
- * haptic as it fires. VoiceOver and TalkBack reach it as the `longpress`
30
- * action, named by `longPressLabel`.
31
- */
32
22
  onLongPress?: () => void;
33
- /** The spoken name of the long-press action. Default "More actions". */
34
23
  longPressLabel?: string;
35
- /** Classes on the body, in place of the web row inset `p-2.5 pl-3`. */
36
24
  className?: string;
37
25
  testID?: string;
38
26
  };
@@ -2,13 +2,9 @@ import { createContext, useContext, type ComponentType, type ReactNode } from "r
2
2
  import type { SwipeAction } from "./swipeRow";
3
3
 
4
4
  export type SwipeableRowProps = {
5
- /** Revealed at the left by a swipe right. The first one commits on a full swipe and sits at the screen edge. */
6
5
  leadingActions?: readonly SwipeAction[];
7
- /** Revealed at the right by a swipe left. The first one commits on a full swipe and sits at the screen edge. */
8
6
  trailingActions?: readonly SwipeAction[];
9
- /** `false` (such as in select mode) leaves the row still under the finger. */
10
7
  enabled?: boolean;
11
- /** The row's fill while it moves, so the actions behind do not show through. Default the screen background. */
12
8
  backgroundColor?: string;
13
9
  children: ReactNode;
14
10
  };
package/src/Switch.tsx CHANGED
@@ -3,6 +3,7 @@ import { Switch as PrimitiveSwitch } from "./primitives/switch";
3
3
  import { cn } from "./cn";
4
4
  import { selectionHaptic } from "./haptics";
5
5
  import { switchColors, switchSize, touchSlop, type SwitchSize } from "./controlStyles";
6
+ import { useGlass } from "./glass";
6
7
  import { useLargerText } from "./theme";
7
8
  import { useScheme } from "./useScheme";
8
9
 
@@ -14,10 +15,8 @@ type SwitchProps = Omit<
14
15
  checked?: boolean;
15
16
  onValueChange?: (value: boolean) => void;
16
17
  onCheckedChange?: (value: boolean) => void;
17
- /** Track fill when on or off, in place of the `palette` colours. */
18
18
  onColor?: string;
19
19
  offColor?: string;
20
- /** `sm` (default) is the web `Switch`, 36 × 20; `md` is 40 × 24 with a 20 thumb. */
21
20
  size?: SwitchSize;
22
21
  };
23
22
 
@@ -27,6 +26,7 @@ const Switch = React.forwardRef<
27
26
  >(({ value, checked, onValueChange, onCheckedChange, onColor, offColor, size: sizeName, ...props }, ref) => {
28
27
  const resolvedValue = checked ?? value ?? false;
29
28
  const colors = switchColors(resolvedValue, useScheme());
29
+ const glass = useGlass("small");
30
30
  const trackColor = resolvedValue ? onColor : offColor;
31
31
  const size = switchSize(useLargerText(), sizeName);
32
32
 
@@ -41,14 +41,13 @@ const Switch = React.forwardRef<
41
41
  ref={ref}
42
42
  checked={resolvedValue}
43
43
  onCheckedChange={handleCheckedChange}
44
- // The web size on screen, a 44 target to touch.
45
44
  hitSlop={touchSlop(size.width, size.height)}
46
45
  accessibilityRole="switch"
47
46
  className={cn(size.track, "justify-center")}
48
47
  trackStyle={
49
48
  trackColor ? { backgroundColor: trackColor, borderColor: trackColor } : colors.track
50
49
  }
51
- thumbStyle={colors.thumb}
50
+ thumbStyle={[colors.thumb, glass]}
52
51
  thumbClassName={cn(size.thumb, resolvedValue ? size.on : size.off)}
53
52
  {...props}
54
53
  accessibilityState={{
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