@oxyhq/bloom 0.4.0 → 0.5.1

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 (275) hide show
  1. package/README.md +105 -90
  2. package/lib/commonjs/bottom-sheet/index.js +2 -2
  3. package/lib/commonjs/context-menu/index.js +18 -19
  4. package/lib/commonjs/context-menu/index.js.map +1 -1
  5. package/lib/commonjs/dialog/BloomDialogProvider.js +61 -0
  6. package/lib/commonjs/dialog/BloomDialogProvider.js.map +1 -0
  7. package/lib/commonjs/dialog/BloomDialogProvider.web.js +45 -0
  8. package/lib/commonjs/dialog/BloomDialogProvider.web.js.map +1 -0
  9. package/lib/commonjs/dialog/Dialog.js +197 -100
  10. package/lib/commonjs/dialog/Dialog.js.map +1 -1
  11. package/lib/commonjs/dialog/Dialog.web.js +194 -84
  12. package/lib/commonjs/dialog/Dialog.web.js.map +1 -1
  13. package/lib/commonjs/dialog/SheetShell.js +149 -0
  14. package/lib/commonjs/dialog/SheetShell.js.map +1 -0
  15. package/lib/commonjs/dialog/alert-store.js +116 -0
  16. package/lib/commonjs/dialog/alert-store.js.map +1 -0
  17. package/lib/commonjs/dialog/alert.js +38 -0
  18. package/lib/commonjs/dialog/alert.js.map +1 -0
  19. package/lib/commonjs/dialog/context.js +10 -2
  20. package/lib/commonjs/dialog/context.js.map +1 -1
  21. package/lib/commonjs/dialog/index.js +8 -24
  22. package/lib/commonjs/dialog/index.js.map +1 -1
  23. package/lib/commonjs/dialog/index.web.js +10 -20
  24. package/lib/commonjs/dialog/index.web.js.map +1 -1
  25. package/lib/commonjs/fonts/FontLoader.js +6 -5
  26. package/lib/commonjs/fonts/FontLoader.js.map +1 -1
  27. package/lib/commonjs/fonts/apply-font-faces.js +4 -4
  28. package/lib/commonjs/fonts/apply-font-faces.web.js +13 -12
  29. package/lib/commonjs/fonts/apply-font-faces.web.js.map +1 -1
  30. package/lib/commonjs/fonts/font-assets.js +2 -2
  31. package/lib/commonjs/fonts/font-data.web.js +22 -0
  32. package/lib/commonjs/fonts/font-data.web.js.map +1 -0
  33. package/lib/commonjs/index.js +101 -66
  34. package/lib/commonjs/index.js.map +1 -1
  35. package/lib/commonjs/index.web.js +101 -66
  36. package/lib/commonjs/index.web.js.map +1 -1
  37. package/lib/commonjs/menu/index.js +21 -23
  38. package/lib/commonjs/menu/index.js.map +1 -1
  39. package/lib/commonjs/select/index.js +26 -27
  40. package/lib/commonjs/select/index.js.map +1 -1
  41. package/lib/commonjs/toast/index.js +42 -13
  42. package/lib/commonjs/toast/index.js.map +1 -1
  43. package/lib/commonjs/toast/index.web.js +19 -15
  44. package/lib/commonjs/toast/index.web.js.map +1 -1
  45. package/lib/module/bottom-sheet/index.js +2 -2
  46. package/lib/module/context-menu/index.js +15 -16
  47. package/lib/module/context-menu/index.js.map +1 -1
  48. package/lib/module/dialog/BloomDialogProvider.js +57 -0
  49. package/lib/module/dialog/BloomDialogProvider.js.map +1 -0
  50. package/lib/module/dialog/BloomDialogProvider.web.js +41 -0
  51. package/lib/module/dialog/BloomDialogProvider.web.js.map +1 -0
  52. package/lib/module/dialog/Dialog.js +199 -87
  53. package/lib/module/dialog/Dialog.js.map +1 -1
  54. package/lib/module/dialog/Dialog.web.js +195 -70
  55. package/lib/module/dialog/Dialog.web.js.map +1 -1
  56. package/lib/module/dialog/SheetShell.js +143 -0
  57. package/lib/module/dialog/SheetShell.js.map +1 -0
  58. package/lib/module/dialog/alert-store.js +107 -0
  59. package/lib/module/dialog/alert-store.js.map +1 -0
  60. package/lib/module/dialog/alert.js +35 -0
  61. package/lib/module/dialog/alert.js.map +1 -0
  62. package/lib/module/dialog/context.js +10 -2
  63. package/lib/module/dialog/context.js.map +1 -1
  64. package/lib/module/dialog/index.js +3 -1
  65. package/lib/module/dialog/index.js.map +1 -1
  66. package/lib/module/dialog/index.web.js +9 -7
  67. package/lib/module/dialog/index.web.js.map +1 -1
  68. package/lib/module/fonts/FontLoader.js +6 -5
  69. package/lib/module/fonts/FontLoader.js.map +1 -1
  70. package/lib/module/fonts/apply-font-faces.js +4 -4
  71. package/lib/module/fonts/apply-font-faces.web.js +13 -10
  72. package/lib/module/fonts/apply-font-faces.web.js.map +1 -1
  73. package/lib/module/fonts/font-assets.js +2 -2
  74. package/lib/module/fonts/font-data.web.js +18 -0
  75. package/lib/module/fonts/font-data.web.js.map +1 -0
  76. package/lib/module/fonts/index.web.js +4 -4
  77. package/lib/module/index.js +2 -3
  78. package/lib/module/index.js.map +1 -1
  79. package/lib/module/index.web.js +2 -3
  80. package/lib/module/index.web.js.map +1 -1
  81. package/lib/module/menu/index.js +11 -13
  82. package/lib/module/menu/index.js.map +1 -1
  83. package/lib/module/select/index.js +27 -28
  84. package/lib/module/select/index.js.map +1 -1
  85. package/lib/module/toast/index.js +41 -11
  86. package/lib/module/toast/index.js.map +1 -1
  87. package/lib/module/toast/index.web.js +18 -13
  88. package/lib/module/toast/index.web.js.map +1 -1
  89. package/lib/typescript/commonjs/bottom-sheet/index.d.ts +1 -1
  90. package/lib/typescript/commonjs/context-menu/index.d.ts +4 -3
  91. package/lib/typescript/commonjs/context-menu/index.d.ts.map +1 -1
  92. package/lib/typescript/commonjs/dialog/BloomDialogProvider.d.ts +27 -0
  93. package/lib/typescript/commonjs/dialog/BloomDialogProvider.d.ts.map +1 -0
  94. package/lib/typescript/commonjs/dialog/BloomDialogProvider.web.d.ts +15 -0
  95. package/lib/typescript/commonjs/dialog/BloomDialogProvider.web.d.ts.map +1 -0
  96. package/lib/typescript/commonjs/dialog/Dialog.d.ts +37 -10
  97. package/lib/typescript/commonjs/dialog/Dialog.d.ts.map +1 -1
  98. package/lib/typescript/commonjs/dialog/Dialog.web.d.ts +26 -10
  99. package/lib/typescript/commonjs/dialog/Dialog.web.d.ts.map +1 -1
  100. package/lib/typescript/commonjs/dialog/SheetShell.d.ts +31 -0
  101. package/lib/typescript/commonjs/dialog/SheetShell.d.ts.map +1 -0
  102. package/lib/typescript/commonjs/dialog/alert-store.d.ts +70 -0
  103. package/lib/typescript/commonjs/dialog/alert-store.d.ts.map +1 -0
  104. package/lib/typescript/commonjs/dialog/alert.d.ts +27 -0
  105. package/lib/typescript/commonjs/dialog/alert.d.ts.map +1 -0
  106. package/lib/typescript/commonjs/dialog/context.d.ts +7 -0
  107. package/lib/typescript/commonjs/dialog/context.d.ts.map +1 -1
  108. package/lib/typescript/commonjs/dialog/index.d.ts +5 -2
  109. package/lib/typescript/commonjs/dialog/index.d.ts.map +1 -1
  110. package/lib/typescript/commonjs/dialog/index.web.d.ts +5 -2
  111. package/lib/typescript/commonjs/dialog/index.web.d.ts.map +1 -1
  112. package/lib/typescript/commonjs/dialog/types.d.ts +70 -15
  113. package/lib/typescript/commonjs/dialog/types.d.ts.map +1 -1
  114. package/lib/typescript/commonjs/fonts/FontLoader.d.ts.map +1 -1
  115. package/lib/typescript/commonjs/fonts/apply-font-faces.web.d.ts +8 -1
  116. package/lib/typescript/commonjs/fonts/apply-font-faces.web.d.ts.map +1 -1
  117. package/lib/typescript/commonjs/fonts/font-data.web.d.ts +5 -0
  118. package/lib/typescript/commonjs/fonts/font-data.web.d.ts.map +1 -0
  119. package/lib/typescript/commonjs/index.d.ts +3 -3
  120. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  121. package/lib/typescript/commonjs/index.web.d.ts +3 -3
  122. package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/menu/index.d.ts +4 -4
  124. package/lib/typescript/commonjs/menu/index.d.ts.map +1 -1
  125. package/lib/typescript/commonjs/select/index.d.ts.map +1 -1
  126. package/lib/typescript/commonjs/toast/index.d.ts +32 -3
  127. package/lib/typescript/commonjs/toast/index.d.ts.map +1 -1
  128. package/lib/typescript/commonjs/toast/index.web.d.ts +14 -7
  129. package/lib/typescript/commonjs/toast/index.web.d.ts.map +1 -1
  130. package/lib/typescript/module/bottom-sheet/index.d.ts +1 -1
  131. package/lib/typescript/module/context-menu/index.d.ts +4 -3
  132. package/lib/typescript/module/context-menu/index.d.ts.map +1 -1
  133. package/lib/typescript/module/dialog/BloomDialogProvider.d.ts +27 -0
  134. package/lib/typescript/module/dialog/BloomDialogProvider.d.ts.map +1 -0
  135. package/lib/typescript/module/dialog/BloomDialogProvider.web.d.ts +15 -0
  136. package/lib/typescript/module/dialog/BloomDialogProvider.web.d.ts.map +1 -0
  137. package/lib/typescript/module/dialog/Dialog.d.ts +37 -10
  138. package/lib/typescript/module/dialog/Dialog.d.ts.map +1 -1
  139. package/lib/typescript/module/dialog/Dialog.web.d.ts +26 -10
  140. package/lib/typescript/module/dialog/Dialog.web.d.ts.map +1 -1
  141. package/lib/typescript/module/dialog/SheetShell.d.ts +31 -0
  142. package/lib/typescript/module/dialog/SheetShell.d.ts.map +1 -0
  143. package/lib/typescript/module/dialog/alert-store.d.ts +70 -0
  144. package/lib/typescript/module/dialog/alert-store.d.ts.map +1 -0
  145. package/lib/typescript/module/dialog/alert.d.ts +27 -0
  146. package/lib/typescript/module/dialog/alert.d.ts.map +1 -0
  147. package/lib/typescript/module/dialog/context.d.ts +7 -0
  148. package/lib/typescript/module/dialog/context.d.ts.map +1 -1
  149. package/lib/typescript/module/dialog/index.d.ts +5 -2
  150. package/lib/typescript/module/dialog/index.d.ts.map +1 -1
  151. package/lib/typescript/module/dialog/index.web.d.ts +5 -2
  152. package/lib/typescript/module/dialog/index.web.d.ts.map +1 -1
  153. package/lib/typescript/module/dialog/types.d.ts +70 -15
  154. package/lib/typescript/module/dialog/types.d.ts.map +1 -1
  155. package/lib/typescript/module/fonts/FontLoader.d.ts.map +1 -1
  156. package/lib/typescript/module/fonts/apply-font-faces.web.d.ts +8 -1
  157. package/lib/typescript/module/fonts/apply-font-faces.web.d.ts.map +1 -1
  158. package/lib/typescript/module/fonts/font-data.web.d.ts +5 -0
  159. package/lib/typescript/module/fonts/font-data.web.d.ts.map +1 -0
  160. package/lib/typescript/module/index.d.ts +3 -3
  161. package/lib/typescript/module/index.d.ts.map +1 -1
  162. package/lib/typescript/module/index.web.d.ts +3 -3
  163. package/lib/typescript/module/index.web.d.ts.map +1 -1
  164. package/lib/typescript/module/menu/index.d.ts +4 -4
  165. package/lib/typescript/module/menu/index.d.ts.map +1 -1
  166. package/lib/typescript/module/select/index.d.ts.map +1 -1
  167. package/lib/typescript/module/toast/index.d.ts +32 -3
  168. package/lib/typescript/module/toast/index.d.ts.map +1 -1
  169. package/lib/typescript/module/toast/index.web.d.ts +14 -7
  170. package/lib/typescript/module/toast/index.web.d.ts.map +1 -1
  171. package/package.json +38 -18
  172. package/src/__tests__/Dialog.test.tsx +177 -0
  173. package/src/avatar/Avatar.stories.tsx +69 -0
  174. package/src/bottom-sheet/BottomSheet.stories.tsx +92 -0
  175. package/src/bottom-sheet/index.tsx +3 -3
  176. package/src/button/Button.stories.tsx +94 -0
  177. package/src/context-menu/ContextMenu.stories.tsx +71 -0
  178. package/src/context-menu/index.tsx +12 -12
  179. package/src/dialog/BloomDialogProvider.tsx +61 -0
  180. package/src/dialog/BloomDialogProvider.web.tsx +46 -0
  181. package/src/dialog/Dialog.stories.tsx +112 -0
  182. package/src/dialog/Dialog.tsx +217 -64
  183. package/src/dialog/Dialog.web.tsx +240 -75
  184. package/src/dialog/SheetShell.tsx +154 -0
  185. package/src/dialog/alert-store.ts +126 -0
  186. package/src/dialog/alert.ts +42 -0
  187. package/src/dialog/context.ts +14 -3
  188. package/src/dialog/index.ts +14 -2
  189. package/src/dialog/index.web.ts +20 -8
  190. package/src/dialog/types.ts +73 -16
  191. package/src/fonts/FontLoader.tsx +6 -5
  192. package/src/fonts/apply-font-faces.ts +4 -4
  193. package/src/fonts/apply-font-faces.web.ts +18 -10
  194. package/src/fonts/font-assets.ts +2 -2
  195. package/src/fonts/font-data.web.ts +15 -0
  196. package/src/fonts/index.web.ts +4 -4
  197. package/src/index.ts +17 -3
  198. package/src/index.web.ts +17 -3
  199. package/src/loading/Loading.stories.tsx +60 -0
  200. package/src/menu/Menu.stories.tsx +79 -0
  201. package/src/menu/index.tsx +13 -17
  202. package/src/prompt-input/PromptInput.stories.tsx +82 -0
  203. package/src/select/Select.stories.tsx +84 -0
  204. package/src/select/index.tsx +30 -30
  205. package/src/settings-list/SettingsList.stories.tsx +106 -0
  206. package/src/text-field/TextField.stories.tsx +90 -0
  207. package/src/toast/Toast.stories.tsx +109 -0
  208. package/src/toast/index.tsx +55 -11
  209. package/src/toast/index.web.tsx +33 -13
  210. package/lib/commonjs/fonts/assets/BlomusModernus-Bold.woff2 +0 -0
  211. package/lib/commonjs/fonts/assets/BlomusModernus-Regular.woff2 +0 -0
  212. package/lib/commonjs/fonts/assets/GeistMono-Variable.woff2 +0 -0
  213. package/lib/commonjs/fonts/assets/InterVariable.woff2 +0 -0
  214. package/lib/commonjs/prompt/Prompt.js +0 -267
  215. package/lib/commonjs/prompt/Prompt.js.map +0 -1
  216. package/lib/commonjs/prompt/index.js +0 -61
  217. package/lib/commonjs/prompt/index.js.map +0 -1
  218. package/lib/module/fonts/assets/BlomusModernus-Bold.woff2 +0 -0
  219. package/lib/module/fonts/assets/BlomusModernus-Regular.woff2 +0 -0
  220. package/lib/module/fonts/assets/GeistMono-Variable.woff2 +0 -0
  221. package/lib/module/fonts/assets/InterVariable.woff2 +0 -0
  222. package/lib/module/prompt/Prompt.js +0 -250
  223. package/lib/module/prompt/Prompt.js.map +0 -1
  224. package/lib/module/prompt/index.js +0 -4
  225. package/lib/module/prompt/index.js.map +0 -1
  226. package/lib/typescript/commonjs/__tests__/BloomThemeProvider.fonts-web.test.d.ts +0 -5
  227. package/lib/typescript/commonjs/__tests__/BloomThemeProvider.fonts-web.test.d.ts.map +0 -1
  228. package/lib/typescript/commonjs/__tests__/BloomThemeProvider.test.d.ts +0 -2
  229. package/lib/typescript/commonjs/__tests__/BloomThemeProvider.test.d.ts.map +0 -1
  230. package/lib/typescript/commonjs/__tests__/BottomSheet.test.d.ts +0 -2
  231. package/lib/typescript/commonjs/__tests__/BottomSheet.test.d.ts.map +0 -1
  232. package/lib/typescript/commonjs/__tests__/Button.test.d.ts +0 -2
  233. package/lib/typescript/commonjs/__tests__/Button.test.d.ts.map +0 -1
  234. package/lib/typescript/commonjs/__tests__/Code.test.d.ts +0 -2
  235. package/lib/typescript/commonjs/__tests__/Code.test.d.ts.map +0 -1
  236. package/lib/typescript/commonjs/__tests__/FontLoader.native.test.d.ts +0 -2
  237. package/lib/typescript/commonjs/__tests__/FontLoader.native.test.d.ts.map +0 -1
  238. package/lib/typescript/commonjs/__tests__/Pre.test.d.ts +0 -2
  239. package/lib/typescript/commonjs/__tests__/Pre.test.d.ts.map +0 -1
  240. package/lib/typescript/commonjs/__tests__/SettingsList.test.d.ts +0 -2
  241. package/lib/typescript/commonjs/__tests__/SettingsList.test.d.ts.map +0 -1
  242. package/lib/typescript/commonjs/__tests__/apply-font-faces.test.d.ts +0 -5
  243. package/lib/typescript/commonjs/__tests__/apply-font-faces.test.d.ts.map +0 -1
  244. package/lib/typescript/commonjs/__tests__/theme.test.d.ts +0 -2
  245. package/lib/typescript/commonjs/__tests__/theme.test.d.ts.map +0 -1
  246. package/lib/typescript/commonjs/prompt/Prompt.d.ts +0 -42
  247. package/lib/typescript/commonjs/prompt/Prompt.d.ts.map +0 -1
  248. package/lib/typescript/commonjs/prompt/index.d.ts +0 -3
  249. package/lib/typescript/commonjs/prompt/index.d.ts.map +0 -1
  250. package/lib/typescript/module/__tests__/BloomThemeProvider.fonts-web.test.d.ts +0 -5
  251. package/lib/typescript/module/__tests__/BloomThemeProvider.fonts-web.test.d.ts.map +0 -1
  252. package/lib/typescript/module/__tests__/BloomThemeProvider.test.d.ts +0 -2
  253. package/lib/typescript/module/__tests__/BloomThemeProvider.test.d.ts.map +0 -1
  254. package/lib/typescript/module/__tests__/BottomSheet.test.d.ts +0 -2
  255. package/lib/typescript/module/__tests__/BottomSheet.test.d.ts.map +0 -1
  256. package/lib/typescript/module/__tests__/Button.test.d.ts +0 -2
  257. package/lib/typescript/module/__tests__/Button.test.d.ts.map +0 -1
  258. package/lib/typescript/module/__tests__/Code.test.d.ts +0 -2
  259. package/lib/typescript/module/__tests__/Code.test.d.ts.map +0 -1
  260. package/lib/typescript/module/__tests__/FontLoader.native.test.d.ts +0 -2
  261. package/lib/typescript/module/__tests__/FontLoader.native.test.d.ts.map +0 -1
  262. package/lib/typescript/module/__tests__/Pre.test.d.ts +0 -2
  263. package/lib/typescript/module/__tests__/Pre.test.d.ts.map +0 -1
  264. package/lib/typescript/module/__tests__/SettingsList.test.d.ts +0 -2
  265. package/lib/typescript/module/__tests__/SettingsList.test.d.ts.map +0 -1
  266. package/lib/typescript/module/__tests__/apply-font-faces.test.d.ts +0 -5
  267. package/lib/typescript/module/__tests__/apply-font-faces.test.d.ts.map +0 -1
  268. package/lib/typescript/module/__tests__/theme.test.d.ts +0 -2
  269. package/lib/typescript/module/__tests__/theme.test.d.ts.map +0 -1
  270. package/lib/typescript/module/prompt/Prompt.d.ts +0 -42
  271. package/lib/typescript/module/prompt/Prompt.d.ts.map +0 -1
  272. package/lib/typescript/module/prompt/index.d.ts +0 -3
  273. package/lib/typescript/module/prompt/index.d.ts.map +0 -1
  274. package/src/prompt/Prompt.tsx +0 -247
  275. package/src/prompt/index.ts +0 -13
