@cdx-ui/components 0.0.1-beta.79 → 0.0.1-beta.80

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 (214) hide show
  1. package/lib/commonjs/animation/hooks/index.js +17 -0
  2. package/lib/commonjs/animation/hooks/index.js.map +1 -0
  3. package/lib/commonjs/animation/hooks/useCombinedAnimationDisabledState.js +50 -0
  4. package/lib/commonjs/animation/hooks/useCombinedAnimationDisabledState.js.map +1 -0
  5. package/lib/commonjs/animation/index.js +39 -0
  6. package/lib/commonjs/animation/index.js.map +1 -0
  7. package/lib/commonjs/animation/types.js +6 -0
  8. package/lib/commonjs/animation/types.js.map +1 -0
  9. package/lib/commonjs/animation/utils.js +223 -0
  10. package/lib/commonjs/animation/utils.js.map +1 -0
  11. package/lib/commonjs/components/CLAUDE.md +1 -1
  12. package/lib/commonjs/components/Card/index.js +45 -17
  13. package/lib/commonjs/components/Card/index.js.map +1 -1
  14. package/lib/commonjs/components/Toast/animation.js +329 -0
  15. package/lib/commonjs/components/Toast/animation.js.map +1 -0
  16. package/lib/commonjs/components/Toast/hooks.js +66 -0
  17. package/lib/commonjs/components/Toast/hooks.js.map +1 -0
  18. package/lib/commonjs/components/Toast/index.js +493 -0
  19. package/lib/commonjs/components/Toast/index.js.map +1 -0
  20. package/lib/commonjs/components/Toast/styles.js +141 -0
  21. package/lib/commonjs/components/Toast/styles.js.map +1 -0
  22. package/lib/commonjs/components/Toast/types.js +6 -0
  23. package/lib/commonjs/components/Toast/types.js.map +1 -0
  24. package/lib/commonjs/components/index.js +12 -0
  25. package/lib/commonjs/components/index.js.map +1 -1
  26. package/lib/commonjs/index.js +15 -0
  27. package/lib/commonjs/index.js.map +1 -1
  28. package/lib/commonjs/providers/animation-settings/index.js +31 -0
  29. package/lib/commonjs/providers/animation-settings/index.js.map +1 -0
  30. package/lib/commonjs/providers/animation-settings/provider.js +59 -0
  31. package/lib/commonjs/providers/animation-settings/provider.js.map +1 -0
  32. package/lib/commonjs/providers/animation-settings/types.js +6 -0
  33. package/lib/commonjs/providers/animation-settings/types.js.map +1 -0
  34. package/lib/commonjs/providers/forge-design/index.js +29 -0
  35. package/lib/commonjs/providers/forge-design/index.js.map +1 -0
  36. package/lib/commonjs/providers/forge-design/provider.js +71 -0
  37. package/lib/commonjs/providers/forge-design/provider.js.map +1 -0
  38. package/lib/commonjs/providers/forge-design/types.js +6 -0
  39. package/lib/commonjs/providers/forge-design/types.js.map +1 -0
  40. package/lib/commonjs/providers/text-component/index.js +28 -0
  41. package/lib/commonjs/providers/text-component/index.js.map +1 -0
  42. package/lib/commonjs/providers/text-component/provider.js +11 -0
  43. package/lib/commonjs/providers/text-component/provider.js.map +1 -0
  44. package/lib/commonjs/providers/text-component/types.js +6 -0
  45. package/lib/commonjs/providers/text-component/types.js.map +1 -0
  46. package/lib/commonjs/providers/toast/index.js +33 -0
  47. package/lib/commonjs/providers/toast/index.js.map +1 -0
  48. package/lib/commonjs/providers/toast/insets-container.js +160 -0
  49. package/lib/commonjs/providers/toast/insets-container.js.map +1 -0
  50. package/lib/commonjs/providers/toast/lifecycle.context.js +36 -0
  51. package/lib/commonjs/providers/toast/lifecycle.context.js.map +1 -0
  52. package/lib/commonjs/providers/toast/provider.js +508 -0
  53. package/lib/commonjs/providers/toast/provider.js.map +1 -0
  54. package/lib/commonjs/providers/toast/reducer.js +46 -0
  55. package/lib/commonjs/providers/toast/reducer.js.map +1 -0
  56. package/lib/commonjs/providers/toast/toast-config.context.js +29 -0
  57. package/lib/commonjs/providers/toast/toast-config.context.js.map +1 -0
  58. package/lib/commonjs/providers/toast/toast-item-renderer.js +43 -0
  59. package/lib/commonjs/providers/toast/toast-item-renderer.js.map +1 -0
  60. package/lib/commonjs/providers/toast/types.js +6 -0
  61. package/lib/commonjs/providers/toast/types.js.map +1 -0
  62. package/lib/module/animation/hooks/index.js +4 -0
  63. package/lib/module/animation/hooks/index.js.map +1 -0
  64. package/lib/module/animation/hooks/useCombinedAnimationDisabledState.js +47 -0
  65. package/lib/module/animation/hooks/useCombinedAnimationDisabledState.js.map +1 -0
  66. package/lib/module/animation/index.js +6 -0
  67. package/lib/module/animation/index.js.map +1 -0
  68. package/lib/module/animation/types.js +4 -0
  69. package/lib/module/animation/types.js.map +1 -0
  70. package/lib/module/animation/utils.js +212 -0
  71. package/lib/module/animation/utils.js.map +1 -0
  72. package/lib/module/components/CLAUDE.md +1 -1
  73. package/lib/module/components/Card/index.js +47 -19
  74. package/lib/module/components/Card/index.js.map +1 -1
  75. package/lib/module/components/Toast/animation.js +324 -0
  76. package/lib/module/components/Toast/animation.js.map +1 -0
  77. package/lib/module/components/Toast/hooks.js +61 -0
  78. package/lib/module/components/Toast/hooks.js.map +1 -0
  79. package/lib/module/components/Toast/index.js +487 -0
  80. package/lib/module/components/Toast/index.js.map +1 -0
  81. package/lib/module/components/Toast/styles.js +138 -0
  82. package/lib/module/components/Toast/styles.js.map +1 -0
  83. package/lib/module/components/Toast/types.js +4 -0
  84. package/lib/module/components/Toast/types.js.map +1 -0
  85. package/lib/module/components/index.js +1 -0
  86. package/lib/module/components/index.js.map +1 -1
  87. package/lib/module/index.js +1 -0
  88. package/lib/module/index.js.map +1 -1
  89. package/lib/module/providers/animation-settings/index.js +4 -0
  90. package/lib/module/providers/animation-settings/index.js.map +1 -0
  91. package/lib/module/providers/animation-settings/provider.js +52 -0
  92. package/lib/module/providers/animation-settings/provider.js.map +1 -0
  93. package/lib/module/providers/animation-settings/types.js +4 -0
  94. package/lib/module/providers/animation-settings/types.js.map +1 -0
  95. package/lib/module/providers/forge-design/index.js +5 -0
  96. package/lib/module/providers/forge-design/index.js.map +1 -0
  97. package/lib/module/providers/forge-design/provider.js +66 -0
  98. package/lib/module/providers/forge-design/provider.js.map +1 -0
  99. package/lib/module/providers/forge-design/types.js +4 -0
  100. package/lib/module/providers/forge-design/types.js.map +1 -0
  101. package/lib/module/providers/text-component/index.js +5 -0
  102. package/lib/module/providers/text-component/index.js.map +1 -0
  103. package/lib/module/providers/text-component/provider.js +6 -0
  104. package/lib/module/providers/text-component/provider.js.map +1 -0
  105. package/lib/module/providers/text-component/types.js +4 -0
  106. package/lib/module/providers/text-component/types.js.map +1 -0
  107. package/lib/module/providers/toast/index.js +6 -0
  108. package/lib/module/providers/toast/index.js.map +1 -0
  109. package/lib/module/providers/toast/insets-container.js +156 -0
  110. package/lib/module/providers/toast/insets-container.js.map +1 -0
  111. package/lib/module/providers/toast/lifecycle.context.js +32 -0
  112. package/lib/module/providers/toast/lifecycle.context.js.map +1 -0
  113. package/lib/module/providers/toast/provider.js +503 -0
  114. package/lib/module/providers/toast/provider.js.map +1 -0
  115. package/lib/module/providers/toast/reducer.js +42 -0
  116. package/lib/module/providers/toast/reducer.js.map +1 -0
  117. package/lib/module/providers/toast/toast-config.context.js +25 -0
  118. package/lib/module/providers/toast/toast-config.context.js.map +1 -0
  119. package/lib/module/providers/toast/toast-item-renderer.js +39 -0
  120. package/lib/module/providers/toast/toast-item-renderer.js.map +1 -0
  121. package/lib/module/providers/toast/types.js +4 -0
  122. package/lib/module/providers/toast/types.js.map +1 -0
  123. package/lib/typescript/animation/hooks/index.d.ts +2 -0
  124. package/lib/typescript/animation/hooks/index.d.ts.map +1 -0
  125. package/lib/typescript/animation/hooks/useCombinedAnimationDisabledState.d.ts +22 -0
  126. package/lib/typescript/animation/hooks/useCombinedAnimationDisabledState.d.ts.map +1 -0
  127. package/lib/typescript/animation/index.d.ts +4 -0
  128. package/lib/typescript/animation/index.d.ts.map +1 -0
  129. package/lib/typescript/animation/types.d.ts +105 -0
  130. package/lib/typescript/animation/types.d.ts.map +1 -0
  131. package/lib/typescript/animation/utils.d.ts +120 -0
  132. package/lib/typescript/animation/utils.d.ts.map +1 -0
  133. package/lib/typescript/components/Card/index.d.ts +4 -0
  134. package/lib/typescript/components/Card/index.d.ts.map +1 -1
  135. package/lib/typescript/components/Toast/animation.d.ts +21 -0
  136. package/lib/typescript/components/Toast/animation.d.ts.map +1 -0
  137. package/lib/typescript/components/Toast/hooks.d.ts +17 -0
  138. package/lib/typescript/components/Toast/hooks.d.ts.map +1 -0
  139. package/lib/typescript/components/Toast/index.d.ts +28 -0
  140. package/lib/typescript/components/Toast/index.d.ts.map +1 -0
  141. package/lib/typescript/components/Toast/styles.d.ts +73 -0
  142. package/lib/typescript/components/Toast/styles.d.ts.map +1 -0
  143. package/lib/typescript/components/Toast/types.d.ts +303 -0
  144. package/lib/typescript/components/Toast/types.d.ts.map +1 -0
  145. package/lib/typescript/components/index.d.ts +1 -0
  146. package/lib/typescript/components/index.d.ts.map +1 -1
  147. package/lib/typescript/index.d.ts +2 -0
  148. package/lib/typescript/index.d.ts.map +1 -1
  149. package/lib/typescript/providers/animation-settings/index.d.ts +3 -0
  150. package/lib/typescript/providers/animation-settings/index.d.ts.map +1 -0
  151. package/lib/typescript/providers/animation-settings/provider.d.ts +28 -0
  152. package/lib/typescript/providers/animation-settings/provider.d.ts.map +1 -0
  153. package/lib/typescript/providers/animation-settings/types.d.ts +35 -0
  154. package/lib/typescript/providers/animation-settings/types.d.ts.map +1 -0
  155. package/lib/typescript/providers/forge-design/index.d.ts +3 -0
  156. package/lib/typescript/providers/forge-design/index.d.ts.map +1 -0
  157. package/lib/typescript/providers/forge-design/provider.d.ts +24 -0
  158. package/lib/typescript/providers/forge-design/provider.d.ts.map +1 -0
  159. package/lib/typescript/providers/forge-design/types.d.ts +82 -0
  160. package/lib/typescript/providers/forge-design/types.d.ts.map +1 -0
  161. package/lib/typescript/providers/text-component/index.d.ts +3 -0
  162. package/lib/typescript/providers/text-component/index.d.ts.map +1 -0
  163. package/lib/typescript/providers/text-component/provider.d.ts +7 -0
  164. package/lib/typescript/providers/text-component/provider.d.ts.map +1 -0
  165. package/lib/typescript/providers/text-component/types.d.ts +51 -0
  166. package/lib/typescript/providers/text-component/types.d.ts.map +1 -0
  167. package/lib/typescript/providers/toast/index.d.ts +5 -0
  168. package/lib/typescript/providers/toast/index.d.ts.map +1 -0
  169. package/lib/typescript/providers/toast/insets-container.d.ts +72 -0
  170. package/lib/typescript/providers/toast/insets-container.d.ts.map +1 -0
  171. package/lib/typescript/providers/toast/lifecycle.context.d.ts +32 -0
  172. package/lib/typescript/providers/toast/lifecycle.context.d.ts.map +1 -0
  173. package/lib/typescript/providers/toast/provider.d.ts +32 -0
  174. package/lib/typescript/providers/toast/provider.d.ts.map +1 -0
  175. package/lib/typescript/providers/toast/reducer.d.ts +14 -0
  176. package/lib/typescript/providers/toast/reducer.d.ts.map +1 -0
  177. package/lib/typescript/providers/toast/toast-config.context.d.ts +20 -0
  178. package/lib/typescript/providers/toast/toast-config.context.d.ts.map +1 -0
  179. package/lib/typescript/providers/toast/toast-item-renderer.d.ts +7 -0
  180. package/lib/typescript/providers/toast/toast-item-renderer.d.ts.map +1 -0
  181. package/lib/typescript/providers/toast/types.d.ts +422 -0
  182. package/lib/typescript/providers/toast/types.d.ts.map +1 -0
  183. package/package.json +4 -4
  184. package/src/animation/hooks/index.ts +1 -0
  185. package/src/animation/hooks/useCombinedAnimationDisabledState.ts +46 -0
  186. package/src/animation/index.ts +3 -0
  187. package/src/animation/types.ts +128 -0
  188. package/src/animation/utils.ts +249 -0
  189. package/src/components/CLAUDE.md +1 -1
  190. package/src/components/Card/index.tsx +58 -28
  191. package/src/components/Toast/animation.ts +387 -0
  192. package/src/components/Toast/hooks.ts +92 -0
  193. package/src/components/Toast/index.tsx +520 -0
  194. package/src/components/Toast/styles.ts +186 -0
  195. package/src/components/Toast/types.ts +332 -0
  196. package/src/components/index.ts +1 -0
  197. package/src/index.ts +2 -0
  198. package/src/providers/animation-settings/index.ts +11 -0
  199. package/src/providers/animation-settings/provider.tsx +54 -0
  200. package/src/providers/animation-settings/types.ts +37 -0
  201. package/src/providers/forge-design/index.ts +2 -0
  202. package/src/providers/forge-design/provider.tsx +61 -0
  203. package/src/providers/forge-design/types.ts +84 -0
  204. package/src/providers/text-component/index.ts +2 -0
  205. package/src/providers/text-component/provider.tsx +7 -0
  206. package/src/providers/text-component/types.ts +52 -0
  207. package/src/providers/toast/index.ts +4 -0
  208. package/src/providers/toast/insets-container.tsx +230 -0
  209. package/src/providers/toast/lifecycle.context.tsx +37 -0
  210. package/src/providers/toast/provider.tsx +567 -0
  211. package/src/providers/toast/reducer.ts +40 -0
  212. package/src/providers/toast/toast-config.context.ts +25 -0
  213. package/src/providers/toast/toast-item-renderer.tsx +40 -0
  214. package/src/providers/toast/types.ts +431 -0
