@oxyhq/bloom 1.12.0 → 1.13.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 +21 -35
- package/lib/commonjs/fab/Fab.js +4 -55
- package/lib/commonjs/fab/Fab.js.map +1 -1
- package/lib/commonjs/fab/Fab.web.js +1 -29
- package/lib/commonjs/fab/Fab.web.js.map +1 -1
- package/lib/commonjs/layout/bottom-edge.js +47 -92
- package/lib/commonjs/layout/bottom-edge.js.map +1 -1
- package/lib/commonjs/layout/index.js +0 -6
- package/lib/commonjs/layout/index.js.map +1 -1
- package/lib/commonjs/tab-bar/TabBarBase.js +6 -22
- package/lib/commonjs/tab-bar/TabBarBase.js.map +1 -1
- package/lib/module/fab/Fab.js +6 -57
- package/lib/module/fab/Fab.js.map +1 -1
- package/lib/module/fab/Fab.web.js +2 -30
- package/lib/module/fab/Fab.web.js.map +1 -1
- package/lib/module/layout/bottom-edge.js +47 -91
- 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 +8 -24
- 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 +31 -57
- 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/layout/index.d.ts.map +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 +31 -57
- 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/layout/index.d.ts.map +1 -1
- package/lib/typescript/module/tab-bar/TabBarBase.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/fab/Fab.tsx +4 -57
- package/src/fab/Fab.web.tsx +2 -31
- package/src/layout/bottom-edge.tsx +54 -108
- package/src/layout/index.ts +1 -6
- package/src/tab-bar/TabBarBase.tsx +6 -28
package/docs/layout.mdx
CHANGED
|
@@ -38,7 +38,7 @@ height. The inset is already folded into the gap, so adding it again
|
|
|
38
38
|
double-counts the home indicator and strands a band of dead space.
|
|
39
39
|
</Admonition>
|
|
40
40
|
|
|
41
|
-
##
|
|
41
|
+
## `useBottomEdgeInset` / `useClaimBottomEdge` — what is already there
|
|
42
42
|
|
|
43
43
|
Knowing where the edge is does not tell a FAB that a tab bar is already parked
|
|
44
44
|
on it. A surface that parks there **claims** its footprint; a surface that wants
|
|
@@ -56,40 +56,31 @@ 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
|
+
`BloomProvider` mounts the registry. Outside one, `useBottomEdgeInset()` returns
|
|
60
|
+
`0` and `useClaimBottomEdge` is a no-op, so a surface stays usable standalone.
|
|
60
61
|
|
|
61
|
-
|
|
62
|
-
publishes two things, and only one of them is a measurement.
|
|
62
|
+
## The collapse is not here, on purpose
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
| `useBottomEdgeCollapsed()` | has the surface **retracted** | a FAB, which fades out |
|
|
64
|
+
The tab bar minimizes 58 → 44 on scroll. This registry twice tried to publish
|
|
65
|
+
that so a FAB could react — as a live pixel height, then as a boolean. Both felt
|
|
66
|
+
wrong on a device, for a structural reason rather than a tunable one:
|
|
68
67
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
// collapse separately.
|
|
72
|
-
useClaimBottomEdge(gap + EXPANDED_HEIGHT, isMinimized);
|
|
73
|
-
```
|
|
68
|
+
> The bar animates on the **UI thread**. Anything reading it from this registry
|
|
69
|
+
> arrives via `runOnJS` plus two React render passes.
|
|
74
70
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
The reaction therefore *starts* one to three frames late, and the delay is
|
|
72
|
+
variable — worst exactly while scrolling, because that is when the JS thread is
|
|
73
|
+
busiest. Fading rather than moving does not hide it: the eye still sees two
|
|
74
|
+
pieces of chrome change at different moments.
|
|
78
75
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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>
|
|
76
|
+
A collapse is **motion**, and motion that must stay locked to a reanimated
|
|
77
|
+
animation has to travel as a shared value on the UI thread. React state is the
|
|
78
|
+
wrong transport for it at any width, so it is not offered here.
|
|
79
|
+
|
|
80
|
+
The **app** owns that signal. Mention drives its header, its tab bar and its FAB
|
|
81
|
+
from one `SharedValue` through `useAnimatedStyle`, and everything moves together
|
|
82
|
+
because nothing crosses a thread. This registry stays what it is good at:
|
|
83
|
+
**geometry** — where things are, not when they move.
|
|
93
84
|
|
|
94
85
|
## Things that are easy to get wrong
|
|
95
86
|
|
|
@@ -109,8 +100,3 @@ hiding would float it off the bottom of the screen for nothing.
|
|
|
109
100
|
so a reader mounted in the same commit as its claimant reads `0` on the first
|
|
110
101
|
commit. These are layout offsets rather than measurements, so nothing here waits
|
|
111
102
|
on a real layout pass.
|
|
112
|
-
|
|
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
|
@@ -55,23 +55,6 @@ function resolveSize(size) {
|
|
|
55
55
|
}
|
|
56
56
|
return SIZE_CONFIG[size];
|
|
57
57
|
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
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.
|
|
73
|
-
*/
|
|
74
|
-
const COLLAPSE_FADE_MS = 200;
|
|
75
58
|
const DEFAULT_OFFSET = 16;
|
|
76
59
|
const DEFAULT_Z_INDEX = 50;
|
|
77
60
|
const HIT_SLOP = {
|
|
@@ -93,10 +76,6 @@ const HIT_SLOP = {
|
|
|
93
76
|
* lands above a floating tab bar instead of behind it. A z-index cannot fix that
|
|
94
77
|
* pairing: the bar's host is the last sibling of the app shell and paints over
|
|
95
78
|
* every descendant, so the FAB has to be somewhere else, not merely on top.
|
|
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.
|
|
100
79
|
*/
|
|
101
80
|
function placementStyle(placement, offset, bottomEdgeInset) {
|
|
102
81
|
if (placement === 'static') return {};
|
|
@@ -163,34 +142,10 @@ const FabComponent = ({
|
|
|
163
142
|
zIndex = DEFAULT_Z_INDEX
|
|
164
143
|
}) => {
|
|
165
144
|
const bottomEdgeInset = (0, _bottomEdge.useBottomEdgeInset)();
|
|
166
|
-
// The FAB belongs to the chrome: when the chrome retracts, so does it.
|
|
167
|
-
const bottomEdgeCollapsed = (0, _bottomEdge.useBottomEdgeCollapsed)();
|
|
168
145
|
const theme = (0, _useTheme.useTheme)();
|
|
169
146
|
const sizeConfig = (0, _react.useMemo)(() => resolveSize(size), [size]);
|
|
170
147
|
const isExtended = label != null && label.length > 0;
|
|
171
148
|
const content = icon ?? children;
|
|
172
|
-
|
|
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;
|
|
178
|
-
|
|
179
|
-
// An effect because RN's Animated has no declarative form — starting an
|
|
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;
|
|
187
|
-
(0, _react.useEffect)(() => {
|
|
188
|
-
_reactNative.Animated.timing(fade, {
|
|
189
|
-
toValue: hidden ? 0 : restingOpacity,
|
|
190
|
-
duration: COLLAPSE_FADE_MS,
|
|
191
|
-
useNativeDriver: true
|
|
192
|
-
}).start();
|
|
193
|
-
}, [hidden, restingOpacity, fade]);
|
|
194
149
|
const {
|
|
195
150
|
scaleAnim,
|
|
196
151
|
onPressIn,
|
|
@@ -247,8 +202,8 @@ const FabComponent = ({
|
|
|
247
202
|
className: className,
|
|
248
203
|
style: [placementStyle(placement, offset, bottomEdgeInset), {
|
|
249
204
|
zIndex
|
|
250
|
-
}, containerStyle, {
|
|
251
|
-
opacity:
|
|
205
|
+
}, containerStyle, disabled && {
|
|
206
|
+
opacity: 0.5
|
|
252
207
|
}, pressed && !disabled && {
|
|
253
208
|
backgroundColor: pressedBackground
|
|
254
209
|
},
|
|
@@ -261,14 +216,8 @@ const FabComponent = ({
|
|
|
261
216
|
transform: [{
|
|
262
217
|
scale: scaleAnim
|
|
263
218
|
}]
|
|
264
|
-
}, style]
|
|
265
|
-
|
|
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,
|
|
219
|
+
}, style],
|
|
220
|
+
onPress: disabled ? undefined : onPress,
|
|
272
221
|
onPressIn: handlePressIn,
|
|
273
222
|
onPressOut: handlePressOut,
|
|
274
223
|
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","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","theme","useTheme","sizeConfig","useMemo","isExtended","length","content","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","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;AAC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S;IACd;MACE,OAAO;QAAErC,UAAU,EAAEH,MAAM,CAACyC,OAAO;QAAErC,UAAU,EAAEJ,MAAM,CAAC0C;MAAkB,CAAC;EAC/E;AACF;AAEO,MAAMC,GAAG,GAAAC,OAAA,CAAAD,GAAA,gBAAG,IAAAE,WAAI,EAACjF,YAAY,CAAC;AACrC+E,GAAG,CAACG,WAAW,GAAG,KAAK","ignoreList":[]}
|
|
@@ -81,10 +81,7 @@ const BLOOM_FAB_CSS = (0, _interactiveWebCss.interactiveWebCss)({
|
|
|
81
81
|
box-shadow: var(--bloom-fab-shadow);
|
|
82
82
|
font-family: inherit;
|
|
83
83
|
`,
|
|
84
|
-
|
|
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',
|
|
84
|
+
transition: 'opacity 120ms ease, transform 120ms ease, box-shadow 160ms ease, background-color 120ms ease',
|
|
88
85
|
// A FAB lifts on hover rather than dimming: it floats over the content, so a
|
|
89
86
|
// deeper shadow is the affordance an opacity dip cannot express.
|
|
90
87
|
hover: {
|
|
@@ -131,16 +128,6 @@ const BLOOM_FAB_CSS = (0, _interactiveWebCss.interactiveWebCss)({
|
|
|
131
128
|
* behind it. A z-index cannot fix that pairing: the bar's host is the last
|
|
132
129
|
* sibling of the app shell and paints over every descendant, so the FAB has to be
|
|
133
130
|
* somewhere else, not merely on top.
|
|
134
|
-
*
|
|
135
|
-
* It is the LIVE inset here, and `bottom` is transitioned — where the native fork
|
|
136
|
-
* follows a collapsing bar with an Animated TRANSFORM instead. The forks differ
|
|
137
|
-
* because the constraint does. Native must stay off the JS thread mid-scroll, so
|
|
138
|
-
* the follow has to be a native-driver transform. On web a transform cannot carry
|
|
139
|
-
* it: `:active` already sets `transform: scale(...)` from the shared
|
|
140
|
-
* `interactive-web-css` rule, and an inline transform would beat that stylesheet
|
|
141
|
-
* rule and eat the press scale — and one property cannot hold the press's 120ms
|
|
142
|
-
* and the collapse's 380ms at once. `bottom` is a separate property with its own
|
|
143
|
-
* duration, and it moves twice per scroll gesture rather than per frame.
|
|
144
131
|
*/
|
|
145
132
|
function placementStyle(placement, offset, bottomEdgeInset) {
|
|
146
133
|
if (placement === 'static') return {};
|
|
@@ -219,12 +206,6 @@ const FabWebComponent = ({
|
|
|
219
206
|
}) => {
|
|
220
207
|
(0, _interactiveWebCss.useInteractiveWebCss)(STYLE_ID, BLOOM_FAB_CSS);
|
|
221
208
|
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');
|
|
228
209
|
const theme = (0, _useTheme.useTheme)();
|
|
229
210
|
const reactId = (0, _react.useId)();
|
|
230
211
|
const resolvedId = id ?? `bloom-fab-${reactId}`;
|
|
@@ -255,13 +236,6 @@ const FabWebComponent = ({
|
|
|
255
236
|
['--bloom-fab-press-scale']: _tokens.animation.pressScale,
|
|
256
237
|
...placementStyle(placement, offset, bottomEdgeInset)
|
|
257
238
|
};
|
|
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
|
-
}
|
|
265
239
|
if (isExtended) {
|
|
266
240
|
const pad = sizeConfig.diameter <= 44 ? 14 : 20;
|
|
267
241
|
base.paddingLeft = pad;
|
|
@@ -300,8 +274,6 @@ const FabWebComponent = ({
|
|
|
300
274
|
onClick: handleClick,
|
|
301
275
|
disabled: disabled,
|
|
302
276
|
"aria-disabled": disabled || undefined,
|
|
303
|
-
"aria-hidden": hidden || undefined,
|
|
304
|
-
tabIndex: hidden ? -1 : undefined,
|
|
305
277
|
"aria-label": ariaLabel,
|
|
306
278
|
title: title ?? accessibilityHint,
|
|
307
279
|
"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","useBottomEdgeInset","
|
|
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","theme","useTheme","reactId","useId","resolvedId","sizeConfig","useMemo","isExtended","length","content","variantColors","colors","restShadow","shadow","hoverShadow","containerStyle","color","borderRadius","full","height","fontWeight","pressedSurface","animation","pressScale","pad","paddingLeft","paddingRight","width","handleClick","useCallback","event","preventDefault","ariaLabel","composedClassName","concat","join","resolvedStyle","flattenWebStyle","resolvedLabelStyle","jsxs","undefined","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,C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,EAEDwB;IAAO,CACJ,CACP,EACAF,UAAU,iBAAI,IAAAnG,WAAA,CAAAqI,GAAA;MAAMnF,KAAK,EAAEgF,kBAAmB;MAAArD,QAAA,EAAEC;IAAK,CAAO,CAAC;EAAA,CACxD,CAAC;AAEb,CAAC;AAEM,MAAM2D,GAAG,GAAAC,OAAA,CAAAD,GAAA,gBAAG,IAAAE,WAAI,EAAClE,eAAe,CAAC;AACxCgE,GAAG,CAACG,WAAW,GAAG,KAAK","ignoreList":[]}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.BottomEdgeProvider = BottomEdgeProvider;
|
|
7
|
-
exports.useBottomEdgeCollapsed = useBottomEdgeCollapsed;
|
|
8
7
|
exports.useBottomEdgeInset = useBottomEdgeInset;
|
|
9
8
|
exports.useClaimBottomEdge = useClaimBottomEdge;
|
|
10
9
|
var _react = require("react");
|
|
@@ -38,32 +37,27 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
38
37
|
* edge, so two surfaces at that edge overlap rather than stack; the tallest is
|
|
39
38
|
* what a new surface has to clear. Summing would strand it at twice the height.
|
|
40
39
|
*
|
|
41
|
-
* ##
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
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.
|
|
40
|
+
* ## What does NOT belong here: the collapse
|
|
41
|
+
*
|
|
42
|
+
* The tab bar minimizes 58 -> 44 on scroll, and this registry twice tried to
|
|
43
|
+
* publish that so a FAB could react — first as a live pixel height (1.11.0), then
|
|
44
|
+
* as a boolean (1.12.0). Both felt wrong on a device, for the same reason, and
|
|
45
|
+
* the reason is structural rather than a matter of tuning:
|
|
46
|
+
*
|
|
47
|
+
* the bar animates on the UI thread, while anything reading it from here
|
|
48
|
+
* arrives via `runOnJS` plus two React render passes.
|
|
49
|
+
*
|
|
50
|
+
* So a consumer's reaction STARTS one to three frames after the bar's, and the
|
|
51
|
+
* delay is variable — worst exactly while scrolling, because that is when the JS
|
|
52
|
+
* thread is busiest. Fading instead of moving does not hide it either: the eye
|
|
53
|
+
* still sees two pieces of chrome change at different moments.
|
|
54
|
+
*
|
|
55
|
+
* A collapse is MOTION, and motion that must stay in lock-step with a
|
|
56
|
+
* reanimated animation has to travel as a shared value on the UI thread. React
|
|
57
|
+
* state is the wrong transport at any width, so it is not offered here at all.
|
|
58
|
+
* The app owns that signal — Mention drives its header, its bar and its FAB from
|
|
59
|
+
* one `SharedValue` through `useAnimatedStyle` — and this registry stays what it
|
|
60
|
+
* is good at: GEOMETRY. Where things are, not when they move.
|
|
67
61
|
*
|
|
68
62
|
* ## Why an external store
|
|
69
63
|
*
|
|
@@ -77,25 +71,17 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
77
71
|
function createBottomEdgeStore() {
|
|
78
72
|
const claims = new Map();
|
|
79
73
|
const listeners = new Set();
|
|
80
|
-
let
|
|
81
|
-
let collapsed = false;
|
|
74
|
+
let inset = 0;
|
|
82
75
|
const recompute = () => {
|
|
83
|
-
let
|
|
84
|
-
|
|
85
|
-
|
|
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;
|
|
90
|
-
for (const claim of claims.values()) {
|
|
91
|
-
if (claim.reserved > nextReserved) nextReserved = claim.reserved;
|
|
92
|
-
if (claim.collapsed) nextCollapsed = true;
|
|
76
|
+
let next = 0;
|
|
77
|
+
for (const height of claims.values()) {
|
|
78
|
+
if (height > next) next = height;
|
|
93
79
|
}
|
|
94
|
-
// Bail before notifying: a re-registration at an unchanged
|
|
95
|
-
// render of a claimant
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
80
|
+
// Bail before notifying: a re-registration at an unchanged height (every
|
|
81
|
+
// render of a claimant whose footprint did not move) must not re-render
|
|
82
|
+
// every reader.
|
|
83
|
+
if (next === inset) return;
|
|
84
|
+
inset = next;
|
|
99
85
|
for (const listener of listeners) listener();
|
|
100
86
|
};
|
|
101
87
|
return {
|
|
@@ -105,15 +91,10 @@ function createBottomEdgeStore() {
|
|
|
105
91
|
listeners.delete(onChange);
|
|
106
92
|
};
|
|
107
93
|
},
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
if (existing?.reserved === nextReserved && existing.collapsed === nextCollapsed) return;
|
|
113
|
-
claims.set(id, {
|
|
114
|
-
reserved: nextReserved,
|
|
115
|
-
collapsed: nextCollapsed
|
|
116
|
-
});
|
|
94
|
+
getInset: () => inset,
|
|
95
|
+
claim(id, height) {
|
|
96
|
+
if (claims.get(id) === height) return;
|
|
97
|
+
claims.set(id, height);
|
|
117
98
|
recompute();
|
|
118
99
|
},
|
|
119
100
|
release(id) {
|
|
@@ -145,18 +126,15 @@ BottomEdgeProvider.displayName = 'BottomEdgeProvider';
|
|
|
145
126
|
// would resubscribe `useSyncExternalStore` on every render.
|
|
146
127
|
const NO_SUBSCRIPTION = () => () => {};
|
|
147
128
|
const NO_INSET = () => 0;
|
|
148
|
-
const NO_COLLAPSE = () => false;
|
|
149
129
|
|
|
150
130
|
/**
|
|
151
|
-
* How much of the bottom edge is
|
|
131
|
+
* How much of the bottom edge is already occupied, in px.
|
|
152
132
|
*
|
|
153
|
-
*
|
|
154
|
-
* that must not move as the user scrolls — a list's bottom padding, a toast
|
|
155
|
-
* stack's offset:
|
|
133
|
+
* Add it to whatever offset the surface would otherwise use:
|
|
156
134
|
*
|
|
157
135
|
* ```tsx
|
|
158
|
-
* const
|
|
159
|
-
* <
|
|
136
|
+
* const occupied = useBottomEdgeInset();
|
|
137
|
+
* <View style={{ position: 'absolute', bottom: windowEdgeGap(insets.bottom) + occupied }} />
|
|
160
138
|
* ```
|
|
161
139
|
*
|
|
162
140
|
* `0` outside a provider, and `0` on the first commit even inside one — a claim
|
|
@@ -166,50 +144,27 @@ const NO_COLLAPSE = () => false;
|
|
|
166
144
|
*/
|
|
167
145
|
function useBottomEdgeInset() {
|
|
168
146
|
const store = (0, _react.useContext)(BottomEdgeContext);
|
|
169
|
-
return (0, _react.useSyncExternalStore)(store?.subscribe ?? NO_SUBSCRIPTION, store?.
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/**
|
|
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.
|
|
188
|
-
*/
|
|
189
|
-
function useBottomEdgeCollapsed() {
|
|
190
|
-
const store = (0, _react.useContext)(BottomEdgeContext);
|
|
191
|
-
return (0, _react.useSyncExternalStore)(store?.subscribe ?? NO_SUBSCRIPTION, store?.getCollapsed ?? NO_COLLAPSE, store?.getCollapsed ?? NO_COLLAPSE);
|
|
147
|
+
return (0, _react.useSyncExternalStore)(store?.subscribe ?? NO_SUBSCRIPTION, store?.getInset ?? NO_INSET, store?.getInset ?? NO_INSET);
|
|
192
148
|
}
|
|
193
149
|
|
|
194
150
|
/**
|
|
195
|
-
* Claim the bottom edge for as long as the caller is mounted.
|
|
151
|
+
* Claim `height` px of the bottom edge for as long as the caller is mounted.
|
|
196
152
|
*
|
|
197
153
|
* The claimant owns its own placement — claiming does not move it. It declares
|
|
198
|
-
* the space it occupies so that everything reading
|
|
199
|
-
* the FULL footprint (the surface's height plus the gap it holds
|
|
200
|
-
* edge), which is the same number the surface positions itself
|
|
201
|
-
*
|
|
202
|
-
* permanently free, and the collapse is reported separately by `collapsed`.
|
|
154
|
+
* the space it occupies so that everything reading `useBottomEdgeInset()` stays
|
|
155
|
+
* off it. Pass the FULL footprint (the surface's height plus the gap it holds
|
|
156
|
+
* off the window edge), which is the same number the surface positions itself
|
|
157
|
+
* with.
|
|
203
158
|
*
|
|
204
159
|
* A no-op outside a provider, so a surface stays usable standalone.
|
|
205
160
|
*/
|
|
206
|
-
function useClaimBottomEdge(
|
|
161
|
+
function useClaimBottomEdge(height) {
|
|
207
162
|
const store = (0, _react.useContext)(BottomEdgeContext);
|
|
208
163
|
const id = (0, _react.useId)();
|
|
209
164
|
(0, _react.useEffect)(() => {
|
|
210
165
|
if (!store) return;
|
|
211
|
-
store.claim(id,
|
|
166
|
+
store.claim(id, height);
|
|
212
167
|
return () => store.release(id);
|
|
213
|
-
}, [store, id,
|
|
168
|
+
}, [store, id, height]);
|
|
214
169
|
}
|
|
215
170
|
//# sourceMappingURL=bottom-edge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_jsxRuntime","createBottomEdgeStore","claims","Map","listeners","Set","
|
|
1
|
+
{"version":3,"names":["_react","require","_jsxRuntime","createBottomEdgeStore","claims","Map","listeners","Set","inset","recompute","next","height","values","listener","subscribe","onChange","add","delete","getInset","claim","id","get","set","release","BottomEdgeContext","createContext","BottomEdgeProvider","children","store","useState","jsx","Provider","value","displayName","NO_SUBSCRIPTION","NO_INSET","useBottomEdgeInset","useContext","useSyncExternalStore","useClaimBottomEdge","useId","useEffect"],"sourceRoot":"../../../src","sources":["layout/bottom-edge.tsx"],"mappings":";;;;;;;;AA2DA,IAAAA,MAAA,GAAAC,OAAA;AAQe,IAAAC,WAAA,GAAAD,OAAA;AAnEf;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;;AAuBA,SAASE,qBAAqBA,CAAA,EAAoB;EAChD,MAAMC,MAAM,GAAG,IAAIC,GAAG,CAAiB,CAAC;EACxC,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;EACvC,IAAIC,KAAK,GAAG,CAAC;EAEb,MAAMC,SAAS,GAAGA,CAAA,KAAM;IACtB,IAAIC,IAAI,GAAG,CAAC;IACZ,KAAK,MAAMC,MAAM,IAAIP,MAAM,CAACQ,MAAM,CAAC,CAAC,EAAE;MACpC,IAAID,MAAM,GAAGD,IAAI,EAAEA,IAAI,GAAGC,MAAM;IAClC;IACA;IACA;IACA;IACA,IAAID,IAAI,KAAKF,KAAK,EAAE;IACpBA,KAAK,GAAGE,IAAI;IACZ,KAAK,MAAMG,QAAQ,IAAIP,SAAS,EAAEO,QAAQ,CAAC,CAAC;EAC9C,CAAC;EAED,OAAO;IACLC,SAASA,CAACC,QAAQ,EAAE;MAClBT,SAAS,CAACU,GAAG,CAACD,QAAQ,CAAC;MACvB,OAAO,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AEV,QAAQ,IAAIiB,QAAQ,EAC3BP,KAAK,EAAEV,QAAQ,IAAIiB,QACrB,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,kBAAkBA,CAAC5B,MAAc,EAAQ;EACvD,MAAMiB,KAAK,GAAG,IAAAS,iBAAU,EAACb,iBAAiB,CAAC;EAC3C,MAAMJ,EAAE,GAAG,IAAAoB,YAAK,EAAC,CAAC;EAElB,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAI,CAACb,KAAK,EAAE;IACZA,KAAK,CAACT,KAAK,CAACC,EAAE,EAAET,MAAM,CAAC;IACvB,OAAO,MAAMiB,KAAK,CAACL,OAAO,CAACH,EAAE,CAAC;EAChC,CAAC,EAAE,CAACQ,KAAK,EAAER,EAAE,EAAET,MAAM,CAAC,CAAC;AACzB","ignoreList":[]}
|
|
@@ -15,12 +15,6 @@ Object.defineProperty(exports, "EDGE_GAP", {
|
|
|
15
15
|
return _edge.EDGE_GAP;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
Object.defineProperty(exports, "useBottomEdgeCollapsed", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _bottomEdge.useBottomEdgeCollapsed;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
18
|
Object.defineProperty(exports, "useBottomEdgeInset", {
|
|
25
19
|
enumerable: true,
|
|
26
20
|
get: function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_edge","require","_bottomEdge"],"sourceRoot":"../../../src","sources":["layout/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_edge","require","_bottomEdge"],"sourceRoot":"../../../src","sources":["layout/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA","ignoreList":[]}
|