react-native-better-html 1.0.2 → 1.0.3

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.
@@ -0,0 +1,285 @@
1
+ import { BetterCoreProviderConfig, DeepPartialRecord, BetterCoreConfig, OmitProps, IconName, AnyOtherString, AssetName, LoaderName } from 'react-better-core';
2
+ export { AnyOtherString, AssetName, AssetsConfig, Color, ColorName, ColorTheme, Colors, Country, DeepPartialRecord, ExcludeOptions, IconName, IconsConfig, LoaderConfig, LoaderName, OmitProps, PartialRecord, PickAllRequired, PickValue, Styles, Theme, ThemeConfig, colorThemeControls, countries, darkenColor, desaturateColor, eventPreventDefault, eventPreventStop, eventStopPropagation, formatPhoneNumber, generateRandomString, getPluralWord, lightenColor, loaderControls, saturateColor, useBooleanState, useDebounceState, useLoader, useLoaderControls, useTheme } from 'react-better-core';
3
+ import * as react from 'react';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import * as react_native from 'react-native';
6
+ import { ViewStyle, GestureResponderEvent, ViewProps as ViewProps$1, TextProps as TextProps$1, TextStyle, ColorValue } from 'react-native';
7
+ import { EaseFunction, PropsTransforms } from '@legendapp/motion';
8
+
9
+ type AppConfig = {};
10
+ type BetterComponentsConfig = {
11
+ app: AppConfig;
12
+ };
13
+
14
+ type PluginName = "asyncStorage";
15
+ type BetterComponentsPluginConstructor<T extends object = object> = (config?: T) => BetterComponentsPlugin<T>;
16
+ type BetterComponentsPlugin<T = object> = {
17
+ name: PluginName;
18
+ initialize?: () => void;
19
+ getConfig: () => T;
20
+ };
21
+
22
+ declare const useBetterComponentsContext: () => BetterComponentsConfig & BetterCoreConfig;
23
+ type BetterComponentsProviderInternalConfig = DeepPartialRecord<BetterComponentsConfig>;
24
+ type BetterProviderCommonProps = {
25
+ plugins?: BetterComponentsPlugin[];
26
+ children?: React.ReactNode;
27
+ };
28
+ type BetterComponentsProviderConfig = BetterCoreProviderConfig & BetterComponentsProviderInternalConfig;
29
+ type BetterComponentsProviderProps = BetterProviderCommonProps & {
30
+ config?: BetterComponentsProviderConfig;
31
+ };
32
+ declare function BetterComponentsProvider({ config, ...props }: BetterComponentsProviderProps): react_jsx_runtime.JSX.Element;
33
+ declare const _default: react.MemoExoticComponent<typeof BetterComponentsProvider>;
34
+
35
+ type ComponentStyle<Style extends ViewStyle = ViewStyle> = OmitProps<Style, "shadowOffset" | ComponentExcludeMarginProps | ComponentExcludePaddingProps> & {
36
+ shadowOffsetWidth?: number;
37
+ shadowOffsetHeight?: number;
38
+ };
39
+ type ComponentMarginProps = Pick<ComponentStyle, "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "marginVertical" | "marginHorizontal">;
40
+ type ComponentExcludeMarginProps = "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginStart" | "marginEnd";
41
+ type ComponentPaddingProps = Pick<ComponentStyle, "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingVertical" | "paddingHorizontal">;
42
+ type ComponentExcludePaddingProps = "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingStart" | "paddingEnd";
43
+
44
+ declare const pressStrength: () => Record<"z05" | "z1" | "z2" | "z3", number>;
45
+
46
+ declare function useDevice(): {
47
+ safeArea: {
48
+ /** @description The safe area insets after calculations. Recommended to use this instead of the raw insets. */
49
+ afterCalculations: {
50
+ top: number;
51
+ bottom: number;
52
+ left: number;
53
+ right: number;
54
+ };
55
+ top: number;
56
+ right: number;
57
+ bottom: number;
58
+ left: number;
59
+ };
60
+ /** @description The dimensions of the device screen. */
61
+ screenDimensions: react_native.ScaledSize;
62
+ /** @description The dimensions of the app window. */
63
+ windowDimensions: react_native.ScaledSize;
64
+ /** @description Whether the device is small. */
65
+ isSmallDevice: boolean;
66
+ };
67
+
68
+ declare function generateAsyncStorage<AsyncStorage extends object>(): {
69
+ setItem: <StorageName extends keyof AsyncStorage>(name: StorageName, value: AsyncStorage[StorageName]) => void;
70
+ getItem: <StorageName extends keyof AsyncStorage>(name: StorageName) => Promise<AsyncStorage[StorageName] | undefined>;
71
+ removeItem: (name: keyof AsyncStorage) => void;
72
+ removeAllItems: () => void;
73
+ };
74
+
75
+ type ViewProps<Value = unknown> = {
76
+ /** @default false */
77
+ isRow?: boolean;
78
+ value?: Value;
79
+ /** @default false */
80
+ disabled?: boolean;
81
+ /** @default "highlight" */
82
+ pressType?: "opacity" | "highlight";
83
+ /** @default 0.8 */
84
+ pressStrength?: number;
85
+ onPress?: (event: GestureResponderEvent) => void;
86
+ onPressIn?: (event: GestureResponderEvent) => void;
87
+ onPressOut?: (event: GestureResponderEvent) => void;
88
+ onLongPress?: (event: GestureResponderEvent) => void;
89
+ onPressWithValue?: (value: Value) => void;
90
+ } & OmitProps<ViewProps$1, "style" | "onBlur" | "onFocus"> & ComponentStyle;
91
+ type ViewComponentType = {
92
+ <Value>(props: ViewProps<Value>): React.ReactElement;
93
+ box: <Value>(props: ViewProps<Value> & {
94
+ /** @default false */
95
+ withShadow?: boolean;
96
+ }) => React.ReactElement;
97
+ };
98
+ declare const ViewComponent: ViewComponentType;
99
+ declare const View: typeof ViewComponent & {
100
+ box: typeof ViewComponent.box;
101
+ };
102
+
103
+ type TextProps = {} & OmitProps<TextProps$1, "style"> & ComponentStyle<TextStyle>;
104
+ type TextComponentType = {
105
+ (props: TextProps): React.ReactElement;
106
+ title: (props: TextProps) => React.ReactElement;
107
+ subtitle: (props: TextProps) => React.ReactElement;
108
+ body: (props: TextProps) => React.ReactElement;
109
+ caption: (props: TextProps) => React.ReactElement;
110
+ unknown: (props: TextProps) => React.ReactElement;
111
+ };
112
+ declare const TextComponent: TextComponentType;
113
+ declare const Text: typeof TextComponent & {
114
+ title: typeof TextComponent.title;
115
+ subtitle: typeof TextComponent.subtitle;
116
+ body: typeof TextComponent.body;
117
+ caption: typeof TextComponent.caption;
118
+ unknown: typeof TextComponent.unknown;
119
+ };
120
+
121
+ type ButtonProps<Value> = {
122
+ text?: string;
123
+ /** @default 16 */
124
+ textFontSize?: TextProps["fontSize"];
125
+ /** @default 700 */
126
+ textFontWeight?: TextProps["fontWeight"];
127
+ textDecorationLine?: TextProps["textDecorationLine"];
128
+ /** @default "base" */
129
+ textColor?: ColorValue;
130
+ icon?: IconName | AnyOtherString;
131
+ /** @default "left" */
132
+ iconPosition?: "left" | "right";
133
+ /** @default Same as text color */
134
+ iconColor?: string;
135
+ /** @default 16 */
136
+ iconSize?: number;
137
+ image?: AssetName | AnyOtherString;
138
+ /** @default "left" */
139
+ imagePosition?: "left" | "right";
140
+ /** @default 16 */
141
+ imageWidth?: number;
142
+ /** @default undefined */
143
+ imageHeight?: number;
144
+ loaderName?: LoaderName | AnyOtherString;
145
+ /** @default false */
146
+ isLoading?: boolean;
147
+ isSmall?: true | "left" | "center" | "right";
148
+ } & ViewProps<Value>;
149
+ type InternalButtonProps<Value> = ButtonProps<Value> & {
150
+ animateOpacity?: number;
151
+ };
152
+ type ButtonComponentType = {
153
+ <Value>(props: ButtonProps<Value>): React.ReactElement;
154
+ secondary: <Value>(props: ButtonProps<Value>) => React.ReactElement;
155
+ destructive: <Value>(props: ButtonProps<Value>) => React.ReactElement;
156
+ text: <Value>(props: ButtonProps<Value>) => React.ReactElement;
157
+ };
158
+ declare const ButtonComponent: {
159
+ <Value>({ text, textFontSize, textFontWeight, textDecorationLine, textColor, icon, iconPosition, iconColor, iconSize, image, imagePosition, imageWidth, imageHeight, loaderName, isLoading, isSmall, animateOpacity, flex, alignSelf, disabled, ...props }: InternalButtonProps<Value>): react_jsx_runtime.JSX.Element;
160
+ secondary: <Value>(props: ButtonProps<Value>) => React.ReactElement;
161
+ destructive: <Value>(props: ButtonProps<Value>) => React.ReactElement;
162
+ text: <Value>(props: ButtonProps<Value>) => React.ReactElement;
163
+ };
164
+ declare const Button: ButtonComponentType & {
165
+ secondary: typeof ButtonComponent.secondary;
166
+ destructive: typeof ButtonComponent.destructive;
167
+ text: typeof ButtonComponent.text;
168
+ };
169
+
170
+ type LoaderSize = "small" | "large";
171
+ type LoaderProps = {
172
+ /** @default "small" */
173
+ size?: LoaderSize;
174
+ color?: ColorValue;
175
+ } & ComponentMarginProps;
176
+ type LoaderComponentType = {
177
+ (props: LoaderProps): React.ReactElement;
178
+ box: (props: OmitProps<LoaderProps, "size"> & {
179
+ /** @default "Loading..." */
180
+ text?: string;
181
+ /** @default "large" */
182
+ size?: LoaderSize;
183
+ }) => React.ReactElement;
184
+ text: (props: LoaderProps & {
185
+ /** @default "Loading..." */
186
+ text?: string;
187
+ }) => React.ReactElement;
188
+ };
189
+ declare const LoaderComponent: LoaderComponentType;
190
+ declare const Loader: typeof LoaderComponent & {
191
+ box: typeof LoaderComponent.box;
192
+ text: typeof LoaderComponent.text;
193
+ };
194
+
195
+ type ComponentStyleProps<Style extends ViewStyle = ViewStyle> = Omit<ComponentStyle<Style>, "transformOrigin">;
196
+ type AnimationStyleProps<Style extends ViewStyle = ViewStyle> = ComponentStyle<Style> & PropsTransforms;
197
+ type InitialComponentStyle<Style extends ViewStyle = ViewStyle> = {
198
+ [CSSProperty in keyof AnimationStyleProps<Style> as `initial${Capitalize<CSSProperty & string>}`]: AnimationStyleProps<Style>[CSSProperty];
199
+ };
200
+ type animateComponentStyle<Style extends ViewStyle = ViewStyle> = {
201
+ [CSSProperty in keyof AnimationStyleProps<Style> as `animate${Capitalize<CSSProperty & string>}`]: AnimationStyleProps<Style>[CSSProperty];
202
+ };
203
+ type whileTapComponentStyle<Style extends ViewStyle = ViewStyle> = {
204
+ [CSSProperty in keyof AnimationStyleProps<Style> as `whileTap${Capitalize<CSSProperty & string>}`]: AnimationStyleProps<Style>[CSSProperty];
205
+ };
206
+ type TransitionProps = {
207
+ transitionLoop?: number;
208
+ } & ({
209
+ transitionType?: "tween" | "timing" | undefined;
210
+ transitionEase?: EaseFunction | ((value: number) => number) | undefined;
211
+ transitionEasing?: EaseFunction | ((value: number) => number) | undefined;
212
+ transitionDuration?: number | undefined;
213
+ transitionDelay?: number | undefined;
214
+ } | {
215
+ transitionType: "spring";
216
+ transitionFriction?: number;
217
+ transitionTension?: number;
218
+ transitionSpeed?: number;
219
+ transitionBounciness?: number;
220
+ transitionStiffness?: number;
221
+ transitionDamping?: number;
222
+ transitionMass?: number;
223
+ transitionOvershootClamping?: boolean | undefined;
224
+ transitionRestDisplacementThreshold?: number | undefined;
225
+ transitionRestSpeedThreshold?: number | undefined;
226
+ transitionVelocity?: number | {
227
+ x: number;
228
+ y: number;
229
+ } | undefined;
230
+ });
231
+ type AnimateCommonProps = {
232
+ transformOriginX?: number;
233
+ transformOriginY?: number;
234
+ children?: React.ReactNode;
235
+ } & TransitionProps;
236
+ type AnimateViewProps = {} & AnimateCommonProps & ComponentStyleProps & InitialComponentStyle & animateComponentStyle & whileTapComponentStyle;
237
+ type AnimateTextProps = {} & AnimateCommonProps & ComponentStyleProps<TextStyle> & InitialComponentStyle<TextStyle> & animateComponentStyle<TextStyle> & whileTapComponentStyle<TextStyle>;
238
+ declare const Animate: {
239
+ View: react.NamedExoticComponent<AnimateViewProps>;
240
+ Text: react.NamedExoticComponent<AnimateTextProps>;
241
+ };
242
+
243
+ type ScreenHolderProps = {
244
+ /** @default false */
245
+ noScroll?: boolean;
246
+ /** @default false */
247
+ noSideSpace?: boolean;
248
+ /** @default 1 (second) */
249
+ refreshTimeout?: number;
250
+ onRefresh?: () => void;
251
+ onRefreshEnd?: () => void;
252
+ /** @default "backgroundBase" */
253
+ backgroundColor?: ViewProps["backgroundColor"];
254
+ /** @default false */
255
+ insideTopSafeArea?: boolean;
256
+ /** @default false */
257
+ insideBottomSafeArea?: boolean;
258
+ /** @default 0 */
259
+ bottomSpace?: number;
260
+ footer?: React.ReactNode;
261
+ children?: React.ReactNode;
262
+ };
263
+ type ScreenHolderComponentType = {
264
+ (props: ScreenHolderProps): React.ReactElement;
265
+ footer: (props: FooterProps) => React.ReactElement;
266
+ };
267
+ declare const ScreenHolderComponent: ScreenHolderComponentType;
268
+ type FooterProps = {
269
+ /** @default false */
270
+ noSideSpace?: boolean;
271
+ /** @default "backgroundBase" */
272
+ backgroundColor?: ViewProps["backgroundColor"];
273
+ /** @default false */
274
+ insideBottomSafeArea?: boolean;
275
+ children?: React.ReactNode;
276
+ };
277
+ declare const ScreenHolder: typeof ScreenHolderComponent & {
278
+ footer: typeof ScreenHolderComponent.footer;
279
+ };
280
+
281
+ type AsyncStoragePluginOptions = {};
282
+ declare const defaultAsyncStoragePluginOptions: Required<AsyncStoragePluginOptions>;
283
+ declare const asyncStoragePlugin: BetterComponentsPluginConstructor<AsyncStoragePluginOptions>;
284
+
285
+ export { Animate, type AnimateTextProps, type AnimateViewProps, type AppConfig, type AsyncStoragePluginOptions, type BetterComponentsConfig, type BetterComponentsPlugin, _default as BetterComponentsProvider, type BetterComponentsProviderConfig, Button, type ButtonProps, type ComponentMarginProps, type ComponentPaddingProps, type FooterProps, Loader, type LoaderProps, type LoaderSize, type PluginName, ScreenHolder, type ScreenHolderProps, Text, type TextProps, View, type ViewProps, asyncStoragePlugin, defaultAsyncStoragePluginOptions, generateAsyncStorage, pressStrength, useBetterComponentsContext, useDevice };
@@ -0,0 +1,285 @@
1
+ import { BetterCoreProviderConfig, DeepPartialRecord, BetterCoreConfig, OmitProps, IconName, AnyOtherString, AssetName, LoaderName } from 'react-better-core';
2
+ export { AnyOtherString, AssetName, AssetsConfig, Color, ColorName, ColorTheme, Colors, Country, DeepPartialRecord, ExcludeOptions, IconName, IconsConfig, LoaderConfig, LoaderName, OmitProps, PartialRecord, PickAllRequired, PickValue, Styles, Theme, ThemeConfig, colorThemeControls, countries, darkenColor, desaturateColor, eventPreventDefault, eventPreventStop, eventStopPropagation, formatPhoneNumber, generateRandomString, getPluralWord, lightenColor, loaderControls, saturateColor, useBooleanState, useDebounceState, useLoader, useLoaderControls, useTheme } from 'react-better-core';
3
+ import * as react from 'react';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import * as react_native from 'react-native';
6
+ import { ViewStyle, GestureResponderEvent, ViewProps as ViewProps$1, TextProps as TextProps$1, TextStyle, ColorValue } from 'react-native';
7
+ import { EaseFunction, PropsTransforms } from '@legendapp/motion';
8
+
9
+ type AppConfig = {};
10
+ type BetterComponentsConfig = {
11
+ app: AppConfig;
12
+ };
13
+
14
+ type PluginName = "asyncStorage";
15
+ type BetterComponentsPluginConstructor<T extends object = object> = (config?: T) => BetterComponentsPlugin<T>;
16
+ type BetterComponentsPlugin<T = object> = {
17
+ name: PluginName;
18
+ initialize?: () => void;
19
+ getConfig: () => T;
20
+ };
21
+
22
+ declare const useBetterComponentsContext: () => BetterComponentsConfig & BetterCoreConfig;
23
+ type BetterComponentsProviderInternalConfig = DeepPartialRecord<BetterComponentsConfig>;
24
+ type BetterProviderCommonProps = {
25
+ plugins?: BetterComponentsPlugin[];
26
+ children?: React.ReactNode;
27
+ };
28
+ type BetterComponentsProviderConfig = BetterCoreProviderConfig & BetterComponentsProviderInternalConfig;
29
+ type BetterComponentsProviderProps = BetterProviderCommonProps & {
30
+ config?: BetterComponentsProviderConfig;
31
+ };
32
+ declare function BetterComponentsProvider({ config, ...props }: BetterComponentsProviderProps): react_jsx_runtime.JSX.Element;
33
+ declare const _default: react.MemoExoticComponent<typeof BetterComponentsProvider>;
34
+
35
+ type ComponentStyle<Style extends ViewStyle = ViewStyle> = OmitProps<Style, "shadowOffset" | ComponentExcludeMarginProps | ComponentExcludePaddingProps> & {
36
+ shadowOffsetWidth?: number;
37
+ shadowOffsetHeight?: number;
38
+ };
39
+ type ComponentMarginProps = Pick<ComponentStyle, "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "marginVertical" | "marginHorizontal">;
40
+ type ComponentExcludeMarginProps = "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginStart" | "marginEnd";
41
+ type ComponentPaddingProps = Pick<ComponentStyle, "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingVertical" | "paddingHorizontal">;
42
+ type ComponentExcludePaddingProps = "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingStart" | "paddingEnd";
43
+
44
+ declare const pressStrength: () => Record<"z05" | "z1" | "z2" | "z3", number>;
45
+
46
+ declare function useDevice(): {
47
+ safeArea: {
48
+ /** @description The safe area insets after calculations. Recommended to use this instead of the raw insets. */
49
+ afterCalculations: {
50
+ top: number;
51
+ bottom: number;
52
+ left: number;
53
+ right: number;
54
+ };
55
+ top: number;
56
+ right: number;
57
+ bottom: number;
58
+ left: number;
59
+ };
60
+ /** @description The dimensions of the device screen. */
61
+ screenDimensions: react_native.ScaledSize;
62
+ /** @description The dimensions of the app window. */
63
+ windowDimensions: react_native.ScaledSize;
64
+ /** @description Whether the device is small. */
65
+ isSmallDevice: boolean;
66
+ };
67
+
68
+ declare function generateAsyncStorage<AsyncStorage extends object>(): {
69
+ setItem: <StorageName extends keyof AsyncStorage>(name: StorageName, value: AsyncStorage[StorageName]) => void;
70
+ getItem: <StorageName extends keyof AsyncStorage>(name: StorageName) => Promise<AsyncStorage[StorageName] | undefined>;
71
+ removeItem: (name: keyof AsyncStorage) => void;
72
+ removeAllItems: () => void;
73
+ };
74
+
75
+ type ViewProps<Value = unknown> = {
76
+ /** @default false */
77
+ isRow?: boolean;
78
+ value?: Value;
79
+ /** @default false */
80
+ disabled?: boolean;
81
+ /** @default "highlight" */
82
+ pressType?: "opacity" | "highlight";
83
+ /** @default 0.8 */
84
+ pressStrength?: number;
85
+ onPress?: (event: GestureResponderEvent) => void;
86
+ onPressIn?: (event: GestureResponderEvent) => void;
87
+ onPressOut?: (event: GestureResponderEvent) => void;
88
+ onLongPress?: (event: GestureResponderEvent) => void;
89
+ onPressWithValue?: (value: Value) => void;
90
+ } & OmitProps<ViewProps$1, "style" | "onBlur" | "onFocus"> & ComponentStyle;
91
+ type ViewComponentType = {
92
+ <Value>(props: ViewProps<Value>): React.ReactElement;
93
+ box: <Value>(props: ViewProps<Value> & {
94
+ /** @default false */
95
+ withShadow?: boolean;
96
+ }) => React.ReactElement;
97
+ };
98
+ declare const ViewComponent: ViewComponentType;
99
+ declare const View: typeof ViewComponent & {
100
+ box: typeof ViewComponent.box;
101
+ };
102
+
103
+ type TextProps = {} & OmitProps<TextProps$1, "style"> & ComponentStyle<TextStyle>;
104
+ type TextComponentType = {
105
+ (props: TextProps): React.ReactElement;
106
+ title: (props: TextProps) => React.ReactElement;
107
+ subtitle: (props: TextProps) => React.ReactElement;
108
+ body: (props: TextProps) => React.ReactElement;
109
+ caption: (props: TextProps) => React.ReactElement;
110
+ unknown: (props: TextProps) => React.ReactElement;
111
+ };
112
+ declare const TextComponent: TextComponentType;
113
+ declare const Text: typeof TextComponent & {
114
+ title: typeof TextComponent.title;
115
+ subtitle: typeof TextComponent.subtitle;
116
+ body: typeof TextComponent.body;
117
+ caption: typeof TextComponent.caption;
118
+ unknown: typeof TextComponent.unknown;
119
+ };
120
+
121
+ type ButtonProps<Value> = {
122
+ text?: string;
123
+ /** @default 16 */
124
+ textFontSize?: TextProps["fontSize"];
125
+ /** @default 700 */
126
+ textFontWeight?: TextProps["fontWeight"];
127
+ textDecorationLine?: TextProps["textDecorationLine"];
128
+ /** @default "base" */
129
+ textColor?: ColorValue;
130
+ icon?: IconName | AnyOtherString;
131
+ /** @default "left" */
132
+ iconPosition?: "left" | "right";
133
+ /** @default Same as text color */
134
+ iconColor?: string;
135
+ /** @default 16 */
136
+ iconSize?: number;
137
+ image?: AssetName | AnyOtherString;
138
+ /** @default "left" */
139
+ imagePosition?: "left" | "right";
140
+ /** @default 16 */
141
+ imageWidth?: number;
142
+ /** @default undefined */
143
+ imageHeight?: number;
144
+ loaderName?: LoaderName | AnyOtherString;
145
+ /** @default false */
146
+ isLoading?: boolean;
147
+ isSmall?: true | "left" | "center" | "right";
148
+ } & ViewProps<Value>;
149
+ type InternalButtonProps<Value> = ButtonProps<Value> & {
150
+ animateOpacity?: number;
151
+ };
152
+ type ButtonComponentType = {
153
+ <Value>(props: ButtonProps<Value>): React.ReactElement;
154
+ secondary: <Value>(props: ButtonProps<Value>) => React.ReactElement;
155
+ destructive: <Value>(props: ButtonProps<Value>) => React.ReactElement;
156
+ text: <Value>(props: ButtonProps<Value>) => React.ReactElement;
157
+ };
158
+ declare const ButtonComponent: {
159
+ <Value>({ text, textFontSize, textFontWeight, textDecorationLine, textColor, icon, iconPosition, iconColor, iconSize, image, imagePosition, imageWidth, imageHeight, loaderName, isLoading, isSmall, animateOpacity, flex, alignSelf, disabled, ...props }: InternalButtonProps<Value>): react_jsx_runtime.JSX.Element;
160
+ secondary: <Value>(props: ButtonProps<Value>) => React.ReactElement;
161
+ destructive: <Value>(props: ButtonProps<Value>) => React.ReactElement;
162
+ text: <Value>(props: ButtonProps<Value>) => React.ReactElement;
163
+ };
164
+ declare const Button: ButtonComponentType & {
165
+ secondary: typeof ButtonComponent.secondary;
166
+ destructive: typeof ButtonComponent.destructive;
167
+ text: typeof ButtonComponent.text;
168
+ };
169
+
170
+ type LoaderSize = "small" | "large";
171
+ type LoaderProps = {
172
+ /** @default "small" */
173
+ size?: LoaderSize;
174
+ color?: ColorValue;
175
+ } & ComponentMarginProps;
176
+ type LoaderComponentType = {
177
+ (props: LoaderProps): React.ReactElement;
178
+ box: (props: OmitProps<LoaderProps, "size"> & {
179
+ /** @default "Loading..." */
180
+ text?: string;
181
+ /** @default "large" */
182
+ size?: LoaderSize;
183
+ }) => React.ReactElement;
184
+ text: (props: LoaderProps & {
185
+ /** @default "Loading..." */
186
+ text?: string;
187
+ }) => React.ReactElement;
188
+ };
189
+ declare const LoaderComponent: LoaderComponentType;
190
+ declare const Loader: typeof LoaderComponent & {
191
+ box: typeof LoaderComponent.box;
192
+ text: typeof LoaderComponent.text;
193
+ };
194
+
195
+ type ComponentStyleProps<Style extends ViewStyle = ViewStyle> = Omit<ComponentStyle<Style>, "transformOrigin">;
196
+ type AnimationStyleProps<Style extends ViewStyle = ViewStyle> = ComponentStyle<Style> & PropsTransforms;
197
+ type InitialComponentStyle<Style extends ViewStyle = ViewStyle> = {
198
+ [CSSProperty in keyof AnimationStyleProps<Style> as `initial${Capitalize<CSSProperty & string>}`]: AnimationStyleProps<Style>[CSSProperty];
199
+ };
200
+ type animateComponentStyle<Style extends ViewStyle = ViewStyle> = {
201
+ [CSSProperty in keyof AnimationStyleProps<Style> as `animate${Capitalize<CSSProperty & string>}`]: AnimationStyleProps<Style>[CSSProperty];
202
+ };
203
+ type whileTapComponentStyle<Style extends ViewStyle = ViewStyle> = {
204
+ [CSSProperty in keyof AnimationStyleProps<Style> as `whileTap${Capitalize<CSSProperty & string>}`]: AnimationStyleProps<Style>[CSSProperty];
205
+ };
206
+ type TransitionProps = {
207
+ transitionLoop?: number;
208
+ } & ({
209
+ transitionType?: "tween" | "timing" | undefined;
210
+ transitionEase?: EaseFunction | ((value: number) => number) | undefined;
211
+ transitionEasing?: EaseFunction | ((value: number) => number) | undefined;
212
+ transitionDuration?: number | undefined;
213
+ transitionDelay?: number | undefined;
214
+ } | {
215
+ transitionType: "spring";
216
+ transitionFriction?: number;
217
+ transitionTension?: number;
218
+ transitionSpeed?: number;
219
+ transitionBounciness?: number;
220
+ transitionStiffness?: number;
221
+ transitionDamping?: number;
222
+ transitionMass?: number;
223
+ transitionOvershootClamping?: boolean | undefined;
224
+ transitionRestDisplacementThreshold?: number | undefined;
225
+ transitionRestSpeedThreshold?: number | undefined;
226
+ transitionVelocity?: number | {
227
+ x: number;
228
+ y: number;
229
+ } | undefined;
230
+ });
231
+ type AnimateCommonProps = {
232
+ transformOriginX?: number;
233
+ transformOriginY?: number;
234
+ children?: React.ReactNode;
235
+ } & TransitionProps;
236
+ type AnimateViewProps = {} & AnimateCommonProps & ComponentStyleProps & InitialComponentStyle & animateComponentStyle & whileTapComponentStyle;
237
+ type AnimateTextProps = {} & AnimateCommonProps & ComponentStyleProps<TextStyle> & InitialComponentStyle<TextStyle> & animateComponentStyle<TextStyle> & whileTapComponentStyle<TextStyle>;
238
+ declare const Animate: {
239
+ View: react.NamedExoticComponent<AnimateViewProps>;
240
+ Text: react.NamedExoticComponent<AnimateTextProps>;
241
+ };
242
+
243
+ type ScreenHolderProps = {
244
+ /** @default false */
245
+ noScroll?: boolean;
246
+ /** @default false */
247
+ noSideSpace?: boolean;
248
+ /** @default 1 (second) */
249
+ refreshTimeout?: number;
250
+ onRefresh?: () => void;
251
+ onRefreshEnd?: () => void;
252
+ /** @default "backgroundBase" */
253
+ backgroundColor?: ViewProps["backgroundColor"];
254
+ /** @default false */
255
+ insideTopSafeArea?: boolean;
256
+ /** @default false */
257
+ insideBottomSafeArea?: boolean;
258
+ /** @default 0 */
259
+ bottomSpace?: number;
260
+ footer?: React.ReactNode;
261
+ children?: React.ReactNode;
262
+ };
263
+ type ScreenHolderComponentType = {
264
+ (props: ScreenHolderProps): React.ReactElement;
265
+ footer: (props: FooterProps) => React.ReactElement;
266
+ };
267
+ declare const ScreenHolderComponent: ScreenHolderComponentType;
268
+ type FooterProps = {
269
+ /** @default false */
270
+ noSideSpace?: boolean;
271
+ /** @default "backgroundBase" */
272
+ backgroundColor?: ViewProps["backgroundColor"];
273
+ /** @default false */
274
+ insideBottomSafeArea?: boolean;
275
+ children?: React.ReactNode;
276
+ };
277
+ declare const ScreenHolder: typeof ScreenHolderComponent & {
278
+ footer: typeof ScreenHolderComponent.footer;
279
+ };
280
+
281
+ type AsyncStoragePluginOptions = {};
282
+ declare const defaultAsyncStoragePluginOptions: Required<AsyncStoragePluginOptions>;
283
+ declare const asyncStoragePlugin: BetterComponentsPluginConstructor<AsyncStoragePluginOptions>;
284
+
285
+ export { Animate, type AnimateTextProps, type AnimateViewProps, type AppConfig, type AsyncStoragePluginOptions, type BetterComponentsConfig, type BetterComponentsPlugin, _default as BetterComponentsProvider, type BetterComponentsProviderConfig, Button, type ButtonProps, type ComponentMarginProps, type ComponentPaddingProps, type FooterProps, Loader, type LoaderProps, type LoaderSize, type PluginName, ScreenHolder, type ScreenHolderProps, Text, type TextProps, View, type ViewProps, asyncStoragePlugin, defaultAsyncStoragePluginOptions, generateAsyncStorage, pressStrength, useBetterComponentsContext, useDevice };