@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,122 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Image-to-Video Feature Types
|
|
3
|
-
* Request, Result, Config types for image-to-video generation
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { AnimationStyleId } from "./animation.types";
|
|
7
|
-
import type { MusicMoodId } from "./music.types";
|
|
8
|
-
import type { VideoDuration } from "./duration.types";
|
|
9
|
-
|
|
10
|
-
export interface ImageToVideoOptions {
|
|
11
|
-
duration?: number;
|
|
12
|
-
motionStrength?: number;
|
|
13
|
-
aspectRatio?: "16:9" | "9:16" | "1:1";
|
|
14
|
-
fps?: number;
|
|
15
|
-
animationStyle?: AnimationStyleId;
|
|
16
|
-
musicMood?: MusicMoodId;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface ImageToVideoGenerateParams extends ImageToVideoOptions {
|
|
20
|
-
imageUri?: string;
|
|
21
|
-
motionPrompt?: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface ImageToVideoRequest {
|
|
25
|
-
imageUri: string;
|
|
26
|
-
imageBase64?: string;
|
|
27
|
-
userId: string;
|
|
28
|
-
motionPrompt?: string;
|
|
29
|
-
options?: ImageToVideoOptions;
|
|
30
|
-
allImages?: string[];
|
|
31
|
-
customAudioUri?: string | null;
|
|
32
|
-
animationStyle?: AnimationStyleId;
|
|
33
|
-
duration?: VideoDuration;
|
|
34
|
-
musicMood?: MusicMoodId;
|
|
35
|
-
model?: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface ImageToVideoResult {
|
|
39
|
-
success: boolean;
|
|
40
|
-
videoUrl?: string;
|
|
41
|
-
thumbnailUrl?: string;
|
|
42
|
-
error?: string;
|
|
43
|
-
requestId?: string;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface ImageToVideoGenerationState {
|
|
47
|
-
isGenerating: boolean;
|
|
48
|
-
progress: number;
|
|
49
|
-
error: string | null;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface ImageToVideoFeatureState {
|
|
53
|
-
imageUri: string | null;
|
|
54
|
-
motionPrompt: string;
|
|
55
|
-
videoUrl: string | null;
|
|
56
|
-
thumbnailUrl: string | null;
|
|
57
|
-
isProcessing: boolean;
|
|
58
|
-
progress: number;
|
|
59
|
-
error: string | null;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export interface ImageToVideoTranslations {
|
|
63
|
-
uploadTitle: string;
|
|
64
|
-
uploadSubtitle: string;
|
|
65
|
-
motionPromptPlaceholder: string;
|
|
66
|
-
generateButtonText: string;
|
|
67
|
-
processingText: string;
|
|
68
|
-
successText: string;
|
|
69
|
-
saveButtonText: string;
|
|
70
|
-
tryAnotherText: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export type ImageToVideoInputBuilder = (
|
|
74
|
-
imageBase64: string,
|
|
75
|
-
motionPrompt?: string,
|
|
76
|
-
options?: ImageToVideoOptions,
|
|
77
|
-
) => Record<string, unknown>;
|
|
78
|
-
|
|
79
|
-
export type ImageToVideoResultExtractor = (
|
|
80
|
-
result: unknown,
|
|
81
|
-
) => { videoUrl?: string; thumbnailUrl?: string } | undefined;
|
|
82
|
-
|
|
83
|
-
export interface ImageToVideoFeatureCallbacks {
|
|
84
|
-
onCreditCheck?: (cost: number) => Promise<boolean>;
|
|
85
|
-
onCreditDeduct?: (cost: number) => Promise<void>;
|
|
86
|
-
onAuthCheck?: () => boolean;
|
|
87
|
-
onShowPaywall?: (creditCost: number) => void;
|
|
88
|
-
onGenerationStart?: (data: ImageToVideoGenerationStartData) => Promise<void>;
|
|
89
|
-
onCreationSave?: (data: ImageToVideoCreationData) => Promise<void>;
|
|
90
|
-
onGenerate?: (result: ImageToVideoResult) => void;
|
|
91
|
-
onProgress?: (progress: number) => void;
|
|
92
|
-
onError?: (error: string) => void;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export interface ImageToVideoGenerationStartData {
|
|
96
|
-
creationId: string;
|
|
97
|
-
type: string;
|
|
98
|
-
imageUri: string;
|
|
99
|
-
metadata?: Record<string, unknown>;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export interface ImageToVideoCreationData {
|
|
103
|
-
creationId: string;
|
|
104
|
-
type: string;
|
|
105
|
-
videoUrl: string;
|
|
106
|
-
thumbnailUrl?: string;
|
|
107
|
-
imageUri: string;
|
|
108
|
-
metadata?: Record<string, unknown>;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export interface ImageToVideoFeatureConfig {
|
|
112
|
-
providerId?: string;
|
|
113
|
-
creditCost?: number;
|
|
114
|
-
model: string;
|
|
115
|
-
buildInput: ImageToVideoInputBuilder;
|
|
116
|
-
extractResult?: ImageToVideoResultExtractor;
|
|
117
|
-
prepareImage: (imageUri: string) => Promise<string>;
|
|
118
|
-
onImageSelect?: (uri: string) => void;
|
|
119
|
-
onProcessingStart?: () => void;
|
|
120
|
-
onProcessingComplete?: (result: ImageToVideoResult) => void;
|
|
121
|
-
onError?: (error: string) => void;
|
|
122
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// Animation Types
|
|
2
|
-
export type { AnimationStyle, AnimationStyleId } from "./animation.types";
|
|
3
|
-
|
|
4
|
-
// Music Types
|
|
5
|
-
export type { MusicMood, MusicMoodId } from "./music.types";
|
|
6
|
-
|
|
7
|
-
// Duration Types
|
|
8
|
-
export type { VideoDuration, DurationOption } from "./duration.types";
|
|
9
|
-
|
|
10
|
-
// Form Types
|
|
11
|
-
export type {
|
|
12
|
-
ImageToVideoFormState,
|
|
13
|
-
ImageToVideoFormActions,
|
|
14
|
-
ImageToVideoFormDefaults,
|
|
15
|
-
} from "./form.types";
|
|
16
|
-
|
|
17
|
-
// Config Types
|
|
18
|
-
export type {
|
|
19
|
-
ImageToVideoCallbacks,
|
|
20
|
-
ImageToVideoFormConfig,
|
|
21
|
-
ImageToVideoTranslationsExtended,
|
|
22
|
-
} from "./config.types";
|
|
23
|
-
|
|
24
|
-
// Core Feature Types
|
|
25
|
-
export type {
|
|
26
|
-
ImageToVideoOptions,
|
|
27
|
-
ImageToVideoGenerateParams,
|
|
28
|
-
ImageToVideoRequest,
|
|
29
|
-
ImageToVideoResult,
|
|
30
|
-
ImageToVideoGenerationState,
|
|
31
|
-
ImageToVideoFeatureState,
|
|
32
|
-
ImageToVideoTranslations,
|
|
33
|
-
ImageToVideoInputBuilder,
|
|
34
|
-
ImageToVideoResultExtractor,
|
|
35
|
-
ImageToVideoFeatureCallbacks,
|
|
36
|
-
ImageToVideoGenerationStartData,
|
|
37
|
-
ImageToVideoCreationData,
|
|
38
|
-
ImageToVideoFeatureConfig,
|
|
39
|
-
} from "./image-to-video.types";
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Music Types for Image-to-Video
|
|
3
|
-
* Defines music mood options
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export interface MusicMood {
|
|
7
|
-
id: string;
|
|
8
|
-
name: string;
|
|
9
|
-
description: string;
|
|
10
|
-
icon: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type MusicMoodId =
|
|
14
|
-
| "none"
|
|
15
|
-
| "energetic"
|
|
16
|
-
| "calm"
|
|
17
|
-
| "happy"
|
|
18
|
-
| "emotional"
|
|
19
|
-
| "rhythmic"
|
|
20
|
-
| "custom"
|
|
21
|
-
| string;
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Image-to-Video Feature
|
|
3
|
-
* Provider-agnostic image-to-video generation feature
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
// =============================================================================
|
|
7
|
-
// DOMAIN LAYER - Types
|
|
8
|
-
// =============================================================================
|
|
9
|
-
|
|
10
|
-
// Animation Types
|
|
11
|
-
export type { AnimationStyle, AnimationStyleId } from "./domain";
|
|
12
|
-
|
|
13
|
-
// Music Types
|
|
14
|
-
export type { MusicMood, MusicMoodId } from "./domain";
|
|
15
|
-
|
|
16
|
-
// Duration Types
|
|
17
|
-
export type { VideoDuration, DurationOption } from "./domain";
|
|
18
|
-
|
|
19
|
-
// Form Types
|
|
20
|
-
export type {
|
|
21
|
-
ImageToVideoFormState,
|
|
22
|
-
ImageToVideoFormActions,
|
|
23
|
-
ImageToVideoFormDefaults,
|
|
24
|
-
} from "./domain";
|
|
25
|
-
|
|
26
|
-
// Config Types
|
|
27
|
-
export type {
|
|
28
|
-
ImageToVideoCallbacks,
|
|
29
|
-
ImageToVideoFormConfig,
|
|
30
|
-
ImageToVideoTranslationsExtended,
|
|
31
|
-
} from "./domain";
|
|
32
|
-
|
|
33
|
-
// Core Feature Types
|
|
34
|
-
export type {
|
|
35
|
-
ImageToVideoOptions,
|
|
36
|
-
ImageToVideoGenerateParams,
|
|
37
|
-
ImageToVideoRequest,
|
|
38
|
-
ImageToVideoResult,
|
|
39
|
-
ImageToVideoGenerationState,
|
|
40
|
-
ImageToVideoFeatureState,
|
|
41
|
-
ImageToVideoTranslations,
|
|
42
|
-
ImageToVideoInputBuilder,
|
|
43
|
-
ImageToVideoResultExtractor,
|
|
44
|
-
ImageToVideoFeatureCallbacks,
|
|
45
|
-
ImageToVideoGenerationStartData,
|
|
46
|
-
ImageToVideoCreationData,
|
|
47
|
-
ImageToVideoFeatureConfig,
|
|
48
|
-
} from "./domain";
|
|
49
|
-
|
|
50
|
-
// =============================================================================
|
|
51
|
-
// DOMAIN LAYER - Constants
|
|
52
|
-
// =============================================================================
|
|
53
|
-
|
|
54
|
-
export {
|
|
55
|
-
DEFAULT_ANIMATION_STYLES as IMAGE_TO_VIDEO_ANIMATION_STYLES,
|
|
56
|
-
DEFAULT_ANIMATION_STYLE_ID as IMAGE_TO_VIDEO_DEFAULT_ANIMATION,
|
|
57
|
-
DEFAULT_MUSIC_MOODS as IMAGE_TO_VIDEO_MUSIC_MOODS,
|
|
58
|
-
DEFAULT_MUSIC_MOOD_ID as IMAGE_TO_VIDEO_DEFAULT_MUSIC,
|
|
59
|
-
DEFAULT_DURATION_OPTIONS as IMAGE_TO_VIDEO_DURATION_OPTIONS,
|
|
60
|
-
DEFAULT_VIDEO_DURATION as IMAGE_TO_VIDEO_DEFAULT_DURATION,
|
|
61
|
-
DEFAULT_FORM_VALUES as IMAGE_TO_VIDEO_FORM_DEFAULTS,
|
|
62
|
-
DEFAULT_FORM_CONFIG as IMAGE_TO_VIDEO_CONFIG,
|
|
63
|
-
} from "./domain";
|
|
64
|
-
|
|
65
|
-
// =============================================================================
|
|
66
|
-
// INFRASTRUCTURE LAYER
|
|
67
|
-
// =============================================================================
|
|
68
|
-
|
|
69
|
-
export { executeImageToVideo, hasImageToVideoSupport } from "./infrastructure";
|
|
70
|
-
export type { ExecuteImageToVideoOptions } from "./infrastructure";
|
|
71
|
-
|
|
72
|
-
// =============================================================================
|
|
73
|
-
// PRESENTATION LAYER - Hooks
|
|
74
|
-
// =============================================================================
|
|
75
|
-
|
|
76
|
-
export {
|
|
77
|
-
useImageToVideoFormState,
|
|
78
|
-
useImageToVideoGeneration,
|
|
79
|
-
useImageToVideoForm,
|
|
80
|
-
} from "./presentation";
|
|
81
|
-
export type {
|
|
82
|
-
UseImageToVideoFormStateOptions,
|
|
83
|
-
UseImageToVideoFormStateReturn,
|
|
84
|
-
UseImageToVideoGenerationOptions,
|
|
85
|
-
UseImageToVideoGenerationReturn,
|
|
86
|
-
UseImageToVideoFormOptions,
|
|
87
|
-
UseImageToVideoFormReturn,
|
|
88
|
-
} from "./presentation";
|
|
89
|
-
|
|
90
|
-
// Provider-based Feature Hook
|
|
91
|
-
export { useImageToVideoFeature } from "./presentation";
|
|
92
|
-
export type {
|
|
93
|
-
UseImageToVideoFeatureProps,
|
|
94
|
-
UseImageToVideoFeatureReturn,
|
|
95
|
-
} from "./presentation";
|
|
96
|
-
|
|
97
|
-
// =============================================================================
|
|
98
|
-
// PRESENTATION LAYER - Components
|
|
99
|
-
// =============================================================================
|
|
100
|
-
|
|
101
|
-
export {
|
|
102
|
-
ImageToVideoAnimationStyleSelector,
|
|
103
|
-
ImageToVideoDurationSelector,
|
|
104
|
-
ImageToVideoMusicMoodSelector,
|
|
105
|
-
ImageToVideoSelectionGrid,
|
|
106
|
-
ImageToVideoGenerateButton,
|
|
107
|
-
} from "./presentation";
|
|
108
|
-
|
|
109
|
-
export type {
|
|
110
|
-
ImageToVideoAnimationStyleSelectorProps,
|
|
111
|
-
ImageToVideoDurationSelectorProps,
|
|
112
|
-
ImageToVideoMusicMoodSelectorProps,
|
|
113
|
-
ImageToVideoSelectionGridProps,
|
|
114
|
-
ImageToVideoSelectionGridTranslations,
|
|
115
|
-
ImageToVideoGenerateButtonProps,
|
|
116
|
-
} from "./presentation";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./services";
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Image-to-Video Executor
|
|
3
|
-
* Provider-agnostic image-to-video execution using active AI provider
|
|
4
|
-
* Uses progress mapper for consistent progress reporting
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { providerRegistry } from "../../../../infrastructure/services";
|
|
8
|
-
import { getProgressFromJobStatus } from "../../../../infrastructure/utils";
|
|
9
|
-
import type {
|
|
10
|
-
ImageToVideoRequest,
|
|
11
|
-
ImageToVideoResult,
|
|
12
|
-
ImageToVideoInputBuilder,
|
|
13
|
-
ImageToVideoResultExtractor,
|
|
14
|
-
} from "../../domain/types";
|
|
15
|
-
|
|
16
|
-
declare const __DEV__: boolean;
|
|
17
|
-
|
|
18
|
-
export interface ExecuteImageToVideoOptions {
|
|
19
|
-
model: string;
|
|
20
|
-
buildInput: ImageToVideoInputBuilder;
|
|
21
|
-
extractResult?: ImageToVideoResultExtractor;
|
|
22
|
-
onProgress?: (progress: number) => void;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function defaultExtractResult(
|
|
26
|
-
result: unknown,
|
|
27
|
-
): { videoUrl?: string; thumbnailUrl?: string } | undefined {
|
|
28
|
-
if (typeof result !== "object" || result === null) return undefined;
|
|
29
|
-
|
|
30
|
-
const r = result as Record<string, unknown>;
|
|
31
|
-
|
|
32
|
-
if (typeof r.video === "string") {
|
|
33
|
-
return { videoUrl: r.video };
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (r.video && typeof r.video === "object") {
|
|
37
|
-
const video = r.video as Record<string, unknown>;
|
|
38
|
-
if (typeof video.url === "string") {
|
|
39
|
-
return {
|
|
40
|
-
videoUrl: video.url,
|
|
41
|
-
thumbnailUrl:
|
|
42
|
-
typeof r.thumbnail === "string" ? r.thumbnail : undefined,
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return undefined;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export async function executeImageToVideo(
|
|
51
|
-
request: ImageToVideoRequest,
|
|
52
|
-
options: ExecuteImageToVideoOptions,
|
|
53
|
-
): Promise<ImageToVideoResult> {
|
|
54
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
55
|
-
|
|
56
|
-
console.log("[ImageToVideoExecutor] executeImageToVideo() called");
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const provider = providerRegistry.getActiveProvider();
|
|
60
|
-
|
|
61
|
-
if (!provider) {
|
|
62
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
63
|
-
|
|
64
|
-
console.error("[ImageToVideoExecutor] No AI provider configured");
|
|
65
|
-
}
|
|
66
|
-
return { success: false, error: "No AI provider configured" };
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
if (!provider.isInitialized()) {
|
|
70
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
71
|
-
|
|
72
|
-
console.error("[ImageToVideoExecutor] AI provider not initialized");
|
|
73
|
-
}
|
|
74
|
-
return { success: false, error: "AI provider not initialized" };
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
if (!request.imageBase64) {
|
|
78
|
-
return { success: false, error: "Image base64 is required" };
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
const { model, buildInput, extractResult, onProgress } = options;
|
|
82
|
-
|
|
83
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
84
|
-
|
|
85
|
-
console.log(`[ImageToVideoExecutor] Provider: ${provider.providerId}, Model: ${model}`);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
try {
|
|
89
|
-
onProgress?.(5);
|
|
90
|
-
|
|
91
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
92
|
-
|
|
93
|
-
console.log("[ImageToVideoExecutor] Starting provider.subscribe()...");
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// Build input directly - let buildInput handle base64 format
|
|
97
|
-
const input = buildInput(request.imageBase64, request.motionPrompt, request.options);
|
|
98
|
-
|
|
99
|
-
// Use subscribe for video generation (long-running operation with queue)
|
|
100
|
-
// subscribe provides progress updates unlike run()
|
|
101
|
-
const result = await provider.subscribe(model, input, {
|
|
102
|
-
onQueueUpdate: (status) => {
|
|
103
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
104
|
-
|
|
105
|
-
console.log("[ImageToVideoExecutor] Queue status:", status.status, "position:", status.queuePosition);
|
|
106
|
-
}
|
|
107
|
-
// Map provider status to progress using centralized mapper
|
|
108
|
-
const progress = getProgressFromJobStatus(status.status);
|
|
109
|
-
onProgress?.(progress);
|
|
110
|
-
},
|
|
111
|
-
timeoutMs: 300000, // 5 minutes timeout for video generation
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
115
|
-
|
|
116
|
-
console.log("[ImageToVideoExecutor] Subscribe resolved, result keys:", result ? Object.keys(result as object) : "null");
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
120
|
-
|
|
121
|
-
console.log("[ImageToVideoExecutor] provider.subscribe() completed");
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
const extractor = extractResult || defaultExtractResult;
|
|
125
|
-
const extracted = extractor(result);
|
|
126
|
-
onProgress?.(100);
|
|
127
|
-
|
|
128
|
-
if (!extracted?.videoUrl) {
|
|
129
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
130
|
-
|
|
131
|
-
console.error("[ImageToVideoExecutor] No video URL in response");
|
|
132
|
-
}
|
|
133
|
-
return { success: false, error: "No video in response" };
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
return {
|
|
137
|
-
success: true,
|
|
138
|
-
videoUrl: extracted.videoUrl,
|
|
139
|
-
thumbnailUrl: extracted.thumbnailUrl,
|
|
140
|
-
};
|
|
141
|
-
} catch (error) {
|
|
142
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
143
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
144
|
-
|
|
145
|
-
console.error("[ImageToVideoExecutor] Error:", message);
|
|
146
|
-
}
|
|
147
|
-
return { success: false, error: message };
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export function hasImageToVideoSupport(): boolean {
|
|
152
|
-
const provider = providerRegistry.getActiveProvider();
|
|
153
|
-
return provider !== null && provider.isInitialized();
|
|
154
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AddMoreCard Component
|
|
3
|
-
* Displays "Add More" button in the image grid
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React from "react";
|
|
7
|
-
import { TouchableOpacity } from "react-native";
|
|
8
|
-
import {
|
|
9
|
-
AtomicIcon,
|
|
10
|
-
AtomicText,
|
|
11
|
-
useAppDesignTokens,
|
|
12
|
-
} from "@umituz/react-native-design-system";
|
|
13
|
-
import type { ImageSelectionGridStyles } from "./ImageSelectionGrid.styles";
|
|
14
|
-
|
|
15
|
-
interface AddMoreCardProps {
|
|
16
|
-
styles: ImageSelectionGridStyles;
|
|
17
|
-
addMoreText: string;
|
|
18
|
-
onPress: () => void;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function AddMoreCard({
|
|
22
|
-
styles,
|
|
23
|
-
addMoreText,
|
|
24
|
-
onPress,
|
|
25
|
-
}: AddMoreCardProps) {
|
|
26
|
-
const tokens = useAppDesignTokens();
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<TouchableOpacity
|
|
30
|
-
style={[
|
|
31
|
-
styles.addMoreCard,
|
|
32
|
-
{
|
|
33
|
-
backgroundColor: tokens.colors.surface,
|
|
34
|
-
borderColor: tokens.colors.borderLight,
|
|
35
|
-
},
|
|
36
|
-
]}
|
|
37
|
-
onPress={onPress}
|
|
38
|
-
activeOpacity={0.7}
|
|
39
|
-
>
|
|
40
|
-
<AtomicIcon name="add" size="lg" color="primary" />
|
|
41
|
-
<AtomicText
|
|
42
|
-
type="labelSmall"
|
|
43
|
-
style={[
|
|
44
|
-
styles.addMoreText,
|
|
45
|
-
{ color: tokens.colors.primary },
|
|
46
|
-
]}
|
|
47
|
-
>
|
|
48
|
-
{addMoreText}
|
|
49
|
-
</AtomicText>
|
|
50
|
-
</TouchableOpacity>
|
|
51
|
-
);
|
|
52
|
-
}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Animation Style Selector Component
|
|
3
|
-
* Generic component for animation style selection
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React from "react";
|
|
7
|
-
import { View, TouchableOpacity, StyleSheet } from "react-native";
|
|
8
|
-
import {
|
|
9
|
-
AtomicText,
|
|
10
|
-
AtomicIcon,
|
|
11
|
-
useAppDesignTokens,
|
|
12
|
-
} from "@umituz/react-native-design-system";
|
|
13
|
-
import type { AnimationStyle, AnimationStyleId } from "../../domain/types";
|
|
14
|
-
|
|
15
|
-
export interface AnimationStyleSelectorProps {
|
|
16
|
-
styles: AnimationStyle[];
|
|
17
|
-
selectedStyle: AnimationStyleId;
|
|
18
|
-
onStyleSelect: (styleId: AnimationStyleId) => void;
|
|
19
|
-
label: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const AnimationStyleSelector: React.FC<AnimationStyleSelectorProps> = ({
|
|
23
|
-
styles,
|
|
24
|
-
selectedStyle,
|
|
25
|
-
onStyleSelect,
|
|
26
|
-
label,
|
|
27
|
-
}) => {
|
|
28
|
-
const tokens = useAppDesignTokens();
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<View style={componentStyles.section}>
|
|
32
|
-
<AtomicText
|
|
33
|
-
type="bodyMedium"
|
|
34
|
-
style={[componentStyles.label, { color: tokens.colors.textPrimary }]}
|
|
35
|
-
>
|
|
36
|
-
{label}
|
|
37
|
-
</AtomicText>
|
|
38
|
-
{styles.map((style) => {
|
|
39
|
-
const isSelected = selectedStyle === style.id;
|
|
40
|
-
return (
|
|
41
|
-
<TouchableOpacity
|
|
42
|
-
key={style.id}
|
|
43
|
-
style={[
|
|
44
|
-
componentStyles.card,
|
|
45
|
-
{
|
|
46
|
-
backgroundColor: isSelected
|
|
47
|
-
? tokens.colors.primary + "20"
|
|
48
|
-
: tokens.colors.surface,
|
|
49
|
-
borderColor: isSelected
|
|
50
|
-
? tokens.colors.primary
|
|
51
|
-
: tokens.colors.borderLight,
|
|
52
|
-
},
|
|
53
|
-
]}
|
|
54
|
-
onPress={() => onStyleSelect(style.id)}
|
|
55
|
-
activeOpacity={0.7}
|
|
56
|
-
>
|
|
57
|
-
<View style={componentStyles.cardContent}>
|
|
58
|
-
<View
|
|
59
|
-
style={[
|
|
60
|
-
componentStyles.iconContainer,
|
|
61
|
-
{
|
|
62
|
-
backgroundColor: isSelected
|
|
63
|
-
? tokens.colors.primary
|
|
64
|
-
: tokens.colors.primary + "20",
|
|
65
|
-
},
|
|
66
|
-
]}
|
|
67
|
-
>
|
|
68
|
-
<AtomicIcon
|
|
69
|
-
name={style.icon as never}
|
|
70
|
-
size="md"
|
|
71
|
-
color={isSelected ? "onSurface" : "primary"}
|
|
72
|
-
/>
|
|
73
|
-
</View>
|
|
74
|
-
<View style={componentStyles.textContainer}>
|
|
75
|
-
<AtomicText
|
|
76
|
-
type="bodyMedium"
|
|
77
|
-
style={[
|
|
78
|
-
componentStyles.styleName,
|
|
79
|
-
{ color: tokens.colors.textPrimary },
|
|
80
|
-
]}
|
|
81
|
-
>
|
|
82
|
-
{style.name}
|
|
83
|
-
</AtomicText>
|
|
84
|
-
<AtomicText
|
|
85
|
-
type="labelSmall"
|
|
86
|
-
style={{ color: tokens.colors.textSecondary }}
|
|
87
|
-
>
|
|
88
|
-
{style.description}
|
|
89
|
-
</AtomicText>
|
|
90
|
-
</View>
|
|
91
|
-
{isSelected && (
|
|
92
|
-
<AtomicIcon name="checkmark-outline" size="md" color="primary" />
|
|
93
|
-
)}
|
|
94
|
-
</View>
|
|
95
|
-
</TouchableOpacity>
|
|
96
|
-
);
|
|
97
|
-
})}
|
|
98
|
-
</View>
|
|
99
|
-
);
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
const componentStyles = StyleSheet.create({
|
|
103
|
-
section: {
|
|
104
|
-
padding: 16,
|
|
105
|
-
marginBottom: 8,
|
|
106
|
-
},
|
|
107
|
-
label: {
|
|
108
|
-
fontWeight: "600",
|
|
109
|
-
marginBottom: 12,
|
|
110
|
-
},
|
|
111
|
-
card: {
|
|
112
|
-
padding: 16,
|
|
113
|
-
borderRadius: 12,
|
|
114
|
-
borderWidth: 2,
|
|
115
|
-
marginBottom: 12,
|
|
116
|
-
},
|
|
117
|
-
cardContent: {
|
|
118
|
-
flexDirection: "row",
|
|
119
|
-
alignItems: "center",
|
|
120
|
-
},
|
|
121
|
-
iconContainer: {
|
|
122
|
-
width: 48,
|
|
123
|
-
height: 48,
|
|
124
|
-
borderRadius: 24,
|
|
125
|
-
alignItems: "center",
|
|
126
|
-
justifyContent: "center",
|
|
127
|
-
},
|
|
128
|
-
textContainer: {
|
|
129
|
-
flex: 1,
|
|
130
|
-
marginLeft: 12,
|
|
131
|
-
},
|
|
132
|
-
styleName: {
|
|
133
|
-
fontWeight: "600",
|
|
134
|
-
},
|
|
135
|
-
});
|