@terreno/ui 57.2.0 → 57.4.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 (383) hide show
  1. package/.ai/guidelines/core.md +1 -1
  2. package/README.md +17 -8
  3. package/dist/ActionSheet.d.ts +3 -3
  4. package/dist/ActionSheet.js +2 -2
  5. package/dist/ActionSheet.js.map +1 -1
  6. package/dist/AnnouncementBanner.d.ts +12 -0
  7. package/dist/AnnouncementBanner.js +61 -0
  8. package/dist/AnnouncementBanner.js.map +1 -0
  9. package/dist/AnnouncementNavigator.d.ts +11 -0
  10. package/dist/AnnouncementNavigator.js +189 -0
  11. package/dist/AnnouncementNavigator.js.map +1 -0
  12. package/dist/AnnouncementScreen.d.ts +12 -0
  13. package/dist/AnnouncementScreen.js +28 -0
  14. package/dist/AnnouncementScreen.js.map +1 -0
  15. package/dist/AreaChart.d.ts +5 -0
  16. package/dist/AreaChart.js +69 -0
  17. package/dist/AreaChart.js.map +1 -0
  18. package/dist/BarChart.d.ts +5 -0
  19. package/dist/BarChart.js +89 -0
  20. package/dist/BarChart.js.map +1 -0
  21. package/dist/Box.d.ts +1 -1
  22. package/dist/Box.js +219 -177
  23. package/dist/Box.js.map +1 -1
  24. package/dist/Button.js +116 -35
  25. package/dist/Button.js.map +1 -1
  26. package/dist/Common.d.ts +215 -9
  27. package/dist/Common.js.map +1 -1
  28. package/dist/ConsentFormScreen.js +46 -12
  29. package/dist/ConsentFormScreen.js.map +1 -1
  30. package/dist/ConsentNavigator.d.ts +5 -1
  31. package/dist/ConsentNavigator.js.map +1 -1
  32. package/dist/DashboardGrid.d.ts +4 -0
  33. package/dist/DashboardGrid.js +38 -0
  34. package/dist/DashboardGrid.js.map +1 -0
  35. package/dist/DataTable.d.ts +2 -2
  36. package/dist/DataTable.js +278 -47
  37. package/dist/DataTable.js.map +1 -1
  38. package/dist/DataTableHeaderInfoMarkdown.d.ts +6 -0
  39. package/dist/DataTableHeaderInfoMarkdown.js +7 -0
  40. package/dist/DataTableHeaderInfoMarkdown.js.map +1 -0
  41. package/dist/DonutChart.d.ts +5 -0
  42. package/dist/DonutChart.js +84 -0
  43. package/dist/DonutChart.js.map +1 -0
  44. package/dist/EmojiSelector.d.ts +2 -46
  45. package/dist/EmojiSelector.js +46 -56
  46. package/dist/EmojiSelector.js.map +1 -1
  47. package/dist/Filter.js +12 -2
  48. package/dist/Filter.js.map +1 -1
  49. package/dist/GPTChat.d.ts +7 -1
  50. package/dist/GPTChat.js +28 -15
  51. package/dist/GPTChat.js.map +1 -1
  52. package/dist/Heading.d.ts +5 -2
  53. package/dist/Heading.js +6 -8
  54. package/dist/Heading.js.map +1 -1
  55. package/dist/Hyperlink.js.map +1 -1
  56. package/dist/Icon.d.ts +1 -2
  57. package/dist/Icon.js +4 -1
  58. package/dist/Icon.js.map +1 -1
  59. package/dist/LineChart.d.ts +5 -0
  60. package/dist/LineChart.js +68 -0
  61. package/dist/LineChart.js.map +1 -0
  62. package/dist/MarkdownEmbed.d.ts +6 -0
  63. package/dist/MarkdownEmbed.js +17 -0
  64. package/dist/MarkdownEmbed.js.map +1 -0
  65. package/dist/MarkdownView.d.ts +6 -3
  66. package/dist/MarkdownView.js +81 -44
  67. package/dist/MarkdownView.js.map +1 -1
  68. package/dist/MediaQuery.d.ts +5 -3
  69. package/dist/MediaQuery.js +9 -40
  70. package/dist/MediaQuery.js.map +1 -1
  71. package/dist/Modal.js +12 -10
  72. package/dist/Modal.js.map +1 -1
  73. package/dist/ModalSheet.d.ts +5 -1
  74. package/dist/ModalSheet.js +31 -13
  75. package/dist/ModalSheet.js.map +1 -1
  76. package/dist/MultiselectField.js +4 -9
  77. package/dist/MultiselectField.js.map +1 -1
  78. package/dist/NotificationBell.d.ts +16 -0
  79. package/dist/NotificationBell.js +15 -0
  80. package/dist/NotificationBell.js.map +1 -0
  81. package/dist/NotificationInbox.d.ts +21 -0
  82. package/dist/NotificationInbox.js +41 -0
  83. package/dist/NotificationInbox.js.map +1 -0
  84. package/dist/NotificationPreferences.d.ts +14 -0
  85. package/dist/NotificationPreferences.js +32 -0
  86. package/dist/NotificationPreferences.js.map +1 -0
  87. package/dist/OpenAPIContext.js +7 -6
  88. package/dist/OpenAPIContext.js.map +1 -1
  89. package/dist/Page.js +7 -1
  90. package/dist/Page.js.map +1 -1
  91. package/dist/PickerSelect.js +8 -1
  92. package/dist/PickerSelect.js.map +1 -1
  93. package/dist/Popover.d.ts +12 -0
  94. package/dist/Popover.js +37 -0
  95. package/dist/Popover.js.map +1 -0
  96. package/dist/PortalHost.js +10 -1
  97. package/dist/PortalHost.js.map +1 -1
  98. package/dist/ResponsiveBreakpoint.d.ts +65 -0
  99. package/dist/ResponsiveBreakpoint.js +111 -0
  100. package/dist/ResponsiveBreakpoint.js.map +1 -0
  101. package/dist/SplitPage.d.ts +2 -2
  102. package/dist/SplitPage.js +7 -12
  103. package/dist/SplitPage.js.map +1 -1
  104. package/dist/SplitPage.native.d.ts +2 -2
  105. package/dist/SplitPage.native.js +1 -6
  106. package/dist/SplitPage.native.js.map +1 -1
  107. package/dist/TapToEdit.js +12 -10
  108. package/dist/TapToEdit.js.map +1 -1
  109. package/dist/TerrenoFontProvider.d.ts +7 -0
  110. package/dist/TerrenoFontProvider.js +27 -0
  111. package/dist/TerrenoFontProvider.js.map +1 -0
  112. package/dist/TerrenoProvider.js +4 -2
  113. package/dist/TerrenoProvider.js.map +1 -1
  114. package/dist/Text.d.ts +5 -2
  115. package/dist/Text.js +6 -11
  116. package/dist/Text.js.map +1 -1
  117. package/dist/TextField.js +83 -6
  118. package/dist/TextField.js.map +1 -1
  119. package/dist/TextFieldNumberActionSheet.js +9 -2
  120. package/dist/TextFieldNumberActionSheet.js.map +1 -1
  121. package/dist/Theme.js +10 -8
  122. package/dist/Theme.js.map +1 -1
  123. package/dist/ToastNotifications.d.ts +4 -2
  124. package/dist/ToastNotifications.js.map +1 -1
  125. package/dist/Tooltip.d.ts +4 -3
  126. package/dist/Tooltip.js +14 -3
  127. package/dist/Tooltip.js.map +1 -1
  128. package/dist/Unifier.d.ts +26 -1
  129. package/dist/Unifier.js.map +1 -1
  130. package/dist/WebAddressAutocomplete.js +6 -1
  131. package/dist/WebAddressAutocomplete.js.map +1 -1
  132. package/dist/announcementBuildVersion.d.ts +6 -0
  133. package/dist/announcementBuildVersion.js +21 -0
  134. package/dist/announcementBuildVersion.js.map +1 -0
  135. package/dist/announcementFrequency.d.ts +42 -0
  136. package/dist/announcementFrequency.js +163 -0
  137. package/dist/announcementFrequency.js.map +1 -0
  138. package/dist/announcementPlatform.d.ts +2 -0
  139. package/dist/announcementPlatform.js +11 -0
  140. package/dist/announcementPlatform.js.map +1 -0
  141. package/dist/charts/ChartFrame.d.ts +12 -0
  142. package/dist/charts/ChartFrame.js +13 -0
  143. package/dist/charts/ChartFrame.js.map +1 -0
  144. package/dist/charts/bars.d.ts +18 -0
  145. package/dist/charts/bars.js +29 -0
  146. package/dist/charts/bars.js.map +1 -0
  147. package/dist/charts/layout.d.ts +47 -0
  148. package/dist/charts/layout.js +56 -0
  149. package/dist/charts/layout.js.map +1 -0
  150. package/dist/charts/paths.d.ts +31 -0
  151. package/dist/charts/paths.js +52 -0
  152. package/dist/charts/paths.js.map +1 -0
  153. package/dist/charts/scales.d.ts +6 -0
  154. package/dist/charts/scales.js +43 -0
  155. package/dist/charts/scales.js.map +1 -0
  156. package/dist/charts/theme.d.ts +9 -0
  157. package/dist/charts/theme.js +15 -0
  158. package/dist/charts/theme.js.map +1 -0
  159. package/dist/charts/types/chartTypes.d.ts +17 -0
  160. package/dist/charts/types/chartTypes.js +2 -0
  161. package/dist/charts/types/chartTypes.js.map +1 -0
  162. package/dist/dashboardGridLayout.d.ts +22 -0
  163. package/dist/dashboardGridLayout.js +33 -0
  164. package/dist/dashboardGridLayout.js.map +1 -0
  165. package/dist/dataTableFilters.d.ts +33 -0
  166. package/dist/dataTableFilters.js +221 -0
  167. package/dist/dataTableFilters.js.map +1 -0
  168. package/dist/dataTableListQuery.d.ts +42 -0
  169. package/dist/dataTableListQuery.js +161 -0
  170. package/dist/dataTableListQuery.js.map +1 -0
  171. package/dist/emojiCategories.d.ts +46 -0
  172. package/dist/emojiCategories.js +47 -0
  173. package/dist/emojiCategories.js.map +1 -0
  174. package/dist/index.d.ts +30 -13
  175. package/dist/index.js +12 -13
  176. package/dist/index.js.map +1 -1
  177. package/dist/lazyBoundaries/createLazyComponentExport.d.ts +6 -0
  178. package/dist/lazyBoundaries/createLazyComponentExport.js +35 -0
  179. package/dist/lazyBoundaries/createLazyComponentExport.js.map +1 -0
  180. package/dist/lazyBoundaries/heavyOptionalExports.d.ts +53 -0
  181. package/dist/lazyBoundaries/heavyOptionalExports.js +51 -0
  182. package/dist/lazyBoundaries/heavyOptionalExports.js.map +1 -0
  183. package/dist/login/LoginScreen.d.ts +1 -0
  184. package/dist/login/LoginScreen.js +4 -2
  185. package/dist/login/LoginScreen.js.map +1 -1
  186. package/dist/login/loginTypes.d.ts +2 -0
  187. package/dist/markdownEmbeds.d.ts +6 -0
  188. package/dist/markdownEmbeds.js +59 -0
  189. package/dist/markdownEmbeds.js.map +1 -0
  190. package/dist/testing/resolveTestId.js +2 -1
  191. package/dist/testing/resolveTestId.js.map +1 -1
  192. package/dist/testing/types.d.ts +3 -0
  193. package/dist/textFieldOscillationGuard.d.ts +25 -0
  194. package/dist/textFieldOscillationGuard.js +41 -0
  195. package/dist/textFieldOscillationGuard.js.map +1 -0
  196. package/dist/useAcknowledgeAnnouncement.d.ts +71 -0
  197. package/dist/useAcknowledgeAnnouncement.js +94 -0
  198. package/dist/useAcknowledgeAnnouncement.js.map +1 -0
  199. package/dist/useAnnouncements.d.ts +73 -0
  200. package/dist/useAnnouncements.js +66 -0
  201. package/dist/useAnnouncements.js.map +1 -0
  202. package/package.json +46 -18
  203. package/src/AIRequestExplorer.test.tsx +141 -0
  204. package/src/ActionSheet.tsx +9 -7
  205. package/src/AnnouncementBanner.test.tsx +267 -0
  206. package/src/AnnouncementBanner.tsx +128 -0
  207. package/src/AnnouncementNavigator.test.tsx +759 -0
  208. package/src/AnnouncementNavigator.tsx +287 -0
  209. package/src/AnnouncementScreen.test.tsx +97 -0
  210. package/src/AnnouncementScreen.tsx +70 -0
  211. package/src/AreaChart.test.tsx +68 -0
  212. package/src/AreaChart.tsx +194 -0
  213. package/src/AttachmentPreview.test.tsx +80 -0
  214. package/src/BarChart.test.tsx +96 -0
  215. package/src/BarChart.tsx +208 -0
  216. package/src/Box.test.tsx +97 -10
  217. package/src/Box.tsx +263 -200
  218. package/src/Button.test.tsx +273 -0
  219. package/src/Button.tsx +163 -50
  220. package/src/Common.ts +219 -25
  221. package/src/ConsentFormScreen.markdownGate.test.tsx +129 -0
  222. package/src/ConsentFormScreen.test.tsx +145 -8
  223. package/src/ConsentFormScreen.tsx +74 -25
  224. package/src/ConsentNavigator.test.tsx +55 -0
  225. package/src/ConsentNavigator.tsx +13 -5
  226. package/src/DashboardGrid.test.tsx +75 -0
  227. package/src/DashboardGrid.tsx +69 -0
  228. package/src/DataTable.test.tsx +296 -1
  229. package/src/DataTable.tsx +623 -160
  230. package/src/DataTableHeaderInfoMarkdown.test.tsx +21 -0
  231. package/src/DataTableHeaderInfoMarkdown.tsx +17 -0
  232. package/src/DataTableVirtualizationRegression.test.tsx +266 -0
  233. package/src/DateTimeField.test.tsx +54 -0
  234. package/src/DonutChart.test.tsx +121 -0
  235. package/src/DonutChart.tsx +160 -0
  236. package/src/EmojiSelector.test.tsx +84 -42
  237. package/src/EmojiSelector.tsx +60 -57
  238. package/src/Field.test.tsx +18 -0
  239. package/src/FilePickerButton.test.tsx +167 -0
  240. package/src/Filter.test.tsx +25 -0
  241. package/src/Filter.tsx +38 -7
  242. package/src/FilterAccordion.test.tsx +37 -0
  243. package/src/FilterBoolean.test.tsx +96 -0
  244. package/src/FilterSelectMenu.test.tsx +23 -0
  245. package/src/GPTChat.test.tsx +803 -0
  246. package/src/GPTChat.tsx +177 -87
  247. package/src/GPTMemoryModal.test.tsx +67 -0
  248. package/src/Heading.tsx +8 -14
  249. package/src/HeightActionSheet.test.tsx +6 -9
  250. package/src/Hyperlink.tsx +5 -18
  251. package/src/Icon.tsx +6 -2
  252. package/src/LineChart.test.tsx +166 -0
  253. package/src/LineChart.tsx +190 -0
  254. package/src/MarkdownEditor.test.tsx +134 -0
  255. package/src/MarkdownEditorField.test.tsx +124 -0
  256. package/src/MarkdownEmbed.test.tsx +34 -0
  257. package/src/MarkdownEmbed.tsx +43 -0
  258. package/src/MarkdownView.test.tsx +112 -11
  259. package/src/MarkdownView.tsx +197 -150
  260. package/src/MediaQuery.ts +30 -34
  261. package/src/Modal.test.tsx +107 -14
  262. package/src/Modal.tsx +20 -8
  263. package/src/ModalSheet.test.tsx +121 -9
  264. package/src/ModalSheet.tsx +46 -11
  265. package/src/MultiselectField.test.tsx +21 -0
  266. package/src/MultiselectField.tsx +11 -13
  267. package/src/NotificationBell.test.tsx +91 -0
  268. package/src/NotificationBell.tsx +77 -0
  269. package/src/NotificationInbox.test.tsx +130 -0
  270. package/src/NotificationInbox.tsx +144 -0
  271. package/src/NotificationPreferences.test.tsx +25 -0
  272. package/src/NotificationPreferences.tsx +75 -0
  273. package/src/OpenAPIContext.tsx +36 -29
  274. package/src/OpenAPIRenderRegression.test.tsx +200 -0
  275. package/src/P0RenderRegression.test.tsx +214 -0
  276. package/src/P1RenderRegression.test.tsx +141 -0
  277. package/src/P2ButtonRenderRegression.test.tsx +158 -0
  278. package/src/Page.test.tsx +13 -0
  279. package/src/Page.tsx +25 -5
  280. package/src/PickerSelect.test.tsx +38 -0
  281. package/src/PickerSelect.tsx +7 -0
  282. package/src/Popover.test.tsx +151 -0
  283. package/src/Popover.tsx +211 -0
  284. package/src/PortalHost.tsx +12 -6
  285. package/src/ResponsiveBreakpoint.test.tsx +184 -0
  286. package/src/ResponsiveBreakpoint.tsx +195 -0
  287. package/src/RootImportRegression.test.tsx +82 -0
  288. package/src/SplitPage.native.tsx +5 -9
  289. package/src/SplitPage.tsx +16 -19
  290. package/src/TapToEdit.test.tsx +45 -0
  291. package/src/TapToEdit.tsx +23 -18
  292. package/src/TerrenoFontProvider.test.tsx +38 -0
  293. package/src/TerrenoFontProvider.tsx +50 -0
  294. package/src/TerrenoProvider.tsx +6 -1
  295. package/src/Text.tsx +8 -21
  296. package/src/TextField.test.tsx +421 -0
  297. package/src/TextField.tsx +121 -4
  298. package/src/TextFieldNumberActionSheet.test.tsx +100 -0
  299. package/src/TextFieldNumberActionSheet.tsx +11 -2
  300. package/src/Theme.test.tsx +27 -0
  301. package/src/Theme.tsx +15 -10
  302. package/src/Toast.tsx +1 -1
  303. package/src/ToastNotifications.tsx +4 -4
  304. package/src/Tooltip.test.tsx +64 -0
  305. package/src/Tooltip.tsx +18 -4
  306. package/src/Unifier.ts +26 -3
  307. package/src/WebAddressAutocomplete.tsx +6 -2
  308. package/src/__snapshots__/ActionSheet.test.tsx.snap +0 -36
  309. package/src/__snapshots__/AddressField.test.tsx.snap +1 -0
  310. package/src/__snapshots__/AttachmentPreview.test.tsx.snap +225 -0
  311. package/src/__snapshots__/CustomSelectField.test.tsx.snap +7 -0
  312. package/src/__snapshots__/DataTable.test.tsx.snap +793 -250
  313. package/src/__snapshots__/DecimalRangeActionSheet.test.tsx.snap +0 -8
  314. package/src/__snapshots__/EmojiSelector.test.tsx.snap +35555 -30
  315. package/src/__snapshots__/Field.test.tsx.snap +29 -0
  316. package/src/__snapshots__/FilterSelectMenu.test.tsx.snap +1 -0
  317. package/src/__snapshots__/HeightActionSheet.test.tsx.snap +0 -8
  318. package/src/__snapshots__/HeightField.test.tsx.snap +0 -20
  319. package/src/__snapshots__/ModalSheet.test.tsx.snap +4 -1
  320. package/src/__snapshots__/NumberPickerActionSheet.test.tsx.snap +0 -8
  321. package/src/__snapshots__/Page.test.tsx.snap +13 -1
  322. package/src/__snapshots__/PickerSelect.test.tsx.snap +7 -0
  323. package/src/__snapshots__/SelectField.test.tsx.snap +6 -0
  324. package/src/__snapshots__/TextArea.test.tsx.snap +5 -5
  325. package/src/__snapshots__/TextField.test.tsx.snap +5 -5
  326. package/src/__snapshots__/TimezonePicker.test.tsx.snap +6 -0
  327. package/src/announcementBuildVersion.test.ts +43 -0
  328. package/src/announcementBuildVersion.ts +21 -0
  329. package/src/announcementFrequency.test.ts +245 -0
  330. package/src/announcementFrequency.ts +246 -0
  331. package/src/announcementPlatform.test.ts +27 -0
  332. package/src/announcementPlatform.ts +13 -0
  333. package/src/benchmarks/importGraph.test.ts +71 -0
  334. package/src/benchmarks/importGraph.ts +136 -0
  335. package/src/benchmarks/importTiming.test.ts +42 -0
  336. package/src/benchmarks/importTiming.ts +86 -0
  337. package/src/bunSetup.ts +174 -32
  338. package/src/charts/ChartFrame.tsx +67 -0
  339. package/src/charts/bars.test.ts +56 -0
  340. package/src/charts/bars.ts +53 -0
  341. package/src/charts/layout.test.ts +80 -0
  342. package/src/charts/layout.ts +99 -0
  343. package/src/charts/paths.test.ts +79 -0
  344. package/src/charts/paths.ts +100 -0
  345. package/src/charts/scales.test.ts +59 -0
  346. package/src/charts/scales.ts +60 -0
  347. package/src/charts/theme.test.ts +22 -0
  348. package/src/charts/theme.ts +24 -0
  349. package/src/charts/types/chartTypes.ts +19 -0
  350. package/src/dashboardGridLayout.test.ts +90 -0
  351. package/src/dashboardGridLayout.ts +60 -0
  352. package/src/dataTableFilters.test.tsx +552 -0
  353. package/src/dataTableFilters.tsx +441 -0
  354. package/src/dataTableListQuery.test.ts +220 -0
  355. package/src/dataTableListQuery.ts +201 -0
  356. package/src/emojiCategories.test.ts +23 -0
  357. package/src/emojiCategories.ts +46 -0
  358. package/src/index.tsx +48 -14
  359. package/src/lazyBoundaries/createLazyComponentExport.test.tsx +104 -0
  360. package/src/lazyBoundaries/createLazyComponentExport.tsx +63 -0
  361. package/src/lazyBoundaries/heavyOptionalExports.test.tsx +33 -0
  362. package/src/lazyBoundaries/heavyOptionalExports.tsx +134 -0
  363. package/src/login/LoginScreen.test.tsx +9 -2
  364. package/src/login/LoginScreen.tsx +6 -2
  365. package/src/login/__snapshots__/LoginScreen.test.tsx.snap +22 -0
  366. package/src/login/loginTypes.ts +2 -0
  367. package/src/markdownEmbeds.test.ts +53 -0
  368. package/src/markdownEmbeds.ts +62 -0
  369. package/src/pdfHtmlTemplate.test.ts +119 -0
  370. package/src/signUp/__snapshots__/SignUpScreen.test.tsx.snap +22 -0
  371. package/src/table/TableDate.test.tsx +35 -1
  372. package/src/table/__snapshots__/TableBadge.test.tsx.snap +1 -0
  373. package/src/testing/resolveTestId.test.ts +3 -0
  374. package/src/testing/resolveTestId.ts +1 -0
  375. package/src/testing/types.ts +3 -0
  376. package/src/textFieldOscillationGuard.test.ts +63 -0
  377. package/src/textFieldOscillationGuard.ts +89 -0
  378. package/src/types/react-native-markdown-display.d.ts +6 -0
  379. package/src/types/react-native-swiper-flatlist.d.ts +5 -5
  380. package/src/useAcknowledgeAnnouncement.test.ts +223 -0
  381. package/src/useAcknowledgeAnnouncement.ts +166 -0
  382. package/src/useAnnouncements.test.ts +226 -0
  383. package/src/useAnnouncements.ts +150 -0
