@umituz/react-native-ai-generation-content 1.26.73 → 1.26.74

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.26.73",
3
+ "version": "1.26.74",
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",
@@ -46,11 +46,11 @@
46
46
  "@tanstack/react-query": ">=5.0.0",
47
47
  "@umituz/react-native-subscription": ">=2.23.0",
48
48
  "@umituz/react-native-video-editor": ">=1.0.0",
49
+ "expo-video": ">=1.0.0",
49
50
  "firebase": ">=10.0.0",
50
51
  "react": ">=18.0.0",
51
52
  "react-native": ">=0.74.0",
52
- "react-native-safe-area-context": ">=4.0.0",
53
- "expo-video": ">=1.0.0"
53
+ "react-native-safe-area-context": ">=4.0.0"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@expo/vector-icons": "^15.0.3",
@@ -67,7 +67,7 @@
67
67
  "@types/react": "~19.1.10",
68
68
  "@typescript-eslint/eslint-plugin": "^8.0.0",
69
69
  "@typescript-eslint/parser": "^8.0.0",
70
- "@umituz/react-native-design-system": "*",
70
+ "@umituz/react-native-design-system": "^2.9.44",
71
71
  "@umituz/react-native-firebase": "*",
72
72
  "@umituz/react-native-localization": "*",
73
73
  "@umituz/react-native-subscription": "*",
@@ -99,6 +99,7 @@
99
99
  "react-i18next": "^16.5.0",
100
100
  "react-native": "0.81.5",
101
101
  "react-native-gesture-handler": "^2.30.0",
102
+ "react-native-purchases": "^9.7.1",
102
103
  "react-native-safe-area-context": "^5.6.2",
103
104
  "react-native-svg": "^15.15.1",
104
105
  "rn-emoji-keyboard": "^1.7.0",
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { getMediaTypeFromUrl, extractMediaUrl } from "@umituz/react-native-design-system";
2
+ import { extractMediaUrl, getMediaTypeFromUrl } from "@umituz/react-native-design-system";
3
3
  import { StepType } from "../../../../../domain/entities/flow-config.types";
4
4
  import { GenericPhotoUploadScreen } from "../screens/GenericPhotoUploadScreen";
5
5
  import { GeneratingScreen } from "../screens/GeneratingScreen";
@@ -6,7 +6,7 @@
6
6
 
7
7
  import { useState, useCallback, useEffect } from "react";
8
8
  import { Alert } from "react-native";
9
- import { useMedia, MediaValidationError, MediaQuality, MEDIA_CONSTANTS } from "@umituz/react-native-design-system";
9
+ import { useMedia, MediaQuality, MediaValidationError, MEDIA_CONSTANTS } from "@umituz/react-native-design-system";
10
10
  import type { UploadedImage } from "../../../../../presentation/hooks/generation/useAIGenerateState";
11
11
 
12
12
  export interface PhotoUploadConfig {
@@ -60,7 +60,6 @@ export const usePhotoUploadState = ({
60
60
 
61
61
  const handlePickImage = useCallback(async () => {
62
62
  try {
63
- // Design system handles validation with maxFileSizeMB
64
63
  const result = await pickImage({
65
64
  allowsEditing: true,
66
65
  aspect: [1, 1],
@@ -78,7 +77,7 @@ export const usePhotoUploadState = ({
78
77
  } else if (result.error === MediaValidationError.PERMISSION_DENIED) {
79
78
  Alert.alert(
80
79
  translations.error,
81
- translations.permissionDenied || "Permission to access media library is required",
80
+ translations.permissionDenied ?? "Permission to access media library is required",
82
81
  );
83
82
  }
84
83
  return;
@@ -93,7 +92,6 @@ export const usePhotoUploadState = ({
93
92
  return;
94
93
  }
95
94
 
96
- // Create uploaded image object
97
95
  const uploadedImage: UploadedImage = {
98
96
  uri: selectedAsset.uri,
99
97
  previewUrl: selectedAsset.uri,
@@ -105,7 +103,7 @@ export const usePhotoUploadState = ({
105
103
  setImage(uploadedImage);
106
104
 
107
105
  if (typeof __DEV__ !== "undefined" && __DEV__) {
108
- const fileSizeMB = (selectedAsset.fileSize || 0) / (1024 * 1024);
106
+ const fileSizeMB = (selectedAsset.fileSize ?? 0) / (1024 * 1024);
109
107
  console.log("[usePhotoUploadState] Image selected", {
110
108
  width: uploadedImage.width,
111
109
  height: uploadedImage.height,
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Global type declarations for React Native environment
3
+ */
4
+
5
+ /** React Native development flag */
6
+ declare const __DEV__: boolean;
7
+
8
+ /** Extend NodeJS namespace for React Native compatibility */
9
+ declare namespace NodeJS {
10
+ interface Global {
11
+ __DEV__: boolean;
12
+ }
13
+ }