@umituz/react-native-ai-generation-content 1.12.2 → 1.12.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.
Files changed (55) hide show
  1. package/package.json +6 -1
  2. package/src/domains/content-moderation/domain/entities/moderation.types.ts +84 -0
  3. package/src/domains/content-moderation/domain/interfaces/content-filter.interface.ts +24 -0
  4. package/src/domains/content-moderation/index.ts +67 -0
  5. package/src/domains/content-moderation/infrastructure/rules/default-rules.data.ts +144 -0
  6. package/src/domains/content-moderation/infrastructure/rules/rules-registry.ts +75 -0
  7. package/src/domains/content-moderation/infrastructure/services/content-moderation.service.ts +150 -0
  8. package/src/domains/content-moderation/infrastructure/services/index.ts +8 -0
  9. package/src/domains/content-moderation/infrastructure/services/moderators/base.moderator.ts +62 -0
  10. package/src/domains/content-moderation/infrastructure/services/moderators/image.moderator.ts +64 -0
  11. package/src/domains/content-moderation/infrastructure/services/moderators/index.ts +10 -0
  12. package/src/domains/content-moderation/infrastructure/services/moderators/text.moderator.ts +144 -0
  13. package/src/domains/content-moderation/infrastructure/services/moderators/video.moderator.ts +64 -0
  14. package/src/domains/content-moderation/infrastructure/services/moderators/voice.moderator.ts +74 -0
  15. package/src/domains/content-moderation/infrastructure/services/pattern-matcher.service.ts +51 -0
  16. package/src/domains/content-moderation/presentation/exceptions/content-policy-violation.exception.ts +48 -0
  17. package/src/domains/prompts/domain/entities/AIPromptTemplate.ts +48 -0
  18. package/src/domains/prompts/domain/entities/BackgroundRemovalConfig.ts +86 -0
  19. package/src/domains/prompts/domain/entities/ColorizationConfig.ts +101 -0
  20. package/src/domains/prompts/domain/entities/FaceSwapConfig.ts +54 -0
  21. package/src/domains/prompts/domain/entities/FuturePredictionConfig.ts +93 -0
  22. package/src/domains/prompts/domain/entities/GeneratedPrompt.ts +32 -0
  23. package/src/domains/prompts/domain/entities/ImageEnhancementConfig.ts +93 -0
  24. package/src/domains/prompts/domain/entities/PhotoRestorationConfig.ts +64 -0
  25. package/src/domains/prompts/domain/entities/StyleTransferConfig.ts +80 -0
  26. package/src/domains/prompts/domain/entities/TextGenerationConfig.ts +100 -0
  27. package/src/domains/prompts/domain/entities/types.ts +27 -0
  28. package/src/domains/prompts/domain/entities/value-objects.ts +33 -0
  29. package/src/domains/prompts/domain/repositories/IAIPromptServices.ts +106 -0
  30. package/src/domains/prompts/domain/repositories/IPromptHistoryRepository.ts +10 -0
  31. package/src/domains/prompts/domain/repositories/ITemplateRepository.ts +11 -0
  32. package/src/domains/prompts/index.ts +318 -0
  33. package/src/domains/prompts/infrastructure/repositories/PromptHistoryRepository.ts +85 -0
  34. package/src/domains/prompts/infrastructure/repositories/TemplateRepository.ts +77 -0
  35. package/src/domains/prompts/infrastructure/services/BackgroundRemovalService.ts +209 -0
  36. package/src/domains/prompts/infrastructure/services/ColorizationService.ts +232 -0
  37. package/src/domains/prompts/infrastructure/services/FaceSwapService.ts +198 -0
  38. package/src/domains/prompts/infrastructure/services/FuturePredictionService.ts +176 -0
  39. package/src/domains/prompts/infrastructure/services/ImageEnhancementService.ts +181 -0
  40. package/src/domains/prompts/infrastructure/services/PhotoRestorationService.ts +160 -0
  41. package/src/domains/prompts/infrastructure/services/PromptGenerationService.ts +59 -0
  42. package/src/domains/prompts/infrastructure/services/StyleTransferService.ts +194 -0
  43. package/src/domains/prompts/infrastructure/services/TextGenerationService.ts +241 -0
  44. package/src/domains/prompts/presentation/hooks/useAIServices.ts +213 -0
  45. package/src/domains/prompts/presentation/hooks/useAsyncState.ts +56 -0
  46. package/src/domains/prompts/presentation/hooks/useFaceSwap.ts +100 -0
  47. package/src/domains/prompts/presentation/hooks/useImageEnhancement.ts +100 -0
  48. package/src/domains/prompts/presentation/hooks/usePhotoRestoration.ts +100 -0
  49. package/src/domains/prompts/presentation/hooks/usePromptGeneration.ts +144 -0
  50. package/src/domains/prompts/presentation/hooks/useStyleTransfer.ts +125 -0
  51. package/src/domains/prompts/presentation/hooks/useTemplateRepository.ts +113 -0
  52. package/src/domains/prompts/presentation/theme/theme.ts +16 -0
  53. package/src/domains/prompts/presentation/theme/types.ts +82 -0
  54. package/src/domains/prompts/presentation/theme/utils.ts +24 -0
  55. package/src/index.ts +12 -0
@@ -0,0 +1,24 @@
1
+ import type { Theme } from './types';
2
+ import { useTheme } from './theme';
3
+
4
+ export const createStyleSheet = <T extends Record<string, any>>(
5
+ styles: (theme: Theme) => T
6
+ ): T => {
7
+ const theme = useTheme();
8
+ return styles(theme);
9
+ };
10
+
11
+ export const spacing = (key: keyof Theme['spacing'], customTheme?: Theme): number => {
12
+ const theme = customTheme || useTheme();
13
+ return theme.spacing[key];
14
+ };
15
+
16
+ export const color = (key: keyof Theme['colors'], customTheme?: Theme): string => {
17
+ const theme = customTheme || useTheme();
18
+ return theme.colors[key];
19
+ };
20
+
21
+ export const typography = (key: keyof Theme['typography'], customTheme?: Theme) => {
22
+ const theme = customTheme || useTheme();
23
+ return theme.typography[key];
24
+ };
package/src/index.ts CHANGED
@@ -221,3 +221,15 @@ export type {
221
221
  ResultStoryCardProps,
222
222
  ResultActionsProps,
223
223
  } from "./presentation/components";
224
+
225
+ // =============================================================================
226
+ // DOMAINS - AI Prompts
227
+ // =============================================================================
228
+
229
+ export * from "./domains/prompts";
230
+
231
+ // =============================================================================
232
+ // DOMAINS - Content Moderation
233
+ // =============================================================================
234
+
235
+ export * from "./domains/content-moderation";