@umituz/react-native-ai-generation-content 1.17.286 → 1.17.288
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 +1 -1
- package/src/domains/creations/presentation/components/CreationBadges.tsx +6 -4
- package/src/domains/creations/presentation/components/CreationCardMeta.tsx +5 -5
- package/src/features/partner-upload/presentation/hooks/usePartnerStep.ts +6 -12
- package/src/presentation/components/StylePresetsGrid.tsx +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.288",
|
|
4
4
|
"description": "Provider-agnostic AI generation orchestration for React Native with result preview components",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React, { useMemo } from "react";
|
|
7
|
-
import { View, StyleSheet
|
|
7
|
+
import { View, StyleSheet } from "react-native";
|
|
8
8
|
import {
|
|
9
9
|
useAppDesignTokens,
|
|
10
10
|
AtomicIcon,
|
|
11
|
+
AtomicText,
|
|
12
|
+
withAlpha,
|
|
11
13
|
} from "@umituz/react-native-design-system";
|
|
12
14
|
import type { CreationStatus, CreationTypeId } from "../../domain/types";
|
|
13
15
|
import { getStatusColorKey, getStatusText, getTypeIcon, getTypeText } from "../../domain/utils";
|
|
@@ -54,7 +56,7 @@ export function CreationBadges({
|
|
|
54
56
|
paddingHorizontal: 8,
|
|
55
57
|
paddingVertical: 4,
|
|
56
58
|
borderRadius: 12,
|
|
57
|
-
backgroundColor: statusColor
|
|
59
|
+
backgroundColor: withAlpha(statusColor, 0.2),
|
|
58
60
|
},
|
|
59
61
|
statusDot: {
|
|
60
62
|
width: 6,
|
|
@@ -96,14 +98,14 @@ export function CreationBadges({
|
|
|
96
98
|
{showStatus && (
|
|
97
99
|
<View style={styles.statusBadge}>
|
|
98
100
|
<View style={styles.statusDot} />
|
|
99
|
-
<
|
|
101
|
+
<AtomicText style={styles.statusText}>{displayStatusText}</AtomicText>
|
|
100
102
|
</View>
|
|
101
103
|
)}
|
|
102
104
|
|
|
103
105
|
{showType && type && (
|
|
104
106
|
<View style={styles.typeBadge}>
|
|
105
107
|
<AtomicIcon name={typeIcon} color="textInverse" size="xs" />
|
|
106
|
-
<
|
|
108
|
+
<AtomicText style={styles.typeText}>{displayTypeText}</AtomicText>
|
|
107
109
|
</View>
|
|
108
110
|
)}
|
|
109
111
|
</>
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React, { useMemo } from "react";
|
|
7
|
-
import { View, StyleSheet
|
|
8
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
7
|
+
import { View, StyleSheet } from "react-native";
|
|
8
|
+
import { useAppDesignTokens, AtomicText } from "@umituz/react-native-design-system";
|
|
9
9
|
|
|
10
10
|
interface CreationCardMetaProps {
|
|
11
11
|
readonly formattedDate: string;
|
|
@@ -38,11 +38,11 @@ export function CreationCardMeta({
|
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
40
|
<View style={styles.meta}>
|
|
41
|
-
<
|
|
41
|
+
<AtomicText style={styles.metaText}>{formattedDate}</AtomicText>
|
|
42
42
|
{provider && (
|
|
43
43
|
<>
|
|
44
|
-
<
|
|
45
|
-
<
|
|
44
|
+
<AtomicText style={[styles.metaText, styles.metaDot]}>•</AtomicText>
|
|
45
|
+
<AtomicText style={styles.metaText}>{provider}</AtomicText>
|
|
46
46
|
</>
|
|
47
47
|
)}
|
|
48
48
|
</View>
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { useState, useCallback } from "react";
|
|
7
7
|
import { Alert } from "react-native";
|
|
8
|
-
import
|
|
9
|
-
import { useMedia, MediaLibraryPermission } from "@umituz/react-native-design-system";
|
|
8
|
+
import { useMedia, MediaLibraryPermission, readFileAsBase64 } from "@umituz/react-native-design-system";
|
|
10
9
|
import type { UploadedImage } from "../../domain/types";
|
|
11
10
|
|
|
12
11
|
export interface UsePartnerStepConfig {
|
|
@@ -93,21 +92,16 @@ export const usePartnerStep = (options: UsePartnerStepOptions) => {
|
|
|
93
92
|
return;
|
|
94
93
|
}
|
|
95
94
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
encoding: "base64",
|
|
101
|
-
});
|
|
102
|
-
} catch {
|
|
103
|
-
// If base64 conversion fails, continue without it
|
|
104
|
-
base64 = undefined;
|
|
95
|
+
const base64 = await readFileAsBase64(asset.uri);
|
|
96
|
+
if (!base64) {
|
|
97
|
+
Alert.alert(translations.error, translations.uploadFailed);
|
|
98
|
+
return;
|
|
105
99
|
}
|
|
106
100
|
|
|
107
101
|
const uploadedImage: UploadedImage = {
|
|
108
102
|
uri: asset.uri,
|
|
109
103
|
previewUrl: asset.uri,
|
|
110
|
-
base64:
|
|
104
|
+
base64: `data:image/jpeg;base64,${base64}`,
|
|
111
105
|
width: asset.width,
|
|
112
106
|
height: asset.height,
|
|
113
107
|
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
|
-
import { View, TouchableOpacity,
|
|
7
|
+
import { View, TouchableOpacity, StyleSheet } from "react-native";
|
|
8
8
|
import {
|
|
9
9
|
AtomicText,
|
|
10
10
|
useAppDesignTokens,
|
|
@@ -56,7 +56,7 @@ export const StylePresetsGrid: React.FC<StylePresetsGridProps> = ({
|
|
|
56
56
|
disabled={disabled}
|
|
57
57
|
>
|
|
58
58
|
<View style={styles.cardHeader}>
|
|
59
|
-
<
|
|
59
|
+
<AtomicText style={styles.emoji}>{preset.emoji}</AtomicText>
|
|
60
60
|
{preset.duration !== undefined && (
|
|
61
61
|
<View
|
|
62
62
|
style={[
|