@@ -240,6 +240,28 @@ exports[`Field renders password field 1`] = `
240
240
  },
241
241
  "type": "TextInput",
242
242
  },
243
+ {
244
+ "$$typeof": Symbol(react.test.json),
245
+ "children": null,
246
+ "props": {
247
+ "accessibilityLabel": "Show password",
248
+ "accessibilityRole": "button",
249
+ "accessibilityState": {
250
+ "disabled": undefined,
251
+ "expanded": false,
252
+ },
253
+ "disabled": undefined,
254
+ "hitSlop": 8,
255
+ "onPress": [Function],
256
+ "style": {
257
+ "alignItems": "center",
258
+ "marginLeft": 8,
259
+ "width": 20,
260
+ },
261
+ "testID": undefined,
262
+ },
263
+ "type": "Pressable",
264
+ },
243
265
  ],
244
266
  "props": {
245
267
  "style": {
@@ -1200,6 +1222,7 @@ exports[`Field renders time field 1`] = `
1200
1222
  "flex": 1,
1201
1223
  "fontFamily": "text",
1202
1224
  "fontSize": 16,
1225
+ "minWidth": 0,
1203
1226
  "paddingRight": 8,
1204
1227
  },
1205
1228
  "testID": "text_input",
@@ -1492,6 +1515,7 @@ exports[`Field renders time field 1`] = `
1492
1515
  "flex": 1,
1493
1516
  "fontFamily": "text",
1494
1517
  "fontSize": 16,
1518
+ "minWidth": 0,
1495
1519
  "paddingRight": 8,
1496
1520
  },
1497
1521
  "testID": "text_input",
@@ -2408,6 +2432,7 @@ exports[`Field renders datetime field 1`] = `
2408
2432
  "flex": 1,
