@umituz/react-native-ai-generation-content 1.83.95 → 1.83.97
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/README.md +0 -316
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.83.
|
|
3
|
+
"version": "1.83.97",
|
|
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",
|
package/README.md
DELETED
|
@@ -1,316 +0,0 @@
|
|
|
1
|
-
# @umituz/react-native-ai-generation-content
|
|
2
|
-
|
|
3
|
-
> Provider-agnostic AI generation orchestration for React Native
|
|
4
|
-
|
|
5
|
-
Comprehensive React Native library for AI-powered content generation. Support multiple providers with 25+ AI features including image generation, video creation, text-to-speech, face swap, and more.
|
|
6
|
-
|
|
7
|
-
## 🎯 Library Purpose
|
|
8
|
-
|
|
9
|
-
Provider-agnostic AI generation orchestration layer. Focus on business logic and user experience while handling multiple AI providers seamlessly. Clean architecture with domain-driven design for maintainable, scalable AI features.
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## 📋 Feature Overview
|
|
14
|
-
|
|
15
|
-
### Image Generation
|
|
16
|
-
- **Text to Image**: Generate images from descriptions
|
|
17
|
-
- **Image to Image**: Transform images with prompts
|
|
18
|
-
- **Style Transfer**: Apply artistic styles
|
|
19
|
-
- **Photo Restoration**: Restore old photos
|
|
20
|
-
- **Upscaling**: Increase resolution
|
|
21
|
-
- **HD Touch Up**: Enhance quality
|
|
22
|
-
|
|
23
|
-
### Face & Person Features
|
|
24
|
-
- **Face Swap**: Swap faces between images
|
|
25
|
-
- **Future Prediction**: Individual future scenarios
|
|
26
|
-
|
|
27
|
-
### Video & Animation
|
|
28
|
-
- **Text to Video**: Generate videos from text
|
|
29
|
-
- **Image to Video**: Convert images to video
|
|
30
|
-
|
|
31
|
-
### Background & Editing
|
|
32
|
-
- **Remove Background**: Remove image backgrounds
|
|
33
|
-
- **Replace Background**: Replace with new background
|
|
34
|
-
- **Inpainting**: Fill masked areas
|
|
35
|
-
- **Remove Object**: Remove unwanted objects
|
|
36
|
-
- **Colorization**: Add color to B&W photos
|
|
37
|
-
|
|
38
|
-
### Creative & Audio
|
|
39
|
-
- **Meme Generator**: Create memes with text
|
|
40
|
-
- **Sketch to Image**: Convert sketches to images
|
|
41
|
-
- **Anime Selfie**: Anime style conversion
|
|
42
|
-
- **Audio Generation**: Generate audio content
|
|
43
|
-
- **Text to Voice**: Text-to-speech synthesis
|
|
44
|
-
- **Script Generator**: Generate content scripts
|
|
45
|
-
|
|
46
|
-
### Analysis
|
|
47
|
-
- **Image Captioning**: Generate image descriptions
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## 📦 Installation
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
npm install @umituz/react-native-ai-generation-content
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## 🚀 Quick Start
|
|
58
|
-
|
|
59
|
-
### Configuration
|
|
60
|
-
|
|
61
|
-
```typescript
|
|
62
|
-
import { configureAppServices } from '@umituz/react-native-ai-generation-content';
|
|
63
|
-
|
|
64
|
-
configureAppServices({
|
|
65
|
-
networkService: {
|
|
66
|
-
baseUrl: 'https://your-api.com',
|
|
67
|
-
apiKey: 'your-api-key',
|
|
68
|
-
},
|
|
69
|
-
creditService: {
|
|
70
|
-
checkCredits: async (userId, cost) => true,
|
|
71
|
-
deductCredits: async (userId, cost) => {},
|
|
72
|
-
},
|
|
73
|
-
paywallService: {
|
|
74
|
-
showPaywall: async () => true,
|
|
75
|
-
},
|
|
76
|
-
});
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Basic Usage
|
|
80
|
-
|
|
81
|
-
```typescript
|
|
82
|
-
import { useTextToImageFeature } from '@umituz/react-native-ai-generation-content';
|
|
83
|
-
|
|
84
|
-
const feature = useTextToImageFeature({
|
|
85
|
-
config: {
|
|
86
|
-
model: 'imagen-3',
|
|
87
|
-
onProcessingComplete: (result) => {
|
|
88
|
-
console.log('Generated:', result.imageUrl);
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
userId: 'user-123',
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
// Use feature.state, feature.generate(), etc.
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
## ⚠️ Critical Rules
|
|
100
|
-
|
|
101
|
-
### MUST FOLLOW
|
|
102
|
-
|
|
103
|
-
1. **Configuration**
|
|
104
|
-
- MUST configure app services before using features
|
|
105
|
-
- MUST provide valid userId for tracking
|
|
106
|
-
- MUST implement credit checking
|
|
107
|
-
- MUST handle errors properly
|
|
108
|
-
|
|
109
|
-
2. **State Management**
|
|
110
|
-
- MUST check isReady before enabling actions
|
|
111
|
-
- MUST handle isProcessing state
|
|
112
|
-
- MUST display progress to users
|
|
113
|
-
- MUST implement error handling
|
|
114
|
-
|
|
115
|
-
3. **Performance**
|
|
116
|
-
- MUST implement debouncing (300ms)
|
|
117
|
-
- MUST cache results locally
|
|
118
|
-
- MUST handle large files properly
|
|
119
|
-
- MUST NOT block main thread
|
|
120
|
-
|
|
121
|
-
4. **Privacy & Ethics**
|
|
122
|
-
- MUST obtain consent for person-based features
|
|
123
|
-
- MUST implement content moderation
|
|
124
|
-
- MUST comply with regulations
|
|
125
|
-
- MUST provide clear usage terms
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
## 🚫 Prohibitions
|
|
130
|
-
|
|
131
|
-
### MUST AVOID
|
|
132
|
-
|
|
133
|
-
❌ **NEVER**:
|
|
134
|
-
- Skip configuration
|
|
135
|
-
- Use without userId
|
|
136
|
-
- Ignore error handling
|
|
137
|
-
- Process without user action
|
|
138
|
-
- Violate privacy/consent
|
|
139
|
-
- Block main thread
|
|
140
|
-
- Hardcode API keys
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## 🤖 AI Agent Directions
|
|
145
|
-
|
|
146
|
-
When implementing with AI code generation:
|
|
147
|
-
|
|
148
|
-
```
|
|
149
|
-
REQUIREMENTS:
|
|
150
|
-
1. Import from @umituz/react-native-ai-generation-content
|
|
151
|
-
2. Configure app services first
|
|
152
|
-
3. Use feature-specific hooks
|
|
153
|
-
4. Implement proper state management
|
|
154
|
-
5. Handle errors gracefully
|
|
155
|
-
6. Show progress to users
|
|
156
|
-
7. Implement cleanup on unmount
|
|
157
|
-
|
|
158
|
-
CRITICAL RULES:
|
|
159
|
-
- MUST configure before using features
|
|
160
|
-
- MUST provide valid userId
|
|
161
|
-
- MUST check isReady before actions
|
|
162
|
-
- MUST handle isProcessing state
|
|
163
|
-
- MUST implement error handling
|
|
164
|
-
- MUST respect user privacy
|
|
165
|
-
|
|
166
|
-
FEATURE HOOKS:
|
|
167
|
-
- useTextToImageFeature: Image generation
|
|
168
|
-
- useFaceSwapFeature: Face swapping
|
|
169
|
-
- useTextToVoiceFeature: Text-to-speech
|
|
170
|
-
- And 20+ more features
|
|
171
|
-
|
|
172
|
-
STRICTLY FORBIDDEN:
|
|
173
|
-
- No skipping configuration
|
|
174
|
-
- No missing userId
|
|
175
|
-
- No ignoring errors
|
|
176
|
-
- No auto-processing
|
|
177
|
-
- No privacy violations
|
|
178
|
-
- No blocked UI
|
|
179
|
-
- No hardcoded credentials
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
---
|
|
183
|
-
|
|
184
|
-
## 📚 Documentation Structure
|
|
185
|
-
|
|
186
|
-
```
|
|
187
|
-
@umituz/react-native-ai-generation-content/
|
|
188
|
-
├── src/
|
|
189
|
-
│ ├── features/ # 23 AI features (each with README)
|
|
190
|
-
│ │ ├── text-to-image/
|
|
191
|
-
│ │ ├── face-swap/
|
|
192
|
-
│ │ └── ...
|
|
193
|
-
│ ├── domains/ # Shared domains
|
|
194
|
-
│ │ ├── content-moderation/
|
|
195
|
-
│ │ ├── prompts/
|
|
196
|
-
│ │ ├── creations/
|
|
197
|
-
│ │ └── face-detection/
|
|
198
|
-
│ └── features/shared/ # Shared functionality
|
|
199
|
-
├── docs/ # Additional documentation
|
|
200
|
-
├── ARCHITECTURE.md # Architecture details
|
|
201
|
-
├── FAQ.md # Common questions
|
|
202
|
-
└── MIGRATION_GUIDE.md # Migration guide
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
### Feature Documentation
|
|
206
|
-
|
|
207
|
-
Each feature has comprehensive documentation:
|
|
208
|
-
- **Import paths** (only code in README)
|
|
209
|
-
- **Usage strategy** (when to use/not use)
|
|
210
|
-
- **Critical rules** (MUST follow)
|
|
211
|
-
- **Prohibitions** (MUST avoid)
|
|
212
|
-
- **AI agent directions** (prompt templates)
|
|
213
|
-
- **Configuration strategy**
|
|
214
|
-
- **State management**
|
|
215
|
-
- **Best practices**
|
|
216
|
-
- **Common pitfalls**
|
|
217
|
-
|
|
218
|
-
**Example**: See `src/features/text-to-image/README.md`
|
|
219
|
-
|
|
220
|
-
---
|
|
221
|
-
|
|
222
|
-
## 🎨 Architecture
|
|
223
|
-
|
|
224
|
-
### Clean Architecture
|
|
225
|
-
|
|
226
|
-
```
|
|
227
|
-
┌─────────────────────────────┐
|
|
228
|
-
│ Presentation Layer │
|
|
229
|
-
│ (Components, Hooks) │
|
|
230
|
-
└─────────────────────────────┘
|
|
231
|
-
↓
|
|
232
|
-
┌─────────────────────────────┐
|
|
233
|
-
│ Domain Layer │
|
|
234
|
-
│ (Types, Interfaces) │
|
|
235
|
-
└─────────────────────────────┘
|
|
236
|
-
↓
|
|
237
|
-
┌─────────────────────────────┐
|
|
238
|
-
│ Infrastructure Layer │
|
|
239
|
-
│ (Services, Repositories) │
|
|
240
|
-
└─────────────────────────────┘
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
### Key Principles
|
|
244
|
-
|
|
245
|
-
- **Separation of Concerns**: Each layer has specific responsibility
|
|
246
|
-
- **Dependency Inversion**: Depend on abstractions, not implementations
|
|
247
|
-
- **Provider Agnostic**: Support multiple AI providers
|
|
248
|
-
- **Type Safety**: Comprehensive TypeScript types
|
|
249
|
-
- **Testability**: Clean, testable code
|
|
250
|
-
|
|
251
|
-
---
|
|
252
|
-
|
|
253
|
-
## 🔐 Security & Privacy
|
|
254
|
-
|
|
255
|
-
### API Keys
|
|
256
|
-
- Never store in code
|
|
257
|
-
- Use environment variables
|
|
258
|
-
- Implement rotation
|
|
259
|
-
|
|
260
|
-
### Content Moderation
|
|
261
|
-
- Enable for user-generated content
|
|
262
|
-
- Configure rules appropriately
|
|
263
|
-
- Monitor for violations
|
|
264
|
-
|
|
265
|
-
### User Data
|
|
266
|
-
- Anonymize analytics
|
|
267
|
-
- Secure storage
|
|
268
|
-
- GDPR/CCPA compliance
|
|
269
|
-
|
|
270
|
-
---
|
|
271
|
-
|
|
272
|
-
## 📈 Performance
|
|
273
|
-
|
|
274
|
-
### Optimization
|
|
275
|
-
- Lazy load features
|
|
276
|
-
- Cache results
|
|
277
|
-
- Optimize images
|
|
278
|
-
- Background processing
|
|
279
|
-
|
|
280
|
-
### Best Practices
|
|
281
|
-
- Implement debouncing
|
|
282
|
-
- Use pagination
|
|
283
|
-
- Compress uploads
|
|
284
|
-
- Monitor performance
|
|
285
|
-
|
|
286
|
-
---
|
|
287
|
-
|
|
288
|
-
## 🤝 Contributing
|
|
289
|
-
|
|
290
|
-
Contributions welcome! Please:
|
|
291
|
-
- Follow code style
|
|
292
|
-
- Add tests
|
|
293
|
-
- Update docs
|
|
294
|
-
- Submit PR
|
|
295
|
-
|
|
296
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
297
|
-
|
|
298
|
-
---
|
|
299
|
-
|
|
300
|
-
## 📄 License
|
|
301
|
-
|
|
302
|
-
MIT
|
|
303
|
-
|
|
304
|
-
---
|
|
305
|
-
|
|
306
|
-
## 📞 Support
|
|
307
|
-
|
|
308
|
-
- **Issues**: GitHub Issues
|
|
309
|
-
- **Docs**: `/docs` folder
|
|
310
|
-
- **FAQ**: [FAQ.md](FAQ.md)
|
|
311
|
-
- **Migration**: [MIGRATION_GUIDE.md](MIGRATION_GUIDE.md)
|
|
312
|
-
|
|
313
|
-
---
|
|
314
|
-
|
|
315
|
-
**Version**: 2.0.0 (Strategy-based Documentation)
|
|
316
|
-
**Last Updated**: 2025-01-08
|