@umituz/react-native-ai-generation-content 1.17.47 → 1.17.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/package.json +1 -1
  2. package/src/features/image-to-video/presentation/components/index.ts +3 -3
  3. package/src/features/text-to-image/presentation/components/index.ts +13 -27
  4. package/src/features/text-to-voice/presentation/components/index.ts +4 -4
  5. package/src/index.ts +4 -0
  6. package/src/presentation/components/PromptInput.tsx +41 -13
  7. package/src/presentation/components/buttons/GenerateButton.tsx +93 -42
  8. package/src/presentation/components/index.ts +10 -0
  9. package/src/{features/text-to-image/presentation/components → presentation/components/modals}/SettingsSheet.tsx +10 -8
  10. package/src/presentation/components/selectors/AspectRatioSelector.tsx +2 -2
  11. package/src/presentation/components/selectors/GridSelector.tsx +5 -3
  12. package/src/features/image-to-video/presentation/components/GenerateButton.tsx +0 -95
  13. package/src/features/text-to-image/presentation/components/AspectRatioSelector.tsx +0 -98
  14. package/src/features/text-to-image/presentation/components/ImageSizeSelector.tsx +0 -98
  15. package/src/features/text-to-image/presentation/components/NumImagesSelector.tsx +0 -93
  16. package/src/features/text-to-image/presentation/components/OutputFormatSelector.tsx +0 -98
  17. package/src/features/text-to-image/presentation/components/StyleSelector.tsx +0 -110
  18. package/src/features/text-to-image/presentation/components/TextToImageGenerateButton.tsx +0 -84
  19. package/src/features/text-to-image/presentation/components/TextToImagePromptInput.tsx +0 -90
  20. package/src/features/text-to-voice/presentation/components/TextToVoiceErrorMessage.tsx +0 -57
  21. package/src/features/text-to-voice/presentation/components/TextToVoiceGenerateButton.tsx +0 -87
  22. package/src/features/text-to-voice/presentation/components/TextToVoiceOptionalInput.tsx +0 -73
  23. package/src/features/text-to-voice/presentation/components/TextToVoiceTextInput.tsx +0 -85
