@webority/mobile-ui 0.9.0 → 0.10.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 (283) hide show
  1. package/lib/commonjs/components/BarChart/BarChart.js +1 -0
  2. package/lib/commonjs/components/BarChart/index.js +1 -0
  3. package/lib/commonjs/components/BarChart/scale.js +1 -0
  4. package/lib/commonjs/components/BottomNavigation/BottomNavigation.js +1 -1
  5. package/lib/commonjs/components/BottomNavigation/useScreenReaderEnabled.js +1 -0
  6. package/lib/commonjs/components/BottomSheet/BottomSheet.js +1 -1
  7. package/lib/commonjs/components/BottomSheet/index.js +1 -1
  8. package/lib/commonjs/components/BottomSheet/useSheetSwap.js +1 -0
  9. package/lib/commonjs/components/Card/Card.js +1 -1
  10. package/lib/commonjs/components/Composer/Composer.js +1 -0
  11. package/lib/commonjs/components/Composer/index.js +1 -0
  12. package/lib/commonjs/components/DateSeparator/DateSeparator.js +1 -0
  13. package/lib/commonjs/components/DateSeparator/index.js +1 -0
  14. package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +1 -1
  15. package/lib/commonjs/components/Input/Input.js +1 -1
  16. package/lib/commonjs/components/ListItem/ListItem.js +1 -1
  17. package/lib/commonjs/components/Menu/Menu.js +1 -0
  18. package/lib/commonjs/components/Menu/MenuSurface.js +1 -0
  19. package/lib/commonjs/components/Menu/focusHost.js +1 -0
  20. package/lib/commonjs/components/Menu/index.js +1 -0
  21. package/lib/commonjs/components/Menu/menuModel.js +1 -0
  22. package/lib/commonjs/components/Menu/useContextMenu.js +1 -0
  23. package/lib/commonjs/components/Menu/webOnly.js +1 -0
  24. package/lib/commonjs/components/MessageBubble/MessageBubble.js +1 -0
  25. package/lib/commonjs/components/MessageBubble/index.js +1 -0
  26. package/lib/commonjs/components/MessageList/MessageList.js +1 -0
  27. package/lib/commonjs/components/MessageList/index.js +1 -0
  28. package/lib/commonjs/components/OnboardingPager/OnboardingPager.js +1 -0
  29. package/lib/commonjs/components/OnboardingPager/index.js +1 -0
  30. package/lib/commonjs/components/PaymentResult/PaymentResult.js +1 -0
  31. package/lib/commonjs/components/PaymentResult/index.js +1 -0
  32. package/lib/commonjs/components/ScannerOverlay/ScannerOverlay.js +1 -0
  33. package/lib/commonjs/components/ScannerOverlay/index.js +1 -0
  34. package/lib/commonjs/components/SearchBar/SearchBar.js +1 -1
  35. package/lib/commonjs/components/SearchBar/SearchPanel.js +1 -0
  36. package/lib/commonjs/components/SearchBar/highlight.js +1 -0
  37. package/lib/commonjs/components/SearchBar/index.js +1 -1
  38. package/lib/commonjs/components/SearchBar/useRecentSearches.js +1 -0
  39. package/lib/commonjs/components/Select/Select.js +1 -1
  40. package/lib/commonjs/components/SignaturePad/SignaturePad.js +1 -0
  41. package/lib/commonjs/components/SignaturePad/index.js +1 -0
  42. package/lib/commonjs/components/SignaturePad/signatureGeometry.js +1 -0
  43. package/lib/commonjs/components/SignaturePad/writePng.js +1 -0
  44. package/lib/commonjs/components/SignaturePad/writePng.web.js +1 -0
  45. package/lib/commonjs/components/Sparkline/Sparkline.js +1 -0
  46. package/lib/commonjs/components/Sparkline/geometry.js +1 -0
  47. package/lib/commonjs/components/Sparkline/index.js +1 -0
  48. package/lib/commonjs/components/Spinner/Spinner.js +1 -1
  49. package/lib/commonjs/components/StatTile/StatTile.js +1 -1
  50. package/lib/commonjs/components/TimePicker/TimePicker.js +1 -1
  51. package/lib/commonjs/components/Toast/Toast.js +1 -1
  52. package/lib/commonjs/components/Toast/ToastProvider.js +1 -1
  53. package/lib/commonjs/components/Tooltip/RichTooltipBody.js +1 -0
  54. package/lib/commonjs/components/Tooltip/Tooltip.js +1 -1
  55. package/lib/commonjs/components/Tooltip/tooltipPosition.js +1 -0
  56. package/lib/commonjs/components/TypingIndicator/TypingIndicator.js +1 -0
  57. package/lib/commonjs/components/TypingIndicator/index.js +1 -0
  58. package/lib/commonjs/components/WheelPicker/Wheel.js +1 -0
  59. package/lib/commonjs/components/WheelPicker/WheelPicker.js +1 -0
  60. package/lib/commonjs/components/WheelPicker/index.js +1 -0
  61. package/lib/commonjs/components/index.js +1 -1
  62. package/lib/commonjs/hooks/index.js +1 -1
  63. package/lib/commonjs/hooks/useRefreshControl.js +1 -0
  64. package/lib/commonjs/hooks/useScrollDirection.js +1 -0
  65. package/lib/commonjs/index.js +1 -1
  66. package/lib/commonjs/utils/announce.js +1 -0
  67. package/lib/commonjs/utils/hapticUtils.js +1 -1
  68. package/lib/commonjs/utils/index.js +1 -1
  69. package/lib/commonjs/utils/placement.js +1 -0
  70. package/lib/module/components/BarChart/BarChart.js +1 -0
  71. package/lib/module/components/BarChart/index.js +1 -0
  72. package/lib/module/components/BarChart/scale.js +1 -0
  73. package/lib/module/components/BottomNavigation/BottomNavigation.js +1 -1
  74. package/lib/module/components/BottomNavigation/useScreenReaderEnabled.js +1 -0
  75. package/lib/module/components/BottomSheet/BottomSheet.js +1 -1
  76. package/lib/module/components/BottomSheet/index.js +1 -1
  77. package/lib/module/components/BottomSheet/useSheetSwap.js +1 -0
  78. package/lib/module/components/Card/Card.js +1 -1
  79. package/lib/module/components/Composer/Composer.js +1 -0
  80. package/lib/module/components/Composer/index.js +1 -0
  81. package/lib/module/components/DateSeparator/DateSeparator.js +1 -0
  82. package/lib/module/components/DateSeparator/index.js +1 -0
  83. package/lib/module/components/FloatingActionButton/FloatingActionButton.js +1 -1
  84. package/lib/module/components/Input/Input.js +1 -1
  85. package/lib/module/components/ListItem/ListItem.js +1 -1
  86. package/lib/module/components/Menu/Menu.js +1 -0
  87. package/lib/module/components/Menu/MenuSurface.js +1 -0
  88. package/lib/module/components/Menu/focusHost.js +1 -0
  89. package/lib/module/components/Menu/index.js +1 -0
  90. package/lib/module/components/Menu/menuModel.js +1 -0
  91. package/lib/module/components/Menu/useContextMenu.js +1 -0
  92. package/lib/module/components/Menu/webOnly.js +1 -0
  93. package/lib/module/components/MessageBubble/MessageBubble.js +1 -0
  94. package/lib/module/components/MessageBubble/index.js +1 -0
  95. package/lib/module/components/MessageList/MessageList.js +1 -0
  96. package/lib/module/components/MessageList/index.js +1 -0
  97. package/lib/module/components/OnboardingPager/OnboardingPager.js +1 -0
  98. package/lib/module/components/OnboardingPager/index.js +1 -0
  99. package/lib/module/components/PaymentResult/PaymentResult.js +1 -0
  100. package/lib/module/components/PaymentResult/index.js +1 -0
  101. package/lib/module/components/ScannerOverlay/ScannerOverlay.js +1 -0
  102. package/lib/module/components/ScannerOverlay/index.js +1 -0
  103. package/lib/module/components/SearchBar/SearchBar.js +1 -1
  104. package/lib/module/components/SearchBar/SearchPanel.js +1 -0
  105. package/lib/module/components/SearchBar/highlight.js +1 -0
  106. package/lib/module/components/SearchBar/index.js +1 -1
  107. package/lib/module/components/SearchBar/useRecentSearches.js +1 -0
  108. package/lib/module/components/Select/Select.js +1 -1
  109. package/lib/module/components/SignaturePad/SignaturePad.js +1 -0
  110. package/lib/module/components/SignaturePad/index.js +1 -0
  111. package/lib/module/components/SignaturePad/signatureGeometry.js +1 -0
  112. package/lib/module/components/SignaturePad/writePng.js +1 -0
  113. package/lib/module/components/SignaturePad/writePng.web.js +1 -0
  114. package/lib/module/components/Sparkline/Sparkline.js +1 -0
  115. package/lib/module/components/Sparkline/geometry.js +1 -0
  116. package/lib/module/components/Sparkline/index.js +1 -0
  117. package/lib/module/components/Spinner/Spinner.js +1 -1
  118. package/lib/module/components/StatTile/StatTile.js +1 -1
  119. package/lib/module/components/TimePicker/TimePicker.js +1 -1
  120. package/lib/module/components/Toast/Toast.js +1 -1
  121. package/lib/module/components/Toast/ToastProvider.js +1 -1
  122. package/lib/module/components/Tooltip/RichTooltipBody.js +1 -0
  123. package/lib/module/components/Tooltip/Tooltip.js +1 -1
  124. package/lib/module/components/Tooltip/tooltipPosition.js +1 -0
  125. package/lib/module/components/TypingIndicator/TypingIndicator.js +1 -0
  126. package/lib/module/components/TypingIndicator/index.js +1 -0
  127. package/lib/module/components/WheelPicker/Wheel.js +1 -0
  128. package/lib/module/components/WheelPicker/WheelPicker.js +1 -0
  129. package/lib/module/components/WheelPicker/index.js +1 -0
  130. package/lib/module/components/index.js +1 -1
  131. package/lib/module/hooks/index.js +1 -1
  132. package/lib/module/hooks/useRefreshControl.js +1 -0
  133. package/lib/module/hooks/useScrollDirection.js +1 -0
  134. package/lib/module/index.js +1 -1
  135. package/lib/module/utils/announce.js +1 -0
  136. package/lib/module/utils/hapticUtils.js +1 -1
  137. package/lib/module/utils/index.js +1 -1
  138. package/lib/module/utils/placement.js +1 -0
  139. package/lib/typescript/commonjs/components/BarChart/BarChart.d.ts +62 -0
  140. package/lib/typescript/commonjs/components/BarChart/index.d.ts +3 -0
  141. package/lib/typescript/commonjs/components/BarChart/scale.d.ts +15 -0
  142. package/lib/typescript/commonjs/components/BottomNavigation/BottomNavigation.d.ts +32 -0
  143. package/lib/typescript/commonjs/components/BottomNavigation/index.d.ts +1 -1
  144. package/lib/typescript/commonjs/components/BottomNavigation/useScreenReaderEnabled.d.ts +8 -0
  145. package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +34 -3
  146. package/lib/typescript/commonjs/components/BottomSheet/index.d.ts +2 -0
  147. package/lib/typescript/commonjs/components/BottomSheet/useSheetSwap.d.ts +24 -0
  148. package/lib/typescript/commonjs/components/Card/Card.d.ts +9 -0
  149. package/lib/typescript/commonjs/components/Composer/Composer.d.ts +61 -0
  150. package/lib/typescript/commonjs/components/Composer/index.d.ts +3 -0
  151. package/lib/typescript/commonjs/components/DateSeparator/DateSeparator.d.ts +37 -0
  152. package/lib/typescript/commonjs/components/DateSeparator/index.d.ts +3 -0
  153. package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButton.d.ts +3 -1
  154. package/lib/typescript/commonjs/components/Input/Input.d.ts +2 -2
  155. package/lib/typescript/commonjs/components/ListItem/ListItem.d.ts +9 -0
  156. package/lib/typescript/commonjs/components/Menu/Menu.d.ts +46 -0
  157. package/lib/typescript/commonjs/components/Menu/MenuSurface.d.ts +30 -0
  158. package/lib/typescript/commonjs/components/Menu/focusHost.d.ts +9 -0
  159. package/lib/typescript/commonjs/components/Menu/index.d.ts +5 -0
  160. package/lib/typescript/commonjs/components/Menu/menuModel.d.ts +68 -0
  161. package/lib/typescript/commonjs/components/Menu/useContextMenu.d.ts +58 -0
  162. package/lib/typescript/commonjs/components/Menu/webOnly.d.ts +7 -0
  163. package/lib/typescript/commonjs/components/MessageBubble/MessageBubble.d.ts +87 -0
  164. package/lib/typescript/commonjs/components/MessageBubble/index.d.ts +3 -0
  165. package/lib/typescript/commonjs/components/MessageList/MessageList.d.ts +68 -0
  166. package/lib/typescript/commonjs/components/MessageList/index.d.ts +3 -0
  167. package/lib/typescript/commonjs/components/OnboardingPager/OnboardingPager.d.ts +53 -0
  168. package/lib/typescript/commonjs/components/OnboardingPager/index.d.ts +3 -0
  169. package/lib/typescript/commonjs/components/PaymentResult/PaymentResult.d.ts +71 -0
  170. package/lib/typescript/commonjs/components/PaymentResult/index.d.ts +3 -0
  171. package/lib/typescript/commonjs/components/ScannerOverlay/ScannerOverlay.d.ts +74 -0
  172. package/lib/typescript/commonjs/components/ScannerOverlay/index.d.ts +3 -0
  173. package/lib/typescript/commonjs/components/SearchBar/SearchBar.d.ts +35 -0
  174. package/lib/typescript/commonjs/components/SearchBar/SearchPanel.d.ts +49 -0
  175. package/lib/typescript/commonjs/components/SearchBar/highlight.d.ts +14 -0
  176. package/lib/typescript/commonjs/components/SearchBar/index.d.ts +3 -0
  177. package/lib/typescript/commonjs/components/SearchBar/useRecentSearches.d.ts +24 -0
  178. package/lib/typescript/commonjs/components/Select/Select.d.ts +2 -1
  179. package/lib/typescript/commonjs/components/SignaturePad/SignaturePad.d.ts +94 -0
  180. package/lib/typescript/commonjs/components/SignaturePad/index.d.ts +4 -0
  181. package/lib/typescript/commonjs/components/SignaturePad/signatureGeometry.d.ts +36 -0
  182. package/lib/typescript/commonjs/components/SignaturePad/writePng.d.ts +7 -0
  183. package/lib/typescript/commonjs/components/SignaturePad/writePng.web.d.ts +3 -0
  184. package/lib/typescript/commonjs/components/Sparkline/Sparkline.d.ts +41 -0
  185. package/lib/typescript/commonjs/components/Sparkline/geometry.d.ts +20 -0
  186. package/lib/typescript/commonjs/components/Sparkline/index.d.ts +3 -0
  187. package/lib/typescript/commonjs/components/Spinner/Spinner.d.ts +7 -1
  188. package/lib/typescript/commonjs/components/StatTile/StatTile.d.ts +24 -1
  189. package/lib/typescript/commonjs/components/StatTile/index.d.ts +1 -1
  190. package/lib/typescript/commonjs/components/Toast/Toast.d.ts +21 -0
  191. package/lib/typescript/commonjs/components/Toast/ToastProvider.d.ts +21 -0
  192. package/lib/typescript/commonjs/components/Toast/index.d.ts +1 -1
  193. package/lib/typescript/commonjs/components/Tooltip/RichTooltipBody.d.ts +27 -0
  194. package/lib/typescript/commonjs/components/Tooltip/Tooltip.d.ts +24 -0
  195. package/lib/typescript/commonjs/components/Tooltip/index.d.ts +1 -1
  196. package/lib/typescript/commonjs/components/Tooltip/tooltipPosition.d.ts +35 -0
  197. package/lib/typescript/commonjs/components/TypingIndicator/TypingIndicator.d.ts +21 -0
  198. package/lib/typescript/commonjs/components/TypingIndicator/index.d.ts +3 -0
  199. package/lib/typescript/commonjs/components/WheelPicker/Wheel.d.ts +34 -0
  200. package/lib/typescript/commonjs/components/WheelPicker/WheelPicker.d.ts +73 -0
  201. package/lib/typescript/commonjs/components/WheelPicker/index.d.ts +3 -0
  202. package/lib/typescript/commonjs/components/index.d.ts +34 -8
  203. package/lib/typescript/commonjs/hooks/index.d.ts +4 -0
  204. package/lib/typescript/commonjs/hooks/useRefreshControl.d.ts +75 -0
  205. package/lib/typescript/commonjs/hooks/useScrollDirection.d.ts +21 -0
  206. package/lib/typescript/commonjs/index.d.ts +4 -4
  207. package/lib/typescript/commonjs/utils/announce.d.ts +14 -0
  208. package/lib/typescript/commonjs/utils/hapticUtils.d.ts +1 -1
  209. package/lib/typescript/commonjs/utils/index.d.ts +2 -0
  210. package/lib/typescript/commonjs/utils/placement.d.ts +55 -0
  211. package/lib/typescript/module/components/BarChart/BarChart.d.ts +62 -0
  212. package/lib/typescript/module/components/BarChart/index.d.ts +3 -0
  213. package/lib/typescript/module/components/BarChart/scale.d.ts +15 -0
  214. package/lib/typescript/module/components/BottomNavigation/BottomNavigation.d.ts +32 -0
  215. package/lib/typescript/module/components/BottomNavigation/index.d.ts +1 -1
  216. package/lib/typescript/module/components/BottomNavigation/useScreenReaderEnabled.d.ts +8 -0
  217. package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +34 -3
  218. package/lib/typescript/module/components/BottomSheet/index.d.ts +2 -0
  219. package/lib/typescript/module/components/BottomSheet/useSheetSwap.d.ts +24 -0
  220. package/lib/typescript/module/components/Card/Card.d.ts +9 -0
  221. package/lib/typescript/module/components/Composer/Composer.d.ts +61 -0
  222. package/lib/typescript/module/components/Composer/index.d.ts +3 -0
  223. package/lib/typescript/module/components/DateSeparator/DateSeparator.d.ts +37 -0
  224. package/lib/typescript/module/components/DateSeparator/index.d.ts +3 -0
  225. package/lib/typescript/module/components/FloatingActionButton/FloatingActionButton.d.ts +3 -1
  226. package/lib/typescript/module/components/Input/Input.d.ts +2 -2
  227. package/lib/typescript/module/components/ListItem/ListItem.d.ts +9 -0
  228. package/lib/typescript/module/components/Menu/Menu.d.ts +46 -0
  229. package/lib/typescript/module/components/Menu/MenuSurface.d.ts +30 -0
  230. package/lib/typescript/module/components/Menu/focusHost.d.ts +9 -0
  231. package/lib/typescript/module/components/Menu/index.d.ts +5 -0
  232. package/lib/typescript/module/components/Menu/menuModel.d.ts +68 -0
  233. package/lib/typescript/module/components/Menu/useContextMenu.d.ts +58 -0
  234. package/lib/typescript/module/components/Menu/webOnly.d.ts +7 -0
  235. package/lib/typescript/module/components/MessageBubble/MessageBubble.d.ts +87 -0
  236. package/lib/typescript/module/components/MessageBubble/index.d.ts +3 -0
  237. package/lib/typescript/module/components/MessageList/MessageList.d.ts +68 -0
  238. package/lib/typescript/module/components/MessageList/index.d.ts +3 -0
  239. package/lib/typescript/module/components/OnboardingPager/OnboardingPager.d.ts +53 -0
  240. package/lib/typescript/module/components/OnboardingPager/index.d.ts +3 -0
  241. package/lib/typescript/module/components/PaymentResult/PaymentResult.d.ts +71 -0
  242. package/lib/typescript/module/components/PaymentResult/index.d.ts +3 -0
  243. package/lib/typescript/module/components/ScannerOverlay/ScannerOverlay.d.ts +74 -0
  244. package/lib/typescript/module/components/ScannerOverlay/index.d.ts +3 -0
  245. package/lib/typescript/module/components/SearchBar/SearchBar.d.ts +35 -0
  246. package/lib/typescript/module/components/SearchBar/SearchPanel.d.ts +49 -0
  247. package/lib/typescript/module/components/SearchBar/highlight.d.ts +14 -0
  248. package/lib/typescript/module/components/SearchBar/index.d.ts +3 -0
  249. package/lib/typescript/module/components/SearchBar/useRecentSearches.d.ts +24 -0
  250. package/lib/typescript/module/components/Select/Select.d.ts +2 -1
  251. package/lib/typescript/module/components/SignaturePad/SignaturePad.d.ts +94 -0
  252. package/lib/typescript/module/components/SignaturePad/index.d.ts +4 -0
  253. package/lib/typescript/module/components/SignaturePad/signatureGeometry.d.ts +36 -0
  254. package/lib/typescript/module/components/SignaturePad/writePng.d.ts +7 -0
  255. package/lib/typescript/module/components/SignaturePad/writePng.web.d.ts +3 -0
  256. package/lib/typescript/module/components/Sparkline/Sparkline.d.ts +41 -0
  257. package/lib/typescript/module/components/Sparkline/geometry.d.ts +20 -0
  258. package/lib/typescript/module/components/Sparkline/index.d.ts +3 -0
  259. package/lib/typescript/module/components/Spinner/Spinner.d.ts +7 -1
  260. package/lib/typescript/module/components/StatTile/StatTile.d.ts +24 -1
  261. package/lib/typescript/module/components/StatTile/index.d.ts +1 -1
  262. package/lib/typescript/module/components/Toast/Toast.d.ts +21 -0
  263. package/lib/typescript/module/components/Toast/ToastProvider.d.ts +21 -0
  264. package/lib/typescript/module/components/Toast/index.d.ts +1 -1
  265. package/lib/typescript/module/components/Tooltip/RichTooltipBody.d.ts +27 -0
  266. package/lib/typescript/module/components/Tooltip/Tooltip.d.ts +24 -0
  267. package/lib/typescript/module/components/Tooltip/index.d.ts +1 -1
  268. package/lib/typescript/module/components/Tooltip/tooltipPosition.d.ts +35 -0
  269. package/lib/typescript/module/components/TypingIndicator/TypingIndicator.d.ts +21 -0
  270. package/lib/typescript/module/components/TypingIndicator/index.d.ts +3 -0
  271. package/lib/typescript/module/components/WheelPicker/Wheel.d.ts +34 -0
  272. package/lib/typescript/module/components/WheelPicker/WheelPicker.d.ts +73 -0
  273. package/lib/typescript/module/components/WheelPicker/index.d.ts +3 -0
  274. package/lib/typescript/module/components/index.d.ts +34 -8
  275. package/lib/typescript/module/hooks/index.d.ts +4 -0
  276. package/lib/typescript/module/hooks/useRefreshControl.d.ts +75 -0
  277. package/lib/typescript/module/hooks/useScrollDirection.d.ts +21 -0
  278. package/lib/typescript/module/index.d.ts +4 -4
  279. package/lib/typescript/module/utils/announce.d.ts +14 -0
  280. package/lib/typescript/module/utils/hapticUtils.d.ts +1 -1
  281. package/lib/typescript/module/utils/index.d.ts +2 -0
  282. package/lib/typescript/module/utils/placement.d.ts +55 -0
  283. package/package.json +3 -3