2409
2433
  "fontFamily": "text",
2410
2434
  "fontSize": 16,
2435
+ "minWidth": 0,
2411
2436
  "paddingRight": 8,
2412
2437
  },
2413
2438
  "testID": "text_input",
@@ -2700,6 +2725,7 @@ exports[`Field renders datetime field 1`] = `
2700
2725
  "flex": 1,
2701
2726
  "fontFamily": "text",
2702
2727
  "fontSize": 16,
2728
+ "minWidth": 0,
2703
2729
  "paddingRight": 8,
2704
2730
  },
2705
2731
  "testID": "text_input",
@@ -3262,6 +3288,7 @@ exports[`Field renders select field 1`] = `
3262
3288
  "flex": 1,
3263
3289
  "fontFamily": "text",
3264
3290
  "fontSize": 16,
3291
+ "minWidth": 0,
3265
3292
  "paddingRight": 8,
3266
3293
  },
3267
3294
  "testID": "text_input",
@@ -4192,6 +4219,7 @@ exports[`Field renders address field 1`] = `
4192
4219
  "flex": 1,
4193
4220
  "fontFamily": "text",
4194
4221
  "fontSize": 16,
4222
+ "minWidth": 0,
4195
4223
  "paddingRight": 8,
4196
4224
  },
4197
4225
  "testID": "text_input",
@@ -6596,6 +6624,7 @@ exports[`Field renders customSelect field 1`] = `
6596
6624
  "flex": 1,
