@oxyhq/bloom 0.50.2 → 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 (536) 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 +2 -1
  6. package/lib/commonjs/bottom-sheet/index.web.js.map +1 -1
  7. package/lib/commonjs/context-menu/index.web.js +3 -2
  8. package/lib/commonjs/context-menu/index.web.js.map +1 -1
  9. package/lib/commonjs/dialog/Dialog.web.js +4 -3
  10. package/lib/commonjs/dialog/Dialog.web.js.map +1 -1
  11. package/lib/commonjs/index.js +90 -83
  12. package/lib/commonjs/index.js.map +1 -1
  13. package/lib/commonjs/index.web.js +116 -109
  14. package/lib/commonjs/index.web.js.map +1 -1
  15. package/lib/commonjs/menu/index.web.js +2 -1
  16. package/lib/commonjs/menu/index.web.js.map +1 -1
  17. package/lib/commonjs/popover/index.web.js +3 -2
  18. package/lib/commonjs/popover/index.web.js.map +1 -1
  19. package/lib/commonjs/portal/index.js +4 -1
  20. package/lib/commonjs/portal/index.js.map +1 -1
  21. package/lib/commonjs/progressive-blur/index.js +79 -0
  22. package/lib/commonjs/progressive-blur/index.js.map +1 -0
  23. package/lib/commonjs/progressive-blur/index.web.js +67 -0
  24. package/lib/commonjs/progressive-blur/index.web.js.map +1 -0
  25. package/lib/commonjs/progressive-blur/shared.js +66 -0
  26. package/lib/commonjs/progressive-blur/shared.js.map +1 -0
  27. package/lib/commonjs/progressive-blur/types.js +6 -0
  28. package/lib/commonjs/progressive-blur/types.js.map +1 -0
  29. package/lib/commonjs/select/index.web.js +2 -1
  30. package/lib/commonjs/select/index.web.js.map +1 -1
  31. package/lib/commonjs/styles/web-view-style.js +26 -0
  32. package/lib/commonjs/styles/web-view-style.js.map +1 -0
  33. package/lib/commonjs/tab-bar/TabBarBase.js +415 -0
  34. package/lib/commonjs/tab-bar/TabBarBase.js.map +1 -0
  35. package/lib/commonjs/tab-bar/expo-router/RouterTabBar.js +83 -0
  36. package/lib/commonjs/tab-bar/expo-router/RouterTabBar.js.map +1 -0
  37. package/lib/commonjs/tab-bar/expo-router/fading-tab-screen.js +119 -0
  38. package/lib/commonjs/tab-bar/expo-router/fading-tab-screen.js.map +1 -0
  39. package/lib/commonjs/tab-bar/expo-router/index.js +26 -0
  40. package/lib/commonjs/tab-bar/expo-router/index.js.map +1 -0
  41. package/lib/commonjs/tab-bar/glyph.js +43 -0
  42. package/lib/commonjs/tab-bar/glyph.js.map +1 -0
  43. package/lib/commonjs/tab-bar/glyph.native.js +55 -0
  44. package/lib/commonjs/tab-bar/glyph.native.js.map +1 -0
  45. package/lib/commonjs/tab-bar/index.js +65 -0
  46. package/lib/commonjs/tab-bar/index.js.map +1 -0
  47. package/lib/commonjs/tab-bar/index.web.js +67 -0
  48. package/lib/commonjs/tab-bar/index.web.js.map +1 -0
  49. package/lib/commonjs/tab-bar/minimize-context.js +127 -0
  50. package/lib/commonjs/tab-bar/minimize-context.js.map +1 -0
  51. package/lib/commonjs/tab-bar/shared.js +139 -0
  52. package/lib/commonjs/tab-bar/shared.js.map +1 -0
  53. package/lib/commonjs/tab-bar/surface.js +50 -0
  54. package/lib/commonjs/tab-bar/surface.js.map +1 -0
  55. package/lib/commonjs/tab-bar/surface.native.js +56 -0
  56. package/lib/commonjs/tab-bar/surface.native.js.map +1 -0
  57. package/lib/commonjs/tab-bar/surface.web.js +59 -0
  58. package/lib/commonjs/tab-bar/surface.web.js.map +1 -0
  59. package/lib/commonjs/tab-bar/types.js +6 -0
  60. package/lib/commonjs/tab-bar/types.js.map +1 -0
  61. package/lib/commonjs/toast/Positioner.js +117 -0
  62. package/lib/commonjs/toast/Positioner.js.map +1 -0
  63. package/lib/commonjs/toast/ToastContent.js +301 -0
  64. package/lib/commonjs/toast/ToastContent.js.map +1 -0
  65. package/lib/commonjs/toast/ToastHost.js +69 -0
  66. package/lib/commonjs/toast/ToastHost.js.map +1 -0
  67. package/lib/commonjs/toast/ToastHost.native.js +44 -0
  68. package/lib/commonjs/toast/ToastHost.native.js.map +1 -0
  69. package/lib/commonjs/toast/ToastIcon.js +57 -0
  70. package/lib/commonjs/toast/ToastIcon.js.map +1 -0
  71. package/lib/commonjs/toast/ToastRow.js +411 -0
  72. package/lib/commonjs/toast/ToastRow.js.map +1 -0
  73. package/lib/commonjs/toast/ToastSwipeHandler.js +189 -0
  74. package/lib/commonjs/toast/ToastSwipeHandler.js.map +1 -0
  75. package/lib/commonjs/toast/Toaster.js +205 -0
  76. package/lib/commonjs/toast/Toaster.js.map +1 -0
  77. package/lib/commonjs/toast/animations.js +274 -0
  78. package/lib/commonjs/toast/animations.js.map +1 -0
  79. package/lib/commonjs/toast/constants.js +56 -0
  80. package/lib/commonjs/toast/constants.js.map +1 -0
  81. package/lib/commonjs/toast/context.js +42 -0
  82. package/lib/commonjs/toast/context.js.map +1 -0
  83. package/lib/commonjs/toast/index.js +32 -126
  84. package/lib/commonjs/toast/index.js.map +1 -1
  85. package/lib/commonjs/toast/position-utils.js +115 -0
  86. package/lib/commonjs/toast/position-utils.js.map +1 -0
  87. package/lib/commonjs/toast/positioner-utils.js +141 -0
  88. package/lib/commonjs/toast/positioner-utils.js.map +1 -0
  89. package/lib/commonjs/toast/toast-comparator.js +28 -0
  90. package/lib/commonjs/toast/toast-comparator.js.map +1 -0
  91. package/lib/commonjs/toast/toast-fns.js +90 -0
  92. package/lib/commonjs/toast/toast-fns.js.map +1 -0
  93. package/lib/commonjs/toast/toast-store.js +352 -0
  94. package/lib/commonjs/toast/toast-store.js.map +1 -0
  95. package/lib/commonjs/toast/toast-timers.js +110 -0
  96. package/lib/commonjs/toast/toast-timers.js.map +1 -0
  97. package/lib/commonjs/toast/types.js +42 -0
  98. package/lib/commonjs/toast/types.js.map +1 -1
  99. package/lib/commonjs/toast/use-animated-target.js +57 -0
  100. package/lib/commonjs/toast/use-animated-target.js.map +1 -0
  101. package/lib/commonjs/toast/use-app-state.js +76 -0
  102. package/lib/commonjs/toast/use-app-state.js.map +1 -0
  103. package/lib/commonjs/toast/use-toast-colors.js +114 -0
  104. package/lib/commonjs/toast/use-toast-colors.js.map +1 -0
  105. package/lib/commonjs/toast/use-toast-position.js +40 -0
  106. package/lib/commonjs/toast/use-toast-position.js.map +1 -0
  107. package/lib/commonjs/tooltip/index.web.js +2 -1
  108. package/lib/commonjs/tooltip/index.web.js.map +1 -1
  109. package/lib/commonjs/zoomable-image-gallery/ZoomableImageGallery.js +20 -8
  110. package/lib/commonjs/zoomable-image-gallery/ZoomableImageGallery.js.map +1 -1
  111. package/lib/module/avatar-group/AvatarGroup.web.js +2 -1
  112. package/lib/module/avatar-group/AvatarGroup.web.js.map +1 -1
  113. package/lib/module/bottom-sheet/index.web.js +2 -1
  114. package/lib/module/bottom-sheet/index.web.js.map +1 -1
  115. package/lib/module/context-menu/index.web.js +3 -2
  116. package/lib/module/context-menu/index.web.js.map +1 -1
  117. package/lib/module/dialog/Dialog.web.js +4 -3
  118. package/lib/module/dialog/Dialog.web.js.map +1 -1
  119. package/lib/module/index.js +3 -2
  120. package/lib/module/index.js.map +1 -1
  121. package/lib/module/index.web.js +3 -2
  122. package/lib/module/index.web.js.map +1 -1
  123. package/lib/module/menu/index.web.js +2 -1
  124. package/lib/module/menu/index.web.js.map +1 -1
  125. package/lib/module/popover/index.web.js +3 -2
  126. package/lib/module/popover/index.web.js.map +1 -1
  127. package/lib/module/portal/index.js +4 -1
  128. package/lib/module/portal/index.js.map +1 -1
  129. package/lib/module/progressive-blur/index.js +74 -0
  130. package/lib/module/progressive-blur/index.js.map +1 -0
  131. package/lib/module/progressive-blur/index.web.js +62 -0
  132. package/lib/module/progressive-blur/index.web.js.map +1 -0
  133. package/lib/module/progressive-blur/shared.js +60 -0
  134. package/lib/module/progressive-blur/shared.js.map +1 -0
  135. package/lib/module/progressive-blur/types.js +4 -0
  136. package/lib/module/progressive-blur/types.js.map +1 -0
  137. package/lib/module/select/index.web.js +2 -1
  138. package/lib/module/select/index.web.js.map +1 -1
  139. package/lib/module/styles/web-view-style.js +22 -0
  140. package/lib/module/styles/web-view-style.js.map +1 -0
  141. package/lib/module/tab-bar/TabBarBase.js +408 -0
  142. package/lib/module/tab-bar/TabBarBase.js.map +1 -0
  143. package/lib/module/tab-bar/expo-router/RouterTabBar.js +78 -0
  144. package/lib/module/tab-bar/expo-router/RouterTabBar.js.map +1 -0
  145. package/lib/module/tab-bar/expo-router/fading-tab-screen.js +113 -0
  146. package/lib/module/tab-bar/expo-router/fading-tab-screen.js.map +1 -0
  147. package/lib/module/tab-bar/expo-router/index.js +15 -0
  148. package/lib/module/tab-bar/expo-router/index.js.map +1 -0
  149. package/lib/module/tab-bar/glyph.js +38 -0
  150. package/lib/module/tab-bar/glyph.js.map +1 -0
  151. package/lib/module/tab-bar/glyph.native.js +50 -0
  152. package/lib/module/tab-bar/glyph.native.js.map +1 -0
  153. package/lib/module/tab-bar/index.js +24 -0
  154. package/lib/module/tab-bar/index.js.map +1 -0
  155. package/lib/module/tab-bar/index.web.js +26 -0
  156. package/lib/module/tab-bar/index.web.js.map +1 -0
  157. package/lib/module/tab-bar/minimize-context.js +118 -0
  158. package/lib/module/tab-bar/minimize-context.js.map +1 -0
  159. package/lib/module/tab-bar/shared.js +132 -0
  160. package/lib/module/tab-bar/shared.js.map +1 -0
  161. package/lib/module/tab-bar/surface.js +44 -0
  162. package/lib/module/tab-bar/surface.js.map +1 -0
  163. package/lib/module/tab-bar/surface.native.js +50 -0
  164. package/lib/module/tab-bar/surface.native.js.map +1 -0
  165. package/lib/module/tab-bar/surface.web.js +53 -0
  166. package/lib/module/tab-bar/surface.web.js.map +1 -0
  167. package/lib/module/tab-bar/types.js +4 -0
  168. package/lib/module/tab-bar/types.js.map +1 -0
  169. package/lib/module/toast/Positioner.js +110 -0
  170. package/lib/module/toast/Positioner.js.map +1 -0
  171. package/lib/module/toast/ToastContent.js +295 -0
  172. package/lib/module/toast/ToastContent.js.map +1 -0
  173. package/lib/module/toast/ToastHost.js +63 -0
  174. package/lib/module/toast/ToastHost.js.map +1 -0
  175. package/lib/module/toast/ToastHost.native.js +38 -0
  176. package/lib/module/toast/ToastHost.native.js.map +1 -0
  177. package/lib/module/toast/ToastIcon.js +52 -0
  178. package/lib/module/toast/ToastIcon.js.map +1 -0
  179. package/lib/module/toast/ToastRow.js +407 -0
  180. package/lib/module/toast/ToastRow.js.map +1 -0
  181. package/lib/module/toast/ToastSwipeHandler.js +182 -0
  182. package/lib/module/toast/ToastSwipeHandler.js.map +1 -0
  183. package/lib/module/toast/Toaster.js +198 -0
  184. package/lib/module/toast/Toaster.js.map +1 -0
  185. package/lib/module/toast/animations.js +261 -0
  186. package/lib/module/toast/animations.js.map +1 -0
  187. package/lib/module/toast/constants.js +52 -0
  188. package/lib/module/toast/constants.js.map +1 -0
  189. package/lib/module/toast/context.js +34 -0
  190. package/lib/module/toast/context.js.map +1 -0
  191. package/lib/module/toast/index.js +27 -103
  192. package/lib/module/toast/index.js.map +1 -1
  193. package/lib/module/toast/position-utils.js +107 -0
  194. package/lib/module/toast/position-utils.js.map +1 -0
  195. package/lib/module/toast/positioner-utils.js +134 -0
  196. package/lib/module/toast/positioner-utils.js.map +1 -0
  197. package/lib/module/toast/toast-comparator.js +22 -0
  198. package/lib/module/toast/toast-comparator.js.map +1 -0
  199. package/lib/module/toast/toast-fns.js +85 -0
  200. package/lib/module/toast/toast-fns.js.map +1 -0
  201. package/lib/module/toast/toast-store.js +346 -0
  202. package/lib/module/toast/toast-store.js.map +1 -0
  203. package/lib/module/toast/toast-timers.js +104 -0
  204. package/lib/module/toast/toast-timers.js.map +1 -0
  205. package/lib/module/toast/types.js +38 -0
  206. package/lib/module/toast/types.js.map +1 -1
  207. package/lib/module/toast/use-animated-target.js +52 -0
  208. package/lib/module/toast/use-animated-target.js.map +1 -0
  209. package/lib/module/toast/use-app-state.js +70 -0
  210. package/lib/module/toast/use-app-state.js.map +1 -0
  211. package/lib/module/toast/use-toast-colors.js +109 -0
  212. package/lib/module/toast/use-toast-colors.js.map +1 -0
  213. package/lib/module/toast/use-toast-position.js +35 -0
  214. package/lib/module/toast/use-toast-position.js.map +1 -0
  215. package/lib/module/tooltip/index.web.js +2 -1
  216. package/lib/module/tooltip/index.web.js.map +1 -1
  217. package/lib/module/zoomable-image-gallery/ZoomableImageGallery.js +20 -8
  218. package/lib/module/zoomable-image-gallery/ZoomableImageGallery.js.map +1 -1
  219. package/lib/typescript/commonjs/avatar-group/AvatarGroup.web.d.ts.map +1 -1
  220. package/lib/typescript/commonjs/bottom-sheet/index.web.d.ts.map +1 -1
  221. package/lib/typescript/commonjs/context-menu/index.web.d.ts.map +1 -1
  222. package/lib/typescript/commonjs/dialog/Dialog.web.d.ts.map +1 -1
  223. package/lib/typescript/commonjs/index.d.ts +2 -1
  224. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  225. package/lib/typescript/commonjs/index.web.d.ts +2 -1
  226. package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
  227. package/lib/typescript/commonjs/menu/index.web.d.ts.map +1 -1
  228. package/lib/typescript/commonjs/popover/index.web.d.ts.map +1 -1
  229. package/lib/typescript/commonjs/portal/index.d.ts.map +1 -1
  230. package/lib/typescript/commonjs/progressive-blur/index.d.ts +23 -0
  231. package/lib/typescript/commonjs/progressive-blur/index.d.ts.map +1 -0
  232. package/lib/typescript/commonjs/progressive-blur/index.web.d.ts +30 -0
  233. package/lib/typescript/commonjs/progressive-blur/index.web.d.ts.map +1 -0
  234. package/lib/typescript/commonjs/progressive-blur/shared.d.ts +35 -0
  235. package/lib/typescript/commonjs/progressive-blur/shared.d.ts.map +1 -0
  236. package/lib/typescript/commonjs/progressive-blur/types.d.ts +21 -0
  237. package/lib/typescript/commonjs/progressive-blur/types.d.ts.map +1 -0
  238. package/lib/typescript/commonjs/select/index.web.d.ts.map +1 -1
  239. package/lib/typescript/commonjs/styles/web-view-style.d.ts +21 -0
  240. package/lib/typescript/commonjs/styles/web-view-style.d.ts.map +1 -0
  241. package/lib/typescript/commonjs/tab-bar/TabBarBase.d.ts +36 -0
  242. package/lib/typescript/commonjs/tab-bar/TabBarBase.d.ts.map +1 -0
  243. package/lib/typescript/commonjs/tab-bar/expo-router/RouterTabBar.d.ts +59 -0
  244. package/lib/typescript/commonjs/tab-bar/expo-router/RouterTabBar.d.ts.map +1 -0
  245. package/lib/typescript/commonjs/tab-bar/expo-router/fading-tab-screen.d.ts +11 -0
  246. package/lib/typescript/commonjs/tab-bar/expo-router/fading-tab-screen.d.ts.map +1 -0
  247. package/lib/typescript/commonjs/tab-bar/expo-router/index.d.ts +14 -0
  248. package/lib/typescript/commonjs/tab-bar/expo-router/index.d.ts.map +1 -0
  249. package/lib/typescript/commonjs/tab-bar/glyph.d.ts +6 -0
  250. package/lib/typescript/commonjs/tab-bar/glyph.d.ts.map +1 -0
  251. package/lib/typescript/commonjs/tab-bar/glyph.native.d.ts +6 -0
  252. package/lib/typescript/commonjs/tab-bar/glyph.native.d.ts.map +1 -0
  253. package/lib/typescript/commonjs/tab-bar/index.d.ts +12 -0
  254. package/lib/typescript/commonjs/tab-bar/index.d.ts.map +1 -0
  255. package/lib/typescript/commonjs/tab-bar/index.web.d.ts +12 -0
  256. package/lib/typescript/commonjs/tab-bar/index.web.d.ts.map +1 -0
  257. package/lib/typescript/commonjs/tab-bar/minimize-context.d.ts +51 -0
  258. package/lib/typescript/commonjs/tab-bar/minimize-context.d.ts.map +1 -0
  259. package/lib/typescript/commonjs/tab-bar/shared.d.ts +93 -0
  260. package/lib/typescript/commonjs/tab-bar/shared.d.ts.map +1 -0
  261. package/lib/typescript/commonjs/tab-bar/surface.d.ts +6 -0
  262. package/lib/typescript/commonjs/tab-bar/surface.d.ts.map +1 -0
  263. package/lib/typescript/commonjs/tab-bar/surface.native.d.ts +6 -0
  264. package/lib/typescript/commonjs/tab-bar/surface.native.d.ts.map +1 -0
  265. package/lib/typescript/commonjs/tab-bar/surface.web.d.ts +6 -0
  266. package/lib/typescript/commonjs/tab-bar/surface.web.d.ts.map +1 -0
  267. package/lib/typescript/commonjs/tab-bar/types.d.ts +85 -0
  268. package/lib/typescript/commonjs/tab-bar/types.d.ts.map +1 -0
  269. package/lib/typescript/commonjs/toast/Positioner.d.ts +21 -0
  270. package/lib/typescript/commonjs/toast/Positioner.d.ts.map +1 -0
  271. package/lib/typescript/commonjs/toast/ToastContent.d.ts +14 -0
  272. package/lib/typescript/commonjs/toast/ToastContent.d.ts.map +1 -0
  273. package/lib/typescript/commonjs/toast/ToastHost.d.ts +6 -0
  274. package/lib/typescript/commonjs/toast/ToastHost.d.ts.map +1 -0
  275. package/lib/typescript/commonjs/toast/ToastHost.native.d.ts +6 -0
  276. package/lib/typescript/commonjs/toast/ToastHost.native.d.ts.map +1 -0
  277. package/lib/typescript/commonjs/toast/ToastIcon.d.ts +9 -0
  278. package/lib/typescript/commonjs/toast/ToastIcon.d.ts.map +1 -0
  279. package/lib/typescript/commonjs/toast/ToastRow.d.ts +80 -0
  280. package/lib/typescript/commonjs/toast/ToastRow.d.ts.map +1 -0
  281. package/lib/typescript/commonjs/toast/ToastSwipeHandler.d.ts +30 -0
  282. package/lib/typescript/commonjs/toast/ToastSwipeHandler.d.ts.map +1 -0
  283. package/lib/typescript/commonjs/toast/Toaster.d.ts +19 -0
  284. package/lib/typescript/commonjs/toast/Toaster.d.ts.map +1 -0
  285. package/lib/typescript/commonjs/toast/animations.d.ts +62 -0
  286. package/lib/typescript/commonjs/toast/animations.d.ts.map +1 -0
  287. package/lib/typescript/commonjs/toast/constants.d.ts +39 -0
  288. package/lib/typescript/commonjs/toast/constants.d.ts.map +1 -0
  289. package/lib/typescript/commonjs/toast/context.d.ts +19 -0
  290. package/lib/typescript/commonjs/toast/context.d.ts.map +1 -0
  291. package/lib/typescript/commonjs/toast/index.d.ts +23 -76
  292. package/lib/typescript/commonjs/toast/index.d.ts.map +1 -1
  293. package/lib/typescript/commonjs/toast/position-utils.d.ts +30 -0
  294. package/lib/typescript/commonjs/toast/position-utils.d.ts.map +1 -0
  295. package/lib/typescript/commonjs/toast/positioner-utils.d.ts +72 -0
  296. package/lib/typescript/commonjs/toast/positioner-utils.d.ts.map +1 -0
  297. package/lib/typescript/commonjs/toast/toast-comparator.d.ts +12 -0
  298. package/lib/typescript/commonjs/toast/toast-comparator.d.ts.map +1 -0
  299. package/lib/typescript/commonjs/toast/toast-fns.d.ts +3 -0
  300. package/lib/typescript/commonjs/toast/toast-fns.d.ts.map +1 -0
  301. package/lib/typescript/commonjs/toast/toast-store.d.ts +52 -0
  302. package/lib/typescript/commonjs/toast/toast-store.d.ts.map +1 -0
  303. package/lib/typescript/commonjs/toast/toast-timers.d.ts +24 -0
  304. package/lib/typescript/commonjs/toast/toast-timers.d.ts.map +1 -0
  305. package/lib/typescript/commonjs/toast/types.d.ts +222 -5
  306. package/lib/typescript/commonjs/toast/types.d.ts.map +1 -1
  307. package/lib/typescript/commonjs/toast/use-animated-target.d.ts +7 -0
  308. package/lib/typescript/commonjs/toast/use-animated-target.d.ts.map +1 -0
  309. package/lib/typescript/commonjs/toast/use-app-state.d.ts +18 -0
  310. package/lib/typescript/commonjs/toast/use-app-state.d.ts.map +1 -0
  311. package/lib/typescript/commonjs/toast/use-toast-colors.d.ts +22 -0
  312. package/lib/typescript/commonjs/toast/use-toast-colors.d.ts.map +1 -0
  313. package/lib/typescript/commonjs/toast/use-toast-position.d.ts +37 -0
  314. package/lib/typescript/commonjs/toast/use-toast-position.d.ts.map +1 -0
  315. package/lib/typescript/commonjs/tooltip/index.web.d.ts.map +1 -1
  316. package/lib/typescript/commonjs/zoomable-image-gallery/ZoomableImageGallery.d.ts.map +1 -1
  317. package/lib/typescript/module/avatar-group/AvatarGroup.web.d.ts.map +1 -1
  318. package/lib/typescript/module/bottom-sheet/index.web.d.ts.map +1 -1
  319. package/lib/typescript/module/context-menu/index.web.d.ts.map +1 -1
  320. package/lib/typescript/module/dialog/Dialog.web.d.ts.map +1 -1
  321. package/lib/typescript/module/index.d.ts +2 -1
  322. package/lib/typescript/module/index.d.ts.map +1 -1
  323. package/lib/typescript/module/index.web.d.ts +2 -1
  324. package/lib/typescript/module/index.web.d.ts.map +1 -1
  325. package/lib/typescript/module/menu/index.web.d.ts.map +1 -1
  326. package/lib/typescript/module/popover/index.web.d.ts.map +1 -1
  327. package/lib/typescript/module/portal/index.d.ts.map +1 -1
  328. package/lib/typescript/module/progressive-blur/index.d.ts +23 -0
  329. package/lib/typescript/module/progressive-blur/index.d.ts.map +1 -0
  330. package/lib/typescript/module/progressive-blur/index.web.d.ts +30 -0
  331. package/lib/typescript/module/progressive-blur/index.web.d.ts.map +1 -0
  332. package/lib/typescript/module/progressive-blur/shared.d.ts +35 -0
  333. package/lib/typescript/module/progressive-blur/shared.d.ts.map +1 -0
  334. package/lib/typescript/module/progressive-blur/types.d.ts +21 -0
  335. package/lib/typescript/module/progressive-blur/types.d.ts.map +1 -0
  336. package/lib/typescript/module/select/index.web.d.ts.map +1 -1
  337. package/lib/typescript/module/styles/web-view-style.d.ts +21 -0
  338. package/lib/typescript/module/styles/web-view-style.d.ts.map +1 -0
  339. package/lib/typescript/module/tab-bar/TabBarBase.d.ts +36 -0
  340. package/lib/typescript/module/tab-bar/TabBarBase.d.ts.map +1 -0
  341. package/lib/typescript/module/tab-bar/expo-router/RouterTabBar.d.ts +59 -0
  342. package/lib/typescript/module/tab-bar/expo-router/RouterTabBar.d.ts.map +1 -0
  343. package/lib/typescript/module/tab-bar/expo-router/fading-tab-screen.d.ts +11 -0
  344. package/lib/typescript/module/tab-bar/expo-router/fading-tab-screen.d.ts.map +1 -0
  345. package/lib/typescript/module/tab-bar/expo-router/index.d.ts +14 -0
  346. package/lib/typescript/module/tab-bar/expo-router/index.d.ts.map +1 -0
  347. package/lib/typescript/module/tab-bar/glyph.d.ts +6 -0
  348. package/lib/typescript/module/tab-bar/glyph.d.ts.map +1 -0
  349. package/lib/typescript/module/tab-bar/glyph.native.d.ts +6 -0
  350. package/lib/typescript/module/tab-bar/glyph.native.d.ts.map +1 -0
  351. package/lib/typescript/module/tab-bar/index.d.ts +12 -0
  352. package/lib/typescript/module/tab-bar/index.d.ts.map +1 -0
  353. package/lib/typescript/module/tab-bar/index.web.d.ts +12 -0
  354. package/lib/typescript/module/tab-bar/index.web.d.ts.map +1 -0
  355. package/lib/typescript/module/tab-bar/minimize-context.d.ts +51 -0
  356. package/lib/typescript/module/tab-bar/minimize-context.d.ts.map +1 -0
  357. package/lib/typescript/module/tab-bar/shared.d.ts +93 -0
  358. package/lib/typescript/module/tab-bar/shared.d.ts.map +1 -0
  359. package/lib/typescript/module/tab-bar/surface.d.ts +6 -0
  360. package/lib/typescript/module/tab-bar/surface.d.ts.map +1 -0
  361. package/lib/typescript/module/tab-bar/surface.native.d.ts +6 -0
  362. package/lib/typescript/module/tab-bar/surface.native.d.ts.map +1 -0
  363. package/lib/typescript/module/tab-bar/surface.web.d.ts +6 -0
  364. package/lib/typescript/module/tab-bar/surface.web.d.ts.map +1 -0
  365. package/lib/typescript/module/tab-bar/types.d.ts +85 -0
  366. package/lib/typescript/module/tab-bar/types.d.ts.map +1 -0
  367. package/lib/typescript/module/toast/Positioner.d.ts +21 -0
  368. package/lib/typescript/module/toast/Positioner.d.ts.map +1 -0
  369. package/lib/typescript/module/toast/ToastContent.d.ts +14 -0
  370. package/lib/typescript/module/toast/ToastContent.d.ts.map +1 -0
  371. package/lib/typescript/module/toast/ToastHost.d.ts +6 -0
  372. package/lib/typescript/module/toast/ToastHost.d.ts.map +1 -0
  373. package/lib/typescript/module/toast/ToastHost.native.d.ts +6 -0
  374. package/lib/typescript/module/toast/ToastHost.native.d.ts.map +1 -0
  375. package/lib/typescript/module/toast/ToastIcon.d.ts +9 -0
  376. package/lib/typescript/module/toast/ToastIcon.d.ts.map +1 -0
  377. package/lib/typescript/module/toast/ToastRow.d.ts +80 -0
  378. package/lib/typescript/module/toast/ToastRow.d.ts.map +1 -0
  379. package/lib/typescript/module/toast/ToastSwipeHandler.d.ts +30 -0
  380. package/lib/typescript/module/toast/ToastSwipeHandler.d.ts.map +1 -0
  381. package/lib/typescript/module/toast/Toaster.d.ts +19 -0
  382. package/lib/typescript/module/toast/Toaster.d.ts.map +1 -0
  383. package/lib/typescript/module/toast/animations.d.ts +62 -0
  384. package/lib/typescript/module/toast/animations.d.ts.map +1 -0
  385. package/lib/typescript/module/toast/constants.d.ts +39 -0
  386. package/lib/typescript/module/toast/constants.d.ts.map +1 -0
  387. package/lib/typescript/module/toast/context.d.ts +19 -0
  388. package/lib/typescript/module/toast/context.d.ts.map +1 -0
  389. package/lib/typescript/module/toast/index.d.ts +23 -76
  390. package/lib/typescript/module/toast/index.d.ts.map +1 -1
  391. package/lib/typescript/module/toast/position-utils.d.ts +30 -0
  392. package/lib/typescript/module/toast/position-utils.d.ts.map +1 -0
  393. package/lib/typescript/module/toast/positioner-utils.d.ts +72 -0
  394. package/lib/typescript/module/toast/positioner-utils.d.ts.map +1 -0
  395. package/lib/typescript/module/toast/toast-comparator.d.ts +12 -0
  396. package/lib/typescript/module/toast/toast-comparator.d.ts.map +1 -0
  397. package/lib/typescript/module/toast/toast-fns.d.ts +3 -0
  398. package/lib/typescript/module/toast/toast-fns.d.ts.map +1 -0
  399. package/lib/typescript/module/toast/toast-store.d.ts +52 -0
  400. package/lib/typescript/module/toast/toast-store.d.ts.map +1 -0
  401. package/lib/typescript/module/toast/toast-timers.d.ts +24 -0
  402. package/lib/typescript/module/toast/toast-timers.d.ts.map +1 -0
  403. package/lib/typescript/module/toast/types.d.ts +222 -5
  404. package/lib/typescript/module/toast/types.d.ts.map +1 -1
  405. package/lib/typescript/module/toast/use-animated-target.d.ts +7 -0
  406. package/lib/typescript/module/toast/use-animated-target.d.ts.map +1 -0
  407. package/lib/typescript/module/toast/use-app-state.d.ts +18 -0
  408. package/lib/typescript/module/toast/use-app-state.d.ts.map +1 -0
  409. package/lib/typescript/module/toast/use-toast-colors.d.ts +22 -0
  410. package/lib/typescript/module/toast/use-toast-colors.d.ts.map +1 -0
  411. package/lib/typescript/module/toast/use-toast-position.d.ts +37 -0
  412. package/lib/typescript/module/toast/use-toast-position.d.ts.map +1 -0
  413. package/lib/typescript/module/tooltip/index.web.d.ts.map +1 -1
  414. package/lib/typescript/module/zoomable-image-gallery/ZoomableImageGallery.d.ts.map +1 -1
  415. package/package.json +63 -25
  416. package/src/__tests__/TabBar.test.tsx +342 -0
  417. package/src/__tests__/TabBarReanimatedDeps.test.ts +130 -0
  418. package/src/__tests__/TabBarWebFork.test.ts +197 -0
  419. package/src/__tests__/ToastContent.test.tsx +192 -0
  420. package/src/__tests__/ToastHostWebFork.test.ts +155 -0
  421. package/src/__tests__/Toaster.test.tsx +527 -0
  422. package/src/__tests__/animated-style-deps.test.ts +156 -0
  423. package/src/__tests__/toast-animations.test.ts +98 -0
  424. package/src/__tests__/toast-comparator.test.ts +131 -0
  425. package/src/__tests__/toast-enter-driver.test.ts +147 -0
  426. package/src/__tests__/toast-fns.test.ts +240 -0
  427. package/src/__tests__/toast-position-utils.test.ts +259 -0
  428. package/src/__tests__/toast-positioner-utils.test.ts +214 -0
  429. package/src/__tests__/toast-store.test.ts +622 -0
  430. package/src/__tests__/toast-timers.test.ts +163 -0
  431. package/src/__tests__/use-animated-target.test.tsx +60 -0
  432. package/src/__tests__/use-app-state.test.tsx +127 -0
  433. package/src/__tests__/use-toast-colors.test.tsx +189 -0
  434. package/src/__tests__/web-position-fixed.test.ts +70 -0
  435. package/src/avatar-group/AvatarGroup.web.tsx +2 -1
  436. package/src/bottom-sheet/index.web.tsx +3 -2
  437. package/src/context-menu/index.web.tsx +3 -2
  438. package/src/dialog/Dialog.web.tsx +4 -3
  439. package/src/index.ts +4 -1
  440. package/src/index.web.ts +4 -1
  441. package/src/menu/index.web.tsx +2 -1
  442. package/src/popover/index.web.tsx +3 -2
  443. package/src/portal/index.tsx +4 -1
  444. package/src/progressive-blur/index.tsx +78 -0
  445. package/src/progressive-blur/index.web.tsx +65 -0
  446. package/src/progressive-blur/shared.ts +81 -0
  447. package/src/progressive-blur/types.ts +21 -0
  448. package/src/select/index.web.tsx +2 -1
  449. package/src/styles/web-view-style.ts +21 -0
  450. package/src/tab-bar/TabBar.stories.tsx +217 -0
  451. package/src/tab-bar/TabBarBase.tsx +517 -0
  452. package/src/tab-bar/expo-router/RouterTabBar.tsx +80 -0
  453. package/src/tab-bar/expo-router/fading-tab-screen.tsx +109 -0
  454. package/src/tab-bar/expo-router/index.ts +13 -0
  455. package/src/tab-bar/glyph.native.tsx +46 -0
  456. package/src/tab-bar/glyph.tsx +31 -0
  457. package/src/tab-bar/index.ts +32 -0
  458. package/src/tab-bar/index.web.tsx +34 -0
  459. package/src/tab-bar/minimize-context.tsx +117 -0
  460. package/src/tab-bar/shared.ts +159 -0
  461. package/src/tab-bar/surface.native.tsx +60 -0
  462. package/src/tab-bar/surface.tsx +47 -0
  463. package/src/tab-bar/surface.web.tsx +56 -0
  464. package/src/tab-bar/types.ts +88 -0
  465. package/src/toast/Positioner.tsx +121 -0
  466. package/src/toast/Toast.stories.tsx +292 -65
  467. package/src/toast/ToastContent.tsx +405 -0
  468. package/src/toast/ToastHost.native.tsx +31 -0
  469. package/src/toast/ToastHost.tsx +67 -0
  470. package/src/toast/ToastIcon.tsx +55 -0
  471. package/src/toast/ToastRow.tsx +485 -0
  472. package/src/toast/ToastSwipeHandler.tsx +222 -0
  473. package/src/toast/Toaster.tsx +259 -0
  474. package/src/toast/animations.ts +313 -0
  475. package/src/toast/constants.ts +76 -0
  476. package/src/toast/context.tsx +44 -0
  477. package/src/toast/index.tsx +47 -123
  478. package/src/toast/position-utils.ts +149 -0
  479. package/src/toast/positioner-utils.ts +142 -0
  480. package/src/toast/toast-comparator.ts +41 -0
  481. package/src/toast/toast-fns.ts +104 -0
  482. package/src/toast/toast-store.ts +432 -0
  483. package/src/toast/toast-timers.ts +124 -0
  484. package/src/toast/types.ts +301 -5
  485. package/src/toast/use-animated-target.ts +61 -0
  486. package/src/toast/use-app-state.ts +77 -0
  487. package/src/toast/use-toast-colors.ts +133 -0
  488. package/src/toast/use-toast-position.ts +46 -0
  489. package/src/tooltip/index.web.tsx +2 -1
  490. package/src/zoomable-image-gallery/ZoomableImageGallery.stories.tsx +134 -0
  491. package/src/zoomable-image-gallery/ZoomableImageGallery.tsx +50 -27
  492. package/lib/commonjs/toast/Toast.js +0 -267
  493. package/lib/commonjs/toast/Toast.js.map +0 -1
  494. package/lib/commonjs/toast/const.js +0 -8
  495. package/lib/commonjs/toast/const.js.map +0 -1
  496. package/lib/commonjs/toast/index.web.js +0 -114
  497. package/lib/commonjs/toast/index.web.js.map +0 -1
  498. package/lib/commonjs/toast/sonner/index.js +0 -9
  499. package/lib/commonjs/toast/sonner/index.js.map +0 -1
  500. package/lib/commonjs/toast/sonner/index.web.js +0 -9
  501. package/lib/commonjs/toast/sonner/index.web.js.map +0 -1
  502. package/lib/module/toast/Toast.js +0 -258
  503. package/lib/module/toast/Toast.js.map +0 -1
  504. package/lib/module/toast/const.js +0 -4
  505. package/lib/module/toast/const.js.map +0 -1
  506. package/lib/module/toast/index.web.js +0 -74
  507. package/lib/module/toast/index.web.js.map +0 -1
  508. package/lib/module/toast/sonner/index.js +0 -5
  509. package/lib/module/toast/sonner/index.js.map +0 -1
  510. package/lib/module/toast/sonner/index.web.js +0 -5
  511. package/lib/module/toast/sonner/index.web.js.map +0 -1
  512. package/lib/typescript/commonjs/toast/Toast.d.ts +0 -23
  513. package/lib/typescript/commonjs/toast/Toast.d.ts.map +0 -1
  514. package/lib/typescript/commonjs/toast/const.d.ts +0 -2
  515. package/lib/typescript/commonjs/toast/const.d.ts.map +0 -1
  516. package/lib/typescript/commonjs/toast/index.web.d.ts +0 -29
  517. package/lib/typescript/commonjs/toast/index.web.d.ts.map +0 -1
  518. package/lib/typescript/commonjs/toast/sonner/index.d.ts +0 -2
  519. package/lib/typescript/commonjs/toast/sonner/index.d.ts.map +0 -1
  520. package/lib/typescript/commonjs/toast/sonner/index.web.d.ts +0 -2
  521. package/lib/typescript/commonjs/toast/sonner/index.web.d.ts.map +0 -1
  522. package/lib/typescript/module/toast/Toast.d.ts +0 -23
  523. package/lib/typescript/module/toast/Toast.d.ts.map +0 -1
  524. package/lib/typescript/module/toast/const.d.ts +0 -2
  525. package/lib/typescript/module/toast/const.d.ts.map +0 -1
  526. package/lib/typescript/module/toast/index.web.d.ts +0 -29
  527. package/lib/typescript/module/toast/index.web.d.ts.map +0 -1
  528. package/lib/typescript/module/toast/sonner/index.d.ts +0 -2
  529. package/lib/typescript/module/toast/sonner/index.d.ts.map +0 -1
  530. package/lib/typescript/module/toast/sonner/index.web.d.ts +0 -2
  531. package/lib/typescript/module/toast/sonner/index.web.d.ts.map +0 -1
  532. package/src/toast/Toast.tsx +0 -269
  533. package/src/toast/const.ts +0 -1
  534. package/src/toast/index.web.tsx +0 -101
  535. package/src/toast/sonner/index.ts +0 -3
  536. package/src/toast/sonner/index.web.ts +0 -3
