@umituz/react-native-ai-generation-content 1.26.65 → 1.26.66
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.26.
|
|
3
|
+
"version": "1.26.66",
|
|
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",
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Face Preservation Prompt Builder
|
|
3
3
|
* Dynamic prompt builder for AI image generation with strict face identity preservation
|
|
4
|
-
* Supports any number of people (1, 2, 3, N)
|
|
4
|
+
* Supports any number of people (1, 2, 3, N) and interaction styles
|
|
5
5
|
*
|
|
6
6
|
* Based on best practices:
|
|
7
7
|
* - Face identity lock techniques
|
|
8
8
|
* - @imageN reference anchors
|
|
9
|
+
* - Interaction style rules (romantic, friendly, etc.)
|
|
9
10
|
* - Explicit preservation and negative constraints
|
|
10
11
|
*/
|
|
11
12
|
|
|
@@ -13,11 +14,16 @@
|
|
|
13
14
|
// Types
|
|
14
15
|
// =============================================================================
|
|
15
16
|
|
|
17
|
+
/** Interaction style between people in the image */
|
|
18
|
+
export type InteractionStyle = "romantic" | "friendly" | "professional" | "neutral";
|
|
19
|
+
|
|
16
20
|
export interface FacePreservationOptions {
|
|
17
21
|
/** The scenario/scene description */
|
|
18
22
|
scenarioPrompt: string;
|
|
19
23
|
/** Number of people in the generation */
|
|
20
24
|
personCount: number;
|
|
25
|
+
/** Interaction style between people (default: neutral) */
|
|
26
|
+
interactionStyle?: InteractionStyle;
|
|
21
27
|
/** Optional custom preservation rules from main app */
|
|
22
28
|
customRules?: string[];
|
|
23
29
|
/** Optional custom forbidden actions from main app */
|
|
@@ -43,6 +49,48 @@ const FORBIDDEN_ACTIONS = [
|
|
|
43
49
|
"Do NOT change eye color or shape",
|
|
44
50
|
] as const;
|
|
45
51
|
|
|
52
|
+
/** Interaction style rules - what TO DO for each style */
|
|
53
|
+
const INTERACTION_RULES: Record<InteractionStyle, readonly string[]> = {
|
|
54
|
+
romantic: [
|
|
55
|
+
"Close physical proximity - touching, holding hands, arms around each other",
|
|
56
|
+
"Warm, genuine, loving smiles showing happiness",
|
|
57
|
+
"Affectionate eye contact or looking at camera together happily",
|
|
58
|
+
"Natural romantic body language - leaning into each other",
|
|
59
|
+
"Intimate connection visible between the two people",
|
|
60
|
+
],
|
|
61
|
+
friendly: [
|
|
62
|
+
"Casual comfortable proximity",
|
|
63
|
+
"Genuine friendly smiles",
|
|
64
|
+
"Relaxed natural poses",
|
|
65
|
+
"Warm friendly body language",
|
|
66
|
+
],
|
|
67
|
+
professional: [
|
|
68
|
+
"Appropriate professional distance",
|
|
69
|
+
"Confident pleasant expressions",
|
|
70
|
+
"Professional posture and positioning",
|
|
71
|
+
],
|
|
72
|
+
neutral: [],
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** Interaction style forbidden - what NOT to do for each style */
|
|
76
|
+
const INTERACTION_FORBIDDEN: Record<InteractionStyle, readonly string[]> = {
|
|
77
|
+
romantic: [
|
|
78
|
+
"Do NOT position people far apart or distant from each other",
|
|
79
|
+
"Do NOT use cold, serious, stern, or angry expressions",
|
|
80
|
+
"Do NOT create stiff, awkward, or unnatural poses",
|
|
81
|
+
"Do NOT have people looking away from each other coldly",
|
|
82
|
+
"Do NOT show disconnection or emotional distance between people",
|
|
83
|
+
],
|
|
84
|
+
friendly: [
|
|
85
|
+
"Do NOT use cold or unfriendly expressions",
|
|
86
|
+
"Do NOT create awkward distancing",
|
|
87
|
+
],
|
|
88
|
+
professional: [
|
|
89
|
+
"Do NOT use overly casual or intimate positioning",
|
|
90
|
+
],
|
|
91
|
+
neutral: [],
|
|
92
|
+
};
|
|
93
|
+
|
|
46
94
|
// =============================================================================
|
|
47
95
|
// Builder Functions
|
|
48
96
|
// =============================================================================
|