6597
6625
  "fontFamily": "text",
6598
6626
  "fontSize": 16,
6627
+ "minWidth": 0,
6599
6628
  "paddingRight": 8,
6600
6629
  },
6601
6630
  "testID": "text_input",
@@ -71,6 +71,7 @@ exports[`FilterSelectMenu renders correctly with default props 1`] = `
71
71
  "style": {
72
72
  "color": "#1C1C1C",
73
73
  "flex": 1,
74
+ "minWidth": 0,
74
75
  },
75
76
  "testID": "text_input",
76
77
  "value": "Please select an option.",
@@ -618,12 +618,8 @@ exports[`HeightActionSheet renders correctly 1`] = `
618
618
  "keyboardShouldPersistTaps": undefined,
619
619
  "onMomentumScrollBegin": [Function: AsyncFunction],
620
620
  "onMomentumScrollEnd": [Function: AsyncFunction],
621
- "onScroll": [Function],
622
621
  "onScrollBeginDrag": [Function: AsyncFunction],
623
622
  "onTouchEnd": [Function],
624
- "ref": {
625
- "current": null,
626
- },
627
623
  "scrollEnabled": false,
628
624
  "scrollEventThrottle": 5,
629
625
  "scrollsToTop": false,
@@ -1313,12 +1309,8 @@ exports[`HeightActionSheet renders with different height value 1`] = `
1313
1309
  "keyboardShouldPersistTaps": undefined,
1314
1310
  "onMomentumScrollBegin": [Function: AsyncFunction],
1315
1311
  "onMomentumScrollEnd": [Function: AsyncFunction],
1316
- "onScroll": [Function],
1317
1312
  "onScrollBeginDrag": [Function: AsyncFunction],
1318
1313
  "onTouchEnd": [Function],
1319
- "ref": {
1320
- "current": null,
1321
- },
1322
1314
  "scrollEnabled": false,
1323
1315
  "scrollEventThrottle": 5,
1324
1316
  "scrollsToTop": false,
@@ -679,12 +679,8 @@ exports[`HeightField snapshots should match snapshot with default props 1`] = `
679
679
  "keyboardShouldPersistTaps": undefined,