@@ -0,0 +1,134 @@
1
+ import React from 'react';
2
+ import { Image, Pressable, View } from 'react-native';
3
+ import type { Meta, StoryObj } from '@storybook/react-vite';
4
+
5
+ import { ZoomableImageGallery } from './ZoomableImageGallery';
6
+ import type {
7
+ GalleryImage,
8
+ MeasuredRect,
9
+ ZoomableImageGalleryHandle,
10
+ ZoomableImageGalleryProps,
11
+ } from './types';
12
+
13
+ /**
14
+ * There was no story for this component, which is exactly why its four frozen
15
+ * web mappers (`useAnimatedStyle` with no dependency array — see the CRITICAL note
16
+ * in `ZoomableImageGallery.tsx`) were found by static analysis instead of by the
17
+ * web gate. These stories make the animated paths observable in a browser:
18
+ *
19
+ * - **open**: the tapped thumbnail flies to the fitted centre and the backdrop fades in
20
+ * - **drag to dismiss**: dragging the open image follows the pointer, fades, and snaps
21
+ * back or closes
22
+ * - **zoom**: pinch, or double-tap, then pan the zoomed image
23
+ *
24
+ * All three are driven by shared values read inside those mappers, so if a
25
+ * dependency array is ever dropped again these stories freeze visibly.
26
+ */
27
+ const meta: Meta = {
28
+ title: 'Components/ZoomableImageGallery',
29
+ };
30
+
31
+ export default meta;
32
+
33
+ type Story = StoryObj;
34
+
35
+ const FOREST: GalleryImage = {
36
+ uri: 'https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=1200',
37
+ alt: 'Sunlight through a forest canopy',
38
+ aspectRatio: 1.5,
39
+ };
40
+
41
+ const RIDGE: GalleryImage = {
42
+ uri: 'https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?w=1200',
43
+ alt: 'A mountain ridge above the clouds',
44
+ aspectRatio: 1.5,
45
+ };
46
+
47
+ const VALLEY: GalleryImage = {
48
+ uri: 'https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?w=1200',
49
+ alt: 'Fog rolling through a valley of pines',
50
+ aspectRatio: 1.5,
51
+ };
52
+
53
+ const IMAGES: GalleryImage[] = [FOREST, RIDGE, VALLEY];
54
+
55
+ const THUMB = 96;
56
+
57
+ /**
58
+ * Mirrors how a consumer wires this up: thumbnails measure themselves so the
59
+ * open/close transition can fly to and from the tapped tile.
60
+ */
61
+ function GalleryDemo({
62
+ images,
63
+ ...props
64
+ }: ZoomableImageGalleryProps & { images: GalleryImage[] }) {
65
+ const galleryRef = React.useRef<ZoomableImageGalleryHandle>(null);
66
+ const thumbRefs = React.useRef<Array<View | null>>([]);
67
+
68
+ const measureRect = React.useCallback(
69
+ (index: number) =>
70
+ new Promise<MeasuredRect | null>((resolve) => {
71
+ const node = thumbRefs.current[index];
72
+ if (!node) {
73
+ resolve(null);
74
+ return;
75
+ }
76
+ node.measureInWindow((x, y, width, height) => {
77
+ resolve({ x, y, width, height });
78
+ });
79
+ }),
80
+ [],
81
+ );
82
+
83
+ const openAt = React.useCallback(
84
+ async (index: number) => {
85
+ const rect = await measureRect(index);
86
+ galleryRef.current?.open(images, index, rect ?? undefined);
87
+ },
88
+ [images, measureRect],
89
+ );
90
+
91
+ return (
92
+ <View style={{ gap: 12 }}>
93
+ <View style={{ flexDirection: 'row', gap: 8, flexWrap: 'wrap' }}>
94
+ {images.map((image, index) => (
95
+ <Pressable
96
+ key={image.uri}
97
+ ref={(node) => {
98
+ thumbRefs.current[index] = node;
99
+ }}
100
+ onPress={() => {
101
+ void openAt(index);
102
+ }}
103
+ >
104
+ <Image
105
+ source={{ uri: image.uri }}
106
+ style={{ width: THUMB, height: THUMB, borderRadius: 8 }}
107
+ />
108
+ </Pressable>
109
+ ))}
110
+ </View>
111
+ <ZoomableImageGallery
112
+ ref={galleryRef}
113
+ measureThumb={measureRect}
114
+ {...props}
115
+ />
116
+ </View>
117
+ );
118
+ }
119
+
120
+ export const SingleImage: Story = {
121
+ render: () => <GalleryDemo images={[FOREST]} />,
122
+ };
123
+
124
+ export const MultipleImages: Story = {
125
+ render: () => <GalleryDemo images={IMAGES} />,
126
+ };
127
+
128
+ export const ThumbnailIndicator: Story = {
129
+ render: () => <GalleryDemo images={IMAGES} indicatorVariant="thumbnails" />,
130
+ };
131
+
132
+ export const SquareCorners: Story = {
133
+ render: () => <GalleryDemo images={IMAGES} cornerRadius={0} />,
134
+ };
@@ -36,6 +36,7 @@ import {
36
36
  ArrowOutOfBox_Stroke2_Corner0_Rounded,
37
37
  } from '../icons';
