react-native-bread 0.1.0 → 0.1.2
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.
- package/README.md +102 -84
- package/lib/commonjs/icons/CloseIcon.js +1 -22
- package/lib/commonjs/icons/GreenCheck.js +1 -27
- package/lib/commonjs/icons/InfoIcon.js +1 -24
- package/lib/commonjs/icons/RedX.js +1 -27
- package/lib/commonjs/icons/index.js +1 -34
- package/lib/commonjs/index.js +1 -59
- package/lib/commonjs/toast-api.js +1 -127
- package/lib/commonjs/toast-provider.js +1 -71
- package/lib/commonjs/toast-store.js +1 -278
- package/lib/commonjs/toast.js +1 -445
- package/lib/commonjs/types.js +1 -6
- package/lib/module/icons/CloseIcon.js +1 -16
- package/lib/module/icons/GreenCheck.js +1 -21
- package/lib/module/icons/InfoIcon.js +1 -18
- package/lib/module/icons/RedX.js +1 -21
- package/lib/module/icons/index.js +1 -7
- package/lib/module/index.js +1 -14
- package/lib/module/toast-api.js +1 -124
- package/lib/module/toast-provider.js +1 -67
- package/lib/module/toast-store.js +1 -274
- package/lib/module/toast.js +1 -439
- package/lib/module/types.js +1 -4
- package/lib/typescript/toast-provider.d.ts +13 -12
- package/package.json +7 -6
- package/lib/commonjs/icons/CloseIcon.js.map +0 -1
- package/lib/commonjs/icons/GreenCheck.js.map +0 -1
- package/lib/commonjs/icons/InfoIcon.js.map +0 -1
- package/lib/commonjs/icons/RedX.js.map +0 -1
- package/lib/commonjs/icons/index.js.map +0 -1
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/toast-api.js.map +0 -1
- package/lib/commonjs/toast-provider.js.map +0 -1
- package/lib/commonjs/toast-store.js.map +0 -1
- package/lib/commonjs/toast.js.map +0 -1
- package/lib/commonjs/types.js.map +0 -1
- package/lib/module/icons/CloseIcon.js.map +0 -1
- package/lib/module/icons/GreenCheck.js.map +0 -1
- package/lib/module/icons/InfoIcon.js.map +0 -1
- package/lib/module/icons/RedX.js.map +0 -1
- package/lib/module/icons/index.js.map +0 -1
- package/lib/module/index.js.map +0 -1
- package/lib/module/toast-api.js.map +0 -1
- package/lib/module/toast-provider.js.map +0 -1
- package/lib/module/toast-store.js.map +0 -1
- package/lib/module/toast.js.map +0 -1
- package/lib/module/types.js.map +0 -1
- package/lib/typescript/icons/CloseIcon.d.ts.map +0 -1
- package/lib/typescript/icons/GreenCheck.d.ts.map +0 -1
- package/lib/typescript/icons/InfoIcon.d.ts.map +0 -1
- package/lib/typescript/icons/RedX.d.ts.map +0 -1
- package/lib/typescript/icons/index.d.ts.map +0 -1
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/toast-api.d.ts.map +0 -1
- package/lib/typescript/toast-provider.d.ts.map +0 -1
- package/lib/typescript/toast-store.d.ts.map +0 -1
- package/lib/typescript/toast.d.ts.map +0 -1
- package/lib/typescript/types.d.ts.map +0 -1
- package/src/icons/CloseIcon.tsx +0 -10
- package/src/icons/GreenCheck.tsx +0 -16
- package/src/icons/InfoIcon.tsx +0 -12
- package/src/icons/RedX.tsx +0 -16
- package/src/icons/index.ts +0 -4
- package/src/index.ts +0 -26
- package/src/toast-api.ts +0 -213
- package/src/toast-provider.tsx +0 -81
- package/src/toast-store.ts +0 -270
- package/src/toast.tsx +0 -417
- package/src/types.ts +0 -121
package/lib/module/toast.js
CHANGED
|
@@ -1,439 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
4
|
-
import { ActivityIndicator, Pressable, StyleSheet, Text, View } from "react-native";
|
|
5
|
-
import { Gesture, GestureDetector } from "react-native-gesture-handler";
|
|
6
|
-
import Animated, { Easing, interpolate, interpolateColor, useAnimatedStyle, useSharedValue, withTiming } from "react-native-reanimated";
|
|
7
|
-
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
8
|
-
import { scheduleOnRN } from "react-native-worklets";
|
|
9
|
-
import { CloseIcon, GreenCheck, InfoIcon, RedX } from "./icons/index.js";
|
|
10
|
-
import { toastStore } from "./toast-store.js";
|
|
11
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
const ICON_SIZE = 28;
|
|
13
|
-
|
|
14
|
-
/** Default icon for each toast type */
|
|
15
|
-
const DefaultIcon = ({
|
|
16
|
-
type,
|
|
17
|
-
accentColor
|
|
18
|
-
}) => {
|
|
19
|
-
switch (type) {
|
|
20
|
-
case "success":
|
|
21
|
-
return /*#__PURE__*/_jsx(GreenCheck, {
|
|
22
|
-
width: 36,
|
|
23
|
-
height: 36,
|
|
24
|
-
fill: accentColor
|
|
25
|
-
});
|
|
26
|
-
case "error":
|
|
27
|
-
return /*#__PURE__*/_jsx(RedX, {
|
|
28
|
-
width: ICON_SIZE,
|
|
29
|
-
height: ICON_SIZE,
|
|
30
|
-
fill: accentColor
|
|
31
|
-
});
|
|
32
|
-
case "loading":
|
|
33
|
-
return /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
34
|
-
size: ICON_SIZE,
|
|
35
|
-
color: accentColor
|
|
36
|
-
});
|
|
37
|
-
case "info":
|
|
38
|
-
return /*#__PURE__*/_jsx(InfoIcon, {
|
|
39
|
-
width: ICON_SIZE,
|
|
40
|
-
height: ICON_SIZE,
|
|
41
|
-
fill: accentColor
|
|
42
|
-
});
|
|
43
|
-
default:
|
|
44
|
-
return /*#__PURE__*/_jsx(GreenCheck, {
|
|
45
|
-
width: 36,
|
|
46
|
-
height: 36,
|
|
47
|
-
fill: accentColor
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
/** Resolves the icon to render - checks per-toast, then config, then default */
|
|
53
|
-
const resolveIcon = (type, accentColor, customIcon, configIcon) => {
|
|
54
|
-
// Per-toast custom icon takes priority
|
|
55
|
-
if (customIcon) {
|
|
56
|
-
if (typeof customIcon === "function") {
|
|
57
|
-
return customIcon({
|
|
58
|
-
color: accentColor,
|
|
59
|
-
size: ICON_SIZE
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
return customIcon;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// Config-level custom icon
|
|
66
|
-
if (configIcon) {
|
|
67
|
-
return configIcon({
|
|
68
|
-
color: accentColor,
|
|
69
|
-
size: ICON_SIZE
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// Default icon
|
|
74
|
-
return /*#__PURE__*/_jsx(DefaultIcon, {
|
|
75
|
-
type: type,
|
|
76
|
-
accentColor: accentColor
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
const AnimatedIcon = ({
|
|
80
|
-
type,
|
|
81
|
-
accentColor,
|
|
82
|
-
customIcon,
|
|
83
|
-
configIcon
|
|
84
|
-
}) => {
|
|
85
|
-
const progress = useSharedValue(0);
|
|
86
|
-
useEffect(() => {
|
|
87
|
-
progress.value = withTiming(1, {
|
|
88
|
-
duration: 350,
|
|
89
|
-
easing: Easing.out(Easing.back(1.5))
|
|
90
|
-
});
|
|
91
|
-
}, [progress]);
|
|
92
|
-
const style = useAnimatedStyle(() => ({
|
|
93
|
-
opacity: progress.value,
|
|
94
|
-
transform: [{
|
|
95
|
-
scale: 0.7 + progress.value * 0.3
|
|
96
|
-
}]
|
|
97
|
-
}));
|
|
98
|
-
return /*#__PURE__*/_jsx(Animated.View, {
|
|
99
|
-
style: style,
|
|
100
|
-
children: resolveIcon(type, accentColor, customIcon, configIcon)
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
// singleton instance
|
|
105
|
-
export const ToastContainer = () => {
|
|
106
|
-
const [visibleToasts, setVisibleToasts] = useState([]);
|
|
107
|
-
const [theme, setTheme] = useState(() => toastStore.getTheme());
|
|
108
|
-
const {
|
|
109
|
-
top,
|
|
110
|
-
bottom
|
|
111
|
-
} = useSafeAreaInsets();
|
|
112
|
-
useEffect(() => {
|
|
113
|
-
const initialState = toastStore.getState();
|
|
114
|
-
setVisibleToasts(initialState.visibleToasts);
|
|
115
|
-
setTheme(toastStore.getTheme());
|
|
116
|
-
return toastStore.subscribe(state => {
|
|
117
|
-
setVisibleToasts(state.visibleToasts);
|
|
118
|
-
setTheme(toastStore.getTheme());
|
|
119
|
-
});
|
|
120
|
-
}, []);
|
|
121
|
-
|
|
122
|
-
// Calculate visual index for each toast (exiting toasts don't count)
|
|
123
|
-
const getVisualIndex = useCallback(toastId => {
|
|
124
|
-
let visualIndex = 0;
|
|
125
|
-
for (const t of visibleToasts) {
|
|
126
|
-
if (t.id === toastId) break;
|
|
127
|
-
if (!t.isExiting) visualIndex++;
|
|
128
|
-
}
|
|
129
|
-
return visualIndex;
|
|
130
|
-
}, [visibleToasts]);
|
|
131
|
-
|
|
132
|
-
// Memoize the reversed array to avoid recreating on each render
|
|
133
|
-
const reversedToasts = useMemo(() => [...visibleToasts].reverse(), [visibleToasts]);
|
|
134
|
-
if (visibleToasts.length === 0) {
|
|
135
|
-
return null;
|
|
136
|
-
}
|
|
137
|
-
const isBottom = theme.position === "bottom";
|
|
138
|
-
const inset = isBottom ? bottom : top;
|
|
139
|
-
const positionStyle = isBottom ? {
|
|
140
|
-
bottom: inset + theme.offset + 2
|
|
141
|
-
} : {
|
|
142
|
-
top: inset + theme.offset + 2
|
|
143
|
-
};
|
|
144
|
-
return /*#__PURE__*/_jsx(View, {
|
|
145
|
-
style: [styles.container, positionStyle],
|
|
146
|
-
pointerEvents: "box-none",
|
|
147
|
-
children: reversedToasts.map(toast => {
|
|
148
|
-
const index = toast.isExiting ? -1 : getVisualIndex(toast.id);
|
|
149
|
-
return /*#__PURE__*/_jsx(MemoizedToastItem, {
|
|
150
|
-
toast: toast,
|
|
151
|
-
index: index,
|
|
152
|
-
theme: theme,
|
|
153
|
-
position: theme.position
|
|
154
|
-
}, toast.id);
|
|
155
|
-
})
|
|
156
|
-
});
|
|
157
|
-
};
|
|
158
|
-
const EASING = Easing.bezier(0.25, 0.1, 0.25, 1.0);
|
|
159
|
-
const ToY = 0;
|
|
160
|
-
const Duration = 400;
|
|
161
|
-
const ExitDuration = 350;
|
|
162
|
-
const MaxDragDown = 60;
|
|
163
|
-
const ToastItem = ({
|
|
164
|
-
toast,
|
|
165
|
-
index,
|
|
166
|
-
theme,
|
|
167
|
-
position
|
|
168
|
-
}) => {
|
|
169
|
-
const progress = useSharedValue(0);
|
|
170
|
-
const translationY = useSharedValue(0);
|
|
171
|
-
const isBeingDragged = useSharedValue(false);
|
|
172
|
-
const shouldDismiss = useSharedValue(false);
|
|
173
|
-
|
|
174
|
-
// Position-based animation values
|
|
175
|
-
const isBottom = position === "bottom";
|
|
176
|
-
const entryFromY = isBottom ? 80 : -80;
|
|
177
|
-
const exitToY = isBottom ? 100 : -100;
|
|
178
|
-
|
|
179
|
-
// Stack position animation
|
|
180
|
-
const stackIndex = useSharedValue(index);
|
|
181
|
-
|
|
182
|
-
// Title color animation on variant change
|
|
183
|
-
const colorProgress = useSharedValue(1);
|
|
184
|
-
const fromColor = useSharedValue(theme.colors[toast.type].accent);
|
|
185
|
-
const toColor = useSharedValue(theme.colors[toast.type].accent);
|
|
186
|
-
|
|
187
|
-
// Refs for tracking previous values to avoid unnecessary animations
|
|
188
|
-
const lastHandledType = useRef(toast.type);
|
|
189
|
-
const prevIndex = useRef(index);
|
|
190
|
-
const hasEntered = useRef(false);
|
|
191
|
-
|
|
192
|
-
// Combined animation effect for entry, exit, color transitions, and stack position
|
|
193
|
-
useEffect(() => {
|
|
194
|
-
// Entry animation (only once on mount)
|
|
195
|
-
if (!hasEntered.current && !toast.isExiting) {
|
|
196
|
-
progress.value = withTiming(1, {
|
|
197
|
-
duration: Duration,
|
|
198
|
-
easing: EASING
|
|
199
|
-
});
|
|
200
|
-
hasEntered.current = true;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// Exit animation when isExiting becomes true
|
|
204
|
-
if (toast.isExiting) {
|
|
205
|
-
progress.value = withTiming(0, {
|
|
206
|
-
duration: ExitDuration,
|
|
207
|
-
easing: EASING
|
|
208
|
-
});
|
|
209
|
-
translationY.value = withTiming(exitToY, {
|
|
210
|
-
duration: ExitDuration,
|
|
211
|
-
easing: EASING
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
// Color transition when type changes
|
|
216
|
-
if (toast.type !== lastHandledType.current) {
|
|
217
|
-
fromColor.value = theme.colors[lastHandledType.current].accent;
|
|
218
|
-
toColor.value = theme.colors[toast.type].accent;
|
|
219
|
-
lastHandledType.current = toast.type;
|
|
220
|
-
colorProgress.value = 0;
|
|
221
|
-
colorProgress.value = withTiming(1, {
|
|
222
|
-
duration: 300,
|
|
223
|
-
easing: EASING
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
// Stack position animation when index changes
|
|
228
|
-
if (index >= 0 && prevIndex.current !== index) {
|
|
229
|
-
stackIndex.value = withTiming(index, {
|
|
230
|
-
duration: 300,
|
|
231
|
-
easing: EASING
|
|
232
|
-
});
|
|
233
|
-
prevIndex.current = index;
|
|
234
|
-
}
|
|
235
|
-
}, [toast.isExiting, toast.type, index, progress, translationY, fromColor, toColor, colorProgress, stackIndex, exitToY, theme.colors]);
|
|
236
|
-
const titleColorStyle = useAnimatedStyle(() => ({
|
|
237
|
-
color: interpolateColor(colorProgress.value, [0, 1], [fromColor.value, toColor.value])
|
|
238
|
-
}));
|
|
239
|
-
const dismissToast = useCallback(() => {
|
|
240
|
-
toastStore.hide(toast.id);
|
|
241
|
-
}, [toast.id]);
|
|
242
|
-
const panGesture = Gesture.Pan().onStart(() => {
|
|
243
|
-
"worklet";
|
|
244
|
-
|
|
245
|
-
isBeingDragged.value = true;
|
|
246
|
-
shouldDismiss.value = false;
|
|
247
|
-
}).onUpdate(event => {
|
|
248
|
-
"worklet";
|
|
249
|
-
|
|
250
|
-
const rawY = event.translationY;
|
|
251
|
-
// For top: negative Y = dismiss direction, positive Y = resistance
|
|
252
|
-
// For bottom: positive Y = dismiss direction, negative Y = resistance
|
|
253
|
-
const dismissDrag = isBottom ? rawY : -rawY;
|
|
254
|
-
const resistDrag = isBottom ? -rawY : rawY;
|
|
255
|
-
if (dismissDrag > 0) {
|
|
256
|
-
// Moving toward dismiss direction
|
|
257
|
-
const clampedY = isBottom ? Math.min(rawY, 180) : Math.max(rawY, -180);
|
|
258
|
-
translationY.value = clampedY;
|
|
259
|
-
if (dismissDrag > 40 || (isBottom ? event.velocityY > 300 : event.velocityY < -300)) {
|
|
260
|
-
shouldDismiss.value = true;
|
|
261
|
-
}
|
|
262
|
-
} else {
|
|
263
|
-
// Moving away from edge - apply resistance
|
|
264
|
-
const exponentialDrag = MaxDragDown * (1 - Math.exp(-resistDrag / 250));
|
|
265
|
-
translationY.value = isBottom ? -Math.min(exponentialDrag, MaxDragDown) : Math.min(exponentialDrag, MaxDragDown);
|
|
266
|
-
shouldDismiss.value = false;
|
|
267
|
-
}
|
|
268
|
-
}).onEnd(() => {
|
|
269
|
-
"worklet";
|
|
270
|
-
|
|
271
|
-
isBeingDragged.value = false;
|
|
272
|
-
if (shouldDismiss.value) {
|
|
273
|
-
progress.value = withTiming(0, {
|
|
274
|
-
duration: ExitDuration,
|
|
275
|
-
easing: EASING
|
|
276
|
-
});
|
|
277
|
-
const exitOffset = isBottom ? 200 : -200;
|
|
278
|
-
translationY.value = withTiming(translationY.value + exitOffset, {
|
|
279
|
-
duration: ExitDuration,
|
|
280
|
-
easing: EASING
|
|
281
|
-
});
|
|
282
|
-
scheduleOnRN(dismissToast);
|
|
283
|
-
} else {
|
|
284
|
-
translationY.value = withTiming(0, {
|
|
285
|
-
duration: 650,
|
|
286
|
-
easing: EASING
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
});
|
|
290
|
-
const animatedStyle = useAnimatedStyle(() => {
|
|
291
|
-
const baseTranslateY = interpolate(progress.value, [0, 1], [entryFromY, ToY]);
|
|
292
|
-
|
|
293
|
-
// Stack offset: each toast behind moves away from edge (up for top, down for bottom)
|
|
294
|
-
const stackOffsetY = isBottom ? stackIndex.value * 10 : stackIndex.value * -10;
|
|
295
|
-
|
|
296
|
-
// Stack scale: each toast behind scales down by 0.05
|
|
297
|
-
const stackScale = 1 - stackIndex.value * 0.05;
|
|
298
|
-
const finalTranslateY = baseTranslateY + translationY.value + stackOffsetY;
|
|
299
|
-
const progressOpacity = interpolate(progress.value, [0, 1], [0, 1]);
|
|
300
|
-
// For top: dragging up (negative) fades out. For bottom: dragging down (positive) fades out
|
|
301
|
-
const dismissDirection = isBottom ? translationY.value : -translationY.value;
|
|
302
|
-
const dragOpacity = dismissDirection > 0 ? interpolate(dismissDirection, [0, 130], [1, 0], "clamp") : 1;
|
|
303
|
-
const opacity = progressOpacity * dragOpacity;
|
|
304
|
-
const dragScale = interpolate(Math.abs(translationY.value), [0, 50], [1, 0.98], "clamp");
|
|
305
|
-
const scale = stackScale * dragScale;
|
|
306
|
-
return {
|
|
307
|
-
transform: [{
|
|
308
|
-
translateY: finalTranslateY
|
|
309
|
-
}, {
|
|
310
|
-
scale
|
|
311
|
-
}],
|
|
312
|
-
opacity,
|
|
313
|
-
zIndex: 1000 - stackIndex.value
|
|
314
|
-
};
|
|
315
|
-
});
|
|
316
|
-
const accentColor = theme.colors[toast.type].accent;
|
|
317
|
-
const backgroundColor = theme.colors[toast.type].background;
|
|
318
|
-
const verticalAnchor = isBottom ? {
|
|
319
|
-
bottom: 0
|
|
320
|
-
} : {
|
|
321
|
-
top: 0
|
|
322
|
-
};
|
|
323
|
-
|
|
324
|
-
// Per-toast overrides from options
|
|
325
|
-
const {
|
|
326
|
-
options
|
|
327
|
-
} = toast;
|
|
328
|
-
const customIcon = options?.icon;
|
|
329
|
-
const configIcon = theme.icons[toast.type];
|
|
330
|
-
|
|
331
|
-
// Resolve dismissible and showCloseButton (per-toast overrides config)
|
|
332
|
-
const isDismissible = options?.dismissible ?? theme.dismissible;
|
|
333
|
-
const shouldShowCloseButton = toast.type !== "loading" && (options?.showCloseButton ?? theme.showCloseButton);
|
|
334
|
-
|
|
335
|
-
// Enable/disable gesture based on dismissible setting
|
|
336
|
-
const gesture = isDismissible ? panGesture : Gesture.Pan().enabled(false);
|
|
337
|
-
return /*#__PURE__*/_jsx(GestureDetector, {
|
|
338
|
-
gesture: gesture,
|
|
339
|
-
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
340
|
-
style: [styles.toast, verticalAnchor, {
|
|
341
|
-
backgroundColor
|
|
342
|
-
}, theme.toastStyle, options?.style, animatedStyle],
|
|
343
|
-
children: /*#__PURE__*/_jsxs(View, {
|
|
344
|
-
style: styles.content,
|
|
345
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
346
|
-
style: styles.icon,
|
|
347
|
-
children: /*#__PURE__*/_jsx(AnimatedIcon, {
|
|
348
|
-
type: toast.type,
|
|
349
|
-
accentColor: accentColor,
|
|
350
|
-
customIcon: customIcon,
|
|
351
|
-
configIcon: configIcon
|
|
352
|
-
}, toast.type)
|
|
353
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
354
|
-
style: styles.textContainer,
|
|
355
|
-
children: [/*#__PURE__*/_jsx(Animated.Text, {
|
|
356
|
-
maxFontSizeMultiplier: 1.35,
|
|
357
|
-
allowFontScaling: false,
|
|
358
|
-
style: [styles.title, theme.titleStyle, options?.titleStyle, titleColorStyle],
|
|
359
|
-
children: toast.title
|
|
360
|
-
}), toast.description && /*#__PURE__*/_jsx(Text, {
|
|
361
|
-
allowFontScaling: false,
|
|
362
|
-
maxFontSizeMultiplier: 1.35,
|
|
363
|
-
style: [styles.description, theme.descriptionStyle, options?.descriptionStyle],
|
|
364
|
-
children: toast.description
|
|
365
|
-
})]
|
|
366
|
-
}), shouldShowCloseButton && /*#__PURE__*/_jsx(Pressable, {
|
|
367
|
-
style: styles.closeButton,
|
|
368
|
-
onPress: dismissToast,
|
|
369
|
-
hitSlop: 12,
|
|
370
|
-
children: /*#__PURE__*/_jsx(CloseIcon, {
|
|
371
|
-
width: 20,
|
|
372
|
-
height: 20
|
|
373
|
-
})
|
|
374
|
-
})]
|
|
375
|
-
})
|
|
376
|
-
})
|
|
377
|
-
});
|
|
378
|
-
};
|
|
379
|
-
const MemoizedToastItem = /*#__PURE__*/memo(ToastItem);
|
|
380
|
-
const styles = StyleSheet.create({
|
|
381
|
-
container: {
|
|
382
|
-
position: "absolute",
|
|
383
|
-
left: 16,
|
|
384
|
-
right: 16,
|
|
385
|
-
zIndex: 1000
|
|
386
|
-
},
|
|
387
|
-
closeButton: {
|
|
388
|
-
padding: 4,
|
|
389
|
-
alignItems: "center",
|
|
390
|
-
justifyContent: "center"
|
|
391
|
-
},
|
|
392
|
-
icon: {
|
|
393
|
-
width: 48,
|
|
394
|
-
height: 48,
|
|
395
|
-
alignItems: "center",
|
|
396
|
-
justifyContent: "center",
|
|
397
|
-
marginLeft: 8
|
|
398
|
-
},
|
|
399
|
-
content: {
|
|
400
|
-
alignItems: "center",
|
|
401
|
-
flexDirection: "row",
|
|
402
|
-
gap: 12,
|
|
403
|
-
minHeight: 36
|
|
404
|
-
},
|
|
405
|
-
description: {
|
|
406
|
-
color: "#6B7280",
|
|
407
|
-
fontSize: 12,
|
|
408
|
-
fontWeight: "500",
|
|
409
|
-
lineHeight: 16
|
|
410
|
-
},
|
|
411
|
-
textContainer: {
|
|
412
|
-
flex: 1,
|
|
413
|
-
gap: 1,
|
|
414
|
-
justifyContent: "center"
|
|
415
|
-
},
|
|
416
|
-
title: {
|
|
417
|
-
fontSize: 14,
|
|
418
|
-
fontWeight: "700",
|
|
419
|
-
lineHeight: 20
|
|
420
|
-
},
|
|
421
|
-
toast: {
|
|
422
|
-
borderRadius: 20,
|
|
423
|
-
borderCurve: "continuous",
|
|
424
|
-
position: "absolute",
|
|
425
|
-
left: 0,
|
|
426
|
-
right: 0,
|
|
427
|
-
paddingHorizontal: 12,
|
|
428
|
-
paddingVertical: 10,
|
|
429
|
-
shadowColor: "#000",
|
|
430
|
-
shadowOffset: {
|
|
431
|
-
width: 0,
|
|
432
|
-
height: 8
|
|
433
|
-
},
|
|
434
|
-
shadowOpacity: 0.05,
|
|
435
|
-
shadowRadius: 24,
|
|
436
|
-
elevation: 8
|
|
437
|
-
}
|
|
438
|
-
});
|
|
439
|
-
//# sourceMappingURL=toast.js.map
|
|
1
|
+
"use strict";import{memo as t,useCallback as e,useEffect as o,useMemo as i,useRef as n,useState as s}from"react";import{ActivityIndicator as l,Pressable as r,StyleSheet as a,Text as c,View as u}from"react-native";import{Gesture as d,GestureDetector as p}from"react-native-gesture-handler";import h,{Easing as m,interpolate as g,useAnimatedStyle as f,useDerivedValue as y,useSharedValue as v,withTiming as x}from"react-native-reanimated";import{useSafeAreaInsets as w}from"react-native-safe-area-context";import{scheduleOnRN as b}from"react-native-worklets";import{CloseIcon as S,GreenCheck as C,InfoIcon as I,RedX as z}from"./icons/index.js";import{toastStore as E}from"./toast-store.js";import{jsx as M,jsxs as j}from"react/jsx-runtime";const k=28,T=t(({fill:t})=>M(C,{width:36,height:36,fill:t})),B=t(({fill:t})=>M(z,{width:k,height:k,fill:t})),D=t(({fill:t})=>M(I,{width:k,height:k,fill:t})),F=t(()=>M(S,{width:20,height:20})),H=t(({type:t,accentColor:e})=>{switch(t){case"success":default:return M(T,{fill:e});case"error":return M(B,{fill:e});case"loading":return M(l,{size:k,color:e});case"info":return M(D,{fill:e})}}),Y=(t,e,o,i)=>o?"function"==typeof o?o({color:e,size:k}):o:i?i({color:e,size:k}):M(H,{type:t,accentColor:e}),P=t(({type:t,accentColor:e,customIcon:i,configIcon:n})=>{const s=v(0);o(()=>{s.value=x(1,{duration:350,easing:m.out(m.back(1.5))})},[s]);const l=f(()=>({opacity:s.value,transform:[{scale:.7+.3*s.value}]}));return M(h.View,{style:l,children:Y(t,e,i,n)})}),V=t(({type:t,title:e,description:o,accentColor:i,customIcon:n,configIcon:s,showCloseButton:l,onDismiss:a,titleStyle:d,descriptionStyle:p,optionsTitleStyle:h,optionsDescriptionStyle:m})=>j(u,{style:L.content,children:[M(u,{style:L.icon,children:M(P,{type:t,accentColor:i,customIcon:n,configIcon:s},t)}),j(u,{style:L.textContainer,children:[M(c,{maxFontSizeMultiplier:1.35,allowFontScaling:!1,style:[L.title,{color:i},d,h],children:e}),o&&M(c,{allowFontScaling:!1,maxFontSizeMultiplier:1.35,style:[L.description,p,m],children:o})]}),l&&M(r,{style:L.closeButton,onPress:a,hitSlop:12,children:M(F,{})})]}));export const ToastContainer=()=>{const[t,n]=s([]),[l,r]=s(()=>E.getTheme()),{top:a,bottom:c}=w();o(()=>{const t=E.getState();return n(t.visibleToasts),r(E.getTheme()),E.subscribe(t=>{n(t.visibleToasts),r(E.getTheme())})},[]);const d=e(e=>{let o=0;for(const i of t){if(i.id===e)break;i.isExiting||o++}return o},[t]),p=i(()=>[...t].reverse(),[t]);if(0===t.length)return null;const h="bottom"===l.position,m=h?c:a,g=h?{bottom:m+l.offset+2}:{top:m+l.offset+2};return M(u,{style:[L.container,g],pointerEvents:"box-none",children:p.map(t=>{const e=t.isExiting?-1:d(t.id);return M(W,{toast:t,index:e,theme:l,position:l.position},t.id)})})};const O=m.bezier(.25,.1,.25,1),R=350,W=t(({toast:t,index:s,theme:l,position:r})=>{const a=v(0),c=v(0),u=v(!1),m=v(!1),w="bottom"===r,S=w?80:-80,C=w?100:-100,I=v(s),z=n(t.type),j=n(s),k=n(!1);o(()=>{k.current||t.isExiting||(a.value=x(1,{duration:400,easing:O}),k.current=!0),t.isExiting&&(a.value=x(0,{duration:R,easing:O}),c.value=x(C,{duration:R,easing:O})),t.type!==z.current&&(z.current=t.type),s>=0&&j.current!==s&&(I.value=x(s,{duration:300,easing:O}),j.current=s)},[t.isExiting,t.type,s,a,c,I,C]);const T=e(()=>{E.hide(t.id)},[t.id]),B=i(()=>d.Pan().onStart(()=>{"worklet";u.value=!0,m.value=!1}).onUpdate(t=>{"worklet";const e=t.translationY,o=w?e:-e,i=w?-e:e;if(o>0){const i=w?Math.min(e,180):Math.max(e,-180);c.value=i,(o>40||(w?t.velocityY>300:t.velocityY<-300))&&(m.value=!0)}else{const t=60*(1-Math.exp(-i/250));c.value=w?-Math.min(t,60):Math.min(t,60),m.value=!1}}).onEnd(()=>{"worklet";if(u.value=!1,m.value){a.value=x(0,{duration:R,easing:O});const t=w?200:-200;c.value=x(c.value+t,{duration:R,easing:O}),b(T)}else c.value=x(0,{duration:650,easing:O})}),[w,T,a,c,m,u]),D=i(()=>d.Pan().enabled(!1),[]),F=y(()=>1e3-Math.round(I.value)),H=f(()=>{const t=g(a.value,[0,1],[S,0]),e=w?10*I.value:-10*I.value,o=1-.05*I.value,i=t+c.value+e,n=g(a.value,[0,1],[0,1]),s=w?c.value:-c.value,l=n*(s>0?g(s,[0,130],[1,0],"clamp"):1);return{transform:[{translateY:i},{scale:o*g(Math.abs(c.value),[0,50],[1,.98],"clamp")}],opacity:l,zIndex:F.value}}),Y=l.colors[t.type].accent,P=l.colors[t.type].background,W=w?{bottom:0}:{top:0},{options:U}=t,q=U?.icon,A=l.icons[t.type],G=U?.dismissible??l.dismissible,J="loading"!==t.type&&(U?.showCloseButton??l.showCloseButton),K=G?B:D,N=[L.toast,W,{backgroundColor:P},l.toastStyle,U?.style,H];return M(p,{gesture:K,children:M(h.View,{style:N,children:M(V,{type:t.type,title:t.title,description:t.description,accentColor:Y,customIcon:q,configIcon:A,showCloseButton:J,onDismiss:T,titleStyle:l.titleStyle,descriptionStyle:l.descriptionStyle,optionsTitleStyle:U?.titleStyle,optionsDescriptionStyle:U?.descriptionStyle})})})},(t,e)=>t.toast.id===e.toast.id&&t.toast.type===e.toast.type&&t.toast.title===e.toast.title&&t.toast.description===e.toast.description&&t.toast.isExiting===e.toast.isExiting&&t.index===e.index&&t.position===e.position&&t.theme===e.theme),L=a.create({container:{position:"absolute",left:16,right:16,zIndex:1e3},closeButton:{padding:4,alignItems:"center",justifyContent:"center"},icon:{width:48,height:48,alignItems:"center",justifyContent:"center",marginLeft:8},content:{alignItems:"center",flexDirection:"row",gap:12,minHeight:36},description:{color:"#6B7280",fontSize:12,fontWeight:"500",lineHeight:16},textContainer:{flex:1,gap:1,justifyContent:"center"},title:{fontSize:14,fontWeight:"700",lineHeight:20},toast:{borderRadius:20,borderCurve:"continuous",position:"absolute",left:0,right:0,paddingHorizontal:12,paddingVertical:10,shadowColor:"#000",shadowOffset:{width:0,height:8},shadowOpacity:.05,shadowRadius:24,elevation:8}});
|
package/lib/module/types.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
1
|
import type { ToastConfig } from "./types";
|
|
3
2
|
interface BreadLoafProps {
|
|
4
|
-
children: ReactNode;
|
|
5
3
|
/**
|
|
6
4
|
* Configuration for customizing toast behavior and appearance.
|
|
7
5
|
* All properties are optional and will be merged with defaults.
|
|
@@ -18,17 +16,22 @@ interface BreadLoafProps {
|
|
|
18
16
|
config?: ToastConfig;
|
|
19
17
|
}
|
|
20
18
|
/**
|
|
21
|
-
* Toast
|
|
22
|
-
*
|
|
19
|
+
* Toast component that enables toast notifications in your app.
|
|
20
|
+
* Add `<BreadLoaf />` to your root layout to start showing toasts.
|
|
23
21
|
*
|
|
24
22
|
* @example
|
|
25
23
|
* ```tsx
|
|
26
24
|
* import { BreadLoaf } from 'react-native-bread';
|
|
27
25
|
*
|
|
28
|
-
* // Basic usage
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
26
|
+
* // Basic usage - add to your root layout
|
|
27
|
+
* export default function RootLayout() {
|
|
28
|
+
* return (
|
|
29
|
+
* <>
|
|
30
|
+
* <Stack />
|
|
31
|
+
* <BreadLoaf />
|
|
32
|
+
* </>
|
|
33
|
+
* );
|
|
34
|
+
* }
|
|
32
35
|
*
|
|
33
36
|
* // With configuration
|
|
34
37
|
* <BreadLoaf
|
|
@@ -42,11 +45,9 @@ interface BreadLoafProps {
|
|
|
42
45
|
* },
|
|
43
46
|
* toastStyle: { borderRadius: 12 },
|
|
44
47
|
* }}
|
|
45
|
-
*
|
|
46
|
-
* <App />
|
|
47
|
-
* </BreadLoaf>
|
|
48
|
+
* />
|
|
48
49
|
* ```
|
|
49
50
|
*/
|
|
50
|
-
export declare function BreadLoaf({
|
|
51
|
+
export declare function BreadLoaf({ config }: BreadLoafProps): import("react/jsx-runtime").JSX.Element;
|
|
51
52
|
export {};
|
|
52
53
|
//# sourceMappingURL=toast-provider.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-bread",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "A delicious toast library for React Native with beautiful animations and gesture support",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
7
7
|
"types": "lib/typescript/index.d.ts",
|
|
8
|
-
"react-native": "
|
|
9
|
-
"
|
|
10
|
-
"files": ["src", "lib", "!**/__tests__", "!**/__fixtures__", "!**/__mocks__"],
|
|
8
|
+
"react-native": "lib/module/index.js",
|
|
9
|
+
"files": ["lib", "!**/__tests__", "!**/__fixtures__", "!**/__mocks__", "!**/*.map"],
|
|
11
10
|
"sideEffects": false,
|
|
12
11
|
"repository": {
|
|
13
12
|
"type": "git",
|
|
@@ -22,9 +21,10 @@
|
|
|
22
21
|
"keywords": ["react-native", "toast", "notification", "snackbar", "bread", "animation", "gesture", "reanimated"],
|
|
23
22
|
"scripts": {
|
|
24
23
|
"build": "bob build",
|
|
24
|
+
"minify": "find lib -name '*.js' -not -path '*/node_modules/*' -exec terser {} -o {} -c directives=false -m --module \\;",
|
|
25
25
|
"typecheck": "tsc --noEmit",
|
|
26
26
|
"clean": "rm -rf lib",
|
|
27
|
-
"prepare": "bob build"
|
|
27
|
+
"prepare": "bob build && npm run minify"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"react": "19.1.0",
|
|
@@ -33,8 +33,9 @@
|
|
|
33
33
|
"react-native-gesture-handler": "~2.28.0",
|
|
34
34
|
"react-native-reanimated": "~4.1.1",
|
|
35
35
|
"react-native-safe-area-context": "~5.4.0",
|
|
36
|
-
"react-native-worklets": "0.5.1",
|
|
37
36
|
"react-native-svg": "15.12.1",
|
|
37
|
+
"react-native-worklets": "0.5.1",
|
|
38
|
+
"terser": "^5.44.1",
|
|
38
39
|
"typescript": "~5.9.2"
|
|
39
40
|
},
|
|
40
41
|
"peerDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeSvg","_interopRequireWildcard","require","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CloseIcon","props","jsx","viewBox","width","height","fill","children","Path","d","exports"],"sourceRoot":"../../../src","sources":["icons/CloseIcon.tsx"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA4D,IAAAC,WAAA,GAAAD,OAAA;AAAA,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAErD,MAAMkB,SAAS,GAAIC,KAAe,iBACvC,IAAArB,WAAA,CAAAsB,GAAA,EAACzB,eAAA,CAAAc,OAAG;EAACY,OAAO,EAAC,WAAW;EAACC,KAAK,EAAE,EAAG;EAACC,MAAM,EAAE,EAAG;EAACC,IAAI,EAAC,MAAM;EAAA,GAAKL,KAAK;EAAAM,QAAA,eACnE,IAAA3B,WAAA,CAAAsB,GAAA,EAACzB,eAAA,CAAA+B,IAAI;IACHF,IAAI,EAAEL,KAAK,CAACK,IAAI,IAAI,SAAU;IAC9BG,CAAC,EAAC;EAA+G,CAClH;AAAC,CACC,CACN;AAACC,OAAA,CAAAV,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeSvg","_interopRequireWildcard","require","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","GreenCheck","props","jsxs","viewBox","width","height","fill","children","jsx","Path","fillRule","d","clipRule","exports"],"sourceRoot":"../../../src","sources":["icons/GreenCheck.tsx"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA4D,IAAAC,WAAA,GAAAD,OAAA;AAAA,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,Y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,EAAC;EAAS,CACnB,CAAC,eACF,IAAAhC,WAAA,CAAA4B,GAAA,EAAC/B,eAAA,CAAAgC,IAAI;IACHH,IAAI,EAAC,MAAM;IACXK,CAAC,EAAC;EAA6I,CAChJ,CAAC;AAAA,CACC,CACN;AAACE,OAAA,CAAAb,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeSvg","_interopRequireWildcard","require","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","InfoIcon","props","jsx","viewBox","width","height","fill","children","Path","fillRule","d","clipRule","exports"],"sourceRoot":"../../../src","sources":["icons/InfoIcon.tsx"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA4D,IAAAC,WAAA,GAAAD,OAAA;AAAA,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAErD,MAAMkB,QAAQ,GAAIC,KAAe,iBACtC,IAAArB,WAAA,CAAAsB,GAAA,EAACzB,eAAA,CAAAc,OAAG;EAACY,OAAO,EAAC,WAAW;EAACC,KAAK,EAAE,EAAG;EAACC,MAAM,EAAE,EAAG;EAACC,IAAI,EAAC,MAAM;EAAA,GAAKL,KAAK;EAAAM,QAAA,eACnE,IAAA3B,WAAA,CAAAsB,GAAA,EAACzB,eAAA,CAAA+B,IAAI;IACHF,IAAI,EAAEL,KAAK,CAACK,IAAI,IAAI,SAAU;IAC9BG,QAAQ,EAAC,SAAS;IAClBC,CAAC,EAAC,kGAAkG;IACpGC,QAAQ,EAAC;EAAS,CACnB;AAAC,CACC,CACN;AAACC,OAAA,CAAAZ,QAAA,GAAAA,QAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeSvg","_interopRequireWildcard","require","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","RedX","props","jsxs","viewBox","width","height","fill","children","jsx","Path","fillRule","d","clipRule","exports"],"sourceRoot":"../../../src","sources":["icons/RedX.tsx"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA4D,IAAAC,WAAA,GAAAD,OAAA;AAAA,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,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;IAClBC,CAAC,EAAC,4YAA4Y;IAC9YC,QAAQ,EAAC;EAAS,CACnB,CAAC,eACF,IAAAhC,WAAA,CAAA4B,GAAA,EAAC/B,eAAA,CAAAgC,IAAI;IACHH,IAAI,EAAC,MAAM;IACXK,CAAC,EAAC;EAA8O,CACjP,CAAC;AAAA,CACC,CACN;AAACE,OAAA,CAAAb,IAAA,GAAAA,IAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_CloseIcon","require","_GreenCheck","_InfoIcon","_RedX"],"sourceRoot":"../../../src","sources":["icons/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_index","require","_toast","_toastApi","_toastProvider","_toastStore"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAGA,IAAAI,WAAA,GAAAJ,OAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_toastStore","require","_toast","title","description","type","duration","toastStore","show","parseDescriptionOrOptions","arg","options","parseMessage","input","parseErrorMessage","error","promiseToast","promise","messages","loadingCfg","loading","toastId","result","successCfg","success","updateToast","data","err","Error","String","errorCfg","toastFn","descriptionOrOptions","optDuration","info","dismiss","id","hide","dismissAll","hideAll","toast","exports"],"sourceRoot":"../../src","sources":["toast-api.ts"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAA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AC;AAClF,CAAC;AAEDoB,OAAO,CAAChB,KAAK,GAAG,CAACZ,KAAa,EAAE6B,oBAA2C,EAAE1B,QAAiB,KAAK;EACjG,MAAM;IAAEF,WAAW;IAAEE,QAAQ,EAAE2B,WAAW;IAAEtB;EAAQ,CAAC,GAAGF,yBAAyB,CAACuB,oBAAoB,CAAC;EACvGzB,sBAAU,CAACC,IAAI,CAACL,KAAK,EAAEC,WAAW,EAAE,OAAO,EAAEE,QAAQ,IAAI2B,WAAW,EAAEtB,OAAO,CAAC;AAChF,CAAC;AAEDoB,OAAO,CAACG,IAAI,GAAG,CAAC/B,KAAa,EAAE6B,oBAA2C,EAAE1B,QAAiB,KAAK;EAChG,MAAM;IAAEF,WAAW;IAAEE,QAAQ,EAAE2B,WAAW;IAAEtB;EAAQ,CAAC,GAAGF,yBAAyB,CAACuB,oBAAoB,CAAC;EACvGzB,sBAAU,CAACC,IAAI,CAACL,KAAK,EAAEC,WAAW,EAAE,MAAM,EAAEE,QAAQ,IAAI2B,WAAW,EAAEtB,OAAO,CAAC;AAC/E,CAAC;AAEDoB,OAAO,CAACd,OAAO,GAAGD,YAAY;AAE9Be,OAAO,CAACI,OAAO,GAAIC,EAAU,IAAK;EAChC7B,sBAAU,CAAC8B,IAAI,CAACD,EAAE,CAAC;AACrB,CAAC;AAEDL,OAAO,CAACO,UAAU,GAAG,MAAM;EACzB/B,sBAAU,CAACgC,OAAO,CAAC,CAAC;AACtB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAAGT,OAAO","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_toast","_toastStore","_jsxRuntime","BreadLoaf","children","config","useEffect","toastStore","setConfig","undefined","jsxs","View","style","styles","root","jsx","portalContainer","pointerEvents","ToastContainer","StyleSheet","create","flex","absoluteFillObject","zIndex"],"sourceRoot":"../../src","sources":["toast-provider.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAA2C,IAAAI,WAAA,GAAAJ,OAAA;AAqB3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASK,SAASA,CAAC;EAAEC,QAAQ;EAAEC;AAAuB,CAAC,EAAE;EAC9D,IAAAC,gBAAS,EAAC,MAAM;IACdC,sBAAU,CAACC,SAAS,CAACH,MAAM,CAAC;IAC5B,OAAO,MAAM;MACX;MACAE,sBAAU,CAACC,SAAS,CAACC,SAAS,CAAC;IACjC,CAAC;EACH,CAAC,EAAE,CAACJ,MAAM,CAAC,CAAC;EACZ,oBACE,IAAAH,WAAA,CAAAQ,IAAA,EAACX,YAAA,CAAAY,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC,IAAK;IAAAV,QAAA,GACtBA,QAAQ,eACT,IAAAF,WAAA,CAAAa,GAAA,EAAChB,YAAA,CAAAY,IAAI;MAACC,KAAK,EAAEC,MAAM,CAACG,eAAgB;MAACC,aAAa,EAAC,UAAU;MAAAb,QAAA,eAC3D,IAAAF,WAAA,CAAAa,GAAA,EAACf,MAAA,CAAAkB,cAAc,IAAE;IAAC,CACd,CAAC;EAAA,CACH,CAAC;AAEX;AAEA,MAAML,MAAM,GAAGM,uBAAU,CAACC,MAAM,CAAC;EAC/BN,IAAI,EAAE;IACJO,IAAI,EAAE;EACR,CAAC;EACDL,eAAe,EAAE;IACf,GAAGG,uBAAU,CAACG,kBAAkB;IAChCC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["EXIT_DURATION","DEFAULT_THEME","position","offset","stacking","maxStack","dismissible","showCloseButton","colors","success","accent","background","error","info","loading","icons","toastStyle","titleStyle","descriptionStyle","defaultDuration","mergeConfig","config","mergedColors","type","Object","keys","userColors","ToastStore","state","visibleToasts","theme","listeners","Set","toastIdCounter","timeouts","Map","subscribe","listener","add","delete","emit","setState","partial","getState","getTheme","setConfig","show","title","description","duration","options","actualDuration","maxToasts","id","newToast","createdAt","Date","now","isExiting","activeToasts","filter","t","length","toastsToRemove","slice","toast","timeout","get","clearTimeout","removeIds","map","has","setTimeout","removeToast","addToast","scheduleTimeout","rescheduleAllTimeouts","baseDuration","index","existingTimeout","hide","set","forEach","find","updateToast","data","findIndex","undefined","hideAll","values","clear","toastStore","exports"],"sourceRoot":"../../src","sources":["toast-store.ts"],"mappings":";;;;;;AAIA,MAAMA,aAAa,GAAG,GAAG;;AAEzB;AACA,MAAMC,aAAyB,GAAG;EAChCC,QAAQ,EAAE,KAAK;EACfC,MAAM,EAAE,CAAC;EACTC,QAAQ,EAAE,IAAI;EACdC,QAAQ,EAAE,CAAC;EACXC,WAAW,EAAE,IAAI;EACjBC,eAAe,EAAE,IAAI;EACrBC,MAAM,EAAE;IACNC,OAAO,EAAE;MAAEC,MAAM,EAAE,SAAS;MAAEC,UAAU,EAAE;IAAU,CAAC;IACrDC,KAAK,EAAE;MAAEF,MAAM,EAAE,SAAS;MAAEC,UAAU,EAAE;IAAU,CAAC;IACnDE,IAAI,EAAE;MAAEH,MAAM,EAAE,SAAS;MAAEC,UAAU,EAAE;IAAU,CAAC;IAClDG,OAAO,EAAE;MAAEJ,MAAM,EAAE,SAAS;MAAEC,UAAU,EAAE;IAAU;EACtD,CAAC;EACDI,KAAK,EAAE,CAAC,CAAC;EACTC,UAAU,EAAE,CAAC,CAAC;EACdC,UAAU,EAAE,CAAC,CAAC;EACdC,gBAAgB,EAAE,C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