@umituz/react-native-ai-generation-content 1.89.28 → 1.89.30
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.89.
|
|
3
|
+
"version": "1.89.30",
|
|
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",
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Couple Prompt Utilities
|
|
3
|
+
*
|
|
4
|
+
* Çift prompt oluşturma utility'leri.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { CreatePromptOptions } from "./types";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Refine prompt for couple mode
|
|
11
|
+
*
|
|
12
|
+
* Çift modu için prompt'u iyileştirir.
|
|
13
|
+
*/
|
|
14
|
+
export function refinePromptForCouple(
|
|
15
|
+
prompt: string,
|
|
16
|
+
isCouple: boolean,
|
|
17
|
+
): string {
|
|
18
|
+
if (!isCouple) return prompt;
|
|
19
|
+
|
|
20
|
+
// Add couple-specific enhancements
|
|
21
|
+
const couplePrefix =
|
|
22
|
+
"COUPLE ENHANCEMENT: Both individuals should be clearly visible and harmoniously positioned in the frame. Preserve each person's unique appearance while creating a unified couple composition.";
|
|
23
|
+
|
|
24
|
+
return `${couplePrefix}\n\n${prompt}`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Prepend context to prompt
|
|
29
|
+
*
|
|
30
|
+
* Context bilgilerini prompt'un başına ekler.
|
|
31
|
+
*/
|
|
32
|
+
export function prependContext(
|
|
33
|
+
prompt: string,
|
|
34
|
+
context: string,
|
|
35
|
+
): string {
|
|
36
|
+
if (!context) return prompt;
|
|
37
|
+
return `${context}\n\n${prompt}`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Resolve couple input parameters
|
|
42
|
+
*
|
|
43
|
+
* Çift modu için doğru input parametrelerini belirler.
|
|
44
|
+
*/
|
|
45
|
+
export interface ResolveCoupleInputResult {
|
|
46
|
+
target: string;
|
|
47
|
+
imageUrls: string[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function resolveCoupleInput(
|
|
51
|
+
partner1PhotoUri: string,
|
|
52
|
+
partner2PhotoUri: string | null,
|
|
53
|
+
isCoupleMode: boolean,
|
|
54
|
+
singleTarget: string,
|
|
55
|
+
coupleTarget: string,
|
|
56
|
+
): ResolveCoupleInputResult {
|
|
57
|
+
const imageUrls =
|
|
58
|
+
isCoupleMode && partner2PhotoUri
|
|
59
|
+
? [partner1PhotoUri, partner2PhotoUri]
|
|
60
|
+
: [partner1PhotoUri];
|
|
61
|
+
|
|
62
|
+
const target = isCoupleMode && partner2PhotoUri ? coupleTarget : singleTarget;
|
|
63
|
+
|
|
64
|
+
return {
|
|
65
|
+
target,
|
|
66
|
+
imageUrls,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
@@ -21,3 +21,11 @@ export {
|
|
|
21
21
|
} from './domain/base/creators';
|
|
22
22
|
|
|
23
23
|
export type { CreatePromptOptions } from './domain/base/types';
|
|
24
|
+
|
|
25
|
+
// Couple Utilities
|
|
26
|
+
export {
|
|
27
|
+
refinePromptForCouple,
|
|
28
|
+
prependContext,
|
|
29
|
+
resolveCoupleInput,
|
|
30
|
+
type ResolveCoupleInputResult,
|
|
31
|
+
} from './domain/base/couple-utils';
|