@oxyhq/bloom 0.50.2 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +89 -0
- package/README.md +12 -7
- package/lib/commonjs/avatar-group/AvatarGroup.web.js +2 -1
- package/lib/commonjs/avatar-group/AvatarGroup.web.js.map +1 -1
- package/lib/commonjs/bottom-sheet/index.web.js +2 -1
- package/lib/commonjs/bottom-sheet/index.web.js.map +1 -1
- package/lib/commonjs/context-menu/index.web.js +3 -2
- package/lib/commonjs/context-menu/index.web.js.map +1 -1
- package/lib/commonjs/dialog/Dialog.web.js +4 -3
- package/lib/commonjs/dialog/Dialog.web.js.map +1 -1
- package/lib/commonjs/index.js +90 -83
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +116 -109
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/menu/index.web.js +2 -1
- package/lib/commonjs/menu/index.web.js.map +1 -1
- package/lib/commonjs/popover/index.web.js +3 -2
- package/lib/commonjs/popover/index.web.js.map +1 -1
- package/lib/commonjs/portal/index.js +4 -1
- package/lib/commonjs/portal/index.js.map +1 -1
- package/lib/commonjs/progressive-blur/index.js +79 -0
- package/lib/commonjs/progressive-blur/index.js.map +1 -0
- package/lib/commonjs/progressive-blur/index.web.js +67 -0
- package/lib/commonjs/progressive-blur/index.web.js.map +1 -0
- package/lib/commonjs/progressive-blur/shared.js +66 -0
- package/lib/commonjs/progressive-blur/shared.js.map +1 -0
- package/lib/commonjs/progressive-blur/types.js +6 -0
- package/lib/commonjs/progressive-blur/types.js.map +1 -0
- package/lib/commonjs/select/index.web.js +2 -1
- package/lib/commonjs/select/index.web.js.map +1 -1
- package/lib/commonjs/styles/web-view-style.js +26 -0
- package/lib/commonjs/styles/web-view-style.js.map +1 -0
- package/lib/commonjs/tab-bar/TabBarBase.js +415 -0
- package/lib/commonjs/tab-bar/TabBarBase.js.map +1 -0
- package/lib/commonjs/tab-bar/expo-router/RouterTabBar.js +83 -0
- package/lib/commonjs/tab-bar/expo-router/RouterTabBar.js.map +1 -0
- package/lib/commonjs/tab-bar/expo-router/fading-tab-screen.js +119 -0
- package/lib/commonjs/tab-bar/expo-router/fading-tab-screen.js.map +1 -0
- package/lib/commonjs/tab-bar/expo-router/index.js +26 -0
- package/lib/commonjs/tab-bar/expo-router/index.js.map +1 -0
- package/lib/commonjs/tab-bar/glyph.js +43 -0
- package/lib/commonjs/tab-bar/glyph.js.map +1 -0
- package/lib/commonjs/tab-bar/glyph.native.js +55 -0
- package/lib/commonjs/tab-bar/glyph.native.js.map +1 -0
- package/lib/commonjs/tab-bar/index.js +65 -0
- package/lib/commonjs/tab-bar/index.js.map +1 -0
- package/lib/commonjs/tab-bar/index.web.js +67 -0
- package/lib/commonjs/tab-bar/index.web.js.map +1 -0
- package/lib/commonjs/tab-bar/minimize-context.js +127 -0
- package/lib/commonjs/tab-bar/minimize-context.js.map +1 -0
- package/lib/commonjs/tab-bar/shared.js +139 -0
- package/lib/commonjs/tab-bar/shared.js.map +1 -0
- package/lib/commonjs/tab-bar/surface.js +50 -0
- package/lib/commonjs/tab-bar/surface.js.map +1 -0
- package/lib/commonjs/tab-bar/surface.native.js +56 -0
- package/lib/commonjs/tab-bar/surface.native.js.map +1 -0
- package/lib/commonjs/tab-bar/surface.web.js +59 -0
- package/lib/commonjs/tab-bar/surface.web.js.map +1 -0
- package/lib/commonjs/tab-bar/types.js +6 -0
- package/lib/commonjs/tab-bar/types.js.map +1 -0
- package/lib/commonjs/toast/Positioner.js +117 -0
- package/lib/commonjs/toast/Positioner.js.map +1 -0
- package/lib/commonjs/toast/ToastContent.js +301 -0
- package/lib/commonjs/toast/ToastContent.js.map +1 -0
- package/lib/commonjs/toast/ToastHost.js +69 -0
- package/lib/commonjs/toast/ToastHost.js.map +1 -0
- package/lib/commonjs/toast/ToastHost.native.js +44 -0
- package/lib/commonjs/toast/ToastHost.native.js.map +1 -0
- package/lib/commonjs/toast/ToastIcon.js +57 -0
- package/lib/commonjs/toast/ToastIcon.js.map +1 -0
- package/lib/commonjs/toast/ToastRow.js +411 -0
- package/lib/commonjs/toast/ToastRow.js.map +1 -0
- package/lib/commonjs/toast/ToastSwipeHandler.js +189 -0
- package/lib/commonjs/toast/ToastSwipeHandler.js.map +1 -0
- package/lib/commonjs/toast/Toaster.js +205 -0
- package/lib/commonjs/toast/Toaster.js.map +1 -0
- package/lib/commonjs/toast/animations.js +274 -0
- package/lib/commonjs/toast/animations.js.map +1 -0
- package/lib/commonjs/toast/constants.js +56 -0
- package/lib/commonjs/toast/constants.js.map +1 -0
- package/lib/commonjs/toast/context.js +42 -0
- package/lib/commonjs/toast/context.js.map +1 -0
- package/lib/commonjs/toast/index.js +32 -126
- package/lib/commonjs/toast/index.js.map +1 -1
- package/lib/commonjs/toast/position-utils.js +115 -0
- package/lib/commonjs/toast/position-utils.js.map +1 -0
- package/lib/commonjs/toast/positioner-utils.js +141 -0
- package/lib/commonjs/toast/positioner-utils.js.map +1 -0
- package/lib/commonjs/toast/toast-comparator.js +28 -0
- package/lib/commonjs/toast/toast-comparator.js.map +1 -0
- package/lib/commonjs/toast/toast-fns.js +90 -0
- package/lib/commonjs/toast/toast-fns.js.map +1 -0
- package/lib/commonjs/toast/toast-store.js +352 -0
- package/lib/commonjs/toast/toast-store.js.map +1 -0
- package/lib/commonjs/toast/toast-timers.js +110 -0
- package/lib/commonjs/toast/toast-timers.js.map +1 -0
- package/lib/commonjs/toast/types.js +42 -0
- package/lib/commonjs/toast/types.js.map +1 -1
- package/lib/commonjs/toast/use-animated-target.js +57 -0
- package/lib/commonjs/toast/use-animated-target.js.map +1 -0
- package/lib/commonjs/toast/use-app-state.js +76 -0
- package/lib/commonjs/toast/use-app-state.js.map +1 -0
- package/lib/commonjs/toast/use-toast-colors.js +114 -0
- package/lib/commonjs/toast/use-toast-colors.js.map +1 -0
- package/lib/commonjs/toast/use-toast-position.js +40 -0
- package/lib/commonjs/toast/use-toast-position.js.map +1 -0
- package/lib/commonjs/tooltip/index.web.js +2 -1
- package/lib/commonjs/tooltip/index.web.js.map +1 -1
- package/lib/commonjs/zoomable-image-gallery/ZoomableImageGallery.js +20 -8
- package/lib/commonjs/zoomable-image-gallery/ZoomableImageGallery.js.map +1 -1
- package/lib/module/avatar-group/AvatarGroup.web.js +2 -1
- package/lib/module/avatar-group/AvatarGroup.web.js.map +1 -1
- package/lib/module/bottom-sheet/index.web.js +2 -1
- package/lib/module/bottom-sheet/index.web.js.map +1 -1
- package/lib/module/context-menu/index.web.js +3 -2
- package/lib/module/context-menu/index.web.js.map +1 -1
- package/lib/module/dialog/Dialog.web.js +4 -3
- package/lib/module/dialog/Dialog.web.js.map +1 -1
- package/lib/module/index.js +3 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +3 -2
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/menu/index.web.js +2 -1
- package/lib/module/menu/index.web.js.map +1 -1
- package/lib/module/popover/index.web.js +3 -2
- package/lib/module/popover/index.web.js.map +1 -1
- package/lib/module/portal/index.js +4 -1
- package/lib/module/portal/index.js.map +1 -1
- package/lib/module/progressive-blur/index.js +74 -0
- package/lib/module/progressive-blur/index.js.map +1 -0
- package/lib/module/progressive-blur/index.web.js +62 -0
- package/lib/module/progressive-blur/index.web.js.map +1 -0
- package/lib/module/progressive-blur/shared.js +60 -0
- package/lib/module/progressive-blur/shared.js.map +1 -0
- package/lib/module/progressive-blur/types.js +4 -0
- package/lib/module/progressive-blur/types.js.map +1 -0
- package/lib/module/select/index.web.js +2 -1
- package/lib/module/select/index.web.js.map +1 -1
- package/lib/module/styles/web-view-style.js +22 -0
- package/lib/module/styles/web-view-style.js.map +1 -0
- package/lib/module/tab-bar/TabBarBase.js +408 -0
- package/lib/module/tab-bar/TabBarBase.js.map +1 -0
- package/lib/module/tab-bar/expo-router/RouterTabBar.js +78 -0
- package/lib/module/tab-bar/expo-router/RouterTabBar.js.map +1 -0
- package/lib/module/tab-bar/expo-router/fading-tab-screen.js +113 -0
- package/lib/module/tab-bar/expo-router/fading-tab-screen.js.map +1 -0
- package/lib/module/tab-bar/expo-router/index.js +15 -0
- package/lib/module/tab-bar/expo-router/index.js.map +1 -0
- package/lib/module/tab-bar/glyph.js +38 -0
- package/lib/module/tab-bar/glyph.js.map +1 -0
- package/lib/module/tab-bar/glyph.native.js +50 -0
- package/lib/module/tab-bar/glyph.native.js.map +1 -0
- package/lib/module/tab-bar/index.js +24 -0
- package/lib/module/tab-bar/index.js.map +1 -0
- package/lib/module/tab-bar/index.web.js +26 -0
- package/lib/module/tab-bar/index.web.js.map +1 -0
- package/lib/module/tab-bar/minimize-context.js +118 -0
- package/lib/module/tab-bar/minimize-context.js.map +1 -0
- package/lib/module/tab-bar/shared.js +132 -0
- package/lib/module/tab-bar/shared.js.map +1 -0
- package/lib/module/tab-bar/surface.js +44 -0
- package/lib/module/tab-bar/surface.js.map +1 -0
- package/lib/module/tab-bar/surface.native.js +50 -0
- package/lib/module/tab-bar/surface.native.js.map +1 -0
- package/lib/module/tab-bar/surface.web.js +53 -0
- package/lib/module/tab-bar/surface.web.js.map +1 -0
- package/lib/module/tab-bar/types.js +4 -0
- package/lib/module/tab-bar/types.js.map +1 -0
- package/lib/module/toast/Positioner.js +110 -0
- package/lib/module/toast/Positioner.js.map +1 -0
- package/lib/module/toast/ToastContent.js +295 -0
- package/lib/module/toast/ToastContent.js.map +1 -0
- package/lib/module/toast/ToastHost.js +63 -0
- package/lib/module/toast/ToastHost.js.map +1 -0
- package/lib/module/toast/ToastHost.native.js +38 -0
- package/lib/module/toast/ToastHost.native.js.map +1 -0
- package/lib/module/toast/ToastIcon.js +52 -0
- package/lib/module/toast/ToastIcon.js.map +1 -0
- package/lib/module/toast/ToastRow.js +407 -0
- package/lib/module/toast/ToastRow.js.map +1 -0
- package/lib/module/toast/ToastSwipeHandler.js +182 -0
- package/lib/module/toast/ToastSwipeHandler.js.map +1 -0
- package/lib/module/toast/Toaster.js +198 -0
- package/lib/module/toast/Toaster.js.map +1 -0
- package/lib/module/toast/animations.js +261 -0
- package/lib/module/toast/animations.js.map +1 -0
- package/lib/module/toast/constants.js +52 -0
- package/lib/module/toast/constants.js.map +1 -0
- package/lib/module/toast/context.js +34 -0
- package/lib/module/toast/context.js.map +1 -0
- package/lib/module/toast/index.js +27 -103
- package/lib/module/toast/index.js.map +1 -1
- package/lib/module/toast/position-utils.js +107 -0
- package/lib/module/toast/position-utils.js.map +1 -0
- package/lib/module/toast/positioner-utils.js +134 -0
- package/lib/module/toast/positioner-utils.js.map +1 -0
- package/lib/module/toast/toast-comparator.js +22 -0
- package/lib/module/toast/toast-comparator.js.map +1 -0
- package/lib/module/toast/toast-fns.js +85 -0
- package/lib/module/toast/toast-fns.js.map +1 -0
- package/lib/module/toast/toast-store.js +346 -0
- package/lib/module/toast/toast-store.js.map +1 -0
- package/lib/module/toast/toast-timers.js +104 -0
- package/lib/module/toast/toast-timers.js.map +1 -0
- package/lib/module/toast/types.js +38 -0
- package/lib/module/toast/types.js.map +1 -1
- package/lib/module/toast/use-animated-target.js +52 -0
- package/lib/module/toast/use-animated-target.js.map +1 -0
- package/lib/module/toast/use-app-state.js +70 -0
- package/lib/module/toast/use-app-state.js.map +1 -0
- package/lib/module/toast/use-toast-colors.js +109 -0
- package/lib/module/toast/use-toast-colors.js.map +1 -0
- package/lib/module/toast/use-toast-position.js +35 -0
- package/lib/module/toast/use-toast-position.js.map +1 -0
- package/lib/module/tooltip/index.web.js +2 -1
- package/lib/module/tooltip/index.web.js.map +1 -1
- package/lib/module/zoomable-image-gallery/ZoomableImageGallery.js +20 -8
- package/lib/module/zoomable-image-gallery/ZoomableImageGallery.js.map +1 -1
- package/lib/typescript/commonjs/avatar-group/AvatarGroup.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/bottom-sheet/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/context-menu/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/Dialog.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +2 -1
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/menu/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/popover/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/portal/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/progressive-blur/index.d.ts +23 -0
- package/lib/typescript/commonjs/progressive-blur/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/progressive-blur/index.web.d.ts +30 -0
- package/lib/typescript/commonjs/progressive-blur/index.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/progressive-blur/shared.d.ts +35 -0
- package/lib/typescript/commonjs/progressive-blur/shared.d.ts.map +1 -0
- package/lib/typescript/commonjs/progressive-blur/types.d.ts +21 -0
- package/lib/typescript/commonjs/progressive-blur/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/select/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/styles/web-view-style.d.ts +21 -0
- package/lib/typescript/commonjs/styles/web-view-style.d.ts.map +1 -0
- package/lib/typescript/commonjs/tab-bar/TabBarBase.d.ts +36 -0
- package/lib/typescript/commonjs/tab-bar/TabBarBase.d.ts.map +1 -0
- package/lib/typescript/commonjs/tab-bar/expo-router/RouterTabBar.d.ts +59 -0
- package/lib/typescript/commonjs/tab-bar/expo-router/RouterTabBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/tab-bar/expo-router/fading-tab-screen.d.ts +11 -0
- package/lib/typescript/commonjs/tab-bar/expo-router/fading-tab-screen.d.ts.map +1 -0
- package/lib/typescript/commonjs/tab-bar/expo-router/index.d.ts +14 -0
- package/lib/typescript/commonjs/tab-bar/expo-router/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/tab-bar/glyph.d.ts +6 -0
- package/lib/typescript/commonjs/tab-bar/glyph.d.ts.map +1 -0
- package/lib/typescript/commonjs/tab-bar/glyph.native.d.ts +6 -0
- package/lib/typescript/commonjs/tab-bar/glyph.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/tab-bar/index.d.ts +12 -0
- package/lib/typescript/commonjs/tab-bar/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/tab-bar/index.web.d.ts +12 -0
- package/lib/typescript/commonjs/tab-bar/index.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/tab-bar/minimize-context.d.ts +51 -0
- package/lib/typescript/commonjs/tab-bar/minimize-context.d.ts.map +1 -0
- package/lib/typescript/commonjs/tab-bar/shared.d.ts +93 -0
- package/lib/typescript/commonjs/tab-bar/shared.d.ts.map +1 -0
- package/lib/typescript/commonjs/tab-bar/surface.d.ts +6 -0
- package/lib/typescript/commonjs/tab-bar/surface.d.ts.map +1 -0
- package/lib/typescript/commonjs/tab-bar/surface.native.d.ts +6 -0
- package/lib/typescript/commonjs/tab-bar/surface.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/tab-bar/surface.web.d.ts +6 -0
- package/lib/typescript/commonjs/tab-bar/surface.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/tab-bar/types.d.ts +85 -0
- package/lib/typescript/commonjs/tab-bar/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/Positioner.d.ts +21 -0
- package/lib/typescript/commonjs/toast/Positioner.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/ToastContent.d.ts +14 -0
- package/lib/typescript/commonjs/toast/ToastContent.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/ToastHost.d.ts +6 -0
- package/lib/typescript/commonjs/toast/ToastHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/ToastHost.native.d.ts +6 -0
- package/lib/typescript/commonjs/toast/ToastHost.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/ToastIcon.d.ts +9 -0
- package/lib/typescript/commonjs/toast/ToastIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/ToastRow.d.ts +80 -0
- package/lib/typescript/commonjs/toast/ToastRow.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/ToastSwipeHandler.d.ts +30 -0
- package/lib/typescript/commonjs/toast/ToastSwipeHandler.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/Toaster.d.ts +19 -0
- package/lib/typescript/commonjs/toast/Toaster.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/animations.d.ts +62 -0
- package/lib/typescript/commonjs/toast/animations.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/constants.d.ts +39 -0
- package/lib/typescript/commonjs/toast/constants.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/context.d.ts +19 -0
- package/lib/typescript/commonjs/toast/context.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/index.d.ts +23 -76
- package/lib/typescript/commonjs/toast/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/toast/position-utils.d.ts +30 -0
- package/lib/typescript/commonjs/toast/position-utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/positioner-utils.d.ts +72 -0
- package/lib/typescript/commonjs/toast/positioner-utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/toast-comparator.d.ts +12 -0
- package/lib/typescript/commonjs/toast/toast-comparator.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/toast-fns.d.ts +3 -0
- package/lib/typescript/commonjs/toast/toast-fns.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/toast-store.d.ts +52 -0
- package/lib/typescript/commonjs/toast/toast-store.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/toast-timers.d.ts +24 -0
- package/lib/typescript/commonjs/toast/toast-timers.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/types.d.ts +222 -5
- package/lib/typescript/commonjs/toast/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/toast/use-animated-target.d.ts +7 -0
- package/lib/typescript/commonjs/toast/use-animated-target.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/use-app-state.d.ts +18 -0
- package/lib/typescript/commonjs/toast/use-app-state.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/use-toast-colors.d.ts +22 -0
- package/lib/typescript/commonjs/toast/use-toast-colors.d.ts.map +1 -0
- package/lib/typescript/commonjs/toast/use-toast-position.d.ts +37 -0
- package/lib/typescript/commonjs/toast/use-toast-position.d.ts.map +1 -0
- package/lib/typescript/commonjs/tooltip/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/zoomable-image-gallery/ZoomableImageGallery.d.ts.map +1 -1
- package/lib/typescript/module/avatar-group/AvatarGroup.web.d.ts.map +1 -1
- package/lib/typescript/module/bottom-sheet/index.web.d.ts.map +1 -1
- package/lib/typescript/module/context-menu/index.web.d.ts.map +1 -1
- package/lib/typescript/module/dialog/Dialog.web.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +2 -1
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +2 -1
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/menu/index.web.d.ts.map +1 -1
- package/lib/typescript/module/popover/index.web.d.ts.map +1 -1
- package/lib/typescript/module/portal/index.d.ts.map +1 -1
- package/lib/typescript/module/progressive-blur/index.d.ts +23 -0
- package/lib/typescript/module/progressive-blur/index.d.ts.map +1 -0
- package/lib/typescript/module/progressive-blur/index.web.d.ts +30 -0
- package/lib/typescript/module/progressive-blur/index.web.d.ts.map +1 -0
- package/lib/typescript/module/progressive-blur/shared.d.ts +35 -0
- package/lib/typescript/module/progressive-blur/shared.d.ts.map +1 -0
- package/lib/typescript/module/progressive-blur/types.d.ts +21 -0
- package/lib/typescript/module/progressive-blur/types.d.ts.map +1 -0
- package/lib/typescript/module/select/index.web.d.ts.map +1 -1
- package/lib/typescript/module/styles/web-view-style.d.ts +21 -0
- package/lib/typescript/module/styles/web-view-style.d.ts.map +1 -0
- package/lib/typescript/module/tab-bar/TabBarBase.d.ts +36 -0
- package/lib/typescript/module/tab-bar/TabBarBase.d.ts.map +1 -0
- package/lib/typescript/module/tab-bar/expo-router/RouterTabBar.d.ts +59 -0
- package/lib/typescript/module/tab-bar/expo-router/RouterTabBar.d.ts.map +1 -0
- package/lib/typescript/module/tab-bar/expo-router/fading-tab-screen.d.ts +11 -0
- package/lib/typescript/module/tab-bar/expo-router/fading-tab-screen.d.ts.map +1 -0
- package/lib/typescript/module/tab-bar/expo-router/index.d.ts +14 -0
- package/lib/typescript/module/tab-bar/expo-router/index.d.ts.map +1 -0
- package/lib/typescript/module/tab-bar/glyph.d.ts +6 -0
- package/lib/typescript/module/tab-bar/glyph.d.ts.map +1 -0
- package/lib/typescript/module/tab-bar/glyph.native.d.ts +6 -0
- package/lib/typescript/module/tab-bar/glyph.native.d.ts.map +1 -0
- package/lib/typescript/module/tab-bar/index.d.ts +12 -0
- package/lib/typescript/module/tab-bar/index.d.ts.map +1 -0
- package/lib/typescript/module/tab-bar/index.web.d.ts +12 -0
- package/lib/typescript/module/tab-bar/index.web.d.ts.map +1 -0
- package/lib/typescript/module/tab-bar/minimize-context.d.ts +51 -0
- package/lib/typescript/module/tab-bar/minimize-context.d.ts.map +1 -0
- package/lib/typescript/module/tab-bar/shared.d.ts +93 -0
- package/lib/typescript/module/tab-bar/shared.d.ts.map +1 -0
- package/lib/typescript/module/tab-bar/surface.d.ts +6 -0
- package/lib/typescript/module/tab-bar/surface.d.ts.map +1 -0
- package/lib/typescript/module/tab-bar/surface.native.d.ts +6 -0
- package/lib/typescript/module/tab-bar/surface.native.d.ts.map +1 -0
- package/lib/typescript/module/tab-bar/surface.web.d.ts +6 -0
- package/lib/typescript/module/tab-bar/surface.web.d.ts.map +1 -0
- package/lib/typescript/module/tab-bar/types.d.ts +85 -0
- package/lib/typescript/module/tab-bar/types.d.ts.map +1 -0
- package/lib/typescript/module/toast/Positioner.d.ts +21 -0
- package/lib/typescript/module/toast/Positioner.d.ts.map +1 -0
- package/lib/typescript/module/toast/ToastContent.d.ts +14 -0
- package/lib/typescript/module/toast/ToastContent.d.ts.map +1 -0
- package/lib/typescript/module/toast/ToastHost.d.ts +6 -0
- package/lib/typescript/module/toast/ToastHost.d.ts.map +1 -0
- package/lib/typescript/module/toast/ToastHost.native.d.ts +6 -0
- package/lib/typescript/module/toast/ToastHost.native.d.ts.map +1 -0
- package/lib/typescript/module/toast/ToastIcon.d.ts +9 -0
- package/lib/typescript/module/toast/ToastIcon.d.ts.map +1 -0
- package/lib/typescript/module/toast/ToastRow.d.ts +80 -0
- package/lib/typescript/module/toast/ToastRow.d.ts.map +1 -0
- package/lib/typescript/module/toast/ToastSwipeHandler.d.ts +30 -0
- package/lib/typescript/module/toast/ToastSwipeHandler.d.ts.map +1 -0
- package/lib/typescript/module/toast/Toaster.d.ts +19 -0
- package/lib/typescript/module/toast/Toaster.d.ts.map +1 -0
- package/lib/typescript/module/toast/animations.d.ts +62 -0
- package/lib/typescript/module/toast/animations.d.ts.map +1 -0
- package/lib/typescript/module/toast/constants.d.ts +39 -0
- package/lib/typescript/module/toast/constants.d.ts.map +1 -0
- package/lib/typescript/module/toast/context.d.ts +19 -0
- package/lib/typescript/module/toast/context.d.ts.map +1 -0
- package/lib/typescript/module/toast/index.d.ts +23 -76
- package/lib/typescript/module/toast/index.d.ts.map +1 -1
- package/lib/typescript/module/toast/position-utils.d.ts +30 -0
- package/lib/typescript/module/toast/position-utils.d.ts.map +1 -0
- package/lib/typescript/module/toast/positioner-utils.d.ts +72 -0
- package/lib/typescript/module/toast/positioner-utils.d.ts.map +1 -0
- package/lib/typescript/module/toast/toast-comparator.d.ts +12 -0
- package/lib/typescript/module/toast/toast-comparator.d.ts.map +1 -0
- package/lib/typescript/module/toast/toast-fns.d.ts +3 -0
- package/lib/typescript/module/toast/toast-fns.d.ts.map +1 -0
- package/lib/typescript/module/toast/toast-store.d.ts +52 -0
- package/lib/typescript/module/toast/toast-store.d.ts.map +1 -0
- package/lib/typescript/module/toast/toast-timers.d.ts +24 -0
- package/lib/typescript/module/toast/toast-timers.d.ts.map +1 -0
- package/lib/typescript/module/toast/types.d.ts +222 -5
- package/lib/typescript/module/toast/types.d.ts.map +1 -1
- package/lib/typescript/module/toast/use-animated-target.d.ts +7 -0
- package/lib/typescript/module/toast/use-animated-target.d.ts.map +1 -0
- package/lib/typescript/module/toast/use-app-state.d.ts +18 -0
- package/lib/typescript/module/toast/use-app-state.d.ts.map +1 -0
- package/lib/typescript/module/toast/use-toast-colors.d.ts +22 -0
- package/lib/typescript/module/toast/use-toast-colors.d.ts.map +1 -0
- package/lib/typescript/module/toast/use-toast-position.d.ts +37 -0
- package/lib/typescript/module/toast/use-toast-position.d.ts.map +1 -0
- package/lib/typescript/module/tooltip/index.web.d.ts.map +1 -1
- package/lib/typescript/module/zoomable-image-gallery/ZoomableImageGallery.d.ts.map +1 -1
- package/package.json +63 -25
- package/src/__tests__/TabBar.test.tsx +342 -0
- package/src/__tests__/TabBarReanimatedDeps.test.ts +130 -0
- package/src/__tests__/TabBarWebFork.test.ts +197 -0
- package/src/__tests__/ToastContent.test.tsx +192 -0
- package/src/__tests__/ToastHostWebFork.test.ts +155 -0
- package/src/__tests__/Toaster.test.tsx +527 -0
- package/src/__tests__/animated-style-deps.test.ts +156 -0
- package/src/__tests__/toast-animations.test.ts +98 -0
- package/src/__tests__/toast-comparator.test.ts +131 -0
- package/src/__tests__/toast-enter-driver.test.ts +147 -0
- package/src/__tests__/toast-fns.test.ts +240 -0
- package/src/__tests__/toast-position-utils.test.ts +259 -0
- package/src/__tests__/toast-positioner-utils.test.ts +214 -0
- package/src/__tests__/toast-store.test.ts +622 -0
- package/src/__tests__/toast-timers.test.ts +163 -0
- package/src/__tests__/use-animated-target.test.tsx +60 -0
- package/src/__tests__/use-app-state.test.tsx +127 -0
- package/src/__tests__/use-toast-colors.test.tsx +189 -0
- package/src/__tests__/web-position-fixed.test.ts +70 -0
- package/src/avatar-group/AvatarGroup.web.tsx +2 -1
- package/src/bottom-sheet/index.web.tsx +3 -2
- package/src/context-menu/index.web.tsx +3 -2
- package/src/dialog/Dialog.web.tsx +4 -3
- package/src/index.ts +4 -1
- package/src/index.web.ts +4 -1
- package/src/menu/index.web.tsx +2 -1
- package/src/popover/index.web.tsx +3 -2
- package/src/portal/index.tsx +4 -1
- package/src/progressive-blur/index.tsx +78 -0
- package/src/progressive-blur/index.web.tsx +65 -0
- package/src/progressive-blur/shared.ts +81 -0
- package/src/progressive-blur/types.ts +21 -0
- package/src/select/index.web.tsx +2 -1
- package/src/styles/web-view-style.ts +21 -0
- package/src/tab-bar/TabBar.stories.tsx +217 -0
- package/src/tab-bar/TabBarBase.tsx +517 -0
- package/src/tab-bar/expo-router/RouterTabBar.tsx +80 -0
- package/src/tab-bar/expo-router/fading-tab-screen.tsx +109 -0
- package/src/tab-bar/expo-router/index.ts +13 -0
- package/src/tab-bar/glyph.native.tsx +46 -0
- package/src/tab-bar/glyph.tsx +31 -0
- package/src/tab-bar/index.ts +32 -0
- package/src/tab-bar/index.web.tsx +34 -0
- package/src/tab-bar/minimize-context.tsx +117 -0
- package/src/tab-bar/shared.ts +159 -0
- package/src/tab-bar/surface.native.tsx +60 -0
- package/src/tab-bar/surface.tsx +47 -0
- package/src/tab-bar/surface.web.tsx +56 -0
- package/src/tab-bar/types.ts +88 -0
- package/src/toast/Positioner.tsx +121 -0
- package/src/toast/Toast.stories.tsx +292 -65
- package/src/toast/ToastContent.tsx +405 -0
- package/src/toast/ToastHost.native.tsx +31 -0
- package/src/toast/ToastHost.tsx +67 -0
- package/src/toast/ToastIcon.tsx +55 -0
- package/src/toast/ToastRow.tsx +485 -0
- package/src/toast/ToastSwipeHandler.tsx +222 -0
- package/src/toast/Toaster.tsx +259 -0
- package/src/toast/animations.ts +313 -0
- package/src/toast/constants.ts +76 -0
- package/src/toast/context.tsx +44 -0
- package/src/toast/index.tsx +47 -123
- package/src/toast/position-utils.ts +149 -0
- package/src/toast/positioner-utils.ts +142 -0
- package/src/toast/toast-comparator.ts +41 -0
- package/src/toast/toast-fns.ts +104 -0
- package/src/toast/toast-store.ts +432 -0
- package/src/toast/toast-timers.ts +124 -0
- package/src/toast/types.ts +301 -5
- package/src/toast/use-animated-target.ts +61 -0
- package/src/toast/use-app-state.ts +77 -0
- package/src/toast/use-toast-colors.ts +133 -0
- package/src/toast/use-toast-position.ts +46 -0
- package/src/tooltip/index.web.tsx +2 -1
- package/src/zoomable-image-gallery/ZoomableImageGallery.stories.tsx +134 -0
- package/src/zoomable-image-gallery/ZoomableImageGallery.tsx +50 -27
- package/lib/commonjs/toast/Toast.js +0 -267
- package/lib/commonjs/toast/Toast.js.map +0 -1
- package/lib/commonjs/toast/const.js +0 -8
- package/lib/commonjs/toast/const.js.map +0 -1
- package/lib/commonjs/toast/index.web.js +0 -114
- package/lib/commonjs/toast/index.web.js.map +0 -1
- package/lib/commonjs/toast/sonner/index.js +0 -9
- package/lib/commonjs/toast/sonner/index.js.map +0 -1
- package/lib/commonjs/toast/sonner/index.web.js +0 -9
- package/lib/commonjs/toast/sonner/index.web.js.map +0 -1
- package/lib/module/toast/Toast.js +0 -258
- package/lib/module/toast/Toast.js.map +0 -1
- package/lib/module/toast/const.js +0 -4
- package/lib/module/toast/const.js.map +0 -1
- package/lib/module/toast/index.web.js +0 -74
- package/lib/module/toast/index.web.js.map +0 -1
- package/lib/module/toast/sonner/index.js +0 -5
- package/lib/module/toast/sonner/index.js.map +0 -1
- package/lib/module/toast/sonner/index.web.js +0 -5
- package/lib/module/toast/sonner/index.web.js.map +0 -1
- package/lib/typescript/commonjs/toast/Toast.d.ts +0 -23
- package/lib/typescript/commonjs/toast/Toast.d.ts.map +0 -1
- package/lib/typescript/commonjs/toast/const.d.ts +0 -2
- package/lib/typescript/commonjs/toast/const.d.ts.map +0 -1
- package/lib/typescript/commonjs/toast/index.web.d.ts +0 -29
- package/lib/typescript/commonjs/toast/index.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/toast/sonner/index.d.ts +0 -2
- package/lib/typescript/commonjs/toast/sonner/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/toast/sonner/index.web.d.ts +0 -2
- package/lib/typescript/commonjs/toast/sonner/index.web.d.ts.map +0 -1
- package/lib/typescript/module/toast/Toast.d.ts +0 -23
- package/lib/typescript/module/toast/Toast.d.ts.map +0 -1
- package/lib/typescript/module/toast/const.d.ts +0 -2
- package/lib/typescript/module/toast/const.d.ts.map +0 -1
- package/lib/typescript/module/toast/index.web.d.ts +0 -29
- package/lib/typescript/module/toast/index.web.d.ts.map +0 -1
- package/lib/typescript/module/toast/sonner/index.d.ts +0 -2
- package/lib/typescript/module/toast/sonner/index.d.ts.map +0 -1
- package/lib/typescript/module/toast/sonner/index.web.d.ts +0 -2
- package/lib/typescript/module/toast/sonner/index.web.d.ts.map +0 -1
- package/src/toast/Toast.tsx +0 -269
- package/src/toast/const.ts +0 -1
- package/src/toast/index.web.tsx +0 -101
- package/src/toast/sonner/index.ts +0 -3
- package/src/toast/sonner/index.web.ts +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surface.web.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/surface.web.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAkBnD,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,kBAAkB,2CAWjE;yBAXe,aAAa"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ported from expo-glass-tabs v0.1.1 — src/glass-tab-bar.tsx
|
|
3
|
+
* (MIT © 2026 David Mokos). See the top-level NOTICE.
|
|
4
|
+
*
|
|
5
|
+
* Public API types for `@oxyhq/bloom/tab-bar`.
|
|
6
|
+
*
|
|
7
|
+
* This module imports from `react` and `react-native` ONLY. It is resolved by a
|
|
8
|
+
* consumer's `tsc`, by Metro, and by every web bundler alike, so a platform
|
|
9
|
+
* import here (expo-glass-effect / expo-symbols / expo-router) would break all
|
|
10
|
+
* three at once. Platform behaviour lives in `surface.native.tsx` /
|
|
11
|
+
* `glyph.native.tsx` / `surface.web.tsx` and the `expo-router/` adapter.
|
|
12
|
+
*/
|
|
13
|
+
import type { ReactNode } from 'react';
|
|
14
|
+
import type { PressableProps, ViewProps } from 'react-native';
|
|
15
|
+
export type TabBarItem = {
|
|
16
|
+
/** Stable identity for the tab (a route name in router-driven usage). */
|
|
17
|
+
name: string;
|
|
18
|
+
/** Text under the icon; fades out and is clipped when the bar minimizes. */
|
|
19
|
+
label: string;
|
|
20
|
+
/**
|
|
21
|
+
* The glyph, as a Bloom icon element (`<Icons.Home />`) or any node. This is
|
|
22
|
+
* the primary icon API — same convention as `Tabs`/`TabsTrigger` and
|
|
23
|
+
* `FrostedIconButton`. The bar renders it TWICE (an inactive layer with the
|
|
24
|
+
* active layer crossfading on top), injecting the layer's tint as the icon's
|
|
25
|
+
* `fill` unless the element already sets one.
|
|
26
|
+
*/
|
|
27
|
+
icon: ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Optional SF Symbol name, used INSTEAD of `icon` on iOS only. A pure
|
|
30
|
+
* enhancement handled solely in `glyph.native.tsx`; the neutral and web
|
|
31
|
+
* glyphs ignore it and render `icon`, so every platform stays covered.
|
|
32
|
+
*/
|
|
33
|
+
sfSymbol?: string;
|
|
34
|
+
};
|
|
35
|
+
export type TabBarTheme = {
|
|
36
|
+
/** Label/glyph color of the tab the highlight is over. */
|
|
37
|
+
activeTint: string;
|
|
38
|
+
/** Label/glyph color of every other tab. */
|
|
39
|
+
inactiveTint: string;
|
|
40
|
+
/** Sliding highlight pill color. */
|
|
41
|
+
highlight: string;
|
|
42
|
+
/** Tint layered over the liquid glass (iOS 26) surface. */
|
|
43
|
+
glassTint: string;
|
|
44
|
+
/** Near-opaque background used when liquid glass is unavailable. */
|
|
45
|
+
solidFallback: string;
|
|
46
|
+
};
|
|
47
|
+
export type TabBarProps = ViewProps & {
|
|
48
|
+
/**
|
|
49
|
+
* CONTROLLED path — the index of the focused tab. The bar owns the sliding
|
|
50
|
+
* highlight and springs it here whenever this changes. Use this when there is
|
|
51
|
+
* no router in play; the router adapter uses the per-button `isFocused` path
|
|
52
|
+
* instead (see {@link TabBarButtonProps.isFocused}) and must NOT pass this.
|
|
53
|
+
*/
|
|
54
|
+
activeIndex?: number;
|
|
55
|
+
/**
|
|
56
|
+
* Called with the chosen index when a tab is picked by tap, by scrub release,
|
|
57
|
+
* or by keyboard/assistive-technology activation of a `TabBarButton`.
|
|
58
|
+
*/
|
|
59
|
+
onIndexChange?: (index: number) => void;
|
|
60
|
+
/** Partial override of the theme resolved from Bloom's color tokens. */
|
|
61
|
+
theme?: Partial<TabBarTheme>;
|
|
62
|
+
/**
|
|
63
|
+
* Haptic tick as the scrub crosses tab boundaries. Defaults to `true`. Runs
|
|
64
|
+
* through Bloom's `useHaptics`, so it is already a no-op on web and when the
|
|
65
|
+
* optional `expo-haptics` peer is absent.
|
|
66
|
+
*/
|
|
67
|
+
haptics?: boolean;
|
|
68
|
+
};
|
|
69
|
+
export type TabBarButtonProps = PressableProps & {
|
|
70
|
+
item: TabBarItem;
|
|
71
|
+
/** Position in the bar. Drives the highlight target and the glyph crossfade. */
|
|
72
|
+
index: number;
|
|
73
|
+
/**
|
|
74
|
+
* FOCUS-DRIVEN path — supplied by the `expo-router` adapter from the tab
|
|
75
|
+
* trigger's own focus state. When present it wins over the bar's
|
|
76
|
+
* `activeIndex`, and this button (not the bar) drives the highlight, which is
|
|
77
|
+
* what makes programmatic navigation, deep links and back gestures move it.
|
|
78
|
+
*
|
|
79
|
+
* Leave it undefined for the controlled path: the button then resolves its
|
|
80
|
+
* focus from the bar's `activeIndex` and reports presses through the bar's
|
|
81
|
+
* `onIndexChange`.
|
|
82
|
+
*/
|
|
83
|
+
isFocused?: boolean;
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9D,MAAM,MAAM,UAAU,GAAG;IACvB,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,YAAY,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG;IACpC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,wEAAwE;IACxE,KAAK,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC7B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,cAAc,GAAG;IAC/C,IAAI,EAAE,UAAU,CAAC;IACjB,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derived from sonner-native v0.26.4 — src/positioner.tsx
|
|
3
|
+
* (MIT © Gunnar Torfi Steinarsson). See the top-level NOTICE.
|
|
4
|
+
*
|
|
5
|
+
* One container per occupied position, plus the press-to-collapse area outside an
|
|
6
|
+
* expanded stack. The container pins all four edges and `getInsetValues` overrides
|
|
7
|
+
* just the anchored one, so it always has a real height and the rows inside it —
|
|
8
|
+
* which are absolutely positioned — are never laid out out of bounds. See
|
|
9
|
+
* `getContainerStyle` for what a zero-height container did to Android.
|
|
10
|
+
*
|
|
11
|
+
* `position: 'absolute'` is correct on BOTH platforms and this file stays fully
|
|
12
|
+
* universal: `ToastHost` supplies a viewport-sized containing block on web, so
|
|
13
|
+
* there is no `.web` fork and no `position: 'fixed'` here (W7).
|
|
14
|
+
*
|
|
15
|
+
* `pointerEvents` goes in `style`, never as a prop — the prop form is deprecated
|
|
16
|
+
* in react-native-web and logs on every render.
|
|
17
|
+
*/
|
|
18
|
+
import * as React from 'react';
|
|
19
|
+
import type { ToasterProps } from './types';
|
|
20
|
+
export declare const Positioner: React.FC<React.PropsWithChildren<Pick<ToasterProps, 'position' | 'style'>>>;
|
|
21
|
+
//# sourceMappingURL=Positioner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Positioner.d.ts","sourceRoot":"","sources":["../../../../src/toast/Positioner.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAwB5C,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAC/B,KAAK,CAAC,iBAAiB,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC,CA+DlE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ToasterProps, type ToastProps } from './types';
|
|
2
|
+
export type ToastContentProps = Pick<ToastProps, 'id' | 'title' | 'description' | 'variant' | 'icon' | 'action' | 'cancel' | 'close' | 'closeButton' | 'dismissible' | 'richColors' | 'promiseOptions' | 'styles' | 'style' | 'actionButtonStyle' | 'actionButtonTextStyle' | 'cancelButtonStyle' | 'cancelButtonTextStyle' | 'allowFontScaling' | 'maxFontSizeMultiplier' | 'backgroundComponent'> & {
|
|
3
|
+
unstyled: boolean;
|
|
4
|
+
onDismiss: (id: string | number) => void;
|
|
5
|
+
/** Variant icon overrides from the outlet (`icons={{ success: … }}`). */
|
|
6
|
+
icons: ToastIcons;
|
|
7
|
+
};
|
|
8
|
+
type ToastIcons = NonNullable<ToasterProps['icons']>;
|
|
9
|
+
export declare function ToastContent({ id, title, description, variant, icon, icons, action, cancel, close, closeButton, dismissible, richColors, promiseOptions, styles: styleOverrides, style, unstyled, onDismiss, actionButtonStyle, actionButtonTextStyle, cancelButtonStyle, cancelButtonTextStyle, allowFontScaling, maxFontSizeMultiplier, backgroundComponent, }: ToastContentProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare namespace ToastContent {
|
|
11
|
+
var displayName: string;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=ToastContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastContent.d.ts","sourceRoot":"","sources":["../../../../src/toast/ToastContent.tsx"],"names":[],"mappings":"AA8BA,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,UAAU,EAChB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,UAAU,EACR,IAAI,GACJ,OAAO,GACP,aAAa,GACb,SAAS,GACT,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,aAAa,GACb,aAAa,GACb,YAAY,GACZ,gBAAgB,GAChB,QAAQ,GACR,OAAO,GACP,mBAAmB,GACnB,uBAAuB,GACvB,mBAAmB,GACnB,uBAAuB,GACvB,kBAAkB,GAClB,uBAAuB,GACvB,qBAAqB,CACxB,GAAG;IACF,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IACzC,yEAAyE;IACzE,KAAK,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF,KAAK,UAAU,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;AAErD,wBAAgB,YAAY,CAAC,EAC3B,EAAE,EACF,KAAK,EACL,WAAW,EACX,OAAO,EACP,IAAI,EACJ,KAAK,EACL,MAAM,EACN,MAAM,EACN,KAAK,EACL,WAAW,EACX,WAAW,EACX,UAAkB,EAClB,cAAc,EACd,MAAM,EAAE,cAAc,EACtB,KAAK,EACL,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,GACpB,EAAE,iBAAiB,2CA0HnB;yBAnJe,YAAY"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ToastHostProps } from './types';
|
|
2
|
+
export declare function ToastHost({ children, ToasterOverlayWrapper }: ToastHostProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare namespace ToastHost {
|
|
4
|
+
var displayName: string;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=ToastHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastHost.d.ts","sourceRoot":"","sources":["../../../../src/toast/ToastHost.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,qBAAqB,EAAE,EAAE,cAAc,2CAgB5E;yBAhBe,SAAS"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ToastHostProps } from './types';
|
|
2
|
+
export declare function ToastHost({ children, ToasterOverlayWrapper }: ToastHostProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare namespace ToastHost {
|
|
4
|
+
var displayName: string;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=ToastHost.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastHost.native.d.ts","sourceRoot":"","sources":["../../../../src/toast/ToastHost.native.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,qBAAqB,EAAE,EAAE,cAAc,2CAK5E;yBALe,SAAS"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ToastVariant } from './types';
|
|
2
|
+
export declare function ToastIcon({ variant, color, }: {
|
|
3
|
+
variant: ToastVariant | undefined;
|
|
4
|
+
color: string;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
export declare namespace ToastIcon {
|
|
7
|
+
var displayName: string;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ToastIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastIcon.d.ts","sourceRoot":"","sources":["../../../../src/toast/ToastIcon.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAY5C,wBAAgB,SAAS,CAAC,EACxB,OAAO,EACP,KAAK,GACN,EAAE;IACD,OAAO,EAAE,YAAY,GAAG,SAAS,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf,kDAaA;yBAnBe,SAAS"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derived from sonner-native v0.26.4 — src/toast.tsx:39-437
|
|
3
|
+
* (MIT © Gunnar Torfi Steinarsson). See the top-level NOTICE.
|
|
4
|
+
*
|
|
5
|
+
* The animated shell around a row: stack offset + scale, enter/exit animation,
|
|
6
|
+
* height measurement, swipe wrapper and the imperative wiggle handle. The visual
|
|
7
|
+
* row itself is `ToastContent` (or the consumer's `jsx`).
|
|
8
|
+
*
|
|
9
|
+
* W6 — INVARIANT: THE MEASURED `Animated.View` IS `style`-ONLY, NEVER
|
|
10
|
+
* `className`'d. Under react-native-css on web, `onLayout` never fires for a
|
|
11
|
+
* className'd component, which would strand every row at
|
|
12
|
+
* `ESTIMATED_TOAST_HEIGHT` and pile the stack on top of itself. Measurement runs
|
|
13
|
+
* a three-tier ladder — `getBoundingClientRect()` (RN >= 0.83 refs and RN-Web),
|
|
14
|
+
* then `measureInWindow` (older New Arch), then `onLayout` as the safety net —
|
|
15
|
+
* so no single platform quirk can silently degrade it. A consumer's `toast.custom`
|
|
16
|
+
* JSX is unaffected: the ref sits on this engine wrapper, not on their element.
|
|
17
|
+
*
|
|
18
|
+
* W3 — the animated style READS two shared values and returns only the transform.
|
|
19
|
+
* `position`, `width` and the `top`/`bottom` anchor are static `StyleSheet` entries:
|
|
20
|
+
* upstream writes the anchor conditionally INSIDE the mapper, so the previous
|
|
21
|
+
* anchor is never cleared when `position` changes and the static keys are
|
|
22
|
+
* re-committed every frame. Both shared values are driven imperatively from plain-JS
|
|
23
|
+
* targets (`useAnimatedTarget`), never returned from a mapper.
|
|
24
|
+
*
|
|
25
|
+
* W5 — this row does NOT subscribe to `AppState`. `Toaster` holds one
|
|
26
|
+
* subscription for the whole stack (upstream creates one per row, so N toasts
|
|
27
|
+
* meant N `visibilitychange` listeners).
|
|
28
|
+
*
|
|
29
|
+
* THE EXIT IS ALWAYS A LAYOUT ANIMATION; THE ENTER DEPENDS ON THE PLATFORM.
|
|
30
|
+
* `animations.ts` returns EITHER an `entering` builder (native, and any consumer
|
|
31
|
+
* override) OR an `enterTranslateY` for `rowStyle` below to fade and slide the row
|
|
32
|
+
* in imperatively (web default) — never both. When `enterTranslateY` is
|
|
33
|
+
* `undefined`, `enterProgress` is seeded at 1 and `rowStyle` collapses to the
|
|
34
|
+
* wiggle scale alone, so nothing here competes with `entering`. Both halves of
|
|
35
|
+
* that split are load-bearing and neither may be "simplified" into the other:
|
|
36
|
+
* `animations.ts` documents the web pin that forbids `entering` on web and the
|
|
37
|
+
* native regression that forbids the imperative driver on native.
|
|
38
|
+
*/
|
|
39
|
+
import * as React from 'react';
|
|
40
|
+
import type { ToastPosition, ToastRef, ToastStyles } from './types';
|
|
41
|
+
export declare const ToastRow: React.ForwardRefExoticComponent<{
|
|
42
|
+
unstyled?: boolean;
|
|
43
|
+
style?: import("react-native").ViewStyle;
|
|
44
|
+
styles?: ToastStyles;
|
|
45
|
+
backgroundComponent?: React.ReactNode;
|
|
46
|
+
} & {
|
|
47
|
+
id: string | number;
|
|
48
|
+
index: number;
|
|
49
|
+
title: string;
|
|
50
|
+
variant?: import("./types").ToastVariant;
|
|
51
|
+
numberOfToasts: number;
|
|
52
|
+
orderedToastIds: Array<string | number>;
|
|
53
|
+
jsx?: React.ReactNode;
|
|
54
|
+
description?: string;
|
|
55
|
+
invert?: boolean;
|
|
56
|
+
important?: boolean;
|
|
57
|
+
duration?: number;
|
|
58
|
+
position?: ToastPosition;
|
|
59
|
+
animation?: import("./types").ToastAnimation;
|
|
60
|
+
dismissible?: boolean;
|
|
61
|
+
icon?: React.ReactNode;
|
|
62
|
+
action?: import("./types").ToastAction | React.ReactNode;
|
|
63
|
+
cancel?: import("./types").ToastAction | React.ReactNode;
|
|
64
|
+
close?: React.ReactNode;
|
|
65
|
+
closeButton?: boolean;
|
|
66
|
+
richColors?: boolean;
|
|
67
|
+
onDismiss?: (id: string | number) => void;
|
|
68
|
+
onAutoClose?: (id: string | number) => void;
|
|
69
|
+
promiseOptions?: import("./types").PromiseOptions;
|
|
70
|
+
actionButtonStyle?: import("react-native").ViewStyle;
|
|
71
|
+
actionButtonTextStyle?: import("react-native").TextStyle;
|
|
72
|
+
cancelButtonStyle?: import("react-native").ViewStyle;
|
|
73
|
+
cancelButtonTextStyle?: import("react-native").TextStyle;
|
|
74
|
+
onPress?: () => void;
|
|
75
|
+
allowFontScaling?: boolean;
|
|
76
|
+
maxFontSizeMultiplier?: number;
|
|
77
|
+
} & {
|
|
78
|
+
onDismiss: (id: string | number) => void;
|
|
79
|
+
} & React.RefAttributes<ToastRef>>;
|
|
80
|
+
//# sourceMappingURL=ToastRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastRow.d.ts","sourceRoot":"","sources":["../../../../src/toast/ToastRow.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA2B/B,OAAO,KAAK,EAEV,aAAa,EAEb,QAAQ,EACR,WAAW,EACZ,MAAM,SAAS,CAAC;AAwDjB,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAHR,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI;kCA6UzC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derived from sonner-native v0.26.4 — src/gestures.tsx
|
|
3
|
+
* (MIT © Gunnar Torfi Steinarsson). See the top-level NOTICE.
|
|
4
|
+
*
|
|
5
|
+
* W2 — the animated style reads `translate`, `direction`, `position`,
|
|
6
|
+
* `windowWidth` and `isAndroid`; ALL of them are in the dependency array. On web
|
|
7
|
+
* without the worklets babel plugin reanimated re-runs the mapper on its deps
|
|
8
|
+
* rather than on auto-tracked reads, so a missing dep freezes the swipe transform
|
|
9
|
+
* at its first frame (upstream omits `position` and `isAndroid`, so a toast that
|
|
10
|
+
* changes position mid-life swipes the wrong way).
|
|
11
|
+
*/
|
|
12
|
+
import * as React from 'react';
|
|
13
|
+
import { type ViewStyle } from 'react-native';
|
|
14
|
+
import type { ToastPosition, ToastProps } from './types';
|
|
15
|
+
type ToastSwipeHandlerProps = Pick<ToastProps, 'important'> & {
|
|
16
|
+
onRemove: () => void;
|
|
17
|
+
style?: ViewStyle | (ViewStyle | undefined)[];
|
|
18
|
+
onBegin: () => void;
|
|
19
|
+
onFinalize: () => void;
|
|
20
|
+
enabled?: boolean;
|
|
21
|
+
unstyled?: boolean;
|
|
22
|
+
position?: ToastPosition;
|
|
23
|
+
onPress: (args: {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
}) => void;
|
|
27
|
+
};
|
|
28
|
+
export declare const ToastSwipeHandler: React.FC<React.PropsWithChildren<ToastSwipeHandlerProps>>;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=ToastSwipeHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastSwipeHandler.d.ts","sourceRoot":"","sources":["../../../../src/toast/ToastSwipeHandler.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AActB,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAWzD,KAAK,sBAAsB,GAAG,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,GAAG;IAC5D,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,GAAG,CAAC,SAAS,GAAG,SAAS,CAAC,EAAE,CAAC;IAC9C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,OAAO,EAAE,CAAC,IAAI,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CACtC,KAAK,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,CAqJhD,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derived from sonner-native v0.26.4 — src/toaster.tsx
|
|
3
|
+
* (MIT © Gunnar Torfi Steinarsson). See the top-level NOTICE.
|
|
4
|
+
*
|
|
5
|
+
* Subscribes to the store, resolves the outlet configuration once, groups rows by
|
|
6
|
+
* position and renders each group through `Positioner` inside the platform
|
|
7
|
+
* `ToastHost`.
|
|
8
|
+
*
|
|
9
|
+
* W5 — ONE `AppState` subscription for the whole stack. Upstream subscribes per
|
|
10
|
+
* row, so N toasts meant N `visibilitychange` listeners all doing the same work;
|
|
11
|
+
* the store already exposes stack-wide `pauseAllTimers`/`resumeAllTimers`.
|
|
12
|
+
*
|
|
13
|
+
* `react-native-screens` is not imported here either — the platform wrapper is
|
|
14
|
+
* `ToastHost`'s concern (D6).
|
|
15
|
+
*/
|
|
16
|
+
import * as React from 'react';
|
|
17
|
+
import type { ToasterProps } from './types';
|
|
18
|
+
export declare const Toaster: React.FC<ToasterProps>;
|
|
19
|
+
//# sourceMappingURL=Toaster.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toaster.d.ts","sourceRoot":"","sources":["../../../../src/toast/Toaster.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,KAAK,EAGV,YAAY,EAGb,MAAM,SAAS,CAAC;AAyBjB,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAyM1C,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type ReanimatedKeyframe } from 'react-native-reanimated';
|
|
2
|
+
import type { ToastAnimation, ToastEntryExitAnimation, ToastPosition } from './types';
|
|
3
|
+
export type ToastEnterDriver = 'imperative' | 'layoutAnimation';
|
|
4
|
+
/**
|
|
5
|
+
* THE one platform switch in the toast engine: which mechanism plays Bloom's
|
|
6
|
+
* DEFAULT enter animation. See the header for why the two platforms cannot share
|
|
7
|
+
* one mechanism.
|
|
8
|
+
*/
|
|
9
|
+
export declare const TOAST_ENTER_DRIVER: ToastEnterDriver;
|
|
10
|
+
/** Worklet-callable easing for `withTiming` inside mappers and layout transitions. */
|
|
11
|
+
export declare const easeOutQuartFn: (x: number) => number;
|
|
12
|
+
export declare const easeInOutCircFn: (x: number) => number;
|
|
13
|
+
/**
|
|
14
|
+
* Bounded so an animated `gap` cannot grow the cache without limit. The natural
|
|
15
|
+
* key space is 3 enter shapes + 3 positions x hidden x single x one stackGap = 15
|
|
16
|
+
* entries, so this leaves room for a few gap values while staying O(1) memory.
|
|
17
|
+
*/
|
|
18
|
+
export declare const MAX_CACHED_ANIMATIONS = 32;
|
|
19
|
+
/** Exported so the bounded-growth invariant above is testable. */
|
|
20
|
+
export declare function toastAnimationCacheSize(): number;
|
|
21
|
+
/** Native only — on web the same shape is played imperatively by `ToastRow`. */
|
|
22
|
+
export declare function getToastEnterAnimation(position: ToastPosition): ReanimatedKeyframe;
|
|
23
|
+
export declare function getToastExitAnimation({ position, isHiddenByLimit, isSingle, stackGap, }: {
|
|
24
|
+
position: ToastPosition;
|
|
25
|
+
isHiddenByLimit: boolean;
|
|
26
|
+
isSingle: boolean;
|
|
27
|
+
stackGap: number;
|
|
28
|
+
}): ReanimatedKeyframe;
|
|
29
|
+
type ResolvedAnimation = Exclude<ToastEntryExitAnimation, 'default'>;
|
|
30
|
+
export type ResolvedEnterAnimation = {
|
|
31
|
+
entering: ResolvedAnimation | undefined;
|
|
32
|
+
enterTranslateY: number | undefined;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Pure so the platform split is testable without a renderer.
|
|
36
|
+
*
|
|
37
|
+
* INVARIANT: exactly ONE of `entering` / `enterTranslateY` is ever set. Both
|
|
38
|
+
* would play the enter twice; neither would leave the row with no enter animation
|
|
39
|
+
* at all and — on the imperative path — parked at `opacity: 0`, one full
|
|
40
|
+
* `enterTranslateY` away from its slot. A consumer override always wins and always
|
|
41
|
+
* goes through `entering`, on both platforms.
|
|
42
|
+
*/
|
|
43
|
+
export declare function resolveToastEnterAnimation({ position, enterOverride, driver, }: {
|
|
44
|
+
position: ToastPosition;
|
|
45
|
+
enterOverride: ToastEntryExitAnimation | undefined;
|
|
46
|
+
driver: ToastEnterDriver;
|
|
47
|
+
}): ResolvedEnterAnimation;
|
|
48
|
+
/** Per-toast animation wins over the outlet's; `'default'` opts back in to Bloom's. */
|
|
49
|
+
export declare const resolveAnimationField: (toastValue: ToastEntryExitAnimation | undefined, toasterValue: ToastEntryExitAnimation | undefined, defaultValue: ResolvedAnimation) => ResolvedAnimation;
|
|
50
|
+
export declare const useToastLayoutAnimations: (positionProp: ToastPosition | undefined, animationProp: ToastAnimation | undefined, isHiddenByLimit: boolean, numberOfToasts: number) => {
|
|
51
|
+
entering: ResolvedAnimation | undefined;
|
|
52
|
+
exiting: ResolvedAnimation | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* How far `ToastRow`'s imperative enter travels, or `undefined` when nothing
|
|
55
|
+
* should be driven imperatively — because `entering` is playing the enter
|
|
56
|
+
* instead (native, or a consumer override on either platform), or because
|
|
57
|
+
* reduced motion is on and there is no enter animation at all.
|
|
58
|
+
*/
|
|
59
|
+
enterTranslateY: number | undefined;
|
|
60
|
+
};
|
|
61
|
+
export {};
|
|
62
|
+
//# sourceMappingURL=animations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animations.d.ts","sourceRoot":"","sources":["../../../../src/toast/animations.ts"],"names":[],"mappings":"AAmEA,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACvB,aAAa,EACd,MAAM,SAAS,CAAC;AAWjB,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,iBAAiB,CAAC;AAEhE;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,gBACyB,CAAC;AAE3D,sFAAsF;AACtF,eAAO,MAAM,cAAc,uBAAwC,CAAC;AACpE,eAAO,MAAM,eAAe,uBAA4C,CAAC;AAYzE;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,KAAK,CAAC;AA0BxC,kEAAkE;AAClE,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAED,gFAAgF;AAChF,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,aAAa,GACtB,kBAAkB,CAgBpB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,eAAe,EACf,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,aAAa,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,kBAAkB,CA2BrB;AAED,KAAK,iBAAiB,GAAG,OAAO,CAAC,uBAAuB,EAAE,SAAS,CAAC,CAAC;AAErE,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACxC,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,EACR,aAAa,EACb,MAAM,GACP,EAAE;IACD,QAAQ,EAAE,aAAa,CAAC;IACxB,aAAa,EAAE,uBAAuB,GAAG,SAAS,CAAC;IACnD,MAAM,EAAE,gBAAgB,CAAC;CAC1B,GAAG,sBAAsB,CAOzB;AAED,uFAAuF;AACvF,eAAO,MAAM,qBAAqB,GAChC,YAAY,uBAAuB,GAAG,SAAS,EAC/C,cAAc,uBAAuB,GAAG,SAAS,EACjD,cAAc,iBAAiB,KAC9B,iBAMF,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,cAAc,aAAa,GAAG,SAAS,EACvC,eAAe,cAAc,GAAG,SAAS,EACzC,iBAAiB,OAAO,EACxB,gBAAgB,MAAM,KACrB;IACD,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACxC,OAAO,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACvC;;;;;OAKG;IACH,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;CAyCrC,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derived from sonner-native v0.26.4 — src/constants.ts and src/animations.ts
|
|
3
|
+
* (MIT © Gunnar Torfi Steinarsson). See the top-level NOTICE.
|
|
4
|
+
*
|
|
5
|
+
* The two animation durations live HERE rather than in `animations.ts` so
|
|
6
|
+
* `toast-store.ts` never has to import a Reanimated-dependent module: the store
|
|
7
|
+
* stays pure JS and its suite needs zero React Native mocks.
|
|
8
|
+
*/
|
|
9
|
+
import type { AutoWiggle, ToastPosition, ToastSwipeDirection, ToastTheme, ToastVariant } from './types';
|
|
10
|
+
/** Fallback row height until a toast has been measured. */
|
|
11
|
+
export declare const ESTIMATED_TOAST_HEIGHT = 70;
|
|
12
|
+
export declare const CLOSE_BUTTON_HIT_AREA = 60;
|
|
13
|
+
export declare const OUTSIDE_PRESS_PADDING = 20;
|
|
14
|
+
/** However deep a stack gets, a buried row never narrows past this scale. */
|
|
15
|
+
export declare const MIN_STACK_SCALE_X = 0.8;
|
|
16
|
+
/** Enter animation length; also the auto-close timer's head start and the overlay teardown delay. */
|
|
17
|
+
export declare const ENTERING_ANIMATION_DURATION = 300;
|
|
18
|
+
export declare const STACKING_ANIMATION_DURATION = 600;
|
|
19
|
+
export declare const toastDefaults: {
|
|
20
|
+
duration: number;
|
|
21
|
+
position: ToastPosition;
|
|
22
|
+
offset: number;
|
|
23
|
+
swipeToDismissDirection: ToastSwipeDirection;
|
|
24
|
+
variant: ToastVariant | undefined;
|
|
25
|
+
visibleToasts: number;
|
|
26
|
+
closeButton: boolean;
|
|
27
|
+
dismissible: boolean;
|
|
28
|
+
unstyled: boolean;
|
|
29
|
+
invert: boolean;
|
|
30
|
+
pauseWhenPageIsHidden: boolean;
|
|
31
|
+
gap: number;
|
|
32
|
+
theme: ToastTheme;
|
|
33
|
+
autoWiggleOnUpdate: AutoWiggle;
|
|
34
|
+
richColors: boolean;
|
|
35
|
+
enableStacking: boolean;
|
|
36
|
+
stackGap: number;
|
|
37
|
+
allowFontScaling: boolean;
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/toast/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EACV,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,YAAY,EACb,MAAM,SAAS,CAAC;AAEjB,2DAA2D;AAC3D,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC,qGAAqG;AACrG,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAC/C,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAE/C,eAAO,MAAM,aAAa,EAAE;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,aAAa,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,uBAAuB,EAAE,mBAAmB,CAAC;IAC7C,OAAO,EAAE,YAAY,GAAG,SAAS,CAAC;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,UAAU,CAAC;IAClB,kBAAkB,EAAE,UAAU,CAAC;IAC/B,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,OAAO,CAAC;CA8B3B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derived from sonner-native v0.26.4 — src/context.tsx
|
|
3
|
+
* (MIT © Gunnar Torfi Steinarsson). See the top-level NOTICE.
|
|
4
|
+
*
|
|
5
|
+
* Two contexts, split by change frequency: the resolved `Toaster` configuration
|
|
6
|
+
* (stable for the lifetime of the outlet) and the live stack state (changes on
|
|
7
|
+
* every measurement). Splitting them keeps a height measurement from
|
|
8
|
+
* re-rendering every row's config-derived memo.
|
|
9
|
+
*
|
|
10
|
+
* Upstream also passes `addToast` through the stable context; Bloom's rows talk
|
|
11
|
+
* to `toastStore` directly, which is the single authority.
|
|
12
|
+
*/
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import type { DynamicToastContextType, StableToastContextType } from './types';
|
|
15
|
+
export declare const ToastContext: React.Context<StableToastContextType | null>;
|
|
16
|
+
export declare const DynamicToastContext: React.Context<DynamicToastContextType | null>;
|
|
17
|
+
export declare const useToastContext: () => StableToastContextType;
|
|
18
|
+
export declare const useDynamicToastContext: () => DynamicToastContextType;
|
|
19
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/toast/context.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EACV,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,YAAY,8CAExB,CAAC;AAGF,eAAO,MAAM,mBAAmB,+CAC2B,CAAC;AAG5D,eAAO,MAAM,eAAe,QAAO,sBAMlC,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAAO,uBAQzC,CAAC"}
|
|
@@ -1,84 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export type { ToastType,
|
|
1
|
+
import type { ToasterProps } from './types';
|
|
2
|
+
export { toast } from './toast-fns';
|
|
3
|
+
export { Toaster } from './Toaster';
|
|
4
|
+
export { toastDefaults } from './constants';
|
|
5
|
+
export type { AutoWiggle, PromiseStyles, PromiseToastOptions, ToastAction, ToastAnimation, ToastEntryExitAnimation, ToasterProps, ToastFn, ToastHostProps, ToastOptions, ToastPosition, ToastProps, ToastRef, ToastStyles, ToastSwipeDirection, ToastTheme, ToastType, ToastVariant, } from './types';
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
export declare function ToastOutlet(): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
/**
|
|
12
|
-
* Direct access to the Sonner API. Use sparingly — `toast()` covers the
|
|
13
|
-
* common case and keeps the surface tied to bloom's themed look.
|
|
14
|
-
*/
|
|
15
|
-
export declare const api: ((message: string, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
|
|
16
|
-
id?: string | number;
|
|
17
|
-
}) => string | number) & {
|
|
18
|
-
success: (message: string, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
|
|
19
|
-
id?: string | number;
|
|
20
|
-
}) => string | number;
|
|
21
|
-
info: (message: string, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
|
|
22
|
-
id?: string | number;
|
|
23
|
-
}) => string | number;
|
|
24
|
-
error: (message: string, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
|
|
25
|
-
id?: string | number;
|
|
26
|
-
}) => string | number;
|
|
27
|
-
warning: (message: string, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
|
|
28
|
-
id?: string | number;
|
|
29
|
-
}) => string | number;
|
|
30
|
-
custom: (jsx: React.ReactElement, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
|
|
31
|
-
id?: string | number;
|
|
32
|
-
}) => string | number;
|
|
33
|
-
promise: <T>(promise: Promise<T>, options: Omit<{
|
|
34
|
-
promise: Promise<unknown>;
|
|
35
|
-
success: (result: any) => string;
|
|
36
|
-
error: ((error: unknown) => string) | string;
|
|
37
|
-
loading: string;
|
|
38
|
-
styles?: {
|
|
39
|
-
loading?: import("sonner-native").ToastStyles;
|
|
40
|
-
success?: import("sonner-native").ToastStyles;
|
|
41
|
-
error?: import("sonner-native").ToastStyles;
|
|
42
|
-
};
|
|
43
|
-
}, "promise">) => string | number;
|
|
44
|
-
loading: (message: string, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
|
|
45
|
-
id?: string | number;
|
|
46
|
-
}) => string | number;
|
|
47
|
-
dismiss: (id?: string | number) => string | number | undefined;
|
|
48
|
-
wiggle: (id: string | number) => void;
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* Show a toast notification.
|
|
7
|
+
* The toast stack. Mount this ONCE near the app root — `OxyProvider` already
|
|
8
|
+
* does, so most apps never write it themselves.
|
|
52
9
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
10
|
+
* Every default (position, swipe direction, offset, gap, `visibleToasts`,
|
|
11
|
+
* duration, pause-when-hidden) comes from `toastDefaults`, which `Toaster`
|
|
12
|
+
* applies; passing a prop here overrides exactly that one.
|
|
56
13
|
*
|
|
57
|
-
* ```
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* toast.error('Network error', { duration: 5000 });
|
|
61
|
-
* toast.dismiss(id);
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <ToastOutlet />
|
|
16
|
+
* <ToastOutlet position="top-center" visibleToasts={5} />
|
|
62
17
|
* ```
|
|
63
18
|
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
19
|
+
* On iOS a toast that must appear above a native modal needs the overlay host
|
|
20
|
+
* injected — Bloom does not depend on `react-native-screens` itself:
|
|
21
|
+
*
|
|
22
|
+
* ```tsx
|
|
23
|
+
* import { FullWindowOverlay } from 'react-native-screens';
|
|
24
|
+
* <ToastOutlet ToasterOverlayWrapper={FullWindowOverlay} />
|
|
25
|
+
* ```
|
|
66
26
|
*/
|
|
67
|
-
export
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
error: (content: React.ReactNode, options?: Omit<BaseToastOptions, 'type'>) => void;
|
|
71
|
-
warning: (content: React.ReactNode, options?: Omit<BaseToastOptions, 'type'>) => void;
|
|
72
|
-
info: (content: React.ReactNode, options?: Omit<BaseToastOptions, 'type'>) => void;
|
|
73
|
-
dismiss: (id?: string | number) => void;
|
|
27
|
+
export declare function ToastOutlet(props: ToasterProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare namespace ToastOutlet {
|
|
29
|
+
var displayName: string;
|
|
74
30
|
}
|
|
75
|
-
export declare const toast: ToastFn;
|
|
76
|
-
/**
|
|
77
|
-
* Alias of `toast` kept for compatibility with the original 0.4.x surface
|
|
78
|
-
* where `show()` was the documented entry point. New code should prefer
|
|
79
|
-
* `toast()` directly.
|
|
80
|
-
*/
|
|
81
|
-
export declare const show: ToastFn;
|
|
82
|
-
/** Re-export the Toast function type so callers can refer to it. */
|
|
83
|
-
export type Toast = ToastFn;
|
|
84
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/toast/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/toast/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,YAAY,EACV,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,WAAW,EACX,cAAc,EACd,uBAAuB,EACvB,YAAY,EACZ,OAAO,EACP,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,QAAQ,EACR,WAAW,EACX,mBAAmB,EACnB,UAAU,EACV,SAAS,EACT,YAAY,GACb,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,2CAE9C;yBAFe,WAAW"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ToastPosition, ToastProps } from './types';
|
|
2
|
+
export declare const getOrderedToastIds: (toasts: ToastProps[], position: ToastPosition, enableStacking: boolean) => Array<string | number>;
|
|
3
|
+
/**
|
|
4
|
+
* How much a buried row is squeezed horizontally, so the stack reads as depth.
|
|
5
|
+
*
|
|
6
|
+
* Scale rather than width: changing the real width would rewrap the text. Returns
|
|
7
|
+
* 1 (no squeeze) for a single row, an expanded stack, stacking turned off, or
|
|
8
|
+
* before the window width is known.
|
|
9
|
+
*/
|
|
10
|
+
export declare const calculateStackScaleX: ({ index, numberOfToasts, enableStacking, position, isExpanded, stackGap, screenWidth, }: {
|
|
11
|
+
index: number;
|
|
12
|
+
numberOfToasts: number;
|
|
13
|
+
enableStacking: boolean;
|
|
14
|
+
position: ToastPosition;
|
|
15
|
+
isExpanded: boolean;
|
|
16
|
+
stackGap: number;
|
|
17
|
+
screenWidth: number;
|
|
18
|
+
}) => number;
|
|
19
|
+
export declare const calculateToastPosition: ({ index, numberOfToasts, enableStacking, position, allToastHeights, gap, orderedToastIds, isExpanded, stackGap, }: {
|
|
20
|
+
index: number;
|
|
21
|
+
numberOfToasts: number;
|
|
22
|
+
enableStacking: boolean;
|
|
23
|
+
position: ToastPosition;
|
|
24
|
+
allToastHeights: Record<string | number, number>;
|
|
25
|
+
gap: number;
|
|
26
|
+
orderedToastIds: Array<string | number>;
|
|
27
|
+
isExpanded: boolean;
|
|
28
|
+
stackGap: number;
|
|
29
|
+
}) => number;
|
|
30
|
+
//# sourceMappingURL=position-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position-utils.d.ts","sourceRoot":"","sources":["../../../../src/toast/position-utils.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEzD,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,UAAU,EAAE,EACpB,UAAU,aAAa,EACvB,gBAAgB,OAAO,KACtB,KAAK,CAAC,MAAM,GAAG,MAAM,CAQvB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAAI,yFAQlC;IACD,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,aAAa,CAAC;IACxB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB,KAAG,MASH,CAAC;AAaF,eAAO,MAAM,sBAAsB,GAAI,mHAUpC;IACD,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,aAAa,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,CAAC;IACjD,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACxC,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB,KAAG,MAoDH,CAAC"}
|