@oxyhq/bloom 0.51.0 → 0.52.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/lib/commonjs/frosted-icon-button/shared.js +11 -1
- package/lib/commonjs/frosted-icon-button/shared.js.map +1 -1
- package/lib/commonjs/tab-bar/TabBarBase.js +30 -5
- package/lib/commonjs/tab-bar/TabBarBase.js.map +1 -1
- package/lib/commonjs/tab-bar/glyph.js +9 -4
- package/lib/commonjs/tab-bar/glyph.js.map +1 -1
- package/lib/commonjs/tab-bar/glyph.native.js +7 -2
- package/lib/commonjs/tab-bar/glyph.native.js.map +1 -1
- package/lib/commonjs/tab-bar/index.js +7 -0
- package/lib/commonjs/tab-bar/index.js.map +1 -1
- package/lib/commonjs/tab-bar/index.web.js +7 -0
- package/lib/commonjs/tab-bar/index.web.js.map +1 -1
- package/lib/commonjs/tab-bar/shared.js +32 -1
- package/lib/commonjs/tab-bar/shared.js.map +1 -1
- package/lib/commonjs/tab-bar/surface-solid.js +43 -0
- package/lib/commonjs/tab-bar/surface-solid.js.map +1 -0
- package/lib/commonjs/tab-bar/surface.js +5 -42
- package/lib/commonjs/tab-bar/surface.js.map +1 -1
- package/lib/commonjs/tab-bar/surface.native.js +65 -8
- package/lib/commonjs/tab-bar/surface.native.js.map +1 -1
- package/lib/commonjs/tab-bar/use-reserved-space.js +50 -0
- package/lib/commonjs/tab-bar/use-reserved-space.js.map +1 -0
- package/lib/module/frosted-icon-button/shared.js +11 -1
- package/lib/module/frosted-icon-button/shared.js.map +1 -1
- package/lib/module/tab-bar/TabBarBase.js +31 -6
- package/lib/module/tab-bar/TabBarBase.js.map +1 -1
- package/lib/module/tab-bar/glyph.js +9 -4
- package/lib/module/tab-bar/glyph.js.map +1 -1
- package/lib/module/tab-bar/glyph.native.js +7 -2
- package/lib/module/tab-bar/glyph.native.js.map +1 -1
- package/lib/module/tab-bar/index.js +1 -0
- package/lib/module/tab-bar/index.js.map +1 -1
- package/lib/module/tab-bar/index.web.js +1 -0
- package/lib/module/tab-bar/index.web.js.map +1 -1
- package/lib/module/tab-bar/shared.js +30 -0
- package/lib/module/tab-bar/shared.js.map +1 -1
- package/lib/module/tab-bar/surface-solid.js +37 -0
- package/lib/module/tab-bar/surface-solid.js.map +1 -0
- package/lib/module/tab-bar/surface.js +10 -23
- package/lib/module/tab-bar/surface.js.map +1 -1
- package/lib/module/tab-bar/surface.native.js +68 -9
- package/lib/module/tab-bar/surface.native.js.map +1 -1
- package/lib/module/tab-bar/use-reserved-space.js +46 -0
- package/lib/module/tab-bar/use-reserved-space.js.map +1 -0
- package/lib/typescript/commonjs/benefit-list/types.d.ts +2 -1
- package/lib/typescript/commonjs/benefit-list/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/fab/types.d.ts +4 -2
- package/lib/typescript/commonjs/fab/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/frosted-icon-button/shared.d.ts +11 -1
- package/lib/typescript/commonjs/frosted-icon-button/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/frosted-icon-button/types.d.ts +2 -1
- package/lib/typescript/commonjs/frosted-icon-button/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-bar/TabBarBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-bar/glyph.d.ts +1 -1
- package/lib/typescript/commonjs/tab-bar/glyph.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-bar/glyph.native.d.ts +1 -1
- package/lib/typescript/commonjs/tab-bar/glyph.native.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-bar/index.d.ts +1 -0
- package/lib/typescript/commonjs/tab-bar/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-bar/index.web.d.ts +1 -0
- package/lib/typescript/commonjs/tab-bar/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-bar/shared.d.ts +25 -0
- package/lib/typescript/commonjs/tab-bar/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-bar/surface-solid.d.ts +6 -0
- package/lib/typescript/commonjs/tab-bar/surface-solid.d.ts.map +1 -0
- package/lib/typescript/commonjs/tab-bar/surface.d.ts +28 -5
- package/lib/typescript/commonjs/tab-bar/surface.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-bar/surface.native.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-bar/types.d.ts +43 -4
- package/lib/typescript/commonjs/tab-bar/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-bar/use-reserved-space.d.ts +25 -0
- package/lib/typescript/commonjs/tab-bar/use-reserved-space.d.ts.map +1 -0
- package/lib/typescript/module/benefit-list/types.d.ts +2 -1
- package/lib/typescript/module/benefit-list/types.d.ts.map +1 -1
- package/lib/typescript/module/fab/types.d.ts +4 -2
- package/lib/typescript/module/fab/types.d.ts.map +1 -1
- package/lib/typescript/module/frosted-icon-button/shared.d.ts +11 -1
- package/lib/typescript/module/frosted-icon-button/shared.d.ts.map +1 -1
- package/lib/typescript/module/frosted-icon-button/types.d.ts +2 -1
- package/lib/typescript/module/frosted-icon-button/types.d.ts.map +1 -1
- package/lib/typescript/module/tab-bar/TabBarBase.d.ts.map +1 -1
- package/lib/typescript/module/tab-bar/glyph.d.ts +1 -1
- package/lib/typescript/module/tab-bar/glyph.d.ts.map +1 -1
- package/lib/typescript/module/tab-bar/glyph.native.d.ts +1 -1
- package/lib/typescript/module/tab-bar/glyph.native.d.ts.map +1 -1
- package/lib/typescript/module/tab-bar/index.d.ts +1 -0
- package/lib/typescript/module/tab-bar/index.d.ts.map +1 -1
- package/lib/typescript/module/tab-bar/index.web.d.ts +1 -0
- package/lib/typescript/module/tab-bar/index.web.d.ts.map +1 -1
- package/lib/typescript/module/tab-bar/shared.d.ts +25 -0
- package/lib/typescript/module/tab-bar/shared.d.ts.map +1 -1
- package/lib/typescript/module/tab-bar/surface-solid.d.ts +6 -0
- package/lib/typescript/module/tab-bar/surface-solid.d.ts.map +1 -0
- package/lib/typescript/module/tab-bar/surface.d.ts +28 -5
- package/lib/typescript/module/tab-bar/surface.d.ts.map +1 -1
- package/lib/typescript/module/tab-bar/surface.native.d.ts.map +1 -1
- package/lib/typescript/module/tab-bar/types.d.ts +43 -4
- package/lib/typescript/module/tab-bar/types.d.ts.map +1 -1
- package/lib/typescript/module/tab-bar/use-reserved-space.d.ts +25 -0
- package/lib/typescript/module/tab-bar/use-reserved-space.d.ts.map +1 -0
- package/package.json +2 -8
- package/src/__tests__/TabBar.test.tsx +82 -2
- package/src/__tests__/TabBarGlassFallback.test.tsx +234 -0
- package/src/__tests__/TabBarLongPress.test.tsx +258 -0
- package/src/__tests__/TabBarReservedSpace.test.tsx +150 -0
- package/src/__tests__/TabBarWebFork.test.ts +47 -0
- package/src/__tests__/icon-references.test.ts +243 -0
- package/src/benefit-list/types.ts +2 -1
- package/src/fab/types.ts +4 -2
- package/src/frosted-icon-button/shared.ts +11 -1
- package/src/frosted-icon-button/types.ts +2 -1
- package/src/tab-bar/TabBarBase.tsx +39 -5
- package/src/tab-bar/glyph.native.tsx +5 -2
- package/src/tab-bar/glyph.tsx +8 -4
- package/src/tab-bar/index.ts +1 -0
- package/src/tab-bar/index.web.tsx +1 -0
- package/src/tab-bar/shared.ts +38 -0
- package/src/tab-bar/surface-solid.tsx +40 -0
- package/src/tab-bar/surface.native.tsx +77 -15
- package/src/tab-bar/surface.tsx +10 -29
- package/src/tab-bar/types.ts +43 -4
- package/src/tab-bar/use-reserved-space.ts +44 -0
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
* Ported from expo-glass-tabs v0.1.1 — src/glass-tab-bar.tsx
|
|
5
5
|
* (MIT © 2026 David Mokos). See the top-level NOTICE.
|
|
6
6
|
*
|
|
7
|
-
* NEUTRAL default variant of the tab bar's capsule surface:
|
|
8
|
-
* view filled with the theme's solid fallback.
|
|
7
|
+
* NEUTRAL default variant of the tab bar's capsule surface: the non-glass one.
|
|
9
8
|
*
|
|
10
9
|
* This is the file resolved by everything that does NOT do React Native's
|
|
11
10
|
* platform-extension resolution — a consumer's `tsc` (which follows Bloom's
|
|
@@ -16,29 +15,17 @@
|
|
|
16
15
|
* resolution outright. Same three-way split, for the same reason, as
|
|
17
16
|
* `theme/native-root-vars{,.native,.web}.ts`.
|
|
18
17
|
*
|
|
18
|
+
* The surface itself lives in `surface-solid.tsx`, because `surface.native.tsx`
|
|
19
|
+
* renders it as its own fallback and cannot import this file to get it — Metro
|
|
20
|
+
* resolves `./surface` back to `surface.native.tsx`, i.e. to itself. This module's
|
|
21
|
+
* job is to give that one implementation the name every entry module imports.
|
|
22
|
+
*
|
|
19
23
|
* The variants — all three implement `TabBarSurfaceProps` exactly, so the entry
|
|
20
24
|
* modules can swap them freely:
|
|
21
|
-
* - `surface.native.tsx` — iOS/Android (Metro), real `UIGlassEffect` glass
|
|
25
|
+
* - `surface.native.tsx` — iOS/Android (Metro), real `UIGlassEffect` glass, with
|
|
26
|
+
* the solid surface as its fallback;
|
|
22
27
|
* - `surface.web.tsx` — web, a CSS `backdrop-filter`;
|
|
23
|
-
* - this file — everywhere else, the opaque fallback.
|
|
28
|
+
* - this file — everywhere else, the opaque fallback alone.
|
|
24
29
|
*/
|
|
25
|
-
|
|
26
|
-
import Animated from 'react-native-reanimated';
|
|
27
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
28
|
-
export function TabBarSurface({
|
|
29
|
-
theme,
|
|
30
|
-
style
|
|
31
|
-
}) {
|
|
32
|
-
return /*#__PURE__*/_jsx(Animated.View, {
|
|
33
|
-
style: [StyleSheet.absoluteFill, styles.surface, {
|
|
34
|
-
backgroundColor: theme.solidFallback
|
|
35
|
-
}, style]
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
TabBarSurface.displayName = 'TabBarSurface';
|
|
39
|
-
const styles = StyleSheet.create({
|
|
40
|
-
surface: {
|
|
41
|
-
borderCurve: 'continuous'
|
|
42
|
-
}
|
|
43
|
-
});
|
|
30
|
+
export { SolidTabBarSurface as TabBarSurface } from "./surface-solid.js";
|
|
44
31
|
//# sourceMappingURL=surface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["SolidTabBarSurface","TabBarSurface"],"sourceRoot":"../../../src","sources":["tab-bar/surface.tsx"],"mappings":";;AAAA;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,SAASA,kBAAkB,IAAIC,aAAa,QAAQ,oBAAiB","ignoreList":[]}
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* Ported from expo-glass-tabs v0.1.1 — src/glass-tab-bar.tsx
|
|
5
5
|
* (MIT © 2026 David Mokos). See the top-level NOTICE.
|
|
6
6
|
*
|
|
7
|
-
* NATIVE variant of the tab bar's capsule surface — real liquid glass
|
|
7
|
+
* NATIVE variant of the tab bar's capsule surface — real liquid glass, degrading
|
|
8
|
+
* to the solid surface whenever the glass is not actually usable.
|
|
8
9
|
*
|
|
9
10
|
* `expo-glass-effect` is imported STATICALLY and this file is the only place it
|
|
10
11
|
* appears: Metro selects `.native` on iOS/Android, so the import never reaches
|
|
@@ -16,18 +17,77 @@
|
|
|
16
17
|
*
|
|
17
18
|
* `isLiquidGlassAvailable()` is false on Android and pre-iOS-26, where the
|
|
18
19
|
* package's `GlassView` has no material to render; those platforms get the same
|
|
19
|
-
* opaque fallback the neutral variant paints.
|
|
20
|
+
* opaque fallback the neutral variant paints. "Installed" is not "usable"
|
|
21
|
+
* though, and BOTH remaining hazards sit at MODULE scope, which is why neither
|
|
22
|
+
* can be handled by a branch inside the component:
|
|
23
|
+
*
|
|
24
|
+
* 1. THE NATIVE MODULE. On iOS `isLiquidGlassAvailable()` resolves
|
|
25
|
+
* `ExpoGlassEffect` through `requireNativeModule`, which THROWS
|
|
26
|
+
* `Cannot find native module …` by contract when that module is not in the
|
|
27
|
+
* binary. For these apps it is a normal deploy state rather than a
|
|
28
|
+
* misconfiguration: an OTA JS update can land on a binary built before the
|
|
29
|
+
* package was linked, while the JS side always resolves because expo-router
|
|
30
|
+
* depends on it. Unguarded, the throw escapes render and takes down the whole
|
|
31
|
+
* screen the bar is on.
|
|
32
|
+
* 2. THE EXPORTS. `Animated.createAnimatedComponent(GlassView)` runs at IMPORT
|
|
33
|
+
* time, so a tree that resolves the specifier to something without
|
|
34
|
+
* `GlassView` hands React an `undefined` element type before any render
|
|
35
|
+
* happens.
|
|
36
|
+
*
|
|
37
|
+
* `isGlassEffectAPIAvailable()` is upstream's own third condition: on some iOS 26
|
|
38
|
+
* betas `UIGlassEffect` is missing and touching `GlassView` crashes NATIVELY,
|
|
39
|
+
* below JS (expo/expo#40911). It first shipped in expo-glass-effect 0.1.9, which is
|
|
40
|
+
* exactly why the peer floor is `>=0.1.9`: this file imports the symbol STATICALLY,
|
|
41
|
+
* and a floor predating it would be the same incoherence as declaring a
|
|
42
|
+
* statically-imported package optional. The `typeof` guard below is still not
|
|
43
|
+
* redundant — a peer range only WARNS, so a consumer can resolve an older copy
|
|
44
|
+
* anyway. A missing probe therefore means "not applicable", never "unavailable";
|
|
45
|
+
* reading it the other way would delete the glass look from every working device.
|
|
46
|
+
*
|
|
47
|
+
* Everything that fails routes to the SAME solid surface Android already paints —
|
|
48
|
+
* the intended fallback path, not a new one.
|
|
20
49
|
*/
|
|
21
|
-
import { GlassView, isLiquidGlassAvailable } from 'expo-glass-effect';
|
|
50
|
+
import { GlassView, isGlassEffectAPIAvailable, isLiquidGlassAvailable } from 'expo-glass-effect';
|
|
22
51
|
import { StyleSheet } from 'react-native';
|
|
23
52
|
import Animated from 'react-native-reanimated';
|
|
53
|
+
import { SolidTabBarSurface } from "./surface-solid.js";
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The animated glass view, or `null` when the package did not deliver the two
|
|
57
|
+
* exports this file needs. Built once, and guarded HERE rather than in the
|
|
58
|
+
* component because `createAnimatedComponent` runs on import (hazard 2 above).
|
|
59
|
+
*/
|
|
24
60
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
|
-
const AnimatedGlassView = Animated.createAnimatedComponent(GlassView);
|
|
61
|
+
const AnimatedGlassView = Boolean(GlassView) && typeof isLiquidGlassAvailable === 'function' ? Animated.createAnimatedComponent(GlassView) : null;
|
|
62
|
+
|
|
63
|
+
/** Memo for {@link glassIsUsable} — the answer cannot change within a session. */
|
|
64
|
+
let glassUsable;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Whether this build can really render glass. Probed once: the native lookup
|
|
68
|
+
* behind it is not free, and on the failing path it throws.
|
|
69
|
+
*
|
|
70
|
+
* The `catch` reports rather than swallows. A bar that silently painted itself
|
|
71
|
+
* opaque on every iOS device would be far more expensive to find than one warning
|
|
72
|
+
* line, and reaching this branch always means a real, fixable packaging mistake.
|
|
73
|
+
* Warning exactly once falls out of the memo — the body runs at most one time.
|
|
74
|
+
*/
|
|
75
|
+
function glassIsUsable() {
|
|
76
|
+
if (glassUsable !== undefined) return glassUsable;
|
|
77
|
+
try {
|
|
78
|
+
glassUsable = isLiquidGlassAvailable() && (typeof isGlassEffectAPIAvailable !== 'function' || isGlassEffectAPIAvailable());
|
|
79
|
+
} catch (error) {
|
|
80
|
+
glassUsable = false;
|
|
81
|
+
// eslint-disable-next-line no-console
|
|
82
|
+
console.warn('[Bloom] TabBar: expo-glass-effect could not report liquid-glass availability, ' + 'so the bar is painting its solid surface. Install expo-glass-effect and ' + 'rebuild the native app to get the glass capsule.', error);
|
|
83
|
+
}
|
|
84
|
+
return glassUsable;
|
|
85
|
+
}
|
|
26
86
|
export function TabBarSurface({
|
|
27
87
|
theme,
|
|
28
88
|
style
|
|
29
89
|
}) {
|
|
30
|
-
if (
|
|
90
|
+
if (AnimatedGlassView !== null && glassIsUsable()) {
|
|
31
91
|
return /*#__PURE__*/_jsx(AnimatedGlassView, {
|
|
32
92
|
glassEffectStyle: "regular",
|
|
33
93
|
style: [StyleSheet.absoluteFill, styles.surface, {
|
|
@@ -35,10 +95,9 @@ export function TabBarSurface({
|
|
|
35
95
|
}, style]
|
|
36
96
|
});
|
|
37
97
|
}
|
|
38
|
-
return /*#__PURE__*/_jsx(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}, style]
|
|
98
|
+
return /*#__PURE__*/_jsx(SolidTabBarSurface, {
|
|
99
|
+
theme: theme,
|
|
100
|
+
style: style
|
|
42
101
|
});
|
|
43
102
|
}
|
|
44
103
|
TabBarSurface.displayName = 'TabBarSurface';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["GlassView","isLiquidGlassAvailable","StyleSheet","Animated","jsx","_jsx","AnimatedGlassView","createAnimatedComponent","TabBarSurface","theme","style","glassEffectStyle","absoluteFill","styles","surface","backgroundColor","glassTint","
|
|
1
|
+
{"version":3,"names":["GlassView","isGlassEffectAPIAvailable","isLiquidGlassAvailable","StyleSheet","Animated","SolidTabBarSurface","jsx","_jsx","AnimatedGlassView","Boolean","createAnimatedComponent","glassUsable","glassIsUsable","undefined","error","console","warn","TabBarSurface","theme","style","glassEffectStyle","absoluteFill","styles","surface","backgroundColor","glassTint","displayName","create","borderCurve"],"sourceRoot":"../../../src","sources":["tab-bar/surface.native.tsx"],"mappings":";;AAAA;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,SAASA,SAAS,EAAEC,yBAAyB,EAAEC,sBAAsB,QAAQ,mBAAmB;AAChG,SAASC,UAAU,QAAQ,cAAc;AACzC,OAAOC,QAAQ,MAAM,yBAAyB;AAG9C,SAASC,kBAAkB,QAAQ,oBAAiB;;AAEpD;AACA;AACA;AACA;AACA;AAJA,SAAAC,GAAA,IAA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List":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* How much room a screen must leave at the bottom for the floating bar.
|
|
5
|
+
*
|
|
6
|
+
* The bar is `position: absolute` over the content, so nothing reserves space
|
|
7
|
+
* for it automatically — every scrollable screen under a tab layout has to pad
|
|
8
|
+
* its own content out from under the pill. That number is built from the bar's
|
|
9
|
+
* private geometry (its expanded height and the gap it keeps from the window's
|
|
10
|
+
* bottom edge), which is exactly why it is exported as a hook: hardcoding it in
|
|
11
|
+
* an app silently drifts the moment the bar changes by a pixel.
|
|
12
|
+
*
|
|
13
|
+
* Platform-neutral, like the rest of the family — `react-native-safe-area-context`
|
|
14
|
+
* is already a required Bloom peer and is what the bar itself measures with.
|
|
15
|
+
*/
|
|
16
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
17
|
+
import { EXPANDED_HEIGHT, tabBarBottomGap } from "./shared.js";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The vertical space the tab bar occupies above the bottom of the window, in
|
|
21
|
+
* px. Use it directly as the bottom padding (or bottom offset) of anything that
|
|
22
|
+
* would otherwise sit under the bar:
|
|
23
|
+
*
|
|
24
|
+
* ```tsx
|
|
25
|
+
* const reserved = useTabBarReservedSpace();
|
|
26
|
+
*
|
|
27
|
+
* <Animated.ScrollView contentContainerStyle={{ paddingBottom: reserved }} />
|
|
28
|
+
* <Fab style={{ position: 'absolute', right: 16, bottom: reserved + 12 }} />
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* The value ALREADY INCLUDES the bottom safe-area inset — the bar folds the
|
|
32
|
+
* inset into its own bottom gap, so it is measured from the true window edge,
|
|
33
|
+
* not from the safe area. Never write `reserved + insets.bottom`: that counts
|
|
34
|
+
* the home indicator twice and strands a visible band of dead space under every
|
|
35
|
+
* list (a 76px bar reserving 110px on an iOS device or PWA). It is the whole
|
|
36
|
+
* number; nothing needs adding to it.
|
|
37
|
+
*
|
|
38
|
+
* It is the EXPANDED height, deliberately. The bar minimizes while scrolling
|
|
39
|
+
* down and re-expands on the way up, so reserving the minimized height would
|
|
40
|
+
* hide the end of a list the moment the user scrolled back to it.
|
|
41
|
+
*/
|
|
42
|
+
export function useTabBarReservedSpace() {
|
|
43
|
+
const insets = useSafeAreaInsets();
|
|
44
|
+
return tabBarBottomGap(insets.bottom) + EXPANDED_HEIGHT;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=use-reserved-space.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useSafeAreaInsets","EXPANDED_HEIGHT","tabBarBottomGap","useTabBarReservedSpace","insets","bottom"],"sourceRoot":"../../../src","sources":["tab-bar/use-reserved-space.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,iBAAiB,QAAQ,gCAAgC;AAElE,SAASC,eAAe,EAAEC,eAAe,QAAQ,aAAU;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CAAA,EAAW;EAC/C,MAAMC,MAAM,GAAGJ,iBAAiB,CAAC,CAAC;EAClC,OAAOE,eAAe,CAACE,MAAM,CAACC,MAAM,CAAC,GAAGJ,eAAe;AACzD","ignoreList":[]}
|
|
@@ -3,7 +3,8 @@ import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
|
3
3
|
export interface BenefitRowProps {
|
|
4
4
|
/**
|
|
5
5
|
* Leading icon — rendered inside a rounded `fill-secondary` square. Pass a
|
|
6
|
-
* Bloom icon element (e.g. `<Icons.
|
|
6
|
+
* Bloom icon element (e.g. `<Icons.Lock_Stroke2_Corner0_Rounded size="sm" />`,
|
|
7
|
+
* suffix included — there is no shortened alias) or any node.
|
|
7
8
|
*/
|
|
8
9
|
icon: ReactNode;
|
|
9
10
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/benefit-list/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,MAAM,WAAW,eAAe;IAC9B
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/benefit-list/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,sEAAsE;IACtE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,6CAA6C;IAC7C,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,gBAAgB;IAC/B,oEAAoE;IACpE,QAAQ,EAAE,SAAS,CAAC;IACpB,wCAAwC;IACxC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B"}
|
|
@@ -53,8 +53,10 @@ export interface FabProps {
|
|
|
53
53
|
onPress?: () => void;
|
|
54
54
|
/**
|
|
55
55
|
* The icon to render inside the FAB. Typically a Bloom icon element
|
|
56
|
-
* (`<Icons.
|
|
57
|
-
*
|
|
56
|
+
* (`<Icons.PlusLarge_Stroke2_Corner0_Rounded />` — icon exports carry their full
|
|
57
|
+
* style and corner suffix, and there is no shortened alias). For an icon-only
|
|
58
|
+
* FAB this is the whole content; for the extended variant it sits to the left of
|
|
59
|
+
* the `label`.
|
|
58
60
|
*
|
|
59
61
|
* `children` is accepted as an alias/override of `icon` for ergonomics — if
|
|
60
62
|
* both are given, `icon` wins and `children` is ignored.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/fab/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE;;;;;;;;GAQG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;AAE7D;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,YAAY,GACpB,cAAc,GACd,aAAa,GACb,WAAW,GACX,UAAU,GACV,QAAQ,CAAC;AAEb,MAAM,WAAW,QAAQ;IACvB,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/fab/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE;;;;;;;;GAQG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;AAE7D;;;;;;;;;;;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4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6DAA6D;IAC7D,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;CACtC"}
|
|
@@ -52,9 +52,19 @@ export declare function resolveFrostedPalette(colors: ThemeColors, isDark: boole
|
|
|
52
52
|
* Inject `color` as the icon's `fill` — but only as a FALLBACK: if the caller
|
|
53
53
|
* already set an explicit `fill` on the icon element, it wins and the node is
|
|
54
54
|
* returned untouched. Bloom icons resolve their paint as `fill ?? style.color`,
|
|
55
|
-
* so
|
|
55
|
+
* so any bare Bloom icon element gets the theme-aware color for free while an
|
|
56
56
|
* explicitly-colored icon is never overridden. Non-element children (plain
|
|
57
57
|
* text/strings) pass through unchanged.
|
|
58
|
+
*
|
|
59
|
+
* KNOWN LIMIT, deliberately not papered over: an icon component that paints from
|
|
60
|
+
* a `color` PROP rather than from `fill`/`style.color` ignores this entirely, and
|
|
61
|
+
* does so SILENTLY — nothing throws, the glyph renders, it simply never takes the
|
|
62
|
+
* tint. `color` is not injected alongside `fill` because the prop is not ours to
|
|
63
|
+
* claim: components use it for semantic variants (`color="danger"`), so writing an
|
|
64
|
+
* `rgb(…)` string into it can produce a worse failure than the one it fixes, and
|
|
65
|
+
* an icon already carrying its own `color` would be clobbered. Consumers with such
|
|
66
|
+
* a set pre-color the element themselves; the tab bar additionally offers
|
|
67
|
+
* `TabBarItem.activeIcon`, which carries selection by shape instead of by tint.
|
|
58
68
|
*/
|
|
59
69
|
export declare function applyIconColor(node: ReactNode, color: string): ReactNode;
|
|
60
70
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/frosted-icon-button/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAGx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W,eAAe;IAC9B,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAC;CACd;AASD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,qBAAqB,GAAG,MAAM,GAAG,eAAe,CASxF;AAiBD,iEAAiE;AACjE,MAAM,WAAW,cAAc;IAC7B,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,YAAY,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,aAAa,EAAE,MAAM,CAAC;IACtB,gCAAgC;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,GAAG,cAAc,CAa1F;AAKD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAKxE"}
|
|
@@ -15,7 +15,8 @@ export interface FrostedIconButtonProps {
|
|
|
15
15
|
onPress?: () => void;
|
|
16
16
|
/**
|
|
17
17
|
* The icon to render, centered inside the circle. Typically a Bloom icon
|
|
18
|
-
* element (`<Icons.
|
|
18
|
+
* element (`<Icons.ArrowLeft_Stroke2_Corner0_Rounded />` — icon exports carry
|
|
19
|
+
* their full style and corner suffix). If the icon does not set its own `fill`,
|
|
19
20
|
* the button injects the theme-aware icon color (foreground when frosted,
|
|
20
21
|
* `primaryForeground` when `active`) as a fallback so a bare icon is colored
|
|
21
22
|
* correctly out of the box; an explicit `fill` on the icon always wins.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/frosted-icon-button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,GAAG,IAAI,CAAC;AAEhD,MAAM,WAAW,sBAAsB;IACrC,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/frosted-icon-button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,GAAG,IAAI,CAAC;AAEhD,MAAM,WAAW,sBAAsB;IACrC,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,IAAI,CAAC,EAAE,qBAAqB,GAAG,MAAM,CAAC;IAEtC,4EAA4E;IAC5E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,8CAA8C;IAC9C,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,OAAO,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAUvE,wDAAwD;IACxD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC/D,mEAAmE;IACnE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6DAA6D;IAC7D,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;CACtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabBarBase.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/TabBarBase.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAOL,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AAgBf,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,
|
|
1
|
+
{"version":3,"file":"TabBarBase.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/TabBarBase.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAOL,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AAgBf,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAiBL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAe,MAAM,SAAS,CAAC;AAqa3E;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,aAAa,CAAC,kBAAkB,CAAC,EAC1C,IAAI,EAAE,aAAa,CAAC,oBAAoB,CAAC;YAElB,WAAW;;EAGnC;AAED,+EAA+E;AAC/E,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,CAAC,gBAAgB,CAAC;YAC1C,iBAAiB;;EAG/C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TabBarGlyphProps } from './shared';
|
|
2
|
-
export declare function TabBarGlyph({ item, tint, size }: TabBarGlyphProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function TabBarGlyph({ item, tint, size, active }: TabBarGlyphProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare namespace TabBarGlyph {
|
|
4
4
|
var displayName: string;
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glyph.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/glyph.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"glyph.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/glyph.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,gBAAgB,2CAazE;yBAbe,WAAW"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TabBarGlyphProps } from './shared';
|
|
2
|
-
export declare function TabBarGlyph({ item, tint, size }: TabBarGlyphProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function TabBarGlyph({ item, tint, size, active }: TabBarGlyphProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare namespace TabBarGlyph {
|
|
4
4
|
var displayName: string;
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glyph.native.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/glyph.native.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"glyph.native.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/glyph.native.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,gBAAgB,2CA2BzE;yBA3Be,WAAW"}
|
|
@@ -8,5 +8,6 @@ export declare const TabBarButton: {
|
|
|
8
8
|
};
|
|
9
9
|
export { MINIMIZE_SPRING, setMinimized, TabBarMinimizeProvider, useMinimizeOnScroll, useMinimizeState, useTabBarMinimized, } from './minimize-context';
|
|
10
10
|
export type { MinimizeState } from './minimize-context';
|
|
11
|
+
export { useTabBarReservedSpace } from './use-reserved-space';
|
|
11
12
|
export type { TabBarButtonProps, TabBarItem, TabBarProps, TabBarTheme } from './types';
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/index.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,MAAM;;;CAA+C,CAAC;AACnE,eAAO,MAAM,YAAY;;;CAAkC,CAAC;AAE5D,OAAO,EACL,eAAe,EACf,YAAY,EACZ,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/index.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,MAAM;;;CAA+C,CAAC;AACnE,eAAO,MAAM,YAAY;;;CAAkC,CAAC;AAE5D,OAAO,EACL,eAAe,EACf,YAAY,EACZ,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -8,5 +8,6 @@ export declare const TabBarButton: {
|
|
|
8
8
|
};
|
|
9
9
|
export { MINIMIZE_SPRING, setMinimized, TabBarMinimizeProvider, useMinimizeOnScroll, useMinimizeState, useTabBarMinimized, } from './minimize-context';
|
|
10
10
|
export type { MinimizeState } from './minimize-context';
|
|
11
|
+
export { useTabBarReservedSpace } from './use-reserved-space';
|
|
11
12
|
export type { TabBarButtonProps, TabBarItem, TabBarProps, TabBarTheme } from './types';
|
|
12
13
|
//# sourceMappingURL=index.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/index.web.tsx"],"names":[],"mappings":"AAqBA,eAAO,MAAM,MAAM;;;CAA+C,CAAC;AACnE,eAAO,MAAM,YAAY;;;CAAkC,CAAC;AAE5D,OAAO,EACL,eAAe,EACf,YAAY,EACZ,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/index.web.tsx"],"names":[],"mappings":"AAqBA,eAAO,MAAM,MAAM;;;CAA+C,CAAC;AACnE,eAAO,MAAM,YAAY;;;CAAkC,CAAC;AAE5D,OAAO,EACL,eAAe,EACf,YAAY,EACZ,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -26,6 +26,15 @@ export declare const HIGHLIGHT_MINIMIZED: number;
|
|
|
26
26
|
export declare const BLUR_BLEED = 44;
|
|
27
27
|
/** Label type size. Small by design — the icon carries the meaning. */
|
|
28
28
|
export declare const LABEL_FONT_SIZE = 9.5;
|
|
29
|
+
/**
|
|
30
|
+
* Vertical gap between the bottom of the pill and the bottom of the window.
|
|
31
|
+
*
|
|
32
|
+
* The safe-area inset is folded in HERE, which is why anything reserving layout
|
|
33
|
+
* space for the bar must go through `useTabBarReservedSpace` (which derives its
|
|
34
|
+
* number from this same function) rather than adding `insets.bottom` to a
|
|
35
|
+
* hardcoded height — that double-counts the inset.
|
|
36
|
+
*/
|
|
37
|
+
export declare function tabBarBottomGap(bottomInset: number): number;
|
|
29
38
|
/**
|
|
30
39
|
* Slide spring: interruptible by design — rapid tab-hopping retargets with
|
|
31
40
|
* preserved velocity. Slight under-damping gives the pill a tiny settle, safe
|
|
@@ -35,6 +44,14 @@ export declare const SLIDE_SPRING: {
|
|
|
35
44
|
duration: number;
|
|
36
45
|
dampingRatio: number;
|
|
37
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* How long a press must be held before `onIndexLongPress` fires.
|
|
49
|
+
*
|
|
50
|
+
* Comfortably above the tap gesture's own 400ms ceiling: the two can never both
|
|
51
|
+
* be candidates at the same instant, so arming the long press cannot cost the
|
|
52
|
+
* bar a tap. Matches the platform long-press feel (iOS ~0.5s).
|
|
53
|
+
*/
|
|
54
|
+
export declare const LONG_PRESS_MIN_DURATION = 500;
|
|
38
55
|
/**
|
|
39
56
|
* Resolve the bar's five colors from Bloom's theme tokens, with an optional
|
|
40
57
|
* partial override on top.
|
|
@@ -89,5 +106,13 @@ export interface TabBarGlyphProps {
|
|
|
89
106
|
tint: string;
|
|
90
107
|
/** Rendered icon size in px ({@link ICON_SIZE}). */
|
|
91
108
|
size: number;
|
|
109
|
+
/**
|
|
110
|
+
* Which crossfade layer this is: `false` for the inactive one underneath,
|
|
111
|
+
* `true` for the one fading in on top. The active layer renders
|
|
112
|
+
* `item.activeIcon` when the item has one, so a set that expresses selection
|
|
113
|
+
* by shape (outline → filled) crossfades between two different nodes rather
|
|
114
|
+
* than between two tints of the same node.
|
|
115
|
+
*/
|
|
116
|
+
active: boolean;
|
|
92
117
|
}
|
|
93
118
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/shared.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW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|
|
1
|
+
import type { TabBarSurfaceProps } from './shared';
|
|
2
|
+
export declare function SolidTabBarSurface({ theme, style }: TabBarSurfaceProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare namespace SolidTabBarSurface {
|
|
4
|
+
var displayName: string;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=surface-solid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surface-solid.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/surface-solid.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,kBAAkB,2CAWtE;yBAXe,kBAAkB"}
|
|
@@ -1,6 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Ported from expo-glass-tabs v0.1.1 — src/glass-tab-bar.tsx
|
|
3
|
+
* (MIT © 2026 David Mokos). See the top-level NOTICE.
|
|
4
|
+
*
|
|
5
|
+
* NEUTRAL default variant of the tab bar's capsule surface: the non-glass one.
|
|
6
|
+
*
|
|
7
|
+
* This is the file resolved by everything that does NOT do React Native's
|
|
8
|
+
* platform-extension resolution — a consumer's `tsc` (which follows Bloom's
|
|
9
|
+
* `"react-native"` source export condition) and any non-Metro bundler reading
|
|
10
|
+
* the published `lib/`. It therefore imports NOTHING platform-specific:
|
|
11
|
+
* `expo-glass-effect` is native-only, and a static import of it from a file a
|
|
12
|
+
* web bundler or a consumer's type-checker resolves would break module
|
|
13
|
+
* resolution outright. Same three-way split, for the same reason, as
|
|
14
|
+
* `theme/native-root-vars{,.native,.web}.ts`.
|
|
15
|
+
*
|
|
16
|
+
* The surface itself lives in `surface-solid.tsx`, because `surface.native.tsx`
|
|
17
|
+
* renders it as its own fallback and cannot import this file to get it — Metro
|
|
18
|
+
* resolves `./surface` back to `surface.native.tsx`, i.e. to itself. This module's
|
|
19
|
+
* job is to give that one implementation the name every entry module imports.
|
|
20
|
+
*
|
|
21
|
+
* The variants — all three implement `TabBarSurfaceProps` exactly, so the entry
|
|
22
|
+
* modules can swap them freely:
|
|
23
|
+
* - `surface.native.tsx` — iOS/Android (Metro), real `UIGlassEffect` glass, with
|
|
24
|
+
* the solid surface as its fallback;
|
|
25
|
+
* - `surface.web.tsx` — web, a CSS `backdrop-filter`;
|
|
26
|
+
* - this file — everywhere else, the opaque fallback alone.
|
|
27
|
+
*/
|
|
28
|
+
export { SolidTabBarSurface as TabBarSurface } from './surface-solid';
|
|
6
29
|
//# sourceMappingURL=surface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/surface.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/surface.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,kBAAkB,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface.native.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/surface.native.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"surface.native.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/surface.native.tsx"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AA8CnD,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,kBAAkB,2CAgBjE;yBAhBe,aAAa"}
|
|
@@ -18,13 +18,38 @@ export type TabBarItem = {
|
|
|
18
18
|
/** Text under the icon; fades out and is clipped when the bar minimizes. */
|
|
19
19
|
label: string;
|
|
20
20
|
/**
|
|
21
|
-
* The glyph, as a Bloom icon element (`<Icons.
|
|
22
|
-
*
|
|
23
|
-
*
|
|
21
|
+
* The glyph, as a Bloom icon element (`<Icons.Home_Stroke2_Corner0_Rounded />`)
|
|
22
|
+
* or any node. Every `@oxyhq/bloom/icons` export carries its full style and
|
|
23
|
+
* corner suffix; a shortened `Home` is not an export, and a name that does not
|
|
24
|
+
* exist is simply `undefined`, which React then rejects as an invalid element
|
|
25
|
+
* type. This is the primary icon API — same convention as `Tabs`/`TabsTrigger`
|
|
26
|
+
* and `FrostedIconButton`. The bar renders it TWICE (an inactive layer with the
|
|
24
27
|
* active layer crossfading on top), injecting the layer's tint as the icon's
|
|
25
|
-
* `fill` unless the element already sets one.
|
|
28
|
+
* `fill` unless the element already sets one. See {@link TabBarItem.activeIcon}
|
|
29
|
+
* for a set whose selected state is a different shape rather than a tint.
|
|
26
30
|
*/
|
|
27
31
|
icon: ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Optional second node rendered by the ACTIVE crossfade layer instead of
|
|
34
|
+
* `icon`; without it that layer renders `icon` again, which is the original
|
|
35
|
+
* behaviour.
|
|
36
|
+
*
|
|
37
|
+
* For icon sets that express selection by SHAPE rather than by tint — an
|
|
38
|
+
* outline glyph that becomes a filled one, with a different path — a tint
|
|
39
|
+
* crossfade cannot say what the set says, because both layers would draw the
|
|
40
|
+
* same shape in two colors. Supplying the filled variant here makes the
|
|
41
|
+
* existing crossfade swap NODES, so the outline dissolves into the fill.
|
|
42
|
+
*
|
|
43
|
+
* It is also the escape hatch for an icon that ignores the injected tint: the
|
|
44
|
+
* bar tints a glyph by cloning it with a `fill` prop (see `applyIconColor`),
|
|
45
|
+
* so an icon set that paints from a `color` prop instead never lights up, with
|
|
46
|
+
* no error. Pre-color both nodes yourself and the crossfade still works.
|
|
47
|
+
*
|
|
48
|
+
* On iOS an item carrying `sfSymbol` renders the symbol on both layers and
|
|
49
|
+
* ignores this — a symbol is tinted natively, so the tint crossfade is the
|
|
50
|
+
* right expression there.
|
|
51
|
+
*/
|
|
52
|
+
activeIcon?: ReactNode;
|
|
28
53
|
/**
|
|
29
54
|
* Optional SF Symbol name, used INSTEAD of `icon` on iOS only. A pure
|
|
30
55
|
* enhancement handled solely in `glyph.native.tsx`; the neutral and web
|
|
@@ -57,6 +82,20 @@ export type TabBarProps = ViewProps & {
|
|
|
57
82
|
* or by keyboard/assistive-technology activation of a `TabBarButton`.
|
|
58
83
|
*/
|
|
59
84
|
onIndexChange?: (index: number) => void;
|
|
85
|
+
/**
|
|
86
|
+
* Called with the index under the finger when a tab is pressed and HELD.
|
|
87
|
+
*
|
|
88
|
+
* This is the only way to reach a long press on the bar: its gesture detector
|
|
89
|
+
* consumes the touches (that is what makes scrubbing possible), so a button's
|
|
90
|
+
* own `onLongPress` never fires for a real finger. The gesture is added to the
|
|
91
|
+
* bar's gesture race only when this prop is supplied — holding still for half
|
|
92
|
+
* a second on a bar without it keeps behaving exactly as before, and can still
|
|
93
|
+
* start a scrub.
|
|
94
|
+
*
|
|
95
|
+
* Long-pressing does NOT move the highlight or select the tab; it is a
|
|
96
|
+
* secondary action (an account switcher on the profile tab, say).
|
|
97
|
+
*/
|
|
98
|
+
onIndexLongPress?: (index: number) => void;
|
|
60
99
|
/** Partial override of the theme resolved from Bloom's color tokens. */
|
|
61
100
|
theme?: Partial<TabBarTheme>;
|
|
62
101
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9D,MAAM,MAAM,UAAU,GAAG;IACvB,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;I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G,cAAc,GAAG;IAC/C,IAAI,EAAE,UAAU,CAAC;IACjB,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The vertical space the tab bar occupies above the bottom of the window, in
|
|
3
|
+
* px. Use it directly as the bottom padding (or bottom offset) of anything that
|
|
4
|
+
* would otherwise sit under the bar:
|
|
5
|
+
*
|
|
6
|
+
* ```tsx
|
|
7
|
+
* const reserved = useTabBarReservedSpace();
|
|
8
|
+
*
|
|
9
|
+
* <Animated.ScrollView contentContainerStyle={{ paddingBottom: reserved }} />
|
|
10
|
+
* <Fab style={{ position: 'absolute', right: 16, bottom: reserved + 12 }} />
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* The value ALREADY INCLUDES the bottom safe-area inset — the bar folds the
|
|
14
|
+
* inset into its own bottom gap, so it is measured from the true window edge,
|
|
15
|
+
* not from the safe area. Never write `reserved + insets.bottom`: that counts
|
|
16
|
+
* the home indicator twice and strands a visible band of dead space under every
|
|
17
|
+
* list (a 76px bar reserving 110px on an iOS device or PWA). It is the whole
|
|
18
|
+
* number; nothing needs adding to it.
|
|
19
|
+
*
|
|
20
|
+
* It is the EXPANDED height, deliberately. The bar minimizes while scrolling
|
|
21
|
+
* down and re-expands on the way up, so reserving the minimized height would
|
|
22
|
+
* hide the end of a list the moment the user scrolled back to it.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useTabBarReservedSpace(): number;
|
|
25
|
+
//# sourceMappingURL=use-reserved-space.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-reserved-space.d.ts","sourceRoot":"","sources":["../../../../src/tab-bar/use-reserved-space.ts"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAG/C"}
|
|
@@ -3,7 +3,8 @@ import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
|
3
3
|
export interface BenefitRowProps {
|
|
4
4
|
/**
|
|
5
5
|
* Leading icon — rendered inside a rounded `fill-secondary` square. Pass a
|
|
6
|
-
* Bloom icon element (e.g. `<Icons.
|
|
6
|
+
* Bloom icon element (e.g. `<Icons.Lock_Stroke2_Corner0_Rounded size="sm" />`,
|
|
7
|
+
* suffix included — there is no shortened alias) or any node.
|
|
7
8
|
*/
|
|
8
9
|
icon: ReactNode;
|
|
9
10
|
/**
|