@umituz/react-native-ai-generation-content 1.17.22 → 1.17.23
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/creations/domain/types/creation-filter.ts +15 -15
- package/src/domains/creations/presentation/hooks/useCreationsFilter.ts +1 -1
- package/src/features/text-to-video/domain/types/component.types.ts +3 -3
- package/src/features/text-to-video/domain/types/config.types.ts +2 -2
- package/src/features/text-to-video/domain/types/index.ts +2 -2
- package/src/features/text-to-video/index.ts +2 -2
package/package.json
CHANGED
|
@@ -46,9 +46,9 @@ export const DEFAULT_CREATION_FILTER: CreationFilter = {
|
|
|
46
46
|
*/
|
|
47
47
|
export interface FilterOption {
|
|
48
48
|
id: string;
|
|
49
|
-
/** Display label
|
|
50
|
-
label
|
|
51
|
-
/** i18n key for label */
|
|
49
|
+
/** Display label */
|
|
50
|
+
label: string;
|
|
51
|
+
/** i18n key for label (use when generating options) */
|
|
52
52
|
labelKey?: string;
|
|
53
53
|
icon?: string;
|
|
54
54
|
count?: number;
|
|
@@ -58,21 +58,21 @@ export interface FilterOption {
|
|
|
58
58
|
* Media filter options
|
|
59
59
|
*/
|
|
60
60
|
export const MEDIA_FILTER_OPTIONS: FilterOption[] = [
|
|
61
|
-
{ id: "all", labelKey: "creations.filter.all", icon: "
|
|
62
|
-
{ id: "image", labelKey: "creations.filter.images", icon: "
|
|
63
|
-
{ id: "video", labelKey: "creations.filter.videos", icon: "
|
|
64
|
-
{ id: "voice", labelKey: "creations.filter.voice", icon: "
|
|
61
|
+
{ id: "all", label: "All", labelKey: "creations.filter.all", icon: "grid-outline" },
|
|
62
|
+
{ id: "image", label: "Images", labelKey: "creations.filter.images", icon: "image-outline" },
|
|
63
|
+
{ id: "video", label: "Videos", labelKey: "creations.filter.videos", icon: "videocam-outline" },
|
|
64
|
+
{ id: "voice", label: "Voice", labelKey: "creations.filter.voice", icon: "mic-outline" },
|
|
65
65
|
];
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* Status filter options
|
|
69
69
|
*/
|
|
70
70
|
export const STATUS_FILTER_OPTIONS: FilterOption[] = [
|
|
71
|
-
{ id: "all", labelKey: "creations.filter.allStatus", icon: "
|
|
72
|
-
{ id: "completed", labelKey: "creations.filter.completed", icon: "
|
|
73
|
-
{ id: "processing", labelKey: "creations.filter.processing", icon: "
|
|
74
|
-
{ id: "failed", labelKey: "creations.filter.failed", icon: "
|
|
75
|
-
{ id: "pending", labelKey: "creations.filter.pending", icon: "
|
|
71
|
+
{ id: "all", label: "All", labelKey: "creations.filter.allStatus", icon: "list-outline" },
|
|
72
|
+
{ id: "completed", label: "Completed", labelKey: "creations.filter.completed", icon: "checkmark-circle-outline" },
|
|
73
|
+
{ id: "processing", label: "Processing", labelKey: "creations.filter.processing", icon: "reload-outline" },
|
|
74
|
+
{ id: "failed", label: "Failed", labelKey: "creations.filter.failed", icon: "close-circle-outline" },
|
|
75
|
+
{ id: "pending", label: "Pending", labelKey: "creations.filter.pending", icon: "time-outline" },
|
|
76
76
|
];
|
|
77
77
|
|
|
78
78
|
/**
|
|
@@ -116,11 +116,11 @@ export function calculateCreationStats(
|
|
|
116
116
|
|
|
117
117
|
// Calculate category counts from type counts
|
|
118
118
|
for (const [typeId, count] of Object.entries(stats.byType)) {
|
|
119
|
-
if (IMAGE_CREATION_TYPES.includes(typeId)) {
|
|
119
|
+
if ((IMAGE_CREATION_TYPES as string[]).includes(typeId)) {
|
|
120
120
|
stats.byCategory.image += count as number;
|
|
121
|
-
} else if (VIDEO_CREATION_TYPES.includes(typeId)) {
|
|
121
|
+
} else if ((VIDEO_CREATION_TYPES as string[]).includes(typeId)) {
|
|
122
122
|
stats.byCategory.video += count as number;
|
|
123
|
-
} else if (VOICE_CREATION_TYPES.includes(typeId)) {
|
|
123
|
+
} else if ((VOICE_CREATION_TYPES as string[]).includes(typeId)) {
|
|
124
124
|
stats.byCategory.voice += count as number;
|
|
125
125
|
}
|
|
126
126
|
}
|
|
@@ -37,7 +37,7 @@ export function useCreationsFilter({
|
|
|
37
37
|
|
|
38
38
|
// Media filter
|
|
39
39
|
if (mediaFilter !== "all") {
|
|
40
|
-
const category = getCategoryForType(creation.type);
|
|
40
|
+
const category = getCategoryForType(creation.type as Parameters<typeof getCategoryForType>[0]);
|
|
41
41
|
if (category !== mediaFilter) {
|
|
42
42
|
return false;
|
|
43
43
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import type { ViewStyle } from "react-native";
|
|
7
7
|
import type { FrameData } from "./state.types";
|
|
8
|
-
import type { TabConfig,
|
|
8
|
+
import type { TabConfig, VideoStyleOption, AspectRatioOption, VideoDurationOption } from "./config.types";
|
|
9
9
|
|
|
10
10
|
export interface GenerationTabsProps {
|
|
11
11
|
tabs: TabConfig[];
|
|
@@ -59,7 +59,7 @@ export interface HintItem {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
export interface StyleSelectorProps {
|
|
62
|
-
styles:
|
|
62
|
+
styles: VideoStyleOption[];
|
|
63
63
|
selectedStyle: string;
|
|
64
64
|
onStyleSelect: (styleId: string) => void;
|
|
65
65
|
getLabel: (key: string) => string;
|
|
@@ -76,7 +76,7 @@ export interface AspectRatioSelectorProps {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
export interface DurationSelectorProps {
|
|
79
|
-
durations:
|
|
79
|
+
durations: VideoDurationOption[];
|
|
80
80
|
selectedDuration: number;
|
|
81
81
|
onDurationSelect: (duration: number) => void;
|
|
82
82
|
getLabel: (key: string) => string;
|
|
@@ -43,9 +43,9 @@ export interface TextToVideoConfig {
|
|
|
43
43
|
enableSound?: boolean;
|
|
44
44
|
enableProfessionalMode?: boolean;
|
|
45
45
|
tabs?: TabConfig[];
|
|
46
|
-
styles?:
|
|
46
|
+
styles?: VideoStyleOption[];
|
|
47
47
|
aspectRatios?: AspectRatioOption[];
|
|
48
|
-
durations?:
|
|
48
|
+
durations?: VideoDurationOption[];
|
|
49
49
|
options?: OptionToggleConfig[];
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -22,9 +22,9 @@ export { INITIAL_FORM_STATE, INITIAL_GENERATION_STATE } from "./state.types";
|
|
|
22
22
|
|
|
23
23
|
export type {
|
|
24
24
|
TabConfig,
|
|
25
|
-
|
|
25
|
+
VideoStyleOption,
|
|
26
26
|
AspectRatioOption,
|
|
27
|
-
|
|
27
|
+
VideoDurationOption,
|
|
28
28
|
OptionToggleConfig,
|
|
29
29
|
TextToVideoConfig,
|
|
30
30
|
HeroConfig,
|