@umituz/react-native-ai-generation-content 1.83.10 → 1.83.11

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 (200) hide show
  1. package/package.json +1 -1
  2. package/src/domain/constants/queue-status.constants.ts +0 -2
  3. package/src/domain/entities/flow-config-data.types.ts +0 -9
  4. package/src/domain/entities/flow-config.types.ts +2 -6
  5. package/src/domain/entities/flow-configuration.types.ts +1 -8
  6. package/src/domain/interfaces/app-services.interface.ts +2 -2
  7. package/src/domain/interfaces/index.ts +0 -8
  8. package/src/domains/background/infrastructure/services/job-poller.service.ts +0 -1
  9. package/src/domains/background/infrastructure/utils/result-validator.util.ts +0 -1
  10. package/src/domains/background/infrastructure/utils/status-checker.util.ts +0 -1
  11. package/src/domains/background/infrastructure/utils/status-extraction-helpers.ts +1 -1
  12. package/src/domains/content-moderation/infrastructure/utils/content-security.util.ts +1 -1
  13. package/src/domains/creations/domain/constants/creation-fields.constants.ts +1 -10
  14. package/src/domains/creations/domain/constants/creation-status.constants.ts +0 -20
  15. package/src/domains/creations/domain/constants/creation-validation.constants.ts +0 -12
  16. package/src/domains/creations/domain/constants/index.ts +3 -15
  17. package/src/domains/creations/domain/entities/index.ts +1 -1
  18. package/src/domains/creations/infrastructure/repositories/creation-update.operations.ts +0 -2
  19. package/src/domains/creations/infrastructure/repositories/creations-operations.ts +1 -1
  20. package/src/domains/creations/presentation/components/CreationCard.tsx +3 -3
  21. package/src/domains/creations/presentation/components/CreationImagePreview.tsx +1 -1
  22. package/src/domains/creations/presentation/components/CreationVideoPreview.tsx +1 -1
  23. package/src/domains/creations/presentation/components/CreationsFilterBar.tsx +0 -1
  24. package/src/domains/creations/presentation/components/GalleryEmptyStates.tsx +4 -4
  25. package/src/domains/creations/presentation/components/GalleryHeader.tsx +3 -1
  26. package/src/domains/creations/presentation/components/GalleryScreenHeader.tsx +1 -1
  27. package/src/domains/creations/presentation/components/index.ts +0 -23
  28. package/src/domains/creations/presentation/hooks/creation-validators.ts +4 -4
  29. package/src/domains/creations/presentation/hooks/filterHelpers.ts +5 -5
  30. package/src/domains/creations/presentation/hooks/useFilter.ts +2 -2
  31. package/src/domains/creations/presentation/hooks/useGalleryCallbacks.ts +1 -1
  32. package/src/domains/creations/presentation/hooks/useGalleryState.ts +2 -2
  33. package/src/domains/creations/presentation/screens/CreationsGalleryScreen.tsx +0 -1
  34. package/src/domains/creations/presentation/utils/filter-buttons.util.ts +2 -2
  35. package/src/domains/creations/presentation-exports.ts +5 -3
  36. package/src/domains/face-detection/presentation/components/FaceValidationStatus.tsx +1 -1
  37. package/src/domains/generation/infrastructure/executors/text-to-image-executor.helpers.ts +1 -1
  38. package/src/domains/generation/wizard/infrastructure/strategies/image-generation.strategy.ts +0 -2
  39. package/src/domains/generation/wizard/infrastructure/strategies/image-generation.types.ts +0 -4
  40. package/src/domains/generation/wizard/infrastructure/strategies/index.ts +0 -1
  41. package/src/domains/generation/wizard/infrastructure/strategies/shared/unified-prompt-builder.ts +1 -1
  42. package/src/domains/generation/wizard/infrastructure/strategies/video-generation.strategy.ts +0 -1
  43. package/src/domains/generation/wizard/infrastructure/strategies/video-generation.types.ts +2 -6
  44. package/src/domains/generation/wizard/infrastructure/strategies/wizard-strategy.constants.ts +0 -7
  45. package/src/domains/generation/wizard/infrastructure/strategies/wizard-strategy.factory.ts +1 -3
  46. package/src/domains/generation/wizard/infrastructure/utils/creation-persistence.util.ts +0 -5
  47. package/src/domains/generation/wizard/infrastructure/utils/index.ts +0 -3
  48. package/src/domains/generation/wizard/infrastructure/utils/primitive-extractors.ts +3 -3
  49. package/src/domains/generation/wizard/presentation/components/IndeterminateProgressBar.tsx +1 -1
  50. package/src/domains/generation/wizard/presentation/components/WizardContinueButton.tsx +1 -1
  51. package/src/domains/generation/wizard/presentation/components/WizardFlowContent.tsx +1 -1
  52. package/src/domains/generation/wizard/presentation/components/WizardStepRenderer.tsx +0 -2
  53. package/src/domains/generation/wizard/presentation/components/WizardStepRenderer.utils.ts +0 -7
  54. package/src/domains/generation/wizard/presentation/components/index.ts +0 -2
  55. package/src/domains/generation/wizard/presentation/components/step-renderers/renderPhotoUploadStep.tsx +1 -1
  56. package/src/domains/generation/wizard/presentation/components/step-renderers/renderPreviewStep.tsx +1 -1
  57. package/src/domains/generation/wizard/presentation/components/step-renderers/renderSelectionStep.tsx +1 -1
  58. package/src/domains/generation/wizard/presentation/components/step-renderers/renderTextInputStep.tsx +1 -1
  59. package/src/domains/generation/wizard/presentation/hooks/generationStateMachine.ts +2 -2
  60. package/src/domains/generation/wizard/presentation/hooks/useGenerationPhase.ts +1 -1
  61. package/src/domains/generation/wizard/presentation/hooks/usePhotoBlockingGeneration.ts +2 -2
  62. package/src/domains/generation/wizard/presentation/hooks/useWizardFlowHandlers.ts +1 -1
  63. package/src/domains/generation/wizard/presentation/screens/GeneratingScreen.tsx +1 -1
  64. package/src/domains/generation/wizard/presentation/screens/GenericPhotoUploadScreen.tsx +3 -3
  65. package/src/domains/generation/wizard/presentation/screens/SelectionScreen.tsx +0 -6
  66. package/src/domains/generation/wizard/presentation/screens/TextInputScreen.tsx +5 -3
  67. package/src/domains/generation/wizard/presentation/screens/index.ts +0 -13
  68. package/src/domains/generation/wizard/presentation/utilities/validateScenario.ts +0 -6
  69. package/src/domains/image-to-video/presentation/hooks/image-to-video-feature.types.ts +0 -8
  70. package/src/domains/image-to-video/presentation/index.ts +0 -4
  71. package/src/domains/result-preview/presentation/components/StarRatingPicker.tsx +1 -1
  72. package/src/domains/result-preview/presentation/types/result-preview.types.ts +0 -5
  73. package/src/domains/scenarios/configs/index.ts +1 -6
  74. package/src/domains/scenarios/configs/wizard-step-factories.ts +1 -1
  75. package/src/domains/scenarios/infrastructure/scenario-registry.ts +0 -9
  76. package/src/domains/scenarios/presentation/components/ScenarioContinueButton.tsx +1 -1
  77. package/src/domains/scenarios/presentation/hooks/useHierarchicalScenarios.ts +2 -2
  78. package/src/domains/scenarios/presentation/screens/HierarchicalScenarioListScreen.tsx +1 -1
  79. package/src/domains/scenarios/presentation/screens/ScenarioPreviewScreen.tsx +2 -2
  80. package/src/domains/shared/presentation/components/AutoSkipPreview.tsx +1 -1
  81. package/src/domains/shared/presentation/components/index.ts +0 -1
  82. package/src/domains/shared/presentation/utils/index.ts +0 -3
  83. package/src/domains/shared/presentation/utils/wizard-flow.utils.ts +2 -2
  84. package/src/domains/text-to-image/presentation/index.ts +0 -2
  85. package/src/domains/text-to-video/domain/types/component.types.ts +0 -6
  86. package/src/domains/text-to-video/domain/types/index.ts +0 -4
  87. package/src/domains/text-to-video/presentation/components/FrameSelector.tsx +97 -52
  88. package/src/domains/text-to-video/presentation/index.ts +0 -2
  89. package/src/infrastructure/config/index.ts +0 -2
  90. package/src/infrastructure/constants/index.ts +0 -6
  91. package/src/infrastructure/constants/polling.constants.ts +0 -21
  92. package/src/infrastructure/constants/validation.constants.ts +0 -30
  93. package/src/infrastructure/utils/error-classification.ts +1 -1
  94. package/src/infrastructure/utils/error-factory.ts +2 -2
  95. package/src/infrastructure/utils/index.ts +0 -9
  96. package/src/infrastructure/utils/message-extractor.ts +1 -20
  97. package/src/infrastructure/utils/progress.utils.ts +0 -37
  98. package/src/infrastructure/utils/provider-validator.util.ts +1 -1
  99. package/src/infrastructure/utils/url-extractor/index.ts +0 -5
  100. package/src/infrastructure/utils/url-extractor.util.ts +0 -11
  101. package/src/infrastructure/utils/video-helpers.ts +1 -1
  102. package/src/infrastructure/validation/ai-validator.ts +0 -28
  103. package/src/infrastructure/validation/entity-validator.ts +0 -34
  104. package/src/infrastructure/validation/input-validator.ts +2 -5
  105. package/src/infrastructure/validation/sanitizer.ts +0 -17
  106. package/src/presentation/components/AIGenerationConfig.tsx +3 -1
  107. package/src/presentation/components/GenerationProgressContent.styles.ts +0 -2
  108. package/src/presentation/components/PhotoUploadCard/PhotoUploadCard.tsx +0 -1
  109. package/src/presentation/components/ProgressCloseButton.tsx +1 -1
  110. package/src/presentation/components/ProgressDismissButton.tsx +1 -1
  111. package/src/presentation/components/ProgressHeader.tsx +1 -1
  112. package/src/presentation/components/ProgressHint.tsx +1 -1
  113. package/src/presentation/components/display/AIGenerationResult.tsx +6 -4
  114. package/src/presentation/components/display/index.ts +0 -1
  115. package/src/presentation/components/moderation/ModerationSummary.tsx +2 -2
  116. package/src/presentation/components/prompts/ExamplePrompts.tsx +2 -2
  117. package/src/presentation/components/result/ResultImageCard.tsx +39 -21
  118. package/src/presentation/components/result/ResultStoryCard.tsx +38 -15
  119. package/src/presentation/components/result/button-style.utils.ts +1 -1
  120. package/src/presentation/components/selectors/GridSelector.tsx +2 -2
  121. package/src/presentation/components/selectors/factories/aspect-ratio.factory.ts +0 -2
  122. package/src/presentation/components/selectors/factories/duration.factory.ts +0 -2
  123. package/src/presentation/components/selectors/factories/style.factory.ts +1 -1
  124. package/src/presentation/components/shared/ModelSelector.tsx +3 -1
  125. package/src/presentation/hooks/ai-feature-callbacks-auth.hooks.ts +2 -2
  126. package/src/presentation/hooks/ai-feature-callbacks-cost.hooks.ts +2 -2
  127. package/src/presentation/hooks/ai-feature-callbacks-execution.hooks.ts +2 -2
  128. package/src/presentation/hooks/generation/index.ts +0 -5
  129. package/src/presentation/hooks/generation/moderation-handler.ts +1 -1
  130. package/src/presentation/hooks/generation/types.ts +0 -12
  131. package/src/presentation/hooks/index.ts +0 -4
  132. package/src/presentation/hooks/useProgressDismiss.ts +1 -1
  133. package/src/presentation/layouts/types/layout-props.ts +1 -1
  134. package/src/domain/constants/index.ts +0 -2
  135. package/src/domain/entities/feature-flow-config.types.ts +0 -17
  136. package/src/domain/entities/scenario-step-config.types.ts +0 -32
  137. package/src/domain/entities/step-config.types.ts +0 -18
  138. package/src/domain/entities/step-definition.types.ts +0 -50
  139. package/src/domain/entities/step-input-config.types.ts +0 -36
  140. package/src/domain/entities/step-upload-config.types.ts +0 -17
  141. package/src/domains/background/domain/entities/index.ts +0 -1
  142. package/src/domains/background/domain/interfaces/index.ts +0 -1
  143. package/src/domains/content-moderation/infrastructure/utils/validators.util.ts +0 -51
  144. package/src/domains/creations/domain/constants/creation-errors.constants.ts +0 -27
  145. package/src/domains/creations/domain/constants/creation-query.constants.ts +0 -37
  146. package/src/domains/creations/domain/constants/creation-types.constants.ts +0 -45
  147. package/src/domains/creations/presentation/components/CreationImageViewer.tsx +0 -43
  148. package/src/domains/creations/presentation/components/CreationRating.tsx +0 -69
  149. package/src/domains/creations/presentation/components/CreationsGrid.tsx +0 -130
  150. package/src/domains/creations/presentation/components/FilterSheets.tsx +0 -63
  151. package/src/domains/creations/presentation/hooks/index.ts +0 -24
  152. package/src/domains/creations/presentation/hooks/useCreationRating.ts +0 -68
  153. package/src/domains/creations/presentation/screens/index.ts +0 -5
  154. package/src/domains/generation/infrastructure/flow/scenario-configs.ts +0 -54
  155. package/src/domains/generation/infrastructure/flow/step-builders.ts +0 -133
  156. package/src/domains/generation/wizard/infrastructure/strategies/video-generation.utils.ts +0 -42
  157. package/src/domains/generation/wizard/presentation/components/WizardHeader.tsx +0 -96
  158. package/src/domains/generation/wizard/presentation/components/step-renderers/index.ts +0 -8
  159. package/src/domains/generation/wizard/presentation/components/step-renderers/renderGeneratingStep.tsx +0 -24
  160. package/src/domains/generation/wizard/presentation/components/step-renderers/renderResultStep.tsx +0 -69
  161. package/src/domains/generation/wizard/presentation/utilities/index.ts +0 -1
  162. package/src/domains/prompts/infrastructure/services/base/index.ts +0 -6
  163. package/src/domains/prompts/infrastructure/services/base/prompt-service.base.ts +0 -112
  164. package/src/domains/result-preview/index.ts +0 -37
  165. package/src/domains/result-preview/presentation/components/GenerationErrorScreen.tsx +0 -109
  166. package/src/domains/result-preview/presentation/components/index.ts +0 -16
  167. package/src/domains/result-preview/presentation/hooks/index.ts +0 -5
  168. package/src/domains/result-preview/presentation/types/index.ts +0 -16
  169. package/src/domains/result-preview/presentation/types/result-data.types.ts +0 -35
  170. package/src/domains/text-to-image/presentation/screens/TextToImageWizardFlow.types.ts +0 -27
  171. package/src/domains/text-to-video/domain/types/action-component.types.ts +0 -15
  172. package/src/domains/text-to-video/domain/types/selector-component.types.ts +0 -31
  173. package/src/infrastructure/constants/content.constants.ts +0 -8
  174. package/src/infrastructure/constants/storage.constants.ts +0 -27
  175. package/src/infrastructure/http/api-client.types.ts +0 -17
  176. package/src/infrastructure/http/http-client-methods.ts +0 -73
  177. package/src/infrastructure/http/http-client.util.ts +0 -12
  178. package/src/infrastructure/http/http-fetch-handler.ts +0 -63
  179. package/src/infrastructure/http/http-methods.constants.ts +0 -23
  180. package/src/infrastructure/http/http-request-executor.ts +0 -49
  181. package/src/infrastructure/http/http-response-parser.ts +0 -65
  182. package/src/infrastructure/http/index.ts +0 -16
  183. package/src/infrastructure/http/query-string.util.ts +0 -40
  184. package/src/infrastructure/http/timeout.util.ts +0 -26
  185. package/src/infrastructure/logging/debug.util.ts +0 -51
  186. package/src/infrastructure/logging/index.ts +0 -6
  187. package/src/infrastructure/utils/content-validators.ts +0 -92
  188. package/src/infrastructure/utils/domain-guards.ts +0 -23
  189. package/src/infrastructure/utils/error-classifiers.ts +0 -23
  190. package/src/infrastructure/utils/error-handlers.ts +0 -53
  191. package/src/infrastructure/utils/error-retry.ts +0 -44
  192. package/src/infrastructure/utils/error-types.ts +0 -23
  193. package/src/infrastructure/utils/general-validators.ts +0 -64
  194. package/src/infrastructure/utils/id-validators.ts +0 -39
  195. package/src/infrastructure/utils/primitive-guards.ts +0 -66
  196. package/src/infrastructure/utils/structure-guards.ts +0 -75
  197. package/src/infrastructure/utils/type-guards.util.ts +0 -26
  198. package/src/infrastructure/utils/validation-types.ts +0 -8
  199. package/src/infrastructure/utils/validation.util.ts +0 -18
  200. package/src/shared/utils/index.ts +0 -6
