@umituz/react-native-ai-generation-content 1.17.136 → 1.17.138

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.136",
3
+ "version": "1.17.138",
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
@@ -305,7 +305,6 @@ export {
305
305
  DEFAULT_RESULT_CONFIG,
306
306
  PhotoStep,
307
307
  // Image Picker
308
- ImagePickerBox,
309
308
  DualImagePicker,
310
309
  // New Generic Sections
311
310
  PromptInput,
@@ -361,7 +360,6 @@ export type {
361
360
  ResultActionButton,
362
361
  PhotoStepProps,
363
362
  // Image Picker
364
- ImagePickerBoxProps,
365
363
  DualImagePickerProps,
366
364
  PromptInputProps,
367
365
  AIGenerationHeroProps,
@@ -7,7 +7,7 @@
7
7
  import React from "react";
8
8
  import { View, StyleSheet } from "react-native";
9
9
  import { useAppDesignTokens } from "@umituz/react-native-design-system";
10
- import { ImagePickerBox, type ImagePickerBoxProps } from "./ImagePickerBox";
10
+ import { PhotoUploadCard } from "../PhotoUploadCard";
11
11
 
12
12
  export interface DualImagePickerProps {
13
13
  readonly sourceImageUri: string | null;
@@ -17,7 +17,6 @@ export interface DualImagePickerProps {
17
17
  readonly onSelectTarget: () => void;
18
18
  readonly sourcePlaceholder: string;
19
19
  readonly targetPlaceholder: string;
20
- readonly variant?: ImagePickerBoxProps["variant"];
21
20
  readonly layout?: "horizontal" | "vertical";
22
21
  }
23
22
 
@@ -29,7 +28,6 @@ export const DualImagePicker: React.FC<DualImagePickerProps> = ({
29
28
  onSelectTarget,
30
29
  sourcePlaceholder,
31
30
  targetPlaceholder,
32
- variant = "portrait",
33
31
  layout = "horizontal",
34
32
  }) => {
35
33
  const tokens = useAppDesignTokens();
@@ -44,22 +42,22 @@ export const DualImagePicker: React.FC<DualImagePickerProps> = ({
44
42
  ]}
45
43
  >
46
44
  <View style={isHorizontal ? styles.pickerHalf : styles.pickerFull}>
47
- <ImagePickerBox
45
+ <PhotoUploadCard
48
46
  imageUri={sourceImageUri}
49
- isDisabled={isDisabled}
47
+ disabled={isDisabled}
50
48
  onPress={onSelectSource}
51
- placeholderText={sourcePlaceholder}
52
- variant={variant}
49
+ title={sourcePlaceholder}
50
+ config={{ aspectRatio: 1, borderRadius: 20 }}
53
51
  />
54
52
  </View>
55
53
 
56
54
  <View style={isHorizontal ? styles.pickerHalf : styles.pickerFull}>
57
- <ImagePickerBox
55
+ <PhotoUploadCard
58
56
  imageUri={targetImageUri}
59
- isDisabled={isDisabled}
57
+ disabled={isDisabled}
60
58
  onPress={onSelectTarget}
61
- placeholderText={targetPlaceholder}
62
- variant={variant}
59
+ title={targetPlaceholder}
60
+ config={{ aspectRatio: 1, borderRadius: 20 }}
63
61
  />
64
62
  </View>
65
63
  </View>
@@ -1,2 +1 @@
1
- export { ImagePickerBox, type ImagePickerBoxProps } from "./ImagePickerBox";
2
1
  export { DualImagePicker, type DualImagePickerProps } from "./DualImagePicker";
@@ -1,176 +0,0 @@
1
- /**
2
- * ImagePickerBox Component
3
- * Generic image picker box with solid color design
4
- * Props-driven for 100+ apps compatibility
5
- */
6
-
7
- import React from "react";
8
- import {
9
- View,
10
- StyleSheet,
11
- TouchableOpacity,
12
- Image,
13
- type ViewStyle,
14
- } from "react-native";
15
- import {
16
- AtomicText,
17
- useAppDesignTokens,
18
- AtomicIcon,
19
- } from "@umituz/react-native-design-system";
20
-
21
- export interface ImagePickerBoxProps {
22
- readonly imageUri: string | null;
23
- readonly isDisabled?: boolean;
24
- readonly onPress: () => void;
25
- readonly placeholderText: string;
26
- readonly variant?: "portrait" | "square" | "landscape";
27
- readonly size?: "sm" | "md" | "lg";
28
- readonly uploadIcon?: string;
29
- readonly editIcon?: string;
30
- }
31
-
32
- const VARIANT_STYLES: Record<string, ViewStyle> = {
33
- portrait: { width: 200, height: 280, borderRadius: 20 },
34
- square: { width: "100%", aspectRatio: 1, borderRadius: 24 },
35
- landscape: { width: "100%", aspectRatio: 16 / 9, borderRadius: 16 },
36
- };
37
-
38
- const SIZE_MULTIPLIERS = { sm: 0.7, md: 1, lg: 1.3 };
39
-
40
- export const ImagePickerBox: React.FC<ImagePickerBoxProps> = ({
41
- imageUri,
42
- isDisabled = false,
43
- onPress,
44
- placeholderText,
45
- variant = "portrait",
46
- size = "md",
47
- uploadIcon = "cloud-upload-outline",
48
- editIcon = "image-outline",
49
- }) => {
50
- const tokens = useAppDesignTokens();
51
- const multiplier = SIZE_MULTIPLIERS[size];
52
- const baseStyle = VARIANT_STYLES[variant];
53
- const iconSize = Math.round(32 * multiplier);
54
-
55
- return (
56
- <View style={styles.container}>
57
- <TouchableOpacity
58
- style={[
59
- styles.box,
60
- baseStyle,
61
- { backgroundColor: tokens.colors.backgroundSecondary },
62
- ]}
63
- onPress={onPress}
64
- disabled={isDisabled}
65
- activeOpacity={0.8}
66
- >
67
- {imageUri ? (
68
- <View style={styles.imageContainer}>
69
- <Image source={{ uri: imageUri }} style={styles.image} />
70
- <View
71
- style={[
72
- styles.imageOverlay,
73
- { backgroundColor: tokens.colors.modalOverlay },
74
- ]}
75
- >
76
- <View
77
- style={[
78
- styles.editBadge,
79
- { backgroundColor: tokens.colors.primary },
80
- ]}
81
- >
82
- <AtomicIcon
83
- name={editIcon}
84
- customSize={Math.round(16 * multiplier)}
85
- customColor={tokens.colors.textInverse}
86
- />
87
- </View>
88
- </View>
89
- </View>
90
- ) : (
91
- <View
92
- style={[
93
- styles.placeholder,
94
- { backgroundColor: tokens.colors.primary },
95
- ]}
96
- >
97
- <View style={styles.placeholderContent}>
98
- <View
99
- style={[
100
- styles.uploadIconContainer,
101
- { backgroundColor: tokens.colors.surface },
102
- ]}
103
- >
104
- <AtomicIcon
105
- name={uploadIcon}
106
- customSize={iconSize}
107
- customColor={tokens.colors.primary}
108
- />
109
- </View>
110
- <AtomicText
111
- type="bodyMedium"
112
- style={[
113
- styles.placeholderText,
114
- { color: tokens.colors.textInverse },
115
- ]}
116
- >
117
- {placeholderText}
118
- </AtomicText>
119
- </View>
120
- </View>
121
- )}
122
- </TouchableOpacity>
123
- </View>
124
- );
125
- };
126
-
127
- const styles = StyleSheet.create({
128
- container: {
129
- marginVertical: 16,
130
- alignItems: "center",
131
- },
132
- box: {
133
- overflow: "hidden",
134
- },
135
- imageContainer: {
136
- flex: 1,
137
- position: "relative",
138
- },
139
- image: {
140
- width: "100%",
141
- height: "100%",
142
- },
143
- imageOverlay: {
144
- position: "absolute",
145
- bottom: 0,
146
- left: 0,
147
- right: 0,
148
- height: "30%",
149
- justifyContent: "flex-end",
150
- alignItems: "flex-end",
151
- padding: 12,
152
- },
153
- editBadge: {
154
- borderRadius: 20,
155
- padding: 8,
156
- },
157
- placeholder: {
158
- flex: 1,
159
- justifyContent: "center",
160
- alignItems: "center",
161
- },
162
- placeholderContent: {
163
- alignItems: "center",
164
- justifyContent: "center",
165
- paddingHorizontal: 16,
166
- },
167
- uploadIconContainer: {
168
- borderRadius: 40,
169
- padding: 16,
170
- marginBottom: 12,
171
- },
172
- placeholderText: {
173
- textAlign: "center",
174
- fontWeight: "600",
175
- },
176
- });