@@ -0,0 +1,58 @@
1
+ import type React from 'react';
2
+ import type { AccessibilityActionEvent, AccessibilityActionInfo, PressableProps, View as RNView } from 'react-native';
3
+ import type { HapticType } from '../../utils/hapticUtils.js';
4
+ import type { PlacementPreference } from '../../utils/placement.js';
5
+ import type { MenuItem, MenuItems, MenuPresentation, MenuUnavailable } from './menuModel.js';
6
+ /** The `contextMenu` prop of ListItem and Card. */
7
+ export interface ContextMenuConfig {
8
+ items: MenuItems;
9
+ /** A short heading over the items; also the menu's accessible name. */
10
+ title?: string;
11
+ /** Up to three icon actions in a row above the list (the iOS "medium" layout). */
12
+ topActions?: ReadonlyArray<MenuItem>;
13
+ /**
14
+ * What lifts over the dimmed screen while the menu is open. Default: the
15
+ * row or card itself, drawn again in place; `false` for none.
16
+ */
17
+ preview?: React.ReactNode | false;
18
+ /** Default `'hide'`: the HIG drops unavailable items from a context menu. */
19
+ unavailable?: MenuUnavailable;
20
+ /** Default `'auto'`: a sheet on a phone past seven items or with a description. */
21
+ presentation?: MenuPresentation;
22
+ /** Preferred side of the pressed view. Default `'bottom'`. */
23
+ placement?: PlacementPreference;
24
+ onOpenChange?: (open: boolean) => void;
25
+ accessibilityLabel?: string;
26
+ /** Accessible name of the tap-outside area. Default `'Close menu'`. */
27
+ closeLabel?: string;
28
+ /** Accessible name of a submenu's Back row. Default `'Back'`. */
29
+ backLabel?: string;
30
+ }
31
+ export interface UseContextMenuOptions {
32
+ /** The host's `haptic` prop: `longPress` on open, `selection` on an action, unless overridden. */
33
+ haptic?: HapticType | false;
34
+ /** Screen reader actions the host already has; the menu's are added after them. */
35
+ accessibilityActions?: ReadonlyArray<AccessibilityActionInfo>;
36
+ onAccessibilityAction?: (event: AccessibilityActionEvent) => void;
37
+ testID?: string;
38
+ }
39
+ export interface ContextMenuBinding {
40
+ /** False when there is no config or nothing in it to show. */
41
+ enabled: boolean;
42
+ /** Merge onto the host's pressable; the menu measures it to anchor and lift it. */
43
+ hostRef: React.RefObject<RNView | null>;
44
+ /**
45
+ * Spread on the host's pressable after its own props: the long press, the
46
+ * screen reader actions and, on the web, right-click and Shift+F10.
47
+ * Empty when not enabled, so a host's own `onLongPress` survives.
48
+ */
49
+ hostProps: Partial<PressableProps>;
50
+ /** The menu itself, given the preview the host draws by default. */
51
+ renderSurface: (preview?: React.ReactNode) => React.ReactNode;
52
+ }
53
+ /**
54
+ * Wires a long-press menu onto a host view. ListItem and Card use it for
55
+ * their `contextMenu` prop; a host owns one Pressable and spreads `hostProps`.
56
+ */
57
+ export declare const useContextMenu: (config: ContextMenuConfig | undefined, options?: UseContextMenuOptions) => ContextMenuBinding;
58
+ //# sourceMappingURL=useContextMenu.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Props only react-native-web understands (`onKeyDown`, `onContextMenu`, an
3
+ * ARIA role React Native's union lacks), typed as the host's props so they
4
+ * can be spread. The phones get nothing, so no unknown prop reaches them.
5
+ */
6
+ export declare const webOnly: <T extends object>(props: object) => T | null;
7
+ //# sourceMappingURL=webOnly.d.ts.map
@@ -0,0 +1,87 @@
1
+ import { type DateValue } from '@webority/mobile-core';
2
+ import type React from 'react';
3
+ import type { StyleProp, ViewStyle } from 'react-native';
4
+ import type { HapticType } from '../../utils/hapticUtils.js';
5
+ export type MessageSide = 'mine' | 'theirs';
6
+ /**
7
+ * Where a message sits in a run from one author. The joined corners go small
8
+ * and the author and time show only on the run's edges.
9
+ */
10
+ export type MessageGroupPosition = 'single' | 'first' | 'middle' | 'last';
11
+ export type MessageStatus = 'sending' | 'sent' | 'delivered' | 'read' | 'failed';
12
+ /** The message this one answers, drawn as a quote at the top of the bubble. */
13
+ export interface MessageReply {
14
+ author?: string;
15
+ text: string;
16
+ /** Jumps to the quoted message. */
17
+ onPress?: () => void;
18
+ }
19
+ /** A long-press action, also offered to screen readers as an accessibility action. */
20
+ export interface MessageAction {
21
+ /** Stable id, e.g. `'copy'`. `onRetry` takes `'retry'` and `replyTo.onPress` `'openReply'`. */
22
+ name: string;
23
+ label: string;
24
+ onPress: () => void;
25
+ }
26
+ export interface MessageBubbleLabels {
27
+ you: string;
28
+ sending: string;
29
+ sent: string;
30
+ delivered: string;
31
+ read: string;
32
+ failed: string;
33
+ retry: string;
34
+ replyTo: (author: string | undefined) => string;
35
+ }
36
+ export declare const DEFAULT_MESSAGE_BUBBLE_LABELS: Readonly<MessageBubbleLabels>;
37
+ export interface MessageBubbleProps {
38
+ side: MessageSide;
39
+ /**
40
+ * The message as plain text. Drawn when there are no `children`, read by
41
+ * screen readers, and announced once when a streaming reply completes.
42
+ */
43
+ text: string;
44
+ /** Rich content in place of `text` (a chart, an image, a renderer of your own). */
45
+ children?: React.ReactNode;
46
+ /** Draws `text` with the library `Markdown`. Ignored with `children`. */
47
+ markdown?: boolean;
48
+ /** Default `'single'`. */
49
+ groupPosition?: MessageGroupPosition;
50
+ /** Shown above the first message of a run of `theirs`; read before the text. */
51
+ author?: string;
52
+ /** Shown under the last message of a run, in the configured zone (IST by default). */
53
+ time?: DateValue;
54
+ /** Ticks under `mine`; read as a word ("Read"). */
55
+ status?: MessageStatus;
56
+ replyTo?: MessageReply;
57
+ /** The reply is still arriving: marked busy, announced once when it ends. */
58
+ streaming?: boolean;
59
+ /** A curated message shown under the bubble and announced at once. */
60
+ error?: string;
61
+ /** Shows Try again under a failed message, and offers it as an accessibility action. */
62
+ onRetry?: () => void;
63
+ /**
64
+ * Long-press actions (Copy, Reply). They are the screen reader's
65
+ * accessibility actions; a long press calls `onLongPress` to show them,
66
+ * typically in a menu. Without actions there is no long press.
67
+ */
68
+ actions?: ReadonlyArray<MessageAction>;
69
+ onLongPress?: () => void;
70
+ /** Content under the bubble on the same side (action cards, a rating). */
71
+ footer?: React.ReactNode;
72
+ labels?: Partial<MessageBubbleLabels>;
73
+ /** Long-press haptic. Default `'longPress'`. */
74
+ haptic?: HapticType | false;
75
+ style?: StyleProp<ViewStyle>;
76
+ testID?: string;
77
+ }
78
+ /**
79
+ * One chat message. `mine` sits on the trailing side in the brand tint and
80
+ * carries delivery ticks; `theirs` sits on the leading side on the secondary
81
+ * surface. Runs from one author share joined corners. The bubble reads as one
82
+ * element ("Asha, 4:32 PM, See you at six, Read") unless it holds `children`
83
+ * with no actions, when it stays open so links inside remain reachable.
84
+ */
85
+ export declare const MessageBubble: React.FC<MessageBubbleProps>;
86
+ export default MessageBubble;
87
+ //# sourceMappingURL=MessageBubble.d.ts.map
@@ -0,0 +1,3 @@
1
+ export type { MessageAction, MessageBubbleLabels, MessageBubbleProps, MessageGroupPosition, MessageReply, MessageSide, MessageStatus } from './MessageBubble.js';
2
+ export { DEFAULT_MESSAGE_BUBBLE_LABELS, default, MessageBubble } from './MessageBubble.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,68 @@
1
+ import { type DateValue } from '@webority/mobile-core';
2
+ import type React from 'react';
3
+ import type { FlatListProps } from 'react-native';
4
+ import { type DateSeparatorLabels } from '../DateSeparator/index.js';
5
+ import type { MessageGroupPosition } from '../MessageBubble/index.js';
6
+ export interface MessageRenderInfo<T> {
7
+ item: T;
8
+ /** 0 is the newest. */
9
+ index: number;
10
+ /** Pass to `MessageBubble`; always `'single'` without `getAuthorKey`. */
11
+ groupPosition: MessageGroupPosition;
12
+ }
13
+ export interface MessageListLabels extends DateSeparatorLabels {
14
+ jumpToLatest: string;
15
+ newMessages: (count: number) => string;
16
+ /** The divider above the first unread message. */
17
+ unread: string;
18
+ loadingOlder: string;
19
+ }
20
+ export declare const DEFAULT_MESSAGE_LIST_LABELS: Readonly<MessageListLabels>;
21
+ type OwnedListProps = 'data' | 'renderItem' | 'keyExtractor' | 'inverted' | 'onEndReached' | 'ListHeaderComponent' | 'ListFooterComponent' | 'ListEmptyComponent' | 'renderScrollComponent';
22
+ export interface MessageListProps<T> extends Omit<FlatListProps<T>, OwnedListProps> {
23
+ /** Newest first, the order the list draws from the bottom up. */
24
+ messages: ReadonlyArray<T>;
25
+ keyExtractor: (item: T) => string;
26
+ /** Draws one message, usually a `MessageBubble` given `groupPosition`. */
27
+ renderMessage: (info: MessageRenderInfo<T>) => React.ReactElement | null;
28
+ /** Joins consecutive messages from one author into a run with shared corners. */
29
+ getAuthorKey?: (item: T) => string;
30
+ /** Draws a day separator ("Today", "Yesterday", "10-Oct-2026") where the day changes. */
31
+ getDate?: (item: T) => DateValue;
32
+ /** Draws the "New messages" divider above this message. */
33
+ firstUnreadKey?: string;
34
+ /** Called near the top of the history to load the page before the oldest. */
35
+ onLoadOlder?: () => void;
36
+ loadingOlder?: boolean;
37
+ /** False once the oldest page is in. Default true. */
38
+ hasOlder?: boolean;
39
+ /** Drawn under the newest message, e.g. a `TypingIndicator`. */
40
+ typing?: React.ReactNode;
41
+ /** Drawn while there are no messages. */
42
+ empty?: React.ReactNode;
43
+ /** A message to announce politely for each new message, e.g. "Asha: See you at six". */
44
+ getAnnouncement?: (item: T) => string | null | undefined;
45
+ /** True for a new message that should bring the list to the latest, such as the person's own. */
46
+ followNew?: (item: T) => boolean;
47
+ /**
48
+ * Lifts the newest messages above the keyboard through
49
+ * react-native-keyboard-controller's `KeyboardChatScrollView`. Default true;
50
+ * turn it off when a parent already moves with the keyboard.
51
+ */
52
+ keyboardAware?: boolean;
53
+ /** The `Composer`'s `keyboardOffset`. Default: the bottom safe-area inset. */
54
+ keyboardOffset?: number;
55
+ labels?: Partial<MessageListLabels>;
56
+ /** The reference for Today and Yesterday. Default: now. */
57
+ now?: Date;
58
+ }
59
+ /**
60
+ * A conversation: an inverted `FlatList` that starts at the newest message,
61
+ * draws day separators and an unread divider, joins runs from one author,
62
+ * loads older pages at the top without moving what is on screen, and lifts
63
+ * above the keyboard. Scrolled away from the latest, a jump button appears
64
+ * with the count of messages that arrived meanwhile.
65
+ */
66
+ export declare function MessageList<T>({ messages, keyExtractor, renderMessage, getAuthorKey, getDate, firstUnreadKey, onLoadOlder, loadingOlder, hasOlder, typing, empty, getAnnouncement, followNew, keyboardAware, keyboardOffset, labels: labelOverrides, now, onScroll, contentContainerStyle, style, testID, ...rest }: MessageListProps<T>): React.ReactElement;
67
+ export default MessageList;
68
+ //# sourceMappingURL=MessageList.d.ts.map
@@ -0,0 +1,3 @@
1
+ export type { MessageListLabels, MessageListProps, MessageRenderInfo } from './MessageList.js';
2
+ export { DEFAULT_MESSAGE_LIST_LABELS, default, MessageList } from './MessageList.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,53 @@
1
+ import type React from 'react';
2
+ import type { HapticType } from '../../utils/hapticUtils.js';
3
+ export interface OnboardingPage {
4
+ /** Stable identity of the page; also the list key. */
5
+ key: string;
6
+ /** The picture or illustration above the text: any node, for example an `Image`. */
7
+ art?: React.ReactNode;
8
+ title: string;
9
+ body: string;
10
+ }
11
+ export interface OnboardingPagerLabels {
12
+ skip?: string;
13
+ next?: string;
14
+ /** Spoken before the title of each page. Default `Step 2 of 3`. */
15
+ step?: (position: number, total: number) => string;
16
+ /** Names the page control for a screen reader. Default `Page`. */
17
+ pageControl?: string;
18
+ }
19
+ export interface OnboardingPagerProps {
20
+ /** Three or four is the sweet spot; more than six are not shown. */
21
+ pages: OnboardingPage[];
22
+ /** The final button was pressed. The app records that the intro was seen. */
23
+ onDone: () => void;
24
+ /** Skip was pressed, on any page. The app records that the intro was seen. */
25
+ onSkip: () => void;
26
+ /** Title of the final button. Default `Get started`. */
27
+ doneLabel?: string;
28
+ labels?: OnboardingPagerLabels;
29
+ /**
30
+ * Pads the top and bottom by the device safe-area insets. Pass false when the pager sits
31
+ * inside a screen that already handles them. Default true.
32
+ */
33
+ safeArea?: boolean;
34
+ /** Haptic on Skip, Next and the final button. `false` opts out. */
35
+ haptic?: HapticType | false;
36
+ testID?: string;
37
+ }
38
+ /**
39
+ * A first-launch intro: full-screen pages of art, title and body that swipe, a page
40
+ * control, Skip at the top on every page, and a footer button that reads Next and then
41
+ * the done label, so the flow never needs a swipe. Built on `Carousel`
42
+ * (no autoplay, no loop). The app owns whether the intro was seen: `onDone` and `onSkip`
43
+ * both mean "seen", and it stores that itself. A page whose text outgrows the screen at a
44
+ * large font size scrolls inside the page.
45
+ *
46
+ * The page control is one adjustable element for a screen reader (swipe up or down to change
47
+ * page); touching its leading half goes back one page, its trailing half forward one. Under
48
+ * Reduce Motion pages change without animation and the active dot changes at once.
49
+ */
50
+ declare const OnboardingPager: React.FC<OnboardingPagerProps>;
51
+ export { OnboardingPager };
52
+ export default OnboardingPager;
53
+ //# sourceMappingURL=OnboardingPager.d.ts.map
@@ -0,0 +1,3 @@
1
+ export type { OnboardingPage, OnboardingPagerLabels, OnboardingPagerProps } from './OnboardingPager.js';
2
+ export { default, OnboardingPager } from './OnboardingPager.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,71 @@
1
+ import type React from 'react';
2
+ import type { StyleProp, ViewStyle } from 'react-native';
3
+ import type { DescriptionItem } from '../Descriptions/index.js';
4
+ /**
5
+ * `pending` is its own outcome, never a kind of failure: the bank has not said
6
+ * yes or no, so the money may still go through. `refunded` is a payment that
7
+ * was taken and has been returned.
8
+ */
9
+ export type PaymentResultStatus = 'success' | 'pending' | 'failed' | 'refunded';
10
+ export interface PaymentResultProps {
11
+ status: PaymentResultStatus;
12
+ /** Integer paise, as the API carries it. Shown in rupees with Indian digit grouping. */
13
+ amount: number;
14
+ /** ISO 4217 code of `amount`'s currency. Default `'INR'`. */
15
+ currency?: string;
16
+ /** Who was paid ("Capnix"). */
17
+ payee?: string;
18
+ /** The gateway or bank reference (a UPI RRN or UTR). Read digit by digit by a screen reader. */
19
+ reference?: string;
20
+ /** When the payment was made: an ISO string, a Date or epoch milliseconds. Shown in IST. */
21
+ paidAt?: string | number | Date;
22
+ /** How it was paid ("UPI, HDFC Bank ...4821"). */
23
+ method?: string;
24
+ /** Receipt rows after the built-in ones. A row with an empty value is dropped. */
25
+ rows?: ReadonlyArray<DescriptionItem>;
26
+ /**
27
+ * For `failed`: whether money left the account. `true` says it will come back; `false` says
28
+ * nothing was taken and is the only value that lets `onRetry` show. Left unset, the screen
29
+ * tells the person to check their statement first and offers no retry.
30
+ */
31
+ debited?: boolean;
32
+ /** Working days the bank takes to return a debited amount. Default 5. */
33
+ refundDays?: number;
34
+ /** For `pending`: when it should settle, shown in IST. Without it the usual window is stated. */
35
+ settlesBy?: string | number | Date;
36
+ /** Replaces the heading ("Payment successful"). */
37
+ title?: string;
38
+ /** Replaces the line under the amount. The pending safety lines are not replaceable. */
39
+ message?: string;
40
+ /** Shows a Share receipt button. The app builds and shares the receipt itself. */
41
+ onShare?: () => void;
42
+ /** Shows a Download button. */
43
+ onDownload?: () => void;
44
+ /** Shows a Done button. */
45
+ onDone?: () => void;
46
+ /** Shows Try again. Honoured only for a `failed` payment with `debited={false}`. */
47
+ onRetry?: () => void;
48
+ /** Shows Check status while `pending`. The app polls or refetches; this component never does. */
49
+ onRefresh?: () => void;
50
+ /** Puts Check status into its busy state. */
51
+ refreshing?: boolean;
52
+ /** Burst of confetti on success. Default true. Not played under Reduce Motion. */
53
+ celebrate?: boolean;
54
+ /**
55
+ * Haptic on the outcome: a success buzz for `success` and an error buzz for `failed`.
56
+ * `pending` and `refunded` never buzz. Default true.
57
+ */
58
+ haptic?: boolean;
59
+ style?: StyleProp<ViewStyle>;
60
+ testID?: string;
61
+ }
62
+ /**
63
+ * The end of a payment: what happened, how much, and what to do next. A UPI
64
+ * payment can sit between "sent" and "settled" for minutes or hours, and showing
65
+ * that as a failure, or offering Try again, is how people pay twice. So `pending`
66
+ * has its own mark, its own word and no retry, and a failed payment offers retry
67
+ * only when the caller says nothing was debited.
68
+ */
69
+ export declare const PaymentResult: React.FC<PaymentResultProps>;
70
+ export default PaymentResult;
71
+ //# sourceMappingURL=PaymentResult.d.ts.map
@@ -0,0 +1,3 @@
1
+ export type { PaymentResultProps, PaymentResultStatus } from './PaymentResult.js';
2
+ export { default, PaymentResult } from './PaymentResult.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,74 @@
1
+ import type React from 'react';
2
+ import type { View as RNView, StyleProp, ViewStyle } from 'react-native';
3
+ import type { HapticType } from '../../utils/hapticUtils.js';
4
+ /**
5
+ * `scanning` waits for a code; `found` freezes the frame on success; `invalid`
6
+ * shows `labels.invalid` for a code the app does not accept. `noPermission` and
7
+ * `noCamera` replace the camera with a panel: the children are not rendered, so
8
+ * the app never mounts a camera it cannot use.
9
+ */
10
+ export type ScannerOverlayState = 'scanning' | 'found' | 'invalid' | 'noPermission' | 'noCamera';
11
+ export interface ScannerOverlayLabels {
12
+ /** Default 'Code found'. Spoken and shown when `state` is `found`. */
13
+ found: string;
14
+ /** Default 'This code cannot be used. Try another.' Shown when `state` is `invalid`. */
15
+ invalid: string;
16
+ /** Default 'Turn torch on'. */
17
+ torchOn: string;
18
+ /** Default 'Turn torch off'. */
19
+ torchOff: string;
20
+ /** Default 'Enter code instead'. */
21
+ manualEntry: string;
22
+ /** Default 'Upload from gallery'. */
23
+ gallery: string;
24
+ /** Default 'Camera access is off'. */
25
+ noPermissionTitle: string;
26
+ /** Default 'Allow camera access to scan a code.' */
27
+ noPermissionMessage: string;
28
+ /** Default 'Allow camera access'. */
29
+ permissionAction: string;
30
+ /** Default 'No camera found'. */
31
+ noCameraTitle: string;
32
+ /** Default 'This device has no camera available. You can still add the code another way.' */
33
+ noCameraMessage: string;
34
+ }
35
+ export interface ScannerOverlayProps {
36
+ /**
37
+ * The camera view (for example expo-camera's `CameraView`). It fills the
38
+ * overlay, and the overlay never touches it: mapping `torch` to the
39
+ * camera's `enableTorch` and `state` to its scan callback is the app's job.
40
+ */
41
+ children?: React.ReactNode;
42
+ /** Default `'scanning'`. */
43
+ state?: ScannerOverlayState;
44
+ /** The line under the frame while scanning. Default 'Point the camera at the code'. */
45
+ hint?: string;
46
+ /** Replaces any of the default texts. */
47
+ labels?: Partial<ScannerOverlayLabels>;
48
+ /** Whether the torch is on. Default `false`. */
49
+ torch?: boolean;
50
+ /** Shows the torch button, which calls this with the next value. Hidden when omitted. */
51
+ onTorchChange?: (next: boolean) => void;
52
+ /** Shows the 'Enter code instead' button. It stays reachable in every state, camera or not. */
53
+ onManualEntry?: () => void;
54
+ /** Shows the 'Upload from gallery' button. */
55
+ onGallery?: () => void;
56
+ /** Shows the button on the `noPermission` panel; the app asks or opens Settings. */
57
+ onPermissionAction?: () => void;
58
+ /**
59
+ * Side of the square cutout in points. Never below 240, so a code is large
60
+ * enough to frame, and never wider than the screen less its margins. Default 260.
61
+ */
62
+ frameSize?: number;
63
+ /**
64
+ * The torch button's press haptic; default `'selection'`. `false` also
65
+ * turns off the success and error haptics fired when `state` changes.
66
+ */
67
+ haptic?: HapticType | false;
68
+ style?: StyleProp<ViewStyle>;
69
+ testID?: string;
70
+ }
71
+ declare const ScannerOverlay: React.ForwardRefExoticComponent<ScannerOverlayProps & React.RefAttributes<RNView>>;
72
+ export { ScannerOverlay };
73
+ export default ScannerOverlay;
74
+ //# sourceMappingURL=ScannerOverlay.d.ts.map
@@ -0,0 +1,3 @@
1
+ export type { ScannerOverlayLabels, ScannerOverlayProps, ScannerOverlayState } from './ScannerOverlay.js';
2
+ export { default, ScannerOverlay } from './ScannerOverlay.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -2,6 +2,8 @@ import type { StyleProp, TextInputProps, TextStyle, ViewStyle } from 'react-nati
2
2
  import { TextInput } from 'react-native';