680
680
  "onMomentumScrollBegin": [Function: AsyncFunction],
681
681
  "onMomentumScrollEnd": [Function: AsyncFunction],
682
- "onScroll": [Function],
683
682
  "onScrollBeginDrag": [Function: AsyncFunction],
684
683
  "onTouchEnd": [Function],
685
- "ref": {
686
- "current": null,
687
- },
688
684
  "scrollEnabled": false,
689
685
  "scrollEventThrottle": 5,
690
686
  "scrollsToTop": false,
@@ -1445,12 +1441,8 @@ exports[`HeightField snapshots should match snapshot with value 1`] = `
1445
1441
  "keyboardShouldPersistTaps": undefined,
1446
1442
  "onMomentumScrollBegin": [Function: AsyncFunction],
1447
1443
  "onMomentumScrollEnd": [Function: AsyncFunction],
1448
- "onScroll": [Function],
1449
1444
  "onScrollBeginDrag": [Function: AsyncFunction],
1450
1445
  "onTouchEnd": [Function],
1451
- "ref": {
1452
- "current": null,
1453
- },
1454
1446
  "scrollEnabled": false,
1455
1447
  "scrollEventThrottle": 5,
1456
1448
  "scrollsToTop": false,
@@ -2311,12 +2303,8 @@ exports[`HeightField snapshots should match snapshot with all props 1`] = `
2311
2303
  "keyboardShouldPersistTaps": undefined,
2312
2304
  "onMomentumScrollBegin": [Function: AsyncFunction],
2313
2305
  "onMomentumScrollEnd": [Function: AsyncFunction],
2314
- "onScroll": [Function],
2315
2306
  "onScrollBeginDrag": [Function: AsyncFunction],
2316
2307
  "onTouchEnd": [Function],
2317
- "ref": {
2318
- "current": null,
2319
- },
2320
2308
  "scrollEnabled": false,
2321
2309
  "scrollEventThrottle": 5,
2322
2310
  "scrollsToTop": false,
@@ -3109,12 +3097,8 @@ exports[`HeightField snapshots should match snapshot when disabled 1`] = `
3109
3097
  "keyboardShouldPersistTaps": undefined,
3110
3098
  "onMomentumScrollBegin": [Function: AsyncFunction],
3111
3099
  "onMomentumScrollEnd": [Function: AsyncFunction],
3112
- "onScroll": [Function],
3113
3100
  "onScrollBeginDrag": [Function: AsyncFunction],
3114
3101
  "onTouchEnd": [Function],
3115
- "ref": {
3116
- "current": null,
3117
- },
3118
3102
  "scrollEnabled": false,
3119
3103
  "scrollEventThrottle": 5,
3120
3104
  "scrollsToTop": false,
@@ -3946,12 +3930,8 @@ exports[`HeightField snapshots should match snapshot with error state 1`] = `
3946
3930
  "keyboardShouldPersistTaps": undefined,
3947
3931
  "onMomentumScrollBegin": [Function: AsyncFunction],
3948
3932
  "onMomentumScrollEnd": [Function: AsyncFunction],