38
38
  import { Z_INDEX } from '../styles/z-index';
39
+ import { WEB_POSITION_FIXED } from '../styles/web-view-style';
39
40
  import {
40
41
  getAspectRatio,
41
42
  fetchAspectRatio,
@@ -475,36 +476,57 @@ const ZoomableImageGalleryInner = React.forwardRef<ZoomableImageGalleryHandle, Z
475
476
  [handleDismiss, isOpen, isZoomed, SCREEN_HEIGHT, opacity, scale, startScale, startX, startY, translateX, translateY]
476
477
  );
477
478
 
478
- const backdropStyle = useAnimatedStyle(() => ({ opacity: opacity.value }));
479
+ // CRITICAL every shared value a mapper READS must be listed in its dependency
480
+ // array. On web WITHOUT the react-native-worklets babel plugin (what every Oxy
481
+ // RN-Web app ships), reanimated cannot auto-detect the reads, so it drives the
482
+ // mapper off the deps array instead: with none, each mapper runs ONCE and
483
+ // freezes at the opening frame while the shared values animate underneath it.
484
+ // That froze the open animation, the drag-to-dismiss follow and the pinch/
485
+ // double-tap zoom on web. Native (plugin present) auto-tracks and ignores the
486
+ // extra deps, so listing them is correct on both platforms. Same rule as
487
+ // `bottom-sheet/BottomSheetBase.tsx`. Do NOT strip these.
488
+ const backdropStyle = useAnimatedStyle(
489
+ () => ({ opacity: opacity.value }),
490
+ [opacity],
491
+ );
479
492
 
