@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,239 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CoupleFutureWizard
|
|
3
|
-
* Complete wizard component for couple future generation flow
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React, { useCallback, useMemo, useEffect } from "react";
|
|
7
|
-
import { View, StyleSheet } from "react-native";
|
|
8
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
9
|
-
import { useFlow, resetFlowStore } from "../../../../infrastructure/flow";
|
|
10
|
-
import { StepType } from "../../../../domain/entities/flow-config.types";
|
|
11
|
-
import type { StepDefinition } from "../../../../domain/entities/flow-config.types";
|
|
12
|
-
import type { CoupleFutureWizardProps } from "../../domain/wizard.types";
|
|
13
|
-
import { PartnerStepScreen } from "../../../partner-upload";
|
|
14
|
-
import { ScenarioPreviewScreen } from "../../../scenarios";
|
|
15
|
-
import { GeneratingStepContent } from "./GeneratingStepContent";
|
|
16
|
-
|
|
17
|
-
const createStepDefinitions = (
|
|
18
|
-
config: CoupleFutureWizardProps["config"],
|
|
19
|
-
): readonly StepDefinition[] => {
|
|
20
|
-
return config.steps.map((step) => ({
|
|
21
|
-
id: step.id,
|
|
22
|
-
type: step.type,
|
|
23
|
-
required: step.enabled !== false,
|
|
24
|
-
}));
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const CoupleFutureWizard: React.FC<CoupleFutureWizardProps> = ({
|
|
28
|
-
config,
|
|
29
|
-
translations,
|
|
30
|
-
data,
|
|
31
|
-
callbacks,
|
|
32
|
-
t,
|
|
33
|
-
}) => {
|
|
34
|
-
const tokens = useAppDesignTokens();
|
|
35
|
-
|
|
36
|
-
// DEBUG: Log every render
|
|
37
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
38
|
-
console.log("[CoupleFutureWizard] RENDER", {
|
|
39
|
-
hasData: !!data,
|
|
40
|
-
hasSelectedScenario: !!data.selectedScenario,
|
|
41
|
-
scenarioId: data.selectedScenario?.id,
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const stepDefinitions = useMemo(
|
|
46
|
-
() => createStepDefinitions(config),
|
|
47
|
-
[config],
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
// Determine initial step: skip SCENARIO_SELECTION if scenario is pre-selected
|
|
51
|
-
const initialStepIndex = useMemo(() => {
|
|
52
|
-
return data.selectedScenario ? 1 : 0;
|
|
53
|
-
}, [data.selectedScenario]);
|
|
54
|
-
|
|
55
|
-
const flow = useFlow({
|
|
56
|
-
steps: stepDefinitions,
|
|
57
|
-
initialStepIndex,
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
// DEBUG: Log flow state
|
|
61
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
62
|
-
console.log("[CoupleFutureWizard] FLOW STATE", {
|
|
63
|
-
currentStepIndex: flow.currentStepIndex,
|
|
64
|
-
currentStepId: flow.currentStep?.id,
|
|
65
|
-
currentStepType: flow.currentStep?.type,
|
|
66
|
-
totalSteps: stepDefinitions.length,
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// Notify parent app when step changes
|
|
71
|
-
// NOTE: Do NOT include callbacks in dependencies - causes infinite loop!
|
|
72
|
-
// Parent app re-renders when onStepChange updates state, which recreates callbacks,
|
|
73
|
-
// which would retrigger this effect, creating infinite loop.
|
|
74
|
-
useEffect(() => {
|
|
75
|
-
if (flow.currentStep && callbacks?.onStepChange) {
|
|
76
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
77
|
-
console.log("[CoupleFutureWizard] Step changed", {
|
|
78
|
-
stepId: flow.currentStep.id,
|
|
79
|
-
stepType: flow.currentStep.type,
|
|
80
|
-
currentStepIndex: flow.currentStepIndex,
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
callbacks.onStepChange(flow.currentStep.id, flow.currentStep.type);
|
|
84
|
-
}
|
|
85
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
86
|
-
}, [flow.currentStep, flow.currentStepIndex]);
|
|
87
|
-
|
|
88
|
-
const handleScenarioPreviewContinue = useCallback(() => {
|
|
89
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
90
|
-
console.log("[CoupleFutureWizard] Preview Continue clicked");
|
|
91
|
-
}
|
|
92
|
-
// No auth check needed here - just proceed to photo upload
|
|
93
|
-
flow.nextStep();
|
|
94
|
-
}, [flow]);
|
|
95
|
-
|
|
96
|
-
const handlePartnerAContinue = useCallback(
|
|
97
|
-
(image: { uri: string; base64: string; mimeType: string }, name?: string) => {
|
|
98
|
-
flow.setPartnerImage("A", image);
|
|
99
|
-
if (name) flow.setPartnerName("A", name);
|
|
100
|
-
callbacks?.onPartnerUpload?.("A", image);
|
|
101
|
-
flow.nextStep();
|
|
102
|
-
},
|
|
103
|
-
[flow, callbacks],
|
|
104
|
-
);
|
|
105
|
-
|
|
106
|
-
const handlePartnerBContinue = useCallback(
|
|
107
|
-
(image: { uri: string; base64: string; mimeType: string }, name?: string) => {
|
|
108
|
-
flow.setPartnerImage("B", image);
|
|
109
|
-
if (name) flow.setPartnerName("B", name);
|
|
110
|
-
callbacks?.onPartnerUpload?.("B", image);
|
|
111
|
-
|
|
112
|
-
// Check auth/credits BEFORE starting generation (this consumes a credit)
|
|
113
|
-
const checkFeature = callbacks?.requireFeature;
|
|
114
|
-
if (checkFeature) {
|
|
115
|
-
checkFeature(() => {
|
|
116
|
-
flow.startGeneration();
|
|
117
|
-
callbacks?.onGenerationStart?.();
|
|
118
|
-
});
|
|
119
|
-
} else {
|
|
120
|
-
flow.startGeneration();
|
|
121
|
-
callbacks?.onGenerationStart?.();
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
[flow, callbacks],
|
|
125
|
-
);
|
|
126
|
-
|
|
127
|
-
const renderCurrentStep = useCallback(() => {
|
|
128
|
-
const step = flow.currentStep;
|
|
129
|
-
if (!step) {
|
|
130
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
131
|
-
console.log("[CoupleFutureWizard] renderCurrentStep: NO STEP");
|
|
132
|
-
}
|
|
133
|
-
return null;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
137
|
-
console.log("[CoupleFutureWizard] renderCurrentStep", {
|
|
138
|
-
stepId: step.id,
|
|
139
|
-
stepType: step.type,
|
|
140
|
-
stepIndex: flow.currentStepIndex,
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
switch (step.type) {
|
|
145
|
-
case StepType.SCENARIO_SELECTION:
|
|
146
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
147
|
-
console.log("[CoupleFutureWizard] Rendering SCENARIO_SELECTION (null)");
|
|
148
|
-
}
|
|
149
|
-
return null; // Rendered by parent via CategoryNavigationContainer
|
|
150
|
-
|
|
151
|
-
case StepType.SCENARIO_PREVIEW:
|
|
152
|
-
const scenario = flow.selectedCategory || data.selectedScenario;
|
|
153
|
-
const handlePreviewBack = () => {
|
|
154
|
-
// If we came from CategoryNavigationContainer, reset to SCENARIO step
|
|
155
|
-
if (data.selectedScenario && !flow.selectedCategory) {
|
|
156
|
-
callbacks?.onBackToScenarioSelection?.();
|
|
157
|
-
} else {
|
|
158
|
-
flow.previousStep();
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
return (
|
|
162
|
-
<ScenarioPreviewScreen
|
|
163
|
-
scenario={scenario as never}
|
|
164
|
-
translations={translations.scenarioPreview as never}
|
|
165
|
-
onBack={handlePreviewBack}
|
|
166
|
-
onContinue={handleScenarioPreviewContinue}
|
|
167
|
-
t={t}
|
|
168
|
-
/>
|
|
169
|
-
);
|
|
170
|
-
|
|
171
|
-
case StepType.PARTNER_UPLOAD:
|
|
172
|
-
const isPartnerA = step.id.includes("A") || step.id === "PARTNER_A";
|
|
173
|
-
const partnerTranslations = isPartnerA
|
|
174
|
-
? translations.partnerA
|
|
175
|
-
: translations.partnerB;
|
|
176
|
-
const partnerConfig = isPartnerA ? config.partnerA : config.partnerB;
|
|
177
|
-
|
|
178
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
179
|
-
console.log("[CoupleFutureWizard] Rendering PartnerStepScreen", {
|
|
180
|
-
isPartnerA,
|
|
181
|
-
stepId: step.id,
|
|
182
|
-
hasConfig: !!partnerConfig,
|
|
183
|
-
hasTranslations: !!partnerTranslations,
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
return (
|
|
188
|
-
<PartnerStepScreen
|
|
189
|
-
key={isPartnerA ? "a" : "b"}
|
|
190
|
-
translations={partnerTranslations as never}
|
|
191
|
-
t={t}
|
|
192
|
-
initialName=""
|
|
193
|
-
config={{
|
|
194
|
-
showFaceDetection: partnerConfig?.showFaceDetection ?? false,
|
|
195
|
-
showNameInput: partnerConfig?.showNameInput ?? false,
|
|
196
|
-
showPhotoTips: partnerConfig?.showPhotoTips ?? true,
|
|
197
|
-
maxFileSizeMB: 10,
|
|
198
|
-
maxNameLength: 30,
|
|
199
|
-
}}
|
|
200
|
-
onBack={flow.previousStep}
|
|
201
|
-
onContinue={isPartnerA ? handlePartnerAContinue as never : handlePartnerBContinue as never}
|
|
202
|
-
/>
|
|
203
|
-
);
|
|
204
|
-
|
|
205
|
-
case StepType.GENERATING:
|
|
206
|
-
return (
|
|
207
|
-
<GeneratingStepContent
|
|
208
|
-
progress={flow.generationProgress}
|
|
209
|
-
title={translations.generator.title}
|
|
210
|
-
message={translations.generator.waitMessage}
|
|
211
|
-
hint={translations.generator.hint}
|
|
212
|
-
/>
|
|
213
|
-
);
|
|
214
|
-
|
|
215
|
-
default:
|
|
216
|
-
return null;
|
|
217
|
-
}
|
|
218
|
-
}, [
|
|
219
|
-
flow,
|
|
220
|
-
config,
|
|
221
|
-
translations,
|
|
222
|
-
t,
|
|
223
|
-
handleScenarioPreviewContinue,
|
|
224
|
-
handlePartnerAContinue,
|
|
225
|
-
handlePartnerBContinue,
|
|
226
|
-
]);
|
|
227
|
-
|
|
228
|
-
return (
|
|
229
|
-
<View style={[styles.container, { backgroundColor: tokens.colors.backgroundPrimary }]}>
|
|
230
|
-
{renderCurrentStep()}
|
|
231
|
-
</View>
|
|
232
|
-
);
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
export { resetFlowStore as resetCoupleFutureWizard };
|
|
236
|
-
|
|
237
|
-
const styles = StyleSheet.create({
|
|
238
|
-
container: { flex: 1 },
|
|
239
|
-
});
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GeneratingStepContent
|
|
3
|
-
* Display component for generation progress
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React from "react";
|
|
7
|
-
import { View, StyleSheet } from "react-native";
|
|
8
|
-
import {
|
|
9
|
-
AtomicText,
|
|
10
|
-
useAppDesignTokens,
|
|
11
|
-
} from "@umituz/react-native-design-system";
|
|
12
|
-
import { GenerationProgressBar } from "../../../../presentation/components";
|
|
13
|
-
|
|
14
|
-
interface GeneratingStepContentProps {
|
|
15
|
-
readonly progress: number;
|
|
16
|
-
readonly title: string;
|
|
17
|
-
readonly message: string;
|
|
18
|
-
readonly hint?: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const GeneratingStepContent: React.FC<GeneratingStepContentProps> = ({
|
|
22
|
-
progress,
|
|
23
|
-
title,
|
|
24
|
-
message,
|
|
25
|
-
hint,
|
|
26
|
-
}) => {
|
|
27
|
-
const tokens = useAppDesignTokens();
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<View style={[styles.container, { backgroundColor: tokens.colors.backgroundPrimary }]}>
|
|
31
|
-
<View style={styles.content}>
|
|
32
|
-
<AtomicText type="headlineMedium" style={styles.title}>
|
|
33
|
-
{title}
|
|
34
|
-
</AtomicText>
|
|
35
|
-
|
|
36
|
-
<View style={styles.progressContainer}>
|
|
37
|
-
<GenerationProgressBar progress={progress} />
|
|
38
|
-
</View>
|
|
39
|
-
|
|
40
|
-
<AtomicText
|
|
41
|
-
type="bodyMedium"
|
|
42
|
-
style={[styles.message, { color: tokens.colors.textSecondary }]}
|
|
43
|
-
>
|
|
44
|
-
{message}
|
|
45
|
-
</AtomicText>
|
|
46
|
-
|
|
47
|
-
{hint ? (
|
|
48
|
-
<AtomicText
|
|
49
|
-
type="labelSmall"
|
|
50
|
-
style={[styles.hint, { color: tokens.colors.textTertiary }]}
|
|
51
|
-
>
|
|
52
|
-
{hint}
|
|
53
|
-
</AtomicText>
|
|
54
|
-
) : null}
|
|
55
|
-
</View>
|
|
56
|
-
</View>
|
|
57
|
-
);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const styles = StyleSheet.create({
|
|
61
|
-
container: {
|
|
62
|
-
flex: 1,
|
|
63
|
-
justifyContent: "center",
|
|
64
|
-
alignItems: "center",
|
|
65
|
-
},
|
|
66
|
-
content: {
|
|
67
|
-
width: "100%",
|
|
68
|
-
paddingHorizontal: 24,
|
|
69
|
-
alignItems: "center",
|
|
70
|
-
},
|
|
71
|
-
title: {
|
|
72
|
-
textAlign: "center",
|
|
73
|
-
marginBottom: 32,
|
|
74
|
-
},
|
|
75
|
-
progressContainer: {
|
|
76
|
-
width: "100%",
|
|
77
|
-
marginBottom: 24,
|
|
78
|
-
},
|
|
79
|
-
message: {
|
|
80
|
-
textAlign: "center",
|
|
81
|
-
marginBottom: 16,
|
|
82
|
-
},
|
|
83
|
-
hint: {
|
|
84
|
-
textAlign: "center",
|
|
85
|
-
},
|
|
86
|
-
});
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Romantic Mood Selector Component
|
|
3
|
-
* Multi-select mood selector with intensity control
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React from "react";
|
|
7
|
-
import { View, TouchableOpacity, StyleSheet, ScrollView } from "react-native";
|
|
8
|
-
import {
|
|
9
|
-
AtomicText,
|
|
10
|
-
AtomicIcon,
|
|
11
|
-
useAppDesignTokens,
|
|
12
|
-
} from "@umituz/react-native-design-system";
|
|
13
|
-
import type { CoupleFeatureSelection } from "../../domain/types";
|
|
14
|
-
import { ROMANTIC_MOOD_OPTIONS } from "../../infrastructure/coupleFeatureRegistry";
|
|
15
|
-
|
|
16
|
-
export interface RomanticMoodSelectorProps {
|
|
17
|
-
selection: CoupleFeatureSelection;
|
|
18
|
-
onSelectionChange: (selection: CoupleFeatureSelection) => void;
|
|
19
|
-
translationPrefix: string;
|
|
20
|
-
t: (key: string) => string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const RomanticMoodSelector: React.FC<RomanticMoodSelectorProps> = ({
|
|
24
|
-
selection,
|
|
25
|
-
onSelectionChange,
|
|
26
|
-
translationPrefix,
|
|
27
|
-
t,
|
|
28
|
-
}) => {
|
|
29
|
-
const tokens = useAppDesignTokens();
|
|
30
|
-
const selectedMoods = selection.romanticMoods || [];
|
|
31
|
-
const intensity = selection.romanticIntensity || 70;
|
|
32
|
-
|
|
33
|
-
const handleMoodToggle = (moodId: string) => {
|
|
34
|
-
const newMoods = selectedMoods.includes(moodId)
|
|
35
|
-
? selectedMoods.filter((id) => id !== moodId)
|
|
36
|
-
: [...selectedMoods, moodId];
|
|
37
|
-
onSelectionChange({ ...selection, romanticMoods: newMoods });
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const handleIntensityChange = (value: number) => {
|
|
41
|
-
onSelectionChange({ ...selection, romanticIntensity: value });
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
<ScrollView style={s.container}>
|
|
46
|
-
<View style={s.section}>
|
|
47
|
-
<AtomicText
|
|
48
|
-
type="bodyMedium"
|
|
49
|
-
style={[s.title, { color: tokens.colors.textPrimary }]}
|
|
50
|
-
>
|
|
51
|
-
{t(`${translationPrefix}.selectMoods`)}
|
|
52
|
-
</AtomicText>
|
|
53
|
-
|
|
54
|
-
<View style={s.grid}>
|
|
55
|
-
{ROMANTIC_MOOD_OPTIONS.map((mood) => {
|
|
56
|
-
const isSelected = selectedMoods.includes(mood.id);
|
|
57
|
-
return (
|
|
58
|
-
<TouchableOpacity
|
|
59
|
-
key={mood.id}
|
|
60
|
-
style={[
|
|
61
|
-
s.card,
|
|
62
|
-
{
|
|
63
|
-
backgroundColor: isSelected
|
|
64
|
-
? `${tokens.colors.primary}15`
|
|
65
|
-
: tokens.colors.surface,
|
|
66
|
-
borderColor: isSelected
|
|
67
|
-
? tokens.colors.primary
|
|
68
|
-
: tokens.colors.borderLight,
|
|
69
|
-
},
|
|
70
|
-
]}
|
|
71
|
-
onPress={() => handleMoodToggle(mood.id)}
|
|
72
|
-
>
|
|
73
|
-
<AtomicIcon
|
|
74
|
-
name={mood.iconKey as never}
|
|
75
|
-
size="md"
|
|
76
|
-
color={isSelected ? "primary" : "textSecondary"}
|
|
77
|
-
/>
|
|
78
|
-
<AtomicText
|
|
79
|
-
type="labelSmall"
|
|
80
|
-
style={[
|
|
81
|
-
s.label,
|
|
82
|
-
{
|
|
83
|
-
color: isSelected
|
|
84
|
-
? tokens.colors.primary
|
|
85
|
-
: tokens.colors.textSecondary,
|
|
86
|
-
fontWeight: isSelected ? "600" : "400",
|
|
87
|
-
},
|
|
88
|
-
]}
|
|
89
|
-
>
|
|
90
|
-
{t(`${translationPrefix}.moods.${mood.labelKey}`)}
|
|
91
|
-
</AtomicText>
|
|
92
|
-
</TouchableOpacity>
|
|
93
|
-
);
|
|
94
|
-
})}
|
|
95
|
-
</View>
|
|
96
|
-
</View>
|
|
97
|
-
|
|
98
|
-
<View style={s.section}>
|
|
99
|
-
<View style={s.header}>
|
|
100
|
-
<AtomicText type="bodyMedium" style={[s.title, { color: tokens.colors.textPrimary }]}>
|
|
101
|
-
{t(`${translationPrefix}.intensity`)}
|
|
102
|
-
</AtomicText>
|
|
103
|
-
<AtomicText type="bodyMedium" style={{ color: tokens.colors.primary, fontWeight: "600" }}>
|
|
104
|
-
{intensity}%
|
|
105
|
-
</AtomicText>
|
|
106
|
-
</View>
|
|
107
|
-
|
|
108
|
-
<View style={s.slider}>
|
|
109
|
-
{[25, 50, 75, 100].map((value) => (
|
|
110
|
-
<TouchableOpacity
|
|
111
|
-
key={value}
|
|
112
|
-
style={[
|
|
113
|
-
s.button,
|
|
114
|
-
{
|
|
115
|
-
backgroundColor: intensity === value ? tokens.colors.primary : tokens.colors.surface,
|
|
116
|
-
borderColor: intensity === value ? tokens.colors.primary : tokens.colors.borderLight,
|
|
117
|
-
},
|
|
118
|
-
]}
|
|
119
|
-
onPress={() => handleIntensityChange(value)}
|
|
120
|
-
>
|
|
121
|
-
<AtomicText
|
|
122
|
-
type="labelSmall"
|
|
123
|
-
style={{
|
|
124
|
-
color: intensity === value ? tokens.colors.onPrimary : tokens.colors.textSecondary,
|
|
125
|
-
}}
|
|
126
|
-
>
|
|
127
|
-
{value}%
|
|
128
|
-
</AtomicText>
|
|
129
|
-
</TouchableOpacity>
|
|
130
|
-
))}
|
|
131
|
-
</View>
|
|
132
|
-
</View>
|
|
133
|
-
</ScrollView>
|
|
134
|
-
);
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
const s = StyleSheet.create({
|
|
138
|
-
container: { flex: 1 },
|
|
139
|
-
section: { padding: 16, marginBottom: 8 },
|
|
140
|
-
title: { fontWeight: "600", marginBottom: 12 },
|
|
141
|
-
grid: { flexDirection: "row", flexWrap: "wrap", gap: 12 },
|
|
142
|
-
card: { width: "22%", aspectRatio: 1, padding: 8, borderRadius: 12, borderWidth: 2, alignItems: "center", justifyContent: "center" },
|
|
143
|
-
label: { marginTop: 4, textAlign: "center", fontSize: 10 },
|
|
144
|
-
header: { flexDirection: "row", justifyContent: "space-between", alignItems: "center" },
|
|
145
|
-
slider: { flexDirection: "row", gap: 8, marginTop: 8 },
|
|
146
|
-
button: { flex: 1, padding: 12, borderRadius: 8, borderWidth: 2, alignItems: "center" },
|
|
147
|
-
});
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Wardrobe Selector Component
|
|
3
|
-
* Wardrobe style selector with intensity control
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React from "react";
|
|
7
|
-
import { View, TouchableOpacity, StyleSheet, ScrollView } from "react-native";
|
|
8
|
-
import {
|
|
9
|
-
AtomicText,
|
|
10
|
-
AtomicIcon,
|
|
11
|
-
useAppDesignTokens,
|
|
12
|
-
} from "@umituz/react-native-design-system";
|
|
13
|
-
import type { CoupleFeatureSelection } from "../../domain/types";
|
|
14
|
-
|
|
15
|
-
const WARDROBE_STYLES = [
|
|
16
|
-
{ id: "casual", iconKey: "shirt-outline" },
|
|
17
|
-
{ id: "formal", iconKey: "briefcase-outline" },
|
|
18
|
-
{ id: "sporty", iconKey: "fitness-outline" },
|
|
19
|
-
{ id: "elegant", iconKey: "star-outline" },
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
export interface WardrobeSelectorProps {
|
|
23
|
-
selection: CoupleFeatureSelection;
|
|
24
|
-
onSelectionChange: (selection: CoupleFeatureSelection) => void;
|
|
25
|
-
translationPrefix: string;
|
|
26
|
-
t: (key: string) => string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const WardrobeSelector: React.FC<WardrobeSelectorProps> = ({
|
|
30
|
-
selection,
|
|
31
|
-
onSelectionChange,
|
|
32
|
-
translationPrefix,
|
|
33
|
-
t,
|
|
34
|
-
}) => {
|
|
35
|
-
const tokens = useAppDesignTokens();
|
|
36
|
-
const selectedStyle = selection.wardrobeStyle;
|
|
37
|
-
const intensity = selection.wardrobeIntensity || 70;
|
|
38
|
-
|
|
39
|
-
const handleStyleSelect = (styleId: string) => {
|
|
40
|
-
onSelectionChange({ ...selection, wardrobeStyle: styleId });
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const handleIntensityChange = (value: number) => {
|
|
44
|
-
onSelectionChange({ ...selection, wardrobeIntensity: value });
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<ScrollView style={s.container}>
|
|
49
|
-
<View style={s.section}>
|
|
50
|
-
<AtomicText
|
|
51
|
-
type="bodyMedium"
|
|
52
|
-
style={[s.title, { color: tokens.colors.textPrimary }]}
|
|
53
|
-
>
|
|
54
|
-
{t(`${translationPrefix}.selectStyle`)}
|
|
55
|
-
</AtomicText>
|
|
56
|
-
|
|
57
|
-
<View style={s.grid}>
|
|
58
|
-
{WARDROBE_STYLES.map((style) => {
|
|
59
|
-
const isSelected = selectedStyle === style.id;
|
|
60
|
-
return (
|
|
61
|
-
<TouchableOpacity
|
|
62
|
-
key={style.id}
|
|
63
|
-
style={[
|
|
64
|
-
s.card,
|
|
65
|
-
{
|
|
66
|
-
backgroundColor: isSelected
|
|
67
|
-
? `${tokens.colors.primary}15`
|
|
68
|
-
: tokens.colors.surface,
|
|
69
|
-
borderColor: isSelected
|
|
70
|
-
? tokens.colors.primary
|
|
71
|
-
: tokens.colors.borderLight,
|
|
72
|
-
},
|
|
73
|
-
]}
|
|
74
|
-
onPress={() => handleStyleSelect(style.id)}
|
|
75
|
-
>
|
|
76
|
-
<AtomicIcon
|
|
77
|
-
name={style.iconKey as never}
|
|
78
|
-
size="lg"
|
|
79
|
-
color={isSelected ? "primary" : "textSecondary"}
|
|
80
|
-
/>
|
|
81
|
-
<AtomicText
|
|
82
|
-
type="labelMedium"
|
|
83
|
-
style={[
|
|
84
|
-
s.label,
|
|
85
|
-
{
|
|
86
|
-
color: isSelected
|
|
87
|
-
? tokens.colors.primary
|
|
88
|
-
: tokens.colors.textSecondary,
|
|
89
|
-
fontWeight: isSelected ? "600" : "400",
|
|
90
|
-
},
|
|
91
|
-
]}
|
|
92
|
-
>
|
|
93
|
-
{t(`${translationPrefix}.styles.${style.id}`)}
|
|
94
|
-
</AtomicText>
|
|
95
|
-
</TouchableOpacity>
|
|
96
|
-
);
|
|
97
|
-
})}
|
|
98
|
-
</View>
|
|
99
|
-
</View>
|
|
100
|
-
|
|
101
|
-
{selectedStyle && (
|
|
102
|
-
<View style={s.section}>
|
|
103
|
-
<View style={s.header}>
|
|
104
|
-
<AtomicText type="bodyMedium" style={[s.title, { color: tokens.colors.textPrimary }]}>
|
|
105
|
-
{t(`${translationPrefix}.intensity`)}
|
|
106
|
-
</AtomicText>
|
|
107
|
-
<AtomicText type="bodyMedium" style={{ color: tokens.colors.primary, fontWeight: "600" }}>
|
|
108
|
-
{intensity}%
|
|
109
|
-
</AtomicText>
|
|
110
|
-
</View>
|
|
111
|
-
|
|
112
|
-
<View style={s.slider}>
|
|
113
|
-
{[25, 50, 75, 100].map((value) => (
|
|
114
|
-
<TouchableOpacity
|
|
115
|
-
key={value}
|
|
116
|
-
style={[s.button, { backgroundColor: intensity === value ? tokens.colors.primary : tokens.colors.surface, borderColor: intensity === value ? tokens.colors.primary : tokens.colors.borderLight }]}
|
|
117
|
-
onPress={() => handleIntensityChange(value)}
|
|
118
|
-
>
|
|
119
|
-
<AtomicText type="labelSmall" style={{ color: intensity === value ? tokens.colors.onPrimary : tokens.colors.textSecondary }}>
|
|
120
|
-
{value}%
|
|
121
|
-
</AtomicText>
|
|
122
|
-
</TouchableOpacity>
|
|
123
|
-
))}
|
|
124
|
-
</View>
|
|
125
|
-
</View>
|
|
126
|
-
)}
|
|
127
|
-
</ScrollView>
|
|
128
|
-
);
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
const s = StyleSheet.create({
|
|
132
|
-
container: { flex: 1 },
|
|
133
|
-
section: { padding: 16, marginBottom: 8 },
|
|
134
|
-
title: { fontWeight: "600", marginBottom: 12 },
|
|
135
|
-
grid: { flexDirection: "row", flexWrap: "wrap", gap: 12 },
|
|
136
|
-
card: { width: "47%", padding: 16, borderRadius: 12, borderWidth: 2, alignItems: "center", justifyContent: "center" },
|
|
137
|
-
label: { marginTop: 8, textAlign: "center" },
|
|
138
|
-
header: { flexDirection: "row", justifyContent: "space-between", alignItems: "center" },
|
|
139
|
-
slider: { flexDirection: "row", gap: 8, marginTop: 8 },
|
|
140
|
-
button: { flex: 1, padding: 12, borderRadius: 8, borderWidth: 2, alignItems: "center" },
|
|
141
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Couple Future Components
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export { RomanticMoodSelector } from "./RomanticMoodSelector";
|
|
6
|
-
export type { RomanticMoodSelectorProps } from "./RomanticMoodSelector";
|
|
7
|
-
export { ArtStyleSelector } from "./ArtStyleSelector";
|
|
8
|
-
export type { ArtStyleSelectorProps } from "./ArtStyleSelector";
|
|
9
|
-
export { ArtistStyleSelector } from "./ArtistStyleSelector";
|
|
10
|
-
export type { ArtistStyleSelectorProps } from "./ArtistStyleSelector";
|
|
11
|
-
export { WardrobeSelector } from "./WardrobeSelector";
|
|
12
|
-
export type { WardrobeSelectorProps } from "./WardrobeSelector";
|