@@ -9,7 +9,8 @@ export type { ToastType, BaseToastOptions } from './types';
9
9
  */
10
10
  export declare function ToastOutlet(): import("react/jsx-runtime").JSX.Element;
11
11
  /**
12
- * Access the full Sonner API
12
+ * Direct access to the Sonner API. Use sparingly — `toast()` covers the
13
+ * common case and keeps the surface tied to bloom's themed look.
13
14
  */
14
15
  export declare const api: ((message: string, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
15
16
  id?: string | number;
@@ -49,7 +50,35 @@ export declare const api: ((message: string, data?: Omit<import("sonner-native")
49
50
  /**
50
51
  * Show a toast notification.
51
52
  *
52
- * Pass a string for a simple text toast, or a React element for a custom toast.
53
+ * Pass a string for a simple text toast, or a React element for a custom
54
+ * toast. The optional `options` argument accepts the standard Sonner
55
+ * options plus a bloom `type` (defaults to `'default'`).
56
+ *
57
+ * ```ts
58
+ * toast('Saved');
59
+ * toast.success('Profile updated');
60
+ * toast.error('Network error', { duration: 5000 });
61
+ * toast.dismiss(id);
62
+ * ```
63
+ *
64
+ * Pre-typed variants (`toast.success`, `toast.error`, `toast.warning`,
65
+ * `toast.info`) are aliases for the corresponding `type`.
66
+ */
67
+ export interface ToastFn {
68
+ (content: React.ReactNode, options?: BaseToastOptions): void;
69
+ success: (content: React.ReactNode, options?: Omit<BaseToastOptions, 'type'>) => void;
70
+ error: (content: React.ReactNode, options?: Omit<BaseToastOptions, 'type'>) => void;
71
+ warning: (content: React.ReactNode, options?: Omit<BaseToastOptions, 'type'>) => void;
72
+ info: (content: React.ReactNode, options?: Omit<BaseToastOptions, 'type'>) => void;
73
+ dismiss: (id?: string | number) => void;
74
+ }
75
+ export declare const toast: ToastFn;
76
+ /**
77
+ * Alias of `toast` kept for compatibility with the original 0.4.x surface
78
+ * where `show()` was the documented entry point. New code should prefer
79
+ * `toast()` directly.
53
80
  */
54
- export declare function show(content: React.ReactNode, { type, ...options }?: BaseToastOptions): void;
81
+ export declare const show: ToastFn;
82
+ /** Re-export the Toast function type so callers can refer to it. */
83
+ export type Toast = ToastFn;
55
84
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/toast/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyB,MAAM,OAAO,CAAC;AAY9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACzE,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3D;;;GAGG;AACH,wBAAgB,WA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SAAS,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACtF,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACpF,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACtF,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACnF,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;CACzC;AAYD,eAAO,MAAM,KAAK,EAAE,OAAmB,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,IAAI,EAAE,OAAmB,CAAC;AAEvC,oEAAoE;AACpE,MAAM,MAAM,KAAK,GAAG,OAAO,CAAC"}
@@ -9,14 +9,21 @@ export type { ToastType, BaseToastOptions } from './types';
9
9
  * component tree.
10
10
  */
11
11
  export declare function ToastOutlet(): import("react/jsx-runtime").JSX.Element;
12
- /**
13
- * Access the full Sonner API
14
- */
12
+ /** Direct access to the underlying Sonner API. Use sparingly. */
15
13
  export declare const api: typeof sonner;
16
14
  /**
17
- * Show a toast notification.
18
- *
19
- * Pass a string for a simple text toast, or a React element for a custom toast.
15
+ * Show a toast notification. Identical API to the native variant — see
16
+ * `./index.tsx` for the full usage docs.
20
17
  */
21
- export declare function show(content: React.ReactNode, { type, ...options }?: BaseToastOptions): void;
18
+ export interface ToastFn {
19
+ (content: React.ReactNode, options?: BaseToastOptions): void;
20
+ success: (content: React.ReactNode, options?: Omit<BaseToastOptions, 'type'>) => void;
21
+ error: (content: React.ReactNode, options?: Omit<BaseToastOptions, 'type'>) => void;
22
+ warning: (content: React.ReactNode, options?: Omit<BaseToastOptions, 'type'>) => void;
23
+ info: (content: React.ReactNode, options?: Omit<BaseToastOptions, 'type'>) => void;
24
+ dismiss: (id?: string | number) => void;
25
+ }
26
+ export declare const toast: ToastFn;
27
+ export declare const show: ToastFn;
28
+ export type Toast = ToastFn;
22
29
  //# sourceMappingURL=index.web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/toast/index.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyB,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAE,KAAK,IAAI,MAAM,EAAW,MAAM,QAAQ,CAAC;AASlD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACzE,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3D;;;GAGG;AACH,wBAAgB,WAAW,4CAS1B;AAED;;GAEG;AACH,eAAO,MAAM,GAAG,EAAE,OAAO,MAAe,CAAC;AAEzC;;;;GAIG;AACH,wBAAgB,IAAI,CAClB,OAAO,EAAE,KAAK,CAAC,SAAS,EACxB,EAAE,IAAgB,EAAE,GAAG,OAAO,EAAE,GAAE,gBAAqB,QAoCxD"}
1
+ {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/toast/index.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyB,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAE,KAAK,IAAI,MAAM,EAAW,MAAM,QAAQ,CAAC;AASlD,OAAO,KAAK,EAAE,gBAAgB,EAAa,MAAM,SAAS,CAAC;AAE3D,OAAO,EAAE,Q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
  * Opacity of the dimming backdrop behind the sheet (0–1). Defaults to `0.5`.
40
40
  * Set to a higher value (e.g. `0.7`) when the sheet is presented over another
41
- * bottom sheet (Dialog/Prompt cases) so the underlying handle/content does not
41
+ * bottom sheet (Dialog cases) so the underlying handle/content does not
42
42
  * bleed through.
43
43
  */
44
44
  backdropOpacity?: number;
@@ -1,9 +1,10 @@
1
1
  /**
2
2
  * ContextMenu — Native implementation
3
3
  *
4
- * Opens a bottom-sheet menu via Bloom's Dialog when the user long-presses
5
- * the trigger. The menu body is rendered through Bloom's Menu component
6
- * pattern using Dialog.Outer / Dialog.ScrollableInner.
4
+ * Opens a bottom-sheet menu when the user long-presses the trigger. The
5
+ * menu body uses bloom's internal `SheetShell` (a `BottomSheet`
6
+ * presentation primitive with the same drag-handle + close-on-tap
7
+ * semantics shared by `Menu` and `Select`).
7
8
  */
8
9
  import React from 'react';
9
10
  import type { GroupProps, ItemIconProps, ItemProps, ItemTextProps, OuterProps, TriggerProps } from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/context-menu/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAKN,MAAM,OAAO,CAAC;AAQf,OAAO,KAAK,EAEV,UAAU,EAEV,aAAa,EACb,SAAS,EACT,aAAa,EACb,UAAU,EACV,YAAY,EACb,MAAM,SAAS,CAAC;AA2BjB,wBAAgB,IAAI,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CAkB/D;AAMD,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,YAAY,2CAwBrE;AAMD,wBAAgB,KAAK,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,UAAU,2CAoBpD;AAMD,wBAAgB,IAAI,CAAC,EACnB,QAAQ,EACR,KAAK,EACL,OAAO,EACP,QAAgB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,27 @@
1
+ import React from 'react';
2
+ /**
3
+ * Mounts the imperative `alert()` host inside your app.
4
+ *
5
+ * Wrap your app root once (after `BloomThemeProvider`, so the dialog's
6
+ * colours come from the active theme) and you can call `alert()` from
7
+ * anywhere — including from code that runs before the provider mounts
8
+ * (alerts are queued and drained on subscribe).
9
+ *
10
+ * ```tsx
11
+ * import { BloomDialogProvider } from '@oxyhq/bloom';
12
+ *
13
+ * <BloomThemeProvider mode="system" colorPreset="oxy">
14
+ * <BloomDialogProvider>
15
+ * <App />
16
+ * </BloomDialogProvider>
17
+ * </BloomThemeProvider>
18
+ * ```
19
+ *
20
+ * Alerts are presented one at a time. While one is on screen, subsequent
21
+ * `alert()` calls enqueue and present in FIFO order once their predecessor
22
+ * has finished closing.
23
+ */
24
+ export declare function BloomDialogProvider({ children }: {
25
+ children: React.ReactNode;
26
+ }): import("react/jsx-runtime").JSX.Element;
27
+ //# sourceMappingURL=BloomDialogProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BloomDialogProvider.d.ts","sourceRoot":"","sources":["../../../../src/dialog/BloomDialogProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAUnD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CAgB9E"}
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ /**
3
+ * Web variant of `BloomDialogProvider`. Identical surface area to the
4
+ * native version — it just uses the web-fork `Dialog` (`Dialog.web.tsx`)
5
+ * underneath instead of the bottom-sheet variant.
6
+ *
7
+ * See the native file (`./BloomDialogProvider.tsx`) for the full design
8
+ * notes; this fork exists purely so the bundler's `browser` condition can
9
+ * resolve to a `Dialog` that doesn't pull in the native gesture-handler /
10
+ * reanimated stack.
11
+ */
12
+ export declare function BloomDialogProvider({ children }: {
13
+ children: React.ReactNode;
14
+ }): import("react/jsx-runtime").JSX.Element;
15
+ //# sourceMappingURL=BloomDialogProvider.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BloomDialogProvider.web.d.ts","sourceRoot":"","sources":["../../../../src/dialog/BloomDialogProvider.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAUnD;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CAa9E"}
@@ -1,11 +1,38 @@
1
- import React from 'react';
2
- import type { DialogInnerProps, DialogOuterProps } from './types';
3
- export { useDialogContext, useDialogControl } from './context';
4
- export type { DialogControlProps, DialogOuterProps, DialogInnerProps } from './types';
5
- export declare function Outer({ children, control, onClose, testID, }: React.PropsWithChildren<DialogOuterProps>): import("react/jsx-runtime").JSX.Element;
6
- export declare function Inner({ children, style, header, contentContainerStyle }: DialogInnerProps): import("react/jsx-runtime").JSX.Element;
7
- export declare function ScrollableInner(props: DialogInnerProps): import("react/jsx-runtime").JSX.Element;
8
- export declare function Handle(): import("react/jsx-runtime").JSX.Element;
9
- export declare function Close(): null;
10
- export declare function Backdrop(): null;
1
+ import type { DialogAction, DialogProps } from './types';
2
+ /**
3
+ * Native variant of `<Dialog>`.
4
+ *
5
+ * Uses bloom's own `BottomSheet` in `detached` mode as the underlying
6
+ * surface a floating, dynamically-sized, content-hugging card that
7
+ * gracefully degrades from sheet (phone) to centered card (tablet, via the
8
+ * 500px max-width cap).
9
+ *
10
+ * The component accepts three rendering modes simultaneously:
11
+ *
12
+ * 1. Declarative — `title`, `description`, `actions`. Bloom renders a
13
+ * standard confirm/destructive/cancel layout.
14
+ * 2. Custom children — caller passes JSX, bloom renders the chrome (title
15
+ * + close behaviour) and the children fill the body.
16
+ * 3. Pure children — no `title`/`description`/`actions`; caller owns
17
+ * every pixel.
18
+ *
19
+ * All three share the same dismissal semantics: tapping the backdrop, the
20
+ * drag handle, swiping down, or `control.close()` runs the queued close
21
+ * callbacks once the sheet's exit animation has settled.
22
+ */
23
+ export declare function Dialog({ control, onClose, testID, title, description, actions, style, label, children, }: DialogProps): import("react/jsx-runtime").JSX.Element;
24
+ /**
25
+ * Helper used by the imperative `alert()` API. Mounts a `<Dialog>` against
26
+ * a fresh control and presents it immediately. `onResolve` is invoked
27
+ * exactly once when the dialog finishes closing (regardless of how the
28
+ * dismissal happened).
29
+ *
30
+ * Kept private to the dialog module — `alert()` is the public surface.
31
+ */
32
+ export declare function AutoMountedDialog({ title, description, actions, onResolve, }: {
33
+ title?: string;
34
+ description?: string;
35
+ actions: DialogAction[];
36
+ onResolve: () => void;
37
+ }): import("react/jsx-runtime").JSX.Element;
11
38
  //# sourceMappingURL=Dialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAMjF,OAAO,KAAK,EAAsB,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEtF,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC/D,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEtF,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EACR,OAAO,EACP,OAAO,EACP,MAAM,GACP,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,2CAgF3C;AAED,wBAAgB,KAAK,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,qBAAqB,EAAE,EAAE,gBAAgB,2CAmBzF;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,gBAAgB,2CAEtD;AAOD,wBAAgB,MAAM,4CAgBrB;AAED,wBAAgB,KAAK,SAEpB;AAED,wBAAgB,QAAQ,SAEvB"}
1
+ {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/dialog/Dialog.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EACV,YAAY,EAGZ,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,MAAM,CAAC,EACrB,OAAO,EACP,OAAO,EACP,MAAM,EACN,KAAK,EACL,WAAW,EACX,OAAO,EACP,KAAK,EACL,KAAK,EACL,QAAQ,GACT,EAAE,WAAW,2CA6Hb;AAqFD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,WAAW,EACX,OAAO,EACP,SAAS,GACV,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,2CAoBA"}
@@ -1,13 +1,29 @@
1
- import React from 'react';
2
- import type { DialogInnerProps, DialogOuterProps } from './types';
3
- export { useDialogContext, useDialogControl } from './context';
4
- export type { DialogControlProps, DialogOuterProps, DialogInnerProps } from './types';
5
- export declare function Outer({ children, control, onClose, testID, webOptions, }: React.PropsWithChildren<DialogOuterProps>): import("react/jsx-runtime").JSX.Element | null;
6
- export declare function Inner({ children, style, label, header, contentContainerStyle, }: DialogInnerProps): import("react/jsx-runtime").JSX.Element;
7
- export declare function ScrollableInner(props: DialogInnerProps): import("react/jsx-runtime").JSX.Element;
8
- export declare function Handle(): null;
9
- export declare function Close(): import("react/jsx-runtime").JSX.Element;
10
- export declare function Backdrop(): null;
1
+ import type { DialogAction, DialogProps } from './types';
2
+ /**
3
+ * Web variant of `<Dialog>`.
4
+ *
5
+ * A centered modal card rendered into the bloom Portal at the end of
6
+ * `document.body`. Same prop API as native `title`, `description`,
7
+ * `actions`, or arbitrary `children` — so call sites are platform
8
+ * agnostic.
9
+ *
10
+ * Accessibility: the panel has `role="dialog"` and the `title`/`description`
11
+ * props (when provided) become the `aria-labelledby` / `aria-describedby`
12
+ * targets. Pressing the backdrop dismisses. Pressing `Escape` dismisses.
13
+ * Focus is locked inside the dialog while it's open.
14
+ */
15
+ export declare function Dialog({ control, onClose, testID, title, description, actions, style, label, children, }: DialogProps): import("react/jsx-runtime").JSX.Element | null;
16
+ /**
17
+ * Inline imperative dialog used by `alert()`. Mounts and immediately
18
+ * presents; resolves the host's `onResolve` once the dialog has finished
19
+ * its exit animation.
20
+ */
21
+ export declare function AutoMountedDialog({ title, description, actions, onResolve, }: {
22
+ title?: string;
23
+ description?: string;
24
+ actions: DialogAction[];
25
+ onResolve: () => void;
26
+ }): import("react/jsx-runtime").JSX.Element;
11
27
  /**
12
28
  * CSS keyframes required for web dialog animations.
13
29
  * Consumers should inject this string into a <style> tag or their global CSS:
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.web.d.ts","sourceRoot":"","sources":["../../../../src/dialog/Dialog.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4G,MAAM,OAAO,CAAC;AAOjI,OAAO,KAAK,EAAsB,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEtF,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC/D,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAQtF,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EACR,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,GACX,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,kDAwF3C;AAED,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EACR,KAAK,EACL,KAAK,EACL,MAAM,EACN,qBAAqB,GACtB,EAAE,gBAAgB,2CAsClB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,gBAAgB,2CAEtD;AAED,wBAAgB,MAAM,SAErB;AAED,wBAAgB,KAAK,4CA+BpB;AAoBD,wBAAgB,QAAQ,SAEvB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,mZAK5B,CAAC"}
1
+ {"version":3,"file":"Dialog.web.d.ts","sourceRoot":"","sources":["../../../../src/dialog/Dialog.web.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EACV,YAAY,EAGZ,WAAW,EACZ,MAAM,SAAS,CAAC;AAQjB;;;;;;;;;;;;GAYG;AACH,wBAAgB,MAAM,CAAC,EACrB,OAAO,EACP,OAAO,EACP,MAAM,EACN,KAAK,EACL,WAAW,EACX,OAAO,EACP,KAAK,EACL,KAAK,EACL,QAAQ,GACT,EAAE,WAAW,kDAwGb;AA8LD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,WAAW,EACX,OAAO,EACP,SAAS,GACV,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,2CAgBA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,mZAK5B,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Internal bottom-sheet shell shared by `Menu`, `Select` and `ContextMenu`.
3
+ *
4
+ * Not exported from the public `@oxyhq/bloom` surface — these three
5
+ * components historically used the low-level `Dialog.Outer / Inner /
6
+ * Handle` primitives, which are gone in 0.5.0. This shell captures the
7
+ * shared shape (BottomSheet + drag handle + close-on-tap context) in a
8
+ * single place so the three internal call sites stay symmetrical.
9
+ *
10
+ * Consumers needing the same behaviour for app code should use the public
11
+ * `BottomSheet` primitive directly.
12
+ */
13
+ import React from 'react';
14
+ import { type StyleProp, type ViewStyle } from 'react-native';
15
+ import type { DialogControlProps } from './types';
16
+ export interface SheetShellProps {
17
+ control: DialogControlProps;
18
+ label?: string;
19
+ header?: React.ReactNode;
20
+ onClose?: () => void;
21
+ /** Style overrides applied to the inner padded content container. */
22
+ contentStyle?: StyleProp<ViewStyle>;
23
+ children?: React.ReactNode;
24
+ }
25
+ /**
26
+ * Bottom-sheet shell with an embedded drag handle. Exposes the bloom
27
+ * dialog `close()` context to descendants — `Menu.Item`, `Select.Item`
28
+ * etc. rely on it to dismiss the sheet after selection.
29
+ */
30
+ export declare function SheetShell({ control, label, header, onClose, contentStyle, children, }: SheetShellProps): import("react/jsx-runtime").JSX.Element;
31
+ //# sourceMappingURL=SheetShell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SheetShell.d.ts","sourceRoot":"","sources":["../../../../src/dialog/SheetShell.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAA4D,MAAM,OAAO,CAAC;AACjF,OAAO,EAA+B,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAK3F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,kBAAkB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,qEAAqE;IACrE,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,KAAK,EACL,MAAM,EACN,OAAO,EACP,YAAY,EACZ,QAAQ,GACT,EAAE,eAAe,2CAwEjB"}
@@ -0,0 +1,70 @@
1
+ import type { DialogAction } from './types';
2
+ /**
3
+ * Imperative-alert store.
4
+ *
5
+ * The store sits in module scope so `alert()` works from anywhere — event
6
+ * handlers, async callbacks, top-level helpers — without threading a
7
+ * provider context through every call site.
8
+ *
9
+ * The visible UI is owned by a single subscriber (the `<BloomDialogProvider>`
10
+ * mounted inside the app's React tree). When there is no subscriber yet —
11
+ * because `alert()` was called before the provider mounted, or because the
12
+ * app forgot to mount the provider — entries accumulate in the queue and
13
+ * drain as soon as a subscriber attaches.
14
+ *
15
+ * Multiple subscribers are not supported by design. Two providers would
16
+ * race for the same alert; we instead enforce a single listener and let
17
+ * the most recent subscription win (the older one falls back to no-op).
18
+ */
19
+ export type AlertButtonStyle = 'default' | 'cancel' | 'destructive';
20
+ export interface AlertButton {
21
+ /** Button label. Required. */
22
+ text: string;
23
+ /** Tap handler. Invoked after the dialog has finished its close animation. */
24
+ onPress?: () => void;
25
+ /** Visual treatment. Defaults to `'default'`. */
26
+ style?: AlertButtonStyle;
27
+ }
28
+ export interface AlertEntry {
29
+ id: string;
30
+ title: string;
31
+ message?: string;
32
+ buttons: AlertButton[];
33
+ }
34
+ type Listener = (queue: AlertEntry[]) => void;
35
+ /**
36
+ * Enqueue an alert. Returns the generated id so callers can dismiss it
37
+ * imperatively (rare — usually the dialog dismisses itself via a button
38
+ * tap). The runtime guarantees this enqueues even before any provider
39
+ * mounts; the provider drains pending entries on subscribe.
40
+ */
41
+ export declare function enqueueAlert(entry: Omit<AlertEntry, 'id'>): string;
42
+ /**
43
+ * Remove an alert from the queue. Called by the provider once the bloom
44
+ * Dialog has finished closing for that entry.
45
+ */
46
+ export declare function dismissAlert(id: string): void;
47
+ /**
48
+ * Subscribe to queue changes. Replaces any previously-registered listener
49
+ * (single-subscriber model — see header). Returns an unsubscribe function.
50
+ *
51
+ * On subscribe, the current queue is delivered synchronously so the
52
+ * subscriber can render pending entries that arrived before mount.
53
+ */
54
+ export declare function subscribeAlerts(fn: Listener): () => void;
55
+ /** Inspect the current queue. Used internally and by tests. */
56
+ export declare function getAlertQueue(): readonly AlertEntry[];
57
+ /**
58
+ * Translate an alert button to the action shape the unified `Dialog`
59
+ * accepts. Pure — no React, no theme — so it can be reused on web and
60
+ * native without forking.
61
+ */
62
+ export declare function buttonToAction(button: AlertButton): DialogAction;
63
+ /**
64
+ * Compute the effective button set for an alert. Mirrors React Native's
65
+ * `Alert.alert` semantics — an empty/omitted buttons array implies a
66
+ * single `OK` confirmation button.
67
+ */
68
+ export declare function resolveButtons(buttons: AlertButton[] | undefined): AlertButton[];
69
+ export {};
70
+ //# sourceMappingURL=alert-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-store.d.ts","sourceRoot":"","sources":["../../../../src/dialog/alert-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAQ5C;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,aAAa,CAAC;AAEpE,MAAM,WAAW,WAAW;IAC1B,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,iDAAiD;IACjD,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAED,KAAK,QAAQ,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;AAS9C;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG,MAAM,CAKlE;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAK7C;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,QAAQ,GAAG,MAAM,IAAI,CAQxD;AAED,+DAA+D;AAC/D,wBAAgB,aAAa,IAAI,SAAS,UAAU,EAAE,CAErD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,YAAY,CAWhE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,SAAS,GAAG,WAAW,EAAE,CAGhF"}
@@ -0,0 +1,27 @@
1
+ import { type AlertButton } from './alert-store';
2
+ /**
3
+ * Show a Bloom-styled confirmation dialog. Mirrors React Native's
4
+ * `Alert.alert(title, message?, buttons?)` signature so existing call
5
+ * sites migrate by changing the import only.
6
+ *
7
+ * If no buttons are passed, a single `OK` confirmation is rendered.
8
+ *
9
+ * The alert is enqueued in a module-scope store and rendered by
10
+ * `<BloomDialogProvider>`. Calls made before the provider mounts are
11
+ * queued and drained once the provider attaches — there is no fire-and-
12
+ * forget loss window. Calls made when no provider is ever mounted are
13
+ * silently queued forever; in development, mount the provider once at
14
+ * the app root and the queue will catch up immediately.
15
+ *
16
+ * ```tsx
17
+ * import { alert } from '@oxyhq/bloom';
18
+ *
19
+ * alert('Sign out?', 'You will need to enter your password to sign in again.', [
20
+ * { text: 'Cancel', style: 'cancel' },
21
+ * { text: 'Sign out', style: 'destructive', onPress: doSignOut },
22
+ * ]);
23
+ * ```
24
+ */
25
+ export declare function alert(title: string, message?: string, buttons?: AlertButton[]): void;
26
+ export type { AlertButton, AlertButtonStyle } from './alert-store';
27
+ //# sourceMappingURL=alert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../../src/dialog/alert.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,eAAe,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,KAAK,CACnB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,WAAW,EAAE,GACtB,IAAI,CAMN;AAED,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
@@ -1,5 +1,12 @@
1
1
  import type { DialogContextProps, DialogControlProps } from './types';
2
2
  export declare const Context: import("react").Context<DialogContextProps>;
3
3
  export declare function useDialogContext(): DialogContextProps;
4
+ /**
5
+ * Return a stable handle that can imperatively `open()` and `close()` a
6
+ * `<Dialog>` mounted with the same control.
7
+ *
8
+ * The handle survives across re-renders; mounting a different `<Dialog>`
9
+ * with the same control attaches the new instance via the internal ref.
10
+ */
4
11
  export declare function useDialogControl(): DialogControlProps;
5
12
  //# sourceMappingURL=context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/dialog/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAyB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7F,eAAO,MAAM,OAAO,6CAGlB,CAAC;AAGH,wBAAgB,gBAAgB,IAAI,kBAAkB,CAErD;AAED,wBAAgB,gBAAgB,IAAI,kBAAkB,CAoBrD"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/dialog/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAEnB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,OAAO,6CAGlB,CAAC;AAGH,wBAAgB,gBAAgB,IAAI,kBAAkB,CAErD;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,IAAI,kBAAkB,CAoBrD"}
@@ -1,4 +1,7 @@
1
- export { Outer, Inner, ScrollableInner, Handle, Close, Backdrop } from './Dialog';
1
+ export { Dialog } from './Dialog';
2
+ export { BloomDialogProvider } from './BloomDialogProvider';
3
+ export { alert } from './alert';
2
4
  export { useDialogContext, useDialogControl } from './context';
3
- export type { DialogControlProps, DialogOuterProps, DialogInnerProps, DialogContextProps } from './types';
5
+ export type { AlertButton, AlertButtonStyle, } from './alert-store';
6
+ export type { DialogAction, DialogActionColor, DialogContextProps, DialogControlProps, DialogProps, } from './types';
4
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC/D,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC/D,YAAY,EACV,WAAW,EACX,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,GACZ,MAAM,SAAS,CAAC"}
@@ -1,4 +1,7 @@
1
- export { Outer, Inner, ScrollableInner, Handle, Close, Backdrop } from './Dialog.web';
1
+ export { Dialog, BLOOM_DIALOG_CSS } from './Dialog.web';
2
+ export { BloomDialogProvider } from './BloomDialogProvider.web';
3
+ export { alert } from './alert';
2
4
  export { useDialogContext, useDialogControl } from './context';
3
- export type { DialogControlProps, DialogOuterProps, DialogInnerProps, DialogContextProps } from './types';
5
+ export type { AlertButton, AlertButtonStyle, } from './alert-store';
6
+ export type { DialogAction, DialogActionColor, DialogContextProps, DialogControlProps, DialogProps, } from './types';
4
7
  //# sourceMappingURL=index.web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/dialog/index.web.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC/D,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/dialog/index.web.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC/D,YAAY,EACV,WAAW,EACX,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,GACZ,MAAM,SAAS,CAAC"}
@@ -1,6 +1,14 @@
1
- import type { ScrollViewProps, StyleProp, ViewStyle } from 'react-native';
1
+ import type { GestureResponderEvent, StyleProp, ViewStyle } from 'react-native';
2
+ /**
3
+ * Imperative open/close handle returned by `useDialogControl`.
4
+ *
5
+ * Consumers receive an instance of `DialogControlProps`, which is a stable
6
+ * object whose `open`/`close` methods proxy to whichever `Dialog` instance
7
+ * has currently registered itself via the internal ref. Re-rendering the
8
+ * dialog under the same control does not break the handle.
9
+ */
2
10
  export type DialogControlRefProps = {
3
- open: (options?: Record<string, unknown>) => void;
11
+ open: () => void;
4
12
  close: (callback?: () => void) => void;
5
13
  };
6
14
  export type DialogControlProps = DialogControlRefProps & {
@@ -11,25 +19,72 @@ export type DialogContextProps = {
11
19
  close: DialogControlProps['close'];
12
20
  isWithinDialog: boolean;
13
21
  };
14
- export type DialogOuterProps = {
22
+ /**
23
+ * Color of a declarative `DialogAction`. Maps to bloom's theme palette:
24
+ *
25
+ * - `'default'` -> theme primary (filled CTA)
26
+ * - `'cancel'` -> theme secondary (auto-dismiss, no `onPress` required)
27
+ * - `'destructive'` -> theme negative
28
+ */
29
+ export type DialogActionColor = 'default' | 'cancel' | 'destructive';
30
+ export type DialogAction = {
31
+ label: string;
32
+ onPress?: (e: GestureResponderEvent) => void;
33
+ color?: DialogActionColor;
34
+ disabled?: boolean;
35
+ /**
36
+ * Defaults to `true`. When `true`, the dialog closes (and runs the close
37
+ * animation) before `onPress` is invoked, which gives the surrounding
38
+ * screen transition a chance to start before the action's side effects
39
+ * (navigation, network, etc.) kick in. Set `false` to keep the dialog
40
+ * mounted (e.g. while an async confirmation is in flight).
41
+ */
42
+ shouldCloseOnPress?: boolean;
43
+ testID?: string;
44
+ };
45
+ /**
46
+ * Props accepted by the unified `<Dialog>` component.
47
+ *
48
+ * Three usage modes — pick whichever fits the call site:
49
+ *
50
+ * 1. **Declarative (`title` / `description` / `actions`).** Most common
51
+ * confirm/cancel surface. Bloom renders the title, description and
52
+ * action row for you.
53
+ *
54
+ * 2. **Custom children.** Pass any JSX as `children` and bloom renders it
55
+ * verbatim inside the dialog frame. Combine with `title` to keep the
56
+ * header consistent.
57
+ *
58
+ * 3. **Imperative `alert()`.** Bypass the JSX layer entirely — see the
59
+ * module-level `alert()` helper.
60
+ */
61
+ export type DialogProps = React.PropsWithChildren<{
15
62
  control: DialogControlProps;
63
+ /** Fires after the dialog has finished closing. */
16
64
  onClose?: () => void;
17
65
  testID?: string;
18
- webOptions?: {
19
- alignCenter?: boolean;
20
- };
66
+ /** Optional dialog header text. Rendered above `description` / `children`. */
67
+ title?: string;
68
+ /** Optional supporting copy, rendered below the title. */
69
+ description?: string;
21
70
  /**
22
- * @deprecated No-op since 0.3.12. Bloom's BottomSheet sizes to its content by
23
- * default (capped by safe-area `maxHeight`), so dialogs no longer expand to
24
- * fill the screen and a manual lock is unnecessary.
71
+ * Optional action row. When provided, bloom renders the appropriate
72
+ * confirm/cancel/destructive buttons for you. Order is preserved.
73
+ */
74
+ actions?: DialogAction[];
75
+ /**
76
+ * Style overrides applied to the inner content container on native (the
77
+ * floating bottom-sheet card) and to the modal panel on web.
25
78
  */
26
- preventExpansion?: boolean;
27
- };
28
- export type DialogInnerProps = React.PropsWithChildren<{
29
79
  style?: StyleProp<ViewStyle>;
80
+ /** Accessibility label, applied to the dialog role on web. */
30
81
  label?: string;
31
- header?: React.ReactNode;
32
- contentContainerStyle?: StyleProp<ViewStyle>;
33
- keyboardDismissMode?: ScrollViewProps['keyboardDismissMode'];
34
82
  }>;
83
+ /**
84
+ * Web-only options. Native uses bloom's `BottomSheet` underneath which has
85
+ * its own positioning model.
86
+ */
87
+ export type DialogWebOptions = {
88
+ alignCenter?: boolean;
89
+ };
35
90
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/dialog/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1E,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IAClD,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,GAAG;IACvD,EAAE,EAAE,MAAM,CAA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
- {"version":3,"file":"FontLoader.d.ts","sourceRoot":"","sources":["../../../../src/fonts/FontLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAStC,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAOhE"}
1
+ {"version":3,"file":"FontLoader.d.ts","sourceRoot":"","sources":["../../../../src/fonts/FontLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAUtC,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAOhE"}