@oxyhq/bloom 0.50.1 → 0.51.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 (571) hide show
  1. package/NOTICE +89 -0
  2. package/README.md +12 -7
  3. package/lib/commonjs/avatar-group/AvatarGroup.web.js +2 -1
  4. package/lib/commonjs/avatar-group/AvatarGroup.web.js.map +1 -1
  5. package/lib/commonjs/bottom-sheet/index.web.js +5 -3
  6. package/lib/commonjs/bottom-sheet/index.web.js.map +1 -1
  7. package/lib/commonjs/context-menu/index.web.js +6 -9
  8. package/lib/commonjs/context-menu/index.web.js.map +1 -1
  9. package/lib/commonjs/dialog/Dialog.js +12 -7
  10. package/lib/commonjs/dialog/Dialog.js.map +1 -1
  11. package/lib/commonjs/dialog/Dialog.web.js +18 -22
  12. package/lib/commonjs/dialog/Dialog.web.js.map +1 -1
  13. package/lib/commonjs/dialog/DialogHeader.js +61 -12
  14. package/lib/commonjs/dialog/DialogHeader.js.map +1 -1
  15. package/lib/commonjs/index.js +90 -83
  16. package/lib/commonjs/index.js.map +1 -1
  17. package/lib/commonjs/index.web.js +116 -109
  18. package/lib/commonjs/index.web.js.map +1 -1
  19. package/lib/commonjs/menu/index.web.js +5 -8
  20. package/lib/commonjs/menu/index.web.js.map +1 -1
  21. package/lib/commonjs/popover/index.web.js +8 -9
  22. package/lib/commonjs/popover/index.web.js.map +1 -1
  23. package/lib/commonjs/portal/index.js +4 -1
  24. package/lib/commonjs/portal/index.js.map +1 -1
  25. package/lib/commonjs/progressive-blur/index.js +79 -0
  26. package/lib/commonjs/progressive-blur/index.js.map +1 -0
  27. package/lib/commonjs/progressive-blur/index.web.js +67 -0
  28. package/lib/commonjs/progressive-blur/index.web.js.map +1 -0
  29. package/lib/commonjs/progressive-blur/shared.js +66 -0
  30. package/lib/commonjs/progressive-blur/shared.js.map +1 -0
  31. package/lib/commonjs/progressive-blur/types.js +6 -0
  32. package/lib/commonjs/progressive-blur/types.js.map +1 -0
  33. package/lib/commonjs/select/index.web.js +5 -8
  34. package/lib/commonjs/select/index.web.js.map +1 -1
  35. package/lib/commonjs/slider/Slider.js +4 -9
  36. package/lib/commonjs/slider/Slider.js.map +1 -1
  37. package/lib/commonjs/styles/web-view-style.js +26 -0
  38. package/lib/commonjs/styles/web-view-style.js.map +1 -0
  39. package/lib/commonjs/switch/Switch.js +4 -8
  40. package/lib/commonjs/switch/Switch.js.map +1 -1
  41. package/lib/commonjs/tab-bar/TabBarBase.js +415 -0
  42. package/lib/commonjs/tab-bar/TabBarBase.js.map +1 -0
  43. package/lib/commonjs/tab-bar/expo-router/RouterTabBar.js +83 -0
  44. package/lib/commonjs/tab-bar/expo-router/RouterTabBar.js.map +1 -0
  45. package/lib/commonjs/tab-bar/expo-router/fading-tab-screen.js +119 -0
  46. package/lib/commonjs/tab-bar/expo-router/fading-tab-screen.js.map +1 -0
  47. package/lib/commonjs/tab-bar/expo-router/index.js +26 -0
  48. package/lib/commonjs/tab-bar/expo-router/index.js.map +1 -0
  49. package/lib/commonjs/tab-bar/glyph.js +43 -0
  50. package/lib/commonjs/tab-bar/glyph.js.map +1 -0
  51. package/lib/commonjs/tab-bar/glyph.native.js +55 -0
  52. package/lib/commonjs/tab-bar/glyph.native.js.map +1 -0
  53. package/lib/commonjs/tab-bar/index.js +65 -0
  54. package/lib/commonjs/tab-bar/index.js.map +1 -0
  55. package/lib/commonjs/tab-bar/index.web.js +67 -0
  56. package/lib/commonjs/tab-bar/index.web.js.map +1 -0
  57. package/lib/commonjs/tab-bar/minimize-context.js +127 -0
  58. package/lib/commonjs/tab-bar/minimize-context.js.map +1 -0
  59. package/lib/commonjs/tab-bar/shared.js +139 -0
  60. package/lib/commonjs/tab-bar/shared.js.map +1 -0
  61. package/lib/commonjs/tab-bar/surface.js +50 -0
  62. package/lib/commonjs/tab-bar/surface.js.map +1 -0
  63. package/lib/commonjs/tab-bar/surface.native.js +56 -0
  64. package/lib/commonjs/tab-bar/surface.native.js.map +1 -0
  65. package/lib/commonjs/tab-bar/surface.web.js +59 -0
  66. package/lib/commonjs/tab-bar/surface.web.js.map +1 -0
  67. package/lib/commonjs/tab-bar/types.js +6 -0
  68. package/lib/commonjs/tab-bar/types.js.map +1 -0
  69. package/lib/commonjs/tabs/Tabs.js +3 -8
  70. package/lib/commonjs/tabs/Tabs.js.map +1 -1
  71. package/lib/commonjs/toast/Positioner.js +117 -0
  72. package/lib/commonjs/toast/Positioner.js.map +1 -0
  73. package/lib/commonjs/toast/ToastContent.js +301 -0
  74. package/lib/commonjs/toast/ToastContent.js.map +1 -0
  75. package/lib/commonjs/toast/ToastHost.js +69 -0
  76. package/lib/commonjs/toast/ToastHost.js.map +1 -0
  77. package/lib/commonjs/toast/ToastHost.native.js +44 -0
  78. package/lib/commonjs/toast/ToastHost.native.js.map +1 -0
  79. package/lib/commonjs/toast/ToastIcon.js +57 -0
  80. package/lib/commonjs/toast/ToastIcon.js.map +1 -0
  81. package/lib/commonjs/toast/ToastRow.js +411 -0
  82. package/lib/commonjs/toast/ToastRow.js.map +1 -0
  83. package/lib/commonjs/toast/ToastSwipeHandler.js +189 -0
  84. package/lib/commonjs/toast/ToastSwipeHandler.js.map +1 -0
  85. package/lib/commonjs/toast/Toaster.js +205 -0
  86. package/lib/commonjs/toast/Toaster.js.map +1 -0
  87. package/lib/commonjs/toast/animations.js +274 -0
  88. package/lib/commonjs/toast/animations.js.map +1 -0
  89. package/lib/commonjs/toast/constants.js +56 -0
  90. package/lib/commonjs/toast/constants.js.map +1 -0
  91. package/lib/commonjs/toast/context.js +42 -0
  92. package/lib/commonjs/toast/context.js.map +1 -0
  93. package/lib/commonjs/toast/index.js +32 -126
  94. package/lib/commonjs/toast/index.js.map +1 -1
  95. package/lib/commonjs/toast/position-utils.js +115 -0
  96. package/lib/commonjs/toast/position-utils.js.map +1 -0
  97. package/lib/commonjs/toast/positioner-utils.js +141 -0
  98. package/lib/commonjs/toast/positioner-utils.js.map +1 -0
  99. package/lib/commonjs/toast/toast-comparator.js +28 -0
  100. package/lib/commonjs/toast/toast-comparator.js.map +1 -0
  101. package/lib/commonjs/toast/toast-fns.js +90 -0
  102. package/lib/commonjs/toast/toast-fns.js.map +1 -0
  103. package/lib/commonjs/toast/toast-store.js +352 -0
  104. package/lib/commonjs/toast/toast-store.js.map +1 -0
  105. package/lib/commonjs/toast/toast-timers.js +110 -0
  106. package/lib/commonjs/toast/toast-timers.js.map +1 -0
  107. package/lib/commonjs/toast/types.js +42 -0
  108. package/lib/commonjs/toast/types.js.map +1 -1
  109. package/lib/commonjs/toast/use-animated-target.js +57 -0
  110. package/lib/commonjs/toast/use-animated-target.js.map +1 -0
  111. package/lib/commonjs/toast/use-app-state.js +76 -0
  112. package/lib/commonjs/toast/use-app-state.js.map +1 -0
  113. package/lib/commonjs/toast/use-toast-colors.js +114 -0
  114. package/lib/commonjs/toast/use-toast-colors.js.map +1 -0
  115. package/lib/commonjs/toast/use-toast-position.js +40 -0
  116. package/lib/commonjs/toast/use-toast-position.js.map +1 -0
  117. package/lib/commonjs/tooltip/index.web.js +2 -1
  118. package/lib/commonjs/tooltip/index.web.js.map +1 -1
  119. package/lib/commonjs/zoomable-image-gallery/ZoomableImageGallery.js +20 -8
  120. package/lib/commonjs/zoomable-image-gallery/ZoomableImageGallery.js.map +1 -1
  121. package/lib/module/avatar-group/AvatarGroup.web.js +2 -1
  122. package/lib/module/avatar-group/AvatarGroup.web.js.map +1 -1
  123. package/lib/module/bottom-sheet/index.web.js +5 -3
  124. package/lib/module/bottom-sheet/index.web.js.map +1 -1
  125. package/lib/module/context-menu/index.web.js +6 -9
  126. package/lib/module/context-menu/index.web.js.map +1 -1
  127. package/lib/module/dialog/Dialog.js +12 -7
  128. package/lib/module/dialog/Dialog.js.map +1 -1
  129. package/lib/module/dialog/Dialog.web.js +18 -22
  130. package/lib/module/dialog/Dialog.web.js.map +1 -1
  131. package/lib/module/dialog/DialogHeader.js +61 -12
  132. package/lib/module/dialog/DialogHeader.js.map +1 -1
  133. package/lib/module/index.js +3 -2
  134. package/lib/module/index.js.map +1 -1
  135. package/lib/module/index.web.js +3 -2
  136. package/lib/module/index.web.js.map +1 -1
  137. package/lib/module/menu/index.web.js +5 -8
  138. package/lib/module/menu/index.web.js.map +1 -1
  139. package/lib/module/popover/index.web.js +8 -9
  140. package/lib/module/popover/index.web.js.map +1 -1
  141. package/lib/module/portal/index.js +4 -1
  142. package/lib/module/portal/index.js.map +1 -1
  143. package/lib/module/progressive-blur/index.js +74 -0
  144. package/lib/module/progressive-blur/index.js.map +1 -0
  145. package/lib/module/progressive-blur/index.web.js +62 -0
  146. package/lib/module/progressive-blur/index.web.js.map +1 -0
  147. package/lib/module/progressive-blur/shared.js +60 -0
  148. package/lib/module/progressive-blur/shared.js.map +1 -0
  149. package/lib/module/progressive-blur/types.js +4 -0
  150. package/lib/module/progressive-blur/types.js.map +1 -0
  151. package/lib/module/select/index.web.js +5 -8
  152. package/lib/module/select/index.web.js.map +1 -1
  153. package/lib/module/slider/Slider.js +4 -9
  154. package/lib/module/slider/Slider.js.map +1 -1
  155. package/lib/module/styles/web-view-style.js +22 -0
  156. package/lib/module/styles/web-view-style.js.map +1 -0
  157. package/lib/module/switch/Switch.js +4 -8
  158. package/lib/module/switch/Switch.js.map +1 -1
  159. package/lib/module/tab-bar/TabBarBase.js +408 -0
  160. package/lib/module/tab-bar/TabBarBase.js.map +1 -0
  161. package/lib/module/tab-bar/expo-router/RouterTabBar.js +78 -0
  162. package/lib/module/tab-bar/expo-router/RouterTabBar.js.map +1 -0
  163. package/lib/module/tab-bar/expo-router/fading-tab-screen.js +113 -0
  164. package/lib/module/tab-bar/expo-router/fading-tab-screen.js.map +1 -0
  165. package/lib/module/tab-bar/expo-router/index.js +15 -0
  166. package/lib/module/tab-bar/expo-router/index.js.map +1 -0
  167. package/lib/module/tab-bar/glyph.js +38 -0
  168. package/lib/module/tab-bar/glyph.js.map +1 -0
  169. package/lib/module/tab-bar/glyph.native.js +50 -0
  170. package/lib/module/tab-bar/glyph.native.js.map +1 -0
  171. package/lib/module/tab-bar/index.js +24 -0
  172. package/lib/module/tab-bar/index.js.map +1 -0
  173. package/lib/module/tab-bar/index.web.js +26 -0
  174. package/lib/module/tab-bar/index.web.js.map +1 -0
  175. package/lib/module/tab-bar/minimize-context.js +118 -0
  176. package/lib/module/tab-bar/minimize-context.js.map +1 -0
  177. package/lib/module/tab-bar/shared.js +132 -0
  178. package/lib/module/tab-bar/shared.js.map +1 -0
  179. package/lib/module/tab-bar/surface.js +44 -0
  180. package/lib/module/tab-bar/surface.js.map +1 -0
  181. package/lib/module/tab-bar/surface.native.js +50 -0
  182. package/lib/module/tab-bar/surface.native.js.map +1 -0
  183. package/lib/module/tab-bar/surface.web.js +53 -0
  184. package/lib/module/tab-bar/surface.web.js.map +1 -0
  185. package/lib/module/tab-bar/types.js +4 -0
  186. package/lib/module/tab-bar/types.js.map +1 -0
  187. package/lib/module/tabs/Tabs.js +3 -8
  188. package/lib/module/tabs/Tabs.js.map +1 -1
  189. package/lib/module/toast/Positioner.js +110 -0
  190. package/lib/module/toast/Positioner.js.map +1 -0
  191. package/lib/module/toast/ToastContent.js +295 -0
  192. package/lib/module/toast/ToastContent.js.map +1 -0
  193. package/lib/module/toast/ToastHost.js +63 -0
  194. package/lib/module/toast/ToastHost.js.map +1 -0
  195. package/lib/module/toast/ToastHost.native.js +38 -0
  196. package/lib/module/toast/ToastHost.native.js.map +1 -0
  197. package/lib/module/toast/ToastIcon.js +52 -0
  198. package/lib/module/toast/ToastIcon.js.map +1 -0
  199. package/lib/module/toast/ToastRow.js +407 -0
  200. package/lib/module/toast/ToastRow.js.map +1 -0
  201. package/lib/module/toast/ToastSwipeHandler.js +182 -0
  202. package/lib/module/toast/ToastSwipeHandler.js.map +1 -0
  203. package/lib/module/toast/Toaster.js +198 -0
  204. package/lib/module/toast/Toaster.js.map +1 -0
  205. package/lib/module/toast/animations.js +261 -0
  206. package/lib/module/toast/animations.js.map +1 -0
  207. package/lib/module/toast/constants.js +52 -0
  208. package/lib/module/toast/constants.js.map +1 -0
  209. package/lib/module/toast/context.js +34 -0
  210. package/lib/module/toast/context.js.map +1 -0
  211. package/lib/module/toast/index.js +27 -103
  212. package/lib/module/toast/index.js.map +1 -1
  213. package/lib/module/toast/position-utils.js +107 -0
  214. package/lib/module/toast/position-utils.js.map +1 -0
  215. package/lib/module/toast/positioner-utils.js +134 -0
  216. package/lib/module/toast/positioner-utils.js.map +1 -0
  217. package/lib/module/toast/toast-comparator.js +22 -0
  218. package/lib/module/toast/toast-comparator.js.map +1 -0
  219. package/lib/module/toast/toast-fns.js +85 -0
  220. package/lib/module/toast/toast-fns.js.map +1 -0
  221. package/lib/module/toast/toast-store.js +346 -0
  222. package/lib/module/toast/toast-store.js.map +1 -0
  223. package/lib/module/toast/toast-timers.js +104 -0
  224. package/lib/module/toast/toast-timers.js.map +1 -0
  225. package/lib/module/toast/types.js +38 -0
  226. package/lib/module/toast/types.js.map +1 -1
  227. package/lib/module/toast/use-animated-target.js +52 -0
  228. package/lib/module/toast/use-animated-target.js.map +1 -0
  229. package/lib/module/toast/use-app-state.js +70 -0
  230. package/lib/module/toast/use-app-state.js.map +1 -0
  231. package/lib/module/toast/use-toast-colors.js +109 -0
  232. package/lib/module/toast/use-toast-colors.js.map +1 -0
  233. package/lib/module/toast/use-toast-position.js +35 -0
  234. package/lib/module/toast/use-toast-position.js.map +1 -0
  235. package/lib/module/tooltip/index.web.js +2 -1
  236. package/lib/module/tooltip/index.web.js.map +1 -1
  237. package/lib/module/zoomable-image-gallery/ZoomableImageGallery.js +20 -8
  238. package/lib/module/zoomable-image-gallery/ZoomableImageGallery.js.map +1 -1
  239. package/lib/typescript/commonjs/avatar-group/AvatarGroup.web.d.ts.map +1 -1
  240. package/lib/typescript/commonjs/bottom-sheet/index.web.d.ts.map +1 -1
  241. package/lib/typescript/commonjs/context-menu/index.web.d.ts.map +1 -1
  242. package/lib/typescript/commonjs/dialog/Dialog.d.ts.map +1 -1
  243. package/lib/typescript/commonjs/dialog/Dialog.web.d.ts.map +1 -1
  244. package/lib/typescript/commonjs/dialog/DialogHeader.d.ts.map +1 -1
  245. package/lib/typescript/commonjs/index.d.ts +2 -1
  246. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  247. package/lib/typescript/commonjs/index.web.d.ts +2 -1
  248. package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
  249. package/lib/typescript/commonjs/menu/index.web.d.ts.map +1 -1
  250. package/lib/typescript/commonjs/popover/index.web.d.ts.map +1 -1
  251. package/lib/typescript/commonjs/portal/index.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/progressive-blur/index.d.ts +23 -0
  253. package/lib/typescript/commonjs/progressive-blur/index.d.ts.map +1 -0
  254. package/lib/typescript/commonjs/progressive-blur/index.web.d.ts +30 -0
  255. package/lib/typescript/commonjs/progressive-blur/index.web.d.ts.map +1 -0
  256. package/lib/typescript/commonjs/progressive-blur/shared.d.ts +35 -0
  257. package/lib/typescript/commonjs/progressive-blur/shared.d.ts.map +1 -0
  258. package/lib/typescript/commonjs/progressive-blur/types.d.ts +21 -0
  259. package/lib/typescript/commonjs/progressive-blur/types.d.ts.map +1 -0
  260. package/lib/typescript/commonjs/select/index.web.d.ts.map +1 -1
  261. package/lib/typescript/commonjs/slider/Slider.d.ts.map +1 -1
  262. package/lib/typescript/commonjs/styles/web-view-style.d.ts +21 -0
  263. package/lib/typescript/commonjs/styles/web-view-style.d.ts.map +1 -0
  264. package/lib/typescript/commonjs/switch/Switch.d.ts.map +1 -1
  265. package/lib/typescript/commonjs/tab-bar/TabBarBase.d.ts +36 -0
  266. package/lib/typescript/commonjs/tab-bar/TabBarBase.d.ts.map +1 -0
  267. package/lib/typescript/commonjs/tab-bar/expo-router/RouterTabBar.d.ts +59 -0
  268. package/lib/typescript/commonjs/tab-bar/expo-router/RouterTabBar.d.ts.map +1 -0
  269. package/lib/typescript/commonjs/tab-bar/expo-router/fading-tab-screen.d.ts +11 -0
  270. package/lib/typescript/commonjs/tab-bar/expo-router/fading-tab-screen.d.ts.map +1 -0
  271. package/lib/typescript/commonjs/tab-bar/expo-router/index.d.ts +14 -0
  272. package/lib/typescript/commonjs/tab-bar/expo-router/index.d.ts.map +1 -0
  273. package/lib/typescript/commonjs/tab-bar/glyph.d.ts +6 -0
  274. package/lib/typescript/commonjs/tab-bar/glyph.d.ts.map +1 -0
  275. package/lib/typescript/commonjs/tab-bar/glyph.native.d.ts +6 -0
  276. package/lib/typescript/commonjs/tab-bar/glyph.native.d.ts.map +1 -0
  277. package/lib/typescript/commonjs/tab-bar/index.d.ts +12 -0
  278. package/lib/typescript/commonjs/tab-bar/index.d.ts.map +1 -0
  279. package/lib/typescript/commonjs/tab-bar/index.web.d.ts +12 -0
  280. package/lib/typescript/commonjs/tab-bar/index.web.d.ts.map +1 -0
  281. package/lib/typescript/commonjs/tab-bar/minimize-context.d.ts +51 -0
  282. package/lib/typescript/commonjs/tab-bar/minimize-context.d.ts.map +1 -0
  283. package/lib/typescript/commonjs/tab-bar/shared.d.ts +93 -0
  284. package/lib/typescript/commonjs/tab-bar/shared.d.ts.map +1 -0
  285. package/lib/typescript/commonjs/tab-bar/surface.d.ts +6 -0
  286. package/lib/typescript/commonjs/tab-bar/surface.d.ts.map +1 -0
  287. package/lib/typescript/commonjs/tab-bar/surface.native.d.ts +6 -0
  288. package/lib/typescript/commonjs/tab-bar/surface.native.d.ts.map +1 -0
  289. package/lib/typescript/commonjs/tab-bar/surface.web.d.ts +6 -0
  290. package/lib/typescript/commonjs/tab-bar/surface.web.d.ts.map +1 -0
  291. package/lib/typescript/commonjs/tab-bar/types.d.ts +85 -0
  292. package/lib/typescript/commonjs/tab-bar/types.d.ts.map +1 -0
  293. package/lib/typescript/commonjs/tabs/Tabs.d.ts.map +1 -1
  294. package/lib/typescript/commonjs/toast/Positioner.d.ts +21 -0
  295. package/lib/typescript/commonjs/toast/Positioner.d.ts.map +1 -0
  296. package/lib/typescript/commonjs/toast/ToastContent.d.ts +14 -0
  297. package/lib/typescript/commonjs/toast/ToastContent.d.ts.map +1 -0
  298. package/lib/typescript/commonjs/toast/ToastHost.d.ts +6 -0
  299. package/lib/typescript/commonjs/toast/ToastHost.d.ts.map +1 -0
  300. package/lib/typescript/commonjs/toast/ToastHost.native.d.ts +6 -0
  301. package/lib/typescript/commonjs/toast/ToastHost.native.d.ts.map +1 -0
  302. package/lib/typescript/commonjs/toast/ToastIcon.d.ts +9 -0
  303. package/lib/typescript/commonjs/toast/ToastIcon.d.ts.map +1 -0
  304. package/lib/typescript/commonjs/toast/ToastRow.d.ts +80 -0
  305. package/lib/typescript/commonjs/toast/ToastRow.d.ts.map +1 -0
  306. package/lib/typescript/commonjs/toast/ToastSwipeHandler.d.ts +30 -0
  307. package/lib/typescript/commonjs/toast/ToastSwipeHandler.d.ts.map +1 -0
  308. package/lib/typescript/commonjs/toast/Toaster.d.ts +19 -0
  309. package/lib/typescript/commonjs/toast/Toaster.d.ts.map +1 -0
  310. package/lib/typescript/commonjs/toast/animations.d.ts +62 -0
  311. package/lib/typescript/commonjs/toast/animations.d.ts.map +1 -0
  312. package/lib/typescript/commonjs/toast/constants.d.ts +39 -0
  313. package/lib/typescript/commonjs/toast/constants.d.ts.map +1 -0
  314. package/lib/typescript/commonjs/toast/context.d.ts +19 -0
  315. package/lib/typescript/commonjs/toast/context.d.ts.map +1 -0
  316. package/lib/typescript/commonjs/toast/index.d.ts +23 -76
  317. package/lib/typescript/commonjs/toast/index.d.ts.map +1 -1
  318. package/lib/typescript/commonjs/toast/position-utils.d.ts +30 -0
  319. package/lib/typescript/commonjs/toast/position-utils.d.ts.map +1 -0
  320. package/lib/typescript/commonjs/toast/positioner-utils.d.ts +72 -0
  321. package/lib/typescript/commonjs/toast/positioner-utils.d.ts.map +1 -0
  322. package/lib/typescript/commonjs/toast/toast-comparator.d.ts +12 -0
  323. package/lib/typescript/commonjs/toast/toast-comparator.d.ts.map +1 -0
  324. package/lib/typescript/commonjs/toast/toast-fns.d.ts +3 -0
  325. package/lib/typescript/commonjs/toast/toast-fns.d.ts.map +1 -0
  326. package/lib/typescript/commonjs/toast/toast-store.d.ts +52 -0
  327. package/lib/typescript/commonjs/toast/toast-store.d.ts.map +1 -0
  328. package/lib/typescript/commonjs/toast/toast-timers.d.ts +24 -0
  329. package/lib/typescript/commonjs/toast/toast-timers.d.ts.map +1 -0
  330. package/lib/typescript/commonjs/toast/types.d.ts +222 -5
  331. package/lib/typescript/commonjs/toast/types.d.ts.map +1 -1
  332. package/lib/typescript/commonjs/toast/use-animated-target.d.ts +7 -0
  333. package/lib/typescript/commonjs/toast/use-animated-target.d.ts.map +1 -0
  334. package/lib/typescript/commonjs/toast/use-app-state.d.ts +18 -0
  335. package/lib/typescript/commonjs/toast/use-app-state.d.ts.map +1 -0
  336. package/lib/typescript/commonjs/toast/use-toast-colors.d.ts +22 -0
  337. package/lib/typescript/commonjs/toast/use-toast-colors.d.ts.map +1 -0
  338. package/lib/typescript/commonjs/toast/use-toast-position.d.ts +37 -0
  339. package/lib/typescript/commonjs/toast/use-toast-position.d.ts.map +1 -0
  340. package/lib/typescript/commonjs/tooltip/index.web.d.ts.map +1 -1
  341. package/lib/typescript/commonjs/zoomable-image-gallery/ZoomableImageGallery.d.ts.map +1 -1
  342. package/lib/typescript/module/avatar-group/AvatarGroup.web.d.ts.map +1 -1
  343. package/lib/typescript/module/bottom-sheet/index.web.d.ts.map +1 -1
  344. package/lib/typescript/module/context-menu/index.web.d.ts.map +1 -1
  345. package/lib/typescript/module/dialog/Dialog.d.ts.map +1 -1
  346. package/lib/typescript/module/dialog/Dialog.web.d.ts.map +1 -1
  347. package/lib/typescript/module/dialog/DialogHeader.d.ts.map +1 -1
  348. package/lib/typescript/module/index.d.ts +2 -1
  349. package/lib/typescript/module/index.d.ts.map +1 -1
  350. package/lib/typescript/module/index.web.d.ts +2 -1
  351. package/lib/typescript/module/index.web.d.ts.map +1 -1
  352. package/lib/typescript/module/menu/index.web.d.ts.map +1 -1
  353. package/lib/typescript/module/popover/index.web.d.ts.map +1 -1
  354. package/lib/typescript/module/portal/index.d.ts.map +1 -1
  355. package/lib/typescript/module/progressive-blur/index.d.ts +23 -0
  356. package/lib/typescript/module/progressive-blur/index.d.ts.map +1 -0
  357. package/lib/typescript/module/progressive-blur/index.web.d.ts +30 -0
  358. package/lib/typescript/module/progressive-blur/index.web.d.ts.map +1 -0
  359. package/lib/typescript/module/progressive-blur/shared.d.ts +35 -0
  360. package/lib/typescript/module/progressive-blur/shared.d.ts.map +1 -0
  361. package/lib/typescript/module/progressive-blur/types.d.ts +21 -0
  362. package/lib/typescript/module/progressive-blur/types.d.ts.map +1 -0
  363. package/lib/typescript/module/select/index.web.d.ts.map +1 -1
  364. package/lib/typescript/module/slider/Slider.d.ts.map +1 -1
  365. package/lib/typescript/module/styles/web-view-style.d.ts +21 -0
  366. package/lib/typescript/module/styles/web-view-style.d.ts.map +1 -0
  367. package/lib/typescript/module/switch/Switch.d.ts.map +1 -1
  368. package/lib/typescript/module/tab-bar/TabBarBase.d.ts +36 -0
  369. package/lib/typescript/module/tab-bar/TabBarBase.d.ts.map +1 -0
  370. package/lib/typescript/module/tab-bar/expo-router/RouterTabBar.d.ts +59 -0
  371. package/lib/typescript/module/tab-bar/expo-router/RouterTabBar.d.ts.map +1 -0
  372. package/lib/typescript/module/tab-bar/expo-router/fading-tab-screen.d.ts +11 -0
  373. package/lib/typescript/module/tab-bar/expo-router/fading-tab-screen.d.ts.map +1 -0
  374. package/lib/typescript/module/tab-bar/expo-router/index.d.ts +14 -0
  375. package/lib/typescript/module/tab-bar/expo-router/index.d.ts.map +1 -0
  376. package/lib/typescript/module/tab-bar/glyph.d.ts +6 -0
  377. package/lib/typescript/module/tab-bar/glyph.d.ts.map +1 -0
  378. package/lib/typescript/module/tab-bar/glyph.native.d.ts +6 -0
  379. package/lib/typescript/module/tab-bar/glyph.native.d.ts.map +1 -0
  380. package/lib/typescript/module/tab-bar/index.d.ts +12 -0
  381. package/lib/typescript/module/tab-bar/index.d.ts.map +1 -0
  382. package/lib/typescript/module/tab-bar/index.web.d.ts +12 -0
  383. package/lib/typescript/module/tab-bar/index.web.d.ts.map +1 -0
  384. package/lib/typescript/module/tab-bar/minimize-context.d.ts +51 -0
  385. package/lib/typescript/module/tab-bar/minimize-context.d.ts.map +1 -0
  386. package/lib/typescript/module/tab-bar/shared.d.ts +93 -0
  387. package/lib/typescript/module/tab-bar/shared.d.ts.map +1 -0
  388. package/lib/typescript/module/tab-bar/surface.d.ts +6 -0
  389. package/lib/typescript/module/tab-bar/surface.d.ts.map +1 -0
  390. package/lib/typescript/module/tab-bar/surface.native.d.ts +6 -0
  391. package/lib/typescript/module/tab-bar/surface.native.d.ts.map +1 -0
  392. package/lib/typescript/module/tab-bar/surface.web.d.ts +6 -0
  393. package/lib/typescript/module/tab-bar/surface.web.d.ts.map +1 -0
  394. package/lib/typescript/module/tab-bar/types.d.ts +85 -0
  395. package/lib/typescript/module/tab-bar/types.d.ts.map +1 -0
  396. package/lib/typescript/module/tabs/Tabs.d.ts.map +1 -1
  397. package/lib/typescript/module/toast/Positioner.d.ts +21 -0
  398. package/lib/typescript/module/toast/Positioner.d.ts.map +1 -0
  399. package/lib/typescript/module/toast/ToastContent.d.ts +14 -0
  400. package/lib/typescript/module/toast/ToastContent.d.ts.map +1 -0
  401. package/lib/typescript/module/toast/ToastHost.d.ts +6 -0
  402. package/lib/typescript/module/toast/ToastHost.d.ts.map +1 -0
  403. package/lib/typescript/module/toast/ToastHost.native.d.ts +6 -0
  404. package/lib/typescript/module/toast/ToastHost.native.d.ts.map +1 -0
  405. package/lib/typescript/module/toast/ToastIcon.d.ts +9 -0
  406. package/lib/typescript/module/toast/ToastIcon.d.ts.map +1 -0
  407. package/lib/typescript/module/toast/ToastRow.d.ts +80 -0
  408. package/lib/typescript/module/toast/ToastRow.d.ts.map +1 -0
  409. package/lib/typescript/module/toast/ToastSwipeHandler.d.ts +30 -0
  410. package/lib/typescript/module/toast/ToastSwipeHandler.d.ts.map +1 -0
  411. package/lib/typescript/module/toast/Toaster.d.ts +19 -0
  412. package/lib/typescript/module/toast/Toaster.d.ts.map +1 -0
  413. package/lib/typescript/module/toast/animations.d.ts +62 -0
  414. package/lib/typescript/module/toast/animations.d.ts.map +1 -0
  415. package/lib/typescript/module/toast/constants.d.ts +39 -0
  416. package/lib/typescript/module/toast/constants.d.ts.map +1 -0
  417. package/lib/typescript/module/toast/context.d.ts +19 -0
  418. package/lib/typescript/module/toast/context.d.ts.map +1 -0
  419. package/lib/typescript/module/toast/index.d.ts +23 -76
  420. package/lib/typescript/module/toast/index.d.ts.map +1 -1
  421. package/lib/typescript/module/toast/position-utils.d.ts +30 -0
  422. package/lib/typescript/module/toast/position-utils.d.ts.map +1 -0
  423. package/lib/typescript/module/toast/positioner-utils.d.ts +72 -0
  424. package/lib/typescript/module/toast/positioner-utils.d.ts.map +1 -0
  425. package/lib/typescript/module/toast/toast-comparator.d.ts +12 -0
  426. package/lib/typescript/module/toast/toast-comparator.d.ts.map +1 -0
  427. package/lib/typescript/module/toast/toast-fns.d.ts +3 -0
  428. package/lib/typescript/module/toast/toast-fns.d.ts.map +1 -0
  429. package/lib/typescript/module/toast/toast-store.d.ts +52 -0
  430. package/lib/typescript/module/toast/toast-store.d.ts.map +1 -0
  431. package/lib/typescript/module/toast/toast-timers.d.ts +24 -0
  432. package/lib/typescript/module/toast/toast-timers.d.ts.map +1 -0
  433. package/lib/typescript/module/toast/types.d.ts +222 -5
  434. package/lib/typescript/module/toast/types.d.ts.map +1 -1
  435. package/lib/typescript/module/toast/use-animated-target.d.ts +7 -0
  436. package/lib/typescript/module/toast/use-animated-target.d.ts.map +1 -0
  437. package/lib/typescript/module/toast/use-app-state.d.ts +18 -0
  438. package/lib/typescript/module/toast/use-app-state.d.ts.map +1 -0
  439. package/lib/typescript/module/toast/use-toast-colors.d.ts +22 -0
  440. package/lib/typescript/module/toast/use-toast-colors.d.ts.map +1 -0
  441. package/lib/typescript/module/toast/use-toast-position.d.ts +37 -0
  442. package/lib/typescript/module/toast/use-toast-position.d.ts.map +1 -0
  443. package/lib/typescript/module/tooltip/index.web.d.ts.map +1 -1
  444. package/lib/typescript/module/zoomable-image-gallery/ZoomableImageGallery.d.ts.map +1 -1
  445. package/package.json +63 -25
  446. package/src/__tests__/TabBar.test.tsx +342 -0
  447. package/src/__tests__/TabBarReanimatedDeps.test.ts +130 -0
  448. package/src/__tests__/TabBarWebFork.test.ts +197 -0
  449. package/src/__tests__/ToastContent.test.tsx +192 -0
  450. package/src/__tests__/ToastHostWebFork.test.ts +155 -0
  451. package/src/__tests__/Toaster.test.tsx +527 -0
  452. package/src/__tests__/animated-style-deps.test.ts +156 -0
  453. package/src/__tests__/toast-animations.test.ts +98 -0
  454. package/src/__tests__/toast-comparator.test.ts +131 -0
  455. package/src/__tests__/toast-enter-driver.test.ts +147 -0
  456. package/src/__tests__/toast-fns.test.ts +240 -0
  457. package/src/__tests__/toast-position-utils.test.ts +259 -0
  458. package/src/__tests__/toast-positioner-utils.test.ts +214 -0
  459. package/src/__tests__/toast-store.test.ts +622 -0
  460. package/src/__tests__/toast-timers.test.ts +163 -0
  461. package/src/__tests__/use-animated-target.test.tsx +60 -0
  462. package/src/__tests__/use-app-state.test.tsx +127 -0
  463. package/src/__tests__/use-toast-colors.test.tsx +189 -0
  464. package/src/__tests__/web-position-fixed.test.ts +70 -0
  465. package/src/avatar-group/AvatarGroup.web.tsx +2 -1
  466. package/src/bottom-sheet/index.web.tsx +4 -3
  467. package/src/context-menu/index.web.tsx +6 -6
  468. package/src/dialog/Dialog.tsx +7 -4
  469. package/src/dialog/Dialog.web.tsx +14 -14
  470. package/src/dialog/DialogHeader.tsx +72 -17
  471. package/src/index.ts +4 -1
  472. package/src/index.web.ts +4 -1
  473. package/src/menu/index.web.tsx +5 -5
  474. package/src/popover/index.web.tsx +8 -6
  475. package/src/portal/index.tsx +4 -1
  476. package/src/progressive-blur/index.tsx +78 -0
  477. package/src/progressive-blur/index.web.tsx +65 -0
  478. package/src/progressive-blur/shared.ts +81 -0
  479. package/src/progressive-blur/types.ts +21 -0
  480. package/src/select/index.web.tsx +5 -5
  481. package/src/slider/Slider.tsx +3 -5
  482. package/src/styles/web-view-style.ts +21 -0
  483. package/src/switch/Switch.tsx +4 -5
  484. package/src/tab-bar/TabBar.stories.tsx +217 -0
  485. package/src/tab-bar/TabBarBase.tsx +517 -0
  486. package/src/tab-bar/expo-router/RouterTabBar.tsx +80 -0
  487. package/src/tab-bar/expo-router/fading-tab-screen.tsx +109 -0
  488. package/src/tab-bar/expo-router/index.ts +13 -0
  489. package/src/tab-bar/glyph.native.tsx +46 -0
  490. package/src/tab-bar/glyph.tsx +31 -0
  491. package/src/tab-bar/index.ts +32 -0
  492. package/src/tab-bar/index.web.tsx +34 -0
  493. package/src/tab-bar/minimize-context.tsx +117 -0
  494. package/src/tab-bar/shared.ts +159 -0
  495. package/src/tab-bar/surface.native.tsx +60 -0
  496. package/src/tab-bar/surface.tsx +47 -0
  497. package/src/tab-bar/surface.web.tsx +56 -0
  498. package/src/tab-bar/types.ts +88 -0
  499. package/src/tabs/Tabs.tsx +3 -5
  500. package/src/toast/Positioner.tsx +121 -0
  501. package/src/toast/Toast.stories.tsx +292 -65
  502. package/src/toast/ToastContent.tsx +405 -0
  503. package/src/toast/ToastHost.native.tsx +31 -0
  504. package/src/toast/ToastHost.tsx +67 -0
  505. package/src/toast/ToastIcon.tsx +55 -0
  506. package/src/toast/ToastRow.tsx +485 -0
  507. package/src/toast/ToastSwipeHandler.tsx +222 -0
  508. package/src/toast/Toaster.tsx +259 -0
  509. package/src/toast/animations.ts +313 -0
  510. package/src/toast/constants.ts +76 -0
  511. package/src/toast/context.tsx +44 -0
  512. package/src/toast/index.tsx +47 -123
  513. package/src/toast/position-utils.ts +149 -0
  514. package/src/toast/positioner-utils.ts +142 -0
  515. package/src/toast/toast-comparator.ts +41 -0
  516. package/src/toast/toast-fns.ts +104 -0
  517. package/src/toast/toast-store.ts +432 -0
  518. package/src/toast/toast-timers.ts +124 -0
  519. package/src/toast/types.ts +301 -5
  520. package/src/toast/use-animated-target.ts +61 -0
  521. package/src/toast/use-app-state.ts +77 -0
  522. package/src/toast/use-toast-colors.ts +133 -0
  523. package/src/toast/use-toast-position.ts +46 -0
  524. package/src/tooltip/index.web.tsx +2 -1
  525. package/src/zoomable-image-gallery/ZoomableImageGallery.stories.tsx +134 -0
  526. package/src/zoomable-image-gallery/ZoomableImageGallery.tsx +50 -27
  527. package/lib/commonjs/toast/Toast.js +0 -272
  528. package/lib/commonjs/toast/Toast.js.map +0 -1
  529. package/lib/commonjs/toast/const.js +0 -8
  530. package/lib/commonjs/toast/const.js.map +0 -1
  531. package/lib/commonjs/toast/index.web.js +0 -114
  532. package/lib/commonjs/toast/index.web.js.map +0 -1
  533. package/lib/commonjs/toast/sonner/index.js +0 -9
  534. package/lib/commonjs/toast/sonner/index.js.map +0 -1
  535. package/lib/commonjs/toast/sonner/index.web.js +0 -9
  536. package/lib/commonjs/toast/sonner/index.web.js.map +0 -1
  537. package/lib/module/toast/Toast.js +0 -263
  538. package/lib/module/toast/Toast.js.map +0 -1
  539. package/lib/module/toast/const.js +0 -4
  540. package/lib/module/toast/const.js.map +0 -1
  541. package/lib/module/toast/index.web.js +0 -74
  542. package/lib/module/toast/index.web.js.map +0 -1
  543. package/lib/module/toast/sonner/index.js +0 -5
  544. package/lib/module/toast/sonner/index.js.map +0 -1
  545. package/lib/module/toast/sonner/index.web.js +0 -5
  546. package/lib/module/toast/sonner/index.web.js.map +0 -1
  547. package/lib/typescript/commonjs/toast/Toast.d.ts +0 -23
  548. package/lib/typescript/commonjs/toast/Toast.d.ts.map +0 -1
  549. package/lib/typescript/commonjs/toast/const.d.ts +0 -2
  550. package/lib/typescript/commonjs/toast/const.d.ts.map +0 -1
  551. package/lib/typescript/commonjs/toast/index.web.d.ts +0 -29
  552. package/lib/typescript/commonjs/toast/index.web.d.ts.map +0 -1
  553. package/lib/typescript/commonjs/toast/sonner/index.d.ts +0 -2
  554. package/lib/typescript/commonjs/toast/sonner/index.d.ts.map +0 -1
  555. package/lib/typescript/commonjs/toast/sonner/index.web.d.ts +0 -2
  556. package/lib/typescript/commonjs/toast/sonner/index.web.d.ts.map +0 -1
  557. package/lib/typescript/module/toast/Toast.d.ts +0 -23
  558. package/lib/typescript/module/toast/Toast.d.ts.map +0 -1
  559. package/lib/typescript/module/toast/const.d.ts +0 -2
  560. package/lib/typescript/module/toast/const.d.ts.map +0 -1
  561. package/lib/typescript/module/toast/index.web.d.ts +0 -29
  562. package/lib/typescript/module/toast/index.web.d.ts.map +0 -1
  563. package/lib/typescript/module/toast/sonner/index.d.ts +0 -2
  564. package/lib/typescript/module/toast/sonner/index.d.ts.map +0 -1
  565. package/lib/typescript/module/toast/sonner/index.web.d.ts +0 -2
  566. package/lib/typescript/module/toast/sonner/index.web.d.ts.map +0 -1
  567. package/src/toast/Toast.tsx +0 -271
  568. package/src/toast/const.ts +0 -1
  569. package/src/toast/index.web.tsx +0 -101
  570. package/src/toast/sonner/index.ts +0 -3
  571. package/src/toast/sonner/index.web.ts +0 -3
