@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
@@ -1,6 +1,3 @@
1
- // `svg.ts`, `familyApps.ts` and `vProAppBenefits.ts` are byte-identical copies of
2
- // `@vvedantb/ui` `src/brand/` (pure data, no imports beyond each other). A test
3
- // in this package fails when they differ: change both together.
4
1
  export { APP_ICONS, IconBee, IconEva, IconProjectV, IconVelth, IconVerve, IconVhub, IconVibot, IconVmem } from "./AppIcons";
5
2
  export type { AppIconComponent, AppIconProps } from "./AppIcons";
6
3
  export { AppMark } from "./AppMark";
package/src/brand/svg.ts CHANGED
@@ -1,6 +1,3 @@
1
- // Geometry and raw SVG strings for the family app marks. No imports, so the
2
- // asset script can load this file directly with Node.
3
-
4
1
  /** Every mark. `eva` and `bee` are marks and icons only: they are not family apps, so `FAMILY_APPS` leaves them out. */
5
2
  export const APP_NAMES = ["projectv", "vibot", "vhub", "vmem", "verve", "velth", "eva", "bee"] as const;
6
3
 
@@ -14,13 +11,9 @@ export const MARK_STROKE_WIDTH = 50;
14
11
  export const TILE_RADIUS = 224;
15
12
 
16
13
  export type MarkShape = {
17
- /** Filled shapes (no stroke) versus lines (50 wide, round caps by default). */
18
14
  kind: "fill" | "stroke";
19
- /** Path data on the 1024 grid. */
20
15
  paths: readonly string[];
21
- /** Stroke width override on the 1024 grid. Defaults to `MARK_STROKE_WIDTH`. */
22
16
  strokeWidth?: number;
23
- /** Line cap override. Defaults to `"round"`. */
24
17
  linecap?: "butt" | "round";
25
18
  };
26
19
 