3949
- "onScroll": [Function],
3950
3933
  "onScrollBeginDrag": [Function: AsyncFunction],
3951
3934
  "onTouchEnd": [Function],
3952
- "ref": {
3953
- "current": null,
3954
- },
3955
3935
  "scrollEnabled": false,
3956
3936
  "scrollEventThrottle": 5,
3957
3937
  "scrollsToTop": false,
@@ -20,7 +20,10 @@ exports[`ModalSheet renders correctly with children 1`] = `
20
20
  ],
21
21
  "props": {
22
22
  "ref": {
23
- "current": null,
23
+ "current": {
24
+ "close": [class Function],
25
+ "open": [class Function],
26
+ },
24
27
  },
25
28
  "style": undefined,
26
29
  "testID": "modalize",
@@ -1256,12 +1256,8 @@ exports[`NumberPickerActionSheet renders correctly 1`] = `
1256
1256
  "keyboardShouldPersistTaps": undefined,
1257
1257
  "onMomentumScrollBegin": [Function: AsyncFunction],
1258
1258
  "onMomentumScrollEnd": [Function: AsyncFunction],
1259
- "onScroll": [Function],
1260
1259
  "onScrollBeginDrag": [Function: AsyncFunction],
1261
1260
  "onTouchEnd": [Function],
1262
- "ref": {
1263
- "current": null,
1264
- },
1265
1261
  "scrollEnabled": false,
1266
1262
  "scrollEventThrottle": 5,
1267
1263
  "scrollsToTop": false,
@@ -5289,12 +5285,8 @@ exports[`NumberPickerActionSheet renders with different range 1`] = `
5289
5285
  "keyboardShouldPersistTaps": undefined,
5290
5286
  "onMomentumScrollBegin": [Function: AsyncFunction],
5291
5287
  "onMomentumScrollEnd": [Function: AsyncFunction],
5292
- "onScroll": [Function],
5293
5288
  "onScrollBeginDrag": [Function: AsyncFunction],
5294
5289
  "onTouchEnd": [Function],
5295
- "ref": {
5296
- "current": null,
5297
- },
5298
5290
  "scrollEnabled": false,
5299
5291
  "scrollEventThrottle": 5,
5300
5292
  "scrollsToTop": false,
@@ -159,6 +159,7 @@ exports[`Page renders with title 1`] = `
159
159
  "flexGrow": 1,
160
160
  "flexShrink": 1,
161
161
  "justifyContent": "center",
162
+ "pointerEvents": "box-none",
162
163
  },
163
164
  "testID": undefined,
164
165
  },
@@ -172,6 +173,7 @@ exports[`Page renders with title 1`] = `
172
173
  "display": "flex",
173
174
  "flex": undefined,
174
175
  "flexDirection": "row",
176
+ "position": "relative",
175
177
  "width": "100%",
176
178
  },
177
179
  "testID": undefined,
@@ -312,7 +314,7 @@ exports[`Page renders with back button 1`] = `
312
314
  ],
313
315
  "props": {
314
316
  "accessibilityHint": "Navigate back",
315
- "accessibilityLabel": "",
317
+ "accessibilityLabel": "Back",
316
318
  "onPress": [Function],
317
319
  "testID": "icon-button-chevron-left",
318
320
  },
@@ -328,7 +330,11 @@ exports[`Page renders with back button 1`] = `
328
330
  "flexDirection": "row",
329
331
  "justifyContent": "center",
330
332
  "paddingBottom": 12,
333
+ "paddingLeft": 16,
334
+ "paddingRight": 16,
331
335
  "paddingTop": 12,
336
+ "position": "relative",
337
+ "zIndex": 1,
332
338
  },
333
339
  "testID": undefined,
334
340
  },
@@ -365,6 +371,7 @@ exports[`Page renders with back button 1`] = `
365
371
  "flexGrow": 1,
366
372
  "flexShrink": 1,
367
373
  "justifyContent": "center",
374
+ "pointerEvents": "box-none",
368
375
  },
369
376
  "testID": undefined,
370
377
  },
@@ -378,6 +385,7 @@ exports[`Page renders with back button 1`] = `
378
385
  "display": "flex",
379
386
  "flex": undefined,
380
387
  "flexDirection": "row",
388
+ "position": "relative",
381
389
  "width": "100%",
382
390
  },
383
391
  "testID": undefined,
@@ -571,6 +579,7 @@ exports[`Page renders with close button 1`] = `
571
579
  "flexGrow": 1,
572
580
  "flexShrink": 1,
573
581
  "justifyContent": "center",
582
+ "pointerEvents": "box-none",
574
583
  },
575
584
  "testID": undefined,
576
585
  },
@@ -584,6 +593,7 @@ exports[`Page renders with close button 1`] = `
584
593
  "display": "flex",
585
594
  "flex": undefined,
586
595
  "flexDirection": "row",
596
+ "position": "relative",
587
597
  "width": "100%",
588
598
  },
589
599
  "testID": undefined,
@@ -736,6 +746,7 @@ exports[`Page renders with right button 1`] = `
736
746
  "flexGrow": 1,
737
747
  "flexShrink": 1,
738
748
  "justifyContent": "center",
749
+ "pointerEvents": "box-none",
739
750
  },
740
751
  "testID": undefined,
741
752
  },
@@ -837,6 +848,7 @@ exports[`Page renders with right button 1`] = `
837
848
  "display": "flex",
838
849
  "flex": undefined,
839
850
  "flexDirection": "row",
851
+ "position": "relative",
840
852
  "width": "100%",
841
853
  },
842
854
  "testID": undefined,
@@ -19,6 +19,7 @@ exports[`PickerSelect renders correctly with default props 1`] = `
19
19
  "style": {
20
20
  "color": "#1C1C1C",
21
21
  "flex": 1,
22
+ "minWidth": 0,
22
23
  },
23
24
  "testID": "text_input",
24
25
  "value": "Select an option",
@@ -287,6 +288,7 @@ exports[`PickerSelect renders with selected value 1`] = `
287
288
  "style": {
288
289
  "color": "#1C1C1C",
289
290
  "flex": 1,
291
+ "minWidth": 0,
290
292
  },
291
293
  "testID": "text_input",
292
294
  "value": "Option 2",
@@ -555,6 +557,7 @@ exports[`PickerSelect renders disabled state 1`] = `
555
557
  "style": {
556
558
  "color": "#686868",
557
559
  "flex": 1,
560
+ "minWidth": 0,
558
561
  },
559
562
  "testID": "text_input",
560
563
  "value": "Select an option",
