@oxyhq/bloom 0.62.0 → 0.63.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/bottom-sheet/BottomSheetBase.js +11 -9
- package/lib/commonjs/bottom-sheet/BottomSheetBase.js.map +1 -1
- package/lib/commonjs/dialog/Dialog.js +8 -15
- package/lib/commonjs/dialog/Dialog.js.map +1 -1
- package/lib/commonjs/dialog/Dialog.web.js +2 -9
- package/lib/commonjs/dialog/Dialog.web.js.map +1 -1
- package/lib/commonjs/dialog/DialogBottomSheet.js +0 -2
- package/lib/commonjs/dialog/DialogBottomSheet.js.map +1 -1
- package/lib/commonjs/dialog/placement.js +1 -4
- package/lib/commonjs/dialog/placement.js.map +1 -1
- package/lib/commonjs/overlay/index.js +9 -2
- package/lib/commonjs/overlay/index.js.map +1 -1
- package/lib/commonjs/zoomable-image-gallery/ZoomableImageGallery.js +0 -1
- package/lib/commonjs/zoomable-image-gallery/ZoomableImageGallery.js.map +1 -1
- package/lib/module/bottom-sheet/BottomSheetBase.js +12 -10
- package/lib/module/bottom-sheet/BottomSheetBase.js.map +1 -1
- package/lib/module/dialog/Dialog.js +10 -17
- package/lib/module/dialog/Dialog.js.map +1 -1
- package/lib/module/dialog/Dialog.web.js +3 -10
- package/lib/module/dialog/Dialog.web.js.map +1 -1
- package/lib/module/dialog/DialogBottomSheet.js +1 -3
- package/lib/module/dialog/DialogBottomSheet.js.map +1 -1
- package/lib/module/dialog/placement.js +0 -3
- package/lib/module/dialog/placement.js.map +1 -1
- package/lib/module/overlay/index.js +9 -2
- package/lib/module/overlay/index.js.map +1 -1
- package/lib/module/zoomable-image-gallery/ZoomableImageGallery.js +0 -1
- package/lib/module/zoomable-image-gallery/ZoomableImageGallery.js.map +1 -1
- package/lib/typescript/commonjs/bottom-sheet/BottomSheetBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/Dialog.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/DialogBottomSheet.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/placement.d.ts +0 -2
- package/lib/typescript/commonjs/dialog/placement.d.ts.map +1 -1
- package/lib/typescript/commonjs/overlay/index.d.ts +9 -2
- package/lib/typescript/commonjs/overlay/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/zoomable-image-gallery/ZoomableImageGallery.d.ts.map +1 -1
- package/lib/typescript/module/bottom-sheet/BottomSheetBase.d.ts.map +1 -1
- package/lib/typescript/module/dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/module/dialog/Dialog.web.d.ts.map +1 -1
- package/lib/typescript/module/dialog/DialogBottomSheet.d.ts.map +1 -1
- package/lib/typescript/module/dialog/placement.d.ts +0 -2
- package/lib/typescript/module/dialog/placement.d.ts.map +1 -1
- package/lib/typescript/module/overlay/index.d.ts +9 -2
- package/lib/typescript/module/overlay/index.d.ts.map +1 -1
- package/lib/typescript/module/zoomable-image-gallery/ZoomableImageGallery.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/animated-style-deps.test.ts +1 -1
- package/src/bottom-sheet/BottomSheetBase.tsx +12 -10
- package/src/dialog/Dialog.tsx +9 -17
- package/src/dialog/Dialog.web.tsx +1 -8
- package/src/dialog/DialogBottomSheet.tsx +0 -2
- package/src/dialog/placement.ts +0 -2
- package/src/overlay/index.tsx +9 -2
- package/src/zoomable-image-gallery/ZoomableImageGallery.tsx +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placement.d.ts","sourceRoot":"","sources":["../../../../src/dialog/placement.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErE;;;;;;;;;GASG;AACH,MAAM,MAAM,yBAAyB,GACjC,eAAe,GACf;IACE,IAAI,EAAE,eAAe,CAAC;IACtB,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,EAAE,CAAC,EAAE,eAAe,CAAC;CACtB,CAAC;AAEN;;;;;GAKG;AACH,eAAO,MAAM,aAAa,KAAiB,CAAC;AAC5C,eAAO,MAAM,aAAa,KAAiB,CAAC;AAC5C,eAAO,MAAM,aAAa,MAAiB,CAAC;AAC5C,eAAO,MAAM,aAAa,MAAiB,CAAC;AAU5C,qDAAqD;AACrD,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,gFAAgF;AAChF,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C,4EAA4E;AAC5E,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C,6EAA6E;AAC7E,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,KAAK,CAAC;AAEjD,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,0EAA0E;AAC1E,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C,oEAAoE;AACpE,eAAO,MAAM,QAAQ,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"placement.d.ts","sourceRoot":"","sources":["../../../../src/dialog/placement.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErE;;;;;;;;;GASG;AACH,MAAM,MAAM,yBAAyB,GACjC,eAAe,GACf;IACE,IAAI,EAAE,eAAe,CAAC;IACtB,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,EAAE,CAAC,EAAE,eAAe,CAAC;CACtB,CAAC;AAEN;;;;;GAKG;AACH,eAAO,MAAM,aAAa,KAAiB,CAAC;AAC5C,eAAO,MAAM,aAAa,KAAiB,CAAC;AAC5C,eAAO,MAAM,aAAa,MAAiB,CAAC;AAC5C,eAAO,MAAM,aAAa,MAAiB,CAAC;AAU5C,qDAAqD;AACrD,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,gFAAgF;AAChF,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C,4EAA4E;AAC5E,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C,6EAA6E;AAC7E,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,KAAK,CAAC;AAEjD,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,0EAA0E;AAC1E,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C,oEAAoE;AACpE,eAAO,MAAM,QAAQ,mCAAmC,CAAC;AAGzD,+EAA+E;AAC/E,eAAO,MAAM,4BAA4B,gCAAgC,CAAC;AAE1E,sDAAsD;AACtD,eAAO,MAAM,YAAY,KAAK,CAAC;AAC/B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B;;;GAGG;AACH,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,yBAAyB,GAAG,SAAS,GAC/C,eAAe,CAcjB"}
|
|
@@ -47,8 +47,15 @@ import { type SharedValue } from 'react-native-reanimated';
|
|
|
47
47
|
* not in how the app behind them recedes.
|
|
48
48
|
*/
|
|
49
49
|
export declare const BACKDROP_BLUR_INTENSITY = 80;
|
|
50
|
-
/**
|
|
51
|
-
|
|
50
|
+
/**
|
|
51
|
+
* Extra dim laid OVER the blur. The blur already paints its own tint wash
|
|
52
|
+
* (`rgba(25,25,25,~0.62)` at the intensity above), so this is what takes the
|
|
53
|
+
* total to roughly 0.72 — dark enough to read a panel against, still clearly
|
|
54
|
+
* see-through. Every surface uses this one value: with each of them picking its
|
|
55
|
+
* own, menus landed at ~0.83 and read as solid black next to the image viewer's
|
|
56
|
+
* ~0.72.
|
|
57
|
+
*/
|
|
58
|
+
export declare const BACKDROP_DIM_OPACITY = 0.28;
|
|
52
59
|
export interface OverlayRootProps {
|
|
53
60
|
children?: ReactNode;
|
|
54
61
|
style?: StyleProp<ViewStyle>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/overlay/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAiB,EAAoB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAMvF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/overlay/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAiB,EAAoB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAMvF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAEzC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,gBAAgB,2CAMxE;yBANe,WAAW;;;AAU3B,MAAM,WAAW,aAAa;IAC5B,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC/B,iFAAiF;IACjF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6DAA6D;IAC7D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IACxC,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wBAAwB;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;;OAGG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,sFAAsF;IACtF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,eAAO,MAAM,QAAQ,qDAgEnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoomableImageGallery.d.ts","sourceRoot":"","sources":["../../../../src/zoomable-image-gallery/ZoomableImageGallery.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAoEjF,OAAO,KAAK,EAGV,0BAA0B,EAC1B,yBAAyB,EAC1B,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ZoomableImageGallery.d.ts","sourceRoot":"","sources":["../../../../src/zoomable-image-gallery/ZoomableImageGallery.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAoEjF,OAAO,KAAK,EAGV,0BAA0B,EAC1B,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AAi7BjB,eAAO,MAAM,oBAAoB,8GAA4B,CAAC;AAyK9D,eAAe,oBAAoB,CAAC"}
|
package/package.json
CHANGED
|
@@ -35,7 +35,7 @@ const MAPPERS = ['useAnimatedStyle', 'useDerivedValue', 'useAnimatedProps'] as c
|
|
|
35
35
|
const ALLOWED: Array<{ file: string; count: number; reason: string }> = [
|
|
36
36
|
{
|
|
37
37
|
file: 'dialog/Dialog.tsx',
|
|
38
|
-
count:
|
|
38
|
+
count: 1,
|
|
39
39
|
reason:
|
|
40
40
|
'Native-only fork: web resolves Dialog.web.tsx (see dialog/index.web.ts), ' +
|
|
41
41
|
'and on native the worklets plugin auto-tracks reads, so the deps array is ' +
|
|
@@ -26,7 +26,7 @@ import Animated, {
|
|
|
26
26
|
withTiming,
|
|
27
27
|
} from 'react-native-reanimated';
|
|
28
28
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
29
|
-
import { Backdrop } from '../overlay';
|
|
29
|
+
import { Backdrop, BACKDROP_DIM_OPACITY } from '../overlay';
|
|
30
30
|
import { useTheme } from '../theme/use-theme';
|
|
31
31
|
|
|
32
32
|
/** Hook that returns current screen dimensions and updates on rotation/resize. */
|
|
@@ -214,7 +214,7 @@ export const BottomSheetBase = forwardRef((props: BottomSheetBaseProps, ref: Rea
|
|
|
214
214
|
onDismissAttempt,
|
|
215
215
|
detached = false,
|
|
216
216
|
showHandle = true,
|
|
217
|
-
backdropOpacity =
|
|
217
|
+
backdropOpacity = BACKDROP_DIM_OPACITY,
|
|
218
218
|
scrollable = true,
|
|
219
219
|
manualActivation = false,
|
|
220
220
|
dynamicBackdrop = false,
|
|
@@ -654,8 +654,8 @@ export const BottomSheetBase = forwardRef((props: BottomSheetBaseProps, ref: Rea
|
|
|
654
654
|
'clamp',
|
|
655
655
|
)
|
|
656
656
|
: 1;
|
|
657
|
-
return opacity.value *
|
|
658
|
-
}, [
|
|
657
|
+
return opacity.value * dragFactor;
|
|
658
|
+
}, [dynamicBackdrop, opacity, translateY, screenHeightSV]);
|
|
659
659
|
|
|
660
660
|
// Only the consumer-supplied `backdropComponent` needs the progress as a
|
|
661
661
|
// style — it owns its own visuals, blur included, so the ancestor-opacity
|
|
@@ -806,12 +806,14 @@ export const BottomSheetBase = forwardRef((props: BottomSheetBaseProps, ref: Rea
|
|
|
806
806
|
// switched off here to keep a single source of dimming.
|
|
807
807
|
<Backdrop
|
|
808
808
|
onPress={handleBackdropPress}
|
|
809
|
-
// `
|
|
810
|
-
//
|
|
811
|
-
//
|
|
812
|
-
//
|
|
813
|
-
//
|
|
814
|
-
|
|
809
|
+
// `progress` is the FADE (0 → 1, folding the drag);
|
|
810
|
+
// how dark the backdrop gets is `backdropOpacity`,
|
|
811
|
+
// which defaults to the library-wide dim so a sheet
|
|
812
|
+
// matches every other surface. It goes through
|
|
813
|
+
// `progress` rather than an animated style because an
|
|
814
|
+
// opacity on the root would sit above the blur layer
|
|
815
|
+
// and neutralise it.
|
|
816
|
+
dimOpacity={backdropOpacity}
|
|
815
817
|
progress={backdropProgress}
|
|
816
818
|
style={styles.backdrop}
|
|
817
819
|
/>
|
package/src/dialog/Dialog.tsx
CHANGED
|
@@ -26,6 +26,7 @@ import Animated, {
|
|
|
26
26
|
} from 'react-native-reanimated';
|
|
27
27
|
|
|
28
28
|
import { BottomSheet, type BottomSheetRef } from '../bottom-sheet';
|
|
29
|
+
import { Backdrop } from '../overlay';
|
|
29
30
|
import { Z_INDEX, Z_INDEX_LAYER_STEP } from '../styles/z-index';
|
|
30
31
|
import { useTheme } from '../theme/use-theme';
|
|
31
32
|
import { Context, useDialogControl } from './context';
|
|
@@ -46,7 +47,6 @@ import {
|
|
|
46
47
|
DEFAULT_SIDE_WIDTH,
|
|
47
48
|
DIALOG_SHEET_BACKDROP_TESTID,
|
|
48
49
|
PANEL_RADIUS,
|
|
49
|
-
SHEET_BACKDROP_OPACITY,
|
|
50
50
|
SIDE_SHEET_MIN_GUTTER,
|
|
51
51
|
useResolvedPlacement,
|
|
52
52
|
} from './placement';
|
|
@@ -486,10 +486,6 @@ function SideSheet({
|
|
|
486
486
|
if (dismissOnBackdrop) onDismiss();
|
|
487
487
|
}, [dismissOnBackdrop, onDismiss]);
|
|
488
488
|
|
|
489
|
-
const backdropAnimatedStyle = useAnimatedStyle(() => ({
|
|
490
|
-
opacity: progress.value * SHEET_BACKDROP_OPACITY,
|
|
491
|
-
}), []);
|
|
492
|
-
|
|
493
489
|
const hiddenSign = side === 'left' ? -1 : 1;
|
|
494
490
|
const panelAnimatedStyle = useAnimatedStyle(() => {
|
|
495
491
|
const hidden = 1 - progress.value;
|
|
@@ -533,18 +529,14 @@ function SideSheet({
|
|
|
533
529
|
]}
|
|
534
530
|
{...(containerClassName ? ({ className: containerClassName } as Record<string, string>) : {})}
|
|
535
531
|
>
|
|
536
|
-
<
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
disabled={!dismissOnBackdrop}
|
|
545
|
-
style={StyleSheet.absoluteFill}
|
|
546
|
-
/>
|
|
547
|
-
</Animated.View>
|
|
532
|
+
<Backdrop
|
|
533
|
+
testID={testID ? `${testID}-backdrop` : DIALOG_SHEET_BACKDROP_TESTID}
|
|
534
|
+
accessibilityLabel={label ? `Dismiss ${label}` : 'Dismiss dialog'}
|
|
535
|
+
onPress={handleBackdropPress}
|
|
536
|
+
disabled={!dismissOnBackdrop}
|
|
537
|
+
progress={progress}
|
|
538
|
+
style={sideStyles.backdrop}
|
|
539
|
+
/>
|
|
548
540
|
|
|
549
541
|
<Animated.View
|
|
550
542
|
accessibilityViewIsModal
|
|
@@ -47,7 +47,6 @@ import {
|
|
|
47
47
|
DIALOG_SHEET_BACKDROP_TESTID,
|
|
48
48
|
EASE_OUT,
|
|
49
49
|
PANEL_RADIUS,
|
|
50
|
-
SHEET_BACKDROP_OPACITY,
|
|
51
50
|
SIDE_SHEET_MIN_GUTTER,
|
|
52
51
|
useResolvedPlacement,
|
|
53
52
|
} from './placement';
|
|
@@ -60,11 +59,6 @@ import type {
|
|
|
60
59
|
|
|
61
60
|
const FADE_OUT_DURATION = CENTER_FADE_OUT_DURATION;
|
|
62
61
|
|
|
63
|
-
/**
|
|
64
|
-
* The centered card's scrim reads darker than a sheet's because the card floats
|
|
65
|
-
* in the middle of it; the shared blur underneath is identical.
|
|
66
|
-
*/
|
|
67
|
-
const DIALOG_BACKDROP_DIM_OPACITY = 0.6;
|
|
68
62
|
|
|
69
63
|
/**
|
|
70
64
|
* The four CSS `animation` shorthands driving the centered card and its backdrop.
|
|
@@ -331,7 +325,6 @@ function CenterOrSideDialog({
|
|
|
331
325
|
onPress={() => close()}
|
|
332
326
|
disabled={!dismissOnBackdrop}
|
|
333
327
|
accessibilityLabel={label ? `Dismiss ${label}` : 'Dismiss dialog'}
|
|
334
|
-
dimOpacity={DIALOG_BACKDROP_DIM_OPACITY}
|
|
335
328
|
// The fade rides on the LAYERS, never on the press target: an
|
|
336
329
|
// opacity animation on the blur's ancestor composites the group in
|
|
337
330
|
// isolation and leaves `backdrop-filter` nothing to sample.
|
|
@@ -705,7 +698,7 @@ function SheetSurface({
|
|
|
705
698
|
disabled={!dismissOnBackdrop}
|
|
706
699
|
// Same reason as the centred dialog: the transition and the opacity it
|
|
707
700
|
// animates belong to the layers, not to the press target above them.
|
|
708
|
-
dimOpacity
|
|
701
|
+
// No `dimOpacity` override — one darkness for every Bloom surface.
|
|
709
702
|
layerStyle={backdropTransition}
|
|
710
703
|
style={[sheetStyles.backdrop, { opacity: visible ? 1 : 0 }]}
|
|
711
704
|
/>
|
|
@@ -30,7 +30,6 @@ import {
|
|
|
30
30
|
DEFAULT_DIALOG_CONTENT_PADDING,
|
|
31
31
|
DEFAULT_MAX_HEIGHT_RATIO,
|
|
32
32
|
PANEL_RADIUS,
|
|
33
|
-
SHEET_BACKDROP_OPACITY,
|
|
34
33
|
} from './placement';
|
|
35
34
|
import type { DialogControlProps, DialogProps } from './types';
|
|
36
35
|
|
|
@@ -286,7 +285,6 @@ export function DialogBottomSheet({
|
|
|
286
285
|
}
|
|
287
286
|
// Stronger dim than a lone sheet so an underlying sheet's handle/content
|
|
288
287
|
// doesn't bleed through when a Dialog is stacked over one.
|
|
289
|
-
backdropOpacity={SHEET_BACKDROP_OPACITY + 0.3}
|
|
290
288
|
// Measures the sheet card — the size a morph starts from.
|
|
291
289
|
onLayout={morphState.onPanelLayout}
|
|
292
290
|
style={sheetStyle}
|
package/src/dialog/placement.ts
CHANGED
|
@@ -83,8 +83,6 @@ export const CENTER_FADE_OUT_DURATION = 150;
|
|
|
83
83
|
/** CSS approximation of reanimated's `Easing.out(Easing.cubic)`. */
|
|
84
84
|
export const EASE_OUT = 'cubic-bezier(0.33, 1, 0.68, 1)';
|
|
85
85
|
|
|
86
|
-
/** Backdrop dim opacity once fully shown (matches `bg-black/40`). */
|
|
87
|
-
export const SHEET_BACKDROP_OPACITY = 0.4;
|
|
88
86
|
|
|
89
87
|
/** Stable testID for the dimmed backdrop of a side/bottom placement dialog. */
|
|
90
88
|
export const DIALOG_SHEET_BACKDROP_TESTID = 'bloom-dialog-sheet-backdrop';
|
package/src/overlay/index.tsx
CHANGED
|
@@ -60,8 +60,15 @@ const AnimatedBlurView = Animated.createAnimatedComponent(BlurView);
|
|
|
60
60
|
* not in how the app behind them recedes.
|
|
61
61
|
*/
|
|
62
62
|
export const BACKDROP_BLUR_INTENSITY = 80;
|
|
63
|
-
/**
|
|
64
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Extra dim laid OVER the blur. The blur already paints its own tint wash
|
|
65
|
+
* (`rgba(25,25,25,~0.62)` at the intensity above), so this is what takes the
|
|
66
|
+
* total to roughly 0.72 — dark enough to read a panel against, still clearly
|
|
67
|
+
* see-through. Every surface uses this one value: with each of them picking its
|
|
68
|
+
* own, menus landed at ~0.83 and read as solid black next to the image viewer's
|
|
69
|
+
* ~0.72.
|
|
70
|
+
*/
|
|
71
|
+
export const BACKDROP_DIM_OPACITY = 0.28;
|
|
65
72
|
|
|
66
73
|
export interface OverlayRootProps {
|
|
67
74
|
children?: ReactNode;
|