@oxyhq/bloom 1.10.1 → 1.12.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.
Files changed (41) hide show
  1. package/docs/layout.mdx +40 -3
  2. package/lib/commonjs/fab/Fab.js +55 -4
  3. package/lib/commonjs/fab/Fab.js.map +1 -1
  4. package/lib/commonjs/fab/Fab.web.js +29 -1
  5. package/lib/commonjs/fab/Fab.web.js.map +1 -1
  6. package/lib/commonjs/layout/bottom-edge.js +93 -26
  7. package/lib/commonjs/layout/bottom-edge.js.map +1 -1
  8. package/lib/commonjs/layout/index.js +6 -0
  9. package/lib/commonjs/layout/index.js.map +1 -1
  10. package/lib/commonjs/tab-bar/TabBarBase.js +22 -6
  11. package/lib/commonjs/tab-bar/TabBarBase.js.map +1 -1
  12. package/lib/module/fab/Fab.js +57 -6
  13. package/lib/module/fab/Fab.js.map +1 -1
  14. package/lib/module/fab/Fab.web.js +30 -2
  15. package/lib/module/fab/Fab.web.js.map +1 -1
  16. package/lib/module/layout/bottom-edge.js +92 -26
  17. package/lib/module/layout/bottom-edge.js.map +1 -1
  18. package/lib/module/layout/index.js +1 -1
  19. package/lib/module/layout/index.js.map +1 -1
  20. package/lib/module/tab-bar/TabBarBase.js +24 -8
  21. package/lib/module/tab-bar/TabBarBase.js.map +1 -1
  22. package/lib/typescript/commonjs/fab/Fab.d.ts.map +1 -1
  23. package/lib/typescript/commonjs/fab/Fab.web.d.ts.map +1 -1
  24. package/lib/typescript/commonjs/layout/bottom-edge.d.ts +58 -10
  25. package/lib/typescript/commonjs/layout/bottom-edge.d.ts.map +1 -1
  26. package/lib/typescript/commonjs/layout/index.d.ts +1 -1
  27. package/lib/typescript/commonjs/layout/index.d.ts.map +1 -1
  28. package/lib/typescript/commonjs/tab-bar/TabBarBase.d.ts.map +1 -1
  29. package/lib/typescript/module/fab/Fab.d.ts.map +1 -1
  30. package/lib/typescript/module/fab/Fab.web.d.ts.map +1 -1
  31. package/lib/typescript/module/layout/bottom-edge.d.ts +58 -10
  32. package/lib/typescript/module/layout/bottom-edge.d.ts.map +1 -1
  33. package/lib/typescript/module/layout/index.d.ts +1 -1
  34. package/lib/typescript/module/layout/index.d.ts.map +1 -1
  35. package/lib/typescript/module/tab-bar/TabBarBase.d.ts.map +1 -1
  36. package/package.json +1 -1
  37. package/src/fab/Fab.tsx +57 -4
  38. package/src/fab/Fab.web.tsx +31 -2
  39. package/src/layout/bottom-edge.tsx +109 -33
  40. package/src/layout/index.ts +6 -1
  41. package/src/tab-bar/TabBarBase.tsx +28 -6
@@ -15,10 +15,10 @@
15
15
  * react-native-screens, so this file is safe in a web bundle and in a
16
16
  * consumer's type-check.
17
17
  */
