@umituz/react-native-ai-generation-content 1.17.35 → 1.17.37

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-ai-generation-content",
3
- "version": "1.17.35",
3
+ "version": "1.17.37",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
package/src/index.ts CHANGED
@@ -278,6 +278,10 @@ export {
278
278
  // Image Picker
279
279
  ImagePickerBox,
280
280
  DualImagePicker,
281
+ // New Generic Sections
282
+ AIGenerationProgressInline,
283
+ PromptInput,
284
+ HeroSection,
281
285
  // Buttons
282
286
  GenerateButton,
283
287
  // Display
@@ -319,6 +323,9 @@ export type {
319
323
  // Image Picker
320
324
  ImagePickerBoxProps,
321
325
  DualImagePickerProps,
326
+ AIGenerationProgressInlineProps,
327
+ PromptInputProps,
328
+ HeroSectionProps,
322
329
  // Buttons
323
330
  GenerateButtonProps,
324
331
  // Display
@@ -337,6 +344,20 @@ export type {
337
344
  StyleOption,
338
345
  AspectRatioOption,
339
346
  DurationValue,
347
+ // Selector Factories
348
+ AspectRatioTranslations,
349
+ DurationOption,
350
+ StyleTranslations,
351
+ } from "./presentation/components";
352
+
353
+ // Selector Factories
354
+ export {
355
+ createAspectRatioOptions,
356
+ createDurationOptions,
357
+ createStyleOptions,
358
+ createStyleOptionsFromConfig,
359
+ ASPECT_RATIO_IDS,
360
+ COMMON_DURATIONS,
340
361
  } from "./presentation/components";
341
362
 
342
363
  // =============================================================================
@@ -0,0 +1,105 @@
1
+ /**
2
+ * AIGenerationProgressInline Component
3
+ * Generic inline generation progress display
4
+ * Props-driven for 100+ apps compatibility
5
+ */
6
+
7
+ import React from "react";
8
+ import { View, ActivityIndicator, StyleSheet } from "react-native";
9
+ import {
10
+ AtomicText,
11
+ useAppDesignTokens,
12
+ AtomicProgress,
13
+ } from "@umituz/react-native-design-system";
14
+
15
+ export interface AIGenerationProgressInlineProps {
16
+ readonly progress: number;
17
+ readonly title?: string;
18
+ readonly message?: string;
19
+ readonly hint?: string;
20
+ readonly backgroundColor?: string;
21
+ readonly accentColor?: string;
22
+ }
23
+
24
+ export const AIGenerationProgressInline: React.FC<
25
+ AIGenerationProgressInlineProps
26
+ > = ({
27
+ progress,
28
+ title,
29
+ message,
30
+ hint,
31
+ backgroundColor,
32
+ accentColor,
33
+ }) => {
34
+ const tokens = useAppDesignTokens();
35
+ const primaryColor = accentColor || tokens.colors.primary;
36
+ const bgColor = backgroundColor || tokens.colors.surface;
37
+
38
+ const clampedProgress = Math.max(0, Math.min(100, progress));
39
+
40
+ return (
41
+ <View style={[styles.container, { backgroundColor: bgColor }]}>
42
+ <ActivityIndicator size="large" color={primaryColor} />
43
+
44
+ {title && (
45
+ <AtomicText
46
+ type="bodyMedium"
47
+ style={[styles.title, { color: tokens.colors.textPrimary }]}
48
+ >
49
+ {title}
50
+ </AtomicText>
51
+ )}
52
+
53
+ {message && (
54
+ <AtomicText
55
+ type="bodySmall"
56
+ style={[styles.message, { color: tokens.colors.textSecondary }]}
57
+ >
58
+ {message}
59
+ </AtomicText>
60
+ )}
61
+
62
+ <View style={styles.progressBarWrapper}>
63
+ <AtomicProgress
64
+ value={clampedProgress}
65
+ height={8}
66
+ color={primaryColor}
67
+ backgroundColor={tokens.colors.surfaceVariant}
68
+ shape="rounded"
69
+ showPercentage={false}
70
+ />
71
+ </View>
72
+
73
+ <AtomicText
74
+ type="labelSmall"
75
+ style={[styles.progressLabel, { color: tokens.colors.textSecondary }]}
76
+ >
77
+ {clampedProgress}%{hint ? ` • ${hint}` : ""}
78
+ </AtomicText>
79
+ </View>
80
+ );
81
+ };
82
+
83
+ const styles = StyleSheet.create({
84
+ container: {
85
+ margin: 16,
86
+ padding: 24,
87
+ borderRadius: 16,
88
+ alignItems: "center",
89
+ },
90
+ title: {
91
+ marginTop: 16,
92
+ fontWeight: "600",
93
+ },
94
+ message: {
95
+ marginTop: 8,
96
+ textAlign: "center",
97
+ },
98
+ progressBarWrapper: {
99
+ width: "100%",
100
+ marginTop: 16,
101
+ },
102
+ progressLabel: {
103
+ marginTop: 8,
104
+ },
105
+ });
@@ -0,0 +1,89 @@
1
+ /**
2
+ * HeroSection Component
3
+ * Generic hero section with gradient background and optional icon
4
+ * Props-driven for 100+ apps compatibility
5
+ */
6
+
7
+ import React from "react";
8
+ import { View, StyleSheet } from "react-native";
9
+ import { LinearGradient } from "expo-linear-gradient";
10
+ import {
11
+ AtomicText,
12
+ AtomicIcon,
13
+ useAppDesignTokens,
14
+ } from "@umituz/react-native-design-system";
15
+
16
+ export interface HeroSectionProps {
17
+ readonly title: string;
18
+ readonly subtitle?: string;
19
+ readonly iconName?: string;
20
+ readonly gradientColors?: readonly [string, string, ...string[]];
21
+ }
22
+
23
+ export const HeroSection: React.FC<HeroSectionProps> = ({
24
+ title,
25
+ subtitle,
26
+ iconName,
27
+ gradientColors = ["#00FF88", "#10B981"],
28
+ }) => {
29
+ const tokens = useAppDesignTokens();
30
+
31
+ return (
32
+ <View style={styles.container}>
33
+ <LinearGradient
34
+ colors={gradientColors}
35
+ start={{ x: 0, y: 0 }}
36
+ end={{ x: 1, y: 1 }}
37
+ style={styles.gradient}
38
+ >
39
+ {iconName && (
40
+ <View style={styles.iconWrapper}>
41
+ <AtomicIcon name={iconName} size="xl" color="onSurface" />
42
+ </View>
43
+ )}
44
+ <AtomicText type="headlineSmall" style={styles.title}>
45
+ {title}
46
+ </AtomicText>
47
+ {subtitle && (
48
+ <AtomicText type="bodyMedium" style={styles.subtitle}>
49
+ {subtitle}
50
+ </AtomicText>
51
+ )}
52
+ </LinearGradient>
53
+ </View>
54
+ );
55
+ };
56
+
57
+ const styles = StyleSheet.create({
58
+ container: {
59
+ marginHorizontal: 16,
60
+ marginBottom: 24,
61
+ borderRadius: 20,
62
+ overflow: "hidden",
63
+ },
64
+ gradient: {
65
+ padding: 32,
66
+ alignItems: "center",
67
+ justifyContent: "center",
68
+ },
69
+ iconWrapper: {
70
+ width: 80,
71
+ height: 80,
72
+ borderRadius: 40,
73
+ backgroundColor: "rgba(255, 255, 255, 0.2)",
74
+ alignItems: "center",
75
+ justifyContent: "center",
76
+ marginBottom: 16,
77
+ },
78
+ title: {
79
+ color: "#FFFFFF",
80
+ textAlign: "center",
81
+ fontWeight: "700",
82
+ },
83
+ subtitle: {
84
+ color: "#FFFFFF",
85
+ textAlign: "center",
86
+ marginTop: 8,
87
+ opacity: 0.9,
88
+ },
89
+ });
@@ -0,0 +1,84 @@
1
+ /**
2
+ * PromptInput Component
3
+ * Generic AI prompt input with customizable title and placeholder
4
+ * Props-driven for 100+ apps compatibility
5
+ */
6
+
7
+ import React from "react";
8
+ import { View, TextInput, StyleSheet } from "react-native";
9
+ import {
10
+ AtomicText,
11
+ useAppDesignTokens,
12
+ } from "@umituz/react-native-design-system";
13
+
14
+ export interface PromptInputProps {
15
+ readonly value: string;
16
+ readonly onChangeText: (text: string) => void;
17
+ readonly title?: string;
18
+ readonly placeholder?: string;
19
+ readonly minHeight?: number;
20
+ readonly maxLines?: number;
21
+ readonly isDisabled?: boolean;
22
+ }
23
+
24
+ export const PromptInput: React.FC<PromptInputProps> = ({
25
+ value,
26
+ onChangeText,
27
+ title,
28
+ placeholder,
29
+ minHeight = 120,
30
+ maxLines = 6,
31
+ isDisabled = false,
32
+ }) => {
33
+ const tokens = useAppDesignTokens();
34
+
35
+ return (
36
+ <View style={styles.container}>
37
+ {title && (
38
+ <AtomicText
39
+ type="bodyMedium"
40
+ style={[styles.label, { color: tokens.colors.textPrimary }]}
41
+ >
42
+ {title}
43
+ </AtomicText>
44
+ )}
45
+ <TextInput
46
+ style={[
47
+ styles.input,
48
+ {
49
+ backgroundColor: tokens.colors.surface,
50
+ color: tokens.colors.textPrimary,
51
+ borderColor: tokens.colors.borderLight,
52
+ minHeight,
53
+ },
54
+ ]}
55
+ placeholder={placeholder}
56
+ placeholderTextColor={tokens.colors.textSecondary}
57
+ value={value}
58
+ onChangeText={onChangeText}
59
+ multiline
60
+ numberOfLines={4}
61
+ maxLength={500}
62
+ textAlignVertical="top"
63
+ editable={!isDisabled}
64
+ />
65
+ </View>
66
+ );
67
+ };
68
+
69
+ const styles = StyleSheet.create({
70
+ container: {
71
+ padding: 16,
72
+ width: "100%",
73
+ },
74
+ label: {
75
+ fontWeight: "600",
76
+ marginBottom: 8,
77
+ },
78
+ input: {
79
+ borderWidth: 1,
80
+ borderRadius: 12,
81
+ padding: 16,
82
+ fontSize: 16,
83
+ },
84
+ });
@@ -4,6 +4,9 @@ export { GenerationProgressBar } from "./GenerationProgressBar";
4
4
  export { PendingJobCard } from "./PendingJobCard";
5
5
  export { PendingJobProgressBar } from "./PendingJobProgressBar";
6
6
  export { PendingJobCardActions } from "./PendingJobCardActions";
7
+ export { AIGenerationProgressInline } from "./AIGenerationProgressInline";
8
+ export { PromptInput } from "./PromptInput";
9
+ export { HeroSection } from "./HeroSection";
7
10
 
8
11
  export type {
9
12
  GenerationProgressModalProps,
@@ -20,6 +23,9 @@ export type {
20
23
 
21
24
  export type { PendingJobProgressBarProps } from "./PendingJobProgressBar";
22
25
  export type { PendingJobCardActionsProps } from "./PendingJobCardActions";
26
+ export type { AIGenerationProgressInlineProps } from "./AIGenerationProgressInline";
27
+ export type { PromptInputProps } from "./PromptInput";
28
+ export type { HeroSectionProps } from "./HeroSection";
23
29
 
24
30
  export * from "./result";
25
31
  export * from "./photo-step";