@oxyhq/bloom 1.11.0 → 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.
- package/docs/layout.mdx +27 -22
- package/lib/commonjs/fab/Fab.js +46 -37
- package/lib/commonjs/fab/Fab.js.map +1 -1
- package/lib/commonjs/fab/Fab.web.js +21 -8
- package/lib/commonjs/fab/Fab.web.js.map +1 -1
- package/lib/commonjs/layout/bottom-edge.js +63 -44
- package/lib/commonjs/layout/bottom-edge.js.map +1 -1
- package/lib/commonjs/layout/index.js +4 -4
- package/lib/commonjs/tab-bar/TabBarBase.js +6 -6
- package/lib/commonjs/tab-bar/TabBarBase.js.map +1 -1
- package/lib/module/fab/Fab.js +47 -38
- package/lib/module/fab/Fab.js.map +1 -1
- package/lib/module/fab/Fab.web.js +22 -9
- package/lib/module/fab/Fab.web.js.map +1 -1
- package/lib/module/layout/bottom-edge.js +62 -43
- package/lib/module/layout/bottom-edge.js.map +1 -1
- package/lib/module/layout/index.js +1 -1
- package/lib/module/layout/index.js.map +1 -1
- package/lib/module/tab-bar/TabBarBase.js +6 -6
- package/lib/module/tab-bar/TabBarBase.js.map +1 -1
- package/lib/typescript/commonjs/fab/Fab.d.ts.map +1 -1
- package/lib/typescript/commonjs/fab/Fab.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/layout/bottom-edge.d.ts +42 -28
- package/lib/typescript/commonjs/layout/bottom-edge.d.ts.map +1 -1
- package/lib/typescript/commonjs/layout/index.d.ts +1 -1
- package/lib/typescript/commonjs/tab-bar/TabBarBase.d.ts.map +1 -1
- package/lib/typescript/module/fab/Fab.d.ts.map +1 -1
- package/lib/typescript/module/fab/Fab.web.d.ts.map +1 -1
- package/lib/typescript/module/layout/bottom-edge.d.ts +42 -28
- package/lib/typescript/module/layout/bottom-edge.d.ts.map +1 -1
- package/lib/typescript/module/layout/index.d.ts +1 -1
- package/lib/typescript/module/tab-bar/TabBarBase.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/fab/Fab.tsx +47 -32
- package/src/fab/Fab.web.tsx +23 -9
- package/src/layout/bottom-edge.tsx +67 -48
- package/src/layout/index.ts +1 -1
- package/src/tab-bar/TabBarBase.tsx +6 -9
package/docs/layout.mdx
CHANGED
|
@@ -56,33 +56,40 @@ const occupied = useBottomEdgeInset();
|
|
|
56
56
|
Neither imports the other, so any combination composes: a tab bar with no FAB, a
|
|
57
57
|
FAB with no tab bar, both, or a surface written later.
|
|
58
58
|
|
|
59
|
-
###
|
|
59
|
+
### A size and a state, because they travel differently
|
|
60
60
|
|
|
61
61
|
A surface that **collapses** — the tab bar minimizes 58 → 44 on scroll —
|
|
62
|
-
|
|
62
|
+
publishes two things, and only one of them is a measurement.
|
|
63
63
|
|
|
64
64
|
| hook | answers | who reads it |
|
|
65
65
|
| --- | --- | --- |
|
|
66
|
-
| `useBottomEdgeInset()` | what is permanently **reserved** | a list's `paddingBottom`, a toast stack |
|
|
67
|
-
| `
|
|
66
|
+
| `useBottomEdgeInset()` | what is permanently **reserved** | a list's `paddingBottom`, a toast stack, a FAB's anchor |
|
|
67
|
+
| `useBottomEdgeCollapsed()` | has the surface **retracted** | a FAB, which fades out |
|
|
68
68
|
|
|
69
69
|
```tsx
|
|
70
|
-
// A claimant that collapses
|
|
71
|
-
|
|
70
|
+
// A claimant that collapses keeps `reserved` at its FULL size and reports the
|
|
71
|
+
// collapse separately.
|
|
72
|
+
useClaimBottomEdge(gap + EXPANDED_HEIGHT, isMinimized);
|
|
72
73
|
```
|
|
73
74
|
|
|
74
75
|
Reserved never shrinks while its claimant is mounted, because the bar re-expands
|
|
75
|
-
the instant the user scrolls back up:
|
|
76
|
-
|
|
77
|
-
follows it, so a FAB rides down with the bar instead of leaving a hole.
|
|
76
|
+
the instant the user scrolls back up: shrinking it would resize a list's content
|
|
77
|
+
on every scroll and jump a toast 14px mid-display.
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
<Admonition kind="warning">
|
|
80
|
+
**The collapse is a boolean, and that is the hard-won part.** It first shipped as
|
|
81
|
+
a live pixel height so a FAB could ride down with the bar — and it felt broken on
|
|
82
|
+
a device. The bar animates on the UI thread; a React consumer hears about the
|
|
83
|
+
change through `runOnJS` plus two render passes, so its motion **starts one to
|
|
84
|
+
three frames late**, worst exactly while scrolling because that is when the JS
|
|
85
|
+
thread is busiest. No spring config fixes a variable start delay.
|
|
86
|
+
|
|
87
|
+
Two things moving together betray that lag. A state change does not: a reader
|
|
88
|
+
that **fades** has no spatial relationship left to violate, so the same latency
|
|
89
|
+
is imperceptible. Anything that genuinely must track the collapse per-frame has
|
|
90
|
+
to read the tab bar's own shared value on the UI thread — React state is the
|
|
91
|
+
wrong transport for it at any width.
|
|
92
|
+
</Admonition>
|
|
86
93
|
|
|
87
94
|
## Things that are easy to get wrong
|
|
88
95
|
|
|
@@ -103,9 +110,7 @@ so a reader mounted in the same commit as its claimant reads `0` on the first
|
|
|
103
110
|
commit. These are layout offsets rather than measurements, so nothing here waits
|
|
104
111
|
on a real layout pass.
|
|
105
112
|
|
|
106
|
-
**
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
first frame. Bloom's `Fab` does the former — a native-driver `translateY` on
|
|
111
|
-
native, a `bottom` transition on web.
|
|
113
|
+
**A faded surface must also stop taking input.** Bloom's `Fab` sets
|
|
114
|
+
`pointerEvents: 'none'`, drops its `onPress` and hides itself from the
|
|
115
|
+
accessibility tree when it fades — an invisible target that still takes a tap is
|
|
116
|
+
worse than a visible one.
|
package/lib/commonjs/fab/Fab.js
CHANGED
|
@@ -57,18 +57,21 @@ function resolveSize(size) {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
60
|
+
* How long the FAB takes to leave when the bottom edge collapses.
|
|
61
|
+
*
|
|
62
|
+
* A DURATION, not a spring matched to the tab bar's — because the FAB is not
|
|
63
|
+
* trying to stay level with the bar any more. It tried: an earlier version rode
|
|
64
|
+
* the bar down by the 14px it shrank, and on a device the two visibly did not
|
|
65
|
+
* move together. The bar animates on the UI thread while this component learns
|
|
66
|
+
* about the collapse through `runOnJS` plus two React renders, so it starts one
|
|
67
|
+
* to three frames late — worst exactly while scrolling, which is the only time
|
|
68
|
+
* it happens. No spring config fixes a variable start delay.
|
|
69
|
+
*
|
|
70
|
+
* Fading is what makes that latency invisible: there is no spatial relationship
|
|
71
|
+
* left to violate, so nothing betrays the few frames. Slightly quicker than the
|
|
72
|
+
* bar's 380ms minimize, so the FAB is gone before the eye goes looking for it.
|
|
66
73
|
*/
|
|
67
|
-
const
|
|
68
|
-
stiffness: 120,
|
|
69
|
-
damping: 22,
|
|
70
|
-
mass: 1
|
|
71
|
-
};
|
|
74
|
+
const COLLAPSE_FADE_MS = 200;
|
|
72
75
|
const DEFAULT_OFFSET = 16;
|
|
73
76
|
const DEFAULT_Z_INDEX = 50;
|
|
74
77
|
const HIT_SLOP = {
|
|
@@ -91,9 +94,9 @@ const HIT_SLOP = {
|
|
|
91
94
|
* pairing: the bar's host is the last sibling of the app shell and paints over
|
|
92
95
|
* every descendant, so the FAB has to be somewhere else, not merely on top.
|
|
93
96
|
*
|
|
94
|
-
* It is the RESERVED inset, so this stays a static layout value
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
+
* It is the RESERVED inset, so this stays a static layout value — it does not
|
|
98
|
+
* shrink when the bar collapses. The FAB fades out instead of chasing the bar
|
|
99
|
+
* down; see `COLLAPSE_FADE_MS` for why chasing it does not work.
|
|
97
100
|
*/
|
|
98
101
|
function placementStyle(placement, offset, bottomEdgeInset) {
|
|
99
102
|
if (placement === 'static') return {};
|
|
@@ -160,32 +163,34 @@ const FabComponent = ({
|
|
|
160
163
|
zIndex = DEFAULT_Z_INDEX
|
|
161
164
|
}) => {
|
|
162
165
|
const bottomEdgeInset = (0, _bottomEdge.useBottomEdgeInset)();
|
|
163
|
-
|
|
166
|
+
// The FAB belongs to the chrome: when the chrome retracts, so does it.
|
|
167
|
+
const bottomEdgeCollapsed = (0, _bottomEdge.useBottomEdgeCollapsed)();
|
|
164
168
|
const theme = (0, _useTheme.useTheme)();
|
|
165
169
|
const sizeConfig = (0, _react.useMemo)(() => resolveSize(size), [size]);
|
|
166
170
|
const isExtended = label != null && label.length > 0;
|
|
167
171
|
const content = icon ?? children;
|
|
168
172
|
|
|
169
|
-
//
|
|
170
|
-
//
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
// collapse moves it.
|
|
175
|
-
const collapse = placement === 'bottom-right' || placement === 'bottom-left' ? bottomEdgeInset - bottomEdgeLive : 0;
|
|
176
|
-
const collapseAnim = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
|
|
173
|
+
// Only a FAB anchored to the BOTTOM edge is affected by the bottom edge
|
|
174
|
+
// collapsing; a top-placed or consumer-placed one is not.
|
|
175
|
+
const hidesOnCollapse = placement === 'bottom-right' || placement === 'bottom-left';
|
|
176
|
+
const hidden = hidesOnCollapse && bottomEdgeCollapsed;
|
|
177
|
+
const fade = (0, _react.useRef)(new _reactNative.Animated.Value(1)).current;
|
|
177
178
|
|
|
178
179
|
// An effect because RN's Animated has no declarative form — starting an
|
|
179
|
-
// animation is imperative by construction. `
|
|
180
|
-
//
|
|
181
|
-
//
|
|
180
|
+
// animation is imperative by construction. `opacity` is native-drivable, so
|
|
181
|
+
// once started this never touches the JS thread again, which matters: it runs
|
|
182
|
+
// while the user is mid-scroll.
|
|
183
|
+
// The disabled dim rides on the SAME value rather than a second static
|
|
184
|
+
// `opacity` in the style array: two opacity entries would mean the later one
|
|
185
|
+
// silently wins, so a disabled FAB would either not dim or not fade.
|
|
186
|
+
const restingOpacity = disabled ? 0.5 : 1;
|
|
182
187
|
(0, _react.useEffect)(() => {
|
|
183
|
-
_reactNative.Animated.
|
|
184
|
-
toValue:
|
|
185
|
-
|
|
186
|
-
|
|
188
|
+
_reactNative.Animated.timing(fade, {
|
|
189
|
+
toValue: hidden ? 0 : restingOpacity,
|
|
190
|
+
duration: COLLAPSE_FADE_MS,
|
|
191
|
+
useNativeDriver: true
|
|
187
192
|
}).start();
|
|
188
|
-
}, [
|
|
193
|
+
}, [hidden, restingOpacity, fade]);
|
|
189
194
|
const {
|
|
190
195
|
scaleAnim,
|
|
191
196
|
onPressIn,
|
|
@@ -242,8 +247,8 @@ const FabComponent = ({
|
|
|
242
247
|
className: className,
|
|
243
248
|
style: [placementStyle(placement, offset, bottomEdgeInset), {
|
|
244
249
|
zIndex
|
|
245
|
-
}, containerStyle,
|
|
246
|
-
opacity:
|
|
250
|
+
}, containerStyle, {
|
|
251
|
+
opacity: fade
|
|
247
252
|
}, pressed && !disabled && {
|
|
248
253
|
backgroundColor: pressedBackground
|
|
249
254
|
},
|
|
@@ -254,12 +259,16 @@ const FabComponent = ({
|
|
|
254
259
|
// wrapper node the two multiplied.
|
|
255
260
|
{
|
|
256
261
|
transform: [{
|
|
257
|
-
translateY: collapseAnim
|
|
258
|
-
}, {
|
|
259
262
|
scale: scaleAnim
|
|
260
263
|
}]
|
|
261
|
-
}, style]
|
|
262
|
-
|
|
264
|
+
}, style]
|
|
265
|
+
// A FAB that has faded out must not be pressable or reachable — an
|
|
266
|
+
// invisible target that still takes a tap is worse than a visible one.
|
|
267
|
+
,
|
|
268
|
+
pointerEvents: hidden ? 'none' : 'auto',
|
|
269
|
+
accessibilityElementsHidden: hidden,
|
|
270
|
+
importantForAccessibility: hidden ? 'no-hide-descendants' : 'auto',
|
|
271
|
+
onPress: disabled || hidden ? undefined : onPress,
|
|
263
272
|
onPressIn: handlePressIn,
|
|
264
273
|
onPressOut: handlePressOut,
|
|
265
274
|
disabled: disabled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeCss","_bottomEdge","_useTheme","_tokens","_shadows","_pressColors","_usePressAnimation","_useInteractionState","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","SIZE_CONFIG","small","diameter","iconBox","fontSize","medium","large","MIN_NUMERIC_ICON_BOX","resolveSize","size","Math","max","round","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeCss","_bottomEdge","_useTheme","_tokens","_shadows","_pressColors","_usePressAnimation","_useInteractionState","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","SIZE_CONFIG","small","diameter","iconBox","fontSize","medium","large","MIN_NUMERIC_ICON_BOX","resolveSize","size","Math","max","round","COLLAPSE_FADE_MS","DEFAULT_OFFSET","DEFAULT_Z_INDEX","HIT_SLOP","top","bottom","left","right","placementStyle","placement","offset","bottomEdgeInset","style","position","FabPressable","Pressable","StyledPressable","styled","className","AnimatedPressable","Animated","createAnimatedComponent","FabComponent","onPress","icon","children","label","variant","disabled","accessibilityLabel","accessibilityHint","labelStyle","testID","zIndex","useBottomEdgeInset","bottomEdgeCollapsed","useBottomEdgeCollapsed","theme","useTheme","sizeConfig","useMemo","isExtended","length","content","hidesOnCollapse","hidden","fade","useRef","Value","current","restingOpacity","useEffect","timing","toValue","duration","useNativeDriver","start","scaleAnim","onPressIn","onPressOut","usePressAnimation","undefined","animation","pressScale","state","pressed","onIn","onPressedIn","onOut","onPressedOut","useInteractionState","resolvedColors","resolveVariant","colors","pressedBackground","pressedSurface","background","foreground","containerStyle","base","alignItems","justifyContent","flexDirection","backgroundColor","borderRadius","full","height","bloomShadowStyle","paddingHorizontal","gap","width","shadow","labelTextStyle","fontWeight","color","handlePressIn","handlePressOut","jsxs","opacity","transform","scale","pointerEvents","accessibilityElementsHidden","importantForAccessibility","hitSlop","accessibilityRole","accessibilityState","jsx","View","Text","numberOfLines","secondary","secondaryForeground","tertiary","tertiaryForeground","card","text","primary","primaryForeground","Fab","exports","memo","displayName"],"sourceRoot":"../../../src","sources":["fab/Fab.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAUA,IAAAE,eAAA,GAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,kBAAA,GAAAR,OAAA;AACA,IAAAS,oBAAA,GAAAT,OAAA;AAAqE,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAD,wBAAAY,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAd,uBAAA,YAAAA,CAAAY,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,w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AEpC,UAAU,EAAEJ,MAAM,CAACyC;MAAmB,CAAC;IAC/E,KAAK,SAAS;MACZ,OAAO;QAAEtC,UAAU,EAAEH,MAAM,CAAC0C,IAAI;QAAEtC,UAAU,EAAEJ,MAAM,CAAC2C;MAAK,CAAC;IAC7D,KAAK,SAAS;IACd;MACE,OAAO;QAAExC,UAAU,EAAEH,MAAM,CAAC4C,OAAO;QAAExC,UAAU,EAAEJ,MAAM,CAAC6C;MAAkB,CAAC;EAC/E;AACF;AAEO,MAAMC,GAAG,GAAAC,OAAA,CAAAD,GAAA,gBAAG,IAAAE,WAAI,EAACnG,YAAY,CAAC;AACrCiG,GAAG,CAACG,WAAW,GAAG,KAAK","ignoreList":[]}
|
|
@@ -81,10 +81,10 @@ const BLOOM_FAB_CSS = (0, _interactiveWebCss.interactiveWebCss)({
|
|
|
81
81
|
box-shadow: var(--bloom-fab-shadow);
|
|
82
82
|
font-family: inherit;
|
|
83
83
|
`,
|
|
84
|
-
// `
|
|
85
|
-
// the
|
|
86
|
-
//
|
|
87
|
-
transition: 'opacity
|
|
84
|
+
// `opacity` carries two things: the disabled dim and the collapse fade. 200ms
|
|
85
|
+
// is the collapse's number — the dim is imperceptibly slower for it, and one
|
|
86
|
+
// property cannot hold two durations.
|
|
87
|
+
transition: 'opacity 200ms ease, transform 120ms ease, box-shadow 160ms ease, background-color 120ms ease',
|
|
88
88
|
// A FAB lifts on hover rather than dimming: it floats over the content, so a
|
|
89
89
|
// deeper shadow is the affordance an opacity dip cannot express.
|
|
90
90
|
hover: {
|
|
@@ -218,9 +218,13 @@ const FabWebComponent = ({
|
|
|
218
218
|
type = 'button'
|
|
219
219
|
}) => {
|
|
220
220
|
(0, _interactiveWebCss.useInteractiveWebCss)(STYLE_ID, BLOOM_FAB_CSS);
|
|
221
|
-
|
|
222
|
-
//
|
|
223
|
-
|
|
221
|
+
const bottomEdgeInset = (0, _bottomEdge.useBottomEdgeInset)();
|
|
222
|
+
// The FAB belongs to the chrome: when the chrome retracts, so does it. Only a
|
|
223
|
+
// BOTTOM-anchored FAB is affected by the bottom edge collapsing.
|
|
224
|
+
const bottomEdgeCollapsed = (0, _bottomEdge.useBottomEdgeCollapsed)();
|
|
225
|
+
// A faded-out FAB must not be tabbable, clickable or announced — an invisible
|
|
226
|
+
// target that still takes a click is worse than a visible one.
|
|
227
|
+
const hidden = bottomEdgeCollapsed && (placement === 'bottom-right' || placement === 'bottom-left');
|
|
224
228
|
const theme = (0, _useTheme.useTheme)();
|
|
225
229
|
const reactId = (0, _react.useId)();
|
|
226
230
|
const resolvedId = id ?? `bloom-fab-${reactId}`;
|
|
@@ -249,8 +253,15 @@ const FabWebComponent = ({
|
|
|
249
253
|
// fill, so the two forks land on the identical colour.
|
|
250
254
|
['--bloom-fab-press-bg']: (0, _pressColors.pressedSurface)(theme.colors, variantColors.background, variantColors.foreground),
|
|
251
255
|
['--bloom-fab-press-scale']: _tokens.animation.pressScale,
|
|
252
|
-
...placementStyle(placement, offset,
|
|
256
|
+
...placementStyle(placement, offset, bottomEdgeInset)
|
|
253
257
|
};
|
|
258
|
+
// Only while HIDDEN, so the `:disabled { opacity }` rule still owns the
|
|
259
|
+
// dim the rest of the time — an inline opacity would beat that stylesheet
|
|
260
|
+
// rule unconditionally and a disabled FAB would stop dimming.
|
|
261
|
+
if (hidden) {
|
|
262
|
+
base.opacity = 0;
|
|
263
|
+
base.pointerEvents = 'none';
|
|
264
|
+
}
|
|
254
265
|
if (isExtended) {
|
|
255
266
|
const pad = sizeConfig.diameter <= 44 ? 14 : 20;
|
|
256
267
|
base.paddingLeft = pad;
|
|
@@ -289,6 +300,8 @@ const FabWebComponent = ({
|
|
|
289
300
|
onClick: handleClick,
|
|
290
301
|
disabled: disabled,
|
|
291
302
|
"aria-disabled": disabled || undefined,
|
|
303
|
+
"aria-hidden": hidden || undefined,
|
|
304
|
+
tabIndex: hidden ? -1 : undefined,
|
|
292
305
|
"aria-label": ariaLabel,
|
|
293
306
|
title: title ?? accessibilityHint,
|
|
294
307
|
"data-testid": testID,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_bottomEdge","_useTheme","_tokens","_pressColors","_interactiveWebCss","_flattenWebStyle","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","SIZE_CONFIG","small","diameter","iconBox","fontSize","medium","large","MIN_NUMERIC_ICON_BOX","resolveSize","size","Math","max","round","DEFAULT_OFFSET","DEFAULT_Z_INDEX","STYLE_ID","BLOOM_FAB_CSS","interactiveWebCss","selector","varPrefix","base","transition","hover","declarations","pressDeclarations","outlineOffset","placementStyle","placement","offset","bottomEdgeInset","style","position","isBottom","bottom","marginTop","top","alignSelf","marginRight","marginLeft","resolveVariant","variant","c","background","secondary","foreground","secondaryForeground","ring","tertiary","tertiaryForeground","card","text","primary","primaryForeground","FabWebComponent","onPress","onClick","icon","children","label","disabled","accessibilityLabel","ariaLabelProp","accessibilityHint","labelStyle","className","testID","zIndex","id","title","type","useInteractiveWebCss","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_bottomEdge","_useTheme","_tokens","_pressColors","_interactiveWebCss","_flattenWebStyle","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","SIZE_CONFIG","small","diameter","iconBox","fontSize","medium","large","MIN_NUMERIC_ICON_BOX","resolveSize","size","Math","max","round","DEFAULT_OFFSET","DEFAULT_Z_INDEX","STYLE_ID","BLOOM_FAB_CSS","interactiveWebCss","selector","varPrefix","base","transition","hover","declarations","pressDeclarations","outlineOffset","placementStyle","placement","offset","bottomEdgeInset","style","position","isBottom","bottom","marginTop","top","alignSelf","marginRight","marginLeft","resolveVariant","variant","c","background","secondary","foreground","secondaryForeground","ring","tertiary","tertiaryForeground","card","text","primary","primaryForeground","FabWebComponent","onPress","onClick","icon","children","label","disabled","accessibilityLabel","ariaLabelProp","accessibilityHint","labelStyle","className","testID","zIndex","id","title","type","useInteractiveWebCss","useBottomEdgeInset","bottomEdgeCollapsed","useBottomEdgeCollapsed","hidden","theme","useTheme","reactId","useId","resolvedId","sizeConfig","useMemo","isExtended","length","content","variantColors","colors","restShadow","shadow","hoverShadow","containerStyle","color","borderRadius","full","height","fontWeight","pressedSurface","animation","pressScale","opacity","pointerEvents","pad","paddingLeft","paddingRight","width","handleClick","useCallback","event","preventDefault","ariaLabel","composedClassName","concat","join","resolvedStyle","flattenWebStyle","resolvedLabelStyle","jsxs","undefined","tabIndex","jsx","display","alignItems","justifyContent","Fab","exports","memo","displayName"],"sourceRoot":"../../../src","sources":["fab/Fab.web.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AASA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAEA,IAAAK,kBAAA,GAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AAA8D,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAD,wBAAAS,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,CAAAS,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAA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GAAGmC,SAAU;MAC7CvF,KAAK,EAAE;QACL0F,OAAO,EAAE,aAAa;QACtBC,UAAU,EAAE,QAAQ;QACpBC,cAAc,EAAE,QAAQ;QACxBlB,KAAK,EAAExB,UAAU,CAAC7E,OAAO;QACzB2F,MAAM,EAAEd,UAAU,CAAC7E;MACrB,CAAE;MAAAsD,QAAA,EAED2B;IAAO,CACJ,CACP,EACAF,UAAU,iBAAI,IAAAtG,WAAA,CAAA2I,GAAA;MAAMzF,KAAK,EAAEqF,kBAAmB;MAAA1D,QAAA,EAAEC;IAAK,CAAO,CAAC;EAAA,CACxD,CAAC;AAEb,CAAC;AAEM,MAAMiE,GAAG,GAAAC,OAAA,CAAAD,GAAA,gBAAG,IAAAE,WAAI,EAACxE,eAAe,CAAC;AACxCsE,GAAG,CAACG,WAAW,GAAG,KAAK","ignoreList":[]}
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.BottomEdgeProvider = BottomEdgeProvider;
|
|
7
|
+
exports.useBottomEdgeCollapsed = useBottomEdgeCollapsed;
|
|
7
8
|
exports.useBottomEdgeInset = useBottomEdgeInset;
|
|
8
|
-
exports.useBottomEdgeLiveInset = useBottomEdgeLiveInset;
|
|
9
9
|
exports.useClaimBottomEdge = useClaimBottomEdge;
|
|
10
10
|
var _react = require("react");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -38,20 +38,32 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
38
38
|
* edge, so two surfaces at that edge overlap rather than stack; the tallest is
|
|
39
39
|
* what a new surface has to clear. Summing would strand it at twice the height.
|
|
40
40
|
*
|
|
41
|
-
* ##
|
|
41
|
+
* ## A size and a state, because they travel differently
|
|
42
42
|
*
|
|
43
|
-
* A surface that collapses — the tab bar minimizes 58 -> 44 on scroll —
|
|
44
|
-
*
|
|
43
|
+
* A surface that collapses — the tab bar minimizes 58 -> 44 on scroll — publishes
|
|
44
|
+
* two things, and only one of them is a measurement:
|
|
45
45
|
*
|
|
46
46
|
* - RESERVED (`useBottomEdgeInset`) never shrinks while the claimant is
|
|
47
47
|
* mounted. It is what must be kept permanently free: a list's bottom
|
|
48
|
-
* padding, a toast stack's offset.
|
|
49
|
-
* list's content size on every scroll and jump a toast 14px mid-display
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
48
|
+
* padding, a toast stack's offset. Shrinking it on collapse would jitter a
|
|
49
|
+
* list's content size on every scroll and jump a toast 14px mid-display,
|
|
50
|
+
* because the bar re-expands the instant the user scrolls back up.
|
|
51
|
+
* - COLLAPSED (`useBottomEdgeCollapsed`) is a boolean, deliberately, and this
|
|
52
|
+
* is the part that was learned the hard way. It first shipped as a live
|
|
53
|
+
* PIXEL height so a FAB could ride down with the bar — and it felt broken on
|
|
54
|
+
* a device. The bar animates on the UI thread; a React consumer learns about
|
|
55
|
+
* the change through `runOnJS` plus two render passes, so its motion STARTS
|
|
56
|
+
* one to three frames late, worst exactly while scrolling because that is
|
|
57
|
+
* when the JS thread is busiest. No spring config fixes a variable start
|
|
58
|
+
* delay.
|
|
59
|
+
*
|
|
60
|
+
* Two things moving together betray that lag; a state change does not. A reader
|
|
61
|
+
* that FADES on this boolean has no spatial relationship to violate, so the same
|
|
62
|
+
* few frames of latency are imperceptible. That is why the channel is a state and
|
|
63
|
+
* not a geometry: it is the shape of signal that survives the trip to the JS
|
|
64
|
+
* thread. Anything that genuinely must track the collapse per-frame has to read
|
|
65
|
+
* the tab bar's own shared value on the UI thread instead — React state is the
|
|
66
|
+
* wrong transport for it, at any width.
|
|
55
67
|
*
|
|
56
68
|
* ## Why an external store
|
|
57
69
|
*
|
|
@@ -66,20 +78,24 @@ function createBottomEdgeStore() {
|
|
|
66
78
|
const claims = new Map();
|
|
67
79
|
const listeners = new Set();
|
|
68
80
|
let reserved = 0;
|
|
69
|
-
let
|
|
81
|
+
let collapsed = false;
|
|
70
82
|
const recompute = () => {
|
|
71
83
|
let nextReserved = 0;
|
|
72
|
-
|
|
84
|
+
// ANY claimant collapsing collapses the edge. With the one floating bar this
|
|
85
|
+
// is written for the two readings coincide; where they would not, "something
|
|
86
|
+
// at this edge just retracted" is still the signal a reader wants, and it is
|
|
87
|
+
// the safe direction — a FAB that fades when it did not strictly have to
|
|
88
|
+
// beats one that stays put over a bar that left.
|
|
89
|
+
let nextCollapsed = false;
|
|
73
90
|
for (const claim of claims.values()) {
|
|
74
91
|
if (claim.reserved > nextReserved) nextReserved = claim.reserved;
|
|
75
|
-
if (claim.
|
|
92
|
+
if (claim.collapsed) nextCollapsed = true;
|
|
76
93
|
}
|
|
77
|
-
// Bail before notifying: a re-registration at unchanged
|
|
78
|
-
// render of a claimant
|
|
79
|
-
|
|
80
|
-
if (nextReserved === reserved && nextLive === live) return;
|
|
94
|
+
// Bail before notifying: a re-registration at an unchanged footprint (every
|
|
95
|
+
// render of a claimant that did not move) must not re-render every reader.
|
|
96
|
+
if (nextReserved === reserved && nextCollapsed === collapsed) return;
|
|
81
97
|
reserved = nextReserved;
|
|
82
|
-
|
|
98
|
+
collapsed = nextCollapsed;
|
|
83
99
|
for (const listener of listeners) listener();
|
|
84
100
|
};
|
|
85
101
|
return {
|
|
@@ -90,13 +106,13 @@ function createBottomEdgeStore() {
|
|
|
90
106
|
};
|
|
91
107
|
},
|
|
92
108
|
getReserved: () => reserved,
|
|
93
|
-
|
|
94
|
-
claim(id, nextReserved,
|
|
109
|
+
getCollapsed: () => collapsed,
|
|
110
|
+
claim(id, nextReserved, nextCollapsed) {
|
|
95
111
|
const existing = claims.get(id);
|
|
96
|
-
if (existing?.reserved === nextReserved && existing.
|
|
112
|
+
if (existing?.reserved === nextReserved && existing.collapsed === nextCollapsed) return;
|
|
97
113
|
claims.set(id, {
|
|
98
114
|
reserved: nextReserved,
|
|
99
|
-
|
|
115
|
+
collapsed: nextCollapsed
|
|
100
116
|
});
|
|
101
117
|
recompute();
|
|
102
118
|
},
|
|
@@ -129,6 +145,7 @@ BottomEdgeProvider.displayName = 'BottomEdgeProvider';
|
|
|
129
145
|
// would resubscribe `useSyncExternalStore` on every render.
|
|
130
146
|
const NO_SUBSCRIPTION = () => () => {};
|
|
131
147
|
const NO_INSET = () => 0;
|
|
148
|
+
const NO_COLLAPSE = () => false;
|
|
132
149
|
|
|
133
150
|
/**
|
|
134
151
|
* How much of the bottom edge is permanently RESERVED, in px.
|
|
@@ -153,20 +170,25 @@ function useBottomEdgeInset() {
|
|
|
153
170
|
}
|
|
154
171
|
|
|
155
172
|
/**
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
173
|
+
* Whether the surface owning the bottom edge is currently COLLAPSED — the tab
|
|
174
|
+
* bar minimized on scroll.
|
|
175
|
+
*
|
|
176
|
+
* A boolean rather than a live height, on purpose: see the note at the top of
|
|
177
|
+
* this file. A reader should FADE or otherwise change state on it, never try to
|
|
178
|
+
* stay geometrically locked to the collapsing surface — that lock is what a
|
|
179
|
+
* React-state channel cannot deliver, because the surface animates on the UI
|
|
180
|
+
* thread and this arrives one to three frames later.
|
|
181
|
+
*
|
|
182
|
+
* ```tsx
|
|
183
|
+
* const collapsed = useBottomEdgeCollapsed();
|
|
184
|
+
* // fade out; do not chase the bar's new top edge
|
|
185
|
+
* ```
|
|
186
|
+
*
|
|
187
|
+
* `false` outside a provider.
|
|
166
188
|
*/
|
|
167
|
-
function
|
|
189
|
+
function useBottomEdgeCollapsed() {
|
|
168
190
|
const store = (0, _react.useContext)(BottomEdgeContext);
|
|
169
|
-
return (0, _react.useSyncExternalStore)(store?.subscribe ?? NO_SUBSCRIPTION, store?.
|
|
191
|
+
return (0, _react.useSyncExternalStore)(store?.subscribe ?? NO_SUBSCRIPTION, store?.getCollapsed ?? NO_COLLAPSE, store?.getCollapsed ?? NO_COLLAPSE);
|
|
170
192
|
}
|
|
171
193
|
|
|
172
194
|
/**
|
|
@@ -175,22 +197,19 @@ function useBottomEdgeLiveInset() {
|
|
|
175
197
|
* The claimant owns its own placement — claiming does not move it. It declares
|
|
176
198
|
* the space it occupies so that everything reading the edge stays off it. Pass
|
|
177
199
|
* the FULL footprint (the surface's height plus the gap it holds off the window
|
|
178
|
-
* edge), which is the same number the surface positions itself with
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
* which is correct for anything that does not collapse. A surface that shrinks
|
|
182
|
-
* on scroll passes its live footprint as `current` and keeps `reserved` at its
|
|
183
|
-
* full size — see the two channels above for why both are needed.
|
|
200
|
+
* edge), which is the same number the surface positions itself with, and keep it
|
|
201
|
+
* at the surface's FULL size even while collapsed: `reserved` is what must stay
|
|
202
|
+
* permanently free, and the collapse is reported separately by `collapsed`.
|
|
184
203
|
*
|
|
185
204
|
* A no-op outside a provider, so a surface stays usable standalone.
|
|
186
205
|
*/
|
|
187
|
-
function useClaimBottomEdge(reserved,
|
|
206
|
+
function useClaimBottomEdge(reserved, collapsed = false) {
|
|
188
207
|
const store = (0, _react.useContext)(BottomEdgeContext);
|
|
189
208
|
const id = (0, _react.useId)();
|
|
190
209
|
(0, _react.useEffect)(() => {
|
|
191
210
|
if (!store) return;
|
|
192
|
-
store.claim(id, reserved,
|
|
211
|
+
store.claim(id, reserved, collapsed);
|
|
193
212
|
return () => store.release(id);
|
|
194
|
-
}, [store, id, reserved,
|
|
213
|
+
}, [store, id, reserved, collapsed]);
|
|
195
214
|
}
|
|
196
215
|
//# sourceMappingURL=bottom-edge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_jsxRuntime","createBottomEdgeStore","claims","Map","listeners","Set","reserved","
|
|
1
|
+
{"version":3,"names":["_react","require","_jsxRuntime","createBottomEdgeStore","claims","Map","listeners","Set","reserved","collapsed","recompute","nextReserved","nextCollapsed","claim","values","listener","subscribe","onChange","add","delete","getReserved","getCollapsed","id","existing","get","set","release","BottomEdgeContext","createContext","BottomEdgeProvider","children","store","useState","jsx","Provider","value","displayName","NO_SUBSCRIPTION","NO_INSET","NO_COLLAPSE","useBottomEdgeInset","useContext","useSyncExternalStore","useBottomEdgeCollapsed","useClaimBottomEdge","useId","useEffect"],"sourceRoot":"../../../src","sources":["layout/bottom-edge.tsx"],"mappings":";;;;;;;;;AAgEA,IAAAA,MAAA,GAAAC,OAAA;AAQe,IAAAC,WAAA,GAAAD,OAAA;AAxEf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgCA,SAASE,qBAAqBA,CAAA,EAAoB;EAChD,MAAMC,MAAM,GAAG,IAAIC,GAAG,CAAgB,CAAC;EACvC,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;EACvC,IAAIC,QAAQ,GAAG,CAAC;EAChB,IAAIC,SAAS,GAAG,KAAK;EAErB,MAAMC,SAAS,GAAGA,CAAA,KAAM;IACtB,IAAIC,YAAY,GAAG,CAAC;IACpB;IACA;IACA;IACA;IACA;IACA,IAAIC,aAAa,GAAG,KAAK;IACzB,KAAK,MAAMC,KAAK,IAAIT,MAAM,CAACU,MAAM,CAAC,CAAC,EAAE;MACnC,IAAID,KAAK,CAACL,QAAQ,GAAGG,YAAY,EAAEA,YAAY,GAAGE,KAAK,CAACL,QAAQ;MAChE,IAAIK,KAAK,CAACJ,SAAS,EAAEG,aAAa,GAAG,IAAI;IAC3C;IACA;IACA;IACA,IAAID,YAAY,KAAKH,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d,IAAI,CAACf,KAAK,EAAE;IACZA,KAAK,CAAClB,KAAK,CAACS,EAAE,EAAEd,QAAQ,EAAEC,SAAS,CAAC;IACpC,OAAO,MAAMsB,KAAK,CAACL,OAAO,CAACJ,EAAE,CAAC;EAChC,CAAC,EAAE,CAACS,KAAK,EAAET,EAAE,EAAEd,QAAQ,EAAEC,SAAS,CAAC,CAAC;AACtC","ignoreList":[]}
|
|
@@ -15,16 +15,16 @@ Object.defineProperty(exports, "EDGE_GAP", {
|
|
|
15
15
|
return _edge.EDGE_GAP;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
Object.defineProperty(exports, "
|
|
18
|
+
Object.defineProperty(exports, "useBottomEdgeCollapsed", {
|
|
19
19
|
enumerable: true,
|
|
20
20
|
get: function () {
|
|
21
|
-
return _bottomEdge.
|
|
21
|
+
return _bottomEdge.useBottomEdgeCollapsed;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
Object.defineProperty(exports, "
|
|
24
|
+
Object.defineProperty(exports, "useBottomEdgeInset", {
|
|
25
25
|
enumerable: true,
|
|
26
26
|
get: function () {
|
|
27
|
-
return _bottomEdge.
|
|
27
|
+
return _bottomEdge.useBottomEdgeInset;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "useClaimBottomEdge", {
|