@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,119 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* StyleSelector Component
|
|
3
|
-
* Visual style selection grid for Magic Prompt
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React, { useMemo } from "react";
|
|
7
|
-
import { View, StyleSheet, TouchableOpacity } from "react-native";
|
|
8
|
-
import {
|
|
9
|
-
AtomicText,
|
|
10
|
-
AtomicIcon,
|
|
11
|
-
useAppDesignTokens,
|
|
12
|
-
} from "@umituz/react-native-design-system";
|
|
13
|
-
import type { VisualStyleOption } from "../../domain/types";
|
|
14
|
-
|
|
15
|
-
export interface StyleSelectorProps {
|
|
16
|
-
readonly styles: readonly VisualStyleOption[];
|
|
17
|
-
readonly selectedStyle: string;
|
|
18
|
-
readonly title: string;
|
|
19
|
-
readonly onSelect: (styleId: string) => void;
|
|
20
|
-
readonly t: (key: string) => string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const StyleSelector: React.FC<StyleSelectorProps> = ({
|
|
24
|
-
styles: visualStyles,
|
|
25
|
-
selectedStyle,
|
|
26
|
-
title,
|
|
27
|
-
onSelect,
|
|
28
|
-
t,
|
|
29
|
-
}) => {
|
|
30
|
-
const tokens = useAppDesignTokens();
|
|
31
|
-
|
|
32
|
-
const componentStyles = useMemo(
|
|
33
|
-
() =>
|
|
34
|
-
StyleSheet.create({
|
|
35
|
-
container: {
|
|
36
|
-
marginBottom: tokens.spacing.lg,
|
|
37
|
-
},
|
|
38
|
-
sectionTitle: {
|
|
39
|
-
fontWeight: "700",
|
|
40
|
-
marginBottom: tokens.spacing.sm,
|
|
41
|
-
},
|
|
42
|
-
stylesGrid: {
|
|
43
|
-
flexDirection: "row",
|
|
44
|
-
gap: tokens.spacing.md,
|
|
45
|
-
},
|
|
46
|
-
styleItem: {
|
|
47
|
-
flex: 1,
|
|
48
|
-
alignItems: "center",
|
|
49
|
-
gap: tokens.spacing.xs,
|
|
50
|
-
},
|
|
51
|
-
styleIcon: {
|
|
52
|
-
width: 64,
|
|
53
|
-
height: 64,
|
|
54
|
-
borderRadius: tokens.borders.radius.md,
|
|
55
|
-
alignItems: "center",
|
|
56
|
-
justifyContent: "center",
|
|
57
|
-
},
|
|
58
|
-
styleLabel: {
|
|
59
|
-
textAlign: "center",
|
|
60
|
-
},
|
|
61
|
-
}),
|
|
62
|
-
[tokens],
|
|
63
|
-
);
|
|
64
|
-
|
|
65
|
-
return (
|
|
66
|
-
<View style={componentStyles.container}>
|
|
67
|
-
<AtomicText type="labelLarge" style={componentStyles.sectionTitle}>
|
|
68
|
-
{title}
|
|
69
|
-
</AtomicText>
|
|
70
|
-
<View style={componentStyles.stylesGrid}>
|
|
71
|
-
{visualStyles.map((style) => (
|
|
72
|
-
<TouchableOpacity
|
|
73
|
-
key={style.id}
|
|
74
|
-
style={componentStyles.styleItem}
|
|
75
|
-
onPress={() => onSelect(style.id)}
|
|
76
|
-
>
|
|
77
|
-
<View
|
|
78
|
-
style={[
|
|
79
|
-
componentStyles.styleIcon,
|
|
80
|
-
{
|
|
81
|
-
backgroundColor:
|
|
82
|
-
selectedStyle === style.id
|
|
83
|
-
? tokens.colors.primaryContainer
|
|
84
|
-
: tokens.colors.surface,
|
|
85
|
-
borderWidth: selectedStyle === style.id ? 2 : 1,
|
|
86
|
-
borderColor:
|
|
87
|
-
selectedStyle === style.id
|
|
88
|
-
? tokens.colors.primary
|
|
89
|
-
: tokens.colors.border,
|
|
90
|
-
},
|
|
91
|
-
]}
|
|
92
|
-
>
|
|
93
|
-
<AtomicIcon
|
|
94
|
-
name={style.icon}
|
|
95
|
-
size="md"
|
|
96
|
-
color={selectedStyle === style.id ? "primary" : "textSecondary"}
|
|
97
|
-
/>
|
|
98
|
-
</View>
|
|
99
|
-
<AtomicText
|
|
100
|
-
type="labelSmall"
|
|
101
|
-
style={[
|
|
102
|
-
componentStyles.styleLabel,
|
|
103
|
-
{
|
|
104
|
-
color:
|
|
105
|
-
selectedStyle === style.id
|
|
106
|
-
? tokens.colors.textPrimary
|
|
107
|
-
: tokens.colors.textSecondary,
|
|
108
|
-
fontWeight: selectedStyle === style.id ? "700" : "500",
|
|
109
|
-
},
|
|
110
|
-
]}
|
|
111
|
-
>
|
|
112
|
-
{t(style.labelKey)}
|
|
113
|
-
</AtomicText>
|
|
114
|
-
</TouchableOpacity>
|
|
115
|
-
))}
|
|
116
|
-
</View>
|
|
117
|
-
</View>
|
|
118
|
-
);
|
|
119
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Scenario Components Index
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export { ScenarioHeader } from "./ScenarioHeader";
|
|
6
|
-
export type { ScenarioHeaderProps } from "./ScenarioHeader";
|
|
7
|
-
|
|
8
|
-
export { ScenarioGrid } from "./ScenarioGrid";
|
|
9
|
-
export type { ScenarioGridProps } from "./ScenarioGrid";
|
|
10
|
-
|
|
11
|
-
export { MagicPromptHeadline } from "./MagicPromptHeadline";
|
|
12
|
-
export type { MagicPromptHeadlineProps } from "./MagicPromptHeadline";
|
|
13
|
-
|
|
14
|
-
export { InspirationChips } from "./InspirationChips";
|
|
15
|
-
export type { InspirationChipsProps } from "./InspirationChips";
|
|
16
|
-
|
|
17
|
-
export { StyleSelector } from "./StyleSelector";
|
|
18
|
-
export type { StyleSelectorProps } from "./StyleSelector";
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CategoryNavigationContainer
|
|
3
|
-
* Orchestrates 3-step hierarchical scenario selection flow:
|
|
4
|
-
* Main Category → Sub Category → Scenario List
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import React, { useState, useCallback, useEffect } from "react";
|
|
8
|
-
import type {
|
|
9
|
-
ScenarioData,
|
|
10
|
-
ScenarioMainCategory,
|
|
11
|
-
ScenarioSubCategory,
|
|
12
|
-
} from "../../domain/types";
|
|
13
|
-
import { MainCategoryScreen } from "../screens/MainCategoryScreen";
|
|
14
|
-
import { SubCategoryScreen } from "../screens/SubCategoryScreen";
|
|
15
|
-
import { HierarchicalScenarioListScreen } from "../screens/HierarchicalScenarioListScreen";
|
|
16
|
-
|
|
17
|
-
type NavigationStep = "main_category" | "sub_category" | "scenario_list";
|
|
18
|
-
|
|
19
|
-
export interface CategoryNavigationContainerProps {
|
|
20
|
-
readonly mainCategories: readonly ScenarioMainCategory[];
|
|
21
|
-
readonly subCategories: readonly ScenarioSubCategory[];
|
|
22
|
-
readonly scenarios: readonly ScenarioData[];
|
|
23
|
-
readonly onSelectScenario: (scenarioId: string) => void;
|
|
24
|
-
readonly onBack?: () => void;
|
|
25
|
-
readonly t: (key: string) => string;
|
|
26
|
-
readonly headerTitle?: string;
|
|
27
|
-
readonly headerDescription?: string;
|
|
28
|
-
readonly numColumns?: number;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export const CategoryNavigationContainer: React.FC<
|
|
32
|
-
CategoryNavigationContainerProps
|
|
33
|
-
> = ({
|
|
34
|
-
mainCategories,
|
|
35
|
-
subCategories,
|
|
36
|
-
scenarios,
|
|
37
|
-
onSelectScenario,
|
|
38
|
-
onBack,
|
|
39
|
-
t,
|
|
40
|
-
headerTitle,
|
|
41
|
-
headerDescription,
|
|
42
|
-
numColumns = 2,
|
|
43
|
-
}) => {
|
|
44
|
-
const [currentStep, setCurrentStep] = useState<NavigationStep>("main_category");
|
|
45
|
-
const [selectedMainCategoryId, setSelectedMainCategoryId] = useState<string | null>(null);
|
|
46
|
-
const [selectedSubCategoryId, setSelectedSubCategoryId] = useState<string | null>(null);
|
|
47
|
-
|
|
48
|
-
// Debug: Initial mount
|
|
49
|
-
useEffect(() => {
|
|
50
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
51
|
-
console.log("[CategoryNavigationContainer] Mounted", {
|
|
52
|
-
mainCategoriesCount: mainCategories.length,
|
|
53
|
-
subCategoriesCount: subCategories.length,
|
|
54
|
-
scenariosCount: scenarios.length,
|
|
55
|
-
currentStep,
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
}, []);
|
|
59
|
-
|
|
60
|
-
// Debug: Step changes
|
|
61
|
-
useEffect(() => {
|
|
62
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
63
|
-
console.log("[CategoryNavigationContainer] Step changed", {
|
|
64
|
-
currentStep,
|
|
65
|
-
selectedMainCategoryId,
|
|
66
|
-
selectedSubCategoryId,
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
}, [currentStep, selectedMainCategoryId, selectedSubCategoryId]);
|
|
70
|
-
|
|
71
|
-
const handleSelectMainCategory = useCallback((categoryId: string) => {
|
|
72
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
73
|
-
console.log("[CategoryNavigationContainer] Main category selected", {
|
|
74
|
-
categoryId,
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
setSelectedMainCategoryId(categoryId);
|
|
78
|
-
setCurrentStep("sub_category");
|
|
79
|
-
}, []);
|
|
80
|
-
|
|
81
|
-
const handleSelectSubCategory = useCallback((subCategoryId: string) => {
|
|
82
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
83
|
-
console.log("[CategoryNavigationContainer] Sub category selected", {
|
|
84
|
-
subCategoryId,
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
setSelectedSubCategoryId(subCategoryId);
|
|
88
|
-
setCurrentStep("scenario_list");
|
|
89
|
-
}, []);
|
|
90
|
-
|
|
91
|
-
const handleBackFromSubCategory = useCallback(() => {
|
|
92
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
93
|
-
console.log("[CategoryNavigationContainer] Back from sub category");
|
|
94
|
-
}
|
|
95
|
-
setSelectedMainCategoryId(null);
|
|
96
|
-
setCurrentStep("main_category");
|
|
97
|
-
}, []);
|
|
98
|
-
|
|
99
|
-
const handleBackFromScenarioList = useCallback(() => {
|
|
100
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
101
|
-
console.log("[CategoryNavigationContainer] Back from scenario list");
|
|
102
|
-
}
|
|
103
|
-
setSelectedSubCategoryId(null);
|
|
104
|
-
setCurrentStep("sub_category");
|
|
105
|
-
}, []);
|
|
106
|
-
|
|
107
|
-
const handleBackFromMainCategory = useCallback(() => {
|
|
108
|
-
if (onBack) {
|
|
109
|
-
onBack();
|
|
110
|
-
}
|
|
111
|
-
}, [onBack]);
|
|
112
|
-
|
|
113
|
-
if (currentStep === "main_category") {
|
|
114
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
115
|
-
console.log("[CategoryNavigationContainer] Rendering MainCategoryScreen", {
|
|
116
|
-
mainCategoriesCount: mainCategories.length,
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
return (
|
|
120
|
-
<MainCategoryScreen
|
|
121
|
-
mainCategories={mainCategories}
|
|
122
|
-
onSelectCategory={handleSelectMainCategory}
|
|
123
|
-
onBack={onBack ? handleBackFromMainCategory : undefined}
|
|
124
|
-
t={t}
|
|
125
|
-
headerTitle={headerTitle}
|
|
126
|
-
headerDescription={headerDescription}
|
|
127
|
-
/>
|
|
128
|
-
);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (currentStep === "sub_category" && selectedMainCategoryId) {
|
|
132
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
133
|
-
console.log("[CategoryNavigationContainer] Rendering SubCategoryScreen", {
|
|
134
|
-
selectedMainCategoryId,
|
|
135
|
-
subCategoriesCount: subCategories.length,
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
return (
|
|
139
|
-
<SubCategoryScreen
|
|
140
|
-
mainCategoryId={selectedMainCategoryId}
|
|
141
|
-
subCategories={subCategories}
|
|
142
|
-
onSelectSubCategory={handleSelectSubCategory}
|
|
143
|
-
onBack={handleBackFromSubCategory}
|
|
144
|
-
t={t}
|
|
145
|
-
/>
|
|
146
|
-
);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
if (currentStep === "scenario_list" && selectedSubCategoryId) {
|
|
150
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
151
|
-
console.log("[CategoryNavigationContainer] Rendering HierarchicalScenarioListScreen", {
|
|
152
|
-
selectedSubCategoryId,
|
|
153
|
-
scenariosCount: scenarios.length,
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
return (
|
|
157
|
-
<HierarchicalScenarioListScreen
|
|
158
|
-
subCategoryId={selectedSubCategoryId}
|
|
159
|
-
subCategories={subCategories}
|
|
160
|
-
scenarios={scenarios}
|
|
161
|
-
onSelectScenario={onSelectScenario}
|
|
162
|
-
onBack={handleBackFromScenarioList}
|
|
163
|
-
t={t}
|
|
164
|
-
numColumns={numColumns}
|
|
165
|
-
/>
|
|
166
|
-
);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
170
|
-
console.log("[CategoryNavigationContainer] Rendering NULL - no matching condition", {
|
|
171
|
-
currentStep,
|
|
172
|
-
selectedMainCategoryId,
|
|
173
|
-
selectedSubCategoryId,
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
return null;
|
|
178
|
-
};
|
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* HierarchicalScenarioListScreen
|
|
3
|
-
* Displays scenarios filtered by sub-category with optimized performance
|
|
4
|
-
* PERFORMANCE OPTIMIZED: No FlatList key remounting, memoized calculations
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import React, { useMemo, useCallback, useState, useEffect } from "react";
|
|
8
|
-
import {
|
|
9
|
-
View,
|
|
10
|
-
FlatList,
|
|
11
|
-
StyleSheet,
|
|
12
|
-
TouchableOpacity,
|
|
13
|
-
type ListRenderItemInfo,
|
|
14
|
-
} from "react-native";
|
|
15
|
-
import {
|
|
16
|
-
AtomicText,
|
|
17
|
-
AtomicCard,
|
|
18
|
-
useAppDesignTokens,
|
|
19
|
-
useResponsive,
|
|
20
|
-
ScreenLayout,
|
|
21
|
-
NavigationHeader,
|
|
22
|
-
AtomicIcon,
|
|
23
|
-
type DesignTokens,
|
|
24
|
-
} from "@umituz/react-native-design-system";
|
|
25
|
-
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
26
|
-
import type { ScenarioData, ScenarioSubCategory } from "../../domain/types";
|
|
27
|
-
|
|
28
|
-
export interface HierarchicalScenarioListScreenProps {
|
|
29
|
-
readonly subCategoryId: string;
|
|
30
|
-
readonly subCategories: readonly ScenarioSubCategory[];
|
|
31
|
-
readonly scenarios: readonly ScenarioData[];
|
|
32
|
-
readonly onSelectScenario: (scenarioId: string) => void;
|
|
33
|
-
readonly onBack: () => void;
|
|
34
|
-
readonly t: (key: string) => string;
|
|
35
|
-
readonly numColumns?: number;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export const HierarchicalScenarioListScreen: React.FC<HierarchicalScenarioListScreenProps> = ({
|
|
39
|
-
subCategoryId,
|
|
40
|
-
subCategories,
|
|
41
|
-
scenarios,
|
|
42
|
-
onSelectScenario,
|
|
43
|
-
onBack,
|
|
44
|
-
t,
|
|
45
|
-
numColumns = 2,
|
|
46
|
-
}) => {
|
|
47
|
-
const tokens = useAppDesignTokens();
|
|
48
|
-
const insets = useSafeAreaInsets();
|
|
49
|
-
const { width } = useResponsive();
|
|
50
|
-
|
|
51
|
-
const [selectedId, setSelectedId] = useState<string | null>(null);
|
|
52
|
-
|
|
53
|
-
const subCategory = useMemo(
|
|
54
|
-
() => subCategories.find((sub) => sub.id === subCategoryId),
|
|
55
|
-
[subCategories, subCategoryId]
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
const filteredScenarios = useMemo(() => {
|
|
59
|
-
if (!subCategory) {
|
|
60
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
61
|
-
console.log("[HierarchicalScenarioListScreen] No subCategory found", {
|
|
62
|
-
subCategoryId,
|
|
63
|
-
subCategoriesCount: subCategories.length,
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
return [];
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const filtered = scenarios.filter((scenario) => {
|
|
70
|
-
if (!scenario.category) return false;
|
|
71
|
-
return subCategory.scenarioCategories.includes(scenario.category);
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
75
|
-
console.log("[HierarchicalScenarioListScreen] Filtered scenarios", {
|
|
76
|
-
subCategoryId: subCategory.id,
|
|
77
|
-
scenarioCategories: subCategory.scenarioCategories,
|
|
78
|
-
totalScenarios: scenarios.length,
|
|
79
|
-
filteredCount: filtered.length,
|
|
80
|
-
sampleScenarioCategories: scenarios.slice(0, 5).map(s => s.category),
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return filtered;
|
|
85
|
-
}, [scenarios, subCategory, subCategoryId, subCategories]);
|
|
86
|
-
|
|
87
|
-
// Debug: Monitor component state
|
|
88
|
-
useEffect(() => {
|
|
89
|
-
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
90
|
-
console.log("[HierarchicalScenarioListScreen] Component state", {
|
|
91
|
-
subCategoryId,
|
|
92
|
-
hasSubCategory: !!subCategory,
|
|
93
|
-
filteredScenariosCount: filteredScenarios.length,
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
}, [subCategoryId, subCategory, filteredScenarios]);
|
|
97
|
-
|
|
98
|
-
const horizontalPadding = tokens.spacing.md;
|
|
99
|
-
const cardSpacing = tokens.spacing.md;
|
|
100
|
-
|
|
101
|
-
// Calculate card width once - memoized to prevent unnecessary recalculations
|
|
102
|
-
const cardWidth = useMemo(() => {
|
|
103
|
-
const availableWidth = width - horizontalPadding * 2 - cardSpacing;
|
|
104
|
-
return availableWidth / numColumns;
|
|
105
|
-
}, [width, horizontalPadding, cardSpacing, numColumns]);
|
|
106
|
-
|
|
107
|
-
const styles = useMemo(
|
|
108
|
-
() => createStyles(tokens, cardSpacing, horizontalPadding),
|
|
109
|
-
[tokens, cardSpacing, horizontalPadding]
|
|
110
|
-
);
|
|
111
|
-
|
|
112
|
-
const handleContinue = useCallback(() => {
|
|
113
|
-
if (selectedId) {
|
|
114
|
-
onSelectScenario(selectedId);
|
|
115
|
-
}
|
|
116
|
-
}, [selectedId, onSelectScenario]);
|
|
117
|
-
|
|
118
|
-
// Memoized callback for card selection - prevents inline arrow functions
|
|
119
|
-
const handleCardPress = useCallback((itemId: string) => {
|
|
120
|
-
setSelectedId(itemId);
|
|
121
|
-
}, []);
|
|
122
|
-
|
|
123
|
-
const renderItem = useCallback(
|
|
124
|
-
({ item }: ListRenderItemInfo<ScenarioData>) => {
|
|
125
|
-
const isSelected = selectedId === item.id;
|
|
126
|
-
|
|
127
|
-
return (
|
|
128
|
-
<AtomicCard
|
|
129
|
-
image={item.previewImageUrl || item.imageUrl || ""}
|
|
130
|
-
title={item.title}
|
|
131
|
-
subtitle={item.description}
|
|
132
|
-
imageAspectRatio={1.25}
|
|
133
|
-
selected={isSelected}
|
|
134
|
-
style={{ width: cardWidth }}
|
|
135
|
-
onPress={() => handleCardPress(item.id)}
|
|
136
|
-
testID={`scenario-card-${item.id}`}
|
|
137
|
-
/>
|
|
138
|
-
);
|
|
139
|
-
},
|
|
140
|
-
[cardWidth, selectedId, handleCardPress]
|
|
141
|
-
);
|
|
142
|
-
|
|
143
|
-
const ListEmptyComponent = useMemo(
|
|
144
|
-
() => (
|
|
145
|
-
<View style={styles.emptyState}>
|
|
146
|
-
<AtomicText type="bodyLarge" color="textSecondary">
|
|
147
|
-
{t("scenario.list.empty")}
|
|
148
|
-
</AtomicText>
|
|
149
|
-
</View>
|
|
150
|
-
),
|
|
151
|
-
[t, styles.emptyState]
|
|
152
|
-
);
|
|
153
|
-
|
|
154
|
-
if (!subCategory) {
|
|
155
|
-
return null;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
const canContinue = !!selectedId;
|
|
159
|
-
|
|
160
|
-
return (
|
|
161
|
-
<View style={styles.container}>
|
|
162
|
-
<NavigationHeader
|
|
163
|
-
title={subCategory.title}
|
|
164
|
-
onBackPress={onBack}
|
|
165
|
-
rightElement={
|
|
166
|
-
<TouchableOpacity
|
|
167
|
-
onPress={handleContinue}
|
|
168
|
-
disabled={!canContinue}
|
|
169
|
-
activeOpacity={0.7}
|
|
170
|
-
style={[
|
|
171
|
-
styles.continueButton,
|
|
172
|
-
{
|
|
173
|
-
backgroundColor: canContinue
|
|
174
|
-
? tokens.colors.primary
|
|
175
|
-
: tokens.colors.surfaceVariant,
|
|
176
|
-
opacity: canContinue ? 1 : 0.5,
|
|
177
|
-
},
|
|
178
|
-
]}
|
|
179
|
-
>
|
|
180
|
-
<AtomicText
|
|
181
|
-
type="bodyMedium"
|
|
182
|
-
style={[
|
|
183
|
-
styles.continueText,
|
|
184
|
-
{
|
|
185
|
-
color: canContinue
|
|
186
|
-
? tokens.colors.onPrimary
|
|
187
|
-
: tokens.colors.textSecondary,
|
|
188
|
-
},
|
|
189
|
-
]}
|
|
190
|
-
>
|
|
191
|
-
{t("common.continue")}
|
|
192
|
-
</AtomicText>
|
|
193
|
-
<AtomicIcon
|
|
194
|
-
name="arrow-forward"
|
|
195
|
-
size="sm"
|
|
196
|
-
color={canContinue ? "onPrimary" : "textSecondary"}
|
|
197
|
-
/>
|
|
198
|
-
</TouchableOpacity>
|
|
199
|
-
}
|
|
200
|
-
/>
|
|
201
|
-
<ScreenLayout
|
|
202
|
-
scrollable={false}
|
|
203
|
-
edges={["left", "right"]}
|
|
204
|
-
backgroundColor={tokens.colors.backgroundPrimary}
|
|
205
|
-
>
|
|
206
|
-
<FlatList
|
|
207
|
-
data={filteredScenarios}
|
|
208
|
-
numColumns={numColumns}
|
|
209
|
-
showsVerticalScrollIndicator={false}
|
|
210
|
-
columnWrapperStyle={styles.row}
|
|
211
|
-
renderItem={renderItem}
|
|
212
|
-
keyExtractor={(item) => item.id}
|
|
213
|
-
ListEmptyComponent={
|
|
214
|
-
filteredScenarios.length === 0 ? ListEmptyComponent : null
|
|
215
|
-
}
|
|
216
|
-
contentContainerStyle={[
|
|
217
|
-
styles.listContent,
|
|
218
|
-
{ paddingBottom: insets.bottom + 100 },
|
|
219
|
-
]}
|
|
220
|
-
removeClippedSubviews
|
|
221
|
-
maxToRenderPerBatch={10}
|
|
222
|
-
updateCellsBatchingPeriod={50}
|
|
223
|
-
initialNumToRender={10}
|
|
224
|
-
windowSize={21}
|
|
225
|
-
/>
|
|
226
|
-
</ScreenLayout>
|
|
227
|
-
</View>
|
|
228
|
-
);
|
|
229
|
-
};
|
|
230
|
-
|
|
231
|
-
const createStyles = (
|
|
232
|
-
tokens: DesignTokens,
|
|
233
|
-
cardSpacing: number,
|
|
234
|
-
horizontalPadding: number
|
|
235
|
-
) =>
|
|
236
|
-
StyleSheet.create({
|
|
237
|
-
container: {
|
|
238
|
-
flex: 1,
|
|
239
|
-
},
|
|
240
|
-
listContent: {
|
|
241
|
-
paddingTop: tokens.spacing.sm,
|
|
242
|
-
flexGrow: 1,
|
|
243
|
-
},
|
|
244
|
-
row: {
|
|
245
|
-
gap: cardSpacing,
|
|
246
|
-
marginBottom: cardSpacing,
|
|
247
|
-
paddingHorizontal: horizontalPadding,
|
|
248
|
-
},
|
|
249
|
-
emptyState: {
|
|
250
|
-
flex: 1,
|
|
251
|
-
justifyContent: "center",
|
|
252
|
-
alignItems: "center",
|
|
253
|
-
paddingVertical: tokens.spacing.xl,
|
|
254
|
-
},
|
|
255
|
-
continueButton: {
|
|
256
|
-
flexDirection: "row",
|
|
257
|
-
alignItems: "center",
|
|
258
|
-
paddingHorizontal: tokens.spacing.md,
|
|
259
|
-
paddingVertical: tokens.spacing.xs,
|
|
260
|
-
borderRadius: tokens.borders.radius.full,
|
|
261
|
-
},
|
|
262
|
-
continueText: {
|
|
263
|
-
fontWeight: "800",
|
|
264
|
-
marginRight: 4,
|
|
265
|
-
},
|
|
266
|
-
});
|