@umituz/react-native-ai-generation-content 1.89.55 → 1.89.57

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.89.55",
3
+ "version": "1.89.57",
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",
@@ -6,7 +6,6 @@
6
6
 
7
7
  import React, { useState, useCallback, useMemo } from "react";
8
8
  import { View, StyleSheet } from "react-native";
9
- import * as DocumentPicker from "expo-document-picker";
10
9
  import { AtomicText, AtomicButton } from "@umituz/react-native-design-system/atoms";
11
10
  import { ScreenLayout } from "@umituz/react-native-design-system/layouts";
12
11
  import { NavigationHeader } from "@umituz/react-native-design-system/molecules";
@@ -53,6 +52,9 @@ export const AudioPickerScreen: React.FC<AudioPickerScreenProps> = ({
53
52
  const handlePick = useCallback(async () => {
54
53
  try {
55
54
  setError(null);
55
+
56
+ // Lazy load expo-document-picker only when needed
57
+ const DocumentPicker = await import("expo-document-picker");
56
58
  const result = await DocumentPicker.getDocumentAsync({
57
59
  type: mimeTypes as string[],
58
60
  copyToCacheDirectory: true,
@@ -16,9 +16,7 @@ const GENERATION_TIMEOUT_MS = env.generationMultiImageTimeoutMs;
16
16
  /** Default model input values */
17
17
  const MODEL_INPUT_DEFAULTS = {
18
18
  aspectRatio: "1:1",
19
- outputFormat: "jpeg",
20
- numImages: 1,
21
- enableSafetyChecker: false,
19
+ disableSafetyChecker: false,
22
20
  } as const;
23
21
 
24
22
  export interface MultiImageGenerationInput {
@@ -30,8 +28,6 @@ export interface MultiImageGenerationInput {
30
28
  readonly model: string;
31
29
  /** Aspect ratio (default: "1:1") */
32
30
  readonly aspectRatio?: string;
33
- /** Output format (default: "jpeg") */
34
- readonly outputFormat?: string;
35
31
  }
36
32
 
37
33
  export interface MultiImageGenerationResult {
@@ -70,13 +66,16 @@ export async function executeMultiImageGeneration(
70
66
  timeout: GENERATION_TIMEOUT_MS,
71
67
  });
72
68
 
69
+ // Pruna AI p-image-edit model expects these parameters:
70
+ // - images (array): Base64 encoded images or URLs
71
+ // - prompt (string): Text description
72
+ // - aspect_ratio (optional): "1:1", "16:9", etc.
73
+ // - disable_safety_checker (optional): boolean
73
74
  const modelInput: Record<string, unknown> = {
75
+ images: imageUrls,
74
76
  prompt: input.prompt,
75
- image_urls: imageUrls,
76
77
  aspect_ratio: input.aspectRatio ?? MODEL_INPUT_DEFAULTS.aspectRatio,
77
- output_format: input.outputFormat ?? MODEL_INPUT_DEFAULTS.outputFormat,
78
- num_images: MODEL_INPUT_DEFAULTS.numImages,
79
- enable_safety_checker: MODEL_INPUT_DEFAULTS.enableSafetyChecker,
78
+ disable_safety_checker: MODEL_INPUT_DEFAULTS.disableSafetyChecker,
80
79
  };
81
80
 
82
81
  addGenerationLog(sid, TAG, 'Calling provider.subscribe()...');