@oxyhq/bloom 0.50.1 → 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 +5 -3
- package/lib/commonjs/bottom-sheet/index.web.js.map +1 -1
- package/lib/commonjs/context-menu/index.web.js +6 -9
- package/lib/commonjs/context-menu/index.web.js.map +1 -1
- package/lib/commonjs/dialog/Dialog.js +12 -7
- package/lib/commonjs/dialog/Dialog.js.map +1 -1
- package/lib/commonjs/dialog/Dialog.web.js +18 -22
- package/lib/commonjs/dialog/Dialog.web.js.map +1 -1
- package/lib/commonjs/dialog/DialogHeader.js +61 -12
- package/lib/commonjs/dialog/DialogHeader.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 +5 -8
- package/lib/commonjs/menu/index.web.js.map +1 -1
- package/lib/commonjs/popover/index.web.js +8 -9
- 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 +5 -8
- package/lib/commonjs/select/index.web.js.map +1 -1
- package/lib/commonjs/slider/Slider.js +4 -9
- package/lib/commonjs/slider/Slider.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/switch/Switch.js +4 -8
- package/lib/commonjs/switch/Switch.js.map +1 -1
- 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/tabs/Tabs.js +3 -8
- package/lib/commonjs/tabs/Tabs.js.map +1 -1
- 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 +5 -3
- package/lib/module/bottom-sheet/index.web.js.map +1 -1
- package/lib/module/context-menu/index.web.js +6 -9
- package/lib/module/context-menu/index.web.js.map +1 -1
- package/lib/module/dialog/Dialog.js +12 -7
- package/lib/module/dialog/Dialog.js.map +1 -1
- package/lib/module/dialog/Dialog.web.js +18 -22
- package/lib/module/dialog/Dialog.web.js.map +1 -1
- package/lib/module/dialog/DialogHeader.js +61 -12
- package/lib/module/dialog/DialogHeader.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 +5 -8
- package/lib/module/menu/index.web.js.map +1 -1
- package/lib/module/popover/index.web.js +8 -9
- 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 +5 -8
- package/lib/module/select/index.web.js.map +1 -1
- package/lib/module/slider/Slider.js +4 -9
- package/lib/module/slider/Slider.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/switch/Switch.js +4 -8
- package/lib/module/switch/Switch.js.map +1 -1
- 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/tabs/Tabs.js +3 -8
- package/lib/module/tabs/Tabs.js.map +1 -1
- 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.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/Dialog.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/DialogHeader.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/slider/Slider.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/switch/Switch.d.ts.map +1 -1
- 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/tabs/Tabs.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- package/lib/typescript/module/dialog/Dialog.web.d.ts.map +1 -1
- package/lib/typescript/module/dialog/DialogHeader.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/slider/Slider.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/switch/Switch.d.ts.map +1 -1
- 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/tabs/Tabs.d.ts.map +1 -1
- 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 +4 -3
- package/src/context-menu/index.web.tsx +6 -6
- package/src/dialog/Dialog.tsx +7 -4
- package/src/dialog/Dialog.web.tsx +14 -14
- package/src/dialog/DialogHeader.tsx +72 -17
- package/src/index.ts +4 -1
- package/src/index.web.ts +4 -1
- package/src/menu/index.web.tsx +5 -5
- package/src/popover/index.web.tsx +8 -6
- 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 +5 -5
- package/src/slider/Slider.tsx +3 -5
- package/src/styles/web-view-style.ts +21 -0
- package/src/switch/Switch.tsx +4 -5
- 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/tabs/Tabs.tsx +3 -5
- 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 -272
- 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 -263
- 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 -271
- 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
|
@@ -20,6 +20,8 @@ import { Text } from '../typography';
|
|
|
20
20
|
import { Portal } from '../portal/index.web';
|
|
21
21
|
import { useInteractionState } from '../hooks/useInteractionState';
|
|
22
22
|
import { createOverlayZIndex } from '../styles/z-index';
|
|
23
|
+
import { WEB_POSITION_FIXED } from '../styles/web-view-style';
|
|
24
|
+
import { bloomShadowStyle } from '../design-tokens/shadows';
|
|
23
25
|
import { ItemCtx, useItemContext } from './context';
|
|
24
26
|
import type {
|
|
25
27
|
ContextMenuContextValue,
|
|
@@ -185,7 +187,7 @@ export function ContextMenuContent({ children, style }: ContextMenuContentProps)
|
|
|
185
187
|
? theme.colors.backgroundSecondary
|
|
186
188
|
: theme.colors.background,
|
|
187
189
|
borderColor: theme.colors.borderLight,
|
|
188
|
-
|
|
190
|
+
...bloomShadowStyle('m'),
|
|
189
191
|
},
|
|
190
192
|
style,
|
|
191
193
|
]}
|
|
@@ -325,7 +327,7 @@ export function ContextMenuDivider() {
|
|
|
325
327
|
|
|
326
328
|
const styles = StyleSheet.create({
|
|
327
329
|
backdrop: {
|
|
328
|
-
position:
|
|
330
|
+
position: WEB_POSITION_FIXED,
|
|
329
331
|
top: 0,
|
|
330
332
|
left: 0,
|
|
331
333
|
right: 0,
|
|
@@ -335,15 +337,13 @@ const styles = StyleSheet.create({
|
|
|
335
337
|
pointerEvents: 'auto',
|
|
336
338
|
},
|
|
337
339
|
dropdown: {
|
|
338
|
-
position:
|
|
340
|
+
position: WEB_POSITION_FIXED,
|
|
339
341
|
zIndex: contextMenuZIndex.surface,
|
|
340
342
|
borderRadius: 8,
|
|
341
343
|
padding: 4,
|
|
342
344
|
borderWidth: 1,
|
|
343
345
|
overflow: 'hidden',
|
|
344
|
-
|
|
345
|
-
shadowRadius: 12,
|
|
346
|
-
shadowOffset: { width: 0, height: 4 },
|
|
346
|
+
// Overlay elevation applied at the usage site via `bloomShadowStyle('m')`.
|
|
347
347
|
minWidth: 180,
|
|
348
348
|
maxWidth: 280,
|
|
349
349
|
// Opt back in from the Portal root's `pointer-events: none`.
|
package/src/dialog/Dialog.tsx
CHANGED
|
@@ -529,11 +529,13 @@ function SideSheet({
|
|
|
529
529
|
// stack) paints above it. Layer 0 → offset 0 → unchanged.
|
|
530
530
|
{ zIndex: Z_INDEX.fullscreen + Z_INDEX_LAYER_STEP * (layer ?? 0) },
|
|
531
531
|
containerStyle,
|
|
532
|
+
{ pointerEvents: 'box-none' },
|
|
532
533
|
]}
|
|
533
534
|
{...(containerClassName ? ({ className: containerClassName } as Record<string, string>) : {})}
|
|
534
|
-
pointerEvents="box-none"
|
|
535
535
|
>
|
|
536
|
-
<Animated.View
|
|
536
|
+
<Animated.View
|
|
537
|
+
style={[sideStyles.backdrop, backdropAnimatedStyle, { pointerEvents: 'auto' }]}
|
|
538
|
+
>
|
|
537
539
|
<Pressable
|
|
538
540
|
testID={testID ? `${testID}-backdrop` : DIALOG_SHEET_BACKDROP_TESTID}
|
|
539
541
|
accessibilityRole="button"
|
|
@@ -554,13 +556,14 @@ function SideSheet({
|
|
|
554
556
|
{...(panelClassName ? ({ className: panelClassName } as Record<string, string>) : {})}
|
|
555
557
|
style={[
|
|
556
558
|
sideStyles.panel,
|
|
557
|
-
|
|
559
|
+
// `shadowColor` is a valid RN style prop on native (Dialog.tsx is the
|
|
560
|
+
// native variant); the web `shadow*` deprecation is handled in Dialog.web.tsx.
|
|
561
|
+
{ backgroundColor: theme.colors.background, shadowColor: theme.colors.shadow, pointerEvents: 'auto' },
|
|
558
562
|
panelGeometry,
|
|
559
563
|
panelAnimatedStyle,
|
|
560
564
|
panelStyle,
|
|
561
565
|
style,
|
|
562
566
|
]}
|
|
563
|
-
pointerEvents="auto"
|
|
564
567
|
>
|
|
565
568
|
{header ? (
|
|
566
569
|
// Nav-header mode on a side drawer: a static titled bar (the drawer body
|
|
@@ -21,6 +21,8 @@ import { RemoveScrollBar } from 'react-remove-scroll-bar';
|
|
|
21
21
|
|
|
22
22
|
import { Portal } from '../portal/index.web';
|
|
23
23
|
import { createOverlayZIndex } from '../styles/z-index';
|
|
24
|
+
import { WEB_POSITION_FIXED } from '../styles/web-view-style';
|
|
25
|
+
import { bloomShadowStyle } from '../design-tokens/shadows';
|
|
24
26
|
import { useTheme } from '../theme/use-theme';
|
|
25
27
|
import { Context, useDialogContext, useDialogControl } from './context';
|
|
26
28
|
import { DialogBody } from './DialogContent';
|
|
@@ -303,7 +305,7 @@ function CenterOrSideDialog({
|
|
|
303
305
|
// `pointer-events: none`, which is set so the idle portal
|
|
304
306
|
// doesn't intercept clicks on the underlying app.
|
|
305
307
|
style={{
|
|
306
|
-
position:
|
|
308
|
+
position: WEB_POSITION_FIXED,
|
|
307
309
|
top: 0,
|
|
308
310
|
left: 0,
|
|
309
311
|
right: 0,
|
|
@@ -468,10 +470,9 @@ function DialogPanel({
|
|
|
468
470
|
backgroundColor: theme.colors.background,
|
|
469
471
|
borderWidth: 1,
|
|
470
472
|
borderColor: theme.isDark ? 'rgba(255,255,255,0.1)' : 'rgba(0,0,0,0.1)',
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
shadowOffset: { width: 0, height: 4 },
|
|
473
|
+
// Design-system overlay elevation (`shadow-m`) as a `boxShadow` — RN-Web
|
|
474
|
+
// deprecated the `shadow*` style props.
|
|
475
|
+
...bloomShadowStyle('m'),
|
|
475
476
|
zIndex: surfaceZIndex,
|
|
476
477
|
},
|
|
477
478
|
isClosing
|
|
@@ -672,9 +673,8 @@ function SheetSurface({
|
|
|
672
673
|
|
|
673
674
|
return (
|
|
674
675
|
<View
|
|
675
|
-
style={[sheetStyles.root, { zIndex: backdropZIndex }, containerStyle]}
|
|
676
|
+
style={[sheetStyles.root, { zIndex: backdropZIndex }, containerStyle, { pointerEvents: 'box-none' }]}
|
|
676
677
|
{...(containerClassName ? ({ className: containerClassName } as Record<string, string>) : {})}
|
|
677
|
-
pointerEvents="box-none"
|
|
678
678
|
>
|
|
679
679
|
<Pressable
|
|
680
680
|
testID={testID ? `${testID}-backdrop` : DIALOG_SHEET_BACKDROP_TESTID}
|
|
@@ -704,15 +704,16 @@ function SheetSurface({
|
|
|
704
704
|
sheetStyles.panel,
|
|
705
705
|
{
|
|
706
706
|
backgroundColor: theme.colors.background,
|
|
707
|
-
shadowColor: theme.colors.shadow,
|
|
708
707
|
zIndex: surfaceZIndex,
|
|
708
|
+
pointerEvents: 'auto',
|
|
709
|
+
// Design-system overlay elevation (`shadow-m`) as a `boxShadow`.
|
|
710
|
+
...bloomShadowStyle('m'),
|
|
709
711
|
},
|
|
710
712
|
panelGeometry,
|
|
711
713
|
panelTransition,
|
|
712
714
|
panelStyle,
|
|
713
715
|
style,
|
|
714
716
|
]}
|
|
715
|
-
pointerEvents="auto"
|
|
716
717
|
>
|
|
717
718
|
{header ? (
|
|
718
719
|
// Nav-header mode on a side drawer: a static titled bar (the drawer
|
|
@@ -790,7 +791,7 @@ function cancelFrame(token: FrameToken): void {
|
|
|
790
791
|
function DialogBackdrop({ isClosing }: { isClosing: boolean }) {
|
|
791
792
|
const style: ViewStyle[] = [
|
|
792
793
|
{
|
|
793
|
-
position:
|
|
794
|
+
position: WEB_POSITION_FIXED,
|
|
794
795
|
top: 0,
|
|
795
796
|
left: 0,
|
|
796
797
|
right: 0,
|
|
@@ -843,7 +844,7 @@ const sheetStyles = {
|
|
|
843
844
|
// the per-layer `createOverlayZIndex(layer)` in `SheetSurface`, so a side
|
|
844
845
|
// dialog stacked on top of another (surface stack) paints above it.
|
|
845
846
|
root: {
|
|
846
|
-
position:
|
|
847
|
+
position: WEB_POSITION_FIXED,
|
|
847
848
|
top: 0,
|
|
848
849
|
left: 0,
|
|
849
850
|
right: 0,
|
|
@@ -860,9 +861,8 @@ const sheetStyles = {
|
|
|
860
861
|
panel: {
|
|
861
862
|
position: 'absolute',
|
|
862
863
|
overflow: 'hidden',
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
shadowOffset: { width: 0, height: 8 },
|
|
864
|
+
// Elevation is applied at the usage site via `bloomShadowStyle('m')`
|
|
865
|
+
// (`boxShadow` on web); the deprecated `shadow*` props were removed.
|
|
866
866
|
} as ViewStyle,
|
|
867
867
|
};
|
|
868
868
|
|
|
@@ -106,6 +106,62 @@ interface HeaderStore {
|
|
|
106
106
|
subscribe: (listener: () => void) => () => void;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
type PrimaryAction = NonNullable<DialogHeaderConfig['primaryAction']>;
|
|
110
|
+
type HeaderAction = NonNullable<DialogHeaderConfig['actions']>[number];
|
|
111
|
+
type HeaderSearch = NonNullable<DialogHeaderConfig['search']>;
|
|
112
|
+
type HeaderSegments = NonNullable<DialogHeaderConfig['segments']>;
|
|
113
|
+
type HeaderProgress = NonNullable<DialogHeaderConfig['progress']>;
|
|
114
|
+
|
|
115
|
+
function primaryActionEqual(a: PrimaryAction | undefined, b: PrimaryAction | undefined): boolean {
|
|
116
|
+
if (a === b) return true;
|
|
117
|
+
if (!a || !b) return false;
|
|
118
|
+
// `onPress` is a fresh closure each render — its identity never changes what the
|
|
119
|
+
// button renders, so compare only the render-affecting scalars.
|
|
120
|
+
return a.label === b.label && !!a.disabled === !!b.disabled && !!a.loading === !!b.loading;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function actionsEqual(a: HeaderAction[] | undefined, b: HeaderAction[] | undefined): boolean {
|
|
124
|
+
if (a === b) return true;
|
|
125
|
+
if (!a || !b || a.length !== b.length) return false;
|
|
126
|
+
for (let i = 0; i < a.length; i += 1) {
|
|
127
|
+
const x = a[i];
|
|
128
|
+
const y = b[i];
|
|
129
|
+
if (!x || !y) return false;
|
|
130
|
+
// `icon` is a memoized node (compared by identity); `onPress` is ignored.
|
|
131
|
+
if (
|
|
132
|
+
x.accessibilityLabel !== y.accessibilityLabel ||
|
|
133
|
+
!!x.disabled !== !!y.disabled ||
|
|
134
|
+
x.icon !== y.icon
|
|
135
|
+
) {
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function searchEqual(a: HeaderSearch | undefined, b: HeaderSearch | undefined): boolean {
|
|
143
|
+
if (a === b) return true;
|
|
144
|
+
if (!a || !b) return false;
|
|
145
|
+
return a.value === b.value && a.placeholder === b.placeholder;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function segmentsEqual(a: HeaderSegments | undefined, b: HeaderSegments | undefined): boolean {
|
|
149
|
+
if (a === b) return true;
|
|
150
|
+
if (!a || !b || a.value !== b.value || a.items.length !== b.items.length) return false;
|
|
151
|
+
for (let i = 0; i < a.items.length; i += 1) {
|
|
152
|
+
const ai = a.items[i];
|
|
153
|
+
const bi = b.items[i];
|
|
154
|
+
if (!ai || !bi || ai.key !== bi.key || ai.label !== bi.label) return false;
|
|
155
|
+
}
|
|
156
|
+
return true;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function progressEqual(a: HeaderProgress | undefined, b: HeaderProgress | undefined): boolean {
|
|
160
|
+
if (a === b) return true;
|
|
161
|
+
if (!a || !b) return false;
|
|
162
|
+
return a.step === b.step && a.total === b.total;
|
|
163
|
+
}
|
|
164
|
+
|
|
109
165
|
function configsEqual(a: DialogHeaderConfig | null, b: DialogHeaderConfig | null): boolean {
|
|
110
166
|
if (a === b) return true;
|
|
111
167
|
if (!a || !b) return false;
|
|
@@ -116,16 +172,20 @@ function configsEqual(a: DialogHeaderConfig | null, b: DialogHeaderConfig | null
|
|
|
116
172
|
a.largeTitle === b.largeTitle &&
|
|
117
173
|
a.left === b.left &&
|
|
118
174
|
a.right === b.right &&
|
|
119
|
-
|
|
175
|
+
// `onBack` legitimately gets a fresh closure each render; its identity never
|
|
176
|
+
// changes what the header renders, so compare by PRESENCE, never identity —
|
|
177
|
+
// treating a new ref as "changed" is exactly what drives the update loop.
|
|
178
|
+
!!a.onBack === !!b.onBack &&
|
|
120
179
|
a.showClose === b.showClose &&
|
|
121
|
-
// Rich fields —
|
|
122
|
-
// `
|
|
123
|
-
a
|
|
124
|
-
a.actions === b.actions &&
|
|
125
|
-
a.search === b.search &&
|
|
126
|
-
a.segments === b.segments &&
|
|
180
|
+
// Rich fields — compared by VALUE (render-affecting scalars only). A caller
|
|
181
|
+
// passing an inline `primaryAction`/`actions`/… object (a fresh reference
|
|
182
|
+
// every render) must NOT force a store update: that is React error #185.
|
|
127
183
|
a.tone === b.tone &&
|
|
128
|
-
a.
|
|
184
|
+
primaryActionEqual(a.primaryAction, b.primaryAction) &&
|
|
185
|
+
actionsEqual(a.actions, b.actions) &&
|
|
186
|
+
searchEqual(a.search, b.search) &&
|
|
187
|
+
segmentsEqual(a.segments, b.segments) &&
|
|
188
|
+
progressEqual(a.progress, b.progress)
|
|
129
189
|
);
|
|
130
190
|
}
|
|
131
191
|
|
|
@@ -474,28 +534,23 @@ export const DialogNavHeader = memo(function DialogNavHeader({
|
|
|
474
534
|
) : null);
|
|
475
535
|
|
|
476
536
|
return (
|
|
477
|
-
<View
|
|
478
|
-
pointerEvents="box-none"
|
|
479
|
-
style={[styles.overlay, style]}
|
|
480
|
-
>
|
|
537
|
+
<View style={[styles.overlay, style, { pointerEvents: 'box-none' }]}>
|
|
481
538
|
{/* Opaque (surface bg) at the top → transparent at the bottom, so scrolled
|
|
482
539
|
content fades out under the bar. `onImage` swaps to a dark scrim so the
|
|
483
540
|
chrome reads over media. Pure NativeWind — no SVG dependency. */}
|
|
484
541
|
<View
|
|
485
|
-
pointerEvents="none"
|
|
486
542
|
className={
|
|
487
543
|
onImage
|
|
488
544
|
? 'bg-gradient-to-b from-black/60 to-transparent'
|
|
489
545
|
: 'bg-gradient-to-b from-bg to-transparent'
|
|
490
546
|
}
|
|
491
|
-
style={[StyleSheet.absoluteFill, { height: DIALOG_HEADER_OVERLAY_HEIGHT }]}
|
|
547
|
+
style={[StyleSheet.absoluteFill, { height: DIALOG_HEADER_OVERLAY_HEIGHT, pointerEvents: 'none' }]}
|
|
492
548
|
/>
|
|
493
|
-
<View
|
|
549
|
+
<View style={[styles.navRow, { pointerEvents: 'box-none' }]}>
|
|
494
550
|
<View style={styles.side}>{left}</View>
|
|
495
551
|
<Animated.View
|
|
496
|
-
pointerEvents="none"
|
|
497
552
|
testID="dialog-nav-title"
|
|
498
|
-
style={[styles.centerTitle, titleStyle]}
|
|
553
|
+
style={[styles.centerTitle, titleStyle, { pointerEvents: 'none' }]}
|
|
499
554
|
>
|
|
500
555
|
{config.titleContent ?? null}
|
|
501
556
|
{!config.titleContent && config.title ? (
|
package/src/index.ts
CHANGED
|
@@ -112,7 +112,10 @@ export type { UserHoverCardProps, UserHoverCardStat } from './user-hover-card';
|
|
|
112
112
|
export * from './loading';
|
|
113
113
|
export * from './prompt-input';
|
|
114
114
|
export * from './switch';
|
|
115
|
-
|
|
115
|
+
// `ToastOutlet` is a required app-root mount, like `BloomDialogProvider` and
|
|
116
|
+
// `SurfaceHost`. The full engine surface lives at `@oxyhq/bloom/toast`.
|
|
117
|
+
export { toast, ToastOutlet } from './toast';
|
|
118
|
+
export type { ToastFn, ToastOptions, ToastType } from './toast';
|
|
116
119
|
|
|
117
120
|
// Typography
|
|
118
121
|
export * as Typography from './typography';
|
package/src/index.web.ts
CHANGED
|
@@ -117,7 +117,10 @@ export type { UserHoverCardProps, UserHoverCardStat } from './user-hover-card';
|
|
|
117
117
|
export * from './loading/index.web';
|
|
118
118
|
export * from './prompt-input';
|
|
119
119
|
export * from './switch';
|
|
120
|
-
|
|
120
|
+
// `ToastOutlet` is a required app-root mount, like `BloomDialogProvider` and
|
|
121
|
+
// `SurfaceHost`. The full engine surface lives at `@oxyhq/bloom/toast`.
|
|
122
|
+
export { toast, ToastOutlet } from './toast';
|
|
123
|
+
export type { ToastFn, ToastOptions, ToastType } from './toast';
|
|
121
124
|
|
|
122
125
|
// Typography
|
|
123
126
|
export * as Typography from './typography';
|
package/src/menu/index.web.tsx
CHANGED
|
@@ -17,6 +17,8 @@ import { Text } from '../typography';
|
|
|
17
17
|
import type { DialogControlProps } from '../dialog/types';
|
|
18
18
|
import { Portal } from '../portal/index.web';
|
|
19
19
|
import { createDropdownZIndex } from '../styles/z-index';
|
|
20
|
+
import { WEB_POSITION_FIXED } from '../styles/web-view-style';
|
|
21
|
+
import { bloomShadowStyle } from '../design-tokens/shadows';
|
|
20
22
|
import {
|
|
21
23
|
MenuContext,
|
|
22
24
|
ItemContext,
|
|
@@ -221,7 +223,7 @@ export function MenuContent({
|
|
|
221
223
|
);
|
|
222
224
|
|
|
223
225
|
setPosition({
|
|
224
|
-
position:
|
|
226
|
+
position: WEB_POSITION_FIXED,
|
|
225
227
|
top,
|
|
226
228
|
left,
|
|
227
229
|
right: undefined,
|
|
@@ -255,7 +257,7 @@ export function MenuContent({
|
|
|
255
257
|
? theme.colors.backgroundSecondary
|
|
256
258
|
: theme.colors.background,
|
|
257
259
|
borderColor: theme.colors.borderLight,
|
|
258
|
-
|
|
260
|
+
...bloomShadowStyle('m'),
|
|
259
261
|
},
|
|
260
262
|
style,
|
|
261
263
|
styles.portaledDropdown,
|
|
@@ -393,9 +395,7 @@ const styles = StyleSheet.create({
|
|
|
393
395
|
borderWidth: 1,
|
|
394
396
|
overflow: 'hidden',
|
|
395
397
|
zIndex: menuZIndex.surface,
|
|
396
|
-
|
|
397
|
-
shadowRadius: 12,
|
|
398
|
-
shadowOffset: { width: 0, height: 4 },
|
|
398
|
+
// Overlay elevation applied at the usage site via `bloomShadowStyle('m')`.
|
|
399
399
|
minWidth: 180,
|
|
400
400
|
},
|
|
401
401
|
portaledDropdown: {
|
|
@@ -12,6 +12,8 @@ import { Pressable, StyleSheet, View } from 'react-native';
|
|
|
12
12
|
import { useTheme } from '../theme/use-theme';
|
|
13
13
|
import { Portal } from '../portal/index.web';
|
|
14
14
|
import { createOverlayZIndex } from '../styles/z-index';
|
|
15
|
+
import { WEB_POSITION_FIXED } from '../styles/web-view-style';
|
|
16
|
+
import { bloomShadowStyle } from '../design-tokens/shadows';
|
|
15
17
|
import { PopoverContext, usePopoverContext } from './context';
|
|
16
18
|
import type {
|
|
17
19
|
PopoverContentProps,
|
|
@@ -288,7 +290,9 @@ export function PopoverContent({
|
|
|
288
290
|
? theme.colors.backgroundSecondary
|
|
289
291
|
: theme.colors.background,
|
|
290
292
|
borderColor: theme.colors.borderLight,
|
|
291
|
-
|
|
293
|
+
// Design-system overlay elevation (`shadow-m`) as a `boxShadow` —
|
|
294
|
+
// RN-Web deprecated the `shadow*` style props.
|
|
295
|
+
...bloomShadowStyle('m'),
|
|
292
296
|
// Hide until measured to avoid a one-frame jump.
|
|
293
297
|
opacity: panelSize ? 1 : 0,
|
|
294
298
|
},
|
|
@@ -305,7 +309,7 @@ const styles = StyleSheet.create({
|
|
|
305
309
|
alignSelf: 'flex-start',
|
|
306
310
|
},
|
|
307
311
|
backdrop: {
|
|
308
|
-
position:
|
|
312
|
+
position: WEB_POSITION_FIXED,
|
|
309
313
|
top: 0,
|
|
310
314
|
left: 0,
|
|
311
315
|
right: 0,
|
|
@@ -314,15 +318,13 @@ const styles = StyleSheet.create({
|
|
|
314
318
|
pointerEvents: 'auto',
|
|
315
319
|
},
|
|
316
320
|
panel: {
|
|
317
|
-
position:
|
|
321
|
+
position: WEB_POSITION_FIXED,
|
|
318
322
|
zIndex: popoverZIndex.surface,
|
|
319
323
|
borderRadius: 12,
|
|
320
324
|
borderWidth: 1,
|
|
321
325
|
paddingVertical: 4,
|
|
322
326
|
overflow: 'hidden',
|
|
323
|
-
|
|
324
|
-
shadowRadius: 12,
|
|
325
|
-
shadowOffset: { width: 0, height: 4 },
|
|
327
|
+
// Elevation applied at the usage site via `bloomShadowStyle('m')` (boxShadow).
|
|
326
328
|
pointerEvents: 'auto',
|
|
327
329
|
},
|
|
328
330
|
});
|
package/src/portal/index.tsx
CHANGED
|
@@ -12,6 +12,7 @@ import React, {
|
|
|
12
12
|
} from 'react';
|
|
13
13
|
import { View, StyleSheet, Platform } from 'react-native';
|
|
14
14
|
import { Z_INDEX } from '../styles/z-index';
|
|
15
|
+
import { WEB_POSITION_FIXED } from '../styles/web-view-style';
|
|
15
16
|
|
|
16
17
|
type Component = React.ReactElement;
|
|
17
18
|
|
|
@@ -114,8 +115,10 @@ export const Outlet = memo(DefaultPortal.Outlet);
|
|
|
114
115
|
export const Portal = DefaultPortal.Portal;
|
|
115
116
|
|
|
116
117
|
const styles = StyleSheet.create({
|
|
118
|
+
// Applied only from the `Platform.OS === 'web'` branch of `Outlet`, which is
|
|
119
|
+
// why the web-only `position` value is honest in this universal file.
|
|
117
120
|
portalOutlet: {
|
|
118
|
-
position:
|
|
121
|
+
position: WEB_POSITION_FIXED,
|
|
119
122
|
top: 0,
|
|
120
123
|
left: 0,
|
|
121
124
|
right: 0,
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ported from expo-glass-tabs v0.1.1 — src/progressive-blur.tsx
|
|
3
|
+
* (MIT © 2026 David Mokos). See the top-level NOTICE.
|
|
4
|
+
*/
|
|
5
|
+
import { BlurView } from 'expo-blur';
|
|
6
|
+
import { StyleSheet, View } from 'react-native';
|
|
7
|
+
|
|
8
|
+
import { useTheme } from '../theme/use-theme';
|
|
9
|
+
import { buildTailGradient, LAYER_HEIGHTS } from './shared';
|
|
10
|
+
import type { ProgressiveBlurProps } from './types';
|
|
11
|
+
|
|
12
|
+
export type { ProgressiveBlurProps } from './types';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Progressive (gradient) blur: strongest at the anchored edge, fading to none.
|
|
16
|
+
* Drop it behind a floating tab bar or a transparent header so content
|
|
17
|
+
* dissolves rather than meeting a hard blur line.
|
|
18
|
+
*
|
|
19
|
+
* NATIVE implementation. iOS has no public variable-blur API, so this stacks
|
|
20
|
+
* ten thin `BlurView`s with a tiny per-layer intensity — each layer's edge adds
|
|
21
|
+
* only an imperceptible step, so the falloff reads as continuous (see
|
|
22
|
+
* `LAYER_HEIGHTS`). A soft gradient in the theme's page color smooths the tail
|
|
23
|
+
* and keeps overlaid content legible.
|
|
24
|
+
*
|
|
25
|
+
* The web fork replaces the whole stack with one masked `backdrop-filter`:
|
|
26
|
+
* `experimental_backgroundImage` is dropped silently by react-native-web, and
|
|
27
|
+
* ten stacked backdrop passes would be far more expensive than the one the
|
|
28
|
+
* browser can do natively.
|
|
29
|
+
*/
|
|
30
|
+
export function ProgressiveBlur({
|
|
31
|
+
style,
|
|
32
|
+
intensity = 5,
|
|
33
|
+
direction = 'top',
|
|
34
|
+
...rest
|
|
35
|
+
}: ProgressiveBlurProps) {
|
|
36
|
+
const { colors, isDark } = useTheme();
|
|
37
|
+
const anchor = direction === 'top' ? styles.anchorTop : styles.anchorBottom;
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<View {...rest} style={[styles.root, style]}>
|
|
41
|
+
{LAYER_HEIGHTS.map((height) => (
|
|
42
|
+
<BlurView
|
|
43
|
+
key={height}
|
|
44
|
+
tint={isDark ? 'dark' : 'light'}
|
|
45
|
+
intensity={intensity}
|
|
46
|
+
style={[styles.layer, anchor, { height }]}
|
|
47
|
+
/>
|
|
48
|
+
))}
|
|
49
|
+
<View
|
|
50
|
+
style={[
|
|
51
|
+
StyleSheet.absoluteFill,
|
|
52
|
+
{ experimental_backgroundImage: buildTailGradient(colors.background, direction) },
|
|
53
|
+
]}
|
|
54
|
+
/>
|
|
55
|
+
</View>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
ProgressiveBlur.displayName = 'ProgressiveBlur';
|
|
60
|
+
|
|
61
|
+
const styles = StyleSheet.create({
|
|
62
|
+
root: {
|
|
63
|
+
// In the style object, not as a prop: RN-Web deprecated the `pointerEvents`
|
|
64
|
+
// prop and warns on every render when it is used.
|
|
65
|
+
pointerEvents: 'none',
|
|
66
|
+
},
|
|
67
|
+
layer: {
|
|
68
|
+
position: 'absolute',
|
|
69
|
+
left: 0,
|
|
70
|
+
right: 0,
|
|
71
|
+
},
|
|
72
|
+
anchorTop: {
|
|
73
|
+
top: 0,
|
|
74
|
+
},
|
|
75
|
+
anchorBottom: {
|
|
76
|
+
bottom: 0,
|
|
77
|
+
},
|
|
78
|
+
});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ported from expo-glass-tabs v0.1.1 — src/progressive-blur.tsx
|
|
3
|
+
* (MIT © 2026 David Mokos). See the top-level NOTICE.
|
|
4
|
+
*/
|
|
5
|
+
import { View, type ViewStyle } from 'react-native';
|
|
6
|
+
|
|
7
|
+
import { useTheme } from '../theme/use-theme';
|
|
8
|
+
import {
|
|
9
|
+
buildMaskGradient,
|
|
10
|
+
buildTailGradient,
|
|
11
|
+
WEB_BLUR_PER_INTENSITY,
|
|
12
|
+
} from './shared';
|
|
13
|
+
import type { ProgressiveBlurProps } from './types';
|
|
14
|
+
|
|
15
|
+
export type { ProgressiveBlurProps } from './types';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* WEB fork of {@link ProgressiveBlur} — ONE element instead of the native
|
|
19
|
+
* ten-layer stack.
|
|
20
|
+
*
|
|
21
|
+
* Two upstream techniques do not survive a browser, which is the whole reason
|
|
22
|
+
* this fork exists:
|
|
23
|
+
*
|
|
24
|
+
* - `experimental_backgroundImage` is dropped silently by react-native-web
|
|
25
|
+
* (no warning, no gradient), so the tail is painted with real CSS
|
|
26
|
+
* `background-image` instead;
|
|
27
|
+
* - stacking ten `BlurView`s would mean ten composited backdrop passes over
|
|
28
|
+
* the same pixels every frame. A browser can fade a single
|
|
29
|
+
* `backdrop-filter` with `mask-image`, which is both correct and an order
|
|
30
|
+
* of magnitude cheaper.
|
|
31
|
+
*
|
|
32
|
+
* The declarations ride in the STYLE object rather than an injected CSS class:
|
|
33
|
+
* react-native-web does not forward `className` to the DOM (it is absent from
|
|
34
|
+
* its `forwardedProps` list, and `createDOMProps` overwrites the attribute with
|
|
35
|
+
* the atomic class it generates), while unknown style properties ARE passed
|
|
36
|
+
* through its style compiler — the same route `Dialog.web.tsx` uses for its
|
|
37
|
+
* `animation` shorthand. Nothing here needs `@keyframes` or a pseudo-class, so
|
|
38
|
+
* there is no stylesheet to inject and nothing a consumer could forget to wire.
|
|
39
|
+
*/
|
|
40
|
+
export function ProgressiveBlur({
|
|
41
|
+
style,
|
|
42
|
+
intensity = 5,
|
|
43
|
+
direction = 'top',
|
|
44
|
+
...rest
|
|
45
|
+
}: ProgressiveBlurProps) {
|
|
46
|
+
const { colors } = useTheme();
|
|
47
|
+
|
|
48
|
+
const filter = `blur(${intensity * WEB_BLUR_PER_INTENSITY}px)`;
|
|
49
|
+
const mask = buildMaskGradient(direction);
|
|
50
|
+
// Web-only CSS, unknown to React Native's `ViewStyle`. Both spellings are set
|
|
51
|
+
// for `backdrop-filter` and `mask-image`: Safari still needs the prefixed
|
|
52
|
+
// form of each.
|
|
53
|
+
const webStyle = {
|
|
54
|
+
pointerEvents: 'none',
|
|
55
|
+
backdropFilter: filter,
|
|
56
|
+
WebkitBackdropFilter: filter,
|
|
57
|
+
maskImage: mask,
|
|
58
|
+
WebkitMaskImage: mask,
|
|
59
|
+
backgroundImage: buildTailGradient(colors.background, direction),
|
|
60
|
+
} as ViewStyle;
|
|
61
|
+
|
|
62
|
+
return <View {...rest} style={[webStyle, style]} />;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
ProgressiveBlur.displayName = 'ProgressiveBlur';
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ported from expo-glass-tabs v0.1.1 — src/progressive-blur.tsx
|
|
3
|
+
* (MIT © 2026 David Mokos). See the top-level NOTICE.
|
|
4
|
+
*
|
|
5
|
+
* The falloff math both forks share, so the native stack and the web mask
|
|
6
|
+
* describe the SAME curve and a bar looks the same on a phone and in a browser.
|
|
7
|
+
*/
|
|
8
|
+
import { withAlpha } from '../theme/color-utils';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Per-layer heights of the native blur stack, as a fraction of the box.
|
|
12
|
+
*
|
|
13
|
+
* iOS has no public variable-blur API, so the native fork stacks many thin
|
|
14
|
+
* `BlurView`s with a tiny per-layer intensity: each layer's edge adds only an
|
|
15
|
+
* imperceptible step, so the falloff reads as continuous. Coverage at a given
|
|
16
|
+
* depth is the number of layers still tall enough to reach it — 10 at the
|
|
17
|
+
* anchored edge, ~5 at the midpoint, 1 at the far edge.
|
|
18
|
+
*/
|
|
19
|
+
export const LAYER_HEIGHTS = [
|
|
20
|
+
'100%',
|
|
21
|
+
'88%',
|
|
22
|
+
'76%',
|
|
23
|
+
'64%',
|
|
24
|
+
'54%',
|
|
25
|
+
'44%',
|
|
26
|
+
'36%',
|
|
27
|
+
'28%',
|
|
28
|
+
'22%',
|
|
29
|
+
'16%',
|
|
30
|
+
] as const;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* px of CSS blur per unit of `intensity` on web.
|
|
34
|
+
*
|
|
35
|
+
* The web fork replaces the whole stack with ONE `backdrop-filter`, so the
|
|
36
|
+
* radius has to stand in for the accumulated effect of ten layers rather than
|
|
37
|
+
* one: the default `intensity` of 5 lands on a 20px radius, which reads like
|
|
38
|
+
* the native stack at the anchored edge. Stacking ten real blurs in a browser
|
|
39
|
+
* would cost ten composited backdrop passes for the same picture.
|
|
40
|
+
*/
|
|
41
|
+
export const WEB_BLUR_PER_INTENSITY = 4;
|
|
42
|
+
|
|
43
|
+
/** CSS gradient direction keyword for a blur anchored at `direction`. */
|
|
44
|
+
function towards(direction: 'top' | 'bottom'): 'top' | 'bottom' {
|
|
45
|
+
return direction === 'top' ? 'bottom' : 'top';
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The soft tint layered over the blur. It smooths the tail and keeps overlaid
|
|
50
|
+
* content legible; upstream hardcoded black, which only worked on a dark theme,
|
|
51
|
+
* so it is derived from the theme's page background here instead.
|
|
52
|
+
*/
|
|
53
|
+
export function buildTailGradient(background: string, direction: 'top' | 'bottom'): string {
|
|
54
|
+
const to = towards(direction);
|
|
55
|
+
return (
|
|
56
|
+
`linear-gradient(to ${to}, ` +
|
|
57
|
+
`${withAlpha(background, 0.7)} 0%, ` +
|
|
58
|
+
`${withAlpha(background, 0.32)} 42%, ` +
|
|
59
|
+
`${withAlpha(background, 0.08)} 68%, ` +
|
|
60
|
+
`${withAlpha(background, 0)} 88%)`
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Alpha ramp the web fork masks its single blur with — the only way to fade a
|
|
66
|
+
* `backdrop-filter`. The stops trace the native stack's layer coverage (full at
|
|
67
|
+
* the anchored edge, ~half at the midpoint) and then close all the way to zero,
|
|
68
|
+
* which the stack cannot do: its tallest layer spans the whole box, leaving a
|
|
69
|
+
* faint blur step at the far edge.
|
|
70
|
+
*/
|
|
71
|
+
export function buildMaskGradient(direction: 'top' | 'bottom'): string {
|
|
72
|
+
const to = towards(direction);
|
|
73
|
+
return (
|
|
74
|
+
`linear-gradient(to ${to}, ` +
|
|
75
|
+
`rgba(0, 0, 0, 1) 0%, ` +
|
|
76
|
+
`rgba(0, 0, 0, 0.9) 20%, ` +
|
|
77
|
+
`rgba(0, 0, 0, 0.5) 50%, ` +
|
|
78
|
+
`rgba(0, 0, 0, 0.2) 80%, ` +
|
|
79
|
+
`rgba(0, 0, 0, 0) 100%)`
|
|
80
|
+
);
|
|
81
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ported from expo-glass-tabs v0.1.1 — src/progressive-blur.tsx
|
|
3
|
+
* (MIT © 2026 David Mokos). See the top-level NOTICE.
|
|
4
|
+
*
|
|
5
|
+
* Shared prop contract for both forks. It lives in its own module so the web
|
|
6
|
+
* fork can declare it without importing the native entry (`./index` resolves to
|
|
7
|
+
* `index.web.tsx` itself on a web-platform Metro build), and so `TabBarBase`
|
|
8
|
+
* can type its injected `Blur` component without importing either fork.
|
|
9
|
+
*/
|
|
10
|
+
import type { ViewProps } from 'react-native';
|
|
11
|
+
|
|
12
|
+
export type ProgressiveBlurProps = ViewProps & {
|
|
13
|
+
/**
|
|
14
|
+
* Blur strength at the anchored edge. Follows `expo-blur`'s 0–100 scale and
|
|
15
|
+
* is applied PER LAYER on native (see the native fork); the web fork maps it
|
|
16
|
+
* onto the single CSS blur radius that approximates the same stack.
|
|
17
|
+
*/
|
|
18
|
+
intensity?: number;
|
|
19
|
+
/** Which edge the blur is anchored to (strongest there, fading away). */
|
|
20
|
+
direction?: 'top' | 'bottom';
|
|
21
|
+
};
|