@umituz/react-native-ai-generation-content 1.89.23 → 1.89.24

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.23",
3
+ "version": "1.89.24",
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",
@@ -59,7 +59,7 @@ export function useGalleryState(options: GalleryStateOptions): GalleryStateRetur
59
59
  [selectedCreation]
60
60
  );
61
61
 
62
- return {
62
+ return useMemo(() => ({
63
63
  selectedCreation,
64
64
  showRatingPicker,
65
65
  selectedImageUrl,
@@ -68,5 +68,12 @@ export function useGalleryState(options: GalleryStateOptions): GalleryStateRetur
68
68
  showPreview,
69
69
  setSelectedCreation,
70
70
  setShowRatingPicker,
71
- };
71
+ }), [
72
+ selectedCreation,
73
+ showRatingPicker,
74
+ selectedImageUrl,
75
+ selectedVideoUrl,
76
+ hasMediaToShow,
77
+ showPreview,
78
+ ]);
72
79
  }
@@ -1,5 +1,6 @@
1
1
  import React, { useMemo, useCallback, useState } from "react";
2
2
  import { View, FlatList } from "react-native";
3
+ import { useSafeAreaInsets } from "react-native-safe-area-context";
3
4
  import { ScreenLayout } from "@umituz/react-native-design-system/layouts";
4
5
  import { FilterSheet, useAppFocusEffect } from "@umituz/react-native-design-system/molecules";
5
6
  import { useAppDesignTokens } from "@umituz/react-native-design-system/theme";
@@ -37,6 +38,7 @@ export function CreationsGalleryScreen({
37
38
  onShareToFeed,
38
39
  }: CreationsGalleryScreenProps) {
39
40
  const tokens = useAppDesignTokens();
41
+ const insets = useSafeAreaInsets();
40
42
  const [viewMode, setViewMode] = useState<"list" | "grid">("list");
41
43
 
42
44
  const { data: creations, isLoading, refetch } = useCreations({ userId, repository });
@@ -76,9 +78,10 @@ export function CreationsGalleryScreen({
76
78
  void refetch();
77
79
  // Reset selection on focus if no initial ID is being enforced
78
80
  if (!initialCreationId) {
79
- galleryState.setSelectedCreation(null);
81
+ const { setSelectedCreation } = galleryState;
82
+ setSelectedCreation(null);
80
83
  }
81
- }, [refetch, initialCreationId, galleryState]));
84
+ }, [refetch, initialCreationId, galleryState.setSelectedCreation]));
82
85
 
83
86
  const filterButtons = useMemo(() =>
84
87
  createFilterButtons({
@@ -157,7 +160,14 @@ export function CreationsGalleryScreen({
157
160
  if (!creations?.length && !isLoading) return null;
158
161
  if (isLoading) return null;
159
162
  return (
160
- <View style={[styles.header, { backgroundColor: tokens.colors.surface, borderBottomColor: tokens.colors.border }]}>
163
+ <View style={[
164
+ styles.header,
165
+ {
166
+ backgroundColor: tokens.colors.surface,
167
+ borderBottomColor: tokens.colors.border,
168
+ paddingTop: hasScreenHeader ? 0 : insets.top
169
+ }
170
+ ]}>
161
171
  <GalleryHeader
162
172
  title={hasScreenHeader ? "" : t(config.translations.title)}
163
173
  count={filters.filtered.length}
@@ -216,7 +226,7 @@ export function CreationsGalleryScreen({
216
226
  }
217
227
 
218
228
  return (
219
- <ScreenLayout header={screenHeader} scrollable={false}>
229
+ <ScreenLayout header={screenHeader} scrollable={false} edges={["left", "right", "bottom"]}>
220
230
  {renderHeader}
221
231
  {filters.filtered.length === 0 ? (
222
232
  <View style={[styles.listContent, styles.emptyContent]}>