@@ -825,6 +828,7 @@ exports[`PickerSelect renders without placeholder when placeholder is empty obje
825
828
  "style": {
826
829
  "color": "#1C1C1C",
827
830
  "flex": 1,
831
+ "minWidth": 0,
828
832
  },
829
833
  "testID": "text_input",
830
834
  "value": "Option 1",
@@ -1083,6 +1087,7 @@ exports[`PickerSelect matches items by itemKey 1`] = `
1083
1087
  "style": {
1084
1088
  "color": "#1C1C1C",
1085
1089
  "flex": 1,
1090
+ "minWidth": 0,
1086
1091
  },
1087
1092
  "testID": "text_input",
1088
1093
  "value": "Option 2",
@@ -1341,6 +1346,7 @@ exports[`PickerSelect renders custom InputAccessoryView 1`] = `
1341
1346
  "style": {
1342
1347
  "color": "#1C1C1C",
1343
1348
  "flex": 1,
1349
+ "minWidth": 0,
1344
1350
  },
1345
1351
  "testID": "text_input",
1346
1352
  "value": "Select an option",
@@ -1530,6 +1536,7 @@ exports[`PickerSelect passes textInputProps to TextInput 1`] = `
1530
1536
  "style": {
1531
1537
  "color": "#1C1C1C",
1532
1538
  "flex": 1,
1539
+ "minWidth": 0,
1533
1540
  },
1534
1541
  "testID": "text_input",
1535
1542
  "value": "Option 1",
@@ -25,6 +25,7 @@ exports[`SelectField renders correctly with default props 1`] = `
25
25
  "flex": 1,
26
26
  "fontFamily": "text",
27
27
  "fontSize": 16,
28
+ "minWidth": 0,
28
29
  "paddingRight": 8,
29
30
  },
30
31
  "testID": "text_input",
@@ -393,6 +394,7 @@ exports[`SelectField renders with title 1`] = `
393
394
  "flex": 1,
394
395
  "fontFamily": "text",
395
396
  "fontSize": 16,
397
+ "minWidth": 0,
396
398
  "paddingRight": 8,
397
399
  },
398
400
  "testID": "text_input",
@@ -746,6 +748,7 @@ exports[`SelectField renders with selected value 1`] = `
746
748
  "flex": 1,
747
749
  "fontFamily": "text",
748
750
  "fontSize": 16,
751
+ "minWidth": 0,
749
752
  "paddingRight": 8,
750
753
  },
751
754
  "testID": "text_input",
@@ -1099,6 +1102,7 @@ exports[`SelectField renders with custom placeholder 1`] = `
1099
1102
  "flex": 1,
1100
1103
  "fontFamily": "text",
1101
1104
  "fontSize": 16,
1105
+ "minWidth": 0,
1102
1106
  "paddingRight": 8,
1103
1107
  },
1104
1108
  "testID": "text_input",
@@ -1452,6 +1456,7 @@ exports[`SelectField renders disabled state 1`] = `
1452
1456
  "flex": 1,
1453
1457
  "fontFamily": "text",
1454
1458
  "fontSize": 16,
1459
+ "minWidth": 0,
1455
1460
  "paddingRight": 8,
1456
1461
  },
1457
1462
  "testID": "text_input",
@@ -1807,6 +1812,7 @@ exports[`SelectField renders with requireValue (no clear option) 1`] = `
1807
1812
  "flex": 1,
1808
1813
  "fontFamily": "text",
1809
1814
  "fontSize": 16,
1815
+ "minWidth": 0,
1810
1816
  "paddingRight": 8,
1811
1817
  },
1812
1818
  "testID": "text_input",
@@ -28,7 +28,7 @@ exports[`TextArea snapshots should match snapshot with default props 1`] = `
28
28
  "nativeID": undefined,
29
29
  "numberOfLines": 1,
30
30
  "onBlur": [Function],
31
- "onChangeText": [class Function],
31
+ "onChangeText": [Function],
32
32
  "onContentSizeChange": [Function],
33
33
  "onFocus": [Function],
34
34
  "onSubmitEditing": [Function],
@@ -136,7 +136,7 @@ exports[`TextArea snapshots should match snapshot with all props 1`] = `
136
136
  "nativeID": undefined,
137
137
  "numberOfLines": 5,
138
138
  "onBlur": [Function],
139
- "onChangeText": [class Function],
139
+ "onChangeText": [Function],
140
140
  "onContentSizeChange": [Function],
141
141
  "onFocus": [Function],
142
142
  "onSubmitEditing": [Function],
@@ -273,7 +273,7 @@ exports[`TextArea snapshots should match snapshot when disabled 1`] = `
273
273
  "nativeID": undefined,
274
274
  "numberOfLines": 1,
275
275
  "onBlur": [Function],
276
- "onChangeText": [class Function],
276
+ "onChangeText": [Function],
277
277
  "onContentSizeChange": [Function],
278
278
  "onFocus": [Function],
279
279
  "onSubmitEditing": [Function],
@@ -420,7 +420,7 @@ exports[`TextArea snapshots should match snapshot with error state 1`] = `
420
420
  "nativeID": undefined,
421
421
  "numberOfLines": 1,
422
422
  "onBlur": [Function],
423
- "onChangeText": [class Function],
423
+ "onChangeText": [Function],
424
424
  "onContentSizeChange": [Function],
425
425
  "onFocus": [Function],
426
426
  "onSubmitEditing": [Function],
@@ -528,7 +528,7 @@ exports[`TextArea snapshots should match snapshot with multiline content 1`] = `
528
528
  "nativeID": undefined,
529
529
  "numberOfLines": 4,
530
530
  "onBlur": [Function],
531
- "onChangeText": [class Function],
531
+ "onChangeText": [Function],
532
532
  "onContentSizeChange": [Function],
533
533
  "onFocus": [Function],
534
534
  "onSubmitEditing": [Function],
@@ -28,7 +28,7 @@ exports[`TextField snapshots should match snapshot with default props 1`] = `
28
28
  "nativeID": undefined,
29
29
  "numberOfLines": 1,
30
30
  "onBlur": [Function],
31
- "onChangeText": [class Function],
31
+ "onChangeText": [Function],
32
32
  "onContentSizeChange": [Function],
33
33
  "onFocus": [Function],
34
34
  "onSubmitEditing": [Function],
