@umituz/react-native-ai-generation-content 1.61.24 → 1.61.25
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 +1 -2
- package/src/domains/content-moderation/domain/entities/moderation.types.ts +2 -2
- package/src/domains/content-moderation/index.ts +0 -1
- package/src/domains/content-moderation/infrastructure/services/moderators/base.moderator.ts +2 -4
- package/src/domains/content-moderation/infrastructure/services/moderators/index.ts +1 -1
- package/src/domains/result-preview/presentation/components/GenerationErrorScreen.tsx +1 -1
- package/src/domains/scenarios/presentation/screens/ScenarioPreviewScreen.tsx +1 -1
- package/src/exports/domains.ts +1 -1
- package/src/presentation/hooks/generation/useAIGenerateState.ts +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.61.
|
|
3
|
+
"version": "1.61.25",
|
|
4
4
|
"description": "Provider-agnostic AI generation orchestration for React Native with result preview components",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"./content-moderation": "./src/domains/content-moderation/index.ts",
|
|
12
12
|
"./creations": "./src/domains/creations/index.ts",
|
|
13
13
|
"./face-detection": "./src/domains/face-detection/index.ts",
|
|
14
|
-
"./feature-background": "./src/domains/feature-background/index.ts",
|
|
15
14
|
"./generation": "./src/domains/generation/index.ts"
|
|
16
15
|
},
|
|
17
16
|
"files": [
|
|
@@ -34,8 +34,8 @@ export interface ModerationRule {
|
|
|
34
34
|
export interface ModerationResult {
|
|
35
35
|
isAllowed: boolean;
|
|
36
36
|
violations: Violation[];
|
|
37
|
-
confidence
|
|
38
|
-
suggestedAction
|
|
37
|
+
confidence?: number;
|
|
38
|
+
suggestedAction?: "allow" | "warn" | "block";
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export interface Violation {
|
|
@@ -4,15 +4,13 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import type {
|
|
7
|
+
ModerationResult,
|
|
7
8
|
Violation,
|
|
8
9
|
ViolationType,
|
|
9
10
|
SuggestionMessages,
|
|
10
11
|
} from "../../../domain/entities/moderation.types";
|
|
11
12
|
|
|
12
|
-
export
|
|
13
|
-
isAllowed: boolean;
|
|
14
|
-
violations: Violation[];
|
|
15
|
-
}
|
|
13
|
+
export type { ModerationResult };
|
|
16
14
|
|
|
17
15
|
const DEFAULT_SUGGESTIONS: Record<string, string> = {
|
|
18
16
|
explicit_content: "Remove explicit content",
|
|
@@ -7,4 +7,4 @@ export { textModerator } from "./text.moderator";
|
|
|
7
7
|
export { imageModerator } from "./image.moderator";
|
|
8
8
|
export { videoModerator } from "./video.moderator";
|
|
9
9
|
export { voiceModerator } from "./voice.moderator";
|
|
10
|
-
export { BaseModerator
|
|
10
|
+
export { BaseModerator } from "./base.moderator";
|
|
@@ -99,7 +99,7 @@ const createStyles = (tokens: DesignTokens) =>
|
|
|
99
99
|
container: { flex: 1 },
|
|
100
100
|
content: { flex: 1, alignItems: "center", paddingHorizontal: 32, paddingTop: 80, paddingBottom: 40 },
|
|
101
101
|
iconContainer: { marginBottom: 24 },
|
|
102
|
-
title: { ...tokens.typography.
|
|
102
|
+
title: { ...tokens.typography.headlineSmall, color: tokens.colors.textPrimary, fontWeight: "700", marginBottom: 12, textAlign: "center" },
|
|
103
103
|
message: { ...tokens.typography.bodyMedium, color: tokens.colors.textSecondary, textAlign: "center", lineHeight: 22, marginBottom: 24 },
|
|
104
104
|
infoContainer: { flexDirection: "row", alignItems: "center", gap: 6, opacity: 0.7 },
|
|
105
105
|
infoText: { ...tokens.typography.bodySmall, color: tokens.colors.textSecondary },
|
|
@@ -122,7 +122,7 @@ const createStyles = (tokens: DesignTokens) =>
|
|
|
122
122
|
marginTop: -40,
|
|
123
123
|
},
|
|
124
124
|
scenarioTitle: {
|
|
125
|
-
...tokens.typography.
|
|
125
|
+
...tokens.typography.headlineLarge,
|
|
126
126
|
color: tokens.colors.textPrimary,
|
|
127
127
|
fontWeight: "900",
|
|
128
128
|
marginBottom: 12,
|
package/src/exports/domains.ts
CHANGED
|
@@ -39,7 +39,7 @@ export type {
|
|
|
39
39
|
ContentType, ModerationSeverity, AgeRating, ViolationType, ModerationRule,
|
|
40
40
|
ModerationResult, Violation, ModerationContext, ModerationConfig,
|
|
41
41
|
SuggestionMessages, ValidationLimits, ContentFilterResult, IContentFilter, IModerator,
|
|
42
|
-
PatternMatch,
|
|
42
|
+
PatternMatch,
|
|
43
43
|
} from "../domains/content-moderation";
|
|
44
44
|
export {
|
|
45
45
|
contentModerationService, patternMatcherService, textModerator, imageModerator,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useState, useCallback } from "react";
|
|
1
2
|
|
|
2
3
|
export enum AIGenerateStep {
|
|
3
4
|
INFO = "INFO",
|
|
@@ -17,8 +18,6 @@ export interface UploadedImage {
|
|
|
17
18
|
fileSize?: number;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
import { useState, useCallback } from "react";
|
|
21
|
-
|
|
22
21
|
export function useAIGenerateState() {
|
|
23
22
|
const [currentStep, setCurrentStep] = useState<AIGenerateStep>(
|
|
24
23
|
AIGenerateStep.INFO,
|