3
3
  import type { HapticType } from '../../utils/hapticUtils.js';
4
4
  import type { SlotIcon } from '../AppIcon/slotIcon.js';
5
+ import type { SearchScope, SearchSuggestion } from './SearchPanel.js';
6
+ export type { SearchScope, SearchSuggestion };
5
7
  export type SearchBarSize = 'sm' | 'md' | 'lg';
6
8
  export type SearchBarVariant = 'filled' | 'outlined' | 'underline';
7
9
  export type SearchBarLabelMode = 'top' | 'float';
@@ -33,6 +35,39 @@ export interface SearchBarProps extends Omit<TextInputProps, 'style' | 'value' |
33
35
  * (the pill). Ignored on `underline`, which is always square.
34
36
  */
35
37
  borderRadius?: number;
38
+ /**
39
+ * Chips under the field that narrow what is searched, for example All, People, Files.
40
+ * Put the broadest scope first: it is the one selected until the person picks another.
41
+ */
42
+ scopes?: SearchScope[];
43
+ /** The selected scope's `value`. Pass it to control the selection; leave it out to let the bar keep it. */
44
+ scope?: string;
45
+ onScopeChange?: (value: string) => void;
46
+ /**
47
+ * Searches to offer while the field is focused and empty, newest first. The app keeps
48
+ * them; `useRecentSearches` does it through mobile-core storage.
49
+ */
50
+ recents?: string[];
51
+ /** Heading above the recent searches. Default `'Recent searches'`. */
52
+ recentsTitle?: string;
53
+ /** Most recent searches drawn. Default 8. */
54
+ maxRecents?: number;
55
+ /** A recent search was tapped. The bar blurs the field; the app sets the text and runs the search. */
56
+ onSelectRecent?: (text: string) => void;
57
+ /** Shows a remove button on each recent search. */
58
+ onRemoveRecent?: (text: string) => void;
59
+ /** Shows a "Clear all" button above the recent searches. */
60
+ onClearRecents?: () => void;
61
+ /**
62
+ * Predicted searches to offer while the field is focused and has text. The app fetches
63
+ * them (from the debounced `onChangeText`); the part of each that matches the field is
64
+ * drawn emphasised. A string is shorthand for `{ text }`.
65
+ */
66
+ suggestions?: (string | SearchSuggestion)[];
67
+ /** Most suggestions drawn. Default 8. */
68
+ maxSuggestions?: number;
69
+ /** A suggestion was tapped. The bar blurs the field; the app sets the text and runs the search. */
70
+ onSelectSuggestion?: (suggestion: SearchSuggestion) => void;
36
71
  /** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
37
72
  haptic?: HapticType | false;
38
73
  style?: StyleProp<ViewStyle>;
@@ -0,0 +1,49 @@
1
+ import type React from 'react';
2
+ import type { HapticType } from '../../utils/hapticUtils.js';
3
+ import type { SlotIcon } from '../AppIcon/slotIcon.js';
4
+ /** A named filter under the field, such as All, People or Files. */
5
+ export interface SearchScope {
6
+ label: string;
7
+ value: string;
8
+ }
9
+ /** A row of predicted searches under the field. A plain string stands for `{ text }`. */
10
+ export interface SearchSuggestion {
11
+ /** Identifies the row when two suggestions share text. Default: the text. */
12
+ id?: string;
13
+ /** The suggested search; the part that matches the field is drawn emphasised. */
14
+ text: string;
15
+ /** A second, quieter line under the text. */
16
+ subtitle?: string;
17
+ /** Replaces the magnifier. */
18
+ icon?: SlotIcon;
19
+ }
20
+ export declare const normalizeSuggestion: (item: string | SearchSuggestion) => SearchSuggestion;
21
+ interface HoldProps {
22
+ /** Called on press-in, so the panel survives the field losing focus to the tap. */
23
+ onHold: () => void;
24
+ onRelease: () => void;
25
+ }
26
+ interface ScopeBarProps {
27
+ scopes: SearchScope[];
28
+ scope: string;
29
+ disabled: boolean;
30
+ haptic?: HapticType | false;
31
+ onChange: (value: string) => void;
32
+ }
33
+ export declare const SearchScopeBar: React.FC<ScopeBarProps>;
34
+ interface RecentsProps extends HoldProps {
35
+ recents: string[];
36
+ title: string;
37
+ onSelect: (text: string) => void;
38
+ onRemove?: (text: string) => void;
39
+ onClear?: () => void;
40
+ }
41
+ export declare const SearchRecents: React.FC<RecentsProps>;
42
+ interface SuggestionsProps extends HoldProps {
43
+ suggestions: SearchSuggestion[];
44
+ query: string;
45
+ onSelect: (item: SearchSuggestion) => void;
46
+ }
47
+ export declare const SearchSuggestions: React.FC<SuggestionsProps>;
48
+ export {};
49
+ //# sourceMappingURL=SearchPanel.d.ts.map
@@ -0,0 +1,14 @@
1
+ export interface HighlightPart {
2
+ text: string;
3
+ match: boolean;
4
+ /** Where the run starts in the text; unique per run, so it serves as a list key. */
5
+ start: number;
6
+ }
7
+ /**
8
+ * Splits `text` into runs that match a word of `query` (case-insensitive) and
9
+ * runs that do not, so a suggestion row can draw the typed part differently.
10
+ * Every whitespace-separated word of the query is matched wherever it occurs;
11
+ * adjacent matches merge into one run. No query or no match gives one plain run.
12
+ */
13
+ export declare const splitHighlight: (text: string, query: string) => HighlightPart[];
14
+ //# sourceMappingURL=highlight.d.ts.map
@@ -1,3 +1,6 @@
1
1
  export type { SearchBarProps, SearchBarSize, SearchBarVariant } from './SearchBar.js';