480
493
  // The single open-image animates from origin → fitted center.
481
- const openImageStyle = useAnimatedStyle(() => ({
482
- transform: [
483
- { translateX: translateX.value },
484
- { translateY: translateY.value },
485
- { scale: scale.value },
486
- ],
487
- }));
494
+ const openImageStyle = useAnimatedStyle(
495
+ () => ({
496
+ transform: [
497
+ { translateX: translateX.value },
498
+ { translateY: translateY.value },
499
+ { scale: scale.value },
500
+ ],
501
+ }),
502
+ [translateX, translateY, scale],
503
+ );
488
504
 
489
505
  // While dragging to dismiss, the whole pager follows the finger + fades.
490
- const pagerContainerStyle = useAnimatedStyle(() => ({
491
- opacity: opacity.value,
492
- transform: [
493
- { translateX: translateX.value },
494
- { translateY: translateY.value },
495
- { scale: scale.value },
496
- ],
497
- }));
506
+ const pagerContainerStyle = useAnimatedStyle(
507
+ () => ({
508
+ opacity: opacity.value,
509
+ transform: [
510
+ { translateX: translateX.value },
511
+ { translateY: translateY.value },
512
+ { scale: scale.value },
513
+ ],
514
+ }),
515
+ [opacity, translateX, translateY, scale],
516
+ );
498
517
 