@@ -12,6 +12,83 @@ import {
12
12
  } from "@umituz/react-native-design-system";
13
13
  import type { FrameSelectorProps } from "../../domain/types";
14
14
 
15
+ interface FrameContentProps {
16
+ frame: { url: string; order: number } | undefined;
17
+ imageStyle: object;
18
+ }
19
+
20
+ const FrameContent: React.FC<FrameContentProps> = ({ frame, imageStyle }) =>
21
+ frame ? (
22
+ <Image
23
+ source={{ uri: frame.url }}
24
+ style={imageStyle}
25
+ resizeMode="cover"
26
+ />
27
+ ) : (
28
+ <View style={placeholderStyle.container}>
29
+ <AtomicIcon name="image-outline" size="xl" color="secondary" />
30
+ </View>
31
+ );
32
+
33
+ const placeholderStyle = StyleSheet.create({
34
+ container: {
35
+ alignItems: "center",
36
+ justifyContent: "center",
37
+ },
38
+ });
39
+
40
+ interface FrameActionsProps {
41
+ index: number;
42
+ onFrameChange: (index: number) => void;
43
+ onFrameDelete: (index: number) => void;
44
+ changeLabel: string;
45
+ deleteLabel: string;
46
+ gap: number;
47
+ buttonGap: number;
48
+ }
49
+
50
+ const FrameActions: React.FC<FrameActionsProps> = ({
51
+ index,
52
+ onFrameChange,
53
+ onFrameDelete,
54
+ changeLabel,
55
+ deleteLabel,
56
+ gap,
57
+ buttonGap,
58
+ }) => (
59
+ <View style={[frameActionStyles.actions, { gap }]}>
60
+ <TouchableOpacity
61
+ style={[frameActionStyles.actionButton, { gap: buttonGap }]}
62
+ onPress={() => onFrameChange(index)}
63
+ >
64
+ <AtomicIcon name="pencil-outline" size="xs" color="primary" />
65
+ <AtomicText type="labelSmall" color="primary">
66
+ {changeLabel}
67
+ </AtomicText>
68
+ </TouchableOpacity>
69
+ <TouchableOpacity
70
+ style={[frameActionStyles.actionButton, { gap: buttonGap }]}
71
+ onPress={() => onFrameDelete(index)}
72
+ >
73
+ <AtomicIcon name="trash-outline" size="xs" color="primary" />
74
+ <AtomicText type="labelSmall" color="primary">
75
+ {deleteLabel}
76
+ </AtomicText>
77
+ </TouchableOpacity>
78
+ </View>
79
+ );
80
+
81
+ const frameActionStyles = StyleSheet.create({
82
+ actions: {
83
+ flexDirection: "row",
84
+ justifyContent: "center",
85
+ },
86
+ actionButton: {
87
+ flexDirection: "row",
88
+ alignItems: "center",
89
+ },
90
+ });
91
+
15
92
  export const FrameSelector: React.FC<FrameSelectorProps> = ({
16
93
  frames,
17
94
  onFrameChange,
@@ -27,42 +104,6 @@ export const FrameSelector: React.FC<FrameSelectorProps> = ({
27
104
  const startFrame = frames.find((f) => f.order === 0);
28
105
  const endFrame = frames.find((f) => f.order === 1);
29
106
 
30
- const renderFrameContent = (frame: typeof startFrame) =>
31
- frame ? (
32
- <Image
33
- source={{ uri: frame.url }}
34
- style={styles.image}
35
- resizeMode="cover"
36
- />
37
- ) : (
38
- <View style={styles.placeholder}>
39
- <AtomicIcon name="image-outline" size="xl" color="secondary" />
40
- </View>
41
- );
42
-
43
- const renderActions = (index: number) => (
44
- <View style={[styles.actions, { gap: tokens.spacing.md }]}>
45
- <TouchableOpacity
46
- style={[styles.actionButton, { gap: tokens.spacing.xs }]}
47
- onPress={() => onFrameChange(index)}
48
- >
49
- <AtomicIcon name="pencil-outline" size="xs" color="primary" />
50
- <AtomicText type="labelSmall" color="primary">
51
- {changeLabel}
52
- </AtomicText>
53
- </TouchableOpacity>
54
- <TouchableOpacity
55
- style={[styles.actionButton, { gap: tokens.spacing.xs }]}
56
- onPress={() => onFrameDelete(index)}
57
- >
58
- <AtomicIcon name="trash-outline" size="xs" color="primary" />
59
- <AtomicText type="labelSmall" color="primary">
60
- {deleteLabel}
61
- </AtomicText>
62
- </TouchableOpacity>
63
- </View>
64
- );
65
-
66
107
  return (
67
108
  <View style={[styles.container, { gap: tokens.spacing.md }, style]}>
68
109
  <View style={[styles.frameContainer, { gap: tokens.spacing.sm }]}>
@@ -75,9 +116,17 @@ export const FrameSelector: React.FC<FrameSelectorProps> = ({
75
116
  { backgroundColor: tokens.colors.surface },
76
117
  ]}
77
118
  >
78
- {renderFrameContent(startFrame)}
119
+ <FrameContent frame={startFrame} imageStyle={styles.image} />
79
120
  </View>
80
- {renderActions(0)}
121
+ <FrameActions
122
+ index={0}
123
+ onFrameChange={onFrameChange}
124
+ onFrameDelete={onFrameDelete}
125
+ changeLabel={changeLabel}
126
+ deleteLabel={deleteLabel}
127
+ gap={tokens.spacing.md}
128
+ buttonGap={tokens.spacing.xs}
129
+ />
81
130
  </View>
82
131
 
83
132
  <View style={styles.separatorContainer}>
@@ -98,9 +147,17 @@ export const FrameSelector: React.FC<FrameSelectorProps> = ({
98
147
  { backgroundColor: tokens.colors.surface },
99
148
  ]}
100
149
  >
101
- {renderFrameContent(endFrame)}
150
+ <FrameContent frame={endFrame} imageStyle={styles.image} />
102
151
  </View>
103
- {renderActions(1)}
152
+ <FrameActions
153
+ index={1}
154
+ onFrameChange={onFrameChange}
155
+ onFrameDelete={onFrameDelete}
156
+ changeLabel={changeLabel}
157
+ deleteLabel={deleteLabel}
158
+ gap={tokens.spacing.md}
159
+ buttonGap={tokens.spacing.xs}
160
+ />
104
161
  </View>
105
162
  </View>
106
163
  );
@@ -127,18 +184,6 @@ const styles = StyleSheet.create({
127
184
  width: "100%",
128
185
  height: "100%",
129
186
  },
130
- placeholder: {
131
- alignItems: "center",
132
- justifyContent: "center",
133
- },
134
- actions: {
135
- flexDirection: "row",
136
- justifyContent: "center",
137
- },
138
- actionButton: {
139
- flexDirection: "row",
140
- alignItems: "center",
141
- },
142
187
  separatorContainer: {
143
188
  justifyContent: "center",
144
189
  alignItems: "center",
@@ -5,5 +5,3 @@
5
5
 
6
6
  export * from "./hooks";
7
7
  export * from "./components";
8
- export { TextToVideoWizardFlow } from "./screens/TextToVideoWizardFlow";
9
- export type { TextToVideoWizardFlowProps } from "./screens/TextToVideoWizardFlow";
@@ -14,5 +14,3 @@ export {
14
14
  getAuthService,
15
15
  getAnalyticsService,
16
16
  } from "./app-services.config";
17
-
18
- export { env } from "./env.config";
@@ -7,9 +7,3 @@ export * from "./polling.constants";
7
7
 
8
8
  // Validation Constants
9
9
  export * from "./validation.constants";
10
-
11
- // Content Moderation Constants
12
- export * from "./content.constants";
13
-
14
- // Storage Constants
15
- export * from "./storage.constants";
@@ -8,29 +8,8 @@ import { env } from "../config/env.config";
8
8
  /** Default polling interval for job status checks (milliseconds) */
9
9
  export const DEFAULT_POLL_INTERVAL_MS = env.pollDefaultIntervalMs;
10
10
 
11
- /** Gallery polling interval (slower than wizard) */
12
- export const GALLERY_POLL_INTERVAL_MS = env.pollGalleryIntervalMs;
13
-
14
- /** Maximum number of polling attempts before timeout */
15
- export const DEFAULT_MAX_POLL_ATTEMPTS = env.pollMaxAttempts;
16
-
17
11
  /** Maximum consecutive transient errors before aborting */
18
12
  export const DEFAULT_MAX_CONSECUTIVE_ERRORS = env.pollMaxConsecutiveErrors;
19
13
 
20
14
  /** Maximum total time for polling (milliseconds) */
21
15
  export const DEFAULT_MAX_POLL_TIME_MS = env.pollMaxTimeMs;
22
-
23
- /** Minimum backoff delay (milliseconds) */
24
- export const MIN_BACKOFF_DELAY_MS = env.pollMinBackoffDelayMs;
25
-
26
- /** Maximum backoff delay (milliseconds) */
27
- export const MAX_BACKOFF_DELAY_MS = env.pollMaxBackoffDelayMs;
28
-
29
- /** Exponential backoff base multiplier */
30
- export const BACKOFF_MULTIPLIER = env.pollBackoffMultiplier;
31
-
32
- /** Progress percentage to report when job completes */
33
- export const COMPLETION_PROGRESS = 100;
34
-
35
- /** Initial progress percentage */
36
- export const INITIAL_PROGRESS = 0;
@@ -10,33 +10,3 @@ export const MAX_PROMPT_LENGTH = env.validationMaxPromptLength;
10
10
 
11
11
  /** Minimum length for AI prompt text */
12
12
  export const MIN_PROMPT_LENGTH = env.validationMinPromptLength;
13
-
14
- /** Maximum length for user ID */
15
- export const MAX_USER_ID_LENGTH = env.validationMaxUserIdLength;
16
-
17
- /** Maximum length for creation ID */
18
- export const MAX_CREATION_ID_LENGTH = env.validationMaxCreationIdLength;
19
-
20
- /** Maximum base64 string length (before encoding) */
21
- export const MAX_BASE64_SIZE_MB = env.validationMaxBase64SizeMb;
22
-
23
- /** Maximum regex pattern length for validation */
24
- export const MAX_PATTERN_LENGTH = env.validationMaxPatternLength;
25
-
26
- /** Maximum duration for video generation (seconds) */
27
- export const MAX_VIDEO_DURATION_SECONDS = env.validationMaxVideoDurationSeconds;
28
-
29
- /** Minimum duration for video generation (seconds) */
30
- export const MIN_VIDEO_DURATION_SECONDS = env.validationMinVideoDurationSeconds;
31
-
32
- /** Maximum image file size (MB) */
33
- export const MAX_IMAGE_SIZE_MB = env.validationMaxImageSizeMb;
34
-
35
- /** Maximum URL length */
36
- export const MAX_URL_LENGTH = env.validationMaxUrlLength;
37
-
38
- /** Maximum number of images in multi-image generation */
39
- export const MAX_MULTI_IMAGE_COUNT = env.validationMaxMultiImageCount;
40
-
41
- /** Minimum number of images for multi-image generation */
42
- export const MIN_MULTI_IMAGE_COUNT = env.validationMinMultiImageCount;
@@ -112,7 +112,7 @@ export function classifyError(error: unknown): AIErrorInfo {
112
112
  });
113
113
  }
114
114
 
115
- export function isTransientError(error: unknown): boolean {
115
+ function isTransientError(error: unknown): boolean {
116
116
  const info = classifyError(error);
117
117
  return info.retryable ?? false;
118
118
  }
@@ -11,9 +11,9 @@ export const GenerationErrorType = {
11
11
  UNKNOWN: "unknown",
12
12
  } as const;
13
13
 
14
- export type GenerationErrorTypeValue = typeof GenerationErrorType[keyof typeof GenerationErrorType];
14
+ type GenerationErrorTypeValue = typeof GenerationErrorType[keyof typeof GenerationErrorType];
15
15
 
16
- export interface GenerationError extends Error {
16
+ interface GenerationError extends Error {
17
17
  errorType: GenerationErrorTypeValue;
18
18
  translationKey: string;
19
19
  }
@@ -3,14 +3,10 @@
3
3
  */
4
4
 
5
5
  export * from "./error-classification";
6
- export * from "./error-classifiers";
7
- export * from "./error-handlers";
8
6
  export * from "./error-factory";
9
- export * from "./error-types";
10
7
  export * from "./message-extractor";
11
8
  export * from "./classifier-helpers";
12
9
  export * from "./result-polling";
13
- export * from "./validation.util";
14
10
  export * from "../../domains/background/infrastructure/utils/polling-interval.util";
15
11
  export * from "./progress-calculator.util";
16
12
  export * from "./progress.utils";
@@ -24,8 +20,3 @@ export * from "./provider-validator.util";
24
20
  export * from "./base64.util";
25
21
  export * from "./video-result-extractor.util";
26
22
  export * from "./id-generator.util";
27
-
28
- // Export type guards (avoiding duplicate exports)
29
- export { hasProperty, hasProperties } from "./structure-guards";
30
- export { isObject, isNonEmptyString, isArray, isNumber, isFunction } from "./primitive-guards";
31
- export { isCreationWithOutput, isWizardData } from "./domain-guards";
@@ -4,29 +4,10 @@
4
4
 
5
5
  import { GenerationErrorType, isGenerationError } from "./error-factory";
6
6
 
7
- /**
8
- * Safely extracts error message from unknown error type
9
- * Generic utility for any error - no domain-specific logic
10
- */
11
- export function getErrorMessage(error: unknown, prefix?: string): string {
12
- let message = "An unknown error occurred";
13
-
14
- if (error instanceof Error) {
15
- message = error.message;
16
- } else if (typeof error === "string") {
17
- message = error;
18
- } else if (error && typeof error === "object" && "message" in error) {
19
- message = String((error as { message: unknown }).message);
20
- }
21
-
22
- return prefix ? `${prefix}: ${message}` : message;
23
- }
24
-
25
-
26
7
  /**
27
8
  * Get translation key from error (returns key if GenerationError, null otherwise)
28
9
  */
29
- export function getErrorTranslationKey(error: unknown): string | null {
10
+ function getErrorTranslationKey(error: unknown): string | null {
30
11
  if (isGenerationError(error)) {
31
12
  return error.translationKey;
32
13
  }
@@ -21,40 +21,3 @@ export function roundProgress(progress: number): number {
21
21
  return Math.round(clampProgress(progress));
22
22
  }
23
23
 
24
- /**
25
- * Formats progress as percentage string
26
- * @param progress - Progress value
27
- * @returns Formatted percentage string (e.g., "75%")
28
- */
29
- export function formatProgressPercentage(progress: number): string {
30
- return `${roundProgress(progress)}%`;
31
- }
32
-
33
- /**
34
- * Calculates progress percentage from current and total values
35
- * @param current - Current value
36
- * @param total - Total value
37
- * @returns Progress percentage (0-100)
38
- */
39
- export function calculateProgressPercentage(current: number, total: number): number {
40
- if (total <= 0) return 0;
41
- return clampProgress((current / total) * 100);
42
- }
43
-
44
- /**
45
- * Maps job status to approximate progress percentage
46
- * @param status - Job status string
47
- * @returns Approximate progress percentage
48
- */
49
- export function mapStatusToProgress(status: string): number {
50
- const normalizedStatus = status.toLowerCase();
51
- const statusMap: Record<string, number> = {
52
- queued: 10,
53
- in_queue: 15,
54
- processing: 50,
55
- in_progress: 60,
56
- completed: 100,
57
- failed: 0,
58
- };
59
- return statusMap[normalizedStatus] ?? 30;
60
- }
@@ -8,7 +8,7 @@ import { cleanBase64 } from "./index";
8
8
  import type { IAIProvider, VideoFeatureInputData, ImageFeatureInputData } from "../../domain/interfaces";
9
9
 
10
10
 
11
- export type ProviderValidationResult =
11
+ type ProviderValidationResult =
12
12
  | { success: true; provider: IAIProvider }
13
13
  | { success: false; error: string };
14
14
 
@@ -11,11 +11,6 @@ export { extractOutputUrls } from "./multi-extractor";
11
11
 
12
12
  export { extractThumbnailUrl } from "./thumbnail-extractor";
13
13
 
14
- export type { ExtractionRule } from "./extraction-rules";
15
- export { IMAGE_EXTRACTION_RULES, VIDEO_EXTRACTION_RULES } from "./extraction-rules";
16
-
17
- export { executeRules } from "./rule-executor";
18
-
19
14
  export type { ImageResultExtractor } from "./image-result-extractor";
20
15
  export { extractImageResult } from "./image-result-extractor";
21
16
 
@@ -11,15 +11,4 @@ export {
11
11
  extractImageUrls,
12
12
  extractOutputUrls,
13
13
  extractThumbnailUrl,
14
- extractImageResult,
15
- extractVideoResult,
16
- executeRules,
17
- IMAGE_EXTRACTION_RULES,
18
- VIDEO_EXTRACTION_RULES,
19
- } from "./url-extractor";
20
-
21
- export type {
22
- ExtractionRule,
23
- ImageResultExtractor,
24
- VideoResultExtractor,
25
14
  } from "./url-extractor";
@@ -11,7 +11,7 @@ export type VideoAlertFunction = (title: string, message: string) => void;
11
11
  /**
12
12
  * Navigation function type for success actions
13
13
  */
14
- export type VideoNavigationFunction = () => void;
14
+ type VideoNavigationFunction = () => void;
15
15
 
16
16
  /**
17
17
  * Default no-op alert function
@@ -61,31 +61,3 @@ export function validateImageData(input: unknown): ValidationResult {
61
61
  };
62
62
  }
63
63
 
64
- /**
65
- * Validates video URL
66
- */
67
- export function validateVideoUrl(input: unknown): ValidationResult {
68
- if (typeof input !== "string") {
69
- return { isValid: false, errors: ["Video URL must be a string"] };
70
- }
71
-
72
- const urlResult = validateURL(input);
73
- if (!urlResult.isValid) {
74
- return urlResult;
75
- }
76
-
77
- const url = new URL(input) as URL & { pathname: string };
78
- const validExtensions = [".mp4", ".mov", ".webm", ".gif"];
79
- const hasValidExtension = validExtensions.some((ext) =>
80
- url.pathname.toLowerCase().endsWith(ext)
81
- );
82
-
83
- if (!hasValidExtension) {
84
- return {
85
- isValid: false,
86
- errors: ["Video URL must have a valid video extension"],
87
- };
88
- }
89
-
90
- return { isValid: true, errors: [] };
91
- }
@@ -28,37 +28,3 @@ export function validateCreationId(input: unknown): ValidationResult {
28
28
  return validateString(input, options);
29
29
  }
30
30
 
31
- /**
32
- * Validates scenario ID
33
- */
34
- export function validateScenarioId(input: unknown): ValidationResult {
35
- const options: StringValidationOptions = {
36
- minLength: 1,
37
- maxLength: 100,
38
- pattern: /^[a-z0-9-]+$/,
39
- };
40
- return validateString(input, options);
41
- }
42
-
43
- /**
44
- * Validates model name
45
- */
46
- export function validateModelName(input: unknown): ValidationResult {
47
- const options: StringValidationOptions = {
48
- minLength: 1,
49
- maxLength: 100,
50
- };
51
- return validateString(input, options);
52
- }
53
-
54
- /**
55
- * Validates provider name
56
- */
57
- export function validateProviderName(input: unknown): ValidationResult {
58
- const options: StringValidationOptions = {
59
- minLength: 1,
60
- maxLength: 50,
61
- pattern: /^[a-z0-9-]+$/,
62
- };
63
- return validateString(input, options);
64
- }
@@ -16,7 +16,7 @@ export {
16
16
  } from "./base-validator";
17
17
 
18
18
  // Sanitizers
19
- export { sanitizeString, sanitizeObject } from "./sanitizer";
19
+ export { sanitizeString } from "./sanitizer";
20
20
 
21
21
  // Advanced validators
22
22
  export {
@@ -27,13 +27,10 @@ export {
27
27
  } from "./advanced-validator";
28
28
 
29
29
  // AI validators
30
- export { validateAIPrompt, validateImageData, validateVideoUrl } from "./ai-validator";
30
+ export { validateAIPrompt, validateImageData } from "./ai-validator";
31
31
 
32
32
  // Entity validators
33
33
  export {
34
34
  validateUserId,
35
35
  validateCreationId,
36
- validateScenarioId,
37
- validateModelName,
38
- validateProviderName,
39
36
  } from "./entity-validator";
@@ -37,20 +37,3 @@ export function sanitizeString(input: unknown): string {
37
37
  return sanitized.slice(0, 10000);
38
38
  }
39
39
 
40
- /**
41
- * Sanitizes object by removing dangerous properties
42
- */
43
- export function sanitizeObject<T extends Record<string, unknown>>(input: T): T {
44
- if (!input || typeof input !== "object") {
45
- return input;
46
- }
47
-
48
- const sanitized = { ...input } as T;
49
- const dangerousKeys = ["__proto__", "constructor", "prototype"];
50
-
51
- for (const key of dangerousKeys) {
52
- delete (sanitized as Record<string, unknown>)[key];
53
- }
54
-
55
- return sanitized;
56
- }
@@ -14,11 +14,13 @@ export interface AIGenerationConfigProps extends Omit<AIGenerationFormProps, "is
14
14
  readonly progress?: number;
15
15
  }
16
16
 
17
+ const EMPTY_IMAGES: { uri: string; previewUrl?: string }[] = [];
18
+
17
19
  export const AIGenerationConfig: React.FC<AIGenerationConfigProps> = ({
18
20
  heroTitle,
19
21
  heroSubtitle,
20
22
  heroIcon = "sparkles-outline",
21
- images = [],
23
+ images = EMPTY_IMAGES,
22
24
  isGenerating = false,
23
25
  progress = 0,
24
26
  ...formProps
@@ -64,5 +64,3 @@ export const generationProgressContentStyles = StyleSheet.create({
64
64
  fontWeight: "600",
65
65
  },
66
66
  });
67
-
68
- export type GenerationProgressContentStyles = typeof generationProgressContentStyles;
@@ -82,4 +82,3 @@ export const PhotoUploadCard: React.FC<PhotoUploadCardProps> = ({
82
82
  };
83
83
 
84
84
  export type { PhotoUploadCardProps, PhotoUploadCardConfig } from "./PhotoUploadCard.types";
85
- export { DEFAULT_CONFIG } from "./PhotoUploadCard.types";
@@ -8,7 +8,7 @@ import { TouchableOpacity } from "react-native";
8
8
  import { AtomicIcon } from "@umituz/react-native-design-system";
9
9
  import { generationProgressContentStyles } from "./GenerationProgressContent.styles";
10
10
 
11
- export interface ProgressCloseButtonProps {
11
+ interface ProgressCloseButtonProps {
12
12
  onPress: () => void;
13
13
  }
14
14
 
@@ -11,7 +11,7 @@ import {
11
11
  } from "@umituz/react-native-design-system";
12
12
  import { generationProgressContentStyles } from "./GenerationProgressContent.styles";
13
13
 
14
- export interface ProgressDismissButtonProps {
14
+ interface ProgressDismissButtonProps {
15
15
  dismissLabel?: string;
16
16
  dismissButtonColor?: string;
17
17
  onDismiss: () => void;
@@ -12,7 +12,7 @@ import {
12
12
  } from "@umituz/react-native-design-system";
13
13
  import { generationProgressContentStyles } from "./GenerationProgressContent.styles";
14
14
 
15
- export interface ProgressHeaderProps {
15
+ interface ProgressHeaderProps {
16
16
  icon?: string;
17
17
  title?: string;
18
18
  message?: string;
@@ -11,7 +11,7 @@ import {
11
11
  } from "@umituz/react-native-design-system";
12
12
  import { generationProgressContentStyles } from "./GenerationProgressContent.styles";
13
13
 
14
- export interface ProgressHintProps {
14
+ interface ProgressHintProps {
15
15
  hint?: string;
16
16
  backgroundHint?: string;
17
17
  hintColor?: string;
@@ -13,7 +13,7 @@ export interface AIGenerationResultAction {
13
13
  icon?: string;
14
14
  }
15
15
 
16
- export interface AIGenerationResultTranslations {
16
+ interface AIGenerationResultTranslations {
17
17
  successText?: string;
18
18
  }
19
19
 
@@ -36,11 +36,13 @@ export interface AIGenerationResultProps extends PropsWithChildren {
36
36
  * Standardized AI Generation Result View
37
37
  * Handles success message, content display (children), and action buttons.
38
38
  */
39
+ const EMPTY_EXTRA_ACTIONS: AIGenerationResultAction[] = [];
40
+
39
41
  export const AIGenerationResult: React.FC<AIGenerationResultProps> = ({
40
42
  successText,
41
43
  primaryAction,
42
44
  secondaryAction,
43
- extraActions = [],
45
+ extraActions = EMPTY_EXTRA_ACTIONS,
44
46
  translations,
45
47
  contentStyle,
46
48
  children,
@@ -85,9 +87,9 @@ export const AIGenerationResult: React.FC<AIGenerationResultProps> = ({
85
87
  />
86
88
  )}
87
89
 
88
- {extraActions.map((action, index) => (
90
+ {extraActions.map((action) => (
89
91
  <AtomicButton
90
- key={`extra-action-${index}`}
92
+ key={action.label}
91
93
  title={action.label}
92
94
  onPress={action.onPress}
93
95
  variant={action.variant || "outline"}
@@ -10,5 +10,4 @@ export {
10
10
  } from "./AIGenerationResult";
11
11
  export {
12
12
  EmptyState as ErrorDisplay,
13
- EmptyState as ExceptionEmptyState,
14
13
  } from "@umituz/react-native-design-system";