18
- import { Children, createContext, useCallback, useContext, useEffect, useMemo } from 'react';
18
+ import { Children, createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';
19
19
  import { Pressable, StyleSheet, useWindowDimensions, View } from 'react-native';
20
20
  import { Gesture, GestureDetector } from 'react-native-gesture-handler';
21
- import Animated, { Extrapolation, interpolate, interpolateColor, runOnJS, useAnimatedStyle, useSharedValue, withSpring, withTiming } from 'react-native-reanimated';
21
+ import Animated, { Extrapolation, interpolate, interpolateColor, runOnJS, useAnimatedReaction, useAnimatedStyle, useSharedValue, withSpring, withTiming } from 'react-native-reanimated';
22
22
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
23
23
  import { useHaptics } from "../hooks/use-haptics.js";
24
24
  import { useClaimBottomEdge } from "../layout/bottom-edge.js";
@@ -304,13 +304,29 @@ function TabBarBody({
304
304
  // its own layout can never drift from where the bar actually sits.
305
305
  const bottomOffset = windowEdgeGap(insets.bottom);
306
306
 
307
+ // Whether the bar has settled into its minimized size, as REACT state.
308
+ //
309
+ // Reacting on `target` rather than on `progress` is what keeps this cheap:
310
+ // `target` is the binary 0/1 the minimize spring is heading for, so this fires
311
+ // twice per scroll gesture instead of once per frame. Crossing `progress > 0.5`
312
+ // would work too and would cost the same, but it would report the change
313
+ // halfway through the animation rather than when it was decided.
314
+ const [isMinimized, setIsMinimized] = useState(false);
315
+ useAnimatedReaction(() => minimized.target.value, (target, previous) => {
316
+ if (target !== previous) runOnJS(setIsMinimized)(target === 1);
317
+ }, [minimized]);
318
+
307
319
  // Publish what the bar occupies so anything else at this edge stacks above it
308
- // rather than behind it. Same number `useTabBarFootprint` reports, derived from
309
- // the same two values, so a consumer reading either can never disagree with
310
- // where the bar actually sits. The EXPANDED height on purpose: the bar
311
- // minimizes on scroll and re-expands, so claiming the minimized height would
312
- // drop a FAB onto the pill the moment the user scrolled back up.
313
- useClaimBottomEdge(bottomOffset + EXPANDED_HEIGHT);
320
+ // rather than behind it. Same numbers `useTabBarFootprint` reports, derived
321
+ // from the same geometry, so a consumer reading either can never disagree with
322
+ // where the bar actually sits.
323
+ //
324
+ // RESERVED stays the EXPANDED height even while minimized: the bar re-expands
325
+ // the moment the user scrolls back up, so anything that permanently reserves
326
+ // space (a list's bottom padding, a toast) must keep room for the full pill or
327
+ // it would jitter on every scroll. The collapse travels as its own STATE — see
328
+ // `layout/bottom-edge` for why it is a boolean and not the live height.
329
+ useClaimBottomEdge(bottomOffset + EXPANDED_HEIGHT, isMinimized);
314
330
 
315
331
  // How centring and the animated inset compose: centring is STATIC and belongs
316
332
  // to the wrap, the inset stays ANIMATED on the pill inside it. The wrap is
@@ -1 +1 @@
1
- {"version":3,"names":["Children","createContext","useCallback","useContext","useEffect","useMemo","Pressable","StyleSheet","useWindowDimensions","View","Gesture","GestureDetector","Animated","Extrapolation","interpolate","interpolateColor","runOnJS","useAnimatedStyle","useSharedValue","withSpring","withTiming","useSafeAreaInsets","useHaptics","useClaimBottomEdge","windowEdgeGap","setMinimized","useMinimizeState","BAR_MARGIN","BLUR_BLEED","EXPANDED_HEIGHT","HIGHLIGHT_EXPANDED","HIGHLIGHT_FADE","HIGHLIGHT_MINIMIZED","ICON_SIZE","ITEM_GAP","ITEM_PAD_V","LABEL_FONT_SIZE","LONG_PRESS_MIN_DURATION","MINIMIZED_HEIGHT","MINIMIZED_INSET","ROW_PAD_H","SLIDE_SPRING","useTabBarTheme","jsx","_jsx","jsxs","_jsxs","BarContext","TabBarBody","Surface","Blur","children","activeIndex","onIndexChange","onIndexLongPress","theme","themeOverrides","haptics","blur","maxWidth","style","viewProps","insets","width","windowWidth","minimized","progress","tabCount","Math","max","count","hasSelection","undefined","Number","isInteger","slideIndex","highlightOpacity","isDragging","lastTicked","impact","barOuterWidth","min","tick","selectIndex","index","longPressIndex","hasLongPress","value","gesture","indexAtX","x","minimizedValue","sideInset","CLAMP","barWidth","itemWidth","raw","pan","Pan","activeOffsetX","failOffsetY","onStart","event","round","onUpdate","rounded","onFinalize","tap","Tap","maxDistance","maxDuration","onEnd","success","Race","longPress","LongPress","minDuration","barStyle","height","inset","marginLeft","marginRight","shapeStyle","borderRadius","highlightStyle","barHeight","top","opacity","transform","translateX","bottomOffset","bottom","constrainedWrapStyle","alignSelf","barContext","pointerEvents","styles","root","direction","intensity","position","left","right","barWrap","marginBottom","highlight","backgroundColor","accessibilityRole","itemRow","Provider","TabBarButtonBody","Glyph","item","isFocused","onPress","pressableProps","bar","standaloneTheme","focused","activeGlyphStyle","proximity","abs","labelStyle","color","activeTint","inactiveTint","boxStyle","accessibilityLabel","label","state","button","itemBox","tint","size","active","absoluteFill","glyphLayer","Text","numberOfLines","createTabBar","TabBar","props","displayName","createTabBarButton","TabBarButton","create","marginHorizontal","borderCurve","flex","flexDirection","alignItems","paddingHorizontal","justifyContent","paddingTop","overflow","fontSize","fontWeight","marginTop"],"sourceRoot":"../../../src","sources":["tab-bar/TabBarBase.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEA,QAAQ,EACRC,aAAa,EACbC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,OAAO,QAEF,OAAO;AACd,SAASC,SAAS,EAAEC,UAAU,EAAEC,mBAAmB,EAAEC,IAAI,QAA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AAC;EACDY,OAAO,EAAE;IACP2C,gBAAgB,EAAE/J;EACpB,CAAC;EACDsH,SAAS,EAAE;IACTL,QAAQ,EAAE,UAAU;IACpBC,IAAI,EAAE,CAAC;IACP8C,WAAW,EAAE;EACf,CAAC;EACDvC,OAAO,EAAE;IACPwC,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,iBAAiB,EAAEvJ;EACrB,CAAC;EACDkI,MAAM,EAAE;IACNkB,IAAI,EAAE,CAAC;IACPE,UAAU,EAAE,QAAQ;IACpBE,cAAc,EAAE;EAClB,CAAC;EACDrB,OAAO,EAAE;IACPtC,SAAS,EAAE,SAAS;IACpByD,UAAU,EAAE,QAAQ;IACpBG,UAAU,EAAE9J,UAAU;IACtB+J,QAAQ,EAAE;EACZ,CAAC;EACDlB,UAAU,EAAE;IACVc,UAAU,EAAE,QAAQ;IACpBE,cAAc,EAAE;EAClB,CAAC;EACDxB,KAAK,EAAE;IACL2B,QAAQ,EAAE/J,eAAe;IACzBgK,UAAU,EAAE,KAAK;IACjBC,SAAS,EAAEnK;EACb;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Children","createContext","useCallback","useContext","useEffect","useMemo","useState","Pressable","StyleSheet","useWindowDimensions","View","Gesture","GestureDetector","Animated","Extrapolation","interpolate","interpolateColor","runOnJS","useAnimatedReaction","useAnimatedStyle","useSharedValue","withSpring","withTiming","useSafeAreaInsets","useHaptics","useClaimBottomEdge","windowEdgeGap","setMinimized","useMinimizeState","BAR_MARGIN","BLUR_BLEED","EXPANDED_HEIGHT","HIGHLIGHT_EXPANDED","HIGHLIGHT_FADE","HIGHLIGHT_MINIMIZED","ICON_SIZE","ITEM_GAP","ITEM_PAD_V","LABEL_FONT_SIZE","LONG_PRESS_MIN_DURATION","MINIMIZED_HEIGHT","MINIMIZED_INSET","ROW_PAD_H","SLIDE_SPRING","useTabBarTheme","jsx","_jsx","jsxs","_jsxs","BarContext","TabBarBody","Surface","Blur","children","activeIndex","onIndexChange","onIndexLongPress","theme","themeOverrides","haptics","blur","maxWidth","style","viewProps","insets","width","windowWidth","minimized","progress","tabCount","Math","max","count","hasSelection","undefined","Number","isInteger","slideIndex","highlightOpacity","isDragging","lastTicked","impact","barOuterWidth","min","tick","selectIndex","index","longPressIndex","hasLongPress","value","gesture","indexAtX","x","minimizedValue","sideInset","CLAMP","barWidth","itemWidth","raw","pan","Pan","activeOffsetX","failOffsetY","onStart","event","round","onUpdate","rounded","onFinalize","tap","Tap","maxDistance","maxDuration","onEnd","success","Race","longPress","LongPress","minDuration","barStyle","height","inset","marginLeft","marginRight","shapeStyle","borderRadius","highlightStyle","barHeight","top","opacity","transform","translateX","bottomOffset","bottom","isMinimized","setIsMinimized","target","previous","constrainedWrapStyle","alignSelf","barContext","pointerEvents","styles","root","direction","intensity","position","left","right","barWrap","marginBottom","highlight","backgroundColor","accessibilityRole","itemRow","Provider","TabBarButtonBody","Glyph","item","isFocused","onPress","pressableProps","bar","standaloneTheme","focused","activeGlyphStyle","proximity","abs","labelStyle","color","activeTint","inactiveTint","boxStyle","accessibilityLabel","label","state","button","itemBox","tint","size","active","absoluteFill","glyphLayer","Text","numberOfLines","createTabBar","TabBar","props","displayName","createTabBarButton","TabBarButton","create","marginHorizontal","borderCurve","flex","flexDirection","alignItems","paddingHorizontal","justifyContent","paddingTop","overflow","fontSize","fontWeight","marginTop"],"sourceRoot":"../../../src","sources":["tab-bar/TabBarBase.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEA,QAAQ,EACRC,aAAa,EACbC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,OAAO,EACPC,QAAQ,QAEH,OAAO;AACd,SAASC,SAAS,EAAEC,UAAU,EAAEC,mBAAmB,EAAEC,IAAI,QAAwB,cAAc;AAC/F,SAASC,OAAO,EAAEC,eAAe,QAAQ,8BAA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,EAAuB,MAAM,SAAS,CAAC;AAE3E,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AA4Q3E,eAAO,MAAM,GAAG,sCAAqB,CAAC"}
1
+ {"version":3,"file":"Fab.d.ts","sourceRoot":"","sources":["../../../../src/fab/Fab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+D,MAAM,OAAO,CAAC;AAoBpF,OAAO,KAAK,EAAgB,QAAQ,EAAuB,MAAM,SAAS,CAAC;AAE3E,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAiU3E,eAAO,MAAM,GAAG,sCAAqB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Fab.web.d.ts","sourceRoot":"","sources":["../../../../src/fab/Fab.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EAAgB,QAAQ,EAAuB,MAAM,SAAS,CAAC;AAE3E,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAsS3E,eAAO,MAAM,GAAG,sCAAwB,CAAC"}
1
+ {"version":3,"file":"Fab.web.d.ts","sourceRoot":"","sources":["../../../../src/fab/Fab.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EAAgB,QAAQ,EAAuB,MAAM,SAAS,CAAC;AAE3E,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAmU3E,eAAO,MAAM,GAAG,sCAAwB,CAAC"}
@@ -27,6 +27,33 @@
27
27
  * edge, so two surfaces at that edge overlap rather than stack; the tallest is
28
28
  * what a new surface has to clear. Summing would strand it at twice the height.
29
29
  *
30
+ * ## A size and a state, because they travel differently
31
+ *
32
+ * A surface that collapses — the tab bar minimizes 58 -> 44 on scroll — publishes
33
+ * two things, and only one of them is a measurement:
34
+ *
35
+ * - RESERVED (`useBottomEdgeInset`) never shrinks while the claimant is
36
+ * mounted. It is what must be kept permanently free: a list's bottom
37
+ * padding, a toast stack's offset. Shrinking it on collapse would jitter a
38
+ * list's content size on every scroll and jump a toast 14px mid-display,
39
+ * because the bar re-expands the instant the user scrolls back up.
40
+ * - COLLAPSED (`useBottomEdgeCollapsed`) is a boolean, deliberately, and this
41
+ * is the part that was learned the hard way. It first shipped as a live
42
+ * PIXEL height so a FAB could ride down with the bar — and it felt broken on
43
+ * a device. The bar animates on the UI thread; a React consumer learns about
44
+ * the change through `runOnJS` plus two render passes, so its motion STARTS
45
+ * one to three frames late, worst exactly while scrolling because that is
46
+ * when the JS thread is busiest. No spring config fixes a variable start
47
+ * delay.
48
+ *
49
+ * Two things moving together betray that lag; a state change does not. A reader
50
+ * that FADES on this boolean has no spatial relationship to violate, so the same
51
+ * few frames of latency are imperceptible. That is why the channel is a state and
52
+ * not a geometry: it is the shape of signal that survives the trip to the JS
53
+ * thread. Anything that genuinely must track the collapse per-frame has to read
54
+ * the tab bar's own shared value on the UI thread instead — React state is the
55
+ * wrong transport for it, at any width.
56
+ *
30
57
  * ## Why an external store
31
58
  *
32
59
  * The claim set is mutable state living outside React. Reading it in a memoized
@@ -47,13 +74,15 @@ export declare namespace BottomEdgeProvider {
47
74
  var displayName: string;
48
75
  }
49
76
  /**
50
- * How much of the bottom edge is already occupied, in px.
77
+ * How much of the bottom edge is permanently RESERVED, in px.
51
78
  *
52
- * Add it to whatever offset the surface would otherwise use:
79
+ * Never shrinks while its claimant is mounted, so it is the number for anything
80
+ * that must not move as the user scrolls — a list's bottom padding, a toast
81
+ * stack's offset:
53
82
  *
54
83
  * ```tsx
55
- * const occupied = useBottomEdgeInset();
56
- * <View style={{ position: 'absolute', bottom: windowEdgeGap(insets.bottom) + occupied }} />
84
+ * const reserved = useBottomEdgeInset();
85
+ * <FlatList contentContainerStyle={{ paddingBottom: reserved + 12 }} />
57
86
  * ```
58
87
  *
59
88
  * `0` outside a provider, and `0` on the first commit even inside one — a claim
@@ -63,15 +92,34 @@ export declare namespace BottomEdgeProvider {
63
92
  */
64
93
  export declare function useBottomEdgeInset(): number;
65
94
  /**
66
- * Claim `height` px of the bottom edge for as long as the caller is mounted.
95
+ * Whether the surface owning the bottom edge is currently COLLAPSED the tab
96
+ * bar minimized on scroll.
97
+ *
98
+ * A boolean rather than a live height, on purpose: see the note at the top of
99
+ * this file. A reader should FADE or otherwise change state on it, never try to
100
+ * stay geometrically locked to the collapsing surface — that lock is what a
101
+ * React-state channel cannot deliver, because the surface animates on the UI
102
+ * thread and this arrives one to three frames later.
103
+ *
104
+ * ```tsx
105
+ * const collapsed = useBottomEdgeCollapsed();
106
+ * // fade out; do not chase the bar's new top edge
107
+ * ```
108
+ *
109
+ * `false` outside a provider.
110
+ */
111
+ export declare function useBottomEdgeCollapsed(): boolean;
112
+ /**
113
+ * Claim the bottom edge for as long as the caller is mounted.
67
114
  *
68
115
  * The claimant owns its own placement — claiming does not move it. It declares
69
- * the space it occupies so that everything reading `useBottomEdgeInset()` stays
70
- * off it. Pass the FULL footprint (the surface's height plus the gap it holds
71
- * off the window edge), which is the same number the surface positions itself
72
- * with.
116
+ * the space it occupies so that everything reading the edge stays off it. Pass
117
+ * the FULL footprint (the surface's height plus the gap it holds off the window
118
+ * edge), which is the same number the surface positions itself with, and keep it
119
+ * at the surface's FULL size even while collapsed: `reserved` is what must stay
120
+ * permanently free, and the collapse is reported separately by `collapsed`.
73
121
  *
74
122
  * A no-op outside a provider, so a surface stays usable standalone.
75
123
  */
76
- export declare function useClaimBottomEdge(height: number): void;
124
+ export declare function useClaimBottomEdge(reserved: number, collapsed?: boolean): void;
77
125
  //# sourceMappingURL=bottom-edge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bottom-edge.d.ts","sourceRoot":"","sources":["../../../../src/layout/bottom-edge.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,OAAO,EAOL,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AAsDf;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAGjE;yBAHe,kBAAkB;;;AAYlC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAO3C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CASvD"}
1
+ {"version":3,"file":"bottom-edge.d.ts","sourceRoot":"","sources":["../../../../src/layout/bottom-edge.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,OAAO,EAOL,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AAyEf;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAGjE;yBAHe,kBAAkB;;;AAalC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAO3C;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAOhD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAG,IAAI,CAS5E"}
@@ -5,5 +5,5 @@
5
5
  * parked there". A surface that floats at the bottom needs both.
6
6
  */
7
7
  export { EDGE_GAP, windowEdgeGap } from './edge';
8
- export { BottomEdgeProvider, useBottomEdgeInset, useClaimBottomEdge } from './bottom-edge';
8
+ export { BottomEdgeProvider, useBottomEdgeInset, useBottomEdgeCollapsed, useClaimBottomEdge, } from './bottom-edge';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/layout/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/layout/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TabBarBase.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/TabBarBase.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAOL,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AAmBf,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAiBL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAe,MAAM,SAAS,CAAC;AAujB3E;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,aAAa,CAAC,kBAAkB,CAAC,EAC1C,IAAI,EAAE,aAAa,CAAC,oBAAoB,CAAC;YAElB,WAAW;;EAGnC;AAED,+EAA+E;AAC/E,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,CAAC,gBAAgB,CAAC;YAC1C,iBAAiB;;EAG/C"}
1
+ {"version":3,"file":"TabBarBase.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/TabBarBase.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAQL,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AAoBf,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAiBL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAe,MAAM,SAAS,CAAC;AA2kB3E;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,aAAa,CAAC,kBAAkB,CAAC,EAC1C,IAAI,EAAE,aAAa,CAAC,oBAAoB,CAAC;YAElB,WAAW;;EAGnC;AAED,+EAA+E;AAC/E,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,CAAC,gBAAgB,CAAC;YAC1C,iBAAiB;;EAG/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"Fab.d.ts","sourceRoot":"","sources":["../../../../src/fab/Fab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAoBjE,OAAO,KAAK,EAAgB,QAAQ,EAAuB,MAAM,SAAS,CAAC;AAE3E,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AA4Q3E,eAAO,MAAM,GAAG,sCAAqB,CAAC"}
1
+ {"version":3,"file":"Fab.d.ts","sourceRoot":"","sources":["../../../../src/fab/Fab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+D,MAAM,OAAO,CAAC;AAoBpF,OAAO,KAAK,EAAgB,QAAQ,EAAuB,MAAM,SAAS,CAAC;AAE3E,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAiU3E,eAAO,MAAM,GAAG,sCAAqB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Fab.web.d.ts","sourceRoot":"","sources":["../../../../src/fab/Fab.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EAAgB,QAAQ,EAAuB,MAAM,SAAS,CAAC;AAE3E,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAsS3E,eAAO,MAAM,GAAG,sCAAwB,CAAC"}
1
+ {"version":3,"file":"Fab.web.d.ts","sourceRoot":"","sources":["../../../../src/fab/Fab.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EAAgB,QAAQ,EAAuB,MAAM,SAAS,CAAC;AAE3E,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAmU3E,eAAO,MAAM,GAAG,sCAAwB,CAAC"}
@@ -27,6 +27,33 @@
27
27
  * edge, so two surfaces at that edge overlap rather than stack; the tallest is
28
28
  * what a new surface has to clear. Summing would strand it at twice the height.
29
29
  *
30
+ * ## A size and a state, because they travel differently
31
+ *
32
+ * A surface that collapses — the tab bar minimizes 58 -> 44 on scroll — publishes
33
+ * two things, and only one of them is a measurement:
34
+ *
35
+ * - RESERVED (`useBottomEdgeInset`) never shrinks while the claimant is
36
+ * mounted. It is what must be kept permanently free: a list's bottom
37
+ * padding, a toast stack's offset. Shrinking it on collapse would jitter a
38
+ * list's content size on every scroll and jump a toast 14px mid-display,
39
+ * because the bar re-expands the instant the user scrolls back up.
40
+ * - COLLAPSED (`useBottomEdgeCollapsed`) is a boolean, deliberately, and this
41
+ * is the part that was learned the hard way. It first shipped as a live
42
+ * PIXEL height so a FAB could ride down with the bar — and it felt broken on
43
+ * a device. The bar animates on the UI thread; a React consumer learns about
44
+ * the change through `runOnJS` plus two render passes, so its motion STARTS
45
+ * one to three frames late, worst exactly while scrolling because that is
46
+ * when the JS thread is busiest. No spring config fixes a variable start
47
+ * delay.
48
+ *
49
+ * Two things moving together betray that lag; a state change does not. A reader
50
+ * that FADES on this boolean has no spatial relationship to violate, so the same
51
+ * few frames of latency are imperceptible. That is why the channel is a state and
52
+ * not a geometry: it is the shape of signal that survives the trip to the JS
53
+ * thread. Anything that genuinely must track the collapse per-frame has to read
54
+ * the tab bar's own shared value on the UI thread instead — React state is the
55
+ * wrong transport for it, at any width.
56
+ *
30
57
  * ## Why an external store
31
58
  *
32
59
  * The claim set is mutable state living outside React. Reading it in a memoized
@@ -47,13 +74,15 @@ export declare namespace BottomEdgeProvider {
47
74
  var displayName: string;
48
75
  }
49
76
  /**
50
- * How much of the bottom edge is already occupied, in px.
77
+ * How much of the bottom edge is permanently RESERVED, in px.
51
78
  *
52
- * Add it to whatever offset the surface would otherwise use:
79
+ * Never shrinks while its claimant is mounted, so it is the number for anything
80
+ * that must not move as the user scrolls — a list's bottom padding, a toast
81
+ * stack's offset:
53
82
  *
54
83
  * ```tsx
55
- * const occupied = useBottomEdgeInset();
56
- * <View style={{ position: 'absolute', bottom: windowEdgeGap(insets.bottom) + occupied }} />
84
+ * const reserved = useBottomEdgeInset();
85
+ * <FlatList contentContainerStyle={{ paddingBottom: reserved + 12 }} />
57
86
  * ```
58
87
  *
59
88
  * `0` outside a provider, and `0` on the first commit even inside one — a claim
@@ -63,15 +92,34 @@ export declare namespace BottomEdgeProvider {
63
92
  */
64
93
  export declare function useBottomEdgeInset(): number;
65
94
  /**
66
- * Claim `height` px of the bottom edge for as long as the caller is mounted.
95
+ * Whether the surface owning the bottom edge is currently COLLAPSED the tab
96
+ * bar minimized on scroll.
97
+ *
98
+ * A boolean rather than a live height, on purpose: see the note at the top of
99
+ * this file. A reader should FADE or otherwise change state on it, never try to
100
+ * stay geometrically locked to the collapsing surface — that lock is what a
101
+ * React-state channel cannot deliver, because the surface animates on the UI
102
+ * thread and this arrives one to three frames later.
103
+ *
104
+ * ```tsx
105
+ * const collapsed = useBottomEdgeCollapsed();
106
+ * // fade out; do not chase the bar's new top edge
107
+ * ```
108
+ *
109
+ * `false` outside a provider.
110
+ */
111
+ export declare function useBottomEdgeCollapsed(): boolean;
112
+ /**
113
+ * Claim the bottom edge for as long as the caller is mounted.
67
114
  *
68
115
  * The claimant owns its own placement — claiming does not move it. It declares
69
- * the space it occupies so that everything reading `useBottomEdgeInset()` stays
70
- * off it. Pass the FULL footprint (the surface's height plus the gap it holds
71
- * off the window edge), which is the same number the surface positions itself
72
- * with.
116
+ * the space it occupies so that everything reading the edge stays off it. Pass
117
+ * the FULL footprint (the surface's height plus the gap it holds off the window
118
+ * edge), which is the same number the surface positions itself with, and keep it
119
+ * at the surface's FULL size even while collapsed: `reserved` is what must stay
120
+ * permanently free, and the collapse is reported separately by `collapsed`.
73
121
  *
74
122
  * A no-op outside a provider, so a surface stays usable standalone.
75
123
  */
76
- export declare function useClaimBottomEdge(height: number): void;
124
+ export declare function useClaimBottomEdge(reserved: number, collapsed?: boolean): void;
77
125
  //# sourceMappingURL=bottom-edge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bottom-edge.d.ts","sourceRoot":"","sources":["../../../../src/layout/bottom-edge.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,OAAO,EAOL,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AAsDf;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAGjE;yBAHe,kBAAkB;;;AAYlC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAO3C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CASvD"}
1
+ {"version":3,"file":"bottom-edge.d.ts","sourceRoot":"","sources":["../../../../src/layout/bottom-edge.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,OAAO,EAOL,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AAyEf;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAGjE;yBAHe,kBAAkB;;;AAalC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAO3C;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAOhD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAG,IAAI,CAS5E"}
@@ -5,5 +5,5 @@
5
5
  * parked there". A surface that floats at the bottom needs both.
6
6
  */
7
7
  export { EDGE_GAP, windowEdgeGap } from './edge';
8
- export { BottomEdgeProvider, useBottomEdgeInset, useClaimBottomEdge } from './bottom-edge';
8
+ export { BottomEdgeProvider, useBottomEdgeInset, useBottomEdgeCollapsed, useClaimBottomEdge, } from './bottom-edge';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/layout/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/layout/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TabBarBase.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/TabBarBase.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAOL,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AAmBf,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAiBL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAe,MAAM,SAAS,CAAC;AAujB3E;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,aAAa,CAAC,kBAAkB,CAAC,EAC1C,IAAI,EAAE,aAAa,CAAC,oBAAoB,CAAC;YAElB,WAAW;;EAGnC;AAED,+EAA+E;AAC/E,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,CAAC,gBAAgB,CAAC;YAC1C,iBAAiB;;EAG/C"}
1
+ {"version":3,"file":"TabBarBase.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/TabBarBase.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAQL,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AAoBf,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAiBL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAe,MAAM,SAAS,CAAC;AA2kB3E;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,aAAa,CAAC,kBAAkB,CAAC,EAC1C,IAAI,EAAE,aAAa,CAAC,oBAAoB,CAAC;YAElB,WAAW;;EAGnC;AAED,+EAA+E;AAC/E,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,CAAC,gBAAgB,CAAC;YAC1C,iBAAiB;;EAG/C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxyhq/bloom",
3
- "version": "1.10.1",
3
+ "version": "1.12.0",
4
4
  "packageManager": "bun@1.3.14",
5
5
  "description": "Bloom UI — Oxy ecosystem component library for React Native + Expo + Web",
6
6
  "main": "lib/commonjs/index.js",
package/src/fab/Fab.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import React, { memo, useMemo, type ComponentType } from 'react';
1
+ import React, { memo, useEffect, useMemo, useRef, type ComponentType } from 'react';
2
2
  import {
3
3
  Animated,
4
4
  Pressable,
@@ -11,7 +11,7 @@ import {
11
11
  } from 'react-native';
12
12
  import { styled } from 'react-native-css';
13
13
 
14
- import { useBottomEdgeInset } from '../layout/bottom-edge';
14
+ import { useBottomEdgeCollapsed, useBottomEdgeInset } from '../layout/bottom-edge';
15
15
  import { useTheme } from '../theme/use-theme';
16
16
  import { animation, borderRadius } from '../styles/tokens';
17
17
  import { bloomShadowStyle } from '../design-tokens/shadows';
@@ -57,6 +57,23 @@ function resolveSize(size: FabSize | number): ResolvedSize {
57
57
  return SIZE_CONFIG[size];
58
58
  }
59
59
 
60
+ /**
61
+ * How long the FAB takes to leave when the bottom edge collapses.
62
+ *
63
+ * A DURATION, not a spring matched to the tab bar's — because the FAB is not
64
+ * trying to stay level with the bar any more. It tried: an earlier version rode
65
+ * the bar down by the 14px it shrank, and on a device the two visibly did not
66
+ * move together. The bar animates on the UI thread while this component learns
67
+ * about the collapse through `runOnJS` plus two React renders, so it starts one
68
+ * to three frames late — worst exactly while scrolling, which is the only time
69
+ * it happens. No spring config fixes a variable start delay.
70
+ *
71
+ * Fading is what makes that latency invisible: there is no spatial relationship
72
+ * left to violate, so nothing betrays the few frames. Slightly quicker than the
73
+ * bar's 380ms minimize, so the FAB is gone before the eye goes looking for it.
74
+ */
75
+ const COLLAPSE_FADE_MS = 200;
76
+
60
77
  const DEFAULT_OFFSET = 16;
61
78
  const DEFAULT_Z_INDEX = 50;
62
79
  const HIT_SLOP = { top: 8, bottom: 8, left: 8, right: 8 } as const;
@@ -73,6 +90,10 @@ const HIT_SLOP = { top: 8, bottom: 8, left: 8, right: 8 } as const;
73
90
  * lands above a floating tab bar instead of behind it. A z-index cannot fix that
74
91
  * pairing: the bar's host is the last sibling of the app shell and paints over
75
92
  * every descendant, so the FAB has to be somewhere else, not merely on top.
93
+ *
94
+ * It is the RESERVED inset, so this stays a static layout value — it does not
95
+ * shrink when the bar collapses. The FAB fades out instead of chasing the bar
96
+ * down; see `COLLAPSE_FADE_MS` for why chasing it does not work.
76
97
  */
77
98
  function placementStyle(
78
99
  placement: FabPlacement,
@@ -118,10 +139,13 @@ function placementStyle(
118
139
  */
119
140
  type FabPressableProps = Pick<
120
141
  PressableProps,
142
+ | 'accessibilityElementsHidden'
121
143
  | 'accessibilityHint'
122
144
  | 'accessibilityLabel'
123
145
  | 'accessibilityRole'
124
146
  | 'accessibilityState'
147
+ | 'importantForAccessibility'
148
+ | 'pointerEvents'
125
149
  | 'children'
126
150
  | 'className'
127
151
  | 'disabled'
@@ -158,11 +182,35 @@ const FabComponent: React.FC<FabProps> = ({
158
182
  zIndex = DEFAULT_Z_INDEX,
159
183
  }) => {
160
184
  const bottomEdgeInset = useBottomEdgeInset();
185
+ // The FAB belongs to the chrome: when the chrome retracts, so does it.
186
+ const bottomEdgeCollapsed = useBottomEdgeCollapsed();
161
187
  const theme = useTheme();
162
188
  const sizeConfig = useMemo(() => resolveSize(size), [size]);
163
189
  const isExtended = label != null && label.length > 0;
164
190
  const content = icon ?? children;
165
191
 
192
+ // Only a FAB anchored to the BOTTOM edge is affected by the bottom edge
193
+ // collapsing; a top-placed or consumer-placed one is not.
194
+ const hidesOnCollapse = placement === 'bottom-right' || placement === 'bottom-left';
195
+ const hidden = hidesOnCollapse && bottomEdgeCollapsed;
196
+ const fade = useRef(new Animated.Value(1)).current;
197
+
198
+ // An effect because RN's Animated has no declarative form — starting an
199
+ // animation is imperative by construction. `opacity` is native-drivable, so
200
+ // once started this never touches the JS thread again, which matters: it runs
201
+ // while the user is mid-scroll.
202
+ // The disabled dim rides on the SAME value rather than a second static
203
+ // `opacity` in the style array: two opacity entries would mean the later one
204
+ // silently wins, so a disabled FAB would either not dim or not fade.
205
+ const restingOpacity = disabled ? 0.5 : 1;
206
+ useEffect(() => {
207
+ Animated.timing(fade, {
208
+ toValue: hidden ? 0 : restingOpacity,
209
+ duration: COLLAPSE_FADE_MS,
210
+ useNativeDriver: true,
211
+ }).start();
212
+ }, [hidden, restingOpacity, fade]);
213
+
166
214
  const { scaleAnim, onPressIn, onPressOut } = usePressAnimation(
167
215
  disabled ? undefined : animation.pressScale,
168
216
  );
@@ -229,7 +277,7 @@ const FabComponent: React.FC<FabProps> = ({
229
277
  placementStyle(placement, offset, bottomEdgeInset),
230
278
  { zIndex },
231
279
  containerStyle,
232
- disabled && { opacity: 0.5 },
280
+ { opacity: fade },
233
281
  pressed && !disabled && { backgroundColor: pressedBackground },
234
282
  // Before the caller's `style`, so `style` keeps winning the whole array
235
283
  // the way it always has (and the way the web fork spreads it last). The
@@ -239,7 +287,12 @@ const FabComponent: React.FC<FabProps> = ({
239
287
  { transform: [{ scale: scaleAnim }] },
240
288
  style,
241
289
  ]}
242
- onPress={disabled ? undefined : onPress}
290
+ // A FAB that has faded out must not be pressable or reachable — an
291
+ // invisible target that still takes a tap is worse than a visible one.
292
+ pointerEvents={hidden ? 'none' : 'auto'}
293
+ accessibilityElementsHidden={hidden}
294
+ importantForAccessibility={hidden ? 'no-hide-descendants' : 'auto'}
295
+ onPress={disabled || hidden ? undefined : onPress}
243
296
  onPressIn={handlePressIn}
244
297
  onPressOut={handlePressOut}
245
298
  disabled={disabled}
@@ -7,7 +7,7 @@ import React, {
7
7
  type MouseEvent,
8
8
  } from 'react';
9
9
 
10
- import { useBottomEdgeInset } from '../layout/bottom-edge';
10
+ import { useBottomEdgeCollapsed, useBottomEdgeInset } from '../layout/bottom-edge';
11
11
  import { useTheme } from '../theme/use-theme';
12
12
  import { animation, borderRadius } from '../styles/tokens';
13
13
  import { pressedSurface } from '../theme/press-colors';
@@ -83,8 +83,11 @@ const BLOOM_FAB_CSS = interactiveWebCss({
83
83
  box-shadow: var(--bloom-fab-shadow);
84
84
  font-family: inherit;
85
85
  `,
86
+ // `opacity` carries two things: the disabled dim and the collapse fade. 200ms
87
+ // is the collapse's number — the dim is imperceptibly slower for it, and one
88
+ // property cannot hold two durations.
86
89
  transition:
87
- 'opacity 120ms ease, transform 120ms ease, box-shadow 160ms ease, background-color 120ms ease',
90
+ 'opacity 200ms ease, transform 120ms ease, box-shadow 160ms ease, background-color 120ms ease',
88
91
  // A FAB lifts on hover rather than dimming: it floats over the content, so a
89
92
  // deeper shadow is the affordance an opacity dip cannot express.
90
93
  hover: { declarations: 'box-shadow: var(--bloom-fab-shadow-hover);' },
@@ -129,6 +132,16 @@ const BLOOM_FAB_CSS = interactiveWebCss({
129
132
  * behind it. A z-index cannot fix that pairing: the bar's host is the last
130
133
  * sibling of the app shell and paints over every descendant, so the FAB has to be
131
134
  * somewhere else, not merely on top.
135
+ *
136
+ * It is the LIVE inset here, and `bottom` is transitioned — where the native fork
137
+ * follows a collapsing bar with an Animated TRANSFORM instead. The forks differ
138
+ * because the constraint does. Native must stay off the JS thread mid-scroll, so
139
+ * the follow has to be a native-driver transform. On web a transform cannot carry
140
+ * it: `:active` already sets `transform: scale(...)` from the shared
141
+ * `interactive-web-css` rule, and an inline transform would beat that stylesheet
142
+ * rule and eat the press scale — and one property cannot hold the press's 120ms
143
+ * and the collapse's 380ms at once. `bottom` is a separate property with its own
144
+ * duration, and it moves twice per scroll gesture rather than per frame.
132
145
  */
133
146
  function placementStyle(
134
147
  placement: FabPlacement,
@@ -198,6 +211,13 @@ const FabWebComponent: React.FC<FabProps> = ({
198
211
  }) => {
199
212
  useInteractiveWebCss(STYLE_ID, BLOOM_FAB_CSS);
200
213
  const bottomEdgeInset = useBottomEdgeInset();
214
+ // The FAB belongs to the chrome: when the chrome retracts, so does it. Only a
215
+ // BOTTOM-anchored FAB is affected by the bottom edge collapsing.
216
+ const bottomEdgeCollapsed = useBottomEdgeCollapsed();
217
+ // A faded-out FAB must not be tabbable, clickable or announced — an invisible
218
+ // target that still takes a click is worse than a visible one.
219
+ const hidden =
220
+ bottomEdgeCollapsed && (placement === 'bottom-right' || placement === 'bottom-left');
201
221
  const theme = useTheme();
202
222
  const reactId = useId();
203
223
  const resolvedId = id ?? `bloom-fab-${reactId}`;
@@ -234,6 +254,13 @@ const FabWebComponent: React.FC<FabProps> = ({
234
254
  ['--bloom-fab-press-scale' as string]: animation.pressScale,
235
255
  ...placementStyle(placement, offset, bottomEdgeInset),
236
256
  };
257
+ // Only while HIDDEN, so the `:disabled { opacity }` rule still owns the
258
+ // dim the rest of the time — an inline opacity would beat that stylesheet
259
+ // rule unconditionally and a disabled FAB would stop dimming.
260
+ if (hidden) {
261
+ base.opacity = 0;
262
+ base.pointerEvents = 'none';
263
+ }
237
264
  if (isExtended) {
238
265
  const pad = sizeConfig.diameter <= 44 ? 14 : 20;
239
266
  base.paddingLeft = pad;
@@ -287,6 +314,8 @@ const FabWebComponent: React.FC<FabProps> = ({
287
314
  onClick={handleClick}
288
315
  disabled={disabled}
289
316
  aria-disabled={disabled || undefined}
317
+ aria-hidden={hidden || undefined}
318
+ tabIndex={hidden ? -1 : undefined}
290
319
  aria-label={ariaLabel}
291
320
  title={title ?? accessibilityHint}
292
321
  data-testid={testID}