@umituz/react-native-ai-generation-content 1.26.31 → 1.26.33
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/prompts/index.ts +0 -8
- package/src/index.ts +1 -1
- package/src/infrastructure/utils/index.ts +0 -1
- package/src/domains/prompts/domain/entities/sample-prompts.ts +0 -32
- package/src/domains/prompts/presentation/theme/theme.ts +0 -16
- package/src/domains/prompts/presentation/theme/types.ts +0 -82
- package/src/domains/prompts/presentation/theme/utils.ts +0 -24
- package/src/infrastructure/utils/language.util.ts +0 -55
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.33",
|
|
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",
|
|
@@ -54,11 +54,6 @@ export { TextGenerationService } from './infrastructure/services/TextGenerationS
|
|
|
54
54
|
export { ColorizationService } from './infrastructure/services/ColorizationService';
|
|
55
55
|
export { FuturePredictionService } from './infrastructure/services/FuturePredictionService';
|
|
56
56
|
|
|
57
|
-
export type { ThemeColors, ThemeSpacing, ThemeTypography, Theme } from './presentation/theme/types';
|
|
58
|
-
export { createTheme, defaultTheme } from './presentation/theme/types';
|
|
59
|
-
export { useTheme, setTheme, getTheme, resetTheme } from './presentation/theme/theme';
|
|
60
|
-
export { createStyleSheet, spacing, color, typography } from './presentation/theme/utils';
|
|
61
|
-
|
|
62
57
|
export type { AsyncState, AsyncActions } from './presentation/hooks/useAsyncState';
|
|
63
58
|
export { useAsyncState } from './presentation/hooks/useAsyncState';
|
|
64
59
|
|
|
@@ -89,9 +84,6 @@ export type { IdentitySegment, AnimeStyleSegment, QualitySegment } from './domai
|
|
|
89
84
|
export { ImagePromptBuilder, createAnimeSelfiePrompt, createStyleTransferPrompt } from './infrastructure/services/ImagePromptBuilder';
|
|
90
85
|
export type { ImagePromptResult, ImagePromptBuilderOptions, AnimeSelfiePromptResult } from './infrastructure/services/ImagePromptBuilder';
|
|
91
86
|
|
|
92
|
-
export { DEFAULT_TEXT_TO_IMAGE_PROMPTS, DEFAULT_TEXT_TO_VOICE_PROMPTS } from './domain/entities/sample-prompts';
|
|
93
|
-
export type { PromptSuggestion } from './domain/entities/sample-prompts';
|
|
94
|
-
|
|
95
87
|
export {
|
|
96
88
|
IDENTITY_PRESERVATION_CORE,
|
|
97
89
|
PHOTOREALISTIC_RENDERING,
|
package/src/index.ts
CHANGED
|
@@ -56,7 +56,7 @@ export {
|
|
|
56
56
|
isValidBase64, getBase64Size, getBase64SizeMB, prepareImage, createDevCallbacks, createFeatureUtils,
|
|
57
57
|
showVideoGenerationSuccess, handleGenerationError, showContentModerationWarning,
|
|
58
58
|
saveMediaToGallery, shareMedia, createSaveHandler, createShareHandler, createMediaHandlers,
|
|
59
|
-
mapJobStatusToGenerationStatus,
|
|
59
|
+
mapJobStatusToGenerationStatus,
|
|
60
60
|
} from "./infrastructure/utils";
|
|
61
61
|
|
|
62
62
|
export { distinctBy } from "./utils/arrayUtils";
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Example Prompts Constants
|
|
3
|
-
* @description Default prompt suggestions for AI generation features
|
|
4
|
-
* @note NEVER use emojis in prompts - Imagen API only supports English text
|
|
5
|
-
* @note Use translationKey for localization - apps should translate these
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export interface PromptSuggestion {
|
|
9
|
-
id: string;
|
|
10
|
-
translationKey: string;
|
|
11
|
-
fallbackText: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const DEFAULT_TEXT_TO_IMAGE_PROMPTS: readonly PromptSuggestion[] = [
|
|
15
|
-
{ id: "sunset", translationKey: "prompts.image.sunset", fallbackText: "A beautiful sunset over mountains with vibrant colors" },
|
|
16
|
-
{ id: "cityscape", translationKey: "prompts.image.cityscape", fallbackText: "Futuristic cityscape at night with neon lights" },
|
|
17
|
-
{ id: "forest", translationKey: "prompts.image.forest", fallbackText: "Enchanted forest with magical glowing mushrooms" },
|
|
18
|
-
{ id: "coffee", translationKey: "prompts.image.coffee", fallbackText: "Cozy coffee shop interior on a rainy day" },
|
|
19
|
-
{ id: "spaceship", translationKey: "prompts.image.spaceship", fallbackText: "Spaceship traveling through colorful nebula" },
|
|
20
|
-
{ id: "dragon", translationKey: "prompts.image.dragon", fallbackText: "Dragon flying over snow-capped mountain peaks" },
|
|
21
|
-
{ id: "underwater", translationKey: "prompts.image.underwater", fallbackText: "Underwater coral reef with tropical fish" },
|
|
22
|
-
{ id: "castle", translationKey: "prompts.image.castle", fallbackText: "Medieval castle on a cliff during golden hour" },
|
|
23
|
-
] as const;
|
|
24
|
-
|
|
25
|
-
export const DEFAULT_TEXT_TO_VOICE_PROMPTS: readonly PromptSuggestion[] = [
|
|
26
|
-
{ id: "welcome", translationKey: "prompts.voice.welcome", fallbackText: "Welcome to our amazing product! We're excited to have you here." },
|
|
27
|
-
{ id: "story", translationKey: "prompts.voice.story", fallbackText: "Once upon a time, in a land far away, there lived a wise old wizard." },
|
|
28
|
-
{ id: "news", translationKey: "prompts.voice.news", fallbackText: "Breaking news: Scientists have made a groundbreaking discovery." },
|
|
29
|
-
{ id: "narration", translationKey: "prompts.voice.narration", fallbackText: "The sun was setting over the horizon, painting the sky in orange and pink." },
|
|
30
|
-
{ id: "commercial", translationKey: "prompts.voice.commercial", fallbackText: "Transform your business with our innovative solutions." },
|
|
31
|
-
{ id: "podcast", translationKey: "prompts.voice.podcast", fallbackText: "In today's episode, we'll explore the world of artificial intelligence." },
|
|
32
|
-
] as const;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Theme } from './types';
|
|
2
|
-
import { defaultTheme } from './types';
|
|
3
|
-
|
|
4
|
-
let currentTheme = defaultTheme;
|
|
5
|
-
|
|
6
|
-
export const useTheme = (): Theme => currentTheme;
|
|
7
|
-
|
|
8
|
-
export const setTheme = (theme: Partial<Theme>): void => {
|
|
9
|
-
currentTheme = { ...currentTheme, ...theme };
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const getTheme = (): Theme => currentTheme;
|
|
13
|
-
|
|
14
|
-
export const resetTheme = (): void => {
|
|
15
|
-
currentTheme = defaultTheme;
|
|
16
|
-
};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
export interface ThemeColors {
|
|
2
|
-
primary: string;
|
|
3
|
-
secondary: string;
|
|
4
|
-
background: string;
|
|
5
|
-
surface: string;
|
|
6
|
-
text: string;
|
|
7
|
-
textSecondary: string;
|
|
8
|
-
border: string;
|
|
9
|
-
error: string;
|
|
10
|
-
warning: string;
|
|
11
|
-
success: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface ThemeSpacing {
|
|
15
|
-
xs: number;
|
|
16
|
-
sm: number;
|
|
17
|
-
md: number;
|
|
18
|
-
lg: number;
|
|
19
|
-
xl: number;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface ThemeTypography {
|
|
23
|
-
heading: {
|
|
24
|
-
fontSize: number;
|
|
25
|
-
fontWeight: string;
|
|
26
|
-
};
|
|
27
|
-
body: {
|
|
28
|
-
fontSize: number;
|
|
29
|
-
fontWeight: string;
|
|
30
|
-
};
|
|
31
|
-
caption: {
|
|
32
|
-
fontSize: number;
|
|
33
|
-
fontWeight: string;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface Theme {
|
|
38
|
-
colors: ThemeColors;
|
|
39
|
-
spacing: ThemeSpacing;
|
|
40
|
-
typography: ThemeTypography;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export const createTheme = (customTheme?: Partial<Theme>): Theme => ({
|
|
44
|
-
colors: {
|
|
45
|
-
primary: '#007AFF',
|
|
46
|
-
secondary: '#5856D6',
|
|
47
|
-
background: '#FFFFFF',
|
|
48
|
-
surface: '#F2F2F7',
|
|
49
|
-
text: '#000000',
|
|
50
|
-
textSecondary: '#8E8E93',
|
|
51
|
-
border: '#C6C6C8',
|
|
52
|
-
error: '#FF3B30',
|
|
53
|
-
warning: '#FF9500',
|
|
54
|
-
success: '#34C759',
|
|
55
|
-
...customTheme?.colors,
|
|
56
|
-
},
|
|
57
|
-
spacing: {
|
|
58
|
-
xs: 4,
|
|
59
|
-
sm: 8,
|
|
60
|
-
md: 16,
|
|
61
|
-
lg: 24,
|
|
62
|
-
xl: 32,
|
|
63
|
-
...customTheme?.spacing,
|
|
64
|
-
},
|
|
65
|
-
typography: {
|
|
66
|
-
heading: {
|
|
67
|
-
fontSize: 24,
|
|
68
|
-
fontWeight: 'bold',
|
|
69
|
-
},
|
|
70
|
-
body: {
|
|
71
|
-
fontSize: 16,
|
|
72
|
-
fontWeight: 'normal',
|
|
73
|
-
},
|
|
74
|
-
caption: {
|
|
75
|
-
fontSize: 12,
|
|
76
|
-
fontWeight: 'normal',
|
|
77
|
-
},
|
|
78
|
-
...customTheme?.typography,
|
|
79
|
-
},
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
export const defaultTheme = createTheme();
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { Theme } from './types';
|
|
2
|
-
import { useTheme } from './theme';
|
|
3
|
-
|
|
4
|
-
export const createStyleSheet = <T extends Record<string, unknown>>(
|
|
5
|
-
styles: (theme: Theme) => T
|
|
6
|
-
): T => {
|
|
7
|
-
const theme = useTheme();
|
|
8
|
-
return styles(theme);
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const spacing = (key: keyof Theme['spacing'], customTheme?: Theme): number => {
|
|
12
|
-
const theme = customTheme || useTheme();
|
|
13
|
-
return theme.spacing[key];
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const color = (key: keyof Theme['colors'], customTheme?: Theme): string => {
|
|
17
|
-
const theme = customTheme || useTheme();
|
|
18
|
-
return theme.colors[key];
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const typography = (key: keyof Theme['typography'], customTheme?: Theme) => {
|
|
22
|
-
const theme = customTheme || useTheme();
|
|
23
|
-
return theme.typography[key];
|
|
24
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Language Utilities
|
|
3
|
-
* Enhances prompts with language instructions for multi-language support
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
const LANGUAGE_NAMES: Record<string, string> = {
|
|
7
|
-
tr: "Turkish",
|
|
8
|
-
es: "Spanish",
|
|
9
|
-
fr: "French",
|
|
10
|
-
de: "German",
|
|
11
|
-
it: "Italian",
|
|
12
|
-
pt: "Portuguese",
|
|
13
|
-
ru: "Russian",
|
|
14
|
-
ja: "Japanese",
|
|
15
|
-
ko: "Korean",
|
|
16
|
-
zh: "Chinese",
|
|
17
|
-
ar: "Arabic",
|
|
18
|
-
hi: "Hindi",
|
|
19
|
-
th: "Thai",
|
|
20
|
-
vi: "Vietnamese",
|
|
21
|
-
pl: "Polish",
|
|
22
|
-
nl: "Dutch",
|
|
23
|
-
sv: "Swedish",
|
|
24
|
-
no: "Norwegian",
|
|
25
|
-
da: "Danish",
|
|
26
|
-
fi: "Finnish",
|
|
27
|
-
ro: "Romanian",
|
|
28
|
-
bg: "Bulgarian",
|
|
29
|
-
uk: "Ukrainian",
|
|
30
|
-
cs: "Czech",
|
|
31
|
-
hu: "Hungarian",
|
|
32
|
-
id: "Indonesian",
|
|
33
|
-
ms: "Malay",
|
|
34
|
-
tl: "Filipino",
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export function enhancePromptWithLanguage(
|
|
38
|
-
prompt: string,
|
|
39
|
-
languageCode?: string,
|
|
40
|
-
): string {
|
|
41
|
-
if (!languageCode || languageCode === "en") {
|
|
42
|
-
return prompt;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const languageName = LANGUAGE_NAMES[languageCode] || "the user's language";
|
|
46
|
-
return `${prompt}\n\nPlease respond in ${languageName} language.`;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export function getSupportedLanguages(): string[] {
|
|
50
|
-
return Object.keys(LANGUAGE_NAMES);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export function getLanguageName(code: string): string | undefined {
|
|
54
|
-
return LANGUAGE_NAMES[code];
|
|
55
|
-
}
|