@umituz/react-native-ai-generation-content 1.26.2 → 1.26.4
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 +3 -2
- package/src/domains/generation/application/feature-registry.ts +101 -0
- package/src/domains/generation/application/generation-strategy.factory.ts +128 -0
- package/src/domains/generation/domain/feature-config.types.ts +61 -0
- package/src/domains/generation/domain/generation.types.ts +74 -0
- package/src/domains/generation/index.ts +37 -0
- package/src/domains/generation/presentation/useAIGeneration.hook.ts +106 -0
- package/src/domains/wizard/infrastructure/strategies/wizard-strategy.factory.ts +3 -4
- package/src/index.ts +1 -25
- package/src/infrastructure/executors/executor-factory.ts +53 -0
- package/src/infrastructure/executors/image-executor.ts +133 -0
- package/src/infrastructure/executors/video-executor.ts +130 -0
- package/src/features/ai-hug/README.md +0 -438
- package/src/features/ai-hug/domain/index.ts +0 -5
- package/src/features/ai-hug/domain/types/ai-hug.types.ts +0 -25
- package/src/features/ai-hug/domain/types/index.ts +0 -7
- package/src/features/ai-hug/index.ts +0 -19
- package/src/features/ai-hug/presentation/components/AIHugFeature.tsx +0 -77
- package/src/features/ai-hug/presentation/components/index.ts +0 -2
- package/src/features/ai-hug/presentation/hooks/index.ts +0 -9
- package/src/features/ai-hug/presentation/hooks/useAIHugFeature.ts +0 -34
- package/src/features/ai-hug/presentation/index.ts +0 -6
- package/src/features/ai-kiss/README.md +0 -445
- package/src/features/ai-kiss/domain/index.ts +0 -5
- package/src/features/ai-kiss/domain/types/ai-kiss.types.ts +0 -25
- package/src/features/ai-kiss/domain/types/index.ts +0 -7
- package/src/features/ai-kiss/index.ts +0 -19
- package/src/features/ai-kiss/presentation/components/AIKissFeature.tsx +0 -77
- package/src/features/ai-kiss/presentation/components/index.ts +0 -2
- package/src/features/ai-kiss/presentation/hooks/index.ts +0 -9
- package/src/features/ai-kiss/presentation/hooks/useAIKissFeature.ts +0 -34
- package/src/features/ai-kiss/presentation/index.ts +0 -6
- package/src/features/anime-selfie/README.md +0 -396
- package/src/features/anime-selfie/domain/index.ts +0 -5
- package/src/features/anime-selfie/domain/types/anime-selfie.types.ts +0 -52
- package/src/features/anime-selfie/domain/types/index.ts +0 -8
- package/src/features/anime-selfie/index.ts +0 -20
- package/src/features/anime-selfie/presentation/components/AnimeSelfieFeature.tsx +0 -86
- package/src/features/anime-selfie/presentation/components/index.ts +0 -2
- package/src/features/anime-selfie/presentation/hooks/index.ts +0 -9
- package/src/features/anime-selfie/presentation/hooks/useAnimeSelfieFeature.ts +0 -59
- package/src/features/anime-selfie/presentation/index.ts +0 -6
- package/src/features/couple-future/README.md +0 -445
- package/src/features/couple-future/domain/types.ts +0 -63
- package/src/features/couple-future/domain/wizard-config.adapter.ts +0 -76
- package/src/features/couple-future/domain/wizard.types.ts +0 -121
- package/src/features/couple-future/index.ts +0 -83
- package/src/features/couple-future/infrastructure/coupleFeatureRegistry.ts +0 -76
- package/src/features/couple-future/infrastructure/couplePromptEnhancer.ts +0 -100
- package/src/features/couple-future/infrastructure/executor.ts +0 -188
- package/src/features/couple-future/infrastructure/generationUtils.ts +0 -228
- package/src/features/couple-future/presentation/components/ArtStyleSelector.tsx +0 -146
- package/src/features/couple-future/presentation/components/ArtistStyleSelector.tsx +0 -122
- package/src/features/couple-future/presentation/components/CoupleFutureWizard.tsx +0 -239
- package/src/features/couple-future/presentation/components/GeneratingStepContent.tsx +0 -86
- package/src/features/couple-future/presentation/components/RomanticMoodSelector.tsx +0 -147
- package/src/features/couple-future/presentation/components/WardrobeSelector.tsx +0 -141
- package/src/features/couple-future/presentation/components/index.ts +0 -12
- package/src/features/couple-future/presentation/hooks/useCoupleFutureFlow.ts +0 -166
- package/src/features/couple-future/presentation/hooks/useCoupleFutureFlow.types.ts +0 -69
- package/src/features/couple-future/presentation/hooks/useCoupleFutureHandlers.ts +0 -117
- package/src/features/couple-future/presentation/screens/CoupleFeatureScreen.tsx +0 -113
- package/src/features/face-swap/README.md +0 -431
- package/src/features/face-swap/domain/index.ts +0 -5
- package/src/features/face-swap/domain/types/face-swap.types.ts +0 -26
- package/src/features/face-swap/domain/types/index.ts +0 -7
- package/src/features/face-swap/index.ts +0 -19
- package/src/features/face-swap/presentation/components/FaceSwapFeature.tsx +0 -87
- package/src/features/face-swap/presentation/components/index.ts +0 -2
- package/src/features/face-swap/presentation/hooks/index.ts +0 -6
- package/src/features/face-swap/presentation/hooks/useFaceSwapFeature.ts +0 -35
- package/src/features/face-swap/presentation/index.ts +0 -6
- package/src/features/hd-touch-up/README.md +0 -396
- package/src/features/hd-touch-up/domain/index.ts +0 -1
- package/src/features/hd-touch-up/domain/types/hd-touch-up.types.ts +0 -62
- package/src/features/hd-touch-up/domain/types/index.ts +0 -9
- package/src/features/hd-touch-up/index.ts +0 -21
- package/src/features/hd-touch-up/presentation/components/HDTouchUpFeature.tsx +0 -86
- package/src/features/hd-touch-up/presentation/components/index.ts +0 -2
- package/src/features/hd-touch-up/presentation/hooks/index.ts +0 -1
- package/src/features/hd-touch-up/presentation/hooks/useHDTouchUpFeature.ts +0 -23
- package/src/features/hd-touch-up/presentation/index.ts +0 -2
- package/src/features/image-to-image/README.md +0 -459
- package/src/features/image-to-image/domain/index.ts +0 -1
- package/src/features/image-to-image/domain/types/base.types.ts +0 -48
- package/src/features/image-to-image/domain/types/index.ts +0 -1
- package/src/features/image-to-image/domain/types/partials/config.types.ts +0 -37
- package/src/features/image-to-image/domain/types/partials/hook.types.ts +0 -53
- package/src/features/image-to-image/domain/types/partials/metadata.types.ts +0 -32
- package/src/features/image-to-image/domain/types/partials/result.types.ts +0 -44
- package/src/features/image-to-image/domain/types/partials/state.types.ts +0 -34
- package/src/features/image-to-image/domain/types/partials/translation.types.ts +0 -57
- package/src/features/image-to-image/index.ts +0 -2
- package/src/features/image-to-image/presentation/hooks/index.ts +0 -3
- package/src/features/image-to-image/presentation/hooks/useDualImageFeature.ts +0 -204
- package/src/features/image-to-image/presentation/hooks/useImageWithPromptFeature.ts +0 -223
- package/src/features/image-to-image/presentation/hooks/useSingleImageFeature.ts +0 -166
- package/src/features/image-to-image/presentation/index.ts +0 -1
- package/src/features/image-to-video/README.md +0 -414
- package/src/features/image-to-video/domain/constants/animation.constants.ts +0 -47
- package/src/features/image-to-video/domain/constants/duration.constants.ts +0 -13
- package/src/features/image-to-video/domain/constants/form.constants.ts +0 -22
- package/src/features/image-to-video/domain/constants/index.ts +0 -23
- package/src/features/image-to-video/domain/constants/music.constants.ts +0 -53
- package/src/features/image-to-video/domain/index.ts +0 -5
- package/src/features/image-to-video/domain/types/animation.types.ts +0 -20
- package/src/features/image-to-video/domain/types/config.types.ts +0 -56
- package/src/features/image-to-video/domain/types/duration.types.ts +0 -11
- package/src/features/image-to-video/domain/types/form.types.ts +0 -35
- package/src/features/image-to-video/domain/types/image-to-video.types.ts +0 -122
- package/src/features/image-to-video/domain/types/index.ts +0 -39
- package/src/features/image-to-video/domain/types/music.types.ts +0 -21
- package/src/features/image-to-video/index.ts +0 -116
- package/src/features/image-to-video/infrastructure/index.ts +0 -1
- package/src/features/image-to-video/infrastructure/services/image-to-video-executor.ts +0 -154
- package/src/features/image-to-video/infrastructure/services/index.ts +0 -5
- package/src/features/image-to-video/presentation/components/AddMoreCard.tsx +0 -52
- package/src/features/image-to-video/presentation/components/AnimationStyleSelector.tsx +0 -135
- package/src/features/image-to-video/presentation/components/DurationSelector.tsx +0 -110
- package/src/features/image-to-video/presentation/components/EmptyGridState.tsx +0 -69
- package/src/features/image-to-video/presentation/components/GridImageItem.tsx +0 -64
- package/src/features/image-to-video/presentation/components/ImageSelectionGrid.styles.ts +0 -84
- package/src/features/image-to-video/presentation/components/ImageSelectionGrid.tsx +0 -77
- package/src/features/image-to-video/presentation/components/ImageSelectionGrid.types.ts +0 -18
- package/src/features/image-to-video/presentation/components/MusicMoodSelector.tsx +0 -181
- package/src/features/image-to-video/presentation/components/index.ts +0 -30
- package/src/features/image-to-video/presentation/hooks/index.ts +0 -27
- package/src/features/image-to-video/presentation/hooks/useFormState.ts +0 -116
- package/src/features/image-to-video/presentation/hooks/useGeneration.ts +0 -85
- package/src/features/image-to-video/presentation/hooks/useGenerationExecution.ts +0 -143
- package/src/features/image-to-video/presentation/hooks/useImageToVideoFeature.ts +0 -107
- package/src/features/image-to-video/presentation/hooks/useImageToVideoForm.ts +0 -119
- package/src/features/image-to-video/presentation/hooks/useImageToVideoValidation.ts +0 -46
- package/src/features/image-to-video/presentation/index.ts +0 -5
- package/src/features/love-message/domain/constants.ts +0 -162
- package/src/features/love-message/domain/types.ts +0 -58
- package/src/features/love-message/index.ts +0 -37
- package/src/features/love-message/infrastructure/persistence/PartnerProfileRepository.ts +0 -52
- package/src/features/love-message/infrastructure/prompts/messagePromptBuilder.ts +0 -109
- package/src/features/love-message/infrastructure/services/LoveMessageService.ts +0 -35
- package/src/features/love-message/presentation/components/CategoryGrid.tsx +0 -88
- package/src/features/love-message/presentation/components/DetailsInput.tsx +0 -74
- package/src/features/love-message/presentation/components/ExploreHeader.tsx +0 -67
- package/src/features/love-message/presentation/components/FieldInput.tsx +0 -83
- package/src/features/love-message/presentation/components/GeneratorHeader.tsx +0 -88
- package/src/features/love-message/presentation/components/LoveMessageHeroSection.tsx +0 -114
- package/src/features/love-message/presentation/components/MessageListItem.tsx +0 -77
- package/src/features/love-message/presentation/components/MessageResult.tsx +0 -105
- package/src/features/love-message/presentation/components/PartnerInput.tsx +0 -78
- package/src/features/love-message/presentation/components/ProgressDots.tsx +0 -48
- package/src/features/love-message/presentation/components/StepDetails.tsx +0 -23
- package/src/features/love-message/presentation/components/StepPartner.tsx +0 -116
- package/src/features/love-message/presentation/components/StepVibe.tsx +0 -30
- package/src/features/love-message/presentation/components/ToneSelector.tsx +0 -100
- package/src/features/love-message/presentation/components/TrendingSection.tsx +0 -130
- package/src/features/love-message/presentation/components/TypeSelector.tsx +0 -99
- package/src/features/love-message/presentation/hooks/useLoveMessageGenerator.ts +0 -114
- package/src/features/love-message/presentation/hooks/usePartnerProfile.ts +0 -43
- package/src/features/love-message/presentation/navigation/LoveMessageStack.tsx +0 -39
- package/src/features/love-message/presentation/screens/LoveMessageExploreScreen.tsx +0 -53
- package/src/features/love-message/presentation/screens/LoveMessageGeneratorScreen.tsx +0 -169
- package/src/features/love-message/presentation/screens/MessageListScreen.tsx +0 -127
- package/src/features/love-message/presentation/screens/PartnerProfileScreen.tsx +0 -119
- package/src/features/meme-generator/README.md +0 -408
- package/src/features/meme-generator/index.ts +0 -3
- package/src/features/meme-generator/infrastructure/services/MemeGenerationService.ts +0 -87
- package/src/features/meme-generator/presentation/components/MemeGeneratorFeature.tsx +0 -180
- package/src/features/meme-generator/presentation/components/index.ts +0 -2
- package/src/features/meme-generator/presentation/screens/MemeGeneratorScreen.tsx +0 -168
- package/src/features/meme-generator/presentation/screens/index.ts +0 -1
- package/src/features/partner-upload/domain/types.ts +0 -59
- package/src/features/partner-upload/index.ts +0 -30
- package/src/features/partner-upload/presentation/components/PartnerInfoInput.tsx +0 -112
- package/src/features/partner-upload/presentation/components/PhotoTips.tsx +0 -53
- package/src/features/partner-upload/presentation/components/index.ts +0 -4
- package/src/features/partner-upload/presentation/hooks/index.ts +0 -7
- package/src/features/partner-upload/presentation/hooks/usePartnerStep.ts +0 -130
- package/src/features/partner-upload/presentation/screens/PartnerStepScreen.tsx +0 -231
- package/src/features/partner-upload/presentation/screens/index.ts +0 -6
- package/src/features/photo-restoration/README.md +0 -399
- package/src/features/photo-restoration/domain/index.ts +0 -1
- package/src/features/photo-restoration/domain/types/index.ts +0 -9
- package/src/features/photo-restoration/domain/types/photo-restore.types.ts +0 -64
- package/src/features/photo-restoration/index.ts +0 -22
- package/src/features/photo-restoration/presentation/components/PhotoRestoreFeature.tsx +0 -88
- package/src/features/photo-restoration/presentation/components/PhotoRestoreResultView.tsx +0 -86
- package/src/features/photo-restoration/presentation/components/index.ts +0 -4
- package/src/features/photo-restoration/presentation/hooks/index.ts +0 -1
- package/src/features/photo-restoration/presentation/hooks/usePhotoRestoreFeature.ts +0 -23
- package/src/features/photo-restoration/presentation/index.ts +0 -2
- package/src/features/remove-background/README.md +0 -393
- package/src/features/remove-background/domain/index.ts +0 -5
- package/src/features/remove-background/domain/types/index.ts +0 -7
- package/src/features/remove-background/domain/types/remove-background.types.ts +0 -28
- package/src/features/remove-background/index.ts +0 -19
- package/src/features/remove-background/presentation/components/RemoveBackgroundFeature.tsx +0 -86
- package/src/features/remove-background/presentation/components/index.ts +0 -2
- package/src/features/remove-background/presentation/hooks/index.ts +0 -1
- package/src/features/remove-background/presentation/hooks/useRemoveBackgroundFeature.ts +0 -28
- package/src/features/remove-background/presentation/index.ts +0 -6
- package/src/features/remove-object/README.md +0 -405
- package/src/features/remove-object/domain/index.ts +0 -5
- package/src/features/remove-object/domain/types/index.ts +0 -7
- package/src/features/remove-object/domain/types/remove-object.types.ts +0 -54
- package/src/features/remove-object/index.ts +0 -23
- package/src/features/remove-object/presentation/components/RemoveObjectFeature.tsx +0 -136
- package/src/features/remove-object/presentation/components/index.ts +0 -2
- package/src/features/remove-object/presentation/hooks/index.ts +0 -9
- package/src/features/remove-object/presentation/hooks/useRemoveObjectFeature.ts +0 -221
- package/src/features/remove-object/presentation/index.ts +0 -6
- package/src/features/replace-background/README.md +0 -405
- package/src/features/replace-background/domain/types/index.ts +0 -7
- package/src/features/replace-background/domain/types/replace-background.types.ts +0 -33
- package/src/features/replace-background/index.ts +0 -23
- package/src/features/replace-background/presentation/components/ReplaceBackgroundFeature.tsx +0 -105
- package/src/features/replace-background/presentation/components/index.ts +0 -6
- package/src/features/replace-background/presentation/hooks/index.ts +0 -9
- package/src/features/replace-background/presentation/hooks/useReplaceBackgroundFeature.ts +0 -55
- package/src/features/scenarios/domain/types.ts +0 -147
- package/src/features/scenarios/index.ts +0 -64
- package/src/features/scenarios/presentation/components/InspirationChips.tsx +0 -82
- package/src/features/scenarios/presentation/components/MagicPromptHeadline.tsx +0 -79
- package/src/features/scenarios/presentation/components/ScenarioGrid.tsx +0 -224
- package/src/features/scenarios/presentation/components/ScenarioHeader.tsx +0 -55
- package/src/features/scenarios/presentation/components/StyleSelector.tsx +0 -119
- package/src/features/scenarios/presentation/components/index.ts +0 -18
- package/src/features/scenarios/presentation/containers/CategoryNavigationContainer.tsx +0 -178
- package/src/features/scenarios/presentation/screens/HierarchicalScenarioListScreen.tsx +0 -266
- package/src/features/scenarios/presentation/screens/MagicPromptScreen.tsx +0 -242
- package/src/features/scenarios/presentation/screens/MainCategoryScreen.tsx +0 -198
- package/src/features/scenarios/presentation/screens/ScenarioPreviewScreen.tsx +0 -164
- package/src/features/scenarios/presentation/screens/ScenarioSelectorScreen.tsx +0 -66
- package/src/features/scenarios/presentation/screens/SubCategoryScreen.tsx +0 -216
- package/src/features/script-generator/README.md +0 -433
- package/src/features/script-generator/domain/constants/index.ts +0 -10
- package/src/features/script-generator/domain/types/script.types.ts +0 -30
- package/src/features/script-generator/index.ts +0 -5
- package/src/features/script-generator/infrastructure/services/ScriptGenerationService.ts +0 -62
- package/src/features/script-generator/presentation/components/ScriptDisplay.tsx +0 -158
- package/src/features/script-generator/presentation/components/VideoTypeSelector.tsx +0 -102
- package/src/features/script-generator/presentation/components/index.ts +0 -2
- package/src/features/script-generator/presentation/hooks/index.ts +0 -1
- package/src/features/script-generator/presentation/hooks/useScriptGenerator.ts +0 -77
- package/src/features/shared/README.md +0 -311
- package/src/features/shared/dual-image-video/domain/types/dual-image-video.types.ts +0 -88
- package/src/features/shared/dual-image-video/domain/types/index.ts +0 -14
- package/src/features/shared/dual-image-video/index.ts +0 -17
- package/src/features/shared/dual-image-video/presentation/hooks/index.ts +0 -5
- package/src/features/shared/dual-image-video/presentation/hooks/useDualImageVideoFeature.ts +0 -185
- package/src/features/shared/index.ts +0 -6
- package/src/features/text-to-image/README.md +0 -394
- package/src/features/text-to-image/domain/constants/index.ts +0 -8
- package/src/features/text-to-image/domain/constants/options.constants.ts +0 -39
- package/src/features/text-to-image/domain/constants/styles.constants.ts +0 -34
- package/src/features/text-to-image/domain/index.ts +0 -7
- package/src/features/text-to-image/domain/types/config.types.ts +0 -75
- package/src/features/text-to-image/domain/types/form.types.ts +0 -58
- package/src/features/text-to-image/domain/types/index.ts +0 -38
- package/src/features/text-to-image/domain/types/text-to-image.types.ts +0 -58
- package/src/features/text-to-image/index.ts +0 -116
- package/src/features/text-to-image/infrastructure/index.ts +0 -1
- package/src/features/text-to-image/infrastructure/services/index.ts +0 -5
- package/src/features/text-to-image/infrastructure/services/text-to-image-executor.ts +0 -147
- package/src/features/text-to-image/presentation/components/index.ts +0 -30
- package/src/features/text-to-image/presentation/hooks/index.ts +0 -30
- package/src/features/text-to-image/presentation/hooks/useFormState.ts +0 -103
- package/src/features/text-to-image/presentation/hooks/useGeneration.ts +0 -139
- package/src/features/text-to-image/presentation/hooks/useTextToImageFeature.ts +0 -111
- package/src/features/text-to-image/presentation/hooks/useTextToImageForm.ts +0 -58
- package/src/features/text-to-image/presentation/index.ts +0 -7
- package/src/features/text-to-video/README.md +0 -412
- package/src/features/text-to-video/domain/index.ts +0 -1
- package/src/features/text-to-video/domain/types/callback.types.ts +0 -69
- package/src/features/text-to-video/domain/types/component.types.ts +0 -106
- package/src/features/text-to-video/domain/types/config.types.ts +0 -61
- package/src/features/text-to-video/domain/types/index.ts +0 -56
- package/src/features/text-to-video/domain/types/request.types.ts +0 -36
- package/src/features/text-to-video/domain/types/state.types.ts +0 -53
- package/src/features/text-to-video/index.ts +0 -68
- package/src/features/text-to-video/infrastructure/index.ts +0 -1
- package/src/features/text-to-video/infrastructure/services/index.ts +0 -5
- package/src/features/text-to-video/infrastructure/services/text-to-video-executor.ts +0 -141
- package/src/features/text-to-video/presentation/components/FrameSelector.tsx +0 -153
- package/src/features/text-to-video/presentation/components/GenerationTabs.tsx +0 -73
- package/src/features/text-to-video/presentation/components/HeroSection.tsx +0 -61
- package/src/features/text-to-video/presentation/components/HintCarousel.tsx +0 -96
- package/src/features/text-to-video/presentation/components/OptionsPanel.tsx +0 -121
- package/src/features/text-to-video/presentation/components/index.ts +0 -10
- package/src/features/text-to-video/presentation/hooks/index.ts +0 -17
- package/src/features/text-to-video/presentation/hooks/useTextToVideoFeature.ts +0 -225
- package/src/features/text-to-video/presentation/hooks/useTextToVideoForm.ts +0 -134
- package/src/features/text-to-video/presentation/index.ts +0 -7
- package/src/features/text-to-voice/README.md +0 -445
- package/src/features/text-to-voice/domain/index.ts +0 -1
- package/src/features/text-to-voice/domain/types/component.types.ts +0 -91
- package/src/features/text-to-voice/domain/types/config.types.ts +0 -34
- package/src/features/text-to-voice/domain/types/form.types.ts +0 -39
- package/src/features/text-to-voice/domain/types/generation.types.ts +0 -43
- package/src/features/text-to-voice/domain/types/index.ts +0 -38
- package/src/features/text-to-voice/index.ts +0 -53
- package/src/features/text-to-voice/infrastructure/index.ts +0 -1
- package/src/features/text-to-voice/infrastructure/services/index.ts +0 -4
- package/src/features/text-to-voice/infrastructure/services/text-to-voice-executor.ts +0 -103
- package/src/features/text-to-voice/presentation/components/TextToVoiceAudioPlayer.tsx +0 -81
- package/src/features/text-to-voice/presentation/components/index.ts +0 -7
- package/src/features/text-to-voice/presentation/hooks/index.ts +0 -6
- package/src/features/text-to-voice/presentation/hooks/useTextToVoiceForm.ts +0 -91
- package/src/features/text-to-voice/presentation/hooks/useTextToVoiceGeneration.ts +0 -116
- package/src/features/text-to-voice/presentation/index.ts +0 -2
- package/src/features/upscaling/README.md +0 -396
- package/src/features/upscaling/domain/index.ts +0 -1
- package/src/features/upscaling/domain/types/index.ts +0 -1
- package/src/features/upscaling/domain/types/upscale.types.ts +0 -23
- package/src/features/upscaling/index.ts +0 -20
- package/src/features/upscaling/presentation/components/ComparisonSlider.tsx +0 -200
- package/src/features/upscaling/presentation/components/UpscaleFeature.tsx +0 -89
- package/src/features/upscaling/presentation/components/UpscaleResultView.tsx +0 -98
- package/src/features/upscaling/presentation/components/index.ts +0 -6
- package/src/features/upscaling/presentation/hooks/index.ts +0 -1
- package/src/features/upscaling/presentation/hooks/useUpscaleFeature.ts +0 -28
- package/src/features/upscaling/presentation/index.ts +0 -2
- package/src/features/wizard/domain/types.ts +0 -154
- package/src/features/wizard/index.ts +0 -43
- package/src/features/wizard/presentation/components/AIFeatureWizard.tsx +0 -231
- package/src/features/wizard/presentation/components/AIGenerationWizard.tsx +0 -132
- package/src/features/wizard/presentation/hooks/useWizard.ts +0 -120
- package/src/features/wizard/presentation/store/useWizardStore.ts +0 -82
|
@@ -1,459 +0,0 @@
|
|
|
1
|
-
# Image to Image Feature
|
|
2
|
-
|
|
3
|
-
Transform images using AI with various operations and styles.
|
|
4
|
-
|
|
5
|
-
## 📍 Import Path
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
import {
|
|
9
|
-
useSingleImageFeature,
|
|
10
|
-
useDualImageFeature,
|
|
11
|
-
useImageWithPromptFeature
|
|
12
|
-
} from '@umituz/react-native-ai-generation-content';
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
**Location**: `src/features/image-to-image/`
|
|
16
|
-
|
|
17
|
-
## 🎯 Feature Purpose
|
|
18
|
-
|
|
19
|
-
Flexible framework for transforming images using AI. Supports three modes: single image operations (style transfer, enhancement), dual image operations (face swap, blend), and image with prompt transformations (guided editing).
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## 📋 Usage Strategy
|
|
24
|
-
|
|
25
|
-
### When to Use This Feature
|
|
26
|
-
|
|
27
|
-
✅ **Use Cases:**
|
|
28
|
-
- Style transfer and artistic transformations
|
|
29
|
-
- Face swapping between images
|
|
30
|
-
- Image blending and compositing
|
|
31
|
-
- Guided image editing with prompts
|
|
32
|
-
- Custom image transformations
|
|
33
|
-
|
|
34
|
-
❌ **When NOT to Use:**
|
|
35
|
-
- Background removal (use Remove Background)
|
|
36
|
-
- Object removal (use Remove Object)
|
|
37
|
-
- Photo restoration (use Photo Restoration)
|
|
38
|
-
- Image upscaling (use Upscaling)
|
|
39
|
-
|
|
40
|
-
### Implementation Strategy
|
|
41
|
-
|
|
42
|
-
#### Single Image Mode
|
|
43
|
-
1. **Select image** to transform
|
|
44
|
-
2. **Choose operation type** (style transfer, filter, etc.)
|
|
45
|
-
3. **Configure options** for the operation
|
|
46
|
-
4. **Process transformation** with progress tracking
|
|
47
|
-
5. **Preview and compare** with original
|
|
48
|
-
6. **Save or share** result
|
|
49
|
-
|
|
50
|
-
#### Dual Image Mode
|
|
51
|
-
1. **Select source image** (primary subject)
|
|
52
|
-
2. **Select target image** (reference or source)
|
|
53
|
-
3. **Choose operation** (face swap, blend, etc.)
|
|
54
|
-
4. **Configure options** for the operation
|
|
55
|
-
5. **Process transformation** with progress tracking
|
|
56
|
-
6. **Preview and compare** result
|
|
57
|
-
7. **Save or share** result
|
|
58
|
-
|
|
59
|
-
#### Image with Prompt Mode
|
|
60
|
-
1. **Select base image** to transform
|
|
61
|
-
2. **Enter text prompt** describing desired changes
|
|
62
|
-
3. **Configure strength** and other options
|
|
63
|
-
4. **Process transformation** with progress tracking
|
|
64
|
-
5. **Preview and compare** with original
|
|
65
|
-
6. **Save or share** result
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## ⚠️ Critical Rules (MUST FOLLOW)
|
|
70
|
-
|
|
71
|
-
### 1. Image Requirements
|
|
72
|
-
- **MUST** provide appropriate number of images for mode (1 or 2)
|
|
73
|
-
- **MUST** use high-quality images (min 512x512 recommended)
|
|
74
|
-
- **MUST** have clear, recognizable content
|
|
75
|
-
- **MUST NOT** exceed file size limits (10MB each)
|
|
76
|
-
- **MUST** validate images before processing
|
|
77
|
-
|
|
78
|
-
### 2. Configuration
|
|
79
|
-
- **MUST** provide valid `userId` for tracking
|
|
80
|
-
- **MUST** specify operation mode (single, dual, or with prompt)
|
|
81
|
-
- **MUST** implement `buildInput` function for mode
|
|
82
|
-
- **MUST** implement `onError` callback
|
|
83
|
-
- **MUST** implement appropriate `onSelect*` callbacks
|
|
84
|
-
|
|
85
|
-
### 3. State Management
|
|
86
|
-
- **MUST** check `isReady` before enabling process button
|
|
87
|
-
- **MUST** verify all required inputs are provided
|
|
88
|
-
- **MUST** display progress during processing
|
|
89
|
-
- **MUST** display `error` state with clear messages
|
|
90
|
-
- **MUST** implement proper cleanup on unmount
|
|
91
|
-
|
|
92
|
-
### 4. Performance
|
|
93
|
-
- **MUST** implement image compression before upload
|
|
94
|
-
- **MUST** show progress indicator for processing
|
|
95
|
-
- **MUST** cache results locally
|
|
96
|
-
- **MUST** allow users to cancel processing
|
|
97
|
-
- **MUST NOT** process multiple transformations simultaneously
|
|
98
|
-
|
|
99
|
-
### 5. Build Input Function
|
|
100
|
-
- **MUST** properly structure input based on API requirements
|
|
101
|
-
- **MUST** include all required parameters
|
|
102
|
-
- **MUST** validate inputs before API call
|
|
103
|
-
- **MUST** handle mode-specific parameters correctly
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## 🚫 Prohibitions (MUST AVOID)
|
|
108
|
-
|
|
109
|
-
### Strictly Forbidden
|
|
110
|
-
|
|
111
|
-
❌ **NEVER** do the following:
|
|
112
|
-
|
|
113
|
-
1. **No Missing Images**
|
|
114
|
-
- Always validate all required images are selected
|
|
115
|
-
- Never call process() without complete inputs
|
|
116
|
-
|
|
117
|
-
2. **No Auto-Processing**
|
|
118
|
-
- Never start transformation without user action
|
|
119
|
-
- Always require explicit "Transform" button press
|
|
120
|
-
- Show preview before processing
|
|
121
|
-
|
|
122
|
-
3. **No Hardcoded Credentials**
|
|
123
|
-
- Never store API keys in component files
|
|
124
|
-
- Use environment variables or secure storage
|
|
125
|
-
|
|
126
|
-
4. **No Unhandled Errors**
|
|
127
|
-
- Never ignore transformation failures
|
|
128
|
-
- Always explain what went wrong
|
|
129
|
-
- Provide retry or alternative options
|
|
130
|
-
|
|
131
|
-
5. **No Memory Leaks**
|
|
132
|
-
- Never store large image sets unnecessarily
|
|
133
|
-
- Clean up temporary images
|
|
134
|
-
- Implement proper image disposal
|
|
135
|
-
|
|
136
|
-
6. **No Wrong Mode**
|
|
137
|
-
- Never use single image mode for dual image operations
|
|
138
|
-
- Always select appropriate hook for operation
|
|
139
|
-
- Validate mode matches use case
|
|
140
|
-
|
|
141
|
-
7. **No Invalid Build Input**
|
|
142
|
-
- Never forget to implement buildInput function
|
|
143
|
-
- Always structure input correctly for API
|
|
144
|
-
- Validate all required parameters
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## 🤖 AI Agent Directions
|
|
149
|
-
|
|
150
|
-
### For AI Code Generation Tools
|
|
151
|
-
|
|
152
|
-
When using this feature with AI code generation tools, follow these guidelines:
|
|
153
|
-
|
|
154
|
-
#### Prompt Template for AI Agents
|
|
155
|
-
|
|
156
|
-
```
|
|
157
|
-
You are implementing an image to image transformation feature using @umituz/react-native-ai-generation-content.
|
|
158
|
-
|
|
159
|
-
REQUIREMENTS:
|
|
160
|
-
1. Import from: @umituz/react-native-ai-generation-content
|
|
161
|
-
2. Choose appropriate hook based on operation:
|
|
162
|
-
- useSingleImageFeature for single image operations
|
|
163
|
-
- useDualImageFeature for two image operations
|
|
164
|
-
- useImageWithPromptFeature for image + prompt operations
|
|
165
|
-
3. Implement image selection UI (1 or 2 images based on mode)
|
|
166
|
-
4. Implement buildInput function to structure API inputs
|
|
167
|
-
5. Configure operation-specific options
|
|
168
|
-
6. Validate images before processing
|
|
169
|
-
7. Show before/after comparison
|
|
170
|
-
8. Handle long processing times with progress
|
|
171
|
-
9. Implement proper error handling
|
|
172
|
-
10. Implement cleanup on unmount
|
|
173
|
-
|
|
174
|
-
CRITICAL RULES:
|
|
175
|
-
- MUST select correct hook for operation type
|
|
176
|
-
- MUST implement buildInput function properly
|
|
177
|
-
- MUST validate all required images are selected
|
|
178
|
-
- MUST show before/after comparison
|
|
179
|
-
- MUST implement debouncing (300ms)
|
|
180
|
-
- MUST allow transformation regeneration
|
|
181
|
-
|
|
182
|
-
HOOK SELECTION:
|
|
183
|
-
- useSingleImageFeature: Style transfer, filters, single image edits
|
|
184
|
-
- useDualImageFeature: Face swap, blending, two image composites
|
|
185
|
-
- useImageWithPromptFeature: Guided editing with text descriptions
|
|
186
|
-
|
|
187
|
-
CONFIGURATION:
|
|
188
|
-
- Provide valid userId (string)
|
|
189
|
-
- Implement onSelectImage (single mode) or onSelectSourceImage/onSelectTargetImage (dual mode)
|
|
190
|
-
- Implement onSaveImage callback
|
|
191
|
-
- Implement buildInput function to structure API call
|
|
192
|
-
- Configure callbacks: onProcessingStart, onProcessingComplete, onError
|
|
193
|
-
|
|
194
|
-
BUILD INPUT FUNCTION:
|
|
195
|
-
- Single Image: (imageBase64, config) => API input
|
|
196
|
-
- Dual Image: (sourceBase64, targetBase64, config) => API input
|
|
197
|
-
- With Prompt: (imageBase64, prompt, config) => API input
|
|
198
|
-
|
|
199
|
-
STRICTLY FORBIDDEN:
|
|
200
|
-
- No missing image validation
|
|
201
|
-
- No auto-processing without user action
|
|
202
|
-
- No hardcoded API keys
|
|
203
|
-
- No unhandled errors
|
|
204
|
-
- No memory leaks
|
|
205
|
-
- No blocking UI
|
|
206
|
-
- No missing buildInput function
|
|
207
|
-
|
|
208
|
-
QUALITY CHECKLIST:
|
|
209
|
-
- [ ] Correct hook selected for operation
|
|
210
|
-
- [ ] Image selection implemented (1 or 2 images)
|
|
211
|
-
- [ ] buildInput function implemented
|
|
212
|
-
- [ ] Validation before process()
|
|
213
|
-
- [ ] Before/after comparison view
|
|
214
|
-
- [ ] Progress indicator during processing
|
|
215
|
-
- [ ] Error display with retry option
|
|
216
|
-
- [ ] Download/share functionality
|
|
217
|
-
- [ ] Transformation regeneration option
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
#### AI Implementation Checklist
|
|
221
|
-
|
|
222
|
-
Use this checklist when generating code:
|
|
223
|
-
|
|
224
|
-
- [ ] Feature imported from correct path
|
|
225
|
-
- [ ] Correct hook selected (single/dual/prompt)
|
|
226
|
-
- [ ] Image selection(s) implemented
|
|
227
|
-
- [ ] buildInput function implemented correctly
|
|
228
|
-
- [ ] Validation before process()
|
|
229
|
-
- [ ] Before/after comparison view
|
|
230
|
-
- [ ] Progress indicator during processing
|
|
231
|
-
- [ ] Error display with user-friendly message
|
|
232
|
-
- [ ] Download/share buttons
|
|
233
|
-
- [ ] Transformation regeneration option
|
|
234
|
-
- [ ] Cleanup on unmount
|
|
235
|
-
- [ ] Original images preserved
|
|
236
|
-
|
|
237
|
-
---
|
|
238
|
-
|
|
239
|
-
## 🛠️ Configuration Strategy
|
|
240
|
-
|
|
241
|
-
### Hook Selection
|
|
242
|
-
|
|
243
|
-
```typescript
|
|
244
|
-
// Single Image Operations
|
|
245
|
-
useSingleImageFeature<Config, Result>({
|
|
246
|
-
config,
|
|
247
|
-
onSelectImage,
|
|
248
|
-
onSaveImage,
|
|
249
|
-
options: {
|
|
250
|
-
buildInput: (imageBase64, config) => ({
|
|
251
|
-
imageBase64,
|
|
252
|
-
operation: config.operation,
|
|
253
|
-
...config.options
|
|
254
|
-
}),
|
|
255
|
-
},
|
|
256
|
-
})
|
|
257
|
-
|
|
258
|
-
// Dual Image Operations
|
|
259
|
-
useDualImageFeature<Config, Result>({
|
|
260
|
-
config,
|
|
261
|
-
onSelectSourceImage,
|
|
262
|
-
onSelectTargetImage,
|
|
263
|
-
onSaveImage,
|
|
264
|
-
options: {
|
|
265
|
-
buildInput: (sourceBase64, targetBase64, config) => ({
|
|
266
|
-
imageBase64: sourceBase64,
|
|
267
|
-
targetImageBase64: targetBase64,
|
|
268
|
-
operation: config.operation,
|
|
269
|
-
...config.options
|
|
270
|
-
}),
|
|
271
|
-
},
|
|
272
|
-
})
|
|
273
|
-
|
|
274
|
-
// Image with Prompt Operations
|
|
275
|
-
useImageWithPromptFeature<Config, Result>({
|
|
276
|
-
config,
|
|
277
|
-
onSelectImage,
|
|
278
|
-
onSaveImage,
|
|
279
|
-
options: {
|
|
280
|
-
buildInput: (imageBase64, prompt, config) => ({
|
|
281
|
-
imageBase64,
|
|
282
|
-
prompt,
|
|
283
|
-
strength: config.strength,
|
|
284
|
-
...config.options
|
|
285
|
-
}),
|
|
286
|
-
},
|
|
287
|
-
})
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
### Common Operations
|
|
291
|
-
|
|
292
|
-
1. **Single Image**: Style transfer, filters, enhancements
|
|
293
|
-
2. **Dual Image**: Face swap, blending, compositing
|
|
294
|
-
3. **With Prompt**: Guided editing, semantic transformations
|
|
295
|
-
|
|
296
|
-
### Recommended Settings
|
|
297
|
-
|
|
298
|
-
1. **Image Quality**
|
|
299
|
-
- Minimum: 512x512 resolution
|
|
300
|
-
- Recommended: 1024x1024 or higher
|
|
301
|
-
- Format: JPEG or PNG
|
|
302
|
-
- Max size: 10MB each
|
|
303
|
-
|
|
304
|
-
2. **Prompt Strength (when applicable)**
|
|
305
|
-
- 0.3-0.5: Subtle changes
|
|
306
|
-
- 0.6-0.8: Balanced transformation (recommended)
|
|
307
|
-
- 0.9-1.0: Strong transformation
|
|
308
|
-
|
|
309
|
-
---
|
|
310
|
-
|
|
311
|
-
## 📊 State Management
|
|
312
|
-
|
|
313
|
-
### Feature States
|
|
314
|
-
|
|
315
|
-
**isReady**: boolean
|
|
316
|
-
- All required images selected and validated
|
|
317
|
-
- Check before enabling process button
|
|
318
|
-
|
|
319
|
-
**isProcessing**: boolean
|
|
320
|
-
- Transformation in progress
|
|
321
|
-
- Show loading/progress indicator
|
|
322
|
-
- Disable process button
|
|
323
|
-
|
|
324
|
-
**progress**: number (0-100)
|
|
325
|
-
- Transformation progress percentage
|
|
326
|
-
- Update progress bar
|
|
327
|
-
|
|
328
|
-
**error**: string | null
|
|
329
|
-
- Error message if transformation failed
|
|
330
|
-
- Display to user with clear message
|
|
331
|
-
|
|
332
|
-
**result**: {
|
|
333
|
-
imageUrl: string
|
|
334
|
-
originalImageUrl?: string
|
|
335
|
-
operation?: string
|
|
336
|
-
metadata?: any
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
---
|
|
340
|
-
|
|
341
|
-
## 🎨 Best Practices
|
|
342
|
-
|
|
343
|
-
### Mode Selection
|
|
344
|
-
|
|
345
|
-
1. **Single Image Mode**
|
|
346
|
-
- Use for: Filters, style transfer, adjustments
|
|
347
|
-
- Good: Artistic transformations, enhancements
|
|
348
|
-
- Bad: Multi-image operations
|
|
349
|
-
|
|
350
|
-
2. **Dual Image Mode**
|
|
351
|
-
- Use for: Face swap, blending, compositing
|
|
352
|
-
- Good: Combining elements from two images
|
|
353
|
-
- Bad: Single image transformations
|
|
354
|
-
|
|
355
|
-
3. **Image with Prompt Mode**
|
|
356
|
-
- Use for: Guided editing, semantic changes
|
|
357
|
-
- Good: Specific, described modifications
|
|
358
|
-
- Bad: Simple filters (use single image mode)
|
|
359
|
-
|
|
360
|
-
### Input Building
|
|
361
|
-
|
|
362
|
-
1. **Structure Inputs Properly**
|
|
363
|
-
- Match API requirements exactly
|
|
364
|
-
- Include all required fields
|
|
365
|
-
- Validate before sending
|
|
366
|
-
|
|
367
|
-
2. **Parameter Handling**
|
|
368
|
-
- Handle optional parameters gracefully
|
|
369
|
-
- Provide sensible defaults
|
|
370
|
-
- Document required vs optional
|
|
371
|
-
|
|
372
|
-
### User Experience
|
|
373
|
-
|
|
374
|
-
1. **Before/After Comparison**
|
|
375
|
-
- Side-by-side comparison
|
|
376
|
-
- Slider or toggle for easy comparison
|
|
377
|
-
- Zoom capability for detail inspection
|
|
378
|
-
|
|
379
|
-
2. **Progress Feedback**
|
|
380
|
-
- Show estimated time remaining
|
|
381
|
-
- Update progress regularly
|
|
382
|
-
- Allow cancellation
|
|
383
|
-
|
|
384
|
-
---
|
|
385
|
-
|
|
386
|
-
## 🐛 Common Pitfalls
|
|
387
|
-
|
|
388
|
-
### Wrong Mode
|
|
389
|
-
|
|
390
|
-
❌ **Problem**: Using single image mode for dual image operation
|
|
391
|
-
✅ **Solution**: Select appropriate hook (useDualImageFeature)
|
|
392
|
-
|
|
393
|
-
### Build Input Issues
|
|
394
|
-
|
|
395
|
-
❌ **Problem**: Transformation fails due to incorrect input structure
|
|
396
|
-
✅ **Solution**: Verify buildInput function matches API requirements
|
|
397
|
-
|
|
398
|
-
### Missing Images
|
|
399
|
-
|
|
400
|
-
❌ **Problem**: Process called without all required images
|
|
401
|
-
✅ **Solution**: Validate all images selected before processing
|
|
402
|
-
|
|
403
|
-
### Performance Issues
|
|
404
|
-
|
|
405
|
-
❌ **Problem**: Slow transformation
|
|
406
|
-
✅ **Solution**: Compress images, show progress, allow cancellation
|
|
407
|
-
|
|
408
|
-
---
|
|
409
|
-
|
|
410
|
-
## 📦 Related Components
|
|
411
|
-
|
|
412
|
-
Use these components from the library:
|
|
413
|
-
|
|
414
|
-
- **PhotoUploadCard**: Upload image interface
|
|
415
|
-
- **DualImagePicker**: Select two images for dual mode
|
|
416
|
-
- **PromptInput**: Text input for prompt mode
|
|
417
|
-
- **ResultDisplay**: Before/after comparison
|
|
418
|
-
- **ProgressBar**: Progress display
|
|
419
|
-
|
|
420
|
-
Located at: `src/presentation/components/`
|
|
421
|
-
|
|
422
|
-
---
|
|
423
|
-
|
|
424
|
-
## 🔄 Migration Strategy
|
|
425
|
-
|
|
426
|
-
If migrating from previous implementation:
|
|
427
|
-
|
|
428
|
-
1. **Select appropriate hook** for your operation
|
|
429
|
-
2. **Implement buildInput function** to structure API inputs
|
|
430
|
-
3. **Update state handling** for your mode (single/dual/prompt)
|
|
431
|
-
4. **Add before/after comparison**
|
|
432
|
-
5. **Test all operation modes**
|
|
433
|
-
|
|
434
|
-
---
|
|
435
|
-
|
|
436
|
-
## 📚 Additional Resources
|
|
437
|
-
|
|
438
|
-
- Main documentation: `/docs/`
|
|
439
|
-
- API reference: `/docs/api/`
|
|
440
|
-
- Examples: `/docs/examples/basic/image-to-image/`
|
|
441
|
-
- Architecture: `/ARCHITECTURE.md`
|
|
442
|
-
|
|
443
|
-
---
|
|
444
|
-
|
|
445
|
-
**Last Updated**: 2025-01-08
|
|
446
|
-
**Version**: 2.0.0 (Strategy-based Documentation)
|
|
447
|
-
|
|
448
|
-
---
|
|
449
|
-
|
|
450
|
-
## 📝 Changelog
|
|
451
|
-
|
|
452
|
-
### v2.0.0 - 2025-01-08
|
|
453
|
-
- **BREAKING**: Documentation format changed to strategy-based
|
|
454
|
-
- Removed extensive code examples
|
|
455
|
-
- Added rules, prohibitions, and AI agent directions
|
|
456
|
-
- Focus on best practices and implementation guidance
|
|
457
|
-
|
|
458
|
-
### v1.0.0 - Initial Release
|
|
459
|
-
- Initial feature documentation
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./types";
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base Image-to-Image Types
|
|
3
|
-
* Common types for all image processing features
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { ImageFeatureType } from "../../../../domain/interfaces";
|
|
7
|
-
|
|
8
|
-
// Re-export all partial types
|
|
9
|
-
export type {
|
|
10
|
-
BaseSingleImageState,
|
|
11
|
-
BaseImageWithPromptState,
|
|
12
|
-
BaseDualImageState,
|
|
13
|
-
} from "./partials/state.types";
|
|
14
|
-
|
|
15
|
-
export type {
|
|
16
|
-
BaseImageResult,
|
|
17
|
-
BaseImageResultWithCreationId,
|
|
18
|
-
ImageResultExtractor,
|
|
19
|
-
SingleImageProcessingStartData,
|
|
20
|
-
DualImageProcessingStartData,
|
|
21
|
-
} from "./partials/result.types";
|
|
22
|
-
|
|
23
|
-
export type {
|
|
24
|
-
BaseImageTranslations,
|
|
25
|
-
BaseDualImageTranslations,
|
|
26
|
-
} from "./partials/translation.types";
|
|
27
|
-
|
|
28
|
-
export type {
|
|
29
|
-
BaseImageConfig,
|
|
30
|
-
SingleImageConfig,
|
|
31
|
-
DualImageConfig,
|
|
32
|
-
} from "./partials/config.types";
|
|
33
|
-
|
|
34
|
-
export type {
|
|
35
|
-
BaseSingleImageHookProps,
|
|
36
|
-
BaseDualImageHookProps,
|
|
37
|
-
BaseSingleImageHookReturn,
|
|
38
|
-
BaseDualImageHookReturn,
|
|
39
|
-
} from "./partials/hook.types";
|
|
40
|
-
|
|
41
|
-
export type {
|
|
42
|
-
ImageProcessingCategory,
|
|
43
|
-
ImageInputMode,
|
|
44
|
-
ImageFeatureMetadata,
|
|
45
|
-
} from "./partials/metadata.types";
|
|
46
|
-
|
|
47
|
-
// Legacy re-exports for backward compatibility
|
|
48
|
-
export type { ImageFeatureType };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./base.types";
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Image Feature Config Types
|
|
3
|
-
* Configuration interfaces for all image processing features
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { ImageFeatureType } from "../../../../../domain/interfaces";
|
|
7
|
-
import type { BaseImageResult, ImageResultExtractor } from "./result.types";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Base config for all image features
|
|
11
|
-
*/
|
|
12
|
-
export interface BaseImageConfig<TResult extends BaseImageResult = BaseImageResult> {
|
|
13
|
-
featureType: ImageFeatureType;
|
|
14
|
-
creditCost?: number;
|
|
15
|
-
extractResult?: ImageResultExtractor;
|
|
16
|
-
prepareImage: (imageUri: string) => Promise<string>;
|
|
17
|
-
onProcessingStart?: (data: { creationId: string; [key: string]: unknown }) => void;
|
|
18
|
-
onProcessingComplete?: (result: TResult) => void;
|
|
19
|
-
onError?: (error: string, creationId?: string) => void;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Config for single image features
|
|
24
|
-
*/
|
|
25
|
-
export interface SingleImageConfig<TResult extends BaseImageResult = BaseImageResult>
|
|
26
|
-
extends BaseImageConfig<TResult> {
|
|
27
|
-
onImageSelect?: (uri: string) => void;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Config for dual image features
|
|
32
|
-
*/
|
|
33
|
-
export interface DualImageConfig<TResult extends BaseImageResult = BaseImageResult>
|
|
34
|
-
extends BaseImageConfig<TResult> {
|
|
35
|
-
onSourceImageSelect?: (uri: string) => void;
|
|
36
|
-
onTargetImageSelect?: (uri: string) => void;
|
|
37
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Image Feature Hook Types
|
|
3
|
-
* Hook interfaces for all image processing features
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { SingleImageConfig, DualImageConfig } from "./config.types";
|
|
7
|
-
import type { BaseSingleImageState, BaseDualImageState } from "./state.types";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Base hook props for single image features
|
|
11
|
-
*/
|
|
12
|
-
export interface BaseSingleImageHookProps<TConfig = SingleImageConfig> {
|
|
13
|
-
config: TConfig;
|
|
14
|
-
onSelectImage: () => Promise<string | null>;
|
|
15
|
-
onSaveImage: (imageUrl: string) => Promise<void>;
|
|
16
|
-
/** Called before processing starts. Return false to cancel. */
|
|
17
|
-
onBeforeProcess?: () => Promise<boolean>;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Base hook props for dual image features
|
|
22
|
-
*/
|
|
23
|
-
export interface BaseDualImageHookProps<
|
|
24
|
-
TConfig extends DualImageConfig = DualImageConfig,
|
|
25
|
-
> {
|
|
26
|
-
config: TConfig;
|
|
27
|
-
onSelectSourceImage: () => Promise<string | null>;
|
|
28
|
-
onSelectTargetImage: () => Promise<string | null>;
|
|
29
|
-
onSaveImage: (imageUrl: string) => Promise<void>;
|
|
30
|
-
/** Called before processing starts. Return false to cancel. */
|
|
31
|
-
onBeforeProcess?: () => Promise<boolean>;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Base hook return for single image features
|
|
36
|
-
*/
|
|
37
|
-
export interface BaseSingleImageHookReturn extends BaseSingleImageState {
|
|
38
|
-
selectImage: () => Promise<void>;
|
|
39
|
-
process: () => Promise<void>;
|
|
40
|
-
save: () => Promise<void>;
|
|
41
|
-
reset: () => void;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Base hook return for dual image features
|
|
46
|
-
*/
|
|
47
|
-
export interface BaseDualImageHookReturn extends BaseDualImageState {
|
|
48
|
-
selectSourceImage: () => Promise<void>;
|
|
49
|
-
selectTargetImage: () => Promise<void>;
|
|
50
|
-
process: () => Promise<void>;
|
|
51
|
-
save: () => Promise<void>;
|
|
52
|
-
reset: () => void;
|
|
53
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Image Feature Metadata Types
|
|
3
|
-
* Metadata and categorization types
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { ImageFeatureType } from "../../../../../domain/interfaces";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Image processing categories
|
|
10
|
-
*/
|
|
11
|
-
export type ImageProcessingCategory =
|
|
12
|
-
| "enhancement"
|
|
13
|
-
| "editing"
|
|
14
|
-
| "transformation"
|
|
15
|
-
| "composition";
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Input mode for image processing
|
|
19
|
-
*/
|
|
20
|
-
export type ImageInputMode = "single" | "single-with-prompt" | "dual";
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Feature metadata for categorization
|
|
24
|
-
*/
|
|
25
|
-
export interface ImageFeatureMetadata {
|
|
26
|
-
name: string;
|
|
27
|
-
category: ImageProcessingCategory;
|
|
28
|
-
inputMode: ImageInputMode;
|
|
29
|
-
featureType: ImageFeatureType;
|
|
30
|
-
requiresPrompt?: boolean;
|
|
31
|
-
requiresMask?: boolean;
|
|
32
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Image Feature Result Types
|
|
3
|
-
* Result interfaces for all image processing features
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Base result for all image processing features
|
|
8
|
-
*/
|
|
9
|
-
export interface BaseImageResult {
|
|
10
|
-
success: boolean;
|
|
11
|
-
imageUrl?: string;
|
|
12
|
-
imageBase64?: string;
|
|
13
|
-
error?: string;
|
|
14
|
-
requestId?: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Base result with optional creationId for persistence
|
|
19
|
-
*/
|
|
20
|
-
export interface BaseImageResultWithCreationId extends BaseImageResult {
|
|
21
|
-
creationId?: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Result extractor function type
|
|
26
|
-
*/
|
|
27
|
-
export type ImageResultExtractor = (result: unknown) => string | undefined;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Image processing start data
|
|
31
|
-
*/
|
|
32
|
-
export interface SingleImageProcessingStartData {
|
|
33
|
-
creationId: string;
|
|
34
|
-
imageUri: string;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Dual image processing start data
|
|
39
|
-
*/
|
|
40
|
-
export interface DualImageProcessingStartData {
|
|
41
|
-
creationId: string;
|
|
42
|
-
sourceImageUri: string;
|
|
43
|
-
targetImageUri: string;
|
|
44
|
-
}
|