@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.
Files changed (41) hide show
  1. package/docs/layout.mdx +21 -35
  2. package/lib/commonjs/fab/Fab.js +4 -55
  3. package/lib/commonjs/fab/Fab.js.map +1 -1
  4. package/lib/commonjs/fab/Fab.web.js +1 -29
  5. package/lib/commonjs/fab/Fab.web.js.map +1 -1
  6. package/lib/commonjs/layout/bottom-edge.js +47 -92
  7. package/lib/commonjs/layout/bottom-edge.js.map +1 -1
  8. package/lib/commonjs/layout/index.js +0 -6
  9. package/lib/commonjs/layout/index.js.map +1 -1
  10. package/lib/commonjs/tab-bar/TabBarBase.js +6 -22
  11. package/lib/commonjs/tab-bar/TabBarBase.js.map +1 -1
  12. package/lib/module/fab/Fab.js +6 -57
  13. package/lib/module/fab/Fab.js.map +1 -1
  14. package/lib/module/fab/Fab.web.js +2 -30
  15. package/lib/module/fab/Fab.web.js.map +1 -1
  16. package/lib/module/layout/bottom-edge.js +47 -91
  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 +8 -24
  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 +31 -57
  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 +31 -57
  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 +4 -57
  38. package/src/fab/Fab.web.tsx +2 -31
  39. package/src/layout/bottom-edge.tsx +54 -108
  40. package/src/layout/index.ts +1 -6
  41. 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
- ## The registry — what is already there
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
- ### A size and a state, because they travel differently
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
- A surface that **collapses** the tab bar minimizes 58 → 44 on scroll —
62
- publishes two things, and only one of them is a measurement.
62
+ ## The collapse is not here, on purpose
63
63
 
64
- | hook | answers | who reads it |
65
- | --- | --- | --- |
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 |
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
- ```tsx
70
- // A claimant that collapses keeps `reserved` at its FULL size and reports the
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
- Reserved never shrinks while its claimant is mounted, because the bar re-expands
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.
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
- <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>
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.
@@ -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: fade
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
- // 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,
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","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","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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":[]}
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;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,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OA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B+B,MAA6C,EACD;EAC5C,QAAQ/B,OAAO;IACb,KAAK,WAAW;MACd,OAAO;QAAEkC,UAAU,EAAEH,MAAM,CAACmC,SAAS;QAAE/B,UAAU,EAAEJ,MAAM,CAACoC;MAAoB,CAAC;IACjF,KAAK,UAAU;MACb,OAAO;QAAEjC,UAAU,EAAEH,MAAM,CAACqC,QAAQ;QAAEjC,UAAU,EAAEJ,MAAM,CAACsC;MAAmB,CAAC;IAC/E,KAAK,SAAS;MACZ,OAAO;QAAEnC,UAAU,EAAEH,MAAM,CAACuC,IAAI;QAAEnC,UAAU,EAAEJ,MAAM,CAACwC;MAAK,CAAC;IAC7D,KAAK,SAAS;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
- // `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',
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","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","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AAEM,MAAMiE,GAAG,GAAAC,OAAA,CAAAD,GAAA,gBAAG,IAAAE,WAAI,EAACxE,eAAe,CAAC;AACxCsE,GAAG,CAACG,WAAW,GAAG,KAAK","ignoreList":[]}
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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AAU;IACtBpC,KAAK,EAAEA,KAAK,IAAIN,iBAAkB;IAClC,eAAaG,MAAO;IAAAR,QAAA,GAEnBwB,OAAO,IAAI,IAAI,iBACd,IAAArG,WAAA,CAAAqI,GAAA;MACE,eAAalC,UAAU,GAAG,MAAM,GAAGiC,SAAU;MAC7ClF,KAAK,EAAE;QACLoF,OAAO,EAAE,aAAa;QACtBC,UAAU,EAAE,QAAQ;QACpBC,cAAc,EAAE,QAAQ;QACxBjB,KAAK,EAAEtB,UAAU,CAAC1E,OAAO;QACzBwF,MAAM,EAAEd,UAAU,CAAC1E;MACrB,CAAE;MAAAsD,QAAA,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
- * ## A size and a state, because they travel differently
42
- *
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
- *
46
- * - RESERVED (`useBottomEdgeInset`) never shrinks while the claimant is
47
- * mounted. It is what must be kept permanently free: a list's bottom
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.
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 reserved = 0;
81
- let collapsed = false;
74
+ let inset = 0;
82
75
  const recompute = () => {
83
- let nextReserved = 0;
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;
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 footprint (every
95
- // render of a claimant that did not move) must not re-render every reader.
96
- if (nextReserved === reserved && nextCollapsed === collapsed) return;
97
- reserved = nextReserved;
98
- collapsed = nextCollapsed;
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
- getReserved: () => reserved,
109
- getCollapsed: () => collapsed,
110
- claim(id, nextReserved, nextCollapsed) {
111
- const existing = claims.get(id);
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 permanently RESERVED, in px.
131
+ * How much of the bottom edge is already occupied, in px.
152
132
  *
153
- * Never shrinks while its claimant is mounted, so it is the number for anything
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 reserved = useBottomEdgeInset();
159
- * <FlatList contentContainerStyle={{ paddingBottom: reserved + 12 }} />
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?.getReserved ?? NO_INSET, store?.getReserved ?? NO_INSET);
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 the edge stays off it. Pass
199
- * the FULL footprint (the surface's height plus the gap it holds off the window
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`.
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(reserved, collapsed = false) {
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, reserved, collapsed);
166
+ store.claim(id, height);
212
167
  return () => store.release(id);
213
- }, [store, id, reserved, collapsed]);
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","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,QAAQ,IAAII,aAAa,KAAKH,SAAS,EAAE;IAC9DD,QAAQ,GAAGG,YAAY;IACvBF,SAAS,GAAGG,aAAa;IACzB,KAAK,MAAMG,QAAQ,IAAIT,SAAS,EAAES,QAAQ,CAAC,CAAC;EAC9C,CAAC;EAED,OAAO;IACLC,SAASA,CAAC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AAEd,QAAQ,EAAEC,SAAS,CAAC,CAAC;AACtC","ignoreList":[]}
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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iBAAU,EAACb,iBAAiB,CAAC;EAC3C,OAAO,IAAAc,2BAAoB,EACzBV,KAAK,EAAEd,SAAS,IAAIoB,eAAe,EACnCN,KAAK,EAAEV,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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA","ignoreList":[]}
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":[]}