@@ -175,7 +175,7 @@ exports[`TextField snapshots should match snapshot with all props 1`] = `
175
175
  "nativeID": undefined,
176
176
  "numberOfLines": 1,
177
177
  "onBlur": [Function],
178
- "onChangeText": [class Function],
178
+ "onChangeText": [Function],
179
179
  "onContentSizeChange": [Function],
180
180
  "onFocus": [Function],
181
181
  "onSubmitEditing": [Function],
@@ -321,7 +321,7 @@ exports[`TextField snapshots should match snapshot when disabled 1`] = `
321
321
  "nativeID": undefined,
322
322
  "numberOfLines": 1,
323
323
  "onBlur": [Function],
324
- "onChangeText": [class Function],
324
+ "onChangeText": [Function],
325
325
  "onContentSizeChange": [Function],
326
326
  "onFocus": [Function],
327
327
  "onSubmitEditing": [Function],
@@ -429,7 +429,7 @@ exports[`TextField snapshots should match snapshot with multiline 1`] = `
429
429
  "nativeID": undefined,
430
430
  "numberOfLines": 3,
431
431
  "onBlur": [Function],
432
- "onChangeText": [class Function],
432
+ "onChangeText": [Function],
433
433
  "onContentSizeChange": [Function],
434
434
  "onFocus": [Function],
435
435
  "onSubmitEditing": [Function],
@@ -576,7 +576,7 @@ exports[`TextField snapshots should match snapshot with error state 1`] = `
576
576
  "nativeID": undefined,
577
577
  "numberOfLines": 1,
578
578
  "onBlur": [Function],
579
- "onChangeText": [class Function],
579
+ "onChangeText": [Function],
580
580
  "onContentSizeChange": [Function],
581
581
  "onFocus": [Function],
582
582
  "onSubmitEditing": [Function],
@@ -40,6 +40,7 @@ exports[`TimezonePicker renders correctly with default props 1`] = `
40
40
  "flex": 1,
41
41
  "fontFamily": "text",
42
42
  "fontSize": 16,
43
+ "minWidth": 0,
43
44
  "paddingRight": 8,
44
45
  },
45
46
  "testID": "text_input",
@@ -545,6 +546,7 @@ exports[`TimezonePicker hides title when hideTitle is true 1`] = `
545
546
  "flex": 1,
546
547
  "fontFamily": "text",
547
548
  "fontSize": 16,
549
+ "minWidth": 0,
548
550
  "paddingRight": 8,
549
551
  },
550
552
  "testID": "text_input",
@@ -1065,6 +1067,7 @@ exports[`TimezonePicker renders with selected timezone 1`] = `
1065
1067
  "flex": 1,
1066
1068
  "fontFamily": "text",
1067
1069
  "fontSize": 16,
1070
+ "minWidth": 0,
1068
1071
  "paddingRight": 8,
1069
1072
  },
1070
1073
  "testID": "text_input",
@@ -1585,6 +1588,7 @@ exports[`TimezonePicker renders USA timezones by default 1`] = `
1585
1588
  "flex": 1,
1586
1589
  "fontFamily": "text",
1587
1590
  "fontSize": 16,
1591
+ "minWidth": 0,
1588
1592
  "paddingRight": 8,
1589
1593
  },
1590
1594
  "testID": "text_input",
@@ -2105,6 +2109,7 @@ exports[`TimezonePicker renders with short timezone labels 1`] = `
2105
2109
  "flex": 1,
2106
2110
  "fontFamily": "text",
2107
2111
  "fontSize": 16,
2112
+ "minWidth": 0,
2108
2113
  "paddingRight": 8,
2109
2114
  },
2110
2115
  "testID": "text_input",
@@ -2625,6 +2630,7 @@ exports[`TimezonePicker calls onChange when timezone is selected 1`] = `
2625
2630
  "flex": 1,
2626
2631
  "fontFamily": "text",
2627
2632
  "fontSize": 16,
2633
+ "minWidth": 0,
2628
2634
  "paddingRight": 8,
2629
2635
  },
2630
2636
  "testID": "text_input",
@@ -0,0 +1,43 @@
1
+ import {afterEach, describe, it, mock} from "bun:test";
2
+ import {assert} from "chai";
3
+
4
+ const constantsState = {
5
+ expoConfig: {
6
+ extra: {
7
+ buildNumber: undefined as number | string | undefined,
8
+ },
9
+ },
10
+ };
11
+
12
+ mock.module("expo-constants", () => ({
13
+ default: constantsState,
14
+ }));
15
+
16
+ const {getAnnouncementBuildVersion} = await import("./announcementBuildVersion");
17
+
18
+ describe("getAnnouncementBuildVersion", () => {
19
+ afterEach(() => {
20
+ constantsState.expoConfig.extra.buildNumber = undefined;
21
+ });
22
+
23
+ it("returns a finite integer build number from Expo config", () => {
24
+ constantsState.expoConfig.extra.buildNumber = 42;
25
+ assert.strictEqual(getAnnouncementBuildVersion(), 42);
26
+ });
27
+
28
+ it("coerces string build numbers to integers", () => {
29
+ constantsState.expoConfig.extra.buildNumber = "17";
30
+ assert.strictEqual(getAnnouncementBuildVersion(), 17);
31
+ });
32
+
33
+ it("omits invalid or missing build numbers", () => {
34
+ constantsState.expoConfig.extra.buildNumber = undefined;
35
+ assert.isUndefined(getAnnouncementBuildVersion());
36
+
37
+ constantsState.expoConfig.extra.buildNumber = "not-a-number";
38
+ assert.isUndefined(getAnnouncementBuildVersion());
39
+
40
+ constantsState.expoConfig.extra.buildNumber = Number.NaN;
41
+ assert.isUndefined(getAnnouncementBuildVersion());
42
+ });
43
+ });
@@ -0,0 +1,21 @@
1
+ import Constants from "expo-constants";
2
+
3
+ const coerceBuildNumber = (value: unknown): number | undefined => {
4
+ if (value === undefined || value === null) {
5
+ return undefined;
6
+ }
7
+ const parsed = typeof value === "number" ? value : Number.parseInt(String(value), 10);
8
+ if (!Number.isFinite(parsed) || !Number.isInteger(parsed)) {
9
+ return undefined;
10
+ }
11
+ return parsed;
12
+ };
13
+
14
+ /**
15
+ * Returns the running app's build number from Expo config, matching
16
+ * `useUpgradeCheck` / `Constants.expoConfig.extra.buildNumber`.
17
+ * Omits the value when missing or not a finite integer.
18
+ */
19
+ export const getAnnouncementBuildVersion = (): number | undefined => {
20
+ return coerceBuildNumber(Constants.expoConfig?.extra?.buildNumber);
21
+ };