@umituz/react-native-ai-generation-content 1.72.30 → 1.72.32
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 -1
- package/src/domains/content-moderation/infrastructure/rules/default-rules.data.ts +2 -128
- package/src/domains/generation/wizard/configs/image-to-video.config.ts +6 -1
- package/src/domains/generation/wizard/configs/text-to-video.config.ts +6 -1
- package/src/domains/generation/wizard/presentation/screens/SelectionScreen.tsx +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.72.
|
|
3
|
+
"version": "1.72.32",
|
|
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",
|
|
@@ -1,134 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Default Moderation Rules
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* NOTE: Explicit/NSFW content is handled server-side by AI providers (e.g., Fal AI's has_nsfw_concepts)
|
|
6
|
-
* This file only contains rules for content that AI providers don't automatically detect
|
|
3
|
+
* Content moderation disabled - AI providers handle content filtering
|
|
7
4
|
*/
|
|
8
5
|
|
|
9
6
|
import type { ModerationRule } from "../../domain/entities/moderation.types";
|
|
10
7
|
|
|
11
|
-
const
|
|
12
|
-
{
|
|
13
|
-
id: "violence-001",
|
|
14
|
-
name: "Graphic Violence",
|
|
15
|
-
description: "Detects graphic violence and gore",
|
|
16
|
-
contentTypes: ["text", "image", "video"],
|
|
17
|
-
severity: "critical",
|
|
18
|
-
violationType: "violence",
|
|
19
|
-
patterns: [
|
|
20
|
-
"\\bgore\\b",
|
|
21
|
-
"\\bblood\\b.*\\b(splatter|dripping|pool)\\b",
|
|
22
|
-
"\\bmurder\\b",
|
|
23
|
-
"\\bkilling\\b",
|
|
24
|
-
"\\btorture\\b",
|
|
25
|
-
"\\bdismember\\b",
|
|
26
|
-
"\\bbeheading\\b",
|
|
27
|
-
],
|
|
28
|
-
enabled: true,
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
id: "violence-002",
|
|
32
|
-
name: "Weapons Focus",
|
|
33
|
-
description: "Detects inappropriate weapon usage context",
|
|
34
|
-
contentTypes: ["text", "image", "video"],
|
|
35
|
-
severity: "medium",
|
|
36
|
-
violationType: "violence",
|
|
37
|
-
patterns: [
|
|
38
|
-
"\\bgun\\b.*\\b(pointing|aimed|shooting)\\b",
|
|
39
|
-
"\\bweapon\\b.*\\b(attack|assault|harm)\\b",
|
|
40
|
-
"\\bknife\\b.*\\b(stabbing|cutting|slashing)\\b",
|
|
41
|
-
],
|
|
42
|
-
enabled: true,
|
|
43
|
-
},
|
|
44
|
-
];
|
|
45
|
-
|
|
46
|
-
const hateSpeechRules: ModerationRule[] = [
|
|
47
|
-
{
|
|
48
|
-
id: "hate-001",
|
|
49
|
-
name: "Discriminatory Language",
|
|
50
|
-
description: "Detects hate speech and discriminatory content",
|
|
51
|
-
contentTypes: ["text", "voice"],
|
|
52
|
-
severity: "critical",
|
|
53
|
-
violationType: "hate_speech",
|
|
54
|
-
patterns: [
|
|
55
|
-
"\\bhate\\b.*\\b(speech|crime|group)\\b",
|
|
56
|
-
"\\bracist\\b",
|
|
57
|
-
"\\bsexist\\b",
|
|
58
|
-
"\\bbigot\\b",
|
|
59
|
-
"\\bxenophobia\\b",
|
|
60
|
-
],
|
|
61
|
-
enabled: true,
|
|
62
|
-
},
|
|
63
|
-
];
|
|
64
|
-
|
|
65
|
-
const illegalActivityRules: ModerationRule[] = [
|
|
66
|
-
{
|
|
67
|
-
id: "illegal-001",
|
|
68
|
-
name: "Drug Content",
|
|
69
|
-
description: "Detects drug-related content",
|
|
70
|
-
contentTypes: ["text", "image", "video"],
|
|
71
|
-
severity: "high",
|
|
72
|
-
violationType: "illegal_activity",
|
|
73
|
-
patterns: [
|
|
74
|
-
"\\bdrug\\b.*\\b(dealing|trafficking|manufacturing)\\b",
|
|
75
|
-
"\\bcocaine\\b",
|
|
76
|
-
"\\bheroin\\b",
|
|
77
|
-
"\\bmethamphetamine\\b",
|
|
78
|
-
"\\billegal\\b.*\\b(substance|drug)\\b",
|
|
79
|
-
],
|
|
80
|
-
enabled: true,
|
|
81
|
-
},
|
|
82
|
-
];
|
|
83
|
-
|
|
84
|
-
const personalInfoRules: ModerationRule[] = [
|
|
85
|
-
{
|
|
86
|
-
id: "pii-001",
|
|
87
|
-
name: "Personal Information",
|
|
88
|
-
description: "Detects personal identifiable information",
|
|
89
|
-
contentTypes: ["text", "image"],
|
|
90
|
-
severity: "medium",
|
|
91
|
-
violationType: "personal_info",
|
|
92
|
-
patterns: [
|
|
93
|
-
"\\b\\d{3}-\\d{2}-\\d{4}\\b",
|
|
94
|
-
"\\b\\d{16}\\b",
|
|
95
|
-
"\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}\\b",
|
|
96
|
-
"\\b\\d{3}[-.]?\\d{3}[-.]?\\d{4}\\b",
|
|
97
|
-
],
|
|
98
|
-
enabled: true,
|
|
99
|
-
},
|
|
100
|
-
];
|
|
101
|
-
|
|
102
|
-
const intimateContentRules: ModerationRule[] = [
|
|
103
|
-
{
|
|
104
|
-
id: "intimate-001",
|
|
105
|
-
name: "Romantic and Intimate Content",
|
|
106
|
-
description: "Detects romantic and intimate content requests",
|
|
107
|
-
contentTypes: ["text"],
|
|
108
|
-
severity: "high",
|
|
109
|
-
violationType: "explicit_content",
|
|
110
|
-
patterns: [
|
|
111
|
-
"\\bkiss(ing|es|ed)?\\b",
|
|
112
|
-
"\\bhug(ging|s|ged)?\\b",
|
|
113
|
-
"\\bromantic\\b",
|
|
114
|
-
"\\bintimate\\b",
|
|
115
|
-
"\\bcouple\\b.*\\b(kissing|hugging|embracing)\\b",
|
|
116
|
-
"\\b(kissing|hugging|embracing)\\b.*\\bcouple\\b",
|
|
117
|
-
"\\blove\\b.*\\bscene\\b",
|
|
118
|
-
"\\bsensual\\b",
|
|
119
|
-
"\\bseductive\\b",
|
|
120
|
-
"\\bpassionate\\b.*\\b(kiss|embrace)\\b",
|
|
121
|
-
"\\btwo people\\b.*\\b(kissing|hugging|embracing)\\b",
|
|
122
|
-
"\\bpeople\\b.*\\b(kissing|hugging|embracing)\\b",
|
|
123
|
-
],
|
|
124
|
-
enabled: true,
|
|
125
|
-
},
|
|
126
|
-
];
|
|
127
|
-
|
|
128
|
-
export const defaultModerationRules: ModerationRule[] = [
|
|
129
|
-
...violenceRules,
|
|
130
|
-
...hateSpeechRules,
|
|
131
|
-
...illegalActivityRules,
|
|
132
|
-
...personalInfoRules,
|
|
133
|
-
...intimateContentRules,
|
|
134
|
-
];
|
|
8
|
+
export const defaultModerationRules: ModerationRule[] = [];
|
|
@@ -31,7 +31,12 @@ export const IMAGE_TO_VIDEO_WIZARD_CONFIG: WizardFeatureConfig = {
|
|
|
31
31
|
type: "selection",
|
|
32
32
|
titleKey: "generation.duration.title",
|
|
33
33
|
selectionType: "duration",
|
|
34
|
-
|
|
34
|
+
layout: "list",
|
|
35
|
+
options: [
|
|
36
|
+
{ id: "4s", label: "4 seconds", value: 4 },
|
|
37
|
+
{ id: "5s", label: "5 seconds", value: 5 },
|
|
38
|
+
{ id: "6s", label: "6 seconds", value: 6 },
|
|
39
|
+
],
|
|
35
40
|
required: true,
|
|
36
41
|
defaultValue: "4s",
|
|
37
42
|
},
|
|
@@ -49,7 +49,12 @@ export const TEXT_TO_VIDEO_WIZARD_CONFIG: WizardFeatureConfig = {
|
|
|
49
49
|
type: "selection",
|
|
50
50
|
titleKey: "generation.duration.title",
|
|
51
51
|
selectionType: "duration",
|
|
52
|
-
|
|
52
|
+
layout: "list",
|
|
53
|
+
options: [
|
|
54
|
+
{ id: "4s", label: "4 seconds", value: 4 },
|
|
55
|
+
{ id: "5s", label: "5 seconds", value: 5 },
|
|
56
|
+
{ id: "6s", label: "6 seconds", value: 6 },
|
|
57
|
+
],
|
|
53
58
|
required: true,
|
|
54
59
|
defaultValue: "4s",
|
|
55
60
|
},
|
|
@@ -134,7 +134,7 @@ export const SelectionScreen: React.FC<SelectionScreenProps> = ({
|
|
|
134
134
|
<ScreenLayout scrollable={true} edges={["left", "right"]} hideScrollIndicator={true} contentContainerStyle={styles.scrollContent}>
|
|
135
135
|
<AtomicText type="headlineMedium" color="textPrimary" style={styles.title}>{translations.title}</AtomicText>
|
|
136
136
|
{translations.subtitle ? <AtomicText type="bodyMedium" color="textSecondary" style={styles.subtitle}>{translations.subtitle}</AtomicText> : null}
|
|
137
|
-
<View style={styles.optionsGrid}>{options.map(renderOption)}</View>
|
|
137
|
+
<View style={[styles.optionsGrid, config?.layout === "grid" && { flexDirection: "row", flexWrap: "wrap" }]}>{options.map(renderOption)}</View>
|
|
138
138
|
</ScreenLayout>
|
|
139
139
|
</View>
|
|
140
140
|
);
|
|
@@ -145,19 +145,19 @@ const createStyles = (tokens: DesignTokens) =>
|
|
|
145
145
|
scrollContent: { paddingHorizontal: tokens.spacing.lg, paddingBottom: 40 },
|
|
146
146
|
title: { marginBottom: tokens.spacing.sm },
|
|
147
147
|
subtitle: { marginBottom: tokens.spacing.lg },
|
|
148
|
-
optionsGrid: {
|
|
148
|
+
optionsGrid: { gap: tokens.spacing.sm },
|
|
149
149
|
optionCard: {
|
|
150
150
|
flex: 1,
|
|
151
|
-
|
|
151
|
+
width: "100%",
|
|
152
152
|
padding: tokens.spacing.md,
|
|
153
153
|
borderWidth: 2,
|
|
154
154
|
borderRadius: tokens.borders.radius.md,
|
|
155
|
+
flexDirection: "row",
|
|
155
156
|
alignItems: "center",
|
|
156
|
-
|
|
157
|
-
gap: tokens.spacing.xs,
|
|
157
|
+
gap: tokens.spacing.md,
|
|
158
158
|
position: "relative",
|
|
159
159
|
},
|
|
160
|
-
optionLabel: { textAlign: "
|
|
160
|
+
optionLabel: { flex: 1, textAlign: "left" },
|
|
161
161
|
checkmark: {
|
|
162
162
|
position: "absolute",
|
|
163
163
|
top: tokens.spacing.xs,
|