2
2
  export { default, SearchBar } from './SearchBar.js';
3
+ export type { SearchScope, SearchSuggestion } from './SearchPanel.js';
4
+ export type { UseRecentSearchesOptions, UseRecentSearchesResult } from './useRecentSearches.js';
5
+ export { useRecentSearches } from './useRecentSearches.js';
3
6
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,24 @@
1
+ export interface UseRecentSearchesOptions {
2
+ /** Most searches kept; the oldest drops first. Default 8. */
3
+ max?: number;
4
+ }
5
+ export interface UseRecentSearchesResult {
6
+ /** Newest first. Empty until the saved list has loaded. */
7
+ recents: string[];
8
+ /** Puts `text` at the front. Blank text is ignored; the same text in any case moves up instead of repeating. */
9
+ add: (text: string) => void;
10
+ remove: (text: string) => void;
11
+ /** Empties the list and returns what it held, so a caller can offer undo with `replace`. */
12
+ clear: () => string[];
13
+ /** Swaps the whole list, for undo. */
14
+ replace: (next: string[]) => void;
15
+ }
16
+ /**
17
+ * The device-kept list behind `SearchBar`'s recent searches, saved through
18
+ * mobile-core `Storage` under `storageKey`. Give each search screen its own
19
+ * key. `SearchBar` only draws what it is handed; wire this hook's `recents`,
20
+ * `remove` and `clear` to its `recents`, `onRemoveRecent` and `onClearRecents`,
21
+ * and call `add` when a search is submitted.
22
+ */
23
+ export declare const useRecentSearches: (storageKey: string, options?: UseRecentSearchesOptions) => UseRecentSearchesResult;
24
+ //# sourceMappingURL=useRecentSearches.d.ts.map
@@ -76,7 +76,8 @@ interface BaseSelectProps<T = SelectOption> {
76
76
  /**
77
77
  * Fixed text drawn before the value: `'₹'`, `'+91'`. The same prop and look
78
78
  * as Input's `prefix`, in the placeholder colour. Sits after `leftIcon`. A
79
- * node (a symbol with a subscript) is drawn as is, with the same gap.
79
+ * node (a symbol with a subscript) sits in the same Text with the same gap,
80
+ * so its base and subscript take that size and colour.
80
81
  */
81
82
  prefix?: React.ReactNode;
82
83
  /**