@oxyhq/bloom 0.30.3 → 0.30.5
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/activity-heatmap/ActivityHeatmap.js +2 -37
- package/lib/commonjs/activity-heatmap/ActivityHeatmap.js.map +1 -1
- package/lib/commonjs/bottom-sheet/BottomSheetBase.js +731 -0
- package/lib/commonjs/bottom-sheet/BottomSheetBase.js.map +1 -0
- package/lib/commonjs/bottom-sheet/index.js +24 -694
- package/lib/commonjs/bottom-sheet/index.js.map +1 -1
- package/lib/commonjs/bottom-sheet/index.web.js +64 -0
- package/lib/commonjs/bottom-sheet/index.web.js.map +1 -0
- package/lib/commonjs/dialog/Dialog.js +2 -2
- package/lib/commonjs/dialog/Dialog.js.map +1 -1
- package/lib/commonjs/dialog/DialogBottomSheet.js +2 -2
- package/lib/commonjs/dialog/DialogBottomSheet.js.map +1 -1
- package/lib/commonjs/dialog/SheetShell.js +2 -2
- package/lib/commonjs/dialog/SheetShell.js.map +1 -1
- package/lib/commonjs/index.js +44 -44
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +66 -66
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/theme/color-utils.js +65 -0
- package/lib/commonjs/theme/color-utils.js.map +1 -0
- package/lib/commonjs/theme/index.js +13 -0
- package/lib/commonjs/theme/index.js.map +1 -1
- package/lib/module/activity-heatmap/ActivityHeatmap.js +1 -36
- package/lib/module/activity-heatmap/ActivityHeatmap.js.map +1 -1
- package/lib/module/bottom-sheet/BottomSheetBase.js +728 -0
- package/lib/module/bottom-sheet/BottomSheetBase.js.map +1 -0
- package/lib/module/bottom-sheet/index.js +27 -696
- package/lib/module/bottom-sheet/index.js.map +1 -1
- package/lib/module/bottom-sheet/index.web.js +63 -0
- package/lib/module/bottom-sheet/index.web.js.map +1 -0
- package/lib/module/dialog/Dialog.js +1 -1
- package/lib/module/dialog/Dialog.js.map +1 -1
- package/lib/module/dialog/DialogBottomSheet.js +1 -1
- package/lib/module/dialog/DialogBottomSheet.js.map +1 -1
- package/lib/module/dialog/SheetShell.js +1 -1
- package/lib/module/dialog/SheetShell.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +1 -1
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/theme/color-utils.js +60 -0
- package/lib/module/theme/color-utils.js.map +1 -0
- package/lib/module/theme/index.js +1 -0
- package/lib/module/theme/index.js.map +1 -1
- package/lib/typescript/commonjs/activity-heatmap/ActivityHeatmap.d.ts.map +1 -1
- package/lib/typescript/commonjs/bottom-sheet/BottomSheetBase.d.ts +127 -0
- package/lib/typescript/commonjs/bottom-sheet/BottomSheetBase.d.ts.map +1 -0
- package/lib/typescript/commonjs/bottom-sheet/index.d.ts +2 -90
- package/lib/typescript/commonjs/bottom-sheet/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/bottom-sheet/index.web.d.ts +7 -0
- package/lib/typescript/commonjs/bottom-sheet/index.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.web.d.ts +2 -2
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/color-utils.d.ts +28 -0
- package/lib/typescript/commonjs/theme/color-utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/index.d.ts +2 -0
- package/lib/typescript/commonjs/theme/index.d.ts.map +1 -1
- package/lib/typescript/module/activity-heatmap/ActivityHeatmap.d.ts.map +1 -1
- package/lib/typescript/module/bottom-sheet/BottomSheetBase.d.ts +127 -0
- package/lib/typescript/module/bottom-sheet/BottomSheetBase.d.ts.map +1 -0
- package/lib/typescript/module/bottom-sheet/index.d.ts +2 -90
- package/lib/typescript/module/bottom-sheet/index.d.ts.map +1 -1
- package/lib/typescript/module/bottom-sheet/index.web.d.ts +7 -0
- package/lib/typescript/module/bottom-sheet/index.web.d.ts.map +1 -0
- package/lib/typescript/module/index.web.d.ts +2 -2
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/theme/color-utils.d.ts +28 -0
- package/lib/typescript/module/theme/color-utils.d.ts.map +1 -0
- package/lib/typescript/module/theme/index.d.ts +2 -0
- package/lib/typescript/module/theme/index.d.ts.map +1 -1
- package/package.json +6 -1
- package/src/__tests__/BottomSheetWebFork.test.ts +66 -0
- package/src/activity-heatmap/ActivityHeatmap.tsx +1 -29
- package/src/bottom-sheet/BottomSheetBase.tsx +853 -0
- package/src/bottom-sheet/index.tsx +26 -821
- package/src/bottom-sheet/index.web.tsx +66 -0
- package/src/index.web.ts +2 -2
- package/src/theme/__tests__/color-utils.test.ts +40 -0
- package/src/theme/color-utils.ts +54 -0
- package/src/theme/index.ts +2 -0
|
@@ -1,95 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import { type
|
|
3
|
-
export interface BottomSheetRef {
|
|
4
|
-
present: () => void;
|
|
5
|
-
dismiss: () => void;
|
|
6
|
-
close: () => void;
|
|
7
|
-
expand: () => void;
|
|
8
|
-
collapse: () => void;
|
|
9
|
-
scrollTo: (y: number, animated?: boolean) => void;
|
|
10
|
-
}
|
|
11
|
-
export interface BottomSheetProps {
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
onDismiss?: () => void;
|
|
14
|
-
enablePanDownToClose?: boolean;
|
|
15
|
-
backgroundComponent?: (props: {
|
|
16
|
-
style?: StyleProp<ViewStyle>;
|
|
17
|
-
}) => React.ReactElement | null;
|
|
18
|
-
backdropComponent?: (props: {
|
|
19
|
-
style?: StyleProp<ViewStyle>;
|
|
20
|
-
onPress?: () => void;
|
|
21
|
-
}) => React.ReactElement | null;
|
|
22
|
-
/**
|
|
23
|
-
* Style applied to the sheet container (the outer Animated.View positioned at
|
|
24
|
-
* the bottom of the screen). Use this to override `maxWidth`, `height`,
|
|
25
|
-
* background color, border radius, etc. Composed AFTER the internal sheet
|
|
26
|
-
* styles so it can override them.
|
|
27
|
-
*/
|
|
28
|
-
style?: StyleProp<ViewStyle>;
|
|
29
|
-
enableHandlePanningGesture?: boolean;
|
|
30
|
-
onDismissAttempt?: () => boolean;
|
|
31
|
-
detached?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Whether to render the built-in (non-interactive) drag handle bar at the top
|
|
34
|
-
* of the sheet. Defaults to `true`. Set to `false` when the consumer renders
|
|
35
|
-
* its own handle (e.g. an interactive close affordance) inside `children`.
|
|
36
|
-
*/
|
|
37
|
-
showHandle?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Opacity of the dimming backdrop behind the sheet (0–1). Defaults to `0.5`.
|
|
40
|
-
* Set to a higher value (e.g. `0.7`) when the sheet is presented over another
|
|
41
|
-
* bottom sheet (Dialog cases) so the underlying handle/content does not
|
|
42
|
-
* bleed through.
|
|
43
|
-
*/
|
|
44
|
-
backdropOpacity?: number;
|
|
45
|
-
/**
|
|
46
|
-
* When `true` (default), children are wrapped in an internal scrollable
|
|
47
|
-
* container — convenient for vertical content that can overflow.
|
|
48
|
-
*
|
|
49
|
-
* Set to `false` when the screen owns its own scrolling primitive
|
|
50
|
-
* (e.g. a `FlatList`, `SectionList`, or any other VirtualizedList).
|
|
51
|
-
* Nesting a VirtualizedList inside the internal ScrollView would break
|
|
52
|
-
* windowing/keyboard handling and trigger a React Native warning. In
|
|
53
|
-
* non-scrollable mode the screen receives the full available height
|
|
54
|
-
* (minus the drag handle) and must manage its own overflow.
|
|
55
|
-
*/
|
|
56
|
-
scrollable?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* When `true`, the body pan uses RNGH's `manualActivation` and only
|
|
59
|
-
* activates when (a) the inner ScrollView is at the top AND (b) the user
|
|
60
|
-
* has moved their finger downward by > 8dp. This is the @gorhom/bottom-sheet
|
|
61
|
-
* coordination model — recommended for sheets containing scrollable content
|
|
62
|
-
* on Android (avoids stealing vertical events from the inner scroller).
|
|
63
|
-
*
|
|
64
|
-
* When `false` (default), the body pan is always active and gates on the
|
|
65
|
-
* scroll offset at `onStart` time. This is the legacy behavior, preserved
|
|
66
|
-
* for backwards compatibility with current bloom consumers.
|
|
67
|
-
*
|
|
68
|
-
* Enabling this also splits the drag handle into its own dedicated,
|
|
69
|
-
* unconditional pan so users can always grab the handle to drag — even
|
|
70
|
-
* when the inner ScrollView is mid-scroll.
|
|
71
|
-
*/
|
|
72
|
-
manualActivation?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* When `true`, the backdrop dims proportionally with drag distance — the
|
|
75
|
-
* overlay fades from full opacity (sheet at rest) to 30% as the sheet is
|
|
76
|
-
* pulled down 40% of the screen height. iOS Photos style. The base
|
|
77
|
-
* `backdropOpacity` still controls the resting dim level.
|
|
78
|
-
*
|
|
79
|
-
* Defaults to `false` (constant opacity during drag).
|
|
80
|
-
*/
|
|
81
|
-
dynamicBackdrop?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Custom handle slot. When provided, replaces the default drag handle
|
|
84
|
-
* (the 36×5 pill). The rendered handle is wrapped in the dedicated handle
|
|
85
|
-
* gesture detector (when `manualActivation` is `true`) so it remains
|
|
86
|
-
* unconditionally draggable. `showHandle={false}` still suppresses any
|
|
87
|
-
* handle rendering — `handleComponent` is only consulted when
|
|
88
|
-
* `showHandle` is `true`.
|
|
89
|
-
*/
|
|
90
|
-
handleComponent?: () => React.ReactNode;
|
|
91
|
-
}
|
|
2
|
+
import { type BottomSheetProps, type BottomSheetRef } from './BottomSheetBase';
|
|
92
3
|
declare const BottomSheet: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<BottomSheetRef>>;
|
|
4
|
+
export type { BottomSheetProps, BottomSheetRef };
|
|
93
5
|
export default BottomSheet;
|
|
94
6
|
export { BottomSheet };
|
|
95
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bottom-sheet/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bottom-sheet/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAEH,KAAK,gBAAgB,EACrB,KAAK,cAAc,EAEtB,MAAM,mBAAmB,CAAC;AA8E3B,QAAA,MAAM,WAAW,yFAEf,CAAC;AAUH,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAC;AACjD,eAAe,WAAW,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type BottomSheetProps, type BottomSheetRef } from './BottomSheetBase';
|
|
3
|
+
declare const BottomSheet: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<BottomSheetRef>>;
|
|
4
|
+
export type { BottomSheetProps, BottomSheetRef };
|
|
5
|
+
export default BottomSheet;
|
|
6
|
+
export { BottomSheet };
|
|
7
|
+
//# sourceMappingURL=index.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/bottom-sheet/index.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAEH,KAAK,gBAAgB,EACrB,KAAK,cAAc,EAEtB,MAAM,mBAAmB,CAAC;AA8B3B,QAAA,MAAM,WAAW,yFAEf,CAAC;AAoBH,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAC;AACjD,eAAe,WAAW,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -69,8 +69,8 @@ export { Slider } from './slider';
|
|
|
69
69
|
export type { SliderProps } from './slider';
|
|
70
70
|
export { Combobox } from './combobox/index.web';
|
|
71
71
|
export type { ComboboxProps, ComboboxOption } from './combobox/index.web';
|
|
72
|
-
export { BottomSheet } from './bottom-sheet';
|
|
73
|
-
export type { BottomSheetRef, BottomSheetProps } from './bottom-sheet';
|
|
72
|
+
export { BottomSheet } from './bottom-sheet/index.web';
|
|
73
|
+
export type { BottomSheetRef, BottomSheetProps } from './bottom-sheet/index.web';
|
|
74
74
|
export * from './card';
|
|
75
75
|
export * from './badge';
|
|
76
76
|
export * from './chip';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.ts"],"names":[],"mappings":"AAMA,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAKhF,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,UAAU,EACV,UAAU,EACV,YAAY,EACZ,OAAO,EACP,MAAM,EACN,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,cAAc,EACd,yBAAyB,EACzB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,UAAU,GACX,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACtE,YAAY,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,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,YAAY,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACjF,YAAY,EACV,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGrE,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAG/B,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Graceful color-utility primitives for consumer-facing composition.
|
|
3
|
+
*
|
|
4
|
+
* Unlike `parseRgbString` in `./color-space` (which THROWS on non-rgb input —
|
|
5
|
+
* it is a canonical-pipeline primitive where a bad value signals a real bug),
|
|
6
|
+
* these helpers fall back gracefully: they return `null` / the untouched input
|
|
7
|
+
* when a color string can't be parsed. That makes them safe to point at
|
|
8
|
+
* arbitrary consumer color values (theme tokens, user-supplied colors) — e.g.
|
|
9
|
+
* building `[bg, withAlpha(bg, 0)]` gradient stops for a scroll fade, where the
|
|
10
|
+
* `transparent` keyword would incorrectly fade through black.
|
|
11
|
+
*/
|
|
12
|
+
/** RGB channels, each 0..255. */
|
|
13
|
+
export interface RgbChannels {
|
|
14
|
+
r: number;
|
|
15
|
+
g: number;
|
|
16
|
+
b: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Parse a color string into its RGB channels, or `null` if it can't be parsed.
|
|
20
|
+
*
|
|
21
|
+
* Accepts Bloom's canonical space-separated `rgb(r g b)` output, legacy
|
|
22
|
+
* comma-separated `rgb(r, g, b)` / `rgba(...)`, and `#rgb` / `#rrggbb` hex.
|
|
23
|
+
* Anything else yields `null` so callers can fall back to the original value.
|
|
24
|
+
*/
|
|
25
|
+
export declare function parseRgb(color: string): RgbChannels | null;
|
|
26
|
+
/** Compose `color` at `alpha`; returns the input unchanged if it can't parse. */
|
|
27
|
+
export declare function withAlpha(color: string, alpha: number): string;
|
|
28
|
+
//# sourceMappingURL=color-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-utils.d.ts","sourceRoot":"","sources":["../../../../src/theme/color-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,iCAAiC;AACjC,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAoB1D;AAED,iFAAiF;AACjF,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAI9D"}
|
|
@@ -10,6 +10,8 @@ export type { NavigationTheme, NavigationThemeFont } from './use-navigation-them
|
|
|
10
10
|
export type { Theme, ThemeColors, ThemeMode, ThemeGradient, ThemeGradients } from './types';
|
|
11
11
|
export type { AppColorName, AppColorPreset, PresetTokens } from './color-presets';
|
|
12
12
|
export { APP_COLOR_NAMES, PREMIUM_COLOR_NAMES, APP_COLOR_PRESETS, HEX_TO_APP_COLOR, hexToAppColorName, } from './color-presets';
|
|
13
|
+
export { parseRgb, withAlpha } from './color-utils';
|
|
14
|
+
export type { RgbChannels } from './color-utils';
|
|
13
15
|
export { getPresetVars, applyPresetVarsToDocument } from './preset-vars';
|
|
14
16
|
export { applyDarkClass } from './apply-dark-class';
|
|
15
17
|
export { setColorSchemeSafe } from './set-color-scheme-safe';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EACV,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACpE,YAAY,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AACnF,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC5F,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,YA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,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivityHeatmap.d.ts","sourceRoot":"","sources":["../../../../src/activity-heatmap/ActivityHeatmap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ActivityHeatmap.d.ts","sourceRoot":"","sources":["../../../../src/activity-heatmap/ActivityHeatmap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAM7C,OAAO,KAAK,EAAsB,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAqQxE,eAAO,MAAM,eAAe,kDAAiC,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type ViewStyle, type StyleProp } from 'react-native';
|
|
3
|
+
import { type SharedValue } from 'react-native-reanimated';
|
|
4
|
+
export interface BottomSheetRef {
|
|
5
|
+
present: () => void;
|
|
6
|
+
dismiss: () => void;
|
|
7
|
+
close: () => void;
|
|
8
|
+
expand: () => void;
|
|
9
|
+
collapse: () => void;
|
|
10
|
+
scrollTo: (y: number, animated?: boolean) => void;
|
|
11
|
+
}
|
|
12
|
+
export interface BottomSheetProps {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
onDismiss?: () => void;
|
|
15
|
+
enablePanDownToClose?: boolean;
|
|
16
|
+
backgroundComponent?: (props: {
|
|
17
|
+
style?: StyleProp<ViewStyle>;
|
|
18
|
+
}) => React.ReactElement | null;
|
|
19
|
+
backdropComponent?: (props: {
|
|
20
|
+
style?: StyleProp<ViewStyle>;
|
|
21
|
+
onPress?: () => void;
|
|
22
|
+
}) => React.ReactElement | null;
|
|
23
|
+
/**
|
|
24
|
+
* Style applied to the sheet container (the outer Animated.View positioned at
|
|
25
|
+
* the bottom of the screen). Use this to override `maxWidth`, `height`,
|
|
26
|
+
* background color, border radius, etc. Composed AFTER the internal sheet
|
|
27
|
+
* styles so it can override them.
|
|
28
|
+
*/
|
|
29
|
+
style?: StyleProp<ViewStyle>;
|
|
30
|
+
enableHandlePanningGesture?: boolean;
|
|
31
|
+
onDismissAttempt?: () => boolean;
|
|
32
|
+
detached?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Whether to render the built-in (non-interactive) drag handle bar at the top
|
|
35
|
+
* of the sheet. Defaults to `true`. Set to `false` when the consumer renders
|
|
36
|
+
* its own handle (e.g. an interactive close affordance) inside `children`.
|
|
37
|
+
*/
|
|
38
|
+
showHandle?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Opacity of the dimming backdrop behind the sheet (0–1). Defaults to `0.5`.
|
|
41
|
+
* Set to a higher value (e.g. `0.7`) when the sheet is presented over another
|
|
42
|
+
* bottom sheet (Dialog cases) so the underlying handle/content does not
|
|
43
|
+
* bleed through.
|
|
44
|
+
*/
|
|
45
|
+
backdropOpacity?: number;
|
|
46
|
+
/**
|
|
47
|
+
* When `true` (default), children are wrapped in an internal scrollable
|
|
48
|
+
* container — convenient for vertical content that can overflow.
|
|
49
|
+
*
|
|
50
|
+
* Set to `false` when the screen owns its own scrolling primitive
|
|
51
|
+
* (e.g. a `FlatList`, `SectionList`, or any other VirtualizedList).
|
|
52
|
+
* Nesting a VirtualizedList inside the internal ScrollView would break
|
|
53
|
+
* windowing/keyboard handling and trigger a React Native warning. In
|
|
54
|
+
* non-scrollable mode the screen receives the full available height
|
|
55
|
+
* (minus the drag handle) and must manage its own overflow.
|
|
56
|
+
*/
|
|
57
|
+
scrollable?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* When `true`, the body pan uses RNGH's `manualActivation` and only
|
|
60
|
+
* activates when (a) the inner ScrollView is at the top AND (b) the user
|
|
61
|
+
* has moved their finger downward by > 8dp. This is the @gorhom/bottom-sheet
|
|
62
|
+
* coordination model — recommended for sheets containing scrollable content
|
|
63
|
+
* on Android (avoids stealing vertical events from the inner scroller).
|
|
64
|
+
*
|
|
65
|
+
* When `false` (default), the body pan is always active and gates on the
|
|
66
|
+
* scroll offset at `onStart` time. This is the legacy behavior, preserved
|
|
67
|
+
* for backwards compatibility with current bloom consumers.
|
|
68
|
+
*
|
|
69
|
+
* Enabling this also splits the drag handle into its own dedicated,
|
|
70
|
+
* unconditional pan so users can always grab the handle to drag — even
|
|
71
|
+
* when the inner ScrollView is mid-scroll.
|
|
72
|
+
*/
|
|
73
|
+
manualActivation?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* When `true`, the backdrop dims proportionally with drag distance — the
|
|
76
|
+
* overlay fades from full opacity (sheet at rest) to 30% as the sheet is
|
|
77
|
+
* pulled down 40% of the screen height. iOS Photos style. The base
|
|
78
|
+
* `backdropOpacity` still controls the resting dim level.
|
|
79
|
+
*
|
|
80
|
+
* Defaults to `false` (constant opacity during drag).
|
|
81
|
+
*/
|
|
82
|
+
dynamicBackdrop?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Custom handle slot. When provided, replaces the default drag handle
|
|
85
|
+
* (the 36×5 pill). The rendered handle is wrapped in the dedicated handle
|
|
86
|
+
* gesture detector (when `manualActivation` is `true`) so it remains
|
|
87
|
+
* unconditionally draggable. `showHandle={false}` still suppresses any
|
|
88
|
+
* handle rendering — `handleComponent` is only consulted when
|
|
89
|
+
* `showHandle` is `true`.
|
|
90
|
+
*/
|
|
91
|
+
handleComponent?: () => React.ReactNode;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Props consumed by a platform Shell — the outermost wrapper that hosts the
|
|
95
|
+
* sheet body in a full-screen overlay. Native wraps it in RN's `<Modal>` +
|
|
96
|
+
* `<KeyboardProvider>` + `<GestureHandlerRootView>`; web wraps it in bloom's
|
|
97
|
+
* stable DOM `<Portal>` + a fixed `<GestureHandlerRootView>`. Splitting the
|
|
98
|
+
* shell is what lets web avoid RN-Web's `<Modal>`/`ModalPortal`, whose host
|
|
99
|
+
* node is orphaned under React 19 concurrent/StrictMode so the sheet mounts
|
|
100
|
+
* but never paints.
|
|
101
|
+
*/
|
|
102
|
+
export interface BottomSheetShellProps {
|
|
103
|
+
/** True while the sheet is mounted (open or animating closed). */
|
|
104
|
+
visible: boolean;
|
|
105
|
+
/** Hardware/back-button dismissal request (native `<Modal onRequestClose>`). */
|
|
106
|
+
onRequestClose: () => void;
|
|
107
|
+
/**
|
|
108
|
+
* Live keyboard height, driven by the native shell's keyboard tracker. Web
|
|
109
|
+
* shells ignore it (the browser owns keyboard layout) and it stays `0`.
|
|
110
|
+
*/
|
|
111
|
+
keyboardHeight: SharedValue<number>;
|
|
112
|
+
children: React.ReactNode;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Platform-agnostic bottom-sheet core: all gesture, animation, scroll, and
|
|
116
|
+
* dismissal logic lives here so native and web share ONE implementation. The
|
|
117
|
+
* only thing that differs per platform is the `Shell` (see
|
|
118
|
+
* `BottomSheetShellProps`) — injected by `index.tsx` (native) and
|
|
119
|
+
* `index.web.tsx` (web). This module imports nothing platform-specific
|
|
120
|
+
* (no RN `<Modal>`, no `react-native-keyboard-controller`) so it is safe to
|
|
121
|
+
* bundle on web.
|
|
122
|
+
*/
|
|
123
|
+
export interface BottomSheetBaseProps extends BottomSheetProps {
|
|
124
|
+
Shell: React.ComponentType<BottomSheetShellProps>;
|
|
125
|
+
}
|
|
126
|
+
export declare const BottomSheetBase: React.ForwardRefExoticComponent<BottomSheetBaseProps & React.RefAttributes<BottomSheetRef>>;
|
|
127
|
+
//# sourceMappingURL=BottomSheetBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheetBase.d.ts","sourceRoot":"","sources":["../../../../src/bottom-sheet/BottomS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,CAAC;IACrB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;;;;;;;OAcG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;CAC3C;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,qBAAqB;IAClC,kEAAkE;IAClE,OAAO,EAAE,OAAO,CAAC;IACjB,gFAAgF;IAChF,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B;;;OAGG;IACH,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACpC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC1D,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;CACrD;AAED,eAAO,MAAM,eAAe,6FAwjB1B,CAAC"}
|
|
@@ -1,95 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import { type
|
|
3
|
-
export interface BottomSheetRef {
|
|
4
|
-
present: () => void;
|
|
5
|
-
dismiss: () => void;
|
|
6
|
-
close: () => void;
|
|
7
|
-
expand: () => void;
|
|
8
|
-
collapse: () => void;
|
|
9
|
-
scrollTo: (y: number, animated?: boolean) => void;
|
|
10
|
-
}
|
|
11
|
-
export interface BottomSheetProps {
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
onDismiss?: () => void;
|
|
14
|
-
enablePanDownToClose?: boolean;
|
|
15
|
-
backgroundComponent?: (props: {
|
|
16
|
-
style?: StyleProp<ViewStyle>;
|
|
17
|
-
}) => React.ReactElement | null;
|
|
18
|
-
backdropComponent?: (props: {
|
|
19
|
-
style?: StyleProp<ViewStyle>;
|
|
20
|
-
onPress?: () => void;
|
|
21
|
-
}) => React.ReactElement | null;
|
|
22
|
-
/**
|
|
23
|
-
* Style applied to the sheet container (the outer Animated.View positioned at
|
|
24
|
-
* the bottom of the screen). Use this to override `maxWidth`, `height`,
|
|
25
|
-
* background color, border radius, etc. Composed AFTER the internal sheet
|
|
26
|
-
* styles so it can override them.
|
|
27
|
-
*/
|
|
28
|
-
style?: StyleProp<ViewStyle>;
|
|
29
|
-
enableHandlePanningGesture?: boolean;
|
|
30
|
-
onDismissAttempt?: () => boolean;
|
|
31
|
-
detached?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Whether to render the built-in (non-interactive) drag handle bar at the top
|
|
34
|
-
* of the sheet. Defaults to `true`. Set to `false` when the consumer renders
|
|
35
|
-
* its own handle (e.g. an interactive close affordance) inside `children`.
|
|
36
|
-
*/
|
|
37
|
-
showHandle?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Opacity of the dimming backdrop behind the sheet (0–1). Defaults to `0.5`.
|
|
40
|
-
* Set to a higher value (e.g. `0.7`) when the sheet is presented over another
|
|
41
|
-
* bottom sheet (Dialog cases) so the underlying handle/content does not
|
|
42
|
-
* bleed through.
|
|
43
|
-
*/
|
|
44
|
-
backdropOpacity?: number;
|
|
45
|
-
/**
|
|
46
|
-
* When `true` (default), children are wrapped in an internal scrollable
|
|
47
|
-
* container — convenient for vertical content that can overflow.
|
|
48
|
-
*
|
|
49
|
-
* Set to `false` when the screen owns its own scrolling primitive
|
|
50
|
-
* (e.g. a `FlatList`, `SectionList`, or any other VirtualizedList).
|
|
51
|
-
* Nesting a VirtualizedList inside the internal ScrollView would break
|
|
52
|
-
* windowing/keyboard handling and trigger a React Native warning. In
|
|
53
|
-
* non-scrollable mode the screen receives the full available height
|
|
54
|
-
* (minus the drag handle) and must manage its own overflow.
|
|
55
|
-
*/
|
|
56
|
-
scrollable?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* When `true`, the body pan uses RNGH's `manualActivation` and only
|
|
59
|
-
* activates when (a) the inner ScrollView is at the top AND (b) the user
|
|
60
|
-
* has moved their finger downward by > 8dp. This is the @gorhom/bottom-sheet
|
|
61
|
-
* coordination model — recommended for sheets containing scrollable content
|
|
62
|
-
* on Android (avoids stealing vertical events from the inner scroller).
|
|
63
|
-
*
|
|
64
|
-
* When `false` (default), the body pan is always active and gates on the
|
|
65
|
-
* scroll offset at `onStart` time. This is the legacy behavior, preserved
|
|
66
|
-
* for backwards compatibility with current bloom consumers.
|
|
67
|
-
*
|
|
68
|
-
* Enabling this also splits the drag handle into its own dedicated,
|
|
69
|
-
* unconditional pan so users can always grab the handle to drag — even
|
|
70
|
-
* when the inner ScrollView is mid-scroll.
|
|
71
|
-
*/
|
|
72
|
-
manualActivation?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* When `true`, the backdrop dims proportionally with drag distance — the
|
|
75
|
-
* overlay fades from full opacity (sheet at rest) to 30% as the sheet is
|
|
76
|
-
* pulled down 40% of the screen height. iOS Photos style. The base
|
|
77
|
-
* `backdropOpacity` still controls the resting dim level.
|
|
78
|
-
*
|
|
79
|
-
* Defaults to `false` (constant opacity during drag).
|
|
80
|
-
*/
|
|
81
|
-
dynamicBackdrop?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Custom handle slot. When provided, replaces the default drag handle
|
|
84
|
-
* (the 36×5 pill). The rendered handle is wrapped in the dedicated handle
|
|
85
|
-
* gesture detector (when `manualActivation` is `true`) so it remains
|
|
86
|
-
* unconditionally draggable. `showHandle={false}` still suppresses any
|
|
87
|
-
* handle rendering — `handleComponent` is only consulted when
|
|
88
|
-
* `showHandle` is `true`.
|
|
89
|
-
*/
|
|
90
|
-
handleComponent?: () => React.ReactNode;
|
|
91
|
-
}
|
|
2
|
+
import { type BottomSheetProps, type BottomSheetRef } from './BottomSheetBase';
|
|
92
3
|
declare const BottomSheet: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<BottomSheetRef>>;
|
|
4
|
+
export type { BottomSheetProps, BottomSheetRef };
|
|
93
5
|
export default BottomSheet;
|
|
94
6
|
export { BottomSheet };
|
|
95
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bottom-sheet/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bottom-sheet/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAEH,KAAK,gBAAgB,EACrB,KAAK,cAAc,EAEtB,MAAM,mBAAmB,CAAC;AA8E3B,QAAA,MAAM,WAAW,yFAEf,CAAC;AAUH,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAC;AACjD,eAAe,WAAW,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type BottomSheetProps, type BottomSheetRef } from './BottomSheetBase';
|
|
3
|
+
declare const BottomSheet: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<BottomSheetRef>>;
|
|
4
|
+
export type { BottomSheetProps, BottomSheetRef };
|
|
5
|
+
export default BottomSheet;
|
|
6
|
+
export { BottomSheet };
|
|
7
|
+
//# sourceMappingURL=index.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/bottom-sheet/index.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAEH,KAAK,gBAAgB,EACrB,KAAK,cAAc,EAEtB,MAAM,mBAAmB,CAAC;AA8B3B,QAAA,MAAM,WAAW,yFAEf,CAAC;AAoBH,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAC;AACjD,eAAe,WAAW,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -69,8 +69,8 @@ export { Slider } from './slider';
|
|
|
69
69
|
export type { SliderProps } from './slider';
|
|
70
70
|
export { Combobox } from './combobox/index.web';
|
|
71
71
|
export type { ComboboxProps, ComboboxOption } from './combobox/index.web';
|
|
72
|
-
export { BottomSheet } from './bottom-sheet';
|
|
73
|
-
export type { BottomSheetRef, BottomSheetProps } from './bottom-sheet';
|
|
72
|
+
export { BottomSheet } from './bottom-sheet/index.web';
|
|
73
|
+
export type { BottomSheetRef, BottomSheetProps } from './bottom-sheet/index.web';
|
|
74
74
|
export * from './card';
|
|
75
75
|
export * from './badge';
|
|
76
76
|
export * from './chip';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.ts"],"names":[],"mappings":"AAMA,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAKhF,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,UAAU,EACV,UAAU,EACV,YAAY,EACZ,OAAO,EACP,MAAM,EACN,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,cAAc,EACd,yBAAyB,EACzB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,YAAY,EAC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M,gBAAgB,CAAC;AAC7C,YAAY,EACV,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AAGxB,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,YAAY,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACjF,YAAY,EACV,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGrE,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAG/B,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Graceful color-utility primitives for consumer-facing composition.
|
|
3
|
+
*
|
|
4
|
+
* Unlike `parseRgbString` in `./color-space` (which THROWS on non-rgb input —
|
|
5
|
+
* it is a canonical-pipeline primitive where a bad value signals a real bug),
|
|
6
|
+
* these helpers fall back gracefully: they return `null` / the untouched input
|
|
7
|
+
* when a color string can't be parsed. That makes them safe to point at
|
|
8
|
+
* arbitrary consumer color values (theme tokens, user-supplied colors) — e.g.
|
|
9
|
+
* building `[bg, withAlpha(bg, 0)]` gradient stops for a scroll fade, where the
|
|
10
|
+
* `transparent` keyword would incorrectly fade through black.
|
|
11
|
+
*/
|
|
12
|
+
/** RGB channels, each 0..255. */
|
|
13
|
+
export interface RgbChannels {
|
|
14
|
+
r: number;
|
|
15
|
+
g: number;
|
|
16
|
+
b: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Parse a color string into its RGB channels, or `null` if it can't be parsed.
|
|
20
|
+
*
|
|
21
|
+
* Accepts Bloom's canonical space-separated `rgb(r g b)` output, legacy
|
|
22
|
+
* comma-separated `rgb(r, g, b)` / `rgba(...)`, and `#rgb` / `#rrggbb` hex.
|
|
23
|
+
* Anything else yields `null` so callers can fall back to the original value.
|
|
24
|
+
*/
|
|
25
|
+
export declare function parseRgb(color: string): RgbChannels | null;
|
|
26
|
+
/** Compose `color` at `alpha`; returns the input unchanged if it can't parse. */
|
|
27
|
+
export declare function withAlpha(color: string, alpha: number): string;
|
|
28
|
+
//# sourceMappingURL=color-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-utils.d.ts","sourceRoot":"","sources":["../../../../src/theme/color-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,iCAAiC;AACjC,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAoB1D;AAED,iFAAiF;AACjF,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAI9D"}
|
|
@@ -10,6 +10,8 @@ export type { NavigationTheme, NavigationThemeFont } from './use-navigation-them
|
|
|
10
10
|
export type { Theme, ThemeColors, ThemeMode, ThemeGradient, ThemeGradients } from './types';
|
|
11
11
|
export type { AppColorName, AppColorPreset, PresetTokens } from './color-presets';
|
|
12
12
|
export { APP_COLOR_NAMES, PREMIUM_COLOR_NAMES, APP_COLOR_PRESETS, HEX_TO_APP_COLOR, hexToAppColorName, } from './color-presets';
|
|
13
|
+
export { parseRgb, withAlpha } from './color-utils';
|
|
14
|
+
export type { RgbChannels } from './color-utils';
|
|
13
15
|
export { getPresetVars, applyPresetVarsToDocument } from './preset-vars';
|
|
14
16
|
export { applyDarkClass } from './apply-dark-class';
|
|
15
17
|
export { setColorSchemeSafe } from './set-color-scheme-safe';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EACV,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACpE,YAAY,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AACnF,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC5F,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,gBAA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AAgB,EAChB,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxyhq/bloom",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.5",
|
|
4
4
|
"description": "Bloom UI — Oxy ecosystem component library for React Native + Expo + Web",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -624,6 +624,11 @@
|
|
|
624
624
|
},
|
|
625
625
|
"./bottom-sheet": {
|
|
626
626
|
"react-native": "./src/bottom-sheet/index.tsx",
|
|
627
|
+
"browser": {
|
|
628
|
+
"types": "./lib/typescript/module/bottom-sheet/index.web.d.ts",
|
|
629
|
+
"import": "./lib/module/bottom-sheet/index.web.js",
|
|
630
|
+
"require": "./lib/commonjs/bottom-sheet/index.web.js"
|
|
631
|
+
},
|
|
627
632
|
"import": {
|
|
628
633
|
"types": "./lib/typescript/module/bottom-sheet/index.d.ts",
|
|
629
634
|
"default": "./lib/module/bottom-sheet/index.js"
|