@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,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Ported from expo-glass-tabs v0.1.1 — src/progressive-blur.tsx
|
|
5
|
+
* (MIT © 2026 David Mokos). See the top-level NOTICE.
|
|
6
|
+
*/
|
|
7
|
+
import { View } from 'react-native';
|
|
8
|
+
import { useTheme } from "../theme/use-theme.js";
|
|
9
|
+
import { buildMaskGradient, buildTailGradient, WEB_BLUR_PER_INTENSITY } from "./shared.js";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
/**
|
|
12
|
+
* WEB fork of {@link ProgressiveBlur} — ONE element instead of the native
|
|
13
|
+
* ten-layer stack.
|
|
14
|
+
*
|
|
15
|
+
* Two upstream techniques do not survive a browser, which is the whole reason
|
|
16
|
+
* this fork exists:
|
|
17
|
+
*
|
|
18
|
+
* - `experimental_backgroundImage` is dropped silently by react-native-web
|
|
19
|
+
* (no warning, no gradient), so the tail is painted with real CSS
|
|
20
|
+
* `background-image` instead;
|
|
21
|
+
* - stacking ten `BlurView`s would mean ten composited backdrop passes over
|
|
22
|
+
* the same pixels every frame. A browser can fade a single
|
|
23
|
+
* `backdrop-filter` with `mask-image`, which is both correct and an order
|
|
24
|
+
* of magnitude cheaper.
|
|
25
|
+
*
|
|
26
|
+
* The declarations ride in the STYLE object rather than an injected CSS class:
|
|
27
|
+
* react-native-web does not forward `className` to the DOM (it is absent from
|
|
28
|
+
* its `forwardedProps` list, and `createDOMProps` overwrites the attribute with
|
|
29
|
+
* the atomic class it generates), while unknown style properties ARE passed
|
|
30
|
+
* through its style compiler — the same route `Dialog.web.tsx` uses for its
|
|
31
|
+
* `animation` shorthand. Nothing here needs `@keyframes` or a pseudo-class, so
|
|
32
|
+
* there is no stylesheet to inject and nothing a consumer could forget to wire.
|
|
33
|
+
*/
|
|
34
|
+
export function ProgressiveBlur({
|
|
35
|
+
style,
|
|
36
|
+
intensity = 5,
|
|
37
|
+
direction = 'top',
|
|
38
|
+
...rest
|
|
39
|
+
}) {
|
|
40
|
+
const {
|
|
41
|
+
colors
|
|
42
|
+
} = useTheme();
|
|
43
|
+
const filter = `blur(${intensity * WEB_BLUR_PER_INTENSITY}px)`;
|
|
44
|
+
const mask = buildMaskGradient(direction);
|
|
45
|
+
// Web-only CSS, unknown to React Native's `ViewStyle`. Both spellings are set
|
|
46
|
+
// for `backdrop-filter` and `mask-image`: Safari still needs the prefixed
|
|
47
|
+
// form of each.
|
|
48
|
+
const webStyle = {
|
|
49
|
+
pointerEvents: 'none',
|
|
50
|
+
backdropFilter: filter,
|
|
51
|
+
WebkitBackdropFilter: filter,
|
|
52
|
+
maskImage: mask,
|
|
53
|
+
WebkitMaskImage: mask,
|
|
54
|
+
backgroundImage: buildTailGradient(colors.background, direction)
|
|
55
|
+
};
|
|
56
|
+
return /*#__PURE__*/_jsx(View, {
|
|
57
|
+
...rest,
|
|
58
|
+
style: [webStyle, style]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
ProgressiveBlur.displayName = 'ProgressiveBlur';
|
|
62
|
+
//# sourceMappingURL=index.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["View","useTheme","buildMaskGradient","buildTailGradient","WEB_BLUR_PER_INTENSITY","jsx","_jsx","ProgressiveBlur","style","intensity","direction","rest","colors","filter","mask","webStyle","pointerEvents","backdropFilter","WebkitBackdropFilter","maskImage","WebkitMaskImage","backgroundImage","background","displayName"],"sourceRoot":"../../../src","sources":["progressive-blur/index.web.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,SAASA,IAAI,QAAwB,cAAc;AAEnD,SAASC,QAAQ,QAAQ,uBAAoB;AAC7C,SACEC,iBAAiB,EACjBC,iBAAiB,EACjBC,sBAAsB,QACjB,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAKlB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAAC;EAC9BC,KAAK;EACLC,SAAS,GAAG,CAAC;EACbC,SAAS,GAAG,KAAK;EACjB,GAAGC;AACiB,CAAC,EAAE;EACvB,MAAM;IAAEC;EAAO,CAAC,GAAGX,QAAQ,CAAC,CAAC;EAE7B,MAAMY,MAAM,GAAG,QAAQJ,SAAS,GAAGL,sBAAsB,KAAK;EAC9D,MAAMU,IAAI,GAAGZ,iBAAiB,CAACQ,SAAS,CAAC;EACzC;EACA;EACA;EACA,MAAMK,QAAQ,GAAG;IACfC,aAAa,EAAE,MAAM;IACrBC,cAAc,EAAEJ,MAAM;IACtBK,oBAAoB,EAAEL,MAAM;IAC5BM,SAAS,EAAEL,IAAI;IACfM,eAAe,EAAEN,IAAI;IACrBO,eAAe,EAAElB,iBAAiB,CAACS,MAAM,CAACU,UAAU,EAAEZ,SAAS;EACjE,CAAc;EAEd,oBAAOJ,IAAA,CAACN,IAAI;IAAA,GAAKW,IAAI;IAAEH,KAAK,EAAE,CAACO,QAAQ,EAAEP,KAAK;EAAE,CAAE,CAAC;AACrD;AAEAD,eAAe,CAACgB,WAAW,GAAG,iBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Ported from expo-glass-tabs v0.1.1 — src/progressive-blur.tsx
|
|
5
|
+
* (MIT © 2026 David Mokos). See the top-level NOTICE.
|
|
6
|
+
*
|
|
7
|
+
* The falloff math both forks share, so the native stack and the web mask
|
|
8
|
+
* describe the SAME curve and a bar looks the same on a phone and in a browser.
|
|
9
|
+
*/
|
|
10
|
+
import { withAlpha } from "../theme/color-utils.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Per-layer heights of the native blur stack, as a fraction of the box.
|
|
14
|
+
*
|
|
15
|
+
* iOS has no public variable-blur API, so the native fork stacks many thin
|
|
16
|
+
* `BlurView`s with a tiny per-layer intensity: each layer's edge adds only an
|
|
17
|
+
* imperceptible step, so the falloff reads as continuous. Coverage at a given
|
|
18
|
+
* depth is the number of layers still tall enough to reach it — 10 at the
|
|
19
|
+
* anchored edge, ~5 at the midpoint, 1 at the far edge.
|
|
20
|
+
*/
|
|
21
|
+
export const LAYER_HEIGHTS = ['100%', '88%', '76%', '64%', '54%', '44%', '36%', '28%', '22%', '16%'];
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* px of CSS blur per unit of `intensity` on web.
|
|
25
|
+
*
|
|
26
|
+
* The web fork replaces the whole stack with ONE `backdrop-filter`, so the
|
|
27
|
+
* radius has to stand in for the accumulated effect of ten layers rather than
|
|
28
|
+
* one: the default `intensity` of 5 lands on a 20px radius, which reads like
|
|
29
|
+
* the native stack at the anchored edge. Stacking ten real blurs in a browser
|
|
30
|
+
* would cost ten composited backdrop passes for the same picture.
|
|
31
|
+
*/
|
|
32
|
+
export const WEB_BLUR_PER_INTENSITY = 4;
|
|
33
|
+
|
|
34
|
+
/** CSS gradient direction keyword for a blur anchored at `direction`. */
|
|
35
|
+
function towards(direction) {
|
|
36
|
+
return direction === 'top' ? 'bottom' : 'top';
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The soft tint layered over the blur. It smooths the tail and keeps overlaid
|
|
41
|
+
* content legible; upstream hardcoded black, which only worked on a dark theme,
|
|
42
|
+
* so it is derived from the theme's page background here instead.
|
|
43
|
+
*/
|
|
44
|
+
export function buildTailGradient(background, direction) {
|
|
45
|
+
const to = towards(direction);
|
|
46
|
+
return `linear-gradient(to ${to}, ` + `${withAlpha(background, 0.7)} 0%, ` + `${withAlpha(background, 0.32)} 42%, ` + `${withAlpha(background, 0.08)} 68%, ` + `${withAlpha(background, 0)} 88%)`;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Alpha ramp the web fork masks its single blur with — the only way to fade a
|
|
51
|
+
* `backdrop-filter`. The stops trace the native stack's layer coverage (full at
|
|
52
|
+
* the anchored edge, ~half at the midpoint) and then close all the way to zero,
|
|
53
|
+
* which the stack cannot do: its tallest layer spans the whole box, leaving a
|
|
54
|
+
* faint blur step at the far edge.
|
|
55
|
+
*/
|
|
56
|
+
export function buildMaskGradient(direction) {
|
|
57
|
+
const to = towards(direction);
|
|
58
|
+
return `linear-gradient(to ${to}, ` + `rgba(0, 0, 0, 1) 0%, ` + `rgba(0, 0, 0, 0.9) 20%, ` + `rgba(0, 0, 0, 0.5) 50%, ` + `rgba(0, 0, 0, 0.2) 80%, ` + `rgba(0, 0, 0, 0) 100%)`;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["withAlpha","LAYER_HEIGHTS","WEB_BLUR_PER_INTENSITY","towards","direction","buildTailGradient","background","to","buildMaskGradient"],"sourceRoot":"../../../src","sources":["progressive-blur/shared.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,yBAAsB;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAG,CAC3B,MAAM,EACN,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,CACG;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAG,CAAC;;AAEvC;AACA,SAASC,OAAOA,CAACC,SAA2B,EAAoB;EAC9D,OAAOA,SAAS,KAAK,KAAK,GAAG,QAAQ,GAAG,KAAK;AAC/C;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAACC,UAAkB,EAAEF,SAA2B,EAAU;EACzF,MAAMG,EAAE,GAAGJ,OAAO,CAACC,SAAS,CAAC;EAC7B,OACE,sBAAsBG,EAAE,IAAI,GAC5B,GAAGP,SAAS,CAACM,UAAU,EAAE,GAAG,CAAC,OAAO,GACpC,GAAGN,SAAS,CAACM,UAAU,EAAE,IAAI,CAAC,QAAQ,GACtC,GAAGN,SAAS,CAACM,UAAU,EAAE,IAAI,CAAC,QAAQ,GACtC,GAAGN,SAAS,CAACM,UAAU,EAAE,CAAC,CAAC,OAAO;AAEtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,iBAAiBA,CAACJ,SAA2B,EAAU;EACrE,MAAMG,EAAE,GAAGJ,OAAO,CAACC,SAAS,CAAC;EAC7B,OACE,sBAAsBG,EAAE,IAAI,GAC5B,uBAAuB,GACvB,0BAA0B,GAC1B,0BAA0B,GAC1B,0BAA0B,GAC1B,wBAAwB;AAE5B","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["progressive-blur/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -6,6 +6,7 @@ import { useTheme } from "../theme/use-theme.js";
|
|
|
6
6
|
import { Text } from "../typography/index.js";
|
|
7
7
|
import { Portal } from "../portal/index.web.js";
|
|
8
8
|
import { createOverlayZIndex } from "../styles/z-index.js";
|
|
9
|
+
import { WEB_POSITION_FIXED } from "../styles/web-view-style.js";
|
|
9
10
|
import { bloomShadowStyle } from '../design-tokens/shadows';
|
|
10
11
|
import { useInteractionState } from "../hooks/useInteractionState.js";
|
|
11
12
|
import { ChevronBottom_Stroke2_Corner0_Rounded as ChevronDownIcon } from "../icons/Chevron.js";
|
|
@@ -310,7 +311,7 @@ const styles = StyleSheet.create({
|
|
|
310
311
|
fontSize: 16
|
|
311
312
|
},
|
|
312
313
|
backdrop: {
|
|
313
|
-
position:
|
|
314
|
+
position: WEB_POSITION_FIXED,
|
|
314
315
|
top: 0,
|
|
315
316
|
left: 0,
|
|
316
317
|
right: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","createContext","useContext","useId","useMemo","useState","Pressable","StyleSheet","View","useTheme","Text","Portal","createOverlayZIndex","bloomShadowStyle","useInteractionState","ChevronBottom_Stroke2_Corner0_Rounded","ChevronDownIcon","Check_Stroke2_Corner0_Rounded","CheckIcon","defaultItemValueExtractor","ItemContext","useSelectItemContext","jsx","_jsx","jsxs","_jsxs","selectZIndex","SelectContext","displayName","useSelectContext","ctx","Error","Select","children","value","onValueChange","disabled","isOpen","setIsOpen","open","close","Provider","SelectTrigger","label","theme","triggerId","state","hovered","onIn","onMouseEnter","onOut","onMouseLeave","focused","onFocus","onBlur","control","id","ref","current","pressed","props","onPress","accessibilityLabel","accessibilityRole","style","styles","trigger","backgroundColor","colors","contrast50","borderColor","primary","SelectValue","extractLabel","placeholder","display","numberOfLines","valueText","color","text","textSecondary","SelectIcon","size","fill","SelectContent","items","renderItem","valueExtractor","backdrop","dropdown","isDark","backgroundSecondary","background","borderLight","map","item","index","Fragment","SelectItem","isSelected","itemCtx","selected","accessibilityState","checked","primaryLight","SelectItemText","itemText","SelectItemIndicator","icon","IconComponent","itemIndicatorPlaceholder","itemIndicatorContainer","SelectSeparator","separator","create","flexDirection","position","alignItems","gap","justifyContent","paddingVertical","paddingHorizontal","borderRadius","maxWidth","borderWidth","borderStyle","fontSize","top","left","right","bottom","zIndex","pointerEvents","surface","overflow","padding","minWidth","minHeight","paddingLeft","paddingRight","width","height","marginVertical"],"sourceRoot":"../../../src","sources":["select/index.web.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,UAAU,EAAEC,KAAK,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAClF,SAASC,SAAS,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE1D,SAASC,QAAQ,QAAQ,uBAAoB;AAC7C,SAASC,IAAI,QAAQ,wBAAe;AACpC,SAASC,MAAM,QAAQ,wBAAqB;AAC5C,SAASC,mBAAmB,QAAQ,sBAAmB;AACvD,SAASC,gBAAgB,QAAQ,0BAA0B;AAE3D,SAASC,mBAAmB,QAAQ,iCAA8B;AAClE,SACEC,qCAAqC,IAAIC,eAAe,QACnD,qBAAkB;AACzB,SAASC,6BAA6B,IAAIC,SAAS,QAAQ,mBAAgB;AAC3E,SAASC,yBAAyB,EAAEC,WAAW,EAAEC,oBAAoB,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAaxF,SAASJ,oBAAoB;AAE7B,MAAMK,YAAY,
|
|
1
|
+
{"version":3,"names":["React","createContext","useContext","useId","useMemo","useState","Pressable","StyleSheet","View","useTheme","Text","Portal","createOverlayZIndex","WEB_POSITION_FIXED","bloomShadowStyle","useInteractionState","ChevronBottom_Stroke2_Corner0_Rounded","ChevronDownIcon","Check_Stroke2_Corner0_Rounded","CheckIcon","defaultItemValueExtractor","ItemContext","useSelectItemContext","jsx","_jsx","jsxs","_jsxs","selectZIndex","SelectContext","displayName","useSelectContext","ctx","Error","Select","children","value","onValueChange","disabled","isOpen","setIsOpen","open","close","Provider","SelectTrigger","label","theme","triggerId","state","hovered","onIn","onMouseEnter","onOut","onMouseLeave","focused","onFocus","onBlur","control","id","ref","current","pressed","props","onPress","accessibilityLabel","accessibilityRole","style","styles","trigger","backgroundColor","colors","contrast50","borderColor","primary","SelectValue","extractLabel","placeholder","display","numberOfLines","valueText","color","text","textSecondary","SelectIcon","size","fill","SelectContent","items","renderItem","valueExtractor","backdrop","dropdown","isDark","backgroundSecondary","background","borderLight","map","item","index","Fragment","SelectItem","isSelected","itemCtx","selected","accessibilityState","checked","primaryLight","SelectItemText","itemText","SelectItemIndicator","icon","IconComponent","itemIndicatorPlaceholder","itemIndicatorContainer","SelectSeparator","separator","create","flexDirection","position","alignItems","gap","justifyContent","paddingVertical","paddingHorizontal","borderRadius","maxWidth","borderWidth","borderStyle","fontSize","top","left","right","bottom","zIndex","pointerEvents","surface","overflow","padding","minWidth","minHeight","paddingLeft","paddingRight","width","height","marginVertical"],"sourceRoot":"../../../src","sources":["select/index.web.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,UAAU,EAAEC,KAAK,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAClF,SAASC,SAAS,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE1D,SAASC,QAAQ,QAAQ,uBAAoB;AAC7C,SAASC,IAAI,QAAQ,wBAAe;AACpC,SAASC,MAAM,QAAQ,wBAAqB;AAC5C,SAASC,mBAAmB,QAAQ,sBAAmB;AACvD,SAASC,kBAAkB,QAAQ,6BAA0B;AAC7D,SAASC,gBAAgB,QAAQ,0BAA0B;AAE3D,SAASC,mBAAmB,QAAQ,iCAA8B;AAClE,SACEC,qCAAqC,IAAIC,eAAe,QACnD,qBAAkB;AACzB,SAASC,6BAA6B,IAAIC,SAAS,QAAQ,mBAAgB;AAC3E,SAASC,yBAAyB,EAAEC,WAAW,EAAEC,oBAAoB,QAAQ,aAAU;AAAC,SAAAC,GAAA,IA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
4
|
+
* `position: fixed`, typed for React Native's `ViewStyle`.
|
|
5
|
+
*
|
|
6
|
+
* RN types `position` as `'absolute' | 'relative' | 'static'` — what Yoga
|
|
7
|
+
* implements — while react-native-web renders real CSS, where `'fixed'` is the
|
|
8
|
+
* only way for a portaled overlay to anchor to the VIEWPORT instead of the
|
|
9
|
+
* nearest positioned ancestor. This is the ONE place Bloom crosses between the
|
|
10
|
+
* two, so web forks import it instead of writing their own cast.
|
|
11
|
+
*
|
|
12
|
+
* Deliberately not a `declare module 'react-native'` augmentation, for two
|
|
13
|
+
* reasons. It does not work: `position` lives on `interface FlexStyle`, which RN
|
|
14
|
+
* re-exports from a submodule, so augmenting `'react-native'` neither merges nor
|
|
15
|
+
* errors — verified with tsc, the identical `TS2322` appears with and without it,
|
|
16
|
+
* which makes it strictly worse than a cast because it looks like a fix. And even
|
|
17
|
+
* if it worked, widening `ViewStyle` would ship through `/// <reference path>` to
|
|
18
|
+
* every consumer, so `position: 'fixed'` would start compiling in NATIVE code
|
|
19
|
+
* where Yoga silently ignores it.
|
|
20
|
+
*/
|
|
21
|
+
export const WEB_POSITION_FIXED = 'fixed';
|
|
22
|
+
//# sourceMappingURL=web-view-style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["WEB_POSITION_FIXED"],"sourceRoot":"../../../src","sources":["styles/web-view-style.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,kBAAkB,GAAG,OAAgC","ignoreList":[]}
|
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Ported from expo-glass-tabs v0.1.1 — src/glass-tab-bar.tsx
|
|
5
|
+
* (MIT © 2026 David Mokos). See the top-level NOTICE.
|
|
6
|
+
*
|
|
7
|
+
* The platform-agnostic body of the floating tab bar: gestures, springs, every
|
|
8
|
+
* animated style, the highlight geometry and the button. The only pieces that
|
|
9
|
+
* differ per platform are injected as component props — the capsule `Surface`
|
|
10
|
+
* (liquid glass on iOS 26, backdrop-filter on web, a solid fill everywhere
|
|
11
|
+
* else), the `Blur` behind the bar, and the `Glyph` (SF Symbol on iOS, the
|
|
12
|
+
* item's own icon node elsewhere). Same shape as `BottomSheetBase`'s `Shell`.
|
|
13
|
+
*
|
|
14
|
+
* Nothing here imports expo-glass-effect, expo-symbols, expo-router or
|
|
15
|
+
* react-native-screens, so this file is safe in a web bundle and in a
|
|
16
|
+
* consumer's type-check.
|
|
17
|
+
*/
|
|
18
|
+
import { Children, createContext, useCallback, useContext, useEffect, useMemo } from 'react';
|
|
19
|
+
import { Pressable, StyleSheet, useWindowDimensions, View } from 'react-native';
|
|
20
|
+
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
21
|
+
import Animated, { Extrapolation, interpolate, interpolateColor, runOnJS, useAnimatedStyle, useSharedValue, withSpring } from 'react-native-reanimated';
|
|
22
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
23
|
+
import { useHaptics } from "../hooks/useHaptics.js";
|
|
24
|
+
import { setMinimized, useMinimizeState } from "./minimize-context.js";
|
|
25
|
+
import { BAR_MARGIN, BLUR_BLEED, EXPANDED_HEIGHT, HIGHLIGHT_EXPANDED, HIGHLIGHT_MINIMIZED, ICON_SIZE, ITEM_GAP, ITEM_PAD_V, LABEL_FONT_SIZE, MINIMIZED_HEIGHT, MINIMIZED_INSET, ROW_PAD_H, SLIDE_SPRING, useTabBarTheme } from "./shared.js";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* What a `TabBarButton` needs from the bar it sits in. `null` when a button is
|
|
29
|
+
* rendered standalone, which keeps a lone button usable (it just falls back to
|
|
30
|
+
* its own `isFocused` for tinting and has no highlight to drive).
|
|
31
|
+
*/
|
|
32
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
33
|
+
const BarContext = /*#__PURE__*/createContext(null);
|
|
34
|
+
/**
|
|
35
|
+
* Floating tab bar with Revolut-style minimize-on-scroll, a sliding highlight
|
|
36
|
+
* and finger scrubbing.
|
|
37
|
+
*/
|
|
38
|
+
function TabBarBody({
|
|
39
|
+
Surface,
|
|
40
|
+
Blur,
|
|
41
|
+
children,
|
|
42
|
+
activeIndex,
|
|
43
|
+
onIndexChange,
|
|
44
|
+
theme: themeOverrides,
|
|
45
|
+
haptics = true,
|
|
46
|
+
style,
|
|
47
|
+
...viewProps
|
|
48
|
+
}) {
|
|
49
|
+
const insets = useSafeAreaInsets();
|
|
50
|
+
const {
|
|
51
|
+
width: windowWidth
|
|
52
|
+
} = useWindowDimensions();
|
|
53
|
+
const minimized = useMinimizeState();
|
|
54
|
+
const progress = minimized.progress;
|
|
55
|
+
const slideIndex = useSharedValue(0);
|
|
56
|
+
const isDragging = useSharedValue(false);
|
|
57
|
+
const lastTicked = useSharedValue(-1);
|
|
58
|
+
const tabCount = Math.max(Children.count(children), 1);
|
|
59
|
+
const theme = useTabBarTheme(themeOverrides);
|
|
60
|
+
const impact = useHaptics();
|
|
61
|
+
|
|
62
|
+
// Picker-style tick while the highlight crosses tab boundaries mid-drag.
|
|
63
|
+
// `useHaptics` already no-ops on web, when the optional `expo-haptics` peer
|
|
64
|
+
// is absent, and when a `BloomHapticsProvider` has haptics turned off — so
|
|
65
|
+
// the only decision left here is the caller's own `haptics` prop.
|
|
66
|
+
const tick = useCallback(() => {
|
|
67
|
+
if (haptics) impact('light');
|
|
68
|
+
}, [haptics, impact]);
|
|
69
|
+
|
|
70
|
+
// Navigation happens only on release — switching screens live while
|
|
71
|
+
// scrubbing makes the content jump under the finger.
|
|
72
|
+
const selectIndex = useCallback(index => onIndexChange?.(index), [onIndexChange]);
|
|
73
|
+
|
|
74
|
+
// CONTROLLED path: the bar owns the highlight when `activeIndex` is provided,
|
|
75
|
+
// so it tracks the prop even when a consumer renders custom children instead
|
|
76
|
+
// of `TabBarButton`s. Syncing an imperative animation to a controlled prop is
|
|
77
|
+
// a legitimate effect (external-system sync), the same shape `Tabs` uses for
|
|
78
|
+
// its underline. The focus-driven path is handled per-button instead — see
|
|
79
|
+
// `TabBarButtonBody`.
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
if (activeIndex === undefined) return;
|
|
82
|
+
// While scrubbing the finger owns the highlight; never fight it.
|
|
83
|
+
if (isDragging.value) return;
|
|
84
|
+
slideIndex.value = withSpring(activeIndex, SLIDE_SPRING);
|
|
85
|
+
}, [activeIndex, slideIndex, isDragging]);
|
|
86
|
+
|
|
87
|
+
// Scrubbing: the highlight tracks the finger 1:1 while dragging (no spring —
|
|
88
|
+
// it must feel attached), haptic ticks fire on boundary crossings, and
|
|
89
|
+
// navigation happens only on release. Taps are handled by a Tap gesture
|
|
90
|
+
// racing the pan — the detector consumes the bar's touches, so the inner
|
|
91
|
+
// Pressables never receive them.
|
|
92
|
+
const gesture = useMemo(() => {
|
|
93
|
+
const indexAtX = (x, minimizedValue) => {
|
|
94
|
+
'worklet';
|
|
95
|
+
|
|
96
|
+
const sideInset = interpolate(minimizedValue, [0, 1], [0, MINIMIZED_INSET], Extrapolation.CLAMP);
|
|
97
|
+
const barWidth = windowWidth - BAR_MARGIN * 2 - sideInset * 2;
|
|
98
|
+
const itemWidth = (barWidth - ROW_PAD_H * 2) / tabCount;
|
|
99
|
+
const raw = (x - ROW_PAD_H) / itemWidth - 0.5;
|
|
100
|
+
return Math.min(Math.max(raw, 0), tabCount - 1);
|
|
101
|
+
};
|
|
102
|
+
const pan = Gesture.Pan().activeOffsetX([-6, 6]).failOffsetY([-14, 14]).onStart(() => {
|
|
103
|
+
isDragging.value = true;
|
|
104
|
+
lastTicked.value = Math.round(slideIndex.value);
|
|
105
|
+
// Scrubbing is a deliberate bar interaction — surface the labels.
|
|
106
|
+
setMinimized(minimized, 0);
|
|
107
|
+
}).onUpdate(event => {
|
|
108
|
+
const index = indexAtX(event.x, progress.value);
|
|
109
|
+
slideIndex.value = index;
|
|
110
|
+
const rounded = Math.round(index);
|
|
111
|
+
if (rounded !== lastTicked.value) {
|
|
112
|
+
lastTicked.value = rounded;
|
|
113
|
+
runOnJS(tick)();
|
|
114
|
+
}
|
|
115
|
+
}).onFinalize(() => {
|
|
116
|
+
// Fires on failure too (e.g. the touch was a tap) — only act when the
|
|
117
|
+
// pan actually activated, or we'd stomp the tap's navigation.
|
|
118
|
+
if (!isDragging.value) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
const rounded = Math.round(slideIndex.value);
|
|
122
|
+
slideIndex.value = withSpring(rounded, SLIDE_SPRING);
|
|
123
|
+
runOnJS(selectIndex)(rounded);
|
|
124
|
+
isDragging.value = false;
|
|
125
|
+
});
|
|
126
|
+
const tap = Gesture.Tap()
|
|
127
|
+
// Real fingers drift a few points — the default tolerance (~2pt) makes
|
|
128
|
+
// ordinary taps fail. Past 6pt horizontal the pan takes over.
|
|
129
|
+
.maxDistance(16).maxDuration(400).onEnd((event, success) => {
|
|
130
|
+
if (!success) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
const index = Math.round(indexAtX(event.x, progress.value));
|
|
134
|
+
slideIndex.value = withSpring(index, SLIDE_SPRING);
|
|
135
|
+
setMinimized(minimized, 0);
|
|
136
|
+
runOnJS(selectIndex)(index);
|
|
137
|
+
});
|
|
138
|
+
return Gesture.Race(pan, tap);
|
|
139
|
+
}, [windowWidth, tabCount, selectIndex, tick, isDragging, lastTicked, slideIndex, minimized, progress]);
|
|
140
|
+
|
|
141
|
+
// CRITICAL — every shared value and every scalar a mapper READS must appear
|
|
142
|
+
// in its dependency array. On web WITHOUT the react-native-worklets babel
|
|
143
|
+
// plugin (what every Oxy RN-Web app ships) reanimated cannot auto-detect a
|
|
144
|
+
// worklet's reads, so it drives the mapper off the deps array instead: with a
|
|
145
|
+
// missing or incomplete array the mapper runs ONCE and freezes at the first
|
|
146
|
+
// frame while the shared values keep animating underneath — the bar would
|
|
147
|
+
// never minimize and the highlight would never move, with no error anywhere.
|
|
148
|
+
// Native (plugin present) auto-tracks and ignores the extra deps, so listing
|
|
149
|
+
// them is correct on both platforms. Same rule as `BottomSheetBase` and
|
|
150
|
+
// `ZoomableImageGallery`. Do NOT strip these.
|
|
151
|
+
const barStyle = useAnimatedStyle(() => {
|
|
152
|
+
const height = interpolate(progress.value, [0, 1], [EXPANDED_HEIGHT, MINIMIZED_HEIGHT], Extrapolation.CLAMP);
|
|
153
|
+
return {
|
|
154
|
+
height,
|
|
155
|
+
// Revolut-style: the pill shrinks in both dimensions.
|
|
156
|
+
marginHorizontal: interpolate(progress.value, [0, 1], [0, MINIMIZED_INSET], Extrapolation.CLAMP)
|
|
157
|
+
};
|
|
158
|
+
}, [progress]);
|
|
159
|
+
|
|
160
|
+
// The capsule shape lives on the surface itself: iOS 26 glass renders its own
|
|
161
|
+
// native corner configuration (true squircle + rim lighting). Clipping a
|
|
162
|
+
// rectangular glass with an RN mask breaks that.
|
|
163
|
+
const shapeStyle = useAnimatedStyle(() => {
|
|
164
|
+
const height = interpolate(progress.value, [0, 1], [EXPANDED_HEIGHT, MINIMIZED_HEIGHT], Extrapolation.CLAMP);
|
|
165
|
+
return {
|
|
166
|
+
borderRadius: height / 2
|
|
167
|
+
};
|
|
168
|
+
}, [progress]);
|
|
169
|
+
|
|
170
|
+
// One shared highlight that slides between tabs (transform-only → GPU). All
|
|
171
|
+
// geometry derives from shared values, never from layout callbacks.
|
|
172
|
+
const highlightStyle = useAnimatedStyle(() => {
|
|
173
|
+
const barHeight = interpolate(progress.value, [0, 1], [EXPANDED_HEIGHT, MINIMIZED_HEIGHT], Extrapolation.CLAMP);
|
|
174
|
+
const height = interpolate(progress.value, [0, 1], [HIGHLIGHT_EXPANDED, HIGHLIGHT_MINIMIZED], Extrapolation.CLAMP);
|
|
175
|
+
const sideInset = interpolate(progress.value, [0, 1], [0, MINIMIZED_INSET], Extrapolation.CLAMP);
|
|
176
|
+
const barWidth = windowWidth - BAR_MARGIN * 2 - sideInset * 2;
|
|
177
|
+
const itemWidth = (barWidth - ROW_PAD_H * 2) / tabCount;
|
|
178
|
+
return {
|
|
179
|
+
height,
|
|
180
|
+
width: itemWidth,
|
|
181
|
+
borderRadius: height / 2,
|
|
182
|
+
top: (barHeight - height) / 2,
|
|
183
|
+
transform: [{
|
|
184
|
+
translateX: ROW_PAD_H + itemWidth * slideIndex.value
|
|
185
|
+
}]
|
|
186
|
+
};
|
|
187
|
+
}, [progress, slideIndex, windowWidth, tabCount]);
|
|
188
|
+
const bottomOffset = Math.max(insets.bottom - 16, 12);
|
|
189
|
+
const barContext = useMemo(() => ({
|
|
190
|
+
slideIndex,
|
|
191
|
+
isDragging,
|
|
192
|
+
theme,
|
|
193
|
+
activeIndex,
|
|
194
|
+
selectIndex
|
|
195
|
+
}), [slideIndex, isDragging, theme, activeIndex, selectIndex]);
|
|
196
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
197
|
+
...viewProps,
|
|
198
|
+
style: [styles.root, style],
|
|
199
|
+
children: [/*#__PURE__*/_jsx(Blur, {
|
|
200
|
+
direction: "bottom",
|
|
201
|
+
style: {
|
|
202
|
+
position: 'absolute',
|
|
203
|
+
left: 0,
|
|
204
|
+
right: 0,
|
|
205
|
+
bottom: 0,
|
|
206
|
+
height: bottomOffset + EXPANDED_HEIGHT + BLUR_BLEED
|
|
207
|
+
}
|
|
208
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
209
|
+
style: [styles.barWrap, {
|
|
210
|
+
marginBottom: bottomOffset
|
|
211
|
+
}],
|
|
212
|
+
children: /*#__PURE__*/_jsx(GestureDetector, {
|
|
213
|
+
gesture: gesture,
|
|
214
|
+
children: /*#__PURE__*/_jsxs(Animated.View, {
|
|
215
|
+
style: barStyle,
|
|
216
|
+
children: [/*#__PURE__*/_jsx(Surface, {
|
|
217
|
+
theme: theme,
|
|
218
|
+
style: shapeStyle
|
|
219
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
220
|
+
style: [styles.highlight, {
|
|
221
|
+
backgroundColor: theme.highlight
|
|
222
|
+
}, highlightStyle]
|
|
223
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
224
|
+
accessibilityRole: "tablist",
|
|
225
|
+
style: styles.itemRow,
|
|
226
|
+
children: /*#__PURE__*/_jsx(BarContext.Provider, {
|
|
227
|
+
value: barContext,
|
|
228
|
+
children: children
|
|
229
|
+
})
|
|
230
|
+
})]
|
|
231
|
+
})
|
|
232
|
+
})
|
|
233
|
+
})]
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
/** One tab trigger: icon + label that fades out when the bar minimizes. */
|
|
237
|
+
function TabBarButtonBody({
|
|
238
|
+
Glyph,
|
|
239
|
+
item,
|
|
240
|
+
index,
|
|
241
|
+
isFocused,
|
|
242
|
+
onPress,
|
|
243
|
+
style,
|
|
244
|
+
...pressableProps
|
|
245
|
+
}) {
|
|
246
|
+
const minimized = useMinimizeState();
|
|
247
|
+
const progress = minimized.progress;
|
|
248
|
+
const bar = useContext(BarContext);
|
|
249
|
+
// Resolved outside the bar too, so a standalone button still themes itself.
|
|
250
|
+
const standaloneTheme = useTabBarTheme();
|
|
251
|
+
const theme = bar?.theme ?? standaloneTheme;
|
|
252
|
+
const slideIndex = bar?.slideIndex;
|
|
253
|
+
// The two paths meet here: an explicit `isFocused` (router adapter) wins;
|
|
254
|
+
// otherwise focus comes from the bar's controlled `activeIndex`.
|
|
255
|
+
const focused = isFocused ?? bar?.activeIndex === index;
|
|
256
|
+
|
|
257
|
+
// FOCUS-DRIVEN path only. Covers programmatic navigation too (deep links,
|
|
258
|
+
// back gestures) — the trigger re-renders focused and the highlight follows.
|
|
259
|
+
// While scrubbing, the finger owns the highlight; never fight it with a
|
|
260
|
+
// spring. On the controlled path the BAR drives the highlight instead, so
|
|
261
|
+
// this stays out of the way to avoid two writers on one shared value.
|
|
262
|
+
useEffect(() => {
|
|
263
|
+
if (isFocused === undefined || !isFocused || !bar) return;
|
|
264
|
+
if (bar.isDragging.value) return;
|
|
265
|
+
bar.slideIndex.value = withSpring(index, SLIDE_SPRING);
|
|
266
|
+
}, [isFocused, index, bar]);
|
|
267
|
+
|
|
268
|
+
// Tint follows the sliding highlight, not navigation focus: whatever the pill
|
|
269
|
+
// is over lights up — live while scrubbing, traveling on taps. Without a bar
|
|
270
|
+
// there is nothing to follow, so it falls back to plain focus.
|
|
271
|
+
// (Deps: see the CRITICAL note in `TabBarBody`.)
|
|
272
|
+
const activeGlyphStyle = useAnimatedStyle(() => ({
|
|
273
|
+
opacity: slideIndex ? 1 - Math.min(Math.abs(slideIndex.value - index), 1) : focused ? 1 : 0
|
|
274
|
+
}), [slideIndex, index, focused]);
|
|
275
|
+
const labelStyle = useAnimatedStyle(() => ({
|
|
276
|
+
opacity: interpolate(progress.value, [0, 0.4], [1, 0], Extrapolation.CLAMP),
|
|
277
|
+
color: slideIndex ? interpolateColor(Math.min(Math.abs(slideIndex.value - index), 1), [0, 1], [theme.activeTint, theme.inactiveTint]) : focused ? theme.activeTint : theme.inactiveTint
|
|
278
|
+
}), [progress, slideIndex, index, focused, theme]);
|
|
279
|
+
|
|
280
|
+
// Height is animated EXPLICITLY (not derived from children) so the icon stays
|
|
281
|
+
// perfectly centered every frame — layout-driven sizing lags a frame behind
|
|
282
|
+
// UI-thread animation.
|
|
283
|
+
const boxStyle = useAnimatedStyle(() => ({
|
|
284
|
+
height: interpolate(progress.value, [0, 1], [HIGHLIGHT_EXPANDED, HIGHLIGHT_MINIMIZED], Extrapolation.CLAMP)
|
|
285
|
+
}), [progress]);
|
|
286
|
+
return /*#__PURE__*/_jsx(Pressable
|
|
287
|
+
// Accessibility defaults come BEFORE the spread so an explicit prop — or
|
|
288
|
+
// one injected by a router trigger — still wins.
|
|
289
|
+
, {
|
|
290
|
+
accessibilityRole: "tab",
|
|
291
|
+
accessibilityState: {
|
|
292
|
+
selected: focused
|
|
293
|
+
},
|
|
294
|
+
accessibilityLabel: item.label,
|
|
295
|
+
...pressableProps,
|
|
296
|
+
onPress: event => {
|
|
297
|
+
// The bar's GestureDetector normally consumes touches; this still fires
|
|
298
|
+
// for assistive-technology activation (VoiceOver) and keyboard focus.
|
|
299
|
+
if (bar) bar.slideIndex.value = withSpring(index, SLIDE_SPRING);
|
|
300
|
+
setMinimized(minimized, 0);
|
|
301
|
+
// Controlled path only. On the focus-driven path the trigger's own
|
|
302
|
+
// `onPress` below performs the navigation, so reporting the selection
|
|
303
|
+
// here as well would navigate twice.
|
|
304
|
+
if (isFocused === undefined) bar?.selectIndex(index);
|
|
305
|
+
onPress?.(event);
|
|
306
|
+
}
|
|
307
|
+
// `Pressable`'s `style` also accepts a function of the press state; both
|
|
308
|
+
// forms are composed on top of the flex-share base so a caller can tint
|
|
309
|
+
// or scale a tab on press without losing the layout.
|
|
310
|
+
,
|
|
311
|
+
style: typeof style === 'function' ? state => [styles.button, style(state)] : [styles.button, style],
|
|
312
|
+
children: /*#__PURE__*/_jsxs(Animated.View, {
|
|
313
|
+
style: [styles.itemBox, boxStyle],
|
|
314
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
315
|
+
children: [/*#__PURE__*/_jsx(Glyph, {
|
|
316
|
+
item: item,
|
|
317
|
+
tint: theme.inactiveTint,
|
|
318
|
+
size: ICON_SIZE
|
|
319
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
320
|
+
style: [StyleSheet.absoluteFill, styles.glyphLayer, activeGlyphStyle],
|
|
321
|
+
children: /*#__PURE__*/_jsx(Glyph, {
|
|
322
|
+
item: item,
|
|
323
|
+
tint: theme.activeTint,
|
|
324
|
+
size: ICON_SIZE
|
|
325
|
+
})
|
|
326
|
+
})]
|
|
327
|
+
}), /*#__PURE__*/_jsx(Animated.Text, {
|
|
328
|
+
numberOfLines: 1,
|
|
329
|
+
style: [styles.label, labelStyle],
|
|
330
|
+
children: item.label
|
|
331
|
+
})]
|
|
332
|
+
})
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Bind the platform `Surface` + `Blur` to the shared body, once per entry
|
|
338
|
+
* module. The returned component is created at module scope, so its identity is
|
|
339
|
+
* stable across renders. `index.ts` binds the native/neutral pieces and
|
|
340
|
+
* `index.web.tsx` binds the web pieces explicitly — the same split
|
|
341
|
+
* `BottomSheet` makes with its `Shell`.
|
|
342
|
+
*/
|
|
343
|
+
export function createTabBar(Surface, Blur) {
|
|
344
|
+
const TabBar = props => /*#__PURE__*/_jsx(TabBarBody, {
|
|
345
|
+
...props,
|
|
346
|
+
Surface: Surface,
|
|
347
|
+
Blur: Blur
|
|
348
|
+
});
|
|
349
|
+
TabBar.displayName = 'TabBar';
|
|
350
|
+
return TabBar;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/** Bind the platform `Glyph` to the shared button body. See `createTabBar`. */
|
|
354
|
+
export function createTabBarButton(Glyph) {
|
|
355
|
+
const TabBarButton = props => /*#__PURE__*/_jsx(TabBarButtonBody, {
|
|
356
|
+
...props,
|
|
357
|
+
Glyph: Glyph
|
|
358
|
+
});
|
|
359
|
+
TabBarButton.displayName = 'TabBarButton';
|
|
360
|
+
return TabBarButton;
|
|
361
|
+
}
|
|
362
|
+
const styles = StyleSheet.create({
|
|
363
|
+
root: {
|
|
364
|
+
position: 'absolute',
|
|
365
|
+
left: 0,
|
|
366
|
+
right: 0,
|
|
367
|
+
bottom: 0,
|
|
368
|
+
// In the style object, not as a prop: RN-Web deprecated the `pointerEvents`
|
|
369
|
+
// prop and warns on every render when it is used.
|
|
370
|
+
pointerEvents: 'box-none'
|
|
371
|
+
},
|
|
372
|
+
barWrap: {
|
|
373
|
+
marginHorizontal: BAR_MARGIN,
|
|
374
|
+
pointerEvents: 'box-none'
|
|
375
|
+
},
|
|
376
|
+
highlight: {
|
|
377
|
+
position: 'absolute',
|
|
378
|
+
left: 0,
|
|
379
|
+
borderCurve: 'continuous'
|
|
380
|
+
},
|
|
381
|
+
itemRow: {
|
|
382
|
+
flex: 1,
|
|
383
|
+
flexDirection: 'row',
|
|
384
|
+
alignItems: 'center',
|
|
385
|
+
paddingHorizontal: ROW_PAD_H
|
|
386
|
+
},
|
|
387
|
+
button: {
|
|
388
|
+
flex: 1,
|
|
389
|
+
alignItems: 'center',
|
|
390
|
+
justifyContent: 'center'
|
|
391
|
+
},
|
|
392
|
+
itemBox: {
|
|
393
|
+
alignSelf: 'stretch',
|
|
394
|
+
alignItems: 'center',
|
|
395
|
+
paddingTop: ITEM_PAD_V,
|
|
396
|
+
overflow: 'hidden'
|
|
397
|
+
},
|
|
398
|
+
glyphLayer: {
|
|
399
|
+
alignItems: 'center',
|
|
400
|
+
justifyContent: 'center'
|
|
401
|
+
},
|
|
402
|
+
label: {
|
|
403
|
+
fontSize: LABEL_FONT_SIZE,
|
|
404
|
+
fontWeight: '600',
|
|
405
|
+
marginTop: ITEM_GAP
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
//# sourceMappingURL=TabBarBase.js.map
|