@@ -101,7 +94,6 @@ export const APP_MARKS: Record<AppName, MarkShape> = {
101
94
  type Point = [number, number];
102
95
  type Box = [minX: number, minY: number, maxX: number, maxY: number];
103
96
 
104
- /** Roots in (0, 1) of the derivative of a Bezier with 1D control values `v` (quadratic or cubic). */
105
97
  function bezierExtrema(v: number[]): number[] {
106
98
  const roots: number[] = [];
107
99
  if (v.length === 3) {
@@ -127,7 +119,6 @@ function bezierAt(v: number[], t: number): number {
127
119
  return v.length === 3 ? u * u * p0 + 2 * u * t * p1 + t * t * p2 : u ** 3 * p0 + 3 * u * u * t * p1 + 3 * u * t * t * p2 + t ** 3 * p3;
128
120
  }
129
121
 
130
- /** Extreme points of an SVG elliptical arc (endpoint form, no rotation), including both ends. */
131
122
  function arcPoints(from: Point, [rx0, ry0, , large, sweep, x, y]: [number, number, number, number, number, number, number]): Point[] {
132
123
  const [x0, y0] = from;
133
124
  let rx = Math.abs(rx0);
@@ -2,7 +2,6 @@ import { palette, type Palette } from "./palette";
2
2
  import { tokens, type Tokens } from "./tokens";
3
3
  import { fontFamily, type ThemeFonts } from "./typography";
4
4
 
5
- /** `tokens` and `palette` value types with the literal hex widened to `string` and `readonly` dropped. */
6
5
  type Widen<T> = T extends string ? string : { -readonly [K in keyof T]: Widen<T[K]> };
7
6
 
8
7
  /** The `tokens.color` shape: each key a `{ light, dark }` pair, except `white` and `black`. */
@@ -12,21 +11,13 @@ export type ThemeColors = Widen<Tokens["color"]>;
12
11
  export type ThemePalette = Widen<Palette>;
13
12
 
14
13
  export type ThemeConfig = {
15
- /** Overrides for `tokens.color` (neutrals and surfaces). Keys not given keep the package value. */
16
14
  color?: Partial<ThemeColors>;
17
- /** Overrides for `palette` (primary, danger, overlay and the other web semantic colours). */
18
15
  palette?: Partial<ThemePalette>;
19
- /** Overrides for `fontFamily`: the family name for each weight, as the app loads the fonts. */
20
16
  font?: Partial<ThemeFonts>;
21
17
  };
22
18
 
23
19
  type ColorValue = string | { light: string; dark: string };
24
20
 
25
- /**
26
- * Copies each given key onto `target`. A `{ light, dark }` pair is copied into
27
- * the existing pair object, so values that hold the pair (`floatingFill`,
28
- * `floatingHairline`, `floatingSolidFill`) follow it.
29
- */
30
21
  function assignValues(
31
22
  target: { readonly [key: string]: ColorValue },
32
23
  source: { readonly [key: string]: ColorValue | undefined },
@@ -39,7 +30,6 @@ function assignValues(
39
30
  }
40
31
  }
41
32
 
42
- /** Bumped by each `configureTheme` call; `useScheme` redraws on it. */
43
33
  let themeVersion = 0;
44
34
  const themeListeners = new Set<() => void>();
45
35
 
@@ -1,12 +1,3 @@
1
- /**
2
- * Colours for `Button`, `Input`, `Textarea`, the `Select` trigger, `Switch`,
3
- * `Checkbox`, `Tabs`, `Card` and component text, taken from `palette` and
4
- * `tokens` instead of NativeWind theme keys (`bg-primary`, `bg-input`,
5
- * `text-foreground`) that apps do not define, or define without a dark value.
6
- * Also text weights and sizes as styles, the page title type, the
7
- * `SearchInput` metrics, the compact window test for dialogs and the
8
- * touch-target maths. No React Native import, so the tests can load this file.
9
- */
10
1
  import { palette, withAlpha } from "./palette";
11
2
  import { tokens } from "./tokens";
12
3
 
@@ -148,7 +139,6 @@ export function typeStyle(weight: TypeWeight) {
148
139
  return { fontWeight: FONT_WEIGHT[weight] };
149
140
  }
150
141
 
151
- /** Tailwind `text-*` sizes with their default line heights, in points. */
152
142
  const TEXT_SIZE = {
153
143
  "text-xs": { fontSize: 12, lineHeight: 16 },
154
144
  "text-sm": { fontSize: 14, lineHeight: 20 },
@@ -160,7 +150,6 @@ const TEXT_SIZE = {
160
150
 
161
151
  export type TextSize = keyof typeof TEXT_SIZE;
162
152
 
163
- /** Tailwind `leading-tight`, `leading-snug` and `leading-relaxed`, as multiples of the size. */
164
153
  const LEADING = { tight: 1.25, snug: 1.375, relaxed: 1.625 } as const;
165
154
 
166
155
  export type TextLeading = keyof typeof LEADING;
@@ -178,7 +167,6 @@ export function sizeStyle(size: TextSize, leading?: TextLeading) {
178
167
  return { fontSize, lineHeight: leading ? fontSize * LEADING[leading] : lineHeight };
179
168
  }
180
169
 
181
- /** Tailwind `tracking-tight` and `tracking-wide`, in em. */
182
170
  const TRACKING = { tight: -0.025, wide: 0.025 } as const;
183
171
 
184
172
  /**
@@ -0,0 +1,36 @@
1
+ import { Share } from "react-native";
2
+ import { ConfirmDialog } from "../ConfirmDialog";
3
+ import { crashDetails, dismissLastCrash, useLastCrash } from "./lastCrash";
4
+
5
+ export type LastCrashDialogProps = {
6
+ appName: string;
7
+ onCopy?: (text: string) => Promise<unknown>;
8
+ testID?: string;
9
+ };
10
+
11
+ /**
12
+ * "<App> closed after an error", once at start when the last session ended in
13
+ * a fatal error saved by `installCrashCapture`: the message, and a button for
14
+ * the full details to paste into a chat. Mount it once in the root layout.
15
+ */
16
+ export function LastCrashDialog({ appName, onCopy, testID = "last-crash" }: LastCrashDialogProps) {
17
+ const crash = useLastCrash();
18
+ return (
19
+ <ConfirmDialog
20
+ testID={testID}
21
+ open={crash !== null}
22
+ title={`${appName} closed after an error`}
23
+ description={crash ? `${crash.name}: ${crash.message}` : undefined}
24
+ cancelLabel="Dismiss"
25
+ confirmLabel={onCopy ? "Copy details" : "Share details"}
26
+ onCancel={dismissLastCrash}
27
+ onConfirm={() => {
28
+ if (crash) {
29
+ const details = crashDetails(crash, appName);
30
+ void (onCopy ? onCopy(details) : Share.share({ message: details })).catch(() => {});
31
+ }
32
+ dismissLastCrash();
33
+ }}
34
+ />
35
+ );
36
+ }
@@ -0,0 +1,218 @@
1
+ import { useSyncExternalStore } from "react";
2
+
3
+ /** Where the crash is kept between launches, for example `expo-secure-store`. */
4
+ export type CrashStorage = {
5
+ getItem: (key: string) => Promise<string | null>;
6
+ setItem: (key: string, value: string) => Promise<void>;
7
+ removeItem: (key: string) => Promise<void>;
8
+ };
9
+
10
+ /** What a fatal error leaves behind for the next launch. */
11
+ export type FatalReport = { name: string; message: string; stack: string };
12
+
13
+ export type LastCrash = FatalReport & {
14
+ at: number;
15
+ version: string;
16
+ };
17
+
18
+ type SecureStoreModule = {
19
+ getItemAsync: (key: string) => Promise<string | null>;
20
+ setItemAsync: (key: string, value: string) => Promise<void>;
21
+ deleteItemAsync: (key: string) => Promise<void>;
22
+ };
23
+ type ConstantsModule = { default?: { expoConfig?: { version?: string } | null } };
24
+
25
+ const KEY = "v.lastCrash";
26
+ const MAX_CHARS = 1_800;
27
+ const FATAL_SAVE_MS = 1_000;
28
+
29
+ let secureStore: CrashStorage | null | undefined;
30
+ function defaultStorage(): CrashStorage | null {
31
+ if (secureStore === undefined) {
32
+ try {
33
+ const store = require("expo-secure-store") as SecureStoreModule;
34
+ secureStore = {
35
+ getItem: (key) => store.getItemAsync(key),
36
+ setItem: (key, value) => store.setItemAsync(key, value),
37
+ removeItem: (key) => store.deleteItemAsync(key),
38
+ };
39
+ } catch {
40
+ secureStore = null;
41
+ }
42
+ }
43
+ return secureStore;
44
+ }
45
+
46
+ function defaultVersion(): string {
47
+ try {
48
+ const constants = require("expo-constants") as ConstantsModule;
49
+ return constants.default?.expoConfig?.version ?? "?";
50
+ } catch {
51
+ return "?";
52
+ }
53
+ }
54
+
55
+ type Settings = { storage: CrashStorage | null; version: string };
56
+ let settings: Settings | null = null;
57
+ const current = (): Settings => (settings ??= { storage: defaultStorage(), version: defaultVersion() });
58
+
59
+ let last: LastCrash | null = null;
60
+ const listeners = new Set<() => void>();
61
+ function publish(next: LastCrash | null) {
62
+ last = next;
63
+ for (const listener of listeners) listener();
64
+ }
65
+
66
+ type Caught = Error | object | string | number | boolean | null | undefined;
67
+ const text = (value: unknown) => (typeof value === "string" && value ? value : undefined);
68
+ const field = (caught: Caught, name: "name" | "message" | "stack") =>
69
+ typeof caught === "object" && caught !== null ? text((caught as Record<string, unknown>)[name]) : undefined;
70
+
71
+ /** The name, message and a short stack of a thrown value. Never the value itself. */
72
+ export function fatalReport(caught: Caught): FatalReport {
73
+ return {
74
+ name: field(caught, "name") ?? "Error",
75
+ message: (field(caught, "message") ?? String(caught)).slice(0, 500),
76
+ stack: (field(caught, "stack") ?? "").split("\n").slice(0, 15).join("\n"),
77
+ };
78
+ }
79
+
80
+ function isLastCrash(value: unknown): value is LastCrash {
81
+ if (typeof value !== "object" || value === null) return false;
82
+ const crash = value as Record<string, unknown>;
83
+ return typeof crash.at === "number" && ["version", "name", "message", "stack"].every((key) => typeof crash[key] === "string");
84
+ }
85
+
86
+ /** Saves the report for the next launch. Never throws. */
87
+ export async function saveLastCrash(report: FatalReport): Promise<void> {
88
+ try {
89
+ const { storage, version } = current();
90
+ if (!storage) return;
91
+ const crash: LastCrash = { at: Date.now(), version, ...report };
92
+ let json = JSON.stringify(crash);
93
+ if (json.length > MAX_CHARS) {
94
+ json = JSON.stringify({ ...crash, stack: crash.stack.slice(0, Math.max(0, MAX_CHARS - (json.length - crash.stack.length))) });
95
+ }
96
+ await storage.setItem(KEY, json);
97
+ } catch {
98
+ }
99
+ }
100
+
101
+ /** Reads the saved crash, so `LastCrashDialog` shows it. Never throws. */
102
+ export async function loadLastCrash(): Promise<void> {
103
+ try {
104
+ const saved = await current().storage?.getItem(KEY);
105
+ const parsed: unknown = saved ? JSON.parse(saved) : null;
106
+ if (isLastCrash(parsed)) publish(parsed);
107
+ } catch {
108
+ }
109
+ }
110
+
111
+ /** Shows `crash` in `LastCrashDialog` without saving it. For the gallery. */
112
+ export function showLastCrash(crash: LastCrash | null) {
113
+ publish(crash);
114
+ }
115
+
116
+ /** Forgets the shown crash. */
117
+ export function dismissLastCrash() {
118
+ publish(null);
119
+ void current().storage?.removeItem(KEY).catch(() => {});
120
+ }
121
+
122
+ /** The crash saved by the last session, or `null`. */
123
+ export function useLastCrash(): LastCrash | null {
124
+ return useSyncExternalStore(
125
+ (listener) => {
126
+ listeners.add(listener);
127
+ return () => listeners.delete(listener);
128
+ },
129
+ () => last,
130
+ () => last,
131
+ );
132
+ }
133
+
134
+ /** The text Copy puts on the clipboard. */
135
+ export function crashDetails(crash: LastCrash, appName: string): string {
136
+ return [`${appName} ${crash.version}, ${new Date(crash.at).toISOString()}`, `${crash.name}: ${crash.message}`, crash.stack].join("\n");
137
+ }
138
+
139
+ type GlobalHandler = (error: Error, isFatal?: boolean) => void;
140
+ type ErrorUtilsShape = { getGlobalHandler: () => GlobalHandler; setGlobalHandler: (handler: GlobalHandler) => void };
141
+ type Tracker = (options: { allRejections: boolean; onUnhandled: (id: number, error: Error) => void }) => void;
142
+
143
+ function errorUtilsOf(env: object): ErrorUtilsShape | null {
144
+ const value = (env as { ErrorUtils?: Partial<ErrorUtilsShape> }).ErrorUtils;
145
+ return typeof value?.getGlobalHandler === "function" && typeof value.setGlobalHandler === "function" ? (value as ErrorUtilsShape) : null;
146
+ }
147
+
148
+ function trackerOf(env: object): Tracker | null {
149
+ const tracker = (env as { HermesInternal?: { enablePromiseRejectionTracker?: unknown } }).HermesInternal?.enablePromiseRejectionTracker;
150
+ return typeof tracker === "function" ? (tracker as Tracker) : null;
151
+ }
152
+
153
+ function logUncaught(kind: "unhandled-rejection" | "uncaught-error", caught: Caught, isFatal?: boolean) {
154
+ try {
155
+ const report = fatalReport(caught);
156
+ console.error("[uncaught]", {
157
+ kind,
158
+ isFatal,
159
+ errorName: report.name,
160
+ errorMessage: report.message.slice(0, 200),
161
+ stack: report.stack.split("\n").slice(0, 6).join("\n"),
162
+ });
163
+ } catch {
164
+ }
165
+ }
166
+
167
+ let installed = false;
168
+
169
+ export type CrashCaptureOptions = {
170
+ storage?: CrashStorage | null;
171
+ version?: string;
172
+ env?: object;
173
+ };
174
+
175
+ /**
176
+ * Call once at the top of the root layout, outside any component. It:
177
+ * - logs unhandled promise rejections and uncaught errors to `console.error`,
178
+ * which release builds otherwise swallow;
179
+ * - saves a fatal error before the app closes (waiting at most one second);
180
+ * - loads the crash the last session saved, for `LastCrashDialog`.
181
+ * Installs once; later calls return `false`. Never throws.
182
+ */
183
+ export function installCrashCapture(options: CrashCaptureOptions = {}): boolean {
184
+ if (installed) return false;
185
+ try {
186
+ installed = true;
187
+ settings = {
188
+ storage: options.storage === undefined ? defaultStorage() : options.storage,
189
+ version: options.version ?? defaultVersion(),
190
+ };
191
+ const env = options.env ?? globalThis;
192
+ trackerOf(env)?.({ allRejections: true, onUnhandled: (_id, error) => logUncaught("unhandled-rejection", error) });
193
+ const errorUtils = errorUtilsOf(env);
194
+ if (errorUtils) {
195
+ const previous = errorUtils.getGlobalHandler();
196
+ errorUtils.setGlobalHandler((error, isFatal) => {
197
+ logUncaught("uncaught-error", error, isFatal);
198
+ if (!isFatal) {
199
+ previous(error, isFatal);
200
+ return;
201
+ }
202
+ const timeout = new Promise<void>((resolve) => setTimeout(resolve, FATAL_SAVE_MS));
203
+ void Promise.race([saveLastCrash(fatalReport(error)), timeout]).finally(() => previous(error, isFatal));
204
+ });
205
+ }
206
+ void loadLastCrash();
207
+ return true;
208
+ } catch {
209
+ return false;
210
+ }
211
+ }
212
+
213
+ /** For tests only. */
214
+ export function resetCrashCaptureForTests() {
215
+ installed = false;
216
+ settings = null;
217
+ publish(null);
218
+ }
package/src/entries/ai.ts CHANGED
@@ -1,4 +1 @@
1
- // `@vvedantb/native-ui/ai`: the AI chat parts. Reaches no optional peer, not
2
- // even a loader; the composer uses `react-native-safe-area-context` and the
3
- // shimmer `react-native-reanimated`, both required peers.
4
1
  export * from "../ai";
@@ -1,3 +1 @@
1
- // `@vvedantb/native-ui/ambient`. Loads `expo-linear-gradient` only through its
2
- // optional-peer loader; without it the background is solid.
3
1
  export { AmbientBackground } from "../AmbientBackground";
@@ -0,0 +1 @@
1
+ export * from "../app-root";
@@ -1,5 +1 @@
1
- // `@vvedantb/native-ui/auth`: `AuthProviders`, `SignInScreen`, `SignUpScreen`,
2
- // `GoogleSignInButton` and the auth frame. Not on the root entry: it imports
3
- // `@clerk/expo`, `convex`, `expo-auth-session`, `expo-web-browser` and
4
- // `expo-router`, and Metro does not tree-shake.
5
1
  export * from "../auth";
@@ -1,3 +1 @@
1
- // `@vvedantb/native-ui/bottom-sheet`. Imports `@swmansion/react-native-bottom-sheet`
2
- // (an optional peer).
3
1
  export { BottomSheetContainer } from "../BottomSheetContainer";
@@ -1,2 +1 @@
1
- // `@vvedantb/native-ui/brand`: the family app marks and their pure data, and `GoogleMark`.
2
1
  export * from "../brand";
@@ -1,3 +1,2 @@
1
- // `@vvedantb/native-ui/button`.
2
1
  export { Button } from "../Button";
3
2
  export type { ButtonProps, ButtonShape, ButtonSize, ButtonVariant } from "../Button";
@@ -0,0 +1,13 @@
1
+ export { LastCrashDialog } from "../crash/LastCrashDialog";
2
+ export type { LastCrashDialogProps } from "../crash/LastCrashDialog";
3
+ export {
4
+ crashDetails,
5
+ dismissLastCrash,
6
+ fatalReport,
7
+ installCrashCapture,
8
+ loadLastCrash,
9
+ saveLastCrash,
10
+ showLastCrash,
11
+ useLastCrash,
12
+ } from "../crash/lastCrash";
13
+ export type { CrashCaptureOptions, CrashStorage, FatalReport, LastCrash } from "../crash/lastCrash";
@@ -1,4 +1,2 @@
1
- // `@vvedantb/native-ui/date-time`. Imports
2
- // `@react-native-community/datetimepicker` and `dayjs`.
3
1
  export { DateTimeField } from "../DateTimeField";
4
2
  export type { DateTimeFieldProps } from "../DateTimeField";
@@ -1,6 +1,3 @@
1
- // `@vvedantb/native-ui/expo-router`: components that need `expo-router`, an
2
- // optional peer. Not on the root, `/layout` or `/page-title` entries: they
3
- // never import it.
4
1
  export { RouterStackPageHeader, goBackOrReplace } from "../router/RouterStackPageHeader";
5
2
  export type { RouterStackPageHeaderProps } from "../router/RouterStackPageHeader";
6
3
  export { TabScreen } from "../router/TabScreen";
@@ -1,4 +1,2 @@
1
- // `@vvedantb/native-ui/expo-web-root`: `ExpoWebRoot` for `app/+html.tsx`. Not on
2
- // the root entry: it imports `expo-router/html`, and Metro does not tree-shake.
3
1
  export { ExpoWebRoot, EXPO_WEB_VIEWPORT, expoWebBackgroundCss } from "../ExpoWebRoot";
4
2
  export type { ExpoWebRootProps, ExpoWebRootViewport } from "../ExpoWebRoot";
@@ -1,5 +1,3 @@
1
- // `@vvedantb/native-ui/floating`: floating surfaces, glass blur targets and
2
- // metrics. Reaches `expo-blur` only through its optional-peer loader.
3
1
  export {
4
2
  FLOATING_INSET,
5
3
  FLOATING_TAB_BAR_HEIGHT,
@@ -1,7 +1,3 @@
1
- // `@vvedantb/native-ui/generative-ui`: agent-composed panels from the shared
2
- // catalog (`@vvedantb/server/generative-ui`), as the web
3
- // `@vvedantb/ui/generative-ui`. Imports `@json-render/react-native` (an
4
- // optional peer): the only entry that does, so an app without it bundles none.
5
1
  export { GenerativeUiPanel } from "../generative-ui/GenerativeUiPanel";
6
2
  export type { GenerativeUiPanelProps } from "../generative-ui/GenerativeUiPanel";
7
3
  export { generativeUiNativeCatalog } from "../generative-ui/renderer";
@@ -1,4 +1 @@
1
- // `@vvedantb/native-ui/gesture-handler`. Imports `react-native-gesture-handler`
2
- // (an optional peer): the only entry that does, so an app without it bundles
3
- // the `PanResponder` sheets as before.
4
1
  export { GestureHandlerProvider } from "../primitives/sheet-gesture";
@@ -1,4 +1 @@
1
- // `@vvedantb/native-ui/keyboard-controller`. Imports
2
- // `react-native-keyboard-controller` (an optional peer): the only entry that
3
- // does, so an app without it keeps React Native's `KeyboardAvoidingView`.
4
1
  export { KeyboardControllerProvider } from "../primitives/keyboard-controller";
@@ -1,5 +1,3 @@
1
- // `@vvedantb/native-ui/layout`: screen containers, page headers, section
2
- // labels and settings chrome.
3
1
  export { SafeAreaContainer } from "../SafeAreaContainer";
4
2
  export { ScreenContainer } from "../ScreenContainer";
5
3
  export type { ScreenContainerProps } from "../ScreenContainer";
@@ -1,5 +1,2 @@
1
- // `@vvedantb/native-ui/markdown`: `Markdown`, chat markdown styled as the web
2
- // `.markdown` block. Not on the root entry: it imports the optional peer
3
- // `react-native-marked`, and Metro does not tree-shake.
4
1
  export { Markdown, markdownStyles, inlineCodeStyle, MARKDOWN_SCALE, MARKDOWN_LIST } from "../markdown/Markdown";
5
2
  export type { MarkdownHeadings, MarkdownProps } from "../markdown/Markdown";
@@ -1,4 +1,3 @@
1
- // `@vvedantb/native-ui/marketing`: the upgrade card and pricing modal.
2
1
  export { UpgradeToProCard } from "../marketing/UpgradeToProCard";
3
2
  export type { UpgradeToProCardProps } from "../marketing/UpgradeToProCard";
4
3
  export { PricingModal } from "../marketing/PricingModal";
@@ -1,8 +1,3 @@
1
- // `@vvedantb/native-ui/page-title`: `PageTitle`, `PageHeader` and (from 0.5.0)
2
- // `StackPageHeader`. Reaches no optional peer, not even a loader.
3
- // `StackPageHeader` imports one Tabler icon (a required peer) for its back
4
- // button; Metro does not tree-shake by default, so that bundles the Tabler
5
- // package with this entry.
6
1
  export { PageTitle, PageHeader } from "../PageTitle";
7
2
  export type { PageTitleProps, PageHeaderProps } from "../PageTitle";
8
3
  export { StackPageHeader } from "../StackPageHeader";
@@ -1,4 +1,2 @@
1
- // `@vvedantb/native-ui/password-input`: `PasswordInput` on its own. Reaches no
2
- // optional peer, not even a loader.
3
1
  export { PasswordInput } from "../PasswordInput";
4
2
  export type { PasswordInputProps } from "../PasswordInput";
@@ -1,4 +1 @@
1
- // `@vvedantb/native-ui/paste-input`. Imports `expo-paste-input` (an optional
2
- // peer with native code): the only entry that does, so an app without it keeps
3
- // text-only paste and bundles as before.
4
1
  export { PasteInputProvider } from "../primitives/paste-input";
@@ -1,7 +1,3 @@
1
- // `@vvedantb/native-ui/primitives`: fields, display, tabs, overlays and
2
- // toasts. `BottomSheetContainer`, `DateTimeField` and `AmbientBackground` are
3
- // not here; they have their own entries. `Text` and `TextClassContext` are the
4
- // `primitives/text` variants (from 0.5.0); they are not on the root entry.
5
1
  export { Text, TextClassContext } from "../primitives/text";
6
2
  export { Button } from "../Button";
7
3
  export type { ButtonProps, ButtonShape, ButtonSize, ButtonVariant } from "../Button";
@@ -175,7 +171,6 @@ export { Toaster } from "../Toast";
175
171
  export { toast } from "../toastStore";
176
172
  export type { ToastOptions, ToastVariant } from "../toastStore";
177
173
 
178
- // Shared element transitions (Reanimated 4.8): the same `tag` on two screens moves the view between them.
179
174
  export {
180
175
  DEFAULT_SHARED_TRANSITION,
181
176
  DEFAULT_FADE_CONTENT,
@@ -187,5 +182,4 @@ export {
187
182
  } from "../SharedTransition";
188
183
  export type { SharedTransitionOverrides, SharedTransitionViewProps, SharedTransitionTextProps } from "../SharedTransition";
189
184
 
190
- // Overlays in the app's window (the hold menu, the image viewer): wrap the navigator once.
191
185
  export { WindowLayerHost } from "../primitives/window-layer";
@@ -1,4 +1,2 @@
1
- // `@vvedantb/native-ui/search-input`: `SearchInput` on its own. Reaches no
2
- // optional peer, not even a loader.
3
1
  export { SearchInput } from "../SearchInput";
4
2
  export type { SearchInputProps } from "../SearchInput";
@@ -1,5 +1,3 @@
1
- // `@vvedantb/native-ui/tab-bar`. Does not import `expo-router`; reaches
2
- // `expo-blur` and `expo-haptics` only through their optional-peer loaders.
3
1
  export { FloatingTabBar } from "../FloatingTabBar";
4
2
  export type { FloatingTabBarProps } from "../FloatingTabBar";
5
3
  export {
@@ -1,4 +1,3 @@
1
- // `@vvedantb/native-ui/theme`: the provider, tokens and colour helpers.
2
1
  export { cn } from "../cn";
3
2
  export {
4
3
  tokens,
@@ -6,12 +5,19 @@ export {
6
5
  useNativeUi,
7
6
  useLargerText,
8
7
  useAccentColor,
8
+ useSurface,
9
9
  DEFAULT_ACCENT,
10
10
  } from "../theme";
11
- export type { NativeUiTheme } from "../theme";
11
+ export type { NativeUiTheme, NativeUiSurface } from "../theme";
12
12
  export { palette, withAlpha } from "../palette";
13
13
  export type { Palette } from "../palette";
14
14
  export { configureTheme } from "../configureTheme";
15
+ export { NEUTRAL_PALETTE, NEUTRAL_CHANNELS, paintDarkFamily } from "../neutralTheme";
16
+ export type { PaintDarkFamilyOverrides } from "../neutralTheme";
17
+ export { THEME_MODES, parseThemeMode } from "../themeModes";
18
+ export type { ThemeMode } from "../themeModes";
19
+ export { createThemeModeStore } from "../themeModeStore";
20
+ export type { ThemeModeStorage, ThemeModeStore, ThemeModeStoreOptions } from "../themeModeStore";
15
21
  export type { ThemeConfig, ThemeColors, ThemePalette } from "../configureTheme";
16
22
  export { fontClass, fontFamily } from "../typography";
17
23
  export type { ThemeFonts } from "../typography";
@@ -1,6 +1,3 @@
1
- // `@vvedantb/native-ui/toast`: `toast()` and `<Toaster />`. Reaches no heavy
2
- // optional peer, not even a loader (the toast surface is flat from 0.3.12): no
3
- // `expo-blur`, bottom sheet, date picker, `dayjs` or `expo-router`.
4
1
  export { Toaster } from "../Toast";
5
2
  export { toast } from "../toastStore";
6
3
  export type { ToastOptions, ToastVariant } from "../toastStore";
@@ -1,4 +1,2 @@
1
- // `@vvedantb/native-ui/video`. Imports `expo-video` (an optional peer): the
2
- // only entry that does, so an app without it bundles no video player.
3
1
  export { InlineVideo, INLINE_VIDEO_ASPECT } from "../video/InlineVideo";
4
2
  export type { InlineVideoProps } from "../video/InlineVideo";
@@ -1,5 +1,3 @@
1
- // `@vvedantb/native-ui/webview`. Imports `react-native-webview` (an optional
2
- // peer): the only entry that does, so an app without it bundles no WebView.
3
1
  export { HtmlView } from "../webview/HtmlView";
4
2
  export type { HtmlViewHandle, HtmlViewProps } from "../webview/HtmlView";
5
3
  export { HTML_VIEW_HEIGHT_SCRIPT, htmlViewNavigation, htmlViewPostScript, parseHtmlViewHeight } from "../webview/htmlView";
@@ -1,8 +1,3 @@
1
- // Reference screen for the AI chat parts (`@vvedantb/native-ui/ai`). Render
2
- // `AiChatGallery` in a full-screen Expo route, with the same NativeWind setup
3
- // as the rest of the package and a `SafeAreaProvider` above it. The thread is
4
- // fixed sample text, not a model. It follows the app's larger-text setting.
5
- // `ParityGallery` shows `AiChatSamples` in its "AI chat" section.
6
1
  import { useState } from "react";
7
2
  import { View } from "react-native";
8
3
  import { IconFileText, IconPaperclip, IconSearch } from "@tabler/icons-react-native";
@@ -75,11 +70,6 @@ const SAMPLE_CODE = `type Change = {\n itemId: string;\n updatedAt: number;\n}
75
70
  const STREAMING_REASONING =
76
71
  "Offline edits need to wait in a queue on the device.\nWhen the connection returns, send the queue in order and merge by timestamp…";
77
72
 
78
- /**
79
- * The sample thread: a user message, a finished assistant message (folded
80
- * reasoning and trace, reply, code, sources and actions), a second user
81
- * message, and an assistant message that is still working while `streaming`.
82
- */
83
73
  const DRAFT_FIELDS: DraftField[] = [
84
74
  { key: "to", role: "to", value: "team@example.com" },
85
75
  { key: "subject", role: "subject", value: "Weekly plan" },
@@ -179,7 +169,6 @@ export function AiChatSamples({ streaming = true }: { streaming?: boolean }) {
179
169
  </AgentTraceCollapsibleContent>
180
170
  </AgentTraceCollapsible>
181
171
  <ResponseText>{FINISHED_REPLY}</ResponseText>
182
- {/* The gallery has no clipboard: the button only shows its copied state. */}
183
172
  <CodeBlock language="ts" code={SAMPLE_CODE} onCopy={() => undefined} />
184
173
  <Sources>
185
174
  <SourcesTrigger count={2} />