@umituz/react-native-ai-generation-content 1.89.9 → 1.89.11

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.9",
3
+ "version": "1.89.11",
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",
@@ -14,6 +14,8 @@ export async function createCreation(
14
14
  const docRef = pathResolver.getDocRef(userId, creation.id);
15
15
  if (!docRef) throw new Error("Firestore not initialized");
16
16
 
17
+ // Build data object with only defined values (Firestore rejects undefined)
18
+ // Use type assertion to bypass readonly restriction for conditional fields
17
19
  const data: CreationDocument = {
18
20
  type: creation.type,
19
21
  uri: creation.uri,
@@ -21,16 +23,14 @@ export async function createCreation(
21
23
  metadata: creation.metadata ?? {},
22
24
  isShared: creation.isShared ?? false,
23
25
  isFavorite: creation.isFavorite ?? false,
24
- };
25
-
26
- // Add optional fields only if they have values (Firestore rejects undefined)
27
- if (creation.status) data.status = creation.status;
28
- if (creation.output) data.output = creation.output;
29
- if (creation.prompt) data.prompt = creation.prompt;
30
- if (creation.provider) data.provider = creation.provider;
31
- if (creation.requestId) data.requestId = creation.requestId;
32
- if (creation.model) data.model = creation.model;
33
- if (creation.startedAt) data.startedAt = creation.startedAt;
26
+ ...(creation.status && { status: creation.status }),
27
+ ...(creation.output && { output: creation.output }),
28
+ ...(creation.prompt && { prompt: creation.prompt }),
29
+ ...(creation.provider && { provider: creation.provider }),
30
+ ...(creation.requestId && { requestId: creation.requestId }),
31
+ ...(creation.model && { model: creation.model }),
32
+ ...(creation.startedAt && { startedAt: creation.startedAt }),
33
+ } as CreationDocument;
34
34
 
35
35
  try {
36
36
  await setDoc(docRef, data);
@@ -38,7 +38,7 @@ export {
38
38
  GenerateButton, ResultDisplay, AIGenerationResult, ErrorDisplay, FeatureHeader,
39
39
  AIGenScreenHeader, CreditBadge, PhotoUploadCard, SettingsSheet, StyleSelector,
40
40
  AspectRatioSelector, DurationSelector, GridSelector, StylePresetsGrid, AIGenerationForm,
41
- AIGenerationConfig, ModelSelector,
41
+ AIGenerationConfig, ModelSelector, SuccessRedirectionCard,
42
42
  createAspectRatioOptions, createDurationOptions, createStyleOptions, createStyleOptionsFromConfig,
43
43
  ASPECT_RATIO_IDS, COMMON_DURATIONS,
44
44
  } from "../presentation/components";
@@ -55,7 +55,7 @@ export type {
55
55
  AspectRatioSelectorProps, DurationSelectorProps, GridSelectorProps, GridSelectorOption,
56
56
  StyleOption, AspectRatioOption, DurationValue, AspectRatioTranslations, DurationOption,
57
57
  StyleTranslations, AIGenerationFormProps, AIGenerationFormTranslations,
58
- AIGenerationConfigProps, ModelOption, ModelSelectorProps,
58
+ AIGenerationConfigProps, ModelOption, ModelSelectorProps, SuccessRedirectionCardProps,
59
59
  } from "../presentation/components";
60
60
 
61
61
  // Layouts
package/src/index.ts CHANGED
@@ -84,3 +84,7 @@ export type {
84
84
  UseResultActionsOptions,
85
85
  UseResultActionsReturn,
86
86
  } from "./domains/result-preview/presentation/types/result-hooks.types";
87
+
88
+ // Result Components
89
+ export { SuccessRedirectionCard } from "./presentation/components/result";
90
+ export type { SuccessRedirectionCardProps } from "./presentation/components/result";