499
518
  // Pinch/double-tap zoom transform, layered on TOP of the active page image's
500
519
  // `fit`-based sizing (composed, never replacing it).
501
- const zoomImageStyle = useAnimatedStyle(() => ({
502
- transform: [
503
- { scale: zoomScale.value },
504
- { translateX: zoomTranslateX.value },
505
- { translateY: zoomTranslateY.value },
506
- ],
507
- }));
520
+ const zoomImageStyle = useAnimatedStyle(
521
+ () => ({
522
+ transform: [
523
+ { scale: zoomScale.value },
524
+ { translateX: zoomTranslateX.value },
525
+ { translateY: zoomTranslateY.value },
526
+ ],
527
+ }),
528
+ [zoomScale, zoomTranslateX, zoomTranslateY],
529
+ );
508
530
 
509
531
  // Derive the current page from the scroll offset, clamp into range, and update
510
532
  // `activeIndex` only when it actually changes (drives the live indicator + the
@@ -963,10 +985,11 @@ const styles = StyleSheet.create({
963
985
  alignItems: 'center',
964
986
  ...Platform.select({
965
987
  web: {
966
- // Full-screen fixed overlay (web). Mirrors Bloom's Portal/Dialog.web
967
- // `position: 'fixed' as 'absolute'` pattern; the fullscreen z-index
968
- // token keeps the viewer above the app chrome.
969
- position: 'fixed' as 'absolute',
988
+ // Full-screen fixed overlay (web), like Bloom's Portal and Dialog.web.
989
+ // Only ever applied on web (this is the `web` arm of Platform.select),
990
+ // so `WEB_POSITION_FIXED` is honest here; the fullscreen z-index token
991
+ // keeps the viewer above the app chrome.
992
+ position: WEB_POSITION_FIXED,
970
993
  top: 0,
971
994
  left: 0,
972
995
  right: 0,
@@ -1,267 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.Action = Action;
7
- exports.Icon = Icon;
8
- exports.Outer = Outer;
9
- exports.Text = Text;
10
- exports.ToastConfigProvider = ToastConfigProvider;
11
- var _react = _interopRequireWildcard(require("react"));
12
- var _reactNative = require("react-native");
13
- var _useTheme = require("../theme/use-theme.js");
14
- var _useInteractionState = require("../hooks/useInteractionState.js");
15
- var _shadows = require("../design-tokens/shadows");
16
- var _sonner = require("./sonner");
17
- var _jsxRuntime = require("react/jsx-runtime");
18
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
19
- const ToastConfigContext = /*#__PURE__*/(0, _react.createContext)({
20
- id: '',
21
- type: 'default'
22
- });
23
- ToastConfigContext.displayName = 'ToastConfigContext';
24
- function ToastConfigProvider({
25
- children,
26
- id,
27
- type
28
- }) {
29
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(ToastConfigContext.Provider, {
30
- value: (0, _react.useMemo)(() => ({
31
- id,
32
- type
33
- }), [id, type]),
34
- children: children
35
- });
36
- }
37
- function Outer({
38
- children
39
- }) {
40
- const {
41
- colors
42
- } = (0, _useTheme.useTheme)();
43
- const {
44
- type
45
- } = (0, _react.useContext)(ToastConfigContext);
46
- const toastColors = useToastColors({
47
- type,
48
- colors
49
- });
50
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
51
- style: [styles.outer, {
52
- backgroundColor: toastColors.backgroundColor,
53
- borderColor: toastColors.borderColor
54
- }],
55
- children: children
56
- });
57
- }
58
- function Icon({
59
- icon
60
- }) {
61
- const {
62
- colors
63
- } = (0, _useTheme.useTheme)();
64
- const {
65
- type
66
- } = (0, _react.useContext)(ToastConfigContext);
67
- const toastColors = useToastColors({
68
- type,
69
- colors
70
- });
71
- if (!icon) {
72
- return null;
73
- }
74
- if (/*#__PURE__*/_react.default.isValidElement(icon)) {
75
- return /*#__PURE__*/_react.default.cloneElement(icon, {
76
- color: toastColors.iconColor
77
- });
78
- }
79
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
80
- children: icon
81
- });
82
- }
83
- function Text({
84
- children
85
- }) {
86
- const {
87
- colors
88
- } = (0, _useTheme.useTheme)();
89
- const {
90
- type
91
- } = (0, _react.useContext)(ToastConfigContext);
92
- const toastColors = useToastColors({
93
- type,
94
- colors
95
- });
96
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
97
- style: styles.textContainer,
98
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
99
- selectable: false,
100
- style: [styles.text, {
101
- color: toastColors.textColor
102
- }],
103
- children: children
104
- })
105
- });
106
- }
107
- function Action({
108
- children,
109
- onPress,
110
- ...rest
111
- }) {
112
- const {
113
- colors
114
- } = (0, _useTheme.useTheme)();
115
- const {
116
- type,
117
- id
118
- } = (0, _react.useContext)(ToastConfigContext);
119
- const actionColors = useActionColors({
120
- type,
121
- colors
122
- });
123
- // Drive the pressed visual via state, not Pressable's function-form `style`
124
- // / function-children, which NativeWind v4's css-interop swallows (dropping
125
- // the base button style: padding, radius, alignSelf).
126
- const {
127
- state: pressed,
128
- onIn: onPressIn,
129
- onOut: onPressOut
130
- } = (0, _useInteractionState.useInteractionState)();
131
- const handlePress = e => {
132
- (0, _sonner.dismiss)(id);
133
- onPress?.(e);
134
- };
135
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
136
- ...rest,
137
- onPress: handlePress,
138
- onPressIn: onPressIn,
139
- onPressOut: onPressOut,
140
- style: [styles.actionButton, {
141
- backgroundColor: pressed ? actionColors.interacted.backgroundColor : actionColors.base.backgroundColor
142
- }],
143
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
144
- style: [styles.actionText, {
145
- color: pressed ? actionColors.interacted.textColor : actionColors.base.textColor
146
- }],
147
- children: children
148
- })
149
- });
150
- }
151
- function useToastColors({
152
- type,
153
- colors
154
- }) {
155
- return (0, _react.useMemo)(() => {
156
- const colorMap = {
157
- default: {
158
- backgroundColor: colors.backgroundSecondary,
159
- borderColor: colors.border,
160
- iconColor: colors.text,
161
- textColor: colors.text
162
- },
163
- success: {
164
- backgroundColor: colors.primarySubtle,
165
- borderColor: colors.primary,
166
- iconColor: colors.primarySubtleForeground,
167
- textColor: colors.primarySubtleForeground
168
- },
169
- error: {
170
- backgroundColor: colors.negativeSubtle,
171
- borderColor: colors.negative,
172
- iconColor: colors.negativeSubtleForeground,
173
- textColor: colors.negativeSubtleForeground
174
- },
175
- warning: {
176
- backgroundColor: colors.backgroundSecondary,
177
- borderColor: colors.border,
178
- iconColor: colors.warning,
179
- textColor: colors.text
180
- },
181
- info: {
182
- backgroundColor: colors.backgroundSecondary,
183
- borderColor: colors.border,
184
- iconColor: colors.info,
185
- textColor: colors.text
186
- }
187
- };
188
- return colorMap[type];
189
- }, [type, colors]);
190
- }
191
- function useActionColors({
192
- type,
193
- colors
194
- }) {
195
- return (0, _react.useMemo)(() => {
196
- const base = {
197
- base: {
198
- textColor: colors.textSecondary,
199
- backgroundColor: colors.backgroundTertiary
200
- },
201
- interacted: {
202
- textColor: colors.text,
203
- backgroundColor: colors.contrast50
204
- }
205
- };
206
- const colorMap = {
207
- default: base,
208
- warning: base,
209
- info: base,
210
- success: {
211
- base: {
212
- textColor: colors.primarySubtleForeground,
213
- backgroundColor: colors.primarySubtle
214
- },
215
- interacted: {
216
- textColor: colors.primaryDark,
217
- backgroundColor: colors.primaryLight
218
- }
219
- },
220
- error: {
221
- base: {
222
- textColor: colors.negativeSubtleForeground,
223
- backgroundColor: colors.negativeSubtle
224
- },
225
- interacted: {
226
- textColor: colors.negativeForeground,
227
- backgroundColor: colors.negative
228
- }
229
- }
230
- };
231
- return colorMap[type];
232
- }, [type, colors]);
233
- }
234
- const styles = _reactNative.StyleSheet.create({
235
- outer: {
236
- flex: 1,
237
- padding: 16,
238
- borderRadius: 8,
239
- borderWidth: 1,
240
- flexDirection: 'row',
241
- gap: 8,
242
- paddingVertical: 14,
243
- // Subtle raise (`shadow-s`) — `boxShadow` on web, RN shadow/elevation on native.
244
- ...(0, _shadows.bloomShadowStyle)('s')
245
- },
246
- textContainer: {
247
- flex: 1,
248
- paddingRight: 16
249
- },
250
- text: {
251
- fontSize: 15,
252
- fontWeight: '500',
253
- lineHeight: 20
254
- },
255
- actionButton: {
256
- paddingVertical: 5,
257
- paddingHorizontal: 9,
258
- borderRadius: 6,
259
- alignSelf: 'center'
260
- },
261
- actionText: {
262
- fontSize: 15,
263
- fontWeight: '500',
264
- lineHeight: 20
265
- }
266
- });
267
- //# sourceMappingURL=Toast.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_useTheme","_useInteractionState","_shadows","_sonner","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ToastConfigContext","createContext","id","type","displayName","ToastConfigProvider","children","jsx","Provider","value","useMemo","Outer","colors","useTheme","useContext","toastColors","useToastColors","View","style","styles","outer","backgroundColor","borderColor","Icon","icon","React","isValidElement","cloneElement","color","iconColor","Fragment","Text","textContainer","selectable","text","textColor","Action","onPress","rest","actionColors","useActionColors","state","pressed","onIn","onPressIn","onOut","onPressOut","useInteractionState","handlePress","dismiss","Pressable","actionButton","interacted","base","actionText","colorMap","backgroundSecondary","border","success","primarySubtle","primary","primarySubtleForeground","error","negativeSubtle","negative","negativeSubtleForeground","warning","info","textSecondary","backgroundTertiary","contrast50","primaryDark","primaryLight","negativeForeground","StyleSheet","create","flex","padding","borderRadius","borderWidth","flexDirection","gap","paddingVertical","bloomShadowStyle","paddingRight","fontSize","fontWeight","lineHeight","paddingHorizontal","alignSelf"],"sourceRoot":"../../../src","sources":["toast/Toast.tsx"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAEA,IAAAK,OAAA,GAAAL,OAAA;AAAmC,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,u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AC4D;QAC1B;MACF,CAAC;MACDV,KAAK,EAAE;QACLT,IAAI,EAAE;UACJlB,SAAS,EAAEvB,MAAM,CAACqD,wBAAwB;UAC1C5C,eAAe,EAAET,MAAM,CAACmD;QAC1B,CAAC;QACDX,UAAU,EAAE;UACVjB,SAAS,EAAEvB,MAAM,CAAC6D,kBAAkB;UACpCpD,eAAe,EAAET,MAAM,CAACoD;QAC1B;MACF;IACF,CAAC;IAED,OAAOT,QAAQ,CAACpD,IAAI,CAAC;EACvB,CAAC,EAAE,CAACA,IAAI,EAAES,MAAM,CAAC,CAAC;AACpB;AAEA,MAAMO,MAAM,GAAGuD,uBAAU,CAACC,MAAM,CAAC;EAC/BvD,KAAK,EAAE;IACLwD,IAAI,EAAE,CAAC;IACPC,OAAO,EAAE,EAAE;IACXC,YAAY,EAAE,CAAC;IACfC,WAAW,EAAE,CAAC;IACdC,aAAa,EAAE,KAAK;IACpBC,GAAG,EAAE,CAAC;IACNC,eAAe,EAAE,EAAE;IACnB;IACA,GAAG,IAAAC,yBAAgB,EAAC,GAAG;EACzB,CAAC;EACDnD,aAAa,EAAE;IACb4C,IAAI,EAAE,CAAC;IACPQ,YAAY,EAAE;EAChB,CAAC;EACDlD,IAAI,EAAE;IACJmD,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE;EACd,CAAC;EACDpC,YAAY,EAAE;IACZ+B,eAAe,EAAE,CAAC;IAClBM,iBAAiB,EAAE,CAAC;IACpBV,YAAY,EAAE,CAAC;IACfW,SAAS,EAAE;EACb,CAAC;EACDnC,UAAU,EAAE;IACV+B,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,8 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DURATION = void 0;
7
- const DURATION = exports.DURATION = 3e3;
8
- //# sourceMappingURL=const.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["DURATION","exports"],"sourceRoot":"../../../src","sources":["toast/const.ts"],"mappings":";;;;;;AAAO,MAAMA,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG,GAAG","ignoreList":[]}
@@ -1,114 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "Action", {
7
- enumerable: true,
8
- get: function () {
9
- return _Toast.Action;
10
- }
11
- });
12
- Object.defineProperty(exports, "DURATION", {
13
- enumerable: true,
14
- get: function () {
15
- return _const.DURATION;
16
- }
17
- });
18
- Object.defineProperty(exports, "Icon", {
19
- enumerable: true,
20
- get: function () {
21
- return _Toast.Icon;
22
- }
23
- });
24
- Object.defineProperty(exports, "Outer", {
25
- enumerable: true,
26
- get: function () {
27
- return _Toast.Outer;
28
- }
29
- });
30
- Object.defineProperty(exports, "Text", {
31
- enumerable: true,
32
- get: function () {
33
- return _Toast.Text;
34
- }
35
- });
36
- Object.defineProperty(exports, "ToastConfigProvider", {
37
- enumerable: true,
38
- get: function () {
39
- return _Toast.ToastConfigProvider;
40
- }
41
- });
42
- exports.ToastOutlet = ToastOutlet;
43
- exports.toast = exports.show = exports.api = void 0;
44
- var _react = _interopRequireWildcard(require("react"));
45
- var _nonSecure = require("nanoid/non-secure");
46
- var _sonner = require("sonner");
47
- var _const = require("./const.js");
48
- var _Toast = require("./Toast.js");
49
- var _jsxRuntime = require("react/jsx-runtime");
50
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
51
- /**
52
- * Toasts are rendered in a global outlet, which is placed at the top of the
53
- * component tree.
54
- */
55
- function ToastOutlet() {
56
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sonner.Toaster, {
57
- position: "bottom-left",
58
- gap: 8,
59
- offset: 20,
60
- mobileOffset: 20
61
- });
62
- }
63
-
64
- /** Direct access to the underlying Sonner API. Use sparingly. */
65
- const api = exports.api = _sonner.toast;
66
- function dispatch(content, type, options = {}) {
67
- const id = (0, _nonSecure.nanoid)();
68
- if (typeof content === 'string') {
69
- (0, _sonner.toast)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Toast.ToastConfigProvider, {
70
- id: id,
71
- type: type,
72
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Toast.Outer, {
73
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Toast.Icon, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Toast.Text, {
74
- children: content
75
- })]
76
- })
77
- }), {
78
- ...options,
79
- unstyled: true,
80
- id,
81
- duration: options?.duration ?? _const.DURATION
82
- });
83
- } else if (/*#__PURE__*/(0, _react.isValidElement)(content)) {
84
- (0, _sonner.toast)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Toast.ToastConfigProvider, {
85
- id: id,
86
- type: type,
87
- children: content
88
- }), {
89
- ...options,
90
- unstyled: true,
91
- id,
92
- duration: options?.duration ?? _const.DURATION
93
- });
94
- } else {
95
- throw new Error(`Toast can be a string or a React element, got ${typeof content}`);
96
- }
97
- }
98
-
99
- /**
100
- * Show a toast notification. Identical API to the native variant — see
101
- * `./index.tsx` for the full usage docs.
102
- */
103
-
104
- const toastImpl = (content, options = {}) => {
105
- dispatch(content, options.type ?? 'default', options);
106
- };
107
- toastImpl.success = (content, options) => dispatch(content, 'success', options ?? {});
108
- toastImpl.error = (content, options) => dispatch(content, 'error', options ?? {});
109
- toastImpl.warning = (content, options) => dispatch(content, 'warning', options ?? {});
110
- toastImpl.info = (content, options) => dispatch(content, 'info', options ?? {});
111
- toastImpl.dismiss = id => _sonner.toast.dismiss(id);
112
- const toast = exports.toast = toastImpl;
113
- const show = exports.show = toastImpl;
114
- //# sourceMappingURL=index.web.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_nonSecure","_sonner","_const","_Toast","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ToastOutlet","jsx","Toaster","position","gap","offset","mobileOffset","api","exports","sonner","dispatch","content","type","options","id","nanoid","ToastConfigProvider","children","jsxs","Outer","Icon","Text","unstyled","duration","DURATION","isValidElement","Error","toastImpl","success","error","warning","info","dismiss","toast","show"],"sourceRoot":"../../../src","sources":["toast/index.web.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAKiB,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAD,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,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O,IAAI,CAAC,CAAC,CAAC;AACjFc,SAAS,CAACG,OAAO,GAAG,CAACnB,OAAO,EAAEE,OAAO,KAAKH,QAAQ,CAACC,OAAO,EAAE,SAAS,EAAEE,OAAO,IAAI,CAAC,CAAC,CAAC;AACrFc,SAAS,CAACI,IAAI,GAAG,CAACpB,OAAO,EAAEE,OAAO,KAAKH,QAAQ,CAACC,OAAO,EAAE,MAAM,EAAEE,OAAO,IAAI,CAAC,CAAC,CAAC;AAC/Ec,SAAS,CAACK,OAAO,GAAIlB,EAAE,IAAKL,aAAM,CAACuB,OAAO,CAAClB,EAAE,CAAC;AAEvC,MAAMmB,KAAc,GAAAzB,OAAA,CAAAyB,KAAA,GAAGN,SAAS;AAChC,MAAMO,IAAa,GAAA1B,OAAA,CAAA0B,IAAA,GAAGP,SAAS","ignoreList":[]}
@@ -1,9 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.dismiss = void 0;
7
- var _sonnerNative = require("sonner-native");
8
- const dismiss = exports.dismiss = _sonnerNative.toast.dismiss;
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_sonnerNative","require","dismiss","exports","toast"],"sourceRoot":"../../../../src","sources":["toast/sonner/index.ts"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAEO,MAAMC,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAGE,mBAAK,CAACF,OAAO","ignoreList":[]}