@umituz/react-native-ai-generation-content 1.89.31 → 1.89.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/generation/index.ts +0 -4
- package/src/domains/generation/infrastructure/appearance-analysis.ts +1 -1
- package/src/domains/generation/infrastructure/couple-generation-builder.ts +4 -3
- package/src/domains/prompts/index.ts +0 -7
- package/src/infrastructure/utils/couple-input.util.ts +1 -1
- package/src/domains/prompts/domain/base/couple-utils.ts +0 -68
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.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",
|
|
@@ -20,7 +20,6 @@ export type {
|
|
|
20
20
|
export type {
|
|
21
21
|
GenerationExecutor,
|
|
22
22
|
GenerationOptions,
|
|
23
|
-
ImageGenerationInput,
|
|
24
23
|
ImageGenerationOutput,
|
|
25
24
|
VideoGenerationInput,
|
|
26
25
|
VideoGenerationOutput,
|
|
@@ -54,16 +53,13 @@ export type {
|
|
|
54
53
|
AuthGateStepConfig,
|
|
55
54
|
CreditGateStepConfig,
|
|
56
55
|
PhotoUploadStepConfig,
|
|
57
|
-
TextInputStepConfig,
|
|
58
56
|
SelectionStepConfig,
|
|
59
|
-
PreviewStepConfig,
|
|
60
57
|
WizardStepConfig,
|
|
61
58
|
WizardFeatureConfig,
|
|
62
59
|
ScenarioBasedConfig,
|
|
63
60
|
UsePhotoUploadStateProps,
|
|
64
61
|
UsePhotoUploadStateReturn,
|
|
65
62
|
PhotoUploadConfig,
|
|
66
|
-
PhotoUploadTranslations,
|
|
67
63
|
UseWizardGenerationProps,
|
|
68
64
|
UseWizardGenerationReturn,
|
|
69
65
|
WizardScenarioData,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Vision analysis暂时禁用 - 返回空上下文。
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { refinePromptForCouple } from "
|
|
8
|
+
import { refinePromptForCouple } from "../../../infrastructure/utils/couple-input.util";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Fotoğrafları analiz eder ve appearance context string'i döndürür.
|
|
@@ -17,8 +17,9 @@ import {
|
|
|
17
17
|
resolveCoupleInput,
|
|
18
18
|
prependContext,
|
|
19
19
|
refinePromptForCouple,
|
|
20
|
-
|
|
21
|
-
} from "
|
|
20
|
+
} from "../../../infrastructure/utils/couple-input.util";
|
|
21
|
+
import type { GenerationTargetLike } from "../../../infrastructure/utils/couple-input.util";
|
|
22
|
+
import { createPhotorealisticPrompt } from "../../prompts";
|
|
22
23
|
import { getAppearanceContext } from "./appearance-analysis";
|
|
23
24
|
|
|
24
25
|
/**
|
|
@@ -41,7 +42,7 @@ export interface CoupleGenerationInputParams {
|
|
|
41
42
|
* Couple generation result
|
|
42
43
|
*/
|
|
43
44
|
export interface CoupleGenerationInput {
|
|
44
|
-
target:
|
|
45
|
+
target: GenerationTargetLike;
|
|
45
46
|
prompt: string;
|
|
46
47
|
params: Record<string, unknown>;
|
|
47
48
|
}
|
|
@@ -22,10 +22,3 @@ export {
|
|
|
22
22
|
|
|
23
23
|
export type { CreatePromptOptions } from './domain/base/types';
|
|
24
24
|
|
|
25
|
-
// Couple Utilities
|
|
26
|
-
export {
|
|
27
|
-
refinePromptForCouple,
|
|
28
|
-
prependContext,
|
|
29
|
-
resolveCoupleInput,
|
|
30
|
-
type ResolveCoupleInputResult,
|
|
31
|
-
} from './domain/base/couple-utils';
|
|
@@ -1,68 +0,0 @@
|
|
|
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
|
-
}
|