@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.
- package/package.json +6 -1
- package/src/domains/content-moderation/domain/entities/moderation.types.ts +84 -0
- package/src/domains/content-moderation/domain/interfaces/content-filter.interface.ts +24 -0
- package/src/domains/content-moderation/index.ts +67 -0
- package/src/domains/content-moderation/infrastructure/rules/default-rules.data.ts +144 -0
- package/src/domains/content-moderation/infrastructure/rules/rules-registry.ts +75 -0
- package/src/domains/content-moderation/infrastructure/services/content-moderation.service.ts +150 -0
- package/src/domains/content-moderation/infrastructure/services/index.ts +8 -0
- package/src/domains/content-moderation/infrastructure/services/moderators/base.moderator.ts +62 -0
- package/src/domains/content-moderation/infrastructure/services/moderators/image.moderator.ts +64 -0
- package/src/domains/content-moderation/infrastructure/services/moderators/index.ts +10 -0
- package/src/domains/content-moderation/infrastructure/services/moderators/text.moderator.ts +144 -0
- package/src/domains/content-moderation/infrastructure/services/moderators/video.moderator.ts +64 -0
- package/src/domains/content-moderation/infrastructure/services/moderators/voice.moderator.ts +74 -0
- package/src/domains/content-moderation/infrastructure/services/pattern-matcher.service.ts +51 -0
- package/src/domains/content-moderation/presentation/exceptions/content-policy-violation.exception.ts +48 -0
- package/src/domains/prompts/domain/entities/AIPromptTemplate.ts +48 -0
- package/src/domains/prompts/domain/entities/BackgroundRemovalConfig.ts +86 -0
- package/src/domains/prompts/domain/entities/ColorizationConfig.ts +101 -0
- package/src/domains/prompts/domain/entities/FaceSwapConfig.ts +54 -0
- package/src/domains/prompts/domain/entities/FuturePredictionConfig.ts +93 -0
- package/src/domains/prompts/domain/entities/GeneratedPrompt.ts +32 -0
- package/src/domains/prompts/domain/entities/ImageEnhancementConfig.ts +93 -0
- package/src/domains/prompts/domain/entities/PhotoRestorationConfig.ts +64 -0
- package/src/domains/prompts/domain/entities/StyleTransferConfig.ts +80 -0
- package/src/domains/prompts/domain/entities/TextGenerationConfig.ts +100 -0
- package/src/domains/prompts/domain/entities/types.ts +27 -0
- package/src/domains/prompts/domain/entities/value-objects.ts +33 -0
- package/src/domains/prompts/domain/repositories/IAIPromptServices.ts +106 -0
- package/src/domains/prompts/domain/repositories/IPromptHistoryRepository.ts +10 -0
- package/src/domains/prompts/domain/repositories/ITemplateRepository.ts +11 -0
- package/src/domains/prompts/index.ts +318 -0
- package/src/domains/prompts/infrastructure/repositories/PromptHistoryRepository.ts +85 -0
- package/src/domains/prompts/infrastructure/repositories/TemplateRepository.ts +77 -0
- package/src/domains/prompts/infrastructure/services/BackgroundRemovalService.ts +209 -0
- package/src/domains/prompts/infrastructure/services/ColorizationService.ts +232 -0
- package/src/domains/prompts/infrastructure/services/FaceSwapService.ts +198 -0
- package/src/domains/prompts/infrastructure/services/FuturePredictionService.ts +176 -0
- package/src/domains/prompts/infrastructure/services/ImageEnhancementService.ts +181 -0
- package/src/domains/prompts/infrastructure/services/PhotoRestorationService.ts +160 -0
- package/src/domains/prompts/infrastructure/services/PromptGenerationService.ts +59 -0
- package/src/domains/prompts/infrastructure/services/StyleTransferService.ts +194 -0
- package/src/domains/prompts/infrastructure/services/TextGenerationService.ts +241 -0
- package/src/domains/prompts/presentation/hooks/useAIServices.ts +213 -0
- package/src/domains/prompts/presentation/hooks/useAsyncState.ts +56 -0
- package/src/domains/prompts/presentation/hooks/useFaceSwap.ts +100 -0
- package/src/domains/prompts/presentation/hooks/useImageEnhancement.ts +100 -0
- package/src/domains/prompts/presentation/hooks/usePhotoRestoration.ts +100 -0
- package/src/domains/prompts/presentation/hooks/usePromptGeneration.ts +144 -0
- package/src/domains/prompts/presentation/hooks/useStyleTransfer.ts +125 -0
- package/src/domains/prompts/presentation/hooks/useTemplateRepository.ts +113 -0
- package/src/domains/prompts/presentation/theme/theme.ts +16 -0
- package/src/domains/prompts/presentation/theme/types.ts +82 -0
- package/src/domains/prompts/presentation/theme/utils.ts +24 -0
- 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";
|