@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-ai-generation-content",
3
- "version": "1.17.22",
3
+ "version": "1.17.23",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -46,9 +46,9 @@ export const DEFAULT_CREATION_FILTER: CreationFilter = {
46
46
  */
47
47
  export interface FilterOption {
48
48
  id: string;
49
- /** Display label (use labelKey for i18n) */
50
- label?: string;
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: "Grid" },
62
- { id: "image", labelKey: "creations.filter.images", icon: "Image" },
63
- { id: "video", labelKey: "creations.filter.videos", icon: "Video" },
64
- { id: "voice", labelKey: "creations.filter.voice", icon: "Mic" },
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: "List" },
72
- { id: "completed", labelKey: "creations.filter.completed", icon: "CheckCircle" },
73
- { id: "processing", labelKey: "creations.filter.processing", icon: "Loader" },
74
- { id: "failed", labelKey: "creations.filter.failed", icon: "XCircle" },
75
- { id: "pending", labelKey: "creations.filter.pending", icon: "Clock" },
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, StyleOption, AspectRatioOption, DurationOption } from "./config.types";
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: StyleOption[];
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: DurationOption[];
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?: StyleOption[];
46
+ styles?: VideoStyleOption[];
47
47
  aspectRatios?: AspectRatioOption[];
48
- durations?: DurationOption[];
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
- StyleOption,
25
+ VideoStyleOption,
26
26
  AspectRatioOption,
27
- DurationOption,
27
+ VideoDurationOption,
28
28
  OptionToggleConfig,
29
29
  TextToVideoConfig,
30
30
  HeroConfig,
@@ -17,9 +17,9 @@ export type {
17
17
  TextToVideoConfig,
18
18
  TextToVideoCallbacks,
19
19
  TabConfig,
20
- StyleOption,
20
+ VideoStyleOption,
21
21
  AspectRatioOption,
22
- DurationOption,
22
+ VideoDurationOption,
23
23
  OptionToggleConfig,
24
24
  HeroConfig,
25
25
  ProgressConfig,