@umituz/react-native-ai-generation-content 1.59.4 → 1.61.0

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,11 +1,12 @@
1
1
  {
2
2
  "name": "@umituz/react-native-ai-generation-content",
3
- "version": "1.59.4",
3
+ "version": "1.61.0",
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",
7
7
  "exports": {
8
8
  ".": "./src/index.ts",
9
+ "./core": "./src/core/index.ts",
9
10
  "./prompts": "./src/domains/prompts/index.ts",
10
11
  "./content-moderation": "./src/domains/content-moderation/index.ts",
11
12
  "./creations": "./src/domains/creations/index.ts",
@@ -19,7 +20,9 @@
19
20
  "scripts": {
20
21
  "typecheck": "tsc --noEmit --skipLibCheck",
21
22
  "lint": "eslint src --max-warnings 0",
22
- "lint:fix": "eslint src --fix"
23
+ "lint:fix": "eslint src --fix",
24
+ "content-check": "node scripts/content-check.js",
25
+ "prepublishOnly": "npm run content-check"
23
26
  },
24
27
  "keywords": [
25
28
  "react-native",
@@ -0,0 +1,61 @@
1
+ /**
2
+ * @umituz/react-native-ai-generation-content/core
3
+ *
4
+ * Core types for AI generation providers.
5
+ * This module contains ONLY types and utilities - no implementation details.
6
+ *
7
+ * Use this subpath for provider implementations:
8
+ * ```typescript
9
+ * import type { IAIProvider, AIProviderConfig } from "@umituz/react-native-ai-generation-content/core";
10
+ * ```
11
+ *
12
+ * @module @umituz/react-native-ai-generation-content/core
13
+ */
14
+
15
+ // Result Pattern
16
+ export type { Result, Success, Failure } from "./types/result.types";
17
+ export {
18
+ success,
19
+ failure,
20
+ isSuccess,
21
+ isFailure,
22
+ mapResult,
23
+ andThen,
24
+ unwrap,
25
+ unwrapOr,
26
+ } from "./types/result.types";
27
+
28
+ // Error Types
29
+ export { AIErrorType } from "./types/error.types";
30
+ export type { AIErrorInfo, AIErrorMessages } from "./types/error.types";
31
+
32
+ // Provider Types
33
+ export type {
34
+ // Feature Types
35
+ ImageFeatureType,
36
+ VideoFeatureType,
37
+ // Config
38
+ AIProviderConfig,
39
+ // Status
40
+ AIJobStatusType,
41
+ AILogEntry,
42
+ JobSubmission,
43
+ JobStatus,
44
+ // Progress
45
+ ProviderProgressInfo,
46
+ SubscribeOptions,
47
+ RunOptions,
48
+ // Capabilities
49
+ ProviderCapabilities,
50
+ // Input Data
51
+ ImageFeatureInputData,
52
+ VideoFeatureInputData,
53
+ // Provider Interfaces
54
+ IAIProviderLifecycle,
55
+ IAIProviderCapabilities,
56
+ IAIProviderJobManager,
57
+ IAIProviderExecutor,
58
+ IAIProviderImageFeatures,
59
+ IAIProviderVideoFeatures,
60
+ IAIProvider,
61
+ } from "./types/provider.types";
@@ -0,0 +1,36 @@
1
+ /**
2
+ * AI Generation Error Types
3
+ * Provider-agnostic error classification
4
+ *
5
+ * @module @umituz/react-native-ai-generation-content/core
6
+ */
7
+
8
+ export enum AIErrorType {
9
+ NETWORK = "NETWORK",
10
+ RATE_LIMIT = "RATE_LIMIT",
11
+ AUTHENTICATION = "AUTHENTICATION",
12
+ VALIDATION = "VALIDATION",
13
+ CONTENT_POLICY = "CONTENT_POLICY",
14
+ SERVER = "SERVER",
15
+ TIMEOUT = "TIMEOUT",
16
+ UNKNOWN = "UNKNOWN",
17
+ }
18
+
19
+ export interface AIErrorInfo {
20
+ type: AIErrorType;
21
+ messageKey: string;
22
+ retryable: boolean;
23
+ originalError?: unknown;
24
+ statusCode?: number;
25
+ }
26
+
27
+ export interface AIErrorMessages {
28
+ [AIErrorType.NETWORK]: string;
29
+ [AIErrorType.RATE_LIMIT]: string;
30
+ [AIErrorType.AUTHENTICATION]: string;
31
+ [AIErrorType.VALIDATION]: string;
32
+ [AIErrorType.CONTENT_POLICY]: string;
33
+ [AIErrorType.SERVER]: string;
34
+ [AIErrorType.TIMEOUT]: string;
35
+ [AIErrorType.UNKNOWN]: string;
36
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Core Types Index
3
+ * @module @umituz/react-native-ai-generation-content/core
4
+ */
5
+
6
+ export * from "./result.types";
7
+ export * from "./error.types";
8
+ export * from "./provider.types";
@@ -0,0 +1,201 @@
1
+ /**
2
+ * AI Provider Types
3
+ * Core interfaces for AI generation providers
4
+ *
5
+ * @module @umituz/react-native-ai-generation-content/core
6
+ */
7
+
8
+ // =============================================================================
9
+ // Feature Types
10
+ // =============================================================================
11
+
12
+ /**
13
+ * Feature types for image processing (output: image)
14
+ */
15
+ export type ImageFeatureType =
16
+ | "upscale"
17
+ | "photo-restore"
18
+ | "face-swap"
19
+ | "anime-selfie"
20
+ | "remove-background"
21
+ | "remove-object"
22
+ | "hd-touch-up"
23
+ | "replace-background";
24
+
25
+ /**
26
+ * Feature types for video generation (output: video)
27
+ */
28
+ export type VideoFeatureType = "image-to-video" | "text-to-video";
29
+
30
+ // =============================================================================
31
+ // Provider Configuration
32
+ // =============================================================================
33
+
34
+ export interface AIProviderConfig {
35
+ apiKey: string;
36
+ maxRetries?: number;
37
+ baseDelay?: number;
38
+ maxDelay?: number;
39
+ defaultTimeoutMs?: number;
40
+ textModel?: string;
41
+ textToImageModel?: string;
42
+ imageEditModel?: string;
43
+ videoGenerationModel?: string;
44
+ videoFeatureModels?: Partial<Record<VideoFeatureType, string>>;
45
+ imageFeatureModels?: Partial<Record<ImageFeatureType, string>>;
46
+ }
47
+
48
+ // =============================================================================
49
+ // Status Types
50
+ // =============================================================================
51
+
52
+ export type AIJobStatusType =
53
+ | "IN_QUEUE"
54
+ | "IN_PROGRESS"
55
+ | "COMPLETED"
56
+ | "FAILED";
57
+
58
+ export interface AILogEntry {
59
+ message: string;
60
+ level: "info" | "warn" | "error";
61
+ timestamp?: string;
62
+ }
63
+
64
+ export interface JobSubmission {
65
+ requestId: string;
66
+ statusUrl?: string;
67
+ responseUrl?: string;
68
+ }
69
+
70
+ export interface JobStatus {
71
+ status: AIJobStatusType;
72
+ logs?: AILogEntry[];
73
+ queuePosition?: number;
74
+ eta?: number;
75
+ }
76
+
77
+ // =============================================================================
78
+ // Progress & Options
79
+ // =============================================================================
80
+
81
+ export interface ProviderProgressInfo {
82
+ progress: number;
83
+ status?: AIJobStatusType;
84
+ message?: string;
85
+ estimatedTimeRemaining?: number;
86
+ }
87
+
88
+ export interface SubscribeOptions<T = unknown> {
89
+ timeoutMs?: number;
90
+ onQueueUpdate?: (status: JobStatus) => void;
91
+ onProgress?: (progress: ProviderProgressInfo) => void;
92
+ onResult?: (result: T) => void;
93
+ }
94
+
95
+ export interface RunOptions {
96
+ onProgress?: (progress: ProviderProgressInfo) => void;
97
+ }
98
+
99
+ // =============================================================================
100
+ // Capabilities
101
+ // =============================================================================
102
+
103
+ export interface ProviderCapabilities {
104
+ imageFeatures: readonly ImageFeatureType[];
105
+ videoFeatures: readonly VideoFeatureType[];
106
+ textToImage: boolean;
107
+ textToVideo: boolean;
108
+ imageToVideo: boolean;
109
+ textToVoice: boolean;
110
+ textToText: boolean;
111
+ }
112
+
113
+ // =============================================================================
114
+ // Feature Input Data
115
+ // =============================================================================
116
+
117
+ export interface ImageFeatureInputData {
118
+ imageBase64: string;
119
+ targetImageBase64?: string;
120
+ prompt?: string;
121
+ options?: Record<string, unknown>;
122
+ }
123
+
124
+ export interface VideoFeatureInputData {
125
+ sourceImageBase64?: string;
126
+ targetImageBase64?: string;
127
+ prompt?: string;
128
+ options?: Record<string, unknown>;
129
+ }
130
+
131
+ // =============================================================================
132
+ // Provider Sub-Interfaces (Interface Segregation Principle)
133
+ // =============================================================================
134
+
135
+ export interface IAIProviderLifecycle {
136
+ initialize(config: AIProviderConfig): void;
137
+ isInitialized(): boolean;
138
+ reset(): void;
139
+ }
140
+
141
+ export interface IAIProviderCapabilities {
142
+ getCapabilities(): ProviderCapabilities;
143
+ isFeatureSupported(feature: ImageFeatureType | VideoFeatureType): boolean;
144
+ }
145
+
146
+ export interface IAIProviderJobManager {
147
+ submitJob(
148
+ model: string,
149
+ input: Record<string, unknown>,
150
+ ): Promise<JobSubmission>;
151
+ getJobStatus(model: string, requestId: string): Promise<JobStatus>;
152
+ getJobResult<T = unknown>(model: string, requestId: string): Promise<T>;
153
+ }
154
+
155
+ export interface IAIProviderExecutor {
156
+ subscribe<T = unknown>(
157
+ model: string,
158
+ input: Record<string, unknown>,
159
+ options?: SubscribeOptions<T>,
160
+ ): Promise<T>;
161
+ run<T = unknown>(
162
+ model: string,
163
+ input: Record<string, unknown>,
164
+ options?: RunOptions,
165
+ ): Promise<T>;
166
+ }
167
+
168
+ export interface IAIProviderImageFeatures {
169
+ getImageFeatureModel(feature: ImageFeatureType): string;
170
+ buildImageFeatureInput(
171
+ feature: ImageFeatureType,
172
+ data: ImageFeatureInputData,
173
+ ): Record<string, unknown>;
174
+ }
175
+
176
+ export interface IAIProviderVideoFeatures {
177
+ getVideoFeatureModel(feature: VideoFeatureType): string;
178
+ buildVideoFeatureInput(
179
+ feature: VideoFeatureType,
180
+ data: VideoFeatureInputData,
181
+ ): Record<string, unknown>;
182
+ }
183
+
184
+ // =============================================================================
185
+ // Main Provider Interface
186
+ // =============================================================================
187
+
188
+ /**
189
+ * Main AI Provider Interface
190
+ * Composition of segregated interfaces following SOLID principles
191
+ */
192
+ export interface IAIProvider
193
+ extends IAIProviderLifecycle,
194
+ IAIProviderCapabilities,
195
+ IAIProviderJobManager,
196
+ IAIProviderExecutor,
197
+ IAIProviderImageFeatures,
198
+ IAIProviderVideoFeatures {
199
+ readonly providerId: string;
200
+ readonly providerName: string;
201
+ }
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Result Type Pattern for Functional Error Handling
3
+ * Inspired by Rust's Result<T, E> type
4
+ *
5
+ * @module @umituz/react-native-ai-generation-content/core
6
+ */
7
+
8
+ /**
9
+ * Success result containing a value of type T
10
+ */
11
+ export interface Success<T> {
12
+ success: true;
13
+ value: T;
14
+ }
15
+
16
+ /**
17
+ * Failure result containing an error of type E
18
+ */
19
+ export interface Failure<E> {
20
+ success: false;
21
+ error: E;
22
+ }
23
+
24
+ /**
25
+ * Result type that can be either Success or Failure
26
+ * Forces explicit error handling at compile time
27
+ */
28
+ export type Result<T, E = string> = Success<T> | Failure<E>;
29
+
30
+ /**
31
+ * Create a successful result
32
+ */
33
+ export function success<T>(value: T): Success<T> {
34
+ return { success: true, value };
35
+ }
36
+
37
+ /**
38
+ * Create a failed result
39
+ */
40
+ export function failure<E>(error: E): Failure<E> {
41
+ return { success: false, error };
42
+ }
43
+
44
+ /**
45
+ * Type guard to check if result is successful
46
+ */
47
+ export function isSuccess<T, E>(result: Result<T, E>): result is Success<T> {
48
+ return result.success === true;
49
+ }
50
+
51
+ /**
52
+ * Type guard to check if result is a failure
53
+ */
54
+ export function isFailure<T, E>(result: Result<T, E>): result is Failure<E> {
55
+ return result.success === false;
56
+ }
57
+
58
+ /**
59
+ * Map a successful result to a new value
60
+ */
61
+ export function mapResult<T, U, E>(
62
+ result: Result<T, E>,
63
+ fn: (value: T) => U,
64
+ ): Result<U, E> {
65
+ if (isSuccess(result)) {
66
+ return success(fn(result.value));
67
+ }
68
+ return result;
69
+ }
70
+
71
+ /**
72
+ * Chain async operations on Result types
73
+ */
74
+ export async function andThen<T, U, E>(
75
+ result: Result<T, E>,
76
+ fn: (value: T) => Promise<Result<U, E>>,
77
+ ): Promise<Result<U, E>> {
78
+ if (isSuccess(result)) {
79
+ return fn(result.value);
80
+ }
81
+ return result;
82
+ }
83
+
84
+ /**
85
+ * Unwrap a result, throwing if it's a failure
86
+ */
87
+ export function unwrap<T, E>(result: Result<T, E>): T {
88
+ if (isSuccess(result)) {
89
+ return result.value;
90
+ }
91
+ throw new Error(`Called unwrap on a failure: ${String(result.error)}`);
92
+ }
93
+
94
+ /**
95
+ * Unwrap a result or return a default value
96
+ */
97
+ export function unwrapOr<T, E>(result: Result<T, E>, defaultValue: T): T {
98
+ if (isSuccess(result)) {
99
+ return result.value;
100
+ }
101
+ return defaultValue;
102
+ }
@@ -33,8 +33,52 @@ export type {
33
33
 
34
34
  export { ExecutorFactory, type GenerationType as ExecutorGenerationType } from "./infrastructure/executors/executor-factory";
35
35
 
36
- export * from "./wizard";
37
- export * from "./infrastructure/flow";
36
+ // Wizard Domain
37
+ export type {
38
+ BaseStepConfig,
39
+ AuthGateStepConfig,
40
+ CreditGateStepConfig,
41
+ PhotoUploadStepConfig,
42
+ TextInputStepConfig,
43
+ SelectionStepConfig,
44
+ PreviewStepConfig,
45
+ WizardStepConfig,
46
+ WizardFeatureConfig,
47
+ ScenarioBasedConfig,
48
+ UsePhotoUploadStateProps,
49
+ UsePhotoUploadStateReturn,
50
+ PhotoUploadConfig,
51
+ PhotoUploadTranslations,
52
+ UseWizardGenerationProps,
53
+ UseWizardGenerationReturn,
54
+ WizardScenarioData,
55
+ WizardOutputType,
56
+ GenericWizardFlowProps,
57
+ TextInputScreenTranslations,
58
+ TextInputScreenConfig,
59
+ TextInputScreenProps,
60
+ } from "./wizard";
61
+
62
+ export {
63
+ buildWizardConfigFromScenario,
64
+ WIZARD_PRESETS,
65
+ buildFlowStepsFromWizard,
66
+ getPhotoUploadCount,
67
+ getStepConfig,
68
+ quickBuildWizard,
69
+ usePhotoUploadState,
70
+ useWizardGeneration,
71
+ GenericWizardFlow,
72
+ GeneratingScreen,
73
+ TextInputScreen,
74
+ TEXT_TO_IMAGE_WIZARD_CONFIG,
75
+ TEXT_TO_VIDEO_WIZARD_CONFIG,
76
+ IMAGE_TO_VIDEO_WIZARD_CONFIG,
77
+ } from "./wizard";
78
+
79
+ // Flow Infrastructure
80
+ export { createFlowStore, useFlow, resetFlowStore } from "./infrastructure/flow";
81
+ export type { FlowStoreType } from "./infrastructure/flow";
38
82
 
39
83
  // Flow config types from domain
40
84
  export {
@@ -62,4 +62,8 @@ export type {
62
62
  } from "./presentation/screens";
63
63
 
64
64
  // Feature Configs
65
- export * from "./configs";
65
+ export {
66
+ TEXT_TO_IMAGE_WIZARD_CONFIG,
67
+ TEXT_TO_VIDEO_WIZARD_CONFIG,
68
+ IMAGE_TO_VIDEO_WIZARD_CONFIG,
69
+ } from "./configs";
@@ -3,6 +3,35 @@
3
3
  * Reusable result preview components for AI generation
4
4
  */
5
5
 
6
- export * from "./presentation/components";
7
- export * from "./presentation/hooks";
8
- export * from "./presentation/types";
6
+ // Components
7
+ export {
8
+ ResultPreviewScreen,
9
+ ResultImageCard,
10
+ ResultActionBar,
11
+ RecentCreationsSection,
12
+ GenerationErrorScreen,
13
+ StarRatingPicker,
14
+ } from "./presentation/components";
15
+ export type {
16
+ StarRatingPickerProps,
17
+ GenerationErrorTranslations,
18
+ GenerationErrorConfig,
19
+ GenerationErrorScreenProps,
20
+ } from "./presentation/components";
21
+
22
+ // Hooks
23
+ export { useResultActions } from "./presentation/hooks";
24
+
25
+ // Types
26
+ export type {
27
+ ResultData,
28
+ ResultActionsCallbacks,
29
+ ResultDisplayState,
30
+ ResultImageCardProps,
31
+ ResultActionBarProps,
32
+ RecentCreation,
33
+ ResultPreviewScreenProps,
34
+ ResultPreviewTranslations,
35
+ UseResultActionsOptions,
36
+ UseResultActionsReturn,
37
+ } from "./presentation/types";
@@ -2,4 +2,15 @@
2
2
  * Result Preview Types Export
3
3
  */
4
4
 
5
- export * from "./result-preview.types";
5
+ export type {
6
+ ResultData,
7
+ ResultActionsCallbacks,
8
+ ResultDisplayState,
9
+ ResultImageCardProps,
10
+ ResultActionBarProps,
11
+ RecentCreation,
12
+ ResultPreviewScreenProps,
13
+ ResultPreviewTranslations,
14
+ UseResultActionsOptions,
15
+ UseResultActionsReturn,
16
+ } from "./result-preview.types";
package/src/index.ts CHANGED
@@ -143,13 +143,118 @@ export type {
143
143
  PhotoStepData, TextInputStepData, GenerationFlowState,
144
144
  } from "./presentation/types/flow-config.types";
145
145
 
146
- export * from "./domains/prompts";
147
- export * from "./domains/content-moderation";
148
- export * from "./domains/creations";
149
- export * from "./domains/face-detection";
150
- export * from "./domains/scenarios";
151
- export * from "./domains/access-control";
152
- export * from "./infrastructure/orchestration";
146
+ // Prompts Domain
147
+ export type {
148
+ AIPromptCategory, AIPromptVariableType, AIPromptError, AIPromptResult,
149
+ AIPromptVariable, AIPromptSafety, AIPromptVersion,
150
+ AIPromptTemplate, CreateAIPromptTemplateParams,
151
+ GeneratedPrompt, CreateGeneratedPromptParams,
152
+ ITemplateRepository, IPromptHistoryRepository, IPromptGenerationService,
153
+ AsyncState, AsyncActions, UseTemplateState, UseTemplateActions,
154
+ UsePromptGenerationState, UsePromptGenerationActions,
155
+ IdentitySegment, AnimeStyleSegment, QualitySegment,
156
+ ImagePromptResult, ImagePromptBuilderOptions, AnimeSelfiePromptResult,
157
+ CreatePromptOptions, MultiPersonPreservationRules, FacePreservationOptions,
158
+ InteractionStyle, InteractionStyleOptions,
159
+ } from "./domains/prompts";
160
+ export {
161
+ createPromptVersion, formatVersion,
162
+ createAIPromptTemplate, updateTemplateVersion, getTemplateString,
163
+ createGeneratedPrompt, isPromptRecent,
164
+ TemplateRepository, PromptHistoryRepository, PromptGenerationService,
165
+ useAsyncState, useTemplateRepository, usePromptGeneration,
166
+ IDENTITY_SEGMENTS, IDENTITY_NEGATIVE_SEGMENTS, ANIME_STYLE_SEGMENTS,
167
+ QUALITY_SEGMENTS, QUALITY_NEGATIVE_SEGMENTS, ANTI_REALISM_SEGMENTS,
168
+ ANATOMY_NEGATIVE_SEGMENTS, PRESET_COLLECTIONS,
169
+ ImagePromptBuilder, createAnimeSelfiePrompt, createStyleTransferPrompt,
170
+ IDENTITY_PRESERVATION_CORE, PHOTOREALISTIC_RENDERING, NATURAL_POSE_GUIDELINES,
171
+ MASTER_BASE_PROMPT, createPhotorealisticPrompt, createTransformationPrompt, enhanceExistingPrompt,
172
+ MULTI_PERSON_PRESERVATION_RULES, createMultiPersonPrompt,
173
+ buildFacePreservationPrompt, buildMinimalFacePreservationPrompt,
174
+ buildInteractionStylePrompt, buildMinimalInteractionStylePrompt, getInteractionRules, getInteractionForbidden,
175
+ } from "./domains/prompts";
176
+
177
+ // Content Moderation Domain
178
+ export type {
179
+ ContentType, ModerationSeverity, AgeRating, ViolationType, ModerationRule,
180
+ ModerationResult, Violation, ModerationContext, ModerationConfig,
181
+ SuggestionMessages, ValidationLimits, ContentFilterResult, IContentFilter, IModerator,
182
+ PatternMatch, ModerationResult as ModeratorResult,
183
+ } from "./domains/content-moderation";
184
+ export {
185
+ contentModerationService, patternMatcherService, textModerator, imageModerator,
186
+ videoModerator, voiceModerator, BaseModerator,
187
+ rulesRegistry, defaultModerationRules, ContentPolicyViolationError,
188
+ } from "./domains/content-moderation";
189
+
190
+ // Creations Domain
191
+ export type {
192
+ CreationTypeId, CreationStatus, CreationCategory, CreationFilter, FilterOption, CreationStats,
193
+ StatusColorKey, CreationOutput, IconName, Creation, CreationDocument,
194
+ CreationType, CreationsTranslations, CreationsConfig, DocumentMapper,
195
+ ICreationsRepository, CreationsSubscriptionCallback, UnsubscribeFunction, RepositoryOptions,
196
+ UseCreationPersistenceConfig, UseCreationPersistenceReturn, BaseProcessingStartData, BaseProcessingResult,
197
+ UseProcessingJobsPollerConfig, UseProcessingJobsPollerReturn,
198
+ CreationAction, CreationCardData, CreationCardCallbacks, FilterButton, PendingJobsSectionProps,
199
+ } from "./domains/creations";
200
+ export {
201
+ ALL_CREATION_STATUSES, ALL_CREATION_CATEGORIES, ALL_CREATION_TYPES,
202
+ IMAGE_CREATION_TYPES, VIDEO_CREATION_TYPES, DEFAULT_CREATION_FILTER,
203
+ MEDIA_FILTER_OPTIONS, STATUS_FILTER_OPTIONS, getTypesForCategory, getCategoryForType,
204
+ getCategoryForCreation, isTypeInCategory, isVideoCreationType, isImageCreationType, calculateCreationStats,
205
+ getStatusColorKey, getStatusColor, getStatusTextKey, getStatusText, isInProgress, isCompleted, isFailed,
206
+ getPreviewUrl, getAllMediaUrls, hasDownloadableContent, hasVideoContent, hasAudioContent, getPrimaryMediaUrl,
207
+ generateCreationId, getTypeIcon, getTypeTextKey, getTypeText, getCreationTitle, filterBySearch, sortCreations, truncateText,
208
+ mapDocumentToCreation, DEFAULT_TRANSLATIONS, DEFAULT_CONFIG,
209
+ CreationsRepository, createCreationsRepository,
210
+ useCreations, useDeleteCreation, useCreationsFilter, useAdvancedFilter, useCreationPersistence, useProcessingJobsPoller,
211
+ CreationPreview, CreationBadges, CreationActions, CreationCard, CreationThumbnail,
212
+ FilterChips, CreationsFilterBar, createMediaFilterButtons, createStatusFilterButtons,
213
+ CreationsHomeCard, EmptyState, PendingJobsSection,
214
+ getLocalizedTitle, getFilterCategoriesFromConfig, getTranslatedTypes,
215
+ CreationsGalleryScreen,
216
+ } from "./domains/creations";
217
+
218
+ // Face Detection Domain
219
+ export type { FaceDetectionResult, FaceValidationState, FaceDetectionConfig } from "./domains/face-detection";
220
+ export {
221
+ FACE_DETECTION_CONFIG, FACE_DETECTION_PROMPTS,
222
+ isValidFace, parseDetectionResponse, createFailedResult, createSuccessResult,
223
+ analyzeImageForFace, useFaceDetection, FaceValidationStatus, FaceDetectionToggle,
224
+ } from "./domains/face-detection";
225
+
226
+ // Scenarios Domain
227
+ export type {
228
+ ScenarioOutputType, ScenarioInputType, ScenarioPromptType, GeneratingMessages, Scenario,
229
+ AppScenarioConfig, ConfiguredScenario, WizardConfigOptions,
230
+ CategoryNavigationContainerProps, MainCategoryScreenProps, SubCategoryScreenProps,
231
+ MainCategory, SubCategory, CategoryInfo, ScenarioSelectorConfig, ScenarioPreviewTranslations,
232
+ ScenarioConfig, VisualStyleOption, InspirationChipData, MagicPromptConfig,
233
+ CoupleFeatureId, CoupleFeatureSelection, ScenarioData,
234
+ } from "./domains/scenarios";
235
+ export {
236
+ createScenariosForApp, filterScenariosByOutputType, filterScenariosByCategory,
237
+ getScenarioCategories, findScenarioById,
238
+ configureScenarios, getConfiguredScenario, getDefaultOutputType, isScenariosConfigured, getAllConfiguredScenarios,
239
+ createStoryTemplate, createCreativePrompt,
240
+ WizardInputType, detectWizardInputType, SCENARIO_TO_WIZARD_INPUT_MAP,
241
+ getScenarioWizardConfig, hasExplicitConfig, getScenarioWizardInputType, registerWizardConfig,
242
+ CategoryNavigationContainer, ScenarioPreviewScreen, MainCategoryScreen, SubCategoryScreen, HierarchicalScenarioListScreen,
243
+ } from "./domains/scenarios";
244
+
245
+ // Access Control Domain
246
+ export type { AIFeatureGateOptions, AIFeatureGateReturn, AIFeatureGateHook } from "./domains/access-control";
247
+ export { useAIFeatureGate } from "./domains/access-control";
248
+
249
+ // Orchestration Infrastructure (GenerationOrchestrator class)
250
+ export type {
251
+ CreditService, PaywallService, NetworkService, AuthService,
252
+ GenerationMetadata as OrchestratorGenerationMetadata, GenerationCapability as OrchestratorGenerationCapability,
253
+ OrchestratorConfig as GenerationOrchestratorConfig,
254
+ } from "./infrastructure/orchestration";
255
+ export {
256
+ GenerationOrchestrator, NetworkUnavailableError, InsufficientCreditsError, AuthenticationRequiredError,
257
+ } from "./infrastructure/orchestration";
153
258
 
154
259
  export {
155
260
  GenerationConfigProvider,
@@ -159,13 +264,126 @@ export {
159
264
  type GenerationConfigProviderProps,
160
265
  } from "./infrastructure/providers";
161
266
 
162
- export * from "./domains/result-preview";
163
- export * from "./domains/generation";
267
+ // Result Preview Domain (screens and additional components not in presentation/components)
268
+ export type {
269
+ ResultData, ResultActionsCallbacks, ResultDisplayState,
270
+ ResultActionBarProps, RecentCreation, ResultPreviewScreenProps, ResultPreviewTranslations,
271
+ UseResultActionsOptions, UseResultActionsReturn,
272
+ StarRatingPickerProps, GenerationErrorTranslations, GenerationErrorConfig, GenerationErrorScreenProps,
273
+ } from "./domains/result-preview";
274
+ export {
275
+ ResultPreviewScreen, ResultActionBar, RecentCreationsSection,
276
+ GenerationErrorScreen, StarRatingPicker, useResultActions,
277
+ } from "./domains/result-preview";
278
+
279
+ // Generation Domain (wizard, flow, strategy)
280
+ export type {
281
+ UseAIGenerationProps, UseAIGenerationReturn, AlertMessages as GenerationAlertMessages,
282
+ FeatureConfig, FeatureRegistration, GenerationType, InputType, OutputType, VisualStyleConfig,
283
+ GenerationExecutor, GenerationOptions as GenerationExecutorOptions,
284
+ GenerationResult as GenerationExecutorResult,
285
+ ImageGenerationOutput, VideoGenerationInput, VideoGenerationOutput,
286
+ MemeGenerationInput, MemeGenerationOutput, TextToImageInput, TextToImageOutput, ExecutorGenerationType,
287
+ BaseStepConfig, AuthGateStepConfig, CreditGateStepConfig, PhotoUploadStepConfig,
288
+ TextInputStepConfig as WizardTextInputStepConfig, SelectionStepConfig,
289
+ PreviewStepConfig as WizardPreviewStepConfig, WizardStepConfig,
290
+ WizardFeatureConfig, ScenarioBasedConfig,
291
+ UsePhotoUploadStateProps, UsePhotoUploadStateReturn, PhotoUploadConfig,
292
+ PhotoUploadTranslations as WizardPhotoUploadTranslations,
293
+ UseWizardGenerationProps, UseWizardGenerationReturn, WizardScenarioData, WizardOutputType,
294
+ GenericWizardFlowProps, TextInputScreenTranslations, TextInputScreenConfig, TextInputScreenProps,
295
+ FlowStoreType,
296
+ GateResult, AuthGateConfig, CreditGateConfig, FlowState, FlowActions, FlowCallbacks,
297
+ FlowConfiguration, StepDefinition,
298
+ } from "./domains/generation";
299
+ export {
300
+ useAIGeneration, featureRegistry, createGenerationStrategy, ExecutorFactory,
301
+ buildWizardConfigFromScenario, WIZARD_PRESETS, buildFlowStepsFromWizard, getPhotoUploadCount,
302
+ getStepConfig, quickBuildWizard, usePhotoUploadState, useWizardGeneration,
303
+ GenericWizardFlow, GeneratingScreen, TextInputScreen,
304
+ TEXT_TO_IMAGE_WIZARD_CONFIG, TEXT_TO_VIDEO_WIZARD_CONFIG, IMAGE_TO_VIDEO_WIZARD_CONFIG,
305
+ createFlowStore, useFlow, resetFlowStore,
306
+ StepType,
307
+ } from "./domains/generation";
164
308
 
165
- // Features - Standalone generation features (no wizard/scenario)
166
- export * from "./features/text-to-image";
167
- export * from "./features/text-to-video";
168
- export * from "./features/image-to-video";
309
+ // Features - Text-to-Image
310
+ export type {
311
+ AspectRatio, ImageSize, OutputFormat, NumImages, StyleOption as TextToImageStyleOption,
312
+ TextToImageFormState, TextToImageFormActions, TextToImageFormDefaults,
313
+ TextToImageGenerationRequest, TextToImageGenerationResult, TextToImageGenerationResultSuccess,
314
+ TextToImageGenerationResultError, TextToImageCallbacks, TextToImageFormConfig, TextToImageTranslations,
315
+ TextToImageOptions, TextToImageRequest, TextToImageResult, TextToImageFeatureState,
316
+ TextToImageInputBuilder, TextToImageResultExtractor, TextToImageFeatureConfig,
317
+ PromptSuggestion, ExecuteTextToImageOptions, UseFormStateOptions, UseFormStateReturn,
318
+ TextToImageGenerationState,
319
+ UseGenerationOptions as TextToImageUseGenerationOptions,
320
+ UseGenerationReturn as TextToImageUseGenerationReturn,
321
+ UseTextToImageFormOptions, UseTextToImageFormReturn,
322
+ TextToImagePromptInputProps, TextToImageExamplePromptsProps, TextToImageStyleSelectorProps,
323
+ TextToImageAspectRatioSelectorProps, TextToImageGenerateButtonProps, TextToImageSettingsSheetProps,
324
+ } from "./features/text-to-image";
325
+ export {
326
+ DEFAULT_IMAGE_STYLES, DEFAULT_NUM_IMAGES_OPTIONS, ASPECT_RATIO_VALUES, IMAGE_SIZE_VALUES,
327
+ OUTPUT_FORMAT_VALUES, DEFAULT_FORM_VALUES, DEFAULT_TEXT_TO_IMAGE_PROMPTS, DEFAULT_TEXT_TO_VOICE_PROMPTS,
328
+ executeTextToImage, hasTextToImageSupport,
329
+ useFormState as useTextToImageFormState,
330
+ useGeneration as useTextToImageGeneration,
331
+ useTextToImageForm,
332
+ TextToImagePromptInput, TextToImageExamplePrompts, TextToImageNumImagesSelector,
333
+ TextToImageStyleSelector, TextToImageAspectRatioSelector, TextToImageSizeSelector,
334
+ TextToImageOutputFormatSelector, TextToImageGenerateButton, TextToImageSettingsSheet,
335
+ } from "./features/text-to-image";
336
+
337
+ // Features - Text-to-Video
338
+ export type {
339
+ TextToVideoOptions, TextToVideoRequest, TextToVideoResult, TextToVideoFeatureState,
340
+ TextToVideoFormState, TextToVideoGenerationState, TextToVideoTranslations,
341
+ TextToVideoInputBuilder, TextToVideoResultExtractor, TextToVideoConfig, TextToVideoCallbacks,
342
+ TabConfig, VideoStyleOption, AspectRatioOption as TextToVideoAspectRatioOption,
343
+ VideoDurationOption, OptionToggleConfig, HeroConfig, ProgressConfig,
344
+ FrameData, VideoModerationResult, ProjectData, CreationData, GenerationStartData,
345
+ GenerationTabsProps, FrameSelectorProps, OptionsPanelProps, HeroSectionProps,
346
+ HintCarouselProps, HintItem,
347
+ ExamplePromptsProps as TextToVideoExamplePromptsProps,
348
+ ExamplePrompt,
349
+ UseTextToVideoFeatureProps, UseTextToVideoFeatureReturn, TextToVideoGenerateParams,
350
+ UseTextToVideoFormProps, UseTextToVideoFormReturn, ExecuteTextToVideoOptions,
351
+ } from "./features/text-to-video";
352
+ export {
353
+ INITIAL_FORM_STATE, INITIAL_GENERATION_STATE,
354
+ executeTextToVideo, hasTextToVideoSupport,
355
+ useTextToVideoFeature, useTextToVideoForm,
356
+ GenerationTabs, FrameSelector, OptionsPanel, HeroSection, HintCarousel,
357
+ } from "./features/text-to-video";
358
+
359
+ // Features - Image-to-Video
360
+ export type {
361
+ AnimationStyle, AnimationStyleId, MusicMood, MusicMoodId,
362
+ VideoDuration, DurationOption as ImageToVideoDurationOption,
363
+ ImageToVideoFormState, ImageToVideoFormActions, ImageToVideoFormDefaults,
364
+ ImageToVideoCallbacks, ImageToVideoFormConfig, ImageToVideoTranslationsExtended,
365
+ ImageToVideoOptions, ImageToVideoGenerateParams, ImageToVideoRequest, ImageToVideoResult,
366
+ ImageToVideoGenerationState, ImageToVideoFeatureState, ImageToVideoTranslations,
367
+ ImageToVideoInputBuilder, ImageToVideoResultExtractor, ImageToVideoFeatureCallbacks,
368
+ ImageToVideoGenerationStartData, ImageToVideoCreationData, ImageToVideoFeatureConfig,
369
+ ExecuteImageToVideoOptions, UseImageToVideoFormStateOptions, UseImageToVideoFormStateReturn,
370
+ UseImageToVideoGenerationOptions, UseImageToVideoGenerationReturn,
371
+ UseImageToVideoFormOptions, UseImageToVideoFormReturn,
372
+ UseImageToVideoFeatureProps, UseImageToVideoFeatureReturn,
373
+ ImageToVideoAnimationStyleSelectorProps, ImageToVideoDurationSelectorProps,
374
+ ImageToVideoMusicMoodSelectorProps, ImageToVideoSelectionGridProps,
375
+ ImageToVideoSelectionGridTranslations, ImageToVideoGenerateButtonProps,
376
+ } from "./features/image-to-video";
377
+ export {
378
+ IMAGE_TO_VIDEO_ANIMATION_STYLES, IMAGE_TO_VIDEO_DEFAULT_ANIMATION,
379
+ IMAGE_TO_VIDEO_MUSIC_MOODS, IMAGE_TO_VIDEO_DEFAULT_MUSIC,
380
+ IMAGE_TO_VIDEO_DURATION_OPTIONS, IMAGE_TO_VIDEO_DEFAULT_DURATION,
381
+ IMAGE_TO_VIDEO_FORM_DEFAULTS, IMAGE_TO_VIDEO_CONFIG,
382
+ executeImageToVideo, hasImageToVideoSupport,
383
+ useImageToVideoFormState, useImageToVideoGeneration, useImageToVideoForm, useImageToVideoFeature,
384
+ ImageToVideoAnimationStyleSelector, ImageToVideoDurationSelector,
385
+ ImageToVideoMusicMoodSelector, ImageToVideoSelectionGrid, ImageToVideoGenerateButton,
386
+ } from "./features/image-to-video";
169
387
 
170
388
  // Wizard Flows - Direct exports
171
389
  export { TextToImageWizardFlow } from "./features/text-to-image/presentation/screens/TextToImageWizardFlow";
@@ -3,6 +3,23 @@
3
3
  * Exports generic orchestration utilities for AI generation
4
4
  */
5
5
 
6
- export * from "./GenerationOrchestrator";
7
- export * from "./orchestrator.types";
8
- export * from "./orchestrator.errors";
6
+ // GenerationOrchestrator
7
+ export { GenerationOrchestrator } from "./GenerationOrchestrator";
8
+
9
+ // Types
10
+ export type {
11
+ CreditService,
12
+ PaywallService,
13
+ NetworkService,
14
+ AuthService,
15
+ GenerationMetadata,
16
+ GenerationCapability,
17
+ OrchestratorConfig,
18
+ } from "./orchestrator.types";
19
+
20
+ // Errors
21
+ export {
22
+ NetworkUnavailableError,
23
+ InsufficientCreditsError,
24
+ AuthenticationRequiredError,
25
+ } from "./orchestrator.errors";