@tamagui/toast 3.0.0-beta.1434.1 → 3.0.0-beta.1449.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.
@@ -632,9 +632,8 @@ const ToastItemInner = (0, import_core.createStyledHOC)(import_ToastItemFrame.To
632
632
  }
633
633
  });
634
634
  const handleLayout = React.useCallback((event) => {
635
- if (!import_constants.isWeb) return;
636
635
  if (removed) return;
637
- if (!ctx.expanded && index !== 0) return;
636
+ if ((!import_constants.isWeb || !ctx.expanded) && index !== 0) return;
638
637
  const { height } = event.nativeEvent.layout;
639
638
  ctx.setToastHeight(toast.id, height);
640
639
  }, [
@@ -645,7 +644,6 @@ const ToastItemInner = (0, import_core.createStyledHOC)(import_ToastItemFrame.To
645
644
  removed
646
645
  ]);
647
646
  React.useEffect(() => {
648
- if (!import_constants.isWeb) return;
649
647
  return () => {
650
648
  ctx.removeToastHeight(toast.id);
651
649
  };
@@ -670,13 +668,11 @@ const ToastItemInner = (0, import_core.createStyledHOC)(import_ToastItemFrame.To
670
668
  handleClose
671
669
  }), [toast, handleClose]);
672
670
  let frontToastHeight = -1;
673
- if (import_constants.isWeb) {
674
- for (const t of ctx.toasts) {
675
- const h = ctx.heights[t.id];
676
- if (h != null && h > 0) {
677
- frontToastHeight = h;
678
- break;
679
- }
671
+ for (const t of ctx.toasts) {
672
+ const h = ctx.heights[t.id];
673
+ if (h != null && h > 0) {
674
+ frontToastHeight = h;
675
+ break;
680
676
  }
681
677
  }
682
678
  const stackScale = !ctx.expanded && !isFront ? 1 - index * .05 : 1;
@@ -684,7 +680,8 @@ const ToastItemInner = (0, import_core.createStyledHOC)(import_ToastItemFrame.To
684
680
  const stackY = ctx.expanded ? isTop ? activeExpandedOffset : -activeExpandedOffset : isFront ? 0 : isTop ? ctx.gap * index : -ctx.gap * index;
685
681
  const computedOpacity = removed && !swipeOut ? 0 : index >= ctx.visibleToasts ? 0 : 1;
686
682
  const computedZIndex = removed ? 0 : ctx.visibleToasts - index + 1;
687
- const computedHeight = import_constants.isWeb ? ctx.expanded ? ctx.heights[toast.id] || void 0 : !isFront && frontToastHeight > 0 ? frontToastHeight : void 0 : void 0;
683
+ const collapsedHeight = !isFront && frontToastHeight > 0 ? frontToastHeight : void 0;
684
+ const computedHeight = ctx.expanded ? import_constants.isWeb ? ctx.heights[toast.id] || void 0 : void 0 : collapsedHeight;
688
685
  const computedPointerEvents = index >= ctx.visibleToasts ? "none" : "auto";
689
686
  const gapFillerHeight = ctx.expanded ? ctx.gap + 1 : 0;
690
687
  const dataAttributes = {
@@ -714,7 +711,7 @@ const ToastItemInner = (0, import_core.createStyledHOC)(import_ToastItemFrame.To
714
711
  pointerEvents: computedPointerEvents,
715
712
  top: isTop ? 0 : void 0,
716
713
  bottom: isTop ? void 0 : 0,
717
- ...import_constants.isWeb && !isFront && { style: { transformOrigin: isTop ? "top center" : "bottom center" } },
714
+ ...!isFront && { style: { transformOrigin: isTop ? "top center" : "bottom center" } },
718
715
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DragWrapper, {
719
716
  animatedStyle,
720
717
  gestureHandlers,
@@ -741,6 +738,7 @@ const ToastItemInner = (0, import_core.createStyledHOC)(import_ToastItemFrame.To
741
738
  handleClose();
742
739
  }
743
740
  } },
741
+ ...!import_constants.isWeb && computedHeight != null && { flex: 1 },
744
742
  ...rest,
745
743
  children: [ctx.expanded && gapFillerHeight > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.View, {
746
744
  position: "absolute",
@@ -684,9 +684,8 @@ var ToastItemInner = (0, import_core.createStyledHOC)(import_ToastItemFrame.Toas
684
684
  }
685
685
  });
686
686
  var handleLayout = React.useCallback(function(event) {
687
- if (!import_constants.isWeb) return;
688
687
  if (removed) return;
689
- if (!ctx.expanded && index !== 0) return;
688
+ if ((!import_constants.isWeb || !ctx.expanded) && index !== 0) return;
690
689
  var { height } = event.nativeEvent.layout;
691
690
  ctx.setToastHeight(toast.id, height);
692
691
  }, [
@@ -697,7 +696,6 @@ var ToastItemInner = (0, import_core.createStyledHOC)(import_ToastItemFrame.Toas
697
696
  removed
698
697
  ]);
699
698
  React.useEffect(function() {
700
- if (!import_constants.isWeb) return;
701
699
  return function() {
702
700
  ctx.removeToastHeight(toast.id);
703
701
  };
@@ -727,29 +725,27 @@ var ToastItemInner = (0, import_core.createStyledHOC)(import_ToastItemFrame.Toas
727
725
  };
728
726
  }, [toast, handleClose]);
729
727
  var frontToastHeight = -1;
730
- if (import_constants.isWeb) {
731
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
728
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
729
+ try {
730
+ for (var _iterator = ctx.toasts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
731
+ var t = _step.value;
732
+ var h = ctx.heights[t.id];
733
+ if (h != null && h > 0) {
734
+ frontToastHeight = h;
735
+ break;
736
+ }
737
+ }
738
+ } catch (err) {
739
+ _didIteratorError = true;
740
+ _iteratorError = err;
741
+ } finally {
732
742
  try {
733
- for (var _iterator = ctx.toasts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
734
- var t = _step.value;
735
- var h = ctx.heights[t.id];
736
- if (h != null && h > 0) {
737
- frontToastHeight = h;
738
- break;
739
- }
743
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
744
+ _iterator.return();
740
745
  }
741
- } catch (err) {
742
- _didIteratorError = true;
743
- _iteratorError = err;
744
746
  } finally {
745
- try {
746
- if (!_iteratorNormalCompletion && _iterator.return != null) {
747
- _iterator.return();
748
- }
749
- } finally {
750
- if (_didIteratorError) {
751
- throw _iteratorError;
752
- }
747
+ if (_didIteratorError) {
748
+ throw _iteratorError;
753
749
  }
754
750
  }
755
751
  }
@@ -758,7 +754,8 @@ var ToastItemInner = (0, import_core.createStyledHOC)(import_ToastItemFrame.Toas
758
754
  var stackY = ctx.expanded ? isTop ? activeExpandedOffset : -activeExpandedOffset : isFront ? 0 : isTop ? ctx.gap * index : -ctx.gap * index;
759
755
  var computedOpacity = removed && !swipeOut ? 0 : index >= ctx.visibleToasts ? 0 : 1;
760
756
  var computedZIndex = removed ? 0 : ctx.visibleToasts - index + 1;
761
- var computedHeight = import_constants.isWeb ? ctx.expanded ? ctx.heights[toast.id] || void 0 : !isFront && frontToastHeight > 0 ? frontToastHeight : void 0 : void 0;
757
+ var collapsedHeight = !isFront && frontToastHeight > 0 ? frontToastHeight : void 0;
758
+ var computedHeight = ctx.expanded ? import_constants.isWeb ? ctx.heights[toast.id] || void 0 : void 0 : collapsedHeight;
762
759
  var computedPointerEvents = index >= ctx.visibleToasts ? "none" : "auto";
763
760
  var gapFillerHeight = ctx.expanded ? ctx.gap + 1 : 0;
764
761
  var dataAttributes = {
@@ -789,7 +786,7 @@ var ToastItemInner = (0, import_core.createStyledHOC)(import_ToastItemFrame.Toas
789
786
  pointerEvents: computedPointerEvents,
790
787
  top: isTop ? 0 : void 0,
791
788
  bottom: isTop ? void 0 : 0,
792
- ...import_constants.isWeb && !isFront && { style: { transformOrigin: isTop ? "top center" : "bottom center" } },
789
+ ...!isFront && { style: { transformOrigin: isTop ? "top center" : "bottom center" } },
793
790
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DragWrapper, {
794
791
  animatedStyle,
795
792
  gestureHandlers,
@@ -816,6 +813,7 @@ var ToastItemInner = (0, import_core.createStyledHOC)(import_ToastItemFrame.Toas
816
813
  handleClose();
817
814
  }
818
815
  } },
816
+ ...!import_constants.isWeb && computedHeight != null && { flex: 1 },
819
817
  ...rest,
820
818
  children: [ctx.expanded && gapFillerHeight > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.View, {
821
819
  position: "absolute",
@@ -684,9 +684,8 @@ var ToastItemInner = (0, import_core.createStyledHOC)(import_ToastItemFrame.Toas
684
684
  }
685
685
  });
686
686
  var handleLayout = React.useCallback(function(event) {
687
- if (!import_constants.isWeb) return;
688
687
  if (removed) return;
689
- if (!ctx.expanded && index !== 0) return;
688
+ if ((!import_constants.isWeb || !ctx.expanded) && index !== 0) return;
690
689
  var { height } = event.nativeEvent.layout;
691
690
  ctx.setToastHeight(toast.id, height);
692
691
  }, [
@@ -697,7 +696,6 @@ var ToastItemInner = (0, import_core.createStyledHOC)(import_ToastItemFrame.Toas
697
696
  removed
698
697
  ]);
699
698
  React.useEffect(function() {
700
- if (!import_constants.isWeb) return;
701
699
  return function() {
702
700
  ctx.removeToastHeight(toast.id);
703
701
  };
@@ -727,29 +725,27 @@ var ToastItemInner = (0, import_core.createStyledHOC)(import_ToastItemFrame.Toas
727
725
  };
728
726
  }, [toast, handleClose]);
729
727
  var frontToastHeight = -1;
730
- if (import_constants.isWeb) {
731
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
728
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
729
+ try {
730
+ for (var _iterator = ctx.toasts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
731
+ var t = _step.value;
732
+ var h = ctx.heights[t.id];
733
+ if (h != null && h > 0) {
734
+ frontToastHeight = h;
735
+ break;
736
+ }
737
+ }
738
+ } catch (err) {
739
+ _didIteratorError = true;
740
+ _iteratorError = err;
741
+ } finally {
732
742
  try {
733
- for (var _iterator = ctx.toasts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
734
- var t = _step.value;
735
- var h = ctx.heights[t.id];
736
- if (h != null && h > 0) {
737
- frontToastHeight = h;
738
- break;
739
- }
743
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
744
+ _iterator.return();
740
745
  }
741
- } catch (err) {
742
- _didIteratorError = true;
743
- _iteratorError = err;
744
746
  } finally {
745
- try {
746
- if (!_iteratorNormalCompletion && _iterator.return != null) {
747
- _iterator.return();
748
- }
749
- } finally {
750
- if (_didIteratorError) {
751
- throw _iteratorError;
752
- }
747
+ if (_didIteratorError) {
748
+ throw _iteratorError;
753
749
  }
754
750
  }
755
751
  }
@@ -758,7 +754,8 @@ var ToastItemInner = (0, import_core.createStyledHOC)(import_ToastItemFrame.Toas
758
754
  var stackY = ctx.expanded ? isTop ? activeExpandedOffset : -activeExpandedOffset : isFront ? 0 : isTop ? ctx.gap * index : -ctx.gap * index;
759
755
  var computedOpacity = removed && !swipeOut ? 0 : index >= ctx.visibleToasts ? 0 : 1;
760
756
  var computedZIndex = removed ? 0 : ctx.visibleToasts - index + 1;
761
- var computedHeight = import_constants.isWeb ? ctx.expanded ? ctx.heights[toast.id] || void 0 : !isFront && frontToastHeight > 0 ? frontToastHeight : void 0 : void 0;
757
+ var collapsedHeight = !isFront && frontToastHeight > 0 ? frontToastHeight : void 0;
758
+ var computedHeight = ctx.expanded ? import_constants.isWeb ? ctx.heights[toast.id] || void 0 : void 0 : collapsedHeight;
762
759
  var computedPointerEvents = index >= ctx.visibleToasts ? "none" : "auto";
763
760
  var gapFillerHeight = ctx.expanded ? ctx.gap + 1 : 0;
764
761
  var dataAttributes = {
@@ -789,7 +786,7 @@ var ToastItemInner = (0, import_core.createStyledHOC)(import_ToastItemFrame.Toas
789
786
  pointerEvents: computedPointerEvents,
790
787
  top: isTop ? 0 : void 0,
791
788
  bottom: isTop ? void 0 : 0,
792
- ...import_constants.isWeb && !isFront && { style: { transformOrigin: isTop ? "top center" : "bottom center" } },
789
+ ...!isFront && { style: { transformOrigin: isTop ? "top center" : "bottom center" } },
793
790
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DragWrapper, {
794
791
  animatedStyle,
795
792
  gestureHandlers,
@@ -816,6 +813,7 @@ var ToastItemInner = (0, import_core.createStyledHOC)(import_ToastItemFrame.Toas
816
813
  handleClose();
817
814
  }
818
815
  } },
816
+ ...!import_constants.isWeb && computedHeight != null && { flex: 1 },
819
817
  ...rest,
820
818
  children: [ctx.expanded && gapFillerHeight > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.View, {
821
819
  position: "absolute",
@@ -1 +1 @@
1
- {"version":3,"file":"ToastComposable.native.js","names":[],"sources":["cjs/ToastComposable.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar ToastComposable_exports = {};\n__export(ToastComposable_exports, {\n Toast: () => Toast,\n useToastItem: () => useToastItem,\n useToasts: () => useToasts\n});\nmodule.exports = __toCommonJS(ToastComposable_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_core = require(\"@tamagui/core\");\nvar import_animate_presence = require(\"@tamagui/animate-presence\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_native = require(\"@tamagui/native\");\nvar import_core2 = require(\"@tamagui/core\");\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_portal = require(\"@tamagui/portal\");\nvar import_stacks = require(\"@tamagui/stacks\");\nvar import_text = require(\"@tamagui/text\");\nvar React = __toESM(require(\"react\"), 1);\nvar import_ToastState = require(\"./ToastState\");\nvar import_dispatchNativeToast = require(\"./dispatchNativeToast\");\nvar import_useAnimatedDragGesture = require(\"./useAnimatedDragGesture\");\nvar import_useToastAnimations = require(\"./useToastAnimations\");\nvar import_useReducedMotion = require(\"./useReducedMotion\");\nvar import_ToastItemFrame = require(\"./ToastItemFrame\");\nvar VISIBLE_TOASTS_AMOUNT = 4;\nvar VIEWPORT_OFFSET = 16;\nvar TOAST_GAP = 14;\nvar TOAST_LIFETIME = 4e3;\nvar FIXED_TOAST_HEIGHT = 72;\nvar TIME_BEFORE_UNMOUNT = 200;\nvar DEFAULT_HOTKEY = [\n \"altKey\",\n \"KeyT\"\n];\nvar ToastContext = (0, import_core2.createStyledContext)({}, \"Toast__\");\nvar useToastContextValue = ToastContext.useStyledContext;\nfunction hasToastContext(ctx) {\n return !!ctx && Array.isArray(ctx.toasts) && typeof ctx.setToastHeight === \"function\" && typeof ctx.removeToast === \"function\";\n}\nfunction useToastContext(consumerName) {\n var ctx = useToastContextValue();\n if (!hasToastContext(ctx)) {\n throw new Error(`\\`${consumerName}\\` must be used within \\`Toast\\``);\n }\n return ctx;\n}\nvar ToastItemContext = /* @__PURE__ */ React.createContext(null);\nfunction useToastItemContext() {\n var ctx = React.useContext(ToastItemContext);\n if (!ctx) {\n throw new Error(\"useToastItemContext must be used within Toast.Item or Toast.List\");\n }\n return ctx;\n}\nfunction resolveSwipeDirection(direction, position) {\n if (direction !== \"auto\") return direction;\n var [yPosition, xPosition] = position.split(\"-\");\n if (!import_constants.isWeb) {\n return yPosition === \"top\" ? \"up\" : \"down\";\n }\n if (xPosition === \"left\") return \"left\";\n if (xPosition === \"right\") return \"right\";\n return \"horizontal\";\n}\nvar ToastRoot = (0, import_core.createRefComponent)(function ToastRoot2(props, _ref) {\n var { children, toasterId, position = \"bottom-right\", duration = TOAST_LIFETIME, gap = TOAST_GAP, visibleToasts = VISIBLE_TOASTS_AMOUNT, swipeDirection: swipeDirectionProp = \"auto\", swipeThreshold = 50, toastHeight = FIXED_TOAST_HEIGHT, closeButton = false, expand = false, reducedMotion: reducedMotionProp, native = false, burntOptions, notificationOptions, icons } = props;\n var reducedMotion = (0, import_useReducedMotion.useReducedMotion)(reducedMotionProp);\n var [toasts, setToasts] = React.useState([]);\n var [heights, setHeights] = React.useState({});\n var [localExpanded, setExpanded] = React.useState(false);\n var expanded = expand || localExpanded;\n var [interacting, setInteracting] = React.useState(false);\n var heightsLockedRef = React.useRef(false);\n var prevExpandedRef = React.useRef(expanded);\n React.useLayoutEffect(function() {\n if (prevExpandedRef.current !== expanded) {\n heightsLockedRef.current = true;\n prevExpandedRef.current = expanded;\n }\n var timer = setTimeout(function() {\n heightsLockedRef.current = false;\n }, 350);\n return function() {\n return clearTimeout(timer);\n };\n }, [\n expanded\n ]);\n var setToastHeight = React.useCallback(function(toastId, height) {\n if (heightsLockedRef.current) return;\n var rounded = Math.round(height);\n setHeights(function(prev) {\n var existing = prev[toastId];\n if (existing != null && Math.abs(existing - rounded) <= 2) return prev;\n return {\n ...prev,\n [toastId]: rounded\n };\n });\n }, []);\n var removeToastHeight = React.useCallback(function(toastId) {\n setHeights(function(prev) {\n if (!(toastId in prev)) return prev;\n var next = {\n ...prev\n };\n delete next[toastId];\n return next;\n });\n }, []);\n var dismissCooldownRef = React.useRef(false);\n var dismissCooldownTimerRef = React.useRef(null);\n var triggerDismissCooldown = React.useCallback(function() {\n dismissCooldownRef.current = true;\n if (dismissCooldownTimerRef.current) {\n clearTimeout(dismissCooldownTimerRef.current);\n }\n dismissCooldownTimerRef.current = setTimeout(function() {\n dismissCooldownRef.current = false;\n }, 800);\n }, []);\n var isInDismissCooldown = React.useCallback(function() {\n return dismissCooldownRef.current;\n }, []);\n var burntOptionsRef = React.useRef(burntOptions);\n var notificationOptionsRef = React.useRef(notificationOptions);\n React.useEffect(function() {\n burntOptionsRef.current = burntOptions;\n }, [\n burntOptions\n ]);\n React.useEffect(function() {\n notificationOptionsRef.current = notificationOptions;\n }, [\n notificationOptions\n ]);\n React.useEffect(function() {\n return import_ToastState.ToastState.subscribe(function(toast) {\n if (toast.dismiss) {\n setToasts(function(toasts2) {\n return toasts2.map(function(t) {\n return t.id === toast.id ? {\n ...t,\n delete: true\n } : t;\n });\n });\n return;\n }\n if (toast.toasterId !== toasterId) {\n return;\n }\n if (native) {\n var handled = (0, import_dispatchNativeToast.dispatchNativeToast)(toast, {\n duration,\n burntOptions: burntOptionsRef.current,\n notificationOptions: notificationOptionsRef.current\n });\n if (handled) return;\n }\n setToasts(function(toasts2) {\n var idx = toasts2.findIndex(function(t) {\n return t.id === toast.id;\n });\n if (idx !== -1) {\n return [\n ...toasts2.slice(0, idx),\n // a re-created toast is shown again: drop the delete flag a\n // previous dismiss left on it, or it would never render again.\n {\n ...toasts2[idx],\n ...toast,\n delete: false\n },\n ...toasts2.slice(idx + 1)\n ];\n }\n return [\n toast,\n ...toasts2\n ];\n });\n });\n }, [\n native,\n duration,\n toasterId\n ]);\n var prevToastCountRef = React.useRef(toasts.length);\n React.useEffect(function() {\n var prevCount = prevToastCountRef.current;\n prevToastCountRef.current = toasts.length;\n if (toasts.length <= 1 && !dismissCooldownRef.current) {\n setExpanded(false);\n } else if (toasts.length > prevCount && expanded) {\n setExpanded(false);\n }\n }, [\n toasts.length,\n expanded\n ]);\n var removeToast = React.useCallback(function(toastToRemove) {\n setToasts(function(toasts2) {\n var _toasts_find;\n if (!((_toasts_find = toasts2.find(function(t) {\n return t.id === toastToRemove.id;\n })) === null || _toasts_find === void 0 ? void 0 : _toasts_find.delete)) {\n import_ToastState.ToastState.dismiss(toastToRemove.id);\n }\n return toasts2.filter(function(param) {\n var { id } = param;\n return id !== toastToRemove.id;\n });\n });\n }, []);\n var swipeDirection = resolveSwipeDirection(swipeDirectionProp, position);\n var contextValue = {\n toasts,\n heights,\n setToastHeight,\n removeToastHeight,\n expanded,\n setExpanded,\n interacting,\n setInteracting,\n triggerDismissCooldown,\n isInDismissCooldown,\n removeToast,\n position,\n duration,\n gap,\n visibleToasts,\n swipeDirection,\n swipeThreshold,\n toastHeight,\n closeButton,\n reducedMotion,\n native,\n burntOptions,\n notificationOptions,\n icons\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastContext.Provider, {\n ...contextValue,\n children\n });\n});\nvar ToastViewportFrame = (0, import_core2.styled)(import_core2.View, {\n displayName: \"ToastViewport\",\n position: import_constants.isWeb ? \"fixed\" : \"absolute\",\n zIndex: 1e5,\n pointerEvents: \"box-none\",\n maxWidth: \"100%\",\n ...import_constants.isWeb && {\n width: 356\n },\n minHeight: 1\n});\nvar ToastViewport = (0, import_core.createStyledHOC)(ToastViewportFrame, function ToastViewport2(props, ref) {\n var { offset = VIEWPORT_OFFSET, hotkey = DEFAULT_HOTKEY, label = \"Notifications\", portalToRoot = true, portalZIndex = Number.MAX_SAFE_INTEGER, children, ...rest } = props;\n var ctx = useToastContext(\"Toast.Viewport\");\n var listRef = React.useRef(null);\n var hoverTimeoutRef = React.useRef(null);\n var hoverCooldownRef = React.useRef(false);\n var deferredCollapseRef = React.useRef(null);\n var mouseInsideRef = React.useRef(false);\n var [yPosition, xPosition] = ctx.position.split(\"-\");\n var defaultOffset = typeof offset === \"number\" ? offset : VIEWPORT_OFFSET;\n var offsetObj = typeof offset === \"object\" ? offset : {\n top: defaultOffset,\n right: defaultOffset,\n bottom: defaultOffset,\n left: defaultOffset\n };\n var _offsetObj_top, _offsetObj_bottom;\n var edgeProps = yPosition === \"top\" ? {\n top: \"safe\",\n marginTop: (_offsetObj_top = offsetObj.top) !== null && _offsetObj_top !== void 0 ? _offsetObj_top : defaultOffset\n } : {\n bottom: \"safe\",\n marginBottom: (_offsetObj_bottom = offsetObj.bottom) !== null && _offsetObj_bottom !== void 0 ? _offsetObj_bottom : defaultOffset\n };\n var _offsetObj_left, _offsetObj_right, _offsetObj_left1, _offsetObj_right1;\n var sideProps = import_constants.isWeb ? xPosition === \"left\" ? {\n left: \"safe\",\n marginLeft: (_offsetObj_left = offsetObj.left) !== null && _offsetObj_left !== void 0 ? _offsetObj_left : defaultOffset\n } : xPosition === \"right\" ? {\n right: \"safe\",\n marginRight: (_offsetObj_right = offsetObj.right) !== null && _offsetObj_right !== void 0 ? _offsetObj_right : defaultOffset\n } : null : (\n // native: always set both left + right so viewport fills screen\n // (no fixed width on native — left/right offsets define the width)\n {\n left: \"safe\",\n marginLeft: (_offsetObj_left1 = offsetObj.left) !== null && _offsetObj_left1 !== void 0 ? _offsetObj_left1 : defaultOffset,\n right: \"safe\",\n marginRight: (_offsetObj_right1 = offsetObj.right) !== null && _offsetObj_right1 !== void 0 ? _offsetObj_right1 : defaultOffset\n }\n );\n var centerStyle = import_constants.isWeb && xPosition === \"center\" ? {\n left: \"50%\",\n transform: \"translateX(-50%)\"\n } : null;\n React.useEffect(function() {\n if (!import_constants.isWeb) return;\n var handleKeyDown = function(event) {\n var isHotkeyPressed = hotkey.length > 0 && hotkey.every(function(key) {\n return event[key] || event.code === key;\n });\n if (isHotkeyPressed) {\n var _listRef_current;\n ctx.setExpanded(true);\n (_listRef_current = listRef.current) === null || _listRef_current === void 0 ? void 0 : _listRef_current.focus();\n }\n };\n document.addEventListener(\"keydown\", handleKeyDown);\n return function() {\n return document.removeEventListener(\"keydown\", handleKeyDown);\n };\n }, [\n hotkey\n ]);\n if (ctx.toasts.length === 0) return null;\n var hotkeyLabel = hotkey.join(\"+\").replace(/Key/g, \"\").replace(/Digit/g, \"\");\n var content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastViewportFrame, {\n ref: listRef,\n \"aria-label\": `${label} ${hotkeyLabel}`,\n tabIndex: -1,\n \"aria-live\": \"polite\",\n ...edgeProps,\n ...sideProps,\n ...centerStyle ? {\n style: centerStyle\n } : null,\n \"data-y-position\": yPosition,\n \"data-x-position\": xPosition,\n ...import_constants.isWeb ? {\n onMouseEnter: function() {\n mouseInsideRef.current = true;\n if (deferredCollapseRef.current) {\n clearTimeout(deferredCollapseRef.current);\n deferredCollapseRef.current = null;\n }\n if (ctx.toasts.length > 1 && !ctx.interacting && !hoverCooldownRef.current) {\n hoverTimeoutRef.current = setTimeout(function() {\n return ctx.setExpanded(true);\n }, 50);\n }\n },\n onMouseLeave: function() {\n mouseInsideRef.current = false;\n if (hoverTimeoutRef.current) {\n clearTimeout(hoverTimeoutRef.current);\n hoverTimeoutRef.current = null;\n }\n if (!ctx.interacting && !ctx.isInDismissCooldown()) {\n ctx.setExpanded(false);\n } else if (ctx.isInDismissCooldown()) {\n if (deferredCollapseRef.current) {\n clearTimeout(deferredCollapseRef.current);\n }\n deferredCollapseRef.current = setTimeout(function() {\n deferredCollapseRef.current = null;\n if (!mouseInsideRef.current) {\n ctx.setExpanded(false);\n }\n }, 1200);\n }\n },\n onPointerDown: function() {\n if (hoverTimeoutRef.current) {\n clearTimeout(hoverTimeoutRef.current);\n hoverTimeoutRef.current = null;\n }\n ctx.setInteracting(true);\n },\n onPointerUp: function() {\n return ctx.setInteracting(false);\n },\n onPointerCancel: function() {\n return ctx.setInteracting(false);\n }\n } : {\n onPress: function() {\n if (ctx.toasts.length > 1) {\n ctx.setExpanded(function(prev) {\n return !prev;\n });\n }\n }\n },\n ...import_constants.isWeb && {\n onFocus: function(event) {\n if (!event.currentTarget.contains(event.relatedTarget)) {\n if (ctx.toasts.length > 1) {\n ctx.setExpanded(true);\n }\n ctx.setInteracting(true);\n }\n },\n onBlur: function(event) {\n if (!event.currentTarget.contains(event.relatedTarget)) {\n ctx.setInteracting(false);\n if (!ctx.isInDismissCooldown()) {\n ctx.setExpanded(false);\n }\n }\n }\n },\n ...rest,\n children\n });\n if (portalToRoot) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.Portal, {\n zIndex: portalZIndex,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastContext.Provider, {\n ...ctx,\n children: content\n })\n });\n }\n return content;\n});\nfunction ToastList(param) {\n var { renderItem } = param;\n var ctx = useToastContext(\"Toast.List\");\n var maxRender = ctx.toasts.length;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate_presence.AnimatePresence, {\n children: ctx.toasts.slice(0, maxRender).map(function(toast, index) {\n var handleClose = function() {\n var _toast_onDismiss;\n if (toast.dismissible === false) return;\n (_toast_onDismiss = toast.onDismiss) === null || _toast_onDismiss === void 0 ? void 0 : _toast_onDismiss.call(toast, toast);\n ctx.removeToast(toast);\n };\n var itemContextValue = {\n toast,\n handleClose\n };\n if (!renderItem) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastItemContext.Provider, {\n value: itemContextValue,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastItemInner, {\n toast,\n index,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DefaultToastContent, {\n toast\n })\n })\n }, toast.id);\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastItemContext.Provider, {\n value: itemContextValue,\n children: renderItem({\n toast,\n index,\n handleClose\n })\n }, toast.id);\n })\n });\n}\nfunction DefaultToastContent(param) {\n var { toast } = param;\n var ctx = useToastContext(\"Toast.Item\");\n var { handleClose } = useToastItemContext();\n var _toast_type;\n var toastType = (_toast_type = toast.type) !== null && _toast_type !== void 0 ? _toast_type : \"default\";\n var dismissible = toast.dismissible !== false;\n var title = typeof toast.title === \"function\" ? toast.title() : toast.title;\n var description = typeof toast.description === \"function\" ? toast.description() : toast.description;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_stacks.XStack, {\n alignItems: \"flex-start\",\n gap: \"3\",\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastIcon, {}),\n /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_stacks.YStack, {\n flex: 1,\n gap: \"1\",\n children: [\n title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastTitle, {\n children: title\n }),\n description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastDescription, {\n children: description\n }),\n (toast.action || toast.cancel) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_stacks.XStack, {\n gap: \"2\",\n marginTop: \"2\",\n children: [\n toast.cancel && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ToastItemFrame.ToastActionFrame, {\n onPress: function(e) {\n var _toast_cancel_onClick, _toast_cancel;\n (_toast_cancel = toast.cancel) === null || _toast_cancel === void 0 ? void 0 : (_toast_cancel_onClick = _toast_cancel.onClick) === null || _toast_cancel_onClick === void 0 ? void 0 : _toast_cancel_onClick.call(_toast_cancel, e);\n handleClose();\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.SizableText, {\n size: \"2\",\n children: toast.cancel.label\n })\n }),\n toast.action && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ToastItemFrame.ToastActionFrame, {\n onPress: function(e) {\n var _toast_action_onClick, _toast_action;\n (_toast_action = toast.action) === null || _toast_action === void 0 ? void 0 : (_toast_action_onClick = _toast_action.onClick) === null || _toast_action_onClick === void 0 ? void 0 : _toast_action_onClick.call(_toast_action, e);\n if (!e.defaultPrevented) {\n handleClose();\n }\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.SizableText, {\n size: \"2\",\n children: toast.action.label\n })\n })\n ]\n })\n ]\n }),\n ctx.closeButton && dismissible && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastClose, {})\n ]\n });\n}\nfunction DragWrapper(param) {\n var { animatedStyle, gestureHandlers, gesture, AnimatedView, dragRef, children } = param;\n if (import_constants.isWeb) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"div\", {\n ref: dragRef,\n style: {\n flex: 1,\n display: \"flex\",\n flexDirection: \"column\",\n userSelect: \"none\",\n WebkitUserSelect: \"none\",\n touchAction: \"none\",\n cursor: \"default\"\n },\n ...gestureHandlers,\n children\n });\n }\n if (gesture) {\n var gh = (0, import_native.getGestureHandler)();\n var GestureDetector = gh.state.GestureDetector;\n if (GestureDetector) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GestureDetector, {\n gesture,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.View, {\n style: {\n flex: 1\n },\n ...{\n collapsable: false\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AnimatedView, {\n style: [\n {\n flex: 1\n },\n animatedStyle\n ],\n children\n })\n })\n });\n }\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AnimatedView, {\n style: [\n {\n flex: 1\n },\n animatedStyle\n ],\n ...gestureHandlers,\n children\n });\n}\nvar ToastItemInner = (0, import_core.createStyledHOC)(import_ToastItemFrame.ToastItemFrame, function ToastItem(props, ref) {\n var { toast, index, children, ...rest } = props;\n var ctx = useToastContext(\"Toast.Item\");\n var [mounted, setMounted] = React.useState(false);\n var [removed, setRemoved] = React.useState(false);\n var [swipeOut, setSwipeOut] = React.useState(false);\n var [offsetBeforeRemove, setOffsetBeforeRemove] = React.useState(0);\n var swipeExitYRef = React.useRef(null);\n var closeTimerRef = React.useRef(null);\n var closeTimerStartRef = React.useRef(0);\n var lastPauseTimeRef = React.useRef(0);\n var _toast_duration;\n var remainingTimeRef = React.useRef((_toast_duration = toast.duration) !== null && _toast_duration !== void 0 ? _toast_duration : ctx.duration);\n var isFront = index === 0;\n var isVisible = index < ctx.visibleToasts;\n var _toast_type;\n var toastType = (_toast_type = toast.type) !== null && _toast_type !== void 0 ? _toast_type : \"default\";\n var dismissible = toast.dismissible !== false;\n var _toast_duration1;\n var duration = (_toast_duration1 = toast.duration) !== null && _toast_duration1 !== void 0 ? _toast_duration1 : ctx.duration;\n var [yPosition] = ctx.position.split(\"-\");\n var isTop = yPosition === \"top\";\n var expandedOffset = import_constants.isWeb ? (function() {\n var totalHeight = 0;\n var activeCount = 0;\n for (var i = 0; i < index; i++) {\n var _ctx_toasts_i;\n var toastId = (_ctx_toasts_i = ctx.toasts[i]) === null || _ctx_toasts_i === void 0 ? void 0 : _ctx_toasts_i.id;\n if (toastId == null) continue;\n var h2 = ctx.heights[toastId];\n if (h2 === 0) continue;\n totalHeight += h2 !== null && h2 !== void 0 ? h2 : ctx.toastHeight;\n activeCount++;\n }\n return totalHeight + activeCount * ctx.gap;\n })() : index * (ctx.toastHeight + ctx.gap);\n var expandedOffsetRef = React.useRef(expandedOffset);\n expandedOffsetRef.current = expandedOffset;\n var isExpandedRef = React.useRef(ctx.expanded);\n isExpandedRef.current = ctx.expanded;\n var startTimer = React.useCallback(function() {\n if (duration === Number.POSITIVE_INFINITY || toastType === \"loading\") return;\n closeTimerStartRef.current = Date.now();\n closeTimerRef.current = setTimeout(function() {\n var _toast_onAutoClose;\n (_toast_onAutoClose = toast.onAutoClose) === null || _toast_onAutoClose === void 0 ? void 0 : _toast_onAutoClose.call(toast, toast);\n setRemoved(true);\n setTimeout(function() {\n return ctx.removeToast(toast);\n }, TIME_BEFORE_UNMOUNT);\n }, remainingTimeRef.current);\n }, [\n duration,\n toastType,\n toast,\n ctx.removeToast\n ]);\n var pauseTimer = (0, import_core2.useEvent)(function() {\n if (closeTimerRef.current) {\n clearTimeout(closeTimerRef.current);\n }\n if (lastPauseTimeRef.current < closeTimerStartRef.current) {\n var elapsed = Date.now() - closeTimerStartRef.current;\n remainingTimeRef.current = Math.max(0, remainingTimeRef.current - elapsed);\n }\n lastPauseTimeRef.current = Date.now();\n });\n var resumeTimer = (0, import_core2.useEvent)(function() {\n if (ctx.expanded || ctx.interacting) return;\n remainingTimeRef.current = duration;\n startTimer();\n });\n React.useEffect(function() {\n setMounted(true);\n }, []);\n React.useEffect(function() {\n if (!toast.delete) {\n setRemoved(false);\n return;\n }\n setRemoved(true);\n if (isExpandedRef.current) {\n setOffsetBeforeRemove(expandedOffsetRef.current);\n }\n var timer = setTimeout(function() {\n return ctx.removeToast(toast);\n }, TIME_BEFORE_UNMOUNT);\n return function() {\n return clearTimeout(timer);\n };\n }, [\n toast.delete,\n toast,\n ctx.removeToast\n ]);\n React.useEffect(function() {\n if (ctx.expanded || ctx.interacting) {\n pauseTimer();\n } else {\n startTimer();\n }\n return function() {\n if (closeTimerRef.current) clearTimeout(closeTimerRef.current);\n };\n }, [\n ctx.expanded,\n ctx.interacting,\n startTimer\n ]);\n React.useEffect(function() {\n remainingTimeRef.current = duration;\n }, [\n duration\n ]);\n var { setDragOffset, springBack, animateOut, animatedStyle, AnimatedView, dragRef } = (0, import_useToastAnimations.useToastAnimations)({\n reducedMotion: ctx.reducedMotion\n });\n var { isDragging, gestureHandlers, gesture } = (0, import_useAnimatedDragGesture.useAnimatedDragGesture)({\n direction: ctx.swipeDirection,\n threshold: ctx.swipeThreshold,\n disabled: !dismissible || toastType === \"loading\",\n expanded: ctx.expanded,\n onDragStart: pauseTimer,\n onDragMove: setDragOffset,\n onDismiss: function(exitDirection, velocity) {\n var _toast_onDismiss;\n ctx.triggerDismissCooldown();\n setSwipeOut(true);\n (_toast_onDismiss = toast.onDismiss) === null || _toast_onDismiss === void 0 ? void 0 : _toast_onDismiss.call(toast, toast);\n swipeExitYRef.current = isExpandedRef.current ? isTop ? expandedOffsetRef.current : -expandedOffsetRef.current : isFront ? 0 : isTop ? ctx.gap * index : -ctx.gap * index;\n setRemoved(true);\n ctx.removeToast(toast);\n animateOut(exitDirection, velocity);\n },\n onCancel: function() {\n springBack(function() {\n resumeTimer();\n });\n }\n });\n var handleLayout = React.useCallback(function(event) {\n if (!import_constants.isWeb) return;\n if (removed) return;\n if (!ctx.expanded && index !== 0) return;\n var { height } = event.nativeEvent.layout;\n ctx.setToastHeight(toast.id, height);\n }, [\n toast.id,\n ctx.setToastHeight,\n index,\n ctx.expanded,\n removed\n ]);\n React.useEffect(function() {\n if (!import_constants.isWeb) return;\n return function() {\n ctx.removeToastHeight(toast.id);\n };\n }, [\n toast.id,\n ctx.removeToastHeight\n ]);\n var handleClose = React.useCallback(function() {\n var _toast_onDismiss;\n if (!dismissible) return;\n ctx.triggerDismissCooldown();\n (_toast_onDismiss = toast.onDismiss) === null || _toast_onDismiss === void 0 ? void 0 : _toast_onDismiss.call(toast, toast);\n setRemoved(true);\n if (isExpandedRef.current) {\n setOffsetBeforeRemove(expandedOffsetRef.current);\n }\n setTimeout(function() {\n return ctx.removeToast(toast);\n }, TIME_BEFORE_UNMOUNT);\n }, [\n dismissible,\n toast,\n ctx.removeToast,\n ctx.triggerDismissCooldown\n ]);\n var itemContextValue = React.useMemo(function() {\n return {\n toast,\n handleClose\n };\n }, [\n toast,\n handleClose\n ]);\n var frontToastHeight = -1;\n if (import_constants.isWeb) {\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = ctx.toasts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var t = _step.value;\n var h = ctx.heights[t.id];\n if (h != null && h > 0) {\n frontToastHeight = h;\n break;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n }\n var stackScale = !ctx.expanded && !isFront ? 1 - index * 0.05 : 1;\n var activeExpandedOffset = removed ? offsetBeforeRemove : expandedOffset;\n var stackY = ctx.expanded ? isTop ? activeExpandedOffset : -activeExpandedOffset : isFront ? 0 : isTop ? ctx.gap * index : -ctx.gap * index;\n var computedOpacity = removed && !swipeOut ? 0 : index >= ctx.visibleToasts ? 0 : 1;\n var computedZIndex = removed ? 0 : ctx.visibleToasts - index + 1;\n var computedHeight = import_constants.isWeb ? ctx.expanded ? ctx.heights[toast.id] || void 0 : !isFront && frontToastHeight > 0 ? frontToastHeight : void 0 : void 0;\n var computedPointerEvents = index >= ctx.visibleToasts ? \"none\" : \"auto\";\n var gapFillerHeight = ctx.expanded ? ctx.gap + 1 : 0;\n var dataAttributes = {\n \"data-mounted\": mounted ? \"true\" : \"false\",\n \"data-removed\": removed ? \"true\" : \"false\",\n \"data-swipe-out\": swipeOut ? \"true\" : \"false\",\n \"data-visible\": isVisible ? \"true\" : \"false\",\n \"data-front\": isFront ? \"true\" : \"false\",\n \"data-index\": String(index),\n \"data-type\": toastType,\n \"data-expanded\": ctx.expanded ? \"true\" : \"false\"\n };\n var _swipeExitYRef_current;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ToastItemFrame.ToastPositionWrapper, {\n ref,\n testID: rest.testID,\n ...dataAttributes,\n transition: isDragging || ctx.reducedMotion ? void 0 : {\n duration: removed ? 200 : 400,\n // height only collapses the stack on web; native relayouts\n properties: import_constants.isWeb ? \"transform, opacity, height\" : \"transform, opacity\"\n },\n y: ctx.reducedMotion ? stackY : (\n // every value needs an explicit `px` — a bare number inside a\n // transition string is a string, so `-14` would resolve as the\n // space token `-14` (= -56px) instead of -14 pixels\n `${stackY}px enter:${isTop ? -80 : 80}px exit:${swipeOut ? (_swipeExitYRef_current = swipeExitYRef.current) !== null && _swipeExitYRef_current !== void 0 ? _swipeExitYRef_current : stackY : stackY}px`\n ),\n scale: stackScale,\n opacity: `${computedOpacity} enter:0 exit:0`,\n zIndex: computedZIndex,\n height: computedHeight,\n overflow: \"visible\",\n pointerEvents: computedPointerEvents,\n top: isTop ? 0 : void 0,\n bottom: isTop ? void 0 : 0,\n ...import_constants.isWeb && !isFront && {\n style: {\n transformOrigin: isTop ? \"top center\" : \"bottom center\"\n }\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DragWrapper, {\n animatedStyle,\n gestureHandlers,\n gesture,\n AnimatedView,\n dragRef,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ToastItemFrame.ToastItemFrame, {\n role: \"status\",\n \"aria-live\": \"polite\",\n \"aria-atomic\": true,\n tabIndex: 0,\n onLayout: handleLayout,\n ...import_constants.isWeb && {\n onKeyDown: function(event) {\n if (event.key === \"Escape\" && dismissible) {\n var current = event.currentTarget;\n var container = current.closest(\"[aria-label]\");\n if (container) {\n var focusables = container.querySelectorAll('[tabindex=\"0\"]');\n var arr = Array.from(focusables);\n var idx = arr.indexOf(current);\n var next = arr[idx + 1] || arr[idx - 1];\n next === null || next === void 0 ? void 0 : next.focus();\n }\n handleClose();\n }\n }\n },\n ...rest,\n children: [\n /* gap filler to prevent hover flicker */\n ctx.expanded && gapFillerHeight > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.View, {\n position: \"absolute\",\n left: 0,\n right: 0,\n height: gapFillerHeight,\n pointerEvents: \"auto\",\n ...isTop ? {\n top: \"100%\"\n } : {\n bottom: \"100%\"\n }\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastItemContext.Provider, {\n value: itemContextValue,\n children\n })\n ]\n })\n })\n });\n});\nvar ToastTitle = (0, import_core2.styled)(import_text.SizableText, {\n displayName: \"ToastTitle\"\n});\nvar ToastDescription = (0, import_core2.styled)(import_text.SizableText, {\n displayName: \"ToastDescription\"\n});\nvar ToastClose = (0, import_core.createStyledHOC)(import_ToastItemFrame.ToastCloseFrame, function ToastClose2(props, ref) {\n var _ctx_icons;\n var handleClose;\n try {\n var itemCtx = useToastItemContext();\n handleClose = itemCtx.handleClose;\n } catch (e) {\n }\n var ctx = useToastContext(\"Toast.Close\");\n var _props_children, _ref;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ToastItemFrame.ToastCloseFrame, {\n ref,\n \"aria-label\": \"Close toast\",\n onPress: handleClose,\n ...props,\n children: (_ref = (_props_children = props.children) !== null && _props_children !== void 0 ? _props_children : (_ctx_icons = ctx.icons) === null || _ctx_icons === void 0 ? void 0 : _ctx_icons.close) !== null && _ref !== void 0 ? _ref : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ToastItemFrame.DefaultCloseIcon, {})\n });\n});\nvar ToastAction = (0, import_core.createStyledHOC)(import_ToastItemFrame.ToastActionFrame, function ToastAction2(props, ref) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ToastItemFrame.ToastActionFrame, {\n ref,\n ...props\n });\n});\nfunction ToastIcon(props) {\n var _ctx_icons;\n var ctx = useToastContext(\"Toast.Icon\");\n var toast;\n try {\n var itemCtx = useToastItemContext();\n toast = itemCtx.toast;\n } catch (e) {\n return null;\n }\n if (!toast) return null;\n if (toast.icon !== void 0) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.View, {\n flexShrink: 0,\n marginTop: \"0-5\",\n children: toast.icon\n });\n }\n var _toast_type;\n var toastType = (_toast_type = toast.type) !== null && _toast_type !== void 0 ? _toast_type : \"default\";\n var _ctx_icons_toastType;\n var icon = (_ctx_icons_toastType = (_ctx_icons = ctx.icons) === null || _ctx_icons === void 0 ? void 0 : _ctx_icons[toastType]) !== null && _ctx_icons_toastType !== void 0 ? _ctx_icons_toastType : null;\n if (!icon) return null;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.View, {\n flexShrink: 0,\n marginTop: \"0-5\",\n children: icon\n });\n}\nfunction useToasts() {\n var ctx = useToastContext(\"useToasts\");\n return {\n toasts: ctx.toasts,\n expanded: ctx.expanded,\n position: ctx.position,\n closeButton: ctx.closeButton\n };\n}\nfunction useToastItem() {\n return useToastItemContext();\n}\nToastRoot.displayName = \"Toast\";\nvar Toast = (0, import_helpers.withStaticProperties)(ToastRoot, {\n Viewport: ToastViewport,\n List: ToastList,\n Item: ToastItemInner,\n Title: ToastTitle,\n Description: ToastDescription,\n Close: ToastClose,\n Action: ToastAction,\n Icon: ToastIcon\n});\n//# sourceMappingURL=ToastComposable.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B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uBAAuB;CACrM,IAAI,CAAC,MAAM,OAAO;CAClB,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,aAAa,MAAM;EACpE,YAAY;EACZ,WAAW;EACX,UAAU;CACZ,CAAC;AACH;AACA,SAAS,YAAY;CACnB,IAAI,MAAM,gBAAgB,WAAW;CACrC,OAAO;EACL,QAAQ,IAAI;EACZ,UAAU,IAAI;EACd,UAAU,IAAI;EACd,aAAa,IAAI;CACnB;AACF;AACA,SAAS,eAAe;CACtB,OAAO,oBAAoB;AAC7B;AACA,UAAU,cAAc;AACxB,IAAI,SAAS,GAAG,eAAe,qBAAoB,CAAE,WAAW;CAC9D,UAAU;CACV,MAAM;CACN,MAAM;CACN,OAAO;CACP,aAAa;CACb,OAAO;CACP,QAAQ;CACR,MAAM;AACR,CAAC"}
1
+ {"version":3,"file":"ToastComposable.native.js","names":[],"sources":["cjs/ToastComposable.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar ToastComposable_exports = {};\n__export(ToastComposable_exports, {\n Toast: () => Toast,\n useToastItem: () => useToastItem,\n useToasts: () => useToasts\n});\nmodule.exports = __toCommonJS(ToastComposable_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_core = require(\"@tamagui/core\");\nvar import_animate_presence = require(\"@tamagui/animate-presence\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_native = require(\"@tamagui/native\");\nvar import_core2 = require(\"@tamagui/core\");\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_portal = require(\"@tamagui/portal\");\nvar import_stacks = require(\"@tamagui/stacks\");\nvar import_text = require(\"@tamagui/text\");\nvar React = __toESM(require(\"react\"), 1);\nvar import_ToastState = require(\"./ToastState\");\nvar import_dispatchNativeToast = require(\"./dispatchNativeToast\");\nvar import_useAnimatedDragGesture = require(\"./useAnimatedDragGesture\");\nvar import_useToastAnimations = require(\"./useToastAnimations\");\nvar import_useReducedMotion = require(\"./useReducedMotion\");\nvar import_ToastItemFrame = require(\"./ToastItemFrame\");\nvar VISIBLE_TOASTS_AMOUNT = 4;\nvar VIEWPORT_OFFSET = 16;\nvar TOAST_GAP = 14;\nvar TOAST_LIFETIME = 4e3;\nvar FIXED_TOAST_HEIGHT = 72;\nvar TIME_BEFORE_UNMOUNT = 200;\nvar DEFAULT_HOTKEY = [\n \"altKey\",\n \"KeyT\"\n];\nvar ToastContext = (0, import_core2.createStyledContext)({}, \"Toast__\");\nvar useToastContextValue = ToastContext.useStyledContext;\nfunction hasToastContext(ctx) {\n return !!ctx && Array.isArray(ctx.toasts) && typeof ctx.setToastHeight === \"function\" && typeof ctx.removeToast === \"function\";\n}\nfunction useToastContext(consumerName) {\n var ctx = useToastContextValue();\n if (!hasToastContext(ctx)) {\n throw new Error(`\\`${consumerName}\\` must be used within \\`Toast\\``);\n }\n return ctx;\n}\nvar ToastItemContext = /* @__PURE__ */ React.createContext(null);\nfunction useToastItemContext() {\n var ctx = React.useContext(ToastItemContext);\n if (!ctx) {\n throw new Error(\"useToastItemContext must be used within Toast.Item or Toast.List\");\n }\n return ctx;\n}\nfunction resolveSwipeDirection(direction, position) {\n if (direction !== \"auto\") return direction;\n var [yPosition, xPosition] = position.split(\"-\");\n if (!import_constants.isWeb) {\n return yPosition === \"top\" ? \"up\" : \"down\";\n }\n if (xPosition === \"left\") return \"left\";\n if (xPosition === \"right\") return \"right\";\n return \"horizontal\";\n}\nvar ToastRoot = (0, import_core.createRefComponent)(function ToastRoot2(props, _ref) {\n var { children, toasterId, position = \"bottom-right\", duration = TOAST_LIFETIME, gap = TOAST_GAP, visibleToasts = VISIBLE_TOASTS_AMOUNT, swipeDirection: swipeDirectionProp = \"auto\", swipeThreshold = 50, toastHeight = FIXED_TOAST_HEIGHT, closeButton = false, expand = false, reducedMotion: reducedMotionProp, native = false, burntOptions, notificationOptions, icons } = props;\n var reducedMotion = (0, import_useReducedMotion.useReducedMotion)(reducedMotionProp);\n var [toasts, setToasts] = React.useState([]);\n var [heights, setHeights] = React.useState({});\n var [localExpanded, setExpanded] = React.useState(false);\n var expanded = expand || localExpanded;\n var [interacting, setInteracting] = React.useState(false);\n var heightsLockedRef = React.useRef(false);\n var prevExpandedRef = React.useRef(expanded);\n React.useLayoutEffect(function() {\n if (prevExpandedRef.current !== expanded) {\n heightsLockedRef.current = true;\n prevExpandedRef.current = expanded;\n }\n var timer = setTimeout(function() {\n heightsLockedRef.current = false;\n }, 350);\n return function() {\n return clearTimeout(timer);\n };\n }, [\n expanded\n ]);\n var setToastHeight = React.useCallback(function(toastId, height) {\n if (heightsLockedRef.current) return;\n var rounded = Math.round(height);\n setHeights(function(prev) {\n var existing = prev[toastId];\n if (existing != null && Math.abs(existing - rounded) <= 2) return prev;\n return {\n ...prev,\n [toastId]: rounded\n };\n });\n }, []);\n var removeToastHeight = React.useCallback(function(toastId) {\n setHeights(function(prev) {\n if (!(toastId in prev)) return prev;\n var next = {\n ...prev\n };\n delete next[toastId];\n return next;\n });\n }, []);\n var dismissCooldownRef = React.useRef(false);\n var dismissCooldownTimerRef = React.useRef(null);\n var triggerDismissCooldown = React.useCallback(function() {\n dismissCooldownRef.current = true;\n if (dismissCooldownTimerRef.current) {\n clearTimeout(dismissCooldownTimerRef.current);\n }\n dismissCooldownTimerRef.current = setTimeout(function() {\n dismissCooldownRef.current = false;\n }, 800);\n }, []);\n var isInDismissCooldown = React.useCallback(function() {\n return dismissCooldownRef.current;\n }, []);\n var burntOptionsRef = React.useRef(burntOptions);\n var notificationOptionsRef = React.useRef(notificationOptions);\n React.useEffect(function() {\n burntOptionsRef.current = burntOptions;\n }, [\n burntOptions\n ]);\n React.useEffect(function() {\n notificationOptionsRef.current = notificationOptions;\n }, [\n notificationOptions\n ]);\n React.useEffect(function() {\n return import_ToastState.ToastState.subscribe(function(toast) {\n if (toast.dismiss) {\n setToasts(function(toasts2) {\n return toasts2.map(function(t) {\n return t.id === toast.id ? {\n ...t,\n delete: true\n } : t;\n });\n });\n return;\n }\n if (toast.toasterId !== toasterId) {\n return;\n }\n if (native) {\n var handled = (0, import_dispatchNativeToast.dispatchNativeToast)(toast, {\n duration,\n burntOptions: burntOptionsRef.current,\n notificationOptions: notificationOptionsRef.current\n });\n if (handled) return;\n }\n setToasts(function(toasts2) {\n var idx = toasts2.findIndex(function(t) {\n return t.id === toast.id;\n });\n if (idx !== -1) {\n return [\n ...toasts2.slice(0, idx),\n // a re-created toast is shown again: drop the delete flag a\n // previous dismiss left on it, or it would never render again.\n {\n ...toasts2[idx],\n ...toast,\n delete: false\n },\n ...toasts2.slice(idx + 1)\n ];\n }\n return [\n toast,\n ...toasts2\n ];\n });\n });\n }, [\n native,\n duration,\n toasterId\n ]);\n var prevToastCountRef = React.useRef(toasts.length);\n React.useEffect(function() {\n var prevCount = prevToastCountRef.current;\n prevToastCountRef.current = toasts.length;\n if (toasts.length <= 1 && !dismissCooldownRef.current) {\n setExpanded(false);\n } else if (toasts.length > prevCount && expanded) {\n setExpanded(false);\n }\n }, [\n toasts.length,\n expanded\n ]);\n var removeToast = React.useCallback(function(toastToRemove) {\n setToasts(function(toasts2) {\n var _toasts_find;\n if (!((_toasts_find = toasts2.find(function(t) {\n return t.id === toastToRemove.id;\n })) === null || _toasts_find === void 0 ? void 0 : _toasts_find.delete)) {\n import_ToastState.ToastState.dismiss(toastToRemove.id);\n }\n return toasts2.filter(function(param) {\n var { id } = param;\n return id !== toastToRemove.id;\n });\n });\n }, []);\n var swipeDirection = resolveSwipeDirection(swipeDirectionProp, position);\n var contextValue = {\n toasts,\n heights,\n setToastHeight,\n removeToastHeight,\n expanded,\n setExpanded,\n interacting,\n setInteracting,\n triggerDismissCooldown,\n isInDismissCooldown,\n removeToast,\n position,\n duration,\n gap,\n visibleToasts,\n swipeDirection,\n swipeThreshold,\n toastHeight,\n closeButton,\n reducedMotion,\n native,\n burntOptions,\n notificationOptions,\n icons\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastContext.Provider, {\n ...contextValue,\n children\n });\n});\nvar ToastViewportFrame = (0, import_core2.styled)(import_core2.View, {\n displayName: \"ToastViewport\",\n position: import_constants.isWeb ? \"fixed\" : \"absolute\",\n zIndex: 1e5,\n pointerEvents: \"box-none\",\n maxWidth: \"100%\",\n ...import_constants.isWeb && {\n width: 356\n },\n minHeight: 1\n});\nvar ToastViewport = (0, import_core.createStyledHOC)(ToastViewportFrame, function ToastViewport2(props, ref) {\n var { offset = VIEWPORT_OFFSET, hotkey = DEFAULT_HOTKEY, label = \"Notifications\", portalToRoot = true, portalZIndex = Number.MAX_SAFE_INTEGER, children, ...rest } = props;\n var ctx = useToastContext(\"Toast.Viewport\");\n var listRef = React.useRef(null);\n var hoverTimeoutRef = React.useRef(null);\n var hoverCooldownRef = React.useRef(false);\n var deferredCollapseRef = React.useRef(null);\n var mouseInsideRef = React.useRef(false);\n var [yPosition, xPosition] = ctx.position.split(\"-\");\n var defaultOffset = typeof offset === \"number\" ? offset : VIEWPORT_OFFSET;\n var offsetObj = typeof offset === \"object\" ? offset : {\n top: defaultOffset,\n right: defaultOffset,\n bottom: defaultOffset,\n left: defaultOffset\n };\n var _offsetObj_top, _offsetObj_bottom;\n var edgeProps = yPosition === \"top\" ? {\n top: \"safe\",\n marginTop: (_offsetObj_top = offsetObj.top) !== null && _offsetObj_top !== void 0 ? _offsetObj_top : defaultOffset\n } : {\n bottom: \"safe\",\n marginBottom: (_offsetObj_bottom = offsetObj.bottom) !== null && _offsetObj_bottom !== void 0 ? _offsetObj_bottom : defaultOffset\n };\n var _offsetObj_left, _offsetObj_right, _offsetObj_left1, _offsetObj_right1;\n var sideProps = import_constants.isWeb ? xPosition === \"left\" ? {\n left: \"safe\",\n marginLeft: (_offsetObj_left = offsetObj.left) !== null && _offsetObj_left !== void 0 ? _offsetObj_left : defaultOffset\n } : xPosition === \"right\" ? {\n right: \"safe\",\n marginRight: (_offsetObj_right = offsetObj.right) !== null && _offsetObj_right !== void 0 ? _offsetObj_right : defaultOffset\n } : null : (\n // native: always set both left + right so viewport fills screen\n // (no fixed width on native — left/right offsets define the width)\n {\n left: \"safe\",\n marginLeft: (_offsetObj_left1 = offsetObj.left) !== null && _offsetObj_left1 !== void 0 ? _offsetObj_left1 : defaultOffset,\n right: \"safe\",\n marginRight: (_offsetObj_right1 = offsetObj.right) !== null && _offsetObj_right1 !== void 0 ? _offsetObj_right1 : defaultOffset\n }\n );\n var centerStyle = import_constants.isWeb && xPosition === \"center\" ? {\n left: \"50%\",\n transform: \"translateX(-50%)\"\n } : null;\n React.useEffect(function() {\n if (!import_constants.isWeb) return;\n var handleKeyDown = function(event) {\n var isHotkeyPressed = hotkey.length > 0 && hotkey.every(function(key) {\n return event[key] || event.code === key;\n });\n if (isHotkeyPressed) {\n var _listRef_current;\n ctx.setExpanded(true);\n (_listRef_current = listRef.current) === null || _listRef_current === void 0 ? void 0 : _listRef_current.focus();\n }\n };\n document.addEventListener(\"keydown\", handleKeyDown);\n return function() {\n return document.removeEventListener(\"keydown\", handleKeyDown);\n };\n }, [\n hotkey\n ]);\n if (ctx.toasts.length === 0) return null;\n var hotkeyLabel = hotkey.join(\"+\").replace(/Key/g, \"\").replace(/Digit/g, \"\");\n var content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastViewportFrame, {\n ref: listRef,\n \"aria-label\": `${label} ${hotkeyLabel}`,\n tabIndex: -1,\n \"aria-live\": \"polite\",\n ...edgeProps,\n ...sideProps,\n ...centerStyle ? {\n style: centerStyle\n } : null,\n \"data-y-position\": yPosition,\n \"data-x-position\": xPosition,\n ...import_constants.isWeb ? {\n onMouseEnter: function() {\n mouseInsideRef.current = true;\n if (deferredCollapseRef.current) {\n clearTimeout(deferredCollapseRef.current);\n deferredCollapseRef.current = null;\n }\n if (ctx.toasts.length > 1 && !ctx.interacting && !hoverCooldownRef.current) {\n hoverTimeoutRef.current = setTimeout(function() {\n return ctx.setExpanded(true);\n }, 50);\n }\n },\n onMouseLeave: function() {\n mouseInsideRef.current = false;\n if (hoverTimeoutRef.current) {\n clearTimeout(hoverTimeoutRef.current);\n hoverTimeoutRef.current = null;\n }\n if (!ctx.interacting && !ctx.isInDismissCooldown()) {\n ctx.setExpanded(false);\n } else if (ctx.isInDismissCooldown()) {\n if (deferredCollapseRef.current) {\n clearTimeout(deferredCollapseRef.current);\n }\n deferredCollapseRef.current = setTimeout(function() {\n deferredCollapseRef.current = null;\n if (!mouseInsideRef.current) {\n ctx.setExpanded(false);\n }\n }, 1200);\n }\n },\n onPointerDown: function() {\n if (hoverTimeoutRef.current) {\n clearTimeout(hoverTimeoutRef.current);\n hoverTimeoutRef.current = null;\n }\n ctx.setInteracting(true);\n },\n onPointerUp: function() {\n return ctx.setInteracting(false);\n },\n onPointerCancel: function() {\n return ctx.setInteracting(false);\n }\n } : {\n onPress: function() {\n if (ctx.toasts.length > 1) {\n ctx.setExpanded(function(prev) {\n return !prev;\n });\n }\n }\n },\n ...import_constants.isWeb && {\n onFocus: function(event) {\n if (!event.currentTarget.contains(event.relatedTarget)) {\n if (ctx.toasts.length > 1) {\n ctx.setExpanded(true);\n }\n ctx.setInteracting(true);\n }\n },\n onBlur: function(event) {\n if (!event.currentTarget.contains(event.relatedTarget)) {\n ctx.setInteracting(false);\n if (!ctx.isInDismissCooldown()) {\n ctx.setExpanded(false);\n }\n }\n }\n },\n ...rest,\n children\n });\n if (portalToRoot) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.Portal, {\n zIndex: portalZIndex,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastContext.Provider, {\n ...ctx,\n children: content\n })\n });\n }\n return content;\n});\nfunction ToastList(param) {\n var { renderItem } = param;\n var ctx = useToastContext(\"Toast.List\");\n var maxRender = ctx.toasts.length;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate_presence.AnimatePresence, {\n children: ctx.toasts.slice(0, maxRender).map(function(toast, index) {\n var handleClose = function() {\n var _toast_onDismiss;\n if (toast.dismissible === false) return;\n (_toast_onDismiss = toast.onDismiss) === null || _toast_onDismiss === void 0 ? void 0 : _toast_onDismiss.call(toast, toast);\n ctx.removeToast(toast);\n };\n var itemContextValue = {\n toast,\n handleClose\n };\n if (!renderItem) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastItemContext.Provider, {\n value: itemContextValue,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastItemInner, {\n toast,\n index,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DefaultToastContent, {\n toast\n })\n })\n }, toast.id);\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastItemContext.Provider, {\n value: itemContextValue,\n children: renderItem({\n toast,\n index,\n handleClose\n })\n }, toast.id);\n })\n });\n}\nfunction DefaultToastContent(param) {\n var { toast } = param;\n var ctx = useToastContext(\"Toast.Item\");\n var { handleClose } = useToastItemContext();\n var _toast_type;\n var toastType = (_toast_type = toast.type) !== null && _toast_type !== void 0 ? _toast_type : \"default\";\n var dismissible = toast.dismissible !== false;\n var title = typeof toast.title === \"function\" ? toast.title() : toast.title;\n var description = typeof toast.description === \"function\" ? toast.description() : toast.description;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_stacks.XStack, {\n alignItems: \"flex-start\",\n gap: \"3\",\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastIcon, {}),\n /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_stacks.YStack, {\n flex: 1,\n gap: \"1\",\n children: [\n title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastTitle, {\n children: title\n }),\n description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastDescription, {\n children: description\n }),\n (toast.action || toast.cancel) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_stacks.XStack, {\n gap: \"2\",\n marginTop: \"2\",\n children: [\n toast.cancel && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ToastItemFrame.ToastActionFrame, {\n onPress: function(e) {\n var _toast_cancel_onClick, _toast_cancel;\n (_toast_cancel = toast.cancel) === null || _toast_cancel === void 0 ? void 0 : (_toast_cancel_onClick = _toast_cancel.onClick) === null || _toast_cancel_onClick === void 0 ? void 0 : _toast_cancel_onClick.call(_toast_cancel, e);\n handleClose();\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.SizableText, {\n size: \"2\",\n children: toast.cancel.label\n })\n }),\n toast.action && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ToastItemFrame.ToastActionFrame, {\n onPress: function(e) {\n var _toast_action_onClick, _toast_action;\n (_toast_action = toast.action) === null || _toast_action === void 0 ? void 0 : (_toast_action_onClick = _toast_action.onClick) === null || _toast_action_onClick === void 0 ? void 0 : _toast_action_onClick.call(_toast_action, e);\n if (!e.defaultPrevented) {\n handleClose();\n }\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_text.SizableText, {\n size: \"2\",\n children: toast.action.label\n })\n })\n ]\n })\n ]\n }),\n ctx.closeButton && dismissible && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastClose, {})\n ]\n });\n}\nfunction DragWrapper(param) {\n var { animatedStyle, gestureHandlers, gesture, AnimatedView, dragRef, children } = param;\n if (import_constants.isWeb) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"div\", {\n ref: dragRef,\n style: {\n flex: 1,\n display: \"flex\",\n flexDirection: \"column\",\n userSelect: \"none\",\n WebkitUserSelect: \"none\",\n touchAction: \"none\",\n cursor: \"default\"\n },\n ...gestureHandlers,\n children\n });\n }\n if (gesture) {\n var gh = (0, import_native.getGestureHandler)();\n var GestureDetector = gh.state.GestureDetector;\n if (GestureDetector) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GestureDetector, {\n gesture,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.View, {\n style: {\n flex: 1\n },\n ...{\n collapsable: false\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AnimatedView, {\n style: [\n {\n flex: 1\n },\n animatedStyle\n ],\n children\n })\n })\n });\n }\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AnimatedView, {\n style: [\n {\n flex: 1\n },\n animatedStyle\n ],\n ...gestureHandlers,\n children\n });\n}\nvar ToastItemInner = (0, import_core.createStyledHOC)(import_ToastItemFrame.ToastItemFrame, function ToastItem(props, ref) {\n var { toast, index, children, ...rest } = props;\n var ctx = useToastContext(\"Toast.Item\");\n var [mounted, setMounted] = React.useState(false);\n var [removed, setRemoved] = React.useState(false);\n var [swipeOut, setSwipeOut] = React.useState(false);\n var [offsetBeforeRemove, setOffsetBeforeRemove] = React.useState(0);\n var swipeExitYRef = React.useRef(null);\n var closeTimerRef = React.useRef(null);\n var closeTimerStartRef = React.useRef(0);\n var lastPauseTimeRef = React.useRef(0);\n var _toast_duration;\n var remainingTimeRef = React.useRef((_toast_duration = toast.duration) !== null && _toast_duration !== void 0 ? _toast_duration : ctx.duration);\n var isFront = index === 0;\n var isVisible = index < ctx.visibleToasts;\n var _toast_type;\n var toastType = (_toast_type = toast.type) !== null && _toast_type !== void 0 ? _toast_type : \"default\";\n var dismissible = toast.dismissible !== false;\n var _toast_duration1;\n var duration = (_toast_duration1 = toast.duration) !== null && _toast_duration1 !== void 0 ? _toast_duration1 : ctx.duration;\n var [yPosition] = ctx.position.split(\"-\");\n var isTop = yPosition === \"top\";\n var expandedOffset = import_constants.isWeb ? (function() {\n var totalHeight = 0;\n var activeCount = 0;\n for (var i = 0; i < index; i++) {\n var _ctx_toasts_i;\n var toastId = (_ctx_toasts_i = ctx.toasts[i]) === null || _ctx_toasts_i === void 0 ? void 0 : _ctx_toasts_i.id;\n if (toastId == null) continue;\n var h2 = ctx.heights[toastId];\n if (h2 === 0) continue;\n totalHeight += h2 !== null && h2 !== void 0 ? h2 : ctx.toastHeight;\n activeCount++;\n }\n return totalHeight + activeCount * ctx.gap;\n })() : index * (ctx.toastHeight + ctx.gap);\n var expandedOffsetRef = React.useRef(expandedOffset);\n expandedOffsetRef.current = expandedOffset;\n var isExpandedRef = React.useRef(ctx.expanded);\n isExpandedRef.current = ctx.expanded;\n var startTimer = React.useCallback(function() {\n if (duration === Number.POSITIVE_INFINITY || toastType === \"loading\") return;\n closeTimerStartRef.current = Date.now();\n closeTimerRef.current = setTimeout(function() {\n var _toast_onAutoClose;\n (_toast_onAutoClose = toast.onAutoClose) === null || _toast_onAutoClose === void 0 ? void 0 : _toast_onAutoClose.call(toast, toast);\n setRemoved(true);\n setTimeout(function() {\n return ctx.removeToast(toast);\n }, TIME_BEFORE_UNMOUNT);\n }, remainingTimeRef.current);\n }, [\n duration,\n toastType,\n toast,\n ctx.removeToast\n ]);\n var pauseTimer = (0, import_core2.useEvent)(function() {\n if (closeTimerRef.current) {\n clearTimeout(closeTimerRef.current);\n }\n if (lastPauseTimeRef.current < closeTimerStartRef.current) {\n var elapsed = Date.now() - closeTimerStartRef.current;\n remainingTimeRef.current = Math.max(0, remainingTimeRef.current - elapsed);\n }\n lastPauseTimeRef.current = Date.now();\n });\n var resumeTimer = (0, import_core2.useEvent)(function() {\n if (ctx.expanded || ctx.interacting) return;\n remainingTimeRef.current = duration;\n startTimer();\n });\n React.useEffect(function() {\n setMounted(true);\n }, []);\n React.useEffect(function() {\n if (!toast.delete) {\n setRemoved(false);\n return;\n }\n setRemoved(true);\n if (isExpandedRef.current) {\n setOffsetBeforeRemove(expandedOffsetRef.current);\n }\n var timer = setTimeout(function() {\n return ctx.removeToast(toast);\n }, TIME_BEFORE_UNMOUNT);\n return function() {\n return clearTimeout(timer);\n };\n }, [\n toast.delete,\n toast,\n ctx.removeToast\n ]);\n React.useEffect(function() {\n if (ctx.expanded || ctx.interacting) {\n pauseTimer();\n } else {\n startTimer();\n }\n return function() {\n if (closeTimerRef.current) clearTimeout(closeTimerRef.current);\n };\n }, [\n ctx.expanded,\n ctx.interacting,\n startTimer\n ]);\n React.useEffect(function() {\n remainingTimeRef.current = duration;\n }, [\n duration\n ]);\n var { setDragOffset, springBack, animateOut, animatedStyle, AnimatedView, dragRef } = (0, import_useToastAnimations.useToastAnimations)({\n reducedMotion: ctx.reducedMotion\n });\n var { isDragging, gestureHandlers, gesture } = (0, import_useAnimatedDragGesture.useAnimatedDragGesture)({\n direction: ctx.swipeDirection,\n threshold: ctx.swipeThreshold,\n disabled: !dismissible || toastType === \"loading\",\n expanded: ctx.expanded,\n onDragStart: pauseTimer,\n onDragMove: setDragOffset,\n onDismiss: function(exitDirection, velocity) {\n var _toast_onDismiss;\n ctx.triggerDismissCooldown();\n setSwipeOut(true);\n (_toast_onDismiss = toast.onDismiss) === null || _toast_onDismiss === void 0 ? void 0 : _toast_onDismiss.call(toast, toast);\n swipeExitYRef.current = isExpandedRef.current ? isTop ? expandedOffsetRef.current : -expandedOffsetRef.current : isFront ? 0 : isTop ? ctx.gap * index : -ctx.gap * index;\n setRemoved(true);\n ctx.removeToast(toast);\n animateOut(exitDirection, velocity);\n },\n onCancel: function() {\n springBack(function() {\n resumeTimer();\n });\n }\n });\n var handleLayout = React.useCallback(function(event) {\n if (removed) return;\n if ((!import_constants.isWeb || !ctx.expanded) && index !== 0) return;\n var { height } = event.nativeEvent.layout;\n ctx.setToastHeight(toast.id, height);\n }, [\n toast.id,\n ctx.setToastHeight,\n index,\n ctx.expanded,\n removed\n ]);\n React.useEffect(function() {\n return function() {\n ctx.removeToastHeight(toast.id);\n };\n }, [\n toast.id,\n ctx.removeToastHeight\n ]);\n var handleClose = React.useCallback(function() {\n var _toast_onDismiss;\n if (!dismissible) return;\n ctx.triggerDismissCooldown();\n (_toast_onDismiss = toast.onDismiss) === null || _toast_onDismiss === void 0 ? void 0 : _toast_onDismiss.call(toast, toast);\n setRemoved(true);\n if (isExpandedRef.current) {\n setOffsetBeforeRemove(expandedOffsetRef.current);\n }\n setTimeout(function() {\n return ctx.removeToast(toast);\n }, TIME_BEFORE_UNMOUNT);\n }, [\n dismissible,\n toast,\n ctx.removeToast,\n ctx.triggerDismissCooldown\n ]);\n var itemContextValue = React.useMemo(function() {\n return {\n toast,\n handleClose\n };\n }, [\n toast,\n handleClose\n ]);\n var frontToastHeight = -1;\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = ctx.toasts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var t = _step.value;\n var h = ctx.heights[t.id];\n if (h != null && h > 0) {\n frontToastHeight = h;\n break;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n var stackScale = !ctx.expanded && !isFront ? 1 - index * 0.05 : 1;\n var activeExpandedOffset = removed ? offsetBeforeRemove : expandedOffset;\n var stackY = ctx.expanded ? isTop ? activeExpandedOffset : -activeExpandedOffset : isFront ? 0 : isTop ? ctx.gap * index : -ctx.gap * index;\n var computedOpacity = removed && !swipeOut ? 0 : index >= ctx.visibleToasts ? 0 : 1;\n var computedZIndex = removed ? 0 : ctx.visibleToasts - index + 1;\n var collapsedHeight = !isFront && frontToastHeight > 0 ? frontToastHeight : void 0;\n var computedHeight = ctx.expanded ? import_constants.isWeb ? ctx.heights[toast.id] || void 0 : void 0 : collapsedHeight;\n var computedPointerEvents = index >= ctx.visibleToasts ? \"none\" : \"auto\";\n var gapFillerHeight = ctx.expanded ? ctx.gap + 1 : 0;\n var dataAttributes = {\n \"data-mounted\": mounted ? \"true\" : \"false\",\n \"data-removed\": removed ? \"true\" : \"false\",\n \"data-swipe-out\": swipeOut ? \"true\" : \"false\",\n \"data-visible\": isVisible ? \"true\" : \"false\",\n \"data-front\": isFront ? \"true\" : \"false\",\n \"data-index\": String(index),\n \"data-type\": toastType,\n \"data-expanded\": ctx.expanded ? \"true\" : \"false\"\n };\n var _swipeExitYRef_current;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ToastItemFrame.ToastPositionWrapper, {\n ref,\n testID: rest.testID,\n ...dataAttributes,\n transition: isDragging || ctx.reducedMotion ? void 0 : {\n duration: removed ? 200 : 400,\n // height only collapses the stack on web; native relayouts\n properties: import_constants.isWeb ? \"transform, opacity, height\" : \"transform, opacity\"\n },\n y: ctx.reducedMotion ? stackY : (\n // every value needs an explicit `px` — a bare number inside a\n // transition string is a string, so `-14` would resolve as the\n // space token `-14` (= -56px) instead of -14 pixels\n `${stackY}px enter:${isTop ? -80 : 80}px exit:${swipeOut ? (_swipeExitYRef_current = swipeExitYRef.current) !== null && _swipeExitYRef_current !== void 0 ? _swipeExitYRef_current : stackY : stackY}px`\n ),\n scale: stackScale,\n opacity: `${computedOpacity} enter:0 exit:0`,\n zIndex: computedZIndex,\n height: computedHeight,\n overflow: \"visible\",\n pointerEvents: computedPointerEvents,\n top: isTop ? 0 : void 0,\n bottom: isTop ? void 0 : 0,\n ...!isFront && {\n style: {\n transformOrigin: isTop ? \"top center\" : \"bottom center\"\n }\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DragWrapper, {\n animatedStyle,\n gestureHandlers,\n gesture,\n AnimatedView,\n dragRef,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ToastItemFrame.ToastItemFrame, {\n role: \"status\",\n \"aria-live\": \"polite\",\n \"aria-atomic\": true,\n tabIndex: 0,\n onLayout: handleLayout,\n ...import_constants.isWeb && {\n onKeyDown: function(event) {\n if (event.key === \"Escape\" && dismissible) {\n var current = event.currentTarget;\n var container = current.closest(\"[aria-label]\");\n if (container) {\n var focusables = container.querySelectorAll('[tabindex=\"0\"]');\n var arr = Array.from(focusables);\n var idx = arr.indexOf(current);\n var next = arr[idx + 1] || arr[idx - 1];\n next === null || next === void 0 ? void 0 : next.focus();\n }\n handleClose();\n }\n }\n },\n // native stacks in a column, so a card sized to the front toast only\n // shrinks to that height when it fills it (web stretches in its row)\n ...!import_constants.isWeb && computedHeight != null && {\n flex: 1\n },\n ...rest,\n children: [\n /* gap filler to prevent hover flicker */\n ctx.expanded && gapFillerHeight > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.View, {\n position: \"absolute\",\n left: 0,\n right: 0,\n height: gapFillerHeight,\n pointerEvents: \"auto\",\n ...isTop ? {\n top: \"100%\"\n } : {\n bottom: \"100%\"\n }\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastItemContext.Provider, {\n value: itemContextValue,\n children\n })\n ]\n })\n })\n });\n});\nvar ToastTitle = (0, import_core2.styled)(import_text.SizableText, {\n displayName: \"ToastTitle\"\n});\nvar ToastDescription = (0, import_core2.styled)(import_text.SizableText, {\n displayName: \"ToastDescription\"\n});\nvar ToastClose = (0, import_core.createStyledHOC)(import_ToastItemFrame.ToastCloseFrame, function ToastClose2(props, ref) {\n var _ctx_icons;\n var handleClose;\n try {\n var itemCtx = useToastItemContext();\n handleClose = itemCtx.handleClose;\n } catch (e) {\n }\n var ctx = useToastContext(\"Toast.Close\");\n var _props_children, _ref;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ToastItemFrame.ToastCloseFrame, {\n ref,\n \"aria-label\": \"Close toast\",\n onPress: handleClose,\n ...props,\n children: (_ref = (_props_children = props.children) !== null && _props_children !== void 0 ? _props_children : (_ctx_icons = ctx.icons) === null || _ctx_icons === void 0 ? void 0 : _ctx_icons.close) !== null && _ref !== void 0 ? _ref : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ToastItemFrame.DefaultCloseIcon, {})\n });\n});\nvar ToastAction = (0, import_core.createStyledHOC)(import_ToastItemFrame.ToastActionFrame, function ToastAction2(props, ref) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ToastItemFrame.ToastActionFrame, {\n ref,\n ...props\n });\n});\nfunction ToastIcon(props) {\n var _ctx_icons;\n var ctx = useToastContext(\"Toast.Icon\");\n var toast;\n try {\n var itemCtx = useToastItemContext();\n toast = itemCtx.toast;\n } catch (e) {\n return null;\n }\n if (!toast) return null;\n if (toast.icon !== void 0) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.View, {\n flexShrink: 0,\n marginTop: \"0-5\",\n children: toast.icon\n });\n }\n var _toast_type;\n var toastType = (_toast_type = toast.type) !== null && _toast_type !== void 0 ? _toast_type : \"default\";\n var _ctx_icons_toastType;\n var icon = (_ctx_icons_toastType = (_ctx_icons = ctx.icons) === null || _ctx_icons === void 0 ? void 0 : _ctx_icons[toastType]) !== null && _ctx_icons_toastType !== void 0 ? _ctx_icons_toastType : null;\n if (!icon) return null;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.View, {\n flexShrink: 0,\n marginTop: \"0-5\",\n children: icon\n });\n}\nfunction useToasts() {\n var ctx = useToastContext(\"useToasts\");\n return {\n toasts: ctx.toasts,\n expanded: ctx.expanded,\n position: ctx.position,\n closeButton: ctx.closeButton\n };\n}\nfunction useToastItem() {\n return useToastItemContext();\n}\nToastRoot.displayName = \"Toast\";\nvar Toast = (0, import_helpers.withStaticProperties)(ToastRoot, {\n Viewport: ToastViewport,\n List: ToastList,\n Item: ToastItemInner,\n Title: ToastTitle,\n Description: ToastDescription,\n Close: ToastClose,\n Action: ToastAction,\n Icon: ToastIcon\n});\n//# sourceMappingURL=ToastComposable.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAAE,OAAO;CAAK,YAAY;AAAK,CAAC,IAAI,QACzG,GACF;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GA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,QAAQ;CAClB,SAAS,GAAG;EACV,OAAO;CACT;CACA,IAAI,CAAC,OAAO,OAAO;CACnB,IAAI,MAAM,SAAS,KAAK,GAAG;EACzB,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,aAAa,MAAM;GACpE,YAAY;GACZ,WAAW;GACX,UAAU,MAAM;EAClB,CAAC;CACH;CACA,IAAI;CACJ,IAAI,aAAa,cAAc,MAAM,UAAU,QAAQ,gBAAgB,KAAK,IAAI,cAAc;CAC9F,IAAI;CACJ,IAAI,QAAQ,wBAAwB,aAAa,IAAI,WAAW,QAAQ,eAAe,KAAK,IAAI,KAAK,IAAI,WAAW,gBAAgB,QAAQ,yBAAyB,KAAK,IAAI,uBAAuB;CACrM,IAAI,CAAC,MAAM,OAAO;CAClB,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,aAAa,MAAM;EACpE,YAAY;EACZ,WAAW;EACX,UAAU;CACZ,CAAC;AACH;AACA,SAAS,YAAY;CACnB,IAAI,MAAM,gBAAgB,WAAW;CACrC,OAAO;EACL,QAAQ,IAAI;EACZ,UAAU,IAAI;EACd,UAAU,IAAI;EACd,aAAa,IAAI;CACnB;AACF;AACA,SAAS,eAAe;CACtB,OAAO,oBAAoB;AAC7B;AACA,UAAU,cAAc;AACxB,IAAI,SAAS,GAAG,eAAe,qBAAoB,CAAE,WAAW;CAC9D,UAAU;CACV,MAAM;CACN,MAAM;CACN,OAAO;CACP,aAAa;CACb,OAAO;CACP,QAAQ;CACR,MAAM;AACR,CAAC"}
@@ -599,9 +599,8 @@ const ToastItemInner = createStyledHOC(ToastItemFrame, function ToastItem(props,
599
599
  }
600
600
  });
601
601
  const handleLayout = React.useCallback((event) => {
602
- if (!isWeb) return;
603
602
  if (removed) return;
604
- if (!ctx.expanded && index !== 0) return;
603
+ if ((!isWeb || !ctx.expanded) && index !== 0) return;
605
604
  const { height } = event.nativeEvent.layout;
606
605
  ctx.setToastHeight(toast.id, height);
607
606
  }, [
@@ -612,7 +611,6 @@ const ToastItemInner = createStyledHOC(ToastItemFrame, function ToastItem(props,
612
611
  removed
613
612
  ]);
614
613
  React.useEffect(() => {
615
- if (!isWeb) return;
616
614
  return () => {
617
615
  ctx.removeToastHeight(toast.id);
618
616
  };
@@ -637,13 +635,11 @@ const ToastItemInner = createStyledHOC(ToastItemFrame, function ToastItem(props,
637
635
  handleClose
638
636
  }), [toast, handleClose]);
639
637
  let frontToastHeight = -1;
640
- if (isWeb) {
641
- for (const t of ctx.toasts) {
642
- const h = ctx.heights[t.id];
643
- if (h != null && h > 0) {
644
- frontToastHeight = h;
645
- break;
646
- }
638
+ for (const t of ctx.toasts) {
639
+ const h = ctx.heights[t.id];
640
+ if (h != null && h > 0) {
641
+ frontToastHeight = h;
642
+ break;
647
643
  }
648
644
  }
649
645
  const stackScale = !ctx.expanded && !isFront ? 1 - index * .05 : 1;
@@ -651,7 +647,8 @@ const ToastItemInner = createStyledHOC(ToastItemFrame, function ToastItem(props,
651
647
  const stackY = ctx.expanded ? isTop ? activeExpandedOffset : -activeExpandedOffset : isFront ? 0 : isTop ? ctx.gap * index : -ctx.gap * index;
652
648
  const computedOpacity = removed && !swipeOut ? 0 : index >= ctx.visibleToasts ? 0 : 1;
653
649
  const computedZIndex = removed ? 0 : ctx.visibleToasts - index + 1;
654
- const computedHeight = isWeb ? ctx.expanded ? ctx.heights[toast.id] || void 0 : !isFront && frontToastHeight > 0 ? frontToastHeight : void 0 : void 0;
650
+ const collapsedHeight = !isFront && frontToastHeight > 0 ? frontToastHeight : void 0;
651
+ const computedHeight = ctx.expanded ? isWeb ? ctx.heights[toast.id] || void 0 : void 0 : collapsedHeight;
655
652
  const computedPointerEvents = index >= ctx.visibleToasts ? "none" : "auto";
656
653
  const gapFillerHeight = ctx.expanded ? ctx.gap + 1 : 0;
657
654
  const dataAttributes = {
@@ -681,7 +678,7 @@ const ToastItemInner = createStyledHOC(ToastItemFrame, function ToastItem(props,
681
678
  pointerEvents: computedPointerEvents,
682
679
  top: isTop ? 0 : void 0,
683
680
  bottom: isTop ? void 0 : 0,
684
- ...isWeb && !isFront && { style: { transformOrigin: isTop ? "top center" : "bottom center" } },
681
+ ...!isFront && { style: { transformOrigin: isTop ? "top center" : "bottom center" } },
685
682
  children: /* @__PURE__ */ jsx(DragWrapper, {
686
683
  animatedStyle,
687
684
  gestureHandlers,
@@ -708,6 +705,7 @@ const ToastItemInner = createStyledHOC(ToastItemFrame, function ToastItem(props,
708
705
  handleClose();
709
706
  }
710
707
  } },
708
+ ...!isWeb && computedHeight != null && { flex: 1 },
711
709
  ...rest,
712
710
  children: [ctx.expanded && gapFillerHeight > 0 && /* @__PURE__ */ jsx(View, {
713
711
  position: "absolute",