@@ -0,0 +1,303 @@
1
+ import { View } from 'react-native';
2
+ import type { EntryOrExitLayoutType, WithTimingConfig } from 'react-native-reanimated';
3
+ import type { ToastRootProps } from '@cdx-ui/primitives';
4
+ import { ForgeIcon } from '@cdx-ui/icons';
5
+ import type { AnimationRoot, AnimationValue } from '../../animation';
6
+ import type { ToastComponentProps, ToastShowOptions } from '../../providers/toast';
7
+ import type { ButtonProps } from '../Button';
8
+ import type { IconButtonProps } from '../IconButton';
9
+ import type { IconProps } from '../Icon';
10
+ import { ToastColorProps } from './styles';
11
+ /**
12
+ * Toast color types
13
+ */
14
+ export type ToastColor = ToastColorProps['color'];
15
+ /**
16
+ * Toast placement types.
17
+ *
18
+ * On web, `-start` and `-end` variants position the toast at the
19
+ * corresponding horizontal edge with a `max-width` of 460 px.
20
+ * The plain `top` / `bottom` values centre the toast horizontally.
21
+ *
22
+ * On native (iOS / Android), `-start` and `-end` degrade gracefully
23
+ * to edge-to-edge layout identical to their base `top` / `bottom`
24
+ * counterpart — the toast still spans the full width.
25
+ */
26
+ export type ToastPlacement = 'top-start' | 'top' | 'top-end' | 'bottom-start' | 'bottom' | 'bottom-end';
27
+ /**
28
+ * Animation configuration for toast root component
29
+ */
30
+ export type ToastRootAnimation = AnimationRoot<{
31
+ opacity?: AnimationValue<{
32
+ /**
33
+ * Opacity interpolation values [start, end]
34
+ * Controls how fast toast items fade out as they move beyond the visible stack limits.
35
+ * When toasts are pushed out of view (beyond the last few visible items), their opacity
36
+ * gradually decreases to create a smooth disappearing effect.
37
+ * - First value: fully visible opacity (1) for items within visible stack
38
+ * - Second value: hidden opacity (0) for items pushed out of view
39
+ * @default [1, 0]
40
+ */
41
+ value?: [number, number];
42
+ /**
43
+ * Animation timing configuration
44
+ * @default { duration: 300 }
45
+ */
46
+ timingConfig?: WithTimingConfig;
47
+ }>;
48
+ translateY?: AnimationValue<{
49
+ /**
50
+ * Translate Y interpolation values [start, end]
51
+ * Controls how much of a toast item is visible when it's positioned behind the last visible toast.
52
+ * This creates a "peek" effect where stacked toasts are slightly offset vertically,
53
+ * allowing users to see a portion of the toast behind the current one.
54
+ * - First value: no offset (0) for the last/active toast
55
+ * - Second value: vertical offset in pixels (10) for toasts behind the last one
56
+ * Note: The offset direction is automatically adjusted based on placement (top/bottom)
57
+ * @default [0, 10] (multiplied by placement sign)
58
+ */
59
+ value?: [number, number];
60
+ /**
61
+ * Animation timing configuration
62
+ * @default { duration: 300 }
63
+ */
64
+ timingConfig?: WithTimingConfig;
65
+ }>;
66
+ scale?: AnimationValue<{
67
+ /**
68
+ * Scale interpolation values [start, end]
69
+ * Controls the size scaling of toast items in the stack.
70
+ * Toasts behind the active one are slightly scaled down to create depth and visual hierarchy.
71
+ * - First value: normal scale (1) for the active/last toast
72
+ * - Second value: scaled down value (0.97) for toasts positioned behind
73
+ * @default [1, 0.97]
74
+ */
75
+ value?: [number, number];
76
+ /**
77
+ * Animation timing configuration
78
+ * @default { duration: 300 }
79
+ */
80
+ timingConfig?: WithTimingConfig;
81
+ }>;
82
+ entering?: AnimationValue<{
83
+ /**
84
+ * Custom entering animation for top placement
85
+ * @default FadeInUp.springify().withInitialValues({ opacity: 1, transform: [{ translateY: -100 }] }).mass(3)
86
+ */
87
+ top?: EntryOrExitLayoutType;
88
+ /**
89
+ * Custom entering animation for bottom placement
90
+ * @default FadeInDown.springify().withInitialValues({ opacity: 1, transform: [{ translateY: 100 }] }).mass(3)
91
+ */
92
+ bottom?: EntryOrExitLayoutType;
93
+ }>;
94
+ exiting?: AnimationValue<{
95
+ /**
96
+ * Custom exiting animation for top placement
97
+ * @default Keyframe animation with translateY: -100, scale: 0.97, opacity: 0.5
98
+ */
99
+ top?: EntryOrExitLayoutType;
100
+ /**
101
+ * Custom exiting animation for bottom placement
102
+ * @default Keyframe animation with translateY: 100, scale: 0.97, opacity: 0.5
103
+ */
104
+ bottom?: EntryOrExitLayoutType;
105
+ }>;
106
+ }>;
107
+ /**
108
+ * Props for the Toast.Root component
109
+ */
110
+ export interface ToastProps extends ToastRootProps, Omit<ToastComponentProps, 'id'> {
111
+ /**
112
+ * Color of the toast
113
+ * @default 'default'
114
+ */
115
+ color?: ToastColor;
116
+ /**
117
+ * Placement of the toast
118
+ * @default 'bottom'
119
+ */
120
+ placement?: ToastPlacement;
121
+ /**
122
+ * Additional CSS class for the toast container
123
+ *
124
+ * @note The following style properties are occupied by animations and cannot be set via className:
125
+ * - `opacity` - Animated for visibility transitions when toasts are pushed beyond visible stack limits
126
+ * - `transform` (translateY) - Animated for vertical position transitions when toasts are stacked, and for swipe-to-dismiss gestures
127
+ * - `transform` (scale) - Animated for size scaling transitions when toasts are stacked (toasts behind active one are scaled down)
128
+ * - `height` - Animated for height transitions when toast content changes
129
+ *
130
+ * To customize these properties, use the `animation` prop:
131
+ * ```tsx
132
+ * <Toast.Root
133
+ * animation={{
134
+ * opacity: {
135
+ * value: [1, 0],
136
+ * timingConfig: { duration: 300 }
137
+ * },
138
+ * translateY: {
139
+ * value: [0, 10],
140
+ * timingConfig: { duration: 300 }
141
+ * },
142
+ * scale: {
143
+ * value: [1, 0.97],
144
+ * timingConfig: { duration: 300 }
145
+ * }
146
+ * }}
147
+ * />
148
+ * ```
149
+ *
150
+ * To completely disable animated styles and use your own via className or style prop, set `isAnimatedStyleActive={false}`.
151
+ */
152
+ className?: string;
153
+ /**
154
+ * Animation configuration for toast
155
+ * - `false` or `"disabled"`: Disable only root animations
156
+ * - `"disable-all"`: Disable all animations including children
157
+ * - `true` or `undefined`: Use default animations
158
+ * - `object`: Custom animation configuration
159
+ */
160
+ animation?: ToastRootAnimation;
161
+ /**
162
+ * Whether the toast can be swiped to dismiss and dragged with rubber effect
163
+ * @default true
164
+ */
165
+ isSwipeable?: boolean;
166
+ /**
167
+ * Whether animated styles (react-native-reanimated) are active
168
+ * When `false`, the animated style is removed and you can implement custom logic
169
+ * This prop should only be used when you want to write custom styling logic instead of the default animated styles
170
+ * @default true
171
+ */
172
+ isAnimatedStyleActive?: boolean;
173
+ }
174
+ /**
175
+ * Props for the Toast.Title component
176
+ */
177
+ export interface ToastTitleProps {
178
+ /**
179
+ * Content to be rendered as title
180
+ */
181
+ children?: React.ReactNode;
182
+ /**
183
+ * Additional CSS class for the title
184
+ */
185
+ className?: string;
186
+ }
187
+ /**
188
+ * Props for the Toast.Description component
189
+ */
190
+ export interface ToastDescriptionProps {
191
+ /**
192
+ * Content to be rendered as description
193
+ */
194
+ children?: React.ReactNode;
195
+ /**
196
+ * Additional CSS class for the description
197
+ */
198
+ className?: string;
199
+ }
200
+ /**
201
+ * Props for the Toast.Icon component
202
+ */
203
+ export interface ToastIconProps extends Omit<IconProps, 'children' | 'as'> {
204
+ asChild?: boolean;
205
+ /**
206
+ * Forge icon component to render. Required unless `asChild` is set.
207
+ */
208
+ as?: IconProps['as'];
209
+ /**
210
+ * Child element to render when `asChild` is set.
211
+ */
212
+ children?: React.ReactNode;
213
+ }
214
+ /**
215
+ * Props for the Toast.Action component
216
+ */
217
+ export type ToastActionProps = ButtonProps;
218
+ /**
219
+ * Props for the Toast.Close component
220
+ */
221
+ export type ToastCloseProps = Omit<IconButtonProps, 'as'> & {
222
+ /**
223
+ * Forge icon component to render (icon-only control).
224
+ * @default CloseIcon
225
+ */
226
+ as?: ForgeIcon;
227
+ };
228
+ /**
229
+ * Context values shared between Toast components
230
+ */
231
+ export interface ToastContextValue {
232
+ /**
233
+ * Color of the toast
234
+ */
235
+ color?: ToastColor;
236
+ /**
237
+ * Function to hide the toast
238
+ */
239
+ hide?: (ids?: (string & {}) | string[] | 'all') => void;
240
+ /**
241
+ * ID of the toast
242
+ */
243
+ id?: string;
244
+ }
245
+ /**
246
+ * Ref type for the Toast.Root component
247
+ */
248
+ export type ToastRootRef = React.ComponentRef<typeof View>;
249
+ /**
250
+ * Props for useToastRootAnimation hook
251
+ * Picks required properties from ToastRootProps and adds id from ToastComponentProps
252
+ */
253
+ export type UseToastRootAnimationOptions = Pick<ToastProps, 'animation' | 'index' | 'total' | 'heights' | 'placement' | 'hide' | 'isSwipeable' | 'maxVisibleToasts'> & Pick<ToastComponentProps, 'id'>;
254
+ /**
255
+ * Props for the DefaultToast component
256
+ * Used internally when showing toasts with string or config object (without component)
257
+ */
258
+ export interface DefaultToastProps extends ToastComponentProps {
259
+ /**
260
+ * Color of the toast
261
+ * @default 'default'
262
+ */
263
+ color?: ToastProps['color'];
264
+ /**
265
+ * Placement of the toast
266
+ * @default 'bottom'
267
+ */
268
+ placement?: ToastProps['placement'];
269
+ /**
270
+ * Animation configuration for toast
271
+ */
272
+ animation?: ToastProps['animation'];
273
+ /**
274
+ * Whether the toast can be swiped to dismiss and dragged with rubber effect
275
+ */
276
+ isSwipeable?: ToastProps['isSwipeable'];
277
+ /**
278
+ * Label text for the toast
279
+ */
280
+ label?: string;
281
+ /**
282
+ * Description text for the toast
283
+ */
284
+ description?: string;
285
+ /**
286
+ * Action button label text
287
+ */
288
+ actionLabel?: string;
289
+ /**
290
+ * Callback function called when the action button is pressed
291
+ * Receives show and hide functions for programmatic toast control
292
+ */
293
+ onActionPress?: (helpers: {
294
+ show: (options: string | ToastShowOptions) => string;
295
+ hide: (ids?: (string & {}) | string[] | 'all') => void;
296
+ }) => void;
297
+ /**
298
+ * Forge icon component to display in the toast.
299
+ * Rendered via `Toast.Icon` internally — inherits color-aware coloring automatically.
300
+ */
301
+ icon?: ForgeIcon;
302
+ }
303
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Toast/types.ts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CAAC,WAAW,CAAC,CAAC;IACpC;;OAEG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IACpC;;OAEG;IACH,WAAW,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;IACxC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE;QACxB,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,KAAK,MAAM,CAAC;QACrD,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,MAAM,EAAE,GAAG,KAAK,KAAK,IAAI,CAAC;KACxD,KAAK,IAAI,CAAC;IACX;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB"}
@@ -26,6 +26,7 @@ export * from './Select';
26
26
  export * from './VirtualizedList';