@@ -0,0 +1,408 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Ported from expo-glass-tabs v0.1.1 — src/glass-tab-bar.tsx
5
+ * (MIT © 2026 David Mokos). See the top-level NOTICE.
6
+ *
7
+ * The platform-agnostic body of the floating tab bar: gestures, springs, every
8
+ * animated style, the highlight geometry and the button. The only pieces that
9
+ * differ per platform are injected as component props — the capsule `Surface`
10
+ * (liquid glass on iOS 26, backdrop-filter on web, a solid fill everywhere
11
+ * else), the `Blur` behind the bar, and the `Glyph` (SF Symbol on iOS, the
12
+ * item's own icon node elsewhere). Same shape as `BottomSheetBase`'s `Shell`.
13
+ *
14
+ * Nothing here imports expo-glass-effect, expo-symbols, expo-router or
15
+ * react-native-screens, so this file is safe in a web bundle and in a
16
+ * consumer's type-check.
17
+ */
18
+ import { Children, createContext, useCallback, useContext, useEffect, useMemo } from 'react';
19
+ import { Pressable, StyleSheet, useWindowDimensions, View } from 'react-native';
20
+ import { Gesture, GestureDetector } from 'react-native-gesture-handler';
21
+ import Animated, { Extrapolation, interpolate, interpolateColor, runOnJS, useAnimatedStyle, useSharedValue, withSpring } from 'react-native-reanimated';
22
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
23
+ import { useHaptics } from "../hooks/useHaptics.js";
24
+ import { setMinimized, useMinimizeState } from "./minimize-context.js";
25
+ import { BAR_MARGIN, BLUR_BLEED, EXPANDED_HEIGHT, HIGHLIGHT_EXPANDED, HIGHLIGHT_MINIMIZED, ICON_SIZE, ITEM_GAP, ITEM_PAD_V, LABEL_FONT_SIZE, MINIMIZED_HEIGHT, MINIMIZED_INSET, ROW_PAD_H, SLIDE_SPRING, useTabBarTheme } from "./shared.js";
26
+
27
+ /**
28
+ * What a `TabBarButton` needs from the bar it sits in. `null` when a button is
29
+ * rendered standalone, which keeps a lone button usable (it just falls back to
30
+ * its own `isFocused` for tinting and has no highlight to drive).
31
+ */
32
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
33
+ const BarContext = /*#__PURE__*/createContext(null);
34
+ /**
35
+ * Floating tab bar with Revolut-style minimize-on-scroll, a sliding highlight
36
+ * and finger scrubbing.
37
+ */
38
+ function TabBarBody({
39
+ Surface,
40
+ Blur,
41
+ children,
42
+ activeIndex,
43
+ onIndexChange,
44
+ theme: themeOverrides,
45
+ haptics = true,
46
+ style,
47
+ ...viewProps
48
+ }) {
49
+ const insets = useSafeAreaInsets();
50
+ const {
51
+ width: windowWidth
52
+ } = useWindowDimensions();
53
+ const minimized = useMinimizeState();
54
+ const progress = minimized.progress;
55
+ const slideIndex = useSharedValue(0);
56
+ const isDragging = useSharedValue(false);
57
+ const lastTicked = useSharedValue(-1);
58
+ const tabCount = Math.max(Children.count(children), 1);
59
+ const theme = useTabBarTheme(themeOverrides);
60
+ const impact = useHaptics();
61
+
62
+ // Picker-style tick while the highlight crosses tab boundaries mid-drag.
63
+ // `useHaptics` already no-ops on web, when the optional `expo-haptics` peer
64
+ // is absent, and when a `BloomHapticsProvider` has haptics turned off — so
65
+ // the only decision left here is the caller's own `haptics` prop.
66
+ const tick = useCallback(() => {
67
+ if (haptics) impact('light');
68
+ }, [haptics, impact]);
69
+
70
+ // Navigation happens only on release — switching screens live while
71
+ // scrubbing makes the content jump under the finger.
72
+ const selectIndex = useCallback(index => onIndexChange?.(index), [onIndexChange]);
73
+
74
+ // CONTROLLED path: the bar owns the highlight when `activeIndex` is provided,
75
+ // so it tracks the prop even when a consumer renders custom children instead
76
+ // of `TabBarButton`s. Syncing an imperative animation to a controlled prop is
77
+ // a legitimate effect (external-system sync), the same shape `Tabs` uses for
78
+ // its underline. The focus-driven path is handled per-button instead — see
79
+ // `TabBarButtonBody`.
80
+ useEffect(() => {
81
+ if (activeIndex === undefined) return;
82
+ // While scrubbing the finger owns the highlight; never fight it.
83
+ if (isDragging.value) return;
84
+ slideIndex.value = withSpring(activeIndex, SLIDE_SPRING);
85
+ }, [activeIndex, slideIndex, isDragging]);
86
+
87
+ // Scrubbing: the highlight tracks the finger 1:1 while dragging (no spring —
88
+ // it must feel attached), haptic ticks fire on boundary crossings, and
89
+ // navigation happens only on release. Taps are handled by a Tap gesture
90
+ // racing the pan — the detector consumes the bar's touches, so the inner
91
+ // Pressables never receive them.
92
+ const gesture = useMemo(() => {
93
+ const indexAtX = (x, minimizedValue) => {
94
+ 'worklet';
95
+
96
+ const sideInset = interpolate(minimizedValue, [0, 1], [0, MINIMIZED_INSET], Extrapolation.CLAMP);
97
+ const barWidth = windowWidth - BAR_MARGIN * 2 - sideInset * 2;
98
+ const itemWidth = (barWidth - ROW_PAD_H * 2) / tabCount;
99
+ const raw = (x - ROW_PAD_H) / itemWidth - 0.5;
100
+ return Math.min(Math.max(raw, 0), tabCount - 1);
101
+ };
102
+ const pan = Gesture.Pan().activeOffsetX([-6, 6]).failOffsetY([-14, 14]).onStart(() => {
103
+ isDragging.value = true;
104
+ lastTicked.value = Math.round(slideIndex.value);
105
+ // Scrubbing is a deliberate bar interaction — surface the labels.
106
+ setMinimized(minimized, 0);
107
+ }).onUpdate(event => {
108
+ const index = indexAtX(event.x, progress.value);
109
+ slideIndex.value = index;
110
+ const rounded = Math.round(index);
111
+ if (rounded !== lastTicked.value) {
112
+ lastTicked.value = rounded;
113
+ runOnJS(tick)();
114
+ }
115
+ }).onFinalize(() => {
116
+ // Fires on failure too (e.g. the touch was a tap) — only act when the
117
+ // pan actually activated, or we'd stomp the tap's navigation.
118
+ if (!isDragging.value) {
119
+ return;
120
+ }
121
+ const rounded = Math.round(slideIndex.value);
122
+ slideIndex.value = withSpring(rounded, SLIDE_SPRING);
123
+ runOnJS(selectIndex)(rounded);
124
+ isDragging.value = false;
125
+ });
126
+ const tap = Gesture.Tap()
127
+ // Real fingers drift a few points — the default tolerance (~2pt) makes
128
+ // ordinary taps fail. Past 6pt horizontal the pan takes over.
129
+ .maxDistance(16).maxDuration(400).onEnd((event, success) => {
130
+ if (!success) {
131
+ return;
132
+ }
133
+ const index = Math.round(indexAtX(event.x, progress.value));
134
+ slideIndex.value = withSpring(index, SLIDE_SPRING);
135
+ setMinimized(minimized, 0);
136
+ runOnJS(selectIndex)(index);
137
+ });
138
+ return Gesture.Race(pan, tap);
139
+ }, [windowWidth, tabCount, selectIndex, tick, isDragging, lastTicked, slideIndex, minimized, progress]);
140
+
141
+ // CRITICAL — every shared value and every scalar a mapper READS must appear
142
+ // in its dependency array. On web WITHOUT the react-native-worklets babel
143
+ // plugin (what every Oxy RN-Web app ships) reanimated cannot auto-detect a
144
+ // worklet's reads, so it drives the mapper off the deps array instead: with a
145
+ // missing or incomplete array the mapper runs ONCE and freezes at the first
146
+ // frame while the shared values keep animating underneath — the bar would
147
+ // never minimize and the highlight would never move, with no error anywhere.
148
+ // Native (plugin present) auto-tracks and ignores the extra deps, so listing
149
+ // them is correct on both platforms. Same rule as `BottomSheetBase` and
150
+ // `ZoomableImageGallery`. Do NOT strip these.
151
+ const barStyle = useAnimatedStyle(() => {
152
+ const height = interpolate(progress.value, [0, 1], [EXPANDED_HEIGHT, MINIMIZED_HEIGHT], Extrapolation.CLAMP);
153
+ return {
154
+ height,
155
+ // Revolut-style: the pill shrinks in both dimensions.
156
+ marginHorizontal: interpolate(progress.value, [0, 1], [0, MINIMIZED_INSET], Extrapolation.CLAMP)
157
+ };
158
+ }, [progress]);
159
+
160
+ // The capsule shape lives on the surface itself: iOS 26 glass renders its own
161
+ // native corner configuration (true squircle + rim lighting). Clipping a
162
+ // rectangular glass with an RN mask breaks that.
163
+ const shapeStyle = useAnimatedStyle(() => {
164
+ const height = interpolate(progress.value, [0, 1], [EXPANDED_HEIGHT, MINIMIZED_HEIGHT], Extrapolation.CLAMP);
165
+ return {
166
+ borderRadius: height / 2
167
+ };
168
+ }, [progress]);
169
+
170
+ // One shared highlight that slides between tabs (transform-only → GPU). All
171
+ // geometry derives from shared values, never from layout callbacks.
172
+ const highlightStyle = useAnimatedStyle(() => {
173
+ const barHeight = interpolate(progress.value, [0, 1], [EXPANDED_HEIGHT, MINIMIZED_HEIGHT], Extrapolation.CLAMP);
174
+ const height = interpolate(progress.value, [0, 1], [HIGHLIGHT_EXPANDED, HIGHLIGHT_MINIMIZED], Extrapolation.CLAMP);
175
+ const sideInset = interpolate(progress.value, [0, 1], [0, MINIMIZED_INSET], Extrapolation.CLAMP);
176
+ const barWidth = windowWidth - BAR_MARGIN * 2 - sideInset * 2;
177
+ const itemWidth = (barWidth - ROW_PAD_H * 2) / tabCount;
178
+ return {
179
+ height,
180
+ width: itemWidth,
181
+ borderRadius: height / 2,
182
+ top: (barHeight - height) / 2,
183
+ transform: [{
184
+ translateX: ROW_PAD_H + itemWidth * slideIndex.value
185
+ }]
186
+ };
187
+ }, [progress, slideIndex, windowWidth, tabCount]);
188
+ const bottomOffset = Math.max(insets.bottom - 16, 12);
189
+ const barContext = useMemo(() => ({
190
+ slideIndex,
191
+ isDragging,
192
+ theme,
193
+ activeIndex,
194
+ selectIndex
195
+ }), [slideIndex, isDragging, theme, activeIndex, selectIndex]);
196
+ return /*#__PURE__*/_jsxs(View, {
197
+ ...viewProps,
198
+ style: [styles.root, style],
199
+ children: [/*#__PURE__*/_jsx(Blur, {
200
+ direction: "bottom",
201
+ style: {
202
+ position: 'absolute',
203
+ left: 0,
204
+ right: 0,
205
+ bottom: 0,
206
+ height: bottomOffset + EXPANDED_HEIGHT + BLUR_BLEED
207
+ }
208
+ }), /*#__PURE__*/_jsx(View, {
209
+ style: [styles.barWrap, {
210
+ marginBottom: bottomOffset
211
+ }],
212
+ children: /*#__PURE__*/_jsx(GestureDetector, {
213
+ gesture: gesture,
214
+ children: /*#__PURE__*/_jsxs(Animated.View, {
215
+ style: barStyle,
216
+ children: [/*#__PURE__*/_jsx(Surface, {
217
+ theme: theme,
218
+ style: shapeStyle
219
+ }), /*#__PURE__*/_jsx(Animated.View, {
220
+ style: [styles.highlight, {
221
+ backgroundColor: theme.highlight
222
+ }, highlightStyle]
223
+ }), /*#__PURE__*/_jsx(View, {
224
+ accessibilityRole: "tablist",
225
+ style: styles.itemRow,
226
+ children: /*#__PURE__*/_jsx(BarContext.Provider, {
227
+ value: barContext,
228
+ children: children
229
+ })
230
+ })]
231
+ })
232
+ })
233
+ })]
234
+ });
235
+ }
236
+ /** One tab trigger: icon + label that fades out when the bar minimizes. */
237
+ function TabBarButtonBody({
238
+ Glyph,
239
+ item,
240
+ index,
241
+ isFocused,
242
+ onPress,
243
+ style,
244
+ ...pressableProps
245
+ }) {
246
+ const minimized = useMinimizeState();
247
+ const progress = minimized.progress;
248
+ const bar = useContext(BarContext);
249
+ // Resolved outside the bar too, so a standalone button still themes itself.
250
+ const standaloneTheme = useTabBarTheme();
251
+ const theme = bar?.theme ?? standaloneTheme;
252
+ const slideIndex = bar?.slideIndex;
253
+ // The two paths meet here: an explicit `isFocused` (router adapter) wins;
254
+ // otherwise focus comes from the bar's controlled `activeIndex`.
255
+ const focused = isFocused ?? bar?.activeIndex === index;
256
+
257
+ // FOCUS-DRIVEN path only. Covers programmatic navigation too (deep links,
258
+ // back gestures) — the trigger re-renders focused and the highlight follows.
259
+ // While scrubbing, the finger owns the highlight; never fight it with a
260
+ // spring. On the controlled path the BAR drives the highlight instead, so
261
+ // this stays out of the way to avoid two writers on one shared value.
262
+ useEffect(() => {
263
+ if (isFocused === undefined || !isFocused || !bar) return;
264
+ if (bar.isDragging.value) return;
265
+ bar.slideIndex.value = withSpring(index, SLIDE_SPRING);
266
+ }, [isFocused, index, bar]);
267
+
268
+ // Tint follows the sliding highlight, not navigation focus: whatever the pill
269
+ // is over lights up — live while scrubbing, traveling on taps. Without a bar
270
+ // there is nothing to follow, so it falls back to plain focus.
271
+ // (Deps: see the CRITICAL note in `TabBarBody`.)
272
+ const activeGlyphStyle = useAnimatedStyle(() => ({
273
+ opacity: slideIndex ? 1 - Math.min(Math.abs(slideIndex.value - index), 1) : focused ? 1 : 0
274
+ }), [slideIndex, index, focused]);
275
+ const labelStyle = useAnimatedStyle(() => ({
276
+ opacity: interpolate(progress.value, [0, 0.4], [1, 0], Extrapolation.CLAMP),
277
+ color: slideIndex ? interpolateColor(Math.min(Math.abs(slideIndex.value - index), 1), [0, 1], [theme.activeTint, theme.inactiveTint]) : focused ? theme.activeTint : theme.inactiveTint
278
+ }), [progress, slideIndex, index, focused, theme]);
279
+
280
+ // Height is animated EXPLICITLY (not derived from children) so the icon stays
281
+ // perfectly centered every frame — layout-driven sizing lags a frame behind
282
+ // UI-thread animation.
283
+ const boxStyle = useAnimatedStyle(() => ({
284
+ height: interpolate(progress.value, [0, 1], [HIGHLIGHT_EXPANDED, HIGHLIGHT_MINIMIZED], Extrapolation.CLAMP)
285
+ }), [progress]);
286
+ return /*#__PURE__*/_jsx(Pressable
287
+ // Accessibility defaults come BEFORE the spread so an explicit prop — or
288
+ // one injected by a router trigger — still wins.
289
+ , {
290
+ accessibilityRole: "tab",
291
+ accessibilityState: {
292
+ selected: focused
293
+ },
294
+ accessibilityLabel: item.label,
295
+ ...pressableProps,
296
+ onPress: event => {
297
+ // The bar's GestureDetector normally consumes touches; this still fires
298
+ // for assistive-technology activation (VoiceOver) and keyboard focus.
299
+ if (bar) bar.slideIndex.value = withSpring(index, SLIDE_SPRING);
300
+ setMinimized(minimized, 0);
301
+ // Controlled path only. On the focus-driven path the trigger's own
302
+ // `onPress` below performs the navigation, so reporting the selection
303
+ // here as well would navigate twice.
304
+ if (isFocused === undefined) bar?.selectIndex(index);
305
+ onPress?.(event);
306
+ }
307
+ // `Pressable`'s `style` also accepts a function of the press state; both
308
+ // forms are composed on top of the flex-share base so a caller can tint
309
+ // or scale a tab on press without losing the layout.
310
+ ,
311
+ style: typeof style === 'function' ? state => [styles.button, style(state)] : [styles.button, style],
312
+ children: /*#__PURE__*/_jsxs(Animated.View, {
313
+ style: [styles.itemBox, boxStyle],
314
+ children: [/*#__PURE__*/_jsxs(View, {
315
+ children: [/*#__PURE__*/_jsx(Glyph, {
316
+ item: item,
317
+ tint: theme.inactiveTint,
318
+ size: ICON_SIZE
319
+ }), /*#__PURE__*/_jsx(Animated.View, {
320
+ style: [StyleSheet.absoluteFill, styles.glyphLayer, activeGlyphStyle],
321
+ children: /*#__PURE__*/_jsx(Glyph, {
322
+ item: item,
323
+ tint: theme.activeTint,
324
+ size: ICON_SIZE
325
+ })
326
+ })]
327
+ }), /*#__PURE__*/_jsx(Animated.Text, {
328
+ numberOfLines: 1,
329
+ style: [styles.label, labelStyle],
330
+ children: item.label
331
+ })]
332
+ })
333
+ });
334
+ }
335
+
336
+ /**
337
+ * Bind the platform `Surface` + `Blur` to the shared body, once per entry
338
+ * module. The returned component is created at module scope, so its identity is
339
+ * stable across renders. `index.ts` binds the native/neutral pieces and
340
+ * `index.web.tsx` binds the web pieces explicitly — the same split
341
+ * `BottomSheet` makes with its `Shell`.
342
+ */
343
+ export function createTabBar(Surface, Blur) {
344
+ const TabBar = props => /*#__PURE__*/_jsx(TabBarBody, {
345
+ ...props,
346
+ Surface: Surface,
347
+ Blur: Blur
348
+ });
349
+ TabBar.displayName = 'TabBar';
350
+ return TabBar;
351
+ }
352
+
353
+ /** Bind the platform `Glyph` to the shared button body. See `createTabBar`. */
354
+ export function createTabBarButton(Glyph) {
355
+ const TabBarButton = props => /*#__PURE__*/_jsx(TabBarButtonBody, {
356
+ ...props,
357
+ Glyph: Glyph
358
+ });
359
+ TabBarButton.displayName = 'TabBarButton';
360
+ return TabBarButton;
361
+ }
362
+ const styles = StyleSheet.create({
363
+ root: {
364
+ position: 'absolute',
365
+ left: 0,
366
+ right: 0,
367
+ bottom: 0,
368
+ // In the style object, not as a prop: RN-Web deprecated the `pointerEvents`
369
+ // prop and warns on every render when it is used.
370
+ pointerEvents: 'box-none'
371
+ },
372
+ barWrap: {
373
+ marginHorizontal: BAR_MARGIN,
374
+ pointerEvents: 'box-none'
375
+ },
376
+ highlight: {
377
+ position: 'absolute',
378
+ left: 0,
379
+ borderCurve: 'continuous'
380
+ },
381
+ itemRow: {
382
+ flex: 1,
383
+ flexDirection: 'row',
384
+ alignItems: 'center',
385
+ paddingHorizontal: ROW_PAD_H
386
+ },
387
+ button: {
388
+ flex: 1,
389
+ alignItems: 'center',
390
+ justifyContent: 'center'
391
+ },
392
+ itemBox: {
393
+ alignSelf: 'stretch',
394
+ alignItems: 'center',
395
+ paddingTop: ITEM_PAD_V,
396
+ overflow: 'hidden'
397
+ },
398
+ glyphLayer: {
399
+ alignItems: 'center',
400
+ justifyContent: 'center'
401
+ },
402
+ label: {
403
+ fontSize: LABEL_FONT_SIZE,
404
+ fontWeight: '600',
405
+ marginTop: ITEM_GAP
406
+ }
407
+ });
408
+ //# sourceMappingURL=TabBarBase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Children","createContext","useCallback","useContext","useEffect","useMemo","Pressable","StyleSheet","useWindowDimensions","View","Gesture","GestureDetector","Animated","Extrapolation","interpolate","interpolateColor","runOnJS","useAnimatedStyle","useSharedValue","withSpring","useSafeAreaInsets","useHaptics","setMinimized","useMinimizeState","BAR_MARGIN","BLUR_BLEED","EXPANDED_HEIGHT","HIGHLIGHT_EXPANDED","HIGHLIGHT_MINIMIZED","ICON_SIZE","ITEM_GAP","ITEM_PAD_V","LABEL_FONT_SIZE","MINIMIZED_HEIGHT","MINIMIZED_INSET","ROW_PAD_H","SLIDE_SPRING","useTabBarTheme","jsx","_jsx","jsxs","_jsxs","BarContext","TabBarBody","Surface","Blur","children","activeIndex","onIndexChange","theme","themeOverrides","haptics","style","viewProps","insets","width","windowWidth","minimized","progress","slideIndex","isDragging","lastTicked","tabCount","Math","max","count","impact","tick","selectIndex","index","undefined","value","gesture","indexAtX","x","minimizedValue","sideInset","CLAMP","barWidth","itemWidth","raw","min","pan","Pan","activeOffsetX","failOffsetY","onStart","round","onUpdate","event","rounded","onFinalize","tap","Tap","maxDistance","maxDuration","onEnd","success","Race","barStyle","height","marginHorizontal","shapeStyle","borderRadius","highlightStyle","barHeight","top","transform","translateX","bottomOffset","bottom","barContext","styles","root","direction","position","left","right","barWrap","marginBottom","highlight","backgroundColor","accessibilityRole","itemRow","Provider","TabBarButtonBody","Glyph","item","isFocused","onPress","pressableProps","bar","standaloneTheme","focused","activeGlyphStyle","opacity","abs","labelStyle","color","activeTint","inactiveTint","boxStyle","accessibilityState","selected","accessibilityLabel","label","state","button","itemBox","tint","size","absoluteFill","glyphLayer","Text","numberOfLines","createTabBar","TabBar","props","displayName","createTabBarButton","TabBarButton","create","pointerEvents","borderCurve","flex","flexDirection","alignItems","paddingHorizontal","justifyContent","alignSelf","paddingTop","overflow","fontSize","fontWeight","marginTop"],"sourceRoot":"../../../src","sources":["tab-bar/TabBarBase.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEA,QAAQ,EACRC,aAAa,EACbC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,OAAO,QAEF,OAAO;AACd,SAASC,SAAS,EAAEC,UAAU,EAAEC,mBAAmB,EAAE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AM,CAAE,CAAC;EAChGkC,YAAY,CAACF,WAAW,GAAG,cAAc;EACzC,OAAOE,YAAY;AACrB;AAEA,MAAMhD,MAAM,GAAGzG,UAAU,CAAC0J,MAAM,CAAC;EAC/BhD,IAAI,EAAE;IACJE,QAAQ,EAAE,UAAU;IACpBC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRP,MAAM,EAAE,CAAC;IACT;IACA;IACAoD,aAAa,EAAE;EACjB,CAAC;EACD5C,OAAO,EAAE;IACPjB,gBAAgB,EAAE7E,UAAU;IAC5B0I,aAAa,EAAE;EACjB,CAAC;EACD1C,SAAS,EAAE;IACTL,QAAQ,EAAE,UAAU;IACpBC,IAAI,EAAE,CAAC;IACP+C,WAAW,EAAE;EACf,CAAC;EACDxC,OAAO,EAAE;IACPyC,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,iBAAiB,EAAEpI;EACrB,CAAC;EACDgH,MAAM,EAAE;IACNiB,IAAI,EAAE,CAAC;IACPE,UAAU,EAAE,QAAQ;IACpBE,cAAc,EAAE;EAClB,CAAC;EACDpB,OAAO,EAAE;IACPqB,SAAS,EAAE,SAAS;IACpBH,UAAU,EAAE,QAAQ;IACpBI,UAAU,EAAE3I,UAAU;IACtB4I,QAAQ,EAAE;EACZ,CAAC;EACDnB,UAAU,EAAE;IACVc,UAAU,EAAE,QAAQ;IACpBE,cAAc,EAAE;EAClB,CAAC;EACDvB,KAAK,EAAE;IACL2B,QAAQ,EAAE5I,eAAe;IACzB6I,UAAU,EAAE,KAAK;IACjBC,SAAS,EAAEhJ;EACb;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Ported from expo-glass-tabs v0.1.1 — src/glass-tab-bar.tsx
5
+ * (MIT © 2026 David Mokos). See the top-level NOTICE.
6
+ *
7
+ * expo-router bindings for the tab bar. This subpath
8
+ * (`@oxyhq/bloom/tab-bar/expo-router`) is the ONLY place in Bloom that may
9
+ * import `expo-router` or `react-native-screens`, which is why it is a separate
10
+ * entry: the core `@oxyhq/bloom/tab-bar` stays usable in an app with no router
11
+ * at all, and neither optional peer is pulled into a bundle that never asks for
12
+ * it.
13
+ */
14
+
15
+ import { TabBar, TabBarButton } from "../index.js";
16
+
17
+ /**
18
+ * `activeIndex` is omitted deliberately: with a router the highlight is driven
19
+ * by each trigger's own focus (see `RouterTabBarButton`), which is what keeps it
20
+ * correct through deep links, back gestures and any other programmatic
21
+ * navigation. Setting both would put two writers on one shared value.
22
+ */
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
+ /**
25
+ * The bar, as expo-router's `<TabList asChild>` child.
26
+ *
27
+ * Navigation happens through `onIndexChange`, not through the triggers: the
28
+ * bar's gesture detector consumes the touches (that is what makes scrubbing
29
+ * possible), so a tap never reaches the trigger's own `Pressable`.
30
+ *
31
+ * ```tsx
32
+ * <TabList asChild>
33
+ * <RouterTabBar onIndexChange={(i) => router.navigate(TABS[i].href)}>
34
+ * {TABS.map(({ href, ...item }, index) => (
35
+ * <TabTrigger key={item.name} name={item.name} href={href} asChild>
36
+ * <RouterTabBarButton item={item} index={index} />
37
+ * </TabTrigger>
38
+ * ))}
39
+ * </RouterTabBar>
40
+ * </TabList>
41
+ * ```
42
+ */
43
+ export function RouterTabBar({
44
+ // `asChild` is `TabList`'s own instruction to forward its props to this
45
+ // component instead of wrapping them in a `<View>`. It is consumed there and
46
+ // is meaningless below, so it is dropped rather than passed to a real view.
47
+ asChild: _asChild,
48
+ ...props
49
+ }) {
50
+ return /*#__PURE__*/_jsx(TabBar, {
51
+ ...props
52
+ });
53
+ }
54
+ RouterTabBar.displayName = 'RouterTabBar';
55
+
56
+ /**
57
+ * One trigger, as expo-router's `<TabTrigger asChild>` child. The trigger
58
+ * supplies `isFocused` and `onPress`; the button uses the first to drive the
59
+ * highlight and the second to navigate on keyboard / assistive-technology
60
+ * activation.
61
+ */
62
+ export function RouterTabBarButton({
63
+ item,
64
+ index,
65
+ // The trigger's resolved path, injected for react-native-web's anchor
66
+ // rendering. `Pressable` has no such prop, and navigation already runs
67
+ // through the bar's `onIndexChange`, so it stops here.
68
+ href: _href,
69
+ ...props
70
+ }) {
71
+ return /*#__PURE__*/_jsx(TabBarButton, {
72
+ ...props,
73
+ item: item,
74
+ index: index
75
+ });
76
+ }
77
+ RouterTabBarButton.displayName = 'RouterTabBarButton';
78
+ //# sourceMappingURL=RouterTabBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TabBar","TabBarButton","jsx","_jsx","RouterTabBar","asChild","_asChild","props","displayName","RouterTabBarButton","item","index","href","_href"],"sourceRoot":"../../../../src","sources":["tab-bar/expo-router/RouterTabBar.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,MAAM,EAAEC,YAAY,QAAQ,aAAU;;AAG/C;AACA;AACA;AACA;AACA;AACA;AALA,SAAAC,GAAA,IAAAC,IAAA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAAC;EAC3B;EACA;EACA;EACAC,OAAO,EAAEC,QAAQ;EACjB,GAAGC;AACc,CAAC,EAAE;EACpB,oBAAOJ,IAAA,CAACH,MAAM;IAAA,GAAKO;EAAK,CAAG,CAAC;AAC9B;AAEAH,YAAY,CAACI,WAAW,GAAG,cAAc;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAAC;EACjCC,IAAI;EACJC,KAAK;EACL;EACA;EACA;EACAC,IAAI,EAAEC,KAAK;EACX,GAAGN;AACoB,CAAC,EAAE;EAC1B,oBAAOJ,IAAA,CAACF,YAAY;IAAA,GAAKM,KAAK;IAAEG,IAAI,EAAEA,IAAK;IAACC,KAAK,EAAEA;EAAM,CAAE,CAAC;AAC9D;AAEAF,kBAAkB,CAACD,WAAW,GAAG,oBAAoB","ignoreList":[]}
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Ported from expo-glass-tabs v0.1.1 — src/fading-tab-slot.tsx
5
+ * (MIT © 2026 David Mokos). See the top-level NOTICE.
6
+ */
7
+ import { useEffect, useRef } from 'react';
8
+ import { StyleSheet } from 'react-native';
9
+ import Animated, { Easing, interpolate, useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
10
+ import { Screen } from 'react-native-screens';
11
+ import { jsx as _jsx } from "react/jsx-runtime";
12
+ /** Strong ease-out — entering content should feel instant, then settle. */
13
+ const EASE_OUT = Easing.bezier(0.23, 1, 0.32, 1);
14
+ const ENTER_DURATION = 220;
15
+ /** Never enter from nothing: a whisper of depth, no zoom. */
16
+ const ENTER_SCALE = 0.985;
17
+ function FadeIn({
18
+ focused,
19
+ children
20
+ }) {
21
+ const progress = useSharedValue(1);
22
+ const isFirstRender = useRef(true);
23
+ useEffect(() => {
24
+ // Don't animate the very first screen on app launch.
25
+ if (isFirstRender.current) {
26
+ isFirstRender.current = false;
27
+ return;
28
+ }
29
+ if (focused) {
30
+ progress.value = 0;
31
+ progress.value = withTiming(1, {
32
+ duration: ENTER_DURATION,
33
+ easing: EASE_OUT
34
+ });
35
+ } else {
36
+ // Outgoing screen hides instantly (display: none) — only entries animate.
37
+ progress.value = 0;
38
+ }
39
+ }, [focused, progress]);
40
+
41
+ // `progress` must stay in the deps array — see the CRITICAL note in
42
+ // `TabBarBase`: without the worklets babel plugin (web) an omitted array
43
+ // freezes the mapper at the first frame, and every tab would enter invisible.
44
+ const style = useAnimatedStyle(() => ({
45
+ opacity: progress.value,
46
+ transform: [{
47
+ scale: interpolate(progress.value, [0, 1], [ENTER_SCALE, 1])
48
+ }]
49
+ }), [progress]);
50
+ return /*#__PURE__*/_jsx(Animated.View, {
51
+ style: [styles.fade, style],
52
+ children: children
53
+ });
54
+ }
55
+
56
+ /**
57
+ * Drop-in for `TabSlot`'s `renderFn`: identical to expo-router's default render,
58
+ * plus a subtle fade + micro-scale on the screen becoming focused.
59
+ *
60
+ * ```tsx
61
+ * <TabSlot style={{ height: '100%' }} renderFn={renderFadingTabScreen} />
62
+ * ```
63
+ */
64
+ export function renderFadingTabScreen(descriptor, {
65
+ isFocused,
66
+ loaded,
67
+ detachInactiveScreens
68
+ }) {
69
+ const {
70
+ lazy = true,
71
+ unmountOnBlur,
72
+ freezeOnBlur
73
+ } = descriptor.options;
74
+ if (unmountOnBlur && !isFocused) {
75
+ return null;
76
+ }
77
+ if (lazy && !loaded && !isFocused) {
78
+ return null;
79
+ }
80
+ return /*#__PURE__*/_jsx(Screen, {
81
+ enabled: detachInactiveScreens,
82
+ activityState: isFocused ? 2 : 0,
83
+ freezeOnBlur: freezeOnBlur,
84
+ style: [styles.screen, isFocused ? styles.focused : styles.unfocused],
85
+ children: /*#__PURE__*/_jsx(FadeIn, {
86
+ focused: isFocused,
87
+ children: descriptor.render()
88
+ })
89
+ }, descriptor.route.key);
90
+ }
91
+ const styles = StyleSheet.create({
92
+ fade: {
93
+ flex: 1
94
+ },
95
+ screen: {
96
+ flex: 1,
97
+ position: 'relative',
98
+ height: '100%'
99
+ },
100
+ focused: {
101
+ zIndex: 1,
102
+ display: 'flex',
103
+ flexShrink: 0,
104
+ flexGrow: 1
105
+ },
106
+ unfocused: {
107
+ zIndex: -1,
108
+ display: 'none',
109
+ flexShrink: 1,
110
+ flexGrow: 0
111
+ }
112
+ });
113
+ //# sourceMappingURL=fading-tab-screen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useEffect","useRef","StyleSheet","Animated","Easing","interpolate","useAnimatedStyle","useSharedValue","withTiming","Screen","jsx","_jsx","EASE_OUT","bezier","ENTER_DURATION","ENTER_SCALE","FadeIn","focused","children","progress","isFirstRender","current","value","duration","easing","style","opacity","transform","scale","View","styles","fade","renderFadingTabScreen","descriptor","isFocused","loaded","detachInactiveScreens","lazy","unmountOnBlur","freezeOnBlur","options","enabled","activityState","screen","unfocused","render","route","key","create","flex","position","height","zIndex","display","flexShrink","flexGrow"],"sourceRoot":"../../../../src","sources":["tab-bar/expo-router/fading-tab-screen.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,MAAM,QAAgC,OAAO;AACjE,SAASC,UAAU,QAAQ,cAAc;AACzC,OAAOC,QAAQ,IACbC,MAAM,EACNC,WAAW,EACXC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,QACL,yBAAyB;AAChC,SAASC,MAAM,QAAQ,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAG9C;AACA,MAAMC,QAAQ,GAAGR,MAAM,CAACS,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;AAChD,MAAMC,cAAc,GAAG,GAAG;AAC1B;AACA,MAAMC,WAAW,GAAG,KAAK;AAEzB,SAASC,MAAMA,CAAC;EAAEC,OAAO;EAAEC;AAAkD,CAAC,EAAE;EAC9E,MAAMC,QAAQ,GAAGZ,cAAc,CAAC,CAAC,CAAC;EAClC,MAAMa,aAAa,GAAGnB,MAAM,CAAC,IAAI,CAAC;EAElCD,SAAS,CAAC,MAAM;IACd;IACA,IAAIoB,aAAa,CAACC,OAAO,EAAE;MACzBD,aAAa,CAACC,OAAO,GAAG,KAAK;MAC7B;IACF;IACA,IAAIJ,OAAO,EAAE;MACXE,QAAQ,CAACG,KAAK,GAAG,CAAC;MAClBH,QAAQ,CAACG,KAAK,GAAGd,UAAU,CAAC,CAAC,EAAE;QAAEe,QAAQ,EAAET,cAAc;QAAEU,MAAM,EAAEZ;MAAS,CAAC,CAAC;IAChF,CAAC,MAAM;MACL;MACAO,QAAQ,CAACG,KAAK,GAAG,CAAC;IACpB;EACF,CAAC,EAAE,CAACL,OAAO,EAAEE,QAAQ,CAAC,CAAC;;EAEvB;EACA;EACA;EACA,MAAMM,KAAK,GAAGnB,gBAAgB,C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AAC;AAEb;AAEA,MAAMjB,MAAM,GAAG5B,UAAU,CAAC8C,MAAM,CAAC;EAC/BjB,IAAI,EAAE;IACJkB,IAAI,EAAE;EACR,CAAC;EACDN,MAAM,EAAE;IACNM,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE;EACV,CAAC;EACDlC,OAAO,EAAE;IACPmC,MAAM,EAAE,CAAC;IACTC,OAAO,EAAE,MAAM;IACfC,UAAU,EAAE,CAAC;IACbC,QAAQ,EAAE;EACZ,CAAC;EACDX,SAAS,EAAE;IACTQ,MAAM,EAAE,CAAC,CAAC;IACVC,OAAO,EAAE,MAAM;IACfC,UAAU,EAAE,CAAC;IACbC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Ported from expo-glass-tabs v0.1.1 — src/index.ts
5
+ * (MIT © 2026 David Mokos). See the top-level NOTICE.
6
+ *
7
+ * Entry for `@oxyhq/bloom/tab-bar/expo-router`. The components live in sibling
8
+ * modules because this file is the published entry path and must stay stable;
9
+ * the split also keeps the router bindings and the `TabSlot` renderer — which
10
+ * pull `expo-router` and `react-native-screens` respectively — in separate
11
+ * modules.
12
+ */
13
+ export { RouterTabBar, RouterTabBarButton } from "./RouterTabBar.js";
14
+ export { renderFadingTabScreen } from "./fading-tab-screen.js";
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["RouterTabBar","RouterTabBarButton","renderFadingTabScreen"],"sourceRoot":"../../../../src","sources":["tab-bar/expo-router/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,YAAY,EAAEC,kBAAkB,QAAQ,mBAAgB;AAEjE,SAASC,qBAAqB,QAAQ,wBAAqB","ignoreList":[]}