@@ -1,57 +0,0 @@
1
- /**
2
- * TextToVoiceErrorMessage Component
3
- * Error message display
4
- */
5
-
6
- import React from "react";
7
- import { View, StyleSheet } from "react-native";
8
- import {
9
- AtomicText,
10
- AtomicIcon,
11
- useAppDesignTokens,
12
- } from "@umituz/react-native-design-system";
13
- import type { TextToVoiceErrorMessageProps } from "../../domain/types";
14
-
15
- export const TextToVoiceErrorMessage: React.FC<TextToVoiceErrorMessageProps> = ({
16
- message,
17
- style,
18
- }) => {
19
- const tokens = useAppDesignTokens();
20
-
21
- return (
22
- <View
23
- style={[
24
- styles.errorCard,
25
- {
26
- backgroundColor: `${tokens.colors.error}20`,
27
- borderColor: tokens.colors.error,
28
- },
29
- style,
30
- ]}
31
- >
32
- <AtomicIcon name="alert-circle-outline" size="sm" color="error" />
33
- <AtomicText
34
- type="bodySmall"
35
- style={[styles.errorText, { color: tokens.colors.error }]}
36
- >
37
- {message}
38
- </AtomicText>
39
- </View>
40
- );
41
- };
42
-
43
- const styles = StyleSheet.create({
44
- errorCard: {
45
- flexDirection: "row",
46
- alignItems: "center",
47
- margin: 16,
48
- marginTop: 0,
49
- padding: 12,
50
- borderRadius: 8,
51
- borderWidth: 1,
52
- },
53
- errorText: {
54
- marginLeft: 8,
55
- flex: 1,
56
- },
57
- });
@@ -1,87 +0,0 @@
1
- /**
2
- * TextToVoiceGenerateButton Component
3
- * Generate button with loading state
4
- */
5
-
6
- import React from "react";
7
- import { TouchableOpacity, ActivityIndicator, StyleSheet } from "react-native";
8
- import {
9
- AtomicText,
10
- AtomicIcon,
11
- useAppDesignTokens,
12
- } from "@umituz/react-native-design-system";
13
- import { useLocalization } from "@umituz/react-native-localization";
14
- import type { TextToVoiceGenerateButtonProps } from "../../domain/types";
15
-
16
- export const TextToVoiceGenerateButton: React.FC<
17
- TextToVoiceGenerateButtonProps
18
- > = ({
19
- isGenerating,
20
- progress,
21
- disabled,
22
- onPress,
23
- buttonTextKey,
24
- generatingTextKey,
25
- style,
26
- }) => {
27
- const { t } = useLocalization();
28
- const tokens = useAppDesignTokens();
29
-
30
- return (
31
- <TouchableOpacity
32
- style={[
33
- styles.button,
34
- {
35
- backgroundColor: tokens.colors.primary,
36
- opacity: disabled ? 0.6 : 1,
37
- },
38
- style,
39
- ]}
40
- onPress={onPress}
41
- disabled={disabled}
42
- >
43
- {isGenerating ? (
44
- <>
45
- <ActivityIndicator
46
- color={tokens.colors.onPrimary}
47
- style={styles.loader}
48
- />
49
- <AtomicText
50
- type="bodyMedium"
51
- style={[styles.buttonText, { color: tokens.colors.onPrimary }]}
52
- >
53
- {t(generatingTextKey)} {progress.toFixed(0)}%
54
- </AtomicText>
55
- </>
56
- ) : (
57
- <>
58
- <AtomicIcon name="Volume2" size="md" color="onPrimary" />
59
- <AtomicText
60
- type="bodyMedium"
61
- style={[styles.buttonText, { color: tokens.colors.onPrimary }]}
62
- >
63
- {t(buttonTextKey)}
64
- </AtomicText>
65
- </>
66
- )}
67
- </TouchableOpacity>
68
- );
69
- };
70
-
71
- const styles = StyleSheet.create({
72
- button: {
73
- flexDirection: "row",
74
- alignItems: "center",
75
- justifyContent: "center",
76
- marginHorizontal: 16,
77
- padding: 16,
78
- borderRadius: 12,
79
- },
80
- loader: {
81
- marginRight: 8,
82
- },
83
- buttonText: {
84
- fontWeight: "600",
85
- marginLeft: 8,
86
- },
87
- });
@@ -1,73 +0,0 @@
1
- /**
2
- * TextToVoiceOptionalInput Component
3
- * Optional text input with hint
4
- */
5
-
6
- import React from "react";
7
- import { View, TextInput, StyleSheet } from "react-native";
8
- import {
9
- AtomicText,
10
- useAppDesignTokens,
11
- } from "@umituz/react-native-design-system";
12
- import type { TextToVoiceOptionalInputProps } from "../../domain/types";
13
-
14
- export const TextToVoiceOptionalInput: React.FC<
15
- TextToVoiceOptionalInputProps
16
- > = ({ title, value, onChangeText, placeholder, hint, style }) => {
17
- const tokens = useAppDesignTokens();
18
-
19
- return (
20
- <View
21
- style={[styles.card, { backgroundColor: tokens.colors.surface }, style]}
22
- >
23
- <AtomicText
24
- type="bodyMedium"
25
- style={[styles.label, { color: tokens.colors.textPrimary }]}
26
- >
27
- {title}
28
- </AtomicText>
29
- <TextInput
30
- style={[
31
- styles.textInput,
32
- {
33
- backgroundColor: tokens.colors.backgroundPrimary,
34
- color: tokens.colors.textPrimary,
35
- borderColor: tokens.colors.borderLight,
36
- },
37
- ]}
38
- value={value}
39
- onChangeText={onChangeText}
40
- placeholder={placeholder}
41
- placeholderTextColor={tokens.colors.textTertiary}
42
- />
43
- <AtomicText
44
- type="bodySmall"
45
- style={[styles.hint, { color: tokens.colors.textTertiary }]}
46
- >
47
- {hint}
48
- </AtomicText>
49
- </View>
50
- );
51
- };
52
-
53
- const styles = StyleSheet.create({
54
- card: {
55
- margin: 16,
56
- marginTop: 0,
57
- padding: 16,
58
- borderRadius: 12,
59
- },
60
- label: {
61
- fontWeight: "600",
62
- marginBottom: 8,
63
- },
64
- textInput: {
65
- borderWidth: 1,
66
- borderRadius: 8,
67
- padding: 12,
68
- minHeight: 44,
69
- },
70
- hint: {
71
- marginTop: 4,
72
- },
73
- });
@@ -1,85 +0,0 @@
1
- /**
2
- * TextToVoiceTextInput Component
3
- * Text input for voice generation with character count
4
- */
5
-
6
- import React from "react";
7
- import { View, TextInput, StyleSheet } from "react-native";
8
- import {
9
- AtomicText,
10
- useAppDesignTokens,
11
- } from "@umituz/react-native-design-system";
12
- import { useLocalization } from "@umituz/react-native-localization";
13
- import type { TextToVoiceTextInputProps } from "../../domain/types";
14
-
15
- export const TextToVoiceTextInput: React.FC<TextToVoiceTextInputProps> = ({
16
- value,
17
- onChangeText,
18
- maxLength = 5000,
19
- labelKey,
20
- placeholderKey,
21
- characterCountKey,
22
- style,
23
- }) => {
24
- const { t } = useLocalization();
25
- const tokens = useAppDesignTokens();
26
-
27
- return (
28
- <View
29
- style={[styles.card, { backgroundColor: tokens.colors.surface }, style]}
30
- >
31
- <AtomicText
32
- type="bodyMedium"
33
- style={[styles.label, { color: tokens.colors.textPrimary }]}
34
- >
35
- {t(labelKey)}
36
- </AtomicText>
37
- <TextInput
38
- style={[
39
- styles.textInput,
40
- {
41
- backgroundColor: tokens.colors.backgroundPrimary,
42
- color: tokens.colors.textPrimary,
43
- borderColor: tokens.colors.borderLight,
44
- },
45
- ]}
46
- value={value}
47
- onChangeText={onChangeText}
48
- placeholder={t(placeholderKey)}
49
- placeholderTextColor={tokens.colors.textTertiary}
50
- multiline
51
- numberOfLines={6}
52
- maxLength={maxLength}
53
- />
54
- <AtomicText
55
- type="bodySmall"
56
- style={[styles.characterCount, { color: tokens.colors.textTertiary }]}
57
- >
58
- {t(characterCountKey, { count: value.length, max: maxLength })}
59
- </AtomicText>
60
- </View>
61
- );
62
- };
63
-
64
- const styles = StyleSheet.create({
65
- card: {
66
- margin: 16,
67
- marginTop: 0,
68
- padding: 16,
69
- borderRadius: 12,
70
- },
71
- label: {
72
- fontWeight: "600",
73
- marginBottom: 8,
74
- },
75
- textInput: {
76
- borderWidth: 1,
77
- borderRadius: 8,
78
- padding: 12,
79
- minHeight: 120,
80
- textAlignVertical: "top",
81
- },
82
- characterCount: {
83
- marginTop: 4,
84
- },
85
- });