27
27
  export * from './Switch';
28
28
  export * from './Tile';
29
+ export * from './Toast';
29
30
  export { HStack, VStack } from './Stack';
30
31
  export * from './Heading';
31
32
  export * from './Text';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,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mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACzC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC"}
@@ -2,6 +2,8 @@
2
2
  export * from './components';
3
3
  export * from './hooks';
4
4
  export * from './navigation';
5
+ export { ToastProvider, useToast } from './providers/toast';
6
+ export type * from './providers/toast';
5
7
  export { View, ScrollView, KeyboardAvoidingView } from 'react-native';
6
8
  export { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AACA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AACA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,mBAAmB,mBAAmB,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { GlobalAnimationSettingsProvider, AnimationSettingsProvider, useGlobalAnimationSettings, useAnimationSettings, } from './provider';
2
+ export type { GlobalAnimationSettingsContextValue, GlobalAnimationSettingsProviderProps, AnimationSettingsContextValue, } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/providers/animation-settings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,EACzB,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,mCAAmC,EACnC,oCAAoC,EACpC,6BAA6B,GAC9B,MAAM,SAAS,CAAC"}
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import type { GlobalAnimationSettingsContextValue, GlobalAnimationSettingsProviderProps, AnimationSettingsContextValue } from './types';
3
+ declare const useGlobalAnimationSettings: () => GlobalAnimationSettingsContextValue;
4
+ export { useGlobalAnimationSettings };
5
+ /**
6
+ * GlobalAnimationSettingsProvider Component
7
+ *
8
+ * @description
9
+ * Provider component that controls global animation settings across the application.
10
+ * When animation is set to 'disable-all', all animations will be disabled globally.
11
+ * Additionally, if the user has enabled reduce motion in accessibility settings,
12
+ * all animations will be disabled automatically.
13
+ *
14
+ * The global setting is read directly via `useGlobalAnimationSettings`; the
15
+ * separate `AnimationSettingsProvider` handles per-subtree cascading. Both
16
+ * contexts are non-strict, so components can read them without a provider
17
+ * mounted (falling back to "animations enabled").
18
+ *
19
+ * @param {GlobalAnimationSettingsProviderProps} props - Provider props
20
+ * @param {AnimationRootDisableAll} [props.animation] - Global animation setting
21
+ * @param {ReactNode} props.children - Child components to wrap
22
+ */
23
+ export declare const GlobalAnimationSettingsProvider: React.FC<GlobalAnimationSettingsProviderProps>;
24
+ export declare const AnimationSettingsProvider: React.FunctionComponent<{
25
+ children: React.ReactNode;
26
+ value: AnimationSettingsContextValue;
27
+ }>, useAnimationSettings: () => AnimationSettingsContextValue;
28
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/providers/animation-settings/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EACV,mCAAmC,EACnC,oCAAoC,EACpC,6BAA6B,EAC9B,MAAM,SAAS,CAAC;AAEjB,QAAA,MAAiD,0BAA0B,2CAIvE,CAAC;AAEL,OAAO,EAAE,0BAA0B,EAAE,CAAC;AAEtC;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,+BAA+B,EAAE,KAAK,CAAC,EAAE,CAAC,oCAAoC,CAY1F,CAAC;AAEF,eAAO,MAAO,yBAAyB;;;IAAE,oBAAoB,qCAIzD,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { AnimationRootDisableAll } from '../../animation';
3
+ /**
4
+ * Props for GlobalAnimationSettingsProvider component
5
+ */
6
+ export interface GlobalAnimationSettingsProviderProps {
7
+ /**
8
+ * Global animation setting
9
+ * When set to 'disable-all', all animations across the app will be disabled
10
+ */
11
+ animation?: AnimationRootDisableAll;
12
+ /**
13
+ * Child components to render within the provider
14
+ */
15
+ children: ReactNode;
16
+ }
17
+ /**
18
+ * Context value for global animation settings
19
+ */
20
+ export interface GlobalAnimationSettingsContextValue {
21
+ /**
22
+ * Whether all animations should be disabled globally
23
+ */
24
+ globalIsAllAnimationsDisabled: boolean;
25
+ }
26
+ /**
27
+ * Context value for global animation settings
28
+ */
29
+ export interface AnimationSettingsContextValue {
30
+ /**
31
+ * Whether all animations should be disabled (cascading from parent)
32
+ */
33
+ isAllAnimationsDisabled: boolean;
34
+ }
35
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/providers/animation-settings/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACnD;;;OAGG;IACH,SAAS,CAAC,EAAE,uBAAuB,CAAC;IACpC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD;;OAEG;IACH,6BAA6B,EAAE,OAAO,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,uBAAuB,EAAE,OAAO,CAAC;CAClC"}
@@ -0,0 +1,3 @@
1
+ export { default as ForgeDesignProvider } from './provider';
2
+ export * from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/providers/forge-design/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAC5D,cAAc,SAAS,CAAC"}
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import type { ForgeDesignProviderProps } from './types';
3
+ /**
4
+ * ForgeDesignProvider Component
5
+ *
6
+ * @description
7
+ * Main provider component for HeroUI Native that configures the application
8
+ * with global settings. This component should wrap your entire application
9
+ * or the section where you want to use HeroUI Native components.
10
+ *
11
+ * Currently provides:
12
+ * - Global animation settings
13
+ * - Global text component configuration
14
+ * - Toast notification system
15
+ * - Portal management for overlays
16
+ *
17
+ * @param {ForgeDesignProviderProps} props - Provider configuration props
18
+ * @param {ReactNode} props.children - Child components to wrap
19
+ * @param {ForgeDesignConfig} [props.config] - Configuration object
20
+ *
21
+ */
22
+ declare const ForgeDesignProvider: React.FC<ForgeDesignProviderProps>;
23
+ export default ForgeDesignProvider;
24
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/providers/forge-design/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA8B3D,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,82 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { AnimationRootDisableAll } from '../../animation';
3
+ import type { TextComponentContextValue } from '../text-component/types';
4
+ import type { ToastProviderProps } from '../toast/types';
5
+ /**
6
+ * Configuration object for ForgeDesignProvider
7
+ *
8
+ * @interface ForgeDesignConfig
9
+ * @extends TextComponentContextValue
10
+ *
11
+ * @description
12
+ * Contains configuration options for the HeroUI Native provider.
13
+ * Additional configuration options can be added in future versions.
14
+ */
15
+ export interface ForgeDesignConfig extends TextComponentContextValue {
16
+ /**
17
+ * Global animation configuration
18
+ *
19
+ * @description
20
+ * When set to 'disable-all', all animations across the application will be disabled.
21
+ */
22
+ animation?: AnimationRootDisableAll;
23
+ /**
24
+ * Toast configuration
25
+ *
26
+ * @description
27
+ * Configure the global toast system including insets and wrapper components.
28
+ * Set to `false` or `'disabled'` to disable the toast provider entirely.
29
+ * Provide a `ToastProviderProps` object for custom configuration.
30
+ */
31
+ toast?: boolean | 'disabled' | ToastProviderProps;
32
+ }
33
+ /**
34
+ * Props for ForgeDesignProvider component
35
+ *
36
+ * @interface ForgeDesignProviderProps
37
+ *
38
+ * @description
39
+ * Main provider component props that wraps the entire application
40
+ * or a section of it to provide HeroUI Native functionality.
41
+ *
42
+ * @example
43
+ * ```tsx
44
+ * <ForgeDesignProvider config={{
45
+ * textProps: {
46
+ * allowFontScaling: false,
47
+ * maxFontSizeMultiplier: 1.5
48
+ * }
49
+ * }}>
50
+ * <App />
51
+ * </ForgeDesignProvider>
52
+ * ```
53
+ */
54
+ export interface ForgeDesignProviderProps {
55
+ /**
56
+ * Child components to render within the provider
57
+ *
58
+ * @description
59
+ * All children will have access to HeroUI Native theme
60
+ * and configuration through the provider.
61
+ */
62
+ children: ReactNode;
63
+ /**
64
+ * Configuration object for the provider
65
+ *
66
+ * @description
67
+ * Contains all configuration options including global text component configuration.
68
+ *
69
+ * @example
70
+ * ```tsx
71
+ * const config: ForgeDesignConfig = {
72
+ * textProps: {
73
+ * allowFontScaling: false,
74
+ * adjustsFontSizeToFit: false,
75
+ * maxFontSizeMultiplier: 1.5
76
+ * }
77
+ * };
78
+ * ```
79
+ */
80
+ config?: ForgeDesignConfig;
81
+ }
82
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/providers/forge-design/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD;;;;;;;;;GASG;AACH,MAAM,WAAW,iBAAkB,SAAQ,yBAAyB;IAClE;;;;;OAKG;IACH,SAAS,CAAC,EAAE,uBAAuB,CAAC;IACpC;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,kBAAkB,CAAC;CACnD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;;;OAMG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B"}
@@ -0,0 +1,3 @@
1
+ export * from './provider';
2
+ export * from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/providers/text-component/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { TextComponentContextValue } from './types';
2
+ declare const TextComponentProvider: import("react").FunctionComponent<{
3
+ children: import("react").ReactNode;
4
+ value: TextComponentContextValue;
5
+ }>, useTextComponent: () => TextComponentContextValue;
6
+ export { TextComponentProvider, useTextComponent };
7
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/providers/text-component/provider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEzD,QAAA,MAAO,qBAAqB;;;IAAE,gBAAgB,iCACoB,CAAC;AAEnE,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,51 @@
1
+ import type { TextProps } from 'react-native';
2
+ /**
3
+ * Global text component configuration props.
4
+ * These props are carefully selected to include only those that make sense
5
+ * to configure globally across all Text components in the application.
6
+ *
7
+ * @description
8
+ * Includes accessibility and font scaling settings that typically
9
+ * should be consistent throughout the app for better UX.
10
+ */
11
+ export interface TextComponentProps {
12
+ /**
13
+ * Specifies whether fonts should be scaled down automatically to fit given style constraints.
14
+ *
15
+ * @default false
16
+ */
17
+ adjustsFontSizeToFit?: TextProps['adjustsFontSizeToFit'];
18
+ /**
19
+ * Specifies whether fonts should scale to respect Text Size accessibility settings.
20
+ *
21
+ * @default true
22
+ */
23
+ allowFontScaling?: TextProps['allowFontScaling'];
24
+ /**
25
+ * Specifies the largest possible scale a font can reach when `allowFontScaling` is enabled.
26
+ *
27
+ * Possible values:
28
+ *
29
+ * - `null` or `undefined`: inherit from the parent node or the global default (0)
30
+ * - `0`: no max, ignore parent/global default
31
+ * - `>= 1`: sets the `maxFontSizeMultiplier` of this node to this value
32
+ *
33
+ * @default `undefined`
34
+ */
35
+ maxFontSizeMultiplier?: TextProps['maxFontSizeMultiplier'];
36
+ /**
37
+ * Specifies the smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0).
38
+ *
39
+ * iOS only
40
+ *
41
+ * @default `undefined`
42
+ */
43
+ minimumFontScale?: TextProps['minimumFontScale'];
44
+ }
45
+ /**
46
+ * Context value for text component configuration
47
+ */
48
+ export interface TextComponentContextValue {
49
+ textProps?: TextComponentProps;
50
+ }
51
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/providers/text-component/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C;;;;;;;;GAQG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,SAAS,CAAC,sBAAsB,CAAC,CAAC;IACzD;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,SAAS,CAAC,kBAAkB,CAAC,CAAC;IACjD;;;;;;;;;;OAUG;IACH,qBAAqB,CAAC,EAAE,SAAS,CAAC,uBAAuB,CAAC,CAAC;IAC3D;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,SAAS,CAAC,kBAAkB,CAAC,CAAC;CAClD;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,SAAS,CAAC,EAAE,kBAAkB,CAAC;CAChC"}
@@ -0,0 +1,5 @@
1
+ export { ToastProvider, useToast } from './provider';
2
+ export { useToastConfig } from './toast-config.context';
3
+ export { useToastLifecycle } from './lifecycle.context';
4
+ export type * from './types';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/providers/toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,mBAAmB,SAAS,CAAC"}