@umituz/react-native-ai-generation-content 1.17.86 → 1.17.87

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.
Files changed (35) hide show
  1. package/package.json +2 -2
  2. package/src/domains/creations/index.ts +6 -3
  3. package/src/domains/creations/presentation/components/CreationBadges.tsx +3 -3
  4. package/src/domains/creations/presentation/components/CreationDetail/DetailStory.tsx +5 -8
  5. package/src/domains/creations/presentation/components/CreationThumbnail.tsx +1 -1
  6. package/src/domains/creations/presentation/components/index.ts +0 -3
  7. package/src/domains/creations/presentation/screens/CreationDetailScreen.tsx +5 -4
  8. package/src/domains/creations/presentation/screens/CreationsGalleryScreen.tsx +2 -11
  9. package/src/domains/creations/presentation/utils/filterUtils.ts +18 -1
  10. package/src/domains/flashcard-generation/FlashcardGenerationService.ts +85 -311
  11. package/src/domains/flashcard-generation/builders/flashcard-prompt.builder.ts +55 -0
  12. package/src/domains/flashcard-generation/parsers/flashcard-response.parser.ts +68 -0
  13. package/src/domains/flashcard-generation/types/flashcard.types.ts +56 -0
  14. package/src/domains/flashcard-generation/validators/flashcard.validator.ts +67 -0
  15. package/src/features/image-to-video/presentation/components/MusicMoodSelector.tsx +3 -3
  16. package/src/features/replace-background/presentation/components/ResultDisplay.tsx +1 -2
  17. package/src/features/script-generator/presentation/components/ScriptDisplay.tsx +3 -4
  18. package/src/features/text-to-image/domain/constants/index.ts +3 -3
  19. package/src/features/text-to-image/domain/constants/options.constants.ts +12 -25
  20. package/src/features/text-to-image/index.ts +3 -3
  21. package/src/features/text-to-video/presentation/components/HeroSection.tsx +2 -8
  22. package/src/features/text-to-video/presentation/components/OptionsPanel.tsx +3 -5
  23. package/src/presentation/components/AIGenerationForm.tsx +0 -1
  24. package/src/presentation/components/AIGenerationHero.tsx +27 -24
  25. package/src/presentation/components/GenerationProgressContent.tsx +4 -2
  26. package/src/presentation/components/PhotoUploadCard/PhotoUploadCard.tsx +12 -26
  27. package/src/presentation/components/StylePresetsGrid.tsx +5 -3
  28. package/src/presentation/components/buttons/GenerateButton.tsx +39 -102
  29. package/src/presentation/components/headers/FeatureHeader.tsx +15 -9
  30. package/src/presentation/components/image-picker/DualImagePicker.tsx +0 -6
  31. package/src/presentation/components/image-picker/ImagePickerBox.tsx +27 -16
  32. package/src/presentation/components/modals/SettingsSheet.tsx +4 -2
  33. package/src/presentation/components/result/ResultImageCard.tsx +12 -35
  34. package/src/presentation/components/result/ResultStoryCard.tsx +10 -16
  35. package/src/domains/creations/presentation/components/CreationsProvider.tsx +0 -56
@@ -10,7 +10,6 @@ import {
10
10
  AtomicText,
11
11
  useAppDesignTokens,
12
12
  } from "@umituz/react-native-design-system";
13
- import { LinearGradient } from "expo-linear-gradient";
14
13
  import type { ResultStoryConfig } from "../../types/result-config.types";
15
14
  import { DEFAULT_RESULT_CONFIG } from "../../types/result-config.types";
16
15
 
@@ -37,16 +36,24 @@ export const ResultStoryCard: React.FC<ResultStoryCardProps> = ({
37
36
  ...base,
38
37
  borderWidth: 1,
39
38
  borderColor: tokens.colors.primaryContainer,
40
- backgroundColor: "transparent",
39
+ backgroundColor: tokens.colors.surface,
41
40
  };
42
41
  } else if (cfg.borderStyle === "filled") {
43
42
  return {
44
43
  ...base,
45
44
  backgroundColor: tokens.colors.primaryContainer,
46
45
  };
46
+ } else if (cfg.borderStyle === "gradient") {
47
+ return {
48
+ ...base,
49
+ backgroundColor: tokens.colors.primaryContainer,
50
+ };
47
51
  }
48
52
 
49
- return base;
53
+ return {
54
+ ...base,
55
+ backgroundColor: tokens.colors.surface,
56
+ };
50
57
  }, [cfg.borderStyle, cfg.spacing, tokens]);
51
58
 
52
59
  const styles = useMemo(
@@ -102,19 +109,6 @@ export const ResultStoryCard: React.FC<ResultStoryCardProps> = ({
102
109
  </>
103
110
  );
104
111
 
105
- if (cfg.borderStyle === "gradient") {
106
- return (
107
- <View style={styles.outer}>
108
- <LinearGradient
109
- colors={[tokens.colors.primaryContainer, tokens.colors.surface]}
110
- style={styles.container}
111
- >
112
- {renderContent()}
113
- </LinearGradient>
114
- </View>
115
- );
116
- }
117
-
118
112
  return (
119
113
  <View style={styles.outer}>
120
114
  <View style={styles.container}>{renderContent()}</View>
@@ -1,56 +0,0 @@
1
- /**
2
- * Creations Provider
3
- * Context provider for creations configuration and localization
4
- */
5
-
6
- import React, { createContext, useContext, useMemo, type ReactNode } from "react";
7
- import type { CreationsConfig, CreationType } from "../../domain/value-objects/CreationsConfig";
8
- import { getTranslatedTypes } from "../utils/filterUtils";
9
-
10
- interface CreationsContextValue {
11
- config: CreationsConfig;
12
- t: (key: string) => string;
13
- translatedTypes: readonly CreationType[];
14
- getLocalizedTitle: (typeId: string) => string;
15
- }
16
-
17
- const CreationsContext = createContext<CreationsContextValue | null>(null);
18
-
19
- interface CreationsProviderProps {
20
- config: CreationsConfig;
21
- t: (key: string) => string;
22
- children: ReactNode;
23
- }
24
-
25
- export function CreationsProvider({ config, t, children }: CreationsProviderProps) {
26
- const translatedTypes = useMemo(() => getTranslatedTypes(config, t), [config, t]);
27
-
28
- const getLocalizedTitle = (typeId: string): string => {
29
- const typeConfig = translatedTypes.find((type) => type.id === typeId);
30
- return typeConfig?.labelKey || typeId;
31
- };
32
-
33
- const value = useMemo<CreationsContextValue>(
34
- () => ({
35
- config,
36
- t,
37
- translatedTypes,
38
- getLocalizedTitle,
39
- }),
40
- [config, t, translatedTypes]
41
- );
42
-
43
- return (
44
- <CreationsContext.Provider value={value}>
45
- {children}
46
- </CreationsContext.Provider>
47
- );
48
- }
49
-
50
- export function useCreationsProvider(): CreationsContextValue {
51
- const context = useContext(CreationsContext);
52
- if (!context) {
53
- throw new Error("useCreationsProvider must be used within a CreationsProvider");
54
- }
55
- return context;
56
- }